Reputation: 75615
When using OpenGL VBOs you can interleave your data
You can even interleave vertex data with other data that is for use by the CPU rather than GPU, for example.
Does interleaving help or hinder performance on mainstream discrete and integrated graphics?
Upvotes: 4
Views: 637
Reputation: 6658
The general answer is that it usually helps, but that's not always the case.
For instance if you're doing a z-only pass first to reduce fill-rate, then having all other attributes interleaved will only stress the cache by pulling in unused data. In this case, interleaving everything except the positions might make sense. Or you could have two vertex arrays, one with every attribute and one with only positions.
I tend to interleave everything unless I have good reason not to.
Upvotes: 4
Reputation: 8356
I don't remember the exact numbers, but on my Intel chipset it did increase framerate slightly, maybe 10 %. The data contained vertices, texcoords and normals.
Upvotes: 2