download the rest of love-gltf, test that its default renderer works on 11.5

This commit is contained in:
wan-may 2024-03-30 23:51:06 -03:00
parent 3648181f8e
commit 8258ebfa22
1 changed files with 5 additions and 4 deletions

View File

@ -6,8 +6,8 @@ local text = ""
--Set up the canvas. --Set up the canvas.
assert( lg.getCanvasFormats( false ).stencil8, "Error: 8-bit stencil buffers not supported on this system." ) assert( lg.getCanvasFormats( false ).stencil8, "Error: 8-bit stencil buffers not supported on this system." )
local stencil = love.graphics.newCanvas( local stencil = love.graphics.newCanvas(
25, lg.getWidth(),
50, lg.getHeight(),
{ {
type = "2d", type = "2d",
format = "stencil8", format = "stencil8",
@ -35,8 +35,9 @@ end
function love.draw() function love.draw()
lg.setCanvas{{canvas}, depthstencil = {stencil}} lg.setCanvas{{canvas}, depthstencil = {stencil}}
lg.setColor( 1,1,1,1 ) lg.clear()
lg.rectangle( "fill", 0, 0, 400, 400 ) lg.setColor( 1,1,1,0.3 )
lg.rectangle( "fill", time * 15.0 , 0, 400, 400 )
lg.setCanvas() lg.setCanvas()
lg.draw( canvas ) lg.draw( canvas )
end end