GLCREATEBUFFERS(3G)

πŸ’… GLCREATEBUFFERS πŸ’…

okay so bestie, quick vibe check: this is a page from the 3G manual (yes, that's the OpenGL one, we're being fancy today ✨), and it's literally all about glCreateBuffers β€” the glow-up function that just makes you brand new buffer objects. no cap.


✨ NAME ✨

glCreateBuffers β€” create buffer objects 🫢


🌸 C SPECIFICATION 🌸

void glCreateBuffers(GLsizei n, GLuint *buffers);

that's the whole signature, bestie. short, sweet, iconic. πŸ‘‘


πŸŽ€ PARAMETERS πŸŽ€

  • n β€” how many buffer objects you want to create. that's it, that's the number. the size of your little buffer squad πŸ’–
  • buffers β€” an array where the names of your shiny new buffer objects get stored. so you hand over the array, and it gets filled in. like a gift bag but for buffer names 🎁

πŸ¦‹ DESCRIPTION πŸ¦‹

so glCreateBuffers returns n previously unused buffer names in buffers, and each one represents a brand new buffer object. ✨

the way that each of these new objects is initialized is: exactly as if it had been bound to an unspecified target. not me explaining that in one breath, but that's literally the spec, so. unspecified target, no notes. πŸ’…


πŸ’€ ERRORS πŸ’€

  • GL_INVALID_VALUE is generated if n is negative. so like, don't do that. πŸ™ˆ negative n? not the move. it's giving error code energy and not the cute kind.

πŸ”₯ VERSION SUPPORT πŸ”₯

so the original page had this whole big table (a whole grid, very extra) showing which OpenGL versions support this function. we're gonna do it in list form because tables in terminals are lowkey a crime. here's the tea:

the columns were OpenGL Versions: 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 row was the Function / Feature Name, glCreateBuffers.

  • glCreateBuffers β€” 2.0: -
  • glCreateBuffers β€” 2.1: -
  • glCreateBuffers β€” 3.0: -
  • glCreateBuffers β€” 3.1: -
  • glCreateBuffers β€” 3.2: -
  • glCreateBuffers β€” 3.3: -
  • glCreateBuffers β€” 4.0: -
  • glCreateBuffers β€” 4.1: -
  • glCreateBuffers β€” 4.2: -
  • glCreateBuffers β€” 4.3: -
  • glCreateBuffers β€” 4.4: -
  • glCreateBuffers β€” 4.5: βœ”

so yeah. every single one of those is a - except 4.5, which is a big fat βœ”. she's a 4.5-only girly. main character energy, honestly. 🌈⭐


πŸ‘‘ SEE ALSO πŸ‘‘

go read these too, bestie, they're the whole friend group:

  • glGenBuffers()
  • glBindBufferBase()
  • glBindBufferRange()
  • glMapBuffer()
  • glUnmapBuffer()
  • glDeleteBuffers()
  • glGet()
  • glIsBuffer()

Copyright Β© 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 Β© 2014 Khronos Group

okay so that's the legal bit twice, because the original page says it twice and we do not skip details around here. πŸ™

and that's the page, bestie!! πŸ“πŸ§š

cute little sign-off: the original footer said [FIXME: source] (yes, it literally says FIXME, the docs team said "we'll get to it" and then didn't 😭) and it was dated 08/09/2021. so this whole thing is brought to you by a FIXME and a 2021 timestamp. iconic in a chaotic way. πŸ’…βœ¨

πŸ“¦ where this page comes from