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

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
NoreoAlles
Party member
Posts: 130
Joined: Mon Jan 03, 2022 5:42 pm

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

Post 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 2836 times
Attachments
Enterprise Demo.love
(741.79 KiB) Downloaded 186 times
Last edited by NoreoAlles on Sun Jun 30, 2024 7:56 pm, edited 1 time in total.
"Why do they call it oven when you of in the cold food of out hot eat the food?" - Jon Arbuckle
User avatar
slime
Solid Snayke
Posts: 3166
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

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

Post 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.
User avatar
NoreoAlles
Party member
Posts: 130
Joined: Mon Jan 03, 2022 5:42 pm

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

Post 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?
"Why do they call it oven when you of in the cold food of out hot eat the food?" - Jon Arbuckle
User avatar
pgimeno
Party member
Posts: 3673
Joined: Sun Oct 18, 2015 2:58 pm

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

Post by pgimeno »

What I hear from what slime has said is that you just have to use love.graphics.setLineJoin("none").
Last edited by pgimeno on Sun Jun 30, 2024 7:56 pm, edited 1 time in total.
User avatar
NoreoAlles
Party member
Posts: 130
Joined: Mon Jan 03, 2022 5:42 pm

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

Post 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.
"Why do they call it oven when you of in the cold food of out hot eat the food?" - Jon Arbuckle
User avatar
slime
Solid Snayke
Posts: 3166
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

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

Post 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.
User avatar
NoreoAlles
Party member
Posts: 130
Joined: Mon Jan 03, 2022 5:42 pm

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

Post 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!
"Why do they call it oven when you of in the cold food of out hot eat the food?" - Jon Arbuckle
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests