
As part of an earlier job, I wrote a three-dimensional rendering library. This library is written entirely in C++, and has lots of nifty features, like Gouraud shading, color dithering, and support for the MSDL scene file format. It's fairly fast, but not as fast as some commercial packages. It can currently render between 1500 and 2000 polygons per second (performance during actual use, not the speed of just the polygon-rendering engine) on a Macintosh Quadra 700, which is quite acceptable for most applications; compare with roughly 6000 polygons per second for the fastest renders I know of. On a PowerMac, it can quite handily do full-screen, full-motion animation.
The library is designed to be platform-independent; it basically just zaps frames into a bitmap and leaves it up to a subclass to interact with the system (a different subclass is created for each port). Working versions exist for XWindow systems and Macintosh systems, and someone is currently trying to port the library to Windows, DOS, or both. As of 11/9/95, I have received a DOS port, but have not yet been able to confirm that it works. If you really want to be on the cutting edge, you might want to grab it from here.
The images above were created by the library on a Macintosh Quadra 700 in about 0.1 seconds (each). They show the three standard axes, as viewed from a point somewhere around (25, 0, 25). There are two lights in the scene, a red one and a blue one. The picture on the left was rendered using the fastest settings: 8-bit color, no smoothing, no dithering. The middle image was rendered using 8-bit color, smoothing, and dithering. The rightmost image was rendered in 24-bit color with smoothing. Dithering and smoothing add around 20% or so each to the total rendering time, and 24-bit color slows things down by a factor of 2 or so. PowerMac performance is dramatically faster, but I haven't gotten around to doing any PowerMac timings. I do have a PowerPC-native application built using Graph3D which renders and animates the same scene as above, but at 640x480; it looks quite smooth on a PowerMac 7100/80.
The source code for the Graph3D library is available from my ftp site.
Or click here to download the source immediately:
.