C: SDL 3D renderer

Following on from the Delphi 3D test program, I have started to code another 3D renderer, this time in C using SDL. Again my goal is not to create a viable renderer for games, 3D applicatins etc, but rather as an exercise that will teach me more about 3D rendering. I have always been fascinated with how things work, so doing something like this will give me a better understanding to the internals of OpenGL, DirectX graphics etc.

At the moment it’s in the very early stages. I have written the basic 3D affine transformation code and also an arbitrary triangle filler, as seen in the screenshot below. This triangle can be rendered at any rotation angle and scale. The filler uses linear interpolation to blend vertex colours which will be the basis for Gouraud shading once I have implemented light sources. I hope to implement full Phong shading, texture mapping and maybe even normal mapping.



Links