Пример #1
0
double  FrameTimeManager::calcTimewarpWaitDelta() const
{
    // If timewarp timing hasn't been calculated, we should wait.
    if (!VsyncEnabled)
        return 0.0;

    if (SdkRender)
    {
        if (NeedDistortionTimeMeasurement())
            return 0.0;
        return -(DistortionRenderTimes.GetMedianTimeDelta() + 0.002);
    }
   
    // Just a hard-coded "high" value for game-drawn code.
    // TBD: Just return 0 and let users calculate this themselves?
    return -0.003;   
}
double  FrameTimeManager::calcTimewarpWaitDelta() const
{
    // If timewarp timing hasn't been calculated, we should wait.
    if (!VsyncEnabled)
        return 0.0;

    if (SdkRender)
    {
        if (NeedDistortionTimeMeasurement())
            return 0.0;
        return -(DistortionRenderTimes.GetMedianTimeDelta() + 0.0035);

        //Revisit dynamic pre-Timewarp delay adjustment logic
        /*return -(DistortionRenderTimes.GetMedianTimeDelta() + 0.002 +
                 TimewarpAdjuster.GetDelayReduction());*/
    }
   
    // Just a hard-coded "high" value for game-drawn code.
    // TBD: Just return 0 and let users calculate this themselves?
    return -0.004;

    //Revisit dynamic pre-Timewarp delay adjustment logic
    //return -(0.003 + TimewarpAdjuster.GetDelayReduction());
}