1GLRASTERPOS(3G)                                                GLRASTERPOS(3G)
2
3
4

NAME

6       glRasterPos2d,  glRasterPos2f,  glRasterPos2i, glRasterPos2s, glRaster‐
7       Pos3d,  glRasterPos3f,  glRasterPos3i,  glRasterPos3s,   glRasterPos4d,
8       glRasterPos4f,  glRasterPos4i, glRasterPos4s, glRasterPos2dv, glRaster‐
9       Pos2fv, glRasterPos2iv, glRasterPos2sv, glRasterPos3dv, glRasterPos3fv,
10       glRasterPos3iv,    glRasterPos3sv,    glRasterPos4dv,   glRasterPos4fv,
11       glRasterPos4iv, glRasterPos4sv - specify the raster position for  pixel
12       operations
13
14

C SPECIFICATION

16       void glRasterPos2d( GLdouble x,
17                           GLdouble y )
18       void glRasterPos2f( GLfloat x,
19                           GLfloat y )
20       void glRasterPos2i( GLint x,
21                           GLint y )
22       void glRasterPos2s( GLshort x,
23                           GLshort y )
24       void glRasterPos3d( GLdouble x,
25                           GLdouble y,
26                           GLdouble z )
27       void glRasterPos3f( GLfloat x,
28                           GLfloat y,
29                           GLfloat z )
30       void glRasterPos3i( GLint x,
31                           GLint y,
32                           GLint z )
33       void glRasterPos3s( GLshort x,
34                           GLshort y,
35                           GLshort z )
36       void glRasterPos4d( GLdouble x,
37                           GLdouble y,
38                           GLdouble z,
39                           GLdouble w )
40       void glRasterPos4f( GLfloat x,
41                           GLfloat y,
42                           GLfloat z,
43                           GLfloat w )
44       void glRasterPos4i( GLint x,
45                           GLint y,
46                           GLint z,
47                           GLint w )
48       void glRasterPos4s( GLshort x,
49                           GLshort y,
50                           GLshort z,
51                           GLshort w )
52
53       delim $$
54

PARAMETERS

56       x, y, z, w
57                Specify  the  $x$,  $y$,  $z$,  and $w$ object coordinates (if
58                present) for the raster position.
59

C SPECIFICATION

61       void glRasterPos2dv( const GLdouble *v )
62       void glRasterPos2fv( const GLfloat *v )
63       void glRasterPos2iv( const GLint *v )
64       void glRasterPos2sv( const GLshort *v )
65       void glRasterPos3dv( const GLdouble *v )
66       void glRasterPos3fv( const GLfloat *v )
67       void glRasterPos3iv( const GLint *v )
68       void glRasterPos3sv( const GLshort *v )
69       void glRasterPos4dv( const GLdouble *v )
70       void glRasterPos4fv( const GLfloat *v )
71       void glRasterPos4iv( const GLint *v )
72       void glRasterPos4sv( const GLshort *v )
73
74

PARAMETERS

76       v      Specifies a pointer to an array of two, three, or four elements,
77              specifying $x$, $y$, $z$, and $w$ coordinates, respectively.
78

DESCRIPTION

80       The  GL  maintains a 3D position in window coordinates.  This position,
81       called the raster position, is used to position pixel and bitmap  write
82       operations.  It  is  maintained  with subpixel accuracy.  See glBitmap,
83       glDrawPixels, and glCopyPixels.
84
85       The current raster position consists of three window coordinates  ($x$,
86       $y$, $z$), a clip coordinate value ($w$), an eye coordinate distance, a
87       valid bit, and associated color data and texture coordinates.  The  $w$
88       coordinate is a clip coordinate, because $w$ is not projected to window
89       coordinates.  glRasterPos4 specifies object coordinates $x$, $y$,  $z$,
90       and $w$ explicitly.  glRasterPos3 specifies object coordinate $x$, $y$,
91       and $z$ explicitly, while $w$ is implicitly  set  to  1.   glRasterPos2
92       uses  the  argument values for $x$ and $y$ while implicitly setting $z$
93       and $w$ to 0 and 1.
94
95       The object coordinates presented by glRasterPos are treated  just  like
96       those  of  a glVertex command: They are transformed by the current mod‐
97       elview and projection matrices and passed to the  clipping  stage.   If
98       the  vertex  is  not  culled, then it is projected and scaled to window
99       coordinates, which become the new  current  raster  position,  and  the
100       GL_CURRENT_RASTER_POSITION_VALID flag is set.  If the vertex is culled,
101       then the valid bit is cleared and the current raster position and asso‐
102       ciated color and texture coordinates are undefined.
103
104       The  current  raster  position also includes some associated color data
105       and   texture   coordinates.    If   lighting    is    enabled,    then
106       GL_CURRENT_RASTER_COLOR  (in  RGBA mode) or GL_CURRENT_RASTER_INDEX (in
107       color index mode) is set to the color produced by the lighting calcula‐
108       tion (see glLight, glLightModel, and
109       glShadeModel).   If  lighting is disabled, current color (in RGBA mode,
110       state variable GL_CURRENT_COLOR) or color index (in color  index  mode,
111       state  variable  GL_CURRENT_INDEX) is used to update the current raster
112       color.
113
114       Likewise, GL_CURRENT_RASTER_TEXTURE_COORDS is updated as a function  of
115       GL_CURRENT_TEXTURE_COORDS,  based on the texture matrix and the texture
116       generation functions (see glTexGen).  Finally, the  distance  from  the
117       origin  of  the  eye  coordinate system to the vertex as transformed by
118       only the modelview matrix replaces GL_CURRENT_RASTER_DISTANCE.
119
120       Initially, the current raster position is (0, 0,  0,  1),  the  current
121       raster  distance  is 0, the valid bit is set, the associated RGBA color
122       is (1, 1, 1, 1), the associated color index is 1,  and  the  associated
123       texture    coordinates   are   (0,   0,   0,   1).    In   RGBA   mode,
124       GL_CURRENT_RASTER_INDEX is always 1; in color index mode,  the  current
125       raster RGBA color always maintains its initial value.
126

NOTES

128       The raster position is modified both by glRasterPos and by glBitmap.
129
130       When the raster position coordinates are invalid, drawing commands that
131       are based on the raster position are ignored  (that  is,  they  do  not
132       result in changes to GL state).
133
134       Calling  glDrawElements,  or  glDrawRangeElements may leave the current
135       color or index indeterminate.  If glRasterPos  is  executed  while  the
136       current  color  or  index is indeterminate, the current raster color or
137       current raster index remains indeterminate.
138
139       To set a valid raster position outside the viewport, first set a  valid
140       raster position, then call glBitmap with NULL as the bitmap parameter.
141
142       When  the  GL_ARB_imaging  extension  is  supported, there are distinct
143       raster texture coordinates for each texture unit. Each  texture  unit's
144       current raster texture coordinates are updated by glRasterPos.
145

ERRORS

147       GL_INVALID_OPERATION  is  generated  if glRasterPos is executed between
148       the execution of glBegin and the corresponding execution of glEnd.
149

ASSOCIATED GETS

151       glGet with argument GL_CURRENT_RASTER_POSITION
152       glGet with argument GL_CURRENT_RASTER_POSITION_VALID
153       glGet with argument GL_CURRENT_RASTER_DISTANCE
154       glGet with argument GL_CURRENT_RASTER_COLOR
155       glGet with argument GL_CURRENT_RASTER_INDEX
156       glGet with argument GL_CURRENT_RASTER_TEXTURE_COORDS
157

SEE ALSO

159       glBitmap(3G), glCopyPixels(3G),  glDrawArrays(3G),  glDrawElements(3G),
160       glDrawRangeElements(3G),        glDrawPixels(3G),       glTexCoord(3G),
161       glTexGen(3G), glVertex(3G)
162
163
164
165                                                               GLRASTERPOS(3G)
Impressum