aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2025-03-24 21:31:31 +0000
committers-ol <s+removethis@s-ol.nu>2025-03-24 21:31:31 +0000
commit3b1f59cc8328bd7c24ee5ae2d29a13fe1f6758d7 (patch)
treefa7695ea8a22de5717895c7509c26569538869fb /README.md
parentrelease 0.1.0 (diff)
downloadlua-texture-share-vk-3b1f59cc8328bd7c24ee5ae2d29a13fe1f6758d7.tar.gz
lua-texture-share-vk-3b1f59cc8328bd7c24ee5ae2d29a13fe1f6758d7.zip
support receiving canvas
Diffstat (limited to 'README.md')
-rw-r--r--README.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/README.md b/README.md
index c234d19..9ab89ea 100644
--- a/README.md
+++ b/README.md
@@ -2,13 +2,15 @@
A LÖVE library for sharing GPU textures between processes.
-This wraps the OpenGL C API of [texture-share-vk](https://github.com/DigitOtter/texture-share-vk) and allows publishing a LÖVE Canvas object.
+This wraps the OpenGL C API of [texture-share-vk](https://github.com/DigitOtter/texture-share-vk) and allows sending and receiving LÖVE Canvas contents.
## API
- `tvs.new()`: creates a new `Client` object (`texture-share-gl` client).
- `Client:newSharedCanvas(name, ...)`: creates a new `SharedCanvas` object by delegating to [`love.graphics.newCanvas(...)`](https://love2d.org/wiki/love.graphics.newCanvas) and publishes it.
+- `Client:loadSharedCanvas(name)`: loads a `SharedCanvas` object from another publisher.
- `Canvas.name`: the name passed in the SharedCanvas constructor
- `Canvas.canvas`: the love2d `Canvas` object
- `Canvas:send()`: Sends the current contents of the Canvas to subscribers, call this after drawing to the Canvas.
+- `Canvas:load()`: Loads updated contents from the publisher, call this before drawing the Canvas.
- `Canvas:any_other_method()`: delegated to the love2d `Canvas` object