GLBITMAP



GLBITMAP

NAME
C SPECIFICATION
PARAMETERS
DESCRIPTION
NOTES
ERRORS
ASSOCIATED GETS
SEE ALSO

NAME

glBitmap − draw a bitmap

C SPECIFICATION

void glBitmap( GLsizei width,

GLsizei height,

GLfloat xorig,

GLfloat yorig,

GLfloat xmove,

GLfloat ymove,

const GLubyte *bitmap )

PARAMETERS

width, height

Specify the pixel width and height of the bitmap image.

xorig, yorig

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.

xmove, ymove

Specify the x and y offsets to be added to the current raster position after the bitmap is drawn.

bitmap

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 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 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

$ 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 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.

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 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.

ERRORS

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.

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(3G), glPixelStore(3G), glPixelTransfer(3G), glRasterPos(3G)






Opportunity


Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.

Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.





Free Software


Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.


Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.





Free Books


The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.


Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.





Education


Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.


Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.