PDA

View Full Version : What are strips?



x0skelet0n
11-15-2000, 09:40 AM
What are strips? Triangle strips? Quad strips? What are those and why are they saying its faster and how would you make a triangle strip?

SuperFly
11-15-2000, 12:26 PM
Triangle strips are a list of triangles where every triangle (except the first) shares two vertices with the previous one. You define three vertices for the first triangle, then only one for every one after that. The advantage is that less data is involved so a bottleneck is reduced. Same for Quad strips, but you decare two vertices per quad instead of four.

Example
glBegin(GL_TRIANGLE_STRIP);
glVertex2f(-1.0f, -1.0f);
glVertex2f( 1.0f, -1.0f);
glVertex2f(-1.0f, 1.0f);
glVertex2f( 1.0f, 1.0f);
glEnd();

Would make the triangles
3--4
|\ |
| \|
1--2

Triangle 1 = 123
Triangle 2 = 234


[This message has been edited by SuperFly (edited 11-15-2000).]