![]() |
|Download Files|
![]() ![]() ![]() ![]() ![]() Next: 2.13 Colors and Coloring Up: 2 OpenGL Operation Previous: 2.11 Clipping
2.12 Current Raster PositionThe current raster position is used by commands that directly affect pixels in the framebuffer. These commands, which bypass vertex transformation and primitive assembly, are described in the next chapter. The current raster position, however, shares some of the characteristics of a vertex.
The current raster position consists of three window coordinates
void RasterPos[234][sifd] ( T coords ) ; RasterPos4 takes four values indicating x, y, z, and w. RasterPos3 (or RasterPos2 ) is analogous, but sets only x, y, and z with w implicitly set to 1 (or only x and y with z implicitly set to 0 and w implicitly set to 1). The coordinates are treated as if they were specified in a Vertex command. The x, y, z, and w coordinates are transformed by the current model-view and perspective matrices. These coordinates, along with current values, are used to generate a color and texture coordinates just as is done for a vertex. The color and texture coordinates so produced replace the color and texture coordinates stored in the current raster position's associated data. The distance from the origin of the eye coordinate system to the vertex as transformed by only the current model-view matrix replaces the current raster distance. This distance can be approximated (see section 3.9). The transformed coordinates are passed to clipping as if they represented a point. If the ``point'' is not culled, then the projection to window coordinates is computed (section 2.10) and saved as the current raster position, and the valid bit is set. If the ``point'' is culled, the current raster position and its associated data become indeterminate and the valid bit is cleared. Figure 2.7 summarizes the behavior of the current raster position.
The current raster position requires five single-precision floating-point
values for its
![]() ![]() ![]() ![]() ![]() Next: 2.13 Colors and Coloring Up: 2 OpenGL Operation Previous: 2.11 Clipping David Blythe Sat Mar 29 02:23:21 PST 1997
|