OpenGL
Programming Guide
Second Edition
Front Matter
| List of Figures | List of Examples | List of Tables |
Table of Contents
- 1.
- 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
- Errata
- Style Conventions
- Acknowledgments
- 2. 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
- 3. 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
- 4. 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
- 5. Color
- Color Perception
- Computer Color
- RGBA versus Color-Index Mode
- Specifying a Color and a Shading Model
- 6. 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
- 7. Blending, Antialiasing, Fog, and Polygon Offset
- Blending
- Antialiasing
- Fog
- Polygon Offset
- 8. 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
- 9. Drawing Pixels, Bitmaps, Fonts, and Images
- Bitmaps and Fonts
- Images
- Imaging Pipeline
- Reading and Drawing Pixel Rectangles
- Tips for Improving Pixel Drawing Rates
- 10. Texture Mapping
- An Overview and an Example
- Specifying the Texture
- Filtering
- Texture Objects
- Texture Functions
- Assigning Texture Coordinates
- Automatic Texture-Coordinate Generation
- Advanced Features
- 11. The Framebuffer
- Buffers and Their Uses
- Testing and Operating on Fragments
- The Accumulation Buffer
- 12. Tessellators and Quadrics
- Polygon Tessellation
- Quadrics: Rendering Spheres, Cylinders, and Disks
- 13. Evaluators and NURBS
- Prerequisites
- Evaluators
- The GLU NURBS Interface
- 14. Selection and Feedback
- Selection
- Feedback
- 15. 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()
- A. Order of Operations
- Overview
- Geometric Operations
- Pixel Operations
- Fragment Operations
- Odds and Ends
- B. State Variables
- The Query Commands
- OpenGL State Variables
- C. OpenGL and Window Systems
- GLX: OpenGL Extension for the X Window System
- AGL: OpenGL Extension to the Apple Macintosh
- PGL: OpenGL Extension for IBM OS/2 Warp
- WGL: OpenGL Extension for Microsoft Windows NT and Windows 95
- 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
- E. Calculating Normal Vectors
- Finding Normals for Analytic Surfaces
- Finding Normals from Polygonal Data
- F. Homogeneous Coordinates and Transformation Matrices
- Homogeneous Coordinates
- Transformation Matrices
- G. Programming Tips
- OpenGL Correctness Tips
- OpenGL Performance Tips
- GLX Tips
- H. OpenGL Invariance
- I. Color Plates
- Plate 1
- Plate 2
- Plate 3
- Plate 4
- Plate 5
- Plate 6
- Plate 7
- Plate 8
- Plate 9
- Plate 10
- Plate 11
- Plate 12
- Plate 13
- Plate 14
- Plate 15
- Plate 16
- Plate 17
- Plate 18
- Plate 19
- Plate 20
- Plate 21
- Plate 22
- Plate 23
- Plate 24
- Plate 25
- Plate 26
- Plate 27
- Plate 28
- Plate 29 and 30
- Plate 31
- Glossary
- Index