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

# update()

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

```
func update()
```

## Discussion

The default implementation simply calls the [`update()`](/documentation/AppKit/NSOpenGLContext/update()) method of [`NSOpenGLContext`](/documentation/AppKit/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.

---

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)