---
title: "init(cglContext:options:)"
framework: quartzcore
role: symbol
role_heading: Initializer
path: "quartzcore/carenderer/init(cglcontext:options:)-1l3m2"
---

# init(cglContext:options:)

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

## Declaration

```swift
init(cglContext ctx: UnsafeMutableRawPointer, options dict: [AnyHashable : Any]? = nil)
```

## Parameters

- `ctx`: A Core OpenGL render context that is used as the render target.
- `dict`: A dictionary of optional parameters.

## Return Value

Return Value A new instance of CARenderer that will use ctx as the render target.

## See Also

### Creating a Renderer

- [init(mtlTexture:options:)](quartzcore/carenderer/init(mtltexture:options:)-1cr0b.md)
