Class

CAOpenGLLayer

A layer that provides a layer suitable for rendering OpenGL content.

Declaration

class CAOpenGLLayer : CALayer

Overview

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.

Topics

Determining Layer Properties

var colorspace: CGColorSpace?

The layer's colorspace in Core Graphics.

var wantsExtendedDynamicRangeContent: Bool

Tells whether or not the layer supports content with extended dynamic range.

Managing Pixel Format

func copyCGLPixelFormat(forDisplayMask: UInt32) -> CGLPixelFormatObj

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) -> CGLContextObj

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

func releaseCGLContext(CGLContextObj)

Releases the specified rendering context.

Relationships

Inherits From

Conforms To

See Also

Metal and OpenGL

class CAMetalLayer

A layer that manages a pool of Metal drawables.

protocol CAMetalDrawable

A displayable resource that can be rendered or written to by Metal.

class CAEAGLLayer

A layer that supports drawing OpenGL content in iOS and tvOS applications.

Deprecated
class CAEDRMetadata

Metadata describing how extended dynamic range (EDR) values should be tone mapped.

class CARenderer

A layer that allows an application to render a layer tree into a Core OpenGL context.