I was sending vertex arrays (of 32 bit floats) to the GPU every time I wanted to draw them, but this wasn't efficient, so I switched to Vertex Buffer Objects to cache my vertex arrays in the GPU.
It's working, but I was wondering if there's a way to determine the size of a given VBO later on without going back to the original vertex arrays? Here's the process I'm struggling with:
- I have a vertex array of, for example, six 32 bit floats.
- I send my vertex array to the GPU via OpenGL-ES where it's stored in a VBO - to which I retain a handle.
- My vertex array is redundant at this point so I delete it.
- Later on I use the handle to make OpenGL-ES draw something, but at this point I'd also like to know how to determine the size of the vertex array that was originally used to create the VBO. I now have just the VBO handle - can I re-determine somehow that I'd stored six 32 bit floats in this VBO?
I'm probably missing something really obvious. Thanks for any suggestions!