Next: 2.6 The GLU Library Up: 2 OpenGL's Functionality Previous: 2.4 Viewing

2.5 Other Features

There are a large number of OpenGL features worth mentioning but their full introduction is beyond the scope of this article.

Just specifying 3D primitives and determining how to map them to the screen is not enough to achieve realistic images. OpenGL also supports a number of lighting models that simulate the effects of lighting on primitives. Light sources can be defined and material properties can be specified to achieve realistic lighting effects.

So far polygons have been described as basically shaded or flat surfaces. But OpenGL allows polygons to be rendered which have a 1D or 2D texture mapped onto the polygon. For example, the surface of a desk could be textured with a wood grain image for greater realism. Texture mapping can greatly enhance the visual impact of a scene without increasing the geometric complexity.

Polygons are the basic primitive for much 3D rendering but OpenGL also supports bitmaps and images. And OpenGL provides evaluator commands for the efficient rendering of curves and surfaces.

Because 3D rendering eventually appears on a screen with limited resolution, OpenGL provides various techniques to eliminate ``jaggies'' resulting from aliasing problems. OpenGL provides antialiasing support for points, lines, and polygons. Techniques using the alpha, stencil, or accumulation buffers can also be used to minimize aliasing problems.

Computer images often appear unrealistically sharp and well-defined. OpenGL supports ``fog'' to provide an effect that simulates atmospheric effects. Haze, mist, smoke, and pollution can all be simulated. When fog is enabled, objects farther away begin to fade into the specified fog color.

Users of 3D want to do more than just see 3D images; they want to interact with them. OpenGL supports a selection mechanism that allows the user to pick an object or objects drawn to a certain region of the screen. And feedback can be used to obtain the results of rendering calculations.

Often a sequence of OpenGL commands are rendered repeatedly. OpenGL supports display lists which allow commands to be compiled for later execution. Display lists can even call other display lists allowing hierarchies of display lists. For networked 3D applications, display lists can greatly minimize the protocol bandwidth needed and increase performance. The glNewList and glEndList are used to create a display list. A created display list can be executed using the glCallList routine.

One thing to keep in mind about OpenGL is that the features described above are not isolated functionality. Each feature can be combined with others for advanced effects. For example, lighting, fog, display lists, texture mapping, and double buffering can all be used simultaneously.



Next: 2.6 The GLU Library Up: 2 OpenGL's Functionality Previous: 2.4 Viewing


mjk@asd.sgi.com
Wed Oct 19 18:06:42 PDT 1994