Search code examples
openglopengl-4vao

How to get the currently bound Vertex Array Object?


How can I get the name of the currently bound Vertex Array Object?

I looked in the manual but couldn't find an enum to use with glGet().


Solution

  • Try glGetIntegerv() with GL_VERTEX_ARRAY_BINDING.

    See page 652 ("Table 23.8. Vertex Array Data (not in Vertex Array objects)") in the OpenGL 4.3 spec.

    If you haven't spec-dived before note they omit the gl prefix from functions and the GL_ prefix from enums.