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
[core] Fullscreen mode not working properly in some monitors #31
Comments
After some testing with GLFW library, it seems window scaling depends GPU and monitor capabilities. On an nvidia GPU I get fullscreen scaling despite the adjustment of resolution to a supported videomode resolution; on an Intel HD Graphics GPU I get no scaling to fullscreen (image just centered in monitor). From GLFW documentation:
Useful documentation: GLFW: Window creation |
Further investigations: On nvidia GPU (image scaled to fullscreen - full monitor area), if using a valid videomode and 16:9 aspect ratio for framebuffer, all works ok. On Intel HD Graphics GPU (image not scaled to full monitor area, just centered), if using a valid monitor videomode and 16:9 aspect ratio for framebuffer, not scaled but centered ok. In any other configuration image gets cut or wrongly scaled or even wrong positioned in monitor area... very weird... Issue also seems to be related to the framebuffer redimension I do to match the monitor aspect ratio (adding black bars up-down or right-left). UPDATE 1: Intel HD Graphics not scaling to fullscreen is a know driver issue. UPDATE 2: The real problem resides on framebuffer redimension (adding black bars) to match monitor (display) aspect ratio; when doing that, selected framebuffer could be not compatible with a supported videomode. SOLUTION: Redimension framebuffer (adding black bars) but matching the closest supported videomode. |
This issue is quite a nightmare... some code updated with commit 6981e2b Now, I check for monitor supported videomodes and I choose the closest videomode to the desired screen size. I set that mode to be the display size and I calculate the render size and viewport offsets considering that display size. It works... but I find another issue, what happens if the supported videomode does not match the monitor default aspect ratio? Example:
The result is: it renders correctly in the 800x600 framebuffer but, as long as the monitor aspect-ratio is 16:9, it gets stretched by the sides once displayed on the monitor. When using weird screen sizes, the problem is worst (as expected...). Possible solutions:
Note that this issue is limited to PLATFORM_DESKTOP and desktop monitor videomodes, on other platforms (Android, HTML5) fullscreen mode is managed correctly. I'll keep this issue open for the future... |
After long time thinking I concluded that most users will limit to a set of standard resolutions (like most of the games offer), some 4:3 and some 16:9. There is no point in trying to support any weird resolution provided... in that case it will be addressed by case. Just closing this issue, if someone feels it needs to be considered, please, feel free to reopen it. |
When compiling a program to be fullscreen, depending on the monitor it runs it is not scaled (just centered on the screen) or not scaled properly. It seems this issue could be related to monitor supported videomodes; GLFW library initializes the correct videomode.
To enable fullscreen mode, call
SetConfigFlags(FLAG_FULLSCREEN_MODE)
beforeInitWindow()
Related functions [core.c]:
Useful code snippet:
Tested on Windows platform
The text was updated successfully, but these errors were encountered: