| Software rendering in 500 lines of bare C++(haqr.eu) | |
| 293 points by mpweiher 1 day ago | 69 comments | |
tl;dr: A tutorial series that builds a software renderer in ~500 lines of C++ from scratch, with no third-party graphics libraries, to teach how APIs like OpenGL, Vulkan, Metal, and DirectX actually work under the hood. Starting from just a TGA image class with pixel-setting capability, students implement line and triangle rasterization themselves, typically taking 10-20 hours to produce a capable renderer that handles 3D models with textures. Full source is on GitHub. | |
HN Discussion:
| |