Backface culling in OpenGL

Started by
2 comments, last by ComputrJam 23 years, 6 months ago
I have a quick question. I know doing backface culling in OpenGL is very easy. But how do you do it for triangle_strips, because in a tri_strip triangles alternate windings. If you have to constantly change GL_CCW to GL_CW and back again it would seem like the function overhead would outweigh (maybe not) the benefit of backface culling. Does backface culling really increase performance by a significant factor?
Advertisement
I don''t know about OpenGL but in D3D every second triangle in a triangle strip is "turned around" by D3D so backface culling still works properly. It kinda makes sense and I could imagine that such a feature was implemented in OpenGL, too.


- JQ, PWC Software
"There are no pessimists, optimists and realists; just pessimists and optimists who think they're realists" -me
~phil
urm, no, with triangle strips, the winding shouldnt change.
The strip sorta goes like this:

up
down
(move up and left)
down
(move up and left)
down etc.

Or the other way rounf for opposite winding.

basically, what Jonny Quest said was correct. Try a simple strip.
You'll see that it'll display, without the need to change the
winding.

Have fun, and good luck.




Edited by - Ferrit on October 20, 2000 4:42:58 PM
Yeah, I just couldn''t put it into words properly. Damn.

- JQ, PWC Software
"There are no pessimists, optimists and realists; just pessimists and optimists who think they're realists" -me
~phil

This topic is closed to new replies.

Advertisement