NAME

glBitmap - draw a bitmap

C SPECIFICATION

void ggllBBiittmmaapp( GLsizei _w_i_d_t_h,
               GLsizei _h_e_i_g_h_t,
               GLfloat _x_o_r_i_g,
               GLfloat _y_o_r_i_g,
               GLfloat _x_m_o_v_e,
               GLfloat _y_m_o_v_e,
               const GLubyte _*_b_i_t_m_a_p )

delim $$

PARAMETERS

_w_i_d_t_h, _h_e_i_g_h_t
Specify the pixel width and height of the bitmap image.
_x_o_r_i_g, _y_o_r_i_g
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.
_x_m_o_v_e, _y_m_o_v_e
Specify the _x and _y offsets to be added to the current raster position after the bitmap is drawn.
_b_i_t_m_a_p
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.

ggllBBiittmmaapp 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 ggllDDrraawwPPiixxeellss command, with _w_i_d_t_h and _h_e_i_g_h_t corresponding to the width and height arguments of that command, and with _t_y_p_e set to GGLL__BBIITTMMAAPP and _f_o_r_m_a_t set to GGLL__CCOOLLOORR__IINNDDEEXX. Modes specified using ggllPPiixxeellSSttoorree affect the interpretation of bitmap image data; modes specified using ggllPPiixxeellTTrraannssffeerr do not.

If the current raster position is invalid, ggllBBiittmmaapp is ignored. Otherwise, the lower left corner of the bitmap image is positioned at the window coordinates

$ x sub w ~=~ ~ x sub r ~-~ x sub o ~ $


$ y sub w ~=~ ~ y sub r ~-~ y sub o ~ $

where $ ( x sub r , y sub r ) $ is the raster position and $ ( x sub o , y sub o ) $ is the bitmap origin. Fragments are then generated for each pixel corresponding to a 1 (one) in the bitmap image. These fragments are generated using the current raster _z coordinate, color or color index, and current raster texture coordinates. They are then treated just as if they had been generated by a point, line, or polygon, including texture mapping,
fogging, and all per-fragment operations such as alpha and depth testing.

After the bitmap has been drawn, the _x and _y coordinates of the current raster position are offset by _x_m_o_v_e and _y_m_o_v_e. 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 ggllBBiittmmaapp with NULL as the _b_i_t_m_a_p parameter and with _x_m_o_v_e and _y_m_o_v_e set to the offsets of the new raster position. This technique is useful when panning an image around the viewport.

ERRORS

GGLL__IINNVVAALLIIDD__VVAALLUUEE is generated if _w_i_d_t_h or _h_e_i_g_h_t is negative.

GGLL__IINNVVAALLIIDD__OOPPEERRAATTIIOONN is generated if ggllBBiittmmaapp is executed between the execution of ggllBBeeggiinn and the corresponding execution of ggllEEnndd.

ASSOCIATED GETS

ggllGGeett with argument GGLL__CCUURRRREENNTT__RRAASSTTEERR__PPOOSSIITTIIOONN
ggllGGeett with argument GGLL__CCUURRRREENNTT__RRAASSTTEERR__CCOOLLOORR
ggllGGeett with argument GGLL__CCUURRRREENNTT__RRAASSTTEERR__DDIISSTTAANNCCEE
ggllGGeett with argument GGLL__CCUURRRREENNTT__RRAASSTTEERR__IINNDDEEXX
ggllGGeett with argument GGLL__CCUURRRREENNTT__RRAASSTTEERR__TTEEXXTTUURREE__CCOOOORRDDSS
ggllGGeett with argument GGLL__CCUURRRREENNTT__RRAASSTTEERR__PPOOSSIITTIIOONN__VVAALLIIDD

SEE ALSO

ggllDDrraawwPPiixxeellss((33GG)), ggllPPiixxeellSSttoorree((33GG)), ggllPPiixxeellTTrraannssffeerr((33GG)), ggllRRaasstteerrPPooss((33GG))