## push - a resolution-handling library

ac3raven
Citizen
Posts: 55
Joined: Tue May 19, 2009 1:14 am

### Re: push - a resolution-handling library

I spoke too soon. the change I made broke my shader rendering. I am not sure how fix it, so back to the drawing board

ac3raven
Citizen
Posts: 55
Joined: Tue May 19, 2009 1:14 am

### Re: push - a resolution-handling library

I am not understanding how to give a pre-existing shader to Push. One that I create with love.graphics.newCanvas() and that does not take up the entire screen.

Or how might I create a canvas with Push that has width and height parameters?

Like so:

Code: Select all

local canvas = lg.newCanvas(350,60)

function stencilFunction()
lg.print(scoretext,lg.getWidth()/2-28,30)
end

local canvasList = {name = "test",shader=rainbow_shader}  --how do I add my normal canvas to this so I can use push:setupCanvas on it??
push:setupCanvas(canvasList)

gameplay:update(dt)
push:setCanvas(test) --this should be applying the 'rainbow_shader' to the below rect
lg.rectangle("fill",0,0,lg.getWidth(),lg.getHeight())
push:setCanvas()
end

gameplay:draw()
lg.stencil(stencilFunction,"replace",1)
lg.setStencilTest("greater",0)
scoretext = tostring(math.floor(currentscore))
lg.setColor(1,1,1,1)
if newHighScore then
lg.draw(canvas,score.x,score.y2) -- I need my canvas to be drawn at this position, after it passes through the stencil function
end
end



Ulydev
Party member
Posts: 439
Joined: Mon Nov 10, 2014 10:46 pm
Location: Paris
Contact:

### Re: push - a resolution-handling library

Hmm, I'm not sure how you can display a not-fullscreen with push, it's been a while and I honestly don't remember how it works exactly. I need to go through the code again so I can help you :-) I'll be sure to reply as soon as I have some time!

Jack Dandy
Prole
Posts: 49
Joined: Mon Sep 08, 2014 4:26 pm

### Re: push - a resolution-handling library

Heya. Just wanted to know if the stencil problem's been fixed?

Ulydev
Party member
Posts: 439
Joined: Mon Nov 10, 2014 10:46 pm
Location: Paris
Contact:

### Re: push - a resolution-handling library

Jack Dandy wrote:
Sat Jul 06, 2019 9:02 am
Heya. Just wanted to know if the stencil problem's been fixed?
It seems like it's been fixed, although I haven't tried it myself yet: https://github.com/Ulydev/push/issues/25

YoungNeer
Party member
Posts: 105
Joined: Wed May 15, 2019 7:49 am

### Re: push - a resolution-handling library

Okay - love.mouse.getPosition works well with push (using toGame) but love.mouse.setPosition doesn't seem to work (i tried both toGame and toReal).
My Github- your contribution is highly appreciated

### Who is online

Users browsing this forum: No registered users and 4 guests