There is a better method for software rendering. It's called 's-buffering', it's invented by Paul Nettle, and it simulates z-buffering, at a lower cost, especially when you're working with relatively few polygons. It will be a disaster for meshes with 5000+ polygons, but it rules for meshes with a couple of huge polygons. You can mix it with z-buffering by adding 'z-buffer write' to the polygon rasterizers; the depth test is done by the s-buffer, but the depth per pixel is stored (without any 'if' statements) by the rasterizer (wich is comparably cheap). You can then use real z-buffering for smaller polygons (wich is faster for those). This is more or less what Quake 1 did: Perfect sorting on large scene polygons (with z-buffer writes) and z-buffer sorting on small actor polygons (with z-buffer read and writes). Quake1 didn't use s-buffers though; it used a BSP tree to get perfect sorting of the scenery polygons.
Here's a link to the s-buffer FAQ:
http://www.gamedev.net/reference/articl ... cle668.asp
Enjoy.
- Jacco.