News for hackers. Stuff that matters.
Re:How OpenGL works: software renderer in 500 lines of code by lbenes on Friday March 11, 2016 @02:08AM (#11265129)
Will this teach you how shader-based OpenGL works or the older fixed function pipeline rendering method?
Re:How OpenGL works: software renderer in 500 lines of code by joeld42 on Friday March 11, 2016 @02:12AM (#11265144)
"OpenGL" is a bit of a misnomer here, there's nothing directly related to OpenGL. This will not teach you how opengl works, but is an example of a software rasterizer. Knowing how that works will help you understand what is going on under the hood of your graphics API.

This renderer does do lighting per-fragment, so it's more akin to the newer shader-based OpenGL.

Re:How OpenGL works: software renderer in 500 lines of code by 8bitpimp on Friday March 11, 2016 @02:26AM (#11265197)
If you look at main.cpp the vertex and framgment stages are abstracted via IShader, which also handles passing data between them. This emulates the programmable pipeline.
Re:How OpenGL works: software renderer in 500 lines of code by fsloth on Friday March 11, 2016 @10:28AM (#11267113)
It will give the educational toy-analogue to a modern programmable pipeline by using C++ code which is more or less isomorphic to shader based OpenGL (or DirectX).