Login  Register

Re: Problems with gluUnProject

Posted by Sven Gothel on May 11, 2012; 8:50pm
URL: https://forum.jogamp.org/Problems-with-gluUnProject-tp3954975p3981030.html

Fixed, see below bug 581 report ..

Please recompile jogl and test ... and report
whether the fix satisfies your expectation (it should).

Maybe you can provide a simple gluUnproject unit test. Thx.

+++

<https://jogamp.org/bugzilla/show_bug.cgi?id=581>:

<http://jogamp.org/git/?p=jogl.git;a=commit;h=cbc77718f01a8190e1a8aa0e9afdc2a3a3403358>

Fix regression of commit
<http://jogamp.org/git/?p=jogl.git;a=commit;h=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