---
title: NSOpenGLCPSwapInterval
framework: appkit
role: symbol
role_heading: Global Variable
path: appkit/nsopenglcpswapinterval
---

# NSOpenGLCPSwapInterval

Sets or gets the swap interval.

## Declaration

```occ
static const NSOpenGLContextParameter NSOpenGLCPSwapInterval;
```

## Discussion

Discussion The swap interval is represented as one long. If the swap interval is set to 0 (the default), the flushBuffer() method executes as soon as possible, without regard to the vertical refresh rate of the monitor. If the swap interval is set to 1, the buffers are swapped only during the vertical retrace of the monitor.

## See Also

### Deprecated

- [NSOpenGLCPSurfaceOrder](appkit/nsopenglcpsurfaceorder.md)
- [NSOpenGLCPSurfaceOpacity](appkit/nsopenglcpsurfaceopacity.md)
- [NSOpenGLCPSurfaceBackingSize](appkit/nsopenglcpsurfacebackingsize.md)
- [NSOpenGLCPReclaimResources](appkit/nsopenglcpreclaimresources.md)
- [NSOpenGLCPCurrentRendererID](appkit/nsopenglcpcurrentrendererid.md)
- [NSOpenGLCPGPUVertexProcessing](appkit/nsopenglcpgpuvertexprocessing.md)
- [NSOpenGLCPGPUFragmentProcessing](appkit/nsopenglcpgpufragmentprocessing.md)
- [NSOpenGLCPHasDrawable](appkit/nsopenglcphasdrawable.md)
- [NSOpenGLCPMPSwapsInFlight](appkit/nsopenglcpmpswapsinflight.md)
- [NSOpenGLCPSwapRectangle](appkit/nsopenglcpswaprectangle.md)
- [NSOpenGLCPSwapRectangleEnable](appkit/nsopenglcpswaprectangleenable.md)
- [NSOpenGLCPRasterizationEnable](appkit/nsopenglcprasterizationenable.md)
- [NSOpenGLCPStateValidation](appkit/nsopenglcpstatevalidation.md)
- [NSOpenGLCPSurfaceSurfaceVolatile](appkit/nsopenglcpsurfacesurfacevolatile.md)
