Multiple GUI renderers, possible?

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

Protagonist
Not too shy to talk
Not too shy to talk
Posts: 23
Joined: Sat Mar 03, 2007 22:54

Multiple GUI renderers, possible?

Postby Protagonist » Wed Mar 21, 2007 20:51

Hi there,

I'm using CEGUI with Ogre Eihort, and have created two viewports. The thing is, I don't want my CEGUI widgets to render to both, but I need both viewports to use CEGUI.

So I tried creating two GUI renderers.

I create my first like so:

Code: Select all

   ///////Setup GUI system
    mGUIRenderer = new CEGUI::OgreCEGUIRenderer(window, Ogre::RENDER_QUEUE_OVERLAY, false, 3000, sceneMgr); //111
    mGUISystem = new CEGUI::System(mGUIRenderer);
   CEGUI::Logger::getSingleton().setLoggingLevel(CEGUI::Informative);
   CEGUI::SchemeManager::getSingleton().loadScheme((CEGUI::utf8*)"WindowsLook.scheme"); //TaharezLookSkin.scheme,WindowsLookSkin.scheme
   mGUISystem->setDefaultMouseCursor((CEGUI::utf8*)"WindowsLook", (CEGUI::utf8*)"MouseArrow"); //set the mouse cursor
   //show the mouse cursor (by setting mouse cursor image to default defined above
   CEGUI::MouseCursor::getSingleton().setImage(CEGUI::System::getSingleton().getDefaultMouseCursor());


Then say if I try

Code: Select all

CEGUI::OgreCEGUIRenderer* secondGUIRenderer;
CEGUI::System* secondGUISystem;
CEGUI::Window* secondGUISheet;

    secondGUIRenderer = new CEGUI::OgreCEGUIRenderer(window, Ogre::RENDER_QUEUE_OVERLAY, false, 3000, sceneMgr);
    secondGUISystem = new CEGUI::System(mGUIRenderer);


I get an ascertion failure from the last line

Code: Select all

secondGUISystem = new CEGUI::System(mGUIRenderer);


This makes me think that I can't have two renderers?
I was wondering if it is infact possible, and if so, how?

I really need to get this working.

Any help would be appreciated so much. Thanks

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Thu Mar 22, 2007 08:44

Hi,

the short answer is that you cannot have to renderers. However Drumicube changed the openGL renderer in order to get the imageset editor work better. This is the thread-page where he first mentions dual rendering:
http://www.cegui.org.uk/phpBB2/viewtopi ... c&start=30

You might have a look at the sources which are also posted here and there in his messages.

HTH!


Return to “Help”

Who is online

Users browsing this forum: No registered users and 15 guests