-
Notifications
You must be signed in to change notification settings - Fork 105
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
Fix for high-dpi resolution when using OpenGL #64
base: master
Are you sure you want to change the base?
Conversation
Add basic OpenGL DPI Scaling
Fix missing / hung image on 1.0 dpi
Looks like I'll have to add the null to the other devices. |
Better non-braching check
this fixes GTA3, but causes scaling issues on vice city when using an external monitor (mac M1) |
(external monitor was working fine for both before) |
actually it still only fills 1/4 of the screen in both on my M1 macbook pro screen |
Can you describe the issue? I haven’t built Vice City on my M1. As for the overall size, was that a problem on GTA 3 as well? I don’t have an external monitor, so I can’t reliably test that. On my M1 with hidpi on and off though I have no problem. |
I clone your fork and drop the librw folder into the vendor folder of the game project, build all targets and on my macbook screen, the video doesn't fill the whole screen, just a portion of it (in both gta3 and vice city) |
screenshot: https://i.imgur.com/IlxajkA.jpg |
Strange, which macbook and which version of OSX? |
latest OS and MBP M1 16gb, |
I use GMAKE2 from the premake. |
Same for me. No special settings - should it work by simply replacing the librw folder with yours? Or is there another step ? |
I changed and pulled the latest. I could see about uploading a build from my machine to see the behavior on yours. |
Add default/null dpiScale for other apis
SDL2 checking
Happy to try it to rule out any mistakes on my side ! |
Drop that in your install directory and then just |
This looks extremely hacky and I won't merge it unless there is absolutely no other way around it. Would be better to figure out what the actual cause for the bug is. my opengl code isn't the best so it's quite likely it can be fixed cleanly. |
I agree
When trying to fix it, changing the frame buffer manually to the w,h from I've never used OpenGL before, but I can keep looking. |
Ok this is resolved for me by using glfw 3.3.8. Nice got it working well on a intel macbook! |
This is a fix for #63
Other device apis should be checked for regressions. There is an added inline for the null device that returns a scaling factor of 1,1 but unsure if this alone is enough to satisfy other apis.