CAOpenGLLayer provides a layer suitable for rendering OpenGL content.


To provide OpenGL content you subclass CAOpenGLLayer and override draw(inCGLContext:pixelFormat:forLayerTime:displayTime:). You can specify that the OpenGL content is static by setting the isAsynchronous property to false.


Managing the pixel format

func copyCGLPixelFormat(forDisplayMask: UInt32)

Returns the OpenGL pixel format suitable for rendering to the set of displays specified by the display mask.

func releaseCGLPixelFormat(CGLPixelFormatObj)

Releases the specified OpenGL pixel format object.

Managing the rendering context

func copyCGLContext(forPixelFormat: CGLPixelFormatObj)

Returns the rendering context the receiver requires for the specified pixel format.

func releaseCGLContext(CGLContextObj)

Releases the specified rendering context.


Inherits From

Conforms To