Chapter Objectives
This chapter doesn't have objectives in the same way that previous chapters do. It's simply a collection of topics that describe ideas you might find useful for your application.
OpenGL is kind of a bag of low-level tools; now that you know about those tools, you can use them to implement higher-level functions. This chapter presents several examples of such higher-level capabilities.
This chapter discusses a variety of techniques based on OpenGL commands that illustrate some of the not-so-obvious uses to which you can put these commands. The examples are in no particular order and aren't related to each other. The idea is to read the section headings and skip to the examples that you find interesting. For your convenience, the headings are listed and explained briefly here.
Most of the examples in the rest of this guide are complete and can be compiled and run as is. In this chapter, however, there are no complete programs, and you have to do a bit of work on your own to make them run.
"Cheesy Translucency" explains how to use polygon stippling to achieve translucency; this is particularly useful when you don't have blending hardware available.
"An Easy Fade Effect" shows how to use polygon stippling to create the effect of a fade into the background.
"Object Selection Using the Back Buffer" describes how to use the back buffer in a double-buffered system to handle simple object picking.
"Cheap Image Transformation" discusses how to draw a distorted version of a bitmapped image by drawing each pixel as a quadrilateral.
"Displaying Layers" explains how to display multiple different layers of materials and indicate where the materials overlap.
"Antialiased Characters" describes how to draw smoother fonts.
"Drawing Round Points" describes how to draw near-round points.
"Interpolating Images" shows how to smoothly blend from one image to the another.
"Making Decals" explains how to draw two images, where one is a sort of decal that should always appear on top of the other.
"Drawing Filled, Concave Polygons Using the Stencil Buffer" tells you how to draw concave polygons, nonsimple polygons, and polygons with holes by using the stencil buffer.
"Finding Interference Regions" describes how to determine where three-dimensional pieces overlap.
"Shadows" describes how to draw shadows of lit objects.
"Hidden-Line Removal" discusses how to draw a wireframe object with hidden lines removed by using the stencil buffer.
"Texture-Mapping Applications" describes several clever uses for texture mapping, such as rotating and warping images.
"Drawing Depth-Buffered Images" tells you how to combine images in a depth-buffered environment.
"Dirichlet Domains" explains how to find the Dirichlet domain of a set of points using the depth buffer.
"Life in the Stencil Buffer" explains how to implement the Game of Life using the stencil buffer.
"Alternative Uses for glDrawPixels() and glCopyPixels()" describes how to use these two commands for such effects as fake video, airbrushing, and transposed images.
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()
OpenGL Programming Guide