1GLBITMAP(3G)                                                      GLBITMAP(3G)
2
3
4

NAME

6       glBitmap - draw a bitmap
7
8

C SPECIFICATION

10       void glBitmap( GLsizei width,
11                      GLsizei height,
12                      GLfloat xorig,
13                      GLfloat yorig,
14                      GLfloat xmove,
15                      GLfloat ymove,
16                      const GLubyte *bitmap )
17
18

PARAMETERS

20       width, height Specify the pixel width and height of the bitmap image.
21
22       xorig, yorig  Specify  the  location of the origin in the bitmap image.
23                     The origin is measured from the lower left corner of  the
24                     bitmap, with right and up being the positive axes.
25
26       xmove, ymove  Specify  the  x  and y offsets to be added to the current
27                     raster position after the bitmap is drawn.
28
29       bitmap        Specifies the address of the bitmap image.
30

DESCRIPTION

32       A bitmap is a binary image.  When drawn, the bitmap is positioned rela‐
33       tive  to  the  current  raster position, and frame buffer pixels corre‐
34       sponding to 1's in the bitmap are  written  using  the  current  raster
35       color or index.  Frame buffer pixels corresponding to 0's in the bitmap
36       are not modified.
37
38       glBitmap takes seven arguments.  The first pair specifies the width and
39       height  of the bitmap image.  The second pair specifies the location of
40       the bitmap origin relative to the  lower  left  corner  of  the  bitmap
41       image.   The  third  pair  of arguments specifies x and y offsets to be
42       added to the current raster position after the bitmap has  been  drawn.
43       The final argument is a pointer to the bitmap image itself.
44
45       The  bitmap  image  is interpreted like image data for the glDrawPixels
46       command, with width and height corresponding to the  width  and  height
47       arguments  of  that  command, and with type set to GL_BITMAP and format
48       set to GL_COLOR_INDEX.  Modes specified using glPixelStore  affect  the
49       interpretation   of   bitmap   image   data;   modes   specified  using
50       glPixelTransfer do not.
51
52       If the current raster position is invalid, glBitmap is ignored.  Other‐
53       wise,  the  lower  left corner of the bitmap image is positioned at the
54       window coordinates
55
56                                     xw=⌊xrxo
57
58                                     yw=⌊yryo
59
60       where (xr,yr) is the raster position and (xo,yo) is the bitmap  origin.
61       Fragments  are then generated for each pixel corresponding to a 1 (one)
62       in the bitmap image.  These fragments are generated using  the  current
63       raster  z  coordinate, color or color index, and current raster texture
64       coordinates.  They are then treated just as if they had been  generated
65       by a point, line, or polygon, including texture mapping,
66       fogging,  and all per-fragment operations such as alpha and depth test‐
67       ing.
68
69       After the bitmap has been drawn, the x and y coordinates of the current
70       raster  position  are  offset by xmove and ymove.  No change is made to
71       the z coordinate of the current raster  position,  or  to  the  current
72       raster color, texture coordinates, or index.
73

NOTES

75       To  set a valid raster position outside the viewport, first set a valid
76       raster position inside the viewport, then call glBitmap  with  NULL  as
77       the bitmap parameter and with xmove and ymove set to the offsets of the
78       new raster position. This technique is useful  when  panning  an  image
79       around the viewport.
80

ERRORS

82       GL_INVALID_VALUE is generated if width or height is negative.
83
84       GL_INVALID_OPERATION  is  generated if glBitmap is executed between the
85       execution of glBegin and the corresponding execution of glEnd.
86

ASSOCIATED GETS

88       glGet with argument GL_CURRENT_RASTER_POSITION
89       glGet with argument GL_CURRENT_RASTER_COLOR
90       glGet with argument GL_CURRENT_RASTER_DISTANCE
91       glGet with argument GL_CURRENT_RASTER_INDEX
92       glGet with argument GL_CURRENT_RASTER_TEXTURE_COORDS
93       glGet with argument GL_CURRENT_RASTER_POSITION_VALID
94

SEE ALSO

96       glDrawPixels(3G),        glPixelStore(3G),         glPixelTransfer(3G),
97       glRasterPos(3G)
98
99
100
101
102                                                                  GLBITMAP(3G)
Impressum