Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > eee00533ac83fd7ebbf9846dc6d3b77b > files > 46

Io-language-graphics-and-sound-20080330-6.fc15.i686.rpm

<HTML>
<BODY>
<PRE>
     <STRONG>NAME</STRONG>
	  <STRONG>glBitmap</STRONG> - draw a bitmap


     <STRONG>C</STRONG> <STRONG>SPECIFICATION</STRONG>
	  void <STRONG>glBitmap</STRONG>( GLsizei <EM>width</EM>,
			 GLsizei <EM>height</EM>,
			 GLfloat <EM>xorig</EM>,
			 GLfloat <EM>yorig</EM>,
			 GLfloat <EM>xmove</EM>,
			 GLfloat <EM>ymove</EM>,
			 const GLubyte *<EM>bitmap</EM> )


     <STRONG>PARAMETERS</STRONG>
	  <EM>width</EM>, <EM>height</EM>	Specify	the pixel width	and height of the
			bitmap image.

	  <EM>xorig</EM>, <EM>yorig</EM>	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.

	  <EM>xmove</EM>, <EM>ymove</EM>	Specify	the <EM>x</EM> and <EM>y</EM> offsets to be added	to the
			current	raster position	after the bitmap is
			drawn.

	  <EM>bitmap</EM>	Specifies the address of the bitmap image.

     <STRONG>DESCRIPTION</STRONG>
	  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.

	  <STRONG>glBitmap</STRONG> 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 <EM>x</EM>	and <EM>y</EM> 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
	  <STRONG>glDrawPixels</STRONG> command,	with <EM>width</EM> and <EM>height</EM> corresponding to
	  the width and	height arguments of that command, and with
	  <EM>type</EM> set to <STRONG>GL_BITMAP</STRONG>	and <EM>format</EM> set to <STRONG>GL_COLOR_INDEX</STRONG>.
	  Modes	specified using	<STRONG>glPixelStore</STRONG> affect the	interpretation
	  of bitmap image data;	modes specified	using <STRONG>glPixelTransfer</STRONG>
	  do not.
	  If the current raster	position is invalid, <STRONG>glBitmap</STRONG> is
	  ignored.  Otherwise, the lower left corner of	the bitmap
	  image	is positioned at the window coordinates

				x  = | x  - x  |
				 w	r    o
				y  = | y  - y  |
				 w	r    o
	  where	(x ,y )	is the raster position and (x ,y ) is the
	  bitmap o<STRONG>r</STRONG>ig<STRONG>i</STRONG>n.  Fragments are	then generate<STRONG>d</STRONG> f<STRONG>o</STRONG>r each	pixel
	  corresponding	to a 1 (one) in	the bitmap image.  These
	  fragments are	generated using	the current raster <EM>z</EM>
	  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 <EM>x</EM> and <EM>y</EM> coordinates of
	  the current raster position are offset by <EM>xmove</EM> and <EM>ymove</EM>.
	  No change is made to the <EM>z</EM> coordinate	of the current raster
	  position, or to the current raster color, texture
	  coordinates, or index.

     <STRONG>NOTES</STRONG>
	  To set a valid raster	position outside the viewport, first
	  set a	valid raster position inside the viewport, then	call
	  <STRONG>glBitmap</STRONG> with	NULL as	the <EM>bitmap</EM> parameter and with <EM>xmove</EM>
	  and <EM>ymove</EM> set	to the offsets of the new raster position.
	  This technique is useful when	panning	an image around	the
	  viewport.

     <STRONG>ERRORS</STRONG>
	  <STRONG>GL_INVALID_VALUE</STRONG> is generated	if <EM>width</EM> or <EM>height</EM> is
	  negative.

	  <STRONG>GL_INVALID_OPERATION</STRONG> is generated if <STRONG>glBitmap</STRONG>	is executed
	  between the execution	of <STRONG>glBegin</STRONG> and the corresponding
	  execution of <STRONG>glEnd</STRONG>.

     <STRONG>ASSOCIATED</STRONG>	<STRONG>GETS</STRONG>
	  <STRONG>glGet</STRONG>	with argument <STRONG>GL_CURRENT_RASTER_POSITION</STRONG>
	  <STRONG>glGet</STRONG>	with argument <STRONG>GL_CURRENT_RASTER_COLOR</STRONG>
	  <STRONG>glGet</STRONG>	with argument <STRONG>GL_CURRENT_RASTER_INDEX</STRONG>
	  <STRONG>glGet</STRONG>	with argument <STRONG>GL_CURRENT_RASTER_TEXTURE_COORDS</STRONG>
	  <STRONG>glGet</STRONG>	with argument <STRONG>GL_CURRENT_RASTER_POSITION_VALID</STRONG>

     <STRONG>SEE</STRONG> <STRONG>ALSO</STRONG>
	  <STRONG>glDrawPixels</STRONG>,	<STRONG>glPixelStore</STRONG>, <STRONG>glPixelTransfer</STRONG>, <STRONG>glRasterPos</STRONG>


</PRE>
</BODY>
</HTML>