Cogl.Pipeline.prototype.get_uniform_location

function get_uniform_location(uniform_name: String): Number(gint) {
    // Gjs wrapper for cogl_pipeline_get_uniform_location()
}
  

This is used to get an integer representing the uniform with the name uniform_name. The integer can be passed to functions such as Cogl.Pipeline.prototype.set_uniform_1f to set the value of a uniform.

This function will always return a valid integer. Ie, unlike OpenGL, it does not return -1 if the uniform is not available in this pipeline so it can not be used to test whether uniforms are present. It is not necessary to set the program on the pipeline before calling this function.

Since 2.0

uniform_name

The name of a uniform

Returns

A integer representing the location of the given uniform.