glUniform4f Function
GL_APICALL void GL_APIENTRY glUniform4f(
GLint location,
GLfloat x,
GLfloat y,
GLfloat z,
GLfloat w
);
| Name | Description | |
|---|---|---|
| in | location | Location of uniform variable |
| in | x | Value to set for the first component |
| in | y | Value to set for the second component |
| in | z | Value to set for the third component |
| in | w | Value to set for the fourth component |
Sets the value of a GL_FLOAT_VEC4-type uniform variable, or a single element of a GL_FLOAT_VEC4-type uniform variable array, in the vertex shader, geometry shader, or reserved fragment shader.
Set location to the uniform variable's location. Use x, y, z, and w to specify the values to set.
Calls to this function are ignored when location is -1.
This function generates the following errors.
| GL_INVALID_OPERATION | The location argument is not a location in the current program. |
|---|---|
| GL_INVALID_OPERATION | There is no current program object. |
| GL_INVALID_OPERATION | This function was called on a location with a different data type or component count. |
| GL_INVALID_OPERATION | The uniform variable array is smaller than the offset added to the location obtained from glGetUniformLocation. |
CONFIDENTIAL