Quote:
Originally Posted by mc6809e
That seems like it would often take more time. There's the larger off screen buffer to clear. And twice as much memory to cover with the fill. I can see how it might be competitive for small polys, but I'm not sure there's a big win with that method over simply filling one plane and then blitting to multiple planes, especially if you need more than three colors.
|
The off-screen buffer is not "larger" - why would it be larger? It's exactly as bis as the object you want to draw. And you don't need to clear it, you can draw the lines in one buffer and fill to a different destination. Then you only need to XOR over the lines again.
If you don't see how filling several polygons at one is quicker than filling them all separately and then separately copying them into the destination then i don't know what to say. On a single object, polygons will overlap significantly along the edges, and for smaller objects this is ever more the case. You can also "cancel out" shared edges before you even draw them. You can of course have as many planes as you like in the destination buffer. Just using minterms, you can have a 3 colour object copy to a 32 colour screen with colours remapped anywhere into the destination.
Also you can draw the first object to be drawn directly onto the screen, and dynamically re-order the palette. If this object is a concave interior, you can have as many colours as you like and fill the whole thing in one pass.