3D wireframe terrain renderer from scratch in C, using 1990s graphics programming techniques.
The program takes a height map and renders it as an interactive rotatable 3D wireframe. Everything implemented by me: Bresenham line algorithm, z-buffering, and Cohen-Sutherland clipping. Interestingly, it can work almost out of the box with topographic data such as from the National Land Survey of Finland.
| FdF rendering from elevation data | Corresponding area in Apple Maps |
No GPU, no shaders, basically only dependent on the primitive 42 interface to GLFW. I used the arena allocator from David Hanson's C Interfaces and Implementations to great effect. Thank you David! Thank you as well to Michael Abrash for pioneering many of these high-performance software rendering techniques, and, equally importantly, documenting them clearly for posterity in his Graphics Programming Black Book. Were I to work on this further, I'd love to improve the performance and rendering quality. Implementing Wu Antialiasing would be the obvious next step. I'd also be curious to go in a wildly different direction and rewrite the whole thing for the GPU with e.g. GLSL and see how different that is.


