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. 1. Introduction to OpenGL. What Is OpenGL?
A Smidgen of OpenGL Code.
OpenGL Command Syntax.
OpenGL as a State Machine.
OpenGL Rendering Pipeline.
OpenGL-Related Libraries.
Animation.
2. State Management and Drawing Geometric Objects. A Drawing Survival Kit.
Describing Points, Lines, and Polygons.
Basic State Management.
Displaying Points, Lines, and Polygons.
Normal Vectors.
Vertex Arrays.
Attribute Groups.
Some Hints for Building Polygonal Models of Surfaces.
3. Viewing. Overview: The Camera Analogy.
Viewing and Modeling Transformations.
Projection Transformations.
Viewport Transformation.
Troubleshooting Transformations.
Manipulating the Matrix Stacks.
Additional Clipping Planes.
Examples of Composing Several Transformations.
Reversing or Mimicking Transformations.
4. Color. Color Perception.
Computer Color.
Specifying a Color and a Shading Model.
5. Lighting. A Hidden-Surface Removal Survival Kit.
Real-World and OpenGL Lighting.
A Simple Example: Rendering a Lit Sphere.
Creating Light Sources.
Selecting a Lighting Model.
Defining Material Properties.
The Mathematics of Lighting.
Lighting in Color-Index Mode.
6. Blending, Antialiasing, Fog, and Polygon Offset. Blending.
Antialiasing.
Fog.
Point Parameters.
Polygon Offset.
7. Display Lists. Why Use Display Lists?
An Example of Using a Display List.
Display List Design Philosophy.
Creating and Executing a Display List.
Executing Multiple Display Lists.
Managing State Variables with Display Lists.
8. Drawing Pixels, Bitmaps, Fonts, and Images. Bitmaps and Fonts.
Images.
Imaging Pipeline.
Reading and Drawing Pixel Rectangles.
Tips for Improving Pixel Drawing Rates.
Imaging Subset.
9. Texture Mapping. An Overview and an Example.
Specifying the Texture.
Filtering.
Texture Objects.
Texture Functions.
Assigning Texture Coordinates.
Automatic Texture-Coordinate Generation.
Multitexturing.
Texture Combiner Functions.
Applying Secondary Color after Texturing.
The Texture Matrix Stack.
Depth Textures.
10. The Framebuffer. Buffers and Their Uses.
Testing and Operating on Fragments.
The Accumulation Buffer.
11. Tessellators and Quadrics. Polygon Tessellation.
Quadrics: Rendering Spheres, Cylinders, and Disks.
12. Evaluators and NURBS. Prerequisites.
Evaluators.
The GLU NURBS Interface.
13. Selection and Feedback. Selection.
Feedback.
14. Now That You Know. Error Handling.
Which Version Am I Using?
Extensions to the Standard.
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.
Texture Mapping Applications.
Drawing Depth-Buffered Images.
Dirichlet Domains.
Life in the Stencil Buffer.
Alternative Uses for glDrawPixels() and glCopyPixels().
Appendix A. Order of Operations. Overview.
Geometric Operations.
Pixel Operations.
Fragment Operations.
Odds and Ends.
Appendix B. State Variables. The Query Commands.
OpenGL State Variables.
Appendix C. OpenGL and Window Systems. Accessing New OpenGL Functions.
GLX: OpenGL Extension for the X Window System.
AGL: OpenGL Extensions for the Apple Macintosh.
PGL: OpenGL Extension for IBM OS/2 Warp.
WGL: OpenGL Extension for Microsoft Windows 95/98/NT/ME/2000/XP.
Appendix D. Basics of GLUT: The OpenGL Utility Toolkit. 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.
Appendix E. Calculating Normal Vectors. Finding Normals for Analytic Surfaces.
Finding Normals from Polygonal Data.
Appendix F. Homogeneous Coordinates and Transformation Matrices. Homogeneous Coordinates.
Transformation Matrices.
Appendix G. Programming Tips. OpenGL Correctness Tips.
OpenGL Performance Tips.
GLX Tips.
Appendix H. OpenGL Invariance. Glossary. Index. 0321173481T10302003