Question about index-buffers

Hi

My question is: How useful are index-buffers?
I cannot think of many cases where i could use such a buffer for speeding up my app. Usually i have to recreate my index-buffer each frame anyways, since one usually uses some kind of optimization to reject objects.

The only situation i could think of, would be when i want to do multiple passes over my data, then i could store the indices once and reuse it. However when i have some thousand indices, then i might need to refill the buffer more than once and than i can forget it in such a situation, too.

Thanks,
Jan.

Since you weren’t particularly specific, let’s assume that by “index-buffers”, you mean “a VBO that stores indices”.

If your meshes are topographically static, that is, the triangles on a mesh are not dynamically generated, then why not store your indices as part of a mesh. If you’re doing lots of mesh generation, for LOD or something, then it is no differnent than any other streaming VBO. If your VBO’s are static, then so is your topology (in all likelyhood), so too will be your indices.

The typical usage is to keep one index buffer per object you might render, and use it to render the object if it’s visible. It sounds as if you accumulate everything into one big buffer. If that’s the case, index buffers won’t help you.