ZEROblue
Member |
Two methods:
1. Draw one polygon at a time. Use a single bitplane as intermediate buffer, clear the bounding rectangle, draw edges and fill, then use this to do bitwise OR and AND for each bitplane in your screen.
2. Draw several polygons at once by splitting your concave mesh into smaller convex sets, and sort the order of the sets rather than the individual polygons. To draw each set you clear the bounding rectangle on all bitplanes of the intermediate, determine visible edges and detect and remove duplicates, draw edges, fill all bitplanes and generate the mask, and then copy the whole set of polygons into the screen at once.
Which method is the fastest probably varies on a case basis, though the first straight forward method probably wins most of the time even if it has more overhead per individual polygon.
If you're on at least an A1200 with some fastmem, wouldn't it be faster to draw the polygons with the CPU?
|