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 | |
| 11 | Brian Paul, brianp 'at' mesa3d.org |
| 12 | |
| 13 | Status |
| 14 | |
| 15 | Shipping (since Mesa version 1.2.8) |
| 16 | |
| 17 | Version |
| 18 | |
| 19 | $Id: MESA_window_pos.spec,v 1.1 1999/07/20 00:30:41 brianp Exp $ |
| 20 | |
| 21 | Number |
| 22 | |
| 23 | XXX non assigned |
| 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 |
| 36 | rely a subtle side-effect of the Bitmap command in order to circumvent |
| 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) |
| 54 | |
| 55 | New Tokens |
| 56 | |
| 57 | none |
| 58 | |
| 59 | Additions to Chapter 2 of the OpenGL 1.2 Specification (OpenGL Operation) |
| 60 | |
| 61 | - (2.12, p. 41) Insert after third paragraph: |
| 62 | |
| 63 | Alternately, the current raster position may be set by one of the |
| 64 | WindowPosMESA commands: |
| 65 | |
| 66 | void WindowPos{234}{sidf}MESA( T coords ); |
| 67 | void Window Pos{234}{sidf}vMESA( T coords ); |
| 68 | |
| 69 | WindosPos4MESA takes four values indicating x, y, z, and w. |
| 70 | WindowPos3MESA (or WindowPos2MESA) is analaguos, but sets only |
| 71 | x, y, and z with w implicitly set to 1 (or only x and y with z |
| 72 | implicititly set to 0 and w implicitly set to 1). |
| 73 | |
| 74 | WindowPosMESA operates like RasterPos except that the current modelview |
| 75 | matrix, projection matrix and viewport parameters are ignored and the |
| 76 | clip test operation always passes. The current raster position values |
| 77 | are directly set to the parameters passed to WindowPosMESA. The current |
| 78 | color, color index and texture coordinate update the current raster |
| 79 | position's associated data. |
| 80 | |
| 81 | The current raster distance ??? XXX ??? |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | |
| 89 | Additions to the AGL/GLX/WGL Specifications |
| 90 | |
| 91 | None |
| 92 | |
| 93 | GLX Protocol |
| 94 | |
| 95 | Not specified at this time. However, a protocol message very similar |
| 96 | to that of RasterPos is expected. |
| 97 | |
| 98 | Errors |
| 99 | |
| 100 | INVALID_OPERATION is generated if WindowPosMESA is called betweeen |
| 101 | Begin and End. |
| 102 | |
| 103 | |
| 104 | New State |
| 105 | |
| 106 | None. |
| 107 | |
| 108 | New Implementation Dependent State |
| 109 | |
| 110 | None. |
| 111 | |
| 112 | Revision History |
| 113 | |
| 114 | * Revision 1.0 - Initial specification |