- draw a bitmap
C SPECIFICATION
PARAMETERS
_param1, _param2 Specify the pixel width and height of the
bitmap image.
_param3, _param4 Specify the location of the origin in the
bitmap image. The origin is measured
from the lower left corner of the bitmap,
with right and up being the positive
axes.
_param5, _param6 Specify the x and y offsets to be added
to the current raster position after the
bitmap is drawn.
_param7 Specifies the address of the bitmap
image.
DESCRIPTION
A bitmap is a binary image. When drawn, the bitmap is
positioned relative to the current raster position, and
frame buffer pixels corresponding to 1's in the bitmap are
written using the current raster color or index. Frame
buffer pixels corresponding to 0's in the bitmap are not
modified.
glBitmap takes seven arguments. The first pair specifies
the width and height of the bitmap image. The second pair
specifies the location of the bitmap origin relative to
the lower left corner of the bitmap image. The third pair
of arguments specifies x and y offsets to be added to the
current raster position after the bitmap has been drawn.
The final argument is a pointer to the bitmap image
itself.
The bitmap image is interpreted like image data for the
glDrawPixels command, with _param1 and _param2 correspond-
ing to the width and height arguments of that command, and
with type set to GL_BITMAP and format set to
GL_COLOR_INDEX. Modes specified using glPixelStore affect
the interpretation of bitmap image data; modes specified
using glPixelTransfer do not.
If the current raster position is invalid, glBitmap is
ignored. Otherwise, the lower left corner of the bitmap
image is positioned at the window coordinates
xw=|xr-xo|
of the current raster position are offset by _param5 and
_param6. No change is made to the z coordinate of the
current raster position, or to the current raster color,
texture coordinates, or index.
NOTES
To set a valid raster position outside the viewport, first
set a valid raster position inside the viewport, then call
glBitmap with NULL as the _param7 parameter and with
_param5 and _param6 set to the offsets of the new raster
position. This technique is useful when panning an image
around the viewport.
ERRORS
GL_INVALID_VALUE is generated if _param1 or _param2 is
negative.
GL_INVALID_OPERATION is generated if glBitmap is executed
between the execution of glBegin and the corresponding
execution of glEnd.
ASSOCIATED GETS
glGet with argument GL_CURRENT_RASTER_POSITION
glGet with argument GL_CURRENT_RASTER_COLOR
glGet with argument GL_CURRENT_RASTER_DISTANCE
glGet with argument GL_CURRENT_RASTER_INDEX
glGet with argument GL_CURRENT_RASTER_TEXTURE_COORDS
glGet with argument GL_CURRENT_RASTER_POSITION_VALID
SEE ALSO
glDrawPixels, glPixelStore, glPixelTransfer, glRasterPos
1