Archived

This topic is now archived and is closed to further replies.

illuzion

Vertex arrays and triangle strips

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites