-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Separate concept of window size from default framebuffer size #1750
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
Conversation
1e982f3 to
ffaed08
Compare
jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglWindow.java
Outdated
Show resolved
Hide resolved
|
Note: I'll need to rebase this PR manually if we decide to merge #1753 since they conflict. |
We'd better integrate 1753 first then, since I'm hoping to cherry-pick 1753 into the "v3.5" branch. |
…e not always interchangeable in modern platforms. Add methods to query both sizes from AppSettings
|
Rebased. If there isn't any objection i'll merge. |
…flow, for wrong FB size bug on first frames.
|
I need more time to study this. |
…nitialized. Call rescale only when scale changes. Update scale and size when window size changes (if needed).
|
Yes it can be implemented as a default method, they should be supported by android at this point.
I copied the reshape implementation
Actually it is not internal use only, so the comment needs to be removed |
|
Fixed. |
|
jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglWindow.java
Outdated
Show resolved
Hide resolved
jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglWindow.java
Outdated
Show resolved
Hide resolved
jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglWindow.java
Outdated
Show resolved
Hide resolved
|
@riccardobl are you still available to work on this PR? |
|
Sure. I'll fix the issues asap (tomorrow?) |
This pr makes AppSettings.getWidth/Height return the size of the default framebuffer that is usually what is expected by user code. New methods to set and get window size are added.
The change is backward compatible.
The PR removes also a workaround that caused the engine to be aware of high DPI resolution after the second frame, in my tests waiting two frames has proven to be unnecessary.
EDIT: added rescale listener that propagates the high dpi scaling. Can be used for example to multiply the size of GUI elements.