Re: SWT GLCanvas renders incorrectly at 175% scaling and above on Windows
Posted by badjames on Dec 19, 2024; 2:47pm
URL: https://forum.jogamp.org/SWT-GLCanvas-renders-incorrectly-at-175-scaling-and-above-on-Windows-tp4043628p4043629.html
Hi,
I've been playing with the NEWT GLCanvas which seems to allow me to avoid the scaling issue. Basically, if I do the following:
1. Set the surface scale value to 1.0f using:
glCanvas.getNEWTChild().setSurfaceScale()
2. Set the viewport size in the reshape callback with:
gl.glViewport(0, 0, drawable.getSurfaceWidth(), drawable.getSurfaceHeight());
(where "drawable" is the first argument in the callback).
Then rendering appears correct at 175% scaling - it correctly fills the canvas and text is not scaled horribly.
Is this the recommended solution to handling 175%+ scaling, or is there a way I can get it to work using the com.jogamp.opengl.swt.GLCanvas instead?
Any help would be great, thanks :-)
James