## Materials (Deprecated) Materials (Deprecated) |

## Functions

CoglHandle | cogl_material_ref ()
void | cogl_material_unref ()
const GList * | cogl_material_get_layers ()

## Description

## Functions

### cogl_material_ref ()

    CoglHandle
    cogl_material_ref (CoglHandle material);

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

#### Parameters

material | a CoglMaterial object. |

#### Returns

the `material` .

Since: 1.0

### cogl_material_unref ()

    void
    cogl_material_unref (CoglHandle material);

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

#### Parameters

material | a CoglMaterial object. |

Since: 1.0

### cogl_material_get_layers ()

    const GList *
    cogl_material_get_layers (CoglMaterial *material);

`cogl_material_get_layers` has been deprecated since version 1.16 and should not be used in newly-written code.

Use `cogl_pipeline_get_layers()` instead

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

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

#### Parameters

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]

## Types and Values