2
\$\begingroup\$

You usually get a speed up when you use interleaved VBOs instead of using multiple VBOs. Is this also valid when using VAOs?

Because it's much more convenient to have a VBO for the positions, and one for the normals etc. And you can use one VBO in multiple VAOs.

\$\endgroup\$
3
\$\begingroup\$

A VAO is purely a software/driver-side construct designed to manage state changes, and doesn't have much parallel in hardware, so whether or not a VAO is used is largely irrelevant in the case of this question.

What interleaving does is provide your vertex data with better cache-coherence; i.e. all of the attributes to specify a vertex will fit in a GPU cache line and can be read by the hardware in a single operation, rather than having to jump around multiple disjoint memory locations. Irrespective of whether or not you use VAOs, if you don't interleave you're going to have to do that jumping around.

Where a VAO may help is by batching state changes required to specify your vertex layout into a single operation, but again this would be irrespective of whether or not you interleave. They really are completely separate concepts.

\$\endgroup\$
  • \$\begingroup\$ A VAO could be another kind of configuration stored in hardware memory, allowing the driver to issue a single "set VAO" command rather than a series of "set VBO" commands (even batched, one command can be processed faster than several), and is done so in at least one mobile GPU (in which even the GLSL compiler is in firmware). I don't think it's common to hardware-accelerate it, though. \$\endgroup\$ – Sean Middleditch Sep 17 '13 at 17:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.