CODE SAMPLE - SIMPLE TRIANGLE Rasterizer
This is a simple software triangle rasterizer using just set-pixel.
It takes 3 vertices in screen space and renders a triangle between them. To the right is an example of how this rasterizer can be used to render a 3D scene. All the models in the scene to the right were stored in world space then before being rendered were translated to screen space and rendered with this function.