gordon1

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.

View Full Version : VBO with triangle-strips

gordon1

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.

oc2k1

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.

gordon1

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.

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.

songho

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).

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).

gordon1

04-02-2007, 06:38 PM

Thanks songho, that's exactly what I needed.

Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.