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
OpenGL full screen not centered #29
Comments
This happens also on Windows. It started occurring with my first fork release. I guess it has something to do with |
If I remove |
Stretched is not good, aspect ratio should be correct. |
Can you tell me why full screen size on Linux stretches the graphics to fit the screen, while on Mac/Windows it is not stretched, but just adds black areas around the graphics? So my approach would be:
UPDATE: Using a calculated scaling factor is not possible without major refactoring. Not planned. |
That’s one of the mysteries that would really be interesting to know😎 Black bars should be only left and right, or did I misunderstand something? |
I just read the manual of glViewport. As far as I understand this, the initial values are 0,0 for the lower left corner - which would explain why it’s not centered. |
It's just the start coordinate. The full screen flag should just do what it says... But why the hell does it work on Linux and not Windows/Mac? |
New release is out. Let me know what you think. Note that the user defined scaling factor is relevant. |
Generally a good workaround! But I’m not fully happy with the slightly stretched screen as there are more visual distortions when using shaders like crt-geom so a correct aspect ratio would be nicer (with black bars left and right on a 16:9 display). But at least this option can be switched on/off…😎 |
There is a small repeatable bug:
Not a big deal, just a minor issue. |
To be honest, I would rather always have a cantered full screen and an option to stretch a visual area to bounds (which may causes visual distortions) or do not stratch and have a precise visual area aspect ratio (with black bars left and right). |
I don't have a better solution. This is the reason why this issue is marked with help wanted. |
@renyxadarox wrote
I could reproduce it on Windows. IMHO this is an OpenGL bug or feature. I guess that it's not centered at the beginning is the bug. My setting just adds a workaround... |
Maybe Czirkos Zoltan can help? Or maybe there are websites where these things could be asked? I’m no programmer unfortunately… |
I have updated SDL: mingw-w64-x86_64-SDL2 2.26.5-1 -> 2.28.2-1 |
To preserve the aspect ratio you need to set a higher scaling factor. Forgot to mention that. |
Now I know that this happens on all platforms and if it happens depends on the screen size. |
I thought I have fixed it, now my Linux laptop it does cut off the score for 40x22 view. (Release 1.9.5) So the conclusion is: Whenever UPDATE: The weird results came from using |
When pressing F11 to switch to full screen, the screen is not centered in OpenGL in MacOS (displayed on the left side instead of centered). It is centered in SDL and GTK+.
The text was updated successfully, but these errors were encountered: