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: DOCUMENTATION.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -167,7 +167,7 @@ To make sharing graphic textures as easy as possible, the library provides some
167
167
The `syphon.utils.raw` module contains methods to create and manipulate textures with a raw `bytes` array.
168
168
169
169
#### Create MTLTexture
170
-
To create an [MTLTexture](https://developer.apple.com/documentation/metal/mtltexture) the method `syphon.utils.raw.create_mtl_texture` can be used. It is possible to create your own default device or use a server's `device` property to get the current device.
170
+
To create an [MTLTexture](https://developer.apple.com/documentation/metal/mtltexture) the method `syphon.utils.raw.create_mtl_texture` can be used. It is possible to create your own default device or use a server's `syphon.server.SyphonMetalServer.device` property to get the current device.
To write `bytes` to an [MTLTexture](https://developer.apple.com/documentation/metal/mtltexture) the method `syphon.utils.raw.copy_bytes_to_mtl_texture` can be used.
181
+
To write `bytes` to an [MTLTexture](https://developer.apple.com/documentation/metal/mtltexture) the method `syphon.utils.raw.copy_bytes_to_mtl_texture()` can be used.
182
182
183
183
```python
184
184
from syphon.utils.raw import copy_bytes_to_mtl_texture
To read `bytes` from an [MTLTexture](https://developer.apple.com/documentation/metal/mtltexture) the method `syphon.utils.raw.copy_mtl_texture_to_bytes` can be used.
192
+
To read `bytes` from an [MTLTexture](https://developer.apple.com/documentation/metal/mtltexture) the method `syphon.utils.raw.copy_mtl_texture_to_bytes()` can be used.
193
193
194
194
```python
195
195
from syphon.utils.raw import copy_mtl_texture_to_bytes
@@ -204,7 +204,7 @@ If you are working with [Numpy](https://numpy.org/) arrays, the `syphon.utils.nu
204
204
205
205
It is important to note that the `numpy` package is not installed by default, it must be installed using `pip install numpy`.
206
206
207
-
To write a numpy image to a MTLTexture, the `syphon.utils.numpy.copy_image_to_mtl_texture` method can be used.
207
+
To write a numpy image to a MTLTexture, the `syphon.utils.numpy.copy_image_to_mtl_texture()` method can be used.
Python wrapper for the GPU texture sharing framework Syphon. This library has been created to support the Metal backend
10
-
as well as the deprecated OpenGL backend. It requires **macOS 11 or higher**.
9
+
Python wrapper for the Syphon GPU texture sharing framework. This library was created to support both the Metal backend
10
+
and the deprecated OpenGL backend. It requires **macOS 11 or above**.
11
11
12
-
The implementation is based on [PyObjC](https://github.com/ronaldoussoren/pyobjc) to wrap
13
-
the [Syphon-Framework](https://github.com/Syphon/Syphon-Framework) directly from within Python. This approach removes
14
-
the need of a native wrapper and allows Python developers to extend the library if needed.
12
+
The implementation is based on [PyObjC](https://github.com/ronaldoussoren/pyobjc) to wrap the
13
+
Syphon framework](https://github.com/Syphon/Syphon-Framework) directly from Python. This approach eliminates
14
+
native wrapper and allows Python developers to extend the library as needed.
15
15
16
16
## State of Development
17
17
@@ -23,19 +23,19 @@ the need of a native wrapper and allows Python developers to extend the library
23
23
-[ ] Syphon Client On Frame Callback
24
24
25
25
## Usage
26
-
To install `syphon-python` it is recommended to use a pre-built binary from PyPi:
26
+
To install `syphon-python` it is recommended to use a prebuilt binary from PyPi:
27
27
28
28
```bash
29
29
pip install syphon-python
30
30
```
31
31
32
-
For examples using `numpy`, please also install numpy:
32
+
To run all the examples, please also install [Numpy](https://numpy.org/) and [OpenCV](https://opencv.org/):
33
33
34
34
```bash
35
-
pip install numpy
35
+
pip install numpy opencv-python
36
36
```
37
37
38
-
The following code snippet is a basic example which shows how to share `numpy` images as a `MTLTexture` with a `SyphonMetalServer`. There are more examples under[examples](/examples).
38
+
The following code snippet is a basic example showing how to share `numpy` images as `MTLTexture` with a `SyphonMetalServer`. There are more examples in[examples](/examples).
39
39
40
40
```python
41
41
import time
@@ -65,7 +65,7 @@ server.stop()
65
65
```
66
66
67
67
## Development
68
-
To develop the library or install it manually, use the following commands to setup the local repository.
68
+
To develop or manually install the library, use the following commands to set up the local repository.
0 commit comments