A VAO doesn't hold any vertex attribute data. It's a container object for a set of vertex arrays which describe how to pull data from zero, one or multiple buffer objects (these are the actual vertex arrays you define with VertexAtrribPointer()
(pre-GL43) or VertexAttribFormat()
, VertexAttribBinding()
and BindVertexBuffer()
(GL43+)), enable states for said vertex arrays and possibly an ELEMENT_ARRAY_BUFFER_BINDING
. See tables 23.3 and 23.4 of the GL 4.4 core specification for details.
The ARRAY_BUFFER_BINDING
is recorded separately for each vertex array, i.e. each VertexAttribPointer()
invocation per attribute index. This way you can associate a an attribute index of the VAO with multiple buffer objects and switch between which buffers to pull from using {Enable|Disable}VertexAttribArray()
or by distributing buffers across attrib indices and choosing appropriate attrib locations for your shaders - either with glBindAttribLocation()
or using explicit attrib locations inside your shader (the latter is superior).
Why all this blabbering about VAOs? Because there is no detrimental effect of using VAOs and the layout of a VBOs buffer store and how quickly vertices are pulled has nothing to do with VAOs. VAOs are state containers, nothing more, nothing less. You still need buffer storage to back any vertex pulling, you can interleave your data just like you did without VAOs. All you need to do is reflect the interleaved memory layout with your vertex arrays. So in essence, except for recording vertex array state, nothing changes.
What you gain by using VAOs is a way to more or less quickly switch between sets of state and associated buffer objects without setting up vertex arrays everytime you switch a buffer object. You therefore save API calls. Also, when binding a VAO, each vertex array still has its ARRAY_BUFFER_BINDING
and there is no need to call BindBuffer()
again thus saving further API calls. That's it.
You don't gain nor do you lose anything in regards to vertex pulling performance because of a VAO, at least not in theory. You do, however, lose overall performance when you inconsiderately switch VAOs around like crazy.
BTW, using VAOs is also mandatory when using GL32 and higher core contexts so your question is moot if you're not going for compat.
In general, when you're unsure about performance: don't guess, always profile! That's especially true when using OpenGL.