c++ - Understanding Vertex Array Objects (glGenVertexArrays ) -


i confused point in generating/creating vertex array object (vao) with:

glgenvertexarrays(glsizei n, gluint *arrays); 

and

glbindvertexarray(gluint); 

because can still create buffer object, vertices, , describe buffer object glvertexattribpointer , glenablevertexattribarraywithout ever creating vao.

my question if not have create vao describe data in buffer object, why such sources opengl superbible 5ed include call create vao when creating vbos? used more advanced topics have yet discover, totally confused?

also first encountered question when reading wikipedias entry on vbos , sample code includes no calls glgenvertexarrays() still describe data glvertexattribpointer().wiki vbo entry -- example vaos created reason?

performance improvements.

in many cases, setting attributes on host require high number of api calls, , important amount of validation inside implementation.

doing once, , using vao allow work amortized.

see, example, graham sellers' analysis actual data.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -