Page 1 of 1

OpenGL renderer requires CCW front face

Posted: Sun Nov 14, 2010 10:46
by dabono
Hi, just to let you know: I got this wonderful library working, but what had me stumped for a while is the fact that the OpenGL-renderer requires the triangle winding to be set to counter-clockwise.
This of course is easily fixed by adding to void OpenGLRenderer::beginRendering() the line:

Code: Select all

glFrontFace(GL_CCW);

Re: OpenGL renderer requires CCW front face

Posted: Mon Nov 15, 2010 14:59
by Jamarr
If CEGUI had to reset every single OpenGL state the performance hit would be significant, this is one reason why CEGUI assumes a default OpenGL state. Since GL_CCW is the default state there is no need for CEGUI to specifically manage this state. If your code, or another library you are using, changes this state it is their responsibility to reset it once it is done with it / prior to rendering CEGUI.