From e8b8be7ad81166f67c724e8ca927ba2f01480d18 Mon Sep 17 00:00:00 2001 From: Milenko <39630670+MrMilenko@users.noreply.github.com> Date: Thu, 12 Nov 2026 19:18:36 -0500 Subject: [PATCH] Keep every renderer while raising OpenGL to 3.3 Defining BGFX_CONFIG_RENDERER_OPENGL turned off bgfx's default renderer list, so the Windows build only had OpenGL and Linux lost Vulkan. Setting the minimum OpenGL version instead keeps Direct3D 11, Vulkan and the rest. --- .github/workflows/build.yml | 6 +++--- .github/workflows/release.yml | 6 +++--- docs/desktop/building.md | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b654b5d..76fc1b4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -107,7 +107,7 @@ jobs: cd theseus/third-party/bgfx ../bx/tools/bin/linux/genie --gcc=linux-gcc gmake make -C .build/projects/gmake-linux-gcc -j$(nproc) \ - bx bimg bgfx config=release64 CXXFLAGS=-DBGFX_CONFIG_RENDERER_OPENGL=33 + bx bimg bgfx config=release64 CXXFLAGS=-DBGFX_CONFIG_RENDERER_OPENGL_MIN_VERSION=33 - name: Build libdatachannel # See the macOS job: no lib means xCloud quietly compiles out. @@ -175,7 +175,7 @@ jobs: find .build/projects/gmake-linux-gcc -name '*.make' -exec \ sed -i -e 's/-m64//g' -e 's/-mfpmath=sse//g' -e 's/-msse4.2//g' {} + make -C .build/projects/gmake-linux-gcc -j$(nproc) \ - bx bimg bgfx config=release64 CXXFLAGS=-DBGFX_CONFIG_RENDERER_OPENGL=33 + bx bimg bgfx config=release64 CXXFLAGS=-DBGFX_CONFIG_RENDERER_OPENGL_MIN_VERSION=33 - name: Build libdatachannel # See the macOS job: no lib means xCloud quietly compiles out. @@ -282,7 +282,7 @@ jobs: make -C .build/projects/gmake-mingw-gcc -j$(nproc) \ bx bimg bgfx config=release64 \ CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ \ - CXXFLAGS=-DBGFX_CONFIG_RENDERER_OPENGL=33 + CXXFLAGS=-DBGFX_CONFIG_RENDERER_OPENGL_MIN_VERSION=33 - name: Fetch mingw deps (openssl, opus, ffmpeg) # OpenSSL and opus come prebuilt from MSYS2; ffmpeg is built here, diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cd6f216..6cb6ae8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -213,7 +213,7 @@ jobs: cd theseus/third-party/bgfx ../bx/tools/bin/linux/genie --gcc=linux-gcc gmake make -C .build/projects/gmake-linux-gcc -j$(nproc) \ - bx bimg bgfx config=release64 CXXFLAGS=-DBGFX_CONFIG_RENDERER_OPENGL=33 + bx bimg bgfx config=release64 CXXFLAGS=-DBGFX_CONFIG_RENDERER_OPENGL_MIN_VERSION=33 - name: Build libdatachannel # See the macOS job: no lib means xCloud quietly compiles out. @@ -343,7 +343,7 @@ jobs: find .build/projects/gmake-linux-gcc -name '*.make' -exec \ sed -i -e 's/-m64//g' -e 's/-mfpmath=sse//g' -e 's/-msse4.2//g' {} + make -C .build/projects/gmake-linux-gcc -j$(nproc) \ - bx bimg bgfx config=release64 CXXFLAGS=-DBGFX_CONFIG_RENDERER_OPENGL=33 + bx bimg bgfx config=release64 CXXFLAGS=-DBGFX_CONFIG_RENDERER_OPENGL_MIN_VERSION=33 - name: Build libdatachannel # See the macOS job: no lib means xCloud quietly compiles out. @@ -497,7 +497,7 @@ jobs: make -C .build/projects/gmake-mingw-gcc -j$(nproc) \ bx bimg bgfx config=release64 \ CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ \ - CXXFLAGS=-DBGFX_CONFIG_RENDERER_OPENGL=33 + CXXFLAGS=-DBGFX_CONFIG_RENDERER_OPENGL_MIN_VERSION=33 - name: Fetch mingw deps (openssl, opus, ffmpeg) # OpenSSL and opus come prebuilt from MSYS2; ffmpeg is built here, diff --git a/docs/desktop/building.md b/docs/desktop/building.md index ae7d58b..30a7718 100644 --- a/docs/desktop/building.md +++ b/docs/desktop/building.md @@ -42,16 +42,16 @@ make -C .build/projects/gmake-osx-arm64 -j$(sysctl -n hw.ncpu) bx bimg bgfx conf # Linux ../bx/tools/bin/linux/genie --gcc=linux-gcc gmake make -C .build/projects/gmake-linux-gcc -j$(nproc) bx bimg bgfx config=release64 \ - CXXFLAGS=-DBGFX_CONFIG_RENDERER_OPENGL=33 + CXXFLAGS=-DBGFX_CONFIG_RENDERER_OPENGL_MIN_VERSION=33 # Windows, cross from Linux ../bx/tools/bin/linux/genie --gcc=mingw-gcc gmake make -C .build/projects/gmake-mingw-gcc -j$(nproc) bx bimg bgfx config=release64 \ CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ \ - CXXFLAGS=-DBGFX_CONFIG_RENDERER_OPENGL=33 + CXXFLAGS=-DBGFX_CONFIG_RENDERER_OPENGL_MIN_VERSION=33 ``` -The OpenGL renderer needs `BGFX_CONFIG_RENDERER_OPENGL=33`. Without it bgfx targets OpenGL 2.1, compiles the shaders as GLSL 1.20, and strict drivers reject them, which leaves a black screen and then a crash. +The OpenGL renderer needs `BGFX_CONFIG_RENDERER_OPENGL_MIN_VERSION=33`. Without it bgfx targets OpenGL 2.1, compiles the shaders as GLSL 1.20, and strict drivers reject them, which leaves a black screen and then a crash. Always give `-j` a number. A bare `-j` starts every compile at once, and on a small machine that runs it out of memory and can freeze the whole desktop. If a low RAM machine with no swap still struggles, use a smaller number than the core count. The same goes for every `make` and `cmake --build` below.