Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Book Reviews Books Media

OpenGL Programming Guide 6th Ed. 86

Martin Ecker writes "The Red Book, also known as the OpenGL Programming Guide published by Addison-Wesley Professional, returns in its sixth edition with additions covering OpenGL 2.1. The Red Book, so called because of its nice, red cover, is probably the most-well known, standard introduction to the OpenGL graphics API. Let me take you on a tour through the pages of this book to see what it has to offer." Read on for the rest of Martin's review.
OpenGL Programming Guide (Sixth Edition) - The Official Guide to Learning OpenGL, Version 2.1
author Dave Shreiner, Mason Woo, Jackie Neider, Tom Davis
pages 862
publisher Addison-Wesley Professional
rating 8/10
reviewer Martin Ecker
ISBN 0-321-48100-3
summary The Red Book is the authoritative guide to OpenGL.
Just as the previous, fifth edition of the book, the sixth edition is incredibly complete and thorough. It contains explanations of pretty much every feature of OpenGL, even the rarely used ones. You want to know about the fairly new occlusion query support of OpenGL? It's in this book. You want to know about the accumulation buffer and its uses? It's in this book. You want to know about the (mostly deprecated) use of indexed color buffers? It's in this book. The sixth edition also covers vertex and fragment shaders and recent additions to the GLSL, the OpenGL Shading Language, such as the preprocessor. Even though the coverage was expanded, the authoritative guide to shader programming in OpenGL still remains the Orange Book aka The OpenGL Shading Language (see my previous Slashdot review).

The Red Book is aimed at the beginning to intermediate graphics programmer that is not yet familiar with OpenGL. It assumes a basic background in computer graphics theory and working knowledge of the C programming language. The book consists of 15 chapters and 9 appendices that together span approximately 860 pages.

The first chapter gives a brief introduction to the basic concepts of OpenGL and describes the rendering pipeline model used in the API. GLUT, a cross-platform library that allows easily creating OpenGL applications, is also shortly discussed together with a program that shows GLUT in action. The following chapters proceed to explain the basic geometric primitives, such as lines and polygons, supported by OpenGL and how to render them in different positions and from different viewpoints using the various OpenGL matrix stacks. Also the basics of using colors, fixed-function lighting, framebuffer blending, and fog are discussed.

Chapter seven contains a description of display lists, a unique feature of OpenGL that allows to store OpenGL API calls for efficient multiple uses later on in a program. Chapter eight then moves on to discuss what an image is for OpenGL. Most notably this chapter now covers pixel buffer objects, a fairly recent addition to OpenGL, which the fifth edition of the book did not mention. The discussion of images in chapter eight bring us straight to chapter nine on texture mapping, one of the largest chapters in the book. This chapter discusses everything you need to know about textures, from specifying texture images in uncompressed and compressed form to applying textures to triangles using the various kinds of supported texture filters. Also depth textures and their application in the form of shadow maps and — new in the sixth edition — sRGB format textures added in OpenGL 2.1 are presented.

In chapter ten the authors discuss the buffers that make up the framebuffer, such as the color buffer, depth buffer, and stencil buffer. This chapter summarizes some of the things already presented in the earlier chapters and then describes the various framebuffer operations in more detail. Also the accumulation buffer and its uses, such as motion blur and depth of field effects, are discussed. Chapter eleven and twelve are on the tools provided by GLU, the GL utility library, in particular tesselators, quadrics, evaluators, and NURBs. GLU is nowadays rarely ever used in production code, so these chapters mostly demonstrate just how complete the Red Book is in its coverage of OpenGL. This also applies to chapter thirteen on selection and feedback, which are rarely used features, mostly because of the lack of hardware acceleration in today's GPUs (Graphics Processing Units).

Finally, chapter fourteen is a collection of topics that didn't fit into the other chapters, such as error handling and the OpenGL extension mechanism. Additionally, this chapter presents various higher level techniques and tricks, for example how to implement a simple fade effect, how to render antialiased text, and some examples of using the stencil buffer. The final chapter of the book is a discussion of the OpenGL Shading Language (GLSL, for short). In the sixth edition this chapter has been updated to version 1.20 of GLSL as required by OpenGL 2.1. Even though the OpenGL API functions required to use GLSL are presented, this is only a rough overview of how programmable shaders are used in OpenGL. For a more detailed description of GLSL the reader is referred to the Orange Book.

The book closes with quite a few appendices on the order of operations in the OpenGL rendering pipeline, the state variables that can be queried, the interaction of OpenGL with the operating system-specific windowing systems, a brief discussion of homogeneous coordinates as used in OpenGL, and some programming tips. Also a reference of the built-in GLSL variables and functions is included.

The book contains a large number of images and diagrams, all of them in black and white except for 32 color plates in the middle of the book. The illustrations are of high quality and generally help make the explained concepts and techniques easier to understand. Most of the color plates depict spheres, teapots, and other simple geometric objects, so they aren't overly eye-catching but do serve their purpose of showing what can be achieved with OpenGL.

All in all, the Red Book remains the definitive guide to OpenGL. Apart from being a good introduction, it also contains many interesting tips and tricks that make the experienced OpenGL programmer come back to it often. If you've read through the Red Book and the Orange Book in their entirety you pretty much know everything there is to know about OpenGL.

Martin 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 Programming Guide (Sixth Edition) - The Official Guide to Learning OpenGL, Version 2.1 from amazon.com. 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 Programming Guide 6th Ed.

Comments Filter:
  • I'd wait! (Score:5, Informative)

    by Grisha ( 15132 ) on Wednesday September 19, 2007 @02:58PM (#20671227)
    OpenGL 3.0 is due to be released in short order, and it's pretty much a complete redesign of the API.

    Out with state machines and in with OO abstractions.

  • Re:Gah. (Score:2, Informative)

    by Intruger ( 637870 ) on Wednesday September 19, 2007 @03:37PM (#20671683)
    I don't know about the latest edition. But you can take a look at an older edition here:
    http://www.glprogramming.com/red/ [glprogramming.com]
    I learned OGL mostly from this book (along with NeHe's tutorial on gamedev.net).
  • by nate nice ( 672391 ) on Wednesday September 19, 2007 @03:39PM (#20671711) Journal
    DirectX has had an "easier" and "more pleasant" API for years. OpenGL is a state machine, programmed in good 'ol C. DirectX has an OO API and what some would argue a more complete library.

    OpenGL 3.0 will move to a an OO API. It should make programming in OpenGL a lot more attractive. I've heard from people they feel it's easier to do a lot more things in DirectX than OpenGL. It's all opinion, of course.

    I'm not a graphics programmer but I have played one on TV.
  • Re:I'd wait! (Score:5, Informative)

    by Abcd1234 ( 188840 ) on Wednesday September 19, 2007 @03:41PM (#20671735) Homepage
    So help out a N00b. Is Open GL strictly for graphics, or does it cover other system calls like sound and user IO?

    Graphics only.

    Why oh why is there nothing out there that allows programmers to write some kind of ANSI coded games that will compile on mutiple operating systems without error or modification?

    I take it you've never heard of SDL [libsdl.org]? Just use an OpenGL-enabled surface for graphics, and the standard SDL APIs for sound and input.
  • Re:Q about book (Score:3, Informative)

    by mike260 ( 224212 ) on Wednesday September 19, 2007 @09:33PM (#20675855)
    It's a genuine how-to book, and a pretty good one at that. That, plus NeHe [gamedev.net], are excellent ways to get started.
  • Re:Q about book (Score:3, Informative)

    by the_greywolf ( 311406 ) on Wednesday September 19, 2007 @10:42PM (#20676407) Homepage

    Believe it or not, it's actually both. It is the official standard API documentation, but it's written for the benefit of both implementers and users. Because the standard describes very specific behavior (including side-effects) of implementations, it's the most important and useful resource for users of the API. That, and the book describes in very clear terms how to use the API. It's not a beginner's HOWTO manual, but it's very, very close.

    I own 5th edition, and it's the OpenGL reference I use the most.

If you have a procedure with 10 parameters, you probably missed some.

Working...