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
This bug concerns only gluProject, gluUnproject and gluUnproject4.
fixed with d6750dfe8de1d3606f00ad8263d6060a937f33e5
Even though the double variant is not recommended within a float based GLU env .. ,
well, it should work now.
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 :)
still waiting for your repo .. and pull requests :)
so if you can add your double project as well .. sure thing, you decide.