Line rendering done

After an hour, I now have lines being rendered. There seems to be an issue with the slope on a few occasions, but it’s good enough. I’m just using the standard Bresenham’s line algorithm, nothing fancy or optimised.

The first attempt yielded some… interesting results. The issue was that the Y coordinate was always moving down the screen rather than in the correct direction depending on if the first Y coordinate was less than the second or not.

Messed up line rendering

Lines are rendered with the best approximation of Maya’s wireframe colour I could come up with for ARGB4444 formatted pixels. You can see that the top-left vertex’s line is off just slightly.

Close to correct line rendering

With that all done, I can focus again on the lighting.