GLGETVERTEXARRAYINDE(3G)
π glGetVertexArrayIndexed(3G) β the manual page bestie GLGETVERTEXARRAYINDE β¨
okay so bestie, listen up π this is the whole entire manual page for glGetVertexArrayIndexed, and we're gonna get through it together, no cap. it's giving "OpenGL deep lore" but make it cute. let's go π«Ά
β¨ NAME β¨
glGetVertexArrayIndexed β retrieve parameters of an attribute of a vertex array object. literally what it says on the tin, bestie π
πΈ C SPECIFICATION πΈ
okay so here's the exact function signatures, copy them character for character or it's not gonna compile and you'll be sad π
void glGetVertexArrayIndexed64iv(GLuint vaobj, GLuint index,
GLenum pname, GLint64 *param);
void glGetVertexArrayIndexediv(GLuint vaobj, GLuint index, GLenum pname,
GLint *param);
π¦ PARAMETERS π¦
vaobjβ specifies the name of a vertex array object. like, which VAO are we talking about, bestie? πindexβ specifies the index of the vertex array object attribute. must be a number between 0 and (GL_MAX_VERTEX_ATTRIBS- 1). no exceptions, periodt πpnameβ specifies the property to be used for the query. forglGetVertexArrayIndexediv, it must be one of these values:GL_VERTEX_ATTRIB_ARRAY_ENABLED,GL_VERTEX_ATTRIB_ARRAY_SIZE,GL_VERTEX_ATTRIB_ARRAY_STRIDE,GL_VERTEX_ATTRIB_ARRAY_TYPE,GL_VERTEX_ATTRIB_ARRAY_NORMALIZED,GL_VERTEX_ATTRIB_ARRAY_INTEGER,GL_VERTEX_ATTRIB_ARRAY_LONG,GL_VERTEX_ATTRIB_ARRAY_DIVISOR, orGL_VERTEX_ATTRIB_RELATIVE_OFFSET. forglGetVertexArrayIndexed64v, it must be equal toGL_VERTEX_BINDING_OFFSET. iykyk πparamβ returns the requested value. it's the output, bestie, where the answer goes π
π DESCRIPTION π
okay so glGetVertexArrayIndexediv and glGetVertexArrayIndexed64iv provide a way of querying parameters of an attribute at an user-specified index of a vertex array object. and here's the iconic part: the vertex array object does not have to be bound to the rendering context at the time of the call, but it must have been bound at least once prior to this call. so like, it's not a main character right now but it had its moment π
the following parameter values can be retrieved with glGetVertexArrayIndexediv for each of the attributes defined for a vertex array object:
GL_VERTEX_ATTRIB_ARRAY_ENABLED:paramreturns a value that is non-zero (true) if the vertex attribute array forindexis enabled and 0 (false) if it is disabled. the initial value isGL_FALSE. so like, default is off, no cap πGL_VERTEX_ATTRIB_ARRAY_SIZE:paramreturns a single value, the size of the vertex attribute array forindex. the size is the number of values for each element of the vertex attribute array, and it will be 1, 2, 3 or 4. the initial value is 4. so default is 4, periodt πGL_VERTEX_ATTRIB_ARRAY_STRIDE:paramreturns a single value, the array stride for (number of bytes between successive elements in) the vertex attribute array forindex. a value of 0 indicates the array elements are stored sequentially in memory. the initial value is 0. so zero means packed tight, cute πGL_VERTEX_ATTRIB_ARRAY_TYPE:paramreturns a single value, a symbolic constant indicating the array type for the vertex attribute array forindex. possible values areGL_BYTE,GL_DOUBLE,GL_FIXED,GL_FLOAT,GL_HALF_FLOAT,GL_INT,GL_INT_2_10_10_10_REV,GL_SHORT,GL_UNSIGNED_BYTE,GL_UNSIGNED_SHORT,GL_UNSIGNED_INT,GL_UNSIGNED_INT_2_10_10_10_REV, andGL_UNSIGNED_INT_10F_11F_11F_REV. the initial value isGL_FLOAT. so many options, it's giving variety β¨GL_VERTEX_ATTRIB_ARRAY_NORMALIZED:paramreturns a single value that is non-zero (true) if fixed-point data types for the vertex attribute array indicated byindexare normalized when they are converted to floating-point, and 0 (false) otherwise. the initial value isGL_FALSE. so default is not normalized, ngl π§GL_VERTEX_ATTRIB_ARRAY_INTEGER:paramreturns a single value that is non-zero (true) if fixed-point data types for the vertex attribute array indicated byindexhave integer data type, and 0 (false) otherwise. the initial value is 0 (GL_FALSE). so default is not integer, fr fr πΈGL_VERTEX_ATTRIB_ARRAY_LONG:paramreturns a single value that is non-zero (true) if a vertex attribute is stored as an unconverted double, and 0 (false) otherwise. the initial value is 0 (GL_FALSE). so default is not long, bestie πGL_VERTEX_ATTRIB_ARRAY_DIVISOR:paramreturns a single value that is the frequency divisor used for instanced rendering. seeglVertexAttribDivisor. the initial value is 0. so like, instancing stuff, you know how it is π₯GL_VERTEX_ATTRIB_RELATIVE_OFFSET:paramreturns a single value that is the byte offset of the first element relative to the start of the vertex buffer binding specified attribute fetches from. the initial value is 0. so offset is zero by default, iconic π
glGetVertexArrayIndexed64iv can be used to retrieve GL_VERTEX_BINDING_OFFSET parameter value for any of the attributes defined for a vertex array object. when pname is set to GL_VERTEX_BINDING_OFFSET, param returns a single value that is the byte offset of the first element in the bound buffer's data store. the initial value for this parameter is 0. so yeah, that's the 64-bit girlie's whole thing π
π ERRORS π
okay so if you mess up, here's what you'll get:
GL_INVALID_OPERATIONerror is generated ifvaobjis not the name of an existing vertex array object. so like, you made it up or it's gone πGL_INVALID_VALUEerror is generated ifindexis greater than or equal to the value ofGL_MAX_VERTEX_ATTRIBS. out of bounds, bestie, we don't do that π«GL_INVALID_ENUMerror is generated ifpnameis not one of the valid values. for more details, please see above. like, check the list, it's right there π
π₯ VERSION SUPPORT π₯
here's the vibe check on which OpenGL versions support these functions. spoiler: it's only 4.5, so if you're on anything older, sorry bestie π
βββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β OpenGL Version β
βββββββββββββββββββββββββββββββΌββββββ¬ββββββ¬ββββββ¬ββββββ¬ββββββ¬ββββββ¬ββββββ¬ββββββ¬ββββββ¬ββββββ¬ββββββ¬ββββββ€
β Function β 2.0 β 2.1 β 3.0 β 3.1 β 3.2 β 3.3 β 4.0 β 4.1 β 4.2 β 4.3 β 4.4 β 4.5 β
β / β β β β β β β β β β β β β
β Feature β β β β β β β β β β β β β
β Name β β β β β β β β β β β β β
βββββββββββββββββββββββββββββββΌββββββΌββββββΌββββββΌββββββΌββββββΌββββββΌββββββΌββββββΌββββββΌββββββΌββββββΌββββββ€
β glGetVertexArrayIndexed64iv β - β - β - β - β - β - β - β - β - β - β - β β β
βββββββββββββββββββββββββββββββΌββββββΌββββββΌββββββΌββββββΌββββββΌββββββΌββββββΌββββββΌββββββΌββββββΌββββββΌββββββ€
β glGetVertexArrayIndexediv β - β - β - β - β - β - β - β - β - β - β - β β β
βββββββββββββββββββββββββββββββ΄ββββββ΄ββββββ΄ββββββ΄ββββββ΄ββββββ΄ββββββ΄ββββββ΄ββββββ΄ββββββ΄ββββββ΄ββββββ΄ββββββ
so both functions are only in 4.5. no cap, that's the whole table π
β SEE ALSO β
if you liked this, you'll love these besties:
glGetVertexAttrib()glVertexAttribBinding()glVertexAttribIPointerglVertexAttribLPointerglVertexAttribPointer()
go read them, they're iconic too π
π COPYRIGHT π
Copyright Β© 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 Β© 2014 Khronos Group
okay bestie, that's the whole page. you ate that π this was [FIXME: source] from 08/09/2021, so like, a little vintage but still slaying. now go forth and query those vertex array attributes, periodt π«Άβ¨
π¦ 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