## Shaders and Programmable Pipeline (Deprecated) Shaders and Programmable Pipeline (Deprecated) |

## Synopsis

    CoglHandle          cogl_shader_ref                     (CoglHandle handle);
    void                cogl_shader_unref                   (CoglHandle handle);

    CoglHandle          cogl_program_ref                    (CoglHandle handle);
    void                cogl_program_unref                  (CoglHandle handle);
    void                cogl_program_use                    (CoglHandle handle);
    void                cogl_program_uniform_1f             (int uniform_no,
                                                             float value);
    void                cogl_program_uniform_1i             (int uniform_no,
                                                             int value);
    void                cogl_program_uniform_float          (int uniform_no,
                                                             int size,
                                                             int count,
                                                             const float *value);
    void                cogl_program_uniform_int            (int uniform_no,
                                                             int size,
                                                             int count,
                                                             const int *value);
    void                cogl_program_uniform_matrix         (int uniform_no,
                                                             int size,
                                                             int count,
                                                             gboolean transpose,
                                                             const float *value);

## Description

## Details

### cogl_shader_ref ()

    CoglHandle          cogl_shader_ref                     (CoglHandle handle);

### Warning

`cogl_shader_ref` is deprecated and should not be used in newly-written code.

Add an extra reference to a shader.

`handle` : | A CoglHandle to a shader.
Returns : | `handle`

### cogl_shader_unref ()

    void                cogl_shader_unref                   (CoglHandle handle);

### Warning

`cogl_shader_unref` is deprecated and should not be used in newly-written code.

Removes a reference to a shader. If it was the last reference the shader object will be destroyed.

`handle` : | A CoglHandle to a shader.

### cogl_program_ref ()

    CoglHandle          cogl_program_ref                    (CoglHandle handle);

Add an extra reference to a program.

`handle` : | A CoglHandle to a program.
Returns : | `handle`

### cogl_program_unref ()

    void                cogl_program_unref                  (CoglHandle handle);

Removes a reference to a program. If it was the last reference the program object will be destroyed.

`handle` : | A CoglHandle to a program.

### cogl_program_use ()

    void                cogl_program_use                    (CoglHandle handle);

Activate a specific shader program replacing that part of the GL rendering pipeline, if passed in `COGL_INVALID_HANDLE` the default behavior of GL is reinstated.

`handle` : | a CoglHandle for a shader program or `COGL_INVALID_HANDLE`.

### cogl_program_uniform_1f ()

    void                cogl_program_uniform_1f             (int uniform_no,
                                                             float value);

### Warning

`cogl_program_uniform_1f` has been deprecated since version 1.4 and should not be used in newly-written code. Use `cogl_program_set_uniform_1f()` instead.

Changes the value of a floating point uniform in the currently used (see `cogl_program_use()`) shader program.

`uniform_no` : | the uniform to set.
`value` : | the new value of the uniform.

### cogl_program_uniform_1i ()

    void                cogl_program_uniform_1i             (int uniform_no,
                                                             int value);

### Warning

`cogl_program_uniform_1i` has been deprecated since version 1.4 and should not be used in newly-written code. Use `cogl_program_set_uniform_1i()` instead.

Changes the value of an integer uniform in the currently used (see `cogl_program_use()`) shader program.

`uniform_no` : | the uniform to set.
`value` : | the new value of the uniform.

### cogl_program_uniform_float ()

    void                cogl_program_uniform_float          (int uniform_no,
                                                             int size,
                                                             int count,
                                                             const float *value);

### Warning

`cogl_program_uniform_float` has been deprecated since version 1.4 and should not be used in newly-written code. Use `cogl_program_set_uniform_float()` instead.

Changes the value of a float vector uniform, or uniform array in the currently used (see `cogl_program_use()`) shader program.

`uniform_no` : | the uniform to set.
`size` : | Size of float vector.
`count` : | Size of array of uniforms.
`value` : | the new value of the uniform. [array length=count]

### cogl_program_uniform_int ()

    void                cogl_program_uniform_int            (int uniform_no,
                                                             int size,
                                                             int count,
                                                             const int *value);

### Warning

`cogl_program_uniform_int` is deprecated and should not be used in newly-written code.

Changes the value of a int vector uniform, or uniform array in the currently used (see `cogl_program_use()`) shader program.

`uniform_no` : | the uniform to set.
`size` : | Size of int vector.
`count` : | Size of array of uniforms.
`value` : | the new value of the uniform. [array length=count]

### cogl_program_uniform_matrix ()

    void                cogl_program_uniform_matrix         (int uniform_no,
                                                             int size,
                                                             int count,
                                                             gboolean transpose,
                                                             const float *value);

### Warning

`cogl_program_uniform_matrix` is deprecated and should not be used in newly-written code.

Changes the value of a matrix uniform, or uniform array in the currently used (see `cogl_program_use()`) shader program. The `size` parameter is used to determine the square size of the matrix.

`uniform_no` : | the uniform to set.
`size` : | Size of matrix.
`count` : | Size of array of uniforms.
`transpose` : | Whether to transpose the matrix when setting the uniform.
`value` : | the new value of the uniform. [array length=count]