pl/notes.org
2024-11-17 17:19:46 +01:00

701 B

There are four ways (it would seem) to render pixels to a wayland surface:

  1. wl_shm using shared memory, aka directly telling wayland the color of each pixel to draw using software rendering.
  2. Using a wl_shell_interface to create a wl_shell_surface, then use the wl_egl_ functions to draw pixels.
  3. Using a wl_surface directly? Apparently not all compositors implement the wl_shell_interface protocol, and checking the source code from SDL's repository they do not even look for it.
  4. Using extensions like wl_egl_window_create to hook a wayland window to a OGL rendering context. This link seems to agree with me: https://www.gfxstrand.net/faith/projects/wayland/wayland-android/