GLVERTEXATTRIBBINDIN(3G)

πŸ’… GLVERTEXATTRIBBINDIN(3G) β€” the 3G manual, bestie ✨

okay so we're in OpenGL land and this page is the whole vibe for hooking up a vertex attribute with a vertex buffer binding inside a vertex array object. iconic, honestly.

🌸 NAME 🌸

glVertexAttribBinding β€” associate a vertex attribute and a vertex buffer binding for a vertex array object

πŸ’» C SPECIFICATION πŸ’»

void glVertexAttribBinding(GLuint attribindex, GLuint bindingindex);

void glVertexArrayAttribBinding(GLuint vaobj, GLuint attribindex,
                                GLuint bindingindex);

πŸŽ€ PARAMETERS πŸŽ€

  • vaobj β€” bestie, this is the name of the vertex array object for glVertexArrayAttribBinding.
  • attribindex β€” the index of the attribute you're associating with a vertex buffer binding.
  • bindingindex β€” the index of the vertex buffer binding you're associating with the generic vertex attribute.

πŸ¦‹ DESCRIPTION πŸ¦‹

so glVertexAttribBinding and glVertexArrayAttribBinding are the matchmakers: they establish an association between the generic vertex attribute of a vertex array object whose index is given by attribindex, and a vertex buffer binding whose index is given by bindingindex. slay.

for glVertexAttribBinding, the vertex array object affected is the one currently bound. for glVertexArrayAttribBinding, vaobj is the name of the vertex array object. lowkey simple, highkey important.

attribindex must be less than the value of GL_MAX_VERTEX_ATTRIBS, and bindingindex must be less than the value of GL_MAX_VERTEX_ATTRIB_BINDINGS. no cap.

πŸ’€ ERRORS πŸ’€

  • GL_INVALID_OPERATION is generated by glVertexAttribBinding if no vertex array object is bound.
  • GL_INVALID_OPERATION is generated by glVertexArrayAttribBinding if vaobj is not the name of an existing vertex array object.
  • GL_INVALID_VALUE is generated if attribindex is greater than or equal to the value of GL_MAX_VERTEX_ATTRIBS.
  • GL_INVALID_VALUE is generated if bindingindex is greater than or equal to the value of GL_MAX_VERTEX_ATTRIB_BINDINGS.

πŸ”₯ ASSOCIATED GETS πŸ”₯

glGet() with arguments GL_MAX_VERTEX_ATTRIB_BINDINGS, GL_VERTEX_BINDING_DIVISOR.

πŸ‘‘ VERSION SUPPORT πŸ‘‘

the OpenGL Version columns are 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 label is Function / Feature Name. here's the matrix unrolled because tables are not the vibe:

  • glVertexArrayAttribBinding β€” 2.0 -, 2.1 -, 3.0 -, 3.1 -, 3.2 -, 3.3 -, 4.0 -, 4.1 -, 4.2 -, 4.3 -, 4.4 -, 4.5 βœ”
  • glVertexAttribBinding β€” 2.0 -, 2.1 -, 3.0 -, 3.1 -, 3.2 -, 3.3 -, 4.0 -, 4.1 -, 4.2 -, 4.3 βœ”, 4.4 βœ”, 4.5 βœ”

🌈 SEE ALSO 🌈

glBindVertexBuffer(), glVertexAttribFormat(), glVertexBindingDivisor(), glVertexAttribPointer().

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


that's the whole page, bestie! source is [FIXME: source], version date is 08/09/2021, and the manual name is GLVERTEXATTRIBBINDIN(3G). bye, ily, go bind those attributes πŸ’–πŸ«Ά

πŸ“¦ where this page comes from