Bitmaps are rectangles of zeros and ones specifying a particular pattern of fragments to be produced. Each of these fragments has the same associated data. These data are those associated with the current raster position.
Bitmaps are sent using
void Bitmap ( sizei w, sizei h, float , float , float , float , ubyte *data ) ;
w and h comprise the integer width and height of the rectangular bitmap, respectively. gives the floating-point x and y values of the bitmap's origin. gives the floating-point x and y increments that are added to the raster position after the bitmap is rasterized. *data is a pointer to a bitmap.
Like a polygon pattern, a bitmap is unpacked from memory according to the procedure given in section 3.6.3 for DrawPixels ; it is as if the width and height passed to that command were equal to w and h, respectively, the type were BITMAP, and the format were COLOR_INDEX. The unpacked values (before any conversion or arithmetic would have been performed) are bitwise ANDed with 1 to obtain a stipple pattern of zeros and ones. See Figure 3.9.
Figure 3.9: A bitmap and its associated parameters. and are not shown.
A bitmap sent using Bitmap is rasterized as follows. First, if the current raster position is invalid (the valid bit is reset), the bitmap is ignored. Otherwise, a rectangular array of fragments is constructed, with lower left corner at
and upper right corner at where w and h are the width and height of the bitmap, respectively. Fragments in the array are produced if the corresponding bit in the bitmap is 1 and not produced otherwise. The associated data for each fragment are those associated with the current raster position, with texture coordinates s, t, and r replaced with , , and , respectively. If q is less then or equal to zero, the results are undefined. Once the fragments have been produced, the current raster position is updated:
The z and w values of the current raster position remain unchanged.