GLBINDBUFFERBASE(3G)

okay bestie, buckle up: this is glBindBufferBase from the GLBINDBUFFERBASE(3G) manual β€” and yes, the header is literally doing [FIXME: manual], iconic placeholder behavior πŸ’…βœ¨

✨ NAME ✨

glBindBufferBase β€” bind a buffer object to an indexed buffer target πŸŽ€

🧾 C SPECIFICATION 🧾

void glBindBufferBase(GLenum target, GLuint index, GLuint buffer);

🎯 PARAMETERS 🎯

  • target β€” Specify the target of the bind operation. target must be one of GL_ATOMIC_COUNTER_BUFFER, GL_TRANSFORM_FEEDBACK_BUFFER, GL_UNIFORM_BUFFER or GL_SHADER_STORAGE_BUFFER. no random targets, bestie πŸ’…
  • index β€” Specify the index of the binding point within the array specified by target.
  • buffer β€” The name of a buffer object to bind to the specified binding point.

πŸ’– DESCRIPTION πŸ’–

So glBindBufferBase binds the buffer object buffer to the binding point at index index of the array of targets specified by target. stay with me, it slays ✨

Each target represents an indexed array of buffer binding points, plus a single general binding point that can be used by other buffer manipulation functions such as glBindBuffer() or glMapBuffer(). In addition to binding buffer to the indexed buffer binding target, glBindBufferBase also binds buffer to the generic buffer binding point specified by target. double duty, highkey iconic 🫢

πŸ“ NOTES πŸ“

  • Calling glBindBufferBase is equivalent to calling glBindBufferRange() with offset zero and size equal to the size of the buffer.
  • The GL_ATOMIC_COUNTER_BUFFER target is available only if the GL version is 4.2 or greater.
  • The GL_SHADER_STORAGE_BUFFER target is available only if the GL version is 4.3 or greater.

πŸ’€ ERRORS πŸ’€

  • GL_INVALID_ENUM is generated if target is not GL_ATOMIC_COUNTER_BUFFER, GL_TRANSFORM_FEEDBACK_BUFFER, GL_UNIFORM_BUFFER or GL_SHADER_STORAGE_BUFFER.
  • GL_INVALID_VALUE is generated if index is greater than or equal to the number of target-specific indexed binding points.
  • GL_INVALID_VALUE is generated if buffer does not have an associated data store, or if the size of that store is zero.

🌈 VERSION SUPPORT 🌈

glBindBufferBase / Feature Name support by OpenGL Version:

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

short vibe check: 2.0 and 2.1 are a no, and 3.0 through 4.5 are a yes πŸ’š

πŸ‘€ SEE ALSO πŸ‘€

The SEE ALSO squad is: glGenBuffers(), glDeleteBuffers(), glBindBuffer(), glBindBufferRange(), glMapBuffer(), glUnmapBuffer(), β€” and yes, that trailing comma after glUnmapBuffer() is canon in the original, so we keep it πŸ’…

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


source/version tag: [FIXME: source] Β· date: 08/09/2021 Β· manual: GLBINDBUFFERBASE(3G) β€” okay bye bestie, go bind those buffers responsibly πŸ«Άβœ¨πŸ’–

πŸ“¦ where this page comes from