Skip to content
This repository has been archived by the owner on Jan 7, 2023. It is now read-only.

Demos don't compile out of the box for wayland #38

Closed
gemath opened this issue Mar 31, 2019 · 5 comments
Closed

Demos don't compile out of the box for wayland #38

gemath opened this issue Mar 31, 2019 · 5 comments

Comments

@gemath
Copy link

gemath commented Mar 31, 2019

When building for Wayland, demos/common/egl_helper.cppmust be compiled with -DSDL_VIDEO_DRIVER_WAYLAND. If the config could set that automatically, everything would work out of the box.

@krogueintel
Copy link
Contributor

Hi,

I think that define is supposed to come from SDL2's SDL_config.h header. As far as I know, that define is used just in SDL_syswm.h to include the member struct that is referenced in egl_helper (specifically w.info.wl). The demos build out of the box under Ubuntu based distros and several others I have tested.

That it fails to build is quite troubling, what Linux distro does it not build under without adding the SDL_VIDEO_DRIVER_WAYLAND ?

-Kevin

@krogueintel
Copy link
Contributor

I did a significant update: I removed the entire EGL binding system from the demos and FastUIDraw. It was made (quite some time ago) when I had encountered issues with letting SDL2 get an GLES context itself (the issue only manifested on one platform I tested and I suspect it was caused by an error I made). The upshot is that the demos transparently rely on SDL2 to do the right thing about the windowing system and getting a GL/GLES context instead of having an option to do it itself.

Let me know if this works fine for you and if it does, I will close the issue.

@krogueintel
Copy link
Contributor

Did the latest commits resolve your issues?

@gemath
Copy link
Author

gemath commented Apr 19, 2019

You catch me on a vacation with a bad internet connection, give me a few days :o)

@gemath
Copy link
Author

gemath commented May 23, 2019

Sry for taking such a long time. It works for me now. In case it still matters: I use Void Linux with sway (Wayland compositor with XWayland support).

@gemath gemath closed this as completed May 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants