GLDELETEFRAMEBUFFERS(3G)

πŸ’… GLDELETEFRAMEBUFFERS

okay bestie so this one is glDeleteFramebuffers from the OpenGL manual pages, section 3G β€” yes the 3G is the manual name, we're fancy like that ✨


🌸 NAME 🌸

glDeleteFramebuffers β€” delete framebuffer objects. it's giving cleanup era, it's giving "we're done with you, FBO" πŸ’€


πŸŽ€ C SPECIFICATION πŸŽ€

void glDeleteFramebuffers(GLsizei n, GLuint *framebuffers);

literally just two things, no cap:


✨ PARAMETERS ✨

  • n β€” how many framebuffer objects you're yeeting today. the count, the number, the quantity πŸ—‘οΈ
  • framebuffers β€” a pointer to an array holding those n framebuffer objects you want deleted. so like, a lil list of names, and this points at it 🫢

πŸ’– DESCRIPTION πŸ’–

glDeleteFramebuffers deletes the n framebuffer objects whose names are stored in the array addressed by framebuffers. just vibes, just deleting πŸ’…

the name zero is reserved by the GL and is silently ignored should it occur in framebuffers β€” same energy as other unused names, also silently ignored. no drama, no error, just ignored πŸ™ˆ

once a framebuffer object is deleted, its name is again unused and it has no attachments. like, the name goes back in the pool and the object is fully un-decorated. icon behavior ✨

and here's the spicy part πŸ‘‘ β€” if a framebuffer that is currently bound to one or more of the targets GL_DRAW_FRAMEBUFFER or GL_READ_FRAMEBUFFER gets deleted, it is as though glBindFramebuffer() had been executed with the corresponding target and framebuffer zero. so the binding lowkey resets itself to zero. main character cleanup energy, fr fr 🌈


πŸ¦‹ ERRORS πŸ¦‹

  • GL_INVALID_VALUE is generated if n is negative. bestie. you cannot delete a negative number of framebuffers. that's not a thing 😭 negative counts are not slay, they're an error πŸ’€

⭐ VERSION SUPPORT ⭐

the vibe check across OpenGL versions for glDeleteFramebuffers:

  • OpenGL 2.0 β€” - (nope, not here πŸ™…)
  • OpenGL 2.1 β€” - (still a no πŸ™…)
  • OpenGL 3.0 β€” βœ”
  • OpenGL 3.1 β€” βœ”
  • OpenGL 3.2 β€” βœ”
  • OpenGL 3.3 β€” βœ”
  • OpenGL 4.0 β€” βœ”
  • OpenGL 4.1 β€” βœ”
  • OpenGL 4.2 β€” βœ”
  • OpenGL 4.3 β€” βœ”
  • OpenGL 4.4 β€” βœ”
  • OpenGL 4.5 β€” βœ”

so basically: not in 2.0 or 2.1, and then present and accounted for all the way from 3.0 through 4.5. ate and left zero crumbs πŸ”₯


🌈 SEE ALSO 🌈

  • glGenFramebuffers() β€” the maker
  • glBindFramebuffer() β€” the binder
  • glCheckFramebufferStatus() β€” the wellness check 🩺

iykyk, they're all in the same friend group 🫢


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/.

Copyright Β© 2010-2014 Khronos Group


πŸŽ€ okay that's the whole page, bestie β€” and one tiny housekeeping note: the source line on this one is literally [FIXME: source] and the date is 08/09/2021, so the version info is still a work in progress, ngl 😭 but everything else? slayed. bye babe πŸ’œβœ¨

πŸ“¦ where this page comes from