Well, it's been a while since my last update, but I think now is a good moment. I've been busy the last couple of weeks learning OpenGL. Although at first I was a bit overwhelmed by the complexity of the API, I got used to it quite fast. A friend of mine also found a nice OpenGL wrapper component for C++Builder, and the result can be seen in the new test-app.
The changes are significant, but not very visible. The biggest change is of course the switch to GL, but also the addition of a (rudimentary) 3DS-file loader. I also added a checkbox to turn on/off the CPU-usage bars. These bars simply aren't made for high-speed animation, and switching them off makes quite a difference.
The other changes are all invisible. I've been playing around with my class-definitions again, and I think I have a nice structure now where most tasks/data are owned by the correct class. Good class design is very important in my view. If done well, it can make all the difference in having clean, easy-to-read-and-understand or complex, hard-to-follow-and-maintain code. In a one man project the size of a 3D engine this is a nice feature and not very essential. For anything larger, especially if a team is writing it, it can make the difference between success or failure.
The nice thing about OpenGL is that it is possible to replace the software renderer a piece at a time. At this point, I have simply replaced my own rasterizer with the GL one. This was very straightforward: At the very end of my rendering pipeline, there was a loop like this:
This is the complete polygon-filler! Couldn't be simpler in my view :).
Of course this is only the first step. Ultimately, the entire engine should be built around the GL structure, which means a lot more modifications. It's probably worthwhile to start from scratch. Until then, I think I now have the basic framework for further experimenting with visibility determination and more advanced rendering algorithms (raytracing and radiosity). More on these subjects later.
Download The Sample Program: ManicMotion.exe