glDeleteBuffers — delete named buffer objects

C Specification

void glDeleteBuffers(GLsizei n,
 const GLuint * buffers);



Specifies the number of buffer objects to be deleted.


Specifies an array of buffer object names to be deleted.


glDeleteBuffers deletes n buffer objects named by the elements of the array buffers. After a buffer object is deleted, it has no contents, and its name is free for reuse.

glDeleteBuffers silently ignores zero and names that do not correspond to existing buffer objects.


If a buffer object is deleted while it is bound, all bindings to that object in the current context (i.e. in the thread that called glDeleteBuffers) are reset to zero. Bindings to that buffer in other contexts and other threads are not affected, but attempting to use a deleted buffer in another thread produces undefined results, including but not limited to possible GL errors and rendering corruption. Using a deleted buffer in another context or thread may not, however, result in program termination.


GL_INVALID_VALUE is generated if n is negative.

Associated Gets


See Also

glBufferData, glBufferSubData, glBindBuffer, glGenBuffers


Copyright © 2003-2004 Silicon Graphics, Inc. This document is licensed under the SGI Free Software B License. For details, see