Пример #1
0
    public static Compositor_CumulativeStats GetCumulativeStats(this CVRCompositor compositor)
    {
        Compositor_CumulativeStats pStats = default(Compositor_CumulativeStats);

        OpenVR.Compositor.GetCumulativeStats(ref pStats, CUMULATIVESTATS_SIZE);
        return(pStats);
    }
Пример #2
0
        private void OnDisable()
        {
            if (!UseVrDevice || _compositor != null)
            {
                var vrStats = new Compositor_CumulativeStats();
                if (_compositor != null)
                {
                    _compositor.GetCumulativeStats(ref vrStats, (uint)Marshal.SizeOf(typeof(Compositor_CumulativeStats)));
                }
            }
            StopAllCoroutines();
            _mediaSession    = null;
            _mediaCollection = null;
            Native.Media.Release();
            Native.Graphic.Release();
            print("Object Disabled");
            if (_toAnotherScene)
            {
                return;
            }
#if UNITY_EDITOR
            EditorApplication.isPlaying = false;
#else
            Application.Quit();
#endif
        }
Пример #3
0
 public void Update(Compositor_CumulativeStats stats)
 {
     systemTimeMs      = Utils.NowMs();
     framesPresented   = stats.m_nNumFramePresents;
     framesDropped     = stats.m_nNumDroppedFrames;
     framesReprojected = stats.m_nNumReprojectedFrames;
     framesLoading     = stats.m_nNumLoading;
     framesTimedOut    = stats.m_nNumTimedOut;
 }
Пример #4
0
            framesTimedOut;         // Total frames that timeout, drops to compositor (2.5 repeated frames)

        public CumulativeStats(Compositor_CumulativeStats stats = new Compositor_CumulativeStats())
        {
            Update(stats);
        }
Пример #5
0
 internal static extern uint StoreVrCumulativeStatus(ref Compositor_CumulativeStats vrStats);