GLKViewDelegate Protocol Reference

Conforms to
Framework
/System/Library/Frameworks/GLKit.framework
Availability
Available in iOS 5.0 and later.
Declared in
GLKView.h

Overview

An object that implements the GLKViewDelegate protocol can be set as a GLKView object’s delegate. A delegate allows your application to provide a drawing method to a GLKView object without subclassing the GLKView class.

Tasks

Drawing the View’s Contents

Instance Methods

glkView:drawInRect:

Draws the view’s contents. (required)

- (void)glkView:(GLKView *)view drawInRect:(CGRect)rect
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 drawRect: method; the 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.

Availability
  • Available in iOS 5.0 and later.
Declared In
GLKView.h