Typos


On page 77, the glRotate() prototype is:

void glRotate{fd}(TYPE angle, GLfloat x, TYPE y, TYPE z);

This should be:

void glRotate{fd}(TYPE angle, TYPE x, TYPE y, TYPE z);

Thanks to Greg Drysdale for catching this.


On page 80, the glScale() prototype is:

void glScale{fd}(GLfloat x, GLfloat y, GLfloat z);

This should be:

void glScale{fd}(TYPE x, TYPE y, TYPE z);

Thanks to Greg Drysdale for catching this.


On page 82, Figure 4.12 uses matrices that are row-major, which is inconsistent with OpenGL's column-major format.

Thanks to Mauyra Shah for catching this.


On page 101, the first code snippet is:

//using unsigned bytes
glColor3ui(255, 255, 0);

//using signed bytes in an array
GLbyte yellow[] = {127, 127, 0};
glColor3iv(yellow);

This should be:

//using unsigned bytes
glColor3ub(255, 255, 0);

//using signed bytes in an array
GLbyte yellow[] = {127, 127, 0};
glColor3bv(yellow);

On page 108, the first code snippet reads:

GLfloat lightPos[] = { 2.0, 4.0, -3.0, 1.0 }
glLightfv( GL_LIGHT0, GL_POSITION, lightDir);

This should be:

GLfloat lightPos[] = { 2.0, 4.0, -3.0, 1.0 }
glLightfv( GL_LIGHT0, GL_POSITION, lightPos);

Thanks to Greg Drysdale for catching this.


On page 157 in Table 7.3, GL_UNSIGNED_BYTE_3 3 2 should be GL_UNSIGNED_BYTE_3_3_2

Thanks to Matthew Davis for catching this.


On page 214, the first paragraph after Table 9.2 reads:

"GL_RGB_SCALE and GL_RGB_ALPHA..."

This should read:

"GL_RGB_SCALE and GL_ALPHA_SCALE..."

Missing Stencil Ops

In Chapter 12, Table 12.6, we neglected to include a couple of stencil ops:

GL_INCR_WRAP
Similar to GL_INCR, but instead of saturating at the maximum value, the values can wrap around.
GL_DECR_WRAP
Similar to GL_DECR, but instead of saturating at the minimum value, the values can wrap around.

These values were added in OpenGL 1.4, originating from the GL_EXT_stencil_wrap extension.