Exemplo n.º 1
0
 private static extern void ovrHmd_GetEyeTimewarpMatrices(IntPtr hmd, ovrEyeType eye, ovrPosef renderPose,
     [MarshalAs(UnmanagedType.LPArray, SizeConst = 2)]
     [Out] out ovrMatrix4f_Raw[] twnOut);
Exemplo n.º 2
0
        // Computes timewarp matrices used by distortion mesh shader, these are used to adjust
        // for orientation change since the last call to ovrHmd_GetEyePose for this eye.
        // The ovrDistortionVertex::TimeWarpFactor is used to blend between the matrices,
        // usually representing two different sides of the screen.
        // Must be called on the same thread as ovrHmd_BeginFrameTiming.
        public ovrMatrix4f[] ovrHmd_GetEyeTimewarpMatrices(ovrEyeType eye, ovrPosef renderPose)
        {
            ovrMatrix4f_Raw[] rawMats = {new ovrMatrix4f_Raw(), new ovrMatrix4f_Raw()};
            ovrHmd_GetEyeTimewarpMatrices(HmdPtr, eye, renderPose, out rawMats);

            ovrMatrix4f[] mats = {new ovrMatrix4f(rawMats[0]), new ovrMatrix4f(rawMats[1])};
            return mats;
        }