View Single Post
Old 24 February 2015, 23:05   #18
Mrs Beanbag
Glastonbridge Software
Mrs Beanbag's Avatar
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,202
blitter polygon filling is quite nice and simple, draw the lines in 1 pixel per line mode with XOR minterms, you can do any complex shape of polygon even with holes in. The problem you need to be careful with though is because naively, you simply fill a bounding box, if you have a long thin polygon that goes diagonally across the screen, you can end up blitting an entire screen's worth even though there are less than 16 pixels of fill per scanline.

If you are clever you can fill multiple polygons using a single fill operation, though. It is good for completely convex shapes or concave interiors.
Mrs Beanbag is offline  
Page generated in 0.07955 seconds with 9 queries