Esempio n. 1
0
    public void stopCamera()
    {
        if (!mStarted)
        {
            return;
        }

        if (syncPose)
        {
            WaveVR_Utils.Event.Remove("DrawCameraCompleted", OnUpdateCameraCompleted);
            Log.i(LOG_TAG, "Reset WaveVR_Render submit pose");
            WaveVR_Render.ResetPoseUsedOnSubmit();
            Interop.WVR_StopCamera();
            if (mframeBuffer != IntPtr.Zero)
            {
                Marshal.FreeHGlobal(mframeBuffer);
                mframeBuffer = IntPtr.Zero;
            }
            mStarted = false;
        }
        else
        {
            if (mthread != null && mthread.IsAlive)
            {
                toThreadStop = true;
                Log.i(LOG_TAG, "to thread stop");
            }
        }

        Log.i(LOG_TAG, "Release native texture resources");
        WaveVR_Utils.SendRenderEvent(WaveVR_Utils.RENDEREVENTID_ReleaseTexture);
    }
Esempio n. 2
0
    public void DisableMovieMode()
    {
        if (!enabled || !lockHMDPosition)
        {
            return;
        }

        lockHMDPosition = false;
        WaveVR_Render.ResetPoseUsedOnSubmit();
    }
Esempio n. 3
0
 void OnDisable()
 {
     WaveVR_Utils.Event.Remove(WaveVR_Utils.Event.AFTER_NEW_POSES, UpdatePose);
     WaveVR_Render.ResetPoseUsedOnSubmit();
 }