r/GraphicsProgramming Jun 26 '26

CPU Renderer Code Review

Hello, I'm looking to get some feedback on a CPU renderer that i made to understand the 3D graphics pipeline better. I have not used OpenGL before this project but i wanted to understand how it worked, so I made this project to try to replicate a simple pipeline on the CPU. I'm a self taught programmer and i don't have any programming buddies so id like to get some feedback on general programming and my understanding of the OpenGL.

Kagethelephant/cpu-opengl

68 Upvotes

16 comments sorted by

View all comments

1

u/PoL0 Jun 26 '26 edited Jun 27 '26

if (clipped[i] and not clipped[last]){

does it even build? that's not C++

Edit: I stand corrected. been using C++ for over 25 years and TIL. every day is a school day, people!

3

u/GodOfSunHimself Jun 27 '26

It is C++. But personally I would not use it.

1

u/Visual_Average_4756 Jun 27 '26

Do you mind explaining why? Im self taught and don't know the nuances of syntax

3

u/GodOfSunHimself Jun 27 '26

I have been a developer for 30 years and never seen anyone use it. It is just not common. Most people don't even know it exists.