-
Notifications
You must be signed in to change notification settings - Fork 107
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
Fixes for GLFW on Wayland #35
base: master
Are you sure you want to change the base?
Conversation
Hm....appveyor doesn't seem to like it? |
Otherwise, e.g. re3 gets the same issue as https://stackoverflow.com/q/35245809 e.g. on Wayland where transparency is the default
glfwGetFramebufferSize is scaled by the display scale. This fixes the game being shrunk to the bottom left quarter of the window on Wayland HiDPI setups.
hm, |
Hm....I'm not happy about 0 alpha bits. FB alpha may not be used in gta 3 but it is used in PS2 VC (for water) and SA (for moon phases) so I think we need some other solution here. is there a way to figure out if you're running on wayland at runtime perhaps? |
Hmm, how would FB alpha be used for that? Surely no game ever wants to have other desktop windows visible through game objects.. Blending alpha directly to the FB works fine, GTA3 uses this even for the menu — which is why I can see my terminal through this selected menu item without the patch: I'm pretty sure other platforms are already using 0 alpha bits because no preference was provided. Actually, please do check |
FB alpha isn't used to make the window transparent, it's used for certain kinds of blending. As i said it's not even used in the PC gta games, but on the PS2 it is used so I would like to have it available if possible. I realize that my handling of it isn't great yet, but i certainly don't want to force it to 0. |
Interesting, how does that even work? I guess there's nothing behind the "window" on the PS2 so having alpha there is fine, but then how is it used for blending.. is it blending the current FB contents onto something? I think if you try to run these effects on PC (GLFW), you're likely to get that window transparency.. And setting this in GLFW doesn't impact the PS2 backend. |
it's called destination alpha. it's just some value in the framebuffer that you can use in the blending equation. The reason i want it is because these things aren't really PS2 specific. d3d and opengl support it. We should find another way to decide if we have to set it to 0. |
be58703
to
3e2080a
Compare
This is a GLFW bug that should be fixed there, imo. There are also other bugs with GLFW on wayland like this: glfw/glfw#1710 |
Corresponding re3 PR: GTAmodding/re3#723