glBindAttribLocation Function

Syntax

GL_APICALL void GL_APIENTRY glBindAttribLocation(
     GLuint program,
     GLuint index,
     const char * name
);

Arguments

Name Description
in program Program object
in index Vertex attribute index
in name Vertex attribute name

Return Values

No values are returned.

Description

Binds together a vertex attribute name and number.

You can set index to a value that is greater than 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_VALUEThe index argument was set to an invalid value, or program is a nonexistent program object.
GL_OUT_OF_MEMORYFailed to allocate the management region.

Revision History

2010/01/07
Initial version.

CONFIDENTIAL