It's easy:
Code: Select all
function love.load()
mycanvas = love.graphics.newCanvas(300, 300)
end
function love.draw()
love.graphics.setCanvas(mycanvas)
love.graphics.setColor(255, 255, 255, 255)
love.graphics.setBackgroundColor(0, 0, 255, 0)
love.graphics.clear()
love.graphics.setCanvas()
end
But instead, at least setBackgroundColor and clear are targetting the screen instead of the canvas, so you see a blue screen.
I am using an unmodified version of love version 0.9.2