Use X11/Wayland GLFW on linux aarch64, not EGL/GLES - #8550
Draft
danoli3 wants to merge 1 commit into
Draft
Conversation
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).
ofTheo
reviewed
Aug 31, 2026
| glfwTerminate(); | ||
| ofLogNotice("ofAppGLFWWindow") << "Wayland init failed, trying X11"; | ||
| } | ||
| glfwInitHint(GLFW_PLATFORM, GLFW_PLATFORM_X11); |
Member
There was a problem hiding this comment.
the GLFW_PLATFORM_WAYLAND lines above can't be approved as Native Wayland breaks core ofSetWindowPos ofSetWindowShape functionality.
Member
Author
There was a problem hiding this comment.
I'll test it out. Yeah moved to draft
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
marked this pull request as draft
September 1, 2026 13:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Native ARM64 Linux builds GLFW with both X11 and Wayland backends (the ARM64 setup already installs Wayland, xkbcommon, and X11 headers).
armv6l/armv7lstill disable those and use EGL/GLES.linuxaarch64was still pullingglesv1_cm/glesv2/egl, andInitGLFW()always forcedGLFW_PLATFORM_X11. That meant a packagedlibglfw3.awith 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__→ desktopTARGET_LINUX(GLFW), notTARGET_LINUX_ARM+TARGET_OPENGLESconfig.linuxaarch64.default.mk: drop EGL/GLES pkg-config (desktop GL comes fromconfig.linux.common.mkbecauseLINUX_ARMis not set for aarch64)config.linux.common.mk: on desktop linux (x86_64 and aarch64), pkg-config-linkwayland-client,wayland-cursor,wayland-egl,xkbcommon,libdecor-0when presentofAppGLFWWindow: ifWAYLAND_DISPLAYis set, try Wayland, then fall back to X11wayland,libxkbcommon,libdecor(Debian/Ubuntu/Fedora already had them)armv6l / armv7l are unchanged (EGL/GLES).