<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "tvOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GLKit",
  "identifier" : "/documentation/GLKit/GLKViewDelegate/glkView(_:drawIn:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GLKit"
    ],
    "preciseIdentifier" : "c:objc(pl)GLKViewDelegate(im)glkView:drawInRect:"
  },
  "title" : "glkView(_:drawIn:)"
}
-->

# glkView(_:drawIn:)

Draws the view’s contents.

```
func glkView(_ view: GLKView, drawIn rect: CGRect)
```

## Parameters

`view`

The view requesting that its contents be redrawn.

`rect`

A rectangle that describes the area that needs to be updated.

## Discussion

The semantics of this method are identical to those of the <doc://com.apple.documentation/documentation/UIKit/UIView/draw(_:)> method; the [`GLKView`](/documentation/GLKit/GLKView) object makes its OpenGL ES context the current context and binds its framebuffer as the target for OpenGL ES rendering commands. Your delegate method should then draw the view’s contents.

---

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)