Login  Register

Re: DPI scaling not working

Posted by gbburkhardt on Mar 01, 2023; 1:13am
URL: https://forum.jogamp.org/DPI-scaling-not-working-tp4042206p4042246.html

I appreciate the problem of funding.  Sorry, but I don't have a solution.  

I've created a simpler example to work with.  OneTriangleSwingGLCanvas.java  OneTriangle.java

It looks like this at 100% and 125% scaling.




It almost seems like the scaling is going in the wrong direction.  Or the OpenGL code is drawing in physical size pixels, when it should be drawing in logical size pixels.  Or the coordinates should be scaled before passing them to the OpenGL code.

Apparently this problem exists with LWJGL as well.  Here are two posts.  I haven't been able to get the solution proposed to work yet, nor do I especially like it.

https://hub.jmonkeyengine.org/t/solved-jme-only-renders-within-two-thirds-of-the-swing-canvas/46059/4

https://github.com/jMonkeyEngine/jmonkeyengine/issues/1393