---
title: NSOpenGLCPSwapRectangleEnable
framework: appkit
role: symbol
role_heading: Global Variable
path: appkit/nsopenglcpswaprectangleenable
---

# NSOpenGLCPSwapRectangleEnable

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

## Declaration

```occ
static const NSOpenGLContextParameter NSOpenGLCPSwapRectangleEnable;
```

## Discussion

Discussion If enabled, the area that is affected by the flushBuffer() method is restricted to a rectangle specified by the values of NSOpenGLCPSwapRectangle. However, the portion of the drawable object that lies outside of the swap rectangle may still be flushed to the screen by a visibility change or other user interface action.

## See Also

### Deprecated

- [NSOpenGLCPSwapInterval](appkit/nsopenglcpswapinterval.md)
- [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)
- [NSOpenGLCPRasterizationEnable](appkit/nsopenglcprasterizationenable.md)
- [NSOpenGLCPStateValidation](appkit/nsopenglcpstatevalidation.md)
- [NSOpenGLCPSurfaceSurfaceVolatile](appkit/nsopenglcpsurfacesurfacevolatile.md)
