So I do know how to draw multiple triangles using glBegin(GL_TRIANGLE_STRIPS)
. What I want to understand is how OpenGL decides which vertex (out of the first three provided) to use as the starting vertex for all remaining triangles to be drawn? And is there a way to make it select a different starting vertex?
views:
174answers:
1
+4
A:
GL selects the last two vertices specified as the first two vertices of the second triangle, which is completed by the fourth vertex.
So, you need to change the order you specify vertices.
From the Manual: http://www.glprogramming.com/red/chapter02.html#name2
GL_TRIANGLE_STRIP : Draws a series of triangles (three-sided polygons) using vertices v0, v1, v2, then v2, v1, v3 (note the order), then v2, v3, v4, and so on.
Justicle
2009-07-02 05:32:41