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

# NSOpenGLGlobalOption

Constants that specify OpenGL options.

```
enum NSOpenGLGlobalOption
```

## Overview

These constants are option names for [`NSOpenGLSetOption`](/documentation/AppKit/NSOpenGLSetOption) and [`NSOpenGLGetOption`](/documentation/AppKit/NSOpenGLGetOption).

## Topics

### Constants

[`NSOpenGLGOFormatCacheSize`](/documentation/AppKit/NSOpenGLGlobalOption/formatCacheSize)

Sets the size of the pixel format cache.

[`NSOpenGLGOClearFormatCache`](/documentation/AppKit/NSOpenGLGlobalOption/clearFormatCache)

Resets the pixel format cache if true.

[`NSOpenGLGORetainRenderers`](/documentation/AppKit/NSOpenGLGlobalOption/retainRenderers)

Whether to retain loaded renderers in memory.

[`NSOpenGLGOUseBuildCache`](/documentation/AppKit/NSOpenGLGlobalOption/useBuildCache)

Whether to enable the function compilation block cache. This is off by default. It must be enabled at startup.

### Deprecated

[`globalValue`](/documentation/AppKit/NSOpenGLGlobalOption/globalValue)

[`NSOpenGLGOResetLibrary`](/documentation/AppKit/NSOpenGLGlobalOption/NSOpenGLGOResetLibrary)

Does a soft reset of the CGL library if true.

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Hashable`](/documentation/Swift/Hashable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`Sendable`](/documentation/Swift/Sendable)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

---

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)