mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-18 21:13:02 +01:00
Initialize Oculus pose after reset.
Without this change the pose is uninitialized during the first frame which causes Oculus timewarp to warp the output in crazy ways.
This commit is contained in:
@@ -175,6 +175,13 @@ ovrError:
|
||||
m_texture[1].Header.RenderViewport = rect;
|
||||
|
||||
m_timing = ovrHmd_BeginFrame(m_hmd, 0);
|
||||
#if OVR_VERSION > OVR_VERSION_042
|
||||
m_pose[0] = ovrHmd_GetHmdPosePerEye(m_hmd, ovrEye_Left);
|
||||
m_pose[1] = ovrHmd_GetHmdPosePerEye(m_hmd, ovrEye_Right);
|
||||
#else
|
||||
m_pose[0] = ovrHmd_GetEyePose(m_hmd, ovrEye_Left);
|
||||
m_pose[1] = ovrHmd_GetEyePose(m_hmd, ovrEye_Right);
|
||||
#endif // OVR_VERSION > OVR_VERSION_042
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user