summaryrefslogtreecommitdiffstats
path: root/src/oculusvr/classes/jogamp/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-07-03 10:16:17 +0200
committerSven Gothel <[email protected]>2014-07-03 10:16:17 +0200
commit1e83f5436b0b504e299ba712e714cae9da1f87e7 (patch)
tree348d34e424777697662e9cadb0b2a9739957e040 /src/oculusvr/classes/jogamp/opengl
parentd44e8ada30d62149c5d4d4b8fdba7cc33f8c765b (diff)
Bug 1021: OVRDistortion.getSBSUpstreamPMV(..): Use generic perspective matrix constructor (example implementation only)
Diffstat (limited to 'src/oculusvr/classes/jogamp/opengl')
-rw-r--r--src/oculusvr/classes/jogamp/opengl/oculusvr/OVRDistortion.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/oculusvr/classes/jogamp/opengl/oculusvr/OVRDistortion.java b/src/oculusvr/classes/jogamp/opengl/oculusvr/OVRDistortion.java
index 7a9def985..3eefcd876 100644
--- a/src/oculusvr/classes/jogamp/opengl/oculusvr/OVRDistortion.java
+++ b/src/oculusvr/classes/jogamp/opengl/oculusvr/OVRDistortion.java
@@ -646,13 +646,13 @@ public class OVRDistortion {
* @param eyeNum eye denominator
* @param eyePos float[3] eye postion vector
* @param eyeYaw eye direction, i.e. {@link FloatUtil#PI} for 180 degrees
- * @param near frustum near value
- * @param far frustum far value
+ * @param zNear frustum near value
+ * @param zFar frustum far value
* @param mat4Projection float[16] projection matrix result
* @param mat4Modelview float[16] modelview matrix result
* @deprecated Only an example implementation, which should be adopted by the {@link CustomRendererListener#reshape(javax.media.opengl.GLAutoDrawable, int, int, int, int, EyeParameter, EyePose) upstream client code}.
*/
- public void getSBSUpstreamPMV(final int eyeNum, final float[] eyePos, final float eyeYaw, final float near, final float far,
+ public void getSBSUpstreamPMV(final int eyeNum, final float[] eyePos, final float eyeYaw, final float zNear, final float zFar,
final float[] mat4Projection, final float[] mat4Modelview) {
final EyeData eyeDist = eyes[eyeNum];
@@ -663,8 +663,7 @@ public class OVRDistortion {
//
// Projection
//
- final ovrMatrix4f pm = OVR.ovrMatrix4f_Projection(eyeDist.ovrEyeFov, near, far, true /* rightHanded*/);
- /* final float[] mat4Projection = */ FloatUtil.transposeMatrix(pm.getM(0, mat4Tmp1), mat4Projection);
+ FloatUtil.makePerspective(mat4Projection, 0, true, eyeDist.eyeParameter.fovhv, zNear, zFar);
//
// Modelview