---
title: pixelFormat
framework: scenekit
role: symbol
role_heading: Instance Property
path: scenekit/scnview/pixelformat
---

# pixelFormat

The view’s OpenGL pixel format.

## Declaration

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

## Discussion

Discussion A pixel format object configures OpenGL attributes for rendering. For example, if you use OpenGL for custom rendering (see the SCNShadable, SCNNodeRendererDelegate, and 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 subclass, override this property’s getter method to return your preferred pixel format.

## See Also

### Working with a View’s OpenGL Context

- [openGLContext](scenekit/scnview/openglcontext.md)
