It came to my attention that, when paired with STI, Brady, my camera library, drew certain portions that should not have been drawn. When I use love.graphics.setScissor, it worked, though.
It works regularly when I comment out the lines from STI pertaining to drawing to a canvas, but not with the canvas.
Is this the intended result? Am I missing something?
(.love's are over on this thread if you're interested)
love.graphics.setStencil not applying over canvases?
love.graphics.setStencil not applying over canvases?
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
Re: love.graphics.setStencil not applying over canvases?
What .love you are referring to: MV Platformer or BWE?
In both cases setShape function is never called.
Tried MV Platformer with LÖVE 0.10.0 (adapted several functions including stencil related) and it works (all is clipped to rectangular region in the top left corner).
If this is not what is needed then how result should look like? Or is this wrong .love files?
In both cases setShape function is never called.
Tried MV Platformer with LÖVE 0.10.0 (adapted several functions including stencil related) and it works (all is clipped to rectangular region in the top left corner).
If this is not what is needed then how result should look like? Or is this wrong .love files?
Re: love.graphics.setStencil not applying over canvases?
Can confirm with 0.10.0 (and proper porting) it works as expected. Does NOT work with 0.9.2.
You can use both:
MV Platformer is demonstrating the problem.
BWE comments out lines in STI that set canvases, and it works as expected.
You can use both:
MV Platformer is demonstrating the problem.
BWE comments out lines in STI that set canvases, and it works as expected.
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
Re: love.graphics.setStencil not applying over canvases?
It seems that setting / unsetting canvases cancels any defined stencils in 0.9.2:
Code: Select all
local lg = love.graphics
local canvas
function love.load()
canvas = lg.newCanvas(800, 600)
end
function love.draw()
lg.setStencil(function() lg.rectangle("fill", 100, 100, 200, 200) end)
lg.setCanvas()
lg.setColor(0, 100, 0)
lg.circle("fill", 150, 150, 100)
end
Re: love.graphics.setStencil not applying over canvases?
Yeah, that's what I was noticing. Is this intended?
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
Re: love.graphics.setStencil not applying over canvases?
Oh, I've thought question was about problems inside .love.
- slime
- Solid Snayke
- Posts: 3172
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: love.graphics.setStencil not applying over canvases?
Stencils are effectively per-Canvas in all versions of LÖVE. The new stencil APIs in 0.10.0 make it a bit more obvious/explicit.
Who is online
Users browsing this forum: Ahrefs [Bot] and 2 guests