To render with OpenGL into an NSOpen​GLContext, you must specify the context’s pixel format. An NSOpen​GLPixel​Format object specifies the types of buffers and other attributes of the NSOpen​GLContext. This class is similar to the AGLPixel​Format type, which is used in Carbon OpenGL applications.


Every NSOpen​GLPixel​Format 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 cgl​Pixel​Format​Obj method. For more information on the underling CGL pixel format object, see CGL.


Creating an NSOpenGLPixelFormat Object

init?(cgl​Pixel​Format​Obj:​ Opaque​Pointer)

Returns an NSOpen​GLPixel​Formatobject initialized with using an existing CGL pixel format object.

init?(attributes:​ Unsafe​Pointer<NSOpen​GLPixel​Format​Attribute>)

Returns an NSOpen​GLPixel​Format object initialized with specified pixel format attributes.

Managing the Pixel Format

var cgl​Pixel​Format​Obj:​ Opaque​Pointer?

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

var number​Of​Virtual​Screens:​ GLint

Returns the number of virtual screens associated with the receiver.


Open​GL Profiles

Defines constants that specify the functionality provided by the renderer.


Inherits From