Index Buffer

Started by
1 comment, last by Last Attacker 18 years ago
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
"Take delight in the Lord and He will give you your heart's desires" - Psalm 37:4My Blog
Advertisement
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.
Thanks man.
I didn't think it was that simple. Porvably because I read the stuff at 10 at night or something.
"Take delight in the Lord and He will give you your heart's desires" - Psalm 37:4My Blog

This topic is closed to new replies.

Advertisement