---
title: NSOpenGLLayer
framework: appkit
role: symbol
role_heading: Class
path: appkit/nsopengllayer
---

# NSOpenGLLayer

A subclass of CAOpenGLLayer that is suitable for rendering OpenGL into layers.

## Declaration

```swift
class NSOpenGLLayer
```

## Overview

Overview Unlike CAOpenGLLayer, NSOpenGLLayer uses AppKit types.

## Topics

### Drawing the Content

- [canDraw(in:pixelFormat:forLayerTime:displayTime:)](appkit/nsopengllayer/candraw(in:pixelformat:forlayertime:displaytime:).md)
- [draw(in:pixelFormat:forLayerTime:displayTime:)](appkit/nsopengllayer/draw(in:pixelformat:forlayertime:displaytime:).md)

### Managing the Pixel Format

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

### Managing the Rendering Context

- [openGLContext](appkit/nsopengllayer/openglcontext.md)
- [openGLContext(for:)](appkit/nsopengllayer/openglcontext(for:).md)

### Accessing the Associated View

- [view](appkit/nsopengllayer/view.md)

## Relationships

### Inherits From

- [CAOpenGLLayer](quartzcore/caopengllayer.md)

### Conforms To

- [CAMediaTiming](quartzcore/camediatiming.md)
- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Classes

- [NSOpenGLView](appkit/nsopenglview.md)
- [NSOpenGLContext](appkit/nsopenglcontext.md)
- [NSOpenGLPixelFormat](appkit/nsopenglpixelformat.md)
- [NSDrawer](appkit/nsdrawer.md)
- [NSForm](appkit/nsform.md)
- [NSFormCell](appkit/nsformcell.md)
- [NSMenuItemCell](appkit/nsmenuitemcell.md)
