Cogl.Pipeline.get_uniform_location

### Method

# Cogl Pipelineget_uniform_location

#### Declaration [src]

    int
    cogl_pipeline_get_uniform_location (
      CoglPipeline* pipeline,
      const char* uniform_name
    )

#### Description [src]

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_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.

Stability: | Unstable
Available since: | 2.0

#### Parameters

`uniform_name` | `const char*`
| The name of a uniform.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.

#### Return value

Returns: | `int`
| A integer representing the location of the given uniform.