Hi there,
I have an Ogre application using CEGUI and am currently using the OgreCEGUIRenderer to render the gui after the Ogre::RENDER_QUEUE_OVERLAY, which is what I want for the gui in general.
I'm also using CEGUI elements to render labels on top of objects in the scene - CEGUI gives me some nice functionality here to design the labels the way I want, and it's all working nicely, except the labels *must* be rendered before the overlay layer...
My initial thought was to create two OgreCEGUIRenderer's, setting the second one to render under the overlay layer, and just use the second one for rendering my labels; having looked into it I see that CEGUI::WindowManager is a singleton, so when I added the label widgets I'm not sure how I'd specify which renderer to use... is it even possible to have multiple renderers? Is there a better way of doing this?
Render Above AND Below the overlay layer...
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Render Above AND Below the overlay layer...
Quite an interesting topic, and something that's still not going to be easy in the 0.7.0 version (perhaps harder!). You don't need two renderer objects to do this, I guess the confusion comes from the fact we automate part of the rendering process for Ogre - but this does not preclude you from disabling that and handling the rendering yourself.
Largely it depends on how those unit labels are composed - meaning are they windows attached to a 'root' window of some kind, or do you manage their rendering more directly? If they're on a root window of some kind, you may be able to setGUISheet with the 'labels' sheet, add a render queue listener to the appropriate place and have it call CEGUI::System::renderGUI (this draws the labels), then set a different root window with another call to setGUISheet and have another listener (or the standard CEGUI one) to call the render function again for the main GUI layer.
Having said this, I think mods to the renderer module should be made in order to allow >1 set of geometry to be stored, otherwise I think each render 'pass' would wipe out the previous cached data and kill performance (not 100% sure on this point since I don't have that code to hand).
So to conclude, I think it's almost certainly possible, but you'll likely have to play around with some modifications to get a 'decent' solution.
CE.
Largely it depends on how those unit labels are composed - meaning are they windows attached to a 'root' window of some kind, or do you manage their rendering more directly? If they're on a root window of some kind, you may be able to setGUISheet with the 'labels' sheet, add a render queue listener to the appropriate place and have it call CEGUI::System::renderGUI (this draws the labels), then set a different root window with another call to setGUISheet and have another listener (or the standard CEGUI one) to call the render function again for the main GUI layer.
Having said this, I think mods to the renderer module should be made in order to allow >1 set of geometry to be stored, otherwise I think each render 'pass' would wipe out the previous cached data and kill performance (not 100% sure on this point since I don't have that code to hand).
So to conclude, I think it's almost certainly possible, but you'll likely have to play around with some modifications to get a 'decent' solution.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 9 guests