Register your product to gain access to bonus material or receive a coupon.
OpenGL is a powerful software interface used to produce high-quality computer generated images and interactive applications using 2D and 3D objects and color bitmaps and images.
The OpenGL Programming Guide, Third Edition, provides definitive and comprehensive information on OpenGL and the OpenGL Utility Library. This book discusses all OpenGL functions and their syntax shows how to use those functions to create interactive applications and realistic color images.
You will find clear explanations of OpenGL functionality and many basic computer graphics techniques such as building and rendering 3D models; interactively viewing objects from different perspective points; and using shading, lighting, and texturing effects for greater realism. In addition, this book provides in-depth coverage of advanced techniques, including texture mapping, antialiasing, fog and atmospheric effects, NURBS, image processing, and more. The text also explores other key topics such as enhancing performance, OpenGL extensions, and cross-platform techniques.
This third edition has been extensively updated to include the newest features of OpenGL, Version 1.2, including:
The OpenGL Technical Library provides tutorial and reference books for OpenGL. The library enables programmers to gain a practical understanding of OpenGL and shows them how to unlock its full potential.
The OpenGL Technical Library was originally developed by SGI and continues to evelove under the auspices of the Architecture Review Board (ARB), an industry consortium responsible for guiding the evolution of OpenGL and related technologies. The OpenGL ARB is composed of industry leaders, such as 3Dlabs, Compaq, Evans & Sutherland, Hewlett-Packard, IBM, Intel, Intergraph, Microsoft, NVIDIA, and SGI.
The OpenGL Programming Guide, Third Edition was written by Mason Woo, Jackie Neider, Tom Davis, and Dave Shreiner.
About This Guide.
What This Guide Contains.
What's New in This Edition.
What You Should Know Before Reading This Guide.
How to Obtain the Sample Code.
Nate Robins' OpenGL Tutors.
Errata.
Style Conventions.
Acknowledgments.
Figures.
Tables.
Examples.
1. Introduction to OpenGL.
What Is OpenGL?
A Smidgen of OpenGL Code.
OpenGL Command Syntax.
OpenGL as a State Machine.
OpenGL Rendering Pipeline.
Display Lists.
Evaluators.
Per-Vertex Operations.
Primitive Assembly.
Pixel Operations.
Texture Assembly.
Rasterization.
Fragment Operations.
OpenGL-Related Libraries.
Include Files.
GLUT, the OpenGL Utility Toolkit.
Animation.
The Refresh That Pauses.
Motion = Redraw + Swap.
A Drawing Survival Kit.
Clearing the Window.
Specifying a Color.
Forcing Completion of Drawing.
Coordinate System Survival Kit.
Describing Points, Lines, and Polygons.
What Are Points, Lines, and Polygons?
Specifying Vertices.
OpenGL Geometric Drawing Primitives.
Basic State Management.
Displaying Points, Lines, and Polygons.
Point Details.
Line Details.
Polygon Details.
Normal Vectors.
Vertex Arrays.
Step 1: Enabling Arrays.
Step 2: Specifying Data for the Arrays.
Step 3: Dereferencing and Rendering.
Interleaved Arrays.
Attribute Groups.
Some Hints for Building Polygonal Models of Surfaces.
An Example: Building an Icosahedron.
Overview: The Camera Analogy.
A Simple Example: Drawing a Cube.
General-Purpose Transformation Commands.
Viewing and Modeling Transformations.
Thinking about Transformations.
Modeling Transformations.
Viewing Transformations.
Projection Transformations.
Perspective Projection.
Orthographic Projection.
Viewing Volume Clipping.
Viewport Transformation.
Defining the Viewport.
The Transformed Depth Coordinate.
Troubleshooting Transformations.
Manipulating the Matrix Stacks.
The Modelview Matrix Stack.
The Projection Matrix Stack.
Additional Clipping Planes.
Examples of Composing Several Transformations.
Building a Solar System.
Building an Articulated Robot Arm.
Reversing or Mimicking Transformations.
Color Perception.
Computer Color.
RGBA versus Color-Index Mode.
RGBA Display Mode.
Color-Index Display Mode.
Choosing between RGBA and Color-Index Mode.
Changing between Display Modes.
Specifying a Color and a Shading Model.
Specifying a Color in RGBA Mode.
Specifying a Color in Color-Index Mode.
Specifying a Shading Model.
A Hidden-Surface Removal Survival Kit.
Real-World and OpenGL Lighting.
Ambient, Diffuse, Specular, and Emissive Light.
Material Colors.
RGB Values for Lights and Materials.
A Simple Example: Rendering a Lit Sphere.
Creating Light Sources.
Color.
Position and Attenuation.
Spotlights.
Multiple Lights.
Controlling a Light's Position and Direction.
Selecting a Lighting Model.
Global Ambient Light.
Local or Infinite Viewpoint.
Two-Sided Lighting.
Separate Specular Color.
Enabling Lighting.
Defining Material Properties.
Diffuse and Ambient Reflection.
Specular Reflection.
Emission.
Changing Material Properties.
Color Material Mode.
The Mathematics of Lighting.
Material Emission.
Scaled Global Ambient Light.
Contributions from Light Sources.
Putting It All Together.
Separate Specular Color.
Lighting in Color-Index Mode.
The Mathematics of Color-Index Mode Lighting.
Blending.
The Source and Destination Factors.
Sample Uses of Blending.
A Blending Example.
Three-Dimensional Blending with the Depth Buffer.
Antialiasing.
Antialiasing Points or Lines.
Antialiasing Polygons.
Fog.
Using Fog.
Fog Equations.
Polygon Offset.
An Example of Using a Display List.
Display List Design Philosophy.
Creating and Executing a Display List.
Naming and Creating a Display List.
What's Stored in a Display List?
Executing a Display List.
Hierarchical Display Lists.
Managing Display List Indices.
Executing Multiple Display Lists.
Managing State Variables with Display Lists.
Encapsulating Mode Changes.
Bitmaps and Fonts.
The Current Raster Position.
Drawing the Bitmap.
Choosing a Color for the Bitmap.
Fonts and Display Lists.
Defining and Using a Complete Font.
Images.
Reading, Writing, and Copying Pixel Data.
Imaging Pipeline.
Pixel Packing and Unpacking.
Controlling Pixel-Storage Modes.
Pixel-Transfer Operations.
Pixel Mapping.
Magnifying, Reducing, or Flipping an Image.
Reading and Drawing Pixel Rectangles.
The Pixel Rectangle Drawing Process.
Tips for Improving Pixel Drawing Rates.
Imaging Subset.
Color Tables.
Convolutions.
Color Matrix.
Histogram.
Minmax.
Combining Pixels Using Blending Equations.
Constant Blending Factors.
An Overview and an Example.
Steps in Texture Mapping.
A Sample Program.
Specifying the Texture.
Texture Proxy.
Replacing All or Part of a Texture Image.
One-Dimensional Textures.
Three-Dimensional Textures.
Using a Texture's Borders.
Multiple Levels of Detail.
Filtering.
Texture Objects.
Naming A Texture Object.
Creating and Using Texture Objects.
Cleaning Up Texture Objects.
A Working Set of Resident Textures.
Texture Functions.
Post-Texture Application of Specular Color.
Assigning Texture Coordinates.
Computing Appropriate Texture Coordinates.
Repeating and Clamping Textures.
Automatic Texture-Coordinate Generation.
Creating Contours.
Environment Mapping.
Advanced Features.
The Texture Matrix Stack.
Multitexturing.
Buffers and Their Uses.
Color Buffers.
Clearing Buffers.
Selecting Color Buffers for Writing and Reading.
Masking Buffers.
Testing and Operating on Fragments.
Scissor Test.
Alpha Test.
Stencil Test.
Depth Test.
Blending, Dithering, and Logical Operations.
The Accumulation Buffer.
Scene Antialiasing.
Motion Blur.
Depth of Field.
Soft Shadows.
Jittering.
Polygon Tessellation.
Creating a Tessellation Object.
Tessellation Callback Routines.
Tessellation Properties.
Polygon Definition.
Deleting a Tessellation Object.
Tessellation Performance Tips.
Describing GLU Errors.
Backward Compatibility.
Quadrics: Rendering Spheres, Cylinders, and Disks.
Managing Quadrics Objects.
Controlling Quadrics Attributes.
Quadrics Primitives.
Prerequisites.
Evaluators.
One-Dimensional Evaluators.
Two-Dimensional Evaluators.
Using Evaluators for Textures.
The GLU NURBS Interface.
A Simple NURBS Example.
Managing a NURBS Object.
Creating a NURBS Curve or Surface.
Trimming a NURBS Surface.
Selection.
The Basic Steps.
Creating the Name Stack.
The Hit Record.
A Selection Example.
Picking.
Hints for Writing a Program That Uses Selection.
Feedback.
The Feedback Array.
Using Markers in Feedback Mode.
A Feedback Example.
Error Handling.
Which Version Am I Using?
Utility Library Version.
Window System Extension Versions.
Extensions to the Standard.
Extensions to the Standard for Microsoft Windows (WGL).
Cheesy Translucency.
An Easy Fade Effect.
Object Selection Using the Back Buffer.
Cheap Image Transformation.
Displaying Layers.
Antialiased Characters.
Drawing Round Points.
Interpolating Images.
Making Decals.
Drawing Filled, Concave Polygons Using the Stencil Buffer.
Finding Interference Regions.
Shadows.
Hidden-Line Removal.
Hidden-Line Removal with Polygon Offset.
Hidden-Line Removal with the Stencil Buffer.
Texture Mapping Applications.
Drawing Depth-Buffered Images.
Dirichlet Domains.
Life in the Stencil Buffer.
Alternative Uses for glDrawPixels() and glCopyPixels().
Overview.
Geometric Operations.
Per-Vertex Operations.
Primitive Assembly.
Pixel Operations.
Texture Memory.
Fragment Operations.
Odds and Ends.
The Query Commands.
OpenGL State Variables.
Current Values and Associated Data.
Vertex Array.
Transformation.
Coloring.
Lighting.
Rasterization.
Texturing.
Pixel Operations.
Framebuffer Control.
Pixels.
Evaluators.
Hints.
Implementation-Dependent Values.
Implementation-Dependent Pixel Depths.
Miscellaneous.
GLX: OpenGL Extension for the X Window System.
Initialization.
Controlling Rendering.
GLX Prototypes.
AGL: OpenGL Extensions for the Apple Macintosh.
Initialization.
Rendering and Contexts.
Managing an OpenGL Rendering Context.
On-Screen Rendering.
Off-Screen Rendering.
Full-Screen Rendering.
Swapping Buffers.
Updating the Rendering Buffers.
Using an Apple Macintosh Font.
Error Handling.
AGL Prototypes.
PGL: OpenGL Extension for IBM OS/2 Warp.
Initialization.
Controlling Rendering.
PGL Prototypes.
WGL: OpenGL Extension for Microsoft Windows 95/98/NT.
Initialization.
Controlling Rendering.
WGL Prototypes.
Initializing and Creating a Window.
Handling Window and Input Events.
Loading the Color Map.
Initializing and Drawing Three-Dimensional Objects.
Managing a Background Process.
Running the Program.
Finding Normals for Analytic Surfaces.
Finding Normals from Polygonal Data.
Homogeneous Coordinates.
Transforming Vertices.
Transforming Normals.
Transformation Matrices.
Translation.
Scaling.
Rotation.
Perspective Projection.
Orthographic Projection.
OpenGL Correctness Tips.
OpenGL Performance Tips.
GLX Tips.
The OpenGL graphics system is a software interface to graphics hardware. (The GL stands for Graphics Library.) It allows you to create interactive programs that produce color images of moving three-dimensional objects. With OpenGL, you can control computer-graphics technology to produce realistic pictures or ones that depart from reality in imaginative ways. This guide explains how to program with the OpenGL graphics system to deliver the visual effect you want.
This guide has 14 chapters. The first five chapters present basic information that you need to understand to be able to draw a properly colored and lit three-dimensional object on the screen.
Chapter 1, "Introduction to OpenGL," provides a glimpse into the kinds of things OpenGL can do. It also presents a simple OpenGL program and explains essential programming details you need to know for subsequent chapters.
Chapter 2, "State Management and Drawing Geometric Objects," explains how to create a three-dimensional geometric description of an object that is eventually drawn on the screen.
Chapter 3, "Viewing," describes how such three-dimensional models are transformed before being drawn on a two-dimensional screen. You can control these transformations to show a particular view of a model.
Chapter 4, "Color," describes how to specify the color and shading method used to draw an object.
Chapter 5, "Lighting," explains how to control the lighting conditions surrounding an object and how that object responds to light (that is, how it reflects or absorbs light). Lighting is an important topic, since objects usually don't look three-dimensional until they're lit. The remaining chapters explain how to optimize or add sophisticated features to your three-dimensional scene. You might choose not to take advantage of many of these features until you're more comfortable with OpenGL. Particularly advanced topics are noted in the text where they occur.
Chapter 6, "Blending, Antialiasing, Fog, and Polygon Offset," describes techniques essential to creating a realistic scene--alpha blending (to create transparent objects), antialiasing (to eliminate jagged edges), atmospheric effects (to simulate fog or smog), and polygon offset (to remove visual artifacts when highlighting the edges of filled polygons).
Chapter 7, "Display Lists," discusses how to store a series of OpenGL commands for execution at a later time. You'll want to use this feature to increase the performance of your OpenGL program.
Chapter 8, "Drawing Pixels, Bitmaps, Fonts, and Images," discusses how to work with sets of two-dimensional data as bitmaps or images. One typical use for bitmaps is describing characters in fonts.
Chapter 9, "Texture Mapping," explains how to map one- and two-dimensional images called textures onto three-dimensional objects. Many marvelous effects can be achieved through texture mapping.
Chapter 10, "The Framebuffer," describes all the possible buffers that can exist in an OpenGL implementation and how you can control them. You can use the buffers for such effects as hidden-surface elimination, stenciling, masking, motion blur, and depth-of-field focusing.
Chapter 11, "Tessellators and Quadrics," shows how to use the tessellation and quadrics routines in the GLU (OpenGL Utility Library).
Chapter 12, "Evaluators and NURBS," gives an introduction to advanced techniques for efficient generation of curves or surfaces.
Chapter 13, "Selection and Feedback," explains how you can use OpenGL's selection mechanism to select an object on the screen. Additionally, the chapter also explains the feedback mechanism, which allows you to collect the drawing information OpenGL produces rather than having it be used to draw on the screen.
Chapter 14, "Now That You Know," describes how to use OpenGL in several clever and unexpected ways to produce interesting results. These techniques are drawn from years of experience with both OpenGL and the technological precursor to OpenGL, the Silicon Graphics IRIS Graphics Library. In addition, there are several appendices that you will likely find useful.
Appendix A, "Order of Operations," gives a technical overview of the operations OpenGL performs, briefly describing them in the order in which they occur as an application executes.
Appendix B, "State Variables," lists the state variables that OpenGL maintains and describes how to obtain their values.
Appendix C, "OpenGL and Window Systems," briefly describes the routines available in window-system-specific libraries, which are extended to support OpenGL rendering. Window system interfaces to the X Window System, Apple MacIntosh, IBM OS/2, and Microsoft Windows NT and Windows 95 are discussed here.
Appendix D, "Basics of GLUT: The OpenGL Utility Toolkit," discusses the library that handles window system operations. GLUT is portable and it makes code examples shorter and more comprehensible.
Appendix E, "Calculating Normal Vectors," tells you how to calculate normal vectors for different types of geometric objects.
Appendix F, "Homogeneous Coordinates and Transformation Matrices," explains some of the mathematics behind matrix transformations.
Appendix G, "Programming Tips," lists some programming tips based on the intentions of the designers of OpenGL that you might find useful.
Appendix H, "OpenGL Invariance," describes when and where an OpenGL implementation must generate the exact pixel values described in the OpenGL specification.
Finally, an extensive Glossary defines the key terms used in this guide.
The third edition of the OpenGL Programming Guide includes this new material:
This guide assumes only that you know how to program in the C language and that you have some background in mathematics (geometry, trigonometry, linear algebra, calculus, and differential geometry). Even if you have little or no experience with computer-graphics technology, you should be able to follow most of the discussions in this book. Of course, computer graphics is a huge subject, so you may want to enrich your learning experience with supplemental reading.
Computer Graphics: Principles and Practice by James D. Foley, Andries van Dam, Steven K. Feiner, and John F. Hughes (Reading, MA: Addison-Wesley, 1990)--This book is an encyclopedic treatment of the subject of computer graphics. It includes a wealth of information but is probably best read after you have some experience with the subject.
3D Computer Graphics: A User's Guide for Artists and Designers by Andrew S. Glassner (New York: Design Press, 1989)--This book is a nontechnical, gentle introduction to computer graphics. It focuses on the visual effects that can be achieved rather than on the techniques needed to achieve them.
Another great place for all sorts of general information is the Official OpenGL Web Site. This Web site contains software, documentation, FAQs, and news. It is always a good place to start any search for answers to your OpenGL questions: http://www.opengl.org
Once you begin programming with OpenGL, you might want to obtain the OpenGL Reference Manual by the OpenGL Architecture Review Board (Reading, MA: Addison-Wesley), which is designed as a companion volume to this guide. The Reference Manual provides a technical view of how OpenGL operates on data that describes a geometric object or an image to produce an image on the screen. It also contains full descriptions of each set of related OpenGL commands--the parameters used by the commands, the default values for those parameters, and what the commands accomplish. Many OpenGL implementations have this same material on-line, in the form of manual pages or other help documents, which are probably more up-to-date. There are also versions on the World Wide Web; consult the previously mentioned Official OpenGL Web Site.
OpenGL is really a hardware-independent specification of a programming interface, and you use a particular implementation of it on a particular kind of hardware. This guide explains how to program with any OpenGL implementation. However, since implementations may vary slightly--in performance and in providing additional, optional features, for example--you might want to investigate whether supplementary documentation is available for the particular implementation you're using. In addition, you might have OpenGL-related utilities, toolkits, programming and debugging support, widgets, sample programs, and demos available to you with your system.
This guide contains many sample programs to illustrate the use of particular OpenGL programming techniques. These programs make use of Mark Kilgard's OpenGL Utility Toolkit (GLUT). GLUT is documented in OpenGL Programming for the X Window System by Mark Kilgard (Reading, MA: Addison-Wesley Developers Press, 1996). The section "OpenGL-Related Libraries" in Chapter 1 and Appendix D give more information about using GLUT. If you have access to the Internet, you can obtain the source code for both the sample programs and GLUT for free via anonymous ftp (file-transfer protocol).
For the source code examples found in this book, download the files from the ftp site:ftp://ftp.sgi.com/opengl/
Use the appropriate tools to uncompress and/or extract the source code from these archive files.
For Mark Kilgard's source code for GLUT (for Microsoft Windows 95/98/NT or the X Window System), check this Web page to find out what current version of GLUT is available and from where to download the source code:http://reality.sgi.com/opengl/glut3/glut3.html.
Many implementations of OpenGL might also include the code samples as part of the system. This source code is probably the best source for your implementation, because it might have been optimized for your system. Read your machine-specific OpenGL documentation to see where the code samples can be found.
Nate Robins has written a suite of tutorial programs that demonstrate basic OpenGL programming concepts by allowing the user to modify the parameters of a function and interactively see their effects. Topics covered include transformations, lighting, fog, and texturing. These highly recommended tutorials are portable and require the aforementioned GLUT. To get the source code for these tutorials, see this Web site:http://www.cs.utah.edu/~narobins/opengl.html.
Undoubtedly this book has errors. An error list is maintained at the following Web site: http://www.woo.com/errata.html. If you find any bugs, you can use the pointer at this Web site to report them.
These style conventions are used in this guide:
Code examples
are set off from the text in a monospace font, and command summaries are shaded with gray boxes. In a command summary, braces are used to identify choices among data types. In the following example, glCommand has four possible suffixes: s, i, f, and d, which stand for the data types GLshort, GLint, GLfloat, and GLdouble. In the function prototype for glCommand, TYPE is a wildcard that represents the data type indicated by the suffix:
void glCommand{sifd}(TYPE x1, TYPE y1, TYPE x2, TYPE y2);
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.
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, 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:
page 486: the general
quadratic equation has the term a5yx. It should be a5yz.
(Reported by Tsai Pi Hsi and Gerry Murphy)
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)
Last Modified: September 1, 2002