diff options
author | Sven Gothel <[email protected]> | 2014-07-05 08:27:03 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-07-05 08:27:03 +0200 |
commit | bda482e4eee76a5ba2139645682ae64dadacbc6b (patch) | |
tree | 51f67d3734276114754bff02bbde2217fc0fb797 /src/test | |
parent | f8f0f051604721bceaee214b8e5218fd47d2eb9e (diff) |
Fix FloatUtil.makePerspective(..): The tan(fovy/2) shall be used, not tan(fovy), fix callers; Simplify FloatUtil.makePerspective(..FovHVHalves..)
Fix FloatUtil.makePerspective(..): The tan(fovy/2) shall be used, not tan(fovy), fix callers
- This bug didn't hit (yet), since callers already performed the division (degree -> radian)
by falsly claiming the passed value is in radian - where it was actually fov/2 in radians.
Simplify FloatUtil.makePerspective(..FovHVHalves..)
- Due to the fix above, it became pretty clear that the makeFrustum(..)
method can be utilized.
Simply apply all our tan-half-fov values on zNear.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/stereo/StereoDemo01.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/stereo/StereoDemo01.java b/src/test/com/jogamp/opengl/test/junit/jogl/stereo/StereoDemo01.java index c4db20f37..b33b18358 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/stereo/StereoDemo01.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/stereo/StereoDemo01.java @@ -237,7 +237,9 @@ public class StereoDemo01 { // EyePos.y = ovrHmd_GetFloat(HMD, OVR_KEY_EYE_HEIGHT, EyePos.y); final FovHVHalves[] defaultEyeFov = stereoDevice.getDefaultFOV(); System.err.println("Default Fov[0]: "+defaultEyeFov[0]); + System.err.println("Default Fov[0]: "+defaultEyeFov[0].toStringInDegrees()); System.err.println("Default Fov[1]: "+defaultEyeFov[1]); + System.err.println("Default Fov[1]: "+defaultEyeFov[1].toStringInDegrees()); final float[] eyePositionOffset = null == movieSimple ? StereoDevice.DEFAULT_EYE_POSITION_OFFSET // default : new float[] { 0f, 0.3f, 0f }; // better fixed movie position |