GLGENFRAMEBUFFERS(3G)

πŸ’… GLGENFRAMEBUFFERS(3G) πŸ’…

okay so bestie, welcome to the 3G girlies' corner of the manual β€” this is glGenFramebuffers, and she's literally the name-generator for your framebuffer objects. no cap, she's a whole vibe and she's about to hand you some fresh IDs. πŸŽ€


✨ NAME ✨

glGenFramebuffers β€” generate framebuffer object names πŸ¦‹


🌸 C SPECIFICATION 🌸

void glGenFramebuffers(GLsizei n, GLuint *ids);

that's the whole signature, she's short and iconic, periodt. πŸ’…


πŸŽ€ PARAMETERS πŸŽ€

  • n β€” the number of framebuffer object names you want her to generate. like, how many you ordering bestie πŸ’–
  • ids β€” an array where the generated framebuffer object names get stored. she fills it up for you, no notes ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

so glGenFramebuffers returns n framebuffer object names in ids. πŸ’«

and listen β€” there is no guarantee that the names form a contiguous set of integers. like they're not gonna be 1, 2, 3, 4 all cute and in a row, they're just gonna be some numbers, iykyk. however, it is guaranteed that none of the returned names was in use immediately before the call to glGenFramebuffers. so no duplicates of stuff you already had, we love that for us 🫢

framebuffer object names returned by a call to glGenFramebuffers are not returned by subsequent calls β€” unless they are first deleted with glDeleteFramebuffers(). so like, you gotta give them back before she'll hand them out again, it's giving library book energy πŸ“š

the names returned in ids are marked as used, for the purposes of glGenFramebuffers only β€” but they acquire state and type only when they are first bound. so they're like, reserved but not fully alive yet. main character energy but she hasn't had her glow-up moment πŸ’…βœ¨


πŸ’€ ERRORS πŸ’€

  • GL_INVALID_VALUE is generated if n is negative. like bestie, you can't ask for negative framebuffers, that's not a thing 😭
fr fr, keep your n at zero or above or she WILL throw hands (politely, via GL_INVALID_VALUE).

πŸ‘‘ VERSION SUPPORT πŸ‘‘

the vibe check across OpenGL versions, function/feature name glGenFramebuffers:

  • 2.0 β€” - (not here yet, she's still loading πŸ™ˆ)
  • 2.1 β€” - (still loading)
  • 3.0 β€” βœ” πŸ”₯
  • 3.1 β€” βœ” πŸ”₯
  • 3.2 β€” βœ” πŸ”₯
  • 3.3 β€” βœ” πŸ”₯
  • 4.0 β€” βœ” πŸ”₯
  • 4.1 β€” βœ” πŸ”₯
  • 4.2 β€” βœ” πŸ”₯
  • 4.3 β€” βœ” πŸ”₯
  • 4.4 β€” βœ” πŸ”₯
  • 4.5 β€” βœ” πŸ”₯

so basically from 3.0 onward she ate and left no crumbs. 2.0 and 2.1 are the prequel era, no glGenFramebuffers for you there. 🌈


πŸ“ SEE ALSO πŸ“

  • glBindFramebuffer() β€” where the names actually acquire state and type, the binding moment πŸ‘€
  • glDeleteFramebuffers() β€” the one you gotta call first if you want names recycled πŸ’œ

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


and that's the whole page bestie, you're officially a framebuffer-name-generating icon now πŸ‘‘πŸ’–

okay bye, ily β€” this was brought to you by [FIXME: source] and dated 08/09/2021, straight from the GLGENFRAMEBUFFERS(3G) energy. slay ✨🧚

πŸ“¦ where this page comes from