I am looking into implementing support for the Wayland protocol (https://github.com/christianrauch/blender/tree/wayland) and have the basic EGL context creation and event handling ready.
There is an alternative blender-wayland project, by Wander Lairson Costa, that implements Wayland support via the deprecated
wl_shell interface for a much older blender version. I wasn’t able to rebase this on the current master because of many changes in the context creation API.
I eventually re-wrote the Wayland support from scratch, with inspirations from this project, using the modern
I had to make some changes to the
GHOST_ContextEGL class to get it to compile. As far as I can tell, this class is not actively used in the blender codebase (and compiling with
-DWITH_GL_EGL will indeed fail).
I still encounter issues using the EGL context, specifically I am unable to switch contexts between windows, e.g. when opening and closing the file menu, I will get
EGL_BAD_DISPLAY: An EGLDisplay argument does not name a valid EGL display connection.. Since there is no working usage of that context class, I am not sure at this point if this is caused by the handling of the context on the GHOST-Wayland side, or if it is a missing functionality of the
Is the EGL context in blender fully supported? How would I make sure that the context gets properly manages when constructing and destructing child windows?