I just ran some more experiments and noted the following:
The problem seems to be rooted in the fact that I load my own prc file.
I mean, instead of modifying /etc/config.prc directly, I have my own prc file which I load explicitly.
If I add the cull-bin in the original config.prc, it works.
Do I need to do something else than loading the config.prc before executing the DirectStart to make it work?
The cull-bin variable is one of several that are queried once, at application start. After application start, you have to add bins using the CullBinManager::add_bin() method instead.
Or, you can put this line in your prc file, but instead of loading your prc file via runtime commands, ensure that it gets loaded by defining PRC_DIR and/or PRC_PATH to locate it correctly.
This is the way the prc system is really intended to be used. You can define these variables either as runtime environment variables (I think they’re called PANDA_PRC_DIR and PANDA_PRC_PATH as makepanda builds Panda), or you can compile them into Panda itself if you build your own Panda.
Oh, and by application start, I mean the very first import of PandaModules, not DirectStart. There’s no way to insert a loadPrcFile() command before application start.