---
title: "init(context:options:)"
framework: scenekit
role: symbol
role_heading: Initializer
path: "scenekit/scnrenderer/init(context:options:)"
---

# init(context:options:)

Creates a renderer with the specified OpenGL context.

## Declaration

```swift
convenience init(context: EAGLContext?, options: [AnyHashable : Any]? = nil)
```

```swift
convenience init(context: CGLContextObj?, options: [AnyHashable : Any]? = nil)
```

## Parameters

- `context`: An OpenGL rendering context: either a doc://com.apple.documentation/documentation/AppKit/NSOpenGLContext/cglContextObj reference (in macOS) or an doc://com.apple.documentation/documentation/OpenGLES/EAGLContext object (in iOS).
- `options`: An optional dictionary for future extensions.

## Return Value

Return Value A new renderer object.

## Discussion

Discussion Use this initializer to create a SceneKit renderer that draws into OpenGL context your app already uses to draw other content. To tell SceneKit to render your content, call the SCNRenderer or SCNRenderer method.

## See Also

### Creating a Renderer

- [init(device:options:)](scenekit/scnrenderer/init(device:options:).md)
