Page 1 of 1

[slvd] is it possible to change renderer system in run time?

Posted: Sat Jul 05, 2008 12:49
by Elric
Hi,

My Ogre application uses game states and each game state has it's own scene manager.

Well, I am initiliazing the CEGUI in the menu state and today I was trying to show up some story text on the screen in the intro state, but it didn't show up of course. So while I was searching where I did wrong, whoa, I relaized CEGUI system singleton uses the other state's scene manager!

So, is there a way to change the renderer or the only scene manager?

If not;

-Should I destroy cegui system singleton within each state exits and re-create it within each state enters? (I would certainly not prefer this!)

-Should I change my design and use only one scene manager? (I would prefer this if I have to!)

-Is there anything I should do?

Thanks.

Posted: Sat Jul 05, 2008 13:10
by CrazyEddie
Hi,

It is possible to change the scene manager used by the OgreCEGUIRenderer.

If required, you need to cast your pointer to the renderer to CEGUI::OgreCEGUIRenderer* and then call the setTargetSceneManager member function. For info, there is also a setTargetRenderQueue member available.

HTH

CE.

Posted: Sat Jul 05, 2008 13:47
by Elric
Thank you CrazyEddie.