<!--
{
  "availability" : [
    "macOS: 10.0.0 - 10.14.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSOpenGLContext/makeCurrentContext()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSOpenGLContext(im)makeCurrentContext"
  },
  "title" : "makeCurrentContext()"
}
-->

# makeCurrentContext()

Sets the context as the current OpenGL context object.

```
func makeCurrentContext()
```

## Discussion

Subsequent OpenGL calls are rendered into the context defined by the receiver.

> Note:
> A context is current on a per-thread basis. Multiple threads must serialize calls into the same context object.

---

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)