cass
28-03-2010 04:49:48
Hi
I have written an application that allows the user to change the video modes during runtime. In order for this to happen I have to shutdown everything, including MyGUI and Ogre and restart Ogre and MyGUI.
However after I started MyGUI for the second time, the very first widget I create does not display, but the rest does. This only happens after the second startup of MyGUI even though I run exactly the same code to create the GUI. This leads me to the conclusion that either I did not shutdown/destroy something I was suppose to or I have discovered a leak/bug in MyGUI.
To shutdown MyGUI, I did:
And to shutdown OGRE:
I'm using Ogre 1.7 and MyGUI 3.0.1
I have written an application that allows the user to change the video modes during runtime. In order for this to happen I have to shutdown everything, including MyGUI and Ogre and restart Ogre and MyGUI.
However after I started MyGUI for the second time, the very first widget I create does not display, but the rest does. This only happens after the second startup of MyGUI even though I run exactly the same code to create the GUI. This leads me to the conclusion that either I did not shutdown/destroy something I was suppose to or I have discovered a leak/bug in MyGUI.
To shutdown MyGUI, I did:
MyGUI::OgrePlatform* ogre_platform;
MyGUI::GUI* mygui;
// ...
mygui->destroyAllChildWidget();
mygui->shutdown();
delete mygui;
mygui = 0;
ogre_platform->shutdown();
delete ogre_platform;
ogre_platform = 0;
And to shutdown OGRE:
Ogre::Root* ogre;
Ogre::SceneManager* scene;
Ogre::RenderWindow* window;
// ...
scene->destroyAllCameras();
scene->clearScene();
window->removeAllViewports();
window->destroy();
window = 0;
delete ogre;
ogre = 0;
I'm using Ogre 1.7 and MyGUI 3.0.1