PDA

View Full Version : about cullfacing



martinjy
04-22-2002, 01:15 PM
hi there

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

thanx

Bob
04-23-2002, 01:07 AM
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.