diff options
| author | s-ol <s+removethis@s-ol.nu> | 2025-03-21 12:25:10 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2025-03-21 12:37:22 +0000 |
| commit | 8987c88bba84125e358319c2d4085f958401ff11 (patch) | |
| tree | da54035fb9e2ef25c92660a7ea886c2d7275d421 /main.lua | |
| parent | as lib (diff) | |
| download | lua-texture-share-vk-8987c88bba84125e358319c2d4085f958401ff11.tar.gz lua-texture-share-vk-8987c88bba84125e358319c2d4085f958401ff11.zip | |
package for luarocks
Diffstat (limited to 'main.lua')
| -rw-r--r-- | main.lua | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/main.lua b/main.lua deleted file mode 100644 index d1b6d70..0000000 --- a/main.lua +++ /dev/null @@ -1,30 +0,0 @@ -local tvs = require 'texture_share_vk' -local client, shared - -function love.load() - client = tvs.new() - shared = client:newSharedCanvas("love2d", love.graphics.getDimensions()) -end - -local angle = 0 - -function love.update(dt) - angle = angle + 5 * dt -end - -function love.draw() - local width, height = love.graphics.getDimensions() - love.graphics.setCanvas(shared.canvas) -- NOTE: different from normal canvas - love.graphics.clear(0, 0, 0, 0) - love.graphics.translate(width/2, height/2) - love.graphics.rotate(angle) - - love.graphics.setColor(1, 0, 0, 1) - love.graphics.rectangle("fill", -150,-150, 300,300) - love.graphics.setCanvas() - shared:send() - - love.graphics.reset() - love.graphics.setBlendMode("alpha", "premultiplied") - love.graphics.draw(shared.canvas) -- NOTE: different from normal canvas -end |
