Both AGL (Apple Graphics Library) and the Cocoa (API) (or AppKit) have interfaces to OpenGL and are logical software layers and depend on CGL for their behavior.
Configuration of these surfaces is done through a pixel format selection process where different compatible layers of rendering information are combined to form a framebuffer.
CGLChoosePixelFormat will, based on input parameters and their scoring policy, choose a pixel format that represents a compatible buffer configuration that is supported by the underlying renderer that will be used to process graphics commands.
On Mac OS X, CGL is also responsible for handling the heterogeneous nature of graphics device installations and configuration on Macintosh systems.
When users configure their Macintosh to use a virtualized desktop, and they drag windows from one display to another, CGL handles the management of OpenGL graphics state that must be shadowed between devices to provide command processing consistency between them.
The software renderer, though slow, is fast enough for basic applications and kept feature-complete Archived January 8, 2014, at the Wayback Machine with OS X's OpenGL implementation for development purposes.