// called by AppThreadFunction public void ovrApp_HandleVrModeChanges() { //ConsoleExtensions.tracei("enter ovrApp_HandleVrModeChanges, FrameIndex: ", (int)FrameIndex); // 1432 if (this.NativeWindow != null && this.Egl.MainSurface == egl.EGL_NO_SURFACE) { ConsoleExtensions.trace("ovrApp_HandleVrModeChanges, ovrEgl_CreateSurface"); this.Egl.ovrEgl_CreateSurface(this.NativeWindow); } if (this.Resumed != false && this.NativeWindow != null) { if (this.Ovr == null) { var parms = VrApi_Helpers.vrapi_DefaultModeParms(ref Java); parms.CpuLevel = 2; parms.GpuLevel = 3; parms.MainThreadTid = unistd.gettid(); #if MULTI_THREADED // Also set the renderer thread to SCHED_FIFO. parms.RenderThreadTid = ovrRenderThread_GetTid(&app->RenderThread); #endif //ALOGV(" eglGetCurrentSurface( EGL_DRAW ) = %p", eglGetCurrentSurface(EGL_DRAW)); ConsoleExtensions.trace("ovrApp_HandleVrModeChanges, vrapi_EnterVrMode"); this.Ovr = VrApi.vrapi_EnterVrMode(ref parms); //ALOGV(" vrapi_EnterVrMode()"); //ALOGV(" eglGetCurrentSurface( EGL_DRAW ) = %p", eglGetCurrentSurface(EGL_DRAW)); } } else { if (this.Ovr != null) { #if MULTI_THREADED // Make sure the renderer thread is no longer using the ovrMobile. ovrRenderThread_Wait(&app->RenderThread); #endif //ALOGV(" eglGetCurrentSurface( EGL_DRAW ) = %p", eglGetCurrentSurface(EGL_DRAW)); ConsoleExtensions.trace("ovrApp_HandleVrModeChanges, vrapi_LeaveVrMode"); VrApi.vrapi_LeaveVrMode(this.Ovr); this.Ovr = null; //ALOGV(" vrapi_LeaveVrMode()"); //ALOGV(" eglGetCurrentSurface( EGL_DRAW ) = %p", eglGetCurrentSurface(EGL_DRAW)); } } if (this.NativeWindow == null && this.Egl.MainSurface != egl.EGL_NO_SURFACE) { ConsoleExtensions.trace("ovrApp_HandleVrModeChanges, ovrEgl_DestroySurface"); this.Egl.ovrEgl_DestroySurface(); } }
public static void vrapi_LeaveVrMode(ovrMobile ovr) { }
// called by AppThreadFunction public void ovrApp_HandleVrModeChanges() { //ConsoleExtensions.tracei("enter ovrApp_HandleVrModeChanges, FrameIndex: ", (int)FrameIndex); // 1432 if (this.NativeWindow != null && this.Egl.MainSurface == egl.EGL_NO_SURFACE) { ConsoleExtensions.trace("ovrApp_HandleVrModeChanges, ovrEgl_CreateSurface"); this.Egl.ovrEgl_CreateSurface(this.NativeWindow); } if (this.Resumed != false && this.NativeWindow != null) { if (this.Ovr == null) { var parms = VrApi_Helpers.vrapi_DefaultModeParms(ref Java); parms.CpuLevel = 2; parms.GpuLevel = 3; parms.MainThreadTid = unistd.gettid(); #if MULTI_THREADED // Also set the renderer thread to SCHED_FIFO. parms.RenderThreadTid = ovrRenderThread_GetTid( &app->RenderThread ); #endif //ALOGV(" eglGetCurrentSurface( EGL_DRAW ) = %p", eglGetCurrentSurface(EGL_DRAW)); ConsoleExtensions.trace("ovrApp_HandleVrModeChanges, vrapi_EnterVrMode"); this.Ovr = VrApi.vrapi_EnterVrMode(ref parms); //ALOGV(" vrapi_EnterVrMode()"); //ALOGV(" eglGetCurrentSurface( EGL_DRAW ) = %p", eglGetCurrentSurface(EGL_DRAW)); } } else { if (this.Ovr != null) { #if MULTI_THREADED // Make sure the renderer thread is no longer using the ovrMobile. ovrRenderThread_Wait( &app->RenderThread ); #endif //ALOGV(" eglGetCurrentSurface( EGL_DRAW ) = %p", eglGetCurrentSurface(EGL_DRAW)); ConsoleExtensions.trace("ovrApp_HandleVrModeChanges, vrapi_LeaveVrMode"); VrApi.vrapi_LeaveVrMode(this.Ovr); this.Ovr = null; //ALOGV(" vrapi_LeaveVrMode()"); //ALOGV(" eglGetCurrentSurface( EGL_DRAW ) = %p", eglGetCurrentSurface(EGL_DRAW)); } } if (this.NativeWindow == null && this.Egl.MainSurface != egl.EGL_NO_SURFACE) { ConsoleExtensions.trace("ovrApp_HandleVrModeChanges, ovrEgl_DestroySurface"); this.Egl.ovrEgl_DestroySurface(); } }
public static void vrapi_SubmitFrame(this ovrMobile ovr, ref ovrFrameParms parms) { }
public static double vrapi_GetPredictedDisplayTime(this ovrMobile ovr, long frameIndex) { return(0); }
public static ovrTracking vrapi_GetPredictedTracking(this ovrMobile ovr, double absTimeInSeconds) { return(default(ovrTracking)); }