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

# clearDrawable()

Disassociates the OpenGL context from its viewport.

## Declaration

```swift
func clearDrawable()
```

## Discussion

Discussion This method disassociates the receiver from any associated NSView object. If the receiver is in full-screen or offscreen mode, it exits that mode.

## See Also

### Managing the Drawable Object

- [view](appkit/nsopenglcontext/view.md)
- [update()](appkit/nsopenglcontext/update().md)
