4 * From: Stephane Rehel <rehel@worldnet.fr>
5 * Date: Mon, 31 May 1999 18:40:54 -0400
6 * To: Paul Brian <brianp@ra.avid.com>
7 * Subject: OpenGL State Dump Function
9 * Here is a function that dumps the current OpenGL state. I wrote it
16 * I think Mesa is wrong on some getBooleanv(). For example, GL_VERTEX_ARRAY
17 * is queried by IsEnabled() (cf. p. 196 of the spec). But on page 193
18 * we can read that all the boolean attribs that can be queried by IsEnabled()
19 * can also be queried by IsEnabled().
21 * I had duplicated all the enums (LOCAL_*) so that the code can run on any
22 * OpenGL version, even if an enum is not recognized.
24 * The code can be shipped in the public domain.
32 * Creation: February 5 1999
38 /***************************************************************************/
42 LOCAL_GL_BYTE
= 0x1400,
43 LOCAL_GL_UNSIGNED_BYTE
= 0x1401,
44 LOCAL_GL_SHORT
= 0x1402,
45 LOCAL_GL_UNSIGNED_SHORT
= 0x1403,
46 LOCAL_GL_INT
= 0x1404,
47 LOCAL_GL_UNSIGNED_INT
= 0x1405,
48 LOCAL_GL_FLOAT
= 0x1406,
49 LOCAL_GL_DOUBLE
= 0x140A,
50 LOCAL_GL_2_BYTES
= 0x1407,
51 LOCAL_GL_3_BYTES
= 0x1408,
52 LOCAL_GL_4_BYTES
= 0x1409,
55 LOCAL_GL_LINES
= 0x0001,
56 LOCAL_GL_POINTS
= 0x0000,
57 LOCAL_GL_LINE_STRIP
= 0x0003,
58 LOCAL_GL_LINE_LOOP
= 0x0002,
59 LOCAL_GL_TRIANGLES
= 0x0004,
60 LOCAL_GL_TRIANGLE_STRIP
= 0x0005,
61 LOCAL_GL_TRIANGLE_FAN
= 0x0006,
62 LOCAL_GL_QUADS
= 0x0007,
63 LOCAL_GL_QUAD_STRIP
= 0x0008,
64 LOCAL_GL_POLYGON
= 0x0009,
65 LOCAL_GL_EDGE_FLAG
= 0x0B43,
68 LOCAL_GL_VERTEX_ARRAY
= 0x8074,
69 LOCAL_GL_NORMAL_ARRAY
= 0x8075,
70 LOCAL_GL_COLOR_ARRAY
= 0x8076,
71 LOCAL_GL_INDEX_ARRAY
= 0x8077,
72 LOCAL_GL_TEXTURE_COORD_ARRAY
= 0x8078,
73 LOCAL_GL_EDGE_FLAG_ARRAY
= 0x8079,
74 LOCAL_GL_VERTEX_ARRAY_SIZE
= 0x807A,
75 LOCAL_GL_VERTEX_ARRAY_TYPE
= 0x807B,
76 LOCAL_GL_VERTEX_ARRAY_STRIDE
= 0x807C,
77 LOCAL_GL_NORMAL_ARRAY_TYPE
= 0x807E,
78 LOCAL_GL_NORMAL_ARRAY_STRIDE
= 0x807F,
79 LOCAL_GL_COLOR_ARRAY_SIZE
= 0x8081,
80 LOCAL_GL_COLOR_ARRAY_TYPE
= 0x8082,
81 LOCAL_GL_COLOR_ARRAY_STRIDE
= 0x8083,
82 LOCAL_GL_INDEX_ARRAY_TYPE
= 0x8085,
83 LOCAL_GL_INDEX_ARRAY_STRIDE
= 0x8086,
84 LOCAL_GL_TEXTURE_COORD_ARRAY_SIZE
= 0x8088,
85 LOCAL_GL_TEXTURE_COORD_ARRAY_TYPE
= 0x8089,
86 LOCAL_GL_TEXTURE_COORD_ARRAY_STRIDE
= 0x808A,
87 LOCAL_GL_EDGE_FLAG_ARRAY_STRIDE
= 0x808C,
88 LOCAL_GL_VERTEX_ARRAY_POINTER
= 0x808E,
89 LOCAL_GL_NORMAL_ARRAY_POINTER
= 0x808F,
90 LOCAL_GL_COLOR_ARRAY_POINTER
= 0x8090,
91 LOCAL_GL_INDEX_ARRAY_POINTER
= 0x8091,
92 LOCAL_GL_TEXTURE_COORD_ARRAY_POINTER
= 0x8092,
93 LOCAL_GL_EDGE_FLAG_ARRAY_POINTER
= 0x8093,
94 LOCAL_GL_V2F
= 0x2A20,
95 LOCAL_GL_V3F
= 0x2A21,
96 LOCAL_GL_C4UB_V2F
= 0x2A22,
97 LOCAL_GL_C4UB_V3F
= 0x2A23,
98 LOCAL_GL_C3F_V3F
= 0x2A24,
99 LOCAL_GL_N3F_V3F
= 0x2A25,
100 LOCAL_GL_C4F_N3F_V3F
= 0x2A26,
101 LOCAL_GL_T2F_V3F
= 0x2A27,
102 LOCAL_GL_T4F_V4F
= 0x2A28,
103 LOCAL_GL_T2F_C4UB_V3F
= 0x2A29,
104 LOCAL_GL_T2F_C3F_V3F
= 0x2A2A,
105 LOCAL_GL_T2F_N3F_V3F
= 0x2A2B,
106 LOCAL_GL_T2F_C4F_N3F_V3F
= 0x2A2C,
107 LOCAL_GL_T4F_C4F_N3F_V4F
= 0x2A2D,
110 LOCAL_GL_MATRIX_MODE
= 0x0BA0,
111 LOCAL_GL_MODELVIEW
= 0x1700,
112 LOCAL_GL_PROJECTION
= 0x1701,
113 LOCAL_GL_TEXTURE
= 0x1702,
116 LOCAL_GL_POINT_SMOOTH
= 0x0B10,
117 LOCAL_GL_POINT_SIZE
= 0x0B11,
118 LOCAL_GL_POINT_SIZE_GRANULARITY
= 0x0B13,
119 LOCAL_GL_POINT_SIZE_RANGE
= 0x0B12,
122 LOCAL_GL_LINE_SMOOTH
= 0x0B20,
123 LOCAL_GL_LINE_STIPPLE
= 0x0B24,
124 LOCAL_GL_LINE_STIPPLE_PATTERN
= 0x0B25,
125 LOCAL_GL_LINE_STIPPLE_REPEAT
= 0x0B26,
126 LOCAL_GL_LINE_WIDTH
= 0x0B21,
127 LOCAL_GL_LINE_WIDTH_GRANULARITY
= 0x0B23,
128 LOCAL_GL_LINE_WIDTH_RANGE
= 0x0B22,
131 LOCAL_GL_POINT
= 0x1B00,
132 LOCAL_GL_LINE
= 0x1B01,
133 LOCAL_GL_FILL
= 0x1B02,
134 LOCAL_GL_CCW
= 0x0901,
135 LOCAL_GL_CW
= 0x0900,
136 LOCAL_GL_FRONT
= 0x0404,
137 LOCAL_GL_BACK
= 0x0405,
138 LOCAL_GL_CULL_FACE
= 0x0B44,
139 LOCAL_GL_CULL_FACE_MODE
= 0x0B45,
140 LOCAL_GL_POLYGON_SMOOTH
= 0x0B41,
141 LOCAL_GL_POLYGON_STIPPLE
= 0x0B42,
142 LOCAL_GL_FRONT_FACE
= 0x0B46,
143 LOCAL_GL_POLYGON_MODE
= 0x0B40,
144 LOCAL_GL_POLYGON_OFFSET_FACTOR
= 0x8038,
145 LOCAL_GL_POLYGON_OFFSET_UNITS
= 0x2A00,
146 LOCAL_GL_POLYGON_OFFSET_POINT
= 0x2A01,
147 LOCAL_GL_POLYGON_OFFSET_LINE
= 0x2A02,
148 LOCAL_GL_POLYGON_OFFSET_FILL
= 0x8037,
151 LOCAL_GL_COMPILE
= 0x1300,
152 LOCAL_GL_COMPILE_AND_EXECUTE
= 0x1301,
153 LOCAL_GL_LIST_BASE
= 0x0B32,
154 LOCAL_GL_LIST_INDEX
= 0x0B33,
155 LOCAL_GL_LIST_MODE
= 0x0B30,
158 LOCAL_GL_NEVER
= 0x0200,
159 LOCAL_GL_LESS
= 0x0201,
160 LOCAL_GL_GEQUAL
= 0x0206,
161 LOCAL_GL_LEQUAL
= 0x0203,
162 LOCAL_GL_GREATER
= 0x0204,
163 LOCAL_GL_NOTEQUAL
= 0x0205,
164 LOCAL_GL_EQUAL
= 0x0202,
165 LOCAL_GL_ALWAYS
= 0x0207,
166 LOCAL_GL_DEPTH_TEST
= 0x0B71,
167 LOCAL_GL_DEPTH_BITS
= 0x0D56,
168 LOCAL_GL_DEPTH_CLEAR_VALUE
= 0x0B73,
169 LOCAL_GL_DEPTH_FUNC
= 0x0B74,
170 LOCAL_GL_DEPTH_RANGE
= 0x0B70,
171 LOCAL_GL_DEPTH_WRITEMASK
= 0x0B72,
172 LOCAL_GL_DEPTH_COMPONENT
= 0x1902,
175 LOCAL_GL_LIGHTING
= 0x0B50,
176 LOCAL_GL_LIGHT0
= 0x4000,
177 LOCAL_GL_LIGHT1
= 0x4001,
178 LOCAL_GL_LIGHT2
= 0x4002,
179 LOCAL_GL_LIGHT3
= 0x4003,
180 LOCAL_GL_LIGHT4
= 0x4004,
181 LOCAL_GL_LIGHT5
= 0x4005,
182 LOCAL_GL_LIGHT6
= 0x4006,
183 LOCAL_GL_LIGHT7
= 0x4007,
184 LOCAL_GL_SPOT_EXPONENT
= 0x1205,
185 LOCAL_GL_SPOT_CUTOFF
= 0x1206,
186 LOCAL_GL_CONSTANT_ATTENUATION
= 0x1207,
187 LOCAL_GL_LINEAR_ATTENUATION
= 0x1208,
188 LOCAL_GL_QUADRATIC_ATTENUATION
= 0x1209,
189 LOCAL_GL_AMBIENT
= 0x1200,
190 LOCAL_GL_DIFFUSE
= 0x1201,
191 LOCAL_GL_SPECULAR
= 0x1202,
192 LOCAL_GL_SHININESS
= 0x1601,
193 LOCAL_GL_EMISSION
= 0x1600,
194 LOCAL_GL_POSITION
= 0x1203,
195 LOCAL_GL_SPOT_DIRECTION
= 0x1204,
196 LOCAL_GL_AMBIENT_AND_DIFFUSE
= 0x1602,
197 LOCAL_GL_COLOR_INDEXES
= 0x1603,
198 LOCAL_GL_LIGHT_MODEL_TWO_SIDE
= 0x0B52,
199 LOCAL_GL_LIGHT_MODEL_LOCAL_VIEWER
= 0x0B51,
200 LOCAL_GL_LIGHT_MODEL_AMBIENT
= 0x0B53,
201 LOCAL_GL_FRONT_AND_BACK
= 0x0408,
202 LOCAL_GL_SHADE_MODEL
= 0x0B54,
203 LOCAL_GL_FLAT
= 0x1D00,
204 LOCAL_GL_SMOOTH
= 0x1D01,
205 LOCAL_GL_COLOR_MATERIAL
= 0x0B57,
206 LOCAL_GL_COLOR_MATERIAL_FACE
= 0x0B55,
207 LOCAL_GL_COLOR_MATERIAL_PARAMETER
= 0x0B56,
208 LOCAL_GL_NORMALIZE
= 0x0BA1,
210 /* User clipping planes */
211 LOCAL_GL_CLIP_PLANE0
= 0x3000,
212 LOCAL_GL_CLIP_PLANE1
= 0x3001,
213 LOCAL_GL_CLIP_PLANE2
= 0x3002,
214 LOCAL_GL_CLIP_PLANE3
= 0x3003,
215 LOCAL_GL_CLIP_PLANE4
= 0x3004,
216 LOCAL_GL_CLIP_PLANE5
= 0x3005,
218 /* Accumulation buffer */
219 LOCAL_GL_ACCUM_RED_BITS
= 0x0D58,
220 LOCAL_GL_ACCUM_GREEN_BITS
= 0x0D59,
221 LOCAL_GL_ACCUM_BLUE_BITS
= 0x0D5A,
222 LOCAL_GL_ACCUM_ALPHA_BITS
= 0x0D5B,
223 LOCAL_GL_ACCUM_CLEAR_VALUE
= 0x0B80,
224 LOCAL_GL_ACCUM
= 0x0100,
225 LOCAL_GL_ADD
= 0x0104,
226 LOCAL_GL_LOAD
= 0x0101,
227 LOCAL_GL_MULT
= 0x0103,
228 LOCAL_GL_RETURN
= 0x0102,
231 LOCAL_GL_ALPHA_TEST
= 0x0BC0,
232 LOCAL_GL_ALPHA_TEST_REF
= 0x0BC2,
233 LOCAL_GL_ALPHA_TEST_FUNC
= 0x0BC1,
236 LOCAL_GL_BLEND
= 0x0BE2,
237 LOCAL_GL_BLEND_SRC
= 0x0BE1,
238 LOCAL_GL_BLEND_DST
= 0x0BE0,
241 LOCAL_GL_SRC_COLOR
= 0x0300,
242 LOCAL_GL_ONE_MINUS_SRC_COLOR
= 0x0301,
243 LOCAL_GL_DST_COLOR
= 0x0306,
244 LOCAL_GL_ONE_MINUS_DST_COLOR
= 0x0307,
245 LOCAL_GL_SRC_ALPHA
= 0x0302,
246 LOCAL_GL_ONE_MINUS_SRC_ALPHA
= 0x0303,
247 LOCAL_GL_DST_ALPHA
= 0x0304,
248 LOCAL_GL_ONE_MINUS_DST_ALPHA
= 0x0305,
249 LOCAL_GL_SRC_ALPHA_SATURATE
= 0x0308,
250 LOCAL_GL_CONSTANT_COLOR
= 0x8001,
251 LOCAL_GL_ONE_MINUS_CONSTANT_COLOR
= 0x8002,
252 LOCAL_GL_CONSTANT_ALPHA
= 0x8003,
253 LOCAL_GL_ONE_MINUS_CONSTANT_ALPHA
= 0x8004,
256 LOCAL_GL_FEEDBACK
= 0x1C01,
257 LOCAL_GL_RENDER
= 0x1C00,
258 LOCAL_GL_SELECT
= 0x1C02,
261 LOCAL_GL_2D
= 0x0600,
262 LOCAL_GL_3D
= 0x0601,
263 LOCAL_GL_3D_COLOR
= 0x0602,
264 LOCAL_GL_3D_COLOR_TEXTURE
= 0x0603,
265 LOCAL_GL_4D_COLOR_TEXTURE
= 0x0604,
266 LOCAL_GL_POINT_TOKEN
= 0x0701,
267 LOCAL_GL_LINE_TOKEN
= 0x0702,
268 LOCAL_GL_LINE_RESET_TOKEN
= 0x0707,
269 LOCAL_GL_POLYGON_TOKEN
= 0x0703,
270 LOCAL_GL_BITMAP_TOKEN
= 0x0704,
271 LOCAL_GL_DRAW_PIXEL_TOKEN
= 0x0705,
272 LOCAL_GL_COPY_PIXEL_TOKEN
= 0x0706,
273 LOCAL_GL_PASS_THROUGH_TOKEN
= 0x0700,
274 LOCAL_GL_FEEDBACK_BUFFER_POINTER
= 0x0DF0,
275 LOCAL_GL_FEEDBACK_BUFFER_SIZE
= 0x0DF1,
276 LOCAL_GL_FEEDBACK_BUFFER_TYPE
= 0x0DF2,
279 LOCAL_GL_SELECTION_BUFFER_POINTER
= 0x0DF3,
280 LOCAL_GL_SELECTION_BUFFER_SIZE
= 0x0DF4,
283 LOCAL_GL_FOG
= 0x0B60,
284 LOCAL_GL_FOG_MODE
= 0x0B65,
285 LOCAL_GL_FOG_DENSITY
= 0x0B62,
286 LOCAL_GL_FOG_COLOR
= 0x0B66,
287 LOCAL_GL_FOG_INDEX
= 0x0B61,
288 LOCAL_GL_FOG_START
= 0x0B63,
289 LOCAL_GL_FOG_END
= 0x0B64,
290 LOCAL_GL_LINEAR
= 0x2601,
291 LOCAL_GL_EXP
= 0x0800,
292 LOCAL_GL_EXP2
= 0x0801,
295 LOCAL_GL_LOGIC_OP
= 0x0BF1,
296 LOCAL_GL_INDEX_LOGIC_OP
= 0x0BF1,
297 LOCAL_GL_COLOR_LOGIC_OP
= 0x0BF2,
298 LOCAL_GL_LOGIC_OP_MODE
= 0x0BF0,
299 LOCAL_GL_CLEAR
= 0x1500,
300 LOCAL_GL_SET
= 0x150F,
301 LOCAL_GL_COPY
= 0x1503,
302 LOCAL_GL_COPY_INVERTED
= 0x150C,
303 LOCAL_GL_NOOP
= 0x1505,
304 LOCAL_GL_INVERT
= 0x150A,
305 LOCAL_GL_AND
= 0x1501,
306 LOCAL_GL_NAND
= 0x150E,
307 LOCAL_GL_OR
= 0x1507,
308 LOCAL_GL_NOR
= 0x1508,
309 LOCAL_GL_XOR
= 0x1506,
310 LOCAL_GL_EQUIV
= 0x1509,
311 LOCAL_GL_AND_REVERSE
= 0x1502,
312 LOCAL_GL_AND_INVERTED
= 0x1504,
313 LOCAL_GL_OR_REVERSE
= 0x150B,
314 LOCAL_GL_OR_INVERTED
= 0x150D,
317 LOCAL_GL_STENCIL_TEST
= 0x0B90,
318 LOCAL_GL_STENCIL_WRITEMASK
= 0x0B98,
319 LOCAL_GL_STENCIL_BITS
= 0x0D57,
320 LOCAL_GL_STENCIL_FUNC
= 0x0B92,
321 LOCAL_GL_STENCIL_VALUE_MASK
= 0x0B93,
322 LOCAL_GL_STENCIL_REF
= 0x0B97,
323 LOCAL_GL_STENCIL_FAIL
= 0x0B94,
324 LOCAL_GL_STENCIL_PASS_DEPTH_PASS
= 0x0B96,
325 LOCAL_GL_STENCIL_PASS_DEPTH_FAIL
= 0x0B95,
326 LOCAL_GL_STENCIL_CLEAR_VALUE
= 0x0B91,
327 LOCAL_GL_STENCIL_INDEX
= 0x1901,
328 LOCAL_GL_KEEP
= 0x1E00,
329 LOCAL_GL_REPLACE
= 0x1E01,
330 LOCAL_GL_INCR
= 0x1E02,
331 LOCAL_GL_DECR
= 0x1E03,
333 /* Buffers, Pixel Drawing/Reading */
335 LOCAL_GL_LEFT
= 0x0406,
336 LOCAL_GL_RIGHT
= 0x0407,
337 /*LOCAL_GL_FRONT = 0x0404, */
338 /*LOCAL_GL_BACK = 0x0405, */
339 /*LOCAL_GL_FRONT_AND_BACK = 0x0408, */
340 LOCAL_GL_FRONT_LEFT
= 0x0400,
341 LOCAL_GL_FRONT_RIGHT
= 0x0401,
342 LOCAL_GL_BACK_LEFT
= 0x0402,
343 LOCAL_GL_BACK_RIGHT
= 0x0403,
344 LOCAL_GL_AUX0
= 0x0409,
345 LOCAL_GL_AUX1
= 0x040A,
346 LOCAL_GL_AUX2
= 0x040B,
347 LOCAL_GL_AUX3
= 0x040C,
348 LOCAL_GL_COLOR_INDEX
= 0x1900,
349 LOCAL_GL_RED
= 0x1903,
350 LOCAL_GL_GREEN
= 0x1904,
351 LOCAL_GL_BLUE
= 0x1905,
352 LOCAL_GL_ALPHA
= 0x1906,
353 LOCAL_GL_LUMINANCE
= 0x1909,
354 LOCAL_GL_LUMINANCE_ALPHA
= 0x190A,
355 LOCAL_GL_ALPHA_BITS
= 0x0D55,
356 LOCAL_GL_RED_BITS
= 0x0D52,
357 LOCAL_GL_GREEN_BITS
= 0x0D53,
358 LOCAL_GL_BLUE_BITS
= 0x0D54,
359 LOCAL_GL_INDEX_BITS
= 0x0D51,
360 LOCAL_GL_SUBPIXEL_BITS
= 0x0D50,
361 LOCAL_GL_AUX_BUFFERS
= 0x0C00,
362 LOCAL_GL_READ_BUFFER
= 0x0C02,
363 LOCAL_GL_DRAW_BUFFER
= 0x0C01,
364 LOCAL_GL_DOUBLEBUFFER
= 0x0C32,
365 LOCAL_GL_STEREO
= 0x0C33,
366 LOCAL_GL_BITMAP
= 0x1A00,
367 LOCAL_GL_COLOR
= 0x1800,
368 LOCAL_GL_DEPTH
= 0x1801,
369 LOCAL_GL_STENCIL
= 0x1802,
370 LOCAL_GL_DITHER
= 0x0BD0,
371 LOCAL_GL_RGB
= 0x1907,
372 LOCAL_GL_RGBA
= 0x1908,
374 /* Implementation limits */
375 LOCAL_GL_MAX_LIST_NESTING
= 0x0B31,
376 LOCAL_GL_MAX_ATTRIB_STACK_DEPTH
= 0x0D35,
377 LOCAL_GL_MAX_MODELVIEW_STACK_DEPTH
= 0x0D36,
378 LOCAL_GL_MAX_NAME_STACK_DEPTH
= 0x0D37,
379 LOCAL_GL_MAX_PROJECTION_STACK_DEPTH
= 0x0D38,
380 LOCAL_GL_MAX_TEXTURE_STACK_DEPTH
= 0x0D39,
381 LOCAL_GL_MAX_EVAL_ORDER
= 0x0D30,
382 LOCAL_GL_MAX_LIGHTS
= 0x0D31,
383 LOCAL_GL_MAX_CLIP_PLANES
= 0x0D32,
384 LOCAL_GL_MAX_TEXTURE_SIZE
= 0x0D33,
385 LOCAL_GL_MAX_PIXEL_MAP_TABLE
= 0x0D34,
386 LOCAL_GL_MAX_VIEWPORT_DIMS
= 0x0D3A,
387 LOCAL_GL_MAX_CLIENT_ATTRIB_STACK_DEPTH
= 0x0D3B,
390 LOCAL_GL_ATTRIB_STACK_DEPTH
= 0x0BB0,
391 LOCAL_GL_CLIENT_ATTRIB_STACK_DEPTH
= 0x0BB1,
392 LOCAL_GL_COLOR_CLEAR_VALUE
= 0x0C22,
393 LOCAL_GL_COLOR_WRITEMASK
= 0x0C23,
394 LOCAL_GL_CURRENT_INDEX
= 0x0B01,
395 LOCAL_GL_CURRENT_COLOR
= 0x0B00,
396 LOCAL_GL_CURRENT_NORMAL
= 0x0B02,
397 LOCAL_GL_CURRENT_RASTER_COLOR
= 0x0B04,
398 LOCAL_GL_CURRENT_RASTER_DISTANCE
= 0x0B09,
399 LOCAL_GL_CURRENT_RASTER_INDEX
= 0x0B05,
400 LOCAL_GL_CURRENT_RASTER_POSITION
= 0x0B07,
401 LOCAL_GL_CURRENT_RASTER_TEXTURE_COORDS
= 0x0B06,
402 LOCAL_GL_CURRENT_RASTER_POSITION_VALID
= 0x0B08,
403 LOCAL_GL_CURRENT_TEXTURE_COORDS
= 0x0B03,
404 LOCAL_GL_INDEX_CLEAR_VALUE
= 0x0C20,
405 LOCAL_GL_INDEX_MODE
= 0x0C30,
406 LOCAL_GL_INDEX_WRITEMASK
= 0x0C21,
407 LOCAL_GL_MODELVIEW_MATRIX
= 0x0BA6,
408 LOCAL_GL_MODELVIEW_STACK_DEPTH
= 0x0BA3,
409 LOCAL_GL_NAME_STACK_DEPTH
= 0x0D70,
410 LOCAL_GL_PROJECTION_MATRIX
= 0x0BA7,
411 LOCAL_GL_PROJECTION_STACK_DEPTH
= 0x0BA4,
412 LOCAL_GL_RENDER_MODE
= 0x0C40,
413 LOCAL_GL_RGBA_MODE
= 0x0C31,
414 LOCAL_GL_TEXTURE_MATRIX
= 0x0BA8,
415 LOCAL_GL_TEXTURE_STACK_DEPTH
= 0x0BA5,
416 LOCAL_GL_VIEWPORT
= 0x0BA2,
420 LOCAL_GL_AUTO_NORMAL
= 0x0D80,
421 LOCAL_GL_MAP1_COLOR_4
= 0x0D90,
422 LOCAL_GL_MAP1_GRID_DOMAIN
= 0x0DD0,
423 LOCAL_GL_MAP1_GRID_SEGMENTS
= 0x0DD1,
424 LOCAL_GL_MAP1_INDEX
= 0x0D91,
425 LOCAL_GL_MAP1_NORMAL
= 0x0D92,
426 LOCAL_GL_MAP1_TEXTURE_COORD_1
= 0x0D93,
427 LOCAL_GL_MAP1_TEXTURE_COORD_2
= 0x0D94,
428 LOCAL_GL_MAP1_TEXTURE_COORD_3
= 0x0D95,
429 LOCAL_GL_MAP1_TEXTURE_COORD_4
= 0x0D96,
430 LOCAL_GL_MAP1_VERTEX_3
= 0x0D97,
431 LOCAL_GL_MAP1_VERTEX_4
= 0x0D98,
432 LOCAL_GL_MAP2_COLOR_4
= 0x0DB0,
433 LOCAL_GL_MAP2_GRID_DOMAIN
= 0x0DD2,
434 LOCAL_GL_MAP2_GRID_SEGMENTS
= 0x0DD3,
435 LOCAL_GL_MAP2_INDEX
= 0x0DB1,
436 LOCAL_GL_MAP2_NORMAL
= 0x0DB2,
437 LOCAL_GL_MAP2_TEXTURE_COORD_1
= 0x0DB3,
438 LOCAL_GL_MAP2_TEXTURE_COORD_2
= 0x0DB4,
439 LOCAL_GL_MAP2_TEXTURE_COORD_3
= 0x0DB5,
440 LOCAL_GL_MAP2_TEXTURE_COORD_4
= 0x0DB6,
441 LOCAL_GL_MAP2_VERTEX_3
= 0x0DB7,
442 LOCAL_GL_MAP2_VERTEX_4
= 0x0DB8,
443 LOCAL_GL_COEFF
= 0x0A00,
444 LOCAL_GL_DOMAIN
= 0x0A02,
445 LOCAL_GL_ORDER
= 0x0A01,
448 LOCAL_GL_FOG_HINT
= 0x0C54,
449 LOCAL_GL_LINE_SMOOTH_HINT
= 0x0C52,
450 LOCAL_GL_PERSPECTIVE_CORRECTION_HINT
= 0x0C50,
451 LOCAL_GL_POINT_SMOOTH_HINT
= 0x0C51,
452 LOCAL_GL_POLYGON_SMOOTH_HINT
= 0x0C53,
453 LOCAL_GL_DONT_CARE
= 0x1100,
454 LOCAL_GL_FASTEST
= 0x1101,
455 LOCAL_GL_NICEST
= 0x1102,
458 LOCAL_GL_SCISSOR_TEST
= 0x0C11,
459 LOCAL_GL_SCISSOR_BOX
= 0x0C10,
461 /* Pixel Mode / Transfer */
462 LOCAL_GL_MAP_COLOR
= 0x0D10,
463 LOCAL_GL_MAP_STENCIL
= 0x0D11,
464 LOCAL_GL_INDEX_SHIFT
= 0x0D12,
465 LOCAL_GL_INDEX_OFFSET
= 0x0D13,
466 LOCAL_GL_RED_SCALE
= 0x0D14,
467 LOCAL_GL_RED_BIAS
= 0x0D15,
468 LOCAL_GL_GREEN_SCALE
= 0x0D18,
469 LOCAL_GL_GREEN_BIAS
= 0x0D19,
470 LOCAL_GL_BLUE_SCALE
= 0x0D1A,
471 LOCAL_GL_BLUE_BIAS
= 0x0D1B,
472 LOCAL_GL_ALPHA_SCALE
= 0x0D1C,
473 LOCAL_GL_ALPHA_BIAS
= 0x0D1D,
474 LOCAL_GL_DEPTH_SCALE
= 0x0D1E,
475 LOCAL_GL_DEPTH_BIAS
= 0x0D1F,
476 LOCAL_GL_PIXEL_MAP_S_TO_S_SIZE
= 0x0CB1,
477 LOCAL_GL_PIXEL_MAP_I_TO_I_SIZE
= 0x0CB0,
478 LOCAL_GL_PIXEL_MAP_I_TO_R_SIZE
= 0x0CB2,
479 LOCAL_GL_PIXEL_MAP_I_TO_G_SIZE
= 0x0CB3,
480 LOCAL_GL_PIXEL_MAP_I_TO_B_SIZE
= 0x0CB4,
481 LOCAL_GL_PIXEL_MAP_I_TO_A_SIZE
= 0x0CB5,
482 LOCAL_GL_PIXEL_MAP_R_TO_R_SIZE
= 0x0CB6,
483 LOCAL_GL_PIXEL_MAP_G_TO_G_SIZE
= 0x0CB7,
484 LOCAL_GL_PIXEL_MAP_B_TO_B_SIZE
= 0x0CB8,
485 LOCAL_GL_PIXEL_MAP_A_TO_A_SIZE
= 0x0CB9,
486 LOCAL_GL_PIXEL_MAP_S_TO_S
= 0x0C71,
487 LOCAL_GL_PIXEL_MAP_I_TO_I
= 0x0C70,
488 LOCAL_GL_PIXEL_MAP_I_TO_R
= 0x0C72,
489 LOCAL_GL_PIXEL_MAP_I_TO_G
= 0x0C73,
490 LOCAL_GL_PIXEL_MAP_I_TO_B
= 0x0C74,
491 LOCAL_GL_PIXEL_MAP_I_TO_A
= 0x0C75,
492 LOCAL_GL_PIXEL_MAP_R_TO_R
= 0x0C76,
493 LOCAL_GL_PIXEL_MAP_G_TO_G
= 0x0C77,
494 LOCAL_GL_PIXEL_MAP_B_TO_B
= 0x0C78,
495 LOCAL_GL_PIXEL_MAP_A_TO_A
= 0x0C79,
496 LOCAL_GL_PACK_ALIGNMENT
= 0x0D05,
497 LOCAL_GL_PACK_LSB_FIRST
= 0x0D01,
498 LOCAL_GL_PACK_ROW_LENGTH
= 0x0D02,
499 LOCAL_GL_PACK_SKIP_PIXELS
= 0x0D04,
500 LOCAL_GL_PACK_SKIP_ROWS
= 0x0D03,
501 LOCAL_GL_PACK_SWAP_BYTES
= 0x0D00,
502 LOCAL_GL_UNPACK_ALIGNMENT
= 0x0CF5,
503 LOCAL_GL_UNPACK_LSB_FIRST
= 0x0CF1,
504 LOCAL_GL_UNPACK_ROW_LENGTH
= 0x0CF2,
505 LOCAL_GL_UNPACK_SKIP_PIXELS
= 0x0CF4,
506 LOCAL_GL_UNPACK_SKIP_ROWS
= 0x0CF3,
507 LOCAL_GL_UNPACK_SWAP_BYTES
= 0x0CF0,
508 LOCAL_GL_ZOOM_X
= 0x0D16,
509 LOCAL_GL_ZOOM_Y
= 0x0D17,
511 /* Texture mapping */
512 LOCAL_GL_TEXTURE_ENV
= 0x2300,
513 LOCAL_GL_TEXTURE_ENV_MODE
= 0x2200,
514 LOCAL_GL_TEXTURE_1D
= 0x0DE0,
515 LOCAL_GL_TEXTURE_2D
= 0x0DE1,
516 LOCAL_GL_TEXTURE_WRAP_S
= 0x2802,
517 LOCAL_GL_TEXTURE_WRAP_T
= 0x2803,
518 LOCAL_GL_TEXTURE_MAG_FILTER
= 0x2800,
519 LOCAL_GL_TEXTURE_MIN_FILTER
= 0x2801,
520 LOCAL_GL_TEXTURE_ENV_COLOR
= 0x2201,
521 LOCAL_GL_TEXTURE_GEN_S
= 0x0C60,
522 LOCAL_GL_TEXTURE_GEN_T
= 0x0C61,
523 LOCAL_GL_TEXTURE_GEN_MODE
= 0x2500,
524 LOCAL_GL_TEXTURE_BORDER_COLOR
= 0x1004,
525 LOCAL_GL_TEXTURE_WIDTH
= 0x1000,
526 LOCAL_GL_TEXTURE_HEIGHT
= 0x1001,
527 LOCAL_GL_TEXTURE_BORDER
= 0x1005,
528 LOCAL_GL_TEXTURE_COMPONENTS
= 0x1003,
529 LOCAL_GL_TEXTURE_RED_SIZE
= 0x805C,
530 LOCAL_GL_TEXTURE_GREEN_SIZE
= 0x805D,
531 LOCAL_GL_TEXTURE_BLUE_SIZE
= 0x805E,
532 LOCAL_GL_TEXTURE_ALPHA_SIZE
= 0x805F,
533 LOCAL_GL_TEXTURE_LUMINANCE_SIZE
= 0x8060,
534 LOCAL_GL_TEXTURE_INTENSITY_SIZE
= 0x8061,
535 LOCAL_GL_NEAREST_MIPMAP_NEAREST
= 0x2700,
536 LOCAL_GL_NEAREST_MIPMAP_LINEAR
= 0x2702,
537 LOCAL_GL_LINEAR_MIPMAP_NEAREST
= 0x2701,
538 LOCAL_GL_LINEAR_MIPMAP_LINEAR
= 0x2703,
539 LOCAL_GL_OBJECT_LINEAR
= 0x2401,
540 LOCAL_GL_OBJECT_PLANE
= 0x2501,
541 LOCAL_GL_EYE_LINEAR
= 0x2400,
542 LOCAL_GL_EYE_PLANE
= 0x2502,
543 LOCAL_GL_SPHERE_MAP
= 0x2402,
544 LOCAL_GL_DECAL
= 0x2101,
545 LOCAL_GL_MODULATE
= 0x2100,
546 LOCAL_GL_NEAREST
= 0x2600,
547 LOCAL_GL_REPEAT
= 0x2901,
548 LOCAL_GL_CLAMP
= 0x2900,
553 LOCAL_GL_TEXTURE_GEN_R
= 0x0C62,
554 LOCAL_GL_TEXTURE_GEN_Q
= 0x0C63,
556 /* GL 1.1 texturing */
557 LOCAL_GL_PROXY_TEXTURE_1D
= 0x8063,
558 LOCAL_GL_PROXY_TEXTURE_2D
= 0x8064,
559 LOCAL_GL_TEXTURE_PRIORITY
= 0x8066,
560 LOCAL_GL_TEXTURE_RESIDENT
= 0x8067,
561 LOCAL_GL_TEXTURE_BINDING_1D
= 0x8068,
562 LOCAL_GL_TEXTURE_BINDING_2D
= 0x8069,
563 LOCAL_GL_TEXTURE_INTERNAL_FORMAT
= 0x1003,
565 /* GL 1.2 texturing */
566 LOCAL_GL_PACK_SKIP_IMAGES
= 0x806B,
567 LOCAL_GL_PACK_IMAGE_HEIGHT
= 0x806C,
568 LOCAL_GL_UNPACK_SKIP_IMAGES
= 0x806D,
569 LOCAL_GL_UNPACK_IMAGE_HEIGHT
= 0x806E,
570 LOCAL_GL_TEXTURE_3D
= 0x806F,
571 LOCAL_GL_PROXY_TEXTURE_3D
= 0x8070,
572 LOCAL_GL_TEXTURE_DEPTH
= 0x8071,
573 LOCAL_GL_TEXTURE_WRAP_R
= 0x8072,
574 LOCAL_GL_MAX_3D_TEXTURE_SIZE
= 0x8073,
575 LOCAL_GL_TEXTURE_BINDING_3D
= 0x806A,
577 /* Internal texture formats (GL 1.1) */
578 LOCAL_GL_ALPHA4
= 0x803B,
579 LOCAL_GL_ALPHA8
= 0x803C,
580 LOCAL_GL_ALPHA12
= 0x803D,
581 LOCAL_GL_ALPHA16
= 0x803E,
582 LOCAL_GL_LUMINANCE4
= 0x803F,
583 LOCAL_GL_LUMINANCE8
= 0x8040,
584 LOCAL_GL_LUMINANCE12
= 0x8041,
585 LOCAL_GL_LUMINANCE16
= 0x8042,
586 LOCAL_GL_LUMINANCE4_ALPHA4
= 0x8043,
587 LOCAL_GL_LUMINANCE6_ALPHA2
= 0x8044,
588 LOCAL_GL_LUMINANCE8_ALPHA8
= 0x8045,
589 LOCAL_GL_LUMINANCE12_ALPHA4
= 0x8046,
590 LOCAL_GL_LUMINANCE12_ALPHA12
= 0x8047,
591 LOCAL_GL_LUMINANCE16_ALPHA16
= 0x8048,
592 LOCAL_GL_INTENSITY
= 0x8049,
593 LOCAL_GL_INTENSITY4
= 0x804A,
594 LOCAL_GL_INTENSITY8
= 0x804B,
595 LOCAL_GL_INTENSITY12
= 0x804C,
596 LOCAL_GL_INTENSITY16
= 0x804D,
597 LOCAL_GL_R3_G3_B2
= 0x2A10,
598 LOCAL_GL_RGB4
= 0x804F,
599 LOCAL_GL_RGB5
= 0x8050,
600 LOCAL_GL_RGB8
= 0x8051,
601 LOCAL_GL_RGB10
= 0x8052,
602 LOCAL_GL_RGB12
= 0x8053,
603 LOCAL_GL_RGB16
= 0x8054,
604 LOCAL_GL_RGBA2
= 0x8055,
605 LOCAL_GL_RGBA4
= 0x8056,
606 LOCAL_GL_RGB5_A1
= 0x8057,
607 LOCAL_GL_RGBA8
= 0x8058,
608 LOCAL_GL_RGB10_A2
= 0x8059,
609 LOCAL_GL_RGBA12
= 0x805A,
610 LOCAL_GL_RGBA16
= 0x805B,
613 LOCAL_GL_VENDOR
= 0x1F00,
614 LOCAL_GL_RENDERER
= 0x1F01,
615 LOCAL_GL_VERSION
= 0x1F02,
616 LOCAL_GL_EXTENSIONS
= 0x1F03,
619 LOCAL_GL_INVALID_VALUE
= 0x0501,
620 LOCAL_GL_INVALID_ENUM
= 0x0500,
621 LOCAL_GL_INVALID_OPERATION
= 0x0502,
622 LOCAL_GL_STACK_OVERFLOW
= 0x0503,
623 LOCAL_GL_STACK_UNDERFLOW
= 0x0504,
624 LOCAL_GL_OUT_OF_MEMORY
= 0x0505,
630 /* LOCAL_GL_EXT_blend_minmax and LOCAL_GL_EXT_blend_color */
631 LOCAL_GL_CONSTANT_COLOR_EXT
= 0x8001,
632 LOCAL_GL_ONE_MINUS_CONSTANT_COLOR_EXT
= 0x8002,
633 LOCAL_GL_CONSTANT_ALPHA_EXT
= 0x8003,
634 LOCAL_GL_ONE_MINUS_CONSTANT_ALPHA_EXT
= 0x8004,
635 LOCAL_GL_BLEND_EQUATION_EXT
= 0x8009,
636 LOCAL_GL_MIN_EXT
= 0x8007,
637 LOCAL_GL_MAX_EXT
= 0x8008,
638 LOCAL_GL_FUNC_ADD_EXT
= 0x8006,
639 LOCAL_GL_FUNC_SUBTRACT_EXT
= 0x800A,
640 LOCAL_GL_FUNC_REVERSE_SUBTRACT_EXT
= 0x800B,
641 LOCAL_GL_BLEND_COLOR_EXT
= 0x8005,
643 /* LOCAL_GL_EXT_polygon_offset */
644 LOCAL_GL_POLYGON_OFFSET_EXT
= 0x8037,
645 LOCAL_GL_POLYGON_OFFSET_FACTOR_EXT
= 0x8038,
646 LOCAL_GL_POLYGON_OFFSET_BIAS_EXT
= 0x8039,
648 /* LOCAL_GL_EXT_vertex_array */
649 LOCAL_GL_VERTEX_ARRAY_EXT
= 0x8074,
650 LOCAL_GL_NORMAL_ARRAY_EXT
= 0x8075,
651 LOCAL_GL_COLOR_ARRAY_EXT
= 0x8076,
652 LOCAL_GL_INDEX_ARRAY_EXT
= 0x8077,
653 LOCAL_GL_TEXTURE_COORD_ARRAY_EXT
= 0x8078,
654 LOCAL_GL_EDGE_FLAG_ARRAY_EXT
= 0x8079,
655 LOCAL_GL_VERTEX_ARRAY_SIZE_EXT
= 0x807A,
656 LOCAL_GL_VERTEX_ARRAY_TYPE_EXT
= 0x807B,
657 LOCAL_GL_VERTEX_ARRAY_STRIDE_EXT
= 0x807C,
658 LOCAL_GL_VERTEX_ARRAY_COUNT_EXT
= 0x807D,
659 LOCAL_GL_NORMAL_ARRAY_TYPE_EXT
= 0x807E,
660 LOCAL_GL_NORMAL_ARRAY_STRIDE_EXT
= 0x807F,
661 LOCAL_GL_NORMAL_ARRAY_COUNT_EXT
= 0x8080,
662 LOCAL_GL_COLOR_ARRAY_SIZE_EXT
= 0x8081,
663 LOCAL_GL_COLOR_ARRAY_TYPE_EXT
= 0x8082,
664 LOCAL_GL_COLOR_ARRAY_STRIDE_EXT
= 0x8083,
665 LOCAL_GL_COLOR_ARRAY_COUNT_EXT
= 0x8084,
666 LOCAL_GL_INDEX_ARRAY_TYPE_EXT
= 0x8085,
667 LOCAL_GL_INDEX_ARRAY_STRIDE_EXT
= 0x8086,
668 LOCAL_GL_INDEX_ARRAY_COUNT_EXT
= 0x8087,
669 LOCAL_GL_TEXTURE_COORD_ARRAY_SIZE_EXT
= 0x8088,
670 LOCAL_GL_TEXTURE_COORD_ARRAY_TYPE_EXT
= 0x8089,
671 LOCAL_GL_TEXTURE_COORD_ARRAY_STRIDE_EXT
= 0x808A,
672 LOCAL_GL_TEXTURE_COORD_ARRAY_COUNT_EXT
= 0x808B,
673 LOCAL_GL_EDGE_FLAG_ARRAY_STRIDE_EXT
= 0x808C,
674 LOCAL_GL_EDGE_FLAG_ARRAY_COUNT_EXT
= 0x808D,
675 LOCAL_GL_VERTEX_ARRAY_POINTER_EXT
= 0x808E,
676 LOCAL_GL_NORMAL_ARRAY_POINTER_EXT
= 0x808F,
677 LOCAL_GL_COLOR_ARRAY_POINTER_EXT
= 0x8090,
678 LOCAL_GL_INDEX_ARRAY_POINTER_EXT
= 0x8091,
679 LOCAL_GL_TEXTURE_COORD_ARRAY_POINTER_EXT
= 0x8092,
680 LOCAL_GL_EDGE_FLAG_ARRAY_POINTER_EXT
= 0x8093,
682 /* LOCAL_GL_EXT_texture_object */
683 LOCAL_GL_TEXTURE_PRIORITY_EXT
= 0x8066,
684 LOCAL_GL_TEXTURE_RESIDENT_EXT
= 0x8067,
685 LOCAL_GL_TEXTURE_1D_BINDING_EXT
= 0x8068,
686 LOCAL_GL_TEXTURE_2D_BINDING_EXT
= 0x8069,
688 /* LOCAL_GL_EXT_texture3D */
689 LOCAL_GL_PACK_SKIP_IMAGES_EXT
= 0x806B,
690 LOCAL_GL_PACK_IMAGE_HEIGHT_EXT
= 0x806C,
691 LOCAL_GL_UNPACK_SKIP_IMAGES_EXT
= 0x806D,
692 LOCAL_GL_UNPACK_IMAGE_HEIGHT_EXT
= 0x806E,
693 LOCAL_GL_TEXTURE_3D_EXT
= 0x806F,
694 LOCAL_GL_PROXY_TEXTURE_3D_EXT
= 0x8070,
695 LOCAL_GL_TEXTURE_DEPTH_EXT
= 0x8071,
696 LOCAL_GL_TEXTURE_WRAP_R_EXT
= 0x8072,
697 LOCAL_GL_MAX_3D_TEXTURE_SIZE_EXT
= 0x8073,
698 LOCAL_GL_TEXTURE_3D_BINDING_EXT
= 0x806A,
700 /* LOCAL_GL_EXT_paletted_texture */
701 LOCAL_GL_TABLE_TOO_LARGE_EXT
= 0x8031,
702 LOCAL_GL_COLOR_TABLE_FORMAT_EXT
= 0x80D8,
703 LOCAL_GL_COLOR_TABLE_WIDTH_EXT
= 0x80D9,
704 LOCAL_GL_COLOR_TABLE_RED_SIZE_EXT
= 0x80DA,
705 LOCAL_GL_COLOR_TABLE_GREEN_SIZE_EXT
= 0x80DB,
706 LOCAL_GL_COLOR_TABLE_BLUE_SIZE_EXT
= 0x80DC,
707 LOCAL_GL_COLOR_TABLE_ALPHA_SIZE_EXT
= 0x80DD,
708 LOCAL_GL_COLOR_TABLE_LUMINANCE_SIZE_EXT
= 0x80DE,
709 LOCAL_GL_COLOR_TABLE_INTENSITY_SIZE_EXT
= 0x80DF,
710 LOCAL_GL_TEXTURE_INDEX_SIZE_EXT
= 0x80ED,
711 LOCAL_GL_COLOR_INDEX1_EXT
= 0x80E2,
712 LOCAL_GL_COLOR_INDEX2_EXT
= 0x80E3,
713 LOCAL_GL_COLOR_INDEX4_EXT
= 0x80E4,
714 LOCAL_GL_COLOR_INDEX8_EXT
= 0x80E5,
715 LOCAL_GL_COLOR_INDEX12_EXT
= 0x80E6,
716 LOCAL_GL_COLOR_INDEX16_EXT
= 0x80E7,
718 /* LOCAL_GL_EXT_shared_texture_palette */
719 LOCAL_GL_SHARED_TEXTURE_PALETTE_EXT
= 0x81FB,
721 /* LOCAL_GL_EXT_point_parameters */
722 LOCAL_GL_POINT_SIZE_MIN_EXT
= 0x8126,
723 LOCAL_GL_POINT_SIZE_MAX_EXT
= 0x8127,
724 LOCAL_GL_POINT_FADE_THRESHOLD_SIZE_EXT
= 0x8128,
725 LOCAL_GL_DISTANCE_ATTENUATION_EXT
= 0x8129,
727 /* LOCAL_GL_EXT_rescale_normal */
728 LOCAL_GL_RESCALE_NORMAL_EXT
= 0x803A,
730 /* LOCAL_GL_EXT_abgr */
731 LOCAL_GL_ABGR_EXT
= 0x8000,
733 /* LOCAL_GL_SGIS_multitexture */
734 LOCAL_GL_SELECTED_TEXTURE_SGIS
= 0x835C,
735 LOCAL_GL_SELECTED_TEXTURE_COORD_SET_SGIS
= 0x835D,
736 LOCAL_GL_MAX_TEXTURES_SGIS
= 0x835E,
737 LOCAL_GL_TEXTURE0_SGIS
= 0x835F,
738 LOCAL_GL_TEXTURE1_SGIS
= 0x8360,
739 LOCAL_GL_TEXTURE2_SGIS
= 0x8361,
740 LOCAL_GL_TEXTURE3_SGIS
= 0x8362,
741 LOCAL_GL_TEXTURE_COORD_SET_SOURCE_SGIS
= 0x8363,
743 /* LOCAL_GL_EXT_multitexture */
744 LOCAL_GL_SELECTED_TEXTURE_EXT
= 0x83C0,
745 LOCAL_GL_SELECTED_TEXTURE_COORD_SET_EXT
= 0x83C1,
746 LOCAL_GL_SELECTED_TEXTURE_TRANSFORM_EXT
= 0x83C2,
747 LOCAL_GL_MAX_TEXTURES_EXT
= 0x83C3,
748 LOCAL_GL_MAX_TEXTURE_COORD_SETS_EXT
= 0x83C4,
749 LOCAL_GL_TEXTURE_ENV_COORD_SET_EXT
= 0x83C5,
750 LOCAL_GL_TEXTURE0_EXT
= 0x83C6,
751 LOCAL_GL_TEXTURE1_EXT
= 0x83C7,
752 LOCAL_GL_TEXTURE2_EXT
= 0x83C8,
753 LOCAL_GL_TEXTURE3_EXT
= 0x83C9,
755 /* LOCAL_GL_SGIS_texture_edge_clamp */
756 LOCAL_GL_CLAMP_TO_EDGE_SGIS
= 0x812F,
759 LOCAL_GL_RESCALE_NORMAL
= 0x803A,
760 LOCAL_GL_CLAMP_TO_EDGE
= 0x812F,
761 LOCAL_GL_MAX_ELEMENTS_VERTICES
= 0xF0E8,
762 LOCAL_GL_MAX_ELEMENTS_INDICES
= 0xF0E9,
763 LOCAL_GL_BGR
= 0x80E0,
764 LOCAL_GL_BGRA
= 0x80E1,
765 LOCAL_GL_UNSIGNED_BYTE_3_3_2
= 0x8032,
766 LOCAL_GL_UNSIGNED_BYTE_2_3_3_REV
= 0x8362,
767 LOCAL_GL_UNSIGNED_SHORT_5_6_5
= 0x8363,
768 LOCAL_GL_UNSIGNED_SHORT_5_6_5_REV
= 0x8364,
769 LOCAL_GL_UNSIGNED_SHORT_4_4_4_4
= 0x8033,
770 LOCAL_GL_UNSIGNED_SHORT_4_4_4_4_REV
= 0x8365,
771 LOCAL_GL_UNSIGNED_SHORT_5_5_5_1
= 0x8034,
772 LOCAL_GL_UNSIGNED_SHORT_1_5_5_5_REV
= 0x8366,
773 LOCAL_GL_UNSIGNED_INT_8_8_8_8
= 0x8035,
774 LOCAL_GL_UNSIGNED_INT_8_8_8_8_REV
= 0x8367,
775 LOCAL_GL_UNSIGNED_INT_10_10_10_2
= 0x8036,
776 LOCAL_GL_UNSIGNED_INT_2_10_10_10_REV
= 0x8368,
777 LOCAL_GL_LIGHT_MODEL_COLOR_CONTROL
= 0x81F8,
778 LOCAL_GL_SINGLE_COLOR
= 0x81F9,
779 LOCAL_GL_SEPARATE_SPECULAR_COLOR
= 0x81FA,
780 LOCAL_GL_TEXTURE_MIN_LOD
= 0x813A,
781 LOCAL_GL_TEXTURE_MAX_LOD
= 0x813B,
782 LOCAL_GL_TEXTURE_BASE_LEVEL
= 0x813C,
783 LOCAL_GL_TEXTURE_MAX_LEVEL
= 0x813D
786 typedef struct { GLenum e
; const char* name
; } ENUM
;
787 #define EDEF(VAR) { (GLenum)(LOCAL_GL_##VAR), #VAR }
789 static ENUM enums
[] =
794 EDEF(UNSIGNED_SHORT
),
808 EDEF(TRIANGLE_STRIP),
819 EDEF(TEXTURE_COORD_ARRAY
),
820 EDEF(EDGE_FLAG_ARRAY
),
821 EDEF(VERTEX_ARRAY_SIZE
),
822 EDEF(VERTEX_ARRAY_TYPE
),
823 EDEF(VERTEX_ARRAY_STRIDE
),
824 EDEF(NORMAL_ARRAY_TYPE
),
825 EDEF(NORMAL_ARRAY_STRIDE
),
826 EDEF(COLOR_ARRAY_SIZE
),
827 EDEF(COLOR_ARRAY_TYPE
),
828 EDEF(COLOR_ARRAY_STRIDE
),
829 EDEF(INDEX_ARRAY_TYPE
),
830 EDEF(INDEX_ARRAY_STRIDE
),
831 EDEF(TEXTURE_COORD_ARRAY_SIZE
),
832 EDEF(TEXTURE_COORD_ARRAY_TYPE
),
833 EDEF(TEXTURE_COORD_ARRAY_STRIDE
),
834 EDEF(EDGE_FLAG_ARRAY_STRIDE
),
835 EDEF(VERTEX_ARRAY_POINTER
),
836 EDEF(NORMAL_ARRAY_POINTER
),
837 EDEF(COLOR_ARRAY_POINTER
),
838 EDEF(INDEX_ARRAY_POINTER
),
839 EDEF(TEXTURE_COORD_ARRAY_POINTER
),
840 EDEF(EDGE_FLAG_ARRAY_POINTER
),
853 EDEF(T2F_C4F_N3F_V3F
),
854 EDEF(T4F_C4F_N3F_V4F
),
861 EDEF(POINT_SIZE_GRANULARITY
),
862 EDEF(POINT_SIZE_RANGE
),
865 EDEF(LINE_STIPPLE_PATTERN
),
866 EDEF(LINE_STIPPLE_REPEAT
),
868 EDEF(LINE_WIDTH_GRANULARITY
),
869 EDEF(LINE_WIDTH_RANGE
),
878 EDEF(CULL_FACE_MODE
),
879 EDEF(POLYGON_SMOOTH
),
880 EDEF(POLYGON_STIPPLE
),
883 EDEF(POLYGON_OFFSET_FACTOR
),
884 EDEF(POLYGON_OFFSET_UNITS
),
885 EDEF(POLYGON_OFFSET_POINT
),
886 EDEF(POLYGON_OFFSET_LINE
),
887 EDEF(POLYGON_OFFSET_FILL
),
889 EDEF(COMPILE_AND_EXECUTE
),
903 EDEF(DEPTH_CLEAR_VALUE
),
906 EDEF(DEPTH_WRITEMASK
),
907 EDEF(DEPTH_COMPONENT
),
919 EDEF(CONSTANT_ATTENUATION
),
920 EDEF(LINEAR_ATTENUATION
),
921 EDEF(QUADRATIC_ATTENUATION
),
928 EDEF(SPOT_DIRECTION
),
929 EDEF(AMBIENT_AND_DIFFUSE
),
931 EDEF(LIGHT_MODEL_TWO_SIDE
),
932 EDEF(LIGHT_MODEL_LOCAL_VIEWER
),
933 EDEF(LIGHT_MODEL_AMBIENT
),
934 EDEF(FRONT_AND_BACK
),
938 EDEF(COLOR_MATERIAL
),
939 EDEF(COLOR_MATERIAL_FACE
),
940 EDEF(COLOR_MATERIAL_PARAMETER
),
948 EDEF(ACCUM_RED_BITS
),
949 EDEF(ACCUM_GREEN_BITS
),
950 EDEF(ACCUM_BLUE_BITS
),
951 EDEF(ACCUM_ALPHA_BITS
),
952 EDEF(ACCUM_CLEAR_VALUE
),
959 EDEF(ALPHA_TEST_REF
),
960 EDEF(ALPHA_TEST_FUNC
),
967 EDEF(ONE_MINUS_SRC_COLOR
),
969 EDEF(ONE_MINUS_DST_COLOR
),
971 EDEF(ONE_MINUS_SRC_ALPHA
),
973 EDEF(ONE_MINUS_DST_ALPHA
),
974 EDEF(SRC_ALPHA_SATURATE
),
975 EDEF(CONSTANT_COLOR
),
976 EDEF(ONE_MINUS_CONSTANT_COLOR
),
977 EDEF(CONSTANT_ALPHA
),
978 EDEF(ONE_MINUS_CONSTANT_ALPHA
),
985 EDEF(3D_COLOR_TEXTURE
),
986 EDEF(4D_COLOR_TEXTURE
),
989 EDEF(LINE_RESET_TOKEN
),
992 EDEF(DRAW_PIXEL_TOKEN
),
993 EDEF(COPY_PIXEL_TOKEN
),
994 EDEF(PASS_THROUGH_TOKEN
),
995 EDEF(FEEDBACK_BUFFER_POINTER
),
996 EDEF(FEEDBACK_BUFFER_SIZE
),
997 EDEF(FEEDBACK_BUFFER_TYPE
),
998 EDEF(SELECTION_BUFFER_POINTER
),
999 EDEF(SELECTION_BUFFER_SIZE
),
1011 EDEF(INDEX_LOGIC_OP
),
1012 EDEF(COLOR_LOGIC_OP
),
1013 EDEF(LOGIC_OP_MODE
),
1017 EDEF(COPY_INVERTED
),
1031 EDEF(STENCIL_WRITEMASK
),
1034 EDEF(STENCIL_VALUE_MASK
),
1037 EDEF(STENCIL_PASS_DEPTH_PASS
),
1038 EDEF(STENCIL_PASS_DEPTH_FAIL
),
1039 EDEF(STENCIL_CLEAR_VALUE
),
1040 EDEF(STENCIL_INDEX
),
1062 EDEF(LUMINANCE_ALPHA
),
1068 EDEF(SUBPIXEL_BITS
),
1081 EDEF(MAX_LIST_NESTING
),
1082 EDEF(MAX_ATTRIB_STACK_DEPTH
),
1083 EDEF(MAX_MODELVIEW_STACK_DEPTH
),
1084 EDEF(MAX_NAME_STACK_DEPTH
),
1085 EDEF(MAX_PROJECTION_STACK_DEPTH
),
1086 EDEF(MAX_TEXTURE_STACK_DEPTH
),
1087 EDEF(MAX_EVAL_ORDER
),
1089 EDEF(MAX_CLIP_PLANES
),
1090 EDEF(MAX_TEXTURE_SIZE
),
1091 EDEF(MAX_PIXEL_MAP_TABLE
),
1092 EDEF(MAX_VIEWPORT_DIMS
),
1093 EDEF(MAX_CLIENT_ATTRIB_STACK_DEPTH
),
1094 EDEF(ATTRIB_STACK_DEPTH
),
1095 EDEF(CLIENT_ATTRIB_STACK_DEPTH
),
1096 EDEF(COLOR_CLEAR_VALUE
),
1097 EDEF(COLOR_WRITEMASK
),
1098 EDEF(CURRENT_INDEX
),
1099 EDEF(CURRENT_COLOR
),
1100 EDEF(CURRENT_NORMAL
),
1101 EDEF(CURRENT_RASTER_COLOR
),
1102 EDEF(CURRENT_RASTER_DISTANCE
),
1103 EDEF(CURRENT_RASTER_INDEX
),
1104 EDEF(CURRENT_RASTER_POSITION
),
1105 EDEF(CURRENT_RASTER_TEXTURE_COORDS
),
1106 EDEF(CURRENT_RASTER_POSITION_VALID
),
1107 EDEF(CURRENT_TEXTURE_COORDS
),
1108 EDEF(INDEX_CLEAR_VALUE
),
1110 EDEF(INDEX_WRITEMASK
),
1111 EDEF(MODELVIEW_MATRIX
),
1112 EDEF(MODELVIEW_STACK_DEPTH
),
1113 EDEF(NAME_STACK_DEPTH
),
1114 EDEF(PROJECTION_MATRIX
),
1115 EDEF(PROJECTION_STACK_DEPTH
),
1118 EDEF(TEXTURE_MATRIX
),
1119 EDEF(TEXTURE_STACK_DEPTH
),
1123 EDEF(MAP1_GRID_DOMAIN
),
1124 EDEF(MAP1_GRID_SEGMENTS
),
1127 EDEF(MAP1_TEXTURE_COORD_1
),
1128 EDEF(MAP1_TEXTURE_COORD_2
),
1129 EDEF(MAP1_TEXTURE_COORD_3
),
1130 EDEF(MAP1_TEXTURE_COORD_4
),
1131 EDEF(MAP1_VERTEX_3
),
1132 EDEF(MAP1_VERTEX_4
),
1134 EDEF(MAP2_GRID_DOMAIN
),
1135 EDEF(MAP2_GRID_SEGMENTS
),
1138 EDEF(MAP2_TEXTURE_COORD_1
),
1139 EDEF(MAP2_TEXTURE_COORD_2
),
1140 EDEF(MAP2_TEXTURE_COORD_3
),
1141 EDEF(MAP2_TEXTURE_COORD_4
),
1142 EDEF(MAP2_VERTEX_3
),
1143 EDEF(MAP2_VERTEX_4
),
1148 EDEF(LINE_SMOOTH_HINT
),
1149 EDEF(PERSPECTIVE_CORRECTION_HINT
),
1150 EDEF(POINT_SMOOTH_HINT
),
1151 EDEF(POLYGON_SMOOTH_HINT
),
1171 EDEF(PIXEL_MAP_S_TO_S_SIZE
),
1172 EDEF(PIXEL_MAP_I_TO_I_SIZE
),
1173 EDEF(PIXEL_MAP_I_TO_R_SIZE
),
1174 EDEF(PIXEL_MAP_I_TO_G_SIZE
),
1175 EDEF(PIXEL_MAP_I_TO_B_SIZE
),
1176 EDEF(PIXEL_MAP_I_TO_A_SIZE
),
1177 EDEF(PIXEL_MAP_R_TO_R_SIZE
),
1178 EDEF(PIXEL_MAP_G_TO_G_SIZE
),
1179 EDEF(PIXEL_MAP_B_TO_B_SIZE
),
1180 EDEF(PIXEL_MAP_A_TO_A_SIZE
),
1181 EDEF(PIXEL_MAP_S_TO_S
),
1182 EDEF(PIXEL_MAP_I_TO_I
),
1183 EDEF(PIXEL_MAP_I_TO_R
),
1184 EDEF(PIXEL_MAP_I_TO_G
),
1185 EDEF(PIXEL_MAP_I_TO_B
),
1186 EDEF(PIXEL_MAP_I_TO_A
),
1187 EDEF(PIXEL_MAP_R_TO_R
),
1188 EDEF(PIXEL_MAP_G_TO_G
),
1189 EDEF(PIXEL_MAP_B_TO_B
),
1190 EDEF(PIXEL_MAP_A_TO_A
),
1191 EDEF(PACK_ALIGNMENT
),
1192 EDEF(PACK_LSB_FIRST
),
1193 EDEF(PACK_ROW_LENGTH
),
1194 EDEF(PACK_SKIP_PIXELS
),
1195 EDEF(PACK_SKIP_ROWS
),
1196 EDEF(PACK_SWAP_BYTES
),
1197 EDEF(UNPACK_ALIGNMENT
),
1198 EDEF(UNPACK_LSB_FIRST
),
1199 EDEF(UNPACK_ROW_LENGTH
),
1200 EDEF(UNPACK_SKIP_PIXELS
),
1201 EDEF(UNPACK_SKIP_ROWS
),
1202 EDEF(UNPACK_SWAP_BYTES
),
1206 EDEF(TEXTURE_ENV_MODE
),
1209 EDEF(TEXTURE_WRAP_S
),
1210 EDEF(TEXTURE_WRAP_T
),
1211 EDEF(TEXTURE_MAG_FILTER
),
1212 EDEF(TEXTURE_MIN_FILTER
),
1213 EDEF(TEXTURE_ENV_COLOR
),
1214 EDEF(TEXTURE_GEN_S
),
1215 EDEF(TEXTURE_GEN_T
),
1216 EDEF(TEXTURE_GEN_MODE
),
1217 EDEF(TEXTURE_BORDER_COLOR
),
1218 EDEF(TEXTURE_WIDTH
),
1219 EDEF(TEXTURE_HEIGHT
),
1220 EDEF(TEXTURE_BORDER
),
1221 EDEF(TEXTURE_COMPONENTS
),
1222 EDEF(TEXTURE_RED_SIZE
),
1223 EDEF(TEXTURE_GREEN_SIZE
),
1224 EDEF(TEXTURE_BLUE_SIZE
),
1225 EDEF(TEXTURE_ALPHA_SIZE
),
1226 EDEF(TEXTURE_LUMINANCE_SIZE
),
1227 EDEF(TEXTURE_INTENSITY_SIZE
),
1228 EDEF(NEAREST_MIPMAP_NEAREST
),
1229 EDEF(NEAREST_MIPMAP_LINEAR
),
1230 EDEF(LINEAR_MIPMAP_NEAREST
),
1231 EDEF(LINEAR_MIPMAP_LINEAR
),
1232 EDEF(OBJECT_LINEAR
),
1246 EDEF(TEXTURE_GEN_R
),
1247 EDEF(TEXTURE_GEN_Q
),
1248 EDEF(PROXY_TEXTURE_1D
),
1249 EDEF(PROXY_TEXTURE_2D
),
1250 EDEF(TEXTURE_PRIORITY
),
1251 EDEF(TEXTURE_RESIDENT
),
1252 EDEF(TEXTURE_BINDING_1D
),
1253 EDEF(TEXTURE_BINDING_2D
),
1254 EDEF(TEXTURE_INTERNAL_FORMAT
),
1255 EDEF(PACK_SKIP_IMAGES
),
1256 EDEF(PACK_IMAGE_HEIGHT
),
1257 EDEF(UNPACK_SKIP_IMAGES
),
1258 EDEF(UNPACK_IMAGE_HEIGHT
),
1260 EDEF(PROXY_TEXTURE_3D
),
1261 EDEF(TEXTURE_DEPTH
),
1262 EDEF(TEXTURE_WRAP_R
),
1263 EDEF(MAX_3D_TEXTURE_SIZE
),
1264 EDEF(TEXTURE_BINDING_3D
),
1273 EDEF(LUMINANCE4_ALPHA4
),
1274 EDEF(LUMINANCE6_ALPHA2
),
1275 EDEF(LUMINANCE8_ALPHA8
),
1276 EDEF(LUMINANCE12_ALPHA4
),
1277 EDEF(LUMINANCE12_ALPHA12
),
1278 EDEF(LUMINANCE16_ALPHA16
),
1302 EDEF(INVALID_VALUE
),
1304 EDEF(INVALID_OPERATION
),
1305 EDEF(STACK_OVERFLOW
),
1306 EDEF(STACK_UNDERFLOW
),
1307 EDEF(OUT_OF_MEMORY
),
1310 EDEF(CONSTANT_COLOR_EXT
),
1311 EDEF(ONE_MINUS_CONSTANT_COLOR_EXT
),
1312 EDEF(CONSTANT_ALPHA_EXT
),
1313 EDEF(ONE_MINUS_CONSTANT_ALPHA_EXT
),
1314 EDEF(BLEND_EQUATION_EXT
),
1318 EDEF(FUNC_SUBTRACT_EXT
),
1319 EDEF(FUNC_REVERSE_SUBTRACT_EXT
),
1320 EDEF(BLEND_COLOR_EXT
),
1321 EDEF(POLYGON_OFFSET_EXT
),
1322 EDEF(POLYGON_OFFSET_FACTOR_EXT
),
1323 EDEF(POLYGON_OFFSET_BIAS_EXT
),
1324 EDEF(VERTEX_ARRAY_EXT
),
1325 EDEF(NORMAL_ARRAY_EXT
),
1326 EDEF(COLOR_ARRAY_EXT
),
1327 EDEF(INDEX_ARRAY_EXT
),
1328 EDEF(TEXTURE_COORD_ARRAY_EXT
),
1329 EDEF(EDGE_FLAG_ARRAY_EXT
),
1330 EDEF(VERTEX_ARRAY_SIZE_EXT
),
1331 EDEF(VERTEX_ARRAY_TYPE_EXT
),
1332 EDEF(VERTEX_ARRAY_STRIDE_EXT
),
1333 EDEF(VERTEX_ARRAY_COUNT_EXT
),
1334 EDEF(NORMAL_ARRAY_TYPE_EXT
),
1335 EDEF(NORMAL_ARRAY_STRIDE_EXT
),
1336 EDEF(NORMAL_ARRAY_COUNT_EXT
),
1337 EDEF(COLOR_ARRAY_SIZE_EXT
),
1338 EDEF(COLOR_ARRAY_TYPE_EXT
),
1339 EDEF(COLOR_ARRAY_STRIDE_EXT
),
1340 EDEF(COLOR_ARRAY_COUNT_EXT
),
1341 EDEF(INDEX_ARRAY_TYPE_EXT
),
1342 EDEF(INDEX_ARRAY_STRIDE_EXT
),
1343 EDEF(INDEX_ARRAY_COUNT_EXT
),
1344 EDEF(TEXTURE_COORD_ARRAY_SIZE_EXT
),
1345 EDEF(TEXTURE_COORD_ARRAY_TYPE_EXT
),
1346 EDEF(TEXTURE_COORD_ARRAY_STRIDE_EXT
),
1347 EDEF(TEXTURE_COORD_ARRAY_COUNT_EXT
),
1348 EDEF(EDGE_FLAG_ARRAY_STRIDE_EXT
),
1349 EDEF(EDGE_FLAG_ARRAY_COUNT_EXT
),
1350 EDEF(VERTEX_ARRAY_POINTER_EXT
),
1351 EDEF(NORMAL_ARRAY_POINTER_EXT
),
1352 EDEF(COLOR_ARRAY_POINTER_EXT
),
1353 EDEF(INDEX_ARRAY_POINTER_EXT
),
1354 EDEF(TEXTURE_COORD_ARRAY_POINTER_EXT
),
1355 EDEF(EDGE_FLAG_ARRAY_POINTER_EXT
),
1356 EDEF(TEXTURE_PRIORITY_EXT
),
1357 EDEF(TEXTURE_RESIDENT_EXT
),
1358 EDEF(TEXTURE_1D_BINDING_EXT
),
1359 EDEF(TEXTURE_2D_BINDING_EXT
),
1360 EDEF(PACK_SKIP_IMAGES_EXT
),
1361 EDEF(PACK_IMAGE_HEIGHT_EXT
),
1362 EDEF(UNPACK_SKIP_IMAGES_EXT
),
1363 EDEF(UNPACK_IMAGE_HEIGHT_EXT
),
1364 EDEF(TEXTURE_3D_EXT
),
1365 EDEF(PROXY_TEXTURE_3D_EXT
),
1366 EDEF(TEXTURE_DEPTH_EXT
),
1367 EDEF(TEXTURE_WRAP_R_EXT
),
1368 EDEF(MAX_3D_TEXTURE_SIZE_EXT
),
1369 EDEF(TEXTURE_3D_BINDING_EXT
),
1370 EDEF(TABLE_TOO_LARGE_EXT
),
1371 EDEF(COLOR_TABLE_FORMAT_EXT
),
1372 EDEF(COLOR_TABLE_WIDTH_EXT
),
1373 EDEF(COLOR_TABLE_RED_SIZE_EXT
),
1374 EDEF(COLOR_TABLE_GREEN_SIZE_EXT
),
1375 EDEF(COLOR_TABLE_BLUE_SIZE_EXT
),
1376 EDEF(COLOR_TABLE_ALPHA_SIZE_EXT
),
1377 EDEF(COLOR_TABLE_LUMINANCE_SIZE_EXT
),
1378 EDEF(COLOR_TABLE_INTENSITY_SIZE_EXT
),
1379 EDEF(TEXTURE_INDEX_SIZE_EXT
),
1380 EDEF(COLOR_INDEX1_EXT
),
1381 EDEF(COLOR_INDEX2_EXT
),
1382 EDEF(COLOR_INDEX4_EXT
),
1383 EDEF(COLOR_INDEX8_EXT
),
1384 EDEF(COLOR_INDEX12_EXT
),
1385 EDEF(COLOR_INDEX16_EXT
),
1386 EDEF(SHARED_TEXTURE_PALETTE_EXT
),
1387 EDEF(POINT_SIZE_MIN_EXT
),
1388 EDEF(POINT_SIZE_MAX_EXT
),
1389 EDEF(POINT_FADE_THRESHOLD_SIZE_EXT
),
1390 EDEF(DISTANCE_ATTENUATION_EXT
),
1391 EDEF(RESCALE_NORMAL_EXT
),
1393 EDEF(SELECTED_TEXTURE_SGIS
),
1394 EDEF(SELECTED_TEXTURE_COORD_SET_SGIS
),
1395 EDEF(MAX_TEXTURES_SGIS
),
1396 EDEF(TEXTURE0_SGIS
),
1397 EDEF(TEXTURE1_SGIS
),
1398 EDEF(TEXTURE2_SGIS
),
1399 EDEF(TEXTURE3_SGIS
),
1400 EDEF(TEXTURE_COORD_SET_SOURCE_SGIS
),
1401 EDEF(SELECTED_TEXTURE_EXT
),
1402 EDEF(SELECTED_TEXTURE_COORD_SET_EXT
),
1403 EDEF(SELECTED_TEXTURE_TRANSFORM_EXT
),
1404 EDEF(MAX_TEXTURES_EXT
),
1405 EDEF(MAX_TEXTURE_COORD_SETS_EXT
),
1406 EDEF(TEXTURE_ENV_COORD_SET_EXT
),
1411 EDEF(CLAMP_TO_EDGE_SGIS
),
1412 EDEF(RESCALE_NORMAL
),
1413 EDEF(CLAMP_TO_EDGE
),
1414 EDEF(MAX_ELEMENTS_VERTICES
),
1415 EDEF(MAX_ELEMENTS_INDICES
),
1418 EDEF(UNSIGNED_BYTE_3_3_2
),
1419 EDEF(UNSIGNED_BYTE_2_3_3_REV
),
1420 EDEF(UNSIGNED_SHORT_5_6_5
),
1421 EDEF(UNSIGNED_SHORT_5_6_5_REV
),
1422 EDEF(UNSIGNED_SHORT_4_4_4_4
),
1423 EDEF(UNSIGNED_SHORT_4_4_4_4_REV
),
1424 EDEF(UNSIGNED_SHORT_5_5_5_1
),
1425 EDEF(UNSIGNED_SHORT_1_5_5_5_REV
),
1426 EDEF(UNSIGNED_INT_8_8_8_8
),
1427 EDEF(UNSIGNED_INT_8_8_8_8_REV
),
1428 EDEF(UNSIGNED_INT_10_10_10_2
),
1429 EDEF(UNSIGNED_INT_2_10_10_10_REV
),
1430 EDEF(LIGHT_MODEL_COLOR_CONTROL
),
1432 EDEF(SEPARATE_SPECULAR_COLOR
),
1433 EDEF(TEXTURE_MIN_LOD
),
1434 EDEF(TEXTURE_MAX_LOD
),
1435 EDEF(TEXTURE_BASE_LEVEL
),
1436 EDEF(TEXTURE_MAX_LEVEL
)
1441 #define N_ENUMS (sizeof(enums) / sizeof(ENUM))
1443 /***************************************************************************/
1445 static void print_enum_name( FILE* OUT
, GLenum e
)
1448 for( i
= 0; i
< N_ENUMS
; ++i
)
1450 if( enums
[i
].e
== e
)
1453 fprintf( OUT
, "/" );
1455 fprintf( OUT
, "%s", enums
[i
].name
);
1459 fprintf( OUT
, "*UNKNOWN* [%04x]", (int)e
);
1460 fprintf( OUT
, "\n" );
1463 #define BOOL_STRING(b) (b ? "true" : "false")
1465 #define VAR_ENUM(VAR) \
1468 glGetIntegerv(GL_##VAR,&e); \
1469 fprintf( OUT, "%s: ", #VAR ); \
1470 print_enum_name( OUT, (GLenum) e ); \
1473 #define VAR_FLOAT4(VAR) \
1476 f[0]= f[1]= f[2]= f[3]= 0.0; \
1477 glGetFloatv(GL_##VAR,f); \
1478 fprintf( OUT, "%s: [%f %f %f %f]\n", \
1479 #VAR, f[0], f[1], f[2], f[3] ); \
1482 #define VAR_MAT_FLOAT4(VAR) \
1485 f[0]= f[1]= f[2]= f[3]= 0.0; \
1486 glGetMaterialfv(GL_FRONT,GL_##VAR,f); \
1487 fprintf( OUT, "FRONT_%s: [%f %f %f %f]\n", \
1488 #VAR, f[0], f[1], f[2], f[3] ); \
1489 glGetMaterialfv(GL_BACK,GL_##VAR,f); \
1490 fprintf( OUT, " BACK_%s: [%f %f %f %f]\n", \
1491 #VAR, f[0], f[1], f[2], f[3] ); \
1494 #define VAR_LIGHT_FLOAT4(LIGHT,VAR) \
1497 f[0]= f[1]= f[2]= f[3]= 0.0; \
1498 glGetLightfv(GL_LIGHT0+LIGHT,GL_##VAR,f); \
1499 fprintf( OUT, "LIGHT%d.%s: [%f %f %f %f]\n", \
1500 LIGHT, #VAR, f[0], f[1], f[2], f[3] ); \
1503 #define VAR_LIGHT_FLOAT3(LIGHT,VAR) \
1506 f[0]= f[1]= f[2]= 0.0; \
1507 glGetLightfv(GL_LIGHT0+LIGHT,GL_##VAR,f); \
1508 fprintf( OUT, "LIGHT%d.%s: [%f %f %f]\n", \
1509 LIGHT, #VAR, f[0], f[1], f[2] ); \
1512 #define VAR_FLOAT3(VAR) \
1515 f[0]= f[1]= f[2]= 0.0; \
1516 glGetFloatv(GL_##VAR,f) ; \
1517 fprintf( OUT, "%s: [%f %f %f]\n", \
1518 #VAR, f[0], f[1], f[2] ); \
1520 #define VAR_FLOAT2(VAR) \
1524 glGetFloatv(GL_##VAR,f); \
1525 fprintf( OUT, "%s: [%f %f]\n", \
1526 #VAR, f[0], f[1] ); \
1529 #define VAR_COLOR(VAR) VAR_FLOAT4(VAR)
1530 #define VAR_TEXCOORD(VAR) VAR_FLOAT4(VAR)
1531 #define VAR_NORMAL(VAR) VAR_FLOAT3(VAR)
1533 #define VAR_MAT_COLOR(VAR) VAR_MAT_FLOAT4(VAR)
1534 #define VAR_LIGHT_COLOR(LIGHT,VAR) VAR_LIGHT_FLOAT4(LIGHT,VAR)
1536 #define VAR_FLOAT(VAR) \
1539 glGetFloatv(GL_##VAR,&f); \
1540 fprintf( OUT, "%s: %f\n", #VAR, f ); \
1543 #define VAR_MAT_FLOAT(VAR) \
1546 glGetMaterialfv(GL_FRONT,GL_##VAR,&f); \
1547 fprintf( OUT, "FRONT_%s: %f\n", #VAR, f ); \
1548 glGetMaterialfv(GL_BACK,GL_##VAR,&f); \
1549 fprintf( OUT, " BACK_%s: %f\n", #VAR, f ); \
1552 #define VAR_LIGHT_FLOAT(LIGHT,VAR) \
1555 glGetLightfv(GL_LIGHT0+LIGHT,GL_##VAR,&f); \
1556 fprintf( OUT, "LIGHT%d.%s: %f\n", \
1560 #define VAR_INT(VAR) \
1563 glGetIntegerv(GL_##VAR,&i); \
1564 fprintf( OUT, "%s: %d\n", #VAR, (int)i ); \
1566 #define VAR_INTEGER(VAR) VAR_INT(VAR)
1567 #define VAR_INDEX(VAR) VAR_INT(VAR)
1568 #define VAR_HEXINT(VAR) \
1571 glGetIntegerv(GL_##VAR,&i); \
1572 fprintf( OUT, "%s: 0x%04x\n", #VAR, (int)i ); \
1574 #define VAR_INT4(VAR) \
1577 i[0]= i[1]= i[2]= i[3]= 0; \
1578 glGetIntegerv(GL_##VAR,i); \
1579 fprintf( OUT, "%s: [%d %d %d %d]\n", \
1580 #VAR, (int)i[0], (int)i[1], (int)i[2], (int)i[3] ); \
1582 #define VAR_BOOL(VAR) \
1585 glGetBooleanv(GL_##VAR,&b); \
1586 fprintf( OUT, "%s: %s\n", #VAR, BOOL_STRING(b) ); \
1588 #define VAR_BOOL4(VAR) \
1591 b[0]= b[1]= b[2]= b[3]= 0; \
1592 glGetBooleanv(GL_##VAR,b); \
1593 fprintf( OUT, "%s: [%s %s %s %s]\n", \
1595 BOOL_STRING(b[0]), \
1596 BOOL_STRING(b[1]), \
1597 BOOL_STRING(b[2]), \
1598 BOOL_STRING(b[3]) ); \
1600 #define VAR_PTR(VAR) \
1603 glGetPointerv(GL_##VAR,&p); \
1604 fprintf( OUT, "%s: %p\n", #VAR, p ); \
1606 #define VAR_MATRIX(VAR) \
1610 for( i= 0; i < 16; ++i ) m[i]= 0.0; \
1611 glGetFloatv(GL_##VAR,m); \
1613 "%s:\n\t[%+.6f %+.6f %+.6f %+.6f]\n\t[%+.6f %+.6f %+.6f
1614 %+.6f]\n\t[%+.6f %+.6f %+.6f %+.6f]\n\t[%+.6f %+.6f %+.6f %+.6f]\n", \
1616 m[0+0*4], m[0+1*4], m[0+2*4], m[0+3*4], \
1617 m[1+0*4], m[1+1*4], m[1+2*4], m[1+3*4], \
1618 m[2+0*4], m[2+1*4], m[2+2*4], m[2+3*4], \
1619 m[3+0*4], m[3+1*4], m[3+2*4], m[3+3*4] ); \
1622 /***************************************************************************/
1627 void dump_opengl_state( FILE* OUT
)
1632 glGetIntegerv( GL_MAX_LIGHTS
, &n_lights
);
1634 VAR_COLOR(CURRENT_COLOR
)
1635 VAR_INDEX(CURRENT_INDEX
)
1636 VAR_TEXCOORD(CURRENT_TEXTURE_COORDS
)
1637 VAR_NORMAL(CURRENT_NORMAL
)
1638 VAR_FLOAT4(CURRENT_RASTER_POSITION
)
1639 VAR_FLOAT(CURRENT_RASTER_DISTANCE
)
1640 VAR_COLOR(CURRENT_RASTER_COLOR
)
1641 VAR_INDEX(CURRENT_RASTER_INDEX
)
1642 VAR_TEXCOORD(CURRENT_RASTER_TEXTURE_COORDS
)
1643 VAR_BOOL(CURRENT_RASTER_POSITION_VALID
)
1646 VAR_BOOL (VERTEX_ARRAY
)
1647 VAR_INTEGER(VERTEX_ARRAY_SIZE
)
1648 VAR_ENUM (VERTEX_ARRAY_TYPE
)
1649 VAR_INTEGER(VERTEX_ARRAY_STRIDE
)
1650 VAR_PTR (VERTEX_ARRAY_POINTER
)
1652 VAR_BOOL (NORMAL_ARRAY
)
1653 VAR_ENUM (NORMAL_ARRAY_TYPE
)
1654 VAR_INTEGER(NORMAL_ARRAY_STRIDE
)
1655 VAR_PTR (NORMAL_ARRAY_POINTER
)
1657 VAR_BOOL (COLOR_ARRAY
)
1658 VAR_INTEGER(COLOR_ARRAY_SIZE
)
1659 VAR_ENUM (COLOR_ARRAY_TYPE
)
1660 VAR_INTEGER(COLOR_ARRAY_STRIDE
)
1661 VAR_PTR (COLOR_ARRAY_POINTER
)
1663 VAR_BOOL (INDEX_ARRAY
)
1664 VAR_ENUM (INDEX_ARRAY_TYPE
)
1665 VAR_INTEGER(INDEX_ARRAY_STRIDE
)
1666 VAR_PTR (INDEX_ARRAY_POINTER
)
1668 VAR_BOOL (TEXTURE_COORD_ARRAY
)
1669 VAR_INTEGER(TEXTURE_COORD_ARRAY_SIZE
)
1670 VAR_ENUM (TEXTURE_COORD_ARRAY_TYPE
)
1671 VAR_INTEGER(TEXTURE_COORD_ARRAY_STRIDE
)
1672 VAR_PTR (TEXTURE_COORD_ARRAY_POINTER
)
1674 VAR_BOOL (EDGE_FLAG_ARRAY
)
1675 VAR_INTEGER(EDGE_FLAG_ARRAY_STRIDE
)
1676 VAR_PTR (EDGE_FLAG_ARRAY_POINTER
)
1678 VAR_MATRIX(MODELVIEW_MATRIX
)
1679 VAR_MATRIX(PROJECTION_MATRIX
)
1680 VAR_MATRIX(TEXTURE_MATRIX
)
1682 VAR_FLOAT2(DEPTH_RANGE
)
1683 VAR_INT(MODELVIEW_STACK_DEPTH
)
1684 VAR_INT(PROJECTION_STACK_DEPTH
)
1685 VAR_INT(TEXTURE_STACK_DEPTH
)
1686 VAR_ENUM(MATRIX_MODE
)
1688 VAR_BOOL(RESCALE_NORMAL_EXT
)
1689 VAR_BOOL(CLIP_PLANE0
)
1690 VAR_BOOL(CLIP_PLANE1
)
1691 VAR_BOOL(CLIP_PLANE2
)
1692 VAR_BOOL(CLIP_PLANE3
)
1693 VAR_BOOL(CLIP_PLANE4
)
1694 VAR_BOOL(CLIP_PLANE5
)
1695 /* + glGetClipPlane() */
1697 VAR_COLOR(FOG_COLOR
)
1698 VAR_INDEX(FOG_INDEX
)
1699 VAR_FLOAT(FOG_DENSITY
)
1700 VAR_FLOAT(FOG_START
)
1704 VAR_ENUM(SHADE_MODEL
)
1707 VAR_BOOL(COLOR_MATERIAL
)
1708 VAR_ENUM(COLOR_MATERIAL_PARAMETER
)
1709 VAR_ENUM(COLOR_MATERIAL_FACE
)
1711 VAR_MAT_COLOR(AMBIENT
)
1712 VAR_MAT_COLOR(DIFFUSE
)
1713 VAR_MAT_COLOR(SPECULAR
)
1714 VAR_MAT_COLOR(EMISSION
)
1715 VAR_MAT_FLOAT(SHININESS
)
1717 VAR_COLOR(LIGHT_MODEL_AMBIENT
)
1718 VAR_BOOL(LIGHT_MODEL_LOCAL_VIEWER
)
1719 VAR_BOOL(LIGHT_MODEL_TWO_SIDE
)
1720 /* VAR_ENUM(LIGHT_MODEL_COLOR_CONTROL)*/
1722 for( i
= 0; i
< n_lights
; ++i
)
1726 glGetBooleanv( GL_LIGHT0
+ i
, &b
);
1727 fprintf( OUT
, "LIGHT%d: %s\n", i
, BOOL_STRING(b
) );
1732 VAR_LIGHT_COLOR(i
,AMBIENT
)
1733 VAR_LIGHT_COLOR(i
,DIFFUSE
)
1734 VAR_LIGHT_COLOR(i
,SPECULAR
)
1735 VAR_LIGHT_FLOAT4(i
,POSITION
)
1736 VAR_LIGHT_FLOAT(i
,CONSTANT_ATTENUATION
)
1737 VAR_LIGHT_FLOAT(i
,LINEAR_ATTENUATION
)
1738 VAR_LIGHT_FLOAT(i
,QUADRATIC_ATTENUATION
)
1739 VAR_LIGHT_FLOAT3(i
,SPOT_DIRECTION
)
1740 VAR_LIGHT_FLOAT(i
,SPOT_EXPONENT
)
1741 VAR_LIGHT_FLOAT(i
,SPOT_CUTOFF
)
1745 VAR_FLOAT(POINT_SIZE
)
1746 VAR_BOOL(POINT_SMOOTH
)
1747 VAR_FLOAT(LINE_WIDTH
)
1748 VAR_BOOL(LINE_SMOOTH
)
1749 VAR_HEXINT(LINE_STIPPLE_PATTERN
)
1750 VAR_INT(LINE_STIPPLE_REPEAT
)
1751 VAR_BOOL(LINE_STIPPLE
)
1753 VAR_ENUM(CULL_FACE_MODE
)
1754 VAR_ENUM(FRONT_FACE
)
1755 VAR_BOOL(POLYGON_SMOOTH
)
1756 VAR_ENUM(POLYGON_MODE
)
1757 VAR_FLOAT(POLYGON_OFFSET_FACTOR
)
1758 VAR_FLOAT(POLYGON_OFFSET_UNITS
)
1759 VAR_BOOL(POLYGON_OFFSET_POINT
)
1760 VAR_BOOL(POLYGON_OFFSET_LINE
)
1761 VAR_BOOL(POLYGON_OFFSET_FILL
)
1762 /* GetPolygonStipple */
1763 VAR_BOOL(POLYGON_STIPPLE
)
1765 VAR_BOOL(TEXTURE_1D
)
1766 VAR_BOOL(TEXTURE_2D
)
1767 /* VAR_BOOL(TEXTURE_3D)*/
1769 VAR_INT(TEXTURE_BINDING_1D
)
1770 VAR_INT(TEXTURE_BINDING_2D
)
1771 /* VAR_INT(TEXTURE_BINDING_3D)*/
1774 /* GetTexLevelParameter() */
1777 VAR_BOOL(TEXTURE_GEN_S
)
1778 VAR_BOOL(TEXTURE_GEN_T
)
1779 VAR_BOOL(TEXTURE_GEN_R
)
1780 VAR_BOOL(TEXTURE_GEN_Q
)
1784 VAR_BOOL(SCISSOR_TEST
)
1785 VAR_INT4(SCISSOR_BOX
)
1786 VAR_BOOL(ALPHA_TEST
)
1787 VAR_ENUM(ALPHA_TEST_FUNC
)
1788 VAR_FLOAT(ALPHA_TEST_REF
)
1789 VAR_BOOL(STENCIL_TEST
)
1790 VAR_ENUM(STENCIL_FUNC
)
1791 VAR_HEXINT(STENCIL_VALUE_MASK
)
1792 VAR_INT(STENCIL_REF
)
1793 VAR_ENUM(STENCIL_FAIL
)
1794 VAR_ENUM(STENCIL_PASS_DEPTH_FAIL
)
1795 VAR_ENUM(STENCIL_PASS_DEPTH_PASS
)
1796 VAR_BOOL(DEPTH_TEST
)
1797 VAR_ENUM(DEPTH_FUNC
)
1803 VAR_BOOL(LOGIC_OP
) /* INDEX_LOGIC_OP */
1804 VAR_BOOL(COLOR_LOGIC_OP
)
1806 VAR_ENUM(DRAW_BUFFER
)
1807 VAR_INT(INDEX_WRITEMASK
)
1808 VAR_BOOL4(COLOR_WRITEMASK
)
1809 VAR_BOOL(DEPTH_WRITEMASK
)
1810 VAR_HEXINT(STENCIL_WRITEMASK
)
1811 VAR_COLOR(COLOR_CLEAR_VALUE
)
1812 VAR_INDEX(INDEX_CLEAR_VALUE
)
1813 VAR_FLOAT(DEPTH_CLEAR_VALUE
)
1814 VAR_INT(STENCIL_CLEAR_VALUE
)
1815 VAR_FLOAT(ACCUM_CLEAR_VALUE
)
1817 VAR_BOOL(UNPACK_SWAP_BYTES
)
1818 VAR_BOOL(UNPACK_LSB_FIRST
)
1819 #ifdef UNPACK_IMAGE_HEIGHT
1820 VAR_INT(UNPACK_IMAGE_HEIGHT
)
1822 #ifdef UNPACK_SKIP_IMAGES
1823 VAR_INT(UNPACK_SKIP_IMAGES
)
1825 VAR_INT(UNPACK_ROW_LENGTH
)
1826 VAR_INT(UNPACK_SKIP_ROWS
)
1827 VAR_INT(UNPACK_SKIP_PIXELS
)
1828 VAR_INT(UNPACK_ALIGNMENT
)
1830 VAR_BOOL(PACK_SWAP_BYTES
)
1831 VAR_BOOL(PACK_LSB_FIRST
)
1832 #ifdef PACK_IMAGE_HEIGHT
1833 VAR_INT(PACK_IMAGE_HEIGHT
)
1835 #ifdef PACK_SKIP_IMAGES
1836 VAR_INT(PACK_SKIP_IMAGES
)
1838 VAR_INT(PACK_ROW_LENGTH
)
1839 VAR_INT(PACK_SKIP_ROWS
)
1840 VAR_INT(PACK_SKIP_PIXELS
)
1841 VAR_INT(PACK_ALIGNMENT
)
1844 VAR_BOOL(MAP_STENCIL
)
1845 VAR_INT(INDEX_SHIFT
)
1846 VAR_INT(INDEX_OFFSET
)
1847 VAR_FLOAT(RED_SCALE
)
1848 VAR_FLOAT(GREEN_SCALE
)
1849 VAR_FLOAT(BLUE_SCALE
)
1850 VAR_FLOAT(ALPHA_SCALE
)
1851 VAR_FLOAT(DEPTH_SCALE
)
1853 VAR_FLOAT(GREEN_BIAS
)
1854 VAR_FLOAT(BLUE_BIAS
)
1855 VAR_FLOAT(ALPHA_BIAS
)
1856 VAR_FLOAT(DEPTH_BIAS
)
1861 VAR_ENUM(READ_BUFFER
)
1863 VAR_BOOL(AUTO_NORMAL
)
1865 VAR_ENUM(PERSPECTIVE_CORRECTION_HINT
)
1866 VAR_ENUM(POINT_SMOOTH_HINT
)
1867 VAR_ENUM(LINE_SMOOTH_HINT
)
1868 VAR_ENUM(POLYGON_SMOOTH_HINT
)
1872 VAR_INT(MAX_CLIP_PLANES
)
1873 VAR_INT(MAX_MODELVIEW_STACK_DEPTH
)
1874 VAR_INT(MAX_PROJECTION_STACK_DEPTH
)
1875 VAR_INT(MAX_TEXTURE_STACK_DEPTH
)
1876 VAR_INT(SUBPIXEL_BITS
)
1877 #ifdef GL_MAX_3D_TEXTURE_SIZE
1878 VAR_INT(MAX_3D_TEXTURE_SIZE
)
1880 VAR_INT(MAX_TEXTURE_SIZE
)
1881 VAR_INT(MAX_PIXEL_MAP_TABLE
)
1882 VAR_INT(MAX_NAME_STACK_DEPTH
)
1883 VAR_INT(MAX_LIST_NESTING
)
1884 VAR_INT(MAX_EVAL_ORDER
)
1885 VAR_INT(MAX_VIEWPORT_DIMS
)
1886 VAR_INT(MAX_ATTRIB_STACK_DEPTH
)
1887 VAR_INT(MAX_CLIENT_ATTRIB_STACK_DEPTH
)
1888 VAR_INT(AUX_BUFFERS
)
1890 VAR_BOOL(INDEX_MODE
)
1891 VAR_BOOL(DOUBLEBUFFER
)
1893 #ifdef GL_ALIASED_POINT_SIZE_RANGE
1894 VAR_FLOAT2(ALIASED_POINT_SIZE_RANGE
)
1896 #ifdef GL_POINT_SIZE_RANGE
1897 VAR_FLOAT2(POINT_SIZE_RANGE
) /* SMOOTH_POINT_SIZE_RANGE */
1899 VAR_FLOAT(POINT_SIZE_GRANULARITY
) /* SMOOTH_POINT_SIZE_GRANULARITY */
1900 #ifdef GL_ALIASED_LINE_WIDTH_RANGE
1901 VAR_FLOAT2(ALIASED_LINE_WIDTH_RANGE
)
1903 VAR_FLOAT2(LINE_WIDTH_RANGE
) /* SMOOTH_LINE_WIDTH_RANGE */
1904 VAR_FLOAT(LINE_WIDTH_GRANULARITY
) /* SMOOTH_LINE_WIDTH_GRANULARITY */
1906 #ifdef GL_MAX_ELEMENTS_INDICES
1907 VAR_INT(MAX_ELEMENTS_INDICES
)
1909 #ifdef GL_MAX_ELEMENTS_VERTICES
1910 VAR_INT(MAX_ELEMENTS_VERTICES
)
1918 VAR_INT(STENCIL_BITS
)
1919 VAR_INT(ACCUM_RED_BITS
)
1920 VAR_INT(ACCUM_GREEN_BITS
)
1921 VAR_INT(ACCUM_BLUE_BITS
)
1922 VAR_INT(ACCUM_ALPHA_BITS
)
1927 VAR_INT(ATTRIB_STACK_DEPTH
)
1928 VAR_INT(CLIENT_ATTRIB_STACK_DEPTH
)
1929 VAR_INT(NAME_STACK_DEPTH
)
1930 VAR_ENUM(RENDER_MODE
)
1931 VAR_PTR(SELECTION_BUFFER_POINTER
)
1932 VAR_INT(SELECTION_BUFFER_SIZE
)
1933 VAR_PTR(FEEDBACK_BUFFER_POINTER
)
1934 VAR_INT(FEEDBACK_BUFFER_SIZE
)
1935 VAR_ENUM(FEEDBACK_BUFFER_TYPE
)
1940 /***************************************************************************/
1945 #include "glut_wrap.h"
1947 int main( int argc
, char *argv
[] )
1949 glutInit( &argc
, argv
);
1950 glutInitWindowPosition(0, 0);
1951 glutInitWindowSize(400, 300);
1952 glutInitDisplayMode(GLUT_RGB
);
1953 glutCreateWindow(argv
[0]);
1954 dump_opengl_state(stdout
);