You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-35Lines changed: 6 additions & 35 deletions
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ and the other [examples](https://github.com/pygfx/wgpu-py/blob/main/examples/).
29
29
30
30
## Status
31
31
32
-
> **Note**
32
+
> **Note**
33
33
>
34
34
> The wgpu-API has not settled yet, use with care!
35
35
@@ -44,48 +44,19 @@ and the other [examples](https://github.com/pygfx/wgpu-py/blob/main/examples/).
44
44
45
45
## Installation
46
46
47
-
```
48
-
pip install wgpu
49
-
```
50
-
51
-
The wheels include the prebuilt binaries of [wgpu-native](https://github.com/gfx-rs/wgpu-native).
52
-
53
-
Note that on Linux you need to use at least **pip >= 20.3**, and a recent
54
-
distribution, otherwise the binaries will not be available. See "platform
55
-
requirements" for details.
56
-
57
-
If you need/want to build wgpu-native yourself, you need to set the environment variable
58
-
`WGPU_LIB_PATH` to let wgpu-py know where the DLL is located.
59
47
60
-
You may also want to install a GUI backend:
61
48
```
62
-
pip install glfw # a lightweight backend for the desktop
63
-
pip install jupyter_rfb # only if you plan on using wgpu in Jupyter
49
+
pip install wgpu glfw
64
50
```
65
51
66
-
## Platform requirements
67
-
68
-
Under the hood, `wgpu` runs on Vulkan, Metal, or DX12. The wgpu-backend is
69
-
selected automatically, but can be overridden by setting the `WGPU_BACKEND_TYPE`
70
-
environment variable to "Vulkan", "Metal", "D3D12", "D3D11", or "OpenGL".
71
-
72
-
On Windows 10+, things should just work. On older Windows versions you may need
73
-
to install the Vulkan drivers. You may want to force "Vulkan" while "D3D12" is
74
-
less mature.
75
-
76
-
On MacOS you need at least 10.13 (High Sierra) to have Vulkan support.
77
-
78
-
On Linux, it's advisable to install the proprietary drivers of your GPU (if you
79
-
have a dedicated GPU). You may need to `apt install mesa-vulkan-drivers`.
80
-
Wayland support is currently broken (we could use a hand to fix this).
52
+
Linux users should make sure that **pip >= 20.3**. That should do the
53
+
trick on most systems. See [getting started](https://wgpu-py.readthedocs.io/en/stable/start.html)
54
+
for details.
81
55
82
-
**Note that on Linux, binary wheels are only available for manylinux_2_24**. That
83
-
means you can only install the binaries with **pip >= 20.3**, and need to use a recent distribution, listed [here](https://github.com/pypa/manylinux#manylinux). If you wish to work with an older distribution, you will have to build the [wgpu-native](https://github.com/gfx-rs/wgpu-native) library yourself, and point wgpu-py to the
84
-
resulting binary using the `WGPU_LIB_PATH` environment variable.
85
56
86
57
## Usage
87
58
88
-
Also see the [online documentation](https://wgpu-py.readthedocs.io).
59
+
Also see the [online documentation](https://wgpu-py.readthedocs.io) and the [examples](https://github.com/pygfx/wgpu-py/tree/main/examples).
89
60
90
61
The full API is accessable via the main namespace:
Copy file name to clipboardExpand all lines: docs/start.rst
+60-15Lines changed: 60 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -10,22 +10,69 @@ Installation
10
10
pip install wgpu
11
11
12
12
13
-
Dependencies
14
-
------------
13
+
Python 3.7 or higher is required. Pypy is supported. Only depends on ``cffi`` (installed automatically by pip).
14
+
15
+
16
+
The wgpu-native library
17
+
-----------------------
18
+
19
+
The wheels include the prebuilt binaries of `wgpu-native <https://github.com/gfx-rs/wgpu-native>`_.
20
+
21
+
On Linux you need at least **pip >= 20.3**, and a recent Linux distribution, otherwise the binaries will not be available. See *platform requirements* for details.
22
+
23
+
If you need/want, you can also `build wgpu-native yourself <https://github.com/gfx-rs/wgpu-native/wiki/Getting-Started>`_.
24
+
You will then need to set the environment variable ``WGPU_LIB_PATH`` to let wgpu-py know where the DLL is located.
25
+
26
+
27
+
GUI libraries
28
+
-------------
29
+
30
+
Most users will want to render something to screen. To this end we recommend:
31
+
32
+
.. code-block:: bash
15
33
16
-
* Python 3.7 or higher is required. Pypy is supported.
17
-
* The required ``wgpu-native`` library is distributed as part of the ``wgpu-py`` package.
18
-
* The only other dependency is ``cffi`` (installed automatically by pip).
34
+
pip install glfw
19
35
36
+
Multiple GUI backends are supported though:
20
37
21
-
System requirements
22
-
-------------------
38
+
* `glfw <https://github.com/FlorianRhiem/pyGLFW>`_: a lightweight GUI for the desktop
39
+
* `jupyter_rfb <https://jupyter-rfb.readthedocs.io/en/latest/>`_: only needed if you plan on using wgpu in Jupyter
40
+
* qt (PySide6, PyQt6, PySide2, PyQt5)
41
+
* wx
23
42
24
-
The system must be new enough to support Metal or Vulkan:
25
43
26
-
* Windows: fine on Windows 10, probably older Windows versions too when DX12 can be used.
27
-
* MacOS: version 10.13 High Sierra or higher.
28
-
* Linux: Vulkan must be available.
44
+
Platform requirements
45
+
---------------------
46
+
47
+
Under the hood, wgpu runs on Vulkan, Metal, or DX12. The wgpu-backend
48
+
is selected automatically, but can be overridden by setting the
49
+
``WGPU_BACKEND_TYPE`` environment variable to "Vulkan", "Metal", "D3D12",
50
+
"D3D11", or "OpenGL".
51
+
52
+
**Windows**
53
+
54
+
On Windows 10+, things should just work. On older Windows versions you
55
+
may need to install the Vulkan drivers.
56
+
57
+
**MacOS**
58
+
59
+
On MacOS you need at least 10.13 (High Sierra) to have Metal/Vulkan support.
60
+
61
+
**Linux**
62
+
63
+
On Linux, it's advisable to install the proprietary drivers of your GPU
64
+
(if you have a dedicated GPU). You may need to ``apt install
65
+
mesa-vulkan-drivers``. Wayland support is currently broken (we could use
66
+
a hand to fix this).
67
+
68
+
Binary wheels for Linux are only available for **manylinux_2_24**.
69
+
This means that the installation requires ``pip >= 20.3``, and you need
70
+
a recent Linux distribution, listed `here <https://github.com/pypa/manylinux#manylinux>`_.
71
+
72
+
If you wish to work with an older distribution, you will have to build
73
+
wgpu-native yourself, see "dependencies" above. Note that wgpu-native
74
+
still needs Vulkan support and may not compile / work on older
75
+
distributions.
29
76
30
77
31
78
About this API
@@ -42,7 +89,5 @@ What's new in this version?
42
89
---------------------------
43
90
44
91
Since the API changes with each release, and we do not yet make things
45
-
backwards compatible. You may want to check the changelog when you
0 commit comments