How to create CullBinManager (not from config file) ?

Everytime I try to create one, always unsuccesful :
error : cannot init constant class

And what is the render bin of the frame rate meter ? I couldn’t see where it is.

Thanks in advance.

Without knowing implementation details: I think there is only one cull bin manager instance and you are not allowed to create other instances.

About the frame rate meter: I used this code to find the right bin via try& error, by de-activating first bin index 0, then 1 and so on. Deactivating bin index number 2 makes the frame rate meter vanish, so it must be index 2 (name: “transparant”).

Moving the frame rate meter to another bin seems to work too.

        mgr = CullBinManager.getGlobalPtr( )
        print mgr
        mgr.setBinActive( 2, False )
        print '==>', mgr.getBinName( 2 )

        fps = base.frameRateMeter
        fps.setBin( 'fixed' )

EDIT: the config.prc varibale “cull-bin” creates AFAIK a new bin, not a new cull bin manager. Is there a config variable to create a new (second) cull bin manager?

enn0x

There is only one CullBinManager. Perhaps the poster meant to ask how to create a new CullBin? This can be done, of course, with a call to cbMgr.addBin(), where cbMgr is the global CullBinManager, retrieved via CullBinManager.getGlobalPtr() (as illustrated in enn0x’s post).

Note that the frame rate meter does not specify a particular bin for itself, so it gets placed in the transparent bin by default, since it has some transparency. However, the bin is largely irrelevant, because the frame rate meter sets itself up as the only object in its own DisplayRegion, which gets rendered in sequence with the other DisplayRegions on the main window. This is how it controls its render order with respect to the other objects onscreen.

David

Yes, that’s it !
See how easily I miss things ? :blush:
Thanks a lot for your efforts.

It’s nicer now. My recent problems were all about –[THIS]–