## 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                  ();
    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,
                                                             CoglBool transpose,
                                                             const float *value);

## Description

## Details

### cogl_shader_ref ()

    CoglHandle          cogl_shader_ref                     (CoglHandle handle);

### Warning

`cogl_shader_ref` has been deprecated since version 1.16 and should not be used in newly-written code. Use CoglSnippet api

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` has been deprecated since version 1.16 and should not be used in newly-written code. Use CoglSnippet api

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);

### Warning

`cogl_program_ref` has been deprecated since version 1.16 and should not be used in newly-written code. Use CoglSnippet api

Add an extra reference to a program.

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

### cogl_program_unref ()

    void                cogl_program_unref                  ();

### Warning

`cogl_program_unref` has been deprecated since version 1.16 and should not be used in newly-written code. Use CoglSnippet api

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);

### Warning

`cogl_program_use` has been deprecated since version 1.16 and should not be used in newly-written code. Use CoglSnippet api

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.

This function affects the global state of the current Cogl context. It is much more efficient to attach the shader to a specific material used for rendering instead by calling `cogl_material_set_user_program()`.

`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.16 and should not be used in newly-written code. Use CoglSnippet api

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.16 and should not be used in newly-written code. Use CoglSnippet api

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.16 and should not be used in newly-written code. Use CoglSnippet api

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` has been deprecated since version 1.16 and should not be used in newly-written code. Use CoglSnippet api

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,
                                                             CoglBool transpose,
                                                             const float *value);

### Warning

`cogl_program_uniform_matrix` has been deprecated since version 1.16 and should not be used in newly-written code. Use CoglSnippet api

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]