---
title: SKRenderer
framework: spritekit
role: symbol
role_heading: Class
path: spritekit/skrenderer
---

# SKRenderer

An object that renders a scene into a custom Metal rendering pipeline and drives the scene update cycle.

## Declaration

```swift
class SKRenderer
```

## Mentioned in

Choosing a SpriteKit Scene Renderer

## Overview

Overview SKRenderer allows an app to mix SpriteKit and Metal content by rendering an SKScene into a Metal command buffer. The reasons an app may do this instead of displaying a scene in SKView are: Apps that are built in Metal can mix in SpriteKit content. While it’s possible to add SKView as a subview to a Metal view, plugging SKRenderer into their Metal pipeline allows layering SpriteKit content at a specific z-position. You might be writing a SpriteKit app and decide later to take full control over some portion of renderering by implementing it with Metal, yet continue to use SpriteKit for the rest of the app. For example, you might write the environmental effects layer of your app that does fog, clouds, and rain, with custom Metal shaders, and continue to layer content below and above that with SpriteKit.

## Topics

### First Steps

- [init(device:)](spritekit/skrenderer/init(device:).md)
- [scene](spritekit/skrenderer/scene.md)

### Rendering the Scene

- [render(withViewport:commandBuffer:renderPassDescriptor:)](spritekit/skrenderer/render(withviewport:commandbuffer:renderpassdescriptor:).md)
- [render(withViewport:renderCommandEncoder:renderPassDescriptor:commandQueue:)](spritekit/skrenderer/render(withviewport:rendercommandencoder:renderpassdescriptor:commandqueue:).md)

### Driving the Scene’s Update Cycle

- [update(atTime:)](spritekit/skrenderer/update(attime:).md)

### Configuring Performance Related Toggles

- [ignoresSiblingOrder](spritekit/skrenderer/ignoressiblingorder.md)
- [shouldCullNonVisibleNodes](spritekit/skrenderer/shouldcullnonvisiblenodes.md)

### Enabling Visual Statistics for Debugging

- [showsNodeCount](spritekit/skrenderer/showsnodecount.md)
- [showsDrawCount](spritekit/skrenderer/showsdrawcount.md)
- [showsQuadCount](spritekit/skrenderer/showsquadcount.md)
- [showsPhysics](spritekit/skrenderer/showsphysics.md)
- [showsFields](spritekit/skrenderer/showsfields.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Scene Renderers

- [Choosing a SpriteKit Scene Renderer](spritekit/choosing-a-spritekit-scene-renderer.md)
- [SKView](spritekit/skview.md)
- [WKInterfaceSKScene](watchkit/wkinterfaceskscene.md)
