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/examples/WGPU
BrutPitt fefebb2726 Adaptation to the last Google DAWN commit (2025-03-31): 1411699ba4cdf29eca037c4320543ab8189bad28 3 months ago
..
lightCube_GLFW Adaptation to the last Google DAWN commit (2025-03-31): 1411699ba4cdf29eca037c4320543ab8189bad28 3 months ago
lightCube_SDL2 Adaptation to the last Google DAWN commit (2025-03-31): 1411699ba4cdf29eca037c4320543ab8189bad28 3 months ago
readme.md ImGuIZMO_quat v4.0 3 months ago

readme.md

vGizmo3D - WGPU / WebGPU example

This is a bit more complex example (respect to basic_examples) 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

Live WebGPU demo

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

How to Build

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

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