GLJPanel/GLCanvas dpi scaling and AWT pointer coordinates
Posted by Marc Kurtz on Jul 03, 2024; 5:10pm
URL: https://forum.jogamp.org/GLJPanel-GLCanvas-dpi-scaling-and-AWT-pointer-coordinates-tp4043482.html
We recently updated to JOGL 2.5.0 to take advantage of the high-dpi improvements. We make sure to size the GL viewport to the value returned by getSurfaceWidth/Height() and everything looks great! But we found that AWT still reports mouse/pointer coordinates in unscaled coordinates so that throws off all of our dragging code (among other things). Is there an easy fix to this? How are others approaching this problem? We see that the NEWT implementation doesn’t do this but unfortunately we are beholden to AWT for the time being. Thank you!