What are triangle strips ??
i didn't get it.. i know GL_TRIANGLES.. but what does triangle strips do ???
[edited by - Metal Typhoon on June 9, 2002 8:07:40 PM]
In triangle strip mode, GL re-uses the last two vertices you passed with the new vertex you give to create a triangle.
GL_TRIANGLES :
v1 v2 v3 v4 v5 v6 -> (v1 v2 v3) (v4 v5 v6)
GL_TRIANGLE_STRIP :
v1 v2 v3 v4 v5 v6 -> (v1 v2 v3) (v2 v3 v4) (v3 v4 v5) (v4 v5 v6)
GL_TRIANGLE_FAN :
v1 v2 v3 v4 v5 v6 -> (v1 v2 v3) (v1 v2 v4) (v1 v2 v5) (v1 v2 v6)
Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
GL_TRIANGLES :
v1 v2 v3 v4 v5 v6 -> (v1 v2 v3) (v4 v5 v6)
GL_TRIANGLE_STRIP :
v1 v2 v3 v4 v5 v6 -> (v1 v2 v3) (v2 v3 v4) (v3 v4 v5) (v4 v5 v6)
GL_TRIANGLE_FAN :
v1 v2 v3 v4 v5 v6 -> (v1 v2 v3) (v1 v2 v4) (v1 v2 v5) (v1 v2 v6)
Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
Imagine bisecting a parallelogram about the diagonal to form two equilateral triangles.
Regards,
Mathematix.
Regards,
Mathematix.
quote:Original post by Fruny
...
GL_TRIANGLE_FAN :
v1 v2 v3 v4 v5 v6 -> (v1 v2 v3) (v1 v2 v4) (v1 v2 v5) (v1 v2 v6)
...
Wouldn''t that be
GL_TRIANGLE_FAN :
v1 v2 v3 v4 v5 v6 -> (v1 v2 v3) (v1 v3 v4) (v1 v4 v5) (v1 v5 v6)
I am pretty sure that this one is correct. It doesn''t keep the 2nd vertex to all the other ones it keeps the first vertex.
like this to make a circle
glBegin(GL_TRIANGLE_FAN); glVertex3f(0,0,0); for (float c=0; c<=PI; c+=PI/20) glVertex3f(cos(PI),sin(PI),0);glEnd();
that would make a Circle with 20 polys.
quote:Original post by Xero-X2
Wouldn''t that be
GL_TRIANGLE_FAN :
v1 v2 v3 v4 v5 v6 -> (v1 v2 v3) (v1 v3 v4) (v1 v4 v5) (v1 v5 v6)
I am pretty sure that this one is correct. It doesn''t keep the 2nd vertex to all the other ones it keeps the first vertex.
Yes, you are right, my mistake.
Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement