   VBO with dynamic indices
  I'm working on a project with terrains generated from heightmaps. I've implemented frustrum culling and now i'm looking into other ways to manage individual sections of terrain. I found CLOD or geomipmapping easy to understand. Currently Im using one large VBO to store all the different vertexes of the high resolution terrain in, there is also one large VBO for all the incides. what I want to do is the following:upload all vertexes for the whole terrain to a VBOfor every frame, calculate the indices for every patch in the geo-mipmapbind the terrain vbo, then, for every patch draw using each patchs' indicesso my question is really, how do I implement dynamicly supplying indices to the card and is this method viable? I open to any suggestion, so if there is a better way to drawing large terrains please tell me!glBindBuffer(GL_ARRAY_BUFFER, vertexVBOID);glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, indexVBOID);   // indices on cardglDrawElements(GL_TRIANGLES, indexCount, GL_UNSIGNED_INT, (GLvoid *)(offset*sizeof(float)));thanks in advance!   
  When buffering the index data, use GL_DYNAMIC_DRAW_ARB instead of GL_STATIC_DRAW_ARB, and then when you want to update the indices, call glBufferSubDataARB() instead. You can find more information on it here: http://www.songho.ca/opengl/gl_vbo.html.   ;  Hi,The problem with your solution is that you are uploading vertex data at every frame to your gpu... If you are using big terrains, this transfer will become a bottleneck, resulting in serious performance loss. You could use a quadtree with a solid index buffer, each node should have an offset and a number of elements so that you can have a draw call per node. You should build it in such a way that parent nodes contain the four sub intervals of the IBO in order to save draw calls. Here's a quick illustration with two children only :Root :   [--------]  offset : 0, elements : N// the whole index bufferLevel 1 :[----] offset : 0, elements : N/2   // left childLevel 1 :    [----]  offset : N/2, elements : N/2 // right childLevel 2 :[--]   offset : 0, elements : N/4   // ...Level 2 :  [--] offset : N/4, elements : N/4Level 2 :    [--]    offset : N/2, elements : N/4Level 2 : [--]  offset : 3N/4, elements : N/4Hope I'm making myself clear enough ? I have another solution but it's based on shader culling/instancing and displacement mapping (which is much more powerful and efficient), let me know if you need more explanations and/or informations ![Edited by - at0m on May 29, 2010 9:27:25 AM]