Esempio n. 1
0
    void ValveGLFlushIfNotReprojecting()
    {
        // Don't flush while reprojecting
        if ( Valve.VRRenderingPackage.OpenVR.Compositor != null )
        {
            var timing = new Valve.VRRenderingPackage.Compositor_FrameTiming();
            timing.m_nSize = ( uint )System.Runtime.InteropServices.Marshal.SizeOf( typeof( Valve.VRRenderingPackage.Compositor_FrameTiming ) );
            Valve.VRRenderingPackage.OpenVR.Compositor.GetFrameTiming( ref timing, 0 );

            if ( timing.m_nNumFramePresents > 1 )
                return;
        }

        ValveGLFlush();
    }
Esempio n. 2
0
 public bool GetFrameTiming(ref Compositor_FrameTiming pTiming,uint unFramesAgo)
 {
     bool result = FnTable.GetFrameTiming(ref pTiming,unFramesAgo);
     return result;
 }