<GVRCardboardViewDelegate> Protocol

<GVRCardboardViewDelegate> Protocol Reference

Overview

Defines a delegate protocol for GVRCardboardView.

Inherits <NSObject>.

Instance Method Summary

(void) - cardboardView:didFireEvent:
 Called when a user event is fired. More...
 
(void) - cardboardView:willStartDrawing:
 Called before the first draw frame call. More...
 
(void) - cardboardView:prepareDrawFrame:
 Called at the start of each frame, before calling both eyes. More...
 
(void) - cardboardView:drawEye:withHeadTransform:
 Called on each frame to perform the required GL rendering. More...
 
(void) - cardboardView:shouldPauseDrawing:
 Called when the drawing is paused, possibly because the GL view is overlaid by settings or transition view. More...
 

Method Detail

- (void) cardboardView: (GVRCardboardView *)  cardboardView
didFireEvent: (GVRUserEvent)  event 
optional

Called when a user event is fired.

See the documentation of #GVRUserEvent to find out what thread is used to make this call.

- (void) cardboardView: (GVRCardboardView *)  cardboardView
willStartDrawing: (GVRHeadTransform *)  headTransform 
optional

Called before the first draw frame call.

This is called on the GL thread and can be used to do any pre-rendering setup required while on the GL thread.

- (void) cardboardView: (GVRCardboardView *)  cardboardView
prepareDrawFrame: (GVRHeadTransform *)  headTransform 
optional

Called at the start of each frame, before calling both eyes.

Delegate should use initialize or clear the GL state. This method is called on the GL thread.

- (void) cardboardView: (GVRCardboardView *)  cardboardView
drawEye: (GVREye)  eye
withHeadTransform: (GVRHeadTransform *)  headTransform 
required

Called on each frame to perform the required GL rendering.

Delegate should set the GL viewport and scissor it to the viewport returned from the viewportForEye: (GVRHeadTransform) method. This method is called on the GL thread.

- (void) cardboardView: (GVRCardboardView *)  cardboardView
shouldPauseDrawing: (BOOL)  pause 
optional

Called when the drawing is paused, possibly because the GL view is overlaid by settings or transition view.

This is called on the main UI thread. Drawing is stopped when the parameter paused is set to YES and resumes when set to NO.