Zini
11-09-2007 10:17:31
I have another request: Could you change GUIManager::setSceneManager to something like this:
I would like to set the scene manager to a 0-pointer again, because at one point I am deleting a scene manager, which is used for the GUI, so I need to tell the GUI, that the scene manager isn't available anymore. But the new scene manager isn't available at this point either, therefore a 0-pointer is the only option.
// remove listener from previous scene manager
if(mSceneManager != NULL)
mSceneManager->removeRenderQueueListener(this);
// update
mSceneManager = sm;
// add listener to new scene manager
if (mSceneManager)
mSceneManager->addRenderQueueListener(this);
I would like to set the scene manager to a 0-pointer again, because at one point I am deleting a scene manager, which is used for the GUI, so I need to tell the GUI, that the scene manager isn't available anymore. But the new scene manager isn't available at this point either, therefore a 0-pointer is the only option.