All OpenGL calls are rendered into an OpenGL graphics context, which in Cocoa is represented by the
NSOpenGLContext class. The context is created using an
NSOpenGLPixelFormatobject that specifies the context’s buffer types and other attributes. A context can be full-screen, offscreen, or associated with an
NSView object. A context draws into its drawable object, which is the frame buffer that is the target of OpenGL drawing operations.
- macOS 10.0+
NSOpenGLContext object wraps a low-level, platform-specific Core OpenGL (CGL) context. Your application can retrieve the CGL context by calling the
cglContextObj method. For more information on the underling CGL context, see CGL.