Class

NSOpenGLLayer

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

Declaration

class NSOpenGLLayer : CAOpenGLLayer

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) -> NSOpenGLPixelFormat

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) -> NSOpenGLContext

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

Conforms To

See Also

OpenGL

class NSOpenGLContext

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

Deprecated
class NSOpenGLPixelFormat

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

Deprecated
enum NSOpenGLGlobalOption

These constants are option names for NSOpenGLSetOption(_:_:) and NSOpenGLGetOption(_:_:).

Deprecated