Instantiates a new (unconnected) Renderer object.
A Renderer 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 or WGL.
While the renderer is unconnected it can be configured so that applications may specify backend constraints, such as "must use x11" for example via add_constraint.
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 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 Display 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 Display using Display.
<note>Many applications don't need to explicitly use Renderer or Display and can just jump straight to Context and pass a null display argument so Cogl will automatically connect and setup a renderer and display.</note>
A newly created Renderer. |