Compare commits

...

2 Commits

Author SHA1 Message Date
wan-may 3648181f8e Upgrade LOVE to version 11.5 2024-03-23 17:03:36 -03:00
wan-may 3c0cf3013e scratchpad for the client's rendering 2023-12-04 22:05:23 -04:00
1 changed files with 46 additions and 0 deletions

46
src/renderer/main.lua Normal file
View File

@ -0,0 +1,46 @@
local love = assert( love )
local lg = love.graphics
local time = 0
local text = ""
--Set up the canvas.
assert( lg.getCanvasFormats( false ).stencil8, "Error: 8-bit stencil buffers not supported on this system." )
local stencil = love.graphics.newCanvas(
25,
50,
{
type = "2d",
format = "stencil8",
readable = false,
msaa = 0,
dpiscale = 1,
mipmaps = "none",
})
local canvas = love.graphics.newCanvas(
lg.getWidth(),
lg.getHeight(),
{
type = "2d",
format = "rgba8",
readable = true,
msaa = 0,
dpiscale = 1,
mipmaps = "none",
})
function love.update(dt)
time = time + dt
end
function love.draw()
lg.setCanvas{{canvas}, depthstencil = {stencil}}
lg.setColor( 1,1,1,1 )
lg.rectangle( "fill", 0, 0, 400, 400 )
lg.setCanvas()
lg.draw( canvas )
end
function love.textinput(t)
text = text..t
end