hide random home http://www.sgi.com/tech/openGL/paper/subsubsection3_4_7_3.html (Silicon Surf Promotional CD, 01/1995)



Next: 4.7.4 OpenGL State Up: 4.7 Miscellaneous Functions Previous: 4.7.2 Display Lists

4.7.3 Feedback and Selection

As described so far, OpenGL renders primitives into the framebuffer. OpenGL has two additional modes. Feedback mode returns information about primitives (vertex coordinates, color, and texture coordinates) after they have been processed but before they are rasterized. This mode is useful, for instance, if OpenGL output is to be fed to a pen plotter instead of a framebuffer.

In selection mode, OpenGL returns a hit whenever a (clipped) primitive lies within the view frustum. This mode is used, for instance, to determine which portions of a scene lie within a region of the window centered around the mouse position (this is often termed picking). The Utility Library provides routines to manipulate the transformations so that when the scene is redrawn, only those portions that lie within a specified region about a specified position will return hits. Each hit returns the contents of the selection stack, which may be manipulated as the scene is drawn. By appropriately manipulating the stack, the application can identify the scene features that intersected the selection region.


segal@asd.sgi.com
Fri Sep 23 16:08:14 PDT 1994