graphics.clear clears screen instead of canvas
Posted: Sat May 30, 2015 11:49 am
There is not much code to reproduce this, you don't need to download the .love file.
It's easy:
Normally, you should just see a black screen, because the canvas is never drawn to the screen.
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
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