next up previous contents index
Next: 3.6.3 Rasterization of Pixel Up: 3.6 Pixel Rectangles Previous: 3.6.1 Pixel Storage Modes

3.6.2 Pixel Transfer Modes

 

Pixel transfer modes affect the operation of DrawPixels , ReadPixels , and CopyPixels  at the time when one of these commands is executed (which may differ from the time the command is issued). Some pixel transfer modes are set with

void PixelTransfer[if] ( enum param, T value ) ;

param is a symbolic constant indicating a parameter to be set, and value is the value to set it to. Table 3.2 summarizes the pixel transfer parameters that are set with PixelTransfer , their types, their initial values, and their allowable ranges. Setting a parameter to a value outside the given range results in the error INVALID_VALUE. The same versions of the command exist as for PixelStore , and the same rules apply to accepting and converting passed values to set parameters.

  
Table 3.2: PixelTransfer  parameters.

The other pixel transfer modes are the various lookup tables used by DrawPixels , ReadPixels , and CopyPixels . These are set with

void PixelMap[ui ( enum map, sizei size, T *values ) ;

map is a symbolic map name, indicating the map to set, size indicates the size of the map, and *values is a pointer to an array of size map values.

The entries of a table may be specified using one of three types: single-precision floating-point, unsigned short integer, or unsigned integer, depending on which of the three versions of PixelMap  is called. A table entry is converted to the appropriate type when it is specified. An entry giving a color component value is converted according to Table 2.6. An entry giving a color index value is converted from an unsigned short integer or unsigned integer to floating-point. An entry giving a stencil index is converted from single-precision floating-point to an integer by rounding to nearest. The various tables and their initial sizes and entries are summarized in Table 3.3. A table that takes an index as an address must have or the error INVALID_VALUE results. The maximum allowable size of each table is implementation dependent, but must be at least 32 (a single maximum applies to all tables). The error INVALID_VALUE is generated if a size larger than the implemented maximum, or less than one, is given to PixelMap .

  
Table 3.3: PixelMap  parameters.



next up previous contents index
Next: 3.6.3 Rasterization of Pixel Up: 3.6 Pixel Rectangles Previous: 3.6.1 Pixel Storage Modes



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