From 80a2d2e389471f09593707703c49fc3219742b46 Mon Sep 17 00:00:00 2001 From: Tim Anema Date: Tue, 16 Dec 2014 17:14:16 -0500 Subject: [PATCH] just some util changes --- lib/util.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/util.lua b/lib/util.lua index 5fefa1b..da73afa 100644 --- a/lib/util.lua +++ b/lib/util.lua @@ -10,6 +10,12 @@ function util.drawCanvasToCanvas(canvas, other_canvas, options) if options["shader"] then love.graphics.setShader(options["shader"]) end + if options["stencil"] then + love.graphics.setInvertedStencil(options["stencil"]) + end + if options["istencil"] then + love.graphics.setInvertedStencil(options["stencil"]) + end if options["color"] then love.graphics.setColor(unpack(options["color"])) else @@ -22,6 +28,12 @@ function util.drawCanvasToCanvas(canvas, other_canvas, options) if options["shader"] then love.graphics.setShader() end + if options["stencil"] then + love.graphics.setInvertedStencil() + end + if options["istencil"] then + love.graphics.setInvertedStencil() + end end) end