Class

CAOpenGLLayer

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

Declaration

@interface CAOpenGLLayer : CALayer

Overview

To provide OpenGL content you subclass CAOpenGLLayer and override drawInCGLContext:pixelFormat:forLayerTime:displayTime:. You can specify that the OpenGL content is static by setting the asynchronous property to NO.

Topics

Determining Layer Properties

colorspace

The layer's colorspace in Core Graphics.

wantsExtendedDynamicRangeContent

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

Drawing Layer Content

asynchronous

Determines when the contents of the layer are updated.

- isAsynchronous

A synthesized accessor for the asynchronous property.

- canDrawInCGLContext:pixelFormat:forLayerTime:displayTime:

Returns whether the receiver should draw OpenGL content for the specified time.

- drawInCGLContext:pixelFormat:forLayerTime:displayTime:

Draws the OpenGL content for the specified time.

Managing Pixel Format

- copyCGLPixelFormatForDisplayMask:

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

- releaseCGLPixelFormat:

Releases the specified OpenGL pixel format object.

Managing the Rendering Context

- copyCGLContextForPixelFormat:

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

- releaseCGLContext:

Releases the specified rendering context.

Relationships

Inherits From

See Also

Metal and OpenGL

CAMetalLayer

A Core Animation layer that Metal can render into, typically to be displayed onscreen.

CAMetalDrawable

A Metal drawable associated with a Core Animation layer.

CAEAGLLayer

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

Deprecated
CAEDRMetadata

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

CARenderer

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