<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>581</bug_id>
          
          <creation_ts>2012-05-07 22:00:34 +0200</creation_ts>
          <short_desc>gluUnProject multiplies matrices in wrong order</short_desc>
          <delta_ts>2012-05-12 04:13:49 +0200</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Jogl</product>
          <component>core</component>
          <version>2</version>
          <rep_platform>All</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Wade Walker">wwalker3</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          <cc>sgothel</cc>
          
          <cf_type>---</cf_type>
          <cf_scm_refs>cbc77718f01a8190e1a8aa0e9afdc2a3a3403358
7f85501bd448afc9ba52f6abbe5f049d673d824d</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1570</commentid>
    <comment_count>0</comment_count>
    <who name="Wade Walker">wwalker3</who>
    <bug_when>2012-05-07 22:00:34 +0200</bug_when>
    <thetext>gluUnProject() and gluUnProject4() in ProjectFloat.java and ProjectDouble.java multiply the model and projection matrices in the wrong order.

This seems to be because calls to gluMultMatricesf() and __gluMultMatricesd() (which multiply in column-row order) were replaced by calls to FloatUtil.multMatrixf() and FloatUtil.multMatrixd() (which multiply in row-column order).

This problem appeared in RC6, and was first reported by user &quot;lukej&quot; on the forum at http://forum.jogamp.org/Problems-with-gluUnProject-td3954975.html.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1572</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2012-05-11 22:48:14 +0200</bug_when>
    <thetext>&lt;http://jogamp.org/git/?p=jogl.git;a=commit;h=cbc77718f01a8190e1a8aa0e9afdc2a3a3403358&gt;

Fix regression of commit 
&lt;http://jogamp.org/git/?p=jogl.git;a=commit;h=de2b129a56335262a44a05541a3ab2e35668cc6e&gt;:
ProjectFloat Matrix Multiplication of gluUnProject(..) impl.

ProjectFloat&apos;s previous gluMultMatricesf(..) used row-major order,
but the replacement multMatrixf(..) uses column-major order (like OpenGL, ..).

Note: The replaced &apos;gluMultMatrixVecf&apos; by multMatrixVecf() already
           used column-major order.

Fix: Reverse the arguments of matrix multiplication
    m1 x m2 -&gt; m2 x m1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1573</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2012-05-12 04:13:49 +0200</bug_when>
    <thetext>&lt;http://jogamp.org/git/?p=jogl.git;a=commit;h=7f85501bd448afc9ba52f6abbe5f049d673d824d&gt;

Added further unit test w/ actual gluUnProject(..) usage.

Remark: FloatUtil&apos;s multMatrixf(..) does column-major multiplication,
i.e. expect the linear matrix layout to be in column order.

In case the implementation does not follow the above statement (you find a bug),
pls re-open this bug report.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>