opengl - Do you need a VAO for each VBO? -


currently, have collection of renderobject classes contains texture, vao , vbo. drawing thousands of these objects incurs performance penalty due state switching , calls gldrawarrays small numbers of triangles.

so i'm going change implementation create series of 1mib vbos (start one, once gets full, create second 1mib vbo , continue fill that). need separate vao each vbo? vbo uses interleaved vertex data, i'm not talking using multiple vbos vertices, normals, texture coords, etc.

i think there may confusion. vertex attribs refers number of per vertex elements can pass in single vertex (normals one, uvs another, etc). in implementation, limited 16 not going exceed.

vaos store state information required issue single draw call. includes storing vbos need bound call. given each vbo must drawn in it's own separate draw call think need vao store setup info each.

here explanation:

http://ogldev.atspace.co.uk/www/tutorial32/tutorial32.html


Comments