---
title: openGLPixelFormat
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsopengllayer/openglpixelformat
---

# openGLPixelFormat

Provides access to the layer’s associated OpenGL pixel format.

## Declaration

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

## Discussion

Discussion Subclasses shouldn’t invoke setOpenGLPixelFormat:, but can override it if desired to intercept assignment of the layer’s pixel format.

## See Also

### Managing the Pixel Format

- [openGLPixelFormat(forDisplayMask:)](appkit/nsopengllayer/openglpixelformat(fordisplaymask:).md)
