Login  Register

Re: Retina support in OSX?

Posted by Sven Gothel on Oct 08, 2015; 9:25pm
URL: https://forum.jogamp.org/Retina-support-in-OSX-tp4029248p4035440.html

On 10/08/2015 07:33 PM, runiter [via jogamp] wrote:

>     gouessej wrote
>     You should have used
>     com.jogamp.nativewindow.ScalableSurface.IDENTITY_PIXELSCALE, it's
>     mentioned in the bug report.
>
> Thanks gouessej,
> Your suggestion worked great. I just assumed that surfaceScale is set to
> IDENTITY by default so I didn't even bother trying passing that arguement. But
> the following indeed worked:
>
> ((JoglSwingCanvas)canvas).setSurfaceScale(new float[]
> {ScalableSurface.IDENTITY_PIXELSCALE, ScalableSurface.IDENTITY_PIXELSCALE});
>
JOGL's default is AUTO* .. (look it up).
That implies .. use highest available scale, or default.

> My question is, why not set SurfaceScale to IDENTITY_PIXELSCALE by default to
> fix this issue for all Ardor3D programmers without any direct intervention by
> them?
In the current situation this would be the best choice!

However, Ardor3D could work w/ the scale
if getSurface[Width|Height]() (pixel units) would be used
for all graphics related operations,
instead of get[Width|Height]() (window units).

The 'windowing operations' still use get[Width|Height]()
hence a scale operation (look it up) must be performed
to convert window units <-> pixel units.

~Sven



signature.asc (828 bytes) Download Attachment