-
Notifications
You must be signed in to change notification settings - Fork 53
/
index.md
92 lines (61 loc) · 2.74 KB
/
index.md
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
Learn WebGPU
============
*For native graphics in C++.*
This documentation walks you through the use of the [WebGPU](https://www.w3.org/TR/webgpu) graphics API to create **native 3D applications** in C++ from scratch, for Windows, Linux and macOS.
`````{admonition} Quick Start! (Click Me)
:class: foldable quickstart
*Do you want to understand every bit of GPU code you write?*
````{admonition} Yes, write WebGPU code **from scratch**!
:class: foldable yes
That's great! You can simply proceed to the [introduction](introduction.md) and **read all chapters** sequentially.
````
````{admonition} No, I'd rather **skip the initial boilerplate**.
:class: foldable no
This perfectly makes sense, you can always **come back to the [basic steps](getting-started/index.md) later**.
You probably want to check out the _**Resulting code**_ link at the beginning and end of **each page**, e.g.:
```{image} /images/intro/resulting-code-light.png
:class: only-light with-shadow
```
```{image} /images/intro/resulting-code-dark.png
:class: only-dark with-shadow
```
*Are you ok with using a shallow wrapper for easier reading?*
```{admonition} Yes, I prefer **C++ styled** code.
:class: foldable yes
Use the "**With webgpu.hpp**" tab.
```
```{admonition} No, show me the **raw C WebGPU API**!
:class: foldable no
Use the "**Vanilla webgpu.h**" tab. The *Resulting code* for vanilla WebGPU is less up to date, but this tab also switches **all the code blocks** inside the guide, and these are **up to date**.
```
To **build this base code**, refer to the [Building](getting-started/project-setup.md#building) section of the project setup chapter. You may add `-DWEBGPU_BACKEND=WGPU` (default) or `-DWEBGPU_BACKEND=DAWN` to the `cmake -B build` line to pick respectively [`wgpu-native`](https://github.com/gfx-rs/wgpu-native) or [Dawn](https://dawn.googlesource.com/dawn/) as a backend.
*How far do you want the base code to go?*
```{admonition} A simple triangle
:class: foldable quickstart
Check out the [Hello Triangle](basic-3d-rendering/hello-triangle.md) chapter.
```
```{admonition} A 3D mesh viewer with basic interaction
:class: foldable quickstart
I recommend starting from the end of the [Lighting control](basic-3d-rendering/some-interaction/lighting-control.md) chapter.
```
````
```{admonition} I want things to **run on the Web** as well.
:class: foldable warning
The main body of the guide misses a few extra lines, refer to the [Building for the Web](appendices/building-for-the-web.md) appendix to **adapt the examples** so that they run on the Web!
```
`````
Contents
--------
```{toctree}
:titlesonly:
introduction
getting-started/index
basic-3d-rendering/index
basic-compute/index
advanced-techniques/index
appendices/index
```
```{toctree}
:hidden:
next/index
```