Vertex arrays and triangle strips

Started by
2 comments, last by illuzion 22 years, 8 months ago
I''ve heard a bit recently on this forum about trinagle strips and vertex arrays, and the fact that they''re supposed to speed up your drawing. What are they? What do they do, and why would you use them rather than just a big bunch of triangles one after the other? How do you use them?
Advertisement
This is a basic OpenGL functionality since 1.2, the official OpenGL specs explain all this. You can D/L them somewhere on www.opengl.org
triangle strips were there since the beginning. vertex arrays were added in 1.1 (not 1.2)
how to use them, check the red book the best source of info out there
traingle strips save having to re enter the same information over and over, but they have to be connected in a strip.
it is just glBegin(GL_TRIANGLE_STRIP) instead of triangles.

vertex arrays are a way of storing information in a format that is quicker to draw with.
instead of calling glVertex, etc, you store the information in an array and give a pointer to it to opengl to draw it...

vertex arrays can make a program much faster if you are drawing a lot of stuff that is dynamic. when drawing a few triangles it doesn''t matter, but for thousands it can give you 50% more fps.

This topic is closed to new replies.

Advertisement