NAME
fglRasterPos2d, fglRasterPos2f, fglRasterPos2i,
fglRasterPos2s, fglRasterPos3d, fglRasterPos3f,
fglRasterPos3i, fglRasterPos3s, fglRasterPos4d,
fglRasterPos4f, fglRasterPos4i, fglRasterPos4s,
fglRasterPos2dv, fglRasterPos2fv, fglRasterPos2iv,
fglRasterPos2sv, fglRasterPos3dv, fglRasterPos3fv,
fglRasterPos3iv, fglRasterPos3sv, fglRasterPos4dv,
fglRasterPos4fv, fglRasterPos4iv, fglRasterPos4sv - specify
the raster position for pixel operations
FORTRAN SPECIFICATION
SUBROUTINE fglRasterPos2d( REAL*8 x,
REAL*8 y )
SUBROUTINE fglRasterPos2f( REAL*4 x,
REAL*4 y )
SUBROUTINE fglRasterPos2i( INTEGER*4 x,
INTEGER*4 y )
SUBROUTINE fglRasterPos2s( INTEGER*2 x,
INTEGER*2 y )
SUBROUTINE fglRasterPos3d( REAL*8 x,
REAL*8 y,
REAL*8 z )
SUBROUTINE fglRasterPos3f( REAL*4 x,
REAL*4 y,
REAL*4 z )
SUBROUTINE fglRasterPos3i( INTEGER*4 x,
INTEGER*4 y,
INTEGER*4 z )
SUBROUTINE fglRasterPos3s( INTEGER*2 x,
INTEGER*2 y,
INTEGER*2 z )
SUBROUTINE fglRasterPos4d( REAL*8 x,
REAL*8 y,
REAL*8 z,
REAL*8 w )
SUBROUTINE fglRasterPos4f( REAL*4 x,
REAL*4 y,
REAL*4 z,
REAL*4 w )
SUBROUTINE fglRasterPos4i( INTEGER*4 x,
INTEGER*4 y,
INTEGER*4 z,
INTEGER*4 w )
SUBROUTINE fglRasterPos4s( INTEGER*2 x,
INTEGER*2 y,
INTEGER*2 z,
INTEGER*2 w )
PARAMETERS
x, y, z, w
Specify the x, y, z, and w object coordinates (if
present) for the raster position.
FORTRAN SPECIFICATION
SUBROUTINE fglRasterPos2dv( CHARACTER*8 v )
SUBROUTINE fglRasterPos2fv( CHARACTER*8 v )
SUBROUTINE fglRasterPos2iv( CHARACTER*8 v )
SUBROUTINE fglRasterPos2sv( CHARACTER*8 v )
SUBROUTINE fglRasterPos3dv( CHARACTER*8 v )
SUBROUTINE fglRasterPos3fv( CHARACTER*8 v )
SUBROUTINE fglRasterPos3iv( CHARACTER*8 v )
SUBROUTINE fglRasterPos3sv( CHARACTER*8 v )
SUBROUTINE fglRasterPos4dv( CHARACTER*8 v )
SUBROUTINE fglRasterPos4fv( CHARACTER*8 v )
SUBROUTINE fglRasterPos4iv( CHARACTER*8 v )
SUBROUTINE fglRasterPos4sv( CHARACTER*8 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 fglBitmap, fglDrawPixels, and
fglCopyPixels.
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. fglRasterPos4 specifies object coordinates x,
y, z, and w explicitly. fglRasterPos3 specifies object
coordinate x, y, and z explicitly, while w is implicitly set
to 1. fglRasterPos2 uses the argument values for x and y
while implicitly setting z and w to 0 and 1.
The object coordinates presented by fglRasterPos are treated
just like those of a fglVertex 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 fglLight,
fglLightModel, and
fglShadeModel). 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 fglTexGen).
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 fglRasterPos and by
fglBitmap.
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 fglDrawElements may leave the current color or index
indeterminate. If fglRasterPos 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 fglBitmap with NULL
as the bitmap parameter.
ERRORS
GL_INVALID_OPERATION is generated if fglRasterPos is
executed between the execution of fglBegin and the
corresponding execution of fglEnd.
ASSOCIATED GETS
fglGet with argument GL_CURRENT_RASTER_POSITION
fglGet with argument GL_CURRENT_RASTER_POSITION_VALID
fglGet with argument GL_CURRENT_RASTER_DISTANCE
fglGet with argument GL_CURRENT_RASTER_COLOR
fglGet with argument GL_CURRENT_RASTER_INDEX
fglGet with argument GL_CURRENT_RASTER_TEXTURE_COORDS
SEE ALSO
fglBitmap, fglCopyPixels, fglDrawElements, fglDrawPixels,
fglLight, fglLightModel, fglShadeModel, fglTexCoord,
fglTexGen, fglVertex