next up previous contents index
Next: Unpacking Up: 3.6 Pixel Rectangles Previous: 3.6.2 Pixel Transfer Modes

3.6.3 Rasterization of Pixel Rectangles

 

The process of drawing pixels encoded in host memory is diagrammed in Figure 3.7. We describe the stages of this process in the order in which they occur.

  
Figure 3.7: Operation of DrawPixels . Output is RGBA pixels if the GL is in RGBA mode, color index pixels otherwise. (Depth and stencil pixel paths are not illustrated.) RGBA-to-RGBA and index-to-index lookup are optional.

Pixels are drawn using

void DrawPixels ( sizei width, sizei height, enum format, enum type, void *data ) ;

format is a symbolic constant indicating what the values in memory represent. width and height are the width and height, respectively, of the pixel rectangle to be drawn. *data is a pointer to the data to be drawn. These data are represented with one of seven GL data types, specified by type. The correspondence between the eight type token values and the GL data types they indicate is given in Table 3.4. If the GL is in color index mode and format is not one of COLOR_INDEX, STENCIL_INDEX, or DEPTH_COMPONENT, then the error INVALID_OPERATION occurs. If type is BITMAP and format is not COLOR_INDEX or STENCIL_INDEX then the error INVALID_ENUM occurs.

  
Table 3.4: DrawPixels  and ReadPixels  type parameter values and the corresponding GL data types. Refer to table 2.2 for definitions of GL data types.





David Blythe
Sat Mar 29 02:23:21 PST 1997