GLDRAWARRAYS(3G)
πΈ NAME πΈ
okay so welcome to GLDRAWARRAYS(3G) β header placeholder [FIXME: manual] and all β bestie π
this page is literally about glDrawArrays, AKA render primitives from array data. periodt.
π§Ύ C SPECIFICATION π§Ύ
void glDrawArrays(GLenum mode, GLint first, GLsizei count);
No cap, that's the signature.
π PARAMETERS π
modeβ tells it what kind of primitives to render. these symbolic constants are accepted: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_ADJACENCYandGL_PATCHES.firstβ specifies the starting index in the enabled arrays. this is where the reading begins, bestie β¨.countβ specifies the number of indices to be rendered.
π¦ DESCRIPTION π¦
okay so glDrawArrays specifies multiple geometric primitives with very few subroutine calls. instead of calling a GL procedure to pass each individual vertex, normal, texture coordinate, edge flag, or color, you can prespecify separate arrays of vertices, normals, and colors and use them to construct a sequence of primitives with a single call to glDrawArrays. obsessed, honestly.
when glDrawArrays is called, it uses count sequential elements from each enabled array to construct a sequence of geometric primitives, beginning with element first. mode specifies what kind of primitives are constructed and how the array elements construct those primitives. slay.
vertex attributes that are modified by glDrawArrays have an unspecified value after glDrawArrays returns. attributes that aren't modified remain well defined. tiny but important, don't forget it π.
π§ NOTES π§
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. iykyk.
π ERRORS π
GL_INVALID_ENUMis generated ifmodeis not an accepted value.GL_INVALID_VALUEis generated ifcountis negative.GL_INVALID_OPERATIONis generated if a non-zero buffer object name is bound to an enabled array and the buffer object's data store is currently mapped.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.
π VERSION SUPPORT π
the original has a whole table with OpenGL Version across the top and Function / Feature Name down the side. since no tables allowed, here's the tea in list form π«:
- Function / Feature Name:
glDrawArrays - OpenGL Version:
2.0,2.1,3.0,3.1,3.2,3.3,4.0,4.1,4.2,4.3,4.4,4.5 - Supported?
βfor every single one, bestie. all twelve, no skips.
π₯ SEE ALSO π₯
the whole lineup is glDrawArraysInstanced(), glDrawElements(), glDrawRangeElements(), β yes, that last comma is in the original and I'm keeping it, no cap.
π COPYRIGHT π
Copyright Β© 1991-2006 Silicon Graphics, Inc. Copyright Β© 2010-2014 Khronos Group. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.
π COPYRIGHT (yes, again, because the page really has two) π
Copyright Β© 1991-2006 Silicon Graphics, Inc. Copyright Β© 2010-2014 Khronos Group
okay bye ily π«Ά the footer tea is: source is [FIXME: source], version/date is 08/09/2021, and the manual page is GLDRAWARRAYS(3G). π
π¦ 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