What controls the behavior of OpenGL when drawing triangular stripes?

So, I know how to draw some triangles using glBegin(GL_TRIANGLE_STRIPS). I want to understand how OpenGL decides which vertex (of the first three provided) to use as the starting vertex for all remaining triangles for drawing? And is there a way to choose a different starting vertex?

+3
source share
1 answer

GL selects the last two vertices indicated as the first two vertices of the second triangle, which ends with the fourth vertex.

So, you need to change the order in which the vertices are indicated.

From the manual: http://www.glprogramming.com/red/chapter02.html#name2

GL_TRIANGLE_STRIP: ( ) v0, v1, v2, v2, v1, v3 ( ), v2, v3, v4 ..

+6

Source: https://habr.com/ru/post/1711716/


All Articles