I tested in Windows 8.1, Love 10.2, 10.1, 9.1 same bug video card "Intel(R) HD Graphics"
but when I tested in linux debian jessie, in virtual machine it work fine (result blank screen)
Code: Select all
co = nil
buffer = nil
program = function()
love.graphics.setColor({255, 255, 255})
love.graphics.circle("line", 100, 100, 50)
coroutine.yield()
--love.graphics.circle("line", 100, 100, 50)
love.graphics.clear() --not cleared
coroutine.yield()
--love.graphics.points(10, 10) --<-- it clear now
end
local function resume()
if co then
if coroutine.status(co) ~= "dead" then
love.graphics.setCanvas(buffer)
assert(coroutine.resume(co))
love.graphics.setCanvas()
else
-- co = nil
end
end
end
function love.load()
buffer = love.graphics.newCanvas()
co = coroutine.create(program)
end
function love.draw()
love.graphics.push("all")
love.graphics.setColor({255, 255, 255})
love.graphics.setBlendMode("alpha", "premultiplied")
love.graphics.draw(buffer)
love.graphics.pop()
resume()
end