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

# NSOpenGLSetOption

Sets global OpenGL options.

```
extern void NSOpenGLSetOption(NSOpenGLGlobalOption pname, GLint param);
```

## Discussion

Sets the value of the global OpenGL parameter `pname` to `param`. The available options are enumerated by the [`NSOpenGLGlobalOption`](/documentation/AppKit/NSOpenGLGlobalOption) type.

---

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)