GL_APICALL void GL_APIENTRY glGetActiveAttrib(
GLuint program,
GLuint index,
GLsizei bufsize,
GLsizei * length,
GLint * size,
GLenum * type,
char * name
);
| Name | Description | |
|---|---|---|
| in | program | Program object |
| in | index | Vertex attribute index |
| in | bufsize | Size of the buffer specified by name |
| out | length | Region storing the number of bytes in the string written to name |
| out | size | Region storing the vertex attribute size |
| out | type | Region storing the vertex attribute type |
| out | name | Array storing the vertex attribute name |
Gets information about an active vertex attribute.
Set program to the program object.
Set index to a value that is greater than or equal to 0 and is at least one less than the value that can be obtained from glGetProgramiv with GL_ACTIVE_ATTRIBUTES specified.
Set bufsize to the size of the buffer specified in name.
The name, size (number of components), and data type of the active vertex attribute specified by index in the object given by program are stored in name, size, and type, respectively.
The length argument stores the size (in bytes) of the string saved in name.
If the number of characters in the vertex attribute name exceeds bufsize, then bufsize-1 characters are copied into name and NULL is inserted at the end.
This function generates the following errors.
| GL_INVALID_VALUE | The program or index argument was set to an invalid value, or bufsize was set to a negative value. |
|---|---|
| GL_INVALID_OPERATION | The program argument is not linked correctly. |
CONFIDENTIAL