GL_APICALL void GL_APIENTRY glBindAttribLocation(
GLuint program,
GLuint index,
const char * name
);
| Name | Description | |
|---|---|---|
| in | program | Program object |
| in | index | Vertex attribute index |
| in | name | Vertex attribute name |
Binds together a vertex attribute name and number.
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 name to a NULL-terminated string. This function binds an input register named by pragma bind_symbol in shader assembly code to the vertex attribute number used by the application.
Call the glLinkProgram function to enable the settings made by this function. The vertex attribute numbers in this function have nothing to do with the order of definitions in shader assembly code or with input register indices.
This function generates the following errors.
| GL_INVALID_VALUE | The index argument was set to an invalid value, or program is a nonexistent program object. |
|---|---|
| GL_OUT_OF_MEMORY | Failed to allocate the management region. |
CONFIDENTIAL