View Full Version : VBO with triangle-strips
04-02-2007, 12:04 PM
I've seen several articles that say to use VBOs with triangle-strips. I thought a vertex array was a sequential list of triangle vertices. How do you structure a vertex array to be a triangle-strip? Thanks.
04-02-2007, 12:12 PM
It's a better idea to use Triangles with an index. Triangle-strips aren't good, because every stripe need an own call.
04-02-2007, 12:45 PM
Can you tell me more about triangles with an index? How do I refer to each individual vert in a VBO? I thought verts were sent sequentially.
A triangle-fan with 5 verts requires a vertex array with 12 verts. How can this be more efficient?
Can someone please straighten-out my thinking.
04-02-2007, 03:17 PM
Originally posted by gordon1:
I thought a vertex array was a sequential list of triangle vertices. How do you structure a vertex array to be a triangle-strip? Thanks. I think you are talking about glDrawArrays(). glDrawArrays() is marching through the vertex array without skipping or hopping.
But, glDrawElements() and glDrawRangeElements() calls can be hopping around vertex array with associated index array. So, the vertex data does not need to be sequential.
BTW, Vertex Array and VBO are not much different. And, all above drawing function calls are shared in both VA and VBO. The big difference is that the vertex arrays are now managed by OpenGL(video mem) instead of by your application(system mem).
04-02-2007, 06:38 PM
Thanks songho, that's exactly what I needed.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.