about cullfacing

hi there

could somebody explain me what openGL actually does when cullfacing? does it test all polygons described in the scene?

thanx

For every triangle you pass to OpenGL, it determines the winding order of the vertices (clockwise or couner clockwise) when projected on the screen. If they are ordered “the wrong way”, the triangle is thrown away.

“The wrong way” means different thing depending on how you setup the culling. For example, if you say a front face is CCW, and you want to cull all back faces (a backface is then CW), OpenGL will remove all triangles whose vertices are projected CW on the screen.