Cogl.Pipeline.prototype.set_uniform_int

function set_uniform_int(uniform_location: Number(gint), n_components: Number(gint), count: Number(gint), value: Number(gint)): void {
    // Gjs wrapper for cogl_pipeline_set_uniform_int()
}
  

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 integer type uniform, including int arrays and int vectors. For example, to set a single ivec4 uniform you would use 4 for n_components and 1 for count. To set an array of 8 int values, you could use 1 for n_components and 8 for count.

Since 2.0

uniform_location

The uniform's location identifier

n_components

The number of components in the corresponding uniform's type

count

The number of values to set

value

Pointer to the new values to set