question about opengl vertex arrays

ElDonAntonio

Senior member
Aug 4, 2001
967
0
0
I just read about vertex arrays and it seems like a damn good way to handle and render geometries...

One question though: suppose you have multiple geometries, it doesn't seem like you can store them in different vertex arrays, OpenGL only seems to have 1.
I thought of just "appending" new vertex data to your current vertex array, and then just rendering the objects you want by using glDrawRangeElements. However, I don't really see how I could append this info, the only command I see is glVertexPointer which seems to replace the whole OpenGL vertex array with the new data.

Any way to do this correctly??
Thanks guys.
 

ElDonAntonio

Senior member
Aug 4, 2001
967
0
0
hmmm, I think I understand...for each geometry I would only keep (for example) two standard arrays of vertices and indexes and then use the gl functions on these arrays for one geometry after another to fire the vertices to the graphics card efficiently...no need for multiple vertex arrays.
Am I correct?