glGetVertexAttribiv Function

Syntax

GL_APICALL void GL_APIENTRY glGetVertexAttribiv(
     GLuint index,
     GLenum pname,
     GLint * params
);

Parameters

Name Description
in index Vertex attribute index number
in pname Name of the parameter to get
out params Array storing the obtained values

Return Values

No values are returned.

Description

Gets vertex attribute parameters as GLint-type values.

Set index to a value that is greater than or equal to 0 and at least one less than the value that can be obtained by glGetIntegerv with GL_MAX_VERTEX_ATTRIBS specified.

Set pname to one of the following values.

GL_VERTEX_ATTRIB_ARRAY_ENABLEDGet GL_TRUE when the vertex attribute array is enabled and GL_FALSE otherwise.
GL_VERTEX_ATTRIB_ARRAY_SIZEGet the number of vertex attribute components (the size).
GL_VERTEX_ATTRIB_ARRAY_STRIDEGet the number of bytes in the vertex attribute stride.
GL_VERTEX_ATTRIB_ARRAY_TYPEGet the vertex attributes' data type.
GL_VERTEX_ATTRIB_ARRAY_NORMALIZEDGet GL_TRUE when normalization is enabled and GL_FALSE otherwise.
GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDINGGet the name of the vertex buffer object bound to the vertex attributes.

In addition to those above, you can also specify any setting that can be obtained by glGetVertexAttribfv, but you will get values that have all been cast to type GLint.

This function generates the following errors.

GL_INVALID_VALUEThe index argument was set to an invalid value.
GL_INVALID_ENUMThe pname argument was set to an invalid value.

Revision History

2010/01/07
Initial version.

CONFIDENTIAL