Multiple scene managers


08-09-2007 09:44:36

I noticed, that QuickGUI needs to know about the current scene manager. Is it possible to switch to a different scene manager at run time? (haven't tried it yet, but I am going to start using multiple scene managers very soon).

If it is not possible, I would like to file it in as a feature request.


08-09-2007 18:04:59

It is supported, however I haven't tested it. :lol:

void GUIManager::setSceneManager(Ogre::SceneManager* sm)
if(sm == NULL)

// remove listener from previous scene manager
if(mSceneManager != NULL)
// update
mSceneManager = sm;
// add listener to new scene manager

The reason I need SceneManager is to register the GUIManager as a RenderQueueListener. When you switch SceneManagers, it will just deregister and register with the new scenemanager. Previously I had gotten a SceneManager iterator from root and chosen the first scenemanager I come across, so the user didn't have to make this call.


09-09-2007 16:48:58

Yes, it works. Good job!