| 1 |
Name |
| 2 |
|
| 3 |
MESA_window_pos |
| 4 |
|
| 5 |
Name Strings |
| 6 |
|
| 7 |
GL_MESA_window_pos |
| 8 |
|
| 9 |
Contact |
| 10 |
|
| 11 |
Brian Paul, brian.paul 'at' tungstengraphics.com |
| 12 |
|
| 13 |
Status |
| 14 |
|
| 15 |
Shipping (since Mesa version 1.2.8) |
| 16 |
|
| 17 |
Version |
| 18 |
|
| 19 |
|
| 20 |
Number |
| 21 |
|
| 22 |
197 |
| 23 |
|
| 24 |
Dependencies |
| 25 |
|
| 26 |
OpenGL 1.0 is required. |
| 27 |
The extension is written against the OpenGL 1.2 Specification |
| 28 |
|
| 29 |
Overview |
| 30 |
|
| 31 |
In order to set the current raster position to a specific window |
| 32 |
coordinate with the RasterPos command, the modelview matrix, projection |
| 33 |
matrix and viewport must be set very carefully. Furthermore, if the |
| 34 |
desired window coordinate is outside of the window's bounds one must |
| 35 |
rely on a subtle side-effect of the Bitmap command in order to circumvent |
| 36 |
frustum clipping. |
| 37 |
|
| 38 |
This extension provides a set of functions to directly set the |
| 39 |
current raster position, bypassing the modelview matrix, the |
| 40 |
projection matrix and the viewport to window mapping. Furthermore, |
| 41 |
clip testing is not performed. |
| 42 |
|
| 43 |
This greatly simplifies the process of setting the current raster |
| 44 |
position to a specific window coordinate prior to calling DrawPixels, |
| 45 |
CopyPixels or Bitmap. |
| 46 |
|
| 47 |
New Procedures and Functions |
| 48 |
|
| 49 |
void WindowPos2dMESA(double x, double y) |
| 50 |
void WindowPos2fMESA(float x, float y) |
| 51 |
void WindowPos2iMESA(int x, int y) |
| 52 |
void WindowPos2sMESA(short x, short y) |
| 53 |
void WindowPos2ivMESA(const int *p) |
| 54 |
void WindowPos2svMESA(const short *p) |
| 55 |
void WindowPos2fvMESA(const float *p) |
| 56 |
void WindowPos2dvMESA(const double *p) |
| 57 |
void WindowPos3iMESA(int x, int y, int z) |
| 58 |
void WindowPos3sMESA(short x, short y, short z) |
| 59 |
void WindowPos3fMESA(float x, float y, float z) |
| 60 |
void WindowPos3dMESA(double x, double y, double z) |
| 61 |
void WindowPos3ivMESA(const int *p) |
| 62 |
void WindowPos3svMESA(const short *p) |
| 63 |
void WindowPos3fvMESA(const float *p) |
| 64 |
void WindowPos3dvMESA(const double *p) |
| 65 |
void WindowPos4iMESA(int x, int y, int z, int w) |
| 66 |
void WindowPos4sMESA(short x, short y, short z, short w) |
| 67 |
void WindowPos4fMESA(float x, float y, float z, float w) |
| 68 |
void WindowPos4dMESA(double x, double y, double z, double ) |
| 69 |
void WindowPos4ivMESA(const int *p) |
| 70 |
void WindowPos4svMESA(const short *p) |
| 71 |
void WindowPos4fvMESA(const float *p) |
| 72 |
void WindowPos4dvMESA(const double *p) |
| 73 |
|
| 74 |
New Tokens |
| 75 |
|
| 76 |
none |
| 77 |
|
| 78 |
Additions to Chapter 2 of the OpenGL 1.2 Specification (OpenGL Operation) |
| 79 |
|
| 80 |
- (2.12, p. 41) Insert after third paragraph: |
| 81 |
|
| 82 |
Alternately, the current raster position may be set by one of the |
| 83 |
WindowPosMESA commands: |
| 84 |
|
| 85 |
void WindowPos{234}{sidf}MESA( T coords ); |
| 86 |
void WindowPos{234}{sidf}vMESA( T coords ); |
| 87 |
|
| 88 |
WindosPos4MESA takes four values indicating x, y, z, and w. |
| 89 |
WindowPos3MESA (or WindowPos2MESA) is analaguos, but sets only |
| 90 |
x, y, and z with w implicitly set to 1 (or only x and y with z |
| 91 |
implicitly set to 0 and w implicitly set to 1). |
| 92 |
|
| 93 |
WindowPosMESA operates like RasterPos except that the current modelview |
| 94 |
matrix, projection matrix and viewport parameters are ignored and the |
| 95 |
clip test operation always passes. The current raster position values |
| 96 |
are directly set to the parameters passed to WindowPosMESA. The current |
| 97 |
color, color index and texture coordinate update the current raster |
| 98 |
position's associated data. |
| 99 |
|
| 100 |
Additions to the AGL/GLX/WGL Specifications |
| 101 |
|
| 102 |
None |
| 103 |
|
| 104 |
GLX Protocol |
| 105 |
|
| 106 |
Not specified at this time. However, a protocol message very similar |
| 107 |
to that of RasterPos is expected. |
| 108 |
|
| 109 |
Errors |
| 110 |
|
| 111 |
INVALID_OPERATION is generated if WindowPosMESA is called between |
| 112 |
Begin and End. |
| 113 |
|
| 114 |
New State |
| 115 |
|
| 116 |
None. |
| 117 |
|
| 118 |
New Implementation Dependent State |
| 119 |
|
| 120 |
None. |
| 121 |
|
| 122 |
Revision History |
| 123 |
|
| 124 |
* Revision 1.0 - Initial specification |
| 125 |
* Revision 1.1 - Minor clean-up (7 Jan 2000, Brian Paul) |
| 126 |
|