How to minimize glVertexAttribPointer calls when using Instanced Arrays?
I have OpenGL code using one VAO for all model data and two VBOs. The first for standard vertex attributes like position and normal and the second for the model matrices. I am using instanced draw, so I load the model matrices as instanced arrays (which are basically vertex attributes). First I load the standard vertex attributes to a VBO and setup everything once with glVertexAttribPointer . Then I load the model matrices to another VBO. Now I have to call glVertexAttribPointer in the draw loop. Can I somehow prevent this? The code looks like this: // vertex data of all models in one array