Fix for Oculus API.

This commit is contained in:
Andrzej Kapolka 2014-09-10 14:14:02 -07:00
parent 423e6d0594
commit 600f36aa64

View file

@ -537,11 +537,11 @@ void OculusManager::overrideOffAxisFrustum(float& left, float& right, float& bot
float& farVal, glm::vec4& nearClipPlane, glm::vec4& farClipPlane) {
#ifdef HAVE_LIBOVR
if (_activeEyeIndex != -1) {
float extent = nearVal * glm::tan(_eyeRenderDesc[_activeEyeIndex].Fov / 2.0f);
right = extent;
left = -extent;
top = extent;
bottom = -extent;
const ovrFovPort& port = _eyeFov[_activeEyeIndex];
right = nearVal * port.RightTan;
left = -nearVal * port.LeftTan;
top = nearVal * port.TopTan;
bottom = -nearVal * port.BottomTan;
}
#endif
}