Signature
Parameters
Description
glGetVertexAttrib
returns in
params
the value of a generic vertex
attribute parameter. The generic vertex attribute to be queried
is specified by
index
, and the parameter
to be queried is specified by
pname
.
The accepted parameter names are as follows:
- GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING
-
- 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
-
param returns 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 ).
- GL_VERTEX_ATTRIB_ARRAY_DIVISOR
-
params returns a single value that is the frequency divisor used for instanced rendering. See glVertexAttribDivisor . The initial value is 0.
- GL_VERTEX_ATTRIB_BINDING
-
- GL_VERTEX_ATTRIB_RELATIVE_OFFSET
-
params returns 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.
- GL_CURRENT_VERTEX_ATTRIB
-
params returns four values that represent the current value for the generic vertex attribute specified by index. Generic vertex attribute 0 is unique in that it has no current state, so an error will be generated if index is 0. The initial value for all other generic vertex attributes is (0,0,0,1).glGetVertexAttribdv and glGetVertexAttribfv return the current attribute values as four single-precision floating-point values; glGetVertexAttribiv reads them as floating-point values and converts them to four integer values; glGetVertexAttribIiv and glGetVertexAttribIuiv read and return them as signed or unsigned integer values, respectively; glGetVertexAttribLdv reads and returns them as four double-precision floating-point values.
All of the parameters except
GL_CURRENT_VERTEX_ATTRIB
represent state stored in the currently bound vertex array object.
Notes
If an error is generated, no change is made to the
contents of
params
.
Errors
GL_INVALID_OPERATION
is generated if
pname
is not
GL_CURRENT_VERTEX_ATTRIB
and there is no
currently bound vertex array object.
GL_INVALID_ENUM
is generated if
pname
is not an accepted value.
Associated Gets
glGet
with argument
GL_MAX_VERTEX_ATTRIBS
Version Support
glGetVertexAttribIiv | |
glGetVertexAttribIuiv | |
glGetVertexAttribLdv | |
glGetVertexAttribdv | |
glGetVertexAttribfv | |
glGetVertexAttribiv |
See Also
Copyright
Copyright
2003-2005 3Dlabs Inc. Ltd.
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/
.