---
title: commandQueue
framework: scenekit
role: symbol
role_heading: Instance Property
path: scenekit/scnscenerenderer/commandqueue
---

# commandQueue

The Metal command queue this renderer uses for rendering.

## Declaration

```swift
var commandQueue: (any MTLCommandQueue)? { get }
```

## Discussion

Discussion Use this property to schedule additional command buffers for the Metal device to execute as part of the render cycle. For example, you can use a compute command encoder to modify the vertex data in a Metal buffer for use by a SCNGeometrySource object. note: This property is valid only for scene renderers whose renderingAPI value is SCNRenderingAPI.metal. You create a SceneKit view that renders using Metal with the preferredRenderingAPI initialization option or in Interface Builder, or an SCNRenderer that uses Metal with the init(device:options:) method. For OpenGL-based scene renderers, this property’s value is always nil.

## See Also

### Customizing Scene Rendering with Metal

- [currentRenderCommandEncoder](scenekit/scnscenerenderer/currentrendercommandencoder.md)
- [device](scenekit/scnscenerenderer/device.md)
- [colorPixelFormat](scenekit/scnscenerenderer/colorpixelformat.md)
- [depthPixelFormat](scenekit/scnscenerenderer/depthpixelformat.md)
- [stencilPixelFormat](scenekit/scnscenerenderer/stencilpixelformat.md)
