Vertex Arrays, Buffer Objects, and Vertex Array Objects

I’d like to use this post to start a thread on vertex arrays, buffer objects, and vertex array objects. I am sure that a lot of people are, like me, confused about these items. So, I’d like to start this thread to hopefully start a helpful discussion.

It appears that vertex arrays and buffer objects have been around for a while. Vertex array objects (which are not the same as vertex arrays) appear to have been added to the core standard in OpenGL 3.0.

Vertex arrays appear to be arrays of vertex data that reside on the client. In contrast, buffer objects reside on the server (e.g. GPU). Vertex array objects store state information. Historically, vertex array objects seem to have been added as an Apple extension (see, http://www.opengl.org/registry/specs/APPLE/vertex_array_object.txt) and “encapsulate vertex array state on the client side.” In OpenGL 3.0 this extension was add to the core. Today vertex array objects appear to only encapsulate state information on the server side.

The OpenGL 3.0 spec lists a large number of state values in tables 6.6-6.9. In the 3.2 spec this list of state values has been reduced considerably. One question I have is whether a large number of state values were deprecated between 3.0 and 3.2. For now, I will assume that is the case.

Many tutorials illustrate the creation and binding of a vertex array object followed by the creation of one or more buffer objects. There doesn’t appear to be links (e.g. pointers or references) from the vertex array object to the buffer objects. Instead, the vertex array object seems to store only state information - for example vertex attrib array size and stride. This situation suggests that one needs to bind buffer objects and vertex array objects prior to drawing. The binding doesn’t seem to need to happen in any particular order. One could bind the buffer objects first and then the vertex array objects second or vice versa. Once bound, drawing uses them to render an image.

It appears that the state that is encapsulated by a vertex array object will apply to the drawing of all bound buffer objects until the vertex array object is replaced by another vertex array object. A consequence is that state such as size and stride will be the same for all bound buffer objects.

These above comments are only my current observations about vertex arrays, buffer objects, and vertex array objects. I suspect that much of what I have stated might be incorrect. Hopefully, this thread will clarify these topics.

With openGl 3.0 the fixed pipeline has been deprecated, this mean that the vertex attribute only have custom semantic that is given by the shader. So glNormalPointer has been deprecated cause there is no attribute specific for the normals… same stuff for color, position, blening and so on. Now we only have glVertexAttrib 0 1 2 3 … till 15. Only custom attribute where the semantic is given by the shader.
So in this scenario also the states correlated with there attributes are marked as deprecated.
The problem is that the openGl specification start becoming confusing, cause a lot of people still use deprecated stuff, nVidia said that they have no intention to remove fixed pipeline support, same for ATI to don’t break old program.
Since openGl 3.2 they write two specification, one with only core specific function, and one that also include deprecated features.
Now… you read 3.2 core right? I you read 3.2 compability profile specification you will find the same huge table that you found in 3.0. :slight_smile:

dcox1776: Please formulate questions and not assumptions ("It appears … "). Reading you post is extremely tedious. What is it you don’t get about said concepts?