-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Question - SDL2] Opt-out of "forcing X11" mech with GLEW&Co? #10385
Comments
The quickest fix is to set the environment variable (If it's figuring out it's on Wayland by what backend SDL is choosing, we have a bigger problem and should probably have a separate hint to disable this check.) |
(Also, while we should make this work, my heretical opinion is no one should be using GLEW at all, since you can easily query the extensions and entry points you need through SDL without having this weird X11 dependency, but that's just my opinion.) |
If the game supports both Wayland and X11 equally well, and doesn't know ahead of time whether its users are going to be running it on a Wayland-only, X11-only or Wayland-and-Xwayland system, would
I don't think that's actually heretical, and I would tend to agree - but the motivation for #8812 was that there are already games that blindly assume X11 and will crash if it isn't used, and if SDL2 is going to meet its "safe to upgrade, no regressions" goal, then it needs to avoid breaking those games' assumptions, even if the assumptions are wrong. Unfortunately there's no amount of "this is a bad pattern, don't use it in new code" that will fix pre-existing binaries! |
Many apps/games don't even need glew like it is used (with Sadly the glew maintainer never released a version with that patch merged, so for example ddnet could never use |
Hello.
Suppose:
Now, with commit bd2f1e9 (discussed in #8812), if I understand correctly, if we run the game on this Wayland-only system the video driver will be arbitrarily set to
x11
regardless of the fact that:x11
isn't available at runtime on the machineIn practice, this behavior results in the game failing to load complaining that "x11 isn't available" unless further action is taken by the developer or the enduser.
The matter can be generalized if we acknowledge that, as @smcv mentioned here #8812 (comment), on certain conditions the GLX flavour of GLEW actually works enough on Wayland and that a developer may actually want to use OpenGL regardless.
Now the question becomes, what is the intended way to opt-out of this "quirks" mechanism?
I suppose one must now do
SDL_SetHint(SDL_HINT_VIDEODRIVER, "x11,wayland")
, because this way the condition to trigger the new 'quirks' mech wouldn't trigger.Can anybody confirm that that is the proper solution to the case? Is this intended?
CC: @slouken (as the author of the aforementioned commit)
Thank you :3
The text was updated successfully, but these errors were encountered: