It's not quite that what I want, that reset everything to the default values what I want is to reset to a previously saved state.
Exemple of reset
Code: Select all
love.graphics.getBackgroundColor() --0,0,0,255
love.graphics.setBackgroundColor(255,255,255,255)
love.graphics.getBackgroundColor() --255,255,255,255
love.graphics.reset()
love.graphics.getBackgroundColor() --0,0,0,255
What I want:
Code: Select all
love.graphics.getBackgroundColor() --0,0,0,255
love.graphics.setBackgroundColor(255,255,255,255)
love.graphics.getBackgroundColor() --255,255,255,255
push()
love.graphics.setBackgroundColor(255,0,0,255)
love.graphics.getBackgroundColor() --255,0,0,255
pop()
love.graphics.getBackgroundColor() --255,255,255,255
love.graphics.reset()
love.graphics.getBackgroundColor() --0,0,0,255