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

# update()

Updates the OpenGL context’s drawable object.

## Declaration

```swift
@MainActor func update()
```

## Discussion

Discussion Call this method whenever the receiver’s drawable object changes size or location. A multithreaded application must synchronize all threads that access the same drawable object and call update() for each thread’s context serially.

## See Also

### Managing the Drawable Object

- [view](appkit/nsopenglcontext/view.md)
- [clearDrawable()](appkit/nsopenglcontext/cleardrawable().md)
