Line width too small under Retina display

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Line width too small under Retina display

Manu
Hi,

I'm trying to display lines with Java 3D / JOGL and noticed that line widths were smaller than expected under macOS when running with recent Java version (> 9 ?) on a Retina (HiDPI) display, whereas I use JOGL 2.4-rc-20221118 or 2.5-rc-20230520. Strangely, there's no issue with Java 8 in the same environment or under Windows on a HiDPI screen.
For the moment, I ended up to multiply the line width I want by the value returned by getScaleFactor in GraphicsDevice class to get a correct result with Java 15.
I tried to figure out in Java 3D / JOGL source code if there was some special cases for line widths but didn't find anything, except that the getScaleFactor method is retrieved by reflection in JAWTUtil.java but it's not used in JOGL.

Did anybody encounter a similar issue? Should it be fix in JOGL or should I live with the hack I programmed?

Thanks for your suggestions
Emmanuel Puybaret
Reply | Threaded
Open this post in threaded view
|

Re: Line width too small under Retina display

gouessej
Administrator
Maybe this problem should be mentioned in the bug report about HiDPI so that it doesn't get lost.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Line width too small under Retina display

Sven Gothel
Administrator
IMHO line-width should not be automatically scaled within JOGL itself,
i.e. glLineWidth() ..
If you think it should within Java3D .. OK.
Reply | Threaded
Open this post in threaded view
|

Re: Line width too small under Retina display

Manu
I tend to agree Sven, except that here I get different results for two different versions of Java (8 and 15).
Emmanuel Puybaret