GLMULTIDRAWELEMENTSB(3G)

πŸ’– NAME πŸ’–

Okay so welcome to the GLMULTIDRAWELEMENTSB(3G) page, bestie. The function is glMultiDrawElementsBaseVertex β€” render multiple sets of primitives by specifying indices of array data elements and an index to apply to each index. It’s giving β€œone call, many element lists” energy. πŸ¦‹


✨ C SPECIFICATION ✨

Here’s the exact signature, no cap:

void glMultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count,
                                   GLenum type,
                                   const GLvoid * const *indices,
                                   GLsizei drawcount,
                                   const GLint *basevertex);

πŸŽ€ PARAMETERS πŸŽ€

  • mode β€” tells GL what kind of primitives to render. Accepted symbolic constants: GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY, and GL_PATCHES. Literally the whole menu. πŸ“
  • count β€” points to an array of the element counts.
  • type β€” the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. No improvising. πŸ’…
  • indices β€” a pointer to the location where the indices are stored.
  • drawcount β€” the size of the count, indices, and basevertex arrays.
  • basevertex β€” a pointer to the location where the base vertices are stored.

🌸 DESCRIPTION 🌸

glMultiDrawElementsBaseVertex behaves identically to glDrawElementsBaseVertex(), except that drawcount separate lists of elements are specified instead. Iconic. πŸ‘‘

It has the same effect as:

for (int i = 0; i < drawcount; i++)
    if (count[i] > 0)
        glDrawElementsBaseVertex(mode,
                                 count[i],
                                 type,
                                 indices[i],
                                 basevertex[i]);

πŸ¦‹ NOTES πŸ¦‹

  • glMultiDrawElementsBaseVertex is available only if the GL version is 3.1 or greater.
  • GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP_ADJACENCY, and GL_TRIANGLES_ADJACENCY are available only if the GL version is 3.2 or greater.

πŸ’€ ERRORS πŸ’€

These are the error girls, bestie:

  • GL_INVALID_ENUM is generated if mode is not an accepted value.
  • GL_INVALID_VALUE is generated if drawcount is negative.
  • GL_INVALID_OPERATION is generated if a non-zero buffer object name is bound to an enabled array or the element array and the buffer object’s data store is currently mapped.

🌈 VERSION SUPPORT 🌈

The original table has the row label glMultiDrawElementsBaseVertex under Function / Feature Name, and the column header is OpenGL Version. The entries are, fr fr:

  • OpenGL 2.0: -
  • OpenGL 2.1: -
  • 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: βœ”

πŸ’œ SEE ALSO πŸ’œ

  • glMultiDrawElements()
  • glDrawElementsBaseVertex()
  • glDrawArrays()
  • glVertexAttribPointer()

Copyright Β© 2010 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 β€” source/version: [FIXME: source], date: 08/09/2021. Bye, slay, and may your draw calls be valid. πŸ’–

πŸ“¦ where this page comes from