summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/ProjectFloat.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-05-11 22:38:56 +0200
committerSven Gothel <[email protected]>2012-05-11 22:38:56 +0200
commitcbc77718f01a8190e1a8aa0e9afdc2a3a3403358 (patch)
tree5db389ae484b24965e5a0feb3448b1c5563be163 /src/jogl/classes/jogamp/opengl/ProjectFloat.java
parentd887fa4c36c97676d845d2d95c33025ad8f9f006 (diff)
Fix regression of commit de2b129a56335262a44a05541a3ab2e35668cc6e: ProjectFloat Matrix Multiplication of gluUnProject(..) impl.
ProjectFloat's previous gluMultMatricesf(..) used row-major order, but the replacement multMatrixf(..) uses column-major order (like OpenGL, ..). Note: The replaced 'gluMultMatrixVecf' by multMatrixVecf() already used column-major order. Fix: Reverse the arguments of matrix multiplication m1 x m2 -> m2 x m1 Added proper API documentation in FloatUtil -> Column Major Order of Linear Matrix Layout
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/ProjectFloat.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/ProjectFloat.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/jogl/classes/jogamp/opengl/ProjectFloat.java b/src/jogl/classes/jogamp/opengl/ProjectFloat.java
index bce3f3cfc..ce8405f74 100644
--- a/src/jogl/classes/jogamp/opengl/ProjectFloat.java
+++ b/src/jogl/classes/jogamp/opengl/ProjectFloat.java
@@ -615,7 +615,7 @@ public class ProjectFloat {
float[] in = this.in;
float[] out = this.out;
- FloatUtil.multMatrixf(modelMatrix, modelMatrix_offset, projMatrix, projMatrix_offset, matrix, 0);
+ FloatUtil.multMatrixf(projMatrix, projMatrix_offset, modelMatrix, modelMatrix_offset, matrix, 0);
if (!gluInvertMatrixf(matrix, 0, matrix, 0)) {
return false;
@@ -659,7 +659,7 @@ public class ProjectFloat {
FloatBuffer in = this.inBuf;
FloatBuffer out = this.outBuf;
- FloatUtil.multMatrixf(modelMatrix, projMatrix, matrixBuf);
+ FloatUtil.multMatrixf(projMatrix, modelMatrix, matrixBuf);
if (!gluInvertMatrixf(matrixBuf, matrixBuf)) {
return false;
@@ -715,7 +715,7 @@ public class ProjectFloat {
FloatBuffer in = this.inBuf;
FloatBuffer out = this.outBuf;
- FloatUtil.multMatrixf(modelMatrix, projMatrix, matrixBuf);
+ FloatUtil.multMatrixf(projMatrix, modelMatrix, matrixBuf);
if (!gluInvertMatrixf(matrixBuf, matrixBuf)) {
return false;
@@ -786,7 +786,7 @@ public class ProjectFloat {
float[] in = this.in;
float[] out = this.out;
- FloatUtil.multMatrixf(modelMatrix, modelMatrix_offset, projMatrix, projMatrix_offset, matrix, 0);
+ FloatUtil.multMatrixf(projMatrix, projMatrix_offset, modelMatrix, modelMatrix_offset, matrix, 0);
if (!gluInvertMatrixf(matrix, 0, matrix, 0))
return false;
@@ -847,7 +847,7 @@ public class ProjectFloat {
FloatBuffer in = this.inBuf;
FloatBuffer out = this.outBuf;
- FloatUtil.multMatrixf(modelMatrix, projMatrix, matrixBuf);
+ FloatUtil.multMatrixf(projMatrix, modelMatrix, matrixBuf);
if (!gluInvertMatrixf(matrixBuf, matrixBuf))
return false;