-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
45 lines (29 loc) · 1.1 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Simple test apps for WebGPU with Emscripten.
Tested with Emscripten 3.1.51 and Chrome 120.0.6099.109.
cd 01_blue_triangle
mkdir build
emcmake cmake -B build .
cmake --build build
emrun --browser chrome blue_triangle.html
To debug as shown in https://developer.chrome.com/blog/wasm-debugging-2020/ add -DCMAKE_BUILD_TYPE=Debug when configuring.
01_blue_triangle
* Blue triangle with perspective projection.
* Handles canvas resizing.
* Depth/stencil set up as well although not really needed.
* Simple vertex and uniform buffer setup. (mappedAtCreation, writeBuffer)
02_rotating_triangle
* Now with vertex colors and rotating.
* Uniform buffer update handled via staging buffer ring.
03_simple_texture
* Draws a textured quad.
* The texture is loaded with EM_JS (fetch/ImageBitmap/copyExternalImageToTexture).
04_textures
* Two textures this time, one loaded with stb_image, the other with TinyEXR. Uses --preload-file.
05_imgui
* Basic Dear Imgui integration
06_localfile
* Local file upload/download
07_localfile2
* Sets a custom font for the gui
* Uses glm instead of HMM
* Combined with rotating_triangle