summaryrefslogtreecommitdiffstats
path: root/meta/packages/qemu
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-01-19 23:46:37 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2009-01-19 23:46:37 +0000
commitf6ea2f84fb4977b888720d7cbed8e7de266014a8 (patch)
tree6dc6db873092cd2ee6bd54f0d16e0884a0bae7b3 /meta/packages/qemu
parent7fc734effe555dd39a828ac800f10caa8f462cd3 (diff)
downloadpoky-f6ea2f84fb4977b888720d7cbed8e7de266014a8.tar.gz
qemu: Add host gl support for qemu x86
Diffstat (limited to 'meta/packages/qemu')
-rw-r--r--meta/packages/qemu/qemu-0.9.1+svnr6190/qemu-add-gl-host-code.patch33906
-rw-r--r--meta/packages/qemu/qemu_svn.bb6
2 files changed, 33910 insertions, 2 deletions
diff --git a/meta/packages/qemu/qemu-0.9.1+svnr6190/qemu-add-gl-host-code.patch b/meta/packages/qemu/qemu-0.9.1+svnr6190/qemu-add-gl-host-code.patch
new file mode 100644
index 0000000000..23aef3830a
--- /dev/null
+++ b/meta/packages/qemu/qemu-0.9.1+svnr6190/qemu-add-gl-host-code.patch
@@ -0,0 +1,33906 @@
1Index: trunk/Makefile.target
2===================================================================
3--- trunk.orig/Makefile.target 2009-01-19 23:00:33.000000000 +0000
4+++ trunk/Makefile.target 2009-01-19 23:08:18.000000000 +0000
5@@ -199,6 +199,10 @@
6 CPPFLAGS+=-I$(SRC_PATH)/fpu
7 LIBOBJS+= op_helper.o helper.o
8
9+ifeq ($(TARGET_BASE_ARCH), i386)
10+LIBOBJS+=helper_opengl.o opengl_exec.o
11+endif
12+
13 ifeq ($(TARGET_BASE_ARCH), arm)
14 LIBOBJS+= neon_helper.o iwmmxt_helper.o
15 endif
16@@ -277,6 +281,21 @@
17 cpu-exec.o: cpu-exec.c
18 $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
19
20+parse_gl_h: parse_gl_h.c
21+ $(CC) -g -o $@ $<
22+server_stub.c: parse_gl_h
23+ ./parse_gl_h
24+gl_func.h: parse_gl_h
25+ ./parse_gl_h
26+GL_CFLAGS := -Wall -g -O2 -fno-strict-aliasing
27+opengl_func.h: gl_func.h
28+helper_opengl.o: helper_opengl.c opengl_func.h server_stub.c
29+ $(CC) $(GL_CFLAGS) $(DEFINES) -c -o $@ $< -I.. -I. -I../fpu -I../target-i386 -DNEED_CPU_H
30+gl_beginend.h: ../target-i386/beginend_funcs.sh
31+ $< > $@
32+opengl_exec.o : opengl_exec.c server_stub.c gl_func.h opengl_func.h gl_beginend.h
33+ $(CC) $(GL_CFLAGS) $(DEFINES) -c -o $@ $< -I. -I../target-i386
34+
35 #########################################################
36 # Linux user emulator target
37
38@@ -639,7 +658,7 @@
39 OBJS+= fdc.o mc146818rtc.o serial.o i8259.o i8254.o pcspk.o pc.o
40 OBJS+= cirrus_vga.o apic.o parallel.o acpi.o piix_pci.o
41 OBJS+= usb-uhci.o vmmouse.o vmport.o vmware_vga.o hpet.o
42-CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
43+CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE -DTARGET_OPENGL_OK
44 endif
45 ifeq ($(TARGET_BASE_ARCH), ppc)
46 CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
47@@ -774,7 +793,7 @@
48 endif
49
50 $(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a
51- $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS)
52+ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS) -lGL -lGLU
53
54 endif # !CONFIG_USER_ONLY
55
56Index: trunk/hw/vmware_vga.c
57===================================================================
58--- trunk.orig/hw/vmware_vga.c 2009-01-05 11:10:15.000000000 +0000
59+++ trunk/hw/vmware_vga.c 2009-01-19 23:06:08.000000000 +0000
60@@ -485,6 +485,8 @@
61
62 #define CMD(f) le32_to_cpu(s->cmd->f)
63
64+static uint32_t last_cmd;
65+
66 static inline int vmsvga_fifo_empty(struct vmsvga_state_s *s)
67 {
68 if (!s->config || !s->enable)
69@@ -494,11 +496,18 @@
70
71 static inline uint32_t vmsvga_fifo_read_raw(struct vmsvga_state_s *s)
72 {
73- uint32_t cmd = s->fifo[CMD(stop) >> 2];
74- s->cmd->stop = cpu_to_le32(CMD(stop) + 4);
75- if (CMD(stop) >= CMD(max))
76+ int offset = CMD(stop);
77+
78+ if (unlikely(s->cmd->next_cmd == s->cmd->stop)) {
79+ fprintf(stderr, "%s: FIFO empty during CMD %i\n",
80+ __FUNCTION__, last_cmd);
81+ return 0x00000000;
82+ }
83+
84+ s->cmd->stop = cpu_to_le32(offset + 4);
85+ if (offset + 4 >= CMD(max))
86 s->cmd->stop = s->cmd->min;
87- return cmd;
88+ return s->fifo[offset >> 2];
89 }
90
91 static inline uint32_t vmsvga_fifo_read(struct vmsvga_state_s *s)
92@@ -508,12 +517,12 @@
93
94 static void vmsvga_fifo_run(struct vmsvga_state_s *s)
95 {
96- uint32_t cmd, colour;
97+ uint32_t colour;
98 int args = 0;
99 int x, y, dx, dy, width, height;
100 struct vmsvga_cursor_definition_s cursor;
101 while (!vmsvga_fifo_empty(s))
102- switch (cmd = vmsvga_fifo_read(s)) {
103+ switch (last_cmd = vmsvga_fifo_read(s)) {
104 case SVGA_CMD_UPDATE:
105 case SVGA_CMD_UPDATE_VERBOSE:
106 x = vmsvga_fifo_read(s);
107@@ -613,7 +622,7 @@
108 while (args --)
109 vmsvga_fifo_read(s);
110 printf("%s: Unknown command 0x%02x in SVGA command FIFO\n",
111- __FUNCTION__, cmd);
112+ __FUNCTION__, last_cmd);
113 break;
114 }
115
116Index: trunk/kqemu.c
117===================================================================
118--- trunk.orig/kqemu.c 2009-01-05 11:10:24.000000000 +0000
119+++ trunk/kqemu.c 2009-01-19 23:06:08.000000000 +0000
120@@ -84,6 +84,8 @@
121 int qpi_io_memory;
122 uint32_t kqemu_comm_base; /* physical address of the QPI communication page */
123
124+extern int enable_gl;
125+
126 #define cpuid(index, eax, ebx, ecx, edx) \
127 asm volatile ("cpuid" \
128 : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) \
129@@ -867,6 +869,22 @@
130 else
131 env->hflags &= ~HF_OSFXSR_MASK;
132
133+ /* OPENGL Stuff */
134+ if (enable_gl && ((env->hflags & HF_CPL_MASK) == 3)) {
135+ int index = (env->eip >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
136+ if (env->segs[R_CS].base != 0)
137+ fprintf(stderr, "env->segs[R_CS].base != 0 !\n");
138+ else if (__builtin_expect(env->tlb_table[1][index].addr_code !=
139+ (env->eip & TARGET_PAGE_MASK), 0))
140+ ldub_code(env->eip);
141+
142+ if (env->tlb_table[1][index].addend) {
143+ unsigned char *ptr = env->eip + env->tlb_table[1][index].addend;
144+ if (ptr[0] == 0xCD && ptr[1] == 0x99)
145+ helper_opengl();
146+ }
147+ }
148+
149 #ifdef DEBUG
150 if (loglevel & CPU_LOG_INT) {
151 fprintf(logfile, "kqemu: kqemu_cpu_exec: ret=0x%x\n", ret);
152Index: trunk/sdl.c
153===================================================================
154--- trunk.orig/sdl.c 2009-01-19 23:00:33.000000000 +0000
155+++ trunk/sdl.c 2009-01-19 23:28:22.000000000 +0000
156@@ -26,6 +26,7 @@
157 #include "sysemu.h"
158
159 #include <SDL.h>
160+#include <SDL_syswm.h>
161
162 #ifndef _WIN32
163 #include <signal.h>
164@@ -50,6 +51,10 @@
165 static int guest_x, guest_y;
166 static SDL_Cursor *guest_sprite = 0;
167
168+#ifdef TARGET_OPENGL_OK
169+extern void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window);
170+#endif
171+
172 static void sdl_update(DisplayState *ds, int x, int y, int w, int h)
173 {
174 // printf("updating x=%d y=%d w=%d h=%d\n", x, y, w, h);
175@@ -58,6 +63,7 @@
176
177 static void sdl_resize(DisplayState *ds, int w, int h)
178 {
179+ SDL_SysWMinfo info;
180 int flags;
181
182 // printf("resizing to %d %d\n", w, h);
183@@ -72,6 +78,17 @@
184 height = h;
185
186 again:
187+ if (ds->data != NULL) {
188+ SDL_VERSION(&info.version);
189+ SDL_GetWMInfo(&info);
190+#ifdef TARGET_OPENGL_OK
191+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display)
192+ opengl_exec_set_parent_window(info.info.x11.display,
193+ RootWindow(info.info.x11.display,
194+ DefaultScreen(info.info.x11.display)));
195+#endif
196+ }
197+
198 screen = SDL_SetVideoMode(w, h, 0, flags);
199 if (!screen) {
200 fprintf(stderr, "Could not open SDL display\n");
201@@ -86,6 +103,13 @@
202 fprintf(stderr, "Could not open SDL display\n");
203 exit(1);
204 }
205+
206+ SDL_VERSION(&info.version);
207+ SDL_GetWMInfo(&info);
208+#ifdef TARGET_OPENGL_OK
209+ opengl_exec_set_parent_window(info.info.x11.display, info.info.x11.window);
210+#endif
211+
212 ds->data = screen->pixels;
213 ds->linesize = screen->pitch;
214 ds->depth = screen->format->BitsPerPixel;
215@@ -574,6 +598,10 @@
216 line = image;
217 for (x = 0; x < width; x ++, dst ++) {
218 switch (bpp) {
219+ case 32:
220+ src = *(line ++); src |= *(line ++);
221+ src = *(line ++); src |= *(line ++);
222+ break;
223 case 24:
224 src = *(line ++); src |= *(line ++); src |= *(line ++);
225 break;
226@@ -643,6 +671,7 @@
227 ds->dpy_fill = sdl_fill;
228 ds->mouse_set = sdl_mouse_warp;
229 ds->cursor_define = sdl_mouse_define;
230+ ds->data = NULL;
231
232 sdl_resize(ds, 640, 400);
233 sdl_update_caption();
234Index: trunk/target-i386/beginend_funcs.sh
235===================================================================
236--- /dev/null 1970-01-01 00:00:00.000000000 +0000
237+++ trunk/target-i386/beginend_funcs.sh 2009-01-19 23:06:08.000000000 +0000
238@@ -0,0 +1,23 @@
239+#! /bin/sh
240+# Copyright 2008 (C) Intel Corporation
241+#
242+# echo names of functions that are legal between a glBegin and glEnd pair.
243+echo -e MAGIC_MACRO\(glVertex{2,3,4}{s,i,f,d}{,v}\)\\n
244+echo -e MAGIC_MACRO\(glTexCoord{1,2,3,4}{s,i,f,d}{,v}\)\\n
245+echo -e MAGIC_MACRO\(glMultiTexCoord{1,2,3,4}{s,i,f,d}{,v}\)\\n
246+echo -e MAGIC_MACRO\(glNormal3{b,s,i,f,d}{,v}\)\\n
247+echo -e MAGIC_MACRO\(glFogCoord{f,d}{,v}\)\\n
248+echo -e MAGIC_MACRO\(glColor{3,4}{b,s,i,f,d,ub,us,ui}{,v}\)\\n
249+echo -e MAGIC_MACRO\(glSecondaryColor3{b,s,i,f,d,ub,us,ui}{,v}\)\\n
250+echo -e MAGIC_MACRO\(glIndex{s,i,f,d,ub}{,v}\)\\n
251+echo -e MAGIC_MACRO\(glVertexAttrib{1,2,3,4}{s,f,d}{,v}\)\\n
252+echo -e MAGIC_MACRO\(glVertexAttrib4{b,i,ub,us,ui}v\)\\n
253+echo -e MAGIC_MACRO\(glVertexAttrib4Nub\)\\n
254+echo -e MAGIC_MACRO\(glVertexAttrib4N{b,s,i,ub,us,ui}v\)\\n
255+echo -e MAGIC_MACRO\(glArrayElement\)\\n
256+echo -e MAGIC_MACRO\(glEvalCoord{1,2}{f,d}{,v}\)\\n
257+echo -e MAGIC_MACRO\(glEvalPoint{1,2}\)\\n
258+echo -e MAGIC_MACRO\(glMaterial{i,f}{,v}\)\\n
259+echo -e MAGIC_MACRO\(glCallList\)\\n
260+echo -e MAGIC_MACRO\(glCallLists\)\\n
261+echo -e MAGIC_MACRO\(glEdgeFlag{,v}\)\\n
262Index: trunk/target-i386/ghash.c
263===================================================================
264--- /dev/null 1970-01-01 00:00:00.000000000 +0000
265+++ trunk/target-i386/ghash.c 2009-01-19 23:06:08.000000000 +0000
266@@ -0,0 +1,347 @@
267+/* This is a modified and simplified version of original ghash.c */
268+
269+/* GLIB - Library of useful routines for C programming
270+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
271+ *
272+ * This library is free software; you can redistribute it and/or
273+ * modify it under the terms of the GNU Lesser General Public
274+ * License as published by the Free Software Foundation; either
275+ * version 2 of the License, or (at your option) any later version.
276+ *
277+ * This library is distributed in the hope that it will be useful,
278+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
279+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
280+ * Lesser General Public License for more details.
281+ *
282+ * You should have received a copy of the GNU Lesser General Public
283+ * License along with this library; if not, write to the
284+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
285+ * Boston, MA 02111-1307, USA.
286+ */
287+
288+/*
289+ * Modified by the GLib Team and others 1997-2000. See the AUTHORS
290+ * file for a list of people on the GLib Team. See the ChangeLog
291+ * files for a list of changes. These files are distributed with
292+ * GLib at ftp://ftp.gtk.org/pub/gtk/.
293+ */
294+
295+
296+#include <stdlib.h>
297+
298+#include "ghash.h"
299+
300+#define HASH_TABLE_MIN_SIZE 11
301+#define HASH_TABLE_MAX_SIZE 13845163
302+
303+#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
304+
305+
306+typedef struct _SimpleHashNode SimpleHashNode;
307+
308+struct _SimpleHashNode
309+{
310+ int key;
311+ void* value;
312+ SimpleHashNode *next;
313+};
314+
315+struct _SimpleHashTable
316+{
317+ int size;
318+ int nnodes;
319+ SimpleHashNode **nodes;
320+ SimpleDestroyNotify value_destroy_func;
321+};
322+
323+static const unsigned int simple_primes[] =
324+{
325+ 11,
326+ 19,
327+ 37,
328+ 73,
329+ 109,
330+ 163,
331+ 251,
332+ 367,
333+ 557,
334+ 823,
335+ 1237,
336+ 1861,
337+ 2777,
338+ 4177,
339+ 6247,
340+ 9371,
341+ 14057,
342+ 21089,
343+ 31627,
344+ 47431,
345+ 71143,
346+ 106721,
347+ 160073,
348+ 240101,
349+ 360163,
350+ 540217,
351+ 810343,
352+ 1215497,
353+ 1823231,
354+ 2734867,
355+ 4102283,
356+ 6153409,
357+ 9230113,
358+ 13845163,
359+};
360+
361+static const unsigned int simple_nprimes = sizeof (simple_primes) / sizeof (simple_primes[0]);
362+
363+unsigned int simple_spaced_primes_closest (unsigned int num)
364+{
365+ int i;
366+
367+ for (i = 0; i < simple_nprimes; i++)
368+ if (simple_primes[i] > num)
369+ return simple_primes[i];
370+
371+ return simple_primes[simple_nprimes - 1];
372+}
373+
374+#define HASH_TABLE_RESIZE(hash_table) \
375+ do { \
376+ if ((hash_table->size >= 3 * hash_table->nnodes && \
377+ hash_table->size > HASH_TABLE_MIN_SIZE) || \
378+ (3 * hash_table->size <= hash_table->nnodes && \
379+ hash_table->size < HASH_TABLE_MAX_SIZE)) \
380+ simple_hash_table_resize (hash_table); \
381+ } while(0)
382+
383+static void simple_hash_table_resize (SimpleHashTable *hash_table);
384+static SimpleHashNode** simple_hash_table_lookup_node (SimpleHashTable *hash_table,
385+ int key);
386+static SimpleHashNode* simple_hash_node_new (int key,
387+ void* value);
388+static void simple_hash_nodes_destroy (SimpleHashNode *hash_node,
389+ SimpleDestroyNotify value_destroy_func);
390+
391+
392+#define alloc0(type, n) (type*)calloc(n, sizeof(type))
393+
394+SimpleHashTable*
395+simple_hash_table_new (SimpleDestroyNotify value_destroy_func)
396+{
397+ SimpleHashTable *hash_table;
398+
399+ hash_table = alloc0(SimpleHashTable, 1);
400+ hash_table->size = HASH_TABLE_MIN_SIZE;
401+ hash_table->nnodes = 0;
402+ hash_table->value_destroy_func = value_destroy_func;
403+ hash_table->nodes = alloc0 (SimpleHashNode*, hash_table->size);
404+
405+ return hash_table;
406+}
407+
408+SimpleHashTable* simple_hash_table_clone(SimpleHashTable *hash_table,
409+ SimpleCloneValue clone_value_func)
410+{
411+ SimpleHashTable *hash_table_new;
412+ SimpleHashNode *new_node;
413+ SimpleHashNode *node;
414+ int i;
415+
416+ hash_table_new = alloc0 (SimpleHashTable, 1);
417+ hash_table_new->size = hash_table->size;
418+ hash_table_new->nnodes = hash_table->nnodes;
419+ hash_table_new->value_destroy_func = hash_table->value_destroy_func;
420+ hash_table_new->nodes = alloc0 (SimpleHashNode*, hash_table_new->size);
421+ for (i = 0; i < hash_table->size; i++)
422+ {
423+ node = hash_table->nodes[i];
424+ while(node)
425+ {
426+ SimpleHashNode *next = hash_table_new->nodes[i];
427+ new_node = simple_hash_node_new(node->key,
428+ (clone_value_func)? clone_value_func(node->value) : node->value);
429+ new_node->next = next;
430+ hash_table_new->nodes[i] = new_node;
431+ node = node->next;
432+ }
433+ }
434+ return hash_table_new;
435+}
436+
437+void
438+simple_hash_table_destroy (SimpleHashTable *hash_table)
439+{
440+ int i;
441+
442+ for (i = 0; i < hash_table->size; i++)
443+ {
444+ simple_hash_nodes_destroy (hash_table->nodes[i],
445+ hash_table->value_destroy_func);
446+ hash_table->nodes[i] = NULL;
447+ }
448+ free (hash_table->nodes);
449+ free (hash_table);
450+}
451+
452+static inline SimpleHashNode**
453+simple_hash_table_lookup_node (SimpleHashTable *hash_table,
454+ int key)
455+{
456+ SimpleHashNode **node;
457+
458+ node = &hash_table->nodes[(unsigned int)key % hash_table->size];
459+ while (*node && (*node)->key != key)
460+ node = &(*node)->next;
461+
462+ return node;
463+}
464+
465+void*
466+simple_hash_table_lookup (SimpleHashTable *hash_table, int key)
467+{
468+ SimpleHashNode *node;
469+
470+ node = *simple_hash_table_lookup_node (hash_table, key);
471+
472+ return node ? node->value : NULL;
473+}
474+
475+void**
476+simple_hash_table_lookup_pointer (SimpleHashTable *hash_table, int key)
477+{
478+ SimpleHashNode *node;
479+
480+ node = *simple_hash_table_lookup_node (hash_table, key);
481+
482+ return node ? &node->value : NULL;
483+}
484+
485+
486+void
487+simple_hash_table_insert (SimpleHashTable *hash_table,
488+ int key,
489+ void* value)
490+{
491+ SimpleHashNode **node;
492+
493+ node = simple_hash_table_lookup_node (hash_table, key);
494+
495+ if (*node)
496+ {
497+ /* do not reset node->key in this place, keeping
498+ * the old key is the intended behaviour.
499+ * simple_hash_table_replace() can be used instead.
500+ */
501+ if (hash_table->value_destroy_func)
502+ hash_table->value_destroy_func ((*node)->value);
503+
504+ (*node)->value = value;
505+ }
506+ else
507+ {
508+ *node = simple_hash_node_new (key, value);
509+ hash_table->nnodes++;
510+ HASH_TABLE_RESIZE (hash_table);
511+ }
512+}
513+int
514+simple_hash_table_remove (SimpleHashTable *hash_table,
515+ int key)
516+{
517+ SimpleHashNode **node, *dest;
518+
519+ node = simple_hash_table_lookup_node (hash_table, key);
520+ if (*node)
521+ {
522+ dest = *node;
523+ (*node) = dest->next;
524+ if (hash_table->value_destroy_func)
525+ hash_table->value_destroy_func (dest->value);
526+ free (dest);
527+ hash_table->nnodes--;
528+
529+ HASH_TABLE_RESIZE (hash_table);
530+
531+ return 1;
532+ }
533+
534+ return 0;
535+}
536+
537+
538+void
539+simple_hash_table_foreach (SimpleHashTable *hash_table,
540+ SimpleHFunc func,
541+ void* user_data)
542+{
543+ SimpleHashNode *node;
544+ int i;
545+
546+ for (i = 0; i < hash_table->size; i++)
547+ for (node = hash_table->nodes[i]; node; node = node->next)
548+ (* func) (node->key, node->value, user_data);
549+}
550+
551+unsigned int
552+simple_hash_table_size (SimpleHashTable *hash_table)
553+{
554+ return hash_table->nnodes;
555+}
556+
557+static void
558+simple_hash_table_resize (SimpleHashTable *hash_table)
559+{
560+ SimpleHashNode **new_nodes;
561+ SimpleHashNode *node;
562+ SimpleHashNode *next;
563+ unsigned int hash_val;
564+ int new_size;
565+ int i;
566+
567+ new_size = simple_spaced_primes_closest (hash_table->nnodes);
568+ new_size = CLAMP (new_size, HASH_TABLE_MIN_SIZE, HASH_TABLE_MAX_SIZE);
569+
570+ new_nodes = alloc0 (SimpleHashNode*, new_size);
571+
572+ for (i = 0; i < hash_table->size; i++)
573+ for (node = hash_table->nodes[i]; node; node = next)
574+ {
575+ next = node->next;
576+
577+ hash_val = (unsigned int)(node->key) % new_size;
578+
579+ node->next = new_nodes[hash_val];
580+ new_nodes[hash_val] = node;
581+ }
582+
583+ free (hash_table->nodes);
584+ hash_table->nodes = new_nodes;
585+ hash_table->size = new_size;
586+}
587+
588+static SimpleHashNode*
589+simple_hash_node_new (int key,
590+ void* value)
591+{
592+ SimpleHashNode *hash_node = alloc0 (SimpleHashNode, 1);
593+
594+ hash_node->key = key;
595+ hash_node->value = value;
596+ hash_node->next = NULL;
597+
598+ return hash_node;
599+}
600+
601+static void
602+simple_hash_nodes_destroy (SimpleHashNode *hash_node,
603+ SimpleDestroyNotify value_destroy_func)
604+{
605+ while (hash_node)
606+ {
607+ SimpleHashNode *next = hash_node->next;
608+ if (value_destroy_func)
609+ value_destroy_func (hash_node->value);
610+ free (hash_node);
611+ hash_node = next;
612+ }
613+}
614Index: trunk/target-i386/ghash.h
615===================================================================
616--- /dev/null 1970-01-01 00:00:00.000000000 +0000
617+++ trunk/target-i386/ghash.h 2009-01-19 23:06:08.000000000 +0000
618@@ -0,0 +1,59 @@
619+/* This is a modified and simplified version of original ghash.h */
620+
621+
622+/* GLIB - Library of useful routines for C programming
623+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
624+ *
625+ * This library is free software; you can redistribute it and/or
626+ * modify it under the terms of the GNU Lesser General Public
627+ * License as published by the Free Software Foundation; either
628+ * version 2 of the License, or (at your option) any later version.
629+ *
630+ * This library is distributed in the hope that it will be useful,
631+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
632+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
633+ * Lesser General Public License for more details.
634+ *
635+ * You should have received a copy of the GNU Lesser General Public
636+ * License along with this library; if not, write to the
637+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
638+ * Boston, MA 02111-1307, USA.
639+ */
640+
641+/*
642+ * Modified by the GLib Team and others 1997-2000. See the AUTHORS
643+ * file for a list of people on the GLib Team. See the ChangeLog
644+ * files for a list of changes. These files are distributed with
645+ * GLib at ftp://ftp.gtk.org/pub/gtk/.
646+ */
647+
648+#ifndef __SIMPLE_HASH_H__
649+#define __SIMPLE_HASH_H__
650+
651+typedef struct _SimpleHashTable SimpleHashTable;
652+
653+typedef void (*SimpleDestroyNotify)(void*);
654+typedef void (*SimpleHFunc)(int key, void* value, void* user_data);
655+typedef void* (*SimpleCloneValue)(void* value);
656+
657+/* Hash tables
658+ */
659+SimpleHashTable* simple_hash_table_new (SimpleDestroyNotify value_destroy_func);
660+SimpleHashTable* simple_hash_table_clone(SimpleHashTable *hash_table,
661+ SimpleCloneValue clone_value_func);
662+void simple_hash_table_destroy (SimpleHashTable *hash_table);
663+void simple_hash_table_insert (SimpleHashTable *hash_table,
664+ int key,
665+ void* value);
666+int simple_hash_table_remove (SimpleHashTable *hash_table,
667+ int key);
668+void* simple_hash_table_lookup (SimpleHashTable *hash_table,
669+ int key);
670+void** simple_hash_table_lookup_pointer (SimpleHashTable *hash_table, int key);
671+void simple_hash_table_foreach (SimpleHashTable *hash_table,
672+ SimpleHFunc func,
673+ void* user_data);
674+unsigned int simple_hash_table_size (SimpleHashTable *hash_table);
675+
676+#endif /* __SIMPLE_HASH_H__ */
677+
678Index: trunk/target-i386/gl_func_perso.h
679===================================================================
680--- /dev/null 1970-01-01 00:00:00.000000000 +0000
681+++ trunk/target-i386/gl_func_perso.h 2009-01-19 23:06:08.000000000 +0000
682@@ -0,0 +1,135 @@
683+/*
684+ * Hand-implemented GL/GLX API
685+ *
686+ * Copyright (c) 2006,2007 Even Rouault
687+ *
688+ * Permission is hereby granted, free of charge, to any person obtaining a copy
689+ * of this software and associated documentation files (the "Software"), to deal
690+ * in the Software without restriction, including without limitation the rights
691+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
692+ * copies of the Software, and to permit persons to whom the Software is
693+ * furnished to do so, subject to the following conditions:
694+ *
695+ * The above copyright notice and this permission notice shall be included in
696+ * all copies or substantial portions of the Software.
697+ *
698+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
699+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
700+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
701+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
702+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
703+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
704+ * THE SOFTWARE.
705+ */
706+
707+MAGIC_MACRO(_init32),
708+MAGIC_MACRO(_init64),
709+MAGIC_MACRO(_synchronize),
710+MAGIC_MACRO(_serialized_calls),
711+MAGIC_MACRO(_exit_process),
712+MAGIC_MACRO(_moveResizeWindow),
713+MAGIC_MACRO(_changeWindowState),
714+MAGIC_MACRO(_send_cursor),
715+
716+/* When you add a glX call here, you HAVE TO update IS_GLX_CALL */
717+MAGIC_MACRO(glXChooseVisual),
718+MAGIC_MACRO(glXQueryExtensionsString),
719+MAGIC_MACRO(glXQueryServerString),
720+MAGIC_MACRO(glXCreateContext),
721+MAGIC_MACRO(glXCopyContext),
722+MAGIC_MACRO(glXDestroyContext),
723+MAGIC_MACRO(glXGetClientString),
724+MAGIC_MACRO(glXQueryVersion),
725+MAGIC_MACRO(glXMakeCurrent),
726+MAGIC_MACRO(glXGetConfig),
727+MAGIC_MACRO(glXGetConfig_extended),
728+MAGIC_MACRO(glXWaitGL),
729+MAGIC_MACRO(glXWaitX),
730+MAGIC_MACRO(glXGetFBConfigAttrib_extended),
731+MAGIC_MACRO(glXChooseFBConfig),
732+MAGIC_MACRO(glXChooseFBConfigSGIX),
733+MAGIC_MACRO(glXGetFBConfigs),
734+MAGIC_MACRO(glXCreatePbuffer),
735+MAGIC_MACRO(glXCreateGLXPbufferSGIX),
736+MAGIC_MACRO(glXDestroyPbuffer),
737+MAGIC_MACRO(glXDestroyGLXPbufferSGIX),
738+MAGIC_MACRO(glXCreateNewContext),
739+MAGIC_MACRO(glXCreateContextWithConfigSGIX),
740+MAGIC_MACRO(glXGetVisualFromFBConfig),
741+MAGIC_MACRO(glXGetFBConfigAttrib),
742+MAGIC_MACRO(glXGetFBConfigAttribSGIX),
743+MAGIC_MACRO(glXQueryContext),
744+MAGIC_MACRO(glXQueryDrawable),
745+MAGIC_MACRO(glXQueryGLXPbufferSGIX),
746+MAGIC_MACRO(glXUseXFont),
747+MAGIC_MACRO(glXIsDirect),
748+MAGIC_MACRO(glXGetProcAddress_fake),
749+MAGIC_MACRO(glXGetProcAddress_global_fake),
750+MAGIC_MACRO(glXSwapBuffers),
751+MAGIC_MACRO(glXQueryExtension),
752+MAGIC_MACRO(glXGetScreenDriver),
753+MAGIC_MACRO(glXGetDriverConfig),
754+MAGIC_MACRO(glXSwapIntervalSGI),
755+MAGIC_MACRO(glXBindTexImageATI),
756+MAGIC_MACRO(glXReleaseTexImageATI),
757+MAGIC_MACRO(glXBindTexImageARB),
758+MAGIC_MACRO(glXReleaseTexImageARB),
759+
760+MAGIC_MACRO(glGetString),
761+
762+MAGIC_MACRO(glShaderSourceARB_fake),
763+MAGIC_MACRO(glShaderSource_fake),
764+MAGIC_MACRO(glVertexPointer_fake),
765+MAGIC_MACRO(glNormalPointer_fake),
766+MAGIC_MACRO(glColorPointer_fake),
767+MAGIC_MACRO(glSecondaryColorPointer_fake),
768+MAGIC_MACRO(glIndexPointer_fake),
769+MAGIC_MACRO(glTexCoordPointer_fake),
770+MAGIC_MACRO(glEdgeFlagPointer_fake),
771+MAGIC_MACRO(glVertexAttribPointerARB_fake),
772+MAGIC_MACRO(glVertexAttribPointerNV_fake),
773+MAGIC_MACRO(glWeightPointerARB_fake),
774+MAGIC_MACRO(glMatrixIndexPointerARB_fake),
775+MAGIC_MACRO(glFogCoordPointer_fake),
776+MAGIC_MACRO(glVariantPointerEXT_fake),
777+MAGIC_MACRO(glInterleavedArrays_fake),
778+MAGIC_MACRO(glElementPointerATI_fake),
779+MAGIC_MACRO(glTuxRacerDrawElements_fake),
780+MAGIC_MACRO(glVertexAndNormalPointer_fake),
781+MAGIC_MACRO(glTexCoordPointer01_fake),
782+MAGIC_MACRO(glTexCoordPointer012_fake),
783+MAGIC_MACRO(glVertexNormalPointerInterlaced_fake),
784+MAGIC_MACRO(glVertexNormalColorPointerInterlaced_fake),
785+MAGIC_MACRO(glVertexColorTexCoord0PointerInterlaced_fake),
786+MAGIC_MACRO(glVertexNormalTexCoord0PointerInterlaced_fake),
787+MAGIC_MACRO(glVertexNormalTexCoord01PointerInterlaced_fake),
788+MAGIC_MACRO(glVertexNormalTexCoord012PointerInterlaced_fake),
789+MAGIC_MACRO(glVertexNormalColorTexCoord0PointerInterlaced_fake),
790+MAGIC_MACRO(glVertexNormalColorTexCoord01PointerInterlaced_fake),
791+MAGIC_MACRO(glVertexNormalColorTexCoord012PointerInterlaced_fake),
792+MAGIC_MACRO(glGenTextures_fake),
793+MAGIC_MACRO(glGenBuffersARB_fake),
794+MAGIC_MACRO(glGenLists_fake),
795+MAGIC_MACRO(_glDrawElements_buffer),
796+MAGIC_MACRO(_glDrawRangeElements_buffer),
797+MAGIC_MACRO(_glMultiDrawElements_buffer),
798+MAGIC_MACRO(_glVertexPointer_buffer),
799+MAGIC_MACRO(_glNormalPointer_buffer),
800+MAGIC_MACRO(_glColorPointer_buffer),
801+MAGIC_MACRO(_glSecondaryColorPointer_buffer),
802+MAGIC_MACRO(_glIndexPointer_buffer),
803+MAGIC_MACRO(_glTexCoordPointer_buffer),
804+MAGIC_MACRO(_glEdgeFlagPointer_buffer),
805+MAGIC_MACRO(_glVertexAttribPointerARB_buffer),
806+MAGIC_MACRO(_glWeightPointerARB_buffer),
807+MAGIC_MACRO(_glMatrixIndexPointerARB_buffer),
808+MAGIC_MACRO(_glFogCoordPointer_buffer),
809+MAGIC_MACRO(_glVariantPointerEXT_buffer),
810+MAGIC_MACRO(_glGetError_fake),
811+MAGIC_MACRO(_glReadPixels_pbo),
812+MAGIC_MACRO(_glDrawPixels_pbo),
813+MAGIC_MACRO(_glMapBufferARB_fake),
814+MAGIC_MACRO(_glSelectBuffer_fake),
815+MAGIC_MACRO(_glGetSelectBuffer_fake),
816+MAGIC_MACRO(_glFeedbackBuffer_fake),
817+MAGIC_MACRO(_glGetFeedbackBuffer_fake),
818Index: trunk/target-i386/helper.h
819===================================================================
820--- trunk.orig/target-i386/helper.h 2009-01-05 11:10:06.000000000 +0000
821+++ trunk/target-i386/helper.h 2009-01-19 23:06:08.000000000 +0000
822@@ -214,4 +214,6 @@
823 DEF_HELPER_2(rcrq, tl, tl, tl)
824 #endif
825
826+DEF_HELPER_0(opengl, void)
827+
828 #include "def-helper.h"
829Index: trunk/target-i386/helper_opengl.c
830===================================================================
831--- /dev/null 1970-01-01 00:00:00.000000000 +0000
832+++ trunk/target-i386/helper_opengl.c 2009-01-19 23:06:08.000000000 +0000
833@@ -0,0 +1,979 @@
834+/*
835+ * Host-side implementation of GL/GLX API
836+ *
837+ * Copyright (c) 2006,2007 Even Rouault
838+ *
839+ * Permission is hereby granted, free of charge, to any person obtaining a copy
840+ * of this software and associated documentation files (the "Software"), to deal
841+ * in the Software without restriction, including without limitation the rights
842+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
843+ * copies of the Software, and to permit persons to whom the Software is
844+ * furnished to do so, subject to the following conditions:
845+ *
846+ * The above copyright notice and this permission notice shall be included in
847+ * all copies or substantial portions of the Software.
848+ *
849+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
850+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
851+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
852+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
853+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
854+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
855+ * THE SOFTWARE.
856+ */
857+#define _XOPEN_SOURCE 600
858+#include <string.h>
859+#include <stdlib.h>
860+#include <assert.h>
861+
862+#include <X11/Xlib.h>
863+#include <X11/Xutil.h>
864+
865+#include "exec.h"
866+
867+#if defined(CONFIG_USER_ONLY)
868+void helper_opengl(void)
869+{
870+ /* TODO */
871+}
872+#else
873+
874+#include "opengl_func.h"
875+
876+#define ENABLE_GL_LOG
877+
878+extern FILE *stderr;
879+
880+extern void init_process_tab(void);
881+extern int do_function_call(int func_number, arg_t *args, char *ret_string);
882+
883+extern void sdl_set_opengl_window(int x, int y, int width, int height);
884+
885+static int last_process_id = 0;
886+static int must_save = 0;
887+
888+static inline void *get_phys_mem_addr(const CPUState *env, target_ulong addr)
889+{
890+ int is_user, index;
891+
892+ index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
893+ is_user = ((env->hflags & HF_CPL_MASK) == 3);
894+ if (is_user == 0) {
895+ fprintf(stderr, "not in userland !!!\n");
896+ return NULL;
897+ }
898+ if (__builtin_expect
899+ (env->tlb_table[is_user][index].addr_code !=
900+ (addr & TARGET_PAGE_MASK), 0)) {
901+ target_ulong ret = cpu_get_phys_page_debug((CPUState *) env, addr);
902+
903+ if (ret == -1) {
904+ fprintf(stderr,
905+ "cpu_get_phys_page_debug(env, " TARGET_FMT_lx ") == "
906+ TARGET_FMT_lx "\n", addr, ret);
907+ fprintf(stderr,
908+ "not in phys mem " TARGET_FMT_lx "(" TARGET_FMT_lx " "
909+ TARGET_FMT_lx ")\n", addr,
910+ env->tlb_table[is_user][index].addr_code,
911+ addr & TARGET_PAGE_MASK);
912+ fprintf(stderr, "cpu_x86_handle_mmu_fault = %d\n",
913+ cpu_x86_handle_mmu_fault((CPUState *) env, addr, 0, 1, 1));
914+ return NULL;
915+ } else {
916+ if (ret + TARGET_PAGE_SIZE <= phys_ram_size) {
917+ return phys_ram_base + ret +
918+ (((target_ulong) addr) & (TARGET_PAGE_SIZE - 1));
919+ } else {
920+ fprintf(stderr,
921+ "cpu_get_phys_page_debug(env, " TARGET_FMT_lx ") == "
922+ TARGET_FMT_lx "p\n", addr, ret);
923+ fprintf(stderr,
924+ "ret=" TARGET_FMT_lx " phys_ram_size= " TARGET_FMT_lx
925+ "\n", ret, (target_ulong) phys_ram_size);
926+ return NULL;
927+ }
928+ }
929+ } else
930+ return (void *) (addr + env->tlb_table[is_user][index].addend);
931+}
932+
933+#ifndef MIN
934+#define MIN(a, b) (((a) < (b)) ? (a) : (b))
935+#endif
936+
937+enum {
938+ NOT_MAPPED,
939+ MAPPED_CONTIGUOUS,
940+ MAPPED_NOT_CONTIGUOUS
941+};
942+
943+#define TARGET_ADDR_LOW_ALIGN(x) ((target_ulong)(x) & ~(TARGET_PAGE_SIZE - 1))
944+
945+/* Return NOT_MAPPED if a page is not mapped into target physical memory */
946+/* MAPPED_CONTIGUOUS if all pages are mapped into target physical memory and contiguous */
947+/* MAPPED_NOT_CONTIGUOUS if all pages are mapped into target physical memory but not contiguous */
948+static int get_target_mem_state(const CPUState *env,
949+ target_ulong target_addr, int len)
950+{
951+ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
952+ int to_end_page =
953+ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
954+ int ret = MAPPED_CONTIGUOUS;
955+
956+ if (aligned_target_addr != target_addr) {
957+ void *phys_addr = get_phys_mem_addr(env, aligned_target_addr);
958+ void *last_phys_addr = phys_addr;
959+
960+ if (phys_addr == 0) {
961+ return NOT_MAPPED;
962+ }
963+ if (len > to_end_page) {
964+ len -= to_end_page;
965+ aligned_target_addr += TARGET_PAGE_SIZE;
966+ int i;
967+
968+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
969+ void *phys_addr =
970+ get_phys_mem_addr(env, aligned_target_addr + i);
971+ if (phys_addr == 0) {
972+ return NOT_MAPPED;
973+ }
974+ if (phys_addr != last_phys_addr + TARGET_PAGE_SIZE)
975+ ret = MAPPED_NOT_CONTIGUOUS;
976+ last_phys_addr = phys_addr;
977+ }
978+ }
979+ } else {
980+ void *last_phys_addr = NULL;
981+ int i;
982+
983+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
984+ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
985+
986+ if (phys_addr == 0) {
987+ return NOT_MAPPED;
988+ }
989+ if (i != 0 && phys_addr != last_phys_addr + TARGET_PAGE_SIZE)
990+ ret = MAPPED_NOT_CONTIGUOUS;
991+ last_phys_addr = phys_addr;
992+ }
993+ }
994+ return ret;
995+}
996+
997+/* copy len bytes from host memory at addr host_addr to target memory at logical addr target_addr */
998+/* Returns 1 if successfull, 0 if some target pages are not mapped into target physical memory */
999+static int memcpy_host_to_target(const CPUState *env,
1000+ target_ulong target_addr,
1001+ const void *host_addr, int len)
1002+{
1003+ int i;
1004+ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
1005+ int to_end_page =
1006+ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
1007+ int ret = get_target_mem_state(env, target_addr, len);
1008+
1009+ if (ret == NOT_MAPPED) {
1010+ return 0;
1011+ }
1012+
1013+ if (ret == MAPPED_CONTIGUOUS) {
1014+ void *phys_addr = get_phys_mem_addr(env, target_addr);
1015+
1016+ memcpy(phys_addr, host_addr, len);
1017+ } else {
1018+ if (aligned_target_addr != target_addr) {
1019+ void *phys_addr = get_phys_mem_addr(env, target_addr);
1020+
1021+ memcpy(phys_addr, host_addr, MIN(len, to_end_page));
1022+ if (len <= to_end_page) {
1023+ return 1;
1024+ }
1025+ len -= to_end_page;
1026+ host_addr += to_end_page;
1027+ target_addr = aligned_target_addr + TARGET_PAGE_SIZE;
1028+ }
1029+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
1030+ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
1031+
1032+ memcpy(phys_addr, host_addr + i,
1033+ (i + TARGET_PAGE_SIZE <=
1034+ len) ? TARGET_PAGE_SIZE : len & (TARGET_PAGE_SIZE - 1));
1035+ }
1036+ }
1037+
1038+ return 1;
1039+}
1040+
1041+static int memcpy_target_to_host(const CPUState *env, void *host_addr,
1042+ target_ulong target_addr, int len)
1043+{
1044+ int i;
1045+ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
1046+ int to_end_page =
1047+ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
1048+ int ret = get_target_mem_state(env, target_addr, len);
1049+
1050+ if (ret == NOT_MAPPED) {
1051+ return 0;
1052+ }
1053+
1054+ if (ret == MAPPED_CONTIGUOUS) {
1055+ void *phys_addr = get_phys_mem_addr(env, target_addr);
1056+
1057+ memcpy(host_addr, phys_addr, len);
1058+ } else {
1059+ if (aligned_target_addr != target_addr) {
1060+ void *phys_addr = get_phys_mem_addr(env, target_addr);
1061+
1062+ memcpy(host_addr, phys_addr, MIN(len, to_end_page));
1063+ if (len <= to_end_page)
1064+ return 1;
1065+
1066+ len -= to_end_page;
1067+ host_addr += to_end_page;
1068+ target_addr = aligned_target_addr + TARGET_PAGE_SIZE;
1069+ }
1070+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
1071+ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
1072+
1073+ memcpy(host_addr + i, phys_addr,
1074+ (i + TARGET_PAGE_SIZE <=
1075+ len) ? TARGET_PAGE_SIZE : len & (TARGET_PAGE_SIZE - 1));
1076+ }
1077+ }
1078+
1079+ return 1;
1080+}
1081+
1082+static int memcpy_target_to_host_1_1(const CPUState *env, void *host_addr,
1083+ target_ulong target_addr, int nb_args)
1084+{
1085+ return memcpy_target_to_host(env, host_addr, target_addr, nb_args * 8);
1086+}
1087+
1088+static int wordsize = 0;
1089+static int (*argcpy_target_to_host) (const CPUState *env, void *host_addr,
1090+ target_ulong target_addr, int nb_args) =
1091+ memcpy_target_to_host_1_1;
1092+
1093+void do_disconnect_current(void);
1094+void do_context_switch(Display *dpy, pid_t pid, int call);
1095+
1096+static void disconnect_current(void)
1097+{
1098+ last_process_id = 0;
1099+
1100+ return do_disconnect_current();
1101+}
1102+
1103+static int memcpy_target32_to_host(const CPUState *env, void *host_addr,
1104+ target_ulong target_addr, int nb_args)
1105+{
1106+ int ret;
1107+ uint32_t args_temp[nb_args], *src = args_temp;
1108+ arg_t *dest = host_addr;
1109+
1110+ ret = memcpy_target_to_host(env, args_temp, target_addr, nb_args * 4);
1111+ if (!ret)
1112+ return ret;
1113+
1114+ while (nb_args) {
1115+ /* TODO: endianness */
1116+ *dest = 0;
1117+ *(uint32_t *) (dest++) = *src++;
1118+ nb_args--;
1119+ }
1120+
1121+ return ret;
1122+}
1123+
1124+static int memcpy_target64_to_host(const CPUState *env, void *host_addr,
1125+ target_ulong target_addr, int nb_args)
1126+{
1127+ int ret;
1128+ uint64_t args_temp[nb_args], *src = args_temp;
1129+ arg_t *dest = host_addr;
1130+
1131+ ret = memcpy_target_to_host(env, args_temp, target_addr, nb_args * 8);
1132+ if (!ret)
1133+ return ret;
1134+
1135+ while (nb_args) {
1136+ /* TODO: endianness */
1137+ *dest = 0;
1138+ *(uint64_t *) (dest++) = *src++;
1139+ nb_args--;
1140+ }
1141+
1142+ return ret;
1143+}
1144+
1145+static int host_offset = 0;
1146+static void reset_host_offset()
1147+{
1148+ host_offset = 0;
1149+}
1150+
1151+/* Return a host pointer with the content of [target_addr, target_addr + len bytes[ */
1152+/* Do not free or modify */
1153+static const void *get_host_read_pointer(const CPUState *env,
1154+ const target_ulong target_addr, int len)
1155+{
1156+ int ret = get_target_mem_state(env, target_addr, len);
1157+
1158+ if (ret == NOT_MAPPED) {
1159+ return NULL;
1160+ } else if (ret == MAPPED_CONTIGUOUS) {
1161+ return get_phys_mem_addr(env, target_addr);
1162+ } else {
1163+ static int host_mem_size = 0;
1164+ static void *host_mem = NULL;
1165+ static void *ret;
1166+
1167+ if (host_mem_size < host_offset + len) {
1168+ host_mem_size = 2 * host_mem_size + host_offset + len;
1169+ host_mem = realloc(host_mem, host_mem_size);
1170+ }
1171+ ret = host_mem + host_offset;
1172+ assert(memcpy_target_to_host(env, ret, target_addr, len));
1173+ host_offset += len;
1174+ return ret;
1175+ }
1176+}
1177+
1178+int doing_opengl = 0;
1179+static int last_func_number = -1;
1180+static size_t(*my_strlen) (const char *) = NULL;
1181+
1182+#ifdef ENABLE_GL_LOG
1183+static FILE *f = NULL;
1184+static int logger_pid = 0;
1185+
1186+#define write_gl_debug_init() do { if (f == NULL) f = fopen("/tmp/debug_gl.bin", "wb"); } while(0)
1187+
1188+void write_gl_debug_cmd_int(int my_int)
1189+{
1190+ write_gl_debug_init();
1191+ fwrite(&my_int, sizeof(int), 1, f);
1192+ fflush(f);
1193+}
1194+
1195+void write_gl_debug_cmd_short(short my_int)
1196+{
1197+ write_gl_debug_init();
1198+ fwrite(&my_int, sizeof(short), 1, f);
1199+ fflush(f);
1200+}
1201+
1202+static void inline write_gl_debug_cmd_buffer_with_size(int size, void *buffer)
1203+{
1204+ write_gl_debug_init();
1205+ fwrite(&size, sizeof(int), 1, f);
1206+ if (size)
1207+ fwrite(buffer, size, 1, f);
1208+}
1209+
1210+static void inline write_gl_debug_cmd_buffer_without_size(
1211+ int size, void *buffer)
1212+{
1213+ write_gl_debug_init();
1214+ if (size)
1215+ fwrite(buffer, size, 1, f);
1216+}
1217+
1218+void write_gl_debug_end(void)
1219+{
1220+ write_gl_debug_init();
1221+ fclose(f);
1222+ f = NULL;
1223+ logger_pid = 0;
1224+ must_save = 0;
1225+}
1226+
1227+static inline int is_logging(int pid)
1228+{
1229+ return must_save && pid == logger_pid;
1230+}
1231+#endif
1232+
1233+#include <dlfcn.h>
1234+#include <signal.h>
1235+
1236+static void (*anticrash_handler) (void *) = NULL;
1237+static void (*show_stack_from_signal_handler) (int, int, int) = NULL;
1238+
1239+void my_anticrash_sigsegv_handler(int signum, siginfo_t *info, void *ptr)
1240+{
1241+ static int counter = 0;
1242+
1243+ counter++;
1244+
1245+ printf("oops\n");
1246+
1247+ /* if (show_stack_from_signal_handler && counter == 1) { struct ucontext*
1248+ * ctxt = (struct ucontext*)ptr; show_stack_from_signal_handler(10,
1249+ * ctxt->uc_mcontext.gregs[REG_EBP], ctxt->uc_mcontext.gregs[REG_ESP]); } */
1250+ anticrash_handler(ptr);
1251+
1252+ counter--;
1253+}
1254+
1255+static int decode_call_int(CPUState *env, int func_number, int pid,
1256+ target_ulong target_ret_string,
1257+ target_ulong in_args, target_ulong in_args_size)
1258+{
1259+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
1260+ int ret_type = signature->ret_type;
1261+ /* int has_out_parameters = signature->has_out_parameters; */
1262+ int nb_args = signature->nb_args;
1263+ int *args_type = signature->args_type;
1264+ int i;
1265+ int ret;
1266+ int *args_size = NULL;
1267+ target_ulong saved_out_ptr[50];
1268+ static char *ret_string = NULL;
1269+ static arg_t args[50];
1270+ static Display *dpy = NULL;
1271+
1272+ if (dpy == NULL) {
1273+ void *handle = dlopen("libanticrash.so", RTLD_LAZY);
1274+
1275+ if (handle) {
1276+ anticrash_handler = dlsym(handle, "anticrash_handler");
1277+ if (anticrash_handler) {
1278+ fprintf(stderr, "anticrash handler enabled\n");
1279+ struct sigaction sigsegv_action;
1280+ struct sigaction old_sigsegv_action;
1281+
1282+ sigsegv_action.sa_sigaction = my_anticrash_sigsegv_handler;
1283+ sigemptyset(&(sigsegv_action.sa_mask));
1284+ sigsegv_action.sa_flags = SA_SIGINFO | SA_NODEFER;
1285+ sigaction(SIGSEGV, &sigsegv_action, &old_sigsegv_action);
1286+ }
1287+ }
1288+ handle = dlopen("libgetstack.so", RTLD_LAZY);
1289+ if (handle) {
1290+ show_stack_from_signal_handler =
1291+ dlsym(handle, "show_stack_from_signal_handler");
1292+ }
1293+
1294+ dpy = XOpenDisplay(NULL);
1295+ init_process_tab();
1296+ ret_string = malloc(32768);
1297+ my_strlen = strlen;
1298+ }
1299+
1300+ if (unlikely(last_func_number == _exit_process_func &&
1301+ func_number == _exit_process_func)) {
1302+ last_func_number = -1;
1303+ return 0;
1304+ }
1305+
1306+ if (last_process_id != pid) {
1307+ do_context_switch(dpy, pid, func_number);
1308+ last_process_id = pid;
1309+ }
1310+
1311+ if (unlikely(func_number == _exit_process_func))
1312+ last_process_id = 0;
1313+
1314+ argcpy:
1315+ reset_host_offset();
1316+
1317+ if (nb_args) {
1318+
1319+ if (argcpy_target_to_host(env, args, in_args, nb_args) == 0) {
1320+ fprintf(stderr, "call %s pid=%d\n",
1321+ tab_opengl_calls_name[func_number], pid);
1322+ fprintf(stderr, "cannot get call parameters\n");
1323+ disconnect_current();
1324+ return 0;
1325+ }
1326+
1327+ args_size =
1328+ (int *) get_host_read_pointer(env, in_args_size,
1329+ sizeof(int) * nb_args);
1330+ if (args_size == NULL) {
1331+ fprintf(stderr, "call %s pid=%d\n",
1332+ tab_opengl_calls_name[func_number], pid);
1333+ fprintf(stderr, "cannot get call parameters size\n");
1334+ disconnect_current();
1335+ return 0;
1336+ }
1337+ }
1338+
1339+ if (func_number == _serialized_calls_func) {
1340+ int command_buffer_size = args_size[0];
1341+ const void *command_buffer =
1342+ get_host_read_pointer(env, args[0], command_buffer_size);
1343+ int commmand_buffer_offset = 0;
1344+
1345+ args_size = NULL;
1346+#ifdef ENABLE_GL_LOG
1347+ if (is_logging(pid))
1348+ write_gl_debug_cmd_short(_serialized_calls_func);
1349+#endif
1350+
1351+ while (commmand_buffer_offset < command_buffer_size) {
1352+ func_number =
1353+ *(short *) (command_buffer + commmand_buffer_offset);
1354+ if (!(func_number >= 0 && func_number < GL_N_CALLS)) {
1355+ fprintf(stderr,
1356+ "func_number >= 0 && func_number < GL_N_CALLS failed at "
1357+ "commmand_buffer_offset=%d (command_buffer_size=%d)\n",
1358+ commmand_buffer_offset, command_buffer_size);
1359+ return 0;
1360+ }
1361+ commmand_buffer_offset += sizeof(short);
1362+#ifdef ENABLE_GL_LOG
1363+ if (is_logging(pid))
1364+ write_gl_debug_cmd_short(func_number);
1365+#endif
1366+
1367+ signature = (Signature *) tab_opengl_calls[func_number];
1368+ ret_type = signature->ret_type;
1369+ assert(ret_type == TYPE_NONE);
1370+ nb_args = signature->nb_args;
1371+ args_type = signature->args_type;
1372+
1373+ for (i = 0; i < nb_args; i++) {
1374+ switch (args_type[i]) {
1375+ case TYPE_UNSIGNED_INT:
1376+ case TYPE_INT:
1377+ case TYPE_UNSIGNED_CHAR:
1378+ case TYPE_CHAR:
1379+ case TYPE_UNSIGNED_SHORT:
1380+ case TYPE_SHORT:
1381+ case TYPE_FLOAT:
1382+ {
1383+ args[i] =
1384+ *(int *) (command_buffer +
1385+ commmand_buffer_offset);
1386+#ifdef ENABLE_GL_LOG
1387+ if (is_logging(pid))
1388+ write_gl_debug_cmd_int(args[i]);
1389+#endif
1390+ commmand_buffer_offset += sizeof(int);
1391+ break;
1392+ }
1393+
1394+ case TYPE_NULL_TERMINATED_STRING:
1395+ CASE_IN_UNKNOWN_SIZE_POINTERS:
1396+ {
1397+ int arg_size =
1398+ *(int *) (command_buffer +
1399+ commmand_buffer_offset);
1400+ commmand_buffer_offset += sizeof(int);
1401+
1402+ if (arg_size == 0) {
1403+ args[i] = 0;
1404+ } else {
1405+ args[i] =
1406+ (long) (command_buffer +
1407+ commmand_buffer_offset);
1408+ }
1409+
1410+ if (args[i] == 0) {
1411+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
1412+ fprintf(stderr, "call %s arg %d pid=%d\n",
1413+ tab_opengl_calls_name[func_number], i,
1414+ pid);
1415+ disconnect_current();
1416+ return 0;
1417+ }
1418+ } else {
1419+ if (arg_size == 0) {
1420+ fprintf(stderr, "call %s arg %d pid=%d\n",
1421+ tab_opengl_calls_name[func_number], i,
1422+ pid);
1423+ fprintf(stderr, "args_size[i] == 0 !!\n");
1424+ disconnect_current();
1425+ return 0;
1426+ }
1427+ }
1428+#ifdef ENABLE_GL_LOG
1429+ if (is_logging(pid))
1430+ write_gl_debug_cmd_buffer_with_size(arg_size,
1431+ (void *)
1432+ args[i]);
1433+#endif
1434+ commmand_buffer_offset += arg_size;
1435+
1436+ break;
1437+ }
1438+
1439+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
1440+ {
1441+ int arg_size =
1442+ compute_arg_length(stderr, func_number, i, args);
1443+ args[i] =
1444+ (arg_size) ? (long) (command_buffer +
1445+ commmand_buffer_offset) : 0;
1446+#ifdef ENABLE_GL_LOG
1447+ if (is_logging(pid))
1448+ write_gl_debug_cmd_buffer_without_size(arg_size,
1449+ (void *)
1450+ args[i]);
1451+#endif
1452+ commmand_buffer_offset += arg_size;
1453+ break;
1454+ }
1455+
1456+ CASE_OUT_POINTERS:
1457+ {
1458+ fprintf(stderr,
1459+ "shouldn't happen TYPE_OUT_xxxx : call %s arg %d pid=%d\n",
1460+ tab_opengl_calls_name[func_number], i, pid);
1461+ disconnect_current();
1462+ return 0;
1463+ }
1464+
1465+ case TYPE_DOUBLE:
1466+ CASE_IN_KNOWN_SIZE_POINTERS:
1467+ args[i] =
1468+ (long) (command_buffer + commmand_buffer_offset);
1469+#ifdef ENABLE_GL_LOG
1470+ if (is_logging(pid))
1471+ write_gl_debug_cmd_buffer_without_size(
1472+ tab_args_type_length[args_type[i]],
1473+ (void *) args[i]);
1474+#endif
1475+ commmand_buffer_offset +=
1476+ tab_args_type_length[args_type[i]];
1477+ break;
1478+
1479+ case TYPE_IN_IGNORED_POINTER:
1480+ args[i] = 0;
1481+ break;
1482+
1483+ default:
1484+ fprintf(stderr,
1485+ "shouldn't happen : call %s arg %d pid=%d\n",
1486+ tab_opengl_calls_name[func_number], i, pid);
1487+ disconnect_current();
1488+ return 0;
1489+ }
1490+ }
1491+ do_function_call(func_number, args, ret_string);
1492+ }
1493+
1494+ ret = 0;
1495+ } else {
1496+#ifdef ENABLE_GL_LOG
1497+ if (is_logging(pid))
1498+ write_gl_debug_cmd_short(func_number);
1499+#endif
1500+
1501+ for (i = 0; i < nb_args; i++) {
1502+ switch (args_type[i]) {
1503+ case TYPE_UNSIGNED_INT:
1504+ case TYPE_INT:
1505+ case TYPE_UNSIGNED_CHAR:
1506+ case TYPE_CHAR:
1507+ case TYPE_UNSIGNED_SHORT:
1508+ case TYPE_SHORT:
1509+ case TYPE_FLOAT:
1510+#ifdef ENABLE_GL_LOG
1511+ if (is_logging(pid))
1512+ write_gl_debug_cmd_int(args[i]);
1513+#endif
1514+ break;
1515+
1516+ case TYPE_NULL_TERMINATED_STRING:
1517+ CASE_IN_UNKNOWN_SIZE_POINTERS:
1518+ if (args[i] == 0 && args_size[i] == 0) {
1519+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
1520+ fprintf(stderr, "call %s arg %d pid=%d\n",
1521+ tab_opengl_calls_name[func_number], i, pid);
1522+ disconnect_current();
1523+ return 0;
1524+ }
1525+ } else if (args[i] == 0 && args_size[i] != 0) {
1526+ fprintf(stderr, "call %s arg %d pid=%d\n",
1527+ tab_opengl_calls_name[func_number], i, pid);
1528+ fprintf(stderr, "args[i] == 0 && args_size[i] != 0 !!\n");
1529+ disconnect_current();
1530+ return 0;
1531+ } else if (args[i] != 0 && args_size[i] == 0) {
1532+ fprintf(stderr, "call %s arg %d pid=%d\n",
1533+ tab_opengl_calls_name[func_number], i, pid);
1534+ fprintf(stderr, "args[i] != 0 && args_size[i] == 0 !!\n");
1535+ disconnect_current();
1536+ return 0;
1537+ }
1538+ if (args[i]) {
1539+ args[i] =
1540+ (arg_t) get_host_read_pointer(env, args[i],
1541+ args_size[i]);
1542+ if (args[i] == 0) {
1543+ fprintf(stderr, "call %s arg %d pid=%d\n",
1544+ tab_opengl_calls_name[func_number], i, pid);
1545+ fprintf(stderr, "can not get %d bytes\n",
1546+ args_size[i]);
1547+ disconnect_current();
1548+ return 0;
1549+ }
1550+ }
1551+#ifdef ENABLE_GL_LOG
1552+ if (is_logging(pid))
1553+ write_gl_debug_cmd_buffer_with_size(args_size[i],
1554+ (void *) args[i]);
1555+#endif
1556+ break;
1557+
1558+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
1559+ {
1560+ args_size[i] =
1561+ compute_arg_length(stderr, func_number, i, args);
1562+ args[i] = (args_size[i]) ? (arg_t)
1563+ get_host_read_pointer(env,
1564+ args[i], args_size [i]) : 0;
1565+ if (args[i] == 0 && args_size[i] != 0) {
1566+ fprintf(stderr, "call %s arg %d pid=%d\n",
1567+ tab_opengl_calls_name[func_number], i, pid);
1568+ fprintf(stderr, "can not get %d bytes\n",
1569+ args_size[i]);
1570+ disconnect_current();
1571+ return 0;
1572+ }
1573+#ifdef ENABLE_GL_LOG
1574+ if (is_logging(pid))
1575+ write_gl_debug_cmd_buffer_without_size(args_size[i],
1576+ (void *) args[i]);
1577+#endif
1578+ break;
1579+ }
1580+
1581+ CASE_OUT_POINTERS:
1582+ {
1583+ int mem_state;
1584+
1585+#ifdef ENABLE_GL_LOG
1586+ if (is_logging(pid))
1587+ switch (args_type[i]) {
1588+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
1589+ write_gl_debug_cmd_int(args_size[i]);
1590+ break;
1591+
1592+ default:
1593+ break;
1594+ }
1595+#endif
1596+
1597+ if (func_number == glXQueryExtension_func && args[i] == 0) {
1598+ saved_out_ptr[i] = 0;
1599+ continue;
1600+ }
1601+ if (args[i] == 0 && args_size[i] == 0) {
1602+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
1603+ fprintf(stderr, "call %s arg %d pid=%d\n",
1604+ tab_opengl_calls_name[func_number], i,
1605+ pid);
1606+ disconnect_current();
1607+ return 0;
1608+ }
1609+ fprintf(stderr, "call %s arg %d pid=%d\n",
1610+ tab_opengl_calls_name[func_number], i, pid);
1611+ disconnect_current();
1612+ return 0;
1613+ } else if (args[i] == 0 && args_size[i] != 0) {
1614+ fprintf(stderr, "call %s arg %d pid=%d\n",
1615+ tab_opengl_calls_name[func_number], i, pid);
1616+ fprintf(stderr,
1617+ "args[i] == 0 && args_size[i] != 0 !!\n");
1618+ disconnect_current();
1619+ return 0;
1620+ } else if (args[i] != 0 && args_size[i] == 0) {
1621+ fprintf(stderr, "call %s arg %d pid=%d\n",
1622+ tab_opengl_calls_name[func_number], i, pid);
1623+ fprintf(stderr,
1624+ "args[i] != 0 && args_size[i] == 0 !!\n");
1625+ disconnect_current();
1626+ return 0;
1627+ }
1628+ if (args[i]) {
1629+ mem_state =
1630+ get_target_mem_state(env, args[i], args_size[i]);
1631+ if (mem_state == NOT_MAPPED) {
1632+ fprintf(stderr,
1633+ "call %s arg %d pid=%d addr="
1634+ TARGET_FMT_lx " size=%d NOT_MAPPED\n",
1635+ tab_opengl_calls_name[func_number], i,
1636+ pid, args[i], args_size[i]);
1637+ disconnect_current();
1638+ return 0;
1639+ } else if (mem_state == MAPPED_CONTIGUOUS) {
1640+ saved_out_ptr[i] = 0;
1641+ args[i] = (arg_t) get_phys_mem_addr(env, args[i]);
1642+ } else {
1643+ saved_out_ptr[i] = args[i];
1644+ args[i] = (arg_t) malloc(args_size[i]);
1645+ }
1646+ } else {
1647+ saved_out_ptr[i] = 0;
1648+ }
1649+ break;
1650+ }
1651+
1652+ case TYPE_DOUBLE:
1653+ CASE_IN_KNOWN_SIZE_POINTERS:
1654+ if (args[i] == 0) {
1655+ fprintf(stderr, "call %s arg %d pid=%d\n",
1656+ tab_opengl_calls_name[func_number], i, pid);
1657+ fprintf(stderr, "can not get %d bytes\n",
1658+ tab_args_type_length[args_type[i]]);
1659+ disconnect_current();
1660+ return 0;
1661+ }
1662+ args[i] = (arg_t) get_host_read_pointer(env,
1663+ args[i], tab_args_type_length[args_type[i]]);
1664+ if (args[i] == 0) {
1665+ fprintf(stderr, "call %s arg %d pid=%d\n",
1666+ tab_opengl_calls_name[func_number], i, pid);
1667+ fprintf(stderr, "can not get %d bytes\n",
1668+ tab_args_type_length[args_type[i]]);
1669+ disconnect_current();
1670+ return 0;
1671+ }
1672+#ifdef ENABLE_GL_LOG
1673+ if (is_logging(pid))
1674+ write_gl_debug_cmd_buffer_without_size
1675+ (tab_args_type_length[args_type[i]],
1676+ (void *) args[i]);
1677+#endif
1678+ break;
1679+
1680+ case TYPE_IN_IGNORED_POINTER:
1681+ args[i] = 0;
1682+ break;
1683+
1684+ default:
1685+ fprintf(stderr, "shouldn't happen : call %s arg %d pid=%d\n",
1686+ tab_opengl_calls_name[func_number], i, pid);
1687+ disconnect_current();
1688+ return 0;
1689+ }
1690+ }
1691+
1692+ if (ret_type == TYPE_CONST_CHAR) {
1693+ ret_string[0] = 0;
1694+ }
1695+
1696+ if (func_number == _init32_func || func_number == _init64_func) {
1697+ if (func_number == _init32_func) {
1698+ if (!wordsize) {
1699+ wordsize = 32;
1700+ argcpy_target_to_host = memcpy_target32_to_host;
1701+ goto argcpy;
1702+ }
1703+
1704+ if (wordsize != 32) {
1705+ fprintf(stderr,
1706+ "clients with different ABIs not supported\n");
1707+ exit(-1);
1708+ }
1709+ } else {
1710+ if (!wordsize) {
1711+ wordsize = 64;
1712+ argcpy_target_to_host = memcpy_target64_to_host;
1713+ goto argcpy;
1714+ }
1715+
1716+ if (wordsize != 64) {
1717+ fprintf(stderr,
1718+ "clients with different ABIs not supported\n");
1719+ exit(-1);
1720+ }
1721+ }
1722+
1723+ if (must_save && args[0])
1724+ fprintf(stderr, "error: pid %i is already recording\n",
1725+ logger_pid);
1726+ else if (args[0]) {
1727+ logger_pid = pid;
1728+ must_save = 1;
1729+ }
1730+#ifdef USE_KQEMU
1731+ if (env->kqemu_enabled)
1732+ *(int *) args[1] = 2;
1733+ else
1734+#endif
1735+ *(int *) args[1] = 1;
1736+ ret = 0;
1737+ } else {
1738+ ret = do_function_call(func_number, args, ret_string);
1739+ }
1740+#ifdef ENABLE_GL_LOG
1741+ if (is_logging(pid) && func_number == glXGetVisualFromFBConfig_func)
1742+ write_gl_debug_cmd_int(ret);
1743+#endif
1744+ for (i = 0; i < nb_args; i++) {
1745+ switch (args_type[i]) {
1746+ CASE_OUT_POINTERS:
1747+ {
1748+ if (saved_out_ptr[i]) {
1749+ if (memcpy_host_to_target(env, saved_out_ptr[i],
1750+ (void *) args[i],
1751+ args_size[i]) == 0) {
1752+ fprintf(stderr, "could not copy out parameters "
1753+ "back to user space\n");
1754+ disconnect_current();
1755+ return 0;
1756+ }
1757+ free((void *) args[i]);
1758+ }
1759+ break;
1760+ }
1761+
1762+ default:
1763+ break;
1764+ }
1765+ }
1766+
1767+ if (ret_type == TYPE_CONST_CHAR)
1768+ if (target_ret_string) {
1769+ /* the my_strlen stuff is a hack to workaround a GCC bug if
1770+ * using directly strlen... */
1771+ if (memcpy_host_to_target(env, target_ret_string, ret_string,
1772+ my_strlen(ret_string) + 1) == 0) {
1773+ fprintf(stderr, "cannot copy out parameters "
1774+ "back to user space\n");
1775+ disconnect_current();
1776+ return 0;
1777+ }
1778+ }
1779+ }
1780+
1781+#ifdef ENABLE_GL_LOG
1782+ if (is_logging(pid) && func_number == _exit_process_func) {
1783+ write_gl_debug_end();
1784+ }
1785+#endif
1786+
1787+ return ret;
1788+}
1789+
1790+static int decode_call(CPUState *env, int func_number, int pid,
1791+ target_ulong target_ret_string, target_ulong in_args,
1792+ target_ulong in_args_size)
1793+{
1794+ if (!(func_number >= 0 && func_number < GL_N_CALLS)) {
1795+ fprintf(stderr,
1796+ "func_number >= 0 && func_number < GL_N_CALLS failed\n");
1797+ return 0;
1798+ }
1799+
1800+ return decode_call_int(env, func_number, pid,
1801+ target_ret_string, in_args, in_args_size);
1802+}
1803+
1804+void helper_opengl(void)
1805+{
1806+ doing_opengl = 1;
1807+ env->regs[R_EAX] =
1808+ decode_call(env, env->regs[R_EAX], env->regs[R_EBX], env->regs[R_ECX],
1809+ env->regs[R_EDX], env->regs[R_ESI]);
1810+ doing_opengl = 0;
1811+}
1812+#endif
1813Index: trunk/target-i386/mesa_enums.c
1814===================================================================
1815--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1816+++ trunk/target-i386/mesa_enums.c 2009-01-19 23:06:08.000000000 +0000
1817@@ -0,0 +1,4890 @@
1818+/* DO NOT EDIT - This file generated automatically by gl_enums.py (from Mesa) script */
1819+
1820+/*
1821+ * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
1822+ * All Rights Reserved.
1823+ *
1824+ * Permission is hereby granted, free of charge, to any person obtaining a
1825+ * copy of this software and associated documentation files (the "Software"),
1826+ * to deal in the Software without restriction, including without limitation
1827+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
1828+ * and/or sell copies of the Software, and to permit persons to whom the
1829+ * Software is furnished to do so, subject to the following conditions:
1830+ *
1831+ * The above copyright notice and this permission notice (including the next
1832+ * paragraph) shall be included in all copies or substantial portions of the
1833+ * Software.
1834+ *
1835+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1836+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1837+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
1838+ * BRIAN PAUL,
1839+ * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
1840+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
1841+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1842+ * SOFTWARE.
1843+ */
1844+
1845+#include "glheader.h"
1846+#include "enums.h"
1847+#include "imports.h"
1848+
1849+typedef struct {
1850+ size_t offset;
1851+ int n;
1852+} enum_elt;
1853+
1854+LONGSTRING static const char enum_string_table[] =
1855+ "GL_2D\0"
1856+ "GL_2_BYTES\0"
1857+ "GL_3D\0"
1858+ "GL_3D_COLOR\0"
1859+ "GL_3D_COLOR_TEXTURE\0"
1860+ "GL_3_BYTES\0"
1861+ "GL_4D_COLOR_TEXTURE\0"
1862+ "GL_4_BYTES\0"
1863+ "GL_ACCUM\0"
1864+ "GL_ACCUM_ALPHA_BITS\0"
1865+ "GL_ACCUM_BLUE_BITS\0"
1866+ "GL_ACCUM_BUFFER_BIT\0"
1867+ "GL_ACCUM_CLEAR_VALUE\0"
1868+ "GL_ACCUM_GREEN_BITS\0"
1869+ "GL_ACCUM_RED_BITS\0"
1870+ "GL_ACTIVE_ATTRIBUTES\0"
1871+ "GL_ACTIVE_ATTRIBUTE_MAX_LENGTH\0"
1872+ "GL_ACTIVE_STENCIL_FACE_EXT\0"
1873+ "GL_ACTIVE_TEXTURE\0"
1874+ "GL_ACTIVE_TEXTURE_ARB\0"
1875+ "GL_ACTIVE_UNIFORMS\0"
1876+ "GL_ACTIVE_UNIFORM_MAX_LENGTH\0"
1877+ "GL_ACTIVE_VERTEX_UNITS_ARB\0"
1878+ "GL_ADD\0"
1879+ "GL_ADD_SIGNED\0"
1880+ "GL_ADD_SIGNED_ARB\0"
1881+ "GL_ADD_SIGNED_EXT\0"
1882+ "GL_ALIASED_LINE_WIDTH_RANGE\0"
1883+ "GL_ALIASED_POINT_SIZE_RANGE\0"
1884+ "GL_ALL_ATTRIB_BITS\0"
1885+ "GL_ALL_CLIENT_ATTRIB_BITS\0"
1886+ "GL_ALPHA\0"
1887+ "GL_ALPHA12\0"
1888+ "GL_ALPHA12_EXT\0"
1889+ "GL_ALPHA16\0"
1890+ "GL_ALPHA16_EXT\0"
1891+ "GL_ALPHA4\0"
1892+ "GL_ALPHA4_EXT\0"
1893+ "GL_ALPHA8\0"
1894+ "GL_ALPHA8_EXT\0"
1895+ "GL_ALPHA_BIAS\0"
1896+ "GL_ALPHA_BITS\0"
1897+ "GL_ALPHA_SCALE\0"
1898+ "GL_ALPHA_TEST\0"
1899+ "GL_ALPHA_TEST_FUNC\0"
1900+ "GL_ALPHA_TEST_REF\0"
1901+ "GL_ALWAYS\0"
1902+ "GL_AMBIENT\0"
1903+ "GL_AMBIENT_AND_DIFFUSE\0"
1904+ "GL_AND\0"
1905+ "GL_AND_INVERTED\0"
1906+ "GL_AND_REVERSE\0"
1907+ "GL_ARRAY_BUFFER\0"
1908+ "GL_ARRAY_BUFFER_ARB\0"
1909+ "GL_ARRAY_BUFFER_BINDING\0"
1910+ "GL_ARRAY_BUFFER_BINDING_ARB\0"
1911+ "GL_ATTACHED_SHADERS\0"
1912+ "GL_ATTRIB_ARRAY_POINTER_NV\0"
1913+ "GL_ATTRIB_ARRAY_SIZE_NV\0"
1914+ "GL_ATTRIB_ARRAY_STRIDE_NV\0"
1915+ "GL_ATTRIB_ARRAY_TYPE_NV\0"
1916+ "GL_ATTRIB_STACK_DEPTH\0"
1917+ "GL_AUTO_NORMAL\0"
1918+ "GL_AUX0\0"
1919+ "GL_AUX1\0"
1920+ "GL_AUX2\0"
1921+ "GL_AUX3\0"
1922+ "GL_AUX_BUFFERS\0"
1923+ "GL_BACK\0"
1924+ "GL_BACK_LEFT\0"
1925+ "GL_BACK_RIGHT\0"
1926+ "GL_BGR\0"
1927+ "GL_BGRA\0"
1928+ "GL_BITMAP\0"
1929+ "GL_BITMAP_TOKEN\0"
1930+ "GL_BLEND\0"
1931+ "GL_BLEND_COLOR\0"
1932+ "GL_BLEND_COLOR_EXT\0"
1933+ "GL_BLEND_DST\0"
1934+ "GL_BLEND_DST_ALPHA\0"
1935+ "GL_BLEND_DST_RGB\0"
1936+ "GL_BLEND_EQUATION\0"
1937+ "GL_BLEND_EQUATION_ALPHA\0"
1938+ "GL_BLEND_EQUATION_ALPHA_EXT\0"
1939+ "GL_BLEND_EQUATION_EXT\0"
1940+ "GL_BLEND_EQUATION_RGB_EXT\0"
1941+ "GL_BLEND_SRC\0"
1942+ "GL_BLEND_SRC_ALPHA\0"
1943+ "GL_BLEND_SRC_RGB\0"
1944+ "GL_BLUE\0"
1945+ "GL_BLUE_BIAS\0"
1946+ "GL_BLUE_BITS\0"
1947+ "GL_BLUE_SCALE\0"
1948+ "GL_BOOL\0"
1949+ "GL_BOOL_ARB\0"
1950+ "GL_BOOL_VEC2\0"
1951+ "GL_BOOL_VEC2_ARB\0"
1952+ "GL_BOOL_VEC3\0"
1953+ "GL_BOOL_VEC3_ARB\0"
1954+ "GL_BOOL_VEC4\0"
1955+ "GL_BOOL_VEC4_ARB\0"
1956+ "GL_BUFFER_ACCESS\0"
1957+ "GL_BUFFER_ACCESS_ARB\0"
1958+ "GL_BUFFER_MAPPED\0"
1959+ "GL_BUFFER_MAPPED_ARB\0"
1960+ "GL_BUFFER_MAP_POINTER\0"
1961+ "GL_BUFFER_MAP_POINTER_ARB\0"
1962+ "GL_BUFFER_SIZE\0"
1963+ "GL_BUFFER_SIZE_ARB\0"
1964+ "GL_BUFFER_USAGE\0"
1965+ "GL_BUFFER_USAGE_ARB\0"
1966+ "GL_BYTE\0"
1967+ "GL_C3F_V3F\0"
1968+ "GL_C4F_N3F_V3F\0"
1969+ "GL_C4UB_V2F\0"
1970+ "GL_C4UB_V3F\0"
1971+ "GL_CCW\0"
1972+ "GL_CLAMP\0"
1973+ "GL_CLAMP_TO_BORDER\0"
1974+ "GL_CLAMP_TO_BORDER_ARB\0"
1975+ "GL_CLAMP_TO_BORDER_SGIS\0"
1976+ "GL_CLAMP_TO_EDGE\0"
1977+ "GL_CLAMP_TO_EDGE_SGIS\0"
1978+ "GL_CLEAR\0"
1979+ "GL_CLIENT_ACTIVE_TEXTURE\0"
1980+ "GL_CLIENT_ACTIVE_TEXTURE_ARB\0"
1981+ "GL_CLIENT_ALL_ATTRIB_BITS\0"
1982+ "GL_CLIENT_ATTRIB_STACK_DEPTH\0"
1983+ "GL_CLIENT_PIXEL_STORE_BIT\0"
1984+ "GL_CLIENT_VERTEX_ARRAY_BIT\0"
1985+ "GL_CLIP_PLANE0\0"
1986+ "GL_CLIP_PLANE1\0"
1987+ "GL_CLIP_PLANE2\0"
1988+ "GL_CLIP_PLANE3\0"
1989+ "GL_CLIP_PLANE4\0"
1990+ "GL_CLIP_PLANE5\0"
1991+ "GL_CLIP_VOLUME_CLIPPING_HINT_EXT\0"
1992+ "GL_COEFF\0"
1993+ "GL_COLOR\0"
1994+ "GL_COLOR_ARRAY\0"
1995+ "GL_COLOR_ARRAY_BUFFER_BINDING\0"
1996+ "GL_COLOR_ARRAY_BUFFER_BINDING_ARB\0"
1997+ "GL_COLOR_ARRAY_POINTER\0"
1998+ "GL_COLOR_ARRAY_SIZE\0"
1999+ "GL_COLOR_ARRAY_STRIDE\0"
2000+ "GL_COLOR_ARRAY_TYPE\0"
2001+ "GL_COLOR_ATTACHMENT0_EXT\0"
2002+ "GL_COLOR_ATTACHMENT10_EXT\0"
2003+ "GL_COLOR_ATTACHMENT11_EXT\0"
2004+ "GL_COLOR_ATTACHMENT12_EXT\0"
2005+ "GL_COLOR_ATTACHMENT13_EXT\0"
2006+ "GL_COLOR_ATTACHMENT14_EXT\0"
2007+ "GL_COLOR_ATTACHMENT15_EXT\0"
2008+ "GL_COLOR_ATTACHMENT1_EXT\0"
2009+ "GL_COLOR_ATTACHMENT2_EXT\0"
2010+ "GL_COLOR_ATTACHMENT3_EXT\0"
2011+ "GL_COLOR_ATTACHMENT4_EXT\0"
2012+ "GL_COLOR_ATTACHMENT5_EXT\0"
2013+ "GL_COLOR_ATTACHMENT6_EXT\0"
2014+ "GL_COLOR_ATTACHMENT7_EXT\0"
2015+ "GL_COLOR_ATTACHMENT8_EXT\0"
2016+ "GL_COLOR_ATTACHMENT9_EXT\0"
2017+ "GL_COLOR_BUFFER_BIT\0"
2018+ "GL_COLOR_CLEAR_VALUE\0"
2019+ "GL_COLOR_INDEX\0"
2020+ "GL_COLOR_INDEXES\0"
2021+ "GL_COLOR_LOGIC_OP\0"
2022+ "GL_COLOR_MATERIAL\0"
2023+ "GL_COLOR_MATERIAL_FACE\0"
2024+ "GL_COLOR_MATERIAL_PARAMETER\0"
2025+ "GL_COLOR_MATRIX\0"
2026+ "GL_COLOR_MATRIX_SGI\0"
2027+ "GL_COLOR_MATRIX_STACK_DEPTH\0"
2028+ "GL_COLOR_MATRIX_STACK_DEPTH_SGI\0"
2029+ "GL_COLOR_SUM\0"
2030+ "GL_COLOR_SUM_ARB\0"
2031+ "GL_COLOR_TABLE\0"
2032+ "GL_COLOR_TABLE_ALPHA_SIZE\0"
2033+ "GL_COLOR_TABLE_ALPHA_SIZE_EXT\0"
2034+ "GL_COLOR_TABLE_ALPHA_SIZE_SGI\0"
2035+ "GL_COLOR_TABLE_BIAS\0"
2036+ "GL_COLOR_TABLE_BIAS_SGI\0"
2037+ "GL_COLOR_TABLE_BLUE_SIZE\0"
2038+ "GL_COLOR_TABLE_BLUE_SIZE_EXT\0"
2039+ "GL_COLOR_TABLE_BLUE_SIZE_SGI\0"
2040+ "GL_COLOR_TABLE_FORMAT\0"
2041+ "GL_COLOR_TABLE_FORMAT_EXT\0"
2042+ "GL_COLOR_TABLE_FORMAT_SGI\0"
2043+ "GL_COLOR_TABLE_GREEN_SIZE\0"
2044+ "GL_COLOR_TABLE_GREEN_SIZE_EXT\0"
2045+ "GL_COLOR_TABLE_GREEN_SIZE_SGI\0"
2046+ "GL_COLOR_TABLE_INTENSITY_SIZE\0"
2047+ "GL_COLOR_TABLE_INTENSITY_SIZE_EXT\0"
2048+ "GL_COLOR_TABLE_INTENSITY_SIZE_SGI\0"
2049+ "GL_COLOR_TABLE_LUMINANCE_SIZE\0"
2050+ "GL_COLOR_TABLE_LUMINANCE_SIZE_EXT\0"
2051+ "GL_COLOR_TABLE_LUMINANCE_SIZE_SGI\0"
2052+ "GL_COLOR_TABLE_RED_SIZE\0"
2053+ "GL_COLOR_TABLE_RED_SIZE_EXT\0"
2054+ "GL_COLOR_TABLE_RED_SIZE_SGI\0"
2055+ "GL_COLOR_TABLE_SCALE\0"
2056+ "GL_COLOR_TABLE_SCALE_SGI\0"
2057+ "GL_COLOR_TABLE_WIDTH\0"
2058+ "GL_COLOR_TABLE_WIDTH_EXT\0"
2059+ "GL_COLOR_TABLE_WIDTH_SGI\0"
2060+ "GL_COLOR_WRITEMASK\0"
2061+ "GL_COMBINE\0"
2062+ "GL_COMBINE4\0"
2063+ "GL_COMBINE_ALPHA\0"
2064+ "GL_COMBINE_ALPHA_ARB\0"
2065+ "GL_COMBINE_ALPHA_EXT\0"
2066+ "GL_COMBINE_ARB\0"
2067+ "GL_COMBINE_EXT\0"
2068+ "GL_COMBINE_RGB\0"
2069+ "GL_COMBINE_RGB_ARB\0"
2070+ "GL_COMBINE_RGB_EXT\0"
2071+ "GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT\0"
2072+ "GL_COMPARE_R_TO_TEXTURE\0"
2073+ "GL_COMPARE_R_TO_TEXTURE_ARB\0"
2074+ "GL_COMPILE\0"
2075+ "GL_COMPILE_AND_EXECUTE\0"
2076+ "GL_COMPILE_STATUS\0"
2077+ "GL_COMPRESSED_ALPHA\0"
2078+ "GL_COMPRESSED_ALPHA_ARB\0"
2079+ "GL_COMPRESSED_INTENSITY\0"
2080+ "GL_COMPRESSED_INTENSITY_ARB\0"
2081+ "GL_COMPRESSED_LUMINANCE\0"
2082+ "GL_COMPRESSED_LUMINANCE_ALPHA\0"
2083+ "GL_COMPRESSED_LUMINANCE_ALPHA_ARB\0"
2084+ "GL_COMPRESSED_LUMINANCE_ARB\0"
2085+ "GL_COMPRESSED_RGB\0"
2086+ "GL_COMPRESSED_RGBA\0"
2087+ "GL_COMPRESSED_RGBA_ARB\0"
2088+ "GL_COMPRESSED_RGBA_FXT1_3DFX\0"
2089+ "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT\0"
2090+ "GL_COMPRESSED_RGBA_S3TC_DXT3_EXT\0"
2091+ "GL_COMPRESSED_RGBA_S3TC_DXT5_EXT\0"
2092+ "GL_COMPRESSED_RGB_ARB\0"
2093+ "GL_COMPRESSED_RGB_FXT1_3DFX\0"
2094+ "GL_COMPRESSED_RGB_S3TC_DXT1_EXT\0"
2095+ "GL_COMPRESSED_TEXTURE_FORMATS\0"
2096+ "GL_CONSTANT\0"
2097+ "GL_CONSTANT_ALPHA\0"
2098+ "GL_CONSTANT_ALPHA_EXT\0"
2099+ "GL_CONSTANT_ARB\0"
2100+ "GL_CONSTANT_ATTENUATION\0"
2101+ "GL_CONSTANT_BORDER_HP\0"
2102+ "GL_CONSTANT_COLOR\0"
2103+ "GL_CONSTANT_COLOR_EXT\0"
2104+ "GL_CONSTANT_EXT\0"
2105+ "GL_CONVOLUTION_1D\0"
2106+ "GL_CONVOLUTION_2D\0"
2107+ "GL_CONVOLUTION_BORDER_COLOR\0"
2108+ "GL_CONVOLUTION_BORDER_COLOR_HP\0"
2109+ "GL_CONVOLUTION_BORDER_MODE\0"
2110+ "GL_CONVOLUTION_BORDER_MODE_EXT\0"
2111+ "GL_CONVOLUTION_FILTER_BIAS\0"
2112+ "GL_CONVOLUTION_FILTER_BIAS_EXT\0"
2113+ "GL_CONVOLUTION_FILTER_SCALE\0"
2114+ "GL_CONVOLUTION_FILTER_SCALE_EXT\0"
2115+ "GL_CONVOLUTION_FORMAT\0"
2116+ "GL_CONVOLUTION_FORMAT_EXT\0"
2117+ "GL_CONVOLUTION_HEIGHT\0"
2118+ "GL_CONVOLUTION_HEIGHT_EXT\0"
2119+ "GL_CONVOLUTION_WIDTH\0"
2120+ "GL_CONVOLUTION_WIDTH_EXT\0"
2121+ "GL_COORD_REPLACE\0"
2122+ "GL_COORD_REPLACE_ARB\0"
2123+ "GL_COORD_REPLACE_NV\0"
2124+ "GL_COPY\0"
2125+ "GL_COPY_INVERTED\0"
2126+ "GL_COPY_PIXEL_TOKEN\0"
2127+ "GL_CULL_FACE\0"
2128+ "GL_CULL_FACE_MODE\0"
2129+ "GL_CULL_VERTEX_EXT\0"
2130+ "GL_CULL_VERTEX_EYE_POSITION_EXT\0"
2131+ "GL_CULL_VERTEX_OBJECT_POSITION_EXT\0"
2132+ "GL_CURRENT_ATTRIB_NV\0"
2133+ "GL_CURRENT_BIT\0"
2134+ "GL_CURRENT_COLOR\0"
2135+ "GL_CURRENT_FOG_COORD\0"
2136+ "GL_CURRENT_FOG_COORDINATE\0"
2137+ "GL_CURRENT_INDEX\0"
2138+ "GL_CURRENT_MATRIX_ARB\0"
2139+ "GL_CURRENT_MATRIX_INDEX_ARB\0"
2140+ "GL_CURRENT_MATRIX_NV\0"
2141+ "GL_CURRENT_MATRIX_STACK_DEPTH_ARB\0"
2142+ "GL_CURRENT_MATRIX_STACK_DEPTH_NV\0"
2143+ "GL_CURRENT_NORMAL\0"
2144+ "GL_CURRENT_PALETTE_MATRIX_ARB\0"
2145+ "GL_CURRENT_PROGRAM\0"
2146+ "GL_CURRENT_QUERY\0"
2147+ "GL_CURRENT_QUERY_ARB\0"
2148+ "GL_CURRENT_RASTER_COLOR\0"
2149+ "GL_CURRENT_RASTER_DISTANCE\0"
2150+ "GL_CURRENT_RASTER_INDEX\0"
2151+ "GL_CURRENT_RASTER_POSITION\0"
2152+ "GL_CURRENT_RASTER_POSITION_VALID\0"
2153+ "GL_CURRENT_RASTER_TEXTURE_COORDS\0"
2154+ "GL_CURRENT_SECONDARY_COLOR\0"
2155+ "GL_CURRENT_TEXTURE_COORDS\0"
2156+ "GL_CURRENT_VERTEX_ATTRIB\0"
2157+ "GL_CURRENT_VERTEX_ATTRIB_ARB\0"
2158+ "GL_CURRENT_WEIGHT_ARB\0"
2159+ "GL_CW\0"
2160+ "GL_DEBUG_ASSERT_MESA\0"
2161+ "GL_DEBUG_OBJECT_MESA\0"
2162+ "GL_DEBUG_PRINT_MESA\0"
2163+ "GL_DECAL\0"
2164+ "GL_DECR\0"
2165+ "GL_DECR_WRAP\0"
2166+ "GL_DECR_WRAP_EXT\0"
2167+ "GL_DELETE_STATUS\0"
2168+ "GL_DEPTH\0"
2169+ "GL_DEPTH_ATTACHMENT_EXT\0"
2170+ "GL_DEPTH_BIAS\0"
2171+ "GL_DEPTH_BITS\0"
2172+ "GL_DEPTH_BOUNDS_EXT\0"
2173+ "GL_DEPTH_BOUNDS_TEST_EXT\0"
2174+ "GL_DEPTH_BUFFER_BIT\0"
2175+ "GL_DEPTH_CLAMP_NV\0"
2176+ "GL_DEPTH_CLEAR_VALUE\0"
2177+ "GL_DEPTH_COMPONENT\0"
2178+ "GL_DEPTH_COMPONENT16\0"
2179+ "GL_DEPTH_COMPONENT16_ARB\0"
2180+ "GL_DEPTH_COMPONENT16_SGIX\0"
2181+ "GL_DEPTH_COMPONENT24\0"
2182+ "GL_DEPTH_COMPONENT24_ARB\0"
2183+ "GL_DEPTH_COMPONENT24_SGIX\0"
2184+ "GL_DEPTH_COMPONENT32\0"
2185+ "GL_DEPTH_COMPONENT32_ARB\0"
2186+ "GL_DEPTH_COMPONENT32_SGIX\0"
2187+ "GL_DEPTH_FUNC\0"
2188+ "GL_DEPTH_RANGE\0"
2189+ "GL_DEPTH_SCALE\0"
2190+ "GL_DEPTH_STENCIL_NV\0"
2191+ "GL_DEPTH_STENCIL_TO_BGRA_NV\0"
2192+ "GL_DEPTH_STENCIL_TO_RGBA_NV\0"
2193+ "GL_DEPTH_TEST\0"
2194+ "GL_DEPTH_TEXTURE_MODE\0"
2195+ "GL_DEPTH_TEXTURE_MODE_ARB\0"
2196+ "GL_DEPTH_WRITEMASK\0"
2197+ "GL_DIFFUSE\0"
2198+ "GL_DITHER\0"
2199+ "GL_DOMAIN\0"
2200+ "GL_DONT_CARE\0"
2201+ "GL_DOT3_RGB\0"
2202+ "GL_DOT3_RGBA\0"
2203+ "GL_DOT3_RGBA_ARB\0"
2204+ "GL_DOT3_RGBA_EXT\0"
2205+ "GL_DOT3_RGB_ARB\0"
2206+ "GL_DOT3_RGB_EXT\0"
2207+ "GL_DOUBLE\0"
2208+ "GL_DOUBLEBUFFER\0"
2209+ "GL_DRAW_BUFFER\0"
2210+ "GL_DRAW_BUFFER0\0"
2211+ "GL_DRAW_BUFFER0_ARB\0"
2212+ "GL_DRAW_BUFFER0_ATI\0"
2213+ "GL_DRAW_BUFFER1\0"
2214+ "GL_DRAW_BUFFER10\0"
2215+ "GL_DRAW_BUFFER10_ARB\0"
2216+ "GL_DRAW_BUFFER10_ATI\0"
2217+ "GL_DRAW_BUFFER11\0"
2218+ "GL_DRAW_BUFFER11_ARB\0"
2219+ "GL_DRAW_BUFFER11_ATI\0"
2220+ "GL_DRAW_BUFFER12\0"
2221+ "GL_DRAW_BUFFER12_ARB\0"
2222+ "GL_DRAW_BUFFER12_ATI\0"
2223+ "GL_DRAW_BUFFER13\0"
2224+ "GL_DRAW_BUFFER13_ARB\0"
2225+ "GL_DRAW_BUFFER13_ATI\0"
2226+ "GL_DRAW_BUFFER14\0"
2227+ "GL_DRAW_BUFFER14_ARB\0"
2228+ "GL_DRAW_BUFFER14_ATI\0"
2229+ "GL_DRAW_BUFFER15\0"
2230+ "GL_DRAW_BUFFER15_ARB\0"
2231+ "GL_DRAW_BUFFER15_ATI\0"
2232+ "GL_DRAW_BUFFER1_ARB\0"
2233+ "GL_DRAW_BUFFER1_ATI\0"
2234+ "GL_DRAW_BUFFER2\0"
2235+ "GL_DRAW_BUFFER2_ARB\0"
2236+ "GL_DRAW_BUFFER2_ATI\0"
2237+ "GL_DRAW_BUFFER3\0"
2238+ "GL_DRAW_BUFFER3_ARB\0"
2239+ "GL_DRAW_BUFFER3_ATI\0"
2240+ "GL_DRAW_BUFFER4\0"
2241+ "GL_DRAW_BUFFER4_ARB\0"
2242+ "GL_DRAW_BUFFER4_ATI\0"
2243+ "GL_DRAW_BUFFER5\0"
2244+ "GL_DRAW_BUFFER5_ARB\0"
2245+ "GL_DRAW_BUFFER5_ATI\0"
2246+ "GL_DRAW_BUFFER6\0"
2247+ "GL_DRAW_BUFFER6_ARB\0"
2248+ "GL_DRAW_BUFFER6_ATI\0"
2249+ "GL_DRAW_BUFFER7\0"
2250+ "GL_DRAW_BUFFER7_ARB\0"
2251+ "GL_DRAW_BUFFER7_ATI\0"
2252+ "GL_DRAW_BUFFER8\0"
2253+ "GL_DRAW_BUFFER8_ARB\0"
2254+ "GL_DRAW_BUFFER8_ATI\0"
2255+ "GL_DRAW_BUFFER9\0"
2256+ "GL_DRAW_BUFFER9_ARB\0"
2257+ "GL_DRAW_BUFFER9_ATI\0"
2258+ "GL_DRAW_FRAMEBUFFER_BINDING_EXT\0"
2259+ "GL_DRAW_FRAMEBUFFER_EXT\0"
2260+ "GL_DRAW_PIXEL_TOKEN\0"
2261+ "GL_DST_ALPHA\0"
2262+ "GL_DST_COLOR\0"
2263+ "GL_DYNAMIC_COPY\0"
2264+ "GL_DYNAMIC_COPY_ARB\0"
2265+ "GL_DYNAMIC_DRAW\0"
2266+ "GL_DYNAMIC_DRAW_ARB\0"
2267+ "GL_DYNAMIC_READ\0"
2268+ "GL_DYNAMIC_READ_ARB\0"
2269+ "GL_EDGE_FLAG\0"
2270+ "GL_EDGE_FLAG_ARRAY\0"
2271+ "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING\0"
2272+ "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB\0"
2273+ "GL_EDGE_FLAG_ARRAY_POINTER\0"
2274+ "GL_EDGE_FLAG_ARRAY_STRIDE\0"
2275+ "GL_ELEMENT_ARRAY_BUFFER\0"
2276+ "GL_ELEMENT_ARRAY_BUFFER_ARB\0"
2277+ "GL_ELEMENT_ARRAY_BUFFER_BINDING\0"
2278+ "GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB\0"
2279+ "GL_EMISSION\0"
2280+ "GL_ENABLE_BIT\0"
2281+ "GL_EQUAL\0"
2282+ "GL_EQUIV\0"
2283+ "GL_EVAL_BIT\0"
2284+ "GL_EXP\0"
2285+ "GL_EXP2\0"
2286+ "GL_EXTENSIONS\0"
2287+ "GL_EYE_LINEAR\0"
2288+ "GL_EYE_PLANE\0"
2289+ "GL_EYE_PLANE_ABSOLUTE_NV\0"
2290+ "GL_EYE_RADIAL_NV\0"
2291+ "GL_FALSE\0"
2292+ "GL_FASTEST\0"
2293+ "GL_FEEDBACK\0"
2294+ "GL_FEEDBACK_BUFFER_POINTER\0"
2295+ "GL_FEEDBACK_BUFFER_SIZE\0"
2296+ "GL_FEEDBACK_BUFFER_TYPE\0"
2297+ "GL_FILL\0"
2298+ "GL_FLAT\0"
2299+ "GL_FLOAT\0"
2300+ "GL_FLOAT_MAT2\0"
2301+ "GL_FLOAT_MAT2_ARB\0"
2302+ "GL_FLOAT_MAT3\0"
2303+ "GL_FLOAT_MAT3_ARB\0"
2304+ "GL_FLOAT_MAT4\0"
2305+ "GL_FLOAT_MAT4_ARB\0"
2306+ "GL_FLOAT_VEC2\0"
2307+ "GL_FLOAT_VEC2_ARB\0"
2308+ "GL_FLOAT_VEC3\0"
2309+ "GL_FLOAT_VEC3_ARB\0"
2310+ "GL_FLOAT_VEC4\0"
2311+ "GL_FLOAT_VEC4_ARB\0"
2312+ "GL_FOG\0"
2313+ "GL_FOG_BIT\0"
2314+ "GL_FOG_COLOR\0"
2315+ "GL_FOG_COORD\0"
2316+ "GL_FOG_COORDINATE\0"
2317+ "GL_FOG_COORDINATE_ARRAY\0"
2318+ "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING\0"
2319+ "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB\0"
2320+ "GL_FOG_COORDINATE_ARRAY_POINTER\0"
2321+ "GL_FOG_COORDINATE_ARRAY_STRIDE\0"
2322+ "GL_FOG_COORDINATE_ARRAY_TYPE\0"
2323+ "GL_FOG_COORDINATE_SOURCE\0"
2324+ "GL_FOG_COORD_ARRAY\0"
2325+ "GL_FOG_COORD_ARRAY_BUFFER_BINDING\0"
2326+ "GL_FOG_COORD_ARRAY_POINTER\0"
2327+ "GL_FOG_COORD_ARRAY_STRIDE\0"
2328+ "GL_FOG_COORD_ARRAY_TYPE\0"
2329+ "GL_FOG_COORD_SRC\0"
2330+ "GL_FOG_DENSITY\0"
2331+ "GL_FOG_DISTANCE_MODE_NV\0"
2332+ "GL_FOG_END\0"
2333+ "GL_FOG_HINT\0"
2334+ "GL_FOG_INDEX\0"
2335+ "GL_FOG_MODE\0"
2336+ "GL_FOG_OFFSET_SGIX\0"
2337+ "GL_FOG_OFFSET_VALUE_SGIX\0"
2338+ "GL_FOG_START\0"
2339+ "GL_FRAGMENT_DEPTH\0"
2340+ "GL_FRAGMENT_PROGRAM_ARB\0"
2341+ "GL_FRAGMENT_SHADER\0"
2342+ "GL_FRAGMENT_SHADER_ARB\0"
2343+ "GL_FRAGMENT_SHADER_DERIVATIVE_HINT\0"
2344+ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT\0"
2345+ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT\0"
2346+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT\0"
2347+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT\0"
2348+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT\0"
2349+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT\0"
2350+ "GL_FRAMEBUFFER_BINDING_EXT\0"
2351+ "GL_FRAMEBUFFER_COMPLETE_EXT\0"
2352+ "GL_FRAMEBUFFER_EXT\0"
2353+ "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT\0"
2354+ "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT\0"
2355+ "GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT\0"
2356+ "GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT\0"
2357+ "GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT\0"
2358+ "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT\0"
2359+ "GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT\0"
2360+ "GL_FRAMEBUFFER_STATUS_ERROR_EXT\0"
2361+ "GL_FRAMEBUFFER_UNSUPPORTED_EXT\0"
2362+ "GL_FRONT\0"
2363+ "GL_FRONT_AND_BACK\0"
2364+ "GL_FRONT_FACE\0"
2365+ "GL_FRONT_LEFT\0"
2366+ "GL_FRONT_RIGHT\0"
2367+ "GL_FUNC_ADD\0"
2368+ "GL_FUNC_ADD_EXT\0"
2369+ "GL_FUNC_REVERSE_SUBTRACT\0"
2370+ "GL_FUNC_REVERSE_SUBTRACT_EXT\0"
2371+ "GL_FUNC_SUBTRACT\0"
2372+ "GL_FUNC_SUBTRACT_EXT\0"
2373+ "GL_GENERATE_MIPMAP\0"
2374+ "GL_GENERATE_MIPMAP_HINT\0"
2375+ "GL_GENERATE_MIPMAP_HINT_SGIS\0"
2376+ "GL_GENERATE_MIPMAP_SGIS\0"
2377+ "GL_GEQUAL\0"
2378+ "GL_GL_BLEND_EQUATION_RGB\0"
2379+ "GL_GL_COMPRESSED_SLUMINANCE\0"
2380+ "GL_GL_COMPRESSED_SLUMINANCE_ALPHA\0"
2381+ "GL_GL_COMPRESSED_SRGB\0"
2382+ "GL_GL_COMPRESSED_SRGB_ALPHA\0"
2383+ "GL_GL_CURRENT_RASTER_SECONDARY_COLOR\0"
2384+ "GL_GL_FLOAT_MAT2x3\0"
2385+ "GL_GL_FLOAT_MAT2x4\0"
2386+ "GL_GL_FLOAT_MAT3x2\0"
2387+ "GL_GL_FLOAT_MAT3x4\0"
2388+ "GL_GL_FLOAT_MAT4x2\0"
2389+ "GL_GL_FLOAT_MAT4x3\0"
2390+ "GL_GL_PIXEL_PACK_BUFFER\0"
2391+ "GL_GL_PIXEL_PACK_BUFFER_BINDING\0"
2392+ "GL_GL_PIXEL_UNPACK_BUFFER\0"
2393+ "GL_GL_PIXEL_UNPACK_BUFFER_BINDING\0"
2394+ "GL_GL_SLUMINANCE\0"
2395+ "GL_GL_SLUMINANCE8\0"
2396+ "GL_GL_SLUMINANCE8_ALPHA8\0"
2397+ "GL_GL_SLUMINANCE_ALPHA\0"
2398+ "GL_GL_SRGB\0"
2399+ "GL_GL_SRGB8\0"
2400+ "GL_GL_SRGB8_ALPHA8\0"
2401+ "GL_GL_SRGB_ALPHA\0"
2402+ "GL_GREATER\0"
2403+ "GL_GREEN\0"
2404+ "GL_GREEN_BIAS\0"
2405+ "GL_GREEN_BITS\0"
2406+ "GL_GREEN_SCALE\0"
2407+ "GL_HINT_BIT\0"
2408+ "GL_HISTOGRAM\0"
2409+ "GL_HISTOGRAM_ALPHA_SIZE\0"
2410+ "GL_HISTOGRAM_ALPHA_SIZE_EXT\0"
2411+ "GL_HISTOGRAM_BLUE_SIZE\0"
2412+ "GL_HISTOGRAM_BLUE_SIZE_EXT\0"
2413+ "GL_HISTOGRAM_EXT\0"
2414+ "GL_HISTOGRAM_FORMAT\0"
2415+ "GL_HISTOGRAM_FORMAT_EXT\0"
2416+ "GL_HISTOGRAM_GREEN_SIZE\0"
2417+ "GL_HISTOGRAM_GREEN_SIZE_EXT\0"
2418+ "GL_HISTOGRAM_LUMINANCE_SIZE\0"
2419+ "GL_HISTOGRAM_LUMINANCE_SIZE_EXT\0"
2420+ "GL_HISTOGRAM_RED_SIZE\0"
2421+ "GL_HISTOGRAM_RED_SIZE_EXT\0"
2422+ "GL_HISTOGRAM_SINK\0"
2423+ "GL_HISTOGRAM_SINK_EXT\0"
2424+ "GL_HISTOGRAM_WIDTH\0"
2425+ "GL_HISTOGRAM_WIDTH_EXT\0"
2426+ "GL_IDENTITY_NV\0"
2427+ "GL_IGNORE_BORDER_HP\0"
2428+ "GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES\0"
2429+ "GL_IMPLEMENTATION_COLOR_READ_TYPE_OES\0"
2430+ "GL_INCR\0"
2431+ "GL_INCR_WRAP\0"
2432+ "GL_INCR_WRAP_EXT\0"
2433+ "GL_INDEX_ARRAY\0"
2434+ "GL_INDEX_ARRAY_BUFFER_BINDING\0"
2435+ "GL_INDEX_ARRAY_BUFFER_BINDING_ARB\0"
2436+ "GL_INDEX_ARRAY_POINTER\0"
2437+ "GL_INDEX_ARRAY_STRIDE\0"
2438+ "GL_INDEX_ARRAY_TYPE\0"
2439+ "GL_INDEX_BITS\0"
2440+ "GL_INDEX_CLEAR_VALUE\0"
2441+ "GL_INDEX_LOGIC_OP\0"
2442+ "GL_INDEX_MODE\0"
2443+ "GL_INDEX_OFFSET\0"
2444+ "GL_INDEX_SHIFT\0"
2445+ "GL_INDEX_WRITEMASK\0"
2446+ "GL_INFO_LOG_LENGTH\0"
2447+ "GL_INT\0"
2448+ "GL_INTENSITY\0"
2449+ "GL_INTENSITY12\0"
2450+ "GL_INTENSITY12_EXT\0"
2451+ "GL_INTENSITY16\0"
2452+ "GL_INTENSITY16_EXT\0"
2453+ "GL_INTENSITY4\0"
2454+ "GL_INTENSITY4_EXT\0"
2455+ "GL_INTENSITY8\0"
2456+ "GL_INTENSITY8_EXT\0"
2457+ "GL_INTENSITY_EXT\0"
2458+ "GL_INTERPOLATE\0"
2459+ "GL_INTERPOLATE_ARB\0"
2460+ "GL_INTERPOLATE_EXT\0"
2461+ "GL_INT_VEC2\0"
2462+ "GL_INT_VEC2_ARB\0"
2463+ "GL_INT_VEC3\0"
2464+ "GL_INT_VEC3_ARB\0"
2465+ "GL_INT_VEC4\0"
2466+ "GL_INT_VEC4_ARB\0"
2467+ "GL_INVALID_ENUM\0"
2468+ "GL_INVALID_FRAMEBUFFER_OPERATION_EXT\0"
2469+ "GL_INVALID_OPERATION\0"
2470+ "GL_INVALID_VALUE\0"
2471+ "GL_INVERSE_NV\0"
2472+ "GL_INVERSE_TRANSPOSE_NV\0"
2473+ "GL_INVERT\0"
2474+ "GL_KEEP\0"
2475+ "GL_LEFT\0"
2476+ "GL_LEQUAL\0"
2477+ "GL_LESS\0"
2478+ "GL_LIGHT0\0"
2479+ "GL_LIGHT1\0"
2480+ "GL_LIGHT2\0"
2481+ "GL_LIGHT3\0"
2482+ "GL_LIGHT4\0"
2483+ "GL_LIGHT5\0"
2484+ "GL_LIGHT6\0"
2485+ "GL_LIGHT7\0"
2486+ "GL_LIGHTING\0"
2487+ "GL_LIGHTING_BIT\0"
2488+ "GL_LIGHT_MODEL_AMBIENT\0"
2489+ "GL_LIGHT_MODEL_COLOR_CONTROL\0"
2490+ "GL_LIGHT_MODEL_COLOR_CONTROL_EXT\0"
2491+ "GL_LIGHT_MODEL_LOCAL_VIEWER\0"
2492+ "GL_LIGHT_MODEL_TWO_SIDE\0"
2493+ "GL_LINE\0"
2494+ "GL_LINEAR\0"
2495+ "GL_LINEAR_ATTENUATION\0"
2496+ "GL_LINEAR_CLIPMAP_LINEAR_SGIX\0"
2497+ "GL_LINEAR_CLIPMAP_NEAREST_SGIX\0"
2498+ "GL_LINEAR_MIPMAP_LINEAR\0"
2499+ "GL_LINEAR_MIPMAP_NEAREST\0"
2500+ "GL_LINES\0"
2501+ "GL_LINE_BIT\0"
2502+ "GL_LINE_LOOP\0"
2503+ "GL_LINE_RESET_TOKEN\0"
2504+ "GL_LINE_SMOOTH\0"
2505+ "GL_LINE_SMOOTH_HINT\0"
2506+ "GL_LINE_STIPPLE\0"
2507+ "GL_LINE_STIPPLE_PATTERN\0"
2508+ "GL_LINE_STIPPLE_REPEAT\0"
2509+ "GL_LINE_STRIP\0"
2510+ "GL_LINE_TOKEN\0"
2511+ "GL_LINE_WIDTH\0"
2512+ "GL_LINE_WIDTH_GRANULARITY\0"
2513+ "GL_LINE_WIDTH_RANGE\0"
2514+ "GL_LINK_STATUS\0"
2515+ "GL_LIST_BASE\0"
2516+ "GL_LIST_BIT\0"
2517+ "GL_LIST_INDEX\0"
2518+ "GL_LIST_MODE\0"
2519+ "GL_LOAD\0"
2520+ "GL_LOGIC_OP\0"
2521+ "GL_LOGIC_OP_MODE\0"
2522+ "GL_LOWER_LEFT\0"
2523+ "GL_LUMINANCE\0"
2524+ "GL_LUMINANCE12\0"
2525+ "GL_LUMINANCE12_ALPHA12\0"
2526+ "GL_LUMINANCE12_ALPHA12_EXT\0"
2527+ "GL_LUMINANCE12_ALPHA4\0"
2528+ "GL_LUMINANCE12_ALPHA4_EXT\0"
2529+ "GL_LUMINANCE12_EXT\0"
2530+ "GL_LUMINANCE16\0"
2531+ "GL_LUMINANCE16_ALPHA16\0"
2532+ "GL_LUMINANCE16_ALPHA16_EXT\0"
2533+ "GL_LUMINANCE16_EXT\0"
2534+ "GL_LUMINANCE4\0"
2535+ "GL_LUMINANCE4_ALPHA4\0"
2536+ "GL_LUMINANCE4_ALPHA4_EXT\0"
2537+ "GL_LUMINANCE4_EXT\0"
2538+ "GL_LUMINANCE6_ALPHA2\0"
2539+ "GL_LUMINANCE6_ALPHA2_EXT\0"
2540+ "GL_LUMINANCE8\0"
2541+ "GL_LUMINANCE8_ALPHA8\0"
2542+ "GL_LUMINANCE8_ALPHA8_EXT\0"
2543+ "GL_LUMINANCE8_EXT\0"
2544+ "GL_LUMINANCE_ALPHA\0"
2545+ "GL_MAP1_COLOR_4\0"
2546+ "GL_MAP1_GRID_DOMAIN\0"
2547+ "GL_MAP1_GRID_SEGMENTS\0"
2548+ "GL_MAP1_INDEX\0"
2549+ "GL_MAP1_NORMAL\0"
2550+ "GL_MAP1_TEXTURE_COORD_1\0"
2551+ "GL_MAP1_TEXTURE_COORD_2\0"
2552+ "GL_MAP1_TEXTURE_COORD_3\0"
2553+ "GL_MAP1_TEXTURE_COORD_4\0"
2554+ "GL_MAP1_VERTEX_3\0"
2555+ "GL_MAP1_VERTEX_4\0"
2556+ "GL_MAP1_VERTEX_ATTRIB0_4_NV\0"
2557+ "GL_MAP1_VERTEX_ATTRIB10_4_NV\0"
2558+ "GL_MAP1_VERTEX_ATTRIB11_4_NV\0"
2559+ "GL_MAP1_VERTEX_ATTRIB12_4_NV\0"
2560+ "GL_MAP1_VERTEX_ATTRIB13_4_NV\0"
2561+ "GL_MAP1_VERTEX_ATTRIB14_4_NV\0"
2562+ "GL_MAP1_VERTEX_ATTRIB15_4_NV\0"
2563+ "GL_MAP1_VERTEX_ATTRIB1_4_NV\0"
2564+ "GL_MAP1_VERTEX_ATTRIB2_4_NV\0"
2565+ "GL_MAP1_VERTEX_ATTRIB3_4_NV\0"
2566+ "GL_MAP1_VERTEX_ATTRIB4_4_NV\0"
2567+ "GL_MAP1_VERTEX_ATTRIB5_4_NV\0"
2568+ "GL_MAP1_VERTEX_ATTRIB6_4_NV\0"
2569+ "GL_MAP1_VERTEX_ATTRIB7_4_NV\0"
2570+ "GL_MAP1_VERTEX_ATTRIB8_4_NV\0"
2571+ "GL_MAP1_VERTEX_ATTRIB9_4_NV\0"
2572+ "GL_MAP2_COLOR_4\0"
2573+ "GL_MAP2_GRID_DOMAIN\0"
2574+ "GL_MAP2_GRID_SEGMENTS\0"
2575+ "GL_MAP2_INDEX\0"
2576+ "GL_MAP2_NORMAL\0"
2577+ "GL_MAP2_TEXTURE_COORD_1\0"
2578+ "GL_MAP2_TEXTURE_COORD_2\0"
2579+ "GL_MAP2_TEXTURE_COORD_3\0"
2580+ "GL_MAP2_TEXTURE_COORD_4\0"
2581+ "GL_MAP2_VERTEX_3\0"
2582+ "GL_MAP2_VERTEX_4\0"
2583+ "GL_MAP2_VERTEX_ATTRIB0_4_NV\0"
2584+ "GL_MAP2_VERTEX_ATTRIB10_4_NV\0"
2585+ "GL_MAP2_VERTEX_ATTRIB11_4_NV\0"
2586+ "GL_MAP2_VERTEX_ATTRIB12_4_NV\0"
2587+ "GL_MAP2_VERTEX_ATTRIB13_4_NV\0"
2588+ "GL_MAP2_VERTEX_ATTRIB14_4_NV\0"
2589+ "GL_MAP2_VERTEX_ATTRIB15_4_NV\0"
2590+ "GL_MAP2_VERTEX_ATTRIB1_4_NV\0"
2591+ "GL_MAP2_VERTEX_ATTRIB2_4_NV\0"
2592+ "GL_MAP2_VERTEX_ATTRIB3_4_NV\0"
2593+ "GL_MAP2_VERTEX_ATTRIB4_4_NV\0"
2594+ "GL_MAP2_VERTEX_ATTRIB5_4_NV\0"
2595+ "GL_MAP2_VERTEX_ATTRIB6_4_NV\0"
2596+ "GL_MAP2_VERTEX_ATTRIB7_4_NV\0"
2597+ "GL_MAP2_VERTEX_ATTRIB8_4_NV\0"
2598+ "GL_MAP2_VERTEX_ATTRIB9_4_NV\0"
2599+ "GL_MAP_COLOR\0"
2600+ "GL_MAP_STENCIL\0"
2601+ "GL_MATRIX0_ARB\0"
2602+ "GL_MATRIX0_NV\0"
2603+ "GL_MATRIX10_ARB\0"
2604+ "GL_MATRIX11_ARB\0"
2605+ "GL_MATRIX12_ARB\0"
2606+ "GL_MATRIX13_ARB\0"
2607+ "GL_MATRIX14_ARB\0"
2608+ "GL_MATRIX15_ARB\0"
2609+ "GL_MATRIX16_ARB\0"
2610+ "GL_MATRIX17_ARB\0"
2611+ "GL_MATRIX18_ARB\0"
2612+ "GL_MATRIX19_ARB\0"
2613+ "GL_MATRIX1_ARB\0"
2614+ "GL_MATRIX1_NV\0"
2615+ "GL_MATRIX20_ARB\0"
2616+ "GL_MATRIX21_ARB\0"
2617+ "GL_MATRIX22_ARB\0"
2618+ "GL_MATRIX23_ARB\0"
2619+ "GL_MATRIX24_ARB\0"
2620+ "GL_MATRIX25_ARB\0"
2621+ "GL_MATRIX26_ARB\0"
2622+ "GL_MATRIX27_ARB\0"
2623+ "GL_MATRIX28_ARB\0"
2624+ "GL_MATRIX29_ARB\0"
2625+ "GL_MATRIX2_ARB\0"
2626+ "GL_MATRIX2_NV\0"
2627+ "GL_MATRIX30_ARB\0"
2628+ "GL_MATRIX31_ARB\0"
2629+ "GL_MATRIX3_ARB\0"
2630+ "GL_MATRIX3_NV\0"
2631+ "GL_MATRIX4_ARB\0"
2632+ "GL_MATRIX4_NV\0"
2633+ "GL_MATRIX5_ARB\0"
2634+ "GL_MATRIX5_NV\0"
2635+ "GL_MATRIX6_ARB\0"
2636+ "GL_MATRIX6_NV\0"
2637+ "GL_MATRIX7_ARB\0"
2638+ "GL_MATRIX7_NV\0"
2639+ "GL_MATRIX8_ARB\0"
2640+ "GL_MATRIX9_ARB\0"
2641+ "GL_MATRIX_INDEX_ARRAY_ARB\0"
2642+ "GL_MATRIX_INDEX_ARRAY_POINTER_ARB\0"
2643+ "GL_MATRIX_INDEX_ARRAY_SIZE_ARB\0"
2644+ "GL_MATRIX_INDEX_ARRAY_STRIDE_ARB\0"
2645+ "GL_MATRIX_INDEX_ARRAY_TYPE_ARB\0"
2646+ "GL_MATRIX_MODE\0"
2647+ "GL_MATRIX_PALETTE_ARB\0"
2648+ "GL_MAX\0"
2649+ "GL_MAX_3D_TEXTURE_SIZE\0"
2650+ "GL_MAX_ARRAY_TEXTURE_LAYERS_EXT\0"
2651+ "GL_MAX_ATTRIB_STACK_DEPTH\0"
2652+ "GL_MAX_CLIENT_ATTRIB_STACK_DEPTH\0"
2653+ "GL_MAX_CLIPMAP_DEPTH_SGIX\0"
2654+ "GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX\0"
2655+ "GL_MAX_CLIP_PLANES\0"
2656+ "GL_MAX_COLOR_ATTACHMENTS_EXT\0"
2657+ "GL_MAX_COLOR_MATRIX_STACK_DEPTH\0"
2658+ "GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI\0"
2659+ "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS\0"
2660+ "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB\0"
2661+ "GL_MAX_CONVOLUTION_HEIGHT\0"
2662+ "GL_MAX_CONVOLUTION_HEIGHT_EXT\0"
2663+ "GL_MAX_CONVOLUTION_WIDTH\0"
2664+ "GL_MAX_CONVOLUTION_WIDTH_EXT\0"
2665+ "GL_MAX_CUBE_MAP_TEXTURE_SIZE\0"
2666+ "GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB\0"
2667+ "GL_MAX_DRAW_BUFFERS\0"
2668+ "GL_MAX_DRAW_BUFFERS_ARB\0"
2669+ "GL_MAX_DRAW_BUFFERS_ATI\0"
2670+ "GL_MAX_ELEMENTS_INDICES\0"
2671+ "GL_MAX_ELEMENTS_VERTICES\0"
2672+ "GL_MAX_EVAL_ORDER\0"
2673+ "GL_MAX_EXT\0"
2674+ "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS\0"
2675+ "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB\0"
2676+ "GL_MAX_LIGHTS\0"
2677+ "GL_MAX_LIST_NESTING\0"
2678+ "GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB\0"
2679+ "GL_MAX_MODELVIEW_STACK_DEPTH\0"
2680+ "GL_MAX_NAME_STACK_DEPTH\0"
2681+ "GL_MAX_PALETTE_MATRICES_ARB\0"
2682+ "GL_MAX_PIXEL_MAP_TABLE\0"
2683+ "GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB\0"
2684+ "GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB\0"
2685+ "GL_MAX_PROGRAM_ATTRIBS_ARB\0"
2686+ "GL_MAX_PROGRAM_CALL_DEPTH_NV\0"
2687+ "GL_MAX_PROGRAM_ENV_PARAMETERS_ARB\0"
2688+ "GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV\0"
2689+ "GL_MAX_PROGRAM_IF_DEPTH_NV\0"
2690+ "GL_MAX_PROGRAM_INSTRUCTIONS_ARB\0"
2691+ "GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB\0"
2692+ "GL_MAX_PROGRAM_LOOP_COUNT_NV\0"
2693+ "GL_MAX_PROGRAM_LOOP_DEPTH_NV\0"
2694+ "GL_MAX_PROGRAM_MATRICES_ARB\0"
2695+ "GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB\0"
2696+ "GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB\0"
2697+ "GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB\0"
2698+ "GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB\0"
2699+ "GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB\0"
2700+ "GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB\0"
2701+ "GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB\0"
2702+ "GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB\0"
2703+ "GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB\0"
2704+ "GL_MAX_PROGRAM_PARAMETERS_ARB\0"
2705+ "GL_MAX_PROGRAM_TEMPORARIES_ARB\0"
2706+ "GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB\0"
2707+ "GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB\0"
2708+ "GL_MAX_PROJECTION_STACK_DEPTH\0"
2709+ "GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB\0"
2710+ "GL_MAX_RECTANGLE_TEXTURE_SIZE_NV\0"
2711+ "GL_MAX_RENDERBUFFER_SIZE_EXT\0"
2712+ "GL_MAX_SHININESS_NV\0"
2713+ "GL_MAX_SPOT_EXPONENT_NV\0"
2714+ "GL_MAX_TEXTURE_COORDS\0"
2715+ "GL_MAX_TEXTURE_COORDS_ARB\0"
2716+ "GL_MAX_TEXTURE_IMAGE_UNITS\0"
2717+ "GL_MAX_TEXTURE_IMAGE_UNITS_ARB\0"
2718+ "GL_MAX_TEXTURE_LOD_BIAS\0"
2719+ "GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT\0"
2720+ "GL_MAX_TEXTURE_SIZE\0"
2721+ "GL_MAX_TEXTURE_STACK_DEPTH\0"
2722+ "GL_MAX_TEXTURE_UNITS\0"
2723+ "GL_MAX_TEXTURE_UNITS_ARB\0"
2724+ "GL_MAX_TRACK_MATRICES_NV\0"
2725+ "GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV\0"
2726+ "GL_MAX_VARYING_FLOATS\0"
2727+ "GL_MAX_VARYING_FLOATS_ARB\0"
2728+ "GL_MAX_VERTEX_ATTRIBS\0"
2729+ "GL_MAX_VERTEX_ATTRIBS_ARB\0"
2730+ "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS\0"
2731+ "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB\0"
2732+ "GL_MAX_VERTEX_UNIFORM_COMPONENTS\0"
2733+ "GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB\0"
2734+ "GL_MAX_VERTEX_UNITS_ARB\0"
2735+ "GL_MAX_VIEWPORT_DIMS\0"
2736+ "GL_MIN\0"
2737+ "GL_MINMAX\0"
2738+ "GL_MINMAX_EXT\0"
2739+ "GL_MINMAX_FORMAT\0"
2740+ "GL_MINMAX_FORMAT_EXT\0"
2741+ "GL_MINMAX_SINK\0"
2742+ "GL_MINMAX_SINK_EXT\0"
2743+ "GL_MIN_EXT\0"
2744+ "GL_MIRRORED_REPEAT\0"
2745+ "GL_MIRRORED_REPEAT_ARB\0"
2746+ "GL_MIRRORED_REPEAT_IBM\0"
2747+ "GL_MIRROR_CLAMP_ATI\0"
2748+ "GL_MIRROR_CLAMP_EXT\0"
2749+ "GL_MIRROR_CLAMP_TO_BORDER_EXT\0"
2750+ "GL_MIRROR_CLAMP_TO_EDGE_ATI\0"
2751+ "GL_MIRROR_CLAMP_TO_EDGE_EXT\0"
2752+ "GL_MODELVIEW\0"
2753+ "GL_MODELVIEW0_ARB\0"
2754+ "GL_MODELVIEW10_ARB\0"
2755+ "GL_MODELVIEW11_ARB\0"
2756+ "GL_MODELVIEW12_ARB\0"
2757+ "GL_MODELVIEW13_ARB\0"
2758+ "GL_MODELVIEW14_ARB\0"
2759+ "GL_MODELVIEW15_ARB\0"
2760+ "GL_MODELVIEW16_ARB\0"
2761+ "GL_MODELVIEW17_ARB\0"
2762+ "GL_MODELVIEW18_ARB\0"
2763+ "GL_MODELVIEW19_ARB\0"
2764+ "GL_MODELVIEW1_ARB\0"
2765+ "GL_MODELVIEW20_ARB\0"
2766+ "GL_MODELVIEW21_ARB\0"
2767+ "GL_MODELVIEW22_ARB\0"
2768+ "GL_MODELVIEW23_ARB\0"
2769+ "GL_MODELVIEW24_ARB\0"
2770+ "GL_MODELVIEW25_ARB\0"
2771+ "GL_MODELVIEW26_ARB\0"
2772+ "GL_MODELVIEW27_ARB\0"
2773+ "GL_MODELVIEW28_ARB\0"
2774+ "GL_MODELVIEW29_ARB\0"
2775+ "GL_MODELVIEW2_ARB\0"
2776+ "GL_MODELVIEW30_ARB\0"
2777+ "GL_MODELVIEW31_ARB\0"
2778+ "GL_MODELVIEW3_ARB\0"
2779+ "GL_MODELVIEW4_ARB\0"
2780+ "GL_MODELVIEW5_ARB\0"
2781+ "GL_MODELVIEW6_ARB\0"
2782+ "GL_MODELVIEW7_ARB\0"
2783+ "GL_MODELVIEW8_ARB\0"
2784+ "GL_MODELVIEW9_ARB\0"
2785+ "GL_MODELVIEW_MATRIX\0"
2786+ "GL_MODELVIEW_PROJECTION_NV\0"
2787+ "GL_MODELVIEW_STACK_DEPTH\0"
2788+ "GL_MODULATE\0"
2789+ "GL_MODULATE_ADD_ATI\0"
2790+ "GL_MODULATE_SIGNED_ADD_ATI\0"
2791+ "GL_MODULATE_SUBTRACT_ATI\0"
2792+ "GL_MULT\0"
2793+ "GL_MULTISAMPLE\0"
2794+ "GL_MULTISAMPLE_3DFX\0"
2795+ "GL_MULTISAMPLE_ARB\0"
2796+ "GL_MULTISAMPLE_BIT\0"
2797+ "GL_MULTISAMPLE_BIT_3DFX\0"
2798+ "GL_MULTISAMPLE_BIT_ARB\0"
2799+ "GL_MULTISAMPLE_FILTER_HINT_NV\0"
2800+ "GL_N3F_V3F\0"
2801+ "GL_NAME_STACK_DEPTH\0"
2802+ "GL_NAND\0"
2803+ "GL_NEAREST\0"
2804+ "GL_NEAREST_CLIPMAP_LINEAR_SGIX\0"
2805+ "GL_NEAREST_CLIPMAP_NEAREST_SGIX\0"
2806+ "GL_NEAREST_MIPMAP_LINEAR\0"
2807+ "GL_NEAREST_MIPMAP_NEAREST\0"
2808+ "GL_NEVER\0"
2809+ "GL_NICEST\0"
2810+ "GL_NONE\0"
2811+ "GL_NOOP\0"
2812+ "GL_NOR\0"
2813+ "GL_NORMALIZE\0"
2814+ "GL_NORMAL_ARRAY\0"
2815+ "GL_NORMAL_ARRAY_BUFFER_BINDING\0"
2816+ "GL_NORMAL_ARRAY_BUFFER_BINDING_ARB\0"
2817+ "GL_NORMAL_ARRAY_POINTER\0"
2818+ "GL_NORMAL_ARRAY_STRIDE\0"
2819+ "GL_NORMAL_ARRAY_TYPE\0"
2820+ "GL_NORMAL_MAP\0"
2821+ "GL_NORMAL_MAP_ARB\0"
2822+ "GL_NORMAL_MAP_NV\0"
2823+ "GL_NOTEQUAL\0"
2824+ "GL_NO_ERROR\0"
2825+ "GL_NUM_COMPRESSED_TEXTURE_FORMATS\0"
2826+ "GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB\0"
2827+ "GL_OBJECT_ACTIVE_ATTRIBUTES_ARB\0"
2828+ "GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB\0"
2829+ "GL_OBJECT_ACTIVE_UNIFORMS_ARB\0"
2830+ "GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB\0"
2831+ "GL_OBJECT_ATTACHED_OBJECTS_ARB\0"
2832+ "GL_OBJECT_COMPILE_STATUS_ARB\0"
2833+ "GL_OBJECT_DELETE_STATUS_ARB\0"
2834+ "GL_OBJECT_INFO_LOG_LENGTH_ARB\0"
2835+ "GL_OBJECT_LINEAR\0"
2836+ "GL_OBJECT_LINK_STATUS_ARB\0"
2837+ "GL_OBJECT_PLANE\0"
2838+ "GL_OBJECT_SHADER_SOURCE_LENGTH_ARB\0"
2839+ "GL_OBJECT_SUBTYPE_ARB\0"
2840+ "GL_OBJECT_TYPE_ARB\0"
2841+ "GL_OBJECT_VALIDATE_STATUS_ARB\0"
2842+ "GL_OCCLUSION_TEST_HP\0"
2843+ "GL_OCCLUSION_TEST_RESULT_HP\0"
2844+ "GL_ONE\0"
2845+ "GL_ONE_MINUS_CONSTANT_ALPHA\0"
2846+ "GL_ONE_MINUS_CONSTANT_ALPHA_EXT\0"
2847+ "GL_ONE_MINUS_CONSTANT_COLOR\0"
2848+ "GL_ONE_MINUS_CONSTANT_COLOR_EXT\0"
2849+ "GL_ONE_MINUS_DST_ALPHA\0"
2850+ "GL_ONE_MINUS_DST_COLOR\0"
2851+ "GL_ONE_MINUS_SRC_ALPHA\0"
2852+ "GL_ONE_MINUS_SRC_COLOR\0"
2853+ "GL_OPERAND0_ALPHA\0"
2854+ "GL_OPERAND0_ALPHA_ARB\0"
2855+ "GL_OPERAND0_ALPHA_EXT\0"
2856+ "GL_OPERAND0_RGB\0"
2857+ "GL_OPERAND0_RGB_ARB\0"
2858+ "GL_OPERAND0_RGB_EXT\0"
2859+ "GL_OPERAND1_ALPHA\0"
2860+ "GL_OPERAND1_ALPHA_ARB\0"
2861+ "GL_OPERAND1_ALPHA_EXT\0"
2862+ "GL_OPERAND1_RGB\0"
2863+ "GL_OPERAND1_RGB_ARB\0"
2864+ "GL_OPERAND1_RGB_EXT\0"
2865+ "GL_OPERAND2_ALPHA\0"
2866+ "GL_OPERAND2_ALPHA_ARB\0"
2867+ "GL_OPERAND2_ALPHA_EXT\0"
2868+ "GL_OPERAND2_RGB\0"
2869+ "GL_OPERAND2_RGB_ARB\0"
2870+ "GL_OPERAND2_RGB_EXT\0"
2871+ "GL_OPERAND3_ALPHA_NV\0"
2872+ "GL_OPERAND3_RGB_NV\0"
2873+ "GL_OR\0"
2874+ "GL_ORDER\0"
2875+ "GL_OR_INVERTED\0"
2876+ "GL_OR_REVERSE\0"
2877+ "GL_OUT_OF_MEMORY\0"
2878+ "GL_PACK_ALIGNMENT\0"
2879+ "GL_PACK_IMAGE_HEIGHT\0"
2880+ "GL_PACK_INVERT_MESA\0"
2881+ "GL_PACK_LSB_FIRST\0"
2882+ "GL_PACK_ROW_LENGTH\0"
2883+ "GL_PACK_SKIP_IMAGES\0"
2884+ "GL_PACK_SKIP_PIXELS\0"
2885+ "GL_PACK_SKIP_ROWS\0"
2886+ "GL_PACK_SWAP_BYTES\0"
2887+ "GL_PALETTE4_R5_G6_B5_OES\0"
2888+ "GL_PALETTE4_RGB5_A1_OES\0"
2889+ "GL_PALETTE4_RGB8_OES\0"
2890+ "GL_PALETTE4_RGBA4_OES\0"
2891+ "GL_PALETTE4_RGBA8_OES\0"
2892+ "GL_PALETTE8_R5_G6_B5_OES\0"
2893+ "GL_PALETTE8_RGB5_A1_OES\0"
2894+ "GL_PALETTE8_RGB8_OES\0"
2895+ "GL_PALETTE8_RGBA4_OES\0"
2896+ "GL_PALETTE8_RGBA8_OES\0"
2897+ "GL_PASS_THROUGH_TOKEN\0"
2898+ "GL_PERSPECTIVE_CORRECTION_HINT\0"
2899+ "GL_PIXEL_MAP_A_TO_A\0"
2900+ "GL_PIXEL_MAP_A_TO_A_SIZE\0"
2901+ "GL_PIXEL_MAP_B_TO_B\0"
2902+ "GL_PIXEL_MAP_B_TO_B_SIZE\0"
2903+ "GL_PIXEL_MAP_G_TO_G\0"
2904+ "GL_PIXEL_MAP_G_TO_G_SIZE\0"
2905+ "GL_PIXEL_MAP_I_TO_A\0"
2906+ "GL_PIXEL_MAP_I_TO_A_SIZE\0"
2907+ "GL_PIXEL_MAP_I_TO_B\0"
2908+ "GL_PIXEL_MAP_I_TO_B_SIZE\0"
2909+ "GL_PIXEL_MAP_I_TO_G\0"
2910+ "GL_PIXEL_MAP_I_TO_G_SIZE\0"
2911+ "GL_PIXEL_MAP_I_TO_I\0"
2912+ "GL_PIXEL_MAP_I_TO_I_SIZE\0"
2913+ "GL_PIXEL_MAP_I_TO_R\0"
2914+ "GL_PIXEL_MAP_I_TO_R_SIZE\0"
2915+ "GL_PIXEL_MAP_R_TO_R\0"
2916+ "GL_PIXEL_MAP_R_TO_R_SIZE\0"
2917+ "GL_PIXEL_MAP_S_TO_S\0"
2918+ "GL_PIXEL_MAP_S_TO_S_SIZE\0"
2919+ "GL_PIXEL_MODE_BIT\0"
2920+ "GL_PIXEL_PACK_BUFFER_BINDING_EXT\0"
2921+ "GL_PIXEL_PACK_BUFFER_EXT\0"
2922+ "GL_PIXEL_UNPACK_BUFFER_BINDING_EXT\0"
2923+ "GL_PIXEL_UNPACK_BUFFER_EXT\0"
2924+ "GL_POINT\0"
2925+ "GL_POINTS\0"
2926+ "GL_POINT_BIT\0"
2927+ "GL_POINT_DISTANCE_ATTENUATION\0"
2928+ "GL_POINT_DISTANCE_ATTENUATION_ARB\0"
2929+ "GL_POINT_DISTANCE_ATTENUATION_EXT\0"
2930+ "GL_POINT_DISTANCE_ATTENUATION_SGIS\0"
2931+ "GL_POINT_FADE_THRESHOLD_SIZE\0"
2932+ "GL_POINT_FADE_THRESHOLD_SIZE_ARB\0"
2933+ "GL_POINT_FADE_THRESHOLD_SIZE_EXT\0"
2934+ "GL_POINT_FADE_THRESHOLD_SIZE_SGIS\0"
2935+ "GL_POINT_SIZE\0"
2936+ "GL_POINT_SIZE_GRANULARITY\0"
2937+ "GL_POINT_SIZE_MAX\0"
2938+ "GL_POINT_SIZE_MAX_ARB\0"
2939+ "GL_POINT_SIZE_MAX_EXT\0"
2940+ "GL_POINT_SIZE_MAX_SGIS\0"
2941+ "GL_POINT_SIZE_MIN\0"
2942+ "GL_POINT_SIZE_MIN_ARB\0"
2943+ "GL_POINT_SIZE_MIN_EXT\0"
2944+ "GL_POINT_SIZE_MIN_SGIS\0"
2945+ "GL_POINT_SIZE_RANGE\0"
2946+ "GL_POINT_SMOOTH\0"
2947+ "GL_POINT_SMOOTH_HINT\0"
2948+ "GL_POINT_SPRITE\0"
2949+ "GL_POINT_SPRITE_ARB\0"
2950+ "GL_POINT_SPRITE_COORD_ORIGIN\0"
2951+ "GL_POINT_SPRITE_NV\0"
2952+ "GL_POINT_SPRITE_R_MODE_NV\0"
2953+ "GL_POINT_TOKEN\0"
2954+ "GL_POLYGON\0"
2955+ "GL_POLYGON_BIT\0"
2956+ "GL_POLYGON_MODE\0"
2957+ "GL_POLYGON_OFFSET_BIAS\0"
2958+ "GL_POLYGON_OFFSET_FACTOR\0"
2959+ "GL_POLYGON_OFFSET_FILL\0"
2960+ "GL_POLYGON_OFFSET_LINE\0"
2961+ "GL_POLYGON_OFFSET_POINT\0"
2962+ "GL_POLYGON_OFFSET_UNITS\0"
2963+ "GL_POLYGON_SMOOTH\0"
2964+ "GL_POLYGON_SMOOTH_HINT\0"
2965+ "GL_POLYGON_STIPPLE\0"
2966+ "GL_POLYGON_STIPPLE_BIT\0"
2967+ "GL_POLYGON_TOKEN\0"
2968+ "GL_POSITION\0"
2969+ "GL_POST_COLOR_MATRIX_ALPHA_BIAS\0"
2970+ "GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI\0"
2971+ "GL_POST_COLOR_MATRIX_ALPHA_SCALE\0"
2972+ "GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI\0"
2973+ "GL_POST_COLOR_MATRIX_BLUE_BIAS\0"
2974+ "GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI\0"
2975+ "GL_POST_COLOR_MATRIX_BLUE_SCALE\0"
2976+ "GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI\0"
2977+ "GL_POST_COLOR_MATRIX_COLOR_TABLE\0"
2978+ "GL_POST_COLOR_MATRIX_GREEN_BIAS\0"
2979+ "GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI\0"
2980+ "GL_POST_COLOR_MATRIX_GREEN_SCALE\0"
2981+ "GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI\0"
2982+ "GL_POST_COLOR_MATRIX_RED_BIAS\0"
2983+ "GL_POST_COLOR_MATRIX_RED_BIAS_SGI\0"
2984+ "GL_POST_COLOR_MATRIX_RED_SCALE\0"
2985+ "GL_POST_COLOR_MATRIX_RED_SCALE_SGI\0"
2986+ "GL_POST_CONVOLUTION_ALPHA_BIAS\0"
2987+ "GL_POST_CONVOLUTION_ALPHA_BIAS_EXT\0"
2988+ "GL_POST_CONVOLUTION_ALPHA_SCALE\0"
2989+ "GL_POST_CONVOLUTION_ALPHA_SCALE_EXT\0"
2990+ "GL_POST_CONVOLUTION_BLUE_BIAS\0"
2991+ "GL_POST_CONVOLUTION_BLUE_BIAS_EXT\0"
2992+ "GL_POST_CONVOLUTION_BLUE_SCALE\0"
2993+ "GL_POST_CONVOLUTION_BLUE_SCALE_EXT\0"
2994+ "GL_POST_CONVOLUTION_COLOR_TABLE\0"
2995+ "GL_POST_CONVOLUTION_GREEN_BIAS\0"
2996+ "GL_POST_CONVOLUTION_GREEN_BIAS_EXT\0"
2997+ "GL_POST_CONVOLUTION_GREEN_SCALE\0"
2998+ "GL_POST_CONVOLUTION_GREEN_SCALE_EXT\0"
2999+ "GL_POST_CONVOLUTION_RED_BIAS\0"
3000+ "GL_POST_CONVOLUTION_RED_BIAS_EXT\0"
3001+ "GL_POST_CONVOLUTION_RED_SCALE\0"
3002+ "GL_POST_CONVOLUTION_RED_SCALE_EXT\0"
3003+ "GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX\0"
3004+ "GL_POST_TEXTURE_FILTER_BIAS_SGIX\0"
3005+ "GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX\0"
3006+ "GL_POST_TEXTURE_FILTER_SCALE_SGIX\0"
3007+ "GL_PREVIOUS\0"
3008+ "GL_PREVIOUS_ARB\0"
3009+ "GL_PREVIOUS_EXT\0"
3010+ "GL_PRIMARY_COLOR\0"
3011+ "GL_PRIMARY_COLOR_ARB\0"
3012+ "GL_PRIMARY_COLOR_EXT\0"
3013+ "GL_PROGRAM_ADDRESS_REGISTERS_ARB\0"
3014+ "GL_PROGRAM_ALU_INSTRUCTIONS_ARB\0"
3015+ "GL_PROGRAM_ATTRIBS_ARB\0"
3016+ "GL_PROGRAM_BINDING_ARB\0"
3017+ "GL_PROGRAM_ERROR_POSITION_ARB\0"
3018+ "GL_PROGRAM_ERROR_POSITION_NV\0"
3019+ "GL_PROGRAM_ERROR_STRING_ARB\0"
3020+ "GL_PROGRAM_FORMAT_ARB\0"
3021+ "GL_PROGRAM_FORMAT_ASCII_ARB\0"
3022+ "GL_PROGRAM_INSTRUCTIONS_ARB\0"
3023+ "GL_PROGRAM_LENGTH_ARB\0"
3024+ "GL_PROGRAM_LENGTH_NV\0"
3025+ "GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB\0"
3026+ "GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB\0"
3027+ "GL_PROGRAM_NATIVE_ATTRIBS_ARB\0"
3028+ "GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB\0"
3029+ "GL_PROGRAM_NATIVE_PARAMETERS_ARB\0"
3030+ "GL_PROGRAM_NATIVE_TEMPORARIES_ARB\0"
3031+ "GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB\0"
3032+ "GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB\0"
3033+ "GL_PROGRAM_OBJECT_ARB\0"
3034+ "GL_PROGRAM_PARAMETERS_ARB\0"
3035+ "GL_PROGRAM_PARAMETER_NV\0"
3036+ "GL_PROGRAM_RESIDENT_NV\0"
3037+ "GL_PROGRAM_STRING_ARB\0"
3038+ "GL_PROGRAM_STRING_NV\0"
3039+ "GL_PROGRAM_TARGET_NV\0"
3040+ "GL_PROGRAM_TEMPORARIES_ARB\0"
3041+ "GL_PROGRAM_TEX_INDIRECTIONS_ARB\0"
3042+ "GL_PROGRAM_TEX_INSTRUCTIONS_ARB\0"
3043+ "GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB\0"
3044+ "GL_PROJECTION\0"
3045+ "GL_PROJECTION_MATRIX\0"
3046+ "GL_PROJECTION_STACK_DEPTH\0"
3047+ "GL_PROXY_COLOR_TABLE\0"
3048+ "GL_PROXY_HISTOGRAM\0"
3049+ "GL_PROXY_HISTOGRAM_EXT\0"
3050+ "GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE\0"
3051+ "GL_PROXY_POST_CONVOLUTION_COLOR_TABLE\0"
3052+ "GL_PROXY_TEXTURE_1D\0"
3053+ "GL_PROXY_TEXTURE_1D_ARRAY_EXT\0"
3054+ "GL_PROXY_TEXTURE_1D_EXT\0"
3055+ "GL_PROXY_TEXTURE_2D\0"
3056+ "GL_PROXY_TEXTURE_2D_ARRAY_EXT\0"
3057+ "GL_PROXY_TEXTURE_2D_EXT\0"
3058+ "GL_PROXY_TEXTURE_3D\0"
3059+ "GL_PROXY_TEXTURE_COLOR_TABLE_SGI\0"
3060+ "GL_PROXY_TEXTURE_CUBE_MAP\0"
3061+ "GL_PROXY_TEXTURE_CUBE_MAP_ARB\0"
3062+ "GL_PROXY_TEXTURE_RECTANGLE_ARB\0"
3063+ "GL_PROXY_TEXTURE_RECTANGLE_NV\0"
3064+ "GL_Q\0"
3065+ "GL_QUADRATIC_ATTENUATION\0"
3066+ "GL_QUADS\0"
3067+ "GL_QUAD_MESH_SUN\0"
3068+ "GL_QUAD_STRIP\0"
3069+ "GL_QUERY_COUNTER_BITS\0"
3070+ "GL_QUERY_COUNTER_BITS_ARB\0"
3071+ "GL_QUERY_RESULT\0"
3072+ "GL_QUERY_RESULT_ARB\0"
3073+ "GL_QUERY_RESULT_AVAILABLE\0"
3074+ "GL_QUERY_RESULT_AVAILABLE_ARB\0"
3075+ "GL_R\0"
3076+ "GL_R3_G3_B2\0"
3077+ "GL_RASTER_POSITION_UNCLIPPED_IBM\0"
3078+ "GL_READ_BUFFER\0"
3079+ "GL_READ_FRAMEBUFFER_BINDING_EXT\0"
3080+ "GL_READ_FRAMEBUFFER_EXT\0"
3081+ "GL_READ_ONLY\0"
3082+ "GL_READ_ONLY_ARB\0"
3083+ "GL_READ_WRITE\0"
3084+ "GL_READ_WRITE_ARB\0"
3085+ "GL_RED\0"
3086+ "GL_REDUCE\0"
3087+ "GL_REDUCE_EXT\0"
3088+ "GL_RED_BIAS\0"
3089+ "GL_RED_BITS\0"
3090+ "GL_RED_SCALE\0"
3091+ "GL_REFLECTION_MAP\0"
3092+ "GL_REFLECTION_MAP_ARB\0"
3093+ "GL_REFLECTION_MAP_NV\0"
3094+ "GL_RENDER\0"
3095+ "GL_RENDERBUFFER_BINDING_EXT\0"
3096+ "GL_RENDERBUFFER_EXT\0"
3097+ "GL_RENDERBUFFER_HEIGHT_EXT\0"
3098+ "GL_RENDERBUFFER_INTERNAL_FORMAT_EXT\0"
3099+ "GL_RENDERBUFFER_WIDTH_EXT\0"
3100+ "GL_RENDERER\0"
3101+ "GL_RENDER_MODE\0"
3102+ "GL_REPEAT\0"
3103+ "GL_REPLACE\0"
3104+ "GL_REPLACE_EXT\0"
3105+ "GL_REPLICATE_BORDER_HP\0"
3106+ "GL_RESCALE_NORMAL\0"
3107+ "GL_RESCALE_NORMAL_EXT\0"
3108+ "GL_RETURN\0"
3109+ "GL_RGB\0"
3110+ "GL_RGB10\0"
3111+ "GL_RGB10_A2\0"
3112+ "GL_RGB10_A2_EXT\0"
3113+ "GL_RGB10_EXT\0"
3114+ "GL_RGB12\0"
3115+ "GL_RGB12_EXT\0"
3116+ "GL_RGB16\0"
3117+ "GL_RGB16_EXT\0"
3118+ "GL_RGB2_EXT\0"
3119+ "GL_RGB4\0"
3120+ "GL_RGB4_EXT\0"
3121+ "GL_RGB4_S3TC\0"
3122+ "GL_RGB5\0"
3123+ "GL_RGB5_A1\0"
3124+ "GL_RGB5_A1_EXT\0"
3125+ "GL_RGB5_EXT\0"
3126+ "GL_RGB8\0"
3127+ "GL_RGB8_EXT\0"
3128+ "GL_RGBA\0"
3129+ "GL_RGBA12\0"
3130+ "GL_RGBA12_EXT\0"
3131+ "GL_RGBA16\0"
3132+ "GL_RGBA16_EXT\0"
3133+ "GL_RGBA2\0"
3134+ "GL_RGBA2_EXT\0"
3135+ "GL_RGBA4\0"
3136+ "GL_RGBA4_DXT5_S3TC\0"
3137+ "GL_RGBA4_EXT\0"
3138+ "GL_RGBA4_S3TC\0"
3139+ "GL_RGBA8\0"
3140+ "GL_RGBA8_EXT\0"
3141+ "GL_RGBA_DXT5_S3TC\0"
3142+ "GL_RGBA_MODE\0"
3143+ "GL_RGBA_S3TC\0"
3144+ "GL_RGB_S3TC\0"
3145+ "GL_RGB_SCALE\0"
3146+ "GL_RGB_SCALE_ARB\0"
3147+ "GL_RGB_SCALE_EXT\0"
3148+ "GL_RIGHT\0"
3149+ "GL_S\0"
3150+ "GL_SAMPLER_1D\0"
3151+ "GL_SAMPLER_1D_SHADOW\0"
3152+ "GL_SAMPLER_2D\0"
3153+ "GL_SAMPLER_2D_SHADOW\0"
3154+ "GL_SAMPLER_3D\0"
3155+ "GL_SAMPLER_CUBE\0"
3156+ "GL_SAMPLES\0"
3157+ "GL_SAMPLES_3DFX\0"
3158+ "GL_SAMPLES_ARB\0"
3159+ "GL_SAMPLES_PASSED\0"
3160+ "GL_SAMPLES_PASSED_ARB\0"
3161+ "GL_SAMPLE_ALPHA_TO_COVERAGE\0"
3162+ "GL_SAMPLE_ALPHA_TO_COVERAGE_ARB\0"
3163+ "GL_SAMPLE_ALPHA_TO_ONE\0"
3164+ "GL_SAMPLE_ALPHA_TO_ONE_ARB\0"
3165+ "GL_SAMPLE_BUFFERS\0"
3166+ "GL_SAMPLE_BUFFERS_3DFX\0"
3167+ "GL_SAMPLE_BUFFERS_ARB\0"
3168+ "GL_SAMPLE_COVERAGE\0"
3169+ "GL_SAMPLE_COVERAGE_ARB\0"
3170+ "GL_SAMPLE_COVERAGE_INVERT\0"
3171+ "GL_SAMPLE_COVERAGE_INVERT_ARB\0"
3172+ "GL_SAMPLE_COVERAGE_VALUE\0"
3173+ "GL_SAMPLE_COVERAGE_VALUE_ARB\0"
3174+ "GL_SCISSOR_BIT\0"
3175+ "GL_SCISSOR_BOX\0"
3176+ "GL_SCISSOR_TEST\0"
3177+ "GL_SECONDARY_COLOR_ARRAY\0"
3178+ "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING\0"
3179+ "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB\0"
3180+ "GL_SECONDARY_COLOR_ARRAY_POINTER\0"
3181+ "GL_SECONDARY_COLOR_ARRAY_SIZE\0"
3182+ "GL_SECONDARY_COLOR_ARRAY_STRIDE\0"
3183+ "GL_SECONDARY_COLOR_ARRAY_TYPE\0"
3184+ "GL_SELECT\0"
3185+ "GL_SELECTION_BUFFER_POINTER\0"
3186+ "GL_SELECTION_BUFFER_SIZE\0"
3187+ "GL_SEPARABLE_2D\0"
3188+ "GL_SEPARATE_SPECULAR_COLOR\0"
3189+ "GL_SEPARATE_SPECULAR_COLOR_EXT\0"
3190+ "GL_SET\0"
3191+ "GL_SHADER_OBJECT_ARB\0"
3192+ "GL_SHADER_SOURCE_LENGTH\0"
3193+ "GL_SHADER_TYPE\0"
3194+ "GL_SHADE_MODEL\0"
3195+ "GL_SHADING_LANGUAGE_VERSION\0"
3196+ "GL_SHADOW_AMBIENT_SGIX\0"
3197+ "GL_SHARED_TEXTURE_PALETTE_EXT\0"
3198+ "GL_SHININESS\0"
3199+ "GL_SHORT\0"
3200+ "GL_SINGLE_COLOR\0"
3201+ "GL_SINGLE_COLOR_EXT\0"
3202+ "GL_SLICE_ACCUM_SUN\0"
3203+ "GL_SMOOTH\0"
3204+ "GL_SMOOTH_LINE_WIDTH_GRANULARITY\0"
3205+ "GL_SMOOTH_LINE_WIDTH_RANGE\0"
3206+ "GL_SMOOTH_POINT_SIZE_GRANULARITY\0"
3207+ "GL_SMOOTH_POINT_SIZE_RANGE\0"
3208+ "GL_SOURCE0_ALPHA\0"
3209+ "GL_SOURCE0_ALPHA_ARB\0"
3210+ "GL_SOURCE0_ALPHA_EXT\0"
3211+ "GL_SOURCE0_RGB\0"
3212+ "GL_SOURCE0_RGB_ARB\0"
3213+ "GL_SOURCE0_RGB_EXT\0"
3214+ "GL_SOURCE1_ALPHA\0"
3215+ "GL_SOURCE1_ALPHA_ARB\0"
3216+ "GL_SOURCE1_ALPHA_EXT\0"
3217+ "GL_SOURCE1_RGB\0"
3218+ "GL_SOURCE1_RGB_ARB\0"
3219+ "GL_SOURCE1_RGB_EXT\0"
3220+ "GL_SOURCE2_ALPHA\0"
3221+ "GL_SOURCE2_ALPHA_ARB\0"
3222+ "GL_SOURCE2_ALPHA_EXT\0"
3223+ "GL_SOURCE2_RGB\0"
3224+ "GL_SOURCE2_RGB_ARB\0"
3225+ "GL_SOURCE2_RGB_EXT\0"
3226+ "GL_SOURCE3_ALPHA_NV\0"
3227+ "GL_SOURCE3_RGB_NV\0"
3228+ "GL_SPECULAR\0"
3229+ "GL_SPHERE_MAP\0"
3230+ "GL_SPOT_CUTOFF\0"
3231+ "GL_SPOT_DIRECTION\0"
3232+ "GL_SPOT_EXPONENT\0"
3233+ "GL_SRC0_ALPHA\0"
3234+ "GL_SRC0_RGB\0"
3235+ "GL_SRC1_ALPHA\0"
3236+ "GL_SRC1_RGB\0"
3237+ "GL_SRC2_ALPHA\0"
3238+ "GL_SRC2_RGB\0"
3239+ "GL_SRC_ALPHA\0"
3240+ "GL_SRC_ALPHA_SATURATE\0"
3241+ "GL_SRC_COLOR\0"
3242+ "GL_STACK_OVERFLOW\0"
3243+ "GL_STACK_UNDERFLOW\0"
3244+ "GL_STATIC_COPY\0"
3245+ "GL_STATIC_COPY_ARB\0"
3246+ "GL_STATIC_DRAW\0"
3247+ "GL_STATIC_DRAW_ARB\0"
3248+ "GL_STATIC_READ\0"
3249+ "GL_STATIC_READ_ARB\0"
3250+ "GL_STENCIL\0"
3251+ "GL_STENCIL_ATTACHMENT_EXT\0"
3252+ "GL_STENCIL_BACK_FAIL\0"
3253+ "GL_STENCIL_BACK_FUNC\0"
3254+ "GL_STENCIL_BACK_PASS_DEPTH_FAIL\0"
3255+ "GL_STENCIL_BACK_PASS_DEPTH_PASS\0"
3256+ "GL_STENCIL_BACK_REF\0"
3257+ "GL_STENCIL_BACK_VALUE_MASK\0"
3258+ "GL_STENCIL_BACK_WRITEMASK\0"
3259+ "GL_STENCIL_BITS\0"
3260+ "GL_STENCIL_BUFFER_BIT\0"
3261+ "GL_STENCIL_CLEAR_VALUE\0"
3262+ "GL_STENCIL_FAIL\0"
3263+ "GL_STENCIL_FUNC\0"
3264+ "GL_STENCIL_INDEX\0"
3265+ "GL_STENCIL_INDEX16_EXT\0"
3266+ "GL_STENCIL_INDEX1_EXT\0"
3267+ "GL_STENCIL_INDEX4_EXT\0"
3268+ "GL_STENCIL_INDEX8_EXT\0"
3269+ "GL_STENCIL_INDEX_EXT\0"
3270+ "GL_STENCIL_PASS_DEPTH_FAIL\0"
3271+ "GL_STENCIL_PASS_DEPTH_PASS\0"
3272+ "GL_STENCIL_REF\0"
3273+ "GL_STENCIL_TEST\0"
3274+ "GL_STENCIL_TEST_TWO_SIDE_EXT\0"
3275+ "GL_STENCIL_VALUE_MASK\0"
3276+ "GL_STENCIL_WRITEMASK\0"
3277+ "GL_STEREO\0"
3278+ "GL_STREAM_COPY\0"
3279+ "GL_STREAM_COPY_ARB\0"
3280+ "GL_STREAM_DRAW\0"
3281+ "GL_STREAM_DRAW_ARB\0"
3282+ "GL_STREAM_READ\0"
3283+ "GL_STREAM_READ_ARB\0"
3284+ "GL_SUBPIXEL_BITS\0"
3285+ "GL_SUBTRACT\0"
3286+ "GL_SUBTRACT_ARB\0"
3287+ "GL_T\0"
3288+ "GL_T2F_C3F_V3F\0"
3289+ "GL_T2F_C4F_N3F_V3F\0"
3290+ "GL_T2F_C4UB_V3F\0"
3291+ "GL_T2F_N3F_V3F\0"
3292+ "GL_T2F_V3F\0"
3293+ "GL_T4F_C4F_N3F_V4F\0"
3294+ "GL_T4F_V4F\0"
3295+ "GL_TABLE_TOO_LARGE_EXT\0"
3296+ "GL_TEXTURE\0"
3297+ "GL_TEXTURE0\0"
3298+ "GL_TEXTURE0_ARB\0"
3299+ "GL_TEXTURE1\0"
3300+ "GL_TEXTURE10\0"
3301+ "GL_TEXTURE10_ARB\0"
3302+ "GL_TEXTURE11\0"
3303+ "GL_TEXTURE11_ARB\0"
3304+ "GL_TEXTURE12\0"
3305+ "GL_TEXTURE12_ARB\0"
3306+ "GL_TEXTURE13\0"
3307+ "GL_TEXTURE13_ARB\0"
3308+ "GL_TEXTURE14\0"
3309+ "GL_TEXTURE14_ARB\0"
3310+ "GL_TEXTURE15\0"
3311+ "GL_TEXTURE15_ARB\0"
3312+ "GL_TEXTURE16\0"
3313+ "GL_TEXTURE16_ARB\0"
3314+ "GL_TEXTURE17\0"
3315+ "GL_TEXTURE17_ARB\0"
3316+ "GL_TEXTURE18\0"
3317+ "GL_TEXTURE18_ARB\0"
3318+ "GL_TEXTURE19\0"
3319+ "GL_TEXTURE19_ARB\0"
3320+ "GL_TEXTURE1_ARB\0"
3321+ "GL_TEXTURE2\0"
3322+ "GL_TEXTURE20\0"
3323+ "GL_TEXTURE20_ARB\0"
3324+ "GL_TEXTURE21\0"
3325+ "GL_TEXTURE21_ARB\0"
3326+ "GL_TEXTURE22\0"
3327+ "GL_TEXTURE22_ARB\0"
3328+ "GL_TEXTURE23\0"
3329+ "GL_TEXTURE23_ARB\0"
3330+ "GL_TEXTURE24\0"
3331+ "GL_TEXTURE24_ARB\0"
3332+ "GL_TEXTURE25\0"
3333+ "GL_TEXTURE25_ARB\0"
3334+ "GL_TEXTURE26\0"
3335+ "GL_TEXTURE26_ARB\0"
3336+ "GL_TEXTURE27\0"
3337+ "GL_TEXTURE27_ARB\0"
3338+ "GL_TEXTURE28\0"
3339+ "GL_TEXTURE28_ARB\0"
3340+ "GL_TEXTURE29\0"
3341+ "GL_TEXTURE29_ARB\0"
3342+ "GL_TEXTURE2_ARB\0"
3343+ "GL_TEXTURE3\0"
3344+ "GL_TEXTURE30\0"
3345+ "GL_TEXTURE30_ARB\0"
3346+ "GL_TEXTURE31\0"
3347+ "GL_TEXTURE31_ARB\0"
3348+ "GL_TEXTURE3_ARB\0"
3349+ "GL_TEXTURE4\0"
3350+ "GL_TEXTURE4_ARB\0"
3351+ "GL_TEXTURE5\0"
3352+ "GL_TEXTURE5_ARB\0"
3353+ "GL_TEXTURE6\0"
3354+ "GL_TEXTURE6_ARB\0"
3355+ "GL_TEXTURE7\0"
3356+ "GL_TEXTURE7_ARB\0"
3357+ "GL_TEXTURE8\0"
3358+ "GL_TEXTURE8_ARB\0"
3359+ "GL_TEXTURE9\0"
3360+ "GL_TEXTURE9_ARB\0"
3361+ "GL_TEXTURE_1D\0"
3362+ "GL_TEXTURE_1D_ARRAY_EXT\0"
3363+ "GL_TEXTURE_2D\0"
3364+ "GL_TEXTURE_2D_ARRAY_EXT\0"
3365+ "GL_TEXTURE_3D\0"
3366+ "GL_TEXTURE_ALPHA_SIZE\0"
3367+ "GL_TEXTURE_ALPHA_SIZE_EXT\0"
3368+ "GL_TEXTURE_BASE_LEVEL\0"
3369+ "GL_TEXTURE_BINDING_1D\0"
3370+ "GL_TEXTURE_BINDING_1D_ARRAY_EXT\0"
3371+ "GL_TEXTURE_BINDING_2D\0"
3372+ "GL_TEXTURE_BINDING_2D_ARRAY_EXT\0"
3373+ "GL_TEXTURE_BINDING_3D\0"
3374+ "GL_TEXTURE_BINDING_CUBE_MAP\0"
3375+ "GL_TEXTURE_BINDING_CUBE_MAP_ARB\0"
3376+ "GL_TEXTURE_BINDING_RECTANGLE_ARB\0"
3377+ "GL_TEXTURE_BINDING_RECTANGLE_NV\0"
3378+ "GL_TEXTURE_BIT\0"
3379+ "GL_TEXTURE_BLUE_SIZE\0"
3380+ "GL_TEXTURE_BLUE_SIZE_EXT\0"
3381+ "GL_TEXTURE_BORDER\0"
3382+ "GL_TEXTURE_BORDER_COLOR\0"
3383+ "GL_TEXTURE_CLIPMAP_CENTER_SGIX\0"
3384+ "GL_TEXTURE_CLIPMAP_DEPTH_SGIX\0"
3385+ "GL_TEXTURE_CLIPMAP_FRAME_SGIX\0"
3386+ "GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX\0"
3387+ "GL_TEXTURE_CLIPMAP_OFFSET_SGIX\0"
3388+ "GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX\0"
3389+ "GL_TEXTURE_COLOR_TABLE_SGI\0"
3390+ "GL_TEXTURE_COLOR_WRITEMASK_SGIS\0"
3391+ "GL_TEXTURE_COMPARE_FAIL_VALUE_ARB\0"
3392+ "GL_TEXTURE_COMPARE_FUNC\0"
3393+ "GL_TEXTURE_COMPARE_FUNC_ARB\0"
3394+ "GL_TEXTURE_COMPARE_MODE\0"
3395+ "GL_TEXTURE_COMPARE_MODE_ARB\0"
3396+ "GL_TEXTURE_COMPARE_OPERATOR_SGIX\0"
3397+ "GL_TEXTURE_COMPARE_SGIX\0"
3398+ "GL_TEXTURE_COMPONENTS\0"
3399+ "GL_TEXTURE_COMPRESSED\0"
3400+ "GL_TEXTURE_COMPRESSED_ARB\0"
3401+ "GL_TEXTURE_COMPRESSED_FORMATS_ARB\0"
3402+ "GL_TEXTURE_COMPRESSED_IMAGE_SIZE\0"
3403+ "GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB\0"
3404+ "GL_TEXTURE_COMPRESSION_HINT\0"
3405+ "GL_TEXTURE_COMPRESSION_HINT_ARB\0"
3406+ "GL_TEXTURE_COORD_ARRAY\0"
3407+ "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING\0"
3408+ "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB\0"
3409+ "GL_TEXTURE_COORD_ARRAY_POINTER\0"
3410+ "GL_TEXTURE_COORD_ARRAY_SIZE\0"
3411+ "GL_TEXTURE_COORD_ARRAY_STRIDE\0"
3412+ "GL_TEXTURE_COORD_ARRAY_TYPE\0"
3413+ "GL_TEXTURE_CUBE_MAP\0"
3414+ "GL_TEXTURE_CUBE_MAP_ARB\0"
3415+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_X\0"
3416+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB\0"
3417+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y\0"
3418+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB\0"
3419+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z\0"
3420+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB\0"
3421+ "GL_TEXTURE_CUBE_MAP_POSITIVE_X\0"
3422+ "GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB\0"
3423+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Y\0"
3424+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB\0"
3425+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Z\0"
3426+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB\0"
3427+ "GL_TEXTURE_DEPTH\0"
3428+ "GL_TEXTURE_DEPTH_SIZE\0"
3429+ "GL_TEXTURE_DEPTH_SIZE_ARB\0"
3430+ "GL_TEXTURE_ENV\0"
3431+ "GL_TEXTURE_ENV_COLOR\0"
3432+ "GL_TEXTURE_ENV_MODE\0"
3433+ "GL_TEXTURE_FILTER_CONTROL\0"
3434+ "GL_TEXTURE_GEN_MODE\0"
3435+ "GL_TEXTURE_GEN_Q\0"
3436+ "GL_TEXTURE_GEN_R\0"
3437+ "GL_TEXTURE_GEN_S\0"
3438+ "GL_TEXTURE_GEN_T\0"
3439+ "GL_TEXTURE_GEQUAL_R_SGIX\0"
3440+ "GL_TEXTURE_GREEN_SIZE\0"
3441+ "GL_TEXTURE_GREEN_SIZE_EXT\0"
3442+ "GL_TEXTURE_HEIGHT\0"
3443+ "GL_TEXTURE_INDEX_SIZE_EXT\0"
3444+ "GL_TEXTURE_INTENSITY_SIZE\0"
3445+ "GL_TEXTURE_INTENSITY_SIZE_EXT\0"
3446+ "GL_TEXTURE_INTERNAL_FORMAT\0"
3447+ "GL_TEXTURE_LEQUAL_R_SGIX\0"
3448+ "GL_TEXTURE_LOD_BIAS\0"
3449+ "GL_TEXTURE_LOD_BIAS_EXT\0"
3450+ "GL_TEXTURE_LOD_BIAS_R_SGIX\0"
3451+ "GL_TEXTURE_LOD_BIAS_S_SGIX\0"
3452+ "GL_TEXTURE_LOD_BIAS_T_SGIX\0"
3453+ "GL_TEXTURE_LUMINANCE_SIZE\0"
3454+ "GL_TEXTURE_LUMINANCE_SIZE_EXT\0"
3455+ "GL_TEXTURE_MAG_FILTER\0"
3456+ "GL_TEXTURE_MATRIX\0"
3457+ "GL_TEXTURE_MAX_ANISOTROPY_EXT\0"
3458+ "GL_TEXTURE_MAX_CLAMP_R_SGIX\0"
3459+ "GL_TEXTURE_MAX_CLAMP_S_SGIX\0"
3460+ "GL_TEXTURE_MAX_CLAMP_T_SGIX\0"
3461+ "GL_TEXTURE_MAX_LEVEL\0"
3462+ "GL_TEXTURE_MAX_LOD\0"
3463+ "GL_TEXTURE_MIN_FILTER\0"
3464+ "GL_TEXTURE_MIN_LOD\0"
3465+ "GL_TEXTURE_PRIORITY\0"
3466+ "GL_TEXTURE_RECTANGLE_ARB\0"
3467+ "GL_TEXTURE_RECTANGLE_NV\0"
3468+ "GL_TEXTURE_RED_SIZE\0"
3469+ "GL_TEXTURE_RED_SIZE_EXT\0"
3470+ "GL_TEXTURE_RESIDENT\0"
3471+ "GL_TEXTURE_STACK_DEPTH\0"
3472+ "GL_TEXTURE_TOO_LARGE_EXT\0"
3473+ "GL_TEXTURE_UNSIGNED_REMAP_MODE_NV\0"
3474+ "GL_TEXTURE_WIDTH\0"
3475+ "GL_TEXTURE_WRAP_R\0"
3476+ "GL_TEXTURE_WRAP_S\0"
3477+ "GL_TEXTURE_WRAP_T\0"
3478+ "GL_TIME_ELAPSED_EXT\0"
3479+ "GL_TRACK_MATRIX_NV\0"
3480+ "GL_TRACK_MATRIX_TRANSFORM_NV\0"
3481+ "GL_TRANSFORM_BIT\0"
3482+ "GL_TRANSPOSE_COLOR_MATRIX\0"
3483+ "GL_TRANSPOSE_COLOR_MATRIX_ARB\0"
3484+ "GL_TRANSPOSE_CURRENT_MATRIX_ARB\0"
3485+ "GL_TRANSPOSE_MODELVIEW_MATRIX\0"
3486+ "GL_TRANSPOSE_MODELVIEW_MATRIX_ARB\0"
3487+ "GL_TRANSPOSE_NV\0"
3488+ "GL_TRANSPOSE_PROJECTION_MATRIX\0"
3489+ "GL_TRANSPOSE_PROJECTION_MATRIX_ARB\0"
3490+ "GL_TRANSPOSE_TEXTURE_MATRIX\0"
3491+ "GL_TRANSPOSE_TEXTURE_MATRIX_ARB\0"
3492+ "GL_TRIANGLES\0"
3493+ "GL_TRIANGLE_FAN\0"
3494+ "GL_TRIANGLE_MESH_SUN\0"
3495+ "GL_TRIANGLE_STRIP\0"
3496+ "GL_TRUE\0"
3497+ "GL_UNPACK_ALIGNMENT\0"
3498+ "GL_UNPACK_IMAGE_HEIGHT\0"
3499+ "GL_UNPACK_LSB_FIRST\0"
3500+ "GL_UNPACK_ROW_LENGTH\0"
3501+ "GL_UNPACK_SKIP_IMAGES\0"
3502+ "GL_UNPACK_SKIP_PIXELS\0"
3503+ "GL_UNPACK_SKIP_ROWS\0"
3504+ "GL_UNPACK_SWAP_BYTES\0"
3505+ "GL_UNSIGNED_BYTE\0"
3506+ "GL_UNSIGNED_BYTE_2_3_3_REV\0"
3507+ "GL_UNSIGNED_BYTE_3_3_2\0"
3508+ "GL_UNSIGNED_INT\0"
3509+ "GL_UNSIGNED_INT_10_10_10_2\0"
3510+ "GL_UNSIGNED_INT_24_8_NV\0"
3511+ "GL_UNSIGNED_INT_2_10_10_10_REV\0"
3512+ "GL_UNSIGNED_INT_8_8_8_8\0"
3513+ "GL_UNSIGNED_INT_8_8_8_8_REV\0"
3514+ "GL_UNSIGNED_SHORT\0"
3515+ "GL_UNSIGNED_SHORT_1_5_5_5_REV\0"
3516+ "GL_UNSIGNED_SHORT_4_4_4_4\0"
3517+ "GL_UNSIGNED_SHORT_4_4_4_4_REV\0"
3518+ "GL_UNSIGNED_SHORT_5_5_5_1\0"
3519+ "GL_UNSIGNED_SHORT_5_6_5\0"
3520+ "GL_UNSIGNED_SHORT_5_6_5_REV\0"
3521+ "GL_UNSIGNED_SHORT_8_8_APPLE\0"
3522+ "GL_UNSIGNED_SHORT_8_8_MESA\0"
3523+ "GL_UNSIGNED_SHORT_8_8_REV_APPLE\0"
3524+ "GL_UNSIGNED_SHORT_8_8_REV_MESA\0"
3525+ "GL_UPPER_LEFT\0"
3526+ "GL_V2F\0"
3527+ "GL_V3F\0"
3528+ "GL_VALIDATE_STATUS\0"
3529+ "GL_VENDOR\0"
3530+ "GL_VERSION\0"
3531+ "GL_VERTEX_ARRAY\0"
3532+ "GL_VERTEX_ARRAY_BINDING_APPLE\0"
3533+ "GL_VERTEX_ARRAY_BUFFER_BINDING\0"
3534+ "GL_VERTEX_ARRAY_BUFFER_BINDING_ARB\0"
3535+ "GL_VERTEX_ARRAY_POINTER\0"
3536+ "GL_VERTEX_ARRAY_SIZE\0"
3537+ "GL_VERTEX_ARRAY_STRIDE\0"
3538+ "GL_VERTEX_ARRAY_TYPE\0"
3539+ "GL_VERTEX_ATTRIB_ARRAY0_NV\0"
3540+ "GL_VERTEX_ATTRIB_ARRAY10_NV\0"
3541+ "GL_VERTEX_ATTRIB_ARRAY11_NV\0"
3542+ "GL_VERTEX_ATTRIB_ARRAY12_NV\0"
3543+ "GL_VERTEX_ATTRIB_ARRAY13_NV\0"
3544+ "GL_VERTEX_ATTRIB_ARRAY14_NV\0"
3545+ "GL_VERTEX_ATTRIB_ARRAY15_NV\0"
3546+ "GL_VERTEX_ATTRIB_ARRAY1_NV\0"
3547+ "GL_VERTEX_ATTRIB_ARRAY2_NV\0"
3548+ "GL_VERTEX_ATTRIB_ARRAY3_NV\0"
3549+ "GL_VERTEX_ATTRIB_ARRAY4_NV\0"
3550+ "GL_VERTEX_ATTRIB_ARRAY5_NV\0"
3551+ "GL_VERTEX_ATTRIB_ARRAY6_NV\0"
3552+ "GL_VERTEX_ATTRIB_ARRAY7_NV\0"
3553+ "GL_VERTEX_ATTRIB_ARRAY8_NV\0"
3554+ "GL_VERTEX_ATTRIB_ARRAY9_NV\0"
3555+ "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\0"
3556+ "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB\0"
3557+ "GL_VERTEX_ATTRIB_ARRAY_ENABLED\0"
3558+ "GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB\0"
3559+ "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED\0"
3560+ "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB\0"
3561+ "GL_VERTEX_ATTRIB_ARRAY_POINTER\0"
3562+ "GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB\0"
3563+ "GL_VERTEX_ATTRIB_ARRAY_SIZE\0"
3564+ "GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB\0"
3565+ "GL_VERTEX_ATTRIB_ARRAY_STRIDE\0"
3566+ "GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB\0"
3567+ "GL_VERTEX_ATTRIB_ARRAY_TYPE\0"
3568+ "GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB\0"
3569+ "GL_VERTEX_BLEND_ARB\0"
3570+ "GL_VERTEX_PROGRAM_ARB\0"
3571+ "GL_VERTEX_PROGRAM_BINDING_NV\0"
3572+ "GL_VERTEX_PROGRAM_NV\0"
3573+ "GL_VERTEX_PROGRAM_POINT_SIZE\0"
3574+ "GL_VERTEX_PROGRAM_POINT_SIZE_ARB\0"
3575+ "GL_VERTEX_PROGRAM_POINT_SIZE_NV\0"
3576+ "GL_VERTEX_PROGRAM_TWO_SIDE\0"
3577+ "GL_VERTEX_PROGRAM_TWO_SIDE_ARB\0"
3578+ "GL_VERTEX_PROGRAM_TWO_SIDE_NV\0"
3579+ "GL_VERTEX_SHADER\0"
3580+ "GL_VERTEX_SHADER_ARB\0"
3581+ "GL_VERTEX_STATE_PROGRAM_NV\0"
3582+ "GL_VIEWPORT\0"
3583+ "GL_VIEWPORT_BIT\0"
3584+ "GL_WEIGHT_ARRAY_ARB\0"
3585+ "GL_WEIGHT_ARRAY_BUFFER_BINDING\0"
3586+ "GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB\0"
3587+ "GL_WEIGHT_ARRAY_POINTER_ARB\0"
3588+ "GL_WEIGHT_ARRAY_SIZE_ARB\0"
3589+ "GL_WEIGHT_ARRAY_STRIDE_ARB\0"
3590+ "GL_WEIGHT_ARRAY_TYPE_ARB\0"
3591+ "GL_WEIGHT_SUM_UNITY_ARB\0"
3592+ "GL_WRAP_BORDER_SUN\0"
3593+ "GL_WRITE_ONLY\0"
3594+ "GL_WRITE_ONLY_ARB\0"
3595+ "GL_XOR\0"
3596+ "GL_YCBCR_422_APPLE\0"
3597+ "GL_YCBCR_MESA\0"
3598+ "GL_ZERO\0"
3599+ "GL_ZOOM_X\0"
3600+ "GL_ZOOM_Y\0"
3601+ ;
3602+
3603+static const enum_elt all_enums[1746] =
3604+{
3605+ { 0, 0x00000600 }, /* GL_2D */
3606+ { 6, 0x00001407 }, /* GL_2_BYTES */
3607+ { 17, 0x00000601 }, /* GL_3D */
3608+ { 23, 0x00000602 }, /* GL_3D_COLOR */
3609+ { 35, 0x00000603 }, /* GL_3D_COLOR_TEXTURE */
3610+ { 55, 0x00001408 }, /* GL_3_BYTES */
3611+ { 66, 0x00000604 }, /* GL_4D_COLOR_TEXTURE */
3612+ { 86, 0x00001409 }, /* GL_4_BYTES */
3613+ { 97, 0x00000100 }, /* GL_ACCUM */
3614+ { 106, 0x00000D5B }, /* GL_ACCUM_ALPHA_BITS */
3615+ { 126, 0x00000D5A }, /* GL_ACCUM_BLUE_BITS */
3616+ { 145, 0x00000200 }, /* GL_ACCUM_BUFFER_BIT */
3617+ { 165, 0x00000B80 }, /* GL_ACCUM_CLEAR_VALUE */
3618+ { 186, 0x00000D59 }, /* GL_ACCUM_GREEN_BITS */
3619+ { 206, 0x00000D58 }, /* GL_ACCUM_RED_BITS */
3620+ { 224, 0x00008B89 }, /* GL_ACTIVE_ATTRIBUTES */
3621+ { 245, 0x00008B8A }, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
3622+ { 276, 0x00008911 }, /* GL_ACTIVE_STENCIL_FACE_EXT */
3623+ { 303, 0x000084E0 }, /* GL_ACTIVE_TEXTURE */
3624+ { 321, 0x000084E0 }, /* GL_ACTIVE_TEXTURE_ARB */
3625+ { 343, 0x00008B86 }, /* GL_ACTIVE_UNIFORMS */
3626+ { 362, 0x00008B87 }, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
3627+ { 391, 0x000086A5 }, /* GL_ACTIVE_VERTEX_UNITS_ARB */
3628+ { 418, 0x00000104 }, /* GL_ADD */
3629+ { 425, 0x00008574 }, /* GL_ADD_SIGNED */
3630+ { 439, 0x00008574 }, /* GL_ADD_SIGNED_ARB */
3631+ { 457, 0x00008574 }, /* GL_ADD_SIGNED_EXT */
3632+ { 475, 0x0000846E }, /* GL_ALIASED_LINE_WIDTH_RANGE */
3633+ { 503, 0x0000846D }, /* GL_ALIASED_POINT_SIZE_RANGE */
3634+ { 531, 0x000FFFFF }, /* GL_ALL_ATTRIB_BITS */
3635+ { 550, 0xFFFFFFFF }, /* GL_ALL_CLIENT_ATTRIB_BITS */
3636+ { 576, 0x00001906 }, /* GL_ALPHA */
3637+ { 585, 0x0000803D }, /* GL_ALPHA12 */
3638+ { 596, 0x0000803D }, /* GL_ALPHA12_EXT */
3639+ { 611, 0x0000803E }, /* GL_ALPHA16 */
3640+ { 622, 0x0000803E }, /* GL_ALPHA16_EXT */
3641+ { 637, 0x0000803B }, /* GL_ALPHA4 */
3642+ { 647, 0x0000803B }, /* GL_ALPHA4_EXT */
3643+ { 661, 0x0000803C }, /* GL_ALPHA8 */
3644+ { 671, 0x0000803C }, /* GL_ALPHA8_EXT */
3645+ { 685, 0x00000D1D }, /* GL_ALPHA_BIAS */
3646+ { 699, 0x00000D55 }, /* GL_ALPHA_BITS */
3647+ { 713, 0x00000D1C }, /* GL_ALPHA_SCALE */
3648+ { 728, 0x00000BC0 }, /* GL_ALPHA_TEST */
3649+ { 742, 0x00000BC1 }, /* GL_ALPHA_TEST_FUNC */
3650+ { 761, 0x00000BC2 }, /* GL_ALPHA_TEST_REF */
3651+ { 779, 0x00000207 }, /* GL_ALWAYS */
3652+ { 789, 0x00001200 }, /* GL_AMBIENT */
3653+ { 800, 0x00001602 }, /* GL_AMBIENT_AND_DIFFUSE */
3654+ { 823, 0x00001501 }, /* GL_AND */
3655+ { 830, 0x00001504 }, /* GL_AND_INVERTED */
3656+ { 846, 0x00001502 }, /* GL_AND_REVERSE */
3657+ { 861, 0x00008892 }, /* GL_ARRAY_BUFFER */
3658+ { 877, 0x00008892 }, /* GL_ARRAY_BUFFER_ARB */
3659+ { 897, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING */
3660+ { 921, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING_ARB */
3661+ { 949, 0x00008B85 }, /* GL_ATTACHED_SHADERS */
3662+ { 969, 0x00008645 }, /* GL_ATTRIB_ARRAY_POINTER_NV */
3663+ { 996, 0x00008623 }, /* GL_ATTRIB_ARRAY_SIZE_NV */
3664+ { 1020, 0x00008624 }, /* GL_ATTRIB_ARRAY_STRIDE_NV */
3665+ { 1046, 0x00008625 }, /* GL_ATTRIB_ARRAY_TYPE_NV */
3666+ { 1070, 0x00000BB0 }, /* GL_ATTRIB_STACK_DEPTH */
3667+ { 1092, 0x00000D80 }, /* GL_AUTO_NORMAL */
3668+ { 1107, 0x00000409 }, /* GL_AUX0 */
3669+ { 1115, 0x0000040A }, /* GL_AUX1 */
3670+ { 1123, 0x0000040B }, /* GL_AUX2 */
3671+ { 1131, 0x0000040C }, /* GL_AUX3 */
3672+ { 1139, 0x00000C00 }, /* GL_AUX_BUFFERS */
3673+ { 1154, 0x00000405 }, /* GL_BACK */
3674+ { 1162, 0x00000402 }, /* GL_BACK_LEFT */
3675+ { 1175, 0x00000403 }, /* GL_BACK_RIGHT */
3676+ { 1189, 0x000080E0 }, /* GL_BGR */
3677+ { 1196, 0x000080E1 }, /* GL_BGRA */
3678+ { 1204, 0x00001A00 }, /* GL_BITMAP */
3679+ { 1214, 0x00000704 }, /* GL_BITMAP_TOKEN */
3680+ { 1230, 0x00000BE2 }, /* GL_BLEND */
3681+ { 1239, 0x00008005 }, /* GL_BLEND_COLOR */
3682+ { 1254, 0x00008005 }, /* GL_BLEND_COLOR_EXT */
3683+ { 1273, 0x00000BE0 }, /* GL_BLEND_DST */
3684+ { 1286, 0x000080CA }, /* GL_BLEND_DST_ALPHA */
3685+ { 1305, 0x000080C8 }, /* GL_BLEND_DST_RGB */
3686+ { 1322, 0x00008009 }, /* GL_BLEND_EQUATION */
3687+ { 1340, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA */
3688+ { 1364, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_EXT */
3689+ { 1392, 0x00008009 }, /* GL_BLEND_EQUATION_EXT */
3690+ { 1414, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_EXT */
3691+ { 1440, 0x00000BE1 }, /* GL_BLEND_SRC */
3692+ { 1453, 0x000080CB }, /* GL_BLEND_SRC_ALPHA */
3693+ { 1472, 0x000080C9 }, /* GL_BLEND_SRC_RGB */
3694+ { 1489, 0x00001905 }, /* GL_BLUE */
3695+ { 1497, 0x00000D1B }, /* GL_BLUE_BIAS */
3696+ { 1510, 0x00000D54 }, /* GL_BLUE_BITS */
3697+ { 1523, 0x00000D1A }, /* GL_BLUE_SCALE */
3698+ { 1537, 0x00008B56 }, /* GL_BOOL */
3699+ { 1545, 0x00008B56 }, /* GL_BOOL_ARB */
3700+ { 1557, 0x00008B57 }, /* GL_BOOL_VEC2 */
3701+ { 1570, 0x00008B57 }, /* GL_BOOL_VEC2_ARB */
3702+ { 1587, 0x00008B58 }, /* GL_BOOL_VEC3 */
3703+ { 1600, 0x00008B58 }, /* GL_BOOL_VEC3_ARB */
3704+ { 1617, 0x00008B59 }, /* GL_BOOL_VEC4 */
3705+ { 1630, 0x00008B59 }, /* GL_BOOL_VEC4_ARB */
3706+ { 1647, 0x000088BB }, /* GL_BUFFER_ACCESS */
3707+ { 1664, 0x000088BB }, /* GL_BUFFER_ACCESS_ARB */
3708+ { 1685, 0x000088BC }, /* GL_BUFFER_MAPPED */
3709+ { 1702, 0x000088BC }, /* GL_BUFFER_MAPPED_ARB */
3710+ { 1723, 0x000088BD }, /* GL_BUFFER_MAP_POINTER */
3711+ { 1745, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_ARB */
3712+ { 1771, 0x00008764 }, /* GL_BUFFER_SIZE */
3713+ { 1786, 0x00008764 }, /* GL_BUFFER_SIZE_ARB */
3714+ { 1805, 0x00008765 }, /* GL_BUFFER_USAGE */
3715+ { 1821, 0x00008765 }, /* GL_BUFFER_USAGE_ARB */
3716+ { 1841, 0x00001400 }, /* GL_BYTE */
3717+ { 1849, 0x00002A24 }, /* GL_C3F_V3F */
3718+ { 1860, 0x00002A26 }, /* GL_C4F_N3F_V3F */
3719+ { 1875, 0x00002A22 }, /* GL_C4UB_V2F */
3720+ { 1887, 0x00002A23 }, /* GL_C4UB_V3F */
3721+ { 1899, 0x00000901 }, /* GL_CCW */
3722+ { 1906, 0x00002900 }, /* GL_CLAMP */
3723+ { 1915, 0x0000812D }, /* GL_CLAMP_TO_BORDER */
3724+ { 1934, 0x0000812D }, /* GL_CLAMP_TO_BORDER_ARB */
3725+ { 1957, 0x0000812D }, /* GL_CLAMP_TO_BORDER_SGIS */
3726+ { 1981, 0x0000812F }, /* GL_CLAMP_TO_EDGE */
3727+ { 1998, 0x0000812F }, /* GL_CLAMP_TO_EDGE_SGIS */
3728+ { 2020, 0x00001500 }, /* GL_CLEAR */
3729+ { 2029, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE */
3730+ { 2054, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE_ARB */
3731+ { 2083, 0xFFFFFFFF }, /* GL_CLIENT_ALL_ATTRIB_BITS */
3732+ { 2109, 0x00000BB1 }, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
3733+ { 2138, 0x00000001 }, /* GL_CLIENT_PIXEL_STORE_BIT */
3734+ { 2164, 0x00000002 }, /* GL_CLIENT_VERTEX_ARRAY_BIT */
3735+ { 2191, 0x00003000 }, /* GL_CLIP_PLANE0 */
3736+ { 2206, 0x00003001 }, /* GL_CLIP_PLANE1 */
3737+ { 2221, 0x00003002 }, /* GL_CLIP_PLANE2 */
3738+ { 2236, 0x00003003 }, /* GL_CLIP_PLANE3 */
3739+ { 2251, 0x00003004 }, /* GL_CLIP_PLANE4 */
3740+ { 2266, 0x00003005 }, /* GL_CLIP_PLANE5 */
3741+ { 2281, 0x000080F0 }, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
3742+ { 2314, 0x00000A00 }, /* GL_COEFF */
3743+ { 2323, 0x00001800 }, /* GL_COLOR */
3744+ { 2332, 0x00008076 }, /* GL_COLOR_ARRAY */
3745+ { 2347, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING */
3746+ { 2377, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING_ARB */
3747+ { 2411, 0x00008090 }, /* GL_COLOR_ARRAY_POINTER */
3748+ { 2434, 0x00008081 }, /* GL_COLOR_ARRAY_SIZE */
3749+ { 2454, 0x00008083 }, /* GL_COLOR_ARRAY_STRIDE */
3750+ { 2476, 0x00008082 }, /* GL_COLOR_ARRAY_TYPE */
3751+ { 2496, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_EXT */
3752+ { 2521, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10_EXT */
3753+ { 2547, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11_EXT */
3754+ { 2573, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12_EXT */
3755+ { 2599, 0x00008CED }, /* GL_COLOR_ATTACHMENT13_EXT */
3756+ { 2625, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14_EXT */
3757+ { 2651, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15_EXT */
3758+ { 2677, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1_EXT */
3759+ { 2702, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2_EXT */
3760+ { 2727, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3_EXT */
3761+ { 2752, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4_EXT */
3762+ { 2777, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5_EXT */
3763+ { 2802, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6_EXT */
3764+ { 2827, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7_EXT */
3765+ { 2852, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8_EXT */
3766+ { 2877, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9_EXT */
3767+ { 2902, 0x00004000 }, /* GL_COLOR_BUFFER_BIT */
3768+ { 2922, 0x00000C22 }, /* GL_COLOR_CLEAR_VALUE */
3769+ { 2943, 0x00001900 }, /* GL_COLOR_INDEX */
3770+ { 2958, 0x00001603 }, /* GL_COLOR_INDEXES */
3771+ { 2975, 0x00000BF2 }, /* GL_COLOR_LOGIC_OP */
3772+ { 2993, 0x00000B57 }, /* GL_COLOR_MATERIAL */
3773+ { 3011, 0x00000B55 }, /* GL_COLOR_MATERIAL_FACE */
3774+ { 3034, 0x00000B56 }, /* GL_COLOR_MATERIAL_PARAMETER */
3775+ { 3062, 0x000080B1 }, /* GL_COLOR_MATRIX */
3776+ { 3078, 0x000080B1 }, /* GL_COLOR_MATRIX_SGI */
3777+ { 3098, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH */
3778+ { 3126, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH_SGI */
3779+ { 3158, 0x00008458 }, /* GL_COLOR_SUM */
3780+ { 3171, 0x00008458 }, /* GL_COLOR_SUM_ARB */
3781+ { 3188, 0x000080D0 }, /* GL_COLOR_TABLE */
3782+ { 3203, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE */
3783+ { 3229, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_EXT */
3784+ { 3259, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_SGI */
3785+ { 3289, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS */
3786+ { 3309, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS_SGI */
3787+ { 3333, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE */
3788+ { 3358, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_EXT */
3789+ { 3387, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_SGI */
3790+ { 3416, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT */
3791+ { 3438, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_EXT */
3792+ { 3464, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_SGI */
3793+ { 3490, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE */
3794+ { 3516, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_EXT */
3795+ { 3546, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_SGI */
3796+ { 3576, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE */
3797+ { 3606, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_EXT */
3798+ { 3640, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_SGI */
3799+ { 3674, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
3800+ { 3704, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_EXT */
3801+ { 3738, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_SGI */
3802+ { 3772, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE */
3803+ { 3796, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_EXT */
3804+ { 3824, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_SGI */
3805+ { 3852, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE */
3806+ { 3873, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE_SGI */
3807+ { 3898, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH */
3808+ { 3919, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_EXT */
3809+ { 3944, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_SGI */
3810+ { 3969, 0x00000C23 }, /* GL_COLOR_WRITEMASK */
3811+ { 3988, 0x00008570 }, /* GL_COMBINE */
3812+ { 3999, 0x00008503 }, /* GL_COMBINE4 */
3813+ { 4011, 0x00008572 }, /* GL_COMBINE_ALPHA */
3814+ { 4028, 0x00008572 }, /* GL_COMBINE_ALPHA_ARB */
3815+ { 4049, 0x00008572 }, /* GL_COMBINE_ALPHA_EXT */
3816+ { 4070, 0x00008570 }, /* GL_COMBINE_ARB */
3817+ { 4085, 0x00008570 }, /* GL_COMBINE_EXT */
3818+ { 4100, 0x00008571 }, /* GL_COMBINE_RGB */
3819+ { 4115, 0x00008571 }, /* GL_COMBINE_RGB_ARB */
3820+ { 4134, 0x00008571 }, /* GL_COMBINE_RGB_EXT */
3821+ { 4153, 0x0000884E }, /* GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT */
3822+ { 4189, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE */
3823+ { 4213, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE_ARB */
3824+ { 4241, 0x00001300 }, /* GL_COMPILE */
3825+ { 4252, 0x00001301 }, /* GL_COMPILE_AND_EXECUTE */
3826+ { 4275, 0x00008B81 }, /* GL_COMPILE_STATUS */
3827+ { 4293, 0x000084E9 }, /* GL_COMPRESSED_ALPHA */
3828+ { 4313, 0x000084E9 }, /* GL_COMPRESSED_ALPHA_ARB */
3829+ { 4337, 0x000084EC }, /* GL_COMPRESSED_INTENSITY */
3830+ { 4361, 0x000084EC }, /* GL_COMPRESSED_INTENSITY_ARB */
3831+ { 4389, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE */
3832+ { 4413, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA */
3833+ { 4443, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA_ARB */
3834+ { 4477, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE_ARB */
3835+ { 4505, 0x000084ED }, /* GL_COMPRESSED_RGB */
3836+ { 4523, 0x000084EE }, /* GL_COMPRESSED_RGBA */
3837+ { 4542, 0x000084EE }, /* GL_COMPRESSED_RGBA_ARB */
3838+ { 4565, 0x000086B1 }, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
3839+ { 4594, 0x000083F1 }, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
3840+ { 4627, 0x000083F2 }, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
3841+ { 4660, 0x000083F3 }, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
3842+ { 4693, 0x000084ED }, /* GL_COMPRESSED_RGB_ARB */
3843+ { 4715, 0x000086B0 }, /* GL_COMPRESSED_RGB_FXT1_3DFX */
3844+ { 4743, 0x000083F0 }, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
3845+ { 4775, 0x000086A3 }, /* GL_COMPRESSED_TEXTURE_FORMATS */
3846+ { 4805, 0x00008576 }, /* GL_CONSTANT */
3847+ { 4817, 0x00008003 }, /* GL_CONSTANT_ALPHA */
3848+ { 4835, 0x00008003 }, /* GL_CONSTANT_ALPHA_EXT */
3849+ { 4857, 0x00008576 }, /* GL_CONSTANT_ARB */
3850+ { 4873, 0x00001207 }, /* GL_CONSTANT_ATTENUATION */
3851+ { 4897, 0x00008151 }, /* GL_CONSTANT_BORDER_HP */
3852+ { 4919, 0x00008001 }, /* GL_CONSTANT_COLOR */
3853+ { 4937, 0x00008001 }, /* GL_CONSTANT_COLOR_EXT */
3854+ { 4959, 0x00008576 }, /* GL_CONSTANT_EXT */
3855+ { 4975, 0x00008010 }, /* GL_CONVOLUTION_1D */
3856+ { 4993, 0x00008011 }, /* GL_CONVOLUTION_2D */
3857+ { 5011, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR */
3858+ { 5039, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR_HP */
3859+ { 5070, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE */
3860+ { 5097, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE_EXT */
3861+ { 5128, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS */
3862+ { 5155, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS_EXT */
3863+ { 5186, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE */
3864+ { 5214, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE_EXT */
3865+ { 5246, 0x00008017 }, /* GL_CONVOLUTION_FORMAT */
3866+ { 5268, 0x00008017 }, /* GL_CONVOLUTION_FORMAT_EXT */
3867+ { 5294, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT */
3868+ { 5316, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT_EXT */
3869+ { 5342, 0x00008018 }, /* GL_CONVOLUTION_WIDTH */
3870+ { 5363, 0x00008018 }, /* GL_CONVOLUTION_WIDTH_EXT */
3871+ { 5388, 0x00008862 }, /* GL_COORD_REPLACE */
3872+ { 5405, 0x00008862 }, /* GL_COORD_REPLACE_ARB */
3873+ { 5426, 0x00008862 }, /* GL_COORD_REPLACE_NV */
3874+ { 5446, 0x00001503 }, /* GL_COPY */
3875+ { 5454, 0x0000150C }, /* GL_COPY_INVERTED */
3876+ { 5471, 0x00000706 }, /* GL_COPY_PIXEL_TOKEN */
3877+ { 5491, 0x00000B44 }, /* GL_CULL_FACE */
3878+ { 5504, 0x00000B45 }, /* GL_CULL_FACE_MODE */
3879+ { 5522, 0x000081AA }, /* GL_CULL_VERTEX_EXT */
3880+ { 5541, 0x000081AC }, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
3881+ { 5573, 0x000081AB }, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
3882+ { 5608, 0x00008626 }, /* GL_CURRENT_ATTRIB_NV */
3883+ { 5629, 0x00000001 }, /* GL_CURRENT_BIT */
3884+ { 5644, 0x00000B00 }, /* GL_CURRENT_COLOR */
3885+ { 5661, 0x00008453 }, /* GL_CURRENT_FOG_COORD */
3886+ { 5682, 0x00008453 }, /* GL_CURRENT_FOG_COORDINATE */
3887+ { 5708, 0x00000B01 }, /* GL_CURRENT_INDEX */
3888+ { 5725, 0x00008641 }, /* GL_CURRENT_MATRIX_ARB */
3889+ { 5747, 0x00008845 }, /* GL_CURRENT_MATRIX_INDEX_ARB */
3890+ { 5775, 0x00008641 }, /* GL_CURRENT_MATRIX_NV */
3891+ { 5796, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
3892+ { 5830, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_NV */
3893+ { 5863, 0x00000B02 }, /* GL_CURRENT_NORMAL */
3894+ { 5881, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_ARB */
3895+ { 5911, 0x00008B8D }, /* GL_CURRENT_PROGRAM */
3896+ { 5930, 0x00008865 }, /* GL_CURRENT_QUERY */
3897+ { 5947, 0x00008865 }, /* GL_CURRENT_QUERY_ARB */
3898+ { 5968, 0x00000B04 }, /* GL_CURRENT_RASTER_COLOR */
3899+ { 5992, 0x00000B09 }, /* GL_CURRENT_RASTER_DISTANCE */
3900+ { 6019, 0x00000B05 }, /* GL_CURRENT_RASTER_INDEX */
3901+ { 6043, 0x00000B07 }, /* GL_CURRENT_RASTER_POSITION */
3902+ { 6070, 0x00000B08 }, /* GL_CURRENT_RASTER_POSITION_VALID */
3903+ { 6103, 0x00000B06 }, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
3904+ { 6136, 0x00008459 }, /* GL_CURRENT_SECONDARY_COLOR */
3905+ { 6163, 0x00000B03 }, /* GL_CURRENT_TEXTURE_COORDS */
3906+ { 6189, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB */
3907+ { 6214, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB_ARB */
3908+ { 6243, 0x000086A8 }, /* GL_CURRENT_WEIGHT_ARB */
3909+ { 6265, 0x00000900 }, /* GL_CW */
3910+ { 6271, 0x0000875B }, /* GL_DEBUG_ASSERT_MESA */
3911+ { 6292, 0x00008759 }, /* GL_DEBUG_OBJECT_MESA */
3912+ { 6313, 0x0000875A }, /* GL_DEBUG_PRINT_MESA */
3913+ { 6333, 0x00002101 }, /* GL_DECAL */
3914+ { 6342, 0x00001E03 }, /* GL_DECR */
3915+ { 6350, 0x00008508 }, /* GL_DECR_WRAP */
3916+ { 6363, 0x00008508 }, /* GL_DECR_WRAP_EXT */
3917+ { 6380, 0x00008B80 }, /* GL_DELETE_STATUS */
3918+ { 6397, 0x00001801 }, /* GL_DEPTH */
3919+ { 6406, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */
3920+ { 6430, 0x00000D1F }, /* GL_DEPTH_BIAS */
3921+ { 6444, 0x00000D56 }, /* GL_DEPTH_BITS */
3922+ { 6458, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */
3923+ { 6478, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */
3924+ { 6503, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */
3925+ { 6523, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */
3926+ { 6541, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */
3927+ { 6562, 0x00001902 }, /* GL_DEPTH_COMPONENT */
3928+ { 6581, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */
3929+ { 6602, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */
3930+ { 6627, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */
3931+ { 6653, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */
3932+ { 6674, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */
3933+ { 6699, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */
3934+ { 6725, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */
3935+ { 6746, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */
3936+ { 6771, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */
3937+ { 6797, 0x00000B74 }, /* GL_DEPTH_FUNC */
3938+ { 6811, 0x00000B70 }, /* GL_DEPTH_RANGE */
3939+ { 6826, 0x00000D1E }, /* GL_DEPTH_SCALE */
3940+ { 6841, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */
3941+ { 6861, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
3942+ { 6889, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
3943+ { 6917, 0x00000B71 }, /* GL_DEPTH_TEST */
3944+ { 6931, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */
3945+ { 6953, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */
3946+ { 6979, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */
3947+ { 6998, 0x00001201 }, /* GL_DIFFUSE */
3948+ { 7009, 0x00000BD0 }, /* GL_DITHER */
3949+ { 7019, 0x00000A02 }, /* GL_DOMAIN */
3950+ { 7029, 0x00001100 }, /* GL_DONT_CARE */
3951+ { 7042, 0x000086AE }, /* GL_DOT3_RGB */
3952+ { 7054, 0x000086AF }, /* GL_DOT3_RGBA */
3953+ { 7067, 0x000086AF }, /* GL_DOT3_RGBA_ARB */
3954+ { 7084, 0x00008741 }, /* GL_DOT3_RGBA_EXT */
3955+ { 7101, 0x000086AE }, /* GL_DOT3_RGB_ARB */
3956+ { 7117, 0x00008740 }, /* GL_DOT3_RGB_EXT */
3957+ { 7133, 0x0000140A }, /* GL_DOUBLE */
3958+ { 7143, 0x00000C32 }, /* GL_DOUBLEBUFFER */
3959+ { 7159, 0x00000C01 }, /* GL_DRAW_BUFFER */
3960+ { 7174, 0x00008825 }, /* GL_DRAW_BUFFER0 */
3961+ { 7190, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */
3962+ { 7210, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */
3963+ { 7230, 0x00008826 }, /* GL_DRAW_BUFFER1 */
3964+ { 7246, 0x0000882F }, /* GL_DRAW_BUFFER10 */
3965+ { 7263, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */
3966+ { 7284, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */
3967+ { 7305, 0x00008830 }, /* GL_DRAW_BUFFER11 */
3968+ { 7322, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */
3969+ { 7343, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */
3970+ { 7364, 0x00008831 }, /* GL_DRAW_BUFFER12 */
3971+ { 7381, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */
3972+ { 7402, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */
3973+ { 7423, 0x00008832 }, /* GL_DRAW_BUFFER13 */
3974+ { 7440, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */
3975+ { 7461, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */
3976+ { 7482, 0x00008833 }, /* GL_DRAW_BUFFER14 */
3977+ { 7499, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */
3978+ { 7520, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */
3979+ { 7541, 0x00008834 }, /* GL_DRAW_BUFFER15 */
3980+ { 7558, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */
3981+ { 7579, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */
3982+ { 7600, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */
3983+ { 7620, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */
3984+ { 7640, 0x00008827 }, /* GL_DRAW_BUFFER2 */
3985+ { 7656, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */
3986+ { 7676, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */
3987+ { 7696, 0x00008828 }, /* GL_DRAW_BUFFER3 */
3988+ { 7712, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */
3989+ { 7732, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */
3990+ { 7752, 0x00008829 }, /* GL_DRAW_BUFFER4 */
3991+ { 7768, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */
3992+ { 7788, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */
3993+ { 7808, 0x0000882A }, /* GL_DRAW_BUFFER5 */
3994+ { 7824, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */
3995+ { 7844, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */
3996+ { 7864, 0x0000882B }, /* GL_DRAW_BUFFER6 */
3997+ { 7880, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */
3998+ { 7900, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */
3999+ { 7920, 0x0000882C }, /* GL_DRAW_BUFFER7 */
4000+ { 7936, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */
4001+ { 7956, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */
4002+ { 7976, 0x0000882D }, /* GL_DRAW_BUFFER8 */
4003+ { 7992, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */
4004+ { 8012, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */
4005+ { 8032, 0x0000882E }, /* GL_DRAW_BUFFER9 */
4006+ { 8048, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */
4007+ { 8068, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */
4008+ { 8088, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
4009+ { 8120, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */
4010+ { 8144, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */
4011+ { 8164, 0x00000304 }, /* GL_DST_ALPHA */
4012+ { 8177, 0x00000306 }, /* GL_DST_COLOR */
4013+ { 8190, 0x000088EA }, /* GL_DYNAMIC_COPY */
4014+ { 8206, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */
4015+ { 8226, 0x000088E8 }, /* GL_DYNAMIC_DRAW */
4016+ { 8242, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */
4017+ { 8262, 0x000088E9 }, /* GL_DYNAMIC_READ */
4018+ { 8278, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */
4019+ { 8298, 0x00000B43 }, /* GL_EDGE_FLAG */
4020+ { 8311, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */
4021+ { 8330, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
4022+ { 8364, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */
4023+ { 8402, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */
4024+ { 8429, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */
4025+ { 8455, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */
4026+ { 8479, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER_ARB */
4027+ { 8507, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
4028+ { 8539, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */
4029+ { 8575, 0x00001600 }, /* GL_EMISSION */
4030+ { 8587, 0x00002000 }, /* GL_ENABLE_BIT */
4031+ { 8601, 0x00000202 }, /* GL_EQUAL */
4032+ { 8610, 0x00001509 }, /* GL_EQUIV */
4033+ { 8619, 0x00010000 }, /* GL_EVAL_BIT */
4034+ { 8631, 0x00000800 }, /* GL_EXP */
4035+ { 8638, 0x00000801 }, /* GL_EXP2 */
4036+ { 8646, 0x00001F03 }, /* GL_EXTENSIONS */
4037+ { 8660, 0x00002400 }, /* GL_EYE_LINEAR */
4038+ { 8674, 0x00002502 }, /* GL_EYE_PLANE */
4039+ { 8687, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */
4040+ { 8712, 0x0000855B }, /* GL_EYE_RADIAL_NV */
4041+ { 8729, 0x00000000 }, /* GL_FALSE */
4042+ { 8738, 0x00001101 }, /* GL_FASTEST */
4043+ { 8749, 0x00001C01 }, /* GL_FEEDBACK */
4044+ { 8761, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */
4045+ { 8788, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */
4046+ { 8812, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */
4047+ { 8836, 0x00001B02 }, /* GL_FILL */
4048+ { 8844, 0x00001D00 }, /* GL_FLAT */
4049+ { 8852, 0x00001406 }, /* GL_FLOAT */
4050+ { 8861, 0x00008B5A }, /* GL_FLOAT_MAT2 */
4051+ { 8875, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */
4052+ { 8893, 0x00008B5B }, /* GL_FLOAT_MAT3 */
4053+ { 8907, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */
4054+ { 8925, 0x00008B5C }, /* GL_FLOAT_MAT4 */
4055+ { 8939, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */
4056+ { 8957, 0x00008B50 }, /* GL_FLOAT_VEC2 */
4057+ { 8971, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */
4058+ { 8989, 0x00008B51 }, /* GL_FLOAT_VEC3 */
4059+ { 9003, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */
4060+ { 9021, 0x00008B52 }, /* GL_FLOAT_VEC4 */
4061+ { 9035, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */
4062+ { 9053, 0x00000B60 }, /* GL_FOG */
4063+ { 9060, 0x00000080 }, /* GL_FOG_BIT */
4064+ { 9071, 0x00000B66 }, /* GL_FOG_COLOR */
4065+ { 9084, 0x00008451 }, /* GL_FOG_COORD */
4066+ { 9097, 0x00008451 }, /* GL_FOG_COORDINATE */
4067+ { 9115, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */
4068+ { 9139, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
4069+ { 9178, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */
4070+ { 9221, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */
4071+ { 9253, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
4072+ { 9284, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */
4073+ { 9313, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */
4074+ { 9338, 0x00008457 }, /* GL_FOG_COORD_ARRAY */
4075+ { 9357, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */
4076+ { 9391, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */
4077+ { 9418, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */
4078+ { 9444, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */
4079+ { 9468, 0x00008450 }, /* GL_FOG_COORD_SRC */
4080+ { 9485, 0x00000B62 }, /* GL_FOG_DENSITY */
4081+ { 9500, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */
4082+ { 9524, 0x00000B64 }, /* GL_FOG_END */
4083+ { 9535, 0x00000C54 }, /* GL_FOG_HINT */
4084+ { 9547, 0x00000B61 }, /* GL_FOG_INDEX */
4085+ { 9560, 0x00000B65 }, /* GL_FOG_MODE */
4086+ { 9572, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */
4087+ { 9591, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */
4088+ { 9616, 0x00000B63 }, /* GL_FOG_START */
4089+ { 9629, 0x00008452 }, /* GL_FRAGMENT_DEPTH */
4090+ { 9647, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */
4091+ { 9671, 0x00008B30 }, /* GL_FRAGMENT_SHADER */
4092+ { 9690, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */
4093+ { 9713, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
4094+ { 9748, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
4095+ { 9790, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
4096+ { 9832, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
4097+ { 9881, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
4098+ { 9933, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
4099+ { 9977, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
4100+ { 10021, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */
4101+ { 10048, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */
4102+ { 10076, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */
4103+ { 10095, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
4104+ { 10136, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
4105+ { 10177, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
4106+ { 10219, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
4107+ { 10270, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
4108+ { 10308, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
4109+ { 10357, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
4110+ { 10399, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
4111+ { 10431, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
4112+ { 10462, 0x00000404 }, /* GL_FRONT */
4113+ { 10471, 0x00000408 }, /* GL_FRONT_AND_BACK */
4114+ { 10489, 0x00000B46 }, /* GL_FRONT_FACE */
4115+ { 10503, 0x00000400 }, /* GL_FRONT_LEFT */
4116+ { 10517, 0x00000401 }, /* GL_FRONT_RIGHT */
4117+ { 10532, 0x00008006 }, /* GL_FUNC_ADD */
4118+ { 10544, 0x00008006 }, /* GL_FUNC_ADD_EXT */
4119+ { 10560, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */
4120+ { 10585, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */
4121+ { 10614, 0x0000800A }, /* GL_FUNC_SUBTRACT */
4122+ { 10631, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */
4123+ { 10652, 0x00008191 }, /* GL_GENERATE_MIPMAP */
4124+ { 10671, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */
4125+ { 10695, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */
4126+ { 10724, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */
4127+ { 10748, 0x00000206 }, /* GL_GEQUAL */
4128+ { 10758, 0x00008009 }, /* GL_GL_BLEND_EQUATION_RGB */
4129+ { 10783, 0x00008C4A }, /* GL_GL_COMPRESSED_SLUMINANCE */
4130+ { 10811, 0x00008C4B }, /* GL_GL_COMPRESSED_SLUMINANCE_ALPHA */
4131+ { 10845, 0x00008C48 }, /* GL_GL_COMPRESSED_SRGB */
4132+ { 10867, 0x00008C49 }, /* GL_GL_COMPRESSED_SRGB_ALPHA */
4133+ { 10895, 0x0000845F }, /* GL_GL_CURRENT_RASTER_SECONDARY_COLOR */
4134+ { 10932, 0x00008B65 }, /* GL_GL_FLOAT_MAT2x3 */
4135+ { 10951, 0x00008B66 }, /* GL_GL_FLOAT_MAT2x4 */
4136+ { 10970, 0x00008B67 }, /* GL_GL_FLOAT_MAT3x2 */
4137+ { 10989, 0x00008B68 }, /* GL_GL_FLOAT_MAT3x4 */
4138+ { 11008, 0x00008B69 }, /* GL_GL_FLOAT_MAT4x2 */
4139+ { 11027, 0x00008B6A }, /* GL_GL_FLOAT_MAT4x3 */
4140+ { 11046, 0x000088EB }, /* GL_GL_PIXEL_PACK_BUFFER */
4141+ { 11070, 0x000088ED }, /* GL_GL_PIXEL_PACK_BUFFER_BINDING */
4142+ { 11102, 0x000088EC }, /* GL_GL_PIXEL_UNPACK_BUFFER */
4143+ { 11128, 0x000088EF }, /* GL_GL_PIXEL_UNPACK_BUFFER_BINDING */
4144+ { 11162, 0x00008C46 }, /* GL_GL_SLUMINANCE */
4145+ { 11179, 0x00008C47 }, /* GL_GL_SLUMINANCE8 */
4146+ { 11197, 0x00008C45 }, /* GL_GL_SLUMINANCE8_ALPHA8 */
4147+ { 11222, 0x00008C44 }, /* GL_GL_SLUMINANCE_ALPHA */
4148+ { 11245, 0x00008C40 }, /* GL_GL_SRGB */
4149+ { 11256, 0x00008C41 }, /* GL_GL_SRGB8 */
4150+ { 11268, 0x00008C43 }, /* GL_GL_SRGB8_ALPHA8 */
4151+ { 11287, 0x00008C42 }, /* GL_GL_SRGB_ALPHA */
4152+ { 11304, 0x00000204 }, /* GL_GREATER */
4153+ { 11315, 0x00001904 }, /* GL_GREEN */
4154+ { 11324, 0x00000D19 }, /* GL_GREEN_BIAS */
4155+ { 11338, 0x00000D53 }, /* GL_GREEN_BITS */
4156+ { 11352, 0x00000D18 }, /* GL_GREEN_SCALE */
4157+ { 11367, 0x00008000 }, /* GL_HINT_BIT */
4158+ { 11379, 0x00008024 }, /* GL_HISTOGRAM */
4159+ { 11392, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */
4160+ { 11416, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */
4161+ { 11444, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */
4162+ { 11467, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */
4163+ { 11494, 0x00008024 }, /* GL_HISTOGRAM_EXT */
4164+ { 11511, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */
4165+ { 11531, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */
4166+ { 11555, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */
4167+ { 11579, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */
4168+ { 11607, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */
4169+ { 11635, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */
4170+ { 11667, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */
4171+ { 11689, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */
4172+ { 11715, 0x0000802D }, /* GL_HISTOGRAM_SINK */
4173+ { 11733, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */
4174+ { 11755, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */
4175+ { 11774, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */
4176+ { 11797, 0x0000862A }, /* GL_IDENTITY_NV */
4177+ { 11812, 0x00008150 }, /* GL_IGNORE_BORDER_HP */
4178+ { 11832, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
4179+ { 11872, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
4180+ { 11910, 0x00001E02 }, /* GL_INCR */
4181+ { 11918, 0x00008507 }, /* GL_INCR_WRAP */
4182+ { 11931, 0x00008507 }, /* GL_INCR_WRAP_EXT */
4183+ { 11948, 0x00008077 }, /* GL_INDEX_ARRAY */
4184+ { 11963, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */
4185+ { 11993, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */
4186+ { 12027, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */
4187+ { 12050, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */
4188+ { 12072, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */
4189+ { 12092, 0x00000D51 }, /* GL_INDEX_BITS */
4190+ { 12106, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */
4191+ { 12127, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */
4192+ { 12145, 0x00000C30 }, /* GL_INDEX_MODE */
4193+ { 12159, 0x00000D13 }, /* GL_INDEX_OFFSET */
4194+ { 12175, 0x00000D12 }, /* GL_INDEX_SHIFT */
4195+ { 12190, 0x00000C21 }, /* GL_INDEX_WRITEMASK */
4196+ { 12209, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */
4197+ { 12228, 0x00001404 }, /* GL_INT */
4198+ { 12235, 0x00008049 }, /* GL_INTENSITY */
4199+ { 12248, 0x0000804C }, /* GL_INTENSITY12 */
4200+ { 12263, 0x0000804C }, /* GL_INTENSITY12_EXT */
4201+ { 12282, 0x0000804D }, /* GL_INTENSITY16 */
4202+ { 12297, 0x0000804D }, /* GL_INTENSITY16_EXT */
4203+ { 12316, 0x0000804A }, /* GL_INTENSITY4 */
4204+ { 12330, 0x0000804A }, /* GL_INTENSITY4_EXT */
4205+ { 12348, 0x0000804B }, /* GL_INTENSITY8 */
4206+ { 12362, 0x0000804B }, /* GL_INTENSITY8_EXT */
4207+ { 12380, 0x00008049 }, /* GL_INTENSITY_EXT */
4208+ { 12397, 0x00008575 }, /* GL_INTERPOLATE */
4209+ { 12412, 0x00008575 }, /* GL_INTERPOLATE_ARB */
4210+ { 12431, 0x00008575 }, /* GL_INTERPOLATE_EXT */
4211+ { 12450, 0x00008B53 }, /* GL_INT_VEC2 */
4212+ { 12462, 0x00008B53 }, /* GL_INT_VEC2_ARB */
4213+ { 12478, 0x00008B54 }, /* GL_INT_VEC3 */
4214+ { 12490, 0x00008B54 }, /* GL_INT_VEC3_ARB */
4215+ { 12506, 0x00008B55 }, /* GL_INT_VEC4 */
4216+ { 12518, 0x00008B55 }, /* GL_INT_VEC4_ARB */
4217+ { 12534, 0x00000500 }, /* GL_INVALID_ENUM */
4218+ { 12550, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
4219+ { 12587, 0x00000502 }, /* GL_INVALID_OPERATION */
4220+ { 12608, 0x00000501 }, /* GL_INVALID_VALUE */
4221+ { 12625, 0x0000862B }, /* GL_INVERSE_NV */
4222+ { 12639, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */
4223+ { 12663, 0x0000150A }, /* GL_INVERT */
4224+ { 12673, 0x00001E00 }, /* GL_KEEP */
4225+ { 12681, 0x00000406 }, /* GL_LEFT */
4226+ { 12689, 0x00000203 }, /* GL_LEQUAL */
4227+ { 12699, 0x00000201 }, /* GL_LESS */
4228+ { 12707, 0x00004000 }, /* GL_LIGHT0 */
4229+ { 12717, 0x00004001 }, /* GL_LIGHT1 */
4230+ { 12727, 0x00004002 }, /* GL_LIGHT2 */
4231+ { 12737, 0x00004003 }, /* GL_LIGHT3 */
4232+ { 12747, 0x00004004 }, /* GL_LIGHT4 */
4233+ { 12757, 0x00004005 }, /* GL_LIGHT5 */
4234+ { 12767, 0x00004006 }, /* GL_LIGHT6 */
4235+ { 12777, 0x00004007 }, /* GL_LIGHT7 */
4236+ { 12787, 0x00000B50 }, /* GL_LIGHTING */
4237+ { 12799, 0x00000040 }, /* GL_LIGHTING_BIT */
4238+ { 12815, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */
4239+ { 12838, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */
4240+ { 12867, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */
4241+ { 12900, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
4242+ { 12928, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */
4243+ { 12952, 0x00001B01 }, /* GL_LINE */
4244+ { 12960, 0x00002601 }, /* GL_LINEAR */
4245+ { 12970, 0x00001208 }, /* GL_LINEAR_ATTENUATION */
4246+ { 12992, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
4247+ { 13022, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
4248+ { 13053, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */
4249+ { 13077, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */
4250+ { 13102, 0x00000001 }, /* GL_LINES */
4251+ { 13111, 0x00000004 }, /* GL_LINE_BIT */
4252+ { 13123, 0x00000002 }, /* GL_LINE_LOOP */
4253+ { 13136, 0x00000707 }, /* GL_LINE_RESET_TOKEN */
4254+ { 13156, 0x00000B20 }, /* GL_LINE_SMOOTH */
4255+ { 13171, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */
4256+ { 13191, 0x00000B24 }, /* GL_LINE_STIPPLE */
4257+ { 13207, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */
4258+ { 13231, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */
4259+ { 13254, 0x00000003 }, /* GL_LINE_STRIP */
4260+ { 13268, 0x00000702 }, /* GL_LINE_TOKEN */
4261+ { 13282, 0x00000B21 }, /* GL_LINE_WIDTH */
4262+ { 13296, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */
4263+ { 13322, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */
4264+ { 13342, 0x00008B82 }, /* GL_LINK_STATUS */
4265+ { 13357, 0x00000B32 }, /* GL_LIST_BASE */
4266+ { 13370, 0x00020000 }, /* GL_LIST_BIT */
4267+ { 13382, 0x00000B33 }, /* GL_LIST_INDEX */
4268+ { 13396, 0x00000B30 }, /* GL_LIST_MODE */
4269+ { 13409, 0x00000101 }, /* GL_LOAD */
4270+ { 13417, 0x00000BF1 }, /* GL_LOGIC_OP */
4271+ { 13429, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */
4272+ { 13446, 0x00008CA1 }, /* GL_LOWER_LEFT */
4273+ { 13460, 0x00001909 }, /* GL_LUMINANCE */
4274+ { 13473, 0x00008041 }, /* GL_LUMINANCE12 */
4275+ { 13488, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */
4276+ { 13511, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */
4277+ { 13538, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */
4278+ { 13560, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */
4279+ { 13586, 0x00008041 }, /* GL_LUMINANCE12_EXT */
4280+ { 13605, 0x00008042 }, /* GL_LUMINANCE16 */
4281+ { 13620, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */
4282+ { 13643, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */
4283+ { 13670, 0x00008042 }, /* GL_LUMINANCE16_EXT */
4284+ { 13689, 0x0000803F }, /* GL_LUMINANCE4 */
4285+ { 13703, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */
4286+ { 13724, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */
4287+ { 13749, 0x0000803F }, /* GL_LUMINANCE4_EXT */
4288+ { 13767, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */
4289+ { 13788, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */
4290+ { 13813, 0x00008040 }, /* GL_LUMINANCE8 */
4291+ { 13827, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */
4292+ { 13848, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */
4293+ { 13873, 0x00008040 }, /* GL_LUMINANCE8_EXT */
4294+ { 13891, 0x0000190A }, /* GL_LUMINANCE_ALPHA */
4295+ { 13910, 0x00000D90 }, /* GL_MAP1_COLOR_4 */
4296+ { 13926, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */
4297+ { 13946, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */
4298+ { 13968, 0x00000D91 }, /* GL_MAP1_INDEX */
4299+ { 13982, 0x00000D92 }, /* GL_MAP1_NORMAL */
4300+ { 13997, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */
4301+ { 14021, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */
4302+ { 14045, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */
4303+ { 14069, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */
4304+ { 14093, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */
4305+ { 14110, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */
4306+ { 14127, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
4307+ { 14155, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
4308+ { 14184, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
4309+ { 14213, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
4310+ { 14242, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
4311+ { 14271, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
4312+ { 14300, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
4313+ { 14329, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
4314+ { 14357, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
4315+ { 14385, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
4316+ { 14413, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
4317+ { 14441, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
4318+ { 14469, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
4319+ { 14497, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
4320+ { 14525, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
4321+ { 14553, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
4322+ { 14581, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */
4323+ { 14597, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */
4324+ { 14617, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */
4325+ { 14639, 0x00000DB1 }, /* GL_MAP2_INDEX */
4326+ { 14653, 0x00000DB2 }, /* GL_MAP2_NORMAL */
4327+ { 14668, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */
4328+ { 14692, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */
4329+ { 14716, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */
4330+ { 14740, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */
4331+ { 14764, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */
4332+ { 14781, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */
4333+ { 14798, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
4334+ { 14826, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
4335+ { 14855, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
4336+ { 14884, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
4337+ { 14913, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
4338+ { 14942, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
4339+ { 14971, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
4340+ { 15000, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
4341+ { 15028, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
4342+ { 15056, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
4343+ { 15084, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
4344+ { 15112, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
4345+ { 15140, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
4346+ { 15168, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */
4347+ { 15196, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
4348+ { 15224, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
4349+ { 15252, 0x00000D10 }, /* GL_MAP_COLOR */
4350+ { 15265, 0x00000D11 }, /* GL_MAP_STENCIL */
4351+ { 15280, 0x000088C0 }, /* GL_MATRIX0_ARB */
4352+ { 15295, 0x00008630 }, /* GL_MATRIX0_NV */
4353+ { 15309, 0x000088CA }, /* GL_MATRIX10_ARB */
4354+ { 15325, 0x000088CB }, /* GL_MATRIX11_ARB */
4355+ { 15341, 0x000088CC }, /* GL_MATRIX12_ARB */
4356+ { 15357, 0x000088CD }, /* GL_MATRIX13_ARB */
4357+ { 15373, 0x000088CE }, /* GL_MATRIX14_ARB */
4358+ { 15389, 0x000088CF }, /* GL_MATRIX15_ARB */
4359+ { 15405, 0x000088D0 }, /* GL_MATRIX16_ARB */
4360+ { 15421, 0x000088D1 }, /* GL_MATRIX17_ARB */
4361+ { 15437, 0x000088D2 }, /* GL_MATRIX18_ARB */
4362+ { 15453, 0x000088D3 }, /* GL_MATRIX19_ARB */
4363+ { 15469, 0x000088C1 }, /* GL_MATRIX1_ARB */
4364+ { 15484, 0x00008631 }, /* GL_MATRIX1_NV */
4365+ { 15498, 0x000088D4 }, /* GL_MATRIX20_ARB */
4366+ { 15514, 0x000088D5 }, /* GL_MATRIX21_ARB */
4367+ { 15530, 0x000088D6 }, /* GL_MATRIX22_ARB */
4368+ { 15546, 0x000088D7 }, /* GL_MATRIX23_ARB */
4369+ { 15562, 0x000088D8 }, /* GL_MATRIX24_ARB */
4370+ { 15578, 0x000088D9 }, /* GL_MATRIX25_ARB */
4371+ { 15594, 0x000088DA }, /* GL_MATRIX26_ARB */
4372+ { 15610, 0x000088DB }, /* GL_MATRIX27_ARB */
4373+ { 15626, 0x000088DC }, /* GL_MATRIX28_ARB */
4374+ { 15642, 0x000088DD }, /* GL_MATRIX29_ARB */
4375+ { 15658, 0x000088C2 }, /* GL_MATRIX2_ARB */
4376+ { 15673, 0x00008632 }, /* GL_MATRIX2_NV */
4377+ { 15687, 0x000088DE }, /* GL_MATRIX30_ARB */
4378+ { 15703, 0x000088DF }, /* GL_MATRIX31_ARB */
4379+ { 15719, 0x000088C3 }, /* GL_MATRIX3_ARB */
4380+ { 15734, 0x00008633 }, /* GL_MATRIX3_NV */
4381+ { 15748, 0x000088C4 }, /* GL_MATRIX4_ARB */
4382+ { 15763, 0x00008634 }, /* GL_MATRIX4_NV */
4383+ { 15777, 0x000088C5 }, /* GL_MATRIX5_ARB */
4384+ { 15792, 0x00008635 }, /* GL_MATRIX5_NV */
4385+ { 15806, 0x000088C6 }, /* GL_MATRIX6_ARB */
4386+ { 15821, 0x00008636 }, /* GL_MATRIX6_NV */
4387+ { 15835, 0x000088C7 }, /* GL_MATRIX7_ARB */
4388+ { 15850, 0x00008637 }, /* GL_MATRIX7_NV */
4389+ { 15864, 0x000088C8 }, /* GL_MATRIX8_ARB */
4390+ { 15879, 0x000088C9 }, /* GL_MATRIX9_ARB */
4391+ { 15894, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */
4392+ { 15920, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
4393+ { 15954, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
4394+ { 15985, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
4395+ { 16018, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
4396+ { 16049, 0x00000BA0 }, /* GL_MATRIX_MODE */
4397+ { 16064, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */
4398+ { 16086, 0x00008008 }, /* GL_MAX */
4399+ { 16093, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */
4400+ { 16116, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
4401+ { 16148, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */
4402+ { 16174, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
4403+ { 16207, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
4404+ { 16233, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
4405+ { 16267, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */
4406+ { 16286, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
4407+ { 16315, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
4408+ { 16347, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */
4409+ { 16383, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
4410+ { 16419, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
4411+ { 16459, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */
4412+ { 16485, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */
4413+ { 16515, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */
4414+ { 16540, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */
4415+ { 16569, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
4416+ { 16598, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */
4417+ { 16631, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */
4418+ { 16651, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */
4419+ { 16675, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */
4420+ { 16699, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */
4421+ { 16723, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */
4422+ { 16748, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */
4423+ { 16766, 0x00008008 }, /* GL_MAX_EXT */
4424+ { 16777, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
4425+ { 16812, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
4426+ { 16851, 0x00000D31 }, /* GL_MAX_LIGHTS */
4427+ { 16865, 0x00000B31 }, /* GL_MAX_LIST_NESTING */
4428+ { 16885, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
4429+ { 16923, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */
4430+ { 16952, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */
4431+ { 16976, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */
4432+ { 17004, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */
4433+ { 17027, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
4434+ { 17064, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
4435+ { 17100, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
4436+ { 17127, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
4437+ { 17156, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
4438+ { 17190, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
4439+ { 17226, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
4440+ { 17253, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
4441+ { 17285, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
4442+ { 17321, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
4443+ { 17350, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
4444+ { 17379, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */
4445+ { 17407, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
4446+ { 17445, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
4447+ { 17489, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
4448+ { 17532, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
4449+ { 17566, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
4450+ { 17605, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
4451+ { 17642, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
4452+ { 17680, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
4453+ { 17723, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
4454+ { 17766, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
4455+ { 17796, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
4456+ { 17827, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
4457+ { 17863, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
4458+ { 17899, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */
4459+ { 17929, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
4460+ { 17963, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */
4461+ { 17996, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
4462+ { 18025, 0x00008504 }, /* GL_MAX_SHININESS_NV */
4463+ { 18045, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */
4464+ { 18069, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */
4465+ { 18091, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */
4466+ { 18117, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */
4467+ { 18144, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
4468+ { 18175, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */
4469+ { 18199, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
4470+ { 18233, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */
4471+ { 18253, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */
4472+ { 18280, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */
4473+ { 18301, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */
4474+ { 18326, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */
4475+ { 18351, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
4476+ { 18386, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */
4477+ { 18408, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */
4478+ { 18434, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */
4479+ { 18456, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */
4480+ { 18482, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
4481+ { 18516, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
4482+ { 18554, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
4483+ { 18587, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
4484+ { 18624, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */
4485+ { 18648, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */
4486+ { 18669, 0x00008007 }, /* GL_MIN */
4487+ { 18676, 0x0000802E }, /* GL_MINMAX */
4488+ { 18686, 0x0000802E }, /* GL_MINMAX_EXT */
4489+ { 18700, 0x0000802F }, /* GL_MINMAX_FORMAT */
4490+ { 18717, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */
4491+ { 18738, 0x00008030 }, /* GL_MINMAX_SINK */
4492+ { 18753, 0x00008030 }, /* GL_MINMAX_SINK_EXT */
4493+ { 18772, 0x00008007 }, /* GL_MIN_EXT */
4494+ { 18783, 0x00008370 }, /* GL_MIRRORED_REPEAT */
4495+ { 18802, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */
4496+ { 18825, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */
4497+ { 18848, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */
4498+ { 18868, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */
4499+ { 18888, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
4500+ { 18918, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */
4501+ { 18946, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
4502+ { 18974, 0x00001700 }, /* GL_MODELVIEW */
4503+ { 18987, 0x00001700 }, /* GL_MODELVIEW0_ARB */
4504+ { 19005, 0x0000872A }, /* GL_MODELVIEW10_ARB */
4505+ { 19024, 0x0000872B }, /* GL_MODELVIEW11_ARB */
4506+ { 19043, 0x0000872C }, /* GL_MODELVIEW12_ARB */
4507+ { 19062, 0x0000872D }, /* GL_MODELVIEW13_ARB */
4508+ { 19081, 0x0000872E }, /* GL_MODELVIEW14_ARB */
4509+ { 19100, 0x0000872F }, /* GL_MODELVIEW15_ARB */
4510+ { 19119, 0x00008730 }, /* GL_MODELVIEW16_ARB */
4511+ { 19138, 0x00008731 }, /* GL_MODELVIEW17_ARB */
4512+ { 19157, 0x00008732 }, /* GL_MODELVIEW18_ARB */
4513+ { 19176, 0x00008733 }, /* GL_MODELVIEW19_ARB */
4514+ { 19195, 0x0000850A }, /* GL_MODELVIEW1_ARB */
4515+ { 19213, 0x00008734 }, /* GL_MODELVIEW20_ARB */
4516+ { 19232, 0x00008735 }, /* GL_MODELVIEW21_ARB */
4517+ { 19251, 0x00008736 }, /* GL_MODELVIEW22_ARB */
4518+ { 19270, 0x00008737 }, /* GL_MODELVIEW23_ARB */
4519+ { 19289, 0x00008738 }, /* GL_MODELVIEW24_ARB */
4520+ { 19308, 0x00008739 }, /* GL_MODELVIEW25_ARB */
4521+ { 19327, 0x0000873A }, /* GL_MODELVIEW26_ARB */
4522+ { 19346, 0x0000873B }, /* GL_MODELVIEW27_ARB */
4523+ { 19365, 0x0000873C }, /* GL_MODELVIEW28_ARB */
4524+ { 19384, 0x0000873D }, /* GL_MODELVIEW29_ARB */
4525+ { 19403, 0x00008722 }, /* GL_MODELVIEW2_ARB */
4526+ { 19421, 0x0000873E }, /* GL_MODELVIEW30_ARB */
4527+ { 19440, 0x0000873F }, /* GL_MODELVIEW31_ARB */
4528+ { 19459, 0x00008723 }, /* GL_MODELVIEW3_ARB */
4529+ { 19477, 0x00008724 }, /* GL_MODELVIEW4_ARB */
4530+ { 19495, 0x00008725 }, /* GL_MODELVIEW5_ARB */
4531+ { 19513, 0x00008726 }, /* GL_MODELVIEW6_ARB */
4532+ { 19531, 0x00008727 }, /* GL_MODELVIEW7_ARB */
4533+ { 19549, 0x00008728 }, /* GL_MODELVIEW8_ARB */
4534+ { 19567, 0x00008729 }, /* GL_MODELVIEW9_ARB */
4535+ { 19585, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */
4536+ { 19605, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */
4537+ { 19632, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */
4538+ { 19657, 0x00002100 }, /* GL_MODULATE */
4539+ { 19669, 0x00008744 }, /* GL_MODULATE_ADD_ATI */
4540+ { 19689, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */
4541+ { 19716, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */
4542+ { 19741, 0x00000103 }, /* GL_MULT */
4543+ { 19749, 0x0000809D }, /* GL_MULTISAMPLE */
4544+ { 19764, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */
4545+ { 19784, 0x0000809D }, /* GL_MULTISAMPLE_ARB */
4546+ { 19803, 0x20000000 }, /* GL_MULTISAMPLE_BIT */
4547+ { 19822, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */
4548+ { 19846, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */
4549+ { 19869, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */
4550+ { 19899, 0x00002A25 }, /* GL_N3F_V3F */
4551+ { 19910, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */
4552+ { 19930, 0x0000150E }, /* GL_NAND */
4553+ { 19938, 0x00002600 }, /* GL_NEAREST */
4554+ { 19949, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
4555+ { 19980, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
4556+ { 20012, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */
4557+ { 20037, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */
4558+ { 20063, 0x00000200 }, /* GL_NEVER */
4559+ { 20072, 0x00001102 }, /* GL_NICEST */
4560+ { 20082, 0x00000000 }, /* GL_NONE */
4561+ { 20090, 0x00001505 }, /* GL_NOOP */
4562+ { 20098, 0x00001508 }, /* GL_NOR */
4563+ { 20105, 0x00000BA1 }, /* GL_NORMALIZE */
4564+ { 20118, 0x00008075 }, /* GL_NORMAL_ARRAY */
4565+ { 20134, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
4566+ { 20165, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */
4567+ { 20200, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */
4568+ { 20224, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */
4569+ { 20247, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */
4570+ { 20268, 0x00008511 }, /* GL_NORMAL_MAP */
4571+ { 20282, 0x00008511 }, /* GL_NORMAL_MAP_ARB */
4572+ { 20300, 0x00008511 }, /* GL_NORMAL_MAP_NV */
4573+ { 20317, 0x00000205 }, /* GL_NOTEQUAL */
4574+ { 20329, 0x00000000 }, /* GL_NO_ERROR */
4575+ { 20341, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
4576+ { 20375, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */
4577+ { 20413, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
4578+ { 20445, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
4579+ { 20487, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
4580+ { 20517, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
4581+ { 20557, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
4582+ { 20588, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */
4583+ { 20617, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */
4584+ { 20645, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
4585+ { 20675, 0x00002401 }, /* GL_OBJECT_LINEAR */
4586+ { 20692, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */
4587+ { 20718, 0x00002501 }, /* GL_OBJECT_PLANE */
4588+ { 20734, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
4589+ { 20769, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */
4590+ { 20791, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */
4591+ { 20810, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */
4592+ { 20840, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */
4593+ { 20861, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */
4594+ { 20889, 0x00000001 }, /* GL_ONE */
4595+ { 20896, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */
4596+ { 20924, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */
4597+ { 20956, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */
4598+ { 20984, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */
4599+ { 21016, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */
4600+ { 21039, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */
4601+ { 21062, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */
4602+ { 21085, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */
4603+ { 21108, 0x00008598 }, /* GL_OPERAND0_ALPHA */
4604+ { 21126, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */
4605+ { 21148, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */
4606+ { 21170, 0x00008590 }, /* GL_OPERAND0_RGB */
4607+ { 21186, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */
4608+ { 21206, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */
4609+ { 21226, 0x00008599 }, /* GL_OPERAND1_ALPHA */
4610+ { 21244, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */
4611+ { 21266, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */
4612+ { 21288, 0x00008591 }, /* GL_OPERAND1_RGB */
4613+ { 21304, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */
4614+ { 21324, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */
4615+ { 21344, 0x0000859A }, /* GL_OPERAND2_ALPHA */
4616+ { 21362, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */
4617+ { 21384, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */
4618+ { 21406, 0x00008592 }, /* GL_OPERAND2_RGB */
4619+ { 21422, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */
4620+ { 21442, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */
4621+ { 21462, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */
4622+ { 21483, 0x00008593 }, /* GL_OPERAND3_RGB_NV */
4623+ { 21502, 0x00001507 }, /* GL_OR */
4624+ { 21508, 0x00000A01 }, /* GL_ORDER */
4625+ { 21517, 0x0000150D }, /* GL_OR_INVERTED */
4626+ { 21532, 0x0000150B }, /* GL_OR_REVERSE */
4627+ { 21546, 0x00000505 }, /* GL_OUT_OF_MEMORY */
4628+ { 21563, 0x00000D05 }, /* GL_PACK_ALIGNMENT */
4629+ { 21581, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */
4630+ { 21602, 0x00008758 }, /* GL_PACK_INVERT_MESA */
4631+ { 21622, 0x00000D01 }, /* GL_PACK_LSB_FIRST */
4632+ { 21640, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */
4633+ { 21659, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */
4634+ { 21679, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */
4635+ { 21699, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */
4636+ { 21717, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */
4637+ { 21736, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */
4638+ { 21761, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */
4639+ { 21785, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */
4640+ { 21806, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */
4641+ { 21828, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */
4642+ { 21850, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */
4643+ { 21875, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */
4644+ { 21899, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */
4645+ { 21920, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */
4646+ { 21942, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */
4647+ { 21964, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */
4648+ { 21986, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */
4649+ { 22017, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */
4650+ { 22037, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */
4651+ { 22062, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */
4652+ { 22082, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */
4653+ { 22107, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */
4654+ { 22127, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */
4655+ { 22152, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */
4656+ { 22172, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */
4657+ { 22197, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */
4658+ { 22217, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */
4659+ { 22242, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */
4660+ { 22262, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */
4661+ { 22287, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */
4662+ { 22307, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */
4663+ { 22332, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */
4664+ { 22352, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */
4665+ { 22377, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */
4666+ { 22397, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */
4667+ { 22422, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */
4668+ { 22442, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */
4669+ { 22467, 0x00000020 }, /* GL_PIXEL_MODE_BIT */
4670+ { 22485, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
4671+ { 22518, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */
4672+ { 22543, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
4673+ { 22578, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */
4674+ { 22605, 0x00001B00 }, /* GL_POINT */
4675+ { 22614, 0x00000000 }, /* GL_POINTS */
4676+ { 22624, 0x00000002 }, /* GL_POINT_BIT */
4677+ { 22637, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */
4678+ { 22667, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */
4679+ { 22701, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */
4680+ { 22735, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */
4681+ { 22770, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */
4682+ { 22799, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */
4683+ { 22832, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */
4684+ { 22865, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */
4685+ { 22899, 0x00000B11 }, /* GL_POINT_SIZE */
4686+ { 22913, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */
4687+ { 22939, 0x00008127 }, /* GL_POINT_SIZE_MAX */
4688+ { 22957, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */
4689+ { 22979, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */
4690+ { 23001, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */
4691+ { 23024, 0x00008126 }, /* GL_POINT_SIZE_MIN */
4692+ { 23042, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */
4693+ { 23064, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */
4694+ { 23086, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */
4695+ { 23109, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */
4696+ { 23129, 0x00000B10 }, /* GL_POINT_SMOOTH */
4697+ { 23145, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */
4698+ { 23166, 0x00008861 }, /* GL_POINT_SPRITE */
4699+ { 23182, 0x00008861 }, /* GL_POINT_SPRITE_ARB */
4700+ { 23202, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */
4701+ { 23231, 0x00008861 }, /* GL_POINT_SPRITE_NV */
4702+ { 23250, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */
4703+ { 23276, 0x00000701 }, /* GL_POINT_TOKEN */
4704+ { 23291, 0x00000009 }, /* GL_POLYGON */
4705+ { 23302, 0x00000008 }, /* GL_POLYGON_BIT */
4706+ { 23317, 0x00000B40 }, /* GL_POLYGON_MODE */
4707+ { 23333, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */
4708+ { 23356, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */
4709+ { 23381, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */
4710+ { 23404, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */
4711+ { 23427, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */
4712+ { 23451, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */
4713+ { 23475, 0x00000B41 }, /* GL_POLYGON_SMOOTH */
4714+ { 23493, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */
4715+ { 23516, 0x00000B42 }, /* GL_POLYGON_STIPPLE */
4716+ { 23535, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */
4717+ { 23558, 0x00000703 }, /* GL_POLYGON_TOKEN */
4718+ { 23575, 0x00001203 }, /* GL_POSITION */
4719+ { 23587, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
4720+ { 23619, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */
4721+ { 23655, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
4722+ { 23688, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */
4723+ { 23725, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
4724+ { 23756, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */
4725+ { 23791, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
4726+ { 23823, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */
4727+ { 23859, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
4728+ { 23892, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
4729+ { 23924, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */
4730+ { 23960, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
4731+ { 23993, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */
4732+ { 24030, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */
4733+ { 24060, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */
4734+ { 24094, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */
4735+ { 24125, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */
4736+ { 24160, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
4737+ { 24191, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */
4738+ { 24226, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
4739+ { 24258, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */
4740+ { 24294, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */
4741+ { 24324, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */
4742+ { 24358, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */
4743+ { 24389, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */
4744+ { 24424, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */
4745+ { 24456, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */
4746+ { 24487, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */
4747+ { 24522, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */
4748+ { 24554, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */
4749+ { 24590, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */
4750+ { 24619, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */
4751+ { 24652, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */
4752+ { 24682, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */
4753+ { 24716, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
4754+ { 24755, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
4755+ { 24788, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
4756+ { 24828, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
4757+ { 24862, 0x00008578 }, /* GL_PREVIOUS */
4758+ { 24874, 0x00008578 }, /* GL_PREVIOUS_ARB */
4759+ { 24890, 0x00008578 }, /* GL_PREVIOUS_EXT */
4760+ { 24906, 0x00008577 }, /* GL_PRIMARY_COLOR */
4761+ { 24923, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */
4762+ { 24944, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */
4763+ { 24965, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
4764+ { 24998, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
4765+ { 25030, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */
4766+ { 25053, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */
4767+ { 25076, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */
4768+ { 25106, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */
4769+ { 25135, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */
4770+ { 25163, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */
4771+ { 25185, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */
4772+ { 25213, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */
4773+ { 25241, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */
4774+ { 25263, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */
4775+ { 25284, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
4776+ { 25324, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
4777+ { 25363, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
4778+ { 25393, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
4779+ { 25428, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
4780+ { 25461, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
4781+ { 25495, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
4782+ { 25534, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
4783+ { 25573, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */
4784+ { 25595, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */
4785+ { 25621, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */
4786+ { 25645, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */
4787+ { 25668, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */
4788+ { 25690, 0x00008628 }, /* GL_PROGRAM_STRING_NV */
4789+ { 25711, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */
4790+ { 25732, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */
4791+ { 25759, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
4792+ { 25791, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
4793+ { 25823, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
4794+ { 25858, 0x00001701 }, /* GL_PROJECTION */
4795+ { 25872, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */
4796+ { 25893, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */
4797+ { 25919, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */
4798+ { 25940, 0x00008025 }, /* GL_PROXY_HISTOGRAM */
4799+ { 25959, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */
4800+ { 25982, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
4801+ { 26021, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
4802+ { 26059, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */
4803+ { 26079, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
4804+ { 26109, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */
4805+ { 26133, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */
4806+ { 26153, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
4807+ { 26183, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */
4808+ { 26207, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */
4809+ { 26227, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
4810+ { 26260, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */
4811+ { 26286, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */
4812+ { 26316, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
4813+ { 26347, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */
4814+ { 26377, 0x00002003 }, /* GL_Q */
4815+ { 26382, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */
4816+ { 26407, 0x00000007 }, /* GL_QUADS */
4817+ { 26416, 0x00008614 }, /* GL_QUAD_MESH_SUN */
4818+ { 26433, 0x00000008 }, /* GL_QUAD_STRIP */
4819+ { 26447, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */
4820+ { 26469, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */
4821+ { 26495, 0x00008866 }, /* GL_QUERY_RESULT */
4822+ { 26511, 0x00008866 }, /* GL_QUERY_RESULT_ARB */
4823+ { 26531, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */
4824+ { 26557, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */
4825+ { 26587, 0x00002002 }, /* GL_R */
4826+ { 26592, 0x00002A10 }, /* GL_R3_G3_B2 */
4827+ { 26604, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
4828+ { 26637, 0x00000C02 }, /* GL_READ_BUFFER */
4829+ { 26652, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
4830+ { 26684, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */
4831+ { 26708, 0x000088B8 }, /* GL_READ_ONLY */
4832+ { 26721, 0x000088B8 }, /* GL_READ_ONLY_ARB */
4833+ { 26738, 0x000088BA }, /* GL_READ_WRITE */
4834+ { 26752, 0x000088BA }, /* GL_READ_WRITE_ARB */
4835+ { 26770, 0x00001903 }, /* GL_RED */
4836+ { 26777, 0x00008016 }, /* GL_REDUCE */
4837+ { 26787, 0x00008016 }, /* GL_REDUCE_EXT */
4838+ { 26801, 0x00000D15 }, /* GL_RED_BIAS */
4839+ { 26813, 0x00000D52 }, /* GL_RED_BITS */
4840+ { 26825, 0x00000D14 }, /* GL_RED_SCALE */
4841+ { 26838, 0x00008512 }, /* GL_REFLECTION_MAP */
4842+ { 26856, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */
4843+ { 26878, 0x00008512 }, /* GL_REFLECTION_MAP_NV */
4844+ { 26899, 0x00001C00 }, /* GL_RENDER */
4845+ { 26909, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */
4846+ { 26937, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */
4847+ { 26957, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */
4848+ { 26984, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
4849+ { 27020, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */
4850+ { 27046, 0x00001F01 }, /* GL_RENDERER */
4851+ { 27058, 0x00000C40 }, /* GL_RENDER_MODE */
4852+ { 27073, 0x00002901 }, /* GL_REPEAT */
4853+ { 27083, 0x00001E01 }, /* GL_REPLACE */
4854+ { 27094, 0x00008062 }, /* GL_REPLACE_EXT */
4855+ { 27109, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */
4856+ { 27132, 0x0000803A }, /* GL_RESCALE_NORMAL */
4857+ { 27150, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */
4858+ { 27172, 0x00000102 }, /* GL_RETURN */
4859+ { 27182, 0x00001907 }, /* GL_RGB */
4860+ { 27189, 0x00008052 }, /* GL_RGB10 */
4861+ { 27198, 0x00008059 }, /* GL_RGB10_A2 */
4862+ { 27210, 0x00008059 }, /* GL_RGB10_A2_EXT */
4863+ { 27226, 0x00008052 }, /* GL_RGB10_EXT */
4864+ { 27239, 0x00008053 }, /* GL_RGB12 */
4865+ { 27248, 0x00008053 }, /* GL_RGB12_EXT */
4866+ { 27261, 0x00008054 }, /* GL_RGB16 */
4867+ { 27270, 0x00008054 }, /* GL_RGB16_EXT */
4868+ { 27283, 0x0000804E }, /* GL_RGB2_EXT */
4869+ { 27295, 0x0000804F }, /* GL_RGB4 */
4870+ { 27303, 0x0000804F }, /* GL_RGB4_EXT */
4871+ { 27315, 0x000083A1 }, /* GL_RGB4_S3TC */
4872+ { 27328, 0x00008050 }, /* GL_RGB5 */
4873+ { 27336, 0x00008057 }, /* GL_RGB5_A1 */
4874+ { 27347, 0x00008057 }, /* GL_RGB5_A1_EXT */
4875+ { 27362, 0x00008050 }, /* GL_RGB5_EXT */
4876+ { 27374, 0x00008051 }, /* GL_RGB8 */
4877+ { 27382, 0x00008051 }, /* GL_RGB8_EXT */
4878+ { 27394, 0x00001908 }, /* GL_RGBA */
4879+ { 27402, 0x0000805A }, /* GL_RGBA12 */
4880+ { 27412, 0x0000805A }, /* GL_RGBA12_EXT */
4881+ { 27426, 0x0000805B }, /* GL_RGBA16 */
4882+ { 27436, 0x0000805B }, /* GL_RGBA16_EXT */
4883+ { 27450, 0x00008055 }, /* GL_RGBA2 */
4884+ { 27459, 0x00008055 }, /* GL_RGBA2_EXT */
4885+ { 27472, 0x00008056 }, /* GL_RGBA4 */
4886+ { 27481, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */
4887+ { 27500, 0x00008056 }, /* GL_RGBA4_EXT */
4888+ { 27513, 0x000083A3 }, /* GL_RGBA4_S3TC */
4889+ { 27527, 0x00008058 }, /* GL_RGBA8 */
4890+ { 27536, 0x00008058 }, /* GL_RGBA8_EXT */
4891+ { 27549, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */
4892+ { 27567, 0x00000C31 }, /* GL_RGBA_MODE */
4893+ { 27580, 0x000083A2 }, /* GL_RGBA_S3TC */
4894+ { 27593, 0x000083A0 }, /* GL_RGB_S3TC */
4895+ { 27605, 0x00008573 }, /* GL_RGB_SCALE */
4896+ { 27618, 0x00008573 }, /* GL_RGB_SCALE_ARB */
4897+ { 27635, 0x00008573 }, /* GL_RGB_SCALE_EXT */
4898+ { 27652, 0x00000407 }, /* GL_RIGHT */
4899+ { 27661, 0x00002000 }, /* GL_S */
4900+ { 27666, 0x00008B5D }, /* GL_SAMPLER_1D */
4901+ { 27680, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */
4902+ { 27701, 0x00008B5E }, /* GL_SAMPLER_2D */
4903+ { 27715, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */
4904+ { 27736, 0x00008B5F }, /* GL_SAMPLER_3D */
4905+ { 27750, 0x00008B60 }, /* GL_SAMPLER_CUBE */
4906+ { 27766, 0x000080A9 }, /* GL_SAMPLES */
4907+ { 27777, 0x000086B4 }, /* GL_SAMPLES_3DFX */
4908+ { 27793, 0x000080A9 }, /* GL_SAMPLES_ARB */
4909+ { 27808, 0x00008914 }, /* GL_SAMPLES_PASSED */
4910+ { 27826, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */
4911+ { 27848, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
4912+ { 27876, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */
4913+ { 27908, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */
4914+ { 27931, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */
4915+ { 27958, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */
4916+ { 27976, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */
4917+ { 27999, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */
4918+ { 28021, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */
4919+ { 28040, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */
4920+ { 28063, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */
4921+ { 28089, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */
4922+ { 28119, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */
4923+ { 28144, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */
4924+ { 28173, 0x00080000 }, /* GL_SCISSOR_BIT */
4925+ { 28188, 0x00000C10 }, /* GL_SCISSOR_BOX */
4926+ { 28203, 0x00000C11 }, /* GL_SCISSOR_TEST */
4927+ { 28219, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */
4928+ { 28244, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
4929+ { 28284, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */
4930+ { 28328, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
4931+ { 28361, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
4932+ { 28391, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
4933+ { 28423, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
4934+ { 28453, 0x00001C02 }, /* GL_SELECT */
4935+ { 28463, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */
4936+ { 28491, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */
4937+ { 28516, 0x00008012 }, /* GL_SEPARABLE_2D */
4938+ { 28532, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */
4939+ { 28559, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */
4940+ { 28590, 0x0000150F }, /* GL_SET */
4941+ { 28597, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */
4942+ { 28618, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */
4943+ { 28642, 0x00008B4F }, /* GL_SHADER_TYPE */
4944+ { 28657, 0x00000B54 }, /* GL_SHADE_MODEL */
4945+ { 28672, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */
4946+ { 28700, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */
4947+ { 28723, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */
4948+ { 28753, 0x00001601 }, /* GL_SHININESS */
4949+ { 28766, 0x00001402 }, /* GL_SHORT */
4950+ { 28775, 0x000081F9 }, /* GL_SINGLE_COLOR */
4951+ { 28791, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */
4952+ { 28811, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */
4953+ { 28830, 0x00001D01 }, /* GL_SMOOTH */
4954+ { 28840, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */
4955+ { 28873, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */
4956+ { 28900, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */
4957+ { 28933, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */
4958+ { 28960, 0x00008588 }, /* GL_SOURCE0_ALPHA */
4959+ { 28977, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */
4960+ { 28998, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */
4961+ { 29019, 0x00008580 }, /* GL_SOURCE0_RGB */
4962+ { 29034, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */
4963+ { 29053, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */
4964+ { 29072, 0x00008589 }, /* GL_SOURCE1_ALPHA */
4965+ { 29089, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */
4966+ { 29110, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */
4967+ { 29131, 0x00008581 }, /* GL_SOURCE1_RGB */
4968+ { 29146, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */
4969+ { 29165, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */
4970+ { 29184, 0x0000858A }, /* GL_SOURCE2_ALPHA */
4971+ { 29201, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */
4972+ { 29222, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */
4973+ { 29243, 0x00008582 }, /* GL_SOURCE2_RGB */
4974+ { 29258, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */
4975+ { 29277, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */
4976+ { 29296, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */
4977+ { 29316, 0x00008583 }, /* GL_SOURCE3_RGB_NV */
4978+ { 29334, 0x00001202 }, /* GL_SPECULAR */
4979+ { 29346, 0x00002402 }, /* GL_SPHERE_MAP */
4980+ { 29360, 0x00001206 }, /* GL_SPOT_CUTOFF */
4981+ { 29375, 0x00001204 }, /* GL_SPOT_DIRECTION */
4982+ { 29393, 0x00001205 }, /* GL_SPOT_EXPONENT */
4983+ { 29410, 0x00008588 }, /* GL_SRC0_ALPHA */
4984+ { 29424, 0x00008580 }, /* GL_SRC0_RGB */
4985+ { 29436, 0x00008589 }, /* GL_SRC1_ALPHA */
4986+ { 29450, 0x00008581 }, /* GL_SRC1_RGB */
4987+ { 29462, 0x0000858A }, /* GL_SRC2_ALPHA */
4988+ { 29476, 0x00008582 }, /* GL_SRC2_RGB */
4989+ { 29488, 0x00000302 }, /* GL_SRC_ALPHA */
4990+ { 29501, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */
4991+ { 29523, 0x00000300 }, /* GL_SRC_COLOR */
4992+ { 29536, 0x00000503 }, /* GL_STACK_OVERFLOW */
4993+ { 29554, 0x00000504 }, /* GL_STACK_UNDERFLOW */
4994+ { 29573, 0x000088E6 }, /* GL_STATIC_COPY */
4995+ { 29588, 0x000088E6 }, /* GL_STATIC_COPY_ARB */
4996+ { 29607, 0x000088E4 }, /* GL_STATIC_DRAW */
4997+ { 29622, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */
4998+ { 29641, 0x000088E5 }, /* GL_STATIC_READ */
4999+ { 29656, 0x000088E5 }, /* GL_STATIC_READ_ARB */
5000+ { 29675, 0x00001802 }, /* GL_STENCIL */
5001+ { 29686, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */
5002+ { 29712, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */
5003+ { 29733, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */
5004+ { 29754, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
5005+ { 29786, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
5006+ { 29818, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */
5007+ { 29838, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */
5008+ { 29865, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */
5009+ { 29891, 0x00000D57 }, /* GL_STENCIL_BITS */
5010+ { 29907, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */
5011+ { 29929, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */
5012+ { 29952, 0x00000B94 }, /* GL_STENCIL_FAIL */
5013+ { 29968, 0x00000B92 }, /* GL_STENCIL_FUNC */
5014+ { 29984, 0x00001901 }, /* GL_STENCIL_INDEX */
5015+ { 30001, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */
5016+ { 30024, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */
5017+ { 30046, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */
5018+ { 30068, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */
5019+ { 30090, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */
5020+ { 30111, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */
5021+ { 30138, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */
5022+ { 30165, 0x00000B97 }, /* GL_STENCIL_REF */
5023+ { 30180, 0x00000B90 }, /* GL_STENCIL_TEST */
5024+ { 30196, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
5025+ { 30225, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */
5026+ { 30247, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */
5027+ { 30268, 0x00000C33 }, /* GL_STEREO */
5028+ { 30278, 0x000088E2 }, /* GL_STREAM_COPY */
5029+ { 30293, 0x000088E2 }, /* GL_STREAM_COPY_ARB */
5030+ { 30312, 0x000088E0 }, /* GL_STREAM_DRAW */
5031+ { 30327, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */
5032+ { 30346, 0x000088E1 }, /* GL_STREAM_READ */
5033+ { 30361, 0x000088E1 }, /* GL_STREAM_READ_ARB */
5034+ { 30380, 0x00000D50 }, /* GL_SUBPIXEL_BITS */
5035+ { 30397, 0x000084E7 }, /* GL_SUBTRACT */
5036+ { 30409, 0x000084E7 }, /* GL_SUBTRACT_ARB */
5037+ { 30425, 0x00002001 }, /* GL_T */
5038+ { 30430, 0x00002A2A }, /* GL_T2F_C3F_V3F */
5039+ { 30445, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */
5040+ { 30464, 0x00002A29 }, /* GL_T2F_C4UB_V3F */
5041+ { 30480, 0x00002A2B }, /* GL_T2F_N3F_V3F */
5042+ { 30495, 0x00002A27 }, /* GL_T2F_V3F */
5043+ { 30506, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */
5044+ { 30525, 0x00002A28 }, /* GL_T4F_V4F */
5045+ { 30536, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */
5046+ { 30559, 0x00001702 }, /* GL_TEXTURE */
5047+ { 30570, 0x000084C0 }, /* GL_TEXTURE0 */
5048+ { 30582, 0x000084C0 }, /* GL_TEXTURE0_ARB */
5049+ { 30598, 0x000084C1 }, /* GL_TEXTURE1 */
5050+ { 30610, 0x000084CA }, /* GL_TEXTURE10 */
5051+ { 30623, 0x000084CA }, /* GL_TEXTURE10_ARB */
5052+ { 30640, 0x000084CB }, /* GL_TEXTURE11 */
5053+ { 30653, 0x000084CB }, /* GL_TEXTURE11_ARB */
5054+ { 30670, 0x000084CC }, /* GL_TEXTURE12 */
5055+ { 30683, 0x000084CC }, /* GL_TEXTURE12_ARB */
5056+ { 30700, 0x000084CD }, /* GL_TEXTURE13 */
5057+ { 30713, 0x000084CD }, /* GL_TEXTURE13_ARB */
5058+ { 30730, 0x000084CE }, /* GL_TEXTURE14 */
5059+ { 30743, 0x000084CE }, /* GL_TEXTURE14_ARB */
5060+ { 30760, 0x000084CF }, /* GL_TEXTURE15 */
5061+ { 30773, 0x000084CF }, /* GL_TEXTURE15_ARB */
5062+ { 30790, 0x000084D0 }, /* GL_TEXTURE16 */
5063+ { 30803, 0x000084D0 }, /* GL_TEXTURE16_ARB */
5064+ { 30820, 0x000084D1 }, /* GL_TEXTURE17 */
5065+ { 30833, 0x000084D1 }, /* GL_TEXTURE17_ARB */
5066+ { 30850, 0x000084D2 }, /* GL_TEXTURE18 */
5067+ { 30863, 0x000084D2 }, /* GL_TEXTURE18_ARB */
5068+ { 30880, 0x000084D3 }, /* GL_TEXTURE19 */
5069+ { 30893, 0x000084D3 }, /* GL_TEXTURE19_ARB */
5070+ { 30910, 0x000084C1 }, /* GL_TEXTURE1_ARB */
5071+ { 30926, 0x000084C2 }, /* GL_TEXTURE2 */
5072+ { 30938, 0x000084D4 }, /* GL_TEXTURE20 */
5073+ { 30951, 0x000084D4 }, /* GL_TEXTURE20_ARB */
5074+ { 30968, 0x000084D5 }, /* GL_TEXTURE21 */
5075+ { 30981, 0x000084D5 }, /* GL_TEXTURE21_ARB */
5076+ { 30998, 0x000084D6 }, /* GL_TEXTURE22 */
5077+ { 31011, 0x000084D6 }, /* GL_TEXTURE22_ARB */
5078+ { 31028, 0x000084D7 }, /* GL_TEXTURE23 */
5079+ { 31041, 0x000084D7 }, /* GL_TEXTURE23_ARB */
5080+ { 31058, 0x000084D8 }, /* GL_TEXTURE24 */
5081+ { 31071, 0x000084D8 }, /* GL_TEXTURE24_ARB */
5082+ { 31088, 0x000084D9 }, /* GL_TEXTURE25 */
5083+ { 31101, 0x000084D9 }, /* GL_TEXTURE25_ARB */
5084+ { 31118, 0x000084DA }, /* GL_TEXTURE26 */
5085+ { 31131, 0x000084DA }, /* GL_TEXTURE26_ARB */
5086+ { 31148, 0x000084DB }, /* GL_TEXTURE27 */
5087+ { 31161, 0x000084DB }, /* GL_TEXTURE27_ARB */
5088+ { 31178, 0x000084DC }, /* GL_TEXTURE28 */
5089+ { 31191, 0x000084DC }, /* GL_TEXTURE28_ARB */
5090+ { 31208, 0x000084DD }, /* GL_TEXTURE29 */
5091+ { 31221, 0x000084DD }, /* GL_TEXTURE29_ARB */
5092+ { 31238, 0x000084C2 }, /* GL_TEXTURE2_ARB */
5093+ { 31254, 0x000084C3 }, /* GL_TEXTURE3 */
5094+ { 31266, 0x000084DE }, /* GL_TEXTURE30 */
5095+ { 31279, 0x000084DE }, /* GL_TEXTURE30_ARB */
5096+ { 31296, 0x000084DF }, /* GL_TEXTURE31 */
5097+ { 31309, 0x000084DF }, /* GL_TEXTURE31_ARB */
5098+ { 31326, 0x000084C3 }, /* GL_TEXTURE3_ARB */
5099+ { 31342, 0x000084C4 }, /* GL_TEXTURE4 */
5100+ { 31354, 0x000084C4 }, /* GL_TEXTURE4_ARB */
5101+ { 31370, 0x000084C5 }, /* GL_TEXTURE5 */
5102+ { 31382, 0x000084C5 }, /* GL_TEXTURE5_ARB */
5103+ { 31398, 0x000084C6 }, /* GL_TEXTURE6 */
5104+ { 31410, 0x000084C6 }, /* GL_TEXTURE6_ARB */
5105+ { 31426, 0x000084C7 }, /* GL_TEXTURE7 */
5106+ { 31438, 0x000084C7 }, /* GL_TEXTURE7_ARB */
5107+ { 31454, 0x000084C8 }, /* GL_TEXTURE8 */
5108+ { 31466, 0x000084C8 }, /* GL_TEXTURE8_ARB */
5109+ { 31482, 0x000084C9 }, /* GL_TEXTURE9 */
5110+ { 31494, 0x000084C9 }, /* GL_TEXTURE9_ARB */
5111+ { 31510, 0x00000DE0 }, /* GL_TEXTURE_1D */
5112+ { 31524, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */
5113+ { 31548, 0x00000DE1 }, /* GL_TEXTURE_2D */
5114+ { 31562, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */
5115+ { 31586, 0x0000806F }, /* GL_TEXTURE_3D */
5116+ { 31600, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */
5117+ { 31622, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */
5118+ { 31648, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */
5119+ { 31670, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */
5120+ { 31692, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
5121+ { 31724, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */
5122+ { 31746, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
5123+ { 31778, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */
5124+ { 31800, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */
5125+ { 31828, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */
5126+ { 31860, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
5127+ { 31893, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */
5128+ { 31925, 0x00040000 }, /* GL_TEXTURE_BIT */
5129+ { 31940, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */
5130+ { 31961, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */
5131+ { 31986, 0x00001005 }, /* GL_TEXTURE_BORDER */
5132+ { 32004, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */
5133+ { 32028, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
5134+ { 32059, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
5135+ { 32089, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
5136+ { 32119, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
5137+ { 32154, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
5138+ { 32185, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
5139+ { 32223, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */
5140+ { 32250, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
5141+ { 32282, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
5142+ { 32316, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */
5143+ { 32340, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */
5144+ { 32368, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */
5145+ { 32392, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */
5146+ { 32420, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
5147+ { 32453, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */
5148+ { 32477, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */
5149+ { 32499, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */
5150+ { 32521, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */
5151+ { 32547, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */
5152+ { 32581, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
5153+ { 32614, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */
5154+ { 32651, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */
5155+ { 32679, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */
5156+ { 32711, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */
5157+ { 32734, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
5158+ { 32772, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */
5159+ { 32814, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */
5160+ { 32845, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */
5161+ { 32873, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
5162+ { 32903, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */
5163+ { 32931, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */
5164+ { 32951, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */
5165+ { 32975, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
5166+ { 33006, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */
5167+ { 33041, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
5168+ { 33072, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */
5169+ { 33107, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
5170+ { 33138, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */
5171+ { 33173, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
5172+ { 33204, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */
5173+ { 33239, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
5174+ { 33270, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */
5175+ { 33305, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
5176+ { 33336, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */
5177+ { 33371, 0x00008071 }, /* GL_TEXTURE_DEPTH */
5178+ { 33388, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */
5179+ { 33410, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */
5180+ { 33436, 0x00002300 }, /* GL_TEXTURE_ENV */
5181+ { 33451, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */
5182+ { 33472, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */
5183+ { 33492, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */
5184+ { 33518, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */
5185+ { 33538, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */
5186+ { 33555, 0x00000C62 }, /* GL_TEXTURE_GEN_R */
5187+ { 33572, 0x00000C60 }, /* GL_TEXTURE_GEN_S */
5188+ { 33589, 0x00000C61 }, /* GL_TEXTURE_GEN_T */
5189+ { 33606, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */
5190+ { 33631, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */
5191+ { 33653, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */
5192+ { 33679, 0x00001001 }, /* GL_TEXTURE_HEIGHT */
5193+ { 33697, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */
5194+ { 33723, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */
5195+ { 33749, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */
5196+ { 33779, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */
5197+ { 33806, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */
5198+ { 33831, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */
5199+ { 33851, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */
5200+ { 33875, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
5201+ { 33902, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
5202+ { 33929, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
5203+ { 33956, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */
5204+ { 33982, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */
5205+ { 34012, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */
5206+ { 34034, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */
5207+ { 34052, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
5208+ { 34082, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
5209+ { 34110, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
5210+ { 34138, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
5211+ { 34166, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */
5212+ { 34187, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */
5213+ { 34206, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */
5214+ { 34228, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */
5215+ { 34247, 0x00008066 }, /* GL_TEXTURE_PRIORITY */
5216+ { 34267, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */
5217+ { 34292, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */
5218+ { 34316, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */
5219+ { 34336, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */
5220+ { 34360, 0x00008067 }, /* GL_TEXTURE_RESIDENT */
5221+ { 34380, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */
5222+ { 34403, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */
5223+ { 34428, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
5224+ { 34462, 0x00001000 }, /* GL_TEXTURE_WIDTH */
5225+ { 34479, 0x00008072 }, /* GL_TEXTURE_WRAP_R */
5226+ { 34497, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
5227+ { 34515, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
5228+ { 34533, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
5229+ { 34553, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
5230+ { 34572, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
5231+ { 34601, 0x00001000 }, /* GL_TRANSFORM_BIT */
5232+ { 34618, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
5233+ { 34644, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
5234+ { 34674, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
5235+ { 34706, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
5236+ { 34736, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
5237+ { 34770, 0x0000862C }, /* GL_TRANSPOSE_NV */
5238+ { 34786, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
5239+ { 34817, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
5240+ { 34852, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
5241+ { 34880, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
5242+ { 34912, 0x00000004 }, /* GL_TRIANGLES */
5243+ { 34925, 0x00000006 }, /* GL_TRIANGLE_FAN */
5244+ { 34941, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
5245+ { 34962, 0x00000005 }, /* GL_TRIANGLE_STRIP */
5246+ { 34980, 0x00000001 }, /* GL_TRUE */
5247+ { 34988, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
5248+ { 35008, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
5249+ { 35031, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
5250+ { 35051, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
5251+ { 35072, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
5252+ { 35094, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
5253+ { 35116, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
5254+ { 35136, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
5255+ { 35157, 0x00001401 }, /* GL_UNSIGNED_BYTE */
5256+ { 35174, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
5257+ { 35201, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
5258+ { 35224, 0x00001405 }, /* GL_UNSIGNED_INT */
5259+ { 35240, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
5260+ { 35267, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
5261+ { 35291, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
5262+ { 35322, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
5263+ { 35346, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
5264+ { 35374, 0x00001403 }, /* GL_UNSIGNED_SHORT */
5265+ { 35392, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
5266+ { 35422, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
5267+ { 35448, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
5268+ { 35478, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
5269+ { 35504, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
5270+ { 35528, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
5271+ { 35556, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
5272+ { 35584, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
5273+ { 35611, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
5274+ { 35643, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
5275+ { 35674, 0x00008CA2 }, /* GL_UPPER_LEFT */
5276+ { 35688, 0x00002A20 }, /* GL_V2F */
5277+ { 35695, 0x00002A21 }, /* GL_V3F */
5278+ { 35702, 0x00008B83 }, /* GL_VALIDATE_STATUS */
5279+ { 35721, 0x00001F00 }, /* GL_VENDOR */
5280+ { 35731, 0x00001F02 }, /* GL_VERSION */
5281+ { 35742, 0x00008074 }, /* GL_VERTEX_ARRAY */
5282+ { 35758, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
5283+ { 35788, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
5284+ { 35819, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
5285+ { 35854, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
5286+ { 35878, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
5287+ { 35899, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
5288+ { 35922, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
5289+ { 35943, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
5290+ { 35970, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
5291+ { 35998, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
5292+ { 36026, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
5293+ { 36054, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
5294+ { 36082, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
5295+ { 36110, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
5296+ { 36138, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
5297+ { 36165, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
5298+ { 36192, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
5299+ { 36219, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
5300+ { 36246, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
5301+ { 36273, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
5302+ { 36300, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
5303+ { 36327, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
5304+ { 36354, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
5305+ { 36381, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
5306+ { 36419, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
5307+ { 36461, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
5308+ { 36492, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
5309+ { 36527, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
5310+ { 36561, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
5311+ { 36599, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
5312+ { 36630, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
5313+ { 36665, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
5314+ { 36693, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
5315+ { 36725, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
5316+ { 36755, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
5317+ { 36789, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
5318+ { 36817, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
5319+ { 36849, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
5320+ { 36869, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
5321+ { 36891, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
5322+ { 36920, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
5323+ { 36941, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
5324+ { 36970, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
5325+ { 37003, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
5326+ { 37035, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
5327+ { 37062, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
5328+ { 37093, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
5329+ { 37123, 0x00008B31 }, /* GL_VERTEX_SHADER */
5330+ { 37140, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
5331+ { 37161, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
5332+ { 37188, 0x00000BA2 }, /* GL_VIEWPORT */
5333+ { 37200, 0x00000800 }, /* GL_VIEWPORT_BIT */
5334+ { 37216, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
5335+ { 37236, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
5336+ { 37267, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
5337+ { 37302, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
5338+ { 37330, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
5339+ { 37355, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
5340+ { 37382, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
5341+ { 37407, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
5342+ { 37431, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
5343+ { 37450, 0x000088B9 }, /* GL_WRITE_ONLY */
5344+ { 37464, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
5345+ { 37482, 0x00001506 }, /* GL_XOR */
5346+ { 37489, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
5347+ { 37508, 0x00008757 }, /* GL_YCBCR_MESA */
5348+ { 37522, 0x00000000 }, /* GL_ZERO */
5349+ { 37530, 0x00000D16 }, /* GL_ZOOM_X */
5350+ { 37540, 0x00000D17 }, /* GL_ZOOM_Y */
5351+};
5352+
5353+static const unsigned reduced_enums[1284] =
5354+{
5355+ 436, /* GL_FALSE */
5356+ 645, /* GL_LINES */
5357+ 647, /* GL_LINE_LOOP */
5358+ 654, /* GL_LINE_STRIP */
5359+ 1637, /* GL_TRIANGLES */
5360+ 1640, /* GL_TRIANGLE_STRIP */
5361+ 1638, /* GL_TRIANGLE_FAN */
5362+ 1211, /* GL_QUADS */
5363+ 1213, /* GL_QUAD_STRIP */
5364+ 1099, /* GL_POLYGON */
5365+ 1111, /* GL_POLYGON_STIPPLE_BIT */
5366+ 1064, /* GL_PIXEL_MODE_BIT */
5367+ 632, /* GL_LIGHTING_BIT */
5368+ 458, /* GL_FOG_BIT */
5369+ 8, /* GL_ACCUM */
5370+ 664, /* GL_LOAD */
5371+ 1253, /* GL_RETURN */
5372+ 937, /* GL_MULT */
5373+ 23, /* GL_ADD */
5374+ 953, /* GL_NEVER */
5375+ 622, /* GL_LESS */
5376+ 426, /* GL_EQUAL */
5377+ 621, /* GL_LEQUAL */
5378+ 547, /* GL_GREATER */
5379+ 968, /* GL_NOTEQUAL */
5380+ 522, /* GL_GEQUAL */
5381+ 46, /* GL_ALWAYS */
5382+ 1386, /* GL_SRC_COLOR */
5383+ 997, /* GL_ONE_MINUS_SRC_COLOR */
5384+ 1384, /* GL_SRC_ALPHA */
5385+ 996, /* GL_ONE_MINUS_SRC_ALPHA */
5386+ 406, /* GL_DST_ALPHA */
5387+ 994, /* GL_ONE_MINUS_DST_ALPHA */
5388+ 407, /* GL_DST_COLOR */
5389+ 995, /* GL_ONE_MINUS_DST_COLOR */
5390+ 1385, /* GL_SRC_ALPHA_SATURATE */
5391+ 510, /* GL_FRONT_LEFT */
5392+ 511, /* GL_FRONT_RIGHT */
5393+ 69, /* GL_BACK_LEFT */
5394+ 70, /* GL_BACK_RIGHT */
5395+ 507, /* GL_FRONT */
5396+ 68, /* GL_BACK */
5397+ 620, /* GL_LEFT */
5398+ 1293, /* GL_RIGHT */
5399+ 508, /* GL_FRONT_AND_BACK */
5400+ 63, /* GL_AUX0 */
5401+ 64, /* GL_AUX1 */
5402+ 65, /* GL_AUX2 */
5403+ 66, /* GL_AUX3 */
5404+ 612, /* GL_INVALID_ENUM */
5405+ 615, /* GL_INVALID_VALUE */
5406+ 614, /* GL_INVALID_OPERATION */
5407+ 1387, /* GL_STACK_OVERFLOW */
5408+ 1388, /* GL_STACK_UNDERFLOW */
5409+ 1022, /* GL_OUT_OF_MEMORY */
5410+ 613, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
5411+ 0, /* GL_2D */
5412+ 2, /* GL_3D */
5413+ 3, /* GL_3D_COLOR */
5414+ 4, /* GL_3D_COLOR_TEXTURE */
5415+ 6, /* GL_4D_COLOR_TEXTURE */
5416+ 1042, /* GL_PASS_THROUGH_TOKEN */
5417+ 1098, /* GL_POINT_TOKEN */
5418+ 655, /* GL_LINE_TOKEN */
5419+ 1112, /* GL_POLYGON_TOKEN */
5420+ 74, /* GL_BITMAP_TOKEN */
5421+ 405, /* GL_DRAW_PIXEL_TOKEN */
5422+ 271, /* GL_COPY_PIXEL_TOKEN */
5423+ 648, /* GL_LINE_RESET_TOKEN */
5424+ 429, /* GL_EXP */
5425+ 430, /* GL_EXP2 */
5426+ 304, /* GL_CW */
5427+ 116, /* GL_CCW */
5428+ 137, /* GL_COEFF */
5429+ 1019, /* GL_ORDER */
5430+ 344, /* GL_DOMAIN */
5431+ 279, /* GL_CURRENT_COLOR */
5432+ 282, /* GL_CURRENT_INDEX */
5433+ 288, /* GL_CURRENT_NORMAL */
5434+ 300, /* GL_CURRENT_TEXTURE_COORDS */
5435+ 293, /* GL_CURRENT_RASTER_COLOR */
5436+ 295, /* GL_CURRENT_RASTER_INDEX */
5437+ 298, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
5438+ 296, /* GL_CURRENT_RASTER_POSITION */
5439+ 297, /* GL_CURRENT_RASTER_POSITION_VALID */
5440+ 294, /* GL_CURRENT_RASTER_DISTANCE */
5441+ 1091, /* GL_POINT_SMOOTH */
5442+ 1080, /* GL_POINT_SIZE */
5443+ 1090, /* GL_POINT_SIZE_RANGE */
5444+ 1081, /* GL_POINT_SIZE_GRANULARITY */
5445+ 649, /* GL_LINE_SMOOTH */
5446+ 656, /* GL_LINE_WIDTH */
5447+ 658, /* GL_LINE_WIDTH_RANGE */
5448+ 657, /* GL_LINE_WIDTH_GRANULARITY */
5449+ 651, /* GL_LINE_STIPPLE */
5450+ 652, /* GL_LINE_STIPPLE_PATTERN */
5451+ 653, /* GL_LINE_STIPPLE_REPEAT */
5452+ 663, /* GL_LIST_MODE */
5453+ 822, /* GL_MAX_LIST_NESTING */
5454+ 660, /* GL_LIST_BASE */
5455+ 662, /* GL_LIST_INDEX */
5456+ 1101, /* GL_POLYGON_MODE */
5457+ 1108, /* GL_POLYGON_SMOOTH */
5458+ 1110, /* GL_POLYGON_STIPPLE */
5459+ 414, /* GL_EDGE_FLAG */
5460+ 272, /* GL_CULL_FACE */
5461+ 273, /* GL_CULL_FACE_MODE */
5462+ 509, /* GL_FRONT_FACE */
5463+ 631, /* GL_LIGHTING */
5464+ 636, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
5465+ 637, /* GL_LIGHT_MODEL_TWO_SIDE */
5466+ 633, /* GL_LIGHT_MODEL_AMBIENT */
5467+ 1339, /* GL_SHADE_MODEL */
5468+ 168, /* GL_COLOR_MATERIAL_FACE */
5469+ 169, /* GL_COLOR_MATERIAL_PARAMETER */
5470+ 167, /* GL_COLOR_MATERIAL */
5471+ 457, /* GL_FOG */
5472+ 479, /* GL_FOG_INDEX */
5473+ 475, /* GL_FOG_DENSITY */
5474+ 483, /* GL_FOG_START */
5475+ 477, /* GL_FOG_END */
5476+ 480, /* GL_FOG_MODE */
5477+ 459, /* GL_FOG_COLOR */
5478+ 333, /* GL_DEPTH_RANGE */
5479+ 338, /* GL_DEPTH_TEST */
5480+ 341, /* GL_DEPTH_WRITEMASK */
5481+ 321, /* GL_DEPTH_CLEAR_VALUE */
5482+ 332, /* GL_DEPTH_FUNC */
5483+ 12, /* GL_ACCUM_CLEAR_VALUE */
5484+ 1418, /* GL_STENCIL_TEST */
5485+ 1406, /* GL_STENCIL_CLEAR_VALUE */
5486+ 1408, /* GL_STENCIL_FUNC */
5487+ 1420, /* GL_STENCIL_VALUE_MASK */
5488+ 1407, /* GL_STENCIL_FAIL */
5489+ 1415, /* GL_STENCIL_PASS_DEPTH_FAIL */
5490+ 1416, /* GL_STENCIL_PASS_DEPTH_PASS */
5491+ 1417, /* GL_STENCIL_REF */
5492+ 1421, /* GL_STENCIL_WRITEMASK */
5493+ 791, /* GL_MATRIX_MODE */
5494+ 958, /* GL_NORMALIZE */
5495+ 1727, /* GL_VIEWPORT */
5496+ 932, /* GL_MODELVIEW_STACK_DEPTH */
5497+ 1191, /* GL_PROJECTION_STACK_DEPTH */
5498+ 1616, /* GL_TEXTURE_STACK_DEPTH */
5499+ 930, /* GL_MODELVIEW_MATRIX */
5500+ 1190, /* GL_PROJECTION_MATRIX */
5501+ 1601, /* GL_TEXTURE_MATRIX */
5502+ 61, /* GL_ATTRIB_STACK_DEPTH */
5503+ 127, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
5504+ 43, /* GL_ALPHA_TEST */
5505+ 44, /* GL_ALPHA_TEST_FUNC */
5506+ 45, /* GL_ALPHA_TEST_REF */
5507+ 343, /* GL_DITHER */
5508+ 78, /* GL_BLEND_DST */
5509+ 86, /* GL_BLEND_SRC */
5510+ 75, /* GL_BLEND */
5511+ 666, /* GL_LOGIC_OP_MODE */
5512+ 586, /* GL_INDEX_LOGIC_OP */
5513+ 166, /* GL_COLOR_LOGIC_OP */
5514+ 67, /* GL_AUX_BUFFERS */
5515+ 354, /* GL_DRAW_BUFFER */
5516+ 1223, /* GL_READ_BUFFER */
5517+ 1320, /* GL_SCISSOR_BOX */
5518+ 1321, /* GL_SCISSOR_TEST */
5519+ 585, /* GL_INDEX_CLEAR_VALUE */
5520+ 590, /* GL_INDEX_WRITEMASK */
5521+ 163, /* GL_COLOR_CLEAR_VALUE */
5522+ 205, /* GL_COLOR_WRITEMASK */
5523+ 587, /* GL_INDEX_MODE */
5524+ 1287, /* GL_RGBA_MODE */
5525+ 353, /* GL_DOUBLEBUFFER */
5526+ 1422, /* GL_STEREO */
5527+ 1246, /* GL_RENDER_MODE */
5528+ 1043, /* GL_PERSPECTIVE_CORRECTION_HINT */
5529+ 1092, /* GL_POINT_SMOOTH_HINT */
5530+ 650, /* GL_LINE_SMOOTH_HINT */
5531+ 1109, /* GL_POLYGON_SMOOTH_HINT */
5532+ 478, /* GL_FOG_HINT */
5533+ 1582, /* GL_TEXTURE_GEN_S */
5534+ 1583, /* GL_TEXTURE_GEN_T */
5535+ 1581, /* GL_TEXTURE_GEN_R */
5536+ 1580, /* GL_TEXTURE_GEN_Q */
5537+ 1056, /* GL_PIXEL_MAP_I_TO_I */
5538+ 1062, /* GL_PIXEL_MAP_S_TO_S */
5539+ 1058, /* GL_PIXEL_MAP_I_TO_R */
5540+ 1054, /* GL_PIXEL_MAP_I_TO_G */
5541+ 1052, /* GL_PIXEL_MAP_I_TO_B */
5542+ 1050, /* GL_PIXEL_MAP_I_TO_A */
5543+ 1060, /* GL_PIXEL_MAP_R_TO_R */
5544+ 1048, /* GL_PIXEL_MAP_G_TO_G */
5545+ 1046, /* GL_PIXEL_MAP_B_TO_B */
5546+ 1044, /* GL_PIXEL_MAP_A_TO_A */
5547+ 1057, /* GL_PIXEL_MAP_I_TO_I_SIZE */
5548+ 1063, /* GL_PIXEL_MAP_S_TO_S_SIZE */
5549+ 1059, /* GL_PIXEL_MAP_I_TO_R_SIZE */
5550+ 1055, /* GL_PIXEL_MAP_I_TO_G_SIZE */
5551+ 1053, /* GL_PIXEL_MAP_I_TO_B_SIZE */
5552+ 1051, /* GL_PIXEL_MAP_I_TO_A_SIZE */
5553+ 1061, /* GL_PIXEL_MAP_R_TO_R_SIZE */
5554+ 1049, /* GL_PIXEL_MAP_G_TO_G_SIZE */
5555+ 1047, /* GL_PIXEL_MAP_B_TO_B_SIZE */
5556+ 1045, /* GL_PIXEL_MAP_A_TO_A_SIZE */
5557+ 1649, /* GL_UNPACK_SWAP_BYTES */
5558+ 1644, /* GL_UNPACK_LSB_FIRST */
5559+ 1645, /* GL_UNPACK_ROW_LENGTH */
5560+ 1648, /* GL_UNPACK_SKIP_ROWS */
5561+ 1647, /* GL_UNPACK_SKIP_PIXELS */
5562+ 1642, /* GL_UNPACK_ALIGNMENT */
5563+ 1031, /* GL_PACK_SWAP_BYTES */
5564+ 1026, /* GL_PACK_LSB_FIRST */
5565+ 1027, /* GL_PACK_ROW_LENGTH */
5566+ 1030, /* GL_PACK_SKIP_ROWS */
5567+ 1029, /* GL_PACK_SKIP_PIXELS */
5568+ 1023, /* GL_PACK_ALIGNMENT */
5569+ 744, /* GL_MAP_COLOR */
5570+ 745, /* GL_MAP_STENCIL */
5571+ 589, /* GL_INDEX_SHIFT */
5572+ 588, /* GL_INDEX_OFFSET */
5573+ 1235, /* GL_RED_SCALE */
5574+ 1233, /* GL_RED_BIAS */
5575+ 1744, /* GL_ZOOM_X */
5576+ 1745, /* GL_ZOOM_Y */
5577+ 551, /* GL_GREEN_SCALE */
5578+ 549, /* GL_GREEN_BIAS */
5579+ 92, /* GL_BLUE_SCALE */
5580+ 90, /* GL_BLUE_BIAS */
5581+ 42, /* GL_ALPHA_SCALE */
5582+ 40, /* GL_ALPHA_BIAS */
5583+ 334, /* GL_DEPTH_SCALE */
5584+ 315, /* GL_DEPTH_BIAS */
5585+ 817, /* GL_MAX_EVAL_ORDER */
5586+ 821, /* GL_MAX_LIGHTS */
5587+ 800, /* GL_MAX_CLIP_PLANES */
5588+ 865, /* GL_MAX_TEXTURE_SIZE */
5589+ 827, /* GL_MAX_PIXEL_MAP_TABLE */
5590+ 796, /* GL_MAX_ATTRIB_STACK_DEPTH */
5591+ 824, /* GL_MAX_MODELVIEW_STACK_DEPTH */
5592+ 825, /* GL_MAX_NAME_STACK_DEPTH */
5593+ 853, /* GL_MAX_PROJECTION_STACK_DEPTH */
5594+ 866, /* GL_MAX_TEXTURE_STACK_DEPTH */
5595+ 880, /* GL_MAX_VIEWPORT_DIMS */
5596+ 797, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
5597+ 1429, /* GL_SUBPIXEL_BITS */
5598+ 584, /* GL_INDEX_BITS */
5599+ 1234, /* GL_RED_BITS */
5600+ 550, /* GL_GREEN_BITS */
5601+ 91, /* GL_BLUE_BITS */
5602+ 41, /* GL_ALPHA_BITS */
5603+ 316, /* GL_DEPTH_BITS */
5604+ 1404, /* GL_STENCIL_BITS */
5605+ 14, /* GL_ACCUM_RED_BITS */
5606+ 13, /* GL_ACCUM_GREEN_BITS */
5607+ 10, /* GL_ACCUM_BLUE_BITS */
5608+ 9, /* GL_ACCUM_ALPHA_BITS */
5609+ 946, /* GL_NAME_STACK_DEPTH */
5610+ 62, /* GL_AUTO_NORMAL */
5611+ 690, /* GL_MAP1_COLOR_4 */
5612+ 693, /* GL_MAP1_INDEX */
5613+ 694, /* GL_MAP1_NORMAL */
5614+ 695, /* GL_MAP1_TEXTURE_COORD_1 */
5615+ 696, /* GL_MAP1_TEXTURE_COORD_2 */
5616+ 697, /* GL_MAP1_TEXTURE_COORD_3 */
5617+ 698, /* GL_MAP1_TEXTURE_COORD_4 */
5618+ 699, /* GL_MAP1_VERTEX_3 */
5619+ 700, /* GL_MAP1_VERTEX_4 */
5620+ 717, /* GL_MAP2_COLOR_4 */
5621+ 720, /* GL_MAP2_INDEX */
5622+ 721, /* GL_MAP2_NORMAL */
5623+ 722, /* GL_MAP2_TEXTURE_COORD_1 */
5624+ 723, /* GL_MAP2_TEXTURE_COORD_2 */
5625+ 724, /* GL_MAP2_TEXTURE_COORD_3 */
5626+ 725, /* GL_MAP2_TEXTURE_COORD_4 */
5627+ 726, /* GL_MAP2_VERTEX_3 */
5628+ 727, /* GL_MAP2_VERTEX_4 */
5629+ 691, /* GL_MAP1_GRID_DOMAIN */
5630+ 692, /* GL_MAP1_GRID_SEGMENTS */
5631+ 718, /* GL_MAP2_GRID_DOMAIN */
5632+ 719, /* GL_MAP2_GRID_SEGMENTS */
5633+ 1506, /* GL_TEXTURE_1D */
5634+ 1508, /* GL_TEXTURE_2D */
5635+ 439, /* GL_FEEDBACK_BUFFER_POINTER */
5636+ 440, /* GL_FEEDBACK_BUFFER_SIZE */
5637+ 441, /* GL_FEEDBACK_BUFFER_TYPE */
5638+ 1330, /* GL_SELECTION_BUFFER_POINTER */
5639+ 1331, /* GL_SELECTION_BUFFER_SIZE */
5640+ 1619, /* GL_TEXTURE_WIDTH */
5641+ 1587, /* GL_TEXTURE_HEIGHT */
5642+ 1543, /* GL_TEXTURE_COMPONENTS */
5643+ 1527, /* GL_TEXTURE_BORDER_COLOR */
5644+ 1526, /* GL_TEXTURE_BORDER */
5645+ 345, /* GL_DONT_CARE */
5646+ 437, /* GL_FASTEST */
5647+ 954, /* GL_NICEST */
5648+ 47, /* GL_AMBIENT */
5649+ 342, /* GL_DIFFUSE */
5650+ 1373, /* GL_SPECULAR */
5651+ 1113, /* GL_POSITION */
5652+ 1376, /* GL_SPOT_DIRECTION */
5653+ 1377, /* GL_SPOT_EXPONENT */
5654+ 1375, /* GL_SPOT_CUTOFF */
5655+ 245, /* GL_CONSTANT_ATTENUATION */
5656+ 640, /* GL_LINEAR_ATTENUATION */
5657+ 1210, /* GL_QUADRATIC_ATTENUATION */
5658+ 219, /* GL_COMPILE */
5659+ 220, /* GL_COMPILE_AND_EXECUTE */
5660+ 111, /* GL_BYTE */
5661+ 1650, /* GL_UNSIGNED_BYTE */
5662+ 1344, /* GL_SHORT */
5663+ 1659, /* GL_UNSIGNED_SHORT */
5664+ 592, /* GL_INT */
5665+ 1653, /* GL_UNSIGNED_INT */
5666+ 444, /* GL_FLOAT */
5667+ 1, /* GL_2_BYTES */
5668+ 5, /* GL_3_BYTES */
5669+ 7, /* GL_4_BYTES */
5670+ 352, /* GL_DOUBLE */
5671+ 123, /* GL_CLEAR */
5672+ 49, /* GL_AND */
5673+ 51, /* GL_AND_REVERSE */
5674+ 269, /* GL_COPY */
5675+ 50, /* GL_AND_INVERTED */
5676+ 956, /* GL_NOOP */
5677+ 1740, /* GL_XOR */
5678+ 1018, /* GL_OR */
5679+ 957, /* GL_NOR */
5680+ 427, /* GL_EQUIV */
5681+ 618, /* GL_INVERT */
5682+ 1021, /* GL_OR_REVERSE */
5683+ 270, /* GL_COPY_INVERTED */
5684+ 1020, /* GL_OR_INVERTED */
5685+ 947, /* GL_NAND */
5686+ 1335, /* GL_SET */
5687+ 424, /* GL_EMISSION */
5688+ 1343, /* GL_SHININESS */
5689+ 48, /* GL_AMBIENT_AND_DIFFUSE */
5690+ 165, /* GL_COLOR_INDEXES */
5691+ 897, /* GL_MODELVIEW */
5692+ 1189, /* GL_PROJECTION */
5693+ 1441, /* GL_TEXTURE */
5694+ 138, /* GL_COLOR */
5695+ 313, /* GL_DEPTH */
5696+ 1395, /* GL_STENCIL */
5697+ 164, /* GL_COLOR_INDEX */
5698+ 1409, /* GL_STENCIL_INDEX */
5699+ 322, /* GL_DEPTH_COMPONENT */
5700+ 1230, /* GL_RED */
5701+ 548, /* GL_GREEN */
5702+ 89, /* GL_BLUE */
5703+ 31, /* GL_ALPHA */
5704+ 1254, /* GL_RGB */
5705+ 1273, /* GL_RGBA */
5706+ 668, /* GL_LUMINANCE */
5707+ 689, /* GL_LUMINANCE_ALPHA */
5708+ 73, /* GL_BITMAP */
5709+ 1069, /* GL_POINT */
5710+ 638, /* GL_LINE */
5711+ 442, /* GL_FILL */
5712+ 1239, /* GL_RENDER */
5713+ 438, /* GL_FEEDBACK */
5714+ 1329, /* GL_SELECT */
5715+ 443, /* GL_FLAT */
5716+ 1348, /* GL_SMOOTH */
5717+ 619, /* GL_KEEP */
5718+ 1248, /* GL_REPLACE */
5719+ 575, /* GL_INCR */
5720+ 309, /* GL_DECR */
5721+ 1674, /* GL_VENDOR */
5722+ 1245, /* GL_RENDERER */
5723+ 1675, /* GL_VERSION */
5724+ 431, /* GL_EXTENSIONS */
5725+ 1294, /* GL_S */
5726+ 1432, /* GL_T */
5727+ 1220, /* GL_R */
5728+ 1209, /* GL_Q */
5729+ 933, /* GL_MODULATE */
5730+ 308, /* GL_DECAL */
5731+ 1577, /* GL_TEXTURE_ENV_MODE */
5732+ 1576, /* GL_TEXTURE_ENV_COLOR */
5733+ 1575, /* GL_TEXTURE_ENV */
5734+ 432, /* GL_EYE_LINEAR */
5735+ 980, /* GL_OBJECT_LINEAR */
5736+ 1374, /* GL_SPHERE_MAP */
5737+ 1579, /* GL_TEXTURE_GEN_MODE */
5738+ 982, /* GL_OBJECT_PLANE */
5739+ 433, /* GL_EYE_PLANE */
5740+ 948, /* GL_NEAREST */
5741+ 639, /* GL_LINEAR */
5742+ 952, /* GL_NEAREST_MIPMAP_NEAREST */
5743+ 644, /* GL_LINEAR_MIPMAP_NEAREST */
5744+ 951, /* GL_NEAREST_MIPMAP_LINEAR */
5745+ 643, /* GL_LINEAR_MIPMAP_LINEAR */
5746+ 1600, /* GL_TEXTURE_MAG_FILTER */
5747+ 1608, /* GL_TEXTURE_MIN_FILTER */
5748+ 1621, /* GL_TEXTURE_WRAP_S */
5749+ 1622, /* GL_TEXTURE_WRAP_T */
5750+ 117, /* GL_CLAMP */
5751+ 1247, /* GL_REPEAT */
5752+ 1107, /* GL_POLYGON_OFFSET_UNITS */
5753+ 1106, /* GL_POLYGON_OFFSET_POINT */
5754+ 1105, /* GL_POLYGON_OFFSET_LINE */
5755+ 1221, /* GL_R3_G3_B2 */
5756+ 1671, /* GL_V2F */
5757+ 1672, /* GL_V3F */
5758+ 114, /* GL_C4UB_V2F */
5759+ 115, /* GL_C4UB_V3F */
5760+ 112, /* GL_C3F_V3F */
5761+ 945, /* GL_N3F_V3F */
5762+ 113, /* GL_C4F_N3F_V3F */
5763+ 1437, /* GL_T2F_V3F */
5764+ 1439, /* GL_T4F_V4F */
5765+ 1435, /* GL_T2F_C4UB_V3F */
5766+ 1433, /* GL_T2F_C3F_V3F */
5767+ 1436, /* GL_T2F_N3F_V3F */
5768+ 1434, /* GL_T2F_C4F_N3F_V3F */
5769+ 1438, /* GL_T4F_C4F_N3F_V4F */
5770+ 130, /* GL_CLIP_PLANE0 */
5771+ 131, /* GL_CLIP_PLANE1 */
5772+ 132, /* GL_CLIP_PLANE2 */
5773+ 133, /* GL_CLIP_PLANE3 */
5774+ 134, /* GL_CLIP_PLANE4 */
5775+ 135, /* GL_CLIP_PLANE5 */
5776+ 623, /* GL_LIGHT0 */
5777+ 624, /* GL_LIGHT1 */
5778+ 625, /* GL_LIGHT2 */
5779+ 626, /* GL_LIGHT3 */
5780+ 627, /* GL_LIGHT4 */
5781+ 628, /* GL_LIGHT5 */
5782+ 629, /* GL_LIGHT6 */
5783+ 630, /* GL_LIGHT7 */
5784+ 552, /* GL_HINT_BIT */
5785+ 247, /* GL_CONSTANT_COLOR */
5786+ 992, /* GL_ONE_MINUS_CONSTANT_COLOR */
5787+ 242, /* GL_CONSTANT_ALPHA */
5788+ 990, /* GL_ONE_MINUS_CONSTANT_ALPHA */
5789+ 76, /* GL_BLEND_COLOR */
5790+ 512, /* GL_FUNC_ADD */
5791+ 881, /* GL_MIN */
5792+ 793, /* GL_MAX */
5793+ 81, /* GL_BLEND_EQUATION */
5794+ 516, /* GL_FUNC_SUBTRACT */
5795+ 514, /* GL_FUNC_REVERSE_SUBTRACT */
5796+ 250, /* GL_CONVOLUTION_1D */
5797+ 251, /* GL_CONVOLUTION_2D */
5798+ 1332, /* GL_SEPARABLE_2D */
5799+ 254, /* GL_CONVOLUTION_BORDER_MODE */
5800+ 258, /* GL_CONVOLUTION_FILTER_SCALE */
5801+ 256, /* GL_CONVOLUTION_FILTER_BIAS */
5802+ 1231, /* GL_REDUCE */
5803+ 260, /* GL_CONVOLUTION_FORMAT */
5804+ 264, /* GL_CONVOLUTION_WIDTH */
5805+ 262, /* GL_CONVOLUTION_HEIGHT */
5806+ 808, /* GL_MAX_CONVOLUTION_WIDTH */
5807+ 806, /* GL_MAX_CONVOLUTION_HEIGHT */
5808+ 1146, /* GL_POST_CONVOLUTION_RED_SCALE */
5809+ 1142, /* GL_POST_CONVOLUTION_GREEN_SCALE */
5810+ 1137, /* GL_POST_CONVOLUTION_BLUE_SCALE */
5811+ 1133, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
5812+ 1144, /* GL_POST_CONVOLUTION_RED_BIAS */
5813+ 1140, /* GL_POST_CONVOLUTION_GREEN_BIAS */
5814+ 1135, /* GL_POST_CONVOLUTION_BLUE_BIAS */
5815+ 1131, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
5816+ 553, /* GL_HISTOGRAM */
5817+ 1193, /* GL_PROXY_HISTOGRAM */
5818+ 569, /* GL_HISTOGRAM_WIDTH */
5819+ 559, /* GL_HISTOGRAM_FORMAT */
5820+ 565, /* GL_HISTOGRAM_RED_SIZE */
5821+ 561, /* GL_HISTOGRAM_GREEN_SIZE */
5822+ 556, /* GL_HISTOGRAM_BLUE_SIZE */
5823+ 554, /* GL_HISTOGRAM_ALPHA_SIZE */
5824+ 563, /* GL_HISTOGRAM_LUMINANCE_SIZE */
5825+ 567, /* GL_HISTOGRAM_SINK */
5826+ 882, /* GL_MINMAX */
5827+ 884, /* GL_MINMAX_FORMAT */
5828+ 886, /* GL_MINMAX_SINK */
5829+ 1440, /* GL_TABLE_TOO_LARGE_EXT */
5830+ 1652, /* GL_UNSIGNED_BYTE_3_3_2 */
5831+ 1661, /* GL_UNSIGNED_SHORT_4_4_4_4 */
5832+ 1663, /* GL_UNSIGNED_SHORT_5_5_5_1 */
5833+ 1657, /* GL_UNSIGNED_INT_8_8_8_8 */
5834+ 1654, /* GL_UNSIGNED_INT_10_10_10_2 */
5835+ 1104, /* GL_POLYGON_OFFSET_FILL */
5836+ 1103, /* GL_POLYGON_OFFSET_FACTOR */
5837+ 1102, /* GL_POLYGON_OFFSET_BIAS */
5838+ 1251, /* GL_RESCALE_NORMAL */
5839+ 36, /* GL_ALPHA4 */
5840+ 38, /* GL_ALPHA8 */
5841+ 32, /* GL_ALPHA12 */
5842+ 34, /* GL_ALPHA16 */
5843+ 679, /* GL_LUMINANCE4 */
5844+ 685, /* GL_LUMINANCE8 */
5845+ 669, /* GL_LUMINANCE12 */
5846+ 675, /* GL_LUMINANCE16 */
5847+ 680, /* GL_LUMINANCE4_ALPHA4 */
5848+ 683, /* GL_LUMINANCE6_ALPHA2 */
5849+ 686, /* GL_LUMINANCE8_ALPHA8 */
5850+ 672, /* GL_LUMINANCE12_ALPHA4 */
5851+ 670, /* GL_LUMINANCE12_ALPHA12 */
5852+ 676, /* GL_LUMINANCE16_ALPHA16 */
5853+ 593, /* GL_INTENSITY */
5854+ 598, /* GL_INTENSITY4 */
5855+ 600, /* GL_INTENSITY8 */
5856+ 594, /* GL_INTENSITY12 */
5857+ 596, /* GL_INTENSITY16 */
5858+ 1263, /* GL_RGB2_EXT */
5859+ 1264, /* GL_RGB4 */
5860+ 1267, /* GL_RGB5 */
5861+ 1271, /* GL_RGB8 */
5862+ 1255, /* GL_RGB10 */
5863+ 1259, /* GL_RGB12 */
5864+ 1261, /* GL_RGB16 */
5865+ 1278, /* GL_RGBA2 */
5866+ 1280, /* GL_RGBA4 */
5867+ 1268, /* GL_RGB5_A1 */
5868+ 1284, /* GL_RGBA8 */
5869+ 1256, /* GL_RGB10_A2 */
5870+ 1274, /* GL_RGBA12 */
5871+ 1276, /* GL_RGBA16 */
5872+ 1613, /* GL_TEXTURE_RED_SIZE */
5873+ 1585, /* GL_TEXTURE_GREEN_SIZE */
5874+ 1524, /* GL_TEXTURE_BLUE_SIZE */
5875+ 1511, /* GL_TEXTURE_ALPHA_SIZE */
5876+ 1598, /* GL_TEXTURE_LUMINANCE_SIZE */
5877+ 1589, /* GL_TEXTURE_INTENSITY_SIZE */
5878+ 1249, /* GL_REPLACE_EXT */
5879+ 1197, /* GL_PROXY_TEXTURE_1D */
5880+ 1200, /* GL_PROXY_TEXTURE_2D */
5881+ 1617, /* GL_TEXTURE_TOO_LARGE_EXT */
5882+ 1610, /* GL_TEXTURE_PRIORITY */
5883+ 1615, /* GL_TEXTURE_RESIDENT */
5884+ 1514, /* GL_TEXTURE_BINDING_1D */
5885+ 1516, /* GL_TEXTURE_BINDING_2D */
5886+ 1518, /* GL_TEXTURE_BINDING_3D */
5887+ 1028, /* GL_PACK_SKIP_IMAGES */
5888+ 1024, /* GL_PACK_IMAGE_HEIGHT */
5889+ 1646, /* GL_UNPACK_SKIP_IMAGES */
5890+ 1643, /* GL_UNPACK_IMAGE_HEIGHT */
5891+ 1510, /* GL_TEXTURE_3D */
5892+ 1203, /* GL_PROXY_TEXTURE_3D */
5893+ 1572, /* GL_TEXTURE_DEPTH */
5894+ 1620, /* GL_TEXTURE_WRAP_R */
5895+ 794, /* GL_MAX_3D_TEXTURE_SIZE */
5896+ 1676, /* GL_VERTEX_ARRAY */
5897+ 959, /* GL_NORMAL_ARRAY */
5898+ 139, /* GL_COLOR_ARRAY */
5899+ 578, /* GL_INDEX_ARRAY */
5900+ 1551, /* GL_TEXTURE_COORD_ARRAY */
5901+ 415, /* GL_EDGE_FLAG_ARRAY */
5902+ 1681, /* GL_VERTEX_ARRAY_SIZE */
5903+ 1683, /* GL_VERTEX_ARRAY_TYPE */
5904+ 1682, /* GL_VERTEX_ARRAY_STRIDE */
5905+ 964, /* GL_NORMAL_ARRAY_TYPE */
5906+ 963, /* GL_NORMAL_ARRAY_STRIDE */
5907+ 143, /* GL_COLOR_ARRAY_SIZE */
5908+ 145, /* GL_COLOR_ARRAY_TYPE */
5909+ 144, /* GL_COLOR_ARRAY_STRIDE */
5910+ 583, /* GL_INDEX_ARRAY_TYPE */
5911+ 582, /* GL_INDEX_ARRAY_STRIDE */
5912+ 1555, /* GL_TEXTURE_COORD_ARRAY_SIZE */
5913+ 1557, /* GL_TEXTURE_COORD_ARRAY_TYPE */
5914+ 1556, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
5915+ 419, /* GL_EDGE_FLAG_ARRAY_STRIDE */
5916+ 1680, /* GL_VERTEX_ARRAY_POINTER */
5917+ 962, /* GL_NORMAL_ARRAY_POINTER */
5918+ 142, /* GL_COLOR_ARRAY_POINTER */
5919+ 581, /* GL_INDEX_ARRAY_POINTER */
5920+ 1554, /* GL_TEXTURE_COORD_ARRAY_POINTER */
5921+ 418, /* GL_EDGE_FLAG_ARRAY_POINTER */
5922+ 938, /* GL_MULTISAMPLE */
5923+ 1306, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
5924+ 1308, /* GL_SAMPLE_ALPHA_TO_ONE */
5925+ 1313, /* GL_SAMPLE_COVERAGE */
5926+ 1310, /* GL_SAMPLE_BUFFERS */
5927+ 1301, /* GL_SAMPLES */
5928+ 1317, /* GL_SAMPLE_COVERAGE_VALUE */
5929+ 1315, /* GL_SAMPLE_COVERAGE_INVERT */
5930+ 170, /* GL_COLOR_MATRIX */
5931+ 172, /* GL_COLOR_MATRIX_STACK_DEPTH */
5932+ 802, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
5933+ 1129, /* GL_POST_COLOR_MATRIX_RED_SCALE */
5934+ 1125, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
5935+ 1120, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
5936+ 1116, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
5937+ 1127, /* GL_POST_COLOR_MATRIX_RED_BIAS */
5938+ 1123, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
5939+ 1118, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
5940+ 1114, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
5941+ 1534, /* GL_TEXTURE_COLOR_TABLE_SGI */
5942+ 1204, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
5943+ 1536, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
5944+ 80, /* GL_BLEND_DST_RGB */
5945+ 88, /* GL_BLEND_SRC_RGB */
5946+ 79, /* GL_BLEND_DST_ALPHA */
5947+ 87, /* GL_BLEND_SRC_ALPHA */
5948+ 176, /* GL_COLOR_TABLE */
5949+ 1139, /* GL_POST_CONVOLUTION_COLOR_TABLE */
5950+ 1122, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
5951+ 1192, /* GL_PROXY_COLOR_TABLE */
5952+ 1196, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
5953+ 1195, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
5954+ 200, /* GL_COLOR_TABLE_SCALE */
5955+ 180, /* GL_COLOR_TABLE_BIAS */
5956+ 185, /* GL_COLOR_TABLE_FORMAT */
5957+ 202, /* GL_COLOR_TABLE_WIDTH */
5958+ 197, /* GL_COLOR_TABLE_RED_SIZE */
5959+ 188, /* GL_COLOR_TABLE_GREEN_SIZE */
5960+ 182, /* GL_COLOR_TABLE_BLUE_SIZE */
5961+ 177, /* GL_COLOR_TABLE_ALPHA_SIZE */
5962+ 194, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
5963+ 191, /* GL_COLOR_TABLE_INTENSITY_SIZE */
5964+ 71, /* GL_BGR */
5965+ 72, /* GL_BGRA */
5966+ 816, /* GL_MAX_ELEMENTS_VERTICES */
5967+ 815, /* GL_MAX_ELEMENTS_INDICES */
5968+ 1588, /* GL_TEXTURE_INDEX_SIZE_EXT */
5969+ 136, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
5970+ 1086, /* GL_POINT_SIZE_MIN */
5971+ 1082, /* GL_POINT_SIZE_MAX */
5972+ 1076, /* GL_POINT_FADE_THRESHOLD_SIZE */
5973+ 1072, /* GL_POINT_DISTANCE_ATTENUATION */
5974+ 118, /* GL_CLAMP_TO_BORDER */
5975+ 121, /* GL_CLAMP_TO_EDGE */
5976+ 1609, /* GL_TEXTURE_MIN_LOD */
5977+ 1607, /* GL_TEXTURE_MAX_LOD */
5978+ 1513, /* GL_TEXTURE_BASE_LEVEL */
5979+ 1606, /* GL_TEXTURE_MAX_LEVEL */
5980+ 572, /* GL_IGNORE_BORDER_HP */
5981+ 246, /* GL_CONSTANT_BORDER_HP */
5982+ 1250, /* GL_REPLICATE_BORDER_HP */
5983+ 252, /* GL_CONVOLUTION_BORDER_COLOR */
5984+ 987, /* GL_OCCLUSION_TEST_HP */
5985+ 988, /* GL_OCCLUSION_TEST_RESULT_HP */
5986+ 641, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
5987+ 1528, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
5988+ 1530, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
5989+ 1532, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
5990+ 1533, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
5991+ 1531, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
5992+ 1529, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
5993+ 798, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
5994+ 799, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
5995+ 1149, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
5996+ 1151, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
5997+ 1148, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
5998+ 1150, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
5999+ 1596, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
6000+ 1597, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
6001+ 1595, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
6002+ 518, /* GL_GENERATE_MIPMAP */
6003+ 519, /* GL_GENERATE_MIPMAP_HINT */
6004+ 481, /* GL_FOG_OFFSET_SGIX */
6005+ 482, /* GL_FOG_OFFSET_VALUE_SGIX */
6006+ 1542, /* GL_TEXTURE_COMPARE_SGIX */
6007+ 1541, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
6008+ 1592, /* GL_TEXTURE_LEQUAL_R_SGIX */
6009+ 1584, /* GL_TEXTURE_GEQUAL_R_SGIX */
6010+ 323, /* GL_DEPTH_COMPONENT16 */
6011+ 326, /* GL_DEPTH_COMPONENT24 */
6012+ 329, /* GL_DEPTH_COMPONENT32 */
6013+ 274, /* GL_CULL_VERTEX_EXT */
6014+ 276, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
6015+ 275, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
6016+ 1737, /* GL_WRAP_BORDER_SUN */
6017+ 1535, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
6018+ 634, /* GL_LIGHT_MODEL_COLOR_CONTROL */
6019+ 1345, /* GL_SINGLE_COLOR */
6020+ 1333, /* GL_SEPARATE_SPECULAR_COLOR */
6021+ 1342, /* GL_SHARED_TEXTURE_PALETTE_EXT */
6022+ 1651, /* GL_UNSIGNED_BYTE_2_3_3_REV */
6023+ 1664, /* GL_UNSIGNED_SHORT_5_6_5 */
6024+ 1665, /* GL_UNSIGNED_SHORT_5_6_5_REV */
6025+ 1662, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
6026+ 1660, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
6027+ 1658, /* GL_UNSIGNED_INT_8_8_8_8_REV */
6028+ 1656, /* GL_UNSIGNED_INT_2_10_10_10_REV */
6029+ 1604, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
6030+ 1605, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
6031+ 1603, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
6032+ 889, /* GL_MIRRORED_REPEAT */
6033+ 1289, /* GL_RGB_S3TC */
6034+ 1266, /* GL_RGB4_S3TC */
6035+ 1288, /* GL_RGBA_S3TC */
6036+ 1283, /* GL_RGBA4_S3TC */
6037+ 1286, /* GL_RGBA_DXT5_S3TC */
6038+ 1281, /* GL_RGBA4_DXT5_S3TC */
6039+ 239, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
6040+ 234, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
6041+ 235, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
6042+ 236, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
6043+ 950, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
6044+ 949, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
6045+ 642, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
6046+ 468, /* GL_FOG_COORDINATE_SOURCE */
6047+ 460, /* GL_FOG_COORD */
6048+ 484, /* GL_FRAGMENT_DEPTH */
6049+ 280, /* GL_CURRENT_FOG_COORD */
6050+ 467, /* GL_FOG_COORDINATE_ARRAY_TYPE */
6051+ 466, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
6052+ 465, /* GL_FOG_COORDINATE_ARRAY_POINTER */
6053+ 462, /* GL_FOG_COORDINATE_ARRAY */
6054+ 174, /* GL_COLOR_SUM */
6055+ 299, /* GL_CURRENT_SECONDARY_COLOR */
6056+ 1326, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
6057+ 1328, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
6058+ 1327, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
6059+ 1325, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
6060+ 1322, /* GL_SECONDARY_COLOR_ARRAY */
6061+ 528, /* GL_GL_CURRENT_RASTER_SECONDARY_COLOR */
6062+ 28, /* GL_ALIASED_POINT_SIZE_RANGE */
6063+ 27, /* GL_ALIASED_LINE_WIDTH_RANGE */
6064+ 1442, /* GL_TEXTURE0 */
6065+ 1444, /* GL_TEXTURE1 */
6066+ 1466, /* GL_TEXTURE2 */
6067+ 1488, /* GL_TEXTURE3 */
6068+ 1494, /* GL_TEXTURE4 */
6069+ 1496, /* GL_TEXTURE5 */
6070+ 1498, /* GL_TEXTURE6 */
6071+ 1500, /* GL_TEXTURE7 */
6072+ 1502, /* GL_TEXTURE8 */
6073+ 1504, /* GL_TEXTURE9 */
6074+ 1445, /* GL_TEXTURE10 */
6075+ 1447, /* GL_TEXTURE11 */
6076+ 1449, /* GL_TEXTURE12 */
6077+ 1451, /* GL_TEXTURE13 */
6078+ 1453, /* GL_TEXTURE14 */
6079+ 1455, /* GL_TEXTURE15 */
6080+ 1457, /* GL_TEXTURE16 */
6081+ 1459, /* GL_TEXTURE17 */
6082+ 1461, /* GL_TEXTURE18 */
6083+ 1463, /* GL_TEXTURE19 */
6084+ 1467, /* GL_TEXTURE20 */
6085+ 1469, /* GL_TEXTURE21 */
6086+ 1471, /* GL_TEXTURE22 */
6087+ 1473, /* GL_TEXTURE23 */
6088+ 1475, /* GL_TEXTURE24 */
6089+ 1477, /* GL_TEXTURE25 */
6090+ 1479, /* GL_TEXTURE26 */
6091+ 1481, /* GL_TEXTURE27 */
6092+ 1483, /* GL_TEXTURE28 */
6093+ 1485, /* GL_TEXTURE29 */
6094+ 1489, /* GL_TEXTURE30 */
6095+ 1491, /* GL_TEXTURE31 */
6096+ 18, /* GL_ACTIVE_TEXTURE */
6097+ 124, /* GL_CLIENT_ACTIVE_TEXTURE */
6098+ 867, /* GL_MAX_TEXTURE_UNITS */
6099+ 1630, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
6100+ 1633, /* GL_TRANSPOSE_PROJECTION_MATRIX */
6101+ 1635, /* GL_TRANSPOSE_TEXTURE_MATRIX */
6102+ 1627, /* GL_TRANSPOSE_COLOR_MATRIX */
6103+ 1430, /* GL_SUBTRACT */
6104+ 856, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
6105+ 222, /* GL_COMPRESSED_ALPHA */
6106+ 226, /* GL_COMPRESSED_LUMINANCE */
6107+ 227, /* GL_COMPRESSED_LUMINANCE_ALPHA */
6108+ 224, /* GL_COMPRESSED_INTENSITY */
6109+ 230, /* GL_COMPRESSED_RGB */
6110+ 231, /* GL_COMPRESSED_RGBA */
6111+ 1549, /* GL_TEXTURE_COMPRESSION_HINT */
6112+ 1611, /* GL_TEXTURE_RECTANGLE_ARB */
6113+ 1521, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
6114+ 1207, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
6115+ 854, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
6116+ 335, /* GL_DEPTH_STENCIL_NV */
6117+ 1655, /* GL_UNSIGNED_INT_24_8_NV */
6118+ 863, /* GL_MAX_TEXTURE_LOD_BIAS */
6119+ 1602, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
6120+ 864, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
6121+ 1578, /* GL_TEXTURE_FILTER_CONTROL */
6122+ 1593, /* GL_TEXTURE_LOD_BIAS */
6123+ 207, /* GL_COMBINE4 */
6124+ 857, /* GL_MAX_SHININESS_NV */
6125+ 858, /* GL_MAX_SPOT_EXPONENT_NV */
6126+ 576, /* GL_INCR_WRAP */
6127+ 310, /* GL_DECR_WRAP */
6128+ 909, /* GL_MODELVIEW1_ARB */
6129+ 965, /* GL_NORMAL_MAP */
6130+ 1236, /* GL_REFLECTION_MAP */
6131+ 1558, /* GL_TEXTURE_CUBE_MAP */
6132+ 1519, /* GL_TEXTURE_BINDING_CUBE_MAP */
6133+ 1566, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
6134+ 1560, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
6135+ 1568, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
6136+ 1562, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
6137+ 1570, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
6138+ 1564, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
6139+ 1205, /* GL_PROXY_TEXTURE_CUBE_MAP */
6140+ 810, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
6141+ 944, /* GL_MULTISAMPLE_FILTER_HINT_NV */
6142+ 476, /* GL_FOG_DISTANCE_MODE_NV */
6143+ 435, /* GL_EYE_RADIAL_NV */
6144+ 434, /* GL_EYE_PLANE_ABSOLUTE_NV */
6145+ 206, /* GL_COMBINE */
6146+ 213, /* GL_COMBINE_RGB */
6147+ 208, /* GL_COMBINE_ALPHA */
6148+ 1290, /* GL_RGB_SCALE */
6149+ 24, /* GL_ADD_SIGNED */
6150+ 603, /* GL_INTERPOLATE */
6151+ 241, /* GL_CONSTANT */
6152+ 1155, /* GL_PRIMARY_COLOR */
6153+ 1152, /* GL_PREVIOUS */
6154+ 1356, /* GL_SOURCE0_RGB */
6155+ 1362, /* GL_SOURCE1_RGB */
6156+ 1368, /* GL_SOURCE2_RGB */
6157+ 1372, /* GL_SOURCE3_RGB_NV */
6158+ 1353, /* GL_SOURCE0_ALPHA */
6159+ 1359, /* GL_SOURCE1_ALPHA */
6160+ 1365, /* GL_SOURCE2_ALPHA */
6161+ 1371, /* GL_SOURCE3_ALPHA_NV */
6162+ 1001, /* GL_OPERAND0_RGB */
6163+ 1007, /* GL_OPERAND1_RGB */
6164+ 1013, /* GL_OPERAND2_RGB */
6165+ 1017, /* GL_OPERAND3_RGB_NV */
6166+ 998, /* GL_OPERAND0_ALPHA */
6167+ 1004, /* GL_OPERAND1_ALPHA */
6168+ 1010, /* GL_OPERAND2_ALPHA */
6169+ 1016, /* GL_OPERAND3_ALPHA_NV */
6170+ 1677, /* GL_VERTEX_ARRAY_BINDING_APPLE */
6171+ 1741, /* GL_YCBCR_422_APPLE */
6172+ 1666, /* GL_UNSIGNED_SHORT_8_8_APPLE */
6173+ 1668, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
6174+ 1347, /* GL_SLICE_ACCUM_SUN */
6175+ 1212, /* GL_QUAD_MESH_SUN */
6176+ 1639, /* GL_TRIANGLE_MESH_SUN */
6177+ 1715, /* GL_VERTEX_PROGRAM_ARB */
6178+ 1726, /* GL_VERTEX_STATE_PROGRAM_NV */
6179+ 1702, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
6180+ 1708, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
6181+ 1710, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
6182+ 1712, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
6183+ 301, /* GL_CURRENT_VERTEX_ATTRIB */
6184+ 1168, /* GL_PROGRAM_LENGTH_ARB */
6185+ 1182, /* GL_PROGRAM_STRING_ARB */
6186+ 931, /* GL_MODELVIEW_PROJECTION_NV */
6187+ 571, /* GL_IDENTITY_NV */
6188+ 616, /* GL_INVERSE_NV */
6189+ 1632, /* GL_TRANSPOSE_NV */
6190+ 617, /* GL_INVERSE_TRANSPOSE_NV */
6191+ 840, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
6192+ 839, /* GL_MAX_PROGRAM_MATRICES_ARB */
6193+ 747, /* GL_MATRIX0_NV */
6194+ 759, /* GL_MATRIX1_NV */
6195+ 771, /* GL_MATRIX2_NV */
6196+ 775, /* GL_MATRIX3_NV */
6197+ 777, /* GL_MATRIX4_NV */
6198+ 779, /* GL_MATRIX5_NV */
6199+ 781, /* GL_MATRIX6_NV */
6200+ 783, /* GL_MATRIX7_NV */
6201+ 286, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
6202+ 283, /* GL_CURRENT_MATRIX_ARB */
6203+ 1718, /* GL_VERTEX_PROGRAM_POINT_SIZE */
6204+ 1721, /* GL_VERTEX_PROGRAM_TWO_SIDE */
6205+ 1180, /* GL_PROGRAM_PARAMETER_NV */
6206+ 1706, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
6207+ 1184, /* GL_PROGRAM_TARGET_NV */
6208+ 1181, /* GL_PROGRAM_RESIDENT_NV */
6209+ 1624, /* GL_TRACK_MATRIX_NV */
6210+ 1625, /* GL_TRACK_MATRIX_TRANSFORM_NV */
6211+ 1716, /* GL_VERTEX_PROGRAM_BINDING_NV */
6212+ 1162, /* GL_PROGRAM_ERROR_POSITION_ARB */
6213+ 320, /* GL_DEPTH_CLAMP_NV */
6214+ 1684, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
6215+ 1691, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
6216+ 1692, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
6217+ 1693, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
6218+ 1694, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
6219+ 1695, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
6220+ 1696, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
6221+ 1697, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
6222+ 1698, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
6223+ 1699, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
6224+ 1685, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
6225+ 1686, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
6226+ 1687, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
6227+ 1688, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
6228+ 1689, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
6229+ 1690, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
6230+ 701, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
6231+ 708, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
6232+ 709, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
6233+ 710, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
6234+ 711, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
6235+ 712, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
6236+ 713, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
6237+ 714, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
6238+ 715, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
6239+ 716, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
6240+ 702, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
6241+ 703, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
6242+ 704, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
6243+ 705, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
6244+ 706, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
6245+ 707, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
6246+ 728, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
6247+ 735, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
6248+ 736, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
6249+ 737, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
6250+ 738, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
6251+ 739, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
6252+ 740, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
6253+ 1161, /* GL_PROGRAM_BINDING_ARB */
6254+ 742, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
6255+ 743, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
6256+ 729, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
6257+ 730, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
6258+ 731, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
6259+ 732, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
6260+ 733, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
6261+ 734, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
6262+ 1547, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
6263+ 1544, /* GL_TEXTURE_COMPRESSED */
6264+ 970, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
6265+ 240, /* GL_COMPRESSED_TEXTURE_FORMATS */
6266+ 879, /* GL_MAX_VERTEX_UNITS_ARB */
6267+ 22, /* GL_ACTIVE_VERTEX_UNITS_ARB */
6268+ 1736, /* GL_WEIGHT_SUM_UNITY_ARB */
6269+ 1714, /* GL_VERTEX_BLEND_ARB */
6270+ 303, /* GL_CURRENT_WEIGHT_ARB */
6271+ 1735, /* GL_WEIGHT_ARRAY_TYPE_ARB */
6272+ 1734, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
6273+ 1733, /* GL_WEIGHT_ARRAY_SIZE_ARB */
6274+ 1732, /* GL_WEIGHT_ARRAY_POINTER_ARB */
6275+ 1729, /* GL_WEIGHT_ARRAY_ARB */
6276+ 346, /* GL_DOT3_RGB */
6277+ 347, /* GL_DOT3_RGBA */
6278+ 238, /* GL_COMPRESSED_RGB_FXT1_3DFX */
6279+ 233, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
6280+ 939, /* GL_MULTISAMPLE_3DFX */
6281+ 1311, /* GL_SAMPLE_BUFFERS_3DFX */
6282+ 1302, /* GL_SAMPLES_3DFX */
6283+ 920, /* GL_MODELVIEW2_ARB */
6284+ 923, /* GL_MODELVIEW3_ARB */
6285+ 924, /* GL_MODELVIEW4_ARB */
6286+ 925, /* GL_MODELVIEW5_ARB */
6287+ 926, /* GL_MODELVIEW6_ARB */
6288+ 927, /* GL_MODELVIEW7_ARB */
6289+ 928, /* GL_MODELVIEW8_ARB */
6290+ 929, /* GL_MODELVIEW9_ARB */
6291+ 899, /* GL_MODELVIEW10_ARB */
6292+ 900, /* GL_MODELVIEW11_ARB */
6293+ 901, /* GL_MODELVIEW12_ARB */
6294+ 902, /* GL_MODELVIEW13_ARB */
6295+ 903, /* GL_MODELVIEW14_ARB */
6296+ 904, /* GL_MODELVIEW15_ARB */
6297+ 905, /* GL_MODELVIEW16_ARB */
6298+ 906, /* GL_MODELVIEW17_ARB */
6299+ 907, /* GL_MODELVIEW18_ARB */
6300+ 908, /* GL_MODELVIEW19_ARB */
6301+ 910, /* GL_MODELVIEW20_ARB */
6302+ 911, /* GL_MODELVIEW21_ARB */
6303+ 912, /* GL_MODELVIEW22_ARB */
6304+ 913, /* GL_MODELVIEW23_ARB */
6305+ 914, /* GL_MODELVIEW24_ARB */
6306+ 915, /* GL_MODELVIEW25_ARB */
6307+ 916, /* GL_MODELVIEW26_ARB */
6308+ 917, /* GL_MODELVIEW27_ARB */
6309+ 918, /* GL_MODELVIEW28_ARB */
6310+ 919, /* GL_MODELVIEW29_ARB */
6311+ 921, /* GL_MODELVIEW30_ARB */
6312+ 922, /* GL_MODELVIEW31_ARB */
6313+ 351, /* GL_DOT3_RGB_EXT */
6314+ 349, /* GL_DOT3_RGBA_EXT */
6315+ 893, /* GL_MIRROR_CLAMP_EXT */
6316+ 896, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
6317+ 934, /* GL_MODULATE_ADD_ATI */
6318+ 935, /* GL_MODULATE_SIGNED_ADD_ATI */
6319+ 936, /* GL_MODULATE_SUBTRACT_ATI */
6320+ 1742, /* GL_YCBCR_MESA */
6321+ 1025, /* GL_PACK_INVERT_MESA */
6322+ 306, /* GL_DEBUG_OBJECT_MESA */
6323+ 307, /* GL_DEBUG_PRINT_MESA */
6324+ 305, /* GL_DEBUG_ASSERT_MESA */
6325+ 107, /* GL_BUFFER_SIZE */
6326+ 109, /* GL_BUFFER_USAGE */
6327+ 1398, /* GL_STENCIL_BACK_FUNC */
6328+ 1397, /* GL_STENCIL_BACK_FAIL */
6329+ 1399, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
6330+ 1400, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
6331+ 485, /* GL_FRAGMENT_PROGRAM_ARB */
6332+ 1159, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
6333+ 1187, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
6334+ 1186, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
6335+ 1171, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
6336+ 1177, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
6337+ 1176, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
6338+ 829, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
6339+ 852, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
6340+ 851, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
6341+ 842, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
6342+ 848, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
6343+ 847, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
6344+ 812, /* GL_MAX_DRAW_BUFFERS */
6345+ 355, /* GL_DRAW_BUFFER0 */
6346+ 358, /* GL_DRAW_BUFFER1 */
6347+ 379, /* GL_DRAW_BUFFER2 */
6348+ 382, /* GL_DRAW_BUFFER3 */
6349+ 385, /* GL_DRAW_BUFFER4 */
6350+ 388, /* GL_DRAW_BUFFER5 */
6351+ 391, /* GL_DRAW_BUFFER6 */
6352+ 394, /* GL_DRAW_BUFFER7 */
6353+ 397, /* GL_DRAW_BUFFER8 */
6354+ 400, /* GL_DRAW_BUFFER9 */
6355+ 359, /* GL_DRAW_BUFFER10 */
6356+ 362, /* GL_DRAW_BUFFER11 */
6357+ 365, /* GL_DRAW_BUFFER12 */
6358+ 368, /* GL_DRAW_BUFFER13 */
6359+ 371, /* GL_DRAW_BUFFER14 */
6360+ 374, /* GL_DRAW_BUFFER15 */
6361+ 82, /* GL_BLEND_EQUATION_ALPHA */
6362+ 792, /* GL_MATRIX_PALETTE_ARB */
6363+ 823, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
6364+ 826, /* GL_MAX_PALETTE_MATRICES_ARB */
6365+ 289, /* GL_CURRENT_PALETTE_MATRIX_ARB */
6366+ 786, /* GL_MATRIX_INDEX_ARRAY_ARB */
6367+ 284, /* GL_CURRENT_MATRIX_INDEX_ARB */
6368+ 788, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
6369+ 790, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
6370+ 789, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
6371+ 787, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
6372+ 1573, /* GL_TEXTURE_DEPTH_SIZE */
6373+ 339, /* GL_DEPTH_TEXTURE_MODE */
6374+ 1539, /* GL_TEXTURE_COMPARE_MODE */
6375+ 1537, /* GL_TEXTURE_COMPARE_FUNC */
6376+ 217, /* GL_COMPARE_R_TO_TEXTURE */
6377+ 1093, /* GL_POINT_SPRITE */
6378+ 266, /* GL_COORD_REPLACE */
6379+ 1097, /* GL_POINT_SPRITE_R_MODE_NV */
6380+ 1214, /* GL_QUERY_COUNTER_BITS */
6381+ 291, /* GL_CURRENT_QUERY */
6382+ 1216, /* GL_QUERY_RESULT */
6383+ 1218, /* GL_QUERY_RESULT_AVAILABLE */
6384+ 873, /* GL_MAX_VERTEX_ATTRIBS */
6385+ 1704, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
6386+ 337, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
6387+ 336, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
6388+ 859, /* GL_MAX_TEXTURE_COORDS */
6389+ 861, /* GL_MAX_TEXTURE_IMAGE_UNITS */
6390+ 1164, /* GL_PROGRAM_ERROR_STRING_ARB */
6391+ 1166, /* GL_PROGRAM_FORMAT_ASCII_ARB */
6392+ 1165, /* GL_PROGRAM_FORMAT_ARB */
6393+ 1618, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
6394+ 318, /* GL_DEPTH_BOUNDS_TEST_EXT */
6395+ 317, /* GL_DEPTH_BOUNDS_EXT */
6396+ 52, /* GL_ARRAY_BUFFER */
6397+ 420, /* GL_ELEMENT_ARRAY_BUFFER */
6398+ 54, /* GL_ARRAY_BUFFER_BINDING */
6399+ 422, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
6400+ 1678, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
6401+ 960, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
6402+ 140, /* GL_COLOR_ARRAY_BUFFER_BINDING */
6403+ 579, /* GL_INDEX_ARRAY_BUFFER_BINDING */
6404+ 1552, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
6405+ 416, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
6406+ 1323, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
6407+ 463, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
6408+ 1730, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
6409+ 1700, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
6410+ 1167, /* GL_PROGRAM_INSTRUCTIONS_ARB */
6411+ 835, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
6412+ 1173, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
6413+ 844, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
6414+ 1185, /* GL_PROGRAM_TEMPORARIES_ARB */
6415+ 850, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
6416+ 1175, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
6417+ 846, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
6418+ 1179, /* GL_PROGRAM_PARAMETERS_ARB */
6419+ 849, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
6420+ 1174, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
6421+ 845, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
6422+ 1160, /* GL_PROGRAM_ATTRIBS_ARB */
6423+ 830, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
6424+ 1172, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
6425+ 843, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
6426+ 1158, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
6427+ 828, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
6428+ 1170, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
6429+ 841, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
6430+ 836, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
6431+ 832, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
6432+ 1188, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
6433+ 1629, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
6434+ 1226, /* GL_READ_ONLY */
6435+ 1738, /* GL_WRITE_ONLY */
6436+ 1228, /* GL_READ_WRITE */
6437+ 101, /* GL_BUFFER_ACCESS */
6438+ 103, /* GL_BUFFER_MAPPED */
6439+ 105, /* GL_BUFFER_MAP_POINTER */
6440+ 1623, /* GL_TIME_ELAPSED_EXT */
6441+ 746, /* GL_MATRIX0_ARB */
6442+ 758, /* GL_MATRIX1_ARB */
6443+ 770, /* GL_MATRIX2_ARB */
6444+ 774, /* GL_MATRIX3_ARB */
6445+ 776, /* GL_MATRIX4_ARB */
6446+ 778, /* GL_MATRIX5_ARB */
6447+ 780, /* GL_MATRIX6_ARB */
6448+ 782, /* GL_MATRIX7_ARB */
6449+ 784, /* GL_MATRIX8_ARB */
6450+ 785, /* GL_MATRIX9_ARB */
6451+ 748, /* GL_MATRIX10_ARB */
6452+ 749, /* GL_MATRIX11_ARB */
6453+ 750, /* GL_MATRIX12_ARB */
6454+ 751, /* GL_MATRIX13_ARB */
6455+ 752, /* GL_MATRIX14_ARB */
6456+ 753, /* GL_MATRIX15_ARB */
6457+ 754, /* GL_MATRIX16_ARB */
6458+ 755, /* GL_MATRIX17_ARB */
6459+ 756, /* GL_MATRIX18_ARB */
6460+ 757, /* GL_MATRIX19_ARB */
6461+ 760, /* GL_MATRIX20_ARB */
6462+ 761, /* GL_MATRIX21_ARB */
6463+ 762, /* GL_MATRIX22_ARB */
6464+ 763, /* GL_MATRIX23_ARB */
6465+ 764, /* GL_MATRIX24_ARB */
6466+ 765, /* GL_MATRIX25_ARB */
6467+ 766, /* GL_MATRIX26_ARB */
6468+ 767, /* GL_MATRIX27_ARB */
6469+ 768, /* GL_MATRIX28_ARB */
6470+ 769, /* GL_MATRIX29_ARB */
6471+ 772, /* GL_MATRIX30_ARB */
6472+ 773, /* GL_MATRIX31_ARB */
6473+ 1425, /* GL_STREAM_DRAW */
6474+ 1427, /* GL_STREAM_READ */
6475+ 1423, /* GL_STREAM_COPY */
6476+ 1391, /* GL_STATIC_DRAW */
6477+ 1393, /* GL_STATIC_READ */
6478+ 1389, /* GL_STATIC_COPY */
6479+ 410, /* GL_DYNAMIC_DRAW */
6480+ 412, /* GL_DYNAMIC_READ */
6481+ 408, /* GL_DYNAMIC_COPY */
6482+ 535, /* GL_GL_PIXEL_PACK_BUFFER */
6483+ 537, /* GL_GL_PIXEL_UNPACK_BUFFER */
6484+ 536, /* GL_GL_PIXEL_PACK_BUFFER_BINDING */
6485+ 538, /* GL_GL_PIXEL_UNPACK_BUFFER_BINDING */
6486+ 833, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
6487+ 831, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
6488+ 834, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
6489+ 838, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
6490+ 837, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
6491+ 795, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
6492+ 1419, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
6493+ 17, /* GL_ACTIVE_STENCIL_FACE_EXT */
6494+ 894, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
6495+ 1304, /* GL_SAMPLES_PASSED */
6496+ 486, /* GL_FRAGMENT_SHADER */
6497+ 1724, /* GL_VERTEX_SHADER */
6498+ 1178, /* GL_PROGRAM_OBJECT_ARB */
6499+ 1336, /* GL_SHADER_OBJECT_ARB */
6500+ 819, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
6501+ 877, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
6502+ 871, /* GL_MAX_VARYING_FLOATS */
6503+ 875, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
6504+ 804, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
6505+ 985, /* GL_OBJECT_TYPE_ARB */
6506+ 1338, /* GL_SHADER_TYPE */
6507+ 451, /* GL_FLOAT_VEC2 */
6508+ 453, /* GL_FLOAT_VEC3 */
6509+ 455, /* GL_FLOAT_VEC4 */
6510+ 606, /* GL_INT_VEC2 */
6511+ 608, /* GL_INT_VEC3 */
6512+ 610, /* GL_INT_VEC4 */
6513+ 93, /* GL_BOOL */
6514+ 95, /* GL_BOOL_VEC2 */
6515+ 97, /* GL_BOOL_VEC3 */
6516+ 99, /* GL_BOOL_VEC4 */
6517+ 445, /* GL_FLOAT_MAT2 */
6518+ 447, /* GL_FLOAT_MAT3 */
6519+ 449, /* GL_FLOAT_MAT4 */
6520+ 1295, /* GL_SAMPLER_1D */
6521+ 1297, /* GL_SAMPLER_2D */
6522+ 1299, /* GL_SAMPLER_3D */
6523+ 1300, /* GL_SAMPLER_CUBE */
6524+ 1296, /* GL_SAMPLER_1D_SHADOW */
6525+ 1298, /* GL_SAMPLER_2D_SHADOW */
6526+ 529, /* GL_GL_FLOAT_MAT2x3 */
6527+ 530, /* GL_GL_FLOAT_MAT2x4 */
6528+ 531, /* GL_GL_FLOAT_MAT3x2 */
6529+ 532, /* GL_GL_FLOAT_MAT3x4 */
6530+ 533, /* GL_GL_FLOAT_MAT4x2 */
6531+ 534, /* GL_GL_FLOAT_MAT4x3 */
6532+ 312, /* GL_DELETE_STATUS */
6533+ 221, /* GL_COMPILE_STATUS */
6534+ 659, /* GL_LINK_STATUS */
6535+ 1673, /* GL_VALIDATE_STATUS */
6536+ 591, /* GL_INFO_LOG_LENGTH */
6537+ 56, /* GL_ATTACHED_SHADERS */
6538+ 20, /* GL_ACTIVE_UNIFORMS */
6539+ 21, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
6540+ 1337, /* GL_SHADER_SOURCE_LENGTH */
6541+ 15, /* GL_ACTIVE_ATTRIBUTES */
6542+ 16, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
6543+ 488, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
6544+ 1340, /* GL_SHADING_LANGUAGE_VERSION */
6545+ 290, /* GL_CURRENT_PROGRAM */
6546+ 1034, /* GL_PALETTE4_RGB8_OES */
6547+ 1036, /* GL_PALETTE4_RGBA8_OES */
6548+ 1032, /* GL_PALETTE4_R5_G6_B5_OES */
6549+ 1035, /* GL_PALETTE4_RGBA4_OES */
6550+ 1033, /* GL_PALETTE4_RGB5_A1_OES */
6551+ 1039, /* GL_PALETTE8_RGB8_OES */
6552+ 1041, /* GL_PALETTE8_RGBA8_OES */
6553+ 1037, /* GL_PALETTE8_R5_G6_B5_OES */
6554+ 1040, /* GL_PALETTE8_RGBA4_OES */
6555+ 1038, /* GL_PALETTE8_RGB5_A1_OES */
6556+ 574, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
6557+ 573, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
6558+ 1507, /* GL_TEXTURE_1D_ARRAY_EXT */
6559+ 1198, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
6560+ 1509, /* GL_TEXTURE_2D_ARRAY_EXT */
6561+ 1201, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
6562+ 1515, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
6563+ 1517, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
6564+ 543, /* GL_GL_SRGB */
6565+ 544, /* GL_GL_SRGB8 */
6566+ 546, /* GL_GL_SRGB_ALPHA */
6567+ 545, /* GL_GL_SRGB8_ALPHA8 */
6568+ 542, /* GL_GL_SLUMINANCE_ALPHA */
6569+ 541, /* GL_GL_SLUMINANCE8_ALPHA8 */
6570+ 539, /* GL_GL_SLUMINANCE */
6571+ 540, /* GL_GL_SLUMINANCE8 */
6572+ 526, /* GL_GL_COMPRESSED_SRGB */
6573+ 527, /* GL_GL_COMPRESSED_SRGB_ALPHA */
6574+ 524, /* GL_GL_COMPRESSED_SLUMINANCE */
6575+ 525, /* GL_GL_COMPRESSED_SLUMINANCE_ALPHA */
6576+ 1095, /* GL_POINT_SPRITE_COORD_ORIGIN */
6577+ 667, /* GL_LOWER_LEFT */
6578+ 1670, /* GL_UPPER_LEFT */
6579+ 1401, /* GL_STENCIL_BACK_REF */
6580+ 1402, /* GL_STENCIL_BACK_VALUE_MASK */
6581+ 1403, /* GL_STENCIL_BACK_WRITEMASK */
6582+ 403, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
6583+ 1240, /* GL_RENDERBUFFER_BINDING_EXT */
6584+ 1225, /* GL_READ_FRAMEBUFFER_EXT */
6585+ 404, /* GL_DRAW_FRAMEBUFFER_EXT */
6586+ 1224, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
6587+ 490, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
6588+ 489, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
6589+ 494, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
6590+ 492, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
6591+ 491, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
6592+ 496, /* GL_FRAMEBUFFER_COMPLETE_EXT */
6593+ 498, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
6594+ 503, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
6595+ 501, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
6596+ 499, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
6597+ 502, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
6598+ 500, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
6599+ 504, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
6600+ 506, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
6601+ 505, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
6602+ 801, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
6603+ 146, /* GL_COLOR_ATTACHMENT0_EXT */
6604+ 153, /* GL_COLOR_ATTACHMENT1_EXT */
6605+ 154, /* GL_COLOR_ATTACHMENT2_EXT */
6606+ 155, /* GL_COLOR_ATTACHMENT3_EXT */
6607+ 156, /* GL_COLOR_ATTACHMENT4_EXT */
6608+ 157, /* GL_COLOR_ATTACHMENT5_EXT */
6609+ 158, /* GL_COLOR_ATTACHMENT6_EXT */
6610+ 159, /* GL_COLOR_ATTACHMENT7_EXT */
6611+ 160, /* GL_COLOR_ATTACHMENT8_EXT */
6612+ 161, /* GL_COLOR_ATTACHMENT9_EXT */
6613+ 147, /* GL_COLOR_ATTACHMENT10_EXT */
6614+ 148, /* GL_COLOR_ATTACHMENT11_EXT */
6615+ 149, /* GL_COLOR_ATTACHMENT12_EXT */
6616+ 150, /* GL_COLOR_ATTACHMENT13_EXT */
6617+ 151, /* GL_COLOR_ATTACHMENT14_EXT */
6618+ 152, /* GL_COLOR_ATTACHMENT15_EXT */
6619+ 314, /* GL_DEPTH_ATTACHMENT_EXT */
6620+ 1396, /* GL_STENCIL_ATTACHMENT_EXT */
6621+ 497, /* GL_FRAMEBUFFER_EXT */
6622+ 1241, /* GL_RENDERBUFFER_EXT */
6623+ 1244, /* GL_RENDERBUFFER_WIDTH_EXT */
6624+ 1242, /* GL_RENDERBUFFER_HEIGHT_EXT */
6625+ 1243, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
6626+ 1414, /* GL_STENCIL_INDEX_EXT */
6627+ 1411, /* GL_STENCIL_INDEX1_EXT */
6628+ 1412, /* GL_STENCIL_INDEX4_EXT */
6629+ 1413, /* GL_STENCIL_INDEX8_EXT */
6630+ 1410, /* GL_STENCIL_INDEX16_EXT */
6631+ 428, /* GL_EVAL_BIT */
6632+ 1222, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
6633+ 661, /* GL_LIST_BIT */
6634+ 1523, /* GL_TEXTURE_BIT */
6635+ 1319, /* GL_SCISSOR_BIT */
6636+ 29, /* GL_ALL_ATTRIB_BITS */
6637+ 941, /* GL_MULTISAMPLE_BIT */
6638+ 30, /* GL_ALL_CLIENT_ATTRIB_BITS */
6639+};
6640+
6641+#define Elements(x) sizeof(x)/sizeof(*x)
6642+
6643+typedef int (*cfunc)(const void *, const void *);
6644+
6645+/**
6646+ * Compare a key name to an element in the \c all_enums array.
6647+ *
6648+ * \c bsearch always passes the key as the first parameter and the pointer
6649+ * to the array element as the second parameter. We can elimiate some
6650+ * extra work by taking advantage of that fact.
6651+ *
6652+ * \param a Pointer to the desired enum name.
6653+ * \param b Pointer to an element of the \c all_enums array.
6654+ */
6655+static int compar_name( const char *a, const enum_elt *b )
6656+{
6657+ return _mesa_strcmp( a, & enum_string_table[ b->offset ] );
6658+}
6659+
6660+/**
6661+ * Compare a key enum value to an element in the \c all_enums array.
6662+ *
6663+ * \c bsearch always passes the key as the first parameter and the pointer
6664+ * to the array element as the second parameter. We can elimiate some
6665+ * extra work by taking advantage of that fact.
6666+ *
6667+ * \param a Pointer to the desired enum name.
6668+ * \param b Pointer to an index into the \c all_enums array.
6669+ */
6670+static int compar_nr( const int *a, const unsigned *b )
6671+{
6672+ return a[0] - all_enums[*b].n;
6673+}
6674+
6675+
6676+static char token_tmp[20];
6677+
6678+const char *_mesa_lookup_enum_by_nr( int nr )
6679+{
6680+ unsigned * i;
6681+
6682+ i = (unsigned *)bsearch( & nr, reduced_enums, Elements(reduced_enums),
6683+ sizeof(reduced_enums[0]), (cfunc) compar_nr );
6684+
6685+ if ( i != NULL ) {
6686+ return & enum_string_table[ all_enums[ *i ].offset ];
6687+ }
6688+ else {
6689+ /* this is not re-entrant safe, no big deal here */
6690+ _mesa_sprintf(token_tmp, "0x%x", nr);
6691+ return token_tmp;
6692+ }
6693+}
6694+
6695+int _mesa_lookup_enum_by_name( const char *symbol )
6696+{
6697+ enum_elt * f = NULL;
6698+
6699+ if ( symbol != NULL ) {
6700+ f = (enum_elt *)bsearch( symbol, all_enums, Elements(all_enums),
6701+ sizeof( enum_elt ), (cfunc) compar_name );
6702+ }
6703+
6704+ return (f != NULL) ? f->n : -1;
6705+}
6706+
6707+
6708Index: trunk/target-i386/mesa_get.c
6709===================================================================
6710--- /dev/null 1970-01-01 00:00:00.000000000 +0000
6711+++ trunk/target-i386/mesa_get.c 2009-01-19 23:06:08.000000000 +0000
6712@@ -0,0 +1,5563 @@
6713+
6714+/***
6715+ *** NOTE!!! DO NOT EDIT THIS FILE!!! IT IS GENERATED BY get_gen.py
6716+ ***/
6717+
6718+#include "glheader.h"
6719+#include "context.h"
6720+#include "enable.h"
6721+#include "extensions.h"
6722+#include "fbobject.h"
6723+#include "get.h"
6724+#include "macros.h"
6725+#include "mtypes.h"
6726+#include "state.h"
6727+#include "texcompress.h"
6728+
6729+
6730+#define FLOAT_TO_BOOLEAN(X) ( (X) ? GL_TRUE : GL_FALSE )
6731+
6732+#define INT_TO_BOOLEAN(I) ( (I) ? GL_TRUE : GL_FALSE )
6733+
6734+#define ENUM_TO_BOOLEAN(E) ( (E) ? GL_TRUE : GL_FALSE )
6735+#define ENUM_TO_INT(E) ( (GLint) (E) )
6736+#define ENUM_TO_FLOAT(E) ( (GLfloat) (E) )
6737+
6738+#define BOOLEAN_TO_INT(B) ( (GLint) (B) )
6739+#define BOOLEAN_TO_FLOAT(B) ( (B) ? 1.0F : 0.0F )
6740+
6741+
6742+/*
6743+ * Check if named extension is enabled, if not generate error and return.
6744+ */
6745+#define CHECK_EXT1(EXT1, FUNC) \
6746+ if (!ctx->Extensions.EXT1) { \
6747+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
6748+ return; \
6749+ }
6750+
6751+/*
6752+ * Check if either of two extensions is enabled.
6753+ */
6754+#define CHECK_EXT2(EXT1, EXT2, FUNC) \
6755+ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2) { \
6756+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
6757+ return; \
6758+ }
6759+
6760+/*
6761+ * Check if either of three extensions is enabled.
6762+ */
6763+#define CHECK_EXT3(EXT1, EXT2, EXT3, FUNC) \
6764+ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2 && \
6765+ !ctx->Extensions.EXT3) { \
6766+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
6767+ return; \
6768+ }
6769+
6770+/*
6771+ * Check if either of four extensions is enabled.
6772+ */
6773+#define CHECK_EXT4(EXT1, EXT2, EXT3, EXT4, FUNC) \
6774+ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2 && \
6775+ !ctx->Extensions.EXT3 && !ctx->Extensions.EXT4) { \
6776+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
6777+ return; \
6778+ }
6779+
6780+
6781+void GLAPIENTRY
6782+_mesa_GetBooleanv( GLenum pname, GLboolean *params )
6783+{
6784+ GET_CURRENT_CONTEXT(ctx);
6785+ ASSERT_OUTSIDE_BEGIN_END(ctx);
6786+
6787+ if (!params)
6788+ return;
6789+
6790+ if (ctx->NewState)
6791+ _mesa_update_state(ctx);
6792+
6793+ if (ctx->Driver.GetBooleanv &&
6794+ ctx->Driver.GetBooleanv(ctx, pname, params))
6795+ return;
6796+
6797+ switch (pname) {
6798+ case GL_ACCUM_RED_BITS:
6799+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumRedBits);
6800+ break;
6801+ case GL_ACCUM_GREEN_BITS:
6802+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumGreenBits);
6803+ break;
6804+ case GL_ACCUM_BLUE_BITS:
6805+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumBlueBits);
6806+ break;
6807+ case GL_ACCUM_ALPHA_BITS:
6808+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumAlphaBits);
6809+ break;
6810+ case GL_ACCUM_CLEAR_VALUE:
6811+ params[0] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[0]);
6812+ params[1] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[1]);
6813+ params[2] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[2]);
6814+ params[3] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[3]);
6815+ break;
6816+ case GL_ALPHA_BIAS:
6817+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.AlphaBias);
6818+ break;
6819+ case GL_ALPHA_BITS:
6820+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.alphaBits);
6821+ break;
6822+ case GL_ALPHA_SCALE:
6823+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.AlphaScale);
6824+ break;
6825+ case GL_ALPHA_TEST:
6826+ params[0] = ctx->Color.AlphaEnabled;
6827+ break;
6828+ case GL_ALPHA_TEST_FUNC:
6829+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.AlphaFunc);
6830+ break;
6831+ case GL_ALPHA_TEST_REF:
6832+ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.AlphaRef);
6833+ break;
6834+ case GL_ATTRIB_STACK_DEPTH:
6835+ params[0] = INT_TO_BOOLEAN(ctx->AttribStackDepth);
6836+ break;
6837+ case GL_AUTO_NORMAL:
6838+ params[0] = ctx->Eval.AutoNormal;
6839+ break;
6840+ case GL_AUX_BUFFERS:
6841+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.numAuxBuffers);
6842+ break;
6843+ case GL_BLEND:
6844+ params[0] = ctx->Color.BlendEnabled;
6845+ break;
6846+ case GL_BLEND_DST:
6847+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstRGB);
6848+ break;
6849+ case GL_BLEND_SRC:
6850+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcRGB);
6851+ break;
6852+ case GL_BLEND_SRC_RGB_EXT:
6853+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcRGB);
6854+ break;
6855+ case GL_BLEND_DST_RGB_EXT:
6856+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstRGB);
6857+ break;
6858+ case GL_BLEND_SRC_ALPHA_EXT:
6859+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcA);
6860+ break;
6861+ case GL_BLEND_DST_ALPHA_EXT:
6862+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstA);
6863+ break;
6864+ case GL_BLEND_EQUATION:
6865+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendEquationRGB );
6866+ break;
6867+ case GL_BLEND_EQUATION_ALPHA_EXT:
6868+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendEquationA );
6869+ break;
6870+ case GL_BLEND_COLOR_EXT:
6871+ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[0]);
6872+ params[1] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[1]);
6873+ params[2] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[2]);
6874+ params[3] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[3]);
6875+ break;
6876+ case GL_BLUE_BIAS:
6877+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.BlueBias);
6878+ break;
6879+ case GL_BLUE_BITS:
6880+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.blueBits);
6881+ break;
6882+ case GL_BLUE_SCALE:
6883+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.BlueScale);
6884+ break;
6885+ case GL_CLIENT_ATTRIB_STACK_DEPTH:
6886+ params[0] = INT_TO_BOOLEAN(ctx->ClientAttribStackDepth);
6887+ break;
6888+ case GL_CLIP_PLANE0:
6889+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 0) & 1;
6890+ break;
6891+ case GL_CLIP_PLANE1:
6892+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 1) & 1;
6893+ break;
6894+ case GL_CLIP_PLANE2:
6895+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 2) & 1;
6896+ break;
6897+ case GL_CLIP_PLANE3:
6898+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 3) & 1;
6899+ break;
6900+ case GL_CLIP_PLANE4:
6901+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 4) & 1;
6902+ break;
6903+ case GL_CLIP_PLANE5:
6904+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 5) & 1;
6905+ break;
6906+ case GL_COLOR_CLEAR_VALUE:
6907+ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[0]);
6908+ params[1] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[1]);
6909+ params[2] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[2]);
6910+ params[3] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[3]);
6911+ break;
6912+ case GL_COLOR_MATERIAL:
6913+ params[0] = ctx->Light.ColorMaterialEnabled;
6914+ break;
6915+ case GL_COLOR_MATERIAL_FACE:
6916+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ColorMaterialFace);
6917+ break;
6918+ case GL_COLOR_MATERIAL_PARAMETER:
6919+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ColorMaterialMode);
6920+ break;
6921+ case GL_COLOR_WRITEMASK:
6922+ params[0] = INT_TO_BOOLEAN(ctx->Color.ColorMask[RCOMP] ? 1 : 0);
6923+ params[1] = INT_TO_BOOLEAN(ctx->Color.ColorMask[GCOMP] ? 1 : 0);
6924+ params[2] = INT_TO_BOOLEAN(ctx->Color.ColorMask[BCOMP] ? 1 : 0);
6925+ params[3] = INT_TO_BOOLEAN(ctx->Color.ColorMask[ACOMP] ? 1 : 0);
6926+ break;
6927+ case GL_CULL_FACE:
6928+ params[0] = ctx->Polygon.CullFlag;
6929+ break;
6930+ case GL_CULL_FACE_MODE:
6931+ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.CullFaceMode);
6932+ break;
6933+ case GL_CURRENT_COLOR:
6934+ {
6935+ FLUSH_CURRENT(ctx, 0);
6936+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]);
6937+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]);
6938+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]);
6939+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]);
6940+ }
6941+ break;
6942+ case GL_CURRENT_INDEX:
6943+ {
6944+ FLUSH_CURRENT(ctx, 0);
6945+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]);
6946+ }
6947+ break;
6948+ case GL_CURRENT_NORMAL:
6949+ {
6950+ FLUSH_CURRENT(ctx, 0);
6951+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]);
6952+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]);
6953+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]);
6954+ }
6955+ break;
6956+ case GL_CURRENT_RASTER_COLOR:
6957+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[0]);
6958+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[1]);
6959+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[2]);
6960+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[3]);
6961+ break;
6962+ case GL_CURRENT_RASTER_DISTANCE:
6963+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterDistance);
6964+ break;
6965+ case GL_CURRENT_RASTER_INDEX:
6966+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterIndex);
6967+ break;
6968+ case GL_CURRENT_RASTER_POSITION:
6969+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[0]);
6970+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[1]);
6971+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[2]);
6972+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[3]);
6973+ break;
6974+ case GL_CURRENT_RASTER_SECONDARY_COLOR:
6975+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[0]);
6976+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[1]);
6977+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[2]);
6978+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[3]);
6979+ break;
6980+ case GL_CURRENT_RASTER_TEXTURE_COORDS:
6981+ {
6982+ const GLuint texUnit = ctx->Texture.CurrentUnit;
6983+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][0]);
6984+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][1]);
6985+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][2]);
6986+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][3]);
6987+ }
6988+ break;
6989+ case GL_CURRENT_RASTER_POSITION_VALID:
6990+ params[0] = ctx->Current.RasterPosValid;
6991+ break;
6992+ case GL_CURRENT_TEXTURE_COORDS:
6993+ {
6994+ const GLuint texUnit = ctx->Texture.CurrentUnit;
6995+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]);
6996+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]);
6997+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]);
6998+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]);
6999+ }
7000+ break;
7001+ case GL_DEPTH_BIAS:
7002+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.DepthBias);
7003+ break;
7004+ case GL_DEPTH_BITS:
7005+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.depthBits);
7006+ break;
7007+ case GL_DEPTH_CLEAR_VALUE:
7008+ params[0] = FLOAT_TO_BOOLEAN(ctx->Depth.Clear);
7009+ break;
7010+ case GL_DEPTH_FUNC:
7011+ params[0] = ENUM_TO_BOOLEAN(ctx->Depth.Func);
7012+ break;
7013+ case GL_DEPTH_RANGE:
7014+ params[0] = FLOAT_TO_BOOLEAN(ctx->Viewport.Near);
7015+ params[1] = FLOAT_TO_BOOLEAN(ctx->Viewport.Far);
7016+ break;
7017+ case GL_DEPTH_SCALE:
7018+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.DepthScale);
7019+ break;
7020+ case GL_DEPTH_TEST:
7021+ params[0] = ctx->Depth.Test;
7022+ break;
7023+ case GL_DEPTH_WRITEMASK:
7024+ params[0] = ctx->Depth.Mask;
7025+ break;
7026+ case GL_DITHER:
7027+ params[0] = ctx->Color.DitherFlag;
7028+ break;
7029+ case GL_DOUBLEBUFFER:
7030+ params[0] = ctx->DrawBuffer->Visual.doubleBufferMode;
7031+ break;
7032+ case GL_DRAW_BUFFER:
7033+ params[0] = ENUM_TO_BOOLEAN(ctx->DrawBuffer->ColorDrawBuffer[0]);
7034+ break;
7035+ case GL_EDGE_FLAG:
7036+ {
7037+ FLUSH_CURRENT(ctx, 0);
7038+ params[0] = ctx->Current.EdgeFlag;
7039+ }
7040+ break;
7041+ case GL_FEEDBACK_BUFFER_SIZE:
7042+ params[0] = INT_TO_BOOLEAN(ctx->Feedback.BufferSize);
7043+ break;
7044+ case GL_FEEDBACK_BUFFER_TYPE:
7045+ params[0] = ENUM_TO_BOOLEAN(ctx->Feedback.Type);
7046+ break;
7047+ case GL_FOG:
7048+ params[0] = ctx->Fog.Enabled;
7049+ break;
7050+ case GL_FOG_COLOR:
7051+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[0]);
7052+ params[1] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[1]);
7053+ params[2] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[2]);
7054+ params[3] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[3]);
7055+ break;
7056+ case GL_FOG_DENSITY:
7057+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Density);
7058+ break;
7059+ case GL_FOG_END:
7060+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.End);
7061+ break;
7062+ case GL_FOG_HINT:
7063+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.Fog);
7064+ break;
7065+ case GL_FOG_INDEX:
7066+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Index);
7067+ break;
7068+ case GL_FOG_MODE:
7069+ params[0] = ENUM_TO_BOOLEAN(ctx->Fog.Mode);
7070+ break;
7071+ case GL_FOG_START:
7072+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Start);
7073+ break;
7074+ case GL_FRONT_FACE:
7075+ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.FrontFace);
7076+ break;
7077+ case GL_GREEN_BIAS:
7078+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.GreenBias);
7079+ break;
7080+ case GL_GREEN_BITS:
7081+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.greenBits);
7082+ break;
7083+ case GL_GREEN_SCALE:
7084+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.GreenScale);
7085+ break;
7086+ case GL_INDEX_BITS:
7087+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.indexBits);
7088+ break;
7089+ case GL_INDEX_CLEAR_VALUE:
7090+ params[0] = INT_TO_BOOLEAN(ctx->Color.ClearIndex);
7091+ break;
7092+ case GL_INDEX_MODE:
7093+ params[0] = !ctx->DrawBuffer->Visual.rgbMode;
7094+ break;
7095+ case GL_INDEX_OFFSET:
7096+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.IndexOffset);
7097+ break;
7098+ case GL_INDEX_SHIFT:
7099+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.IndexShift);
7100+ break;
7101+ case GL_INDEX_WRITEMASK:
7102+ params[0] = INT_TO_BOOLEAN(ctx->Color.IndexMask);
7103+ break;
7104+ case GL_LIGHT0:
7105+ params[0] = ctx->Light.Light[0].Enabled;
7106+ break;
7107+ case GL_LIGHT1:
7108+ params[0] = ctx->Light.Light[1].Enabled;
7109+ break;
7110+ case GL_LIGHT2:
7111+ params[0] = ctx->Light.Light[2].Enabled;
7112+ break;
7113+ case GL_LIGHT3:
7114+ params[0] = ctx->Light.Light[3].Enabled;
7115+ break;
7116+ case GL_LIGHT4:
7117+ params[0] = ctx->Light.Light[4].Enabled;
7118+ break;
7119+ case GL_LIGHT5:
7120+ params[0] = ctx->Light.Light[5].Enabled;
7121+ break;
7122+ case GL_LIGHT6:
7123+ params[0] = ctx->Light.Light[6].Enabled;
7124+ break;
7125+ case GL_LIGHT7:
7126+ params[0] = ctx->Light.Light[7].Enabled;
7127+ break;
7128+ case GL_LIGHTING:
7129+ params[0] = ctx->Light.Enabled;
7130+ break;
7131+ case GL_LIGHT_MODEL_AMBIENT:
7132+ params[0] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[0]);
7133+ params[1] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[1]);
7134+ params[2] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[2]);
7135+ params[3] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[3]);
7136+ break;
7137+ case GL_LIGHT_MODEL_COLOR_CONTROL:
7138+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.Model.ColorControl);
7139+ break;
7140+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
7141+ params[0] = ctx->Light.Model.LocalViewer;
7142+ break;
7143+ case GL_LIGHT_MODEL_TWO_SIDE:
7144+ params[0] = ctx->Light.Model.TwoSide;
7145+ break;
7146+ case GL_LINE_SMOOTH:
7147+ params[0] = ctx->Line.SmoothFlag;
7148+ break;
7149+ case GL_LINE_SMOOTH_HINT:
7150+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.LineSmooth);
7151+ break;
7152+ case GL_LINE_STIPPLE:
7153+ params[0] = ctx->Line.StippleFlag;
7154+ break;
7155+ case GL_LINE_STIPPLE_PATTERN:
7156+ params[0] = INT_TO_BOOLEAN(ctx->Line.StipplePattern);
7157+ break;
7158+ case GL_LINE_STIPPLE_REPEAT:
7159+ params[0] = INT_TO_BOOLEAN(ctx->Line.StippleFactor);
7160+ break;
7161+ case GL_LINE_WIDTH:
7162+ params[0] = FLOAT_TO_BOOLEAN(ctx->Line.Width);
7163+ break;
7164+ case GL_LINE_WIDTH_GRANULARITY:
7165+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.LineWidthGranularity);
7166+ break;
7167+ case GL_LINE_WIDTH_RANGE:
7168+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinLineWidthAA);
7169+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxLineWidthAA);
7170+ break;
7171+ case GL_ALIASED_LINE_WIDTH_RANGE:
7172+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinLineWidth);
7173+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxLineWidth);
7174+ break;
7175+ case GL_LIST_BASE:
7176+ params[0] = INT_TO_BOOLEAN(ctx->List.ListBase);
7177+ break;
7178+ case GL_LIST_INDEX:
7179+ params[0] = INT_TO_BOOLEAN(ctx->ListState.CurrentListNum);
7180+ break;
7181+ case GL_LIST_MODE:
7182+ {
7183+ GLenum mode;
7184+ if (!ctx->CompileFlag)
7185+ mode = 0;
7186+ else if (ctx->ExecuteFlag)
7187+ mode = GL_COMPILE_AND_EXECUTE;
7188+ else
7189+ mode = GL_COMPILE;
7190+ params[0] = ENUM_TO_BOOLEAN(mode);
7191+ }
7192+ break;
7193+ case GL_INDEX_LOGIC_OP:
7194+ params[0] = ctx->Color.IndexLogicOpEnabled;
7195+ break;
7196+ case GL_COLOR_LOGIC_OP:
7197+ params[0] = ctx->Color.ColorLogicOpEnabled;
7198+ break;
7199+ case GL_LOGIC_OP_MODE:
7200+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.LogicOp);
7201+ break;
7202+ case GL_MAP1_COLOR_4:
7203+ params[0] = ctx->Eval.Map1Color4;
7204+ break;
7205+ case GL_MAP1_GRID_DOMAIN:
7206+ params[0] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid1u1);
7207+ params[1] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid1u2);
7208+ break;
7209+ case GL_MAP1_GRID_SEGMENTS:
7210+ params[0] = INT_TO_BOOLEAN(ctx->Eval.MapGrid1un);
7211+ break;
7212+ case GL_MAP1_INDEX:
7213+ params[0] = ctx->Eval.Map1Index;
7214+ break;
7215+ case GL_MAP1_NORMAL:
7216+ params[0] = ctx->Eval.Map1Normal;
7217+ break;
7218+ case GL_MAP1_TEXTURE_COORD_1:
7219+ params[0] = ctx->Eval.Map1TextureCoord1;
7220+ break;
7221+ case GL_MAP1_TEXTURE_COORD_2:
7222+ params[0] = ctx->Eval.Map1TextureCoord2;
7223+ break;
7224+ case GL_MAP1_TEXTURE_COORD_3:
7225+ params[0] = ctx->Eval.Map1TextureCoord3;
7226+ break;
7227+ case GL_MAP1_TEXTURE_COORD_4:
7228+ params[0] = ctx->Eval.Map1TextureCoord4;
7229+ break;
7230+ case GL_MAP1_VERTEX_3:
7231+ params[0] = ctx->Eval.Map1Vertex3;
7232+ break;
7233+ case GL_MAP1_VERTEX_4:
7234+ params[0] = ctx->Eval.Map1Vertex4;
7235+ break;
7236+ case GL_MAP2_COLOR_4:
7237+ params[0] = ctx->Eval.Map2Color4;
7238+ break;
7239+ case GL_MAP2_GRID_DOMAIN:
7240+ params[0] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2u1);
7241+ params[1] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2u2);
7242+ params[2] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2v1);
7243+ params[3] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2v2);
7244+ break;
7245+ case GL_MAP2_GRID_SEGMENTS:
7246+ params[0] = INT_TO_BOOLEAN(ctx->Eval.MapGrid2un);
7247+ params[1] = INT_TO_BOOLEAN(ctx->Eval.MapGrid2vn);
7248+ break;
7249+ case GL_MAP2_INDEX:
7250+ params[0] = ctx->Eval.Map2Index;
7251+ break;
7252+ case GL_MAP2_NORMAL:
7253+ params[0] = ctx->Eval.Map2Normal;
7254+ break;
7255+ case GL_MAP2_TEXTURE_COORD_1:
7256+ params[0] = ctx->Eval.Map2TextureCoord1;
7257+ break;
7258+ case GL_MAP2_TEXTURE_COORD_2:
7259+ params[0] = ctx->Eval.Map2TextureCoord2;
7260+ break;
7261+ case GL_MAP2_TEXTURE_COORD_3:
7262+ params[0] = ctx->Eval.Map2TextureCoord3;
7263+ break;
7264+ case GL_MAP2_TEXTURE_COORD_4:
7265+ params[0] = ctx->Eval.Map2TextureCoord4;
7266+ break;
7267+ case GL_MAP2_VERTEX_3:
7268+ params[0] = ctx->Eval.Map2Vertex3;
7269+ break;
7270+ case GL_MAP2_VERTEX_4:
7271+ params[0] = ctx->Eval.Map2Vertex4;
7272+ break;
7273+ case GL_MAP_COLOR:
7274+ params[0] = ctx->Pixel.MapColorFlag;
7275+ break;
7276+ case GL_MAP_STENCIL:
7277+ params[0] = ctx->Pixel.MapStencilFlag;
7278+ break;
7279+ case GL_MATRIX_MODE:
7280+ params[0] = ENUM_TO_BOOLEAN(ctx->Transform.MatrixMode);
7281+ break;
7282+ case GL_MAX_ATTRIB_STACK_DEPTH:
7283+ params[0] = INT_TO_BOOLEAN(MAX_ATTRIB_STACK_DEPTH);
7284+ break;
7285+ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
7286+ params[0] = INT_TO_BOOLEAN(MAX_CLIENT_ATTRIB_STACK_DEPTH);
7287+ break;
7288+ case GL_MAX_CLIP_PLANES:
7289+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxClipPlanes);
7290+ break;
7291+ case GL_MAX_ELEMENTS_VERTICES:
7292+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxArrayLockSize);
7293+ break;
7294+ case GL_MAX_ELEMENTS_INDICES:
7295+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxArrayLockSize);
7296+ break;
7297+ case GL_MAX_EVAL_ORDER:
7298+ params[0] = INT_TO_BOOLEAN(MAX_EVAL_ORDER);
7299+ break;
7300+ case GL_MAX_LIGHTS:
7301+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxLights);
7302+ break;
7303+ case GL_MAX_LIST_NESTING:
7304+ params[0] = INT_TO_BOOLEAN(MAX_LIST_NESTING);
7305+ break;
7306+ case GL_MAX_MODELVIEW_STACK_DEPTH:
7307+ params[0] = INT_TO_BOOLEAN(MAX_MODELVIEW_STACK_DEPTH);
7308+ break;
7309+ case GL_MAX_NAME_STACK_DEPTH:
7310+ params[0] = INT_TO_BOOLEAN(MAX_NAME_STACK_DEPTH);
7311+ break;
7312+ case GL_MAX_PIXEL_MAP_TABLE:
7313+ params[0] = INT_TO_BOOLEAN(MAX_PIXEL_MAP_TABLE);
7314+ break;
7315+ case GL_MAX_PROJECTION_STACK_DEPTH:
7316+ params[0] = INT_TO_BOOLEAN(MAX_PROJECTION_STACK_DEPTH);
7317+ break;
7318+ case GL_MAX_TEXTURE_SIZE:
7319+ params[0] = INT_TO_BOOLEAN(1 << (ctx->Const.MaxTextureLevels - 1));
7320+ break;
7321+ case GL_MAX_3D_TEXTURE_SIZE:
7322+ params[0] = INT_TO_BOOLEAN(1 << (ctx->Const.Max3DTextureLevels - 1));
7323+ break;
7324+ case GL_MAX_TEXTURE_STACK_DEPTH:
7325+ params[0] = INT_TO_BOOLEAN(MAX_TEXTURE_STACK_DEPTH);
7326+ break;
7327+ case GL_MAX_VIEWPORT_DIMS:
7328+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxViewportWidth);
7329+ params[1] = INT_TO_BOOLEAN(ctx->Const.MaxViewportHeight);
7330+ break;
7331+ case GL_MODELVIEW_MATRIX:
7332+ {
7333+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
7334+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7335+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
7336+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
7337+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
7338+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
7339+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7340+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
7341+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
7342+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
7343+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
7344+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7345+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
7346+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
7347+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
7348+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
7349+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7350+ }
7351+ break;
7352+ case GL_MODELVIEW_STACK_DEPTH:
7353+ params[0] = INT_TO_BOOLEAN(ctx->ModelviewMatrixStack.Depth + 1);
7354+ break;
7355+ case GL_NAME_STACK_DEPTH:
7356+ params[0] = INT_TO_BOOLEAN(ctx->Select.NameStackDepth);
7357+ break;
7358+ case GL_NORMALIZE:
7359+ params[0] = ctx->Transform.Normalize;
7360+ break;
7361+ case GL_PACK_ALIGNMENT:
7362+ params[0] = INT_TO_BOOLEAN(ctx->Pack.Alignment);
7363+ break;
7364+ case GL_PACK_LSB_FIRST:
7365+ params[0] = ctx->Pack.LsbFirst;
7366+ break;
7367+ case GL_PACK_ROW_LENGTH:
7368+ params[0] = INT_TO_BOOLEAN(ctx->Pack.RowLength);
7369+ break;
7370+ case GL_PACK_SKIP_PIXELS:
7371+ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipPixels);
7372+ break;
7373+ case GL_PACK_SKIP_ROWS:
7374+ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipRows);
7375+ break;
7376+ case GL_PACK_SWAP_BYTES:
7377+ params[0] = ctx->Pack.SwapBytes;
7378+ break;
7379+ case GL_PACK_SKIP_IMAGES_EXT:
7380+ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipImages);
7381+ break;
7382+ case GL_PACK_IMAGE_HEIGHT_EXT:
7383+ params[0] = INT_TO_BOOLEAN(ctx->Pack.ImageHeight);
7384+ break;
7385+ case GL_PACK_INVERT_MESA:
7386+ params[0] = ctx->Pack.Invert;
7387+ break;
7388+ case GL_PERSPECTIVE_CORRECTION_HINT:
7389+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PerspectiveCorrection);
7390+ break;
7391+ case GL_PIXEL_MAP_A_TO_A_SIZE:
7392+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapAtoAsize);
7393+ break;
7394+ case GL_PIXEL_MAP_B_TO_B_SIZE:
7395+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapBtoBsize);
7396+ break;
7397+ case GL_PIXEL_MAP_G_TO_G_SIZE:
7398+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapGtoGsize);
7399+ break;
7400+ case GL_PIXEL_MAP_I_TO_A_SIZE:
7401+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoAsize);
7402+ break;
7403+ case GL_PIXEL_MAP_I_TO_B_SIZE:
7404+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoBsize);
7405+ break;
7406+ case GL_PIXEL_MAP_I_TO_G_SIZE:
7407+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoGsize);
7408+ break;
7409+ case GL_PIXEL_MAP_I_TO_I_SIZE:
7410+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoIsize);
7411+ break;
7412+ case GL_PIXEL_MAP_I_TO_R_SIZE:
7413+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoRsize);
7414+ break;
7415+ case GL_PIXEL_MAP_R_TO_R_SIZE:
7416+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapRtoRsize);
7417+ break;
7418+ case GL_PIXEL_MAP_S_TO_S_SIZE:
7419+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapStoSsize);
7420+ break;
7421+ case GL_POINT_SIZE:
7422+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Size);
7423+ break;
7424+ case GL_POINT_SIZE_GRANULARITY:
7425+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.PointSizeGranularity);
7426+ break;
7427+ case GL_POINT_SIZE_RANGE:
7428+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinPointSizeAA);
7429+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxPointSizeAA);
7430+ break;
7431+ case GL_ALIASED_POINT_SIZE_RANGE:
7432+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinPointSize);
7433+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxPointSize);
7434+ break;
7435+ case GL_POINT_SMOOTH:
7436+ params[0] = ctx->Point.SmoothFlag;
7437+ break;
7438+ case GL_POINT_SMOOTH_HINT:
7439+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PointSmooth);
7440+ break;
7441+ case GL_POINT_SIZE_MIN_EXT:
7442+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.MinSize);
7443+ break;
7444+ case GL_POINT_SIZE_MAX_EXT:
7445+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.MaxSize);
7446+ break;
7447+ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
7448+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Threshold);
7449+ break;
7450+ case GL_DISTANCE_ATTENUATION_EXT:
7451+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Params[0]);
7452+ params[1] = FLOAT_TO_BOOLEAN(ctx->Point.Params[1]);
7453+ params[2] = FLOAT_TO_BOOLEAN(ctx->Point.Params[2]);
7454+ break;
7455+ case GL_POLYGON_MODE:
7456+ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.FrontMode);
7457+ params[1] = ENUM_TO_BOOLEAN(ctx->Polygon.BackMode);
7458+ break;
7459+ case GL_POLYGON_OFFSET_BIAS_EXT:
7460+ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetUnits);
7461+ break;
7462+ case GL_POLYGON_OFFSET_FACTOR:
7463+ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetFactor );
7464+ break;
7465+ case GL_POLYGON_OFFSET_UNITS:
7466+ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetUnits );
7467+ break;
7468+ case GL_POLYGON_SMOOTH:
7469+ params[0] = ctx->Polygon.SmoothFlag;
7470+ break;
7471+ case GL_POLYGON_SMOOTH_HINT:
7472+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PolygonSmooth);
7473+ break;
7474+ case GL_POLYGON_STIPPLE:
7475+ params[0] = ctx->Polygon.StippleFlag;
7476+ break;
7477+ case GL_PROJECTION_MATRIX:
7478+ {
7479+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
7480+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7481+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
7482+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
7483+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
7484+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
7485+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7486+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
7487+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
7488+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
7489+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
7490+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7491+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
7492+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
7493+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
7494+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
7495+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7496+ }
7497+ break;
7498+ case GL_PROJECTION_STACK_DEPTH:
7499+ params[0] = INT_TO_BOOLEAN(ctx->ProjectionMatrixStack.Depth + 1);
7500+ break;
7501+ case GL_READ_BUFFER:
7502+ params[0] = ENUM_TO_BOOLEAN(ctx->ReadBuffer->ColorReadBuffer);
7503+ break;
7504+ case GL_RED_BIAS:
7505+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.RedBias);
7506+ break;
7507+ case GL_RED_BITS:
7508+ params[0] = INT_TO_BOOLEAN( ctx->DrawBuffer->Visual.redBits );
7509+ break;
7510+ case GL_RED_SCALE:
7511+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.RedScale);
7512+ break;
7513+ case GL_RENDER_MODE:
7514+ params[0] = ENUM_TO_BOOLEAN(ctx->RenderMode);
7515+ break;
7516+ case GL_RESCALE_NORMAL:
7517+ params[0] = ctx->Transform.RescaleNormals;
7518+ break;
7519+ case GL_RGBA_MODE:
7520+ params[0] = ctx->DrawBuffer->Visual.rgbMode;
7521+ break;
7522+ case GL_SCISSOR_BOX:
7523+ params[0] = INT_TO_BOOLEAN(ctx->Scissor.X);
7524+ params[1] = INT_TO_BOOLEAN(ctx->Scissor.Y);
7525+ params[2] = INT_TO_BOOLEAN(ctx->Scissor.Width);
7526+ params[3] = INT_TO_BOOLEAN(ctx->Scissor.Height);
7527+ break;
7528+ case GL_SCISSOR_TEST:
7529+ params[0] = ctx->Scissor.Enabled;
7530+ break;
7531+ case GL_SELECTION_BUFFER_SIZE:
7532+ params[0] = INT_TO_BOOLEAN(ctx->Select.BufferSize);
7533+ break;
7534+ case GL_SHADE_MODEL:
7535+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ShadeModel);
7536+ break;
7537+ case GL_SHARED_TEXTURE_PALETTE_EXT:
7538+ params[0] = ctx->Texture.SharedPalette;
7539+ break;
7540+ case GL_STENCIL_BITS:
7541+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.stencilBits);
7542+ break;
7543+ case GL_STENCIL_CLEAR_VALUE:
7544+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Clear);
7545+ break;
7546+ case GL_STENCIL_FAIL:
7547+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
7548+ break;
7549+ case GL_STENCIL_FUNC:
7550+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
7551+ break;
7552+ case GL_STENCIL_PASS_DEPTH_FAIL:
7553+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
7554+ break;
7555+ case GL_STENCIL_PASS_DEPTH_PASS:
7556+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
7557+ break;
7558+ case GL_STENCIL_REF:
7559+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Ref[ctx->Stencil.ActiveFace]);
7560+ break;
7561+ case GL_STENCIL_TEST:
7562+ params[0] = ctx->Stencil.Enabled;
7563+ break;
7564+ case GL_STENCIL_VALUE_MASK:
7565+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]);
7566+ break;
7567+ case GL_STENCIL_WRITEMASK:
7568+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]);
7569+ break;
7570+ case GL_STEREO:
7571+ params[0] = ctx->DrawBuffer->Visual.stereoMode;
7572+ break;
7573+ case GL_SUBPIXEL_BITS:
7574+ params[0] = INT_TO_BOOLEAN(ctx->Const.SubPixelBits);
7575+ break;
7576+ case GL_TEXTURE_1D:
7577+ params[0] = _mesa_IsEnabled(GL_TEXTURE_1D);
7578+ break;
7579+ case GL_TEXTURE_2D:
7580+ params[0] = _mesa_IsEnabled(GL_TEXTURE_2D);
7581+ break;
7582+ case GL_TEXTURE_3D:
7583+ params[0] = _mesa_IsEnabled(GL_TEXTURE_3D);
7584+ break;
7585+ case GL_TEXTURE_BINDING_1D:
7586+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name);
7587+ break;
7588+ case GL_TEXTURE_BINDING_2D:
7589+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name);
7590+ break;
7591+ case GL_TEXTURE_BINDING_3D:
7592+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name);
7593+ break;
7594+ case GL_TEXTURE_ENV_COLOR:
7595+ {
7596+ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
7597+ params[0] = FLOAT_TO_BOOLEAN(color[0]);
7598+ params[1] = FLOAT_TO_BOOLEAN(color[1]);
7599+ params[2] = FLOAT_TO_BOOLEAN(color[2]);
7600+ params[3] = FLOAT_TO_BOOLEAN(color[3]);
7601+ }
7602+ break;
7603+ case GL_TEXTURE_ENV_MODE:
7604+ params[0] = ENUM_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
7605+ break;
7606+ case GL_TEXTURE_GEN_S:
7607+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0);
7608+ break;
7609+ case GL_TEXTURE_GEN_T:
7610+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0);
7611+ break;
7612+ case GL_TEXTURE_GEN_R:
7613+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0);
7614+ break;
7615+ case GL_TEXTURE_GEN_Q:
7616+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0);
7617+ break;
7618+ case GL_TEXTURE_MATRIX:
7619+ {
7620+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
7621+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7622+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
7623+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
7624+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
7625+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
7626+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7627+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
7628+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
7629+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
7630+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
7631+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7632+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
7633+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
7634+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
7635+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
7636+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7637+ }
7638+ break;
7639+ case GL_TEXTURE_STACK_DEPTH:
7640+ params[0] = INT_TO_BOOLEAN(ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1);
7641+ break;
7642+ case GL_UNPACK_ALIGNMENT:
7643+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.Alignment);
7644+ break;
7645+ case GL_UNPACK_LSB_FIRST:
7646+ params[0] = ctx->Unpack.LsbFirst;
7647+ break;
7648+ case GL_UNPACK_ROW_LENGTH:
7649+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.RowLength);
7650+ break;
7651+ case GL_UNPACK_SKIP_PIXELS:
7652+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipPixels);
7653+ break;
7654+ case GL_UNPACK_SKIP_ROWS:
7655+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipRows);
7656+ break;
7657+ case GL_UNPACK_SWAP_BYTES:
7658+ params[0] = ctx->Unpack.SwapBytes;
7659+ break;
7660+ case GL_UNPACK_SKIP_IMAGES_EXT:
7661+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipImages);
7662+ break;
7663+ case GL_UNPACK_IMAGE_HEIGHT_EXT:
7664+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.ImageHeight);
7665+ break;
7666+ case GL_UNPACK_CLIENT_STORAGE_APPLE:
7667+ params[0] = ctx->Unpack.ClientStorage;
7668+ break;
7669+ case GL_VIEWPORT:
7670+ params[0] = INT_TO_BOOLEAN(ctx->Viewport.X);
7671+ params[1] = INT_TO_BOOLEAN(ctx->Viewport.Y);
7672+ params[2] = INT_TO_BOOLEAN(ctx->Viewport.Width);
7673+ params[3] = INT_TO_BOOLEAN(ctx->Viewport.Height);
7674+ break;
7675+ case GL_ZOOM_X:
7676+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.ZoomX);
7677+ break;
7678+ case GL_ZOOM_Y:
7679+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.ZoomY);
7680+ break;
7681+ case GL_VERTEX_ARRAY:
7682+ params[0] = ctx->Array.ArrayObj->Vertex.Enabled;
7683+ break;
7684+ case GL_VERTEX_ARRAY_SIZE:
7685+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Size);
7686+ break;
7687+ case GL_VERTEX_ARRAY_TYPE:
7688+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Type);
7689+ break;
7690+ case GL_VERTEX_ARRAY_STRIDE:
7691+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Stride);
7692+ break;
7693+ case GL_VERTEX_ARRAY_COUNT_EXT:
7694+ params[0] = INT_TO_BOOLEAN(0);
7695+ break;
7696+ case GL_NORMAL_ARRAY:
7697+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Enabled);
7698+ break;
7699+ case GL_NORMAL_ARRAY_TYPE:
7700+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Type);
7701+ break;
7702+ case GL_NORMAL_ARRAY_STRIDE:
7703+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Stride);
7704+ break;
7705+ case GL_NORMAL_ARRAY_COUNT_EXT:
7706+ params[0] = INT_TO_BOOLEAN(0);
7707+ break;
7708+ case GL_COLOR_ARRAY:
7709+ params[0] = ctx->Array.ArrayObj->Color.Enabled;
7710+ break;
7711+ case GL_COLOR_ARRAY_SIZE:
7712+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Size);
7713+ break;
7714+ case GL_COLOR_ARRAY_TYPE:
7715+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Type);
7716+ break;
7717+ case GL_COLOR_ARRAY_STRIDE:
7718+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Stride);
7719+ break;
7720+ case GL_COLOR_ARRAY_COUNT_EXT:
7721+ params[0] = INT_TO_BOOLEAN(0);
7722+ break;
7723+ case GL_INDEX_ARRAY:
7724+ params[0] = ctx->Array.ArrayObj->Index.Enabled;
7725+ break;
7726+ case GL_INDEX_ARRAY_TYPE:
7727+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Index.Type);
7728+ break;
7729+ case GL_INDEX_ARRAY_STRIDE:
7730+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Index.Stride);
7731+ break;
7732+ case GL_INDEX_ARRAY_COUNT_EXT:
7733+ params[0] = INT_TO_BOOLEAN(0);
7734+ break;
7735+ case GL_TEXTURE_COORD_ARRAY:
7736+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled;
7737+ break;
7738+ case GL_TEXTURE_COORD_ARRAY_SIZE:
7739+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
7740+ break;
7741+ case GL_TEXTURE_COORD_ARRAY_TYPE:
7742+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
7743+ break;
7744+ case GL_TEXTURE_COORD_ARRAY_STRIDE:
7745+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
7746+ break;
7747+ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
7748+ params[0] = INT_TO_BOOLEAN(0);
7749+ break;
7750+ case GL_EDGE_FLAG_ARRAY:
7751+ params[0] = ctx->Array.ArrayObj->EdgeFlag.Enabled;
7752+ break;
7753+ case GL_EDGE_FLAG_ARRAY_STRIDE:
7754+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->EdgeFlag.Stride);
7755+ break;
7756+ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
7757+ params[0] = INT_TO_BOOLEAN(0);
7758+ break;
7759+ case GL_MAX_TEXTURE_UNITS_ARB:
7760+ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
7761+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureUnits);
7762+ break;
7763+ case GL_ACTIVE_TEXTURE_ARB:
7764+ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
7765+ params[0] = INT_TO_BOOLEAN(GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit);
7766+ break;
7767+ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
7768+ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
7769+ params[0] = INT_TO_BOOLEAN(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
7770+ break;
7771+ case GL_TEXTURE_CUBE_MAP_ARB:
7772+ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
7773+ params[0] = _mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB);
7774+ break;
7775+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
7776+ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
7777+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name);
7778+ break;
7779+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
7780+ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
7781+ params[0] = INT_TO_BOOLEAN((1 << (ctx->Const.MaxCubeTextureLevels - 1)));
7782+ break;
7783+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
7784+ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
7785+ params[0] = INT_TO_BOOLEAN(ctx->Hint.TextureCompression);
7786+ break;
7787+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
7788+ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
7789+ params[0] = INT_TO_BOOLEAN(_mesa_get_compressed_formats(ctx, NULL, GL_FALSE));
7790+ break;
7791+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
7792+ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
7793+ {
7794+ GLint formats[100];
7795+ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
7796+ ASSERT(n <= 100);
7797+ for (i = 0; i < n; i++)
7798+ params[i] = ENUM_TO_INT(formats[i]);
7799+ }
7800+ break;
7801+ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
7802+ CHECK_EXT1(EXT_compiled_vertex_array, "GetBooleanv");
7803+ params[0] = INT_TO_BOOLEAN(ctx->Array.LockFirst);
7804+ break;
7805+ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
7806+ CHECK_EXT1(EXT_compiled_vertex_array, "GetBooleanv");
7807+ params[0] = INT_TO_BOOLEAN(ctx->Array.LockCount);
7808+ break;
7809+ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
7810+ {
7811+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
7812+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7813+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
7814+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
7815+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
7816+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
7817+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7818+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
7819+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
7820+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
7821+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
7822+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7823+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
7824+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
7825+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
7826+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
7827+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7828+ }
7829+ break;
7830+ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
7831+ {
7832+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
7833+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7834+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
7835+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
7836+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
7837+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
7838+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7839+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
7840+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
7841+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
7842+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
7843+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7844+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
7845+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
7846+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
7847+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
7848+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7849+ }
7850+ break;
7851+ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
7852+ {
7853+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
7854+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7855+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
7856+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
7857+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
7858+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
7859+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7860+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
7861+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
7862+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
7863+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
7864+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7865+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
7866+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
7867+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
7868+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
7869+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7870+ }
7871+ break;
7872+ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
7873+ {
7874+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
7875+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7876+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
7877+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
7878+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
7879+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
7880+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7881+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
7882+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
7883+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
7884+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
7885+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7886+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
7887+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
7888+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
7889+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
7890+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7891+ }
7892+ break;
7893+ case GL_COLOR_MATRIX_SGI:
7894+ {
7895+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
7896+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7897+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
7898+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
7899+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
7900+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
7901+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7902+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
7903+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
7904+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
7905+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
7906+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7907+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
7908+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
7909+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
7910+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
7911+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7912+ }
7913+ break;
7914+ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
7915+ params[0] = INT_TO_BOOLEAN(ctx->ColorMatrixStack.Depth + 1);
7916+ break;
7917+ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
7918+ params[0] = INT_TO_BOOLEAN(MAX_COLOR_STACK_DEPTH);
7919+ break;
7920+ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
7921+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[0]);
7922+ break;
7923+ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
7924+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[1]);
7925+ break;
7926+ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
7927+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[2]);
7928+ break;
7929+ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
7930+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[3]);
7931+ break;
7932+ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
7933+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[0]);
7934+ break;
7935+ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
7936+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[1]);
7937+ break;
7938+ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
7939+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[2]);
7940+ break;
7941+ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
7942+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[3]);
7943+ break;
7944+ case GL_CONVOLUTION_1D_EXT:
7945+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
7946+ params[0] = ctx->Pixel.Convolution1DEnabled;
7947+ break;
7948+ case GL_CONVOLUTION_2D_EXT:
7949+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
7950+ params[0] = ctx->Pixel.Convolution2DEnabled;
7951+ break;
7952+ case GL_SEPARABLE_2D_EXT:
7953+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
7954+ params[0] = ctx->Pixel.Separable2DEnabled;
7955+ break;
7956+ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
7957+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
7958+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[0]);
7959+ break;
7960+ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
7961+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
7962+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[1]);
7963+ break;
7964+ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
7965+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
7966+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[2]);
7967+ break;
7968+ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
7969+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
7970+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[3]);
7971+ break;
7972+ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
7973+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
7974+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[0]);
7975+ break;
7976+ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
7977+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
7978+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[1]);
7979+ break;
7980+ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
7981+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
7982+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[2]);
7983+ break;
7984+ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
7985+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
7986+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[3]);
7987+ break;
7988+ case GL_HISTOGRAM:
7989+ CHECK_EXT1(EXT_histogram, "GetBooleanv");
7990+ params[0] = ctx->Pixel.HistogramEnabled;
7991+ break;
7992+ case GL_MINMAX:
7993+ CHECK_EXT1(EXT_histogram, "GetBooleanv");
7994+ params[0] = ctx->Pixel.MinMaxEnabled;
7995+ break;
7996+ case GL_COLOR_TABLE_SGI:
7997+ CHECK_EXT1(SGI_color_table, "GetBooleanv");
7998+ params[0] = ctx->Pixel.ColorTableEnabled;
7999+ break;
8000+ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
8001+ CHECK_EXT1(SGI_color_table, "GetBooleanv");
8002+ params[0] = ctx->Pixel.PostConvolutionColorTableEnabled;
8003+ break;
8004+ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
8005+ CHECK_EXT1(SGI_color_table, "GetBooleanv");
8006+ params[0] = ctx->Pixel.PostColorMatrixColorTableEnabled;
8007+ break;
8008+ case GL_TEXTURE_COLOR_TABLE_SGI:
8009+ CHECK_EXT1(SGI_texture_color_table, "GetBooleanv");
8010+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled;
8011+ break;
8012+ case GL_COLOR_SUM_EXT:
8013+ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetBooleanv");
8014+ params[0] = ctx->Fog.ColorSumEnabled;
8015+ break;
8016+ case GL_CURRENT_SECONDARY_COLOR_EXT:
8017+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8018+ {
8019+ FLUSH_CURRENT(ctx, 0);
8020+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]);
8021+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]);
8022+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]);
8023+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]);
8024+ }
8025+ break;
8026+ case GL_SECONDARY_COLOR_ARRAY_EXT:
8027+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8028+ params[0] = ctx->Array.ArrayObj->SecondaryColor.Enabled;
8029+ break;
8030+ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
8031+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8032+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Type);
8033+ break;
8034+ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
8035+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8036+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Stride);
8037+ break;
8038+ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
8039+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8040+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Size);
8041+ break;
8042+ case GL_CURRENT_FOG_COORDINATE_EXT:
8043+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8044+ {
8045+ FLUSH_CURRENT(ctx, 0);
8046+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_FOG][0]);
8047+ }
8048+ break;
8049+ case GL_FOG_COORDINATE_ARRAY_EXT:
8050+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8051+ params[0] = ctx->Array.ArrayObj->FogCoord.Enabled;
8052+ break;
8053+ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
8054+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8055+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.Type);
8056+ break;
8057+ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
8058+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8059+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.Stride);
8060+ break;
8061+ case GL_FOG_COORDINATE_SOURCE_EXT:
8062+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8063+ params[0] = ENUM_TO_BOOLEAN(ctx->Fog.FogCoordinateSource);
8064+ break;
8065+ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
8066+ CHECK_EXT1(EXT_texture_lod_bias, "GetBooleanv");
8067+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxTextureLodBias);
8068+ break;
8069+ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
8070+ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetBooleanv");
8071+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxTextureMaxAnisotropy);
8072+ break;
8073+ case GL_MULTISAMPLE_ARB:
8074+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8075+ params[0] = ctx->Multisample.Enabled;
8076+ break;
8077+ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
8078+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8079+ params[0] = ctx->Multisample.SampleAlphaToCoverage;
8080+ break;
8081+ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
8082+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8083+ params[0] = ctx->Multisample.SampleAlphaToOne;
8084+ break;
8085+ case GL_SAMPLE_COVERAGE_ARB:
8086+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8087+ params[0] = ctx->Multisample.SampleCoverage;
8088+ break;
8089+ case GL_SAMPLE_COVERAGE_VALUE_ARB:
8090+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8091+ params[0] = FLOAT_TO_BOOLEAN(ctx->Multisample.SampleCoverageValue);
8092+ break;
8093+ case GL_SAMPLE_COVERAGE_INVERT_ARB:
8094+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8095+ params[0] = ctx->Multisample.SampleCoverageInvert;
8096+ break;
8097+ case GL_SAMPLE_BUFFERS_ARB:
8098+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8099+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.sampleBuffers);
8100+ break;
8101+ case GL_SAMPLES_ARB:
8102+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8103+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.samples);
8104+ break;
8105+ case GL_RASTER_POSITION_UNCLIPPED_IBM:
8106+ CHECK_EXT1(IBM_rasterpos_clip, "GetBooleanv");
8107+ params[0] = ctx->Transform.RasterPositionUnclipped;
8108+ break;
8109+ case GL_POINT_SPRITE_NV:
8110+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetBooleanv");
8111+ params[0] = ctx->Point.PointSprite;
8112+ break;
8113+ case GL_POINT_SPRITE_R_MODE_NV:
8114+ CHECK_EXT1(NV_point_sprite, "GetBooleanv");
8115+ params[0] = ENUM_TO_BOOLEAN(ctx->Point.SpriteRMode);
8116+ break;
8117+ case GL_POINT_SPRITE_COORD_ORIGIN:
8118+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetBooleanv");
8119+ params[0] = ENUM_TO_BOOLEAN(ctx->Point.SpriteOrigin);
8120+ break;
8121+ case GL_GENERATE_MIPMAP_HINT_SGIS:
8122+ CHECK_EXT1(SGIS_generate_mipmap, "GetBooleanv");
8123+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.GenerateMipmap);
8124+ break;
8125+ case GL_VERTEX_PROGRAM_BINDING_NV:
8126+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8127+ params[0] = INT_TO_BOOLEAN((ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0));
8128+ break;
8129+ case GL_VERTEX_ATTRIB_ARRAY0_NV:
8130+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8131+ params[0] = ctx->Array.ArrayObj->VertexAttrib[0].Enabled;
8132+ break;
8133+ case GL_VERTEX_ATTRIB_ARRAY1_NV:
8134+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8135+ params[0] = ctx->Array.ArrayObj->VertexAttrib[1].Enabled;
8136+ break;
8137+ case GL_VERTEX_ATTRIB_ARRAY2_NV:
8138+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8139+ params[0] = ctx->Array.ArrayObj->VertexAttrib[2].Enabled;
8140+ break;
8141+ case GL_VERTEX_ATTRIB_ARRAY3_NV:
8142+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8143+ params[0] = ctx->Array.ArrayObj->VertexAttrib[3].Enabled;
8144+ break;
8145+ case GL_VERTEX_ATTRIB_ARRAY4_NV:
8146+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8147+ params[0] = ctx->Array.ArrayObj->VertexAttrib[4].Enabled;
8148+ break;
8149+ case GL_VERTEX_ATTRIB_ARRAY5_NV:
8150+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8151+ params[0] = ctx->Array.ArrayObj->VertexAttrib[5].Enabled;
8152+ break;
8153+ case GL_VERTEX_ATTRIB_ARRAY6_NV:
8154+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8155+ params[0] = ctx->Array.ArrayObj->VertexAttrib[6].Enabled;
8156+ break;
8157+ case GL_VERTEX_ATTRIB_ARRAY7_NV:
8158+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8159+ params[0] = ctx->Array.ArrayObj->VertexAttrib[7].Enabled;
8160+ break;
8161+ case GL_VERTEX_ATTRIB_ARRAY8_NV:
8162+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8163+ params[0] = ctx->Array.ArrayObj->VertexAttrib[8].Enabled;
8164+ break;
8165+ case GL_VERTEX_ATTRIB_ARRAY9_NV:
8166+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8167+ params[0] = ctx->Array.ArrayObj->VertexAttrib[9].Enabled;
8168+ break;
8169+ case GL_VERTEX_ATTRIB_ARRAY10_NV:
8170+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8171+ params[0] = ctx->Array.ArrayObj->VertexAttrib[10].Enabled;
8172+ break;
8173+ case GL_VERTEX_ATTRIB_ARRAY11_NV:
8174+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8175+ params[0] = ctx->Array.ArrayObj->VertexAttrib[11].Enabled;
8176+ break;
8177+ case GL_VERTEX_ATTRIB_ARRAY12_NV:
8178+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8179+ params[0] = ctx->Array.ArrayObj->VertexAttrib[12].Enabled;
8180+ break;
8181+ case GL_VERTEX_ATTRIB_ARRAY13_NV:
8182+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8183+ params[0] = ctx->Array.ArrayObj->VertexAttrib[13].Enabled;
8184+ break;
8185+ case GL_VERTEX_ATTRIB_ARRAY14_NV:
8186+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8187+ params[0] = ctx->Array.ArrayObj->VertexAttrib[14].Enabled;
8188+ break;
8189+ case GL_VERTEX_ATTRIB_ARRAY15_NV:
8190+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8191+ params[0] = ctx->Array.ArrayObj->VertexAttrib[15].Enabled;
8192+ break;
8193+ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
8194+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8195+ params[0] = ctx->Eval.Map1Attrib[0];
8196+ break;
8197+ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
8198+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8199+ params[0] = ctx->Eval.Map1Attrib[1];
8200+ break;
8201+ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
8202+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8203+ params[0] = ctx->Eval.Map1Attrib[2];
8204+ break;
8205+ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
8206+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8207+ params[0] = ctx->Eval.Map1Attrib[3];
8208+ break;
8209+ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
8210+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8211+ params[0] = ctx->Eval.Map1Attrib[4];
8212+ break;
8213+ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
8214+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8215+ params[0] = ctx->Eval.Map1Attrib[5];
8216+ break;
8217+ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
8218+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8219+ params[0] = ctx->Eval.Map1Attrib[6];
8220+ break;
8221+ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
8222+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8223+ params[0] = ctx->Eval.Map1Attrib[7];
8224+ break;
8225+ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
8226+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8227+ params[0] = ctx->Eval.Map1Attrib[8];
8228+ break;
8229+ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
8230+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8231+ params[0] = ctx->Eval.Map1Attrib[9];
8232+ break;
8233+ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
8234+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8235+ params[0] = ctx->Eval.Map1Attrib[10];
8236+ break;
8237+ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
8238+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8239+ params[0] = ctx->Eval.Map1Attrib[11];
8240+ break;
8241+ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
8242+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8243+ params[0] = ctx->Eval.Map1Attrib[12];
8244+ break;
8245+ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
8246+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8247+ params[0] = ctx->Eval.Map1Attrib[13];
8248+ break;
8249+ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
8250+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8251+ params[0] = ctx->Eval.Map1Attrib[14];
8252+ break;
8253+ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
8254+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8255+ params[0] = ctx->Eval.Map1Attrib[15];
8256+ break;
8257+ case GL_FRAGMENT_PROGRAM_NV:
8258+ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
8259+ params[0] = ctx->FragmentProgram.Enabled;
8260+ break;
8261+ case GL_FRAGMENT_PROGRAM_BINDING_NV:
8262+ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
8263+ params[0] = INT_TO_BOOLEAN(ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0);
8264+ break;
8265+ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
8266+ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
8267+ params[0] = INT_TO_BOOLEAN(MAX_NV_FRAGMENT_PROGRAM_PARAMS);
8268+ break;
8269+ case GL_TEXTURE_RECTANGLE_NV:
8270+ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
8271+ params[0] = _mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV);
8272+ break;
8273+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
8274+ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
8275+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name);
8276+ break;
8277+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
8278+ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
8279+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureRectSize);
8280+ break;
8281+ case GL_STENCIL_TEST_TWO_SIDE_EXT:
8282+ CHECK_EXT1(EXT_stencil_two_side, "GetBooleanv");
8283+ params[0] = ctx->Stencil.TestTwoSide;
8284+ break;
8285+ case GL_ACTIVE_STENCIL_FACE_EXT:
8286+ CHECK_EXT1(EXT_stencil_two_side, "GetBooleanv");
8287+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
8288+ break;
8289+ case GL_MAX_SHININESS_NV:
8290+ CHECK_EXT1(NV_light_max_exponent, "GetBooleanv");
8291+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxShininess);
8292+ break;
8293+ case GL_MAX_SPOT_EXPONENT_NV:
8294+ CHECK_EXT1(NV_light_max_exponent, "GetBooleanv");
8295+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxSpotExponent);
8296+ break;
8297+ case GL_ARRAY_BUFFER_BINDING_ARB:
8298+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8299+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayBufferObj->Name);
8300+ break;
8301+ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
8302+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8303+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
8304+ break;
8305+ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
8306+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8307+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.BufferObj->Name);
8308+ break;
8309+ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
8310+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8311+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.BufferObj->Name);
8312+ break;
8313+ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
8314+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8315+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Index.BufferObj->Name);
8316+ break;
8317+ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
8318+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8319+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
8320+ break;
8321+ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
8322+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8323+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
8324+ break;
8325+ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
8326+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8327+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
8328+ break;
8329+ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
8330+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8331+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
8332+ break;
8333+ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
8334+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8335+ params[0] = INT_TO_BOOLEAN(ctx->Array.ElementArrayBufferObj->Name);
8336+ break;
8337+ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
8338+ CHECK_EXT1(EXT_pixel_buffer_object, "GetBooleanv");
8339+ params[0] = INT_TO_BOOLEAN(ctx->Pack.BufferObj->Name);
8340+ break;
8341+ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
8342+ CHECK_EXT1(EXT_pixel_buffer_object, "GetBooleanv");
8343+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.BufferObj->Name);
8344+ break;
8345+ case GL_VERTEX_PROGRAM_ARB:
8346+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
8347+ params[0] = ctx->VertexProgram.Enabled;
8348+ break;
8349+ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
8350+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
8351+ params[0] = ctx->VertexProgram.PointSizeEnabled;
8352+ break;
8353+ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
8354+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
8355+ params[0] = ctx->VertexProgram.TwoSideEnabled;
8356+ break;
8357+ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
8358+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
8359+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxProgramMatrixStackDepth);
8360+ break;
8361+ case GL_MAX_PROGRAM_MATRICES_ARB:
8362+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
8363+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxProgramMatrices);
8364+ break;
8365+ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
8366+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
8367+ params[0] = ctx->CurrentStack->Depth + 1;
8368+ break;
8369+ case GL_CURRENT_MATRIX_ARB:
8370+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetBooleanv");
8371+ {
8372+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
8373+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8374+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
8375+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
8376+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
8377+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
8378+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8379+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
8380+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
8381+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
8382+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
8383+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8384+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
8385+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
8386+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
8387+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
8388+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8389+ }
8390+ break;
8391+ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
8392+ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetBooleanv");
8393+ {
8394+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
8395+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8396+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8397+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8398+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8399+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8400+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8401+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8402+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8403+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8404+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8405+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8406+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8407+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8408+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8409+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8410+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8411+ }
8412+ break;
8413+ case GL_MAX_VERTEX_ATTRIBS_ARB:
8414+ CHECK_EXT1(ARB_vertex_program, "GetBooleanv");
8415+ params[0] = INT_TO_BOOLEAN(ctx->Const.VertexProgram.MaxAttribs);
8416+ break;
8417+ case GL_PROGRAM_ERROR_POSITION_ARB:
8418+ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetBooleanv");
8419+ params[0] = INT_TO_BOOLEAN(ctx->Program.ErrorPos);
8420+ break;
8421+ case GL_FRAGMENT_PROGRAM_ARB:
8422+ CHECK_EXT1(ARB_fragment_program, "GetBooleanv");
8423+ params[0] = ctx->FragmentProgram.Enabled;
8424+ break;
8425+ case GL_MAX_TEXTURE_COORDS_ARB:
8426+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetBooleanv");
8427+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureCoordUnits);
8428+ break;
8429+ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
8430+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetBooleanv");
8431+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureImageUnits);
8432+ break;
8433+ case GL_DEPTH_BOUNDS_TEST_EXT:
8434+ CHECK_EXT1(EXT_depth_bounds_test, "GetBooleanv");
8435+ params[0] = ctx->Depth.BoundsTest;
8436+ break;
8437+ case GL_DEPTH_BOUNDS_EXT:
8438+ CHECK_EXT1(EXT_depth_bounds_test, "GetBooleanv");
8439+ params[0] = FLOAT_TO_BOOLEAN(ctx->Depth.BoundsMin);
8440+ params[1] = FLOAT_TO_BOOLEAN(ctx->Depth.BoundsMax);
8441+ break;
8442+ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
8443+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8444+ params[0] = ctx->FragmentProgram.CallbackEnabled;
8445+ break;
8446+ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
8447+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8448+ params[0] = ctx->VertexProgram.CallbackEnabled;
8449+ break;
8450+ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
8451+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8452+ params[0] = INT_TO_BOOLEAN(ctx->FragmentProgram.CurrentPosition);
8453+ break;
8454+ case GL_VERTEX_PROGRAM_POSITION_MESA:
8455+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8456+ params[0] = INT_TO_BOOLEAN(ctx->VertexProgram.CurrentPosition);
8457+ break;
8458+ case GL_MAX_DRAW_BUFFERS_ARB:
8459+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8460+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxDrawBuffers);
8461+ break;
8462+ case GL_DRAW_BUFFER0_ARB:
8463+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8464+ params[0] = ENUM_TO_BOOLEAN(ctx->DrawBuffer->ColorDrawBuffer[0]);
8465+ break;
8466+ case GL_DRAW_BUFFER1_ARB:
8467+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8468+ {
8469+ GLenum buffer;
8470+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
8471+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
8472+ return;
8473+ }
8474+ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
8475+ params[0] = ENUM_TO_BOOLEAN(buffer);
8476+ }
8477+ break;
8478+ case GL_DRAW_BUFFER2_ARB:
8479+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8480+ {
8481+ GLenum buffer;
8482+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
8483+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
8484+ return;
8485+ }
8486+ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
8487+ params[0] = ENUM_TO_BOOLEAN(buffer);
8488+ }
8489+ break;
8490+ case GL_DRAW_BUFFER3_ARB:
8491+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8492+ {
8493+ GLenum buffer;
8494+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
8495+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
8496+ return;
8497+ }
8498+ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
8499+ params[0] = ENUM_TO_BOOLEAN(buffer);
8500+ }
8501+ break;
8502+ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
8503+ CHECK_EXT1(OES_read_format, "GetBooleanv");
8504+ params[0] = INT_TO_BOOLEAN(ctx->Const.ColorReadType);
8505+ break;
8506+ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
8507+ CHECK_EXT1(OES_read_format, "GetBooleanv");
8508+ params[0] = INT_TO_BOOLEAN(ctx->Const.ColorReadFormat);
8509+ break;
8510+ case GL_NUM_FRAGMENT_REGISTERS_ATI:
8511+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8512+ params[0] = INT_TO_BOOLEAN(6);
8513+ break;
8514+ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
8515+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8516+ params[0] = INT_TO_BOOLEAN(8);
8517+ break;
8518+ case GL_NUM_PASSES_ATI:
8519+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8520+ params[0] = INT_TO_BOOLEAN(2);
8521+ break;
8522+ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
8523+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8524+ params[0] = INT_TO_BOOLEAN(8);
8525+ break;
8526+ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
8527+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8528+ params[0] = INT_TO_BOOLEAN(16);
8529+ break;
8530+ case GL_COLOR_ALPHA_PAIRING_ATI:
8531+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8532+ params[0] = GL_TRUE;
8533+ break;
8534+ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
8535+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8536+ params[0] = INT_TO_BOOLEAN(3);
8537+ break;
8538+ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
8539+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8540+ params[0] = INT_TO_BOOLEAN(3);
8541+ break;
8542+ case GL_STENCIL_BACK_FUNC:
8543+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.Function[1]);
8544+ break;
8545+ case GL_STENCIL_BACK_VALUE_MASK:
8546+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.ValueMask[1]);
8547+ break;
8548+ case GL_STENCIL_BACK_REF:
8549+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Ref[1]);
8550+ break;
8551+ case GL_STENCIL_BACK_FAIL:
8552+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.FailFunc[1]);
8553+ break;
8554+ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
8555+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZFailFunc[1]);
8556+ break;
8557+ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
8558+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZPassFunc[1]);
8559+ break;
8560+ case GL_FRAMEBUFFER_BINDING_EXT:
8561+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
8562+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Name);
8563+ break;
8564+ case GL_RENDERBUFFER_BINDING_EXT:
8565+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
8566+ params[0] = INT_TO_BOOLEAN(ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0);
8567+ break;
8568+ case GL_MAX_COLOR_ATTACHMENTS_EXT:
8569+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
8570+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxColorAttachments);
8571+ break;
8572+ case GL_MAX_RENDERBUFFER_SIZE_EXT:
8573+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
8574+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxRenderbufferSize);
8575+ break;
8576+ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
8577+ CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
8578+ params[0] = INT_TO_BOOLEAN(MAX_FRAGMENT_UNIFORM_COMPONENTS);
8579+ break;
8580+ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
8581+ CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
8582+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.FragmentShaderDerivative);
8583+ break;
8584+ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
8585+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
8586+ params[0] = INT_TO_BOOLEAN(MAX_VERTEX_UNIFORM_COMPONENTS);
8587+ break;
8588+ case GL_MAX_VARYING_FLOATS_ARB:
8589+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
8590+ params[0] = INT_TO_BOOLEAN(MAX_VARYING_FLOATS);
8591+ break;
8592+ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
8593+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
8594+ params[0] = INT_TO_BOOLEAN(MAX_VERTEX_TEXTURE_IMAGE_UNITS);
8595+ break;
8596+ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
8597+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
8598+ params[0] = INT_TO_BOOLEAN(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
8599+ break;
8600+ default:
8601+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv(pname=0x%x)", pname);
8602+ }
8603+}
8604+
8605+void GLAPIENTRY
8606+_mesa_GetFloatv( GLenum pname, GLfloat *params )
8607+{
8608+ GET_CURRENT_CONTEXT(ctx);
8609+ ASSERT_OUTSIDE_BEGIN_END(ctx);
8610+
8611+ if (!params)
8612+ return;
8613+
8614+ if (ctx->NewState)
8615+ _mesa_update_state(ctx);
8616+
8617+ if (ctx->Driver.GetFloatv &&
8618+ ctx->Driver.GetFloatv(ctx, pname, params))
8619+ return;
8620+
8621+ switch (pname) {
8622+ case GL_ACCUM_RED_BITS:
8623+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumRedBits);
8624+ break;
8625+ case GL_ACCUM_GREEN_BITS:
8626+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumGreenBits);
8627+ break;
8628+ case GL_ACCUM_BLUE_BITS:
8629+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumBlueBits);
8630+ break;
8631+ case GL_ACCUM_ALPHA_BITS:
8632+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumAlphaBits);
8633+ break;
8634+ case GL_ACCUM_CLEAR_VALUE:
8635+ params[0] = ctx->Accum.ClearColor[0];
8636+ params[1] = ctx->Accum.ClearColor[1];
8637+ params[2] = ctx->Accum.ClearColor[2];
8638+ params[3] = ctx->Accum.ClearColor[3];
8639+ break;
8640+ case GL_ALPHA_BIAS:
8641+ params[0] = ctx->Pixel.AlphaBias;
8642+ break;
8643+ case GL_ALPHA_BITS:
8644+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.alphaBits);
8645+ break;
8646+ case GL_ALPHA_SCALE:
8647+ params[0] = ctx->Pixel.AlphaScale;
8648+ break;
8649+ case GL_ALPHA_TEST:
8650+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.AlphaEnabled);
8651+ break;
8652+ case GL_ALPHA_TEST_FUNC:
8653+ params[0] = ENUM_TO_FLOAT(ctx->Color.AlphaFunc);
8654+ break;
8655+ case GL_ALPHA_TEST_REF:
8656+ params[0] = ctx->Color.AlphaRef;
8657+ break;
8658+ case GL_ATTRIB_STACK_DEPTH:
8659+ params[0] = (GLfloat)(ctx->AttribStackDepth);
8660+ break;
8661+ case GL_AUTO_NORMAL:
8662+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.AutoNormal);
8663+ break;
8664+ case GL_AUX_BUFFERS:
8665+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.numAuxBuffers);
8666+ break;
8667+ case GL_BLEND:
8668+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.BlendEnabled);
8669+ break;
8670+ case GL_BLEND_DST:
8671+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstRGB);
8672+ break;
8673+ case GL_BLEND_SRC:
8674+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcRGB);
8675+ break;
8676+ case GL_BLEND_SRC_RGB_EXT:
8677+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcRGB);
8678+ break;
8679+ case GL_BLEND_DST_RGB_EXT:
8680+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstRGB);
8681+ break;
8682+ case GL_BLEND_SRC_ALPHA_EXT:
8683+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcA);
8684+ break;
8685+ case GL_BLEND_DST_ALPHA_EXT:
8686+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstA);
8687+ break;
8688+ case GL_BLEND_EQUATION:
8689+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendEquationRGB );
8690+ break;
8691+ case GL_BLEND_EQUATION_ALPHA_EXT:
8692+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendEquationA );
8693+ break;
8694+ case GL_BLEND_COLOR_EXT:
8695+ params[0] = ctx->Color.BlendColor[0];
8696+ params[1] = ctx->Color.BlendColor[1];
8697+ params[2] = ctx->Color.BlendColor[2];
8698+ params[3] = ctx->Color.BlendColor[3];
8699+ break;
8700+ case GL_BLUE_BIAS:
8701+ params[0] = ctx->Pixel.BlueBias;
8702+ break;
8703+ case GL_BLUE_BITS:
8704+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.blueBits);
8705+ break;
8706+ case GL_BLUE_SCALE:
8707+ params[0] = ctx->Pixel.BlueScale;
8708+ break;
8709+ case GL_CLIENT_ATTRIB_STACK_DEPTH:
8710+ params[0] = (GLfloat)(ctx->ClientAttribStackDepth);
8711+ break;
8712+ case GL_CLIP_PLANE0:
8713+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 0) & 1);
8714+ break;
8715+ case GL_CLIP_PLANE1:
8716+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 1) & 1);
8717+ break;
8718+ case GL_CLIP_PLANE2:
8719+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 2) & 1);
8720+ break;
8721+ case GL_CLIP_PLANE3:
8722+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 3) & 1);
8723+ break;
8724+ case GL_CLIP_PLANE4:
8725+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 4) & 1);
8726+ break;
8727+ case GL_CLIP_PLANE5:
8728+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 5) & 1);
8729+ break;
8730+ case GL_COLOR_CLEAR_VALUE:
8731+ params[0] = ctx->Color.ClearColor[0];
8732+ params[1] = ctx->Color.ClearColor[1];
8733+ params[2] = ctx->Color.ClearColor[2];
8734+ params[3] = ctx->Color.ClearColor[3];
8735+ break;
8736+ case GL_COLOR_MATERIAL:
8737+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.ColorMaterialEnabled);
8738+ break;
8739+ case GL_COLOR_MATERIAL_FACE:
8740+ params[0] = ENUM_TO_FLOAT(ctx->Light.ColorMaterialFace);
8741+ break;
8742+ case GL_COLOR_MATERIAL_PARAMETER:
8743+ params[0] = ENUM_TO_FLOAT(ctx->Light.ColorMaterialMode);
8744+ break;
8745+ case GL_COLOR_WRITEMASK:
8746+ params[0] = (GLfloat)(ctx->Color.ColorMask[RCOMP] ? 1 : 0);
8747+ params[1] = (GLfloat)(ctx->Color.ColorMask[GCOMP] ? 1 : 0);
8748+ params[2] = (GLfloat)(ctx->Color.ColorMask[BCOMP] ? 1 : 0);
8749+ params[3] = (GLfloat)(ctx->Color.ColorMask[ACOMP] ? 1 : 0);
8750+ break;
8751+ case GL_CULL_FACE:
8752+ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.CullFlag);
8753+ break;
8754+ case GL_CULL_FACE_MODE:
8755+ params[0] = ENUM_TO_FLOAT(ctx->Polygon.CullFaceMode);
8756+ break;
8757+ case GL_CURRENT_COLOR:
8758+ {
8759+ FLUSH_CURRENT(ctx, 0);
8760+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0];
8761+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1];
8762+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2];
8763+ params[3] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3];
8764+ }
8765+ break;
8766+ case GL_CURRENT_INDEX:
8767+ {
8768+ FLUSH_CURRENT(ctx, 0);
8769+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0];
8770+ }
8771+ break;
8772+ case GL_CURRENT_NORMAL:
8773+ {
8774+ FLUSH_CURRENT(ctx, 0);
8775+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0];
8776+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1];
8777+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2];
8778+ }
8779+ break;
8780+ case GL_CURRENT_RASTER_COLOR:
8781+ params[0] = ctx->Current.RasterColor[0];
8782+ params[1] = ctx->Current.RasterColor[1];
8783+ params[2] = ctx->Current.RasterColor[2];
8784+ params[3] = ctx->Current.RasterColor[3];
8785+ break;
8786+ case GL_CURRENT_RASTER_DISTANCE:
8787+ params[0] = ctx->Current.RasterDistance;
8788+ break;
8789+ case GL_CURRENT_RASTER_INDEX:
8790+ params[0] = ctx->Current.RasterIndex;
8791+ break;
8792+ case GL_CURRENT_RASTER_POSITION:
8793+ params[0] = ctx->Current.RasterPos[0];
8794+ params[1] = ctx->Current.RasterPos[1];
8795+ params[2] = ctx->Current.RasterPos[2];
8796+ params[3] = ctx->Current.RasterPos[3];
8797+ break;
8798+ case GL_CURRENT_RASTER_SECONDARY_COLOR:
8799+ params[0] = ctx->Current.RasterSecondaryColor[0];
8800+ params[1] = ctx->Current.RasterSecondaryColor[1];
8801+ params[2] = ctx->Current.RasterSecondaryColor[2];
8802+ params[3] = ctx->Current.RasterSecondaryColor[3];
8803+ break;
8804+ case GL_CURRENT_RASTER_TEXTURE_COORDS:
8805+ {
8806+ const GLuint texUnit = ctx->Texture.CurrentUnit;
8807+ params[0] = ctx->Current.RasterTexCoords[texUnit][0];
8808+ params[1] = ctx->Current.RasterTexCoords[texUnit][1];
8809+ params[2] = ctx->Current.RasterTexCoords[texUnit][2];
8810+ params[3] = ctx->Current.RasterTexCoords[texUnit][3];
8811+ }
8812+ break;
8813+ case GL_CURRENT_RASTER_POSITION_VALID:
8814+ params[0] = BOOLEAN_TO_FLOAT(ctx->Current.RasterPosValid);
8815+ break;
8816+ case GL_CURRENT_TEXTURE_COORDS:
8817+ {
8818+ const GLuint texUnit = ctx->Texture.CurrentUnit;
8819+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0];
8820+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1];
8821+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2];
8822+ params[3] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3];
8823+ }
8824+ break;
8825+ case GL_DEPTH_BIAS:
8826+ params[0] = ctx->Pixel.DepthBias;
8827+ break;
8828+ case GL_DEPTH_BITS:
8829+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.depthBits);
8830+ break;
8831+ case GL_DEPTH_CLEAR_VALUE:
8832+ params[0] = ctx->Depth.Clear;
8833+ break;
8834+ case GL_DEPTH_FUNC:
8835+ params[0] = ENUM_TO_FLOAT(ctx->Depth.Func);
8836+ break;
8837+ case GL_DEPTH_RANGE:
8838+ params[0] = ctx->Viewport.Near;
8839+ params[1] = ctx->Viewport.Far;
8840+ break;
8841+ case GL_DEPTH_SCALE:
8842+ params[0] = ctx->Pixel.DepthScale;
8843+ break;
8844+ case GL_DEPTH_TEST:
8845+ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.Test);
8846+ break;
8847+ case GL_DEPTH_WRITEMASK:
8848+ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.Mask);
8849+ break;
8850+ case GL_DITHER:
8851+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.DitherFlag);
8852+ break;
8853+ case GL_DOUBLEBUFFER:
8854+ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.doubleBufferMode);
8855+ break;
8856+ case GL_DRAW_BUFFER:
8857+ params[0] = ENUM_TO_FLOAT(ctx->DrawBuffer->ColorDrawBuffer[0]);
8858+ break;
8859+ case GL_EDGE_FLAG:
8860+ {
8861+ FLUSH_CURRENT(ctx, 0);
8862+ params[0] = BOOLEAN_TO_FLOAT(ctx->Current.EdgeFlag);
8863+ }
8864+ break;
8865+ case GL_FEEDBACK_BUFFER_SIZE:
8866+ params[0] = (GLfloat)(ctx->Feedback.BufferSize);
8867+ break;
8868+ case GL_FEEDBACK_BUFFER_TYPE:
8869+ params[0] = ENUM_TO_FLOAT(ctx->Feedback.Type);
8870+ break;
8871+ case GL_FOG:
8872+ params[0] = BOOLEAN_TO_FLOAT(ctx->Fog.Enabled);
8873+ break;
8874+ case GL_FOG_COLOR:
8875+ params[0] = ctx->Fog.Color[0];
8876+ params[1] = ctx->Fog.Color[1];
8877+ params[2] = ctx->Fog.Color[2];
8878+ params[3] = ctx->Fog.Color[3];
8879+ break;
8880+ case GL_FOG_DENSITY:
8881+ params[0] = ctx->Fog.Density;
8882+ break;
8883+ case GL_FOG_END:
8884+ params[0] = ctx->Fog.End;
8885+ break;
8886+ case GL_FOG_HINT:
8887+ params[0] = ENUM_TO_FLOAT(ctx->Hint.Fog);
8888+ break;
8889+ case GL_FOG_INDEX:
8890+ params[0] = ctx->Fog.Index;
8891+ break;
8892+ case GL_FOG_MODE:
8893+ params[0] = ENUM_TO_FLOAT(ctx->Fog.Mode);
8894+ break;
8895+ case GL_FOG_START:
8896+ params[0] = ctx->Fog.Start;
8897+ break;
8898+ case GL_FRONT_FACE:
8899+ params[0] = ENUM_TO_FLOAT(ctx->Polygon.FrontFace);
8900+ break;
8901+ case GL_GREEN_BIAS:
8902+ params[0] = ctx->Pixel.GreenBias;
8903+ break;
8904+ case GL_GREEN_BITS:
8905+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.greenBits);
8906+ break;
8907+ case GL_GREEN_SCALE:
8908+ params[0] = ctx->Pixel.GreenScale;
8909+ break;
8910+ case GL_INDEX_BITS:
8911+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.indexBits);
8912+ break;
8913+ case GL_INDEX_CLEAR_VALUE:
8914+ params[0] = (GLfloat)(ctx->Color.ClearIndex);
8915+ break;
8916+ case GL_INDEX_MODE:
8917+ params[0] = BOOLEAN_TO_FLOAT(!ctx->DrawBuffer->Visual.rgbMode);
8918+ break;
8919+ case GL_INDEX_OFFSET:
8920+ params[0] = (GLfloat)(ctx->Pixel.IndexOffset);
8921+ break;
8922+ case GL_INDEX_SHIFT:
8923+ params[0] = (GLfloat)(ctx->Pixel.IndexShift);
8924+ break;
8925+ case GL_INDEX_WRITEMASK:
8926+ params[0] = (GLfloat)(ctx->Color.IndexMask);
8927+ break;
8928+ case GL_LIGHT0:
8929+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[0].Enabled);
8930+ break;
8931+ case GL_LIGHT1:
8932+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[1].Enabled);
8933+ break;
8934+ case GL_LIGHT2:
8935+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[2].Enabled);
8936+ break;
8937+ case GL_LIGHT3:
8938+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[3].Enabled);
8939+ break;
8940+ case GL_LIGHT4:
8941+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[4].Enabled);
8942+ break;
8943+ case GL_LIGHT5:
8944+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[5].Enabled);
8945+ break;
8946+ case GL_LIGHT6:
8947+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[6].Enabled);
8948+ break;
8949+ case GL_LIGHT7:
8950+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[7].Enabled);
8951+ break;
8952+ case GL_LIGHTING:
8953+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Enabled);
8954+ break;
8955+ case GL_LIGHT_MODEL_AMBIENT:
8956+ params[0] = ctx->Light.Model.Ambient[0];
8957+ params[1] = ctx->Light.Model.Ambient[1];
8958+ params[2] = ctx->Light.Model.Ambient[2];
8959+ params[3] = ctx->Light.Model.Ambient[3];
8960+ break;
8961+ case GL_LIGHT_MODEL_COLOR_CONTROL:
8962+ params[0] = ENUM_TO_FLOAT(ctx->Light.Model.ColorControl);
8963+ break;
8964+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
8965+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Model.LocalViewer);
8966+ break;
8967+ case GL_LIGHT_MODEL_TWO_SIDE:
8968+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Model.TwoSide);
8969+ break;
8970+ case GL_LINE_SMOOTH:
8971+ params[0] = BOOLEAN_TO_FLOAT(ctx->Line.SmoothFlag);
8972+ break;
8973+ case GL_LINE_SMOOTH_HINT:
8974+ params[0] = ENUM_TO_FLOAT(ctx->Hint.LineSmooth);
8975+ break;
8976+ case GL_LINE_STIPPLE:
8977+ params[0] = BOOLEAN_TO_FLOAT(ctx->Line.StippleFlag);
8978+ break;
8979+ case GL_LINE_STIPPLE_PATTERN:
8980+ params[0] = (GLfloat)(ctx->Line.StipplePattern);
8981+ break;
8982+ case GL_LINE_STIPPLE_REPEAT:
8983+ params[0] = (GLfloat)(ctx->Line.StippleFactor);
8984+ break;
8985+ case GL_LINE_WIDTH:
8986+ params[0] = ctx->Line.Width;
8987+ break;
8988+ case GL_LINE_WIDTH_GRANULARITY:
8989+ params[0] = ctx->Const.LineWidthGranularity;
8990+ break;
8991+ case GL_LINE_WIDTH_RANGE:
8992+ params[0] = ctx->Const.MinLineWidthAA;
8993+ params[1] = ctx->Const.MaxLineWidthAA;
8994+ break;
8995+ case GL_ALIASED_LINE_WIDTH_RANGE:
8996+ params[0] = ctx->Const.MinLineWidth;
8997+ params[1] = ctx->Const.MaxLineWidth;
8998+ break;
8999+ case GL_LIST_BASE:
9000+ params[0] = (GLfloat)(ctx->List.ListBase);
9001+ break;
9002+ case GL_LIST_INDEX:
9003+ params[0] = (GLfloat)(ctx->ListState.CurrentListNum);
9004+ break;
9005+ case GL_LIST_MODE:
9006+ {
9007+ GLenum mode;
9008+ if (!ctx->CompileFlag)
9009+ mode = 0;
9010+ else if (ctx->ExecuteFlag)
9011+ mode = GL_COMPILE_AND_EXECUTE;
9012+ else
9013+ mode = GL_COMPILE;
9014+ params[0] = ENUM_TO_FLOAT(mode);
9015+ }
9016+ break;
9017+ case GL_INDEX_LOGIC_OP:
9018+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.IndexLogicOpEnabled);
9019+ break;
9020+ case GL_COLOR_LOGIC_OP:
9021+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.ColorLogicOpEnabled);
9022+ break;
9023+ case GL_LOGIC_OP_MODE:
9024+ params[0] = ENUM_TO_FLOAT(ctx->Color.LogicOp);
9025+ break;
9026+ case GL_MAP1_COLOR_4:
9027+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Color4);
9028+ break;
9029+ case GL_MAP1_GRID_DOMAIN:
9030+ params[0] = ctx->Eval.MapGrid1u1;
9031+ params[1] = ctx->Eval.MapGrid1u2;
9032+ break;
9033+ case GL_MAP1_GRID_SEGMENTS:
9034+ params[0] = (GLfloat)(ctx->Eval.MapGrid1un);
9035+ break;
9036+ case GL_MAP1_INDEX:
9037+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Index);
9038+ break;
9039+ case GL_MAP1_NORMAL:
9040+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Normal);
9041+ break;
9042+ case GL_MAP1_TEXTURE_COORD_1:
9043+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord1);
9044+ break;
9045+ case GL_MAP1_TEXTURE_COORD_2:
9046+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord2);
9047+ break;
9048+ case GL_MAP1_TEXTURE_COORD_3:
9049+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord3);
9050+ break;
9051+ case GL_MAP1_TEXTURE_COORD_4:
9052+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord4);
9053+ break;
9054+ case GL_MAP1_VERTEX_3:
9055+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Vertex3);
9056+ break;
9057+ case GL_MAP1_VERTEX_4:
9058+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Vertex4);
9059+ break;
9060+ case GL_MAP2_COLOR_4:
9061+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Color4);
9062+ break;
9063+ case GL_MAP2_GRID_DOMAIN:
9064+ params[0] = ctx->Eval.MapGrid2u1;
9065+ params[1] = ctx->Eval.MapGrid2u2;
9066+ params[2] = ctx->Eval.MapGrid2v1;
9067+ params[3] = ctx->Eval.MapGrid2v2;
9068+ break;
9069+ case GL_MAP2_GRID_SEGMENTS:
9070+ params[0] = (GLfloat)(ctx->Eval.MapGrid2un);
9071+ params[1] = (GLfloat)(ctx->Eval.MapGrid2vn);
9072+ break;
9073+ case GL_MAP2_INDEX:
9074+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Index);
9075+ break;
9076+ case GL_MAP2_NORMAL:
9077+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Normal);
9078+ break;
9079+ case GL_MAP2_TEXTURE_COORD_1:
9080+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord1);
9081+ break;
9082+ case GL_MAP2_TEXTURE_COORD_2:
9083+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord2);
9084+ break;
9085+ case GL_MAP2_TEXTURE_COORD_3:
9086+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord3);
9087+ break;
9088+ case GL_MAP2_TEXTURE_COORD_4:
9089+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord4);
9090+ break;
9091+ case GL_MAP2_VERTEX_3:
9092+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Vertex3);
9093+ break;
9094+ case GL_MAP2_VERTEX_4:
9095+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Vertex4);
9096+ break;
9097+ case GL_MAP_COLOR:
9098+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MapColorFlag);
9099+ break;
9100+ case GL_MAP_STENCIL:
9101+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MapStencilFlag);
9102+ break;
9103+ case GL_MATRIX_MODE:
9104+ params[0] = ENUM_TO_FLOAT(ctx->Transform.MatrixMode);
9105+ break;
9106+ case GL_MAX_ATTRIB_STACK_DEPTH:
9107+ params[0] = (GLfloat)(MAX_ATTRIB_STACK_DEPTH);
9108+ break;
9109+ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
9110+ params[0] = (GLfloat)(MAX_CLIENT_ATTRIB_STACK_DEPTH);
9111+ break;
9112+ case GL_MAX_CLIP_PLANES:
9113+ params[0] = (GLfloat)(ctx->Const.MaxClipPlanes);
9114+ break;
9115+ case GL_MAX_ELEMENTS_VERTICES:
9116+ params[0] = (GLfloat)(ctx->Const.MaxArrayLockSize);
9117+ break;
9118+ case GL_MAX_ELEMENTS_INDICES:
9119+ params[0] = (GLfloat)(ctx->Const.MaxArrayLockSize);
9120+ break;
9121+ case GL_MAX_EVAL_ORDER:
9122+ params[0] = (GLfloat)(MAX_EVAL_ORDER);
9123+ break;
9124+ case GL_MAX_LIGHTS:
9125+ params[0] = (GLfloat)(ctx->Const.MaxLights);
9126+ break;
9127+ case GL_MAX_LIST_NESTING:
9128+ params[0] = (GLfloat)(MAX_LIST_NESTING);
9129+ break;
9130+ case GL_MAX_MODELVIEW_STACK_DEPTH:
9131+ params[0] = (GLfloat)(MAX_MODELVIEW_STACK_DEPTH);
9132+ break;
9133+ case GL_MAX_NAME_STACK_DEPTH:
9134+ params[0] = (GLfloat)(MAX_NAME_STACK_DEPTH);
9135+ break;
9136+ case GL_MAX_PIXEL_MAP_TABLE:
9137+ params[0] = (GLfloat)(MAX_PIXEL_MAP_TABLE);
9138+ break;
9139+ case GL_MAX_PROJECTION_STACK_DEPTH:
9140+ params[0] = (GLfloat)(MAX_PROJECTION_STACK_DEPTH);
9141+ break;
9142+ case GL_MAX_TEXTURE_SIZE:
9143+ params[0] = (GLfloat)(1 << (ctx->Const.MaxTextureLevels - 1));
9144+ break;
9145+ case GL_MAX_3D_TEXTURE_SIZE:
9146+ params[0] = (GLfloat)(1 << (ctx->Const.Max3DTextureLevels - 1));
9147+ break;
9148+ case GL_MAX_TEXTURE_STACK_DEPTH:
9149+ params[0] = (GLfloat)(MAX_TEXTURE_STACK_DEPTH);
9150+ break;
9151+ case GL_MAX_VIEWPORT_DIMS:
9152+ params[0] = (GLfloat)(ctx->Const.MaxViewportWidth);
9153+ params[1] = (GLfloat)(ctx->Const.MaxViewportHeight);
9154+ break;
9155+ case GL_MODELVIEW_MATRIX:
9156+ {
9157+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
9158+ params[0] = matrix[0];
9159+ params[1] = matrix[1];
9160+ params[2] = matrix[2];
9161+ params[3] = matrix[3];
9162+ params[4] = matrix[4];
9163+ params[5] = matrix[5];
9164+ params[6] = matrix[6];
9165+ params[7] = matrix[7];
9166+ params[8] = matrix[8];
9167+ params[9] = matrix[9];
9168+ params[10] = matrix[10];
9169+ params[11] = matrix[11];
9170+ params[12] = matrix[12];
9171+ params[13] = matrix[13];
9172+ params[14] = matrix[14];
9173+ params[15] = matrix[15];
9174+ }
9175+ break;
9176+ case GL_MODELVIEW_STACK_DEPTH:
9177+ params[0] = (GLfloat)(ctx->ModelviewMatrixStack.Depth + 1);
9178+ break;
9179+ case GL_NAME_STACK_DEPTH:
9180+ params[0] = (GLfloat)(ctx->Select.NameStackDepth);
9181+ break;
9182+ case GL_NORMALIZE:
9183+ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.Normalize);
9184+ break;
9185+ case GL_PACK_ALIGNMENT:
9186+ params[0] = (GLfloat)(ctx->Pack.Alignment);
9187+ break;
9188+ case GL_PACK_LSB_FIRST:
9189+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.LsbFirst);
9190+ break;
9191+ case GL_PACK_ROW_LENGTH:
9192+ params[0] = (GLfloat)(ctx->Pack.RowLength);
9193+ break;
9194+ case GL_PACK_SKIP_PIXELS:
9195+ params[0] = (GLfloat)(ctx->Pack.SkipPixels);
9196+ break;
9197+ case GL_PACK_SKIP_ROWS:
9198+ params[0] = (GLfloat)(ctx->Pack.SkipRows);
9199+ break;
9200+ case GL_PACK_SWAP_BYTES:
9201+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.SwapBytes);
9202+ break;
9203+ case GL_PACK_SKIP_IMAGES_EXT:
9204+ params[0] = (GLfloat)(ctx->Pack.SkipImages);
9205+ break;
9206+ case GL_PACK_IMAGE_HEIGHT_EXT:
9207+ params[0] = (GLfloat)(ctx->Pack.ImageHeight);
9208+ break;
9209+ case GL_PACK_INVERT_MESA:
9210+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.Invert);
9211+ break;
9212+ case GL_PERSPECTIVE_CORRECTION_HINT:
9213+ params[0] = ENUM_TO_FLOAT(ctx->Hint.PerspectiveCorrection);
9214+ break;
9215+ case GL_PIXEL_MAP_A_TO_A_SIZE:
9216+ params[0] = (GLfloat)(ctx->Pixel.MapAtoAsize);
9217+ break;
9218+ case GL_PIXEL_MAP_B_TO_B_SIZE:
9219+ params[0] = (GLfloat)(ctx->Pixel.MapBtoBsize);
9220+ break;
9221+ case GL_PIXEL_MAP_G_TO_G_SIZE:
9222+ params[0] = (GLfloat)(ctx->Pixel.MapGtoGsize);
9223+ break;
9224+ case GL_PIXEL_MAP_I_TO_A_SIZE:
9225+ params[0] = (GLfloat)(ctx->Pixel.MapItoAsize);
9226+ break;
9227+ case GL_PIXEL_MAP_I_TO_B_SIZE:
9228+ params[0] = (GLfloat)(ctx->Pixel.MapItoBsize);
9229+ break;
9230+ case GL_PIXEL_MAP_I_TO_G_SIZE:
9231+ params[0] = (GLfloat)(ctx->Pixel.MapItoGsize);
9232+ break;
9233+ case GL_PIXEL_MAP_I_TO_I_SIZE:
9234+ params[0] = (GLfloat)(ctx->Pixel.MapItoIsize);
9235+ break;
9236+ case GL_PIXEL_MAP_I_TO_R_SIZE:
9237+ params[0] = (GLfloat)(ctx->Pixel.MapItoRsize);
9238+ break;
9239+ case GL_PIXEL_MAP_R_TO_R_SIZE:
9240+ params[0] = (GLfloat)(ctx->Pixel.MapRtoRsize);
9241+ break;
9242+ case GL_PIXEL_MAP_S_TO_S_SIZE:
9243+ params[0] = (GLfloat)(ctx->Pixel.MapStoSsize);
9244+ break;
9245+ case GL_POINT_SIZE:
9246+ params[0] = ctx->Point.Size;
9247+ break;
9248+ case GL_POINT_SIZE_GRANULARITY:
9249+ params[0] = ctx->Const.PointSizeGranularity;
9250+ break;
9251+ case GL_POINT_SIZE_RANGE:
9252+ params[0] = ctx->Const.MinPointSizeAA;
9253+ params[1] = ctx->Const.MaxPointSizeAA;
9254+ break;
9255+ case GL_ALIASED_POINT_SIZE_RANGE:
9256+ params[0] = ctx->Const.MinPointSize;
9257+ params[1] = ctx->Const.MaxPointSize;
9258+ break;
9259+ case GL_POINT_SMOOTH:
9260+ params[0] = BOOLEAN_TO_FLOAT(ctx->Point.SmoothFlag);
9261+ break;
9262+ case GL_POINT_SMOOTH_HINT:
9263+ params[0] = ENUM_TO_FLOAT(ctx->Hint.PointSmooth);
9264+ break;
9265+ case GL_POINT_SIZE_MIN_EXT:
9266+ params[0] = ctx->Point.MinSize;
9267+ break;
9268+ case GL_POINT_SIZE_MAX_EXT:
9269+ params[0] = ctx->Point.MaxSize;
9270+ break;
9271+ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
9272+ params[0] = ctx->Point.Threshold;
9273+ break;
9274+ case GL_DISTANCE_ATTENUATION_EXT:
9275+ params[0] = ctx->Point.Params[0];
9276+ params[1] = ctx->Point.Params[1];
9277+ params[2] = ctx->Point.Params[2];
9278+ break;
9279+ case GL_POLYGON_MODE:
9280+ params[0] = ENUM_TO_FLOAT(ctx->Polygon.FrontMode);
9281+ params[1] = ENUM_TO_FLOAT(ctx->Polygon.BackMode);
9282+ break;
9283+ case GL_POLYGON_OFFSET_BIAS_EXT:
9284+ params[0] = ctx->Polygon.OffsetUnits;
9285+ break;
9286+ case GL_POLYGON_OFFSET_FACTOR:
9287+ params[0] = ctx->Polygon.OffsetFactor ;
9288+ break;
9289+ case GL_POLYGON_OFFSET_UNITS:
9290+ params[0] = ctx->Polygon.OffsetUnits ;
9291+ break;
9292+ case GL_POLYGON_SMOOTH:
9293+ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.SmoothFlag);
9294+ break;
9295+ case GL_POLYGON_SMOOTH_HINT:
9296+ params[0] = ENUM_TO_FLOAT(ctx->Hint.PolygonSmooth);
9297+ break;
9298+ case GL_POLYGON_STIPPLE:
9299+ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.StippleFlag);
9300+ break;
9301+ case GL_PROJECTION_MATRIX:
9302+ {
9303+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
9304+ params[0] = matrix[0];
9305+ params[1] = matrix[1];
9306+ params[2] = matrix[2];
9307+ params[3] = matrix[3];
9308+ params[4] = matrix[4];
9309+ params[5] = matrix[5];
9310+ params[6] = matrix[6];
9311+ params[7] = matrix[7];
9312+ params[8] = matrix[8];
9313+ params[9] = matrix[9];
9314+ params[10] = matrix[10];
9315+ params[11] = matrix[11];
9316+ params[12] = matrix[12];
9317+ params[13] = matrix[13];
9318+ params[14] = matrix[14];
9319+ params[15] = matrix[15];
9320+ }
9321+ break;
9322+ case GL_PROJECTION_STACK_DEPTH:
9323+ params[0] = (GLfloat)(ctx->ProjectionMatrixStack.Depth + 1);
9324+ break;
9325+ case GL_READ_BUFFER:
9326+ params[0] = ENUM_TO_FLOAT(ctx->ReadBuffer->ColorReadBuffer);
9327+ break;
9328+ case GL_RED_BIAS:
9329+ params[0] = ctx->Pixel.RedBias;
9330+ break;
9331+ case GL_RED_BITS:
9332+ params[0] = (GLfloat)( ctx->DrawBuffer->Visual.redBits );
9333+ break;
9334+ case GL_RED_SCALE:
9335+ params[0] = ctx->Pixel.RedScale;
9336+ break;
9337+ case GL_RENDER_MODE:
9338+ params[0] = ENUM_TO_FLOAT(ctx->RenderMode);
9339+ break;
9340+ case GL_RESCALE_NORMAL:
9341+ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.RescaleNormals);
9342+ break;
9343+ case GL_RGBA_MODE:
9344+ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.rgbMode);
9345+ break;
9346+ case GL_SCISSOR_BOX:
9347+ params[0] = (GLfloat)(ctx->Scissor.X);
9348+ params[1] = (GLfloat)(ctx->Scissor.Y);
9349+ params[2] = (GLfloat)(ctx->Scissor.Width);
9350+ params[3] = (GLfloat)(ctx->Scissor.Height);
9351+ break;
9352+ case GL_SCISSOR_TEST:
9353+ params[0] = BOOLEAN_TO_FLOAT(ctx->Scissor.Enabled);
9354+ break;
9355+ case GL_SELECTION_BUFFER_SIZE:
9356+ params[0] = (GLfloat)(ctx->Select.BufferSize);
9357+ break;
9358+ case GL_SHADE_MODEL:
9359+ params[0] = ENUM_TO_FLOAT(ctx->Light.ShadeModel);
9360+ break;
9361+ case GL_SHARED_TEXTURE_PALETTE_EXT:
9362+ params[0] = BOOLEAN_TO_FLOAT(ctx->Texture.SharedPalette);
9363+ break;
9364+ case GL_STENCIL_BITS:
9365+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.stencilBits);
9366+ break;
9367+ case GL_STENCIL_CLEAR_VALUE:
9368+ params[0] = (GLfloat)(ctx->Stencil.Clear);
9369+ break;
9370+ case GL_STENCIL_FAIL:
9371+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
9372+ break;
9373+ case GL_STENCIL_FUNC:
9374+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
9375+ break;
9376+ case GL_STENCIL_PASS_DEPTH_FAIL:
9377+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
9378+ break;
9379+ case GL_STENCIL_PASS_DEPTH_PASS:
9380+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
9381+ break;
9382+ case GL_STENCIL_REF:
9383+ params[0] = (GLfloat)(ctx->Stencil.Ref[ctx->Stencil.ActiveFace]);
9384+ break;
9385+ case GL_STENCIL_TEST:
9386+ params[0] = BOOLEAN_TO_FLOAT(ctx->Stencil.Enabled);
9387+ break;
9388+ case GL_STENCIL_VALUE_MASK:
9389+ params[0] = (GLfloat)(ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]);
9390+ break;
9391+ case GL_STENCIL_WRITEMASK:
9392+ params[0] = (GLfloat)(ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]);
9393+ break;
9394+ case GL_STEREO:
9395+ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.stereoMode);
9396+ break;
9397+ case GL_SUBPIXEL_BITS:
9398+ params[0] = (GLfloat)(ctx->Const.SubPixelBits);
9399+ break;
9400+ case GL_TEXTURE_1D:
9401+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_1D));
9402+ break;
9403+ case GL_TEXTURE_2D:
9404+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_2D));
9405+ break;
9406+ case GL_TEXTURE_3D:
9407+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_3D));
9408+ break;
9409+ case GL_TEXTURE_BINDING_1D:
9410+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name);
9411+ break;
9412+ case GL_TEXTURE_BINDING_2D:
9413+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name);
9414+ break;
9415+ case GL_TEXTURE_BINDING_3D:
9416+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name);
9417+ break;
9418+ case GL_TEXTURE_ENV_COLOR:
9419+ {
9420+ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
9421+ params[0] = color[0];
9422+ params[1] = color[1];
9423+ params[2] = color[2];
9424+ params[3] = color[3];
9425+ }
9426+ break;
9427+ case GL_TEXTURE_ENV_MODE:
9428+ params[0] = ENUM_TO_FLOAT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
9429+ break;
9430+ case GL_TEXTURE_GEN_S:
9431+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
9432+ break;
9433+ case GL_TEXTURE_GEN_T:
9434+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0));
9435+ break;
9436+ case GL_TEXTURE_GEN_R:
9437+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0));
9438+ break;
9439+ case GL_TEXTURE_GEN_Q:
9440+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0));
9441+ break;
9442+ case GL_TEXTURE_MATRIX:
9443+ {
9444+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
9445+ params[0] = matrix[0];
9446+ params[1] = matrix[1];
9447+ params[2] = matrix[2];
9448+ params[3] = matrix[3];
9449+ params[4] = matrix[4];
9450+ params[5] = matrix[5];
9451+ params[6] = matrix[6];
9452+ params[7] = matrix[7];
9453+ params[8] = matrix[8];
9454+ params[9] = matrix[9];
9455+ params[10] = matrix[10];
9456+ params[11] = matrix[11];
9457+ params[12] = matrix[12];
9458+ params[13] = matrix[13];
9459+ params[14] = matrix[14];
9460+ params[15] = matrix[15];
9461+ }
9462+ break;
9463+ case GL_TEXTURE_STACK_DEPTH:
9464+ params[0] = (GLfloat)(ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1);
9465+ break;
9466+ case GL_UNPACK_ALIGNMENT:
9467+ params[0] = (GLfloat)(ctx->Unpack.Alignment);
9468+ break;
9469+ case GL_UNPACK_LSB_FIRST:
9470+ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.LsbFirst);
9471+ break;
9472+ case GL_UNPACK_ROW_LENGTH:
9473+ params[0] = (GLfloat)(ctx->Unpack.RowLength);
9474+ break;
9475+ case GL_UNPACK_SKIP_PIXELS:
9476+ params[0] = (GLfloat)(ctx->Unpack.SkipPixels);
9477+ break;
9478+ case GL_UNPACK_SKIP_ROWS:
9479+ params[0] = (GLfloat)(ctx->Unpack.SkipRows);
9480+ break;
9481+ case GL_UNPACK_SWAP_BYTES:
9482+ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.SwapBytes);
9483+ break;
9484+ case GL_UNPACK_SKIP_IMAGES_EXT:
9485+ params[0] = (GLfloat)(ctx->Unpack.SkipImages);
9486+ break;
9487+ case GL_UNPACK_IMAGE_HEIGHT_EXT:
9488+ params[0] = (GLfloat)(ctx->Unpack.ImageHeight);
9489+ break;
9490+ case GL_UNPACK_CLIENT_STORAGE_APPLE:
9491+ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.ClientStorage);
9492+ break;
9493+ case GL_VIEWPORT:
9494+ params[0] = (GLfloat)(ctx->Viewport.X);
9495+ params[1] = (GLfloat)(ctx->Viewport.Y);
9496+ params[2] = (GLfloat)(ctx->Viewport.Width);
9497+ params[3] = (GLfloat)(ctx->Viewport.Height);
9498+ break;
9499+ case GL_ZOOM_X:
9500+ params[0] = ctx->Pixel.ZoomX;
9501+ break;
9502+ case GL_ZOOM_Y:
9503+ params[0] = ctx->Pixel.ZoomY;
9504+ break;
9505+ case GL_VERTEX_ARRAY:
9506+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Vertex.Enabled);
9507+ break;
9508+ case GL_VERTEX_ARRAY_SIZE:
9509+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.Size);
9510+ break;
9511+ case GL_VERTEX_ARRAY_TYPE:
9512+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Vertex.Type);
9513+ break;
9514+ case GL_VERTEX_ARRAY_STRIDE:
9515+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.Stride);
9516+ break;
9517+ case GL_VERTEX_ARRAY_COUNT_EXT:
9518+ params[0] = (GLfloat)(0);
9519+ break;
9520+ case GL_NORMAL_ARRAY:
9521+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Normal.Enabled);
9522+ break;
9523+ case GL_NORMAL_ARRAY_TYPE:
9524+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Normal.Type);
9525+ break;
9526+ case GL_NORMAL_ARRAY_STRIDE:
9527+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Normal.Stride);
9528+ break;
9529+ case GL_NORMAL_ARRAY_COUNT_EXT:
9530+ params[0] = (GLfloat)(0);
9531+ break;
9532+ case GL_COLOR_ARRAY:
9533+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Color.Enabled);
9534+ break;
9535+ case GL_COLOR_ARRAY_SIZE:
9536+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.Size);
9537+ break;
9538+ case GL_COLOR_ARRAY_TYPE:
9539+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Color.Type);
9540+ break;
9541+ case GL_COLOR_ARRAY_STRIDE:
9542+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.Stride);
9543+ break;
9544+ case GL_COLOR_ARRAY_COUNT_EXT:
9545+ params[0] = (GLfloat)(0);
9546+ break;
9547+ case GL_INDEX_ARRAY:
9548+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Index.Enabled);
9549+ break;
9550+ case GL_INDEX_ARRAY_TYPE:
9551+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Index.Type);
9552+ break;
9553+ case GL_INDEX_ARRAY_STRIDE:
9554+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Index.Stride);
9555+ break;
9556+ case GL_INDEX_ARRAY_COUNT_EXT:
9557+ params[0] = (GLfloat)(0);
9558+ break;
9559+ case GL_TEXTURE_COORD_ARRAY:
9560+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
9561+ break;
9562+ case GL_TEXTURE_COORD_ARRAY_SIZE:
9563+ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
9564+ break;
9565+ case GL_TEXTURE_COORD_ARRAY_TYPE:
9566+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
9567+ break;
9568+ case GL_TEXTURE_COORD_ARRAY_STRIDE:
9569+ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
9570+ break;
9571+ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
9572+ params[0] = (GLfloat)(0);
9573+ break;
9574+ case GL_EDGE_FLAG_ARRAY:
9575+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->EdgeFlag.Enabled);
9576+ break;
9577+ case GL_EDGE_FLAG_ARRAY_STRIDE:
9578+ params[0] = (GLfloat)(ctx->Array.ArrayObj->EdgeFlag.Stride);
9579+ break;
9580+ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
9581+ params[0] = (GLfloat)(0);
9582+ break;
9583+ case GL_MAX_TEXTURE_UNITS_ARB:
9584+ CHECK_EXT1(ARB_multitexture, "GetFloatv");
9585+ params[0] = (GLfloat)(ctx->Const.MaxTextureUnits);
9586+ break;
9587+ case GL_ACTIVE_TEXTURE_ARB:
9588+ CHECK_EXT1(ARB_multitexture, "GetFloatv");
9589+ params[0] = (GLfloat)(GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit);
9590+ break;
9591+ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
9592+ CHECK_EXT1(ARB_multitexture, "GetFloatv");
9593+ params[0] = (GLfloat)(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
9594+ break;
9595+ case GL_TEXTURE_CUBE_MAP_ARB:
9596+ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
9597+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB));
9598+ break;
9599+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
9600+ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
9601+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name);
9602+ break;
9603+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
9604+ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
9605+ params[0] = (GLfloat)((1 << (ctx->Const.MaxCubeTextureLevels - 1)));
9606+ break;
9607+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
9608+ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
9609+ params[0] = (GLfloat)(ctx->Hint.TextureCompression);
9610+ break;
9611+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
9612+ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
9613+ params[0] = (GLfloat)(_mesa_get_compressed_formats(ctx, NULL, GL_FALSE));
9614+ break;
9615+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
9616+ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
9617+ {
9618+ GLint formats[100];
9619+ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
9620+ ASSERT(n <= 100);
9621+ for (i = 0; i < n; i++)
9622+ params[i] = ENUM_TO_INT(formats[i]);
9623+ }
9624+ break;
9625+ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
9626+ CHECK_EXT1(EXT_compiled_vertex_array, "GetFloatv");
9627+ params[0] = (GLfloat)(ctx->Array.LockFirst);
9628+ break;
9629+ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
9630+ CHECK_EXT1(EXT_compiled_vertex_array, "GetFloatv");
9631+ params[0] = (GLfloat)(ctx->Array.LockCount);
9632+ break;
9633+ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
9634+ {
9635+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
9636+ params[0] = matrix[0];
9637+ params[1] = matrix[4];
9638+ params[2] = matrix[8];
9639+ params[3] = matrix[12];
9640+ params[4] = matrix[1];
9641+ params[5] = matrix[5];
9642+ params[6] = matrix[9];
9643+ params[7] = matrix[13];
9644+ params[8] = matrix[2];
9645+ params[9] = matrix[6];
9646+ params[10] = matrix[10];
9647+ params[11] = matrix[14];
9648+ params[12] = matrix[3];
9649+ params[13] = matrix[7];
9650+ params[14] = matrix[11];
9651+ params[15] = matrix[15];
9652+ }
9653+ break;
9654+ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
9655+ {
9656+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
9657+ params[0] = matrix[0];
9658+ params[1] = matrix[4];
9659+ params[2] = matrix[8];
9660+ params[3] = matrix[12];
9661+ params[4] = matrix[1];
9662+ params[5] = matrix[5];
9663+ params[6] = matrix[9];
9664+ params[7] = matrix[13];
9665+ params[8] = matrix[2];
9666+ params[9] = matrix[6];
9667+ params[10] = matrix[10];
9668+ params[11] = matrix[14];
9669+ params[12] = matrix[3];
9670+ params[13] = matrix[7];
9671+ params[14] = matrix[11];
9672+ params[15] = matrix[15];
9673+ }
9674+ break;
9675+ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
9676+ {
9677+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
9678+ params[0] = matrix[0];
9679+ params[1] = matrix[4];
9680+ params[2] = matrix[8];
9681+ params[3] = matrix[12];
9682+ params[4] = matrix[1];
9683+ params[5] = matrix[5];
9684+ params[6] = matrix[9];
9685+ params[7] = matrix[13];
9686+ params[8] = matrix[2];
9687+ params[9] = matrix[6];
9688+ params[10] = matrix[10];
9689+ params[11] = matrix[14];
9690+ params[12] = matrix[3];
9691+ params[13] = matrix[7];
9692+ params[14] = matrix[11];
9693+ params[15] = matrix[15];
9694+ }
9695+ break;
9696+ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
9697+ {
9698+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
9699+ params[0] = matrix[0];
9700+ params[1] = matrix[4];
9701+ params[2] = matrix[8];
9702+ params[3] = matrix[12];
9703+ params[4] = matrix[1];
9704+ params[5] = matrix[5];
9705+ params[6] = matrix[9];
9706+ params[7] = matrix[13];
9707+ params[8] = matrix[2];
9708+ params[9] = matrix[6];
9709+ params[10] = matrix[10];
9710+ params[11] = matrix[14];
9711+ params[12] = matrix[3];
9712+ params[13] = matrix[7];
9713+ params[14] = matrix[11];
9714+ params[15] = matrix[15];
9715+ }
9716+ break;
9717+ case GL_COLOR_MATRIX_SGI:
9718+ {
9719+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
9720+ params[0] = matrix[0];
9721+ params[1] = matrix[1];
9722+ params[2] = matrix[2];
9723+ params[3] = matrix[3];
9724+ params[4] = matrix[4];
9725+ params[5] = matrix[5];
9726+ params[6] = matrix[6];
9727+ params[7] = matrix[7];
9728+ params[8] = matrix[8];
9729+ params[9] = matrix[9];
9730+ params[10] = matrix[10];
9731+ params[11] = matrix[11];
9732+ params[12] = matrix[12];
9733+ params[13] = matrix[13];
9734+ params[14] = matrix[14];
9735+ params[15] = matrix[15];
9736+ }
9737+ break;
9738+ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
9739+ params[0] = (GLfloat)(ctx->ColorMatrixStack.Depth + 1);
9740+ break;
9741+ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
9742+ params[0] = (GLfloat)(MAX_COLOR_STACK_DEPTH);
9743+ break;
9744+ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
9745+ params[0] = ctx->Pixel.PostColorMatrixScale[0];
9746+ break;
9747+ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
9748+ params[0] = ctx->Pixel.PostColorMatrixScale[1];
9749+ break;
9750+ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
9751+ params[0] = ctx->Pixel.PostColorMatrixScale[2];
9752+ break;
9753+ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
9754+ params[0] = ctx->Pixel.PostColorMatrixScale[3];
9755+ break;
9756+ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
9757+ params[0] = ctx->Pixel.PostColorMatrixBias[0];
9758+ break;
9759+ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
9760+ params[0] = ctx->Pixel.PostColorMatrixBias[1];
9761+ break;
9762+ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
9763+ params[0] = ctx->Pixel.PostColorMatrixBias[2];
9764+ break;
9765+ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
9766+ params[0] = ctx->Pixel.PostColorMatrixBias[3];
9767+ break;
9768+ case GL_CONVOLUTION_1D_EXT:
9769+ CHECK_EXT1(EXT_convolution, "GetFloatv");
9770+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Convolution1DEnabled);
9771+ break;
9772+ case GL_CONVOLUTION_2D_EXT:
9773+ CHECK_EXT1(EXT_convolution, "GetFloatv");
9774+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Convolution2DEnabled);
9775+ break;
9776+ case GL_SEPARABLE_2D_EXT:
9777+ CHECK_EXT1(EXT_convolution, "GetFloatv");
9778+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Separable2DEnabled);
9779+ break;
9780+ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
9781+ CHECK_EXT1(EXT_convolution, "GetFloatv");
9782+ params[0] = ctx->Pixel.PostConvolutionScale[0];
9783+ break;
9784+ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
9785+ CHECK_EXT1(EXT_convolution, "GetFloatv");
9786+ params[0] = ctx->Pixel.PostConvolutionScale[1];
9787+ break;
9788+ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
9789+ CHECK_EXT1(EXT_convolution, "GetFloatv");
9790+ params[0] = ctx->Pixel.PostConvolutionScale[2];
9791+ break;
9792+ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
9793+ CHECK_EXT1(EXT_convolution, "GetFloatv");
9794+ params[0] = ctx->Pixel.PostConvolutionScale[3];
9795+ break;
9796+ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
9797+ CHECK_EXT1(EXT_convolution, "GetFloatv");
9798+ params[0] = ctx->Pixel.PostConvolutionBias[0];
9799+ break;
9800+ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
9801+ CHECK_EXT1(EXT_convolution, "GetFloatv");
9802+ params[0] = ctx->Pixel.PostConvolutionBias[1];
9803+ break;
9804+ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
9805+ CHECK_EXT1(EXT_convolution, "GetFloatv");
9806+ params[0] = ctx->Pixel.PostConvolutionBias[2];
9807+ break;
9808+ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
9809+ CHECK_EXT1(EXT_convolution, "GetFloatv");
9810+ params[0] = ctx->Pixel.PostConvolutionBias[3];
9811+ break;
9812+ case GL_HISTOGRAM:
9813+ CHECK_EXT1(EXT_histogram, "GetFloatv");
9814+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.HistogramEnabled);
9815+ break;
9816+ case GL_MINMAX:
9817+ CHECK_EXT1(EXT_histogram, "GetFloatv");
9818+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MinMaxEnabled);
9819+ break;
9820+ case GL_COLOR_TABLE_SGI:
9821+ CHECK_EXT1(SGI_color_table, "GetFloatv");
9822+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.ColorTableEnabled);
9823+ break;
9824+ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
9825+ CHECK_EXT1(SGI_color_table, "GetFloatv");
9826+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.PostConvolutionColorTableEnabled);
9827+ break;
9828+ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
9829+ CHECK_EXT1(SGI_color_table, "GetFloatv");
9830+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.PostColorMatrixColorTableEnabled);
9831+ break;
9832+ case GL_TEXTURE_COLOR_TABLE_SGI:
9833+ CHECK_EXT1(SGI_texture_color_table, "GetFloatv");
9834+ params[0] = BOOLEAN_TO_FLOAT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled);
9835+ break;
9836+ case GL_COLOR_SUM_EXT:
9837+ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetFloatv");
9838+ params[0] = BOOLEAN_TO_FLOAT(ctx->Fog.ColorSumEnabled);
9839+ break;
9840+ case GL_CURRENT_SECONDARY_COLOR_EXT:
9841+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
9842+ {
9843+ FLUSH_CURRENT(ctx, 0);
9844+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0];
9845+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1];
9846+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2];
9847+ params[3] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3];
9848+ }
9849+ break;
9850+ case GL_SECONDARY_COLOR_ARRAY_EXT:
9851+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
9852+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->SecondaryColor.Enabled);
9853+ break;
9854+ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
9855+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
9856+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->SecondaryColor.Type);
9857+ break;
9858+ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
9859+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
9860+ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.Stride);
9861+ break;
9862+ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
9863+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
9864+ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.Size);
9865+ break;
9866+ case GL_CURRENT_FOG_COORDINATE_EXT:
9867+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
9868+ {
9869+ FLUSH_CURRENT(ctx, 0);
9870+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_FOG][0];
9871+ }
9872+ break;
9873+ case GL_FOG_COORDINATE_ARRAY_EXT:
9874+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
9875+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->FogCoord.Enabled);
9876+ break;
9877+ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
9878+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
9879+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->FogCoord.Type);
9880+ break;
9881+ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
9882+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
9883+ params[0] = (GLfloat)(ctx->Array.ArrayObj->FogCoord.Stride);
9884+ break;
9885+ case GL_FOG_COORDINATE_SOURCE_EXT:
9886+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
9887+ params[0] = ENUM_TO_FLOAT(ctx->Fog.FogCoordinateSource);
9888+ break;
9889+ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
9890+ CHECK_EXT1(EXT_texture_lod_bias, "GetFloatv");
9891+ params[0] = ctx->Const.MaxTextureLodBias;
9892+ break;
9893+ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
9894+ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetFloatv");
9895+ params[0] = ctx->Const.MaxTextureMaxAnisotropy;
9896+ break;
9897+ case GL_MULTISAMPLE_ARB:
9898+ CHECK_EXT1(ARB_multisample, "GetFloatv");
9899+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.Enabled);
9900+ break;
9901+ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
9902+ CHECK_EXT1(ARB_multisample, "GetFloatv");
9903+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleAlphaToCoverage);
9904+ break;
9905+ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
9906+ CHECK_EXT1(ARB_multisample, "GetFloatv");
9907+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleAlphaToOne);
9908+ break;
9909+ case GL_SAMPLE_COVERAGE_ARB:
9910+ CHECK_EXT1(ARB_multisample, "GetFloatv");
9911+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleCoverage);
9912+ break;
9913+ case GL_SAMPLE_COVERAGE_VALUE_ARB:
9914+ CHECK_EXT1(ARB_multisample, "GetFloatv");
9915+ params[0] = ctx->Multisample.SampleCoverageValue;
9916+ break;
9917+ case GL_SAMPLE_COVERAGE_INVERT_ARB:
9918+ CHECK_EXT1(ARB_multisample, "GetFloatv");
9919+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleCoverageInvert);
9920+ break;
9921+ case GL_SAMPLE_BUFFERS_ARB:
9922+ CHECK_EXT1(ARB_multisample, "GetFloatv");
9923+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.sampleBuffers);
9924+ break;
9925+ case GL_SAMPLES_ARB:
9926+ CHECK_EXT1(ARB_multisample, "GetFloatv");
9927+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.samples);
9928+ break;
9929+ case GL_RASTER_POSITION_UNCLIPPED_IBM:
9930+ CHECK_EXT1(IBM_rasterpos_clip, "GetFloatv");
9931+ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.RasterPositionUnclipped);
9932+ break;
9933+ case GL_POINT_SPRITE_NV:
9934+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetFloatv");
9935+ params[0] = BOOLEAN_TO_FLOAT(ctx->Point.PointSprite);
9936+ break;
9937+ case GL_POINT_SPRITE_R_MODE_NV:
9938+ CHECK_EXT1(NV_point_sprite, "GetFloatv");
9939+ params[0] = ENUM_TO_FLOAT(ctx->Point.SpriteRMode);
9940+ break;
9941+ case GL_POINT_SPRITE_COORD_ORIGIN:
9942+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetFloatv");
9943+ params[0] = ENUM_TO_FLOAT(ctx->Point.SpriteOrigin);
9944+ break;
9945+ case GL_GENERATE_MIPMAP_HINT_SGIS:
9946+ CHECK_EXT1(SGIS_generate_mipmap, "GetFloatv");
9947+ params[0] = ENUM_TO_FLOAT(ctx->Hint.GenerateMipmap);
9948+ break;
9949+ case GL_VERTEX_PROGRAM_BINDING_NV:
9950+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9951+ params[0] = (GLfloat)((ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0));
9952+ break;
9953+ case GL_VERTEX_ATTRIB_ARRAY0_NV:
9954+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9955+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[0].Enabled);
9956+ break;
9957+ case GL_VERTEX_ATTRIB_ARRAY1_NV:
9958+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9959+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[1].Enabled);
9960+ break;
9961+ case GL_VERTEX_ATTRIB_ARRAY2_NV:
9962+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9963+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[2].Enabled);
9964+ break;
9965+ case GL_VERTEX_ATTRIB_ARRAY3_NV:
9966+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9967+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[3].Enabled);
9968+ break;
9969+ case GL_VERTEX_ATTRIB_ARRAY4_NV:
9970+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9971+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[4].Enabled);
9972+ break;
9973+ case GL_VERTEX_ATTRIB_ARRAY5_NV:
9974+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9975+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[5].Enabled);
9976+ break;
9977+ case GL_VERTEX_ATTRIB_ARRAY6_NV:
9978+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9979+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[6].Enabled);
9980+ break;
9981+ case GL_VERTEX_ATTRIB_ARRAY7_NV:
9982+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9983+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[7].Enabled);
9984+ break;
9985+ case GL_VERTEX_ATTRIB_ARRAY8_NV:
9986+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9987+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[8].Enabled);
9988+ break;
9989+ case GL_VERTEX_ATTRIB_ARRAY9_NV:
9990+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9991+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[9].Enabled);
9992+ break;
9993+ case GL_VERTEX_ATTRIB_ARRAY10_NV:
9994+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9995+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[10].Enabled);
9996+ break;
9997+ case GL_VERTEX_ATTRIB_ARRAY11_NV:
9998+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9999+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[11].Enabled);
10000+ break;
10001+ case GL_VERTEX_ATTRIB_ARRAY12_NV:
10002+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10003+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[12].Enabled);
10004+ break;
10005+ case GL_VERTEX_ATTRIB_ARRAY13_NV:
10006+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10007+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[13].Enabled);
10008+ break;
10009+ case GL_VERTEX_ATTRIB_ARRAY14_NV:
10010+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10011+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[14].Enabled);
10012+ break;
10013+ case GL_VERTEX_ATTRIB_ARRAY15_NV:
10014+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10015+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[15].Enabled);
10016+ break;
10017+ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
10018+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10019+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[0]);
10020+ break;
10021+ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
10022+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10023+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[1]);
10024+ break;
10025+ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
10026+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10027+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[2]);
10028+ break;
10029+ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
10030+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10031+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[3]);
10032+ break;
10033+ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
10034+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10035+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[4]);
10036+ break;
10037+ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
10038+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10039+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[5]);
10040+ break;
10041+ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
10042+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10043+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[6]);
10044+ break;
10045+ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
10046+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10047+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[7]);
10048+ break;
10049+ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
10050+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10051+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[8]);
10052+ break;
10053+ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
10054+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10055+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[9]);
10056+ break;
10057+ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
10058+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10059+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[10]);
10060+ break;
10061+ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
10062+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10063+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[11]);
10064+ break;
10065+ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
10066+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10067+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[12]);
10068+ break;
10069+ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
10070+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10071+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[13]);
10072+ break;
10073+ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
10074+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10075+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[14]);
10076+ break;
10077+ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
10078+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10079+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[15]);
10080+ break;
10081+ case GL_FRAGMENT_PROGRAM_NV:
10082+ CHECK_EXT1(NV_fragment_program, "GetFloatv");
10083+ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.Enabled);
10084+ break;
10085+ case GL_FRAGMENT_PROGRAM_BINDING_NV:
10086+ CHECK_EXT1(NV_fragment_program, "GetFloatv");
10087+ params[0] = (GLfloat)(ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0);
10088+ break;
10089+ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
10090+ CHECK_EXT1(NV_fragment_program, "GetFloatv");
10091+ params[0] = (GLfloat)(MAX_NV_FRAGMENT_PROGRAM_PARAMS);
10092+ break;
10093+ case GL_TEXTURE_RECTANGLE_NV:
10094+ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
10095+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV));
10096+ break;
10097+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
10098+ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
10099+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name);
10100+ break;
10101+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
10102+ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
10103+ params[0] = (GLfloat)(ctx->Const.MaxTextureRectSize);
10104+ break;
10105+ case GL_STENCIL_TEST_TWO_SIDE_EXT:
10106+ CHECK_EXT1(EXT_stencil_two_side, "GetFloatv");
10107+ params[0] = BOOLEAN_TO_FLOAT(ctx->Stencil.TestTwoSide);
10108+ break;
10109+ case GL_ACTIVE_STENCIL_FACE_EXT:
10110+ CHECK_EXT1(EXT_stencil_two_side, "GetFloatv");
10111+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
10112+ break;
10113+ case GL_MAX_SHININESS_NV:
10114+ CHECK_EXT1(NV_light_max_exponent, "GetFloatv");
10115+ params[0] = ctx->Const.MaxShininess;
10116+ break;
10117+ case GL_MAX_SPOT_EXPONENT_NV:
10118+ CHECK_EXT1(NV_light_max_exponent, "GetFloatv");
10119+ params[0] = ctx->Const.MaxSpotExponent;
10120+ break;
10121+ case GL_ARRAY_BUFFER_BINDING_ARB:
10122+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10123+ params[0] = (GLfloat)(ctx->Array.ArrayBufferObj->Name);
10124+ break;
10125+ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
10126+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10127+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
10128+ break;
10129+ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
10130+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10131+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Normal.BufferObj->Name);
10132+ break;
10133+ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
10134+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10135+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.BufferObj->Name);
10136+ break;
10137+ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
10138+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10139+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Index.BufferObj->Name);
10140+ break;
10141+ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
10142+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10143+ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
10144+ break;
10145+ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
10146+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10147+ params[0] = (GLfloat)(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
10148+ break;
10149+ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
10150+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10151+ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
10152+ break;
10153+ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
10154+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10155+ params[0] = (GLfloat)(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
10156+ break;
10157+ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
10158+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10159+ params[0] = (GLfloat)(ctx->Array.ElementArrayBufferObj->Name);
10160+ break;
10161+ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
10162+ CHECK_EXT1(EXT_pixel_buffer_object, "GetFloatv");
10163+ params[0] = (GLfloat)(ctx->Pack.BufferObj->Name);
10164+ break;
10165+ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
10166+ CHECK_EXT1(EXT_pixel_buffer_object, "GetFloatv");
10167+ params[0] = (GLfloat)(ctx->Unpack.BufferObj->Name);
10168+ break;
10169+ case GL_VERTEX_PROGRAM_ARB:
10170+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
10171+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.Enabled);
10172+ break;
10173+ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
10174+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
10175+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.PointSizeEnabled);
10176+ break;
10177+ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
10178+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
10179+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.TwoSideEnabled);
10180+ break;
10181+ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
10182+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
10183+ params[0] = (GLfloat)(ctx->Const.MaxProgramMatrixStackDepth);
10184+ break;
10185+ case GL_MAX_PROGRAM_MATRICES_ARB:
10186+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
10187+ params[0] = (GLfloat)(ctx->Const.MaxProgramMatrices);
10188+ break;
10189+ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
10190+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
10191+ params[0] = BOOLEAN_TO_FLOAT(ctx->CurrentStack->Depth + 1);
10192+ break;
10193+ case GL_CURRENT_MATRIX_ARB:
10194+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetFloatv");
10195+ {
10196+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
10197+ params[0] = matrix[0];
10198+ params[1] = matrix[1];
10199+ params[2] = matrix[2];
10200+ params[3] = matrix[3];
10201+ params[4] = matrix[4];
10202+ params[5] = matrix[5];
10203+ params[6] = matrix[6];
10204+ params[7] = matrix[7];
10205+ params[8] = matrix[8];
10206+ params[9] = matrix[9];
10207+ params[10] = matrix[10];
10208+ params[11] = matrix[11];
10209+ params[12] = matrix[12];
10210+ params[13] = matrix[13];
10211+ params[14] = matrix[14];
10212+ params[15] = matrix[15];
10213+ }
10214+ break;
10215+ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
10216+ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetFloatv");
10217+ {
10218+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
10219+ params[0] = matrix[0];
10220+ params[1] = matrix[4];
10221+ params[2] = matrix[8];
10222+ params[3] = matrix[12];
10223+ params[4] = matrix[1];
10224+ params[5] = matrix[5];
10225+ params[6] = matrix[9];
10226+ params[7] = matrix[13];
10227+ params[8] = matrix[2];
10228+ params[9] = matrix[6];
10229+ params[10] = matrix[10];
10230+ params[11] = matrix[14];
10231+ params[12] = matrix[3];
10232+ params[13] = matrix[7];
10233+ params[14] = matrix[11];
10234+ params[15] = matrix[15];
10235+ }
10236+ break;
10237+ case GL_MAX_VERTEX_ATTRIBS_ARB:
10238+ CHECK_EXT1(ARB_vertex_program, "GetFloatv");
10239+ params[0] = (GLfloat)(ctx->Const.VertexProgram.MaxAttribs);
10240+ break;
10241+ case GL_PROGRAM_ERROR_POSITION_ARB:
10242+ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetFloatv");
10243+ params[0] = (GLfloat)(ctx->Program.ErrorPos);
10244+ break;
10245+ case GL_FRAGMENT_PROGRAM_ARB:
10246+ CHECK_EXT1(ARB_fragment_program, "GetFloatv");
10247+ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.Enabled);
10248+ break;
10249+ case GL_MAX_TEXTURE_COORDS_ARB:
10250+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetFloatv");
10251+ params[0] = (GLfloat)(ctx->Const.MaxTextureCoordUnits);
10252+ break;
10253+ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
10254+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetFloatv");
10255+ params[0] = (GLfloat)(ctx->Const.MaxTextureImageUnits);
10256+ break;
10257+ case GL_DEPTH_BOUNDS_TEST_EXT:
10258+ CHECK_EXT1(EXT_depth_bounds_test, "GetFloatv");
10259+ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.BoundsTest);
10260+ break;
10261+ case GL_DEPTH_BOUNDS_EXT:
10262+ CHECK_EXT1(EXT_depth_bounds_test, "GetFloatv");
10263+ params[0] = ctx->Depth.BoundsMin;
10264+ params[1] = ctx->Depth.BoundsMax;
10265+ break;
10266+ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
10267+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10268+ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.CallbackEnabled);
10269+ break;
10270+ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
10271+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10272+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.CallbackEnabled);
10273+ break;
10274+ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
10275+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10276+ params[0] = (GLfloat)(ctx->FragmentProgram.CurrentPosition);
10277+ break;
10278+ case GL_VERTEX_PROGRAM_POSITION_MESA:
10279+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10280+ params[0] = (GLfloat)(ctx->VertexProgram.CurrentPosition);
10281+ break;
10282+ case GL_MAX_DRAW_BUFFERS_ARB:
10283+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10284+ params[0] = (GLfloat)(ctx->Const.MaxDrawBuffers);
10285+ break;
10286+ case GL_DRAW_BUFFER0_ARB:
10287+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10288+ params[0] = ENUM_TO_FLOAT(ctx->DrawBuffer->ColorDrawBuffer[0]);
10289+ break;
10290+ case GL_DRAW_BUFFER1_ARB:
10291+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10292+ {
10293+ GLenum buffer;
10294+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
10295+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
10296+ return;
10297+ }
10298+ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
10299+ params[0] = ENUM_TO_FLOAT(buffer);
10300+ }
10301+ break;
10302+ case GL_DRAW_BUFFER2_ARB:
10303+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10304+ {
10305+ GLenum buffer;
10306+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
10307+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
10308+ return;
10309+ }
10310+ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
10311+ params[0] = ENUM_TO_FLOAT(buffer);
10312+ }
10313+ break;
10314+ case GL_DRAW_BUFFER3_ARB:
10315+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10316+ {
10317+ GLenum buffer;
10318+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
10319+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
10320+ return;
10321+ }
10322+ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
10323+ params[0] = ENUM_TO_FLOAT(buffer);
10324+ }
10325+ break;
10326+ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
10327+ CHECK_EXT1(OES_read_format, "GetFloatv");
10328+ params[0] = (GLfloat)(ctx->Const.ColorReadType);
10329+ break;
10330+ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
10331+ CHECK_EXT1(OES_read_format, "GetFloatv");
10332+ params[0] = (GLfloat)(ctx->Const.ColorReadFormat);
10333+ break;
10334+ case GL_NUM_FRAGMENT_REGISTERS_ATI:
10335+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10336+ params[0] = (GLfloat)(6);
10337+ break;
10338+ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
10339+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10340+ params[0] = (GLfloat)(8);
10341+ break;
10342+ case GL_NUM_PASSES_ATI:
10343+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10344+ params[0] = (GLfloat)(2);
10345+ break;
10346+ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
10347+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10348+ params[0] = (GLfloat)(8);
10349+ break;
10350+ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
10351+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10352+ params[0] = (GLfloat)(16);
10353+ break;
10354+ case GL_COLOR_ALPHA_PAIRING_ATI:
10355+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10356+ params[0] = BOOLEAN_TO_FLOAT(GL_TRUE);
10357+ break;
10358+ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
10359+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10360+ params[0] = (GLfloat)(3);
10361+ break;
10362+ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
10363+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10364+ params[0] = (GLfloat)(3);
10365+ break;
10366+ case GL_STENCIL_BACK_FUNC:
10367+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.Function[1]);
10368+ break;
10369+ case GL_STENCIL_BACK_VALUE_MASK:
10370+ params[0] = (GLfloat)(ctx->Stencil.ValueMask[1]);
10371+ break;
10372+ case GL_STENCIL_BACK_REF:
10373+ params[0] = (GLfloat)(ctx->Stencil.Ref[1]);
10374+ break;
10375+ case GL_STENCIL_BACK_FAIL:
10376+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.FailFunc[1]);
10377+ break;
10378+ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
10379+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZFailFunc[1]);
10380+ break;
10381+ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
10382+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZPassFunc[1]);
10383+ break;
10384+ case GL_FRAMEBUFFER_BINDING_EXT:
10385+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10386+ params[0] = (GLfloat)(ctx->DrawBuffer->Name);
10387+ break;
10388+ case GL_RENDERBUFFER_BINDING_EXT:
10389+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10390+ params[0] = (GLfloat)(ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0);
10391+ break;
10392+ case GL_MAX_COLOR_ATTACHMENTS_EXT:
10393+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10394+ params[0] = (GLfloat)(ctx->Const.MaxColorAttachments);
10395+ break;
10396+ case GL_MAX_RENDERBUFFER_SIZE_EXT:
10397+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10398+ params[0] = (GLfloat)(ctx->Const.MaxRenderbufferSize);
10399+ break;
10400+ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
10401+ CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
10402+ params[0] = (GLfloat)(MAX_FRAGMENT_UNIFORM_COMPONENTS);
10403+ break;
10404+ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
10405+ CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
10406+ params[0] = ENUM_TO_FLOAT(ctx->Hint.FragmentShaderDerivative);
10407+ break;
10408+ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
10409+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10410+ params[0] = (GLfloat)(MAX_VERTEX_UNIFORM_COMPONENTS);
10411+ break;
10412+ case GL_MAX_VARYING_FLOATS_ARB:
10413+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10414+ params[0] = (GLfloat)(MAX_VARYING_FLOATS);
10415+ break;
10416+ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
10417+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10418+ params[0] = (GLfloat)(MAX_VERTEX_TEXTURE_IMAGE_UNITS);
10419+ break;
10420+ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
10421+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10422+ params[0] = (GLfloat)(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
10423+ break;
10424+ default:
10425+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv(pname=0x%x)", pname);
10426+ }
10427+}
10428+
10429+void GLAPIENTRY
10430+_mesa_GetIntegerv( GLenum pname, GLint *params )
10431+{
10432+ GET_CURRENT_CONTEXT(ctx);
10433+ ASSERT_OUTSIDE_BEGIN_END(ctx);
10434+
10435+ if (!params)
10436+ return;
10437+
10438+ if (ctx->NewState)
10439+ _mesa_update_state(ctx);
10440+
10441+ if (ctx->Driver.GetIntegerv &&
10442+ ctx->Driver.GetIntegerv(ctx, pname, params))
10443+ return;
10444+
10445+ switch (pname) {
10446+ case GL_ACCUM_RED_BITS:
10447+ params[0] = ctx->DrawBuffer->Visual.accumRedBits;
10448+ break;
10449+ case GL_ACCUM_GREEN_BITS:
10450+ params[0] = ctx->DrawBuffer->Visual.accumGreenBits;
10451+ break;
10452+ case GL_ACCUM_BLUE_BITS:
10453+ params[0] = ctx->DrawBuffer->Visual.accumBlueBits;
10454+ break;
10455+ case GL_ACCUM_ALPHA_BITS:
10456+ params[0] = ctx->DrawBuffer->Visual.accumAlphaBits;
10457+ break;
10458+ case GL_ACCUM_CLEAR_VALUE:
10459+ params[0] = FLOAT_TO_INT(ctx->Accum.ClearColor[0]);
10460+ params[1] = FLOAT_TO_INT(ctx->Accum.ClearColor[1]);
10461+ params[2] = FLOAT_TO_INT(ctx->Accum.ClearColor[2]);
10462+ params[3] = FLOAT_TO_INT(ctx->Accum.ClearColor[3]);
10463+ break;
10464+ case GL_ALPHA_BIAS:
10465+ params[0] = IROUND(ctx->Pixel.AlphaBias);
10466+ break;
10467+ case GL_ALPHA_BITS:
10468+ params[0] = ctx->DrawBuffer->Visual.alphaBits;
10469+ break;
10470+ case GL_ALPHA_SCALE:
10471+ params[0] = IROUND(ctx->Pixel.AlphaScale);
10472+ break;
10473+ case GL_ALPHA_TEST:
10474+ params[0] = BOOLEAN_TO_INT(ctx->Color.AlphaEnabled);
10475+ break;
10476+ case GL_ALPHA_TEST_FUNC:
10477+ params[0] = ENUM_TO_INT(ctx->Color.AlphaFunc);
10478+ break;
10479+ case GL_ALPHA_TEST_REF:
10480+ params[0] = FLOAT_TO_INT(ctx->Color.AlphaRef);
10481+ break;
10482+ case GL_ATTRIB_STACK_DEPTH:
10483+ params[0] = ctx->AttribStackDepth;
10484+ break;
10485+ case GL_AUTO_NORMAL:
10486+ params[0] = BOOLEAN_TO_INT(ctx->Eval.AutoNormal);
10487+ break;
10488+ case GL_AUX_BUFFERS:
10489+ params[0] = ctx->DrawBuffer->Visual.numAuxBuffers;
10490+ break;
10491+ case GL_BLEND:
10492+ params[0] = BOOLEAN_TO_INT(ctx->Color.BlendEnabled);
10493+ break;
10494+ case GL_BLEND_DST:
10495+ params[0] = ENUM_TO_INT(ctx->Color.BlendDstRGB);
10496+ break;
10497+ case GL_BLEND_SRC:
10498+ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcRGB);
10499+ break;
10500+ case GL_BLEND_SRC_RGB_EXT:
10501+ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcRGB);
10502+ break;
10503+ case GL_BLEND_DST_RGB_EXT:
10504+ params[0] = ENUM_TO_INT(ctx->Color.BlendDstRGB);
10505+ break;
10506+ case GL_BLEND_SRC_ALPHA_EXT:
10507+ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcA);
10508+ break;
10509+ case GL_BLEND_DST_ALPHA_EXT:
10510+ params[0] = ENUM_TO_INT(ctx->Color.BlendDstA);
10511+ break;
10512+ case GL_BLEND_EQUATION:
10513+ params[0] = ENUM_TO_INT(ctx->Color.BlendEquationRGB );
10514+ break;
10515+ case GL_BLEND_EQUATION_ALPHA_EXT:
10516+ params[0] = ENUM_TO_INT(ctx->Color.BlendEquationA );
10517+ break;
10518+ case GL_BLEND_COLOR_EXT:
10519+ params[0] = FLOAT_TO_INT(ctx->Color.BlendColor[0]);
10520+ params[1] = FLOAT_TO_INT(ctx->Color.BlendColor[1]);
10521+ params[2] = FLOAT_TO_INT(ctx->Color.BlendColor[2]);
10522+ params[3] = FLOAT_TO_INT(ctx->Color.BlendColor[3]);
10523+ break;
10524+ case GL_BLUE_BIAS:
10525+ params[0] = IROUND(ctx->Pixel.BlueBias);
10526+ break;
10527+ case GL_BLUE_BITS:
10528+ params[0] = ctx->DrawBuffer->Visual.blueBits;
10529+ break;
10530+ case GL_BLUE_SCALE:
10531+ params[0] = IROUND(ctx->Pixel.BlueScale);
10532+ break;
10533+ case GL_CLIENT_ATTRIB_STACK_DEPTH:
10534+ params[0] = ctx->ClientAttribStackDepth;
10535+ break;
10536+ case GL_CLIP_PLANE0:
10537+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 0) & 1);
10538+ break;
10539+ case GL_CLIP_PLANE1:
10540+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 1) & 1);
10541+ break;
10542+ case GL_CLIP_PLANE2:
10543+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 2) & 1);
10544+ break;
10545+ case GL_CLIP_PLANE3:
10546+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 3) & 1);
10547+ break;
10548+ case GL_CLIP_PLANE4:
10549+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 4) & 1);
10550+ break;
10551+ case GL_CLIP_PLANE5:
10552+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 5) & 1);
10553+ break;
10554+ case GL_COLOR_CLEAR_VALUE:
10555+ params[0] = FLOAT_TO_INT(ctx->Color.ClearColor[0]);
10556+ params[1] = FLOAT_TO_INT(ctx->Color.ClearColor[1]);
10557+ params[2] = FLOAT_TO_INT(ctx->Color.ClearColor[2]);
10558+ params[3] = FLOAT_TO_INT(ctx->Color.ClearColor[3]);
10559+ break;
10560+ case GL_COLOR_MATERIAL:
10561+ params[0] = BOOLEAN_TO_INT(ctx->Light.ColorMaterialEnabled);
10562+ break;
10563+ case GL_COLOR_MATERIAL_FACE:
10564+ params[0] = ENUM_TO_INT(ctx->Light.ColorMaterialFace);
10565+ break;
10566+ case GL_COLOR_MATERIAL_PARAMETER:
10567+ params[0] = ENUM_TO_INT(ctx->Light.ColorMaterialMode);
10568+ break;
10569+ case GL_COLOR_WRITEMASK:
10570+ params[0] = ctx->Color.ColorMask[RCOMP] ? 1 : 0;
10571+ params[1] = ctx->Color.ColorMask[GCOMP] ? 1 : 0;
10572+ params[2] = ctx->Color.ColorMask[BCOMP] ? 1 : 0;
10573+ params[3] = ctx->Color.ColorMask[ACOMP] ? 1 : 0;
10574+ break;
10575+ case GL_CULL_FACE:
10576+ params[0] = BOOLEAN_TO_INT(ctx->Polygon.CullFlag);
10577+ break;
10578+ case GL_CULL_FACE_MODE:
10579+ params[0] = ENUM_TO_INT(ctx->Polygon.CullFaceMode);
10580+ break;
10581+ case GL_CURRENT_COLOR:
10582+ {
10583+ FLUSH_CURRENT(ctx, 0);
10584+ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]);
10585+ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]);
10586+ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]);
10587+ params[3] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]);
10588+ }
10589+ break;
10590+ case GL_CURRENT_INDEX:
10591+ {
10592+ FLUSH_CURRENT(ctx, 0);
10593+ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]);
10594+ }
10595+ break;
10596+ case GL_CURRENT_NORMAL:
10597+ {
10598+ FLUSH_CURRENT(ctx, 0);
10599+ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]);
10600+ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]);
10601+ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]);
10602+ }
10603+ break;
10604+ case GL_CURRENT_RASTER_COLOR:
10605+ params[0] = FLOAT_TO_INT(ctx->Current.RasterColor[0]);
10606+ params[1] = FLOAT_TO_INT(ctx->Current.RasterColor[1]);
10607+ params[2] = FLOAT_TO_INT(ctx->Current.RasterColor[2]);
10608+ params[3] = FLOAT_TO_INT(ctx->Current.RasterColor[3]);
10609+ break;
10610+ case GL_CURRENT_RASTER_DISTANCE:
10611+ params[0] = IROUND(ctx->Current.RasterDistance);
10612+ break;
10613+ case GL_CURRENT_RASTER_INDEX:
10614+ params[0] = IROUND(ctx->Current.RasterIndex);
10615+ break;
10616+ case GL_CURRENT_RASTER_POSITION:
10617+ params[0] = IROUND(ctx->Current.RasterPos[0]);
10618+ params[1] = IROUND(ctx->Current.RasterPos[1]);
10619+ params[2] = IROUND(ctx->Current.RasterPos[2]);
10620+ params[3] = IROUND(ctx->Current.RasterPos[3]);
10621+ break;
10622+ case GL_CURRENT_RASTER_SECONDARY_COLOR:
10623+ params[0] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[0]);
10624+ params[1] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[1]);
10625+ params[2] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[2]);
10626+ params[3] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[3]);
10627+ break;
10628+ case GL_CURRENT_RASTER_TEXTURE_COORDS:
10629+ {
10630+ const GLuint texUnit = ctx->Texture.CurrentUnit;
10631+ params[0] = IROUND(ctx->Current.RasterTexCoords[texUnit][0]);
10632+ params[1] = IROUND(ctx->Current.RasterTexCoords[texUnit][1]);
10633+ params[2] = IROUND(ctx->Current.RasterTexCoords[texUnit][2]);
10634+ params[3] = IROUND(ctx->Current.RasterTexCoords[texUnit][3]);
10635+ }
10636+ break;
10637+ case GL_CURRENT_RASTER_POSITION_VALID:
10638+ params[0] = BOOLEAN_TO_INT(ctx->Current.RasterPosValid);
10639+ break;
10640+ case GL_CURRENT_TEXTURE_COORDS:
10641+ {
10642+ const GLuint texUnit = ctx->Texture.CurrentUnit;
10643+ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]);
10644+ params[1] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]);
10645+ params[2] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]);
10646+ params[3] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]);
10647+ }
10648+ break;
10649+ case GL_DEPTH_BIAS:
10650+ params[0] = IROUND(ctx->Pixel.DepthBias);
10651+ break;
10652+ case GL_DEPTH_BITS:
10653+ params[0] = ctx->DrawBuffer->Visual.depthBits;
10654+ break;
10655+ case GL_DEPTH_CLEAR_VALUE:
10656+ params[0] = IROUND(ctx->Depth.Clear);
10657+ break;
10658+ case GL_DEPTH_FUNC:
10659+ params[0] = ENUM_TO_INT(ctx->Depth.Func);
10660+ break;
10661+ case GL_DEPTH_RANGE:
10662+ params[0] = FLOAT_TO_INT(ctx->Viewport.Near);
10663+ params[1] = FLOAT_TO_INT(ctx->Viewport.Far);
10664+ break;
10665+ case GL_DEPTH_SCALE:
10666+ params[0] = IROUND(ctx->Pixel.DepthScale);
10667+ break;
10668+ case GL_DEPTH_TEST:
10669+ params[0] = BOOLEAN_TO_INT(ctx->Depth.Test);
10670+ break;
10671+ case GL_DEPTH_WRITEMASK:
10672+ params[0] = BOOLEAN_TO_INT(ctx->Depth.Mask);
10673+ break;
10674+ case GL_DITHER:
10675+ params[0] = BOOLEAN_TO_INT(ctx->Color.DitherFlag);
10676+ break;
10677+ case GL_DOUBLEBUFFER:
10678+ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.doubleBufferMode);
10679+ break;
10680+ case GL_DRAW_BUFFER:
10681+ params[0] = ENUM_TO_INT(ctx->DrawBuffer->ColorDrawBuffer[0]);
10682+ break;
10683+ case GL_EDGE_FLAG:
10684+ {
10685+ FLUSH_CURRENT(ctx, 0);
10686+ params[0] = BOOLEAN_TO_INT(ctx->Current.EdgeFlag);
10687+ }
10688+ break;
10689+ case GL_FEEDBACK_BUFFER_SIZE:
10690+ params[0] = ctx->Feedback.BufferSize;
10691+ break;
10692+ case GL_FEEDBACK_BUFFER_TYPE:
10693+ params[0] = ENUM_TO_INT(ctx->Feedback.Type);
10694+ break;
10695+ case GL_FOG:
10696+ params[0] = BOOLEAN_TO_INT(ctx->Fog.Enabled);
10697+ break;
10698+ case GL_FOG_COLOR:
10699+ params[0] = FLOAT_TO_INT(ctx->Fog.Color[0]);
10700+ params[1] = FLOAT_TO_INT(ctx->Fog.Color[1]);
10701+ params[2] = FLOAT_TO_INT(ctx->Fog.Color[2]);
10702+ params[3] = FLOAT_TO_INT(ctx->Fog.Color[3]);
10703+ break;
10704+ case GL_FOG_DENSITY:
10705+ params[0] = IROUND(ctx->Fog.Density);
10706+ break;
10707+ case GL_FOG_END:
10708+ params[0] = IROUND(ctx->Fog.End);
10709+ break;
10710+ case GL_FOG_HINT:
10711+ params[0] = ENUM_TO_INT(ctx->Hint.Fog);
10712+ break;
10713+ case GL_FOG_INDEX:
10714+ params[0] = IROUND(ctx->Fog.Index);
10715+ break;
10716+ case GL_FOG_MODE:
10717+ params[0] = ENUM_TO_INT(ctx->Fog.Mode);
10718+ break;
10719+ case GL_FOG_START:
10720+ params[0] = IROUND(ctx->Fog.Start);
10721+ break;
10722+ case GL_FRONT_FACE:
10723+ params[0] = ENUM_TO_INT(ctx->Polygon.FrontFace);
10724+ break;
10725+ case GL_GREEN_BIAS:
10726+ params[0] = IROUND(ctx->Pixel.GreenBias);
10727+ break;
10728+ case GL_GREEN_BITS:
10729+ params[0] = ctx->DrawBuffer->Visual.greenBits;
10730+ break;
10731+ case GL_GREEN_SCALE:
10732+ params[0] = IROUND(ctx->Pixel.GreenScale);
10733+ break;
10734+ case GL_INDEX_BITS:
10735+ params[0] = ctx->DrawBuffer->Visual.indexBits;
10736+ break;
10737+ case GL_INDEX_CLEAR_VALUE:
10738+ params[0] = ctx->Color.ClearIndex;
10739+ break;
10740+ case GL_INDEX_MODE:
10741+ params[0] = BOOLEAN_TO_INT(!ctx->DrawBuffer->Visual.rgbMode);
10742+ break;
10743+ case GL_INDEX_OFFSET:
10744+ params[0] = ctx->Pixel.IndexOffset;
10745+ break;
10746+ case GL_INDEX_SHIFT:
10747+ params[0] = ctx->Pixel.IndexShift;
10748+ break;
10749+ case GL_INDEX_WRITEMASK:
10750+ params[0] = ctx->Color.IndexMask;
10751+ break;
10752+ case GL_LIGHT0:
10753+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[0].Enabled);
10754+ break;
10755+ case GL_LIGHT1:
10756+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[1].Enabled);
10757+ break;
10758+ case GL_LIGHT2:
10759+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[2].Enabled);
10760+ break;
10761+ case GL_LIGHT3:
10762+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[3].Enabled);
10763+ break;
10764+ case GL_LIGHT4:
10765+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[4].Enabled);
10766+ break;
10767+ case GL_LIGHT5:
10768+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[5].Enabled);
10769+ break;
10770+ case GL_LIGHT6:
10771+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[6].Enabled);
10772+ break;
10773+ case GL_LIGHT7:
10774+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[7].Enabled);
10775+ break;
10776+ case GL_LIGHTING:
10777+ params[0] = BOOLEAN_TO_INT(ctx->Light.Enabled);
10778+ break;
10779+ case GL_LIGHT_MODEL_AMBIENT:
10780+ params[0] = FLOAT_TO_INT(ctx->Light.Model.Ambient[0]);
10781+ params[1] = FLOAT_TO_INT(ctx->Light.Model.Ambient[1]);
10782+ params[2] = FLOAT_TO_INT(ctx->Light.Model.Ambient[2]);
10783+ params[3] = FLOAT_TO_INT(ctx->Light.Model.Ambient[3]);
10784+ break;
10785+ case GL_LIGHT_MODEL_COLOR_CONTROL:
10786+ params[0] = ENUM_TO_INT(ctx->Light.Model.ColorControl);
10787+ break;
10788+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
10789+ params[0] = BOOLEAN_TO_INT(ctx->Light.Model.LocalViewer);
10790+ break;
10791+ case GL_LIGHT_MODEL_TWO_SIDE:
10792+ params[0] = BOOLEAN_TO_INT(ctx->Light.Model.TwoSide);
10793+ break;
10794+ case GL_LINE_SMOOTH:
10795+ params[0] = BOOLEAN_TO_INT(ctx->Line.SmoothFlag);
10796+ break;
10797+ case GL_LINE_SMOOTH_HINT:
10798+ params[0] = ENUM_TO_INT(ctx->Hint.LineSmooth);
10799+ break;
10800+ case GL_LINE_STIPPLE:
10801+ params[0] = BOOLEAN_TO_INT(ctx->Line.StippleFlag);
10802+ break;
10803+ case GL_LINE_STIPPLE_PATTERN:
10804+ params[0] = ctx->Line.StipplePattern;
10805+ break;
10806+ case GL_LINE_STIPPLE_REPEAT:
10807+ params[0] = ctx->Line.StippleFactor;
10808+ break;
10809+ case GL_LINE_WIDTH:
10810+ params[0] = IROUND(ctx->Line.Width);
10811+ break;
10812+ case GL_LINE_WIDTH_GRANULARITY:
10813+ params[0] = IROUND(ctx->Const.LineWidthGranularity);
10814+ break;
10815+ case GL_LINE_WIDTH_RANGE:
10816+ params[0] = IROUND(ctx->Const.MinLineWidthAA);
10817+ params[1] = IROUND(ctx->Const.MaxLineWidthAA);
10818+ break;
10819+ case GL_ALIASED_LINE_WIDTH_RANGE:
10820+ params[0] = IROUND(ctx->Const.MinLineWidth);
10821+ params[1] = IROUND(ctx->Const.MaxLineWidth);
10822+ break;
10823+ case GL_LIST_BASE:
10824+ params[0] = ctx->List.ListBase;
10825+ break;
10826+ case GL_LIST_INDEX:
10827+ params[0] = ctx->ListState.CurrentListNum;
10828+ break;
10829+ case GL_LIST_MODE:
10830+ {
10831+ GLenum mode;
10832+ if (!ctx->CompileFlag)
10833+ mode = 0;
10834+ else if (ctx->ExecuteFlag)
10835+ mode = GL_COMPILE_AND_EXECUTE;
10836+ else
10837+ mode = GL_COMPILE;
10838+ params[0] = ENUM_TO_INT(mode);
10839+ }
10840+ break;
10841+ case GL_INDEX_LOGIC_OP:
10842+ params[0] = BOOLEAN_TO_INT(ctx->Color.IndexLogicOpEnabled);
10843+ break;
10844+ case GL_COLOR_LOGIC_OP:
10845+ params[0] = BOOLEAN_TO_INT(ctx->Color.ColorLogicOpEnabled);
10846+ break;
10847+ case GL_LOGIC_OP_MODE:
10848+ params[0] = ENUM_TO_INT(ctx->Color.LogicOp);
10849+ break;
10850+ case GL_MAP1_COLOR_4:
10851+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Color4);
10852+ break;
10853+ case GL_MAP1_GRID_DOMAIN:
10854+ params[0] = IROUND(ctx->Eval.MapGrid1u1);
10855+ params[1] = IROUND(ctx->Eval.MapGrid1u2);
10856+ break;
10857+ case GL_MAP1_GRID_SEGMENTS:
10858+ params[0] = ctx->Eval.MapGrid1un;
10859+ break;
10860+ case GL_MAP1_INDEX:
10861+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Index);
10862+ break;
10863+ case GL_MAP1_NORMAL:
10864+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Normal);
10865+ break;
10866+ case GL_MAP1_TEXTURE_COORD_1:
10867+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord1);
10868+ break;
10869+ case GL_MAP1_TEXTURE_COORD_2:
10870+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord2);
10871+ break;
10872+ case GL_MAP1_TEXTURE_COORD_3:
10873+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord3);
10874+ break;
10875+ case GL_MAP1_TEXTURE_COORD_4:
10876+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord4);
10877+ break;
10878+ case GL_MAP1_VERTEX_3:
10879+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Vertex3);
10880+ break;
10881+ case GL_MAP1_VERTEX_4:
10882+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Vertex4);
10883+ break;
10884+ case GL_MAP2_COLOR_4:
10885+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Color4);
10886+ break;
10887+ case GL_MAP2_GRID_DOMAIN:
10888+ params[0] = IROUND(ctx->Eval.MapGrid2u1);
10889+ params[1] = IROUND(ctx->Eval.MapGrid2u2);
10890+ params[2] = IROUND(ctx->Eval.MapGrid2v1);
10891+ params[3] = IROUND(ctx->Eval.MapGrid2v2);
10892+ break;
10893+ case GL_MAP2_GRID_SEGMENTS:
10894+ params[0] = ctx->Eval.MapGrid2un;
10895+ params[1] = ctx->Eval.MapGrid2vn;
10896+ break;
10897+ case GL_MAP2_INDEX:
10898+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Index);
10899+ break;
10900+ case GL_MAP2_NORMAL:
10901+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Normal);
10902+ break;
10903+ case GL_MAP2_TEXTURE_COORD_1:
10904+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord1);
10905+ break;
10906+ case GL_MAP2_TEXTURE_COORD_2:
10907+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord2);
10908+ break;
10909+ case GL_MAP2_TEXTURE_COORD_3:
10910+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord3);
10911+ break;
10912+ case GL_MAP2_TEXTURE_COORD_4:
10913+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord4);
10914+ break;
10915+ case GL_MAP2_VERTEX_3:
10916+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Vertex3);
10917+ break;
10918+ case GL_MAP2_VERTEX_4:
10919+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Vertex4);
10920+ break;
10921+ case GL_MAP_COLOR:
10922+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MapColorFlag);
10923+ break;
10924+ case GL_MAP_STENCIL:
10925+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MapStencilFlag);
10926+ break;
10927+ case GL_MATRIX_MODE:
10928+ params[0] = ENUM_TO_INT(ctx->Transform.MatrixMode);
10929+ break;
10930+ case GL_MAX_ATTRIB_STACK_DEPTH:
10931+ params[0] = MAX_ATTRIB_STACK_DEPTH;
10932+ break;
10933+ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
10934+ params[0] = MAX_CLIENT_ATTRIB_STACK_DEPTH;
10935+ break;
10936+ case GL_MAX_CLIP_PLANES:
10937+ params[0] = ctx->Const.MaxClipPlanes;
10938+ break;
10939+ case GL_MAX_ELEMENTS_VERTICES:
10940+ params[0] = ctx->Const.MaxArrayLockSize;
10941+ break;
10942+ case GL_MAX_ELEMENTS_INDICES:
10943+ params[0] = ctx->Const.MaxArrayLockSize;
10944+ break;
10945+ case GL_MAX_EVAL_ORDER:
10946+ params[0] = MAX_EVAL_ORDER;
10947+ break;
10948+ case GL_MAX_LIGHTS:
10949+ params[0] = ctx->Const.MaxLights;
10950+ break;
10951+ case GL_MAX_LIST_NESTING:
10952+ params[0] = MAX_LIST_NESTING;
10953+ break;
10954+ case GL_MAX_MODELVIEW_STACK_DEPTH:
10955+ params[0] = MAX_MODELVIEW_STACK_DEPTH;
10956+ break;
10957+ case GL_MAX_NAME_STACK_DEPTH:
10958+ params[0] = MAX_NAME_STACK_DEPTH;
10959+ break;
10960+ case GL_MAX_PIXEL_MAP_TABLE:
10961+ params[0] = MAX_PIXEL_MAP_TABLE;
10962+ break;
10963+ case GL_MAX_PROJECTION_STACK_DEPTH:
10964+ params[0] = MAX_PROJECTION_STACK_DEPTH;
10965+ break;
10966+ case GL_MAX_TEXTURE_SIZE:
10967+ params[0] = 1 << (ctx->Const.MaxTextureLevels - 1);
10968+ break;
10969+ case GL_MAX_3D_TEXTURE_SIZE:
10970+ params[0] = 1 << (ctx->Const.Max3DTextureLevels - 1);
10971+ break;
10972+ case GL_MAX_TEXTURE_STACK_DEPTH:
10973+ params[0] = MAX_TEXTURE_STACK_DEPTH;
10974+ break;
10975+ case GL_MAX_VIEWPORT_DIMS:
10976+ params[0] = ctx->Const.MaxViewportWidth;
10977+ params[1] = ctx->Const.MaxViewportHeight;
10978+ break;
10979+ case GL_MODELVIEW_MATRIX:
10980+ {
10981+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
10982+ params[0] = IROUND(matrix[0]);
10983+ params[1] = IROUND(matrix[1]);
10984+ params[2] = IROUND(matrix[2]);
10985+ params[3] = IROUND(matrix[3]);
10986+ params[4] = IROUND(matrix[4]);
10987+ params[5] = IROUND(matrix[5]);
10988+ params[6] = IROUND(matrix[6]);
10989+ params[7] = IROUND(matrix[7]);
10990+ params[8] = IROUND(matrix[8]);
10991+ params[9] = IROUND(matrix[9]);
10992+ params[10] = IROUND(matrix[10]);
10993+ params[11] = IROUND(matrix[11]);
10994+ params[12] = IROUND(matrix[12]);
10995+ params[13] = IROUND(matrix[13]);
10996+ params[14] = IROUND(matrix[14]);
10997+ params[15] = IROUND(matrix[15]);
10998+ }
10999+ break;
11000+ case GL_MODELVIEW_STACK_DEPTH:
11001+ params[0] = ctx->ModelviewMatrixStack.Depth + 1;
11002+ break;
11003+ case GL_NAME_STACK_DEPTH:
11004+ params[0] = ctx->Select.NameStackDepth;
11005+ break;
11006+ case GL_NORMALIZE:
11007+ params[0] = BOOLEAN_TO_INT(ctx->Transform.Normalize);
11008+ break;
11009+ case GL_PACK_ALIGNMENT:
11010+ params[0] = ctx->Pack.Alignment;
11011+ break;
11012+ case GL_PACK_LSB_FIRST:
11013+ params[0] = BOOLEAN_TO_INT(ctx->Pack.LsbFirst);
11014+ break;
11015+ case GL_PACK_ROW_LENGTH:
11016+ params[0] = ctx->Pack.RowLength;
11017+ break;
11018+ case GL_PACK_SKIP_PIXELS:
11019+ params[0] = ctx->Pack.SkipPixels;
11020+ break;
11021+ case GL_PACK_SKIP_ROWS:
11022+ params[0] = ctx->Pack.SkipRows;
11023+ break;
11024+ case GL_PACK_SWAP_BYTES:
11025+ params[0] = BOOLEAN_TO_INT(ctx->Pack.SwapBytes);
11026+ break;
11027+ case GL_PACK_SKIP_IMAGES_EXT:
11028+ params[0] = ctx->Pack.SkipImages;
11029+ break;
11030+ case GL_PACK_IMAGE_HEIGHT_EXT:
11031+ params[0] = ctx->Pack.ImageHeight;
11032+ break;
11033+ case GL_PACK_INVERT_MESA:
11034+ params[0] = BOOLEAN_TO_INT(ctx->Pack.Invert);
11035+ break;
11036+ case GL_PERSPECTIVE_CORRECTION_HINT:
11037+ params[0] = ENUM_TO_INT(ctx->Hint.PerspectiveCorrection);
11038+ break;
11039+ case GL_PIXEL_MAP_A_TO_A_SIZE:
11040+ params[0] = ctx->Pixel.MapAtoAsize;
11041+ break;
11042+ case GL_PIXEL_MAP_B_TO_B_SIZE:
11043+ params[0] = ctx->Pixel.MapBtoBsize;
11044+ break;
11045+ case GL_PIXEL_MAP_G_TO_G_SIZE:
11046+ params[0] = ctx->Pixel.MapGtoGsize;
11047+ break;
11048+ case GL_PIXEL_MAP_I_TO_A_SIZE:
11049+ params[0] = ctx->Pixel.MapItoAsize;
11050+ break;
11051+ case GL_PIXEL_MAP_I_TO_B_SIZE:
11052+ params[0] = ctx->Pixel.MapItoBsize;
11053+ break;
11054+ case GL_PIXEL_MAP_I_TO_G_SIZE:
11055+ params[0] = ctx->Pixel.MapItoGsize;
11056+ break;
11057+ case GL_PIXEL_MAP_I_TO_I_SIZE:
11058+ params[0] = ctx->Pixel.MapItoIsize;
11059+ break;
11060+ case GL_PIXEL_MAP_I_TO_R_SIZE:
11061+ params[0] = ctx->Pixel.MapItoRsize;
11062+ break;
11063+ case GL_PIXEL_MAP_R_TO_R_SIZE:
11064+ params[0] = ctx->Pixel.MapRtoRsize;
11065+ break;
11066+ case GL_PIXEL_MAP_S_TO_S_SIZE:
11067+ params[0] = ctx->Pixel.MapStoSsize;
11068+ break;
11069+ case GL_POINT_SIZE:
11070+ params[0] = IROUND(ctx->Point.Size);
11071+ break;
11072+ case GL_POINT_SIZE_GRANULARITY:
11073+ params[0] = IROUND(ctx->Const.PointSizeGranularity);
11074+ break;
11075+ case GL_POINT_SIZE_RANGE:
11076+ params[0] = IROUND(ctx->Const.MinPointSizeAA);
11077+ params[1] = IROUND(ctx->Const.MaxPointSizeAA);
11078+ break;
11079+ case GL_ALIASED_POINT_SIZE_RANGE:
11080+ params[0] = IROUND(ctx->Const.MinPointSize);
11081+ params[1] = IROUND(ctx->Const.MaxPointSize);
11082+ break;
11083+ case GL_POINT_SMOOTH:
11084+ params[0] = BOOLEAN_TO_INT(ctx->Point.SmoothFlag);
11085+ break;
11086+ case GL_POINT_SMOOTH_HINT:
11087+ params[0] = ENUM_TO_INT(ctx->Hint.PointSmooth);
11088+ break;
11089+ case GL_POINT_SIZE_MIN_EXT:
11090+ params[0] = IROUND(ctx->Point.MinSize);
11091+ break;
11092+ case GL_POINT_SIZE_MAX_EXT:
11093+ params[0] = IROUND(ctx->Point.MaxSize);
11094+ break;
11095+ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
11096+ params[0] = IROUND(ctx->Point.Threshold);
11097+ break;
11098+ case GL_DISTANCE_ATTENUATION_EXT:
11099+ params[0] = IROUND(ctx->Point.Params[0]);
11100+ params[1] = IROUND(ctx->Point.Params[1]);
11101+ params[2] = IROUND(ctx->Point.Params[2]);
11102+ break;
11103+ case GL_POLYGON_MODE:
11104+ params[0] = ENUM_TO_INT(ctx->Polygon.FrontMode);
11105+ params[1] = ENUM_TO_INT(ctx->Polygon.BackMode);
11106+ break;
11107+ case GL_POLYGON_OFFSET_BIAS_EXT:
11108+ params[0] = IROUND(ctx->Polygon.OffsetUnits);
11109+ break;
11110+ case GL_POLYGON_OFFSET_FACTOR:
11111+ params[0] = IROUND(ctx->Polygon.OffsetFactor );
11112+ break;
11113+ case GL_POLYGON_OFFSET_UNITS:
11114+ params[0] = IROUND(ctx->Polygon.OffsetUnits );
11115+ break;
11116+ case GL_POLYGON_SMOOTH:
11117+ params[0] = BOOLEAN_TO_INT(ctx->Polygon.SmoothFlag);
11118+ break;
11119+ case GL_POLYGON_SMOOTH_HINT:
11120+ params[0] = ENUM_TO_INT(ctx->Hint.PolygonSmooth);
11121+ break;
11122+ case GL_POLYGON_STIPPLE:
11123+ params[0] = BOOLEAN_TO_INT(ctx->Polygon.StippleFlag);
11124+ break;
11125+ case GL_PROJECTION_MATRIX:
11126+ {
11127+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
11128+ params[0] = IROUND(matrix[0]);
11129+ params[1] = IROUND(matrix[1]);
11130+ params[2] = IROUND(matrix[2]);
11131+ params[3] = IROUND(matrix[3]);
11132+ params[4] = IROUND(matrix[4]);
11133+ params[5] = IROUND(matrix[5]);
11134+ params[6] = IROUND(matrix[6]);
11135+ params[7] = IROUND(matrix[7]);
11136+ params[8] = IROUND(matrix[8]);
11137+ params[9] = IROUND(matrix[9]);
11138+ params[10] = IROUND(matrix[10]);
11139+ params[11] = IROUND(matrix[11]);
11140+ params[12] = IROUND(matrix[12]);
11141+ params[13] = IROUND(matrix[13]);
11142+ params[14] = IROUND(matrix[14]);
11143+ params[15] = IROUND(matrix[15]);
11144+ }
11145+ break;
11146+ case GL_PROJECTION_STACK_DEPTH:
11147+ params[0] = ctx->ProjectionMatrixStack.Depth + 1;
11148+ break;
11149+ case GL_READ_BUFFER:
11150+ params[0] = ENUM_TO_INT(ctx->ReadBuffer->ColorReadBuffer);
11151+ break;
11152+ case GL_RED_BIAS:
11153+ params[0] = IROUND(ctx->Pixel.RedBias);
11154+ break;
11155+ case GL_RED_BITS:
11156+ params[0] = ctx->DrawBuffer->Visual.redBits ;
11157+ break;
11158+ case GL_RED_SCALE:
11159+ params[0] = IROUND(ctx->Pixel.RedScale);
11160+ break;
11161+ case GL_RENDER_MODE:
11162+ params[0] = ENUM_TO_INT(ctx->RenderMode);
11163+ break;
11164+ case GL_RESCALE_NORMAL:
11165+ params[0] = BOOLEAN_TO_INT(ctx->Transform.RescaleNormals);
11166+ break;
11167+ case GL_RGBA_MODE:
11168+ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.rgbMode);
11169+ break;
11170+ case GL_SCISSOR_BOX:
11171+ params[0] = ctx->Scissor.X;
11172+ params[1] = ctx->Scissor.Y;
11173+ params[2] = ctx->Scissor.Width;
11174+ params[3] = ctx->Scissor.Height;
11175+ break;
11176+ case GL_SCISSOR_TEST:
11177+ params[0] = BOOLEAN_TO_INT(ctx->Scissor.Enabled);
11178+ break;
11179+ case GL_SELECTION_BUFFER_SIZE:
11180+ params[0] = ctx->Select.BufferSize;
11181+ break;
11182+ case GL_SHADE_MODEL:
11183+ params[0] = ENUM_TO_INT(ctx->Light.ShadeModel);
11184+ break;
11185+ case GL_SHARED_TEXTURE_PALETTE_EXT:
11186+ params[0] = BOOLEAN_TO_INT(ctx->Texture.SharedPalette);
11187+ break;
11188+ case GL_STENCIL_BITS:
11189+ params[0] = ctx->DrawBuffer->Visual.stencilBits;
11190+ break;
11191+ case GL_STENCIL_CLEAR_VALUE:
11192+ params[0] = ctx->Stencil.Clear;
11193+ break;
11194+ case GL_STENCIL_FAIL:
11195+ params[0] = ENUM_TO_INT(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
11196+ break;
11197+ case GL_STENCIL_FUNC:
11198+ params[0] = ENUM_TO_INT(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
11199+ break;
11200+ case GL_STENCIL_PASS_DEPTH_FAIL:
11201+ params[0] = ENUM_TO_INT(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
11202+ break;
11203+ case GL_STENCIL_PASS_DEPTH_PASS:
11204+ params[0] = ENUM_TO_INT(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
11205+ break;
11206+ case GL_STENCIL_REF:
11207+ params[0] = ctx->Stencil.Ref[ctx->Stencil.ActiveFace];
11208+ break;
11209+ case GL_STENCIL_TEST:
11210+ params[0] = BOOLEAN_TO_INT(ctx->Stencil.Enabled);
11211+ break;
11212+ case GL_STENCIL_VALUE_MASK:
11213+ params[0] = ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace];
11214+ break;
11215+ case GL_STENCIL_WRITEMASK:
11216+ params[0] = ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace];
11217+ break;
11218+ case GL_STEREO:
11219+ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.stereoMode);
11220+ break;
11221+ case GL_SUBPIXEL_BITS:
11222+ params[0] = ctx->Const.SubPixelBits;
11223+ break;
11224+ case GL_TEXTURE_1D:
11225+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_1D));
11226+ break;
11227+ case GL_TEXTURE_2D:
11228+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_2D));
11229+ break;
11230+ case GL_TEXTURE_3D:
11231+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_3D));
11232+ break;
11233+ case GL_TEXTURE_BINDING_1D:
11234+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name;
11235+ break;
11236+ case GL_TEXTURE_BINDING_2D:
11237+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name;
11238+ break;
11239+ case GL_TEXTURE_BINDING_3D:
11240+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name;
11241+ break;
11242+ case GL_TEXTURE_ENV_COLOR:
11243+ {
11244+ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
11245+ params[0] = FLOAT_TO_INT(color[0]);
11246+ params[1] = FLOAT_TO_INT(color[1]);
11247+ params[2] = FLOAT_TO_INT(color[2]);
11248+ params[3] = FLOAT_TO_INT(color[3]);
11249+ }
11250+ break;
11251+ case GL_TEXTURE_ENV_MODE:
11252+ params[0] = ENUM_TO_INT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
11253+ break;
11254+ case GL_TEXTURE_GEN_S:
11255+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
11256+ break;
11257+ case GL_TEXTURE_GEN_T:
11258+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0));
11259+ break;
11260+ case GL_TEXTURE_GEN_R:
11261+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0));
11262+ break;
11263+ case GL_TEXTURE_GEN_Q:
11264+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0));
11265+ break;
11266+ case GL_TEXTURE_MATRIX:
11267+ {
11268+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
11269+ params[0] = IROUND(matrix[0]);
11270+ params[1] = IROUND(matrix[1]);
11271+ params[2] = IROUND(matrix[2]);
11272+ params[3] = IROUND(matrix[3]);
11273+ params[4] = IROUND(matrix[4]);
11274+ params[5] = IROUND(matrix[5]);
11275+ params[6] = IROUND(matrix[6]);
11276+ params[7] = IROUND(matrix[7]);
11277+ params[8] = IROUND(matrix[8]);
11278+ params[9] = IROUND(matrix[9]);
11279+ params[10] = IROUND(matrix[10]);
11280+ params[11] = IROUND(matrix[11]);
11281+ params[12] = IROUND(matrix[12]);
11282+ params[13] = IROUND(matrix[13]);
11283+ params[14] = IROUND(matrix[14]);
11284+ params[15] = IROUND(matrix[15]);
11285+ }
11286+ break;
11287+ case GL_TEXTURE_STACK_DEPTH:
11288+ params[0] = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1;
11289+ break;
11290+ case GL_UNPACK_ALIGNMENT:
11291+ params[0] = ctx->Unpack.Alignment;
11292+ break;
11293+ case GL_UNPACK_LSB_FIRST:
11294+ params[0] = BOOLEAN_TO_INT(ctx->Unpack.LsbFirst);
11295+ break;
11296+ case GL_UNPACK_ROW_LENGTH:
11297+ params[0] = ctx->Unpack.RowLength;
11298+ break;
11299+ case GL_UNPACK_SKIP_PIXELS:
11300+ params[0] = ctx->Unpack.SkipPixels;
11301+ break;
11302+ case GL_UNPACK_SKIP_ROWS:
11303+ params[0] = ctx->Unpack.SkipRows;
11304+ break;
11305+ case GL_UNPACK_SWAP_BYTES:
11306+ params[0] = BOOLEAN_TO_INT(ctx->Unpack.SwapBytes);
11307+ break;
11308+ case GL_UNPACK_SKIP_IMAGES_EXT:
11309+ params[0] = ctx->Unpack.SkipImages;
11310+ break;
11311+ case GL_UNPACK_IMAGE_HEIGHT_EXT:
11312+ params[0] = ctx->Unpack.ImageHeight;
11313+ break;
11314+ case GL_UNPACK_CLIENT_STORAGE_APPLE:
11315+ params[0] = BOOLEAN_TO_INT(ctx->Unpack.ClientStorage);
11316+ break;
11317+ case GL_VIEWPORT:
11318+ params[0] = ctx->Viewport.X;
11319+ params[1] = ctx->Viewport.Y;
11320+ params[2] = ctx->Viewport.Width;
11321+ params[3] = ctx->Viewport.Height;
11322+ break;
11323+ case GL_ZOOM_X:
11324+ params[0] = IROUND(ctx->Pixel.ZoomX);
11325+ break;
11326+ case GL_ZOOM_Y:
11327+ params[0] = IROUND(ctx->Pixel.ZoomY);
11328+ break;
11329+ case GL_VERTEX_ARRAY:
11330+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Vertex.Enabled);
11331+ break;
11332+ case GL_VERTEX_ARRAY_SIZE:
11333+ params[0] = ctx->Array.ArrayObj->Vertex.Size;
11334+ break;
11335+ case GL_VERTEX_ARRAY_TYPE:
11336+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Vertex.Type);
11337+ break;
11338+ case GL_VERTEX_ARRAY_STRIDE:
11339+ params[0] = ctx->Array.ArrayObj->Vertex.Stride;
11340+ break;
11341+ case GL_VERTEX_ARRAY_COUNT_EXT:
11342+ params[0] = 0;
11343+ break;
11344+ case GL_NORMAL_ARRAY:
11345+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Normal.Enabled);
11346+ break;
11347+ case GL_NORMAL_ARRAY_TYPE:
11348+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Normal.Type);
11349+ break;
11350+ case GL_NORMAL_ARRAY_STRIDE:
11351+ params[0] = ctx->Array.ArrayObj->Normal.Stride;
11352+ break;
11353+ case GL_NORMAL_ARRAY_COUNT_EXT:
11354+ params[0] = 0;
11355+ break;
11356+ case GL_COLOR_ARRAY:
11357+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Color.Enabled);
11358+ break;
11359+ case GL_COLOR_ARRAY_SIZE:
11360+ params[0] = ctx->Array.ArrayObj->Color.Size;
11361+ break;
11362+ case GL_COLOR_ARRAY_TYPE:
11363+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Color.Type);
11364+ break;
11365+ case GL_COLOR_ARRAY_STRIDE:
11366+ params[0] = ctx->Array.ArrayObj->Color.Stride;
11367+ break;
11368+ case GL_COLOR_ARRAY_COUNT_EXT:
11369+ params[0] = 0;
11370+ break;
11371+ case GL_INDEX_ARRAY:
11372+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Index.Enabled);
11373+ break;
11374+ case GL_INDEX_ARRAY_TYPE:
11375+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Index.Type);
11376+ break;
11377+ case GL_INDEX_ARRAY_STRIDE:
11378+ params[0] = ctx->Array.ArrayObj->Index.Stride;
11379+ break;
11380+ case GL_INDEX_ARRAY_COUNT_EXT:
11381+ params[0] = 0;
11382+ break;
11383+ case GL_TEXTURE_COORD_ARRAY:
11384+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
11385+ break;
11386+ case GL_TEXTURE_COORD_ARRAY_SIZE:
11387+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size;
11388+ break;
11389+ case GL_TEXTURE_COORD_ARRAY_TYPE:
11390+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
11391+ break;
11392+ case GL_TEXTURE_COORD_ARRAY_STRIDE:
11393+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride;
11394+ break;
11395+ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
11396+ params[0] = 0;
11397+ break;
11398+ case GL_EDGE_FLAG_ARRAY:
11399+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->EdgeFlag.Enabled);
11400+ break;
11401+ case GL_EDGE_FLAG_ARRAY_STRIDE:
11402+ params[0] = ctx->Array.ArrayObj->EdgeFlag.Stride;
11403+ break;
11404+ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
11405+ params[0] = 0;
11406+ break;
11407+ case GL_MAX_TEXTURE_UNITS_ARB:
11408+ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
11409+ params[0] = ctx->Const.MaxTextureUnits;
11410+ break;
11411+ case GL_ACTIVE_TEXTURE_ARB:
11412+ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
11413+ params[0] = GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit;
11414+ break;
11415+ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
11416+ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
11417+ params[0] = GL_TEXTURE0_ARB + ctx->Array.ActiveTexture;
11418+ break;
11419+ case GL_TEXTURE_CUBE_MAP_ARB:
11420+ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
11421+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB));
11422+ break;
11423+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
11424+ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
11425+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name;
11426+ break;
11427+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
11428+ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
11429+ params[0] = (1 << (ctx->Const.MaxCubeTextureLevels - 1));
11430+ break;
11431+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
11432+ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
11433+ params[0] = ctx->Hint.TextureCompression;
11434+ break;
11435+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
11436+ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
11437+ params[0] = _mesa_get_compressed_formats(ctx, NULL, GL_FALSE);
11438+ break;
11439+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
11440+ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
11441+ {
11442+ GLint formats[100];
11443+ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
11444+ ASSERT(n <= 100);
11445+ for (i = 0; i < n; i++)
11446+ params[i] = ENUM_TO_INT(formats[i]);
11447+ }
11448+ break;
11449+ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
11450+ CHECK_EXT1(EXT_compiled_vertex_array, "GetIntegerv");
11451+ params[0] = ctx->Array.LockFirst;
11452+ break;
11453+ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
11454+ CHECK_EXT1(EXT_compiled_vertex_array, "GetIntegerv");
11455+ params[0] = ctx->Array.LockCount;
11456+ break;
11457+ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
11458+ {
11459+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
11460+ params[0] = IROUND(matrix[0]);
11461+ params[1] = IROUND(matrix[4]);
11462+ params[2] = IROUND(matrix[8]);
11463+ params[3] = IROUND(matrix[12]);
11464+ params[4] = IROUND(matrix[1]);
11465+ params[5] = IROUND(matrix[5]);
11466+ params[6] = IROUND(matrix[9]);
11467+ params[7] = IROUND(matrix[13]);
11468+ params[8] = IROUND(matrix[2]);
11469+ params[9] = IROUND(matrix[6]);
11470+ params[10] = IROUND(matrix[10]);
11471+ params[11] = IROUND(matrix[14]);
11472+ params[12] = IROUND(matrix[3]);
11473+ params[13] = IROUND(matrix[7]);
11474+ params[14] = IROUND(matrix[11]);
11475+ params[15] = IROUND(matrix[15]);
11476+ }
11477+ break;
11478+ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
11479+ {
11480+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
11481+ params[0] = IROUND(matrix[0]);
11482+ params[1] = IROUND(matrix[4]);
11483+ params[2] = IROUND(matrix[8]);
11484+ params[3] = IROUND(matrix[12]);
11485+ params[4] = IROUND(matrix[1]);
11486+ params[5] = IROUND(matrix[5]);
11487+ params[6] = IROUND(matrix[9]);
11488+ params[7] = IROUND(matrix[13]);
11489+ params[8] = IROUND(matrix[2]);
11490+ params[9] = IROUND(matrix[6]);
11491+ params[10] = IROUND(matrix[10]);
11492+ params[11] = IROUND(matrix[14]);
11493+ params[12] = IROUND(matrix[3]);
11494+ params[13] = IROUND(matrix[7]);
11495+ params[14] = IROUND(matrix[11]);
11496+ params[15] = IROUND(matrix[15]);
11497+ }
11498+ break;
11499+ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
11500+ {
11501+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
11502+ params[0] = IROUND(matrix[0]);
11503+ params[1] = IROUND(matrix[4]);
11504+ params[2] = IROUND(matrix[8]);
11505+ params[3] = IROUND(matrix[12]);
11506+ params[4] = IROUND(matrix[1]);
11507+ params[5] = IROUND(matrix[5]);
11508+ params[6] = IROUND(matrix[9]);
11509+ params[7] = IROUND(matrix[13]);
11510+ params[8] = IROUND(matrix[2]);
11511+ params[9] = IROUND(matrix[6]);
11512+ params[10] = IROUND(matrix[10]);
11513+ params[11] = IROUND(matrix[14]);
11514+ params[12] = IROUND(matrix[3]);
11515+ params[13] = IROUND(matrix[7]);
11516+ params[14] = IROUND(matrix[11]);
11517+ params[15] = IROUND(matrix[15]);
11518+ }
11519+ break;
11520+ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
11521+ {
11522+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
11523+ params[0] = IROUND(matrix[0]);
11524+ params[1] = IROUND(matrix[4]);
11525+ params[2] = IROUND(matrix[8]);
11526+ params[3] = IROUND(matrix[12]);
11527+ params[4] = IROUND(matrix[1]);
11528+ params[5] = IROUND(matrix[5]);
11529+ params[6] = IROUND(matrix[9]);
11530+ params[7] = IROUND(matrix[13]);
11531+ params[8] = IROUND(matrix[2]);
11532+ params[9] = IROUND(matrix[6]);
11533+ params[10] = IROUND(matrix[10]);
11534+ params[11] = IROUND(matrix[14]);
11535+ params[12] = IROUND(matrix[3]);
11536+ params[13] = IROUND(matrix[7]);
11537+ params[14] = IROUND(matrix[11]);
11538+ params[15] = IROUND(matrix[15]);
11539+ }
11540+ break;
11541+ case GL_COLOR_MATRIX_SGI:
11542+ {
11543+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
11544+ params[0] = IROUND(matrix[0]);
11545+ params[1] = IROUND(matrix[1]);
11546+ params[2] = IROUND(matrix[2]);
11547+ params[3] = IROUND(matrix[3]);
11548+ params[4] = IROUND(matrix[4]);
11549+ params[5] = IROUND(matrix[5]);
11550+ params[6] = IROUND(matrix[6]);
11551+ params[7] = IROUND(matrix[7]);
11552+ params[8] = IROUND(matrix[8]);
11553+ params[9] = IROUND(matrix[9]);
11554+ params[10] = IROUND(matrix[10]);
11555+ params[11] = IROUND(matrix[11]);
11556+ params[12] = IROUND(matrix[12]);
11557+ params[13] = IROUND(matrix[13]);
11558+ params[14] = IROUND(matrix[14]);
11559+ params[15] = IROUND(matrix[15]);
11560+ }
11561+ break;
11562+ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
11563+ params[0] = ctx->ColorMatrixStack.Depth + 1;
11564+ break;
11565+ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
11566+ params[0] = MAX_COLOR_STACK_DEPTH;
11567+ break;
11568+ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
11569+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[0]);
11570+ break;
11571+ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
11572+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[1]);
11573+ break;
11574+ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
11575+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[2]);
11576+ break;
11577+ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
11578+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[3]);
11579+ break;
11580+ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
11581+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[0]);
11582+ break;
11583+ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
11584+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[1]);
11585+ break;
11586+ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
11587+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[2]);
11588+ break;
11589+ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
11590+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[3]);
11591+ break;
11592+ case GL_CONVOLUTION_1D_EXT:
11593+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11594+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Convolution1DEnabled);
11595+ break;
11596+ case GL_CONVOLUTION_2D_EXT:
11597+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11598+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Convolution2DEnabled);
11599+ break;
11600+ case GL_SEPARABLE_2D_EXT:
11601+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11602+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Separable2DEnabled);
11603+ break;
11604+ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
11605+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11606+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[0]);
11607+ break;
11608+ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
11609+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11610+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[1]);
11611+ break;
11612+ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
11613+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11614+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[2]);
11615+ break;
11616+ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
11617+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11618+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[3]);
11619+ break;
11620+ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
11621+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11622+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[0]);
11623+ break;
11624+ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
11625+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11626+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[1]);
11627+ break;
11628+ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
11629+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11630+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[2]);
11631+ break;
11632+ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
11633+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11634+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[3]);
11635+ break;
11636+ case GL_HISTOGRAM:
11637+ CHECK_EXT1(EXT_histogram, "GetIntegerv");
11638+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.HistogramEnabled);
11639+ break;
11640+ case GL_MINMAX:
11641+ CHECK_EXT1(EXT_histogram, "GetIntegerv");
11642+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MinMaxEnabled);
11643+ break;
11644+ case GL_COLOR_TABLE_SGI:
11645+ CHECK_EXT1(SGI_color_table, "GetIntegerv");
11646+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.ColorTableEnabled);
11647+ break;
11648+ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
11649+ CHECK_EXT1(SGI_color_table, "GetIntegerv");
11650+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.PostConvolutionColorTableEnabled);
11651+ break;
11652+ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
11653+ CHECK_EXT1(SGI_color_table, "GetIntegerv");
11654+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.PostColorMatrixColorTableEnabled);
11655+ break;
11656+ case GL_TEXTURE_COLOR_TABLE_SGI:
11657+ CHECK_EXT1(SGI_texture_color_table, "GetIntegerv");
11658+ params[0] = BOOLEAN_TO_INT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled);
11659+ break;
11660+ case GL_COLOR_SUM_EXT:
11661+ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetIntegerv");
11662+ params[0] = BOOLEAN_TO_INT(ctx->Fog.ColorSumEnabled);
11663+ break;
11664+ case GL_CURRENT_SECONDARY_COLOR_EXT:
11665+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
11666+ {
11667+ FLUSH_CURRENT(ctx, 0);
11668+ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]);
11669+ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]);
11670+ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]);
11671+ params[3] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]);
11672+ }
11673+ break;
11674+ case GL_SECONDARY_COLOR_ARRAY_EXT:
11675+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
11676+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->SecondaryColor.Enabled);
11677+ break;
11678+ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
11679+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
11680+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->SecondaryColor.Type);
11681+ break;
11682+ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
11683+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
11684+ params[0] = ctx->Array.ArrayObj->SecondaryColor.Stride;
11685+ break;
11686+ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
11687+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
11688+ params[0] = ctx->Array.ArrayObj->SecondaryColor.Size;
11689+ break;
11690+ case GL_CURRENT_FOG_COORDINATE_EXT:
11691+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
11692+ {
11693+ FLUSH_CURRENT(ctx, 0);
11694+ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_FOG][0]);
11695+ }
11696+ break;
11697+ case GL_FOG_COORDINATE_ARRAY_EXT:
11698+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
11699+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->FogCoord.Enabled);
11700+ break;
11701+ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
11702+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
11703+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->FogCoord.Type);
11704+ break;
11705+ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
11706+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
11707+ params[0] = ctx->Array.ArrayObj->FogCoord.Stride;
11708+ break;
11709+ case GL_FOG_COORDINATE_SOURCE_EXT:
11710+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
11711+ params[0] = ENUM_TO_INT(ctx->Fog.FogCoordinateSource);
11712+ break;
11713+ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
11714+ CHECK_EXT1(EXT_texture_lod_bias, "GetIntegerv");
11715+ params[0] = IROUND(ctx->Const.MaxTextureLodBias);
11716+ break;
11717+ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
11718+ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetIntegerv");
11719+ params[0] = IROUND(ctx->Const.MaxTextureMaxAnisotropy);
11720+ break;
11721+ case GL_MULTISAMPLE_ARB:
11722+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
11723+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.Enabled);
11724+ break;
11725+ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
11726+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
11727+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleAlphaToCoverage);
11728+ break;
11729+ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
11730+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
11731+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleAlphaToOne);
11732+ break;
11733+ case GL_SAMPLE_COVERAGE_ARB:
11734+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
11735+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleCoverage);
11736+ break;
11737+ case GL_SAMPLE_COVERAGE_VALUE_ARB:
11738+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
11739+ params[0] = IROUND(ctx->Multisample.SampleCoverageValue);
11740+ break;
11741+ case GL_SAMPLE_COVERAGE_INVERT_ARB:
11742+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
11743+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleCoverageInvert);
11744+ break;
11745+ case GL_SAMPLE_BUFFERS_ARB:
11746+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
11747+ params[0] = ctx->DrawBuffer->Visual.sampleBuffers;
11748+ break;
11749+ case GL_SAMPLES_ARB:
11750+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
11751+ params[0] = ctx->DrawBuffer->Visual.samples;
11752+ break;
11753+ case GL_RASTER_POSITION_UNCLIPPED_IBM:
11754+ CHECK_EXT1(IBM_rasterpos_clip, "GetIntegerv");
11755+ params[0] = BOOLEAN_TO_INT(ctx->Transform.RasterPositionUnclipped);
11756+ break;
11757+ case GL_POINT_SPRITE_NV:
11758+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetIntegerv");
11759+ params[0] = BOOLEAN_TO_INT(ctx->Point.PointSprite);
11760+ break;
11761+ case GL_POINT_SPRITE_R_MODE_NV:
11762+ CHECK_EXT1(NV_point_sprite, "GetIntegerv");
11763+ params[0] = ENUM_TO_INT(ctx->Point.SpriteRMode);
11764+ break;
11765+ case GL_POINT_SPRITE_COORD_ORIGIN:
11766+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetIntegerv");
11767+ params[0] = ENUM_TO_INT(ctx->Point.SpriteOrigin);
11768+ break;
11769+ case GL_GENERATE_MIPMAP_HINT_SGIS:
11770+ CHECK_EXT1(SGIS_generate_mipmap, "GetIntegerv");
11771+ params[0] = ENUM_TO_INT(ctx->Hint.GenerateMipmap);
11772+ break;
11773+ case GL_VERTEX_PROGRAM_BINDING_NV:
11774+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11775+ params[0] = (ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0);
11776+ break;
11777+ case GL_VERTEX_ATTRIB_ARRAY0_NV:
11778+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11779+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[0].Enabled);
11780+ break;
11781+ case GL_VERTEX_ATTRIB_ARRAY1_NV:
11782+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11783+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[1].Enabled);
11784+ break;
11785+ case GL_VERTEX_ATTRIB_ARRAY2_NV:
11786+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11787+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[2].Enabled);
11788+ break;
11789+ case GL_VERTEX_ATTRIB_ARRAY3_NV:
11790+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11791+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[3].Enabled);
11792+ break;
11793+ case GL_VERTEX_ATTRIB_ARRAY4_NV:
11794+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11795+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[4].Enabled);
11796+ break;
11797+ case GL_VERTEX_ATTRIB_ARRAY5_NV:
11798+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11799+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[5].Enabled);
11800+ break;
11801+ case GL_VERTEX_ATTRIB_ARRAY6_NV:
11802+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11803+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[6].Enabled);
11804+ break;
11805+ case GL_VERTEX_ATTRIB_ARRAY7_NV:
11806+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11807+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[7].Enabled);
11808+ break;
11809+ case GL_VERTEX_ATTRIB_ARRAY8_NV:
11810+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11811+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[8].Enabled);
11812+ break;
11813+ case GL_VERTEX_ATTRIB_ARRAY9_NV:
11814+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11815+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[9].Enabled);
11816+ break;
11817+ case GL_VERTEX_ATTRIB_ARRAY10_NV:
11818+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11819+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[10].Enabled);
11820+ break;
11821+ case GL_VERTEX_ATTRIB_ARRAY11_NV:
11822+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11823+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[11].Enabled);
11824+ break;
11825+ case GL_VERTEX_ATTRIB_ARRAY12_NV:
11826+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11827+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[12].Enabled);
11828+ break;
11829+ case GL_VERTEX_ATTRIB_ARRAY13_NV:
11830+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11831+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[13].Enabled);
11832+ break;
11833+ case GL_VERTEX_ATTRIB_ARRAY14_NV:
11834+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11835+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[14].Enabled);
11836+ break;
11837+ case GL_VERTEX_ATTRIB_ARRAY15_NV:
11838+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11839+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[15].Enabled);
11840+ break;
11841+ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
11842+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11843+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[0]);
11844+ break;
11845+ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
11846+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11847+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[1]);
11848+ break;
11849+ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
11850+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11851+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[2]);
11852+ break;
11853+ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
11854+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11855+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[3]);
11856+ break;
11857+ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
11858+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11859+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[4]);
11860+ break;
11861+ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
11862+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11863+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[5]);
11864+ break;
11865+ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
11866+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11867+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[6]);
11868+ break;
11869+ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
11870+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11871+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[7]);
11872+ break;
11873+ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
11874+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11875+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[8]);
11876+ break;
11877+ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
11878+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11879+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[9]);
11880+ break;
11881+ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
11882+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11883+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[10]);
11884+ break;
11885+ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
11886+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11887+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[11]);
11888+ break;
11889+ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
11890+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11891+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[12]);
11892+ break;
11893+ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
11894+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11895+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[13]);
11896+ break;
11897+ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
11898+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11899+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[14]);
11900+ break;
11901+ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
11902+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11903+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[15]);
11904+ break;
11905+ case GL_FRAGMENT_PROGRAM_NV:
11906+ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
11907+ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.Enabled);
11908+ break;
11909+ case GL_FRAGMENT_PROGRAM_BINDING_NV:
11910+ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
11911+ params[0] = ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0;
11912+ break;
11913+ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
11914+ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
11915+ params[0] = MAX_NV_FRAGMENT_PROGRAM_PARAMS;
11916+ break;
11917+ case GL_TEXTURE_RECTANGLE_NV:
11918+ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
11919+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV));
11920+ break;
11921+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
11922+ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
11923+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name;
11924+ break;
11925+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
11926+ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
11927+ params[0] = ctx->Const.MaxTextureRectSize;
11928+ break;
11929+ case GL_STENCIL_TEST_TWO_SIDE_EXT:
11930+ CHECK_EXT1(EXT_stencil_two_side, "GetIntegerv");
11931+ params[0] = BOOLEAN_TO_INT(ctx->Stencil.TestTwoSide);
11932+ break;
11933+ case GL_ACTIVE_STENCIL_FACE_EXT:
11934+ CHECK_EXT1(EXT_stencil_two_side, "GetIntegerv");
11935+ params[0] = ENUM_TO_INT(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
11936+ break;
11937+ case GL_MAX_SHININESS_NV:
11938+ CHECK_EXT1(NV_light_max_exponent, "GetIntegerv");
11939+ params[0] = IROUND(ctx->Const.MaxShininess);
11940+ break;
11941+ case GL_MAX_SPOT_EXPONENT_NV:
11942+ CHECK_EXT1(NV_light_max_exponent, "GetIntegerv");
11943+ params[0] = IROUND(ctx->Const.MaxSpotExponent);
11944+ break;
11945+ case GL_ARRAY_BUFFER_BINDING_ARB:
11946+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
11947+ params[0] = ctx->Array.ArrayBufferObj->Name;
11948+ break;
11949+ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
11950+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
11951+ params[0] = ctx->Array.ArrayObj->Vertex.BufferObj->Name;
11952+ break;
11953+ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
11954+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
11955+ params[0] = ctx->Array.ArrayObj->Normal.BufferObj->Name;
11956+ break;
11957+ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
11958+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
11959+ params[0] = ctx->Array.ArrayObj->Color.BufferObj->Name;
11960+ break;
11961+ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
11962+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
11963+ params[0] = ctx->Array.ArrayObj->Index.BufferObj->Name;
11964+ break;
11965+ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
11966+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
11967+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name;
11968+ break;
11969+ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
11970+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
11971+ params[0] = ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name;
11972+ break;
11973+ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
11974+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
11975+ params[0] = ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name;
11976+ break;
11977+ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
11978+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
11979+ params[0] = ctx->Array.ArrayObj->FogCoord.BufferObj->Name;
11980+ break;
11981+ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
11982+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
11983+ params[0] = ctx->Array.ElementArrayBufferObj->Name;
11984+ break;
11985+ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
11986+ CHECK_EXT1(EXT_pixel_buffer_object, "GetIntegerv");
11987+ params[0] = ctx->Pack.BufferObj->Name;
11988+ break;
11989+ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
11990+ CHECK_EXT1(EXT_pixel_buffer_object, "GetIntegerv");
11991+ params[0] = ctx->Unpack.BufferObj->Name;
11992+ break;
11993+ case GL_VERTEX_PROGRAM_ARB:
11994+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
11995+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.Enabled);
11996+ break;
11997+ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
11998+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
11999+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.PointSizeEnabled);
12000+ break;
12001+ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
12002+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
12003+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.TwoSideEnabled);
12004+ break;
12005+ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
12006+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
12007+ params[0] = ctx->Const.MaxProgramMatrixStackDepth;
12008+ break;
12009+ case GL_MAX_PROGRAM_MATRICES_ARB:
12010+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
12011+ params[0] = ctx->Const.MaxProgramMatrices;
12012+ break;
12013+ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
12014+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
12015+ params[0] = BOOLEAN_TO_INT(ctx->CurrentStack->Depth + 1);
12016+ break;
12017+ case GL_CURRENT_MATRIX_ARB:
12018+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetIntegerv");
12019+ {
12020+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
12021+ params[0] = IROUND(matrix[0]);
12022+ params[1] = IROUND(matrix[1]);
12023+ params[2] = IROUND(matrix[2]);
12024+ params[3] = IROUND(matrix[3]);
12025+ params[4] = IROUND(matrix[4]);
12026+ params[5] = IROUND(matrix[5]);
12027+ params[6] = IROUND(matrix[6]);
12028+ params[7] = IROUND(matrix[7]);
12029+ params[8] = IROUND(matrix[8]);
12030+ params[9] = IROUND(matrix[9]);
12031+ params[10] = IROUND(matrix[10]);
12032+ params[11] = IROUND(matrix[11]);
12033+ params[12] = IROUND(matrix[12]);
12034+ params[13] = IROUND(matrix[13]);
12035+ params[14] = IROUND(matrix[14]);
12036+ params[15] = IROUND(matrix[15]);
12037+ }
12038+ break;
12039+ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
12040+ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetIntegerv");
12041+ {
12042+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
12043+ params[0] = IROUND(matrix[0]);
12044+ params[1] = IROUND(matrix[4]);
12045+ params[2] = IROUND(matrix[8]);
12046+ params[3] = IROUND(matrix[12]);
12047+ params[4] = IROUND(matrix[1]);
12048+ params[5] = IROUND(matrix[5]);
12049+ params[6] = IROUND(matrix[9]);
12050+ params[7] = IROUND(matrix[13]);
12051+ params[8] = IROUND(matrix[2]);
12052+ params[9] = IROUND(matrix[6]);
12053+ params[10] = IROUND(matrix[10]);
12054+ params[11] = IROUND(matrix[14]);
12055+ params[12] = IROUND(matrix[3]);
12056+ params[13] = IROUND(matrix[7]);
12057+ params[14] = IROUND(matrix[11]);
12058+ params[15] = IROUND(matrix[15]);
12059+ }
12060+ break;
12061+ case GL_MAX_VERTEX_ATTRIBS_ARB:
12062+ CHECK_EXT1(ARB_vertex_program, "GetIntegerv");
12063+ params[0] = ctx->Const.VertexProgram.MaxAttribs;
12064+ break;
12065+ case GL_PROGRAM_ERROR_POSITION_ARB:
12066+ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetIntegerv");
12067+ params[0] = ctx->Program.ErrorPos;
12068+ break;
12069+ case GL_FRAGMENT_PROGRAM_ARB:
12070+ CHECK_EXT1(ARB_fragment_program, "GetIntegerv");
12071+ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.Enabled);
12072+ break;
12073+ case GL_MAX_TEXTURE_COORDS_ARB:
12074+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetIntegerv");
12075+ params[0] = ctx->Const.MaxTextureCoordUnits;
12076+ break;
12077+ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
12078+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetIntegerv");
12079+ params[0] = ctx->Const.MaxTextureImageUnits;
12080+ break;
12081+ case GL_DEPTH_BOUNDS_TEST_EXT:
12082+ CHECK_EXT1(EXT_depth_bounds_test, "GetIntegerv");
12083+ params[0] = BOOLEAN_TO_INT(ctx->Depth.BoundsTest);
12084+ break;
12085+ case GL_DEPTH_BOUNDS_EXT:
12086+ CHECK_EXT1(EXT_depth_bounds_test, "GetIntegerv");
12087+ params[0] = IROUND(ctx->Depth.BoundsMin);
12088+ params[1] = IROUND(ctx->Depth.BoundsMax);
12089+ break;
12090+ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
12091+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12092+ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.CallbackEnabled);
12093+ break;
12094+ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
12095+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12096+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.CallbackEnabled);
12097+ break;
12098+ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
12099+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12100+ params[0] = ctx->FragmentProgram.CurrentPosition;
12101+ break;
12102+ case GL_VERTEX_PROGRAM_POSITION_MESA:
12103+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12104+ params[0] = ctx->VertexProgram.CurrentPosition;
12105+ break;
12106+ case GL_MAX_DRAW_BUFFERS_ARB:
12107+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12108+ params[0] = ctx->Const.MaxDrawBuffers;
12109+ break;
12110+ case GL_DRAW_BUFFER0_ARB:
12111+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12112+ params[0] = ENUM_TO_INT(ctx->DrawBuffer->ColorDrawBuffer[0]);
12113+ break;
12114+ case GL_DRAW_BUFFER1_ARB:
12115+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12116+ {
12117+ GLenum buffer;
12118+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
12119+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
12120+ return;
12121+ }
12122+ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
12123+ params[0] = ENUM_TO_INT(buffer);
12124+ }
12125+ break;
12126+ case GL_DRAW_BUFFER2_ARB:
12127+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12128+ {
12129+ GLenum buffer;
12130+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
12131+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
12132+ return;
12133+ }
12134+ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
12135+ params[0] = ENUM_TO_INT(buffer);
12136+ }
12137+ break;
12138+ case GL_DRAW_BUFFER3_ARB:
12139+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12140+ {
12141+ GLenum buffer;
12142+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
12143+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
12144+ return;
12145+ }
12146+ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
12147+ params[0] = ENUM_TO_INT(buffer);
12148+ }
12149+ break;
12150+ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
12151+ CHECK_EXT1(OES_read_format, "GetIntegerv");
12152+ params[0] = ctx->Const.ColorReadType;
12153+ break;
12154+ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
12155+ CHECK_EXT1(OES_read_format, "GetIntegerv");
12156+ params[0] = ctx->Const.ColorReadFormat;
12157+ break;
12158+ case GL_NUM_FRAGMENT_REGISTERS_ATI:
12159+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12160+ params[0] = 6;
12161+ break;
12162+ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
12163+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12164+ params[0] = 8;
12165+ break;
12166+ case GL_NUM_PASSES_ATI:
12167+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12168+ params[0] = 2;
12169+ break;
12170+ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
12171+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12172+ params[0] = 8;
12173+ break;
12174+ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
12175+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12176+ params[0] = 16;
12177+ break;
12178+ case GL_COLOR_ALPHA_PAIRING_ATI:
12179+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12180+ params[0] = BOOLEAN_TO_INT(GL_TRUE);
12181+ break;
12182+ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
12183+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12184+ params[0] = 3;
12185+ break;
12186+ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
12187+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12188+ params[0] = 3;
12189+ break;
12190+ case GL_STENCIL_BACK_FUNC:
12191+ params[0] = ENUM_TO_INT(ctx->Stencil.Function[1]);
12192+ break;
12193+ case GL_STENCIL_BACK_VALUE_MASK:
12194+ params[0] = ctx->Stencil.ValueMask[1];
12195+ break;
12196+ case GL_STENCIL_BACK_REF:
12197+ params[0] = ctx->Stencil.Ref[1];
12198+ break;
12199+ case GL_STENCIL_BACK_FAIL:
12200+ params[0] = ENUM_TO_INT(ctx->Stencil.FailFunc[1]);
12201+ break;
12202+ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
12203+ params[0] = ENUM_TO_INT(ctx->Stencil.ZFailFunc[1]);
12204+ break;
12205+ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
12206+ params[0] = ENUM_TO_INT(ctx->Stencil.ZPassFunc[1]);
12207+ break;
12208+ case GL_FRAMEBUFFER_BINDING_EXT:
12209+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12210+ params[0] = ctx->DrawBuffer->Name;
12211+ break;
12212+ case GL_RENDERBUFFER_BINDING_EXT:
12213+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12214+ params[0] = ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0;
12215+ break;
12216+ case GL_MAX_COLOR_ATTACHMENTS_EXT:
12217+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12218+ params[0] = ctx->Const.MaxColorAttachments;
12219+ break;
12220+ case GL_MAX_RENDERBUFFER_SIZE_EXT:
12221+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12222+ params[0] = ctx->Const.MaxRenderbufferSize;
12223+ break;
12224+ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
12225+ CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
12226+ params[0] = MAX_FRAGMENT_UNIFORM_COMPONENTS;
12227+ break;
12228+ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
12229+ CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
12230+ params[0] = ENUM_TO_INT(ctx->Hint.FragmentShaderDerivative);
12231+ break;
12232+ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
12233+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12234+ params[0] = MAX_VERTEX_UNIFORM_COMPONENTS;
12235+ break;
12236+ case GL_MAX_VARYING_FLOATS_ARB:
12237+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12238+ params[0] = MAX_VARYING_FLOATS;
12239+ break;
12240+ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
12241+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12242+ params[0] = MAX_VERTEX_TEXTURE_IMAGE_UNITS;
12243+ break;
12244+ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
12245+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12246+ params[0] = MAX_COMBINED_TEXTURE_IMAGE_UNITS;
12247+ break;
12248+ default:
12249+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv(pname=0x%x)", pname);
12250+ }
12251+}
12252+
12253+
12254+void GLAPIENTRY
12255+_mesa_GetDoublev( GLenum pname, GLdouble *params )
12256+{
12257+ const GLfloat magic = -1234.5F;
12258+ GLfloat values[16];
12259+ GLuint i;
12260+
12261+ if (!params)
12262+ return;
12263+
12264+ /* Init temp array to magic numbers so we can figure out how many values
12265+ * are returned by the GetFloatv() call.
12266+ */
12267+ for (i = 0; i < 16; i++)
12268+ values[i] = magic;
12269+
12270+ _mesa_GetFloatv(pname, values);
12271+
12272+ for (i = 0; i < 16 && values[i] != magic; i++)
12273+ params[i] = (GLdouble) values[i];
12274+}
12275+
12276Index: trunk/target-i386/mesa_gl.h
12277===================================================================
12278--- /dev/null 1970-01-01 00:00:00.000000000 +0000
12279+++ trunk/target-i386/mesa_gl.h 2009-01-19 23:06:08.000000000 +0000
12280@@ -0,0 +1,2251 @@
12281+/*
12282+ * Mesa 3-D graphics library
12283+ * Version: 6.5.1
12284+ *
12285+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
12286+ *
12287+ * Permission is hereby granted, free of charge, to any person obtaining a
12288+ * copy of this software and associated documentation files (the "Software"),
12289+ * to deal in the Software without restriction, including without limitation
12290+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12291+ * and/or sell copies of the Software, and to permit persons to whom the
12292+ * Software is furnished to do so, subject to the following conditions:
12293+ *
12294+ * The above copyright notice and this permission notice shall be included
12295+ * in all copies or substantial portions of the Software.
12296+ *
12297+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
12298+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12299+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
12300+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
12301+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
12302+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12303+ */
12304+
12305+
12306+#ifndef __gl_h_
12307+#define __gl_h_
12308+
12309+#if defined(USE_MGL_NAMESPACE)
12310+#include "gl_mangle.h"
12311+#endif
12312+
12313+
12314+/**********************************************************************
12315+ * Begin system-specific stuff. Do not do any of this when building
12316+ * for SciTech SNAP, as this is all done before this header file is
12317+ * included.
12318+ */
12319+#if !defined(__SCITECH_SNAP__)
12320+
12321+#if defined(__BEOS__)
12322+#include <stdlib.h> /* to get some BeOS-isms */
12323+#endif
12324+
12325+#if !defined(OPENSTEP) && (defined(NeXT) || defined(NeXT_PDO))
12326+#define OPENSTEP
12327+#endif
12328+
12329+#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__)
12330+#define __WIN32__
12331+#endif
12332+
12333+#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__))
12334+# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
12335+# define GLAPI __declspec(dllexport)
12336+# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
12337+# define GLAPI __declspec(dllimport)
12338+# else /* for use with static link lib build of Win32 edition only */
12339+# define GLAPI extern
12340+# endif /* _STATIC_MESA support */
12341+# define GLAPIENTRY __stdcall
12342+#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
12343+# define GLAPI extern
12344+# define GLAPIENTRY __stdcall
12345+#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
12346+# define GLAPI __attribute__((visibility("default")))
12347+# define GLAPIENTRY
12348+#endif /* WIN32 && !CYGWIN */
12349+
12350+#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__)
12351+# define PRAGMA_EXPORT_SUPPORTED 1
12352+#endif
12353+
12354+/*
12355+ * WINDOWS: Include windows.h here to define APIENTRY.
12356+ * It is also useful when applications include this file by
12357+ * including only glut.h, since glut.h depends on windows.h.
12358+ * Applications needing to include windows.h with parms other
12359+ * than "WIN32_LEAN_AND_MEAN" may include windows.h before
12360+ * glut.h or gl.h.
12361+ */
12362+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
12363+#define WIN32_LEAN_AND_MEAN 1
12364+#include <windows.h>
12365+#endif
12366+
12367+#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP) && !defined(__CYGWIN__)
12368+#include <GL/mesa_wgl.h>
12369+#endif
12370+
12371+#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
12372+#pragma import on
12373+#endif
12374+
12375+#ifndef GLAPI
12376+#define GLAPI extern
12377+#endif
12378+
12379+#ifndef GLAPIENTRY
12380+#define GLAPIENTRY
12381+#endif
12382+
12383+#ifndef APIENTRY
12384+#define APIENTRY GLAPIENTRY
12385+#endif
12386+
12387+/* "P" suffix to be used for a pointer to a function */
12388+#ifndef APIENTRYP
12389+#define APIENTRYP APIENTRY *
12390+#endif
12391+
12392+#ifndef GLAPIENTRYP
12393+#define GLAPIENTRYP GLAPIENTRY *
12394+#endif
12395+
12396+#ifdef CENTERLINE_CLPP
12397+#define signed
12398+#endif
12399+
12400+#if defined(PRAGMA_EXPORT_SUPPORTED)
12401+#pragma export on
12402+#endif
12403+
12404+#endif /* !__SCITECH_SNAP__ */
12405+/*
12406+ * End system-specific stuff.
12407+ **********************************************************************/
12408+
12409+
12410+
12411+#ifdef __cplusplus
12412+extern "C" {
12413+#endif
12414+
12415+
12416+
12417+#define GL_VERSION_1_1 1
12418+#define GL_VERSION_1_2 1
12419+#define GL_VERSION_1_3 1
12420+#define GL_ARB_imaging 1
12421+
12422+
12423+/*
12424+ * Datatypes
12425+ */
12426+typedef unsigned int GLenum;
12427+typedef unsigned char GLboolean;
12428+typedef unsigned int GLbitfield;
12429+typedef void GLvoid;
12430+typedef signed char GLbyte; /* 1-byte signed */
12431+typedef short GLshort; /* 2-byte signed */
12432+typedef int GLint; /* 4-byte signed */
12433+typedef unsigned char GLubyte; /* 1-byte unsigned */
12434+typedef unsigned short GLushort; /* 2-byte unsigned */
12435+typedef unsigned int GLuint; /* 4-byte unsigned */
12436+typedef int GLsizei; /* 4-byte signed */
12437+typedef float GLfloat; /* single precision float */
12438+typedef float GLclampf; /* single precision float in [0,1] */
12439+typedef double GLdouble; /* double precision float */
12440+typedef double GLclampd; /* double precision float in [0,1] */
12441+
12442+
12443+
12444+/*
12445+ * Constants
12446+ */
12447+
12448+/* Boolean values */
12449+#define GL_FALSE 0x0
12450+#define GL_TRUE 0x1
12451+
12452+/* Data types */
12453+#define GL_BYTE 0x1400
12454+#define GL_UNSIGNED_BYTE 0x1401
12455+#define GL_SHORT 0x1402
12456+#define GL_UNSIGNED_SHORT 0x1403
12457+#define GL_INT 0x1404
12458+#define GL_UNSIGNED_INT 0x1405
12459+#define GL_FLOAT 0x1406
12460+#define GL_2_BYTES 0x1407
12461+#define GL_3_BYTES 0x1408
12462+#define GL_4_BYTES 0x1409
12463+#define GL_DOUBLE 0x140A
12464+
12465+/* Primitives */
12466+#define GL_POINTS 0x0000
12467+#define GL_LINES 0x0001
12468+#define GL_LINE_LOOP 0x0002
12469+#define GL_LINE_STRIP 0x0003
12470+#define GL_TRIANGLES 0x0004
12471+#define GL_TRIANGLE_STRIP 0x0005
12472+#define GL_TRIANGLE_FAN 0x0006
12473+#define GL_QUADS 0x0007
12474+#define GL_QUAD_STRIP 0x0008
12475+#define GL_POLYGON 0x0009
12476+
12477+/* Vertex Arrays */
12478+#define GL_VERTEX_ARRAY 0x8074
12479+#define GL_NORMAL_ARRAY 0x8075
12480+#define GL_COLOR_ARRAY 0x8076
12481+#define GL_INDEX_ARRAY 0x8077
12482+#define GL_TEXTURE_COORD_ARRAY 0x8078
12483+#define GL_EDGE_FLAG_ARRAY 0x8079
12484+#define GL_VERTEX_ARRAY_SIZE 0x807A
12485+#define GL_VERTEX_ARRAY_TYPE 0x807B
12486+#define GL_VERTEX_ARRAY_STRIDE 0x807C
12487+#define GL_NORMAL_ARRAY_TYPE 0x807E
12488+#define GL_NORMAL_ARRAY_STRIDE 0x807F
12489+#define GL_COLOR_ARRAY_SIZE 0x8081
12490+#define GL_COLOR_ARRAY_TYPE 0x8082
12491+#define GL_COLOR_ARRAY_STRIDE 0x8083
12492+#define GL_INDEX_ARRAY_TYPE 0x8085
12493+#define GL_INDEX_ARRAY_STRIDE 0x8086
12494+#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
12495+#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
12496+#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
12497+#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
12498+#define GL_VERTEX_ARRAY_POINTER 0x808E
12499+#define GL_NORMAL_ARRAY_POINTER 0x808F
12500+#define GL_COLOR_ARRAY_POINTER 0x8090
12501+#define GL_INDEX_ARRAY_POINTER 0x8091
12502+#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
12503+#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
12504+#define GL_V2F 0x2A20
12505+#define GL_V3F 0x2A21
12506+#define GL_C4UB_V2F 0x2A22
12507+#define GL_C4UB_V3F 0x2A23
12508+#define GL_C3F_V3F 0x2A24
12509+#define GL_N3F_V3F 0x2A25
12510+#define GL_C4F_N3F_V3F 0x2A26
12511+#define GL_T2F_V3F 0x2A27
12512+#define GL_T4F_V4F 0x2A28
12513+#define GL_T2F_C4UB_V3F 0x2A29
12514+#define GL_T2F_C3F_V3F 0x2A2A
12515+#define GL_T2F_N3F_V3F 0x2A2B
12516+#define GL_T2F_C4F_N3F_V3F 0x2A2C
12517+#define GL_T4F_C4F_N3F_V4F 0x2A2D
12518+
12519+/* Matrix Mode */
12520+#define GL_MATRIX_MODE 0x0BA0
12521+#define GL_MODELVIEW 0x1700
12522+#define GL_PROJECTION 0x1701
12523+#define GL_TEXTURE 0x1702
12524+
12525+/* Points */
12526+#define GL_POINT_SMOOTH 0x0B10
12527+#define GL_POINT_SIZE 0x0B11
12528+#define GL_POINT_SIZE_GRANULARITY 0x0B13
12529+#define GL_POINT_SIZE_RANGE 0x0B12
12530+
12531+/* Lines */
12532+#define GL_LINE_SMOOTH 0x0B20
12533+#define GL_LINE_STIPPLE 0x0B24
12534+#define GL_LINE_STIPPLE_PATTERN 0x0B25
12535+#define GL_LINE_STIPPLE_REPEAT 0x0B26
12536+#define GL_LINE_WIDTH 0x0B21
12537+#define GL_LINE_WIDTH_GRANULARITY 0x0B23
12538+#define GL_LINE_WIDTH_RANGE 0x0B22
12539+
12540+/* Polygons */
12541+#define GL_POINT 0x1B00
12542+#define GL_LINE 0x1B01
12543+#define GL_FILL 0x1B02
12544+#define GL_CW 0x0900
12545+#define GL_CCW 0x0901
12546+#define GL_FRONT 0x0404
12547+#define GL_BACK 0x0405
12548+#define GL_POLYGON_MODE 0x0B40
12549+#define GL_POLYGON_SMOOTH 0x0B41
12550+#define GL_POLYGON_STIPPLE 0x0B42
12551+#define GL_EDGE_FLAG 0x0B43
12552+#define GL_CULL_FACE 0x0B44
12553+#define GL_CULL_FACE_MODE 0x0B45
12554+#define GL_FRONT_FACE 0x0B46
12555+#define GL_POLYGON_OFFSET_FACTOR 0x8038
12556+#define GL_POLYGON_OFFSET_UNITS 0x2A00
12557+#define GL_POLYGON_OFFSET_POINT 0x2A01
12558+#define GL_POLYGON_OFFSET_LINE 0x2A02
12559+#define GL_POLYGON_OFFSET_FILL 0x8037
12560+
12561+/* Display Lists */
12562+#define GL_COMPILE 0x1300
12563+#define GL_COMPILE_AND_EXECUTE 0x1301
12564+#define GL_LIST_BASE 0x0B32
12565+#define GL_LIST_INDEX 0x0B33
12566+#define GL_LIST_MODE 0x0B30
12567+
12568+/* Depth buffer */
12569+#define GL_NEVER 0x0200
12570+#define GL_LESS 0x0201
12571+#define GL_EQUAL 0x0202
12572+#define GL_LEQUAL 0x0203
12573+#define GL_GREATER 0x0204
12574+#define GL_NOTEQUAL 0x0205
12575+#define GL_GEQUAL 0x0206
12576+#define GL_ALWAYS 0x0207
12577+#define GL_DEPTH_TEST 0x0B71
12578+#define GL_DEPTH_BITS 0x0D56
12579+#define GL_DEPTH_CLEAR_VALUE 0x0B73
12580+#define GL_DEPTH_FUNC 0x0B74
12581+#define GL_DEPTH_RANGE 0x0B70
12582+#define GL_DEPTH_WRITEMASK 0x0B72
12583+#define GL_DEPTH_COMPONENT 0x1902
12584+
12585+/* Lighting */
12586+#define GL_LIGHTING 0x0B50
12587+#define GL_LIGHT0 0x4000
12588+#define GL_LIGHT1 0x4001
12589+#define GL_LIGHT2 0x4002
12590+#define GL_LIGHT3 0x4003
12591+#define GL_LIGHT4 0x4004
12592+#define GL_LIGHT5 0x4005
12593+#define GL_LIGHT6 0x4006
12594+#define GL_LIGHT7 0x4007
12595+#define GL_SPOT_EXPONENT 0x1205
12596+#define GL_SPOT_CUTOFF 0x1206
12597+#define GL_CONSTANT_ATTENUATION 0x1207
12598+#define GL_LINEAR_ATTENUATION 0x1208
12599+#define GL_QUADRATIC_ATTENUATION 0x1209
12600+#define GL_AMBIENT 0x1200
12601+#define GL_DIFFUSE 0x1201
12602+#define GL_SPECULAR 0x1202
12603+#define GL_SHININESS 0x1601
12604+#define GL_EMISSION 0x1600
12605+#define GL_POSITION 0x1203
12606+#define GL_SPOT_DIRECTION 0x1204
12607+#define GL_AMBIENT_AND_DIFFUSE 0x1602
12608+#define GL_COLOR_INDEXES 0x1603
12609+#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
12610+#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
12611+#define GL_LIGHT_MODEL_AMBIENT 0x0B53
12612+#define GL_FRONT_AND_BACK 0x0408
12613+#define GL_SHADE_MODEL 0x0B54
12614+#define GL_FLAT 0x1D00
12615+#define GL_SMOOTH 0x1D01
12616+#define GL_COLOR_MATERIAL 0x0B57
12617+#define GL_COLOR_MATERIAL_FACE 0x0B55
12618+#define GL_COLOR_MATERIAL_PARAMETER 0x0B56
12619+#define GL_NORMALIZE 0x0BA1
12620+
12621+/* User clipping planes */
12622+#define GL_CLIP_PLANE0 0x3000
12623+#define GL_CLIP_PLANE1 0x3001
12624+#define GL_CLIP_PLANE2 0x3002
12625+#define GL_CLIP_PLANE3 0x3003
12626+#define GL_CLIP_PLANE4 0x3004
12627+#define GL_CLIP_PLANE5 0x3005
12628+
12629+/* Accumulation buffer */
12630+#define GL_ACCUM_RED_BITS 0x0D58
12631+#define GL_ACCUM_GREEN_BITS 0x0D59
12632+#define GL_ACCUM_BLUE_BITS 0x0D5A
12633+#define GL_ACCUM_ALPHA_BITS 0x0D5B
12634+#define GL_ACCUM_CLEAR_VALUE 0x0B80
12635+#define GL_ACCUM 0x0100
12636+#define GL_ADD 0x0104
12637+#define GL_LOAD 0x0101
12638+#define GL_MULT 0x0103
12639+#define GL_RETURN 0x0102
12640+
12641+/* Alpha testing */
12642+#define GL_ALPHA_TEST 0x0BC0
12643+#define GL_ALPHA_TEST_REF 0x0BC2
12644+#define GL_ALPHA_TEST_FUNC 0x0BC1
12645+
12646+/* Blending */
12647+#define GL_BLEND 0x0BE2
12648+#define GL_BLEND_SRC 0x0BE1
12649+#define GL_BLEND_DST 0x0BE0
12650+#define GL_ZERO 0x0
12651+#define GL_ONE 0x1
12652+#define GL_SRC_COLOR 0x0300
12653+#define GL_ONE_MINUS_SRC_COLOR 0x0301
12654+#define GL_SRC_ALPHA 0x0302
12655+#define GL_ONE_MINUS_SRC_ALPHA 0x0303
12656+#define GL_DST_ALPHA 0x0304
12657+#define GL_ONE_MINUS_DST_ALPHA 0x0305
12658+#define GL_DST_COLOR 0x0306
12659+#define GL_ONE_MINUS_DST_COLOR 0x0307
12660+#define GL_SRC_ALPHA_SATURATE 0x0308
12661+
12662+/* Render Mode */
12663+#define GL_FEEDBACK 0x1C01
12664+#define GL_RENDER 0x1C00
12665+#define GL_SELECT 0x1C02
12666+
12667+/* Feedback */
12668+#define GL_2D 0x0600
12669+#define GL_3D 0x0601
12670+#define GL_3D_COLOR 0x0602
12671+#define GL_3D_COLOR_TEXTURE 0x0603
12672+#define GL_4D_COLOR_TEXTURE 0x0604
12673+#define GL_POINT_TOKEN 0x0701
12674+#define GL_LINE_TOKEN 0x0702
12675+#define GL_LINE_RESET_TOKEN 0x0707
12676+#define GL_POLYGON_TOKEN 0x0703
12677+#define GL_BITMAP_TOKEN 0x0704
12678+#define GL_DRAW_PIXEL_TOKEN 0x0705
12679+#define GL_COPY_PIXEL_TOKEN 0x0706
12680+#define GL_PASS_THROUGH_TOKEN 0x0700
12681+#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0
12682+#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1
12683+#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
12684+
12685+/* Selection */
12686+#define GL_SELECTION_BUFFER_POINTER 0x0DF3
12687+#define GL_SELECTION_BUFFER_SIZE 0x0DF4
12688+
12689+/* Fog */
12690+#define GL_FOG 0x0B60
12691+#define GL_FOG_MODE 0x0B65
12692+#define GL_FOG_DENSITY 0x0B62
12693+#define GL_FOG_COLOR 0x0B66
12694+#define GL_FOG_INDEX 0x0B61
12695+#define GL_FOG_START 0x0B63
12696+#define GL_FOG_END 0x0B64
12697+#define GL_LINEAR 0x2601
12698+#define GL_EXP 0x0800
12699+#define GL_EXP2 0x0801
12700+
12701+/* Logic Ops */
12702+#define GL_LOGIC_OP 0x0BF1
12703+#define GL_INDEX_LOGIC_OP 0x0BF1
12704+#define GL_COLOR_LOGIC_OP 0x0BF2
12705+#define GL_LOGIC_OP_MODE 0x0BF0
12706+#define GL_CLEAR 0x1500
12707+#define GL_SET 0x150F
12708+#define GL_COPY 0x1503
12709+#define GL_COPY_INVERTED 0x150C
12710+#define GL_NOOP 0x1505
12711+#define GL_INVERT 0x150A
12712+#define GL_AND 0x1501
12713+#define GL_NAND 0x150E
12714+#define GL_OR 0x1507
12715+#define GL_NOR 0x1508
12716+#define GL_XOR 0x1506
12717+#define GL_EQUIV 0x1509
12718+#define GL_AND_REVERSE 0x1502
12719+#define GL_AND_INVERTED 0x1504
12720+#define GL_OR_REVERSE 0x150B
12721+#define GL_OR_INVERTED 0x150D
12722+
12723+/* Stencil */
12724+#define GL_STENCIL_BITS 0x0D57
12725+#define GL_STENCIL_TEST 0x0B90
12726+#define GL_STENCIL_CLEAR_VALUE 0x0B91
12727+#define GL_STENCIL_FUNC 0x0B92
12728+#define GL_STENCIL_VALUE_MASK 0x0B93
12729+#define GL_STENCIL_FAIL 0x0B94
12730+#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
12731+#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
12732+#define GL_STENCIL_REF 0x0B97
12733+#define GL_STENCIL_WRITEMASK 0x0B98
12734+#define GL_STENCIL_INDEX 0x1901
12735+#define GL_KEEP 0x1E00
12736+#define GL_REPLACE 0x1E01
12737+#define GL_INCR 0x1E02
12738+#define GL_DECR 0x1E03
12739+
12740+/* Buffers, Pixel Drawing/Reading */
12741+#define GL_NONE 0x0
12742+#define GL_LEFT 0x0406
12743+#define GL_RIGHT 0x0407
12744+/*GL_FRONT 0x0404 */
12745+/*GL_BACK 0x0405 */
12746+/*GL_FRONT_AND_BACK 0x0408 */
12747+#define GL_FRONT_LEFT 0x0400
12748+#define GL_FRONT_RIGHT 0x0401
12749+#define GL_BACK_LEFT 0x0402
12750+#define GL_BACK_RIGHT 0x0403
12751+#define GL_AUX0 0x0409
12752+#define GL_AUX1 0x040A
12753+#define GL_AUX2 0x040B
12754+#define GL_AUX3 0x040C
12755+#define GL_COLOR_INDEX 0x1900
12756+#define GL_RED 0x1903
12757+#define GL_GREEN 0x1904
12758+#define GL_BLUE 0x1905
12759+#define GL_ALPHA 0x1906
12760+#define GL_LUMINANCE 0x1909
12761+#define GL_LUMINANCE_ALPHA 0x190A
12762+#define GL_ALPHA_BITS 0x0D55
12763+#define GL_RED_BITS 0x0D52
12764+#define GL_GREEN_BITS 0x0D53
12765+#define GL_BLUE_BITS 0x0D54
12766+#define GL_INDEX_BITS 0x0D51
12767+#define GL_SUBPIXEL_BITS 0x0D50
12768+#define GL_AUX_BUFFERS 0x0C00
12769+#define GL_READ_BUFFER 0x0C02
12770+#define GL_DRAW_BUFFER 0x0C01
12771+#define GL_DOUBLEBUFFER 0x0C32
12772+#define GL_STEREO 0x0C33
12773+#define GL_BITMAP 0x1A00
12774+#define GL_COLOR 0x1800
12775+#define GL_DEPTH 0x1801
12776+#define GL_STENCIL 0x1802
12777+#define GL_DITHER 0x0BD0
12778+#define GL_RGB 0x1907
12779+#define GL_RGBA 0x1908
12780+
12781+/* Implementation limits */
12782+#define GL_MAX_LIST_NESTING 0x0B31
12783+#define GL_MAX_EVAL_ORDER 0x0D30
12784+#define GL_MAX_LIGHTS 0x0D31
12785+#define GL_MAX_CLIP_PLANES 0x0D32
12786+#define GL_MAX_TEXTURE_SIZE 0x0D33
12787+#define GL_MAX_PIXEL_MAP_TABLE 0x0D34
12788+#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
12789+#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
12790+#define GL_MAX_NAME_STACK_DEPTH 0x0D37
12791+#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
12792+#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
12793+#define GL_MAX_VIEWPORT_DIMS 0x0D3A
12794+#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
12795+
12796+/* Gets */
12797+#define GL_ATTRIB_STACK_DEPTH 0x0BB0
12798+#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
12799+#define GL_COLOR_CLEAR_VALUE 0x0C22
12800+#define GL_COLOR_WRITEMASK 0x0C23
12801+#define GL_CURRENT_INDEX 0x0B01
12802+#define GL_CURRENT_COLOR 0x0B00
12803+#define GL_CURRENT_NORMAL 0x0B02
12804+#define GL_CURRENT_RASTER_COLOR 0x0B04
12805+#define GL_CURRENT_RASTER_DISTANCE 0x0B09
12806+#define GL_CURRENT_RASTER_INDEX 0x0B05
12807+#define GL_CURRENT_RASTER_POSITION 0x0B07
12808+#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
12809+#define GL_CURRENT_RASTER_POSITION_VALID 0x0B08
12810+#define GL_CURRENT_TEXTURE_COORDS 0x0B03
12811+#define GL_INDEX_CLEAR_VALUE 0x0C20
12812+#define GL_INDEX_MODE 0x0C30
12813+#define GL_INDEX_WRITEMASK 0x0C21
12814+#define GL_MODELVIEW_MATRIX 0x0BA6
12815+#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
12816+#define GL_NAME_STACK_DEPTH 0x0D70
12817+#define GL_PROJECTION_MATRIX 0x0BA7
12818+#define GL_PROJECTION_STACK_DEPTH 0x0BA4
12819+#define GL_RENDER_MODE 0x0C40
12820+#define GL_RGBA_MODE 0x0C31
12821+#define GL_TEXTURE_MATRIX 0x0BA8
12822+#define GL_TEXTURE_STACK_DEPTH 0x0BA5
12823+#define GL_VIEWPORT 0x0BA2
12824+
12825+/* Evaluators */
12826+#define GL_AUTO_NORMAL 0x0D80
12827+#define GL_MAP1_COLOR_4 0x0D90
12828+#define GL_MAP1_INDEX 0x0D91
12829+#define GL_MAP1_NORMAL 0x0D92
12830+#define GL_MAP1_TEXTURE_COORD_1 0x0D93
12831+#define GL_MAP1_TEXTURE_COORD_2 0x0D94
12832+#define GL_MAP1_TEXTURE_COORD_3 0x0D95
12833+#define GL_MAP1_TEXTURE_COORD_4 0x0D96
12834+#define GL_MAP1_VERTEX_3 0x0D97
12835+#define GL_MAP1_VERTEX_4 0x0D98
12836+#define GL_MAP2_COLOR_4 0x0DB0
12837+#define GL_MAP2_INDEX 0x0DB1
12838+#define GL_MAP2_NORMAL 0x0DB2
12839+#define GL_MAP2_TEXTURE_COORD_1 0x0DB3
12840+#define GL_MAP2_TEXTURE_COORD_2 0x0DB4
12841+#define GL_MAP2_TEXTURE_COORD_3 0x0DB5
12842+#define GL_MAP2_TEXTURE_COORD_4 0x0DB6
12843+#define GL_MAP2_VERTEX_3 0x0DB7
12844+#define GL_MAP2_VERTEX_4 0x0DB8
12845+#define GL_MAP1_GRID_DOMAIN 0x0DD0
12846+#define GL_MAP1_GRID_SEGMENTS 0x0DD1
12847+#define GL_MAP2_GRID_DOMAIN 0x0DD2
12848+#define GL_MAP2_GRID_SEGMENTS 0x0DD3
12849+#define GL_COEFF 0x0A00
12850+#define GL_ORDER 0x0A01
12851+#define GL_DOMAIN 0x0A02
12852+
12853+/* Hints */
12854+#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
12855+#define GL_POINT_SMOOTH_HINT 0x0C51
12856+#define GL_LINE_SMOOTH_HINT 0x0C52
12857+#define GL_POLYGON_SMOOTH_HINT 0x0C53
12858+#define GL_FOG_HINT 0x0C54
12859+#define GL_DONT_CARE 0x1100
12860+#define GL_FASTEST 0x1101
12861+#define GL_NICEST 0x1102
12862+
12863+/* Scissor box */
12864+#define GL_SCISSOR_BOX 0x0C10
12865+#define GL_SCISSOR_TEST 0x0C11
12866+
12867+/* Pixel Mode / Transfer */
12868+#define GL_MAP_COLOR 0x0D10
12869+#define GL_MAP_STENCIL 0x0D11
12870+#define GL_INDEX_SHIFT 0x0D12
12871+#define GL_INDEX_OFFSET 0x0D13
12872+#define GL_RED_SCALE 0x0D14
12873+#define GL_RED_BIAS 0x0D15
12874+#define GL_GREEN_SCALE 0x0D18
12875+#define GL_GREEN_BIAS 0x0D19
12876+#define GL_BLUE_SCALE 0x0D1A
12877+#define GL_BLUE_BIAS 0x0D1B
12878+#define GL_ALPHA_SCALE 0x0D1C
12879+#define GL_ALPHA_BIAS 0x0D1D
12880+#define GL_DEPTH_SCALE 0x0D1E
12881+#define GL_DEPTH_BIAS 0x0D1F
12882+#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
12883+#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
12884+#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
12885+#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
12886+#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
12887+#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
12888+#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
12889+#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
12890+#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
12891+#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
12892+#define GL_PIXEL_MAP_S_TO_S 0x0C71
12893+#define GL_PIXEL_MAP_I_TO_I 0x0C70
12894+#define GL_PIXEL_MAP_I_TO_R 0x0C72
12895+#define GL_PIXEL_MAP_I_TO_G 0x0C73
12896+#define GL_PIXEL_MAP_I_TO_B 0x0C74
12897+#define GL_PIXEL_MAP_I_TO_A 0x0C75
12898+#define GL_PIXEL_MAP_R_TO_R 0x0C76
12899+#define GL_PIXEL_MAP_G_TO_G 0x0C77
12900+#define GL_PIXEL_MAP_B_TO_B 0x0C78
12901+#define GL_PIXEL_MAP_A_TO_A 0x0C79
12902+#define GL_PACK_ALIGNMENT 0x0D05
12903+#define GL_PACK_LSB_FIRST 0x0D01
12904+#define GL_PACK_ROW_LENGTH 0x0D02
12905+#define GL_PACK_SKIP_PIXELS 0x0D04
12906+#define GL_PACK_SKIP_ROWS 0x0D03
12907+#define GL_PACK_SWAP_BYTES 0x0D00
12908+#define GL_UNPACK_ALIGNMENT 0x0CF5
12909+#define GL_UNPACK_LSB_FIRST 0x0CF1
12910+#define GL_UNPACK_ROW_LENGTH 0x0CF2
12911+#define GL_UNPACK_SKIP_PIXELS 0x0CF4
12912+#define GL_UNPACK_SKIP_ROWS 0x0CF3
12913+#define GL_UNPACK_SWAP_BYTES 0x0CF0
12914+#define GL_ZOOM_X 0x0D16
12915+#define GL_ZOOM_Y 0x0D17
12916+
12917+/* Texture mapping */
12918+#define GL_TEXTURE_ENV 0x2300
12919+#define GL_TEXTURE_ENV_MODE 0x2200
12920+#define GL_TEXTURE_1D 0x0DE0
12921+#define GL_TEXTURE_2D 0x0DE1
12922+#define GL_TEXTURE_WRAP_S 0x2802
12923+#define GL_TEXTURE_WRAP_T 0x2803
12924+#define GL_TEXTURE_MAG_FILTER 0x2800
12925+#define GL_TEXTURE_MIN_FILTER 0x2801
12926+#define GL_TEXTURE_ENV_COLOR 0x2201
12927+#define GL_TEXTURE_GEN_S 0x0C60
12928+#define GL_TEXTURE_GEN_T 0x0C61
12929+#define GL_TEXTURE_GEN_MODE 0x2500
12930+#define GL_TEXTURE_BORDER_COLOR 0x1004
12931+#define GL_TEXTURE_WIDTH 0x1000
12932+#define GL_TEXTURE_HEIGHT 0x1001
12933+#define GL_TEXTURE_BORDER 0x1005
12934+#define GL_TEXTURE_COMPONENTS 0x1003
12935+#define GL_TEXTURE_RED_SIZE 0x805C
12936+#define GL_TEXTURE_GREEN_SIZE 0x805D
12937+#define GL_TEXTURE_BLUE_SIZE 0x805E
12938+#define GL_TEXTURE_ALPHA_SIZE 0x805F
12939+#define GL_TEXTURE_LUMINANCE_SIZE 0x8060
12940+#define GL_TEXTURE_INTENSITY_SIZE 0x8061
12941+#define GL_NEAREST_MIPMAP_NEAREST 0x2700
12942+#define GL_NEAREST_MIPMAP_LINEAR 0x2702
12943+#define GL_LINEAR_MIPMAP_NEAREST 0x2701
12944+#define GL_LINEAR_MIPMAP_LINEAR 0x2703
12945+#define GL_OBJECT_LINEAR 0x2401
12946+#define GL_OBJECT_PLANE 0x2501
12947+#define GL_EYE_LINEAR 0x2400
12948+#define GL_EYE_PLANE 0x2502
12949+#define GL_SPHERE_MAP 0x2402
12950+#define GL_DECAL 0x2101
12951+#define GL_MODULATE 0x2100
12952+#define GL_NEAREST 0x2600
12953+#define GL_REPEAT 0x2901
12954+#define GL_CLAMP 0x2900
12955+#define GL_S 0x2000
12956+#define GL_T 0x2001
12957+#define GL_R 0x2002
12958+#define GL_Q 0x2003
12959+#define GL_TEXTURE_GEN_R 0x0C62
12960+#define GL_TEXTURE_GEN_Q 0x0C63
12961+
12962+/* Utility */
12963+#define GL_VENDOR 0x1F00
12964+#define GL_RENDERER 0x1F01
12965+#define GL_VERSION 0x1F02
12966+#define GL_EXTENSIONS 0x1F03
12967+
12968+/* Errors */
12969+#define GL_NO_ERROR 0x0
12970+#define GL_INVALID_ENUM 0x0500
12971+#define GL_INVALID_VALUE 0x0501
12972+#define GL_INVALID_OPERATION 0x0502
12973+#define GL_STACK_OVERFLOW 0x0503
12974+#define GL_STACK_UNDERFLOW 0x0504
12975+#define GL_OUT_OF_MEMORY 0x0505
12976+
12977+/* glPush/PopAttrib bits */
12978+#define GL_CURRENT_BIT 0x00000001
12979+#define GL_POINT_BIT 0x00000002
12980+#define GL_LINE_BIT 0x00000004
12981+#define GL_POLYGON_BIT 0x00000008
12982+#define GL_POLYGON_STIPPLE_BIT 0x00000010
12983+#define GL_PIXEL_MODE_BIT 0x00000020
12984+#define GL_LIGHTING_BIT 0x00000040
12985+#define GL_FOG_BIT 0x00000080
12986+#define GL_DEPTH_BUFFER_BIT 0x00000100
12987+#define GL_ACCUM_BUFFER_BIT 0x00000200
12988+#define GL_STENCIL_BUFFER_BIT 0x00000400
12989+#define GL_VIEWPORT_BIT 0x00000800
12990+#define GL_TRANSFORM_BIT 0x00001000
12991+#define GL_ENABLE_BIT 0x00002000
12992+#define GL_COLOR_BUFFER_BIT 0x00004000
12993+#define GL_HINT_BIT 0x00008000
12994+#define GL_EVAL_BIT 0x00010000
12995+#define GL_LIST_BIT 0x00020000
12996+#define GL_TEXTURE_BIT 0x00040000
12997+#define GL_SCISSOR_BIT 0x00080000
12998+#define GL_ALL_ATTRIB_BITS 0x000FFFFF
12999+
13000+
13001+/* OpenGL 1.1 */
13002+#define GL_PROXY_TEXTURE_1D 0x8063
13003+#define GL_PROXY_TEXTURE_2D 0x8064
13004+#define GL_TEXTURE_PRIORITY 0x8066
13005+#define GL_TEXTURE_RESIDENT 0x8067
13006+#define GL_TEXTURE_BINDING_1D 0x8068
13007+#define GL_TEXTURE_BINDING_2D 0x8069
13008+#define GL_TEXTURE_INTERNAL_FORMAT 0x1003
13009+#define GL_ALPHA4 0x803B
13010+#define GL_ALPHA8 0x803C
13011+#define GL_ALPHA12 0x803D
13012+#define GL_ALPHA16 0x803E
13013+#define GL_LUMINANCE4 0x803F
13014+#define GL_LUMINANCE8 0x8040
13015+#define GL_LUMINANCE12 0x8041
13016+#define GL_LUMINANCE16 0x8042
13017+#define GL_LUMINANCE4_ALPHA4 0x8043
13018+#define GL_LUMINANCE6_ALPHA2 0x8044
13019+#define GL_LUMINANCE8_ALPHA8 0x8045
13020+#define GL_LUMINANCE12_ALPHA4 0x8046
13021+#define GL_LUMINANCE12_ALPHA12 0x8047
13022+#define GL_LUMINANCE16_ALPHA16 0x8048
13023+#define GL_INTENSITY 0x8049
13024+#define GL_INTENSITY4 0x804A
13025+#define GL_INTENSITY8 0x804B
13026+#define GL_INTENSITY12 0x804C
13027+#define GL_INTENSITY16 0x804D
13028+#define GL_R3_G3_B2 0x2A10
13029+#define GL_RGB4 0x804F
13030+#define GL_RGB5 0x8050
13031+#define GL_RGB8 0x8051
13032+#define GL_RGB10 0x8052
13033+#define GL_RGB12 0x8053
13034+#define GL_RGB16 0x8054
13035+#define GL_RGBA2 0x8055
13036+#define GL_RGBA4 0x8056
13037+#define GL_RGB5_A1 0x8057
13038+#define GL_RGBA8 0x8058
13039+#define GL_RGB10_A2 0x8059
13040+#define GL_RGBA12 0x805A
13041+#define GL_RGBA16 0x805B
13042+#define GL_CLIENT_PIXEL_STORE_BIT 0x00000001
13043+#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
13044+#define GL_ALL_CLIENT_ATTRIB_BITS 0xFFFFFFFF
13045+#define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF
13046+
13047+
13048+
13049+/*
13050+ * Miscellaneous
13051+ */
13052+
13053+GLAPI void GLAPIENTRY glClearIndex( GLfloat c );
13054+
13055+GLAPI void GLAPIENTRY glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
13056+
13057+GLAPI void GLAPIENTRY glClear( GLbitfield mask );
13058+
13059+GLAPI void GLAPIENTRY glIndexMask( GLuint mask );
13060+
13061+GLAPI void GLAPIENTRY glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );
13062+
13063+GLAPI void GLAPIENTRY glAlphaFunc( GLenum func, GLclampf ref );
13064+
13065+GLAPI void GLAPIENTRY glBlendFunc( GLenum sfactor, GLenum dfactor );
13066+
13067+GLAPI void GLAPIENTRY glLogicOp( GLenum opcode );
13068+
13069+GLAPI void GLAPIENTRY glCullFace( GLenum mode );
13070+
13071+GLAPI void GLAPIENTRY glFrontFace( GLenum mode );
13072+
13073+GLAPI void GLAPIENTRY glPointSize( GLfloat size );
13074+
13075+GLAPI void GLAPIENTRY glLineWidth( GLfloat width );
13076+
13077+GLAPI void GLAPIENTRY glLineStipple( GLint factor, GLushort pattern );
13078+
13079+GLAPI void GLAPIENTRY glPolygonMode( GLenum face, GLenum mode );
13080+
13081+GLAPI void GLAPIENTRY glPolygonOffset( GLfloat factor, GLfloat units );
13082+
13083+GLAPI void GLAPIENTRY glPolygonStipple( const GLubyte *mask );
13084+
13085+GLAPI void GLAPIENTRY glGetPolygonStipple( GLubyte *mask );
13086+
13087+GLAPI void GLAPIENTRY glEdgeFlag( GLboolean flag );
13088+
13089+GLAPI void GLAPIENTRY glEdgeFlagv( const GLboolean *flag );
13090+
13091+GLAPI void GLAPIENTRY glScissor( GLint x, GLint y, GLsizei width, GLsizei height);
13092+
13093+GLAPI void GLAPIENTRY glClipPlane( GLenum plane, const GLdouble *equation );
13094+
13095+GLAPI void GLAPIENTRY glGetClipPlane( GLenum plane, GLdouble *equation );
13096+
13097+GLAPI void GLAPIENTRY glDrawBuffer( GLenum mode );
13098+
13099+GLAPI void GLAPIENTRY glReadBuffer( GLenum mode );
13100+
13101+GLAPI void GLAPIENTRY glEnable( GLenum cap );
13102+
13103+GLAPI void GLAPIENTRY glDisable( GLenum cap );
13104+
13105+GLAPI GLboolean GLAPIENTRY glIsEnabled( GLenum cap );
13106+
13107+
13108+GLAPI void GLAPIENTRY glEnableClientState( GLenum cap ); /* 1.1 */
13109+
13110+GLAPI void GLAPIENTRY glDisableClientState( GLenum cap ); /* 1.1 */
13111+
13112+
13113+GLAPI void GLAPIENTRY glGetBooleanv( GLenum pname, GLboolean *params );
13114+
13115+GLAPI void GLAPIENTRY glGetDoublev( GLenum pname, GLdouble *params );
13116+
13117+GLAPI void GLAPIENTRY glGetFloatv( GLenum pname, GLfloat *params );
13118+
13119+GLAPI void GLAPIENTRY glGetIntegerv( GLenum pname, GLint *params );
13120+
13121+
13122+GLAPI void GLAPIENTRY glPushAttrib( GLbitfield mask );
13123+
13124+GLAPI void GLAPIENTRY glPopAttrib( void );
13125+
13126+
13127+GLAPI void GLAPIENTRY glPushClientAttrib( GLbitfield mask ); /* 1.1 */
13128+
13129+GLAPI void GLAPIENTRY glPopClientAttrib( void ); /* 1.1 */
13130+
13131+
13132+GLAPI GLint GLAPIENTRY glRenderMode( GLenum mode );
13133+
13134+GLAPI GLenum GLAPIENTRY glGetError( void );
13135+
13136+GLAPI const GLubyte * GLAPIENTRY glGetString( GLenum name );
13137+
13138+GLAPI void GLAPIENTRY glFinish( void );
13139+
13140+GLAPI void GLAPIENTRY glFlush( void );
13141+
13142+GLAPI void GLAPIENTRY glHint( GLenum target, GLenum mode );
13143+
13144+
13145+/*
13146+ * Depth Buffer
13147+ */
13148+
13149+GLAPI void GLAPIENTRY glClearDepth( GLclampd depth );
13150+
13151+GLAPI void GLAPIENTRY glDepthFunc( GLenum func );
13152+
13153+GLAPI void GLAPIENTRY glDepthMask( GLboolean flag );
13154+
13155+GLAPI void GLAPIENTRY glDepthRange( GLclampd near_val, GLclampd far_val );
13156+
13157+
13158+/*
13159+ * Accumulation Buffer
13160+ */
13161+
13162+GLAPI void GLAPIENTRY glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
13163+
13164+GLAPI void GLAPIENTRY glAccum( GLenum op, GLfloat value );
13165+
13166+
13167+/*
13168+ * Transformation
13169+ */
13170+
13171+GLAPI void GLAPIENTRY glMatrixMode( GLenum mode );
13172+
13173+GLAPI void GLAPIENTRY glOrtho( GLdouble left, GLdouble right,
13174+ GLdouble bottom, GLdouble top,
13175+ GLdouble near_val, GLdouble far_val );
13176+
13177+GLAPI void GLAPIENTRY glFrustum( GLdouble left, GLdouble right,
13178+ GLdouble bottom, GLdouble top,
13179+ GLdouble near_val, GLdouble far_val );
13180+
13181+GLAPI void GLAPIENTRY glViewport( GLint x, GLint y,
13182+ GLsizei width, GLsizei height );
13183+
13184+GLAPI void GLAPIENTRY glPushMatrix( void );
13185+
13186+GLAPI void GLAPIENTRY glPopMatrix( void );
13187+
13188+GLAPI void GLAPIENTRY glLoadIdentity( void );
13189+
13190+GLAPI void GLAPIENTRY glLoadMatrixd( const GLdouble *m );
13191+GLAPI void GLAPIENTRY glLoadMatrixf( const GLfloat *m );
13192+
13193+GLAPI void GLAPIENTRY glMultMatrixd( const GLdouble *m );
13194+GLAPI void GLAPIENTRY glMultMatrixf( const GLfloat *m );
13195+
13196+GLAPI void GLAPIENTRY glRotated( GLdouble angle,
13197+ GLdouble x, GLdouble y, GLdouble z );
13198+GLAPI void GLAPIENTRY glRotatef( GLfloat angle,
13199+ GLfloat x, GLfloat y, GLfloat z );
13200+
13201+GLAPI void GLAPIENTRY glScaled( GLdouble x, GLdouble y, GLdouble z );
13202+GLAPI void GLAPIENTRY glScalef( GLfloat x, GLfloat y, GLfloat z );
13203+
13204+GLAPI void GLAPIENTRY glTranslated( GLdouble x, GLdouble y, GLdouble z );
13205+GLAPI void GLAPIENTRY glTranslatef( GLfloat x, GLfloat y, GLfloat z );
13206+
13207+
13208+/*
13209+ * Display Lists
13210+ */
13211+
13212+GLAPI GLboolean GLAPIENTRY glIsList( GLuint list );
13213+
13214+GLAPI void GLAPIENTRY glDeleteLists( GLuint list, GLsizei range );
13215+
13216+GLAPI GLuint GLAPIENTRY glGenLists( GLsizei range );
13217+
13218+GLAPI void GLAPIENTRY glNewList( GLuint list, GLenum mode );
13219+
13220+GLAPI void GLAPIENTRY glEndList( void );
13221+
13222+GLAPI void GLAPIENTRY glCallList( GLuint list );
13223+
13224+GLAPI void GLAPIENTRY glCallLists( GLsizei n, GLenum type,
13225+ const GLvoid *lists );
13226+
13227+GLAPI void GLAPIENTRY glListBase( GLuint base );
13228+
13229+
13230+/*
13231+ * Drawing Functions
13232+ */
13233+
13234+GLAPI void GLAPIENTRY glBegin( GLenum mode );
13235+
13236+GLAPI void GLAPIENTRY glEnd( void );
13237+
13238+
13239+GLAPI void GLAPIENTRY glVertex2d( GLdouble x, GLdouble y );
13240+GLAPI void GLAPIENTRY glVertex2f( GLfloat x, GLfloat y );
13241+GLAPI void GLAPIENTRY glVertex2i( GLint x, GLint y );
13242+GLAPI void GLAPIENTRY glVertex2s( GLshort x, GLshort y );
13243+
13244+GLAPI void GLAPIENTRY glVertex3d( GLdouble x, GLdouble y, GLdouble z );
13245+GLAPI void GLAPIENTRY glVertex3f( GLfloat x, GLfloat y, GLfloat z );
13246+GLAPI void GLAPIENTRY glVertex3i( GLint x, GLint y, GLint z );
13247+GLAPI void GLAPIENTRY glVertex3s( GLshort x, GLshort y, GLshort z );
13248+
13249+GLAPI void GLAPIENTRY glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
13250+GLAPI void GLAPIENTRY glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
13251+GLAPI void GLAPIENTRY glVertex4i( GLint x, GLint y, GLint z, GLint w );
13252+GLAPI void GLAPIENTRY glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w );
13253+
13254+GLAPI void GLAPIENTRY glVertex2dv( const GLdouble *v );
13255+GLAPI void GLAPIENTRY glVertex2fv( const GLfloat *v );
13256+GLAPI void GLAPIENTRY glVertex2iv( const GLint *v );
13257+GLAPI void GLAPIENTRY glVertex2sv( const GLshort *v );
13258+
13259+GLAPI void GLAPIENTRY glVertex3dv( const GLdouble *v );
13260+GLAPI void GLAPIENTRY glVertex3fv( const GLfloat *v );
13261+GLAPI void GLAPIENTRY glVertex3iv( const GLint *v );
13262+GLAPI void GLAPIENTRY glVertex3sv( const GLshort *v );
13263+
13264+GLAPI void GLAPIENTRY glVertex4dv( const GLdouble *v );
13265+GLAPI void GLAPIENTRY glVertex4fv( const GLfloat *v );
13266+GLAPI void GLAPIENTRY glVertex4iv( const GLint *v );
13267+GLAPI void GLAPIENTRY glVertex4sv( const GLshort *v );
13268+
13269+
13270+GLAPI void GLAPIENTRY glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz );
13271+GLAPI void GLAPIENTRY glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz );
13272+GLAPI void GLAPIENTRY glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz );
13273+GLAPI void GLAPIENTRY glNormal3i( GLint nx, GLint ny, GLint nz );
13274+GLAPI void GLAPIENTRY glNormal3s( GLshort nx, GLshort ny, GLshort nz );
13275+
13276+GLAPI void GLAPIENTRY glNormal3bv( const GLbyte *v );
13277+GLAPI void GLAPIENTRY glNormal3dv( const GLdouble *v );
13278+GLAPI void GLAPIENTRY glNormal3fv( const GLfloat *v );
13279+GLAPI void GLAPIENTRY glNormal3iv( const GLint *v );
13280+GLAPI void GLAPIENTRY glNormal3sv( const GLshort *v );
13281+
13282+
13283+GLAPI void GLAPIENTRY glIndexd( GLdouble c );
13284+GLAPI void GLAPIENTRY glIndexf( GLfloat c );
13285+GLAPI void GLAPIENTRY glIndexi( GLint c );
13286+GLAPI void GLAPIENTRY glIndexs( GLshort c );
13287+GLAPI void GLAPIENTRY glIndexub( GLubyte c ); /* 1.1 */
13288+
13289+GLAPI void GLAPIENTRY glIndexdv( const GLdouble *c );
13290+GLAPI void GLAPIENTRY glIndexfv( const GLfloat *c );
13291+GLAPI void GLAPIENTRY glIndexiv( const GLint *c );
13292+GLAPI void GLAPIENTRY glIndexsv( const GLshort *c );
13293+GLAPI void GLAPIENTRY glIndexubv( const GLubyte *c ); /* 1.1 */
13294+
13295+GLAPI void GLAPIENTRY glColor3b( GLbyte red, GLbyte green, GLbyte blue );
13296+GLAPI void GLAPIENTRY glColor3d( GLdouble red, GLdouble green, GLdouble blue );
13297+GLAPI void GLAPIENTRY glColor3f( GLfloat red, GLfloat green, GLfloat blue );
13298+GLAPI void GLAPIENTRY glColor3i( GLint red, GLint green, GLint blue );
13299+GLAPI void GLAPIENTRY glColor3s( GLshort red, GLshort green, GLshort blue );
13300+GLAPI void GLAPIENTRY glColor3ub( GLubyte red, GLubyte green, GLubyte blue );
13301+GLAPI void GLAPIENTRY glColor3ui( GLuint red, GLuint green, GLuint blue );
13302+GLAPI void GLAPIENTRY glColor3us( GLushort red, GLushort green, GLushort blue );
13303+
13304+GLAPI void GLAPIENTRY glColor4b( GLbyte red, GLbyte green,
13305+ GLbyte blue, GLbyte alpha );
13306+GLAPI void GLAPIENTRY glColor4d( GLdouble red, GLdouble green,
13307+ GLdouble blue, GLdouble alpha );
13308+GLAPI void GLAPIENTRY glColor4f( GLfloat red, GLfloat green,
13309+ GLfloat blue, GLfloat alpha );
13310+GLAPI void GLAPIENTRY glColor4i( GLint red, GLint green,
13311+ GLint blue, GLint alpha );
13312+GLAPI void GLAPIENTRY glColor4s( GLshort red, GLshort green,
13313+ GLshort blue, GLshort alpha );
13314+GLAPI void GLAPIENTRY glColor4ub( GLubyte red, GLubyte green,
13315+ GLubyte blue, GLubyte alpha );
13316+GLAPI void GLAPIENTRY glColor4ui( GLuint red, GLuint green,
13317+ GLuint blue, GLuint alpha );
13318+GLAPI void GLAPIENTRY glColor4us( GLushort red, GLushort green,
13319+ GLushort blue, GLushort alpha );
13320+
13321+
13322+GLAPI void GLAPIENTRY glColor3bv( const GLbyte *v );
13323+GLAPI void GLAPIENTRY glColor3dv( const GLdouble *v );
13324+GLAPI void GLAPIENTRY glColor3fv( const GLfloat *v );
13325+GLAPI void GLAPIENTRY glColor3iv( const GLint *v );
13326+GLAPI void GLAPIENTRY glColor3sv( const GLshort *v );
13327+GLAPI void GLAPIENTRY glColor3ubv( const GLubyte *v );
13328+GLAPI void GLAPIENTRY glColor3uiv( const GLuint *v );
13329+GLAPI void GLAPIENTRY glColor3usv( const GLushort *v );
13330+
13331+GLAPI void GLAPIENTRY glColor4bv( const GLbyte *v );
13332+GLAPI void GLAPIENTRY glColor4dv( const GLdouble *v );
13333+GLAPI void GLAPIENTRY glColor4fv( const GLfloat *v );
13334+GLAPI void GLAPIENTRY glColor4iv( const GLint *v );
13335+GLAPI void GLAPIENTRY glColor4sv( const GLshort *v );
13336+GLAPI void GLAPIENTRY glColor4ubv( const GLubyte *v );
13337+GLAPI void GLAPIENTRY glColor4uiv( const GLuint *v );
13338+GLAPI void GLAPIENTRY glColor4usv( const GLushort *v );
13339+
13340+
13341+GLAPI void GLAPIENTRY glTexCoord1d( GLdouble s );
13342+GLAPI void GLAPIENTRY glTexCoord1f( GLfloat s );
13343+GLAPI void GLAPIENTRY glTexCoord1i( GLint s );
13344+GLAPI void GLAPIENTRY glTexCoord1s( GLshort s );
13345+
13346+GLAPI void GLAPIENTRY glTexCoord2d( GLdouble s, GLdouble t );
13347+GLAPI void GLAPIENTRY glTexCoord2f( GLfloat s, GLfloat t );
13348+GLAPI void GLAPIENTRY glTexCoord2i( GLint s, GLint t );
13349+GLAPI void GLAPIENTRY glTexCoord2s( GLshort s, GLshort t );
13350+
13351+GLAPI void GLAPIENTRY glTexCoord3d( GLdouble s, GLdouble t, GLdouble r );
13352+GLAPI void GLAPIENTRY glTexCoord3f( GLfloat s, GLfloat t, GLfloat r );
13353+GLAPI void GLAPIENTRY glTexCoord3i( GLint s, GLint t, GLint r );
13354+GLAPI void GLAPIENTRY glTexCoord3s( GLshort s, GLshort t, GLshort r );
13355+
13356+GLAPI void GLAPIENTRY glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q );
13357+GLAPI void GLAPIENTRY glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q );
13358+GLAPI void GLAPIENTRY glTexCoord4i( GLint s, GLint t, GLint r, GLint q );
13359+GLAPI void GLAPIENTRY glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q );
13360+
13361+GLAPI void GLAPIENTRY glTexCoord1dv( const GLdouble *v );
13362+GLAPI void GLAPIENTRY glTexCoord1fv( const GLfloat *v );
13363+GLAPI void GLAPIENTRY glTexCoord1iv( const GLint *v );
13364+GLAPI void GLAPIENTRY glTexCoord1sv( const GLshort *v );
13365+
13366+GLAPI void GLAPIENTRY glTexCoord2dv( const GLdouble *v );
13367+GLAPI void GLAPIENTRY glTexCoord2fv( const GLfloat *v );
13368+GLAPI void GLAPIENTRY glTexCoord2iv( const GLint *v );
13369+GLAPI void GLAPIENTRY glTexCoord2sv( const GLshort *v );
13370+
13371+GLAPI void GLAPIENTRY glTexCoord3dv( const GLdouble *v );
13372+GLAPI void GLAPIENTRY glTexCoord3fv( const GLfloat *v );
13373+GLAPI void GLAPIENTRY glTexCoord3iv( const GLint *v );
13374+GLAPI void GLAPIENTRY glTexCoord3sv( const GLshort *v );
13375+
13376+GLAPI void GLAPIENTRY glTexCoord4dv( const GLdouble *v );
13377+GLAPI void GLAPIENTRY glTexCoord4fv( const GLfloat *v );
13378+GLAPI void GLAPIENTRY glTexCoord4iv( const GLint *v );
13379+GLAPI void GLAPIENTRY glTexCoord4sv( const GLshort *v );
13380+
13381+
13382+GLAPI void GLAPIENTRY glRasterPos2d( GLdouble x, GLdouble y );
13383+GLAPI void GLAPIENTRY glRasterPos2f( GLfloat x, GLfloat y );
13384+GLAPI void GLAPIENTRY glRasterPos2i( GLint x, GLint y );
13385+GLAPI void GLAPIENTRY glRasterPos2s( GLshort x, GLshort y );
13386+
13387+GLAPI void GLAPIENTRY glRasterPos3d( GLdouble x, GLdouble y, GLdouble z );
13388+GLAPI void GLAPIENTRY glRasterPos3f( GLfloat x, GLfloat y, GLfloat z );
13389+GLAPI void GLAPIENTRY glRasterPos3i( GLint x, GLint y, GLint z );
13390+GLAPI void GLAPIENTRY glRasterPos3s( GLshort x, GLshort y, GLshort z );
13391+
13392+GLAPI void GLAPIENTRY glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
13393+GLAPI void GLAPIENTRY glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
13394+GLAPI void GLAPIENTRY glRasterPos4i( GLint x, GLint y, GLint z, GLint w );
13395+GLAPI void GLAPIENTRY glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w );
13396+
13397+GLAPI void GLAPIENTRY glRasterPos2dv( const GLdouble *v );
13398+GLAPI void GLAPIENTRY glRasterPos2fv( const GLfloat *v );
13399+GLAPI void GLAPIENTRY glRasterPos2iv( const GLint *v );
13400+GLAPI void GLAPIENTRY glRasterPos2sv( const GLshort *v );
13401+
13402+GLAPI void GLAPIENTRY glRasterPos3dv( const GLdouble *v );
13403+GLAPI void GLAPIENTRY glRasterPos3fv( const GLfloat *v );
13404+GLAPI void GLAPIENTRY glRasterPos3iv( const GLint *v );
13405+GLAPI void GLAPIENTRY glRasterPos3sv( const GLshort *v );
13406+
13407+GLAPI void GLAPIENTRY glRasterPos4dv( const GLdouble *v );
13408+GLAPI void GLAPIENTRY glRasterPos4fv( const GLfloat *v );
13409+GLAPI void GLAPIENTRY glRasterPos4iv( const GLint *v );
13410+GLAPI void GLAPIENTRY glRasterPos4sv( const GLshort *v );
13411+
13412+
13413+GLAPI void GLAPIENTRY glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 );
13414+GLAPI void GLAPIENTRY glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 );
13415+GLAPI void GLAPIENTRY glRecti( GLint x1, GLint y1, GLint x2, GLint y2 );
13416+GLAPI void GLAPIENTRY glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 );
13417+
13418+
13419+GLAPI void GLAPIENTRY glRectdv( const GLdouble *v1, const GLdouble *v2 );
13420+GLAPI void GLAPIENTRY glRectfv( const GLfloat *v1, const GLfloat *v2 );
13421+GLAPI void GLAPIENTRY glRectiv( const GLint *v1, const GLint *v2 );
13422+GLAPI void GLAPIENTRY glRectsv( const GLshort *v1, const GLshort *v2 );
13423+
13424+
13425+/*
13426+ * Vertex Arrays (1.1)
13427+ */
13428+
13429+GLAPI void GLAPIENTRY glVertexPointer( GLint size, GLenum type,
13430+ GLsizei stride, const GLvoid *ptr );
13431+
13432+GLAPI void GLAPIENTRY glNormalPointer( GLenum type, GLsizei stride,
13433+ const GLvoid *ptr );
13434+
13435+GLAPI void GLAPIENTRY glColorPointer( GLint size, GLenum type,
13436+ GLsizei stride, const GLvoid *ptr );
13437+
13438+GLAPI void GLAPIENTRY glIndexPointer( GLenum type, GLsizei stride,
13439+ const GLvoid *ptr );
13440+
13441+GLAPI void GLAPIENTRY glTexCoordPointer( GLint size, GLenum type,
13442+ GLsizei stride, const GLvoid *ptr );
13443+
13444+GLAPI void GLAPIENTRY glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr );
13445+
13446+GLAPI void GLAPIENTRY glGetPointerv( GLenum pname, GLvoid **params );
13447+
13448+GLAPI void GLAPIENTRY glArrayElement( GLint i );
13449+
13450+GLAPI void GLAPIENTRY glDrawArrays( GLenum mode, GLint first, GLsizei count );
13451+
13452+GLAPI void GLAPIENTRY glDrawElements( GLenum mode, GLsizei count,
13453+ GLenum type, const GLvoid *indices );
13454+
13455+GLAPI void GLAPIENTRY glInterleavedArrays( GLenum format, GLsizei stride,
13456+ const GLvoid *pointer );
13457+
13458+/*
13459+ * Lighting
13460+ */
13461+
13462+GLAPI void GLAPIENTRY glShadeModel( GLenum mode );
13463+
13464+GLAPI void GLAPIENTRY glLightf( GLenum light, GLenum pname, GLfloat param );
13465+GLAPI void GLAPIENTRY glLighti( GLenum light, GLenum pname, GLint param );
13466+GLAPI void GLAPIENTRY glLightfv( GLenum light, GLenum pname,
13467+ const GLfloat *params );
13468+GLAPI void GLAPIENTRY glLightiv( GLenum light, GLenum pname,
13469+ const GLint *params );
13470+
13471+GLAPI void GLAPIENTRY glGetLightfv( GLenum light, GLenum pname,
13472+ GLfloat *params );
13473+GLAPI void GLAPIENTRY glGetLightiv( GLenum light, GLenum pname,
13474+ GLint *params );
13475+
13476+GLAPI void GLAPIENTRY glLightModelf( GLenum pname, GLfloat param );
13477+GLAPI void GLAPIENTRY glLightModeli( GLenum pname, GLint param );
13478+GLAPI void GLAPIENTRY glLightModelfv( GLenum pname, const GLfloat *params );
13479+GLAPI void GLAPIENTRY glLightModeliv( GLenum pname, const GLint *params );
13480+
13481+GLAPI void GLAPIENTRY glMaterialf( GLenum face, GLenum pname, GLfloat param );
13482+GLAPI void GLAPIENTRY glMateriali( GLenum face, GLenum pname, GLint param );
13483+GLAPI void GLAPIENTRY glMaterialfv( GLenum face, GLenum pname, const GLfloat *params );
13484+GLAPI void GLAPIENTRY glMaterialiv( GLenum face, GLenum pname, const GLint *params );
13485+
13486+GLAPI void GLAPIENTRY glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params );
13487+GLAPI void GLAPIENTRY glGetMaterialiv( GLenum face, GLenum pname, GLint *params );
13488+
13489+GLAPI void GLAPIENTRY glColorMaterial( GLenum face, GLenum mode );
13490+
13491+
13492+/*
13493+ * Raster functions
13494+ */
13495+
13496+GLAPI void GLAPIENTRY glPixelZoom( GLfloat xfactor, GLfloat yfactor );
13497+
13498+GLAPI void GLAPIENTRY glPixelStoref( GLenum pname, GLfloat param );
13499+GLAPI void GLAPIENTRY glPixelStorei( GLenum pname, GLint param );
13500+
13501+GLAPI void GLAPIENTRY glPixelTransferf( GLenum pname, GLfloat param );
13502+GLAPI void GLAPIENTRY glPixelTransferi( GLenum pname, GLint param );
13503+
13504+GLAPI void GLAPIENTRY glPixelMapfv( GLenum map, GLsizei mapsize,
13505+ const GLfloat *values );
13506+GLAPI void GLAPIENTRY glPixelMapuiv( GLenum map, GLsizei mapsize,
13507+ const GLuint *values );
13508+GLAPI void GLAPIENTRY glPixelMapusv( GLenum map, GLsizei mapsize,
13509+ const GLushort *values );
13510+
13511+GLAPI void GLAPIENTRY glGetPixelMapfv( GLenum map, GLfloat *values );
13512+GLAPI void GLAPIENTRY glGetPixelMapuiv( GLenum map, GLuint *values );
13513+GLAPI void GLAPIENTRY glGetPixelMapusv( GLenum map, GLushort *values );
13514+
13515+GLAPI void GLAPIENTRY glBitmap( GLsizei width, GLsizei height,
13516+ GLfloat xorig, GLfloat yorig,
13517+ GLfloat xmove, GLfloat ymove,
13518+ const GLubyte *bitmap );
13519+
13520+GLAPI void GLAPIENTRY glReadPixels( GLint x, GLint y,
13521+ GLsizei width, GLsizei height,
13522+ GLenum format, GLenum type,
13523+ GLvoid *pixels );
13524+
13525+GLAPI void GLAPIENTRY glDrawPixels( GLsizei width, GLsizei height,
13526+ GLenum format, GLenum type,
13527+ const GLvoid *pixels );
13528+
13529+GLAPI void GLAPIENTRY glCopyPixels( GLint x, GLint y,
13530+ GLsizei width, GLsizei height,
13531+ GLenum type );
13532+
13533+/*
13534+ * Stenciling
13535+ */
13536+
13537+GLAPI void GLAPIENTRY glStencilFunc( GLenum func, GLint ref, GLuint mask );
13538+
13539+GLAPI void GLAPIENTRY glStencilMask( GLuint mask );
13540+
13541+GLAPI void GLAPIENTRY glStencilOp( GLenum fail, GLenum zfail, GLenum zpass );
13542+
13543+GLAPI void GLAPIENTRY glClearStencil( GLint s );
13544+
13545+
13546+
13547+/*
13548+ * Texture mapping
13549+ */
13550+
13551+GLAPI void GLAPIENTRY glTexGend( GLenum coord, GLenum pname, GLdouble param );
13552+GLAPI void GLAPIENTRY glTexGenf( GLenum coord, GLenum pname, GLfloat param );
13553+GLAPI void GLAPIENTRY glTexGeni( GLenum coord, GLenum pname, GLint param );
13554+
13555+GLAPI void GLAPIENTRY glTexGendv( GLenum coord, GLenum pname, const GLdouble *params );
13556+GLAPI void GLAPIENTRY glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params );
13557+GLAPI void GLAPIENTRY glTexGeniv( GLenum coord, GLenum pname, const GLint *params );
13558+
13559+GLAPI void GLAPIENTRY glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params );
13560+GLAPI void GLAPIENTRY glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params );
13561+GLAPI void GLAPIENTRY glGetTexGeniv( GLenum coord, GLenum pname, GLint *params );
13562+
13563+
13564+GLAPI void GLAPIENTRY glTexEnvf( GLenum target, GLenum pname, GLfloat param );
13565+GLAPI void GLAPIENTRY glTexEnvi( GLenum target, GLenum pname, GLint param );
13566+
13567+GLAPI void GLAPIENTRY glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params );
13568+GLAPI void GLAPIENTRY glTexEnviv( GLenum target, GLenum pname, const GLint *params );
13569+
13570+GLAPI void GLAPIENTRY glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params );
13571+GLAPI void GLAPIENTRY glGetTexEnviv( GLenum target, GLenum pname, GLint *params );
13572+
13573+
13574+GLAPI void GLAPIENTRY glTexParameterf( GLenum target, GLenum pname, GLfloat param );
13575+GLAPI void GLAPIENTRY glTexParameteri( GLenum target, GLenum pname, GLint param );
13576+
13577+GLAPI void GLAPIENTRY glTexParameterfv( GLenum target, GLenum pname,
13578+ const GLfloat *params );
13579+GLAPI void GLAPIENTRY glTexParameteriv( GLenum target, GLenum pname,
13580+ const GLint *params );
13581+
13582+GLAPI void GLAPIENTRY glGetTexParameterfv( GLenum target,
13583+ GLenum pname, GLfloat *params);
13584+GLAPI void GLAPIENTRY glGetTexParameteriv( GLenum target,
13585+ GLenum pname, GLint *params );
13586+
13587+GLAPI void GLAPIENTRY glGetTexLevelParameterfv( GLenum target, GLint level,
13588+ GLenum pname, GLfloat *params );
13589+GLAPI void GLAPIENTRY glGetTexLevelParameteriv( GLenum target, GLint level,
13590+ GLenum pname, GLint *params );
13591+
13592+
13593+GLAPI void GLAPIENTRY glTexImage1D( GLenum target, GLint level,
13594+ GLint internalFormat,
13595+ GLsizei width, GLint border,
13596+ GLenum format, GLenum type,
13597+ const GLvoid *pixels );
13598+
13599+GLAPI void GLAPIENTRY glTexImage2D( GLenum target, GLint level,
13600+ GLint internalFormat,
13601+ GLsizei width, GLsizei height,
13602+ GLint border, GLenum format, GLenum type,
13603+ const GLvoid *pixels );
13604+
13605+GLAPI void GLAPIENTRY glGetTexImage( GLenum target, GLint level,
13606+ GLenum format, GLenum type,
13607+ GLvoid *pixels );
13608+
13609+
13610+/* 1.1 functions */
13611+
13612+GLAPI void GLAPIENTRY glGenTextures( GLsizei n, GLuint *textures );
13613+
13614+GLAPI void GLAPIENTRY glDeleteTextures( GLsizei n, const GLuint *textures);
13615+
13616+GLAPI void GLAPIENTRY glBindTexture( GLenum target, GLuint texture );
13617+
13618+GLAPI void GLAPIENTRY glPrioritizeTextures( GLsizei n,
13619+ const GLuint *textures,
13620+ const GLclampf *priorities );
13621+
13622+GLAPI GLboolean GLAPIENTRY glAreTexturesResident( GLsizei n,
13623+ const GLuint *textures,
13624+ GLboolean *residences );
13625+
13626+GLAPI GLboolean GLAPIENTRY glIsTexture( GLuint texture );
13627+
13628+
13629+GLAPI void GLAPIENTRY glTexSubImage1D( GLenum target, GLint level,
13630+ GLint xoffset,
13631+ GLsizei width, GLenum format,
13632+ GLenum type, const GLvoid *pixels );
13633+
13634+
13635+GLAPI void GLAPIENTRY glTexSubImage2D( GLenum target, GLint level,
13636+ GLint xoffset, GLint yoffset,
13637+ GLsizei width, GLsizei height,
13638+ GLenum format, GLenum type,
13639+ const GLvoid *pixels );
13640+
13641+
13642+GLAPI void GLAPIENTRY glCopyTexImage1D( GLenum target, GLint level,
13643+ GLenum internalformat,
13644+ GLint x, GLint y,
13645+ GLsizei width, GLint border );
13646+
13647+
13648+GLAPI void GLAPIENTRY glCopyTexImage2D( GLenum target, GLint level,
13649+ GLenum internalformat,
13650+ GLint x, GLint y,
13651+ GLsizei width, GLsizei height,
13652+ GLint border );
13653+
13654+
13655+GLAPI void GLAPIENTRY glCopyTexSubImage1D( GLenum target, GLint level,
13656+ GLint xoffset, GLint x, GLint y,
13657+ GLsizei width );
13658+
13659+
13660+GLAPI void GLAPIENTRY glCopyTexSubImage2D( GLenum target, GLint level,
13661+ GLint xoffset, GLint yoffset,
13662+ GLint x, GLint y,
13663+ GLsizei width, GLsizei height );
13664+
13665+
13666+/*
13667+ * Evaluators
13668+ */
13669+
13670+GLAPI void GLAPIENTRY glMap1d( GLenum target, GLdouble u1, GLdouble u2,
13671+ GLint stride,
13672+ GLint order, const GLdouble *points );
13673+GLAPI void GLAPIENTRY glMap1f( GLenum target, GLfloat u1, GLfloat u2,
13674+ GLint stride,
13675+ GLint order, const GLfloat *points );
13676+
13677+GLAPI void GLAPIENTRY glMap2d( GLenum target,
13678+ GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
13679+ GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
13680+ const GLdouble *points );
13681+GLAPI void GLAPIENTRY glMap2f( GLenum target,
13682+ GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
13683+ GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
13684+ const GLfloat *points );
13685+
13686+GLAPI void GLAPIENTRY glGetMapdv( GLenum target, GLenum query, GLdouble *v );
13687+GLAPI void GLAPIENTRY glGetMapfv( GLenum target, GLenum query, GLfloat *v );
13688+GLAPI void GLAPIENTRY glGetMapiv( GLenum target, GLenum query, GLint *v );
13689+
13690+GLAPI void GLAPIENTRY glEvalCoord1d( GLdouble u );
13691+GLAPI void GLAPIENTRY glEvalCoord1f( GLfloat u );
13692+
13693+GLAPI void GLAPIENTRY glEvalCoord1dv( const GLdouble *u );
13694+GLAPI void GLAPIENTRY glEvalCoord1fv( const GLfloat *u );
13695+
13696+GLAPI void GLAPIENTRY glEvalCoord2d( GLdouble u, GLdouble v );
13697+GLAPI void GLAPIENTRY glEvalCoord2f( GLfloat u, GLfloat v );
13698+
13699+GLAPI void GLAPIENTRY glEvalCoord2dv( const GLdouble *u );
13700+GLAPI void GLAPIENTRY glEvalCoord2fv( const GLfloat *u );
13701+
13702+GLAPI void GLAPIENTRY glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 );
13703+GLAPI void GLAPIENTRY glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 );
13704+
13705+GLAPI void GLAPIENTRY glMapGrid2d( GLint un, GLdouble u1, GLdouble u2,
13706+ GLint vn, GLdouble v1, GLdouble v2 );
13707+GLAPI void GLAPIENTRY glMapGrid2f( GLint un, GLfloat u1, GLfloat u2,
13708+ GLint vn, GLfloat v1, GLfloat v2 );
13709+
13710+GLAPI void GLAPIENTRY glEvalPoint1( GLint i );
13711+
13712+GLAPI void GLAPIENTRY glEvalPoint2( GLint i, GLint j );
13713+
13714+GLAPI void GLAPIENTRY glEvalMesh1( GLenum mode, GLint i1, GLint i2 );
13715+
13716+GLAPI void GLAPIENTRY glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
13717+
13718+
13719+/*
13720+ * Fog
13721+ */
13722+
13723+GLAPI void GLAPIENTRY glFogf( GLenum pname, GLfloat param );
13724+
13725+GLAPI void GLAPIENTRY glFogi( GLenum pname, GLint param );
13726+
13727+GLAPI void GLAPIENTRY glFogfv( GLenum pname, const GLfloat *params );
13728+
13729+GLAPI void GLAPIENTRY glFogiv( GLenum pname, const GLint *params );
13730+
13731+
13732+/*
13733+ * Selection and Feedback
13734+ */
13735+
13736+GLAPI void GLAPIENTRY glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer );
13737+
13738+GLAPI void GLAPIENTRY glPassThrough( GLfloat token );
13739+
13740+GLAPI void GLAPIENTRY glSelectBuffer( GLsizei size, GLuint *buffer );
13741+
13742+GLAPI void GLAPIENTRY glInitNames( void );
13743+
13744+GLAPI void GLAPIENTRY glLoadName( GLuint name );
13745+
13746+GLAPI void GLAPIENTRY glPushName( GLuint name );
13747+
13748+GLAPI void GLAPIENTRY glPopName( void );
13749+
13750+
13751+
13752+/*
13753+ * OpenGL 1.2
13754+ */
13755+
13756+#define GL_RESCALE_NORMAL 0x803A
13757+#define GL_CLAMP_TO_EDGE 0x812F
13758+#define GL_MAX_ELEMENTS_VERTICES 0x80E8
13759+#define GL_MAX_ELEMENTS_INDICES 0x80E9
13760+#define GL_BGR 0x80E0
13761+#define GL_BGRA 0x80E1
13762+#define GL_UNSIGNED_BYTE_3_3_2 0x8032
13763+#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
13764+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
13765+#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
13766+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
13767+#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
13768+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
13769+#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
13770+#define GL_UNSIGNED_INT_8_8_8_8 0x8035
13771+#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
13772+#define GL_UNSIGNED_INT_10_10_10_2 0x8036
13773+#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
13774+#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
13775+#define GL_SINGLE_COLOR 0x81F9
13776+#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
13777+#define GL_TEXTURE_MIN_LOD 0x813A
13778+#define GL_TEXTURE_MAX_LOD 0x813B
13779+#define GL_TEXTURE_BASE_LEVEL 0x813C
13780+#define GL_TEXTURE_MAX_LEVEL 0x813D
13781+#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
13782+#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
13783+#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
13784+#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
13785+#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
13786+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
13787+#define GL_PACK_SKIP_IMAGES 0x806B
13788+#define GL_PACK_IMAGE_HEIGHT 0x806C
13789+#define GL_UNPACK_SKIP_IMAGES 0x806D
13790+#define GL_UNPACK_IMAGE_HEIGHT 0x806E
13791+#define GL_TEXTURE_3D 0x806F
13792+#define GL_PROXY_TEXTURE_3D 0x8070
13793+#define GL_TEXTURE_DEPTH 0x8071
13794+#define GL_TEXTURE_WRAP_R 0x8072
13795+#define GL_MAX_3D_TEXTURE_SIZE 0x8073
13796+#define GL_TEXTURE_BINDING_3D 0x806A
13797+
13798+GLAPI void GLAPIENTRY glDrawRangeElements( GLenum mode, GLuint start,
13799+ GLuint end, GLsizei count, GLenum type, const GLvoid *indices );
13800+
13801+GLAPI void GLAPIENTRY glTexImage3D( GLenum target, GLint level,
13802+ GLint internalFormat,
13803+ GLsizei width, GLsizei height,
13804+ GLsizei depth, GLint border,
13805+ GLenum format, GLenum type,
13806+ const GLvoid *pixels );
13807+
13808+GLAPI void GLAPIENTRY glTexSubImage3D( GLenum target, GLint level,
13809+ GLint xoffset, GLint yoffset,
13810+ GLint zoffset, GLsizei width,
13811+ GLsizei height, GLsizei depth,
13812+ GLenum format,
13813+ GLenum type, const GLvoid *pixels);
13814+
13815+GLAPI void GLAPIENTRY glCopyTexSubImage3D( GLenum target, GLint level,
13816+ GLint xoffset, GLint yoffset,
13817+ GLint zoffset, GLint x,
13818+ GLint y, GLsizei width,
13819+ GLsizei height );
13820+
13821+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
13822+typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
13823+typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
13824+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
13825+
13826+
13827+/*
13828+ * GL_ARB_imaging
13829+ */
13830+
13831+#define GL_CONSTANT_COLOR 0x8001
13832+#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
13833+#define GL_CONSTANT_ALPHA 0x8003
13834+#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
13835+#define GL_COLOR_TABLE 0x80D0
13836+#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
13837+#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
13838+#define GL_PROXY_COLOR_TABLE 0x80D3
13839+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
13840+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
13841+#define GL_COLOR_TABLE_SCALE 0x80D6
13842+#define GL_COLOR_TABLE_BIAS 0x80D7
13843+#define GL_COLOR_TABLE_FORMAT 0x80D8
13844+#define GL_COLOR_TABLE_WIDTH 0x80D9
13845+#define GL_COLOR_TABLE_RED_SIZE 0x80DA
13846+#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
13847+#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
13848+#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
13849+#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
13850+#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
13851+#define GL_CONVOLUTION_1D 0x8010
13852+#define GL_CONVOLUTION_2D 0x8011
13853+#define GL_SEPARABLE_2D 0x8012
13854+#define GL_CONVOLUTION_BORDER_MODE 0x8013
13855+#define GL_CONVOLUTION_FILTER_SCALE 0x8014
13856+#define GL_CONVOLUTION_FILTER_BIAS 0x8015
13857+#define GL_REDUCE 0x8016
13858+#define GL_CONVOLUTION_FORMAT 0x8017
13859+#define GL_CONVOLUTION_WIDTH 0x8018
13860+#define GL_CONVOLUTION_HEIGHT 0x8019
13861+#define GL_MAX_CONVOLUTION_WIDTH 0x801A
13862+#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
13863+#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
13864+#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
13865+#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
13866+#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
13867+#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
13868+#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
13869+#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
13870+#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
13871+#define GL_CONSTANT_BORDER 0x8151
13872+#define GL_REPLICATE_BORDER 0x8153
13873+#define GL_CONVOLUTION_BORDER_COLOR 0x8154
13874+#define GL_COLOR_MATRIX 0x80B1
13875+#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
13876+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
13877+#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
13878+#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
13879+#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
13880+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
13881+#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
13882+#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
13883+#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
13884+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
13885+#define GL_HISTOGRAM 0x8024
13886+#define GL_PROXY_HISTOGRAM 0x8025
13887+#define GL_HISTOGRAM_WIDTH 0x8026
13888+#define GL_HISTOGRAM_FORMAT 0x8027
13889+#define GL_HISTOGRAM_RED_SIZE 0x8028
13890+#define GL_HISTOGRAM_GREEN_SIZE 0x8029
13891+#define GL_HISTOGRAM_BLUE_SIZE 0x802A
13892+#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
13893+#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
13894+#define GL_HISTOGRAM_SINK 0x802D
13895+#define GL_MINMAX 0x802E
13896+#define GL_MINMAX_FORMAT 0x802F
13897+#define GL_MINMAX_SINK 0x8030
13898+#define GL_TABLE_TOO_LARGE 0x8031
13899+#define GL_BLEND_EQUATION 0x8009
13900+#define GL_MIN 0x8007
13901+#define GL_MAX 0x8008
13902+#define GL_FUNC_ADD 0x8006
13903+#define GL_FUNC_SUBTRACT 0x800A
13904+#define GL_FUNC_REVERSE_SUBTRACT 0x800B
13905+#define GL_BLEND_COLOR 0x8005
13906+
13907+
13908+GLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat,
13909+ GLsizei width, GLenum format,
13910+ GLenum type, const GLvoid *table );
13911+
13912+GLAPI void GLAPIENTRY glColorSubTable( GLenum target,
13913+ GLsizei start, GLsizei count,
13914+ GLenum format, GLenum type,
13915+ const GLvoid *data );
13916+
13917+GLAPI void GLAPIENTRY glColorTableParameteriv(GLenum target, GLenum pname,
13918+ const GLint *params);
13919+
13920+GLAPI void GLAPIENTRY glColorTableParameterfv(GLenum target, GLenum pname,
13921+ const GLfloat *params);
13922+
13923+GLAPI void GLAPIENTRY glCopyColorSubTable( GLenum target, GLsizei start,
13924+ GLint x, GLint y, GLsizei width );
13925+
13926+GLAPI void GLAPIENTRY glCopyColorTable( GLenum target, GLenum internalformat,
13927+ GLint x, GLint y, GLsizei width );
13928+
13929+GLAPI void GLAPIENTRY glGetColorTable( GLenum target, GLenum format,
13930+ GLenum type, GLvoid *table );
13931+
13932+GLAPI void GLAPIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname,
13933+ GLfloat *params );
13934+
13935+GLAPI void GLAPIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname,
13936+ GLint *params );
13937+
13938+GLAPI void GLAPIENTRY glBlendEquation( GLenum mode );
13939+
13940+GLAPI void GLAPIENTRY glBlendColor( GLclampf red, GLclampf green,
13941+ GLclampf blue, GLclampf alpha );
13942+
13943+GLAPI void GLAPIENTRY glHistogram( GLenum target, GLsizei width,
13944+ GLenum internalformat, GLboolean sink );
13945+
13946+GLAPI void GLAPIENTRY glResetHistogram( GLenum target );
13947+
13948+GLAPI void GLAPIENTRY glGetHistogram( GLenum target, GLboolean reset,
13949+ GLenum format, GLenum type,
13950+ GLvoid *values );
13951+
13952+GLAPI void GLAPIENTRY glGetHistogramParameterfv( GLenum target, GLenum pname,
13953+ GLfloat *params );
13954+
13955+GLAPI void GLAPIENTRY glGetHistogramParameteriv( GLenum target, GLenum pname,
13956+ GLint *params );
13957+
13958+GLAPI void GLAPIENTRY glMinmax( GLenum target, GLenum internalformat,
13959+ GLboolean sink );
13960+
13961+GLAPI void GLAPIENTRY glResetMinmax( GLenum target );
13962+
13963+GLAPI void GLAPIENTRY glGetMinmax( GLenum target, GLboolean reset,
13964+ GLenum format, GLenum types,
13965+ GLvoid *values );
13966+
13967+GLAPI void GLAPIENTRY glGetMinmaxParameterfv( GLenum target, GLenum pname,
13968+ GLfloat *params );
13969+
13970+GLAPI void GLAPIENTRY glGetMinmaxParameteriv( GLenum target, GLenum pname,
13971+ GLint *params );
13972+
13973+GLAPI void GLAPIENTRY glConvolutionFilter1D( GLenum target,
13974+ GLenum internalformat, GLsizei width, GLenum format, GLenum type,
13975+ const GLvoid *image );
13976+
13977+GLAPI void GLAPIENTRY glConvolutionFilter2D( GLenum target,
13978+ GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
13979+ GLenum type, const GLvoid *image );
13980+
13981+GLAPI void GLAPIENTRY glConvolutionParameterf( GLenum target, GLenum pname,
13982+ GLfloat params );
13983+
13984+GLAPI void GLAPIENTRY glConvolutionParameterfv( GLenum target, GLenum pname,
13985+ const GLfloat *params );
13986+
13987+GLAPI void GLAPIENTRY glConvolutionParameteri( GLenum target, GLenum pname,
13988+ GLint params );
13989+
13990+GLAPI void GLAPIENTRY glConvolutionParameteriv( GLenum target, GLenum pname,
13991+ const GLint *params );
13992+
13993+GLAPI void GLAPIENTRY glCopyConvolutionFilter1D( GLenum target,
13994+ GLenum internalformat, GLint x, GLint y, GLsizei width );
13995+
13996+GLAPI void GLAPIENTRY glCopyConvolutionFilter2D( GLenum target,
13997+ GLenum internalformat, GLint x, GLint y, GLsizei width,
13998+ GLsizei height);
13999+
14000+GLAPI void GLAPIENTRY glGetConvolutionFilter( GLenum target, GLenum format,
14001+ GLenum type, GLvoid *image );
14002+
14003+GLAPI void GLAPIENTRY glGetConvolutionParameterfv( GLenum target, GLenum pname,
14004+ GLfloat *params );
14005+
14006+GLAPI void GLAPIENTRY glGetConvolutionParameteriv( GLenum target, GLenum pname,
14007+ GLint *params );
14008+
14009+GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target,
14010+ GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
14011+ GLenum type, const GLvoid *row, const GLvoid *column );
14012+
14013+GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
14014+ GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
14015+
14016+typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
14017+typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
14018+typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
14019+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
14020+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
14021+typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
14022+typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
14023+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
14024+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
14025+typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
14026+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
14027+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
14028+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
14029+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
14030+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
14031+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
14032+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
14033+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
14034+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
14035+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
14036+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
14037+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
14038+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
14039+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
14040+typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
14041+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
14042+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
14043+typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
14044+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
14045+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
14046+typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
14047+typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
14048+typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
14049+typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
14050+
14051+
14052+
14053+/*
14054+ * OpenGL 1.3
14055+ */
14056+
14057+/* multitexture */
14058+#define GL_TEXTURE0 0x84C0
14059+#define GL_TEXTURE1 0x84C1
14060+#define GL_TEXTURE2 0x84C2
14061+#define GL_TEXTURE3 0x84C3
14062+#define GL_TEXTURE4 0x84C4
14063+#define GL_TEXTURE5 0x84C5
14064+#define GL_TEXTURE6 0x84C6
14065+#define GL_TEXTURE7 0x84C7
14066+#define GL_TEXTURE8 0x84C8
14067+#define GL_TEXTURE9 0x84C9
14068+#define GL_TEXTURE10 0x84CA
14069+#define GL_TEXTURE11 0x84CB
14070+#define GL_TEXTURE12 0x84CC
14071+#define GL_TEXTURE13 0x84CD
14072+#define GL_TEXTURE14 0x84CE
14073+#define GL_TEXTURE15 0x84CF
14074+#define GL_TEXTURE16 0x84D0
14075+#define GL_TEXTURE17 0x84D1
14076+#define GL_TEXTURE18 0x84D2
14077+#define GL_TEXTURE19 0x84D3
14078+#define GL_TEXTURE20 0x84D4
14079+#define GL_TEXTURE21 0x84D5
14080+#define GL_TEXTURE22 0x84D6
14081+#define GL_TEXTURE23 0x84D7
14082+#define GL_TEXTURE24 0x84D8
14083+#define GL_TEXTURE25 0x84D9
14084+#define GL_TEXTURE26 0x84DA
14085+#define GL_TEXTURE27 0x84DB
14086+#define GL_TEXTURE28 0x84DC
14087+#define GL_TEXTURE29 0x84DD
14088+#define GL_TEXTURE30 0x84DE
14089+#define GL_TEXTURE31 0x84DF
14090+#define GL_ACTIVE_TEXTURE 0x84E0
14091+#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
14092+#define GL_MAX_TEXTURE_UNITS 0x84E2
14093+/* texture_cube_map */
14094+#define GL_NORMAL_MAP 0x8511
14095+#define GL_REFLECTION_MAP 0x8512
14096+#define GL_TEXTURE_CUBE_MAP 0x8513
14097+#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
14098+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
14099+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
14100+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
14101+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
14102+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
14103+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
14104+#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
14105+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
14106+/* texture_compression */
14107+#define GL_COMPRESSED_ALPHA 0x84E9
14108+#define GL_COMPRESSED_LUMINANCE 0x84EA
14109+#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
14110+#define GL_COMPRESSED_INTENSITY 0x84EC
14111+#define GL_COMPRESSED_RGB 0x84ED
14112+#define GL_COMPRESSED_RGBA 0x84EE
14113+#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
14114+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
14115+#define GL_TEXTURE_COMPRESSED 0x86A1
14116+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
14117+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
14118+/* multisample */
14119+#define GL_MULTISAMPLE 0x809D
14120+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
14121+#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
14122+#define GL_SAMPLE_COVERAGE 0x80A0
14123+#define GL_SAMPLE_BUFFERS 0x80A8
14124+#define GL_SAMPLES 0x80A9
14125+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
14126+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
14127+#define GL_MULTISAMPLE_BIT 0x20000000
14128+/* transpose_matrix */
14129+#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
14130+#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
14131+#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
14132+#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
14133+/* texture_env_combine */
14134+#define GL_COMBINE 0x8570
14135+#define GL_COMBINE_RGB 0x8571
14136+#define GL_COMBINE_ALPHA 0x8572
14137+#define GL_SOURCE0_RGB 0x8580
14138+#define GL_SOURCE1_RGB 0x8581
14139+#define GL_SOURCE2_RGB 0x8582
14140+#define GL_SOURCE0_ALPHA 0x8588
14141+#define GL_SOURCE1_ALPHA 0x8589
14142+#define GL_SOURCE2_ALPHA 0x858A
14143+#define GL_OPERAND0_RGB 0x8590
14144+#define GL_OPERAND1_RGB 0x8591
14145+#define GL_OPERAND2_RGB 0x8592
14146+#define GL_OPERAND0_ALPHA 0x8598
14147+#define GL_OPERAND1_ALPHA 0x8599
14148+#define GL_OPERAND2_ALPHA 0x859A
14149+#define GL_RGB_SCALE 0x8573
14150+#define GL_ADD_SIGNED 0x8574
14151+#define GL_INTERPOLATE 0x8575
14152+#define GL_SUBTRACT 0x84E7
14153+#define GL_CONSTANT 0x8576
14154+#define GL_PRIMARY_COLOR 0x8577
14155+#define GL_PREVIOUS 0x8578
14156+/* texture_env_dot3 */
14157+#define GL_DOT3_RGB 0x86AE
14158+#define GL_DOT3_RGBA 0x86AF
14159+/* texture_border_clamp */
14160+#define GL_CLAMP_TO_BORDER 0x812D
14161+
14162+GLAPI void GLAPIENTRY glActiveTexture( GLenum texture );
14163+
14164+GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture );
14165+
14166+GLAPI void GLAPIENTRY glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data );
14167+
14168+GLAPI void GLAPIENTRY glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data );
14169+
14170+GLAPI void GLAPIENTRY glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data );
14171+
14172+GLAPI void GLAPIENTRY glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data );
14173+
14174+GLAPI void GLAPIENTRY glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data );
14175+
14176+GLAPI void GLAPIENTRY glCompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data );
14177+
14178+GLAPI void GLAPIENTRY glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img );
14179+
14180+GLAPI void GLAPIENTRY glMultiTexCoord1d( GLenum target, GLdouble s );
14181+
14182+GLAPI void GLAPIENTRY glMultiTexCoord1dv( GLenum target, const GLdouble *v );
14183+
14184+GLAPI void GLAPIENTRY glMultiTexCoord1f( GLenum target, GLfloat s );
14185+
14186+GLAPI void GLAPIENTRY glMultiTexCoord1fv( GLenum target, const GLfloat *v );
14187+
14188+GLAPI void GLAPIENTRY glMultiTexCoord1i( GLenum target, GLint s );
14189+
14190+GLAPI void GLAPIENTRY glMultiTexCoord1iv( GLenum target, const GLint *v );
14191+
14192+GLAPI void GLAPIENTRY glMultiTexCoord1s( GLenum target, GLshort s );
14193+
14194+GLAPI void GLAPIENTRY glMultiTexCoord1sv( GLenum target, const GLshort *v );
14195+
14196+GLAPI void GLAPIENTRY glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t );
14197+
14198+GLAPI void GLAPIENTRY glMultiTexCoord2dv( GLenum target, const GLdouble *v );
14199+
14200+GLAPI void GLAPIENTRY glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t );
14201+
14202+GLAPI void GLAPIENTRY glMultiTexCoord2fv( GLenum target, const GLfloat *v );
14203+
14204+GLAPI void GLAPIENTRY glMultiTexCoord2i( GLenum target, GLint s, GLint t );
14205+
14206+GLAPI void GLAPIENTRY glMultiTexCoord2iv( GLenum target, const GLint *v );
14207+
14208+GLAPI void GLAPIENTRY glMultiTexCoord2s( GLenum target, GLshort s, GLshort t );
14209+
14210+GLAPI void GLAPIENTRY glMultiTexCoord2sv( GLenum target, const GLshort *v );
14211+
14212+GLAPI void GLAPIENTRY glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r );
14213+
14214+GLAPI void GLAPIENTRY glMultiTexCoord3dv( GLenum target, const GLdouble *v );
14215+
14216+GLAPI void GLAPIENTRY glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r );
14217+
14218+GLAPI void GLAPIENTRY glMultiTexCoord3fv( GLenum target, const GLfloat *v );
14219+
14220+GLAPI void GLAPIENTRY glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r );
14221+
14222+GLAPI void GLAPIENTRY glMultiTexCoord3iv( GLenum target, const GLint *v );
14223+
14224+GLAPI void GLAPIENTRY glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r );
14225+
14226+GLAPI void GLAPIENTRY glMultiTexCoord3sv( GLenum target, const GLshort *v );
14227+
14228+GLAPI void GLAPIENTRY glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q );
14229+
14230+GLAPI void GLAPIENTRY glMultiTexCoord4dv( GLenum target, const GLdouble *v );
14231+
14232+GLAPI void GLAPIENTRY glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q );
14233+
14234+GLAPI void GLAPIENTRY glMultiTexCoord4fv( GLenum target, const GLfloat *v );
14235+
14236+GLAPI void GLAPIENTRY glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q );
14237+
14238+GLAPI void GLAPIENTRY glMultiTexCoord4iv( GLenum target, const GLint *v );
14239+
14240+GLAPI void GLAPIENTRY glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q );
14241+
14242+GLAPI void GLAPIENTRY glMultiTexCoord4sv( GLenum target, const GLshort *v );
14243+
14244+
14245+GLAPI void GLAPIENTRY glLoadTransposeMatrixd( const GLdouble m[16] );
14246+
14247+GLAPI void GLAPIENTRY glLoadTransposeMatrixf( const GLfloat m[16] );
14248+
14249+GLAPI void GLAPIENTRY glMultTransposeMatrixd( const GLdouble m[16] );
14250+
14251+GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] );
14252+
14253+GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert );
14254+
14255+typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
14256+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
14257+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
14258+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
14259+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
14260+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
14261+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
14262+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
14263+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
14264+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
14265+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
14266+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
14267+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
14268+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
14269+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
14270+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
14271+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
14272+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
14273+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
14274+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
14275+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
14276+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
14277+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
14278+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
14279+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
14280+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
14281+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
14282+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
14283+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
14284+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
14285+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
14286+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
14287+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
14288+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
14289+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
14290+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
14291+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
14292+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
14293+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
14294+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
14295+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
14296+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
14297+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
14298+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
14299+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
14300+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img);
14301+
14302+
14303+/*
14304+ * GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1)
14305+ */
14306+#ifndef GL_ARB_multitexture
14307+#define GL_ARB_multitexture 1
14308+
14309+#define GL_TEXTURE0_ARB 0x84C0
14310+#define GL_TEXTURE1_ARB 0x84C1
14311+#define GL_TEXTURE2_ARB 0x84C2
14312+#define GL_TEXTURE3_ARB 0x84C3
14313+#define GL_TEXTURE4_ARB 0x84C4
14314+#define GL_TEXTURE5_ARB 0x84C5
14315+#define GL_TEXTURE6_ARB 0x84C6
14316+#define GL_TEXTURE7_ARB 0x84C7
14317+#define GL_TEXTURE8_ARB 0x84C8
14318+#define GL_TEXTURE9_ARB 0x84C9
14319+#define GL_TEXTURE10_ARB 0x84CA
14320+#define GL_TEXTURE11_ARB 0x84CB
14321+#define GL_TEXTURE12_ARB 0x84CC
14322+#define GL_TEXTURE13_ARB 0x84CD
14323+#define GL_TEXTURE14_ARB 0x84CE
14324+#define GL_TEXTURE15_ARB 0x84CF
14325+#define GL_TEXTURE16_ARB 0x84D0
14326+#define GL_TEXTURE17_ARB 0x84D1
14327+#define GL_TEXTURE18_ARB 0x84D2
14328+#define GL_TEXTURE19_ARB 0x84D3
14329+#define GL_TEXTURE20_ARB 0x84D4
14330+#define GL_TEXTURE21_ARB 0x84D5
14331+#define GL_TEXTURE22_ARB 0x84D6
14332+#define GL_TEXTURE23_ARB 0x84D7
14333+#define GL_TEXTURE24_ARB 0x84D8
14334+#define GL_TEXTURE25_ARB 0x84D9
14335+#define GL_TEXTURE26_ARB 0x84DA
14336+#define GL_TEXTURE27_ARB 0x84DB
14337+#define GL_TEXTURE28_ARB 0x84DC
14338+#define GL_TEXTURE29_ARB 0x84DD
14339+#define GL_TEXTURE30_ARB 0x84DE
14340+#define GL_TEXTURE31_ARB 0x84DF
14341+#define GL_ACTIVE_TEXTURE_ARB 0x84E0
14342+#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
14343+#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
14344+
14345+GLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture);
14346+GLAPI void GLAPIENTRY glClientActiveTextureARB(GLenum texture);
14347+GLAPI void GLAPIENTRY glMultiTexCoord1dARB(GLenum target, GLdouble s);
14348+GLAPI void GLAPIENTRY glMultiTexCoord1dvARB(GLenum target, const GLdouble *v);
14349+GLAPI void GLAPIENTRY glMultiTexCoord1fARB(GLenum target, GLfloat s);
14350+GLAPI void GLAPIENTRY glMultiTexCoord1fvARB(GLenum target, const GLfloat *v);
14351+GLAPI void GLAPIENTRY glMultiTexCoord1iARB(GLenum target, GLint s);
14352+GLAPI void GLAPIENTRY glMultiTexCoord1ivARB(GLenum target, const GLint *v);
14353+GLAPI void GLAPIENTRY glMultiTexCoord1sARB(GLenum target, GLshort s);
14354+GLAPI void GLAPIENTRY glMultiTexCoord1svARB(GLenum target, const GLshort *v);
14355+GLAPI void GLAPIENTRY glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t);
14356+GLAPI void GLAPIENTRY glMultiTexCoord2dvARB(GLenum target, const GLdouble *v);
14357+GLAPI void GLAPIENTRY glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t);
14358+GLAPI void GLAPIENTRY glMultiTexCoord2fvARB(GLenum target, const GLfloat *v);
14359+GLAPI void GLAPIENTRY glMultiTexCoord2iARB(GLenum target, GLint s, GLint t);
14360+GLAPI void GLAPIENTRY glMultiTexCoord2ivARB(GLenum target, const GLint *v);
14361+GLAPI void GLAPIENTRY glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t);
14362+GLAPI void GLAPIENTRY glMultiTexCoord2svARB(GLenum target, const GLshort *v);
14363+GLAPI void GLAPIENTRY glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r);
14364+GLAPI void GLAPIENTRY glMultiTexCoord3dvARB(GLenum target, const GLdouble *v);
14365+GLAPI void GLAPIENTRY glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r);
14366+GLAPI void GLAPIENTRY glMultiTexCoord3fvARB(GLenum target, const GLfloat *v);
14367+GLAPI void GLAPIENTRY glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r);
14368+GLAPI void GLAPIENTRY glMultiTexCoord3ivARB(GLenum target, const GLint *v);
14369+GLAPI void GLAPIENTRY glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r);
14370+GLAPI void GLAPIENTRY glMultiTexCoord3svARB(GLenum target, const GLshort *v);
14371+GLAPI void GLAPIENTRY glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
14372+GLAPI void GLAPIENTRY glMultiTexCoord4dvARB(GLenum target, const GLdouble *v);
14373+GLAPI void GLAPIENTRY glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
14374+GLAPI void GLAPIENTRY glMultiTexCoord4fvARB(GLenum target, const GLfloat *v);
14375+GLAPI void GLAPIENTRY glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q);
14376+GLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v);
14377+GLAPI void GLAPIENTRY glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
14378+GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v);
14379+
14380+typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
14381+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
14382+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
14383+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
14384+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
14385+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
14386+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
14387+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
14388+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
14389+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
14390+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
14391+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
14392+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
14393+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
14394+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
14395+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
14396+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
14397+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
14398+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
14399+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
14400+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
14401+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
14402+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
14403+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
14404+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
14405+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
14406+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
14407+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
14408+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
14409+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
14410+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
14411+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
14412+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
14413+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
14414+
14415+#endif /* GL_ARB_multitexture */
14416+
14417+
14418+
14419+/*
14420+ * Define this token if you want "old-style" header file behaviour (extensions
14421+ * defined in gl.h). Otherwise, extensions will be included from glext.h.
14422+ */
14423+#if defined(GL_GLEXT_LEGACY)
14424+
14425+/* All extensions that used to be here are now found in glext.h */
14426+
14427+#else /* GL_GLEXT_LEGACY */
14428+
14429+#include <mesa_glext.h>
14430+
14431+#endif /* GL_GLEXT_LEGACY */
14432+
14433+
14434+
14435+#if GL_ARB_shader_objects
14436+
14437+#ifndef GL_MESA_shader_debug
14438+#define GL_MESA_shader_debug 1
14439+
14440+#define GL_DEBUG_OBJECT_MESA 0x8759
14441+#define GL_DEBUG_PRINT_MESA 0x875A
14442+#define GL_DEBUG_ASSERT_MESA 0x875B
14443+
14444+GLAPI GLhandleARB APIENTRY glCreateDebugObjectMESA (void);
14445+GLAPI void APIENTRY glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
14446+GLAPI void APIENTRY glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength,
14447+ GLsizei *length, GLcharARB *debugLog);
14448+GLAPI GLsizei APIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
14449+
14450+#endif /* GL_MESA_shader_debug */
14451+
14452+#endif /* GL_ARB_shader_objects */
14453+
14454+
14455+/*
14456+ * ???. GL_MESA_packed_depth_stencil
14457+ * XXX obsolete
14458+ */
14459+#ifndef GL_MESA_packed_depth_stencil
14460+#define GL_MESA_packed_depth_stencil 1
14461+
14462+#define GL_DEPTH_STENCIL_MESA 0x8750
14463+#define GL_UNSIGNED_INT_24_8_MESA 0x8751
14464+#define GL_UNSIGNED_INT_8_24_REV_MESA 0x8752
14465+#define GL_UNSIGNED_SHORT_15_1_MESA 0x8753
14466+#define GL_UNSIGNED_SHORT_1_15_REV_MESA 0x8754
14467+
14468+#endif /* GL_MESA_packed_depth_stencil */
14469+
14470+
14471+#ifndef GL_MESA_program_debug
14472+#define GL_MESA_program_debug 1
14473+
14474+#define GL_FRAGMENT_PROGRAM_POSITION_MESA 0x8bb0
14475+#define GL_FRAGMENT_PROGRAM_CALLBACK_MESA 0x8bb1
14476+#define GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA 0x8bb2
14477+#define GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA 0x8bb3
14478+#define GL_VERTEX_PROGRAM_POSITION_MESA 0x8bb4
14479+#define GL_VERTEX_PROGRAM_CALLBACK_MESA 0x8bb5
14480+#define GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA 0x8bb6
14481+#define GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA 0x8bb7
14482+
14483+typedef void (*GLprogramcallbackMESA)(GLenum target, GLvoid *data);
14484+
14485+GLAPI void GLAPIENTRY glProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, GLvoid *data);
14486+
14487+GLAPI void GLAPIENTRY glGetProgramRegisterfvMESA(GLenum target, GLsizei len, const GLubyte *name, GLfloat *v);
14488+
14489+#endif /* GL_MESA_program_debug */
14490+
14491+
14492+#ifndef GL_ATI_blend_equation_separate
14493+#define GL_ATI_blend_equation_separate 1
14494+
14495+#define GL_ALPHA_BLEND_EQUATION_ATI 0x883D
14496+
14497+GLAPI void GLAPIENTRY glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA );
14498+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA);
14499+
14500+#endif /* GL_ATI_blend_equation_separate */
14501+
14502+
14503+
14504+/**
14505+ ** NOTE!!!!! If you add new functions to this file, or update
14506+ ** glext.h be sure to regenerate the gl_mangle.h file. See comments
14507+ ** in that file for details.
14508+ **/
14509+
14510+
14511+
14512+/**********************************************************************
14513+ * Begin system-specific stuff
14514+ */
14515+#if defined(PRAGMA_EXPORT_SUPPORTED)
14516+#pragma export off
14517+#endif
14518+
14519+#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
14520+#pragma import off
14521+#endif
14522+/*
14523+ * End system-specific stuff
14524+ **********************************************************************/
14525+
14526+
14527+#ifdef __cplusplus
14528+}
14529+#endif
14530+
14531+#endif /* __gl_h_ */
14532Index: trunk/target-i386/mesa_glext.h
14533===================================================================
14534--- /dev/null 1970-01-01 00:00:00.000000000 +0000
14535+++ trunk/target-i386/mesa_glext.h 2009-01-19 23:06:08.000000000 +0000
14536@@ -0,0 +1,7279 @@
14537+#ifndef __glext_h_
14538+#define __glext_h_
14539+
14540+#ifdef __cplusplus
14541+extern "C" {
14542+#endif
14543+
14544+/*
14545+** Copyright (c) 2007 The Khronos Group Inc.
14546+**
14547+** Permission is hereby granted, free of charge, to any person obtaining a
14548+** copy of this software and/or associated documentation files (the
14549+** "Materials"), to deal in the Materials without restriction, including
14550+** without limitation the rights to use, copy, modify, merge, publish,
14551+** distribute, sublicense, and/or sell copies of the Materials, and to
14552+** permit persons to whom the Materials are furnished to do so, subject to
14553+** the following conditions:
14554+**
14555+** The above copyright notice and this permission notice shall be included
14556+** in all copies or substantial portions of the Materials.
14557+**
14558+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
14559+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14560+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
14561+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
14562+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
14563+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
14564+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
14565+*/
14566+
14567+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
14568+#define WIN32_LEAN_AND_MEAN 1
14569+#include <windows.h>
14570+#endif
14571+
14572+#ifndef APIENTRY
14573+#define APIENTRY
14574+#endif
14575+#ifndef APIENTRYP
14576+#define APIENTRYP APIENTRY *
14577+#endif
14578+#ifndef GLAPI
14579+#define GLAPI extern
14580+#endif
14581+
14582+/*************************************************************/
14583+
14584+/* Header file version number, required by OpenGL ABI for Linux */
14585+/* glext.h last updated 2007/02/12 */
14586+/* Current version at http://www.opengl.org/registry/ */
14587+#define GL_GLEXT_VERSION 39
14588+
14589+#ifndef GL_VERSION_1_2
14590+#define GL_UNSIGNED_BYTE_3_3_2 0x8032
14591+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
14592+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
14593+#define GL_UNSIGNED_INT_8_8_8_8 0x8035
14594+#define GL_UNSIGNED_INT_10_10_10_2 0x8036
14595+#define GL_RESCALE_NORMAL 0x803A
14596+#define GL_TEXTURE_BINDING_3D 0x806A
14597+#define GL_PACK_SKIP_IMAGES 0x806B
14598+#define GL_PACK_IMAGE_HEIGHT 0x806C
14599+#define GL_UNPACK_SKIP_IMAGES 0x806D
14600+#define GL_UNPACK_IMAGE_HEIGHT 0x806E
14601+#define GL_TEXTURE_3D 0x806F
14602+#define GL_PROXY_TEXTURE_3D 0x8070
14603+#define GL_TEXTURE_DEPTH 0x8071
14604+#define GL_TEXTURE_WRAP_R 0x8072
14605+#define GL_MAX_3D_TEXTURE_SIZE 0x8073
14606+#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
14607+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
14608+#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
14609+#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
14610+#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
14611+#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
14612+#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
14613+#define GL_BGR 0x80E0
14614+#define GL_BGRA 0x80E1
14615+#define GL_MAX_ELEMENTS_VERTICES 0x80E8
14616+#define GL_MAX_ELEMENTS_INDICES 0x80E9
14617+#define GL_CLAMP_TO_EDGE 0x812F
14618+#define GL_TEXTURE_MIN_LOD 0x813A
14619+#define GL_TEXTURE_MAX_LOD 0x813B
14620+#define GL_TEXTURE_BASE_LEVEL 0x813C
14621+#define GL_TEXTURE_MAX_LEVEL 0x813D
14622+#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
14623+#define GL_SINGLE_COLOR 0x81F9
14624+#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
14625+#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
14626+#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
14627+#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
14628+#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
14629+#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
14630+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
14631+#endif
14632+
14633+#ifndef GL_ARB_imaging
14634+#define GL_CONSTANT_COLOR 0x8001
14635+#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
14636+#define GL_CONSTANT_ALPHA 0x8003
14637+#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
14638+#define GL_BLEND_COLOR 0x8005
14639+#define GL_FUNC_ADD 0x8006
14640+#define GL_MIN 0x8007
14641+#define GL_MAX 0x8008
14642+#define GL_BLEND_EQUATION 0x8009
14643+#define GL_FUNC_SUBTRACT 0x800A
14644+#define GL_FUNC_REVERSE_SUBTRACT 0x800B
14645+#define GL_CONVOLUTION_1D 0x8010
14646+#define GL_CONVOLUTION_2D 0x8011
14647+#define GL_SEPARABLE_2D 0x8012
14648+#define GL_CONVOLUTION_BORDER_MODE 0x8013
14649+#define GL_CONVOLUTION_FILTER_SCALE 0x8014
14650+#define GL_CONVOLUTION_FILTER_BIAS 0x8015
14651+#define GL_REDUCE 0x8016
14652+#define GL_CONVOLUTION_FORMAT 0x8017
14653+#define GL_CONVOLUTION_WIDTH 0x8018
14654+#define GL_CONVOLUTION_HEIGHT 0x8019
14655+#define GL_MAX_CONVOLUTION_WIDTH 0x801A
14656+#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
14657+#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
14658+#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
14659+#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
14660+#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
14661+#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
14662+#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
14663+#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
14664+#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
14665+#define GL_HISTOGRAM 0x8024
14666+#define GL_PROXY_HISTOGRAM 0x8025
14667+#define GL_HISTOGRAM_WIDTH 0x8026
14668+#define GL_HISTOGRAM_FORMAT 0x8027
14669+#define GL_HISTOGRAM_RED_SIZE 0x8028
14670+#define GL_HISTOGRAM_GREEN_SIZE 0x8029
14671+#define GL_HISTOGRAM_BLUE_SIZE 0x802A
14672+#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
14673+#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
14674+#define GL_HISTOGRAM_SINK 0x802D
14675+#define GL_MINMAX 0x802E
14676+#define GL_MINMAX_FORMAT 0x802F
14677+#define GL_MINMAX_SINK 0x8030
14678+#define GL_TABLE_TOO_LARGE 0x8031
14679+#define GL_COLOR_MATRIX 0x80B1
14680+#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
14681+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
14682+#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
14683+#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
14684+#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
14685+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
14686+#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
14687+#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
14688+#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
14689+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
14690+#define GL_COLOR_TABLE 0x80D0
14691+#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
14692+#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
14693+#define GL_PROXY_COLOR_TABLE 0x80D3
14694+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
14695+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
14696+#define GL_COLOR_TABLE_SCALE 0x80D6
14697+#define GL_COLOR_TABLE_BIAS 0x80D7
14698+#define GL_COLOR_TABLE_FORMAT 0x80D8
14699+#define GL_COLOR_TABLE_WIDTH 0x80D9
14700+#define GL_COLOR_TABLE_RED_SIZE 0x80DA
14701+#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
14702+#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
14703+#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
14704+#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
14705+#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
14706+#define GL_CONSTANT_BORDER 0x8151
14707+#define GL_REPLICATE_BORDER 0x8153
14708+#define GL_CONVOLUTION_BORDER_COLOR 0x8154
14709+#endif
14710+
14711+#ifndef GL_VERSION_1_3
14712+#define GL_TEXTURE0 0x84C0
14713+#define GL_TEXTURE1 0x84C1
14714+#define GL_TEXTURE2 0x84C2
14715+#define GL_TEXTURE3 0x84C3
14716+#define GL_TEXTURE4 0x84C4
14717+#define GL_TEXTURE5 0x84C5
14718+#define GL_TEXTURE6 0x84C6
14719+#define GL_TEXTURE7 0x84C7
14720+#define GL_TEXTURE8 0x84C8
14721+#define GL_TEXTURE9 0x84C9
14722+#define GL_TEXTURE10 0x84CA
14723+#define GL_TEXTURE11 0x84CB
14724+#define GL_TEXTURE12 0x84CC
14725+#define GL_TEXTURE13 0x84CD
14726+#define GL_TEXTURE14 0x84CE
14727+#define GL_TEXTURE15 0x84CF
14728+#define GL_TEXTURE16 0x84D0
14729+#define GL_TEXTURE17 0x84D1
14730+#define GL_TEXTURE18 0x84D2
14731+#define GL_TEXTURE19 0x84D3
14732+#define GL_TEXTURE20 0x84D4
14733+#define GL_TEXTURE21 0x84D5
14734+#define GL_TEXTURE22 0x84D6
14735+#define GL_TEXTURE23 0x84D7
14736+#define GL_TEXTURE24 0x84D8
14737+#define GL_TEXTURE25 0x84D9
14738+#define GL_TEXTURE26 0x84DA
14739+#define GL_TEXTURE27 0x84DB
14740+#define GL_TEXTURE28 0x84DC
14741+#define GL_TEXTURE29 0x84DD
14742+#define GL_TEXTURE30 0x84DE
14743+#define GL_TEXTURE31 0x84DF
14744+#define GL_ACTIVE_TEXTURE 0x84E0
14745+#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
14746+#define GL_MAX_TEXTURE_UNITS 0x84E2
14747+#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
14748+#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
14749+#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
14750+#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
14751+#define GL_MULTISAMPLE 0x809D
14752+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
14753+#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
14754+#define GL_SAMPLE_COVERAGE 0x80A0
14755+#define GL_SAMPLE_BUFFERS 0x80A8
14756+#define GL_SAMPLES 0x80A9
14757+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
14758+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
14759+#define GL_MULTISAMPLE_BIT 0x20000000
14760+#define GL_NORMAL_MAP 0x8511
14761+#define GL_REFLECTION_MAP 0x8512
14762+#define GL_TEXTURE_CUBE_MAP 0x8513
14763+#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
14764+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
14765+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
14766+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
14767+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
14768+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
14769+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
14770+#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
14771+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
14772+#define GL_COMPRESSED_ALPHA 0x84E9
14773+#define GL_COMPRESSED_LUMINANCE 0x84EA
14774+#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
14775+#define GL_COMPRESSED_INTENSITY 0x84EC
14776+#define GL_COMPRESSED_RGB 0x84ED
14777+#define GL_COMPRESSED_RGBA 0x84EE
14778+#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
14779+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
14780+#define GL_TEXTURE_COMPRESSED 0x86A1
14781+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
14782+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
14783+#define GL_CLAMP_TO_BORDER 0x812D
14784+#define GL_COMBINE 0x8570
14785+#define GL_COMBINE_RGB 0x8571
14786+#define GL_COMBINE_ALPHA 0x8572
14787+#define GL_SOURCE0_RGB 0x8580
14788+#define GL_SOURCE1_RGB 0x8581
14789+#define GL_SOURCE2_RGB 0x8582
14790+#define GL_SOURCE0_ALPHA 0x8588
14791+#define GL_SOURCE1_ALPHA 0x8589
14792+#define GL_SOURCE2_ALPHA 0x858A
14793+#define GL_OPERAND0_RGB 0x8590
14794+#define GL_OPERAND1_RGB 0x8591
14795+#define GL_OPERAND2_RGB 0x8592
14796+#define GL_OPERAND0_ALPHA 0x8598
14797+#define GL_OPERAND1_ALPHA 0x8599
14798+#define GL_OPERAND2_ALPHA 0x859A
14799+#define GL_RGB_SCALE 0x8573
14800+#define GL_ADD_SIGNED 0x8574
14801+#define GL_INTERPOLATE 0x8575
14802+#define GL_SUBTRACT 0x84E7
14803+#define GL_CONSTANT 0x8576
14804+#define GL_PRIMARY_COLOR 0x8577
14805+#define GL_PREVIOUS 0x8578
14806+#define GL_DOT3_RGB 0x86AE
14807+#define GL_DOT3_RGBA 0x86AF
14808+#endif
14809+
14810+#ifndef GL_VERSION_1_4
14811+#define GL_BLEND_DST_RGB 0x80C8
14812+#define GL_BLEND_SRC_RGB 0x80C9
14813+#define GL_BLEND_DST_ALPHA 0x80CA
14814+#define GL_BLEND_SRC_ALPHA 0x80CB
14815+#define GL_POINT_SIZE_MIN 0x8126
14816+#define GL_POINT_SIZE_MAX 0x8127
14817+#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
14818+#define GL_POINT_DISTANCE_ATTENUATION 0x8129
14819+#define GL_GENERATE_MIPMAP 0x8191
14820+#define GL_GENERATE_MIPMAP_HINT 0x8192
14821+#define GL_DEPTH_COMPONENT16 0x81A5
14822+#define GL_DEPTH_COMPONENT24 0x81A6
14823+#define GL_DEPTH_COMPONENT32 0x81A7
14824+#define GL_MIRRORED_REPEAT 0x8370
14825+#define GL_FOG_COORDINATE_SOURCE 0x8450
14826+#define GL_FOG_COORDINATE 0x8451
14827+#define GL_FRAGMENT_DEPTH 0x8452
14828+#define GL_CURRENT_FOG_COORDINATE 0x8453
14829+#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454
14830+#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455
14831+#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456
14832+#define GL_FOG_COORDINATE_ARRAY 0x8457
14833+#define GL_COLOR_SUM 0x8458
14834+#define GL_CURRENT_SECONDARY_COLOR 0x8459
14835+#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A
14836+#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B
14837+#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C
14838+#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D
14839+#define GL_SECONDARY_COLOR_ARRAY 0x845E
14840+#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
14841+#define GL_TEXTURE_FILTER_CONTROL 0x8500
14842+#define GL_TEXTURE_LOD_BIAS 0x8501
14843+#define GL_INCR_WRAP 0x8507
14844+#define GL_DECR_WRAP 0x8508
14845+#define GL_TEXTURE_DEPTH_SIZE 0x884A
14846+#define GL_DEPTH_TEXTURE_MODE 0x884B
14847+#define GL_TEXTURE_COMPARE_MODE 0x884C
14848+#define GL_TEXTURE_COMPARE_FUNC 0x884D
14849+#define GL_COMPARE_R_TO_TEXTURE 0x884E
14850+#endif
14851+
14852+#ifndef GL_VERSION_1_5
14853+#define GL_BUFFER_SIZE 0x8764
14854+#define GL_BUFFER_USAGE 0x8765
14855+#define GL_QUERY_COUNTER_BITS 0x8864
14856+#define GL_CURRENT_QUERY 0x8865
14857+#define GL_QUERY_RESULT 0x8866
14858+#define GL_QUERY_RESULT_AVAILABLE 0x8867
14859+#define GL_ARRAY_BUFFER 0x8892
14860+#define GL_ELEMENT_ARRAY_BUFFER 0x8893
14861+#define GL_ARRAY_BUFFER_BINDING 0x8894
14862+#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
14863+#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
14864+#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
14865+#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
14866+#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899
14867+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
14868+#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B
14869+#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C
14870+#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D
14871+#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E
14872+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
14873+#define GL_READ_ONLY 0x88B8
14874+#define GL_WRITE_ONLY 0x88B9
14875+#define GL_READ_WRITE 0x88BA
14876+#define GL_BUFFER_ACCESS 0x88BB
14877+#define GL_BUFFER_MAPPED 0x88BC
14878+#define GL_BUFFER_MAP_POINTER 0x88BD
14879+#define GL_STREAM_DRAW 0x88E0
14880+#define GL_STREAM_READ 0x88E1
14881+#define GL_STREAM_COPY 0x88E2
14882+#define GL_STATIC_DRAW 0x88E4
14883+#define GL_STATIC_READ 0x88E5
14884+#define GL_STATIC_COPY 0x88E6
14885+#define GL_DYNAMIC_DRAW 0x88E8
14886+#define GL_DYNAMIC_READ 0x88E9
14887+#define GL_DYNAMIC_COPY 0x88EA
14888+#define GL_SAMPLES_PASSED 0x8914
14889+#define GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE
14890+#define GL_FOG_COORD GL_FOG_COORDINATE
14891+#define GL_CURRENT_FOG_COORD GL_CURRENT_FOG_COORDINATE
14892+#define GL_FOG_COORD_ARRAY_TYPE GL_FOG_COORDINATE_ARRAY_TYPE
14893+#define GL_FOG_COORD_ARRAY_STRIDE GL_FOG_COORDINATE_ARRAY_STRIDE
14894+#define GL_FOG_COORD_ARRAY_POINTER GL_FOG_COORDINATE_ARRAY_POINTER
14895+#define GL_FOG_COORD_ARRAY GL_FOG_COORDINATE_ARRAY
14896+#define GL_FOG_COORD_ARRAY_BUFFER_BINDING GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING
14897+#define GL_SRC0_RGB GL_SOURCE0_RGB
14898+#define GL_SRC1_RGB GL_SOURCE1_RGB
14899+#define GL_SRC2_RGB GL_SOURCE2_RGB
14900+#define GL_SRC0_ALPHA GL_SOURCE0_ALPHA
14901+#define GL_SRC1_ALPHA GL_SOURCE1_ALPHA
14902+#define GL_SRC2_ALPHA GL_SOURCE2_ALPHA
14903+#endif
14904+
14905+#ifndef GL_VERSION_2_0
14906+#define GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION
14907+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
14908+#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
14909+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
14910+#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
14911+#define GL_CURRENT_VERTEX_ATTRIB 0x8626
14912+#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
14913+#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643
14914+#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
14915+#define GL_STENCIL_BACK_FUNC 0x8800
14916+#define GL_STENCIL_BACK_FAIL 0x8801
14917+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
14918+#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
14919+#define GL_MAX_DRAW_BUFFERS 0x8824
14920+#define GL_DRAW_BUFFER0 0x8825
14921+#define GL_DRAW_BUFFER1 0x8826
14922+#define GL_DRAW_BUFFER2 0x8827
14923+#define GL_DRAW_BUFFER3 0x8828
14924+#define GL_DRAW_BUFFER4 0x8829
14925+#define GL_DRAW_BUFFER5 0x882A
14926+#define GL_DRAW_BUFFER6 0x882B
14927+#define GL_DRAW_BUFFER7 0x882C
14928+#define GL_DRAW_BUFFER8 0x882D
14929+#define GL_DRAW_BUFFER9 0x882E
14930+#define GL_DRAW_BUFFER10 0x882F
14931+#define GL_DRAW_BUFFER11 0x8830
14932+#define GL_DRAW_BUFFER12 0x8831
14933+#define GL_DRAW_BUFFER13 0x8832
14934+#define GL_DRAW_BUFFER14 0x8833
14935+#define GL_DRAW_BUFFER15 0x8834
14936+#define GL_BLEND_EQUATION_ALPHA 0x883D
14937+#define GL_POINT_SPRITE 0x8861
14938+#define GL_COORD_REPLACE 0x8862
14939+#define GL_MAX_VERTEX_ATTRIBS 0x8869
14940+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
14941+#define GL_MAX_TEXTURE_COORDS 0x8871
14942+#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
14943+#define GL_FRAGMENT_SHADER 0x8B30
14944+#define GL_VERTEX_SHADER 0x8B31
14945+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
14946+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
14947+#define GL_MAX_VARYING_FLOATS 0x8B4B
14948+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
14949+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
14950+#define GL_SHADER_TYPE 0x8B4F
14951+#define GL_FLOAT_VEC2 0x8B50
14952+#define GL_FLOAT_VEC3 0x8B51
14953+#define GL_FLOAT_VEC4 0x8B52
14954+#define GL_INT_VEC2 0x8B53
14955+#define GL_INT_VEC3 0x8B54
14956+#define GL_INT_VEC4 0x8B55
14957+#define GL_BOOL 0x8B56
14958+#define GL_BOOL_VEC2 0x8B57
14959+#define GL_BOOL_VEC3 0x8B58
14960+#define GL_BOOL_VEC4 0x8B59
14961+#define GL_FLOAT_MAT2 0x8B5A
14962+#define GL_FLOAT_MAT3 0x8B5B
14963+#define GL_FLOAT_MAT4 0x8B5C
14964+#define GL_SAMPLER_1D 0x8B5D
14965+#define GL_SAMPLER_2D 0x8B5E
14966+#define GL_SAMPLER_3D 0x8B5F
14967+#define GL_SAMPLER_CUBE 0x8B60
14968+#define GL_SAMPLER_1D_SHADOW 0x8B61
14969+#define GL_SAMPLER_2D_SHADOW 0x8B62
14970+#define GL_DELETE_STATUS 0x8B80
14971+#define GL_COMPILE_STATUS 0x8B81
14972+#define GL_LINK_STATUS 0x8B82
14973+#define GL_VALIDATE_STATUS 0x8B83
14974+#define GL_INFO_LOG_LENGTH 0x8B84
14975+#define GL_ATTACHED_SHADERS 0x8B85
14976+#define GL_ACTIVE_UNIFORMS 0x8B86
14977+#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
14978+#define GL_SHADER_SOURCE_LENGTH 0x8B88
14979+#define GL_ACTIVE_ATTRIBUTES 0x8B89
14980+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
14981+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
14982+#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
14983+#define GL_CURRENT_PROGRAM 0x8B8D
14984+#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
14985+#define GL_LOWER_LEFT 0x8CA1
14986+#define GL_UPPER_LEFT 0x8CA2
14987+#define GL_STENCIL_BACK_REF 0x8CA3
14988+#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
14989+#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
14990+#endif
14991+
14992+#ifndef GL_VERSION_2_1
14993+#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F
14994+#define GL_PIXEL_PACK_BUFFER 0x88EB
14995+#define GL_PIXEL_UNPACK_BUFFER 0x88EC
14996+#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
14997+#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
14998+#define GL_FLOAT_MAT2x3 0x8B65
14999+#define GL_FLOAT_MAT2x4 0x8B66
15000+#define GL_FLOAT_MAT3x2 0x8B67
15001+#define GL_FLOAT_MAT3x4 0x8B68
15002+#define GL_FLOAT_MAT4x2 0x8B69
15003+#define GL_FLOAT_MAT4x3 0x8B6A
15004+#define GL_SRGB 0x8C40
15005+#define GL_SRGB8 0x8C41
15006+#define GL_SRGB_ALPHA 0x8C42
15007+#define GL_SRGB8_ALPHA8 0x8C43
15008+#define GL_SLUMINANCE_ALPHA 0x8C44
15009+#define GL_SLUMINANCE8_ALPHA8 0x8C45
15010+#define GL_SLUMINANCE 0x8C46
15011+#define GL_SLUMINANCE8 0x8C47
15012+#define GL_COMPRESSED_SRGB 0x8C48
15013+#define GL_COMPRESSED_SRGB_ALPHA 0x8C49
15014+#define GL_COMPRESSED_SLUMINANCE 0x8C4A
15015+#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B
15016+#endif
15017+
15018+#ifndef GL_ARB_multitexture
15019+#define GL_TEXTURE0_ARB 0x84C0
15020+#define GL_TEXTURE1_ARB 0x84C1
15021+#define GL_TEXTURE2_ARB 0x84C2
15022+#define GL_TEXTURE3_ARB 0x84C3
15023+#define GL_TEXTURE4_ARB 0x84C4
15024+#define GL_TEXTURE5_ARB 0x84C5
15025+#define GL_TEXTURE6_ARB 0x84C6
15026+#define GL_TEXTURE7_ARB 0x84C7
15027+#define GL_TEXTURE8_ARB 0x84C8
15028+#define GL_TEXTURE9_ARB 0x84C9
15029+#define GL_TEXTURE10_ARB 0x84CA
15030+#define GL_TEXTURE11_ARB 0x84CB
15031+#define GL_TEXTURE12_ARB 0x84CC
15032+#define GL_TEXTURE13_ARB 0x84CD
15033+#define GL_TEXTURE14_ARB 0x84CE
15034+#define GL_TEXTURE15_ARB 0x84CF
15035+#define GL_TEXTURE16_ARB 0x84D0
15036+#define GL_TEXTURE17_ARB 0x84D1
15037+#define GL_TEXTURE18_ARB 0x84D2
15038+#define GL_TEXTURE19_ARB 0x84D3
15039+#define GL_TEXTURE20_ARB 0x84D4
15040+#define GL_TEXTURE21_ARB 0x84D5
15041+#define GL_TEXTURE22_ARB 0x84D6
15042+#define GL_TEXTURE23_ARB 0x84D7
15043+#define GL_TEXTURE24_ARB 0x84D8
15044+#define GL_TEXTURE25_ARB 0x84D9
15045+#define GL_TEXTURE26_ARB 0x84DA
15046+#define GL_TEXTURE27_ARB 0x84DB
15047+#define GL_TEXTURE28_ARB 0x84DC
15048+#define GL_TEXTURE29_ARB 0x84DD
15049+#define GL_TEXTURE30_ARB 0x84DE
15050+#define GL_TEXTURE31_ARB 0x84DF
15051+#define GL_ACTIVE_TEXTURE_ARB 0x84E0
15052+#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
15053+#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
15054+#endif
15055+
15056+#ifndef GL_ARB_transpose_matrix
15057+#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3
15058+#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4
15059+#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5
15060+#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6
15061+#endif
15062+
15063+#ifndef GL_ARB_multisample
15064+#define GL_MULTISAMPLE_ARB 0x809D
15065+#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E
15066+#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F
15067+#define GL_SAMPLE_COVERAGE_ARB 0x80A0
15068+#define GL_SAMPLE_BUFFERS_ARB 0x80A8
15069+#define GL_SAMPLES_ARB 0x80A9
15070+#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA
15071+#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB
15072+#define GL_MULTISAMPLE_BIT_ARB 0x20000000
15073+#endif
15074+
15075+#ifndef GL_ARB_texture_env_add
15076+#endif
15077+
15078+#ifndef GL_ARB_texture_cube_map
15079+#define GL_NORMAL_MAP_ARB 0x8511
15080+#define GL_REFLECTION_MAP_ARB 0x8512
15081+#define GL_TEXTURE_CUBE_MAP_ARB 0x8513
15082+#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514
15083+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515
15084+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516
15085+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517
15086+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518
15087+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519
15088+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A
15089+#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B
15090+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C
15091+#endif
15092+
15093+#ifndef GL_ARB_texture_compression
15094+#define GL_COMPRESSED_ALPHA_ARB 0x84E9
15095+#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA
15096+#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB
15097+#define GL_COMPRESSED_INTENSITY_ARB 0x84EC
15098+#define GL_COMPRESSED_RGB_ARB 0x84ED
15099+#define GL_COMPRESSED_RGBA_ARB 0x84EE
15100+#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF
15101+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
15102+#define GL_TEXTURE_COMPRESSED_ARB 0x86A1
15103+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
15104+#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
15105+#endif
15106+
15107+#ifndef GL_ARB_texture_border_clamp
15108+#define GL_CLAMP_TO_BORDER_ARB 0x812D
15109+#endif
15110+
15111+#ifndef GL_ARB_point_parameters
15112+#define GL_POINT_SIZE_MIN_ARB 0x8126
15113+#define GL_POINT_SIZE_MAX_ARB 0x8127
15114+#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128
15115+#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129
15116+#endif
15117+
15118+#ifndef GL_ARB_vertex_blend
15119+#define GL_MAX_VERTEX_UNITS_ARB 0x86A4
15120+#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5
15121+#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6
15122+#define GL_VERTEX_BLEND_ARB 0x86A7
15123+#define GL_CURRENT_WEIGHT_ARB 0x86A8
15124+#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9
15125+#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA
15126+#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB
15127+#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC
15128+#define GL_WEIGHT_ARRAY_ARB 0x86AD
15129+#define GL_MODELVIEW0_ARB 0x1700
15130+#define GL_MODELVIEW1_ARB 0x850A
15131+#define GL_MODELVIEW2_ARB 0x8722
15132+#define GL_MODELVIEW3_ARB 0x8723
15133+#define GL_MODELVIEW4_ARB 0x8724
15134+#define GL_MODELVIEW5_ARB 0x8725
15135+#define GL_MODELVIEW6_ARB 0x8726
15136+#define GL_MODELVIEW7_ARB 0x8727
15137+#define GL_MODELVIEW8_ARB 0x8728
15138+#define GL_MODELVIEW9_ARB 0x8729
15139+#define GL_MODELVIEW10_ARB 0x872A
15140+#define GL_MODELVIEW11_ARB 0x872B
15141+#define GL_MODELVIEW12_ARB 0x872C
15142+#define GL_MODELVIEW13_ARB 0x872D
15143+#define GL_MODELVIEW14_ARB 0x872E
15144+#define GL_MODELVIEW15_ARB 0x872F
15145+#define GL_MODELVIEW16_ARB 0x8730
15146+#define GL_MODELVIEW17_ARB 0x8731
15147+#define GL_MODELVIEW18_ARB 0x8732
15148+#define GL_MODELVIEW19_ARB 0x8733
15149+#define GL_MODELVIEW20_ARB 0x8734
15150+#define GL_MODELVIEW21_ARB 0x8735
15151+#define GL_MODELVIEW22_ARB 0x8736
15152+#define GL_MODELVIEW23_ARB 0x8737
15153+#define GL_MODELVIEW24_ARB 0x8738
15154+#define GL_MODELVIEW25_ARB 0x8739
15155+#define GL_MODELVIEW26_ARB 0x873A
15156+#define GL_MODELVIEW27_ARB 0x873B
15157+#define GL_MODELVIEW28_ARB 0x873C
15158+#define GL_MODELVIEW29_ARB 0x873D
15159+#define GL_MODELVIEW30_ARB 0x873E
15160+#define GL_MODELVIEW31_ARB 0x873F
15161+#endif
15162+
15163+#ifndef GL_ARB_matrix_palette
15164+#define GL_MATRIX_PALETTE_ARB 0x8840
15165+#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841
15166+#define GL_MAX_PALETTE_MATRICES_ARB 0x8842
15167+#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843
15168+#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844
15169+#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845
15170+#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846
15171+#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847
15172+#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848
15173+#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849
15174+#endif
15175+
15176+#ifndef GL_ARB_texture_env_combine
15177+#define GL_COMBINE_ARB 0x8570
15178+#define GL_COMBINE_RGB_ARB 0x8571
15179+#define GL_COMBINE_ALPHA_ARB 0x8572
15180+#define GL_SOURCE0_RGB_ARB 0x8580
15181+#define GL_SOURCE1_RGB_ARB 0x8581
15182+#define GL_SOURCE2_RGB_ARB 0x8582
15183+#define GL_SOURCE0_ALPHA_ARB 0x8588
15184+#define GL_SOURCE1_ALPHA_ARB 0x8589
15185+#define GL_SOURCE2_ALPHA_ARB 0x858A
15186+#define GL_OPERAND0_RGB_ARB 0x8590
15187+#define GL_OPERAND1_RGB_ARB 0x8591
15188+#define GL_OPERAND2_RGB_ARB 0x8592
15189+#define GL_OPERAND0_ALPHA_ARB 0x8598
15190+#define GL_OPERAND1_ALPHA_ARB 0x8599
15191+#define GL_OPERAND2_ALPHA_ARB 0x859A
15192+#define GL_RGB_SCALE_ARB 0x8573
15193+#define GL_ADD_SIGNED_ARB 0x8574
15194+#define GL_INTERPOLATE_ARB 0x8575
15195+#define GL_SUBTRACT_ARB 0x84E7
15196+#define GL_CONSTANT_ARB 0x8576
15197+#define GL_PRIMARY_COLOR_ARB 0x8577
15198+#define GL_PREVIOUS_ARB 0x8578
15199+#endif
15200+
15201+#ifndef GL_ARB_texture_env_crossbar
15202+#endif
15203+
15204+#ifndef GL_ARB_texture_env_dot3
15205+#define GL_DOT3_RGB_ARB 0x86AE
15206+#define GL_DOT3_RGBA_ARB 0x86AF
15207+#endif
15208+
15209+#ifndef GL_ARB_texture_mirrored_repeat
15210+#define GL_MIRRORED_REPEAT_ARB 0x8370
15211+#endif
15212+
15213+#ifndef GL_ARB_depth_texture
15214+#define GL_DEPTH_COMPONENT16_ARB 0x81A5
15215+#define GL_DEPTH_COMPONENT24_ARB 0x81A6
15216+#define GL_DEPTH_COMPONENT32_ARB 0x81A7
15217+#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A
15218+#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B
15219+#endif
15220+
15221+#ifndef GL_ARB_shadow
15222+#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C
15223+#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D
15224+#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E
15225+#endif
15226+
15227+#ifndef GL_ARB_shadow_ambient
15228+#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF
15229+#endif
15230+
15231+#ifndef GL_ARB_window_pos
15232+#endif
15233+
15234+#ifndef GL_ARB_vertex_program
15235+#define GL_COLOR_SUM_ARB 0x8458
15236+#define GL_VERTEX_PROGRAM_ARB 0x8620
15237+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622
15238+#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623
15239+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624
15240+#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625
15241+#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626
15242+#define GL_PROGRAM_LENGTH_ARB 0x8627
15243+#define GL_PROGRAM_STRING_ARB 0x8628
15244+#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E
15245+#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F
15246+#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640
15247+#define GL_CURRENT_MATRIX_ARB 0x8641
15248+#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642
15249+#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643
15250+#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645
15251+#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B
15252+#define GL_PROGRAM_BINDING_ARB 0x8677
15253+#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869
15254+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A
15255+#define GL_PROGRAM_ERROR_STRING_ARB 0x8874
15256+#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875
15257+#define GL_PROGRAM_FORMAT_ARB 0x8876
15258+#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0
15259+#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1
15260+#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2
15261+#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3
15262+#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4
15263+#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5
15264+#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6
15265+#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7
15266+#define GL_PROGRAM_PARAMETERS_ARB 0x88A8
15267+#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9
15268+#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA
15269+#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB
15270+#define GL_PROGRAM_ATTRIBS_ARB 0x88AC
15271+#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD
15272+#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE
15273+#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF
15274+#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0
15275+#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1
15276+#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2
15277+#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3
15278+#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4
15279+#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5
15280+#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6
15281+#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7
15282+#define GL_MATRIX0_ARB 0x88C0
15283+#define GL_MATRIX1_ARB 0x88C1
15284+#define GL_MATRIX2_ARB 0x88C2
15285+#define GL_MATRIX3_ARB 0x88C3
15286+#define GL_MATRIX4_ARB 0x88C4
15287+#define GL_MATRIX5_ARB 0x88C5
15288+#define GL_MATRIX6_ARB 0x88C6
15289+#define GL_MATRIX7_ARB 0x88C7
15290+#define GL_MATRIX8_ARB 0x88C8
15291+#define GL_MATRIX9_ARB 0x88C9
15292+#define GL_MATRIX10_ARB 0x88CA
15293+#define GL_MATRIX11_ARB 0x88CB
15294+#define GL_MATRIX12_ARB 0x88CC
15295+#define GL_MATRIX13_ARB 0x88CD
15296+#define GL_MATRIX14_ARB 0x88CE
15297+#define GL_MATRIX15_ARB 0x88CF
15298+#define GL_MATRIX16_ARB 0x88D0
15299+#define GL_MATRIX17_ARB 0x88D1
15300+#define GL_MATRIX18_ARB 0x88D2
15301+#define GL_MATRIX19_ARB 0x88D3
15302+#define GL_MATRIX20_ARB 0x88D4
15303+#define GL_MATRIX21_ARB 0x88D5
15304+#define GL_MATRIX22_ARB 0x88D6
15305+#define GL_MATRIX23_ARB 0x88D7
15306+#define GL_MATRIX24_ARB 0x88D8
15307+#define GL_MATRIX25_ARB 0x88D9
15308+#define GL_MATRIX26_ARB 0x88DA
15309+#define GL_MATRIX27_ARB 0x88DB
15310+#define GL_MATRIX28_ARB 0x88DC
15311+#define GL_MATRIX29_ARB 0x88DD
15312+#define GL_MATRIX30_ARB 0x88DE
15313+#define GL_MATRIX31_ARB 0x88DF
15314+#endif
15315+
15316+#ifndef GL_ARB_fragment_program
15317+#define GL_FRAGMENT_PROGRAM_ARB 0x8804
15318+#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805
15319+#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806
15320+#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807
15321+#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808
15322+#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809
15323+#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A
15324+#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B
15325+#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C
15326+#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D
15327+#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E
15328+#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F
15329+#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810
15330+#define GL_MAX_TEXTURE_COORDS_ARB 0x8871
15331+#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872
15332+#endif
15333+
15334+#ifndef GL_ARB_vertex_buffer_object
15335+#define GL_BUFFER_SIZE_ARB 0x8764
15336+#define GL_BUFFER_USAGE_ARB 0x8765
15337+#define GL_ARRAY_BUFFER_ARB 0x8892
15338+#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893
15339+#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894
15340+#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895
15341+#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896
15342+#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897
15343+#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898
15344+#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899
15345+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A
15346+#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B
15347+#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C
15348+#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D
15349+#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E
15350+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F
15351+#define GL_READ_ONLY_ARB 0x88B8
15352+#define GL_WRITE_ONLY_ARB 0x88B9
15353+#define GL_READ_WRITE_ARB 0x88BA
15354+#define GL_BUFFER_ACCESS_ARB 0x88BB
15355+#define GL_BUFFER_MAPPED_ARB 0x88BC
15356+#define GL_BUFFER_MAP_POINTER_ARB 0x88BD
15357+#define GL_STREAM_DRAW_ARB 0x88E0
15358+#define GL_STREAM_READ_ARB 0x88E1
15359+#define GL_STREAM_COPY_ARB 0x88E2
15360+#define GL_STATIC_DRAW_ARB 0x88E4
15361+#define GL_STATIC_READ_ARB 0x88E5
15362+#define GL_STATIC_COPY_ARB 0x88E6
15363+#define GL_DYNAMIC_DRAW_ARB 0x88E8
15364+#define GL_DYNAMIC_READ_ARB 0x88E9
15365+#define GL_DYNAMIC_COPY_ARB 0x88EA
15366+#endif
15367+
15368+#ifndef GL_ARB_occlusion_query
15369+#define GL_QUERY_COUNTER_BITS_ARB 0x8864
15370+#define GL_CURRENT_QUERY_ARB 0x8865
15371+#define GL_QUERY_RESULT_ARB 0x8866
15372+#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867
15373+#define GL_SAMPLES_PASSED_ARB 0x8914
15374+#endif
15375+
15376+#ifndef GL_ARB_shader_objects
15377+#define GL_PROGRAM_OBJECT_ARB 0x8B40
15378+#define GL_SHADER_OBJECT_ARB 0x8B48
15379+#define GL_OBJECT_TYPE_ARB 0x8B4E
15380+#define GL_OBJECT_SUBTYPE_ARB 0x8B4F
15381+#define GL_FLOAT_VEC2_ARB 0x8B50
15382+#define GL_FLOAT_VEC3_ARB 0x8B51
15383+#define GL_FLOAT_VEC4_ARB 0x8B52
15384+#define GL_INT_VEC2_ARB 0x8B53
15385+#define GL_INT_VEC3_ARB 0x8B54
15386+#define GL_INT_VEC4_ARB 0x8B55
15387+#define GL_BOOL_ARB 0x8B56
15388+#define GL_BOOL_VEC2_ARB 0x8B57
15389+#define GL_BOOL_VEC3_ARB 0x8B58
15390+#define GL_BOOL_VEC4_ARB 0x8B59
15391+#define GL_FLOAT_MAT2_ARB 0x8B5A
15392+#define GL_FLOAT_MAT3_ARB 0x8B5B
15393+#define GL_FLOAT_MAT4_ARB 0x8B5C
15394+#define GL_SAMPLER_1D_ARB 0x8B5D
15395+#define GL_SAMPLER_2D_ARB 0x8B5E
15396+#define GL_SAMPLER_3D_ARB 0x8B5F
15397+#define GL_SAMPLER_CUBE_ARB 0x8B60
15398+#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61
15399+#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62
15400+#define GL_SAMPLER_2D_RECT_ARB 0x8B63
15401+#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64
15402+#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80
15403+#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81
15404+#define GL_OBJECT_LINK_STATUS_ARB 0x8B82
15405+#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83
15406+#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84
15407+#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85
15408+#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86
15409+#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87
15410+#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88
15411+#endif
15412+
15413+#ifndef GL_ARB_vertex_shader
15414+#define GL_VERTEX_SHADER_ARB 0x8B31
15415+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A
15416+#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B
15417+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C
15418+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D
15419+#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89
15420+#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A
15421+#endif
15422+
15423+#ifndef GL_ARB_fragment_shader
15424+#define GL_FRAGMENT_SHADER_ARB 0x8B30
15425+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49
15426+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B
15427+#endif
15428+
15429+#ifndef GL_ARB_shading_language_100
15430+#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C
15431+#endif
15432+
15433+#ifndef GL_ARB_texture_non_power_of_two
15434+#endif
15435+
15436+#ifndef GL_ARB_point_sprite
15437+#define GL_POINT_SPRITE_ARB 0x8861
15438+#define GL_COORD_REPLACE_ARB 0x8862
15439+#endif
15440+
15441+#ifndef GL_ARB_fragment_program_shadow
15442+#endif
15443+
15444+#ifndef GL_ARB_draw_buffers
15445+#define GL_MAX_DRAW_BUFFERS_ARB 0x8824
15446+#define GL_DRAW_BUFFER0_ARB 0x8825
15447+#define GL_DRAW_BUFFER1_ARB 0x8826
15448+#define GL_DRAW_BUFFER2_ARB 0x8827
15449+#define GL_DRAW_BUFFER3_ARB 0x8828
15450+#define GL_DRAW_BUFFER4_ARB 0x8829
15451+#define GL_DRAW_BUFFER5_ARB 0x882A
15452+#define GL_DRAW_BUFFER6_ARB 0x882B
15453+#define GL_DRAW_BUFFER7_ARB 0x882C
15454+#define GL_DRAW_BUFFER8_ARB 0x882D
15455+#define GL_DRAW_BUFFER9_ARB 0x882E
15456+#define GL_DRAW_BUFFER10_ARB 0x882F
15457+#define GL_DRAW_BUFFER11_ARB 0x8830
15458+#define GL_DRAW_BUFFER12_ARB 0x8831
15459+#define GL_DRAW_BUFFER13_ARB 0x8832
15460+#define GL_DRAW_BUFFER14_ARB 0x8833
15461+#define GL_DRAW_BUFFER15_ARB 0x8834
15462+#endif
15463+
15464+#ifndef GL_ARB_texture_rectangle
15465+#define GL_TEXTURE_RECTANGLE_ARB 0x84F5
15466+#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6
15467+#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7
15468+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
15469+#endif
15470+
15471+#ifndef GL_ARB_color_buffer_float
15472+#define GL_RGBA_FLOAT_MODE_ARB 0x8820
15473+#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A
15474+#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B
15475+#define GL_CLAMP_READ_COLOR_ARB 0x891C
15476+#define GL_FIXED_ONLY_ARB 0x891D
15477+#endif
15478+
15479+#ifndef GL_ARB_half_float_pixel
15480+#define GL_HALF_FLOAT_ARB 0x140B
15481+#endif
15482+
15483+#ifndef GL_ARB_texture_float
15484+#define GL_TEXTURE_RED_TYPE_ARB 0x8C10
15485+#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11
15486+#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12
15487+#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13
15488+#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14
15489+#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15
15490+#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16
15491+#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17
15492+#define GL_RGBA32F_ARB 0x8814
15493+#define GL_RGB32F_ARB 0x8815
15494+#define GL_ALPHA32F_ARB 0x8816
15495+#define GL_INTENSITY32F_ARB 0x8817
15496+#define GL_LUMINANCE32F_ARB 0x8818
15497+#define GL_LUMINANCE_ALPHA32F_ARB 0x8819
15498+#define GL_RGBA16F_ARB 0x881A
15499+#define GL_RGB16F_ARB 0x881B
15500+#define GL_ALPHA16F_ARB 0x881C
15501+#define GL_INTENSITY16F_ARB 0x881D
15502+#define GL_LUMINANCE16F_ARB 0x881E
15503+#define GL_LUMINANCE_ALPHA16F_ARB 0x881F
15504+#endif
15505+
15506+#ifndef GL_ARB_pixel_buffer_object
15507+#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB
15508+#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC
15509+#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED
15510+#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
15511+#endif
15512+
15513+#ifndef GL_EXT_abgr
15514+#define GL_ABGR_EXT 0x8000
15515+#endif
15516+
15517+#ifndef GL_EXT_blend_color
15518+#define GL_CONSTANT_COLOR_EXT 0x8001
15519+#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002
15520+#define GL_CONSTANT_ALPHA_EXT 0x8003
15521+#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004
15522+#define GL_BLEND_COLOR_EXT 0x8005
15523+#endif
15524+
15525+#ifndef GL_EXT_polygon_offset
15526+#define GL_POLYGON_OFFSET_EXT 0x8037
15527+#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038
15528+#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039
15529+#endif
15530+
15531+#ifndef GL_EXT_texture
15532+#define GL_ALPHA4_EXT 0x803B
15533+#define GL_ALPHA8_EXT 0x803C
15534+#define GL_ALPHA12_EXT 0x803D
15535+#define GL_ALPHA16_EXT 0x803E
15536+#define GL_LUMINANCE4_EXT 0x803F
15537+#define GL_LUMINANCE8_EXT 0x8040
15538+#define GL_LUMINANCE12_EXT 0x8041
15539+#define GL_LUMINANCE16_EXT 0x8042
15540+#define GL_LUMINANCE4_ALPHA4_EXT 0x8043
15541+#define GL_LUMINANCE6_ALPHA2_EXT 0x8044
15542+#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
15543+#define GL_LUMINANCE12_ALPHA4_EXT 0x8046
15544+#define GL_LUMINANCE12_ALPHA12_EXT 0x8047
15545+#define GL_LUMINANCE16_ALPHA16_EXT 0x8048
15546+#define GL_INTENSITY_EXT 0x8049
15547+#define GL_INTENSITY4_EXT 0x804A
15548+#define GL_INTENSITY8_EXT 0x804B
15549+#define GL_INTENSITY12_EXT 0x804C
15550+#define GL_INTENSITY16_EXT 0x804D
15551+#define GL_RGB2_EXT 0x804E
15552+#define GL_RGB4_EXT 0x804F
15553+#define GL_RGB5_EXT 0x8050
15554+#define GL_RGB8_EXT 0x8051
15555+#define GL_RGB10_EXT 0x8052
15556+#define GL_RGB12_EXT 0x8053
15557+#define GL_RGB16_EXT 0x8054
15558+#define GL_RGBA2_EXT 0x8055
15559+#define GL_RGBA4_EXT 0x8056
15560+#define GL_RGB5_A1_EXT 0x8057
15561+#define GL_RGBA8_EXT 0x8058
15562+#define GL_RGB10_A2_EXT 0x8059
15563+#define GL_RGBA12_EXT 0x805A
15564+#define GL_RGBA16_EXT 0x805B
15565+#define GL_TEXTURE_RED_SIZE_EXT 0x805C
15566+#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D
15567+#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E
15568+#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F
15569+#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060
15570+#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061
15571+#define GL_REPLACE_EXT 0x8062
15572+#define GL_PROXY_TEXTURE_1D_EXT 0x8063
15573+#define GL_PROXY_TEXTURE_2D_EXT 0x8064
15574+#define GL_TEXTURE_TOO_LARGE_EXT 0x8065
15575+#endif
15576+
15577+#ifndef GL_EXT_texture3D
15578+#define GL_PACK_SKIP_IMAGES_EXT 0x806B
15579+#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C
15580+#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D
15581+#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E
15582+#define GL_TEXTURE_3D_EXT 0x806F
15583+#define GL_PROXY_TEXTURE_3D_EXT 0x8070
15584+#define GL_TEXTURE_DEPTH_EXT 0x8071
15585+#define GL_TEXTURE_WRAP_R_EXT 0x8072
15586+#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073
15587+#endif
15588+
15589+#ifndef GL_SGIS_texture_filter4
15590+#define GL_FILTER4_SGIS 0x8146
15591+#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147
15592+#endif
15593+
15594+#ifndef GL_EXT_subtexture
15595+#endif
15596+
15597+#ifndef GL_EXT_copy_texture
15598+#endif
15599+
15600+#ifndef GL_EXT_histogram
15601+#define GL_HISTOGRAM_EXT 0x8024
15602+#define GL_PROXY_HISTOGRAM_EXT 0x8025
15603+#define GL_HISTOGRAM_WIDTH_EXT 0x8026
15604+#define GL_HISTOGRAM_FORMAT_EXT 0x8027
15605+#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028
15606+#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029
15607+#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A
15608+#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B
15609+#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C
15610+#define GL_HISTOGRAM_SINK_EXT 0x802D
15611+#define GL_MINMAX_EXT 0x802E
15612+#define GL_MINMAX_FORMAT_EXT 0x802F
15613+#define GL_MINMAX_SINK_EXT 0x8030
15614+#define GL_TABLE_TOO_LARGE_EXT 0x8031
15615+#endif
15616+
15617+#ifndef GL_EXT_convolution
15618+#define GL_CONVOLUTION_1D_EXT 0x8010
15619+#define GL_CONVOLUTION_2D_EXT 0x8011
15620+#define GL_SEPARABLE_2D_EXT 0x8012
15621+#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013
15622+#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014
15623+#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015
15624+#define GL_REDUCE_EXT 0x8016
15625+#define GL_CONVOLUTION_FORMAT_EXT 0x8017
15626+#define GL_CONVOLUTION_WIDTH_EXT 0x8018
15627+#define GL_CONVOLUTION_HEIGHT_EXT 0x8019
15628+#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A
15629+#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B
15630+#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C
15631+#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D
15632+#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E
15633+#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F
15634+#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020
15635+#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021
15636+#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022
15637+#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023
15638+#endif
15639+
15640+#ifndef GL_SGI_color_matrix
15641+#define GL_COLOR_MATRIX_SGI 0x80B1
15642+#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2
15643+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3
15644+#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4
15645+#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5
15646+#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6
15647+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7
15648+#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8
15649+#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9
15650+#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA
15651+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB
15652+#endif
15653+
15654+#ifndef GL_SGI_color_table
15655+#define GL_COLOR_TABLE_SGI 0x80D0
15656+#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1
15657+#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2
15658+#define GL_PROXY_COLOR_TABLE_SGI 0x80D3
15659+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4
15660+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5
15661+#define GL_COLOR_TABLE_SCALE_SGI 0x80D6
15662+#define GL_COLOR_TABLE_BIAS_SGI 0x80D7
15663+#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8
15664+#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9
15665+#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA
15666+#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB
15667+#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC
15668+#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD
15669+#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE
15670+#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF
15671+#endif
15672+
15673+#ifndef GL_SGIS_pixel_texture
15674+#define GL_PIXEL_TEXTURE_SGIS 0x8353
15675+#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354
15676+#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355
15677+#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356
15678+#endif
15679+
15680+#ifndef GL_SGIX_pixel_texture
15681+#define GL_PIXEL_TEX_GEN_SGIX 0x8139
15682+#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B
15683+#endif
15684+
15685+#ifndef GL_SGIS_texture4D
15686+#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130
15687+#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131
15688+#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132
15689+#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133
15690+#define GL_TEXTURE_4D_SGIS 0x8134
15691+#define GL_PROXY_TEXTURE_4D_SGIS 0x8135
15692+#define GL_TEXTURE_4DSIZE_SGIS 0x8136
15693+#define GL_TEXTURE_WRAP_Q_SGIS 0x8137
15694+#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138
15695+#define GL_TEXTURE_4D_BINDING_SGIS 0x814F
15696+#endif
15697+
15698+#ifndef GL_SGI_texture_color_table
15699+#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC
15700+#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD
15701+#endif
15702+
15703+#ifndef GL_EXT_cmyka
15704+#define GL_CMYK_EXT 0x800C
15705+#define GL_CMYKA_EXT 0x800D
15706+#define GL_PACK_CMYK_HINT_EXT 0x800E
15707+#define GL_UNPACK_CMYK_HINT_EXT 0x800F
15708+#endif
15709+
15710+#ifndef GL_EXT_texture_object
15711+#define GL_TEXTURE_PRIORITY_EXT 0x8066
15712+#define GL_TEXTURE_RESIDENT_EXT 0x8067
15713+#define GL_TEXTURE_1D_BINDING_EXT 0x8068
15714+#define GL_TEXTURE_2D_BINDING_EXT 0x8069
15715+#define GL_TEXTURE_3D_BINDING_EXT 0x806A
15716+#endif
15717+
15718+#ifndef GL_SGIS_detail_texture
15719+#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095
15720+#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096
15721+#define GL_LINEAR_DETAIL_SGIS 0x8097
15722+#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098
15723+#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099
15724+#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A
15725+#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B
15726+#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C
15727+#endif
15728+
15729+#ifndef GL_SGIS_sharpen_texture
15730+#define GL_LINEAR_SHARPEN_SGIS 0x80AD
15731+#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE
15732+#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF
15733+#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0
15734+#endif
15735+
15736+#ifndef GL_EXT_packed_pixels
15737+#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032
15738+#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033
15739+#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034
15740+#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035
15741+#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036
15742+#endif
15743+
15744+#ifndef GL_SGIS_texture_lod
15745+#define GL_TEXTURE_MIN_LOD_SGIS 0x813A
15746+#define GL_TEXTURE_MAX_LOD_SGIS 0x813B
15747+#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C
15748+#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D
15749+#endif
15750+
15751+#ifndef GL_SGIS_multisample
15752+#define GL_MULTISAMPLE_SGIS 0x809D
15753+#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E
15754+#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F
15755+#define GL_SAMPLE_MASK_SGIS 0x80A0
15756+#define GL_1PASS_SGIS 0x80A1
15757+#define GL_2PASS_0_SGIS 0x80A2
15758+#define GL_2PASS_1_SGIS 0x80A3
15759+#define GL_4PASS_0_SGIS 0x80A4
15760+#define GL_4PASS_1_SGIS 0x80A5
15761+#define GL_4PASS_2_SGIS 0x80A6
15762+#define GL_4PASS_3_SGIS 0x80A7
15763+#define GL_SAMPLE_BUFFERS_SGIS 0x80A8
15764+#define GL_SAMPLES_SGIS 0x80A9
15765+#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA
15766+#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB
15767+#define GL_SAMPLE_PATTERN_SGIS 0x80AC
15768+#endif
15769+
15770+#ifndef GL_EXT_rescale_normal
15771+#define GL_RESCALE_NORMAL_EXT 0x803A
15772+#endif
15773+
15774+#ifndef GL_EXT_vertex_array
15775+#define GL_VERTEX_ARRAY_EXT 0x8074
15776+#define GL_NORMAL_ARRAY_EXT 0x8075
15777+#define GL_COLOR_ARRAY_EXT 0x8076
15778+#define GL_INDEX_ARRAY_EXT 0x8077
15779+#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078
15780+#define GL_EDGE_FLAG_ARRAY_EXT 0x8079
15781+#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A
15782+#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B
15783+#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C
15784+#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D
15785+#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E
15786+#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F
15787+#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080
15788+#define GL_COLOR_ARRAY_SIZE_EXT 0x8081
15789+#define GL_COLOR_ARRAY_TYPE_EXT 0x8082
15790+#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083
15791+#define GL_COLOR_ARRAY_COUNT_EXT 0x8084
15792+#define GL_INDEX_ARRAY_TYPE_EXT 0x8085
15793+#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086
15794+#define GL_INDEX_ARRAY_COUNT_EXT 0x8087
15795+#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088
15796+#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089
15797+#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A
15798+#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B
15799+#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C
15800+#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D
15801+#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E
15802+#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F
15803+#define GL_COLOR_ARRAY_POINTER_EXT 0x8090
15804+#define GL_INDEX_ARRAY_POINTER_EXT 0x8091
15805+#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092
15806+#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093
15807+#endif
15808+
15809+#ifndef GL_EXT_misc_attribute
15810+#endif
15811+
15812+#ifndef GL_SGIS_generate_mipmap
15813+#define GL_GENERATE_MIPMAP_SGIS 0x8191
15814+#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192
15815+#endif
15816+
15817+#ifndef GL_SGIX_clipmap
15818+#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170
15819+#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171
15820+#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172
15821+#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173
15822+#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174
15823+#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175
15824+#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176
15825+#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177
15826+#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178
15827+#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D
15828+#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E
15829+#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F
15830+#endif
15831+
15832+#ifndef GL_SGIX_shadow
15833+#define GL_TEXTURE_COMPARE_SGIX 0x819A
15834+#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B
15835+#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C
15836+#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D
15837+#endif
15838+
15839+#ifndef GL_SGIS_texture_edge_clamp
15840+#define GL_CLAMP_TO_EDGE_SGIS 0x812F
15841+#endif
15842+
15843+#ifndef GL_SGIS_texture_border_clamp
15844+#define GL_CLAMP_TO_BORDER_SGIS 0x812D
15845+#endif
15846+
15847+#ifndef GL_EXT_blend_minmax
15848+#define GL_FUNC_ADD_EXT 0x8006
15849+#define GL_MIN_EXT 0x8007
15850+#define GL_MAX_EXT 0x8008
15851+#define GL_BLEND_EQUATION_EXT 0x8009
15852+#endif
15853+
15854+#ifndef GL_EXT_blend_subtract
15855+#define GL_FUNC_SUBTRACT_EXT 0x800A
15856+#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B
15857+#endif
15858+
15859+#ifndef GL_EXT_blend_logic_op
15860+#endif
15861+
15862+#ifndef GL_SGIX_interlace
15863+#define GL_INTERLACE_SGIX 0x8094
15864+#endif
15865+
15866+#ifndef GL_SGIX_pixel_tiles
15867+#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E
15868+#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F
15869+#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140
15870+#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141
15871+#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142
15872+#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143
15873+#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144
15874+#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145
15875+#endif
15876+
15877+#ifndef GL_SGIS_texture_select
15878+#define GL_DUAL_ALPHA4_SGIS 0x8110
15879+#define GL_DUAL_ALPHA8_SGIS 0x8111
15880+#define GL_DUAL_ALPHA12_SGIS 0x8112
15881+#define GL_DUAL_ALPHA16_SGIS 0x8113
15882+#define GL_DUAL_LUMINANCE4_SGIS 0x8114
15883+#define GL_DUAL_LUMINANCE8_SGIS 0x8115
15884+#define GL_DUAL_LUMINANCE12_SGIS 0x8116
15885+#define GL_DUAL_LUMINANCE16_SGIS 0x8117
15886+#define GL_DUAL_INTENSITY4_SGIS 0x8118
15887+#define GL_DUAL_INTENSITY8_SGIS 0x8119
15888+#define GL_DUAL_INTENSITY12_SGIS 0x811A
15889+#define GL_DUAL_INTENSITY16_SGIS 0x811B
15890+#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C
15891+#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D
15892+#define GL_QUAD_ALPHA4_SGIS 0x811E
15893+#define GL_QUAD_ALPHA8_SGIS 0x811F
15894+#define GL_QUAD_LUMINANCE4_SGIS 0x8120
15895+#define GL_QUAD_LUMINANCE8_SGIS 0x8121
15896+#define GL_QUAD_INTENSITY4_SGIS 0x8122
15897+#define GL_QUAD_INTENSITY8_SGIS 0x8123
15898+#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124
15899+#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125
15900+#endif
15901+
15902+#ifndef GL_SGIX_sprite
15903+#define GL_SPRITE_SGIX 0x8148
15904+#define GL_SPRITE_MODE_SGIX 0x8149
15905+#define GL_SPRITE_AXIS_SGIX 0x814A
15906+#define GL_SPRITE_TRANSLATION_SGIX 0x814B
15907+#define GL_SPRITE_AXIAL_SGIX 0x814C
15908+#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D
15909+#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E
15910+#endif
15911+
15912+#ifndef GL_SGIX_texture_multi_buffer
15913+#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E
15914+#endif
15915+
15916+#ifndef GL_EXT_point_parameters
15917+#define GL_POINT_SIZE_MIN_EXT 0x8126
15918+#define GL_POINT_SIZE_MAX_EXT 0x8127
15919+#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128
15920+#define GL_DISTANCE_ATTENUATION_EXT 0x8129
15921+#endif
15922+
15923+#ifndef GL_SGIS_point_parameters
15924+#define GL_POINT_SIZE_MIN_SGIS 0x8126
15925+#define GL_POINT_SIZE_MAX_SGIS 0x8127
15926+#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128
15927+#define GL_DISTANCE_ATTENUATION_SGIS 0x8129
15928+#endif
15929+
15930+#ifndef GL_SGIX_instruments
15931+#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180
15932+#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181
15933+#endif
15934+
15935+#ifndef GL_SGIX_texture_scale_bias
15936+#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179
15937+#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A
15938+#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B
15939+#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C
15940+#endif
15941+
15942+#ifndef GL_SGIX_framezoom
15943+#define GL_FRAMEZOOM_SGIX 0x818B
15944+#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C
15945+#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D
15946+#endif
15947+
15948+#ifndef GL_SGIX_tag_sample_buffer
15949+#endif
15950+
15951+#ifndef GL_FfdMaskSGIX
15952+#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001
15953+#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002
15954+#endif
15955+
15956+#ifndef GL_SGIX_polynomial_ffd
15957+#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194
15958+#define GL_TEXTURE_DEFORMATION_SGIX 0x8195
15959+#define GL_DEFORMATIONS_MASK_SGIX 0x8196
15960+#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197
15961+#endif
15962+
15963+#ifndef GL_SGIX_reference_plane
15964+#define GL_REFERENCE_PLANE_SGIX 0x817D
15965+#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E
15966+#endif
15967+
15968+#ifndef GL_SGIX_flush_raster
15969+#endif
15970+
15971+#ifndef GL_SGIX_depth_texture
15972+#define GL_DEPTH_COMPONENT16_SGIX 0x81A5
15973+#define GL_DEPTH_COMPONENT24_SGIX 0x81A6
15974+#define GL_DEPTH_COMPONENT32_SGIX 0x81A7
15975+#endif
15976+
15977+#ifndef GL_SGIS_fog_function
15978+#define GL_FOG_FUNC_SGIS 0x812A
15979+#define GL_FOG_FUNC_POINTS_SGIS 0x812B
15980+#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C
15981+#endif
15982+
15983+#ifndef GL_SGIX_fog_offset
15984+#define GL_FOG_OFFSET_SGIX 0x8198
15985+#define GL_FOG_OFFSET_VALUE_SGIX 0x8199
15986+#endif
15987+
15988+#ifndef GL_HP_image_transform
15989+#define GL_IMAGE_SCALE_X_HP 0x8155
15990+#define GL_IMAGE_SCALE_Y_HP 0x8156
15991+#define GL_IMAGE_TRANSLATE_X_HP 0x8157
15992+#define GL_IMAGE_TRANSLATE_Y_HP 0x8158
15993+#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159
15994+#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A
15995+#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B
15996+#define GL_IMAGE_MAG_FILTER_HP 0x815C
15997+#define GL_IMAGE_MIN_FILTER_HP 0x815D
15998+#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E
15999+#define GL_CUBIC_HP 0x815F
16000+#define GL_AVERAGE_HP 0x8160
16001+#define GL_IMAGE_TRANSFORM_2D_HP 0x8161
16002+#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162
16003+#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163
16004+#endif
16005+
16006+#ifndef GL_HP_convolution_border_modes
16007+#define GL_IGNORE_BORDER_HP 0x8150
16008+#define GL_CONSTANT_BORDER_HP 0x8151
16009+#define GL_REPLICATE_BORDER_HP 0x8153
16010+#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154
16011+#endif
16012+
16013+#ifndef GL_INGR_palette_buffer
16014+#endif
16015+
16016+#ifndef GL_SGIX_texture_add_env
16017+#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE
16018+#endif
16019+
16020+#ifndef GL_EXT_color_subtable
16021+#endif
16022+
16023+#ifndef GL_PGI_vertex_hints
16024+#define GL_VERTEX_DATA_HINT_PGI 0x1A22A
16025+#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B
16026+#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C
16027+#define GL_MAX_VERTEX_HINT_PGI 0x1A22D
16028+#define GL_COLOR3_BIT_PGI 0x00010000
16029+#define GL_COLOR4_BIT_PGI 0x00020000
16030+#define GL_EDGEFLAG_BIT_PGI 0x00040000
16031+#define GL_INDEX_BIT_PGI 0x00080000
16032+#define GL_MAT_AMBIENT_BIT_PGI 0x00100000
16033+#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000
16034+#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000
16035+#define GL_MAT_EMISSION_BIT_PGI 0x00800000
16036+#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000
16037+#define GL_MAT_SHININESS_BIT_PGI 0x02000000
16038+#define GL_MAT_SPECULAR_BIT_PGI 0x04000000
16039+#define GL_NORMAL_BIT_PGI 0x08000000
16040+#define GL_TEXCOORD1_BIT_PGI 0x10000000
16041+#define GL_TEXCOORD2_BIT_PGI 0x20000000
16042+#define GL_TEXCOORD3_BIT_PGI 0x40000000
16043+#define GL_TEXCOORD4_BIT_PGI 0x80000000
16044+#define GL_VERTEX23_BIT_PGI 0x00000004
16045+#define GL_VERTEX4_BIT_PGI 0x00000008
16046+#endif
16047+
16048+#ifndef GL_PGI_misc_hints
16049+#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8
16050+#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD
16051+#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE
16052+#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202
16053+#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203
16054+#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204
16055+#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C
16056+#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D
16057+#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E
16058+#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F
16059+#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210
16060+#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211
16061+#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216
16062+#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217
16063+#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218
16064+#define GL_FULL_STIPPLE_HINT_PGI 0x1A219
16065+#define GL_CLIP_NEAR_HINT_PGI 0x1A220
16066+#define GL_CLIP_FAR_HINT_PGI 0x1A221
16067+#define GL_WIDE_LINE_HINT_PGI 0x1A222
16068+#define GL_BACK_NORMALS_HINT_PGI 0x1A223
16069+#endif
16070+
16071+#ifndef GL_EXT_paletted_texture
16072+#define GL_COLOR_INDEX1_EXT 0x80E2
16073+#define GL_COLOR_INDEX2_EXT 0x80E3
16074+#define GL_COLOR_INDEX4_EXT 0x80E4
16075+#define GL_COLOR_INDEX8_EXT 0x80E5
16076+#define GL_COLOR_INDEX12_EXT 0x80E6
16077+#define GL_COLOR_INDEX16_EXT 0x80E7
16078+#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED
16079+#endif
16080+
16081+#ifndef GL_EXT_clip_volume_hint
16082+#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0
16083+#endif
16084+
16085+#ifndef GL_SGIX_list_priority
16086+#define GL_LIST_PRIORITY_SGIX 0x8182
16087+#endif
16088+
16089+#ifndef GL_SGIX_ir_instrument1
16090+#define GL_IR_INSTRUMENT1_SGIX 0x817F
16091+#endif
16092+
16093+#ifndef GL_SGIX_calligraphic_fragment
16094+#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183
16095+#endif
16096+
16097+#ifndef GL_SGIX_texture_lod_bias
16098+#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E
16099+#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F
16100+#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190
16101+#endif
16102+
16103+#ifndef GL_SGIX_shadow_ambient
16104+#define GL_SHADOW_AMBIENT_SGIX 0x80BF
16105+#endif
16106+
16107+#ifndef GL_EXT_index_texture
16108+#endif
16109+
16110+#ifndef GL_EXT_index_material
16111+#define GL_INDEX_MATERIAL_EXT 0x81B8
16112+#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9
16113+#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA
16114+#endif
16115+
16116+#ifndef GL_EXT_index_func
16117+#define GL_INDEX_TEST_EXT 0x81B5
16118+#define GL_INDEX_TEST_FUNC_EXT 0x81B6
16119+#define GL_INDEX_TEST_REF_EXT 0x81B7
16120+#endif
16121+
16122+#ifndef GL_EXT_index_array_formats
16123+#define GL_IUI_V2F_EXT 0x81AD
16124+#define GL_IUI_V3F_EXT 0x81AE
16125+#define GL_IUI_N3F_V2F_EXT 0x81AF
16126+#define GL_IUI_N3F_V3F_EXT 0x81B0
16127+#define GL_T2F_IUI_V2F_EXT 0x81B1
16128+#define GL_T2F_IUI_V3F_EXT 0x81B2
16129+#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3
16130+#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4
16131+#endif
16132+
16133+#ifndef GL_EXT_compiled_vertex_array
16134+#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8
16135+#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9
16136+#endif
16137+
16138+#ifndef GL_EXT_cull_vertex
16139+#define GL_CULL_VERTEX_EXT 0x81AA
16140+#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB
16141+#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC
16142+#endif
16143+
16144+#ifndef GL_SGIX_ycrcb
16145+#define GL_YCRCB_422_SGIX 0x81BB
16146+#define GL_YCRCB_444_SGIX 0x81BC
16147+#endif
16148+
16149+#ifndef GL_SGIX_fragment_lighting
16150+#define GL_FRAGMENT_LIGHTING_SGIX 0x8400
16151+#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401
16152+#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402
16153+#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403
16154+#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404
16155+#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405
16156+#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406
16157+#define GL_LIGHT_ENV_MODE_SGIX 0x8407
16158+#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408
16159+#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409
16160+#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A
16161+#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B
16162+#define GL_FRAGMENT_LIGHT0_SGIX 0x840C
16163+#define GL_FRAGMENT_LIGHT1_SGIX 0x840D
16164+#define GL_FRAGMENT_LIGHT2_SGIX 0x840E
16165+#define GL_FRAGMENT_LIGHT3_SGIX 0x840F
16166+#define GL_FRAGMENT_LIGHT4_SGIX 0x8410
16167+#define GL_FRAGMENT_LIGHT5_SGIX 0x8411
16168+#define GL_FRAGMENT_LIGHT6_SGIX 0x8412
16169+#define GL_FRAGMENT_LIGHT7_SGIX 0x8413
16170+#endif
16171+
16172+#ifndef GL_IBM_rasterpos_clip
16173+#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262
16174+#endif
16175+
16176+#ifndef GL_HP_texture_lighting
16177+#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167
16178+#define GL_TEXTURE_POST_SPECULAR_HP 0x8168
16179+#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169
16180+#endif
16181+
16182+#ifndef GL_EXT_draw_range_elements
16183+#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8
16184+#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9
16185+#endif
16186+
16187+#ifndef GL_WIN_phong_shading
16188+#define GL_PHONG_WIN 0x80EA
16189+#define GL_PHONG_HINT_WIN 0x80EB
16190+#endif
16191+
16192+#ifndef GL_WIN_specular_fog
16193+#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC
16194+#endif
16195+
16196+#ifndef GL_EXT_light_texture
16197+#define GL_FRAGMENT_MATERIAL_EXT 0x8349
16198+#define GL_FRAGMENT_NORMAL_EXT 0x834A
16199+#define GL_FRAGMENT_COLOR_EXT 0x834C
16200+#define GL_ATTENUATION_EXT 0x834D
16201+#define GL_SHADOW_ATTENUATION_EXT 0x834E
16202+#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F
16203+#define GL_TEXTURE_LIGHT_EXT 0x8350
16204+#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351
16205+#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352
16206+/* reuse GL_FRAGMENT_DEPTH_EXT */
16207+#endif
16208+
16209+#ifndef GL_SGIX_blend_alpha_minmax
16210+#define GL_ALPHA_MIN_SGIX 0x8320
16211+#define GL_ALPHA_MAX_SGIX 0x8321
16212+#endif
16213+
16214+#ifndef GL_SGIX_impact_pixel_texture
16215+#define GL_PIXEL_TEX_GEN_Q_CEILING_SGIX 0x8184
16216+#define GL_PIXEL_TEX_GEN_Q_ROUND_SGIX 0x8185
16217+#define GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX 0x8186
16218+#define GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX 0x8187
16219+#define GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX 0x8188
16220+#define GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX 0x8189
16221+#define GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX 0x818A
16222+#endif
16223+
16224+#ifndef GL_EXT_bgra
16225+#define GL_BGR_EXT 0x80E0
16226+#define GL_BGRA_EXT 0x80E1
16227+#endif
16228+
16229+#ifndef GL_SGIX_async
16230+#define GL_ASYNC_MARKER_SGIX 0x8329
16231+#endif
16232+
16233+#ifndef GL_SGIX_async_pixel
16234+#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C
16235+#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D
16236+#define GL_ASYNC_READ_PIXELS_SGIX 0x835E
16237+#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F
16238+#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360
16239+#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361
16240+#endif
16241+
16242+#ifndef GL_SGIX_async_histogram
16243+#define GL_ASYNC_HISTOGRAM_SGIX 0x832C
16244+#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D
16245+#endif
16246+
16247+#ifndef GL_INTEL_texture_scissor
16248+#endif
16249+
16250+#ifndef GL_INTEL_parallel_arrays
16251+#define GL_PARALLEL_ARRAYS_INTEL 0x83F4
16252+#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5
16253+#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6
16254+#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7
16255+#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8
16256+#endif
16257+
16258+#ifndef GL_HP_occlusion_test
16259+#define GL_OCCLUSION_TEST_HP 0x8165
16260+#define GL_OCCLUSION_TEST_RESULT_HP 0x8166
16261+#endif
16262+
16263+#ifndef GL_EXT_pixel_transform
16264+#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330
16265+#define GL_PIXEL_MAG_FILTER_EXT 0x8331
16266+#define GL_PIXEL_MIN_FILTER_EXT 0x8332
16267+#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333
16268+#define GL_CUBIC_EXT 0x8334
16269+#define GL_AVERAGE_EXT 0x8335
16270+#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336
16271+#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337
16272+#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338
16273+#endif
16274+
16275+#ifndef GL_EXT_pixel_transform_color_table
16276+#endif
16277+
16278+#ifndef GL_EXT_shared_texture_palette
16279+#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB
16280+#endif
16281+
16282+#ifndef GL_EXT_separate_specular_color
16283+#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8
16284+#define GL_SINGLE_COLOR_EXT 0x81F9
16285+#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA
16286+#endif
16287+
16288+#ifndef GL_EXT_secondary_color
16289+#define GL_COLOR_SUM_EXT 0x8458
16290+#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459
16291+#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A
16292+#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B
16293+#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C
16294+#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D
16295+#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E
16296+#endif
16297+
16298+#ifndef GL_EXT_texture_perturb_normal
16299+#define GL_PERTURB_EXT 0x85AE
16300+#define GL_TEXTURE_NORMAL_EXT 0x85AF
16301+#endif
16302+
16303+#ifndef GL_EXT_multi_draw_arrays
16304+#endif
16305+
16306+#ifndef GL_EXT_fog_coord
16307+#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450
16308+#define GL_FOG_COORDINATE_EXT 0x8451
16309+#define GL_FRAGMENT_DEPTH_EXT 0x8452
16310+#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453
16311+#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454
16312+#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455
16313+#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456
16314+#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457
16315+#endif
16316+
16317+#ifndef GL_REND_screen_coordinates
16318+#define GL_SCREEN_COORDINATES_REND 0x8490
16319+#define GL_INVERTED_SCREEN_W_REND 0x8491
16320+#endif
16321+
16322+#ifndef GL_EXT_coordinate_frame
16323+#define GL_TANGENT_ARRAY_EXT 0x8439
16324+#define GL_BINORMAL_ARRAY_EXT 0x843A
16325+#define GL_CURRENT_TANGENT_EXT 0x843B
16326+#define GL_CURRENT_BINORMAL_EXT 0x843C
16327+#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E
16328+#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F
16329+#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440
16330+#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441
16331+#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442
16332+#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443
16333+#define GL_MAP1_TANGENT_EXT 0x8444
16334+#define GL_MAP2_TANGENT_EXT 0x8445
16335+#define GL_MAP1_BINORMAL_EXT 0x8446
16336+#define GL_MAP2_BINORMAL_EXT 0x8447
16337+#endif
16338+
16339+#ifndef GL_EXT_texture_env_combine
16340+#define GL_COMBINE_EXT 0x8570
16341+#define GL_COMBINE_RGB_EXT 0x8571
16342+#define GL_COMBINE_ALPHA_EXT 0x8572
16343+#define GL_RGB_SCALE_EXT 0x8573
16344+#define GL_ADD_SIGNED_EXT 0x8574
16345+#define GL_INTERPOLATE_EXT 0x8575
16346+#define GL_CONSTANT_EXT 0x8576
16347+#define GL_PRIMARY_COLOR_EXT 0x8577
16348+#define GL_PREVIOUS_EXT 0x8578
16349+#define GL_SOURCE0_RGB_EXT 0x8580
16350+#define GL_SOURCE1_RGB_EXT 0x8581
16351+#define GL_SOURCE2_RGB_EXT 0x8582
16352+#define GL_SOURCE0_ALPHA_EXT 0x8588
16353+#define GL_SOURCE1_ALPHA_EXT 0x8589
16354+#define GL_SOURCE2_ALPHA_EXT 0x858A
16355+#define GL_OPERAND0_RGB_EXT 0x8590
16356+#define GL_OPERAND1_RGB_EXT 0x8591
16357+#define GL_OPERAND2_RGB_EXT 0x8592
16358+#define GL_OPERAND0_ALPHA_EXT 0x8598
16359+#define GL_OPERAND1_ALPHA_EXT 0x8599
16360+#define GL_OPERAND2_ALPHA_EXT 0x859A
16361+#endif
16362+
16363+#ifndef GL_APPLE_specular_vector
16364+#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0
16365+#endif
16366+
16367+#ifndef GL_APPLE_transform_hint
16368+#define GL_TRANSFORM_HINT_APPLE 0x85B1
16369+#endif
16370+
16371+#ifndef GL_SGIX_fog_scale
16372+#define GL_FOG_SCALE_SGIX 0x81FC
16373+#define GL_FOG_SCALE_VALUE_SGIX 0x81FD
16374+#endif
16375+
16376+#ifndef GL_SUNX_constant_data
16377+#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5
16378+#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6
16379+#endif
16380+
16381+#ifndef GL_SUN_global_alpha
16382+#define GL_GLOBAL_ALPHA_SUN 0x81D9
16383+#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA
16384+#endif
16385+
16386+#ifndef GL_SUN_triangle_list
16387+#define GL_RESTART_SUN 0x0001
16388+#define GL_REPLACE_MIDDLE_SUN 0x0002
16389+#define GL_REPLACE_OLDEST_SUN 0x0003
16390+#define GL_TRIANGLE_LIST_SUN 0x81D7
16391+#define GL_REPLACEMENT_CODE_SUN 0x81D8
16392+#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0
16393+#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1
16394+#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2
16395+#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3
16396+#define GL_R1UI_V3F_SUN 0x85C4
16397+#define GL_R1UI_C4UB_V3F_SUN 0x85C5
16398+#define GL_R1UI_C3F_V3F_SUN 0x85C6
16399+#define GL_R1UI_N3F_V3F_SUN 0x85C7
16400+#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8
16401+#define GL_R1UI_T2F_V3F_SUN 0x85C9
16402+#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA
16403+#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB
16404+#endif
16405+
16406+#ifndef GL_SUN_vertex
16407+#endif
16408+
16409+#ifndef GL_EXT_blend_func_separate
16410+#define GL_BLEND_DST_RGB_EXT 0x80C8
16411+#define GL_BLEND_SRC_RGB_EXT 0x80C9
16412+#define GL_BLEND_DST_ALPHA_EXT 0x80CA
16413+#define GL_BLEND_SRC_ALPHA_EXT 0x80CB
16414+#endif
16415+
16416+#ifndef GL_INGR_color_clamp
16417+#define GL_RED_MIN_CLAMP_INGR 0x8560
16418+#define GL_GREEN_MIN_CLAMP_INGR 0x8561
16419+#define GL_BLUE_MIN_CLAMP_INGR 0x8562
16420+#define GL_ALPHA_MIN_CLAMP_INGR 0x8563
16421+#define GL_RED_MAX_CLAMP_INGR 0x8564
16422+#define GL_GREEN_MAX_CLAMP_INGR 0x8565
16423+#define GL_BLUE_MAX_CLAMP_INGR 0x8566
16424+#define GL_ALPHA_MAX_CLAMP_INGR 0x8567
16425+#endif
16426+
16427+#ifndef GL_INGR_interlace_read
16428+#define GL_INTERLACE_READ_INGR 0x8568
16429+#endif
16430+
16431+#ifndef GL_EXT_stencil_wrap
16432+#define GL_INCR_WRAP_EXT 0x8507
16433+#define GL_DECR_WRAP_EXT 0x8508
16434+#endif
16435+
16436+#ifndef GL_EXT_422_pixels
16437+#define GL_422_EXT 0x80CC
16438+#define GL_422_REV_EXT 0x80CD
16439+#define GL_422_AVERAGE_EXT 0x80CE
16440+#define GL_422_REV_AVERAGE_EXT 0x80CF
16441+#endif
16442+
16443+#ifndef GL_NV_texgen_reflection
16444+#define GL_NORMAL_MAP_NV 0x8511
16445+#define GL_REFLECTION_MAP_NV 0x8512
16446+#endif
16447+
16448+#ifndef GL_EXT_texture_cube_map
16449+#define GL_NORMAL_MAP_EXT 0x8511
16450+#define GL_REFLECTION_MAP_EXT 0x8512
16451+#define GL_TEXTURE_CUBE_MAP_EXT 0x8513
16452+#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514
16453+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515
16454+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516
16455+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517
16456+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518
16457+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519
16458+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A
16459+#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B
16460+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C
16461+#endif
16462+
16463+#ifndef GL_SUN_convolution_border_modes
16464+#define GL_WRAP_BORDER_SUN 0x81D4
16465+#endif
16466+
16467+#ifndef GL_EXT_texture_env_add
16468+#endif
16469+
16470+#ifndef GL_EXT_texture_lod_bias
16471+#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD
16472+#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500
16473+#define GL_TEXTURE_LOD_BIAS_EXT 0x8501
16474+#endif
16475+
16476+#ifndef GL_EXT_texture_filter_anisotropic
16477+#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
16478+#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
16479+#endif
16480+
16481+#ifndef GL_EXT_vertex_weighting
16482+#define GL_MODELVIEW0_STACK_DEPTH_EXT GL_MODELVIEW_STACK_DEPTH
16483+#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502
16484+#define GL_MODELVIEW0_MATRIX_EXT GL_MODELVIEW_MATRIX
16485+#define GL_MODELVIEW1_MATRIX_EXT 0x8506
16486+#define GL_VERTEX_WEIGHTING_EXT 0x8509
16487+#define GL_MODELVIEW0_EXT GL_MODELVIEW
16488+#define GL_MODELVIEW1_EXT 0x850A
16489+#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B
16490+#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C
16491+#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D
16492+#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E
16493+#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F
16494+#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510
16495+#endif
16496+
16497+#ifndef GL_NV_light_max_exponent
16498+#define GL_MAX_SHININESS_NV 0x8504
16499+#define GL_MAX_SPOT_EXPONENT_NV 0x8505
16500+#endif
16501+
16502+#ifndef GL_NV_vertex_array_range
16503+#define GL_VERTEX_ARRAY_RANGE_NV 0x851D
16504+#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E
16505+#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F
16506+#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520
16507+#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521
16508+#endif
16509+
16510+#ifndef GL_NV_register_combiners
16511+#define GL_REGISTER_COMBINERS_NV 0x8522
16512+#define GL_VARIABLE_A_NV 0x8523
16513+#define GL_VARIABLE_B_NV 0x8524
16514+#define GL_VARIABLE_C_NV 0x8525
16515+#define GL_VARIABLE_D_NV 0x8526
16516+#define GL_VARIABLE_E_NV 0x8527
16517+#define GL_VARIABLE_F_NV 0x8528
16518+#define GL_VARIABLE_G_NV 0x8529
16519+#define GL_CONSTANT_COLOR0_NV 0x852A
16520+#define GL_CONSTANT_COLOR1_NV 0x852B
16521+#define GL_PRIMARY_COLOR_NV 0x852C
16522+#define GL_SECONDARY_COLOR_NV 0x852D
16523+#define GL_SPARE0_NV 0x852E
16524+#define GL_SPARE1_NV 0x852F
16525+#define GL_DISCARD_NV 0x8530
16526+#define GL_E_TIMES_F_NV 0x8531
16527+#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532
16528+#define GL_UNSIGNED_IDENTITY_NV 0x8536
16529+#define GL_UNSIGNED_INVERT_NV 0x8537
16530+#define GL_EXPAND_NORMAL_NV 0x8538
16531+#define GL_EXPAND_NEGATE_NV 0x8539
16532+#define GL_HALF_BIAS_NORMAL_NV 0x853A
16533+#define GL_HALF_BIAS_NEGATE_NV 0x853B
16534+#define GL_SIGNED_IDENTITY_NV 0x853C
16535+#define GL_SIGNED_NEGATE_NV 0x853D
16536+#define GL_SCALE_BY_TWO_NV 0x853E
16537+#define GL_SCALE_BY_FOUR_NV 0x853F
16538+#define GL_SCALE_BY_ONE_HALF_NV 0x8540
16539+#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541
16540+#define GL_COMBINER_INPUT_NV 0x8542
16541+#define GL_COMBINER_MAPPING_NV 0x8543
16542+#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544
16543+#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545
16544+#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546
16545+#define GL_COMBINER_MUX_SUM_NV 0x8547
16546+#define GL_COMBINER_SCALE_NV 0x8548
16547+#define GL_COMBINER_BIAS_NV 0x8549
16548+#define GL_COMBINER_AB_OUTPUT_NV 0x854A
16549+#define GL_COMBINER_CD_OUTPUT_NV 0x854B
16550+#define GL_COMBINER_SUM_OUTPUT_NV 0x854C
16551+#define GL_MAX_GENERAL_COMBINERS_NV 0x854D
16552+#define GL_NUM_GENERAL_COMBINERS_NV 0x854E
16553+#define GL_COLOR_SUM_CLAMP_NV 0x854F
16554+#define GL_COMBINER0_NV 0x8550
16555+#define GL_COMBINER1_NV 0x8551
16556+#define GL_COMBINER2_NV 0x8552
16557+#define GL_COMBINER3_NV 0x8553
16558+#define GL_COMBINER4_NV 0x8554
16559+#define GL_COMBINER5_NV 0x8555
16560+#define GL_COMBINER6_NV 0x8556
16561+#define GL_COMBINER7_NV 0x8557
16562+/* reuse GL_TEXTURE0_ARB */
16563+/* reuse GL_TEXTURE1_ARB */
16564+/* reuse GL_ZERO */
16565+/* reuse GL_NONE */
16566+/* reuse GL_FOG */
16567+#endif
16568+
16569+#ifndef GL_NV_fog_distance
16570+#define GL_FOG_DISTANCE_MODE_NV 0x855A
16571+#define GL_EYE_RADIAL_NV 0x855B
16572+#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C
16573+/* reuse GL_EYE_PLANE */
16574+#endif
16575+
16576+#ifndef GL_NV_texgen_emboss
16577+#define GL_EMBOSS_LIGHT_NV 0x855D
16578+#define GL_EMBOSS_CONSTANT_NV 0x855E
16579+#define GL_EMBOSS_MAP_NV 0x855F
16580+#endif
16581+
16582+#ifndef GL_NV_blend_square
16583+#endif
16584+
16585+#ifndef GL_NV_texture_env_combine4
16586+#define GL_COMBINE4_NV 0x8503
16587+#define GL_SOURCE3_RGB_NV 0x8583
16588+#define GL_SOURCE3_ALPHA_NV 0x858B
16589+#define GL_OPERAND3_RGB_NV 0x8593
16590+#define GL_OPERAND3_ALPHA_NV 0x859B
16591+#endif
16592+
16593+#ifndef GL_MESA_resize_buffers
16594+#endif
16595+
16596+#ifndef GL_MESA_window_pos
16597+#endif
16598+
16599+#ifndef GL_EXT_texture_compression_s3tc
16600+#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
16601+#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
16602+#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
16603+#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
16604+#endif
16605+
16606+#ifndef GL_IBM_cull_vertex
16607+#define GL_CULL_VERTEX_IBM 103050
16608+#endif
16609+
16610+#ifndef GL_IBM_multimode_draw_arrays
16611+#endif
16612+
16613+#ifndef GL_IBM_vertex_array_lists
16614+#define GL_VERTEX_ARRAY_LIST_IBM 103070
16615+#define GL_NORMAL_ARRAY_LIST_IBM 103071
16616+#define GL_COLOR_ARRAY_LIST_IBM 103072
16617+#define GL_INDEX_ARRAY_LIST_IBM 103073
16618+#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074
16619+#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075
16620+#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076
16621+#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077
16622+#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080
16623+#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081
16624+#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082
16625+#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083
16626+#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084
16627+#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085
16628+#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086
16629+#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087
16630+#endif
16631+
16632+#ifndef GL_SGIX_subsample
16633+#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0
16634+#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1
16635+#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2
16636+#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3
16637+#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4
16638+#endif
16639+
16640+#ifndef GL_SGIX_ycrcb_subsample
16641+#endif
16642+
16643+#ifndef GL_SGIX_ycrcba
16644+#define GL_YCRCB_SGIX 0x8318
16645+#define GL_YCRCBA_SGIX 0x8319
16646+#endif
16647+
16648+#ifndef GL_SGI_depth_pass_instrument
16649+#define GL_DEPTH_PASS_INSTRUMENT_SGIX 0x8310
16650+#define GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX 0x8311
16651+#define GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX 0x8312
16652+#endif
16653+
16654+#ifndef GL_3DFX_texture_compression_FXT1
16655+#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0
16656+#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1
16657+#endif
16658+
16659+#ifndef GL_3DFX_multisample
16660+#define GL_MULTISAMPLE_3DFX 0x86B2
16661+#define GL_SAMPLE_BUFFERS_3DFX 0x86B3
16662+#define GL_SAMPLES_3DFX 0x86B4
16663+#define GL_MULTISAMPLE_BIT_3DFX 0x20000000
16664+#endif
16665+
16666+#ifndef GL_3DFX_tbuffer
16667+#endif
16668+
16669+#ifndef GL_EXT_multisample
16670+#define GL_MULTISAMPLE_EXT 0x809D
16671+#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E
16672+#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F
16673+#define GL_SAMPLE_MASK_EXT 0x80A0
16674+#define GL_1PASS_EXT 0x80A1
16675+#define GL_2PASS_0_EXT 0x80A2
16676+#define GL_2PASS_1_EXT 0x80A3
16677+#define GL_4PASS_0_EXT 0x80A4
16678+#define GL_4PASS_1_EXT 0x80A5
16679+#define GL_4PASS_2_EXT 0x80A6
16680+#define GL_4PASS_3_EXT 0x80A7
16681+#define GL_SAMPLE_BUFFERS_EXT 0x80A8
16682+#define GL_SAMPLES_EXT 0x80A9
16683+#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA
16684+#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB
16685+#define GL_SAMPLE_PATTERN_EXT 0x80AC
16686+#define GL_MULTISAMPLE_BIT_EXT 0x20000000
16687+#endif
16688+
16689+#ifndef GL_SGIX_vertex_preclip
16690+#define GL_VERTEX_PRECLIP_SGIX 0x83EE
16691+#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF
16692+#endif
16693+
16694+#ifndef GL_SGIX_convolution_accuracy
16695+#define GL_CONVOLUTION_HINT_SGIX 0x8316
16696+#endif
16697+
16698+#ifndef GL_SGIX_resample
16699+#define GL_PACK_RESAMPLE_SGIX 0x842C
16700+#define GL_UNPACK_RESAMPLE_SGIX 0x842D
16701+#define GL_RESAMPLE_REPLICATE_SGIX 0x842E
16702+#define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F
16703+#define GL_RESAMPLE_DECIMATE_SGIX 0x8430
16704+#endif
16705+
16706+#ifndef GL_SGIS_point_line_texgen
16707+#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0
16708+#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1
16709+#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2
16710+#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3
16711+#define GL_EYE_POINT_SGIS 0x81F4
16712+#define GL_OBJECT_POINT_SGIS 0x81F5
16713+#define GL_EYE_LINE_SGIS 0x81F6
16714+#define GL_OBJECT_LINE_SGIS 0x81F7
16715+#endif
16716+
16717+#ifndef GL_SGIS_texture_color_mask
16718+#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF
16719+#endif
16720+
16721+#ifndef GL_EXT_texture_env_dot3
16722+#define GL_DOT3_RGB_EXT 0x8740
16723+#define GL_DOT3_RGBA_EXT 0x8741
16724+#endif
16725+
16726+#ifndef GL_ATI_texture_mirror_once
16727+#define GL_MIRROR_CLAMP_ATI 0x8742
16728+#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743
16729+#endif
16730+
16731+#ifndef GL_NV_fence
16732+#define GL_ALL_COMPLETED_NV 0x84F2
16733+#define GL_FENCE_STATUS_NV 0x84F3
16734+#define GL_FENCE_CONDITION_NV 0x84F4
16735+#endif
16736+
16737+#ifndef GL_IBM_texture_mirrored_repeat
16738+#define GL_MIRRORED_REPEAT_IBM 0x8370
16739+#endif
16740+
16741+#ifndef GL_NV_evaluators
16742+#define GL_EVAL_2D_NV 0x86C0
16743+#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1
16744+#define GL_MAP_TESSELLATION_NV 0x86C2
16745+#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3
16746+#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4
16747+#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5
16748+#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6
16749+#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7
16750+#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8
16751+#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9
16752+#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA
16753+#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB
16754+#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC
16755+#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD
16756+#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE
16757+#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF
16758+#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0
16759+#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1
16760+#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2
16761+#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3
16762+#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4
16763+#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5
16764+#define GL_MAX_MAP_TESSELLATION_NV 0x86D6
16765+#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7
16766+#endif
16767+
16768+#ifndef GL_NV_packed_depth_stencil
16769+#define GL_DEPTH_STENCIL_NV 0x84F9
16770+#define GL_UNSIGNED_INT_24_8_NV 0x84FA
16771+#endif
16772+
16773+#ifndef GL_NV_register_combiners2
16774+#define GL_PER_STAGE_CONSTANTS_NV 0x8535
16775+#endif
16776+
16777+#ifndef GL_NV_texture_compression_vtc
16778+#endif
16779+
16780+#ifndef GL_NV_texture_rectangle
16781+#define GL_TEXTURE_RECTANGLE_NV 0x84F5
16782+#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6
16783+#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7
16784+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8
16785+#endif
16786+
16787+#ifndef GL_NV_texture_shader
16788+#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C
16789+#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D
16790+#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E
16791+#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9
16792+#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA
16793+#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB
16794+#define GL_DSDT_MAG_INTENSITY_NV 0x86DC
16795+#define GL_SHADER_CONSISTENT_NV 0x86DD
16796+#define GL_TEXTURE_SHADER_NV 0x86DE
16797+#define GL_SHADER_OPERATION_NV 0x86DF
16798+#define GL_CULL_MODES_NV 0x86E0
16799+#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1
16800+#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2
16801+#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3
16802+#define GL_OFFSET_TEXTURE_2D_MATRIX_NV GL_OFFSET_TEXTURE_MATRIX_NV
16803+#define GL_OFFSET_TEXTURE_2D_SCALE_NV GL_OFFSET_TEXTURE_SCALE_NV
16804+#define GL_OFFSET_TEXTURE_2D_BIAS_NV GL_OFFSET_TEXTURE_BIAS_NV
16805+#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4
16806+#define GL_CONST_EYE_NV 0x86E5
16807+#define GL_PASS_THROUGH_NV 0x86E6
16808+#define GL_CULL_FRAGMENT_NV 0x86E7
16809+#define GL_OFFSET_TEXTURE_2D_NV 0x86E8
16810+#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9
16811+#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA
16812+#define GL_DOT_PRODUCT_NV 0x86EC
16813+#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED
16814+#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE
16815+#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0
16816+#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1
16817+#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2
16818+#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3
16819+#define GL_HILO_NV 0x86F4
16820+#define GL_DSDT_NV 0x86F5
16821+#define GL_DSDT_MAG_NV 0x86F6
16822+#define GL_DSDT_MAG_VIB_NV 0x86F7
16823+#define GL_HILO16_NV 0x86F8
16824+#define GL_SIGNED_HILO_NV 0x86F9
16825+#define GL_SIGNED_HILO16_NV 0x86FA
16826+#define GL_SIGNED_RGBA_NV 0x86FB
16827+#define GL_SIGNED_RGBA8_NV 0x86FC
16828+#define GL_SIGNED_RGB_NV 0x86FE
16829+#define GL_SIGNED_RGB8_NV 0x86FF
16830+#define GL_SIGNED_LUMINANCE_NV 0x8701
16831+#define GL_SIGNED_LUMINANCE8_NV 0x8702
16832+#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703
16833+#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704
16834+#define GL_SIGNED_ALPHA_NV 0x8705
16835+#define GL_SIGNED_ALPHA8_NV 0x8706
16836+#define GL_SIGNED_INTENSITY_NV 0x8707
16837+#define GL_SIGNED_INTENSITY8_NV 0x8708
16838+#define GL_DSDT8_NV 0x8709
16839+#define GL_DSDT8_MAG8_NV 0x870A
16840+#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B
16841+#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C
16842+#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D
16843+#define GL_HI_SCALE_NV 0x870E
16844+#define GL_LO_SCALE_NV 0x870F
16845+#define GL_DS_SCALE_NV 0x8710
16846+#define GL_DT_SCALE_NV 0x8711
16847+#define GL_MAGNITUDE_SCALE_NV 0x8712
16848+#define GL_VIBRANCE_SCALE_NV 0x8713
16849+#define GL_HI_BIAS_NV 0x8714
16850+#define GL_LO_BIAS_NV 0x8715
16851+#define GL_DS_BIAS_NV 0x8716
16852+#define GL_DT_BIAS_NV 0x8717
16853+#define GL_MAGNITUDE_BIAS_NV 0x8718
16854+#define GL_VIBRANCE_BIAS_NV 0x8719
16855+#define GL_TEXTURE_BORDER_VALUES_NV 0x871A
16856+#define GL_TEXTURE_HI_SIZE_NV 0x871B
16857+#define GL_TEXTURE_LO_SIZE_NV 0x871C
16858+#define GL_TEXTURE_DS_SIZE_NV 0x871D
16859+#define GL_TEXTURE_DT_SIZE_NV 0x871E
16860+#define GL_TEXTURE_MAG_SIZE_NV 0x871F
16861+#endif
16862+
16863+#ifndef GL_NV_texture_shader2
16864+#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF
16865+#endif
16866+
16867+#ifndef GL_NV_vertex_array_range2
16868+#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533
16869+#endif
16870+
16871+#ifndef GL_NV_vertex_program
16872+#define GL_VERTEX_PROGRAM_NV 0x8620
16873+#define GL_VERTEX_STATE_PROGRAM_NV 0x8621
16874+#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623
16875+#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624
16876+#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625
16877+#define GL_CURRENT_ATTRIB_NV 0x8626
16878+#define GL_PROGRAM_LENGTH_NV 0x8627
16879+#define GL_PROGRAM_STRING_NV 0x8628
16880+#define GL_MODELVIEW_PROJECTION_NV 0x8629
16881+#define GL_IDENTITY_NV 0x862A
16882+#define GL_INVERSE_NV 0x862B
16883+#define GL_TRANSPOSE_NV 0x862C
16884+#define GL_INVERSE_TRANSPOSE_NV 0x862D
16885+#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E
16886+#define GL_MAX_TRACK_MATRICES_NV 0x862F
16887+#define GL_MATRIX0_NV 0x8630
16888+#define GL_MATRIX1_NV 0x8631
16889+#define GL_MATRIX2_NV 0x8632
16890+#define GL_MATRIX3_NV 0x8633
16891+#define GL_MATRIX4_NV 0x8634
16892+#define GL_MATRIX5_NV 0x8635
16893+#define GL_MATRIX6_NV 0x8636
16894+#define GL_MATRIX7_NV 0x8637
16895+#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640
16896+#define GL_CURRENT_MATRIX_NV 0x8641
16897+#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642
16898+#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643
16899+#define GL_PROGRAM_PARAMETER_NV 0x8644
16900+#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645
16901+#define GL_PROGRAM_TARGET_NV 0x8646
16902+#define GL_PROGRAM_RESIDENT_NV 0x8647
16903+#define GL_TRACK_MATRIX_NV 0x8648
16904+#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649
16905+#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A
16906+#define GL_PROGRAM_ERROR_POSITION_NV 0x864B
16907+#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650
16908+#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651
16909+#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652
16910+#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653
16911+#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654
16912+#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655
16913+#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656
16914+#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657
16915+#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658
16916+#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659
16917+#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A
16918+#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B
16919+#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C
16920+#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D
16921+#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E
16922+#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F
16923+#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660
16924+#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661
16925+#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662
16926+#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663
16927+#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664
16928+#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665
16929+#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666
16930+#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667
16931+#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668
16932+#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669
16933+#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A
16934+#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B
16935+#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C
16936+#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D
16937+#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E
16938+#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F
16939+#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670
16940+#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671
16941+#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672
16942+#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673
16943+#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674
16944+#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675
16945+#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676
16946+#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677
16947+#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678
16948+#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679
16949+#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A
16950+#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B
16951+#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C
16952+#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D
16953+#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E
16954+#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F
16955+#endif
16956+
16957+#ifndef GL_SGIX_texture_coordinate_clamp
16958+#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369
16959+#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A
16960+#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B
16961+#endif
16962+
16963+#ifndef GL_SGIX_scalebias_hint
16964+#define GL_SCALEBIAS_HINT_SGIX 0x8322
16965+#endif
16966+
16967+#ifndef GL_OML_interlace
16968+#define GL_INTERLACE_OML 0x8980
16969+#define GL_INTERLACE_READ_OML 0x8981
16970+#endif
16971+
16972+#ifndef GL_OML_subsample
16973+#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982
16974+#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983
16975+#endif
16976+
16977+#ifndef GL_OML_resample
16978+#define GL_PACK_RESAMPLE_OML 0x8984
16979+#define GL_UNPACK_RESAMPLE_OML 0x8985
16980+#define GL_RESAMPLE_REPLICATE_OML 0x8986
16981+#define GL_RESAMPLE_ZERO_FILL_OML 0x8987
16982+#define GL_RESAMPLE_AVERAGE_OML 0x8988
16983+#define GL_RESAMPLE_DECIMATE_OML 0x8989
16984+#endif
16985+
16986+#ifndef GL_NV_copy_depth_to_color
16987+#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E
16988+#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F
16989+#endif
16990+
16991+#ifndef GL_ATI_envmap_bumpmap
16992+#define GL_BUMP_ROT_MATRIX_ATI 0x8775
16993+#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776
16994+#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777
16995+#define GL_BUMP_TEX_UNITS_ATI 0x8778
16996+#define GL_DUDV_ATI 0x8779
16997+#define GL_DU8DV8_ATI 0x877A
16998+#define GL_BUMP_ENVMAP_ATI 0x877B
16999+#define GL_BUMP_TARGET_ATI 0x877C
17000+#endif
17001+
17002+#ifndef GL_ATI_fragment_shader
17003+#define GL_FRAGMENT_SHADER_ATI 0x8920
17004+#define GL_REG_0_ATI 0x8921
17005+#define GL_REG_1_ATI 0x8922
17006+#define GL_REG_2_ATI 0x8923
17007+#define GL_REG_3_ATI 0x8924
17008+#define GL_REG_4_ATI 0x8925
17009+#define GL_REG_5_ATI 0x8926
17010+#define GL_REG_6_ATI 0x8927
17011+#define GL_REG_7_ATI 0x8928
17012+#define GL_REG_8_ATI 0x8929
17013+#define GL_REG_9_ATI 0x892A
17014+#define GL_REG_10_ATI 0x892B
17015+#define GL_REG_11_ATI 0x892C
17016+#define GL_REG_12_ATI 0x892D
17017+#define GL_REG_13_ATI 0x892E
17018+#define GL_REG_14_ATI 0x892F
17019+#define GL_REG_15_ATI 0x8930
17020+#define GL_REG_16_ATI 0x8931
17021+#define GL_REG_17_ATI 0x8932
17022+#define GL_REG_18_ATI 0x8933
17023+#define GL_REG_19_ATI 0x8934
17024+#define GL_REG_20_ATI 0x8935
17025+#define GL_REG_21_ATI 0x8936
17026+#define GL_REG_22_ATI 0x8937
17027+#define GL_REG_23_ATI 0x8938
17028+#define GL_REG_24_ATI 0x8939
17029+#define GL_REG_25_ATI 0x893A
17030+#define GL_REG_26_ATI 0x893B
17031+#define GL_REG_27_ATI 0x893C
17032+#define GL_REG_28_ATI 0x893D
17033+#define GL_REG_29_ATI 0x893E
17034+#define GL_REG_30_ATI 0x893F
17035+#define GL_REG_31_ATI 0x8940
17036+#define GL_CON_0_ATI 0x8941
17037+#define GL_CON_1_ATI 0x8942
17038+#define GL_CON_2_ATI 0x8943
17039+#define GL_CON_3_ATI 0x8944
17040+#define GL_CON_4_ATI 0x8945
17041+#define GL_CON_5_ATI 0x8946
17042+#define GL_CON_6_ATI 0x8947
17043+#define GL_CON_7_ATI 0x8948
17044+#define GL_CON_8_ATI 0x8949
17045+#define GL_CON_9_ATI 0x894A
17046+#define GL_CON_10_ATI 0x894B
17047+#define GL_CON_11_ATI 0x894C
17048+#define GL_CON_12_ATI 0x894D
17049+#define GL_CON_13_ATI 0x894E
17050+#define GL_CON_14_ATI 0x894F
17051+#define GL_CON_15_ATI 0x8950
17052+#define GL_CON_16_ATI 0x8951
17053+#define GL_CON_17_ATI 0x8952
17054+#define GL_CON_18_ATI 0x8953
17055+#define GL_CON_19_ATI 0x8954
17056+#define GL_CON_20_ATI 0x8955
17057+#define GL_CON_21_ATI 0x8956
17058+#define GL_CON_22_ATI 0x8957
17059+#define GL_CON_23_ATI 0x8958
17060+#define GL_CON_24_ATI 0x8959
17061+#define GL_CON_25_ATI 0x895A
17062+#define GL_CON_26_ATI 0x895B
17063+#define GL_CON_27_ATI 0x895C
17064+#define GL_CON_28_ATI 0x895D
17065+#define GL_CON_29_ATI 0x895E
17066+#define GL_CON_30_ATI 0x895F
17067+#define GL_CON_31_ATI 0x8960
17068+#define GL_MOV_ATI 0x8961
17069+#define GL_ADD_ATI 0x8963
17070+#define GL_MUL_ATI 0x8964
17071+#define GL_SUB_ATI 0x8965
17072+#define GL_DOT3_ATI 0x8966
17073+#define GL_DOT4_ATI 0x8967
17074+#define GL_MAD_ATI 0x8968
17075+#define GL_LERP_ATI 0x8969
17076+#define GL_CND_ATI 0x896A
17077+#define GL_CND0_ATI 0x896B
17078+#define GL_DOT2_ADD_ATI 0x896C
17079+#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D
17080+#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E
17081+#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F
17082+#define GL_NUM_PASSES_ATI 0x8970
17083+#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971
17084+#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972
17085+#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973
17086+#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974
17087+#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975
17088+#define GL_SWIZZLE_STR_ATI 0x8976
17089+#define GL_SWIZZLE_STQ_ATI 0x8977
17090+#define GL_SWIZZLE_STR_DR_ATI 0x8978
17091+#define GL_SWIZZLE_STQ_DQ_ATI 0x8979
17092+#define GL_SWIZZLE_STRQ_ATI 0x897A
17093+#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B
17094+#define GL_RED_BIT_ATI 0x00000001
17095+#define GL_GREEN_BIT_ATI 0x00000002
17096+#define GL_BLUE_BIT_ATI 0x00000004
17097+#define GL_2X_BIT_ATI 0x00000001
17098+#define GL_4X_BIT_ATI 0x00000002
17099+#define GL_8X_BIT_ATI 0x00000004
17100+#define GL_HALF_BIT_ATI 0x00000008
17101+#define GL_QUARTER_BIT_ATI 0x00000010
17102+#define GL_EIGHTH_BIT_ATI 0x00000020
17103+#define GL_SATURATE_BIT_ATI 0x00000040
17104+#define GL_COMP_BIT_ATI 0x00000002
17105+#define GL_NEGATE_BIT_ATI 0x00000004
17106+#define GL_BIAS_BIT_ATI 0x00000008
17107+#endif
17108+
17109+#ifndef GL_ATI_pn_triangles
17110+#define GL_PN_TRIANGLES_ATI 0x87F0
17111+#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1
17112+#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2
17113+#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3
17114+#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4
17115+#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5
17116+#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6
17117+#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7
17118+#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8
17119+#endif
17120+
17121+#ifndef GL_ATI_vertex_array_object
17122+#define GL_STATIC_ATI 0x8760
17123+#define GL_DYNAMIC_ATI 0x8761
17124+#define GL_PRESERVE_ATI 0x8762
17125+#define GL_DISCARD_ATI 0x8763
17126+#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764
17127+#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765
17128+#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766
17129+#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767
17130+#endif
17131+
17132+#ifndef GL_EXT_vertex_shader
17133+#define GL_VERTEX_SHADER_EXT 0x8780
17134+#define GL_VERTEX_SHADER_BINDING_EXT 0x8781
17135+#define GL_OP_INDEX_EXT 0x8782
17136+#define GL_OP_NEGATE_EXT 0x8783
17137+#define GL_OP_DOT3_EXT 0x8784
17138+#define GL_OP_DOT4_EXT 0x8785
17139+#define GL_OP_MUL_EXT 0x8786
17140+#define GL_OP_ADD_EXT 0x8787
17141+#define GL_OP_MADD_EXT 0x8788
17142+#define GL_OP_FRAC_EXT 0x8789
17143+#define GL_OP_MAX_EXT 0x878A
17144+#define GL_OP_MIN_EXT 0x878B
17145+#define GL_OP_SET_GE_EXT 0x878C
17146+#define GL_OP_SET_LT_EXT 0x878D
17147+#define GL_OP_CLAMP_EXT 0x878E
17148+#define GL_OP_FLOOR_EXT 0x878F
17149+#define GL_OP_ROUND_EXT 0x8790
17150+#define GL_OP_EXP_BASE_2_EXT 0x8791
17151+#define GL_OP_LOG_BASE_2_EXT 0x8792
17152+#define GL_OP_POWER_EXT 0x8793
17153+#define GL_OP_RECIP_EXT 0x8794
17154+#define GL_OP_RECIP_SQRT_EXT 0x8795
17155+#define GL_OP_SUB_EXT 0x8796
17156+#define GL_OP_CROSS_PRODUCT_EXT 0x8797
17157+#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798
17158+#define GL_OP_MOV_EXT 0x8799
17159+#define GL_OUTPUT_VERTEX_EXT 0x879A
17160+#define GL_OUTPUT_COLOR0_EXT 0x879B
17161+#define GL_OUTPUT_COLOR1_EXT 0x879C
17162+#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D
17163+#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E
17164+#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F
17165+#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0
17166+#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1
17167+#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2
17168+#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3
17169+#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4
17170+#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5
17171+#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6
17172+#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7
17173+#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8
17174+#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9
17175+#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA
17176+#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB
17177+#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC
17178+#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD
17179+#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE
17180+#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF
17181+#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0
17182+#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1
17183+#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2
17184+#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3
17185+#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4
17186+#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5
17187+#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6
17188+#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7
17189+#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8
17190+#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9
17191+#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA
17192+#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB
17193+#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC
17194+#define GL_OUTPUT_FOG_EXT 0x87BD
17195+#define GL_SCALAR_EXT 0x87BE
17196+#define GL_VECTOR_EXT 0x87BF
17197+#define GL_MATRIX_EXT 0x87C0
17198+#define GL_VARIANT_EXT 0x87C1
17199+#define GL_INVARIANT_EXT 0x87C2
17200+#define GL_LOCAL_CONSTANT_EXT 0x87C3
17201+#define GL_LOCAL_EXT 0x87C4
17202+#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5
17203+#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6
17204+#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7
17205+#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8
17206+#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9
17207+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA
17208+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB
17209+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC
17210+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD
17211+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE
17212+#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF
17213+#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0
17214+#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1
17215+#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2
17216+#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3
17217+#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4
17218+#define GL_X_EXT 0x87D5
17219+#define GL_Y_EXT 0x87D6
17220+#define GL_Z_EXT 0x87D7
17221+#define GL_W_EXT 0x87D8
17222+#define GL_NEGATIVE_X_EXT 0x87D9
17223+#define GL_NEGATIVE_Y_EXT 0x87DA
17224+#define GL_NEGATIVE_Z_EXT 0x87DB
17225+#define GL_NEGATIVE_W_EXT 0x87DC
17226+#define GL_ZERO_EXT 0x87DD
17227+#define GL_ONE_EXT 0x87DE
17228+#define GL_NEGATIVE_ONE_EXT 0x87DF
17229+#define GL_NORMALIZED_RANGE_EXT 0x87E0
17230+#define GL_FULL_RANGE_EXT 0x87E1
17231+#define GL_CURRENT_VERTEX_EXT 0x87E2
17232+#define GL_MVP_MATRIX_EXT 0x87E3
17233+#define GL_VARIANT_VALUE_EXT 0x87E4
17234+#define GL_VARIANT_DATATYPE_EXT 0x87E5
17235+#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6
17236+#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7
17237+#define GL_VARIANT_ARRAY_EXT 0x87E8
17238+#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9
17239+#define GL_INVARIANT_VALUE_EXT 0x87EA
17240+#define GL_INVARIANT_DATATYPE_EXT 0x87EB
17241+#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC
17242+#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED
17243+#endif
17244+
17245+#ifndef GL_ATI_vertex_streams
17246+#define GL_MAX_VERTEX_STREAMS_ATI 0x876B
17247+#define GL_VERTEX_STREAM0_ATI 0x876C
17248+#define GL_VERTEX_STREAM1_ATI 0x876D
17249+#define GL_VERTEX_STREAM2_ATI 0x876E
17250+#define GL_VERTEX_STREAM3_ATI 0x876F
17251+#define GL_VERTEX_STREAM4_ATI 0x8770
17252+#define GL_VERTEX_STREAM5_ATI 0x8771
17253+#define GL_VERTEX_STREAM6_ATI 0x8772
17254+#define GL_VERTEX_STREAM7_ATI 0x8773
17255+#define GL_VERTEX_SOURCE_ATI 0x8774
17256+#endif
17257+
17258+#ifndef GL_ATI_element_array
17259+#define GL_ELEMENT_ARRAY_ATI 0x8768
17260+#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769
17261+#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A
17262+#endif
17263+
17264+#ifndef GL_SUN_mesh_array
17265+#define GL_QUAD_MESH_SUN 0x8614
17266+#define GL_TRIANGLE_MESH_SUN 0x8615
17267+#endif
17268+
17269+#ifndef GL_SUN_slice_accum
17270+#define GL_SLICE_ACCUM_SUN 0x85CC
17271+#endif
17272+
17273+#ifndef GL_NV_multisample_filter_hint
17274+#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534
17275+#endif
17276+
17277+#ifndef GL_NV_depth_clamp
17278+#define GL_DEPTH_CLAMP_NV 0x864F
17279+#endif
17280+
17281+#ifndef GL_NV_occlusion_query
17282+#define GL_PIXEL_COUNTER_BITS_NV 0x8864
17283+#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865
17284+#define GL_PIXEL_COUNT_NV 0x8866
17285+#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867
17286+#endif
17287+
17288+#ifndef GL_NV_point_sprite
17289+#define GL_POINT_SPRITE_NV 0x8861
17290+#define GL_COORD_REPLACE_NV 0x8862
17291+#define GL_POINT_SPRITE_R_MODE_NV 0x8863
17292+#endif
17293+
17294+#ifndef GL_NV_texture_shader3
17295+#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850
17296+#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851
17297+#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852
17298+#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853
17299+#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854
17300+#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855
17301+#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856
17302+#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857
17303+#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858
17304+#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859
17305+#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A
17306+#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B
17307+#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C
17308+#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D
17309+#define GL_HILO8_NV 0x885E
17310+#define GL_SIGNED_HILO8_NV 0x885F
17311+#define GL_FORCE_BLUE_TO_ONE_NV 0x8860
17312+#endif
17313+
17314+#ifndef GL_NV_vertex_program1_1
17315+#endif
17316+
17317+#ifndef GL_EXT_shadow_funcs
17318+#endif
17319+
17320+#ifndef GL_EXT_stencil_two_side
17321+#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910
17322+#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911
17323+#endif
17324+
17325+#ifndef GL_ATI_text_fragment_shader
17326+#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200
17327+#endif
17328+
17329+#ifndef GL_APPLE_client_storage
17330+#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2
17331+#endif
17332+
17333+#ifndef GL_APPLE_element_array
17334+#define GL_ELEMENT_ARRAY_APPLE 0x8768
17335+#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8769
17336+#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x876A
17337+#endif
17338+
17339+#ifndef GL_APPLE_fence
17340+#define GL_DRAW_PIXELS_APPLE 0x8A0A
17341+#define GL_FENCE_APPLE 0x8A0B
17342+#endif
17343+
17344+#ifndef GL_APPLE_vertex_array_object
17345+#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5
17346+#endif
17347+
17348+#ifndef GL_APPLE_vertex_array_range
17349+#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D
17350+#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E
17351+#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F
17352+#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521
17353+#define GL_STORAGE_CACHED_APPLE 0x85BE
17354+#define GL_STORAGE_SHARED_APPLE 0x85BF
17355+#endif
17356+
17357+#ifndef GL_APPLE_ycbcr_422
17358+#define GL_YCBCR_422_APPLE 0x85B9
17359+#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
17360+#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
17361+#endif
17362+
17363+#ifndef GL_S3_s3tc
17364+#define GL_RGB_S3TC 0x83A0
17365+#define GL_RGB4_S3TC 0x83A1
17366+#define GL_RGBA_S3TC 0x83A2
17367+#define GL_RGBA4_S3TC 0x83A3
17368+#endif
17369+
17370+#ifndef GL_ATI_draw_buffers
17371+#define GL_MAX_DRAW_BUFFERS_ATI 0x8824
17372+#define GL_DRAW_BUFFER0_ATI 0x8825
17373+#define GL_DRAW_BUFFER1_ATI 0x8826
17374+#define GL_DRAW_BUFFER2_ATI 0x8827
17375+#define GL_DRAW_BUFFER3_ATI 0x8828
17376+#define GL_DRAW_BUFFER4_ATI 0x8829
17377+#define GL_DRAW_BUFFER5_ATI 0x882A
17378+#define GL_DRAW_BUFFER6_ATI 0x882B
17379+#define GL_DRAW_BUFFER7_ATI 0x882C
17380+#define GL_DRAW_BUFFER8_ATI 0x882D
17381+#define GL_DRAW_BUFFER9_ATI 0x882E
17382+#define GL_DRAW_BUFFER10_ATI 0x882F
17383+#define GL_DRAW_BUFFER11_ATI 0x8830
17384+#define GL_DRAW_BUFFER12_ATI 0x8831
17385+#define GL_DRAW_BUFFER13_ATI 0x8832
17386+#define GL_DRAW_BUFFER14_ATI 0x8833
17387+#define GL_DRAW_BUFFER15_ATI 0x8834
17388+#endif
17389+
17390+#ifndef GL_ATI_pixel_format_float
17391+#define GL_TYPE_RGBA_FLOAT_ATI 0x8820
17392+#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
17393+#endif
17394+
17395+#ifndef GL_ATI_texture_env_combine3
17396+#define GL_MODULATE_ADD_ATI 0x8744
17397+#define GL_MODULATE_SIGNED_ADD_ATI 0x8745
17398+#define GL_MODULATE_SUBTRACT_ATI 0x8746
17399+#endif
17400+
17401+#ifndef GL_ATI_texture_float
17402+#define GL_RGBA_FLOAT32_ATI 0x8814
17403+#define GL_RGB_FLOAT32_ATI 0x8815
17404+#define GL_ALPHA_FLOAT32_ATI 0x8816
17405+#define GL_INTENSITY_FLOAT32_ATI 0x8817
17406+#define GL_LUMINANCE_FLOAT32_ATI 0x8818
17407+#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819
17408+#define GL_RGBA_FLOAT16_ATI 0x881A
17409+#define GL_RGB_FLOAT16_ATI 0x881B
17410+#define GL_ALPHA_FLOAT16_ATI 0x881C
17411+#define GL_INTENSITY_FLOAT16_ATI 0x881D
17412+#define GL_LUMINANCE_FLOAT16_ATI 0x881E
17413+#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F
17414+#endif
17415+
17416+#ifndef GL_NV_float_buffer
17417+#define GL_FLOAT_R_NV 0x8880
17418+#define GL_FLOAT_RG_NV 0x8881
17419+#define GL_FLOAT_RGB_NV 0x8882
17420+#define GL_FLOAT_RGBA_NV 0x8883
17421+#define GL_FLOAT_R16_NV 0x8884
17422+#define GL_FLOAT_R32_NV 0x8885
17423+#define GL_FLOAT_RG16_NV 0x8886
17424+#define GL_FLOAT_RG32_NV 0x8887
17425+#define GL_FLOAT_RGB16_NV 0x8888
17426+#define GL_FLOAT_RGB32_NV 0x8889
17427+#define GL_FLOAT_RGBA16_NV 0x888A
17428+#define GL_FLOAT_RGBA32_NV 0x888B
17429+#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C
17430+#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D
17431+#define GL_FLOAT_RGBA_MODE_NV 0x888E
17432+#endif
17433+
17434+#ifndef GL_NV_fragment_program
17435+#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868
17436+#define GL_FRAGMENT_PROGRAM_NV 0x8870
17437+#define GL_MAX_TEXTURE_COORDS_NV 0x8871
17438+#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872
17439+#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873
17440+#define GL_PROGRAM_ERROR_STRING_NV 0x8874
17441+#endif
17442+
17443+#ifndef GL_NV_half_float
17444+#define GL_HALF_FLOAT_NV 0x140B
17445+#endif
17446+
17447+#ifndef GL_NV_pixel_data_range
17448+#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878
17449+#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879
17450+#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A
17451+#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B
17452+#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C
17453+#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D
17454+#endif
17455+
17456+#ifndef GL_NV_primitive_restart
17457+#define GL_PRIMITIVE_RESTART_NV 0x8558
17458+#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559
17459+#endif
17460+
17461+#ifndef GL_NV_texture_expand_normal
17462+#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F
17463+#endif
17464+
17465+#ifndef GL_NV_vertex_program2
17466+#endif
17467+
17468+#ifndef GL_ATI_map_object_buffer
17469+#endif
17470+
17471+#ifndef GL_ATI_separate_stencil
17472+#define GL_STENCIL_BACK_FUNC_ATI 0x8800
17473+#define GL_STENCIL_BACK_FAIL_ATI 0x8801
17474+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802
17475+#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803
17476+#endif
17477+
17478+#ifndef GL_ATI_vertex_attrib_array_object
17479+#endif
17480+
17481+#ifndef GL_OES_read_format
17482+#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
17483+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
17484+#endif
17485+
17486+#ifndef GL_EXT_depth_bounds_test
17487+#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890
17488+#define GL_DEPTH_BOUNDS_EXT 0x8891
17489+#endif
17490+
17491+#ifndef GL_EXT_texture_mirror_clamp
17492+#define GL_MIRROR_CLAMP_EXT 0x8742
17493+#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743
17494+#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912
17495+#endif
17496+
17497+#ifndef GL_EXT_blend_equation_separate
17498+#define GL_BLEND_EQUATION_RGB_EXT GL_BLEND_EQUATION
17499+#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D
17500+#endif
17501+
17502+#ifndef GL_MESA_pack_invert
17503+#define GL_PACK_INVERT_MESA 0x8758
17504+#endif
17505+
17506+#ifndef GL_MESA_ycbcr_texture
17507+#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA
17508+#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB
17509+#define GL_YCBCR_MESA 0x8757
17510+#endif
17511+
17512+#ifndef GL_EXT_pixel_buffer_object
17513+#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB
17514+#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC
17515+#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED
17516+#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF
17517+#endif
17518+
17519+#ifndef GL_NV_fragment_program_option
17520+#endif
17521+
17522+#ifndef GL_NV_fragment_program2
17523+#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4
17524+#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5
17525+#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6
17526+#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7
17527+#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8
17528+#endif
17529+
17530+#ifndef GL_NV_vertex_program2_option
17531+/* reuse GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
17532+/* reuse GL_MAX_PROGRAM_CALL_DEPTH_NV */
17533+#endif
17534+
17535+#ifndef GL_NV_vertex_program3
17536+/* reuse GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
17537+#endif
17538+
17539+#ifndef GL_EXT_framebuffer_object
17540+#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
17541+#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8
17542+#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6
17543+#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7
17544+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
17545+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
17546+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
17547+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
17548+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
17549+#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
17550+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
17551+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
17552+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
17553+#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
17554+#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
17555+#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
17556+#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD
17557+#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
17558+#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
17559+#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
17560+#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
17561+#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
17562+#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
17563+#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
17564+#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
17565+#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
17566+#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
17567+#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
17568+#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
17569+#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
17570+#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
17571+#define GL_COLOR_ATTACHMENT13_EXT 0x8CED
17572+#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
17573+#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
17574+#define GL_DEPTH_ATTACHMENT_EXT 0x8D00
17575+#define GL_STENCIL_ATTACHMENT_EXT 0x8D20
17576+#define GL_FRAMEBUFFER_EXT 0x8D40
17577+#define GL_RENDERBUFFER_EXT 0x8D41
17578+#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42
17579+#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43
17580+#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
17581+#define GL_STENCIL_INDEX1_EXT 0x8D46
17582+#define GL_STENCIL_INDEX4_EXT 0x8D47
17583+#define GL_STENCIL_INDEX8_EXT 0x8D48
17584+#define GL_STENCIL_INDEX16_EXT 0x8D49
17585+#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50
17586+#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51
17587+#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52
17588+#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53
17589+#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54
17590+#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55
17591+#endif
17592+
17593+#ifndef GL_GREMEDY_string_marker
17594+#endif
17595+
17596+#ifndef GL_EXT_packed_depth_stencil
17597+#define GL_DEPTH_STENCIL_EXT 0x84F9
17598+#define GL_UNSIGNED_INT_24_8_EXT 0x84FA
17599+#define GL_DEPTH24_STENCIL8_EXT 0x88F0
17600+#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1
17601+#endif
17602+
17603+#ifndef GL_EXT_stencil_clear_tag
17604+#define GL_STENCIL_TAG_BITS_EXT 0x88F2
17605+#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3
17606+#endif
17607+
17608+#ifndef GL_EXT_texture_sRGB
17609+#define GL_SRGB_EXT 0x8C40
17610+#define GL_SRGB8_EXT 0x8C41
17611+#define GL_SRGB_ALPHA_EXT 0x8C42
17612+#define GL_SRGB8_ALPHA8_EXT 0x8C43
17613+#define GL_SLUMINANCE_ALPHA_EXT 0x8C44
17614+#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45
17615+#define GL_SLUMINANCE_EXT 0x8C46
17616+#define GL_SLUMINANCE8_EXT 0x8C47
17617+#define GL_COMPRESSED_SRGB_EXT 0x8C48
17618+#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49
17619+#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A
17620+#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B
17621+#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
17622+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
17623+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
17624+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
17625+#endif
17626+
17627+#ifndef GL_EXT_framebuffer_blit
17628+#define GL_READ_FRAMEBUFFER_EXT 0x8CA8
17629+#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
17630+#define GL_READ_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT
17631+#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CAA
17632+#endif
17633+
17634+#ifndef GL_EXT_framebuffer_multisample
17635+#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
17636+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
17637+#define GL_MAX_SAMPLES_EXT 0x8D57
17638+#endif
17639+
17640+#ifndef GL_MESAX_texture_stack
17641+#define GL_TEXTURE_1D_STACK_MESAX 0x8759
17642+#define GL_TEXTURE_2D_STACK_MESAX 0x875A
17643+#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B
17644+#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C
17645+#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D
17646+#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E
17647+#endif
17648+
17649+#ifndef GL_EXT_timer_query
17650+#define GL_TIME_ELAPSED_EXT 0x88BF
17651+#endif
17652+
17653+#ifndef GL_EXT_gpu_program_parameters
17654+#endif
17655+
17656+#ifndef GL_APPLE_flush_buffer_range
17657+#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12
17658+#define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13
17659+#endif
17660+
17661+#ifndef GL_NV_gpu_program4
17662+#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904
17663+#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905
17664+#define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906
17665+#define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907
17666+#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908
17667+#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909
17668+#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5
17669+#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6
17670+#endif
17671+
17672+#ifndef GL_NV_geometry_program4
17673+#define GL_LINES_ADJACENCY_EXT 0x000A
17674+#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B
17675+#define GL_TRIANGLES_ADJACENCY_EXT 0x000C
17676+#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D
17677+#define GL_GEOMETRY_PROGRAM_NV 0x8C26
17678+#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27
17679+#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28
17680+#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA
17681+#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB
17682+#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC
17683+#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
17684+#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
17685+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
17686+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9
17687+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
17688+#define GL_PROGRAM_POINT_SIZE_EXT 0x8642
17689+#endif
17690+
17691+#ifndef GL_EXT_geometry_shader4
17692+#define GL_GEOMETRY_SHADER_EXT 0x8DD9
17693+/* reuse GL_GEOMETRY_VERTICES_OUT_EXT */
17694+/* reuse GL_GEOMETRY_INPUT_TYPE_EXT */
17695+/* reuse GL_GEOMETRY_OUTPUT_TYPE_EXT */
17696+/* reuse GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT */
17697+#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD
17698+#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE
17699+#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B
17700+#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
17701+#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
17702+#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
17703+/* reuse GL_LINES_ADJACENCY_EXT */
17704+/* reuse GL_LINE_STRIP_ADJACENCY_EXT */
17705+/* reuse GL_TRIANGLES_ADJACENCY_EXT */
17706+/* reuse GL_TRIANGLE_STRIP_ADJACENCY_EXT */
17707+/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT */
17708+/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT */
17709+/* reuse GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT */
17710+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
17711+/* reuse GL_PROGRAM_POINT_SIZE_EXT */
17712+#endif
17713+
17714+#ifndef GL_NV_vertex_program4
17715+#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD
17716+#endif
17717+
17718+#ifndef GL_EXT_gpu_shader4
17719+#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0
17720+#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1
17721+#define GL_SAMPLER_BUFFER_EXT 0x8DC2
17722+#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3
17723+#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4
17724+#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5
17725+#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6
17726+#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7
17727+#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8
17728+#define GL_INT_SAMPLER_1D_EXT 0x8DC9
17729+#define GL_INT_SAMPLER_2D_EXT 0x8DCA
17730+#define GL_INT_SAMPLER_3D_EXT 0x8DCB
17731+#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC
17732+#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD
17733+#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE
17734+#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF
17735+#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0
17736+#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1
17737+#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2
17738+#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3
17739+#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4
17740+#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5
17741+#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6
17742+#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7
17743+#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8
17744+#endif
17745+
17746+#ifndef GL_EXT_draw_instanced
17747+#endif
17748+
17749+#ifndef GL_EXT_packed_float
17750+#define GL_R11F_G11F_B10F_EXT 0x8C3A
17751+#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B
17752+#define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C
17753+#endif
17754+
17755+#ifndef GL_EXT_texture_array
17756+#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18
17757+#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19
17758+#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A
17759+#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B
17760+#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C
17761+#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D
17762+#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF
17763+#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E
17764+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
17765+#endif
17766+
17767+#ifndef GL_EXT_texture_buffer_object
17768+#define GL_TEXTURE_BUFFER_EXT 0x8C2A
17769+#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B
17770+#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C
17771+#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D
17772+#define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E
17773+#endif
17774+
17775+#ifndef GL_EXT_texture_compression_latc
17776+#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70
17777+#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71
17778+#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72
17779+#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73
17780+#endif
17781+
17782+#ifndef GL_EXT_texture_compression_rgtc
17783+#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB
17784+#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC
17785+#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD
17786+#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE
17787+#endif
17788+
17789+#ifndef GL_EXT_texture_shared_exponent
17790+#define GL_RGB9_E5_EXT 0x8C3D
17791+#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E
17792+#define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F
17793+#endif
17794+
17795+#ifndef GL_NV_depth_buffer_float
17796+#define GL_DEPTH_COMPONENT32F_NV 0x8DAB
17797+#define GL_DEPTH32F_STENCIL8_NV 0x8DAC
17798+#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD
17799+#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF
17800+#endif
17801+
17802+#ifndef GL_NV_fragment_program4
17803+#endif
17804+
17805+#ifndef GL_NV_framebuffer_multisample_coverage
17806+#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB
17807+#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10
17808+#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11
17809+#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12
17810+#endif
17811+
17812+#ifndef GL_EXT_framebuffer_sRGB
17813+#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9
17814+#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA
17815+#endif
17816+
17817+#ifndef GL_NV_geometry_shader4
17818+#endif
17819+
17820+#ifndef GL_NV_parameter_buffer_object
17821+#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0
17822+#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1
17823+#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2
17824+#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3
17825+#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4
17826+#endif
17827+
17828+#ifndef GL_EXT_draw_buffers2
17829+#endif
17830+
17831+#ifndef GL_NV_transform_feedback
17832+#define GL_BACK_PRIMARY_COLOR_NV 0x8C77
17833+#define GL_BACK_SECONDARY_COLOR_NV 0x8C78
17834+#define GL_TEXTURE_COORD_NV 0x8C79
17835+#define GL_CLIP_DISTANCE_NV 0x8C7A
17836+#define GL_VERTEX_ID_NV 0x8C7B
17837+#define GL_PRIMITIVE_ID_NV 0x8C7C
17838+#define GL_GENERIC_ATTRIB_NV 0x8C7D
17839+#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E
17840+#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F
17841+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80
17842+#define GL_ACTIVE_VARYINGS_NV 0x8C81
17843+#define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82
17844+#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83
17845+#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84
17846+#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85
17847+#define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86
17848+#define GL_PRIMITIVES_GENERATED_NV 0x8C87
17849+#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88
17850+#define GL_RASTERIZER_DISCARD_NV 0x8C89
17851+#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_ATTRIBS_NV 0x8C8A
17852+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B
17853+#define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C
17854+#define GL_SEPARATE_ATTRIBS_NV 0x8C8D
17855+#define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E
17856+#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F
17857+#endif
17858+
17859+#ifndef GL_EXT_bindable_uniform
17860+#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2
17861+#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3
17862+#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4
17863+#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED
17864+#define GL_UNIFORM_BUFFER_EXT 0x8DEE
17865+#define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF
17866+#endif
17867+
17868+#ifndef GL_EXT_texture_integer
17869+#define GL_RGBA32UI_EXT 0x8D70
17870+#define GL_RGB32UI_EXT 0x8D71
17871+#define GL_ALPHA32UI_EXT 0x8D72
17872+#define GL_INTENSITY32UI_EXT 0x8D73
17873+#define GL_LUMINANCE32UI_EXT 0x8D74
17874+#define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75
17875+#define GL_RGBA16UI_EXT 0x8D76
17876+#define GL_RGB16UI_EXT 0x8D77
17877+#define GL_ALPHA16UI_EXT 0x8D78
17878+#define GL_INTENSITY16UI_EXT 0x8D79
17879+#define GL_LUMINANCE16UI_EXT 0x8D7A
17880+#define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B
17881+#define GL_RGBA8UI_EXT 0x8D7C
17882+#define GL_RGB8UI_EXT 0x8D7D
17883+#define GL_ALPHA8UI_EXT 0x8D7E
17884+#define GL_INTENSITY8UI_EXT 0x8D7F
17885+#define GL_LUMINANCE8UI_EXT 0x8D80
17886+#define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81
17887+#define GL_RGBA32I_EXT 0x8D82
17888+#define GL_RGB32I_EXT 0x8D83
17889+#define GL_ALPHA32I_EXT 0x8D84
17890+#define GL_INTENSITY32I_EXT 0x8D85
17891+#define GL_LUMINANCE32I_EXT 0x8D86
17892+#define GL_LUMINANCE_ALPHA32I_EXT 0x8D87
17893+#define GL_RGBA16I_EXT 0x8D88
17894+#define GL_RGB16I_EXT 0x8D89
17895+#define GL_ALPHA16I_EXT 0x8D8A
17896+#define GL_INTENSITY16I_EXT 0x8D8B
17897+#define GL_LUMINANCE16I_EXT 0x8D8C
17898+#define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D
17899+#define GL_RGBA8I_EXT 0x8D8E
17900+#define GL_RGB8I_EXT 0x8D8F
17901+#define GL_ALPHA8I_EXT 0x8D90
17902+#define GL_INTENSITY8I_EXT 0x8D91
17903+#define GL_LUMINANCE8I_EXT 0x8D92
17904+#define GL_LUMINANCE_ALPHA8I_EXT 0x8D93
17905+#define GL_RED_INTEGER_EXT 0x8D94
17906+#define GL_GREEN_INTEGER_EXT 0x8D95
17907+#define GL_BLUE_INTEGER_EXT 0x8D96
17908+#define GL_ALPHA_INTEGER_EXT 0x8D97
17909+#define GL_RGB_INTEGER_EXT 0x8D98
17910+#define GL_RGBA_INTEGER_EXT 0x8D99
17911+#define GL_BGR_INTEGER_EXT 0x8D9A
17912+#define GL_BGRA_INTEGER_EXT 0x8D9B
17913+#define GL_LUMINANCE_INTEGER_EXT 0x8D9C
17914+#define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D
17915+#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E
17916+#endif
17917+
17918+
17919+/*************************************************************/
17920+
17921+#include <stddef.h>
17922+#ifndef GL_VERSION_2_0
17923+/* GL type for program/shader text */
17924+typedef char GLchar; /* native character */
17925+#endif
17926+
17927+#ifndef GL_VERSION_1_5
17928+/* GL types for handling large vertex buffer objects */
17929+typedef ptrdiff_t GLintptr;
17930+typedef ptrdiff_t GLsizeiptr;
17931+#endif
17932+
17933+#ifndef GL_ARB_vertex_buffer_object
17934+/* GL types for handling large vertex buffer objects */
17935+typedef ptrdiff_t GLintptrARB;
17936+typedef ptrdiff_t GLsizeiptrARB;
17937+#endif
17938+
17939+#ifndef GL_ARB_shader_objects
17940+/* GL types for handling shader object handles and program/shader text */
17941+typedef char GLcharARB; /* native character */
17942+typedef unsigned int GLhandleARB; /* shader object handle */
17943+#endif
17944+
17945+/* GL types for "half" precision (s10e5) float data in host memory */
17946+#ifndef GL_ARB_half_float_pixel
17947+typedef unsigned short GLhalfARB;
17948+#endif
17949+
17950+#ifndef GL_NV_half_float
17951+typedef unsigned short GLhalfNV;
17952+#endif
17953+
17954+#ifndef GLEXT_64_TYPES_DEFINED
17955+/* This code block is duplicated in glext.h, so must be protected */
17956+#define GLEXT_64_TYPES_DEFINED
17957+/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
17958+/* (as used in the GL_EXT_timer_query extension). */
17959+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
17960+#include <inttypes.h>
17961+#elif defined(__sun__)
17962+#include <inttypes.h>
17963+#if defined(__STDC__)
17964+#if defined(__arch64__)
17965+typedef long int int64_t;
17966+typedef unsigned long int uint64_t;
17967+#else
17968+typedef long long int int64_t;
17969+typedef unsigned long long int uint64_t;
17970+#endif /* __arch64__ */
17971+#endif /* __STDC__ */
17972+#elif defined( __VMS )
17973+#include <inttypes.h>
17974+#elif defined(__SCO__) || defined(__USLC__)
17975+#include <stdint.h>
17976+#elif defined(__UNIXOS2__) || defined(__SOL64__)
17977+typedef long int int32_t;
17978+typedef long long int int64_t;
17979+typedef unsigned long long int uint64_t;
17980+#elif defined(_WIN32) && defined(__GNUC__)
17981+#include <stdint.h>
17982+#elif defined(_WIN32)
17983+typedef __int32 int32_t;
17984+typedef __int64 int64_t;
17985+typedef unsigned __int64 uint64_t;
17986+#else
17987+#include <inttypes.h> /* Fallback option */
17988+#endif
17989+#endif
17990+
17991+#ifndef GL_EXT_timer_query
17992+typedef int64_t GLint64EXT;
17993+typedef uint64_t GLuint64EXT;
17994+#endif
17995+
17996+#ifndef GL_VERSION_1_2
17997+#define GL_VERSION_1_2 1
17998+#ifdef GL_GLEXT_PROTOTYPES
17999+GLAPI void APIENTRY glBlendColor (GLclampf, GLclampf, GLclampf, GLclampf);
18000+GLAPI void APIENTRY glBlendEquation (GLenum);
18001+GLAPI void APIENTRY glDrawRangeElements (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
18002+GLAPI void APIENTRY glColorTable (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
18003+GLAPI void APIENTRY glColorTableParameterfv (GLenum, GLenum, const GLfloat *);
18004+GLAPI void APIENTRY glColorTableParameteriv (GLenum, GLenum, const GLint *);
18005+GLAPI void APIENTRY glCopyColorTable (GLenum, GLenum, GLint, GLint, GLsizei);
18006+GLAPI void APIENTRY glGetColorTable (GLenum, GLenum, GLenum, GLvoid *);
18007+GLAPI void APIENTRY glGetColorTableParameterfv (GLenum, GLenum, GLfloat *);
18008+GLAPI void APIENTRY glGetColorTableParameteriv (GLenum, GLenum, GLint *);
18009+GLAPI void APIENTRY glColorSubTable (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
18010+GLAPI void APIENTRY glCopyColorSubTable (GLenum, GLsizei, GLint, GLint, GLsizei);
18011+GLAPI void APIENTRY glConvolutionFilter1D (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
18012+GLAPI void APIENTRY glConvolutionFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
18013+GLAPI void APIENTRY glConvolutionParameterf (GLenum, GLenum, GLfloat);
18014+GLAPI void APIENTRY glConvolutionParameterfv (GLenum, GLenum, const GLfloat *);
18015+GLAPI void APIENTRY glConvolutionParameteri (GLenum, GLenum, GLint);
18016+GLAPI void APIENTRY glConvolutionParameteriv (GLenum, GLenum, const GLint *);
18017+GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum, GLenum, GLint, GLint, GLsizei);
18018+GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
18019+GLAPI void APIENTRY glGetConvolutionFilter (GLenum, GLenum, GLenum, GLvoid *);
18020+GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum, GLenum, GLfloat *);
18021+GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum, GLenum, GLint *);
18022+GLAPI void APIENTRY glGetSeparableFilter (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
18023+GLAPI void APIENTRY glSeparableFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
18024+GLAPI void APIENTRY glGetHistogram (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
18025+GLAPI void APIENTRY glGetHistogramParameterfv (GLenum, GLenum, GLfloat *);
18026+GLAPI void APIENTRY glGetHistogramParameteriv (GLenum, GLenum, GLint *);
18027+GLAPI void APIENTRY glGetMinmax (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
18028+GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum, GLenum, GLfloat *);
18029+GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum, GLenum, GLint *);
18030+GLAPI void APIENTRY glHistogram (GLenum, GLsizei, GLenum, GLboolean);
18031+GLAPI void APIENTRY glMinmax (GLenum, GLenum, GLboolean);
18032+GLAPI void APIENTRY glResetHistogram (GLenum);
18033+GLAPI void APIENTRY glResetMinmax (GLenum);
18034+GLAPI void APIENTRY glTexImage3D (GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
18035+GLAPI void APIENTRY glTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
18036+GLAPI void APIENTRY glCopyTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
18037+#endif /* GL_GLEXT_PROTOTYPES */
18038+typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
18039+typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
18040+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
18041+typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
18042+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
18043+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
18044+typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
18045+typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
18046+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
18047+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18048+typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
18049+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
18050+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
18051+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
18052+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
18053+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
18054+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
18055+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
18056+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
18057+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
18058+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
18059+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
18060+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18061+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
18062+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
18063+typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
18064+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
18065+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18066+typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
18067+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
18068+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18069+typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
18070+typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
18071+typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
18072+typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
18073+typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
18074+typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
18075+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
18076+#endif
18077+
18078+#ifndef GL_VERSION_1_3
18079+#define GL_VERSION_1_3 1
18080+#ifdef GL_GLEXT_PROTOTYPES
18081+GLAPI void APIENTRY glActiveTexture (GLenum);
18082+GLAPI void APIENTRY glClientActiveTexture (GLenum);
18083+GLAPI void APIENTRY glMultiTexCoord1d (GLenum, GLdouble);
18084+GLAPI void APIENTRY glMultiTexCoord1dv (GLenum, const GLdouble *);
18085+GLAPI void APIENTRY glMultiTexCoord1f (GLenum, GLfloat);
18086+GLAPI void APIENTRY glMultiTexCoord1fv (GLenum, const GLfloat *);
18087+GLAPI void APIENTRY glMultiTexCoord1i (GLenum, GLint);
18088+GLAPI void APIENTRY glMultiTexCoord1iv (GLenum, const GLint *);
18089+GLAPI void APIENTRY glMultiTexCoord1s (GLenum, GLshort);
18090+GLAPI void APIENTRY glMultiTexCoord1sv (GLenum, const GLshort *);
18091+GLAPI void APIENTRY glMultiTexCoord2d (GLenum, GLdouble, GLdouble);
18092+GLAPI void APIENTRY glMultiTexCoord2dv (GLenum, const GLdouble *);
18093+GLAPI void APIENTRY glMultiTexCoord2f (GLenum, GLfloat, GLfloat);
18094+GLAPI void APIENTRY glMultiTexCoord2fv (GLenum, const GLfloat *);
18095+GLAPI void APIENTRY glMultiTexCoord2i (GLenum, GLint, GLint);
18096+GLAPI void APIENTRY glMultiTexCoord2iv (GLenum, const GLint *);
18097+GLAPI void APIENTRY glMultiTexCoord2s (GLenum, GLshort, GLshort);
18098+GLAPI void APIENTRY glMultiTexCoord2sv (GLenum, const GLshort *);
18099+GLAPI void APIENTRY glMultiTexCoord3d (GLenum, GLdouble, GLdouble, GLdouble);
18100+GLAPI void APIENTRY glMultiTexCoord3dv (GLenum, const GLdouble *);
18101+GLAPI void APIENTRY glMultiTexCoord3f (GLenum, GLfloat, GLfloat, GLfloat);
18102+GLAPI void APIENTRY glMultiTexCoord3fv (GLenum, const GLfloat *);
18103+GLAPI void APIENTRY glMultiTexCoord3i (GLenum, GLint, GLint, GLint);
18104+GLAPI void APIENTRY glMultiTexCoord3iv (GLenum, const GLint *);
18105+GLAPI void APIENTRY glMultiTexCoord3s (GLenum, GLshort, GLshort, GLshort);
18106+GLAPI void APIENTRY glMultiTexCoord3sv (GLenum, const GLshort *);
18107+GLAPI void APIENTRY glMultiTexCoord4d (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
18108+GLAPI void APIENTRY glMultiTexCoord4dv (GLenum, const GLdouble *);
18109+GLAPI void APIENTRY glMultiTexCoord4f (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
18110+GLAPI void APIENTRY glMultiTexCoord4fv (GLenum, const GLfloat *);
18111+GLAPI void APIENTRY glMultiTexCoord4i (GLenum, GLint, GLint, GLint, GLint);
18112+GLAPI void APIENTRY glMultiTexCoord4iv (GLenum, const GLint *);
18113+GLAPI void APIENTRY glMultiTexCoord4s (GLenum, GLshort, GLshort, GLshort, GLshort);
18114+GLAPI void APIENTRY glMultiTexCoord4sv (GLenum, const GLshort *);
18115+GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *);
18116+GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *);
18117+GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *);
18118+GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *);
18119+GLAPI void APIENTRY glSampleCoverage (GLclampf, GLboolean);
18120+GLAPI void APIENTRY glCompressedTexImage3D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
18121+GLAPI void APIENTRY glCompressedTexImage2D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
18122+GLAPI void APIENTRY glCompressedTexImage1D (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
18123+GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
18124+GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
18125+GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
18126+GLAPI void APIENTRY glGetCompressedTexImage (GLenum, GLint, GLvoid *);
18127+#endif /* GL_GLEXT_PROTOTYPES */
18128+typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
18129+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
18130+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
18131+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
18132+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
18133+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
18134+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
18135+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
18136+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
18137+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
18138+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
18139+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
18140+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
18141+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
18142+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
18143+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
18144+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
18145+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
18146+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
18147+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
18148+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
18149+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
18150+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
18151+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
18152+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
18153+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
18154+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
18155+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
18156+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
18157+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
18158+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
18159+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
18160+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
18161+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
18162+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
18163+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
18164+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
18165+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
18166+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
18167+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
18168+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
18169+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
18170+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
18171+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
18172+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
18173+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img);
18174+#endif
18175+
18176+#ifndef GL_VERSION_1_4
18177+#define GL_VERSION_1_4 1
18178+#ifdef GL_GLEXT_PROTOTYPES
18179+GLAPI void APIENTRY glBlendFuncSeparate (GLenum, GLenum, GLenum, GLenum);
18180+GLAPI void APIENTRY glFogCoordf (GLfloat);
18181+GLAPI void APIENTRY glFogCoordfv (const GLfloat *);
18182+GLAPI void APIENTRY glFogCoordd (GLdouble);
18183+GLAPI void APIENTRY glFogCoorddv (const GLdouble *);
18184+GLAPI void APIENTRY glFogCoordPointer (GLenum, GLsizei, const GLvoid *);
18185+GLAPI void APIENTRY glMultiDrawArrays (GLenum, GLint *, GLsizei *, GLsizei);
18186+GLAPI void APIENTRY glMultiDrawElements (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
18187+GLAPI void APIENTRY glPointParameterf (GLenum, GLfloat);
18188+GLAPI void APIENTRY glPointParameterfv (GLenum, const GLfloat *);
18189+GLAPI void APIENTRY glPointParameteri (GLenum, GLint);
18190+GLAPI void APIENTRY glPointParameteriv (GLenum, const GLint *);
18191+GLAPI void APIENTRY glSecondaryColor3b (GLbyte, GLbyte, GLbyte);
18192+GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *);
18193+GLAPI void APIENTRY glSecondaryColor3d (GLdouble, GLdouble, GLdouble);
18194+GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *);
18195+GLAPI void APIENTRY glSecondaryColor3f (GLfloat, GLfloat, GLfloat);
18196+GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *);
18197+GLAPI void APIENTRY glSecondaryColor3i (GLint, GLint, GLint);
18198+GLAPI void APIENTRY glSecondaryColor3iv (const GLint *);
18199+GLAPI void APIENTRY glSecondaryColor3s (GLshort, GLshort, GLshort);
18200+GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *);
18201+GLAPI void APIENTRY glSecondaryColor3ub (GLubyte, GLubyte, GLubyte);
18202+GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *);
18203+GLAPI void APIENTRY glSecondaryColor3ui (GLuint, GLuint, GLuint);
18204+GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *);
18205+GLAPI void APIENTRY glSecondaryColor3us (GLushort, GLushort, GLushort);
18206+GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *);
18207+GLAPI void APIENTRY glSecondaryColorPointer (GLint, GLenum, GLsizei, const GLvoid *);
18208+GLAPI void APIENTRY glWindowPos2d (GLdouble, GLdouble);
18209+GLAPI void APIENTRY glWindowPos2dv (const GLdouble *);
18210+GLAPI void APIENTRY glWindowPos2f (GLfloat, GLfloat);
18211+GLAPI void APIENTRY glWindowPos2fv (const GLfloat *);
18212+GLAPI void APIENTRY glWindowPos2i (GLint, GLint);
18213+GLAPI void APIENTRY glWindowPos2iv (const GLint *);
18214+GLAPI void APIENTRY glWindowPos2s (GLshort, GLshort);
18215+GLAPI void APIENTRY glWindowPos2sv (const GLshort *);
18216+GLAPI void APIENTRY glWindowPos3d (GLdouble, GLdouble, GLdouble);
18217+GLAPI void APIENTRY glWindowPos3dv (const GLdouble *);
18218+GLAPI void APIENTRY glWindowPos3f (GLfloat, GLfloat, GLfloat);
18219+GLAPI void APIENTRY glWindowPos3fv (const GLfloat *);
18220+GLAPI void APIENTRY glWindowPos3i (GLint, GLint, GLint);
18221+GLAPI void APIENTRY glWindowPos3iv (const GLint *);
18222+GLAPI void APIENTRY glWindowPos3s (GLshort, GLshort, GLshort);
18223+GLAPI void APIENTRY glWindowPos3sv (const GLshort *);
18224+#endif /* GL_GLEXT_PROTOTYPES */
18225+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
18226+typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord);
18227+typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord);
18228+typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord);
18229+typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord);
18230+typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
18231+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
18232+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
18233+typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);
18234+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params);
18235+typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param);
18236+typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params);
18237+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue);
18238+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v);
18239+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue);
18240+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v);
18241+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue);
18242+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v);
18243+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue);
18244+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v);
18245+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue);
18246+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v);
18247+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue);
18248+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v);
18249+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue);
18250+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v);
18251+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue);
18252+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v);
18253+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
18254+typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y);
18255+typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v);
18256+typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y);
18257+typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v);
18258+typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y);
18259+typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v);
18260+typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y);
18261+typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v);
18262+typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z);
18263+typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v);
18264+typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z);
18265+typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v);
18266+typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z);
18267+typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v);
18268+typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z);
18269+typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v);
18270+#endif
18271+
18272+#ifndef GL_VERSION_1_5
18273+#define GL_VERSION_1_5 1
18274+#ifdef GL_GLEXT_PROTOTYPES
18275+GLAPI void APIENTRY glGenQueries (GLsizei, GLuint *);
18276+GLAPI void APIENTRY glDeleteQueries (GLsizei, const GLuint *);
18277+GLAPI GLboolean APIENTRY glIsQuery (GLuint);
18278+GLAPI void APIENTRY glBeginQuery (GLenum, GLuint);
18279+GLAPI void APIENTRY glEndQuery (GLenum);
18280+GLAPI void APIENTRY glGetQueryiv (GLenum, GLenum, GLint *);
18281+GLAPI void APIENTRY glGetQueryObjectiv (GLuint, GLenum, GLint *);
18282+GLAPI void APIENTRY glGetQueryObjectuiv (GLuint, GLenum, GLuint *);
18283+GLAPI void APIENTRY glBindBuffer (GLenum, GLuint);
18284+GLAPI void APIENTRY glDeleteBuffers (GLsizei, const GLuint *);
18285+GLAPI void APIENTRY glGenBuffers (GLsizei, GLuint *);
18286+GLAPI GLboolean APIENTRY glIsBuffer (GLuint);
18287+GLAPI void APIENTRY glBufferData (GLenum, GLsizeiptr, const GLvoid *, GLenum);
18288+GLAPI void APIENTRY glBufferSubData (GLenum, GLintptr, GLsizeiptr, const GLvoid *);
18289+GLAPI void APIENTRY glGetBufferSubData (GLenum, GLintptr, GLsizeiptr, GLvoid *);
18290+GLAPI GLvoid* APIENTRY glMapBuffer (GLenum, GLenum);
18291+GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum);
18292+GLAPI void APIENTRY glGetBufferParameteriv (GLenum, GLenum, GLint *);
18293+GLAPI void APIENTRY glGetBufferPointerv (GLenum, GLenum, GLvoid* *);
18294+#endif /* GL_GLEXT_PROTOTYPES */
18295+typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids);
18296+typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids);
18297+typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id);
18298+typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);
18299+typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target);
18300+typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params);
18301+typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params);
18302+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params);
18303+typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
18304+typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
18305+typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
18306+typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);
18307+typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
18308+typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
18309+typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data);
18310+typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
18311+typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target);
18312+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18313+typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params);
18314+#endif
18315+
18316+#ifndef GL_VERSION_2_0
18317+#define GL_VERSION_2_0 1
18318+#ifdef GL_GLEXT_PROTOTYPES
18319+GLAPI void APIENTRY glBlendEquationSeparate (GLenum, GLenum);
18320+GLAPI void APIENTRY glDrawBuffers (GLsizei, const GLenum *);
18321+GLAPI void APIENTRY glStencilOpSeparate (GLenum, GLenum, GLenum, GLenum);
18322+GLAPI void APIENTRY glStencilFuncSeparate (GLenum, GLenum, GLint, GLuint);
18323+GLAPI void APIENTRY glStencilMaskSeparate (GLenum, GLuint);
18324+GLAPI void APIENTRY glAttachShader (GLuint, GLuint);
18325+GLAPI void APIENTRY glBindAttribLocation (GLuint, GLuint, const GLchar *);
18326+GLAPI void APIENTRY glCompileShader (GLuint);
18327+GLAPI GLuint APIENTRY glCreateProgram (void);
18328+GLAPI GLuint APIENTRY glCreateShader (GLenum);
18329+GLAPI void APIENTRY glDeleteProgram (GLuint);
18330+GLAPI void APIENTRY glDeleteShader (GLuint);
18331+GLAPI void APIENTRY glDetachShader (GLuint, GLuint);
18332+GLAPI void APIENTRY glDisableVertexAttribArray (GLuint);
18333+GLAPI void APIENTRY glEnableVertexAttribArray (GLuint);
18334+GLAPI void APIENTRY glGetActiveAttrib (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
18335+GLAPI void APIENTRY glGetActiveUniform (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
18336+GLAPI void APIENTRY glGetAttachedShaders (GLuint, GLsizei, GLsizei *, GLuint *);
18337+GLAPI GLint APIENTRY glGetAttribLocation (GLuint, const GLchar *);
18338+GLAPI void APIENTRY glGetProgramiv (GLuint, GLenum, GLint *);
18339+GLAPI void APIENTRY glGetProgramInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
18340+GLAPI void APIENTRY glGetShaderiv (GLuint, GLenum, GLint *);
18341+GLAPI void APIENTRY glGetShaderInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
18342+GLAPI void APIENTRY glGetShaderSource (GLuint, GLsizei, GLsizei *, GLchar *);
18343+GLAPI GLint APIENTRY glGetUniformLocation (GLuint, const GLchar *);
18344+GLAPI void APIENTRY glGetUniformfv (GLuint, GLint, GLfloat *);
18345+GLAPI void APIENTRY glGetUniformiv (GLuint, GLint, GLint *);
18346+GLAPI void APIENTRY glGetVertexAttribdv (GLuint, GLenum, GLdouble *);
18347+GLAPI void APIENTRY glGetVertexAttribfv (GLuint, GLenum, GLfloat *);
18348+GLAPI void APIENTRY glGetVertexAttribiv (GLuint, GLenum, GLint *);
18349+GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint, GLenum, GLvoid* *);
18350+GLAPI GLboolean APIENTRY glIsProgram (GLuint);
18351+GLAPI GLboolean APIENTRY glIsShader (GLuint);
18352+GLAPI void APIENTRY glLinkProgram (GLuint);
18353+GLAPI void APIENTRY glShaderSource (GLuint, GLsizei, const GLchar* *, const GLint *);
18354+GLAPI void APIENTRY glUseProgram (GLuint);
18355+GLAPI void APIENTRY glUniform1f (GLint, GLfloat);
18356+GLAPI void APIENTRY glUniform2f (GLint, GLfloat, GLfloat);
18357+GLAPI void APIENTRY glUniform3f (GLint, GLfloat, GLfloat, GLfloat);
18358+GLAPI void APIENTRY glUniform4f (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
18359+GLAPI void APIENTRY glUniform1i (GLint, GLint);
18360+GLAPI void APIENTRY glUniform2i (GLint, GLint, GLint);
18361+GLAPI void APIENTRY glUniform3i (GLint, GLint, GLint, GLint);
18362+GLAPI void APIENTRY glUniform4i (GLint, GLint, GLint, GLint, GLint);
18363+GLAPI void APIENTRY glUniform1fv (GLint, GLsizei, const GLfloat *);
18364+GLAPI void APIENTRY glUniform2fv (GLint, GLsizei, const GLfloat *);
18365+GLAPI void APIENTRY glUniform3fv (GLint, GLsizei, const GLfloat *);
18366+GLAPI void APIENTRY glUniform4fv (GLint, GLsizei, const GLfloat *);
18367+GLAPI void APIENTRY glUniform1iv (GLint, GLsizei, const GLint *);
18368+GLAPI void APIENTRY glUniform2iv (GLint, GLsizei, const GLint *);
18369+GLAPI void APIENTRY glUniform3iv (GLint, GLsizei, const GLint *);
18370+GLAPI void APIENTRY glUniform4iv (GLint, GLsizei, const GLint *);
18371+GLAPI void APIENTRY glUniformMatrix2fv (GLint, GLsizei, GLboolean, const GLfloat *);
18372+GLAPI void APIENTRY glUniformMatrix3fv (GLint, GLsizei, GLboolean, const GLfloat *);
18373+GLAPI void APIENTRY glUniformMatrix4fv (GLint, GLsizei, GLboolean, const GLfloat *);
18374+GLAPI void APIENTRY glValidateProgram (GLuint);
18375+GLAPI void APIENTRY glVertexAttrib1d (GLuint, GLdouble);
18376+GLAPI void APIENTRY glVertexAttrib1dv (GLuint, const GLdouble *);
18377+GLAPI void APIENTRY glVertexAttrib1f (GLuint, GLfloat);
18378+GLAPI void APIENTRY glVertexAttrib1fv (GLuint, const GLfloat *);
18379+GLAPI void APIENTRY glVertexAttrib1s (GLuint, GLshort);
18380+GLAPI void APIENTRY glVertexAttrib1sv (GLuint, const GLshort *);
18381+GLAPI void APIENTRY glVertexAttrib2d (GLuint, GLdouble, GLdouble);
18382+GLAPI void APIENTRY glVertexAttrib2dv (GLuint, const GLdouble *);
18383+GLAPI void APIENTRY glVertexAttrib2f (GLuint, GLfloat, GLfloat);
18384+GLAPI void APIENTRY glVertexAttrib2fv (GLuint, const GLfloat *);
18385+GLAPI void APIENTRY glVertexAttrib2s (GLuint, GLshort, GLshort);
18386+GLAPI void APIENTRY glVertexAttrib2sv (GLuint, const GLshort *);
18387+GLAPI void APIENTRY glVertexAttrib3d (GLuint, GLdouble, GLdouble, GLdouble);
18388+GLAPI void APIENTRY glVertexAttrib3dv (GLuint, const GLdouble *);
18389+GLAPI void APIENTRY glVertexAttrib3f (GLuint, GLfloat, GLfloat, GLfloat);
18390+GLAPI void APIENTRY glVertexAttrib3fv (GLuint, const GLfloat *);
18391+GLAPI void APIENTRY glVertexAttrib3s (GLuint, GLshort, GLshort, GLshort);
18392+GLAPI void APIENTRY glVertexAttrib3sv (GLuint, const GLshort *);
18393+GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint, const GLbyte *);
18394+GLAPI void APIENTRY glVertexAttrib4Niv (GLuint, const GLint *);
18395+GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint, const GLshort *);
18396+GLAPI void APIENTRY glVertexAttrib4Nub (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
18397+GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint, const GLubyte *);
18398+GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint, const GLuint *);
18399+GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint, const GLushort *);
18400+GLAPI void APIENTRY glVertexAttrib4bv (GLuint, const GLbyte *);
18401+GLAPI void APIENTRY glVertexAttrib4d (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
18402+GLAPI void APIENTRY glVertexAttrib4dv (GLuint, const GLdouble *);
18403+GLAPI void APIENTRY glVertexAttrib4f (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
18404+GLAPI void APIENTRY glVertexAttrib4fv (GLuint, const GLfloat *);
18405+GLAPI void APIENTRY glVertexAttrib4iv (GLuint, const GLint *);
18406+GLAPI void APIENTRY glVertexAttrib4s (GLuint, GLshort, GLshort, GLshort, GLshort);
18407+GLAPI void APIENTRY glVertexAttrib4sv (GLuint, const GLshort *);
18408+GLAPI void APIENTRY glVertexAttrib4ubv (GLuint, const GLubyte *);
18409+GLAPI void APIENTRY glVertexAttrib4uiv (GLuint, const GLuint *);
18410+GLAPI void APIENTRY glVertexAttrib4usv (GLuint, const GLushort *);
18411+GLAPI void APIENTRY glVertexAttribPointer (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
18412+#endif /* GL_GLEXT_PROTOTYPES */
18413+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
18414+typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs);
18415+typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
18416+typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
18417+typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
18418+typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
18419+typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
18420+typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
18421+typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
18422+typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
18423+typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
18424+typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
18425+typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
18426+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
18427+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
18428+typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
18429+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
18430+typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj);
18431+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
18432+typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
18433+typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
18434+typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
18435+typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
18436+typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
18437+typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
18438+typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
18439+typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
18440+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params);
18441+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
18442+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
18443+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
18444+typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
18445+typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
18446+typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
18447+typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length);
18448+typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
18449+typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
18450+typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
18451+typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
18452+typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
18453+typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
18454+typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
18455+typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
18456+typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
18457+typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18458+typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18459+typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18460+typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18461+typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
18462+typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
18463+typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
18464+typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
18465+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18466+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18467+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18468+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
18469+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);
18470+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v);
18471+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
18472+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
18473+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);
18474+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v);
18475+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);
18476+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v);
18477+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
18478+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
18479+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);
18480+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v);
18481+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
18482+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v);
18483+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
18484+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
18485+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
18486+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v);
18487+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v);
18488+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v);
18489+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v);
18490+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
18491+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v);
18492+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v);
18493+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v);
18494+typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v);
18495+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
18496+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v);
18497+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
18498+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
18499+typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v);
18500+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
18501+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v);
18502+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v);
18503+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v);
18504+typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v);
18505+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
18506+#endif
18507+
18508+#ifndef GL_VERSION_2_1
18509+#define GL_VERSION_2_1 1
18510+#ifdef GL_GLEXT_PROTOTYPES
18511+GLAPI void APIENTRY glUniformMatrix2x3fv (GLint, GLsizei, GLboolean, const GLfloat *);
18512+GLAPI void APIENTRY glUniformMatrix3x2fv (GLint, GLsizei, GLboolean, const GLfloat *);
18513+GLAPI void APIENTRY glUniformMatrix2x4fv (GLint, GLsizei, GLboolean, const GLfloat *);
18514+GLAPI void APIENTRY glUniformMatrix4x2fv (GLint, GLsizei, GLboolean, const GLfloat *);
18515+GLAPI void APIENTRY glUniformMatrix3x4fv (GLint, GLsizei, GLboolean, const GLfloat *);
18516+GLAPI void APIENTRY glUniformMatrix4x3fv (GLint, GLsizei, GLboolean, const GLfloat *);
18517+#endif /* GL_GLEXT_PROTOTYPES */
18518+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18519+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18520+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18521+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18522+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18523+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18524+#endif
18525+
18526+#ifndef GL_ARB_multitexture
18527+#define GL_ARB_multitexture 1
18528+#ifdef GL_GLEXT_PROTOTYPES
18529+GLAPI void APIENTRY glActiveTextureARB (GLenum);
18530+GLAPI void APIENTRY glClientActiveTextureARB (GLenum);
18531+GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum, GLdouble);
18532+GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum, const GLdouble *);
18533+GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum, GLfloat);
18534+GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum, const GLfloat *);
18535+GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum, GLint);
18536+GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum, const GLint *);
18537+GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum, GLshort);
18538+GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum, const GLshort *);
18539+GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum, GLdouble, GLdouble);
18540+GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum, const GLdouble *);
18541+GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum, GLfloat, GLfloat);
18542+GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum, const GLfloat *);
18543+GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum, GLint, GLint);
18544+GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum, const GLint *);
18545+GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum, GLshort, GLshort);
18546+GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum, const GLshort *);
18547+GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum, GLdouble, GLdouble, GLdouble);
18548+GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum, const GLdouble *);
18549+GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum, GLfloat, GLfloat, GLfloat);
18550+GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum, const GLfloat *);
18551+GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum, GLint, GLint, GLint);
18552+GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum, const GLint *);
18553+GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum, GLshort, GLshort, GLshort);
18554+GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum, const GLshort *);
18555+GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
18556+GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum, const GLdouble *);
18557+GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
18558+GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum, const GLfloat *);
18559+GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum, GLint, GLint, GLint, GLint);
18560+GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum, const GLint *);
18561+GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum, GLshort, GLshort, GLshort, GLshort);
18562+GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum, const GLshort *);
18563+#endif /* GL_GLEXT_PROTOTYPES */
18564+typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
18565+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
18566+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
18567+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
18568+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
18569+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
18570+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
18571+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
18572+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
18573+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
18574+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
18575+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
18576+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
18577+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
18578+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
18579+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
18580+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
18581+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
18582+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
18583+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
18584+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
18585+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
18586+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
18587+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
18588+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
18589+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
18590+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
18591+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
18592+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
18593+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
18594+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
18595+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
18596+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
18597+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
18598+#endif
18599+
18600+#ifndef GL_ARB_transpose_matrix
18601+#define GL_ARB_transpose_matrix 1
18602+#ifdef GL_GLEXT_PROTOTYPES
18603+GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *);
18604+GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *);
18605+GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *);
18606+GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *);
18607+#endif /* GL_GLEXT_PROTOTYPES */
18608+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
18609+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
18610+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
18611+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
18612+#endif
18613+
18614+#ifndef GL_ARB_multisample
18615+#define GL_ARB_multisample 1
18616+#ifdef GL_GLEXT_PROTOTYPES
18617+GLAPI void APIENTRY glSampleCoverageARB (GLclampf, GLboolean);
18618+#endif /* GL_GLEXT_PROTOTYPES */
18619+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert);
18620+#endif
18621+
18622+#ifndef GL_ARB_texture_env_add
18623+#define GL_ARB_texture_env_add 1
18624+#endif
18625+
18626+#ifndef GL_ARB_texture_cube_map
18627+#define GL_ARB_texture_cube_map 1
18628+#endif
18629+
18630+#ifndef GL_ARB_texture_compression
18631+#define GL_ARB_texture_compression 1
18632+#ifdef GL_GLEXT_PROTOTYPES
18633+GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
18634+GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
18635+GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
18636+GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
18637+GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
18638+GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
18639+GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum, GLint, GLvoid *);
18640+#endif /* GL_GLEXT_PROTOTYPES */
18641+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
18642+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
18643+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
18644+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
18645+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
18646+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
18647+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid *img);
18648+#endif
18649+
18650+#ifndef GL_ARB_texture_border_clamp
18651+#define GL_ARB_texture_border_clamp 1
18652+#endif
18653+
18654+#ifndef GL_ARB_point_parameters
18655+#define GL_ARB_point_parameters 1
18656+#ifdef GL_GLEXT_PROTOTYPES
18657+GLAPI void APIENTRY glPointParameterfARB (GLenum, GLfloat);
18658+GLAPI void APIENTRY glPointParameterfvARB (GLenum, const GLfloat *);
18659+#endif /* GL_GLEXT_PROTOTYPES */
18660+typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param);
18661+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params);
18662+#endif
18663+
18664+#ifndef GL_ARB_vertex_blend
18665+#define GL_ARB_vertex_blend 1
18666+#ifdef GL_GLEXT_PROTOTYPES
18667+GLAPI void APIENTRY glWeightbvARB (GLint, const GLbyte *);
18668+GLAPI void APIENTRY glWeightsvARB (GLint, const GLshort *);
18669+GLAPI void APIENTRY glWeightivARB (GLint, const GLint *);
18670+GLAPI void APIENTRY glWeightfvARB (GLint, const GLfloat *);
18671+GLAPI void APIENTRY glWeightdvARB (GLint, const GLdouble *);
18672+GLAPI void APIENTRY glWeightubvARB (GLint, const GLubyte *);
18673+GLAPI void APIENTRY glWeightusvARB (GLint, const GLushort *);
18674+GLAPI void APIENTRY glWeightuivARB (GLint, const GLuint *);
18675+GLAPI void APIENTRY glWeightPointerARB (GLint, GLenum, GLsizei, const GLvoid *);
18676+GLAPI void APIENTRY glVertexBlendARB (GLint);
18677+#endif /* GL_GLEXT_PROTOTYPES */
18678+typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights);
18679+typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights);
18680+typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights);
18681+typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights);
18682+typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights);
18683+typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights);
18684+typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights);
18685+typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights);
18686+typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
18687+typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count);
18688+#endif
18689+
18690+#ifndef GL_ARB_matrix_palette
18691+#define GL_ARB_matrix_palette 1
18692+#ifdef GL_GLEXT_PROTOTYPES
18693+GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint);
18694+GLAPI void APIENTRY glMatrixIndexubvARB (GLint, const GLubyte *);
18695+GLAPI void APIENTRY glMatrixIndexusvARB (GLint, const GLushort *);
18696+GLAPI void APIENTRY glMatrixIndexuivARB (GLint, const GLuint *);
18697+GLAPI void APIENTRY glMatrixIndexPointerARB (GLint, GLenum, GLsizei, const GLvoid *);
18698+#endif /* GL_GLEXT_PROTOTYPES */
18699+typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index);
18700+typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices);
18701+typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices);
18702+typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices);
18703+typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
18704+#endif
18705+
18706+#ifndef GL_ARB_texture_env_combine
18707+#define GL_ARB_texture_env_combine 1
18708+#endif
18709+
18710+#ifndef GL_ARB_texture_env_crossbar
18711+#define GL_ARB_texture_env_crossbar 1
18712+#endif
18713+
18714+#ifndef GL_ARB_texture_env_dot3
18715+#define GL_ARB_texture_env_dot3 1
18716+#endif
18717+
18718+#ifndef GL_ARB_texture_mirrored_repeat
18719+#define GL_ARB_texture_mirrored_repeat 1
18720+#endif
18721+
18722+#ifndef GL_ARB_depth_texture
18723+#define GL_ARB_depth_texture 1
18724+#endif
18725+
18726+#ifndef GL_ARB_shadow
18727+#define GL_ARB_shadow 1
18728+#endif
18729+
18730+#ifndef GL_ARB_shadow_ambient
18731+#define GL_ARB_shadow_ambient 1
18732+#endif
18733+
18734+#ifndef GL_ARB_window_pos
18735+#define GL_ARB_window_pos 1
18736+#ifdef GL_GLEXT_PROTOTYPES
18737+GLAPI void APIENTRY glWindowPos2dARB (GLdouble, GLdouble);
18738+GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *);
18739+GLAPI void APIENTRY glWindowPos2fARB (GLfloat, GLfloat);
18740+GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *);
18741+GLAPI void APIENTRY glWindowPos2iARB (GLint, GLint);
18742+GLAPI void APIENTRY glWindowPos2ivARB (const GLint *);
18743+GLAPI void APIENTRY glWindowPos2sARB (GLshort, GLshort);
18744+GLAPI void APIENTRY glWindowPos2svARB (const GLshort *);
18745+GLAPI void APIENTRY glWindowPos3dARB (GLdouble, GLdouble, GLdouble);
18746+GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *);
18747+GLAPI void APIENTRY glWindowPos3fARB (GLfloat, GLfloat, GLfloat);
18748+GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *);
18749+GLAPI void APIENTRY glWindowPos3iARB (GLint, GLint, GLint);
18750+GLAPI void APIENTRY glWindowPos3ivARB (const GLint *);
18751+GLAPI void APIENTRY glWindowPos3sARB (GLshort, GLshort, GLshort);
18752+GLAPI void APIENTRY glWindowPos3svARB (const GLshort *);
18753+#endif /* GL_GLEXT_PROTOTYPES */
18754+typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y);
18755+typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v);
18756+typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y);
18757+typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v);
18758+typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y);
18759+typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v);
18760+typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y);
18761+typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v);
18762+typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z);
18763+typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v);
18764+typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z);
18765+typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v);
18766+typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z);
18767+typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v);
18768+typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z);
18769+typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v);
18770+#endif
18771+
18772+#ifndef GL_ARB_vertex_program
18773+#define GL_ARB_vertex_program 1
18774+#ifdef GL_GLEXT_PROTOTYPES
18775+GLAPI void APIENTRY glVertexAttrib1dARB (GLuint, GLdouble);
18776+GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint, const GLdouble *);
18777+GLAPI void APIENTRY glVertexAttrib1fARB (GLuint, GLfloat);
18778+GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint, const GLfloat *);
18779+GLAPI void APIENTRY glVertexAttrib1sARB (GLuint, GLshort);
18780+GLAPI void APIENTRY glVertexAttrib1svARB (GLuint, const GLshort *);
18781+GLAPI void APIENTRY glVertexAttrib2dARB (GLuint, GLdouble, GLdouble);
18782+GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint, const GLdouble *);
18783+GLAPI void APIENTRY glVertexAttrib2fARB (GLuint, GLfloat, GLfloat);
18784+GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint, const GLfloat *);
18785+GLAPI void APIENTRY glVertexAttrib2sARB (GLuint, GLshort, GLshort);
18786+GLAPI void APIENTRY glVertexAttrib2svARB (GLuint, const GLshort *);
18787+GLAPI void APIENTRY glVertexAttrib3dARB (GLuint, GLdouble, GLdouble, GLdouble);
18788+GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint, const GLdouble *);
18789+GLAPI void APIENTRY glVertexAttrib3fARB (GLuint, GLfloat, GLfloat, GLfloat);
18790+GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint, const GLfloat *);
18791+GLAPI void APIENTRY glVertexAttrib3sARB (GLuint, GLshort, GLshort, GLshort);
18792+GLAPI void APIENTRY glVertexAttrib3svARB (GLuint, const GLshort *);
18793+GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint, const GLbyte *);
18794+GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint, const GLint *);
18795+GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint, const GLshort *);
18796+GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
18797+GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint, const GLubyte *);
18798+GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint, const GLuint *);
18799+GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint, const GLushort *);
18800+GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint, const GLbyte *);
18801+GLAPI void APIENTRY glVertexAttrib4dARB (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
18802+GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint, const GLdouble *);
18803+GLAPI void APIENTRY glVertexAttrib4fARB (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
18804+GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint, const GLfloat *);
18805+GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint, const GLint *);
18806+GLAPI void APIENTRY glVertexAttrib4sARB (GLuint, GLshort, GLshort, GLshort, GLshort);
18807+GLAPI void APIENTRY glVertexAttrib4svARB (GLuint, const GLshort *);
18808+GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint, const GLubyte *);
18809+GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint, const GLuint *);
18810+GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint, const GLushort *);
18811+GLAPI void APIENTRY glVertexAttribPointerARB (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
18812+GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint);
18813+GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint);
18814+GLAPI void APIENTRY glProgramStringARB (GLenum, GLenum, GLsizei, const GLvoid *);
18815+GLAPI void APIENTRY glBindProgramARB (GLenum, GLuint);
18816+GLAPI void APIENTRY glDeleteProgramsARB (GLsizei, const GLuint *);
18817+GLAPI void APIENTRY glGenProgramsARB (GLsizei, GLuint *);
18818+GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
18819+GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum, GLuint, const GLdouble *);
18820+GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
18821+GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum, GLuint, const GLfloat *);
18822+GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
18823+GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum, GLuint, const GLdouble *);
18824+GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
18825+GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum, GLuint, const GLfloat *);
18826+GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum, GLuint, GLdouble *);
18827+GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum, GLuint, GLfloat *);
18828+GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum, GLuint, GLdouble *);
18829+GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum, GLuint, GLfloat *);
18830+GLAPI void APIENTRY glGetProgramivARB (GLenum, GLenum, GLint *);
18831+GLAPI void APIENTRY glGetProgramStringARB (GLenum, GLenum, GLvoid *);
18832+GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint, GLenum, GLdouble *);
18833+GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint, GLenum, GLfloat *);
18834+GLAPI void APIENTRY glGetVertexAttribivARB (GLuint, GLenum, GLint *);
18835+GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint, GLenum, GLvoid* *);
18836+GLAPI GLboolean APIENTRY glIsProgramARB (GLuint);
18837+#endif /* GL_GLEXT_PROTOTYPES */
18838+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x);
18839+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v);
18840+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);
18841+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v);
18842+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x);
18843+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v);
18844+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y);
18845+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v);
18846+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);
18847+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v);
18848+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y);
18849+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v);
18850+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
18851+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v);
18852+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
18853+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v);
18854+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
18855+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v);
18856+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v);
18857+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v);
18858+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v);
18859+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
18860+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v);
18861+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v);
18862+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v);
18863+typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v);
18864+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
18865+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v);
18866+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
18867+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v);
18868+typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v);
18869+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
18870+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v);
18871+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v);
18872+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v);
18873+typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v);
18874+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
18875+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
18876+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
18877+typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string);
18878+typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program);
18879+typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs);
18880+typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs);
18881+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
18882+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
18883+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
18884+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
18885+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
18886+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
18887+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
18888+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
18889+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
18890+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
18891+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
18892+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
18893+typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);
18894+typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string);
18895+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params);
18896+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params);
18897+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params);
18898+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
18899+typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program);
18900+#endif
18901+
18902+#ifndef GL_ARB_fragment_program
18903+#define GL_ARB_fragment_program 1
18904+/* All ARB_fragment_program entry points are shared with ARB_vertex_program. */
18905+#endif
18906+
18907+#ifndef GL_ARB_vertex_buffer_object
18908+#define GL_ARB_vertex_buffer_object 1
18909+#ifdef GL_GLEXT_PROTOTYPES
18910+GLAPI void APIENTRY glBindBufferARB (GLenum, GLuint);
18911+GLAPI void APIENTRY glDeleteBuffersARB (GLsizei, const GLuint *);
18912+GLAPI void APIENTRY glGenBuffersARB (GLsizei, GLuint *);
18913+GLAPI GLboolean APIENTRY glIsBufferARB (GLuint);
18914+GLAPI void APIENTRY glBufferDataARB (GLenum, GLsizeiptrARB, const GLvoid *, GLenum);
18915+GLAPI void APIENTRY glBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *);
18916+GLAPI void APIENTRY glGetBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *);
18917+GLAPI GLvoid* APIENTRY glMapBufferARB (GLenum, GLenum);
18918+GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum);
18919+GLAPI void APIENTRY glGetBufferParameterivARB (GLenum, GLenum, GLint *);
18920+GLAPI void APIENTRY glGetBufferPointervARB (GLenum, GLenum, GLvoid* *);
18921+#endif /* GL_GLEXT_PROTOTYPES */
18922+typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
18923+typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers);
18924+typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers);
18925+typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer);
18926+typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage);
18927+typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data);
18928+typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data);
18929+typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);
18930+typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target);
18931+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params);
18932+typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params);
18933+#endif
18934+
18935+#ifndef GL_ARB_occlusion_query
18936+#define GL_ARB_occlusion_query 1
18937+#ifdef GL_GLEXT_PROTOTYPES
18938+GLAPI void APIENTRY glGenQueriesARB (GLsizei, GLuint *);
18939+GLAPI void APIENTRY glDeleteQueriesARB (GLsizei, const GLuint *);
18940+GLAPI GLboolean APIENTRY glIsQueryARB (GLuint);
18941+GLAPI void APIENTRY glBeginQueryARB (GLenum, GLuint);
18942+GLAPI void APIENTRY glEndQueryARB (GLenum);
18943+GLAPI void APIENTRY glGetQueryivARB (GLenum, GLenum, GLint *);
18944+GLAPI void APIENTRY glGetQueryObjectivARB (GLuint, GLenum, GLint *);
18945+GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint, GLenum, GLuint *);
18946+#endif /* GL_GLEXT_PROTOTYPES */
18947+typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids);
18948+typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids);
18949+typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id);
18950+typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id);
18951+typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target);
18952+typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params);
18953+typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params);
18954+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params);
18955+#endif
18956+
18957+#ifndef GL_ARB_shader_objects
18958+#define GL_ARB_shader_objects 1
18959+#ifdef GL_GLEXT_PROTOTYPES
18960+GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB);
18961+GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum);
18962+GLAPI void APIENTRY glDetachObjectARB (GLhandleARB, GLhandleARB);
18963+GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum);
18964+GLAPI void APIENTRY glShaderSourceARB (GLhandleARB, GLsizei, const GLcharARB* *, const GLint *);
18965+GLAPI void APIENTRY glCompileShaderARB (GLhandleARB);
18966+GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void);
18967+GLAPI void APIENTRY glAttachObjectARB (GLhandleARB, GLhandleARB);
18968+GLAPI void APIENTRY glLinkProgramARB (GLhandleARB);
18969+GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB);
18970+GLAPI void APIENTRY glValidateProgramARB (GLhandleARB);
18971+GLAPI void APIENTRY glUniform1fARB (GLint, GLfloat);
18972+GLAPI void APIENTRY glUniform2fARB (GLint, GLfloat, GLfloat);
18973+GLAPI void APIENTRY glUniform3fARB (GLint, GLfloat, GLfloat, GLfloat);
18974+GLAPI void APIENTRY glUniform4fARB (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
18975+GLAPI void APIENTRY glUniform1iARB (GLint, GLint);
18976+GLAPI void APIENTRY glUniform2iARB (GLint, GLint, GLint);
18977+GLAPI void APIENTRY glUniform3iARB (GLint, GLint, GLint, GLint);
18978+GLAPI void APIENTRY glUniform4iARB (GLint, GLint, GLint, GLint, GLint);
18979+GLAPI void APIENTRY glUniform1fvARB (GLint, GLsizei, const GLfloat *);
18980+GLAPI void APIENTRY glUniform2fvARB (GLint, GLsizei, const GLfloat *);
18981+GLAPI void APIENTRY glUniform3fvARB (GLint, GLsizei, const GLfloat *);
18982+GLAPI void APIENTRY glUniform4fvARB (GLint, GLsizei, const GLfloat *);
18983+GLAPI void APIENTRY glUniform1ivARB (GLint, GLsizei, const GLint *);
18984+GLAPI void APIENTRY glUniform2ivARB (GLint, GLsizei, const GLint *);
18985+GLAPI void APIENTRY glUniform3ivARB (GLint, GLsizei, const GLint *);
18986+GLAPI void APIENTRY glUniform4ivARB (GLint, GLsizei, const GLint *);
18987+GLAPI void APIENTRY glUniformMatrix2fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
18988+GLAPI void APIENTRY glUniformMatrix3fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
18989+GLAPI void APIENTRY glUniformMatrix4fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
18990+GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB, GLenum, GLfloat *);
18991+GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB, GLenum, GLint *);
18992+GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
18993+GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB, GLsizei, GLsizei *, GLhandleARB *);
18994+GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB, const GLcharARB *);
18995+GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
18996+GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB, GLint, GLfloat *);
18997+GLAPI void APIENTRY glGetUniformivARB (GLhandleARB, GLint, GLint *);
18998+GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
18999+#endif /* GL_GLEXT_PROTOTYPES */
19000+typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj);
19001+typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname);
19002+typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj);
19003+typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType);
19004+typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length);
19005+typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj);
19006+typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void);
19007+typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj);
19008+typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj);
19009+typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj);
19010+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj);
19011+typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0);
19012+typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1);
19013+typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
19014+typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
19015+typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0);
19016+typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1);
19017+typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2);
19018+typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
19019+typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
19020+typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
19021+typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
19022+typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
19023+typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value);
19024+typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value);
19025+typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value);
19026+typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value);
19027+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
19028+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
19029+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
19030+typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params);
19031+typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params);
19032+typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
19033+typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
19034+typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
19035+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
19036+typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params);
19037+typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params);
19038+typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
19039+#endif
19040+
19041+#ifndef GL_ARB_vertex_shader
19042+#define GL_ARB_vertex_shader 1
19043+#ifdef GL_GLEXT_PROTOTYPES
19044+GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB, GLuint, const GLcharARB *);
19045+GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
19046+GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB, const GLcharARB *);
19047+#endif /* GL_GLEXT_PROTOTYPES */
19048+typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name);
19049+typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
19050+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
19051+#endif
19052+
19053+#ifndef GL_ARB_fragment_shader
19054+#define GL_ARB_fragment_shader 1
19055+#endif
19056+
19057+#ifndef GL_ARB_shading_language_100
19058+#define GL_ARB_shading_language_100 1
19059+#endif
19060+
19061+#ifndef GL_ARB_texture_non_power_of_two
19062+#define GL_ARB_texture_non_power_of_two 1
19063+#endif
19064+
19065+#ifndef GL_ARB_point_sprite
19066+#define GL_ARB_point_sprite 1
19067+#endif
19068+
19069+#ifndef GL_ARB_fragment_program_shadow
19070+#define GL_ARB_fragment_program_shadow 1
19071+#endif
19072+
19073+#ifndef GL_ARB_draw_buffers
19074+#define GL_ARB_draw_buffers 1
19075+#ifdef GL_GLEXT_PROTOTYPES
19076+GLAPI void APIENTRY glDrawBuffersARB (GLsizei, const GLenum *);
19077+#endif /* GL_GLEXT_PROTOTYPES */
19078+typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs);
19079+#endif
19080+
19081+#ifndef GL_ARB_texture_rectangle
19082+#define GL_ARB_texture_rectangle 1
19083+#endif
19084+
19085+#ifndef GL_ARB_color_buffer_float
19086+#define GL_ARB_color_buffer_float 1
19087+#ifdef GL_GLEXT_PROTOTYPES
19088+GLAPI void APIENTRY glClampColorARB (GLenum, GLenum);
19089+#endif /* GL_GLEXT_PROTOTYPES */
19090+typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);
19091+#endif
19092+
19093+#ifndef GL_ARB_half_float_pixel
19094+#define GL_ARB_half_float_pixel 1
19095+#endif
19096+
19097+#ifndef GL_ARB_texture_float
19098+#define GL_ARB_texture_float 1
19099+#endif
19100+
19101+#ifndef GL_ARB_pixel_buffer_object
19102+#define GL_ARB_pixel_buffer_object 1
19103+#endif
19104+
19105+#ifndef GL_EXT_abgr
19106+#define GL_EXT_abgr 1
19107+#endif
19108+
19109+#ifndef GL_EXT_blend_color
19110+#define GL_EXT_blend_color 1
19111+#ifdef GL_GLEXT_PROTOTYPES
19112+GLAPI void APIENTRY glBlendColorEXT (GLclampf, GLclampf, GLclampf, GLclampf);
19113+#endif /* GL_GLEXT_PROTOTYPES */
19114+typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
19115+#endif
19116+
19117+#ifndef GL_EXT_polygon_offset
19118+#define GL_EXT_polygon_offset 1
19119+#ifdef GL_GLEXT_PROTOTYPES
19120+GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat, GLfloat);
19121+#endif /* GL_GLEXT_PROTOTYPES */
19122+typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias);
19123+#endif
19124+
19125+#ifndef GL_EXT_texture
19126+#define GL_EXT_texture 1
19127+#endif
19128+
19129+#ifndef GL_EXT_texture3D
19130+#define GL_EXT_texture3D 1
19131+#ifdef GL_GLEXT_PROTOTYPES
19132+GLAPI void APIENTRY glTexImage3DEXT (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
19133+GLAPI void APIENTRY glTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19134+#endif /* GL_GLEXT_PROTOTYPES */
19135+typedef void (APIENTRYP PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
19136+typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
19137+#endif
19138+
19139+#ifndef GL_SGIS_texture_filter4
19140+#define GL_SGIS_texture_filter4 1
19141+#ifdef GL_GLEXT_PROTOTYPES
19142+GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum, GLenum, GLfloat *);
19143+GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum, GLenum, GLsizei, const GLfloat *);
19144+#endif /* GL_GLEXT_PROTOTYPES */
19145+typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights);
19146+typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);
19147+#endif
19148+
19149+#ifndef GL_EXT_subtexture
19150+#define GL_EXT_subtexture 1
19151+#ifdef GL_GLEXT_PROTOTYPES
19152+GLAPI void APIENTRY glTexSubImage1DEXT (GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *);
19153+GLAPI void APIENTRY glTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19154+#endif /* GL_GLEXT_PROTOTYPES */
19155+typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
19156+typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
19157+#endif
19158+
19159+#ifndef GL_EXT_copy_texture
19160+#define GL_EXT_copy_texture 1
19161+#ifdef GL_GLEXT_PROTOTYPES
19162+GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint);
19163+GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint);
19164+GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei);
19165+GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
19166+GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
19167+#endif /* GL_GLEXT_PROTOTYPES */
19168+typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
19169+typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
19170+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
19171+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
19172+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
19173+#endif
19174+
19175+#ifndef GL_EXT_histogram
19176+#define GL_EXT_histogram 1
19177+#ifdef GL_GLEXT_PROTOTYPES
19178+GLAPI void APIENTRY glGetHistogramEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
19179+GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum, GLenum, GLfloat *);
19180+GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum, GLenum, GLint *);
19181+GLAPI void APIENTRY glGetMinmaxEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
19182+GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum, GLenum, GLfloat *);
19183+GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum, GLenum, GLint *);
19184+GLAPI void APIENTRY glHistogramEXT (GLenum, GLsizei, GLenum, GLboolean);
19185+GLAPI void APIENTRY glMinmaxEXT (GLenum, GLenum, GLboolean);
19186+GLAPI void APIENTRY glResetHistogramEXT (GLenum);
19187+GLAPI void APIENTRY glResetMinmaxEXT (GLenum);
19188+#endif /* GL_GLEXT_PROTOTYPES */
19189+typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
19190+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19191+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19192+typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
19193+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19194+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19195+typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
19196+typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink);
19197+typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target);
19198+typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target);
19199+#endif
19200+
19201+#ifndef GL_EXT_convolution
19202+#define GL_EXT_convolution 1
19203+#ifdef GL_GLEXT_PROTOTYPES
19204+GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
19205+GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19206+GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum, GLenum, GLfloat);
19207+GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum, GLenum, const GLfloat *);
19208+GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum, GLenum, GLint);
19209+GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum, GLenum, const GLint *);
19210+GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum, GLenum, GLint, GLint, GLsizei);
19211+GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
19212+GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum, GLenum, GLenum, GLvoid *);
19213+GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum, GLenum, GLfloat *);
19214+GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum, GLenum, GLint *);
19215+GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
19216+GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
19217+#endif /* GL_GLEXT_PROTOTYPES */
19218+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
19219+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
19220+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params);
19221+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
19222+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params);
19223+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
19224+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
19225+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
19226+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
19227+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19228+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19229+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
19230+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
19231+#endif
19232+
19233+#ifndef GL_SGI_color_matrix
19234+#define GL_SGI_color_matrix 1
19235+#endif
19236+
19237+#ifndef GL_SGI_color_table
19238+#define GL_SGI_color_table 1
19239+#ifdef GL_GLEXT_PROTOTYPES
19240+GLAPI void APIENTRY glColorTableSGI (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
19241+GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum, GLenum, const GLfloat *);
19242+GLAPI void APIENTRY glColorTableParameterivSGI (GLenum, GLenum, const GLint *);
19243+GLAPI void APIENTRY glCopyColorTableSGI (GLenum, GLenum, GLint, GLint, GLsizei);
19244+GLAPI void APIENTRY glGetColorTableSGI (GLenum, GLenum, GLenum, GLvoid *);
19245+GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum, GLenum, GLfloat *);
19246+GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum, GLenum, GLint *);
19247+#endif /* GL_GLEXT_PROTOTYPES */
19248+typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
19249+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params);
19250+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params);
19251+typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
19252+typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
19253+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params);
19254+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params);
19255+#endif
19256+
19257+#ifndef GL_SGIX_pixel_texture
19258+#define GL_SGIX_pixel_texture 1
19259+#ifdef GL_GLEXT_PROTOTYPES
19260+GLAPI void APIENTRY glPixelTexGenSGIX (GLenum);
19261+#endif /* GL_GLEXT_PROTOTYPES */
19262+typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode);
19263+#endif
19264+
19265+#ifndef GL_SGIS_pixel_texture
19266+#define GL_SGIS_pixel_texture 1
19267+#ifdef GL_GLEXT_PROTOTYPES
19268+GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum, GLint);
19269+GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum, const GLint *);
19270+GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum, GLfloat);
19271+GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum, const GLfloat *);
19272+GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum, GLint *);
19273+GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum, GLfloat *);
19274+#endif /* GL_GLEXT_PROTOTYPES */
19275+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param);
19276+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params);
19277+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
19278+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
19279+typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params);
19280+typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params);
19281+#endif
19282+
19283+#ifndef GL_SGIS_texture4D
19284+#define GL_SGIS_texture4D 1
19285+#ifdef GL_GLEXT_PROTOTYPES
19286+GLAPI void APIENTRY glTexImage4DSGIS (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
19287+GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19288+#endif /* GL_GLEXT_PROTOTYPES */
19289+typedef void (APIENTRYP PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
19290+typedef void (APIENTRYP PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels);
19291+#endif
19292+
19293+#ifndef GL_SGI_texture_color_table
19294+#define GL_SGI_texture_color_table 1
19295+#endif
19296+
19297+#ifndef GL_EXT_cmyka
19298+#define GL_EXT_cmyka 1
19299+#endif
19300+
19301+#ifndef GL_EXT_texture_object
19302+#define GL_EXT_texture_object 1
19303+#ifdef GL_GLEXT_PROTOTYPES
19304+GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei, const GLuint *, GLboolean *);
19305+GLAPI void APIENTRY glBindTextureEXT (GLenum, GLuint);
19306+GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei, const GLuint *);
19307+GLAPI void APIENTRY glGenTexturesEXT (GLsizei, GLuint *);
19308+GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint);
19309+GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei, const GLuint *, const GLclampf *);
19310+#endif /* GL_GLEXT_PROTOTYPES */
19311+typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences);
19312+typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture);
19313+typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures);
19314+typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures);
19315+typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture);
19316+typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities);
19317+#endif
19318+
19319+#ifndef GL_SGIS_detail_texture
19320+#define GL_SGIS_detail_texture 1
19321+#ifdef GL_GLEXT_PROTOTYPES
19322+GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum, GLsizei, const GLfloat *);
19323+GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum, GLfloat *);
19324+#endif /* GL_GLEXT_PROTOTYPES */
19325+typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
19326+typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
19327+#endif
19328+
19329+#ifndef GL_SGIS_sharpen_texture
19330+#define GL_SGIS_sharpen_texture 1
19331+#ifdef GL_GLEXT_PROTOTYPES
19332+GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum, GLsizei, const GLfloat *);
19333+GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum, GLfloat *);
19334+#endif /* GL_GLEXT_PROTOTYPES */
19335+typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
19336+typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
19337+#endif
19338+
19339+#ifndef GL_EXT_packed_pixels
19340+#define GL_EXT_packed_pixels 1
19341+#endif
19342+
19343+#ifndef GL_SGIS_texture_lod
19344+#define GL_SGIS_texture_lod 1
19345+#endif
19346+
19347+#ifndef GL_SGIS_multisample
19348+#define GL_SGIS_multisample 1
19349+#ifdef GL_GLEXT_PROTOTYPES
19350+GLAPI void APIENTRY glSampleMaskSGIS (GLclampf, GLboolean);
19351+GLAPI void APIENTRY glSamplePatternSGIS (GLenum);
19352+#endif /* GL_GLEXT_PROTOTYPES */
19353+typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert);
19354+typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern);
19355+#endif
19356+
19357+#ifndef GL_EXT_rescale_normal
19358+#define GL_EXT_rescale_normal 1
19359+#endif
19360+
19361+#ifndef GL_EXT_vertex_array
19362+#define GL_EXT_vertex_array 1
19363+#ifdef GL_GLEXT_PROTOTYPES
19364+GLAPI void APIENTRY glArrayElementEXT (GLint);
19365+GLAPI void APIENTRY glColorPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
19366+GLAPI void APIENTRY glDrawArraysEXT (GLenum, GLint, GLsizei);
19367+GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei, GLsizei, const GLboolean *);
19368+GLAPI void APIENTRY glGetPointervEXT (GLenum, GLvoid* *);
19369+GLAPI void APIENTRY glIndexPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *);
19370+GLAPI void APIENTRY glNormalPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *);
19371+GLAPI void APIENTRY glTexCoordPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
19372+GLAPI void APIENTRY glVertexPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
19373+#endif /* GL_GLEXT_PROTOTYPES */
19374+typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i);
19375+typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19376+typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);
19377+typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer);
19378+typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params);
19379+typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19380+typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19381+typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19382+typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19383+#endif
19384+
19385+#ifndef GL_EXT_misc_attribute
19386+#define GL_EXT_misc_attribute 1
19387+#endif
19388+
19389+#ifndef GL_SGIS_generate_mipmap
19390+#define GL_SGIS_generate_mipmap 1
19391+#endif
19392+
19393+#ifndef GL_SGIX_clipmap
19394+#define GL_SGIX_clipmap 1
19395+#endif
19396+
19397+#ifndef GL_SGIX_shadow
19398+#define GL_SGIX_shadow 1
19399+#endif
19400+
19401+#ifndef GL_SGIS_texture_edge_clamp
19402+#define GL_SGIS_texture_edge_clamp 1
19403+#endif
19404+
19405+#ifndef GL_SGIS_texture_border_clamp
19406+#define GL_SGIS_texture_border_clamp 1
19407+#endif
19408+
19409+#ifndef GL_EXT_blend_minmax
19410+#define GL_EXT_blend_minmax 1
19411+#ifdef GL_GLEXT_PROTOTYPES
19412+GLAPI void APIENTRY glBlendEquationEXT (GLenum);
19413+#endif /* GL_GLEXT_PROTOTYPES */
19414+typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode);
19415+#endif
19416+
19417+#ifndef GL_EXT_blend_subtract
19418+#define GL_EXT_blend_subtract 1
19419+#endif
19420+
19421+#ifndef GL_EXT_blend_logic_op
19422+#define GL_EXT_blend_logic_op 1
19423+#endif
19424+
19425+#ifndef GL_SGIX_interlace
19426+#define GL_SGIX_interlace 1
19427+#endif
19428+
19429+#ifndef GL_SGIX_pixel_tiles
19430+#define GL_SGIX_pixel_tiles 1
19431+#endif
19432+
19433+#ifndef GL_SGIX_texture_select
19434+#define GL_SGIX_texture_select 1
19435+#endif
19436+
19437+#ifndef GL_SGIX_sprite
19438+#define GL_SGIX_sprite 1
19439+#ifdef GL_GLEXT_PROTOTYPES
19440+GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum, GLfloat);
19441+GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum, const GLfloat *);
19442+GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum, GLint);
19443+GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum, const GLint *);
19444+#endif /* GL_GLEXT_PROTOTYPES */
19445+typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param);
19446+typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params);
19447+typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param);
19448+typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params);
19449+#endif
19450+
19451+#ifndef GL_SGIX_texture_multi_buffer
19452+#define GL_SGIX_texture_multi_buffer 1
19453+#endif
19454+
19455+#ifndef GL_EXT_point_parameters
19456+#define GL_EXT_point_parameters 1
19457+#ifdef GL_GLEXT_PROTOTYPES
19458+GLAPI void APIENTRY glPointParameterfEXT (GLenum, GLfloat);
19459+GLAPI void APIENTRY glPointParameterfvEXT (GLenum, const GLfloat *);
19460+/* ERO Begin */
19461+GLAPI void APIENTRY glPointParameteriEXT (GLenum, GLint);
19462+GLAPI void APIENTRY glPointParameterivEXT (GLenum, const GLint *);
19463+/* ERO end */
19464+#endif /* GL_GLEXT_PROTOTYPES */
19465+typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);
19466+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params);
19467+#endif
19468+
19469+#ifndef GL_SGIS_point_parameters
19470+#define GL_SGIS_point_parameters 1
19471+#ifdef GL_GLEXT_PROTOTYPES
19472+GLAPI void APIENTRY glPointParameterfSGIS (GLenum, GLfloat);
19473+GLAPI void APIENTRY glPointParameterfvSGIS (GLenum, const GLfloat *);
19474+#endif /* GL_GLEXT_PROTOTYPES */
19475+typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
19476+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
19477+#endif
19478+
19479+#ifndef GL_SGIX_instruments
19480+#define GL_SGIX_instruments 1
19481+#ifdef GL_GLEXT_PROTOTYPES
19482+GLAPI GLint APIENTRY glGetInstrumentsSGIX (void);
19483+GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei, GLint *);
19484+GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *);
19485+GLAPI void APIENTRY glReadInstrumentsSGIX (GLint);
19486+GLAPI void APIENTRY glStartInstrumentsSGIX (void);
19487+GLAPI void APIENTRY glStopInstrumentsSGIX (GLint);
19488+#endif /* GL_GLEXT_PROTOTYPES */
19489+typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void);
19490+typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer);
19491+typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p);
19492+typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker);
19493+typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void);
19494+typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker);
19495+#endif
19496+
19497+#ifndef GL_SGIX_texture_scale_bias
19498+#define GL_SGIX_texture_scale_bias 1
19499+#endif
19500+
19501+#ifndef GL_SGIX_framezoom
19502+#define GL_SGIX_framezoom 1
19503+#ifdef GL_GLEXT_PROTOTYPES
19504+GLAPI void APIENTRY glFrameZoomSGIX (GLint);
19505+#endif /* GL_GLEXT_PROTOTYPES */
19506+typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor);
19507+#endif
19508+
19509+#ifndef GL_SGIX_tag_sample_buffer
19510+#define GL_SGIX_tag_sample_buffer 1
19511+#ifdef GL_GLEXT_PROTOTYPES
19512+GLAPI void APIENTRY glTagSampleBufferSGIX (void);
19513+#endif /* GL_GLEXT_PROTOTYPES */
19514+typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void);
19515+#endif
19516+
19517+#ifndef GL_SGIX_polynomial_ffd
19518+#define GL_SGIX_polynomial_ffd 1
19519+#ifdef GL_GLEXT_PROTOTYPES
19520+GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *);
19521+GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *);
19522+GLAPI void APIENTRY glDeformSGIX (GLbitfield);
19523+GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield);
19524+#endif /* GL_GLEXT_PROTOTYPES */
19525+typedef void (APIENTRYP PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points);
19526+typedef void (APIENTRYP PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points);
19527+typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask);
19528+typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask);
19529+#endif
19530+
19531+#ifndef GL_SGIX_reference_plane
19532+#define GL_SGIX_reference_plane 1
19533+#ifdef GL_GLEXT_PROTOTYPES
19534+GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *);
19535+#endif /* GL_GLEXT_PROTOTYPES */
19536+typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation);
19537+#endif
19538+
19539+#ifndef GL_SGIX_flush_raster
19540+#define GL_SGIX_flush_raster 1
19541+#ifdef GL_GLEXT_PROTOTYPES
19542+GLAPI void APIENTRY glFlushRasterSGIX (void);
19543+#endif /* GL_GLEXT_PROTOTYPES */
19544+typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void);
19545+#endif
19546+
19547+#ifndef GL_SGIX_depth_texture
19548+#define GL_SGIX_depth_texture 1
19549+#endif
19550+
19551+#ifndef GL_SGIS_fog_function
19552+#define GL_SGIS_fog_function 1
19553+#ifdef GL_GLEXT_PROTOTYPES
19554+GLAPI void APIENTRY glFogFuncSGIS (GLsizei, const GLfloat *);
19555+GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *);
19556+#endif /* GL_GLEXT_PROTOTYPES */
19557+typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points);
19558+typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points);
19559+#endif
19560+
19561+#ifndef GL_SGIX_fog_offset
19562+#define GL_SGIX_fog_offset 1
19563+#endif
19564+
19565+#ifndef GL_HP_image_transform
19566+#define GL_HP_image_transform 1
19567+#ifdef GL_GLEXT_PROTOTYPES
19568+GLAPI void APIENTRY glImageTransformParameteriHP (GLenum, GLenum, GLint);
19569+GLAPI void APIENTRY glImageTransformParameterfHP (GLenum, GLenum, GLfloat);
19570+GLAPI void APIENTRY glImageTransformParameterivHP (GLenum, GLenum, const GLint *);
19571+GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum, GLenum, const GLfloat *);
19572+GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum, GLenum, GLint *);
19573+GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum, GLenum, GLfloat *);
19574+#endif /* GL_GLEXT_PROTOTYPES */
19575+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param);
19576+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param);
19577+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params);
19578+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params);
19579+typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params);
19580+typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params);
19581+#endif
19582+
19583+#ifndef GL_HP_convolution_border_modes
19584+#define GL_HP_convolution_border_modes 1
19585+#endif
19586+
19587+#ifndef GL_SGIX_texture_add_env
19588+#define GL_SGIX_texture_add_env 1
19589+#endif
19590+
19591+#ifndef GL_EXT_color_subtable
19592+#define GL_EXT_color_subtable 1
19593+#ifdef GL_GLEXT_PROTOTYPES
19594+GLAPI void APIENTRY glColorSubTableEXT (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19595+GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum, GLsizei, GLint, GLint, GLsizei);
19596+#endif /* GL_GLEXT_PROTOTYPES */
19597+typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
19598+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
19599+#endif
19600+
19601+#ifndef GL_PGI_vertex_hints
19602+#define GL_PGI_vertex_hints 1
19603+#endif
19604+
19605+#ifndef GL_PGI_misc_hints
19606+#define GL_PGI_misc_hints 1
19607+#ifdef GL_GLEXT_PROTOTYPES
19608+GLAPI void APIENTRY glHintPGI (GLenum, GLint);
19609+#endif /* GL_GLEXT_PROTOTYPES */
19610+typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode);
19611+#endif
19612+
19613+#ifndef GL_EXT_paletted_texture
19614+#define GL_EXT_paletted_texture 1
19615+#ifdef GL_GLEXT_PROTOTYPES
19616+GLAPI void APIENTRY glColorTableEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
19617+GLAPI void APIENTRY glGetColorTableEXT (GLenum, GLenum, GLenum, GLvoid *);
19618+GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum, GLenum, GLint *);
19619+GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum, GLenum, GLfloat *);
19620+#endif /* GL_GLEXT_PROTOTYPES */
19621+typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
19622+typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data);
19623+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19624+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19625+#endif
19626+
19627+#ifndef GL_EXT_clip_volume_hint
19628+#define GL_EXT_clip_volume_hint 1
19629+#endif
19630+
19631+#ifndef GL_SGIX_list_priority
19632+#define GL_SGIX_list_priority 1
19633+#ifdef GL_GLEXT_PROTOTYPES
19634+GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint, GLenum, GLfloat *);
19635+GLAPI void APIENTRY glGetListParameterivSGIX (GLuint, GLenum, GLint *);
19636+GLAPI void APIENTRY glListParameterfSGIX (GLuint, GLenum, GLfloat);
19637+GLAPI void APIENTRY glListParameterfvSGIX (GLuint, GLenum, const GLfloat *);
19638+GLAPI void APIENTRY glListParameteriSGIX (GLuint, GLenum, GLint);
19639+GLAPI void APIENTRY glListParameterivSGIX (GLuint, GLenum, const GLint *);
19640+#endif /* GL_GLEXT_PROTOTYPES */
19641+typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params);
19642+typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params);
19643+typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param);
19644+typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params);
19645+typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param);
19646+typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params);
19647+#endif
19648+
19649+#ifndef GL_SGIX_ir_instrument1
19650+#define GL_SGIX_ir_instrument1 1
19651+#endif
19652+
19653+#ifndef GL_SGIX_calligraphic_fragment
19654+#define GL_SGIX_calligraphic_fragment 1
19655+#endif
19656+
19657+#ifndef GL_SGIX_texture_lod_bias
19658+#define GL_SGIX_texture_lod_bias 1
19659+#endif
19660+
19661+#ifndef GL_SGIX_shadow_ambient
19662+#define GL_SGIX_shadow_ambient 1
19663+#endif
19664+
19665+#ifndef GL_EXT_index_texture
19666+#define GL_EXT_index_texture 1
19667+#endif
19668+
19669+#ifndef GL_EXT_index_material
19670+#define GL_EXT_index_material 1
19671+#ifdef GL_GLEXT_PROTOTYPES
19672+GLAPI void APIENTRY glIndexMaterialEXT (GLenum, GLenum);
19673+#endif /* GL_GLEXT_PROTOTYPES */
19674+typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode);
19675+#endif
19676+
19677+#ifndef GL_EXT_index_func
19678+#define GL_EXT_index_func 1
19679+#ifdef GL_GLEXT_PROTOTYPES
19680+GLAPI void APIENTRY glIndexFuncEXT (GLenum, GLclampf);
19681+#endif /* GL_GLEXT_PROTOTYPES */
19682+typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref);
19683+#endif
19684+
19685+#ifndef GL_EXT_index_array_formats
19686+#define GL_EXT_index_array_formats 1
19687+#endif
19688+
19689+#ifndef GL_EXT_compiled_vertex_array
19690+#define GL_EXT_compiled_vertex_array 1
19691+#ifdef GL_GLEXT_PROTOTYPES
19692+GLAPI void APIENTRY glLockArraysEXT (GLint, GLsizei);
19693+GLAPI void APIENTRY glUnlockArraysEXT (void);
19694+#endif /* GL_GLEXT_PROTOTYPES */
19695+typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);
19696+typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void);
19697+#endif
19698+
19699+#ifndef GL_EXT_cull_vertex
19700+#define GL_EXT_cull_vertex 1
19701+#ifdef GL_GLEXT_PROTOTYPES
19702+GLAPI void APIENTRY glCullParameterdvEXT (GLenum, GLdouble *);
19703+GLAPI void APIENTRY glCullParameterfvEXT (GLenum, GLfloat *);
19704+#endif /* GL_GLEXT_PROTOTYPES */
19705+typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params);
19706+typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params);
19707+#endif
19708+
19709+#ifndef GL_SGIX_ycrcb
19710+#define GL_SGIX_ycrcb 1
19711+#endif
19712+
19713+#ifndef GL_SGIX_fragment_lighting
19714+#define GL_SGIX_fragment_lighting 1
19715+#ifdef GL_GLEXT_PROTOTYPES
19716+GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum, GLenum);
19717+GLAPI void APIENTRY glFragmentLightfSGIX (GLenum, GLenum, GLfloat);
19718+GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum, GLenum, const GLfloat *);
19719+GLAPI void APIENTRY glFragmentLightiSGIX (GLenum, GLenum, GLint);
19720+GLAPI void APIENTRY glFragmentLightivSGIX (GLenum, GLenum, const GLint *);
19721+GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum, GLfloat);
19722+GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum, const GLfloat *);
19723+GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum, GLint);
19724+GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum, const GLint *);
19725+GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum, GLenum, GLfloat);
19726+GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum, GLenum, const GLfloat *);
19727+GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum, GLenum, GLint);
19728+GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum, GLenum, const GLint *);
19729+GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum, GLenum, GLfloat *);
19730+GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum, GLenum, GLint *);
19731+GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum, GLenum, GLfloat *);
19732+GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum, GLenum, GLint *);
19733+GLAPI void APIENTRY glLightEnviSGIX (GLenum, GLint);
19734+#endif /* GL_GLEXT_PROTOTYPES */
19735+typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode);
19736+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param);
19737+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);
19738+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param);
19739+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params);
19740+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param);
19741+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params);
19742+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param);
19743+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params);
19744+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param);
19745+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params);
19746+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param);
19747+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params);
19748+typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params);
19749+typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params);
19750+typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params);
19751+typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params);
19752+typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param);
19753+#endif
19754+
19755+#ifndef GL_IBM_rasterpos_clip
19756+#define GL_IBM_rasterpos_clip 1
19757+#endif
19758+
19759+#ifndef GL_HP_texture_lighting
19760+#define GL_HP_texture_lighting 1
19761+#endif
19762+
19763+#ifndef GL_EXT_draw_range_elements
19764+#define GL_EXT_draw_range_elements 1
19765+#ifdef GL_GLEXT_PROTOTYPES
19766+GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
19767+#endif /* GL_GLEXT_PROTOTYPES */
19768+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
19769+#endif
19770+
19771+#ifndef GL_WIN_phong_shading
19772+#define GL_WIN_phong_shading 1
19773+#endif
19774+
19775+#ifndef GL_WIN_specular_fog
19776+#define GL_WIN_specular_fog 1
19777+#endif
19778+
19779+#ifndef GL_EXT_light_texture
19780+#define GL_EXT_light_texture 1
19781+#ifdef GL_GLEXT_PROTOTYPES
19782+GLAPI void APIENTRY glApplyTextureEXT (GLenum);
19783+GLAPI void APIENTRY glTextureLightEXT (GLenum);
19784+GLAPI void APIENTRY glTextureMaterialEXT (GLenum, GLenum);
19785+#endif /* GL_GLEXT_PROTOTYPES */
19786+typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode);
19787+typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname);
19788+typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode);
19789+#endif
19790+
19791+#ifndef GL_SGIX_blend_alpha_minmax
19792+#define GL_SGIX_blend_alpha_minmax 1
19793+#endif
19794+
19795+#ifndef GL_EXT_bgra
19796+#define GL_EXT_bgra 1
19797+#endif
19798+
19799+#ifndef GL_SGIX_async
19800+#define GL_SGIX_async 1
19801+#ifdef GL_GLEXT_PROTOTYPES
19802+GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint);
19803+GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *);
19804+GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *);
19805+GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei);
19806+GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint, GLsizei);
19807+GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint);
19808+#endif /* GL_GLEXT_PROTOTYPES */
19809+typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker);
19810+typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp);
19811+typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp);
19812+typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range);
19813+typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range);
19814+typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker);
19815+#endif
19816+
19817+#ifndef GL_SGIX_async_pixel
19818+#define GL_SGIX_async_pixel 1
19819+#endif
19820+
19821+#ifndef GL_SGIX_async_histogram
19822+#define GL_SGIX_async_histogram 1
19823+#endif
19824+
19825+#ifndef GL_INTEL_parallel_arrays
19826+#define GL_INTEL_parallel_arrays 1
19827+#ifdef GL_GLEXT_PROTOTYPES
19828+GLAPI void APIENTRY glVertexPointervINTEL (GLint, GLenum, const GLvoid* *);
19829+GLAPI void APIENTRY glNormalPointervINTEL (GLenum, const GLvoid* *);
19830+GLAPI void APIENTRY glColorPointervINTEL (GLint, GLenum, const GLvoid* *);
19831+GLAPI void APIENTRY glTexCoordPointervINTEL (GLint, GLenum, const GLvoid* *);
19832+#endif /* GL_GLEXT_PROTOTYPES */
19833+typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
19834+typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer);
19835+typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
19836+typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
19837+#endif
19838+
19839+#ifndef GL_HP_occlusion_test
19840+#define GL_HP_occlusion_test 1
19841+#endif
19842+
19843+#ifndef GL_EXT_pixel_transform
19844+#define GL_EXT_pixel_transform 1
19845+#ifdef GL_GLEXT_PROTOTYPES
19846+GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum, GLenum, GLint);
19847+GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum, GLenum, GLfloat);
19848+GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum, GLenum, const GLint *);
19849+GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum, GLenum, const GLfloat *);
19850+/* ERO Begin */
19851+GLAPI void APIENTRY glGetPixelTransformParameterivEXT (GLenum, GLenum, GLint *);
19852+GLAPI void APIENTRY glGetPixelTransformParameterfvEXT (GLenum, GLenum, GLfloat *);
19853+/* ERO End */
19854+#endif /* GL_GLEXT_PROTOTYPES */
19855+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param);
19856+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param);
19857+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
19858+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
19859+/* ERO Begin */
19860+typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19861+typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19862+/* ERO End */
19863+#endif
19864+
19865+#ifndef GL_EXT_pixel_transform_color_table
19866+#define GL_EXT_pixel_transform_color_table 1
19867+#endif
19868+
19869+#ifndef GL_EXT_shared_texture_palette
19870+#define GL_EXT_shared_texture_palette 1
19871+#endif
19872+
19873+#ifndef GL_EXT_separate_specular_color
19874+#define GL_EXT_separate_specular_color 1
19875+#endif
19876+
19877+#ifndef GL_EXT_secondary_color
19878+#define GL_EXT_secondary_color 1
19879+#ifdef GL_GLEXT_PROTOTYPES
19880+GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte, GLbyte, GLbyte);
19881+GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *);
19882+GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble, GLdouble, GLdouble);
19883+GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *);
19884+GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat, GLfloat, GLfloat);
19885+GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *);
19886+GLAPI void APIENTRY glSecondaryColor3iEXT (GLint, GLint, GLint);
19887+GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *);
19888+GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort, GLshort, GLshort);
19889+GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *);
19890+GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte, GLubyte, GLubyte);
19891+GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *);
19892+GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint, GLuint, GLuint);
19893+GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *);
19894+GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort, GLushort, GLushort);
19895+GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *);
19896+GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint, GLenum, GLsizei, const GLvoid *);
19897+#endif /* GL_GLEXT_PROTOTYPES */
19898+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue);
19899+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v);
19900+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue);
19901+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v);
19902+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);
19903+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);
19904+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue);
19905+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v);
19906+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue);
19907+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v);
19908+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);
19909+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v);
19910+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue);
19911+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);
19912+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);
19913+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);
19914+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
19915+#endif
19916+
19917+#ifndef GL_EXT_texture_perturb_normal
19918+#define GL_EXT_texture_perturb_normal 1
19919+#ifdef GL_GLEXT_PROTOTYPES
19920+GLAPI void APIENTRY glTextureNormalEXT (GLenum);
19921+#endif /* GL_GLEXT_PROTOTYPES */
19922+typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode);
19923+#endif
19924+
19925+#ifndef GL_EXT_multi_draw_arrays
19926+#define GL_EXT_multi_draw_arrays 1
19927+#ifdef GL_GLEXT_PROTOTYPES
19928+GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei);
19929+GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
19930+#endif /* GL_GLEXT_PROTOTYPES */
19931+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
19932+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
19933+#endif
19934+
19935+#ifndef GL_EXT_fog_coord
19936+#define GL_EXT_fog_coord 1
19937+#ifdef GL_GLEXT_PROTOTYPES
19938+GLAPI void APIENTRY glFogCoordfEXT (GLfloat);
19939+GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *);
19940+GLAPI void APIENTRY glFogCoorddEXT (GLdouble);
19941+GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *);
19942+GLAPI void APIENTRY glFogCoordPointerEXT (GLenum, GLsizei, const GLvoid *);
19943+#endif /* GL_GLEXT_PROTOTYPES */
19944+typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord);
19945+typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord);
19946+typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord);
19947+typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord);
19948+typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
19949+#endif
19950+
19951+#ifndef GL_REND_screen_coordinates
19952+#define GL_REND_screen_coordinates 1
19953+#endif
19954+
19955+#ifndef GL_EXT_coordinate_frame
19956+#define GL_EXT_coordinate_frame 1
19957+#ifdef GL_GLEXT_PROTOTYPES
19958+GLAPI void APIENTRY glTangent3bEXT (GLbyte, GLbyte, GLbyte);
19959+GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *);
19960+GLAPI void APIENTRY glTangent3dEXT (GLdouble, GLdouble, GLdouble);
19961+GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *);
19962+GLAPI void APIENTRY glTangent3fEXT (GLfloat, GLfloat, GLfloat);
19963+GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *);
19964+GLAPI void APIENTRY glTangent3iEXT (GLint, GLint, GLint);
19965+GLAPI void APIENTRY glTangent3ivEXT (const GLint *);
19966+GLAPI void APIENTRY glTangent3sEXT (GLshort, GLshort, GLshort);
19967+GLAPI void APIENTRY glTangent3svEXT (const GLshort *);
19968+GLAPI void APIENTRY glBinormal3bEXT (GLbyte, GLbyte, GLbyte);
19969+GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *);
19970+GLAPI void APIENTRY glBinormal3dEXT (GLdouble, GLdouble, GLdouble);
19971+GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *);
19972+GLAPI void APIENTRY glBinormal3fEXT (GLfloat, GLfloat, GLfloat);
19973+GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *);
19974+GLAPI void APIENTRY glBinormal3iEXT (GLint, GLint, GLint);
19975+GLAPI void APIENTRY glBinormal3ivEXT (const GLint *);
19976+GLAPI void APIENTRY glBinormal3sEXT (GLshort, GLshort, GLshort);
19977+GLAPI void APIENTRY glBinormal3svEXT (const GLshort *);
19978+GLAPI void APIENTRY glTangentPointerEXT (GLenum, GLsizei, const GLvoid *);
19979+GLAPI void APIENTRY glBinormalPointerEXT (GLenum, GLsizei, const GLvoid *);
19980+#endif /* GL_GLEXT_PROTOTYPES */
19981+typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz);
19982+typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v);
19983+typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz);
19984+typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v);
19985+typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz);
19986+typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v);
19987+typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz);
19988+typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v);
19989+typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz);
19990+typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v);
19991+typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz);
19992+typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v);
19993+typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz);
19994+typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v);
19995+typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz);
19996+typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v);
19997+typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz);
19998+typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v);
19999+typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz);
20000+typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v);
20001+typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
20002+typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
20003+#endif
20004+
20005+#ifndef GL_EXT_texture_env_combine
20006+#define GL_EXT_texture_env_combine 1
20007+#endif
20008+
20009+#ifndef GL_APPLE_specular_vector
20010+#define GL_APPLE_specular_vector 1
20011+#endif
20012+
20013+#ifndef GL_APPLE_transform_hint
20014+#define GL_APPLE_transform_hint 1
20015+#endif
20016+
20017+#ifndef GL_SGIX_fog_scale
20018+#define GL_SGIX_fog_scale 1
20019+#endif
20020+
20021+#ifndef GL_SUNX_constant_data
20022+#define GL_SUNX_constant_data 1
20023+#ifdef GL_GLEXT_PROTOTYPES
20024+GLAPI void APIENTRY glFinishTextureSUNX (void);
20025+#endif /* GL_GLEXT_PROTOTYPES */
20026+typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void);
20027+#endif
20028+
20029+#ifndef GL_SUN_global_alpha
20030+#define GL_SUN_global_alpha 1
20031+#ifdef GL_GLEXT_PROTOTYPES
20032+GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte);
20033+GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort);
20034+GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint);
20035+GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat);
20036+GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble);
20037+GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte);
20038+GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort);
20039+GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint);
20040+#endif /* GL_GLEXT_PROTOTYPES */
20041+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor);
20042+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor);
20043+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor);
20044+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor);
20045+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor);
20046+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor);
20047+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor);
20048+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor);
20049+#endif
20050+
20051+#ifndef GL_SUN_triangle_list
20052+#define GL_SUN_triangle_list 1
20053+#ifdef GL_GLEXT_PROTOTYPES
20054+GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint);
20055+GLAPI void APIENTRY glReplacementCodeusSUN (GLushort);
20056+GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte);
20057+GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *);
20058+GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *);
20059+GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *);
20060+GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum, GLsizei, const GLvoid* *);
20061+#endif /* GL_GLEXT_PROTOTYPES */
20062+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code);
20063+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code);
20064+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code);
20065+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code);
20066+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code);
20067+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code);
20068+typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer);
20069+#endif
20070+
20071+#ifndef GL_SUN_vertex
20072+#define GL_SUN_vertex 1
20073+#ifdef GL_GLEXT_PROTOTYPES
20074+GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat);
20075+GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *, const GLfloat *);
20076+GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
20077+GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *, const GLfloat *);
20078+GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20079+GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *, const GLfloat *);
20080+GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20081+GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *);
20082+GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20083+GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
20084+GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20085+GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *, const GLfloat *);
20086+GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20087+GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *, const GLfloat *);
20088+GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat, GLfloat, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
20089+GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *, const GLubyte *, const GLfloat *);
20090+GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20091+GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
20092+GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20093+GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
20094+GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20095+GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
20096+GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20097+GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
20098+GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat);
20099+GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *, const GLfloat *);
20100+GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
20101+GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *, const GLubyte *, const GLfloat *);
20102+GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20103+GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
20104+GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20105+GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
20106+GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20107+GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *);
20108+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20109+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
20110+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20111+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *);
20112+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20113+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
20114+#endif /* GL_GLEXT_PROTOTYPES */
20115+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
20116+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v);
20117+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
20118+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v);
20119+typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
20120+typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v);
20121+typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20122+typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v);
20123+typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20124+typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v);
20125+typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
20126+typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
20127+typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20128+typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
20129+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
20130+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v);
20131+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
20132+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v);
20133+typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20134+typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v);
20135+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20136+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20137+typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20138+typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20139+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
20140+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v);
20141+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
20142+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v);
20143+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
20144+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v);
20145+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20146+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v);
20147+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20148+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20149+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
20150+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v);
20151+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20152+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
20153+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20154+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20155+#endif
20156+
20157+#ifndef GL_EXT_blend_func_separate
20158+#define GL_EXT_blend_func_separate 1
20159+#ifdef GL_GLEXT_PROTOTYPES
20160+GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum, GLenum, GLenum, GLenum);
20161+#endif /* GL_GLEXT_PROTOTYPES */
20162+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
20163+#endif
20164+
20165+#ifndef GL_INGR_blend_func_separate
20166+#define GL_INGR_blend_func_separate 1
20167+#ifdef GL_GLEXT_PROTOTYPES
20168+GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum, GLenum, GLenum, GLenum);
20169+#endif /* GL_GLEXT_PROTOTYPES */
20170+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
20171+#endif
20172+
20173+#ifndef GL_INGR_color_clamp
20174+#define GL_INGR_color_clamp 1
20175+#endif
20176+
20177+#ifndef GL_INGR_interlace_read
20178+#define GL_INGR_interlace_read 1
20179+#endif
20180+
20181+#ifndef GL_EXT_stencil_wrap
20182+#define GL_EXT_stencil_wrap 1
20183+#endif
20184+
20185+#ifndef GL_EXT_422_pixels
20186+#define GL_EXT_422_pixels 1
20187+#endif
20188+
20189+#ifndef GL_NV_texgen_reflection
20190+#define GL_NV_texgen_reflection 1
20191+#endif
20192+
20193+#ifndef GL_SUN_convolution_border_modes
20194+#define GL_SUN_convolution_border_modes 1
20195+#endif
20196+
20197+#ifndef GL_EXT_texture_env_add
20198+#define GL_EXT_texture_env_add 1
20199+#endif
20200+
20201+#ifndef GL_EXT_texture_lod_bias
20202+#define GL_EXT_texture_lod_bias 1
20203+#endif
20204+
20205+#ifndef GL_EXT_texture_filter_anisotropic
20206+#define GL_EXT_texture_filter_anisotropic 1
20207+#endif
20208+
20209+#ifndef GL_EXT_vertex_weighting
20210+#define GL_EXT_vertex_weighting 1
20211+#ifdef GL_GLEXT_PROTOTYPES
20212+GLAPI void APIENTRY glVertexWeightfEXT (GLfloat);
20213+GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *);
20214+GLAPI void APIENTRY glVertexWeightPointerEXT (GLsizei, GLenum, GLsizei, const GLvoid *);
20215+#endif /* GL_GLEXT_PROTOTYPES */
20216+typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight);
20217+typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight);
20218+typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer);
20219+#endif
20220+
20221+#ifndef GL_NV_light_max_exponent
20222+#define GL_NV_light_max_exponent 1
20223+#endif
20224+
20225+#ifndef GL_NV_vertex_array_range
20226+#define GL_NV_vertex_array_range 1
20227+#ifdef GL_GLEXT_PROTOTYPES
20228+GLAPI void APIENTRY glFlushVertexArrayRangeNV (void);
20229+GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei, const GLvoid *);
20230+#endif /* GL_GLEXT_PROTOTYPES */
20231+typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void);
20232+typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer);
20233+#endif
20234+
20235+#ifndef GL_NV_register_combiners
20236+#define GL_NV_register_combiners 1
20237+#ifdef GL_GLEXT_PROTOTYPES
20238+GLAPI void APIENTRY glCombinerParameterfvNV (GLenum, const GLfloat *);
20239+GLAPI void APIENTRY glCombinerParameterfNV (GLenum, GLfloat);
20240+GLAPI void APIENTRY glCombinerParameterivNV (GLenum, const GLint *);
20241+GLAPI void APIENTRY glCombinerParameteriNV (GLenum, GLint);
20242+GLAPI void APIENTRY glCombinerInputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum);
20243+GLAPI void APIENTRY glCombinerOutputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean);
20244+GLAPI void APIENTRY glFinalCombinerInputNV (GLenum, GLenum, GLenum, GLenum);
20245+GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum, GLenum, GLenum, GLenum, GLfloat *);
20246+GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum, GLenum, GLenum, GLenum, GLint *);
20247+GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum, GLenum, GLenum, GLfloat *);
20248+GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum, GLenum, GLenum, GLint *);
20249+GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum, GLenum, GLfloat *);
20250+GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum, GLenum, GLint *);
20251+#endif /* GL_GLEXT_PROTOTYPES */
20252+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);
20253+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);
20254+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
20255+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);
20256+typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
20257+typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
20258+typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
20259+typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
20260+typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
20261+typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
20262+typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params);
20263+typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params);
20264+typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params);
20265+#endif
20266+
20267+#ifndef GL_NV_fog_distance
20268+#define GL_NV_fog_distance 1
20269+#endif
20270+
20271+#ifndef GL_NV_texgen_emboss
20272+#define GL_NV_texgen_emboss 1
20273+#endif
20274+
20275+#ifndef GL_NV_blend_square
20276+#define GL_NV_blend_square 1
20277+#endif
20278+
20279+#ifndef GL_NV_texture_env_combine4
20280+#define GL_NV_texture_env_combine4 1
20281+#endif
20282+
20283+#ifndef GL_MESA_resize_buffers
20284+#define GL_MESA_resize_buffers 1
20285+#ifdef GL_GLEXT_PROTOTYPES
20286+GLAPI void APIENTRY glResizeBuffersMESA (void);
20287+#endif /* GL_GLEXT_PROTOTYPES */
20288+typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void);
20289+#endif
20290+
20291+#ifndef GL_MESA_window_pos
20292+#define GL_MESA_window_pos 1
20293+#ifdef GL_GLEXT_PROTOTYPES
20294+GLAPI void APIENTRY glWindowPos2dMESA (GLdouble, GLdouble);
20295+GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *);
20296+GLAPI void APIENTRY glWindowPos2fMESA (GLfloat, GLfloat);
20297+GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *);
20298+GLAPI void APIENTRY glWindowPos2iMESA (GLint, GLint);
20299+GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *);
20300+GLAPI void APIENTRY glWindowPos2sMESA (GLshort, GLshort);
20301+GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *);
20302+GLAPI void APIENTRY glWindowPos3dMESA (GLdouble, GLdouble, GLdouble);
20303+GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *);
20304+GLAPI void APIENTRY glWindowPos3fMESA (GLfloat, GLfloat, GLfloat);
20305+GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *);
20306+GLAPI void APIENTRY glWindowPos3iMESA (GLint, GLint, GLint);
20307+GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *);
20308+GLAPI void APIENTRY glWindowPos3sMESA (GLshort, GLshort, GLshort);
20309+GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *);
20310+GLAPI void APIENTRY glWindowPos4dMESA (GLdouble, GLdouble, GLdouble, GLdouble);
20311+GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *);
20312+GLAPI void APIENTRY glWindowPos4fMESA (GLfloat, GLfloat, GLfloat, GLfloat);
20313+GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *);
20314+GLAPI void APIENTRY glWindowPos4iMESA (GLint, GLint, GLint, GLint);
20315+GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *);
20316+GLAPI void APIENTRY glWindowPos4sMESA (GLshort, GLshort, GLshort, GLshort);
20317+GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *);
20318+#endif /* GL_GLEXT_PROTOTYPES */
20319+typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y);
20320+typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v);
20321+typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y);
20322+typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v);
20323+typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y);
20324+typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v);
20325+typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y);
20326+typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v);
20327+typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z);
20328+typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v);
20329+typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z);
20330+typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v);
20331+typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z);
20332+typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v);
20333+typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z);
20334+typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v);
20335+typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
20336+typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v);
20337+typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20338+typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v);
20339+typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w);
20340+typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v);
20341+typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w);
20342+typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v);
20343+#endif
20344+
20345+#ifndef GL_IBM_cull_vertex
20346+#define GL_IBM_cull_vertex 1
20347+#endif
20348+
20349+#ifndef GL_IBM_multimode_draw_arrays
20350+#define GL_IBM_multimode_draw_arrays 1
20351+#ifdef GL_GLEXT_PROTOTYPES
20352+GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *, const GLint *, const GLsizei *, GLsizei, GLint);
20353+GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *, const GLsizei *, GLenum, const GLvoid* const *, GLsizei, GLint);
20354+#endif /* GL_GLEXT_PROTOTYPES */
20355+typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
20356+typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride);
20357+#endif
20358+
20359+#ifndef GL_IBM_vertex_array_lists
20360+#define GL_IBM_vertex_array_lists 1
20361+#ifdef GL_GLEXT_PROTOTYPES
20362+GLAPI void APIENTRY glColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20363+GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20364+GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint, const GLboolean* *, GLint);
20365+GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
20366+GLAPI void APIENTRY glIndexPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
20367+GLAPI void APIENTRY glNormalPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
20368+GLAPI void APIENTRY glTexCoordPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20369+GLAPI void APIENTRY glVertexPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20370+#endif /* GL_GLEXT_PROTOTYPES */
20371+typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20372+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20373+typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride);
20374+typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20375+typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20376+typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20377+typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20378+typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20379+#endif
20380+
20381+#ifndef GL_SGIX_subsample
20382+#define GL_SGIX_subsample 1
20383+#endif
20384+
20385+#ifndef GL_SGIX_ycrcba
20386+#define GL_SGIX_ycrcba 1
20387+#endif
20388+
20389+#ifndef GL_SGIX_ycrcb_subsample
20390+#define GL_SGIX_ycrcb_subsample 1
20391+#endif
20392+
20393+#ifndef GL_SGIX_depth_pass_instrument
20394+#define GL_SGIX_depth_pass_instrument 1
20395+#endif
20396+
20397+#ifndef GL_3DFX_texture_compression_FXT1
20398+#define GL_3DFX_texture_compression_FXT1 1
20399+#endif
20400+
20401+#ifndef GL_3DFX_multisample
20402+#define GL_3DFX_multisample 1
20403+#endif
20404+
20405+#ifndef GL_3DFX_tbuffer
20406+#define GL_3DFX_tbuffer 1
20407+#ifdef GL_GLEXT_PROTOTYPES
20408+GLAPI void APIENTRY glTbufferMask3DFX (GLuint);
20409+#endif /* GL_GLEXT_PROTOTYPES */
20410+typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask);
20411+#endif
20412+
20413+#ifndef GL_EXT_multisample
20414+#define GL_EXT_multisample 1
20415+#ifdef GL_GLEXT_PROTOTYPES
20416+GLAPI void APIENTRY glSampleMaskEXT (GLclampf, GLboolean);
20417+GLAPI void APIENTRY glSamplePatternEXT (GLenum);
20418+#endif /* GL_GLEXT_PROTOTYPES */
20419+typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert);
20420+typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern);
20421+#endif
20422+
20423+#ifndef GL_SGIX_vertex_preclip
20424+#define GL_SGIX_vertex_preclip 1
20425+#endif
20426+
20427+#ifndef GL_SGIX_convolution_accuracy
20428+#define GL_SGIX_convolution_accuracy 1
20429+#endif
20430+
20431+#ifndef GL_SGIX_resample
20432+#define GL_SGIX_resample 1
20433+#endif
20434+
20435+#ifndef GL_SGIS_point_line_texgen
20436+#define GL_SGIS_point_line_texgen 1
20437+#endif
20438+
20439+#ifndef GL_SGIS_texture_color_mask
20440+#define GL_SGIS_texture_color_mask 1
20441+#ifdef GL_GLEXT_PROTOTYPES
20442+GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean, GLboolean, GLboolean, GLboolean);
20443+#endif /* GL_GLEXT_PROTOTYPES */
20444+typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
20445+#endif
20446+
20447+#ifndef GL_SGIX_igloo_interface
20448+#define GL_SGIX_igloo_interface 1
20449+#ifdef GL_GLEXT_PROTOTYPES
20450+GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum, const GLvoid *);
20451+#endif /* GL_GLEXT_PROTOTYPES */
20452+typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params);
20453+#endif
20454+
20455+#ifndef GL_EXT_texture_env_dot3
20456+#define GL_EXT_texture_env_dot3 1
20457+#endif
20458+
20459+#ifndef GL_ATI_texture_mirror_once
20460+#define GL_ATI_texture_mirror_once 1
20461+#endif
20462+
20463+#ifndef GL_NV_fence
20464+#define GL_NV_fence 1
20465+#ifdef GL_GLEXT_PROTOTYPES
20466+GLAPI void APIENTRY glDeleteFencesNV (GLsizei, const GLuint *);
20467+GLAPI void APIENTRY glGenFencesNV (GLsizei, GLuint *);
20468+GLAPI GLboolean APIENTRY glIsFenceNV (GLuint);
20469+GLAPI GLboolean APIENTRY glTestFenceNV (GLuint);
20470+GLAPI void APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *);
20471+GLAPI void APIENTRY glFinishFenceNV (GLuint);
20472+GLAPI void APIENTRY glSetFenceNV (GLuint, GLenum);
20473+#endif /* GL_GLEXT_PROTOTYPES */
20474+typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
20475+typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
20476+typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
20477+typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
20478+typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
20479+typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
20480+typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
20481+#endif
20482+
20483+#ifndef GL_NV_evaluators
20484+#define GL_NV_evaluators 1
20485+#ifdef GL_GLEXT_PROTOTYPES
20486+GLAPI void APIENTRY glMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLint, GLint, GLboolean, const GLvoid *);
20487+GLAPI void APIENTRY glMapParameterivNV (GLenum, GLenum, const GLint *);
20488+GLAPI void APIENTRY glMapParameterfvNV (GLenum, GLenum, const GLfloat *);
20489+GLAPI void APIENTRY glGetMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLboolean, GLvoid *);
20490+GLAPI void APIENTRY glGetMapParameterivNV (GLenum, GLenum, GLint *);
20491+GLAPI void APIENTRY glGetMapParameterfvNV (GLenum, GLenum, GLfloat *);
20492+GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum, GLuint, GLenum, GLint *);
20493+GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum, GLuint, GLenum, GLfloat *);
20494+GLAPI void APIENTRY glEvalMapsNV (GLenum, GLenum);
20495+#endif /* GL_GLEXT_PROTOTYPES */
20496+typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points);
20497+typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params);
20498+typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params);
20499+typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points);
20500+typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params);
20501+typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params);
20502+typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
20503+typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
20504+typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode);
20505+#endif
20506+
20507+#ifndef GL_NV_packed_depth_stencil
20508+#define GL_NV_packed_depth_stencil 1
20509+#endif
20510+
20511+#ifndef GL_NV_register_combiners2
20512+#define GL_NV_register_combiners2 1
20513+#ifdef GL_GLEXT_PROTOTYPES
20514+GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum, GLenum, const GLfloat *);
20515+GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum, GLenum, GLfloat *);
20516+#endif /* GL_GLEXT_PROTOTYPES */
20517+typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params);
20518+typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params);
20519+#endif
20520+
20521+#ifndef GL_NV_texture_compression_vtc
20522+#define GL_NV_texture_compression_vtc 1
20523+#endif
20524+
20525+#ifndef GL_NV_texture_rectangle
20526+#define GL_NV_texture_rectangle 1
20527+#endif
20528+
20529+#ifndef GL_NV_texture_shader
20530+#define GL_NV_texture_shader 1
20531+#endif
20532+
20533+#ifndef GL_NV_texture_shader2
20534+#define GL_NV_texture_shader2 1
20535+#endif
20536+
20537+#ifndef GL_NV_vertex_array_range2
20538+#define GL_NV_vertex_array_range2 1
20539+#endif
20540+
20541+#ifndef GL_NV_vertex_program
20542+#define GL_NV_vertex_program 1
20543+#ifdef GL_GLEXT_PROTOTYPES
20544+GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei, const GLuint *, GLboolean *);
20545+GLAPI void APIENTRY glBindProgramNV (GLenum, GLuint);
20546+GLAPI void APIENTRY glDeleteProgramsNV (GLsizei, const GLuint *);
20547+GLAPI void APIENTRY glExecuteProgramNV (GLenum, GLuint, const GLfloat *);
20548+GLAPI void APIENTRY glGenProgramsNV (GLsizei, GLuint *);
20549+GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum, GLuint, GLenum, GLdouble *);
20550+GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum, GLuint, GLenum, GLfloat *);
20551+GLAPI void APIENTRY glGetProgramivNV (GLuint, GLenum, GLint *);
20552+GLAPI void APIENTRY glGetProgramStringNV (GLuint, GLenum, GLubyte *);
20553+GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum, GLuint, GLenum, GLint *);
20554+GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint, GLenum, GLdouble *);
20555+GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint, GLenum, GLfloat *);
20556+GLAPI void APIENTRY glGetVertexAttribivNV (GLuint, GLenum, GLint *);
20557+GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint, GLenum, GLvoid* *);
20558+GLAPI GLboolean APIENTRY glIsProgramNV (GLuint);
20559+GLAPI void APIENTRY glLoadProgramNV (GLenum, GLuint, GLsizei, const GLubyte *);
20560+GLAPI void APIENTRY glProgramParameter4dNV (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
20561+GLAPI void APIENTRY glProgramParameter4dvNV (GLenum, GLuint, const GLdouble *);
20562+GLAPI void APIENTRY glProgramParameter4fNV (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
20563+GLAPI void APIENTRY glProgramParameter4fvNV (GLenum, GLuint, const GLfloat *);
20564+GLAPI void APIENTRY glProgramParameters4dvNV (GLenum, GLuint, GLuint, const GLdouble *);
20565+GLAPI void APIENTRY glProgramParameters4fvNV (GLenum, GLuint, GLuint, const GLfloat *);
20566+GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei, const GLuint *);
20567+GLAPI void APIENTRY glTrackMatrixNV (GLenum, GLuint, GLenum, GLenum);
20568+GLAPI void APIENTRY glVertexAttribPointerNV (GLuint, GLint, GLenum, GLsizei, const GLvoid *);
20569+GLAPI void APIENTRY glVertexAttrib1dNV (GLuint, GLdouble);
20570+GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint, const GLdouble *);
20571+GLAPI void APIENTRY glVertexAttrib1fNV (GLuint, GLfloat);
20572+GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint, const GLfloat *);
20573+GLAPI void APIENTRY glVertexAttrib1sNV (GLuint, GLshort);
20574+GLAPI void APIENTRY glVertexAttrib1svNV (GLuint, const GLshort *);
20575+GLAPI void APIENTRY glVertexAttrib2dNV (GLuint, GLdouble, GLdouble);
20576+GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint, const GLdouble *);
20577+GLAPI void APIENTRY glVertexAttrib2fNV (GLuint, GLfloat, GLfloat);
20578+GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint, const GLfloat *);
20579+GLAPI void APIENTRY glVertexAttrib2sNV (GLuint, GLshort, GLshort);
20580+GLAPI void APIENTRY glVertexAttrib2svNV (GLuint, const GLshort *);
20581+GLAPI void APIENTRY glVertexAttrib3dNV (GLuint, GLdouble, GLdouble, GLdouble);
20582+GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint, const GLdouble *);
20583+GLAPI void APIENTRY glVertexAttrib3fNV (GLuint, GLfloat, GLfloat, GLfloat);
20584+GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint, const GLfloat *);
20585+GLAPI void APIENTRY glVertexAttrib3sNV (GLuint, GLshort, GLshort, GLshort);
20586+GLAPI void APIENTRY glVertexAttrib3svNV (GLuint, const GLshort *);
20587+GLAPI void APIENTRY glVertexAttrib4dNV (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
20588+GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint, const GLdouble *);
20589+GLAPI void APIENTRY glVertexAttrib4fNV (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
20590+GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint, const GLfloat *);
20591+GLAPI void APIENTRY glVertexAttrib4sNV (GLuint, GLshort, GLshort, GLshort, GLshort);
20592+GLAPI void APIENTRY glVertexAttrib4svNV (GLuint, const GLshort *);
20593+GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
20594+GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint, const GLubyte *);
20595+GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint, GLsizei, const GLdouble *);
20596+GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint, GLsizei, const GLfloat *);
20597+GLAPI void APIENTRY glVertexAttribs1svNV (GLuint, GLsizei, const GLshort *);
20598+GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint, GLsizei, const GLdouble *);
20599+GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint, GLsizei, const GLfloat *);
20600+GLAPI void APIENTRY glVertexAttribs2svNV (GLuint, GLsizei, const GLshort *);
20601+GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint, GLsizei, const GLdouble *);
20602+GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint, GLsizei, const GLfloat *);
20603+GLAPI void APIENTRY glVertexAttribs3svNV (GLuint, GLsizei, const GLshort *);
20604+GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint, GLsizei, const GLdouble *);
20605+GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint, GLsizei, const GLfloat *);
20606+GLAPI void APIENTRY glVertexAttribs4svNV (GLuint, GLsizei, const GLshort *);
20607+GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint, GLsizei, const GLubyte *);
20608+#endif /* GL_GLEXT_PROTOTYPES */
20609+typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences);
20610+typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id);
20611+typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
20612+typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params);
20613+typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs);
20614+typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params);
20615+typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
20616+typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params);
20617+typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program);
20618+typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params);
20619+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params);
20620+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params);
20621+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params);
20622+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
20623+typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id);
20624+typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
20625+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
20626+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v);
20627+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20628+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v);
20629+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint count, const GLdouble *v);
20630+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint count, const GLfloat *v);
20631+typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
20632+typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform);
20633+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer);
20634+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x);
20635+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v);
20636+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x);
20637+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v);
20638+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x);
20639+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v);
20640+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y);
20641+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v);
20642+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y);
20643+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v);
20644+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y);
20645+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v);
20646+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
20647+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v);
20648+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
20649+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v);
20650+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
20651+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v);
20652+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
20653+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v);
20654+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20655+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v);
20656+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
20657+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v);
20658+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
20659+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v);
20660+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
20661+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
20662+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
20663+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
20664+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
20665+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
20666+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
20667+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
20668+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
20669+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
20670+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
20671+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
20672+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v);
20673+#endif
20674+
20675+#ifndef GL_SGIX_texture_coordinate_clamp
20676+#define GL_SGIX_texture_coordinate_clamp 1
20677+#endif
20678+
20679+#ifndef GL_SGIX_scalebias_hint
20680+#define GL_SGIX_scalebias_hint 1
20681+#endif
20682+
20683+#ifndef GL_OML_interlace
20684+#define GL_OML_interlace 1
20685+#endif
20686+
20687+#ifndef GL_OML_subsample
20688+#define GL_OML_subsample 1
20689+#endif
20690+
20691+#ifndef GL_OML_resample
20692+#define GL_OML_resample 1
20693+#endif
20694+
20695+#ifndef GL_NV_copy_depth_to_color
20696+#define GL_NV_copy_depth_to_color 1
20697+#endif
20698+
20699+#ifndef GL_ATI_envmap_bumpmap
20700+#define GL_ATI_envmap_bumpmap 1
20701+#ifdef GL_GLEXT_PROTOTYPES
20702+GLAPI void APIENTRY glTexBumpParameterivATI (GLenum, const GLint *);
20703+GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum, const GLfloat *);
20704+GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum, GLint *);
20705+GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum, GLfloat *);
20706+#endif /* GL_GLEXT_PROTOTYPES */
20707+typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param);
20708+typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param);
20709+typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param);
20710+typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param);
20711+#endif
20712+
20713+#ifndef GL_ATI_fragment_shader
20714+#define GL_ATI_fragment_shader 1
20715+#ifdef GL_GLEXT_PROTOTYPES
20716+GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint);
20717+GLAPI void APIENTRY glBindFragmentShaderATI (GLuint);
20718+GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint);
20719+GLAPI void APIENTRY glBeginFragmentShaderATI (void);
20720+GLAPI void APIENTRY glEndFragmentShaderATI (void);
20721+GLAPI void APIENTRY glPassTexCoordATI (GLuint, GLuint, GLenum);
20722+GLAPI void APIENTRY glSampleMapATI (GLuint, GLuint, GLenum);
20723+GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
20724+GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
20725+GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
20726+GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
20727+GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
20728+GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
20729+GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint, const GLfloat *);
20730+#endif /* GL_GLEXT_PROTOTYPES */
20731+typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range);
20732+typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id);
20733+typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id);
20734+typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void);
20735+typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void);
20736+typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle);
20737+typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle);
20738+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
20739+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
20740+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
20741+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
20742+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
20743+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
20744+typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value);
20745+#endif
20746+
20747+#ifndef GL_ATI_pn_triangles
20748+#define GL_ATI_pn_triangles 1
20749+#ifdef GL_GLEXT_PROTOTYPES
20750+GLAPI void APIENTRY glPNTrianglesiATI (GLenum, GLint);
20751+GLAPI void APIENTRY glPNTrianglesfATI (GLenum, GLfloat);
20752+#endif /* GL_GLEXT_PROTOTYPES */
20753+typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param);
20754+typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param);
20755+#endif
20756+
20757+#ifndef GL_ATI_vertex_array_object
20758+#define GL_ATI_vertex_array_object 1
20759+#ifdef GL_GLEXT_PROTOTYPES
20760+GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei, const GLvoid *, GLenum);
20761+GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint);
20762+GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint, GLuint, GLsizei, const GLvoid *, GLenum);
20763+GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint, GLenum, GLfloat *);
20764+GLAPI void APIENTRY glGetObjectBufferivATI (GLuint, GLenum, GLint *);
20765+GLAPI void APIENTRY glFreeObjectBufferATI (GLuint);
20766+/* ERO Begin */
20767+GLAPI void APIENTRY glDeleteObjectBufferATI (GLuint);
20768+/* ERO End */
20769+GLAPI void APIENTRY glArrayObjectATI (GLenum, GLint, GLenum, GLsizei, GLuint, GLuint);
20770+GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum, GLenum, GLfloat *);
20771+GLAPI void APIENTRY glGetArrayObjectivATI (GLenum, GLenum, GLint *);
20772+GLAPI void APIENTRY glVariantArrayObjectATI (GLuint, GLenum, GLsizei, GLuint, GLuint);
20773+GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint, GLenum, GLfloat *);
20774+GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint, GLenum, GLint *);
20775+#endif /* GL_GLEXT_PROTOTYPES */
20776+typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage);
20777+typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer);
20778+typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve);
20779+typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params);
20780+typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params);
20781+typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer);
20782+typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
20783+typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params);
20784+typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params);
20785+typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
20786+typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params);
20787+typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params);
20788+#endif
20789+
20790+#ifndef GL_EXT_vertex_shader
20791+#define GL_EXT_vertex_shader 1
20792+#ifdef GL_GLEXT_PROTOTYPES
20793+GLAPI void APIENTRY glBeginVertexShaderEXT (void);
20794+GLAPI void APIENTRY glEndVertexShaderEXT (void);
20795+GLAPI void APIENTRY glBindVertexShaderEXT (GLuint);
20796+GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint);
20797+GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint);
20798+GLAPI void APIENTRY glShaderOp1EXT (GLenum, GLuint, GLuint);
20799+GLAPI void APIENTRY glShaderOp2EXT (GLenum, GLuint, GLuint, GLuint);
20800+GLAPI void APIENTRY glShaderOp3EXT (GLenum, GLuint, GLuint, GLuint, GLuint);
20801+GLAPI void APIENTRY glSwizzleEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum);
20802+GLAPI void APIENTRY glWriteMaskEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum);
20803+GLAPI void APIENTRY glInsertComponentEXT (GLuint, GLuint, GLuint);
20804+GLAPI void APIENTRY glExtractComponentEXT (GLuint, GLuint, GLuint);
20805+GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum, GLenum, GLenum, GLuint);
20806+GLAPI void APIENTRY glSetInvariantEXT (GLuint, GLenum, const GLvoid *);
20807+GLAPI void APIENTRY glSetLocalConstantEXT (GLuint, GLenum, const GLvoid *);
20808+GLAPI void APIENTRY glVariantbvEXT (GLuint, const GLbyte *);
20809+GLAPI void APIENTRY glVariantsvEXT (GLuint, const GLshort *);
20810+GLAPI void APIENTRY glVariantivEXT (GLuint, const GLint *);
20811+GLAPI void APIENTRY glVariantfvEXT (GLuint, const GLfloat *);
20812+GLAPI void APIENTRY glVariantdvEXT (GLuint, const GLdouble *);
20813+GLAPI void APIENTRY glVariantubvEXT (GLuint, const GLubyte *);
20814+GLAPI void APIENTRY glVariantusvEXT (GLuint, const GLushort *);
20815+GLAPI void APIENTRY glVariantuivEXT (GLuint, const GLuint *);
20816+GLAPI void APIENTRY glVariantPointerEXT (GLuint, GLenum, GLuint, const GLvoid *);
20817+GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint);
20818+GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint);
20819+GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum, GLenum);
20820+GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum, GLenum);
20821+GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum, GLenum, GLenum);
20822+GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum, GLenum);
20823+GLAPI GLuint APIENTRY glBindParameterEXT (GLenum);
20824+GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint, GLenum);
20825+GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint, GLenum, GLboolean *);
20826+GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint, GLenum, GLint *);
20827+GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint, GLenum, GLfloat *);
20828+GLAPI void APIENTRY glGetVariantPointervEXT (GLuint, GLenum, GLvoid* *);
20829+GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint, GLenum, GLboolean *);
20830+GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint, GLenum, GLint *);
20831+GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint, GLenum, GLfloat *);
20832+GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint, GLenum, GLboolean *);
20833+GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint, GLenum, GLint *);
20834+GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint, GLenum, GLfloat *);
20835+#endif /* GL_GLEXT_PROTOTYPES */
20836+typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void);
20837+typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void);
20838+typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id);
20839+typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range);
20840+typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id);
20841+typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1);
20842+typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
20843+typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
20844+typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
20845+typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
20846+typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
20847+typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
20848+typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);
20849+typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);
20850+typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);
20851+typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr);
20852+typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr);
20853+typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr);
20854+typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr);
20855+typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr);
20856+typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr);
20857+typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr);
20858+typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr);
20859+typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr);
20860+typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
20861+typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
20862+typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value);
20863+typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value);
20864+typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value);
20865+typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value);
20866+typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value);
20867+typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap);
20868+typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
20869+typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
20870+typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
20871+typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data);
20872+typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
20873+typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
20874+typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
20875+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
20876+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
20877+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
20878+#endif
20879+
20880+#ifndef GL_ATI_vertex_streams
20881+#define GL_ATI_vertex_streams 1
20882+#ifdef GL_GLEXT_PROTOTYPES
20883+GLAPI void APIENTRY glVertexStream1sATI (GLenum, GLshort);
20884+GLAPI void APIENTRY glVertexStream1svATI (GLenum, const GLshort *);
20885+GLAPI void APIENTRY glVertexStream1iATI (GLenum, GLint);
20886+GLAPI void APIENTRY glVertexStream1ivATI (GLenum, const GLint *);
20887+GLAPI void APIENTRY glVertexStream1fATI (GLenum, GLfloat);
20888+GLAPI void APIENTRY glVertexStream1fvATI (GLenum, const GLfloat *);
20889+GLAPI void APIENTRY glVertexStream1dATI (GLenum, GLdouble);
20890+GLAPI void APIENTRY glVertexStream1dvATI (GLenum, const GLdouble *);
20891+GLAPI void APIENTRY glVertexStream2sATI (GLenum, GLshort, GLshort);
20892+GLAPI void APIENTRY glVertexStream2svATI (GLenum, const GLshort *);
20893+GLAPI void APIENTRY glVertexStream2iATI (GLenum, GLint, GLint);
20894+GLAPI void APIENTRY glVertexStream2ivATI (GLenum, const GLint *);
20895+GLAPI void APIENTRY glVertexStream2fATI (GLenum, GLfloat, GLfloat);
20896+GLAPI void APIENTRY glVertexStream2fvATI (GLenum, const GLfloat *);
20897+GLAPI void APIENTRY glVertexStream2dATI (GLenum, GLdouble, GLdouble);
20898+GLAPI void APIENTRY glVertexStream2dvATI (GLenum, const GLdouble *);
20899+GLAPI void APIENTRY glVertexStream3sATI (GLenum, GLshort, GLshort, GLshort);
20900+GLAPI void APIENTRY glVertexStream3svATI (GLenum, const GLshort *);
20901+GLAPI void APIENTRY glVertexStream3iATI (GLenum, GLint, GLint, GLint);
20902+GLAPI void APIENTRY glVertexStream3ivATI (GLenum, const GLint *);
20903+GLAPI void APIENTRY glVertexStream3fATI (GLenum, GLfloat, GLfloat, GLfloat);
20904+GLAPI void APIENTRY glVertexStream3fvATI (GLenum, const GLfloat *);
20905+GLAPI void APIENTRY glVertexStream3dATI (GLenum, GLdouble, GLdouble, GLdouble);
20906+GLAPI void APIENTRY glVertexStream3dvATI (GLenum, const GLdouble *);
20907+GLAPI void APIENTRY glVertexStream4sATI (GLenum, GLshort, GLshort, GLshort, GLshort);
20908+GLAPI void APIENTRY glVertexStream4svATI (GLenum, const GLshort *);
20909+GLAPI void APIENTRY glVertexStream4iATI (GLenum, GLint, GLint, GLint, GLint);
20910+GLAPI void APIENTRY glVertexStream4ivATI (GLenum, const GLint *);
20911+GLAPI void APIENTRY glVertexStream4fATI (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
20912+GLAPI void APIENTRY glVertexStream4fvATI (GLenum, const GLfloat *);
20913+GLAPI void APIENTRY glVertexStream4dATI (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
20914+GLAPI void APIENTRY glVertexStream4dvATI (GLenum, const GLdouble *);
20915+GLAPI void APIENTRY glNormalStream3bATI (GLenum, GLbyte, GLbyte, GLbyte);
20916+GLAPI void APIENTRY glNormalStream3bvATI (GLenum, const GLbyte *);
20917+GLAPI void APIENTRY glNormalStream3sATI (GLenum, GLshort, GLshort, GLshort);
20918+GLAPI void APIENTRY glNormalStream3svATI (GLenum, const GLshort *);
20919+GLAPI void APIENTRY glNormalStream3iATI (GLenum, GLint, GLint, GLint);
20920+GLAPI void APIENTRY glNormalStream3ivATI (GLenum, const GLint *);
20921+GLAPI void APIENTRY glNormalStream3fATI (GLenum, GLfloat, GLfloat, GLfloat);
20922+GLAPI void APIENTRY glNormalStream3fvATI (GLenum, const GLfloat *);
20923+GLAPI void APIENTRY glNormalStream3dATI (GLenum, GLdouble, GLdouble, GLdouble);
20924+GLAPI void APIENTRY glNormalStream3dvATI (GLenum, const GLdouble *);
20925+GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum);
20926+GLAPI void APIENTRY glVertexBlendEnviATI (GLenum, GLint);
20927+GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum, GLfloat);
20928+#endif /* GL_GLEXT_PROTOTYPES */
20929+typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x);
20930+typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords);
20931+typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x);
20932+typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords);
20933+typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x);
20934+typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords);
20935+typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x);
20936+typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords);
20937+typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y);
20938+typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords);
20939+typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y);
20940+typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords);
20941+typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y);
20942+typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords);
20943+typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y);
20944+typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords);
20945+typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z);
20946+typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
20947+typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z);
20948+typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
20949+typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
20950+typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
20951+typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
20952+typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
20953+typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
20954+typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords);
20955+typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w);
20956+typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords);
20957+typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20958+typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords);
20959+typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
20960+typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords);
20961+typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);
20962+typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords);
20963+typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz);
20964+typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
20965+typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz);
20966+typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
20967+typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);
20968+typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
20969+typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);
20970+typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
20971+typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream);
20972+typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param);
20973+typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param);
20974+#endif
20975+
20976+#ifndef GL_ATI_element_array
20977+#define GL_ATI_element_array 1
20978+#ifdef GL_GLEXT_PROTOTYPES
20979+GLAPI void APIENTRY glElementPointerATI (GLenum, const GLvoid *);
20980+GLAPI void APIENTRY glDrawElementArrayATI (GLenum, GLsizei);
20981+GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum, GLuint, GLuint, GLsizei);
20982+#endif /* GL_GLEXT_PROTOTYPES */
20983+typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer);
20984+typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count);
20985+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count);
20986+#endif
20987+
20988+#ifndef GL_SUN_mesh_array
20989+#define GL_SUN_mesh_array 1
20990+#ifdef GL_GLEXT_PROTOTYPES
20991+GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum, GLint, GLsizei, GLsizei);
20992+#endif /* GL_GLEXT_PROTOTYPES */
20993+typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width);
20994+#endif
20995+
20996+#ifndef GL_SUN_slice_accum
20997+#define GL_SUN_slice_accum 1
20998+#endif
20999+
21000+#ifndef GL_NV_multisample_filter_hint
21001+#define GL_NV_multisample_filter_hint 1
21002+#endif
21003+
21004+#ifndef GL_NV_depth_clamp
21005+#define GL_NV_depth_clamp 1
21006+#endif
21007+
21008+#ifndef GL_NV_occlusion_query
21009+#define GL_NV_occlusion_query 1
21010+#ifdef GL_GLEXT_PROTOTYPES
21011+GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei, GLuint *);
21012+GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei, const GLuint *);
21013+GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint);
21014+GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint);
21015+GLAPI void APIENTRY glEndOcclusionQueryNV (void);
21016+GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint, GLenum, GLint *);
21017+GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint, GLenum, GLuint *);
21018+#endif /* GL_GLEXT_PROTOTYPES */
21019+typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids);
21020+typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids);
21021+typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id);
21022+typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id);
21023+typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void);
21024+typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params);
21025+typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params);
21026+#endif
21027+
21028+#ifndef GL_NV_point_sprite
21029+#define GL_NV_point_sprite 1
21030+#ifdef GL_GLEXT_PROTOTYPES
21031+GLAPI void APIENTRY glPointParameteriNV (GLenum, GLint);
21032+GLAPI void APIENTRY glPointParameterivNV (GLenum, const GLint *);
21033+#endif /* GL_GLEXT_PROTOTYPES */
21034+typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param);
21035+typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
21036+#endif
21037+
21038+#ifndef GL_NV_texture_shader3
21039+#define GL_NV_texture_shader3 1
21040+#endif
21041+
21042+#ifndef GL_NV_vertex_program1_1
21043+#define GL_NV_vertex_program1_1 1
21044+#endif
21045+
21046+#ifndef GL_EXT_shadow_funcs
21047+#define GL_EXT_shadow_funcs 1
21048+#endif
21049+
21050+#ifndef GL_EXT_stencil_two_side
21051+#define GL_EXT_stencil_two_side 1
21052+#ifdef GL_GLEXT_PROTOTYPES
21053+GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum);
21054+#endif /* GL_GLEXT_PROTOTYPES */
21055+typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face);
21056+#endif
21057+
21058+#ifndef GL_ATI_text_fragment_shader
21059+#define GL_ATI_text_fragment_shader 1
21060+#endif
21061+
21062+#ifndef GL_APPLE_client_storage
21063+#define GL_APPLE_client_storage 1
21064+#endif
21065+
21066+#ifndef GL_APPLE_element_array
21067+#define GL_APPLE_element_array 1
21068+#ifdef GL_GLEXT_PROTOTYPES
21069+GLAPI void APIENTRY glElementPointerAPPLE (GLenum, const GLvoid *);
21070+GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum, GLint, GLsizei);
21071+GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, GLint, GLsizei);
21072+GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum, const GLint *, const GLsizei *, GLsizei);
21073+GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, const GLint *, const GLsizei *, GLsizei);
21074+#endif /* GL_GLEXT_PROTOTYPES */
21075+typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid *pointer);
21076+typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count);
21077+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
21078+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
21079+typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);
21080+#endif
21081+
21082+#ifndef GL_APPLE_fence
21083+#define GL_APPLE_fence 1
21084+#ifdef GL_GLEXT_PROTOTYPES
21085+GLAPI void APIENTRY glGenFencesAPPLE (GLsizei, GLuint *);
21086+GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei, const GLuint *);
21087+GLAPI void APIENTRY glSetFenceAPPLE (GLuint);
21088+GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint);
21089+GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint);
21090+GLAPI void APIENTRY glFinishFenceAPPLE (GLuint);
21091+GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum, GLuint);
21092+GLAPI void APIENTRY glFinishObjectAPPLE (GLenum, GLint);
21093+#endif /* GL_GLEXT_PROTOTYPES */
21094+typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences);
21095+typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences);
21096+typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence);
21097+typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence);
21098+typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence);
21099+typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence);
21100+typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name);
21101+typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);
21102+#endif
21103+
21104+#ifndef GL_APPLE_vertex_array_object
21105+#define GL_APPLE_vertex_array_object 1
21106+#ifdef GL_GLEXT_PROTOTYPES
21107+GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint);
21108+GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei, const GLuint *);
21109+GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, GLuint *);
21110+GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint);
21111+#endif /* GL_GLEXT_PROTOTYPES */
21112+typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
21113+typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
21114+typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);
21115+typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
21116+#endif
21117+
21118+#ifndef GL_APPLE_vertex_array_range
21119+#define GL_APPLE_vertex_array_range 1
21120+#ifdef GL_GLEXT_PROTOTYPES
21121+GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei, GLvoid *);
21122+GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei, GLvoid *);
21123+GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum, GLint);
21124+#endif /* GL_GLEXT_PROTOTYPES */
21125+typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);
21126+typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);
21127+typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param);
21128+#endif
21129+
21130+#ifndef GL_APPLE_ycbcr_422
21131+#define GL_APPLE_ycbcr_422 1
21132+#endif
21133+
21134+#ifndef GL_S3_s3tc
21135+#define GL_S3_s3tc 1
21136+#endif
21137+
21138+#ifndef GL_ATI_draw_buffers
21139+#define GL_ATI_draw_buffers 1
21140+#ifdef GL_GLEXT_PROTOTYPES
21141+GLAPI void APIENTRY glDrawBuffersATI (GLsizei, const GLenum *);
21142+#endif /* GL_GLEXT_PROTOTYPES */
21143+typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs);
21144+#endif
21145+
21146+#ifndef GL_ATI_pixel_format_float
21147+#define GL_ATI_pixel_format_float 1
21148+/* This is really a WGL extension, but defines some associated GL enums.
21149+ * ATI does not export "GL_ATI_pixel_format_float" in the GL_EXTENSIONS string.
21150+ */
21151+#endif
21152+
21153+#ifndef GL_ATI_texture_env_combine3
21154+#define GL_ATI_texture_env_combine3 1
21155+#endif
21156+
21157+#ifndef GL_ATI_texture_float
21158+#define GL_ATI_texture_float 1
21159+#endif
21160+
21161+#ifndef GL_NV_float_buffer
21162+#define GL_NV_float_buffer 1
21163+#endif
21164+
21165+#ifndef GL_NV_fragment_program
21166+#define GL_NV_fragment_program 1
21167+/* Some NV_fragment_program entry points are shared with ARB_vertex_program. */
21168+#ifdef GL_GLEXT_PROTOTYPES
21169+GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat);
21170+GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble);
21171+GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint, GLsizei, const GLubyte *, const GLfloat *);
21172+GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint, GLsizei, const GLubyte *, const GLdouble *);
21173+GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint, GLsizei, const GLubyte *, GLfloat *);
21174+GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint, GLsizei, const GLubyte *, GLdouble *);
21175+#endif /* GL_GLEXT_PROTOTYPES */
21176+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
21177+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
21178+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
21179+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
21180+typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
21181+typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
21182+#endif
21183+
21184+#ifndef GL_NV_half_float
21185+#define GL_NV_half_float 1
21186+#ifdef GL_GLEXT_PROTOTYPES
21187+GLAPI void APIENTRY glVertex2hNV (GLhalfNV, GLhalfNV);
21188+GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *);
21189+GLAPI void APIENTRY glVertex3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21190+GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *);
21191+GLAPI void APIENTRY glVertex4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21192+GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *);
21193+GLAPI void APIENTRY glNormal3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21194+GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *);
21195+GLAPI void APIENTRY glColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21196+GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *);
21197+GLAPI void APIENTRY glColor4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21198+GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *);
21199+GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV);
21200+GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *);
21201+GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV, GLhalfNV);
21202+GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *);
21203+GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21204+GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *);
21205+GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21206+GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *);
21207+GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum, GLhalfNV);
21208+GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum, const GLhalfNV *);
21209+GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum, GLhalfNV, GLhalfNV);
21210+GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum, const GLhalfNV *);
21211+GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV);
21212+GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum, const GLhalfNV *);
21213+GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21214+GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum, const GLhalfNV *);
21215+GLAPI void APIENTRY glFogCoordhNV (GLhalfNV);
21216+GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *);
21217+GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21218+GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *);
21219+GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV);
21220+GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *);
21221+GLAPI void APIENTRY glVertexAttrib1hNV (GLuint, GLhalfNV);
21222+GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint, const GLhalfNV *);
21223+GLAPI void APIENTRY glVertexAttrib2hNV (GLuint, GLhalfNV, GLhalfNV);
21224+GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint, const GLhalfNV *);
21225+GLAPI void APIENTRY glVertexAttrib3hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV);
21226+GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint, const GLhalfNV *);
21227+GLAPI void APIENTRY glVertexAttrib4hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21228+GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint, const GLhalfNV *);
21229+GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint, GLsizei, const GLhalfNV *);
21230+GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint, GLsizei, const GLhalfNV *);
21231+GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint, GLsizei, const GLhalfNV *);
21232+GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint, GLsizei, const GLhalfNV *);
21233+#endif /* GL_GLEXT_PROTOTYPES */
21234+typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y);
21235+typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v);
21236+typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z);
21237+typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v);
21238+typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
21239+typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v);
21240+typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);
21241+typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v);
21242+typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
21243+typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v);
21244+typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);
21245+typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v);
21246+typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s);
21247+typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v);
21248+typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t);
21249+typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v);
21250+typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r);
21251+typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v);
21252+typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
21253+typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v);
21254+typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s);
21255+typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v);
21256+typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t);
21257+typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v);
21258+typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);
21259+typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v);
21260+typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
21261+typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v);
21262+typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog);
21263+typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog);
21264+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
21265+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v);
21266+typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight);
21267+typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight);
21268+typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x);
21269+typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v);
21270+typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y);
21271+typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v);
21272+typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);
21273+typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v);
21274+typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
21275+typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v);
21276+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21277+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21278+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21279+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21280+#endif
21281+
21282+#ifndef GL_NV_pixel_data_range
21283+#define GL_NV_pixel_data_range 1
21284+#ifdef GL_GLEXT_PROTOTYPES
21285+GLAPI void APIENTRY glPixelDataRangeNV (GLenum, GLsizei, GLvoid *);
21286+GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum);
21287+#endif /* GL_GLEXT_PROTOTYPES */
21288+typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, GLvoid *pointer);
21289+typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target);
21290+#endif
21291+
21292+#ifndef GL_NV_primitive_restart
21293+#define GL_NV_primitive_restart 1
21294+#ifdef GL_GLEXT_PROTOTYPES
21295+GLAPI void APIENTRY glPrimitiveRestartNV (void);
21296+GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint);
21297+#endif /* GL_GLEXT_PROTOTYPES */
21298+typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void);
21299+typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index);
21300+#endif
21301+
21302+#ifndef GL_NV_texture_expand_normal
21303+#define GL_NV_texture_expand_normal 1
21304+#endif
21305+
21306+#ifndef GL_NV_vertex_program2
21307+#define GL_NV_vertex_program2 1
21308+#endif
21309+
21310+#ifndef GL_ATI_map_object_buffer
21311+#define GL_ATI_map_object_buffer 1
21312+#ifdef GL_GLEXT_PROTOTYPES
21313+GLAPI GLvoid* APIENTRY glMapObjectBufferATI (GLuint);
21314+GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint);
21315+#endif /* GL_GLEXT_PROTOTYPES */
21316+typedef GLvoid* (APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer);
21317+typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer);
21318+#endif
21319+
21320+#ifndef GL_ATI_separate_stencil
21321+#define GL_ATI_separate_stencil 1
21322+#ifdef GL_GLEXT_PROTOTYPES
21323+GLAPI void APIENTRY glStencilOpSeparateATI (GLenum, GLenum, GLenum, GLenum);
21324+GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum, GLenum, GLint, GLuint);
21325+#endif /* GL_GLEXT_PROTOTYPES */
21326+typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
21327+typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
21328+#endif
21329+
21330+#ifndef GL_ATI_vertex_attrib_array_object
21331+#define GL_ATI_vertex_attrib_array_object 1
21332+#ifdef GL_GLEXT_PROTOTYPES
21333+GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint, GLint, GLenum, GLboolean, GLsizei, GLuint, GLuint);
21334+GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint, GLenum, GLfloat *);
21335+GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint, GLenum, GLint *);
21336+#endif /* GL_GLEXT_PROTOTYPES */
21337+typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
21338+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params);
21339+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params);
21340+#endif
21341+
21342+#ifndef GL_OES_read_format
21343+#define GL_OES_read_format 1
21344+#endif
21345+
21346+#ifndef GL_EXT_depth_bounds_test
21347+#define GL_EXT_depth_bounds_test 1
21348+#ifdef GL_GLEXT_PROTOTYPES
21349+GLAPI void APIENTRY glDepthBoundsEXT (GLclampd, GLclampd);
21350+#endif /* GL_GLEXT_PROTOTYPES */
21351+typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax);
21352+#endif
21353+
21354+#ifndef GL_EXT_texture_mirror_clamp
21355+#define GL_EXT_texture_mirror_clamp 1
21356+#endif
21357+
21358+#ifndef GL_EXT_blend_equation_separate
21359+#define GL_EXT_blend_equation_separate 1
21360+#ifdef GL_GLEXT_PROTOTYPES
21361+GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum, GLenum);
21362+#endif /* GL_GLEXT_PROTOTYPES */
21363+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha);
21364+#endif
21365+
21366+#ifndef GL_MESA_pack_invert
21367+#define GL_MESA_pack_invert 1
21368+#endif
21369+
21370+#ifndef GL_MESA_ycbcr_texture
21371+#define GL_MESA_ycbcr_texture 1
21372+#endif
21373+
21374+#ifndef GL_EXT_pixel_buffer_object
21375+#define GL_EXT_pixel_buffer_object 1
21376+#endif
21377+
21378+#ifndef GL_NV_fragment_program_option
21379+#define GL_NV_fragment_program_option 1
21380+#endif
21381+
21382+#ifndef GL_NV_fragment_program2
21383+#define GL_NV_fragment_program2 1
21384+#endif
21385+
21386+#ifndef GL_NV_vertex_program2_option
21387+#define GL_NV_vertex_program2_option 1
21388+#endif
21389+
21390+#ifndef GL_NV_vertex_program3
21391+#define GL_NV_vertex_program3 1
21392+#endif
21393+
21394+#ifndef GL_EXT_framebuffer_object
21395+#define GL_EXT_framebuffer_object 1
21396+#ifdef GL_GLEXT_PROTOTYPES
21397+GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint);
21398+GLAPI void APIENTRY glBindRenderbufferEXT (GLenum, GLuint);
21399+GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei, const GLuint *);
21400+GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei, GLuint *);
21401+GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum, GLenum, GLsizei, GLsizei);
21402+GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum, GLenum, GLint *);
21403+GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint);
21404+GLAPI void APIENTRY glBindFramebufferEXT (GLenum, GLuint);
21405+GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei, const GLuint *);
21406+GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei, GLuint *);
21407+GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum);
21408+GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
21409+GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
21410+GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLint);
21411+GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum, GLenum, GLenum, GLuint);
21412+GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum, GLenum, GLenum, GLint *);
21413+GLAPI void APIENTRY glGenerateMipmapEXT (GLenum);
21414+#endif /* GL_GLEXT_PROTOTYPES */
21415+typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);
21416+typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);
21417+typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);
21418+typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);
21419+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
21420+typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
21421+typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);
21422+typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
21423+typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);
21424+typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);
21425+typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);
21426+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
21427+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
21428+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
21429+typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
21430+typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
21431+typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);
21432+#endif
21433+
21434+#ifndef GL_GREMEDY_string_marker
21435+#define GL_GREMEDY_string_marker 1
21436+#ifdef GL_GLEXT_PROTOTYPES
21437+GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei, const GLvoid *);
21438+#endif /* GL_GLEXT_PROTOTYPES */
21439+typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string);
21440+#endif
21441+
21442+#ifndef GL_EXT_packed_depth_stencil
21443+#define GL_EXT_packed_depth_stencil 1
21444+#endif
21445+
21446+#ifndef GL_EXT_stencil_clear_tag
21447+#define GL_EXT_stencil_clear_tag 1
21448+#ifdef GL_GLEXT_PROTOTYPES
21449+GLAPI void APIENTRY glStencilClearTagEXT (GLsizei, GLuint);
21450+#endif /* GL_GLEXT_PROTOTYPES */
21451+typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag);
21452+#endif
21453+
21454+#ifndef GL_EXT_texture_sRGB
21455+#define GL_EXT_texture_sRGB 1
21456+#endif
21457+
21458+#ifndef GL_EXT_framebuffer_blit
21459+#define GL_EXT_framebuffer_blit 1
21460+#ifdef GL_GLEXT_PROTOTYPES
21461+GLAPI void APIENTRY glBlitFramebufferEXT (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum);
21462+#endif /* GL_GLEXT_PROTOTYPES */
21463+typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
21464+#endif
21465+
21466+#ifndef GL_EXT_framebuffer_multisample
21467+#define GL_EXT_framebuffer_multisample 1
21468+#ifdef GL_GLEXT_PROTOTYPES
21469+GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
21470+#endif /* GL_GLEXT_PROTOTYPES */
21471+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
21472+#endif
21473+
21474+#ifndef GL_MESAX_texture_stack
21475+#define GL_MESAX_texture_stack 1
21476+#endif
21477+
21478+#ifndef GL_EXT_timer_query
21479+#define GL_EXT_timer_query 1
21480+#ifdef GL_GLEXT_PROTOTYPES
21481+GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint, GLenum, GLint64EXT *);
21482+GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint, GLenum, GLuint64EXT *);
21483+#endif /* GL_GLEXT_PROTOTYPES */
21484+typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params);
21485+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params);
21486+#endif
21487+
21488+#ifndef GL_EXT_gpu_program_parameters
21489+#define GL_EXT_gpu_program_parameters 1
21490+#ifdef GL_GLEXT_PROTOTYPES
21491+GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *);
21492+GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *);
21493+#endif /* GL_GLEXT_PROTOTYPES */
21494+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
21495+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
21496+#endif
21497+
21498+#ifndef GL_APPLE_flush_buffer_range
21499+#define GL_APPLE_flush_buffer_range 1
21500+#ifdef GL_GLEXT_PROTOTYPES
21501+GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum, GLenum, GLint);
21502+GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum, GLintptr, GLsizeiptr);
21503+#endif /* GL_GLEXT_PROTOTYPES */
21504+typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param);
21505+typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size);
21506+#endif
21507+
21508+#ifndef GL_NV_gpu_program4
21509+#define GL_NV_gpu_program4 1
21510+#ifdef GL_GLEXT_PROTOTYPES
21511+GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint);
21512+GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum, GLuint, const GLint *);
21513+GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *);
21514+GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
21515+GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum, GLuint, const GLuint *);
21516+GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *);
21517+GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint);
21518+GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum, GLuint, const GLint *);
21519+GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *);
21520+GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
21521+GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum, GLuint, const GLuint *);
21522+GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *);
21523+GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum, GLuint, GLint *);
21524+GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum, GLuint, GLuint *);
21525+GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum, GLuint, GLint *);
21526+GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum, GLuint, GLuint *);
21527+#endif /* GL_GLEXT_PROTOTYPES */
21528+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
21529+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
21530+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
21531+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
21532+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
21533+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
21534+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
21535+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
21536+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
21537+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
21538+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
21539+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
21540+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
21541+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
21542+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
21543+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
21544+#endif
21545+
21546+#ifndef GL_NV_geometry_program4
21547+#define GL_NV_geometry_program4 1
21548+#ifdef GL_GLEXT_PROTOTYPES
21549+GLAPI void APIENTRY glProgramVertexLimitNV (GLenum, GLint);
21550+GLAPI void APIENTRY glFramebufferTextureEXT (GLenum, GLenum, GLuint, GLint);
21551+GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum, GLenum, GLuint, GLint, GLint);
21552+GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum, GLenum, GLuint, GLint, GLenum);
21553+#endif /* GL_GLEXT_PROTOTYPES */
21554+typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit);
21555+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
21556+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
21557+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
21558+#endif
21559+
21560+#ifndef GL_EXT_geometry_shader4
21561+#define GL_EXT_geometry_shader4 1
21562+#ifdef GL_GLEXT_PROTOTYPES
21563+GLAPI void APIENTRY glProgramParameteriEXT (GLuint, GLenum, GLint);
21564+#endif /* GL_GLEXT_PROTOTYPES */
21565+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
21566+#endif
21567+
21568+#ifndef GL_NV_vertex_program4
21569+#define GL_NV_vertex_program4 1
21570+#ifdef GL_GLEXT_PROTOTYPES
21571+GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint, GLint);
21572+GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint, GLint, GLint);
21573+GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint, GLint, GLint, GLint);
21574+GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint, GLint, GLint, GLint, GLint);
21575+GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint, GLuint);
21576+GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint, GLuint, GLuint);
21577+GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint, GLuint, GLuint, GLuint);
21578+GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint, GLuint, GLuint, GLuint, GLuint);
21579+GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint, const GLint *);
21580+GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint, const GLint *);
21581+GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint, const GLint *);
21582+GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint, const GLint *);
21583+GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint, const GLuint *);
21584+GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint, const GLuint *);
21585+GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint, const GLuint *);
21586+GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint, const GLuint *);
21587+GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint, const GLbyte *);
21588+GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint, const GLshort *);
21589+GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint, const GLubyte *);
21590+GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint, const GLushort *);
21591+GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint, GLint, GLenum, GLsizei, const GLvoid *);
21592+GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint, GLenum, GLint *);
21593+GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint, GLenum, GLuint *);
21594+#endif /* GL_GLEXT_PROTOTYPES */
21595+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x);
21596+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y);
21597+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z);
21598+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
21599+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x);
21600+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y);
21601+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
21602+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
21603+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v);
21604+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v);
21605+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v);
21606+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v);
21607+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v);
21608+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v);
21609+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v);
21610+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v);
21611+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v);
21612+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v);
21613+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v);
21614+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v);
21615+typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
21616+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params);
21617+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params);
21618+#endif
21619+
21620+#ifndef GL_EXT_gpu_shader4
21621+#define GL_EXT_gpu_shader4 1
21622+#ifdef GL_GLEXT_PROTOTYPES
21623+GLAPI void APIENTRY glGetUniformuivEXT (GLuint, GLint, GLuint *);
21624+GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint, GLuint, const GLchar *);
21625+GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint, const GLchar *);
21626+GLAPI void APIENTRY glUniform1uiEXT (GLint, GLuint);
21627+GLAPI void APIENTRY glUniform2uiEXT (GLint, GLuint, GLuint);
21628+GLAPI void APIENTRY glUniform3uiEXT (GLint, GLuint, GLuint, GLuint);
21629+GLAPI void APIENTRY glUniform4uiEXT (GLint, GLuint, GLuint, GLuint, GLuint);
21630+GLAPI void APIENTRY glUniform1uivEXT (GLint, GLsizei, const GLuint *);
21631+GLAPI void APIENTRY glUniform2uivEXT (GLint, GLsizei, const GLuint *);
21632+GLAPI void APIENTRY glUniform3uivEXT (GLint, GLsizei, const GLuint *);
21633+GLAPI void APIENTRY glUniform4uivEXT (GLint, GLsizei, const GLuint *);
21634+#endif /* GL_GLEXT_PROTOTYPES */
21635+typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params);
21636+typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name);
21637+typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name);
21638+typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0);
21639+typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1);
21640+typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
21641+typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
21642+typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
21643+typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
21644+typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
21645+typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
21646+#endif
21647+
21648+#ifndef GL_EXT_draw_instanced
21649+#define GL_EXT_draw_instanced 1
21650+#ifdef GL_GLEXT_PROTOTYPES
21651+GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum, GLint, GLsizei, GLsizei);
21652+GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum, GLsizei, GLenum, const GLvoid *, GLsizei);
21653+#endif /* GL_GLEXT_PROTOTYPES */
21654+typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
21655+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
21656+#endif
21657+
21658+#ifndef GL_EXT_packed_float
21659+#define GL_EXT_packed_float 1
21660+#endif
21661+
21662+#ifndef GL_EXT_texture_array
21663+#define GL_EXT_texture_array 1
21664+#endif
21665+
21666+#ifndef GL_EXT_texture_buffer_object
21667+#define GL_EXT_texture_buffer_object 1
21668+#ifdef GL_GLEXT_PROTOTYPES
21669+GLAPI void APIENTRY glTexBufferEXT (GLenum, GLenum, GLuint);
21670+#endif /* GL_GLEXT_PROTOTYPES */
21671+typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
21672+#endif
21673+
21674+#ifndef GL_EXT_texture_compression_latc
21675+#define GL_EXT_texture_compression_latc 1
21676+#endif
21677+
21678+#ifndef GL_EXT_texture_compression_rgtc
21679+#define GL_EXT_texture_compression_rgtc 1
21680+#endif
21681+
21682+#ifndef GL_EXT_texture_shared_exponent
21683+#define GL_EXT_texture_shared_exponent 1
21684+#endif
21685+
21686+#ifndef GL_NV_depth_buffer_float
21687+#define GL_NV_depth_buffer_float 1
21688+#ifdef GL_GLEXT_PROTOTYPES
21689+GLAPI void APIENTRY glDepthRangedNV (GLdouble, GLdouble);
21690+GLAPI void APIENTRY glClearDepthdNV (GLdouble);
21691+GLAPI void APIENTRY glDepthBoundsdNV (GLdouble, GLdouble);
21692+#endif /* GL_GLEXT_PROTOTYPES */
21693+typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar);
21694+typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth);
21695+typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax);
21696+#endif
21697+
21698+#ifndef GL_NV_fragment_program4
21699+#define GL_NV_fragment_program4 1
21700+#endif
21701+
21702+#ifndef GL_NV_framebuffer_multisample_coverage
21703+#define GL_NV_framebuffer_multisample_coverage 1
21704+#ifdef GL_GLEXT_PROTOTYPES
21705+GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum, GLsizei, GLsizei, GLenum, GLsizei, GLsizei);
21706+#endif /* GL_GLEXT_PROTOTYPES */
21707+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
21708+#endif
21709+
21710+#ifndef GL_EXT_framebuffer_sRGB
21711+#define GL_EXT_framebuffer_sRGB 1
21712+#endif
21713+
21714+#ifndef GL_NV_geometry_shader4
21715+#define GL_NV_geometry_shader4 1
21716+#endif
21717+
21718+#ifndef GL_NV_parameter_buffer_object
21719+#define GL_NV_parameter_buffer_object 1
21720+#ifdef GL_GLEXT_PROTOTYPES
21721+GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum, GLuint, GLuint, GLsizei, const GLfloat *);
21722+GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum, GLuint, GLuint, GLsizei, const GLint *);
21723+GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum, GLuint, GLuint, GLsizei, const GLuint *);
21724+#endif /* GL_GLEXT_PROTOTYPES */
21725+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params);
21726+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params);
21727+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params);
21728+#endif
21729+
21730+#ifndef GL_EXT_draw_buffers2
21731+#define GL_EXT_draw_buffers2 1
21732+#ifdef GL_GLEXT_PROTOTYPES
21733+GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint, GLboolean, GLboolean, GLboolean, GLboolean);
21734+GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum, GLuint, GLboolean *);
21735+GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum, GLuint, GLint *);
21736+GLAPI void APIENTRY glEnableIndexedEXT (GLenum, GLuint);
21737+GLAPI void APIENTRY glDisableIndexedEXT (GLenum, GLuint);
21738+GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum, GLuint);
21739+#endif /* GL_GLEXT_PROTOTYPES */
21740+typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
21741+typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data);
21742+typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data);
21743+typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
21744+typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
21745+typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index);
21746+#endif
21747+
21748+#ifndef GL_NV_transform_feedback
21749+#define GL_NV_transform_feedback 1
21750+#ifdef GL_GLEXT_PROTOTYPES
21751+GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum);
21752+GLAPI void APIENTRY glEndTransformFeedbackNV (void);
21753+GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint, const GLint *, GLenum);
21754+GLAPI void APIENTRY glBindBufferRangeNV (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr);
21755+GLAPI void APIENTRY glBindBufferOffsetNV (GLenum, GLuint, GLuint, GLintptr);
21756+GLAPI void APIENTRY glBindBufferBaseNV (GLenum, GLuint, GLuint);
21757+GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint, GLsizei, const GLint *, GLenum);
21758+GLAPI void APIENTRY glActiveVaryingNV (GLuint, const GLchar *);
21759+GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint, const GLchar *);
21760+GLAPI void APIENTRY glGetActiveVaryingNV (GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *);
21761+GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint, GLuint, GLint *);
21762+#endif /* GL_GLEXT_PROTOTYPES */
21763+typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode);
21764+typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void);
21765+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode);
21766+typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
21767+typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
21768+typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer);
21769+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
21770+typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name);
21771+typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name);
21772+typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
21773+typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location);
21774+#endif
21775+
21776+#ifndef GL_EXT_bindable_uniform
21777+#define GL_EXT_bindable_uniform 1
21778+#ifdef GL_GLEXT_PROTOTYPES
21779+GLAPI void APIENTRY glUniformBufferEXT (GLuint, GLint, GLuint);
21780+GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint, GLint);
21781+GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint, GLint);
21782+#endif /* GL_GLEXT_PROTOTYPES */
21783+typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer);
21784+typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location);
21785+typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location);
21786+#endif
21787+
21788+#ifndef GL_EXT_texture_integer
21789+#define GL_EXT_texture_integer 1
21790+#ifdef GL_GLEXT_PROTOTYPES
21791+GLAPI void APIENTRY glTexParameterIivEXT (GLenum, GLenum, const GLint *);
21792+GLAPI void APIENTRY glTexParameterIuivEXT (GLenum, GLenum, const GLuint *);
21793+GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum, GLenum, GLint *);
21794+GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum, GLenum, GLuint *);
21795+GLAPI void APIENTRY glClearColorIiEXT (GLint, GLint, GLint, GLint);
21796+GLAPI void APIENTRY glClearColorIuiEXT (GLuint, GLuint, GLuint, GLuint);
21797+#endif /* GL_GLEXT_PROTOTYPES */
21798+typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
21799+typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
21800+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
21801+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
21802+typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha);
21803+typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);
21804+#endif
21805+
21806+
21807+#ifdef __cplusplus
21808+}
21809+#endif
21810+
21811+#endif
21812+
21813+
21814+/* ERO */
21815+GLAPI void GLAPIENTRY fake_gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *data);
21816Index: trunk/target-i386/mesa_glu.h
21817===================================================================
21818--- /dev/null 1970-01-01 00:00:00.000000000 +0000
21819+++ trunk/target-i386/mesa_glu.h 2009-01-19 23:06:08.000000000 +0000
21820@@ -0,0 +1,354 @@
21821+/*
21822+** License Applicability. Except to the extent portions of this file are
21823+** made subject to an alternative license as permitted in the SGI Free
21824+** Software License B, Version 1.1 (the "License"), the contents of this
21825+** file are subject only to the provisions of the License. You may not use
21826+** this file except in compliance with the License. You may obtain a copy
21827+** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
21828+** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
21829+**
21830+** http://oss.sgi.com/projects/FreeB
21831+**
21832+** Note that, as provided in the License, the Software is distributed on an
21833+** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
21834+** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
21835+** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
21836+** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
21837+**
21838+** Original Code. The Original Code is: OpenGL Sample Implementation,
21839+** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
21840+** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
21841+** Copyright in any portions created by third parties is as indicated
21842+** elsewhere herein. All Rights Reserved.
21843+**
21844+** Additional Notice Provisions: This software was created using the
21845+** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
21846+** not been independently verified as being compliant with the OpenGL(R)
21847+** version 1.2.1 Specification.
21848+*/
21849+
21850+#ifndef __glu_h__
21851+#define __glu_h__
21852+
21853+#if defined(USE_MGL_NAMESPACE)
21854+#include "glu_mangle.h"
21855+#endif
21856+
21857+//#include <GL/gl.h>
21858+#include "mesa_gl.h"
21859+
21860+#ifndef GLAPIENTRY
21861+#define GLAPIENTRY
21862+#endif
21863+
21864+#ifndef GLAPIENTRYP
21865+#define GLAPIENTRYP GLAPIENTRY *
21866+#endif
21867+
21868+#ifdef GLAPI
21869+#undef GLAPI
21870+#endif
21871+
21872+# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GLU32)
21873+# define GLAPI __declspec(dllexport)
21874+# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
21875+# define GLAPI __declspec(dllimport)
21876+# else /* for use with static link lib build of Win32 edition only */
21877+# define GLAPI extern
21878+# endif /* _STATIC_MESA support */
21879+
21880+
21881+#ifndef GLAPI
21882+#define GLAPI
21883+#endif
21884+
21885+#ifdef __cplusplus
21886+extern "C" {
21887+#endif
21888+
21889+/*************************************************************/
21890+
21891+/* Extensions */
21892+#define GLU_EXT_object_space_tess 1
21893+#define GLU_EXT_nurbs_tessellator 1
21894+
21895+/* Boolean */
21896+#define GLU_FALSE 0
21897+#define GLU_TRUE 1
21898+
21899+/* Version */
21900+#define GLU_VERSION_1_1 1
21901+#define GLU_VERSION_1_2 1
21902+#define GLU_VERSION_1_3 1
21903+
21904+/* StringName */
21905+#define GLU_VERSION 100800
21906+#define GLU_EXTENSIONS 100801
21907+
21908+/* ErrorCode */
21909+#define GLU_INVALID_ENUM 100900
21910+#define GLU_INVALID_VALUE 100901
21911+#define GLU_OUT_OF_MEMORY 100902
21912+#define GLU_INCOMPATIBLE_GL_VERSION 100903
21913+#define GLU_INVALID_OPERATION 100904
21914+
21915+/* NurbsDisplay */
21916+/* GLU_FILL */
21917+#define GLU_OUTLINE_POLYGON 100240
21918+#define GLU_OUTLINE_PATCH 100241
21919+
21920+/* NurbsCallback */
21921+#define GLU_NURBS_ERROR 100103
21922+#define GLU_ERROR 100103
21923+#define GLU_NURBS_BEGIN 100164
21924+#define GLU_NURBS_BEGIN_EXT 100164
21925+#define GLU_NURBS_VERTEX 100165
21926+#define GLU_NURBS_VERTEX_EXT 100165
21927+#define GLU_NURBS_NORMAL 100166
21928+#define GLU_NURBS_NORMAL_EXT 100166
21929+#define GLU_NURBS_COLOR 100167
21930+#define GLU_NURBS_COLOR_EXT 100167
21931+#define GLU_NURBS_TEXTURE_COORD 100168
21932+#define GLU_NURBS_TEX_COORD_EXT 100168
21933+#define GLU_NURBS_END 100169
21934+#define GLU_NURBS_END_EXT 100169
21935+#define GLU_NURBS_BEGIN_DATA 100170
21936+#define GLU_NURBS_BEGIN_DATA_EXT 100170
21937+#define GLU_NURBS_VERTEX_DATA 100171
21938+#define GLU_NURBS_VERTEX_DATA_EXT 100171
21939+#define GLU_NURBS_NORMAL_DATA 100172
21940+#define GLU_NURBS_NORMAL_DATA_EXT 100172
21941+#define GLU_NURBS_COLOR_DATA 100173
21942+#define GLU_NURBS_COLOR_DATA_EXT 100173
21943+#define GLU_NURBS_TEXTURE_COORD_DATA 100174
21944+#define GLU_NURBS_TEX_COORD_DATA_EXT 100174
21945+#define GLU_NURBS_END_DATA 100175
21946+#define GLU_NURBS_END_DATA_EXT 100175
21947+
21948+/* NurbsError */
21949+#define GLU_NURBS_ERROR1 100251
21950+#define GLU_NURBS_ERROR2 100252
21951+#define GLU_NURBS_ERROR3 100253
21952+#define GLU_NURBS_ERROR4 100254
21953+#define GLU_NURBS_ERROR5 100255
21954+#define GLU_NURBS_ERROR6 100256
21955+#define GLU_NURBS_ERROR7 100257
21956+#define GLU_NURBS_ERROR8 100258
21957+#define GLU_NURBS_ERROR9 100259
21958+#define GLU_NURBS_ERROR10 100260
21959+#define GLU_NURBS_ERROR11 100261
21960+#define GLU_NURBS_ERROR12 100262
21961+#define GLU_NURBS_ERROR13 100263
21962+#define GLU_NURBS_ERROR14 100264
21963+#define GLU_NURBS_ERROR15 100265
21964+#define GLU_NURBS_ERROR16 100266
21965+#define GLU_NURBS_ERROR17 100267
21966+#define GLU_NURBS_ERROR18 100268
21967+#define GLU_NURBS_ERROR19 100269
21968+#define GLU_NURBS_ERROR20 100270
21969+#define GLU_NURBS_ERROR21 100271
21970+#define GLU_NURBS_ERROR22 100272
21971+#define GLU_NURBS_ERROR23 100273
21972+#define GLU_NURBS_ERROR24 100274
21973+#define GLU_NURBS_ERROR25 100275
21974+#define GLU_NURBS_ERROR26 100276
21975+#define GLU_NURBS_ERROR27 100277
21976+#define GLU_NURBS_ERROR28 100278
21977+#define GLU_NURBS_ERROR29 100279
21978+#define GLU_NURBS_ERROR30 100280
21979+#define GLU_NURBS_ERROR31 100281
21980+#define GLU_NURBS_ERROR32 100282
21981+#define GLU_NURBS_ERROR33 100283
21982+#define GLU_NURBS_ERROR34 100284
21983+#define GLU_NURBS_ERROR35 100285
21984+#define GLU_NURBS_ERROR36 100286
21985+#define GLU_NURBS_ERROR37 100287
21986+
21987+/* NurbsProperty */
21988+#define GLU_AUTO_LOAD_MATRIX 100200
21989+#define GLU_CULLING 100201
21990+#define GLU_SAMPLING_TOLERANCE 100203
21991+#define GLU_DISPLAY_MODE 100204
21992+#define GLU_PARAMETRIC_TOLERANCE 100202
21993+#define GLU_SAMPLING_METHOD 100205
21994+#define GLU_U_STEP 100206
21995+#define GLU_V_STEP 100207
21996+#define GLU_NURBS_MODE 100160
21997+#define GLU_NURBS_MODE_EXT 100160
21998+#define GLU_NURBS_TESSELLATOR 100161
21999+#define GLU_NURBS_TESSELLATOR_EXT 100161
22000+#define GLU_NURBS_RENDERER 100162
22001+#define GLU_NURBS_RENDERER_EXT 100162
22002+
22003+/* NurbsSampling */
22004+#define GLU_OBJECT_PARAMETRIC_ERROR 100208
22005+#define GLU_OBJECT_PARAMETRIC_ERROR_EXT 100208
22006+#define GLU_OBJECT_PATH_LENGTH 100209
22007+#define GLU_OBJECT_PATH_LENGTH_EXT 100209
22008+#define GLU_PATH_LENGTH 100215
22009+#define GLU_PARAMETRIC_ERROR 100216
22010+#define GLU_DOMAIN_DISTANCE 100217
22011+
22012+/* NurbsTrim */
22013+#define GLU_MAP1_TRIM_2 100210
22014+#define GLU_MAP1_TRIM_3 100211
22015+
22016+/* QuadricDrawStyle */
22017+#define GLU_POINT 100010
22018+#define GLU_LINE 100011
22019+#define GLU_FILL 100012
22020+#define GLU_SILHOUETTE 100013
22021+
22022+/* QuadricCallback */
22023+/* GLU_ERROR */
22024+
22025+/* QuadricNormal */
22026+#define GLU_SMOOTH 100000
22027+#define GLU_FLAT 100001
22028+#define GLU_NONE 100002
22029+
22030+/* QuadricOrientation */
22031+#define GLU_OUTSIDE 100020
22032+#define GLU_INSIDE 100021
22033+
22034+/* TessCallback */
22035+#define GLU_TESS_BEGIN 100100
22036+#define GLU_BEGIN 100100
22037+#define GLU_TESS_VERTEX 100101
22038+#define GLU_VERTEX 100101
22039+#define GLU_TESS_END 100102
22040+#define GLU_END 100102
22041+#define GLU_TESS_ERROR 100103
22042+#define GLU_TESS_EDGE_FLAG 100104
22043+#define GLU_EDGE_FLAG 100104
22044+#define GLU_TESS_COMBINE 100105
22045+#define GLU_TESS_BEGIN_DATA 100106
22046+#define GLU_TESS_VERTEX_DATA 100107
22047+#define GLU_TESS_END_DATA 100108
22048+#define GLU_TESS_ERROR_DATA 100109
22049+#define GLU_TESS_EDGE_FLAG_DATA 100110
22050+#define GLU_TESS_COMBINE_DATA 100111
22051+
22052+/* TessContour */
22053+#define GLU_CW 100120
22054+#define GLU_CCW 100121
22055+#define GLU_INTERIOR 100122
22056+#define GLU_EXTERIOR 100123
22057+#define GLU_UNKNOWN 100124
22058+
22059+/* TessProperty */
22060+#define GLU_TESS_WINDING_RULE 100140
22061+#define GLU_TESS_BOUNDARY_ONLY 100141
22062+#define GLU_TESS_TOLERANCE 100142
22063+
22064+/* TessError */
22065+#define GLU_TESS_ERROR1 100151
22066+#define GLU_TESS_ERROR2 100152
22067+#define GLU_TESS_ERROR3 100153
22068+#define GLU_TESS_ERROR4 100154
22069+#define GLU_TESS_ERROR5 100155
22070+#define GLU_TESS_ERROR6 100156
22071+#define GLU_TESS_ERROR7 100157
22072+#define GLU_TESS_ERROR8 100158
22073+#define GLU_TESS_MISSING_BEGIN_POLYGON 100151
22074+#define GLU_TESS_MISSING_BEGIN_CONTOUR 100152
22075+#define GLU_TESS_MISSING_END_POLYGON 100153
22076+#define GLU_TESS_MISSING_END_CONTOUR 100154
22077+#define GLU_TESS_COORD_TOO_LARGE 100155
22078+#define GLU_TESS_NEED_COMBINE_CALLBACK 100156
22079+
22080+/* TessWinding */
22081+#define GLU_TESS_WINDING_ODD 100130
22082+#define GLU_TESS_WINDING_NONZERO 100131
22083+#define GLU_TESS_WINDING_POSITIVE 100132
22084+#define GLU_TESS_WINDING_NEGATIVE 100133
22085+#define GLU_TESS_WINDING_ABS_GEQ_TWO 100134
22086+
22087+/*************************************************************/
22088+
22089+
22090+#ifdef __cplusplus
22091+class GLUnurbs;
22092+class GLUquadric;
22093+class GLUtesselator;
22094+#else
22095+typedef struct GLUnurbs GLUnurbs;
22096+typedef struct GLUquadric GLUquadric;
22097+typedef struct GLUtesselator GLUtesselator;
22098+#endif
22099+
22100+typedef GLUnurbs GLUnurbsObj;
22101+typedef GLUquadric GLUquadricObj;
22102+typedef GLUtesselator GLUtesselatorObj;
22103+typedef GLUtesselator GLUtriangulatorObj;
22104+
22105+#define GLU_TESS_MAX_COORD 1.0e150
22106+
22107+/* Internal convenience typedefs */
22108+typedef void (GLAPIENTRYP _GLUfuncptr)();
22109+
22110+GLAPI void GLAPIENTRY gluBeginCurve (GLUnurbs* nurb);
22111+GLAPI void GLAPIENTRY gluBeginPolygon (GLUtesselator* tess);
22112+GLAPI void GLAPIENTRY gluBeginSurface (GLUnurbs* nurb);
22113+GLAPI void GLAPIENTRY gluBeginTrim (GLUnurbs* nurb);
22114+GLAPI GLint GLAPIENTRY gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
22115+GLAPI GLint GLAPIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
22116+GLAPI GLint GLAPIENTRY gluBuild2DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
22117+GLAPI GLint GLAPIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data);
22118+GLAPI GLint GLAPIENTRY gluBuild3DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
22119+GLAPI GLint GLAPIENTRY gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
22120+GLAPI GLboolean GLAPIENTRY gluCheckExtension (const GLubyte *extName, const GLubyte *extString);
22121+GLAPI void GLAPIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
22122+GLAPI void GLAPIENTRY gluDeleteNurbsRenderer (GLUnurbs* nurb);
22123+GLAPI void GLAPIENTRY gluDeleteQuadric (GLUquadric* quad);
22124+GLAPI void GLAPIENTRY gluDeleteTess (GLUtesselator* tess);
22125+GLAPI void GLAPIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
22126+GLAPI void GLAPIENTRY gluEndCurve (GLUnurbs* nurb);
22127+GLAPI void GLAPIENTRY gluEndPolygon (GLUtesselator* tess);
22128+GLAPI void GLAPIENTRY gluEndSurface (GLUnurbs* nurb);
22129+GLAPI void GLAPIENTRY gluEndTrim (GLUnurbs* nurb);
22130+GLAPI const GLubyte * GLAPIENTRY gluErrorString (GLenum error);
22131+GLAPI void GLAPIENTRY gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
22132+GLAPI const GLubyte * GLAPIENTRY gluGetString (GLenum name);
22133+GLAPI void GLAPIENTRY gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
22134+GLAPI void GLAPIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
22135+GLAPI void GLAPIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
22136+GLAPI GLUnurbs* GLAPIENTRY gluNewNurbsRenderer (void);
22137+GLAPI GLUquadric* GLAPIENTRY gluNewQuadric (void);
22138+GLAPI GLUtesselator* GLAPIENTRY gluNewTess (void);
22139+GLAPI void GLAPIENTRY gluNextContour (GLUtesselator* tess, GLenum type);
22140+GLAPI void GLAPIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
22141+GLAPI void GLAPIENTRY gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData);
22142+GLAPI void GLAPIENTRY gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData);
22143+GLAPI void GLAPIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
22144+GLAPI void GLAPIENTRY gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
22145+GLAPI void GLAPIENTRY gluNurbsSurface (GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type);
22146+GLAPI void GLAPIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
22147+GLAPI void GLAPIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
22148+GLAPI void GLAPIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
22149+GLAPI void GLAPIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
22150+GLAPI GLint GLAPIENTRY gluProject (GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ);
22151+GLAPI void GLAPIENTRY gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
22152+GLAPI void GLAPIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
22153+GLAPI void GLAPIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
22154+GLAPI void GLAPIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal);
22155+GLAPI void GLAPIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
22156+GLAPI void GLAPIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture);
22157+GLAPI GLint GLAPIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
22158+GLAPI void GLAPIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
22159+GLAPI void GLAPIENTRY gluTessBeginContour (GLUtesselator* tess);
22160+GLAPI void GLAPIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
22161+GLAPI void GLAPIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
22162+GLAPI void GLAPIENTRY gluTessEndContour (GLUtesselator* tess);
22163+GLAPI void GLAPIENTRY gluTessEndPolygon (GLUtesselator* tess);
22164+GLAPI void GLAPIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
22165+GLAPI void GLAPIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
22166+GLAPI void GLAPIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
22167+GLAPI GLint GLAPIENTRY gluUnProject (GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ);
22168+GLAPI GLint GLAPIENTRY gluUnProject4 (GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble nearVal, GLdouble farVal, GLdouble* objX, GLdouble* objY, GLdouble* objZ, GLdouble* objW);
22169+
22170+#ifdef __cplusplus
22171+}
22172+#endif
22173+
22174+#endif /* __glu_h__ */
22175Index: trunk/target-i386/mesa_glx.h
22176===================================================================
22177--- /dev/null 1970-01-01 00:00:00.000000000 +0000
22178+++ trunk/target-i386/mesa_glx.h 2009-01-19 23:06:08.000000000 +0000
22179@@ -0,0 +1,510 @@
22180+/*
22181+ * Mesa 3-D graphics library
22182+ * Version: 6.5
22183+ *
22184+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
22185+ *
22186+ * Permission is hereby granted, free of charge, to any person obtaining a
22187+ * copy of this software and associated documentation files (the "Software"),
22188+ * to deal in the Software without restriction, including without limitation
22189+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
22190+ * and/or sell copies of the Software, and to permit persons to whom the
22191+ * Software is furnished to do so, subject to the following conditions:
22192+ *
22193+ * The above copyright notice and this permission notice shall be included
22194+ * in all copies or substantial portions of the Software.
22195+ *
22196+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22197+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22198+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22199+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
22200+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22201+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22202+ */
22203+
22204+
22205+#ifndef GLX_H
22206+#define GLX_H
22207+
22208+
22209+#ifdef __VMS
22210+#include <GL/vms_x_fix.h>
22211+# ifdef __cplusplus
22212+/* VMS Xlib.h gives problems with C++.
22213+ * this avoids a bunch of trivial warnings */
22214+#pragma message disable nosimpint
22215+#endif
22216+#endif
22217+#include <X11/Xlib.h>
22218+#include <X11/Xutil.h>
22219+#ifdef __VMS
22220+# ifdef __cplusplus
22221+#pragma message enable nosimpint
22222+#endif
22223+#endif
22224+#include <mesa_gl.h>
22225+
22226+
22227+#if defined(USE_MGL_NAMESPACE)
22228+#include "glx_mangle.h"
22229+#endif
22230+
22231+
22232+#ifdef __cplusplus
22233+extern "C" {
22234+#endif
22235+
22236+
22237+#define GLX_VERSION_1_1 1
22238+#define GLX_VERSION_1_2 1
22239+#define GLX_VERSION_1_3 1
22240+#define GLX_VERSION_1_4 1
22241+
22242+#define GLX_EXTENSION_NAME "GLX"
22243+
22244+
22245+
22246+/*
22247+ * Tokens for glXChooseVisual and glXGetConfig:
22248+ */
22249+#define GLX_USE_GL 1
22250+#define GLX_BUFFER_SIZE 2
22251+#define GLX_LEVEL 3
22252+#define GLX_RGBA 4
22253+#define GLX_DOUBLEBUFFER 5
22254+#define GLX_STEREO 6
22255+#define GLX_AUX_BUFFERS 7
22256+#define GLX_RED_SIZE 8
22257+#define GLX_GREEN_SIZE 9
22258+#define GLX_BLUE_SIZE 10
22259+#define GLX_ALPHA_SIZE 11
22260+#define GLX_DEPTH_SIZE 12
22261+#define GLX_STENCIL_SIZE 13
22262+#define GLX_ACCUM_RED_SIZE 14
22263+#define GLX_ACCUM_GREEN_SIZE 15
22264+#define GLX_ACCUM_BLUE_SIZE 16
22265+#define GLX_ACCUM_ALPHA_SIZE 17
22266+
22267+
22268+/*
22269+ * Error codes returned by glXGetConfig:
22270+ */
22271+#define GLX_BAD_SCREEN 1
22272+#define GLX_BAD_ATTRIBUTE 2
22273+#define GLX_NO_EXTENSION 3
22274+#define GLX_BAD_VISUAL 4
22275+#define GLX_BAD_CONTEXT 5
22276+#define GLX_BAD_VALUE 6
22277+#define GLX_BAD_ENUM 7
22278+
22279+
22280+/*
22281+ * GLX 1.1 and later:
22282+ */
22283+#define GLX_VENDOR 1
22284+#define GLX_VERSION 2
22285+#define GLX_EXTENSIONS 3
22286+
22287+
22288+/*
22289+ * GLX 1.3 and later:
22290+ */
22291+#define GLX_CONFIG_CAVEAT 0x20
22292+#define GLX_DONT_CARE 0xFFFFFFFF
22293+#define GLX_X_VISUAL_TYPE 0x22
22294+#define GLX_TRANSPARENT_TYPE 0x23
22295+#define GLX_TRANSPARENT_INDEX_VALUE 0x24
22296+#define GLX_TRANSPARENT_RED_VALUE 0x25
22297+#define GLX_TRANSPARENT_GREEN_VALUE 0x26
22298+#define GLX_TRANSPARENT_BLUE_VALUE 0x27
22299+#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
22300+#define GLX_WINDOW_BIT 0x00000001
22301+#define GLX_PIXMAP_BIT 0x00000002
22302+#define GLX_PBUFFER_BIT 0x00000004
22303+#define GLX_AUX_BUFFERS_BIT 0x00000010
22304+#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
22305+#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
22306+#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
22307+#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
22308+#define GLX_DEPTH_BUFFER_BIT 0x00000020
22309+#define GLX_STENCIL_BUFFER_BIT 0x00000040
22310+#define GLX_ACCUM_BUFFER_BIT 0x00000080
22311+#define GLX_NONE 0x8000
22312+#define GLX_SLOW_CONFIG 0x8001
22313+#define GLX_TRUE_COLOR 0x8002
22314+#define GLX_DIRECT_COLOR 0x8003
22315+#define GLX_PSEUDO_COLOR 0x8004
22316+#define GLX_STATIC_COLOR 0x8005
22317+#define GLX_GRAY_SCALE 0x8006
22318+#define GLX_STATIC_GRAY 0x8007
22319+#define GLX_TRANSPARENT_RGB 0x8008
22320+#define GLX_TRANSPARENT_INDEX 0x8009
22321+#define GLX_VISUAL_ID 0x800B
22322+#define GLX_SCREEN 0x800C
22323+#define GLX_NON_CONFORMANT_CONFIG 0x800D
22324+#define GLX_DRAWABLE_TYPE 0x8010
22325+#define GLX_RENDER_TYPE 0x8011
22326+#define GLX_X_RENDERABLE 0x8012
22327+#define GLX_FBCONFIG_ID 0x8013
22328+#define GLX_RGBA_TYPE 0x8014
22329+#define GLX_COLOR_INDEX_TYPE 0x8015
22330+#define GLX_MAX_PBUFFER_WIDTH 0x8016
22331+#define GLX_MAX_PBUFFER_HEIGHT 0x8017
22332+#define GLX_MAX_PBUFFER_PIXELS 0x8018
22333+#define GLX_PRESERVED_CONTENTS 0x801B
22334+#define GLX_LARGEST_PBUFFER 0x801C
22335+#define GLX_WIDTH 0x801D
22336+#define GLX_HEIGHT 0x801E
22337+#define GLX_EVENT_MASK 0x801F
22338+#define GLX_DAMAGED 0x8020
22339+#define GLX_SAVED 0x8021
22340+#define GLX_WINDOW 0x8022
22341+#define GLX_PBUFFER 0x8023
22342+#define GLX_PBUFFER_HEIGHT 0x8040
22343+#define GLX_PBUFFER_WIDTH 0x8041
22344+#define GLX_RGBA_BIT 0x00000001
22345+#define GLX_COLOR_INDEX_BIT 0x00000002
22346+#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
22347+
22348+
22349+/*
22350+ * GLX 1.4 and later:
22351+ */
22352+#define GLX_SAMPLE_BUFFERS 0x186a0 /*100000*/
22353+#define GLX_SAMPLES 0x186a1 /*100001*/
22354+
22355+
22356+
22357+typedef struct __GLXcontextRec *GLXContext;
22358+typedef XID GLXPixmap;
22359+typedef XID GLXDrawable;
22360+/* GLX 1.3 and later */
22361+typedef struct __GLXFBConfigRec *GLXFBConfig;
22362+typedef XID GLXFBConfigID;
22363+typedef XID GLXContextID;
22364+typedef XID GLXWindow;
22365+typedef XID GLXPbuffer;
22366+
22367+
22368+
22369+extern XVisualInfo* glXChooseVisual( Display *dpy, int screen,
22370+ int *attribList );
22371+
22372+extern GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis,
22373+ GLXContext shareList, Bool direct );
22374+
22375+extern void glXDestroyContext( Display *dpy, GLXContext ctx );
22376+
22377+extern Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable,
22378+ GLXContext ctx);
22379+
22380+extern void glXCopyContext( Display *dpy, GLXContext src, GLXContext dst,
22381+ unsigned long mask );
22382+
22383+extern void glXSwapBuffers( Display *dpy, GLXDrawable drawable );
22384+
22385+extern GLXPixmap glXCreateGLXPixmap( Display *dpy, XVisualInfo *visual,
22386+ Pixmap pixmap );
22387+
22388+extern void glXDestroyGLXPixmap( Display *dpy, GLXPixmap pixmap );
22389+
22390+extern Bool glXQueryExtension( Display *dpy, int *errorb, int *event );
22391+
22392+extern Bool glXQueryVersion( Display *dpy, int *maj, int *min );
22393+
22394+extern Bool glXIsDirect( Display *dpy, GLXContext ctx );
22395+
22396+extern int glXGetConfig( Display *dpy, XVisualInfo *visual,
22397+ int attrib, int *value );
22398+
22399+extern GLXContext glXGetCurrentContext( void );
22400+
22401+extern GLXDrawable glXGetCurrentDrawable( void );
22402+
22403+extern void glXWaitGL( void );
22404+
22405+extern void glXWaitX( void );
22406+
22407+extern void glXUseXFont( Font font, int first, int count, int list );
22408+
22409+
22410+
22411+/* GLX 1.1 and later */
22412+extern const char *glXQueryExtensionsString( Display *dpy, int screen );
22413+
22414+extern const char *glXQueryServerString( Display *dpy, int screen, int name );
22415+
22416+extern const char *glXGetClientString( Display *dpy, int name );
22417+
22418+
22419+/* GLX 1.2 and later */
22420+extern Display *glXGetCurrentDisplay( void );
22421+
22422+
22423+/* GLX 1.3 and later */
22424+extern GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
22425+ const int *attribList, int *nitems );
22426+
22427+extern int glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config,
22428+ int attribute, int *value );
22429+
22430+extern GLXFBConfig *glXGetFBConfigs( Display *dpy, int screen,
22431+ int *nelements );
22432+
22433+extern XVisualInfo *glXGetVisualFromFBConfig( Display *dpy,
22434+ GLXFBConfig config );
22435+
22436+extern GLXWindow glXCreateWindow( Display *dpy, GLXFBConfig config,
22437+ Window win, const int *attribList );
22438+
22439+extern void glXDestroyWindow( Display *dpy, GLXWindow window );
22440+
22441+extern GLXPixmap glXCreatePixmap( Display *dpy, GLXFBConfig config,
22442+ Pixmap pixmap, const int *attribList );
22443+
22444+extern void glXDestroyPixmap( Display *dpy, GLXPixmap pixmap );
22445+
22446+extern GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config,
22447+ const int *attribList );
22448+
22449+extern void glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf );
22450+
22451+extern void glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute,
22452+ unsigned int *value );
22453+
22454+extern GLXContext glXCreateNewContext( Display *dpy, GLXFBConfig config,
22455+ int renderType, GLXContext shareList,
22456+ Bool direct );
22457+
22458+extern Bool glXMakeContextCurrent( Display *dpy, GLXDrawable draw,
22459+ GLXDrawable read, GLXContext ctx );
22460+
22461+extern GLXDrawable glXGetCurrentReadDrawable( void );
22462+
22463+extern int glXQueryContext( Display *dpy, GLXContext ctx, int attribute,
22464+ int *value );
22465+
22466+extern void glXSelectEvent( Display *dpy, GLXDrawable drawable,
22467+ unsigned long mask );
22468+
22469+extern void glXGetSelectedEvent( Display *dpy, GLXDrawable drawable,
22470+ unsigned long *mask );
22471+
22472+
22473+/* GLX 1.4 and later */
22474+extern void (*glXGetProcAddress(const GLubyte *procname))( void );
22475+
22476+
22477+#ifndef GLX_GLXEXT_LEGACY
22478+
22479+#include <mesa_glxext.h>
22480+
22481+#else
22482+
22483+
22484+
22485+/*
22486+ * ARB 2. GLX_ARB_get_proc_address
22487+ */
22488+#ifndef GLX_ARB_get_proc_address
22489+#define GLX_ARB_get_proc_address 1
22490+
22491+typedef void (*__GLXextFuncPtr)(void);
22492+extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
22493+
22494+#endif /* GLX_ARB_get_proc_address */
22495+
22496+
22497+
22498+#endif /* GLX_GLXEXT_LEGACY */
22499+
22500+
22501+/**
22502+ ** The following aren't in glxext.h yet.
22503+ **/
22504+
22505+
22506+/*
22507+ * ???. GLX_NV_vertex_array_range
22508+ */
22509+#ifndef GLX_NV_vertex_array_range
22510+#define GLX_NV_vertex_array_range
22511+
22512+extern void *glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
22513+extern void glXFreeMemoryNV(GLvoid *pointer);
22514+typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
22515+typedef void ( * PFNGLXFREEMEMORYNVPROC) (GLvoid *pointer);
22516+
22517+#endif /* GLX_NV_vertex_array_range */
22518+
22519+
22520+/*
22521+ * ???. GLX_MESA_allocate_memory
22522+ */
22523+#ifndef GLX_MESA_allocate_memory
22524+#define GLX_MESA_allocate_memory 1
22525+
22526+extern void *glXAllocateMemoryMESA(Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
22527+extern void glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer);
22528+extern GLuint glXGetMemoryOffsetMESA(Display *dpy, int scrn, const void *pointer);
22529+typedef void * ( * PFNGLXALLOCATEMEMORYMESAPROC) (Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
22530+typedef void ( * PFNGLXFREEMEMORYMESAPROC) (Display *dpy, int scrn, void *pointer);
22531+typedef GLuint (* PFNGLXGETMEMORYOFFSETMESAPROC) (Display *dpy, int scrn, const void *pointer);
22532+
22533+#endif /* GLX_MESA_allocate_memory */
22534+
22535+
22536+/*
22537+ * ARB ?. GLX_ARB_render_texture
22538+ * XXX This was never finalized!
22539+ */
22540+#ifndef GLX_ARB_render_texture
22541+#define GLX_ARB_render_texture 1
22542+
22543+extern Bool glXBindTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
22544+extern Bool glXReleaseTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
22545+extern Bool glXDrawableAttribARB(Display *dpy, GLXDrawable draw, const int *attribList);
22546+
22547+#endif /* GLX_ARB_render_texture */
22548+
22549+
22550+#ifndef GLX_ATI_render_texture
22551+#define GLX_ATI_render_texture 1
22552+
22553+extern void glXBindTexImageATI(Display *dpy, GLXPbuffer pbuffer, int buffer);
22554+extern void glXReleaseTexImageATI(Display *dpy, GLXPbuffer pbuffer, int buffer);
22555+extern void glXDrawableAttribATI(Display *dpy, GLXDrawable draw, const int *attribList);
22556+
22557+#endif /* GLX_ATI_render_texture */
22558+
22559+
22560+/*
22561+ * Remove this when glxext.h is updated.
22562+ */
22563+#ifndef GLX_NV_float_buffer
22564+#define GLX_NV_float_buffer 1
22565+
22566+#define GLX_FLOAT_COMPONENTS_NV 0x20B0
22567+
22568+#endif /* GLX_NV_float_buffer */
22569+
22570+
22571+
22572+/*
22573+ * #?. GLX_MESA_swap_frame_usage
22574+ */
22575+#ifndef GLX_MESA_swap_frame_usage
22576+#define GLX_MESA_swap_frame_usage 1
22577+
22578+extern int glXGetFrameUsageMESA(Display *dpy, GLXDrawable drawable, float *usage);
22579+extern int glXBeginFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
22580+extern int glXEndFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
22581+extern int glXQueryFrameTrackingMESA(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
22582+
22583+typedef int (*PFNGLXGETFRAMEUSAGEMESAPROC) (Display *dpy, GLXDrawable drawable, float *usage);
22584+typedef int (*PFNGLXBEGINFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
22585+typedef int (*PFNGLXENDFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
22586+typedef int (*PFNGLXQUERYFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
22587+
22588+#endif /* GLX_MESA_swap_frame_usage */
22589+
22590+
22591+
22592+/*
22593+ * #?. GLX_MESA_swap_control
22594+ */
22595+#ifndef GLX_MESA_swap_control
22596+#define GLX_MESA_swap_control 1
22597+
22598+extern int glXSwapIntervalMESA(unsigned int interval);
22599+extern int glXGetSwapIntervalMESA(void);
22600+
22601+typedef int (*PFNGLXSWAPINTERVALMESAPROC)(unsigned int interval);
22602+typedef int (*PFNGLXGETSWAPINTERVALMESAPROC)(void);
22603+
22604+#endif /* GLX_MESA_swap_control */
22605+
22606+
22607+
22608+/*
22609+ * #?. GLX_EXT_texture_from_pixmap
22610+ * XXX not finished?
22611+ */
22612+#ifndef GLX_EXT_texture_from_pixmap
22613+#define GLX_EXT_texture_from_pixmap 1
22614+
22615+#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
22616+#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
22617+#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
22618+#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
22619+#define GLX_Y_INVERTED_EXT 0x20D4
22620+
22621+#define GLX_TEXTURE_FORMAT_EXT 0x20D5
22622+#define GLX_TEXTURE_TARGET_EXT 0x20D6
22623+#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
22624+
22625+#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
22626+#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
22627+#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
22628+
22629+#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
22630+#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
22631+#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
22632+
22633+#define GLX_TEXTURE_1D_EXT 0x20DB
22634+#define GLX_TEXTURE_2D_EXT 0x20DC
22635+#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
22636+
22637+#define GLX_FRONT_LEFT_EXT 0x20DE
22638+#define GLX_FRONT_RIGHT_EXT 0x20DF
22639+#define GLX_BACK_LEFT_EXT 0x20E0
22640+#define GLX_BACK_RIGHT_EXT 0x20E1
22641+#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
22642+#define GLX_BACK_EXT GLX_BACK_LEFT_EXT
22643+#define GLX_AUX0_EXT 0x20E2
22644+#define GLX_AUX1_EXT 0x20E3
22645+#define GLX_AUX2_EXT 0x20E4
22646+#define GLX_AUX3_EXT 0x20E5
22647+#define GLX_AUX4_EXT 0x20E6
22648+#define GLX_AUX5_EXT 0x20E7
22649+#define GLX_AUX6_EXT 0x20E8
22650+#define GLX_AUX7_EXT 0x20E9
22651+#define GLX_AUX8_EXT 0x20EA
22652+#define GLX_AUX9_EXT 0x20EB
22653+
22654+extern void glXBindTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
22655+extern void glXReleaseTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer);
22656+
22657+#endif /* GLX_EXT_texture_from_pixmap */
22658+
22659+
22660+
22661+
22662+/*** Should these go here, or in another header? */
22663+/*
22664+** GLX Events
22665+*/
22666+typedef struct {
22667+ int event_type; /* GLX_DAMAGED or GLX_SAVED */
22668+ int draw_type; /* GLX_WINDOW or GLX_PBUFFER */
22669+ unsigned long serial; /* # of last request processed by server */
22670+ Bool send_event; /* true if this came for SendEvent request */
22671+ Display *display; /* display the event was read from */
22672+ GLXDrawable drawable; /* XID of Drawable */
22673+ unsigned int buffer_mask; /* mask indicating which buffers are affected */
22674+ unsigned int aux_buffer; /* which aux buffer was affected */
22675+ int x, y;
22676+ int width, height;
22677+ int count; /* if nonzero, at least this many more */
22678+} GLXPbufferClobberEvent;
22679+
22680+typedef union __GLXEvent {
22681+ GLXPbufferClobberEvent glxpbufferclobber;
22682+ long pad[24];
22683+} GLXEvent;
22684+
22685+#ifdef __cplusplus
22686+}
22687+#endif
22688+
22689+#endif
22690Index: trunk/target-i386/mesa_glxext.h
22691===================================================================
22692--- /dev/null 1970-01-01 00:00:00.000000000 +0000
22693+++ trunk/target-i386/mesa_glxext.h 2009-01-19 23:06:08.000000000 +0000
22694@@ -0,0 +1,785 @@
22695+#ifndef __glxext_h_
22696+#define __glxext_h_
22697+
22698+#ifdef __cplusplus
22699+extern "C" {
22700+#endif
22701+
22702+/*
22703+** Copyright (c) 2007 The Khronos Group Inc.
22704+**
22705+** Permission is hereby granted, free of charge, to any person obtaining a
22706+** copy of this software and/or associated documentation files (the
22707+** "Materials"), to deal in the Materials without restriction, including
22708+** without limitation the rights to use, copy, modify, merge, publish,
22709+** distribute, sublicense, and/or sell copies of the Materials, and to
22710+** permit persons to whom the Materials are furnished to do so, subject to
22711+** the following conditions:
22712+**
22713+** The above copyright notice and this permission notice shall be included
22714+** in all copies or substantial portions of the Materials.
22715+**
22716+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22717+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22718+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22719+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22720+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22721+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22722+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
22723+*/
22724+
22725+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
22726+#define WIN32_LEAN_AND_MEAN 1
22727+#include <windows.h>
22728+#endif
22729+
22730+#ifndef APIENTRY
22731+#define APIENTRY
22732+#endif
22733+#ifndef APIENTRYP
22734+#define APIENTRYP APIENTRY *
22735+#endif
22736+#ifndef GLAPI
22737+#define GLAPI extern
22738+#endif
22739+
22740+/*************************************************************/
22741+
22742+/* Header file version number, required by OpenGL ABI for Linux */
22743+/* glxext.h last updated 2007/04/21 */
22744+/* Current version at http://www.opengl.org/registry/ */
22745+#define GLX_GLXEXT_VERSION 19
22746+
22747+#ifndef GLX_VERSION_1_3
22748+#define GLX_WINDOW_BIT 0x00000001
22749+#define GLX_PIXMAP_BIT 0x00000002
22750+#define GLX_PBUFFER_BIT 0x00000004
22751+#define GLX_RGBA_BIT 0x00000001
22752+#define GLX_COLOR_INDEX_BIT 0x00000002
22753+#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
22754+#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
22755+#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
22756+#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
22757+#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
22758+#define GLX_AUX_BUFFERS_BIT 0x00000010
22759+#define GLX_DEPTH_BUFFER_BIT 0x00000020
22760+#define GLX_STENCIL_BUFFER_BIT 0x00000040
22761+#define GLX_ACCUM_BUFFER_BIT 0x00000080
22762+#define GLX_CONFIG_CAVEAT 0x20
22763+#define GLX_X_VISUAL_TYPE 0x22
22764+#define GLX_TRANSPARENT_TYPE 0x23
22765+#define GLX_TRANSPARENT_INDEX_VALUE 0x24
22766+#define GLX_TRANSPARENT_RED_VALUE 0x25
22767+#define GLX_TRANSPARENT_GREEN_VALUE 0x26
22768+#define GLX_TRANSPARENT_BLUE_VALUE 0x27
22769+#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
22770+#define GLX_DONT_CARE 0xFFFFFFFF
22771+#define GLX_NONE 0x8000
22772+#define GLX_SLOW_CONFIG 0x8001
22773+#define GLX_TRUE_COLOR 0x8002
22774+#define GLX_DIRECT_COLOR 0x8003
22775+#define GLX_PSEUDO_COLOR 0x8004
22776+#define GLX_STATIC_COLOR 0x8005
22777+#define GLX_GRAY_SCALE 0x8006
22778+#define GLX_STATIC_GRAY 0x8007
22779+#define GLX_TRANSPARENT_RGB 0x8008
22780+#define GLX_TRANSPARENT_INDEX 0x8009
22781+#define GLX_VISUAL_ID 0x800B
22782+#define GLX_SCREEN 0x800C
22783+#define GLX_NON_CONFORMANT_CONFIG 0x800D
22784+#define GLX_DRAWABLE_TYPE 0x8010
22785+#define GLX_RENDER_TYPE 0x8011
22786+#define GLX_X_RENDERABLE 0x8012
22787+#define GLX_FBCONFIG_ID 0x8013
22788+#define GLX_RGBA_TYPE 0x8014
22789+#define GLX_COLOR_INDEX_TYPE 0x8015
22790+#define GLX_MAX_PBUFFER_WIDTH 0x8016
22791+#define GLX_MAX_PBUFFER_HEIGHT 0x8017
22792+#define GLX_MAX_PBUFFER_PIXELS 0x8018
22793+#define GLX_PRESERVED_CONTENTS 0x801B
22794+#define GLX_LARGEST_PBUFFER 0x801C
22795+#define GLX_WIDTH 0x801D
22796+#define GLX_HEIGHT 0x801E
22797+#define GLX_EVENT_MASK 0x801F
22798+#define GLX_DAMAGED 0x8020
22799+#define GLX_SAVED 0x8021
22800+#define GLX_WINDOW 0x8022
22801+#define GLX_PBUFFER 0x8023
22802+#define GLX_PBUFFER_HEIGHT 0x8040
22803+#define GLX_PBUFFER_WIDTH 0x8041
22804+#endif
22805+
22806+#ifndef GLX_VERSION_1_4
22807+#define GLX_SAMPLE_BUFFERS 100000
22808+#define GLX_SAMPLES 100001
22809+#endif
22810+
22811+#ifndef GLX_ARB_get_proc_address
22812+#endif
22813+
22814+#ifndef GLX_ARB_multisample
22815+#define GLX_SAMPLE_BUFFERS_ARB 100000
22816+#define GLX_SAMPLES_ARB 100001
22817+#endif
22818+
22819+#ifndef GLX_ARB_fbconfig_float
22820+#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9
22821+#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
22822+#endif
22823+
22824+#ifndef GLX_SGIS_multisample
22825+#define GLX_SAMPLE_BUFFERS_SGIS 100000
22826+#define GLX_SAMPLES_SGIS 100001
22827+#endif
22828+
22829+#ifndef GLX_EXT_visual_info
22830+#define GLX_X_VISUAL_TYPE_EXT 0x22
22831+#define GLX_TRANSPARENT_TYPE_EXT 0x23
22832+#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
22833+#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
22834+#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
22835+#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
22836+#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
22837+#define GLX_NONE_EXT 0x8000
22838+#define GLX_TRUE_COLOR_EXT 0x8002
22839+#define GLX_DIRECT_COLOR_EXT 0x8003
22840+#define GLX_PSEUDO_COLOR_EXT 0x8004
22841+#define GLX_STATIC_COLOR_EXT 0x8005
22842+#define GLX_GRAY_SCALE_EXT 0x8006
22843+#define GLX_STATIC_GRAY_EXT 0x8007
22844+#define GLX_TRANSPARENT_RGB_EXT 0x8008
22845+#define GLX_TRANSPARENT_INDEX_EXT 0x8009
22846+#endif
22847+
22848+#ifndef GLX_SGI_swap_control
22849+#endif
22850+
22851+#ifndef GLX_SGI_video_sync
22852+#endif
22853+
22854+#ifndef GLX_SGI_make_current_read
22855+#endif
22856+
22857+#ifndef GLX_SGIX_video_source
22858+#endif
22859+
22860+#ifndef GLX_EXT_visual_rating
22861+#define GLX_VISUAL_CAVEAT_EXT 0x20
22862+#define GLX_SLOW_VISUAL_EXT 0x8001
22863+#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
22864+/* reuse GLX_NONE_EXT */
22865+#endif
22866+
22867+#ifndef GLX_EXT_import_context
22868+#define GLX_SHARE_CONTEXT_EXT 0x800A
22869+#define GLX_VISUAL_ID_EXT 0x800B
22870+#define GLX_SCREEN_EXT 0x800C
22871+#endif
22872+
22873+#ifndef GLX_SGIX_fbconfig
22874+#define GLX_WINDOW_BIT_SGIX 0x00000001
22875+#define GLX_PIXMAP_BIT_SGIX 0x00000002
22876+#define GLX_RGBA_BIT_SGIX 0x00000001
22877+#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
22878+#define GLX_DRAWABLE_TYPE_SGIX 0x8010
22879+#define GLX_RENDER_TYPE_SGIX 0x8011
22880+#define GLX_X_RENDERABLE_SGIX 0x8012
22881+#define GLX_FBCONFIG_ID_SGIX 0x8013
22882+#define GLX_RGBA_TYPE_SGIX 0x8014
22883+#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
22884+/* reuse GLX_SCREEN_EXT */
22885+#endif
22886+
22887+#ifndef GLX_SGIX_pbuffer
22888+#define GLX_PBUFFER_BIT_SGIX 0x00000004
22889+#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
22890+#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
22891+#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
22892+#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
22893+#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
22894+#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
22895+#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
22896+#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
22897+#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
22898+#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
22899+#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
22900+#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
22901+#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
22902+#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
22903+#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
22904+#define GLX_PRESERVED_CONTENTS_SGIX 0x801B
22905+#define GLX_LARGEST_PBUFFER_SGIX 0x801C
22906+#define GLX_WIDTH_SGIX 0x801D
22907+#define GLX_HEIGHT_SGIX 0x801E
22908+#define GLX_EVENT_MASK_SGIX 0x801F
22909+#define GLX_DAMAGED_SGIX 0x8020
22910+#define GLX_SAVED_SGIX 0x8021
22911+#define GLX_WINDOW_SGIX 0x8022
22912+#define GLX_PBUFFER_SGIX 0x8023
22913+#endif
22914+
22915+#ifndef GLX_SGI_cushion
22916+#endif
22917+
22918+#ifndef GLX_SGIX_video_resize
22919+#define GLX_SYNC_FRAME_SGIX 0x00000000
22920+#define GLX_SYNC_SWAP_SGIX 0x00000001
22921+#endif
22922+
22923+#ifndef GLX_SGIX_dmbuffer
22924+#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024
22925+#endif
22926+
22927+#ifndef GLX_SGIX_swap_group
22928+#endif
22929+
22930+#ifndef GLX_SGIX_swap_barrier
22931+#endif
22932+
22933+#ifndef GLX_SGIS_blended_overlay
22934+#define GLX_BLENDED_RGBA_SGIS 0x8025
22935+#endif
22936+
22937+#ifndef GLX_SGIS_shared_multisample
22938+#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
22939+#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
22940+#endif
22941+
22942+#ifndef GLX_SUN_get_transparent_index
22943+#endif
22944+
22945+#ifndef GLX_3DFX_multisample
22946+#define GLX_SAMPLE_BUFFERS_3DFX 0x8050
22947+#define GLX_SAMPLES_3DFX 0x8051
22948+#endif
22949+
22950+#ifndef GLX_MESA_copy_sub_buffer
22951+#endif
22952+
22953+#ifndef GLX_MESA_pixmap_colormap
22954+#endif
22955+
22956+#ifndef GLX_MESA_release_buffers
22957+#endif
22958+
22959+#ifndef GLX_MESA_set_3dfx_mode
22960+#define GLX_3DFX_WINDOW_MODE_MESA 0x1
22961+#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
22962+#endif
22963+
22964+#ifndef GLX_SGIX_visual_select_group
22965+#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
22966+#endif
22967+
22968+#ifndef GLX_OML_swap_method
22969+#define GLX_SWAP_METHOD_OML 0x8060
22970+#define GLX_SWAP_EXCHANGE_OML 0x8061
22971+#define GLX_SWAP_COPY_OML 0x8062
22972+#define GLX_SWAP_UNDEFINED_OML 0x8063
22973+#endif
22974+
22975+#ifndef GLX_OML_sync_control
22976+#endif
22977+
22978+#ifndef GLX_NV_float_buffer
22979+#define GLX_FLOAT_COMPONENTS_NV 0x20B0
22980+#endif
22981+
22982+#ifndef GLX_SGIX_hyperpipe
22983+#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
22984+#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
22985+#define GLX_BAD_HYPERPIPE_SGIX 92
22986+#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001
22987+#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002
22988+#define GLX_PIPE_RECT_SGIX 0x00000001
22989+#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002
22990+#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003
22991+#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004
22992+#define GLX_HYPERPIPE_ID_SGIX 0x8030
22993+#endif
22994+
22995+#ifndef GLX_MESA_agp_offset
22996+#endif
22997+
22998+#ifndef GLX_EXT_fbconfig_packed_float
22999+#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
23000+#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008
23001+#endif
23002+
23003+#ifndef GLX_EXT_framebuffer_sRGB
23004+#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
23005+#endif
23006+
23007+#ifndef GLX_EXT_texture_from_pixmap
23008+#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
23009+#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
23010+#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
23011+#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
23012+#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
23013+#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
23014+#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
23015+#define GLX_Y_INVERTED_EXT 0x20D4
23016+#define GLX_TEXTURE_FORMAT_EXT 0x20D5
23017+#define GLX_TEXTURE_TARGET_EXT 0x20D6
23018+#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
23019+#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
23020+#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
23021+#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
23022+#define GLX_TEXTURE_1D_EXT 0x20DB
23023+#define GLX_TEXTURE_2D_EXT 0x20DC
23024+#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
23025+#define GLX_FRONT_LEFT_EXT 0x20DE
23026+#define GLX_FRONT_RIGHT_EXT 0x20DF
23027+#define GLX_BACK_LEFT_EXT 0x20E0
23028+#define GLX_BACK_RIGHT_EXT 0x20E1
23029+#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
23030+#define GLX_BACK_EXT GLX_BACK_LEFT_EXT
23031+#define GLX_AUX0_EXT 0x20E2
23032+#define GLX_AUX1_EXT 0x20E3
23033+#define GLX_AUX2_EXT 0x20E4
23034+#define GLX_AUX3_EXT 0x20E5
23035+#define GLX_AUX4_EXT 0x20E6
23036+#define GLX_AUX5_EXT 0x20E7
23037+#define GLX_AUX6_EXT 0x20E8
23038+#define GLX_AUX7_EXT 0x20E9
23039+#define GLX_AUX8_EXT 0x20EA
23040+#define GLX_AUX9_EXT 0x20EB
23041+#endif
23042+
23043+
23044+/*************************************************************/
23045+
23046+#ifndef GLX_ARB_get_proc_address
23047+typedef void (*__GLXextFuncPtr)(void);
23048+#endif
23049+
23050+#ifndef GLX_SGIX_video_source
23051+typedef XID GLXVideoSourceSGIX;
23052+#endif
23053+
23054+#ifndef GLX_SGIX_fbconfig
23055+typedef XID GLXFBConfigIDSGIX;
23056+typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
23057+#endif
23058+
23059+#ifndef GLX_SGIX_pbuffer
23060+typedef XID GLXPbufferSGIX;
23061+typedef struct {
23062+ int type;
23063+ unsigned long serial; /* # of last request processed by server */
23064+ Bool send_event; /* true if this came for SendEvent request */
23065+ Display *display; /* display the event was read from */
23066+ GLXDrawable drawable; /* i.d. of Drawable */
23067+ int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */
23068+ int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */
23069+ unsigned int mask; /* mask indicating which buffers are affected*/
23070+ int x, y;
23071+ int width, height;
23072+ int count; /* if nonzero, at least this many more */
23073+} GLXBufferClobberEventSGIX;
23074+#endif
23075+
23076+#ifndef GLEXT_64_TYPES_DEFINED
23077+/* This code block is duplicated in glxext.h, so must be protected */
23078+#define GLEXT_64_TYPES_DEFINED
23079+/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
23080+/* (as used in the GLX_OML_sync_control extension). */
23081+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
23082+#include <inttypes.h>
23083+#elif defined(__sun__) || defined(__digital__)
23084+#include <inttypes.h>
23085+#if defined(__STDC__)
23086+#if defined(__arch64__)
23087+typedef long int int64_t;
23088+typedef unsigned long int uint64_t;
23089+#else
23090+typedef long long int int64_t;
23091+typedef unsigned long long int uint64_t;
23092+#endif /* __arch64__ */
23093+#endif /* __STDC__ */
23094+#elif defined( __VMS )
23095+#include <inttypes.h>
23096+#elif defined(__SCO__) || defined(__USLC__)
23097+#include <stdint.h>
23098+#elif defined(__UNIXOS2__) || defined(__SOL64__)
23099+typedef long int int32_t;
23100+typedef long long int int64_t;
23101+typedef unsigned long long int uint64_t;
23102+#elif defined(_WIN32) && defined(__GNUC__)
23103+#include <stdint.h>
23104+#elif defined(_WIN32)
23105+typedef __int32 int32_t;
23106+typedef __int64 int64_t;
23107+typedef unsigned __int64 uint64_t;
23108+#else
23109+#include <inttypes.h> /* Fallback option */
23110+#endif
23111+#endif
23112+
23113+#ifndef GLX_VERSION_1_3
23114+#define GLX_VERSION_1_3 1
23115+#ifdef GLX_GLXEXT_PROTOTYPES
23116+extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *);
23117+extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *);
23118+extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *);
23119+extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig);
23120+extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *);
23121+extern void glXDestroyWindow (Display *, GLXWindow);
23122+extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *);
23123+extern void glXDestroyPixmap (Display *, GLXPixmap);
23124+extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *);
23125+extern void glXDestroyPbuffer (Display *, GLXPbuffer);
23126+extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *);
23127+extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool);
23128+extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext);
23129+extern GLXDrawable glXGetCurrentReadDrawable (void);
23130+extern Display * glXGetCurrentDisplay (void);
23131+extern int glXQueryContext (Display *, GLXContext, int, int *);
23132+extern void glXSelectEvent (Display *, GLXDrawable, unsigned long);
23133+extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *);
23134+#endif /* GLX_GLXEXT_PROTOTYPES */
23135+typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
23136+typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
23137+typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
23138+typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
23139+typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
23140+typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
23141+typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
23142+typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
23143+typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
23144+typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
23145+typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
23146+typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
23147+typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
23148+typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
23149+typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
23150+typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
23151+typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
23152+typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
23153+#endif
23154+
23155+#ifndef GLX_VERSION_1_4
23156+#define GLX_VERSION_1_4 1
23157+#ifdef GLX_GLXEXT_PROTOTYPES
23158+extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *);
23159+#endif /* GLX_GLXEXT_PROTOTYPES */
23160+typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
23161+#endif
23162+
23163+#ifndef GLX_ARB_get_proc_address
23164+#define GLX_ARB_get_proc_address 1
23165+#ifdef GLX_GLXEXT_PROTOTYPES
23166+extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
23167+#endif /* GLX_GLXEXT_PROTOTYPES */
23168+typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
23169+#endif
23170+
23171+#ifndef GLX_ARB_multisample
23172+#define GLX_ARB_multisample 1
23173+#endif
23174+
23175+#ifndef GLX_ARB_fbconfig_float
23176+#define GLX_ARB_fbconfig_float 1
23177+#endif
23178+
23179+#ifndef GLX_SGIS_multisample
23180+#define GLX_SGIS_multisample 1
23181+#endif
23182+
23183+#ifndef GLX_EXT_visual_info
23184+#define GLX_EXT_visual_info 1
23185+#endif
23186+
23187+#ifndef GLX_SGI_swap_control
23188+#define GLX_SGI_swap_control 1
23189+#ifdef GLX_GLXEXT_PROTOTYPES
23190+extern int glXSwapIntervalSGI (int);
23191+#endif /* GLX_GLXEXT_PROTOTYPES */
23192+typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
23193+#endif
23194+
23195+#ifndef GLX_SGI_video_sync
23196+#define GLX_SGI_video_sync 1
23197+#ifdef GLX_GLXEXT_PROTOTYPES
23198+extern int glXGetVideoSyncSGI (unsigned int *);
23199+extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
23200+#endif /* GLX_GLXEXT_PROTOTYPES */
23201+typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
23202+typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
23203+#endif
23204+
23205+#ifndef GLX_SGI_make_current_read
23206+#define GLX_SGI_make_current_read 1
23207+#ifdef GLX_GLXEXT_PROTOTYPES
23208+extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext);
23209+extern GLXDrawable glXGetCurrentReadDrawableSGI (void);
23210+#endif /* GLX_GLXEXT_PROTOTYPES */
23211+typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
23212+typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
23213+#endif
23214+
23215+#ifndef GLX_SGIX_video_source
23216+#define GLX_SGIX_video_source 1
23217+#ifdef _VL_H
23218+#ifdef GLX_GLXEXT_PROTOTYPES
23219+extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode);
23220+extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX);
23221+#endif /* GLX_GLXEXT_PROTOTYPES */
23222+typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
23223+typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
23224+#endif /* _VL_H */
23225+#endif
23226+
23227+#ifndef GLX_EXT_visual_rating
23228+#define GLX_EXT_visual_rating 1
23229+#endif
23230+
23231+#ifndef GLX_EXT_import_context
23232+#define GLX_EXT_import_context 1
23233+#ifdef GLX_GLXEXT_PROTOTYPES
23234+extern Display * glXGetCurrentDisplayEXT (void);
23235+extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *);
23236+extern GLXContextID glXGetContextIDEXT (const GLXContext);
23237+extern GLXContext glXImportContextEXT (Display *, GLXContextID);
23238+extern void glXFreeContextEXT (Display *, GLXContext);
23239+#endif /* GLX_GLXEXT_PROTOTYPES */
23240+typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
23241+typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
23242+typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
23243+typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
23244+typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
23245+#endif
23246+
23247+#ifndef GLX_SGIX_fbconfig
23248+#define GLX_SGIX_fbconfig 1
23249+#ifdef GLX_GLXEXT_PROTOTYPES
23250+extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *);
23251+extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *);
23252+extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap);
23253+extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool);
23254+extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX);
23255+extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *);
23256+#endif /* GLX_GLXEXT_PROTOTYPES */
23257+typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
23258+typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
23259+typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
23260+typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
23261+typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
23262+typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
23263+#endif
23264+
23265+#ifndef GLX_SGIX_pbuffer
23266+#define GLX_SGIX_pbuffer 1
23267+#ifdef GLX_GLXEXT_PROTOTYPES
23268+extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *);
23269+extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX);
23270+extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *);
23271+extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long);
23272+extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *);
23273+#endif /* GLX_GLXEXT_PROTOTYPES */
23274+typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
23275+typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
23276+typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
23277+typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
23278+typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
23279+#endif
23280+
23281+#ifndef GLX_SGI_cushion
23282+#define GLX_SGI_cushion 1
23283+#ifdef GLX_GLXEXT_PROTOTYPES
23284+extern void glXCushionSGI (Display *, Window, float);
23285+#endif /* GLX_GLXEXT_PROTOTYPES */
23286+typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
23287+#endif
23288+
23289+#ifndef GLX_SGIX_video_resize
23290+#define GLX_SGIX_video_resize 1
23291+#ifdef GLX_GLXEXT_PROTOTYPES
23292+extern int glXBindChannelToWindowSGIX (Display *, int, int, Window);
23293+extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int);
23294+extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *);
23295+extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *);
23296+extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum);
23297+#endif /* GLX_GLXEXT_PROTOTYPES */
23298+typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
23299+typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
23300+typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
23301+typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
23302+typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype);
23303+#endif
23304+
23305+#ifndef GLX_SGIX_dmbuffer
23306+#define GLX_SGIX_dmbuffer 1
23307+#ifdef _DM_BUFFER_H_
23308+#ifdef GLX_GLXEXT_PROTOTYPES
23309+extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer);
23310+#endif /* GLX_GLXEXT_PROTOTYPES */
23311+typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
23312+#endif /* _DM_BUFFER_H_ */
23313+#endif
23314+
23315+#ifndef GLX_SGIX_swap_group
23316+#define GLX_SGIX_swap_group 1
23317+#ifdef GLX_GLXEXT_PROTOTYPES
23318+extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable);
23319+#endif /* GLX_GLXEXT_PROTOTYPES */
23320+typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
23321+#endif
23322+
23323+#ifndef GLX_SGIX_swap_barrier
23324+#define GLX_SGIX_swap_barrier 1
23325+#ifdef GLX_GLXEXT_PROTOTYPES
23326+extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int);
23327+extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *);
23328+#endif /* GLX_GLXEXT_PROTOTYPES */
23329+typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
23330+typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
23331+#endif
23332+
23333+#ifndef GLX_SUN_get_transparent_index
23334+#define GLX_SUN_get_transparent_index 1
23335+#ifdef GLX_GLXEXT_PROTOTYPES
23336+extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *);
23337+#endif /* GLX_GLXEXT_PROTOTYPES */
23338+typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
23339+#endif
23340+
23341+#ifndef GLX_MESA_copy_sub_buffer
23342+#define GLX_MESA_copy_sub_buffer 1
23343+#ifdef GLX_GLXEXT_PROTOTYPES
23344+extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int);
23345+#endif /* GLX_GLXEXT_PROTOTYPES */
23346+typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
23347+#endif
23348+
23349+#ifndef GLX_MESA_pixmap_colormap
23350+#define GLX_MESA_pixmap_colormap 1
23351+#ifdef GLX_GLXEXT_PROTOTYPES
23352+extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap);
23353+#endif /* GLX_GLXEXT_PROTOTYPES */
23354+typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
23355+#endif
23356+
23357+#ifndef GLX_MESA_release_buffers
23358+#define GLX_MESA_release_buffers 1
23359+#ifdef GLX_GLXEXT_PROTOTYPES
23360+extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable);
23361+#endif /* GLX_GLXEXT_PROTOTYPES */
23362+typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
23363+#endif
23364+
23365+#ifndef GLX_MESA_set_3dfx_mode
23366+#define GLX_MESA_set_3dfx_mode 1
23367+#ifdef GLX_GLXEXT_PROTOTYPES
23368+extern Bool glXSet3DfxModeMESA (int);
23369+#endif /* GLX_GLXEXT_PROTOTYPES */
23370+typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
23371+#endif
23372+
23373+#ifndef GLX_SGIX_visual_select_group
23374+#define GLX_SGIX_visual_select_group 1
23375+#endif
23376+
23377+#ifndef GLX_OML_swap_method
23378+#define GLX_OML_swap_method 1
23379+#endif
23380+
23381+#ifndef GLX_OML_sync_control
23382+#define GLX_OML_sync_control 1
23383+#ifdef GLX_GLXEXT_PROTOTYPES
23384+extern Bool glXGetSyncValuesOML (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *);
23385+extern Bool glXGetMscRateOML (Display *, GLXDrawable, int32_t *, int32_t *);
23386+extern int64_t glXSwapBuffersMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t);
23387+extern Bool glXWaitForMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *);
23388+extern Bool glXWaitForSbcOML (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *);
23389+#endif /* GLX_GLXEXT_PROTOTYPES */
23390+typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
23391+typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
23392+typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
23393+typedef Bool ( * PFNGLXWAITFORMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc);
23394+typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
23395+#endif
23396+
23397+#ifndef GLX_NV_float_buffer
23398+#define GLX_NV_float_buffer 1
23399+#endif
23400+
23401+#ifndef GLX_SGIX_hyperpipe
23402+#define GLX_SGIX_hyperpipe 1
23403+
23404+typedef struct {
23405+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23406+ int networkId;
23407+} GLXHyperpipeNetworkSGIX;
23408+
23409+typedef struct {
23410+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23411+ int channel;
23412+ unsigned int
23413+ participationType;
23414+ int timeSlice;
23415+} GLXHyperpipeConfigSGIX;
23416+
23417+typedef struct {
23418+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23419+ int srcXOrigin, srcYOrigin, srcWidth, srcHeight;
23420+ int destXOrigin, destYOrigin, destWidth, destHeight;
23421+} GLXPipeRect;
23422+
23423+typedef struct {
23424+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23425+ int XOrigin, YOrigin, maxHeight, maxWidth;
23426+} GLXPipeRectLimits;
23427+
23428+#ifdef GLX_GLXEXT_PROTOTYPES
23429+extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *, int *);
23430+extern int glXHyperpipeConfigSGIX (Display *, int, int, GLXHyperpipeConfigSGIX *, int *);
23431+extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *, int, int *);
23432+extern int glXDestroyHyperpipeConfigSGIX (Display *, int);
23433+extern int glXBindHyperpipeSGIX (Display *, int);
23434+extern int glXQueryHyperpipeBestAttribSGIX (Display *, int, int, int, void *, void *);
23435+extern int glXHyperpipeAttribSGIX (Display *, int, int, int, void *);
23436+extern int glXQueryHyperpipeAttribSGIX (Display *, int, int, int, void *);
23437+#endif /* GLX_GLXEXT_PROTOTYPES */
23438+typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);
23439+typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
23440+typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes);
23441+typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId);
23442+typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId);
23443+typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
23444+typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
23445+typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
23446+#endif
23447+
23448+#ifndef GLX_MESA_agp_offset
23449+#define GLX_MESA_agp_offset 1
23450+#ifdef GLX_GLXEXT_PROTOTYPES
23451+extern unsigned int glXGetAGPOffsetMESA (const void *);
23452+#endif /* GLX_GLXEXT_PROTOTYPES */
23453+typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
23454+#endif
23455+
23456+#ifndef GLX_EXT_fbconfig_packed_float
23457+#define GLX_EXT_fbconfig_packed_float 1
23458+#endif
23459+
23460+#ifndef GLX_EXT_framebuffer_sRGB
23461+#define GLX_EXT_framebuffer_sRGB 1
23462+#endif
23463+
23464+#ifndef GLX_EXT_texture_from_pixmap
23465+#define GLX_EXT_texture_from_pixmap 1
23466+#ifdef GLX_GLXEXT_PROTOTYPES
23467+extern void glXBindTexImageEXT (Display *, GLXDrawable, int, const int *);
23468+extern void glXReleaseTexImageEXT (Display *, GLXDrawable, int);
23469+#endif /* GLX_GLXEXT_PROTOTYPES */
23470+typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
23471+typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer);
23472+#endif
23473+
23474+
23475+#ifdef __cplusplus
23476+}
23477+#endif
23478+
23479+#endif
23480Index: trunk/target-i386/mesa_mipmap.c
23481===================================================================
23482--- /dev/null 1970-01-01 00:00:00.000000000 +0000
23483+++ trunk/target-i386/mesa_mipmap.c 2009-01-19 23:06:08.000000000 +0000
23484@@ -0,0 +1,824 @@
23485+
23486+/*
23487+ * Mesa 3-D graphics library
23488+ * Version: 3.4
23489+ * Copyright (C) 1995-2000 Brian Paul
23490+ *
23491+ * This library is free software; you can redistribute it and/or
23492+ * modify it under the terms of the GNU Library General Public
23493+ * License as published by the Free Software Foundation; either
23494+ * version 2 of the License, or (at your option) any later version.
23495+ *
23496+ * This library is distributed in the hope that it will be useful,
23497+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
23498+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23499+ * Library General Public License for more details.
23500+ *
23501+ * You should have received a copy of the GNU Library General Public
23502+ * License along with this library; if not, write to the Free
23503+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23504+ */
23505+
23506+
23507+#ifdef PC_HEADER
23508+#include "all.h"
23509+#else
23510+#include <assert.h>
23511+#include <math.h>
23512+#include <stdio.h>
23513+#include <stdlib.h>
23514+//#include "gluP.h"
23515+#endif
23516+
23517+
23518+/*
23519+ * Compute ceiling of integer quotient of A divided by B:
23520+ */
23521+#define CEILING( A, B ) ( (A) % (B) == 0 ? (A)/(B) : (A)/(B)+1 )
23522+
23523+
23524+
23525+#ifdef EPSILON
23526+#undef EPSILON
23527+#endif
23528+#define EPSILON 0.001
23529+
23530+
23531+/* To work around optimizer bug in MSVC4.1 */
23532+#if defined(__WIN32__) && !defined(OPENSTEP)
23533+void
23534+dummy(GLuint j, GLuint k)
23535+{
23536+}
23537+#else
23538+#define dummy(J, K)
23539+#endif
23540+
23541+
23542+static GLint GLAPIENTRY
23543+mesa_gluScaleImage(GLenum format,
23544+ GLsizei widthin, GLsizei heightin,
23545+ GLenum typein, const void *datain,
23546+ GLsizei widthout, GLsizei heightout,
23547+ GLenum typeout, void *dataout)
23548+{
23549+ GLint components, i, j, k;
23550+ GLfloat *tempin, *tempout;
23551+ GLfloat sx, sy;
23552+ GLint unpackrowlength, unpackalignment, unpackskiprows, unpackskippixels;
23553+ GLint packrowlength, packalignment, packskiprows, packskippixels;
23554+ GLint sizein, sizeout;
23555+ GLint rowstride, rowlen;
23556+
23557+
23558+ /* Determine number of components per pixel */
23559+ switch (format) {
23560+ case GL_COLOR_INDEX:
23561+ case GL_STENCIL_INDEX:
23562+ case GL_DEPTH_COMPONENT:
23563+ case GL_RED:
23564+ case GL_GREEN:
23565+ case GL_BLUE:
23566+ case GL_ALPHA:
23567+ case GL_LUMINANCE:
23568+ components = 1;
23569+ break;
23570+ case GL_LUMINANCE_ALPHA:
23571+ components = 2;
23572+ break;
23573+ case GL_RGB:
23574+ case GL_BGR:
23575+ components = 3;
23576+ break;
23577+ case GL_RGBA:
23578+ case GL_BGRA:
23579+#ifdef GL_EXT_abgr
23580+ case GL_ABGR_EXT:
23581+#endif
23582+ components = 4;
23583+ break;
23584+ default:
23585+ return GLU_INVALID_ENUM;
23586+ }
23587+
23588+ /* Determine bytes per input datum */
23589+ switch (typein) {
23590+ case GL_UNSIGNED_BYTE:
23591+ sizein = sizeof(GLubyte);
23592+ break;
23593+ case GL_BYTE:
23594+ sizein = sizeof(GLbyte);
23595+ break;
23596+ case GL_UNSIGNED_SHORT:
23597+ sizein = sizeof(GLushort);
23598+ break;
23599+ case GL_SHORT:
23600+ sizein = sizeof(GLshort);
23601+ break;
23602+ case GL_UNSIGNED_INT:
23603+ sizein = sizeof(GLuint);
23604+ break;
23605+ case GL_INT:
23606+ sizein = sizeof(GLint);
23607+ break;
23608+ case GL_FLOAT:
23609+ sizein = sizeof(GLfloat);
23610+ break;
23611+ case GL_BITMAP:
23612+ /* not implemented yet */
23613+ default:
23614+ return GL_INVALID_ENUM;
23615+ }
23616+
23617+ /* Determine bytes per output datum */
23618+ switch (typeout) {
23619+ case GL_UNSIGNED_BYTE:
23620+ sizeout = sizeof(GLubyte);
23621+ break;
23622+ case GL_BYTE:
23623+ sizeout = sizeof(GLbyte);
23624+ break;
23625+ case GL_UNSIGNED_SHORT:
23626+ sizeout = sizeof(GLushort);
23627+ break;
23628+ case GL_SHORT:
23629+ sizeout = sizeof(GLshort);
23630+ break;
23631+ case GL_UNSIGNED_INT:
23632+ sizeout = sizeof(GLuint);
23633+ break;
23634+ case GL_INT:
23635+ sizeout = sizeof(GLint);
23636+ break;
23637+ case GL_FLOAT:
23638+ sizeout = sizeof(GLfloat);
23639+ break;
23640+ case GL_BITMAP:
23641+ /* not implemented yet */
23642+ default:
23643+ return GL_INVALID_ENUM;
23644+ }
23645+
23646+ /* Get glPixelStore state */
23647+ glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpackrowlength);
23648+ glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpackalignment);
23649+ glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unpackskiprows);
23650+ glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unpackskippixels);
23651+ glGetIntegerv(GL_PACK_ROW_LENGTH, &packrowlength);
23652+ glGetIntegerv(GL_PACK_ALIGNMENT, &packalignment);
23653+ glGetIntegerv(GL_PACK_SKIP_ROWS, &packskiprows);
23654+ glGetIntegerv(GL_PACK_SKIP_PIXELS, &packskippixels);
23655+
23656+ /* Allocate storage for intermediate images */
23657+ tempin = (GLfloat *) malloc(widthin * heightin
23658+ * components * sizeof(GLfloat));
23659+ if (!tempin) {
23660+ return GLU_OUT_OF_MEMORY;
23661+ }
23662+ tempout = (GLfloat *) malloc(widthout * heightout
23663+ * components * sizeof(GLfloat));
23664+ if (!tempout) {
23665+ free(tempin);
23666+ return GLU_OUT_OF_MEMORY;
23667+ }
23668+
23669+
23670+ /*
23671+ * Unpack the pixel data and convert to floating point
23672+ */
23673+
23674+ if (unpackrowlength > 0) {
23675+ rowlen = unpackrowlength;
23676+ }
23677+ else {
23678+ rowlen = widthin;
23679+ }
23680+ if (sizein >= unpackalignment) {
23681+ rowstride = components * rowlen;
23682+ }
23683+ else {
23684+ rowstride = unpackalignment / sizein
23685+ * CEILING(components * rowlen * sizein, unpackalignment);
23686+ }
23687+
23688+ switch (typein) {
23689+ case GL_UNSIGNED_BYTE:
23690+ k = 0;
23691+ for (i = 0; i < heightin; i++) {
23692+ GLubyte *ubptr = (GLubyte *) datain
23693+ + i * rowstride
23694+ + unpackskiprows * rowstride + unpackskippixels * components;
23695+ for (j = 0; j < widthin * components; j++) {
23696+ dummy(j, k);
23697+ tempin[k++] = (GLfloat) * ubptr++;
23698+ }
23699+ }
23700+ break;
23701+ case GL_BYTE:
23702+ k = 0;
23703+ for (i = 0; i < heightin; i++) {
23704+ GLbyte *bptr = (GLbyte *) datain
23705+ + i * rowstride
23706+ + unpackskiprows * rowstride + unpackskippixels * components;
23707+ for (j = 0; j < widthin * components; j++) {
23708+ dummy(j, k);
23709+ tempin[k++] = (GLfloat) * bptr++;
23710+ }
23711+ }
23712+ break;
23713+ case GL_UNSIGNED_SHORT:
23714+ k = 0;
23715+ for (i = 0; i < heightin; i++) {
23716+ GLushort *usptr = (GLushort *) datain
23717+ + i * rowstride
23718+ + unpackskiprows * rowstride + unpackskippixels * components;
23719+ for (j = 0; j < widthin * components; j++) {
23720+ dummy(j, k);
23721+ tempin[k++] = (GLfloat) * usptr++;
23722+ }
23723+ }
23724+ break;
23725+ case GL_SHORT:
23726+ k = 0;
23727+ for (i = 0; i < heightin; i++) {
23728+ GLshort *sptr = (GLshort *) datain
23729+ + i * rowstride
23730+ + unpackskiprows * rowstride + unpackskippixels * components;
23731+ for (j = 0; j < widthin * components; j++) {
23732+ dummy(j, k);
23733+ tempin[k++] = (GLfloat) * sptr++;
23734+ }
23735+ }
23736+ break;
23737+ case GL_UNSIGNED_INT:
23738+ k = 0;
23739+ for (i = 0; i < heightin; i++) {
23740+ GLuint *uiptr = (GLuint *) datain
23741+ + i * rowstride
23742+ + unpackskiprows * rowstride + unpackskippixels * components;
23743+ for (j = 0; j < widthin * components; j++) {
23744+ dummy(j, k);
23745+ tempin[k++] = (GLfloat) * uiptr++;
23746+ }
23747+ }
23748+ break;
23749+ case GL_INT:
23750+ k = 0;
23751+ for (i = 0; i < heightin; i++) {
23752+ GLint *iptr = (GLint *) datain
23753+ + i * rowstride
23754+ + unpackskiprows * rowstride + unpackskippixels * components;
23755+ for (j = 0; j < widthin * components; j++) {
23756+ dummy(j, k);
23757+ tempin[k++] = (GLfloat) * iptr++;
23758+ }
23759+ }
23760+ break;
23761+ case GL_FLOAT:
23762+ k = 0;
23763+ for (i = 0; i < heightin; i++) {
23764+ GLfloat *fptr = (GLfloat *) datain
23765+ + i * rowstride
23766+ + unpackskiprows * rowstride + unpackskippixels * components;
23767+ for (j = 0; j < widthin * components; j++) {
23768+ dummy(j, k);
23769+ tempin[k++] = *fptr++;
23770+ }
23771+ }
23772+ break;
23773+ default:
23774+ return GLU_INVALID_ENUM;
23775+ }
23776+
23777+
23778+ /*
23779+ * Scale the image!
23780+ */
23781+
23782+ if (widthout > 1)
23783+ sx = (GLfloat) (widthin - 1) / (GLfloat) (widthout - 1);
23784+ else
23785+ sx = (GLfloat) (widthin - 1);
23786+ if (heightout > 1)
23787+ sy = (GLfloat) (heightin - 1) / (GLfloat) (heightout - 1);
23788+ else
23789+ sy = (GLfloat) (heightin - 1);
23790+
23791+/*#define POINT_SAMPLE*/
23792+#ifdef POINT_SAMPLE
23793+ for (i = 0; i < heightout; i++) {
23794+ GLint ii = i * sy;
23795+ for (j = 0; j < widthout; j++) {
23796+ GLint jj = j * sx;
23797+
23798+ GLfloat *src = tempin + (ii * widthin + jj) * components;
23799+ GLfloat *dst = tempout + (i * widthout + j) * components;
23800+
23801+ for (k = 0; k < components; k++) {
23802+ *dst++ = *src++;
23803+ }
23804+ }
23805+ }
23806+#else
23807+ if (sx < 1.0 && sy < 1.0) {
23808+ /* magnify both width and height: use weighted sample of 4 pixels */
23809+ GLint i0, i1, j0, j1;
23810+ GLfloat alpha, beta;
23811+ GLfloat *src00, *src01, *src10, *src11;
23812+ GLfloat s1, s2;
23813+ GLfloat *dst;
23814+
23815+ for (i = 0; i < heightout; i++) {
23816+ i0 = i * sy;
23817+ i1 = i0 + 1;
23818+ if (i1 >= heightin)
23819+ i1 = heightin - 1;
23820+/* i1 = (i+1) * sy - EPSILON;*/
23821+ alpha = i * sy - i0;
23822+ for (j = 0; j < widthout; j++) {
23823+ j0 = j * sx;
23824+ j1 = j0 + 1;
23825+ if (j1 >= widthin)
23826+ j1 = widthin - 1;
23827+/* j1 = (j+1) * sx - EPSILON; */
23828+ beta = j * sx - j0;
23829+
23830+ /* compute weighted average of pixels in rect (i0,j0)-(i1,j1) */
23831+ src00 = tempin + (i0 * widthin + j0) * components;
23832+ src01 = tempin + (i0 * widthin + j1) * components;
23833+ src10 = tempin + (i1 * widthin + j0) * components;
23834+ src11 = tempin + (i1 * widthin + j1) * components;
23835+
23836+ dst = tempout + (i * widthout + j) * components;
23837+
23838+ for (k = 0; k < components; k++) {
23839+ s1 = *src00++ * (1.0 - beta) + *src01++ * beta;
23840+ s2 = *src10++ * (1.0 - beta) + *src11++ * beta;
23841+ *dst++ = s1 * (1.0 - alpha) + s2 * alpha;
23842+ }
23843+ }
23844+ }
23845+ }
23846+ else {
23847+ /* shrink width and/or height: use an unweighted box filter */
23848+ GLint i0, i1;
23849+ GLint j0, j1;
23850+ GLint ii, jj;
23851+ GLfloat sum, *dst;
23852+
23853+ for (i = 0; i < heightout; i++) {
23854+ i0 = i * sy;
23855+ i1 = i0 + 1;
23856+ if (i1 >= heightin)
23857+ i1 = heightin - 1;
23858+/* i1 = (i+1) * sy - EPSILON; */
23859+ for (j = 0; j < widthout; j++) {
23860+ j0 = j * sx;
23861+ j1 = j0 + 1;
23862+ if (j1 >= widthin)
23863+ j1 = widthin - 1;
23864+/* j1 = (j+1) * sx - EPSILON; */
23865+
23866+ dst = tempout + (i * widthout + j) * components;
23867+
23868+ /* compute average of pixels in the rectangle (i0,j0)-(i1,j1) */
23869+ for (k = 0; k < components; k++) {
23870+ sum = 0.0;
23871+ for (ii = i0; ii <= i1; ii++) {
23872+ for (jj = j0; jj <= j1; jj++) {
23873+ sum += *(tempin + (ii * widthin + jj) * components + k);
23874+ }
23875+ }
23876+ sum /= (j1 - j0 + 1) * (i1 - i0 + 1);
23877+ *dst++ = sum;
23878+ }
23879+ }
23880+ }
23881+ }
23882+#endif
23883+
23884+
23885+ /*
23886+ * Return output image
23887+ */
23888+
23889+ if (packrowlength > 0) {
23890+ rowlen = packrowlength;
23891+ }
23892+ else {
23893+ rowlen = widthout;
23894+ }
23895+ if (sizeout >= packalignment) {
23896+ rowstride = components * rowlen;
23897+ }
23898+ else {
23899+ rowstride = packalignment / sizeout
23900+ * CEILING(components * rowlen * sizeout, packalignment);
23901+ }
23902+
23903+ switch (typeout) {
23904+ case GL_UNSIGNED_BYTE:
23905+ k = 0;
23906+ for (i = 0; i < heightout; i++) {
23907+ GLubyte *ubptr = (GLubyte *) dataout
23908+ + i * rowstride
23909+ + packskiprows * rowstride + packskippixels * components;
23910+ for (j = 0; j < widthout * components; j++) {
23911+ dummy(j, k + i);
23912+ *ubptr++ = (GLubyte) tempout[k++];
23913+ }
23914+ }
23915+ break;
23916+ case GL_BYTE:
23917+ k = 0;
23918+ for (i = 0; i < heightout; i++) {
23919+ GLbyte *bptr = (GLbyte *) dataout
23920+ + i * rowstride
23921+ + packskiprows * rowstride + packskippixels * components;
23922+ for (j = 0; j < widthout * components; j++) {
23923+ dummy(j, k + i);
23924+ *bptr++ = (GLbyte) tempout[k++];
23925+ }
23926+ }
23927+ break;
23928+ case GL_UNSIGNED_SHORT:
23929+ k = 0;
23930+ for (i = 0; i < heightout; i++) {
23931+ GLushort *usptr = (GLushort *) dataout
23932+ + i * rowstride
23933+ + packskiprows * rowstride + packskippixels * components;
23934+ for (j = 0; j < widthout * components; j++) {
23935+ dummy(j, k + i);
23936+ *usptr++ = (GLushort) tempout[k++];
23937+ }
23938+ }
23939+ break;
23940+ case GL_SHORT:
23941+ k = 0;
23942+ for (i = 0; i < heightout; i++) {
23943+ GLshort *sptr = (GLshort *) dataout
23944+ + i * rowstride
23945+ + packskiprows * rowstride + packskippixels * components;
23946+ for (j = 0; j < widthout * components; j++) {
23947+ dummy(j, k + i);
23948+ *sptr++ = (GLshort) tempout[k++];
23949+ }
23950+ }
23951+ break;
23952+ case GL_UNSIGNED_INT:
23953+ k = 0;
23954+ for (i = 0; i < heightout; i++) {
23955+ GLuint *uiptr = (GLuint *) dataout
23956+ + i * rowstride
23957+ + packskiprows * rowstride + packskippixels * components;
23958+ for (j = 0; j < widthout * components; j++) {
23959+ dummy(j, k + i);
23960+ *uiptr++ = (GLuint) tempout[k++];
23961+ }
23962+ }
23963+ break;
23964+ case GL_INT:
23965+ k = 0;
23966+ for (i = 0; i < heightout; i++) {
23967+ GLint *iptr = (GLint *) dataout
23968+ + i * rowstride
23969+ + packskiprows * rowstride + packskippixels * components;
23970+ for (j = 0; j < widthout * components; j++) {
23971+ dummy(j, k + i);
23972+ *iptr++ = (GLint) tempout[k++];
23973+ }
23974+ }
23975+ break;
23976+ case GL_FLOAT:
23977+ k = 0;
23978+ for (i = 0; i < heightout; i++) {
23979+ GLfloat *fptr = (GLfloat *) dataout
23980+ + i * rowstride
23981+ + packskiprows * rowstride + packskippixels * components;
23982+ for (j = 0; j < widthout * components; j++) {
23983+ dummy(j, k + i);
23984+ *fptr++ = tempout[k++];
23985+ }
23986+ }
23987+ break;
23988+ default:
23989+ return GLU_INVALID_ENUM;
23990+ }
23991+
23992+
23993+ /* free temporary image storage */
23994+ free(tempin);
23995+ free(tempout);
23996+
23997+ return 0;
23998+}
23999+
24000+
24001+
24002+/*
24003+ * Return the largest k such that 2^k <= n.
24004+ */
24005+static GLint
24006+ilog2(GLint n)
24007+{
24008+ GLint k;
24009+
24010+ if (n <= 0)
24011+ return 0;
24012+ for (k = 0; n >>= 1; k++);
24013+ return k;
24014+}
24015+
24016+
24017+
24018+/*
24019+ * Find the value nearest to n which is also a power of two.
24020+ */
24021+static GLint
24022+round2(GLint n)
24023+{
24024+ GLint m;
24025+
24026+ for (m = 1; m < n; m *= 2);
24027+
24028+ /* m>=n */
24029+ if (m - n <= n - m / 2) {
24030+ return m;
24031+ }
24032+ else {
24033+ return m / 2;
24034+ }
24035+}
24036+
24037+
24038+/*
24039+ * Given an pixel format and datatype, return the number of bytes to
24040+ * store one pixel.
24041+ */
24042+static GLint
24043+bytes_per_pixel(GLenum format, GLenum type)
24044+{
24045+ GLint n, m;
24046+
24047+ switch (format) {
24048+ case GL_COLOR_INDEX:
24049+ case GL_STENCIL_INDEX:
24050+ case GL_DEPTH_COMPONENT:
24051+ case GL_RED:
24052+ case GL_GREEN:
24053+ case GL_BLUE:
24054+ case GL_ALPHA:
24055+ case GL_LUMINANCE:
24056+ n = 1;
24057+ break;
24058+ case GL_LUMINANCE_ALPHA:
24059+ n = 2;
24060+ break;
24061+ case GL_RGB:
24062+ case GL_BGR:
24063+ n = 3;
24064+ break;
24065+ case GL_RGBA:
24066+ case GL_BGRA:
24067+#ifdef GL_EXT_abgr
24068+ case GL_ABGR_EXT:
24069+#endif
24070+ n = 4;
24071+ break;
24072+ default:
24073+ n = 0;
24074+ }
24075+
24076+ switch (type) {
24077+ case GL_UNSIGNED_BYTE:
24078+ m = sizeof(GLubyte);
24079+ break;
24080+ case GL_BYTE:
24081+ m = sizeof(GLbyte);
24082+ break;
24083+ case GL_BITMAP:
24084+ m = 1;
24085+ break;
24086+ case GL_UNSIGNED_SHORT:
24087+ m = sizeof(GLushort);
24088+ break;
24089+ case GL_SHORT:
24090+ m = sizeof(GLshort);
24091+ break;
24092+ case GL_UNSIGNED_INT:
24093+ m = sizeof(GLuint);
24094+ break;
24095+ case GL_INT:
24096+ m = sizeof(GLint);
24097+ break;
24098+ case GL_FLOAT:
24099+ m = sizeof(GLfloat);
24100+ break;
24101+ default:
24102+ m = 0;
24103+ }
24104+
24105+ return n * m;
24106+}
24107+
24108+
24109+
24110+/*
24111+ * WARNING: This function isn't finished and has never been tested!!!!
24112+ */
24113+GLint GLAPIENTRY
24114+mesa_gluBuild1DMipmaps(GLenum target, GLint components,
24115+ GLsizei width, GLenum format, GLenum type, const void *data)
24116+{
24117+ GLubyte *texture;
24118+ GLint levels, max_levels;
24119+ GLint new_width, max_width;
24120+ GLint i, j, k, l;
24121+
24122+ if (width < 1)
24123+ return GLU_INVALID_VALUE;
24124+
24125+ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_width);
24126+ max_levels = ilog2(max_width) + 1;
24127+
24128+ /* Compute how many mipmap images to make */
24129+ levels = ilog2(width) + 1;
24130+ if (levels > max_levels) {
24131+ levels = max_levels;
24132+ }
24133+
24134+ new_width = 1 << (levels - 1);
24135+
24136+ texture = (GLubyte *) malloc(new_width * components);
24137+ if (!texture) {
24138+ return GLU_OUT_OF_MEMORY;
24139+ }
24140+
24141+ if (width != new_width) {
24142+ /* initial rescaling */
24143+ switch (type) {
24144+ case GL_UNSIGNED_BYTE:
24145+ {
24146+ GLubyte *ub_data = (GLubyte *) data;
24147+ for (i = 0; i < new_width; i++) {
24148+ j = i * width / new_width;
24149+ for (k = 0; k < components; k++) {
24150+ texture[i * components + k] = ub_data[j * components + k];
24151+ }
24152+ }
24153+ }
24154+ break;
24155+ default:
24156+ /* Not implemented */
24157+ return GLU_ERROR;
24158+ }
24159+ }
24160+
24161+ /* generate and load mipmap images */
24162+ for (l = 0; l < levels; l++) {
24163+ glTexImage1D(GL_TEXTURE_1D, l, components, new_width, 0,
24164+ format, GL_UNSIGNED_BYTE, texture);
24165+
24166+ /* Scale image down to 1/2 size */
24167+ new_width = new_width / 2;
24168+ for (i = 0; i < new_width; i++) {
24169+ for (k = 0; k < components; k++) {
24170+ GLint sample1, sample2;
24171+ sample1 = (GLint) texture[i * 2 * components + k];
24172+ sample2 = (GLint) texture[(i * 2 + 1) * components + k];
24173+ texture[i * components + k] = (GLubyte) ((sample1 + sample2) / 2);
24174+ }
24175+ }
24176+ }
24177+
24178+ free(texture);
24179+
24180+ return 0;
24181+}
24182+
24183+
24184+
24185+GLint GLAPIENTRY
24186+mesa_gluBuild2DMipmaps(GLenum target, GLint components,
24187+ GLsizei width, GLsizei height, GLenum format,
24188+ GLenum type, const void *data)
24189+{
24190+ GLint w, h, maxsize;
24191+ void *image, *newimage;
24192+ GLint neww, newh, level, bpp;
24193+ int error;
24194+ GLboolean done;
24195+ GLint retval = 0;
24196+ GLint unpackrowlength, unpackalignment, unpackskiprows, unpackskippixels;
24197+ GLint packrowlength, packalignment, packskiprows, packskippixels;
24198+
24199+ if (width < 1 || height < 1)
24200+ return GLU_INVALID_VALUE;
24201+
24202+ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxsize);
24203+
24204+ w = round2(width);
24205+ if (w > maxsize) {
24206+ w = maxsize;
24207+ }
24208+ h = round2(height);
24209+ if (h > maxsize) {
24210+ h = maxsize;
24211+ }
24212+
24213+ bpp = bytes_per_pixel(format, type);
24214+ if (bpp == 0) {
24215+ /* probably a bad format or type enum */
24216+ return GLU_INVALID_ENUM;
24217+ }
24218+
24219+ /* Get current glPixelStore values */
24220+ glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpackrowlength);
24221+ glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpackalignment);
24222+ glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unpackskiprows);
24223+ glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unpackskippixels);
24224+ glGetIntegerv(GL_PACK_ROW_LENGTH, &packrowlength);
24225+ glGetIntegerv(GL_PACK_ALIGNMENT, &packalignment);
24226+ glGetIntegerv(GL_PACK_SKIP_ROWS, &packskiprows);
24227+ glGetIntegerv(GL_PACK_SKIP_PIXELS, &packskippixels);
24228+
24229+ /* set pixel packing */
24230+ glPixelStorei(GL_PACK_ROW_LENGTH, 0);
24231+ glPixelStorei(GL_PACK_ALIGNMENT, 1);
24232+ glPixelStorei(GL_PACK_SKIP_ROWS, 0);
24233+ glPixelStorei(GL_PACK_SKIP_PIXELS, 0);
24234+
24235+ done = GL_FALSE;
24236+
24237+ if (w != width || h != height) {
24238+ /* must rescale image to get "top" mipmap texture image */
24239+ image = malloc((w + 4) * h * bpp);
24240+ if (!image) {
24241+ return GLU_OUT_OF_MEMORY;
24242+ }
24243+ error = mesa_gluScaleImage(format, width, height, type, data,
24244+ w, h, type, image);
24245+ if (error) {
24246+ retval = error;
24247+ done = GL_TRUE;
24248+ }
24249+ }
24250+ else {
24251+ image = (void *) data;
24252+ }
24253+
24254+ level = 0;
24255+ while (!done) {
24256+ if (image != data) {
24257+ /* set pixel unpacking */
24258+ glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
24259+ glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
24260+ glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
24261+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
24262+ }
24263+
24264+ glTexImage2D(target, level, components, w, h, 0, format, type, image);
24265+
24266+ if (w == 1 && h == 1)
24267+ break;
24268+
24269+ neww = (w < 2) ? 1 : w / 2;
24270+ newh = (h < 2) ? 1 : h / 2;
24271+ newimage = malloc((neww + 4) * newh * bpp);
24272+ if (!newimage) {
24273+ return GLU_OUT_OF_MEMORY;
24274+ }
24275+
24276+ error = mesa_gluScaleImage(format, w, h, type, image,
24277+ neww, newh, type, newimage);
24278+ if (error) {
24279+ retval = error;
24280+ done = GL_TRUE;
24281+ }
24282+
24283+ if (image != data) {
24284+ free(image);
24285+ }
24286+ image = newimage;
24287+
24288+ w = neww;
24289+ h = newh;
24290+ level++;
24291+ }
24292+
24293+ if (image != data) {
24294+ free(image);
24295+ }
24296+
24297+ /* Restore original glPixelStore state */
24298+ glPixelStorei(GL_UNPACK_ROW_LENGTH, unpackrowlength);
24299+ glPixelStorei(GL_UNPACK_ALIGNMENT, unpackalignment);
24300+ glPixelStorei(GL_UNPACK_SKIP_ROWS, unpackskiprows);
24301+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, unpackskippixels);
24302+ glPixelStorei(GL_PACK_ROW_LENGTH, packrowlength);
24303+ glPixelStorei(GL_PACK_ALIGNMENT, packalignment);
24304+ glPixelStorei(GL_PACK_SKIP_ROWS, packskiprows);
24305+ glPixelStorei(GL_PACK_SKIP_PIXELS, packskippixels);
24306+
24307+ return retval;
24308+}
24309Index: trunk/target-i386/opengl_exec.c
24310===================================================================
24311--- /dev/null 1970-01-01 00:00:00.000000000 +0000
24312+++ trunk/target-i386/opengl_exec.c 2009-01-19 23:06:08.000000000 +0000
24313@@ -0,0 +1,3931 @@
24314+/*
24315+ * Host-side implementation of GL/GLX API
24316+ *
24317+ * Copyright (c) 2006,2007 Even Rouault
24318+ *
24319+ * Permission is hereby granted, free of charge, to any person obtaining a copy
24320+ * of this software and associated documentation files (the "Software"), to deal
24321+ * in the Software without restriction, including without limitation the rights
24322+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
24323+ * copies of the Software, and to permit persons to whom the Software is
24324+ * furnished to do so, subject to the following conditions:
24325+ *
24326+ * The above copyright notice and this permission notice shall be included in
24327+ * all copies or substantial portions of the Software.
24328+ *
24329+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24330+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24331+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24332+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24333+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24334+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24335+ * THE SOFTWARE.
24336+ */
24337+
24338+
24339+#include <stdio.h>
24340+#include <stdlib.h>
24341+#include <assert.h>
24342+#include <string.h>
24343+
24344+#include <X11/Xlib.h>
24345+#include <X11/Xutil.h>
24346+
24347+#define GL_GLEXT_PROTOTYPES
24348+#define GLX_GLXEXT_PROTOTYPES
24349+
24350+#include <mesa_gl.h>
24351+#include <mesa_glx.h>
24352+
24353+// TODO
24354+typedef long unsigned int target_phys_addr_t;
24355+
24356+#include "opengl_func.h"
24357+
24358+#include "mesa_glu.h"
24359+#include "mesa_mipmap.c"
24360+
24361+#include "../qemu-common.h"
24362+
24363+//#define SYSTEMATIC_ERROR_CHECK
24364+#define BUFFER_BEGINEND
24365+#define glGetError() 0
24366+
24367+#define GET_EXT_PTR(type, funcname, args_decl) \
24368+ static int detect_##funcname = 0; \
24369+ static type(*ptr_func_##funcname)args_decl = NULL; \
24370+ if (detect_##funcname == 0) \
24371+ { \
24372+ detect_##funcname = 1; \
24373+ ptr_func_##funcname = (type(*)args_decl)glXGetProcAddressARB((const GLubyte*)#funcname); \
24374+ assert (ptr_func_##funcname); \
24375+ }
24376+
24377+#define GET_EXT_PTR_NO_FAIL(type, funcname, args_decl) \
24378+ static int detect_##funcname = 0; \
24379+ static type(*ptr_func_##funcname)args_decl = NULL; \
24380+ if (detect_##funcname == 0) \
24381+ { \
24382+ detect_##funcname = 1; \
24383+ ptr_func_##funcname = (type(*)args_decl)glXGetProcAddressARB((const GLubyte*)#funcname); \
24384+ }
24385+
24386+#ifndef WIN32
24387+#include <dlfcn.h>
24388+#endif
24389+
24390+static void *get_glu_ptr(const char *name)
24391+{
24392+ static void *handle = (void *) -1;
24393+
24394+ if (handle == (void *) -1) {
24395+#ifndef WIN32
24396+ handle = dlopen("libGLU.so", RTLD_LAZY);
24397+ if (!handle)
24398+ fprintf(stderr, "can't load libGLU.so : %s\n", dlerror());
24399+#else
24400+ handle = (void *) LoadLibrary("glu32.dll");
24401+ if (!handle)
24402+ fprintf(stderr, "can't load glu32.dll\n");
24403+#endif
24404+ }
24405+ if (handle) {
24406+#ifndef WIN32
24407+ return dlsym(handle, name);
24408+#else
24409+ return GetProcAddress(handle, name);
24410+#endif
24411+ }
24412+ return NULL;
24413+}
24414+
24415+#define GET_GLU_PTR(type, funcname, args_decl) \
24416+ static int detect_##funcname = 0; \
24417+ static type(*ptr_func_##funcname)args_decl = NULL; \
24418+ if (detect_##funcname == 0) \
24419+ { \
24420+ detect_##funcname = 1; \
24421+ ptr_func_##funcname = (type(*)args_decl)get_glu_ptr(#funcname); \
24422+ }
24423+
24424+int display_function_call = 0;
24425+
24426+static const int defaultAttribList[] = {
24427+ GLX_RGBA,
24428+ GLX_RED_SIZE, 1,
24429+ GLX_GREEN_SIZE, 1,
24430+ GLX_BLUE_SIZE, 1,
24431+ GLX_DOUBLEBUFFER,
24432+ None
24433+};
24434+
24435+static XVisualInfo *get_default_visual(Display *dpy)
24436+{
24437+ static XVisualInfo *vis = NULL;
24438+ XVisualInfo theTemplate;
24439+ int numVisuals;
24440+
24441+ if (vis)
24442+ return vis;
24443+ fprintf(stderr, "get_default_visual\n");
24444+ /* if (vis == NULL) vis = glXChooseVisual(dpy, 0,
24445+ * (int*)defaultAttribList); */
24446+ theTemplate.screen = 0;
24447+ vis = XGetVisualInfo(dpy, VisualScreenMask, &theTemplate, &numVisuals);
24448+
24449+ return vis;
24450+}
24451+
24452+
24453+static Display *parent_dpy = NULL;
24454+static Window qemu_parent_window = 0;
24455+
24456+static Window active_win = 0; /* FIXME */
24457+static int active_win_x = 0;
24458+static int active_win_y = 0;
24459+
24460+void opengl_exec_set_parent_window(Display *_dpy, Window _parent_window)
24461+{
24462+ parent_dpy = _dpy;
24463+ qemu_parent_window = _parent_window;
24464+ if (active_win)
24465+ XReparentWindow(_dpy, active_win, _parent_window, active_win_x,
24466+ active_win_y);
24467+}
24468+
24469+static int local_connection = 0;
24470+void opengl_exec_set_local_connection()
24471+{
24472+ local_connection = 1;
24473+}
24474+
24475+static GLXDrawable create_window(Display *dpy, Window local_parent_window,
24476+ XVisualInfo *vis, const char *name,
24477+ int x, int y, int width, int height)
24478+{
24479+ int scrnum;
24480+ XSetWindowAttributes attr = { 0 };
24481+ unsigned long mask;
24482+ Window root;
24483+ Window win;
24484+
24485+ scrnum = DefaultScreen(dpy);
24486+ root = RootWindow(dpy, scrnum);
24487+
24488+ /* window attributes */
24489+ attr.background_pixel = 0xff000000;
24490+ attr.border_pixel = 0;
24491+ attr.colormap = XCreateColormap(dpy, root, vis->visual, AllocNone);
24492+ attr.event_mask = 0; /* StructureNotifyMask | ExposureMask | KeyPressMask */
24493+ attr.save_under = True;
24494+ // if (local_parent_window == NULL && qemu_parent_window == NULL)
24495+ attr.override_redirect = True;
24496+ // else
24497+ // attr.override_redirect = True;
24498+ attr.cursor = None;
24499+ mask =
24500+ CWBackPixel | CWBorderPixel | CWColormap | CWEventMask |
24501+ CWOverrideRedirect | CWSaveUnder;
24502+
24503+ if (local_parent_window)
24504+ win = XCreateWindow(dpy, local_parent_window, 0, 0, width, height, 0,
24505+ vis->depth, InputOutput, vis->visual, mask, &attr);
24506+ else if (qemu_parent_window)
24507+ win = XCreateWindow(dpy, qemu_parent_window, 0, 0, width, height, 0,
24508+ vis->depth, InputOutput, vis->visual, mask, &attr);
24509+ else
24510+ win = XCreateWindow(dpy, root, 0, 0, width, height, 0, vis->depth,
24511+ InputOutput, vis->visual, mask, &attr);
24512+
24513+ /* set hints and properties */
24514+ {
24515+ XSizeHints sizehints;
24516+
24517+ sizehints.x = x;
24518+ sizehints.y = y;
24519+ sizehints.width = width;
24520+ sizehints.height = height;
24521+ sizehints.flags = USSize | USPosition;
24522+ XSetWMNormalHints(dpy, win, &sizehints);
24523+ XSetStandardProperties(dpy, win, name, name, None,
24524+ (char **) NULL, 0, &sizehints);
24525+ }
24526+
24527+ XSync(dpy, 0);
24528+
24529+ /*
24530+ * int loop = 1; while (loop) { while (XPending(dpy) > 0) { XEvent event;
24531+ * XNextEvent(dpy, &event); switch (event.type) { case CreateNotify: { if
24532+ * (((XCreateWindowEvent*)&event)->window == win) { loop = 0; } break; } }
24533+ * } } */
24534+
24535+ /* TODO */
24536+ if (!active_win)
24537+ active_win = win;
24538+
24539+ return win;
24540+}
24541+
24542+typedef struct {
24543+ void *key;
24544+ void *value;
24545+} Assoc;
24546+
24547+#define MAX_HANDLED_PROCESS 100
24548+#define MAX_ASSOC_SIZE 100
24549+
24550+#define MAX_FBCONFIG 10
24551+
24552+#include "opengl_utils.h"
24553+
24554+#define MAX(a, b) (((a) > (b)) ? (a) : (b))
24555+
24556+
24557+typedef struct {
24558+ int x;
24559+ int y;
24560+ int width;
24561+ int height;
24562+ int map_state;
24563+} WindowPosStruct;
24564+
24565+typedef struct {
24566+ GLbitfield mask;
24567+ int activeTextureIndex;
24568+} ClientState;
24569+
24570+#define MAX_CLIENT_STATE_STACK_SIZE 16
24571+
24572+typedef struct {
24573+ int ref;
24574+ int fake_ctxt;
24575+ int fake_shareList;
24576+ GLXContext context;
24577+ GLXDrawable drawable;
24578+
24579+ void *vertexPointer;
24580+ void *normalPointer;
24581+ void *colorPointer;
24582+ void *secondaryColorPointer;
24583+ void *indexPointer;
24584+ void *texCoordPointer[NB_MAX_TEXTURES];
24585+ void *edgeFlagPointer;
24586+ void *vertexAttribPointer[MY_GL_MAX_VERTEX_ATTRIBS_ARB];
24587+ void *vertexAttribPointerNV[MY_GL_MAX_VERTEX_ATTRIBS_NV];
24588+ void *weightPointer;
24589+ void *matrixIndexPointer;
24590+ void *fogCoordPointer;
24591+ void *variantPointerEXT[MY_GL_MAX_VARIANT_POINTER_EXT];
24592+ void *interleavedArrays;
24593+ void *elementPointerATI;
24594+
24595+ int vertexPointerSize;
24596+ int normalPointerSize;
24597+ int colorPointerSize;
24598+ int secondaryColorPointerSize;
24599+ int indexPointerSize;
24600+ int texCoordPointerSize[NB_MAX_TEXTURES];
24601+ int edgeFlagPointerSize;
24602+ int vertexAttribPointerSize[MY_GL_MAX_VERTEX_ATTRIBS_ARB];
24603+ int vertexAttribPointerNVSize[MY_GL_MAX_VERTEX_ATTRIBS_NV];
24604+ int weightPointerSize;
24605+ int matrixIndexPointerSize;
24606+ int fogCoordPointerSize;
24607+ int variantPointerEXTSize[MY_GL_MAX_VARIANT_POINTER_EXT];
24608+ int interleavedArraysSize;
24609+ int elementPointerATISize;
24610+
24611+ int selectBufferSize;
24612+ void *selectBufferPtr;
24613+ int feedbackBufferSize;
24614+ void *feedbackBufferPtr;
24615+
24616+ ClientState clientStateStack[MAX_CLIENT_STATE_STACK_SIZE];
24617+ int clientStateSp;
24618+ int activeTextureIndex;
24619+
24620+ unsigned int ownTabTextures[32768];
24621+ unsigned int *tabTextures;
24622+ RangeAllocator ownTextureAllocator;
24623+ RangeAllocator *textureAllocator;
24624+
24625+ unsigned int ownTabBuffers[32768];
24626+ unsigned int *tabBuffers;
24627+ RangeAllocator ownBufferAllocator;
24628+ RangeAllocator *bufferAllocator;
24629+
24630+ unsigned int ownTabLists[32768];
24631+ unsigned int *tabLists;
24632+ RangeAllocator ownListAllocator;
24633+ RangeAllocator *listAllocator;
24634+
24635+#ifdef SYSTEMATIC_ERROR_CHECK
24636+ int last_error;
24637+#endif
24638+} GLState;
24639+
24640+typedef struct {
24641+ int process_id;
24642+ int instr_counter;
24643+
24644+ int x, y, width, height;
24645+ WindowPosStruct currentDrawablePos;
24646+
24647+ int next_available_context_number;
24648+ int next_available_pbuffer_number;
24649+
24650+ int nb_states;
24651+ GLState default_state;
24652+ GLState **glstates;
24653+ GLState *current_state;
24654+
24655+ int nfbconfig;
24656+ GLXFBConfig *fbconfigs[MAX_FBCONFIG];
24657+ int fbconfigs_max[MAX_FBCONFIG];
24658+ int nfbconfig_total;
24659+
24660+ Assoc association_fakecontext_glxcontext[MAX_ASSOC_SIZE];
24661+ Assoc association_fakepbuffer_pbuffer[MAX_ASSOC_SIZE];
24662+ Assoc association_clientdrawable_serverdrawable[MAX_ASSOC_SIZE];
24663+ Assoc association_fakecontext_visual[MAX_ASSOC_SIZE];
24664+
24665+ Display *dpy;
24666+
24667+ int began;
24668+ int primitive;
24669+ int bufsize;
24670+ int bufstart;
24671+ arg_t *cmdbuf;
24672+} ProcessStruct;
24673+
24674+static ProcessStruct processes[MAX_HANDLED_PROCESS];
24675+
24676+void init_process_tab()
24677+{
24678+ memset(processes, 0, sizeof(processes));
24679+}
24680+
24681+#define ARG_TO_CHAR(x) (char)(x)
24682+#define ARG_TO_UNSIGNED_CHAR(x) (unsigned char)(x)
24683+#define ARG_TO_SHORT(x) (short)(x)
24684+#define ARG_TO_UNSIGNED_SHORT(x) (unsigned short)(x)
24685+#define ARG_TO_INT(x) (int)(x)
24686+#define ARG_TO_UNSIGNED_INT(x) (unsigned int)(x)
24687+#define ARG_TO_FLOAT(x) (*(float*)&(x))
24688+#define ARG_TO_DOUBLE(x) (*(double*)(x))
24689+
24690+#include "server_stub.c"
24691+
24692+/* ---- */
24693+
24694+#ifdef BUFFER_BEGINEND
24695+/* A user of the following two functions must not buffer any calls that
24696+ * may throw an error (i.e. errors conditions must be checked before
24697+ * storing in the buffer) or return values. */
24698+static inline arg_t *cmd_buffer_alloc(ProcessStruct *process, size_t elems)
24699+{
24700+ arg_t *ret;
24701+
24702+ if (unlikely(process->bufstart + elems > process->bufsize)) {
24703+ process->bufsize = (process->bufsize ?: 0x100) << 1;
24704+ process->cmdbuf = qemu_realloc(process->cmdbuf,
24705+ process->bufsize * sizeof(arg_t));
24706+ }
24707+
24708+ ret = process->cmdbuf + process->bufstart;
24709+ process->bufstart += elems;
24710+ return ret;
24711+}
24712+
24713+static inline void cmd_buffer_replay(ProcessStruct *process)
24714+{
24715+ Signature *sig;
24716+ int func_number;
24717+ int ret_int;
24718+ char ret_char;
24719+ arg_t *call = process->cmdbuf;
24720+
24721+ while (process->bufstart) {
24722+ func_number = *call ++;
24723+ sig = (Signature *) tab_opengl_calls[func_number];
24724+
24725+ execute_func(func_number, call, &ret_int, &ret_char);
24726+
24727+ call += sig->nb_args;
24728+ process->bufstart -= sig->nb_args + 1;
24729+ }
24730+}
24731+#endif
24732+
24733+/* ---- */
24734+
24735+typedef void *ClientGLXDrawable;
24736+static inline ClientGLXDrawable to_drawable(arg_t arg)
24737+{
24738+#ifdef TARGET_X86_64
24739+ if (arg > (unsigned long) -1) {
24740+ fprintf(stderr, "GLXDrawable too big for this implementation\n");
24741+ exit(-1);
24742+ }
24743+#endif
24744+ return (void *) (unsigned long) arg;
24745+}
24746+
24747+GLXContext get_association_fakecontext_glxcontext(
24748+ ProcessStruct *process, int fakecontext)
24749+{
24750+ int i;
24751+
24752+ for (i = 0;
24753+ i < MAX_ASSOC_SIZE &&
24754+ process->association_fakecontext_glxcontext[i].key; i++)
24755+ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
24756+ fakecontext)
24757+ return (GLXContext)
24758+ process->association_fakecontext_glxcontext[i].value;
24759+
24760+ return NULL;
24761+}
24762+
24763+void set_association_fakecontext_glxcontext(
24764+ ProcessStruct *process, int fakecontext, GLXContext glxcontext)
24765+{
24766+ int i;
24767+
24768+ for (i = 0;
24769+ i < MAX_ASSOC_SIZE &&
24770+ process->association_fakecontext_glxcontext[i].key; i++)
24771+ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
24772+ fakecontext)
24773+ break;
24774+
24775+ if (i < MAX_ASSOC_SIZE) {
24776+ process->association_fakecontext_glxcontext[i].key =
24777+ (void *) (long) fakecontext;
24778+ process->association_fakecontext_glxcontext[i].value =
24779+ (void *) glxcontext;
24780+ } else
24781+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
24782+}
24783+
24784+void unset_association_fakecontext_glxcontext(
24785+ ProcessStruct *process, int fakecontext)
24786+{
24787+ int i;
24788+
24789+ for (i = 0;
24790+ i < MAX_ASSOC_SIZE &&
24791+ process->association_fakecontext_glxcontext[i].key; i++)
24792+ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
24793+ fakecontext) {
24794+ memmove(&process->association_fakecontext_glxcontext[i],
24795+ &process->association_fakecontext_glxcontext[i + 1],
24796+ sizeof(Assoc) * (MAX_ASSOC_SIZE - 1 - i));
24797+ return;
24798+ }
24799+}
24800+
24801+/* ---- */
24802+
24803+XVisualInfo *get_association_fakecontext_visual(
24804+ ProcessStruct *process, int fakecontext)
24805+{
24806+ int i;
24807+
24808+ for (i = 0;
24809+ i < MAX_ASSOC_SIZE && process->association_fakecontext_visual[i].key;
24810+ i++)
24811+ if ((int) (long) process->association_fakecontext_visual[i].key ==
24812+ fakecontext)
24813+ return process->association_fakecontext_visual[i].value;
24814+
24815+ return NULL;
24816+}
24817+
24818+void set_association_fakecontext_visual(ProcessStruct *process,
24819+ int fakecontext, XVisualInfo *visual)
24820+{
24821+ int i;
24822+
24823+ for (i = 0;
24824+ i < MAX_ASSOC_SIZE && process->association_fakecontext_visual[i].key;
24825+ i++)
24826+ if ((int) (long) process->association_fakecontext_visual[i].key ==
24827+ fakecontext)
24828+ break;
24829+
24830+ if (i < MAX_ASSOC_SIZE) {
24831+ process->association_fakecontext_visual[i].key =
24832+ (void *) (long) fakecontext;
24833+ process->association_fakecontext_visual[i].value = (void *) visual;
24834+ } else
24835+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
24836+}
24837+
24838+/* ---- */
24839+
24840+GLXPbuffer get_association_fakepbuffer_pbuffer(
24841+ ProcessStruct *process, ClientGLXDrawable fakepbuffer)
24842+{
24843+ int i;
24844+
24845+ for (i = 0; i < MAX_ASSOC_SIZE &&
24846+ process->association_fakepbuffer_pbuffer[i].key; i ++)
24847+ if ((ClientGLXDrawable)
24848+ process->association_fakepbuffer_pbuffer[i].key ==
24849+ fakepbuffer)
24850+ return (GLXPbuffer)
24851+ process->association_fakepbuffer_pbuffer[i].value;
24852+
24853+ return 0;
24854+}
24855+
24856+void set_association_fakepbuffer_pbuffer(ProcessStruct *process,
24857+ ClientGLXDrawable fakepbuffer, GLXPbuffer pbuffer)
24858+{
24859+ int i;
24860+
24861+ for (i = 0;
24862+ i < MAX_ASSOC_SIZE &&
24863+ process->association_fakepbuffer_pbuffer[i].key; i++)
24864+ if ((ClientGLXDrawable)
24865+ process->association_fakepbuffer_pbuffer[i].key ==
24866+ fakepbuffer)
24867+ break;
24868+
24869+ if (i < MAX_ASSOC_SIZE) {
24870+ process->association_fakepbuffer_pbuffer[i].key = (void *) fakepbuffer;
24871+ process->association_fakepbuffer_pbuffer[i].value = (void *) pbuffer;
24872+ } else
24873+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
24874+}
24875+
24876+void unset_association_fakepbuffer_pbuffer(ProcessStruct *process,
24877+ ClientGLXDrawable fakepbuffer)
24878+{
24879+ int i;
24880+
24881+ for (i = 0; i < MAX_ASSOC_SIZE &&
24882+ process->association_fakepbuffer_pbuffer[i].key; i++)
24883+ if ((ClientGLXDrawable)
24884+ process->association_fakepbuffer_pbuffer[i].key ==
24885+ fakepbuffer) {
24886+ memmove(&process->association_fakepbuffer_pbuffer[i],
24887+ &process->association_fakepbuffer_pbuffer[i + 1],
24888+ sizeof(Assoc) * (MAX_ASSOC_SIZE - 1 - i));
24889+ return;
24890+ }
24891+}
24892+
24893+/* ---- */
24894+
24895+GLXDrawable get_association_clientdrawable_serverdrawable(
24896+ ProcessStruct *process, ClientGLXDrawable clientdrawable)
24897+{
24898+ int i;
24899+
24900+ for (i = 0; i < MAX_ASSOC_SIZE &&
24901+ process->association_clientdrawable_serverdrawable[i].key;
24902+ i++)
24903+ if ((ClientGLXDrawable) process->
24904+ association_clientdrawable_serverdrawable[i].key ==
24905+ clientdrawable)
24906+ return (GLXDrawable) process->
24907+ association_clientdrawable_serverdrawable[i].value;
24908+
24909+ return (GLXDrawable) 0;
24910+}
24911+
24912+ClientGLXDrawable get_association_serverdrawable_clientdrawable(
24913+ ProcessStruct *process, GLXDrawable serverdrawable)
24914+{
24915+ int i;
24916+
24917+ for (i = 0; i < MAX_ASSOC_SIZE &&
24918+ process->association_clientdrawable_serverdrawable[i].key;
24919+ i ++)
24920+ if ((GLXDrawable) process->
24921+ association_clientdrawable_serverdrawable[i].value ==
24922+ serverdrawable)
24923+ return (ClientGLXDrawable)
24924+ process->association_clientdrawable_serverdrawable[i].key;
24925+
24926+ return NULL;
24927+}
24928+
24929+void set_association_clientdrawable_serverdrawable(
24930+ ProcessStruct *process, ClientGLXDrawable clientdrawable,
24931+ GLXDrawable serverdrawable)
24932+{
24933+ int i;
24934+
24935+ for (i = 0; process->association_clientdrawable_serverdrawable[i].key;
24936+ i ++)
24937+ if ((ClientGLXDrawable) process->
24938+ association_clientdrawable_serverdrawable[i].key ==
24939+ clientdrawable)
24940+ break;
24941+
24942+ if (i < MAX_ASSOC_SIZE) {
24943+ process->association_clientdrawable_serverdrawable[i].key =
24944+ (void *) clientdrawable;
24945+ process->association_clientdrawable_serverdrawable[i].value =
24946+ (void *) serverdrawable;
24947+ } else
24948+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
24949+}
24950+
24951+static void _get_window_pos(Display *dpy, Window win, WindowPosStruct *pos)
24952+{
24953+ XWindowAttributes window_attributes_return;
24954+ Window child;
24955+ int x, y;
24956+ Window root = DefaultRootWindow(dpy);
24957+
24958+ XGetWindowAttributes(dpy, win, &window_attributes_return);
24959+ XTranslateCoordinates(dpy, win, root, 0, 0, &x, &y, &child);
24960+ /* printf("%d %d %d %d\n", x, y, window_attributes_return.width,
24961+ * window_attributes_return.height); */
24962+ pos->x = x;
24963+ pos->y = y;
24964+ pos->width = window_attributes_return.width;
24965+ pos->height = window_attributes_return.height;
24966+ pos->map_state = window_attributes_return.map_state;
24967+}
24968+
24969+static int is_gl_vendor_ati(Display *dpy)
24970+{
24971+ static int is_gl_vendor_ati_flag = 0;
24972+ static int has_init = 0;
24973+
24974+ if (has_init == 0) {
24975+ has_init = 1;
24976+ is_gl_vendor_ati_flag =
24977+ (strncmp(glXGetClientString(dpy, GLX_VENDOR), "ATI", 3) == 0);
24978+ }
24979+ return is_gl_vendor_ati_flag;
24980+}
24981+
24982+static int get_server_texture(ProcessStruct *process,
24983+ unsigned int client_texture)
24984+{
24985+ unsigned int server_texture = 0;
24986+
24987+ if (client_texture < 32768) {
24988+ server_texture = process->current_state->tabTextures[client_texture];
24989+ } else {
24990+ fprintf(stderr, "invalid texture name %d\n", client_texture);
24991+ }
24992+ return server_texture;
24993+}
24994+
24995+static int get_server_buffer(ProcessStruct *process,
24996+ unsigned int client_buffer)
24997+{
24998+ unsigned int server_buffer = 0;
24999+
25000+ if (client_buffer < 32768) {
25001+ server_buffer = process->current_state->tabBuffers[client_buffer];
25002+ } else {
25003+ fprintf(stderr, "invalid buffer name %d\n", client_buffer);
25004+ }
25005+ return server_buffer;
25006+}
25007+
25008+
25009+static int get_server_list(ProcessStruct *process, unsigned int client_list)
25010+{
25011+ unsigned int server_list = 0;
25012+
25013+ if (client_list < 32768) {
25014+ server_list = process->current_state->tabLists[client_list];
25015+ } else {
25016+ fprintf(stderr, "invalid list name %d\n", client_list);
25017+ }
25018+ return server_list;
25019+}
25020+
25021+GLXFBConfig get_fbconfig(ProcessStruct *process, int client_fbconfig)
25022+{
25023+ int i;
25024+ int nbtotal = 0;
25025+
25026+ for (i = 0; i < process->nfbconfig; i++) {
25027+ assert(client_fbconfig >= 1 + nbtotal);
25028+ if (client_fbconfig <= nbtotal + process->fbconfigs_max[i]) {
25029+ return process->fbconfigs[i][client_fbconfig - 1 - nbtotal];
25030+ }
25031+ nbtotal += process->fbconfigs_max[i];
25032+ }
25033+ return 0;
25034+}
25035+
25036+typedef struct {
25037+ int attribListLength;
25038+ int *attribList;
25039+ XVisualInfo *visInfo;
25040+} AssocAttribListVisual;
25041+
25042+static int nTabAssocAttribListVisual = 0;
25043+static AssocAttribListVisual *tabAssocAttribListVisual = NULL;
25044+
25045+static int _compute_length_of_attrib_list_including_zero(const int *attribList,
25046+ int
25047+ booleanMustHaveValue)
25048+{
25049+ int i = 0;
25050+
25051+ while (attribList[i]) {
25052+ if (booleanMustHaveValue ||
25053+ !(attribList[i] == GLX_USE_GL || attribList[i] == GLX_RGBA ||
25054+ attribList[i] == GLX_DOUBLEBUFFER ||
25055+ attribList[i] == GLX_STEREO)) {
25056+ i += 2;
25057+ } else {
25058+ i++;
25059+ }
25060+ }
25061+ return i + 1;
25062+}
25063+
25064+static int glXChooseVisualFunc(Display *dpy, const int *_attribList)
25065+{
25066+ if (_attribList == NULL)
25067+ return 0;
25068+ int attribListLength =
25069+ _compute_length_of_attrib_list_including_zero(_attribList, 0);
25070+ int i;
25071+
25072+ int *attribList = malloc(sizeof(int) * attribListLength);
25073+ memcpy(attribList, _attribList, sizeof(int) * attribListLength);
25074+
25075+ i = 0;
25076+ while (attribList[i]) {
25077+ if (!
25078+ (attribList[i] == GLX_USE_GL || attribList[i] == GLX_RGBA ||
25079+ attribList[i] == GLX_DOUBLEBUFFER ||
25080+ attribList[i] == GLX_STEREO)) {
25081+ if (attribList[i] == GLX_SAMPLE_BUFFERS && attribList[i + 1] != 0
25082+ && getenv("DISABLE_SAMPLE_BUFFERS")) {
25083+ fprintf(stderr, "Disabling GLX_SAMPLE_BUFFERS\n");
25084+ attribList[i + 1] = 0;
25085+ }
25086+ i += 2;
25087+ } else {
25088+ i++;
25089+ }
25090+ }
25091+
25092+ for (i = 0; i < nTabAssocAttribListVisual; i++) {
25093+ if (tabAssocAttribListVisual[i].attribListLength == attribListLength
25094+ && memcmp(tabAssocAttribListVisual[i].attribList, attribList,
25095+ attribListLength * sizeof(int)) == 0) {
25096+ free(attribList);
25097+ return (tabAssocAttribListVisual[i].
25098+ visInfo) ? tabAssocAttribListVisual[i].visInfo->
25099+ visualid : 0;
25100+ }
25101+ }
25102+ XVisualInfo *visInfo = glXChooseVisual(dpy, 0, attribList);
25103+
25104+ tabAssocAttribListVisual = realloc(
25105+ tabAssocAttribListVisual, sizeof(AssocAttribListVisual) *
25106+ (nTabAssocAttribListVisual + 1));
25107+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribListLength =
25108+ attribListLength;
25109+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList =
25110+ (int *) malloc(sizeof(int) * attribListLength);
25111+ memcpy(tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList,
25112+ attribList, sizeof(int) * attribListLength);
25113+ tabAssocAttribListVisual[nTabAssocAttribListVisual].visInfo = visInfo;
25114+ nTabAssocAttribListVisual++;
25115+ free(attribList);
25116+ return (visInfo) ? visInfo->visualid : 0;
25117+}
25118+
25119+static XVisualInfo *get_visual_info_from_visual_id(Display *dpy,
25120+ int visualid)
25121+{
25122+ int i, n;
25123+ XVisualInfo template;
25124+ XVisualInfo *visInfo;
25125+
25126+ for (i = 0; i < nTabAssocAttribListVisual; i++) {
25127+ if (tabAssocAttribListVisual[i].visInfo &&
25128+ tabAssocAttribListVisual[i].visInfo->visualid == visualid) {
25129+ return tabAssocAttribListVisual[i].visInfo;
25130+ }
25131+ }
25132+ template.visualid = visualid;
25133+ visInfo = XGetVisualInfo(dpy, VisualIDMask, &template, &n);
25134+ tabAssocAttribListVisual =
25135+ realloc(tabAssocAttribListVisual,
25136+ sizeof(AssocAttribListVisual) * (nTabAssocAttribListVisual +
25137+ 1));
25138+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribListLength = 0;
25139+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList = NULL;
25140+ tabAssocAttribListVisual[nTabAssocAttribListVisual].visInfo = visInfo;
25141+ nTabAssocAttribListVisual++;
25142+ return visInfo;
25143+}
25144+
25145+typedef struct {
25146+ int x;
25147+ int y;
25148+ int width;
25149+ int height;
25150+ int xhot;
25151+ int yhot;
25152+ int *pixels;
25153+} ClientCursor;
25154+
25155+#if 0
25156+static ClientCursor client_cursor = { 0 };
25157+#endif
25158+
25159+static void do_glClientActiveTextureARB(int texture)
25160+{
25161+ GET_EXT_PTR_NO_FAIL(void, glClientActiveTextureARB, (int));
25162+
25163+ if (ptr_func_glClientActiveTextureARB) {
25164+ ptr_func_glClientActiveTextureARB(texture);
25165+ }
25166+}
25167+
25168+#ifdef CURSOR_TRICK
25169+static void do_glActiveTextureARB(int texture)
25170+{
25171+ GET_EXT_PTR_NO_FAIL(void, glActiveTextureARB, (int));
25172+
25173+ if (ptr_func_glActiveTextureARB) {
25174+ ptr_func_glActiveTextureARB(texture);
25175+ }
25176+}
25177+
25178+static void do_glUseProgramObjectARB(GLhandleARB programObj)
25179+{
25180+ GET_EXT_PTR_NO_FAIL(void, glUseProgramObjectARB, (GLhandleARB));
25181+
25182+ if (ptr_func_glUseProgramObjectARB) {
25183+ ptr_func_glUseProgramObjectARB(programObj);
25184+ }
25185+}
25186+#endif
25187+
25188+static void destroy_gl_state(GLState *state)
25189+{
25190+ int i;
25191+
25192+ if (state->vertexPointer)
25193+ free(state->vertexPointer);
25194+ if (state->normalPointer)
25195+ free(state->normalPointer);
25196+ if (state->indexPointer)
25197+ free(state->indexPointer);
25198+ if (state->colorPointer)
25199+ free(state->colorPointer);
25200+ if (state->secondaryColorPointer)
25201+ free(state->secondaryColorPointer);
25202+ for (i = 0; i < NB_MAX_TEXTURES; i++) {
25203+ if (state->texCoordPointer[i])
25204+ free(state->texCoordPointer[i]);
25205+ }
25206+ for (i = 0; i < MY_GL_MAX_VERTEX_ATTRIBS_ARB; i++) {
25207+ if (state->vertexAttribPointer[i])
25208+ free(state->vertexAttribPointer[i]);
25209+ }
25210+ for (i = 0; i < MY_GL_MAX_VERTEX_ATTRIBS_NV; i++) {
25211+ if (state->vertexAttribPointerNV[i])
25212+ free(state->vertexAttribPointerNV[i]);
25213+ }
25214+ if (state->weightPointer)
25215+ free(state->weightPointer);
25216+ if (state->matrixIndexPointer)
25217+ free(state->matrixIndexPointer);
25218+ if (state->fogCoordPointer)
25219+ free(state->fogCoordPointer);
25220+ for (i = 0; i < MY_GL_MAX_VARIANT_POINTER_EXT; i++) {
25221+ if (state->variantPointerEXT[i])
25222+ free(state->variantPointerEXT[i]);
25223+ }
25224+ if (state->interleavedArrays)
25225+ free(state->interleavedArrays);
25226+ if (state->elementPointerATI)
25227+ free(state->elementPointerATI);
25228+}
25229+
25230+static void init_gl_state(GLState *state)
25231+{
25232+ state->textureAllocator = &state->ownTextureAllocator;
25233+ state->tabTextures = state->ownTabTextures;
25234+ state->bufferAllocator = &state->ownBufferAllocator;
25235+ state->tabBuffers = state->ownTabBuffers;
25236+ state->listAllocator = &state->ownListAllocator;
25237+ state->tabLists = state->ownTabLists;
25238+}
25239+
25240+/*
25241+ * Translate the nth element of list from type to GLuint.
25242+ */
25243+static GLuint translate_id(GLsizei n, GLenum type, const GLvoid *list)
25244+{
25245+ GLbyte *bptr;
25246+ GLubyte *ubptr;
25247+ GLshort *sptr;
25248+ GLushort *usptr;
25249+ GLint *iptr;
25250+ GLuint *uiptr;
25251+ GLfloat *fptr;
25252+
25253+ switch (type) {
25254+ case GL_BYTE:
25255+ bptr = (GLbyte *) list;
25256+ return (GLuint) *(bptr + n);
25257+ case GL_UNSIGNED_BYTE:
25258+ ubptr = (GLubyte *) list;
25259+ return (GLuint) *(ubptr + n);
25260+ case GL_SHORT:
25261+ sptr = (GLshort *) list;
25262+ return (GLuint) *(sptr + n);
25263+ case GL_UNSIGNED_SHORT:
25264+ usptr = (GLushort *) list;
25265+ return (GLuint) *(usptr + n);
25266+ case GL_INT:
25267+ iptr = (GLint *) list;
25268+ return (GLuint) *(iptr + n);
25269+ case GL_UNSIGNED_INT:
25270+ uiptr = (GLuint *) list;
25271+ return (GLuint) *(uiptr + n);
25272+ case GL_FLOAT:
25273+ fptr = (GLfloat *) list;
25274+ return (GLuint) *(fptr + n);
25275+ case GL_2_BYTES:
25276+ ubptr = ((GLubyte *) list) + 2 * n;
25277+ return (GLuint) *ubptr * 256 + (GLuint) *(ubptr + 1);
25278+ case GL_3_BYTES:
25279+ ubptr = ((GLubyte *) list) + 3 * n;
25280+ return (GLuint) *ubptr * 65536 + (GLuint) *(ubptr + 1) * 256 +
25281+ (GLuint) *(ubptr + 2);
25282+ case GL_4_BYTES:
25283+ ubptr = ((GLubyte *) list) + 4 * n;
25284+ return (GLuint) *ubptr * 16777216 + (GLuint) *(ubptr + 1) * 65536 +
25285+ (GLuint) *(ubptr + 2) * 256 + (GLuint) *(ubptr + 3);
25286+ default:
25287+ return 0;
25288+ }
25289+}
25290+
25291+void _create_context(ProcessStruct *process, GLXContext ctxt, int fake_ctxt,
25292+ GLXContext shareList, int fake_shareList)
25293+{
25294+ process->glstates =
25295+ realloc(process->glstates,
25296+ (process->nb_states + 1) * sizeof(GLState *));
25297+ process->glstates[process->nb_states] = malloc(sizeof(GLState));
25298+ memset(process->glstates[process->nb_states], 0, sizeof(GLState));
25299+ process->glstates[process->nb_states]->ref = 1;
25300+ process->glstates[process->nb_states]->context = ctxt;
25301+ process->glstates[process->nb_states]->fake_ctxt = fake_ctxt;
25302+ process->glstates[process->nb_states]->fake_shareList = fake_shareList;
25303+ init_gl_state(process->glstates[process->nb_states]);
25304+ if (shareList && fake_shareList) {
25305+ int i;
25306+
25307+ for (i = 0; i < process->nb_states; i++) {
25308+ if (process->glstates[i]->fake_ctxt == fake_shareList) {
25309+ process->glstates[i]->ref++;
25310+ process->glstates[process->nb_states]->textureAllocator =
25311+ process->glstates[i]->textureAllocator;
25312+ process->glstates[process->nb_states]->tabTextures =
25313+ process->glstates[i]->tabTextures;
25314+ process->glstates[process->nb_states]->bufferAllocator =
25315+ process->glstates[i]->bufferAllocator;
25316+ process->glstates[process->nb_states]->tabBuffers =
25317+ process->glstates[i]->tabBuffers;
25318+ process->glstates[process->nb_states]->listAllocator =
25319+ process->glstates[i]->listAllocator;
25320+ process->glstates[process->nb_states]->tabLists =
25321+ process->glstates[i]->tabLists;
25322+ break;
25323+ }
25324+ }
25325+ }
25326+ process->nb_states++;
25327+}
25328+
25329+static ProcessStruct *process;
25330+
25331+void do_disconnect_current(void)
25332+{
25333+ int i;
25334+ Display *dpy = process->dpy;
25335+
25336+ glXMakeCurrent(dpy, 0, NULL);
25337+
25338+ for (i = 0; i < MAX_ASSOC_SIZE &&
25339+ process->association_fakecontext_glxcontext[i].key; i ++) {
25340+ GLXContext ctxt = process->association_fakecontext_glxcontext[i].value;
25341+
25342+ fprintf(stderr, "Destroy context corresponding to fake_context"
25343+ " = %ld\n", (long) process->
25344+ association_fakecontext_glxcontext[i].key);
25345+ glXDestroyContext(dpy, ctxt);
25346+ }
25347+
25348+ GET_EXT_PTR(void, glXDestroyPbuffer, (Display *, GLXPbuffer));
25349+
25350+ for (i = 0; i < MAX_ASSOC_SIZE &&
25351+ process->association_fakepbuffer_pbuffer[i].key; i ++) {
25352+ GLXPbuffer pbuffer = (GLXPbuffer)
25353+ process->association_fakepbuffer_pbuffer[i].value;
25354+
25355+ fprintf(stderr, "Destroy pbuffer corresponding to fake_pbuffer"
25356+ " = %ld\n", (long) process->
25357+ association_fakepbuffer_pbuffer[i].key);
25358+ if (!is_gl_vendor_ati(dpy))
25359+ ptr_func_glXDestroyPbuffer(dpy, pbuffer);
25360+ }
25361+
25362+ for (i = 0; i < MAX_ASSOC_SIZE && process->
25363+ association_clientdrawable_serverdrawable[i].key; i ++) {
25364+ Window win = (Window) process->
25365+ association_clientdrawable_serverdrawable[i].value;
25366+
25367+ fprintf(stderr, "Destroy window %x corresponding to client_drawable "
25368+ "= %p\n", (int) win, process->
25369+ association_clientdrawable_serverdrawable[i].key);
25370+
25371+ XDestroyWindow(dpy, win);
25372+ if (active_win == win)
25373+ active_win = 0;
25374+
25375+ int loop = 1; // 1;
25376+ while (loop) {
25377+ while (XPending(dpy) > 0) {
25378+ XEvent event;
25379+
25380+ XNextEvent(dpy, &event);
25381+ switch (event.type) {
25382+ case DestroyNotify:
25383+ {
25384+ if (((XDestroyWindowEvent *) &event)->window == win)
25385+ loop = 0;
25386+ break;
25387+ }
25388+ }
25389+ }
25390+ break; /* TODO */
25391+ }
25392+ }
25393+
25394+ for (i = 0; i < process->nb_states; i++) {
25395+ destroy_gl_state(process->glstates[i]);
25396+ free(process->glstates[i]);
25397+ }
25398+ destroy_gl_state(&process->default_state);
25399+ free(process->glstates);
25400+
25401+ if (process->cmdbuf)
25402+ qemu_free(process->cmdbuf);
25403+
25404+ for (i = 0; &processes[i] != process; i ++);
25405+ memmove(&processes[i], &processes[i + 1],
25406+ (MAX_HANDLED_PROCESS - 1 - i) * sizeof(ProcessStruct));
25407+}
25408+
25409+static const int beginend_allowed[GL_N_CALLS] = {
25410+#undef MAGIC_MACRO
25411+#define MAGIC_MACRO(name) [name ## _func] = 1,
25412+#include "gl_beginend.h"
25413+};
25414+
25415+void do_context_switch(Display *dpy, pid_t pid, int call)
25416+{
25417+ int i;
25418+
25419+ for (i = 0; i < MAX_HANDLED_PROCESS; i ++)
25420+ if (processes[i].process_id == pid) {
25421+ process = &processes[i];
25422+ break;
25423+ } else if (processes[i].process_id == 0) {
25424+ process = &processes[i];
25425+ memset(process, 0, sizeof(ProcessStruct));
25426+ process->process_id = pid;
25427+ init_gl_state(&process->default_state);
25428+ process->current_state = &process->default_state;
25429+ process->dpy = dpy;
25430+ break;
25431+ }
25432+ if (process == NULL) {
25433+ fprintf(stderr, "Too many processes !\n");
25434+ exit(-1);
25435+ }
25436+
25437+ switch (call) {
25438+ case _init32_func:
25439+ case _init64_func:
25440+ case _exit_process_func:
25441+ case glXMakeCurrent_func:
25442+ /* Do nothing */
25443+ break;
25444+
25445+ default:
25446+#if 0
25447+ glFlush();
25448+ glFinish();
25449+ glXSwapBuffers(dpy, drawable);
25450+ if (process->current_state == &process->default_state)
25451+ /* Where do commands like glViewport go when no drawable or
25452+ * context are current - i.e. after a call to
25453+ * glXMakeCurrent(dpy, 0, 0) ? */;
25454+ else
25455+#endif
25456+ glXMakeCurrent(dpy, process->current_state->drawable,
25457+ process->current_state->context);
25458+ }
25459+}
25460+
25461+int do_function_call(int func_number, arg_t *args, char *ret_string)
25462+{
25463+ char ret_char = 0;
25464+ int ret_int = 0;
25465+ const char *ret_str = NULL;
25466+ Display *dpy = process->dpy;
25467+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
25468+ int ret_type = signature->ret_type;
25469+
25470+ if (parent_dpy)
25471+ dpy = parent_dpy;
25472+
25473+ process->instr_counter++;
25474+ if (display_function_call)
25475+ fprintf(stderr, "[%d]> %s\n", process->instr_counter,
25476+ tab_opengl_calls_name[func_number]);
25477+
25478+#ifdef BUFFER_BEGINEND
25479+ if (process->began) {
25480+ /* Need to check for any errors now because later we won't have
25481+ * a chance to report them. */
25482+ if (beginend_allowed[func_number]) {
25483+ arg_t *buf = cmd_buffer_alloc(process, signature->nb_args + 1);
25484+
25485+ /* TODO: pointer arguments */
25486+ buf[0] = func_number;
25487+ memcpy(buf + 1, args, signature->nb_args * sizeof(arg_t));
25488+ } else if (likely(func_number == glEnd_func)) {
25489+ process->began = 0;
25490+
25491+ glBegin(process->primitive);
25492+ cmd_buffer_replay(process);
25493+ glEnd();
25494+ } else {
25495+ /* TODO: properly report */
25496+#ifdef SYSTEMATIC_ERROR_CHECK
25497+ process->current_state->last_error = INVALID_OPERATION;
25498+#endif
25499+ }
25500+
25501+ func_number = -1;
25502+ }
25503+#endif
25504+
25505+ switch (func_number) {
25506+ case -1:
25507+ break;
25508+
25509+ case _init_func:
25510+ *(int *) args[1] = 1;
25511+ break;
25512+
25513+ case _synchronize_func:
25514+ ret_int = 1;
25515+ break;
25516+
25517+ case _exit_process_func:
25518+ do_disconnect_current();
25519+ break;
25520+
25521+ case _changeWindowState_func:
25522+ {
25523+ ClientGLXDrawable client_drawable = to_drawable(args[0]);
25524+
25525+ if (display_function_call)
25526+ fprintf(stderr, "client_drawable=%p\n",
25527+ (void *) client_drawable);
25528+
25529+ GLXDrawable drawable =
25530+ get_association_clientdrawable_serverdrawable(
25531+ process, client_drawable);
25532+ if (drawable) {
25533+ if (args[1] == IsViewable) {
25534+ WindowPosStruct pos;
25535+
25536+ _get_window_pos(dpy, drawable, &pos);
25537+ if (pos.map_state != args[1]) {
25538+ XMapWindow(dpy, drawable);
25539+
25540+ int loop = 1; // 1;
25541+
25542+ while (loop) {
25543+ while (XPending(dpy) > 0) {
25544+ XEvent event;
25545+
25546+ XNextEvent(dpy, &event);
25547+ switch (event.type) {
25548+ case ConfigureNotify:
25549+ {
25550+ if (((XConfigureEvent *) &event)->
25551+ window == drawable) {
25552+ loop = 0;
25553+ }
25554+ break;
25555+ }
25556+ }
25557+ }
25558+ break; /* TODO */
25559+ }
25560+ }
25561+ }
25562+ }
25563+
25564+ break;
25565+ }
25566+
25567+ case _moveResizeWindow_func:
25568+ {
25569+ int *params = (int *) args[1];
25570+ ClientGLXDrawable client_drawable = to_drawable(args[0]);
25571+
25572+ if (display_function_call)
25573+ fprintf(stderr, "client_drawable=%p\n",
25574+ (void *) client_drawable);
25575+
25576+ GLXDrawable drawable =
25577+ get_association_clientdrawable_serverdrawable(
25578+ process, client_drawable);
25579+ if (drawable) {
25580+ WindowPosStruct pos;
25581+
25582+ _get_window_pos(dpy, drawable, &pos);
25583+ if (!
25584+ (params[0] == pos.x && params[1] == pos.y &&
25585+ params[2] == pos.width && params[3] == pos.height)) {
25586+ int redim = !(params[2] == pos.width &&
25587+ params[3] == pos.height);
25588+ active_win_x = params[0];
25589+ active_win_y = params[1];
25590+
25591+ fprintf(stderr, "old x=%d y=%d width=%d height=%d\n",
25592+ pos.x, pos.y, pos.width, pos.height);
25593+ fprintf(stderr, "new x=%d y=%d width=%d height=%d\n",
25594+ params[0], params[1], params[2], params[3]);
25595+ XMoveResizeWindow(dpy, drawable, params[0], params[1],
25596+ params[2], params[3]);
25597+ int loop = 0; // = 1
25598+
25599+ while (loop) {
25600+ while (XPending(dpy) > 0) {
25601+ XEvent event;
25602+
25603+ XNextEvent(dpy, &event);
25604+ switch (event.type) {
25605+ case ConfigureNotify:
25606+ {
25607+ if (((XConfigureEvent *) &event)->
25608+ window == drawable) {
25609+ loop = 0;
25610+ }
25611+ break;
25612+ }
25613+ }
25614+ }
25615+ }
25616+ /* The window should have resized by now, but force the
25617+ * new size anyway. */
25618+ _get_window_pos(dpy, drawable, &pos);
25619+ pos.width = params[2];
25620+ pos.height = params[3];
25621+ process->currentDrawablePos = pos;
25622+ // if (getenv("FORCE_GL_VIEWPORT"))
25623+ if (redim)
25624+ glViewport(0, 0, pos.width, pos.height);
25625+ }
25626+ }
25627+ break;
25628+ }
25629+
25630+ case _send_cursor_func:
25631+ {
25632+#if 0
25633+ int x = args[0];
25634+ int y = args[1];
25635+ int width = args[2];
25636+ int height = args[3];
25637+ int xhot = args[4];
25638+ int yhot = args[5];
25639+ int *pixels = (int *) args[6];
25640+
25641+ client_cursor.x = x;
25642+ client_cursor.y = y;
25643+ client_cursor.width = width;
25644+ client_cursor.height = height;
25645+ client_cursor.xhot = xhot;
25646+ client_cursor.yhot = yhot;
25647+ if (pixels) {
25648+ client_cursor.pixels =
25649+ realloc(client_cursor.pixels,
25650+ client_cursor.width * client_cursor.height *
25651+ sizeof(int));
25652+ memcpy(client_cursor.pixels, pixels,
25653+ client_cursor.width * client_cursor.height *
25654+ sizeof(int));
25655+ }
25656+ int in_window = (x >= 0 && y >= 0 &&
25657+ x < process->currentDrawablePos.width &&
25658+ y < process->currentDrawablePos.height);
25659+ // fprintf(stderr, "cursor at %d %d (%s)\n", x, y, (in_window) ?
25660+ // "in window" : "not in window");
25661+#endif
25662+ break;
25663+ }
25664+
25665+#ifdef BUFFER_BEGINEND
25666+ case glBegin_func:
25667+ process->began = 1;
25668+ process->primitive = args[0];
25669+ break;
25670+#endif
25671+
25672+ case glXWaitGL_func:
25673+ {
25674+ glXWaitGL();
25675+ ret_int = 0;
25676+ break;
25677+ }
25678+
25679+ case glXWaitX_func:
25680+ {
25681+ glXWaitX();
25682+ ret_int = 0;
25683+ break;
25684+ }
25685+
25686+ case glXChooseVisual_func:
25687+ {
25688+ ret_int = glXChooseVisualFunc(dpy, (int *) args[2]);
25689+ break;
25690+ }
25691+
25692+ case glXQueryExtensionsString_func:
25693+ {
25694+ ret_str = glXQueryExtensionsString(dpy, 0);
25695+ break;
25696+ }
25697+
25698+ case glXQueryServerString_func:
25699+ {
25700+ ret_str = glXQueryServerString(dpy, 0, args[2]);
25701+ break;
25702+ }
25703+
25704+ case glXGetClientString_func:
25705+ {
25706+ ret_str = glXGetClientString(dpy, args[1]);
25707+ break;
25708+ }
25709+
25710+ case glXGetScreenDriver_func:
25711+ {
25712+ GET_EXT_PTR(const char *, glXGetScreenDriver, (Display *, int));
25713+
25714+ ret_str = ptr_func_glXGetScreenDriver(dpy, 0);
25715+ break;
25716+ }
25717+
25718+ case glXGetDriverConfig_func:
25719+ {
25720+ GET_EXT_PTR(const char *, glXGetDriverConfig, (const char *));
25721+
25722+ ret_str = ptr_func_glXGetDriverConfig((const char *) args[0]);
25723+ break;
25724+ }
25725+
25726+ case glXCreateContext_func:
25727+ {
25728+ int visualid = (int) args[1];
25729+ int fake_shareList = (int) args[2];
25730+
25731+ if (1 || display_function_call)
25732+ fprintf(stderr, "visualid=%d, fake_shareList=%d\n", visualid,
25733+ fake_shareList);
25734+
25735+ GLXContext shareList = get_association_fakecontext_glxcontext(
25736+ process, fake_shareList);
25737+ XVisualInfo *vis = get_visual_info_from_visual_id(dpy, visualid);
25738+ GLXContext ctxt;
25739+
25740+ if (vis) {
25741+ ctxt = glXCreateContext(dpy, vis, shareList, args[3]);
25742+ } else {
25743+ vis = get_default_visual(dpy);
25744+ int saved_visualid = vis->visualid;
25745+
25746+ vis->visualid = visualid ?: saved_visualid;
25747+ ctxt = glXCreateContext(dpy, vis, shareList, args[3]);
25748+ vis->visualid = saved_visualid;
25749+ }
25750+
25751+ if (ctxt) {
25752+ int fake_ctxt =++ process->next_available_context_number;
25753+
25754+ set_association_fakecontext_visual(process, fake_ctxt, vis);
25755+ set_association_fakecontext_glxcontext(process,
25756+ fake_ctxt, ctxt);
25757+ ret_int = fake_ctxt;
25758+
25759+ _create_context(process, ctxt, fake_ctxt, shareList,
25760+ fake_shareList);
25761+ } else {
25762+ ret_int = 0;
25763+ }
25764+
25765+ break;
25766+ }
25767+
25768+
25769+ case glXCreateNewContext_func:
25770+ {
25771+ GET_EXT_PTR(GLXContext, glXCreateNewContext,
25772+ (Display *, GLXFBConfig, int, GLXContext, int));
25773+ int client_fbconfig = args[1];
25774+
25775+ ret_int = 0;
25776+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
25777+
25778+ if (fbconfig) {
25779+ int fake_shareList = args[3];
25780+ GLXContext shareList = get_association_fakecontext_glxcontext(
25781+ process, fake_shareList);
25782+ process->next_available_context_number++;
25783+ int fake_ctxt = process->next_available_context_number;
25784+ GLXContext ctxt = ptr_func_glXCreateNewContext(
25785+ dpy, fbconfig, args[2], shareList, args[4]);
25786+ set_association_fakecontext_glxcontext(
25787+ process, fake_ctxt, ctxt);
25788+ ret_int = fake_ctxt;
25789+
25790+ _create_context(process, ctxt, fake_ctxt, shareList,
25791+ fake_shareList);
25792+ }
25793+ break;
25794+ }
25795+
25796+ case glXCopyContext_func:
25797+ {
25798+ int fake_src_ctxt = (int) args[1];
25799+ int fake_dst_ctxt = (int) args[2];
25800+ GLXContext src_ctxt;
25801+ GLXContext dst_ctxt;
25802+
25803+ if (display_function_call)
25804+ fprintf(stderr, "fake_src_ctxt=%i, fake_dst_ctxt=%i\n",
25805+ fake_src_ctxt, fake_dst_ctxt);
25806+
25807+ if (!(src_ctxt = get_association_fakecontext_glxcontext(
25808+ process, fake_src_ctxt)))
25809+ fprintf(stderr, "invalid fake_src_ctxt (%i) !\n",
25810+ fake_src_ctxt);
25811+ else
25812+ if (!(dst_ctxt = get_association_fakecontext_glxcontext(
25813+ process, fake_dst_ctxt))) {
25814+ fprintf(stderr, "invalid fake_dst_ctxt (%i) !\n",
25815+ fake_dst_ctxt);
25816+ } else
25817+ glXCopyContext(dpy, src_ctxt, dst_ctxt, args[3]);
25818+
25819+ break;
25820+ }
25821+
25822+ case glXDestroyContext_func:
25823+ {
25824+ int fake_ctxt = (int) args[1];
25825+
25826+ if (display_function_call)
25827+ fprintf(stderr, "fake_ctxt=%d\n", fake_ctxt);
25828+
25829+ GLXContext ctxt = get_association_fakecontext_glxcontext(
25830+ process, fake_ctxt);
25831+ if (ctxt == NULL) {
25832+ fprintf(stderr, "invalid fake_ctxt (%p) !\n",
25833+ (void *) (long) fake_ctxt);
25834+ } else {
25835+ int i;
25836+
25837+ for (i = 0; i < process->nb_states; i ++) {
25838+ if (process->glstates[i]->fake_ctxt == fake_ctxt) {
25839+ if (ctxt == process->current_state->context)
25840+ process->current_state = &process->default_state;
25841+
25842+ int fake_shareList =
25843+ process->glstates[i]->fake_shareList;
25844+ process->glstates[i]->ref--;
25845+ if (process->glstates[i]->ref == 0) {
25846+ fprintf(stderr,
25847+ "destroy_gl_state fake_ctxt = %d\n",
25848+ process->glstates[i]->fake_ctxt);
25849+ destroy_gl_state(process->glstates[i]);
25850+ free(process->glstates[i]);
25851+ memmove(&process->glstates[i],
25852+ &process->glstates[i + 1],
25853+ (process->nb_states - i - 1) *
25854+ sizeof(GLState *));
25855+ process->nb_states --;
25856+ }
25857+
25858+ if (fake_shareList) {
25859+ for (i = 0; i < process->nb_states; i++) {
25860+ if (process->glstates[i]->fake_ctxt ==
25861+ fake_shareList) {
25862+ process->glstates[i]->ref--;
25863+ if (process->glstates[i]->ref == 0) {
25864+ fprintf(stderr,
25865+ "destroy_gl_state fake_ctxt = %d\n",
25866+ process->glstates[i]->
25867+ fake_ctxt);
25868+ destroy_gl_state(process->
25869+ glstates[i]);
25870+ free(process->glstates[i]);
25871+ memmove(&process->glstates[i],
25872+ &process->glstates[i + 1],
25873+ (process->nb_states - i - 1) *
25874+ sizeof(GLState *));
25875+ process->nb_states --;
25876+ }
25877+ break;
25878+ }
25879+ }
25880+ }
25881+
25882+ glXDestroyContext(dpy, ctxt);
25883+ unset_association_fakecontext_glxcontext(
25884+ process, fake_ctxt);
25885+
25886+ break;
25887+ }
25888+ }
25889+ }
25890+ break;
25891+ }
25892+
25893+ case glXQueryVersion_func:
25894+ {
25895+ ret_int = glXQueryVersion(dpy, (int *) args[1], (int *) args[2]);
25896+ break;
25897+ }
25898+
25899+ case glGetString_func:
25900+ {
25901+ ret_str = (char *) glGetString(args[0]);
25902+ break;
25903+ }
25904+
25905+ case glXMakeCurrent_func:
25906+ {
25907+ int i;
25908+ ClientGLXDrawable client_drawable = to_drawable(args[1]);
25909+ GLXDrawable drawable = 0;
25910+ int fake_ctxt = (int) args[2];
25911+
25912+ if (display_function_call)
25913+ fprintf(stderr, "client_drawable=%p fake_ctx=%d\n",
25914+ (void *) client_drawable, fake_ctxt);
25915+
25916+ if (client_drawable == 0 && fake_ctxt == 0) {
25917+ ret_int = glXMakeCurrent(dpy, 0, NULL);
25918+ process->current_state = &process->default_state;
25919+ } else if ((drawable = (GLXDrawable)
25920+ get_association_fakepbuffer_pbuffer(
25921+ process, client_drawable))) {
25922+ GLXContext ctxt = get_association_fakecontext_glxcontext(
25923+ process, fake_ctxt);
25924+ if (ctxt == NULL) {
25925+ fprintf(stderr, "invalid fake_ctxt (%d) (*)!\n",
25926+ fake_ctxt);
25927+ ret_int = 0;
25928+ } else
25929+ ret_int = glXMakeCurrent(dpy, drawable, ctxt);
25930+ } else {
25931+ GLXContext ctxt = get_association_fakecontext_glxcontext(
25932+ process, fake_ctxt);
25933+ if (ctxt == NULL) {
25934+ fprintf(stderr, "invalid fake_ctxt (%d)!\n", fake_ctxt);
25935+ ret_int = 0;
25936+ } else {
25937+ drawable = get_association_clientdrawable_serverdrawable(
25938+ process, client_drawable);
25939+ if (drawable == 0) {
25940+ XVisualInfo *vis = get_association_fakecontext_visual(
25941+ process, fake_ctxt);
25942+ if (vis == NULL)
25943+ vis = get_default_visual(dpy);
25944+ /* if (local_connection) drawable = client_drawable;
25945+ * else */
25946+ {
25947+ if ((int) (long) client_drawable ==
25948+ RootWindow(dpy, 0) &&
25949+ local_connection) {
25950+ drawable = (GLXDrawable) client_drawable;
25951+ } else {
25952+ drawable = create_window(
25953+ dpy, local_connection ?
25954+ (Window) client_drawable :
25955+ 0, vis, "", 0, 0, 16, 16);
25956+ }
25957+ }
25958+ set_association_clientdrawable_serverdrawable(process,
25959+ client_drawable, drawable);
25960+ }
25961+
25962+ ret_int = glXMakeCurrent(dpy, drawable, ctxt);
25963+ }
25964+ }
25965+
25966+ if (ret_int) {
25967+ for (i = 0; i < process->nb_states; i ++) {
25968+ if (process->glstates[i]->fake_ctxt == fake_ctxt) {
25969+ /* HACK !!! REMOVE */
25970+ process->current_state = process->glstates[i];
25971+ process->current_state->drawable = drawable;
25972+ break;
25973+ }
25974+ }
25975+
25976+ if (i == process->nb_states) {
25977+ fprintf(stderr, "error remembering the new context\n");
25978+ exit(-1);
25979+ }
25980+ }
25981+ break;
25982+ }
25983+
25984+ case glXSwapBuffers_func:
25985+ {
25986+ ClientGLXDrawable client_drawable = to_drawable(args[1]);
25987+
25988+ if (display_function_call)
25989+ fprintf(stderr, "client_drawable=%p\n", client_drawable);
25990+
25991+ GLXDrawable drawable =
25992+ get_association_clientdrawable_serverdrawable(
25993+ process, client_drawable);
25994+ if (!drawable) {
25995+ fprintf(stderr, "unknown client_drawable (%p) !\n",
25996+ (void *) client_drawable);
25997+ } else {
25998+#ifdef CURSOR_TRICK
25999+ if (client_cursor.pixels && local_connection == 0) {
26000+ glPushAttrib(GL_ALL_ATTRIB_BITS);
26001+ glPushClientAttrib(GL_ALL_ATTRIB_BITS);
26002+
26003+ glMatrixMode(GL_PROJECTION);
26004+ glPushMatrix();
26005+ glLoadIdentity();
26006+ glOrtho(0, process->currentDrawablePos.width,
26007+ process->currentDrawablePos.height, 0, -1, 1);
26008+ glMatrixMode(GL_MODELVIEW);
26009+ glPushMatrix();
26010+ glLoadIdentity();
26011+ glPixelZoom(1, -1);
26012+
26013+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
26014+ glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
26015+ glPixelStorei(GL_UNPACK_SWAP_BYTES, 0);
26016+ glPixelStorei(GL_UNPACK_LSB_FIRST, 0);
26017+ glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
26018+ glShadeModel(GL_SMOOTH);
26019+
26020+ glEnable(GL_BLEND);
26021+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
26022+ glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
26023+
26024+ int i, numUnits;
26025+
26026+ glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &numUnits);
26027+ for (i = 0; i < numUnits; i++) {
26028+ do_glActiveTextureARB(GL_TEXTURE0_ARB + i);
26029+ glDisable(GL_TEXTURE_1D);
26030+ glDisable(GL_TEXTURE_2D);
26031+ glDisable(GL_TEXTURE_3D);
26032+ }
26033+ glDisable(GL_ALPHA_TEST);
26034+ glDisable(GL_DEPTH_TEST);
26035+ glDisable(GL_STENCIL_TEST);
26036+ glDisable(GL_SCISSOR_TEST);
26037+ glDisable(GL_FRAGMENT_PROGRAM_ARB);
26038+ glDisable(GL_VERTEX_PROGRAM_ARB);
26039+ do_glUseProgramObjectARB(0);
26040+
26041+ // memset(client_cursor.pixels, 255, client_cursor.width
26042+ // * client_cursor.height * sizeof(int));
26043+
26044+ glRasterPos2d(client_cursor.x - client_cursor.xhot,
26045+ client_cursor.y - client_cursor.yhot);
26046+ glDrawPixels(client_cursor.width, client_cursor.height,
26047+ GL_BGRA, GL_UNSIGNED_BYTE,
26048+ client_cursor.pixels);
26049+
26050+ glMatrixMode(GL_MODELVIEW);
26051+ glPopMatrix();
26052+
26053+ glMatrixMode(GL_PROJECTION);
26054+ glPopMatrix();
26055+
26056+ glPopClientAttrib();
26057+ glPopAttrib();
26058+ }
26059+#endif
26060+
26061+ ////////// HORRIBLE HORRIBLE HACK
26062+ if (drawable != active_win && active_win) {
26063+ glXMakeCurrent(dpy, active_win,
26064+ processes[0].current_state->context);
26065+ glXSwapBuffers(dpy, active_win);
26066+ glXMakeCurrent(dpy, process->current_state->drawable,
26067+ process->current_state->context);
26068+ }
26069+ glXSwapBuffers(dpy, drawable);
26070+ }
26071+ break;
26072+ }
26073+
26074+ case glXIsDirect_func:
26075+ {
26076+ int fake_ctxt = (int) args[1];
26077+
26078+ if (display_function_call)
26079+ fprintf(stderr, "fake_ctx=%x\n", fake_ctxt);
26080+ GLXContext ctxt =
26081+ get_association_fakecontext_glxcontext(process, fake_ctxt);
26082+ if (ctxt == NULL) {
26083+ fprintf(stderr, "invalid fake_ctxt (%x) !\n", fake_ctxt);
26084+ ret_char = False;
26085+ } else {
26086+ ret_char = glXIsDirect(dpy, ctxt);
26087+ }
26088+ break;
26089+ }
26090+
26091+ case glXGetConfig_func:
26092+ {
26093+ int visualid = args[1];
26094+ XVisualInfo *vis = NULL;
26095+
26096+ if (visualid)
26097+ vis = get_visual_info_from_visual_id(dpy, visualid);
26098+ if (vis == NULL)
26099+ vis = get_default_visual(dpy);
26100+ ret_int = glXGetConfig(dpy, vis, args[2], (int *) args[3]);
26101+ break;
26102+ }
26103+
26104+ case glXGetConfig_extended_func:
26105+ {
26106+ int visualid = args[1];
26107+ int n = args[2];
26108+ int i;
26109+ XVisualInfo *vis = NULL;
26110+ int *attribs = (int *) args[3];
26111+ int *values = (int *) args[4];
26112+ int *res = (int *) args[5];
26113+
26114+ if (visualid)
26115+ vis = get_visual_info_from_visual_id(dpy, visualid);
26116+ if (vis == NULL)
26117+ vis = get_default_visual(dpy);
26118+
26119+ for (i = 0; i < n; i++) {
26120+ res[i] = glXGetConfig(dpy, vis, attribs[i], &values[i]);
26121+ }
26122+ break;
26123+ }
26124+
26125+ case glXUseXFont_func:
26126+ {
26127+ /* implementation is client-side only :-) */
26128+ break;
26129+ }
26130+
26131+ case glXQueryExtension_func:
26132+ {
26133+ ret_int =
26134+ glXQueryExtension(dpy, (int *) args[1], (int *) args[2]);
26135+ break;
26136+ }
26137+
26138+ case glXChooseFBConfig_func:
26139+ {
26140+ GET_EXT_PTR(GLXFBConfig *, glXChooseFBConfig,
26141+ (Display *, int, int *, int *));
26142+ if (process->nfbconfig == MAX_FBCONFIG) {
26143+ *(int *) args[3] = 0;
26144+ ret_int = 0;
26145+ } else {
26146+ GLXFBConfig *fbconfigs =
26147+ ptr_func_glXChooseFBConfig(dpy, args[1], (int *) args[2],
26148+ (int *) args[3]);
26149+ if (fbconfigs) {
26150+ process->fbconfigs[process->nfbconfig] = fbconfigs;
26151+ process->fbconfigs_max[process->nfbconfig] =
26152+ *(int *) args[3];
26153+ process->nfbconfig++;
26154+ ret_int = 1 + process->nfbconfig_total;
26155+ process->nfbconfig_total +=
26156+ process->fbconfigs_max[process->nfbconfig];
26157+ } else {
26158+ ret_int = 0;
26159+ }
26160+ }
26161+ break;
26162+ }
26163+
26164+ case glXChooseFBConfigSGIX_func:
26165+ {
26166+ GET_EXT_PTR(GLXFBConfigSGIX *, glXChooseFBConfigSGIX,
26167+ (Display *, int, int *, int *));
26168+ if (process->nfbconfig == MAX_FBCONFIG) {
26169+ *(int *) args[3] = 0;
26170+ ret_int = 0;
26171+ } else {
26172+ GLXFBConfigSGIX *fbconfigs =
26173+ ptr_func_glXChooseFBConfigSGIX(dpy, args[1],
26174+ (int *) args[2],
26175+ (int *) args[3]);
26176+ if (fbconfigs) {
26177+ process->fbconfigs[process->nfbconfig] = fbconfigs;
26178+ process->fbconfigs_max[process->nfbconfig] =
26179+ *(int *) args[3];
26180+ process->nfbconfig++;
26181+ ret_int = 1 + process->nfbconfig_total;
26182+ process->nfbconfig_total +=
26183+ process->fbconfigs_max[process->nfbconfig];
26184+ } else {
26185+ ret_int = 0;
26186+ }
26187+ }
26188+ break;
26189+ }
26190+
26191+ case glXGetFBConfigs_func:
26192+ {
26193+ GET_EXT_PTR(GLXFBConfig *, glXGetFBConfigs,
26194+ (Display *, int, int *));
26195+ if (process->nfbconfig == MAX_FBCONFIG) {
26196+ *(int *) args[2] = 0;
26197+ ret_int = 0;
26198+ } else {
26199+ GLXFBConfig *fbconfigs =
26200+ ptr_func_glXGetFBConfigs(dpy, args[1], (int *) args[2]);
26201+ if (fbconfigs) {
26202+ process->fbconfigs[process->nfbconfig] = fbconfigs;
26203+ process->fbconfigs_max[process->nfbconfig] =
26204+ *(int *) args[2];
26205+ process->nfbconfig++;
26206+ ret_int = 1 + process->nfbconfig_total;
26207+ process->nfbconfig_total +=
26208+ process->fbconfigs_max[process->nfbconfig];
26209+ } else {
26210+ ret_int = 0;
26211+ }
26212+ }
26213+ break;
26214+ }
26215+
26216+ case glXCreatePbuffer_func:
26217+ {
26218+ GET_EXT_PTR(GLXPbuffer, glXCreatePbuffer,
26219+ (Display *, GLXFBConfig, int *));
26220+ int client_fbconfig = args[1];
26221+
26222+ ret_int = 0;
26223+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26224+
26225+ if (fbconfig) {
26226+ GLXPbuffer pbuffer =
26227+ ptr_func_glXCreatePbuffer(dpy, fbconfig, (int *) args[2]);
26228+ fprintf(stderr, "glXCreatePbuffer --> %x\n", (int) pbuffer);
26229+ if (pbuffer) {
26230+ ClientGLXDrawable fake_pbuffer = to_drawable(
26231+ ++ process->next_available_pbuffer_number);
26232+
26233+ set_association_fakepbuffer_pbuffer(
26234+ process, fake_pbuffer, pbuffer);
26235+ fprintf(stderr,
26236+ "set_association_fakepbuffer_pbuffer(%p, %x)\n",
26237+ fake_pbuffer, (int) (long) pbuffer);
26238+ ret_int = (int) (long) fake_pbuffer;
26239+ }
26240+ }
26241+ break;
26242+ }
26243+
26244+ case glXCreateGLXPbufferSGIX_func:
26245+ {
26246+ GET_EXT_PTR(GLXPbufferSGIX, glXCreateGLXPbufferSGIX,
26247+ (Display *, GLXFBConfig, int, int, int *));
26248+ int client_fbconfig = args[1];
26249+
26250+ ret_int = 0;
26251+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26252+
26253+ if (fbconfig) {
26254+ GLXPbufferSGIX pbuffer = ptr_func_glXCreateGLXPbufferSGIX(
26255+ dpy, fbconfig,
26256+ args[2], args[3], (int *) args[4]);
26257+ if (pbuffer) {
26258+ ClientGLXDrawable fake_pbuffer = to_drawable(
26259+ ++ process->next_available_pbuffer_number);
26260+
26261+ set_association_fakepbuffer_pbuffer(
26262+ process, fake_pbuffer, pbuffer);
26263+ ret_int = (int) (long) fake_pbuffer;
26264+ }
26265+ }
26266+ break;
26267+ }
26268+
26269+ case glXDestroyPbuffer_func:
26270+ {
26271+ GET_EXT_PTR(void, glXDestroyPbuffer, (Display *, GLXPbuffer));
26272+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26273+
26274+ if (display_function_call)
26275+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26276+
26277+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26278+ process, fake_pbuffer);
26279+ if (pbuffer == 0) {
26280+ fprintf(stderr, "invalid fake_pbuffer (%p) !\n",
26281+ fake_pbuffer);
26282+ } else {
26283+ if (!is_gl_vendor_ati(dpy))
26284+ ptr_func_glXDestroyPbuffer(dpy, pbuffer);
26285+ unset_association_fakepbuffer_pbuffer(process, fake_pbuffer);
26286+ }
26287+ break;
26288+ }
26289+
26290+ case glXDestroyGLXPbufferSGIX_func:
26291+ {
26292+ GET_EXT_PTR(void, glXDestroyGLXPbufferSGIX,
26293+ (Display *, GLXPbuffer));
26294+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26295+
26296+ if (display_function_call)
26297+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26298+
26299+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26300+ process, fake_pbuffer);
26301+ if (pbuffer == 0) {
26302+ fprintf(stderr, "invalid fake_pbuffer (%p) !\n",
26303+ fake_pbuffer);
26304+ } else {
26305+ if (!is_gl_vendor_ati(dpy))
26306+ ptr_func_glXDestroyGLXPbufferSGIX(dpy, pbuffer);
26307+ unset_association_fakepbuffer_pbuffer(process, fake_pbuffer);
26308+ }
26309+ break;
26310+ }
26311+
26312+ case glXBindTexImageATI_func:
26313+ {
26314+ GET_EXT_PTR(void, glXBindTexImageATI,
26315+ (Display *, GLXPbuffer, int));
26316+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26317+
26318+ if (display_function_call)
26319+ fprintf(stderr, "fake_pbuffer=%p\n",
26320+ fake_pbuffer);
26321+
26322+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26323+ process, fake_pbuffer);
26324+ if (pbuffer == 0) {
26325+ fprintf(stderr,
26326+ "glXBindTexImageATI : invalid fake_pbuffer (%p) !\n",
26327+ fake_pbuffer);
26328+ } else {
26329+ ptr_func_glXBindTexImageATI(dpy, pbuffer, args[2]);
26330+ }
26331+ break;
26332+ }
26333+
26334+ case glXReleaseTexImageATI_func:
26335+ {
26336+ GET_EXT_PTR(void, glXReleaseTexImageATI,
26337+ (Display *, GLXPbuffer, int));
26338+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26339+
26340+ if (display_function_call)
26341+ fprintf(stderr, "fake_pbuffer=%d\n",
26342+ (int) (long) fake_pbuffer);
26343+
26344+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26345+ process, fake_pbuffer);
26346+ if (pbuffer == 0) {
26347+ fprintf(stderr,
26348+ "glXReleaseTexImageATI : invalid fake_pbuffer (%d) !\n",
26349+ (int) (long) fake_pbuffer);
26350+ } else {
26351+ ptr_func_glXReleaseTexImageATI(dpy, pbuffer, args[2]);
26352+ }
26353+ break;
26354+ }
26355+
26356+ case glXBindTexImageARB_func:
26357+ {
26358+ GET_EXT_PTR(Bool, glXBindTexImageARB,
26359+ (Display *, GLXPbuffer, int));
26360+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26361+
26362+ if (display_function_call)
26363+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26364+
26365+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26366+ process, fake_pbuffer);
26367+ if (pbuffer == 0) {
26368+ fprintf(stderr,
26369+ "glXBindTexImageARB : invalid fake_pbuffer (%p) !\n",
26370+ fake_pbuffer);
26371+ ret_int = 0;
26372+ } else {
26373+ ret_int = ptr_func_glXBindTexImageARB(dpy, pbuffer, args[2]);
26374+ }
26375+ break;
26376+ }
26377+
26378+ case glXReleaseTexImageARB_func:
26379+ {
26380+ GET_EXT_PTR(Bool, glXReleaseTexImageARB,
26381+ (Display *, GLXPbuffer, int));
26382+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26383+
26384+ if (display_function_call)
26385+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26386+
26387+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26388+ process, fake_pbuffer);
26389+ if (pbuffer == 0) {
26390+ fprintf(stderr,
26391+ "glXReleaseTexImageARB : invalid fake_pbuffer (%p) !\n",
26392+ fake_pbuffer);
26393+ ret_int = 0;
26394+ } else {
26395+ ret_int =
26396+ ptr_func_glXReleaseTexImageARB(dpy, pbuffer, args[2]);
26397+ }
26398+ break;
26399+ }
26400+
26401+ case glXGetFBConfigAttrib_func:
26402+ {
26403+ GET_EXT_PTR(int, glXGetFBConfigAttrib,
26404+ (Display *, GLXFBConfig, int, int *));
26405+ int client_fbconfig = args[1];
26406+
26407+ ret_int = 0;
26408+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26409+
26410+ if (fbconfig)
26411+ ret_int =
26412+ ptr_func_glXGetFBConfigAttrib(dpy, fbconfig, args[2],
26413+ (int *) args[3]);
26414+ break;
26415+ }
26416+
26417+ case glXGetFBConfigAttrib_extended_func:
26418+ {
26419+ GET_EXT_PTR(int, glXGetFBConfigAttrib,
26420+ (Display *, GLXFBConfig, int, int *));
26421+ int client_fbconfig = args[1];
26422+ int n = args[2];
26423+ int i;
26424+ int *attribs = (int *) args[3];
26425+ int *values = (int *) args[4];
26426+ int *res = (int *) args[5];
26427+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26428+
26429+ for (i = 0; i < n; i++) {
26430+ if (fbconfig) {
26431+ res[i] =
26432+ ptr_func_glXGetFBConfigAttrib(dpy, fbconfig,
26433+ attribs[i], &values[i]);
26434+ } else {
26435+ res[i] = 0;
26436+ }
26437+ }
26438+ break;
26439+ }
26440+
26441+ case glXGetFBConfigAttribSGIX_func:
26442+ {
26443+ GET_EXT_PTR(int, glXGetFBConfigAttribSGIX,
26444+ (Display *, GLXFBConfigSGIX, int, int *));
26445+ int client_fbconfig = args[1];
26446+
26447+ ret_int = 0;
26448+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26449+
26450+ if (fbconfig)
26451+ ret_int =
26452+ ptr_func_glXGetFBConfigAttribSGIX(dpy,
26453+ (GLXFBConfigSGIX)
26454+ fbconfig, args[2],
26455+ (int *) args[3]);
26456+ break;
26457+ }
26458+
26459+ case glXQueryContext_func:
26460+ {
26461+ GET_EXT_PTR(int, glXQueryContext,
26462+ (Display *, GLXContext, int, int *));
26463+ int fake_ctxt = (int) args[1];
26464+
26465+ if (display_function_call)
26466+ fprintf(stderr, "fake_ctx=%i\n", fake_ctxt);
26467+ GLXContext ctxt =
26468+ get_association_fakecontext_glxcontext(process, fake_ctxt);
26469+ if (ctxt == NULL) {
26470+ fprintf(stderr, "invalid fake_ctxt (%i) !\n", fake_ctxt);
26471+ ret_int = 0;
26472+ } else {
26473+ ret_int =
26474+ ptr_func_glXQueryContext(dpy, ctxt, args[2],
26475+ (int *) args[3]);
26476+ }
26477+ break;
26478+ }
26479+
26480+ case glXQueryDrawable_func:
26481+ {
26482+ GET_EXT_PTR(void, glXQueryDrawable,
26483+ (Display *, GLXDrawable, int, int *));
26484+ ClientGLXDrawable client_drawable = to_drawable(args[1]);
26485+ GLXDrawable drawable =
26486+ get_association_clientdrawable_serverdrawable(
26487+ process, client_drawable);
26488+
26489+ if (display_function_call)
26490+ fprintf(stderr, "client_drawable=%p\n",
26491+ client_drawable);
26492+
26493+ if (!drawable)
26494+ fprintf(stderr, "invalid client_drawable (%p) !\n",
26495+ client_drawable);
26496+ else
26497+ ptr_func_glXQueryDrawable(dpy, drawable,
26498+ args[2], (int *) args[3]);
26499+
26500+ break;
26501+ }
26502+
26503+ case glXQueryGLXPbufferSGIX_func:
26504+ {
26505+ GET_EXT_PTR(int, glXQueryGLXPbufferSGIX,
26506+ (Display *, GLXFBConfigSGIX, int, int *));
26507+ int client_fbconfig = args[1];
26508+
26509+ ret_int = 0;
26510+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26511+
26512+ if (fbconfig)
26513+ ret_int = ptr_func_glXQueryGLXPbufferSGIX(dpy,
26514+ (GLXFBConfigSGIX) fbconfig,
26515+ args[2], (int *) args[3]);
26516+ break;
26517+ }
26518+
26519+ case glXCreateContextWithConfigSGIX_func:
26520+ {
26521+ GET_EXT_PTR(GLXContext, glXCreateContextWithConfigSGIX,
26522+ (Display *, GLXFBConfigSGIX, int, GLXContext, int));
26523+ int client_fbconfig = args[1];
26524+
26525+ ret_int = 0;
26526+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26527+
26528+ if (fbconfig) {
26529+ GLXContext shareList = get_association_fakecontext_glxcontext(
26530+ process, (int) args[3]);
26531+ process->next_available_context_number++;
26532+ int fake_ctxt = process->next_available_context_number;
26533+ GLXContext ctxt = ptr_func_glXCreateContextWithConfigSGIX(
26534+ dpy, (GLXFBConfigSGIX) fbconfig, args[2],
26535+ shareList, args[4]);
26536+ set_association_fakecontext_glxcontext(
26537+ process, fake_ctxt, ctxt);
26538+ ret_int = fake_ctxt;
26539+ }
26540+ break;
26541+ }
26542+
26543+ case glXGetVisualFromFBConfig_func:
26544+ {
26545+ GET_EXT_PTR(XVisualInfo *, glXGetVisualFromFBConfig,
26546+ (Display *, GLXFBConfig));
26547+ int client_fbconfig = args[1];
26548+
26549+ ret_int = 0;
26550+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26551+
26552+ if (fbconfig) {
26553+ XVisualInfo *vis =
26554+ ptr_func_glXGetVisualFromFBConfig(dpy, fbconfig);
26555+ ret_int = (vis) ? vis->visualid : 0;
26556+ if (vis) {
26557+ tabAssocAttribListVisual =
26558+ realloc(tabAssocAttribListVisual,
26559+ sizeof(AssocAttribListVisual) *
26560+ (nTabAssocAttribListVisual + 1));
26561+ tabAssocAttribListVisual[nTabAssocAttribListVisual].
26562+ attribListLength = 0;
26563+ tabAssocAttribListVisual[nTabAssocAttribListVisual].
26564+ attribList = NULL;
26565+ tabAssocAttribListVisual[nTabAssocAttribListVisual].
26566+ visInfo = vis;
26567+ nTabAssocAttribListVisual++;
26568+ }
26569+ if (display_function_call)
26570+ fprintf(stderr, "visualid = %d\n", ret_int);
26571+ }
26572+ break;
26573+ }
26574+
26575+ case glXSwapIntervalSGI_func:
26576+ {
26577+ GET_EXT_PTR(int, glXSwapIntervalSGI, (int));
26578+
26579+ ret_int = ptr_func_glXSwapIntervalSGI(args[0]);
26580+ break;
26581+ }
26582+
26583+ case glXGetProcAddress_fake_func:
26584+ {
26585+ if (display_function_call)
26586+ fprintf(stderr, "%s\n", (char *) args[0]);
26587+ ret_int = glXGetProcAddressARB((const GLubyte *) args[0]) != NULL;
26588+ break;
26589+ }
26590+
26591+ case glXGetProcAddress_global_fake_func:
26592+ {
26593+ int nbElts = args[0];
26594+ char *huge_buffer = (char *) args[1];
26595+ char *result = (char *) args[2];
26596+ int i;
26597+
26598+ for (i = 0; i < nbElts; i++) {
26599+ int len = strlen(huge_buffer);
26600+
26601+ result[i] =
26602+ glXGetProcAddressARB((const GLubyte *) huge_buffer) !=
26603+ NULL;
26604+ huge_buffer += len + 1;
26605+ }
26606+ break;
26607+ }
26608+
26609+/* Begin of texture stuff */
26610+ case glBindTexture_func:
26611+ case glBindTextureEXT_func:
26612+ {
26613+ int target = args[0];
26614+ unsigned int client_texture = args[1];
26615+ unsigned int server_texture;
26616+
26617+ if (client_texture == 0) {
26618+ glBindTexture(target, 0);
26619+ } else {
26620+ alloc_value(process->current_state->textureAllocator,
26621+ client_texture);
26622+ server_texture =
26623+ process->current_state->tabTextures[client_texture];
26624+ if (server_texture == 0) {
26625+ glGenTextures(1, &server_texture);
26626+ process->current_state->tabTextures[client_texture] =
26627+ server_texture;
26628+ }
26629+ glBindTexture(target, server_texture);
26630+ }
26631+ break;
26632+ }
26633+
26634+ case glGenTextures_fake_func:
26635+ {
26636+ GET_EXT_PTR(void, glGenTextures, (GLsizei n, GLuint *textures));
26637+ int i;
26638+ int n = args[0];
26639+ unsigned int *clientTabTextures = malloc(n * sizeof(int));
26640+ unsigned int *serverTabTextures = malloc(n * sizeof(int));
26641+
26642+ alloc_range(process->current_state->textureAllocator, n,
26643+ clientTabTextures);
26644+
26645+ ptr_func_glGenTextures(n, serverTabTextures);
26646+ for (i = 0; i < n; i++) {
26647+ process->current_state->tabTextures[clientTabTextures[i]] =
26648+ serverTabTextures[i];
26649+ }
26650+
26651+ free(clientTabTextures);
26652+ free(serverTabTextures);
26653+ break;
26654+ }
26655+
26656+
26657+ case glDeleteTextures_func:
26658+ {
26659+ GET_EXT_PTR(void, glDeleteTextures,
26660+ (GLsizei n, const GLuint *textures));
26661+ int i;
26662+ int n = args[0];
26663+ unsigned int *clientTabTextures = (unsigned int *) args[1];
26664+
26665+ delete_range(process->current_state->textureAllocator, n,
26666+ clientTabTextures);
26667+
26668+ unsigned int *serverTabTextures = malloc(n * sizeof(int));
26669+
26670+ for (i = 0; i < n; i++) {
26671+ serverTabTextures[i] =
26672+ get_server_texture(process, clientTabTextures[i]);
26673+ }
26674+ ptr_func_glDeleteTextures(n, serverTabTextures);
26675+ for (i = 0; i < n; i++) {
26676+ process->current_state->tabTextures[clientTabTextures[i]] = 0;
26677+ }
26678+ free(serverTabTextures);
26679+ break;
26680+ }
26681+
26682+ case glPrioritizeTextures_func:
26683+ {
26684+ GET_EXT_PTR(void, glPrioritizeTextures,
26685+ (GLsizei n, const GLuint *textures,
26686+ const GLclampf *priorities));
26687+
26688+ int i;
26689+ int n = args[0];
26690+ unsigned int *textures = (unsigned int *) args[1];
26691+
26692+ for (i = 0; i < n; i++) {
26693+ textures[i] = get_server_texture(process, textures[i]);
26694+ }
26695+ ptr_func_glPrioritizeTextures(n, textures,
26696+ (const GLclampf *) args[2]);
26697+ break;
26698+ }
26699+
26700+ case glAreTexturesResident_func:
26701+ {
26702+ GET_EXT_PTR(void, glAreTexturesResident,
26703+ (GLsizei n, const GLuint *textures,
26704+ GLboolean *residences));
26705+ int i;
26706+ int n = args[0];
26707+ unsigned int *textures = (unsigned int *) args[1];
26708+
26709+ for (i = 0; i < n; i++) {
26710+ textures[i] = get_server_texture(process, textures[i]);
26711+ }
26712+ ptr_func_glAreTexturesResident(n, textures,
26713+ (GLboolean *) args[2]);
26714+ break;
26715+ }
26716+
26717+ case glIsTexture_func:
26718+ case glIsTextureEXT_func:
26719+ {
26720+ GET_EXT_PTR(GLboolean, glIsTexture, (GLuint texture));
26721+ unsigned int client_texture = args[0];
26722+ unsigned int server_texture =
26723+ get_server_texture(process, client_texture);
26724+ if (server_texture)
26725+ ret_char = ptr_func_glIsTexture(server_texture);
26726+ else
26727+ ret_char = 0;
26728+ break;
26729+ }
26730+
26731+ case glFramebufferTexture1DEXT_func:
26732+ {
26733+ GET_EXT_PTR(void, glFramebufferTexture1DEXT,
26734+ (int, int, int, int, int));
26735+ unsigned int client_texture = args[3];
26736+ unsigned int server_texture =
26737+ get_server_texture(process, client_texture);
26738+ if (server_texture)
26739+ ptr_func_glFramebufferTexture1DEXT(args[0], args[1], args[2],
26740+ server_texture, args[4]);
26741+ break;
26742+ }
26743+
26744+ case glFramebufferTexture2DEXT_func:
26745+ {
26746+ GET_EXT_PTR(void, glFramebufferTexture2DEXT,
26747+ (int, int, int, int, int));
26748+ unsigned int client_texture = args[3];
26749+ unsigned int server_texture =
26750+ get_server_texture(process, client_texture);
26751+ if (server_texture)
26752+ ptr_func_glFramebufferTexture2DEXT(args[0], args[1], args[2],
26753+ server_texture, args[4]);
26754+ break;
26755+ }
26756+
26757+ case glFramebufferTexture3DEXT_func:
26758+ {
26759+ GET_EXT_PTR(void, glFramebufferTexture3DEXT,
26760+ (int, int, int, int, int, int));
26761+ unsigned int client_texture = args[3];
26762+ unsigned int server_texture =
26763+ get_server_texture(process, client_texture);
26764+ if (server_texture)
26765+ ptr_func_glFramebufferTexture3DEXT(args[0], args[1], args[2],
26766+ server_texture, args[4],
26767+ args[5]);
26768+ break;
26769+ }
26770+/* End of texture stuff */
26771+
26772+/* Begin of list stuff */
26773+ case glIsList_func:
26774+ {
26775+ unsigned int client_list = args[0];
26776+ unsigned int server_list = get_server_list(process, client_list);
26777+
26778+ if (server_list)
26779+ ret_char = glIsList(server_list);
26780+ else
26781+ ret_char = 0;
26782+ break;
26783+ }
26784+
26785+ case glDeleteLists_func:
26786+ {
26787+ int i;
26788+ unsigned int first_client = args[0];
26789+ int n = args[1];
26790+
26791+ unsigned int first_server =
26792+ get_server_list(process, first_client);
26793+ for (i = 0; i < n; i++) {
26794+ if (get_server_list(process, first_client + i) !=
26795+ first_server + i)
26796+ break;
26797+ }
26798+ if (i == n) {
26799+ glDeleteLists(first_server, n);
26800+ } else {
26801+ for (i = 0; i < n; i++) {
26802+ glDeleteLists(get_server_list(process, first_client + i),
26803+ 1);
26804+ }
26805+ }
26806+
26807+ for (i = 0; i < n; i++) {
26808+ process->current_state->tabLists[first_client + i] = 0;
26809+ }
26810+ delete_consecutive_values(process->current_state->listAllocator,
26811+ first_client, n);
26812+ break;
26813+ }
26814+
26815+ case glGenLists_fake_func:
26816+ {
26817+ int i;
26818+ int n = args[0];
26819+ unsigned int server_first = glGenLists(n);
26820+
26821+ if (server_first) {
26822+ unsigned int client_first =
26823+ alloc_range(process->current_state->listAllocator, n,
26824+ NULL);
26825+ for (i = 0; i < n; i++) {
26826+ process->current_state->tabLists[client_first + i] =
26827+ server_first + i;
26828+ }
26829+ }
26830+ break;
26831+ }
26832+
26833+ case glNewList_func:
26834+ {
26835+ unsigned int client_list = args[0];
26836+ int mode = args[1];
26837+
26838+ alloc_value(process->current_state->listAllocator, client_list);
26839+ unsigned int server_list = get_server_list(process, client_list);
26840+
26841+ if (server_list == 0) {
26842+ server_list = glGenLists(1);
26843+ process->current_state->tabLists[client_list] = server_list;
26844+ }
26845+ glNewList(server_list, mode);
26846+ break;
26847+ }
26848+
26849+ case glCallList_func:
26850+ {
26851+ unsigned int client_list = args[0];
26852+ unsigned int server_list = get_server_list(process, client_list);
26853+
26854+ glCallList(server_list);
26855+ break;
26856+ }
26857+
26858+ case glCallLists_func:
26859+ {
26860+ int i;
26861+ int n = args[0];
26862+ int type = args[1];
26863+ const GLvoid *lists = (const GLvoid *) args[2];
26864+ int *new_lists = malloc(sizeof(int) * n);
26865+
26866+ for (i = 0; i < n; i++) {
26867+ new_lists[i] =
26868+ get_server_list(process, translate_id(i, type, lists));
26869+ }
26870+ glCallLists(n, GL_UNSIGNED_INT, new_lists);
26871+ free(new_lists);
26872+ break;
26873+ }
26874+
26875+
26876+/* End of list stuff */
26877+
26878+/* Begin of buffer stuff */
26879+ case glBindBufferARB_func:
26880+ {
26881+ GET_EXT_PTR(void, glBindBufferARB, (int, int));
26882+ int target = args[0];
26883+ unsigned int client_buffer = args[1];
26884+ unsigned int server_buffer;
26885+
26886+ if (client_buffer == 0) {
26887+ ptr_func_glBindBufferARB(target, 0);
26888+ } else {
26889+ server_buffer = get_server_buffer(process, client_buffer);
26890+ ptr_func_glBindBufferARB(target, server_buffer);
26891+ }
26892+ break;
26893+ }
26894+
26895+ case glGenBuffersARB_fake_func:
26896+ {
26897+ GET_EXT_PTR(void, glGenBuffersARB, (int, unsigned int *));
26898+ int i;
26899+ int n = args[0];
26900+ unsigned int *clientTabBuffers = malloc(n * sizeof(int));
26901+ unsigned int *serverTabBuffers = malloc(n * sizeof(int));
26902+
26903+ alloc_range(process->current_state->bufferAllocator, n,
26904+ clientTabBuffers);
26905+
26906+ ptr_func_glGenBuffersARB(n, serverTabBuffers);
26907+ for (i = 0; i < n; i++) {
26908+ process->current_state->tabBuffers[clientTabBuffers[i]] =
26909+ serverTabBuffers[i];
26910+ }
26911+
26912+ free(clientTabBuffers);
26913+ free(serverTabBuffers);
26914+ break;
26915+ }
26916+
26917+
26918+ case glDeleteBuffersARB_func:
26919+ {
26920+ GET_EXT_PTR(void, glDeleteBuffersARB, (int, int *));
26921+ int i;
26922+ int n = args[0];
26923+ unsigned int *clientTabBuffers = (unsigned int *) args[1];
26924+
26925+ delete_range(process->current_state->bufferAllocator, n,
26926+ clientTabBuffers);
26927+
26928+ int *serverTabBuffers = malloc(n * sizeof(int));
26929+
26930+ for (i = 0; i < n; i++) {
26931+ serverTabBuffers[i] =
26932+ get_server_buffer(process, clientTabBuffers[i]);
26933+ }
26934+ ptr_func_glDeleteBuffersARB(n, serverTabBuffers);
26935+ for (i = 0; i < n; i++) {
26936+ process->current_state->tabBuffers[clientTabBuffers[i]] = 0;
26937+ }
26938+ free(serverTabBuffers);
26939+ break;
26940+ }
26941+
26942+ case glIsBufferARB_func:
26943+ {
26944+ GET_EXT_PTR(int, glIsBufferARB, (int));
26945+ unsigned int client_buffer = args[0];
26946+ unsigned int server_buffer =
26947+ get_server_buffer(process, client_buffer);
26948+ if (server_buffer)
26949+ ret_int = ptr_func_glIsBufferARB(server_buffer);
26950+ else
26951+ ret_int = 0;
26952+ break;
26953+ }
26954+
26955+/* End of buffer stuff */
26956+
26957+ case glShaderSourceARB_fake_func:
26958+ {
26959+ GET_EXT_PTR(void, glShaderSourceARB, (int, int, char **, void *));
26960+ int size = args[1];
26961+ int i;
26962+ int acc_length = 0;
26963+ GLcharARB **tab_prog = malloc(size * sizeof(GLcharARB *));
26964+ int *tab_length = (int *) args[3];
26965+
26966+ for (i = 0; i < size; i++) {
26967+ tab_prog[i] = ((GLcharARB *) args[2]) + acc_length;
26968+ acc_length += tab_length[i];
26969+ }
26970+ ptr_func_glShaderSourceARB(args[0], args[1], tab_prog,
26971+ tab_length);
26972+ free(tab_prog);
26973+ break;
26974+ }
26975+
26976+ case glShaderSource_fake_func:
26977+ {
26978+ GET_EXT_PTR(void, glShaderSource, (int, int, char **, void *));
26979+ int size = args[1];
26980+ int i;
26981+ int acc_length = 0;
26982+ GLcharARB **tab_prog = malloc(size * sizeof(GLcharARB *));
26983+ int *tab_length = (int *) args[3];
26984+
26985+ for (i = 0; i < size; i++) {
26986+ tab_prog[i] = ((GLcharARB *) args[2]) + acc_length;
26987+ acc_length += tab_length[i];
26988+ }
26989+ ptr_func_glShaderSource(args[0], args[1], tab_prog, tab_length);
26990+ free(tab_prog);
26991+ break;
26992+ }
26993+
26994+ case glVertexPointer_fake_func:
26995+ {
26996+ int offset = args[0];
26997+ int size = args[1];
26998+ int type = args[2];
26999+ int stride = args[3];
27000+ int bytes_size = args[4];
27001+
27002+ process->current_state->vertexPointerSize =
27003+ MAX(process->current_state->vertexPointerSize,
27004+ offset + bytes_size);
27005+ process->current_state->vertexPointer =
27006+ realloc(process->current_state->vertexPointer,
27007+ process->current_state->vertexPointerSize);
27008+ memcpy(process->current_state->vertexPointer + offset,
27009+ (void *) args[5], bytes_size);
27010+ /* fprintf(stderr, "glVertexPointer_fake_func size=%d, type=%d,
27011+ * stride=%d, byte_size=%d\n", size, type, stride, bytes_size); */
27012+ glVertexPointer(size, type, stride,
27013+ process->current_state->vertexPointer);
27014+ break;
27015+ }
27016+
27017+ case glNormalPointer_fake_func:
27018+ {
27019+ int offset = args[0];
27020+ int type = args[1];
27021+ int stride = args[2];
27022+ int bytes_size = args[3];
27023+
27024+ process->current_state->normalPointerSize =
27025+ MAX(process->current_state->normalPointerSize,
27026+ offset + bytes_size);
27027+ process->current_state->normalPointer =
27028+ realloc(process->current_state->normalPointer,
27029+ process->current_state->normalPointerSize);
27030+ memcpy(process->current_state->normalPointer + offset,
27031+ (void *) args[4], bytes_size);
27032+ // fprintf(stderr, "glNormalPointer_fake_func type=%d, stride=%d,
27033+ // byte_size=%d\n", type, stride, bytes_size);
27034+ glNormalPointer(type, stride,
27035+ process->current_state->normalPointer);
27036+ break;
27037+ }
27038+
27039+ case glIndexPointer_fake_func:
27040+ {
27041+ int offset = args[0];
27042+ int type = args[1];
27043+ int stride = args[2];
27044+ int bytes_size = args[3];
27045+
27046+ process->current_state->indexPointerSize =
27047+ MAX(process->current_state->indexPointerSize,
27048+ offset + bytes_size);
27049+ process->current_state->indexPointer =
27050+ realloc(process->current_state->indexPointer,
27051+ process->current_state->indexPointerSize);
27052+ memcpy(process->current_state->indexPointer + offset,
27053+ (void *) args[4], bytes_size);
27054+ // fprintf(stderr, "glIndexPointer_fake_func type=%d, stride=%d,
27055+ // byte_size=%d\n", type, stride, bytes_size);
27056+ glIndexPointer(type, stride,
27057+ process->current_state->indexPointer);
27058+ break;
27059+ }
27060+
27061+ case glEdgeFlagPointer_fake_func:
27062+ {
27063+ int offset = args[0];
27064+ int stride = args[1];
27065+ int bytes_size = args[2];
27066+
27067+ process->current_state->edgeFlagPointerSize =
27068+ MAX(process->current_state->edgeFlagPointerSize,
27069+ offset + bytes_size);
27070+ process->current_state->edgeFlagPointer =
27071+ realloc(process->current_state->edgeFlagPointer,
27072+ process->current_state->edgeFlagPointerSize);
27073+ memcpy(process->current_state->edgeFlagPointer + offset,
27074+ (void *) args[3], bytes_size);
27075+ // fprintf(stderr, "glEdgeFlagPointer_fake_func stride = %d,
27076+ // bytes_size=%d\n", stride, bytes_size);
27077+ glEdgeFlagPointer(stride,
27078+ process->current_state->edgeFlagPointer);
27079+ break;
27080+ }
27081+
27082+ case glVertexAttribPointerARB_fake_func:
27083+ {
27084+ GET_EXT_PTR(void, glVertexAttribPointerARB,
27085+ (int, int, int, int, int, void *));
27086+ int offset = args[0];
27087+ int index = args[1];
27088+ int size = args[2];
27089+ int type = args[3];
27090+ int normalized = args[4];
27091+ int stride = args[5];
27092+ int bytes_size = args[6];
27093+
27094+ process->current_state->vertexAttribPointerSize[index] =
27095+ MAX(process->current_state->vertexAttribPointerSize[index],
27096+ offset + bytes_size);
27097+ process->current_state->vertexAttribPointer[index] =
27098+ realloc(process->current_state->vertexAttribPointer[index],
27099+ process->current_state->
27100+ vertexAttribPointerSize[index]);
27101+ memcpy(process->current_state->vertexAttribPointer[index] +
27102+ offset, (void *) args[7], bytes_size);
27103+ ptr_func_glVertexAttribPointerARB(index, size, type, normalized,
27104+ stride,
27105+ process->current_state->
27106+ vertexAttribPointer[index]);
27107+ break;
27108+ }
27109+
27110+ case glVertexAttribPointerNV_fake_func:
27111+ {
27112+ GET_EXT_PTR(void, glVertexAttribPointerNV,
27113+ (int, int, int, int, void *));
27114+ int offset = args[0];
27115+ int index = args[1];
27116+ int size = args[2];
27117+ int type = args[3];
27118+ int stride = args[4];
27119+ int bytes_size = args[5];
27120+
27121+ process->current_state->vertexAttribPointerNVSize[index] =
27122+ MAX(process->current_state->vertexAttribPointerNVSize[index],
27123+ offset + bytes_size);
27124+ process->current_state->vertexAttribPointerNV[index] =
27125+ realloc(process->current_state->vertexAttribPointerNV[index],
27126+ process->current_state->
27127+ vertexAttribPointerNVSize[index]);
27128+ memcpy(process->current_state->vertexAttribPointerNV[index] +
27129+ offset, (void *) args[6], bytes_size);
27130+ ptr_func_glVertexAttribPointerNV(index, size, type, stride,
27131+ process->current_state->
27132+ vertexAttribPointerNV[index]);
27133+ break;
27134+ }
27135+
27136+ case glColorPointer_fake_func:
27137+ {
27138+ int offset = args[0];
27139+ int size = args[1];
27140+ int type = args[2];
27141+ int stride = args[3];
27142+ int bytes_size = args[4];
27143+
27144+ process->current_state->colorPointerSize =
27145+ MAX(process->current_state->colorPointerSize,
27146+ offset + bytes_size);
27147+ process->current_state->colorPointer =
27148+ realloc(process->current_state->colorPointer,
27149+ process->current_state->colorPointerSize);
27150+ memcpy(process->current_state->colorPointer + offset,
27151+ (void *) args[5], bytes_size);
27152+ // fprintf(stderr, "glColorPointer_fake_func bytes_size = %d\n",
27153+ // bytes_size);
27154+ glColorPointer(size, type, stride,
27155+ process->current_state->colorPointer);
27156+
27157+ break;
27158+ }
27159+
27160+ case glSecondaryColorPointer_fake_func:
27161+ {
27162+ GET_EXT_PTR(void, glSecondaryColorPointer,
27163+ (int, int, int, void *));
27164+ int offset = args[0];
27165+ int size = args[1];
27166+ int type = args[2];
27167+ int stride = args[3];
27168+ int bytes_size = args[4];
27169+
27170+ process->current_state->secondaryColorPointerSize =
27171+ MAX(process->current_state->secondaryColorPointerSize,
27172+ offset + bytes_size);
27173+ process->current_state->secondaryColorPointer =
27174+ realloc(process->current_state->secondaryColorPointer,
27175+ process->current_state->secondaryColorPointerSize);
27176+ memcpy(process->current_state->secondaryColorPointer + offset,
27177+ (void *) args[5], bytes_size);
27178+ // fprintf(stderr, "glSecondaryColorPointer_fake_func bytes_size
27179+ // = %d\n", bytes_size);
27180+ ptr_func_glSecondaryColorPointer(size, type, stride,
27181+ process->current_state->
27182+ secondaryColorPointer);
27183+
27184+ break;
27185+ }
27186+
27187+ case glPushClientAttrib_func:
27188+ {
27189+ int mask = args[0];
27190+
27191+ if (process->current_state->clientStateSp <
27192+ MAX_CLIENT_STATE_STACK_SIZE) {
27193+ process->current_state->clientStateStack[process->
27194+ current_state->
27195+ clientStateSp].mask =
27196+ mask;
27197+ if (mask & GL_CLIENT_VERTEX_ARRAY_BIT) {
27198+ process->current_state->clientStateStack[process->
27199+ current_state->
27200+ clientStateSp].
27201+ activeTextureIndex =
27202+ process->current_state->activeTextureIndex;
27203+ }
27204+ process->current_state->clientStateSp++;
27205+ }
27206+ glPushClientAttrib(mask);
27207+ break;
27208+ }
27209+
27210+ case glPopClientAttrib_func:
27211+ {
27212+ if (process->current_state->clientStateSp > 0) {
27213+ process->current_state->clientStateSp--;
27214+ if (process->current_state->
27215+ clientStateStack[process->current_state->clientStateSp].
27216+ mask & GL_CLIENT_VERTEX_ARRAY_BIT) {
27217+ process->current_state->activeTextureIndex =
27218+ process->current_state->clientStateStack[process->
27219+ current_state->
27220+ clientStateSp].
27221+ activeTextureIndex;
27222+ }
27223+ }
27224+ glPopClientAttrib();
27225+ break;
27226+ }
27227+
27228+ case glClientActiveTexture_func:
27229+ case glClientActiveTextureARB_func:
27230+ {
27231+ int activeTexture = args[0];
27232+
27233+ process->current_state->activeTextureIndex =
27234+ activeTexture - GL_TEXTURE0_ARB;
27235+ do_glClientActiveTextureARB(activeTexture);
27236+ break;
27237+ }
27238+
27239+ case glTexCoordPointer_fake_func:
27240+ {
27241+ int offset = args[0];
27242+ int index = args[1];
27243+ int size = args[2];
27244+ int type = args[3];
27245+ int stride = args[4];
27246+ int bytes_size = args[5];
27247+
27248+ process->current_state->texCoordPointerSize[index] =
27249+ MAX(process->current_state->texCoordPointerSize[index],
27250+ offset + bytes_size);
27251+ process->current_state->texCoordPointer[index] =
27252+ realloc(process->current_state->texCoordPointer[index],
27253+ process->current_state->texCoordPointerSize[index]);
27254+ memcpy(process->current_state->texCoordPointer[index] + offset,
27255+ (void *) args[6], bytes_size);
27256+ /* fprintf(stderr, "glTexCoordPointer_fake_func size=%d, type=%d,
27257+ * stride=%d, byte_size=%d\n", size, type, stride, bytes_size); */
27258+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + index);
27259+ glTexCoordPointer(size, type, stride,
27260+ process->current_state->texCoordPointer[index]);
27261+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27262+ process->current_state->
27263+ activeTextureIndex);
27264+ break;
27265+ }
27266+
27267+ case glWeightPointerARB_fake_func:
27268+ {
27269+ GET_EXT_PTR(void, glWeightPointerARB, (int, int, int, void *));
27270+ int offset = args[0];
27271+ int size = args[1];
27272+ int type = args[2];
27273+ int stride = args[3];
27274+ int bytes_size = args[4];
27275+
27276+ process->current_state->weightPointerSize =
27277+ MAX(process->current_state->weightPointerSize,
27278+ offset + bytes_size);
27279+ process->current_state->weightPointer =
27280+ realloc(process->current_state->weightPointer,
27281+ process->current_state->weightPointerSize);
27282+ memcpy(process->current_state->weightPointer + offset,
27283+ (void *) args[5], bytes_size);
27284+ /* fprintf(stderr, "glWeightPointerARB_fake_func size=%d,
27285+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27286+ * bytes_size); */
27287+ ptr_func_glWeightPointerARB(size, type, stride,
27288+ process->current_state->
27289+ weightPointer);
27290+ break;
27291+ }
27292+
27293+ case glMatrixIndexPointerARB_fake_func:
27294+ {
27295+ GET_EXT_PTR(void, glMatrixIndexPointerARB,
27296+ (int, int, int, void *));
27297+ int offset = args[0];
27298+ int size = args[1];
27299+ int type = args[2];
27300+ int stride = args[3];
27301+ int bytes_size = args[4];
27302+
27303+ process->current_state->matrixIndexPointerSize =
27304+ MAX(process->current_state->matrixIndexPointerSize,
27305+ offset + bytes_size);
27306+ process->current_state->matrixIndexPointer =
27307+ realloc(process->current_state->matrixIndexPointer,
27308+ process->current_state->matrixIndexPointerSize);
27309+ memcpy(process->current_state->matrixIndexPointer + offset,
27310+ (void *) args[5], bytes_size);
27311+ /* fprintf(stderr, "glMatrixIndexPointerARB_fake_func size=%d,
27312+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27313+ * bytes_size); */
27314+ ptr_func_glMatrixIndexPointerARB(size, type, stride,
27315+ process->current_state->
27316+ matrixIndexPointer);
27317+ break;
27318+ }
27319+
27320+ case glFogCoordPointer_fake_func:
27321+ {
27322+ GET_EXT_PTR(void, glFogCoordPointer, (int, int, void *));
27323+ int offset = args[0];
27324+ int type = args[1];
27325+ int stride = args[2];
27326+ int bytes_size = args[3];
27327+
27328+ process->current_state->fogCoordPointerSize =
27329+ MAX(process->current_state->fogCoordPointerSize,
27330+ offset + bytes_size);
27331+ process->current_state->fogCoordPointer =
27332+ realloc(process->current_state->fogCoordPointer,
27333+ process->current_state->fogCoordPointerSize);
27334+ memcpy(process->current_state->fogCoordPointer + offset,
27335+ (void *) args[4], bytes_size);
27336+ // fprintf(stderr, "glFogCoordPointer_fake_func type=%d,
27337+ // stride=%d, byte_size=%d\n", type, stride, bytes_size);
27338+ ptr_func_glFogCoordPointer(type, stride,
27339+ process->current_state->
27340+ fogCoordPointer);
27341+ break;
27342+ }
27343+
27344+ case glVariantPointerEXT_fake_func:
27345+ {
27346+ GET_EXT_PTR(void, glVariantPointerEXT, (int, int, int, void *));
27347+ int offset = args[0];
27348+ int id = args[1];
27349+ int type = args[2];
27350+ int stride = args[3];
27351+ int bytes_size = args[4];
27352+
27353+ process->current_state->variantPointerEXTSize[id] =
27354+ MAX(process->current_state->variantPointerEXTSize[id],
27355+ offset + bytes_size);
27356+ process->current_state->variantPointerEXT[id] =
27357+ realloc(process->current_state->variantPointerEXT[id],
27358+ process->current_state->variantPointerEXTSize[id]);
27359+ memcpy(process->current_state->variantPointerEXT[id] + offset,
27360+ (void *) args[5], bytes_size);
27361+ // fprintf(stderr, "glVariantPointerEXT_fake_func[%d] type=%d,
27362+ // stride=%d, byte_size=%d\n", id, type, stride, bytes_size);
27363+ ptr_func_glVariantPointerEXT(id, type, stride,
27364+ process->current_state->
27365+ variantPointerEXT[id]);
27366+ break;
27367+ }
27368+
27369+ case glInterleavedArrays_fake_func:
27370+ {
27371+ GET_EXT_PTR(void, glInterleavedArrays, (int, int, void *));
27372+ int offset = args[0];
27373+ int format = args[1];
27374+ int stride = args[2];
27375+ int bytes_size = args[3];
27376+
27377+ process->current_state->interleavedArraysSize =
27378+ MAX(process->current_state->interleavedArraysSize,
27379+ offset + bytes_size);
27380+ process->current_state->interleavedArrays =
27381+ realloc(process->current_state->interleavedArrays,
27382+ process->current_state->interleavedArraysSize);
27383+ memcpy(process->current_state->interleavedArrays + offset,
27384+ (void *) args[4], bytes_size);
27385+ // fprintf(stderr, "glInterleavedArrays_fake_func format=%d,
27386+ // stride=%d, byte_size=%d\n", format, stride, bytes_size);
27387+ ptr_func_glInterleavedArrays(format, stride,
27388+ process->current_state->
27389+ interleavedArrays);
27390+ break;
27391+ }
27392+
27393+ case glElementPointerATI_fake_func:
27394+ {
27395+ GET_EXT_PTR(void, glElementPointerATI, (int, void *));
27396+ int type = args[0];
27397+ int bytes_size = args[1];
27398+
27399+ process->current_state->elementPointerATISize = bytes_size;
27400+ process->current_state->elementPointerATI =
27401+ realloc(process->current_state->elementPointerATI,
27402+ process->current_state->elementPointerATISize);
27403+ memcpy(process->current_state->elementPointerATI,
27404+ (void *) args[2], bytes_size);
27405+ // fprintf(stderr, "glElementPointerATI_fake_func type=%d,
27406+ // byte_size=%d\n", type, bytes_size);
27407+ ptr_func_glElementPointerATI(type,
27408+ process->current_state->
27409+ elementPointerATI);
27410+ break;
27411+ }
27412+
27413+ case glTexCoordPointer01_fake_func:
27414+ {
27415+ int size = args[0];
27416+ int type = args[1];
27417+ int stride = args[2];
27418+ int bytes_size = args[3];
27419+
27420+ process->current_state->texCoordPointerSize[0] = bytes_size;
27421+ process->current_state->texCoordPointer[0] =
27422+ realloc(process->current_state->texCoordPointer[0],
27423+ bytes_size);
27424+ memcpy(process->current_state->texCoordPointer[0],
27425+ (void *) args[4], bytes_size);
27426+ /* fprintf(stderr, "glTexCoordPointer01_fake_func size=%d,
27427+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27428+ * bytes_size); */
27429+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27430+ glTexCoordPointer(size, type, stride,
27431+ process->current_state->texCoordPointer[0]);
27432+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
27433+ glTexCoordPointer(size, type, stride,
27434+ process->current_state->texCoordPointer[0]);
27435+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27436+ process->current_state->
27437+ activeTextureIndex);
27438+ break;
27439+ }
27440+
27441+ case glTexCoordPointer012_fake_func:
27442+ {
27443+ int size = args[0];
27444+ int type = args[1];
27445+ int stride = args[2];
27446+ int bytes_size = args[3];
27447+
27448+ process->current_state->texCoordPointerSize[0] = bytes_size;
27449+ process->current_state->texCoordPointer[0] =
27450+ realloc(process->current_state->texCoordPointer[0],
27451+ bytes_size);
27452+ memcpy(process->current_state->texCoordPointer[0],
27453+ (void *) args[4], bytes_size);
27454+ /* fprintf(stderr, "glTexCoordPointer012_fake_func size=%d,
27455+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27456+ * bytes_size); */
27457+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27458+ glTexCoordPointer(size, type, stride,
27459+ process->current_state->texCoordPointer[0]);
27460+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
27461+ glTexCoordPointer(size, type, stride,
27462+ process->current_state->texCoordPointer[0]);
27463+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
27464+ glTexCoordPointer(size, type, stride,
27465+ process->current_state->texCoordPointer[0]);
27466+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27467+ process->current_state->
27468+ activeTextureIndex);
27469+ break;
27470+ }
27471+
27472+ case glVertexAndNormalPointer_fake_func:
27473+ {
27474+ int vertexPointerSize = args[0];
27475+ int vertexPointerType = args[1];
27476+ int vertexPointerStride = args[2];
27477+ int normalPointerType = args[3];
27478+ int normalPointerStride = args[4];
27479+ int bytes_size = args[5];
27480+ void *ptr = (void *) args[6];
27481+
27482+ process->current_state->vertexPointerSize = bytes_size;
27483+ process->current_state->vertexPointer =
27484+ realloc(process->current_state->vertexPointer, bytes_size);
27485+ memcpy(process->current_state->vertexPointer, ptr, bytes_size);
27486+ glVertexPointer(vertexPointerSize, vertexPointerType,
27487+ vertexPointerStride,
27488+ process->current_state->vertexPointer);
27489+ glNormalPointer(normalPointerType, normalPointerStride,
27490+ process->current_state->vertexPointer);
27491+ break;
27492+ }
27493+
27494+ case glVertexNormalPointerInterlaced_fake_func:
27495+ {
27496+ int i = 0;
27497+ int offset = args[i++];
27498+ int vertexPointerSize = args[i++];
27499+ int vertexPointerType = args[i++];
27500+ int stride = args[i++];
27501+ int normalPointerOffset = args[i++];
27502+ int normalPointerType = args[i++];
27503+ int bytes_size = args[i++];
27504+ void *ptr = (void *) args[i++];
27505+
27506+ process->current_state->vertexPointerSize =
27507+ MAX(process->current_state->vertexPointerSize,
27508+ offset + bytes_size);
27509+ process->current_state->vertexPointer =
27510+ realloc(process->current_state->vertexPointer,
27511+ process->current_state->vertexPointerSize);
27512+ memcpy(process->current_state->vertexPointer + offset, ptr,
27513+ bytes_size);
27514+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27515+ process->current_state->vertexPointer);
27516+ glNormalPointer(normalPointerType, stride,
27517+ process->current_state->vertexPointer +
27518+ normalPointerOffset);
27519+ break;
27520+ }
27521+
27522+ case glTuxRacerDrawElements_fake_func:
27523+ {
27524+ int mode = args[0];
27525+ int count = args[1];
27526+ int isColorEnabled = args[2];
27527+ void *ptr = (void *) args[3];
27528+ int stride =
27529+ 6 * sizeof(float) +
27530+ ((isColorEnabled) ? 4 * sizeof(unsigned char) : 0);
27531+ glVertexPointer(3, GL_FLOAT, stride, ptr);
27532+ glNormalPointer(GL_FLOAT, stride, ptr + 3 * sizeof(float));
27533+ if (isColorEnabled)
27534+ glColorPointer(4, GL_UNSIGNED_BYTE, stride,
27535+ ptr + 6 * sizeof(float));
27536+ glDrawArrays(mode, 0, count);
27537+ break;
27538+ }
27539+
27540+ case glVertexNormalColorPointerInterlaced_fake_func:
27541+ {
27542+ int i = 0;
27543+ int offset = args[i++];
27544+ int vertexPointerSize = args[i++];
27545+ int vertexPointerType = args[i++];
27546+ int stride = args[i++];
27547+ int normalPointerOffset = args[i++];
27548+ int normalPointerType = args[i++];
27549+ int colorPointerOffset = args[i++];
27550+ int colorPointerSize = args[i++];
27551+ int colorPointerType = args[i++];
27552+ int bytes_size = args[i++];
27553+ void *ptr = (void *) args[i++];
27554+
27555+ process->current_state->vertexPointerSize =
27556+ MAX(process->current_state->vertexPointerSize,
27557+ offset + bytes_size);
27558+ process->current_state->vertexPointer =
27559+ realloc(process->current_state->vertexPointer,
27560+ process->current_state->vertexPointerSize);
27561+ memcpy(process->current_state->vertexPointer + offset, ptr,
27562+ bytes_size);
27563+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27564+ process->current_state->vertexPointer);
27565+ glNormalPointer(normalPointerType, stride,
27566+ process->current_state->vertexPointer +
27567+ normalPointerOffset);
27568+ glColorPointer(colorPointerSize, colorPointerType, stride,
27569+ process->current_state->vertexPointer +
27570+ colorPointerOffset);
27571+ break;
27572+ }
27573+
27574+ case glVertexColorTexCoord0PointerInterlaced_fake_func:
27575+ {
27576+ int i = 0;
27577+ int offset = args[i++];
27578+ int vertexPointerSize = args[i++];
27579+ int vertexPointerType = args[i++];
27580+ int stride = args[i++];
27581+ int colorPointerOffset = args[i++];
27582+ int colorPointerSize = args[i++];
27583+ int colorPointerType = args[i++];
27584+ int texCoord0PointerOffset = args[i++];
27585+ int texCoord0PointerSize = args[i++];
27586+ int texCoord0PointerType = args[i++];
27587+ int bytes_size = args[i++];
27588+ void *ptr = (void *) args[i++];
27589+
27590+ process->current_state->vertexPointerSize =
27591+ MAX(process->current_state->vertexPointerSize,
27592+ offset + bytes_size);
27593+ process->current_state->vertexPointer =
27594+ realloc(process->current_state->vertexPointer,
27595+ process->current_state->vertexPointerSize);
27596+ memcpy(process->current_state->vertexPointer + offset, ptr,
27597+ bytes_size);
27598+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27599+ process->current_state->vertexPointer);
27600+ glColorPointer(colorPointerSize, colorPointerType, stride,
27601+ process->current_state->vertexPointer +
27602+ colorPointerOffset);
27603+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27604+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
27605+ stride,
27606+ process->current_state->vertexPointer +
27607+ texCoord0PointerOffset);
27608+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27609+ process->current_state->
27610+ activeTextureIndex);
27611+ break;
27612+ }
27613+
27614+ case glVertexNormalTexCoord0PointerInterlaced_fake_func:
27615+ {
27616+ int i = 0;
27617+ int offset = args[i++];
27618+ int vertexPointerSize = args[i++];
27619+ int vertexPointerType = args[i++];
27620+ int stride = args[i++];
27621+ int normalPointerOffset = args[i++];
27622+ int normalPointerType = args[i++];
27623+ int texCoord0PointerOffset = args[i++];
27624+ int texCoord0PointerSize = args[i++];
27625+ int texCoord0PointerType = args[i++];
27626+ int bytes_size = args[i++];
27627+ void *ptr = (void *) args[i++];
27628+
27629+ process->current_state->vertexPointerSize =
27630+ MAX(process->current_state->vertexPointerSize,
27631+ offset + bytes_size);
27632+ process->current_state->vertexPointer =
27633+ realloc(process->current_state->vertexPointer,
27634+ process->current_state->vertexPointerSize);
27635+ memcpy(process->current_state->vertexPointer + offset, ptr,
27636+ bytes_size);
27637+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27638+ process->current_state->vertexPointer);
27639+ glNormalPointer(normalPointerType, stride,
27640+ process->current_state->vertexPointer +
27641+ normalPointerOffset);
27642+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27643+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
27644+ stride,
27645+ process->current_state->vertexPointer +
27646+ texCoord0PointerOffset);
27647+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27648+ process->current_state->
27649+ activeTextureIndex);
27650+ break;
27651+ }
27652+
27653+ case glVertexNormalTexCoord01PointerInterlaced_fake_func:
27654+ {
27655+ int i = 0;
27656+ int offset = args[i++];
27657+ int vertexPointerSize = args[i++];
27658+ int vertexPointerType = args[i++];
27659+ int stride = args[i++];
27660+ int normalPointerOffset = args[i++];
27661+ int normalPointerType = args[i++];
27662+ int texCoord0PointerOffset = args[i++];
27663+ int texCoord0PointerSize = args[i++];
27664+ int texCoord0PointerType = args[i++];
27665+ int texCoord1PointerOffset = args[i++];
27666+ int texCoord1PointerSize = args[i++];
27667+ int texCoord1PointerType = args[i++];
27668+ int bytes_size = args[i++];
27669+ void *ptr = (void *) args[i++];
27670+
27671+ process->current_state->vertexPointerSize =
27672+ MAX(process->current_state->vertexPointerSize,
27673+ offset + bytes_size);
27674+ process->current_state->vertexPointer =
27675+ realloc(process->current_state->vertexPointer,
27676+ process->current_state->vertexPointerSize);
27677+ memcpy(process->current_state->vertexPointer + offset, ptr,
27678+ bytes_size);
27679+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27680+ process->current_state->vertexPointer);
27681+ glNormalPointer(normalPointerType, stride,
27682+ process->current_state->vertexPointer +
27683+ normalPointerOffset);
27684+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27685+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
27686+ stride,
27687+ process->current_state->vertexPointer +
27688+ texCoord0PointerOffset);
27689+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
27690+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
27691+ stride,
27692+ process->current_state->vertexPointer +
27693+ texCoord1PointerOffset);
27694+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27695+ process->current_state->
27696+ activeTextureIndex);
27697+ break;
27698+ }
27699+
27700+ case glVertexNormalTexCoord012PointerInterlaced_fake_func:
27701+ {
27702+ int i = 0;
27703+ int offset = args[i++];
27704+ int vertexPointerSize = args[i++];
27705+ int vertexPointerType = args[i++];
27706+ int stride = args[i++];
27707+ int normalPointerOffset = args[i++];
27708+ int normalPointerType = args[i++];
27709+ int texCoord0PointerOffset = args[i++];
27710+ int texCoord0PointerSize = args[i++];
27711+ int texCoord0PointerType = args[i++];
27712+ int texCoord1PointerOffset = args[i++];
27713+ int texCoord1PointerSize = args[i++];
27714+ int texCoord1PointerType = args[i++];
27715+ int texCoord2PointerOffset = args[i++];
27716+ int texCoord2PointerSize = args[i++];
27717+ int texCoord2PointerType = args[i++];
27718+ int bytes_size = args[i++];
27719+ void *ptr = (void *) args[i++];
27720+
27721+ process->current_state->vertexPointerSize =
27722+ MAX(process->current_state->vertexPointerSize,
27723+ offset + bytes_size);
27724+ process->current_state->vertexPointer =
27725+ realloc(process->current_state->vertexPointer,
27726+ process->current_state->vertexPointerSize);
27727+ memcpy(process->current_state->vertexPointer + offset, ptr,
27728+ bytes_size);
27729+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27730+ process->current_state->vertexPointer);
27731+ glNormalPointer(normalPointerType, stride,
27732+ process->current_state->vertexPointer +
27733+ normalPointerOffset);
27734+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27735+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
27736+ stride,
27737+ process->current_state->vertexPointer +
27738+ texCoord0PointerOffset);
27739+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
27740+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
27741+ stride,
27742+ process->current_state->vertexPointer +
27743+ texCoord1PointerOffset);
27744+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
27745+ glTexCoordPointer(texCoord2PointerSize, texCoord2PointerType,
27746+ stride,
27747+ process->current_state->vertexPointer +
27748+ texCoord2PointerOffset);
27749+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27750+ process->current_state->
27751+ activeTextureIndex);
27752+ break;
27753+ }
27754+
27755+ case glVertexNormalColorTexCoord0PointerInterlaced_fake_func:
27756+ {
27757+ int i = 0;
27758+ int offset = args[i++];
27759+ int vertexPointerSize = args[i++];
27760+ int vertexPointerType = args[i++];
27761+ int stride = args[i++];
27762+ int normalPointerOffset = args[i++];
27763+ int normalPointerType = args[i++];
27764+ int colorPointerOffset = args[i++];
27765+ int colorPointerSize = args[i++];
27766+ int colorPointerType = args[i++];
27767+ int texCoord0PointerOffset = args[i++];
27768+ int texCoord0PointerSize = args[i++];
27769+ int texCoord0PointerType = args[i++];
27770+ int bytes_size = args[i++];
27771+ void *ptr = (void *) args[i++];
27772+
27773+ process->current_state->vertexPointerSize =
27774+ MAX(process->current_state->vertexPointerSize,
27775+ offset + bytes_size);
27776+ process->current_state->vertexPointer =
27777+ realloc(process->current_state->vertexPointer,
27778+ process->current_state->vertexPointerSize);
27779+ memcpy(process->current_state->vertexPointer + offset, ptr,
27780+ bytes_size);
27781+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27782+ process->current_state->vertexPointer);
27783+ glNormalPointer(normalPointerType, stride,
27784+ process->current_state->vertexPointer +
27785+ normalPointerOffset);
27786+ glColorPointer(colorPointerSize, colorPointerType, stride,
27787+ process->current_state->vertexPointer +
27788+ colorPointerOffset);
27789+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27790+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
27791+ stride,
27792+ process->current_state->vertexPointer +
27793+ texCoord0PointerOffset);
27794+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27795+ process->current_state->
27796+ activeTextureIndex);
27797+ break;
27798+ }
27799+
27800+ case glVertexNormalColorTexCoord01PointerInterlaced_fake_func:
27801+ {
27802+ int i = 0;
27803+ int offset = args[i++];
27804+ int vertexPointerSize = args[i++];
27805+ int vertexPointerType = args[i++];
27806+ int stride = args[i++];
27807+ int normalPointerOffset = args[i++];
27808+ int normalPointerType = args[i++];
27809+ int colorPointerOffset = args[i++];
27810+ int colorPointerSize = args[i++];
27811+ int colorPointerType = args[i++];
27812+ int texCoord0PointerOffset = args[i++];
27813+ int texCoord0PointerSize = args[i++];
27814+ int texCoord0PointerType = args[i++];
27815+ int texCoord1PointerOffset = args[i++];
27816+ int texCoord1PointerSize = args[i++];
27817+ int texCoord1PointerType = args[i++];
27818+ int bytes_size = args[i++];
27819+ void *ptr = (void *) args[i++];
27820+
27821+ process->current_state->vertexPointerSize =
27822+ MAX(process->current_state->vertexPointerSize,
27823+ offset + bytes_size);
27824+ process->current_state->vertexPointer =
27825+ realloc(process->current_state->vertexPointer,
27826+ process->current_state->vertexPointerSize);
27827+ memcpy(process->current_state->vertexPointer + offset, ptr,
27828+ bytes_size);
27829+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27830+ process->current_state->vertexPointer);
27831+ glNormalPointer(normalPointerType, stride,
27832+ process->current_state->vertexPointer +
27833+ normalPointerOffset);
27834+ glColorPointer(colorPointerSize, colorPointerType, stride,
27835+ process->current_state->vertexPointer +
27836+ colorPointerOffset);
27837+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27838+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
27839+ stride,
27840+ process->current_state->vertexPointer +
27841+ texCoord0PointerOffset);
27842+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
27843+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
27844+ stride,
27845+ process->current_state->vertexPointer +
27846+ texCoord1PointerOffset);
27847+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27848+ process->current_state->
27849+ activeTextureIndex);
27850+ break;
27851+ }
27852+
27853+ case glVertexNormalColorTexCoord012PointerInterlaced_fake_func:
27854+ {
27855+ int i = 0;
27856+ int offset = args[i++];
27857+ int vertexPointerSize = args[i++];
27858+ int vertexPointerType = args[i++];
27859+ int stride = args[i++];
27860+ int normalPointerOffset = args[i++];
27861+ int normalPointerType = args[i++];
27862+ int colorPointerOffset = args[i++];
27863+ int colorPointerSize = args[i++];
27864+ int colorPointerType = args[i++];
27865+ int texCoord0PointerOffset = args[i++];
27866+ int texCoord0PointerSize = args[i++];
27867+ int texCoord0PointerType = args[i++];
27868+ int texCoord1PointerOffset = args[i++];
27869+ int texCoord1PointerSize = args[i++];
27870+ int texCoord1PointerType = args[i++];
27871+ int texCoord2PointerOffset = args[i++];
27872+ int texCoord2PointerSize = args[i++];
27873+ int texCoord2PointerType = args[i++];
27874+ int bytes_size = args[i++];
27875+ void *ptr = (void *) args[i++];
27876+
27877+ process->current_state->vertexPointerSize =
27878+ MAX(process->current_state->vertexPointerSize,
27879+ offset + bytes_size);
27880+ process->current_state->vertexPointer =
27881+ realloc(process->current_state->vertexPointer,
27882+ process->current_state->vertexPointerSize);
27883+ memcpy(process->current_state->vertexPointer + offset, ptr,
27884+ bytes_size);
27885+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27886+ process->current_state->vertexPointer);
27887+ glNormalPointer(normalPointerType, stride,
27888+ process->current_state->vertexPointer +
27889+ normalPointerOffset);
27890+ glColorPointer(colorPointerSize, colorPointerType, stride,
27891+ process->current_state->vertexPointer +
27892+ colorPointerOffset);
27893+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27894+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
27895+ stride,
27896+ process->current_state->vertexPointer +
27897+ texCoord0PointerOffset);
27898+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
27899+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
27900+ stride,
27901+ process->current_state->vertexPointer +
27902+ texCoord1PointerOffset);
27903+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
27904+ glTexCoordPointer(texCoord2PointerSize, texCoord2PointerType,
27905+ stride,
27906+ process->current_state->vertexPointer +
27907+ texCoord2PointerOffset);
27908+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27909+ process->current_state->
27910+ activeTextureIndex);
27911+ break;
27912+ }
27913+
27914+ case _glVertexPointer_buffer_func:
27915+ {
27916+ glVertexPointer(args[0], args[1], args[2], (void *) args[3]);
27917+ break;
27918+ }
27919+
27920+ case _glNormalPointer_buffer_func:
27921+ {
27922+ glNormalPointer(args[0], args[1], (void *) args[2]);
27923+ break;
27924+ }
27925+
27926+ case _glColorPointer_buffer_func:
27927+ {
27928+ glColorPointer(args[0], args[1], args[2], (void *) args[3]);
27929+ break;
27930+ }
27931+
27932+ case _glSecondaryColorPointer_buffer_func:
27933+ {
27934+ GET_EXT_PTR(void, glSecondaryColorPointer,
27935+ (int, int, int, void *));
27936+ ptr_func_glSecondaryColorPointer(args[0], args[1], args[2],
27937+ (void *) args[3]);
27938+ break;
27939+ }
27940+
27941+ case _glIndexPointer_buffer_func:
27942+ {
27943+ glIndexPointer(args[0], args[1], (void *) args[2]);
27944+ break;
27945+ }
27946+
27947+ case _glTexCoordPointer_buffer_func:
27948+ {
27949+ glTexCoordPointer(args[0], args[1], args[2], (void *) args[3]);
27950+ break;
27951+ }
27952+
27953+ case _glEdgeFlagPointer_buffer_func:
27954+ {
27955+ glEdgeFlagPointer(args[0], (void *) args[1]);
27956+ break;
27957+ }
27958+
27959+ case _glVertexAttribPointerARB_buffer_func:
27960+ {
27961+ GET_EXT_PTR(void, glVertexAttribPointerARB,
27962+ (int, int, int, int, int, void *));
27963+ ptr_func_glVertexAttribPointerARB(args[0], args[1], args[2],
27964+ args[3], args[4],
27965+ (void *) args[5]);
27966+ break;
27967+ }
27968+
27969+ case _glWeightPointerARB_buffer_func:
27970+ {
27971+ GET_EXT_PTR(void, glWeightPointerARB, (int, int, int, void *));
27972+
27973+ ptr_func_glWeightPointerARB(args[0], args[1], args[2],
27974+ (void *) args[3]);
27975+ break;
27976+ }
27977+
27978+ case _glMatrixIndexPointerARB_buffer_func:
27979+ {
27980+ GET_EXT_PTR(void, glMatrixIndexPointerARB,
27981+ (int, int, int, void *));
27982+ ptr_func_glMatrixIndexPointerARB(args[0], args[1], args[2],
27983+ (void *) args[3]);
27984+ break;
27985+ }
27986+
27987+ case _glFogCoordPointer_buffer_func:
27988+ {
27989+ GET_EXT_PTR(void, glFogCoordPointer, (int, int, void *));
27990+
27991+ ptr_func_glFogCoordPointer(args[0], args[1], (void *) args[2]);
27992+ break;
27993+ }
27994+
27995+ case _glVariantPointerEXT_buffer_func:
27996+ {
27997+ GET_EXT_PTR(void, glVariantPointerEXT, (int, int, int, void *));
27998+
27999+ ptr_func_glVariantPointerEXT(args[0], args[1], args[2],
28000+ (void *) args[3]);
28001+ break;
28002+ }
28003+
28004+ case _glDrawElements_buffer_func:
28005+ {
28006+ glDrawElements(args[0], args[1], args[2], (void *) args[3]);
28007+ break;
28008+ }
28009+
28010+ case _glDrawRangeElements_buffer_func:
28011+ {
28012+ glDrawRangeElements(args[0], args[1], args[2], args[3], args[4],
28013+ (void *) args[5]);
28014+ break;
28015+ }
28016+
28017+ case _glMultiDrawElements_buffer_func:
28018+ {
28019+ GET_EXT_PTR(void, glMultiDrawElements,
28020+ (int, int *, int, void **, int));
28021+ ptr_func_glMultiDrawElements(args[0], (int *) args[1], args[2],
28022+ (void **) args[3], args[4]);
28023+ break;
28024+ }
28025+
28026+ case _glGetError_fake_func:
28027+ {
28028+ break;
28029+ }
28030+
28031+ case glGetIntegerv_func:
28032+ {
28033+ glGetIntegerv(args[0], (int *) args[1]);
28034+ fprintf(stderr, "glGetIntegerv(%x)=%d\n", (int) args[0],
28035+ *(int *) args[1]);
28036+ break;
28037+ }
28038+
28039+ case _glReadPixels_pbo_func:
28040+ {
28041+ glReadPixels(ARG_TO_INT(args[0]), ARG_TO_INT(args[1]),
28042+ ARG_TO_INT(args[2]), ARG_TO_INT(args[3]),
28043+ ARG_TO_UNSIGNED_INT(args[4]),
28044+ ARG_TO_UNSIGNED_INT(args[5]), (void *) (args[6]));
28045+ break;
28046+ }
28047+
28048+ case _glDrawPixels_pbo_func:
28049+ {
28050+ glDrawPixels(ARG_TO_INT(args[0]), ARG_TO_INT(args[1]),
28051+ ARG_TO_UNSIGNED_INT(args[2]),
28052+ ARG_TO_UNSIGNED_INT(args[3]),
28053+ (const void *) (args[4]));
28054+ break;
28055+ }
28056+
28057+ case _glMapBufferARB_fake_func:
28058+ {
28059+ GET_EXT_PTR(GLvoid *, glMapBufferARB, (GLenum, GLenum));
28060+ GET_EXT_PTR(GLboolean, glUnmapBufferARB, (GLenum));
28061+ int target = args[0];
28062+ int size = args[1];
28063+ void *dst_ptr = (void *) args[2];
28064+ void *src_ptr = ptr_func_glMapBufferARB(target, GL_READ_ONLY);
28065+
28066+ if (src_ptr) {
28067+ memcpy(dst_ptr, src_ptr, size);
28068+ ret_int = ptr_func_glUnmapBufferARB(target);
28069+ } else {
28070+ ret_int = 0;
28071+ }
28072+ break;
28073+ }
28074+
28075+ case fake_gluBuild2DMipmaps_func:
28076+ {
28077+ GET_GLU_PTR(GLint, gluBuild2DMipmaps,
28078+ (GLenum arg_0, GLint arg_1, GLsizei arg_2,
28079+ GLsizei arg_3, GLenum arg_4, GLenum arg_5,
28080+ const GLvoid *arg_6));
28081+ if (ptr_func_gluBuild2DMipmaps == NULL)
28082+ ptr_func_gluBuild2DMipmaps = mesa_gluBuild2DMipmaps;
28083+ ptr_func_gluBuild2DMipmaps(ARG_TO_UNSIGNED_INT(args[0]),
28084+ ARG_TO_INT(args[1]),
28085+ ARG_TO_INT(args[2]),
28086+ ARG_TO_INT(args[3]),
28087+ ARG_TO_UNSIGNED_INT(args[4]),
28088+ ARG_TO_UNSIGNED_INT(args[5]),
28089+ (const void *) (args[6]));
28090+ break;
28091+ }
28092+
28093+ case _glSelectBuffer_fake_func:
28094+ {
28095+ process->current_state->selectBufferSize = args[0] * 4;
28096+ process->current_state->selectBufferPtr =
28097+ realloc(process->current_state->selectBufferPtr,
28098+ process->current_state->selectBufferSize);
28099+ glSelectBuffer(args[0], process->current_state->selectBufferPtr);
28100+ break;
28101+ }
28102+
28103+ case _glGetSelectBuffer_fake_func:
28104+ {
28105+ void *ptr = (void *) args[0];
28106+
28107+ memcpy(ptr, process->current_state->selectBufferPtr,
28108+ process->current_state->selectBufferSize);
28109+ break;
28110+ }
28111+
28112+ case _glFeedbackBuffer_fake_func:
28113+ {
28114+ process->current_state->feedbackBufferSize = args[0] * 4;
28115+ process->current_state->feedbackBufferPtr =
28116+ realloc(process->current_state->feedbackBufferPtr,
28117+ process->current_state->feedbackBufferSize);
28118+ glFeedbackBuffer(args[0], args[1],
28119+ process->current_state->feedbackBufferPtr);
28120+ break;
28121+ }
28122+
28123+ case _glGetFeedbackBuffer_fake_func:
28124+ {
28125+ void *ptr = (void *) args[0];
28126+
28127+ memcpy(ptr, process->current_state->feedbackBufferPtr,
28128+ process->current_state->feedbackBufferSize);
28129+ break;
28130+ }
28131+
28132+ /*
28133+ * case glEnableClientState_func: { if (display_function_call)
28134+ * fprintf(stderr, "cap : %s\n", nameArrays[args[0] -
28135+ * GL_VERTEX_ARRAY]); glEnableClientState(args[0]); break; }
28136+ *
28137+ * case glDisableClientState_func: { if (display_function_call)
28138+ * fprintf(stderr, "cap : %s\n", nameArrays[args[0] -
28139+ * GL_VERTEX_ARRAY]); glDisableClientState(args[0]); break; }
28140+ *
28141+ * case glClientActiveTexture_func: case
28142+ * glClientActiveTextureARB_func: { if (display_function_call)
28143+ * fprintf(stderr, "client activeTexture %d\n", args[0] -
28144+ * GL_TEXTURE0_ARB); glClientActiveTextureARB(args[0]); break; }
28145+ *
28146+ * case glActiveTextureARB_func: { if (display_function_call)
28147+ * fprintf(stderr, "server activeTexture %d\n", args[0] -
28148+ * GL_TEXTURE0_ARB); glActiveTextureARB(args[0]); break; }
28149+ *
28150+ * case glLockArraysEXT_func: break;
28151+ *
28152+ * case glUnlockArraysEXT_func: break;
28153+ *
28154+ * case glArrayElement_func: { glArrayElement(args[0]); break; }
28155+ *
28156+ * case glDrawArrays_func: { glDrawArrays(args[0],args[1],args[2]);
28157+ * break; }
28158+ *
28159+ * case glDrawElements_func: {
28160+ * glDrawElements(args[0],args[1],args[2],(void*)args[3]); break; }
28161+ *
28162+ * case glDrawRangeElements_func: {
28163+ * glDrawRangeElements(args[0],args[1],args[2],args[3],args[4],(void*)args[5]);
28164+ * break; } */
28165+
28166+ case glGetError_func:
28167+ {
28168+#ifdef SYSTEMATIC_ERROR_CHECK
28169+ ret_int = process->current_state->last_error;
28170+#else
28171+ ret_int = glGetError();
28172+#endif
28173+ break;
28174+ }
28175+
28176+ case glNewObjectBufferATI_func:
28177+ {
28178+ GET_EXT_PTR(int, glNewObjectBufferATI, (int, void *, int));
28179+
28180+ ret_int = ptr_func_glNewObjectBufferATI(args[0],
28181+ (void *) args[1], args[2]);
28182+ break;
28183+ }
28184+
28185+ case glClear_func:
28186+ /* HACK workaround for an unexplainable issue */
28187+ if (args[0] & GL_COLOR_BUFFER_BIT)
28188+ glClear(GL_COLOR_BUFFER_BIT);
28189+ if (args[0] & GL_STENCIL_BUFFER_BIT)
28190+ glClear(GL_STENCIL_BUFFER_BIT);
28191+ if (args[0] & GL_DEPTH_BUFFER_BIT)
28192+ glClear(GL_DEPTH_BUFFER_BIT);
28193+ if (args[0] & GL_ACCUM_BUFFER_BIT)
28194+ glClear(GL_ACCUM_BUFFER_BIT);
28195+ break;
28196+
28197+ default:
28198+ execute_func(func_number, args, &ret_int, &ret_char);
28199+ break;
28200+ }
28201+
28202+#ifdef SYSTEMATIC_ERROR_CHECK
28203+ if (func_number == glGetError_func) {
28204+ process->current_state->last_error = 0;
28205+ } else {
28206+ process->current_state->last_error = glGetError();
28207+ if (process->current_state->last_error != 0) {
28208+ printf("error %s 0x%x\n", tab_opengl_calls_name[func_number],
28209+ process->current_state->last_error);
28210+ }
28211+ }
28212+#endif
28213+
28214+ switch (ret_type) {
28215+ case TYPE_NONE:
28216+ break;
28217+
28218+ case TYPE_CHAR:
28219+ case TYPE_UNSIGNED_CHAR:
28220+ ret_int = ret_char;
28221+ break;
28222+
28223+ case TYPE_INT:
28224+ case TYPE_UNSIGNED_INT:
28225+ break;
28226+
28227+ case TYPE_CONST_CHAR:
28228+ {
28229+ strncpy(ret_string, (ret_str) ? ret_str : "", 32768);
28230+ break;
28231+ }
28232+
28233+ default:
28234+ fprintf(stderr, "unexpected ret type : %d\n", ret_type);
28235+ exit(-1);
28236+ break;
28237+ }
28238+
28239+ if (display_function_call)
28240+ fprintf(stderr, "[%d]< %s\n", process->instr_counter,
28241+ tab_opengl_calls_name[func_number]);
28242+
28243+ return ret_int;
28244+}
28245Index: trunk/target-i386/opengl_func.h
28246===================================================================
28247--- /dev/null 1970-01-01 00:00:00.000000000 +0000
28248+++ trunk/target-i386/opengl_func.h 2009-01-19 23:06:08.000000000 +0000
28249@@ -0,0 +1,1108 @@
28250+/*
28251+ * Main header for both host and guest sides
28252+ *
28253+ * Copyright (c) 2006,2007 Even Rouault
28254+ *
28255+ * Permission is hereby granted, free of charge, to any person obtaining a copy
28256+ * of this software and associated documentation files (the "Software"), to deal
28257+ * in the Software without restriction, including without limitation the rights
28258+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
28259+ * copies of the Software, and to permit persons to whom the Software is
28260+ * furnished to do so, subject to the following conditions:
28261+ *
28262+ * The above copyright notice and this permission notice shall be included in
28263+ * all copies or substantial portions of the Software.
28264+ *
28265+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28266+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28267+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
28268+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28269+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28270+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28271+ * THE SOFTWARE.
28272+ */
28273+
28274+#include "mesa_gl.h"
28275+#include "mesa_glext.h"
28276+
28277+/* Argument list are internally of a type that can hold a target pointer
28278+ * or a host pointer. */
28279+typedef target_phys_addr_t arg_t;
28280+
28281+enum {
28282+ TYPE_NONE,
28283+ TYPE_CHAR,
28284+ TYPE_UNSIGNED_CHAR,
28285+ TYPE_SHORT,
28286+ TYPE_UNSIGNED_SHORT,
28287+ TYPE_INT,
28288+ TYPE_UNSIGNED_INT,
28289+ TYPE_FLOAT,
28290+ TYPE_DOUBLE,
28291+ TYPE_1CHAR,
28292+ TYPE_2CHAR,
28293+ TYPE_3CHAR,
28294+ TYPE_4CHAR,
28295+ TYPE_128UCHAR,
28296+ TYPE_1SHORT,
28297+ TYPE_2SHORT,
28298+ TYPE_3SHORT,
28299+ TYPE_4SHORT,
28300+ TYPE_1INT,
28301+ TYPE_2INT,
28302+ TYPE_3INT,
28303+ TYPE_4INT,
28304+ TYPE_1FLOAT,
28305+ TYPE_2FLOAT,
28306+ TYPE_3FLOAT,
28307+ TYPE_4FLOAT,
28308+ TYPE_16FLOAT,
28309+ TYPE_1DOUBLE,
28310+ TYPE_2DOUBLE,
28311+ TYPE_3DOUBLE,
28312+ TYPE_4DOUBLE,
28313+ TYPE_16DOUBLE,
28314+ TYPE_OUT_1INT,
28315+ TYPE_OUT_1FLOAT,
28316+ TYPE_OUT_4CHAR,
28317+ TYPE_OUT_4INT,
28318+ TYPE_OUT_4FLOAT,
28319+ TYPE_OUT_4DOUBLE,
28320+ TYPE_OUT_128UCHAR,
28321+ TYPE_CONST_CHAR,
28322+ TYPE_ARRAY_CHAR,
28323+ TYPE_ARRAY_SHORT,
28324+ TYPE_ARRAY_INT,
28325+ TYPE_ARRAY_FLOAT,
28326+ TYPE_ARRAY_DOUBLE,
28327+ TYPE_IN_IGNORED_POINTER,
28328+ TYPE_OUT_ARRAY_CHAR,
28329+ TYPE_OUT_ARRAY_SHORT,
28330+ TYPE_OUT_ARRAY_INT,
28331+ TYPE_OUT_ARRAY_FLOAT,
28332+ TYPE_OUT_ARRAY_DOUBLE,
28333+ TYPE_NULL_TERMINATED_STRING,
28334+
28335+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28336+ TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28337+ TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28338+ TYPE_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28339+ TYPE_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28340+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28341+ TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28342+ TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28343+ TYPE_OUT_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28344+ TYPE_OUT_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28345+ /* .... */
28346+ TYPE_LAST,
28347+ /* .... */
28348+ TYPE_1UCHAR = TYPE_CHAR,
28349+ TYPE_1USHORT = TYPE_1SHORT,
28350+ TYPE_1UINT = TYPE_1INT,
28351+ TYPE_OUT_1UINT = TYPE_OUT_1INT,
28352+ TYPE_OUT_4UCHAR = TYPE_OUT_4CHAR,
28353+ TYPE_ARRAY_VOID = TYPE_ARRAY_CHAR,
28354+ TYPE_ARRAY_SIGNED_CHAR = TYPE_ARRAY_CHAR,
28355+ TYPE_ARRAY_UNSIGNED_CHAR = TYPE_ARRAY_CHAR,
28356+ TYPE_ARRAY_UNSIGNED_SHORT = TYPE_ARRAY_SHORT,
28357+ TYPE_ARRAY_UNSIGNED_INT = TYPE_ARRAY_INT,
28358+ TYPE_OUT_ARRAY_VOID = TYPE_OUT_ARRAY_CHAR,
28359+ TYPE_OUT_ARRAY_SIGNED_CHAR = TYPE_OUT_ARRAY_CHAR,
28360+ TYPE_OUT_ARRAY_UNSIGNED_CHAR = TYPE_OUT_ARRAY_CHAR,
28361+ TYPE_OUT_ARRAY_UNSIGNED_SHORT = TYPE_OUT_ARRAY_SHORT,
28362+ TYPE_OUT_ARRAY_UNSIGNED_INT = TYPE_OUT_ARRAY_INT,
28363+ TYPE_ARRAY_VOID_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28364+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28365+ TYPE_ARRAY_SIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28366+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28367+ TYPE_ARRAY_UNSIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28368+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28369+ TYPE_ARRAY_UNSIGNED_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28370+ TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28371+ TYPE_ARRAY_UNSIGNED_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28372+ TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28373+ TYPE_OUT_ARRAY_VOID_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28374+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28375+ TYPE_OUT_ARRAY_SIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28376+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28377+ TYPE_OUT_ARRAY_UNSIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28378+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28379+ TYPE_OUT_ARRAY_UNSIGNED_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28380+ TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28381+ TYPE_OUT_ARRAY_UNSIGNED_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28382+ TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28383+};
28384+
28385+#define CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS \
28386+ case TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28387+ case TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28388+ case TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28389+ case TYPE_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28390+ case TYPE_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28391+
28392+#define CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS \
28393+ case TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28394+ case TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28395+ case TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28396+ case TYPE_OUT_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28397+ case TYPE_OUT_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28398+
28399+#define CASE_IN_UNKNOWN_SIZE_POINTERS \
28400+ case TYPE_ARRAY_CHAR: \
28401+ case TYPE_ARRAY_SHORT: \
28402+ case TYPE_ARRAY_INT: \
28403+ case TYPE_ARRAY_FLOAT: \
28404+ case TYPE_ARRAY_DOUBLE
28405+
28406+#define CASE_IN_KNOWN_SIZE_POINTERS \
28407+ case TYPE_1CHAR:\
28408+ case TYPE_2CHAR:\
28409+ case TYPE_3CHAR:\
28410+ case TYPE_4CHAR:\
28411+ case TYPE_128UCHAR:\
28412+ case TYPE_1SHORT:\
28413+ case TYPE_2SHORT:\
28414+ case TYPE_3SHORT:\
28415+ case TYPE_4SHORT:\
28416+ case TYPE_1INT:\
28417+ case TYPE_2INT:\
28418+ case TYPE_3INT:\
28419+ case TYPE_4INT:\
28420+ case TYPE_1FLOAT:\
28421+ case TYPE_2FLOAT:\
28422+ case TYPE_3FLOAT:\
28423+ case TYPE_4FLOAT:\
28424+ case TYPE_16FLOAT:\
28425+ case TYPE_1DOUBLE:\
28426+ case TYPE_2DOUBLE:\
28427+ case TYPE_3DOUBLE:\
28428+ case TYPE_4DOUBLE:\
28429+ case TYPE_16DOUBLE
28430+
28431+#define CASE_OUT_UNKNOWN_SIZE_POINTERS \
28432+ case TYPE_OUT_ARRAY_CHAR: \
28433+ case TYPE_OUT_ARRAY_SHORT: \
28434+ case TYPE_OUT_ARRAY_INT: \
28435+ case TYPE_OUT_ARRAY_FLOAT: \
28436+ case TYPE_OUT_ARRAY_DOUBLE
28437+
28438+#define CASE_OUT_KNOWN_SIZE_POINTERS \
28439+ case TYPE_OUT_1INT: \
28440+ case TYPE_OUT_1FLOAT: \
28441+ case TYPE_OUT_4CHAR: \
28442+ case TYPE_OUT_4INT: \
28443+ case TYPE_OUT_4FLOAT: \
28444+ case TYPE_OUT_4DOUBLE: \
28445+ case TYPE_OUT_128UCHAR \
28446+
28447+#define CASE_IN_POINTERS CASE_IN_UNKNOWN_SIZE_POINTERS: CASE_IN_KNOWN_SIZE_POINTERS: CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28448+#define CASE_OUT_POINTERS CASE_OUT_UNKNOWN_SIZE_POINTERS: CASE_OUT_KNOWN_SIZE_POINTERS: CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28449+
28450+#define CASE_POINTERS CASE_IN_POINTERS: CASE_OUT_POINTERS
28451+#define CASE_KNOWN_SIZE_POINTERS CASE_IN_KNOWN_SIZE_POINTERS: CASE_OUT_KNOWN_SIZE_POINTERS
28452+
28453+
28454+#define IS_ARRAY_CHAR(type) (type == TYPE_ARRAY_CHAR || type == TYPE_1CHAR || type == TYPE_2CHAR || type == TYPE_3CHAR || type == TYPE_4CHAR || type == TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS)
28455+#define IS_ARRAY_SHORT(type) (type == TYPE_ARRAY_SHORT || type == TYPE_1SHORT || type == TYPE_2SHORT || type == TYPE_3SHORT || type == TYPE_4SHORT || type == TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS)
28456+#define IS_ARRAY_INT(type) (type == TYPE_ARRAY_INT || type == TYPE_1INT || type == TYPE_2INT || type == TYPE_3INT || type == TYPE_4INT || type == TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS)
28457+#define IS_ARRAY_FLOAT(type) (type == TYPE_ARRAY_FLOAT || type == TYPE_1FLOAT || type == TYPE_2FLOAT || type == TYPE_3FLOAT || type == TYPE_4FLOAT || type == TYPE_16FLOAT || type == TYPE_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS)
28458+#define IS_ARRAY_DOUBLE(type) (type == TYPE_ARRAY_DOUBLE || type == TYPE_1DOUBLE || type == TYPE_2DOUBLE || type == TYPE_3DOUBLE || type == TYPE_4DOUBLE || type == TYPE_16DOUBLE || type == TYPE_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS)
28459+
28460+#define NB_MAX_TEXTURES 16
28461+#define MY_GL_MAX_VERTEX_ATTRIBS_ARB 16
28462+#define MY_GL_MAX_VERTEX_ATTRIBS_NV 16
28463+#define MY_GL_MAX_VARIANT_POINTER_EXT 16
28464+
28465+static int tab_args_type_length[] = {
28466+ 0,
28467+ sizeof(char),
28468+ sizeof(unsigned char),
28469+ sizeof(short),
28470+ sizeof(unsigned short),
28471+ sizeof(int),
28472+ sizeof(unsigned int),
28473+ sizeof(float),
28474+ sizeof(double),
28475+ 1 * sizeof(char),
28476+ 2 * sizeof(char),
28477+ 3 * sizeof(char),
28478+ 4 * sizeof(char),
28479+ 128 * sizeof(char),
28480+ 1 * sizeof(short),
28481+ 2 * sizeof(short),
28482+ 3 * sizeof(short),
28483+ 4 * sizeof(short),
28484+ 1 * sizeof(int),
28485+ 2 * sizeof(int),
28486+ 3 * sizeof(int),
28487+ 4 * sizeof(int),
28488+ 1 * sizeof(float),
28489+ 2 * sizeof(float),
28490+ 3 * sizeof(float),
28491+ 4 * sizeof(float),
28492+ 16 * sizeof(float),
28493+ 1 * sizeof(double),
28494+ 2 * sizeof(double),
28495+ 3 * sizeof(double),
28496+ 4 * sizeof(double),
28497+ 16 * sizeof(double),
28498+ sizeof(int),
28499+ sizeof(float),
28500+ 4 * sizeof(char),
28501+ 4 * sizeof(int),
28502+ 4 * sizeof(float),
28503+ 4 * sizeof(double),
28504+ 128 * sizeof(char),
28505+ 0,
28506+ 0,
28507+ 0,
28508+ 0,
28509+ 0,
28510+ 0,
28511+ 0,
28512+ 0,
28513+ 0,
28514+ 0,
28515+ 0,
28516+ 0,
28517+ 0,
28518+
28519+ /* the following sizes are the size of 1 element of the array */
28520+ sizeof(char),
28521+ sizeof(short),
28522+ sizeof(int),
28523+ sizeof(float),
28524+ sizeof(double),
28525+ sizeof(char),
28526+ sizeof(short),
28527+ sizeof(int),
28528+ sizeof(float),
28529+ sizeof(double),
28530+};
28531+
28532+typedef struct {
28533+ int ret_type;
28534+ int has_out_parameters;
28535+ int nb_args;
28536+ int args_type[0];
28537+} Signature;
28538+
28539+static const int _init32_signature[] =
28540+ { TYPE_NONE, 1, 2, TYPE_INT, TYPE_OUT_1INT };
28541+static const int _init64_signature[] =
28542+ { TYPE_NONE, 1, 2, TYPE_INT, TYPE_OUT_1INT };
28543+
28544+static const int _synchronize_signature[] = { TYPE_INT, 0, 0 };
28545+
28546+static const int _serialized_calls_signature[] =
28547+ { TYPE_NONE, 0, 1, TYPE_ARRAY_CHAR };
28548+
28549+static const int _exit_process_signature[] = { TYPE_NONE, 0, 0 };
28550+
28551+static const int _changeWindowState_signature[] =
28552+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
28553+
28554+static const int _moveResizeWindow_signature[] =
28555+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_4INT };
28556+
28557+static const int _send_cursor_signature[] =
28558+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT,
28559+ TYPE_INT, TYPE_INT,
28560+ TYPE_INT, TYPE_INT,
28561+ TYPE_ARRAY_INT
28562+};
28563+
28564+/* XVisualInfo* glXChooseVisual( Display *dpy, int screen, int *attribList ) */
28565+static const int glXChooseVisual_signature[] =
28566+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT };
28567+
28568+/*GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis,
28569+ GLXContext shareList, Bool direct )*/
28570+static const int glXCreateContext_signature[] =
28571+ { TYPE_INT, 0, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT };
28572+
28573+static const int glXCopyContext_signature[] =
28574+ { TYPE_NONE, 0, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28575+TYPE_INT };
28576+
28577+/* void glXDestroyContext( Display *dpy, GLXContext ctx ) */
28578+static const int glXDestroyContext_signature[] =
28579+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28580+
28581+/* Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable, GLXContext ctx) */
28582+//static const int glXMakeCurrent_signature[] = {TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT};
28583+/* making it asynchronous */
28584+static const int glXMakeCurrent_signature[] =
28585+ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
28586+
28587+/*int glXGetConfig( Display *dpy, XVisualInfo *visual,
28588+ int attrib, int *value )*/
28589+static const int glXGetConfig_signature[] =
28590+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28591+TYPE_OUT_1INT };
28592+
28593+/* "glXGetConfig_extended"(dpy, visual_id, int n, int* attribs, int* values, int* rets) */
28594+static const int glXGetConfig_extended_signature[] =
28595+ { TYPE_NONE, 1, 6, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28596+TYPE_ARRAY_INT, TYPE_OUT_ARRAY_INT, TYPE_OUT_ARRAY_INT };
28597+
28598+/* void glXSwapBuffers( Display *dpy, GLXDrawable drawable ); */
28599+static const int glXSwapBuffers_signature[] =
28600+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28601+
28602+/* Bool glXQueryVersion( Display *dpy, int *maj, int *min ) */
28603+static const int glXQueryVersion_signature[] =
28604+ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_OUT_1INT, TYPE_OUT_1INT };
28605+
28606+/* Bool glXQueryExtension( Display *dpy, int *errorBase, int *eventBase ) */
28607+static const int glXQueryExtension_signature[] =
28608+ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_OUT_1INT, TYPE_OUT_1INT };
28609+
28610+static const int glXWaitGL_signature[] = { TYPE_INT, 0, 0 };
28611+static const int glXWaitX_signature[] = { TYPE_INT, 0, 0 };
28612+
28613+/* GLX 1.1 and later */
28614+
28615+/* const char *glXGetClientString( Display *dpy, int name ) */
28616+static const int glXGetClientString_signature[] =
28617+ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28618+
28619+/*const char *glXQueryExtensionsString( Display *dpy, int screen ) */
28620+static const int glXQueryExtensionsString_signature[] =
28621+ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28622+
28623+/* const char *glXQueryServerString( Display *dpy, int screen, int name ) */
28624+static const int glXQueryServerString_signature[] =
28625+ { TYPE_CONST_CHAR, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
28626+
28627+
28628+static const int glXGetProcAddress_fake_signature[] =
28629+ { TYPE_INT, 0, 1, TYPE_NULL_TERMINATED_STRING };
28630+
28631+static const int glXGetProcAddress_global_fake_signature[] =
28632+ { TYPE_NONE, 1, 3, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_OUT_ARRAY_CHAR };
28633+
28634+
28635+/* GLX 1.3 and later */
28636+
28637+/*
28638+GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
28639+ const int *attribList, int *nitems ); */
28640+static const int glXChooseFBConfig_signature[] =
28641+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT,
28642+TYPE_OUT_1INT };
28643+
28644+static const int glXChooseFBConfigSGIX_signature[] =
28645+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT,
28646+TYPE_OUT_1INT };
28647+
28648+static const int glXGetFBConfigs_signature[] =
28649+ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_OUT_1INT };
28650+
28651+/* "glXGetFBConfigAttrib_extended"(dpy, fbconfig, int n, int* attribs, int* values, int* rets) */
28652+static const int glXGetFBConfigAttrib_extended_signature[] =
28653+ { TYPE_NONE, 1, 6, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28654+TYPE_ARRAY_INT, TYPE_OUT_ARRAY_INT, TYPE_OUT_ARRAY_INT };
28655+
28656+
28657+/* GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config,
28658+ const int *attribList ) */
28659+static const int glXCreatePbuffer_signature[] =
28660+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT };
28661+
28662+static const int glXCreateGLXPbufferSGIX_signature[] =
28663+ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
28664+TYPE_ARRAY_INT };
28665+
28666+static const int glXDestroyPbuffer_signature[] =
28667+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28668+
28669+static const int glXDestroyGLXPbufferSGIX_signature[] =
28670+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28671+
28672+/* GLXContext glXCreateNewContext(Display * dpy
28673+ GLXFBConfig config
28674+ int renderType
28675+ GLXContext ShareList
28676+ Bool Direct) */
28677+static const int glXCreateNewContext_signature[] =
28678+ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
28679+TYPE_INT };
28680+
28681+static const int glXCreateContextWithConfigSGIX_signature[] =
28682+ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
28683+TYPE_INT };
28684+
28685+/*XVisualInfo *glXGetVisualFromFBConfig( Display *dpy, GLXFBConfig config ) */
28686+static const int glXGetVisualFromFBConfig_signature[] =
28687+ { TYPE_INT, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28688+
28689+/*int glXGetFBConfigAttrib(Display *dpy, GLXFBConfig config, int attribute, int *value)*/
28690+static const int glXGetFBConfigAttrib_signature[] =
28691+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28692+TYPE_OUT_1INT };
28693+
28694+static const int glXGetFBConfigAttribSGIX_signature[] =
28695+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28696+TYPE_OUT_1INT };
28697+
28698+static const int glXQueryContext_signature[] =
28699+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28700+TYPE_OUT_1INT };
28701+
28702+static const int glXQueryGLXPbufferSGIX_signature[] =
28703+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28704+TYPE_OUT_1INT };
28705+
28706+static const int glXQueryDrawable_signature[] =
28707+ { TYPE_NONE, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28708+TYPE_OUT_1INT };
28709+
28710+/* void glXUseXFont( Font font, int first, int count, int list ) */
28711+static const int glXUseXFont_signature[] =
28712+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
28713+
28714+/* Bool glXIsDirect( Display *dpy, GLXContext ctx ) */
28715+static const int glXIsDirect_signature[] =
28716+ { TYPE_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28717+
28718+static const int glXGetScreenDriver_signature[] =
28719+ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28720+
28721+static const int glXGetDriverConfig_signature[] =
28722+ { TYPE_CONST_CHAR, 0, 1, TYPE_NULL_TERMINATED_STRING };
28723+
28724+
28725+static const int glXWaitVideoSyncSGI_signature[] =
28726+ { TYPE_INT, 1, 3, TYPE_INT, TYPE_INT, TYPE_OUT_1INT };
28727+
28728+static const int glXGetVideoSyncSGI_signature[] =
28729+ { TYPE_INT, 1, 1, TYPE_OUT_1INT };
28730+
28731+static const int glXSwapIntervalSGI_signature[] =
28732+ { TYPE_INT, 0, 1, TYPE_INT };
28733+
28734+static const int glXBindTexImageATI_signature[] =
28735+ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
28736+static const int glXReleaseTexImageATI_signature[] =
28737+ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
28738+static const int glXBindTexImageARB_signature[] =
28739+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
28740+static const int glXReleaseTexImageARB_signature[] =
28741+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
28742+
28743+/* const GLubyte * glGetString( GLenum name ) */
28744+static const int glGetString_signature[] =
28745+ { TYPE_CONST_CHAR, 0, 1, TYPE_INT };
28746+
28747+/* void glShaderSourceARB (GLhandleARB handle , GLsizei size, const GLcharARB* *p_tab_prog, const GLint * tab_length) */
28748+/* --> void glShaderSourceARB (GLhandleARB handle , GLsizei size, const GLcharARB* all_progs, const GLint * tab_length) */
28749+static const int glShaderSourceARB_fake_signature[] =
28750+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_ARRAY_INT };
28751+static const int glShaderSource_fake_signature[] =
28752+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_ARRAY_INT };
28753+
28754+static const int glVertexPointer_fake_signature[] =
28755+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28756+TYPE_ARRAY_CHAR };
28757+static const int glNormalPointer_fake_signature[] =
28758+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28759+TYPE_ARRAY_CHAR };
28760+static const int glColorPointer_fake_signature[] =
28761+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28762+TYPE_ARRAY_CHAR };
28763+static const int glSecondaryColorPointer_fake_signature[] =
28764+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28765+TYPE_ARRAY_CHAR };
28766+static const int glIndexPointer_fake_signature[] =
28767+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28768+TYPE_ARRAY_CHAR };
28769+static const int glTexCoordPointer_fake_signature[] =
28770+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28771+TYPE_INT, TYPE_ARRAY_CHAR };
28772+static const int glEdgeFlagPointer_fake_signature[] =
28773+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
28774+static const int glVertexAttribPointerARB_fake_signature[] =
28775+ { TYPE_NONE, 0, 8, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28776+TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
28777+static const int glVertexAttribPointerNV_fake_signature[] =
28778+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28779+TYPE_INT, TYPE_ARRAY_CHAR };
28780+static const int glWeightPointerARB_fake_signature[] =
28781+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28782+TYPE_ARRAY_CHAR };
28783+static const int glMatrixIndexPointerARB_fake_signature[] =
28784+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28785+TYPE_ARRAY_CHAR };
28786+static const int glFogCoordPointer_fake_signature[] =
28787+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28788+TYPE_ARRAY_CHAR };
28789+static const int glInterleavedArrays_fake_signature[] =
28790+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28791+TYPE_ARRAY_CHAR };
28792+static const int glElementPointerATI_fake_signature[] =
28793+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
28794+static const int glVariantPointerEXT_fake_signature[] =
28795+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28796+TYPE_ARRAY_CHAR };
28797+static const int glTuxRacerDrawElements_fake_signature[] =
28798+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
28799+static const int glVertexAndNormalPointer_fake_signature[] =
28800+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28801+TYPE_INT, TYPE_ARRAY_CHAR };
28802+static const int glTexCoordPointer01_fake_signature[] =
28803+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28804+TYPE_ARRAY_CHAR };
28805+static const int glTexCoordPointer012_fake_signature[] =
28806+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28807+TYPE_ARRAY_CHAR };
28808+static const int glVertexNormalPointerInterlaced_fake_signature[] =
28809+ { TYPE_NONE, 0, 8, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28810+TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
28811+static const int glVertexNormalColorPointerInterlaced_fake_signature[] =
28812+ { TYPE_NONE, 0, 11, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28813+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
28814+static const int glVertexColorTexCoord0PointerInterlaced_fake_signature[] =
28815+ { TYPE_NONE, 0, 12, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28816+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
28817+static const int glVertexNormalTexCoord0PointerInterlaced_fake_signature[] =
28818+ { TYPE_NONE, 0, 11, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28819+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
28820+static const int glVertexNormalTexCoord01PointerInterlaced_fake_signature[] =
28821+ { TYPE_NONE, 0, 14, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28822+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
28823+static const int glVertexNormalTexCoord012PointerInterlaced_fake_signature[] =
28824+ { TYPE_NONE, 0, 17, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28825+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
28826+static const int
28827+ glVertexNormalColorTexCoord0PointerInterlaced_fake_signature[] =
28828+ { TYPE_NONE, 0, 14, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28829+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28830+TYPE_ARRAY_CHAR };
28831+static const int
28832+ glVertexNormalColorTexCoord01PointerInterlaced_fake_signature[] =
28833+ { TYPE_NONE, 0, 17, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28834+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28835+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
28836+static const int
28837+ glVertexNormalColorTexCoord012PointerInterlaced_fake_signature[] =
28838+ { TYPE_NONE, 0, 20, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28839+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28840+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
28841+
28842+static const int glGenTextures_fake_signature[] =
28843+ { TYPE_NONE, 0, 1, TYPE_INT };
28844+static const int glGenBuffersARB_fake_signature[] =
28845+ { TYPE_NONE, 0, 1, TYPE_INT };
28846+static const int glGenLists_fake_signature[] = { TYPE_NONE, 0, 1, TYPE_INT };
28847+
28848+static const int _glDrawElements_buffer_signature[] =
28849+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
28850+static const int _glDrawRangeElements_buffer_signature[] =
28851+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28852+TYPE_INT };
28853+static const int _glMultiDrawElements_buffer_signature[] =
28854+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_ARRAY_INT, TYPE_INT, TYPE_ARRAY_INT,
28855+TYPE_INT };
28856+
28857+static const int _glVertexPointer_buffer_signature[] =
28858+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
28859+static const int _glNormalPointer_buffer_signature[] =
28860+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
28861+static const int _glColorPointer_buffer_signature[] =
28862+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
28863+static const int _glSecondaryColorPointer_buffer_signature[] =
28864+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
28865+static const int _glIndexPointer_buffer_signature[] =
28866+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
28867+static const int _glTexCoordPointer_buffer_signature[] =
28868+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
28869+static const int _glEdgeFlagPointer_buffer_signature[] =
28870+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
28871+static const int _glVertexAttribPointerARB_buffer_signature[] =
28872+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28873+TYPE_INT };
28874+static const int _glWeightPointerARB_buffer_signature[] =
28875+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
28876+static const int _glMatrixIndexPointerARB_buffer_signature[] =
28877+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
28878+static const int _glFogCoordPointer_buffer_signature[] =
28879+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
28880+static const int _glVariantPointerEXT_buffer_signature[] =
28881+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
28882+
28883+static const int _glReadPixels_pbo_signature[] =
28884+ { TYPE_INT, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28885+TYPE_INT, TYPE_INT };
28886+static const int _glDrawPixels_pbo_signature[] =
28887+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
28888+static const int _glMapBufferARB_fake_signature[] =
28889+ { TYPE_INT, 1, 3, TYPE_INT, TYPE_INT, TYPE_OUT_ARRAY_CHAR };
28890+
28891+static const int _glSelectBuffer_fake_signature[] =
28892+ { TYPE_NONE, 0, 1, TYPE_INT };
28893+static const int _glGetSelectBuffer_fake_signature[] =
28894+ { TYPE_NONE, 1, 1, TYPE_ARRAY_CHAR };
28895+static const int _glFeedbackBuffer_fake_signature[] =
28896+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
28897+static const int _glGetFeedbackBuffer_fake_signature[] =
28898+ { TYPE_NONE, 1, 1, TYPE_ARRAY_CHAR };
28899+
28900+static const int _glGetError_fake_signature[] = { TYPE_NONE, 0, 0 };
28901+
28902+#define timesynchro_func -1
28903+#define memorize_array_func -2
28904+#define reuse_array_func -3
28905+
28906+#include "gl_func.h"
28907+
28908+static GLint __glTexParameter_size(FILE *err_file, GLenum pname)
28909+{
28910+ switch (pname) {
28911+ case GL_TEXTURE_MAG_FILTER:
28912+ case GL_TEXTURE_MIN_FILTER:
28913+ case GL_TEXTURE_WRAP_S:
28914+ case GL_TEXTURE_WRAP_T:
28915+ case GL_TEXTURE_PRIORITY:
28916+ case GL_TEXTURE_WRAP_R:
28917+ case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
28918+/* case GL_SHADOW_AMBIENT_SGIX:*/
28919+ case GL_TEXTURE_MIN_LOD:
28920+ case GL_TEXTURE_MAX_LOD:
28921+ case GL_TEXTURE_BASE_LEVEL:
28922+ case GL_TEXTURE_MAX_LEVEL:
28923+ case GL_TEXTURE_CLIPMAP_FRAME_SGIX:
28924+ case GL_TEXTURE_LOD_BIAS_S_SGIX:
28925+ case GL_TEXTURE_LOD_BIAS_T_SGIX:
28926+ case GL_TEXTURE_LOD_BIAS_R_SGIX:
28927+ case GL_GENERATE_MIPMAP:
28928+/* case GL_GENERATE_MIPMAP_SGIS:*/
28929+ case GL_TEXTURE_COMPARE_SGIX:
28930+ case GL_TEXTURE_COMPARE_OPERATOR_SGIX:
28931+ case GL_TEXTURE_MAX_CLAMP_S_SGIX:
28932+ case GL_TEXTURE_MAX_CLAMP_T_SGIX:
28933+ case GL_TEXTURE_MAX_CLAMP_R_SGIX:
28934+ case GL_TEXTURE_MAX_ANISOTROPY_EXT:
28935+ case GL_TEXTURE_LOD_BIAS:
28936+/* case GL_TEXTURE_LOD_BIAS_EXT:*/
28937+ case GL_DEPTH_TEXTURE_MODE:
28938+/* case GL_DEPTH_TEXTURE_MODE_ARB:*/
28939+ case GL_TEXTURE_COMPARE_MODE:
28940+/* case GL_TEXTURE_COMPARE_MODE_ARB:*/
28941+ case GL_TEXTURE_COMPARE_FUNC:
28942+/* case GL_TEXTURE_COMPARE_FUNC_ARB:*/
28943+ case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV:
28944+ return 1;
28945+ case GL_TEXTURE_CLIPMAP_CENTER_SGIX:
28946+ case GL_TEXTURE_CLIPMAP_OFFSET_SGIX:
28947+ return 2;
28948+ case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX:
28949+ return 3;
28950+ case GL_TEXTURE_BORDER_COLOR:
28951+ case GL_POST_TEXTURE_FILTER_BIAS_SGIX:
28952+ case GL_POST_TEXTURE_FILTER_SCALE_SGIX:
28953+ return 4;
28954+ default:
28955+ fprintf(err_file, "unhandled pname = %d\n", pname);
28956+ return 0;
28957+ }
28958+}
28959+
28960+static int __glLight_size(FILE *err_file, GLenum pname)
28961+{
28962+ switch (pname) {
28963+ case GL_AMBIENT:
28964+ case GL_DIFFUSE:
28965+ case GL_SPECULAR:
28966+ case GL_POSITION:
28967+ return 4;
28968+ break;
28969+
28970+ case GL_SPOT_DIRECTION:
28971+ return 3;
28972+ break;
28973+
28974+ case GL_SPOT_EXPONENT:
28975+ case GL_SPOT_CUTOFF:
28976+ case GL_CONSTANT_ATTENUATION:
28977+ case GL_LINEAR_ATTENUATION:
28978+ case GL_QUADRATIC_ATTENUATION:
28979+ return 1;
28980+ break;
28981+
28982+ default:
28983+ fprintf(err_file, "unhandled pname = %d\n", pname);
28984+ return 0;
28985+ }
28986+}
28987+
28988+static int __glMaterial_size(FILE *err_file, GLenum pname)
28989+{
28990+ switch (pname) {
28991+ case GL_AMBIENT:
28992+ case GL_DIFFUSE:
28993+ case GL_SPECULAR:
28994+ case GL_EMISSION:
28995+ case GL_AMBIENT_AND_DIFFUSE:
28996+ return 4;
28997+ break;
28998+
28999+ case GL_SHININESS:
29000+ return 1;
29001+ break;
29002+
29003+ case GL_COLOR_INDEXES:
29004+ return 3;
29005+ break;
29006+
29007+ default:
29008+ fprintf(err_file, "unhandled pname = %d\n", pname);
29009+ return 0;
29010+ }
29011+}
29012+
29013+static inline int compute_arg_length(FILE *err_file, int func_number,
29014+ int arg_i, arg_t *args)
29015+{
29016+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
29017+ int *args_type = signature->args_type;
29018+
29019+ switch (func_number) {
29020+ case glProgramNamedParameter4fNV_func:
29021+ case glProgramNamedParameter4dNV_func:
29022+ case glProgramNamedParameter4fvNV_func:
29023+ case glProgramNamedParameter4dvNV_func:
29024+ case glGetProgramNamedParameterfvNV_func:
29025+ case glGetProgramNamedParameterdvNV_func:
29026+ if (arg_i == 2)
29027+ return 1 * args[arg_i - 1] *
29028+ tab_args_type_length[args_type[arg_i]];
29029+ break;
29030+
29031+ case glProgramStringARB_func:
29032+ case glLoadProgramNV_func:
29033+ case glGenProgramsNV_func:
29034+ case glDeleteProgramsNV_func:
29035+ case glGenProgramsARB_func:
29036+ case glDeleteProgramsARB_func:
29037+ case glRequestResidentProgramsNV_func:
29038+ case glDrawBuffers_func:
29039+ case glDrawBuffersARB_func:
29040+ case glDrawBuffersATI_func:
29041+ case glDeleteBuffers_func:
29042+ case glDeleteBuffersARB_func:
29043+ case glDeleteTextures_func:
29044+ case glDeleteTexturesEXT_func:
29045+ case glGenFramebuffersEXT_func:
29046+ case glDeleteFramebuffersEXT_func:
29047+ case glGenRenderbuffersEXT_func:
29048+ case glDeleteRenderbuffersEXT_func:
29049+ case glGenQueries_func:
29050+ case glGenQueriesARB_func:
29051+ case glDeleteQueries_func:
29052+ case glDeleteQueriesARB_func:
29053+ case glGenOcclusionQueriesNV_func:
29054+ case glDeleteOcclusionQueriesNV_func:
29055+ case glGenFencesNV_func:
29056+ case glDeleteFencesNV_func:
29057+ case glUniform1fv_func:
29058+ case glUniform1iv_func:
29059+ case glUniform1fvARB_func:
29060+ case glUniform1ivARB_func:
29061+ case glUniform1uivEXT_func:
29062+ case glVertexAttribs1dvNV_func:
29063+ case glVertexAttribs1fvNV_func:
29064+ case glVertexAttribs1svNV_func:
29065+ case glVertexAttribs1hvNV_func:
29066+ case glWeightbvARB_func:
29067+ case glWeightsvARB_func:
29068+ case glWeightivARB_func:
29069+ case glWeightfvARB_func:
29070+ case glWeightdvARB_func:
29071+ case glWeightubvARB_func:
29072+ case glWeightusvARB_func:
29073+ case glWeightuivARB_func:
29074+ case glPixelMapfv_func:
29075+ case glPixelMapuiv_func:
29076+ case glPixelMapusv_func:
29077+ case glProgramBufferParametersfvNV_func:
29078+ case glProgramBufferParametersIivNV_func:
29079+ case glProgramBufferParametersIuivNV_func:
29080+ case glTransformFeedbackAttribsNV_func:
29081+ case glTransformFeedbackVaryingsNV_func:
29082+ if (arg_i == signature->nb_args - 1)
29083+ return 1 * args[arg_i - 1] *
29084+ tab_args_type_length[args_type[arg_i]];
29085+ break;
29086+
29087+ case glUniform2fv_func:
29088+ case glUniform2iv_func:
29089+ case glUniform2fvARB_func:
29090+ case glUniform2ivARB_func:
29091+ case glUniform2uivEXT_func:
29092+ case glVertexAttribs2dvNV_func:
29093+ case glVertexAttribs2fvNV_func:
29094+ case glVertexAttribs2svNV_func:
29095+ case glVertexAttribs2hvNV_func:
29096+ case glDetailTexFuncSGIS_func:
29097+ case glSharpenTexFuncSGIS_func:
29098+ if (arg_i == signature->nb_args - 1)
29099+ return 2 * args[arg_i - 1] *
29100+ tab_args_type_length[args_type[arg_i]];
29101+ break;
29102+
29103+ case glUniform3fv_func:
29104+ case glUniform3iv_func:
29105+ case glUniform3fvARB_func:
29106+ case glUniform3ivARB_func:
29107+ case glUniform3uivEXT_func:
29108+ case glVertexAttribs3dvNV_func:
29109+ case glVertexAttribs3fvNV_func:
29110+ case glVertexAttribs3svNV_func:
29111+ case glVertexAttribs3hvNV_func:
29112+ if (arg_i == signature->nb_args - 1)
29113+ return 3 * args[arg_i - 1] *
29114+ tab_args_type_length[args_type[arg_i]];
29115+ break;
29116+
29117+ case glUniform4fv_func:
29118+ case glUniform4iv_func:
29119+ case glUniform4fvARB_func:
29120+ case glUniform4ivARB_func:
29121+ case glUniform4uivEXT_func:
29122+ case glVertexAttribs4dvNV_func:
29123+ case glVertexAttribs4fvNV_func:
29124+ case glVertexAttribs4svNV_func:
29125+ case glVertexAttribs4hvNV_func:
29126+ case glVertexAttribs4ubvNV_func:
29127+ case glProgramParameters4fvNV_func:
29128+ case glProgramParameters4dvNV_func:
29129+ case glProgramLocalParameters4fvEXT_func:
29130+ case glProgramEnvParameters4fvEXT_func:
29131+ case glProgramLocalParametersI4ivNV_func:
29132+ case glProgramLocalParametersI4uivNV_func:
29133+ case glProgramEnvParametersI4ivNV_func:
29134+ case glProgramEnvParametersI4uivNV_func:
29135+ if (arg_i == signature->nb_args - 1)
29136+ return 4 * args[arg_i - 1] *
29137+ tab_args_type_length[args_type[arg_i]];
29138+ break;
29139+
29140+ case glPrioritizeTextures_func:
29141+ case glPrioritizeTexturesEXT_func:
29142+ case glAreProgramsResidentNV_func:
29143+ case glAreTexturesResident_func:
29144+ case glAreTexturesResidentEXT_func:
29145+ if (arg_i == 1 || arg_i == 2)
29146+ return args[0] * tab_args_type_length[args_type[arg_i]];
29147+ break;
29148+
29149+ case glLightfv_func:
29150+ case glLightiv_func:
29151+ case glGetLightfv_func:
29152+ case glGetLightiv_func:
29153+ case glFragmentLightfvSGIX_func:
29154+ case glFragmentLightivSGIX_func:
29155+ case glGetFragmentLightfvSGIX_func:
29156+ case glGetFragmentLightivSGIX_func:
29157+ if (arg_i == signature->nb_args - 1)
29158+ return __glLight_size(err_file,
29159+ args[arg_i -
29160+ 1]) *
29161+ tab_args_type_length[args_type[arg_i]];
29162+ break;
29163+
29164+ case glLightModelfv_func:
29165+ case glLightModeliv_func:
29166+ if (arg_i == signature->nb_args - 1)
29167+ return ((args[arg_i - 1] ==
29168+ GL_LIGHT_MODEL_AMBIENT) ? 4 : 1) *
29169+ tab_args_type_length[args_type[arg_i]];
29170+ break;
29171+
29172+ case glFragmentLightModelfvSGIX_func:
29173+ case glFragmentLightModelivSGIX_func:
29174+ if (arg_i == signature->nb_args - 1)
29175+ return ((args[arg_i - 1] ==
29176+ GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX) ? 4 : 1) *
29177+ tab_args_type_length[args_type[arg_i]];
29178+ break;
29179+
29180+ case glMaterialfv_func:
29181+ case glMaterialiv_func:
29182+ case glGetMaterialfv_func:
29183+ case glGetMaterialiv_func:
29184+ case glFragmentMaterialfvSGIX_func:
29185+ case glFragmentMaterialivSGIX_func:
29186+ case glGetFragmentMaterialfvSGIX_func:
29187+ case glGetFragmentMaterialivSGIX_func:
29188+ if (arg_i == signature->nb_args - 1)
29189+ return __glMaterial_size(err_file,
29190+ args[arg_i -
29191+ 1]) *
29192+ tab_args_type_length[args_type[arg_i]];
29193+ break;
29194+
29195+ case glTexParameterfv_func:
29196+ case glTexParameteriv_func:
29197+ case glGetTexParameterfv_func:
29198+ case glGetTexParameteriv_func:
29199+ case glTexParameterIivEXT_func:
29200+ case glTexParameterIuivEXT_func:
29201+ case glGetTexParameterIivEXT_func:
29202+ case glGetTexParameterIuivEXT_func:
29203+ if (arg_i == signature->nb_args - 1)
29204+ return __glTexParameter_size(err_file,
29205+ args[arg_i -
29206+ 1]) *
29207+ tab_args_type_length[args_type[arg_i]];
29208+ break;
29209+
29210+ case glFogiv_func:
29211+ case glFogfv_func:
29212+ if (arg_i == signature->nb_args - 1)
29213+ return ((args[arg_i - 1] ==
29214+ GL_FOG_COLOR) ? 4 : 1) *
29215+ tab_args_type_length[args_type[arg_i]];
29216+ break;
29217+
29218+ case glTexGendv_func:
29219+ case glTexGenfv_func:
29220+ case glTexGeniv_func:
29221+ case glGetTexGendv_func:
29222+ case glGetTexGenfv_func:
29223+ case glGetTexGeniv_func:
29224+ if (arg_i == signature->nb_args - 1)
29225+ return ((args[arg_i - 1] ==
29226+ GL_TEXTURE_GEN_MODE) ? 1 : 4) *
29227+ tab_args_type_length[args_type[arg_i]];
29228+ break;
29229+
29230+ case glTexEnvfv_func:
29231+ case glTexEnviv_func:
29232+ case glGetTexEnvfv_func:
29233+ case glGetTexEnviv_func:
29234+ if (arg_i == signature->nb_args - 1)
29235+ return ((args[arg_i - 1] ==
29236+ GL_TEXTURE_ENV_MODE) ? 1 : 4) *
29237+ tab_args_type_length[args_type[arg_i]];
29238+ break;
29239+
29240+ case glConvolutionParameterfv_func:
29241+ case glConvolutionParameteriv_func:
29242+ case glGetConvolutionParameterfv_func:
29243+ case glGetConvolutionParameteriv_func:
29244+ case glConvolutionParameterfvEXT_func:
29245+ case glConvolutionParameterivEXT_func:
29246+ case glGetConvolutionParameterfvEXT_func:
29247+ case glGetConvolutionParameterivEXT_func:
29248+ if (arg_i == signature->nb_args - 1)
29249+ return ((args[arg_i - 1] == GL_CONVOLUTION_BORDER_COLOR ||
29250+ args[arg_i - 1] == GL_CONVOLUTION_FILTER_SCALE ||
29251+ args[arg_i - 1] ==
29252+ GL_CONVOLUTION_FILTER_BIAS) ? 4 : 1) *
29253+ tab_args_type_length[args_type[arg_i]];
29254+ break;
29255+
29256+ case glGetVertexAttribfvARB_func:
29257+ case glGetVertexAttribfvNV_func:
29258+ case glGetVertexAttribfv_func:
29259+ case glGetVertexAttribdvARB_func:
29260+ case glGetVertexAttribdvNV_func:
29261+ case glGetVertexAttribdv_func:
29262+ case glGetVertexAttribivARB_func:
29263+ case glGetVertexAttribivNV_func:
29264+ case glGetVertexAttribiv_func:
29265+ case glGetVertexAttribIivEXT_func:
29266+ case glGetVertexAttribIuivEXT_func:
29267+ if (arg_i == signature->nb_args - 1)
29268+ return ((args[arg_i - 1] ==
29269+ GL_CURRENT_VERTEX_ATTRIB_ARB) ? 4 : 1) *
29270+ tab_args_type_length[args_type[arg_i]];
29271+ break;
29272+
29273+
29274+ case glPointParameterfv_func:
29275+ case glPointParameterfvEXT_func:
29276+ case glPointParameterfvARB_func:
29277+ case glPointParameterfvSGIS_func:
29278+ case glPointParameteriv_func:
29279+ case glPointParameterivEXT_func:
29280+ if (arg_i == signature->nb_args - 1)
29281+ return ((args[arg_i - 1] ==
29282+ GL_POINT_DISTANCE_ATTENUATION) ? 3 : 1) *
29283+ tab_args_type_length[args_type[arg_i]];
29284+ break;
29285+
29286+ case glUniformMatrix2fv_func:
29287+ case glUniformMatrix2fvARB_func:
29288+ if (arg_i == signature->nb_args - 1)
29289+ return 2 * 2 * args[1] * tab_args_type_length[args_type[arg_i]];
29290+ break;
29291+
29292+ case glUniformMatrix3fv_func:
29293+ case glUniformMatrix3fvARB_func:
29294+ if (arg_i == signature->nb_args - 1)
29295+ return 3 * 3 * args[1] * tab_args_type_length[args_type[arg_i]];
29296+ break;
29297+
29298+ case glUniformMatrix4fv_func:
29299+ case glUniformMatrix4fvARB_func:
29300+ if (arg_i == signature->nb_args - 1)
29301+ return 4 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
29302+ break;
29303+
29304+ case glUniformMatrix2x3fv_func:
29305+ case glUniformMatrix3x2fv_func:
29306+ if (arg_i == signature->nb_args - 1)
29307+ return 2 * 3 * args[1] * tab_args_type_length[args_type[arg_i]];
29308+ break;
29309+
29310+ case glUniformMatrix2x4fv_func:
29311+ case glUniformMatrix4x2fv_func:
29312+ if (arg_i == signature->nb_args - 1)
29313+ return 2 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
29314+ break;
29315+
29316+ case glUniformMatrix3x4fv_func:
29317+ case glUniformMatrix4x3fv_func:
29318+ if (arg_i == signature->nb_args - 1)
29319+ return 3 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
29320+ break;
29321+
29322+ case glSpriteParameterivSGIX_func:
29323+ case glSpriteParameterfvSGIX_func:
29324+ if (arg_i == signature->nb_args - 1)
29325+ return ((args[arg_i - 1] ==
29326+ GL_SPRITE_MODE_SGIX) ? 1 : 3) *
29327+ tab_args_type_length[args_type[arg_i]];
29328+ break;
29329+
29330+ default:
29331+ break;
29332+ }
29333+
29334+ fprintf(err_file,
29335+ "invalid combination for compute_arg_length : func_number=%d, arg_i=%d\n",
29336+ func_number, arg_i);
29337+ return 0;
29338+}
29339+
29340+#define IS_NULL_POINTER_OK_FOR_FUNC(func_number) \
29341+ (func_number == glBitmap_func || \
29342+ func_number == _send_cursor_func || \
29343+ func_number == glTexImage1D_func || \
29344+ func_number == glTexImage2D_func || \
29345+ func_number == glTexImage3D_func || \
29346+ func_number == glBufferDataARB_func || \
29347+ func_number == glNewObjectBufferATI_func)
29348+
29349+#ifdef __amd64__
29350+#define _init_func _init64_func
29351+#else
29352+#ifdef __i386__
29353+#define _init_func _init32_func
29354+#else
29355+#error Unsupported ABI
29356+#endif
29357+#endif
29358Index: trunk/target-i386/opengl_player.c
29359===================================================================
29360--- /dev/null 1970-01-01 00:00:00.000000000 +0000
29361+++ trunk/target-i386/opengl_player.c 2009-01-19 23:06:08.000000000 +0000
29362@@ -0,0 +1,1461 @@
29363+/*
29364+ * Plays a sequence of OpenGL calls recorded either under qemu or with opengl_server
29365+ *
29366+ * Copyright (c) 2007 Even Rouault
29367+ *
29368+ * Permission is hereby granted, free of charge, to any person obtaining a copy
29369+ * of this software and associated documentation files (the "Software"), to deal
29370+ * in the Software without restriction, including without limitation the rights
29371+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
29372+ * copies of the Software, and to permit persons to whom the Software is
29373+ * furnished to do so, subject to the following conditions:
29374+ *
29375+ * The above copyright notice and this permission notice shall be included in
29376+ * all copies or substantial portions of the Software.
29377+ *
29378+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
29379+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29380+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
29381+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29382+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29383+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
29384+ * THE SOFTWARE.
29385+ */
29386+
29387+/* gcc -O2 -g -Wall opengl_player.c opengl_exec.c -o opengl_player -I../i386-softmmu -I. -I.. -lGL */
29388+
29389+#include <stdlib.h>
29390+#include <stdio.h>
29391+#include <string.h>
29392+#include <assert.h>
29393+#include <unistd.h>
29394+#include <sys/time.h>
29395+#include <math.h>
29396+
29397+#include <GL/gl.h>
29398+#include <X11/Xlib.h>
29399+
29400+// TODO
29401+typedef long unsigned int target_phys_addr_t;
29402+
29403+#include "opengl_func.h"
29404+#include "opengl_utils.h"
29405+
29406+//#include "ffmpeg/avcodec.h"
29407+
29408+extern void init_process_tab(void);
29409+extern int do_function_call(int, arg_t *, char *);
29410+
29411+void do_disconnect_current(void);
29412+void do_context_switch(Display *dpy, pid_t pid, int call);
29413+
29414+typedef struct {
29415+ int n_used;
29416+ unsigned int crc;
29417+ int size;
29418+ long long last_use;
29419+} RecordBufferedArray;
29420+
29421+typedef struct {
29422+ int size;
29423+ long file_offset;
29424+} ReplayBufferedArray;
29425+
29426+#define N_BUFFERED_ARRAYS 1024
29427+RecordBufferedArray recordBufferedArrays[N_BUFFERED_ARRAYS];
29428+
29429+#define INSTR_WINDOW_SIZE 65536
29430+short instrWindow[INSTR_WINDOW_SIZE];
29431+int instrWindowCount = 0;
29432+int instrWindowPtr = 0;
29433+int instrWindowBeginPtr = 0;
29434+
29435+#include "ghash.c"
29436+
29437+#define PRIME 131
29438+
29439+typedef struct {
29440+ int iFirstOccur;
29441+ int nbOccur;
29442+ int hash;
29443+} SeqDesc;
29444+
29445+typedef struct {
29446+ int hash;
29447+ int offset;
29448+} HashElt;
29449+
29450+int sort_hash_N;
29451+short *sort_hash_tab;
29452+int count_compar;
29453+int collision_detected;
29454+
29455+static int sort_hash(const void *ptrA, const void *ptrB)
29456+{
29457+ const HashElt *a = (const HashElt *) ptrA;
29458+ const HashElt *b = (const HashElt *) ptrB;
29459+
29460+ count_compar++;
29461+ if (a->hash == b->hash) {
29462+ int j;
29463+
29464+ for (j = 0; j < sort_hash_N; j++) {
29465+ if (sort_hash_tab[a->offset + j] != sort_hash_tab[b->offset + j]) {
29466+ collision_detected = 1;
29467+ // fprintf(stderr, "collision de hash !\n");
29468+ return sort_hash_tab[a->offset + j] <
29469+ sort_hash_tab[b->offset + j] ? -1 : 1;
29470+ }
29471+ }
29472+ return a->offset - b->offset;
29473+ } else if (a->hash < b->hash)
29474+ return -1;
29475+ else
29476+ return 1;
29477+}
29478+
29479+static int sort_seq_desc_by_occur(const void *ptrA, const void *ptrB)
29480+{
29481+ const SeqDesc *a = (const SeqDesc *) ptrA;
29482+ const SeqDesc *b = (const SeqDesc *) ptrB;
29483+
29484+ return b->nbOccur - a->nbOccur;
29485+}
29486+
29487+static int sort_seq_desc_by_offset(const void *ptrA, const void *ptrB)
29488+{
29489+ const SeqDesc *a = (const SeqDesc *) ptrA;
29490+ const SeqDesc *b = (const SeqDesc *) ptrB;
29491+
29492+ return a->iFirstOccur - b->iFirstOccur;
29493+}
29494+
29495+void find_repeated_seq(short *tab, int iStart, int length)
29496+{
29497+ // SimpleHashTable* tableHash = simple_hash_table_new(free);
29498+ int N = 10;
29499+ int i;
29500+ int hash = 0;
29501+ int primeN = 1;
29502+ HashElt *tabHash = malloc(sizeof(HashElt) * (length - N + 1));
29503+
29504+ short *new_tab = malloc(sizeof(short) * length);
29505+ memcpy(&new_tab[0], &tab[iStart], sizeof(short) * (length - iStart));
29506+ memcpy(&new_tab[length - iStart], &tab[0], sizeof(short) * iStart);
29507+ tab = new_tab;
29508+
29509+ sort_hash_N = N;
29510+ sort_hash_tab = tab;
29511+
29512+ fprintf(stderr, "(start) iStart = %d\n", iStart);
29513+ for (i = 0; i < N; i++) {
29514+ primeN *= PRIME;
29515+ }
29516+ for (i = 0; i < length; i++) {
29517+ hash = hash * PRIME + tab[i];
29518+ if (i >= N) {
29519+ hash -= tab[i - N] * primeN;
29520+ }
29521+ if (i >= N - 1) {
29522+ tabHash[i - (N - 1)].offset = i - (N - 1);
29523+ tabHash[i - (N - 1)].hash =
29524+ /* (i == 100) ? tabHash[0].hash : */ hash;
29525+#if 0
29526+ void **p_n_occurences =
29527+ simple_hash_table_lookup_pointer(tableHash, hash);
29528+ if (p_n_occurences == NULL) {
29529+ SeqDesc *seqDesc = malloc(sizeof(SeqDesc));
29530+
29531+ seqDesc->iFirstOccur = i - (N - 1);
29532+ seqDesc->nbOccur = 1;
29533+ simple_hash_table_insert(tableHash, hash, seqDesc);
29534+ } else {
29535+ SeqDesc *seqDesc = (SeqDesc *) (*p_n_occurences);
29536+ int j;
29537+
29538+ for (j = 0; j < N; j++) {
29539+ if (tab[(iStart + seqDesc->iFirstOccur + j) % length] !=
29540+ tab[(iStart + i - (N - 1) + j) % length])
29541+ break;
29542+ }
29543+ if (j != N)
29544+ fprintf(stderr, "arg\n");
29545+ seqDesc->nbOccur++;
29546+ // fprintf(stderr, "iStart = %d, i = %d, iFirstOccur = %d,
29547+ // nbOccur = %d\n", iStart, i, seqDesc->iFirstOccur,
29548+ // seqDesc->nbOccur);
29549+ }
29550+#endif
29551+ }
29552+ }
29553+ collision_detected = 0;
29554+ count_compar = 0;
29555+ qsort(tabHash, length - N + 1, sizeof(HashElt), sort_hash);
29556+ if (!collision_detected) {
29557+ SeqDesc *tabSeqDesc = (SeqDesc *) malloc(sizeof(SeqDesc) * length);
29558+ int nbSeqDesc = 0;
29559+ int lastI = 0;
29560+ int prevHash = tabHash[0].hash;
29561+
29562+ for (i = 1; i < length - N + 1; i++) {
29563+ if (tabHash[i].hash != prevHash) {
29564+ tabSeqDesc[nbSeqDesc].iFirstOccur = tabHash[lastI].offset;
29565+ tabSeqDesc[nbSeqDesc].nbOccur = i - lastI;
29566+ tabSeqDesc[nbSeqDesc].hash = prevHash;
29567+ nbSeqDesc++;
29568+ lastI = i;
29569+ prevHash = tabHash[i].hash;
29570+ }
29571+ }
29572+ tabSeqDesc[nbSeqDesc].iFirstOccur = tabHash[lastI].offset;
29573+ tabSeqDesc[nbSeqDesc].nbOccur = i - lastI;
29574+ nbSeqDesc++;
29575+ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc), sort_seq_desc_by_occur);
29576+ for (i = 0; i < nbSeqDesc; i++) {
29577+ if (tabSeqDesc[i].nbOccur < 10)
29578+ break;
29579+ // fprintf(stderr, "%d %d\n", tabSeqDesc[i].iFirstOccur,
29580+ // tabSeqDesc[i].nbOccur);
29581+ }
29582+ nbSeqDesc = i;
29583+ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc),
29584+ sort_seq_desc_by_offset);
29585+ lastI = tabSeqDesc[0].iFirstOccur;
29586+ int maxI = 0;
29587+ int j = 0;
29588+
29589+ for (i = 1; i < nbSeqDesc; i++) {
29590+ if (tabSeqDesc[i].iFirstOccur - lastI <= N) {
29591+ if (tabSeqDesc[i].nbOccur > tabSeqDesc[maxI].nbOccur) {
29592+ maxI = i;
29593+ }
29594+ } else {
29595+ tabSeqDesc[j].iFirstOccur = tabSeqDesc[maxI].iFirstOccur;
29596+ tabSeqDesc[j].nbOccur = tabSeqDesc[maxI].nbOccur;
29597+ j++;
29598+#define MAX(a,b) (((a)>(b)) ? (a) : (b))
29599+ lastI = tabSeqDesc[maxI].iFirstOccur;
29600+ while (i < nbSeqDesc &&
29601+ tabSeqDesc[i].iFirstOccur - lastI <= N)
29602+ i++;
29603+ if (i == nbSeqDesc)
29604+ break;
29605+ maxI = i;
29606+ }
29607+ }
29608+ nbSeqDesc = j;
29609+ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc), sort_seq_desc_by_occur);
29610+ for (i = 0; i < nbSeqDesc; i++) {
29611+ fprintf(stderr, "offset=%d occurNb=%d hash=%d:",
29612+ tabSeqDesc[i].iFirstOccur, tabSeqDesc[i].nbOccur,
29613+ tabSeqDesc[i].hash);
29614+ for (j = 0; j < N; j++)
29615+ fprintf(stderr, "%d ", tab[tabSeqDesc[i].iFirstOccur + j]);
29616+ fprintf(stderr, "\n");
29617+ }
29618+ free(tabSeqDesc);
29619+ } else {
29620+ fprintf(stderr, "collision de hash !\n");
29621+ }
29622+
29623+ fprintf(stderr, "(end) iStart = %d (count_compar = %d)\n", iStart,
29624+ count_compar);
29625+ // simple_hash_table_foreach(tableHash,
29626+ free(tabHash);
29627+ free(tab);
29628+#if 0
29629+ simple_hash_table_destroy(tableHash);
29630+#endif
29631+#if 0
29632+ int i, j, k;
29633+
29634+ for (i = 0; i < length; i++) {
29635+ int nMaxContiguous = 0;
29636+ int jMax = 0;
29637+
29638+ for (j = 0; j < length; j++) {
29639+ int nContiguous = 0;
29640+
29641+ for (k = 0; k < j - i; k++) {
29642+ if (tab[(iStart + i + k) % length] ==
29643+ tab[(iStart + i + j + k) % length]) {
29644+ nContiguous++;
29645+ } else
29646+ break;
29647+ }
29648+ if (nContiguous >= nMaxContiguous) {
29649+ nMaxContiguous = nContiguous;
29650+ jMax = j;
29651+ }
29652+ }
29653+ fprintf(stderr, "iStart = %d, i = %d, j = %d, nContiguous = %d\n",
29654+ iStart, i, i + jMax, nMaxContiguous);
29655+ }
29656+#endif
29657+}
29658+
29659+#define MAX_SERVER_STATE_STACK_SIZE 16
29660+
29661+typedef struct {
29662+ GLbitfield mask;
29663+ int matrixMode;
29664+ int lastMatrixOp;
29665+} ServerState;
29666+
29667+typedef struct {
29668+ ServerState stackAttrib[MAX_SERVER_STATE_STACK_SIZE];
29669+ int stackAttribPtr;
29670+ int matrixMode;
29671+ int lastMatrixOp;
29672+} GLState;
29673+
29674+#define NB_STATES 100
29675+GLState states[NB_STATES];
29676+
29677+void usage()
29678+{
29679+ printf("Usage : opengl_player [OPTION] filename\n\n");
29680+ printf
29681+ ("filename is the file where to read the OpenGL flow ('/tmp/debug_gl.bin' by default)\n");
29682+ printf("'-' is supported and stands for standard input\n\n");
29683+ printf("The following options are available :\n");
29684+ printf
29685+ ("--debug : output debugging trace on stderr\n");
29686+ printf("--disable-real-time-play-back : play as fast as possible\n");
29687+ printf
29688+ ("--show-hard-disk-bandwidth : displays regularly the data bandwidth\n");
29689+ printf("--h or --help : display this help\n");
29690+}
29691+
29692+int main(int argc, char *argv[])
29693+{
29694+ static int args_size[50];
29695+ int i;
29696+ int visualid_fbconfig_read = -1;
29697+ int visualid_fbconfig_real = 0;
29698+ char *filename = "/tmp/debug_gl.bin";
29699+ int slowdown = 0;
29700+ int debug = 0;
29701+ char *ret_string;
29702+ arg_t args[50];
29703+ struct timeval start_time, last_time, current_time;
29704+ int noplay = 0;
29705+ int count_last_time = 0, count_current = 0;
29706+ int refresh_rate = 500;
29707+ int disable_real_time_play_back = 0;
29708+ int show_hard_disk_bandwith = 0;
29709+ int last_offset = 0;
29710+ int resize = 0;
29711+ int window_width = 0, window_height = 0;
29712+ int orig_window_width = 0;
29713+ int show_offset = 0;
29714+ int show_diff_offset = 0;
29715+ int last_cmd_offset = 0;
29716+ FILE *compressed_file = NULL;
29717+ int sizeBufferedArraysPlay = 0;
29718+ ReplayBufferedArray *replayBufferedArrays = NULL;
29719+ int currentState = 0;
29720+
29721+ memset(recordBufferedArrays, 0, sizeof(recordBufferedArrays));
29722+ memset(states, 0, sizeof(states));
29723+ for (i = 0; i < NB_STATES; i++) {
29724+ states[i].matrixMode = GL_MODELVIEW;
29725+ states[i].lastMatrixOp = -1;
29726+ }
29727+
29728+ /* avcodec_init(); AVCodec* avCodec =
29729+ * avcodec_find_encoder(CODEC_ID_MPEG2VIDEO); AVCodecContext*
29730+ * avCodecContext = avcodec_alloc_context(); */
29731+
29732+ for (i = 1; i < argc; i++) {
29733+ if (argv[i][0] == '-' && argv[i][1] == '-')
29734+ argv[i] = argv[i] + 1;
29735+
29736+ if (strncmp(argv[i], "-slowdown=", strlen("-slowdown=")) == 0) {
29737+ slowdown = atoi(argv[i] + strlen("-slowdown="));
29738+ } else if (strcmp(argv[i], "-noplay") == 0) {
29739+ noplay = 1;
29740+ } else if (strcmp(argv[i], "-debug") == 0) {
29741+ debug = 1;
29742+ } else if (strcmp(argv[i], "-disable-real-time-play-back") == 0) {
29743+ disable_real_time_play_back = 1;
29744+ } else if (strcmp(argv[i], "-show-hard-disk-bandwidth") == 0) {
29745+ show_hard_disk_bandwith = 1;
29746+ } else if (strcmp(argv[i], "-show-offset") == 0) {
29747+ show_offset = 1;
29748+ } else
29749+ if (strncmp
29750+ (argv[i], "-show-diff-offset",
29751+ strlen("-show-diff-offset")) == 0) {
29752+ show_diff_offset = atoi(argv[i] + strlen("-show-diff-offset="));
29753+ } else if (strncmp(argv[i], "-width=", strlen("-width=")) == 0) {
29754+ window_width = atoi(argv[i] + strlen("-width="));
29755+ resize = 1;
29756+ } else if (strncmp(argv[i], "-refreshrate=", strlen("-refreshrate="))
29757+ == 0) {
29758+ refresh_rate = atoi(argv[i] + strlen("-refreshrate="));
29759+ } else
29760+ if (strncmp
29761+ (argv[i], "-output-compressed-filename=",
29762+ strlen("-output-compressed-filename=")) == 0) {
29763+ char *compressed_filename =
29764+ argv[i] + strlen("-output-compressed-filename=");
29765+ compressed_file = fopen(compressed_filename, "wb");
29766+ } else if (strcmp(argv[i], "-") == 0) {
29767+ filename = NULL;
29768+ } else if (strcmp(argv[i], "-h") == 0 ||
29769+ strcmp(argv[i], "-help") == 0) {
29770+ usage();
29771+ return 0;
29772+ } else
29773+ filename = argv[i];
29774+ }
29775+ FILE *f = (filename) ? fopen(filename, "rb") : stdin;
29776+
29777+ if (f == NULL) {
29778+ fprintf(stderr, "cannot open %s\n", filename);
29779+ return 0;
29780+ }
29781+ // FILE* fout = fopen("/tmp/raw", "wb");
29782+
29783+ init_process_tab();
29784+ ret_string = malloc(32768);
29785+
29786+ gettimeofday(&start_time, NULL);
29787+ gettimeofday(&last_time, NULL);
29788+
29789+// void* buffer= NULL;
29790+#define WRITE_UNSIGNED_CHAR(x) do { unsigned char myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
29791+#define WRITE_SHORT(x) do { short myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
29792+#define WRITE_INT(x) do { int myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
29793+#define WRITE_LONGLONG(x) do { long long myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
29794+#define WRITE_FLOAT(x) do { float myvar = (float)x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
29795+#define WRITE_3DOUBLE_AS_3FLOAT(x) do { float myfloats[] = { x[0], x[1], x[2] }; fwrite(myfloats, sizeof(myvar), 1, compressed_file); } while(0)
29796+
29797+ // FILE* fopcodes = fopen("/tmp/opcodes.bin", "wb");
29798+ do_context_switch(XOpenDisplay(NULL), 1, _init32_func);
29799+
29800+ long long instr_count = 0;
29801+
29802+ while (1) {
29803+ short func_number;
29804+ short memorize_array_play = -1;
29805+ short reuse_array_play = -1;
29806+
29807+ begin:
29808+ if (fread(&func_number, sizeof(short), 1, f) == 0)
29809+ break;
29810+ if (func_number == _exit_process_func)
29811+ break;
29812+
29813+ if (func_number == _serialized_calls_func) {
29814+ continue;
29815+ }
29816+ // fwrite(&func_number, sizeof(short), 1, fopcodes);
29817+
29818+ /*
29819+ * instrWindow[instrWindowPtr] = func_number; instrWindowPtr++; if
29820+ * (instrWindowPtr == INSTR_WINDOW_SIZE) instrWindowPtr = 0;
29821+ * instrWindowCount++; if (instrWindowCount >= INSTR_WINDOW_SIZE) {
29822+ * if ((instrWindowCount % (INSTR_WINDOW_SIZE / 2)) == 0)
29823+ * find_repeated_seq(instrWindow, instrWindowBeginPtr,
29824+ * INSTR_WINDOW_SIZE); instrWindowBeginPtr++; if (instrWindowBeginPtr
29825+ * == INSTR_WINDOW_SIZE) instrWindowBeginPtr = 0; } */
29826+
29827+ /* -1 is special code that indicates time synchro */
29828+ if (func_number == timesynchro_func) {
29829+ long long ts_file;
29830+ fread(&ts_file, sizeof(long long), 1, f);
29831+
29832+ if (compressed_file) {
29833+ WRITE_SHORT(timesynchro_func);
29834+ WRITE_LONGLONG(ts_file);
29835+ }
29836+
29837+ if (!disable_real_time_play_back) {
29838+ gettimeofday(&current_time, NULL);
29839+ long long ts_real =
29840+ (current_time.tv_sec -
29841+ start_time.tv_sec) * (long long) 1000000 +
29842+ current_time.tv_usec - start_time.tv_usec;
29843+ // fprintf(stderr, "%d %d\n", (int)ts_real, (int)ts_file);
29844+ if (ts_real < ts_file/* && ts_file - ts_real > 100 * 1000 */) {
29845+ /* we're playing too fast */
29846+ // fprintf(stderr, "waiting %d usec\n", (int)(ts_file -
29847+ // ts_real));
29848+ usleep((int) (ts_file - ts_real));
29849+ }
29850+ }
29851+ continue;
29852+ } else if (func_number == memorize_array_func) {
29853+ fread(&memorize_array_play, sizeof(short), 1, f);
29854+ goto begin;
29855+ } else if (func_number == reuse_array_func) {
29856+ fread(&reuse_array_play, sizeof(short), 1, f);
29857+ goto begin;
29858+ }
29859+
29860+ assert(func_number >= 0);
29861+
29862+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
29863+ int nb_args = signature->nb_args;
29864+ int *args_type = signature->args_type;
29865+
29866+ for (i = 0; i < nb_args; i++) {
29867+ switch (args_type[i]) {
29868+#if 0
29869+ case TYPE_UNSIGNED_CHAR:
29870+ case TYPE_CHAR:
29871+ {
29872+ char c;
29873+
29874+ fread(&c, sizeof(c), 1, f);
29875+ args[i] = c;
29876+ break;
29877+ }
29878+
29879+ case TYPE_UNSIGNED_SHORT:
29880+ case TYPE_SHORT:
29881+ {
29882+ short s;
29883+
29884+ fread(&s, sizeof(s), 1, f);
29885+ args[i] = s;
29886+ break;
29887+ }
29888+
29889+ case TYPE_FLOAT:
29890+ fread(&args[i], sizeof(int), 1, f);
29891+ break;
29892+
29893+#endif
29894+ case TYPE_UNSIGNED_CHAR:
29895+ case TYPE_CHAR:
29896+ case TYPE_UNSIGNED_INT:
29897+ case TYPE_INT:
29898+ case TYPE_UNSIGNED_SHORT:
29899+ case TYPE_SHORT:
29900+ case TYPE_FLOAT:
29901+ {
29902+ int n;
29903+ fread(&n, sizeof(int), 1, f);
29904+ args[i] = n;
29905+ break;
29906+ }
29907+
29908+ case TYPE_NULL_TERMINATED_STRING:
29909+ CASE_IN_UNKNOWN_SIZE_POINTERS:
29910+ fread(&args_size[i], sizeof(int), 1, f);
29911+ if (args_size[i]) {
29912+ args[i] = (long) malloc(args_size[i]);
29913+ fread((void *) args[i], args_size[i], 1, f);
29914+ } else {
29915+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
29916+ fprintf(stderr, "call %s arg %d\n",
29917+ tab_opengl_calls_name[func_number], i);
29918+ }
29919+ args[i] = 0;
29920+ }
29921+ if (reuse_array_play >= 0) {
29922+ long current_pos = ftell(f);
29923+
29924+ args_size[i] =
29925+ replayBufferedArrays[reuse_array_play].size;
29926+ args[i] = (long) malloc(args_size[i]);
29927+ fseek(f,
29928+ replayBufferedArrays[reuse_array_play].file_offset,
29929+ SEEK_SET);
29930+ fread((void *) args[i], args_size[i], 1, f);
29931+ fseek(f, current_pos, SEEK_SET);
29932+ }
29933+ if (memorize_array_play >= 0) {
29934+ assert(memorize_array_play <= sizeBufferedArraysPlay);
29935+ if (memorize_array_play == sizeBufferedArraysPlay) {
29936+ sizeBufferedArraysPlay++;
29937+ replayBufferedArrays =
29938+ realloc(replayBufferedArrays,
29939+ sizeBufferedArraysPlay *
29940+ sizeof(ReplayBufferedArray));
29941+ replayBufferedArrays[sizeBufferedArraysPlay -
29942+ 1].file_offset = 0;
29943+ }
29944+ replayBufferedArrays[memorize_array_play].file_offset =
29945+ ftell(f) - args_size[i];
29946+ replayBufferedArrays[memorize_array_play].size =
29947+ args_size[i];
29948+ }
29949+ break;
29950+
29951+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
29952+ {
29953+ args_size[i] =
29954+ compute_arg_length(stderr, func_number, i, args);
29955+ args[i] =
29956+ (args_size[i]) ? (long) malloc(args_size[i]) : 0;
29957+ fread((void *) args[i], args_size[i], 1, f);
29958+ break;
29959+ }
29960+
29961+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
29962+ {
29963+ args_size[i] =
29964+ compute_arg_length(stderr, func_number, i, args);
29965+ args[i] = (long) malloc(args_size[i]);
29966+ break;
29967+ }
29968+
29969+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
29970+ {
29971+ fread(&args_size[i], sizeof(int), 1, f);
29972+ if (args_size[i]) {
29973+ args[i] = (long) malloc(args_size[i]);
29974+ } else {
29975+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
29976+ fprintf(stderr, "call %s arg %d\n",
29977+ tab_opengl_calls_name[func_number], i);
29978+ }
29979+ args[i] = 0;
29980+ }
29981+ break;
29982+ }
29983+
29984+ CASE_OUT_KNOWN_SIZE_POINTERS:
29985+ {
29986+ args_size[i] = tab_args_type_length[args_type[i]];
29987+ assert(args_size[i]);
29988+ args[i] = (long) malloc(args_size[i]);
29989+ break;
29990+ }
29991+
29992+ case TYPE_DOUBLE:
29993+ CASE_IN_KNOWN_SIZE_POINTERS:
29994+ args_size[i] = tab_args_type_length[args_type[i]];
29995+ args[i] = (long) malloc(args_size[i]);
29996+ fread((void *) args[i], args_size[i], 1, f);
29997+ break;
29998+
29999+ case TYPE_IN_IGNORED_POINTER:
30000+ args[i] = 0;
30001+ break;
30002+
30003+ default:
30004+ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
30005+ tab_opengl_calls_name[func_number], i);
30006+ do_disconnect_current();
30007+ return 0;
30008+ }
30009+ }
30010+ if (debug)
30011+ display_gl_call(stderr, func_number, args, args_size);
30012+
30013+ if (debug && reuse_array_play != -1)
30014+ fprintf(stderr, "reuse_array_play %d\n", reuse_array_play);
30015+ if (debug && memorize_array_play != -1)
30016+ fprintf(stderr, "memorize_array_play %d\n", memorize_array_play);
30017+
30018+ if (compressed_file) {
30019+ int reuse_array = -1;
30020+ int memorize_array = -1;
30021+ void *ptr = NULL;
30022+ int bytes_size = 0;
30023+ int do_default = 1;
30024+
30025+ switch (func_number) {
30026+ case glXMakeCurrent_func:
30027+ {
30028+ currentState = args[2];
30029+ assert(currentState >= 0 && currentState < NB_STATES);
30030+ break;
30031+ }
30032+
30033+ case glMatrixMode_func:
30034+ {
30035+ if (states[currentState].matrixMode == args[0]) {
30036+ do_default = 0;
30037+ } else {
30038+ states[currentState].matrixMode = args[0];
30039+ }
30040+ break;
30041+ }
30042+
30043+ case glLoadIdentity_func:
30044+ case glLoadMatrixd_func:
30045+ case glLoadMatrixf_func:
30046+ case glMultMatrixd_func:
30047+ case glMultMatrixf_func:
30048+ case glOrtho_func:
30049+ case glFrustum_func:
30050+ case glRotated_func:
30051+ case glRotatef_func:
30052+ case glScaled_func:
30053+ case glScalef_func:
30054+ case glTranslated_func:
30055+ case glTranslatef_func:
30056+ case glPushMatrix_func:
30057+ case glPopMatrix_func:
30058+ {
30059+ if (states[currentState].matrixMode == 5890) {
30060+ if (states[currentState].lastMatrixOp ==
30061+ glLoadIdentity_func &&
30062+ func_number == glLoadIdentity_func) {
30063+ do_default = 0;
30064+ }
30065+ states[currentState].lastMatrixOp = func_number;
30066+ }
30067+ break;
30068+ }
30069+
30070+ case glPushAttrib_func:
30071+ {
30072+ if (states[currentState].stackAttribPtr <
30073+ MAX_SERVER_STATE_STACK_SIZE) {
30074+ int mask = args[0];
30075+
30076+ states[currentState].stackAttrib[states[currentState].
30077+ stackAttribPtr].
30078+ mask = mask;
30079+ if (mask & GL_TRANSFORM_BIT) {
30080+ states[currentState].
30081+ stackAttrib[states[currentState].
30082+ stackAttribPtr].matrixMode =
30083+ states[currentState].matrixMode;
30084+ states[currentState].
30085+ stackAttrib[states[currentState].
30086+ stackAttribPtr].lastMatrixOp =
30087+ states[currentState].lastMatrixOp;
30088+ }
30089+ states[currentState].stackAttribPtr++;
30090+ }
30091+ break;
30092+ }
30093+
30094+ case glPopAttrib_func:
30095+ {
30096+ if (states[currentState].stackAttribPtr > 0) {
30097+ --states[currentState].stackAttribPtr;
30098+ if (states[currentState].
30099+ stackAttrib[states[currentState].stackAttribPtr].
30100+ mask & GL_TRANSFORM_BIT) {
30101+ states[currentState].matrixMode =
30102+ states[currentState].
30103+ stackAttrib[states[currentState].
30104+ stackAttribPtr].matrixMode;
30105+ states[currentState].lastMatrixOp =
30106+ states[currentState].
30107+ stackAttrib[states[currentState].
30108+ stackAttribPtr].lastMatrixOp;
30109+ }
30110+ }
30111+ break;
30112+ }
30113+
30114+ case glBufferDataARB_func:
30115+ {
30116+ ptr = (void *) args[2];
30117+ bytes_size = args_size[2];
30118+ break;
30119+ }
30120+
30121+ case glVertexPointer_fake_func:
30122+ case glTexCoordPointer_fake_func:
30123+ case glTexCoordPointer01_fake_func:
30124+ case glDrawElements_func:
30125+ {
30126+ ptr = (void *) args[nb_args - 1];
30127+ bytes_size = args_size[nb_args - 1];
30128+ break;
30129+ }
30130+
30131+ default:
30132+ break;
30133+ }
30134+
30135+ if (ptr) {
30136+ unsigned int crc = calc_checksum(ptr, bytes_size, 0xFFFFFFFF);
30137+ long long minInterest = 0x7FFFFFFFFFFFFFFFLL;
30138+ int iMinUsed = -1;
30139+
30140+ instr_count++;
30141+
30142+ for (i = 0; i < N_BUFFERED_ARRAYS; i++) {
30143+ if (recordBufferedArrays[i].crc == crc) {
30144+ // fprintf(stderr, "reusing %d for crc %d\n", i,
30145+ // crc);
30146+ reuse_array = i;
30147+ // fprintf(stderr, "reuse_array %d\n", i);
30148+ recordBufferedArrays[i].n_used++;
30149+ recordBufferedArrays[i].last_use = instr_count;
30150+ break;
30151+ } else if (recordBufferedArrays[i].n_used == 0) {
30152+ // fprintf(stderr, "memorize_array %d\n", i);
30153+ memorize_array = i;
30154+ recordBufferedArrays[i].n_used = 1;
30155+ recordBufferedArrays[i].crc = crc;
30156+ recordBufferedArrays[i].size = bytes_size;
30157+ recordBufferedArrays[i].last_use = instr_count;
30158+ break;
30159+ } else {
30160+ long long interest =
30161+ N_BUFFERED_ARRAYS *
30162+ recordBufferedArrays[i].n_used / (instr_count -
30163+ recordBufferedArrays
30164+ [i].
30165+ last_use)
30166+ /** recordBufferedArrays[i].size*/ ;
30167+ if (interest < minInterest) {
30168+ iMinUsed = i;
30169+ minInterest = interest;
30170+ }
30171+ }
30172+ }
30173+ static unsigned int *discardedCrcs = NULL;
30174+ static int nDiscardedCrcs = 0;
30175+
30176+ if (i == N_BUFFERED_ARRAYS) {
30177+ int j;
30178+
30179+ for (j = 0; j < nDiscardedCrcs; j++) {
30180+ if (discardedCrcs[j] == crc) {
30181+ fprintf(stderr,
30182+ "%x was discarded before and is asked now...\n",
30183+ crc);
30184+ discardedCrcs[j] =
30185+ recordBufferedArrays[iMinUsed].crc;
30186+ break;
30187+ }
30188+ }
30189+ if (j == nDiscardedCrcs) {
30190+ discardedCrcs =
30191+ realloc(discardedCrcs,
30192+ sizeof(int) * (nDiscardedCrcs + 1));
30193+ discardedCrcs[nDiscardedCrcs++] =
30194+ recordBufferedArrays[iMinUsed].crc;
30195+ }
30196+ fprintf(stderr, "discarding %x\n",
30197+ recordBufferedArrays[iMinUsed].crc);
30198+
30199+ memorize_array = iMinUsed;
30200+ recordBufferedArrays[iMinUsed].n_used = 1;
30201+ recordBufferedArrays[iMinUsed].crc = crc;
30202+ recordBufferedArrays[iMinUsed].size = bytes_size;
30203+ recordBufferedArrays[iMinUsed].last_use = instr_count;
30204+ }
30205+
30206+ if (reuse_array != -1) {
30207+ WRITE_SHORT(reuse_array_func);
30208+ WRITE_SHORT(reuse_array);
30209+ } else if (memorize_array != -1) {
30210+ WRITE_SHORT(memorize_array_func);
30211+ WRITE_SHORT(memorize_array);
30212+ }
30213+ }
30214+
30215+ switch (func_number) {
30216+ case glXChooseVisual_func:
30217+ case glXQueryVersion_func:
30218+ case glXQueryExtension_func:
30219+ case glXGetClientString_func:
30220+ case glXQueryExtensionsString_func:
30221+ case glXQueryServerString_func:
30222+ case glXGetProcAddress_fake_func:
30223+ case glXGetProcAddress_global_fake_func:
30224+ case glXGetConfig_func:
30225+ case glXGetConfig_extended_func:
30226+ case glGetIntegerv_func:
30227+ case glGetFloatv_func:
30228+ case glGetBooleanv_func:
30229+ case glGetDoublev_func:
30230+ case glIsEnabled_func:
30231+ case _glGetError_fake_func:
30232+ case glGetString_func:
30233+ {
30234+ do_default = 0;
30235+ break;
30236+ }
30237+
30238+ case glLoadMatrixd_func:
30239+ {
30240+ int j;
30241+
30242+ WRITE_SHORT(glLoadMatrixf_func);
30243+ double *ptr = (double *) args[0];
30244+
30245+ for (j = 0; j < 16; j++) {
30246+ WRITE_FLOAT(ptr[j]);
30247+ }
30248+ do_default = 0;
30249+ break;
30250+ }
30251+
30252+ case glMultMatrixd_func:
30253+ {
30254+ int j;
30255+
30256+ WRITE_SHORT(glMultMatrixf_func);
30257+ double *ptr = (double *) args[0];
30258+
30259+ for (j = 0; j < 16; j++) {
30260+ WRITE_FLOAT(ptr[j]);
30261+ }
30262+ do_default = 0;
30263+ break;
30264+ }
30265+
30266+ case glTranslated_func:
30267+ {
30268+ WRITE_SHORT(glTranslatef_func);
30269+ WRITE_FLOAT(*(double *) args[0]);
30270+ WRITE_FLOAT(*(double *) args[1]);
30271+ WRITE_FLOAT(*(double *) args[2]);
30272+ do_default = 0;
30273+ break;
30274+ }
30275+
30276+ case glScalef_func:
30277+ {
30278+ if (*(float *) &args[0] == 1 && *(float *) &args[1] == 1
30279+ && *(float *) &args[2] == 1)
30280+ do_default = 0;
30281+ break;
30282+ }
30283+
30284+ case glScaled_func:
30285+ {
30286+ if (!
30287+ (*(double *) args[0] == 1 && *(double *) args[1] == 1
30288+ && *(double *) args[2] == 1)) {
30289+ WRITE_SHORT(glScalef_func);
30290+ WRITE_FLOAT(*(double *) args[0]);
30291+ WRITE_FLOAT(*(double *) args[1]);
30292+ WRITE_FLOAT(*(double *) args[2]);
30293+ }
30294+ do_default = 0;
30295+ break;
30296+ }
30297+
30298+ case glRotated_func:
30299+ {
30300+ WRITE_SHORT(glRotatef_func);
30301+ WRITE_FLOAT(*(double *) args[0]);
30302+ WRITE_FLOAT(*(double *) args[1]);
30303+ WRITE_FLOAT(*(double *) args[2]);
30304+ WRITE_FLOAT(*(double *) args[3]);
30305+ do_default = 0;
30306+ break;
30307+ }
30308+#define IS_SHORT(x) ((x) >= -32768 && (x) < 32768)
30309+
30310+ case glRasterPos2i_func:
30311+ {
30312+ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
30313+ WRITE_SHORT(glRasterPos2s_func);
30314+ WRITE_SHORT(args[0]);
30315+ WRITE_SHORT(args[1]);
30316+ do_default = 0;
30317+ }
30318+ break;
30319+ }
30320+
30321+ case glVertex2i_func:
30322+ {
30323+ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
30324+ WRITE_SHORT(glVertex2s_func);
30325+ WRITE_SHORT(args[0]);
30326+ WRITE_SHORT(args[1]);
30327+ do_default = 0;
30328+ }
30329+ break;
30330+ }
30331+
30332+ case glTexCoord2i_func:
30333+ {
30334+ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
30335+ WRITE_SHORT(glTexCoord2s_func);
30336+ WRITE_SHORT(args[0]);
30337+ WRITE_SHORT(args[1]);
30338+ do_default = 0;
30339+ }
30340+ break;
30341+ }
30342+
30343+ case glTexCoord2fv_func:
30344+ {
30345+ float *ptr = (float *) args[0];
30346+ float u = ptr[0];
30347+ float v = ptr[1];
30348+
30349+ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7) {
30350+ int ui = (int) u;
30351+ int vi = (int) v;
30352+
30353+ if (IS_SHORT(ui) && IS_SHORT(vi)) {
30354+ WRITE_SHORT(glTexCoord2s_func);
30355+ WRITE_SHORT(ui);
30356+ WRITE_SHORT(vi);
30357+ do_default = 0;
30358+ }
30359+ }
30360+ break;
30361+ }
30362+
30363+ case glTexCoord2f_func:
30364+ {
30365+ float u = *(float *) &args[0];
30366+ float v = *(float *) &args[1];
30367+
30368+ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7) {
30369+ int ui = (int) u;
30370+ int vi = (int) v;
30371+
30372+ if (IS_SHORT(ui) && IS_SHORT(vi)) {
30373+ WRITE_SHORT(glTexCoord2s_func);
30374+ WRITE_SHORT(ui);
30375+ WRITE_SHORT(vi);
30376+ do_default = 0;
30377+ }
30378+ }
30379+ break;
30380+ }
30381+
30382+ case glColor3f_func:
30383+ {
30384+ WRITE_SHORT(glColor3ub_func);
30385+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
30386+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
30387+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
30388+ do_default = 0;
30389+ break;
30390+ }
30391+
30392+ case glColor4f_func:
30393+ {
30394+ if (*(float *) &args[3] == 1) {
30395+ WRITE_SHORT(glColor3ub_func);
30396+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
30397+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
30398+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
30399+ } else {
30400+ WRITE_SHORT(glColor4ub_func);
30401+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
30402+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
30403+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
30404+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[3]);
30405+ }
30406+ do_default = 0;
30407+ break;
30408+ }
30409+
30410+ case glColor4fv_func:
30411+ {
30412+ float *ptr = (float *) args[0];
30413+
30414+ if (ptr[3] == 1) {
30415+ WRITE_SHORT(glColor3ub_func);
30416+ WRITE_UNSIGNED_CHAR(255 * ptr[0]);
30417+ WRITE_UNSIGNED_CHAR(255 * ptr[1]);
30418+ WRITE_UNSIGNED_CHAR(255 * ptr[2]);
30419+ } else {
30420+ WRITE_SHORT(glColor4ub_func);
30421+ WRITE_UNSIGNED_CHAR(255 * ptr[0]);
30422+ WRITE_UNSIGNED_CHAR(255 * ptr[1]);
30423+ WRITE_UNSIGNED_CHAR(255 * ptr[2]);
30424+ WRITE_UNSIGNED_CHAR(255 * ptr[3]);
30425+ }
30426+ do_default = 0;
30427+ break;
30428+ }
30429+
30430+ case glColor3d_func:
30431+ {
30432+ WRITE_SHORT(glColor3ub_func);
30433+ WRITE_UNSIGNED_CHAR(255 * *(double *) args[0]);
30434+ WRITE_UNSIGNED_CHAR(255 * *(double *) args[1]);
30435+ WRITE_UNSIGNED_CHAR(255 * *(double *) args[2]);
30436+ do_default = 0;
30437+ break;
30438+ }
30439+
30440+ case glVertex3f_func:
30441+ {
30442+ if (*(float *) &args[2] == 0) {
30443+ WRITE_SHORT(glVertex2f_func);
30444+ WRITE_FLOAT(*(float *) &args[0]);
30445+ WRITE_FLOAT(*(float *) &args[1]);
30446+ do_default = 0;
30447+ }
30448+ break;
30449+ }
30450+
30451+ case glVertex3d_func:
30452+ {
30453+ WRITE_SHORT(glVertex3f_func);
30454+ WRITE_FLOAT(*(double *) args[0]);
30455+ WRITE_FLOAT(*(double *) args[1]);
30456+ WRITE_FLOAT(*(double *) args[2]);
30457+ do_default = 0;
30458+ break;
30459+ }
30460+
30461+ case glNormal3fv_func:
30462+ {
30463+ float *ptr = (float *) args[0];
30464+ float u = ptr[0];
30465+ float v = ptr[1];
30466+ float w = ptr[2];
30467+
30468+ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7
30469+ && fabs(w - (int) w) < 1e-7) {
30470+ int ui = (int) u;
30471+ int vi = (int) v;
30472+ int wi = (int) w;
30473+
30474+ if (IS_SHORT(ui) && IS_SHORT(vi) && IS_SHORT(wi)) {
30475+ WRITE_SHORT(glNormal3sv_func);
30476+ WRITE_SHORT(ui);
30477+ WRITE_SHORT(vi);
30478+ WRITE_SHORT(wi);
30479+ do_default = 0;
30480+ }
30481+ }
30482+ break;
30483+ }
30484+
30485+ case glNormal3d_func:
30486+ {
30487+ WRITE_SHORT(glNormal3f_func);
30488+ WRITE_FLOAT(*(double *) args[0]);
30489+ WRITE_FLOAT(*(double *) args[1]);
30490+ WRITE_FLOAT(*(double *) args[2]);
30491+ do_default = 0;
30492+ break;
30493+ }
30494+
30495+ case glDrawElements_func:
30496+ {
30497+ int mode = args[0];
30498+ int count = args[1];
30499+ int type = args[2];
30500+
30501+ if (type == GL_UNSIGNED_INT) {
30502+ int j;
30503+ unsigned int *ptr = (unsigned int *) args[3];
30504+
30505+ for (j = 0; j < count; j++) {
30506+ if ((ptr[j] >> 16) != 0)
30507+ break;
30508+ }
30509+ if (j == count) {
30510+ WRITE_SHORT(func_number);
30511+ WRITE_INT(mode);
30512+ WRITE_INT(count);
30513+ WRITE_INT(GL_UNSIGNED_SHORT);
30514+ if (reuse_array != -1) {
30515+ WRITE_INT(0);
30516+ } else {
30517+ WRITE_INT(count * sizeof(short));
30518+ for (j = 0; j < count; j++) {
30519+ WRITE_SHORT(ptr[j]);
30520+ }
30521+ }
30522+ do_default = 0;
30523+ } else
30524+ do_default = 1;
30525+ } else if (reuse_array != -1) {
30526+ WRITE_SHORT(func_number);
30527+ WRITE_INT(mode);
30528+ WRITE_INT(count);
30529+ WRITE_INT(type);
30530+ WRITE_INT(0);
30531+ do_default = 0;
30532+ } else
30533+ do_default = 1;
30534+ break;
30535+ }
30536+
30537+ case glBufferDataARB_func:
30538+ {
30539+ if (reuse_array != -1) {
30540+ WRITE_SHORT(glBufferDataARB_func);
30541+ WRITE_INT(args[0]);
30542+ WRITE_INT(args[1]);
30543+ WRITE_INT(0);
30544+ WRITE_INT(args[3]);
30545+ do_default = 0;
30546+ }
30547+ break;
30548+ }
30549+
30550+ case glVertexPointer_fake_func:
30551+ case glTexCoordPointer_fake_func:
30552+ case glTexCoordPointer01_fake_func:
30553+ {
30554+ int offset = 0, index = 0, size, type, stride, bytes_size;
30555+ void *ptr;
30556+ int countarg = 0;
30557+
30558+ if (func_number == glVertexPointer_fake_func ||
30559+ func_number == glTexCoordPointer_fake_func)
30560+ offset = args[countarg++];
30561+ if (func_number == glTexCoordPointer_fake_func)
30562+ index = args[countarg++];
30563+ size = args[countarg++];
30564+ type = args[countarg++];
30565+ stride = args[countarg++];
30566+ bytes_size = args[countarg++];
30567+ ptr = (void *) args[countarg++];
30568+ if (type == GL_DOUBLE) {
30569+ int count;
30570+ int j, k;
30571+
30572+ if (stride == 0)
30573+ stride = size * sizeof(double);
30574+ assert((bytes_size % stride) == 0);
30575+ assert((offset % stride) == 0);
30576+ offset = (offset / stride) * size * sizeof(float);
30577+ count = bytes_size / stride;
30578+ WRITE_SHORT(func_number);
30579+ if (func_number == glVertexPointer_fake_func ||
30580+ func_number == glTexCoordPointer_fake_func)
30581+ WRITE_INT(offset);
30582+ if (func_number == glTexCoordPointer_fake_func)
30583+ WRITE_INT(index);
30584+ WRITE_INT(size);
30585+ WRITE_INT(GL_FLOAT);
30586+ WRITE_INT(0);
30587+ WRITE_INT(count * size * sizeof(float));
30588+ if (reuse_array != -1) {
30589+ WRITE_INT(0);
30590+ } else {
30591+ WRITE_INT(count * size * sizeof(float));
30592+ for (j = 0; j < count; j++) {
30593+ for (k = 0; k < size; k++) {
30594+ WRITE_FLOAT(*(double *)
30595+ (ptr + j * stride +
30596+ k * sizeof(double)));
30597+ }
30598+ }
30599+ }
30600+ do_default = 0;
30601+ } else if (reuse_array != -1) {
30602+ WRITE_SHORT(func_number);
30603+ if (func_number == glVertexPointer_fake_func ||
30604+ func_number == glTexCoordPointer_fake_func)
30605+ WRITE_INT(offset);
30606+ if (func_number == glTexCoordPointer_fake_func)
30607+ WRITE_INT(index);
30608+ WRITE_INT(size);
30609+ WRITE_INT(type);
30610+ WRITE_INT(stride);
30611+ WRITE_INT(bytes_size);
30612+ WRITE_INT(0);
30613+ do_default = 0;
30614+ } else
30615+ do_default = 1;
30616+ break;
30617+ }
30618+
30619+ default:
30620+ break;
30621+ }
30622+
30623+ if (do_default) {
30624+ fwrite(&func_number, sizeof(short), 1, compressed_file);
30625+ for (i = 0; i < nb_args; i++) {
30626+ switch (args_type[i]) {
30627+ case TYPE_UNSIGNED_CHAR:
30628+ case TYPE_CHAR:
30629+ {
30630+ char c = args[i];
30631+
30632+ fwrite(&c, sizeof(c), 1, compressed_file);
30633+ break;
30634+ }
30635+
30636+ case TYPE_UNSIGNED_SHORT:
30637+ case TYPE_SHORT:
30638+ {
30639+ short s = args[i];
30640+
30641+ fwrite(&s, sizeof(s), 1, compressed_file);
30642+ break;
30643+ }
30644+
30645+ case TYPE_UNSIGNED_INT:
30646+ case TYPE_INT:
30647+ case TYPE_FLOAT:{
30648+ int n = args[i];
30649+ fwrite(&n, sizeof(int), 1, compressed_file);
30650+ break;
30651+ }
30652+
30653+ case TYPE_NULL_TERMINATED_STRING:
30654+ CASE_IN_UNKNOWN_SIZE_POINTERS:
30655+ fwrite(&args_size[i], sizeof(int), 1,
30656+ compressed_file);
30657+ if (args_size[i]) {
30658+ fwrite((void *) args[i], args_size[i], 1,
30659+ compressed_file);
30660+ }
30661+ break;
30662+
30663+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
30664+ {
30665+ fwrite(&args_size[i], sizeof(int), 1,
30666+ compressed_file);
30667+ break;
30668+ }
30669+
30670+ CASE_OUT_KNOWN_SIZE_POINTERS:
30671+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
30672+ {
30673+ break;
30674+ }
30675+
30676+ case TYPE_DOUBLE:
30677+ CASE_IN_KNOWN_SIZE_POINTERS:
30678+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
30679+ fwrite((void *) args[i], args_size[i], 1,
30680+ compressed_file);
30681+ break;
30682+
30683+ case TYPE_IN_IGNORED_POINTER:
30684+ break;
30685+
30686+ default:
30687+ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
30688+ tab_opengl_calls_name[func_number], i);
30689+ do_disconnect_current();
30690+ return 0;
30691+ }
30692+ }
30693+ }
30694+ }
30695+
30696+ int new_offset = ftell(f);
30697+
30698+ if (show_offset ||
30699+ (show_diff_offset &&
30700+ new_offset - last_cmd_offset >= show_diff_offset)) {
30701+ fprintf(stderr, "offset = %d, diff=%d\n", new_offset,
30702+ new_offset - last_cmd_offset);
30703+ }
30704+ last_cmd_offset = new_offset;
30705+
30706+ if (func_number == glXCreateContext_func &&
30707+ args[1] == visualid_fbconfig_read) {
30708+ args[1] = visualid_fbconfig_real;
30709+ }
30710+ if (debug) {
30711+ if (func_number == glBindProgramARB_func) {
30712+ fprintf(stderr, "glBindProgramARB_func(y, x) : x = %d\n",
30713+ (int) args[1]);
30714+ } else if (func_number == glXGetProcAddress_fake_func) {
30715+ fprintf(stderr, "glXGetProcAddress_fake(%s)\n",
30716+ (char *) args[0]);
30717+ }
30718+ }
30719+
30720+ if (debug && func_number == glEnable_func) {
30721+ fprintf(stderr, "enable(0x%x)\n", (int) args[0]);
30722+ } else if (debug && func_number == glDisable_func) {
30723+ fprintf(stderr, "disable(0x%x)\n", (int) args[0]);
30724+ }
30725+
30726+ if (resize) {
30727+ if (func_number == _moveResizeWindow_func) {
30728+ int *params = (int *) args[1];
30729+
30730+ orig_window_width = params[2];
30731+ window_height = params[3] =
30732+ params[3] * window_width / params[2];
30733+ params[2] = window_width;
30734+ // buffer = malloc(4 * window_width * window_height);
30735+ } else if (func_number == glViewport_func ||
30736+ func_number == glScissor_func) {
30737+ args[0] = args[0] * window_width / orig_window_width;
30738+ args[1] = args[1] * window_width / orig_window_width;
30739+ args[2] = args[2] * window_width / orig_window_width;
30740+ args[3] = args[3] * window_width / orig_window_width;
30741+ }
30742+ } else if (func_number == _moveResizeWindow_func) {
30743+ int *params = (int *) args[1];
30744+
30745+ window_width = params[2];
30746+ window_height = params[3];
30747+ // buffer = malloc(4 * window_width * window_height);
30748+ }
30749+
30750+ int ret =
30751+ (noplay) ? 0 : do_function_call(func_number, args, ret_string);
30752+
30753+ if (func_number == glXSwapBuffers_func) {
30754+ /* glReadPixels(0, 0, window_width, window_height, GL_RGBA,
30755+ * GL_UNSIGNED_BYTE, buffer); fwrite(buffer, 4 * window_width *
30756+ * window_height, 1, fout); */
30757+
30758+ int diff_time;
30759+
30760+ count_current++;
30761+ gettimeofday(&current_time, NULL);
30762+ diff_time =
30763+ (current_time.tv_sec - last_time.tv_sec) * 1000 +
30764+ (current_time.tv_usec - last_time.tv_usec) / 1000;
30765+ if (diff_time > refresh_rate) {
30766+ printf("%d frames in %.1f seconds = %.3f FPS\n",
30767+ count_current - count_last_time, diff_time / 1000.,
30768+ (count_current - count_last_time) * 1000. / diff_time);
30769+ if (show_hard_disk_bandwith) {
30770+ int current_offset = ftell(f);
30771+
30772+ printf("bandwidth : %.1f MB/s\n",
30773+ (current_offset - last_offset) * 1e-6);
30774+ last_offset = current_offset;
30775+ }
30776+ last_time.tv_sec = current_time.tv_sec;
30777+ last_time.tv_usec = current_time.tv_usec;
30778+ count_last_time = count_current;
30779+ }
30780+ usleep(slowdown * 50000);
30781+ }
30782+ if (debug && func_number == glGenProgramsARB_func && args[0] == 1) {
30783+ fprintf(stderr, "glGenProgramsARB_func(1, &x) : x = %d\n",
30784+ *(int *) args[1]);
30785+ }
30786+
30787+ if (func_number == glXGetVisualFromFBConfig_func) {
30788+ fread(&visualid_fbconfig_read, sizeof(int), 1, f);
30789+ visualid_fbconfig_real = ret;
30790+ }
30791+
30792+ for (i = 0; i < nb_args; i++) {
30793+ switch (args_type[i]) {
30794+ case TYPE_UNSIGNED_INT:
30795+ case TYPE_INT:
30796+ case TYPE_UNSIGNED_CHAR:
30797+ case TYPE_CHAR:
30798+ case TYPE_UNSIGNED_SHORT:
30799+ case TYPE_SHORT:
30800+ case TYPE_FLOAT:
30801+ break;
30802+
30803+ case TYPE_NULL_TERMINATED_STRING:
30804+ CASE_POINTERS:
30805+ case TYPE_DOUBLE:
30806+ if (args[i])
30807+ free((void *) args[i]);
30808+ break;
30809+
30810+ case TYPE_IN_IGNORED_POINTER:
30811+ args[i] = 0;
30812+ break;
30813+
30814+ default:
30815+ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
30816+ tab_opengl_calls_name[func_number], i);
30817+ do_disconnect_current();
30818+ return 0;
30819+ }
30820+ }
30821+ }
30822+ return 0;
30823+}
30824Index: trunk/target-i386/opengl_server.c
30825===================================================================
30826--- /dev/null 1970-01-01 00:00:00.000000000 +0000
30827+++ trunk/target-i386/opengl_server.c 2009-01-19 23:06:08.000000000 +0000
30828@@ -0,0 +1,826 @@
30829+/*
30830+ * TCP/IP OpenGL server
30831+ *
30832+ * Copyright (c) 2007 Even Rouault
30833+ *
30834+ * Permission is hereby granted, free of charge, to any person obtaining a copy
30835+ * of this software and associated documentation files (the "Software"), to deal
30836+ * in the Software without restriction, including without limitation the rights
30837+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
30838+ * copies of the Software, and to permit persons to whom the Software is
30839+ * furnished to do so, subject to the following conditions:
30840+ *
30841+ * The above copyright notice and this permission notice shall be included in
30842+ * all copies or substantial portions of the Software.
30843+ *
30844+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30845+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
30846+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
30847+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30848+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30849+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
30850+ * THE SOFTWARE.
30851+ */
30852+
30853+/* gcc -Wall -O2 -g opengl_server.c opengl_exec.c -o opengl_server -I../i386-softmmu -I. -I.. -lGL */
30854+
30855+#include <stdio.h>
30856+#include <errno.h>
30857+#include <stdlib.h>
30858+#include <unistd.h>
30859+#include <string.h>
30860+#include <assert.h>
30861+#include <sys/types.h>
30862+#include <sys/socket.h>
30863+#include <netinet/in.h>
30864+#include <netinet/tcp.h>
30865+#include <netdb.h>
30866+#include <arpa/inet.h>
30867+#include <sys/time.h>
30868+#include <signal.h>
30869+
30870+#include <X11/Xlib.h>
30871+#include <X11/Xutil.h>
30872+
30873+#define PORT 5555
30874+
30875+#define ENABLE_GL_LOG
30876+
30877+#include "opengl_func.h"
30878+#include "opengl_utils.h"
30879+
30880+static int refresh_rate = 1000;
30881+static int must_save = 0;
30882+static int timestamp = 1; /* only valid if must_save == 1. include timestamps in the save file to enable real-time playback */
30883+
30884+extern int display_function_call;
30885+extern void init_process_tab(void);
30886+extern int do_function_call(Display *, int, int, arg_t *, char *);
30887+extern void opengl_exec_set_local_connection(void);
30888+extern void opengl_exec_set_parent_window(Display *_dpy, Window _parent_window);
30889+
30890+#ifdef ENABLE_GL_LOG
30891+static FILE* f = NULL;
30892+
30893+static char* filename = "/tmp/debug_gl.bin";
30894+
30895+#define write_gl_debug_init() do { if (f == NULL) f = fopen(filename, "wb"); } while(0)
30896+
30897+static void inline write_gl_debug_cmd_char(char my_int)
30898+{
30899+ write_gl_debug_init();
30900+ fwrite(&my_int, sizeof(my_int), 1, f);
30901+}
30902+
30903+static void inline write_gl_debug_cmd_short(short my_int)
30904+{
30905+ write_gl_debug_init();
30906+ fwrite(&my_int, sizeof(my_int), 1, f);
30907+}
30908+
30909+static void inline write_gl_debug_cmd_int(int my_int)
30910+{
30911+ write_gl_debug_init();
30912+ fwrite(&my_int, sizeof(my_int), 1, f);
30913+}
30914+
30915+static void inline write_gl_debug_cmd_longlong(long long my_longlong)
30916+{
30917+ write_gl_debug_init();
30918+ fwrite(&my_longlong, sizeof(my_longlong), 1, f);
30919+}
30920+
30921+static void inline write_gl_debug_cmd_buffer_with_size(int size, void* buffer)
30922+{
30923+ write_gl_debug_init();
30924+ fwrite(&size, sizeof(int), 1, f);
30925+ if (size)
30926+ fwrite(buffer, size, 1, f);
30927+}
30928+
30929+static void inline write_gl_debug_cmd_buffer_without_size(int size, void* buffer)
30930+{
30931+ write_gl_debug_init();
30932+ if (size)
30933+ fwrite(buffer, size, 1, f);
30934+}
30935+
30936+static void inline write_gl_debug_end()
30937+{
30938+ write_gl_debug_init();
30939+ fclose(f);
30940+ f = NULL;
30941+}
30942+
30943+#endif
30944+
30945+static void write_sock_data(int sock, void* data, int len)
30946+{
30947+ if (len && data)
30948+ {
30949+ int offset = 0;
30950+ while(offset < len)
30951+ {
30952+ int nwritten = write(sock, data + offset, len - offset);
30953+ if (nwritten == -1)
30954+ {
30955+ if (errno == EINTR)
30956+ continue;
30957+ perror("write");
30958+ assert(nwritten != -1);
30959+ }
30960+ offset += nwritten;
30961+ }
30962+ }
30963+}
30964+
30965+static void inline write_sock_int(int sock, int my_int)
30966+{
30967+ write_sock_data(sock, &my_int, sizeof(int));
30968+}
30969+
30970+static int total_read = 0;
30971+static void read_sock_data(int sock, void* data, int len)
30972+{
30973+ if (len)
30974+ {
30975+ int offset = 0;
30976+ while(offset < len)
30977+ {
30978+ int nread = read(sock, data + offset, len - offset);
30979+ if (nread == -1)
30980+ {
30981+ if (errno == EINTR)
30982+ continue;
30983+ perror("read");
30984+ assert(nread != -1);
30985+ }
30986+ if (nread == 0)
30987+ {
30988+ fprintf(stderr, "nread = 0\n");
30989+ }
30990+ assert(nread > 0);
30991+ offset += nread;
30992+ total_read += nread;
30993+ }
30994+ }
30995+}
30996+
30997+static int inline read_sock_int(int sock)
30998+{
30999+ int ret;
31000+ read_sock_data(sock, &ret, sizeof(int));
31001+ return ret;
31002+}
31003+
31004+static short inline read_sock_short(int sock)
31005+{
31006+ short ret;
31007+ read_sock_data(sock, &ret, sizeof(short));
31008+ return ret;
31009+}
31010+
31011+
31012+static Display* dpy = NULL;
31013+static int parent_xid = -1;
31014+
31015+
31016+static struct timeval last_time, current_time, time_stamp_start;
31017+static int count_last_time = 0, count_current = 0;
31018+
31019+static struct timeval last_read_time, current_read_time;
31020+
31021+int has_x_error = 0;
31022+
31023+int
31024+read_from_client (int sock)
31025+{
31026+ arg_t args[50];
31027+ int args_size[50];
31028+ char ret_string[32768];
31029+ char command_buffer[65536*16];
31030+
31031+ if (dpy == NULL)
31032+ {
31033+ init_process_tab();
31034+ dpy = XOpenDisplay(NULL);
31035+ if (parent_xid != -1)
31036+ {
31037+ opengl_exec_set_parent_window(dpy, parent_xid);
31038+ }
31039+ }
31040+
31041+ int i;
31042+ int func_number = read_sock_short(sock);
31043+
31044+ Signature* signature = (Signature*)tab_opengl_calls[func_number];
31045+ int ret_type = signature->ret_type;
31046+ int nb_args = signature->nb_args;
31047+ int* args_type = signature->args_type;
31048+ int pid = 0;
31049+
31050+ if (func_number == _serialized_calls_func)
31051+ {
31052+ int command_buffer_size = read_sock_int(sock);
31053+ int commmand_buffer_offset = 0;
31054+ read_sock_data(sock, command_buffer, command_buffer_size);
31055+ /* TODO: must convert if client is different word size */
31056+
31057+#ifdef ENABLE_GL_LOG
31058+ if (must_save) write_gl_debug_cmd_short(_serialized_calls_func);
31059+#endif
31060+
31061+ while(commmand_buffer_offset < command_buffer_size)
31062+ {
31063+ func_number = *(short*)(command_buffer + commmand_buffer_offset);
31064+ if( ! (func_number >= 0 && func_number < GL_N_CALLS) )
31065+ {
31066+ fprintf(stderr, "func_number >= 0 && func_number < GL_N_CALLS failed at "
31067+ "commmand_buffer_offset=%d (command_buffer_size=%d)\n",
31068+ commmand_buffer_offset, command_buffer_size);
31069+ exit(-1);
31070+ }
31071+
31072+#ifdef ENABLE_GL_LOG
31073+ if (must_save) write_gl_debug_cmd_short(func_number);
31074+#endif
31075+ commmand_buffer_offset += sizeof(short);
31076+
31077+
31078+ signature = (Signature*)tab_opengl_calls[func_number];
31079+ ret_type = signature->ret_type;
31080+ assert(ret_type == TYPE_NONE);
31081+ nb_args = signature->nb_args;
31082+ args_type = signature->args_type;
31083+
31084+ for(i=0;i<nb_args;i++)
31085+ {
31086+ switch(args_type[i])
31087+ {
31088+ case TYPE_UNSIGNED_CHAR:
31089+ case TYPE_CHAR:
31090+ {
31091+ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
31092+#ifdef ENABLE_GL_LOG
31093+ if (must_save) write_gl_debug_cmd_char(args[i]);
31094+#endif
31095+ commmand_buffer_offset += sizeof(int);
31096+ break;
31097+ }
31098+
31099+ case TYPE_UNSIGNED_SHORT:
31100+ case TYPE_SHORT:
31101+ {
31102+ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
31103+#ifdef ENABLE_GL_LOG
31104+ if (must_save) write_gl_debug_cmd_short(args[i]);
31105+#endif
31106+ commmand_buffer_offset += sizeof(int);
31107+ break;
31108+ }
31109+
31110+ case TYPE_UNSIGNED_INT:
31111+ case TYPE_INT:
31112+ case TYPE_FLOAT:
31113+ {
31114+ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
31115+#ifdef ENABLE_GL_LOG
31116+ if (must_save) write_gl_debug_cmd_int(args[i]);
31117+#endif
31118+ commmand_buffer_offset += sizeof(int);
31119+ break;
31120+ }
31121+
31122+ case TYPE_NULL_TERMINATED_STRING:
31123+ CASE_IN_UNKNOWN_SIZE_POINTERS:
31124+ {
31125+ args_size[i] = *(int*)(command_buffer + commmand_buffer_offset);
31126+ commmand_buffer_offset += sizeof(int);
31127+
31128+ if (args_size[i] == 0)
31129+ {
31130+ args[i] = 0;
31131+ }
31132+ else
31133+ {
31134+ args[i] = (long)(command_buffer + commmand_buffer_offset);
31135+ }
31136+
31137+ if (args[i] == 0)
31138+ {
31139+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
31140+ {
31141+ fprintf(stderr, "call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31142+ return 0;
31143+ }
31144+ }
31145+#ifdef ENABLE_GL_LOG
31146+ if (must_save) write_gl_debug_cmd_buffer_with_size(args_size[i], (void*)args[i]);
31147+#endif
31148+ commmand_buffer_offset += args_size[i];
31149+
31150+ break;
31151+ }
31152+
31153+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31154+ {
31155+ args_size[i] = compute_arg_length(stderr, func_number, i, args);
31156+ args[i] = (args_size[i]) ? (long)(command_buffer + commmand_buffer_offset) : 0;
31157+#ifdef ENABLE_GL_LOG
31158+ if (must_save) write_gl_debug_cmd_buffer_without_size(args_size[i], (void*)args[i]);
31159+#endif
31160+ commmand_buffer_offset += args_size[i];
31161+ break;
31162+ }
31163+
31164+ CASE_OUT_POINTERS:
31165+ {
31166+ fprintf(stderr, "shouldn't happen TYPE_OUT_xxxx : call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31167+ return 0;
31168+ break;
31169+ }
31170+
31171+ case TYPE_DOUBLE:
31172+ CASE_IN_KNOWN_SIZE_POINTERS:
31173+ args[i] = (long)(command_buffer + commmand_buffer_offset);
31174+ args_size[i] = tab_args_type_length[args_type[i]];
31175+#ifdef ENABLE_GL_LOG
31176+ if (must_save) write_gl_debug_cmd_buffer_without_size(tab_args_type_length[args_type[i]], (void*)args[i]);
31177+#endif
31178+ commmand_buffer_offset += tab_args_type_length[args_type[i]];
31179+ break;
31180+
31181+ case TYPE_IN_IGNORED_POINTER:
31182+ args[i] = 0;
31183+ break;
31184+
31185+ default:
31186+ fprintf(stderr, "shouldn't happen : call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31187+ return 0;
31188+ break;
31189+ }
31190+ }
31191+
31192+ if (display_function_call) display_gl_call(stderr, func_number, args, args_size);
31193+
31194+ do_function_call(dpy, func_number, 1, args, ret_string);
31195+ }
31196+ }
31197+ else
31198+ {
31199+#ifdef ENABLE_GL_LOG
31200+ if (must_save && func_number != _synchronize_func) write_gl_debug_cmd_short(func_number);
31201+#endif
31202+
31203+ for(i=0;i<nb_args;i++)
31204+ {
31205+ switch(args_type[i])
31206+ {
31207+ case TYPE_UNSIGNED_CHAR:
31208+ case TYPE_CHAR:
31209+ args[i] = read_sock_int(sock);
31210+#ifdef ENABLE_GL_LOG
31211+ if (must_save) write_gl_debug_cmd_char(args[i]);
31212+#endif
31213+ break;
31214+
31215+ case TYPE_UNSIGNED_SHORT:
31216+ case TYPE_SHORT:
31217+ args[i] = read_sock_int(sock);
31218+#ifdef ENABLE_GL_LOG
31219+ if (must_save) write_gl_debug_cmd_short(args[i]);
31220+#endif
31221+ break;
31222+
31223+ case TYPE_UNSIGNED_INT:
31224+ case TYPE_INT:
31225+ case TYPE_FLOAT:
31226+ args[i] = read_sock_int(sock);
31227+#ifdef ENABLE_GL_LOG
31228+ if (must_save) write_gl_debug_cmd_int(args[i]);
31229+#endif
31230+ break;
31231+
31232+ case TYPE_NULL_TERMINATED_STRING:
31233+ CASE_IN_UNKNOWN_SIZE_POINTERS:
31234+ {
31235+ args_size[i] = read_sock_int(sock);
31236+ if (args_size[i])
31237+ {
31238+ args[i] = (long)malloc(args_size[i]);
31239+ read_sock_data(sock, (void*)args[i], args_size[i]);
31240+ }
31241+ else
31242+ {
31243+ args[i] = 0;
31244+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
31245+ {
31246+ fprintf(stderr, "call %s arg %d\n", tab_opengl_calls_name[func_number], i);
31247+ return 0;
31248+ }
31249+ }
31250+#ifdef ENABLE_GL_LOG
31251+ if (must_save) write_gl_debug_cmd_buffer_with_size(args_size[i], (void*)args[i]);
31252+#endif
31253+ break;
31254+ }
31255+
31256+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31257+ {
31258+ args_size[i] = compute_arg_length(stderr, func_number, i, args);
31259+ args[i] = (args_size[i]) ? (long)malloc(args_size[i]) : 0;
31260+ read_sock_data(sock, (void*)args[i], args_size[i]);
31261+#ifdef ENABLE_GL_LOG
31262+ if (must_save) write_gl_debug_cmd_buffer_without_size(args_size[i], (void*)args[i]);
31263+#endif
31264+ break;
31265+ }
31266+
31267+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31268+ {
31269+ args_size[i] = compute_arg_length(stderr, func_number, i, args);
31270+ args[i] = (long)malloc(args_size[i]);
31271+ break;
31272+ }
31273+
31274+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
31275+ {
31276+ args_size[i] = read_sock_int(sock);
31277+ if (func_number == glGetProgramLocalParameterdvARB_func)
31278+ {
31279+ fprintf(stderr, "size = %d\n", args_size[i]);
31280+ }
31281+ if (args_size[i])
31282+ {
31283+ args[i] = (long)malloc(args_size[i]);
31284+ }
31285+ else
31286+ {
31287+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
31288+ {
31289+ fprintf(stderr, "call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31290+ return 0;
31291+ };
31292+ args[i] = 0;
31293+ }
31294+ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
31295+#ifdef ENABLE_GL_LOG
31296+ if (must_save) write_gl_debug_cmd_int(args_size[i]);
31297+#endif
31298+ break;
31299+ }
31300+
31301+ CASE_OUT_KNOWN_SIZE_POINTERS:
31302+ {
31303+ args_size[i] = tab_args_type_length[args_type[i]];
31304+ assert(args_size[i]);
31305+ args[i] = (long)malloc(args_size[i]);
31306+ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
31307+ break;
31308+ }
31309+
31310+ case TYPE_DOUBLE:
31311+ CASE_IN_KNOWN_SIZE_POINTERS:
31312+ args_size[i] = tab_args_type_length[args_type[i]];
31313+ args[i] = (long)malloc(args_size[i]);
31314+ read_sock_data(sock, (void*)args[i], args_size[i]);
31315+#ifdef ENABLE_GL_LOG
31316+ if (must_save) write_gl_debug_cmd_buffer_without_size(tab_args_type_length[args_type[i]], (void*)args[i]);
31317+#endif
31318+ break;
31319+
31320+ case TYPE_IN_IGNORED_POINTER:
31321+ args[i] = 0;
31322+ break;
31323+
31324+ default:
31325+ fprintf(stderr, "shouldn't happen : call %s arg %d\n", tab_opengl_calls_name[func_number], i);
31326+ return 0;
31327+ break;
31328+ }
31329+ }
31330+
31331+ if (display_function_call) display_gl_call(stderr, func_number, args, args_size);
31332+
31333+ if (getenv("ALWAYS_FLUSH")) fflush(f);
31334+
31335+ int ret = do_function_call(dpy, func_number, 1, args, ret_string);
31336+#ifdef ENABLE_GL_LOG
31337+ if (must_save && func_number == glXGetVisualFromFBConfig_func)
31338+ {
31339+ write_gl_debug_cmd_int(ret);
31340+ }
31341+#endif
31342+
31343+ for(i=0;i<nb_args;i++)
31344+ {
31345+ switch(args_type[i])
31346+ {
31347+ case TYPE_UNSIGNED_INT:
31348+ case TYPE_INT:
31349+ case TYPE_UNSIGNED_CHAR:
31350+ case TYPE_CHAR:
31351+ case TYPE_UNSIGNED_SHORT:
31352+ case TYPE_SHORT:
31353+ case TYPE_FLOAT:
31354+ break;
31355+
31356+ case TYPE_NULL_TERMINATED_STRING:
31357+ case TYPE_DOUBLE:
31358+ CASE_IN_POINTERS:
31359+ if (args[i]) free((void*)args[i]);
31360+ break;
31361+
31362+ CASE_OUT_POINTERS:
31363+ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
31364+ write_sock_data(sock, (void*)args[i], args_size[i]);
31365+ if (display_function_call)
31366+ {
31367+ if (args_type[i] == TYPE_OUT_1INT)
31368+ {
31369+ fprintf(stderr, "out[%d] : %d\n", i, *(int*)args[i]);
31370+ }
31371+ else if (args_type[i] == TYPE_OUT_1FLOAT)
31372+ {
31373+ fprintf(stderr, "out[%d] : %f\n", i, *(float*)args[i]);
31374+ }
31375+ }
31376+ if (args[i]) free((void*)args[i]);
31377+ break;
31378+
31379+ case TYPE_IN_IGNORED_POINTER:
31380+ args[i] = 0;
31381+ break;
31382+
31383+ default:
31384+ fprintf(stderr, "shouldn't happen : call %s arg %d\n", tab_opengl_calls_name[func_number], i);
31385+ return 0;
31386+ break;
31387+ }
31388+ }
31389+
31390+ if (signature->ret_type == TYPE_CONST_CHAR)
31391+ {
31392+ write_sock_int(sock, strlen(ret_string) + 1);
31393+ write_sock_data(sock, ret_string, strlen(ret_string) + 1);
31394+ }
31395+ else if (signature->ret_type != TYPE_NONE)
31396+ {
31397+ write_sock_int(sock, ret);
31398+ }
31399+
31400+#ifdef ENABLE_GL_LOG
31401+ if (must_save && func_number == _exit_process_func)
31402+ {
31403+ write_gl_debug_end();
31404+ }
31405+#endif
31406+ if (func_number == _exit_process_func)
31407+ {
31408+ return -1;
31409+ }
31410+ else if (func_number == glXSwapBuffers_func)
31411+ {
31412+ int diff_time;
31413+ count_current++;
31414+ gettimeofday(&current_time, NULL);
31415+#ifdef ENABLE_GL_LOG
31416+ if (must_save && timestamp)
31417+ {
31418+ long long ts = (current_time.tv_sec - time_stamp_start.tv_sec) * (long long)1000000 + current_time.tv_usec - time_stamp_start.tv_usec;
31419+ /* -1 is special code that indicates time synchro */
31420+ write_gl_debug_cmd_short(timesynchro_func);
31421+ write_gl_debug_cmd_longlong(ts);
31422+ }
31423+#endif
31424+ diff_time = (current_time.tv_sec - last_time.tv_sec) * 1000 + (current_time.tv_usec - last_time.tv_usec) / 1000;
31425+ if (diff_time > refresh_rate)
31426+ {
31427+#ifdef ENABLE_GL_LOG
31428+ fflush(f);
31429+#endif
31430+ printf("%d frames in %.1f seconds = %.3f FPS\n",
31431+ count_current - count_last_time,
31432+ diff_time / 1000.,
31433+ (count_current - count_last_time) * 1000. / diff_time);
31434+ last_time.tv_sec = current_time.tv_sec;
31435+ last_time.tv_usec = current_time.tv_usec;
31436+ count_last_time = count_current;
31437+ }
31438+ }
31439+ }
31440+ return 0;
31441+}
31442+
31443+int
31444+make_socket (uint16_t port)
31445+{
31446+ int sock;
31447+ struct sockaddr_in name;
31448+
31449+ /* Create the socket. */
31450+ sock = socket (PF_INET, SOCK_STREAM, 0);
31451+ if (sock < 0)
31452+ {
31453+ perror ("socket");
31454+ exit (EXIT_FAILURE);
31455+ }
31456+
31457+ /* Give the socket a name. */
31458+ name.sin_family = AF_INET;
31459+ name.sin_port = htons (port);
31460+ name.sin_addr.s_addr = htonl (INADDR_ANY);
31461+ if (bind (sock, (struct sockaddr *) &name, sizeof (name)) < 0)
31462+ {
31463+ perror ("bind");
31464+ exit (EXIT_FAILURE);
31465+ }
31466+
31467+ return sock;
31468+}
31469+
31470+static int x_error_handler(Display *display,
31471+ XErrorEvent *error)
31472+{
31473+ char buf[64];
31474+ XGetErrorText(display, error->error_code, buf, 63);
31475+ fprintf (stderr, "The program received an X Window System error.\n"
31476+ "This probably reflects a bug in the program.\n"
31477+ "The error was '%s'.\n"
31478+ " (Details: serial %ld error_code %d request_code %d minor_code %d)\n",
31479+ buf,
31480+ error->serial,
31481+ error->error_code,
31482+ error->request_code,
31483+ error->minor_code);
31484+ has_x_error = 1;
31485+ return 0;
31486+}
31487+
31488+void usage()
31489+{
31490+ printf("Usage : opengl_server [OPTION]\n\n");
31491+ printf("The following options are available :\n");
31492+ printf("--port=XXXX : set XXX as the port number for the TCP/IP server (default : 5555)\n");
31493+ printf("--debug : output debugging trace on stderr\n");
31494+ printf("--save : dump the serialialized OpenGL flow in a file (default : /tmp/debug_gl.bin)\n");
31495+ printf("--filename=X : the file where to write the serailized OpenGL flow\n");
31496+ printf("--different-windows : even if the client is on 127.0.0.1, display OpenGL on a new X window\n");
31497+ printf("--parent-xid=XXX : use XXX as the XID of the parent X window where to display the OpenGL flow\n");
31498+ printf(" This is useful if you want to run accelerated OpenGL inside a non-patched QEMU\n");
31499+ printf(" or from another emulator, through TCP/IP\n");
31500+ printf("--h or --help : display this help\n");
31501+}
31502+
31503+int
31504+main (int argc, char* argv[])
31505+{
31506+ int sock;
31507+ fd_set active_fd_set, read_fd_set;
31508+ int i;
31509+ struct sockaddr_in clientname;
31510+ socklen_t size;
31511+ int port = PORT;
31512+ int different_windows = 0;
31513+
31514+ for(i=1;i<argc;i++)
31515+ {
31516+ if (argv[i][0] == '-' && argv[i][1] == '-')
31517+ argv[i] = argv[i]+1;
31518+
31519+ if (strcmp(argv[i], "-debug") == 0)
31520+ {
31521+ display_function_call = 1;
31522+ }
31523+ else if (strcmp(argv[i], "-save") == 0)
31524+ {
31525+ must_save = 1;
31526+ }
31527+ else if (strncmp(argv[i], "-port=",6) == 0)
31528+ {
31529+ port = atoi(argv[i] + 6);
31530+ }
31531+ else if (strncmp(argv[i], "-filename=",strlen("-filename=")) == 0)
31532+ {
31533+ filename = argv[i] + strlen("-filename=");
31534+ }
31535+ else if (strncmp(argv[i], "-parent-xid=",strlen("-parent-xid=")) == 0)
31536+ {
31537+ char* c = argv[i] + strlen("-parent-xid=");
31538+ parent_xid = strtol(c, NULL, 0);
31539+ different_windows = 1;
31540+ }
31541+ else if (strcmp(argv[i], "-different-windows") == 0)
31542+ {
31543+ different_windows = 1;
31544+ }
31545+ else if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "-help") == 0)
31546+ {
31547+ usage();
31548+ return 0;
31549+ }
31550+ else
31551+ {
31552+ fprintf(stderr, "unknown parameter : %s\n", argv[i]);
31553+ usage();
31554+ return -1;
31555+ }
31556+ }
31557+
31558+ /* Create the socket and set it up to accept connections. */
31559+ sock = make_socket (port);
31560+
31561+ int flag = 1;
31562+ if (setsockopt(sock, IPPROTO_IP, SO_REUSEADDR,(char *)&flag, sizeof(int)) != 0)
31563+ {
31564+ perror("setsockopt SO_REUSEADDR");
31565+ }
31566+ if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,(char *)&flag, sizeof(int)) != 0)
31567+ {
31568+ perror("setsockopt TCP_NODELAY");
31569+ }
31570+
31571+ if (listen (sock, 1) < 0)
31572+ {
31573+ perror ("listen");
31574+ exit (EXIT_FAILURE);
31575+ }
31576+
31577+ struct sigaction action;
31578+ action.sa_handler = SIG_IGN;
31579+ action.sa_flags = SA_NOCLDWAIT;
31580+ sigaction(SIGCHLD,&action,NULL);
31581+
31582+ FD_ZERO (&active_fd_set);
31583+ FD_SET (sock, &active_fd_set);
31584+
31585+ while(1)
31586+ {
31587+ int new, pid;
31588+
31589+ read_fd_set = active_fd_set;
31590+ if (select (FD_SETSIZE, &read_fd_set, NULL, NULL, NULL) < 0)
31591+ {
31592+ perror ("select");
31593+ exit (EXIT_FAILURE);
31594+ }
31595+
31596+ size = sizeof (clientname);
31597+ new = accept (sock, (struct sockaddr *) &clientname, &size);
31598+ if (new < 0)
31599+ {
31600+ perror ("accept");
31601+ exit (EXIT_FAILURE);
31602+ }
31603+ pid = fork();
31604+ if (pid == -1)
31605+ {
31606+ perror ("fork");
31607+ exit(EXIT_FAILURE);
31608+ }
31609+ if (pid == 0)
31610+ {
31611+ close(sock);
31612+
31613+ fprintf (stderr, "Server: connect from host %s, port %hd.\n",
31614+ inet_ntoa (clientname.sin_addr),
31615+ ntohs (clientname.sin_port));
31616+
31617+ gettimeofday(&last_time, NULL);
31618+ gettimeofday(&last_read_time, NULL);
31619+
31620+ if (strcmp(inet_ntoa(clientname.sin_addr), "127.0.0.1") == 0 &&
31621+ different_windows == 0)
31622+ {
31623+ opengl_exec_set_local_connection();
31624+ }
31625+
31626+ if (timestamp)
31627+ {
31628+ gettimeofday(&time_stamp_start, NULL);
31629+ }
31630+
31631+ XSetErrorHandler(x_error_handler);
31632+
31633+ while(1)
31634+ {
31635+ if (read_from_client (new) < 0)
31636+ {
31637+ do_function_call(dpy, _exit_process_func, 1, NULL, NULL);
31638+
31639+ fprintf (stderr, "Server: disconnect from host %s, port %hd.\n",
31640+ inet_ntoa (clientname.sin_addr),
31641+ ntohs (clientname.sin_port));
31642+
31643+ return 0;
31644+ }
31645+ }
31646+ }
31647+ else
31648+ {
31649+ close(new);
31650+ }
31651+ }
31652+
31653+ return 0;
31654+}
31655Index: trunk/target-i386/opengl_utils.h
31656===================================================================
31657--- /dev/null 1970-01-01 00:00:00.000000000 +0000
31658+++ trunk/target-i386/opengl_utils.h 2009-01-19 23:06:08.000000000 +0000
31659@@ -0,0 +1,453 @@
31660+/*
31661+ * Functions used by host & client sides
31662+ *
31663+ * Copyright (c) 2007 Even Rouault
31664+ *
31665+ * Permission is hereby granted, free of charge, to any person obtaining a copy
31666+ * of this software and associated documentation files (the "Software"), to deal
31667+ * in the Software without restriction, including without limitation the rights
31668+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
31669+ * copies of the Software, and to permit persons to whom the Software is
31670+ * furnished to do so, subject to the following conditions:
31671+ *
31672+ * The above copyright notice and this permission notice shall be included in
31673+ * all copies or substantial portions of the Software.
31674+ *
31675+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31676+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31677+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
31678+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31679+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31680+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
31681+ * THE SOFTWARE.
31682+ */
31683+
31684+
31685+#ifndef _OPENGL_UTILS
31686+#define _OPENGL_UTILS
31687+
31688+typedef struct {
31689+ unsigned int *values;
31690+ int nbValues;
31691+} RangeAllocator;
31692+
31693+/*
31694+static void print_range(RangeAllocator* range)
31695+{
31696+ int i;
31697+ printf("%s", "table : ");
31698+ for(i=0;i<range->nbValues;i++)
31699+ {
31700+ printf("%d ", range->values[i]);
31701+ }
31702+ printf("\n");
31703+}
31704+*/
31705+
31706+static inline void alloc_value(RangeAllocator *range, unsigned int value)
31707+{
31708+ if (value == 0)
31709+ return;
31710+ if (range->nbValues >= 1) {
31711+ int lower = 0;
31712+ int upper = range->nbValues - 1;
31713+
31714+ while (1) {
31715+ int mid = (lower + upper) / 2;
31716+
31717+ if (range->values[mid] > value)
31718+ upper = mid;
31719+ else if (range->values[mid] < value)
31720+ lower = mid;
31721+ else
31722+ break;
31723+ if (upper - lower <= 1) {
31724+ if (value < range->values[lower]) {
31725+ range->values =
31726+ realloc(range->values,
31727+ (range->nbValues + 1) * sizeof(int));
31728+ memmove(&range->values[lower + 1], &range->values[lower],
31729+ (range->nbValues - lower) * sizeof(int));
31730+ range->values[lower] = value;
31731+ range->nbValues++;
31732+ } else if (value == range->values[lower]) {
31733+ } else if (value < range->values[upper]) {
31734+ range->values =
31735+ realloc(range->values,
31736+ (range->nbValues + 1) * sizeof(int));
31737+ memmove(&range->values[upper + 1], &range->values[upper],
31738+ (range->nbValues - upper) * sizeof(int));
31739+ range->values[upper] = value;
31740+ range->nbValues++;
31741+ } else if (value == range->values[upper]) {
31742+ } else {
31743+ upper++;
31744+
31745+ range->values =
31746+ realloc(range->values,
31747+ (range->nbValues + 1) * sizeof(int));
31748+ memmove(&range->values[upper + 1], &range->values[upper],
31749+ (range->nbValues - upper) * sizeof(int));
31750+ range->values[upper] = value;
31751+ range->nbValues++;
31752+ }
31753+ break;
31754+ }
31755+ }
31756+ } else {
31757+ range->values = malloc(sizeof(int));
31758+ range->values[0] = value;
31759+ range->nbValues = 1;
31760+ }
31761+}
31762+
31763+/* return first value */
31764+static inline unsigned int alloc_range(RangeAllocator *range, int n,
31765+ unsigned int *values)
31766+{
31767+ int i, j;
31768+
31769+ if (range->nbValues == 0) {
31770+ range->nbValues = n;
31771+ range->values = malloc(n * sizeof(int));
31772+ for (i = 0; i < n; i++) {
31773+ range->values[i] = i + 1;
31774+ if (values)
31775+ values[i] = range->values[i];
31776+ }
31777+ return 1;
31778+ } else {
31779+ int lastValue = 1;
31780+
31781+ for (i = 0; i < range->nbValues; i++) {
31782+ if ((int) range->values[i] - (int) lastValue - 1 >= n) {
31783+ range->values =
31784+ realloc(range->values,
31785+ (range->nbValues + n) * sizeof(int));
31786+ memmove(&range->values[i + n], &range->values[i],
31787+ (range->nbValues - i) * sizeof(int));
31788+ for (j = 0; j < n; j++) {
31789+ range->values[i + j] = lastValue + 1 + j;
31790+ if (values)
31791+ values[j] = range->values[i + j];
31792+ }
31793+ range->nbValues += n;
31794+ break;
31795+ } else
31796+ lastValue = range->values[i];
31797+ }
31798+ if (i == range->nbValues) {
31799+ range->values =
31800+ realloc(range->values, (range->nbValues + n) * sizeof(int));
31801+ for (j = 0; j < n; j++) {
31802+ range->values[i + j] = lastValue + 1 + j;
31803+ if (values)
31804+ values[j] = range->values[i + j];
31805+ }
31806+ range->nbValues += n;
31807+ }
31808+ return lastValue + 1;
31809+ }
31810+}
31811+
31812+static inline void delete_value(RangeAllocator *range, unsigned int value)
31813+{
31814+ if (value == 0)
31815+ return;
31816+ if (range->nbValues >= 1) {
31817+ int lower = 0;
31818+ int upper = range->nbValues - 1;
31819+
31820+ while (1) {
31821+ int mid = (lower + upper) / 2;
31822+
31823+ if (range->values[mid] > value)
31824+ upper = mid;
31825+ else if (range->values[mid] < value)
31826+ lower = mid;
31827+ else {
31828+ lower = upper = mid;
31829+ }
31830+ if (upper - lower <= 1) {
31831+ if (value == range->values[lower]) {
31832+ memmove(&range->values[lower], &range->values[lower + 1],
31833+ (range->nbValues - lower - 1) * sizeof(int));
31834+ range->nbValues--;
31835+ } else if (value == range->values[upper]) {
31836+ memmove(&range->values[upper], &range->values[upper + 1],
31837+ (range->nbValues - upper - 1) * sizeof(int));
31838+ range->nbValues--;
31839+ }
31840+ break;
31841+ }
31842+ }
31843+ }
31844+}
31845+
31846+static inline void delete_range(RangeAllocator *range, int n,
31847+ const unsigned int *values)
31848+{
31849+ int i;
31850+
31851+ for (i = 0; i < n; i++) {
31852+ delete_value(range, values[i]);
31853+ }
31854+}
31855+
31856+static inline void delete_consecutive_values(RangeAllocator *range,
31857+ unsigned int first, int n)
31858+{
31859+ int i;
31860+
31861+ for (i = 0; i < n; i++) {
31862+ delete_value(range, first + i);
31863+ }
31864+}
31865+
31866+
31867+/*****************************************************************/
31868+/* */
31869+/* CRC LOOKUP TABLE */
31870+/* ================ */
31871+/* The following CRC lookup table was generated automagically */
31872+/* by the Rocksoft^tm Model CRC Algorithm Table Generation */
31873+/* Program V1.0 using the following model parameters: */
31874+/* */
31875+/* Width : 4 bytes. */
31876+/* Poly : 0x04C11DB7L */
31877+/* Reverse : TRUE. */
31878+/* */
31879+/* For more information on the Rocksoft^tm Model CRC Algorithm, */
31880+/* see the document titled "A Painless Guide to CRC Error */
31881+/* Detection Algorithms" by Ross Williams */
31882+/* (ross@guest.adelaide.edu.au.). This document is likely to be */
31883+/* in the FTP archive "ftp.adelaide.edu.au/pub/rocksoft". */
31884+/* */
31885+/*****************************************************************/
31886+
31887+static const unsigned int crctable[256] = {
31888+ 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,
31889+ 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
31890+ 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,
31891+ 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
31892+ 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,
31893+ 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
31894+ 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,
31895+ 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,
31896+ 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,
31897+ 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
31898+ 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,
31899+ 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
31900+ 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,
31901+ 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,
31902+ 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,
31903+ 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,
31904+ 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,
31905+ 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
31906+ 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,
31907+ 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
31908+ 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,
31909+ 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,
31910+ 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,
31911+ 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
31912+ 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,
31913+ 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,
31914+ 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,
31915+ 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,
31916+ 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,
31917+ 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
31918+ 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,
31919+ 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,
31920+ 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,
31921+ 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,
31922+ 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,
31923+ 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
31924+ 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,
31925+ 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,
31926+ 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,
31927+ 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
31928+ 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,
31929+ 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
31930+ 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,
31931+ 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,
31932+ 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,
31933+ 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,
31934+ 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,
31935+ 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
31936+ 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,
31937+ 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
31938+ 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,
31939+ 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,
31940+ 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,
31941+ 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
31942+ 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,
31943+ 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,
31944+ 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,
31945+ 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,
31946+ 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,
31947+ 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
31948+ 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,
31949+ 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,
31950+ 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,
31951+ 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
31952+};
31953+
31954+static unsigned int calc_checksum(const void *_ptr, int length,
31955+ unsigned int seed)
31956+{
31957+ int i;
31958+ unsigned int crc = seed;
31959+ unsigned char *ptr = (unsigned char *) _ptr;
31960+
31961+ if (ptr == NULL)
31962+ return -1;
31963+ for (i = 0; i < length; i++) {
31964+ crc = crctable[(crc ^ *ptr++) & 0xFF] ^ (crc >> 8);
31965+ }
31966+ return crc;
31967+}
31968+
31969+
31970+static inline void display_gl_call(FILE *f,
31971+ int func_number, arg_t *args, int *args_size)
31972+{
31973+ int i;
31974+
31975+ if (func_number < 0) {
31976+ fprintf(f, "unknown call : %d\n", func_number);
31977+ return;
31978+ }
31979+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
31980+ int nb_args = signature->nb_args;
31981+ int *args_type = signature->args_type;
31982+
31983+ fprintf(f, "%s(", tab_opengl_calls_name[func_number]);
31984+
31985+ for (i = 0; i < nb_args; i++) {
31986+ switch (args_type[i]) {
31987+ case TYPE_UNSIGNED_CHAR:
31988+ case TYPE_CHAR:
31989+ {
31990+ fprintf(f, "%d", (char) args[i]);
31991+ break;
31992+ }
31993+
31994+ case TYPE_UNSIGNED_SHORT:
31995+ case TYPE_SHORT:
31996+ {
31997+ fprintf(f, "%d", (short) args[i]);
31998+ break;
31999+ }
32000+
32001+ case TYPE_UNSIGNED_INT:
32002+ case TYPE_INT:
32003+ {
32004+ fprintf(f, "%d", (int) args[i]);
32005+ break;
32006+ }
32007+
32008+ case TYPE_FLOAT:
32009+ fprintf(f, "%f", *(float *) &args[i]);
32010+ break;
32011+
32012+ case TYPE_DOUBLE:
32013+ CASE_IN_KNOWN_SIZE_POINTERS:
32014+ case TYPE_NULL_TERMINATED_STRING:
32015+ CASE_IN_UNKNOWN_SIZE_POINTERS:
32016+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
32017+ if (args_type[i] == TYPE_NULL_TERMINATED_STRING) {
32018+ fprintf(f, "\"%s\"", (char *) args[i]);
32019+ } else if (args_type[i] == TYPE_DOUBLE)
32020+ fprintf(f, "%f", *(double *) args[i]);
32021+ else if (IS_ARRAY_CHAR(args_type[i]) &&
32022+ args_size[i] <= 4 * sizeof(char)) {
32023+ int j;
32024+ int n = args_size[i] / sizeof(char);
32025+
32026+ fprintf(f, "(");
32027+ for (j = 0; j < n; j++) {
32028+ fprintf(f, "%d", ((unsigned char *) args[i])[j]);
32029+ if (j != n - 1)
32030+ fprintf(f, ", ");
32031+ }
32032+ fprintf(f, ")");
32033+ } else if (IS_ARRAY_SHORT(args_type[i]) &&
32034+ args_size[i] <= 4 * sizeof(short)) {
32035+ int j;
32036+ int n = args_size[i] / sizeof(short);
32037+
32038+ fprintf(f, "(");
32039+ for (j = 0; j < n; j++) {
32040+ fprintf(f, "%d", ((short *) args[i])[j]);
32041+ if (j != n - 1)
32042+ fprintf(f, ", ");
32043+ }
32044+ fprintf(f, ")");
32045+ } else if (IS_ARRAY_INT(args_type[i]) &&
32046+ args_size[i] <= 4 * sizeof(int)) {
32047+ int j;
32048+ int n = args_size[i] / sizeof(int);
32049+
32050+ fprintf(f, "(");
32051+ for (j = 0; j < n; j++) {
32052+ fprintf(f, "%d", ((int *) args[i])[j]);
32053+ if (j != n - 1)
32054+ fprintf(f, ", ");
32055+ }
32056+ fprintf(f, ")");
32057+ } else if (IS_ARRAY_FLOAT(args_type[i]) &&
32058+ args_size[i] <= 4 * sizeof(float)) {
32059+ int j;
32060+ int n = args_size[i] / sizeof(float);
32061+
32062+ fprintf(f, "(");
32063+ for (j = 0; j < n; j++) {
32064+ fprintf(f, "%f", ((float *) args[i])[j]);
32065+ if (j != n - 1)
32066+ fprintf(f, ", ");
32067+ }
32068+ fprintf(f, ")");
32069+ } else if (IS_ARRAY_DOUBLE(args_type[i]) &&
32070+ args_size[i] <= 4 * sizeof(double)) {
32071+ int j;
32072+ int n = args_size[i] / sizeof(double);
32073+
32074+ fprintf(f, "(");
32075+ for (j = 0; j < n; j++) {
32076+ fprintf(f, "%f", ((double *) args[i])[j]);
32077+ if (j != n - 1)
32078+ fprintf(f, ", ");
32079+ }
32080+ fprintf(f, ")");
32081+ } else {
32082+ fprintf(f, "%d bytes", args_size[i]);
32083+ fprintf(f, "(crc = 0x%x)",
32084+ calc_checksum((void *) args[i], args_size[i],
32085+ 0xFFFFFFFF));
32086+ }
32087+ break;
32088+
32089+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
32090+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
32091+ CASE_OUT_KNOWN_SIZE_POINTERS:
32092+ {
32093+ fprintf(f, "%d bytes (OUT)", args_size[i]);
32094+ break;
32095+ }
32096+
32097+ case TYPE_IN_IGNORED_POINTER:
32098+ break;
32099+
32100+ default:
32101+ fprintf(f, "shouldn't happen : call %s arg %d\n",
32102+ tab_opengl_calls_name[func_number], i);
32103+ return;
32104+ break;
32105+ }
32106+ if (i < nb_args - 1)
32107+ fprintf(f, ", ");
32108+ }
32109+ fprintf(f, ")\n");
32110+}
32111+
32112+#endif
32113Index: trunk/target-i386/parse_gl_h.c
32114===================================================================
32115--- /dev/null 1970-01-01 00:00:00.000000000 +0000
32116+++ trunk/target-i386/parse_gl_h.c 2009-01-19 23:06:08.000000000 +0000
32117@@ -0,0 +1,1496 @@
32118+/*
32119+ * Parse gl.h et glx.h to auto-generate source code
32120+ *
32121+ * Copyright (c) 2006,2007 Even Rouault
32122+ *
32123+ * Permission is hereby granted, free of charge, to any person obtaining a copy
32124+ * of this software and associated documentation files (the "Software"), to deal
32125+ * in the Software without restriction, including without limitation the rights
32126+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
32127+ * copies of the Software, and to permit persons to whom the Software is
32128+ * furnished to do so, subject to the following conditions:
32129+ *
32130+ * The above copyright notice and this permission notice shall be included in
32131+ * all copies or substantial portions of the Software.
32132+ *
32133+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32134+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32135+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
32136+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
32137+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32138+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
32139+ * THE SOFTWARE.
32140+ */
32141+
32142+/* gcc -g parse_gl_h.c -o parse_gl_h && ./parse_gl_h */
32143+#include <stdio.h>
32144+#include <stdlib.h>
32145+#include <string.h>
32146+#include <assert.h>
32147+
32148+int isExtByName(const char* name)
32149+{
32150+ return (strstr(name, "ARB") != NULL) ||
32151+ (strstr(name, "IBM") != NULL) ||
32152+ (strstr(name, "EXT") != NULL) ||
32153+ (strstr(name, "ATI") != NULL) ||
32154+ (strstr(name, "NV") != NULL) ||
32155+ (strstr(name, "MESA") != NULL) ||
32156+ (strstr(name, "APPLE") != NULL) ||
32157+ (strstr(name, "SUN") != NULL) ||
32158+ (strstr(name, "SGI") != NULL);
32159+}
32160+
32161+char* get_arg_type(char* s)
32162+{
32163+ while(*s == ' ' || *s == '\t') s++;
32164+ char* n = s;
32165+ char* c = strstr(n, "const");
32166+ if (c)
32167+ n += 6;
32168+
32169+ char* t = strstr(n, " ");
32170+ if (t)
32171+ {
32172+ if (t[1] == '*')
32173+ t += 2;
32174+ t[0] = 0;
32175+ char* ori = t;
32176+ t = strstr(t+1, "[");
32177+ if (t)
32178+ {
32179+ memmove(ori, t, strlen(t));
32180+ strstr(ori, "]")[1] = 0;
32181+ }
32182+ }
32183+ return strdup(s);
32184+}
32185+
32186+typedef struct
32187+{
32188+ char* type;
32189+ char* name;
32190+ int nargs;
32191+ char** args;
32192+ int ok;
32193+ int just_for_server_side;
32194+ int has_out_parameters;
32195+ int isExt;
32196+} FuncDesc;
32197+
32198+int isExt(FuncDesc* func)
32199+{
32200+ return func->isExt;
32201+}
32202+
32203+char* get_type_string(char* type)
32204+{
32205+ if (strstr(type, "[16]"))
32206+ {
32207+ if (strstr(type, "float"))
32208+ return ("TYPE_16FLOAT");
32209+ else if (strstr(type, "double"))
32210+ return ("TYPE_16DOUBLE");
32211+ else
32212+ {
32213+ printf("inconnu %s\n", type);
32214+ exit(-1);
32215+ }
32216+ }
32217+ else if (strstr(type, "[128]") && strstr(type, "GLubyte"))
32218+ return strstr(type, "const") ? "TYPE_128UCHAR" : "TYPE_OUT_128UCHAR";
32219+ else if (strstr(type, "const GLvoid *"))
32220+ return "TYPE_ARRAY_VOID";
32221+ else if (strstr(type, "const GLchar *") ||
32222+ strstr(type, "const GLcharARB *"))
32223+ return "TYPE_NULL_TERMINATED_STRING";
32224+ else if (strstr(type, "const GLbyte *"))
32225+ return "TYPE_ARRAY_SIGNED_CHAR";
32226+ else if (strstr(type, "const GLubyte *"))
32227+ return "TYPE_ARRAY_UNSIGNED_CHAR";
32228+ else if (strstr(type, "const GLshort *"))
32229+ return "TYPE_ARRAY_SHORT";
32230+ else if (strstr(type, "const GLushort *") ||
32231+ strstr(type, "const GLhalfNV *"))
32232+ return "TYPE_ARRAY_UNSIGNED_SHORT";
32233+ else if (strstr(type, "const GLint *"))
32234+ return "TYPE_ARRAY_INT";
32235+ else if (strstr(type, "const GLuint *") ||
32236+ strstr(type, "const GLenum *"))
32237+ return "TYPE_ARRAY_UNSIGNED_INT";
32238+ else if (strstr(type, "const GLfloat *") ||
32239+ strstr(type, "const GLclampf *"))
32240+ return "TYPE_ARRAY_FLOAT";
32241+ else if (strstr(type, "const GLdouble *"))
32242+ return "TYPE_ARRAY_DOUBLE";
32243+ else if (strstr(type, "GLvoid *"))
32244+ return "TYPE_OUT_ARRAY_VOID";
32245+ else if (strstr(type, "GLboolean *") ||
32246+ strstr(type, "GLubyte *"))
32247+ return "TYPE_OUT_ARRAY_UNSIGNED_CHAR";
32248+ else if (strstr(type, "GLcharARB *") ||
32249+ strstr(type, "GLchar *"))
32250+ return "TYPE_OUT_ARRAY_CHAR";
32251+ else if (strstr(type, "GLshort *"))
32252+ return "TYPE_OUT_ARRAY_SHORT";
32253+ else if (strstr(type, "GLushort *"))
32254+ return "TYPE_OUT_ARRAY_UNSIGNED_SHORT";
32255+ else if (strstr(type, "GLint *")||
32256+ strstr(type, "GLsizei *"))
32257+ return "TYPE_OUT_ARRAY_INT";
32258+ else if (strstr(type, "GLuint *") ||
32259+ strstr(type, "GLenum *") ||
32260+ strstr(type, "GLhandleARB *"))
32261+ return "TYPE_OUT_ARRAY_UNSIGNED_INT";
32262+ else if (strstr(type, "GLfloat *"))
32263+ return "TYPE_OUT_ARRAY_FLOAT";
32264+ else if (strstr(type, "GLdouble *"))
32265+ return "TYPE_OUT_ARRAY_DOUBLE";
32266+ else if (strcmp(type, "void") == 0)
32267+ return("TYPE_NONE");
32268+ else if (strcmp(type, "GLbyte") == 0)
32269+ return("TYPE_CHAR");
32270+ else if (strcmp(type, "GLubyte") == 0 ||
32271+ strcmp(type, "GLboolean") == 0)
32272+ return("TYPE_UNSIGNED_CHAR");
32273+ else if (strcmp(type, "GLshort") == 0)
32274+ return("TYPE_SHORT");
32275+ else if (strcmp(type, "GLushort") == 0 ||
32276+ strcmp(type, "GLhalfNV") == 0)
32277+ return("TYPE_UNSIGNED_SHORT");
32278+ else if (strcmp(type, "GLint") == 0 ||
32279+ strcmp(type, "GLsizei") == 0 ||
32280+ strcmp(type, "GLintptr") == 0 ||
32281+ strcmp(type, "GLsizeiptr") == 0 ||
32282+ strcmp(type, "GLintptrARB") == 0 ||
32283+ strcmp(type, "GLsizeiptrARB") == 0)
32284+ return("TYPE_INT");
32285+ else if (strcmp(type, "GLenum") == 0 ||
32286+ strcmp(type, "GLuint") == 0 ||
32287+ strcmp(type, "GLhandleARB") == 0 ||
32288+ strcmp(type, "GLbitfield") == 0)
32289+ return("TYPE_UNSIGNED_INT");
32290+ else if (strcmp(type, "GLfloat") == 0 ||
32291+ strcmp(type, "GLclampf") == 0)
32292+ return("TYPE_FLOAT");
32293+ else if (strcmp(type, "GLdouble") == 0 ||
32294+ strcmp(type, "GLclampd") == 0)
32295+ return("TYPE_DOUBLE");
32296+ else
32297+ {
32298+ printf("inconnu %s\n", type);
32299+ exit(-1);
32300+ }
32301+}
32302+
32303+typedef struct
32304+{
32305+ char* letter;
32306+ char* signature_type_name;
32307+ char* gl_c_type_name;
32308+ char* c_type_name;
32309+} ForIsKnownArgVector;
32310+
32311+#define N_ELEMENTS(x) (sizeof(x)/sizeof(x[0]))
32312+#define N_FIELDS_IN_ARG_VECTOR 4
32313+
32314+
32315+typedef struct
32316+{
32317+ char* func_name;
32318+ char* signature_type_name;
32319+} KnownLastArgFunc;
32320+
32321+static KnownLastArgFunc knownLastArgFuncs[] =
32322+{
32323+{"glFogCoordfv", "TYPE_1FLOAT"},
32324+{"glFogCoorddv", "TYPE_1DOUBLE"},
32325+{"glFogCoordfvEXT", "TYPE_1FLOAT"},
32326+{"glFogCoorddvEXT", "TYPE_1DOUBLE"},
32327+{"glFogCoordhvNV", "TYPE_1USHORT"},
32328+
32329+{"glGetFenceivNV", "TYPE_OUT_1INT"},
32330+
32331+{"glGetTexLevelParameteriv", "TYPE_OUT_1INT" },
32332+{"glGetTexLevelParameterfv", "TYPE_OUT_1FLOAT" },
32333+
32334+{"glGetRenderbufferParameterivEXT", "TYPE_OUT_1INT"},
32335+{"glGetFramebufferAttachmentParameterivEXT", "TYPE_OUT_1INT"},
32336+{"glGetFinalCombinerInputParameterivNV", "TYPE_OUT_1INT"},
32337+{"glGetCombinerOutputParameterivNV", "TYPE_OUT_1INT"},
32338+{"glGetCombinerInputParameterivNV", "TYPE_OUT_1INT"},
32339+{"glGetOcclusionQueryivNV", "TYPE_OUT_1INT"},
32340+{"glGetOcclusionQueryuivNV", "TYPE_OUT_1UINT"},
32341+{"glGetObjectParameterivARB", "TYPE_OUT_1INT"},
32342+{"glGetQueryivARB", "TYPE_OUT_1INT"},
32343+{"glGetQueryiv", "TYPE_OUT_1INT"},
32344+{"glGetQueryObjectivARB", "TYPE_OUT_1INT"},
32345+{"glGetQueryObjectiv", "TYPE_OUT_1INT"},
32346+{"glGetQueryObjectuivARB", "TYPE_OUT_1UINT"},
32347+{"glGetQueryObjectuiv", "TYPE_OUT_1UINT"},
32348+{"glGetProgramivARB", "TYPE_OUT_1INT"},
32349+{"glGetProgramiv", "TYPE_OUT_1INT"},
32350+{"glGetProgramivNV", "TYPE_OUT_1INT"},
32351+{"glGetShaderiv", "TYPE_OUT_1INT"},
32352+
32353+{"glCombinerParameterfvNV", "TYPE_1FLOAT"},
32354+{"glCombinerParameterivNV", "TYPE_1INT"},
32355+
32356+{"glGetFinalCombinerInputParameterfvNV", "TYPE_OUT_1FLOAT"},
32357+{"glGetCombinerOutputParameterfvNV", "TYPE_OUT_1FLOAT"},
32358+{"glGetCombinerInputParameterfvNV", "TYPE_OUT_1FLOAT"},
32359+{"glGetObjectParameterfvARB", "TYPE_OUT_1FLOAT"},
32360+
32361+{"glCombinerStageParameterfvNV", "TYPE_4FLOAT"},
32362+{"glGetCombinerStageParameterfvNV", "TYPE_OUT_4FLOAT"},
32363+
32364+{"glTexBumpParameterivATI", "TYPE_1INT"},
32365+{"glTexBumpParameterfvATI", "TYPE_1FLOAT"},
32366+{"glGetTexBumpParameterivATI", "TYPE_OUT_1INT"},
32367+{"glGetTexBumpParameterfvATI", "TYPE_OUT_1FLOAT"},
32368+
32369+{"glGetProgramLocalParameterfvARB", "TYPE_OUT_4FLOAT"},
32370+{"glGetProgramLocalParameterdvARB", "TYPE_OUT_4DOUBLE"},
32371+{"glGetProgramEnvParameterfvARB", "TYPE_OUT_4FLOAT"},
32372+{"glGetProgramEnvParameterdvARB", "TYPE_OUT_4DOUBLE"},
32373+{"glGetProgramLocalParameterIivNV", "TYPE_OUT_1INT"},
32374+{"glGetProgramLocalParameterIuivNV", "TYPE_OUT_1UINT"},
32375+{"glGetProgramEnvParameterIivNV", "TYPE_OUT_1INT"},
32376+{"glGetProgramEnvParameterIuivNV", "TYPE_OUT_1UINT"},
32377+
32378+{"glGetProgramParameterfvNV", "TYPE_OUT_4FLOAT"},
32379+{"glGetProgramParameterdvNV", "TYPE_OUT_4DOUBLE"},
32380+{"glGetProgramNamedParameterfvNV", "TYPE_OUT_4FLOAT"},
32381+{"glGetProgramNamedParameterdvNV", "TYPE_OUT_4DOUBLE"},
32382+
32383+{"glCullParameterfvEXT", "TYPE_4FLOAT"},
32384+{"glCullParameterdvEXT", "TYPE_4DOUBLE"},
32385+
32386+{"glGetTrackMatrixivNV", "TYPE_OUT_1INT"},
32387+{"glExecuteProgramNV", "TYPE_4FLOAT"},
32388+
32389+{"glEdgeFlagv", "TYPE_1UCHAR"},
32390+
32391+{"glClipPlane", "TYPE_4DOUBLE"},
32392+{"glGetClipPlane", "TYPE_OUT_4DOUBLE"},
32393+
32394+{"glSetFragmentShaderConstantATI", "TYPE_4FLOAT"},
32395+
32396+{"glGetObjectBufferfvATI", "TYPE_OUT_1FLOAT"},
32397+{"glGetObjectBufferivATI", "TYPE_OUT_1INT"},
32398+{"glGetArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
32399+{"glGetArrayObjectivATI", "TYPE_OUT_1INT"},
32400+{"glGetVariantArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
32401+{"glGetVariantArrayObjectivATI", "TYPE_OUT_1INT"},
32402+{"glGetVertexAttribArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
32403+{"glGetVertexAttribArrayObjectivATI", "TYPE_OUT_1INT"},
32404+
32405+{"glPixelTransformParameterivEXT", "TYPE_1INT"},
32406+{"glPixelTransformParameterfvEXT", "TYPE_1FLOAT"},
32407+{"glGetPixelTransformParameterivEXT", "TYPE_OUT_1INT"},
32408+{"glGetPixelTransformParameterfvEXT", "TYPE_OUT_1FLOAT"},
32409+
32410+{"glColorTableParameterfv", "TYPE_4FLOAT"},
32411+{"glColorTableParameteriv", "TYPE_4INT"},
32412+{"glGetColorTableParameterfv", "TYPE_OUT_4FLOAT"},
32413+{"glGetColorTableParameteriv", "TYPE_OUT_4INT"},
32414+{"glColorTableParameterfvEXT", "TYPE_4FLOAT"},
32415+{"glColorTableParameterivEXT", "TYPE_4INT"},
32416+{"glGetColorTableParameterfvEXT", "TYPE_OUT_4FLOAT"},
32417+{"glGetColorTableParameterivEXT", "TYPE_OUT_4INT"},
32418+
32419+{"glGetMinmaxParameterfv", "TYPE_OUT_1FLOAT"},
32420+{"glGetMinmaxParameteriv", "TYPE_OUT_1INT"},
32421+{"glGetHistogramParameterfv", "TYPE_OUT_1FLOAT"},
32422+{"glGetHistogramParameteriv", "TYPE_OUT_1INT"},
32423+{"glGetMinmaxParameterfvEXT", "TYPE_OUT_1FLOAT"},
32424+{"glGetMinmaxParameterivEXT", "TYPE_OUT_1INT"},
32425+{"glGetHistogramParameterfvEXT", "TYPE_OUT_1FLOAT"},
32426+{"glGetHistogramParameterivEXT", "TYPE_OUT_1INT"},
32427+
32428+/* Not sure at all for the 2 followingo ones ! */
32429+{"glGetBooleanIndexedvEXT", "TYPE_OUT_4UCHAR"},
32430+{"glGetIntegerIndexedvEXT", "TYPE_OUT_4INT"},
32431+
32432+{"glReferencePlaneSGIX", "TYPE_4DOUBLE"},
32433+
32434+{"glGetTransformFeedbackVaryingNV", "TYPE_OUT_1INT"},
32435+
32436+};
32437+
32438+int is_known_arg_vector(FuncDesc* desc, char** p_signature_type_name, char** p_c_type_name)
32439+{
32440+ static ForIsKnownArgVector my_tab[] =
32441+ {
32442+ { "b", "CHAR", "GLbyte", "signed char" },
32443+ { "Boolean", "CHAR", "GLboolean", "unsigned char" },
32444+ { "s", "SHORT", "GLshort", "short" },
32445+ { "i", "INT", "GLint", "int" },
32446+ { "Integer", "INT", "GLint", "int" },
32447+ { "ub", "CHAR", "GLubyte", "unsigned char" },
32448+ { "h", "SHORT", "GLhalf", "unsigned short" },
32449+ { "us", "SHORT", "GLushort", "unsigned short" },
32450+ { "ui", "INT", "GLuint", "unsigned int" },
32451+ { "Nb", "CHAR", "GLbyte", "signed char" },
32452+ { "Ns", "SHORT", "GLshort", "short" },
32453+ { "Ni", "INT", "GLint", "int" },
32454+ { "Nub", "CHAR", "GLubyte", "unsigned char" },
32455+ { "Nus", "SHORT", "GLushort", "unsigned short" },
32456+ { "Nui", "INT", "GLuint", "unsigned int" },
32457+
32458+ { "f", "FLOAT", "GLfloat", "float" },
32459+ { "Float", "FLOAT", "GLfloat", "float" },
32460+ { "d", "DOUBLE", "GLdouble", "double" },
32461+ };
32462+
32463+ if (desc->nargs == 0)
32464+ return 0;
32465+
32466+ int i , j;
32467+
32468+ if (strstr(desc->name, "glVertexAttribs") ||
32469+ strstr(desc->name, "glProgramParameters") ||
32470+ strstr(desc->name, "glProgramEnvParameters") ||
32471+ strstr(desc->name, "glProgramLocalParameters") ||
32472+ (strstr(desc->name, "glUniform") && (strstr(desc->name, "iv") || strstr(desc->name, "fv"))))
32473+ return 0;
32474+
32475+ static char signatures[N_ELEMENTS(my_tab)][N_FIELDS_IN_ARG_VECTOR][20] = {0};
32476+ char signature[10];
32477+
32478+ for(i=0;i<N_ELEMENTS(knownLastArgFuncs);i++)
32479+ {
32480+ if (strcmp(desc->name, knownLastArgFuncs[i].func_name) == 0)
32481+ {
32482+ if (p_signature_type_name)
32483+ {
32484+ *p_signature_type_name = knownLastArgFuncs[i].signature_type_name;
32485+ }
32486+ if (p_c_type_name)
32487+ {
32488+ if (strstr(knownLastArgFuncs[i].signature_type_name, "FLOAT"))
32489+ *p_c_type_name = "float";
32490+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "DOUBLE"))
32491+ *p_c_type_name = "double";
32492+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "UINT"))
32493+ *p_c_type_name = "unsigned int";
32494+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "INT"))
32495+ *p_c_type_name = "int";
32496+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "USHORT"))
32497+ *p_c_type_name = "unsigned short";
32498+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "SHORT"))
32499+ *p_c_type_name = "short";
32500+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "UCHAR"))
32501+ *p_c_type_name = "unsigned char";
32502+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "CHAR"))
32503+ *p_c_type_name = "char";
32504+ else
32505+ assert(0);
32506+ }
32507+ return 1;
32508+ }
32509+ }
32510+
32511+ for(i=0;i<N_ELEMENTS(my_tab);i++)
32512+ {
32513+ for(j=1;j<=N_FIELDS_IN_ARG_VECTOR;j++)
32514+ {
32515+ if (strstr(desc->name, "glIndex") && strstr(desc->name, "v"))
32516+ sprintf(signature, "%sv", my_tab[i].letter);
32517+ else
32518+ sprintf(signature, "%d%sv", j, my_tab[i].letter);
32519+ if (strstr(desc->name, signature) &&
32520+ strstr(desc->args[desc->nargs - 1], my_tab[i].gl_c_type_name) &&
32521+ strstr(desc->args[desc->nargs - 1], "*"))
32522+ {
32523+ if (p_signature_type_name)
32524+ {
32525+ if (signatures[i][j-1][0] == 0)
32526+ sprintf(signatures[i][j-1], "TYPE_%d%s", j, my_tab[i].signature_type_name);
32527+ *p_signature_type_name = signatures[i][j-1];
32528+ }
32529+ if (p_c_type_name) *p_c_type_name = my_tab[i].c_type_name;
32530+ return 1;
32531+ }
32532+ }
32533+ }
32534+ return 0;
32535+}
32536+
32537+static void print_server_side_argument(FILE* server_stub, int j, char* glType)
32538+{
32539+ const char* symbolic_type = get_type_string(glType);
32540+ if (strcmp(symbolic_type, "TYPE_CHAR") == 0)
32541+ fprintf(server_stub, "ARG_TO_CHAR(args[%d])", j);
32542+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_CHAR") == 0)
32543+ fprintf(server_stub, "ARG_TO_UNSIGNED_CHAR(args[%d])", j);
32544+ else if (strcmp(symbolic_type, "TYPE_SHORT") == 0)
32545+ fprintf(server_stub, "ARG_TO_SHORT(args[%d])", j);
32546+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_SHORT") == 0)
32547+ fprintf(server_stub, "ARG_TO_UNSIGNED_SHORT(args[%d])", j);
32548+ else if (strcmp(symbolic_type, "TYPE_INT") == 0)
32549+ fprintf(server_stub, "ARG_TO_INT(args[%d])", j);
32550+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_INT") == 0)
32551+ fprintf(server_stub, "ARG_TO_UNSIGNED_INT(args[%d])", j);
32552+ else if (strcmp(symbolic_type, "TYPE_FLOAT") == 0)
32553+ fprintf(server_stub, "ARG_TO_FLOAT(args[%d])", j);
32554+ else if (strcmp(symbolic_type, "TYPE_16FLOAT") == 0)
32555+ fprintf(server_stub, "(const float*)(args[%d])", j);
32556+ else if (strcmp(symbolic_type, "TYPE_DOUBLE") == 0)
32557+ fprintf(server_stub, "ARG_TO_DOUBLE(args[%d])", j);
32558+ else if ( strcmp(symbolic_type, "TYPE_16DOUBLE") == 0)
32559+ fprintf(server_stub, "(const double*)(args[%d])", j);
32560+ else if ( strcmp(symbolic_type, "TYPE_OUT_128UCHAR") == 0)
32561+ fprintf(server_stub, "(unsigned char*)(args[%d])", j);
32562+ else if ( strcmp(symbolic_type, "TYPE_128UCHAR") == 0)
32563+ fprintf(server_stub, "(const unsigned char*)(args[%d])", j);
32564+ else if ( strcmp(symbolic_type, "TYPE_NULL_TERMINATED_STRING") == 0)
32565+ fprintf(server_stub, "(const char*)(args[%d])", j);
32566+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_SHORT") == 0)
32567+ fprintf(server_stub, "(const short*)(args[%d])", j);
32568+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_SHORT") == 0)
32569+ fprintf(server_stub, "(const unsigned short*)(args[%d])", j);
32570+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_INT") == 0)
32571+ fprintf(server_stub, "(const int*)(args[%d])", j);
32572+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_INT") == 0)
32573+ fprintf(server_stub, "(const unsigned int*)(args[%d])", j);
32574+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_FLOAT") == 0)
32575+ fprintf(server_stub, "(const float*)(args[%d])", j);
32576+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_DOUBLE") == 0)
32577+ fprintf(server_stub, "(const double*)(args[%d])", j);
32578+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_CHAR") == 0)
32579+ fprintf(server_stub, "(const char*)(args[%d])", j);
32580+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_SIGNED_CHAR") == 0)
32581+ fprintf(server_stub, "(const signed char*)(args[%d])", j);
32582+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_VOID") == 0)
32583+ fprintf(server_stub, "(const void*)(args[%d])", j);
32584+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_CHAR") == 0)
32585+ fprintf(server_stub, "(const unsigned char*)(args[%d])", j);
32586+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_SHORT") == 0)
32587+ fprintf(server_stub, "(short*)(args[%d])", j);
32588+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_SHORT") == 0)
32589+ fprintf(server_stub, "(unsigned short*)(args[%d])", j);
32590+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_INT") == 0)
32591+ fprintf(server_stub, "(int*)(args[%d])", j);
32592+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_INT") == 0)
32593+ fprintf(server_stub, "(unsigned int*)(args[%d])", j);
32594+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_FLOAT") == 0)
32595+ fprintf(server_stub, "(float*)(args[%d])", j);
32596+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_DOUBLE") == 0)
32597+ fprintf(server_stub, "(double*)(args[%d])", j);
32598+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_VOID") == 0)
32599+ fprintf(server_stub, "(void*)(args[%d])", j);
32600+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_CHAR") == 0)
32601+ fprintf(server_stub, "(char*)(args[%d])", j);
32602+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_CHAR") == 0)
32603+ fprintf(server_stub, "(unsigned char*)(args[%d])", j);
32604+
32605+ else
32606+ {
32607+ fprintf(stderr, "Unknown : %s\n", symbolic_type);
32608+ assert(0);
32609+ }
32610+}
32611+
32612+static const char* func_dealt_by_hand[500] = { NULL };
32613+
32614+
32615+static const char* ignore_func[] =
32616+{
32617+ "glGetPointerv",
32618+ "glRectdv",
32619+ "glRectfv",
32620+ "glRectiv",
32621+ "glRectsv",
32622+ "glMultiDrawArrays",
32623+ "glMultiDrawArraysEXT",
32624+ "glMultiDrawElements",
32625+ "glMultiDrawElementsEXT",
32626+ "glUnmapBuffer",
32627+ "glUnmapBufferARB",
32628+ "glLoadTransposeMatrixf",
32629+ "glLoadTransposeMatrixd",
32630+ "glMultTransposeMatrixf",
32631+ "glMultTransposeMatrixd",
32632+ "glLoadTransposeMatrixfARB",
32633+ "glLoadTransposeMatrixdARB",
32634+ "glMultTransposeMatrixfARB",
32635+ "glMultTransposeMatrixdARB",
32636+
32637+ "glPixelDataRangeNV",
32638+ "glFlushPixelDataRangeNV",
32639+ "glVertexArrayRangeNV",
32640+ "glFlushVertexArrayRangeNV",
32641+ "glVertexWeightfEXT",
32642+
32643+ "glGetBufferPointerv",
32644+ "glGetBufferPointervARB",
32645+ "glGetVertexAttribPointerv",
32646+ "glGetVertexAttribPointervARB",
32647+ "glVertexAttribPointer",
32648+ "glVertexAttribPointerARB",
32649+ "glGetVariantPointervEXT",
32650+ NULL,
32651+};
32652+
32653+void get_func_dealt_by_hand()
32654+{
32655+ FILE* f = fopen("../target-i386/gl_func_perso.h", "r");
32656+ char buffer[256];
32657+ int i = 0;
32658+ char* c;
32659+ while(fgets(buffer, 256, f))
32660+ {
32661+ if (strstr(buffer, "MAGIC_MACRO("))
32662+ {
32663+ func_dealt_by_hand[i] = strdup(strstr(buffer, "MAGIC_MACRO(") + strlen("MAGIC_MACRO("));
32664+ * strstr(func_dealt_by_hand[i], ")") = 0;
32665+ c = strstr(func_dealt_by_hand[i], "_");
32666+ if (c && c != func_dealt_by_hand[i]) *c = 0;
32667+ i ++;
32668+ }
32669+ }
32670+ fclose(f);
32671+
32672+ int j = 0;
32673+ while(ignore_func[j])
32674+ {
32675+ func_dealt_by_hand[i] = ignore_func[j];
32676+ i++;
32677+ j++;
32678+ }
32679+}
32680+
32681+static const char* just_for_server_side_list[] =
32682+{
32683+ "glEnableClientState",
32684+ "glDisableClientState",
32685+ "glPushClientAttrib",
32686+ "glPopClientAttrib",
32687+ "glPixelStorei",
32688+ "glPixelStoref",
32689+ "glClientActiveTexture",
32690+ "glClientActiveTextureARB",
32691+ "glEnableVertexAttribArray",
32692+ "glEnableVertexAttribArrayARB",
32693+ "glDisableVertexAttribArray",
32694+ "glDisableVertexAttribArrayARB",
32695+ "glDrawElementArrayATI",
32696+ "glDrawRangeElementArrayATI",
32697+ "glGenSymbolsEXT",
32698+ "glFreeObjectBufferATI",
32699+ "glUnmapObjectBufferATI",
32700+ "glLockArraysEXT",
32701+ "glUnlockArraysEXT",
32702+ "glDepthFunc",
32703+ "glFogf",
32704+ "glFogi",
32705+ "glClipPlane",
32706+ "glGetClipPlane",
32707+
32708+/* begin of openquartz optimization */
32709+#if 1
32710+ "glMatrixMode",
32711+ "glOrtho",
32712+ "glFrustum",
32713+ "glPushMatrix",
32714+ "glPopMatrix",
32715+ "glLoadIdentity",
32716+ "glLoadMatrixd",
32717+ "glLoadMatrixf",
32718+ "glMultMatrixd",
32719+ "glMultMatrixf",
32720+ "glRotated",
32721+ "glRotatef",
32722+ "glScaled",
32723+ "glScalef",
32724+ "glTranslated",
32725+ "glTranslatef",
32726+#endif
32727+/* end of openquartz optimization */
32728+
32729+ "glGetError",
32730+ "glActiveTextureARB",
32731+
32732+ "glViewport",
32733+ "glScissor",
32734+
32735+ "glBindBufferARB",
32736+ "glDeleteBuffersARB",
32737+ "glGenBuffersARB",
32738+ "glBufferDataARB",
32739+ "glBufferSubDataARB",
32740+ "glGetBufferSubDataARB",
32741+ "glGetBufferParameterivARB",
32742+ "glBindBuffer",
32743+ "glDeleteBuffers",
32744+ "glGenBuffers",
32745+ "glBufferData",
32746+ "glBufferSubData",
32747+ "glGetBufferSubData",
32748+ "glGetBufferParameteriv",
32749+
32750+ "glPushAttrib",
32751+ "glPopAttrib",
32752+ "glEnable",
32753+ "glDisable",
32754+ "glIsEnabled",
32755+ "glBindTexture",
32756+ "glBindTextureEXT",
32757+ "glFogfv",
32758+ "glFogiv",
32759+ "glBitmap",
32760+ "glGetTexImage",
32761+ "glReadPixels",
32762+ "glDrawPixels",
32763+ "glSelectBuffer",
32764+ "glFeedbackBuffer",
32765+
32766+ "glTexImage1D",
32767+ "glTexImage2D",
32768+ "glTexImage3D",
32769+ "glTexSubImage1D",
32770+ "glTexSubImage2D",
32771+ "glTexSubImage3D",
32772+
32773+ "glTexImage3DEXT",
32774+ "glTexSubImage1DEXT",
32775+ "glTexSubImage2DEXT",
32776+ "glTexSubImage3DEXT",
32777+
32778+ "glGetCompressedTexImage",
32779+ "glCompressedTexImage1D",
32780+ "glCompressedTexImage2D",
32781+ "glCompressedTexImage3D",
32782+ "glCompressedTexSubImage1D",
32783+ "glCompressedTexSubImage2D",
32784+ "glCompressedTexSubImage3D",
32785+
32786+ "glGetCompressedTexImageARB",
32787+ "glCompressedTexImage1DARB",
32788+ "glCompressedTexImage2DARB",
32789+ "glCompressedTexImage3DARB",
32790+ "glCompressedTexSubImage1DARB",
32791+ "glCompressedTexSubImage2DARB",
32792+ "glCompressedTexSubImage3DARB",
32793+
32794+ "glCallLists",
32795+ "glNewList",
32796+ "glDeleteLists",
32797+ "glGenLists",
32798+
32799+ "glGenTextures",
32800+ "glDeleteTextures",
32801+ "glDeleteTexturesEXT",
32802+ "glMap1f",
32803+ "glMap1d",
32804+ "glMap2f",
32805+ "glMap2d",
32806+ "glGetMapdv",
32807+ "glGetMapfv",
32808+ "glGetMapiv",
32809+ "glGetBooleanv",
32810+ "glGetIntegerv",
32811+ "glGetFloatv",
32812+ "glGetDoublev",
32813+
32814+ "glGetPixelMapfv",
32815+ "glGetPixelMapuiv",
32816+ "glGetPixelMapusv",
32817+ "glGetProgramStringARB",
32818+ "glGetProgramStringNV",
32819+ "glArrayElement",
32820+ "glDrawArrays",
32821+ "glDrawElements",
32822+ "glDrawRangeElements",
32823+ "glDrawRangeElementsEXT",
32824+ "glGetProgramInfoLog",
32825+ "glGetTexLevelParameteriv",
32826+ "glGetInfoLogARB",
32827+ "glGetShaderInfoLog",
32828+ "glGetAttachedObjectsARB",
32829+ "glGetAttachedShaders",
32830+ "glGetActiveUniformARB",
32831+ "glGetActiveUniform",
32832+ "glGetUniformLocationARB",
32833+ "glGetUniformLocation",
32834+ "glGetUniformfvARB",
32835+ "glGetUniformfv",
32836+ "glGetUniformivARB",
32837+ "glGetUniformiv",
32838+ "glGetUniformuivEXT",
32839+ "glGetShaderSourceARB",
32840+ "glGetShaderSource",
32841+ "glGetActiveAttribARB",
32842+ "glGetActiveAttrib",
32843+ "glGetAttribLocationARB",
32844+ "glGetAttribLocation",
32845+
32846+ "glNewObjectBufferATI",
32847+ "glUpdateObjectBufferATI",
32848+
32849+ "glSetLocalConstantEXT",
32850+ "glSetInvariantEXT",
32851+ "glVariantbvEXT",
32852+ "glVariantsvEXT",
32853+ "glVariantivEXT",
32854+ "glVariantfvEXT",
32855+ "glVariantdvEXT",
32856+ "glVariantubvEXT",
32857+ "glVariantusvEXT",
32858+ "glVariantuivEXT",
32859+ "glGetVariantBooleanvEXT",
32860+ "glGetVariantIntegervEXT",
32861+ "glGetVariantFloatvEXT",
32862+ "glGetInvariantBooleanvEXT",
32863+ "glGetInvariantIntegervEXT",
32864+ "glGetInvariantFloatvEXT",
32865+ "glGetLocalConstantBooleanvEXT",
32866+ "glGetLocalConstantIntegervEXT",
32867+ "glGetLocalConstantFloatvEXT",
32868+
32869+ "glMatrixIndexubvARB",
32870+ "glMatrixIndexusvARB",
32871+ "glMatrixIndexuivARB",
32872+
32873+ "glColorTable",
32874+ "glColorSubTable",
32875+ "glGetColorTable",
32876+ "glConvolutionFilter1D",
32877+ "glConvolutionFilter2D",
32878+ "glGetConvolutionFilter",
32879+ "glSeparableFilter2D",
32880+ "glGetSeparableFilter",
32881+ "glGetHistogram",
32882+ "glGetMinmax",
32883+ "glColorTableEXT",
32884+ "glColorSubTableEXT",
32885+ "glGetColorTableEXT",
32886+ "glConvolutionFilter1DEXT",
32887+ "glConvolutionFilter2DEXT",
32888+ "glGetConvolutionFilterEXT",
32889+ "glSeparableFilter2DEXT",
32890+ "glGetSeparableFilterEXT",
32891+ "glGetHistogramEXT",
32892+ "glGetMinmaxEXT",
32893+
32894+ "glGetTexParameterfv",
32895+
32896+ "glGetVertexAttribivARB",
32897+ "glGetVertexAttribfvARB",
32898+ "glGetVertexAttribdvARB",
32899+ "glGetVertexAttribiv",
32900+ "glGetVertexAttribfv",
32901+ "glGetVertexAttribdv",
32902+
32903+ "glGetDetailTexFuncSGIS",
32904+ "glGetSharpenTexFuncSGIS",
32905+
32906+ "fake_gluBuild2DMipmaps",
32907+
32908+ "glRenderMode",
32909+
32910+ "glEnableVariantClientStateEXT",
32911+ "glDisableVariantClientStateEXT",
32912+
32913+ "glGetActiveVaryingNV",
32914+
32915+ NULL,
32916+};
32917+
32918+static int just_for_server_side_func(char* funcname)
32919+{
32920+ int i;
32921+ for(i=0;just_for_server_side_list[i];i++)
32922+ {
32923+ if (strcmp(just_for_server_side_list[i], funcname) == 0)
32924+ return 1;
32925+ }
32926+ return 0;
32927+}
32928+
32929+int parse(FILE* f, FuncDesc* funcDesc, int funcDescCount, int ignoreEXT)
32930+{
32931+ char buffer[256];
32932+ while(fgets(buffer, 256, f))
32933+ {
32934+
32935+ if (strncmp(buffer, "GLAPI", 5) == 0 && strstr(buffer, "APIENTRY") && strstr(buffer, "("))
32936+ {
32937+ int i = 0;
32938+ int skip = 0;
32939+ if (func_dealt_by_hand[0] == 0)
32940+ {
32941+ get_func_dealt_by_hand();
32942+ }
32943+ while (func_dealt_by_hand[i])
32944+ {
32945+ if (strstr(buffer, func_dealt_by_hand[i]))
32946+ {
32947+ skip = 1;
32948+ break;
32949+ }
32950+ i++;
32951+ }
32952+ if (skip)
32953+ continue;
32954+
32955+ char** args = malloc(15 * sizeof(char*));
32956+ int narg = 0;
32957+ char* type = buffer + 6;
32958+ char* n = strstr(type, "GLAPIENTRY") ? strstr(type, "GLAPIENTRY") : strstr(type, "APIENTRY");
32959+ int skip_length = strstr(type, "GLAPIENTRY") ? 11 : 9;
32960+ n[-1] = 0;
32961+ type = strdup(type);
32962+ n += skip_length;
32963+ char* fonc = n;
32964+ n = strstr(n, "(");
32965+ if (n[-1] == ' ') n[-1] = 0;
32966+ n[0] = 0;
32967+ fonc = strdup(fonc);
32968+ /*if (strstr(fonc, "glLockArraysEXT") || strstr(fonc, "glUnlockArraysEXT"))
32969+ {
32970+ }
32971+ else*/
32972+
32973+
32974+ if (ignoreEXT == 1 && isExtByName(fonc))
32975+ {
32976+ free(type);
32977+ free(fonc);
32978+ continue;
32979+ }
32980+ n++;
32981+ while(1)
32982+ {
32983+ char* virg = strstr(n, ",");
32984+ if (virg)
32985+ {
32986+ args[narg] = n;
32987+ virg[0] = 0;
32988+ args[narg] = get_arg_type(args[narg]);
32989+ narg++;
32990+ n = virg+1;
32991+ }
32992+ else
32993+ break;
32994+ }
32995+ while (strstr(n, ")") == 0)
32996+ {
32997+ fgets(buffer, 256, f);
32998+ n = buffer;
32999+ while(1)
33000+ {
33001+ char* virg = strstr(n, ",");
33002+ if (virg)
33003+ {
33004+ args[narg] = n;
33005+ virg[0] = 0;
33006+ args[narg] = get_arg_type(args[narg]);
33007+ narg++;
33008+ n = virg+1;
33009+ }
33010+ else
33011+ break;
33012+ }
33013+ }
33014+ char* par = strstr(n, ")");
33015+ args[narg] = n;
33016+ par[0] = 0;
33017+ args[narg] = get_arg_type(args[narg]);
33018+ narg++;
33019+
33020+
33021+ /*printf("%s %s (", type, fonc);
33022+ for(i=0;i<narg;i++)
33023+ {
33024+ printf("%s,", args[i]);
33025+ }
33026+ printf(")\n");*/
33027+
33028+ for(i=0;i<funcDescCount;i++)
33029+ {
33030+ if (strcmp(funcDesc[i].name, fonc) == 0)
33031+ {
33032+ if (ignoreEXT == 0)
33033+ funcDesc[i].isExt = 1;
33034+ break;
33035+ }
33036+ }
33037+ if (i == funcDescCount)
33038+ {
33039+ funcDesc[funcDescCount].type = type;
33040+ funcDesc[funcDescCount].name = fonc;
33041+ funcDesc[funcDescCount].nargs = narg;
33042+ funcDesc[funcDescCount].args = args;
33043+ funcDesc[funcDescCount].isExt = ignoreEXT == 0;
33044+ funcDescCount++;
33045+ }
33046+ else
33047+ {
33048+ free(fonc);
33049+ free(args);
33050+ free(type);
33051+ }
33052+ /*
33053+ for(i=0;i<narg;i++)
33054+ {
33055+ free(args[i]);
33056+ }
33057+ free(fonc);
33058+ free(type);*/
33059+ }
33060+ }
33061+ return funcDescCount;
33062+}
33063+
33064+typedef struct
33065+{
33066+ char* str;
33067+ int i;
33068+} StringIntStruct;
33069+
33070+StringIntStruct argDependingOnPreviousArgTab[] =
33071+{
33072+ { "glLoadProgramNV", 3},
33073+ { "ProgramNamedParameter", 2},
33074+ { "glDeleteBuffers", 1},
33075+ { "glDrawBuffers", 1},
33076+ { "glGenPrograms", 1},
33077+ { "glDeletePrograms", 1},
33078+ { "glGenQueries", 1},
33079+ { "glDeleteQueries", 1},
33080+ { "glGenFencesNV", 1},
33081+ { "glDeleteFencesNV", 1},
33082+ { "glGenOcclusionQueriesNV", 1},
33083+ { "glDeleteOcclusionQueriesNV", 1},
33084+ { "glRequestResidentProgramsNV", 1},
33085+ { "glDeleteTextures", 1},
33086+ { "glGenFramebuffersEXT", 1},
33087+ { "glDeleteFramebuffersEXT", 1},
33088+ { "glGenRenderbuffersEXT", 1},
33089+ { "glDeleteRenderbuffersEXT", 1},
33090+ { "glUniform1fv", 2},
33091+ { "glUniform2fv", 2},
33092+ { "glUniform3fv", 2},
33093+ { "glUniform4fv", 2},
33094+ { "glUniform1iv", 2},
33095+ { "glUniform2iv", 2},
33096+ { "glUniform3iv", 2},
33097+ { "glUniform4iv", 2},
33098+ { "glUniform1uivEXT", 2},
33099+ { "glUniform2uivEXT", 2},
33100+ { "glUniform3uivEXT", 2},
33101+ { "glUniform4uivEXT", 2},
33102+ { "glProgramParameters4fvNV", 3},
33103+ { "glProgramParameters4dvNV", 3},
33104+ { "glProgramLocalParameters4fvEXT", 3},
33105+ { "glProgramLocalParametersI4ivNV", 3},
33106+ { "glProgramLocalParametersI4uivNV", 3},
33107+ { "glProgramEnvParameters4fvEXT", 3},
33108+ { "glProgramEnvParametersI4ivNV", 3},
33109+ { "glProgramEnvParametersI4uivNV", 3},
33110+ { "glAreProgramsResidentNV", 1} ,
33111+ { "glAreProgramsResidentNV", 2} ,
33112+ { "glAreTexturesResident", 1} ,
33113+ { "glAreTexturesResident", 2} ,
33114+ { "glPrioritizeTextures", 1} ,
33115+ { "glPrioritizeTextures", 2} ,
33116+ { "glProgramStringARB", 3} ,
33117+
33118+ { "glVertexAttribs", 2},
33119+
33120+ { "glUniformMatrix", 3 },
33121+
33122+ { "glGetVertexAttribfv", 2},
33123+ { "glGetVertexAttribiv", 2},
33124+ { "glGetVertexAttribdv", 2},
33125+ { "glGetVertexAttribIivEXT", 2},
33126+ { "glGetVertexAttribIuivEXT", 2},
33127+
33128+ { "glPointParameterfv", 1},
33129+ { "glPointParameteriv", 1},
33130+
33131+ { "glWeightbvARB", 1},
33132+ { "glWeightsvARB", 1},
33133+ { "glWeightivARB", 1},
33134+ { "glWeightfvARB", 1},
33135+ { "glWeightdvARB", 1},
33136+ { "glWeightubvARB", 1},
33137+ { "glWeightusvARB", 1},
33138+ { "glWeightuivARB", 1},
33139+
33140+ { "glTexEnvfv", 2},
33141+ { "glTexEnviv", 2},
33142+ { "glGetTexEnvfv", 2},
33143+ { "glGetTexEnviv", 2},
33144+ { "glTexGendv", 2},
33145+ { "glTexGenfv", 2},
33146+ { "glTexGeniv", 2},
33147+ { "glGetTexGendv", 2},
33148+ { "glGetTexGenfv", 2},
33149+ { "glGetTexGeniv", 2},
33150+
33151+ { "glLightfv", 2},
33152+ { "glLightiv", 2},
33153+ { "glGetLightfv", 2},
33154+ { "glGetLightiv", 2},
33155+ { "glFragmentLightfvSGIX", 2},
33156+ { "glFragmentLightivSGIX", 2},
33157+ { "glGetFragmentLightfvSGIX", 2},
33158+ { "glGetFragmentLightivSGIX", 2},
33159+
33160+
33161+ { "glLightModelfv", 1},
33162+ { "glLightModeliv", 1},
33163+ { "glFragmentLightModelfvSGIX", 1},
33164+ { "glFragmentLightModelivSGIX", 1},
33165+
33166+ { "glMaterialfv", 2},
33167+ { "glMaterialiv", 2},
33168+ { "glGetMaterialfv", 2},
33169+ { "glGetMaterialiv", 2},
33170+ { "glFragmentMaterialfvSGIX", 2},
33171+ { "glFragmentMaterialivSGIX", 2},
33172+ { "glGetFragmentMaterialfvSGIX", 2},
33173+ { "glGetFragmentMaterialivSGIX", 2},
33174+
33175+ { "glFogiv", 1},
33176+ { "glFogfv", 1},
33177+
33178+ { "glTexParameterfv", 2},
33179+ { "glTexParameteriv", 2},
33180+ { "glGetTexParameterfv", 2},
33181+ { "glGetTexParameteriv", 2},
33182+
33183+ { "glTexParameterIivEXT", 2},
33184+ { "glTexParameterIuivEXT", 2},
33185+ { "glGetTexParameterIivEXT", 2},
33186+ { "glGetTexParameterIuivEXT", 2},
33187+
33188+ { "glPixelMapfv", 2},
33189+ { "glPixelMapuiv", 2},
33190+ { "glPixelMapusv", 2},
33191+
33192+ { "glDetailTexFuncSGIS", 2 },
33193+ { "glSharpenTexFuncSGIS", 2 },
33194+
33195+ { "glSpriteParameterfvSGIX", 1 },
33196+ { "glSpriteParameterivSGIX", 1 },
33197+
33198+ { "ConvolutionParameter", 2},
33199+
33200+ { "glProgramBufferParametersfvNV", 4},
33201+ { "glProgramBufferParametersIivNV", 4},
33202+ { "glProgramBufferParametersIuivNV", 4},
33203+
33204+ { "glTransformFeedbackAttribsNV", 1},
33205+ { "glTransformFeedbackVaryingsNV", 2},
33206+};
33207+
33208+int is_arg_of_length_depending_on_previous_args(FuncDesc* funcDesc, int j)
33209+{
33210+ int i;
33211+ if (strstr(funcDesc->args[j], "*") == NULL)
33212+ return 0;
33213+ for(i=0;i< N_ELEMENTS(argDependingOnPreviousArgTab); i++)
33214+ {
33215+ if (strstr(funcDesc->name, argDependingOnPreviousArgTab[i].str) && j == argDependingOnPreviousArgTab[i].i)
33216+ return 1;
33217+ }
33218+ return 0;
33219+}
33220+
33221+static void fprintf_prototype_args(FILE* f, FuncDesc* funcDesc)
33222+{
33223+ int j;
33224+ for(j=0;j<funcDesc->nargs;j++)
33225+ {
33226+ if (j != 0) fprintf(f,", ");
33227+ if (strstr(funcDesc->args[j], "[16]"))
33228+ {
33229+ if (strstr(funcDesc->args[j], "float"))
33230+ {
33231+ fprintf(f, "const GLfloat arg_%d[16]", j);
33232+ }
33233+ else if (strstr(funcDesc->args[j], "double"))
33234+ {
33235+ fprintf(f, "const GLdouble arg_%d[16]", j);
33236+ }
33237+ else
33238+ {
33239+ exit(-1);
33240+ }
33241+ }
33242+ else if (strstr(funcDesc->args[j], "[128]") && strstr(funcDesc->args[j], "GLubyte"))
33243+ fprintf(f, (strstr(funcDesc->args[j], "const")) ? "const GLubyte* arg_%d" : "GLubyte* arg_%d", j);
33244+ else
33245+ fprintf(f, "%s arg_%d", funcDesc->args[j], j);
33246+ }
33247+}
33248+
33249+int main(int argc, char* argv[])
33250+{
33251+ FuncDesc funcDesc[3000];
33252+ int funcDescCount = 0;
33253+ FILE* f;
33254+
33255+ f = fopen("../target-i386/mesa_gl.h", "r");
33256+ assert(f);
33257+ /*if (!f)
33258+ f = fopen("/usr/include/GL/gl.h", "r");*/
33259+ funcDescCount = parse(f, funcDesc, 0, 1);
33260+ fclose(f);
33261+
33262+ f = fopen("../target-i386/mesa_glext.h", "r");
33263+ assert(f);
33264+ /*if (!f)
33265+ f = fopen("/usr/include/GL/glext.h", "r");*/
33266+ funcDescCount = parse(f, funcDesc, funcDescCount, 0);
33267+ fclose(f);
33268+
33269+ FILE* header = fopen("gl_func.h", "w");
33270+ FILE* client_stub = fopen("client_stub.c", "w");
33271+ FILE* server_stub = fopen("server_stub.c", "w");
33272+
33273+ fprintf(header, "/* This is a generated file. DO NOT EDIT ! */\n\n");
33274+ fprintf(header, "#define COMPOSE(x,y) x##y\n");
33275+ fprintf(header, "#define MAGIC_MACRO(x) COMPOSE(x,_func)\n");
33276+ fprintf(header, "enum {\n"
33277+ "#include \"gl_func_perso.h\"\n");
33278+
33279+ fprintf(client_stub, "/* This is a generated file. DO NOT EDIT ! */\n\n");
33280+
33281+ fprintf(server_stub, "/* This is a generated file. DO NOT EDIT ! */\n\n");
33282+
33283+ int i;
33284+ for(i=0;i<funcDescCount;i++)
33285+ {
33286+ funcDesc[i].ok = 0;
33287+ char* name = funcDesc[i].name;
33288+ char* type = funcDesc[i].type;
33289+ if ((strcmp(type, "void") == 0 || strcmp(type, "GLboolean") == 0 ||
33290+ strcmp(type, "GLuint") == 0 || strcmp(type, "GLint") == 0 ||
33291+ strcmp(type, "GLenum") == 0) || strcmp(type, "GLhandleARB") == 0 ||
33292+ strcmp(type, "GLhalf") == 0 || strcmp(type, "GLhalfNV") == 0)
33293+ {
33294+ int pointer_of_unknown_size = 0;
33295+ int j;
33296+
33297+ if (funcDesc[i].nargs == 1 && strcmp(funcDesc[i].args[0], "void") == 0)
33298+ {
33299+ funcDesc[i].nargs = 0;
33300+ }
33301+ for(j=0;j<funcDesc[i].nargs-1;j++)
33302+ {
33303+ if (!is_arg_of_length_depending_on_previous_args(&funcDesc[i], j) &&
33304+ strstr(funcDesc[i].args[j], "const GLchar") == NULL &&
33305+ strstr(funcDesc[i].args[j], "[16]") == NULL)
33306+ {
33307+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "*") != NULL;
33308+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "[") != NULL;
33309+ }
33310+ }
33311+
33312+ if (pointer_of_unknown_size == 0)
33313+ {
33314+ char* signature_type_name;
33315+ if (is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL))
33316+ {
33317+ if (strstr(signature_type_name, "TYPE_OUT"))
33318+ funcDesc[i].has_out_parameters = 1;
33319+ }
33320+ else
33321+ {
33322+ if (funcDesc[i].nargs-1 >= 0)
33323+ {
33324+ j = funcDesc[i].nargs-1;
33325+ if (!is_arg_of_length_depending_on_previous_args(&funcDesc[i], j) &&
33326+ strstr(funcDesc[i].args[j], "const GLchar") == NULL &&
33327+ strstr(funcDesc[i].args[j], "[16]") == NULL)
33328+ {
33329+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "*") != NULL;
33330+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "[") != NULL;
33331+ }
33332+ }
33333+ }
33334+ }
33335+ if (pointer_of_unknown_size && funcDesc[i].nargs == 1)
33336+ {
33337+ if (strstr(funcDesc[i].name, "Matrixf") || strstr(funcDesc[i].name, "Matrixd"))
33338+ {
33339+ free(funcDesc[i].args[0]);
33340+ if (strstr(funcDesc[i].name, "Matrixf"))
33341+ funcDesc[i].args[0] = strdup("GLfloat m[16]");
33342+ else
33343+ funcDesc[i].args[0] = strdup("GLdouble m[16]");
33344+ pointer_of_unknown_size = 0;
33345+ }
33346+ else if (strcmp(funcDesc[i].name, "glPolygonStipple") == 0)
33347+ {
33348+ free(funcDesc[i].args[0]);
33349+ funcDesc[i].args[0] = strdup("const GLubyte mask[128]");
33350+ pointer_of_unknown_size = 0;
33351+ }
33352+ else if (strcmp(funcDesc[i].name, "glGetPolygonStipple") == 0)
33353+ {
33354+ free(funcDesc[i].args[0]);
33355+ funcDesc[i].args[0] = strdup("GLubyte mask[128]");
33356+ funcDesc[i].has_out_parameters = 1;
33357+ pointer_of_unknown_size = 0;
33358+ }
33359+ }
33360+ if (just_for_server_side_func(name) || pointer_of_unknown_size == 0)
33361+ {
33362+ fprintf(header, " %s_func,\n", funcDesc[i].name);
33363+ funcDesc[i].ok = 1;
33364+ if (just_for_server_side_func(name))
33365+ funcDesc[i].just_for_server_side = 1;
33366+ for(j=0;j<funcDesc[i].nargs;j++)
33367+ {
33368+ if (strstr(get_type_string(funcDesc[i].args[j]), "OUT"))
33369+ funcDesc[i].has_out_parameters = 1;
33370+ }
33371+ }
33372+ else
33373+ {
33374+ fprintf(stderr, "not handled either manually or automatically : %s\n", funcDesc[i].name);
33375+ }
33376+ }
33377+ }
33378+
33379+ fprintf(header, " GL_N_CALLS\n};\n");
33380+
33381+
33382+ fprintf(server_stub, "void execute_func(int func_number, arg_t *args, int *pret_int, char *pret_char)\n");
33383+ fprintf(server_stub, "{\n");
33384+ fprintf(server_stub, " switch(func_number)\n");
33385+ fprintf(server_stub, " {\n");
33386+
33387+
33388+ for(i=0;i<funcDescCount;i++)
33389+ {
33390+ if (funcDesc[i].ok)
33391+ {
33392+ fprintf(header, "static const int %s_signature[] = { %s, %d, ",
33393+ funcDesc[i].name,
33394+ get_type_string(funcDesc[i].type),
33395+ funcDesc[i].has_out_parameters);
33396+ fprintf(header, "%d", funcDesc[i].nargs);
33397+ int j;
33398+ char* signature_type_name;
33399+ int n_args_to_check = is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL) ? funcDesc[i].nargs - 1 : funcDesc[i].nargs;
33400+
33401+ for(j=0;j<n_args_to_check;j++)
33402+ {
33403+ if (is_arg_of_length_depending_on_previous_args(&funcDesc[i], j))
33404+ {
33405+ fprintf(header, ", %s_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS", get_type_string(funcDesc[i].args[j]));
33406+ }
33407+ else
33408+ fprintf(header, ", %s", get_type_string(funcDesc[i].args[j]));
33409+ }
33410+
33411+ if (is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL))
33412+ {
33413+ fprintf(header, ", %s", signature_type_name);
33414+ }
33415+ fprintf(header, "};\n");
33416+
33417+
33418+ if (funcDesc[i].just_for_server_side == 0)
33419+ {
33420+ if (isExt(&funcDesc[i]))
33421+ fprintf(client_stub, "GLAPI %s APIENTRY EXT_FUNC(%s) (", funcDesc[i].type, funcDesc[i].name);
33422+ else
33423+ fprintf(client_stub, "GLAPI %s APIENTRY %s(", funcDesc[i].type, funcDesc[i].name);
33424+ fprintf_prototype_args(client_stub, &funcDesc[i]);
33425+ fprintf(client_stub, ")\n");
33426+ fprintf(client_stub, "{\n");
33427+ if (strcmp(funcDesc[i].type, "void") != 0)
33428+ {
33429+ fprintf(client_stub, " %s ret;\n", funcDesc[i].type);
33430+ if (isExt(&funcDesc[i]))
33431+ fprintf(client_stub, " CHECK_PROC_WITH_RET(%s);\n", funcDesc[i].name);
33432+ }
33433+ else
33434+ {
33435+ if (isExt(&funcDesc[i]))
33436+ fprintf(client_stub, " CHECK_PROC(%s);\n", funcDesc[i].name);
33437+ }
33438+
33439+ /*
33440+ fprintf(client_stub, " do_opengl_call(%s_func, %s",
33441+ funcDesc[i].name, (strcmp(funcDesc[i].type, "void") == 0) ? "NULL" : "&ret");
33442+ for(j=0;j<funcDesc[i].nargs;j++)
33443+ {
33444+ fprintf(client_stub, ", arg_%d", j);
33445+ }
33446+ fprintf(client_stub, ");\n");
33447+ */
33448+
33449+ if (funcDesc[i].nargs)
33450+ {
33451+ fprintf(client_stub, " long args[] = { ");
33452+ for(j=0;j<funcDesc[i].nargs;j++)
33453+ {
33454+ if (j > 0) fprintf(client_stub, ", ");
33455+ if (strstr(funcDesc[i].args[j], "*"))
33456+ {
33457+ fprintf(client_stub, "POINTER_TO_ARG(arg_%d)", j);
33458+ }
33459+ else
33460+ {
33461+ const char* symbolic_type = get_type_string(funcDesc[i].args[j]);
33462+ if (strcmp(symbolic_type, "TYPE_CHAR") == 0)
33463+ fprintf(client_stub, "CHAR_TO_ARG");
33464+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_CHAR") == 0)
33465+ fprintf(client_stub, "UNSIGNED_CHAR_TO_ARG");
33466+ else if (strcmp(symbolic_type, "TYPE_SHORT") == 0)
33467+ fprintf(client_stub, "SHORT_TO_ARG");
33468+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_SHORT") == 0)
33469+ fprintf(client_stub, "UNSIGNED_SHORT_TO_ARG");
33470+ else if (strcmp(symbolic_type, "TYPE_INT") == 0)
33471+ fprintf(client_stub, "INT_TO_ARG");
33472+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_INT") == 0)
33473+ fprintf(client_stub, "UNSIGNED_INT_TO_ARG");
33474+ else if (strcmp(symbolic_type, "TYPE_FLOAT") == 0)
33475+ fprintf(client_stub, "FLOAT_TO_ARG");
33476+ else if (strcmp(symbolic_type, "TYPE_16FLOAT") == 0)
33477+ fprintf(client_stub, "POINTER_TO_ARG");
33478+ else if (strcmp(symbolic_type, "TYPE_DOUBLE") == 0)
33479+ fprintf(client_stub, "DOUBLE_TO_ARG");
33480+ else if ( strcmp(symbolic_type, "TYPE_16DOUBLE") == 0)
33481+ fprintf(client_stub, "POINTER_TO_ARG");
33482+ else if ( strcmp(symbolic_type, "TYPE_128UCHAR") == 0 || strcmp(symbolic_type, "TYPE_OUT_128UCHAR") == 0)
33483+ fprintf(client_stub, "POINTER_TO_ARG");
33484+ else
33485+ {
33486+ fprintf(stderr, "Unknown : %s\n", symbolic_type);
33487+ assert(0);
33488+ }
33489+ fprintf(client_stub, "(arg_%d)", j);
33490+ }
33491+ }
33492+ fprintf(client_stub, "};\n");
33493+ }
33494+
33495+ fprintf(client_stub, " do_opengl_call(%s_func, %s, %s, NULL);\n",
33496+ funcDesc[i].name, (strcmp(funcDesc[i].type, "void") == 0) ? "NULL" : "&ret",
33497+ (funcDesc[i].nargs) ? "args" : "NULL");
33498+
33499+ if (strcmp(funcDesc[i].type, "void") != 0)
33500+ {
33501+ fprintf(client_stub, " return ret;\n");
33502+ }
33503+ fprintf(client_stub, "}\n\n");
33504+ }
33505+
33506+ fprintf(server_stub, " case %s_func:\n", funcDesc[i].name);
33507+ fprintf(server_stub, " {\n");
33508+
33509+ if (isExt(&funcDesc[i]))
33510+ {
33511+ fprintf(server_stub, " GET_EXT_PTR(%s, %s, (", funcDesc[i].type, funcDesc[i].name);
33512+ fprintf_prototype_args(server_stub, &funcDesc[i]);
33513+ fprintf(server_stub, "));\n");
33514+ }
33515+
33516+ fprintf(server_stub, " ");
33517+
33518+ if (strcmp(funcDesc[i].type, "void") == 0)
33519+ ;
33520+ else if (strcmp(get_type_string(funcDesc[i].type), "TYPE_INT") == 0 ||
33521+ strcmp(get_type_string(funcDesc[i].type), "TYPE_UNSIGNED_INT") == 0)
33522+ fprintf(server_stub, "*pret_int = ");
33523+ else if (strcmp(get_type_string(funcDesc[i].type), "TYPE_CHAR") == 0 ||
33524+ strcmp(get_type_string(funcDesc[i].type), "TYPE_UNSIGNED_CHAR") == 0)
33525+ fprintf(server_stub, "*pret_char = ");
33526+ else
33527+ {
33528+ fprintf(stderr, "unknown ret type = %s\n", get_type_string(funcDesc[i].type));
33529+ exit(-1);
33530+ }
33531+ /*if (strstr(funcDesc[i].name, "EXT"))
33532+ {
33533+ char* dup = strdup(funcDesc[i].name);
33534+ *strstr(dup, "EXT") = 0;
33535+ fprintf(server_stub, "%s(", dup);
33536+ free(dup);
33537+ }
33538+ else*/
33539+ {
33540+ if (isExt(&funcDesc[i]))
33541+ fprintf(server_stub, "ptr_func_%s(", funcDesc[i].name);
33542+ else
33543+ fprintf(server_stub, "%s(", funcDesc[i].name);
33544+ }
33545+ char* c_type_name;
33546+ if (is_known_arg_vector(&funcDesc[i], NULL, &c_type_name))
33547+ {
33548+ for(j=0;j<funcDesc[i].nargs - 1;j++)
33549+ {
33550+ if (j != 0) fprintf(server_stub,", ");
33551+ print_server_side_argument(server_stub, j, funcDesc[i].args[j]);
33552+ }
33553+ if (j != 0) fprintf(server_stub,", ");
33554+ if (strstr(funcDesc[i].args[funcDesc[i].nargs - 1], "const"))
33555+ fprintf(server_stub, "(const %s*)args[%d]", c_type_name, j);
33556+ else
33557+ fprintf(server_stub, "(%s*)args[%d]", c_type_name, j);
33558+ }
33559+ else
33560+ {
33561+ for(j=0;j<funcDesc[i].nargs;j++)
33562+ {
33563+ if (j != 0) fprintf(server_stub,", ");
33564+ print_server_side_argument(server_stub, j, funcDesc[i].args[j]);
33565+ }
33566+ }
33567+ fprintf(server_stub, ");\n");
33568+
33569+ fprintf(server_stub, " break;\n");
33570+ fprintf(server_stub, " }\n");
33571+ }
33572+ }
33573+
33574+ fprintf(server_stub, " default:\n");
33575+ fprintf(server_stub, " fprintf(stderr, \"unknown=%%d\", func_number);\n");
33576+ fprintf(server_stub, " break;\n");
33577+ fprintf(server_stub, " }\n");
33578+ fprintf(server_stub, "}\n");
33579+
33580+ fprintf(header, "#undef MAGIC_MACRO\n");
33581+ fprintf(header, "#define MAGIC_MACRO(x) COMPOSE(x,_signature)\n");
33582+ fprintf(header, "static const int* tab_opengl_calls[GL_N_CALLS] =\n");
33583+ fprintf(header, "{\n");
33584+ fprintf(header, "#include \"gl_func_perso.h\"\n");
33585+ for(i=0;i<funcDescCount;i++)
33586+ {
33587+ if (funcDesc[i].ok)
33588+ {
33589+ fprintf(header, " %s_signature,\n", funcDesc[i].name);
33590+ }
33591+ }
33592+ fprintf(header, "};\n\n");
33593+
33594+ fprintf(header, "#undef MAGIC_MACRO\n");
33595+ fprintf(header, "#define MAGIC_MACRO(x) #x\n");
33596+ fprintf(header, "static const char* tab_opengl_calls_name[GL_N_CALLS] =\n");
33597+ fprintf(header, "{\n");
33598+ fprintf(header, "#include \"gl_func_perso.h\"\n");
33599+ for(i=0;i<funcDescCount;i++)
33600+ {
33601+ if (funcDesc[i].ok)
33602+ {
33603+ fprintf(header, " \"%s\",\n", funcDesc[i].name);
33604+ }
33605+ }
33606+ fprintf(header, "};\n\n");
33607+
33608+ fclose(header);
33609+ fclose(server_stub);
33610+ fclose(client_stub);
33611+
33612+ return 0;
33613+}
33614Index: trunk/target-i386/parse_mesa_get_c.c
33615===================================================================
33616--- /dev/null 1970-01-01 00:00:00.000000000 +0000
33617+++ trunk/target-i386/parse_mesa_get_c.c 2009-01-19 23:06:08.000000000 +0000
33618@@ -0,0 +1,225 @@
33619+/*
33620+ * Parse the "get.c" from mesa source tree to generate "glgetv_cst.h"
33621+ *
33622+ * Copyright (c) 2007 Even Rouault
33623+ *
33624+ * Permission is hereby granted, free of charge, to any person obtaining a copy
33625+ * of this software and associated documentation files (the "Software"), to deal
33626+ * in the Software without restriction, including without limitation the rights
33627+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
33628+ * copies of the Software, and to permit persons to whom the Software is
33629+ * furnished to do so, subject to the following conditions:
33630+ *
33631+ * The above copyright notice and this permission notice shall be included in
33632+ * all copies or substantial portions of the Software.
33633+ *
33634+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
33635+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
33636+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
33637+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33638+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
33639+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
33640+ * THE SOFTWARE.
33641+ */
33642+
33643+// gcc -Wall parse_mesa_get_c.c -o parse_mesa_get_c -I. && ./parse_mesa_get_c
33644+
33645+#include <stdlib.h>
33646+#include <stdio.h>
33647+#include <string.h>
33648+#include <assert.h>
33649+
33650+#include "mesa_gl.h"
33651+#include "mesa_glext.h"
33652+
33653+/* #include "mesa_enums.c" */
33654+
33655+int gl_lookup_enum_by_name(const char* name)
33656+{
33657+ FILE* f;
33658+ char buffer[256];
33659+ char template1[256];
33660+ char template2[256];
33661+ int i;
33662+ sprintf(template1, "#define %s\t", name);
33663+ sprintf(template2, "#define %s ", name);
33664+ for(i=0;i<2;i++)
33665+ {
33666+ if (i == 0)
33667+ f = fopen("mesa_gl.h", "r");
33668+ else
33669+ f = fopen("mesa_glext.h", "r");
33670+ while(fgets(buffer, 256, f))
33671+ {
33672+ if (strstr(buffer, template1) || strstr(buffer, template2))
33673+ {
33674+ char* c = strstr(buffer, "0x");
33675+ assert(c);
33676+ int ret;
33677+ ret = strtol(c, NULL, 16);
33678+ return ret;
33679+ }
33680+ }
33681+ fclose(f);
33682+ }
33683+
33684+ return -1;
33685+}
33686+
33687+typedef struct
33688+{
33689+ int value;
33690+ char* name;
33691+ int nb_elts;
33692+} Token;
33693+
33694+int compare_func(Token* a, Token* b)
33695+{
33696+ return a->value - b->value;
33697+}
33698+
33699+typedef struct
33700+{
33701+ int i;
33702+ char* str;
33703+} Cpl;
33704+#define CPL(x) {x, #x}
33705+
33706+Cpl constantsOneVal[] =
33707+{
33708+ CPL(GL_MAX_GENERAL_COMBINERS_NV),
33709+ CPL(GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT),
33710+ CPL(GL_MAX_VERTEX_SHADER_VARIANTS_EXT),
33711+ CPL(GL_MAX_VERTEX_SHADER_INVARIANTS_EXT),
33712+ CPL(GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
33713+ CPL(GL_MAX_VERTEX_SHADER_LOCALS_EXT),
33714+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT),
33715+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT),
33716+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT),
33717+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
33718+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
33719+};
33720+#define NB_CONSTANTS_ONE_VAL 11
33721+
33722+int main(int argc, char* argv[])
33723+{
33724+ FILE* f = fopen("mesa_get.c", "r");
33725+ char buffer[256];
33726+ int state = 0;
33727+ char name[256];
33728+ int count = 0;
33729+ char template[256];
33730+ Token tokens[1000];
33731+ int ntoken = 0;
33732+ int i;
33733+ FILE* outf = fopen("glgetv_cst.h", "w");
33734+
33735+ fprintf(outf, "/* This is a generated file. Do not edit !*/\n");
33736+ fprintf(outf, "typedef struct {\n");
33737+ fprintf(outf, " GLuint count;\n");
33738+ fprintf(outf, " GLenum token;\n");
33739+ fprintf(outf, " const char *name;\n");
33740+ fprintf(outf, "} GlGetConstant ;\n");
33741+ fprintf(outf, "static const GlGetConstant gl_get_constants[] = {\n");
33742+
33743+ while(fgets(buffer, 256, f))
33744+ {
33745+ if (strstr(buffer, "_mesa_GetBooleanv"))
33746+ {
33747+ state = 1;
33748+ }
33749+ else if (state == 1)
33750+ {
33751+ if (strstr(buffer, "_mesa_GetFloatv"))
33752+ {
33753+ break;
33754+ }
33755+ else if (strstr(buffer, "case GL_"))
33756+ {
33757+ strcpy(name, strstr(buffer, "case GL_") + 5);
33758+ *strstr(name, ":") = 0;
33759+ count = 0;
33760+ strcpy(template, "params[0]");
33761+ }
33762+ else if (strstr(buffer, template))
33763+ {
33764+ count ++;
33765+ sprintf(template, "params[%d]", count);
33766+ }
33767+ else if (strstr(buffer, "break"))
33768+ {
33769+ if (count > 0)
33770+ {
33771+ int gl_lookup = gl_lookup_enum_by_name(name);
33772+ /*
33773+ int mesa_lookup = _mesa_lookup_enum_by_name(name);
33774+ if (mesa_lookup != -1)
33775+ {
33776+ if(mesa_lookup != gl_lookup)
33777+ {
33778+ fprintf(stderr, "wrong : %s %d %d !\n", name, mesa_lookup, gl_lookup);
33779+ exit(-1);
33780+ }
33781+ }*/
33782+ if (gl_lookup == -1)
33783+ {
33784+ fprintf(stderr, "not found in includes : %s\n", name);
33785+ //fprintf(outf, "/* { %d, unknown value, \"%s\" },*/\n", count, name);
33786+ }
33787+ else
33788+ {
33789+ //fprintf(outf, " { %d, 0x%04x, \"%s\" },\n", count, gl_lookup, name);
33790+ tokens[ntoken].value = gl_lookup;
33791+ tokens[ntoken].nb_elts = count;
33792+ tokens[ntoken].name = strdup(name);
33793+ ntoken++;
33794+ }
33795+ /*fprintf(outf, "#ifdef %s\n", name);
33796+ fprintf(outf, " { %d, MAKE_TOKEN_NAME(%s) },\n", count, name);
33797+ fprintf(outf, "#endif\n");*/
33798+ }
33799+ else
33800+ fprintf(stderr, "not recognized : %s\n", name);
33801+ }
33802+ }
33803+ }
33804+
33805+ for(i=0;i<NB_CONSTANTS_ONE_VAL;i++)
33806+ {
33807+ tokens[ntoken].value = constantsOneVal[i].i;
33808+ tokens[ntoken].nb_elts = 1;
33809+ tokens[ntoken].name = strdup(constantsOneVal[i].str);
33810+ ntoken++;
33811+ }
33812+
33813+ tokens[ntoken].value = GL_SPRITE_MODE_SGIX;
33814+ tokens[ntoken].nb_elts = 1;
33815+ tokens[ntoken].name = strdup("GL_SPRITE_MODE_SGIX");
33816+ ntoken++;
33817+
33818+ tokens[ntoken].value = GL_SPRITE_AXIS_SGIX ;
33819+ tokens[ntoken].nb_elts = 3;
33820+ tokens[ntoken].name = strdup("GL_SPRITE_AXIS_SGIX ");
33821+ ntoken++;
33822+
33823+ tokens[ntoken].value = GL_SPRITE_TRANSLATION_SGIX;
33824+ tokens[ntoken].nb_elts = 3;
33825+ tokens[ntoken].name = strdup("GL_SPRITE_TRANSLATION_SGIX");
33826+ ntoken++;
33827+
33828+ tokens[ntoken].value = GL_REFERENCE_PLANE_EQUATION_SGIX;
33829+ tokens[ntoken].nb_elts = 4;
33830+ tokens[ntoken].name = strdup("GL_REFERENCE_PLANE_EQUATION_SGIX");
33831+ ntoken++;
33832+
33833+
33834+ qsort(tokens, ntoken, sizeof(Token), compare_func);
33835+ for(i=0;i<ntoken;i++)
33836+ {
33837+ fprintf(outf, " { %d, 0x%04x, \"%s\" },\n", tokens[i].nb_elts, tokens[i].value, tokens[i].name);
33838+ }
33839+ fprintf(outf, "};\n");
33840+ fclose(f);
33841+ fclose(outf);
33842+ return 0;
33843+}
33844Index: trunk/target-i386/translate.c
33845===================================================================
33846--- trunk.orig/target-i386/translate.c 2009-01-05 11:10:06.000000000 +0000
33847+++ trunk/target-i386/translate.c 2009-01-19 23:06:08.000000000 +0000
33848@@ -2592,11 +2592,18 @@
33849 s->is_jmp = 3;
33850 }
33851
33852+int enable_gl = 0;
33853+
33854 /* an interrupt is different from an exception because of the
33855 privilege checks */
33856 static void gen_interrupt(DisasContext *s, int intno,
33857 target_ulong cur_eip, target_ulong next_eip)
33858 {
33859+ if (enable_gl && intno == 0x99) {
33860+ gen_helper_opengl();
33861+ return;
33862+ }
33863+
33864 if (s->cc_op != CC_OP_DYNAMIC)
33865 gen_op_set_cc_op(s->cc_op);
33866 gen_jmp_im(cur_eip);
33867Index: trunk/vl.c
33868===================================================================
33869--- trunk.orig/vl.c 2009-01-05 11:10:23.000000000 +0000
33870+++ trunk/vl.c 2009-01-19 23:06:08.000000000 +0000
33871@@ -240,6 +240,7 @@
33872 const char *file;
33873 char opt[1024];
33874 } drives_opt[MAX_DRIVES];
33875+extern int enable_gl;
33876
33877 static CPUState *cur_cpu;
33878 static CPUState *next_cpu;
33879@@ -4074,6 +4075,7 @@
33880 QEMU_OPTION_old_param,
33881 QEMU_OPTION_clock,
33882 QEMU_OPTION_startdate,
33883+ QEMU_OPTION_enable_gl,
33884 QEMU_OPTION_tb_size,
33885 QEMU_OPTION_icount,
33886 QEMU_OPTION_uuid,
33887@@ -4193,6 +4195,7 @@
33888 #endif
33889 { "clock", HAS_ARG, QEMU_OPTION_clock },
33890 { "startdate", HAS_ARG, QEMU_OPTION_startdate },
33891+ { "enable-gl", 0, QEMU_OPTION_enable_gl },
33892 { "tb-size", HAS_ARG, QEMU_OPTION_tb_size },
33893 { "icount", HAS_ARG, QEMU_OPTION_icount },
33894 { "incoming", HAS_ARG, QEMU_OPTION_incoming },
33895@@ -5105,6 +5108,11 @@
33896 }
33897 }
33898 break;
33899+#ifdef TARGET_OPENGL_OK
33900+ case QEMU_OPTION_enable_gl:
33901+ enable_gl = 1;
33902+ break;
33903+#endif
33904 case QEMU_OPTION_tb_size:
33905 tb_size = strtol(optarg, NULL, 0);
33906 if (tb_size < 0)
diff --git a/meta/packages/qemu/qemu_svn.bb b/meta/packages/qemu/qemu_svn.bb
index e6b23cbe1f..b5113bde15 100644
--- a/meta/packages/qemu/qemu_svn.bb
+++ b/meta/packages/qemu/qemu_svn.bb
@@ -1,7 +1,7 @@
1LICENSE = "GPL" 1LICENSE = "GPL"
2DEPENDS = "zlib" 2DEPENDS = "zlib"
3PV = "0.9.1+svnr${SRCREV}" 3PV = "0.9.1+svnr${SRCREV}"
4PR = "r14" 4PR = "r15"
5 5
6FILESPATH = "${FILE_DIRNAME}/qemu-${PV}/:${FILE_DIRNAME}/qemu-0.9.1+svn/" 6FILESPATH = "${FILE_DIRNAME}/qemu-${PV}/:${FILE_DIRNAME}/qemu-0.9.1+svn/"
7 7
@@ -18,17 +18,19 @@ SRC_URI = "\
18 file://91-oh-sdl-cursor.patch;patch=1;pnum=0 \ 18 file://91-oh-sdl-cursor.patch;patch=1;pnum=0 \
19 file://qemu-amd64-32b-mapping-0.9.0.patch;patch=1 \ 19 file://qemu-amd64-32b-mapping-0.9.0.patch;patch=1 \
20 file://workaround_bad_futex_headers.patch;patch=1 \ 20 file://workaround_bad_futex_headers.patch;patch=1 \
21 file://qemu-add-gl-host-code.patch;patch=1 \
21 file://no-strip.patch;patch=1 \ 22 file://no-strip.patch;patch=1 \
22 file://fix-dirent.patch;patch=1" 23 file://fix-dirent.patch;patch=1"
23 24
24S = "${WORKDIR}/trunk" 25S = "${WORKDIR}/trunk"
25 26
26#EXTRA_OECONF += "--disable-sdl" 27#EXTRA_OECONF += "--disable-sdl"
27#EXTRA_OECONF += "--target-list=arm-linux-user,arm-softmmu,i386-softmmu" 28EXTRA_OECONF += "--target-list=arm-linux-user,arm-softmmu,i386-softmmu"
28EXTRA_OECONF += "--disable-gfx-check" 29EXTRA_OECONF += "--disable-gfx-check"
29 30
30inherit autotools 31inherit autotools
31 32
32do_configure() { 33do_configure() {
33 ${S}/configure --prefix=${prefix} ${EXTRA_OECONF} 34 ${S}/configure --prefix=${prefix} ${EXTRA_OECONF}
35 chmod a+x ${S}/target-i386/beginend_funcs.sh
34} 36}