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

NAME

6       glRasterPos - specify the raster position for pixel operations
7

C SPECIFICATION

9       void glRasterPos2s(GLshort x, GLshort y);
10
11       void glRasterPos2i(GLint x, GLint y);
12
13       void glRasterPos2f(GLfloat x, GLfloat y);
14
15       void glRasterPos2d(GLdouble x, GLdouble y);
16
17       void glRasterPos3s(GLshort x, GLshort y, GLshort z);
18
19       void glRasterPos3i(GLint x, GLint y, GLint z);
20
21       void glRasterPos3f(GLfloat x, GLfloat y, GLfloat z);
22
23       void glRasterPos3d(GLdouble x, GLdouble y, GLdouble z);
24
25       void glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w);
26
27       void glRasterPos4i(GLint x, GLint y, GLint z, GLint w);
28
29       void glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
30
31       void glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
32

PARAMETERS

34       x, y, z, w
35           Specify the x, y, z, and w object coordinates (if present) for the
36           raster position.
37

C SPECIFICATION

39       void glRasterPos2sv(const GLshort * v);
40
41       void glRasterPos2iv(const GLint * v);
42
43       void glRasterPos2fv(const GLfloat * v);
44
45       void glRasterPos2dv(const GLdouble * v);
46
47       void glRasterPos3sv(const GLshort * v);
48
49       void glRasterPos3iv(const GLint * v);
50
51       void glRasterPos3fv(const GLfloat * v);
52
53       void glRasterPos3dv(const GLdouble * v);
54
55       void glRasterPos4sv(const GLshort * v);
56
57       void glRasterPos4iv(const GLint * v);
58
59       void glRasterPos4fv(const GLfloat * v);
60
61       void glRasterPos4dv(const GLdouble * v);
62

PARAMETERS

64       v
65           Specifies a pointer to an array of two, three, or four elements,
66           specifying x, y, z, and w coordinates, respectively.
67

DESCRIPTION

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

NOTES

117       The raster position is modified by glRasterPos, glBitmap(), and
118       glWindowPos().
119
120       When the raster position coordinates are invalid, drawing commands that
121       are based on the raster position are ignored (that is, they do not
122       result in changes to GL state).
123
124       Calling glDrawElements() or glDrawRangeElements() may leave the current
125       color or index indeterminate. If glRasterPos is executed while the
126       current color or index is indeterminate, the current raster color or
127       current raster index remains indeterminate.
128
129       To set a valid raster position outside the viewport, first set a valid
130       raster position, then call glBitmap() with NULL as the bitmap
131       parameter.
132
133       When the ARB_imaging extension is supported, there are distinct raster
134       texture coordinates for each texture unit. Each texture unit's current
135       raster texture coordinates are updated by glRasterPos.
136

ERRORS

138       GL_INVALID_OPERATION is generated if glRasterPos is executed between
139       the execution of glBegin() and the corresponding execution of glEnd().
140

ASSOCIATED GETS

142       glGet() with argument GL_CURRENT_RASTER_POSITION
143
144       glGet() with argument GL_CURRENT_RASTER_POSITION_VALID
145
146       glGet() with argument GL_CURRENT_RASTER_DISTANCE
147
148       glGet() with argument GL_CURRENT_RASTER_COLOR
149
150       glGet() with argument GL_CURRENT_RASTER_SECONDARY_COLOR
151
152       glGet() with argument GL_CURRENT_RASTER_INDEX
153
154       glGet() with argument GL_CURRENT_RASTER_TEXTURE_COORDS
155

SEE ALSO

157       glBitmap(), glCopyPixels(), glDrawArrays(), glDrawElements(),
158       glDrawRangeElements(), glDrawPixels(), glMultiTexCoord(), glTexCoord(),
159       glTexGen(), glVertex(), glWindowPos()
160
162       Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
163       under the SGI Free Software B License. For details, see
164       http://oss.sgi.com/projects/FreeB/.
165

AUTHORS

167       opengl.org
168
169
170
171opengl.org                        07/13/2018                   GLRASTERPOS(3G)
Impressum