## Materials (Deprecated)

Materials (Deprecated)

## Synopsis

    CoglHandle          cogl_material_ref                   (CoglHandle handle);
    void                cogl_material_unref                 (CoglHandle handle);
    const GList *       cogl_material_get_layers            (CoglMaterial *material);

## Description

## Details

### cogl_material_ref ()

    CoglHandle          cogl_material_ref                   (CoglHandle handle);

### Warning

`cogl_material_ref` has been deprecated since version 1.2 and should not be used in newly-written code. Use `cogl_object_ref()` instead

Increment the reference count for a CoglMaterial.

`material` : | a CoglMaterial object.
Returns : | the `material`.

Since 1.0

### cogl_material_unref ()

    void                cogl_material_unref                 (CoglHandle handle);

### Warning

`cogl_material_unref` has been deprecated since version 1.2 and should not be used in newly-written code. Use `cogl_object_unref()` instead

Decrement the reference count for a CoglMaterial.

`material` : | a CoglMaterial object.

Since 1.0

### cogl_material_get_layers ()

    const GList *       cogl_material_get_layers            (CoglMaterial *material);

This function lets you access a material's internal list of layers for iteration.

### Note

You should avoid using this API if possible since it was only made public by mistake and will be deprecated when we have suitable alternative.

### Note

It's important to understand that the list returned may not remain valid if you modify the material or any of the layers in any way and so you would have to re-get the list in that situation.

`material` : | A CoglMaterial object
Returns : | A list of CoglMaterialLayer's that can be passed to the cogl_material_layer_* functions. The list is owned by Cogl and it should not be modified or freed. [element-type CoglMaterialLayer][transfer none]