Page 1 of 1

Visual Glitches when using love.graphics.polygon() [Solved]

Posted: Sun Jun 30, 2024 7:20 pm
by NoreoAlles
Hello,
im having issues as seen in the screenshot, where triangles drawn with love.graphics.polygon(), glitch around sporadicly.
Im asking you guys just to download and check if you see it to, because its very possible that its just my GPU dying :o
Thanks!
Enterprise Poly Glitch.PNG
Enterprise Poly Glitch.PNG (33.44 KiB) Viewed 2837 times

Re: Visual Glitches when using love.graphics.polygon()

Posted: Sun Jun 30, 2024 7:47 pm
by slime
It looks like you're using a love version that's older than 11.5. There were a couple related bugs with miter line joins when drawing close-to-parallel line segments that were fixed in 11.5.

That being said, you might want a different LineJoin mode as well. "none" works even better for me with that scene compared to the default "miter", when running with 11.5.

Re: Visual Glitches when using love.graphics.polygon()

Posted: Sun Jun 30, 2024 7:51 pm
by NoreoAlles
slime wrote: Sun Jun 30, 2024 7:47 pm It looks like you're using a love version that's older than 11.5. There were a couple related bugs with miter line joins when drawing close-to-parallel line segments that were fixed in 11.5.

That being said, you might want a different LineJoin mode as well. "none" works even better for me with that scene compared to the default "miter", when running with 11.5.
Oh shoot, where there any drastic changes and i have to change my code or is it just a matter of updating?

Re: Visual Glitches when using love.graphics.polygon()

Posted: Sun Jun 30, 2024 7:54 pm
by pgimeno
What I hear from what slime has said is that you just have to use love.graphics.setLineJoin("none").

Re: Visual Glitches when using love.graphics.polygon()

Posted: Sun Jun 30, 2024 7:55 pm
by NoreoAlles
pgimeno wrote: Sun Jun 30, 2024 7:54 pm What slime is suggesting is just to use love.graphics.setLineJoin("none").
Yes, did that and updated love, now it looks awesöme again.

Re: Visual Glitches when using love.graphics.polygon()

Posted: Sun Jun 30, 2024 7:56 pm
by slime
NoreoAlles wrote: Sun Jun 30, 2024 7:51 pm Oh shoot, where there any drastic changes and i have to change my code or is it just a matter of updating?
11.5 is completely backward compatible with code written for any older 11.x version, it mostly has bugfixes.

Re: Visual Glitches when using love.graphics.polygon()

Posted: Sun Jun 30, 2024 7:57 pm
by NoreoAlles
slime wrote: Sun Jun 30, 2024 7:56 pm
NoreoAlles wrote: Sun Jun 30, 2024 7:51 pm Oh shoot, where there any drastic changes and i have to change my code or is it just a matter of updating?
11.5 is completely backward compatible with code written for any older 11.x version, it mostly has bugfixes.
Nice!