Review: Modern Graphics Programming Primer by Hans de Ruiter

This is one of those short, no-nonsense, types of books that actually has a treasure trove on info hidden inside. It’s not very long, and can be read in one or two sittings. And there is not really all that much code either, aside from a few cookbook like examples at the end. What Modern Graphics Programming Primer offers is an approachable, high-level, overview of how to get started in graphics programming, and it does so well. Hans de Ruiter chose to use OpenGL ES3 for this book, which is actually a great choice for beginners, and has wide platform support on both desktop and mobile. However, a lot of the advice is generic, and would apply with more modern APIs like Vulkan.

As stated, the text is short, only 58 pages. But it’s still well worth reading. I’ve seen a lot of graphics and programming books, but many of them are too complex for a beginner, or get mired in obtuse math equations that will just confuse you before you get a triangle on the screen. Ruiter takes a different approach here, and just explains some general concepts in layman’s terms. While not the most advanced techniques in rendering, you’ll get an overview of the pipeline, how shaders work, practical advice on how to use matrix math, and an overview of the Phong lighting model. It is very basic, but it’s the best place to start that I’ve seen. There is also a section on performance optimization, which a lot of books miss, and this alone makes it worth picking up.

If you’re already intermediate to advanced, you may not find much here, but I did learn a few valuable tricks, and if you are coming from other APIs and want to learn GLES3, it could still be useful. The author also has a more detailed book Getting Started with OpenGL ES 3+ Programming, which is the second part of the series. While many people advise to skip learning OpenGL, I believe this is a mistake. The new modern APIs like Vulkan are seriously complex, and not a good choice if you don’t have previous experience with coding graphics. In theory, Vulkan can offer better performance, but many (or all) of the same techniques can be achieved no matter which API you choose. So if you are just starting out, I think this is a great place to take your first steps. Recommended.