I\'m new to OpenGL and Graphics Programming. I\'ve been reading a textbook which has been really thorough and well-written so far.However, I\'ve hit a point in the code that
The relationship is created when calling glVertexAttribPointer.
GL_VERTEX_ARRAY_BINDING
and GL_ARRAY_BUFFER_BINDING
are constants but they can point to the global state of the binding. I'm referring to the state not the constant(orange) in the image. Use glGet to find about different global states.
VertexArray is grouping information(including array buffer) about a vertex or many parallel vertices.
Use GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING
with glGetVertexAttrib to find which attribute array buffer is set.
glBindBuffer(GL_ARRAY_BUFFER sets the global state GL_ARRAY_BUFFER_BINDING
glBindVertexArray sets the global state GL_VERTEX_ARRAY_BINDING