0

In my OpenGL program have a huge vertex buffer with data (normals,position,texcoords) for 2048x2048 points. In each frame i reduce my indexed buffer with a LOD algorithm and bind GL_ELEMENT_ARRAY_BUFFER again.

I wonder if it makes sense to additionally reduce the vertex buffer as well, so that it only contains the used vertices from the index buffer. So the question is, if there is a performance gain even with rebuilding and rebinding the vertex array per frame.

Meldryt
  • 75
  • 1
  • 10
  • 2
    That's hard to tell. I'd tend to say "no", though. When you rebuild VAs, you improve the locality of the data and the cache efficiency. But you also need to get the new data to the GPU. As you say, you do that "each" frame, so there is little chance that this cost is amortized by the slight improvements over just a single draw time. If you draw with the same reduced data over several (ideally many) frames, it might even be worth it. But this are just guesses, I don't feel confident enought about them to put this as answer. You should implement it and benchmark/profile it to find out. – derhass Aug 10 '14 at 12:40
  • yeah i will try it, but i have the feeling that the rebinding will kill any peformance gain – Meldryt Aug 10 '14 at 13:22

0 Answers0