Пример #1
0
OVR_EXPORT ovrTrackingState ovrHmd_GetTrackingState(ovrHmd hmddesc, double absTime)
{
    ovrTrackingState result = {0};

    if (hmddesc)
    {
        HMDState* p = (HMDState*)hmddesc->Handle;
        result = p->PredictedTrackingState(absTime);
    }

#ifdef OVR_OS_WIN32
        // Set up display code for Windows
        Win32::DisplayShim::GetInstance().Active = (result.StatusFlags & ovrStatus_HmdConnected) != 0;
#endif

    return result;
}
Пример #2
0
OVR_EXPORT ovrTrackingState ovrHmd_GetTrackingState(ovrHmd hmddesc, double absTime)
{
    ovrTrackingState result;

    if (hmddesc)
    {
        HMDState* p = (HMDState*)hmddesc->Handle;
        result = p->PredictedTrackingState(absTime);

        // Instrument data from eye pose
        p->LagStats.InstrumentEyePose(result);
    }
    else
        memset(&result, 0, sizeof(result));

#ifdef OVR_OS_WIN32
        // Set up display code for Windows
        Win32::DisplayShim::GetInstance().Active = (result.StatusFlags & ovrStatus_HmdConnected) != 0;
#endif

    return result;
}