Bug 414 - GLU methods taking double arrays do not work anymore
Summary: GLU methods taking double arrays do not work anymore
Status: VERIFIED FIXED
Alias: None
Product: Jogl
Classification: JogAmp
Component: opengl (show other bugs)
Version: 2
Hardware: All all
: P3 normal
Assignee: Julien Gouesse
URL:
Depends on:
Blocks:
 
Reported: 2010-09-27 01:36 CEST by Julien Gouesse
Modified: 2010-11-20 09:40 CET (History)
1 user (show)

See Also:
Type: ---
SCM Refs:
d6750dfe8de1d3606f00ad8263d6060a937f33e5
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.