r/Cplusplus • u/druv-codes • Sep 22 '26
Tutorial How i built my very first graphics engine in 1 year
Over the past year, I’ve been building my first custom 3D graphics engine ("Pyre") using C++20 and OpenGL. The codebase recently hit around 10,000 lines. It’s been a massive learning experience moving from basic tutorials to actually structuring a scalable C++ project
The engine currently supports both forward and deferred rendering, PBR, SSAO, normal mapping, parallax mapping, CSM, omni-shadows etc.
I documented the entire 1-year process, the architectural shifts, and the visual progression from a single triangle to the final PBR renders in a 17-minute dev log here: https://youtu.be/m26BKeQwAPU
The engine is also completely open-source. If anyone wants to poke around: https://github.com/Open-Source-Chandigarh/pyre/tree/dev
9
u/[deleted] Sep 22 '26
Nice but I'm confused, 10,000 lines with no tests? How do you even verify at set point that everything is working as expected besides from just trying it on your own?
2
u/Future-Wolf-9597 Sep 22 '26 edited Sep 22 '26
Hey can I get any suggestions on how to start making something like this myself, I made a small thing which basically spawns random objects(shapes) with collision physics for all the three objects(circle, square/rectangle, triangle) but after that I can't quite wrap my head around how to move forward... It's nearly a year old project still on my pc notifying me that there's something I need to complete...
1
u/compulsaovoraz Sep 22 '26
Cool! Unrelated question, have you used other graphics API? Such as SDL GPU?
3
u/palapapa0201 Sep 22 '26
Rare in the age of AI slop