Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4358 | Serge | 1 | Name |
2 | |||
3 | MESA_packed_depth_stencil |
||
4 | |||
5 | Name Strings |
||
6 | |||
7 | GL_MESA_packed_depth_stencil |
||
8 | |||
9 | Contact |
||
10 | |||
11 | Keith Whitwell, VA Linux Systems Inc. (keithw 'at' valinux.com) |
||
12 | Brian Paul, VA Linux Systems Inc. (brianp 'at' valinux.com) |
||
13 | |||
14 | Status |
||
15 | |||
16 | Obsolete. |
||
17 | |||
18 | Version |
||
19 | |||
20 | |||
21 | Number |
||
22 | |||
23 | ??? |
||
24 | |||
25 | Dependencies |
||
26 | |||
27 | EXT_abgr affects the definition of this extension |
||
28 | SGIS_texture4D affects the definition of this extension |
||
29 | EXT_cmyka affects the definition of this extension |
||
30 | ARB_packed_pixels affects the definition of this extension |
||
31 | |||
32 | Overview |
||
33 | |||
34 | Provides a mechanism for DrawPixels and ReadPixels to efficiently |
||
35 | transfer depth and stencil image data. Specifically, we defined new |
||
36 | packed pixel formats and types which pack both stencil and depth |
||
37 | into one value. |
||
38 | |||
39 | Issues: |
||
40 | |||
41 | 1. Is this the right way to distinguish between 24/8 and 8/24 |
||
42 | pixel formats? Should we instead provide both: |
||
43 | |||
44 | GL_DEPTH_STENCIL_MESA |
||
45 | GL_STENCIL_DEPTH_MESA |
||
46 | |||
47 | And perhaps just use GL_UNSIGNED_INT, GL_UNSIGNED_SHORT ? |
||
48 | |||
49 | 2. If not, is it correct to use _REV to indicate that stencil |
||
50 | preceeds depth in the 1_15 and 8_24 formats? |
||
51 | |||
52 | 3. Do we really want the GL_UNSIGNED_SHORT formats? |
||
53 | |||
54 | |||
55 | New Procedures and Functions |
||
56 | |||
57 | None. |
||
58 | |||
59 | New Tokens |
||
60 | |||
61 | Accepted by the |
||
62 | |||
63 | GL_DEPTH_STENCIL_MESA 0x8750 |
||
64 | |||
65 | Accepted by the |
||
66 | |||
67 | GL_UNSIGNED_INT_24_8_MESA 0x8751 |
||
68 | GL_UNSIGNED_INT_8_24_REV_MESA 0x8752 |
||
69 | GL_UNSIGNED_SHORT_15_1_MESA 0x8753 |
||
70 | GL_UNSIGNED_SHORT_1_15_REV_MESA 0x8754 |
||
71 | |||
72 | Additions to Chapter 2 of the 1.1 Specification (OpenGL Operation) |
||
73 | |||
74 | None |
||
75 | |||
76 | Additions to Chapter 3 of the 1.1 Specification (Rasterization) |
||
77 | |||
78 | One entry is added to table 3.5 (DrawPixels and ReadPixels formats). |
||
79 | The new table is: |
||
80 | |||
81 | Target |
||
82 | Format Name Buffer Element Meaning and Order |
||
83 | ----------- ------ ------------------------- |
||
84 | COLOR_INDEX Color Color index |
||
85 | STENCIL_INDEX Stencil Stencil index |
||
86 | DEPTH_COMPONENT Depth Depth component |
||
87 | RED Color R component |
||
88 | GREEN Color G component |
||
89 | BLUE Color B component |
||
90 | ALPHA Color A component |
||
91 | RGB Color R, G, B components |
||
92 | RGBA Color R, G, B, A components |
||
93 | BGRA Color B, G, R, A components |
||
94 | ABGR_EXT Color A, B, G, R components |
||
95 | CMYK_EXT Color Cyan, Magenta, Yellow, Black components |
||
96 | CMYKA_EXT Color Cyan, Magenta, Yellow, Black, A components |
||
97 | LUMINANCE Color Luminance component |
||
98 | LUMINANCE_ALPHA Color Luminance, A components |
||
99 | DEPTH_STENCIL Depth, Depth component, stencil index. |
||
100 | Stencil |
||
101 | |||
102 | Table 3.5: DrawPixels and ReadPixels formats. The third column |
||
103 | gives a description of and the number and order of elements in a |
||
104 | group. |
||
105 | |||
106 | Add to the description of packed pixel formats: |
||
107 | |||
108 |
|
||
109 | Token Name Type Elements Pixel Formats |
||
110 | ---------------- ---- -------- ------------- |
||
111 | |||
112 | UNSIGNED_BYTE_3_3_2 ubyte 3 RGB |
||
113 | UNSIGNED_BYTE_2_3_3_REV ubyte 3 RGB |
||
114 | UNSIGNED_SHORT_5_6_5 ushort 3 RGB |
||
115 | UNSIGNED_SHORT_5_6_5_REV ushort 3 RGB |
||
116 | UNSIGNED_SHORT_4_4_4_4 ushort 4 RGBA,BGRA,ABGR_EXT,CMYK_EXT |
||
117 | UNSIGNED_SHORT_4_4_4_4_REV ushort 4 RGBA,BGRA |
||
118 | UNSIGNED_SHORT_5_5_5_1 ushort 4 RGBA,BGRA,ABGR_EXT,CMYK_EXT |
||
119 | UNSIGNED_SHORT_1_5_5_5_REV ushort 4 RGBA,BGRA |
||
120 | UNSIGNED_INT_8_8_8_8 uint 4 RGBA,BGRA,ABGR_EXT,CMYK_EXT |
||
121 | UNSIGNED_INT_8_8_8_8_REV uint 4 RGBA,BGRA |
||
122 | UNSIGNED_INT_10_10_10_2 uint 4 RGBA,BGRA,ABGR_EXT,CMYK_EXT |
||
123 | UNSIGNED_INT_2_10_10_10_REV uint 4 RGBA,BGRA |
||
124 | UNSIGNED_SHORT_15_1_MESA ushort 2 DEPTH_STENCIL_MESA |
||
125 | UNSIGNED_SHORT_1_15_REV_MESA ushort 2 DEPTH_STENCIL_MESA |
||
126 | UNSIGNED_SHORT_24_8_MESA ushort 2 DEPTH_STENCIL_MESA |
||
127 | UNSIGNED_SHORT_8_24_REV_MESA ushort 2 DEPTH_STENCIL_MESA |
||
128 | |||
129 | UNSIGNED_INT_8_24: |
||
130 | |||
131 | 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 |
||
132 | +-----------------------+-----------------------------------------------------------------------+ |
||
133 | | | | |
||
134 | +-----------------------+-----------------------------------------------------------------------+ |
||
135 | |||
136 | first second |
||
137 | element element |
||
138 | |||
139 | |||
140 | UNSIGNED_INT_24_8: |
||
141 | |||
142 | 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 |
||
143 | +----------------------------------------------------------------------+------------------------+ |
||
144 | | | | |
||
145 | +----------------------------------------------------------------------+------------------------+ |
||
146 | |||
147 | first second |
||
148 | element element |
||
149 | |||
150 | UNSIGNED_SHORT_15_1: |
||
151 | |||
152 | 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 |
||
153 | +-----------------------------------------------------------+---+ |
||
154 | | | | |
||
155 | +-----------------------------------------------------------+---+ |
||
156 | |||
157 | first second |
||
158 | element element |
||
159 | |||
160 | |||
161 | UNSIGNED_SHORT_1_15_REV: |
||
162 | |||
163 | 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 |
||
164 | +---+-----------------------------------------------------------+ |
||
165 | | | | |
||
166 | +---+-----------------------------------------------------------+ |
||
167 | |||
168 | second first |
||
169 | element element |
||
170 | |||
171 | The assignment of elements to fields in the packed pixel is as |
||
172 | described in the table below: |
||
173 | |||
174 | First Second Third Fourth |
||
175 | Format Element Element Element Element |
||
176 | ------ ------- ------- ------- ------- |
||
177 | RGB red green blue |
||
178 | RGBA red green blue alpha |
||
179 | BGRA blue green red alpha |
||
180 | ABGR_EXT alpha blue green red |
||
181 | CMYK_EXT cyan magenta yellow black |
||
182 | DEPTH_STENCIL_MESA depth stencil |
||
183 | |||
184 | Additions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations |
||
185 | and the Frame Buffer) |
||
186 | |||
187 | The new format is added to the discussion of Obtaining Pixels from the |
||
188 | Framebuffer. It should read " If the |
||
189 | BLUE, ALPHA, RGB, RGBA, ABGR_EXT, LUMINANCE, or LUMINANCE_ALPHA, and |
||
190 | the GL is in color index mode, then the color index is obtained." |
||
191 | |||
192 | The new format is added to the discussion of Index Lookup. It should |
||
193 | read "If |
||
194 | ABGR_EXT, LUMINANCE, or LUMINANCE_ALPHA, then the index is used to |
||
195 | reference 4 tables of color components: PIXEL_MAP_I_TO_R, |
||
196 | PIXEL_MAP_I_TO_G, PIXEL_MAP_I_TO_B, and PIXEL_MAP_I_TO_A." |
||
197 | |||
198 | |||
199 | Additions to Chapter 5 of the 1.1 Specification (Special Functions) |
||
200 | |||
201 | None |
||
202 | |||
203 | Additions to Chapter 6 of the 1.1 Specification (State and State Requests) |
||
204 | |||
205 | None |
||
206 | |||
207 | Additions to the GLX Specification |
||
208 | |||
209 | None |
||
210 | |||
211 | GLX Protocol |
||
212 | |||
213 | TBD |
||
214 | |||
215 | Errors |
||
216 | |||
217 | None |
||
218 | |||
219 | New State |
||
220 | |||
221 | None |
||
222 | |||
223 | Revision History |
||
224 | |||
225 | Version 1.0 - 23 Sep 2000 |
||
226 | Keith's original version. |
||
227 | |||
228 | Version 1.1 - 3 Nov 2000 |
||
229 | Brian's edits, assigned values to new enums. |
||
230 |