GLDELETEBUFFERS(3G)
π NAME π
glDeleteBuffers β okay so this one deletes named buffer objects, periodt.
Oh also, hi, welcome to the 3G section of the manual (that's the OpenGL bit, iykyk) π«Ά
β¨ C SPECIFICATION β¨
void glDeleteBuffers(GLsizei n, const GLuint * buffers);
π PARAMETERS π
nβ literally just the number of buffer objects you wanna yeet. That's it, that's the number.buffersβ an array of buffer objects to be deleted. The squad of names getting the boot π
πΈ DESCRIPTION πΈ
okay so glDeleteBuffers deletes n buffer objects, and it picks them out by the elements of the array buffers. Cute, efficient, no notes.
Once a buffer object is deleted, it has no contents, and its name is free for reuse β like, you can hand that name right back out, for example by glGenBuffers(). Recycling queen behavior β»οΈπ
Now here's the spicy part: if a buffer object that is currently bound gets deleted, the binding reverts to 0 β which is the absence of any buffer object. So it doesn't dangle, it just goes to zero. No cap, that's genuinely reassuring.
Also, glDeleteBuffers silently ignores 0's and names that don't correspond to existing buffer objects. Silent. No error, no drama, no text back. It just moves on π
π₯ ERRORS π₯
GL_INVALID_VALUEis generated ifnis negative. Like bestie, you can't delete a negative amount of things, be so fr π
π¦ ASSOCIATED GETS π¦
glIsBuffer()
π VERSION SUPPORT π
Quick vibe check on where this lives β the original page drops a whole table, so here it is laid out in list form (the columns were Function / Feature Name on the left and then the OpenGL Version numbers across the top):
OpenGL Version β supported?
2.0β β2.1β β3.0β β3.1β β3.2β β3.3β β4.0β β4.1β β4.2β β4.3β β4.4β β4.5β β
And the function/feature name in that table is glDeleteBuffers, which is checking every single box. Ate. π
β¨
π SEE ALSO π
glBindBuffer()glGenBuffers()glGet()
π COPYRIGHT π
Copyright Β© 2005 Addison-Wesley. Copyright Β© 2010-2014 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.
And the second copyright block, because they gave us two (iconic of them):
Copyright Β© 2005 Sams Publishing Copyright Β© 2010-2014 Khronos Group
okay that's the whole page, mwah π so the fine print at the very bottom said the source was [FIXME: source] and the date was 08/09/2021 β so consider those noted, timestamped, and filed away for you bestie π§π
π¦ where this page comes from
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 Β· MIT and Open Publication
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms