---
title: CAOpenGLLayer
framework: quartzcore
role: symbol
role_heading: Class
path: quartzcore/caopengllayer
---

# CAOpenGLLayer

A layer that provides a layer suitable for rendering OpenGL content.

## Declaration

```swift
class CAOpenGLLayer
```

## Overview

Overview To provide OpenGL content you subclass CAOpenGLLayer and override draw(inCGLContext:pixelFormat:forLayerTime:displayTime:). You can specify that the OpenGL content is static by setting the isAsynchronous property to false.

## Topics

### Determining Layer Properties

- [colorspace](quartzcore/caopengllayer/colorspace.md)
- [wantsExtendedDynamicRangeContent](quartzcore/caopengllayer/wantsextendeddynamicrangecontent.md)

### Drawing Layer Content

- [isAsynchronous](quartzcore/caopengllayer/isasynchronous.md)
- [canDraw(inCGLContext:pixelFormat:forLayerTime:displayTime:)](quartzcore/caopengllayer/candraw(incglcontext:pixelformat:forlayertime:displaytime:).md)
- [draw(inCGLContext:pixelFormat:forLayerTime:displayTime:)](quartzcore/caopengllayer/draw(incglcontext:pixelformat:forlayertime:displaytime:).md)

### Managing Pixel Format

- [copyCGLPixelFormat(forDisplayMask:)](quartzcore/caopengllayer/copycglpixelformat(fordisplaymask:).md)
- [releaseCGLPixelFormat(_:)](quartzcore/caopengllayer/releasecglpixelformat(_:).md)

### Managing the Rendering Context

- [copyCGLContext(forPixelFormat:)](quartzcore/caopengllayer/copycglcontext(forpixelformat:).md)
- [releaseCGLContext(_:)](quartzcore/caopengllayer/releasecglcontext(_:).md)

## Relationships

### Inherits From

- [CALayer](quartzcore/calayer.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

### Metal and OpenGL

- [CAMetalLayer](quartzcore/cametallayer.md)
- [CAMetalDrawable](quartzcore/cametaldrawable.md)
- [CAEAGLLayer](quartzcore/caeagllayer.md)
- [CAEDRMetadata](quartzcore/caedrmetadata.md)
- [CARenderer](quartzcore/carenderer.md)
