Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

glbitmap(3g) [xfree86 man page]

GLBITMAP(3G)															      GLBITMAP(3G)

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 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 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 xw=|_xr-xo_| yw=|_yr-yo_| where (xr,yr) is the raster position and (xo,yo) 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) GLBITMAP(3G)

Check Out this Related Man Page

GLRASTERPOS(3G) 						   OpenGL Manual						   GLRASTERPOS(3G)

NAME
glRasterPos - specify the raster position for pixel operations C SPECIFICATION
void glRasterPos2s(GLshort x, GLshort y); void glRasterPos2i(GLint x, GLint y); void glRasterPos2f(GLfloat x, GLfloat y); void glRasterPos2d(GLdouble x, GLdouble y); void glRasterPos3s(GLshort x, GLshort y, GLshort z); void glRasterPos3i(GLint x, GLint y, GLint z); void glRasterPos3f(GLfloat x, GLfloat y, GLfloat z); void glRasterPos3d(GLdouble x, GLdouble y, GLdouble z); void glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w); void glRasterPos4i(GLint x, GLint y, GLint z, GLint w); void glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w); void glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w); PARAMETERS
x, y, z, w Specify the x, y, z, and w object coordinates (if present) for the raster position. C SPECIFICATION
void glRasterPos2sv(const GLshort * v); void glRasterPos2iv(const GLint * v); void glRasterPos2fv(const GLfloat * v); void glRasterPos2dv(const GLdouble * v); void glRasterPos3sv(const GLshort * v); void glRasterPos3iv(const GLint * v); void glRasterPos3fv(const GLfloat * v); void glRasterPos3dv(const GLdouble * v); void glRasterPos4sv(const GLshort * v); void glRasterPos4iv(const GLint * v); void glRasterPos4fv(const GLfloat * v); void glRasterPos4dv(const GLdouble * v); PARAMETERS
v Specifies a pointer to an array of two, three, or four elements, specifying x, y, z, and w coordinates, respectively. DESCRIPTION
The GL maintains a 3D position in window coordinates. This position, called the raster position, is used to position pixel and bitmap write operations. It is maintained with subpixel accuracy. See glBitmap(), glDrawPixels(), and glCopyPixels(). The current raster position consists of three window coordinates (x, y, z), a clip coordinate value (w), an eye coordinate distance, a valid bit, and associated color data and texture coordinates. The w coordinate is a clip coordinate, because w is not projected to window coordinates. glRasterPos4 specifies object coordinates x, y, z, and w explicitly. glRasterPos3 specifies object coordinate x, y, and z explicitly, while w is implicitly set to 1. glRasterPos2 uses the argument values for x and y while implicitly setting z and w to 0 and 1. The object coordinates presented by glRasterPos are treated just like those of a glVertex() command: They are transformed by the current modelview and projection matrices and passed to the clipping stage. If the vertex is not culled, then it is projected and scaled to window coordinates, which become the new current raster position, and the GL_CURRENT_RASTER_POSITION_VALID flag is set. If the vertex is culled, then the valid bit is cleared and the current raster position and associated color and texture coordinates are undefined. The current raster position also includes some associated color data and texture coordinates. If lighting is enabled, then GL_CURRENT_RASTER_COLOR (in RGBA mode) or GL_CURRENT_RASTER_INDEX (in color index mode) is set to the color produced by the lighting calculation (see glLight(), glLightModel(), and glShadeModel()). If lighting is disabled, current color (in RGBA mode, state variable GL_CURRENT_COLOR) or color index (in color index mode, state variable GL_CURRENT_INDEX) is used to update the current raster color. GL_CURRENT_RASTER_SECONDARY_COLOR (in RGBA mode) is likewise updated. Likewise, GL_CURRENT_RASTER_TEXTURE_COORDS is updated as a function of GL_CURRENT_TEXTURE_COORDS, based on the texture matrix and the texture generation functions (see glTexGen()). Finally, the distance from the origin of the eye coordinate system to the vertex as transformed by only the modelview matrix replaces GL_CURRENT_RASTER_DISTANCE. Initially, the current raster position is (0, 0, 0, 1), the current raster distance is 0, the valid bit is set, the associated RGBA color is (1, 1, 1, 1), the associated color index is 1, and the associated texture coordinates are (0, 0, 0, 1). In RGBA mode, GL_CURRENT_RASTER_INDEX is always 1; in color index mode, the current raster RGBA color always maintains its initial value. NOTES
The raster position is modified by glRasterPos, glBitmap(), and glWindowPos(). When the raster position coordinates are invalid, drawing commands that are based on the raster position are ignored (that is, they do not result in changes to GL state). Calling glDrawElements() or glDrawRangeElements() may leave the current color or index indeterminate. If glRasterPos is executed while the current color or index is indeterminate, the current raster color or current raster index remains indeterminate. To set a valid raster position outside the viewport, first set a valid raster position, then call glBitmap() with NULL as the bitmap parameter. When the ARB_imaging extension is supported, there are distinct raster texture coordinates for each texture unit. Each texture unit's current raster texture coordinates are updated by glRasterPos. ERRORS
GL_INVALID_OPERATION is generated if glRasterPos 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_POSITION_VALID glGet() with argument GL_CURRENT_RASTER_DISTANCE glGet() with argument GL_CURRENT_RASTER_COLOR glGet() with argument GL_CURRENT_RASTER_SECONDARY_COLOR glGet() with argument GL_CURRENT_RASTER_INDEX glGet() with argument GL_CURRENT_RASTER_TEXTURE_COORDS SEE ALSO
glBitmap(), glCopyPixels(), glDrawArrays(), glDrawElements(), glDrawRangeElements(), glDrawPixels(), glMultiTexCoord(), glTexCoord(), glTexGen(), glVertex(), glWindowPos() COPYRIGHT
Copyright (C) 1991-2006 Silicon Graphics, Inc. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/. AUTHORS
opengl.org opengl.org 06/10/2014 GLRASTERPOS(3G)
Man Page