Class

CARenderer

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

Declaration

@interface CARenderer : NSObject

Overview

For real-time output you should use an instance of NSView to host the layer-tree.

Topics

Creating a Renderer

+ rendererWithCGLContext:options:

Creates and returns a CARenderer instance with the render target specified by the Core OpenGL context.

Deprecated
+ rendererWithMTLTexture:options:

Creates a layer renderer from a Metal texture.

Getting the Rendered Layer

layer

The root layer of the layer-tree the receiver should render.

Determining Layer Bounds

bounds

The bounds of the receiver.

Rendering a Frame

- beginFrameAtTime:timeStamp:

Begin rendering a frame at the specified time.

- updateBounds

Returns the bounds of the update region that contains all pixels that will be rendered by the current frame.

- addUpdateRect:

Adds the rectangle to the update region of the current frame.

- render

Render the update region of the current frame to the target context.

- nextFrameTime

Returns the time at which the next update should happen.

- endFrame

Release any data associated with the current frame.

Instance Methods

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.

CAOpenGLLayer

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

Deprecated