@@ -45,18 +45,19 @@ JNI_METHOD(void, activityResumed)
4545int main (int argc, char *argv[]) {
4646 sQueue ->AttachToThread ();
4747 VRB_LOG (" Call WVR_Init" );
48- sDevice = DeviceDelegateWaveVR::Create (BrowserWorld::Instance ().GetRenderContext ());
49- BrowserWorld::Instance ().RegisterDeviceDelegate (sDevice );
50- while (!sJavaInitialized ) {
51- sQueue ->ProcessRunnables ();
52- }
5348
5449 WVR_InitError eError = WVR_Init (WVR_AppType_VRContent);
5550 if (eError != WVR_InitError_None) {
5651 VRB_LOG (" Unable to init VR runtime: %s" , WVR_GetInitErrorString (eError));
5752 return 1 ;
5853 }
5954
55+ sDevice = DeviceDelegateWaveVR::Create (BrowserWorld::Instance ().GetRenderContext ());
56+ BrowserWorld::Instance ().RegisterDeviceDelegate (sDevice );
57+ while (!sJavaInitialized ) {
58+ sQueue ->ProcessRunnables ();
59+ }
60+
6061 WVR_InputAttribute inputIdAndTypes[] = {
6162 {WVR_InputId_Alias1_Menu, WVR_InputType_Button, WVR_AnalogType_None},
6263 {WVR_InputId_Alias1_Touchpad, WVR_InputType_Button | WVR_InputType_Touch | WVR_InputType_Analog, WVR_AnalogType_2D},
@@ -76,6 +77,7 @@ int main(int argc, char *argv[]) {
7677 if (pError != WVR_RenderError_None) {
7778 VRB_LOG (" Present init failed - Error[%d]" , pError);
7879 }
80+ sDevice ->InitializeRender ();
7981 VRB_GL_CHECK (glEnable (GL_DEPTH_TEST));
8082 VRB_GL_CHECK (glEnable (GL_CULL_FACE));
8183 VRB_GL_CHECK (glEnable (GL_BLEND));
0 commit comments