More trouble with canvases. Again, this is with v11.2 on 64-bit Windows 10.
I'm attempting to draw a white square with a smaller blue square inside of it to a canvas, then draw the result to the screen. Instead what I get is a solid blue square with no hint of white. Here's the full code of the test program:
Code: Select all
function love.load()
love.window.setMode(1280, 720)
love.graphics.setDefaultFilter("nearest", "nearest")
canvas_1 = love.graphics.newCanvas(500, 500)
end
function love.update()
end
function love.draw()
love.graphics.setCanvas(canvas_1)
love.graphics.clear()
love.graphics.setColor(255/255, 255/255, 255/255, 1)
love.graphics.rectangle("fill", 0, 0, 499, 499)
love.graphics.setColor(0/255, 0/255, 255/255, 1)
love.graphics.rectangle("fill", 100, 100, 300, 300)
love.graphics.setCanvas()
love.graphics.clear()
love.graphics.draw(canvas_1, 350, 100, 0, 1, 1, 0, 0, 0, 0)
end