AI-generated Key Takeaways
-
The
GVRCardboardViewDelegate
protocol defines methods for interacting with aGVRCardboardView
, which handles VR rendering. -
It includes methods for responding to user events, preparing and performing frame drawing, and handling drawing pauses.
-
The
cardboardView:drawEye:withHeadTransform:
method is required for rendering each eye's view. -
Other methods like
cardboardView:didFireEvent:
,cardboardView:willStartDrawing:
,cardboardView:prepareDrawFrame:
, andcardboardView:shouldPauseDrawing:
are optional and provide further control over the rendering process. -
These methods are called on either the GL thread or the main UI thread, depending on their purpose.
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
|
optional |
Called when a user event is fired.
See the documentation of #GVRUserEvent to find out what thread is used to make this call.
|
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.
|
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.
|
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.
|
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.