Bug 414

: GLU methods taking double arrays do not work anymore
: [JogAmp] Jogl : Julien Gouesse <gouessej>
: opengl: Julien Gouesse <gouessej>
: VERIFIED FIXED    
: normal : sgothel
: P3    
: 2   
: All   
: all   
Type: --- SCM Refs:
d6750dfe8de1d3606f00ad8263d6060a937f33e5
Workaround: ---

Description Julien Gouesse 2010-09-27 01:36:49 CEST
GLU methods taking double arrays do not work anymore because the double arrays in input/output are replaced by float arrays but the changes on float arrays used internally are not reflected back to double arrays. 

For example, gluUnProject(double winX, double winY, double winZ, double[] model, int model_offset, double[] proj, int proj_offset, int[] view, int view_offset, double[] objPos, int objPos_offset) does not work whereas its float equivalent works.

HOW TO TEST:
DO: call gluUnProject(double winX, double winY, double winZ, double[] model, int model_offset, double[] proj, int proj_offset, int[] view, int view_offset, double[] objPos, int objPos_offset) with objPos containing only NaN values
RESULT: the arrays still contain NaN values
EXPECT: the arrays contain valid values
Comment 1 Julien Gouesse 2010-09-27 04:02:26 CEST
This bug concerns only gluProject, gluUnproject and gluUnproject4.
Comment 2 Sven Gothel 2010-11-19 06:14:09 CET
fixed with d6750dfe8de1d3606f00ad8263d6060a937f33e5

Even though the double[] variant is not recommended within a float based GLU env .. ,
well, it should work now.

Please verify.
Comment 3 Julien Gouesse 2010-11-19 09:16:53 CET
Hi!

I will verify this Monday morning when it is in the autobuild. Your fix is fine and less impacting than mine but we lose some precision. I wrote a class ProjectDouble that performs these operations on doubles rather than on floats but if your solution is accurate enough, it is ok for me. Thank you very much for this fix. Great job :)
Comment 4 Sven Gothel 2010-11-20 09:40:12 CET
still waiting for your repo .. and pull requests :)

so if you can add your double project as well .. sure thing, you decide.