-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[rcore] Screen Size, Render Size, Monitor Size, DPI Scale consistency #4146
Comments
@SoloByte Thanks again for the detailed report and the review of this improvement! It seems there are many issues involved, quite overwhelming... |
I stiil can not wrap my head around half of the windowing stuff ;) I just wanted to put the information out so there is something to go by. The window overhaul or maybe even #4151 PR will fix all of that and I can just close this issue 👍 ( In my dreams xD ) |
@SoloByte All windowing/display/screen logic has been a pain for years, with multiple reviews and redesigns, last one I did was when window-config flags were added, I think it was for 4.5. There were also some reviews for 5.0 with the platform-split... This seems to be the new big redesign but the truth is that it is a bit scary; in my experience, there are so many possible scenarios (display, monitor, fullscreen, windowed, highDPI, 4K, multimonitor...) that finding a solution working on all them (and cross-platform) seems a extremely complex puzzle to solve. Not to mention the potential maintenance work. Still, let's see what comes out! |
I absolutely agree! To me it feels like a 4 dimensional rubiks cube ^^ My main problem is that the windowing system is so fundamental to any application that it not working correctly is really hard to deal with. I am not even talking about any special cases but for example that fullscreen is not working or working differently on all the platforms makes it really difficult. One big decision to think about is if raylib should open up certain functionalities so the user can implement them. Right now raylib tries to take care of everything in the windowing system and tries to solve all the problems for all the different setups which might be almost impossible to achieve. This approach is really nice if it works but if it doesn't the user has no real way to deal with it on their end... For instance if raylib has certain functions in the core class that are used to keep the internals of raylib working (like SetupFramebuffer(), SetViewport(), etc.) and raylib just provides a wrapper around certain backends like GLFW, the windowing & input system could be outsourced. Of course I do not know enough about raylib if this is even possible at all but it might be something to think about. Anyway we will keep working on the window system and see what happens :) |
Issue Description
The following things are what I understand about screen size, monitor size, and render size. I do not know if I am correct at all. My main goal here is to figure out together what each of this numbers should represent independent of the the operating system.
Related Issues
ToggleFullscreen()
not working as expected with HighDPI mode enabled #3972 (comment)ToggleFullscreen()
andToggleBorderlessWindowed()
not working on Linux ? #4140My findings:
Windows
Windowed
Maximized
Borderless Fullscreen
Fullscreen
MacOS
Windowed
Maximized
Borderless Fullscreen
Fullscreen
Monitor Size is always 1920x1080 irregardless of the dpi value (on a 4k screen with system setting resolution set to 1920x1080)
Linux
Can not test it.
Examples
To me personally only Example A makes sense. (on all operating systems. I do not know how scaling works on windows but on macOS it can only be 1, 1 or 2, 2. There are other combinations possible as well not just the ones from example A & B but I didn’t want to write them all down ;)
Example A
4k monitor
Scaling Factor 200%
Windowed Mode
Fullscreen Mode
Scaling Factor 100%
Example B
4k monitor
Scaling Factor 200%
Windowed Mode
Fullscreen Mode
Scaling Factor 100%
The text was updated successfully, but these errors were encountered: