<!--
{
  "availability" : [
    "macOS: 10.0.0 - 10.14.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSOpenGLContext/Parameter",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@E@NSOpenGLContextParameter"
  },
  "title" : "NSOpenGLContext.Parameter"
}
-->

# NSOpenGLContext.Parameter

Constants that specify context parameters.

```
enum Parameter
```

## Overview

These attribute names are used by [`setValues(_:for:)`](/documentation/AppKit/NSOpenGLContext/setValues(_:for:)) and [`getValues(_:for:)`](/documentation/AppKit/NSOpenGLContext/getValues(_:for:)).

## Topics

### Parameters

[`NSOpenGLContext.Parameter.swapInterval`](/documentation/AppKit/NSOpenGLContext/Parameter/swapInterval)

Set or get the swap interval.

[`NSOpenGLContext.Parameter.surfaceOrder`](/documentation/AppKit/NSOpenGLContext/Parameter/surfaceOrder)

Set or get the surface order.

[`NSOpenGLContext.Parameter.surfaceOpacity`](/documentation/AppKit/NSOpenGLContext/Parameter/surfaceOpacity)

Set or get the surface opacity.

[`NSOpenGLContext.Parameter.surfaceBackingSize`](/documentation/AppKit/NSOpenGLContext/Parameter/surfaceBackingSize)

Set or get the height and width of the back buffer.

[`NSOpenGLContext.Parameter.reclaimResources`](/documentation/AppKit/NSOpenGLContext/Parameter/reclaimResources)

Enable or disable reclaiming resources.

[`NSOpenGLContext.Parameter.currentRendererID`](/documentation/AppKit/NSOpenGLContext/Parameter/currentRendererID)

Get the current renderer ID.

[`NSOpenGLContext.Parameter.gpuVertexProcessing`](/documentation/AppKit/NSOpenGLContext/Parameter/gpuVertexProcessing)

Get whether the CPU is currently processing vertices with the GPU.

[`NSOpenGLContext.Parameter.gpuFragmentProcessing`](/documentation/AppKit/NSOpenGLContext/Parameter/gpuFragmentProcessing)

Get whether the CPU is currently processing fragments with the GPU.

[`NSOpenGLContext.Parameter.hasDrawable`](/documentation/AppKit/NSOpenGLContext/Parameter/hasDrawable)

Returns a Boolean that indicates whether a drawable is attached to the context.

[`NSOpenGLContext.Parameter.mpSwapsInFlight`](/documentation/AppKit/NSOpenGLContext/Parameter/mpSwapsInFlight)

The number of frames that the multithreaded OpenGL engine can process before stalling.

[`NSOpenGLContext.Parameter.swapRectangle`](/documentation/AppKit/NSOpenGLContext/Parameter/swapRectangle)

Sets or gets the swap rectangle.

[`NSOpenGLContext.Parameter.swapRectangleEnable`](/documentation/AppKit/NSOpenGLContext/Parameter/swapRectangleEnable)

Enables or disables the swap rectangle in the context’s drawable object.

[`NSOpenGLContext.Parameter.rasterizationEnable`](/documentation/AppKit/NSOpenGLContext/Parameter/rasterizationEnable)

If disabled, all rasterization of 2D and 3D primitives is disabled.

[`NSOpenGLContext.Parameter.stateValidation`](/documentation/AppKit/NSOpenGLContext/Parameter/stateValidation)

If enabled, OpenGL inspects the context state each time the update method is called to ensure that it is in an appropriate state for switching between renderers.

[`NSOpenGLContext.Parameter.surfaceSurfaceVolatile`](/documentation/AppKit/NSOpenGLContext/Parameter/surfaceSurfaceVolatile)

### Deprecated

[`NSOpenGLCPSwapInterval`](/documentation/AppKit/NSOpenGLCPSwapInterval)

Sets or gets the swap interval.

[`NSOpenGLCPSurfaceOrder`](/documentation/AppKit/NSOpenGLCPSurfaceOrder)

Get or set the surface order.

[`NSOpenGLCPSurfaceOpacity`](/documentation/AppKit/NSOpenGLCPSurfaceOpacity)

Set or get the surface opacity.

[`NSOpenGLCPSurfaceBackingSize`](/documentation/AppKit/NSOpenGLCPSurfaceBackingSize)

Set or get the height and width of the back buffer. You can use this to let the system scale an image automatically on swapping to a variable-size buffer. The back buffer size remains fixed at the size that you set up regardless of whether the image is resized to display larger onscreen.

[`NSOpenGLCPReclaimResources`](/documentation/AppKit/NSOpenGLCPReclaimResources)

Enable or disable reclaiming resources.

[`NSOpenGLCPCurrentRendererID`](/documentation/AppKit/NSOpenGLCPCurrentRendererID)

The current renderer ID. You can get this setting.

[`NSOpenGLCPGPUVertexProcessing`](/documentation/AppKit/NSOpenGLCPGPUVertexProcessing)

The CPU is currently processing vertices with the GPU. You can get this state.

[`NSOpenGLCPGPUFragmentProcessing`](/documentation/AppKit/NSOpenGLCPGPUFragmentProcessing)

The CPU is currently processing fragments with the GPU. You can get this state.

[`NSOpenGLCPHasDrawable`](/documentation/AppKit/NSOpenGLCPHasDrawable)

Returns a Boolean that indicates whether a drawable is attached to the context.

[`NSOpenGLCPMPSwapsInFlight`](/documentation/AppKit/NSOpenGLCPMPSwapsInFlight)

The number of frames that the multithreaded OpenGL engine can process before stalling. The default value is 1. New frames are queued when the application calls the [`flushBuffer()`](/documentation/AppKit/NSOpenGLContext/flushBuffer()) method. A larger number may improve overall performance, but adds latency between when a frame is rendered and when a frame is displayed. Interactive applications should leave this value at the default.

[`NSOpenGLCPSwapRectangle`](/documentation/AppKit/NSOpenGLCPSwapRectangle)

Sets or gets the swap rectangle.

[`NSOpenGLCPSwapRectangleEnable`](/documentation/AppKit/NSOpenGLCPSwapRectangleEnable)

Enables or disables the swap rectangle in the context’s drawable object.

[`NSOpenGLCPRasterizationEnable`](/documentation/AppKit/NSOpenGLCPRasterizationEnable)

If disabled, all rasterization of 2D and 3D primitives is disabled.

[`NSOpenGLCPStateValidation`](/documentation/AppKit/NSOpenGLCPStateValidation)

If enabled, OpenGL inspects the context state each time the [`update()`](/documentation/AppKit/NSOpenGLContext/update()) method is called to ensure that it is in an appropriate state for switching between renderers.

[`NSOpenGLCPSurfaceSurfaceVolatile`](/documentation/AppKit/NSOpenGLCPSurfaceSurfaceVolatile)



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)