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.