OpenGL Programming Guide (3rd Edition) Errata

This is a listing of the errors found in the Third Edition of the OpenGL Programming Guide (Woo, Neider, Davis, Shreiner: ISBN 0-201-60458-2, published in 1999) and its source code examples.

NOTE:  Silicon Graphics has moved the location of the source code examples.  They are no longer on sgigate.sgi.com.  Instead, the source code files have been moved to ftp://ftp.sgi.com/opengl

This is a link to the list of bugs in the Second Edition (Woo, Neider, Davis: ISBN 0-201-46138-2, published in 1997).

There is no comprehensive list of bugs in the First Edition, published in 1992.

If you have either the Second or First Edition and find problems, please check to see if the problems are repeated in the Third Edition before reporting them. If you find unreported bugs in the Third Edition, please submit them by e-mail.

Code Errors

stencil.c:  add glFlush() at the end of display() (Reported by Alan Hanson)

Text Errors

page 24, Figure 1-3 shows five pictures of squares, rotating clockwise.  To match code example 1-3, they should be rotating counter-clockwise. (Reported by Roman Baeriswyl)

page 25, double.c:  The downloaded version of double.c works fine, but the book doesn't match it. The switch statement in the mouse function should have three cases: GLUT_LEFT_BUTTON, GLUT_MIDDLE_BUTTON, and GLUT_RIGHT_BUTTON. The example on page 25 misses the  GLUT_RIGHT_BUTTON case.

page 36, Example 2-1 typo:  remove "Special characters" from first line of code.  (Reported by Jichun Zhu)

page 36, 2nd paragraph, 1st sentence: remove the word "to" from "The internals of GLUT will pass this to function two arguments..." (Reported by Scott Dahl)

page 54/55: at the beginning of the display() function, add glLineWidth(1.0f) so that redraw will restore the line width. To get code example 2-5 to match figure 2-9, add glLineWidth(1.0) to the very last code on page 55. (Reported by Kevin Foad)

page 63: in the sentence above Figure 2-12, it says: "In Figure 2-12, the dashed lines represent added edges." However, there are no dashed lines in Figure 2-12.  The new image we replaced in the 3rd edition lacks the dotted lines that should be in the interior of the polygon.  (Reported by several people)

page 89, Figure 2-17: The model on the left isn´t an icosahedron, because it has too much faces. Only ten faces should be seen, and only five triangles should be connected to each vertex. (Reported by Christian Vetter)

page 114, Figure 3-8: The triangle in the figure is not centered at the origin, but in the source code of the programming example, the triangle's center is almost at the origin.  This strongly affects the rotation example, causing a mismatch between the figure and the code.  Also, the amount of rotation in the code and diagram do not match.  The orientation of the original and the rotated triangle in the figure just look like the ones that are being shown by the compiled program. To get the results the figure shows, the triangle must be rotated about 30 degrees clockwise about a ray parallel to the z-axis and that goes through the lower right vertex of the triangle. But in the program and also in the code given in the book the triangle is rotated +90 degrees, if the same projection like in the figure is chosen, counterclockwise. (Reported by Manuel Hewitt and David Holland)

page 119, 3rd line from the bottom, typo: the line of code should be gluLookAt(...) instead of gluLookat(...). (Reported by Mike Soukup)

 
page 183: In the 1st paragraph in the section entitled 'Select a Lighting Model,' the second sentence is: "In Example 5-1, the only element of the lighting model that's defined explicitly is the global ambient light." However, the global ambient light is not defined at all in Example 5-1.  (Reported by Jan Vlug)
 
page 196: In Example 5-7, the first line in the display callback reads:

        glClear( GL_COLOR_BUFFER_MASK | GL_DEPTH_BUFFER_MASK );

"MASK" should be "BIT"; that is:

        glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );

(Reported by Michael Anderson)

page 210, the last sentence reads, "Remove all the glMaterialfv() calls, and use the more efficient glColorMaterial() calls to achieve the same lightning."  It should read, "Remove most of the glMaterialfv() calls...", because it is not possible to change GL_SHININESS with glColorMaterial(). (Reported by Roman Baeriswyl)

page 220:  The sentence that starts "None of these techniques is hard to use-- in fact..." is wrong. It should say "are" instead of "is"  (Reported by John Alway)

 
chapter 7; pages 257, 264, and 274: code examples 7-1, 7-2, and 7-5, should not include the header files <GL/gl.h> and <GL/glu.h>. At best, inclusion of these files is redundant, because <GL/glut.h> also includes them.  On MS Windows, <windows.h> must be included before either gl.h or glu.h, to ensure the proper definition of internal macros. See pages 15 and 16 for more detail about the proper inclusion of header files.

page 270: In Example 7-3, each call to glVertex3f should be changed to call glVertex3fv (Reported by Jose Antonio Robles)

page 309:  The second illustration from top, in the box, reads: "Short (byte 0) | Short (byte 1) ---> Short (byte 0) | Short (byte 0)"
It should read: "Short (byte 0) | Short (byte 1) ---> Short (byte 1) | Short (byte 0)"  (Reported by John Alway)

 
page 332: In Figure 8-15: the formula for calulating P'(i,j) has a typo. In the formula, P(m+1, n+j) should have been P(m+i, n+j). (Reported by Sung Kang)
 
page 338: The next to last paragraph reads:  "The convolutions of pixels at the left and top edges of an image..."  It should read, "The convolution of pixels at the edges of an image..." because the left and top edges are not handled differently to the right and bottom edges. (Reported by Dave Baldwin)

page 339: The 3rd paragraph reads: "GL_REPLICATE_BORDER computes the convolution in the same way as in GL_CONSTANT_BORDER mode, except that the last row of column of pixels is used for the pixels that lie outside..."
It should read, "GL_REPLICATE_BORDER computes the convolution in the same way as in GL_CONSTANT_BORDER mode, except for the treatment of pixel locations where the convolution filter extends beyond the edge of the source image. For these locations, it is as if the outermost one-pixel border of the source image was replicated." (Reported by Dave Baldwin)

page 421: section entitled "The q-Coordinate"
Should read "See Plate 28 for an example..." not "See Plate 27 for an example..."

page 452: In the 2nd full paragraph, it should read "using 1.0/16.0, 2.0/16.0,..." instead of "using 16.0/1.0, 16.0/2.0,..."  (Reported by David Bourguignon)

page 453: Example 10-2 is not directly in the file accpersp.c.  It belongs to the jitter.h file, which is included in accpersp.c (Reported by David Bourguignon)

page 461, in dof.c there is a missing declaration:

GLuint teapotList;
(Reported by David Bourguignon)

page 486: the general quadratic equation has the term a5yx.  It should be a5yz. (Reported by Tsai Pi Hsi and Gerry Murphy)

page 529: In Example 12.8 (trim.c):
GLfloat pwlPt [4] [2] = {{0.75, 0.5}, {0.5, 0.25}, {0.25, 0.5}};
should be
GLfloat pwlPt [3] [2] = {{0.75, 0.5}, {0.5, 0.25}, {0.25, 0.5}};
(Reported by David Brayford)
 
page 658: the function
void glutKeyboardFunc( void (*func)( unsigned int key, int x, int y ));
should be
void glutKeyboardFunc( void (*func)( unsigned char key, int x, int y ));
(Reported by Goetz Martinek)
 
 
page 665: the resulting cross product (near the bottom of the page)
   dV/dS x dV/dt = [-3t^3   2s^2   6st^2]
                   should be
   dV/dS x dV/dt = [3t^2   2s^2   6st^2]
(Reported by Paul Pedriana)
 
page 674: the orthographic projection matrix R is wrong. Each element in the far right column (matrix elements with index number 12 through 15) of the matrix R should have a minus sign in front of them. (Reported by Sung Kang)

Color Plate 28:  Credits should say "Image courtesy of Stefan Brabec and Wolfgang Heidrich, Max-Planck-Institute for Computer Science, Saarbrücken, Germany."

Color Plate 30 typo:  "virtual" is misspelled.  (Reported by Stephane Raimbault)

To the www.opengl.org web page
This page is maintained by Dave Shreiner.

Last Modified:  September 1, 2002