diff --git a/examples/multiple-shaders/init.lua b/examples/multiple-shaders/init.lua index d365e25..3cd7456 100644 --- a/examples/multiple-shaders/init.lua +++ b/examples/multiple-shaders/init.lua @@ -9,10 +9,9 @@ return function () local windowWidth, windowHeight = love.window.getDesktopDimensions() windowWidth, windowHeight = windowWidth*.5, windowHeight*.5 - push:setupScreen(gameWidth, gameHeight, windowWidth, windowHeight, { - fullscreen = false, - resizable = true, - highdpi = true, + love.window.setMode(windowWidth, windowHeight, {resizable = true}) + push.setupScreen(gameWidth, gameHeight, { + upscale = "normal", canvas = true }) @@ -23,7 +22,7 @@ return function () shader1 = love.graphics.newShader("examples/multiple-shaders/shader1.fs") shader2 = love.graphics.newShader("examples/multiple-shaders/shader2.fs") - push:setShader({ shader1, shader2 }) + push.setShader({ shader1, shader2 }) end function love.update(dt) @@ -34,12 +33,12 @@ return function () end function love.draw() - push:apply("start") + push.start() love.graphics.setColor(255, 255, 255) love.graphics.draw(image, (gameWidth-image:getWidth())*.5, (gameHeight-image:getHeight())*.5) - push:apply("end") + push.finish() end end \ No newline at end of file diff --git a/main.lua b/main.lua index a959830..1f6bf73 100644 --- a/main.lua +++ b/main.lua @@ -5,8 +5,8 @@ local examples = { "low-res", --[[ "single-shader", - "multiple-shaders", --]] + "multiple-shaders", "mouse-input" --[[ "canvases-shaders", diff --git a/push.lua b/push.lua index 1c101a8..51bdb4a 100644 --- a/push.lua +++ b/push.lua @@ -119,7 +119,7 @@ local function applyShaders(canvas, shaders) love.graphics.setShader(shaders[1]) love.graphics.draw(canvas) else - local canvas = love.graphics.getCanvas() + local _canvas = love.graphics.getCanvas() local tmp = getCanvasTable("_tmp") local outputCanvas local inputCanvas @@ -151,7 +151,7 @@ local function applyShaders(canvas, shaders) end love.graphics.pop() - love.graphics.setCanvas(canvas) + love.graphics.setCanvas(_canvas) love.graphics.draw(outputCanvas) end