Cogl.Display.new
Description: Reference for Cogl.Display.new

### Constructor

# Cogl Displaynew

#### Declaration [src]

    CoglDisplay*
    cogl_display_new (
      CoglRenderer* renderer
    )

#### Description [src]

Explicitly allocates a new `CoglDisplay` object to encapsulate the common state of the display pipeline that applies to the whole application.

A `display` can only be made for a specific choice of renderer which is why this takes the `renderer` argument.

When a display is first allocated via `cogl_display_new()` it is in a mutable configuration mode. It’s designed this way so we can extend the apis available for configuring a display without requiring huge numbers of constructor arguments.

When you have finished configuring a display object you can optionally call `cogl_display_setup()` to explicitly apply the configuration and check for errors. Alternaitvely you can pass the display to `cogl_context_new()` and Cogl will implicitly apply your configuration but if there are errors then the application will abort with a message. For simple applications with no fallback options then relying on the implicit setup can be fine.

#### Parameters

`renderer`

  Type: `CoglRenderer`

  A `CoglRenderer`.

  The data is owned by the caller of the function.

#### Return value

Type: `CoglDisplay`

A newly allocated `CoglDisplay` object in a mutable configuration mode.

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