GLRASTERPOS


HOME

GLRASTERPOS

NAME
C 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/gnutls_x509_crt_verify_hash.3.html
gnutls_x509_crt_verify_hash(3) - API function (Man Page)....
This function will verify the given signed digest, using the parameters from the certificate. Deprecated. Please use gnutls_pubkey_verify_data(). RETURNS In cas

manpages/vhangup.2.html
vhangup(2) - virtually hangup the current tty (Man Page)....
vhangup() simulates a hangup on the current terminal. This call arranges for other users to have a clean terminal at login time. RETURN VALUE On success, zero i

manpages/git-for-each-ref.1.html
git-for-each-ref(1) - Output information on each ref........
Iterate over all refs that match <pattern> and show them according to the given <format>, after sorting them according to the given set of <key>. If <count> is

manpages/pcre16_compile.3.html
pcre16_compile(3) Perl-compatible regular expressions.......
This function compiles a regular expression into an internal form. It is the same as pcre[16|32]_compile2(), except for the absence of the errorcodeptr argument

manpages/xzcat.1.html
xzcat(1) - Compress or decompress .xz and .lzma files.......
xz is a general-purpose data compression tool with command line syntax similar to gzip(1) and bzip2(1). The native file format is the .xz format, but the legacy

manpages/__after_morecore_hook.3.html
__after_morecore_hook(3) malloc debugging variables.........
The GNU C library lets you modify the behavior of malloc(3), realloc(3), and free(3) by specifying appropriate hook functions. You can use these hooks to help y

manpages/pnm.5.html
pnm(5) - Netpbm superformat (Formats - Linux man page)......
The PNM format is just an abstraction of the PBM, PGM, and PPM formats. I.e. the name PNM refers collectively to PBM, PGM, and PPM. The name PNM is an acronym d

manpages/Tk_GeometryRequest.3.html
Tk_GeometryRequest(3) - specify desired geometry or internal
Tk_GeometryRequest is called by widget code to indicate its preference for the dimensions of a particular window. The arguments to Tk_GeometryRequest are made a

manpages/DBI::Const::GetInfo::ODBC.3pm.html
DBI::Const::GetInfo::ODBC(3pm) - ODBC Constants for GetInfo
Information requested by GetInfo(). The API for this module is private and subject to change. REFERENCES MDAC SDK 2.6 ODBC version number (0x0351) sql.h sqlext.

manpages/Tcl_UntraceVar2.3.html
Tcl_UntraceVar2(3) - monitor accesses to a variable.........
Tcl_TraceVar allows a C procedure to monitor and control access to a Tcl variable, so that the C procedure is invoked whenever the variable is read or written o

manpages/Tcl_AttemptAlloc.3.html
Tcl_AttemptAlloc(3) - allocate or free heap memory (ManPage)
These procedures provide a platform and compiler independent interface for memory allocation. Programs that need to transfer ownership of memory blocks between

manpages/ctanf.3.html
ctanf(3) - complex tangent function - Linux manual page.....
The complex tangent function is defined as: ctan(z) = csin(z) / ccos(z) VERSIONS These functions first appeared in glibc in version 2.1. CONFORMING TO C99. SEE





We can't live, work or learn in freedom unless the software we use is free.