GLRASTERPOS
NAMEC SPECIFICATION
PARAMETERS
C SPECIFICATION
PARAMETERS
DESCRIPTION
NOTES
ERRORS
ASSOCIATED GETS
SEE ALSO
NAME
glRasterPos2d, glRasterPos2f, glRasterPos2i, glRasterPos2s, glRasterPos3d, glRasterPos3f, glRasterPos3i, glRasterPos3s, glRasterPos4d, glRasterPos4f, glRasterPos4i, glRasterPos4s, glRasterPos2dv, glRasterPos2fv, glRasterPos2iv, glRasterPos2sv, glRasterPos3dv, glRasterPos3fv, glRasterPos3iv, glRasterPos3sv, glRasterPos4dv, glRasterPos4fv, glRasterPos4iv, glRasterPos4sv − specify the raster position for pixel operations
C SPECIFICATION
void glRasterPos2d( GLdouble x,
GLdouble y ) |
void glRasterPos2f( GLfloat x,
GLfloat y ) |
void glRasterPos2i( GLint x,
GLint y ) |
void glRasterPos2s( GLshort x,
GLshort y ) |
void glRasterPos3d( GLdouble x,
GLdouble y, | |
GLdouble z ) |
void glRasterPos3f( GLfloat x,
GLfloat y, | |
GLfloat z ) |
void glRasterPos3i( GLint x,
GLint y, | |
GLint z ) |
void glRasterPos3s( GLshort x,
GLshort y, | |
GLshort z ) |
void glRasterPos4d( GLdouble x,
GLdouble y, | |
GLdouble z, | |
GLdouble w ) |
void glRasterPos4f( GLfloat x,
GLfloat y, | |
GLfloat z, | |
GLfloat w ) |
void glRasterPos4i( GLint x,
GLint y, | |
GLint z, | |
GLint w ) |
void glRasterPos4s( GLshort x,
GLshort y, | |
GLshort z, | |
GLshort w ) |
PARAMETERS
x, y, z, w
Specify the $x$, $y$, $z$, and $w$ object coordinates (if present) for the raster position.
C SPECIFICATION
void
glRasterPos2dv( const GLdouble *v )
void glRasterPos2fv( const GLfloat *v )
void glRasterPos2iv( const GLint *v )
void glRasterPos2sv( const GLshort *v )
void glRasterPos3dv( const GLdouble *v )
void glRasterPos3fv( const GLfloat *v )
void glRasterPos3iv( const GLint *v )
void glRasterPos3sv( const GLshort *v )
void glRasterPos4dv( const GLdouble *v )
void glRasterPos4fv( const GLfloat *v )
void glRasterPos4iv( const GLint *v )
void glRasterPos4sv( const GLshort *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.
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 both by glRasterPos and by glBitmap.
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 GL_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_INDEX
glGet with argument
GL_CURRENT_RASTER_TEXTURE_COORDS
SEE ALSO
glBitmap(3G), glCopyPixels(3G), glDrawArrays(3G), glDrawElements(3G), glDrawRangeElements(3G), glDrawPixels(3G), glTexCoord(3G), glTexGen(3G), glVertex(3G)
More Linux Commands
manpages/alsaloop.1.html
alsaloop(1) - command-line PCM loopback - Linux manual page
alsaloop allows create a PCM loopback between a PCM capture device and a PCM playback device. alsaloop supports multiple soundcards, adaptive clock synchronizat
manpages/pthread_attr_getguardsize.3.html
pthread_attr_getguardsize(3) - set/get guard size attribute
The pthread_attr_setguardsize() function sets the guard size attribute of the thread attributes object referred to by attr to the value specified in guardsize.
manpages/isinfl.3.html
isinfl(3) - BSD floating-point classification functions.....
The finite(), finitef(), and finitel() functions return a nonzero value if x is neither infinite nor a not-a-number (NaN) value, and 0 otherwise. The isnan(), i
manpages/sysconf.3.html
sysconf(3) - Get configuration information at runtime.......
POSIX allows an application to test at compile or run time whether certain options are supported, or what the value is of certain configurable constants or limi
manpages/regexp_table.5.html
regexp_table(5) - format of Postfix regular expression table
regexp_table.5 - The Postfix mail system uses optional tables for address rewriting, mail routing, or access control. These tables are usually in dbm or db form
manpages/mprof-report.1.html
mprof-report.1 (Manual - Linux man page)...................
The Mono log profiler can be used to collect a lot of information about a program running in the Mono runtime. This data can be used to do analyses of the prog
manpages/issue.5.html
issue(5) - prelogin message and identification file.........
The file /etc/issue is a text file which contains a message or system identification to be printed before the login prompt. It may contain various @char and \ch
manpages/ppm.5.html
ppm(5) - Netpbm color image format - Linux manual page......
This program is part of Netpbm(1) The PPM format is a lowest common denominator color image file format. It should be noted that this format is egregiously inef
manpages/hosts.equiv.5.html
hosts.equiv(5) - list of hosts and users that are granted "t
The hosts.equiv file allows or denies hosts and users to use the r-commands (e.g., rlogin, rsh, or rcp) without supplying a password. The file uses the followin
manpages/gimp-console-2.8.1.html
gimp-console-2.8(1) an image manipulation and paint program.
GIMP is the GNU Image Manipulation Program. It is used to edit and manipulate images. It can load and save a variety of image formats and can be used to convert
manpages/lseek.2.html
lseek(2) - reposition read/write file offset (Man Page).....
The lseek() function repositions the offset of the open file associated with the file descriptor fd to the argument offset according to the directive whence as
manpages/ber_peek_tag.3.html
ber_peek_tag(3) - OpenLDAP LBER simplified Basic Encoding Ru
These routines provide a subroutine interface to a simplified implementation of the Basic Encoding Rules of ASN.1. The version of BER these routines support is
