Vertex arraysGL 3.0

glDeleteVertexArrays

Destroys VAOs. The buffers they reference are NOT deleted.

Part of the family glDelete*

Signature

void glDeleteVertexArrays(GLsizei n, const GLuint *arrays);

How it works

Deletes n vertex array objects. A VAO only stores configuration, so deleting it does not free the vertex or index buffers — delete those separately with glDeleteBuffers.

Parameters

nGLsizei

Number of VAOs.

arraysconst GLuint *

IDs to delete; 0 and unknown IDs are ignored.

Errors

When the call is invalid it does nothing and sets an error, which glGetError returns:

GL_INVALID_VALUE
n is negative.

Example

example.cpp
Official Khronos documentation