CEGUI z-order problem [SOLVED]

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

virious
Just popping in
Just popping in
Posts: 4
Joined: Wed Aug 12, 2009 08:00

CEGUI z-order problem [SOLVED]

Postby virious » Wed Mar 31, 2010 10:13

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 :).
Last edited by virious on Fri Apr 02, 2010 17:49, edited 1 time in total.

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

Re: CEGUI z-order problem

Postby CrazyEddie » Thu Apr 01, 2010 08:57

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.

virious
Just popping in
Just popping in
Posts: 4
Joined: Wed Aug 12, 2009 08:00

Re: CEGUI z-order problem

Postby virious » Fri Apr 02, 2010 17:46

Thank you for fast answer :). I used code from that topic, shortened it to suit my needs and it worked :). Thanks :).

drfranz
Just popping in
Just popping in
Posts: 2
Joined: Thu Apr 01, 2010 21:30

Re: CEGUI z-order problem [SOLVED]

Postby drfranz » Fri Apr 02, 2010 18:23

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..


Return to “Help”

Who is online

Users browsing this forum: No registered users and 17 guests