Login  Register

Re: OpenGL double precision issue

Posted by alicana on Jun 16, 2016; 6:59am
URL: https://forum.jogamp.org/OpenGL-double-precision-issue-tp4036834p4036837.html

Due to OpenGL internals prefers single precision (float I guess), still precision lost.



jmaasing wrote
Scale everything up by for example * 1000 and see what happens.
 But, I think, scaling as jmaasing said is the keyword.
Instead of multiplying the data and ortho by 1K, to protect datas' precision as much as possible, I cut off integer part before passing to glVertex2d method. (Already set projection from 0 to 1) Then I get the acceptable results.

I wonder, whether there are other approaches/techniques?