Defines a view responsible for rendering graphics in VR mode.
It is designed to work in full screen mode with a landscape orientation. It provides all the transition between mono and stereo (VR) modes. The view switches to fullscreen VR mode when
vrModeEnabled property is set to YES. The developer should ensure
UISupportedInterfaceOrientations key in the application's plist file includes
UIRequiresFullscreen is set to YES.
The users of this class provide an implementation of the
GVRCardboardViewDelegate protocol through the
delegate property. The methods in the protocol
GVRCardboardViewDelegate are called to perform the actual rendering of the graphics.
In order to drive the rendering, the users of this class should call the
render method from their render loop. The thread used to call the
render method is refered to as the GL thread. This thread, in turn, calls the method of the
|Designated initializer. More...|
|Drives the rendering of the cardboard view. More...|
|Sets the Cardboard viewer parameters from a Url. More...|
|id< GVRCardboardViewDelegate >||delegate|
|Delegate to be notified of cardboard view rendering. More...|
|The OpenGL context used for rendering. More...|
|The vrModeEnabled property allows switching to and from VR mode. More...|
|Flag to hide or show the transition view when in VR mode. More...|
|- (instancetype) initWithFrame:||(CGRect)||NS_DESIGNATED_INITIALIZER|
|- (void) render|
Drives the rendering of the cardboard view.
Call this from your app's render loop.
|+ (void) setViewerParamsFromUrl:||(NSURL *)||url|
|withCompletion:||(void(^)(BOOL success, NSError *error))||completion|
Sets the Cardboard viewer parameters from a Url.
This allows programmatically pairing a viewer without having the user go through the pairing flow. Calls the supplied completion handler with the result of pairing and the error if it fails.
Note: The viewer parameters can be set only if no other viewer pairing exists. In other words, this only works if the user hasn't already paired a viewer for the current application.
A valid viewer parameters URI can be generated from this page: https://www.google.com/get/cardboard/viewerprofilegenerator/
Delegate to be notified of cardboard view rendering.
The OpenGL context used for rendering.
Defaults to OpenGL ES3 context, if not set.
The vrModeEnabled property allows switching to and from VR mode.
When set to YES, the cardboard view transitions into a fullscreen view to allow the user to place the device into the Cardboard viewer. When set to NO, it transitions back to pre-VR (mono) mode.
Flag to hide or show the transition view when in VR mode.