Slashdot is powered by your submissions, so send in your scoop


Forgot your password?
Books Book Reviews

OpenGL SuperBible 5th ed. 98

asgard4 writes "OpenGL SuperBible in its fifth edition is almost a complete rewrite. The authors threw out the discussion of old-style, fixed-function programming and replaced it with an introduction to OpenGL that is exclusively focused on using shaders from the very beginning. All the things that got deprecated with the advent of OpenGL 3 got removed, making it a more relevant and up-to-date book than the previous editions. The OpenGL SuperBible still strives to be the 'world's best introduction to OpenGL' according to the authors. Let's see if it can keep that promise." Read on for the rest of Martin's review.
OpenGL SuperBible (Fifth Edition)
author Richard S. Wright, Jr., Nicholas Haemel, Graham Sellers, Benjamin Lipchak
pages 969
publisher Addison-Wesley Publishing
rating 9/10
reviewer Martin Ecker
ISBN 0-32-171261-7
summary : Quite possibly the best introduction to OpenGL 3.3 programming that focuses exclusively on graphics programming using shaders
With the removal of the fixed-function pipeline, the OpenGL SuperBible is no longer quite the heavy-weight it used to be. It shrunk from more than 1200 to about 970 pages, which is not necessarily a bad thing. The book starts out with a basic introduction to 3D graphics, coordinate systems, and some basic math concepts, followed by short rundown of the history of OpenGL and a first little example program that renders a triangle. The authors even provide instructions on how to setup the C/C++ projects to build the example on Windows and MacOS. The writing is to the point but still verbose enough to easily follow the text. The authors analyze the example program in detail making it easy for a beginner to follow and understand the code. Overall, I really like the writing style and the flow of the book.

The next few chapters gradually introduce more and more OpenGL API functionality intermixed with new 3D graphics concepts, such as rendering points, lines, and polygons in various ways, alpha blending, how to use geometric transformations and projections, and how to move objects and the camera. Eventually, basic texture mapping is introduced with most of the basic things you need to know about the topic. In particular, specifying textures coordinates, sampling textures in the fragment shader, the various filtering modes (even anisotropic filtering), and texture compression are discussed. In a later chapter the authors do another deep dive into the topic of textures, in particular rectangle textures, cube maps, multitexturing, point sprites, and using texture arrays

Until this point the authors used haven't really talked much about shader programming yet. Most of the examples use simple pre-made shaders that don't really do much. This changes with chapter six titled "Nonstock Shaders" where we get a first glimpse of how to write our own shaders in GLSL, the OpenGL Shading Language. In particular, a fragment shader that uses a simple lighting model to light objects is developed.

After these introductory chapters presenting the basics of OpenGL programming, the next part of the book focuses on more advanced topics, beginning with buffer objects and how to use them to make your OpenGL programs run much more efficiently on modern hardware. Some of the examples presented in this part of the book include using render-to-texture to do reflections, tone mapping, and bloom. This part of the book closes with two fairly long chapters on advanced usage of the shader pipeline, in particular the transform feedback and the geometry shader stages. There is also some discussion on more advanced effects achievable with fragment shaders, in particular applying filters to images, such as a Gaussian blur or a Sobel filter. Finally, rendering geometry efficiently with vertex buffer objects and rendering many objects via geometry instancing is presented.

The final part of the book consists of 4 chapters explaining how to integrate OpenGL with the underlying operating system, in particular with Windows, Mac OS X, and Linux plus various other Unix flavors. The last chapter of this part of the book is about OpenGL ES, which is a version of OpenGL designed to be used especially on embedded system devices, in particular mobile phones and PDAs, to render real-time, interactive 3D graphics.

The book has a lot of images and diagrams throughout, though unfortunately not all of them are in color. There are however 24 color plates of the most interesting images in the middle of the book. The complete source code of the book, and even precompiled binaries for Windows and Mac OS X, can be downloaded from the book's webpage.

If you are new to both 3D graphics programming and OpenGL with a bit of C/C++ programming experience and you are eager to learn how to develop interactive programs with OpenGL, then this book is exactly right for you. The book is written in an easy to understand style without skimming the details (or even more advanced topics). It is the most comprehensive introduction to OpenGL that doesn't require a lot of previous knowledge I have seen to date. The decision to completely drop any discussion of the fixed-function pipeline turned out to be an excellent choice. Finally there is a book that no longer wastes the reader's time with the parts of OpenGL that nobody who does serious graphics development uses and instead presents up-to-date information on how to do 3D graphics on modern graphics hardware.

All in all, the OpenGL SuperBible in its fifth edition succeeds very well in keeping its promise to be the best introduction to OpenGL and 3D graphics programming. Even after you're done working your way through the main parts of the book you will always come back to the handy OpenGL API reference in the appendix of the book.

The review author has been involved in real-time graphics programming for more than 10 years and works as a professional game developer for High Moon Studios in sunny California.

You can purchase OpenGL SuperBible (Fifth Edition) from Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.


This discussion has been archived. No new comments can be posted.

OpenGL SuperBible 5th ed.

Comments Filter:
  • by WilyCoder ( 736280 ) on Monday October 25, 2010 @03:21PM (#34016276)

    You're thinking of OpenGL ES. Theres a good book for that already.

  • by 91degrees ( 207121 ) on Monday October 25, 2010 @03:32PM (#34016394) Journal
    Consoles tend to use their own APIs. The one on the PSP has a resemblance to OpenGL but it's quite different. Not sure about the others.

    Smartphones use OpenGL ES. This is basically a subset of OpenGL. The OpenGL bibles don't usually include specific information on these. They're aimed more at desktop applications.
  • by SplashMyBandit ( 1543257 ) on Monday October 25, 2010 @03:32PM (#34016398)
    The last OpenGL SuperBible touched on OpenGL ES (the stuff Android phones, iPod/iPad/iPhone etc). OpenGL ES is a subset of the full OpenGL functionality so this book is a good start to both. You can also get an Addison-Wesley book on OpenGL ES as well but the SuperBible is still worth it for the techniques it teaches (how to best use the API and but stuff together for various effects).

    I hope all you DirectX programmers take note. Those who wrote for DirectX might have been able to make money on the PC+XBox but the software doesn't move to the PS3, iPhone/iPad, Android, Linux (while still running on Windows too) like OpenGL does. You all fell for Microsoft's deliberate plan to keep you on that platform (where is the Slashdot "it's a trap" tag when you need it, lol). You never know exactly what the future will bring but you do know that devices and operating systems will change. This makes OpenGL the best strategic (long-term) choice for 3D development and the OpenGL SuperBible is a great book to get you there (along with the other OpenGL classics: the 'Red Book', 'Blue Book' and 'Orange Book' - google for these or go to the OpenGL site: []

    Case studies:
    The author of X-Plane talks about OpenGL made him $3.5 million in a month since he could port his product to iPhone very easily. He'll make even more money from iPad sales too (my nephew just bought X-Plane for the iPad): []

    Il-2 Sturmovik had both a DirectX and (faster) OpenGL implementation. Coupled with the fact that it is largely written in Java and it was able to be ported to the PS3 as the product Wings-of-Prey greatly increasing sales.

    If you must learn a 3D library, then learn OpenGL.It has the features of DirectX 11 (geometry shaders etc) but will run on Windows XP.
  • by Mysteray ( 713473 ) on Monday October 25, 2010 @03:37PM (#34016464) Homepage

    OP may or may not be intentionally trolling, but the question is pretty easy to answer:


    Just about every program that does 3D graphics on anything besides MS Windows or XBox uses OpenGL, today.

  • by Anonymous Coward on Monday October 25, 2010 @04:22PM (#34017052)

    Fixed point has its limits with precision. It's not a brilliant scheme to be working with when it comes to 3d graphics. Most vendors have realised this, and any mobile GPU from since a few years before the iphone was introduced will have full floating point support, shaders and modern concepts available.

    Fixed point is an option in OpenGL ES 1.1 (common-lite version). There is also a better version of OpenGL ES 1.1 which is fully floating point. Then there is OpenGL ES 2.0, which offer full shader support and has everything you absolutely need to make pretty much anything. The next generation of OpenGL ES coming up next year will be based on OpenGL 3.x, cutting away all the deprecated stuff, the fluff and other useless extensions. But really, OpenGL ES and OpenGL are converging. GLES are adopting features from GL, and GL are deprecating stuff not found in GLES.

  • by nschubach ( 922175 ) on Monday October 25, 2010 @04:41PM (#34017344) Journal

    Are we talking console(OpenGL ES)? Pretty much all of them.

    Are we talking PC (OpenGL "proper")? Isn't Valve's Source Engine OpenGL capable now?

  • OpenGL 4.1 is out (Score:2, Informative)

    by neuro88 ( 674248 ) on Monday October 25, 2010 @05:46PM (#34018202)
    This looks like a good book, but it covers OpenGL 3.3. Can someone provide a high-level overview of the differences between OpenGL 3.3 and 4.1?
  • Re:OpenGL 4.1 is out (Score:3, Informative)

    by Narishma ( 822073 ) on Monday October 25, 2010 @06:25PM (#34018726)

    OpenGL 3.3 is basically a backport of a bunch of stuff from OpenGL 4.1 that they could make work on DX10 level hardware (OpenGL 4.1 needs DX11 level hardware).

  • by Sludge ( 1234 ) <slashdot&tossed,org> on Tuesday October 26, 2010 @12:33AM (#34021260) Homepage

    Apple only supports OpenGL 2.1 (plus extensions). The Fifth Edition of the book only covers OpenGL 3. GLSL has changed a great deal since 2.1 and this book is very incompatible with any released version of OS X as of this writing.

    If you want to write OpenGL that is compatible with a Mac, get the Fourth Edition of the book.

  • by pnewhook ( 788591 ) on Tuesday October 26, 2010 @08:10AM (#34023122)

    Why is this so hard to understand?

    There is NO left hand coordinate system in the REAL world. All of physics, engineering, robotics and most graphics use a right hand coordinate system. Obviously you can define a coordinate system to be anything you like, and DirectX has defined theirs to be left handed which is contrary to every other standard out there.

    The link does not say it can be either. It says DirectX uses a left hand coordinate system. They then tell you how to use right hand coordinate DATA but fundamentally the internals are still left handed.

    Does that explain it for you?

In 1869 the waffle iron was invented for people who had wrinkled waffles.