![]() | Uniform Constructor |
Namespace: Ooogles
Exception | Condition |
---|---|
GLException | InvalidOperation if program is not a valid program or has not been successfully linked. |
Uniform variables that are structures or arrays of structures may be queried by using separate Uniform classes for each field within the structure. The array element operator '[]' and the structure field operator '.' may be used in name in order to select elements within an array or fields within a structure. The result of using these operators is not allowed to be another structure, an array of structures, or a subcomponent of a vector or a matrix. Except if the last part of name indicates a uniform variable array, the location of the first element of an array can be retrieved by using the name of the array, or by using the name appended by '[0]'.
The actual locations assigned to uniform variables are not known until the program object is linked successfully.
Note: in DEBUG mode, a warning will be logged to the debug console if program does not contain a uniform named uniformName.
OpenGL API: glGetUniformLocation