Page 1 of 1

CEGUI z-order problem [SOLVED]

Posted: Wed Mar 31, 2010 10:13
by virious
Hello, I was using older version of CEGUI (that one, which was provided with OGRE 1.6). Lately I have upgraded to OGRE 1.7 and CEGUI 0.7.1. Previously I was using OgreCEGUIRenderer and was creating it like this:

Code: Select all

 mGUIRenderer = new CEGUI::OgreCEGUIRenderer( mWindow, Ogre::RENDER_QUEUE_OVERLAY, false, 3000, mGuiSceneMgr );

The third bool parameter was telling whether CEGUI should be drawn after render queue (on top of Ogre's overlays) or before render queue (below Ogre's overlays).
I have problem because I have fade in/out effect based on Ogre's overlays. After switching to new CEGUI all my screen is fading to black, but CEGUI elements like buttons, images etc. are staying always visible.

Is there any way to tell the CEGUI::OgreRenderer to be drawn below Ogre's overlays?

Currently my renderer setup looks like this:

Code: Select all

mGUIRenderer = &CEGUI::OgreRenderer::bootstrapSystem();

Or should I call some "render" function on CEGUI by myself?

Edit:
I used code from this post, removed not needed (for me) functionality and it worked :).

Re: CEGUI z-order problem

Posted: Thu Apr 01, 2010 08:57
by CrazyEddie
In 0.7.x - as you found - the default is to draw CEGUI over the top of all other Ogre rendering. And, as you suspect, the answer is to disable this default rendering and call the CEGUI::System::renderGUI function yourself - there are many ways you might go about that, to return to the 'old' CEGUI way of rendering, see this topic: viewtopic.php?f=10&t=4663 this discusses the issue, some pitfalls, some fixes I made to make it work and an example which you can probably cut down a bit for what you need.

CE.

Re: CEGUI z-order problem

Posted: Fri Apr 02, 2010 17:46
by virious
Thank you for fast answer :). I used code from that topic, shortened it to suit my needs and it worked :). Thanks :).

Re: CEGUI z-order problem [SOLVED]

Posted: Fri Apr 02, 2010 18:23
by drfranz
Have you tried using several cegui and overlay objects? if I use one overlay ontop a cegui object only the overlays over that part of the screen (where the cegui object is located) is visible.. the other overlays are gone but are visible again once the cegui object is removed..