This site has been permanently archived. The content on this site was last updated in 2019.
<GVRCardboardViewDelegate> Protocol
Stay organized with collections
Save and categorize content based on your preferences.
Defines a delegate protocol for GVRCardboardView
.
Inherits <NSObject>.
- (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.
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.
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.
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.
All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-09 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-09 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eGVRCardboardViewDelegate\u003c/code\u003e protocol defines methods for interacting with a \u003ccode\u003eGVRCardboardView\u003c/code\u003e, which handles VR rendering.\u003c/p\u003e\n"],["\u003cp\u003eIt includes methods for responding to user events, preparing and performing frame drawing, and handling drawing pauses.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ecardboardView:drawEye:withHeadTransform:\u003c/code\u003e method is required for rendering each eye's view.\u003c/p\u003e\n"],["\u003cp\u003eOther methods like \u003ccode\u003ecardboardView:didFireEvent:\u003c/code\u003e, \u003ccode\u003ecardboardView:willStartDrawing:\u003c/code\u003e, \u003ccode\u003ecardboardView:prepareDrawFrame:\u003c/code\u003e, and \u003ccode\u003ecardboardView:shouldPauseDrawing:\u003c/code\u003e are optional and provide further control over the rendering process.\u003c/p\u003e\n"],["\u003cp\u003eThese methods are called on either the GL thread or the main UI thread, depending on their purpose.\u003c/p\u003e\n"]]],["The `GVRCardboardViewDelegate` protocol defines methods for managing VR rendering. Key actions include: handling user events via `cardboardView:didFireEvent:`, preparing for drawing with `cardboardView:willStartDrawing:` and `cardboardView:prepareDrawFrame:`, rendering each eye's view using `cardboardView:drawEye:withHeadTransform:`, and managing drawing pauses through `cardboardView:shouldPauseDrawing:`. These methods facilitate pre-rendering setup, per-frame initialization, GL rendering, and user event responses within the VR environment.\n"],null,[]]