glBitmap man page on DigitalUNIX

Printed from

glBitmap(3G)							  glBitmap(3G)

       glBitmap - draw a bitmap

       void glBitmap(
	       GLsizei width,
	       GLsizei height,
	       GLfloat xorig,
	       GLfloat yorig,
	       GLfloat xmove,
	       GLfloat ymove,
	       const GLubyte *bitmap );

       Specify	the  pixel  width and height of the bitmap image.  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 posi‐
       tive axes.  Specify the x and y offsets to  be  added  to  the  current
       raster  position	 after	the bitmap is drawn.  Specifies the address of
       the bitmap image.

       A bitmap is a binary image. When drawn, the bitmap is positioned	 rela‐
       tive  to	 the  current  raster position, and frame buffer pixels corre‐
       sponding 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 width and height corresponding 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 glPixel‐
       Transfer() do not.

       If the current raster position is invalid, glBitmap() is ignored.  Oth‐
       erwise,	the lower left corner of the bitmap image is positioned at the
       window coordinates
	x[w] = x[r] - x[o]

       y[w] = y[r] - y[o]

       where ( x[r] , y[r] ) is the raster position and ( x [o] ,  y[o]	 )  is
       the  bitmap  origin. Fragments are then generated for each pixel corre‐
       sponding to a 1 (one) in the bitmap image. These fragments  are	gener‐
       ated  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 xmove and ymove. No change is made to the
       z  coordinate  of the current raster position, or to the current raster
       color, texture coordinates, or index.

       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 bitmap parameter and with xmove and ymove set to the offsets of the
       new  raster  position.  This  technique is useful when panning an image
       around the viewport.

       GL_INVALID_VALUE is generated if width or height is negative.

       GL_INVALID_OPERATION is generated if glBitmap() is executed between the
       execution of glBegin() and the corresponding execution of glEnd().

       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

       glDrawPixels(3), glPixelStore(3), glPixelTransfer(3), glRasterPos(3)


List of man pages available for DigitalUNIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net