Wayland and EGL support

This is a fork of the repository that I linked in my initial post. I wasn’t able to rebase it on current master, it uses deprecated interfaces and is missing functionality, like custom cursors.

Yes, you can use the X11 version of Blender via Xwayland on any Wayland session. However, the aim of this work is to provide native Wayland communication with all its benefits :slight_smile:

I am aware of the GHOST-SDL bindings. However, they are not active by default and even if you activate them manually, SDL is not using Wayland by default. To used Blender on Wayland, you have to compile it manually with GHOST_SystemSDL, and set the environment variable. And if you go along that path, i.e. if GHOST_SystemSDL is promoted as platform-abstraction, it should be made the default and replace GHOST_SystemX11, GHOST_SystemWin32, GHOST_SystemCocoa, etc.

Since Wayland is independent of OpenGL or Vulkan, not much apart from the context creation would change. The majority of window and input handling, and additional protocols will stay the same. So once you switch from OpenGL to Vulkan, it’s worth to either adapt the context creation in your manually maintained GHOST layer, or wait until SDL adopts Vulkan.


I actually did not intend to discuss too much about platform-abstracting alternatives to the custom GHOST layer. My reasons to go with a native Wayland implementation over SDL are mainly that

  1. GHOST_SystemSDL is not the default on Linux/Windows/macOS
  2. SDL is not using Wayland by default
  3. SDL, compared to a toolkit like Qt or GTK, will likely not implement all functionality that may be required by desktop applications, e.g. on-screen keyboards and touchpad gestures

But if it is decided by the Blender developers that SDL will replace all custom platform-specific GHOST layers, and thus making GHOST obsolete, and that any Wayland patches will not be accepted, then there is no point for me (or anyone else) to go on with this work.