ila
ila

Reputation: 920

GLKVIew Without GLKViewController

I am trying to lay a 3D object in front of the camera view in iPhone. For the camera view I am using AVFoundation. I tried to create a GLKView and added it as a subview to the view displaying the camera view. Now the problem I am facing is how to call update function. Do I call drawInRect manually to redraw the object every time ?. Thanks

Upvotes: 1

Views: 1612

Answers (1)

Pochi
Pochi

Reputation: 13459

Never call the drawInRect yourself unless you really know what you are doing.

Set a timer (can be a CADisplayLink type) and call the glkview display method:

[self.drawingSpace display];

Upvotes: 2

Related Questions