Login  Register

Re: Building Scilab with JoGL 2.4.0

Posted by mottelet on Jun 05, 2019; 8:30am
URL: https://forum.jogamp.org/Building-Scilab-with-JoGL-2-4-0-tp4039808p4039833.html

Sven Gothel wrote
On 6/4/19 8:24 PM, mottelet [via jogamp] wrote:
> I finally solved the problem with replacing GLJPanel methods getSurfaceWidth()
> and  getSurfaceHeight() with getWidth() and getHeight() in a strategic place
> and now the scale of graphics is correct and even dynamically adapts when
> windows are moved to an external display. However, on the Retina display, the

Great, can you please point me to the code in your repo showing the change?
I am curious what the issue was.

...
The patch is under review @ https://codereview.scilab.org/#/c/20998/

It is not an optimal patch but does the job. The problem is that autoDrawable only has getSurfaceWidth() and getSurfaceHeight() (at least since 2.3.x, here I have tested with master/2.4.0). Depending on the hardware, it can be a GLJCanvas or a GLJPanel, but under Mac OSX I know that it is always a GLJPanel, which explains the brute force cast. If you have a better idea I am greatly interested.