Alternate to DrawPoly?

BlitzMax Forums/BlitzMax Programming/Alternate to DrawPoly?

Odds On(Posted 2007) [#1]
I'm having some problems with the built-in DrawPoly method.. as you can see from the code example below, there is a large ugly white triangle (caused by overlapping polygons) that shouldn't be there.



Does anyone have any alternatives to DrawPoly that produce more reliable results?

Thanks,
Chris


H&K(Posted 2007) [#2]




Odds On(Posted 2007) [#3]
Thanks for that H&K, I threw together a quick test to see if it works, but it seems to produce exactly the same results as DrawPoly().

In my main program, the points are plotted by clicking the mouse onto a grid, so any kind of wierd and wonderful shape could be created..

From looking at the code, it looks like the shape is split into smaller pieces, but it doesn't appear to be an automatic process. Any more information regarding the code above would be appreciated.

Thanks,
Chris


H&K(Posted 2007) [#4]
You have to split the poly into only convex parts. That is each shapebit should be convex.
Its totly useless for your auto thingy, as the bits need to be pre calculated