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

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Elric
Just popping in
Just popping in
Posts: 7
Joined: Tue Jun 24, 2008 23:07
Location: Istanbul

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

Postby Elric » Sat Jul 05, 2008 12:49

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.
Last edited by Elric on Sat Jul 05, 2008 13:48, edited 1 time in total.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Sat Jul 05, 2008 13:10

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.

Elric
Just popping in
Just popping in
Posts: 7
Joined: Tue Jun 24, 2008 23:07
Location: Istanbul

Postby Elric » Sat Jul 05, 2008 13:47

Thank you CrazyEddie.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 4 guests