chickadee » gl-utils » mesh-make-vao!

mesh-make-vao! MESH LOCATIONS #!optional USAGEprocedure

Create a vertex attribute object (VAO) for MESH. LOCATIONS is a list of (ATTRIBUTE-NAME . LOCATION) pairs. USAGE is the buffer usage hint keyword as accepted by usage->gl, defaulting to #:static. Vertex buffer objects (VBOs) are created for the vertex and index data. The VAO binds these buffers, and sets the vertex attribute pointers of attributes for which locations have been given. If the usage is one of the static types, the vertex and index data of the mesh are deleted, as are the vertex and index buffers. The VBOs and VAO created by make-mesh-vao! are managed and should not be deleted.