1848b8605SmrgName
2848b8605Smrg
3848b8605Smrg    MESA_window_pos
4848b8605Smrg
5848b8605SmrgName Strings
6848b8605Smrg
7848b8605Smrg    GL_MESA_window_pos
8848b8605Smrg
9848b8605SmrgContact
10848b8605Smrg
11848b8605Smrg    Brian Paul, brian.paul 'at' tungstengraphics.com
12848b8605Smrg
13848b8605SmrgStatus
14848b8605Smrg
15848b8605Smrg    Shipping (since Mesa version 1.2.8)
16848b8605Smrg
17848b8605SmrgVersion
18848b8605Smrg
19848b8605Smrg
20848b8605SmrgNumber
21848b8605Smrg
22848b8605Smrg    197
23848b8605Smrg
24848b8605SmrgDependencies
25848b8605Smrg
26848b8605Smrg    OpenGL 1.0 is required.
27848b8605Smrg    The extension is written against the OpenGL 1.2 Specification
28848b8605Smrg
29848b8605SmrgOverview
30848b8605Smrg
31848b8605Smrg    In order to set the current raster position to a specific window
32848b8605Smrg    coordinate with the RasterPos command, the modelview matrix, projection
33848b8605Smrg    matrix and viewport must be set very carefully.  Furthermore, if the
34848b8605Smrg    desired window coordinate is outside of the window's bounds one must
35848b8605Smrg    rely on a subtle side-effect of the Bitmap command in order to circumvent
36848b8605Smrg    frustum clipping.
37848b8605Smrg
38848b8605Smrg    This extension provides a set of functions to directly set the
39848b8605Smrg    current raster position, bypassing the modelview matrix, the
40848b8605Smrg    projection matrix and the viewport to window mapping.  Furthermore,
41848b8605Smrg    clip testing is not performed.
42848b8605Smrg
43848b8605Smrg    This greatly simplifies the process of setting the current raster
44848b8605Smrg    position to a specific window coordinate prior to calling DrawPixels,
45848b8605Smrg    CopyPixels or Bitmap.
46848b8605Smrg
47848b8605SmrgNew Procedures and Functions
48848b8605Smrg
49848b8605Smrg    void WindowPos2dMESA(double x, double y)
50848b8605Smrg    void WindowPos2fMESA(float x, float y)
51848b8605Smrg    void WindowPos2iMESA(int x, int y)
52848b8605Smrg    void WindowPos2sMESA(short x, short y)
53848b8605Smrg    void WindowPos2ivMESA(const int *p)
54848b8605Smrg    void WindowPos2svMESA(const short *p)
55848b8605Smrg    void WindowPos2fvMESA(const float *p)
56848b8605Smrg    void WindowPos2dvMESA(const double *p)
57848b8605Smrg    void WindowPos3iMESA(int x, int y, int z)
58848b8605Smrg    void WindowPos3sMESA(short x, short y, short z)
59848b8605Smrg    void WindowPos3fMESA(float x, float y, float z)
60848b8605Smrg    void WindowPos3dMESA(double x, double y, double z)
61848b8605Smrg    void WindowPos3ivMESA(const int *p)
62848b8605Smrg    void WindowPos3svMESA(const short *p)
63848b8605Smrg    void WindowPos3fvMESA(const float *p)
64848b8605Smrg    void WindowPos3dvMESA(const double *p)
65848b8605Smrg    void WindowPos4iMESA(int x, int y, int z, int w)
66848b8605Smrg    void WindowPos4sMESA(short x, short y, short z, short w)
67848b8605Smrg    void WindowPos4fMESA(float x, float y, float z, float w)
68848b8605Smrg    void WindowPos4dMESA(double x, double y, double z, double )
69848b8605Smrg    void WindowPos4ivMESA(const int *p)
70848b8605Smrg    void WindowPos4svMESA(const short *p)
71848b8605Smrg    void WindowPos4fvMESA(const float *p)
72848b8605Smrg    void WindowPos4dvMESA(const double *p)
73848b8605Smrg
74848b8605SmrgNew Tokens
75848b8605Smrg
76848b8605Smrg    none
77848b8605Smrg
78848b8605SmrgAdditions to Chapter 2 of the OpenGL 1.2 Specification (OpenGL Operation)
79848b8605Smrg
80848b8605Smrg  - (2.12, p. 41) Insert after third paragraph:
81848b8605Smrg
82848b8605Smrg      Alternately, the current raster position may be set by one of the
83848b8605Smrg      WindowPosMESA commands:
84848b8605Smrg
85848b8605Smrg         void WindowPos{234}{sidf}MESA( T coords );
86848b8605Smrg         void WindowPos{234}{sidf}vMESA( T coords );
87848b8605Smrg
88848b8605Smrg      WindosPos4MESA takes four values indicating x, y, z, and w.
89848b8605Smrg      WindowPos3MESA (or WindowPos2MESA) is analaguos, but sets only
90848b8605Smrg      x, y, and z with w implicitly set to 1 (or only x and y with z
91848b8605Smrg      implicitly set to 0 and w implicitly set to 1).
92848b8605Smrg
93848b8605Smrg      WindowPosMESA operates like RasterPos except that the current modelview
94848b8605Smrg      matrix, projection matrix and viewport parameters are ignored and the
95848b8605Smrg      clip test operation always passes.  The current raster position values
96848b8605Smrg      are directly set to the parameters passed to WindowPosMESA.  The current
97848b8605Smrg      color, color index and texture coordinate update the current raster
98848b8605Smrg      position's associated data.
99848b8605Smrg
100848b8605SmrgAdditions to the AGL/GLX/WGL Specifications
101848b8605Smrg
102848b8605Smrg    None
103848b8605Smrg
104848b8605SmrgGLX Protocol
105848b8605Smrg
106848b8605Smrg    Not specified at this time.  However, a protocol message very similar
107848b8605Smrg    to that of RasterPos is expected.
108848b8605Smrg
109848b8605SmrgErrors
110848b8605Smrg
111848b8605Smrg    INVALID_OPERATION is generated if WindowPosMESA is called between
112848b8605Smrg    Begin and End.
113848b8605Smrg
114848b8605SmrgNew State
115848b8605Smrg
116848b8605Smrg    None.
117848b8605Smrg
118848b8605SmrgNew Implementation Dependent State
119848b8605Smrg
120848b8605Smrg    None.
121848b8605Smrg
122848b8605SmrgRevision History
123848b8605Smrg
124848b8605Smrg  * Revision 1.0 - Initial specification
125848b8605Smrg  * Revision 1.1 - Minor clean-up  (7 Jan 2000, Brian Paul)
126848b8605Smrg
127