Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions docs/desktop/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Loading