Environment: OpenGL 3.3+, C programming, Windows.
I have a function that loads all vertex data from a model but only return the VAO id and number of vertex. In the process it generates the VBO ids and vertex arrays data is passed to the buffer... but the VBO ids are not saved when function finishes. Actually they are not needed to draw the VAO.
Now I need to access one of those VBOs to update some data but I don't have the ids stored around.
Is it possible to retrieve from a VAO (having the id) the number of VBOs linked to it an their ids?
0
to (glGet()
with GL_MAX_VERTEX_ATTRIBS
) use glGetVertexAttrib()
with GL_VERTEX_ATTRIB_ARRAY_ENABLED
to figure out which attribs are enabledglGetVertexAttrib()
with GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING
to get the VBO ID used for that attrib.