QuadBuffer render issues

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

ianstangoe
Quite a regular
Quite a regular
Posts: 79
Joined: Wed Jan 09, 2008 11:06

QuadBuffer render issues

Postby ianstangoe » Thu Nov 18, 2010 15:22

Hi Cegui team :wink:

First the necessaries:

Code: Select all

18/11/2010 15:25:36 (Std)    ********************************************************************************
18/11/2010 15:25:36 (Std)    * -------- START OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM       -------- *
18/11/2010 15:25:36 (Std)    ********************************************************************************
18/11/2010 15:25:36 (Std)    ---- Version 0.7.4 (Build: Nov 18 2010 Microsoft Windows MSVC++ 9.0 32 bit) ----
18/11/2010 15:25:36 (Std)    ---- Renderer module is: CEGUI::OgreRenderer - Official OGRE based 2nd generation renderer module. ----
18/11/2010 15:25:36 (Std)    ---- XML Parser module is: CEGUI::RapidXMLParser - Official RapidXML based parser module for CEGUI ----
18/11/2010 15:25:36 (Std)    ---- Image Codec module is: OgreImageCodec - Integrated ImageCodec using the Ogre engine. ----
18/11/2010 15:25:36 (Std)    ---- Scripting module is: None ----
18/11/2010 15:25:36 (Std)    ********************************************************************************
18/11/2010 15:25:36 (Std)    * -------- END OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM         -------- *
18/11/2010 15:25:36 (Std)    ********************************************************************************

I'm working on an OpenGL QuadBuffered application and I'm getting odd rendering issues when interacting with CEGUI. I'm using the old-style CEGUIRQListener approach to control the rendering, i.e. a frameListener / renderqueue hook.

I'm getting the following issues with frame sequential renders...

The issues are:

* Visibility differences between sequential renders of gui widgets ( i.e. when clicking on an object one eye sees the highlighted button image and the other eye sees nothing )
* Frame lags when rolling over widgets ( one eyes rendering seems to freeze for one/two frames, only when moving over widgets, not whilst hovering.. )

I've rolled my own OGRE rendering loop which does the following:

Code: Select all

Root->_fireFrameStarted();
Root->_fireFrameRenderingQueued();

glDrawBuffer(GL_BACK_LEFT);
offsetCamera(left);
mainWindow->update(false);

glDrawBuffer(GL_BACK_RIGHT);
offsetCamera(right);
mainWindow->update();

Root->_fireFrameEnded();

This works fine without CEGUI being rendered but when I add my menus I get the above anomolies, my questions therefore are..

* No. 1 - Is there some internal widget state changes occuring during rendering which account for different image states between consecutive renders, and is there an alternative method to get around this?
* No. 2 - Any ideas for the frame freeze during hovers?

Thanks, Ian.

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

Re: QuadBuffer render issues

Postby CrazyEddie » Sun Nov 21, 2010 09:51

To be honest, I have no real ideas :? It's made worse by the fact it's a very specific set up you're using which is hard for me to run tests for :)

There should - in general - be no widget state updates happening during the rendering, though obviously you need to be fairly certain that your rendering happens without non-rendering CEGUI calls between the left and right frames. Usually this will be the case, though if you have some multithreaded usage, this would no longer be safe to assume (and is not safe to do with CEGUI calls anyway).

The frame freezing seems to suggest a bunch of expensive redraws going on - as opposed to rendering from some already cached buffer (either geometry buffers, or preferably content rendered to texture).

Sorry not to be able to give you an easy fix for this one.

CE.

ianstangoe
Quite a regular
Quite a regular
Posts: 79
Joined: Wed Jan 09, 2008 11:06

Re: QuadBuffer render issues

Postby ianstangoe » Mon Nov 22, 2010 10:25

Thanks for your info, I understand I'm on my own in tracking this down! :)

I'll let you know how I get on.

ianstangoe
Quite a regular
Quite a regular
Posts: 79
Joined: Wed Jan 09, 2008 11:06

Re: QuadBuffer render issues

Postby ianstangoe » Mon Nov 22, 2010 11:30

Update, fixed! :D

Rather an odd solution though...

Basically, the button which was showing up in different states between renders had an invalid image applied for its 'Pushed' state, the image wasn't defined in an imageset so I don't know what is happening in this instance but it apparantly was the cause of my woes.

When I changed this to a valid image, both the different states and rather oddly the frame freezing bug fixed themselves :?

I don't know if this points to an issue for this scenario but hopefully, as long as our layout/imageset files are valid, the issues seem to be sorted :)

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

Re: QuadBuffer render issues

Postby CrazyEddie » Wed Nov 24, 2010 11:37

Cool. I'm glad you found the issue.

I'll look into the issue caused by the missing images. I suspect it's something along the lines of rendering being aborted / cut short after the error, so the widget is never marked 'clean' and so causes re-rendering to constantly occur (it's just a theory at the moment though).

CE.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 10 guests