Cogl.Pipeline.prototype.set_uniform_matrix
function set_uniform_matrix(uniform_location: Number(gint), dimensions: Number(gint), count: Number(gint), transpose: Cogl.Bool, value: Number(gfloat)): void {
// Gjs wrapper for cogl_pipeline_set_uniform_matrix()
}
Sets new values for the uniform at uniform_location. If this pipeline has a user program attached and is later used as a source for drawing, the given values will be assigned to the uniform which can be accessed from the shader's source. The value for uniform_location should be retrieved from the string name of the uniform by calling Cogl.Pipeline.prototype.get_uniform_location.
This function can be used to set any matrix type uniform, including matrix arrays. For example, to set a single mat4 uniform you would use 4 for dimensions and 1 for count. To set an array of 8 mat3 values, you could use 3 for dimensions and 8 for count.
If transpose is false then the matrix is expected to be in column-major order or if it is true then the matrix is in row-major order. You can pass a Cogl.Matrix by calling by passing the result of Cogl.Matrix.prototype.get_array in value and setting transpose to false.
Since 2.0
- uniform_location
The uniform's location identifier
- dimensions
The size of the matrix
- count
The number of values to set
- transpose
Whether to transpose the matrix
- value
Pointer to the new values to set