Jump to ratings and reviews
Rate this book

Colossal Blunders of the War

Rate this book
The book is written in a Cookbook format with practical recipes aimed at helping you exploit OpenGL to its full potential.This book is targeted towards intermediate OpenGL programmers. However, those who are new to OpenGL and know an alternate API like DirectX might also find these recipes useful to create OpenGL animations.

326 pages, Hardcover

First published January 1, 2013

3 people are currently reading
13 people want to read

About the author

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
3 (37%)
4 stars
3 (37%)
3 stars
2 (25%)
2 stars
0 (0%)
1 star
0 (0%)
Displaying 1 - 2 of 2 reviews
5 reviews
July 31, 2022
Great premise, average execution

I had great expectations when I first opened this book. In fact, I feel there is a big void right in the middle of published books about OpenGL.

At one side of the void there are either technical references or introductory texts, which explain the reader how to properly use the library but don't show practical applications: at the end of those books people know how to texture lookup from a vertex shader, not how to render realistic terrain from a height map.

At the other side there are collections of articles about very advanced rendering techniques, intended for people already well versed in graphics programming and hardly of any use for the everyday developer (think about the ShaderX or the GPU Pro series).

The premise of this book is to be the gap filler, which tells you about all the cool things you can do with OpenGL (in addition to rendering teapots) in a wide range of topics, while remaining practical enough for the average OpenGL developer.

While it's a good shot in that direction, it doesn't live up to this ambitious premise.


Let's start with what's good: recipes cover a vast range of applications, including mirrors, object picking, particle systems, GPU physics simulations, ray tracing, volume rendering and more.

OpenGL version of choice is 3.3 core profile, so all the recipes are implemented using modern OpenGL while still being compatible with most GPU hardware out there. Every recipe comes with a self-contained and working code example that you can run and tweak. All examples share coding style and conventions, which is great added value.

The toolchain of choice is Visual Studio for Windows, but the examples also build unmodified on Linux installations. Despite Mac OS X only supporting up to OpenGL 3.2, examples not requiring 3.3 features will build there as well with minor modifications (just be sure to use included GLUT.framework rather than freeglut, as the latter relies on XQuartz which isn't able to request an OpenGL 3 context).


Then, there's something that just doesn't work well. First, the formatting of code excerpts is terrible: long lines wrap twice or thrice with no leading spaces, so without highlighting it's nigh impossible to read the code right at first glance. Given that a good 30% of this book is code, this is really something that should be addressed in a second edition.

A somewhat deeper problem is about how recipes are presented. Most of them dive directly in a step-by-step sequence of code snippets, taking little time to explain the required background and the overall idea behind the implementation. On a related note, the book states that knowledge of OpenGL is just a "definite plus" to get through it, but after the very first recipe spends a total of three lines explaining what Vertex Array Objects are, before jumping into code that uses them, it becomes clear that being proficient with OpenGL is a requirement to appreciate the book.

The quality of the recipes varies a lot through the book: the best written and most interesting ones are from chapters 6, 7 and 8, which comes as no surprise as the author's research interests include the topics they cover. I would have exchanged many of the previous recipes, some of which are variations on the same theme, to be about techniques that both fit the recipe format and are relevant for any up-to-date rendering engine (depth of field, fur, caustics, etc...). On a related note, I think that perhaps the single biggest flaw of the book is that it's written by a single author, but to offer 50 great recipes a cookbook needs several ones, each master in her own trade and each offering the best of her knowledge.

In the end: if you're already well versed in OpenGL, have interest in the specific topics best covered by the author, and you're going to read each recipe at the computer to comfortably read code, OpenGL Development Cookbook has something to offer. While not the gapfiller I was initially looking for, the learning opportunity from having a code example for each recipe is remarkable.
Profile Image for Bartłomiej Filipek.
Author 3 books20 followers
August 29, 2013
OpenGL Development Cookbook
What I like
The structure of the book makes it pretty easy to follow. In the beginning, it is good to read the introduction and familiarize with the application framework. After that, a reader can read in whatever order he/she likes. Each of the items is written in a similar way. Topics are of course done by a single person, so there is no need to switch between writing styles.

Vast majority of items are very well done and explained. I liked chapter about Order Independent Transparency in particular. You have there very good explanation, pictures, code (with additional comments) and a comparison of techniques at the end.

Another great item relates to Volume rendering (3D Textures, ray casting, splatting). Before reading the chapter I thought that such topic is quite hard to implement. Now, it looks simpler and clearer. There is a detailed discussion about final quality of the output. More the slices (or texture samples) the better the result, but performance drops.

Technology chosen is, in my opinion, very suitable. We have Visual C++ 2010, freeGLUT, Glm and SOIL.Those additional libraries are small and very simple to understand (not to mention their popularity). There is no additional need to learn some complicated framework/engine.

What I dislike

The level of topics is sometimes strange. We have a nice and easy item that describes basic lighting, or item about simple particle systems. Next to it we have advanced elements like OOIT using dual depth peeling or even more like Ray Tracing. I would prefer to have items that are more or less at the same level. Or at least change the "distance" between extremes.

Some more description would be nice. I know that it is hard to compress all that knowledge in only 300 pages. But for some topics the author could make a bit more effort. For instance when dealing with geometry shaders and subdivision of a quad just a little diagram/image could explain more. This could make the book more complete.

To sum up: The book is definitely worth reading for any developer who has already managed to render a triangle in OpenGL and wants to go further.
Displaying 1 - 2 of 2 reviews

Can't find what you're looking for?

Get help and learn more about the design.