   Single index to access multiple VBOs?
  I am using 4 VBOs to make the grid of my clipmap system, and am drawing using glDrawElements with GL_TRIANGLE_STRIP. As the VBOs are grids they are all accessed in the same way, with identical indicies, but I still have to send 4 identical indicies to DrawElements.How can I send just one?   
  Hi,I am not too sure on this but wouldn't it be possible to just bind an index buffer object once and then use it for all 4 vertex buffer objects? I have never tried this myself but it seems like it should be possible [smile]Regards,ViLiO   ;  Well I am only using VBOs for Vertex, Normal and UV arrays, I am using a standard array in the call to glDrawElements.But glDrawElements requires indicies for each drawn primitive for each active array doesn't it? So I have to pass it something likevertex    normal    uv   uv 21 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5don't I?/EDIT how do I get this damn thing to keep my spacing? Even in code tags it doesn't.   ;  Yea but you could also generate and bind an IBO much like you would with a VBO.Then you don't need to pass an index array to the glDrawElements call as the indices from the IBO are used.IBO's are setup and bound exactly the same as VBO's only you use GL_ELEMENT_ARRAY_BUFFER_ARB instead of GL_ARRAY_BUFFER_ARB.All the best,ViLiO   ;  Can't use index buffer object, my indicies (can) change every frame, I'm writing a clip-map engine, using toroidal arrays.Any other ideas?;  A dynamic IBO? [grin]If you are going to use the same indices for all 4 VBO's even for just one render frame, then the overhead of updating the IBO would probably still be less than that of sending the same index array 4 times. I say "probably" because i'm not sure, but you could easily try it out and see.If IBO's are still out of the question then i'm out of ideas [smile]All the best,ViLiO   ;  But wouldn't the IBO still need to contain all the same data as one I use at the moment? i.e. an index for each element for each VBO.   ;  You've lost me [grin]Do you have a vbo for each attribute array? Like one for vertices, one for normals, two for tex coords?I think some posted code would definately help out [smile]   ;  I am at work atm so can't get to my code, but yeah, one VBO for each vertex attribute, which means for each vertex I want to draw using glDrawElements I have to pass it 4 indicies, but these indicies are always the same as each other. It seems stupid that I have to send the same value 4 times, when surely drawing grids in this fashion is quite a common task.I will post code in an hour or so if you still don't get it (I'm not a great explainer).   ;  errm, I think you've missed something somewhere..If you are using 4 VBOs, one for each bit of vertex data (pos, normal, colour, texture coords for example), then when you draw with glDrawElements() and use an index array that array is used to index all four VBOs are once.So its;- bind VBO for texture coords- set texture coords vertex pointer- bind VBO for colour data- set colour data pointer- bind VBO for normal data- set normal data pointer- bind VBO for vertex array- set vertex data pointer- bind index buffer- draw via glDrawElements()The index buffer step is optional, if you are going to be using it and not updating it often then the upload into a VBO is probably worth it, if you are rengerating it each frame then it might not be.   