Instance Property

openGLContext

The layer’s NSOpenGLContext.

Declaration

var openGLContext: NSOpenGLContext? { get set }

Discussion

Provides access to the layer's associated NSOpenGLContext. Subclasses shouldn't invoke setOpenGLContext:, but can override it if desired to intercept assignment of the layer's context.

See Also

Managing the Rendering Context

func openGLContext(for: NSOpenGLPixelFormat) -> NSOpenGLContext

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

Deprecated