GLDRAWELEMENTSBASEVE(3G)
π GLDRAWELEMENTSBASEVE(3G) β the manual page, but make it make sense π
okay so bestie, you opened the GLDRAWELEMENTSBASEVE(3G) page β yes, the header even has a little [FIXME: manual] cameo β and itβs all about the OpenGL call that renders primitives from array data with a per-element offset. slay. Letβs get into it. π«Ά
β¨ NAME β¨
glDrawElementsBaseVertex β render primitives from array data with a per-element offset
π οΈ C SPECIFICATION π οΈ
void glDrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type,
GLvoid *indices, GLint basevertex);
π PARAMETERS π
modeβ tells OpenGL what kind of primitives to render. The accepted symbolic constants areGL_POINTS,GL_LINE_STRIP,GL_LINE_LOOP,GL_LINES,GL_TRIANGLE_STRIP,GL_TRIANGLE_FAN,GL_TRIANGLES,GL_LINES_ADJACENCY,GL_LINE_STRIP_ADJACENCY,GL_TRIANGLES_ADJACENCY,GL_TRIANGLE_STRIP_ADJACENCYandGL_PATCHES. iconic list, no notes πcountβ the number of elements to be rendered.typeβ the type of the values inindices. It must be one ofGL_UNSIGNED_BYTE,GL_UNSIGNED_SHORT, orGL_UNSIGNED_INT.indicesβ a pointer to the location where the indices are stored.basevertexβ a constant that should be added to each element ofindiceswhen choosing elements from the enabled vertex arrays.
π¦ DESCRIPTION π¦
glDrawElementsBaseVertex behaves identically to glDrawElements() except that the *i*th element transferred by the corresponding draw call will be taken from element indices[i] + basevertex of each enabled array. the way that math just sits there being important π
If the resulting value is larger than the maximum value representable by type, it is as if the calculation were upconverted to 32-bit unsigned integers (with wrapping on overflow conditions).
β οΈ The operation is undefined if the sum would be negative. Do not mess with that, bestie. periodt.
π NOTES π
glDrawElementsBaseVertex is only supported if the GL version is 3.2 or greater, or if the ARB_draw_elements_base_vertex extension is supported. iykyk β¨
π ERRORS π
GL_INVALID_ENUMis generated ifmodeis not an accepted value.GL_INVALID_VALUEis generated ifcountis negative.GL_INVALID_OPERATIONis generated if a geometry shader is active andmodeis incompatible with the input primitive type of the geometry shader in the currently installed program object.GL_INVALID_OPERATIONis 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 π
OpenGL Version vibe check for the glDrawElementsBaseVertex / Function / Feature Name row π:
- 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 π
glDrawElements()glDrawRangeElements()glDrawRangeElementsBaseVertex()glDrawElementsInstanced()glDrawElementsInstancedBaseVertex()
π COPYRIGHT π
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 π
Copyright Β© 2010-2014 Khronos Group
okay thatβs the whole page, bestie β source says [FIXME: source], dated 08/09/2021, and the manual is GLDRAWELEMENTSBASEVE(3G). slay forever πβ¨
π¦ where this page comes from
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 Β· MIT and Open Publication
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms