GLGETUNIFORMLOCATION(3gl)GLGETUNIFORMLOCATION(3gl)NAMEglGetUniformLocationARB - returns the location of a uniform variable
C SPECIFICATION
int glGetUniformLocationARB( GLhandleARB program,
const GLcharARB *name )
PARAMETERS
program Specifies the handle of program object to be queried.
name Points to a string containing the name of the uniform
DESCRIPTIONglGetUniformLocationARB returns an integer that represents the location
of an uniform variable name. name must be a null terminated string,
without white space. The value of -1 will be returned if name does not
correspond to an active uniform variable name in program or if name
starts with the reserved prefix "gl_".
A valid name cannot be a structure, an array of structures, or a sub‐
component of a vector or a matrix. In order to identify a valid name,
the "." (dot) and "[]" operators can be used in <name> to operate on a
structure or to operate on an array.
The location of the first element of an array can be retrieved by using
the name of the uniform, or by using the name appended with "[0]".
The currently active uniforms for program can be queried by calling
glGetActiveUniformARB.
ERRORS
GL_INVALID_OPERATION is generated if program has not been successfully
linked.
GL_INVALID_OPERATION is generated if program is not of type GL_PRO‐
GRAM_OBJECT_ARB.
GL_INVALID_OPERATION is generated if glGetUniformLocationARB is exe‐
cuted between the execution of glBegin and the corresponding execution
of glEnd.
SEE ALSO
glLinkProgramARB, glGetActiveUniformARB,
glGetUniformARB, glUniformARB
11 Mar 04 GLGETUNIFORMLOCATION(3gl)