View Full Version : Back face culling

Brian Jones
04-15-2003, 09:22 PM
I'm rendering a cube, and have set the front face to glFrontFace(GL_CCW). Now if I wanted to render the back face of the cube would I need to draw the orientation as I see it (Clockwise to me, counter clockwise to OpenGL) or counter clockwise to me, and clockwise to opengl.

Old GLman
04-15-2003, 09:32 PM
OpenGL by default considers polygons that have counterclockwise winding to be front facing. So, specifying a polygons vertices in a counterclockwise order will result in a front facing polygon.

If you set glFrontFace(GL_CW) then front facing polygons have to specified in a clockwise order.

Set glCullFace(GL_BACK) to make it easier to see which side is being rendered. If you dont see anything, you know its back facing http://www.opengl.org/discussion_boards/ubb/smile.gif

Old GLman

Brian Jones
04-15-2003, 09:33 PM
Thanks. I kind of confused myself writing that post. Thanks for the quick reply. Got it to work correctly.