Skip to content

Use X11/Wayland GLFW on linux aarch64, not EGL/GLES - #8550

Draft
danoli3 wants to merge 1 commit into
openframeworks:masterfrom
danoli3:linux-aarch64-glfw-x11-wayland
Draft

Use X11/Wayland GLFW on linux aarch64, not EGL/GLES#8550
danoli3 wants to merge 1 commit into
openframeworks:masterfrom
danoli3:linux-aarch64-glfw-x11-wayland

Conversation

@danoli3

@danoli3 danoli3 commented Aug 31, 2026

Copy link
Copy Markdown
Member

Why

Native ARM64 Linux builds GLFW with both X11 and Wayland backends (the ARM64 setup already installs Wayland, xkbcommon, and X11 headers). armv6l / armv7l still disable those and use EGL/GLES.

linuxaarch64 was still pulling glesv1_cm / glesv2 / egl, and InitGLFW() always forced GLFW_PLATFORM_X11. That meant a packaged libglfw3.a with both backends could not actually run Wayland, and aarch64 looked like the Pi GLES target.

openFrameworks only needs to link the right windowing libs and select the backend at runtime.

Changes

  • ofConstants.h: __aarch64__ / __ARM64__ → desktop TARGET_LINUX (GLFW), not TARGET_LINUX_ARM + TARGET_OPENGLES
  • config.linuxaarch64.default.mk: drop EGL/GLES pkg-config (desktop GL comes from config.linux.common.mk because LINUX_ARM is not set for aarch64)
  • config.linux.common.mk: on desktop linux (x86_64 and aarch64), pkg-config-link wayland-client, wayland-cursor, wayland-egl, xkbcommon, libdecor-0 when present
  • ofAppGLFWWindow: if WAYLAND_DISPLAY is set, try Wayland, then fall back to X11
  • Arch deps: wayland, libxkbcommon, libdecor (Debian/Ubuntu/Fedora already had them)

armv6l / armv7l are unchanged (EGL/GLES).

Native ARM64 Linux ships GLFW with both windowing backends.
Stop linking glesv1_cm/glesv2/egl on linuxaarch64 (that path stays
on armv6l/armv7l), treat __aarch64__ as desktop TARGET_LINUX, link
Wayland/xkbcommon when present, and pick Wayland or X11 at runtime
from WAYLAND_DISPLAY (falling back to X11).
glfwTerminate();
ofLogNotice("ofAppGLFWWindow") << "Wayland init failed, trying X11";
}
glfwInitHint(GLFW_PLATFORM, GLFW_PLATFORM_X11);

@ofTheo ofTheo Aug 31, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the GLFW_PLATFORM_WAYLAND lines above can't be approved as Native Wayland breaks core ofSetWindowPos ofSetWindowShape functionality.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll test it out. Yeah moved to draft

@ofTheo

ofTheo commented Aug 31, 2026

Copy link
Copy Markdown
Member

Just a heads up @danoli3 - totally fine for ARM64 Linux builds to be treated like regular TARGET_LINUX, but we should always be doing GLFW_PLATFORM_X11 and never GLFW_PLATFORM_WAYLAND even for systems running Wayland, as Wayland has no way to programmatically move or resize windows.

So as is, please don't merge this.

@danoli3
danoli3 marked this pull request as draft September 1, 2026 13:48
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

Successfully merging this pull request may close these issues.

2 participants