GLBasic forum

Main forum => GLBasic - en => Topic started by: djtoon on 2011-Jul-18

Title: build object problem
Post by: djtoon on 2011-Jul-18
i have a code that makes polygons out of a vector shape
the problem is the polygons are sometimes 4 or 7 points and when i  draw a x_obj with them thay come out bad
i think becuse thay arent 3 points like you need for a triangle
any way to overcome this? any ideas?
thanks
dan
Title: Re: build object problem
Post by: Kitty Hello on 2011-Jul-18
Yes. Bad thing is, you need to triangulate them if it's not a triangle strip for X_OBJ.
Good thing is, I have written a Delauney Triangulation, once:
http://www.glbasic.com/showroom.php?site=games&game=Delaunay (http://www.glbasic.com/showroom.php?site=games&game=Delaunay)
Title: Re: build object problem
Post by: djtoon on 2011-Jul-18
well when i use that i get
No triangle for 449, 269
and for all my points
any ideas?

Title: Re: build object problem
Post by: Kitty Hello on 2011-Jul-18
no. Can you post an example?