Cogl.Display.setup

### Method

# Cogl Displaysetup

#### Declaration [src]

    gboolean
    cogl_display_setup (
      CoglDisplay* display
      GError** error
    )

#### Description [src]

Explicitly sets up the given `display` object. Use of this api is optional since Cogl will internally setup the display if not done explicitly.

When a display is first allocated via `cogl_display_new()` it is in a mutable configuration mode. This allows us to extend the apis available for configuring a display without requiring huge numbers of constructor arguments.

Its possible to request a configuration that might not be supportable on the current system and so this api provides a means to apply the configuration explicitly but if it fails then an exception will be returned so you can handle the error gracefully and perhaps fall back to an alternative configuration.

If you instead rely on Cogl implicitly calling `cogl_display_setup()` for you then if there is an error with the configuration you won’t get an opportunity to handle that and the application may abort with a message. For simple applications that don’t have any fallback options this behaviour may be fine.

#### Return value

Type: `gboolean`

Returns `TRUE` if there was no error, else it returns `FALSE` and returns an exception via `error`.