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