<!--
{
  "availability" : [
    "iOS: 8.0.0 - 26.0.0",
    "iPadOS: 8.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.8.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0",
    "watchOS: 3.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SceneKit",
  "identifier" : "/documentation/SceneKit/SCNView/pixelFormat",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNView(py)pixelFormat"
  },
  "title" : "pixelFormat"
}
-->

# pixelFormat

The view’s OpenGL pixel format.

```
var pixelFormat: NSOpenGLPixelFormat? { get set }
```

## Discussion

A pixel format object configures OpenGL attributes for rendering. For example, if you use OpenGL for custom rendering (see the [`SCNShadable`](/documentation/SceneKit/SCNShadable), [`SCNNodeRendererDelegate`](/documentation/SceneKit/SCNNodeRendererDelegate), and [`SCNSceneRendererDelegate`](/documentation/SceneKit/SCNSceneRendererDelegate) protocols), setting the pixel format to one that specifies the OpenGL 3.2 Core Profile allows you to use modern OpenGL APIs in your custom rendering code.

To change the pixel format, you can do either of the following:

- Set this property’s value before providing a scene for the view to render.
- In an [`SCNView`](/documentation/SceneKit/SCNView) subclass, override this property’s getter method to return your preferred pixel format.

---

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)