-
Notifications
You must be signed in to change notification settings - Fork 334
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
Rendering issue: black borders around map when using scaling in 2.2.0 #195
Comments
Update: I also tested with openjdk 11 and this bug reproduces exactly the same way. I wasn't able to test with jdk 8 as it seems the project doesn't compile easily anymore with that older jdk version. |
@nicolas-van Thanks for the detailed report. We'll review this issue in our final release testing. |
we have the same problem but we fixed it with a small workaround. Not the best solution but it works as long as WWJ will be restarted after changing the window scale factor. Then it was running on 4K screens with 125% scaling. In file WorldWindowGLAutoDrawable.java change:
but then the mouse point doesn't fit anymore and we needed to change WorldWindowGLCanvas.java and added the following:
I hope it will be fixed in a correct way... |
@thwe74 : Did you reproduced it with version 2.2.0 or using a random commit on the develop branch like I did ? |
@nicolas-van: Yes, I tested it with version 2.2.0 and the current develop branch from today. Always the same problem. It looks like the scale factor from the screen is not considered in the JOGL implementation. With the workaround it works |
I changed the description and title to clearly explain this bug is present in 2.2.0. |
The problem with @thwe74 solution is that it breaks the behavior on MacOS giving wrong scaling factor when has to be 1.0 (actually it's not). To make it work, you just need to check the OS and do changes with scale factor only on Windows. Here is some code.
Then use it in our event functions (I showed only one of them):
|
Elegantly beautiful, like so much from this extraordinary international crew of virtual globe aficionados! |
Not as elegant as yaroslavkulinich's code above, but I usually pass an argument to the VM when running WWD on Windows:
This can also be added to a .bat file if folks need to distribute WWD with a launcher:
Or you can turn off the scaling factor with VM options, like in this shell script:
|
Can you fix it and then we can fold that in! |
@PJHogan Do you see any reason to support DPI scaling on windows when it's not really supported by Java 8? If not, this System property can be set in the ApplicationTemplate's start() method instead of calculating the DPI scaling of mouse events ourselves:
|
NASA, please do your best to HELP make this work! |
@thwe74 @yaroslavkulinich @nicolas-van Thanks for the solutions. I've tried implementing these, and everything seems to work great except dragging the map with the mouse. The modified mouse event doesn't seem to be scaling properly for me and I'm still limited to the "small" map portion when I click and drag the map. Anyone else seeing these issues? I'm using Adoptium JDK 11 if that would matter. I can't see how the processMouseMotionEvent would be any different than the others. Edit: Also testing at 200% scaling at 4K resolution |
Is there any chance to solve the remainig issue when changing the scale whith the application running. |
Description
Using the version 2.2.0, when using Windows with the scaling graphical parameter activated we can see borders on the top and the right of the WorldWind map:
Steps to Reproduce
On Windows 10, with openjdk 13 or 14 installed, right click your Windows background and choose "Display Settings". Then change the "Scale and Layout" parameter to "125%":
Then launch the WorldWindJava demo application.
You can even switch the "Scale and Layout" display parameter without closing the demo application. The borders will always be present when the setting has a different value than "100%".
Expected behavior: The map displays without the black borders regardless of the "Scale and Layout" display setting.
Actual behavior: There are black borders when the "Scale and Layout" display setting has a value other than "100%".
Reproduces how often: 100% of the time, tested on 3 different computers with different graphic cards (AMD, Nvidia, Intel), all of them with same software configuration (Windows 10, openjdk13, latest commit on develop branch)
Operating System and Version
Additional Information
It's problematic for us because a lot of laptops nowadays have a default scaling parameter set to a value other than 100%. It means that a lot of our user report bugs and we have to explain them how to change their windows configuration as a workaround.
The text was updated successfully, but these errors were encountered: