graphics
graphics copied to clipboard
Add concave polygon algorithm using stencil buffer
Can be added to Polygon.
From nical's comment on IRC:
basically you take a point A inside of the shape and each triangle is made of P(i), P(i+1) and A. In the stencil buffer you alternate between 0 and and 1, and the pixels that are inside the shape are 1, while the ones outside are 0.