Sign in to follow this  
Last Attacker

Index Buffer

Recommended Posts

Last Attacker    172
Hi, I'm currently studying the Geometric Clipmaps algorithm from Hughes Hoppe as an Honors project for graphics. I came across the GPU Gems snippet (also found on his website under : Terrain rendering using GPU-based geometry clipmaps) where they talk about implementing that LOD algorithm for the GPU, and at the Vertex and Index Buffer section they mention Index buffers. I understand that it is used for storing information for optimal triangle strip implementation but I'm not sure exactly how? Does anyone know how this Index Buffer works? Its not necessary if performance doesn't bother you but I would really like to know how it works. Thanks

Share this post


Link to post
Share on other sites
JoeyBlow2    100
Vertex Buffer just store the Vertex data. The point's position, normal, etc.

Index Buffers store how the Vertex Points link together. Like "connect the dots." Indexes are just numbers which represent point to the vertex in the vertex buffer in an organized way which creates strips, lists, and fans.

For example



VertexData vertex[10000];

vertex[0].x = whatever;
vertex[0].y = whatever;
vertex[0].z = whatever;

vertex[0].nx = whatever;
vertex[0].ny = whatever;
vertex[0].nz = whatever;

(and so on)

IndexData index[6];

index[0] = 0; // <--- this points to the vertex 0 in the vertex array.
index[1] = 1; // <--- this points to the vertex 1 in the vertex array;

(and so on)





Its more efficient to pass updated Index Buffer data to the graphics card because its just an array of shorts or longs, rather than arrays of vertexdata structure, which could be 50 bytes per vertex. Its much more suited to send the entire vertexdata to the card and never update it, and only update the Index buffer for LOD algoritms.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this