I've just done some reading about VAO's and it looks like they can be a decent improvement on my current rendering routine. Currently all of my rendering is done using simple interleaved VBO's with indices (position, normal, uv). My model class has a vector of VBO's (each one relates to a specific sub object in my model format) and i was thinking i could just use a single VAO to describe all of them? I'm not sure however if a VAO can be used for multiple VBO's though.
Currently my drawing routine looks like (don't have code with me):
void drawModel(Model* model)
{
for (int i = 0; i < model->getVBOList(); i++)
{
VBO vbo = model->getVBOList()[i];
glBindBuffer(GL_ARRAY_BUFFER, vbo.id);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, vbo.ibo.id)
// do vertex attrib pointers
glDrawElements(..)
}
}
If i had a vertex array object bound to all of these VBO's would it be possible to simply draw them all by binding the VAO and calling drawElements again?
Thanks guys,
- rocklobster






