QuickGUI::GUIManager::getSingletonPtr() implementation!!!

Felipe

16-10-2007 14:41:26

in my game with gamestate framework

manager1 = QuickGUI::GUIManager::getSingletonPtr();
manager2 = QuickGUI::GUIManager::getSingletonPtr();


crash why?

QuickGUI implement Singleton corretly?

kungfoomasta

16-10-2007 17:39:34

Does calling it once cause a crash?

Singleton is no longer used in SVN, because you can have one GUIManager per Viewport. I don't remember if the Singleton implementation is the Meyers method, or using the Ogre::Singleton. In the case of the Ogre::Singleton usage, you have to create the GUIManager before getting a singleton pointer to it.

Felipe

16-10-2007 19:30:39

I my gamemanager i use

mGUIManager = QuickGUI::GUIManager::getSingletonPtr();

to create and

mGUIManager->shutdown()

to fisished before delete ogreroot

and in each state i use

mGUIManager = QuickGUI::GUIManager::getSingletonPtr();

and give error,

why?

kungfoomasta

16-10-2007 19:53:33

Is there

mGUIManager->setup()

function?

Sorry for my poor responses. Give me a few days and I will make a release v0.9.7 alpha.

Felipe

16-10-2007 19:56:12

yes.

mGUIManager = QuickGUI::GUIManager::getSingletonPtr();
mGUIManager->setup(mWindow->getWidth(),mWindow->getHeight());

Felipe

16-10-2007 21:31:40

i solved

my overlay and quickGUI sheet is conflit

my code

in gamemanager

mGUIManager = QuickGUI::GUIManager::getSingletonPtr();
mGUIManager->setup(mRenderWindow->getWidth(),mRenderWindow->getHeight());


in my gamestate

on enter() method

mGUIManager = QuickGUI::GUIManager::getSingletonPtr();

on exit() method

mGUIManager->clearAll();

thanks!

QuickQUI is more great than CEGUI!!