glGetAttribLocation Function

Syntax

GL_APICALL int GL_APIENTRY glGetAttribLocation(
     GLuint program,
     const char * name
);

Arguments

Name Description
in program Program object
in name Vertex attribute name

Return Values

Vertex attribute number. If it could not be found, returns a value of -1.

Description

Gets the number of a program's vertex attribute.

Set program to the program object. Set name to a string that is the name of the vertex attribute to get. Returns a value of -1 when the specified name cannot be found among the active vertex attributes.

This function generates the following errors.

GL_INVALID_VALUEThe program argument was set to an invalid value.
GL_INVALID_OPERATIONThe program argument is not linked correctly.

Revision History

2010/01/07
Initial version.

CONFIDENTIAL