5 * Set the current raster position to a specific window
6 * coordinate. Also see the GL_MESA_window_pos extension.
8 * Written by Brian Paul and in the public domain.
12 void WindowPos( GLfloat x
, GLfloat y
, GLfloat z
)
16 /* Push current matrix mode and viewport attributes */
17 glPushAttrib( GL_TRANSFORM_BIT
| GL_VIEWPORT_BIT
);
19 /* Setup projection parameters */
20 glMatrixMode( GL_PROJECTION
);
23 glMatrixMode( GL_MODELVIEW
);
28 glViewport( (int) x
- 1, (int) y
- 1, 2, 2 );
30 /* set the raster (window) position */
33 glRasterPos3f( fx
, fy
, 0.0 );
35 /* restore matrices, viewport and matrix mode */
37 glMatrixMode( GL_PROJECTION
);