GLDRAWELEMENTSINSTAN(3G)
π
GLDRAWELEMENTSINSTAN(3G) β glDrawElementsInstancedBaseVertex
okay bestie, welcome to the 3G manual page for glDrawElementsInstancedBaseVertex, aka the "render multiple instances of a set of primitives from array data with a per-element offset" icon. no cap, this one is a whole vibe if you're doing instanced indexed drawing. π¦β¨
πΈ NAME πΈ
glDrawElementsInstancedBaseVertex β render multiple instances of a set of primitives from array data with a per-element offset. that's the NAME section, periodt. π
β¨ C SPECIFICATION β¨
void glDrawElementsInstancedBaseVertex(GLenum mode, GLsizei count,
GLenum type, GLvoid *indices,
GLsizei primcount,
GLint basevertex);
π PARAMETERS π
modeβ tells the GL 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. pick your fave, but it has to be one of those. πcountβ the number of elements to be rendered. literally how many, bestie. π’typeβ the type of the values inindices. must be one ofGL_UNSIGNED_BYTE,GL_UNSIGNED_SHORT, orGL_UNSIGNED_INT. no mixing, no guessing. πindicesβ a pointer to the location where the indices are stored. that's the address, not the vibe. πprimcountβ the number of instances of the indexed geometry that should be drawn. yes, we're doing multiples, main character energy. πbasevertexβ a constant that should be added to each element ofindiceswhen choosing elements from the enabled vertex arrays. it's the little offset that could. β¨
π¦ DESCRIPTION π¦
glDrawElementsInstancedBaseVertex behaves identically to glDrawElementsInstanced() except that the *i*th element transferred by the corresponding draw call will be taken from element indices[i] + basevertex of each enabled array. iykyk. π
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). and listen: the operation is undefined if the sum would be negative. that's a hard no, not a cute experiment. π
π§ NOTES π§
glDrawElementsInstancedBaseVertex is only supported if the GL version is 3.2 or greater. old GL? not invited to this party. π«Ά
π ERRORS π
GL_INVALID_ENUMis generated ifmodeis not an accepted value. π«GL_INVALID_VALUEis generated ifcountorprimcountis negative. negative counts are not the vibe. π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. mapping drama = error, bestie. π
β VERSION SUPPORT β
OpenGL Version β Function / Feature Name: glDrawElementsInstancedBaseVertex
2.0:-2.1:-3.0:-3.1:-3.2:β3.3:β4.0:β4.1:β4.2:β4.3:β4.4:β4.5:β
so like: dashes for 2.0 through 3.1, checks from 3.2 all the way to 4.5. slay. β
π₯ SEE ALSO π₯
glDrawElements()glDrawRangeElements()glDrawRangeElementsBaseVertex()glDrawElementsInstanced()glDrawElementsInstancedBaseVertex()
go read those if you want the full friend group. π«Ά
π 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 π β signing off with [FIXME: source] energy, dated 08/09/2021, manual slot GLDRAWELEMENTSINSTAN(3G). mwah. πβ¨
π¦ 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