Class

NSOpenGLPixelFormat

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

Overview

To render with OpenGL into an NSOpenGLContext, you must specify the context’s pixel format. The NSOpenGLPixelFormat class is similar to the AGLPixelFormat type.

Every NSOpenGLPixelFormat object wraps a low-level, platform-specific Core OpenGL (CGL) pixel format object. Your application can retrieve the CGL pixel format object by calling the cglPixelFormatObj method. For more information on the underling CGL pixel format object, see CGL.

Topics

Creating an NSOpenGLPixelFormat Object

init?(cglPixelFormatObj: OpaquePointer)

Returns an NSOpenGLPixelFormatobject initialized with using an existing CGL pixel format object.

init?(attributes: UnsafePointer<NSOpenGLPixelFormatAttribute>)

Returns an NSOpenGLPixelFormat object initialized with specified pixel format attributes.

Managing the Pixel Format

var cglPixelFormatObj: OpaquePointer?

Returns the low-level, platform-specific Core OpenGL (CGL) pixel format object represented by the receiver.

var numberOfVirtualScreens: GLint

Returns the number of virtual screens associated with the receiver.

Constants

OpenGL Profiles

Defines constants that specify the functionality provided by the renderer.

Relationships

Inherits From

See Also

OpenGL

class NSOpenGLContext

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

class NSOpenGLLayer

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