From f96f6f8a8a1031ebac45fe1bf6b4f4ed778dc7d9 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Mon, 23 Feb 2026 18:49:15 -0800 Subject: [PATCH] add PLATFORM_OFFSCREEN support for headless EGL rendering Link with -lEGL (and existing -lGL) instead of -lX11 when building for PLATFORM_OFFSCREEN. This enables headless rendering via EGL surfaceless platform without requiring a display server. Co-Authored-By: Claude Opus 4.6 --- raylib/build.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/raylib/build.py b/raylib/build.py index 71aee53..29ad5bc 100644 --- a/raylib/build.py +++ b/raylib/build.py @@ -181,6 +181,8 @@ def build_unix(): elif RAYLIB_PLATFORM=="PLATFORM_COMMA": extra_link_args.remove('-lGL') extra_link_args += ['-lGLESv2', '-lEGL', '-lgbm', '-ldrm'] + elif RAYLIB_PLATFORM=="PLATFORM_OFFSCREEN": + extra_link_args += ['-lEGL'] else: extra_link_args += ['-lX11'] extra_compile_args = ["-Wno-incompatible-pointer-types", "-D_CFFI_NO_LIMITED_API"]