Page 1 of 1

GUI elements not rendering over the topmost line (Ogre)

Posted: Wed Jul 28, 2004 10:12
by Injector
I've noticed another slight problem (it can also be a problem related to Ogre):

GUI elements do not render over the very first (topmost) line of the frame buffer. I noticed it when I tried to add "cinematic bars" at the top and the bottom of the screen for cutscenes. The topmost line of the screen remains unaffected revealing the 3d scene behind it. Setting negative values for y position does not help either.

Finally: Did I mention that this system rocks *really* hard?

GUI elements not rendering over the topmost line (Ogre)

Posted: Wed Jul 28, 2004 10:21
by CrazyEddie
I've noticed another slight problem (it can also be a problem related to Ogre):

GUI elements do not render over the very first (topmost) line of the frame buffer. I noticed it when I tried to add "cinematic bars" at the top and the bottom of the screen for cutscenes. The topmost line of the screen remains unaffected revealing the 3d scene behind it. Setting negative values for y position does not help either.

Okay, I'll check it out and see what's going on... Does it also do it on the leftmost edge? Because this would indicate a Gui clipping issue.

Finally: Did I mention that this system rocks *really* hard?

:D You did now! :)

GUI elements not rendering over the topmost line (Ogre)

Posted: Wed Jul 28, 2004 10:52
by Injector
Does it also do it on the leftmost edge?


No, left, right and bottom edges are fine.

Okay, I'll check it out and see what's going on.


Thanks.

GUI elements not rendering over the topmost line (Ogre)

Posted: Wed Jul 28, 2004 12:07
by CrazyEddie
Update:
This does not happen under my D3D8.1 Test driver, so is definately related to Ogre. I'm not sure where the issue lies at the moment (GUIBase, GUIRenderer, or Ogre itself), and have to run some tests and have a play around with a few things. I'll post back once I have some more information...

Edit:
Update2:
This only seems to affect the Direct3D render systems in Ogre, the OpenGL render system does not exhibit the problem. Can you confirm this as well?

GUI elements not rendering over the topmost line (Ogre)

Posted: Wed Jul 28, 2004 13:14
by CrazyEddie
I believe this to be a minor inconsistancy within Ogre.

I have posted a message on the Ogre forums seeking advice.

GUI elements not rendering over the topmost line (Ogre)

Posted: Wed Jul 28, 2004 14:01
by Injector
True, OpenGL is fine. Sorry, I could have checked that myself :oops:

Anyway, as a temporary fix I cannot switch to GL because stencil shadows only work in DX9 for me (in GL they seem to be not manifold, so I get the well-know artefacts, although my artist tells me that they are closed).

GUI elements not rendering over the topmost line (Ogre)

Posted: Wed Jul 28, 2004 17:29
by CrazyEddie
The only advice I can give at the moment, although obviously the issue will be a distraction to you, is to carry on regardless. Once a fix is in place you'll automatically pick it up and nothing will need to be changed in client code.

I've yet to determine the exact cause of the problem, so a fix may be a little while in the making. Unless you have an imminent code release, the my best advice is to wait :?. I could give you a temporary fix, but it would only look right in D3D - under GL you would lose the top of your imagery :roll:

GUI elements not rendering over the topmost line (Ogre)

Posted: Fri Jul 30, 2004 08:55
by CrazyEddie
This is now fixed. It was a minor error on my part (what a surprise ;) ). The fix is in CVS, if you need it quickly, here's a patch:

Code: Select all

Index: src/renderers/OgreGUIRenderer/ogrerenderer.cpp
===================================================================
RCS file: /cvsroot/crayzedsgui/cegui_mk2/src/renderers/OgreGUIRenderer/ogrerenderer.cpp,v
retrieving revision 1.16
diff -u -r1.16 ogrerenderer.cpp
--- src/renderers/OgreGUIRenderer/ogrerenderer.cpp   30 Jul 2004 08:40:19 -0000   1.16
+++ src/renderers/OgreGUIRenderer/ogrerenderer.cpp   30 Jul 2004 08:47:35 -0000
@@ -621,7 +621,7 @@
    d_quadList = new QuadInfo*[max_quads];
 
    // initialise required texel offset
-   d_texelOffset = Point((float)d_render_sys->getHorizontalTexelOffset(), (float)d_render_sys->getVerticalTexelOffset());
+   d_texelOffset = Point((float)d_render_sys->getHorizontalTexelOffset(), -(float)d_render_sys->getVerticalTexelOffset());
 
    // create listener which will handler the rendering side of things for us.
    d_ourlistener = new OgreRQListener(this, queue_id, post_queue);

GUI elements not rendering over the topmost line (Ogre)

Posted: Fri Jul 30, 2004 10:33
by Injector
Great news: Thank you very much!