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) 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)
The current raster position consists of three window coordinates
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
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 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.