Polygon render errors [v11.2] [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
HDPLocust
Citizen
Posts: 65
Joined: Thu Feb 19, 2015 10:56 pm
Location: Swamp
Contact:

Polygon render errors [v11.2] [SOLVED]

Post by HDPLocust »

Hmm, it like render error (with non-convex polygons), how it can be solved without triangulation?

It's just this

Code: Select all

  love.graphics.polygon('fill', polygon_table) -- every point tries to make triangle with first point in list
  -- and
  love.graphics.polygon('line', polygon_table) -- drawed correctly
nothing more.

Image
App control: lmb - add point, rmb - move point, mmb - remove point
Attachments
polytest_11_2.love
(4.1 KiB) Downloaded 109 times
Last edited by HDPLocust on Mon May 27, 2019 9:34 am, edited 1 time in total.
Science and violence
User avatar
zorg
Party member
Posts: 3441
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Polygon render errors [v11.2]

Post by zorg »

https://love2d.org/wiki/love.graphics.polygon
Copied literally:
When in fill mode, the polygon must be convex and simple or rendering artifacts may occur. love.math.triangulate and love.math.isConvex can be used in 0.9.0+.
So unless you make it so it's convex and simple from the get-go, you will always need to triangulate it.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
HDPLocust
Citizen
Posts: 65
Joined: Thu Feb 19, 2015 10:56 pm
Location: Swamp
Contact:

Re: Polygon render errors [v11.2]

Post by HDPLocust »

zorg wrote: Sun May 26, 2019 4:33 pm So unless you make it so it's convex and simple from the get-go, you will always need to triangulate it.
Ah, my bad. But this is bad too, hmm.
Science and violence
TheHUG
Citizen
Posts: 61
Joined: Sun Apr 01, 2018 4:21 pm

Re: Polygon render errors [v11.2]

Post by TheHUG »

HDPLocust wrote: Sun May 26, 2019 4:39 pm
zorg wrote: Sun May 26, 2019 4:33 pm So unless you make it so it's convex and simple from the get-go, you will always need to triangulate it.
Ah, my bad. But this is bad too, hmm.
Why do you want to avoid triangulation?
User avatar
HDPLocust
Citizen
Posts: 65
Joined: Thu Feb 19, 2015 10:56 pm
Location: Swamp
Contact:

Re: Polygon render errors [v11.2]

Post by HDPLocust »

TheHUG wrote: Sun May 26, 2019 7:08 pm Why do you want to avoid triangulation?
Yea, it sometimes can't triangulate, so I use meshes now.
Science and violence
Post Reply

Who is online

Users browsing this forum: No registered users and 155 guests