Class

NSOpenGLLayer

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

Overview

Unlike CAOpenGLLayer, NSOpenGLLayer uses AppKit types.

Topics

Managing the Pixel Format

var openGLPixelFormat: NSOpenGLPixelFormat?

Provides access to the layer's associated NSOpenGLPixelFormat.

func openGLPixelFormat(forDisplayMask: UInt32)

Returns the OpenGL pixel format suitable for the specified displays.

Managing the Rendering Context

var openGLContext: NSOpenGLContext?

The layer’s NSOpenGLContext.

func openGLContext(for: NSOpenGLPixelFormat)

Returns the OpenGL context to use for the requested pixel format.

Accessing the Associated View

var view: NSView?

Returns the view associated with the layer.

Relationships

Inherits From

See Also

OpenGL

class NSOpenGLContext

An object that represents an OpenGL graphics context, into which all OpenGL calls are rendered.

class NSOpenGLPixelFormat

An object that specifies the types of buffers and other attributes of the NSOpenGLContext.