setup


Description:

public Bool setup () throws Error

Explicitly sets up the given this 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 Display 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 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.

Parameters:

this

a Display

Returns:

Returns true if there was no error, else it returns false and returns an exception via throws.