aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: 9ab89eae14fe5a92d8131dddd77a9ef8ab48cd0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# lua texture-share-vk

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 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