<!--
{
  "availability" : [
    "macOS: 10.4.0 - 10.15.0"
  ],
  "documentType" : "symbol",
  "framework" : "Quartz",
  "identifier" : "/documentation/Quartz/QCRenderer/init(offScreenWith:colorSpace:composition:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Quartz"
    ],
    "preciseIdentifier" : "c:objc(cs)QCRenderer(im)initOffScreenWithSize:colorSpace:composition:"
  },
  "title" : "init(offScreenWith:colorSpace:composition:)"
}
-->

# init(offScreenWith:colorSpace:composition:)

Creates an offscreen renderer of a given size with the provided color space and composition object.

```
init!(offScreenWith size: NSSize, colorSpace: CGColorSpace!, composition: QCComposition!)
```

## Parameters

`size`

The size of the offscreen renderer.

`colorSpace`

A Quartz color space object. This must be an RGB color space. Pass `NULL` to use the default RGB color space. For more information on Quartz color spaces, see [Quartz 2D Programming Guide](https://developer.apple.com/library/archive/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/Introduction/Introduction.html#//apple_ref/doc/uid/TP30001066).

`composition`

A [`QCComposition`](/documentation/Quartz/QCComposition) object.

## Return Value

The initialized `QCRenderer` object or `nil` if initialization is not successful.

## Discussion

This method creates an internal OpenGL context and pixel buffer. Because offscreen rendering is performed on the GPU, the maximum rendering size is limited to the GPU capacity. On typical hardware, the limit is at least 2048 by 2048, but is often 4096 by 4096. The available VRAM affects performance.

---

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)