webgpu-starter
webgpu-starter copied to clipboard
Base code for starting a WebGPU project using Dawn (C++). Native and WebAssembly builds
WebGPU starter
Base code for starting a WebGPU project using Dawn (C++).
Dependencies:
- Dawn: https://dawn.googlesource.com/dawn
- GLFW: https://www.glfw.org/
Build
Native:
mkdir -p dist/native && cd dist/native
cmake -DCMAKE_BUILD_TYPE=Release ../..
make -j 10
Web:
mkdir -p dist/web && cd dist/web
emcmake cmake -DCMAKE_BUILD_TYPE=Release ../..
make -j 10
Update dependencies
Prerequisites:
- git
- python
- depot_tools: https://chromium.googlesource.com/chromium/tools/depot_tools.git
# Update all submodules to the latest commit on the upstream.
git submodule update --remote --merge
# Pull Dawn external packages.
cd lib/dawn && gclient sync