### Method

# Cogl Pipeline copy

#### Declaration [src]

    CoglPipeline*
    cogl_pipeline_copy (
      CoglPipeline* source
    )

#### Description [src]

Creates a new pipeline with the configuration copied from the source pipeline.

We would strongly advise developers to always aim to use `cogl_pipeline_copy()` instead of `cogl_pipeline_new()` whenever there will be any similarity between two pipelines. Copying a pipeline helps Cogl keep track of a pipelines ancestry which we may use to help minimize GPU state changes.

#### Return value

Type: `CoglPipeline`

A pointer to the newly allocated `CoglPipeline`.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.