# Does GL_CULL_FACE uses normals???

The thing is that I have a scene full of cubes and to draw then I use triangle strips
But then I activate culling and the half of the faces dissapear because drawing a QUAD using TRIANGLE_STRIPS makes de first triangle front facing and the second back facing or vice_versa. HELP me… How can I solve this problem, normals don’t seem to change the CULL_FACE so I can I do it?

No, you don’t need normals. You’re just issuing your vertices in the wrong order.

Just to clarify MiceC’s answer it is the ordering. Looking at triangle you can either order the vertices such that they are in a clockwise or counter clockwise order. By default opengl uses counter clockwise as front facing. The call to change the front facing winding order is:

glFrontFace(); which takes either GL_CCW or GL_CW

Um… actually, no, that’s not what I meant. Sorry, I should have been clearer. KRONOS says that half of his triangles are appearing correctly, so his problem isn’t his winding order setting, it’s the order in which he’s issuing his vertices. Specifically, you have to issue the same 4 verts in different orders for GL_QUADS and GL_TRIANGLE_STRIP modes.

Say your verts look like this, and you want counterclockwise faces to be “front” - this is the default.

1—4
| |
2—3

In GL_QUADS mode, quad N (starting from 1) is specified by verts {4N-3,4N-2,4N-1,4N} in that order. So in our setup quad 1 maps to verts {1,2,3,4}. This is counterclockwise so the quad is frontfacing.

In GL_TRIANGLE_STRIP mode, it’s a different story. An ODD triangle N is defined by verts {N,N+1,N+2}. So our triangle 1 maps to {1,2,3}, which is counterclockwise so we’re OK. But an EVEN triangle N is defined by verts {N+1,N,N+2}. Our triangle 2 maps to {3,2,4}, which is CLOCKWISE. Oops. Every other triangle is facing the wrong way.