Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Native] Scaling issue on Windows 10 with HiDPI and Java 10 #101

Closed
jzy3d opened this issue Mar 28, 2019 · 5 comments
Closed

[Native] Scaling issue on Windows 10 with HiDPI and Java 10 #101

jzy3d opened this issue Mar 28, 2019 · 5 comments
Milestone

Comments

@jzy3d
Copy link
Owner

jzy3d commented Mar 28, 2019

Chart is not scaled properly under Windows 10 with HiDPI monitors & Java 10-11 : chart get displayed half size on a corner for HiDPI windows stations on native charts (EmulGL is a very good portability workaround).

lccmonleccddelli

Cases

All rendering glitches under Windows 10 with an HiDPI monitor are below with a demo programs reference from jzy3d-tutorials.

Case 1 : half chart on screen

Happens for the following IPainterFactory

  • AWT (SurfaceDemoAWT)
  • AWTNewt (SurfaceDemoAWTNewt)
  • SWTBridge (SurfaceDemoSWTBridge)
Case 2 : chart full screen but not using HiDPI capabilities

Chart are displayed on complete canvases but do not make use of HiDPI capabilities which makes the chart ugly relative to other applications displayed on the same monitor.

  • Swing (SurfaceDemoSwing)
Case 3 : properly working
  • SWT (SurfaceDemoSWT)
Workaround : use EmulGL
  • AWT (SurfaceDemoEmulGL)

It turns out to be a known problem with the way the JVM supports HiDPI, which is discussed in JOGL forum.

Workarounds are proposed here.

@jzy3d
Copy link
Owner Author

jzy3d commented Apr 1, 2019

I digged in the solutions and indeed noticed that the JVM flag does not fix the issue.

I have been however able to fix rendering by editing bundled_jre/bin/java.exe properties by mouse clicks. The configuration differed from the stackoverflow advice so I printed my screen for you to reproduce the steps. My screen are in french, but basically

  1. Right click java.exe > Properties
  2. Compatibilité / Compatibility
  3. Modifier les paramètres PPP élevé (HiDPI setting) / Edit HiDPI settings
  4. Remplacer le comportement de mise à l'échelle PPP élevée. Mise à l'échelle effectuée par : / Replace HiDPI settings. Scale with
    Choose : System or System (amélioré)
    On my computer default setting is "Application" and does not work.

window-configure-display

@jzy3d jzy3d added the bug label Jan 6, 2020
@jzy3d jzy3d added this to the 1.0 milestone Jan 20, 2021
@jzy3d jzy3d changed the title Scaling issue on Windows 10 with Java 10 Scaling issue on Windows 10 with HiDPI and Java 10 Jan 23, 2021
@jzy3d jzy3d changed the title Scaling issue on Windows 10 with HiDPI and Java 10 [Native] Scaling issue on Windows 10 with HiDPI and Java 10 Jan 23, 2021
@jzy3d
Copy link
Owner Author

jzy3d commented Mar 23, 2021

Somebody suggested that fix by overriding the Camera object (interesting code is commented but highlighted in yellow)

image

@jzy3d jzy3d added the jogl label Apr 9, 2021
@jzy3d
Copy link
Owner Author

jzy3d commented Apr 19, 2021

You may use EmulGL instead of JOGL for rendering with Jzy3D. EmulGL is made to enhance charts portability across computers.

See links to examples in the readme.

@jzy3d
Copy link
Owner Author

jzy3d commented Feb 15, 2022

Fix in progress here #235

@jzy3d jzy3d mentioned this issue Feb 21, 2022
@jzy3d
Copy link
Owner Author

jzy3d commented Feb 28, 2022

Available in Maven repo under 2.0.1-SNAPSHOT version. Source code on master branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant