OpenGL Development Cookbook

I’m reviewing “OpenGL Development Cookbook” for Packt (“Quick answers to common problems” – “Over 40 recipes to help you learn, understand, and implement modern OpenGL in your applications” focusses on version 3.3 core profile – Explores current graphics programming techniques including GPU-based methods from the outlook of modern OpenGL 3.3), it may take a while. So here are my thoughts as I work through the book. When I’m through, I’ll add a summary (tl;dr).

Caveat

Nominally I have a couple of weeks for the review, but rather embarrassingly I’ve found that both the GPU on my laptop and work computer only support GLSL 1.2. My home desktop is up to the task, but is being used by my better half. So, for the time being I’m restricted to mostly reading and little coding… not ideal for computer graphics but it does focus the mind beautifully.

I hope to get some proper GPU time soon.

First Impressions

Clearly, the author isn’t a native English speaker; the book uses rather idiosyncratic English, occasional clumsy phrasing, a mix of formal and informal English and inconsistent terminology leading to a curiously verbose style which is unfortunately at odds with the given format where brevity would be better appreciated. While this is a minor flaw it can be a bit distracting, and is wholly unnecessary; the text could and should have been rephrased to use standard English (for example “the GLUT library was written” rather than “invented“).

While the topics covered in this book seem eminently sensible and cover a range of areas, OpenGL is huge and has many, many possible applications. In choosing to cover only 40 topics (admittedly no mean feat in itself) it falls short as a cookbook, and indeed it feels more like a textbook.

Overview

The book jumps right into modern OpenGL using a 3.3 core profile as the minimum with no concessions to, nor migration from earlier fixed pipeline versions.

Sections are clearly defined with the recipe title, “Getting Ready”, “How to do it…”, “How it works…” and “There’s more…”. On a purely personal note for some reason the section heading “There’s more…” felt hyerbolic and grated with me.

Plenty of illustrations, but not overly excessive, as befits a book on computer graphics.

Debugging can be a nightmare in OpenGL, so addenda covering some basic debugging or error messages, at least, would have been appreciated

Familiarty with C++ is also required but, oddly, not mentioned.

Chapter 1

The opening chapter provides an introduction to OpenGL.

The book adopts Visual Studio, GLEW, SOIL, GLM and freeglut (all freely available and widely used). VS is platform dependent so perhaps not the ideal choice (Eclipse may have been better) but this is not a major issue by any means.

Setting up the code libraries is covered a little too briefly, the book doesn’t fully explain how to compile and install them, doing so can be confusing; perhaps this is an issue with the libraries rather than the book, but since the author adopts them, some guidance should be forthcoming beyond “download and compile it”.

The author’s use of “D:/Libraries” in the provided source code is unnecessary and potentially confusing (there is no guarantee the user will have a d: drive), rather than using the directories recommended by the library authors.