A doubt, if i have to draw multyple objects using the vertex array extension, can i encounter a overhead in locking ad releasing the vertex buffer each time i have to draw a single
object or its better to stick with triangle strips ???????
Well it depends on how many triangles are in your objects. If you only have a few triangles per object and alot of objects, and must draw the individually, vertex arrays are probably not for you. Vertex arrays are meant to draw a large number of primitives with one call. But on some systems it is probably still faster than immediate mode. You don''t really lock and release the vertex arrays the same way you do with vertex buffers in D3D. You just give a pointer to your vertex array and the driver takes care of the locking and releasing in an efficient manner.
And if you are currently using triangle-strips you probably have a large number of shared vertices. This being the case you probably want to use indexed vertex arrays and eliminate all duplicate vertices to conserve bandwidth.
If you have alot of static objects (that don''t move) and then some dynamic objects you probably want to create 1 master vertex array for your static objects, decide which primitives need to be drawn each frame and create your array of indices on the fly. Then you can draw them all with 1 glDrawElements call. For the dynamic objects you might want to have them all in 1 other vertex array or each of them in its own vertex array if there is a large range of motion, and have a static array of indices.