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

# update()

Called by Cocoa when the view’s window moves or when the view itself moves or is resized.

## Declaration

```swift
func update()
```

## Discussion

Discussion The default implementation simply calls the update() method of NSOpenGLContext. You can override this method to perform additional update operations on the context or if you need to add locks for multithreaded access to multiple contexts.

## See Also

### Managing the Visible Region

- [reshape()](appkit/nsopenglview/reshape().md)
