Install the following dependencies:
- git
- Python
- CMake
- A C++ compiler (eg. MSVC, gcc, clang)
- If building on Linux, GLFW dependencies
Use the configure script to configure the build. Use --help to see the options.
python ./configure.py --dawn --wgpu --target release
To build with the Dawn backend (--dawn), you need to setup Dawn's dependencies.
- If on Linux, install:
sudo apt-get install libxrandr-dev libxinerama-dev libxcursor-dev mesa-common-dev libx11-xcb-dev pkg-config nodejs npm
Otherwise, no additional work is necessary.
To build with the wgpu backend (--wgpu), you need to setup wgpu's dependencies.
- Download and install the wgpu-native prerequisites described in the docs. You don't need the dependencies for the native examples.
Install Android Studio and use it to download Android SDK and NDK 27.1.12297006.
Enable Android builds and set the NDK path when configuring the build.
python ./configure.py --dawn --wgpu --android --ndk PATH_TO_NDK_DIRECTORY --target release
Use the fetch_modules script to download submodules according to the configuration.
python ./fetch_modules.py
Rerun the command after changing the configuration or checking out a new commit.
python ./build.py