You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
imGuIZMO.quat/basic_examples/cube_WGPU
BrutPitt fefebb2726 Adaptation to the last Google DAWN commit (2025-03-31): 1411699ba4cdf29eca037c4320543ab8189bad28 3 months ago
..
GLFW Adaptation to the last Google DAWN commit (2025-03-31): 1411699ba4cdf29eca037c4320543ab8189bad28 3 months ago
readme.md ImGuIZMO_quat v4.0 WiP - WebGPU / WGPU basic examples (GLFW) 4 months ago

readme.md

vGizmo3D - WGPU / WebGPU example

This is a easy example that use WebGPU as graphics backend . It was written in C++ and can be compiled in native mode (for a standalone desktop application) or with EMSCRIPTEN to perform it via the web browser

*It's necessary to use a browser with WebGPU capabilities: e.g. Chrome-Canary, FireFox Nightly, Safari Technology Preview ...

This example use Google DAWN (as WGPU SDK) to build native executable (CMakeLists.txt).

How to Build

It's necessary to have installed GLFW (development package) and python3 (Google DAWN requires)

Native - Desktop application

  • clone Google DAWN (WGPU SDK): git clone https://dawn.googlesource.com/dawn
  • Install Ninja build system (DAWN requires)
  • from/inside cube_WGPU folder type: cmake -B build -DCURRENT_DAWN_DIR=path/where/cloned/dawn (absolute or relative path)
  • then cmake --build build

Emscripten - Web Browser application (WASM)

then

  • emrun build/name_of_example.html

or

  • python -m http.server (in build folder)... then open WGPU browser with url: http://localhost:8000/name_of_example.html