LWJGL Forum

Programming => OpenGL => Topic started by: g4m0r on August 07, 2011, 21:43:18

Title: backface culling problem
Post by: g4m0r on August 07, 2011, 21:43:18
Hello,

I have problems with the backfac culling with lwjgl.
When i enable BackFaceCulling and go with my camera around a object,
the faces will not be drawn.

How can I refresh the backface culling ? (I use a camera with gluLookAt() )

best regards,
g4m0r
Title: Re: backface culling problem
Post by: Fool Running on August 08, 2011, 12:58:20
Backface culling is implemented by looking at the direction of vertices when rendered (Clockwise or counter-clockwise) specified by the glCullFace function.
My guess is that you are drawing your back vertices in the wrong order so that when you rotate to the other side of your model they are drawn in the wrong direction.

See http://www.opengl.org/wiki/Face_Culling for more information since I'm bad at describing it.  :P

EDIT: Here is a more visual explanation (scroll down a little): http://www.devmaster.net/forums/showthread.php?t=487
Title: Re: backface culling problem
Post by: g4m0r on August 11, 2011, 11:52:18
ok, thx for your help!