---
title: makeCurrentContext()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nsopenglcontext/makecurrentcontext()
---

# makeCurrentContext()

Sets the context as the current OpenGL context object.

## Declaration

```swift
func makeCurrentContext()
```

## Discussion

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.

## See Also

### Managing the Current Context

- [clearCurrentContext()](appkit/nsopenglcontext/clearcurrentcontext().md)
- [current](appkit/nsopenglcontext/current.md)
