<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuartzCore",
  "identifier" : "/documentation/QuartzCore/CARenderer",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core Animation"
    ],
    "preciseIdentifier" : "c:objc(cs)CARenderer"
  },
  "title" : "CARenderer"
}
-->

# CARenderer

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

```
class CARenderer
```

## Overview

For real-time output you should use an instance of <doc://com.apple.documentation/documentation/AppKit/NSView> to host the layer-tree.

## Topics

### Creating a Renderer

[`init(cglContext:options:)`](/documentation/QuartzCore/CARenderer/init(cglContext:options:)-1l3m2)

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

[`init(mtlTexture:options:)`](/documentation/QuartzCore/CARenderer/init(mtlTexture:options:)-1cr0b)

Creates a layer renderer from a Metal texture.

### Getting the Rendered Layer

[`layer`](/documentation/QuartzCore/CARenderer/layer)

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

### Determining Layer Bounds

[`bounds`](/documentation/QuartzCore/CARenderer/bounds)

The bounds of the receiver.

### Rendering a Frame

[`beginFrame(atTime:timeStamp:)`](/documentation/QuartzCore/CARenderer/beginFrame(atTime:timeStamp:))

Begin rendering a frame at the specified time.

[`updateBounds()`](/documentation/QuartzCore/CARenderer/updateBounds())

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

[`addUpdate(_:)`](/documentation/QuartzCore/CARenderer/addUpdate(_:))

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

[`render()`](/documentation/QuartzCore/CARenderer/render())

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

[`nextFrameTime()`](/documentation/QuartzCore/CARenderer/nextFrameTime())

Returns the time at which the next update should happen.

[`endFrame()`](/documentation/QuartzCore/CARenderer/endFrame())

Release any data associated with the current frame.

### Instance Methods

[`setDestination(_:)`](/documentation/QuartzCore/CARenderer/setDestination(_:))



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)