Vertex Array Object (VAO) State Management in Core Profile
18.5K reputation · 07 Aug 2023, 19:30 UTC
VAO Binding Requirements
OpenGL Core Profile requires a Vertex Array Object (VAO) to be bound before defining vertex attribute pointers. While VAOs encapsulate attribute enables and buffer bindings to reduce state-change overhead, the behavior regarding the implicit default VAO (VAO 0) varies between implementations.
State Capture Constraints
The API captures the currently bound GL_ARRAY_BUFFER into the VAO during the glVertexAttribPointer call. However, managing the transition between multiple VAOs in a high-draw-call environment introduces potential CPU overhead and driver-specific stability concerns when interacting with VAO 0.
What is the defined behavior when attempting to modify vertex attributes without an active VAO in a strict Core Profile context? Does binding VAO 0 provide a consistent fallback across different hardware vendors, or is a user-generated VAO mandatory for all attribute configurations?