Skip to content
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

[Feature request] Support Wayland natively #967

Open
liferooter opened this issue Jul 22, 2021 · 5 comments
Open

[Feature request] Support Wayland natively #967

liferooter opened this issue Jul 22, 2021 · 5 comments

Comments

@liferooter
Copy link

It will be good to support Wayland. I still can run OpenSpades on Wayland via XWayland, but it works bad with some features such as scaling (personally I use 1.25 scaling on my 14" laptop). If you use scaliing on Wayland, all XWayland clients become blurry, OpenSpades becomes unplayable.

@NotAFile
Copy link
Contributor

This should just require an upgrade of the windowing library?

@liferooter
Copy link
Author

liferooter commented Jul 22, 2021

This should just require an upgrade of the windowing library?

OpenSpades uses OpenGL, it's not as trivial as it would be with GTK or Qt. Wayland uses EGL, X uses GLX

@yvt
Copy link
Owner

yvt commented Jul 22, 2021

SDL2 does have a Wayland support (libsdl-org/SDL#2710), which can be enabled by specifying env SDL_VIDEODRIVER=wayland. GLEW needs to be configured for EGL at build time (glew vs glew-egl on NixOS); otherwise it'll fail to initialize with "Unknown error".

I tried this just now (coincidentally I use a Wayland-based desktop and 1.25 scaling, too). Unfortunately, it seems more broken than running on XWayland in the following ways:

@NotAFile
Copy link
Contributor

NotAFile commented Jul 22, 2021

OpenSpades uses OpenGL, it's not as trivial as it would be with GTK or Qt. Wayland uses EGL, X uses GLX

That has nothing to do with each other. You can request a variety of contexts (including OpenGL) via EGL and other APIs both under Wayland and X. Wayland just gives you a buffer, it doesn't care much how you render into it.

@unmellow
Copy link

unmellow commented Sep 6, 2023

considering i don't see it mentioned, thought i would let you know that on manjaro sway (version 1.8.1) the mouse is invisible when SDL_VIDEODRIVER is set to wayland

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants