### Constructor

# Cogl Renderer new

#### Declaration [src]

    CoglRenderer*
    cogl_renderer_new (
      void
    )

#### Description [src]

Instantiates a new (unconnected) `CoglRenderer` object. A `CoglRenderer` represents a means to render. It encapsulates the selection of an underlying driver, such as OpenGL or OpenGL-ES and a selection of a window system binding API such as GLX or EGL.

There are also some platform specific configuration apis such as `cogl_xlib_renderer_set_foreign_display()` that may also be used while the renderer is unconnected.

Once the renderer has been configured, then it may (optionally) be explicitly connected using `cogl_renderer_connect()` which allows errors to be handled gracefully and potentially fallback configurations can be tried out if there are initial failures.

If a renderer is not explicitly connected then `cogl_display_new()` will automatically connect the renderer for you. If you don’t have any code to deal with error/fallback situations then its fine to just let Cogl do the connection for you.

Once you have setup your renderer then the next step is to create a `CoglDisplay` using cogl_display_new().

#### Return value

Type: `CoglRenderer`

A newly created `CoglRenderer`.

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