summaryrefslogtreecommitdiffstats
path: root/meta/packages/qemu/qemu-git/qemu-add-gl-host-code.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/qemu/qemu-git/qemu-add-gl-host-code.patch')
-rw-r--r--meta/packages/qemu/qemu-git/qemu-add-gl-host-code.patch33831
1 files changed, 33831 insertions, 0 deletions
diff --git a/meta/packages/qemu/qemu-git/qemu-add-gl-host-code.patch b/meta/packages/qemu/qemu-git/qemu-add-gl-host-code.patch
new file mode 100644
index 0000000000..25ee379251
--- /dev/null
+++ b/meta/packages/qemu/qemu-git/qemu-add-gl-host-code.patch
@@ -0,0 +1,33831 @@
1Index: git/Makefile.target
2===================================================================
3--- git.orig/Makefile.target 2009-05-23 11:22:16.000000000 +0100
4+++ git/Makefile.target 2009-05-23 11:59:35.000000000 +0100
5@@ -153,6 +153,12 @@
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+else
12+LIBOBJS+=opengl_dummy.o
13+endif
14+
15 ifeq ($(TARGET_BASE_ARCH), arm)
16 LIBOBJS+= neon_helper.o iwmmxt_helper.o
17 endif
18@@ -224,6 +230,21 @@
19
20 cpu-exec.o: CFLAGS += $(HELPER_CFLAGS)
21
22+parse_gl_h: parse_gl_h.c
23+ $(CC) -g -o $@ $<
24+server_stub.c: parse_gl_h
25+ ./parse_gl_h
26+gl_func.h: parse_gl_h
27+ ./parse_gl_h
28+GL_CFLAGS := -Wall -g -O2 -fno-strict-aliasing
29+opengl_func.h: gl_func.h
30+helper_opengl.o: helper_opengl.c opengl_func.h server_stub.c
31+ $(CC) $(GL_CFLAGS) $(DEFINES) -c -o $@ $< -I.. -I. -I../fpu -I../target-i386 -DNEED_CPU_H
32+gl_beginend.h: ../target-i386/beginend_funcs.sh
33+ $< > $@
34+opengl_exec.o : opengl_exec.c server_stub.c gl_func.h opengl_func.h gl_beginend.h
35+ $(CC) $(GL_CFLAGS) $(DEFINES) -c -o $@ $< -I. -I../target-i386
36+
37 #########################################################
38 # Linux user emulator target
39
40@@ -724,7 +745,7 @@
41 main.o: CFLAGS+=-p
42 endif
43
44-$(QEMU_PROG): LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS)
45+$(QEMU_PROG): LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS) -lGL -lGLU
46
47 $(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a
48 $(LINK)
49Index: git/hw/vmware_vga.c
50===================================================================
51--- git.orig/hw/vmware_vga.c 2009-05-23 11:22:16.000000000 +0100
52+++ git/hw/vmware_vga.c 2009-05-23 11:22:17.000000000 +0100
53@@ -484,6 +484,8 @@
54
55 #define CMD(f) le32_to_cpu(s->cmd->f)
56
57+static uint32_t last_cmd;
58+
59 static inline int vmsvga_fifo_empty(struct vmsvga_state_s *s)
60 {
61 if (!s->config || !s->enable)
62@@ -493,11 +495,18 @@
63
64 static inline uint32_t vmsvga_fifo_read_raw(struct vmsvga_state_s *s)
65 {
66- uint32_t cmd = s->fifo[CMD(stop) >> 2];
67- s->cmd->stop = cpu_to_le32(CMD(stop) + 4);
68- if (CMD(stop) >= CMD(max))
69+ int offset = CMD(stop);
70+
71+ if (unlikely(s->cmd->next_cmd == s->cmd->stop)) {
72+ fprintf(stderr, "%s: FIFO empty during CMD %i\n",
73+ __FUNCTION__, last_cmd);
74+ return 0x00000000;
75+ }
76+
77+ s->cmd->stop = cpu_to_le32(offset + 4);
78+ if (offset + 4 >= CMD(max))
79 s->cmd->stop = s->cmd->min;
80- return cmd;
81+ return s->fifo[offset >> 2];
82 }
83
84 static inline uint32_t vmsvga_fifo_read(struct vmsvga_state_s *s)
85@@ -507,12 +516,12 @@
86
87 static void vmsvga_fifo_run(struct vmsvga_state_s *s)
88 {
89- uint32_t cmd, colour;
90+ uint32_t colour;
91 int args = 0;
92 int x, y, dx, dy, width, height;
93 struct vmsvga_cursor_definition_s cursor;
94 while (!vmsvga_fifo_empty(s))
95- switch (cmd = vmsvga_fifo_read(s)) {
96+ switch (last_cmd = vmsvga_fifo_read(s)) {
97 case SVGA_CMD_UPDATE:
98 case SVGA_CMD_UPDATE_VERBOSE:
99 x = vmsvga_fifo_read(s);
100@@ -612,7 +621,7 @@
101 while (args --)
102 vmsvga_fifo_read(s);
103 printf("%s: Unknown command 0x%02x in SVGA command FIFO\n",
104- __FUNCTION__, cmd);
105+ __FUNCTION__, last_cmd);
106 break;
107 }
108
109Index: git/kqemu.c
110===================================================================
111--- git.orig/kqemu.c 2009-05-23 11:22:16.000000000 +0100
112+++ git/kqemu.c 2009-05-23 11:22:17.000000000 +0100
113@@ -93,6 +93,8 @@
114 int qpi_io_memory;
115 uint32_t kqemu_comm_base; /* physical address of the QPI communication page */
116
117+extern int enable_gl;
118+
119 #define cpuid(index, eax, ebx, ecx, edx) \
120 asm volatile ("cpuid" \
121 : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) \
122@@ -860,6 +862,22 @@
123 else
124 env->hflags &= ~HF_OSFXSR_MASK;
125
126+ /* OPENGL Stuff */
127+ if (enable_gl && ((env->hflags & HF_CPL_MASK) == 3)) {
128+ int index = (env->eip >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
129+ if (env->segs[R_CS].base != 0)
130+ fprintf(stderr, "env->segs[R_CS].base != 0 !\n");
131+ else if (__builtin_expect(env->tlb_table[1][index].addr_code !=
132+ (env->eip & TARGET_PAGE_MASK), 0))
133+ ldub_code(env->eip);
134+
135+ if (env->tlb_table[1][index].addend) {
136+ unsigned char *ptr = env->eip + env->tlb_table[1][index].addend;
137+ if (ptr[0] == 0xCD && ptr[1] == 0x99)
138+ helper_opengl();
139+ }
140+ }
141+
142 LOG_INT("kqemu: kqemu_cpu_exec: ret=0x%x\n", ret);
143 if (ret == KQEMU_RET_SYSCALL) {
144 /* syscall instruction */
145Index: git/target-i386/beginend_funcs.sh
146===================================================================
147--- /dev/null 1970-01-01 00:00:00.000000000 +0000
148+++ git/target-i386/beginend_funcs.sh 2009-05-23 11:22:17.000000000 +0100
149@@ -0,0 +1,23 @@
150+#! /bin/sh
151+# Copyright 2008 (C) Intel Corporation
152+#
153+# echo names of functions that are legal between a glBegin and glEnd pair.
154+echo -e MAGIC_MACRO\(glVertex{2,3,4}{s,i,f,d}{,v}\)\\n
155+echo -e MAGIC_MACRO\(glTexCoord{1,2,3,4}{s,i,f,d}{,v}\)\\n
156+echo -e MAGIC_MACRO\(glMultiTexCoord{1,2,3,4}{s,i,f,d}{,v}\)\\n
157+echo -e MAGIC_MACRO\(glNormal3{b,s,i,f,d}{,v}\)\\n
158+echo -e MAGIC_MACRO\(glFogCoord{f,d}{,v}\)\\n
159+echo -e MAGIC_MACRO\(glColor{3,4}{b,s,i,f,d,ub,us,ui}{,v}\)\\n
160+echo -e MAGIC_MACRO\(glSecondaryColor3{b,s,i,f,d,ub,us,ui}{,v}\)\\n
161+echo -e MAGIC_MACRO\(glIndex{s,i,f,d,ub}{,v}\)\\n
162+echo -e MAGIC_MACRO\(glVertexAttrib{1,2,3,4}{s,f,d}{,v}\)\\n
163+echo -e MAGIC_MACRO\(glVertexAttrib4{b,i,ub,us,ui}v\)\\n
164+echo -e MAGIC_MACRO\(glVertexAttrib4Nub\)\\n
165+echo -e MAGIC_MACRO\(glVertexAttrib4N{b,s,i,ub,us,ui}v\)\\n
166+echo -e MAGIC_MACRO\(glArrayElement\)\\n
167+echo -e MAGIC_MACRO\(glEvalCoord{1,2}{f,d}{,v}\)\\n
168+echo -e MAGIC_MACRO\(glEvalPoint{1,2}\)\\n
169+echo -e MAGIC_MACRO\(glMaterial{i,f}{,v}\)\\n
170+echo -e MAGIC_MACRO\(glCallList\)\\n
171+echo -e MAGIC_MACRO\(glCallLists\)\\n
172+echo -e MAGIC_MACRO\(glEdgeFlag{,v}\)\\n
173Index: git/target-i386/ghash.c
174===================================================================
175--- /dev/null 1970-01-01 00:00:00.000000000 +0000
176+++ git/target-i386/ghash.c 2009-05-23 11:22:17.000000000 +0100
177@@ -0,0 +1,347 @@
178+/* This is a modified and simplified version of original ghash.c */
179+
180+/* GLIB - Library of useful routines for C programming
181+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
182+ *
183+ * This library is free software; you can redistribute it and/or
184+ * modify it under the terms of the GNU Lesser General Public
185+ * License as published by the Free Software Foundation; either
186+ * version 2 of the License, or (at your option) any later version.
187+ *
188+ * This library is distributed in the hope that it will be useful,
189+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
190+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
191+ * Lesser General Public License for more details.
192+ *
193+ * You should have received a copy of the GNU Lesser General Public
194+ * License along with this library; if not, write to the
195+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
196+ * Boston, MA 02111-1307, USA.
197+ */
198+
199+/*
200+ * Modified by the GLib Team and others 1997-2000. See the AUTHORS
201+ * file for a list of people on the GLib Team. See the ChangeLog
202+ * files for a list of changes. These files are distributed with
203+ * GLib at ftp://ftp.gtk.org/pub/gtk/.
204+ */
205+
206+
207+#include <stdlib.h>
208+
209+#include "ghash.h"
210+
211+#define HASH_TABLE_MIN_SIZE 11
212+#define HASH_TABLE_MAX_SIZE 13845163
213+
214+#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
215+
216+
217+typedef struct _SimpleHashNode SimpleHashNode;
218+
219+struct _SimpleHashNode
220+{
221+ int key;
222+ void* value;
223+ SimpleHashNode *next;
224+};
225+
226+struct _SimpleHashTable
227+{
228+ int size;
229+ int nnodes;
230+ SimpleHashNode **nodes;
231+ SimpleDestroyNotify value_destroy_func;
232+};
233+
234+static const unsigned int simple_primes[] =
235+{
236+ 11,
237+ 19,
238+ 37,
239+ 73,
240+ 109,
241+ 163,
242+ 251,
243+ 367,
244+ 557,
245+ 823,
246+ 1237,
247+ 1861,
248+ 2777,
249+ 4177,
250+ 6247,
251+ 9371,
252+ 14057,
253+ 21089,
254+ 31627,
255+ 47431,
256+ 71143,
257+ 106721,
258+ 160073,
259+ 240101,
260+ 360163,
261+ 540217,
262+ 810343,
263+ 1215497,
264+ 1823231,
265+ 2734867,
266+ 4102283,
267+ 6153409,
268+ 9230113,
269+ 13845163,
270+};
271+
272+static const unsigned int simple_nprimes = sizeof (simple_primes) / sizeof (simple_primes[0]);
273+
274+unsigned int simple_spaced_primes_closest (unsigned int num)
275+{
276+ int i;
277+
278+ for (i = 0; i < simple_nprimes; i++)
279+ if (simple_primes[i] > num)
280+ return simple_primes[i];
281+
282+ return simple_primes[simple_nprimes - 1];
283+}
284+
285+#define HASH_TABLE_RESIZE(hash_table) \
286+ do { \
287+ if ((hash_table->size >= 3 * hash_table->nnodes && \
288+ hash_table->size > HASH_TABLE_MIN_SIZE) || \
289+ (3 * hash_table->size <= hash_table->nnodes && \
290+ hash_table->size < HASH_TABLE_MAX_SIZE)) \
291+ simple_hash_table_resize (hash_table); \
292+ } while(0)
293+
294+static void simple_hash_table_resize (SimpleHashTable *hash_table);
295+static SimpleHashNode** simple_hash_table_lookup_node (SimpleHashTable *hash_table,
296+ int key);
297+static SimpleHashNode* simple_hash_node_new (int key,
298+ void* value);
299+static void simple_hash_nodes_destroy (SimpleHashNode *hash_node,
300+ SimpleDestroyNotify value_destroy_func);
301+
302+
303+#define alloc0(type, n) (type*)calloc(n, sizeof(type))
304+
305+SimpleHashTable*
306+simple_hash_table_new (SimpleDestroyNotify value_destroy_func)
307+{
308+ SimpleHashTable *hash_table;
309+
310+ hash_table = alloc0(SimpleHashTable, 1);
311+ hash_table->size = HASH_TABLE_MIN_SIZE;
312+ hash_table->nnodes = 0;
313+ hash_table->value_destroy_func = value_destroy_func;
314+ hash_table->nodes = alloc0 (SimpleHashNode*, hash_table->size);
315+
316+ return hash_table;
317+}
318+
319+SimpleHashTable* simple_hash_table_clone(SimpleHashTable *hash_table,
320+ SimpleCloneValue clone_value_func)
321+{
322+ SimpleHashTable *hash_table_new;
323+ SimpleHashNode *new_node;
324+ SimpleHashNode *node;
325+ int i;
326+
327+ hash_table_new = alloc0 (SimpleHashTable, 1);
328+ hash_table_new->size = hash_table->size;
329+ hash_table_new->nnodes = hash_table->nnodes;
330+ hash_table_new->value_destroy_func = hash_table->value_destroy_func;
331+ hash_table_new->nodes = alloc0 (SimpleHashNode*, hash_table_new->size);
332+ for (i = 0; i < hash_table->size; i++)
333+ {
334+ node = hash_table->nodes[i];
335+ while(node)
336+ {
337+ SimpleHashNode *next = hash_table_new->nodes[i];
338+ new_node = simple_hash_node_new(node->key,
339+ (clone_value_func)? clone_value_func(node->value) : node->value);
340+ new_node->next = next;
341+ hash_table_new->nodes[i] = new_node;
342+ node = node->next;
343+ }
344+ }
345+ return hash_table_new;
346+}
347+
348+void
349+simple_hash_table_destroy (SimpleHashTable *hash_table)
350+{
351+ int i;
352+
353+ for (i = 0; i < hash_table->size; i++)
354+ {
355+ simple_hash_nodes_destroy (hash_table->nodes[i],
356+ hash_table->value_destroy_func);
357+ hash_table->nodes[i] = NULL;
358+ }
359+ free (hash_table->nodes);
360+ free (hash_table);
361+}
362+
363+static inline SimpleHashNode**
364+simple_hash_table_lookup_node (SimpleHashTable *hash_table,
365+ int key)
366+{
367+ SimpleHashNode **node;
368+
369+ node = &hash_table->nodes[(unsigned int)key % hash_table->size];
370+ while (*node && (*node)->key != key)
371+ node = &(*node)->next;
372+
373+ return node;
374+}
375+
376+void*
377+simple_hash_table_lookup (SimpleHashTable *hash_table, int key)
378+{
379+ SimpleHashNode *node;
380+
381+ node = *simple_hash_table_lookup_node (hash_table, key);
382+
383+ return node ? node->value : NULL;
384+}
385+
386+void**
387+simple_hash_table_lookup_pointer (SimpleHashTable *hash_table, int key)
388+{
389+ SimpleHashNode *node;
390+
391+ node = *simple_hash_table_lookup_node (hash_table, key);
392+
393+ return node ? &node->value : NULL;
394+}
395+
396+
397+void
398+simple_hash_table_insert (SimpleHashTable *hash_table,
399+ int key,
400+ void* value)
401+{
402+ SimpleHashNode **node;
403+
404+ node = simple_hash_table_lookup_node (hash_table, key);
405+
406+ if (*node)
407+ {
408+ /* do not reset node->key in this place, keeping
409+ * the old key is the intended behaviour.
410+ * simple_hash_table_replace() can be used instead.
411+ */
412+ if (hash_table->value_destroy_func)
413+ hash_table->value_destroy_func ((*node)->value);
414+
415+ (*node)->value = value;
416+ }
417+ else
418+ {
419+ *node = simple_hash_node_new (key, value);
420+ hash_table->nnodes++;
421+ HASH_TABLE_RESIZE (hash_table);
422+ }
423+}
424+int
425+simple_hash_table_remove (SimpleHashTable *hash_table,
426+ int key)
427+{
428+ SimpleHashNode **node, *dest;
429+
430+ node = simple_hash_table_lookup_node (hash_table, key);
431+ if (*node)
432+ {
433+ dest = *node;
434+ (*node) = dest->next;
435+ if (hash_table->value_destroy_func)
436+ hash_table->value_destroy_func (dest->value);
437+ free (dest);
438+ hash_table->nnodes--;
439+
440+ HASH_TABLE_RESIZE (hash_table);
441+
442+ return 1;
443+ }
444+
445+ return 0;
446+}
447+
448+
449+void
450+simple_hash_table_foreach (SimpleHashTable *hash_table,
451+ SimpleHFunc func,
452+ void* user_data)
453+{
454+ SimpleHashNode *node;
455+ int i;
456+
457+ for (i = 0; i < hash_table->size; i++)
458+ for (node = hash_table->nodes[i]; node; node = node->next)
459+ (* func) (node->key, node->value, user_data);
460+}
461+
462+unsigned int
463+simple_hash_table_size (SimpleHashTable *hash_table)
464+{
465+ return hash_table->nnodes;
466+}
467+
468+static void
469+simple_hash_table_resize (SimpleHashTable *hash_table)
470+{
471+ SimpleHashNode **new_nodes;
472+ SimpleHashNode *node;
473+ SimpleHashNode *next;
474+ unsigned int hash_val;
475+ int new_size;
476+ int i;
477+
478+ new_size = simple_spaced_primes_closest (hash_table->nnodes);
479+ new_size = CLAMP (new_size, HASH_TABLE_MIN_SIZE, HASH_TABLE_MAX_SIZE);
480+
481+ new_nodes = alloc0 (SimpleHashNode*, new_size);
482+
483+ for (i = 0; i < hash_table->size; i++)
484+ for (node = hash_table->nodes[i]; node; node = next)
485+ {
486+ next = node->next;
487+
488+ hash_val = (unsigned int)(node->key) % new_size;
489+
490+ node->next = new_nodes[hash_val];
491+ new_nodes[hash_val] = node;
492+ }
493+
494+ free (hash_table->nodes);
495+ hash_table->nodes = new_nodes;
496+ hash_table->size = new_size;
497+}
498+
499+static SimpleHashNode*
500+simple_hash_node_new (int key,
501+ void* value)
502+{
503+ SimpleHashNode *hash_node = alloc0 (SimpleHashNode, 1);
504+
505+ hash_node->key = key;
506+ hash_node->value = value;
507+ hash_node->next = NULL;
508+
509+ return hash_node;
510+}
511+
512+static void
513+simple_hash_nodes_destroy (SimpleHashNode *hash_node,
514+ SimpleDestroyNotify value_destroy_func)
515+{
516+ while (hash_node)
517+ {
518+ SimpleHashNode *next = hash_node->next;
519+ if (value_destroy_func)
520+ value_destroy_func (hash_node->value);
521+ free (hash_node);
522+ hash_node = next;
523+ }
524+}
525Index: git/target-i386/ghash.h
526===================================================================
527--- /dev/null 1970-01-01 00:00:00.000000000 +0000
528+++ git/target-i386/ghash.h 2009-05-23 11:22:17.000000000 +0100
529@@ -0,0 +1,59 @@
530+/* This is a modified and simplified version of original ghash.h */
531+
532+
533+/* GLIB - Library of useful routines for C programming
534+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
535+ *
536+ * This library is free software; you can redistribute it and/or
537+ * modify it under the terms of the GNU Lesser General Public
538+ * License as published by the Free Software Foundation; either
539+ * version 2 of the License, or (at your option) any later version.
540+ *
541+ * This library is distributed in the hope that it will be useful,
542+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
543+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
544+ * Lesser General Public License for more details.
545+ *
546+ * You should have received a copy of the GNU Lesser General Public
547+ * License along with this library; if not, write to the
548+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
549+ * Boston, MA 02111-1307, USA.
550+ */
551+
552+/*
553+ * Modified by the GLib Team and others 1997-2000. See the AUTHORS
554+ * file for a list of people on the GLib Team. See the ChangeLog
555+ * files for a list of changes. These files are distributed with
556+ * GLib at ftp://ftp.gtk.org/pub/gtk/.
557+ */
558+
559+#ifndef __SIMPLE_HASH_H__
560+#define __SIMPLE_HASH_H__
561+
562+typedef struct _SimpleHashTable SimpleHashTable;
563+
564+typedef void (*SimpleDestroyNotify)(void*);
565+typedef void (*SimpleHFunc)(int key, void* value, void* user_data);
566+typedef void* (*SimpleCloneValue)(void* value);
567+
568+/* Hash tables
569+ */
570+SimpleHashTable* simple_hash_table_new (SimpleDestroyNotify value_destroy_func);
571+SimpleHashTable* simple_hash_table_clone(SimpleHashTable *hash_table,
572+ SimpleCloneValue clone_value_func);
573+void simple_hash_table_destroy (SimpleHashTable *hash_table);
574+void simple_hash_table_insert (SimpleHashTable *hash_table,
575+ int key,
576+ void* value);
577+int simple_hash_table_remove (SimpleHashTable *hash_table,
578+ int key);
579+void* simple_hash_table_lookup (SimpleHashTable *hash_table,
580+ int key);
581+void** simple_hash_table_lookup_pointer (SimpleHashTable *hash_table, int key);
582+void simple_hash_table_foreach (SimpleHashTable *hash_table,
583+ SimpleHFunc func,
584+ void* user_data);
585+unsigned int simple_hash_table_size (SimpleHashTable *hash_table);
586+
587+#endif /* __SIMPLE_HASH_H__ */
588+
589Index: git/target-i386/gl_func_perso.h
590===================================================================
591--- /dev/null 1970-01-01 00:00:00.000000000 +0000
592+++ git/target-i386/gl_func_perso.h 2009-05-23 11:22:17.000000000 +0100
593@@ -0,0 +1,135 @@
594+/*
595+ * Hand-implemented GL/GLX API
596+ *
597+ * Copyright (c) 2006,2007 Even Rouault
598+ *
599+ * Permission is hereby granted, free of charge, to any person obtaining a copy
600+ * of this software and associated documentation files (the "Software"), to deal
601+ * in the Software without restriction, including without limitation the rights
602+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
603+ * copies of the Software, and to permit persons to whom the Software is
604+ * furnished to do so, subject to the following conditions:
605+ *
606+ * The above copyright notice and this permission notice shall be included in
607+ * all copies or substantial portions of the Software.
608+ *
609+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
610+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
611+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
612+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
613+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
614+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
615+ * THE SOFTWARE.
616+ */
617+
618+MAGIC_MACRO(_init32),
619+MAGIC_MACRO(_init64),
620+MAGIC_MACRO(_synchronize),
621+MAGIC_MACRO(_serialized_calls),
622+MAGIC_MACRO(_exit_process),
623+MAGIC_MACRO(_moveResizeWindow),
624+MAGIC_MACRO(_changeWindowState),
625+MAGIC_MACRO(_send_cursor),
626+
627+/* When you add a glX call here, you HAVE TO update IS_GLX_CALL */
628+MAGIC_MACRO(glXChooseVisual),
629+MAGIC_MACRO(glXQueryExtensionsString),
630+MAGIC_MACRO(glXQueryServerString),
631+MAGIC_MACRO(glXCreateContext),
632+MAGIC_MACRO(glXCopyContext),
633+MAGIC_MACRO(glXDestroyContext),
634+MAGIC_MACRO(glXGetClientString),
635+MAGIC_MACRO(glXQueryVersion),
636+MAGIC_MACRO(glXMakeCurrent),
637+MAGIC_MACRO(glXGetConfig),
638+MAGIC_MACRO(glXGetConfig_extended),
639+MAGIC_MACRO(glXWaitGL),
640+MAGIC_MACRO(glXWaitX),
641+MAGIC_MACRO(glXGetFBConfigAttrib_extended),
642+MAGIC_MACRO(glXChooseFBConfig),
643+MAGIC_MACRO(glXChooseFBConfigSGIX),
644+MAGIC_MACRO(glXGetFBConfigs),
645+MAGIC_MACRO(glXCreatePbuffer),
646+MAGIC_MACRO(glXCreateGLXPbufferSGIX),
647+MAGIC_MACRO(glXDestroyPbuffer),
648+MAGIC_MACRO(glXDestroyGLXPbufferSGIX),
649+MAGIC_MACRO(glXCreateNewContext),
650+MAGIC_MACRO(glXCreateContextWithConfigSGIX),
651+MAGIC_MACRO(glXGetVisualFromFBConfig),
652+MAGIC_MACRO(glXGetFBConfigAttrib),
653+MAGIC_MACRO(glXGetFBConfigAttribSGIX),
654+MAGIC_MACRO(glXQueryContext),
655+MAGIC_MACRO(glXQueryDrawable),
656+MAGIC_MACRO(glXQueryGLXPbufferSGIX),
657+MAGIC_MACRO(glXUseXFont),
658+MAGIC_MACRO(glXIsDirect),
659+MAGIC_MACRO(glXGetProcAddress_fake),
660+MAGIC_MACRO(glXGetProcAddress_global_fake),
661+MAGIC_MACRO(glXSwapBuffers),
662+MAGIC_MACRO(glXQueryExtension),
663+MAGIC_MACRO(glXGetScreenDriver),
664+MAGIC_MACRO(glXGetDriverConfig),
665+MAGIC_MACRO(glXSwapIntervalSGI),
666+MAGIC_MACRO(glXBindTexImageATI),
667+MAGIC_MACRO(glXReleaseTexImageATI),
668+MAGIC_MACRO(glXBindTexImageARB),
669+MAGIC_MACRO(glXReleaseTexImageARB),
670+
671+MAGIC_MACRO(glGetString),
672+
673+MAGIC_MACRO(glShaderSourceARB_fake),
674+MAGIC_MACRO(glShaderSource_fake),
675+MAGIC_MACRO(glVertexPointer_fake),
676+MAGIC_MACRO(glNormalPointer_fake),
677+MAGIC_MACRO(glColorPointer_fake),
678+MAGIC_MACRO(glSecondaryColorPointer_fake),
679+MAGIC_MACRO(glIndexPointer_fake),
680+MAGIC_MACRO(glTexCoordPointer_fake),
681+MAGIC_MACRO(glEdgeFlagPointer_fake),
682+MAGIC_MACRO(glVertexAttribPointerARB_fake),
683+MAGIC_MACRO(glVertexAttribPointerNV_fake),
684+MAGIC_MACRO(glWeightPointerARB_fake),
685+MAGIC_MACRO(glMatrixIndexPointerARB_fake),
686+MAGIC_MACRO(glFogCoordPointer_fake),
687+MAGIC_MACRO(glVariantPointerEXT_fake),
688+MAGIC_MACRO(glInterleavedArrays_fake),
689+MAGIC_MACRO(glElementPointerATI_fake),
690+MAGIC_MACRO(glTuxRacerDrawElements_fake),
691+MAGIC_MACRO(glVertexAndNormalPointer_fake),
692+MAGIC_MACRO(glTexCoordPointer01_fake),
693+MAGIC_MACRO(glTexCoordPointer012_fake),
694+MAGIC_MACRO(glVertexNormalPointerInterlaced_fake),
695+MAGIC_MACRO(glVertexNormalColorPointerInterlaced_fake),
696+MAGIC_MACRO(glVertexColorTexCoord0PointerInterlaced_fake),
697+MAGIC_MACRO(glVertexNormalTexCoord0PointerInterlaced_fake),
698+MAGIC_MACRO(glVertexNormalTexCoord01PointerInterlaced_fake),
699+MAGIC_MACRO(glVertexNormalTexCoord012PointerInterlaced_fake),
700+MAGIC_MACRO(glVertexNormalColorTexCoord0PointerInterlaced_fake),
701+MAGIC_MACRO(glVertexNormalColorTexCoord01PointerInterlaced_fake),
702+MAGIC_MACRO(glVertexNormalColorTexCoord012PointerInterlaced_fake),
703+MAGIC_MACRO(glGenTextures_fake),
704+MAGIC_MACRO(glGenBuffersARB_fake),
705+MAGIC_MACRO(glGenLists_fake),
706+MAGIC_MACRO(_glDrawElements_buffer),
707+MAGIC_MACRO(_glDrawRangeElements_buffer),
708+MAGIC_MACRO(_glMultiDrawElements_buffer),
709+MAGIC_MACRO(_glVertexPointer_buffer),
710+MAGIC_MACRO(_glNormalPointer_buffer),
711+MAGIC_MACRO(_glColorPointer_buffer),
712+MAGIC_MACRO(_glSecondaryColorPointer_buffer),
713+MAGIC_MACRO(_glIndexPointer_buffer),
714+MAGIC_MACRO(_glTexCoordPointer_buffer),
715+MAGIC_MACRO(_glEdgeFlagPointer_buffer),
716+MAGIC_MACRO(_glVertexAttribPointerARB_buffer),
717+MAGIC_MACRO(_glWeightPointerARB_buffer),
718+MAGIC_MACRO(_glMatrixIndexPointerARB_buffer),
719+MAGIC_MACRO(_glFogCoordPointer_buffer),
720+MAGIC_MACRO(_glVariantPointerEXT_buffer),
721+MAGIC_MACRO(_glGetError_fake),
722+MAGIC_MACRO(_glReadPixels_pbo),
723+MAGIC_MACRO(_glDrawPixels_pbo),
724+MAGIC_MACRO(_glMapBufferARB_fake),
725+MAGIC_MACRO(_glSelectBuffer_fake),
726+MAGIC_MACRO(_glGetSelectBuffer_fake),
727+MAGIC_MACRO(_glFeedbackBuffer_fake),
728+MAGIC_MACRO(_glGetFeedbackBuffer_fake),
729Index: git/target-i386/helper.h
730===================================================================
731--- git.orig/target-i386/helper.h 2009-05-23 11:22:16.000000000 +0100
732+++ git/target-i386/helper.h 2009-05-23 11:22:17.000000000 +0100
733@@ -214,4 +214,6 @@
734 DEF_HELPER_2(rcrq, tl, tl, tl)
735 #endif
736
737+DEF_HELPER_0(opengl, void)
738+
739 #include "def-helper.h"
740Index: git/target-i386/helper_opengl.c
741===================================================================
742--- /dev/null 1970-01-01 00:00:00.000000000 +0000
743+++ git/target-i386/helper_opengl.c 2009-05-23 11:22:17.000000000 +0100
744@@ -0,0 +1,979 @@
745+/*
746+ * Host-side implementation of GL/GLX API
747+ *
748+ * Copyright (c) 2006,2007 Even Rouault
749+ *
750+ * Permission is hereby granted, free of charge, to any person obtaining a copy
751+ * of this software and associated documentation files (the "Software"), to deal
752+ * in the Software without restriction, including without limitation the rights
753+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
754+ * copies of the Software, and to permit persons to whom the Software is
755+ * furnished to do so, subject to the following conditions:
756+ *
757+ * The above copyright notice and this permission notice shall be included in
758+ * all copies or substantial portions of the Software.
759+ *
760+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
761+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
762+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
763+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
764+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
765+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
766+ * THE SOFTWARE.
767+ */
768+#define _XOPEN_SOURCE 600
769+#include <string.h>
770+#include <stdlib.h>
771+#include <assert.h>
772+
773+#include <X11/Xlib.h>
774+#include <X11/Xutil.h>
775+
776+#include "exec.h"
777+
778+#if defined(CONFIG_USER_ONLY)
779+void helper_opengl(void)
780+{
781+ /* TODO */
782+}
783+#else
784+
785+#include "opengl_func.h"
786+
787+#define ENABLE_GL_LOG
788+
789+extern FILE *stderr;
790+
791+extern void init_process_tab(void);
792+extern int do_function_call(int func_number, arg_t *args, char *ret_string);
793+
794+extern void sdl_set_opengl_window(int x, int y, int width, int height);
795+
796+static int last_process_id = 0;
797+static int must_save = 0;
798+
799+static inline void *get_phys_mem_addr(const CPUState *env, target_ulong addr)
800+{
801+ int is_user, index;
802+
803+ index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
804+ is_user = ((env->hflags & HF_CPL_MASK) == 3);
805+ if (is_user == 0) {
806+ fprintf(stderr, "not in userland !!!\n");
807+ return NULL;
808+ }
809+ if (__builtin_expect
810+ (env->tlb_table[is_user][index].addr_code !=
811+ (addr & TARGET_PAGE_MASK), 0)) {
812+ target_ulong ret = cpu_get_phys_page_debug((CPUState *) env, addr);
813+
814+ if (ret == -1) {
815+ fprintf(stderr,
816+ "cpu_get_phys_page_debug(env, " TARGET_FMT_lx ") == "
817+ TARGET_FMT_lx "\n", addr, ret);
818+ fprintf(stderr,
819+ "not in phys mem " TARGET_FMT_lx "(" TARGET_FMT_lx " "
820+ TARGET_FMT_lx ")\n", addr,
821+ env->tlb_table[is_user][index].addr_code,
822+ addr & TARGET_PAGE_MASK);
823+ fprintf(stderr, "cpu_x86_handle_mmu_fault = %d\n",
824+ cpu_x86_handle_mmu_fault((CPUState *) env, addr, 0, 1, 1));
825+ return NULL;
826+ } else {
827+ if (ret + TARGET_PAGE_SIZE <= phys_ram_size) {
828+ return phys_ram_base + ret +
829+ (((target_ulong) addr) & (TARGET_PAGE_SIZE - 1));
830+ } else {
831+ fprintf(stderr,
832+ "cpu_get_phys_page_debug(env, " TARGET_FMT_lx ") == "
833+ TARGET_FMT_lx "p\n", addr, ret);
834+ fprintf(stderr,
835+ "ret=" TARGET_FMT_lx " phys_ram_size= " TARGET_FMT_lx
836+ "\n", ret, (target_ulong) phys_ram_size);
837+ return NULL;
838+ }
839+ }
840+ } else
841+ return (void *) (addr + env->tlb_table[is_user][index].addend);
842+}
843+
844+#ifndef MIN
845+#define MIN(a, b) (((a) < (b)) ? (a) : (b))
846+#endif
847+
848+enum {
849+ NOT_MAPPED,
850+ MAPPED_CONTIGUOUS,
851+ MAPPED_NOT_CONTIGUOUS
852+};
853+
854+#define TARGET_ADDR_LOW_ALIGN(x) ((target_ulong)(x) & ~(TARGET_PAGE_SIZE - 1))
855+
856+/* Return NOT_MAPPED if a page is not mapped into target physical memory */
857+/* MAPPED_CONTIGUOUS if all pages are mapped into target physical memory and contiguous */
858+/* MAPPED_NOT_CONTIGUOUS if all pages are mapped into target physical memory but not contiguous */
859+static int get_target_mem_state(const CPUState *env,
860+ target_ulong target_addr, int len)
861+{
862+ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
863+ int to_end_page =
864+ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
865+ int ret = MAPPED_CONTIGUOUS;
866+
867+ if (aligned_target_addr != target_addr) {
868+ void *phys_addr = get_phys_mem_addr(env, aligned_target_addr);
869+ void *last_phys_addr = phys_addr;
870+
871+ if (phys_addr == 0) {
872+ return NOT_MAPPED;
873+ }
874+ if (len > to_end_page) {
875+ len -= to_end_page;
876+ aligned_target_addr += TARGET_PAGE_SIZE;
877+ int i;
878+
879+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
880+ void *phys_addr =
881+ get_phys_mem_addr(env, aligned_target_addr + i);
882+ if (phys_addr == 0) {
883+ return NOT_MAPPED;
884+ }
885+ if (phys_addr != last_phys_addr + TARGET_PAGE_SIZE)
886+ ret = MAPPED_NOT_CONTIGUOUS;
887+ last_phys_addr = phys_addr;
888+ }
889+ }
890+ } else {
891+ void *last_phys_addr = NULL;
892+ int i;
893+
894+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
895+ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
896+
897+ if (phys_addr == 0) {
898+ return NOT_MAPPED;
899+ }
900+ if (i != 0 && phys_addr != last_phys_addr + TARGET_PAGE_SIZE)
901+ ret = MAPPED_NOT_CONTIGUOUS;
902+ last_phys_addr = phys_addr;
903+ }
904+ }
905+ return ret;
906+}
907+
908+/* copy len bytes from host memory at addr host_addr to target memory at logical addr target_addr */
909+/* Returns 1 if successfull, 0 if some target pages are not mapped into target physical memory */
910+static int memcpy_host_to_target(const CPUState *env,
911+ target_ulong target_addr,
912+ const void *host_addr, int len)
913+{
914+ int i;
915+ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
916+ int to_end_page =
917+ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
918+ int ret = get_target_mem_state(env, target_addr, len);
919+
920+ if (ret == NOT_MAPPED) {
921+ return 0;
922+ }
923+
924+ if (ret == MAPPED_CONTIGUOUS) {
925+ void *phys_addr = get_phys_mem_addr(env, target_addr);
926+
927+ memcpy(phys_addr, host_addr, len);
928+ } else {
929+ if (aligned_target_addr != target_addr) {
930+ void *phys_addr = get_phys_mem_addr(env, target_addr);
931+
932+ memcpy(phys_addr, host_addr, MIN(len, to_end_page));
933+ if (len <= to_end_page) {
934+ return 1;
935+ }
936+ len -= to_end_page;
937+ host_addr += to_end_page;
938+ target_addr = aligned_target_addr + TARGET_PAGE_SIZE;
939+ }
940+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
941+ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
942+
943+ memcpy(phys_addr, host_addr + i,
944+ (i + TARGET_PAGE_SIZE <=
945+ len) ? TARGET_PAGE_SIZE : len & (TARGET_PAGE_SIZE - 1));
946+ }
947+ }
948+
949+ return 1;
950+}
951+
952+static int memcpy_target_to_host(const CPUState *env, void *host_addr,
953+ target_ulong target_addr, int len)
954+{
955+ int i;
956+ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
957+ int to_end_page =
958+ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
959+ int ret = get_target_mem_state(env, target_addr, len);
960+
961+ if (ret == NOT_MAPPED) {
962+ return 0;
963+ }
964+
965+ if (ret == MAPPED_CONTIGUOUS) {
966+ void *phys_addr = get_phys_mem_addr(env, target_addr);
967+
968+ memcpy(host_addr, phys_addr, len);
969+ } else {
970+ if (aligned_target_addr != target_addr) {
971+ void *phys_addr = get_phys_mem_addr(env, target_addr);
972+
973+ memcpy(host_addr, phys_addr, MIN(len, to_end_page));
974+ if (len <= to_end_page)
975+ return 1;
976+
977+ len -= to_end_page;
978+ host_addr += to_end_page;
979+ target_addr = aligned_target_addr + TARGET_PAGE_SIZE;
980+ }
981+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
982+ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
983+
984+ memcpy(host_addr + i, phys_addr,
985+ (i + TARGET_PAGE_SIZE <=
986+ len) ? TARGET_PAGE_SIZE : len & (TARGET_PAGE_SIZE - 1));
987+ }
988+ }
989+
990+ return 1;
991+}
992+
993+static int memcpy_target_to_host_1_1(const CPUState *env, void *host_addr,
994+ target_ulong target_addr, int nb_args)
995+{
996+ return memcpy_target_to_host(env, host_addr, target_addr, nb_args * 8);
997+}
998+
999+static int wordsize = 0;
1000+static int (*argcpy_target_to_host) (const CPUState *env, void *host_addr,
1001+ target_ulong target_addr, int nb_args) =
1002+ memcpy_target_to_host_1_1;
1003+
1004+void do_disconnect_current(void);
1005+void do_context_switch(Display *dpy, pid_t pid, int call);
1006+
1007+static void disconnect_current(void)
1008+{
1009+ last_process_id = 0;
1010+
1011+ return do_disconnect_current();
1012+}
1013+
1014+static int memcpy_target32_to_host(const CPUState *env, void *host_addr,
1015+ target_ulong target_addr, int nb_args)
1016+{
1017+ int ret;
1018+ uint32_t args_temp[nb_args], *src = args_temp;
1019+ arg_t *dest = host_addr;
1020+
1021+ ret = memcpy_target_to_host(env, args_temp, target_addr, nb_args * 4);
1022+ if (!ret)
1023+ return ret;
1024+
1025+ while (nb_args) {
1026+ /* TODO: endianness */
1027+ *dest = 0;
1028+ *(uint32_t *) (dest++) = *src++;
1029+ nb_args--;
1030+ }
1031+
1032+ return ret;
1033+}
1034+
1035+static int memcpy_target64_to_host(const CPUState *env, void *host_addr,
1036+ target_ulong target_addr, int nb_args)
1037+{
1038+ int ret;
1039+ uint64_t args_temp[nb_args], *src = args_temp;
1040+ arg_t *dest = host_addr;
1041+
1042+ ret = memcpy_target_to_host(env, args_temp, target_addr, nb_args * 8);
1043+ if (!ret)
1044+ return ret;
1045+
1046+ while (nb_args) {
1047+ /* TODO: endianness */
1048+ *dest = 0;
1049+ *(uint64_t *) (dest++) = *src++;
1050+ nb_args--;
1051+ }
1052+
1053+ return ret;
1054+}
1055+
1056+static int host_offset = 0;
1057+static void reset_host_offset()
1058+{
1059+ host_offset = 0;
1060+}
1061+
1062+/* Return a host pointer with the content of [target_addr, target_addr + len bytes[ */
1063+/* Do not free or modify */
1064+static const void *get_host_read_pointer(const CPUState *env,
1065+ const target_ulong target_addr, int len)
1066+{
1067+ int ret = get_target_mem_state(env, target_addr, len);
1068+
1069+ if (ret == NOT_MAPPED) {
1070+ return NULL;
1071+ } else if (ret == MAPPED_CONTIGUOUS) {
1072+ return get_phys_mem_addr(env, target_addr);
1073+ } else {
1074+ static int host_mem_size = 0;
1075+ static void *host_mem = NULL;
1076+ static void *ret;
1077+
1078+ if (host_mem_size < host_offset + len) {
1079+ host_mem_size = 2 * host_mem_size + host_offset + len;
1080+ host_mem = realloc(host_mem, host_mem_size);
1081+ }
1082+ ret = host_mem + host_offset;
1083+ assert(memcpy_target_to_host(env, ret, target_addr, len));
1084+ host_offset += len;
1085+ return ret;
1086+ }
1087+}
1088+
1089+int doing_opengl = 0;
1090+static int last_func_number = -1;
1091+static size_t(*my_strlen) (const char *) = NULL;
1092+
1093+#ifdef ENABLE_GL_LOG
1094+static FILE *f = NULL;
1095+static int logger_pid = 0;
1096+
1097+#define write_gl_debug_init() do { if (f == NULL) f = fopen("/tmp/debug_gl.bin", "wb"); } while(0)
1098+
1099+void write_gl_debug_cmd_int(int my_int)
1100+{
1101+ write_gl_debug_init();
1102+ fwrite(&my_int, sizeof(int), 1, f);
1103+ fflush(f);
1104+}
1105+
1106+void write_gl_debug_cmd_short(short my_int)
1107+{
1108+ write_gl_debug_init();
1109+ fwrite(&my_int, sizeof(short), 1, f);
1110+ fflush(f);
1111+}
1112+
1113+static void inline write_gl_debug_cmd_buffer_with_size(int size, void *buffer)
1114+{
1115+ write_gl_debug_init();
1116+ fwrite(&size, sizeof(int), 1, f);
1117+ if (size)
1118+ fwrite(buffer, size, 1, f);
1119+}
1120+
1121+static void inline write_gl_debug_cmd_buffer_without_size(
1122+ int size, void *buffer)
1123+{
1124+ write_gl_debug_init();
1125+ if (size)
1126+ fwrite(buffer, size, 1, f);
1127+}
1128+
1129+void write_gl_debug_end(void)
1130+{
1131+ write_gl_debug_init();
1132+ fclose(f);
1133+ f = NULL;
1134+ logger_pid = 0;
1135+ must_save = 0;
1136+}
1137+
1138+static inline int is_logging(int pid)
1139+{
1140+ return must_save && pid == logger_pid;
1141+}
1142+#endif
1143+
1144+#include <dlfcn.h>
1145+#include <signal.h>
1146+
1147+static void (*anticrash_handler) (void *) = NULL;
1148+static void (*show_stack_from_signal_handler) (int, int, int) = NULL;
1149+
1150+void my_anticrash_sigsegv_handler(int signum, siginfo_t *info, void *ptr)
1151+{
1152+ static int counter = 0;
1153+
1154+ counter++;
1155+
1156+ printf("oops\n");
1157+
1158+ /* if (show_stack_from_signal_handler && counter == 1) { struct ucontext*
1159+ * ctxt = (struct ucontext*)ptr; show_stack_from_signal_handler(10,
1160+ * ctxt->uc_mcontext.gregs[REG_EBP], ctxt->uc_mcontext.gregs[REG_ESP]); } */
1161+ anticrash_handler(ptr);
1162+
1163+ counter--;
1164+}
1165+
1166+static int decode_call_int(CPUState *env, int func_number, int pid,
1167+ target_ulong target_ret_string,
1168+ target_ulong in_args, target_ulong in_args_size)
1169+{
1170+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
1171+ int ret_type = signature->ret_type;
1172+ /* int has_out_parameters = signature->has_out_parameters; */
1173+ int nb_args = signature->nb_args;
1174+ int *args_type = signature->args_type;
1175+ int i;
1176+ int ret;
1177+ int *args_size = NULL;
1178+ target_ulong saved_out_ptr[50];
1179+ static char *ret_string = NULL;
1180+ static arg_t args[50];
1181+ static Display *dpy = NULL;
1182+
1183+ if (dpy == NULL) {
1184+ void *handle = dlopen("libanticrash.so", RTLD_LAZY);
1185+
1186+ if (handle) {
1187+ anticrash_handler = dlsym(handle, "anticrash_handler");
1188+ if (anticrash_handler) {
1189+ fprintf(stderr, "anticrash handler enabled\n");
1190+ struct sigaction sigsegv_action;
1191+ struct sigaction old_sigsegv_action;
1192+
1193+ sigsegv_action.sa_sigaction = my_anticrash_sigsegv_handler;
1194+ sigemptyset(&(sigsegv_action.sa_mask));
1195+ sigsegv_action.sa_flags = SA_SIGINFO | SA_NODEFER;
1196+ sigaction(SIGSEGV, &sigsegv_action, &old_sigsegv_action);
1197+ }
1198+ }
1199+ handle = dlopen("libgetstack.so", RTLD_LAZY);
1200+ if (handle) {
1201+ show_stack_from_signal_handler =
1202+ dlsym(handle, "show_stack_from_signal_handler");
1203+ }
1204+
1205+ dpy = XOpenDisplay(NULL);
1206+ init_process_tab();
1207+ ret_string = malloc(32768);
1208+ my_strlen = strlen;
1209+ }
1210+
1211+ if (unlikely(last_func_number == _exit_process_func &&
1212+ func_number == _exit_process_func)) {
1213+ last_func_number = -1;
1214+ return 0;
1215+ }
1216+
1217+ if (last_process_id != pid) {
1218+ do_context_switch(dpy, pid, func_number);
1219+ last_process_id = pid;
1220+ }
1221+
1222+ if (unlikely(func_number == _exit_process_func))
1223+ last_process_id = 0;
1224+
1225+ argcpy:
1226+ reset_host_offset();
1227+
1228+ if (nb_args) {
1229+
1230+ if (argcpy_target_to_host(env, args, in_args, nb_args) == 0) {
1231+ fprintf(stderr, "call %s pid=%d\n",
1232+ tab_opengl_calls_name[func_number], pid);
1233+ fprintf(stderr, "cannot get call parameters\n");
1234+ disconnect_current();
1235+ return 0;
1236+ }
1237+
1238+ args_size =
1239+ (int *) get_host_read_pointer(env, in_args_size,
1240+ sizeof(int) * nb_args);
1241+ if (args_size == NULL) {
1242+ fprintf(stderr, "call %s pid=%d\n",
1243+ tab_opengl_calls_name[func_number], pid);
1244+ fprintf(stderr, "cannot get call parameters size\n");
1245+ disconnect_current();
1246+ return 0;
1247+ }
1248+ }
1249+
1250+ if (func_number == _serialized_calls_func) {
1251+ int command_buffer_size = args_size[0];
1252+ const void *command_buffer =
1253+ get_host_read_pointer(env, args[0], command_buffer_size);
1254+ int commmand_buffer_offset = 0;
1255+
1256+ args_size = NULL;
1257+#ifdef ENABLE_GL_LOG
1258+ if (is_logging(pid))
1259+ write_gl_debug_cmd_short(_serialized_calls_func);
1260+#endif
1261+
1262+ while (commmand_buffer_offset < command_buffer_size) {
1263+ func_number =
1264+ *(short *) (command_buffer + commmand_buffer_offset);
1265+ if (!(func_number >= 0 && func_number < GL_N_CALLS)) {
1266+ fprintf(stderr,
1267+ "func_number >= 0 && func_number < GL_N_CALLS failed at "
1268+ "commmand_buffer_offset=%d (command_buffer_size=%d)\n",
1269+ commmand_buffer_offset, command_buffer_size);
1270+ return 0;
1271+ }
1272+ commmand_buffer_offset += sizeof(short);
1273+#ifdef ENABLE_GL_LOG
1274+ if (is_logging(pid))
1275+ write_gl_debug_cmd_short(func_number);
1276+#endif
1277+
1278+ signature = (Signature *) tab_opengl_calls[func_number];
1279+ ret_type = signature->ret_type;
1280+ assert(ret_type == TYPE_NONE);
1281+ nb_args = signature->nb_args;
1282+ args_type = signature->args_type;
1283+
1284+ for (i = 0; i < nb_args; i++) {
1285+ switch (args_type[i]) {
1286+ case TYPE_UNSIGNED_INT:
1287+ case TYPE_INT:
1288+ case TYPE_UNSIGNED_CHAR:
1289+ case TYPE_CHAR:
1290+ case TYPE_UNSIGNED_SHORT:
1291+ case TYPE_SHORT:
1292+ case TYPE_FLOAT:
1293+ {
1294+ args[i] =
1295+ *(int *) (command_buffer +
1296+ commmand_buffer_offset);
1297+#ifdef ENABLE_GL_LOG
1298+ if (is_logging(pid))
1299+ write_gl_debug_cmd_int(args[i]);
1300+#endif
1301+ commmand_buffer_offset += sizeof(int);
1302+ break;
1303+ }
1304+
1305+ case TYPE_NULL_TERMINATED_STRING:
1306+ CASE_IN_UNKNOWN_SIZE_POINTERS:
1307+ {
1308+ int arg_size =
1309+ *(int *) (command_buffer +
1310+ commmand_buffer_offset);
1311+ commmand_buffer_offset += sizeof(int);
1312+
1313+ if (arg_size == 0) {
1314+ args[i] = 0;
1315+ } else {
1316+ args[i] =
1317+ (long) (command_buffer +
1318+ commmand_buffer_offset);
1319+ }
1320+
1321+ if (args[i] == 0) {
1322+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
1323+ fprintf(stderr, "call %s arg %d pid=%d\n",
1324+ tab_opengl_calls_name[func_number], i,
1325+ pid);
1326+ disconnect_current();
1327+ return 0;
1328+ }
1329+ } else {
1330+ if (arg_size == 0) {
1331+ fprintf(stderr, "call %s arg %d pid=%d\n",
1332+ tab_opengl_calls_name[func_number], i,
1333+ pid);
1334+ fprintf(stderr, "args_size[i] == 0 !!\n");
1335+ disconnect_current();
1336+ return 0;
1337+ }
1338+ }
1339+#ifdef ENABLE_GL_LOG
1340+ if (is_logging(pid))
1341+ write_gl_debug_cmd_buffer_with_size(arg_size,
1342+ (void *)
1343+ args[i]);
1344+#endif
1345+ commmand_buffer_offset += arg_size;
1346+
1347+ break;
1348+ }
1349+
1350+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
1351+ {
1352+ int arg_size =
1353+ compute_arg_length(stderr, func_number, i, args);
1354+ args[i] =
1355+ (arg_size) ? (long) (command_buffer +
1356+ commmand_buffer_offset) : 0;
1357+#ifdef ENABLE_GL_LOG
1358+ if (is_logging(pid))
1359+ write_gl_debug_cmd_buffer_without_size(arg_size,
1360+ (void *)
1361+ args[i]);
1362+#endif
1363+ commmand_buffer_offset += arg_size;
1364+ break;
1365+ }
1366+
1367+ CASE_OUT_POINTERS:
1368+ {
1369+ fprintf(stderr,
1370+ "shouldn't happen TYPE_OUT_xxxx : call %s arg %d pid=%d\n",
1371+ tab_opengl_calls_name[func_number], i, pid);
1372+ disconnect_current();
1373+ return 0;
1374+ }
1375+
1376+ case TYPE_DOUBLE:
1377+ CASE_IN_KNOWN_SIZE_POINTERS:
1378+ args[i] =
1379+ (long) (command_buffer + commmand_buffer_offset);
1380+#ifdef ENABLE_GL_LOG
1381+ if (is_logging(pid))
1382+ write_gl_debug_cmd_buffer_without_size(
1383+ tab_args_type_length[args_type[i]],
1384+ (void *) args[i]);
1385+#endif
1386+ commmand_buffer_offset +=
1387+ tab_args_type_length[args_type[i]];
1388+ break;
1389+
1390+ case TYPE_IN_IGNORED_POINTER:
1391+ args[i] = 0;
1392+ break;
1393+
1394+ default:
1395+ fprintf(stderr,
1396+ "shouldn't happen : call %s arg %d pid=%d\n",
1397+ tab_opengl_calls_name[func_number], i, pid);
1398+ disconnect_current();
1399+ return 0;
1400+ }
1401+ }
1402+ do_function_call(func_number, args, ret_string);
1403+ }
1404+
1405+ ret = 0;
1406+ } else {
1407+#ifdef ENABLE_GL_LOG
1408+ if (is_logging(pid))
1409+ write_gl_debug_cmd_short(func_number);
1410+#endif
1411+
1412+ for (i = 0; i < nb_args; i++) {
1413+ switch (args_type[i]) {
1414+ case TYPE_UNSIGNED_INT:
1415+ case TYPE_INT:
1416+ case TYPE_UNSIGNED_CHAR:
1417+ case TYPE_CHAR:
1418+ case TYPE_UNSIGNED_SHORT:
1419+ case TYPE_SHORT:
1420+ case TYPE_FLOAT:
1421+#ifdef ENABLE_GL_LOG
1422+ if (is_logging(pid))
1423+ write_gl_debug_cmd_int(args[i]);
1424+#endif
1425+ break;
1426+
1427+ case TYPE_NULL_TERMINATED_STRING:
1428+ CASE_IN_UNKNOWN_SIZE_POINTERS:
1429+ if (args[i] == 0 && args_size[i] == 0) {
1430+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
1431+ fprintf(stderr, "call %s arg %d pid=%d\n",
1432+ tab_opengl_calls_name[func_number], i, pid);
1433+ disconnect_current();
1434+ return 0;
1435+ }
1436+ } else if (args[i] == 0 && args_size[i] != 0) {
1437+ fprintf(stderr, "call %s arg %d pid=%d\n",
1438+ tab_opengl_calls_name[func_number], i, pid);
1439+ fprintf(stderr, "args[i] == 0 && args_size[i] != 0 !!\n");
1440+ disconnect_current();
1441+ return 0;
1442+ } else if (args[i] != 0 && args_size[i] == 0) {
1443+ fprintf(stderr, "call %s arg %d pid=%d\n",
1444+ tab_opengl_calls_name[func_number], i, pid);
1445+ fprintf(stderr, "args[i] != 0 && args_size[i] == 0 !!\n");
1446+ disconnect_current();
1447+ return 0;
1448+ }
1449+ if (args[i]) {
1450+ args[i] =
1451+ (arg_t) get_host_read_pointer(env, args[i],
1452+ args_size[i]);
1453+ if (args[i] == 0) {
1454+ fprintf(stderr, "call %s arg %d pid=%d\n",
1455+ tab_opengl_calls_name[func_number], i, pid);
1456+ fprintf(stderr, "can not get %d bytes\n",
1457+ args_size[i]);
1458+ disconnect_current();
1459+ return 0;
1460+ }
1461+ }
1462+#ifdef ENABLE_GL_LOG
1463+ if (is_logging(pid))
1464+ write_gl_debug_cmd_buffer_with_size(args_size[i],
1465+ (void *) args[i]);
1466+#endif
1467+ break;
1468+
1469+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
1470+ {
1471+ args_size[i] =
1472+ compute_arg_length(stderr, func_number, i, args);
1473+ args[i] = (args_size[i]) ? (arg_t)
1474+ get_host_read_pointer(env,
1475+ args[i], args_size [i]) : 0;
1476+ if (args[i] == 0 && args_size[i] != 0) {
1477+ fprintf(stderr, "call %s arg %d pid=%d\n",
1478+ tab_opengl_calls_name[func_number], i, pid);
1479+ fprintf(stderr, "can not get %d bytes\n",
1480+ args_size[i]);
1481+ disconnect_current();
1482+ return 0;
1483+ }
1484+#ifdef ENABLE_GL_LOG
1485+ if (is_logging(pid))
1486+ write_gl_debug_cmd_buffer_without_size(args_size[i],
1487+ (void *) args[i]);
1488+#endif
1489+ break;
1490+ }
1491+
1492+ CASE_OUT_POINTERS:
1493+ {
1494+ int mem_state;
1495+
1496+#ifdef ENABLE_GL_LOG
1497+ if (is_logging(pid))
1498+ switch (args_type[i]) {
1499+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
1500+ write_gl_debug_cmd_int(args_size[i]);
1501+ break;
1502+
1503+ default:
1504+ break;
1505+ }
1506+#endif
1507+
1508+ if (func_number == glXQueryExtension_func && args[i] == 0) {
1509+ saved_out_ptr[i] = 0;
1510+ continue;
1511+ }
1512+ if (args[i] == 0 && args_size[i] == 0) {
1513+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
1514+ fprintf(stderr, "call %s arg %d pid=%d\n",
1515+ tab_opengl_calls_name[func_number], i,
1516+ pid);
1517+ disconnect_current();
1518+ return 0;
1519+ }
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+ } else if (args[i] == 0 && args_size[i] != 0) {
1525+ fprintf(stderr, "call %s arg %d pid=%d\n",
1526+ tab_opengl_calls_name[func_number], i, pid);
1527+ fprintf(stderr,
1528+ "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,
1535+ "args[i] != 0 && args_size[i] == 0 !!\n");
1536+ disconnect_current();
1537+ return 0;
1538+ }
1539+ if (args[i]) {
1540+ mem_state =
1541+ get_target_mem_state(env, args[i], args_size[i]);
1542+ if (mem_state == NOT_MAPPED) {
1543+ fprintf(stderr,
1544+ "call %s arg %d pid=%d addr="
1545+ TARGET_FMT_lx " size=%d NOT_MAPPED\n",
1546+ tab_opengl_calls_name[func_number], i,
1547+ pid, args[i], args_size[i]);
1548+ disconnect_current();
1549+ return 0;
1550+ } else if (mem_state == MAPPED_CONTIGUOUS) {
1551+ saved_out_ptr[i] = 0;
1552+ args[i] = (arg_t) get_phys_mem_addr(env, args[i]);
1553+ } else {
1554+ saved_out_ptr[i] = args[i];
1555+ args[i] = (arg_t) malloc(args_size[i]);
1556+ }
1557+ } else {
1558+ saved_out_ptr[i] = 0;
1559+ }
1560+ break;
1561+ }
1562+
1563+ case TYPE_DOUBLE:
1564+ CASE_IN_KNOWN_SIZE_POINTERS:
1565+ if (args[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+ tab_args_type_length[args_type[i]]);
1570+ disconnect_current();
1571+ return 0;
1572+ }
1573+ args[i] = (arg_t) get_host_read_pointer(env,
1574+ args[i], tab_args_type_length[args_type[i]]);
1575+ if (args[i] == 0) {
1576+ fprintf(stderr, "call %s arg %d pid=%d\n",
1577+ tab_opengl_calls_name[func_number], i, pid);
1578+ fprintf(stderr, "can not get %d bytes\n",
1579+ tab_args_type_length[args_type[i]]);
1580+ disconnect_current();
1581+ return 0;
1582+ }
1583+#ifdef ENABLE_GL_LOG
1584+ if (is_logging(pid))
1585+ write_gl_debug_cmd_buffer_without_size
1586+ (tab_args_type_length[args_type[i]],
1587+ (void *) args[i]);
1588+#endif
1589+ break;
1590+
1591+ case TYPE_IN_IGNORED_POINTER:
1592+ args[i] = 0;
1593+ break;
1594+
1595+ default:
1596+ fprintf(stderr, "shouldn't happen : call %s arg %d pid=%d\n",
1597+ tab_opengl_calls_name[func_number], i, pid);
1598+ disconnect_current();
1599+ return 0;
1600+ }
1601+ }
1602+
1603+ if (ret_type == TYPE_CONST_CHAR) {
1604+ ret_string[0] = 0;
1605+ }
1606+
1607+ if (func_number == _init32_func || func_number == _init64_func) {
1608+ if (func_number == _init32_func) {
1609+ if (!wordsize) {
1610+ wordsize = 32;
1611+ argcpy_target_to_host = memcpy_target32_to_host;
1612+ goto argcpy;
1613+ }
1614+
1615+ if (wordsize != 32) {
1616+ fprintf(stderr,
1617+ "clients with different ABIs not supported\n");
1618+ exit(-1);
1619+ }
1620+ } else {
1621+ if (!wordsize) {
1622+ wordsize = 64;
1623+ argcpy_target_to_host = memcpy_target64_to_host;
1624+ goto argcpy;
1625+ }
1626+
1627+ if (wordsize != 64) {
1628+ fprintf(stderr,
1629+ "clients with different ABIs not supported\n");
1630+ exit(-1);
1631+ }
1632+ }
1633+
1634+ if (must_save && args[0])
1635+ fprintf(stderr, "error: pid %i is already recording\n",
1636+ logger_pid);
1637+ else if (args[0]) {
1638+ logger_pid = pid;
1639+ must_save = 1;
1640+ }
1641+#ifdef USE_KQEMU
1642+ if (env->kqemu_enabled)
1643+ *(int *) args[1] = 2;
1644+ else
1645+#endif
1646+ *(int *) args[1] = 1;
1647+ ret = 0;
1648+ } else {
1649+ ret = do_function_call(func_number, args, ret_string);
1650+ }
1651+#ifdef ENABLE_GL_LOG
1652+ if (is_logging(pid) && func_number == glXGetVisualFromFBConfig_func)
1653+ write_gl_debug_cmd_int(ret);
1654+#endif
1655+ for (i = 0; i < nb_args; i++) {
1656+ switch (args_type[i]) {
1657+ CASE_OUT_POINTERS:
1658+ {
1659+ if (saved_out_ptr[i]) {
1660+ if (memcpy_host_to_target(env, saved_out_ptr[i],
1661+ (void *) args[i],
1662+ args_size[i]) == 0) {
1663+ fprintf(stderr, "could not copy out parameters "
1664+ "back to user space\n");
1665+ disconnect_current();
1666+ return 0;
1667+ }
1668+ free((void *) args[i]);
1669+ }
1670+ break;
1671+ }
1672+
1673+ default:
1674+ break;
1675+ }
1676+ }
1677+
1678+ if (ret_type == TYPE_CONST_CHAR)
1679+ if (target_ret_string) {
1680+ /* the my_strlen stuff is a hack to workaround a GCC bug if
1681+ * using directly strlen... */
1682+ if (memcpy_host_to_target(env, target_ret_string, ret_string,
1683+ my_strlen(ret_string) + 1) == 0) {
1684+ fprintf(stderr, "cannot copy out parameters "
1685+ "back to user space\n");
1686+ disconnect_current();
1687+ return 0;
1688+ }
1689+ }
1690+ }
1691+
1692+#ifdef ENABLE_GL_LOG
1693+ if (is_logging(pid) && func_number == _exit_process_func) {
1694+ write_gl_debug_end();
1695+ }
1696+#endif
1697+
1698+ return ret;
1699+}
1700+
1701+static int decode_call(CPUState *env, int func_number, int pid,
1702+ target_ulong target_ret_string, target_ulong in_args,
1703+ target_ulong in_args_size)
1704+{
1705+ if (!(func_number >= 0 && func_number < GL_N_CALLS)) {
1706+ fprintf(stderr,
1707+ "func_number >= 0 && func_number < GL_N_CALLS failed\n");
1708+ return 0;
1709+ }
1710+
1711+ return decode_call_int(env, func_number, pid,
1712+ target_ret_string, in_args, in_args_size);
1713+}
1714+
1715+void helper_opengl(void)
1716+{
1717+ doing_opengl = 1;
1718+ env->regs[R_EAX] =
1719+ decode_call(env, env->regs[R_EAX], env->regs[R_EBX], env->regs[R_ECX],
1720+ env->regs[R_EDX], env->regs[R_ESI]);
1721+ doing_opengl = 0;
1722+}
1723+#endif
1724Index: git/target-i386/mesa_enums.c
1725===================================================================
1726--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1727+++ git/target-i386/mesa_enums.c 2009-05-23 11:22:17.000000000 +0100
1728@@ -0,0 +1,4890 @@
1729+/* DO NOT EDIT - This file generated automatically by gl_enums.py (from Mesa) script */
1730+
1731+/*
1732+ * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
1733+ * All Rights Reserved.
1734+ *
1735+ * Permission is hereby granted, free of charge, to any person obtaining a
1736+ * copy of this software and associated documentation files (the "Software"),
1737+ * to deal in the Software without restriction, including without limitation
1738+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
1739+ * and/or sell copies of the Software, and to permit persons to whom the
1740+ * Software is furnished to do so, subject to the following conditions:
1741+ *
1742+ * The above copyright notice and this permission notice (including the next
1743+ * paragraph) shall be included in all copies or substantial portions of the
1744+ * Software.
1745+ *
1746+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1747+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1748+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
1749+ * BRIAN PAUL,
1750+ * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
1751+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
1752+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1753+ * SOFTWARE.
1754+ */
1755+
1756+#include "glheader.h"
1757+#include "enums.h"
1758+#include "imports.h"
1759+
1760+typedef struct {
1761+ size_t offset;
1762+ int n;
1763+} enum_elt;
1764+
1765+LONGSTRING static const char enum_string_table[] =
1766+ "GL_2D\0"
1767+ "GL_2_BYTES\0"
1768+ "GL_3D\0"
1769+ "GL_3D_COLOR\0"
1770+ "GL_3D_COLOR_TEXTURE\0"
1771+ "GL_3_BYTES\0"
1772+ "GL_4D_COLOR_TEXTURE\0"
1773+ "GL_4_BYTES\0"
1774+ "GL_ACCUM\0"
1775+ "GL_ACCUM_ALPHA_BITS\0"
1776+ "GL_ACCUM_BLUE_BITS\0"
1777+ "GL_ACCUM_BUFFER_BIT\0"
1778+ "GL_ACCUM_CLEAR_VALUE\0"
1779+ "GL_ACCUM_GREEN_BITS\0"
1780+ "GL_ACCUM_RED_BITS\0"
1781+ "GL_ACTIVE_ATTRIBUTES\0"
1782+ "GL_ACTIVE_ATTRIBUTE_MAX_LENGTH\0"
1783+ "GL_ACTIVE_STENCIL_FACE_EXT\0"
1784+ "GL_ACTIVE_TEXTURE\0"
1785+ "GL_ACTIVE_TEXTURE_ARB\0"
1786+ "GL_ACTIVE_UNIFORMS\0"
1787+ "GL_ACTIVE_UNIFORM_MAX_LENGTH\0"
1788+ "GL_ACTIVE_VERTEX_UNITS_ARB\0"
1789+ "GL_ADD\0"
1790+ "GL_ADD_SIGNED\0"
1791+ "GL_ADD_SIGNED_ARB\0"
1792+ "GL_ADD_SIGNED_EXT\0"
1793+ "GL_ALIASED_LINE_WIDTH_RANGE\0"
1794+ "GL_ALIASED_POINT_SIZE_RANGE\0"
1795+ "GL_ALL_ATTRIB_BITS\0"
1796+ "GL_ALL_CLIENT_ATTRIB_BITS\0"
1797+ "GL_ALPHA\0"
1798+ "GL_ALPHA12\0"
1799+ "GL_ALPHA12_EXT\0"
1800+ "GL_ALPHA16\0"
1801+ "GL_ALPHA16_EXT\0"
1802+ "GL_ALPHA4\0"
1803+ "GL_ALPHA4_EXT\0"
1804+ "GL_ALPHA8\0"
1805+ "GL_ALPHA8_EXT\0"
1806+ "GL_ALPHA_BIAS\0"
1807+ "GL_ALPHA_BITS\0"
1808+ "GL_ALPHA_SCALE\0"
1809+ "GL_ALPHA_TEST\0"
1810+ "GL_ALPHA_TEST_FUNC\0"
1811+ "GL_ALPHA_TEST_REF\0"
1812+ "GL_ALWAYS\0"
1813+ "GL_AMBIENT\0"
1814+ "GL_AMBIENT_AND_DIFFUSE\0"
1815+ "GL_AND\0"
1816+ "GL_AND_INVERTED\0"
1817+ "GL_AND_REVERSE\0"
1818+ "GL_ARRAY_BUFFER\0"
1819+ "GL_ARRAY_BUFFER_ARB\0"
1820+ "GL_ARRAY_BUFFER_BINDING\0"
1821+ "GL_ARRAY_BUFFER_BINDING_ARB\0"
1822+ "GL_ATTACHED_SHADERS\0"
1823+ "GL_ATTRIB_ARRAY_POINTER_NV\0"
1824+ "GL_ATTRIB_ARRAY_SIZE_NV\0"
1825+ "GL_ATTRIB_ARRAY_STRIDE_NV\0"
1826+ "GL_ATTRIB_ARRAY_TYPE_NV\0"
1827+ "GL_ATTRIB_STACK_DEPTH\0"
1828+ "GL_AUTO_NORMAL\0"
1829+ "GL_AUX0\0"
1830+ "GL_AUX1\0"
1831+ "GL_AUX2\0"
1832+ "GL_AUX3\0"
1833+ "GL_AUX_BUFFERS\0"
1834+ "GL_BACK\0"
1835+ "GL_BACK_LEFT\0"
1836+ "GL_BACK_RIGHT\0"
1837+ "GL_BGR\0"
1838+ "GL_BGRA\0"
1839+ "GL_BITMAP\0"
1840+ "GL_BITMAP_TOKEN\0"
1841+ "GL_BLEND\0"
1842+ "GL_BLEND_COLOR\0"
1843+ "GL_BLEND_COLOR_EXT\0"
1844+ "GL_BLEND_DST\0"
1845+ "GL_BLEND_DST_ALPHA\0"
1846+ "GL_BLEND_DST_RGB\0"
1847+ "GL_BLEND_EQUATION\0"
1848+ "GL_BLEND_EQUATION_ALPHA\0"
1849+ "GL_BLEND_EQUATION_ALPHA_EXT\0"
1850+ "GL_BLEND_EQUATION_EXT\0"
1851+ "GL_BLEND_EQUATION_RGB_EXT\0"
1852+ "GL_BLEND_SRC\0"
1853+ "GL_BLEND_SRC_ALPHA\0"
1854+ "GL_BLEND_SRC_RGB\0"
1855+ "GL_BLUE\0"
1856+ "GL_BLUE_BIAS\0"
1857+ "GL_BLUE_BITS\0"
1858+ "GL_BLUE_SCALE\0"
1859+ "GL_BOOL\0"
1860+ "GL_BOOL_ARB\0"
1861+ "GL_BOOL_VEC2\0"
1862+ "GL_BOOL_VEC2_ARB\0"
1863+ "GL_BOOL_VEC3\0"
1864+ "GL_BOOL_VEC3_ARB\0"
1865+ "GL_BOOL_VEC4\0"
1866+ "GL_BOOL_VEC4_ARB\0"
1867+ "GL_BUFFER_ACCESS\0"
1868+ "GL_BUFFER_ACCESS_ARB\0"
1869+ "GL_BUFFER_MAPPED\0"
1870+ "GL_BUFFER_MAPPED_ARB\0"
1871+ "GL_BUFFER_MAP_POINTER\0"
1872+ "GL_BUFFER_MAP_POINTER_ARB\0"
1873+ "GL_BUFFER_SIZE\0"
1874+ "GL_BUFFER_SIZE_ARB\0"
1875+ "GL_BUFFER_USAGE\0"
1876+ "GL_BUFFER_USAGE_ARB\0"
1877+ "GL_BYTE\0"
1878+ "GL_C3F_V3F\0"
1879+ "GL_C4F_N3F_V3F\0"
1880+ "GL_C4UB_V2F\0"
1881+ "GL_C4UB_V3F\0"
1882+ "GL_CCW\0"
1883+ "GL_CLAMP\0"
1884+ "GL_CLAMP_TO_BORDER\0"
1885+ "GL_CLAMP_TO_BORDER_ARB\0"
1886+ "GL_CLAMP_TO_BORDER_SGIS\0"
1887+ "GL_CLAMP_TO_EDGE\0"
1888+ "GL_CLAMP_TO_EDGE_SGIS\0"
1889+ "GL_CLEAR\0"
1890+ "GL_CLIENT_ACTIVE_TEXTURE\0"
1891+ "GL_CLIENT_ACTIVE_TEXTURE_ARB\0"
1892+ "GL_CLIENT_ALL_ATTRIB_BITS\0"
1893+ "GL_CLIENT_ATTRIB_STACK_DEPTH\0"
1894+ "GL_CLIENT_PIXEL_STORE_BIT\0"
1895+ "GL_CLIENT_VERTEX_ARRAY_BIT\0"
1896+ "GL_CLIP_PLANE0\0"
1897+ "GL_CLIP_PLANE1\0"
1898+ "GL_CLIP_PLANE2\0"
1899+ "GL_CLIP_PLANE3\0"
1900+ "GL_CLIP_PLANE4\0"
1901+ "GL_CLIP_PLANE5\0"
1902+ "GL_CLIP_VOLUME_CLIPPING_HINT_EXT\0"
1903+ "GL_COEFF\0"
1904+ "GL_COLOR\0"
1905+ "GL_COLOR_ARRAY\0"
1906+ "GL_COLOR_ARRAY_BUFFER_BINDING\0"
1907+ "GL_COLOR_ARRAY_BUFFER_BINDING_ARB\0"
1908+ "GL_COLOR_ARRAY_POINTER\0"
1909+ "GL_COLOR_ARRAY_SIZE\0"
1910+ "GL_COLOR_ARRAY_STRIDE\0"
1911+ "GL_COLOR_ARRAY_TYPE\0"
1912+ "GL_COLOR_ATTACHMENT0_EXT\0"
1913+ "GL_COLOR_ATTACHMENT10_EXT\0"
1914+ "GL_COLOR_ATTACHMENT11_EXT\0"
1915+ "GL_COLOR_ATTACHMENT12_EXT\0"
1916+ "GL_COLOR_ATTACHMENT13_EXT\0"
1917+ "GL_COLOR_ATTACHMENT14_EXT\0"
1918+ "GL_COLOR_ATTACHMENT15_EXT\0"
1919+ "GL_COLOR_ATTACHMENT1_EXT\0"
1920+ "GL_COLOR_ATTACHMENT2_EXT\0"
1921+ "GL_COLOR_ATTACHMENT3_EXT\0"
1922+ "GL_COLOR_ATTACHMENT4_EXT\0"
1923+ "GL_COLOR_ATTACHMENT5_EXT\0"
1924+ "GL_COLOR_ATTACHMENT6_EXT\0"
1925+ "GL_COLOR_ATTACHMENT7_EXT\0"
1926+ "GL_COLOR_ATTACHMENT8_EXT\0"
1927+ "GL_COLOR_ATTACHMENT9_EXT\0"
1928+ "GL_COLOR_BUFFER_BIT\0"
1929+ "GL_COLOR_CLEAR_VALUE\0"
1930+ "GL_COLOR_INDEX\0"
1931+ "GL_COLOR_INDEXES\0"
1932+ "GL_COLOR_LOGIC_OP\0"
1933+ "GL_COLOR_MATERIAL\0"
1934+ "GL_COLOR_MATERIAL_FACE\0"
1935+ "GL_COLOR_MATERIAL_PARAMETER\0"
1936+ "GL_COLOR_MATRIX\0"
1937+ "GL_COLOR_MATRIX_SGI\0"
1938+ "GL_COLOR_MATRIX_STACK_DEPTH\0"
1939+ "GL_COLOR_MATRIX_STACK_DEPTH_SGI\0"
1940+ "GL_COLOR_SUM\0"
1941+ "GL_COLOR_SUM_ARB\0"
1942+ "GL_COLOR_TABLE\0"
1943+ "GL_COLOR_TABLE_ALPHA_SIZE\0"
1944+ "GL_COLOR_TABLE_ALPHA_SIZE_EXT\0"
1945+ "GL_COLOR_TABLE_ALPHA_SIZE_SGI\0"
1946+ "GL_COLOR_TABLE_BIAS\0"
1947+ "GL_COLOR_TABLE_BIAS_SGI\0"
1948+ "GL_COLOR_TABLE_BLUE_SIZE\0"
1949+ "GL_COLOR_TABLE_BLUE_SIZE_EXT\0"
1950+ "GL_COLOR_TABLE_BLUE_SIZE_SGI\0"
1951+ "GL_COLOR_TABLE_FORMAT\0"
1952+ "GL_COLOR_TABLE_FORMAT_EXT\0"
1953+ "GL_COLOR_TABLE_FORMAT_SGI\0"
1954+ "GL_COLOR_TABLE_GREEN_SIZE\0"
1955+ "GL_COLOR_TABLE_GREEN_SIZE_EXT\0"
1956+ "GL_COLOR_TABLE_GREEN_SIZE_SGI\0"
1957+ "GL_COLOR_TABLE_INTENSITY_SIZE\0"
1958+ "GL_COLOR_TABLE_INTENSITY_SIZE_EXT\0"
1959+ "GL_COLOR_TABLE_INTENSITY_SIZE_SGI\0"
1960+ "GL_COLOR_TABLE_LUMINANCE_SIZE\0"
1961+ "GL_COLOR_TABLE_LUMINANCE_SIZE_EXT\0"
1962+ "GL_COLOR_TABLE_LUMINANCE_SIZE_SGI\0"
1963+ "GL_COLOR_TABLE_RED_SIZE\0"
1964+ "GL_COLOR_TABLE_RED_SIZE_EXT\0"
1965+ "GL_COLOR_TABLE_RED_SIZE_SGI\0"
1966+ "GL_COLOR_TABLE_SCALE\0"
1967+ "GL_COLOR_TABLE_SCALE_SGI\0"
1968+ "GL_COLOR_TABLE_WIDTH\0"
1969+ "GL_COLOR_TABLE_WIDTH_EXT\0"
1970+ "GL_COLOR_TABLE_WIDTH_SGI\0"
1971+ "GL_COLOR_WRITEMASK\0"
1972+ "GL_COMBINE\0"
1973+ "GL_COMBINE4\0"
1974+ "GL_COMBINE_ALPHA\0"
1975+ "GL_COMBINE_ALPHA_ARB\0"
1976+ "GL_COMBINE_ALPHA_EXT\0"
1977+ "GL_COMBINE_ARB\0"
1978+ "GL_COMBINE_EXT\0"
1979+ "GL_COMBINE_RGB\0"
1980+ "GL_COMBINE_RGB_ARB\0"
1981+ "GL_COMBINE_RGB_EXT\0"
1982+ "GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT\0"
1983+ "GL_COMPARE_R_TO_TEXTURE\0"
1984+ "GL_COMPARE_R_TO_TEXTURE_ARB\0"
1985+ "GL_COMPILE\0"
1986+ "GL_COMPILE_AND_EXECUTE\0"
1987+ "GL_COMPILE_STATUS\0"
1988+ "GL_COMPRESSED_ALPHA\0"
1989+ "GL_COMPRESSED_ALPHA_ARB\0"
1990+ "GL_COMPRESSED_INTENSITY\0"
1991+ "GL_COMPRESSED_INTENSITY_ARB\0"
1992+ "GL_COMPRESSED_LUMINANCE\0"
1993+ "GL_COMPRESSED_LUMINANCE_ALPHA\0"
1994+ "GL_COMPRESSED_LUMINANCE_ALPHA_ARB\0"
1995+ "GL_COMPRESSED_LUMINANCE_ARB\0"
1996+ "GL_COMPRESSED_RGB\0"
1997+ "GL_COMPRESSED_RGBA\0"
1998+ "GL_COMPRESSED_RGBA_ARB\0"
1999+ "GL_COMPRESSED_RGBA_FXT1_3DFX\0"
2000+ "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT\0"
2001+ "GL_COMPRESSED_RGBA_S3TC_DXT3_EXT\0"
2002+ "GL_COMPRESSED_RGBA_S3TC_DXT5_EXT\0"
2003+ "GL_COMPRESSED_RGB_ARB\0"
2004+ "GL_COMPRESSED_RGB_FXT1_3DFX\0"
2005+ "GL_COMPRESSED_RGB_S3TC_DXT1_EXT\0"
2006+ "GL_COMPRESSED_TEXTURE_FORMATS\0"
2007+ "GL_CONSTANT\0"
2008+ "GL_CONSTANT_ALPHA\0"
2009+ "GL_CONSTANT_ALPHA_EXT\0"
2010+ "GL_CONSTANT_ARB\0"
2011+ "GL_CONSTANT_ATTENUATION\0"
2012+ "GL_CONSTANT_BORDER_HP\0"
2013+ "GL_CONSTANT_COLOR\0"
2014+ "GL_CONSTANT_COLOR_EXT\0"
2015+ "GL_CONSTANT_EXT\0"
2016+ "GL_CONVOLUTION_1D\0"
2017+ "GL_CONVOLUTION_2D\0"
2018+ "GL_CONVOLUTION_BORDER_COLOR\0"
2019+ "GL_CONVOLUTION_BORDER_COLOR_HP\0"
2020+ "GL_CONVOLUTION_BORDER_MODE\0"
2021+ "GL_CONVOLUTION_BORDER_MODE_EXT\0"
2022+ "GL_CONVOLUTION_FILTER_BIAS\0"
2023+ "GL_CONVOLUTION_FILTER_BIAS_EXT\0"
2024+ "GL_CONVOLUTION_FILTER_SCALE\0"
2025+ "GL_CONVOLUTION_FILTER_SCALE_EXT\0"
2026+ "GL_CONVOLUTION_FORMAT\0"
2027+ "GL_CONVOLUTION_FORMAT_EXT\0"
2028+ "GL_CONVOLUTION_HEIGHT\0"
2029+ "GL_CONVOLUTION_HEIGHT_EXT\0"
2030+ "GL_CONVOLUTION_WIDTH\0"
2031+ "GL_CONVOLUTION_WIDTH_EXT\0"
2032+ "GL_COORD_REPLACE\0"
2033+ "GL_COORD_REPLACE_ARB\0"
2034+ "GL_COORD_REPLACE_NV\0"
2035+ "GL_COPY\0"
2036+ "GL_COPY_INVERTED\0"
2037+ "GL_COPY_PIXEL_TOKEN\0"
2038+ "GL_CULL_FACE\0"
2039+ "GL_CULL_FACE_MODE\0"
2040+ "GL_CULL_VERTEX_EXT\0"
2041+ "GL_CULL_VERTEX_EYE_POSITION_EXT\0"
2042+ "GL_CULL_VERTEX_OBJECT_POSITION_EXT\0"
2043+ "GL_CURRENT_ATTRIB_NV\0"
2044+ "GL_CURRENT_BIT\0"
2045+ "GL_CURRENT_COLOR\0"
2046+ "GL_CURRENT_FOG_COORD\0"
2047+ "GL_CURRENT_FOG_COORDINATE\0"
2048+ "GL_CURRENT_INDEX\0"
2049+ "GL_CURRENT_MATRIX_ARB\0"
2050+ "GL_CURRENT_MATRIX_INDEX_ARB\0"
2051+ "GL_CURRENT_MATRIX_NV\0"
2052+ "GL_CURRENT_MATRIX_STACK_DEPTH_ARB\0"
2053+ "GL_CURRENT_MATRIX_STACK_DEPTH_NV\0"
2054+ "GL_CURRENT_NORMAL\0"
2055+ "GL_CURRENT_PALETTE_MATRIX_ARB\0"
2056+ "GL_CURRENT_PROGRAM\0"
2057+ "GL_CURRENT_QUERY\0"
2058+ "GL_CURRENT_QUERY_ARB\0"
2059+ "GL_CURRENT_RASTER_COLOR\0"
2060+ "GL_CURRENT_RASTER_DISTANCE\0"
2061+ "GL_CURRENT_RASTER_INDEX\0"
2062+ "GL_CURRENT_RASTER_POSITION\0"
2063+ "GL_CURRENT_RASTER_POSITION_VALID\0"
2064+ "GL_CURRENT_RASTER_TEXTURE_COORDS\0"
2065+ "GL_CURRENT_SECONDARY_COLOR\0"
2066+ "GL_CURRENT_TEXTURE_COORDS\0"
2067+ "GL_CURRENT_VERTEX_ATTRIB\0"
2068+ "GL_CURRENT_VERTEX_ATTRIB_ARB\0"
2069+ "GL_CURRENT_WEIGHT_ARB\0"
2070+ "GL_CW\0"
2071+ "GL_DEBUG_ASSERT_MESA\0"
2072+ "GL_DEBUG_OBJECT_MESA\0"
2073+ "GL_DEBUG_PRINT_MESA\0"
2074+ "GL_DECAL\0"
2075+ "GL_DECR\0"
2076+ "GL_DECR_WRAP\0"
2077+ "GL_DECR_WRAP_EXT\0"
2078+ "GL_DELETE_STATUS\0"
2079+ "GL_DEPTH\0"
2080+ "GL_DEPTH_ATTACHMENT_EXT\0"
2081+ "GL_DEPTH_BIAS\0"
2082+ "GL_DEPTH_BITS\0"
2083+ "GL_DEPTH_BOUNDS_EXT\0"
2084+ "GL_DEPTH_BOUNDS_TEST_EXT\0"
2085+ "GL_DEPTH_BUFFER_BIT\0"
2086+ "GL_DEPTH_CLAMP_NV\0"
2087+ "GL_DEPTH_CLEAR_VALUE\0"
2088+ "GL_DEPTH_COMPONENT\0"
2089+ "GL_DEPTH_COMPONENT16\0"
2090+ "GL_DEPTH_COMPONENT16_ARB\0"
2091+ "GL_DEPTH_COMPONENT16_SGIX\0"
2092+ "GL_DEPTH_COMPONENT24\0"
2093+ "GL_DEPTH_COMPONENT24_ARB\0"
2094+ "GL_DEPTH_COMPONENT24_SGIX\0"
2095+ "GL_DEPTH_COMPONENT32\0"
2096+ "GL_DEPTH_COMPONENT32_ARB\0"
2097+ "GL_DEPTH_COMPONENT32_SGIX\0"
2098+ "GL_DEPTH_FUNC\0"
2099+ "GL_DEPTH_RANGE\0"
2100+ "GL_DEPTH_SCALE\0"
2101+ "GL_DEPTH_STENCIL_NV\0"
2102+ "GL_DEPTH_STENCIL_TO_BGRA_NV\0"
2103+ "GL_DEPTH_STENCIL_TO_RGBA_NV\0"
2104+ "GL_DEPTH_TEST\0"
2105+ "GL_DEPTH_TEXTURE_MODE\0"
2106+ "GL_DEPTH_TEXTURE_MODE_ARB\0"
2107+ "GL_DEPTH_WRITEMASK\0"
2108+ "GL_DIFFUSE\0"
2109+ "GL_DITHER\0"
2110+ "GL_DOMAIN\0"
2111+ "GL_DONT_CARE\0"
2112+ "GL_DOT3_RGB\0"
2113+ "GL_DOT3_RGBA\0"
2114+ "GL_DOT3_RGBA_ARB\0"
2115+ "GL_DOT3_RGBA_EXT\0"
2116+ "GL_DOT3_RGB_ARB\0"
2117+ "GL_DOT3_RGB_EXT\0"
2118+ "GL_DOUBLE\0"
2119+ "GL_DOUBLEBUFFER\0"
2120+ "GL_DRAW_BUFFER\0"
2121+ "GL_DRAW_BUFFER0\0"
2122+ "GL_DRAW_BUFFER0_ARB\0"
2123+ "GL_DRAW_BUFFER0_ATI\0"
2124+ "GL_DRAW_BUFFER1\0"
2125+ "GL_DRAW_BUFFER10\0"
2126+ "GL_DRAW_BUFFER10_ARB\0"
2127+ "GL_DRAW_BUFFER10_ATI\0"
2128+ "GL_DRAW_BUFFER11\0"
2129+ "GL_DRAW_BUFFER11_ARB\0"
2130+ "GL_DRAW_BUFFER11_ATI\0"
2131+ "GL_DRAW_BUFFER12\0"
2132+ "GL_DRAW_BUFFER12_ARB\0"
2133+ "GL_DRAW_BUFFER12_ATI\0"
2134+ "GL_DRAW_BUFFER13\0"
2135+ "GL_DRAW_BUFFER13_ARB\0"
2136+ "GL_DRAW_BUFFER13_ATI\0"
2137+ "GL_DRAW_BUFFER14\0"
2138+ "GL_DRAW_BUFFER14_ARB\0"
2139+ "GL_DRAW_BUFFER14_ATI\0"
2140+ "GL_DRAW_BUFFER15\0"
2141+ "GL_DRAW_BUFFER15_ARB\0"
2142+ "GL_DRAW_BUFFER15_ATI\0"
2143+ "GL_DRAW_BUFFER1_ARB\0"
2144+ "GL_DRAW_BUFFER1_ATI\0"
2145+ "GL_DRAW_BUFFER2\0"
2146+ "GL_DRAW_BUFFER2_ARB\0"
2147+ "GL_DRAW_BUFFER2_ATI\0"
2148+ "GL_DRAW_BUFFER3\0"
2149+ "GL_DRAW_BUFFER3_ARB\0"
2150+ "GL_DRAW_BUFFER3_ATI\0"
2151+ "GL_DRAW_BUFFER4\0"
2152+ "GL_DRAW_BUFFER4_ARB\0"
2153+ "GL_DRAW_BUFFER4_ATI\0"
2154+ "GL_DRAW_BUFFER5\0"
2155+ "GL_DRAW_BUFFER5_ARB\0"
2156+ "GL_DRAW_BUFFER5_ATI\0"
2157+ "GL_DRAW_BUFFER6\0"
2158+ "GL_DRAW_BUFFER6_ARB\0"
2159+ "GL_DRAW_BUFFER6_ATI\0"
2160+ "GL_DRAW_BUFFER7\0"
2161+ "GL_DRAW_BUFFER7_ARB\0"
2162+ "GL_DRAW_BUFFER7_ATI\0"
2163+ "GL_DRAW_BUFFER8\0"
2164+ "GL_DRAW_BUFFER8_ARB\0"
2165+ "GL_DRAW_BUFFER8_ATI\0"
2166+ "GL_DRAW_BUFFER9\0"
2167+ "GL_DRAW_BUFFER9_ARB\0"
2168+ "GL_DRAW_BUFFER9_ATI\0"
2169+ "GL_DRAW_FRAMEBUFFER_BINDING_EXT\0"
2170+ "GL_DRAW_FRAMEBUFFER_EXT\0"
2171+ "GL_DRAW_PIXEL_TOKEN\0"
2172+ "GL_DST_ALPHA\0"
2173+ "GL_DST_COLOR\0"
2174+ "GL_DYNAMIC_COPY\0"
2175+ "GL_DYNAMIC_COPY_ARB\0"
2176+ "GL_DYNAMIC_DRAW\0"
2177+ "GL_DYNAMIC_DRAW_ARB\0"
2178+ "GL_DYNAMIC_READ\0"
2179+ "GL_DYNAMIC_READ_ARB\0"
2180+ "GL_EDGE_FLAG\0"
2181+ "GL_EDGE_FLAG_ARRAY\0"
2182+ "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING\0"
2183+ "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB\0"
2184+ "GL_EDGE_FLAG_ARRAY_POINTER\0"
2185+ "GL_EDGE_FLAG_ARRAY_STRIDE\0"
2186+ "GL_ELEMENT_ARRAY_BUFFER\0"
2187+ "GL_ELEMENT_ARRAY_BUFFER_ARB\0"
2188+ "GL_ELEMENT_ARRAY_BUFFER_BINDING\0"
2189+ "GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB\0"
2190+ "GL_EMISSION\0"
2191+ "GL_ENABLE_BIT\0"
2192+ "GL_EQUAL\0"
2193+ "GL_EQUIV\0"
2194+ "GL_EVAL_BIT\0"
2195+ "GL_EXP\0"
2196+ "GL_EXP2\0"
2197+ "GL_EXTENSIONS\0"
2198+ "GL_EYE_LINEAR\0"
2199+ "GL_EYE_PLANE\0"
2200+ "GL_EYE_PLANE_ABSOLUTE_NV\0"
2201+ "GL_EYE_RADIAL_NV\0"
2202+ "GL_FALSE\0"
2203+ "GL_FASTEST\0"
2204+ "GL_FEEDBACK\0"
2205+ "GL_FEEDBACK_BUFFER_POINTER\0"
2206+ "GL_FEEDBACK_BUFFER_SIZE\0"
2207+ "GL_FEEDBACK_BUFFER_TYPE\0"
2208+ "GL_FILL\0"
2209+ "GL_FLAT\0"
2210+ "GL_FLOAT\0"
2211+ "GL_FLOAT_MAT2\0"
2212+ "GL_FLOAT_MAT2_ARB\0"
2213+ "GL_FLOAT_MAT3\0"
2214+ "GL_FLOAT_MAT3_ARB\0"
2215+ "GL_FLOAT_MAT4\0"
2216+ "GL_FLOAT_MAT4_ARB\0"
2217+ "GL_FLOAT_VEC2\0"
2218+ "GL_FLOAT_VEC2_ARB\0"
2219+ "GL_FLOAT_VEC3\0"
2220+ "GL_FLOAT_VEC3_ARB\0"
2221+ "GL_FLOAT_VEC4\0"
2222+ "GL_FLOAT_VEC4_ARB\0"
2223+ "GL_FOG\0"
2224+ "GL_FOG_BIT\0"
2225+ "GL_FOG_COLOR\0"
2226+ "GL_FOG_COORD\0"
2227+ "GL_FOG_COORDINATE\0"
2228+ "GL_FOG_COORDINATE_ARRAY\0"
2229+ "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING\0"
2230+ "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB\0"
2231+ "GL_FOG_COORDINATE_ARRAY_POINTER\0"
2232+ "GL_FOG_COORDINATE_ARRAY_STRIDE\0"
2233+ "GL_FOG_COORDINATE_ARRAY_TYPE\0"
2234+ "GL_FOG_COORDINATE_SOURCE\0"
2235+ "GL_FOG_COORD_ARRAY\0"
2236+ "GL_FOG_COORD_ARRAY_BUFFER_BINDING\0"
2237+ "GL_FOG_COORD_ARRAY_POINTER\0"
2238+ "GL_FOG_COORD_ARRAY_STRIDE\0"
2239+ "GL_FOG_COORD_ARRAY_TYPE\0"
2240+ "GL_FOG_COORD_SRC\0"
2241+ "GL_FOG_DENSITY\0"
2242+ "GL_FOG_DISTANCE_MODE_NV\0"
2243+ "GL_FOG_END\0"
2244+ "GL_FOG_HINT\0"
2245+ "GL_FOG_INDEX\0"
2246+ "GL_FOG_MODE\0"
2247+ "GL_FOG_OFFSET_SGIX\0"
2248+ "GL_FOG_OFFSET_VALUE_SGIX\0"
2249+ "GL_FOG_START\0"
2250+ "GL_FRAGMENT_DEPTH\0"
2251+ "GL_FRAGMENT_PROGRAM_ARB\0"
2252+ "GL_FRAGMENT_SHADER\0"
2253+ "GL_FRAGMENT_SHADER_ARB\0"
2254+ "GL_FRAGMENT_SHADER_DERIVATIVE_HINT\0"
2255+ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT\0"
2256+ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT\0"
2257+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT\0"
2258+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT\0"
2259+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT\0"
2260+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT\0"
2261+ "GL_FRAMEBUFFER_BINDING_EXT\0"
2262+ "GL_FRAMEBUFFER_COMPLETE_EXT\0"
2263+ "GL_FRAMEBUFFER_EXT\0"
2264+ "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT\0"
2265+ "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT\0"
2266+ "GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT\0"
2267+ "GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT\0"
2268+ "GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT\0"
2269+ "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT\0"
2270+ "GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT\0"
2271+ "GL_FRAMEBUFFER_STATUS_ERROR_EXT\0"
2272+ "GL_FRAMEBUFFER_UNSUPPORTED_EXT\0"
2273+ "GL_FRONT\0"
2274+ "GL_FRONT_AND_BACK\0"
2275+ "GL_FRONT_FACE\0"
2276+ "GL_FRONT_LEFT\0"
2277+ "GL_FRONT_RIGHT\0"
2278+ "GL_FUNC_ADD\0"
2279+ "GL_FUNC_ADD_EXT\0"
2280+ "GL_FUNC_REVERSE_SUBTRACT\0"
2281+ "GL_FUNC_REVERSE_SUBTRACT_EXT\0"
2282+ "GL_FUNC_SUBTRACT\0"
2283+ "GL_FUNC_SUBTRACT_EXT\0"
2284+ "GL_GENERATE_MIPMAP\0"
2285+ "GL_GENERATE_MIPMAP_HINT\0"
2286+ "GL_GENERATE_MIPMAP_HINT_SGIS\0"
2287+ "GL_GENERATE_MIPMAP_SGIS\0"
2288+ "GL_GEQUAL\0"
2289+ "GL_GL_BLEND_EQUATION_RGB\0"
2290+ "GL_GL_COMPRESSED_SLUMINANCE\0"
2291+ "GL_GL_COMPRESSED_SLUMINANCE_ALPHA\0"
2292+ "GL_GL_COMPRESSED_SRGB\0"
2293+ "GL_GL_COMPRESSED_SRGB_ALPHA\0"
2294+ "GL_GL_CURRENT_RASTER_SECONDARY_COLOR\0"
2295+ "GL_GL_FLOAT_MAT2x3\0"
2296+ "GL_GL_FLOAT_MAT2x4\0"
2297+ "GL_GL_FLOAT_MAT3x2\0"
2298+ "GL_GL_FLOAT_MAT3x4\0"
2299+ "GL_GL_FLOAT_MAT4x2\0"
2300+ "GL_GL_FLOAT_MAT4x3\0"
2301+ "GL_GL_PIXEL_PACK_BUFFER\0"
2302+ "GL_GL_PIXEL_PACK_BUFFER_BINDING\0"
2303+ "GL_GL_PIXEL_UNPACK_BUFFER\0"
2304+ "GL_GL_PIXEL_UNPACK_BUFFER_BINDING\0"
2305+ "GL_GL_SLUMINANCE\0"
2306+ "GL_GL_SLUMINANCE8\0"
2307+ "GL_GL_SLUMINANCE8_ALPHA8\0"
2308+ "GL_GL_SLUMINANCE_ALPHA\0"
2309+ "GL_GL_SRGB\0"
2310+ "GL_GL_SRGB8\0"
2311+ "GL_GL_SRGB8_ALPHA8\0"
2312+ "GL_GL_SRGB_ALPHA\0"
2313+ "GL_GREATER\0"
2314+ "GL_GREEN\0"
2315+ "GL_GREEN_BIAS\0"
2316+ "GL_GREEN_BITS\0"
2317+ "GL_GREEN_SCALE\0"
2318+ "GL_HINT_BIT\0"
2319+ "GL_HISTOGRAM\0"
2320+ "GL_HISTOGRAM_ALPHA_SIZE\0"
2321+ "GL_HISTOGRAM_ALPHA_SIZE_EXT\0"
2322+ "GL_HISTOGRAM_BLUE_SIZE\0"
2323+ "GL_HISTOGRAM_BLUE_SIZE_EXT\0"
2324+ "GL_HISTOGRAM_EXT\0"
2325+ "GL_HISTOGRAM_FORMAT\0"
2326+ "GL_HISTOGRAM_FORMAT_EXT\0"
2327+ "GL_HISTOGRAM_GREEN_SIZE\0"
2328+ "GL_HISTOGRAM_GREEN_SIZE_EXT\0"
2329+ "GL_HISTOGRAM_LUMINANCE_SIZE\0"
2330+ "GL_HISTOGRAM_LUMINANCE_SIZE_EXT\0"
2331+ "GL_HISTOGRAM_RED_SIZE\0"
2332+ "GL_HISTOGRAM_RED_SIZE_EXT\0"
2333+ "GL_HISTOGRAM_SINK\0"
2334+ "GL_HISTOGRAM_SINK_EXT\0"
2335+ "GL_HISTOGRAM_WIDTH\0"
2336+ "GL_HISTOGRAM_WIDTH_EXT\0"
2337+ "GL_IDENTITY_NV\0"
2338+ "GL_IGNORE_BORDER_HP\0"
2339+ "GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES\0"
2340+ "GL_IMPLEMENTATION_COLOR_READ_TYPE_OES\0"
2341+ "GL_INCR\0"
2342+ "GL_INCR_WRAP\0"
2343+ "GL_INCR_WRAP_EXT\0"
2344+ "GL_INDEX_ARRAY\0"
2345+ "GL_INDEX_ARRAY_BUFFER_BINDING\0"
2346+ "GL_INDEX_ARRAY_BUFFER_BINDING_ARB\0"
2347+ "GL_INDEX_ARRAY_POINTER\0"
2348+ "GL_INDEX_ARRAY_STRIDE\0"
2349+ "GL_INDEX_ARRAY_TYPE\0"
2350+ "GL_INDEX_BITS\0"
2351+ "GL_INDEX_CLEAR_VALUE\0"
2352+ "GL_INDEX_LOGIC_OP\0"
2353+ "GL_INDEX_MODE\0"
2354+ "GL_INDEX_OFFSET\0"
2355+ "GL_INDEX_SHIFT\0"
2356+ "GL_INDEX_WRITEMASK\0"
2357+ "GL_INFO_LOG_LENGTH\0"
2358+ "GL_INT\0"
2359+ "GL_INTENSITY\0"
2360+ "GL_INTENSITY12\0"
2361+ "GL_INTENSITY12_EXT\0"
2362+ "GL_INTENSITY16\0"
2363+ "GL_INTENSITY16_EXT\0"
2364+ "GL_INTENSITY4\0"
2365+ "GL_INTENSITY4_EXT\0"
2366+ "GL_INTENSITY8\0"
2367+ "GL_INTENSITY8_EXT\0"
2368+ "GL_INTENSITY_EXT\0"
2369+ "GL_INTERPOLATE\0"
2370+ "GL_INTERPOLATE_ARB\0"
2371+ "GL_INTERPOLATE_EXT\0"
2372+ "GL_INT_VEC2\0"
2373+ "GL_INT_VEC2_ARB\0"
2374+ "GL_INT_VEC3\0"
2375+ "GL_INT_VEC3_ARB\0"
2376+ "GL_INT_VEC4\0"
2377+ "GL_INT_VEC4_ARB\0"
2378+ "GL_INVALID_ENUM\0"
2379+ "GL_INVALID_FRAMEBUFFER_OPERATION_EXT\0"
2380+ "GL_INVALID_OPERATION\0"
2381+ "GL_INVALID_VALUE\0"
2382+ "GL_INVERSE_NV\0"
2383+ "GL_INVERSE_TRANSPOSE_NV\0"
2384+ "GL_INVERT\0"
2385+ "GL_KEEP\0"
2386+ "GL_LEFT\0"
2387+ "GL_LEQUAL\0"
2388+ "GL_LESS\0"
2389+ "GL_LIGHT0\0"
2390+ "GL_LIGHT1\0"
2391+ "GL_LIGHT2\0"
2392+ "GL_LIGHT3\0"
2393+ "GL_LIGHT4\0"
2394+ "GL_LIGHT5\0"
2395+ "GL_LIGHT6\0"
2396+ "GL_LIGHT7\0"
2397+ "GL_LIGHTING\0"
2398+ "GL_LIGHTING_BIT\0"
2399+ "GL_LIGHT_MODEL_AMBIENT\0"
2400+ "GL_LIGHT_MODEL_COLOR_CONTROL\0"
2401+ "GL_LIGHT_MODEL_COLOR_CONTROL_EXT\0"
2402+ "GL_LIGHT_MODEL_LOCAL_VIEWER\0"
2403+ "GL_LIGHT_MODEL_TWO_SIDE\0"
2404+ "GL_LINE\0"
2405+ "GL_LINEAR\0"
2406+ "GL_LINEAR_ATTENUATION\0"
2407+ "GL_LINEAR_CLIPMAP_LINEAR_SGIX\0"
2408+ "GL_LINEAR_CLIPMAP_NEAREST_SGIX\0"
2409+ "GL_LINEAR_MIPMAP_LINEAR\0"
2410+ "GL_LINEAR_MIPMAP_NEAREST\0"
2411+ "GL_LINES\0"
2412+ "GL_LINE_BIT\0"
2413+ "GL_LINE_LOOP\0"
2414+ "GL_LINE_RESET_TOKEN\0"
2415+ "GL_LINE_SMOOTH\0"
2416+ "GL_LINE_SMOOTH_HINT\0"
2417+ "GL_LINE_STIPPLE\0"
2418+ "GL_LINE_STIPPLE_PATTERN\0"
2419+ "GL_LINE_STIPPLE_REPEAT\0"
2420+ "GL_LINE_STRIP\0"
2421+ "GL_LINE_TOKEN\0"
2422+ "GL_LINE_WIDTH\0"
2423+ "GL_LINE_WIDTH_GRANULARITY\0"
2424+ "GL_LINE_WIDTH_RANGE\0"
2425+ "GL_LINK_STATUS\0"
2426+ "GL_LIST_BASE\0"
2427+ "GL_LIST_BIT\0"
2428+ "GL_LIST_INDEX\0"
2429+ "GL_LIST_MODE\0"
2430+ "GL_LOAD\0"
2431+ "GL_LOGIC_OP\0"
2432+ "GL_LOGIC_OP_MODE\0"
2433+ "GL_LOWER_LEFT\0"
2434+ "GL_LUMINANCE\0"
2435+ "GL_LUMINANCE12\0"
2436+ "GL_LUMINANCE12_ALPHA12\0"
2437+ "GL_LUMINANCE12_ALPHA12_EXT\0"
2438+ "GL_LUMINANCE12_ALPHA4\0"
2439+ "GL_LUMINANCE12_ALPHA4_EXT\0"
2440+ "GL_LUMINANCE12_EXT\0"
2441+ "GL_LUMINANCE16\0"
2442+ "GL_LUMINANCE16_ALPHA16\0"
2443+ "GL_LUMINANCE16_ALPHA16_EXT\0"
2444+ "GL_LUMINANCE16_EXT\0"
2445+ "GL_LUMINANCE4\0"
2446+ "GL_LUMINANCE4_ALPHA4\0"
2447+ "GL_LUMINANCE4_ALPHA4_EXT\0"
2448+ "GL_LUMINANCE4_EXT\0"
2449+ "GL_LUMINANCE6_ALPHA2\0"
2450+ "GL_LUMINANCE6_ALPHA2_EXT\0"
2451+ "GL_LUMINANCE8\0"
2452+ "GL_LUMINANCE8_ALPHA8\0"
2453+ "GL_LUMINANCE8_ALPHA8_EXT\0"
2454+ "GL_LUMINANCE8_EXT\0"
2455+ "GL_LUMINANCE_ALPHA\0"
2456+ "GL_MAP1_COLOR_4\0"
2457+ "GL_MAP1_GRID_DOMAIN\0"
2458+ "GL_MAP1_GRID_SEGMENTS\0"
2459+ "GL_MAP1_INDEX\0"
2460+ "GL_MAP1_NORMAL\0"
2461+ "GL_MAP1_TEXTURE_COORD_1\0"
2462+ "GL_MAP1_TEXTURE_COORD_2\0"
2463+ "GL_MAP1_TEXTURE_COORD_3\0"
2464+ "GL_MAP1_TEXTURE_COORD_4\0"
2465+ "GL_MAP1_VERTEX_3\0"
2466+ "GL_MAP1_VERTEX_4\0"
2467+ "GL_MAP1_VERTEX_ATTRIB0_4_NV\0"
2468+ "GL_MAP1_VERTEX_ATTRIB10_4_NV\0"
2469+ "GL_MAP1_VERTEX_ATTRIB11_4_NV\0"
2470+ "GL_MAP1_VERTEX_ATTRIB12_4_NV\0"
2471+ "GL_MAP1_VERTEX_ATTRIB13_4_NV\0"
2472+ "GL_MAP1_VERTEX_ATTRIB14_4_NV\0"
2473+ "GL_MAP1_VERTEX_ATTRIB15_4_NV\0"
2474+ "GL_MAP1_VERTEX_ATTRIB1_4_NV\0"
2475+ "GL_MAP1_VERTEX_ATTRIB2_4_NV\0"
2476+ "GL_MAP1_VERTEX_ATTRIB3_4_NV\0"
2477+ "GL_MAP1_VERTEX_ATTRIB4_4_NV\0"
2478+ "GL_MAP1_VERTEX_ATTRIB5_4_NV\0"
2479+ "GL_MAP1_VERTEX_ATTRIB6_4_NV\0"
2480+ "GL_MAP1_VERTEX_ATTRIB7_4_NV\0"
2481+ "GL_MAP1_VERTEX_ATTRIB8_4_NV\0"
2482+ "GL_MAP1_VERTEX_ATTRIB9_4_NV\0"
2483+ "GL_MAP2_COLOR_4\0"
2484+ "GL_MAP2_GRID_DOMAIN\0"
2485+ "GL_MAP2_GRID_SEGMENTS\0"
2486+ "GL_MAP2_INDEX\0"
2487+ "GL_MAP2_NORMAL\0"
2488+ "GL_MAP2_TEXTURE_COORD_1\0"
2489+ "GL_MAP2_TEXTURE_COORD_2\0"
2490+ "GL_MAP2_TEXTURE_COORD_3\0"
2491+ "GL_MAP2_TEXTURE_COORD_4\0"
2492+ "GL_MAP2_VERTEX_3\0"
2493+ "GL_MAP2_VERTEX_4\0"
2494+ "GL_MAP2_VERTEX_ATTRIB0_4_NV\0"
2495+ "GL_MAP2_VERTEX_ATTRIB10_4_NV\0"
2496+ "GL_MAP2_VERTEX_ATTRIB11_4_NV\0"
2497+ "GL_MAP2_VERTEX_ATTRIB12_4_NV\0"
2498+ "GL_MAP2_VERTEX_ATTRIB13_4_NV\0"
2499+ "GL_MAP2_VERTEX_ATTRIB14_4_NV\0"
2500+ "GL_MAP2_VERTEX_ATTRIB15_4_NV\0"
2501+ "GL_MAP2_VERTEX_ATTRIB1_4_NV\0"
2502+ "GL_MAP2_VERTEX_ATTRIB2_4_NV\0"
2503+ "GL_MAP2_VERTEX_ATTRIB3_4_NV\0"
2504+ "GL_MAP2_VERTEX_ATTRIB4_4_NV\0"
2505+ "GL_MAP2_VERTEX_ATTRIB5_4_NV\0"
2506+ "GL_MAP2_VERTEX_ATTRIB6_4_NV\0"
2507+ "GL_MAP2_VERTEX_ATTRIB7_4_NV\0"
2508+ "GL_MAP2_VERTEX_ATTRIB8_4_NV\0"
2509+ "GL_MAP2_VERTEX_ATTRIB9_4_NV\0"
2510+ "GL_MAP_COLOR\0"
2511+ "GL_MAP_STENCIL\0"
2512+ "GL_MATRIX0_ARB\0"
2513+ "GL_MATRIX0_NV\0"
2514+ "GL_MATRIX10_ARB\0"
2515+ "GL_MATRIX11_ARB\0"
2516+ "GL_MATRIX12_ARB\0"
2517+ "GL_MATRIX13_ARB\0"
2518+ "GL_MATRIX14_ARB\0"
2519+ "GL_MATRIX15_ARB\0"
2520+ "GL_MATRIX16_ARB\0"
2521+ "GL_MATRIX17_ARB\0"
2522+ "GL_MATRIX18_ARB\0"
2523+ "GL_MATRIX19_ARB\0"
2524+ "GL_MATRIX1_ARB\0"
2525+ "GL_MATRIX1_NV\0"
2526+ "GL_MATRIX20_ARB\0"
2527+ "GL_MATRIX21_ARB\0"
2528+ "GL_MATRIX22_ARB\0"
2529+ "GL_MATRIX23_ARB\0"
2530+ "GL_MATRIX24_ARB\0"
2531+ "GL_MATRIX25_ARB\0"
2532+ "GL_MATRIX26_ARB\0"
2533+ "GL_MATRIX27_ARB\0"
2534+ "GL_MATRIX28_ARB\0"
2535+ "GL_MATRIX29_ARB\0"
2536+ "GL_MATRIX2_ARB\0"
2537+ "GL_MATRIX2_NV\0"
2538+ "GL_MATRIX30_ARB\0"
2539+ "GL_MATRIX31_ARB\0"
2540+ "GL_MATRIX3_ARB\0"
2541+ "GL_MATRIX3_NV\0"
2542+ "GL_MATRIX4_ARB\0"
2543+ "GL_MATRIX4_NV\0"
2544+ "GL_MATRIX5_ARB\0"
2545+ "GL_MATRIX5_NV\0"
2546+ "GL_MATRIX6_ARB\0"
2547+ "GL_MATRIX6_NV\0"
2548+ "GL_MATRIX7_ARB\0"
2549+ "GL_MATRIX7_NV\0"
2550+ "GL_MATRIX8_ARB\0"
2551+ "GL_MATRIX9_ARB\0"
2552+ "GL_MATRIX_INDEX_ARRAY_ARB\0"
2553+ "GL_MATRIX_INDEX_ARRAY_POINTER_ARB\0"
2554+ "GL_MATRIX_INDEX_ARRAY_SIZE_ARB\0"
2555+ "GL_MATRIX_INDEX_ARRAY_STRIDE_ARB\0"
2556+ "GL_MATRIX_INDEX_ARRAY_TYPE_ARB\0"
2557+ "GL_MATRIX_MODE\0"
2558+ "GL_MATRIX_PALETTE_ARB\0"
2559+ "GL_MAX\0"
2560+ "GL_MAX_3D_TEXTURE_SIZE\0"
2561+ "GL_MAX_ARRAY_TEXTURE_LAYERS_EXT\0"
2562+ "GL_MAX_ATTRIB_STACK_DEPTH\0"
2563+ "GL_MAX_CLIENT_ATTRIB_STACK_DEPTH\0"
2564+ "GL_MAX_CLIPMAP_DEPTH_SGIX\0"
2565+ "GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX\0"
2566+ "GL_MAX_CLIP_PLANES\0"
2567+ "GL_MAX_COLOR_ATTACHMENTS_EXT\0"
2568+ "GL_MAX_COLOR_MATRIX_STACK_DEPTH\0"
2569+ "GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI\0"
2570+ "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS\0"
2571+ "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB\0"
2572+ "GL_MAX_CONVOLUTION_HEIGHT\0"
2573+ "GL_MAX_CONVOLUTION_HEIGHT_EXT\0"
2574+ "GL_MAX_CONVOLUTION_WIDTH\0"
2575+ "GL_MAX_CONVOLUTION_WIDTH_EXT\0"
2576+ "GL_MAX_CUBE_MAP_TEXTURE_SIZE\0"
2577+ "GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB\0"
2578+ "GL_MAX_DRAW_BUFFERS\0"
2579+ "GL_MAX_DRAW_BUFFERS_ARB\0"
2580+ "GL_MAX_DRAW_BUFFERS_ATI\0"
2581+ "GL_MAX_ELEMENTS_INDICES\0"
2582+ "GL_MAX_ELEMENTS_VERTICES\0"
2583+ "GL_MAX_EVAL_ORDER\0"
2584+ "GL_MAX_EXT\0"
2585+ "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS\0"
2586+ "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB\0"
2587+ "GL_MAX_LIGHTS\0"
2588+ "GL_MAX_LIST_NESTING\0"
2589+ "GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB\0"
2590+ "GL_MAX_MODELVIEW_STACK_DEPTH\0"
2591+ "GL_MAX_NAME_STACK_DEPTH\0"
2592+ "GL_MAX_PALETTE_MATRICES_ARB\0"
2593+ "GL_MAX_PIXEL_MAP_TABLE\0"
2594+ "GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB\0"
2595+ "GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB\0"
2596+ "GL_MAX_PROGRAM_ATTRIBS_ARB\0"
2597+ "GL_MAX_PROGRAM_CALL_DEPTH_NV\0"
2598+ "GL_MAX_PROGRAM_ENV_PARAMETERS_ARB\0"
2599+ "GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV\0"
2600+ "GL_MAX_PROGRAM_IF_DEPTH_NV\0"
2601+ "GL_MAX_PROGRAM_INSTRUCTIONS_ARB\0"
2602+ "GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB\0"
2603+ "GL_MAX_PROGRAM_LOOP_COUNT_NV\0"
2604+ "GL_MAX_PROGRAM_LOOP_DEPTH_NV\0"
2605+ "GL_MAX_PROGRAM_MATRICES_ARB\0"
2606+ "GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB\0"
2607+ "GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB\0"
2608+ "GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB\0"
2609+ "GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB\0"
2610+ "GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB\0"
2611+ "GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB\0"
2612+ "GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB\0"
2613+ "GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB\0"
2614+ "GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB\0"
2615+ "GL_MAX_PROGRAM_PARAMETERS_ARB\0"
2616+ "GL_MAX_PROGRAM_TEMPORARIES_ARB\0"
2617+ "GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB\0"
2618+ "GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB\0"
2619+ "GL_MAX_PROJECTION_STACK_DEPTH\0"
2620+ "GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB\0"
2621+ "GL_MAX_RECTANGLE_TEXTURE_SIZE_NV\0"
2622+ "GL_MAX_RENDERBUFFER_SIZE_EXT\0"
2623+ "GL_MAX_SHININESS_NV\0"
2624+ "GL_MAX_SPOT_EXPONENT_NV\0"
2625+ "GL_MAX_TEXTURE_COORDS\0"
2626+ "GL_MAX_TEXTURE_COORDS_ARB\0"
2627+ "GL_MAX_TEXTURE_IMAGE_UNITS\0"
2628+ "GL_MAX_TEXTURE_IMAGE_UNITS_ARB\0"
2629+ "GL_MAX_TEXTURE_LOD_BIAS\0"
2630+ "GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT\0"
2631+ "GL_MAX_TEXTURE_SIZE\0"
2632+ "GL_MAX_TEXTURE_STACK_DEPTH\0"
2633+ "GL_MAX_TEXTURE_UNITS\0"
2634+ "GL_MAX_TEXTURE_UNITS_ARB\0"
2635+ "GL_MAX_TRACK_MATRICES_NV\0"
2636+ "GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV\0"
2637+ "GL_MAX_VARYING_FLOATS\0"
2638+ "GL_MAX_VARYING_FLOATS_ARB\0"
2639+ "GL_MAX_VERTEX_ATTRIBS\0"
2640+ "GL_MAX_VERTEX_ATTRIBS_ARB\0"
2641+ "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS\0"
2642+ "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB\0"
2643+ "GL_MAX_VERTEX_UNIFORM_COMPONENTS\0"
2644+ "GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB\0"
2645+ "GL_MAX_VERTEX_UNITS_ARB\0"
2646+ "GL_MAX_VIEWPORT_DIMS\0"
2647+ "GL_MIN\0"
2648+ "GL_MINMAX\0"
2649+ "GL_MINMAX_EXT\0"
2650+ "GL_MINMAX_FORMAT\0"
2651+ "GL_MINMAX_FORMAT_EXT\0"
2652+ "GL_MINMAX_SINK\0"
2653+ "GL_MINMAX_SINK_EXT\0"
2654+ "GL_MIN_EXT\0"
2655+ "GL_MIRRORED_REPEAT\0"
2656+ "GL_MIRRORED_REPEAT_ARB\0"
2657+ "GL_MIRRORED_REPEAT_IBM\0"
2658+ "GL_MIRROR_CLAMP_ATI\0"
2659+ "GL_MIRROR_CLAMP_EXT\0"
2660+ "GL_MIRROR_CLAMP_TO_BORDER_EXT\0"
2661+ "GL_MIRROR_CLAMP_TO_EDGE_ATI\0"
2662+ "GL_MIRROR_CLAMP_TO_EDGE_EXT\0"
2663+ "GL_MODELVIEW\0"
2664+ "GL_MODELVIEW0_ARB\0"
2665+ "GL_MODELVIEW10_ARB\0"
2666+ "GL_MODELVIEW11_ARB\0"
2667+ "GL_MODELVIEW12_ARB\0"
2668+ "GL_MODELVIEW13_ARB\0"
2669+ "GL_MODELVIEW14_ARB\0"
2670+ "GL_MODELVIEW15_ARB\0"
2671+ "GL_MODELVIEW16_ARB\0"
2672+ "GL_MODELVIEW17_ARB\0"
2673+ "GL_MODELVIEW18_ARB\0"
2674+ "GL_MODELVIEW19_ARB\0"
2675+ "GL_MODELVIEW1_ARB\0"
2676+ "GL_MODELVIEW20_ARB\0"
2677+ "GL_MODELVIEW21_ARB\0"
2678+ "GL_MODELVIEW22_ARB\0"
2679+ "GL_MODELVIEW23_ARB\0"
2680+ "GL_MODELVIEW24_ARB\0"
2681+ "GL_MODELVIEW25_ARB\0"
2682+ "GL_MODELVIEW26_ARB\0"
2683+ "GL_MODELVIEW27_ARB\0"
2684+ "GL_MODELVIEW28_ARB\0"
2685+ "GL_MODELVIEW29_ARB\0"
2686+ "GL_MODELVIEW2_ARB\0"
2687+ "GL_MODELVIEW30_ARB\0"
2688+ "GL_MODELVIEW31_ARB\0"
2689+ "GL_MODELVIEW3_ARB\0"
2690+ "GL_MODELVIEW4_ARB\0"
2691+ "GL_MODELVIEW5_ARB\0"
2692+ "GL_MODELVIEW6_ARB\0"
2693+ "GL_MODELVIEW7_ARB\0"
2694+ "GL_MODELVIEW8_ARB\0"
2695+ "GL_MODELVIEW9_ARB\0"
2696+ "GL_MODELVIEW_MATRIX\0"
2697+ "GL_MODELVIEW_PROJECTION_NV\0"
2698+ "GL_MODELVIEW_STACK_DEPTH\0"
2699+ "GL_MODULATE\0"
2700+ "GL_MODULATE_ADD_ATI\0"
2701+ "GL_MODULATE_SIGNED_ADD_ATI\0"
2702+ "GL_MODULATE_SUBTRACT_ATI\0"
2703+ "GL_MULT\0"
2704+ "GL_MULTISAMPLE\0"
2705+ "GL_MULTISAMPLE_3DFX\0"
2706+ "GL_MULTISAMPLE_ARB\0"
2707+ "GL_MULTISAMPLE_BIT\0"
2708+ "GL_MULTISAMPLE_BIT_3DFX\0"
2709+ "GL_MULTISAMPLE_BIT_ARB\0"
2710+ "GL_MULTISAMPLE_FILTER_HINT_NV\0"
2711+ "GL_N3F_V3F\0"
2712+ "GL_NAME_STACK_DEPTH\0"
2713+ "GL_NAND\0"
2714+ "GL_NEAREST\0"
2715+ "GL_NEAREST_CLIPMAP_LINEAR_SGIX\0"
2716+ "GL_NEAREST_CLIPMAP_NEAREST_SGIX\0"
2717+ "GL_NEAREST_MIPMAP_LINEAR\0"
2718+ "GL_NEAREST_MIPMAP_NEAREST\0"
2719+ "GL_NEVER\0"
2720+ "GL_NICEST\0"
2721+ "GL_NONE\0"
2722+ "GL_NOOP\0"
2723+ "GL_NOR\0"
2724+ "GL_NORMALIZE\0"
2725+ "GL_NORMAL_ARRAY\0"
2726+ "GL_NORMAL_ARRAY_BUFFER_BINDING\0"
2727+ "GL_NORMAL_ARRAY_BUFFER_BINDING_ARB\0"
2728+ "GL_NORMAL_ARRAY_POINTER\0"
2729+ "GL_NORMAL_ARRAY_STRIDE\0"
2730+ "GL_NORMAL_ARRAY_TYPE\0"
2731+ "GL_NORMAL_MAP\0"
2732+ "GL_NORMAL_MAP_ARB\0"
2733+ "GL_NORMAL_MAP_NV\0"
2734+ "GL_NOTEQUAL\0"
2735+ "GL_NO_ERROR\0"
2736+ "GL_NUM_COMPRESSED_TEXTURE_FORMATS\0"
2737+ "GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB\0"
2738+ "GL_OBJECT_ACTIVE_ATTRIBUTES_ARB\0"
2739+ "GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB\0"
2740+ "GL_OBJECT_ACTIVE_UNIFORMS_ARB\0"
2741+ "GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB\0"
2742+ "GL_OBJECT_ATTACHED_OBJECTS_ARB\0"
2743+ "GL_OBJECT_COMPILE_STATUS_ARB\0"
2744+ "GL_OBJECT_DELETE_STATUS_ARB\0"
2745+ "GL_OBJECT_INFO_LOG_LENGTH_ARB\0"
2746+ "GL_OBJECT_LINEAR\0"
2747+ "GL_OBJECT_LINK_STATUS_ARB\0"
2748+ "GL_OBJECT_PLANE\0"
2749+ "GL_OBJECT_SHADER_SOURCE_LENGTH_ARB\0"
2750+ "GL_OBJECT_SUBTYPE_ARB\0"
2751+ "GL_OBJECT_TYPE_ARB\0"
2752+ "GL_OBJECT_VALIDATE_STATUS_ARB\0"
2753+ "GL_OCCLUSION_TEST_HP\0"
2754+ "GL_OCCLUSION_TEST_RESULT_HP\0"
2755+ "GL_ONE\0"
2756+ "GL_ONE_MINUS_CONSTANT_ALPHA\0"
2757+ "GL_ONE_MINUS_CONSTANT_ALPHA_EXT\0"
2758+ "GL_ONE_MINUS_CONSTANT_COLOR\0"
2759+ "GL_ONE_MINUS_CONSTANT_COLOR_EXT\0"
2760+ "GL_ONE_MINUS_DST_ALPHA\0"
2761+ "GL_ONE_MINUS_DST_COLOR\0"
2762+ "GL_ONE_MINUS_SRC_ALPHA\0"
2763+ "GL_ONE_MINUS_SRC_COLOR\0"
2764+ "GL_OPERAND0_ALPHA\0"
2765+ "GL_OPERAND0_ALPHA_ARB\0"
2766+ "GL_OPERAND0_ALPHA_EXT\0"
2767+ "GL_OPERAND0_RGB\0"
2768+ "GL_OPERAND0_RGB_ARB\0"
2769+ "GL_OPERAND0_RGB_EXT\0"
2770+ "GL_OPERAND1_ALPHA\0"
2771+ "GL_OPERAND1_ALPHA_ARB\0"
2772+ "GL_OPERAND1_ALPHA_EXT\0"
2773+ "GL_OPERAND1_RGB\0"
2774+ "GL_OPERAND1_RGB_ARB\0"
2775+ "GL_OPERAND1_RGB_EXT\0"
2776+ "GL_OPERAND2_ALPHA\0"
2777+ "GL_OPERAND2_ALPHA_ARB\0"
2778+ "GL_OPERAND2_ALPHA_EXT\0"
2779+ "GL_OPERAND2_RGB\0"
2780+ "GL_OPERAND2_RGB_ARB\0"
2781+ "GL_OPERAND2_RGB_EXT\0"
2782+ "GL_OPERAND3_ALPHA_NV\0"
2783+ "GL_OPERAND3_RGB_NV\0"
2784+ "GL_OR\0"
2785+ "GL_ORDER\0"
2786+ "GL_OR_INVERTED\0"
2787+ "GL_OR_REVERSE\0"
2788+ "GL_OUT_OF_MEMORY\0"
2789+ "GL_PACK_ALIGNMENT\0"
2790+ "GL_PACK_IMAGE_HEIGHT\0"
2791+ "GL_PACK_INVERT_MESA\0"
2792+ "GL_PACK_LSB_FIRST\0"
2793+ "GL_PACK_ROW_LENGTH\0"
2794+ "GL_PACK_SKIP_IMAGES\0"
2795+ "GL_PACK_SKIP_PIXELS\0"
2796+ "GL_PACK_SKIP_ROWS\0"
2797+ "GL_PACK_SWAP_BYTES\0"
2798+ "GL_PALETTE4_R5_G6_B5_OES\0"
2799+ "GL_PALETTE4_RGB5_A1_OES\0"
2800+ "GL_PALETTE4_RGB8_OES\0"
2801+ "GL_PALETTE4_RGBA4_OES\0"
2802+ "GL_PALETTE4_RGBA8_OES\0"
2803+ "GL_PALETTE8_R5_G6_B5_OES\0"
2804+ "GL_PALETTE8_RGB5_A1_OES\0"
2805+ "GL_PALETTE8_RGB8_OES\0"
2806+ "GL_PALETTE8_RGBA4_OES\0"
2807+ "GL_PALETTE8_RGBA8_OES\0"
2808+ "GL_PASS_THROUGH_TOKEN\0"
2809+ "GL_PERSPECTIVE_CORRECTION_HINT\0"
2810+ "GL_PIXEL_MAP_A_TO_A\0"
2811+ "GL_PIXEL_MAP_A_TO_A_SIZE\0"
2812+ "GL_PIXEL_MAP_B_TO_B\0"
2813+ "GL_PIXEL_MAP_B_TO_B_SIZE\0"
2814+ "GL_PIXEL_MAP_G_TO_G\0"
2815+ "GL_PIXEL_MAP_G_TO_G_SIZE\0"
2816+ "GL_PIXEL_MAP_I_TO_A\0"
2817+ "GL_PIXEL_MAP_I_TO_A_SIZE\0"
2818+ "GL_PIXEL_MAP_I_TO_B\0"
2819+ "GL_PIXEL_MAP_I_TO_B_SIZE\0"
2820+ "GL_PIXEL_MAP_I_TO_G\0"
2821+ "GL_PIXEL_MAP_I_TO_G_SIZE\0"
2822+ "GL_PIXEL_MAP_I_TO_I\0"
2823+ "GL_PIXEL_MAP_I_TO_I_SIZE\0"
2824+ "GL_PIXEL_MAP_I_TO_R\0"
2825+ "GL_PIXEL_MAP_I_TO_R_SIZE\0"
2826+ "GL_PIXEL_MAP_R_TO_R\0"
2827+ "GL_PIXEL_MAP_R_TO_R_SIZE\0"
2828+ "GL_PIXEL_MAP_S_TO_S\0"
2829+ "GL_PIXEL_MAP_S_TO_S_SIZE\0"
2830+ "GL_PIXEL_MODE_BIT\0"
2831+ "GL_PIXEL_PACK_BUFFER_BINDING_EXT\0"
2832+ "GL_PIXEL_PACK_BUFFER_EXT\0"
2833+ "GL_PIXEL_UNPACK_BUFFER_BINDING_EXT\0"
2834+ "GL_PIXEL_UNPACK_BUFFER_EXT\0"
2835+ "GL_POINT\0"
2836+ "GL_POINTS\0"
2837+ "GL_POINT_BIT\0"
2838+ "GL_POINT_DISTANCE_ATTENUATION\0"
2839+ "GL_POINT_DISTANCE_ATTENUATION_ARB\0"
2840+ "GL_POINT_DISTANCE_ATTENUATION_EXT\0"
2841+ "GL_POINT_DISTANCE_ATTENUATION_SGIS\0"
2842+ "GL_POINT_FADE_THRESHOLD_SIZE\0"
2843+ "GL_POINT_FADE_THRESHOLD_SIZE_ARB\0"
2844+ "GL_POINT_FADE_THRESHOLD_SIZE_EXT\0"
2845+ "GL_POINT_FADE_THRESHOLD_SIZE_SGIS\0"
2846+ "GL_POINT_SIZE\0"
2847+ "GL_POINT_SIZE_GRANULARITY\0"
2848+ "GL_POINT_SIZE_MAX\0"
2849+ "GL_POINT_SIZE_MAX_ARB\0"
2850+ "GL_POINT_SIZE_MAX_EXT\0"
2851+ "GL_POINT_SIZE_MAX_SGIS\0"
2852+ "GL_POINT_SIZE_MIN\0"
2853+ "GL_POINT_SIZE_MIN_ARB\0"
2854+ "GL_POINT_SIZE_MIN_EXT\0"
2855+ "GL_POINT_SIZE_MIN_SGIS\0"
2856+ "GL_POINT_SIZE_RANGE\0"
2857+ "GL_POINT_SMOOTH\0"
2858+ "GL_POINT_SMOOTH_HINT\0"
2859+ "GL_POINT_SPRITE\0"
2860+ "GL_POINT_SPRITE_ARB\0"
2861+ "GL_POINT_SPRITE_COORD_ORIGIN\0"
2862+ "GL_POINT_SPRITE_NV\0"
2863+ "GL_POINT_SPRITE_R_MODE_NV\0"
2864+ "GL_POINT_TOKEN\0"
2865+ "GL_POLYGON\0"
2866+ "GL_POLYGON_BIT\0"
2867+ "GL_POLYGON_MODE\0"
2868+ "GL_POLYGON_OFFSET_BIAS\0"
2869+ "GL_POLYGON_OFFSET_FACTOR\0"
2870+ "GL_POLYGON_OFFSET_FILL\0"
2871+ "GL_POLYGON_OFFSET_LINE\0"
2872+ "GL_POLYGON_OFFSET_POINT\0"
2873+ "GL_POLYGON_OFFSET_UNITS\0"
2874+ "GL_POLYGON_SMOOTH\0"
2875+ "GL_POLYGON_SMOOTH_HINT\0"
2876+ "GL_POLYGON_STIPPLE\0"
2877+ "GL_POLYGON_STIPPLE_BIT\0"
2878+ "GL_POLYGON_TOKEN\0"
2879+ "GL_POSITION\0"
2880+ "GL_POST_COLOR_MATRIX_ALPHA_BIAS\0"
2881+ "GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI\0"
2882+ "GL_POST_COLOR_MATRIX_ALPHA_SCALE\0"
2883+ "GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI\0"
2884+ "GL_POST_COLOR_MATRIX_BLUE_BIAS\0"
2885+ "GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI\0"
2886+ "GL_POST_COLOR_MATRIX_BLUE_SCALE\0"
2887+ "GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI\0"
2888+ "GL_POST_COLOR_MATRIX_COLOR_TABLE\0"
2889+ "GL_POST_COLOR_MATRIX_GREEN_BIAS\0"
2890+ "GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI\0"
2891+ "GL_POST_COLOR_MATRIX_GREEN_SCALE\0"
2892+ "GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI\0"
2893+ "GL_POST_COLOR_MATRIX_RED_BIAS\0"
2894+ "GL_POST_COLOR_MATRIX_RED_BIAS_SGI\0"
2895+ "GL_POST_COLOR_MATRIX_RED_SCALE\0"
2896+ "GL_POST_COLOR_MATRIX_RED_SCALE_SGI\0"
2897+ "GL_POST_CONVOLUTION_ALPHA_BIAS\0"
2898+ "GL_POST_CONVOLUTION_ALPHA_BIAS_EXT\0"
2899+ "GL_POST_CONVOLUTION_ALPHA_SCALE\0"
2900+ "GL_POST_CONVOLUTION_ALPHA_SCALE_EXT\0"
2901+ "GL_POST_CONVOLUTION_BLUE_BIAS\0"
2902+ "GL_POST_CONVOLUTION_BLUE_BIAS_EXT\0"
2903+ "GL_POST_CONVOLUTION_BLUE_SCALE\0"
2904+ "GL_POST_CONVOLUTION_BLUE_SCALE_EXT\0"
2905+ "GL_POST_CONVOLUTION_COLOR_TABLE\0"
2906+ "GL_POST_CONVOLUTION_GREEN_BIAS\0"
2907+ "GL_POST_CONVOLUTION_GREEN_BIAS_EXT\0"
2908+ "GL_POST_CONVOLUTION_GREEN_SCALE\0"
2909+ "GL_POST_CONVOLUTION_GREEN_SCALE_EXT\0"
2910+ "GL_POST_CONVOLUTION_RED_BIAS\0"
2911+ "GL_POST_CONVOLUTION_RED_BIAS_EXT\0"
2912+ "GL_POST_CONVOLUTION_RED_SCALE\0"
2913+ "GL_POST_CONVOLUTION_RED_SCALE_EXT\0"
2914+ "GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX\0"
2915+ "GL_POST_TEXTURE_FILTER_BIAS_SGIX\0"
2916+ "GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX\0"
2917+ "GL_POST_TEXTURE_FILTER_SCALE_SGIX\0"
2918+ "GL_PREVIOUS\0"
2919+ "GL_PREVIOUS_ARB\0"
2920+ "GL_PREVIOUS_EXT\0"
2921+ "GL_PRIMARY_COLOR\0"
2922+ "GL_PRIMARY_COLOR_ARB\0"
2923+ "GL_PRIMARY_COLOR_EXT\0"
2924+ "GL_PROGRAM_ADDRESS_REGISTERS_ARB\0"
2925+ "GL_PROGRAM_ALU_INSTRUCTIONS_ARB\0"
2926+ "GL_PROGRAM_ATTRIBS_ARB\0"
2927+ "GL_PROGRAM_BINDING_ARB\0"
2928+ "GL_PROGRAM_ERROR_POSITION_ARB\0"
2929+ "GL_PROGRAM_ERROR_POSITION_NV\0"
2930+ "GL_PROGRAM_ERROR_STRING_ARB\0"
2931+ "GL_PROGRAM_FORMAT_ARB\0"
2932+ "GL_PROGRAM_FORMAT_ASCII_ARB\0"
2933+ "GL_PROGRAM_INSTRUCTIONS_ARB\0"
2934+ "GL_PROGRAM_LENGTH_ARB\0"
2935+ "GL_PROGRAM_LENGTH_NV\0"
2936+ "GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB\0"
2937+ "GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB\0"
2938+ "GL_PROGRAM_NATIVE_ATTRIBS_ARB\0"
2939+ "GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB\0"
2940+ "GL_PROGRAM_NATIVE_PARAMETERS_ARB\0"
2941+ "GL_PROGRAM_NATIVE_TEMPORARIES_ARB\0"
2942+ "GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB\0"
2943+ "GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB\0"
2944+ "GL_PROGRAM_OBJECT_ARB\0"
2945+ "GL_PROGRAM_PARAMETERS_ARB\0"
2946+ "GL_PROGRAM_PARAMETER_NV\0"
2947+ "GL_PROGRAM_RESIDENT_NV\0"
2948+ "GL_PROGRAM_STRING_ARB\0"
2949+ "GL_PROGRAM_STRING_NV\0"
2950+ "GL_PROGRAM_TARGET_NV\0"
2951+ "GL_PROGRAM_TEMPORARIES_ARB\0"
2952+ "GL_PROGRAM_TEX_INDIRECTIONS_ARB\0"
2953+ "GL_PROGRAM_TEX_INSTRUCTIONS_ARB\0"
2954+ "GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB\0"
2955+ "GL_PROJECTION\0"
2956+ "GL_PROJECTION_MATRIX\0"
2957+ "GL_PROJECTION_STACK_DEPTH\0"
2958+ "GL_PROXY_COLOR_TABLE\0"
2959+ "GL_PROXY_HISTOGRAM\0"
2960+ "GL_PROXY_HISTOGRAM_EXT\0"
2961+ "GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE\0"
2962+ "GL_PROXY_POST_CONVOLUTION_COLOR_TABLE\0"
2963+ "GL_PROXY_TEXTURE_1D\0"
2964+ "GL_PROXY_TEXTURE_1D_ARRAY_EXT\0"
2965+ "GL_PROXY_TEXTURE_1D_EXT\0"
2966+ "GL_PROXY_TEXTURE_2D\0"
2967+ "GL_PROXY_TEXTURE_2D_ARRAY_EXT\0"
2968+ "GL_PROXY_TEXTURE_2D_EXT\0"
2969+ "GL_PROXY_TEXTURE_3D\0"
2970+ "GL_PROXY_TEXTURE_COLOR_TABLE_SGI\0"
2971+ "GL_PROXY_TEXTURE_CUBE_MAP\0"
2972+ "GL_PROXY_TEXTURE_CUBE_MAP_ARB\0"
2973+ "GL_PROXY_TEXTURE_RECTANGLE_ARB\0"
2974+ "GL_PROXY_TEXTURE_RECTANGLE_NV\0"
2975+ "GL_Q\0"
2976+ "GL_QUADRATIC_ATTENUATION\0"
2977+ "GL_QUADS\0"
2978+ "GL_QUAD_MESH_SUN\0"
2979+ "GL_QUAD_STRIP\0"
2980+ "GL_QUERY_COUNTER_BITS\0"
2981+ "GL_QUERY_COUNTER_BITS_ARB\0"
2982+ "GL_QUERY_RESULT\0"
2983+ "GL_QUERY_RESULT_ARB\0"
2984+ "GL_QUERY_RESULT_AVAILABLE\0"
2985+ "GL_QUERY_RESULT_AVAILABLE_ARB\0"
2986+ "GL_R\0"
2987+ "GL_R3_G3_B2\0"
2988+ "GL_RASTER_POSITION_UNCLIPPED_IBM\0"
2989+ "GL_READ_BUFFER\0"
2990+ "GL_READ_FRAMEBUFFER_BINDING_EXT\0"
2991+ "GL_READ_FRAMEBUFFER_EXT\0"
2992+ "GL_READ_ONLY\0"
2993+ "GL_READ_ONLY_ARB\0"
2994+ "GL_READ_WRITE\0"
2995+ "GL_READ_WRITE_ARB\0"
2996+ "GL_RED\0"
2997+ "GL_REDUCE\0"
2998+ "GL_REDUCE_EXT\0"
2999+ "GL_RED_BIAS\0"
3000+ "GL_RED_BITS\0"
3001+ "GL_RED_SCALE\0"
3002+ "GL_REFLECTION_MAP\0"
3003+ "GL_REFLECTION_MAP_ARB\0"
3004+ "GL_REFLECTION_MAP_NV\0"
3005+ "GL_RENDER\0"
3006+ "GL_RENDERBUFFER_BINDING_EXT\0"
3007+ "GL_RENDERBUFFER_EXT\0"
3008+ "GL_RENDERBUFFER_HEIGHT_EXT\0"
3009+ "GL_RENDERBUFFER_INTERNAL_FORMAT_EXT\0"
3010+ "GL_RENDERBUFFER_WIDTH_EXT\0"
3011+ "GL_RENDERER\0"
3012+ "GL_RENDER_MODE\0"
3013+ "GL_REPEAT\0"
3014+ "GL_REPLACE\0"
3015+ "GL_REPLACE_EXT\0"
3016+ "GL_REPLICATE_BORDER_HP\0"
3017+ "GL_RESCALE_NORMAL\0"
3018+ "GL_RESCALE_NORMAL_EXT\0"
3019+ "GL_RETURN\0"
3020+ "GL_RGB\0"
3021+ "GL_RGB10\0"
3022+ "GL_RGB10_A2\0"
3023+ "GL_RGB10_A2_EXT\0"
3024+ "GL_RGB10_EXT\0"
3025+ "GL_RGB12\0"
3026+ "GL_RGB12_EXT\0"
3027+ "GL_RGB16\0"
3028+ "GL_RGB16_EXT\0"
3029+ "GL_RGB2_EXT\0"
3030+ "GL_RGB4\0"
3031+ "GL_RGB4_EXT\0"
3032+ "GL_RGB4_S3TC\0"
3033+ "GL_RGB5\0"
3034+ "GL_RGB5_A1\0"
3035+ "GL_RGB5_A1_EXT\0"
3036+ "GL_RGB5_EXT\0"
3037+ "GL_RGB8\0"
3038+ "GL_RGB8_EXT\0"
3039+ "GL_RGBA\0"
3040+ "GL_RGBA12\0"
3041+ "GL_RGBA12_EXT\0"
3042+ "GL_RGBA16\0"
3043+ "GL_RGBA16_EXT\0"
3044+ "GL_RGBA2\0"
3045+ "GL_RGBA2_EXT\0"
3046+ "GL_RGBA4\0"
3047+ "GL_RGBA4_DXT5_S3TC\0"
3048+ "GL_RGBA4_EXT\0"
3049+ "GL_RGBA4_S3TC\0"
3050+ "GL_RGBA8\0"
3051+ "GL_RGBA8_EXT\0"
3052+ "GL_RGBA_DXT5_S3TC\0"
3053+ "GL_RGBA_MODE\0"
3054+ "GL_RGBA_S3TC\0"
3055+ "GL_RGB_S3TC\0"
3056+ "GL_RGB_SCALE\0"
3057+ "GL_RGB_SCALE_ARB\0"
3058+ "GL_RGB_SCALE_EXT\0"
3059+ "GL_RIGHT\0"
3060+ "GL_S\0"
3061+ "GL_SAMPLER_1D\0"
3062+ "GL_SAMPLER_1D_SHADOW\0"
3063+ "GL_SAMPLER_2D\0"
3064+ "GL_SAMPLER_2D_SHADOW\0"
3065+ "GL_SAMPLER_3D\0"
3066+ "GL_SAMPLER_CUBE\0"
3067+ "GL_SAMPLES\0"
3068+ "GL_SAMPLES_3DFX\0"
3069+ "GL_SAMPLES_ARB\0"
3070+ "GL_SAMPLES_PASSED\0"
3071+ "GL_SAMPLES_PASSED_ARB\0"
3072+ "GL_SAMPLE_ALPHA_TO_COVERAGE\0"
3073+ "GL_SAMPLE_ALPHA_TO_COVERAGE_ARB\0"
3074+ "GL_SAMPLE_ALPHA_TO_ONE\0"
3075+ "GL_SAMPLE_ALPHA_TO_ONE_ARB\0"
3076+ "GL_SAMPLE_BUFFERS\0"
3077+ "GL_SAMPLE_BUFFERS_3DFX\0"
3078+ "GL_SAMPLE_BUFFERS_ARB\0"
3079+ "GL_SAMPLE_COVERAGE\0"
3080+ "GL_SAMPLE_COVERAGE_ARB\0"
3081+ "GL_SAMPLE_COVERAGE_INVERT\0"
3082+ "GL_SAMPLE_COVERAGE_INVERT_ARB\0"
3083+ "GL_SAMPLE_COVERAGE_VALUE\0"
3084+ "GL_SAMPLE_COVERAGE_VALUE_ARB\0"
3085+ "GL_SCISSOR_BIT\0"
3086+ "GL_SCISSOR_BOX\0"
3087+ "GL_SCISSOR_TEST\0"
3088+ "GL_SECONDARY_COLOR_ARRAY\0"
3089+ "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING\0"
3090+ "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB\0"
3091+ "GL_SECONDARY_COLOR_ARRAY_POINTER\0"
3092+ "GL_SECONDARY_COLOR_ARRAY_SIZE\0"
3093+ "GL_SECONDARY_COLOR_ARRAY_STRIDE\0"
3094+ "GL_SECONDARY_COLOR_ARRAY_TYPE\0"
3095+ "GL_SELECT\0"
3096+ "GL_SELECTION_BUFFER_POINTER\0"
3097+ "GL_SELECTION_BUFFER_SIZE\0"
3098+ "GL_SEPARABLE_2D\0"
3099+ "GL_SEPARATE_SPECULAR_COLOR\0"
3100+ "GL_SEPARATE_SPECULAR_COLOR_EXT\0"
3101+ "GL_SET\0"
3102+ "GL_SHADER_OBJECT_ARB\0"
3103+ "GL_SHADER_SOURCE_LENGTH\0"
3104+ "GL_SHADER_TYPE\0"
3105+ "GL_SHADE_MODEL\0"
3106+ "GL_SHADING_LANGUAGE_VERSION\0"
3107+ "GL_SHADOW_AMBIENT_SGIX\0"
3108+ "GL_SHARED_TEXTURE_PALETTE_EXT\0"
3109+ "GL_SHININESS\0"
3110+ "GL_SHORT\0"
3111+ "GL_SINGLE_COLOR\0"
3112+ "GL_SINGLE_COLOR_EXT\0"
3113+ "GL_SLICE_ACCUM_SUN\0"
3114+ "GL_SMOOTH\0"
3115+ "GL_SMOOTH_LINE_WIDTH_GRANULARITY\0"
3116+ "GL_SMOOTH_LINE_WIDTH_RANGE\0"
3117+ "GL_SMOOTH_POINT_SIZE_GRANULARITY\0"
3118+ "GL_SMOOTH_POINT_SIZE_RANGE\0"
3119+ "GL_SOURCE0_ALPHA\0"
3120+ "GL_SOURCE0_ALPHA_ARB\0"
3121+ "GL_SOURCE0_ALPHA_EXT\0"
3122+ "GL_SOURCE0_RGB\0"
3123+ "GL_SOURCE0_RGB_ARB\0"
3124+ "GL_SOURCE0_RGB_EXT\0"
3125+ "GL_SOURCE1_ALPHA\0"
3126+ "GL_SOURCE1_ALPHA_ARB\0"
3127+ "GL_SOURCE1_ALPHA_EXT\0"
3128+ "GL_SOURCE1_RGB\0"
3129+ "GL_SOURCE1_RGB_ARB\0"
3130+ "GL_SOURCE1_RGB_EXT\0"
3131+ "GL_SOURCE2_ALPHA\0"
3132+ "GL_SOURCE2_ALPHA_ARB\0"
3133+ "GL_SOURCE2_ALPHA_EXT\0"
3134+ "GL_SOURCE2_RGB\0"
3135+ "GL_SOURCE2_RGB_ARB\0"
3136+ "GL_SOURCE2_RGB_EXT\0"
3137+ "GL_SOURCE3_ALPHA_NV\0"
3138+ "GL_SOURCE3_RGB_NV\0"
3139+ "GL_SPECULAR\0"
3140+ "GL_SPHERE_MAP\0"
3141+ "GL_SPOT_CUTOFF\0"
3142+ "GL_SPOT_DIRECTION\0"
3143+ "GL_SPOT_EXPONENT\0"
3144+ "GL_SRC0_ALPHA\0"
3145+ "GL_SRC0_RGB\0"
3146+ "GL_SRC1_ALPHA\0"
3147+ "GL_SRC1_RGB\0"
3148+ "GL_SRC2_ALPHA\0"
3149+ "GL_SRC2_RGB\0"
3150+ "GL_SRC_ALPHA\0"
3151+ "GL_SRC_ALPHA_SATURATE\0"
3152+ "GL_SRC_COLOR\0"
3153+ "GL_STACK_OVERFLOW\0"
3154+ "GL_STACK_UNDERFLOW\0"
3155+ "GL_STATIC_COPY\0"
3156+ "GL_STATIC_COPY_ARB\0"
3157+ "GL_STATIC_DRAW\0"
3158+ "GL_STATIC_DRAW_ARB\0"
3159+ "GL_STATIC_READ\0"
3160+ "GL_STATIC_READ_ARB\0"
3161+ "GL_STENCIL\0"
3162+ "GL_STENCIL_ATTACHMENT_EXT\0"
3163+ "GL_STENCIL_BACK_FAIL\0"
3164+ "GL_STENCIL_BACK_FUNC\0"
3165+ "GL_STENCIL_BACK_PASS_DEPTH_FAIL\0"
3166+ "GL_STENCIL_BACK_PASS_DEPTH_PASS\0"
3167+ "GL_STENCIL_BACK_REF\0"
3168+ "GL_STENCIL_BACK_VALUE_MASK\0"
3169+ "GL_STENCIL_BACK_WRITEMASK\0"
3170+ "GL_STENCIL_BITS\0"
3171+ "GL_STENCIL_BUFFER_BIT\0"
3172+ "GL_STENCIL_CLEAR_VALUE\0"
3173+ "GL_STENCIL_FAIL\0"
3174+ "GL_STENCIL_FUNC\0"
3175+ "GL_STENCIL_INDEX\0"
3176+ "GL_STENCIL_INDEX16_EXT\0"
3177+ "GL_STENCIL_INDEX1_EXT\0"
3178+ "GL_STENCIL_INDEX4_EXT\0"
3179+ "GL_STENCIL_INDEX8_EXT\0"
3180+ "GL_STENCIL_INDEX_EXT\0"
3181+ "GL_STENCIL_PASS_DEPTH_FAIL\0"
3182+ "GL_STENCIL_PASS_DEPTH_PASS\0"
3183+ "GL_STENCIL_REF\0"
3184+ "GL_STENCIL_TEST\0"
3185+ "GL_STENCIL_TEST_TWO_SIDE_EXT\0"
3186+ "GL_STENCIL_VALUE_MASK\0"
3187+ "GL_STENCIL_WRITEMASK\0"
3188+ "GL_STEREO\0"
3189+ "GL_STREAM_COPY\0"
3190+ "GL_STREAM_COPY_ARB\0"
3191+ "GL_STREAM_DRAW\0"
3192+ "GL_STREAM_DRAW_ARB\0"
3193+ "GL_STREAM_READ\0"
3194+ "GL_STREAM_READ_ARB\0"
3195+ "GL_SUBPIXEL_BITS\0"
3196+ "GL_SUBTRACT\0"
3197+ "GL_SUBTRACT_ARB\0"
3198+ "GL_T\0"
3199+ "GL_T2F_C3F_V3F\0"
3200+ "GL_T2F_C4F_N3F_V3F\0"
3201+ "GL_T2F_C4UB_V3F\0"
3202+ "GL_T2F_N3F_V3F\0"
3203+ "GL_T2F_V3F\0"
3204+ "GL_T4F_C4F_N3F_V4F\0"
3205+ "GL_T4F_V4F\0"
3206+ "GL_TABLE_TOO_LARGE_EXT\0"
3207+ "GL_TEXTURE\0"
3208+ "GL_TEXTURE0\0"
3209+ "GL_TEXTURE0_ARB\0"
3210+ "GL_TEXTURE1\0"
3211+ "GL_TEXTURE10\0"
3212+ "GL_TEXTURE10_ARB\0"
3213+ "GL_TEXTURE11\0"
3214+ "GL_TEXTURE11_ARB\0"
3215+ "GL_TEXTURE12\0"
3216+ "GL_TEXTURE12_ARB\0"
3217+ "GL_TEXTURE13\0"
3218+ "GL_TEXTURE13_ARB\0"
3219+ "GL_TEXTURE14\0"
3220+ "GL_TEXTURE14_ARB\0"
3221+ "GL_TEXTURE15\0"
3222+ "GL_TEXTURE15_ARB\0"
3223+ "GL_TEXTURE16\0"
3224+ "GL_TEXTURE16_ARB\0"
3225+ "GL_TEXTURE17\0"
3226+ "GL_TEXTURE17_ARB\0"
3227+ "GL_TEXTURE18\0"
3228+ "GL_TEXTURE18_ARB\0"
3229+ "GL_TEXTURE19\0"
3230+ "GL_TEXTURE19_ARB\0"
3231+ "GL_TEXTURE1_ARB\0"
3232+ "GL_TEXTURE2\0"
3233+ "GL_TEXTURE20\0"
3234+ "GL_TEXTURE20_ARB\0"
3235+ "GL_TEXTURE21\0"
3236+ "GL_TEXTURE21_ARB\0"
3237+ "GL_TEXTURE22\0"
3238+ "GL_TEXTURE22_ARB\0"
3239+ "GL_TEXTURE23\0"
3240+ "GL_TEXTURE23_ARB\0"
3241+ "GL_TEXTURE24\0"
3242+ "GL_TEXTURE24_ARB\0"
3243+ "GL_TEXTURE25\0"
3244+ "GL_TEXTURE25_ARB\0"
3245+ "GL_TEXTURE26\0"
3246+ "GL_TEXTURE26_ARB\0"
3247+ "GL_TEXTURE27\0"
3248+ "GL_TEXTURE27_ARB\0"
3249+ "GL_TEXTURE28\0"
3250+ "GL_TEXTURE28_ARB\0"
3251+ "GL_TEXTURE29\0"
3252+ "GL_TEXTURE29_ARB\0"
3253+ "GL_TEXTURE2_ARB\0"
3254+ "GL_TEXTURE3\0"
3255+ "GL_TEXTURE30\0"
3256+ "GL_TEXTURE30_ARB\0"
3257+ "GL_TEXTURE31\0"
3258+ "GL_TEXTURE31_ARB\0"
3259+ "GL_TEXTURE3_ARB\0"
3260+ "GL_TEXTURE4\0"
3261+ "GL_TEXTURE4_ARB\0"
3262+ "GL_TEXTURE5\0"
3263+ "GL_TEXTURE5_ARB\0"
3264+ "GL_TEXTURE6\0"
3265+ "GL_TEXTURE6_ARB\0"
3266+ "GL_TEXTURE7\0"
3267+ "GL_TEXTURE7_ARB\0"
3268+ "GL_TEXTURE8\0"
3269+ "GL_TEXTURE8_ARB\0"
3270+ "GL_TEXTURE9\0"
3271+ "GL_TEXTURE9_ARB\0"
3272+ "GL_TEXTURE_1D\0"
3273+ "GL_TEXTURE_1D_ARRAY_EXT\0"
3274+ "GL_TEXTURE_2D\0"
3275+ "GL_TEXTURE_2D_ARRAY_EXT\0"
3276+ "GL_TEXTURE_3D\0"
3277+ "GL_TEXTURE_ALPHA_SIZE\0"
3278+ "GL_TEXTURE_ALPHA_SIZE_EXT\0"
3279+ "GL_TEXTURE_BASE_LEVEL\0"
3280+ "GL_TEXTURE_BINDING_1D\0"
3281+ "GL_TEXTURE_BINDING_1D_ARRAY_EXT\0"
3282+ "GL_TEXTURE_BINDING_2D\0"
3283+ "GL_TEXTURE_BINDING_2D_ARRAY_EXT\0"
3284+ "GL_TEXTURE_BINDING_3D\0"
3285+ "GL_TEXTURE_BINDING_CUBE_MAP\0"
3286+ "GL_TEXTURE_BINDING_CUBE_MAP_ARB\0"
3287+ "GL_TEXTURE_BINDING_RECTANGLE_ARB\0"
3288+ "GL_TEXTURE_BINDING_RECTANGLE_NV\0"
3289+ "GL_TEXTURE_BIT\0"
3290+ "GL_TEXTURE_BLUE_SIZE\0"
3291+ "GL_TEXTURE_BLUE_SIZE_EXT\0"
3292+ "GL_TEXTURE_BORDER\0"
3293+ "GL_TEXTURE_BORDER_COLOR\0"
3294+ "GL_TEXTURE_CLIPMAP_CENTER_SGIX\0"
3295+ "GL_TEXTURE_CLIPMAP_DEPTH_SGIX\0"
3296+ "GL_TEXTURE_CLIPMAP_FRAME_SGIX\0"
3297+ "GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX\0"
3298+ "GL_TEXTURE_CLIPMAP_OFFSET_SGIX\0"
3299+ "GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX\0"
3300+ "GL_TEXTURE_COLOR_TABLE_SGI\0"
3301+ "GL_TEXTURE_COLOR_WRITEMASK_SGIS\0"
3302+ "GL_TEXTURE_COMPARE_FAIL_VALUE_ARB\0"
3303+ "GL_TEXTURE_COMPARE_FUNC\0"
3304+ "GL_TEXTURE_COMPARE_FUNC_ARB\0"
3305+ "GL_TEXTURE_COMPARE_MODE\0"
3306+ "GL_TEXTURE_COMPARE_MODE_ARB\0"
3307+ "GL_TEXTURE_COMPARE_OPERATOR_SGIX\0"
3308+ "GL_TEXTURE_COMPARE_SGIX\0"
3309+ "GL_TEXTURE_COMPONENTS\0"
3310+ "GL_TEXTURE_COMPRESSED\0"
3311+ "GL_TEXTURE_COMPRESSED_ARB\0"
3312+ "GL_TEXTURE_COMPRESSED_FORMATS_ARB\0"
3313+ "GL_TEXTURE_COMPRESSED_IMAGE_SIZE\0"
3314+ "GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB\0"
3315+ "GL_TEXTURE_COMPRESSION_HINT\0"
3316+ "GL_TEXTURE_COMPRESSION_HINT_ARB\0"
3317+ "GL_TEXTURE_COORD_ARRAY\0"
3318+ "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING\0"
3319+ "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB\0"
3320+ "GL_TEXTURE_COORD_ARRAY_POINTER\0"
3321+ "GL_TEXTURE_COORD_ARRAY_SIZE\0"
3322+ "GL_TEXTURE_COORD_ARRAY_STRIDE\0"
3323+ "GL_TEXTURE_COORD_ARRAY_TYPE\0"
3324+ "GL_TEXTURE_CUBE_MAP\0"
3325+ "GL_TEXTURE_CUBE_MAP_ARB\0"
3326+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_X\0"
3327+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB\0"
3328+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y\0"
3329+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB\0"
3330+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z\0"
3331+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB\0"
3332+ "GL_TEXTURE_CUBE_MAP_POSITIVE_X\0"
3333+ "GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB\0"
3334+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Y\0"
3335+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB\0"
3336+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Z\0"
3337+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB\0"
3338+ "GL_TEXTURE_DEPTH\0"
3339+ "GL_TEXTURE_DEPTH_SIZE\0"
3340+ "GL_TEXTURE_DEPTH_SIZE_ARB\0"
3341+ "GL_TEXTURE_ENV\0"
3342+ "GL_TEXTURE_ENV_COLOR\0"
3343+ "GL_TEXTURE_ENV_MODE\0"
3344+ "GL_TEXTURE_FILTER_CONTROL\0"
3345+ "GL_TEXTURE_GEN_MODE\0"
3346+ "GL_TEXTURE_GEN_Q\0"
3347+ "GL_TEXTURE_GEN_R\0"
3348+ "GL_TEXTURE_GEN_S\0"
3349+ "GL_TEXTURE_GEN_T\0"
3350+ "GL_TEXTURE_GEQUAL_R_SGIX\0"
3351+ "GL_TEXTURE_GREEN_SIZE\0"
3352+ "GL_TEXTURE_GREEN_SIZE_EXT\0"
3353+ "GL_TEXTURE_HEIGHT\0"
3354+ "GL_TEXTURE_INDEX_SIZE_EXT\0"
3355+ "GL_TEXTURE_INTENSITY_SIZE\0"
3356+ "GL_TEXTURE_INTENSITY_SIZE_EXT\0"
3357+ "GL_TEXTURE_INTERNAL_FORMAT\0"
3358+ "GL_TEXTURE_LEQUAL_R_SGIX\0"
3359+ "GL_TEXTURE_LOD_BIAS\0"
3360+ "GL_TEXTURE_LOD_BIAS_EXT\0"
3361+ "GL_TEXTURE_LOD_BIAS_R_SGIX\0"
3362+ "GL_TEXTURE_LOD_BIAS_S_SGIX\0"
3363+ "GL_TEXTURE_LOD_BIAS_T_SGIX\0"
3364+ "GL_TEXTURE_LUMINANCE_SIZE\0"
3365+ "GL_TEXTURE_LUMINANCE_SIZE_EXT\0"
3366+ "GL_TEXTURE_MAG_FILTER\0"
3367+ "GL_TEXTURE_MATRIX\0"
3368+ "GL_TEXTURE_MAX_ANISOTROPY_EXT\0"
3369+ "GL_TEXTURE_MAX_CLAMP_R_SGIX\0"
3370+ "GL_TEXTURE_MAX_CLAMP_S_SGIX\0"
3371+ "GL_TEXTURE_MAX_CLAMP_T_SGIX\0"
3372+ "GL_TEXTURE_MAX_LEVEL\0"
3373+ "GL_TEXTURE_MAX_LOD\0"
3374+ "GL_TEXTURE_MIN_FILTER\0"
3375+ "GL_TEXTURE_MIN_LOD\0"
3376+ "GL_TEXTURE_PRIORITY\0"
3377+ "GL_TEXTURE_RECTANGLE_ARB\0"
3378+ "GL_TEXTURE_RECTANGLE_NV\0"
3379+ "GL_TEXTURE_RED_SIZE\0"
3380+ "GL_TEXTURE_RED_SIZE_EXT\0"
3381+ "GL_TEXTURE_RESIDENT\0"
3382+ "GL_TEXTURE_STACK_DEPTH\0"
3383+ "GL_TEXTURE_TOO_LARGE_EXT\0"
3384+ "GL_TEXTURE_UNSIGNED_REMAP_MODE_NV\0"
3385+ "GL_TEXTURE_WIDTH\0"
3386+ "GL_TEXTURE_WRAP_R\0"
3387+ "GL_TEXTURE_WRAP_S\0"
3388+ "GL_TEXTURE_WRAP_T\0"
3389+ "GL_TIME_ELAPSED_EXT\0"
3390+ "GL_TRACK_MATRIX_NV\0"
3391+ "GL_TRACK_MATRIX_TRANSFORM_NV\0"
3392+ "GL_TRANSFORM_BIT\0"
3393+ "GL_TRANSPOSE_COLOR_MATRIX\0"
3394+ "GL_TRANSPOSE_COLOR_MATRIX_ARB\0"
3395+ "GL_TRANSPOSE_CURRENT_MATRIX_ARB\0"
3396+ "GL_TRANSPOSE_MODELVIEW_MATRIX\0"
3397+ "GL_TRANSPOSE_MODELVIEW_MATRIX_ARB\0"
3398+ "GL_TRANSPOSE_NV\0"
3399+ "GL_TRANSPOSE_PROJECTION_MATRIX\0"
3400+ "GL_TRANSPOSE_PROJECTION_MATRIX_ARB\0"
3401+ "GL_TRANSPOSE_TEXTURE_MATRIX\0"
3402+ "GL_TRANSPOSE_TEXTURE_MATRIX_ARB\0"
3403+ "GL_TRIANGLES\0"
3404+ "GL_TRIANGLE_FAN\0"
3405+ "GL_TRIANGLE_MESH_SUN\0"
3406+ "GL_TRIANGLE_STRIP\0"
3407+ "GL_TRUE\0"
3408+ "GL_UNPACK_ALIGNMENT\0"
3409+ "GL_UNPACK_IMAGE_HEIGHT\0"
3410+ "GL_UNPACK_LSB_FIRST\0"
3411+ "GL_UNPACK_ROW_LENGTH\0"
3412+ "GL_UNPACK_SKIP_IMAGES\0"
3413+ "GL_UNPACK_SKIP_PIXELS\0"
3414+ "GL_UNPACK_SKIP_ROWS\0"
3415+ "GL_UNPACK_SWAP_BYTES\0"
3416+ "GL_UNSIGNED_BYTE\0"
3417+ "GL_UNSIGNED_BYTE_2_3_3_REV\0"
3418+ "GL_UNSIGNED_BYTE_3_3_2\0"
3419+ "GL_UNSIGNED_INT\0"
3420+ "GL_UNSIGNED_INT_10_10_10_2\0"
3421+ "GL_UNSIGNED_INT_24_8_NV\0"
3422+ "GL_UNSIGNED_INT_2_10_10_10_REV\0"
3423+ "GL_UNSIGNED_INT_8_8_8_8\0"
3424+ "GL_UNSIGNED_INT_8_8_8_8_REV\0"
3425+ "GL_UNSIGNED_SHORT\0"
3426+ "GL_UNSIGNED_SHORT_1_5_5_5_REV\0"
3427+ "GL_UNSIGNED_SHORT_4_4_4_4\0"
3428+ "GL_UNSIGNED_SHORT_4_4_4_4_REV\0"
3429+ "GL_UNSIGNED_SHORT_5_5_5_1\0"
3430+ "GL_UNSIGNED_SHORT_5_6_5\0"
3431+ "GL_UNSIGNED_SHORT_5_6_5_REV\0"
3432+ "GL_UNSIGNED_SHORT_8_8_APPLE\0"
3433+ "GL_UNSIGNED_SHORT_8_8_MESA\0"
3434+ "GL_UNSIGNED_SHORT_8_8_REV_APPLE\0"
3435+ "GL_UNSIGNED_SHORT_8_8_REV_MESA\0"
3436+ "GL_UPPER_LEFT\0"
3437+ "GL_V2F\0"
3438+ "GL_V3F\0"
3439+ "GL_VALIDATE_STATUS\0"
3440+ "GL_VENDOR\0"
3441+ "GL_VERSION\0"
3442+ "GL_VERTEX_ARRAY\0"
3443+ "GL_VERTEX_ARRAY_BINDING_APPLE\0"
3444+ "GL_VERTEX_ARRAY_BUFFER_BINDING\0"
3445+ "GL_VERTEX_ARRAY_BUFFER_BINDING_ARB\0"
3446+ "GL_VERTEX_ARRAY_POINTER\0"
3447+ "GL_VERTEX_ARRAY_SIZE\0"
3448+ "GL_VERTEX_ARRAY_STRIDE\0"
3449+ "GL_VERTEX_ARRAY_TYPE\0"
3450+ "GL_VERTEX_ATTRIB_ARRAY0_NV\0"
3451+ "GL_VERTEX_ATTRIB_ARRAY10_NV\0"
3452+ "GL_VERTEX_ATTRIB_ARRAY11_NV\0"
3453+ "GL_VERTEX_ATTRIB_ARRAY12_NV\0"
3454+ "GL_VERTEX_ATTRIB_ARRAY13_NV\0"
3455+ "GL_VERTEX_ATTRIB_ARRAY14_NV\0"
3456+ "GL_VERTEX_ATTRIB_ARRAY15_NV\0"
3457+ "GL_VERTEX_ATTRIB_ARRAY1_NV\0"
3458+ "GL_VERTEX_ATTRIB_ARRAY2_NV\0"
3459+ "GL_VERTEX_ATTRIB_ARRAY3_NV\0"
3460+ "GL_VERTEX_ATTRIB_ARRAY4_NV\0"
3461+ "GL_VERTEX_ATTRIB_ARRAY5_NV\0"
3462+ "GL_VERTEX_ATTRIB_ARRAY6_NV\0"
3463+ "GL_VERTEX_ATTRIB_ARRAY7_NV\0"
3464+ "GL_VERTEX_ATTRIB_ARRAY8_NV\0"
3465+ "GL_VERTEX_ATTRIB_ARRAY9_NV\0"
3466+ "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\0"
3467+ "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB\0"
3468+ "GL_VERTEX_ATTRIB_ARRAY_ENABLED\0"
3469+ "GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB\0"
3470+ "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED\0"
3471+ "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB\0"
3472+ "GL_VERTEX_ATTRIB_ARRAY_POINTER\0"
3473+ "GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB\0"
3474+ "GL_VERTEX_ATTRIB_ARRAY_SIZE\0"
3475+ "GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB\0"
3476+ "GL_VERTEX_ATTRIB_ARRAY_STRIDE\0"
3477+ "GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB\0"
3478+ "GL_VERTEX_ATTRIB_ARRAY_TYPE\0"
3479+ "GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB\0"
3480+ "GL_VERTEX_BLEND_ARB\0"
3481+ "GL_VERTEX_PROGRAM_ARB\0"
3482+ "GL_VERTEX_PROGRAM_BINDING_NV\0"
3483+ "GL_VERTEX_PROGRAM_NV\0"
3484+ "GL_VERTEX_PROGRAM_POINT_SIZE\0"
3485+ "GL_VERTEX_PROGRAM_POINT_SIZE_ARB\0"
3486+ "GL_VERTEX_PROGRAM_POINT_SIZE_NV\0"
3487+ "GL_VERTEX_PROGRAM_TWO_SIDE\0"
3488+ "GL_VERTEX_PROGRAM_TWO_SIDE_ARB\0"
3489+ "GL_VERTEX_PROGRAM_TWO_SIDE_NV\0"
3490+ "GL_VERTEX_SHADER\0"
3491+ "GL_VERTEX_SHADER_ARB\0"
3492+ "GL_VERTEX_STATE_PROGRAM_NV\0"
3493+ "GL_VIEWPORT\0"
3494+ "GL_VIEWPORT_BIT\0"
3495+ "GL_WEIGHT_ARRAY_ARB\0"
3496+ "GL_WEIGHT_ARRAY_BUFFER_BINDING\0"
3497+ "GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB\0"
3498+ "GL_WEIGHT_ARRAY_POINTER_ARB\0"
3499+ "GL_WEIGHT_ARRAY_SIZE_ARB\0"
3500+ "GL_WEIGHT_ARRAY_STRIDE_ARB\0"
3501+ "GL_WEIGHT_ARRAY_TYPE_ARB\0"
3502+ "GL_WEIGHT_SUM_UNITY_ARB\0"
3503+ "GL_WRAP_BORDER_SUN\0"
3504+ "GL_WRITE_ONLY\0"
3505+ "GL_WRITE_ONLY_ARB\0"
3506+ "GL_XOR\0"
3507+ "GL_YCBCR_422_APPLE\0"
3508+ "GL_YCBCR_MESA\0"
3509+ "GL_ZERO\0"
3510+ "GL_ZOOM_X\0"
3511+ "GL_ZOOM_Y\0"
3512+ ;
3513+
3514+static const enum_elt all_enums[1746] =
3515+{
3516+ { 0, 0x00000600 }, /* GL_2D */
3517+ { 6, 0x00001407 }, /* GL_2_BYTES */
3518+ { 17, 0x00000601 }, /* GL_3D */
3519+ { 23, 0x00000602 }, /* GL_3D_COLOR */
3520+ { 35, 0x00000603 }, /* GL_3D_COLOR_TEXTURE */
3521+ { 55, 0x00001408 }, /* GL_3_BYTES */
3522+ { 66, 0x00000604 }, /* GL_4D_COLOR_TEXTURE */
3523+ { 86, 0x00001409 }, /* GL_4_BYTES */
3524+ { 97, 0x00000100 }, /* GL_ACCUM */
3525+ { 106, 0x00000D5B }, /* GL_ACCUM_ALPHA_BITS */
3526+ { 126, 0x00000D5A }, /* GL_ACCUM_BLUE_BITS */
3527+ { 145, 0x00000200 }, /* GL_ACCUM_BUFFER_BIT */
3528+ { 165, 0x00000B80 }, /* GL_ACCUM_CLEAR_VALUE */
3529+ { 186, 0x00000D59 }, /* GL_ACCUM_GREEN_BITS */
3530+ { 206, 0x00000D58 }, /* GL_ACCUM_RED_BITS */
3531+ { 224, 0x00008B89 }, /* GL_ACTIVE_ATTRIBUTES */
3532+ { 245, 0x00008B8A }, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
3533+ { 276, 0x00008911 }, /* GL_ACTIVE_STENCIL_FACE_EXT */
3534+ { 303, 0x000084E0 }, /* GL_ACTIVE_TEXTURE */
3535+ { 321, 0x000084E0 }, /* GL_ACTIVE_TEXTURE_ARB */
3536+ { 343, 0x00008B86 }, /* GL_ACTIVE_UNIFORMS */
3537+ { 362, 0x00008B87 }, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
3538+ { 391, 0x000086A5 }, /* GL_ACTIVE_VERTEX_UNITS_ARB */
3539+ { 418, 0x00000104 }, /* GL_ADD */
3540+ { 425, 0x00008574 }, /* GL_ADD_SIGNED */
3541+ { 439, 0x00008574 }, /* GL_ADD_SIGNED_ARB */
3542+ { 457, 0x00008574 }, /* GL_ADD_SIGNED_EXT */
3543+ { 475, 0x0000846E }, /* GL_ALIASED_LINE_WIDTH_RANGE */
3544+ { 503, 0x0000846D }, /* GL_ALIASED_POINT_SIZE_RANGE */
3545+ { 531, 0x000FFFFF }, /* GL_ALL_ATTRIB_BITS */
3546+ { 550, 0xFFFFFFFF }, /* GL_ALL_CLIENT_ATTRIB_BITS */
3547+ { 576, 0x00001906 }, /* GL_ALPHA */
3548+ { 585, 0x0000803D }, /* GL_ALPHA12 */
3549+ { 596, 0x0000803D }, /* GL_ALPHA12_EXT */
3550+ { 611, 0x0000803E }, /* GL_ALPHA16 */
3551+ { 622, 0x0000803E }, /* GL_ALPHA16_EXT */
3552+ { 637, 0x0000803B }, /* GL_ALPHA4 */
3553+ { 647, 0x0000803B }, /* GL_ALPHA4_EXT */
3554+ { 661, 0x0000803C }, /* GL_ALPHA8 */
3555+ { 671, 0x0000803C }, /* GL_ALPHA8_EXT */
3556+ { 685, 0x00000D1D }, /* GL_ALPHA_BIAS */
3557+ { 699, 0x00000D55 }, /* GL_ALPHA_BITS */
3558+ { 713, 0x00000D1C }, /* GL_ALPHA_SCALE */
3559+ { 728, 0x00000BC0 }, /* GL_ALPHA_TEST */
3560+ { 742, 0x00000BC1 }, /* GL_ALPHA_TEST_FUNC */
3561+ { 761, 0x00000BC2 }, /* GL_ALPHA_TEST_REF */
3562+ { 779, 0x00000207 }, /* GL_ALWAYS */
3563+ { 789, 0x00001200 }, /* GL_AMBIENT */
3564+ { 800, 0x00001602 }, /* GL_AMBIENT_AND_DIFFUSE */
3565+ { 823, 0x00001501 }, /* GL_AND */
3566+ { 830, 0x00001504 }, /* GL_AND_INVERTED */
3567+ { 846, 0x00001502 }, /* GL_AND_REVERSE */
3568+ { 861, 0x00008892 }, /* GL_ARRAY_BUFFER */
3569+ { 877, 0x00008892 }, /* GL_ARRAY_BUFFER_ARB */
3570+ { 897, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING */
3571+ { 921, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING_ARB */
3572+ { 949, 0x00008B85 }, /* GL_ATTACHED_SHADERS */
3573+ { 969, 0x00008645 }, /* GL_ATTRIB_ARRAY_POINTER_NV */
3574+ { 996, 0x00008623 }, /* GL_ATTRIB_ARRAY_SIZE_NV */
3575+ { 1020, 0x00008624 }, /* GL_ATTRIB_ARRAY_STRIDE_NV */
3576+ { 1046, 0x00008625 }, /* GL_ATTRIB_ARRAY_TYPE_NV */
3577+ { 1070, 0x00000BB0 }, /* GL_ATTRIB_STACK_DEPTH */
3578+ { 1092, 0x00000D80 }, /* GL_AUTO_NORMAL */
3579+ { 1107, 0x00000409 }, /* GL_AUX0 */
3580+ { 1115, 0x0000040A }, /* GL_AUX1 */
3581+ { 1123, 0x0000040B }, /* GL_AUX2 */
3582+ { 1131, 0x0000040C }, /* GL_AUX3 */
3583+ { 1139, 0x00000C00 }, /* GL_AUX_BUFFERS */
3584+ { 1154, 0x00000405 }, /* GL_BACK */
3585+ { 1162, 0x00000402 }, /* GL_BACK_LEFT */
3586+ { 1175, 0x00000403 }, /* GL_BACK_RIGHT */
3587+ { 1189, 0x000080E0 }, /* GL_BGR */
3588+ { 1196, 0x000080E1 }, /* GL_BGRA */
3589+ { 1204, 0x00001A00 }, /* GL_BITMAP */
3590+ { 1214, 0x00000704 }, /* GL_BITMAP_TOKEN */
3591+ { 1230, 0x00000BE2 }, /* GL_BLEND */
3592+ { 1239, 0x00008005 }, /* GL_BLEND_COLOR */
3593+ { 1254, 0x00008005 }, /* GL_BLEND_COLOR_EXT */
3594+ { 1273, 0x00000BE0 }, /* GL_BLEND_DST */
3595+ { 1286, 0x000080CA }, /* GL_BLEND_DST_ALPHA */
3596+ { 1305, 0x000080C8 }, /* GL_BLEND_DST_RGB */
3597+ { 1322, 0x00008009 }, /* GL_BLEND_EQUATION */
3598+ { 1340, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA */
3599+ { 1364, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_EXT */
3600+ { 1392, 0x00008009 }, /* GL_BLEND_EQUATION_EXT */
3601+ { 1414, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_EXT */
3602+ { 1440, 0x00000BE1 }, /* GL_BLEND_SRC */
3603+ { 1453, 0x000080CB }, /* GL_BLEND_SRC_ALPHA */
3604+ { 1472, 0x000080C9 }, /* GL_BLEND_SRC_RGB */
3605+ { 1489, 0x00001905 }, /* GL_BLUE */
3606+ { 1497, 0x00000D1B }, /* GL_BLUE_BIAS */
3607+ { 1510, 0x00000D54 }, /* GL_BLUE_BITS */
3608+ { 1523, 0x00000D1A }, /* GL_BLUE_SCALE */
3609+ { 1537, 0x00008B56 }, /* GL_BOOL */
3610+ { 1545, 0x00008B56 }, /* GL_BOOL_ARB */
3611+ { 1557, 0x00008B57 }, /* GL_BOOL_VEC2 */
3612+ { 1570, 0x00008B57 }, /* GL_BOOL_VEC2_ARB */
3613+ { 1587, 0x00008B58 }, /* GL_BOOL_VEC3 */
3614+ { 1600, 0x00008B58 }, /* GL_BOOL_VEC3_ARB */
3615+ { 1617, 0x00008B59 }, /* GL_BOOL_VEC4 */
3616+ { 1630, 0x00008B59 }, /* GL_BOOL_VEC4_ARB */
3617+ { 1647, 0x000088BB }, /* GL_BUFFER_ACCESS */
3618+ { 1664, 0x000088BB }, /* GL_BUFFER_ACCESS_ARB */
3619+ { 1685, 0x000088BC }, /* GL_BUFFER_MAPPED */
3620+ { 1702, 0x000088BC }, /* GL_BUFFER_MAPPED_ARB */
3621+ { 1723, 0x000088BD }, /* GL_BUFFER_MAP_POINTER */
3622+ { 1745, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_ARB */
3623+ { 1771, 0x00008764 }, /* GL_BUFFER_SIZE */
3624+ { 1786, 0x00008764 }, /* GL_BUFFER_SIZE_ARB */
3625+ { 1805, 0x00008765 }, /* GL_BUFFER_USAGE */
3626+ { 1821, 0x00008765 }, /* GL_BUFFER_USAGE_ARB */
3627+ { 1841, 0x00001400 }, /* GL_BYTE */
3628+ { 1849, 0x00002A24 }, /* GL_C3F_V3F */
3629+ { 1860, 0x00002A26 }, /* GL_C4F_N3F_V3F */
3630+ { 1875, 0x00002A22 }, /* GL_C4UB_V2F */
3631+ { 1887, 0x00002A23 }, /* GL_C4UB_V3F */
3632+ { 1899, 0x00000901 }, /* GL_CCW */
3633+ { 1906, 0x00002900 }, /* GL_CLAMP */
3634+ { 1915, 0x0000812D }, /* GL_CLAMP_TO_BORDER */
3635+ { 1934, 0x0000812D }, /* GL_CLAMP_TO_BORDER_ARB */
3636+ { 1957, 0x0000812D }, /* GL_CLAMP_TO_BORDER_SGIS */
3637+ { 1981, 0x0000812F }, /* GL_CLAMP_TO_EDGE */
3638+ { 1998, 0x0000812F }, /* GL_CLAMP_TO_EDGE_SGIS */
3639+ { 2020, 0x00001500 }, /* GL_CLEAR */
3640+ { 2029, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE */
3641+ { 2054, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE_ARB */
3642+ { 2083, 0xFFFFFFFF }, /* GL_CLIENT_ALL_ATTRIB_BITS */
3643+ { 2109, 0x00000BB1 }, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
3644+ { 2138, 0x00000001 }, /* GL_CLIENT_PIXEL_STORE_BIT */
3645+ { 2164, 0x00000002 }, /* GL_CLIENT_VERTEX_ARRAY_BIT */
3646+ { 2191, 0x00003000 }, /* GL_CLIP_PLANE0 */
3647+ { 2206, 0x00003001 }, /* GL_CLIP_PLANE1 */
3648+ { 2221, 0x00003002 }, /* GL_CLIP_PLANE2 */
3649+ { 2236, 0x00003003 }, /* GL_CLIP_PLANE3 */
3650+ { 2251, 0x00003004 }, /* GL_CLIP_PLANE4 */
3651+ { 2266, 0x00003005 }, /* GL_CLIP_PLANE5 */
3652+ { 2281, 0x000080F0 }, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
3653+ { 2314, 0x00000A00 }, /* GL_COEFF */
3654+ { 2323, 0x00001800 }, /* GL_COLOR */
3655+ { 2332, 0x00008076 }, /* GL_COLOR_ARRAY */
3656+ { 2347, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING */
3657+ { 2377, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING_ARB */
3658+ { 2411, 0x00008090 }, /* GL_COLOR_ARRAY_POINTER */
3659+ { 2434, 0x00008081 }, /* GL_COLOR_ARRAY_SIZE */
3660+ { 2454, 0x00008083 }, /* GL_COLOR_ARRAY_STRIDE */
3661+ { 2476, 0x00008082 }, /* GL_COLOR_ARRAY_TYPE */
3662+ { 2496, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_EXT */
3663+ { 2521, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10_EXT */
3664+ { 2547, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11_EXT */
3665+ { 2573, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12_EXT */
3666+ { 2599, 0x00008CED }, /* GL_COLOR_ATTACHMENT13_EXT */
3667+ { 2625, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14_EXT */
3668+ { 2651, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15_EXT */
3669+ { 2677, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1_EXT */
3670+ { 2702, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2_EXT */
3671+ { 2727, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3_EXT */
3672+ { 2752, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4_EXT */
3673+ { 2777, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5_EXT */
3674+ { 2802, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6_EXT */
3675+ { 2827, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7_EXT */
3676+ { 2852, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8_EXT */
3677+ { 2877, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9_EXT */
3678+ { 2902, 0x00004000 }, /* GL_COLOR_BUFFER_BIT */
3679+ { 2922, 0x00000C22 }, /* GL_COLOR_CLEAR_VALUE */
3680+ { 2943, 0x00001900 }, /* GL_COLOR_INDEX */
3681+ { 2958, 0x00001603 }, /* GL_COLOR_INDEXES */
3682+ { 2975, 0x00000BF2 }, /* GL_COLOR_LOGIC_OP */
3683+ { 2993, 0x00000B57 }, /* GL_COLOR_MATERIAL */
3684+ { 3011, 0x00000B55 }, /* GL_COLOR_MATERIAL_FACE */
3685+ { 3034, 0x00000B56 }, /* GL_COLOR_MATERIAL_PARAMETER */
3686+ { 3062, 0x000080B1 }, /* GL_COLOR_MATRIX */
3687+ { 3078, 0x000080B1 }, /* GL_COLOR_MATRIX_SGI */
3688+ { 3098, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH */
3689+ { 3126, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH_SGI */
3690+ { 3158, 0x00008458 }, /* GL_COLOR_SUM */
3691+ { 3171, 0x00008458 }, /* GL_COLOR_SUM_ARB */
3692+ { 3188, 0x000080D0 }, /* GL_COLOR_TABLE */
3693+ { 3203, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE */
3694+ { 3229, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_EXT */
3695+ { 3259, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_SGI */
3696+ { 3289, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS */
3697+ { 3309, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS_SGI */
3698+ { 3333, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE */
3699+ { 3358, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_EXT */
3700+ { 3387, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_SGI */
3701+ { 3416, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT */
3702+ { 3438, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_EXT */
3703+ { 3464, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_SGI */
3704+ { 3490, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE */
3705+ { 3516, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_EXT */
3706+ { 3546, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_SGI */
3707+ { 3576, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE */
3708+ { 3606, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_EXT */
3709+ { 3640, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_SGI */
3710+ { 3674, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
3711+ { 3704, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_EXT */
3712+ { 3738, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_SGI */
3713+ { 3772, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE */
3714+ { 3796, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_EXT */
3715+ { 3824, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_SGI */
3716+ { 3852, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE */
3717+ { 3873, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE_SGI */
3718+ { 3898, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH */
3719+ { 3919, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_EXT */
3720+ { 3944, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_SGI */
3721+ { 3969, 0x00000C23 }, /* GL_COLOR_WRITEMASK */
3722+ { 3988, 0x00008570 }, /* GL_COMBINE */
3723+ { 3999, 0x00008503 }, /* GL_COMBINE4 */
3724+ { 4011, 0x00008572 }, /* GL_COMBINE_ALPHA */
3725+ { 4028, 0x00008572 }, /* GL_COMBINE_ALPHA_ARB */
3726+ { 4049, 0x00008572 }, /* GL_COMBINE_ALPHA_EXT */
3727+ { 4070, 0x00008570 }, /* GL_COMBINE_ARB */
3728+ { 4085, 0x00008570 }, /* GL_COMBINE_EXT */
3729+ { 4100, 0x00008571 }, /* GL_COMBINE_RGB */
3730+ { 4115, 0x00008571 }, /* GL_COMBINE_RGB_ARB */
3731+ { 4134, 0x00008571 }, /* GL_COMBINE_RGB_EXT */
3732+ { 4153, 0x0000884E }, /* GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT */
3733+ { 4189, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE */
3734+ { 4213, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE_ARB */
3735+ { 4241, 0x00001300 }, /* GL_COMPILE */
3736+ { 4252, 0x00001301 }, /* GL_COMPILE_AND_EXECUTE */
3737+ { 4275, 0x00008B81 }, /* GL_COMPILE_STATUS */
3738+ { 4293, 0x000084E9 }, /* GL_COMPRESSED_ALPHA */
3739+ { 4313, 0x000084E9 }, /* GL_COMPRESSED_ALPHA_ARB */
3740+ { 4337, 0x000084EC }, /* GL_COMPRESSED_INTENSITY */
3741+ { 4361, 0x000084EC }, /* GL_COMPRESSED_INTENSITY_ARB */
3742+ { 4389, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE */
3743+ { 4413, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA */
3744+ { 4443, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA_ARB */
3745+ { 4477, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE_ARB */
3746+ { 4505, 0x000084ED }, /* GL_COMPRESSED_RGB */
3747+ { 4523, 0x000084EE }, /* GL_COMPRESSED_RGBA */
3748+ { 4542, 0x000084EE }, /* GL_COMPRESSED_RGBA_ARB */
3749+ { 4565, 0x000086B1 }, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
3750+ { 4594, 0x000083F1 }, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
3751+ { 4627, 0x000083F2 }, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
3752+ { 4660, 0x000083F3 }, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
3753+ { 4693, 0x000084ED }, /* GL_COMPRESSED_RGB_ARB */
3754+ { 4715, 0x000086B0 }, /* GL_COMPRESSED_RGB_FXT1_3DFX */
3755+ { 4743, 0x000083F0 }, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
3756+ { 4775, 0x000086A3 }, /* GL_COMPRESSED_TEXTURE_FORMATS */
3757+ { 4805, 0x00008576 }, /* GL_CONSTANT */
3758+ { 4817, 0x00008003 }, /* GL_CONSTANT_ALPHA */
3759+ { 4835, 0x00008003 }, /* GL_CONSTANT_ALPHA_EXT */
3760+ { 4857, 0x00008576 }, /* GL_CONSTANT_ARB */
3761+ { 4873, 0x00001207 }, /* GL_CONSTANT_ATTENUATION */
3762+ { 4897, 0x00008151 }, /* GL_CONSTANT_BORDER_HP */
3763+ { 4919, 0x00008001 }, /* GL_CONSTANT_COLOR */
3764+ { 4937, 0x00008001 }, /* GL_CONSTANT_COLOR_EXT */
3765+ { 4959, 0x00008576 }, /* GL_CONSTANT_EXT */
3766+ { 4975, 0x00008010 }, /* GL_CONVOLUTION_1D */
3767+ { 4993, 0x00008011 }, /* GL_CONVOLUTION_2D */
3768+ { 5011, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR */
3769+ { 5039, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR_HP */
3770+ { 5070, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE */
3771+ { 5097, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE_EXT */
3772+ { 5128, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS */
3773+ { 5155, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS_EXT */
3774+ { 5186, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE */
3775+ { 5214, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE_EXT */
3776+ { 5246, 0x00008017 }, /* GL_CONVOLUTION_FORMAT */
3777+ { 5268, 0x00008017 }, /* GL_CONVOLUTION_FORMAT_EXT */
3778+ { 5294, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT */
3779+ { 5316, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT_EXT */
3780+ { 5342, 0x00008018 }, /* GL_CONVOLUTION_WIDTH */
3781+ { 5363, 0x00008018 }, /* GL_CONVOLUTION_WIDTH_EXT */
3782+ { 5388, 0x00008862 }, /* GL_COORD_REPLACE */
3783+ { 5405, 0x00008862 }, /* GL_COORD_REPLACE_ARB */
3784+ { 5426, 0x00008862 }, /* GL_COORD_REPLACE_NV */
3785+ { 5446, 0x00001503 }, /* GL_COPY */
3786+ { 5454, 0x0000150C }, /* GL_COPY_INVERTED */
3787+ { 5471, 0x00000706 }, /* GL_COPY_PIXEL_TOKEN */
3788+ { 5491, 0x00000B44 }, /* GL_CULL_FACE */
3789+ { 5504, 0x00000B45 }, /* GL_CULL_FACE_MODE */
3790+ { 5522, 0x000081AA }, /* GL_CULL_VERTEX_EXT */
3791+ { 5541, 0x000081AC }, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
3792+ { 5573, 0x000081AB }, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
3793+ { 5608, 0x00008626 }, /* GL_CURRENT_ATTRIB_NV */
3794+ { 5629, 0x00000001 }, /* GL_CURRENT_BIT */
3795+ { 5644, 0x00000B00 }, /* GL_CURRENT_COLOR */
3796+ { 5661, 0x00008453 }, /* GL_CURRENT_FOG_COORD */
3797+ { 5682, 0x00008453 }, /* GL_CURRENT_FOG_COORDINATE */
3798+ { 5708, 0x00000B01 }, /* GL_CURRENT_INDEX */
3799+ { 5725, 0x00008641 }, /* GL_CURRENT_MATRIX_ARB */
3800+ { 5747, 0x00008845 }, /* GL_CURRENT_MATRIX_INDEX_ARB */
3801+ { 5775, 0x00008641 }, /* GL_CURRENT_MATRIX_NV */
3802+ { 5796, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
3803+ { 5830, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_NV */
3804+ { 5863, 0x00000B02 }, /* GL_CURRENT_NORMAL */
3805+ { 5881, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_ARB */
3806+ { 5911, 0x00008B8D }, /* GL_CURRENT_PROGRAM */
3807+ { 5930, 0x00008865 }, /* GL_CURRENT_QUERY */
3808+ { 5947, 0x00008865 }, /* GL_CURRENT_QUERY_ARB */
3809+ { 5968, 0x00000B04 }, /* GL_CURRENT_RASTER_COLOR */
3810+ { 5992, 0x00000B09 }, /* GL_CURRENT_RASTER_DISTANCE */
3811+ { 6019, 0x00000B05 }, /* GL_CURRENT_RASTER_INDEX */
3812+ { 6043, 0x00000B07 }, /* GL_CURRENT_RASTER_POSITION */
3813+ { 6070, 0x00000B08 }, /* GL_CURRENT_RASTER_POSITION_VALID */
3814+ { 6103, 0x00000B06 }, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
3815+ { 6136, 0x00008459 }, /* GL_CURRENT_SECONDARY_COLOR */
3816+ { 6163, 0x00000B03 }, /* GL_CURRENT_TEXTURE_COORDS */
3817+ { 6189, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB */
3818+ { 6214, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB_ARB */
3819+ { 6243, 0x000086A8 }, /* GL_CURRENT_WEIGHT_ARB */
3820+ { 6265, 0x00000900 }, /* GL_CW */
3821+ { 6271, 0x0000875B }, /* GL_DEBUG_ASSERT_MESA */
3822+ { 6292, 0x00008759 }, /* GL_DEBUG_OBJECT_MESA */
3823+ { 6313, 0x0000875A }, /* GL_DEBUG_PRINT_MESA */
3824+ { 6333, 0x00002101 }, /* GL_DECAL */
3825+ { 6342, 0x00001E03 }, /* GL_DECR */
3826+ { 6350, 0x00008508 }, /* GL_DECR_WRAP */
3827+ { 6363, 0x00008508 }, /* GL_DECR_WRAP_EXT */
3828+ { 6380, 0x00008B80 }, /* GL_DELETE_STATUS */
3829+ { 6397, 0x00001801 }, /* GL_DEPTH */
3830+ { 6406, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */
3831+ { 6430, 0x00000D1F }, /* GL_DEPTH_BIAS */
3832+ { 6444, 0x00000D56 }, /* GL_DEPTH_BITS */
3833+ { 6458, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */
3834+ { 6478, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */
3835+ { 6503, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */
3836+ { 6523, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */
3837+ { 6541, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */
3838+ { 6562, 0x00001902 }, /* GL_DEPTH_COMPONENT */
3839+ { 6581, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */
3840+ { 6602, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */
3841+ { 6627, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */
3842+ { 6653, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */
3843+ { 6674, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */
3844+ { 6699, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */
3845+ { 6725, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */
3846+ { 6746, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */
3847+ { 6771, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */
3848+ { 6797, 0x00000B74 }, /* GL_DEPTH_FUNC */
3849+ { 6811, 0x00000B70 }, /* GL_DEPTH_RANGE */
3850+ { 6826, 0x00000D1E }, /* GL_DEPTH_SCALE */
3851+ { 6841, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */
3852+ { 6861, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
3853+ { 6889, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
3854+ { 6917, 0x00000B71 }, /* GL_DEPTH_TEST */
3855+ { 6931, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */
3856+ { 6953, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */
3857+ { 6979, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */
3858+ { 6998, 0x00001201 }, /* GL_DIFFUSE */
3859+ { 7009, 0x00000BD0 }, /* GL_DITHER */
3860+ { 7019, 0x00000A02 }, /* GL_DOMAIN */
3861+ { 7029, 0x00001100 }, /* GL_DONT_CARE */
3862+ { 7042, 0x000086AE }, /* GL_DOT3_RGB */
3863+ { 7054, 0x000086AF }, /* GL_DOT3_RGBA */
3864+ { 7067, 0x000086AF }, /* GL_DOT3_RGBA_ARB */
3865+ { 7084, 0x00008741 }, /* GL_DOT3_RGBA_EXT */
3866+ { 7101, 0x000086AE }, /* GL_DOT3_RGB_ARB */
3867+ { 7117, 0x00008740 }, /* GL_DOT3_RGB_EXT */
3868+ { 7133, 0x0000140A }, /* GL_DOUBLE */
3869+ { 7143, 0x00000C32 }, /* GL_DOUBLEBUFFER */
3870+ { 7159, 0x00000C01 }, /* GL_DRAW_BUFFER */
3871+ { 7174, 0x00008825 }, /* GL_DRAW_BUFFER0 */
3872+ { 7190, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */
3873+ { 7210, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */
3874+ { 7230, 0x00008826 }, /* GL_DRAW_BUFFER1 */
3875+ { 7246, 0x0000882F }, /* GL_DRAW_BUFFER10 */
3876+ { 7263, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */
3877+ { 7284, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */
3878+ { 7305, 0x00008830 }, /* GL_DRAW_BUFFER11 */
3879+ { 7322, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */
3880+ { 7343, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */
3881+ { 7364, 0x00008831 }, /* GL_DRAW_BUFFER12 */
3882+ { 7381, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */
3883+ { 7402, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */
3884+ { 7423, 0x00008832 }, /* GL_DRAW_BUFFER13 */
3885+ { 7440, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */
3886+ { 7461, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */
3887+ { 7482, 0x00008833 }, /* GL_DRAW_BUFFER14 */
3888+ { 7499, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */
3889+ { 7520, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */
3890+ { 7541, 0x00008834 }, /* GL_DRAW_BUFFER15 */
3891+ { 7558, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */
3892+ { 7579, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */
3893+ { 7600, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */
3894+ { 7620, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */
3895+ { 7640, 0x00008827 }, /* GL_DRAW_BUFFER2 */
3896+ { 7656, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */
3897+ { 7676, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */
3898+ { 7696, 0x00008828 }, /* GL_DRAW_BUFFER3 */
3899+ { 7712, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */
3900+ { 7732, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */
3901+ { 7752, 0x00008829 }, /* GL_DRAW_BUFFER4 */
3902+ { 7768, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */
3903+ { 7788, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */
3904+ { 7808, 0x0000882A }, /* GL_DRAW_BUFFER5 */
3905+ { 7824, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */
3906+ { 7844, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */
3907+ { 7864, 0x0000882B }, /* GL_DRAW_BUFFER6 */
3908+ { 7880, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */
3909+ { 7900, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */
3910+ { 7920, 0x0000882C }, /* GL_DRAW_BUFFER7 */
3911+ { 7936, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */
3912+ { 7956, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */
3913+ { 7976, 0x0000882D }, /* GL_DRAW_BUFFER8 */
3914+ { 7992, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */
3915+ { 8012, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */
3916+ { 8032, 0x0000882E }, /* GL_DRAW_BUFFER9 */
3917+ { 8048, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */
3918+ { 8068, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */
3919+ { 8088, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
3920+ { 8120, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */
3921+ { 8144, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */
3922+ { 8164, 0x00000304 }, /* GL_DST_ALPHA */
3923+ { 8177, 0x00000306 }, /* GL_DST_COLOR */
3924+ { 8190, 0x000088EA }, /* GL_DYNAMIC_COPY */
3925+ { 8206, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */
3926+ { 8226, 0x000088E8 }, /* GL_DYNAMIC_DRAW */
3927+ { 8242, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */
3928+ { 8262, 0x000088E9 }, /* GL_DYNAMIC_READ */
3929+ { 8278, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */
3930+ { 8298, 0x00000B43 }, /* GL_EDGE_FLAG */
3931+ { 8311, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */
3932+ { 8330, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
3933+ { 8364, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */
3934+ { 8402, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */
3935+ { 8429, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */
3936+ { 8455, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */
3937+ { 8479, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER_ARB */
3938+ { 8507, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
3939+ { 8539, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */
3940+ { 8575, 0x00001600 }, /* GL_EMISSION */
3941+ { 8587, 0x00002000 }, /* GL_ENABLE_BIT */
3942+ { 8601, 0x00000202 }, /* GL_EQUAL */
3943+ { 8610, 0x00001509 }, /* GL_EQUIV */
3944+ { 8619, 0x00010000 }, /* GL_EVAL_BIT */
3945+ { 8631, 0x00000800 }, /* GL_EXP */
3946+ { 8638, 0x00000801 }, /* GL_EXP2 */
3947+ { 8646, 0x00001F03 }, /* GL_EXTENSIONS */
3948+ { 8660, 0x00002400 }, /* GL_EYE_LINEAR */
3949+ { 8674, 0x00002502 }, /* GL_EYE_PLANE */
3950+ { 8687, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */
3951+ { 8712, 0x0000855B }, /* GL_EYE_RADIAL_NV */
3952+ { 8729, 0x00000000 }, /* GL_FALSE */
3953+ { 8738, 0x00001101 }, /* GL_FASTEST */
3954+ { 8749, 0x00001C01 }, /* GL_FEEDBACK */
3955+ { 8761, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */
3956+ { 8788, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */
3957+ { 8812, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */
3958+ { 8836, 0x00001B02 }, /* GL_FILL */
3959+ { 8844, 0x00001D00 }, /* GL_FLAT */
3960+ { 8852, 0x00001406 }, /* GL_FLOAT */
3961+ { 8861, 0x00008B5A }, /* GL_FLOAT_MAT2 */
3962+ { 8875, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */
3963+ { 8893, 0x00008B5B }, /* GL_FLOAT_MAT3 */
3964+ { 8907, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */
3965+ { 8925, 0x00008B5C }, /* GL_FLOAT_MAT4 */
3966+ { 8939, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */
3967+ { 8957, 0x00008B50 }, /* GL_FLOAT_VEC2 */
3968+ { 8971, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */
3969+ { 8989, 0x00008B51 }, /* GL_FLOAT_VEC3 */
3970+ { 9003, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */
3971+ { 9021, 0x00008B52 }, /* GL_FLOAT_VEC4 */
3972+ { 9035, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */
3973+ { 9053, 0x00000B60 }, /* GL_FOG */
3974+ { 9060, 0x00000080 }, /* GL_FOG_BIT */
3975+ { 9071, 0x00000B66 }, /* GL_FOG_COLOR */
3976+ { 9084, 0x00008451 }, /* GL_FOG_COORD */
3977+ { 9097, 0x00008451 }, /* GL_FOG_COORDINATE */
3978+ { 9115, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */
3979+ { 9139, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
3980+ { 9178, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */
3981+ { 9221, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */
3982+ { 9253, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
3983+ { 9284, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */
3984+ { 9313, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */
3985+ { 9338, 0x00008457 }, /* GL_FOG_COORD_ARRAY */
3986+ { 9357, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */
3987+ { 9391, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */
3988+ { 9418, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */
3989+ { 9444, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */
3990+ { 9468, 0x00008450 }, /* GL_FOG_COORD_SRC */
3991+ { 9485, 0x00000B62 }, /* GL_FOG_DENSITY */
3992+ { 9500, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */
3993+ { 9524, 0x00000B64 }, /* GL_FOG_END */
3994+ { 9535, 0x00000C54 }, /* GL_FOG_HINT */
3995+ { 9547, 0x00000B61 }, /* GL_FOG_INDEX */
3996+ { 9560, 0x00000B65 }, /* GL_FOG_MODE */
3997+ { 9572, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */
3998+ { 9591, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */
3999+ { 9616, 0x00000B63 }, /* GL_FOG_START */
4000+ { 9629, 0x00008452 }, /* GL_FRAGMENT_DEPTH */
4001+ { 9647, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */
4002+ { 9671, 0x00008B30 }, /* GL_FRAGMENT_SHADER */
4003+ { 9690, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */
4004+ { 9713, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
4005+ { 9748, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
4006+ { 9790, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
4007+ { 9832, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
4008+ { 9881, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
4009+ { 9933, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
4010+ { 9977, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
4011+ { 10021, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */
4012+ { 10048, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */
4013+ { 10076, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */
4014+ { 10095, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
4015+ { 10136, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
4016+ { 10177, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
4017+ { 10219, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
4018+ { 10270, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
4019+ { 10308, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
4020+ { 10357, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
4021+ { 10399, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
4022+ { 10431, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
4023+ { 10462, 0x00000404 }, /* GL_FRONT */
4024+ { 10471, 0x00000408 }, /* GL_FRONT_AND_BACK */
4025+ { 10489, 0x00000B46 }, /* GL_FRONT_FACE */
4026+ { 10503, 0x00000400 }, /* GL_FRONT_LEFT */
4027+ { 10517, 0x00000401 }, /* GL_FRONT_RIGHT */
4028+ { 10532, 0x00008006 }, /* GL_FUNC_ADD */
4029+ { 10544, 0x00008006 }, /* GL_FUNC_ADD_EXT */
4030+ { 10560, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */
4031+ { 10585, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */
4032+ { 10614, 0x0000800A }, /* GL_FUNC_SUBTRACT */
4033+ { 10631, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */
4034+ { 10652, 0x00008191 }, /* GL_GENERATE_MIPMAP */
4035+ { 10671, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */
4036+ { 10695, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */
4037+ { 10724, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */
4038+ { 10748, 0x00000206 }, /* GL_GEQUAL */
4039+ { 10758, 0x00008009 }, /* GL_GL_BLEND_EQUATION_RGB */
4040+ { 10783, 0x00008C4A }, /* GL_GL_COMPRESSED_SLUMINANCE */
4041+ { 10811, 0x00008C4B }, /* GL_GL_COMPRESSED_SLUMINANCE_ALPHA */
4042+ { 10845, 0x00008C48 }, /* GL_GL_COMPRESSED_SRGB */
4043+ { 10867, 0x00008C49 }, /* GL_GL_COMPRESSED_SRGB_ALPHA */
4044+ { 10895, 0x0000845F }, /* GL_GL_CURRENT_RASTER_SECONDARY_COLOR */
4045+ { 10932, 0x00008B65 }, /* GL_GL_FLOAT_MAT2x3 */
4046+ { 10951, 0x00008B66 }, /* GL_GL_FLOAT_MAT2x4 */
4047+ { 10970, 0x00008B67 }, /* GL_GL_FLOAT_MAT3x2 */
4048+ { 10989, 0x00008B68 }, /* GL_GL_FLOAT_MAT3x4 */
4049+ { 11008, 0x00008B69 }, /* GL_GL_FLOAT_MAT4x2 */
4050+ { 11027, 0x00008B6A }, /* GL_GL_FLOAT_MAT4x3 */
4051+ { 11046, 0x000088EB }, /* GL_GL_PIXEL_PACK_BUFFER */
4052+ { 11070, 0x000088ED }, /* GL_GL_PIXEL_PACK_BUFFER_BINDING */
4053+ { 11102, 0x000088EC }, /* GL_GL_PIXEL_UNPACK_BUFFER */
4054+ { 11128, 0x000088EF }, /* GL_GL_PIXEL_UNPACK_BUFFER_BINDING */
4055+ { 11162, 0x00008C46 }, /* GL_GL_SLUMINANCE */
4056+ { 11179, 0x00008C47 }, /* GL_GL_SLUMINANCE8 */
4057+ { 11197, 0x00008C45 }, /* GL_GL_SLUMINANCE8_ALPHA8 */
4058+ { 11222, 0x00008C44 }, /* GL_GL_SLUMINANCE_ALPHA */
4059+ { 11245, 0x00008C40 }, /* GL_GL_SRGB */
4060+ { 11256, 0x00008C41 }, /* GL_GL_SRGB8 */
4061+ { 11268, 0x00008C43 }, /* GL_GL_SRGB8_ALPHA8 */
4062+ { 11287, 0x00008C42 }, /* GL_GL_SRGB_ALPHA */
4063+ { 11304, 0x00000204 }, /* GL_GREATER */
4064+ { 11315, 0x00001904 }, /* GL_GREEN */
4065+ { 11324, 0x00000D19 }, /* GL_GREEN_BIAS */
4066+ { 11338, 0x00000D53 }, /* GL_GREEN_BITS */
4067+ { 11352, 0x00000D18 }, /* GL_GREEN_SCALE */
4068+ { 11367, 0x00008000 }, /* GL_HINT_BIT */
4069+ { 11379, 0x00008024 }, /* GL_HISTOGRAM */
4070+ { 11392, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */
4071+ { 11416, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */
4072+ { 11444, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */
4073+ { 11467, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */
4074+ { 11494, 0x00008024 }, /* GL_HISTOGRAM_EXT */
4075+ { 11511, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */
4076+ { 11531, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */
4077+ { 11555, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */
4078+ { 11579, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */
4079+ { 11607, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */
4080+ { 11635, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */
4081+ { 11667, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */
4082+ { 11689, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */
4083+ { 11715, 0x0000802D }, /* GL_HISTOGRAM_SINK */
4084+ { 11733, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */
4085+ { 11755, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */
4086+ { 11774, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */
4087+ { 11797, 0x0000862A }, /* GL_IDENTITY_NV */
4088+ { 11812, 0x00008150 }, /* GL_IGNORE_BORDER_HP */
4089+ { 11832, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
4090+ { 11872, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
4091+ { 11910, 0x00001E02 }, /* GL_INCR */
4092+ { 11918, 0x00008507 }, /* GL_INCR_WRAP */
4093+ { 11931, 0x00008507 }, /* GL_INCR_WRAP_EXT */
4094+ { 11948, 0x00008077 }, /* GL_INDEX_ARRAY */
4095+ { 11963, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */
4096+ { 11993, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */
4097+ { 12027, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */
4098+ { 12050, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */
4099+ { 12072, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */
4100+ { 12092, 0x00000D51 }, /* GL_INDEX_BITS */
4101+ { 12106, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */
4102+ { 12127, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */
4103+ { 12145, 0x00000C30 }, /* GL_INDEX_MODE */
4104+ { 12159, 0x00000D13 }, /* GL_INDEX_OFFSET */
4105+ { 12175, 0x00000D12 }, /* GL_INDEX_SHIFT */
4106+ { 12190, 0x00000C21 }, /* GL_INDEX_WRITEMASK */
4107+ { 12209, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */
4108+ { 12228, 0x00001404 }, /* GL_INT */
4109+ { 12235, 0x00008049 }, /* GL_INTENSITY */
4110+ { 12248, 0x0000804C }, /* GL_INTENSITY12 */
4111+ { 12263, 0x0000804C }, /* GL_INTENSITY12_EXT */
4112+ { 12282, 0x0000804D }, /* GL_INTENSITY16 */
4113+ { 12297, 0x0000804D }, /* GL_INTENSITY16_EXT */
4114+ { 12316, 0x0000804A }, /* GL_INTENSITY4 */
4115+ { 12330, 0x0000804A }, /* GL_INTENSITY4_EXT */
4116+ { 12348, 0x0000804B }, /* GL_INTENSITY8 */
4117+ { 12362, 0x0000804B }, /* GL_INTENSITY8_EXT */
4118+ { 12380, 0x00008049 }, /* GL_INTENSITY_EXT */
4119+ { 12397, 0x00008575 }, /* GL_INTERPOLATE */
4120+ { 12412, 0x00008575 }, /* GL_INTERPOLATE_ARB */
4121+ { 12431, 0x00008575 }, /* GL_INTERPOLATE_EXT */
4122+ { 12450, 0x00008B53 }, /* GL_INT_VEC2 */
4123+ { 12462, 0x00008B53 }, /* GL_INT_VEC2_ARB */
4124+ { 12478, 0x00008B54 }, /* GL_INT_VEC3 */
4125+ { 12490, 0x00008B54 }, /* GL_INT_VEC3_ARB */
4126+ { 12506, 0x00008B55 }, /* GL_INT_VEC4 */
4127+ { 12518, 0x00008B55 }, /* GL_INT_VEC4_ARB */
4128+ { 12534, 0x00000500 }, /* GL_INVALID_ENUM */
4129+ { 12550, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
4130+ { 12587, 0x00000502 }, /* GL_INVALID_OPERATION */
4131+ { 12608, 0x00000501 }, /* GL_INVALID_VALUE */
4132+ { 12625, 0x0000862B }, /* GL_INVERSE_NV */
4133+ { 12639, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */
4134+ { 12663, 0x0000150A }, /* GL_INVERT */
4135+ { 12673, 0x00001E00 }, /* GL_KEEP */
4136+ { 12681, 0x00000406 }, /* GL_LEFT */
4137+ { 12689, 0x00000203 }, /* GL_LEQUAL */
4138+ { 12699, 0x00000201 }, /* GL_LESS */
4139+ { 12707, 0x00004000 }, /* GL_LIGHT0 */
4140+ { 12717, 0x00004001 }, /* GL_LIGHT1 */
4141+ { 12727, 0x00004002 }, /* GL_LIGHT2 */
4142+ { 12737, 0x00004003 }, /* GL_LIGHT3 */
4143+ { 12747, 0x00004004 }, /* GL_LIGHT4 */
4144+ { 12757, 0x00004005 }, /* GL_LIGHT5 */
4145+ { 12767, 0x00004006 }, /* GL_LIGHT6 */
4146+ { 12777, 0x00004007 }, /* GL_LIGHT7 */
4147+ { 12787, 0x00000B50 }, /* GL_LIGHTING */
4148+ { 12799, 0x00000040 }, /* GL_LIGHTING_BIT */
4149+ { 12815, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */
4150+ { 12838, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */
4151+ { 12867, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */
4152+ { 12900, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
4153+ { 12928, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */
4154+ { 12952, 0x00001B01 }, /* GL_LINE */
4155+ { 12960, 0x00002601 }, /* GL_LINEAR */
4156+ { 12970, 0x00001208 }, /* GL_LINEAR_ATTENUATION */
4157+ { 12992, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
4158+ { 13022, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
4159+ { 13053, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */
4160+ { 13077, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */
4161+ { 13102, 0x00000001 }, /* GL_LINES */
4162+ { 13111, 0x00000004 }, /* GL_LINE_BIT */
4163+ { 13123, 0x00000002 }, /* GL_LINE_LOOP */
4164+ { 13136, 0x00000707 }, /* GL_LINE_RESET_TOKEN */
4165+ { 13156, 0x00000B20 }, /* GL_LINE_SMOOTH */
4166+ { 13171, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */
4167+ { 13191, 0x00000B24 }, /* GL_LINE_STIPPLE */
4168+ { 13207, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */
4169+ { 13231, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */
4170+ { 13254, 0x00000003 }, /* GL_LINE_STRIP */
4171+ { 13268, 0x00000702 }, /* GL_LINE_TOKEN */
4172+ { 13282, 0x00000B21 }, /* GL_LINE_WIDTH */
4173+ { 13296, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */
4174+ { 13322, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */
4175+ { 13342, 0x00008B82 }, /* GL_LINK_STATUS */
4176+ { 13357, 0x00000B32 }, /* GL_LIST_BASE */
4177+ { 13370, 0x00020000 }, /* GL_LIST_BIT */
4178+ { 13382, 0x00000B33 }, /* GL_LIST_INDEX */
4179+ { 13396, 0x00000B30 }, /* GL_LIST_MODE */
4180+ { 13409, 0x00000101 }, /* GL_LOAD */
4181+ { 13417, 0x00000BF1 }, /* GL_LOGIC_OP */
4182+ { 13429, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */
4183+ { 13446, 0x00008CA1 }, /* GL_LOWER_LEFT */
4184+ { 13460, 0x00001909 }, /* GL_LUMINANCE */
4185+ { 13473, 0x00008041 }, /* GL_LUMINANCE12 */
4186+ { 13488, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */
4187+ { 13511, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */
4188+ { 13538, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */
4189+ { 13560, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */
4190+ { 13586, 0x00008041 }, /* GL_LUMINANCE12_EXT */
4191+ { 13605, 0x00008042 }, /* GL_LUMINANCE16 */
4192+ { 13620, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */
4193+ { 13643, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */
4194+ { 13670, 0x00008042 }, /* GL_LUMINANCE16_EXT */
4195+ { 13689, 0x0000803F }, /* GL_LUMINANCE4 */
4196+ { 13703, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */
4197+ { 13724, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */
4198+ { 13749, 0x0000803F }, /* GL_LUMINANCE4_EXT */
4199+ { 13767, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */
4200+ { 13788, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */
4201+ { 13813, 0x00008040 }, /* GL_LUMINANCE8 */
4202+ { 13827, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */
4203+ { 13848, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */
4204+ { 13873, 0x00008040 }, /* GL_LUMINANCE8_EXT */
4205+ { 13891, 0x0000190A }, /* GL_LUMINANCE_ALPHA */
4206+ { 13910, 0x00000D90 }, /* GL_MAP1_COLOR_4 */
4207+ { 13926, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */
4208+ { 13946, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */
4209+ { 13968, 0x00000D91 }, /* GL_MAP1_INDEX */
4210+ { 13982, 0x00000D92 }, /* GL_MAP1_NORMAL */
4211+ { 13997, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */
4212+ { 14021, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */
4213+ { 14045, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */
4214+ { 14069, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */
4215+ { 14093, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */
4216+ { 14110, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */
4217+ { 14127, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
4218+ { 14155, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
4219+ { 14184, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
4220+ { 14213, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
4221+ { 14242, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
4222+ { 14271, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
4223+ { 14300, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
4224+ { 14329, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
4225+ { 14357, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
4226+ { 14385, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
4227+ { 14413, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
4228+ { 14441, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
4229+ { 14469, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
4230+ { 14497, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
4231+ { 14525, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
4232+ { 14553, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
4233+ { 14581, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */
4234+ { 14597, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */
4235+ { 14617, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */
4236+ { 14639, 0x00000DB1 }, /* GL_MAP2_INDEX */
4237+ { 14653, 0x00000DB2 }, /* GL_MAP2_NORMAL */
4238+ { 14668, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */
4239+ { 14692, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */
4240+ { 14716, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */
4241+ { 14740, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */
4242+ { 14764, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */
4243+ { 14781, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */
4244+ { 14798, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
4245+ { 14826, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
4246+ { 14855, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
4247+ { 14884, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
4248+ { 14913, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
4249+ { 14942, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
4250+ { 14971, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
4251+ { 15000, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
4252+ { 15028, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
4253+ { 15056, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
4254+ { 15084, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
4255+ { 15112, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
4256+ { 15140, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
4257+ { 15168, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */
4258+ { 15196, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
4259+ { 15224, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
4260+ { 15252, 0x00000D10 }, /* GL_MAP_COLOR */
4261+ { 15265, 0x00000D11 }, /* GL_MAP_STENCIL */
4262+ { 15280, 0x000088C0 }, /* GL_MATRIX0_ARB */
4263+ { 15295, 0x00008630 }, /* GL_MATRIX0_NV */
4264+ { 15309, 0x000088CA }, /* GL_MATRIX10_ARB */
4265+ { 15325, 0x000088CB }, /* GL_MATRIX11_ARB */
4266+ { 15341, 0x000088CC }, /* GL_MATRIX12_ARB */
4267+ { 15357, 0x000088CD }, /* GL_MATRIX13_ARB */
4268+ { 15373, 0x000088CE }, /* GL_MATRIX14_ARB */
4269+ { 15389, 0x000088CF }, /* GL_MATRIX15_ARB */
4270+ { 15405, 0x000088D0 }, /* GL_MATRIX16_ARB */
4271+ { 15421, 0x000088D1 }, /* GL_MATRIX17_ARB */
4272+ { 15437, 0x000088D2 }, /* GL_MATRIX18_ARB */
4273+ { 15453, 0x000088D3 }, /* GL_MATRIX19_ARB */
4274+ { 15469, 0x000088C1 }, /* GL_MATRIX1_ARB */
4275+ { 15484, 0x00008631 }, /* GL_MATRIX1_NV */
4276+ { 15498, 0x000088D4 }, /* GL_MATRIX20_ARB */
4277+ { 15514, 0x000088D5 }, /* GL_MATRIX21_ARB */
4278+ { 15530, 0x000088D6 }, /* GL_MATRIX22_ARB */
4279+ { 15546, 0x000088D7 }, /* GL_MATRIX23_ARB */
4280+ { 15562, 0x000088D8 }, /* GL_MATRIX24_ARB */
4281+ { 15578, 0x000088D9 }, /* GL_MATRIX25_ARB */
4282+ { 15594, 0x000088DA }, /* GL_MATRIX26_ARB */
4283+ { 15610, 0x000088DB }, /* GL_MATRIX27_ARB */
4284+ { 15626, 0x000088DC }, /* GL_MATRIX28_ARB */
4285+ { 15642, 0x000088DD }, /* GL_MATRIX29_ARB */
4286+ { 15658, 0x000088C2 }, /* GL_MATRIX2_ARB */
4287+ { 15673, 0x00008632 }, /* GL_MATRIX2_NV */
4288+ { 15687, 0x000088DE }, /* GL_MATRIX30_ARB */
4289+ { 15703, 0x000088DF }, /* GL_MATRIX31_ARB */
4290+ { 15719, 0x000088C3 }, /* GL_MATRIX3_ARB */
4291+ { 15734, 0x00008633 }, /* GL_MATRIX3_NV */
4292+ { 15748, 0x000088C4 }, /* GL_MATRIX4_ARB */
4293+ { 15763, 0x00008634 }, /* GL_MATRIX4_NV */
4294+ { 15777, 0x000088C5 }, /* GL_MATRIX5_ARB */
4295+ { 15792, 0x00008635 }, /* GL_MATRIX5_NV */
4296+ { 15806, 0x000088C6 }, /* GL_MATRIX6_ARB */
4297+ { 15821, 0x00008636 }, /* GL_MATRIX6_NV */
4298+ { 15835, 0x000088C7 }, /* GL_MATRIX7_ARB */
4299+ { 15850, 0x00008637 }, /* GL_MATRIX7_NV */
4300+ { 15864, 0x000088C8 }, /* GL_MATRIX8_ARB */
4301+ { 15879, 0x000088C9 }, /* GL_MATRIX9_ARB */
4302+ { 15894, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */
4303+ { 15920, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
4304+ { 15954, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
4305+ { 15985, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
4306+ { 16018, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
4307+ { 16049, 0x00000BA0 }, /* GL_MATRIX_MODE */
4308+ { 16064, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */
4309+ { 16086, 0x00008008 }, /* GL_MAX */
4310+ { 16093, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */
4311+ { 16116, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
4312+ { 16148, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */
4313+ { 16174, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
4314+ { 16207, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
4315+ { 16233, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
4316+ { 16267, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */
4317+ { 16286, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
4318+ { 16315, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
4319+ { 16347, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */
4320+ { 16383, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
4321+ { 16419, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
4322+ { 16459, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */
4323+ { 16485, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */
4324+ { 16515, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */
4325+ { 16540, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */
4326+ { 16569, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
4327+ { 16598, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */
4328+ { 16631, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */
4329+ { 16651, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */
4330+ { 16675, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */
4331+ { 16699, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */
4332+ { 16723, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */
4333+ { 16748, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */
4334+ { 16766, 0x00008008 }, /* GL_MAX_EXT */
4335+ { 16777, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
4336+ { 16812, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
4337+ { 16851, 0x00000D31 }, /* GL_MAX_LIGHTS */
4338+ { 16865, 0x00000B31 }, /* GL_MAX_LIST_NESTING */
4339+ { 16885, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
4340+ { 16923, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */
4341+ { 16952, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */
4342+ { 16976, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */
4343+ { 17004, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */
4344+ { 17027, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
4345+ { 17064, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
4346+ { 17100, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
4347+ { 17127, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
4348+ { 17156, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
4349+ { 17190, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
4350+ { 17226, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
4351+ { 17253, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
4352+ { 17285, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
4353+ { 17321, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
4354+ { 17350, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
4355+ { 17379, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */
4356+ { 17407, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
4357+ { 17445, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
4358+ { 17489, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
4359+ { 17532, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
4360+ { 17566, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
4361+ { 17605, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
4362+ { 17642, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
4363+ { 17680, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
4364+ { 17723, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
4365+ { 17766, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
4366+ { 17796, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
4367+ { 17827, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
4368+ { 17863, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
4369+ { 17899, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */
4370+ { 17929, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
4371+ { 17963, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */
4372+ { 17996, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
4373+ { 18025, 0x00008504 }, /* GL_MAX_SHININESS_NV */
4374+ { 18045, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */
4375+ { 18069, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */
4376+ { 18091, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */
4377+ { 18117, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */
4378+ { 18144, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
4379+ { 18175, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */
4380+ { 18199, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
4381+ { 18233, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */
4382+ { 18253, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */
4383+ { 18280, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */
4384+ { 18301, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */
4385+ { 18326, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */
4386+ { 18351, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
4387+ { 18386, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */
4388+ { 18408, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */
4389+ { 18434, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */
4390+ { 18456, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */
4391+ { 18482, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
4392+ { 18516, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
4393+ { 18554, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
4394+ { 18587, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
4395+ { 18624, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */
4396+ { 18648, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */
4397+ { 18669, 0x00008007 }, /* GL_MIN */
4398+ { 18676, 0x0000802E }, /* GL_MINMAX */
4399+ { 18686, 0x0000802E }, /* GL_MINMAX_EXT */
4400+ { 18700, 0x0000802F }, /* GL_MINMAX_FORMAT */
4401+ { 18717, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */
4402+ { 18738, 0x00008030 }, /* GL_MINMAX_SINK */
4403+ { 18753, 0x00008030 }, /* GL_MINMAX_SINK_EXT */
4404+ { 18772, 0x00008007 }, /* GL_MIN_EXT */
4405+ { 18783, 0x00008370 }, /* GL_MIRRORED_REPEAT */
4406+ { 18802, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */
4407+ { 18825, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */
4408+ { 18848, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */
4409+ { 18868, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */
4410+ { 18888, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
4411+ { 18918, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */
4412+ { 18946, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
4413+ { 18974, 0x00001700 }, /* GL_MODELVIEW */
4414+ { 18987, 0x00001700 }, /* GL_MODELVIEW0_ARB */
4415+ { 19005, 0x0000872A }, /* GL_MODELVIEW10_ARB */
4416+ { 19024, 0x0000872B }, /* GL_MODELVIEW11_ARB */
4417+ { 19043, 0x0000872C }, /* GL_MODELVIEW12_ARB */
4418+ { 19062, 0x0000872D }, /* GL_MODELVIEW13_ARB */
4419+ { 19081, 0x0000872E }, /* GL_MODELVIEW14_ARB */
4420+ { 19100, 0x0000872F }, /* GL_MODELVIEW15_ARB */
4421+ { 19119, 0x00008730 }, /* GL_MODELVIEW16_ARB */
4422+ { 19138, 0x00008731 }, /* GL_MODELVIEW17_ARB */
4423+ { 19157, 0x00008732 }, /* GL_MODELVIEW18_ARB */
4424+ { 19176, 0x00008733 }, /* GL_MODELVIEW19_ARB */
4425+ { 19195, 0x0000850A }, /* GL_MODELVIEW1_ARB */
4426+ { 19213, 0x00008734 }, /* GL_MODELVIEW20_ARB */
4427+ { 19232, 0x00008735 }, /* GL_MODELVIEW21_ARB */
4428+ { 19251, 0x00008736 }, /* GL_MODELVIEW22_ARB */
4429+ { 19270, 0x00008737 }, /* GL_MODELVIEW23_ARB */
4430+ { 19289, 0x00008738 }, /* GL_MODELVIEW24_ARB */
4431+ { 19308, 0x00008739 }, /* GL_MODELVIEW25_ARB */
4432+ { 19327, 0x0000873A }, /* GL_MODELVIEW26_ARB */
4433+ { 19346, 0x0000873B }, /* GL_MODELVIEW27_ARB */
4434+ { 19365, 0x0000873C }, /* GL_MODELVIEW28_ARB */
4435+ { 19384, 0x0000873D }, /* GL_MODELVIEW29_ARB */
4436+ { 19403, 0x00008722 }, /* GL_MODELVIEW2_ARB */
4437+ { 19421, 0x0000873E }, /* GL_MODELVIEW30_ARB */
4438+ { 19440, 0x0000873F }, /* GL_MODELVIEW31_ARB */
4439+ { 19459, 0x00008723 }, /* GL_MODELVIEW3_ARB */
4440+ { 19477, 0x00008724 }, /* GL_MODELVIEW4_ARB */
4441+ { 19495, 0x00008725 }, /* GL_MODELVIEW5_ARB */
4442+ { 19513, 0x00008726 }, /* GL_MODELVIEW6_ARB */
4443+ { 19531, 0x00008727 }, /* GL_MODELVIEW7_ARB */
4444+ { 19549, 0x00008728 }, /* GL_MODELVIEW8_ARB */
4445+ { 19567, 0x00008729 }, /* GL_MODELVIEW9_ARB */
4446+ { 19585, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */
4447+ { 19605, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */
4448+ { 19632, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */
4449+ { 19657, 0x00002100 }, /* GL_MODULATE */
4450+ { 19669, 0x00008744 }, /* GL_MODULATE_ADD_ATI */
4451+ { 19689, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */
4452+ { 19716, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */
4453+ { 19741, 0x00000103 }, /* GL_MULT */
4454+ { 19749, 0x0000809D }, /* GL_MULTISAMPLE */
4455+ { 19764, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */
4456+ { 19784, 0x0000809D }, /* GL_MULTISAMPLE_ARB */
4457+ { 19803, 0x20000000 }, /* GL_MULTISAMPLE_BIT */
4458+ { 19822, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */
4459+ { 19846, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */
4460+ { 19869, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */
4461+ { 19899, 0x00002A25 }, /* GL_N3F_V3F */
4462+ { 19910, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */
4463+ { 19930, 0x0000150E }, /* GL_NAND */
4464+ { 19938, 0x00002600 }, /* GL_NEAREST */
4465+ { 19949, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
4466+ { 19980, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
4467+ { 20012, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */
4468+ { 20037, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */
4469+ { 20063, 0x00000200 }, /* GL_NEVER */
4470+ { 20072, 0x00001102 }, /* GL_NICEST */
4471+ { 20082, 0x00000000 }, /* GL_NONE */
4472+ { 20090, 0x00001505 }, /* GL_NOOP */
4473+ { 20098, 0x00001508 }, /* GL_NOR */
4474+ { 20105, 0x00000BA1 }, /* GL_NORMALIZE */
4475+ { 20118, 0x00008075 }, /* GL_NORMAL_ARRAY */
4476+ { 20134, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
4477+ { 20165, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */
4478+ { 20200, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */
4479+ { 20224, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */
4480+ { 20247, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */
4481+ { 20268, 0x00008511 }, /* GL_NORMAL_MAP */
4482+ { 20282, 0x00008511 }, /* GL_NORMAL_MAP_ARB */
4483+ { 20300, 0x00008511 }, /* GL_NORMAL_MAP_NV */
4484+ { 20317, 0x00000205 }, /* GL_NOTEQUAL */
4485+ { 20329, 0x00000000 }, /* GL_NO_ERROR */
4486+ { 20341, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
4487+ { 20375, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */
4488+ { 20413, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
4489+ { 20445, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
4490+ { 20487, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
4491+ { 20517, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
4492+ { 20557, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
4493+ { 20588, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */
4494+ { 20617, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */
4495+ { 20645, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
4496+ { 20675, 0x00002401 }, /* GL_OBJECT_LINEAR */
4497+ { 20692, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */
4498+ { 20718, 0x00002501 }, /* GL_OBJECT_PLANE */
4499+ { 20734, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
4500+ { 20769, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */
4501+ { 20791, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */
4502+ { 20810, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */
4503+ { 20840, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */
4504+ { 20861, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */
4505+ { 20889, 0x00000001 }, /* GL_ONE */
4506+ { 20896, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */
4507+ { 20924, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */
4508+ { 20956, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */
4509+ { 20984, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */
4510+ { 21016, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */
4511+ { 21039, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */
4512+ { 21062, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */
4513+ { 21085, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */
4514+ { 21108, 0x00008598 }, /* GL_OPERAND0_ALPHA */
4515+ { 21126, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */
4516+ { 21148, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */
4517+ { 21170, 0x00008590 }, /* GL_OPERAND0_RGB */
4518+ { 21186, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */
4519+ { 21206, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */
4520+ { 21226, 0x00008599 }, /* GL_OPERAND1_ALPHA */
4521+ { 21244, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */
4522+ { 21266, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */
4523+ { 21288, 0x00008591 }, /* GL_OPERAND1_RGB */
4524+ { 21304, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */
4525+ { 21324, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */
4526+ { 21344, 0x0000859A }, /* GL_OPERAND2_ALPHA */
4527+ { 21362, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */
4528+ { 21384, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */
4529+ { 21406, 0x00008592 }, /* GL_OPERAND2_RGB */
4530+ { 21422, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */
4531+ { 21442, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */
4532+ { 21462, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */
4533+ { 21483, 0x00008593 }, /* GL_OPERAND3_RGB_NV */
4534+ { 21502, 0x00001507 }, /* GL_OR */
4535+ { 21508, 0x00000A01 }, /* GL_ORDER */
4536+ { 21517, 0x0000150D }, /* GL_OR_INVERTED */
4537+ { 21532, 0x0000150B }, /* GL_OR_REVERSE */
4538+ { 21546, 0x00000505 }, /* GL_OUT_OF_MEMORY */
4539+ { 21563, 0x00000D05 }, /* GL_PACK_ALIGNMENT */
4540+ { 21581, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */
4541+ { 21602, 0x00008758 }, /* GL_PACK_INVERT_MESA */
4542+ { 21622, 0x00000D01 }, /* GL_PACK_LSB_FIRST */
4543+ { 21640, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */
4544+ { 21659, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */
4545+ { 21679, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */
4546+ { 21699, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */
4547+ { 21717, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */
4548+ { 21736, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */
4549+ { 21761, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */
4550+ { 21785, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */
4551+ { 21806, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */
4552+ { 21828, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */
4553+ { 21850, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */
4554+ { 21875, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */
4555+ { 21899, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */
4556+ { 21920, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */
4557+ { 21942, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */
4558+ { 21964, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */
4559+ { 21986, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */
4560+ { 22017, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */
4561+ { 22037, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */
4562+ { 22062, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */
4563+ { 22082, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */
4564+ { 22107, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */
4565+ { 22127, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */
4566+ { 22152, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */
4567+ { 22172, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */
4568+ { 22197, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */
4569+ { 22217, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */
4570+ { 22242, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */
4571+ { 22262, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */
4572+ { 22287, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */
4573+ { 22307, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */
4574+ { 22332, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */
4575+ { 22352, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */
4576+ { 22377, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */
4577+ { 22397, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */
4578+ { 22422, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */
4579+ { 22442, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */
4580+ { 22467, 0x00000020 }, /* GL_PIXEL_MODE_BIT */
4581+ { 22485, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
4582+ { 22518, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */
4583+ { 22543, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
4584+ { 22578, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */
4585+ { 22605, 0x00001B00 }, /* GL_POINT */
4586+ { 22614, 0x00000000 }, /* GL_POINTS */
4587+ { 22624, 0x00000002 }, /* GL_POINT_BIT */
4588+ { 22637, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */
4589+ { 22667, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */
4590+ { 22701, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */
4591+ { 22735, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */
4592+ { 22770, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */
4593+ { 22799, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */
4594+ { 22832, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */
4595+ { 22865, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */
4596+ { 22899, 0x00000B11 }, /* GL_POINT_SIZE */
4597+ { 22913, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */
4598+ { 22939, 0x00008127 }, /* GL_POINT_SIZE_MAX */
4599+ { 22957, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */
4600+ { 22979, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */
4601+ { 23001, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */
4602+ { 23024, 0x00008126 }, /* GL_POINT_SIZE_MIN */
4603+ { 23042, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */
4604+ { 23064, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */
4605+ { 23086, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */
4606+ { 23109, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */
4607+ { 23129, 0x00000B10 }, /* GL_POINT_SMOOTH */
4608+ { 23145, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */
4609+ { 23166, 0x00008861 }, /* GL_POINT_SPRITE */
4610+ { 23182, 0x00008861 }, /* GL_POINT_SPRITE_ARB */
4611+ { 23202, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */
4612+ { 23231, 0x00008861 }, /* GL_POINT_SPRITE_NV */
4613+ { 23250, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */
4614+ { 23276, 0x00000701 }, /* GL_POINT_TOKEN */
4615+ { 23291, 0x00000009 }, /* GL_POLYGON */
4616+ { 23302, 0x00000008 }, /* GL_POLYGON_BIT */
4617+ { 23317, 0x00000B40 }, /* GL_POLYGON_MODE */
4618+ { 23333, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */
4619+ { 23356, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */
4620+ { 23381, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */
4621+ { 23404, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */
4622+ { 23427, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */
4623+ { 23451, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */
4624+ { 23475, 0x00000B41 }, /* GL_POLYGON_SMOOTH */
4625+ { 23493, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */
4626+ { 23516, 0x00000B42 }, /* GL_POLYGON_STIPPLE */
4627+ { 23535, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */
4628+ { 23558, 0x00000703 }, /* GL_POLYGON_TOKEN */
4629+ { 23575, 0x00001203 }, /* GL_POSITION */
4630+ { 23587, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
4631+ { 23619, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */
4632+ { 23655, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
4633+ { 23688, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */
4634+ { 23725, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
4635+ { 23756, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */
4636+ { 23791, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
4637+ { 23823, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */
4638+ { 23859, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
4639+ { 23892, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
4640+ { 23924, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */
4641+ { 23960, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
4642+ { 23993, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */
4643+ { 24030, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */
4644+ { 24060, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */
4645+ { 24094, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */
4646+ { 24125, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */
4647+ { 24160, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
4648+ { 24191, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */
4649+ { 24226, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
4650+ { 24258, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */
4651+ { 24294, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */
4652+ { 24324, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */
4653+ { 24358, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */
4654+ { 24389, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */
4655+ { 24424, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */
4656+ { 24456, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */
4657+ { 24487, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */
4658+ { 24522, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */
4659+ { 24554, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */
4660+ { 24590, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */
4661+ { 24619, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */
4662+ { 24652, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */
4663+ { 24682, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */
4664+ { 24716, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
4665+ { 24755, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
4666+ { 24788, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
4667+ { 24828, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
4668+ { 24862, 0x00008578 }, /* GL_PREVIOUS */
4669+ { 24874, 0x00008578 }, /* GL_PREVIOUS_ARB */
4670+ { 24890, 0x00008578 }, /* GL_PREVIOUS_EXT */
4671+ { 24906, 0x00008577 }, /* GL_PRIMARY_COLOR */
4672+ { 24923, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */
4673+ { 24944, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */
4674+ { 24965, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
4675+ { 24998, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
4676+ { 25030, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */
4677+ { 25053, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */
4678+ { 25076, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */
4679+ { 25106, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */
4680+ { 25135, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */
4681+ { 25163, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */
4682+ { 25185, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */
4683+ { 25213, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */
4684+ { 25241, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */
4685+ { 25263, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */
4686+ { 25284, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
4687+ { 25324, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
4688+ { 25363, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
4689+ { 25393, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
4690+ { 25428, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
4691+ { 25461, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
4692+ { 25495, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
4693+ { 25534, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
4694+ { 25573, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */
4695+ { 25595, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */
4696+ { 25621, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */
4697+ { 25645, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */
4698+ { 25668, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */
4699+ { 25690, 0x00008628 }, /* GL_PROGRAM_STRING_NV */
4700+ { 25711, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */
4701+ { 25732, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */
4702+ { 25759, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
4703+ { 25791, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
4704+ { 25823, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
4705+ { 25858, 0x00001701 }, /* GL_PROJECTION */
4706+ { 25872, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */
4707+ { 25893, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */
4708+ { 25919, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */
4709+ { 25940, 0x00008025 }, /* GL_PROXY_HISTOGRAM */
4710+ { 25959, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */
4711+ { 25982, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
4712+ { 26021, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
4713+ { 26059, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */
4714+ { 26079, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
4715+ { 26109, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */
4716+ { 26133, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */
4717+ { 26153, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
4718+ { 26183, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */
4719+ { 26207, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */
4720+ { 26227, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
4721+ { 26260, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */
4722+ { 26286, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */
4723+ { 26316, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
4724+ { 26347, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */
4725+ { 26377, 0x00002003 }, /* GL_Q */
4726+ { 26382, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */
4727+ { 26407, 0x00000007 }, /* GL_QUADS */
4728+ { 26416, 0x00008614 }, /* GL_QUAD_MESH_SUN */
4729+ { 26433, 0x00000008 }, /* GL_QUAD_STRIP */
4730+ { 26447, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */
4731+ { 26469, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */
4732+ { 26495, 0x00008866 }, /* GL_QUERY_RESULT */
4733+ { 26511, 0x00008866 }, /* GL_QUERY_RESULT_ARB */
4734+ { 26531, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */
4735+ { 26557, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */
4736+ { 26587, 0x00002002 }, /* GL_R */
4737+ { 26592, 0x00002A10 }, /* GL_R3_G3_B2 */
4738+ { 26604, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
4739+ { 26637, 0x00000C02 }, /* GL_READ_BUFFER */
4740+ { 26652, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
4741+ { 26684, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */
4742+ { 26708, 0x000088B8 }, /* GL_READ_ONLY */
4743+ { 26721, 0x000088B8 }, /* GL_READ_ONLY_ARB */
4744+ { 26738, 0x000088BA }, /* GL_READ_WRITE */
4745+ { 26752, 0x000088BA }, /* GL_READ_WRITE_ARB */
4746+ { 26770, 0x00001903 }, /* GL_RED */
4747+ { 26777, 0x00008016 }, /* GL_REDUCE */
4748+ { 26787, 0x00008016 }, /* GL_REDUCE_EXT */
4749+ { 26801, 0x00000D15 }, /* GL_RED_BIAS */
4750+ { 26813, 0x00000D52 }, /* GL_RED_BITS */
4751+ { 26825, 0x00000D14 }, /* GL_RED_SCALE */
4752+ { 26838, 0x00008512 }, /* GL_REFLECTION_MAP */
4753+ { 26856, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */
4754+ { 26878, 0x00008512 }, /* GL_REFLECTION_MAP_NV */
4755+ { 26899, 0x00001C00 }, /* GL_RENDER */
4756+ { 26909, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */
4757+ { 26937, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */
4758+ { 26957, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */
4759+ { 26984, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
4760+ { 27020, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */
4761+ { 27046, 0x00001F01 }, /* GL_RENDERER */
4762+ { 27058, 0x00000C40 }, /* GL_RENDER_MODE */
4763+ { 27073, 0x00002901 }, /* GL_REPEAT */
4764+ { 27083, 0x00001E01 }, /* GL_REPLACE */
4765+ { 27094, 0x00008062 }, /* GL_REPLACE_EXT */
4766+ { 27109, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */
4767+ { 27132, 0x0000803A }, /* GL_RESCALE_NORMAL */
4768+ { 27150, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */
4769+ { 27172, 0x00000102 }, /* GL_RETURN */
4770+ { 27182, 0x00001907 }, /* GL_RGB */
4771+ { 27189, 0x00008052 }, /* GL_RGB10 */
4772+ { 27198, 0x00008059 }, /* GL_RGB10_A2 */
4773+ { 27210, 0x00008059 }, /* GL_RGB10_A2_EXT */
4774+ { 27226, 0x00008052 }, /* GL_RGB10_EXT */
4775+ { 27239, 0x00008053 }, /* GL_RGB12 */
4776+ { 27248, 0x00008053 }, /* GL_RGB12_EXT */
4777+ { 27261, 0x00008054 }, /* GL_RGB16 */
4778+ { 27270, 0x00008054 }, /* GL_RGB16_EXT */
4779+ { 27283, 0x0000804E }, /* GL_RGB2_EXT */
4780+ { 27295, 0x0000804F }, /* GL_RGB4 */
4781+ { 27303, 0x0000804F }, /* GL_RGB4_EXT */
4782+ { 27315, 0x000083A1 }, /* GL_RGB4_S3TC */
4783+ { 27328, 0x00008050 }, /* GL_RGB5 */
4784+ { 27336, 0x00008057 }, /* GL_RGB5_A1 */
4785+ { 27347, 0x00008057 }, /* GL_RGB5_A1_EXT */
4786+ { 27362, 0x00008050 }, /* GL_RGB5_EXT */
4787+ { 27374, 0x00008051 }, /* GL_RGB8 */
4788+ { 27382, 0x00008051 }, /* GL_RGB8_EXT */
4789+ { 27394, 0x00001908 }, /* GL_RGBA */
4790+ { 27402, 0x0000805A }, /* GL_RGBA12 */
4791+ { 27412, 0x0000805A }, /* GL_RGBA12_EXT */
4792+ { 27426, 0x0000805B }, /* GL_RGBA16 */
4793+ { 27436, 0x0000805B }, /* GL_RGBA16_EXT */
4794+ { 27450, 0x00008055 }, /* GL_RGBA2 */
4795+ { 27459, 0x00008055 }, /* GL_RGBA2_EXT */
4796+ { 27472, 0x00008056 }, /* GL_RGBA4 */
4797+ { 27481, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */
4798+ { 27500, 0x00008056 }, /* GL_RGBA4_EXT */
4799+ { 27513, 0x000083A3 }, /* GL_RGBA4_S3TC */
4800+ { 27527, 0x00008058 }, /* GL_RGBA8 */
4801+ { 27536, 0x00008058 }, /* GL_RGBA8_EXT */
4802+ { 27549, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */
4803+ { 27567, 0x00000C31 }, /* GL_RGBA_MODE */
4804+ { 27580, 0x000083A2 }, /* GL_RGBA_S3TC */
4805+ { 27593, 0x000083A0 }, /* GL_RGB_S3TC */
4806+ { 27605, 0x00008573 }, /* GL_RGB_SCALE */
4807+ { 27618, 0x00008573 }, /* GL_RGB_SCALE_ARB */
4808+ { 27635, 0x00008573 }, /* GL_RGB_SCALE_EXT */
4809+ { 27652, 0x00000407 }, /* GL_RIGHT */
4810+ { 27661, 0x00002000 }, /* GL_S */
4811+ { 27666, 0x00008B5D }, /* GL_SAMPLER_1D */
4812+ { 27680, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */
4813+ { 27701, 0x00008B5E }, /* GL_SAMPLER_2D */
4814+ { 27715, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */
4815+ { 27736, 0x00008B5F }, /* GL_SAMPLER_3D */
4816+ { 27750, 0x00008B60 }, /* GL_SAMPLER_CUBE */
4817+ { 27766, 0x000080A9 }, /* GL_SAMPLES */
4818+ { 27777, 0x000086B4 }, /* GL_SAMPLES_3DFX */
4819+ { 27793, 0x000080A9 }, /* GL_SAMPLES_ARB */
4820+ { 27808, 0x00008914 }, /* GL_SAMPLES_PASSED */
4821+ { 27826, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */
4822+ { 27848, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
4823+ { 27876, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */
4824+ { 27908, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */
4825+ { 27931, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */
4826+ { 27958, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */
4827+ { 27976, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */
4828+ { 27999, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */
4829+ { 28021, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */
4830+ { 28040, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */
4831+ { 28063, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */
4832+ { 28089, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */
4833+ { 28119, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */
4834+ { 28144, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */
4835+ { 28173, 0x00080000 }, /* GL_SCISSOR_BIT */
4836+ { 28188, 0x00000C10 }, /* GL_SCISSOR_BOX */
4837+ { 28203, 0x00000C11 }, /* GL_SCISSOR_TEST */
4838+ { 28219, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */
4839+ { 28244, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
4840+ { 28284, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */
4841+ { 28328, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
4842+ { 28361, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
4843+ { 28391, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
4844+ { 28423, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
4845+ { 28453, 0x00001C02 }, /* GL_SELECT */
4846+ { 28463, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */
4847+ { 28491, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */
4848+ { 28516, 0x00008012 }, /* GL_SEPARABLE_2D */
4849+ { 28532, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */
4850+ { 28559, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */
4851+ { 28590, 0x0000150F }, /* GL_SET */
4852+ { 28597, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */
4853+ { 28618, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */
4854+ { 28642, 0x00008B4F }, /* GL_SHADER_TYPE */
4855+ { 28657, 0x00000B54 }, /* GL_SHADE_MODEL */
4856+ { 28672, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */
4857+ { 28700, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */
4858+ { 28723, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */
4859+ { 28753, 0x00001601 }, /* GL_SHININESS */
4860+ { 28766, 0x00001402 }, /* GL_SHORT */
4861+ { 28775, 0x000081F9 }, /* GL_SINGLE_COLOR */
4862+ { 28791, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */
4863+ { 28811, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */
4864+ { 28830, 0x00001D01 }, /* GL_SMOOTH */
4865+ { 28840, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */
4866+ { 28873, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */
4867+ { 28900, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */
4868+ { 28933, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */
4869+ { 28960, 0x00008588 }, /* GL_SOURCE0_ALPHA */
4870+ { 28977, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */
4871+ { 28998, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */
4872+ { 29019, 0x00008580 }, /* GL_SOURCE0_RGB */
4873+ { 29034, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */
4874+ { 29053, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */
4875+ { 29072, 0x00008589 }, /* GL_SOURCE1_ALPHA */
4876+ { 29089, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */
4877+ { 29110, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */
4878+ { 29131, 0x00008581 }, /* GL_SOURCE1_RGB */
4879+ { 29146, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */
4880+ { 29165, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */
4881+ { 29184, 0x0000858A }, /* GL_SOURCE2_ALPHA */
4882+ { 29201, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */
4883+ { 29222, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */
4884+ { 29243, 0x00008582 }, /* GL_SOURCE2_RGB */
4885+ { 29258, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */
4886+ { 29277, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */
4887+ { 29296, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */
4888+ { 29316, 0x00008583 }, /* GL_SOURCE3_RGB_NV */
4889+ { 29334, 0x00001202 }, /* GL_SPECULAR */
4890+ { 29346, 0x00002402 }, /* GL_SPHERE_MAP */
4891+ { 29360, 0x00001206 }, /* GL_SPOT_CUTOFF */
4892+ { 29375, 0x00001204 }, /* GL_SPOT_DIRECTION */
4893+ { 29393, 0x00001205 }, /* GL_SPOT_EXPONENT */
4894+ { 29410, 0x00008588 }, /* GL_SRC0_ALPHA */
4895+ { 29424, 0x00008580 }, /* GL_SRC0_RGB */
4896+ { 29436, 0x00008589 }, /* GL_SRC1_ALPHA */
4897+ { 29450, 0x00008581 }, /* GL_SRC1_RGB */
4898+ { 29462, 0x0000858A }, /* GL_SRC2_ALPHA */
4899+ { 29476, 0x00008582 }, /* GL_SRC2_RGB */
4900+ { 29488, 0x00000302 }, /* GL_SRC_ALPHA */
4901+ { 29501, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */
4902+ { 29523, 0x00000300 }, /* GL_SRC_COLOR */
4903+ { 29536, 0x00000503 }, /* GL_STACK_OVERFLOW */
4904+ { 29554, 0x00000504 }, /* GL_STACK_UNDERFLOW */
4905+ { 29573, 0x000088E6 }, /* GL_STATIC_COPY */
4906+ { 29588, 0x000088E6 }, /* GL_STATIC_COPY_ARB */
4907+ { 29607, 0x000088E4 }, /* GL_STATIC_DRAW */
4908+ { 29622, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */
4909+ { 29641, 0x000088E5 }, /* GL_STATIC_READ */
4910+ { 29656, 0x000088E5 }, /* GL_STATIC_READ_ARB */
4911+ { 29675, 0x00001802 }, /* GL_STENCIL */
4912+ { 29686, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */
4913+ { 29712, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */
4914+ { 29733, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */
4915+ { 29754, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
4916+ { 29786, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
4917+ { 29818, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */
4918+ { 29838, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */
4919+ { 29865, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */
4920+ { 29891, 0x00000D57 }, /* GL_STENCIL_BITS */
4921+ { 29907, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */
4922+ { 29929, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */
4923+ { 29952, 0x00000B94 }, /* GL_STENCIL_FAIL */
4924+ { 29968, 0x00000B92 }, /* GL_STENCIL_FUNC */
4925+ { 29984, 0x00001901 }, /* GL_STENCIL_INDEX */
4926+ { 30001, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */
4927+ { 30024, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */
4928+ { 30046, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */
4929+ { 30068, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */
4930+ { 30090, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */
4931+ { 30111, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */
4932+ { 30138, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */
4933+ { 30165, 0x00000B97 }, /* GL_STENCIL_REF */
4934+ { 30180, 0x00000B90 }, /* GL_STENCIL_TEST */
4935+ { 30196, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
4936+ { 30225, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */
4937+ { 30247, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */
4938+ { 30268, 0x00000C33 }, /* GL_STEREO */
4939+ { 30278, 0x000088E2 }, /* GL_STREAM_COPY */
4940+ { 30293, 0x000088E2 }, /* GL_STREAM_COPY_ARB */
4941+ { 30312, 0x000088E0 }, /* GL_STREAM_DRAW */
4942+ { 30327, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */
4943+ { 30346, 0x000088E1 }, /* GL_STREAM_READ */
4944+ { 30361, 0x000088E1 }, /* GL_STREAM_READ_ARB */
4945+ { 30380, 0x00000D50 }, /* GL_SUBPIXEL_BITS */
4946+ { 30397, 0x000084E7 }, /* GL_SUBTRACT */
4947+ { 30409, 0x000084E7 }, /* GL_SUBTRACT_ARB */
4948+ { 30425, 0x00002001 }, /* GL_T */
4949+ { 30430, 0x00002A2A }, /* GL_T2F_C3F_V3F */
4950+ { 30445, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */
4951+ { 30464, 0x00002A29 }, /* GL_T2F_C4UB_V3F */
4952+ { 30480, 0x00002A2B }, /* GL_T2F_N3F_V3F */
4953+ { 30495, 0x00002A27 }, /* GL_T2F_V3F */
4954+ { 30506, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */
4955+ { 30525, 0x00002A28 }, /* GL_T4F_V4F */
4956+ { 30536, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */
4957+ { 30559, 0x00001702 }, /* GL_TEXTURE */
4958+ { 30570, 0x000084C0 }, /* GL_TEXTURE0 */
4959+ { 30582, 0x000084C0 }, /* GL_TEXTURE0_ARB */
4960+ { 30598, 0x000084C1 }, /* GL_TEXTURE1 */
4961+ { 30610, 0x000084CA }, /* GL_TEXTURE10 */
4962+ { 30623, 0x000084CA }, /* GL_TEXTURE10_ARB */
4963+ { 30640, 0x000084CB }, /* GL_TEXTURE11 */
4964+ { 30653, 0x000084CB }, /* GL_TEXTURE11_ARB */
4965+ { 30670, 0x000084CC }, /* GL_TEXTURE12 */
4966+ { 30683, 0x000084CC }, /* GL_TEXTURE12_ARB */
4967+ { 30700, 0x000084CD }, /* GL_TEXTURE13 */
4968+ { 30713, 0x000084CD }, /* GL_TEXTURE13_ARB */
4969+ { 30730, 0x000084CE }, /* GL_TEXTURE14 */
4970+ { 30743, 0x000084CE }, /* GL_TEXTURE14_ARB */
4971+ { 30760, 0x000084CF }, /* GL_TEXTURE15 */
4972+ { 30773, 0x000084CF }, /* GL_TEXTURE15_ARB */
4973+ { 30790, 0x000084D0 }, /* GL_TEXTURE16 */
4974+ { 30803, 0x000084D0 }, /* GL_TEXTURE16_ARB */
4975+ { 30820, 0x000084D1 }, /* GL_TEXTURE17 */
4976+ { 30833, 0x000084D1 }, /* GL_TEXTURE17_ARB */
4977+ { 30850, 0x000084D2 }, /* GL_TEXTURE18 */
4978+ { 30863, 0x000084D2 }, /* GL_TEXTURE18_ARB */
4979+ { 30880, 0x000084D3 }, /* GL_TEXTURE19 */
4980+ { 30893, 0x000084D3 }, /* GL_TEXTURE19_ARB */
4981+ { 30910, 0x000084C1 }, /* GL_TEXTURE1_ARB */
4982+ { 30926, 0x000084C2 }, /* GL_TEXTURE2 */
4983+ { 30938, 0x000084D4 }, /* GL_TEXTURE20 */
4984+ { 30951, 0x000084D4 }, /* GL_TEXTURE20_ARB */
4985+ { 30968, 0x000084D5 }, /* GL_TEXTURE21 */
4986+ { 30981, 0x000084D5 }, /* GL_TEXTURE21_ARB */
4987+ { 30998, 0x000084D6 }, /* GL_TEXTURE22 */
4988+ { 31011, 0x000084D6 }, /* GL_TEXTURE22_ARB */
4989+ { 31028, 0x000084D7 }, /* GL_TEXTURE23 */
4990+ { 31041, 0x000084D7 }, /* GL_TEXTURE23_ARB */
4991+ { 31058, 0x000084D8 }, /* GL_TEXTURE24 */
4992+ { 31071, 0x000084D8 }, /* GL_TEXTURE24_ARB */
4993+ { 31088, 0x000084D9 }, /* GL_TEXTURE25 */
4994+ { 31101, 0x000084D9 }, /* GL_TEXTURE25_ARB */
4995+ { 31118, 0x000084DA }, /* GL_TEXTURE26 */
4996+ { 31131, 0x000084DA }, /* GL_TEXTURE26_ARB */
4997+ { 31148, 0x000084DB }, /* GL_TEXTURE27 */
4998+ { 31161, 0x000084DB }, /* GL_TEXTURE27_ARB */
4999+ { 31178, 0x000084DC }, /* GL_TEXTURE28 */
5000+ { 31191, 0x000084DC }, /* GL_TEXTURE28_ARB */
5001+ { 31208, 0x000084DD }, /* GL_TEXTURE29 */
5002+ { 31221, 0x000084DD }, /* GL_TEXTURE29_ARB */
5003+ { 31238, 0x000084C2 }, /* GL_TEXTURE2_ARB */
5004+ { 31254, 0x000084C3 }, /* GL_TEXTURE3 */
5005+ { 31266, 0x000084DE }, /* GL_TEXTURE30 */
5006+ { 31279, 0x000084DE }, /* GL_TEXTURE30_ARB */
5007+ { 31296, 0x000084DF }, /* GL_TEXTURE31 */
5008+ { 31309, 0x000084DF }, /* GL_TEXTURE31_ARB */
5009+ { 31326, 0x000084C3 }, /* GL_TEXTURE3_ARB */
5010+ { 31342, 0x000084C4 }, /* GL_TEXTURE4 */
5011+ { 31354, 0x000084C4 }, /* GL_TEXTURE4_ARB */
5012+ { 31370, 0x000084C5 }, /* GL_TEXTURE5 */
5013+ { 31382, 0x000084C5 }, /* GL_TEXTURE5_ARB */
5014+ { 31398, 0x000084C6 }, /* GL_TEXTURE6 */
5015+ { 31410, 0x000084C6 }, /* GL_TEXTURE6_ARB */
5016+ { 31426, 0x000084C7 }, /* GL_TEXTURE7 */
5017+ { 31438, 0x000084C7 }, /* GL_TEXTURE7_ARB */
5018+ { 31454, 0x000084C8 }, /* GL_TEXTURE8 */
5019+ { 31466, 0x000084C8 }, /* GL_TEXTURE8_ARB */
5020+ { 31482, 0x000084C9 }, /* GL_TEXTURE9 */
5021+ { 31494, 0x000084C9 }, /* GL_TEXTURE9_ARB */
5022+ { 31510, 0x00000DE0 }, /* GL_TEXTURE_1D */
5023+ { 31524, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */
5024+ { 31548, 0x00000DE1 }, /* GL_TEXTURE_2D */
5025+ { 31562, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */
5026+ { 31586, 0x0000806F }, /* GL_TEXTURE_3D */
5027+ { 31600, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */
5028+ { 31622, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */
5029+ { 31648, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */
5030+ { 31670, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */
5031+ { 31692, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
5032+ { 31724, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */
5033+ { 31746, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
5034+ { 31778, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */
5035+ { 31800, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */
5036+ { 31828, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */
5037+ { 31860, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
5038+ { 31893, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */
5039+ { 31925, 0x00040000 }, /* GL_TEXTURE_BIT */
5040+ { 31940, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */
5041+ { 31961, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */
5042+ { 31986, 0x00001005 }, /* GL_TEXTURE_BORDER */
5043+ { 32004, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */
5044+ { 32028, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
5045+ { 32059, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
5046+ { 32089, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
5047+ { 32119, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
5048+ { 32154, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
5049+ { 32185, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
5050+ { 32223, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */
5051+ { 32250, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
5052+ { 32282, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
5053+ { 32316, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */
5054+ { 32340, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */
5055+ { 32368, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */
5056+ { 32392, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */
5057+ { 32420, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
5058+ { 32453, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */
5059+ { 32477, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */
5060+ { 32499, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */
5061+ { 32521, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */
5062+ { 32547, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */
5063+ { 32581, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
5064+ { 32614, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */
5065+ { 32651, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */
5066+ { 32679, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */
5067+ { 32711, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */
5068+ { 32734, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
5069+ { 32772, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */
5070+ { 32814, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */
5071+ { 32845, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */
5072+ { 32873, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
5073+ { 32903, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */
5074+ { 32931, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */
5075+ { 32951, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */
5076+ { 32975, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
5077+ { 33006, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */
5078+ { 33041, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
5079+ { 33072, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */
5080+ { 33107, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
5081+ { 33138, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */
5082+ { 33173, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
5083+ { 33204, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */
5084+ { 33239, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
5085+ { 33270, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */
5086+ { 33305, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
5087+ { 33336, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */
5088+ { 33371, 0x00008071 }, /* GL_TEXTURE_DEPTH */
5089+ { 33388, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */
5090+ { 33410, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */
5091+ { 33436, 0x00002300 }, /* GL_TEXTURE_ENV */
5092+ { 33451, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */
5093+ { 33472, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */
5094+ { 33492, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */
5095+ { 33518, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */
5096+ { 33538, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */
5097+ { 33555, 0x00000C62 }, /* GL_TEXTURE_GEN_R */
5098+ { 33572, 0x00000C60 }, /* GL_TEXTURE_GEN_S */
5099+ { 33589, 0x00000C61 }, /* GL_TEXTURE_GEN_T */
5100+ { 33606, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */
5101+ { 33631, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */
5102+ { 33653, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */
5103+ { 33679, 0x00001001 }, /* GL_TEXTURE_HEIGHT */
5104+ { 33697, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */
5105+ { 33723, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */
5106+ { 33749, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */
5107+ { 33779, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */
5108+ { 33806, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */
5109+ { 33831, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */
5110+ { 33851, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */
5111+ { 33875, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
5112+ { 33902, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
5113+ { 33929, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
5114+ { 33956, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */
5115+ { 33982, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */
5116+ { 34012, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */
5117+ { 34034, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */
5118+ { 34052, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
5119+ { 34082, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
5120+ { 34110, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
5121+ { 34138, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
5122+ { 34166, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */
5123+ { 34187, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */
5124+ { 34206, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */
5125+ { 34228, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */
5126+ { 34247, 0x00008066 }, /* GL_TEXTURE_PRIORITY */
5127+ { 34267, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */
5128+ { 34292, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */
5129+ { 34316, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */
5130+ { 34336, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */
5131+ { 34360, 0x00008067 }, /* GL_TEXTURE_RESIDENT */
5132+ { 34380, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */
5133+ { 34403, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */
5134+ { 34428, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
5135+ { 34462, 0x00001000 }, /* GL_TEXTURE_WIDTH */
5136+ { 34479, 0x00008072 }, /* GL_TEXTURE_WRAP_R */
5137+ { 34497, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
5138+ { 34515, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
5139+ { 34533, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
5140+ { 34553, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
5141+ { 34572, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
5142+ { 34601, 0x00001000 }, /* GL_TRANSFORM_BIT */
5143+ { 34618, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
5144+ { 34644, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
5145+ { 34674, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
5146+ { 34706, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
5147+ { 34736, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
5148+ { 34770, 0x0000862C }, /* GL_TRANSPOSE_NV */
5149+ { 34786, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
5150+ { 34817, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
5151+ { 34852, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
5152+ { 34880, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
5153+ { 34912, 0x00000004 }, /* GL_TRIANGLES */
5154+ { 34925, 0x00000006 }, /* GL_TRIANGLE_FAN */
5155+ { 34941, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
5156+ { 34962, 0x00000005 }, /* GL_TRIANGLE_STRIP */
5157+ { 34980, 0x00000001 }, /* GL_TRUE */
5158+ { 34988, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
5159+ { 35008, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
5160+ { 35031, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
5161+ { 35051, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
5162+ { 35072, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
5163+ { 35094, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
5164+ { 35116, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
5165+ { 35136, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
5166+ { 35157, 0x00001401 }, /* GL_UNSIGNED_BYTE */
5167+ { 35174, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
5168+ { 35201, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
5169+ { 35224, 0x00001405 }, /* GL_UNSIGNED_INT */
5170+ { 35240, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
5171+ { 35267, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
5172+ { 35291, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
5173+ { 35322, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
5174+ { 35346, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
5175+ { 35374, 0x00001403 }, /* GL_UNSIGNED_SHORT */
5176+ { 35392, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
5177+ { 35422, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
5178+ { 35448, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
5179+ { 35478, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
5180+ { 35504, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
5181+ { 35528, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
5182+ { 35556, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
5183+ { 35584, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
5184+ { 35611, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
5185+ { 35643, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
5186+ { 35674, 0x00008CA2 }, /* GL_UPPER_LEFT */
5187+ { 35688, 0x00002A20 }, /* GL_V2F */
5188+ { 35695, 0x00002A21 }, /* GL_V3F */
5189+ { 35702, 0x00008B83 }, /* GL_VALIDATE_STATUS */
5190+ { 35721, 0x00001F00 }, /* GL_VENDOR */
5191+ { 35731, 0x00001F02 }, /* GL_VERSION */
5192+ { 35742, 0x00008074 }, /* GL_VERTEX_ARRAY */
5193+ { 35758, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
5194+ { 35788, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
5195+ { 35819, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
5196+ { 35854, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
5197+ { 35878, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
5198+ { 35899, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
5199+ { 35922, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
5200+ { 35943, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
5201+ { 35970, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
5202+ { 35998, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
5203+ { 36026, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
5204+ { 36054, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
5205+ { 36082, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
5206+ { 36110, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
5207+ { 36138, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
5208+ { 36165, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
5209+ { 36192, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
5210+ { 36219, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
5211+ { 36246, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
5212+ { 36273, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
5213+ { 36300, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
5214+ { 36327, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
5215+ { 36354, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
5216+ { 36381, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
5217+ { 36419, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
5218+ { 36461, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
5219+ { 36492, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
5220+ { 36527, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
5221+ { 36561, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
5222+ { 36599, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
5223+ { 36630, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
5224+ { 36665, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
5225+ { 36693, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
5226+ { 36725, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
5227+ { 36755, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
5228+ { 36789, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
5229+ { 36817, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
5230+ { 36849, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
5231+ { 36869, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
5232+ { 36891, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
5233+ { 36920, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
5234+ { 36941, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
5235+ { 36970, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
5236+ { 37003, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
5237+ { 37035, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
5238+ { 37062, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
5239+ { 37093, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
5240+ { 37123, 0x00008B31 }, /* GL_VERTEX_SHADER */
5241+ { 37140, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
5242+ { 37161, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
5243+ { 37188, 0x00000BA2 }, /* GL_VIEWPORT */
5244+ { 37200, 0x00000800 }, /* GL_VIEWPORT_BIT */
5245+ { 37216, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
5246+ { 37236, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
5247+ { 37267, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
5248+ { 37302, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
5249+ { 37330, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
5250+ { 37355, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
5251+ { 37382, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
5252+ { 37407, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
5253+ { 37431, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
5254+ { 37450, 0x000088B9 }, /* GL_WRITE_ONLY */
5255+ { 37464, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
5256+ { 37482, 0x00001506 }, /* GL_XOR */
5257+ { 37489, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
5258+ { 37508, 0x00008757 }, /* GL_YCBCR_MESA */
5259+ { 37522, 0x00000000 }, /* GL_ZERO */
5260+ { 37530, 0x00000D16 }, /* GL_ZOOM_X */
5261+ { 37540, 0x00000D17 }, /* GL_ZOOM_Y */
5262+};
5263+
5264+static const unsigned reduced_enums[1284] =
5265+{
5266+ 436, /* GL_FALSE */
5267+ 645, /* GL_LINES */
5268+ 647, /* GL_LINE_LOOP */
5269+ 654, /* GL_LINE_STRIP */
5270+ 1637, /* GL_TRIANGLES */
5271+ 1640, /* GL_TRIANGLE_STRIP */
5272+ 1638, /* GL_TRIANGLE_FAN */
5273+ 1211, /* GL_QUADS */
5274+ 1213, /* GL_QUAD_STRIP */
5275+ 1099, /* GL_POLYGON */
5276+ 1111, /* GL_POLYGON_STIPPLE_BIT */
5277+ 1064, /* GL_PIXEL_MODE_BIT */
5278+ 632, /* GL_LIGHTING_BIT */
5279+ 458, /* GL_FOG_BIT */
5280+ 8, /* GL_ACCUM */
5281+ 664, /* GL_LOAD */
5282+ 1253, /* GL_RETURN */
5283+ 937, /* GL_MULT */
5284+ 23, /* GL_ADD */
5285+ 953, /* GL_NEVER */
5286+ 622, /* GL_LESS */
5287+ 426, /* GL_EQUAL */
5288+ 621, /* GL_LEQUAL */
5289+ 547, /* GL_GREATER */
5290+ 968, /* GL_NOTEQUAL */
5291+ 522, /* GL_GEQUAL */
5292+ 46, /* GL_ALWAYS */
5293+ 1386, /* GL_SRC_COLOR */
5294+ 997, /* GL_ONE_MINUS_SRC_COLOR */
5295+ 1384, /* GL_SRC_ALPHA */
5296+ 996, /* GL_ONE_MINUS_SRC_ALPHA */
5297+ 406, /* GL_DST_ALPHA */
5298+ 994, /* GL_ONE_MINUS_DST_ALPHA */
5299+ 407, /* GL_DST_COLOR */
5300+ 995, /* GL_ONE_MINUS_DST_COLOR */
5301+ 1385, /* GL_SRC_ALPHA_SATURATE */
5302+ 510, /* GL_FRONT_LEFT */
5303+ 511, /* GL_FRONT_RIGHT */
5304+ 69, /* GL_BACK_LEFT */
5305+ 70, /* GL_BACK_RIGHT */
5306+ 507, /* GL_FRONT */
5307+ 68, /* GL_BACK */
5308+ 620, /* GL_LEFT */
5309+ 1293, /* GL_RIGHT */
5310+ 508, /* GL_FRONT_AND_BACK */
5311+ 63, /* GL_AUX0 */
5312+ 64, /* GL_AUX1 */
5313+ 65, /* GL_AUX2 */
5314+ 66, /* GL_AUX3 */
5315+ 612, /* GL_INVALID_ENUM */
5316+ 615, /* GL_INVALID_VALUE */
5317+ 614, /* GL_INVALID_OPERATION */
5318+ 1387, /* GL_STACK_OVERFLOW */
5319+ 1388, /* GL_STACK_UNDERFLOW */
5320+ 1022, /* GL_OUT_OF_MEMORY */
5321+ 613, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
5322+ 0, /* GL_2D */
5323+ 2, /* GL_3D */
5324+ 3, /* GL_3D_COLOR */
5325+ 4, /* GL_3D_COLOR_TEXTURE */
5326+ 6, /* GL_4D_COLOR_TEXTURE */
5327+ 1042, /* GL_PASS_THROUGH_TOKEN */
5328+ 1098, /* GL_POINT_TOKEN */
5329+ 655, /* GL_LINE_TOKEN */
5330+ 1112, /* GL_POLYGON_TOKEN */
5331+ 74, /* GL_BITMAP_TOKEN */
5332+ 405, /* GL_DRAW_PIXEL_TOKEN */
5333+ 271, /* GL_COPY_PIXEL_TOKEN */
5334+ 648, /* GL_LINE_RESET_TOKEN */
5335+ 429, /* GL_EXP */
5336+ 430, /* GL_EXP2 */
5337+ 304, /* GL_CW */
5338+ 116, /* GL_CCW */
5339+ 137, /* GL_COEFF */
5340+ 1019, /* GL_ORDER */
5341+ 344, /* GL_DOMAIN */
5342+ 279, /* GL_CURRENT_COLOR */
5343+ 282, /* GL_CURRENT_INDEX */
5344+ 288, /* GL_CURRENT_NORMAL */
5345+ 300, /* GL_CURRENT_TEXTURE_COORDS */
5346+ 293, /* GL_CURRENT_RASTER_COLOR */
5347+ 295, /* GL_CURRENT_RASTER_INDEX */
5348+ 298, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
5349+ 296, /* GL_CURRENT_RASTER_POSITION */
5350+ 297, /* GL_CURRENT_RASTER_POSITION_VALID */
5351+ 294, /* GL_CURRENT_RASTER_DISTANCE */
5352+ 1091, /* GL_POINT_SMOOTH */
5353+ 1080, /* GL_POINT_SIZE */
5354+ 1090, /* GL_POINT_SIZE_RANGE */
5355+ 1081, /* GL_POINT_SIZE_GRANULARITY */
5356+ 649, /* GL_LINE_SMOOTH */
5357+ 656, /* GL_LINE_WIDTH */
5358+ 658, /* GL_LINE_WIDTH_RANGE */
5359+ 657, /* GL_LINE_WIDTH_GRANULARITY */
5360+ 651, /* GL_LINE_STIPPLE */
5361+ 652, /* GL_LINE_STIPPLE_PATTERN */
5362+ 653, /* GL_LINE_STIPPLE_REPEAT */
5363+ 663, /* GL_LIST_MODE */
5364+ 822, /* GL_MAX_LIST_NESTING */
5365+ 660, /* GL_LIST_BASE */
5366+ 662, /* GL_LIST_INDEX */
5367+ 1101, /* GL_POLYGON_MODE */
5368+ 1108, /* GL_POLYGON_SMOOTH */
5369+ 1110, /* GL_POLYGON_STIPPLE */
5370+ 414, /* GL_EDGE_FLAG */
5371+ 272, /* GL_CULL_FACE */
5372+ 273, /* GL_CULL_FACE_MODE */
5373+ 509, /* GL_FRONT_FACE */
5374+ 631, /* GL_LIGHTING */
5375+ 636, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
5376+ 637, /* GL_LIGHT_MODEL_TWO_SIDE */
5377+ 633, /* GL_LIGHT_MODEL_AMBIENT */
5378+ 1339, /* GL_SHADE_MODEL */
5379+ 168, /* GL_COLOR_MATERIAL_FACE */
5380+ 169, /* GL_COLOR_MATERIAL_PARAMETER */
5381+ 167, /* GL_COLOR_MATERIAL */
5382+ 457, /* GL_FOG */
5383+ 479, /* GL_FOG_INDEX */
5384+ 475, /* GL_FOG_DENSITY */
5385+ 483, /* GL_FOG_START */
5386+ 477, /* GL_FOG_END */
5387+ 480, /* GL_FOG_MODE */
5388+ 459, /* GL_FOG_COLOR */
5389+ 333, /* GL_DEPTH_RANGE */
5390+ 338, /* GL_DEPTH_TEST */
5391+ 341, /* GL_DEPTH_WRITEMASK */
5392+ 321, /* GL_DEPTH_CLEAR_VALUE */
5393+ 332, /* GL_DEPTH_FUNC */
5394+ 12, /* GL_ACCUM_CLEAR_VALUE */
5395+ 1418, /* GL_STENCIL_TEST */
5396+ 1406, /* GL_STENCIL_CLEAR_VALUE */
5397+ 1408, /* GL_STENCIL_FUNC */
5398+ 1420, /* GL_STENCIL_VALUE_MASK */
5399+ 1407, /* GL_STENCIL_FAIL */
5400+ 1415, /* GL_STENCIL_PASS_DEPTH_FAIL */
5401+ 1416, /* GL_STENCIL_PASS_DEPTH_PASS */
5402+ 1417, /* GL_STENCIL_REF */
5403+ 1421, /* GL_STENCIL_WRITEMASK */
5404+ 791, /* GL_MATRIX_MODE */
5405+ 958, /* GL_NORMALIZE */
5406+ 1727, /* GL_VIEWPORT */
5407+ 932, /* GL_MODELVIEW_STACK_DEPTH */
5408+ 1191, /* GL_PROJECTION_STACK_DEPTH */
5409+ 1616, /* GL_TEXTURE_STACK_DEPTH */
5410+ 930, /* GL_MODELVIEW_MATRIX */
5411+ 1190, /* GL_PROJECTION_MATRIX */
5412+ 1601, /* GL_TEXTURE_MATRIX */
5413+ 61, /* GL_ATTRIB_STACK_DEPTH */
5414+ 127, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
5415+ 43, /* GL_ALPHA_TEST */
5416+ 44, /* GL_ALPHA_TEST_FUNC */
5417+ 45, /* GL_ALPHA_TEST_REF */
5418+ 343, /* GL_DITHER */
5419+ 78, /* GL_BLEND_DST */
5420+ 86, /* GL_BLEND_SRC */
5421+ 75, /* GL_BLEND */
5422+ 666, /* GL_LOGIC_OP_MODE */
5423+ 586, /* GL_INDEX_LOGIC_OP */
5424+ 166, /* GL_COLOR_LOGIC_OP */
5425+ 67, /* GL_AUX_BUFFERS */
5426+ 354, /* GL_DRAW_BUFFER */
5427+ 1223, /* GL_READ_BUFFER */
5428+ 1320, /* GL_SCISSOR_BOX */
5429+ 1321, /* GL_SCISSOR_TEST */
5430+ 585, /* GL_INDEX_CLEAR_VALUE */
5431+ 590, /* GL_INDEX_WRITEMASK */
5432+ 163, /* GL_COLOR_CLEAR_VALUE */
5433+ 205, /* GL_COLOR_WRITEMASK */
5434+ 587, /* GL_INDEX_MODE */
5435+ 1287, /* GL_RGBA_MODE */
5436+ 353, /* GL_DOUBLEBUFFER */
5437+ 1422, /* GL_STEREO */
5438+ 1246, /* GL_RENDER_MODE */
5439+ 1043, /* GL_PERSPECTIVE_CORRECTION_HINT */
5440+ 1092, /* GL_POINT_SMOOTH_HINT */
5441+ 650, /* GL_LINE_SMOOTH_HINT */
5442+ 1109, /* GL_POLYGON_SMOOTH_HINT */
5443+ 478, /* GL_FOG_HINT */
5444+ 1582, /* GL_TEXTURE_GEN_S */
5445+ 1583, /* GL_TEXTURE_GEN_T */
5446+ 1581, /* GL_TEXTURE_GEN_R */
5447+ 1580, /* GL_TEXTURE_GEN_Q */
5448+ 1056, /* GL_PIXEL_MAP_I_TO_I */
5449+ 1062, /* GL_PIXEL_MAP_S_TO_S */
5450+ 1058, /* GL_PIXEL_MAP_I_TO_R */
5451+ 1054, /* GL_PIXEL_MAP_I_TO_G */
5452+ 1052, /* GL_PIXEL_MAP_I_TO_B */
5453+ 1050, /* GL_PIXEL_MAP_I_TO_A */
5454+ 1060, /* GL_PIXEL_MAP_R_TO_R */
5455+ 1048, /* GL_PIXEL_MAP_G_TO_G */
5456+ 1046, /* GL_PIXEL_MAP_B_TO_B */
5457+ 1044, /* GL_PIXEL_MAP_A_TO_A */
5458+ 1057, /* GL_PIXEL_MAP_I_TO_I_SIZE */
5459+ 1063, /* GL_PIXEL_MAP_S_TO_S_SIZE */
5460+ 1059, /* GL_PIXEL_MAP_I_TO_R_SIZE */
5461+ 1055, /* GL_PIXEL_MAP_I_TO_G_SIZE */
5462+ 1053, /* GL_PIXEL_MAP_I_TO_B_SIZE */
5463+ 1051, /* GL_PIXEL_MAP_I_TO_A_SIZE */
5464+ 1061, /* GL_PIXEL_MAP_R_TO_R_SIZE */
5465+ 1049, /* GL_PIXEL_MAP_G_TO_G_SIZE */
5466+ 1047, /* GL_PIXEL_MAP_B_TO_B_SIZE */
5467+ 1045, /* GL_PIXEL_MAP_A_TO_A_SIZE */
5468+ 1649, /* GL_UNPACK_SWAP_BYTES */
5469+ 1644, /* GL_UNPACK_LSB_FIRST */
5470+ 1645, /* GL_UNPACK_ROW_LENGTH */
5471+ 1648, /* GL_UNPACK_SKIP_ROWS */
5472+ 1647, /* GL_UNPACK_SKIP_PIXELS */
5473+ 1642, /* GL_UNPACK_ALIGNMENT */
5474+ 1031, /* GL_PACK_SWAP_BYTES */
5475+ 1026, /* GL_PACK_LSB_FIRST */
5476+ 1027, /* GL_PACK_ROW_LENGTH */
5477+ 1030, /* GL_PACK_SKIP_ROWS */
5478+ 1029, /* GL_PACK_SKIP_PIXELS */
5479+ 1023, /* GL_PACK_ALIGNMENT */
5480+ 744, /* GL_MAP_COLOR */
5481+ 745, /* GL_MAP_STENCIL */
5482+ 589, /* GL_INDEX_SHIFT */
5483+ 588, /* GL_INDEX_OFFSET */
5484+ 1235, /* GL_RED_SCALE */
5485+ 1233, /* GL_RED_BIAS */
5486+ 1744, /* GL_ZOOM_X */
5487+ 1745, /* GL_ZOOM_Y */
5488+ 551, /* GL_GREEN_SCALE */
5489+ 549, /* GL_GREEN_BIAS */
5490+ 92, /* GL_BLUE_SCALE */
5491+ 90, /* GL_BLUE_BIAS */
5492+ 42, /* GL_ALPHA_SCALE */
5493+ 40, /* GL_ALPHA_BIAS */
5494+ 334, /* GL_DEPTH_SCALE */
5495+ 315, /* GL_DEPTH_BIAS */
5496+ 817, /* GL_MAX_EVAL_ORDER */
5497+ 821, /* GL_MAX_LIGHTS */
5498+ 800, /* GL_MAX_CLIP_PLANES */
5499+ 865, /* GL_MAX_TEXTURE_SIZE */
5500+ 827, /* GL_MAX_PIXEL_MAP_TABLE */
5501+ 796, /* GL_MAX_ATTRIB_STACK_DEPTH */
5502+ 824, /* GL_MAX_MODELVIEW_STACK_DEPTH */
5503+ 825, /* GL_MAX_NAME_STACK_DEPTH */
5504+ 853, /* GL_MAX_PROJECTION_STACK_DEPTH */
5505+ 866, /* GL_MAX_TEXTURE_STACK_DEPTH */
5506+ 880, /* GL_MAX_VIEWPORT_DIMS */
5507+ 797, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
5508+ 1429, /* GL_SUBPIXEL_BITS */
5509+ 584, /* GL_INDEX_BITS */
5510+ 1234, /* GL_RED_BITS */
5511+ 550, /* GL_GREEN_BITS */
5512+ 91, /* GL_BLUE_BITS */
5513+ 41, /* GL_ALPHA_BITS */
5514+ 316, /* GL_DEPTH_BITS */
5515+ 1404, /* GL_STENCIL_BITS */
5516+ 14, /* GL_ACCUM_RED_BITS */
5517+ 13, /* GL_ACCUM_GREEN_BITS */
5518+ 10, /* GL_ACCUM_BLUE_BITS */
5519+ 9, /* GL_ACCUM_ALPHA_BITS */
5520+ 946, /* GL_NAME_STACK_DEPTH */
5521+ 62, /* GL_AUTO_NORMAL */
5522+ 690, /* GL_MAP1_COLOR_4 */
5523+ 693, /* GL_MAP1_INDEX */
5524+ 694, /* GL_MAP1_NORMAL */
5525+ 695, /* GL_MAP1_TEXTURE_COORD_1 */
5526+ 696, /* GL_MAP1_TEXTURE_COORD_2 */
5527+ 697, /* GL_MAP1_TEXTURE_COORD_3 */
5528+ 698, /* GL_MAP1_TEXTURE_COORD_4 */
5529+ 699, /* GL_MAP1_VERTEX_3 */
5530+ 700, /* GL_MAP1_VERTEX_4 */
5531+ 717, /* GL_MAP2_COLOR_4 */
5532+ 720, /* GL_MAP2_INDEX */
5533+ 721, /* GL_MAP2_NORMAL */
5534+ 722, /* GL_MAP2_TEXTURE_COORD_1 */
5535+ 723, /* GL_MAP2_TEXTURE_COORD_2 */
5536+ 724, /* GL_MAP2_TEXTURE_COORD_3 */
5537+ 725, /* GL_MAP2_TEXTURE_COORD_4 */
5538+ 726, /* GL_MAP2_VERTEX_3 */
5539+ 727, /* GL_MAP2_VERTEX_4 */
5540+ 691, /* GL_MAP1_GRID_DOMAIN */
5541+ 692, /* GL_MAP1_GRID_SEGMENTS */
5542+ 718, /* GL_MAP2_GRID_DOMAIN */
5543+ 719, /* GL_MAP2_GRID_SEGMENTS */
5544+ 1506, /* GL_TEXTURE_1D */
5545+ 1508, /* GL_TEXTURE_2D */
5546+ 439, /* GL_FEEDBACK_BUFFER_POINTER */
5547+ 440, /* GL_FEEDBACK_BUFFER_SIZE */
5548+ 441, /* GL_FEEDBACK_BUFFER_TYPE */
5549+ 1330, /* GL_SELECTION_BUFFER_POINTER */
5550+ 1331, /* GL_SELECTION_BUFFER_SIZE */
5551+ 1619, /* GL_TEXTURE_WIDTH */
5552+ 1587, /* GL_TEXTURE_HEIGHT */
5553+ 1543, /* GL_TEXTURE_COMPONENTS */
5554+ 1527, /* GL_TEXTURE_BORDER_COLOR */
5555+ 1526, /* GL_TEXTURE_BORDER */
5556+ 345, /* GL_DONT_CARE */
5557+ 437, /* GL_FASTEST */
5558+ 954, /* GL_NICEST */
5559+ 47, /* GL_AMBIENT */
5560+ 342, /* GL_DIFFUSE */
5561+ 1373, /* GL_SPECULAR */
5562+ 1113, /* GL_POSITION */
5563+ 1376, /* GL_SPOT_DIRECTION */
5564+ 1377, /* GL_SPOT_EXPONENT */
5565+ 1375, /* GL_SPOT_CUTOFF */
5566+ 245, /* GL_CONSTANT_ATTENUATION */
5567+ 640, /* GL_LINEAR_ATTENUATION */
5568+ 1210, /* GL_QUADRATIC_ATTENUATION */
5569+ 219, /* GL_COMPILE */
5570+ 220, /* GL_COMPILE_AND_EXECUTE */
5571+ 111, /* GL_BYTE */
5572+ 1650, /* GL_UNSIGNED_BYTE */
5573+ 1344, /* GL_SHORT */
5574+ 1659, /* GL_UNSIGNED_SHORT */
5575+ 592, /* GL_INT */
5576+ 1653, /* GL_UNSIGNED_INT */
5577+ 444, /* GL_FLOAT */
5578+ 1, /* GL_2_BYTES */
5579+ 5, /* GL_3_BYTES */
5580+ 7, /* GL_4_BYTES */
5581+ 352, /* GL_DOUBLE */
5582+ 123, /* GL_CLEAR */
5583+ 49, /* GL_AND */
5584+ 51, /* GL_AND_REVERSE */
5585+ 269, /* GL_COPY */
5586+ 50, /* GL_AND_INVERTED */
5587+ 956, /* GL_NOOP */
5588+ 1740, /* GL_XOR */
5589+ 1018, /* GL_OR */
5590+ 957, /* GL_NOR */
5591+ 427, /* GL_EQUIV */
5592+ 618, /* GL_INVERT */
5593+ 1021, /* GL_OR_REVERSE */
5594+ 270, /* GL_COPY_INVERTED */
5595+ 1020, /* GL_OR_INVERTED */
5596+ 947, /* GL_NAND */
5597+ 1335, /* GL_SET */
5598+ 424, /* GL_EMISSION */
5599+ 1343, /* GL_SHININESS */
5600+ 48, /* GL_AMBIENT_AND_DIFFUSE */
5601+ 165, /* GL_COLOR_INDEXES */
5602+ 897, /* GL_MODELVIEW */
5603+ 1189, /* GL_PROJECTION */
5604+ 1441, /* GL_TEXTURE */
5605+ 138, /* GL_COLOR */
5606+ 313, /* GL_DEPTH */
5607+ 1395, /* GL_STENCIL */
5608+ 164, /* GL_COLOR_INDEX */
5609+ 1409, /* GL_STENCIL_INDEX */
5610+ 322, /* GL_DEPTH_COMPONENT */
5611+ 1230, /* GL_RED */
5612+ 548, /* GL_GREEN */
5613+ 89, /* GL_BLUE */
5614+ 31, /* GL_ALPHA */
5615+ 1254, /* GL_RGB */
5616+ 1273, /* GL_RGBA */
5617+ 668, /* GL_LUMINANCE */
5618+ 689, /* GL_LUMINANCE_ALPHA */
5619+ 73, /* GL_BITMAP */
5620+ 1069, /* GL_POINT */
5621+ 638, /* GL_LINE */
5622+ 442, /* GL_FILL */
5623+ 1239, /* GL_RENDER */
5624+ 438, /* GL_FEEDBACK */
5625+ 1329, /* GL_SELECT */
5626+ 443, /* GL_FLAT */
5627+ 1348, /* GL_SMOOTH */
5628+ 619, /* GL_KEEP */
5629+ 1248, /* GL_REPLACE */
5630+ 575, /* GL_INCR */
5631+ 309, /* GL_DECR */
5632+ 1674, /* GL_VENDOR */
5633+ 1245, /* GL_RENDERER */
5634+ 1675, /* GL_VERSION */
5635+ 431, /* GL_EXTENSIONS */
5636+ 1294, /* GL_S */
5637+ 1432, /* GL_T */
5638+ 1220, /* GL_R */
5639+ 1209, /* GL_Q */
5640+ 933, /* GL_MODULATE */
5641+ 308, /* GL_DECAL */
5642+ 1577, /* GL_TEXTURE_ENV_MODE */
5643+ 1576, /* GL_TEXTURE_ENV_COLOR */
5644+ 1575, /* GL_TEXTURE_ENV */
5645+ 432, /* GL_EYE_LINEAR */
5646+ 980, /* GL_OBJECT_LINEAR */
5647+ 1374, /* GL_SPHERE_MAP */
5648+ 1579, /* GL_TEXTURE_GEN_MODE */
5649+ 982, /* GL_OBJECT_PLANE */
5650+ 433, /* GL_EYE_PLANE */
5651+ 948, /* GL_NEAREST */
5652+ 639, /* GL_LINEAR */
5653+ 952, /* GL_NEAREST_MIPMAP_NEAREST */
5654+ 644, /* GL_LINEAR_MIPMAP_NEAREST */
5655+ 951, /* GL_NEAREST_MIPMAP_LINEAR */
5656+ 643, /* GL_LINEAR_MIPMAP_LINEAR */
5657+ 1600, /* GL_TEXTURE_MAG_FILTER */
5658+ 1608, /* GL_TEXTURE_MIN_FILTER */
5659+ 1621, /* GL_TEXTURE_WRAP_S */
5660+ 1622, /* GL_TEXTURE_WRAP_T */
5661+ 117, /* GL_CLAMP */
5662+ 1247, /* GL_REPEAT */
5663+ 1107, /* GL_POLYGON_OFFSET_UNITS */
5664+ 1106, /* GL_POLYGON_OFFSET_POINT */
5665+ 1105, /* GL_POLYGON_OFFSET_LINE */
5666+ 1221, /* GL_R3_G3_B2 */
5667+ 1671, /* GL_V2F */
5668+ 1672, /* GL_V3F */
5669+ 114, /* GL_C4UB_V2F */
5670+ 115, /* GL_C4UB_V3F */
5671+ 112, /* GL_C3F_V3F */
5672+ 945, /* GL_N3F_V3F */
5673+ 113, /* GL_C4F_N3F_V3F */
5674+ 1437, /* GL_T2F_V3F */
5675+ 1439, /* GL_T4F_V4F */
5676+ 1435, /* GL_T2F_C4UB_V3F */
5677+ 1433, /* GL_T2F_C3F_V3F */
5678+ 1436, /* GL_T2F_N3F_V3F */
5679+ 1434, /* GL_T2F_C4F_N3F_V3F */
5680+ 1438, /* GL_T4F_C4F_N3F_V4F */
5681+ 130, /* GL_CLIP_PLANE0 */
5682+ 131, /* GL_CLIP_PLANE1 */
5683+ 132, /* GL_CLIP_PLANE2 */
5684+ 133, /* GL_CLIP_PLANE3 */
5685+ 134, /* GL_CLIP_PLANE4 */
5686+ 135, /* GL_CLIP_PLANE5 */
5687+ 623, /* GL_LIGHT0 */
5688+ 624, /* GL_LIGHT1 */
5689+ 625, /* GL_LIGHT2 */
5690+ 626, /* GL_LIGHT3 */
5691+ 627, /* GL_LIGHT4 */
5692+ 628, /* GL_LIGHT5 */
5693+ 629, /* GL_LIGHT6 */
5694+ 630, /* GL_LIGHT7 */
5695+ 552, /* GL_HINT_BIT */
5696+ 247, /* GL_CONSTANT_COLOR */
5697+ 992, /* GL_ONE_MINUS_CONSTANT_COLOR */
5698+ 242, /* GL_CONSTANT_ALPHA */
5699+ 990, /* GL_ONE_MINUS_CONSTANT_ALPHA */
5700+ 76, /* GL_BLEND_COLOR */
5701+ 512, /* GL_FUNC_ADD */
5702+ 881, /* GL_MIN */
5703+ 793, /* GL_MAX */
5704+ 81, /* GL_BLEND_EQUATION */
5705+ 516, /* GL_FUNC_SUBTRACT */
5706+ 514, /* GL_FUNC_REVERSE_SUBTRACT */
5707+ 250, /* GL_CONVOLUTION_1D */
5708+ 251, /* GL_CONVOLUTION_2D */
5709+ 1332, /* GL_SEPARABLE_2D */
5710+ 254, /* GL_CONVOLUTION_BORDER_MODE */
5711+ 258, /* GL_CONVOLUTION_FILTER_SCALE */
5712+ 256, /* GL_CONVOLUTION_FILTER_BIAS */
5713+ 1231, /* GL_REDUCE */
5714+ 260, /* GL_CONVOLUTION_FORMAT */
5715+ 264, /* GL_CONVOLUTION_WIDTH */
5716+ 262, /* GL_CONVOLUTION_HEIGHT */
5717+ 808, /* GL_MAX_CONVOLUTION_WIDTH */
5718+ 806, /* GL_MAX_CONVOLUTION_HEIGHT */
5719+ 1146, /* GL_POST_CONVOLUTION_RED_SCALE */
5720+ 1142, /* GL_POST_CONVOLUTION_GREEN_SCALE */
5721+ 1137, /* GL_POST_CONVOLUTION_BLUE_SCALE */
5722+ 1133, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
5723+ 1144, /* GL_POST_CONVOLUTION_RED_BIAS */
5724+ 1140, /* GL_POST_CONVOLUTION_GREEN_BIAS */
5725+ 1135, /* GL_POST_CONVOLUTION_BLUE_BIAS */
5726+ 1131, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
5727+ 553, /* GL_HISTOGRAM */
5728+ 1193, /* GL_PROXY_HISTOGRAM */
5729+ 569, /* GL_HISTOGRAM_WIDTH */
5730+ 559, /* GL_HISTOGRAM_FORMAT */
5731+ 565, /* GL_HISTOGRAM_RED_SIZE */
5732+ 561, /* GL_HISTOGRAM_GREEN_SIZE */
5733+ 556, /* GL_HISTOGRAM_BLUE_SIZE */
5734+ 554, /* GL_HISTOGRAM_ALPHA_SIZE */
5735+ 563, /* GL_HISTOGRAM_LUMINANCE_SIZE */
5736+ 567, /* GL_HISTOGRAM_SINK */
5737+ 882, /* GL_MINMAX */
5738+ 884, /* GL_MINMAX_FORMAT */
5739+ 886, /* GL_MINMAX_SINK */
5740+ 1440, /* GL_TABLE_TOO_LARGE_EXT */
5741+ 1652, /* GL_UNSIGNED_BYTE_3_3_2 */
5742+ 1661, /* GL_UNSIGNED_SHORT_4_4_4_4 */
5743+ 1663, /* GL_UNSIGNED_SHORT_5_5_5_1 */
5744+ 1657, /* GL_UNSIGNED_INT_8_8_8_8 */
5745+ 1654, /* GL_UNSIGNED_INT_10_10_10_2 */
5746+ 1104, /* GL_POLYGON_OFFSET_FILL */
5747+ 1103, /* GL_POLYGON_OFFSET_FACTOR */
5748+ 1102, /* GL_POLYGON_OFFSET_BIAS */
5749+ 1251, /* GL_RESCALE_NORMAL */
5750+ 36, /* GL_ALPHA4 */
5751+ 38, /* GL_ALPHA8 */
5752+ 32, /* GL_ALPHA12 */
5753+ 34, /* GL_ALPHA16 */
5754+ 679, /* GL_LUMINANCE4 */
5755+ 685, /* GL_LUMINANCE8 */
5756+ 669, /* GL_LUMINANCE12 */
5757+ 675, /* GL_LUMINANCE16 */
5758+ 680, /* GL_LUMINANCE4_ALPHA4 */
5759+ 683, /* GL_LUMINANCE6_ALPHA2 */
5760+ 686, /* GL_LUMINANCE8_ALPHA8 */
5761+ 672, /* GL_LUMINANCE12_ALPHA4 */
5762+ 670, /* GL_LUMINANCE12_ALPHA12 */
5763+ 676, /* GL_LUMINANCE16_ALPHA16 */
5764+ 593, /* GL_INTENSITY */
5765+ 598, /* GL_INTENSITY4 */
5766+ 600, /* GL_INTENSITY8 */
5767+ 594, /* GL_INTENSITY12 */
5768+ 596, /* GL_INTENSITY16 */
5769+ 1263, /* GL_RGB2_EXT */
5770+ 1264, /* GL_RGB4 */
5771+ 1267, /* GL_RGB5 */
5772+ 1271, /* GL_RGB8 */
5773+ 1255, /* GL_RGB10 */
5774+ 1259, /* GL_RGB12 */
5775+ 1261, /* GL_RGB16 */
5776+ 1278, /* GL_RGBA2 */
5777+ 1280, /* GL_RGBA4 */
5778+ 1268, /* GL_RGB5_A1 */
5779+ 1284, /* GL_RGBA8 */
5780+ 1256, /* GL_RGB10_A2 */
5781+ 1274, /* GL_RGBA12 */
5782+ 1276, /* GL_RGBA16 */
5783+ 1613, /* GL_TEXTURE_RED_SIZE */
5784+ 1585, /* GL_TEXTURE_GREEN_SIZE */
5785+ 1524, /* GL_TEXTURE_BLUE_SIZE */
5786+ 1511, /* GL_TEXTURE_ALPHA_SIZE */
5787+ 1598, /* GL_TEXTURE_LUMINANCE_SIZE */
5788+ 1589, /* GL_TEXTURE_INTENSITY_SIZE */
5789+ 1249, /* GL_REPLACE_EXT */
5790+ 1197, /* GL_PROXY_TEXTURE_1D */
5791+ 1200, /* GL_PROXY_TEXTURE_2D */
5792+ 1617, /* GL_TEXTURE_TOO_LARGE_EXT */
5793+ 1610, /* GL_TEXTURE_PRIORITY */
5794+ 1615, /* GL_TEXTURE_RESIDENT */
5795+ 1514, /* GL_TEXTURE_BINDING_1D */
5796+ 1516, /* GL_TEXTURE_BINDING_2D */
5797+ 1518, /* GL_TEXTURE_BINDING_3D */
5798+ 1028, /* GL_PACK_SKIP_IMAGES */
5799+ 1024, /* GL_PACK_IMAGE_HEIGHT */
5800+ 1646, /* GL_UNPACK_SKIP_IMAGES */
5801+ 1643, /* GL_UNPACK_IMAGE_HEIGHT */
5802+ 1510, /* GL_TEXTURE_3D */
5803+ 1203, /* GL_PROXY_TEXTURE_3D */
5804+ 1572, /* GL_TEXTURE_DEPTH */
5805+ 1620, /* GL_TEXTURE_WRAP_R */
5806+ 794, /* GL_MAX_3D_TEXTURE_SIZE */
5807+ 1676, /* GL_VERTEX_ARRAY */
5808+ 959, /* GL_NORMAL_ARRAY */
5809+ 139, /* GL_COLOR_ARRAY */
5810+ 578, /* GL_INDEX_ARRAY */
5811+ 1551, /* GL_TEXTURE_COORD_ARRAY */
5812+ 415, /* GL_EDGE_FLAG_ARRAY */
5813+ 1681, /* GL_VERTEX_ARRAY_SIZE */
5814+ 1683, /* GL_VERTEX_ARRAY_TYPE */
5815+ 1682, /* GL_VERTEX_ARRAY_STRIDE */
5816+ 964, /* GL_NORMAL_ARRAY_TYPE */
5817+ 963, /* GL_NORMAL_ARRAY_STRIDE */
5818+ 143, /* GL_COLOR_ARRAY_SIZE */
5819+ 145, /* GL_COLOR_ARRAY_TYPE */
5820+ 144, /* GL_COLOR_ARRAY_STRIDE */
5821+ 583, /* GL_INDEX_ARRAY_TYPE */
5822+ 582, /* GL_INDEX_ARRAY_STRIDE */
5823+ 1555, /* GL_TEXTURE_COORD_ARRAY_SIZE */
5824+ 1557, /* GL_TEXTURE_COORD_ARRAY_TYPE */
5825+ 1556, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
5826+ 419, /* GL_EDGE_FLAG_ARRAY_STRIDE */
5827+ 1680, /* GL_VERTEX_ARRAY_POINTER */
5828+ 962, /* GL_NORMAL_ARRAY_POINTER */
5829+ 142, /* GL_COLOR_ARRAY_POINTER */
5830+ 581, /* GL_INDEX_ARRAY_POINTER */
5831+ 1554, /* GL_TEXTURE_COORD_ARRAY_POINTER */
5832+ 418, /* GL_EDGE_FLAG_ARRAY_POINTER */
5833+ 938, /* GL_MULTISAMPLE */
5834+ 1306, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
5835+ 1308, /* GL_SAMPLE_ALPHA_TO_ONE */
5836+ 1313, /* GL_SAMPLE_COVERAGE */
5837+ 1310, /* GL_SAMPLE_BUFFERS */
5838+ 1301, /* GL_SAMPLES */
5839+ 1317, /* GL_SAMPLE_COVERAGE_VALUE */
5840+ 1315, /* GL_SAMPLE_COVERAGE_INVERT */
5841+ 170, /* GL_COLOR_MATRIX */
5842+ 172, /* GL_COLOR_MATRIX_STACK_DEPTH */
5843+ 802, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
5844+ 1129, /* GL_POST_COLOR_MATRIX_RED_SCALE */
5845+ 1125, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
5846+ 1120, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
5847+ 1116, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
5848+ 1127, /* GL_POST_COLOR_MATRIX_RED_BIAS */
5849+ 1123, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
5850+ 1118, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
5851+ 1114, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
5852+ 1534, /* GL_TEXTURE_COLOR_TABLE_SGI */
5853+ 1204, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
5854+ 1536, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
5855+ 80, /* GL_BLEND_DST_RGB */
5856+ 88, /* GL_BLEND_SRC_RGB */
5857+ 79, /* GL_BLEND_DST_ALPHA */
5858+ 87, /* GL_BLEND_SRC_ALPHA */
5859+ 176, /* GL_COLOR_TABLE */
5860+ 1139, /* GL_POST_CONVOLUTION_COLOR_TABLE */
5861+ 1122, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
5862+ 1192, /* GL_PROXY_COLOR_TABLE */
5863+ 1196, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
5864+ 1195, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
5865+ 200, /* GL_COLOR_TABLE_SCALE */
5866+ 180, /* GL_COLOR_TABLE_BIAS */
5867+ 185, /* GL_COLOR_TABLE_FORMAT */
5868+ 202, /* GL_COLOR_TABLE_WIDTH */
5869+ 197, /* GL_COLOR_TABLE_RED_SIZE */
5870+ 188, /* GL_COLOR_TABLE_GREEN_SIZE */
5871+ 182, /* GL_COLOR_TABLE_BLUE_SIZE */
5872+ 177, /* GL_COLOR_TABLE_ALPHA_SIZE */
5873+ 194, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
5874+ 191, /* GL_COLOR_TABLE_INTENSITY_SIZE */
5875+ 71, /* GL_BGR */
5876+ 72, /* GL_BGRA */
5877+ 816, /* GL_MAX_ELEMENTS_VERTICES */
5878+ 815, /* GL_MAX_ELEMENTS_INDICES */
5879+ 1588, /* GL_TEXTURE_INDEX_SIZE_EXT */
5880+ 136, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
5881+ 1086, /* GL_POINT_SIZE_MIN */
5882+ 1082, /* GL_POINT_SIZE_MAX */
5883+ 1076, /* GL_POINT_FADE_THRESHOLD_SIZE */
5884+ 1072, /* GL_POINT_DISTANCE_ATTENUATION */
5885+ 118, /* GL_CLAMP_TO_BORDER */
5886+ 121, /* GL_CLAMP_TO_EDGE */
5887+ 1609, /* GL_TEXTURE_MIN_LOD */
5888+ 1607, /* GL_TEXTURE_MAX_LOD */
5889+ 1513, /* GL_TEXTURE_BASE_LEVEL */
5890+ 1606, /* GL_TEXTURE_MAX_LEVEL */
5891+ 572, /* GL_IGNORE_BORDER_HP */
5892+ 246, /* GL_CONSTANT_BORDER_HP */
5893+ 1250, /* GL_REPLICATE_BORDER_HP */
5894+ 252, /* GL_CONVOLUTION_BORDER_COLOR */
5895+ 987, /* GL_OCCLUSION_TEST_HP */
5896+ 988, /* GL_OCCLUSION_TEST_RESULT_HP */
5897+ 641, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
5898+ 1528, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
5899+ 1530, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
5900+ 1532, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
5901+ 1533, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
5902+ 1531, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
5903+ 1529, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
5904+ 798, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
5905+ 799, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
5906+ 1149, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
5907+ 1151, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
5908+ 1148, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
5909+ 1150, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
5910+ 1596, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
5911+ 1597, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
5912+ 1595, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
5913+ 518, /* GL_GENERATE_MIPMAP */
5914+ 519, /* GL_GENERATE_MIPMAP_HINT */
5915+ 481, /* GL_FOG_OFFSET_SGIX */
5916+ 482, /* GL_FOG_OFFSET_VALUE_SGIX */
5917+ 1542, /* GL_TEXTURE_COMPARE_SGIX */
5918+ 1541, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
5919+ 1592, /* GL_TEXTURE_LEQUAL_R_SGIX */
5920+ 1584, /* GL_TEXTURE_GEQUAL_R_SGIX */
5921+ 323, /* GL_DEPTH_COMPONENT16 */
5922+ 326, /* GL_DEPTH_COMPONENT24 */
5923+ 329, /* GL_DEPTH_COMPONENT32 */
5924+ 274, /* GL_CULL_VERTEX_EXT */
5925+ 276, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
5926+ 275, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
5927+ 1737, /* GL_WRAP_BORDER_SUN */
5928+ 1535, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
5929+ 634, /* GL_LIGHT_MODEL_COLOR_CONTROL */
5930+ 1345, /* GL_SINGLE_COLOR */
5931+ 1333, /* GL_SEPARATE_SPECULAR_COLOR */
5932+ 1342, /* GL_SHARED_TEXTURE_PALETTE_EXT */
5933+ 1651, /* GL_UNSIGNED_BYTE_2_3_3_REV */
5934+ 1664, /* GL_UNSIGNED_SHORT_5_6_5 */
5935+ 1665, /* GL_UNSIGNED_SHORT_5_6_5_REV */
5936+ 1662, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
5937+ 1660, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
5938+ 1658, /* GL_UNSIGNED_INT_8_8_8_8_REV */
5939+ 1656, /* GL_UNSIGNED_INT_2_10_10_10_REV */
5940+ 1604, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
5941+ 1605, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
5942+ 1603, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
5943+ 889, /* GL_MIRRORED_REPEAT */
5944+ 1289, /* GL_RGB_S3TC */
5945+ 1266, /* GL_RGB4_S3TC */
5946+ 1288, /* GL_RGBA_S3TC */
5947+ 1283, /* GL_RGBA4_S3TC */
5948+ 1286, /* GL_RGBA_DXT5_S3TC */
5949+ 1281, /* GL_RGBA4_DXT5_S3TC */
5950+ 239, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
5951+ 234, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
5952+ 235, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
5953+ 236, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
5954+ 950, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
5955+ 949, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
5956+ 642, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
5957+ 468, /* GL_FOG_COORDINATE_SOURCE */
5958+ 460, /* GL_FOG_COORD */
5959+ 484, /* GL_FRAGMENT_DEPTH */
5960+ 280, /* GL_CURRENT_FOG_COORD */
5961+ 467, /* GL_FOG_COORDINATE_ARRAY_TYPE */
5962+ 466, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
5963+ 465, /* GL_FOG_COORDINATE_ARRAY_POINTER */
5964+ 462, /* GL_FOG_COORDINATE_ARRAY */
5965+ 174, /* GL_COLOR_SUM */
5966+ 299, /* GL_CURRENT_SECONDARY_COLOR */
5967+ 1326, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
5968+ 1328, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
5969+ 1327, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
5970+ 1325, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
5971+ 1322, /* GL_SECONDARY_COLOR_ARRAY */
5972+ 528, /* GL_GL_CURRENT_RASTER_SECONDARY_COLOR */
5973+ 28, /* GL_ALIASED_POINT_SIZE_RANGE */
5974+ 27, /* GL_ALIASED_LINE_WIDTH_RANGE */
5975+ 1442, /* GL_TEXTURE0 */
5976+ 1444, /* GL_TEXTURE1 */
5977+ 1466, /* GL_TEXTURE2 */
5978+ 1488, /* GL_TEXTURE3 */
5979+ 1494, /* GL_TEXTURE4 */
5980+ 1496, /* GL_TEXTURE5 */
5981+ 1498, /* GL_TEXTURE6 */
5982+ 1500, /* GL_TEXTURE7 */
5983+ 1502, /* GL_TEXTURE8 */
5984+ 1504, /* GL_TEXTURE9 */
5985+ 1445, /* GL_TEXTURE10 */
5986+ 1447, /* GL_TEXTURE11 */
5987+ 1449, /* GL_TEXTURE12 */
5988+ 1451, /* GL_TEXTURE13 */
5989+ 1453, /* GL_TEXTURE14 */
5990+ 1455, /* GL_TEXTURE15 */
5991+ 1457, /* GL_TEXTURE16 */
5992+ 1459, /* GL_TEXTURE17 */
5993+ 1461, /* GL_TEXTURE18 */
5994+ 1463, /* GL_TEXTURE19 */
5995+ 1467, /* GL_TEXTURE20 */
5996+ 1469, /* GL_TEXTURE21 */
5997+ 1471, /* GL_TEXTURE22 */
5998+ 1473, /* GL_TEXTURE23 */
5999+ 1475, /* GL_TEXTURE24 */
6000+ 1477, /* GL_TEXTURE25 */
6001+ 1479, /* GL_TEXTURE26 */
6002+ 1481, /* GL_TEXTURE27 */
6003+ 1483, /* GL_TEXTURE28 */
6004+ 1485, /* GL_TEXTURE29 */
6005+ 1489, /* GL_TEXTURE30 */
6006+ 1491, /* GL_TEXTURE31 */
6007+ 18, /* GL_ACTIVE_TEXTURE */
6008+ 124, /* GL_CLIENT_ACTIVE_TEXTURE */
6009+ 867, /* GL_MAX_TEXTURE_UNITS */
6010+ 1630, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
6011+ 1633, /* GL_TRANSPOSE_PROJECTION_MATRIX */
6012+ 1635, /* GL_TRANSPOSE_TEXTURE_MATRIX */
6013+ 1627, /* GL_TRANSPOSE_COLOR_MATRIX */
6014+ 1430, /* GL_SUBTRACT */
6015+ 856, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
6016+ 222, /* GL_COMPRESSED_ALPHA */
6017+ 226, /* GL_COMPRESSED_LUMINANCE */
6018+ 227, /* GL_COMPRESSED_LUMINANCE_ALPHA */
6019+ 224, /* GL_COMPRESSED_INTENSITY */
6020+ 230, /* GL_COMPRESSED_RGB */
6021+ 231, /* GL_COMPRESSED_RGBA */
6022+ 1549, /* GL_TEXTURE_COMPRESSION_HINT */
6023+ 1611, /* GL_TEXTURE_RECTANGLE_ARB */
6024+ 1521, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
6025+ 1207, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
6026+ 854, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
6027+ 335, /* GL_DEPTH_STENCIL_NV */
6028+ 1655, /* GL_UNSIGNED_INT_24_8_NV */
6029+ 863, /* GL_MAX_TEXTURE_LOD_BIAS */
6030+ 1602, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
6031+ 864, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
6032+ 1578, /* GL_TEXTURE_FILTER_CONTROL */
6033+ 1593, /* GL_TEXTURE_LOD_BIAS */
6034+ 207, /* GL_COMBINE4 */
6035+ 857, /* GL_MAX_SHININESS_NV */
6036+ 858, /* GL_MAX_SPOT_EXPONENT_NV */
6037+ 576, /* GL_INCR_WRAP */
6038+ 310, /* GL_DECR_WRAP */
6039+ 909, /* GL_MODELVIEW1_ARB */
6040+ 965, /* GL_NORMAL_MAP */
6041+ 1236, /* GL_REFLECTION_MAP */
6042+ 1558, /* GL_TEXTURE_CUBE_MAP */
6043+ 1519, /* GL_TEXTURE_BINDING_CUBE_MAP */
6044+ 1566, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
6045+ 1560, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
6046+ 1568, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
6047+ 1562, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
6048+ 1570, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
6049+ 1564, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
6050+ 1205, /* GL_PROXY_TEXTURE_CUBE_MAP */
6051+ 810, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
6052+ 944, /* GL_MULTISAMPLE_FILTER_HINT_NV */
6053+ 476, /* GL_FOG_DISTANCE_MODE_NV */
6054+ 435, /* GL_EYE_RADIAL_NV */
6055+ 434, /* GL_EYE_PLANE_ABSOLUTE_NV */
6056+ 206, /* GL_COMBINE */
6057+ 213, /* GL_COMBINE_RGB */
6058+ 208, /* GL_COMBINE_ALPHA */
6059+ 1290, /* GL_RGB_SCALE */
6060+ 24, /* GL_ADD_SIGNED */
6061+ 603, /* GL_INTERPOLATE */
6062+ 241, /* GL_CONSTANT */
6063+ 1155, /* GL_PRIMARY_COLOR */
6064+ 1152, /* GL_PREVIOUS */
6065+ 1356, /* GL_SOURCE0_RGB */
6066+ 1362, /* GL_SOURCE1_RGB */
6067+ 1368, /* GL_SOURCE2_RGB */
6068+ 1372, /* GL_SOURCE3_RGB_NV */
6069+ 1353, /* GL_SOURCE0_ALPHA */
6070+ 1359, /* GL_SOURCE1_ALPHA */
6071+ 1365, /* GL_SOURCE2_ALPHA */
6072+ 1371, /* GL_SOURCE3_ALPHA_NV */
6073+ 1001, /* GL_OPERAND0_RGB */
6074+ 1007, /* GL_OPERAND1_RGB */
6075+ 1013, /* GL_OPERAND2_RGB */
6076+ 1017, /* GL_OPERAND3_RGB_NV */
6077+ 998, /* GL_OPERAND0_ALPHA */
6078+ 1004, /* GL_OPERAND1_ALPHA */
6079+ 1010, /* GL_OPERAND2_ALPHA */
6080+ 1016, /* GL_OPERAND3_ALPHA_NV */
6081+ 1677, /* GL_VERTEX_ARRAY_BINDING_APPLE */
6082+ 1741, /* GL_YCBCR_422_APPLE */
6083+ 1666, /* GL_UNSIGNED_SHORT_8_8_APPLE */
6084+ 1668, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
6085+ 1347, /* GL_SLICE_ACCUM_SUN */
6086+ 1212, /* GL_QUAD_MESH_SUN */
6087+ 1639, /* GL_TRIANGLE_MESH_SUN */
6088+ 1715, /* GL_VERTEX_PROGRAM_ARB */
6089+ 1726, /* GL_VERTEX_STATE_PROGRAM_NV */
6090+ 1702, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
6091+ 1708, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
6092+ 1710, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
6093+ 1712, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
6094+ 301, /* GL_CURRENT_VERTEX_ATTRIB */
6095+ 1168, /* GL_PROGRAM_LENGTH_ARB */
6096+ 1182, /* GL_PROGRAM_STRING_ARB */
6097+ 931, /* GL_MODELVIEW_PROJECTION_NV */
6098+ 571, /* GL_IDENTITY_NV */
6099+ 616, /* GL_INVERSE_NV */
6100+ 1632, /* GL_TRANSPOSE_NV */
6101+ 617, /* GL_INVERSE_TRANSPOSE_NV */
6102+ 840, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
6103+ 839, /* GL_MAX_PROGRAM_MATRICES_ARB */
6104+ 747, /* GL_MATRIX0_NV */
6105+ 759, /* GL_MATRIX1_NV */
6106+ 771, /* GL_MATRIX2_NV */
6107+ 775, /* GL_MATRIX3_NV */
6108+ 777, /* GL_MATRIX4_NV */
6109+ 779, /* GL_MATRIX5_NV */
6110+ 781, /* GL_MATRIX6_NV */
6111+ 783, /* GL_MATRIX7_NV */
6112+ 286, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
6113+ 283, /* GL_CURRENT_MATRIX_ARB */
6114+ 1718, /* GL_VERTEX_PROGRAM_POINT_SIZE */
6115+ 1721, /* GL_VERTEX_PROGRAM_TWO_SIDE */
6116+ 1180, /* GL_PROGRAM_PARAMETER_NV */
6117+ 1706, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
6118+ 1184, /* GL_PROGRAM_TARGET_NV */
6119+ 1181, /* GL_PROGRAM_RESIDENT_NV */
6120+ 1624, /* GL_TRACK_MATRIX_NV */
6121+ 1625, /* GL_TRACK_MATRIX_TRANSFORM_NV */
6122+ 1716, /* GL_VERTEX_PROGRAM_BINDING_NV */
6123+ 1162, /* GL_PROGRAM_ERROR_POSITION_ARB */
6124+ 320, /* GL_DEPTH_CLAMP_NV */
6125+ 1684, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
6126+ 1691, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
6127+ 1692, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
6128+ 1693, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
6129+ 1694, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
6130+ 1695, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
6131+ 1696, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
6132+ 1697, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
6133+ 1698, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
6134+ 1699, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
6135+ 1685, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
6136+ 1686, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
6137+ 1687, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
6138+ 1688, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
6139+ 1689, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
6140+ 1690, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
6141+ 701, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
6142+ 708, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
6143+ 709, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
6144+ 710, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
6145+ 711, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
6146+ 712, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
6147+ 713, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
6148+ 714, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
6149+ 715, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
6150+ 716, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
6151+ 702, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
6152+ 703, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
6153+ 704, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
6154+ 705, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
6155+ 706, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
6156+ 707, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
6157+ 728, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
6158+ 735, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
6159+ 736, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
6160+ 737, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
6161+ 738, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
6162+ 739, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
6163+ 740, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
6164+ 1161, /* GL_PROGRAM_BINDING_ARB */
6165+ 742, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
6166+ 743, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
6167+ 729, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
6168+ 730, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
6169+ 731, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
6170+ 732, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
6171+ 733, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
6172+ 734, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
6173+ 1547, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
6174+ 1544, /* GL_TEXTURE_COMPRESSED */
6175+ 970, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
6176+ 240, /* GL_COMPRESSED_TEXTURE_FORMATS */
6177+ 879, /* GL_MAX_VERTEX_UNITS_ARB */
6178+ 22, /* GL_ACTIVE_VERTEX_UNITS_ARB */
6179+ 1736, /* GL_WEIGHT_SUM_UNITY_ARB */
6180+ 1714, /* GL_VERTEX_BLEND_ARB */
6181+ 303, /* GL_CURRENT_WEIGHT_ARB */
6182+ 1735, /* GL_WEIGHT_ARRAY_TYPE_ARB */
6183+ 1734, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
6184+ 1733, /* GL_WEIGHT_ARRAY_SIZE_ARB */
6185+ 1732, /* GL_WEIGHT_ARRAY_POINTER_ARB */
6186+ 1729, /* GL_WEIGHT_ARRAY_ARB */
6187+ 346, /* GL_DOT3_RGB */
6188+ 347, /* GL_DOT3_RGBA */
6189+ 238, /* GL_COMPRESSED_RGB_FXT1_3DFX */
6190+ 233, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
6191+ 939, /* GL_MULTISAMPLE_3DFX */
6192+ 1311, /* GL_SAMPLE_BUFFERS_3DFX */
6193+ 1302, /* GL_SAMPLES_3DFX */
6194+ 920, /* GL_MODELVIEW2_ARB */
6195+ 923, /* GL_MODELVIEW3_ARB */
6196+ 924, /* GL_MODELVIEW4_ARB */
6197+ 925, /* GL_MODELVIEW5_ARB */
6198+ 926, /* GL_MODELVIEW6_ARB */
6199+ 927, /* GL_MODELVIEW7_ARB */
6200+ 928, /* GL_MODELVIEW8_ARB */
6201+ 929, /* GL_MODELVIEW9_ARB */
6202+ 899, /* GL_MODELVIEW10_ARB */
6203+ 900, /* GL_MODELVIEW11_ARB */
6204+ 901, /* GL_MODELVIEW12_ARB */
6205+ 902, /* GL_MODELVIEW13_ARB */
6206+ 903, /* GL_MODELVIEW14_ARB */
6207+ 904, /* GL_MODELVIEW15_ARB */
6208+ 905, /* GL_MODELVIEW16_ARB */
6209+ 906, /* GL_MODELVIEW17_ARB */
6210+ 907, /* GL_MODELVIEW18_ARB */
6211+ 908, /* GL_MODELVIEW19_ARB */
6212+ 910, /* GL_MODELVIEW20_ARB */
6213+ 911, /* GL_MODELVIEW21_ARB */
6214+ 912, /* GL_MODELVIEW22_ARB */
6215+ 913, /* GL_MODELVIEW23_ARB */
6216+ 914, /* GL_MODELVIEW24_ARB */
6217+ 915, /* GL_MODELVIEW25_ARB */
6218+ 916, /* GL_MODELVIEW26_ARB */
6219+ 917, /* GL_MODELVIEW27_ARB */
6220+ 918, /* GL_MODELVIEW28_ARB */
6221+ 919, /* GL_MODELVIEW29_ARB */
6222+ 921, /* GL_MODELVIEW30_ARB */
6223+ 922, /* GL_MODELVIEW31_ARB */
6224+ 351, /* GL_DOT3_RGB_EXT */
6225+ 349, /* GL_DOT3_RGBA_EXT */
6226+ 893, /* GL_MIRROR_CLAMP_EXT */
6227+ 896, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
6228+ 934, /* GL_MODULATE_ADD_ATI */
6229+ 935, /* GL_MODULATE_SIGNED_ADD_ATI */
6230+ 936, /* GL_MODULATE_SUBTRACT_ATI */
6231+ 1742, /* GL_YCBCR_MESA */
6232+ 1025, /* GL_PACK_INVERT_MESA */
6233+ 306, /* GL_DEBUG_OBJECT_MESA */
6234+ 307, /* GL_DEBUG_PRINT_MESA */
6235+ 305, /* GL_DEBUG_ASSERT_MESA */
6236+ 107, /* GL_BUFFER_SIZE */
6237+ 109, /* GL_BUFFER_USAGE */
6238+ 1398, /* GL_STENCIL_BACK_FUNC */
6239+ 1397, /* GL_STENCIL_BACK_FAIL */
6240+ 1399, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
6241+ 1400, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
6242+ 485, /* GL_FRAGMENT_PROGRAM_ARB */
6243+ 1159, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
6244+ 1187, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
6245+ 1186, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
6246+ 1171, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
6247+ 1177, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
6248+ 1176, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
6249+ 829, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
6250+ 852, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
6251+ 851, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
6252+ 842, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
6253+ 848, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
6254+ 847, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
6255+ 812, /* GL_MAX_DRAW_BUFFERS */
6256+ 355, /* GL_DRAW_BUFFER0 */
6257+ 358, /* GL_DRAW_BUFFER1 */
6258+ 379, /* GL_DRAW_BUFFER2 */
6259+ 382, /* GL_DRAW_BUFFER3 */
6260+ 385, /* GL_DRAW_BUFFER4 */
6261+ 388, /* GL_DRAW_BUFFER5 */
6262+ 391, /* GL_DRAW_BUFFER6 */
6263+ 394, /* GL_DRAW_BUFFER7 */
6264+ 397, /* GL_DRAW_BUFFER8 */
6265+ 400, /* GL_DRAW_BUFFER9 */
6266+ 359, /* GL_DRAW_BUFFER10 */
6267+ 362, /* GL_DRAW_BUFFER11 */
6268+ 365, /* GL_DRAW_BUFFER12 */
6269+ 368, /* GL_DRAW_BUFFER13 */
6270+ 371, /* GL_DRAW_BUFFER14 */
6271+ 374, /* GL_DRAW_BUFFER15 */
6272+ 82, /* GL_BLEND_EQUATION_ALPHA */
6273+ 792, /* GL_MATRIX_PALETTE_ARB */
6274+ 823, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
6275+ 826, /* GL_MAX_PALETTE_MATRICES_ARB */
6276+ 289, /* GL_CURRENT_PALETTE_MATRIX_ARB */
6277+ 786, /* GL_MATRIX_INDEX_ARRAY_ARB */
6278+ 284, /* GL_CURRENT_MATRIX_INDEX_ARB */
6279+ 788, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
6280+ 790, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
6281+ 789, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
6282+ 787, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
6283+ 1573, /* GL_TEXTURE_DEPTH_SIZE */
6284+ 339, /* GL_DEPTH_TEXTURE_MODE */
6285+ 1539, /* GL_TEXTURE_COMPARE_MODE */
6286+ 1537, /* GL_TEXTURE_COMPARE_FUNC */
6287+ 217, /* GL_COMPARE_R_TO_TEXTURE */
6288+ 1093, /* GL_POINT_SPRITE */
6289+ 266, /* GL_COORD_REPLACE */
6290+ 1097, /* GL_POINT_SPRITE_R_MODE_NV */
6291+ 1214, /* GL_QUERY_COUNTER_BITS */
6292+ 291, /* GL_CURRENT_QUERY */
6293+ 1216, /* GL_QUERY_RESULT */
6294+ 1218, /* GL_QUERY_RESULT_AVAILABLE */
6295+ 873, /* GL_MAX_VERTEX_ATTRIBS */
6296+ 1704, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
6297+ 337, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
6298+ 336, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
6299+ 859, /* GL_MAX_TEXTURE_COORDS */
6300+ 861, /* GL_MAX_TEXTURE_IMAGE_UNITS */
6301+ 1164, /* GL_PROGRAM_ERROR_STRING_ARB */
6302+ 1166, /* GL_PROGRAM_FORMAT_ASCII_ARB */
6303+ 1165, /* GL_PROGRAM_FORMAT_ARB */
6304+ 1618, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
6305+ 318, /* GL_DEPTH_BOUNDS_TEST_EXT */
6306+ 317, /* GL_DEPTH_BOUNDS_EXT */
6307+ 52, /* GL_ARRAY_BUFFER */
6308+ 420, /* GL_ELEMENT_ARRAY_BUFFER */
6309+ 54, /* GL_ARRAY_BUFFER_BINDING */
6310+ 422, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
6311+ 1678, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
6312+ 960, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
6313+ 140, /* GL_COLOR_ARRAY_BUFFER_BINDING */
6314+ 579, /* GL_INDEX_ARRAY_BUFFER_BINDING */
6315+ 1552, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
6316+ 416, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
6317+ 1323, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
6318+ 463, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
6319+ 1730, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
6320+ 1700, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
6321+ 1167, /* GL_PROGRAM_INSTRUCTIONS_ARB */
6322+ 835, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
6323+ 1173, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
6324+ 844, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
6325+ 1185, /* GL_PROGRAM_TEMPORARIES_ARB */
6326+ 850, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
6327+ 1175, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
6328+ 846, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
6329+ 1179, /* GL_PROGRAM_PARAMETERS_ARB */
6330+ 849, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
6331+ 1174, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
6332+ 845, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
6333+ 1160, /* GL_PROGRAM_ATTRIBS_ARB */
6334+ 830, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
6335+ 1172, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
6336+ 843, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
6337+ 1158, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
6338+ 828, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
6339+ 1170, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
6340+ 841, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
6341+ 836, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
6342+ 832, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
6343+ 1188, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
6344+ 1629, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
6345+ 1226, /* GL_READ_ONLY */
6346+ 1738, /* GL_WRITE_ONLY */
6347+ 1228, /* GL_READ_WRITE */
6348+ 101, /* GL_BUFFER_ACCESS */
6349+ 103, /* GL_BUFFER_MAPPED */
6350+ 105, /* GL_BUFFER_MAP_POINTER */
6351+ 1623, /* GL_TIME_ELAPSED_EXT */
6352+ 746, /* GL_MATRIX0_ARB */
6353+ 758, /* GL_MATRIX1_ARB */
6354+ 770, /* GL_MATRIX2_ARB */
6355+ 774, /* GL_MATRIX3_ARB */
6356+ 776, /* GL_MATRIX4_ARB */
6357+ 778, /* GL_MATRIX5_ARB */
6358+ 780, /* GL_MATRIX6_ARB */
6359+ 782, /* GL_MATRIX7_ARB */
6360+ 784, /* GL_MATRIX8_ARB */
6361+ 785, /* GL_MATRIX9_ARB */
6362+ 748, /* GL_MATRIX10_ARB */
6363+ 749, /* GL_MATRIX11_ARB */
6364+ 750, /* GL_MATRIX12_ARB */
6365+ 751, /* GL_MATRIX13_ARB */
6366+ 752, /* GL_MATRIX14_ARB */
6367+ 753, /* GL_MATRIX15_ARB */
6368+ 754, /* GL_MATRIX16_ARB */
6369+ 755, /* GL_MATRIX17_ARB */
6370+ 756, /* GL_MATRIX18_ARB */
6371+ 757, /* GL_MATRIX19_ARB */
6372+ 760, /* GL_MATRIX20_ARB */
6373+ 761, /* GL_MATRIX21_ARB */
6374+ 762, /* GL_MATRIX22_ARB */
6375+ 763, /* GL_MATRIX23_ARB */
6376+ 764, /* GL_MATRIX24_ARB */
6377+ 765, /* GL_MATRIX25_ARB */
6378+ 766, /* GL_MATRIX26_ARB */
6379+ 767, /* GL_MATRIX27_ARB */
6380+ 768, /* GL_MATRIX28_ARB */
6381+ 769, /* GL_MATRIX29_ARB */
6382+ 772, /* GL_MATRIX30_ARB */
6383+ 773, /* GL_MATRIX31_ARB */
6384+ 1425, /* GL_STREAM_DRAW */
6385+ 1427, /* GL_STREAM_READ */
6386+ 1423, /* GL_STREAM_COPY */
6387+ 1391, /* GL_STATIC_DRAW */
6388+ 1393, /* GL_STATIC_READ */
6389+ 1389, /* GL_STATIC_COPY */
6390+ 410, /* GL_DYNAMIC_DRAW */
6391+ 412, /* GL_DYNAMIC_READ */
6392+ 408, /* GL_DYNAMIC_COPY */
6393+ 535, /* GL_GL_PIXEL_PACK_BUFFER */
6394+ 537, /* GL_GL_PIXEL_UNPACK_BUFFER */
6395+ 536, /* GL_GL_PIXEL_PACK_BUFFER_BINDING */
6396+ 538, /* GL_GL_PIXEL_UNPACK_BUFFER_BINDING */
6397+ 833, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
6398+ 831, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
6399+ 834, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
6400+ 838, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
6401+ 837, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
6402+ 795, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
6403+ 1419, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
6404+ 17, /* GL_ACTIVE_STENCIL_FACE_EXT */
6405+ 894, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
6406+ 1304, /* GL_SAMPLES_PASSED */
6407+ 486, /* GL_FRAGMENT_SHADER */
6408+ 1724, /* GL_VERTEX_SHADER */
6409+ 1178, /* GL_PROGRAM_OBJECT_ARB */
6410+ 1336, /* GL_SHADER_OBJECT_ARB */
6411+ 819, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
6412+ 877, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
6413+ 871, /* GL_MAX_VARYING_FLOATS */
6414+ 875, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
6415+ 804, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
6416+ 985, /* GL_OBJECT_TYPE_ARB */
6417+ 1338, /* GL_SHADER_TYPE */
6418+ 451, /* GL_FLOAT_VEC2 */
6419+ 453, /* GL_FLOAT_VEC3 */
6420+ 455, /* GL_FLOAT_VEC4 */
6421+ 606, /* GL_INT_VEC2 */
6422+ 608, /* GL_INT_VEC3 */
6423+ 610, /* GL_INT_VEC4 */
6424+ 93, /* GL_BOOL */
6425+ 95, /* GL_BOOL_VEC2 */
6426+ 97, /* GL_BOOL_VEC3 */
6427+ 99, /* GL_BOOL_VEC4 */
6428+ 445, /* GL_FLOAT_MAT2 */
6429+ 447, /* GL_FLOAT_MAT3 */
6430+ 449, /* GL_FLOAT_MAT4 */
6431+ 1295, /* GL_SAMPLER_1D */
6432+ 1297, /* GL_SAMPLER_2D */
6433+ 1299, /* GL_SAMPLER_3D */
6434+ 1300, /* GL_SAMPLER_CUBE */
6435+ 1296, /* GL_SAMPLER_1D_SHADOW */
6436+ 1298, /* GL_SAMPLER_2D_SHADOW */
6437+ 529, /* GL_GL_FLOAT_MAT2x3 */
6438+ 530, /* GL_GL_FLOAT_MAT2x4 */
6439+ 531, /* GL_GL_FLOAT_MAT3x2 */
6440+ 532, /* GL_GL_FLOAT_MAT3x4 */
6441+ 533, /* GL_GL_FLOAT_MAT4x2 */
6442+ 534, /* GL_GL_FLOAT_MAT4x3 */
6443+ 312, /* GL_DELETE_STATUS */
6444+ 221, /* GL_COMPILE_STATUS */
6445+ 659, /* GL_LINK_STATUS */
6446+ 1673, /* GL_VALIDATE_STATUS */
6447+ 591, /* GL_INFO_LOG_LENGTH */
6448+ 56, /* GL_ATTACHED_SHADERS */
6449+ 20, /* GL_ACTIVE_UNIFORMS */
6450+ 21, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
6451+ 1337, /* GL_SHADER_SOURCE_LENGTH */
6452+ 15, /* GL_ACTIVE_ATTRIBUTES */
6453+ 16, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
6454+ 488, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
6455+ 1340, /* GL_SHADING_LANGUAGE_VERSION */
6456+ 290, /* GL_CURRENT_PROGRAM */
6457+ 1034, /* GL_PALETTE4_RGB8_OES */
6458+ 1036, /* GL_PALETTE4_RGBA8_OES */
6459+ 1032, /* GL_PALETTE4_R5_G6_B5_OES */
6460+ 1035, /* GL_PALETTE4_RGBA4_OES */
6461+ 1033, /* GL_PALETTE4_RGB5_A1_OES */
6462+ 1039, /* GL_PALETTE8_RGB8_OES */
6463+ 1041, /* GL_PALETTE8_RGBA8_OES */
6464+ 1037, /* GL_PALETTE8_R5_G6_B5_OES */
6465+ 1040, /* GL_PALETTE8_RGBA4_OES */
6466+ 1038, /* GL_PALETTE8_RGB5_A1_OES */
6467+ 574, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
6468+ 573, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
6469+ 1507, /* GL_TEXTURE_1D_ARRAY_EXT */
6470+ 1198, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
6471+ 1509, /* GL_TEXTURE_2D_ARRAY_EXT */
6472+ 1201, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
6473+ 1515, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
6474+ 1517, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
6475+ 543, /* GL_GL_SRGB */
6476+ 544, /* GL_GL_SRGB8 */
6477+ 546, /* GL_GL_SRGB_ALPHA */
6478+ 545, /* GL_GL_SRGB8_ALPHA8 */
6479+ 542, /* GL_GL_SLUMINANCE_ALPHA */
6480+ 541, /* GL_GL_SLUMINANCE8_ALPHA8 */
6481+ 539, /* GL_GL_SLUMINANCE */
6482+ 540, /* GL_GL_SLUMINANCE8 */
6483+ 526, /* GL_GL_COMPRESSED_SRGB */
6484+ 527, /* GL_GL_COMPRESSED_SRGB_ALPHA */
6485+ 524, /* GL_GL_COMPRESSED_SLUMINANCE */
6486+ 525, /* GL_GL_COMPRESSED_SLUMINANCE_ALPHA */
6487+ 1095, /* GL_POINT_SPRITE_COORD_ORIGIN */
6488+ 667, /* GL_LOWER_LEFT */
6489+ 1670, /* GL_UPPER_LEFT */
6490+ 1401, /* GL_STENCIL_BACK_REF */
6491+ 1402, /* GL_STENCIL_BACK_VALUE_MASK */
6492+ 1403, /* GL_STENCIL_BACK_WRITEMASK */
6493+ 403, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
6494+ 1240, /* GL_RENDERBUFFER_BINDING_EXT */
6495+ 1225, /* GL_READ_FRAMEBUFFER_EXT */
6496+ 404, /* GL_DRAW_FRAMEBUFFER_EXT */
6497+ 1224, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
6498+ 490, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
6499+ 489, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
6500+ 494, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
6501+ 492, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
6502+ 491, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
6503+ 496, /* GL_FRAMEBUFFER_COMPLETE_EXT */
6504+ 498, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
6505+ 503, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
6506+ 501, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
6507+ 499, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
6508+ 502, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
6509+ 500, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
6510+ 504, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
6511+ 506, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
6512+ 505, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
6513+ 801, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
6514+ 146, /* GL_COLOR_ATTACHMENT0_EXT */
6515+ 153, /* GL_COLOR_ATTACHMENT1_EXT */
6516+ 154, /* GL_COLOR_ATTACHMENT2_EXT */
6517+ 155, /* GL_COLOR_ATTACHMENT3_EXT */
6518+ 156, /* GL_COLOR_ATTACHMENT4_EXT */
6519+ 157, /* GL_COLOR_ATTACHMENT5_EXT */
6520+ 158, /* GL_COLOR_ATTACHMENT6_EXT */
6521+ 159, /* GL_COLOR_ATTACHMENT7_EXT */
6522+ 160, /* GL_COLOR_ATTACHMENT8_EXT */
6523+ 161, /* GL_COLOR_ATTACHMENT9_EXT */
6524+ 147, /* GL_COLOR_ATTACHMENT10_EXT */
6525+ 148, /* GL_COLOR_ATTACHMENT11_EXT */
6526+ 149, /* GL_COLOR_ATTACHMENT12_EXT */
6527+ 150, /* GL_COLOR_ATTACHMENT13_EXT */
6528+ 151, /* GL_COLOR_ATTACHMENT14_EXT */
6529+ 152, /* GL_COLOR_ATTACHMENT15_EXT */
6530+ 314, /* GL_DEPTH_ATTACHMENT_EXT */
6531+ 1396, /* GL_STENCIL_ATTACHMENT_EXT */
6532+ 497, /* GL_FRAMEBUFFER_EXT */
6533+ 1241, /* GL_RENDERBUFFER_EXT */
6534+ 1244, /* GL_RENDERBUFFER_WIDTH_EXT */
6535+ 1242, /* GL_RENDERBUFFER_HEIGHT_EXT */
6536+ 1243, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
6537+ 1414, /* GL_STENCIL_INDEX_EXT */
6538+ 1411, /* GL_STENCIL_INDEX1_EXT */
6539+ 1412, /* GL_STENCIL_INDEX4_EXT */
6540+ 1413, /* GL_STENCIL_INDEX8_EXT */
6541+ 1410, /* GL_STENCIL_INDEX16_EXT */
6542+ 428, /* GL_EVAL_BIT */
6543+ 1222, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
6544+ 661, /* GL_LIST_BIT */
6545+ 1523, /* GL_TEXTURE_BIT */
6546+ 1319, /* GL_SCISSOR_BIT */
6547+ 29, /* GL_ALL_ATTRIB_BITS */
6548+ 941, /* GL_MULTISAMPLE_BIT */
6549+ 30, /* GL_ALL_CLIENT_ATTRIB_BITS */
6550+};
6551+
6552+#define Elements(x) sizeof(x)/sizeof(*x)
6553+
6554+typedef int (*cfunc)(const void *, const void *);
6555+
6556+/**
6557+ * Compare a key name to an element in the \c all_enums array.
6558+ *
6559+ * \c bsearch always passes the key as the first parameter and the pointer
6560+ * to the array element as the second parameter. We can elimiate some
6561+ * extra work by taking advantage of that fact.
6562+ *
6563+ * \param a Pointer to the desired enum name.
6564+ * \param b Pointer to an element of the \c all_enums array.
6565+ */
6566+static int compar_name( const char *a, const enum_elt *b )
6567+{
6568+ return _mesa_strcmp( a, & enum_string_table[ b->offset ] );
6569+}
6570+
6571+/**
6572+ * Compare a key enum value to an element in the \c all_enums array.
6573+ *
6574+ * \c bsearch always passes the key as the first parameter and the pointer
6575+ * to the array element as the second parameter. We can elimiate some
6576+ * extra work by taking advantage of that fact.
6577+ *
6578+ * \param a Pointer to the desired enum name.
6579+ * \param b Pointer to an index into the \c all_enums array.
6580+ */
6581+static int compar_nr( const int *a, const unsigned *b )
6582+{
6583+ return a[0] - all_enums[*b].n;
6584+}
6585+
6586+
6587+static char token_tmp[20];
6588+
6589+const char *_mesa_lookup_enum_by_nr( int nr )
6590+{
6591+ unsigned * i;
6592+
6593+ i = (unsigned *)bsearch( & nr, reduced_enums, Elements(reduced_enums),
6594+ sizeof(reduced_enums[0]), (cfunc) compar_nr );
6595+
6596+ if ( i != NULL ) {
6597+ return & enum_string_table[ all_enums[ *i ].offset ];
6598+ }
6599+ else {
6600+ /* this is not re-entrant safe, no big deal here */
6601+ _mesa_sprintf(token_tmp, "0x%x", nr);
6602+ return token_tmp;
6603+ }
6604+}
6605+
6606+int _mesa_lookup_enum_by_name( const char *symbol )
6607+{
6608+ enum_elt * f = NULL;
6609+
6610+ if ( symbol != NULL ) {
6611+ f = (enum_elt *)bsearch( symbol, all_enums, Elements(all_enums),
6612+ sizeof( enum_elt ), (cfunc) compar_name );
6613+ }
6614+
6615+ return (f != NULL) ? f->n : -1;
6616+}
6617+
6618+
6619Index: git/target-i386/mesa_get.c
6620===================================================================
6621--- /dev/null 1970-01-01 00:00:00.000000000 +0000
6622+++ git/target-i386/mesa_get.c 2009-05-23 11:22:17.000000000 +0100
6623@@ -0,0 +1,5563 @@
6624+
6625+/***
6626+ *** NOTE!!! DO NOT EDIT THIS FILE!!! IT IS GENERATED BY get_gen.py
6627+ ***/
6628+
6629+#include "glheader.h"
6630+#include "context.h"
6631+#include "enable.h"
6632+#include "extensions.h"
6633+#include "fbobject.h"
6634+#include "get.h"
6635+#include "macros.h"
6636+#include "mtypes.h"
6637+#include "state.h"
6638+#include "texcompress.h"
6639+
6640+
6641+#define FLOAT_TO_BOOLEAN(X) ( (X) ? GL_TRUE : GL_FALSE )
6642+
6643+#define INT_TO_BOOLEAN(I) ( (I) ? GL_TRUE : GL_FALSE )
6644+
6645+#define ENUM_TO_BOOLEAN(E) ( (E) ? GL_TRUE : GL_FALSE )
6646+#define ENUM_TO_INT(E) ( (GLint) (E) )
6647+#define ENUM_TO_FLOAT(E) ( (GLfloat) (E) )
6648+
6649+#define BOOLEAN_TO_INT(B) ( (GLint) (B) )
6650+#define BOOLEAN_TO_FLOAT(B) ( (B) ? 1.0F : 0.0F )
6651+
6652+
6653+/*
6654+ * Check if named extension is enabled, if not generate error and return.
6655+ */
6656+#define CHECK_EXT1(EXT1, FUNC) \
6657+ if (!ctx->Extensions.EXT1) { \
6658+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
6659+ return; \
6660+ }
6661+
6662+/*
6663+ * Check if either of two extensions is enabled.
6664+ */
6665+#define CHECK_EXT2(EXT1, EXT2, FUNC) \
6666+ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2) { \
6667+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
6668+ return; \
6669+ }
6670+
6671+/*
6672+ * Check if either of three extensions is enabled.
6673+ */
6674+#define CHECK_EXT3(EXT1, EXT2, EXT3, FUNC) \
6675+ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2 && \
6676+ !ctx->Extensions.EXT3) { \
6677+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
6678+ return; \
6679+ }
6680+
6681+/*
6682+ * Check if either of four extensions is enabled.
6683+ */
6684+#define CHECK_EXT4(EXT1, EXT2, EXT3, EXT4, FUNC) \
6685+ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2 && \
6686+ !ctx->Extensions.EXT3 && !ctx->Extensions.EXT4) { \
6687+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
6688+ return; \
6689+ }
6690+
6691+
6692+void GLAPIENTRY
6693+_mesa_GetBooleanv( GLenum pname, GLboolean *params )
6694+{
6695+ GET_CURRENT_CONTEXT(ctx);
6696+ ASSERT_OUTSIDE_BEGIN_END(ctx);
6697+
6698+ if (!params)
6699+ return;
6700+
6701+ if (ctx->NewState)
6702+ _mesa_update_state(ctx);
6703+
6704+ if (ctx->Driver.GetBooleanv &&
6705+ ctx->Driver.GetBooleanv(ctx, pname, params))
6706+ return;
6707+
6708+ switch (pname) {
6709+ case GL_ACCUM_RED_BITS:
6710+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumRedBits);
6711+ break;
6712+ case GL_ACCUM_GREEN_BITS:
6713+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumGreenBits);
6714+ break;
6715+ case GL_ACCUM_BLUE_BITS:
6716+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumBlueBits);
6717+ break;
6718+ case GL_ACCUM_ALPHA_BITS:
6719+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumAlphaBits);
6720+ break;
6721+ case GL_ACCUM_CLEAR_VALUE:
6722+ params[0] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[0]);
6723+ params[1] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[1]);
6724+ params[2] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[2]);
6725+ params[3] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[3]);
6726+ break;
6727+ case GL_ALPHA_BIAS:
6728+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.AlphaBias);
6729+ break;
6730+ case GL_ALPHA_BITS:
6731+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.alphaBits);
6732+ break;
6733+ case GL_ALPHA_SCALE:
6734+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.AlphaScale);
6735+ break;
6736+ case GL_ALPHA_TEST:
6737+ params[0] = ctx->Color.AlphaEnabled;
6738+ break;
6739+ case GL_ALPHA_TEST_FUNC:
6740+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.AlphaFunc);
6741+ break;
6742+ case GL_ALPHA_TEST_REF:
6743+ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.AlphaRef);
6744+ break;
6745+ case GL_ATTRIB_STACK_DEPTH:
6746+ params[0] = INT_TO_BOOLEAN(ctx->AttribStackDepth);
6747+ break;
6748+ case GL_AUTO_NORMAL:
6749+ params[0] = ctx->Eval.AutoNormal;
6750+ break;
6751+ case GL_AUX_BUFFERS:
6752+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.numAuxBuffers);
6753+ break;
6754+ case GL_BLEND:
6755+ params[0] = ctx->Color.BlendEnabled;
6756+ break;
6757+ case GL_BLEND_DST:
6758+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstRGB);
6759+ break;
6760+ case GL_BLEND_SRC:
6761+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcRGB);
6762+ break;
6763+ case GL_BLEND_SRC_RGB_EXT:
6764+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcRGB);
6765+ break;
6766+ case GL_BLEND_DST_RGB_EXT:
6767+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstRGB);
6768+ break;
6769+ case GL_BLEND_SRC_ALPHA_EXT:
6770+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcA);
6771+ break;
6772+ case GL_BLEND_DST_ALPHA_EXT:
6773+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstA);
6774+ break;
6775+ case GL_BLEND_EQUATION:
6776+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendEquationRGB );
6777+ break;
6778+ case GL_BLEND_EQUATION_ALPHA_EXT:
6779+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendEquationA );
6780+ break;
6781+ case GL_BLEND_COLOR_EXT:
6782+ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[0]);
6783+ params[1] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[1]);
6784+ params[2] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[2]);
6785+ params[3] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[3]);
6786+ break;
6787+ case GL_BLUE_BIAS:
6788+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.BlueBias);
6789+ break;
6790+ case GL_BLUE_BITS:
6791+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.blueBits);
6792+ break;
6793+ case GL_BLUE_SCALE:
6794+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.BlueScale);
6795+ break;
6796+ case GL_CLIENT_ATTRIB_STACK_DEPTH:
6797+ params[0] = INT_TO_BOOLEAN(ctx->ClientAttribStackDepth);
6798+ break;
6799+ case GL_CLIP_PLANE0:
6800+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 0) & 1;
6801+ break;
6802+ case GL_CLIP_PLANE1:
6803+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 1) & 1;
6804+ break;
6805+ case GL_CLIP_PLANE2:
6806+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 2) & 1;
6807+ break;
6808+ case GL_CLIP_PLANE3:
6809+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 3) & 1;
6810+ break;
6811+ case GL_CLIP_PLANE4:
6812+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 4) & 1;
6813+ break;
6814+ case GL_CLIP_PLANE5:
6815+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 5) & 1;
6816+ break;
6817+ case GL_COLOR_CLEAR_VALUE:
6818+ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[0]);
6819+ params[1] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[1]);
6820+ params[2] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[2]);
6821+ params[3] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[3]);
6822+ break;
6823+ case GL_COLOR_MATERIAL:
6824+ params[0] = ctx->Light.ColorMaterialEnabled;
6825+ break;
6826+ case GL_COLOR_MATERIAL_FACE:
6827+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ColorMaterialFace);
6828+ break;
6829+ case GL_COLOR_MATERIAL_PARAMETER:
6830+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ColorMaterialMode);
6831+ break;
6832+ case GL_COLOR_WRITEMASK:
6833+ params[0] = INT_TO_BOOLEAN(ctx->Color.ColorMask[RCOMP] ? 1 : 0);
6834+ params[1] = INT_TO_BOOLEAN(ctx->Color.ColorMask[GCOMP] ? 1 : 0);
6835+ params[2] = INT_TO_BOOLEAN(ctx->Color.ColorMask[BCOMP] ? 1 : 0);
6836+ params[3] = INT_TO_BOOLEAN(ctx->Color.ColorMask[ACOMP] ? 1 : 0);
6837+ break;
6838+ case GL_CULL_FACE:
6839+ params[0] = ctx->Polygon.CullFlag;
6840+ break;
6841+ case GL_CULL_FACE_MODE:
6842+ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.CullFaceMode);
6843+ break;
6844+ case GL_CURRENT_COLOR:
6845+ {
6846+ FLUSH_CURRENT(ctx, 0);
6847+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]);
6848+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]);
6849+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]);
6850+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]);
6851+ }
6852+ break;
6853+ case GL_CURRENT_INDEX:
6854+ {
6855+ FLUSH_CURRENT(ctx, 0);
6856+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]);
6857+ }
6858+ break;
6859+ case GL_CURRENT_NORMAL:
6860+ {
6861+ FLUSH_CURRENT(ctx, 0);
6862+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]);
6863+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]);
6864+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]);
6865+ }
6866+ break;
6867+ case GL_CURRENT_RASTER_COLOR:
6868+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[0]);
6869+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[1]);
6870+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[2]);
6871+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[3]);
6872+ break;
6873+ case GL_CURRENT_RASTER_DISTANCE:
6874+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterDistance);
6875+ break;
6876+ case GL_CURRENT_RASTER_INDEX:
6877+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterIndex);
6878+ break;
6879+ case GL_CURRENT_RASTER_POSITION:
6880+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[0]);
6881+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[1]);
6882+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[2]);
6883+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[3]);
6884+ break;
6885+ case GL_CURRENT_RASTER_SECONDARY_COLOR:
6886+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[0]);
6887+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[1]);
6888+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[2]);
6889+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[3]);
6890+ break;
6891+ case GL_CURRENT_RASTER_TEXTURE_COORDS:
6892+ {
6893+ const GLuint texUnit = ctx->Texture.CurrentUnit;
6894+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][0]);
6895+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][1]);
6896+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][2]);
6897+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][3]);
6898+ }
6899+ break;
6900+ case GL_CURRENT_RASTER_POSITION_VALID:
6901+ params[0] = ctx->Current.RasterPosValid;
6902+ break;
6903+ case GL_CURRENT_TEXTURE_COORDS:
6904+ {
6905+ const GLuint texUnit = ctx->Texture.CurrentUnit;
6906+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]);
6907+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]);
6908+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]);
6909+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]);
6910+ }
6911+ break;
6912+ case GL_DEPTH_BIAS:
6913+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.DepthBias);
6914+ break;
6915+ case GL_DEPTH_BITS:
6916+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.depthBits);
6917+ break;
6918+ case GL_DEPTH_CLEAR_VALUE:
6919+ params[0] = FLOAT_TO_BOOLEAN(ctx->Depth.Clear);
6920+ break;
6921+ case GL_DEPTH_FUNC:
6922+ params[0] = ENUM_TO_BOOLEAN(ctx->Depth.Func);
6923+ break;
6924+ case GL_DEPTH_RANGE:
6925+ params[0] = FLOAT_TO_BOOLEAN(ctx->Viewport.Near);
6926+ params[1] = FLOAT_TO_BOOLEAN(ctx->Viewport.Far);
6927+ break;
6928+ case GL_DEPTH_SCALE:
6929+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.DepthScale);
6930+ break;
6931+ case GL_DEPTH_TEST:
6932+ params[0] = ctx->Depth.Test;
6933+ break;
6934+ case GL_DEPTH_WRITEMASK:
6935+ params[0] = ctx->Depth.Mask;
6936+ break;
6937+ case GL_DITHER:
6938+ params[0] = ctx->Color.DitherFlag;
6939+ break;
6940+ case GL_DOUBLEBUFFER:
6941+ params[0] = ctx->DrawBuffer->Visual.doubleBufferMode;
6942+ break;
6943+ case GL_DRAW_BUFFER:
6944+ params[0] = ENUM_TO_BOOLEAN(ctx->DrawBuffer->ColorDrawBuffer[0]);
6945+ break;
6946+ case GL_EDGE_FLAG:
6947+ {
6948+ FLUSH_CURRENT(ctx, 0);
6949+ params[0] = ctx->Current.EdgeFlag;
6950+ }
6951+ break;
6952+ case GL_FEEDBACK_BUFFER_SIZE:
6953+ params[0] = INT_TO_BOOLEAN(ctx->Feedback.BufferSize);
6954+ break;
6955+ case GL_FEEDBACK_BUFFER_TYPE:
6956+ params[0] = ENUM_TO_BOOLEAN(ctx->Feedback.Type);
6957+ break;
6958+ case GL_FOG:
6959+ params[0] = ctx->Fog.Enabled;
6960+ break;
6961+ case GL_FOG_COLOR:
6962+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[0]);
6963+ params[1] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[1]);
6964+ params[2] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[2]);
6965+ params[3] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[3]);
6966+ break;
6967+ case GL_FOG_DENSITY:
6968+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Density);
6969+ break;
6970+ case GL_FOG_END:
6971+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.End);
6972+ break;
6973+ case GL_FOG_HINT:
6974+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.Fog);
6975+ break;
6976+ case GL_FOG_INDEX:
6977+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Index);
6978+ break;
6979+ case GL_FOG_MODE:
6980+ params[0] = ENUM_TO_BOOLEAN(ctx->Fog.Mode);
6981+ break;
6982+ case GL_FOG_START:
6983+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Start);
6984+ break;
6985+ case GL_FRONT_FACE:
6986+ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.FrontFace);
6987+ break;
6988+ case GL_GREEN_BIAS:
6989+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.GreenBias);
6990+ break;
6991+ case GL_GREEN_BITS:
6992+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.greenBits);
6993+ break;
6994+ case GL_GREEN_SCALE:
6995+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.GreenScale);
6996+ break;
6997+ case GL_INDEX_BITS:
6998+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.indexBits);
6999+ break;
7000+ case GL_INDEX_CLEAR_VALUE:
7001+ params[0] = INT_TO_BOOLEAN(ctx->Color.ClearIndex);
7002+ break;
7003+ case GL_INDEX_MODE:
7004+ params[0] = !ctx->DrawBuffer->Visual.rgbMode;
7005+ break;
7006+ case GL_INDEX_OFFSET:
7007+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.IndexOffset);
7008+ break;
7009+ case GL_INDEX_SHIFT:
7010+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.IndexShift);
7011+ break;
7012+ case GL_INDEX_WRITEMASK:
7013+ params[0] = INT_TO_BOOLEAN(ctx->Color.IndexMask);
7014+ break;
7015+ case GL_LIGHT0:
7016+ params[0] = ctx->Light.Light[0].Enabled;
7017+ break;
7018+ case GL_LIGHT1:
7019+ params[0] = ctx->Light.Light[1].Enabled;
7020+ break;
7021+ case GL_LIGHT2:
7022+ params[0] = ctx->Light.Light[2].Enabled;
7023+ break;
7024+ case GL_LIGHT3:
7025+ params[0] = ctx->Light.Light[3].Enabled;
7026+ break;
7027+ case GL_LIGHT4:
7028+ params[0] = ctx->Light.Light[4].Enabled;
7029+ break;
7030+ case GL_LIGHT5:
7031+ params[0] = ctx->Light.Light[5].Enabled;
7032+ break;
7033+ case GL_LIGHT6:
7034+ params[0] = ctx->Light.Light[6].Enabled;
7035+ break;
7036+ case GL_LIGHT7:
7037+ params[0] = ctx->Light.Light[7].Enabled;
7038+ break;
7039+ case GL_LIGHTING:
7040+ params[0] = ctx->Light.Enabled;
7041+ break;
7042+ case GL_LIGHT_MODEL_AMBIENT:
7043+ params[0] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[0]);
7044+ params[1] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[1]);
7045+ params[2] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[2]);
7046+ params[3] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[3]);
7047+ break;
7048+ case GL_LIGHT_MODEL_COLOR_CONTROL:
7049+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.Model.ColorControl);
7050+ break;
7051+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
7052+ params[0] = ctx->Light.Model.LocalViewer;
7053+ break;
7054+ case GL_LIGHT_MODEL_TWO_SIDE:
7055+ params[0] = ctx->Light.Model.TwoSide;
7056+ break;
7057+ case GL_LINE_SMOOTH:
7058+ params[0] = ctx->Line.SmoothFlag;
7059+ break;
7060+ case GL_LINE_SMOOTH_HINT:
7061+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.LineSmooth);
7062+ break;
7063+ case GL_LINE_STIPPLE:
7064+ params[0] = ctx->Line.StippleFlag;
7065+ break;
7066+ case GL_LINE_STIPPLE_PATTERN:
7067+ params[0] = INT_TO_BOOLEAN(ctx->Line.StipplePattern);
7068+ break;
7069+ case GL_LINE_STIPPLE_REPEAT:
7070+ params[0] = INT_TO_BOOLEAN(ctx->Line.StippleFactor);
7071+ break;
7072+ case GL_LINE_WIDTH:
7073+ params[0] = FLOAT_TO_BOOLEAN(ctx->Line.Width);
7074+ break;
7075+ case GL_LINE_WIDTH_GRANULARITY:
7076+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.LineWidthGranularity);
7077+ break;
7078+ case GL_LINE_WIDTH_RANGE:
7079+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinLineWidthAA);
7080+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxLineWidthAA);
7081+ break;
7082+ case GL_ALIASED_LINE_WIDTH_RANGE:
7083+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinLineWidth);
7084+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxLineWidth);
7085+ break;
7086+ case GL_LIST_BASE:
7087+ params[0] = INT_TO_BOOLEAN(ctx->List.ListBase);
7088+ break;
7089+ case GL_LIST_INDEX:
7090+ params[0] = INT_TO_BOOLEAN(ctx->ListState.CurrentListNum);
7091+ break;
7092+ case GL_LIST_MODE:
7093+ {
7094+ GLenum mode;
7095+ if (!ctx->CompileFlag)
7096+ mode = 0;
7097+ else if (ctx->ExecuteFlag)
7098+ mode = GL_COMPILE_AND_EXECUTE;
7099+ else
7100+ mode = GL_COMPILE;
7101+ params[0] = ENUM_TO_BOOLEAN(mode);
7102+ }
7103+ break;
7104+ case GL_INDEX_LOGIC_OP:
7105+ params[0] = ctx->Color.IndexLogicOpEnabled;
7106+ break;
7107+ case GL_COLOR_LOGIC_OP:
7108+ params[0] = ctx->Color.ColorLogicOpEnabled;
7109+ break;
7110+ case GL_LOGIC_OP_MODE:
7111+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.LogicOp);
7112+ break;
7113+ case GL_MAP1_COLOR_4:
7114+ params[0] = ctx->Eval.Map1Color4;
7115+ break;
7116+ case GL_MAP1_GRID_DOMAIN:
7117+ params[0] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid1u1);
7118+ params[1] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid1u2);
7119+ break;
7120+ case GL_MAP1_GRID_SEGMENTS:
7121+ params[0] = INT_TO_BOOLEAN(ctx->Eval.MapGrid1un);
7122+ break;
7123+ case GL_MAP1_INDEX:
7124+ params[0] = ctx->Eval.Map1Index;
7125+ break;
7126+ case GL_MAP1_NORMAL:
7127+ params[0] = ctx->Eval.Map1Normal;
7128+ break;
7129+ case GL_MAP1_TEXTURE_COORD_1:
7130+ params[0] = ctx->Eval.Map1TextureCoord1;
7131+ break;
7132+ case GL_MAP1_TEXTURE_COORD_2:
7133+ params[0] = ctx->Eval.Map1TextureCoord2;
7134+ break;
7135+ case GL_MAP1_TEXTURE_COORD_3:
7136+ params[0] = ctx->Eval.Map1TextureCoord3;
7137+ break;
7138+ case GL_MAP1_TEXTURE_COORD_4:
7139+ params[0] = ctx->Eval.Map1TextureCoord4;
7140+ break;
7141+ case GL_MAP1_VERTEX_3:
7142+ params[0] = ctx->Eval.Map1Vertex3;
7143+ break;
7144+ case GL_MAP1_VERTEX_4:
7145+ params[0] = ctx->Eval.Map1Vertex4;
7146+ break;
7147+ case GL_MAP2_COLOR_4:
7148+ params[0] = ctx->Eval.Map2Color4;
7149+ break;
7150+ case GL_MAP2_GRID_DOMAIN:
7151+ params[0] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2u1);
7152+ params[1] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2u2);
7153+ params[2] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2v1);
7154+ params[3] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2v2);
7155+ break;
7156+ case GL_MAP2_GRID_SEGMENTS:
7157+ params[0] = INT_TO_BOOLEAN(ctx->Eval.MapGrid2un);
7158+ params[1] = INT_TO_BOOLEAN(ctx->Eval.MapGrid2vn);
7159+ break;
7160+ case GL_MAP2_INDEX:
7161+ params[0] = ctx->Eval.Map2Index;
7162+ break;
7163+ case GL_MAP2_NORMAL:
7164+ params[0] = ctx->Eval.Map2Normal;
7165+ break;
7166+ case GL_MAP2_TEXTURE_COORD_1:
7167+ params[0] = ctx->Eval.Map2TextureCoord1;
7168+ break;
7169+ case GL_MAP2_TEXTURE_COORD_2:
7170+ params[0] = ctx->Eval.Map2TextureCoord2;
7171+ break;
7172+ case GL_MAP2_TEXTURE_COORD_3:
7173+ params[0] = ctx->Eval.Map2TextureCoord3;
7174+ break;
7175+ case GL_MAP2_TEXTURE_COORD_4:
7176+ params[0] = ctx->Eval.Map2TextureCoord4;
7177+ break;
7178+ case GL_MAP2_VERTEX_3:
7179+ params[0] = ctx->Eval.Map2Vertex3;
7180+ break;
7181+ case GL_MAP2_VERTEX_4:
7182+ params[0] = ctx->Eval.Map2Vertex4;
7183+ break;
7184+ case GL_MAP_COLOR:
7185+ params[0] = ctx->Pixel.MapColorFlag;
7186+ break;
7187+ case GL_MAP_STENCIL:
7188+ params[0] = ctx->Pixel.MapStencilFlag;
7189+ break;
7190+ case GL_MATRIX_MODE:
7191+ params[0] = ENUM_TO_BOOLEAN(ctx->Transform.MatrixMode);
7192+ break;
7193+ case GL_MAX_ATTRIB_STACK_DEPTH:
7194+ params[0] = INT_TO_BOOLEAN(MAX_ATTRIB_STACK_DEPTH);
7195+ break;
7196+ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
7197+ params[0] = INT_TO_BOOLEAN(MAX_CLIENT_ATTRIB_STACK_DEPTH);
7198+ break;
7199+ case GL_MAX_CLIP_PLANES:
7200+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxClipPlanes);
7201+ break;
7202+ case GL_MAX_ELEMENTS_VERTICES:
7203+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxArrayLockSize);
7204+ break;
7205+ case GL_MAX_ELEMENTS_INDICES:
7206+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxArrayLockSize);
7207+ break;
7208+ case GL_MAX_EVAL_ORDER:
7209+ params[0] = INT_TO_BOOLEAN(MAX_EVAL_ORDER);
7210+ break;
7211+ case GL_MAX_LIGHTS:
7212+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxLights);
7213+ break;
7214+ case GL_MAX_LIST_NESTING:
7215+ params[0] = INT_TO_BOOLEAN(MAX_LIST_NESTING);
7216+ break;
7217+ case GL_MAX_MODELVIEW_STACK_DEPTH:
7218+ params[0] = INT_TO_BOOLEAN(MAX_MODELVIEW_STACK_DEPTH);
7219+ break;
7220+ case GL_MAX_NAME_STACK_DEPTH:
7221+ params[0] = INT_TO_BOOLEAN(MAX_NAME_STACK_DEPTH);
7222+ break;
7223+ case GL_MAX_PIXEL_MAP_TABLE:
7224+ params[0] = INT_TO_BOOLEAN(MAX_PIXEL_MAP_TABLE);
7225+ break;
7226+ case GL_MAX_PROJECTION_STACK_DEPTH:
7227+ params[0] = INT_TO_BOOLEAN(MAX_PROJECTION_STACK_DEPTH);
7228+ break;
7229+ case GL_MAX_TEXTURE_SIZE:
7230+ params[0] = INT_TO_BOOLEAN(1 << (ctx->Const.MaxTextureLevels - 1));
7231+ break;
7232+ case GL_MAX_3D_TEXTURE_SIZE:
7233+ params[0] = INT_TO_BOOLEAN(1 << (ctx->Const.Max3DTextureLevels - 1));
7234+ break;
7235+ case GL_MAX_TEXTURE_STACK_DEPTH:
7236+ params[0] = INT_TO_BOOLEAN(MAX_TEXTURE_STACK_DEPTH);
7237+ break;
7238+ case GL_MAX_VIEWPORT_DIMS:
7239+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxViewportWidth);
7240+ params[1] = INT_TO_BOOLEAN(ctx->Const.MaxViewportHeight);
7241+ break;
7242+ case GL_MODELVIEW_MATRIX:
7243+ {
7244+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
7245+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7246+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
7247+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
7248+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
7249+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
7250+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7251+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
7252+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
7253+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
7254+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
7255+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7256+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
7257+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
7258+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
7259+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
7260+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7261+ }
7262+ break;
7263+ case GL_MODELVIEW_STACK_DEPTH:
7264+ params[0] = INT_TO_BOOLEAN(ctx->ModelviewMatrixStack.Depth + 1);
7265+ break;
7266+ case GL_NAME_STACK_DEPTH:
7267+ params[0] = INT_TO_BOOLEAN(ctx->Select.NameStackDepth);
7268+ break;
7269+ case GL_NORMALIZE:
7270+ params[0] = ctx->Transform.Normalize;
7271+ break;
7272+ case GL_PACK_ALIGNMENT:
7273+ params[0] = INT_TO_BOOLEAN(ctx->Pack.Alignment);
7274+ break;
7275+ case GL_PACK_LSB_FIRST:
7276+ params[0] = ctx->Pack.LsbFirst;
7277+ break;
7278+ case GL_PACK_ROW_LENGTH:
7279+ params[0] = INT_TO_BOOLEAN(ctx->Pack.RowLength);
7280+ break;
7281+ case GL_PACK_SKIP_PIXELS:
7282+ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipPixels);
7283+ break;
7284+ case GL_PACK_SKIP_ROWS:
7285+ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipRows);
7286+ break;
7287+ case GL_PACK_SWAP_BYTES:
7288+ params[0] = ctx->Pack.SwapBytes;
7289+ break;
7290+ case GL_PACK_SKIP_IMAGES_EXT:
7291+ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipImages);
7292+ break;
7293+ case GL_PACK_IMAGE_HEIGHT_EXT:
7294+ params[0] = INT_TO_BOOLEAN(ctx->Pack.ImageHeight);
7295+ break;
7296+ case GL_PACK_INVERT_MESA:
7297+ params[0] = ctx->Pack.Invert;
7298+ break;
7299+ case GL_PERSPECTIVE_CORRECTION_HINT:
7300+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PerspectiveCorrection);
7301+ break;
7302+ case GL_PIXEL_MAP_A_TO_A_SIZE:
7303+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapAtoAsize);
7304+ break;
7305+ case GL_PIXEL_MAP_B_TO_B_SIZE:
7306+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapBtoBsize);
7307+ break;
7308+ case GL_PIXEL_MAP_G_TO_G_SIZE:
7309+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapGtoGsize);
7310+ break;
7311+ case GL_PIXEL_MAP_I_TO_A_SIZE:
7312+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoAsize);
7313+ break;
7314+ case GL_PIXEL_MAP_I_TO_B_SIZE:
7315+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoBsize);
7316+ break;
7317+ case GL_PIXEL_MAP_I_TO_G_SIZE:
7318+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoGsize);
7319+ break;
7320+ case GL_PIXEL_MAP_I_TO_I_SIZE:
7321+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoIsize);
7322+ break;
7323+ case GL_PIXEL_MAP_I_TO_R_SIZE:
7324+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoRsize);
7325+ break;
7326+ case GL_PIXEL_MAP_R_TO_R_SIZE:
7327+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapRtoRsize);
7328+ break;
7329+ case GL_PIXEL_MAP_S_TO_S_SIZE:
7330+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapStoSsize);
7331+ break;
7332+ case GL_POINT_SIZE:
7333+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Size);
7334+ break;
7335+ case GL_POINT_SIZE_GRANULARITY:
7336+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.PointSizeGranularity);
7337+ break;
7338+ case GL_POINT_SIZE_RANGE:
7339+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinPointSizeAA);
7340+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxPointSizeAA);
7341+ break;
7342+ case GL_ALIASED_POINT_SIZE_RANGE:
7343+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinPointSize);
7344+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxPointSize);
7345+ break;
7346+ case GL_POINT_SMOOTH:
7347+ params[0] = ctx->Point.SmoothFlag;
7348+ break;
7349+ case GL_POINT_SMOOTH_HINT:
7350+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PointSmooth);
7351+ break;
7352+ case GL_POINT_SIZE_MIN_EXT:
7353+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.MinSize);
7354+ break;
7355+ case GL_POINT_SIZE_MAX_EXT:
7356+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.MaxSize);
7357+ break;
7358+ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
7359+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Threshold);
7360+ break;
7361+ case GL_DISTANCE_ATTENUATION_EXT:
7362+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Params[0]);
7363+ params[1] = FLOAT_TO_BOOLEAN(ctx->Point.Params[1]);
7364+ params[2] = FLOAT_TO_BOOLEAN(ctx->Point.Params[2]);
7365+ break;
7366+ case GL_POLYGON_MODE:
7367+ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.FrontMode);
7368+ params[1] = ENUM_TO_BOOLEAN(ctx->Polygon.BackMode);
7369+ break;
7370+ case GL_POLYGON_OFFSET_BIAS_EXT:
7371+ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetUnits);
7372+ break;
7373+ case GL_POLYGON_OFFSET_FACTOR:
7374+ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetFactor );
7375+ break;
7376+ case GL_POLYGON_OFFSET_UNITS:
7377+ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetUnits );
7378+ break;
7379+ case GL_POLYGON_SMOOTH:
7380+ params[0] = ctx->Polygon.SmoothFlag;
7381+ break;
7382+ case GL_POLYGON_SMOOTH_HINT:
7383+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PolygonSmooth);
7384+ break;
7385+ case GL_POLYGON_STIPPLE:
7386+ params[0] = ctx->Polygon.StippleFlag;
7387+ break;
7388+ case GL_PROJECTION_MATRIX:
7389+ {
7390+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
7391+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7392+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
7393+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
7394+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
7395+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
7396+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7397+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
7398+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
7399+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
7400+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
7401+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7402+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
7403+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
7404+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
7405+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
7406+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7407+ }
7408+ break;
7409+ case GL_PROJECTION_STACK_DEPTH:
7410+ params[0] = INT_TO_BOOLEAN(ctx->ProjectionMatrixStack.Depth + 1);
7411+ break;
7412+ case GL_READ_BUFFER:
7413+ params[0] = ENUM_TO_BOOLEAN(ctx->ReadBuffer->ColorReadBuffer);
7414+ break;
7415+ case GL_RED_BIAS:
7416+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.RedBias);
7417+ break;
7418+ case GL_RED_BITS:
7419+ params[0] = INT_TO_BOOLEAN( ctx->DrawBuffer->Visual.redBits );
7420+ break;
7421+ case GL_RED_SCALE:
7422+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.RedScale);
7423+ break;
7424+ case GL_RENDER_MODE:
7425+ params[0] = ENUM_TO_BOOLEAN(ctx->RenderMode);
7426+ break;
7427+ case GL_RESCALE_NORMAL:
7428+ params[0] = ctx->Transform.RescaleNormals;
7429+ break;
7430+ case GL_RGBA_MODE:
7431+ params[0] = ctx->DrawBuffer->Visual.rgbMode;
7432+ break;
7433+ case GL_SCISSOR_BOX:
7434+ params[0] = INT_TO_BOOLEAN(ctx->Scissor.X);
7435+ params[1] = INT_TO_BOOLEAN(ctx->Scissor.Y);
7436+ params[2] = INT_TO_BOOLEAN(ctx->Scissor.Width);
7437+ params[3] = INT_TO_BOOLEAN(ctx->Scissor.Height);
7438+ break;
7439+ case GL_SCISSOR_TEST:
7440+ params[0] = ctx->Scissor.Enabled;
7441+ break;
7442+ case GL_SELECTION_BUFFER_SIZE:
7443+ params[0] = INT_TO_BOOLEAN(ctx->Select.BufferSize);
7444+ break;
7445+ case GL_SHADE_MODEL:
7446+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ShadeModel);
7447+ break;
7448+ case GL_SHARED_TEXTURE_PALETTE_EXT:
7449+ params[0] = ctx->Texture.SharedPalette;
7450+ break;
7451+ case GL_STENCIL_BITS:
7452+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.stencilBits);
7453+ break;
7454+ case GL_STENCIL_CLEAR_VALUE:
7455+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Clear);
7456+ break;
7457+ case GL_STENCIL_FAIL:
7458+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
7459+ break;
7460+ case GL_STENCIL_FUNC:
7461+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
7462+ break;
7463+ case GL_STENCIL_PASS_DEPTH_FAIL:
7464+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
7465+ break;
7466+ case GL_STENCIL_PASS_DEPTH_PASS:
7467+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
7468+ break;
7469+ case GL_STENCIL_REF:
7470+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Ref[ctx->Stencil.ActiveFace]);
7471+ break;
7472+ case GL_STENCIL_TEST:
7473+ params[0] = ctx->Stencil.Enabled;
7474+ break;
7475+ case GL_STENCIL_VALUE_MASK:
7476+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]);
7477+ break;
7478+ case GL_STENCIL_WRITEMASK:
7479+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]);
7480+ break;
7481+ case GL_STEREO:
7482+ params[0] = ctx->DrawBuffer->Visual.stereoMode;
7483+ break;
7484+ case GL_SUBPIXEL_BITS:
7485+ params[0] = INT_TO_BOOLEAN(ctx->Const.SubPixelBits);
7486+ break;
7487+ case GL_TEXTURE_1D:
7488+ params[0] = _mesa_IsEnabled(GL_TEXTURE_1D);
7489+ break;
7490+ case GL_TEXTURE_2D:
7491+ params[0] = _mesa_IsEnabled(GL_TEXTURE_2D);
7492+ break;
7493+ case GL_TEXTURE_3D:
7494+ params[0] = _mesa_IsEnabled(GL_TEXTURE_3D);
7495+ break;
7496+ case GL_TEXTURE_BINDING_1D:
7497+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name);
7498+ break;
7499+ case GL_TEXTURE_BINDING_2D:
7500+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name);
7501+ break;
7502+ case GL_TEXTURE_BINDING_3D:
7503+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name);
7504+ break;
7505+ case GL_TEXTURE_ENV_COLOR:
7506+ {
7507+ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
7508+ params[0] = FLOAT_TO_BOOLEAN(color[0]);
7509+ params[1] = FLOAT_TO_BOOLEAN(color[1]);
7510+ params[2] = FLOAT_TO_BOOLEAN(color[2]);
7511+ params[3] = FLOAT_TO_BOOLEAN(color[3]);
7512+ }
7513+ break;
7514+ case GL_TEXTURE_ENV_MODE:
7515+ params[0] = ENUM_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
7516+ break;
7517+ case GL_TEXTURE_GEN_S:
7518+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0);
7519+ break;
7520+ case GL_TEXTURE_GEN_T:
7521+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0);
7522+ break;
7523+ case GL_TEXTURE_GEN_R:
7524+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0);
7525+ break;
7526+ case GL_TEXTURE_GEN_Q:
7527+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0);
7528+ break;
7529+ case GL_TEXTURE_MATRIX:
7530+ {
7531+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
7532+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7533+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
7534+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
7535+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
7536+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
7537+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7538+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
7539+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
7540+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
7541+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
7542+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7543+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
7544+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
7545+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
7546+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
7547+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7548+ }
7549+ break;
7550+ case GL_TEXTURE_STACK_DEPTH:
7551+ params[0] = INT_TO_BOOLEAN(ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1);
7552+ break;
7553+ case GL_UNPACK_ALIGNMENT:
7554+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.Alignment);
7555+ break;
7556+ case GL_UNPACK_LSB_FIRST:
7557+ params[0] = ctx->Unpack.LsbFirst;
7558+ break;
7559+ case GL_UNPACK_ROW_LENGTH:
7560+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.RowLength);
7561+ break;
7562+ case GL_UNPACK_SKIP_PIXELS:
7563+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipPixels);
7564+ break;
7565+ case GL_UNPACK_SKIP_ROWS:
7566+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipRows);
7567+ break;
7568+ case GL_UNPACK_SWAP_BYTES:
7569+ params[0] = ctx->Unpack.SwapBytes;
7570+ break;
7571+ case GL_UNPACK_SKIP_IMAGES_EXT:
7572+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipImages);
7573+ break;
7574+ case GL_UNPACK_IMAGE_HEIGHT_EXT:
7575+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.ImageHeight);
7576+ break;
7577+ case GL_UNPACK_CLIENT_STORAGE_APPLE:
7578+ params[0] = ctx->Unpack.ClientStorage;
7579+ break;
7580+ case GL_VIEWPORT:
7581+ params[0] = INT_TO_BOOLEAN(ctx->Viewport.X);
7582+ params[1] = INT_TO_BOOLEAN(ctx->Viewport.Y);
7583+ params[2] = INT_TO_BOOLEAN(ctx->Viewport.Width);
7584+ params[3] = INT_TO_BOOLEAN(ctx->Viewport.Height);
7585+ break;
7586+ case GL_ZOOM_X:
7587+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.ZoomX);
7588+ break;
7589+ case GL_ZOOM_Y:
7590+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.ZoomY);
7591+ break;
7592+ case GL_VERTEX_ARRAY:
7593+ params[0] = ctx->Array.ArrayObj->Vertex.Enabled;
7594+ break;
7595+ case GL_VERTEX_ARRAY_SIZE:
7596+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Size);
7597+ break;
7598+ case GL_VERTEX_ARRAY_TYPE:
7599+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Type);
7600+ break;
7601+ case GL_VERTEX_ARRAY_STRIDE:
7602+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Stride);
7603+ break;
7604+ case GL_VERTEX_ARRAY_COUNT_EXT:
7605+ params[0] = INT_TO_BOOLEAN(0);
7606+ break;
7607+ case GL_NORMAL_ARRAY:
7608+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Enabled);
7609+ break;
7610+ case GL_NORMAL_ARRAY_TYPE:
7611+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Type);
7612+ break;
7613+ case GL_NORMAL_ARRAY_STRIDE:
7614+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Stride);
7615+ break;
7616+ case GL_NORMAL_ARRAY_COUNT_EXT:
7617+ params[0] = INT_TO_BOOLEAN(0);
7618+ break;
7619+ case GL_COLOR_ARRAY:
7620+ params[0] = ctx->Array.ArrayObj->Color.Enabled;
7621+ break;
7622+ case GL_COLOR_ARRAY_SIZE:
7623+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Size);
7624+ break;
7625+ case GL_COLOR_ARRAY_TYPE:
7626+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Type);
7627+ break;
7628+ case GL_COLOR_ARRAY_STRIDE:
7629+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Stride);
7630+ break;
7631+ case GL_COLOR_ARRAY_COUNT_EXT:
7632+ params[0] = INT_TO_BOOLEAN(0);
7633+ break;
7634+ case GL_INDEX_ARRAY:
7635+ params[0] = ctx->Array.ArrayObj->Index.Enabled;
7636+ break;
7637+ case GL_INDEX_ARRAY_TYPE:
7638+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Index.Type);
7639+ break;
7640+ case GL_INDEX_ARRAY_STRIDE:
7641+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Index.Stride);
7642+ break;
7643+ case GL_INDEX_ARRAY_COUNT_EXT:
7644+ params[0] = INT_TO_BOOLEAN(0);
7645+ break;
7646+ case GL_TEXTURE_COORD_ARRAY:
7647+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled;
7648+ break;
7649+ case GL_TEXTURE_COORD_ARRAY_SIZE:
7650+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
7651+ break;
7652+ case GL_TEXTURE_COORD_ARRAY_TYPE:
7653+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
7654+ break;
7655+ case GL_TEXTURE_COORD_ARRAY_STRIDE:
7656+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
7657+ break;
7658+ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
7659+ params[0] = INT_TO_BOOLEAN(0);
7660+ break;
7661+ case GL_EDGE_FLAG_ARRAY:
7662+ params[0] = ctx->Array.ArrayObj->EdgeFlag.Enabled;
7663+ break;
7664+ case GL_EDGE_FLAG_ARRAY_STRIDE:
7665+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->EdgeFlag.Stride);
7666+ break;
7667+ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
7668+ params[0] = INT_TO_BOOLEAN(0);
7669+ break;
7670+ case GL_MAX_TEXTURE_UNITS_ARB:
7671+ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
7672+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureUnits);
7673+ break;
7674+ case GL_ACTIVE_TEXTURE_ARB:
7675+ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
7676+ params[0] = INT_TO_BOOLEAN(GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit);
7677+ break;
7678+ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
7679+ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
7680+ params[0] = INT_TO_BOOLEAN(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
7681+ break;
7682+ case GL_TEXTURE_CUBE_MAP_ARB:
7683+ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
7684+ params[0] = _mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB);
7685+ break;
7686+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
7687+ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
7688+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name);
7689+ break;
7690+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
7691+ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
7692+ params[0] = INT_TO_BOOLEAN((1 << (ctx->Const.MaxCubeTextureLevels - 1)));
7693+ break;
7694+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
7695+ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
7696+ params[0] = INT_TO_BOOLEAN(ctx->Hint.TextureCompression);
7697+ break;
7698+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
7699+ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
7700+ params[0] = INT_TO_BOOLEAN(_mesa_get_compressed_formats(ctx, NULL, GL_FALSE));
7701+ break;
7702+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
7703+ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
7704+ {
7705+ GLint formats[100];
7706+ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
7707+ ASSERT(n <= 100);
7708+ for (i = 0; i < n; i++)
7709+ params[i] = ENUM_TO_INT(formats[i]);
7710+ }
7711+ break;
7712+ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
7713+ CHECK_EXT1(EXT_compiled_vertex_array, "GetBooleanv");
7714+ params[0] = INT_TO_BOOLEAN(ctx->Array.LockFirst);
7715+ break;
7716+ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
7717+ CHECK_EXT1(EXT_compiled_vertex_array, "GetBooleanv");
7718+ params[0] = INT_TO_BOOLEAN(ctx->Array.LockCount);
7719+ break;
7720+ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
7721+ {
7722+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
7723+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7724+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
7725+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
7726+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
7727+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
7728+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7729+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
7730+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
7731+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
7732+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
7733+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7734+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
7735+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
7736+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
7737+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
7738+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7739+ }
7740+ break;
7741+ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
7742+ {
7743+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
7744+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7745+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
7746+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
7747+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
7748+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
7749+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7750+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
7751+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
7752+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
7753+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
7754+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7755+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
7756+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
7757+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
7758+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
7759+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7760+ }
7761+ break;
7762+ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
7763+ {
7764+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
7765+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7766+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
7767+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
7768+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
7769+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
7770+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7771+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
7772+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
7773+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
7774+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
7775+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7776+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
7777+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
7778+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
7779+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
7780+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7781+ }
7782+ break;
7783+ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
7784+ {
7785+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
7786+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7787+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
7788+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
7789+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
7790+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
7791+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7792+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
7793+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
7794+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
7795+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
7796+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7797+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
7798+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
7799+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
7800+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
7801+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7802+ }
7803+ break;
7804+ case GL_COLOR_MATRIX_SGI:
7805+ {
7806+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
7807+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7808+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
7809+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
7810+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
7811+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
7812+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7813+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
7814+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
7815+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
7816+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
7817+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7818+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
7819+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
7820+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
7821+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
7822+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7823+ }
7824+ break;
7825+ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
7826+ params[0] = INT_TO_BOOLEAN(ctx->ColorMatrixStack.Depth + 1);
7827+ break;
7828+ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
7829+ params[0] = INT_TO_BOOLEAN(MAX_COLOR_STACK_DEPTH);
7830+ break;
7831+ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
7832+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[0]);
7833+ break;
7834+ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
7835+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[1]);
7836+ break;
7837+ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
7838+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[2]);
7839+ break;
7840+ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
7841+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[3]);
7842+ break;
7843+ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
7844+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[0]);
7845+ break;
7846+ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
7847+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[1]);
7848+ break;
7849+ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
7850+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[2]);
7851+ break;
7852+ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
7853+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[3]);
7854+ break;
7855+ case GL_CONVOLUTION_1D_EXT:
7856+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
7857+ params[0] = ctx->Pixel.Convolution1DEnabled;
7858+ break;
7859+ case GL_CONVOLUTION_2D_EXT:
7860+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
7861+ params[0] = ctx->Pixel.Convolution2DEnabled;
7862+ break;
7863+ case GL_SEPARABLE_2D_EXT:
7864+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
7865+ params[0] = ctx->Pixel.Separable2DEnabled;
7866+ break;
7867+ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
7868+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
7869+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[0]);
7870+ break;
7871+ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
7872+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
7873+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[1]);
7874+ break;
7875+ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
7876+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
7877+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[2]);
7878+ break;
7879+ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
7880+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
7881+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[3]);
7882+ break;
7883+ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
7884+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
7885+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[0]);
7886+ break;
7887+ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
7888+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
7889+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[1]);
7890+ break;
7891+ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
7892+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
7893+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[2]);
7894+ break;
7895+ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
7896+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
7897+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[3]);
7898+ break;
7899+ case GL_HISTOGRAM:
7900+ CHECK_EXT1(EXT_histogram, "GetBooleanv");
7901+ params[0] = ctx->Pixel.HistogramEnabled;
7902+ break;
7903+ case GL_MINMAX:
7904+ CHECK_EXT1(EXT_histogram, "GetBooleanv");
7905+ params[0] = ctx->Pixel.MinMaxEnabled;
7906+ break;
7907+ case GL_COLOR_TABLE_SGI:
7908+ CHECK_EXT1(SGI_color_table, "GetBooleanv");
7909+ params[0] = ctx->Pixel.ColorTableEnabled;
7910+ break;
7911+ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
7912+ CHECK_EXT1(SGI_color_table, "GetBooleanv");
7913+ params[0] = ctx->Pixel.PostConvolutionColorTableEnabled;
7914+ break;
7915+ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
7916+ CHECK_EXT1(SGI_color_table, "GetBooleanv");
7917+ params[0] = ctx->Pixel.PostColorMatrixColorTableEnabled;
7918+ break;
7919+ case GL_TEXTURE_COLOR_TABLE_SGI:
7920+ CHECK_EXT1(SGI_texture_color_table, "GetBooleanv");
7921+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled;
7922+ break;
7923+ case GL_COLOR_SUM_EXT:
7924+ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetBooleanv");
7925+ params[0] = ctx->Fog.ColorSumEnabled;
7926+ break;
7927+ case GL_CURRENT_SECONDARY_COLOR_EXT:
7928+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
7929+ {
7930+ FLUSH_CURRENT(ctx, 0);
7931+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]);
7932+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]);
7933+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]);
7934+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]);
7935+ }
7936+ break;
7937+ case GL_SECONDARY_COLOR_ARRAY_EXT:
7938+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
7939+ params[0] = ctx->Array.ArrayObj->SecondaryColor.Enabled;
7940+ break;
7941+ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
7942+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
7943+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Type);
7944+ break;
7945+ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
7946+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
7947+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Stride);
7948+ break;
7949+ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
7950+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
7951+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Size);
7952+ break;
7953+ case GL_CURRENT_FOG_COORDINATE_EXT:
7954+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
7955+ {
7956+ FLUSH_CURRENT(ctx, 0);
7957+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_FOG][0]);
7958+ }
7959+ break;
7960+ case GL_FOG_COORDINATE_ARRAY_EXT:
7961+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
7962+ params[0] = ctx->Array.ArrayObj->FogCoord.Enabled;
7963+ break;
7964+ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
7965+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
7966+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.Type);
7967+ break;
7968+ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
7969+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
7970+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.Stride);
7971+ break;
7972+ case GL_FOG_COORDINATE_SOURCE_EXT:
7973+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
7974+ params[0] = ENUM_TO_BOOLEAN(ctx->Fog.FogCoordinateSource);
7975+ break;
7976+ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
7977+ CHECK_EXT1(EXT_texture_lod_bias, "GetBooleanv");
7978+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxTextureLodBias);
7979+ break;
7980+ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
7981+ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetBooleanv");
7982+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxTextureMaxAnisotropy);
7983+ break;
7984+ case GL_MULTISAMPLE_ARB:
7985+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
7986+ params[0] = ctx->Multisample.Enabled;
7987+ break;
7988+ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
7989+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
7990+ params[0] = ctx->Multisample.SampleAlphaToCoverage;
7991+ break;
7992+ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
7993+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
7994+ params[0] = ctx->Multisample.SampleAlphaToOne;
7995+ break;
7996+ case GL_SAMPLE_COVERAGE_ARB:
7997+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
7998+ params[0] = ctx->Multisample.SampleCoverage;
7999+ break;
8000+ case GL_SAMPLE_COVERAGE_VALUE_ARB:
8001+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8002+ params[0] = FLOAT_TO_BOOLEAN(ctx->Multisample.SampleCoverageValue);
8003+ break;
8004+ case GL_SAMPLE_COVERAGE_INVERT_ARB:
8005+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8006+ params[0] = ctx->Multisample.SampleCoverageInvert;
8007+ break;
8008+ case GL_SAMPLE_BUFFERS_ARB:
8009+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8010+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.sampleBuffers);
8011+ break;
8012+ case GL_SAMPLES_ARB:
8013+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8014+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.samples);
8015+ break;
8016+ case GL_RASTER_POSITION_UNCLIPPED_IBM:
8017+ CHECK_EXT1(IBM_rasterpos_clip, "GetBooleanv");
8018+ params[0] = ctx->Transform.RasterPositionUnclipped;
8019+ break;
8020+ case GL_POINT_SPRITE_NV:
8021+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetBooleanv");
8022+ params[0] = ctx->Point.PointSprite;
8023+ break;
8024+ case GL_POINT_SPRITE_R_MODE_NV:
8025+ CHECK_EXT1(NV_point_sprite, "GetBooleanv");
8026+ params[0] = ENUM_TO_BOOLEAN(ctx->Point.SpriteRMode);
8027+ break;
8028+ case GL_POINT_SPRITE_COORD_ORIGIN:
8029+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetBooleanv");
8030+ params[0] = ENUM_TO_BOOLEAN(ctx->Point.SpriteOrigin);
8031+ break;
8032+ case GL_GENERATE_MIPMAP_HINT_SGIS:
8033+ CHECK_EXT1(SGIS_generate_mipmap, "GetBooleanv");
8034+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.GenerateMipmap);
8035+ break;
8036+ case GL_VERTEX_PROGRAM_BINDING_NV:
8037+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8038+ params[0] = INT_TO_BOOLEAN((ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0));
8039+ break;
8040+ case GL_VERTEX_ATTRIB_ARRAY0_NV:
8041+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8042+ params[0] = ctx->Array.ArrayObj->VertexAttrib[0].Enabled;
8043+ break;
8044+ case GL_VERTEX_ATTRIB_ARRAY1_NV:
8045+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8046+ params[0] = ctx->Array.ArrayObj->VertexAttrib[1].Enabled;
8047+ break;
8048+ case GL_VERTEX_ATTRIB_ARRAY2_NV:
8049+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8050+ params[0] = ctx->Array.ArrayObj->VertexAttrib[2].Enabled;
8051+ break;
8052+ case GL_VERTEX_ATTRIB_ARRAY3_NV:
8053+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8054+ params[0] = ctx->Array.ArrayObj->VertexAttrib[3].Enabled;
8055+ break;
8056+ case GL_VERTEX_ATTRIB_ARRAY4_NV:
8057+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8058+ params[0] = ctx->Array.ArrayObj->VertexAttrib[4].Enabled;
8059+ break;
8060+ case GL_VERTEX_ATTRIB_ARRAY5_NV:
8061+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8062+ params[0] = ctx->Array.ArrayObj->VertexAttrib[5].Enabled;
8063+ break;
8064+ case GL_VERTEX_ATTRIB_ARRAY6_NV:
8065+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8066+ params[0] = ctx->Array.ArrayObj->VertexAttrib[6].Enabled;
8067+ break;
8068+ case GL_VERTEX_ATTRIB_ARRAY7_NV:
8069+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8070+ params[0] = ctx->Array.ArrayObj->VertexAttrib[7].Enabled;
8071+ break;
8072+ case GL_VERTEX_ATTRIB_ARRAY8_NV:
8073+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8074+ params[0] = ctx->Array.ArrayObj->VertexAttrib[8].Enabled;
8075+ break;
8076+ case GL_VERTEX_ATTRIB_ARRAY9_NV:
8077+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8078+ params[0] = ctx->Array.ArrayObj->VertexAttrib[9].Enabled;
8079+ break;
8080+ case GL_VERTEX_ATTRIB_ARRAY10_NV:
8081+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8082+ params[0] = ctx->Array.ArrayObj->VertexAttrib[10].Enabled;
8083+ break;
8084+ case GL_VERTEX_ATTRIB_ARRAY11_NV:
8085+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8086+ params[0] = ctx->Array.ArrayObj->VertexAttrib[11].Enabled;
8087+ break;
8088+ case GL_VERTEX_ATTRIB_ARRAY12_NV:
8089+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8090+ params[0] = ctx->Array.ArrayObj->VertexAttrib[12].Enabled;
8091+ break;
8092+ case GL_VERTEX_ATTRIB_ARRAY13_NV:
8093+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8094+ params[0] = ctx->Array.ArrayObj->VertexAttrib[13].Enabled;
8095+ break;
8096+ case GL_VERTEX_ATTRIB_ARRAY14_NV:
8097+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8098+ params[0] = ctx->Array.ArrayObj->VertexAttrib[14].Enabled;
8099+ break;
8100+ case GL_VERTEX_ATTRIB_ARRAY15_NV:
8101+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8102+ params[0] = ctx->Array.ArrayObj->VertexAttrib[15].Enabled;
8103+ break;
8104+ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
8105+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8106+ params[0] = ctx->Eval.Map1Attrib[0];
8107+ break;
8108+ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
8109+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8110+ params[0] = ctx->Eval.Map1Attrib[1];
8111+ break;
8112+ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
8113+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8114+ params[0] = ctx->Eval.Map1Attrib[2];
8115+ break;
8116+ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
8117+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8118+ params[0] = ctx->Eval.Map1Attrib[3];
8119+ break;
8120+ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
8121+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8122+ params[0] = ctx->Eval.Map1Attrib[4];
8123+ break;
8124+ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
8125+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8126+ params[0] = ctx->Eval.Map1Attrib[5];
8127+ break;
8128+ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
8129+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8130+ params[0] = ctx->Eval.Map1Attrib[6];
8131+ break;
8132+ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
8133+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8134+ params[0] = ctx->Eval.Map1Attrib[7];
8135+ break;
8136+ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
8137+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8138+ params[0] = ctx->Eval.Map1Attrib[8];
8139+ break;
8140+ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
8141+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8142+ params[0] = ctx->Eval.Map1Attrib[9];
8143+ break;
8144+ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
8145+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8146+ params[0] = ctx->Eval.Map1Attrib[10];
8147+ break;
8148+ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
8149+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8150+ params[0] = ctx->Eval.Map1Attrib[11];
8151+ break;
8152+ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
8153+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8154+ params[0] = ctx->Eval.Map1Attrib[12];
8155+ break;
8156+ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
8157+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8158+ params[0] = ctx->Eval.Map1Attrib[13];
8159+ break;
8160+ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
8161+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8162+ params[0] = ctx->Eval.Map1Attrib[14];
8163+ break;
8164+ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
8165+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8166+ params[0] = ctx->Eval.Map1Attrib[15];
8167+ break;
8168+ case GL_FRAGMENT_PROGRAM_NV:
8169+ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
8170+ params[0] = ctx->FragmentProgram.Enabled;
8171+ break;
8172+ case GL_FRAGMENT_PROGRAM_BINDING_NV:
8173+ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
8174+ params[0] = INT_TO_BOOLEAN(ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0);
8175+ break;
8176+ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
8177+ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
8178+ params[0] = INT_TO_BOOLEAN(MAX_NV_FRAGMENT_PROGRAM_PARAMS);
8179+ break;
8180+ case GL_TEXTURE_RECTANGLE_NV:
8181+ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
8182+ params[0] = _mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV);
8183+ break;
8184+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
8185+ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
8186+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name);
8187+ break;
8188+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
8189+ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
8190+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureRectSize);
8191+ break;
8192+ case GL_STENCIL_TEST_TWO_SIDE_EXT:
8193+ CHECK_EXT1(EXT_stencil_two_side, "GetBooleanv");
8194+ params[0] = ctx->Stencil.TestTwoSide;
8195+ break;
8196+ case GL_ACTIVE_STENCIL_FACE_EXT:
8197+ CHECK_EXT1(EXT_stencil_two_side, "GetBooleanv");
8198+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
8199+ break;
8200+ case GL_MAX_SHININESS_NV:
8201+ CHECK_EXT1(NV_light_max_exponent, "GetBooleanv");
8202+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxShininess);
8203+ break;
8204+ case GL_MAX_SPOT_EXPONENT_NV:
8205+ CHECK_EXT1(NV_light_max_exponent, "GetBooleanv");
8206+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxSpotExponent);
8207+ break;
8208+ case GL_ARRAY_BUFFER_BINDING_ARB:
8209+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8210+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayBufferObj->Name);
8211+ break;
8212+ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
8213+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8214+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
8215+ break;
8216+ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
8217+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8218+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.BufferObj->Name);
8219+ break;
8220+ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
8221+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8222+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.BufferObj->Name);
8223+ break;
8224+ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
8225+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8226+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Index.BufferObj->Name);
8227+ break;
8228+ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
8229+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8230+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
8231+ break;
8232+ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
8233+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8234+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
8235+ break;
8236+ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
8237+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8238+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
8239+ break;
8240+ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
8241+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8242+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
8243+ break;
8244+ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
8245+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8246+ params[0] = INT_TO_BOOLEAN(ctx->Array.ElementArrayBufferObj->Name);
8247+ break;
8248+ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
8249+ CHECK_EXT1(EXT_pixel_buffer_object, "GetBooleanv");
8250+ params[0] = INT_TO_BOOLEAN(ctx->Pack.BufferObj->Name);
8251+ break;
8252+ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
8253+ CHECK_EXT1(EXT_pixel_buffer_object, "GetBooleanv");
8254+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.BufferObj->Name);
8255+ break;
8256+ case GL_VERTEX_PROGRAM_ARB:
8257+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
8258+ params[0] = ctx->VertexProgram.Enabled;
8259+ break;
8260+ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
8261+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
8262+ params[0] = ctx->VertexProgram.PointSizeEnabled;
8263+ break;
8264+ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
8265+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
8266+ params[0] = ctx->VertexProgram.TwoSideEnabled;
8267+ break;
8268+ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
8269+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
8270+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxProgramMatrixStackDepth);
8271+ break;
8272+ case GL_MAX_PROGRAM_MATRICES_ARB:
8273+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
8274+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxProgramMatrices);
8275+ break;
8276+ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
8277+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
8278+ params[0] = ctx->CurrentStack->Depth + 1;
8279+ break;
8280+ case GL_CURRENT_MATRIX_ARB:
8281+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetBooleanv");
8282+ {
8283+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
8284+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8285+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
8286+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
8287+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
8288+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
8289+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8290+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
8291+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
8292+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
8293+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
8294+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8295+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
8296+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
8297+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
8298+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
8299+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8300+ }
8301+ break;
8302+ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
8303+ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetBooleanv");
8304+ {
8305+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
8306+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8307+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8308+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8309+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8310+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8311+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8312+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8313+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8314+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8315+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8316+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8317+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8318+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8319+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8320+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8321+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8322+ }
8323+ break;
8324+ case GL_MAX_VERTEX_ATTRIBS_ARB:
8325+ CHECK_EXT1(ARB_vertex_program, "GetBooleanv");
8326+ params[0] = INT_TO_BOOLEAN(ctx->Const.VertexProgram.MaxAttribs);
8327+ break;
8328+ case GL_PROGRAM_ERROR_POSITION_ARB:
8329+ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetBooleanv");
8330+ params[0] = INT_TO_BOOLEAN(ctx->Program.ErrorPos);
8331+ break;
8332+ case GL_FRAGMENT_PROGRAM_ARB:
8333+ CHECK_EXT1(ARB_fragment_program, "GetBooleanv");
8334+ params[0] = ctx->FragmentProgram.Enabled;
8335+ break;
8336+ case GL_MAX_TEXTURE_COORDS_ARB:
8337+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetBooleanv");
8338+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureCoordUnits);
8339+ break;
8340+ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
8341+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetBooleanv");
8342+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureImageUnits);
8343+ break;
8344+ case GL_DEPTH_BOUNDS_TEST_EXT:
8345+ CHECK_EXT1(EXT_depth_bounds_test, "GetBooleanv");
8346+ params[0] = ctx->Depth.BoundsTest;
8347+ break;
8348+ case GL_DEPTH_BOUNDS_EXT:
8349+ CHECK_EXT1(EXT_depth_bounds_test, "GetBooleanv");
8350+ params[0] = FLOAT_TO_BOOLEAN(ctx->Depth.BoundsMin);
8351+ params[1] = FLOAT_TO_BOOLEAN(ctx->Depth.BoundsMax);
8352+ break;
8353+ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
8354+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8355+ params[0] = ctx->FragmentProgram.CallbackEnabled;
8356+ break;
8357+ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
8358+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8359+ params[0] = ctx->VertexProgram.CallbackEnabled;
8360+ break;
8361+ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
8362+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8363+ params[0] = INT_TO_BOOLEAN(ctx->FragmentProgram.CurrentPosition);
8364+ break;
8365+ case GL_VERTEX_PROGRAM_POSITION_MESA:
8366+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8367+ params[0] = INT_TO_BOOLEAN(ctx->VertexProgram.CurrentPosition);
8368+ break;
8369+ case GL_MAX_DRAW_BUFFERS_ARB:
8370+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8371+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxDrawBuffers);
8372+ break;
8373+ case GL_DRAW_BUFFER0_ARB:
8374+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8375+ params[0] = ENUM_TO_BOOLEAN(ctx->DrawBuffer->ColorDrawBuffer[0]);
8376+ break;
8377+ case GL_DRAW_BUFFER1_ARB:
8378+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8379+ {
8380+ GLenum buffer;
8381+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
8382+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
8383+ return;
8384+ }
8385+ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
8386+ params[0] = ENUM_TO_BOOLEAN(buffer);
8387+ }
8388+ break;
8389+ case GL_DRAW_BUFFER2_ARB:
8390+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8391+ {
8392+ GLenum buffer;
8393+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
8394+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
8395+ return;
8396+ }
8397+ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
8398+ params[0] = ENUM_TO_BOOLEAN(buffer);
8399+ }
8400+ break;
8401+ case GL_DRAW_BUFFER3_ARB:
8402+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8403+ {
8404+ GLenum buffer;
8405+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
8406+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
8407+ return;
8408+ }
8409+ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
8410+ params[0] = ENUM_TO_BOOLEAN(buffer);
8411+ }
8412+ break;
8413+ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
8414+ CHECK_EXT1(OES_read_format, "GetBooleanv");
8415+ params[0] = INT_TO_BOOLEAN(ctx->Const.ColorReadType);
8416+ break;
8417+ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
8418+ CHECK_EXT1(OES_read_format, "GetBooleanv");
8419+ params[0] = INT_TO_BOOLEAN(ctx->Const.ColorReadFormat);
8420+ break;
8421+ case GL_NUM_FRAGMENT_REGISTERS_ATI:
8422+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8423+ params[0] = INT_TO_BOOLEAN(6);
8424+ break;
8425+ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
8426+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8427+ params[0] = INT_TO_BOOLEAN(8);
8428+ break;
8429+ case GL_NUM_PASSES_ATI:
8430+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8431+ params[0] = INT_TO_BOOLEAN(2);
8432+ break;
8433+ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
8434+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8435+ params[0] = INT_TO_BOOLEAN(8);
8436+ break;
8437+ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
8438+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8439+ params[0] = INT_TO_BOOLEAN(16);
8440+ break;
8441+ case GL_COLOR_ALPHA_PAIRING_ATI:
8442+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8443+ params[0] = GL_TRUE;
8444+ break;
8445+ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
8446+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8447+ params[0] = INT_TO_BOOLEAN(3);
8448+ break;
8449+ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
8450+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8451+ params[0] = INT_TO_BOOLEAN(3);
8452+ break;
8453+ case GL_STENCIL_BACK_FUNC:
8454+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.Function[1]);
8455+ break;
8456+ case GL_STENCIL_BACK_VALUE_MASK:
8457+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.ValueMask[1]);
8458+ break;
8459+ case GL_STENCIL_BACK_REF:
8460+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Ref[1]);
8461+ break;
8462+ case GL_STENCIL_BACK_FAIL:
8463+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.FailFunc[1]);
8464+ break;
8465+ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
8466+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZFailFunc[1]);
8467+ break;
8468+ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
8469+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZPassFunc[1]);
8470+ break;
8471+ case GL_FRAMEBUFFER_BINDING_EXT:
8472+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
8473+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Name);
8474+ break;
8475+ case GL_RENDERBUFFER_BINDING_EXT:
8476+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
8477+ params[0] = INT_TO_BOOLEAN(ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0);
8478+ break;
8479+ case GL_MAX_COLOR_ATTACHMENTS_EXT:
8480+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
8481+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxColorAttachments);
8482+ break;
8483+ case GL_MAX_RENDERBUFFER_SIZE_EXT:
8484+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
8485+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxRenderbufferSize);
8486+ break;
8487+ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
8488+ CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
8489+ params[0] = INT_TO_BOOLEAN(MAX_FRAGMENT_UNIFORM_COMPONENTS);
8490+ break;
8491+ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
8492+ CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
8493+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.FragmentShaderDerivative);
8494+ break;
8495+ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
8496+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
8497+ params[0] = INT_TO_BOOLEAN(MAX_VERTEX_UNIFORM_COMPONENTS);
8498+ break;
8499+ case GL_MAX_VARYING_FLOATS_ARB:
8500+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
8501+ params[0] = INT_TO_BOOLEAN(MAX_VARYING_FLOATS);
8502+ break;
8503+ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
8504+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
8505+ params[0] = INT_TO_BOOLEAN(MAX_VERTEX_TEXTURE_IMAGE_UNITS);
8506+ break;
8507+ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
8508+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
8509+ params[0] = INT_TO_BOOLEAN(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
8510+ break;
8511+ default:
8512+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv(pname=0x%x)", pname);
8513+ }
8514+}
8515+
8516+void GLAPIENTRY
8517+_mesa_GetFloatv( GLenum pname, GLfloat *params )
8518+{
8519+ GET_CURRENT_CONTEXT(ctx);
8520+ ASSERT_OUTSIDE_BEGIN_END(ctx);
8521+
8522+ if (!params)
8523+ return;
8524+
8525+ if (ctx->NewState)
8526+ _mesa_update_state(ctx);
8527+
8528+ if (ctx->Driver.GetFloatv &&
8529+ ctx->Driver.GetFloatv(ctx, pname, params))
8530+ return;
8531+
8532+ switch (pname) {
8533+ case GL_ACCUM_RED_BITS:
8534+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumRedBits);
8535+ break;
8536+ case GL_ACCUM_GREEN_BITS:
8537+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumGreenBits);
8538+ break;
8539+ case GL_ACCUM_BLUE_BITS:
8540+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumBlueBits);
8541+ break;
8542+ case GL_ACCUM_ALPHA_BITS:
8543+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumAlphaBits);
8544+ break;
8545+ case GL_ACCUM_CLEAR_VALUE:
8546+ params[0] = ctx->Accum.ClearColor[0];
8547+ params[1] = ctx->Accum.ClearColor[1];
8548+ params[2] = ctx->Accum.ClearColor[2];
8549+ params[3] = ctx->Accum.ClearColor[3];
8550+ break;
8551+ case GL_ALPHA_BIAS:
8552+ params[0] = ctx->Pixel.AlphaBias;
8553+ break;
8554+ case GL_ALPHA_BITS:
8555+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.alphaBits);
8556+ break;
8557+ case GL_ALPHA_SCALE:
8558+ params[0] = ctx->Pixel.AlphaScale;
8559+ break;
8560+ case GL_ALPHA_TEST:
8561+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.AlphaEnabled);
8562+ break;
8563+ case GL_ALPHA_TEST_FUNC:
8564+ params[0] = ENUM_TO_FLOAT(ctx->Color.AlphaFunc);
8565+ break;
8566+ case GL_ALPHA_TEST_REF:
8567+ params[0] = ctx->Color.AlphaRef;
8568+ break;
8569+ case GL_ATTRIB_STACK_DEPTH:
8570+ params[0] = (GLfloat)(ctx->AttribStackDepth);
8571+ break;
8572+ case GL_AUTO_NORMAL:
8573+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.AutoNormal);
8574+ break;
8575+ case GL_AUX_BUFFERS:
8576+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.numAuxBuffers);
8577+ break;
8578+ case GL_BLEND:
8579+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.BlendEnabled);
8580+ break;
8581+ case GL_BLEND_DST:
8582+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstRGB);
8583+ break;
8584+ case GL_BLEND_SRC:
8585+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcRGB);
8586+ break;
8587+ case GL_BLEND_SRC_RGB_EXT:
8588+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcRGB);
8589+ break;
8590+ case GL_BLEND_DST_RGB_EXT:
8591+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstRGB);
8592+ break;
8593+ case GL_BLEND_SRC_ALPHA_EXT:
8594+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcA);
8595+ break;
8596+ case GL_BLEND_DST_ALPHA_EXT:
8597+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstA);
8598+ break;
8599+ case GL_BLEND_EQUATION:
8600+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendEquationRGB );
8601+ break;
8602+ case GL_BLEND_EQUATION_ALPHA_EXT:
8603+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendEquationA );
8604+ break;
8605+ case GL_BLEND_COLOR_EXT:
8606+ params[0] = ctx->Color.BlendColor[0];
8607+ params[1] = ctx->Color.BlendColor[1];
8608+ params[2] = ctx->Color.BlendColor[2];
8609+ params[3] = ctx->Color.BlendColor[3];
8610+ break;
8611+ case GL_BLUE_BIAS:
8612+ params[0] = ctx->Pixel.BlueBias;
8613+ break;
8614+ case GL_BLUE_BITS:
8615+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.blueBits);
8616+ break;
8617+ case GL_BLUE_SCALE:
8618+ params[0] = ctx->Pixel.BlueScale;
8619+ break;
8620+ case GL_CLIENT_ATTRIB_STACK_DEPTH:
8621+ params[0] = (GLfloat)(ctx->ClientAttribStackDepth);
8622+ break;
8623+ case GL_CLIP_PLANE0:
8624+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 0) & 1);
8625+ break;
8626+ case GL_CLIP_PLANE1:
8627+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 1) & 1);
8628+ break;
8629+ case GL_CLIP_PLANE2:
8630+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 2) & 1);
8631+ break;
8632+ case GL_CLIP_PLANE3:
8633+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 3) & 1);
8634+ break;
8635+ case GL_CLIP_PLANE4:
8636+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 4) & 1);
8637+ break;
8638+ case GL_CLIP_PLANE5:
8639+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 5) & 1);
8640+ break;
8641+ case GL_COLOR_CLEAR_VALUE:
8642+ params[0] = ctx->Color.ClearColor[0];
8643+ params[1] = ctx->Color.ClearColor[1];
8644+ params[2] = ctx->Color.ClearColor[2];
8645+ params[3] = ctx->Color.ClearColor[3];
8646+ break;
8647+ case GL_COLOR_MATERIAL:
8648+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.ColorMaterialEnabled);
8649+ break;
8650+ case GL_COLOR_MATERIAL_FACE:
8651+ params[0] = ENUM_TO_FLOAT(ctx->Light.ColorMaterialFace);
8652+ break;
8653+ case GL_COLOR_MATERIAL_PARAMETER:
8654+ params[0] = ENUM_TO_FLOAT(ctx->Light.ColorMaterialMode);
8655+ break;
8656+ case GL_COLOR_WRITEMASK:
8657+ params[0] = (GLfloat)(ctx->Color.ColorMask[RCOMP] ? 1 : 0);
8658+ params[1] = (GLfloat)(ctx->Color.ColorMask[GCOMP] ? 1 : 0);
8659+ params[2] = (GLfloat)(ctx->Color.ColorMask[BCOMP] ? 1 : 0);
8660+ params[3] = (GLfloat)(ctx->Color.ColorMask[ACOMP] ? 1 : 0);
8661+ break;
8662+ case GL_CULL_FACE:
8663+ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.CullFlag);
8664+ break;
8665+ case GL_CULL_FACE_MODE:
8666+ params[0] = ENUM_TO_FLOAT(ctx->Polygon.CullFaceMode);
8667+ break;
8668+ case GL_CURRENT_COLOR:
8669+ {
8670+ FLUSH_CURRENT(ctx, 0);
8671+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0];
8672+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1];
8673+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2];
8674+ params[3] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3];
8675+ }
8676+ break;
8677+ case GL_CURRENT_INDEX:
8678+ {
8679+ FLUSH_CURRENT(ctx, 0);
8680+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0];
8681+ }
8682+ break;
8683+ case GL_CURRENT_NORMAL:
8684+ {
8685+ FLUSH_CURRENT(ctx, 0);
8686+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0];
8687+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1];
8688+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2];
8689+ }
8690+ break;
8691+ case GL_CURRENT_RASTER_COLOR:
8692+ params[0] = ctx->Current.RasterColor[0];
8693+ params[1] = ctx->Current.RasterColor[1];
8694+ params[2] = ctx->Current.RasterColor[2];
8695+ params[3] = ctx->Current.RasterColor[3];
8696+ break;
8697+ case GL_CURRENT_RASTER_DISTANCE:
8698+ params[0] = ctx->Current.RasterDistance;
8699+ break;
8700+ case GL_CURRENT_RASTER_INDEX:
8701+ params[0] = ctx->Current.RasterIndex;
8702+ break;
8703+ case GL_CURRENT_RASTER_POSITION:
8704+ params[0] = ctx->Current.RasterPos[0];
8705+ params[1] = ctx->Current.RasterPos[1];
8706+ params[2] = ctx->Current.RasterPos[2];
8707+ params[3] = ctx->Current.RasterPos[3];
8708+ break;
8709+ case GL_CURRENT_RASTER_SECONDARY_COLOR:
8710+ params[0] = ctx->Current.RasterSecondaryColor[0];
8711+ params[1] = ctx->Current.RasterSecondaryColor[1];
8712+ params[2] = ctx->Current.RasterSecondaryColor[2];
8713+ params[3] = ctx->Current.RasterSecondaryColor[3];
8714+ break;
8715+ case GL_CURRENT_RASTER_TEXTURE_COORDS:
8716+ {
8717+ const GLuint texUnit = ctx->Texture.CurrentUnit;
8718+ params[0] = ctx->Current.RasterTexCoords[texUnit][0];
8719+ params[1] = ctx->Current.RasterTexCoords[texUnit][1];
8720+ params[2] = ctx->Current.RasterTexCoords[texUnit][2];
8721+ params[3] = ctx->Current.RasterTexCoords[texUnit][3];
8722+ }
8723+ break;
8724+ case GL_CURRENT_RASTER_POSITION_VALID:
8725+ params[0] = BOOLEAN_TO_FLOAT(ctx->Current.RasterPosValid);
8726+ break;
8727+ case GL_CURRENT_TEXTURE_COORDS:
8728+ {
8729+ const GLuint texUnit = ctx->Texture.CurrentUnit;
8730+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0];
8731+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1];
8732+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2];
8733+ params[3] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3];
8734+ }
8735+ break;
8736+ case GL_DEPTH_BIAS:
8737+ params[0] = ctx->Pixel.DepthBias;
8738+ break;
8739+ case GL_DEPTH_BITS:
8740+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.depthBits);
8741+ break;
8742+ case GL_DEPTH_CLEAR_VALUE:
8743+ params[0] = ctx->Depth.Clear;
8744+ break;
8745+ case GL_DEPTH_FUNC:
8746+ params[0] = ENUM_TO_FLOAT(ctx->Depth.Func);
8747+ break;
8748+ case GL_DEPTH_RANGE:
8749+ params[0] = ctx->Viewport.Near;
8750+ params[1] = ctx->Viewport.Far;
8751+ break;
8752+ case GL_DEPTH_SCALE:
8753+ params[0] = ctx->Pixel.DepthScale;
8754+ break;
8755+ case GL_DEPTH_TEST:
8756+ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.Test);
8757+ break;
8758+ case GL_DEPTH_WRITEMASK:
8759+ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.Mask);
8760+ break;
8761+ case GL_DITHER:
8762+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.DitherFlag);
8763+ break;
8764+ case GL_DOUBLEBUFFER:
8765+ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.doubleBufferMode);
8766+ break;
8767+ case GL_DRAW_BUFFER:
8768+ params[0] = ENUM_TO_FLOAT(ctx->DrawBuffer->ColorDrawBuffer[0]);
8769+ break;
8770+ case GL_EDGE_FLAG:
8771+ {
8772+ FLUSH_CURRENT(ctx, 0);
8773+ params[0] = BOOLEAN_TO_FLOAT(ctx->Current.EdgeFlag);
8774+ }
8775+ break;
8776+ case GL_FEEDBACK_BUFFER_SIZE:
8777+ params[0] = (GLfloat)(ctx->Feedback.BufferSize);
8778+ break;
8779+ case GL_FEEDBACK_BUFFER_TYPE:
8780+ params[0] = ENUM_TO_FLOAT(ctx->Feedback.Type);
8781+ break;
8782+ case GL_FOG:
8783+ params[0] = BOOLEAN_TO_FLOAT(ctx->Fog.Enabled);
8784+ break;
8785+ case GL_FOG_COLOR:
8786+ params[0] = ctx->Fog.Color[0];
8787+ params[1] = ctx->Fog.Color[1];
8788+ params[2] = ctx->Fog.Color[2];
8789+ params[3] = ctx->Fog.Color[3];
8790+ break;
8791+ case GL_FOG_DENSITY:
8792+ params[0] = ctx->Fog.Density;
8793+ break;
8794+ case GL_FOG_END:
8795+ params[0] = ctx->Fog.End;
8796+ break;
8797+ case GL_FOG_HINT:
8798+ params[0] = ENUM_TO_FLOAT(ctx->Hint.Fog);
8799+ break;
8800+ case GL_FOG_INDEX:
8801+ params[0] = ctx->Fog.Index;
8802+ break;
8803+ case GL_FOG_MODE:
8804+ params[0] = ENUM_TO_FLOAT(ctx->Fog.Mode);
8805+ break;
8806+ case GL_FOG_START:
8807+ params[0] = ctx->Fog.Start;
8808+ break;
8809+ case GL_FRONT_FACE:
8810+ params[0] = ENUM_TO_FLOAT(ctx->Polygon.FrontFace);
8811+ break;
8812+ case GL_GREEN_BIAS:
8813+ params[0] = ctx->Pixel.GreenBias;
8814+ break;
8815+ case GL_GREEN_BITS:
8816+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.greenBits);
8817+ break;
8818+ case GL_GREEN_SCALE:
8819+ params[0] = ctx->Pixel.GreenScale;
8820+ break;
8821+ case GL_INDEX_BITS:
8822+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.indexBits);
8823+ break;
8824+ case GL_INDEX_CLEAR_VALUE:
8825+ params[0] = (GLfloat)(ctx->Color.ClearIndex);
8826+ break;
8827+ case GL_INDEX_MODE:
8828+ params[0] = BOOLEAN_TO_FLOAT(!ctx->DrawBuffer->Visual.rgbMode);
8829+ break;
8830+ case GL_INDEX_OFFSET:
8831+ params[0] = (GLfloat)(ctx->Pixel.IndexOffset);
8832+ break;
8833+ case GL_INDEX_SHIFT:
8834+ params[0] = (GLfloat)(ctx->Pixel.IndexShift);
8835+ break;
8836+ case GL_INDEX_WRITEMASK:
8837+ params[0] = (GLfloat)(ctx->Color.IndexMask);
8838+ break;
8839+ case GL_LIGHT0:
8840+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[0].Enabled);
8841+ break;
8842+ case GL_LIGHT1:
8843+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[1].Enabled);
8844+ break;
8845+ case GL_LIGHT2:
8846+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[2].Enabled);
8847+ break;
8848+ case GL_LIGHT3:
8849+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[3].Enabled);
8850+ break;
8851+ case GL_LIGHT4:
8852+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[4].Enabled);
8853+ break;
8854+ case GL_LIGHT5:
8855+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[5].Enabled);
8856+ break;
8857+ case GL_LIGHT6:
8858+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[6].Enabled);
8859+ break;
8860+ case GL_LIGHT7:
8861+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[7].Enabled);
8862+ break;
8863+ case GL_LIGHTING:
8864+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Enabled);
8865+ break;
8866+ case GL_LIGHT_MODEL_AMBIENT:
8867+ params[0] = ctx->Light.Model.Ambient[0];
8868+ params[1] = ctx->Light.Model.Ambient[1];
8869+ params[2] = ctx->Light.Model.Ambient[2];
8870+ params[3] = ctx->Light.Model.Ambient[3];
8871+ break;
8872+ case GL_LIGHT_MODEL_COLOR_CONTROL:
8873+ params[0] = ENUM_TO_FLOAT(ctx->Light.Model.ColorControl);
8874+ break;
8875+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
8876+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Model.LocalViewer);
8877+ break;
8878+ case GL_LIGHT_MODEL_TWO_SIDE:
8879+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Model.TwoSide);
8880+ break;
8881+ case GL_LINE_SMOOTH:
8882+ params[0] = BOOLEAN_TO_FLOAT(ctx->Line.SmoothFlag);
8883+ break;
8884+ case GL_LINE_SMOOTH_HINT:
8885+ params[0] = ENUM_TO_FLOAT(ctx->Hint.LineSmooth);
8886+ break;
8887+ case GL_LINE_STIPPLE:
8888+ params[0] = BOOLEAN_TO_FLOAT(ctx->Line.StippleFlag);
8889+ break;
8890+ case GL_LINE_STIPPLE_PATTERN:
8891+ params[0] = (GLfloat)(ctx->Line.StipplePattern);
8892+ break;
8893+ case GL_LINE_STIPPLE_REPEAT:
8894+ params[0] = (GLfloat)(ctx->Line.StippleFactor);
8895+ break;
8896+ case GL_LINE_WIDTH:
8897+ params[0] = ctx->Line.Width;
8898+ break;
8899+ case GL_LINE_WIDTH_GRANULARITY:
8900+ params[0] = ctx->Const.LineWidthGranularity;
8901+ break;
8902+ case GL_LINE_WIDTH_RANGE:
8903+ params[0] = ctx->Const.MinLineWidthAA;
8904+ params[1] = ctx->Const.MaxLineWidthAA;
8905+ break;
8906+ case GL_ALIASED_LINE_WIDTH_RANGE:
8907+ params[0] = ctx->Const.MinLineWidth;
8908+ params[1] = ctx->Const.MaxLineWidth;
8909+ break;
8910+ case GL_LIST_BASE:
8911+ params[0] = (GLfloat)(ctx->List.ListBase);
8912+ break;
8913+ case GL_LIST_INDEX:
8914+ params[0] = (GLfloat)(ctx->ListState.CurrentListNum);
8915+ break;
8916+ case GL_LIST_MODE:
8917+ {
8918+ GLenum mode;
8919+ if (!ctx->CompileFlag)
8920+ mode = 0;
8921+ else if (ctx->ExecuteFlag)
8922+ mode = GL_COMPILE_AND_EXECUTE;
8923+ else
8924+ mode = GL_COMPILE;
8925+ params[0] = ENUM_TO_FLOAT(mode);
8926+ }
8927+ break;
8928+ case GL_INDEX_LOGIC_OP:
8929+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.IndexLogicOpEnabled);
8930+ break;
8931+ case GL_COLOR_LOGIC_OP:
8932+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.ColorLogicOpEnabled);
8933+ break;
8934+ case GL_LOGIC_OP_MODE:
8935+ params[0] = ENUM_TO_FLOAT(ctx->Color.LogicOp);
8936+ break;
8937+ case GL_MAP1_COLOR_4:
8938+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Color4);
8939+ break;
8940+ case GL_MAP1_GRID_DOMAIN:
8941+ params[0] = ctx->Eval.MapGrid1u1;
8942+ params[1] = ctx->Eval.MapGrid1u2;
8943+ break;
8944+ case GL_MAP1_GRID_SEGMENTS:
8945+ params[0] = (GLfloat)(ctx->Eval.MapGrid1un);
8946+ break;
8947+ case GL_MAP1_INDEX:
8948+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Index);
8949+ break;
8950+ case GL_MAP1_NORMAL:
8951+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Normal);
8952+ break;
8953+ case GL_MAP1_TEXTURE_COORD_1:
8954+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord1);
8955+ break;
8956+ case GL_MAP1_TEXTURE_COORD_2:
8957+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord2);
8958+ break;
8959+ case GL_MAP1_TEXTURE_COORD_3:
8960+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord3);
8961+ break;
8962+ case GL_MAP1_TEXTURE_COORD_4:
8963+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord4);
8964+ break;
8965+ case GL_MAP1_VERTEX_3:
8966+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Vertex3);
8967+ break;
8968+ case GL_MAP1_VERTEX_4:
8969+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Vertex4);
8970+ break;
8971+ case GL_MAP2_COLOR_4:
8972+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Color4);
8973+ break;
8974+ case GL_MAP2_GRID_DOMAIN:
8975+ params[0] = ctx->Eval.MapGrid2u1;
8976+ params[1] = ctx->Eval.MapGrid2u2;
8977+ params[2] = ctx->Eval.MapGrid2v1;
8978+ params[3] = ctx->Eval.MapGrid2v2;
8979+ break;
8980+ case GL_MAP2_GRID_SEGMENTS:
8981+ params[0] = (GLfloat)(ctx->Eval.MapGrid2un);
8982+ params[1] = (GLfloat)(ctx->Eval.MapGrid2vn);
8983+ break;
8984+ case GL_MAP2_INDEX:
8985+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Index);
8986+ break;
8987+ case GL_MAP2_NORMAL:
8988+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Normal);
8989+ break;
8990+ case GL_MAP2_TEXTURE_COORD_1:
8991+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord1);
8992+ break;
8993+ case GL_MAP2_TEXTURE_COORD_2:
8994+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord2);
8995+ break;
8996+ case GL_MAP2_TEXTURE_COORD_3:
8997+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord3);
8998+ break;
8999+ case GL_MAP2_TEXTURE_COORD_4:
9000+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord4);
9001+ break;
9002+ case GL_MAP2_VERTEX_3:
9003+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Vertex3);
9004+ break;
9005+ case GL_MAP2_VERTEX_4:
9006+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Vertex4);
9007+ break;
9008+ case GL_MAP_COLOR:
9009+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MapColorFlag);
9010+ break;
9011+ case GL_MAP_STENCIL:
9012+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MapStencilFlag);
9013+ break;
9014+ case GL_MATRIX_MODE:
9015+ params[0] = ENUM_TO_FLOAT(ctx->Transform.MatrixMode);
9016+ break;
9017+ case GL_MAX_ATTRIB_STACK_DEPTH:
9018+ params[0] = (GLfloat)(MAX_ATTRIB_STACK_DEPTH);
9019+ break;
9020+ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
9021+ params[0] = (GLfloat)(MAX_CLIENT_ATTRIB_STACK_DEPTH);
9022+ break;
9023+ case GL_MAX_CLIP_PLANES:
9024+ params[0] = (GLfloat)(ctx->Const.MaxClipPlanes);
9025+ break;
9026+ case GL_MAX_ELEMENTS_VERTICES:
9027+ params[0] = (GLfloat)(ctx->Const.MaxArrayLockSize);
9028+ break;
9029+ case GL_MAX_ELEMENTS_INDICES:
9030+ params[0] = (GLfloat)(ctx->Const.MaxArrayLockSize);
9031+ break;
9032+ case GL_MAX_EVAL_ORDER:
9033+ params[0] = (GLfloat)(MAX_EVAL_ORDER);
9034+ break;
9035+ case GL_MAX_LIGHTS:
9036+ params[0] = (GLfloat)(ctx->Const.MaxLights);
9037+ break;
9038+ case GL_MAX_LIST_NESTING:
9039+ params[0] = (GLfloat)(MAX_LIST_NESTING);
9040+ break;
9041+ case GL_MAX_MODELVIEW_STACK_DEPTH:
9042+ params[0] = (GLfloat)(MAX_MODELVIEW_STACK_DEPTH);
9043+ break;
9044+ case GL_MAX_NAME_STACK_DEPTH:
9045+ params[0] = (GLfloat)(MAX_NAME_STACK_DEPTH);
9046+ break;
9047+ case GL_MAX_PIXEL_MAP_TABLE:
9048+ params[0] = (GLfloat)(MAX_PIXEL_MAP_TABLE);
9049+ break;
9050+ case GL_MAX_PROJECTION_STACK_DEPTH:
9051+ params[0] = (GLfloat)(MAX_PROJECTION_STACK_DEPTH);
9052+ break;
9053+ case GL_MAX_TEXTURE_SIZE:
9054+ params[0] = (GLfloat)(1 << (ctx->Const.MaxTextureLevels - 1));
9055+ break;
9056+ case GL_MAX_3D_TEXTURE_SIZE:
9057+ params[0] = (GLfloat)(1 << (ctx->Const.Max3DTextureLevels - 1));
9058+ break;
9059+ case GL_MAX_TEXTURE_STACK_DEPTH:
9060+ params[0] = (GLfloat)(MAX_TEXTURE_STACK_DEPTH);
9061+ break;
9062+ case GL_MAX_VIEWPORT_DIMS:
9063+ params[0] = (GLfloat)(ctx->Const.MaxViewportWidth);
9064+ params[1] = (GLfloat)(ctx->Const.MaxViewportHeight);
9065+ break;
9066+ case GL_MODELVIEW_MATRIX:
9067+ {
9068+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
9069+ params[0] = matrix[0];
9070+ params[1] = matrix[1];
9071+ params[2] = matrix[2];
9072+ params[3] = matrix[3];
9073+ params[4] = matrix[4];
9074+ params[5] = matrix[5];
9075+ params[6] = matrix[6];
9076+ params[7] = matrix[7];
9077+ params[8] = matrix[8];
9078+ params[9] = matrix[9];
9079+ params[10] = matrix[10];
9080+ params[11] = matrix[11];
9081+ params[12] = matrix[12];
9082+ params[13] = matrix[13];
9083+ params[14] = matrix[14];
9084+ params[15] = matrix[15];
9085+ }
9086+ break;
9087+ case GL_MODELVIEW_STACK_DEPTH:
9088+ params[0] = (GLfloat)(ctx->ModelviewMatrixStack.Depth + 1);
9089+ break;
9090+ case GL_NAME_STACK_DEPTH:
9091+ params[0] = (GLfloat)(ctx->Select.NameStackDepth);
9092+ break;
9093+ case GL_NORMALIZE:
9094+ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.Normalize);
9095+ break;
9096+ case GL_PACK_ALIGNMENT:
9097+ params[0] = (GLfloat)(ctx->Pack.Alignment);
9098+ break;
9099+ case GL_PACK_LSB_FIRST:
9100+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.LsbFirst);
9101+ break;
9102+ case GL_PACK_ROW_LENGTH:
9103+ params[0] = (GLfloat)(ctx->Pack.RowLength);
9104+ break;
9105+ case GL_PACK_SKIP_PIXELS:
9106+ params[0] = (GLfloat)(ctx->Pack.SkipPixels);
9107+ break;
9108+ case GL_PACK_SKIP_ROWS:
9109+ params[0] = (GLfloat)(ctx->Pack.SkipRows);
9110+ break;
9111+ case GL_PACK_SWAP_BYTES:
9112+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.SwapBytes);
9113+ break;
9114+ case GL_PACK_SKIP_IMAGES_EXT:
9115+ params[0] = (GLfloat)(ctx->Pack.SkipImages);
9116+ break;
9117+ case GL_PACK_IMAGE_HEIGHT_EXT:
9118+ params[0] = (GLfloat)(ctx->Pack.ImageHeight);
9119+ break;
9120+ case GL_PACK_INVERT_MESA:
9121+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.Invert);
9122+ break;
9123+ case GL_PERSPECTIVE_CORRECTION_HINT:
9124+ params[0] = ENUM_TO_FLOAT(ctx->Hint.PerspectiveCorrection);
9125+ break;
9126+ case GL_PIXEL_MAP_A_TO_A_SIZE:
9127+ params[0] = (GLfloat)(ctx->Pixel.MapAtoAsize);
9128+ break;
9129+ case GL_PIXEL_MAP_B_TO_B_SIZE:
9130+ params[0] = (GLfloat)(ctx->Pixel.MapBtoBsize);
9131+ break;
9132+ case GL_PIXEL_MAP_G_TO_G_SIZE:
9133+ params[0] = (GLfloat)(ctx->Pixel.MapGtoGsize);
9134+ break;
9135+ case GL_PIXEL_MAP_I_TO_A_SIZE:
9136+ params[0] = (GLfloat)(ctx->Pixel.MapItoAsize);
9137+ break;
9138+ case GL_PIXEL_MAP_I_TO_B_SIZE:
9139+ params[0] = (GLfloat)(ctx->Pixel.MapItoBsize);
9140+ break;
9141+ case GL_PIXEL_MAP_I_TO_G_SIZE:
9142+ params[0] = (GLfloat)(ctx->Pixel.MapItoGsize);
9143+ break;
9144+ case GL_PIXEL_MAP_I_TO_I_SIZE:
9145+ params[0] = (GLfloat)(ctx->Pixel.MapItoIsize);
9146+ break;
9147+ case GL_PIXEL_MAP_I_TO_R_SIZE:
9148+ params[0] = (GLfloat)(ctx->Pixel.MapItoRsize);
9149+ break;
9150+ case GL_PIXEL_MAP_R_TO_R_SIZE:
9151+ params[0] = (GLfloat)(ctx->Pixel.MapRtoRsize);
9152+ break;
9153+ case GL_PIXEL_MAP_S_TO_S_SIZE:
9154+ params[0] = (GLfloat)(ctx->Pixel.MapStoSsize);
9155+ break;
9156+ case GL_POINT_SIZE:
9157+ params[0] = ctx->Point.Size;
9158+ break;
9159+ case GL_POINT_SIZE_GRANULARITY:
9160+ params[0] = ctx->Const.PointSizeGranularity;
9161+ break;
9162+ case GL_POINT_SIZE_RANGE:
9163+ params[0] = ctx->Const.MinPointSizeAA;
9164+ params[1] = ctx->Const.MaxPointSizeAA;
9165+ break;
9166+ case GL_ALIASED_POINT_SIZE_RANGE:
9167+ params[0] = ctx->Const.MinPointSize;
9168+ params[1] = ctx->Const.MaxPointSize;
9169+ break;
9170+ case GL_POINT_SMOOTH:
9171+ params[0] = BOOLEAN_TO_FLOAT(ctx->Point.SmoothFlag);
9172+ break;
9173+ case GL_POINT_SMOOTH_HINT:
9174+ params[0] = ENUM_TO_FLOAT(ctx->Hint.PointSmooth);
9175+ break;
9176+ case GL_POINT_SIZE_MIN_EXT:
9177+ params[0] = ctx->Point.MinSize;
9178+ break;
9179+ case GL_POINT_SIZE_MAX_EXT:
9180+ params[0] = ctx->Point.MaxSize;
9181+ break;
9182+ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
9183+ params[0] = ctx->Point.Threshold;
9184+ break;
9185+ case GL_DISTANCE_ATTENUATION_EXT:
9186+ params[0] = ctx->Point.Params[0];
9187+ params[1] = ctx->Point.Params[1];
9188+ params[2] = ctx->Point.Params[2];
9189+ break;
9190+ case GL_POLYGON_MODE:
9191+ params[0] = ENUM_TO_FLOAT(ctx->Polygon.FrontMode);
9192+ params[1] = ENUM_TO_FLOAT(ctx->Polygon.BackMode);
9193+ break;
9194+ case GL_POLYGON_OFFSET_BIAS_EXT:
9195+ params[0] = ctx->Polygon.OffsetUnits;
9196+ break;
9197+ case GL_POLYGON_OFFSET_FACTOR:
9198+ params[0] = ctx->Polygon.OffsetFactor ;
9199+ break;
9200+ case GL_POLYGON_OFFSET_UNITS:
9201+ params[0] = ctx->Polygon.OffsetUnits ;
9202+ break;
9203+ case GL_POLYGON_SMOOTH:
9204+ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.SmoothFlag);
9205+ break;
9206+ case GL_POLYGON_SMOOTH_HINT:
9207+ params[0] = ENUM_TO_FLOAT(ctx->Hint.PolygonSmooth);
9208+ break;
9209+ case GL_POLYGON_STIPPLE:
9210+ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.StippleFlag);
9211+ break;
9212+ case GL_PROJECTION_MATRIX:
9213+ {
9214+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
9215+ params[0] = matrix[0];
9216+ params[1] = matrix[1];
9217+ params[2] = matrix[2];
9218+ params[3] = matrix[3];
9219+ params[4] = matrix[4];
9220+ params[5] = matrix[5];
9221+ params[6] = matrix[6];
9222+ params[7] = matrix[7];
9223+ params[8] = matrix[8];
9224+ params[9] = matrix[9];
9225+ params[10] = matrix[10];
9226+ params[11] = matrix[11];
9227+ params[12] = matrix[12];
9228+ params[13] = matrix[13];
9229+ params[14] = matrix[14];
9230+ params[15] = matrix[15];
9231+ }
9232+ break;
9233+ case GL_PROJECTION_STACK_DEPTH:
9234+ params[0] = (GLfloat)(ctx->ProjectionMatrixStack.Depth + 1);
9235+ break;
9236+ case GL_READ_BUFFER:
9237+ params[0] = ENUM_TO_FLOAT(ctx->ReadBuffer->ColorReadBuffer);
9238+ break;
9239+ case GL_RED_BIAS:
9240+ params[0] = ctx->Pixel.RedBias;
9241+ break;
9242+ case GL_RED_BITS:
9243+ params[0] = (GLfloat)( ctx->DrawBuffer->Visual.redBits );
9244+ break;
9245+ case GL_RED_SCALE:
9246+ params[0] = ctx->Pixel.RedScale;
9247+ break;
9248+ case GL_RENDER_MODE:
9249+ params[0] = ENUM_TO_FLOAT(ctx->RenderMode);
9250+ break;
9251+ case GL_RESCALE_NORMAL:
9252+ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.RescaleNormals);
9253+ break;
9254+ case GL_RGBA_MODE:
9255+ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.rgbMode);
9256+ break;
9257+ case GL_SCISSOR_BOX:
9258+ params[0] = (GLfloat)(ctx->Scissor.X);
9259+ params[1] = (GLfloat)(ctx->Scissor.Y);
9260+ params[2] = (GLfloat)(ctx->Scissor.Width);
9261+ params[3] = (GLfloat)(ctx->Scissor.Height);
9262+ break;
9263+ case GL_SCISSOR_TEST:
9264+ params[0] = BOOLEAN_TO_FLOAT(ctx->Scissor.Enabled);
9265+ break;
9266+ case GL_SELECTION_BUFFER_SIZE:
9267+ params[0] = (GLfloat)(ctx->Select.BufferSize);
9268+ break;
9269+ case GL_SHADE_MODEL:
9270+ params[0] = ENUM_TO_FLOAT(ctx->Light.ShadeModel);
9271+ break;
9272+ case GL_SHARED_TEXTURE_PALETTE_EXT:
9273+ params[0] = BOOLEAN_TO_FLOAT(ctx->Texture.SharedPalette);
9274+ break;
9275+ case GL_STENCIL_BITS:
9276+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.stencilBits);
9277+ break;
9278+ case GL_STENCIL_CLEAR_VALUE:
9279+ params[0] = (GLfloat)(ctx->Stencil.Clear);
9280+ break;
9281+ case GL_STENCIL_FAIL:
9282+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
9283+ break;
9284+ case GL_STENCIL_FUNC:
9285+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
9286+ break;
9287+ case GL_STENCIL_PASS_DEPTH_FAIL:
9288+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
9289+ break;
9290+ case GL_STENCIL_PASS_DEPTH_PASS:
9291+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
9292+ break;
9293+ case GL_STENCIL_REF:
9294+ params[0] = (GLfloat)(ctx->Stencil.Ref[ctx->Stencil.ActiveFace]);
9295+ break;
9296+ case GL_STENCIL_TEST:
9297+ params[0] = BOOLEAN_TO_FLOAT(ctx->Stencil.Enabled);
9298+ break;
9299+ case GL_STENCIL_VALUE_MASK:
9300+ params[0] = (GLfloat)(ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]);
9301+ break;
9302+ case GL_STENCIL_WRITEMASK:
9303+ params[0] = (GLfloat)(ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]);
9304+ break;
9305+ case GL_STEREO:
9306+ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.stereoMode);
9307+ break;
9308+ case GL_SUBPIXEL_BITS:
9309+ params[0] = (GLfloat)(ctx->Const.SubPixelBits);
9310+ break;
9311+ case GL_TEXTURE_1D:
9312+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_1D));
9313+ break;
9314+ case GL_TEXTURE_2D:
9315+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_2D));
9316+ break;
9317+ case GL_TEXTURE_3D:
9318+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_3D));
9319+ break;
9320+ case GL_TEXTURE_BINDING_1D:
9321+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name);
9322+ break;
9323+ case GL_TEXTURE_BINDING_2D:
9324+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name);
9325+ break;
9326+ case GL_TEXTURE_BINDING_3D:
9327+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name);
9328+ break;
9329+ case GL_TEXTURE_ENV_COLOR:
9330+ {
9331+ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
9332+ params[0] = color[0];
9333+ params[1] = color[1];
9334+ params[2] = color[2];
9335+ params[3] = color[3];
9336+ }
9337+ break;
9338+ case GL_TEXTURE_ENV_MODE:
9339+ params[0] = ENUM_TO_FLOAT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
9340+ break;
9341+ case GL_TEXTURE_GEN_S:
9342+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
9343+ break;
9344+ case GL_TEXTURE_GEN_T:
9345+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0));
9346+ break;
9347+ case GL_TEXTURE_GEN_R:
9348+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0));
9349+ break;
9350+ case GL_TEXTURE_GEN_Q:
9351+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0));
9352+ break;
9353+ case GL_TEXTURE_MATRIX:
9354+ {
9355+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
9356+ params[0] = matrix[0];
9357+ params[1] = matrix[1];
9358+ params[2] = matrix[2];
9359+ params[3] = matrix[3];
9360+ params[4] = matrix[4];
9361+ params[5] = matrix[5];
9362+ params[6] = matrix[6];
9363+ params[7] = matrix[7];
9364+ params[8] = matrix[8];
9365+ params[9] = matrix[9];
9366+ params[10] = matrix[10];
9367+ params[11] = matrix[11];
9368+ params[12] = matrix[12];
9369+ params[13] = matrix[13];
9370+ params[14] = matrix[14];
9371+ params[15] = matrix[15];
9372+ }
9373+ break;
9374+ case GL_TEXTURE_STACK_DEPTH:
9375+ params[0] = (GLfloat)(ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1);
9376+ break;
9377+ case GL_UNPACK_ALIGNMENT:
9378+ params[0] = (GLfloat)(ctx->Unpack.Alignment);
9379+ break;
9380+ case GL_UNPACK_LSB_FIRST:
9381+ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.LsbFirst);
9382+ break;
9383+ case GL_UNPACK_ROW_LENGTH:
9384+ params[0] = (GLfloat)(ctx->Unpack.RowLength);
9385+ break;
9386+ case GL_UNPACK_SKIP_PIXELS:
9387+ params[0] = (GLfloat)(ctx->Unpack.SkipPixels);
9388+ break;
9389+ case GL_UNPACK_SKIP_ROWS:
9390+ params[0] = (GLfloat)(ctx->Unpack.SkipRows);
9391+ break;
9392+ case GL_UNPACK_SWAP_BYTES:
9393+ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.SwapBytes);
9394+ break;
9395+ case GL_UNPACK_SKIP_IMAGES_EXT:
9396+ params[0] = (GLfloat)(ctx->Unpack.SkipImages);
9397+ break;
9398+ case GL_UNPACK_IMAGE_HEIGHT_EXT:
9399+ params[0] = (GLfloat)(ctx->Unpack.ImageHeight);
9400+ break;
9401+ case GL_UNPACK_CLIENT_STORAGE_APPLE:
9402+ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.ClientStorage);
9403+ break;
9404+ case GL_VIEWPORT:
9405+ params[0] = (GLfloat)(ctx->Viewport.X);
9406+ params[1] = (GLfloat)(ctx->Viewport.Y);
9407+ params[2] = (GLfloat)(ctx->Viewport.Width);
9408+ params[3] = (GLfloat)(ctx->Viewport.Height);
9409+ break;
9410+ case GL_ZOOM_X:
9411+ params[0] = ctx->Pixel.ZoomX;
9412+ break;
9413+ case GL_ZOOM_Y:
9414+ params[0] = ctx->Pixel.ZoomY;
9415+ break;
9416+ case GL_VERTEX_ARRAY:
9417+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Vertex.Enabled);
9418+ break;
9419+ case GL_VERTEX_ARRAY_SIZE:
9420+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.Size);
9421+ break;
9422+ case GL_VERTEX_ARRAY_TYPE:
9423+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Vertex.Type);
9424+ break;
9425+ case GL_VERTEX_ARRAY_STRIDE:
9426+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.Stride);
9427+ break;
9428+ case GL_VERTEX_ARRAY_COUNT_EXT:
9429+ params[0] = (GLfloat)(0);
9430+ break;
9431+ case GL_NORMAL_ARRAY:
9432+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Normal.Enabled);
9433+ break;
9434+ case GL_NORMAL_ARRAY_TYPE:
9435+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Normal.Type);
9436+ break;
9437+ case GL_NORMAL_ARRAY_STRIDE:
9438+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Normal.Stride);
9439+ break;
9440+ case GL_NORMAL_ARRAY_COUNT_EXT:
9441+ params[0] = (GLfloat)(0);
9442+ break;
9443+ case GL_COLOR_ARRAY:
9444+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Color.Enabled);
9445+ break;
9446+ case GL_COLOR_ARRAY_SIZE:
9447+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.Size);
9448+ break;
9449+ case GL_COLOR_ARRAY_TYPE:
9450+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Color.Type);
9451+ break;
9452+ case GL_COLOR_ARRAY_STRIDE:
9453+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.Stride);
9454+ break;
9455+ case GL_COLOR_ARRAY_COUNT_EXT:
9456+ params[0] = (GLfloat)(0);
9457+ break;
9458+ case GL_INDEX_ARRAY:
9459+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Index.Enabled);
9460+ break;
9461+ case GL_INDEX_ARRAY_TYPE:
9462+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Index.Type);
9463+ break;
9464+ case GL_INDEX_ARRAY_STRIDE:
9465+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Index.Stride);
9466+ break;
9467+ case GL_INDEX_ARRAY_COUNT_EXT:
9468+ params[0] = (GLfloat)(0);
9469+ break;
9470+ case GL_TEXTURE_COORD_ARRAY:
9471+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
9472+ break;
9473+ case GL_TEXTURE_COORD_ARRAY_SIZE:
9474+ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
9475+ break;
9476+ case GL_TEXTURE_COORD_ARRAY_TYPE:
9477+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
9478+ break;
9479+ case GL_TEXTURE_COORD_ARRAY_STRIDE:
9480+ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
9481+ break;
9482+ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
9483+ params[0] = (GLfloat)(0);
9484+ break;
9485+ case GL_EDGE_FLAG_ARRAY:
9486+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->EdgeFlag.Enabled);
9487+ break;
9488+ case GL_EDGE_FLAG_ARRAY_STRIDE:
9489+ params[0] = (GLfloat)(ctx->Array.ArrayObj->EdgeFlag.Stride);
9490+ break;
9491+ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
9492+ params[0] = (GLfloat)(0);
9493+ break;
9494+ case GL_MAX_TEXTURE_UNITS_ARB:
9495+ CHECK_EXT1(ARB_multitexture, "GetFloatv");
9496+ params[0] = (GLfloat)(ctx->Const.MaxTextureUnits);
9497+ break;
9498+ case GL_ACTIVE_TEXTURE_ARB:
9499+ CHECK_EXT1(ARB_multitexture, "GetFloatv");
9500+ params[0] = (GLfloat)(GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit);
9501+ break;
9502+ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
9503+ CHECK_EXT1(ARB_multitexture, "GetFloatv");
9504+ params[0] = (GLfloat)(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
9505+ break;
9506+ case GL_TEXTURE_CUBE_MAP_ARB:
9507+ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
9508+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB));
9509+ break;
9510+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
9511+ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
9512+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name);
9513+ break;
9514+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
9515+ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
9516+ params[0] = (GLfloat)((1 << (ctx->Const.MaxCubeTextureLevels - 1)));
9517+ break;
9518+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
9519+ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
9520+ params[0] = (GLfloat)(ctx->Hint.TextureCompression);
9521+ break;
9522+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
9523+ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
9524+ params[0] = (GLfloat)(_mesa_get_compressed_formats(ctx, NULL, GL_FALSE));
9525+ break;
9526+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
9527+ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
9528+ {
9529+ GLint formats[100];
9530+ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
9531+ ASSERT(n <= 100);
9532+ for (i = 0; i < n; i++)
9533+ params[i] = ENUM_TO_INT(formats[i]);
9534+ }
9535+ break;
9536+ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
9537+ CHECK_EXT1(EXT_compiled_vertex_array, "GetFloatv");
9538+ params[0] = (GLfloat)(ctx->Array.LockFirst);
9539+ break;
9540+ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
9541+ CHECK_EXT1(EXT_compiled_vertex_array, "GetFloatv");
9542+ params[0] = (GLfloat)(ctx->Array.LockCount);
9543+ break;
9544+ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
9545+ {
9546+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
9547+ params[0] = matrix[0];
9548+ params[1] = matrix[4];
9549+ params[2] = matrix[8];
9550+ params[3] = matrix[12];
9551+ params[4] = matrix[1];
9552+ params[5] = matrix[5];
9553+ params[6] = matrix[9];
9554+ params[7] = matrix[13];
9555+ params[8] = matrix[2];
9556+ params[9] = matrix[6];
9557+ params[10] = matrix[10];
9558+ params[11] = matrix[14];
9559+ params[12] = matrix[3];
9560+ params[13] = matrix[7];
9561+ params[14] = matrix[11];
9562+ params[15] = matrix[15];
9563+ }
9564+ break;
9565+ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
9566+ {
9567+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
9568+ params[0] = matrix[0];
9569+ params[1] = matrix[4];
9570+ params[2] = matrix[8];
9571+ params[3] = matrix[12];
9572+ params[4] = matrix[1];
9573+ params[5] = matrix[5];
9574+ params[6] = matrix[9];
9575+ params[7] = matrix[13];
9576+ params[8] = matrix[2];
9577+ params[9] = matrix[6];
9578+ params[10] = matrix[10];
9579+ params[11] = matrix[14];
9580+ params[12] = matrix[3];
9581+ params[13] = matrix[7];
9582+ params[14] = matrix[11];
9583+ params[15] = matrix[15];
9584+ }
9585+ break;
9586+ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
9587+ {
9588+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
9589+ params[0] = matrix[0];
9590+ params[1] = matrix[4];
9591+ params[2] = matrix[8];
9592+ params[3] = matrix[12];
9593+ params[4] = matrix[1];
9594+ params[5] = matrix[5];
9595+ params[6] = matrix[9];
9596+ params[7] = matrix[13];
9597+ params[8] = matrix[2];
9598+ params[9] = matrix[6];
9599+ params[10] = matrix[10];
9600+ params[11] = matrix[14];
9601+ params[12] = matrix[3];
9602+ params[13] = matrix[7];
9603+ params[14] = matrix[11];
9604+ params[15] = matrix[15];
9605+ }
9606+ break;
9607+ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
9608+ {
9609+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
9610+ params[0] = matrix[0];
9611+ params[1] = matrix[4];
9612+ params[2] = matrix[8];
9613+ params[3] = matrix[12];
9614+ params[4] = matrix[1];
9615+ params[5] = matrix[5];
9616+ params[6] = matrix[9];
9617+ params[7] = matrix[13];
9618+ params[8] = matrix[2];
9619+ params[9] = matrix[6];
9620+ params[10] = matrix[10];
9621+ params[11] = matrix[14];
9622+ params[12] = matrix[3];
9623+ params[13] = matrix[7];
9624+ params[14] = matrix[11];
9625+ params[15] = matrix[15];
9626+ }
9627+ break;
9628+ case GL_COLOR_MATRIX_SGI:
9629+ {
9630+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
9631+ params[0] = matrix[0];
9632+ params[1] = matrix[1];
9633+ params[2] = matrix[2];
9634+ params[3] = matrix[3];
9635+ params[4] = matrix[4];
9636+ params[5] = matrix[5];
9637+ params[6] = matrix[6];
9638+ params[7] = matrix[7];
9639+ params[8] = matrix[8];
9640+ params[9] = matrix[9];
9641+ params[10] = matrix[10];
9642+ params[11] = matrix[11];
9643+ params[12] = matrix[12];
9644+ params[13] = matrix[13];
9645+ params[14] = matrix[14];
9646+ params[15] = matrix[15];
9647+ }
9648+ break;
9649+ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
9650+ params[0] = (GLfloat)(ctx->ColorMatrixStack.Depth + 1);
9651+ break;
9652+ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
9653+ params[0] = (GLfloat)(MAX_COLOR_STACK_DEPTH);
9654+ break;
9655+ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
9656+ params[0] = ctx->Pixel.PostColorMatrixScale[0];
9657+ break;
9658+ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
9659+ params[0] = ctx->Pixel.PostColorMatrixScale[1];
9660+ break;
9661+ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
9662+ params[0] = ctx->Pixel.PostColorMatrixScale[2];
9663+ break;
9664+ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
9665+ params[0] = ctx->Pixel.PostColorMatrixScale[3];
9666+ break;
9667+ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
9668+ params[0] = ctx->Pixel.PostColorMatrixBias[0];
9669+ break;
9670+ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
9671+ params[0] = ctx->Pixel.PostColorMatrixBias[1];
9672+ break;
9673+ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
9674+ params[0] = ctx->Pixel.PostColorMatrixBias[2];
9675+ break;
9676+ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
9677+ params[0] = ctx->Pixel.PostColorMatrixBias[3];
9678+ break;
9679+ case GL_CONVOLUTION_1D_EXT:
9680+ CHECK_EXT1(EXT_convolution, "GetFloatv");
9681+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Convolution1DEnabled);
9682+ break;
9683+ case GL_CONVOLUTION_2D_EXT:
9684+ CHECK_EXT1(EXT_convolution, "GetFloatv");
9685+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Convolution2DEnabled);
9686+ break;
9687+ case GL_SEPARABLE_2D_EXT:
9688+ CHECK_EXT1(EXT_convolution, "GetFloatv");
9689+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Separable2DEnabled);
9690+ break;
9691+ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
9692+ CHECK_EXT1(EXT_convolution, "GetFloatv");
9693+ params[0] = ctx->Pixel.PostConvolutionScale[0];
9694+ break;
9695+ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
9696+ CHECK_EXT1(EXT_convolution, "GetFloatv");
9697+ params[0] = ctx->Pixel.PostConvolutionScale[1];
9698+ break;
9699+ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
9700+ CHECK_EXT1(EXT_convolution, "GetFloatv");
9701+ params[0] = ctx->Pixel.PostConvolutionScale[2];
9702+ break;
9703+ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
9704+ CHECK_EXT1(EXT_convolution, "GetFloatv");
9705+ params[0] = ctx->Pixel.PostConvolutionScale[3];
9706+ break;
9707+ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
9708+ CHECK_EXT1(EXT_convolution, "GetFloatv");
9709+ params[0] = ctx->Pixel.PostConvolutionBias[0];
9710+ break;
9711+ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
9712+ CHECK_EXT1(EXT_convolution, "GetFloatv");
9713+ params[0] = ctx->Pixel.PostConvolutionBias[1];
9714+ break;
9715+ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
9716+ CHECK_EXT1(EXT_convolution, "GetFloatv");
9717+ params[0] = ctx->Pixel.PostConvolutionBias[2];
9718+ break;
9719+ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
9720+ CHECK_EXT1(EXT_convolution, "GetFloatv");
9721+ params[0] = ctx->Pixel.PostConvolutionBias[3];
9722+ break;
9723+ case GL_HISTOGRAM:
9724+ CHECK_EXT1(EXT_histogram, "GetFloatv");
9725+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.HistogramEnabled);
9726+ break;
9727+ case GL_MINMAX:
9728+ CHECK_EXT1(EXT_histogram, "GetFloatv");
9729+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MinMaxEnabled);
9730+ break;
9731+ case GL_COLOR_TABLE_SGI:
9732+ CHECK_EXT1(SGI_color_table, "GetFloatv");
9733+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.ColorTableEnabled);
9734+ break;
9735+ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
9736+ CHECK_EXT1(SGI_color_table, "GetFloatv");
9737+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.PostConvolutionColorTableEnabled);
9738+ break;
9739+ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
9740+ CHECK_EXT1(SGI_color_table, "GetFloatv");
9741+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.PostColorMatrixColorTableEnabled);
9742+ break;
9743+ case GL_TEXTURE_COLOR_TABLE_SGI:
9744+ CHECK_EXT1(SGI_texture_color_table, "GetFloatv");
9745+ params[0] = BOOLEAN_TO_FLOAT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled);
9746+ break;
9747+ case GL_COLOR_SUM_EXT:
9748+ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetFloatv");
9749+ params[0] = BOOLEAN_TO_FLOAT(ctx->Fog.ColorSumEnabled);
9750+ break;
9751+ case GL_CURRENT_SECONDARY_COLOR_EXT:
9752+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
9753+ {
9754+ FLUSH_CURRENT(ctx, 0);
9755+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0];
9756+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1];
9757+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2];
9758+ params[3] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3];
9759+ }
9760+ break;
9761+ case GL_SECONDARY_COLOR_ARRAY_EXT:
9762+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
9763+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->SecondaryColor.Enabled);
9764+ break;
9765+ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
9766+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
9767+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->SecondaryColor.Type);
9768+ break;
9769+ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
9770+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
9771+ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.Stride);
9772+ break;
9773+ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
9774+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
9775+ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.Size);
9776+ break;
9777+ case GL_CURRENT_FOG_COORDINATE_EXT:
9778+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
9779+ {
9780+ FLUSH_CURRENT(ctx, 0);
9781+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_FOG][0];
9782+ }
9783+ break;
9784+ case GL_FOG_COORDINATE_ARRAY_EXT:
9785+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
9786+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->FogCoord.Enabled);
9787+ break;
9788+ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
9789+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
9790+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->FogCoord.Type);
9791+ break;
9792+ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
9793+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
9794+ params[0] = (GLfloat)(ctx->Array.ArrayObj->FogCoord.Stride);
9795+ break;
9796+ case GL_FOG_COORDINATE_SOURCE_EXT:
9797+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
9798+ params[0] = ENUM_TO_FLOAT(ctx->Fog.FogCoordinateSource);
9799+ break;
9800+ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
9801+ CHECK_EXT1(EXT_texture_lod_bias, "GetFloatv");
9802+ params[0] = ctx->Const.MaxTextureLodBias;
9803+ break;
9804+ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
9805+ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetFloatv");
9806+ params[0] = ctx->Const.MaxTextureMaxAnisotropy;
9807+ break;
9808+ case GL_MULTISAMPLE_ARB:
9809+ CHECK_EXT1(ARB_multisample, "GetFloatv");
9810+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.Enabled);
9811+ break;
9812+ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
9813+ CHECK_EXT1(ARB_multisample, "GetFloatv");
9814+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleAlphaToCoverage);
9815+ break;
9816+ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
9817+ CHECK_EXT1(ARB_multisample, "GetFloatv");
9818+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleAlphaToOne);
9819+ break;
9820+ case GL_SAMPLE_COVERAGE_ARB:
9821+ CHECK_EXT1(ARB_multisample, "GetFloatv");
9822+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleCoverage);
9823+ break;
9824+ case GL_SAMPLE_COVERAGE_VALUE_ARB:
9825+ CHECK_EXT1(ARB_multisample, "GetFloatv");
9826+ params[0] = ctx->Multisample.SampleCoverageValue;
9827+ break;
9828+ case GL_SAMPLE_COVERAGE_INVERT_ARB:
9829+ CHECK_EXT1(ARB_multisample, "GetFloatv");
9830+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleCoverageInvert);
9831+ break;
9832+ case GL_SAMPLE_BUFFERS_ARB:
9833+ CHECK_EXT1(ARB_multisample, "GetFloatv");
9834+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.sampleBuffers);
9835+ break;
9836+ case GL_SAMPLES_ARB:
9837+ CHECK_EXT1(ARB_multisample, "GetFloatv");
9838+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.samples);
9839+ break;
9840+ case GL_RASTER_POSITION_UNCLIPPED_IBM:
9841+ CHECK_EXT1(IBM_rasterpos_clip, "GetFloatv");
9842+ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.RasterPositionUnclipped);
9843+ break;
9844+ case GL_POINT_SPRITE_NV:
9845+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetFloatv");
9846+ params[0] = BOOLEAN_TO_FLOAT(ctx->Point.PointSprite);
9847+ break;
9848+ case GL_POINT_SPRITE_R_MODE_NV:
9849+ CHECK_EXT1(NV_point_sprite, "GetFloatv");
9850+ params[0] = ENUM_TO_FLOAT(ctx->Point.SpriteRMode);
9851+ break;
9852+ case GL_POINT_SPRITE_COORD_ORIGIN:
9853+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetFloatv");
9854+ params[0] = ENUM_TO_FLOAT(ctx->Point.SpriteOrigin);
9855+ break;
9856+ case GL_GENERATE_MIPMAP_HINT_SGIS:
9857+ CHECK_EXT1(SGIS_generate_mipmap, "GetFloatv");
9858+ params[0] = ENUM_TO_FLOAT(ctx->Hint.GenerateMipmap);
9859+ break;
9860+ case GL_VERTEX_PROGRAM_BINDING_NV:
9861+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9862+ params[0] = (GLfloat)((ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0));
9863+ break;
9864+ case GL_VERTEX_ATTRIB_ARRAY0_NV:
9865+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9866+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[0].Enabled);
9867+ break;
9868+ case GL_VERTEX_ATTRIB_ARRAY1_NV:
9869+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9870+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[1].Enabled);
9871+ break;
9872+ case GL_VERTEX_ATTRIB_ARRAY2_NV:
9873+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9874+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[2].Enabled);
9875+ break;
9876+ case GL_VERTEX_ATTRIB_ARRAY3_NV:
9877+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9878+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[3].Enabled);
9879+ break;
9880+ case GL_VERTEX_ATTRIB_ARRAY4_NV:
9881+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9882+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[4].Enabled);
9883+ break;
9884+ case GL_VERTEX_ATTRIB_ARRAY5_NV:
9885+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9886+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[5].Enabled);
9887+ break;
9888+ case GL_VERTEX_ATTRIB_ARRAY6_NV:
9889+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9890+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[6].Enabled);
9891+ break;
9892+ case GL_VERTEX_ATTRIB_ARRAY7_NV:
9893+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9894+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[7].Enabled);
9895+ break;
9896+ case GL_VERTEX_ATTRIB_ARRAY8_NV:
9897+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9898+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[8].Enabled);
9899+ break;
9900+ case GL_VERTEX_ATTRIB_ARRAY9_NV:
9901+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9902+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[9].Enabled);
9903+ break;
9904+ case GL_VERTEX_ATTRIB_ARRAY10_NV:
9905+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9906+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[10].Enabled);
9907+ break;
9908+ case GL_VERTEX_ATTRIB_ARRAY11_NV:
9909+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9910+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[11].Enabled);
9911+ break;
9912+ case GL_VERTEX_ATTRIB_ARRAY12_NV:
9913+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9914+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[12].Enabled);
9915+ break;
9916+ case GL_VERTEX_ATTRIB_ARRAY13_NV:
9917+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9918+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[13].Enabled);
9919+ break;
9920+ case GL_VERTEX_ATTRIB_ARRAY14_NV:
9921+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9922+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[14].Enabled);
9923+ break;
9924+ case GL_VERTEX_ATTRIB_ARRAY15_NV:
9925+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9926+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[15].Enabled);
9927+ break;
9928+ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
9929+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9930+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[0]);
9931+ break;
9932+ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
9933+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9934+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[1]);
9935+ break;
9936+ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
9937+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9938+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[2]);
9939+ break;
9940+ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
9941+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9942+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[3]);
9943+ break;
9944+ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
9945+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9946+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[4]);
9947+ break;
9948+ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
9949+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9950+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[5]);
9951+ break;
9952+ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
9953+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9954+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[6]);
9955+ break;
9956+ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
9957+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9958+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[7]);
9959+ break;
9960+ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
9961+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9962+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[8]);
9963+ break;
9964+ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
9965+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9966+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[9]);
9967+ break;
9968+ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
9969+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9970+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[10]);
9971+ break;
9972+ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
9973+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9974+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[11]);
9975+ break;
9976+ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
9977+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9978+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[12]);
9979+ break;
9980+ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
9981+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9982+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[13]);
9983+ break;
9984+ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
9985+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9986+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[14]);
9987+ break;
9988+ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
9989+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
9990+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[15]);
9991+ break;
9992+ case GL_FRAGMENT_PROGRAM_NV:
9993+ CHECK_EXT1(NV_fragment_program, "GetFloatv");
9994+ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.Enabled);
9995+ break;
9996+ case GL_FRAGMENT_PROGRAM_BINDING_NV:
9997+ CHECK_EXT1(NV_fragment_program, "GetFloatv");
9998+ params[0] = (GLfloat)(ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0);
9999+ break;
10000+ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
10001+ CHECK_EXT1(NV_fragment_program, "GetFloatv");
10002+ params[0] = (GLfloat)(MAX_NV_FRAGMENT_PROGRAM_PARAMS);
10003+ break;
10004+ case GL_TEXTURE_RECTANGLE_NV:
10005+ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
10006+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV));
10007+ break;
10008+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
10009+ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
10010+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name);
10011+ break;
10012+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
10013+ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
10014+ params[0] = (GLfloat)(ctx->Const.MaxTextureRectSize);
10015+ break;
10016+ case GL_STENCIL_TEST_TWO_SIDE_EXT:
10017+ CHECK_EXT1(EXT_stencil_two_side, "GetFloatv");
10018+ params[0] = BOOLEAN_TO_FLOAT(ctx->Stencil.TestTwoSide);
10019+ break;
10020+ case GL_ACTIVE_STENCIL_FACE_EXT:
10021+ CHECK_EXT1(EXT_stencil_two_side, "GetFloatv");
10022+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
10023+ break;
10024+ case GL_MAX_SHININESS_NV:
10025+ CHECK_EXT1(NV_light_max_exponent, "GetFloatv");
10026+ params[0] = ctx->Const.MaxShininess;
10027+ break;
10028+ case GL_MAX_SPOT_EXPONENT_NV:
10029+ CHECK_EXT1(NV_light_max_exponent, "GetFloatv");
10030+ params[0] = ctx->Const.MaxSpotExponent;
10031+ break;
10032+ case GL_ARRAY_BUFFER_BINDING_ARB:
10033+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10034+ params[0] = (GLfloat)(ctx->Array.ArrayBufferObj->Name);
10035+ break;
10036+ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
10037+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10038+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
10039+ break;
10040+ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
10041+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10042+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Normal.BufferObj->Name);
10043+ break;
10044+ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
10045+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10046+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.BufferObj->Name);
10047+ break;
10048+ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
10049+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10050+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Index.BufferObj->Name);
10051+ break;
10052+ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
10053+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10054+ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
10055+ break;
10056+ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
10057+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10058+ params[0] = (GLfloat)(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
10059+ break;
10060+ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
10061+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10062+ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
10063+ break;
10064+ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
10065+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10066+ params[0] = (GLfloat)(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
10067+ break;
10068+ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
10069+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10070+ params[0] = (GLfloat)(ctx->Array.ElementArrayBufferObj->Name);
10071+ break;
10072+ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
10073+ CHECK_EXT1(EXT_pixel_buffer_object, "GetFloatv");
10074+ params[0] = (GLfloat)(ctx->Pack.BufferObj->Name);
10075+ break;
10076+ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
10077+ CHECK_EXT1(EXT_pixel_buffer_object, "GetFloatv");
10078+ params[0] = (GLfloat)(ctx->Unpack.BufferObj->Name);
10079+ break;
10080+ case GL_VERTEX_PROGRAM_ARB:
10081+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
10082+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.Enabled);
10083+ break;
10084+ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
10085+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
10086+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.PointSizeEnabled);
10087+ break;
10088+ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
10089+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
10090+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.TwoSideEnabled);
10091+ break;
10092+ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
10093+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
10094+ params[0] = (GLfloat)(ctx->Const.MaxProgramMatrixStackDepth);
10095+ break;
10096+ case GL_MAX_PROGRAM_MATRICES_ARB:
10097+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
10098+ params[0] = (GLfloat)(ctx->Const.MaxProgramMatrices);
10099+ break;
10100+ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
10101+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
10102+ params[0] = BOOLEAN_TO_FLOAT(ctx->CurrentStack->Depth + 1);
10103+ break;
10104+ case GL_CURRENT_MATRIX_ARB:
10105+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetFloatv");
10106+ {
10107+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
10108+ params[0] = matrix[0];
10109+ params[1] = matrix[1];
10110+ params[2] = matrix[2];
10111+ params[3] = matrix[3];
10112+ params[4] = matrix[4];
10113+ params[5] = matrix[5];
10114+ params[6] = matrix[6];
10115+ params[7] = matrix[7];
10116+ params[8] = matrix[8];
10117+ params[9] = matrix[9];
10118+ params[10] = matrix[10];
10119+ params[11] = matrix[11];
10120+ params[12] = matrix[12];
10121+ params[13] = matrix[13];
10122+ params[14] = matrix[14];
10123+ params[15] = matrix[15];
10124+ }
10125+ break;
10126+ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
10127+ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetFloatv");
10128+ {
10129+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
10130+ params[0] = matrix[0];
10131+ params[1] = matrix[4];
10132+ params[2] = matrix[8];
10133+ params[3] = matrix[12];
10134+ params[4] = matrix[1];
10135+ params[5] = matrix[5];
10136+ params[6] = matrix[9];
10137+ params[7] = matrix[13];
10138+ params[8] = matrix[2];
10139+ params[9] = matrix[6];
10140+ params[10] = matrix[10];
10141+ params[11] = matrix[14];
10142+ params[12] = matrix[3];
10143+ params[13] = matrix[7];
10144+ params[14] = matrix[11];
10145+ params[15] = matrix[15];
10146+ }
10147+ break;
10148+ case GL_MAX_VERTEX_ATTRIBS_ARB:
10149+ CHECK_EXT1(ARB_vertex_program, "GetFloatv");
10150+ params[0] = (GLfloat)(ctx->Const.VertexProgram.MaxAttribs);
10151+ break;
10152+ case GL_PROGRAM_ERROR_POSITION_ARB:
10153+ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetFloatv");
10154+ params[0] = (GLfloat)(ctx->Program.ErrorPos);
10155+ break;
10156+ case GL_FRAGMENT_PROGRAM_ARB:
10157+ CHECK_EXT1(ARB_fragment_program, "GetFloatv");
10158+ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.Enabled);
10159+ break;
10160+ case GL_MAX_TEXTURE_COORDS_ARB:
10161+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetFloatv");
10162+ params[0] = (GLfloat)(ctx->Const.MaxTextureCoordUnits);
10163+ break;
10164+ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
10165+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetFloatv");
10166+ params[0] = (GLfloat)(ctx->Const.MaxTextureImageUnits);
10167+ break;
10168+ case GL_DEPTH_BOUNDS_TEST_EXT:
10169+ CHECK_EXT1(EXT_depth_bounds_test, "GetFloatv");
10170+ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.BoundsTest);
10171+ break;
10172+ case GL_DEPTH_BOUNDS_EXT:
10173+ CHECK_EXT1(EXT_depth_bounds_test, "GetFloatv");
10174+ params[0] = ctx->Depth.BoundsMin;
10175+ params[1] = ctx->Depth.BoundsMax;
10176+ break;
10177+ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
10178+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10179+ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.CallbackEnabled);
10180+ break;
10181+ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
10182+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10183+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.CallbackEnabled);
10184+ break;
10185+ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
10186+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10187+ params[0] = (GLfloat)(ctx->FragmentProgram.CurrentPosition);
10188+ break;
10189+ case GL_VERTEX_PROGRAM_POSITION_MESA:
10190+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10191+ params[0] = (GLfloat)(ctx->VertexProgram.CurrentPosition);
10192+ break;
10193+ case GL_MAX_DRAW_BUFFERS_ARB:
10194+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10195+ params[0] = (GLfloat)(ctx->Const.MaxDrawBuffers);
10196+ break;
10197+ case GL_DRAW_BUFFER0_ARB:
10198+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10199+ params[0] = ENUM_TO_FLOAT(ctx->DrawBuffer->ColorDrawBuffer[0]);
10200+ break;
10201+ case GL_DRAW_BUFFER1_ARB:
10202+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10203+ {
10204+ GLenum buffer;
10205+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
10206+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
10207+ return;
10208+ }
10209+ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
10210+ params[0] = ENUM_TO_FLOAT(buffer);
10211+ }
10212+ break;
10213+ case GL_DRAW_BUFFER2_ARB:
10214+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10215+ {
10216+ GLenum buffer;
10217+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
10218+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
10219+ return;
10220+ }
10221+ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
10222+ params[0] = ENUM_TO_FLOAT(buffer);
10223+ }
10224+ break;
10225+ case GL_DRAW_BUFFER3_ARB:
10226+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10227+ {
10228+ GLenum buffer;
10229+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
10230+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
10231+ return;
10232+ }
10233+ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
10234+ params[0] = ENUM_TO_FLOAT(buffer);
10235+ }
10236+ break;
10237+ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
10238+ CHECK_EXT1(OES_read_format, "GetFloatv");
10239+ params[0] = (GLfloat)(ctx->Const.ColorReadType);
10240+ break;
10241+ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
10242+ CHECK_EXT1(OES_read_format, "GetFloatv");
10243+ params[0] = (GLfloat)(ctx->Const.ColorReadFormat);
10244+ break;
10245+ case GL_NUM_FRAGMENT_REGISTERS_ATI:
10246+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10247+ params[0] = (GLfloat)(6);
10248+ break;
10249+ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
10250+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10251+ params[0] = (GLfloat)(8);
10252+ break;
10253+ case GL_NUM_PASSES_ATI:
10254+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10255+ params[0] = (GLfloat)(2);
10256+ break;
10257+ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
10258+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10259+ params[0] = (GLfloat)(8);
10260+ break;
10261+ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
10262+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10263+ params[0] = (GLfloat)(16);
10264+ break;
10265+ case GL_COLOR_ALPHA_PAIRING_ATI:
10266+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10267+ params[0] = BOOLEAN_TO_FLOAT(GL_TRUE);
10268+ break;
10269+ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
10270+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10271+ params[0] = (GLfloat)(3);
10272+ break;
10273+ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
10274+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10275+ params[0] = (GLfloat)(3);
10276+ break;
10277+ case GL_STENCIL_BACK_FUNC:
10278+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.Function[1]);
10279+ break;
10280+ case GL_STENCIL_BACK_VALUE_MASK:
10281+ params[0] = (GLfloat)(ctx->Stencil.ValueMask[1]);
10282+ break;
10283+ case GL_STENCIL_BACK_REF:
10284+ params[0] = (GLfloat)(ctx->Stencil.Ref[1]);
10285+ break;
10286+ case GL_STENCIL_BACK_FAIL:
10287+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.FailFunc[1]);
10288+ break;
10289+ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
10290+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZFailFunc[1]);
10291+ break;
10292+ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
10293+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZPassFunc[1]);
10294+ break;
10295+ case GL_FRAMEBUFFER_BINDING_EXT:
10296+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10297+ params[0] = (GLfloat)(ctx->DrawBuffer->Name);
10298+ break;
10299+ case GL_RENDERBUFFER_BINDING_EXT:
10300+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10301+ params[0] = (GLfloat)(ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0);
10302+ break;
10303+ case GL_MAX_COLOR_ATTACHMENTS_EXT:
10304+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10305+ params[0] = (GLfloat)(ctx->Const.MaxColorAttachments);
10306+ break;
10307+ case GL_MAX_RENDERBUFFER_SIZE_EXT:
10308+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10309+ params[0] = (GLfloat)(ctx->Const.MaxRenderbufferSize);
10310+ break;
10311+ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
10312+ CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
10313+ params[0] = (GLfloat)(MAX_FRAGMENT_UNIFORM_COMPONENTS);
10314+ break;
10315+ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
10316+ CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
10317+ params[0] = ENUM_TO_FLOAT(ctx->Hint.FragmentShaderDerivative);
10318+ break;
10319+ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
10320+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10321+ params[0] = (GLfloat)(MAX_VERTEX_UNIFORM_COMPONENTS);
10322+ break;
10323+ case GL_MAX_VARYING_FLOATS_ARB:
10324+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10325+ params[0] = (GLfloat)(MAX_VARYING_FLOATS);
10326+ break;
10327+ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
10328+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10329+ params[0] = (GLfloat)(MAX_VERTEX_TEXTURE_IMAGE_UNITS);
10330+ break;
10331+ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
10332+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10333+ params[0] = (GLfloat)(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
10334+ break;
10335+ default:
10336+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv(pname=0x%x)", pname);
10337+ }
10338+}
10339+
10340+void GLAPIENTRY
10341+_mesa_GetIntegerv( GLenum pname, GLint *params )
10342+{
10343+ GET_CURRENT_CONTEXT(ctx);
10344+ ASSERT_OUTSIDE_BEGIN_END(ctx);
10345+
10346+ if (!params)
10347+ return;
10348+
10349+ if (ctx->NewState)
10350+ _mesa_update_state(ctx);
10351+
10352+ if (ctx->Driver.GetIntegerv &&
10353+ ctx->Driver.GetIntegerv(ctx, pname, params))
10354+ return;
10355+
10356+ switch (pname) {
10357+ case GL_ACCUM_RED_BITS:
10358+ params[0] = ctx->DrawBuffer->Visual.accumRedBits;
10359+ break;
10360+ case GL_ACCUM_GREEN_BITS:
10361+ params[0] = ctx->DrawBuffer->Visual.accumGreenBits;
10362+ break;
10363+ case GL_ACCUM_BLUE_BITS:
10364+ params[0] = ctx->DrawBuffer->Visual.accumBlueBits;
10365+ break;
10366+ case GL_ACCUM_ALPHA_BITS:
10367+ params[0] = ctx->DrawBuffer->Visual.accumAlphaBits;
10368+ break;
10369+ case GL_ACCUM_CLEAR_VALUE:
10370+ params[0] = FLOAT_TO_INT(ctx->Accum.ClearColor[0]);
10371+ params[1] = FLOAT_TO_INT(ctx->Accum.ClearColor[1]);
10372+ params[2] = FLOAT_TO_INT(ctx->Accum.ClearColor[2]);
10373+ params[3] = FLOAT_TO_INT(ctx->Accum.ClearColor[3]);
10374+ break;
10375+ case GL_ALPHA_BIAS:
10376+ params[0] = IROUND(ctx->Pixel.AlphaBias);
10377+ break;
10378+ case GL_ALPHA_BITS:
10379+ params[0] = ctx->DrawBuffer->Visual.alphaBits;
10380+ break;
10381+ case GL_ALPHA_SCALE:
10382+ params[0] = IROUND(ctx->Pixel.AlphaScale);
10383+ break;
10384+ case GL_ALPHA_TEST:
10385+ params[0] = BOOLEAN_TO_INT(ctx->Color.AlphaEnabled);
10386+ break;
10387+ case GL_ALPHA_TEST_FUNC:
10388+ params[0] = ENUM_TO_INT(ctx->Color.AlphaFunc);
10389+ break;
10390+ case GL_ALPHA_TEST_REF:
10391+ params[0] = FLOAT_TO_INT(ctx->Color.AlphaRef);
10392+ break;
10393+ case GL_ATTRIB_STACK_DEPTH:
10394+ params[0] = ctx->AttribStackDepth;
10395+ break;
10396+ case GL_AUTO_NORMAL:
10397+ params[0] = BOOLEAN_TO_INT(ctx->Eval.AutoNormal);
10398+ break;
10399+ case GL_AUX_BUFFERS:
10400+ params[0] = ctx->DrawBuffer->Visual.numAuxBuffers;
10401+ break;
10402+ case GL_BLEND:
10403+ params[0] = BOOLEAN_TO_INT(ctx->Color.BlendEnabled);
10404+ break;
10405+ case GL_BLEND_DST:
10406+ params[0] = ENUM_TO_INT(ctx->Color.BlendDstRGB);
10407+ break;
10408+ case GL_BLEND_SRC:
10409+ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcRGB);
10410+ break;
10411+ case GL_BLEND_SRC_RGB_EXT:
10412+ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcRGB);
10413+ break;
10414+ case GL_BLEND_DST_RGB_EXT:
10415+ params[0] = ENUM_TO_INT(ctx->Color.BlendDstRGB);
10416+ break;
10417+ case GL_BLEND_SRC_ALPHA_EXT:
10418+ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcA);
10419+ break;
10420+ case GL_BLEND_DST_ALPHA_EXT:
10421+ params[0] = ENUM_TO_INT(ctx->Color.BlendDstA);
10422+ break;
10423+ case GL_BLEND_EQUATION:
10424+ params[0] = ENUM_TO_INT(ctx->Color.BlendEquationRGB );
10425+ break;
10426+ case GL_BLEND_EQUATION_ALPHA_EXT:
10427+ params[0] = ENUM_TO_INT(ctx->Color.BlendEquationA );
10428+ break;
10429+ case GL_BLEND_COLOR_EXT:
10430+ params[0] = FLOAT_TO_INT(ctx->Color.BlendColor[0]);
10431+ params[1] = FLOAT_TO_INT(ctx->Color.BlendColor[1]);
10432+ params[2] = FLOAT_TO_INT(ctx->Color.BlendColor[2]);
10433+ params[3] = FLOAT_TO_INT(ctx->Color.BlendColor[3]);
10434+ break;
10435+ case GL_BLUE_BIAS:
10436+ params[0] = IROUND(ctx->Pixel.BlueBias);
10437+ break;
10438+ case GL_BLUE_BITS:
10439+ params[0] = ctx->DrawBuffer->Visual.blueBits;
10440+ break;
10441+ case GL_BLUE_SCALE:
10442+ params[0] = IROUND(ctx->Pixel.BlueScale);
10443+ break;
10444+ case GL_CLIENT_ATTRIB_STACK_DEPTH:
10445+ params[0] = ctx->ClientAttribStackDepth;
10446+ break;
10447+ case GL_CLIP_PLANE0:
10448+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 0) & 1);
10449+ break;
10450+ case GL_CLIP_PLANE1:
10451+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 1) & 1);
10452+ break;
10453+ case GL_CLIP_PLANE2:
10454+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 2) & 1);
10455+ break;
10456+ case GL_CLIP_PLANE3:
10457+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 3) & 1);
10458+ break;
10459+ case GL_CLIP_PLANE4:
10460+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 4) & 1);
10461+ break;
10462+ case GL_CLIP_PLANE5:
10463+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 5) & 1);
10464+ break;
10465+ case GL_COLOR_CLEAR_VALUE:
10466+ params[0] = FLOAT_TO_INT(ctx->Color.ClearColor[0]);
10467+ params[1] = FLOAT_TO_INT(ctx->Color.ClearColor[1]);
10468+ params[2] = FLOAT_TO_INT(ctx->Color.ClearColor[2]);
10469+ params[3] = FLOAT_TO_INT(ctx->Color.ClearColor[3]);
10470+ break;
10471+ case GL_COLOR_MATERIAL:
10472+ params[0] = BOOLEAN_TO_INT(ctx->Light.ColorMaterialEnabled);
10473+ break;
10474+ case GL_COLOR_MATERIAL_FACE:
10475+ params[0] = ENUM_TO_INT(ctx->Light.ColorMaterialFace);
10476+ break;
10477+ case GL_COLOR_MATERIAL_PARAMETER:
10478+ params[0] = ENUM_TO_INT(ctx->Light.ColorMaterialMode);
10479+ break;
10480+ case GL_COLOR_WRITEMASK:
10481+ params[0] = ctx->Color.ColorMask[RCOMP] ? 1 : 0;
10482+ params[1] = ctx->Color.ColorMask[GCOMP] ? 1 : 0;
10483+ params[2] = ctx->Color.ColorMask[BCOMP] ? 1 : 0;
10484+ params[3] = ctx->Color.ColorMask[ACOMP] ? 1 : 0;
10485+ break;
10486+ case GL_CULL_FACE:
10487+ params[0] = BOOLEAN_TO_INT(ctx->Polygon.CullFlag);
10488+ break;
10489+ case GL_CULL_FACE_MODE:
10490+ params[0] = ENUM_TO_INT(ctx->Polygon.CullFaceMode);
10491+ break;
10492+ case GL_CURRENT_COLOR:
10493+ {
10494+ FLUSH_CURRENT(ctx, 0);
10495+ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]);
10496+ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]);
10497+ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]);
10498+ params[3] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]);
10499+ }
10500+ break;
10501+ case GL_CURRENT_INDEX:
10502+ {
10503+ FLUSH_CURRENT(ctx, 0);
10504+ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]);
10505+ }
10506+ break;
10507+ case GL_CURRENT_NORMAL:
10508+ {
10509+ FLUSH_CURRENT(ctx, 0);
10510+ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]);
10511+ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]);
10512+ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]);
10513+ }
10514+ break;
10515+ case GL_CURRENT_RASTER_COLOR:
10516+ params[0] = FLOAT_TO_INT(ctx->Current.RasterColor[0]);
10517+ params[1] = FLOAT_TO_INT(ctx->Current.RasterColor[1]);
10518+ params[2] = FLOAT_TO_INT(ctx->Current.RasterColor[2]);
10519+ params[3] = FLOAT_TO_INT(ctx->Current.RasterColor[3]);
10520+ break;
10521+ case GL_CURRENT_RASTER_DISTANCE:
10522+ params[0] = IROUND(ctx->Current.RasterDistance);
10523+ break;
10524+ case GL_CURRENT_RASTER_INDEX:
10525+ params[0] = IROUND(ctx->Current.RasterIndex);
10526+ break;
10527+ case GL_CURRENT_RASTER_POSITION:
10528+ params[0] = IROUND(ctx->Current.RasterPos[0]);
10529+ params[1] = IROUND(ctx->Current.RasterPos[1]);
10530+ params[2] = IROUND(ctx->Current.RasterPos[2]);
10531+ params[3] = IROUND(ctx->Current.RasterPos[3]);
10532+ break;
10533+ case GL_CURRENT_RASTER_SECONDARY_COLOR:
10534+ params[0] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[0]);
10535+ params[1] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[1]);
10536+ params[2] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[2]);
10537+ params[3] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[3]);
10538+ break;
10539+ case GL_CURRENT_RASTER_TEXTURE_COORDS:
10540+ {
10541+ const GLuint texUnit = ctx->Texture.CurrentUnit;
10542+ params[0] = IROUND(ctx->Current.RasterTexCoords[texUnit][0]);
10543+ params[1] = IROUND(ctx->Current.RasterTexCoords[texUnit][1]);
10544+ params[2] = IROUND(ctx->Current.RasterTexCoords[texUnit][2]);
10545+ params[3] = IROUND(ctx->Current.RasterTexCoords[texUnit][3]);
10546+ }
10547+ break;
10548+ case GL_CURRENT_RASTER_POSITION_VALID:
10549+ params[0] = BOOLEAN_TO_INT(ctx->Current.RasterPosValid);
10550+ break;
10551+ case GL_CURRENT_TEXTURE_COORDS:
10552+ {
10553+ const GLuint texUnit = ctx->Texture.CurrentUnit;
10554+ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]);
10555+ params[1] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]);
10556+ params[2] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]);
10557+ params[3] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]);
10558+ }
10559+ break;
10560+ case GL_DEPTH_BIAS:
10561+ params[0] = IROUND(ctx->Pixel.DepthBias);
10562+ break;
10563+ case GL_DEPTH_BITS:
10564+ params[0] = ctx->DrawBuffer->Visual.depthBits;
10565+ break;
10566+ case GL_DEPTH_CLEAR_VALUE:
10567+ params[0] = IROUND(ctx->Depth.Clear);
10568+ break;
10569+ case GL_DEPTH_FUNC:
10570+ params[0] = ENUM_TO_INT(ctx->Depth.Func);
10571+ break;
10572+ case GL_DEPTH_RANGE:
10573+ params[0] = FLOAT_TO_INT(ctx->Viewport.Near);
10574+ params[1] = FLOAT_TO_INT(ctx->Viewport.Far);
10575+ break;
10576+ case GL_DEPTH_SCALE:
10577+ params[0] = IROUND(ctx->Pixel.DepthScale);
10578+ break;
10579+ case GL_DEPTH_TEST:
10580+ params[0] = BOOLEAN_TO_INT(ctx->Depth.Test);
10581+ break;
10582+ case GL_DEPTH_WRITEMASK:
10583+ params[0] = BOOLEAN_TO_INT(ctx->Depth.Mask);
10584+ break;
10585+ case GL_DITHER:
10586+ params[0] = BOOLEAN_TO_INT(ctx->Color.DitherFlag);
10587+ break;
10588+ case GL_DOUBLEBUFFER:
10589+ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.doubleBufferMode);
10590+ break;
10591+ case GL_DRAW_BUFFER:
10592+ params[0] = ENUM_TO_INT(ctx->DrawBuffer->ColorDrawBuffer[0]);
10593+ break;
10594+ case GL_EDGE_FLAG:
10595+ {
10596+ FLUSH_CURRENT(ctx, 0);
10597+ params[0] = BOOLEAN_TO_INT(ctx->Current.EdgeFlag);
10598+ }
10599+ break;
10600+ case GL_FEEDBACK_BUFFER_SIZE:
10601+ params[0] = ctx->Feedback.BufferSize;
10602+ break;
10603+ case GL_FEEDBACK_BUFFER_TYPE:
10604+ params[0] = ENUM_TO_INT(ctx->Feedback.Type);
10605+ break;
10606+ case GL_FOG:
10607+ params[0] = BOOLEAN_TO_INT(ctx->Fog.Enabled);
10608+ break;
10609+ case GL_FOG_COLOR:
10610+ params[0] = FLOAT_TO_INT(ctx->Fog.Color[0]);
10611+ params[1] = FLOAT_TO_INT(ctx->Fog.Color[1]);
10612+ params[2] = FLOAT_TO_INT(ctx->Fog.Color[2]);
10613+ params[3] = FLOAT_TO_INT(ctx->Fog.Color[3]);
10614+ break;
10615+ case GL_FOG_DENSITY:
10616+ params[0] = IROUND(ctx->Fog.Density);
10617+ break;
10618+ case GL_FOG_END:
10619+ params[0] = IROUND(ctx->Fog.End);
10620+ break;
10621+ case GL_FOG_HINT:
10622+ params[0] = ENUM_TO_INT(ctx->Hint.Fog);
10623+ break;
10624+ case GL_FOG_INDEX:
10625+ params[0] = IROUND(ctx->Fog.Index);
10626+ break;
10627+ case GL_FOG_MODE:
10628+ params[0] = ENUM_TO_INT(ctx->Fog.Mode);
10629+ break;
10630+ case GL_FOG_START:
10631+ params[0] = IROUND(ctx->Fog.Start);
10632+ break;
10633+ case GL_FRONT_FACE:
10634+ params[0] = ENUM_TO_INT(ctx->Polygon.FrontFace);
10635+ break;
10636+ case GL_GREEN_BIAS:
10637+ params[0] = IROUND(ctx->Pixel.GreenBias);
10638+ break;
10639+ case GL_GREEN_BITS:
10640+ params[0] = ctx->DrawBuffer->Visual.greenBits;
10641+ break;
10642+ case GL_GREEN_SCALE:
10643+ params[0] = IROUND(ctx->Pixel.GreenScale);
10644+ break;
10645+ case GL_INDEX_BITS:
10646+ params[0] = ctx->DrawBuffer->Visual.indexBits;
10647+ break;
10648+ case GL_INDEX_CLEAR_VALUE:
10649+ params[0] = ctx->Color.ClearIndex;
10650+ break;
10651+ case GL_INDEX_MODE:
10652+ params[0] = BOOLEAN_TO_INT(!ctx->DrawBuffer->Visual.rgbMode);
10653+ break;
10654+ case GL_INDEX_OFFSET:
10655+ params[0] = ctx->Pixel.IndexOffset;
10656+ break;
10657+ case GL_INDEX_SHIFT:
10658+ params[0] = ctx->Pixel.IndexShift;
10659+ break;
10660+ case GL_INDEX_WRITEMASK:
10661+ params[0] = ctx->Color.IndexMask;
10662+ break;
10663+ case GL_LIGHT0:
10664+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[0].Enabled);
10665+ break;
10666+ case GL_LIGHT1:
10667+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[1].Enabled);
10668+ break;
10669+ case GL_LIGHT2:
10670+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[2].Enabled);
10671+ break;
10672+ case GL_LIGHT3:
10673+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[3].Enabled);
10674+ break;
10675+ case GL_LIGHT4:
10676+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[4].Enabled);
10677+ break;
10678+ case GL_LIGHT5:
10679+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[5].Enabled);
10680+ break;
10681+ case GL_LIGHT6:
10682+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[6].Enabled);
10683+ break;
10684+ case GL_LIGHT7:
10685+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[7].Enabled);
10686+ break;
10687+ case GL_LIGHTING:
10688+ params[0] = BOOLEAN_TO_INT(ctx->Light.Enabled);
10689+ break;
10690+ case GL_LIGHT_MODEL_AMBIENT:
10691+ params[0] = FLOAT_TO_INT(ctx->Light.Model.Ambient[0]);
10692+ params[1] = FLOAT_TO_INT(ctx->Light.Model.Ambient[1]);
10693+ params[2] = FLOAT_TO_INT(ctx->Light.Model.Ambient[2]);
10694+ params[3] = FLOAT_TO_INT(ctx->Light.Model.Ambient[3]);
10695+ break;
10696+ case GL_LIGHT_MODEL_COLOR_CONTROL:
10697+ params[0] = ENUM_TO_INT(ctx->Light.Model.ColorControl);
10698+ break;
10699+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
10700+ params[0] = BOOLEAN_TO_INT(ctx->Light.Model.LocalViewer);
10701+ break;
10702+ case GL_LIGHT_MODEL_TWO_SIDE:
10703+ params[0] = BOOLEAN_TO_INT(ctx->Light.Model.TwoSide);
10704+ break;
10705+ case GL_LINE_SMOOTH:
10706+ params[0] = BOOLEAN_TO_INT(ctx->Line.SmoothFlag);
10707+ break;
10708+ case GL_LINE_SMOOTH_HINT:
10709+ params[0] = ENUM_TO_INT(ctx->Hint.LineSmooth);
10710+ break;
10711+ case GL_LINE_STIPPLE:
10712+ params[0] = BOOLEAN_TO_INT(ctx->Line.StippleFlag);
10713+ break;
10714+ case GL_LINE_STIPPLE_PATTERN:
10715+ params[0] = ctx->Line.StipplePattern;
10716+ break;
10717+ case GL_LINE_STIPPLE_REPEAT:
10718+ params[0] = ctx->Line.StippleFactor;
10719+ break;
10720+ case GL_LINE_WIDTH:
10721+ params[0] = IROUND(ctx->Line.Width);
10722+ break;
10723+ case GL_LINE_WIDTH_GRANULARITY:
10724+ params[0] = IROUND(ctx->Const.LineWidthGranularity);
10725+ break;
10726+ case GL_LINE_WIDTH_RANGE:
10727+ params[0] = IROUND(ctx->Const.MinLineWidthAA);
10728+ params[1] = IROUND(ctx->Const.MaxLineWidthAA);
10729+ break;
10730+ case GL_ALIASED_LINE_WIDTH_RANGE:
10731+ params[0] = IROUND(ctx->Const.MinLineWidth);
10732+ params[1] = IROUND(ctx->Const.MaxLineWidth);
10733+ break;
10734+ case GL_LIST_BASE:
10735+ params[0] = ctx->List.ListBase;
10736+ break;
10737+ case GL_LIST_INDEX:
10738+ params[0] = ctx->ListState.CurrentListNum;
10739+ break;
10740+ case GL_LIST_MODE:
10741+ {
10742+ GLenum mode;
10743+ if (!ctx->CompileFlag)
10744+ mode = 0;
10745+ else if (ctx->ExecuteFlag)
10746+ mode = GL_COMPILE_AND_EXECUTE;
10747+ else
10748+ mode = GL_COMPILE;
10749+ params[0] = ENUM_TO_INT(mode);
10750+ }
10751+ break;
10752+ case GL_INDEX_LOGIC_OP:
10753+ params[0] = BOOLEAN_TO_INT(ctx->Color.IndexLogicOpEnabled);
10754+ break;
10755+ case GL_COLOR_LOGIC_OP:
10756+ params[0] = BOOLEAN_TO_INT(ctx->Color.ColorLogicOpEnabled);
10757+ break;
10758+ case GL_LOGIC_OP_MODE:
10759+ params[0] = ENUM_TO_INT(ctx->Color.LogicOp);
10760+ break;
10761+ case GL_MAP1_COLOR_4:
10762+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Color4);
10763+ break;
10764+ case GL_MAP1_GRID_DOMAIN:
10765+ params[0] = IROUND(ctx->Eval.MapGrid1u1);
10766+ params[1] = IROUND(ctx->Eval.MapGrid1u2);
10767+ break;
10768+ case GL_MAP1_GRID_SEGMENTS:
10769+ params[0] = ctx->Eval.MapGrid1un;
10770+ break;
10771+ case GL_MAP1_INDEX:
10772+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Index);
10773+ break;
10774+ case GL_MAP1_NORMAL:
10775+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Normal);
10776+ break;
10777+ case GL_MAP1_TEXTURE_COORD_1:
10778+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord1);
10779+ break;
10780+ case GL_MAP1_TEXTURE_COORD_2:
10781+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord2);
10782+ break;
10783+ case GL_MAP1_TEXTURE_COORD_3:
10784+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord3);
10785+ break;
10786+ case GL_MAP1_TEXTURE_COORD_4:
10787+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord4);
10788+ break;
10789+ case GL_MAP1_VERTEX_3:
10790+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Vertex3);
10791+ break;
10792+ case GL_MAP1_VERTEX_4:
10793+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Vertex4);
10794+ break;
10795+ case GL_MAP2_COLOR_4:
10796+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Color4);
10797+ break;
10798+ case GL_MAP2_GRID_DOMAIN:
10799+ params[0] = IROUND(ctx->Eval.MapGrid2u1);
10800+ params[1] = IROUND(ctx->Eval.MapGrid2u2);
10801+ params[2] = IROUND(ctx->Eval.MapGrid2v1);
10802+ params[3] = IROUND(ctx->Eval.MapGrid2v2);
10803+ break;
10804+ case GL_MAP2_GRID_SEGMENTS:
10805+ params[0] = ctx->Eval.MapGrid2un;
10806+ params[1] = ctx->Eval.MapGrid2vn;
10807+ break;
10808+ case GL_MAP2_INDEX:
10809+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Index);
10810+ break;
10811+ case GL_MAP2_NORMAL:
10812+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Normal);
10813+ break;
10814+ case GL_MAP2_TEXTURE_COORD_1:
10815+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord1);
10816+ break;
10817+ case GL_MAP2_TEXTURE_COORD_2:
10818+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord2);
10819+ break;
10820+ case GL_MAP2_TEXTURE_COORD_3:
10821+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord3);
10822+ break;
10823+ case GL_MAP2_TEXTURE_COORD_4:
10824+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord4);
10825+ break;
10826+ case GL_MAP2_VERTEX_3:
10827+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Vertex3);
10828+ break;
10829+ case GL_MAP2_VERTEX_4:
10830+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Vertex4);
10831+ break;
10832+ case GL_MAP_COLOR:
10833+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MapColorFlag);
10834+ break;
10835+ case GL_MAP_STENCIL:
10836+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MapStencilFlag);
10837+ break;
10838+ case GL_MATRIX_MODE:
10839+ params[0] = ENUM_TO_INT(ctx->Transform.MatrixMode);
10840+ break;
10841+ case GL_MAX_ATTRIB_STACK_DEPTH:
10842+ params[0] = MAX_ATTRIB_STACK_DEPTH;
10843+ break;
10844+ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
10845+ params[0] = MAX_CLIENT_ATTRIB_STACK_DEPTH;
10846+ break;
10847+ case GL_MAX_CLIP_PLANES:
10848+ params[0] = ctx->Const.MaxClipPlanes;
10849+ break;
10850+ case GL_MAX_ELEMENTS_VERTICES:
10851+ params[0] = ctx->Const.MaxArrayLockSize;
10852+ break;
10853+ case GL_MAX_ELEMENTS_INDICES:
10854+ params[0] = ctx->Const.MaxArrayLockSize;
10855+ break;
10856+ case GL_MAX_EVAL_ORDER:
10857+ params[0] = MAX_EVAL_ORDER;
10858+ break;
10859+ case GL_MAX_LIGHTS:
10860+ params[0] = ctx->Const.MaxLights;
10861+ break;
10862+ case GL_MAX_LIST_NESTING:
10863+ params[0] = MAX_LIST_NESTING;
10864+ break;
10865+ case GL_MAX_MODELVIEW_STACK_DEPTH:
10866+ params[0] = MAX_MODELVIEW_STACK_DEPTH;
10867+ break;
10868+ case GL_MAX_NAME_STACK_DEPTH:
10869+ params[0] = MAX_NAME_STACK_DEPTH;
10870+ break;
10871+ case GL_MAX_PIXEL_MAP_TABLE:
10872+ params[0] = MAX_PIXEL_MAP_TABLE;
10873+ break;
10874+ case GL_MAX_PROJECTION_STACK_DEPTH:
10875+ params[0] = MAX_PROJECTION_STACK_DEPTH;
10876+ break;
10877+ case GL_MAX_TEXTURE_SIZE:
10878+ params[0] = 1 << (ctx->Const.MaxTextureLevels - 1);
10879+ break;
10880+ case GL_MAX_3D_TEXTURE_SIZE:
10881+ params[0] = 1 << (ctx->Const.Max3DTextureLevels - 1);
10882+ break;
10883+ case GL_MAX_TEXTURE_STACK_DEPTH:
10884+ params[0] = MAX_TEXTURE_STACK_DEPTH;
10885+ break;
10886+ case GL_MAX_VIEWPORT_DIMS:
10887+ params[0] = ctx->Const.MaxViewportWidth;
10888+ params[1] = ctx->Const.MaxViewportHeight;
10889+ break;
10890+ case GL_MODELVIEW_MATRIX:
10891+ {
10892+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
10893+ params[0] = IROUND(matrix[0]);
10894+ params[1] = IROUND(matrix[1]);
10895+ params[2] = IROUND(matrix[2]);
10896+ params[3] = IROUND(matrix[3]);
10897+ params[4] = IROUND(matrix[4]);
10898+ params[5] = IROUND(matrix[5]);
10899+ params[6] = IROUND(matrix[6]);
10900+ params[7] = IROUND(matrix[7]);
10901+ params[8] = IROUND(matrix[8]);
10902+ params[9] = IROUND(matrix[9]);
10903+ params[10] = IROUND(matrix[10]);
10904+ params[11] = IROUND(matrix[11]);
10905+ params[12] = IROUND(matrix[12]);
10906+ params[13] = IROUND(matrix[13]);
10907+ params[14] = IROUND(matrix[14]);
10908+ params[15] = IROUND(matrix[15]);
10909+ }
10910+ break;
10911+ case GL_MODELVIEW_STACK_DEPTH:
10912+ params[0] = ctx->ModelviewMatrixStack.Depth + 1;
10913+ break;
10914+ case GL_NAME_STACK_DEPTH:
10915+ params[0] = ctx->Select.NameStackDepth;
10916+ break;
10917+ case GL_NORMALIZE:
10918+ params[0] = BOOLEAN_TO_INT(ctx->Transform.Normalize);
10919+ break;
10920+ case GL_PACK_ALIGNMENT:
10921+ params[0] = ctx->Pack.Alignment;
10922+ break;
10923+ case GL_PACK_LSB_FIRST:
10924+ params[0] = BOOLEAN_TO_INT(ctx->Pack.LsbFirst);
10925+ break;
10926+ case GL_PACK_ROW_LENGTH:
10927+ params[0] = ctx->Pack.RowLength;
10928+ break;
10929+ case GL_PACK_SKIP_PIXELS:
10930+ params[0] = ctx->Pack.SkipPixels;
10931+ break;
10932+ case GL_PACK_SKIP_ROWS:
10933+ params[0] = ctx->Pack.SkipRows;
10934+ break;
10935+ case GL_PACK_SWAP_BYTES:
10936+ params[0] = BOOLEAN_TO_INT(ctx->Pack.SwapBytes);
10937+ break;
10938+ case GL_PACK_SKIP_IMAGES_EXT:
10939+ params[0] = ctx->Pack.SkipImages;
10940+ break;
10941+ case GL_PACK_IMAGE_HEIGHT_EXT:
10942+ params[0] = ctx->Pack.ImageHeight;
10943+ break;
10944+ case GL_PACK_INVERT_MESA:
10945+ params[0] = BOOLEAN_TO_INT(ctx->Pack.Invert);
10946+ break;
10947+ case GL_PERSPECTIVE_CORRECTION_HINT:
10948+ params[0] = ENUM_TO_INT(ctx->Hint.PerspectiveCorrection);
10949+ break;
10950+ case GL_PIXEL_MAP_A_TO_A_SIZE:
10951+ params[0] = ctx->Pixel.MapAtoAsize;
10952+ break;
10953+ case GL_PIXEL_MAP_B_TO_B_SIZE:
10954+ params[0] = ctx->Pixel.MapBtoBsize;
10955+ break;
10956+ case GL_PIXEL_MAP_G_TO_G_SIZE:
10957+ params[0] = ctx->Pixel.MapGtoGsize;
10958+ break;
10959+ case GL_PIXEL_MAP_I_TO_A_SIZE:
10960+ params[0] = ctx->Pixel.MapItoAsize;
10961+ break;
10962+ case GL_PIXEL_MAP_I_TO_B_SIZE:
10963+ params[0] = ctx->Pixel.MapItoBsize;
10964+ break;
10965+ case GL_PIXEL_MAP_I_TO_G_SIZE:
10966+ params[0] = ctx->Pixel.MapItoGsize;
10967+ break;
10968+ case GL_PIXEL_MAP_I_TO_I_SIZE:
10969+ params[0] = ctx->Pixel.MapItoIsize;
10970+ break;
10971+ case GL_PIXEL_MAP_I_TO_R_SIZE:
10972+ params[0] = ctx->Pixel.MapItoRsize;
10973+ break;
10974+ case GL_PIXEL_MAP_R_TO_R_SIZE:
10975+ params[0] = ctx->Pixel.MapRtoRsize;
10976+ break;
10977+ case GL_PIXEL_MAP_S_TO_S_SIZE:
10978+ params[0] = ctx->Pixel.MapStoSsize;
10979+ break;
10980+ case GL_POINT_SIZE:
10981+ params[0] = IROUND(ctx->Point.Size);
10982+ break;
10983+ case GL_POINT_SIZE_GRANULARITY:
10984+ params[0] = IROUND(ctx->Const.PointSizeGranularity);
10985+ break;
10986+ case GL_POINT_SIZE_RANGE:
10987+ params[0] = IROUND(ctx->Const.MinPointSizeAA);
10988+ params[1] = IROUND(ctx->Const.MaxPointSizeAA);
10989+ break;
10990+ case GL_ALIASED_POINT_SIZE_RANGE:
10991+ params[0] = IROUND(ctx->Const.MinPointSize);
10992+ params[1] = IROUND(ctx->Const.MaxPointSize);
10993+ break;
10994+ case GL_POINT_SMOOTH:
10995+ params[0] = BOOLEAN_TO_INT(ctx->Point.SmoothFlag);
10996+ break;
10997+ case GL_POINT_SMOOTH_HINT:
10998+ params[0] = ENUM_TO_INT(ctx->Hint.PointSmooth);
10999+ break;
11000+ case GL_POINT_SIZE_MIN_EXT:
11001+ params[0] = IROUND(ctx->Point.MinSize);
11002+ break;
11003+ case GL_POINT_SIZE_MAX_EXT:
11004+ params[0] = IROUND(ctx->Point.MaxSize);
11005+ break;
11006+ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
11007+ params[0] = IROUND(ctx->Point.Threshold);
11008+ break;
11009+ case GL_DISTANCE_ATTENUATION_EXT:
11010+ params[0] = IROUND(ctx->Point.Params[0]);
11011+ params[1] = IROUND(ctx->Point.Params[1]);
11012+ params[2] = IROUND(ctx->Point.Params[2]);
11013+ break;
11014+ case GL_POLYGON_MODE:
11015+ params[0] = ENUM_TO_INT(ctx->Polygon.FrontMode);
11016+ params[1] = ENUM_TO_INT(ctx->Polygon.BackMode);
11017+ break;
11018+ case GL_POLYGON_OFFSET_BIAS_EXT:
11019+ params[0] = IROUND(ctx->Polygon.OffsetUnits);
11020+ break;
11021+ case GL_POLYGON_OFFSET_FACTOR:
11022+ params[0] = IROUND(ctx->Polygon.OffsetFactor );
11023+ break;
11024+ case GL_POLYGON_OFFSET_UNITS:
11025+ params[0] = IROUND(ctx->Polygon.OffsetUnits );
11026+ break;
11027+ case GL_POLYGON_SMOOTH:
11028+ params[0] = BOOLEAN_TO_INT(ctx->Polygon.SmoothFlag);
11029+ break;
11030+ case GL_POLYGON_SMOOTH_HINT:
11031+ params[0] = ENUM_TO_INT(ctx->Hint.PolygonSmooth);
11032+ break;
11033+ case GL_POLYGON_STIPPLE:
11034+ params[0] = BOOLEAN_TO_INT(ctx->Polygon.StippleFlag);
11035+ break;
11036+ case GL_PROJECTION_MATRIX:
11037+ {
11038+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
11039+ params[0] = IROUND(matrix[0]);
11040+ params[1] = IROUND(matrix[1]);
11041+ params[2] = IROUND(matrix[2]);
11042+ params[3] = IROUND(matrix[3]);
11043+ params[4] = IROUND(matrix[4]);
11044+ params[5] = IROUND(matrix[5]);
11045+ params[6] = IROUND(matrix[6]);
11046+ params[7] = IROUND(matrix[7]);
11047+ params[8] = IROUND(matrix[8]);
11048+ params[9] = IROUND(matrix[9]);
11049+ params[10] = IROUND(matrix[10]);
11050+ params[11] = IROUND(matrix[11]);
11051+ params[12] = IROUND(matrix[12]);
11052+ params[13] = IROUND(matrix[13]);
11053+ params[14] = IROUND(matrix[14]);
11054+ params[15] = IROUND(matrix[15]);
11055+ }
11056+ break;
11057+ case GL_PROJECTION_STACK_DEPTH:
11058+ params[0] = ctx->ProjectionMatrixStack.Depth + 1;
11059+ break;
11060+ case GL_READ_BUFFER:
11061+ params[0] = ENUM_TO_INT(ctx->ReadBuffer->ColorReadBuffer);
11062+ break;
11063+ case GL_RED_BIAS:
11064+ params[0] = IROUND(ctx->Pixel.RedBias);
11065+ break;
11066+ case GL_RED_BITS:
11067+ params[0] = ctx->DrawBuffer->Visual.redBits ;
11068+ break;
11069+ case GL_RED_SCALE:
11070+ params[0] = IROUND(ctx->Pixel.RedScale);
11071+ break;
11072+ case GL_RENDER_MODE:
11073+ params[0] = ENUM_TO_INT(ctx->RenderMode);
11074+ break;
11075+ case GL_RESCALE_NORMAL:
11076+ params[0] = BOOLEAN_TO_INT(ctx->Transform.RescaleNormals);
11077+ break;
11078+ case GL_RGBA_MODE:
11079+ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.rgbMode);
11080+ break;
11081+ case GL_SCISSOR_BOX:
11082+ params[0] = ctx->Scissor.X;
11083+ params[1] = ctx->Scissor.Y;
11084+ params[2] = ctx->Scissor.Width;
11085+ params[3] = ctx->Scissor.Height;
11086+ break;
11087+ case GL_SCISSOR_TEST:
11088+ params[0] = BOOLEAN_TO_INT(ctx->Scissor.Enabled);
11089+ break;
11090+ case GL_SELECTION_BUFFER_SIZE:
11091+ params[0] = ctx->Select.BufferSize;
11092+ break;
11093+ case GL_SHADE_MODEL:
11094+ params[0] = ENUM_TO_INT(ctx->Light.ShadeModel);
11095+ break;
11096+ case GL_SHARED_TEXTURE_PALETTE_EXT:
11097+ params[0] = BOOLEAN_TO_INT(ctx->Texture.SharedPalette);
11098+ break;
11099+ case GL_STENCIL_BITS:
11100+ params[0] = ctx->DrawBuffer->Visual.stencilBits;
11101+ break;
11102+ case GL_STENCIL_CLEAR_VALUE:
11103+ params[0] = ctx->Stencil.Clear;
11104+ break;
11105+ case GL_STENCIL_FAIL:
11106+ params[0] = ENUM_TO_INT(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
11107+ break;
11108+ case GL_STENCIL_FUNC:
11109+ params[0] = ENUM_TO_INT(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
11110+ break;
11111+ case GL_STENCIL_PASS_DEPTH_FAIL:
11112+ params[0] = ENUM_TO_INT(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
11113+ break;
11114+ case GL_STENCIL_PASS_DEPTH_PASS:
11115+ params[0] = ENUM_TO_INT(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
11116+ break;
11117+ case GL_STENCIL_REF:
11118+ params[0] = ctx->Stencil.Ref[ctx->Stencil.ActiveFace];
11119+ break;
11120+ case GL_STENCIL_TEST:
11121+ params[0] = BOOLEAN_TO_INT(ctx->Stencil.Enabled);
11122+ break;
11123+ case GL_STENCIL_VALUE_MASK:
11124+ params[0] = ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace];
11125+ break;
11126+ case GL_STENCIL_WRITEMASK:
11127+ params[0] = ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace];
11128+ break;
11129+ case GL_STEREO:
11130+ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.stereoMode);
11131+ break;
11132+ case GL_SUBPIXEL_BITS:
11133+ params[0] = ctx->Const.SubPixelBits;
11134+ break;
11135+ case GL_TEXTURE_1D:
11136+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_1D));
11137+ break;
11138+ case GL_TEXTURE_2D:
11139+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_2D));
11140+ break;
11141+ case GL_TEXTURE_3D:
11142+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_3D));
11143+ break;
11144+ case GL_TEXTURE_BINDING_1D:
11145+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name;
11146+ break;
11147+ case GL_TEXTURE_BINDING_2D:
11148+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name;
11149+ break;
11150+ case GL_TEXTURE_BINDING_3D:
11151+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name;
11152+ break;
11153+ case GL_TEXTURE_ENV_COLOR:
11154+ {
11155+ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
11156+ params[0] = FLOAT_TO_INT(color[0]);
11157+ params[1] = FLOAT_TO_INT(color[1]);
11158+ params[2] = FLOAT_TO_INT(color[2]);
11159+ params[3] = FLOAT_TO_INT(color[3]);
11160+ }
11161+ break;
11162+ case GL_TEXTURE_ENV_MODE:
11163+ params[0] = ENUM_TO_INT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
11164+ break;
11165+ case GL_TEXTURE_GEN_S:
11166+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
11167+ break;
11168+ case GL_TEXTURE_GEN_T:
11169+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0));
11170+ break;
11171+ case GL_TEXTURE_GEN_R:
11172+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0));
11173+ break;
11174+ case GL_TEXTURE_GEN_Q:
11175+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0));
11176+ break;
11177+ case GL_TEXTURE_MATRIX:
11178+ {
11179+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
11180+ params[0] = IROUND(matrix[0]);
11181+ params[1] = IROUND(matrix[1]);
11182+ params[2] = IROUND(matrix[2]);
11183+ params[3] = IROUND(matrix[3]);
11184+ params[4] = IROUND(matrix[4]);
11185+ params[5] = IROUND(matrix[5]);
11186+ params[6] = IROUND(matrix[6]);
11187+ params[7] = IROUND(matrix[7]);
11188+ params[8] = IROUND(matrix[8]);
11189+ params[9] = IROUND(matrix[9]);
11190+ params[10] = IROUND(matrix[10]);
11191+ params[11] = IROUND(matrix[11]);
11192+ params[12] = IROUND(matrix[12]);
11193+ params[13] = IROUND(matrix[13]);
11194+ params[14] = IROUND(matrix[14]);
11195+ params[15] = IROUND(matrix[15]);
11196+ }
11197+ break;
11198+ case GL_TEXTURE_STACK_DEPTH:
11199+ params[0] = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1;
11200+ break;
11201+ case GL_UNPACK_ALIGNMENT:
11202+ params[0] = ctx->Unpack.Alignment;
11203+ break;
11204+ case GL_UNPACK_LSB_FIRST:
11205+ params[0] = BOOLEAN_TO_INT(ctx->Unpack.LsbFirst);
11206+ break;
11207+ case GL_UNPACK_ROW_LENGTH:
11208+ params[0] = ctx->Unpack.RowLength;
11209+ break;
11210+ case GL_UNPACK_SKIP_PIXELS:
11211+ params[0] = ctx->Unpack.SkipPixels;
11212+ break;
11213+ case GL_UNPACK_SKIP_ROWS:
11214+ params[0] = ctx->Unpack.SkipRows;
11215+ break;
11216+ case GL_UNPACK_SWAP_BYTES:
11217+ params[0] = BOOLEAN_TO_INT(ctx->Unpack.SwapBytes);
11218+ break;
11219+ case GL_UNPACK_SKIP_IMAGES_EXT:
11220+ params[0] = ctx->Unpack.SkipImages;
11221+ break;
11222+ case GL_UNPACK_IMAGE_HEIGHT_EXT:
11223+ params[0] = ctx->Unpack.ImageHeight;
11224+ break;
11225+ case GL_UNPACK_CLIENT_STORAGE_APPLE:
11226+ params[0] = BOOLEAN_TO_INT(ctx->Unpack.ClientStorage);
11227+ break;
11228+ case GL_VIEWPORT:
11229+ params[0] = ctx->Viewport.X;
11230+ params[1] = ctx->Viewport.Y;
11231+ params[2] = ctx->Viewport.Width;
11232+ params[3] = ctx->Viewport.Height;
11233+ break;
11234+ case GL_ZOOM_X:
11235+ params[0] = IROUND(ctx->Pixel.ZoomX);
11236+ break;
11237+ case GL_ZOOM_Y:
11238+ params[0] = IROUND(ctx->Pixel.ZoomY);
11239+ break;
11240+ case GL_VERTEX_ARRAY:
11241+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Vertex.Enabled);
11242+ break;
11243+ case GL_VERTEX_ARRAY_SIZE:
11244+ params[0] = ctx->Array.ArrayObj->Vertex.Size;
11245+ break;
11246+ case GL_VERTEX_ARRAY_TYPE:
11247+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Vertex.Type);
11248+ break;
11249+ case GL_VERTEX_ARRAY_STRIDE:
11250+ params[0] = ctx->Array.ArrayObj->Vertex.Stride;
11251+ break;
11252+ case GL_VERTEX_ARRAY_COUNT_EXT:
11253+ params[0] = 0;
11254+ break;
11255+ case GL_NORMAL_ARRAY:
11256+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Normal.Enabled);
11257+ break;
11258+ case GL_NORMAL_ARRAY_TYPE:
11259+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Normal.Type);
11260+ break;
11261+ case GL_NORMAL_ARRAY_STRIDE:
11262+ params[0] = ctx->Array.ArrayObj->Normal.Stride;
11263+ break;
11264+ case GL_NORMAL_ARRAY_COUNT_EXT:
11265+ params[0] = 0;
11266+ break;
11267+ case GL_COLOR_ARRAY:
11268+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Color.Enabled);
11269+ break;
11270+ case GL_COLOR_ARRAY_SIZE:
11271+ params[0] = ctx->Array.ArrayObj->Color.Size;
11272+ break;
11273+ case GL_COLOR_ARRAY_TYPE:
11274+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Color.Type);
11275+ break;
11276+ case GL_COLOR_ARRAY_STRIDE:
11277+ params[0] = ctx->Array.ArrayObj->Color.Stride;
11278+ break;
11279+ case GL_COLOR_ARRAY_COUNT_EXT:
11280+ params[0] = 0;
11281+ break;
11282+ case GL_INDEX_ARRAY:
11283+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Index.Enabled);
11284+ break;
11285+ case GL_INDEX_ARRAY_TYPE:
11286+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Index.Type);
11287+ break;
11288+ case GL_INDEX_ARRAY_STRIDE:
11289+ params[0] = ctx->Array.ArrayObj->Index.Stride;
11290+ break;
11291+ case GL_INDEX_ARRAY_COUNT_EXT:
11292+ params[0] = 0;
11293+ break;
11294+ case GL_TEXTURE_COORD_ARRAY:
11295+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
11296+ break;
11297+ case GL_TEXTURE_COORD_ARRAY_SIZE:
11298+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size;
11299+ break;
11300+ case GL_TEXTURE_COORD_ARRAY_TYPE:
11301+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
11302+ break;
11303+ case GL_TEXTURE_COORD_ARRAY_STRIDE:
11304+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride;
11305+ break;
11306+ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
11307+ params[0] = 0;
11308+ break;
11309+ case GL_EDGE_FLAG_ARRAY:
11310+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->EdgeFlag.Enabled);
11311+ break;
11312+ case GL_EDGE_FLAG_ARRAY_STRIDE:
11313+ params[0] = ctx->Array.ArrayObj->EdgeFlag.Stride;
11314+ break;
11315+ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
11316+ params[0] = 0;
11317+ break;
11318+ case GL_MAX_TEXTURE_UNITS_ARB:
11319+ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
11320+ params[0] = ctx->Const.MaxTextureUnits;
11321+ break;
11322+ case GL_ACTIVE_TEXTURE_ARB:
11323+ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
11324+ params[0] = GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit;
11325+ break;
11326+ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
11327+ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
11328+ params[0] = GL_TEXTURE0_ARB + ctx->Array.ActiveTexture;
11329+ break;
11330+ case GL_TEXTURE_CUBE_MAP_ARB:
11331+ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
11332+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB));
11333+ break;
11334+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
11335+ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
11336+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name;
11337+ break;
11338+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
11339+ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
11340+ params[0] = (1 << (ctx->Const.MaxCubeTextureLevels - 1));
11341+ break;
11342+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
11343+ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
11344+ params[0] = ctx->Hint.TextureCompression;
11345+ break;
11346+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
11347+ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
11348+ params[0] = _mesa_get_compressed_formats(ctx, NULL, GL_FALSE);
11349+ break;
11350+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
11351+ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
11352+ {
11353+ GLint formats[100];
11354+ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
11355+ ASSERT(n <= 100);
11356+ for (i = 0; i < n; i++)
11357+ params[i] = ENUM_TO_INT(formats[i]);
11358+ }
11359+ break;
11360+ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
11361+ CHECK_EXT1(EXT_compiled_vertex_array, "GetIntegerv");
11362+ params[0] = ctx->Array.LockFirst;
11363+ break;
11364+ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
11365+ CHECK_EXT1(EXT_compiled_vertex_array, "GetIntegerv");
11366+ params[0] = ctx->Array.LockCount;
11367+ break;
11368+ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
11369+ {
11370+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
11371+ params[0] = IROUND(matrix[0]);
11372+ params[1] = IROUND(matrix[4]);
11373+ params[2] = IROUND(matrix[8]);
11374+ params[3] = IROUND(matrix[12]);
11375+ params[4] = IROUND(matrix[1]);
11376+ params[5] = IROUND(matrix[5]);
11377+ params[6] = IROUND(matrix[9]);
11378+ params[7] = IROUND(matrix[13]);
11379+ params[8] = IROUND(matrix[2]);
11380+ params[9] = IROUND(matrix[6]);
11381+ params[10] = IROUND(matrix[10]);
11382+ params[11] = IROUND(matrix[14]);
11383+ params[12] = IROUND(matrix[3]);
11384+ params[13] = IROUND(matrix[7]);
11385+ params[14] = IROUND(matrix[11]);
11386+ params[15] = IROUND(matrix[15]);
11387+ }
11388+ break;
11389+ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
11390+ {
11391+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
11392+ params[0] = IROUND(matrix[0]);
11393+ params[1] = IROUND(matrix[4]);
11394+ params[2] = IROUND(matrix[8]);
11395+ params[3] = IROUND(matrix[12]);
11396+ params[4] = IROUND(matrix[1]);
11397+ params[5] = IROUND(matrix[5]);
11398+ params[6] = IROUND(matrix[9]);
11399+ params[7] = IROUND(matrix[13]);
11400+ params[8] = IROUND(matrix[2]);
11401+ params[9] = IROUND(matrix[6]);
11402+ params[10] = IROUND(matrix[10]);
11403+ params[11] = IROUND(matrix[14]);
11404+ params[12] = IROUND(matrix[3]);
11405+ params[13] = IROUND(matrix[7]);
11406+ params[14] = IROUND(matrix[11]);
11407+ params[15] = IROUND(matrix[15]);
11408+ }
11409+ break;
11410+ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
11411+ {
11412+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
11413+ params[0] = IROUND(matrix[0]);
11414+ params[1] = IROUND(matrix[4]);
11415+ params[2] = IROUND(matrix[8]);
11416+ params[3] = IROUND(matrix[12]);
11417+ params[4] = IROUND(matrix[1]);
11418+ params[5] = IROUND(matrix[5]);
11419+ params[6] = IROUND(matrix[9]);
11420+ params[7] = IROUND(matrix[13]);
11421+ params[8] = IROUND(matrix[2]);
11422+ params[9] = IROUND(matrix[6]);
11423+ params[10] = IROUND(matrix[10]);
11424+ params[11] = IROUND(matrix[14]);
11425+ params[12] = IROUND(matrix[3]);
11426+ params[13] = IROUND(matrix[7]);
11427+ params[14] = IROUND(matrix[11]);
11428+ params[15] = IROUND(matrix[15]);
11429+ }
11430+ break;
11431+ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
11432+ {
11433+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
11434+ params[0] = IROUND(matrix[0]);
11435+ params[1] = IROUND(matrix[4]);
11436+ params[2] = IROUND(matrix[8]);
11437+ params[3] = IROUND(matrix[12]);
11438+ params[4] = IROUND(matrix[1]);
11439+ params[5] = IROUND(matrix[5]);
11440+ params[6] = IROUND(matrix[9]);
11441+ params[7] = IROUND(matrix[13]);
11442+ params[8] = IROUND(matrix[2]);
11443+ params[9] = IROUND(matrix[6]);
11444+ params[10] = IROUND(matrix[10]);
11445+ params[11] = IROUND(matrix[14]);
11446+ params[12] = IROUND(matrix[3]);
11447+ params[13] = IROUND(matrix[7]);
11448+ params[14] = IROUND(matrix[11]);
11449+ params[15] = IROUND(matrix[15]);
11450+ }
11451+ break;
11452+ case GL_COLOR_MATRIX_SGI:
11453+ {
11454+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
11455+ params[0] = IROUND(matrix[0]);
11456+ params[1] = IROUND(matrix[1]);
11457+ params[2] = IROUND(matrix[2]);
11458+ params[3] = IROUND(matrix[3]);
11459+ params[4] = IROUND(matrix[4]);
11460+ params[5] = IROUND(matrix[5]);
11461+ params[6] = IROUND(matrix[6]);
11462+ params[7] = IROUND(matrix[7]);
11463+ params[8] = IROUND(matrix[8]);
11464+ params[9] = IROUND(matrix[9]);
11465+ params[10] = IROUND(matrix[10]);
11466+ params[11] = IROUND(matrix[11]);
11467+ params[12] = IROUND(matrix[12]);
11468+ params[13] = IROUND(matrix[13]);
11469+ params[14] = IROUND(matrix[14]);
11470+ params[15] = IROUND(matrix[15]);
11471+ }
11472+ break;
11473+ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
11474+ params[0] = ctx->ColorMatrixStack.Depth + 1;
11475+ break;
11476+ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
11477+ params[0] = MAX_COLOR_STACK_DEPTH;
11478+ break;
11479+ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
11480+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[0]);
11481+ break;
11482+ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
11483+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[1]);
11484+ break;
11485+ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
11486+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[2]);
11487+ break;
11488+ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
11489+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[3]);
11490+ break;
11491+ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
11492+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[0]);
11493+ break;
11494+ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
11495+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[1]);
11496+ break;
11497+ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
11498+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[2]);
11499+ break;
11500+ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
11501+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[3]);
11502+ break;
11503+ case GL_CONVOLUTION_1D_EXT:
11504+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11505+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Convolution1DEnabled);
11506+ break;
11507+ case GL_CONVOLUTION_2D_EXT:
11508+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11509+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Convolution2DEnabled);
11510+ break;
11511+ case GL_SEPARABLE_2D_EXT:
11512+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11513+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Separable2DEnabled);
11514+ break;
11515+ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
11516+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11517+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[0]);
11518+ break;
11519+ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
11520+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11521+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[1]);
11522+ break;
11523+ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
11524+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11525+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[2]);
11526+ break;
11527+ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
11528+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11529+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[3]);
11530+ break;
11531+ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
11532+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11533+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[0]);
11534+ break;
11535+ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
11536+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11537+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[1]);
11538+ break;
11539+ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
11540+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11541+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[2]);
11542+ break;
11543+ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
11544+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11545+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[3]);
11546+ break;
11547+ case GL_HISTOGRAM:
11548+ CHECK_EXT1(EXT_histogram, "GetIntegerv");
11549+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.HistogramEnabled);
11550+ break;
11551+ case GL_MINMAX:
11552+ CHECK_EXT1(EXT_histogram, "GetIntegerv");
11553+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MinMaxEnabled);
11554+ break;
11555+ case GL_COLOR_TABLE_SGI:
11556+ CHECK_EXT1(SGI_color_table, "GetIntegerv");
11557+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.ColorTableEnabled);
11558+ break;
11559+ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
11560+ CHECK_EXT1(SGI_color_table, "GetIntegerv");
11561+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.PostConvolutionColorTableEnabled);
11562+ break;
11563+ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
11564+ CHECK_EXT1(SGI_color_table, "GetIntegerv");
11565+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.PostColorMatrixColorTableEnabled);
11566+ break;
11567+ case GL_TEXTURE_COLOR_TABLE_SGI:
11568+ CHECK_EXT1(SGI_texture_color_table, "GetIntegerv");
11569+ params[0] = BOOLEAN_TO_INT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled);
11570+ break;
11571+ case GL_COLOR_SUM_EXT:
11572+ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetIntegerv");
11573+ params[0] = BOOLEAN_TO_INT(ctx->Fog.ColorSumEnabled);
11574+ break;
11575+ case GL_CURRENT_SECONDARY_COLOR_EXT:
11576+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
11577+ {
11578+ FLUSH_CURRENT(ctx, 0);
11579+ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]);
11580+ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]);
11581+ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]);
11582+ params[3] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]);
11583+ }
11584+ break;
11585+ case GL_SECONDARY_COLOR_ARRAY_EXT:
11586+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
11587+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->SecondaryColor.Enabled);
11588+ break;
11589+ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
11590+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
11591+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->SecondaryColor.Type);
11592+ break;
11593+ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
11594+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
11595+ params[0] = ctx->Array.ArrayObj->SecondaryColor.Stride;
11596+ break;
11597+ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
11598+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
11599+ params[0] = ctx->Array.ArrayObj->SecondaryColor.Size;
11600+ break;
11601+ case GL_CURRENT_FOG_COORDINATE_EXT:
11602+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
11603+ {
11604+ FLUSH_CURRENT(ctx, 0);
11605+ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_FOG][0]);
11606+ }
11607+ break;
11608+ case GL_FOG_COORDINATE_ARRAY_EXT:
11609+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
11610+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->FogCoord.Enabled);
11611+ break;
11612+ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
11613+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
11614+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->FogCoord.Type);
11615+ break;
11616+ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
11617+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
11618+ params[0] = ctx->Array.ArrayObj->FogCoord.Stride;
11619+ break;
11620+ case GL_FOG_COORDINATE_SOURCE_EXT:
11621+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
11622+ params[0] = ENUM_TO_INT(ctx->Fog.FogCoordinateSource);
11623+ break;
11624+ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
11625+ CHECK_EXT1(EXT_texture_lod_bias, "GetIntegerv");
11626+ params[0] = IROUND(ctx->Const.MaxTextureLodBias);
11627+ break;
11628+ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
11629+ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetIntegerv");
11630+ params[0] = IROUND(ctx->Const.MaxTextureMaxAnisotropy);
11631+ break;
11632+ case GL_MULTISAMPLE_ARB:
11633+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
11634+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.Enabled);
11635+ break;
11636+ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
11637+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
11638+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleAlphaToCoverage);
11639+ break;
11640+ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
11641+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
11642+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleAlphaToOne);
11643+ break;
11644+ case GL_SAMPLE_COVERAGE_ARB:
11645+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
11646+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleCoverage);
11647+ break;
11648+ case GL_SAMPLE_COVERAGE_VALUE_ARB:
11649+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
11650+ params[0] = IROUND(ctx->Multisample.SampleCoverageValue);
11651+ break;
11652+ case GL_SAMPLE_COVERAGE_INVERT_ARB:
11653+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
11654+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleCoverageInvert);
11655+ break;
11656+ case GL_SAMPLE_BUFFERS_ARB:
11657+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
11658+ params[0] = ctx->DrawBuffer->Visual.sampleBuffers;
11659+ break;
11660+ case GL_SAMPLES_ARB:
11661+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
11662+ params[0] = ctx->DrawBuffer->Visual.samples;
11663+ break;
11664+ case GL_RASTER_POSITION_UNCLIPPED_IBM:
11665+ CHECK_EXT1(IBM_rasterpos_clip, "GetIntegerv");
11666+ params[0] = BOOLEAN_TO_INT(ctx->Transform.RasterPositionUnclipped);
11667+ break;
11668+ case GL_POINT_SPRITE_NV:
11669+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetIntegerv");
11670+ params[0] = BOOLEAN_TO_INT(ctx->Point.PointSprite);
11671+ break;
11672+ case GL_POINT_SPRITE_R_MODE_NV:
11673+ CHECK_EXT1(NV_point_sprite, "GetIntegerv");
11674+ params[0] = ENUM_TO_INT(ctx->Point.SpriteRMode);
11675+ break;
11676+ case GL_POINT_SPRITE_COORD_ORIGIN:
11677+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetIntegerv");
11678+ params[0] = ENUM_TO_INT(ctx->Point.SpriteOrigin);
11679+ break;
11680+ case GL_GENERATE_MIPMAP_HINT_SGIS:
11681+ CHECK_EXT1(SGIS_generate_mipmap, "GetIntegerv");
11682+ params[0] = ENUM_TO_INT(ctx->Hint.GenerateMipmap);
11683+ break;
11684+ case GL_VERTEX_PROGRAM_BINDING_NV:
11685+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11686+ params[0] = (ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0);
11687+ break;
11688+ case GL_VERTEX_ATTRIB_ARRAY0_NV:
11689+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11690+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[0].Enabled);
11691+ break;
11692+ case GL_VERTEX_ATTRIB_ARRAY1_NV:
11693+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11694+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[1].Enabled);
11695+ break;
11696+ case GL_VERTEX_ATTRIB_ARRAY2_NV:
11697+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11698+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[2].Enabled);
11699+ break;
11700+ case GL_VERTEX_ATTRIB_ARRAY3_NV:
11701+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11702+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[3].Enabled);
11703+ break;
11704+ case GL_VERTEX_ATTRIB_ARRAY4_NV:
11705+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11706+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[4].Enabled);
11707+ break;
11708+ case GL_VERTEX_ATTRIB_ARRAY5_NV:
11709+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11710+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[5].Enabled);
11711+ break;
11712+ case GL_VERTEX_ATTRIB_ARRAY6_NV:
11713+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11714+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[6].Enabled);
11715+ break;
11716+ case GL_VERTEX_ATTRIB_ARRAY7_NV:
11717+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11718+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[7].Enabled);
11719+ break;
11720+ case GL_VERTEX_ATTRIB_ARRAY8_NV:
11721+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11722+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[8].Enabled);
11723+ break;
11724+ case GL_VERTEX_ATTRIB_ARRAY9_NV:
11725+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11726+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[9].Enabled);
11727+ break;
11728+ case GL_VERTEX_ATTRIB_ARRAY10_NV:
11729+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11730+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[10].Enabled);
11731+ break;
11732+ case GL_VERTEX_ATTRIB_ARRAY11_NV:
11733+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11734+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[11].Enabled);
11735+ break;
11736+ case GL_VERTEX_ATTRIB_ARRAY12_NV:
11737+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11738+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[12].Enabled);
11739+ break;
11740+ case GL_VERTEX_ATTRIB_ARRAY13_NV:
11741+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11742+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[13].Enabled);
11743+ break;
11744+ case GL_VERTEX_ATTRIB_ARRAY14_NV:
11745+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11746+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[14].Enabled);
11747+ break;
11748+ case GL_VERTEX_ATTRIB_ARRAY15_NV:
11749+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11750+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[15].Enabled);
11751+ break;
11752+ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
11753+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11754+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[0]);
11755+ break;
11756+ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
11757+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11758+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[1]);
11759+ break;
11760+ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
11761+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11762+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[2]);
11763+ break;
11764+ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
11765+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11766+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[3]);
11767+ break;
11768+ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
11769+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11770+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[4]);
11771+ break;
11772+ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
11773+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11774+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[5]);
11775+ break;
11776+ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
11777+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11778+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[6]);
11779+ break;
11780+ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
11781+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11782+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[7]);
11783+ break;
11784+ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
11785+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11786+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[8]);
11787+ break;
11788+ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
11789+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11790+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[9]);
11791+ break;
11792+ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
11793+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11794+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[10]);
11795+ break;
11796+ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
11797+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11798+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[11]);
11799+ break;
11800+ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
11801+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11802+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[12]);
11803+ break;
11804+ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
11805+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11806+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[13]);
11807+ break;
11808+ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
11809+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11810+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[14]);
11811+ break;
11812+ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
11813+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
11814+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[15]);
11815+ break;
11816+ case GL_FRAGMENT_PROGRAM_NV:
11817+ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
11818+ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.Enabled);
11819+ break;
11820+ case GL_FRAGMENT_PROGRAM_BINDING_NV:
11821+ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
11822+ params[0] = ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0;
11823+ break;
11824+ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
11825+ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
11826+ params[0] = MAX_NV_FRAGMENT_PROGRAM_PARAMS;
11827+ break;
11828+ case GL_TEXTURE_RECTANGLE_NV:
11829+ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
11830+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV));
11831+ break;
11832+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
11833+ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
11834+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name;
11835+ break;
11836+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
11837+ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
11838+ params[0] = ctx->Const.MaxTextureRectSize;
11839+ break;
11840+ case GL_STENCIL_TEST_TWO_SIDE_EXT:
11841+ CHECK_EXT1(EXT_stencil_two_side, "GetIntegerv");
11842+ params[0] = BOOLEAN_TO_INT(ctx->Stencil.TestTwoSide);
11843+ break;
11844+ case GL_ACTIVE_STENCIL_FACE_EXT:
11845+ CHECK_EXT1(EXT_stencil_two_side, "GetIntegerv");
11846+ params[0] = ENUM_TO_INT(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
11847+ break;
11848+ case GL_MAX_SHININESS_NV:
11849+ CHECK_EXT1(NV_light_max_exponent, "GetIntegerv");
11850+ params[0] = IROUND(ctx->Const.MaxShininess);
11851+ break;
11852+ case GL_MAX_SPOT_EXPONENT_NV:
11853+ CHECK_EXT1(NV_light_max_exponent, "GetIntegerv");
11854+ params[0] = IROUND(ctx->Const.MaxSpotExponent);
11855+ break;
11856+ case GL_ARRAY_BUFFER_BINDING_ARB:
11857+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
11858+ params[0] = ctx->Array.ArrayBufferObj->Name;
11859+ break;
11860+ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
11861+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
11862+ params[0] = ctx->Array.ArrayObj->Vertex.BufferObj->Name;
11863+ break;
11864+ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
11865+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
11866+ params[0] = ctx->Array.ArrayObj->Normal.BufferObj->Name;
11867+ break;
11868+ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
11869+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
11870+ params[0] = ctx->Array.ArrayObj->Color.BufferObj->Name;
11871+ break;
11872+ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
11873+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
11874+ params[0] = ctx->Array.ArrayObj->Index.BufferObj->Name;
11875+ break;
11876+ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
11877+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
11878+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name;
11879+ break;
11880+ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
11881+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
11882+ params[0] = ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name;
11883+ break;
11884+ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
11885+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
11886+ params[0] = ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name;
11887+ break;
11888+ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
11889+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
11890+ params[0] = ctx->Array.ArrayObj->FogCoord.BufferObj->Name;
11891+ break;
11892+ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
11893+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
11894+ params[0] = ctx->Array.ElementArrayBufferObj->Name;
11895+ break;
11896+ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
11897+ CHECK_EXT1(EXT_pixel_buffer_object, "GetIntegerv");
11898+ params[0] = ctx->Pack.BufferObj->Name;
11899+ break;
11900+ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
11901+ CHECK_EXT1(EXT_pixel_buffer_object, "GetIntegerv");
11902+ params[0] = ctx->Unpack.BufferObj->Name;
11903+ break;
11904+ case GL_VERTEX_PROGRAM_ARB:
11905+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
11906+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.Enabled);
11907+ break;
11908+ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
11909+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
11910+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.PointSizeEnabled);
11911+ break;
11912+ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
11913+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
11914+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.TwoSideEnabled);
11915+ break;
11916+ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
11917+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
11918+ params[0] = ctx->Const.MaxProgramMatrixStackDepth;
11919+ break;
11920+ case GL_MAX_PROGRAM_MATRICES_ARB:
11921+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
11922+ params[0] = ctx->Const.MaxProgramMatrices;
11923+ break;
11924+ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
11925+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
11926+ params[0] = BOOLEAN_TO_INT(ctx->CurrentStack->Depth + 1);
11927+ break;
11928+ case GL_CURRENT_MATRIX_ARB:
11929+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetIntegerv");
11930+ {
11931+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
11932+ params[0] = IROUND(matrix[0]);
11933+ params[1] = IROUND(matrix[1]);
11934+ params[2] = IROUND(matrix[2]);
11935+ params[3] = IROUND(matrix[3]);
11936+ params[4] = IROUND(matrix[4]);
11937+ params[5] = IROUND(matrix[5]);
11938+ params[6] = IROUND(matrix[6]);
11939+ params[7] = IROUND(matrix[7]);
11940+ params[8] = IROUND(matrix[8]);
11941+ params[9] = IROUND(matrix[9]);
11942+ params[10] = IROUND(matrix[10]);
11943+ params[11] = IROUND(matrix[11]);
11944+ params[12] = IROUND(matrix[12]);
11945+ params[13] = IROUND(matrix[13]);
11946+ params[14] = IROUND(matrix[14]);
11947+ params[15] = IROUND(matrix[15]);
11948+ }
11949+ break;
11950+ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
11951+ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetIntegerv");
11952+ {
11953+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
11954+ params[0] = IROUND(matrix[0]);
11955+ params[1] = IROUND(matrix[4]);
11956+ params[2] = IROUND(matrix[8]);
11957+ params[3] = IROUND(matrix[12]);
11958+ params[4] = IROUND(matrix[1]);
11959+ params[5] = IROUND(matrix[5]);
11960+ params[6] = IROUND(matrix[9]);
11961+ params[7] = IROUND(matrix[13]);
11962+ params[8] = IROUND(matrix[2]);
11963+ params[9] = IROUND(matrix[6]);
11964+ params[10] = IROUND(matrix[10]);
11965+ params[11] = IROUND(matrix[14]);
11966+ params[12] = IROUND(matrix[3]);
11967+ params[13] = IROUND(matrix[7]);
11968+ params[14] = IROUND(matrix[11]);
11969+ params[15] = IROUND(matrix[15]);
11970+ }
11971+ break;
11972+ case GL_MAX_VERTEX_ATTRIBS_ARB:
11973+ CHECK_EXT1(ARB_vertex_program, "GetIntegerv");
11974+ params[0] = ctx->Const.VertexProgram.MaxAttribs;
11975+ break;
11976+ case GL_PROGRAM_ERROR_POSITION_ARB:
11977+ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetIntegerv");
11978+ params[0] = ctx->Program.ErrorPos;
11979+ break;
11980+ case GL_FRAGMENT_PROGRAM_ARB:
11981+ CHECK_EXT1(ARB_fragment_program, "GetIntegerv");
11982+ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.Enabled);
11983+ break;
11984+ case GL_MAX_TEXTURE_COORDS_ARB:
11985+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetIntegerv");
11986+ params[0] = ctx->Const.MaxTextureCoordUnits;
11987+ break;
11988+ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
11989+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetIntegerv");
11990+ params[0] = ctx->Const.MaxTextureImageUnits;
11991+ break;
11992+ case GL_DEPTH_BOUNDS_TEST_EXT:
11993+ CHECK_EXT1(EXT_depth_bounds_test, "GetIntegerv");
11994+ params[0] = BOOLEAN_TO_INT(ctx->Depth.BoundsTest);
11995+ break;
11996+ case GL_DEPTH_BOUNDS_EXT:
11997+ CHECK_EXT1(EXT_depth_bounds_test, "GetIntegerv");
11998+ params[0] = IROUND(ctx->Depth.BoundsMin);
11999+ params[1] = IROUND(ctx->Depth.BoundsMax);
12000+ break;
12001+ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
12002+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12003+ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.CallbackEnabled);
12004+ break;
12005+ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
12006+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12007+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.CallbackEnabled);
12008+ break;
12009+ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
12010+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12011+ params[0] = ctx->FragmentProgram.CurrentPosition;
12012+ break;
12013+ case GL_VERTEX_PROGRAM_POSITION_MESA:
12014+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12015+ params[0] = ctx->VertexProgram.CurrentPosition;
12016+ break;
12017+ case GL_MAX_DRAW_BUFFERS_ARB:
12018+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12019+ params[0] = ctx->Const.MaxDrawBuffers;
12020+ break;
12021+ case GL_DRAW_BUFFER0_ARB:
12022+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12023+ params[0] = ENUM_TO_INT(ctx->DrawBuffer->ColorDrawBuffer[0]);
12024+ break;
12025+ case GL_DRAW_BUFFER1_ARB:
12026+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12027+ {
12028+ GLenum buffer;
12029+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
12030+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
12031+ return;
12032+ }
12033+ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
12034+ params[0] = ENUM_TO_INT(buffer);
12035+ }
12036+ break;
12037+ case GL_DRAW_BUFFER2_ARB:
12038+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12039+ {
12040+ GLenum buffer;
12041+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
12042+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
12043+ return;
12044+ }
12045+ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
12046+ params[0] = ENUM_TO_INT(buffer);
12047+ }
12048+ break;
12049+ case GL_DRAW_BUFFER3_ARB:
12050+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12051+ {
12052+ GLenum buffer;
12053+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
12054+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
12055+ return;
12056+ }
12057+ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
12058+ params[0] = ENUM_TO_INT(buffer);
12059+ }
12060+ break;
12061+ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
12062+ CHECK_EXT1(OES_read_format, "GetIntegerv");
12063+ params[0] = ctx->Const.ColorReadType;
12064+ break;
12065+ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
12066+ CHECK_EXT1(OES_read_format, "GetIntegerv");
12067+ params[0] = ctx->Const.ColorReadFormat;
12068+ break;
12069+ case GL_NUM_FRAGMENT_REGISTERS_ATI:
12070+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12071+ params[0] = 6;
12072+ break;
12073+ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
12074+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12075+ params[0] = 8;
12076+ break;
12077+ case GL_NUM_PASSES_ATI:
12078+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12079+ params[0] = 2;
12080+ break;
12081+ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
12082+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12083+ params[0] = 8;
12084+ break;
12085+ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
12086+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12087+ params[0] = 16;
12088+ break;
12089+ case GL_COLOR_ALPHA_PAIRING_ATI:
12090+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12091+ params[0] = BOOLEAN_TO_INT(GL_TRUE);
12092+ break;
12093+ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
12094+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12095+ params[0] = 3;
12096+ break;
12097+ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
12098+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12099+ params[0] = 3;
12100+ break;
12101+ case GL_STENCIL_BACK_FUNC:
12102+ params[0] = ENUM_TO_INT(ctx->Stencil.Function[1]);
12103+ break;
12104+ case GL_STENCIL_BACK_VALUE_MASK:
12105+ params[0] = ctx->Stencil.ValueMask[1];
12106+ break;
12107+ case GL_STENCIL_BACK_REF:
12108+ params[0] = ctx->Stencil.Ref[1];
12109+ break;
12110+ case GL_STENCIL_BACK_FAIL:
12111+ params[0] = ENUM_TO_INT(ctx->Stencil.FailFunc[1]);
12112+ break;
12113+ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
12114+ params[0] = ENUM_TO_INT(ctx->Stencil.ZFailFunc[1]);
12115+ break;
12116+ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
12117+ params[0] = ENUM_TO_INT(ctx->Stencil.ZPassFunc[1]);
12118+ break;
12119+ case GL_FRAMEBUFFER_BINDING_EXT:
12120+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12121+ params[0] = ctx->DrawBuffer->Name;
12122+ break;
12123+ case GL_RENDERBUFFER_BINDING_EXT:
12124+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12125+ params[0] = ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0;
12126+ break;
12127+ case GL_MAX_COLOR_ATTACHMENTS_EXT:
12128+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12129+ params[0] = ctx->Const.MaxColorAttachments;
12130+ break;
12131+ case GL_MAX_RENDERBUFFER_SIZE_EXT:
12132+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12133+ params[0] = ctx->Const.MaxRenderbufferSize;
12134+ break;
12135+ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
12136+ CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
12137+ params[0] = MAX_FRAGMENT_UNIFORM_COMPONENTS;
12138+ break;
12139+ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
12140+ CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
12141+ params[0] = ENUM_TO_INT(ctx->Hint.FragmentShaderDerivative);
12142+ break;
12143+ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
12144+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12145+ params[0] = MAX_VERTEX_UNIFORM_COMPONENTS;
12146+ break;
12147+ case GL_MAX_VARYING_FLOATS_ARB:
12148+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12149+ params[0] = MAX_VARYING_FLOATS;
12150+ break;
12151+ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
12152+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12153+ params[0] = MAX_VERTEX_TEXTURE_IMAGE_UNITS;
12154+ break;
12155+ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
12156+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12157+ params[0] = MAX_COMBINED_TEXTURE_IMAGE_UNITS;
12158+ break;
12159+ default:
12160+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv(pname=0x%x)", pname);
12161+ }
12162+}
12163+
12164+
12165+void GLAPIENTRY
12166+_mesa_GetDoublev( GLenum pname, GLdouble *params )
12167+{
12168+ const GLfloat magic = -1234.5F;
12169+ GLfloat values[16];
12170+ GLuint i;
12171+
12172+ if (!params)
12173+ return;
12174+
12175+ /* Init temp array to magic numbers so we can figure out how many values
12176+ * are returned by the GetFloatv() call.
12177+ */
12178+ for (i = 0; i < 16; i++)
12179+ values[i] = magic;
12180+
12181+ _mesa_GetFloatv(pname, values);
12182+
12183+ for (i = 0; i < 16 && values[i] != magic; i++)
12184+ params[i] = (GLdouble) values[i];
12185+}
12186+
12187Index: git/target-i386/mesa_gl.h
12188===================================================================
12189--- /dev/null 1970-01-01 00:00:00.000000000 +0000
12190+++ git/target-i386/mesa_gl.h 2009-05-23 11:22:17.000000000 +0100
12191@@ -0,0 +1,2251 @@
12192+/*
12193+ * Mesa 3-D graphics library
12194+ * Version: 6.5.1
12195+ *
12196+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
12197+ *
12198+ * Permission is hereby granted, free of charge, to any person obtaining a
12199+ * copy of this software and associated documentation files (the "Software"),
12200+ * to deal in the Software without restriction, including without limitation
12201+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12202+ * and/or sell copies of the Software, and to permit persons to whom the
12203+ * Software is furnished to do so, subject to the following conditions:
12204+ *
12205+ * The above copyright notice and this permission notice shall be included
12206+ * in all copies or substantial portions of the Software.
12207+ *
12208+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
12209+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12210+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
12211+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
12212+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
12213+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12214+ */
12215+
12216+
12217+#ifndef __gl_h_
12218+#define __gl_h_
12219+
12220+#if defined(USE_MGL_NAMESPACE)
12221+#include "gl_mangle.h"
12222+#endif
12223+
12224+
12225+/**********************************************************************
12226+ * Begin system-specific stuff. Do not do any of this when building
12227+ * for SciTech SNAP, as this is all done before this header file is
12228+ * included.
12229+ */
12230+#if !defined(__SCITECH_SNAP__)
12231+
12232+#if defined(__BEOS__)
12233+#include <stdlib.h> /* to get some BeOS-isms */
12234+#endif
12235+
12236+#if !defined(OPENSTEP) && (defined(NeXT) || defined(NeXT_PDO))
12237+#define OPENSTEP
12238+#endif
12239+
12240+#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__)
12241+#define __WIN32__
12242+#endif
12243+
12244+#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__))
12245+# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
12246+# define GLAPI __declspec(dllexport)
12247+# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
12248+# define GLAPI __declspec(dllimport)
12249+# else /* for use with static link lib build of Win32 edition only */
12250+# define GLAPI extern
12251+# endif /* _STATIC_MESA support */
12252+# define GLAPIENTRY __stdcall
12253+#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
12254+# define GLAPI extern
12255+# define GLAPIENTRY __stdcall
12256+#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
12257+# define GLAPI __attribute__((visibility("default")))
12258+# define GLAPIENTRY
12259+#endif /* WIN32 && !CYGWIN */
12260+
12261+#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__)
12262+# define PRAGMA_EXPORT_SUPPORTED 1
12263+#endif
12264+
12265+/*
12266+ * WINDOWS: Include windows.h here to define APIENTRY.
12267+ * It is also useful when applications include this file by
12268+ * including only glut.h, since glut.h depends on windows.h.
12269+ * Applications needing to include windows.h with parms other
12270+ * than "WIN32_LEAN_AND_MEAN" may include windows.h before
12271+ * glut.h or gl.h.
12272+ */
12273+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
12274+#define WIN32_LEAN_AND_MEAN 1
12275+#include <windows.h>
12276+#endif
12277+
12278+#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP) && !defined(__CYGWIN__)
12279+#include <GL/mesa_wgl.h>
12280+#endif
12281+
12282+#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
12283+#pragma import on
12284+#endif
12285+
12286+#ifndef GLAPI
12287+#define GLAPI extern
12288+#endif
12289+
12290+#ifndef GLAPIENTRY
12291+#define GLAPIENTRY
12292+#endif
12293+
12294+#ifndef APIENTRY
12295+#define APIENTRY GLAPIENTRY
12296+#endif
12297+
12298+/* "P" suffix to be used for a pointer to a function */
12299+#ifndef APIENTRYP
12300+#define APIENTRYP APIENTRY *
12301+#endif
12302+
12303+#ifndef GLAPIENTRYP
12304+#define GLAPIENTRYP GLAPIENTRY *
12305+#endif
12306+
12307+#ifdef CENTERLINE_CLPP
12308+#define signed
12309+#endif
12310+
12311+#if defined(PRAGMA_EXPORT_SUPPORTED)
12312+#pragma export on
12313+#endif
12314+
12315+#endif /* !__SCITECH_SNAP__ */
12316+/*
12317+ * End system-specific stuff.
12318+ **********************************************************************/
12319+
12320+
12321+
12322+#ifdef __cplusplus
12323+extern "C" {
12324+#endif
12325+
12326+
12327+
12328+#define GL_VERSION_1_1 1
12329+#define GL_VERSION_1_2 1
12330+#define GL_VERSION_1_3 1
12331+#define GL_ARB_imaging 1
12332+
12333+
12334+/*
12335+ * Datatypes
12336+ */
12337+typedef unsigned int GLenum;
12338+typedef unsigned char GLboolean;
12339+typedef unsigned int GLbitfield;
12340+typedef void GLvoid;
12341+typedef signed char GLbyte; /* 1-byte signed */
12342+typedef short GLshort; /* 2-byte signed */
12343+typedef int GLint; /* 4-byte signed */
12344+typedef unsigned char GLubyte; /* 1-byte unsigned */
12345+typedef unsigned short GLushort; /* 2-byte unsigned */
12346+typedef unsigned int GLuint; /* 4-byte unsigned */
12347+typedef int GLsizei; /* 4-byte signed */
12348+typedef float GLfloat; /* single precision float */
12349+typedef float GLclampf; /* single precision float in [0,1] */
12350+typedef double GLdouble; /* double precision float */
12351+typedef double GLclampd; /* double precision float in [0,1] */
12352+
12353+
12354+
12355+/*
12356+ * Constants
12357+ */
12358+
12359+/* Boolean values */
12360+#define GL_FALSE 0x0
12361+#define GL_TRUE 0x1
12362+
12363+/* Data types */
12364+#define GL_BYTE 0x1400
12365+#define GL_UNSIGNED_BYTE 0x1401
12366+#define GL_SHORT 0x1402
12367+#define GL_UNSIGNED_SHORT 0x1403
12368+#define GL_INT 0x1404
12369+#define GL_UNSIGNED_INT 0x1405
12370+#define GL_FLOAT 0x1406
12371+#define GL_2_BYTES 0x1407
12372+#define GL_3_BYTES 0x1408
12373+#define GL_4_BYTES 0x1409
12374+#define GL_DOUBLE 0x140A
12375+
12376+/* Primitives */
12377+#define GL_POINTS 0x0000
12378+#define GL_LINES 0x0001
12379+#define GL_LINE_LOOP 0x0002
12380+#define GL_LINE_STRIP 0x0003
12381+#define GL_TRIANGLES 0x0004
12382+#define GL_TRIANGLE_STRIP 0x0005
12383+#define GL_TRIANGLE_FAN 0x0006
12384+#define GL_QUADS 0x0007
12385+#define GL_QUAD_STRIP 0x0008
12386+#define GL_POLYGON 0x0009
12387+
12388+/* Vertex Arrays */
12389+#define GL_VERTEX_ARRAY 0x8074
12390+#define GL_NORMAL_ARRAY 0x8075
12391+#define GL_COLOR_ARRAY 0x8076
12392+#define GL_INDEX_ARRAY 0x8077
12393+#define GL_TEXTURE_COORD_ARRAY 0x8078
12394+#define GL_EDGE_FLAG_ARRAY 0x8079
12395+#define GL_VERTEX_ARRAY_SIZE 0x807A
12396+#define GL_VERTEX_ARRAY_TYPE 0x807B
12397+#define GL_VERTEX_ARRAY_STRIDE 0x807C
12398+#define GL_NORMAL_ARRAY_TYPE 0x807E
12399+#define GL_NORMAL_ARRAY_STRIDE 0x807F
12400+#define GL_COLOR_ARRAY_SIZE 0x8081
12401+#define GL_COLOR_ARRAY_TYPE 0x8082
12402+#define GL_COLOR_ARRAY_STRIDE 0x8083
12403+#define GL_INDEX_ARRAY_TYPE 0x8085
12404+#define GL_INDEX_ARRAY_STRIDE 0x8086
12405+#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
12406+#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
12407+#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
12408+#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
12409+#define GL_VERTEX_ARRAY_POINTER 0x808E
12410+#define GL_NORMAL_ARRAY_POINTER 0x808F
12411+#define GL_COLOR_ARRAY_POINTER 0x8090
12412+#define GL_INDEX_ARRAY_POINTER 0x8091
12413+#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
12414+#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
12415+#define GL_V2F 0x2A20
12416+#define GL_V3F 0x2A21
12417+#define GL_C4UB_V2F 0x2A22
12418+#define GL_C4UB_V3F 0x2A23
12419+#define GL_C3F_V3F 0x2A24
12420+#define GL_N3F_V3F 0x2A25
12421+#define GL_C4F_N3F_V3F 0x2A26
12422+#define GL_T2F_V3F 0x2A27
12423+#define GL_T4F_V4F 0x2A28
12424+#define GL_T2F_C4UB_V3F 0x2A29
12425+#define GL_T2F_C3F_V3F 0x2A2A
12426+#define GL_T2F_N3F_V3F 0x2A2B
12427+#define GL_T2F_C4F_N3F_V3F 0x2A2C
12428+#define GL_T4F_C4F_N3F_V4F 0x2A2D
12429+
12430+/* Matrix Mode */
12431+#define GL_MATRIX_MODE 0x0BA0
12432+#define GL_MODELVIEW 0x1700
12433+#define GL_PROJECTION 0x1701
12434+#define GL_TEXTURE 0x1702
12435+
12436+/* Points */
12437+#define GL_POINT_SMOOTH 0x0B10
12438+#define GL_POINT_SIZE 0x0B11
12439+#define GL_POINT_SIZE_GRANULARITY 0x0B13
12440+#define GL_POINT_SIZE_RANGE 0x0B12
12441+
12442+/* Lines */
12443+#define GL_LINE_SMOOTH 0x0B20
12444+#define GL_LINE_STIPPLE 0x0B24
12445+#define GL_LINE_STIPPLE_PATTERN 0x0B25
12446+#define GL_LINE_STIPPLE_REPEAT 0x0B26
12447+#define GL_LINE_WIDTH 0x0B21
12448+#define GL_LINE_WIDTH_GRANULARITY 0x0B23
12449+#define GL_LINE_WIDTH_RANGE 0x0B22
12450+
12451+/* Polygons */
12452+#define GL_POINT 0x1B00
12453+#define GL_LINE 0x1B01
12454+#define GL_FILL 0x1B02
12455+#define GL_CW 0x0900
12456+#define GL_CCW 0x0901
12457+#define GL_FRONT 0x0404
12458+#define GL_BACK 0x0405
12459+#define GL_POLYGON_MODE 0x0B40
12460+#define GL_POLYGON_SMOOTH 0x0B41
12461+#define GL_POLYGON_STIPPLE 0x0B42
12462+#define GL_EDGE_FLAG 0x0B43
12463+#define GL_CULL_FACE 0x0B44
12464+#define GL_CULL_FACE_MODE 0x0B45
12465+#define GL_FRONT_FACE 0x0B46
12466+#define GL_POLYGON_OFFSET_FACTOR 0x8038
12467+#define GL_POLYGON_OFFSET_UNITS 0x2A00
12468+#define GL_POLYGON_OFFSET_POINT 0x2A01
12469+#define GL_POLYGON_OFFSET_LINE 0x2A02
12470+#define GL_POLYGON_OFFSET_FILL 0x8037
12471+
12472+/* Display Lists */
12473+#define GL_COMPILE 0x1300
12474+#define GL_COMPILE_AND_EXECUTE 0x1301
12475+#define GL_LIST_BASE 0x0B32
12476+#define GL_LIST_INDEX 0x0B33
12477+#define GL_LIST_MODE 0x0B30
12478+
12479+/* Depth buffer */
12480+#define GL_NEVER 0x0200
12481+#define GL_LESS 0x0201
12482+#define GL_EQUAL 0x0202
12483+#define GL_LEQUAL 0x0203
12484+#define GL_GREATER 0x0204
12485+#define GL_NOTEQUAL 0x0205
12486+#define GL_GEQUAL 0x0206
12487+#define GL_ALWAYS 0x0207
12488+#define GL_DEPTH_TEST 0x0B71
12489+#define GL_DEPTH_BITS 0x0D56
12490+#define GL_DEPTH_CLEAR_VALUE 0x0B73
12491+#define GL_DEPTH_FUNC 0x0B74
12492+#define GL_DEPTH_RANGE 0x0B70
12493+#define GL_DEPTH_WRITEMASK 0x0B72
12494+#define GL_DEPTH_COMPONENT 0x1902
12495+
12496+/* Lighting */
12497+#define GL_LIGHTING 0x0B50
12498+#define GL_LIGHT0 0x4000
12499+#define GL_LIGHT1 0x4001
12500+#define GL_LIGHT2 0x4002
12501+#define GL_LIGHT3 0x4003
12502+#define GL_LIGHT4 0x4004
12503+#define GL_LIGHT5 0x4005
12504+#define GL_LIGHT6 0x4006
12505+#define GL_LIGHT7 0x4007
12506+#define GL_SPOT_EXPONENT 0x1205
12507+#define GL_SPOT_CUTOFF 0x1206
12508+#define GL_CONSTANT_ATTENUATION 0x1207
12509+#define GL_LINEAR_ATTENUATION 0x1208
12510+#define GL_QUADRATIC_ATTENUATION 0x1209
12511+#define GL_AMBIENT 0x1200
12512+#define GL_DIFFUSE 0x1201
12513+#define GL_SPECULAR 0x1202
12514+#define GL_SHININESS 0x1601
12515+#define GL_EMISSION 0x1600
12516+#define GL_POSITION 0x1203
12517+#define GL_SPOT_DIRECTION 0x1204
12518+#define GL_AMBIENT_AND_DIFFUSE 0x1602
12519+#define GL_COLOR_INDEXES 0x1603
12520+#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
12521+#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
12522+#define GL_LIGHT_MODEL_AMBIENT 0x0B53
12523+#define GL_FRONT_AND_BACK 0x0408
12524+#define GL_SHADE_MODEL 0x0B54
12525+#define GL_FLAT 0x1D00
12526+#define GL_SMOOTH 0x1D01
12527+#define GL_COLOR_MATERIAL 0x0B57
12528+#define GL_COLOR_MATERIAL_FACE 0x0B55
12529+#define GL_COLOR_MATERIAL_PARAMETER 0x0B56
12530+#define GL_NORMALIZE 0x0BA1
12531+
12532+/* User clipping planes */
12533+#define GL_CLIP_PLANE0 0x3000
12534+#define GL_CLIP_PLANE1 0x3001
12535+#define GL_CLIP_PLANE2 0x3002
12536+#define GL_CLIP_PLANE3 0x3003
12537+#define GL_CLIP_PLANE4 0x3004
12538+#define GL_CLIP_PLANE5 0x3005
12539+
12540+/* Accumulation buffer */
12541+#define GL_ACCUM_RED_BITS 0x0D58
12542+#define GL_ACCUM_GREEN_BITS 0x0D59
12543+#define GL_ACCUM_BLUE_BITS 0x0D5A
12544+#define GL_ACCUM_ALPHA_BITS 0x0D5B
12545+#define GL_ACCUM_CLEAR_VALUE 0x0B80
12546+#define GL_ACCUM 0x0100
12547+#define GL_ADD 0x0104
12548+#define GL_LOAD 0x0101
12549+#define GL_MULT 0x0103
12550+#define GL_RETURN 0x0102
12551+
12552+/* Alpha testing */
12553+#define GL_ALPHA_TEST 0x0BC0
12554+#define GL_ALPHA_TEST_REF 0x0BC2
12555+#define GL_ALPHA_TEST_FUNC 0x0BC1
12556+
12557+/* Blending */
12558+#define GL_BLEND 0x0BE2
12559+#define GL_BLEND_SRC 0x0BE1
12560+#define GL_BLEND_DST 0x0BE0
12561+#define GL_ZERO 0x0
12562+#define GL_ONE 0x1
12563+#define GL_SRC_COLOR 0x0300
12564+#define GL_ONE_MINUS_SRC_COLOR 0x0301
12565+#define GL_SRC_ALPHA 0x0302
12566+#define GL_ONE_MINUS_SRC_ALPHA 0x0303
12567+#define GL_DST_ALPHA 0x0304
12568+#define GL_ONE_MINUS_DST_ALPHA 0x0305
12569+#define GL_DST_COLOR 0x0306
12570+#define GL_ONE_MINUS_DST_COLOR 0x0307
12571+#define GL_SRC_ALPHA_SATURATE 0x0308
12572+
12573+/* Render Mode */
12574+#define GL_FEEDBACK 0x1C01
12575+#define GL_RENDER 0x1C00
12576+#define GL_SELECT 0x1C02
12577+
12578+/* Feedback */
12579+#define GL_2D 0x0600
12580+#define GL_3D 0x0601
12581+#define GL_3D_COLOR 0x0602
12582+#define GL_3D_COLOR_TEXTURE 0x0603
12583+#define GL_4D_COLOR_TEXTURE 0x0604
12584+#define GL_POINT_TOKEN 0x0701
12585+#define GL_LINE_TOKEN 0x0702
12586+#define GL_LINE_RESET_TOKEN 0x0707
12587+#define GL_POLYGON_TOKEN 0x0703
12588+#define GL_BITMAP_TOKEN 0x0704
12589+#define GL_DRAW_PIXEL_TOKEN 0x0705
12590+#define GL_COPY_PIXEL_TOKEN 0x0706
12591+#define GL_PASS_THROUGH_TOKEN 0x0700
12592+#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0
12593+#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1
12594+#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
12595+
12596+/* Selection */
12597+#define GL_SELECTION_BUFFER_POINTER 0x0DF3
12598+#define GL_SELECTION_BUFFER_SIZE 0x0DF4
12599+
12600+/* Fog */
12601+#define GL_FOG 0x0B60
12602+#define GL_FOG_MODE 0x0B65
12603+#define GL_FOG_DENSITY 0x0B62
12604+#define GL_FOG_COLOR 0x0B66
12605+#define GL_FOG_INDEX 0x0B61
12606+#define GL_FOG_START 0x0B63
12607+#define GL_FOG_END 0x0B64
12608+#define GL_LINEAR 0x2601
12609+#define GL_EXP 0x0800
12610+#define GL_EXP2 0x0801
12611+
12612+/* Logic Ops */
12613+#define GL_LOGIC_OP 0x0BF1
12614+#define GL_INDEX_LOGIC_OP 0x0BF1
12615+#define GL_COLOR_LOGIC_OP 0x0BF2
12616+#define GL_LOGIC_OP_MODE 0x0BF0
12617+#define GL_CLEAR 0x1500
12618+#define GL_SET 0x150F
12619+#define GL_COPY 0x1503
12620+#define GL_COPY_INVERTED 0x150C
12621+#define GL_NOOP 0x1505
12622+#define GL_INVERT 0x150A
12623+#define GL_AND 0x1501
12624+#define GL_NAND 0x150E
12625+#define GL_OR 0x1507
12626+#define GL_NOR 0x1508
12627+#define GL_XOR 0x1506
12628+#define GL_EQUIV 0x1509
12629+#define GL_AND_REVERSE 0x1502
12630+#define GL_AND_INVERTED 0x1504
12631+#define GL_OR_REVERSE 0x150B
12632+#define GL_OR_INVERTED 0x150D
12633+
12634+/* Stencil */
12635+#define GL_STENCIL_BITS 0x0D57
12636+#define GL_STENCIL_TEST 0x0B90
12637+#define GL_STENCIL_CLEAR_VALUE 0x0B91
12638+#define GL_STENCIL_FUNC 0x0B92
12639+#define GL_STENCIL_VALUE_MASK 0x0B93
12640+#define GL_STENCIL_FAIL 0x0B94
12641+#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
12642+#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
12643+#define GL_STENCIL_REF 0x0B97
12644+#define GL_STENCIL_WRITEMASK 0x0B98
12645+#define GL_STENCIL_INDEX 0x1901
12646+#define GL_KEEP 0x1E00
12647+#define GL_REPLACE 0x1E01
12648+#define GL_INCR 0x1E02
12649+#define GL_DECR 0x1E03
12650+
12651+/* Buffers, Pixel Drawing/Reading */
12652+#define GL_NONE 0x0
12653+#define GL_LEFT 0x0406
12654+#define GL_RIGHT 0x0407
12655+/*GL_FRONT 0x0404 */
12656+/*GL_BACK 0x0405 */
12657+/*GL_FRONT_AND_BACK 0x0408 */
12658+#define GL_FRONT_LEFT 0x0400
12659+#define GL_FRONT_RIGHT 0x0401
12660+#define GL_BACK_LEFT 0x0402
12661+#define GL_BACK_RIGHT 0x0403
12662+#define GL_AUX0 0x0409
12663+#define GL_AUX1 0x040A
12664+#define GL_AUX2 0x040B
12665+#define GL_AUX3 0x040C
12666+#define GL_COLOR_INDEX 0x1900
12667+#define GL_RED 0x1903
12668+#define GL_GREEN 0x1904
12669+#define GL_BLUE 0x1905
12670+#define GL_ALPHA 0x1906
12671+#define GL_LUMINANCE 0x1909
12672+#define GL_LUMINANCE_ALPHA 0x190A
12673+#define GL_ALPHA_BITS 0x0D55
12674+#define GL_RED_BITS 0x0D52
12675+#define GL_GREEN_BITS 0x0D53
12676+#define GL_BLUE_BITS 0x0D54
12677+#define GL_INDEX_BITS 0x0D51
12678+#define GL_SUBPIXEL_BITS 0x0D50
12679+#define GL_AUX_BUFFERS 0x0C00
12680+#define GL_READ_BUFFER 0x0C02
12681+#define GL_DRAW_BUFFER 0x0C01
12682+#define GL_DOUBLEBUFFER 0x0C32
12683+#define GL_STEREO 0x0C33
12684+#define GL_BITMAP 0x1A00
12685+#define GL_COLOR 0x1800
12686+#define GL_DEPTH 0x1801
12687+#define GL_STENCIL 0x1802
12688+#define GL_DITHER 0x0BD0
12689+#define GL_RGB 0x1907
12690+#define GL_RGBA 0x1908
12691+
12692+/* Implementation limits */
12693+#define GL_MAX_LIST_NESTING 0x0B31
12694+#define GL_MAX_EVAL_ORDER 0x0D30
12695+#define GL_MAX_LIGHTS 0x0D31
12696+#define GL_MAX_CLIP_PLANES 0x0D32
12697+#define GL_MAX_TEXTURE_SIZE 0x0D33
12698+#define GL_MAX_PIXEL_MAP_TABLE 0x0D34
12699+#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
12700+#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
12701+#define GL_MAX_NAME_STACK_DEPTH 0x0D37
12702+#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
12703+#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
12704+#define GL_MAX_VIEWPORT_DIMS 0x0D3A
12705+#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
12706+
12707+/* Gets */
12708+#define GL_ATTRIB_STACK_DEPTH 0x0BB0
12709+#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
12710+#define GL_COLOR_CLEAR_VALUE 0x0C22
12711+#define GL_COLOR_WRITEMASK 0x0C23
12712+#define GL_CURRENT_INDEX 0x0B01
12713+#define GL_CURRENT_COLOR 0x0B00
12714+#define GL_CURRENT_NORMAL 0x0B02
12715+#define GL_CURRENT_RASTER_COLOR 0x0B04
12716+#define GL_CURRENT_RASTER_DISTANCE 0x0B09
12717+#define GL_CURRENT_RASTER_INDEX 0x0B05
12718+#define GL_CURRENT_RASTER_POSITION 0x0B07
12719+#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
12720+#define GL_CURRENT_RASTER_POSITION_VALID 0x0B08
12721+#define GL_CURRENT_TEXTURE_COORDS 0x0B03
12722+#define GL_INDEX_CLEAR_VALUE 0x0C20
12723+#define GL_INDEX_MODE 0x0C30
12724+#define GL_INDEX_WRITEMASK 0x0C21
12725+#define GL_MODELVIEW_MATRIX 0x0BA6
12726+#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
12727+#define GL_NAME_STACK_DEPTH 0x0D70
12728+#define GL_PROJECTION_MATRIX 0x0BA7
12729+#define GL_PROJECTION_STACK_DEPTH 0x0BA4
12730+#define GL_RENDER_MODE 0x0C40
12731+#define GL_RGBA_MODE 0x0C31
12732+#define GL_TEXTURE_MATRIX 0x0BA8
12733+#define GL_TEXTURE_STACK_DEPTH 0x0BA5
12734+#define GL_VIEWPORT 0x0BA2
12735+
12736+/* Evaluators */
12737+#define GL_AUTO_NORMAL 0x0D80
12738+#define GL_MAP1_COLOR_4 0x0D90
12739+#define GL_MAP1_INDEX 0x0D91
12740+#define GL_MAP1_NORMAL 0x0D92
12741+#define GL_MAP1_TEXTURE_COORD_1 0x0D93
12742+#define GL_MAP1_TEXTURE_COORD_2 0x0D94
12743+#define GL_MAP1_TEXTURE_COORD_3 0x0D95
12744+#define GL_MAP1_TEXTURE_COORD_4 0x0D96
12745+#define GL_MAP1_VERTEX_3 0x0D97
12746+#define GL_MAP1_VERTEX_4 0x0D98
12747+#define GL_MAP2_COLOR_4 0x0DB0
12748+#define GL_MAP2_INDEX 0x0DB1
12749+#define GL_MAP2_NORMAL 0x0DB2
12750+#define GL_MAP2_TEXTURE_COORD_1 0x0DB3
12751+#define GL_MAP2_TEXTURE_COORD_2 0x0DB4
12752+#define GL_MAP2_TEXTURE_COORD_3 0x0DB5
12753+#define GL_MAP2_TEXTURE_COORD_4 0x0DB6
12754+#define GL_MAP2_VERTEX_3 0x0DB7
12755+#define GL_MAP2_VERTEX_4 0x0DB8
12756+#define GL_MAP1_GRID_DOMAIN 0x0DD0
12757+#define GL_MAP1_GRID_SEGMENTS 0x0DD1
12758+#define GL_MAP2_GRID_DOMAIN 0x0DD2
12759+#define GL_MAP2_GRID_SEGMENTS 0x0DD3
12760+#define GL_COEFF 0x0A00
12761+#define GL_ORDER 0x0A01
12762+#define GL_DOMAIN 0x0A02
12763+
12764+/* Hints */
12765+#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
12766+#define GL_POINT_SMOOTH_HINT 0x0C51
12767+#define GL_LINE_SMOOTH_HINT 0x0C52
12768+#define GL_POLYGON_SMOOTH_HINT 0x0C53
12769+#define GL_FOG_HINT 0x0C54
12770+#define GL_DONT_CARE 0x1100
12771+#define GL_FASTEST 0x1101
12772+#define GL_NICEST 0x1102
12773+
12774+/* Scissor box */
12775+#define GL_SCISSOR_BOX 0x0C10
12776+#define GL_SCISSOR_TEST 0x0C11
12777+
12778+/* Pixel Mode / Transfer */
12779+#define GL_MAP_COLOR 0x0D10
12780+#define GL_MAP_STENCIL 0x0D11
12781+#define GL_INDEX_SHIFT 0x0D12
12782+#define GL_INDEX_OFFSET 0x0D13
12783+#define GL_RED_SCALE 0x0D14
12784+#define GL_RED_BIAS 0x0D15
12785+#define GL_GREEN_SCALE 0x0D18
12786+#define GL_GREEN_BIAS 0x0D19
12787+#define GL_BLUE_SCALE 0x0D1A
12788+#define GL_BLUE_BIAS 0x0D1B
12789+#define GL_ALPHA_SCALE 0x0D1C
12790+#define GL_ALPHA_BIAS 0x0D1D
12791+#define GL_DEPTH_SCALE 0x0D1E
12792+#define GL_DEPTH_BIAS 0x0D1F
12793+#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
12794+#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
12795+#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
12796+#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
12797+#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
12798+#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
12799+#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
12800+#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
12801+#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
12802+#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
12803+#define GL_PIXEL_MAP_S_TO_S 0x0C71
12804+#define GL_PIXEL_MAP_I_TO_I 0x0C70
12805+#define GL_PIXEL_MAP_I_TO_R 0x0C72
12806+#define GL_PIXEL_MAP_I_TO_G 0x0C73
12807+#define GL_PIXEL_MAP_I_TO_B 0x0C74
12808+#define GL_PIXEL_MAP_I_TO_A 0x0C75
12809+#define GL_PIXEL_MAP_R_TO_R 0x0C76
12810+#define GL_PIXEL_MAP_G_TO_G 0x0C77
12811+#define GL_PIXEL_MAP_B_TO_B 0x0C78
12812+#define GL_PIXEL_MAP_A_TO_A 0x0C79
12813+#define GL_PACK_ALIGNMENT 0x0D05
12814+#define GL_PACK_LSB_FIRST 0x0D01
12815+#define GL_PACK_ROW_LENGTH 0x0D02
12816+#define GL_PACK_SKIP_PIXELS 0x0D04
12817+#define GL_PACK_SKIP_ROWS 0x0D03
12818+#define GL_PACK_SWAP_BYTES 0x0D00
12819+#define GL_UNPACK_ALIGNMENT 0x0CF5
12820+#define GL_UNPACK_LSB_FIRST 0x0CF1
12821+#define GL_UNPACK_ROW_LENGTH 0x0CF2
12822+#define GL_UNPACK_SKIP_PIXELS 0x0CF4
12823+#define GL_UNPACK_SKIP_ROWS 0x0CF3
12824+#define GL_UNPACK_SWAP_BYTES 0x0CF0
12825+#define GL_ZOOM_X 0x0D16
12826+#define GL_ZOOM_Y 0x0D17
12827+
12828+/* Texture mapping */
12829+#define GL_TEXTURE_ENV 0x2300
12830+#define GL_TEXTURE_ENV_MODE 0x2200
12831+#define GL_TEXTURE_1D 0x0DE0
12832+#define GL_TEXTURE_2D 0x0DE1
12833+#define GL_TEXTURE_WRAP_S 0x2802
12834+#define GL_TEXTURE_WRAP_T 0x2803
12835+#define GL_TEXTURE_MAG_FILTER 0x2800
12836+#define GL_TEXTURE_MIN_FILTER 0x2801
12837+#define GL_TEXTURE_ENV_COLOR 0x2201
12838+#define GL_TEXTURE_GEN_S 0x0C60
12839+#define GL_TEXTURE_GEN_T 0x0C61
12840+#define GL_TEXTURE_GEN_MODE 0x2500
12841+#define GL_TEXTURE_BORDER_COLOR 0x1004
12842+#define GL_TEXTURE_WIDTH 0x1000
12843+#define GL_TEXTURE_HEIGHT 0x1001
12844+#define GL_TEXTURE_BORDER 0x1005
12845+#define GL_TEXTURE_COMPONENTS 0x1003
12846+#define GL_TEXTURE_RED_SIZE 0x805C
12847+#define GL_TEXTURE_GREEN_SIZE 0x805D
12848+#define GL_TEXTURE_BLUE_SIZE 0x805E
12849+#define GL_TEXTURE_ALPHA_SIZE 0x805F
12850+#define GL_TEXTURE_LUMINANCE_SIZE 0x8060
12851+#define GL_TEXTURE_INTENSITY_SIZE 0x8061
12852+#define GL_NEAREST_MIPMAP_NEAREST 0x2700
12853+#define GL_NEAREST_MIPMAP_LINEAR 0x2702
12854+#define GL_LINEAR_MIPMAP_NEAREST 0x2701
12855+#define GL_LINEAR_MIPMAP_LINEAR 0x2703
12856+#define GL_OBJECT_LINEAR 0x2401
12857+#define GL_OBJECT_PLANE 0x2501
12858+#define GL_EYE_LINEAR 0x2400
12859+#define GL_EYE_PLANE 0x2502
12860+#define GL_SPHERE_MAP 0x2402
12861+#define GL_DECAL 0x2101
12862+#define GL_MODULATE 0x2100
12863+#define GL_NEAREST 0x2600
12864+#define GL_REPEAT 0x2901
12865+#define GL_CLAMP 0x2900
12866+#define GL_S 0x2000
12867+#define GL_T 0x2001
12868+#define GL_R 0x2002
12869+#define GL_Q 0x2003
12870+#define GL_TEXTURE_GEN_R 0x0C62
12871+#define GL_TEXTURE_GEN_Q 0x0C63
12872+
12873+/* Utility */
12874+#define GL_VENDOR 0x1F00
12875+#define GL_RENDERER 0x1F01
12876+#define GL_VERSION 0x1F02
12877+#define GL_EXTENSIONS 0x1F03
12878+
12879+/* Errors */
12880+#define GL_NO_ERROR 0x0
12881+#define GL_INVALID_ENUM 0x0500
12882+#define GL_INVALID_VALUE 0x0501
12883+#define GL_INVALID_OPERATION 0x0502
12884+#define GL_STACK_OVERFLOW 0x0503
12885+#define GL_STACK_UNDERFLOW 0x0504
12886+#define GL_OUT_OF_MEMORY 0x0505
12887+
12888+/* glPush/PopAttrib bits */
12889+#define GL_CURRENT_BIT 0x00000001
12890+#define GL_POINT_BIT 0x00000002
12891+#define GL_LINE_BIT 0x00000004
12892+#define GL_POLYGON_BIT 0x00000008
12893+#define GL_POLYGON_STIPPLE_BIT 0x00000010
12894+#define GL_PIXEL_MODE_BIT 0x00000020
12895+#define GL_LIGHTING_BIT 0x00000040
12896+#define GL_FOG_BIT 0x00000080
12897+#define GL_DEPTH_BUFFER_BIT 0x00000100
12898+#define GL_ACCUM_BUFFER_BIT 0x00000200
12899+#define GL_STENCIL_BUFFER_BIT 0x00000400
12900+#define GL_VIEWPORT_BIT 0x00000800
12901+#define GL_TRANSFORM_BIT 0x00001000
12902+#define GL_ENABLE_BIT 0x00002000
12903+#define GL_COLOR_BUFFER_BIT 0x00004000
12904+#define GL_HINT_BIT 0x00008000
12905+#define GL_EVAL_BIT 0x00010000
12906+#define GL_LIST_BIT 0x00020000
12907+#define GL_TEXTURE_BIT 0x00040000
12908+#define GL_SCISSOR_BIT 0x00080000
12909+#define GL_ALL_ATTRIB_BITS 0x000FFFFF
12910+
12911+
12912+/* OpenGL 1.1 */
12913+#define GL_PROXY_TEXTURE_1D 0x8063
12914+#define GL_PROXY_TEXTURE_2D 0x8064
12915+#define GL_TEXTURE_PRIORITY 0x8066
12916+#define GL_TEXTURE_RESIDENT 0x8067
12917+#define GL_TEXTURE_BINDING_1D 0x8068
12918+#define GL_TEXTURE_BINDING_2D 0x8069
12919+#define GL_TEXTURE_INTERNAL_FORMAT 0x1003
12920+#define GL_ALPHA4 0x803B
12921+#define GL_ALPHA8 0x803C
12922+#define GL_ALPHA12 0x803D
12923+#define GL_ALPHA16 0x803E
12924+#define GL_LUMINANCE4 0x803F
12925+#define GL_LUMINANCE8 0x8040
12926+#define GL_LUMINANCE12 0x8041
12927+#define GL_LUMINANCE16 0x8042
12928+#define GL_LUMINANCE4_ALPHA4 0x8043
12929+#define GL_LUMINANCE6_ALPHA2 0x8044
12930+#define GL_LUMINANCE8_ALPHA8 0x8045
12931+#define GL_LUMINANCE12_ALPHA4 0x8046
12932+#define GL_LUMINANCE12_ALPHA12 0x8047
12933+#define GL_LUMINANCE16_ALPHA16 0x8048
12934+#define GL_INTENSITY 0x8049
12935+#define GL_INTENSITY4 0x804A
12936+#define GL_INTENSITY8 0x804B
12937+#define GL_INTENSITY12 0x804C
12938+#define GL_INTENSITY16 0x804D
12939+#define GL_R3_G3_B2 0x2A10
12940+#define GL_RGB4 0x804F
12941+#define GL_RGB5 0x8050
12942+#define GL_RGB8 0x8051
12943+#define GL_RGB10 0x8052
12944+#define GL_RGB12 0x8053
12945+#define GL_RGB16 0x8054
12946+#define GL_RGBA2 0x8055
12947+#define GL_RGBA4 0x8056
12948+#define GL_RGB5_A1 0x8057
12949+#define GL_RGBA8 0x8058
12950+#define GL_RGB10_A2 0x8059
12951+#define GL_RGBA12 0x805A
12952+#define GL_RGBA16 0x805B
12953+#define GL_CLIENT_PIXEL_STORE_BIT 0x00000001
12954+#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
12955+#define GL_ALL_CLIENT_ATTRIB_BITS 0xFFFFFFFF
12956+#define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF
12957+
12958+
12959+
12960+/*
12961+ * Miscellaneous
12962+ */
12963+
12964+GLAPI void GLAPIENTRY glClearIndex( GLfloat c );
12965+
12966+GLAPI void GLAPIENTRY glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
12967+
12968+GLAPI void GLAPIENTRY glClear( GLbitfield mask );
12969+
12970+GLAPI void GLAPIENTRY glIndexMask( GLuint mask );
12971+
12972+GLAPI void GLAPIENTRY glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );
12973+
12974+GLAPI void GLAPIENTRY glAlphaFunc( GLenum func, GLclampf ref );
12975+
12976+GLAPI void GLAPIENTRY glBlendFunc( GLenum sfactor, GLenum dfactor );
12977+
12978+GLAPI void GLAPIENTRY glLogicOp( GLenum opcode );
12979+
12980+GLAPI void GLAPIENTRY glCullFace( GLenum mode );
12981+
12982+GLAPI void GLAPIENTRY glFrontFace( GLenum mode );
12983+
12984+GLAPI void GLAPIENTRY glPointSize( GLfloat size );
12985+
12986+GLAPI void GLAPIENTRY glLineWidth( GLfloat width );
12987+
12988+GLAPI void GLAPIENTRY glLineStipple( GLint factor, GLushort pattern );
12989+
12990+GLAPI void GLAPIENTRY glPolygonMode( GLenum face, GLenum mode );
12991+
12992+GLAPI void GLAPIENTRY glPolygonOffset( GLfloat factor, GLfloat units );
12993+
12994+GLAPI void GLAPIENTRY glPolygonStipple( const GLubyte *mask );
12995+
12996+GLAPI void GLAPIENTRY glGetPolygonStipple( GLubyte *mask );
12997+
12998+GLAPI void GLAPIENTRY glEdgeFlag( GLboolean flag );
12999+
13000+GLAPI void GLAPIENTRY glEdgeFlagv( const GLboolean *flag );
13001+
13002+GLAPI void GLAPIENTRY glScissor( GLint x, GLint y, GLsizei width, GLsizei height);
13003+
13004+GLAPI void GLAPIENTRY glClipPlane( GLenum plane, const GLdouble *equation );
13005+
13006+GLAPI void GLAPIENTRY glGetClipPlane( GLenum plane, GLdouble *equation );
13007+
13008+GLAPI void GLAPIENTRY glDrawBuffer( GLenum mode );
13009+
13010+GLAPI void GLAPIENTRY glReadBuffer( GLenum mode );
13011+
13012+GLAPI void GLAPIENTRY glEnable( GLenum cap );
13013+
13014+GLAPI void GLAPIENTRY glDisable( GLenum cap );
13015+
13016+GLAPI GLboolean GLAPIENTRY glIsEnabled( GLenum cap );
13017+
13018+
13019+GLAPI void GLAPIENTRY glEnableClientState( GLenum cap ); /* 1.1 */
13020+
13021+GLAPI void GLAPIENTRY glDisableClientState( GLenum cap ); /* 1.1 */
13022+
13023+
13024+GLAPI void GLAPIENTRY glGetBooleanv( GLenum pname, GLboolean *params );
13025+
13026+GLAPI void GLAPIENTRY glGetDoublev( GLenum pname, GLdouble *params );
13027+
13028+GLAPI void GLAPIENTRY glGetFloatv( GLenum pname, GLfloat *params );
13029+
13030+GLAPI void GLAPIENTRY glGetIntegerv( GLenum pname, GLint *params );
13031+
13032+
13033+GLAPI void GLAPIENTRY glPushAttrib( GLbitfield mask );
13034+
13035+GLAPI void GLAPIENTRY glPopAttrib( void );
13036+
13037+
13038+GLAPI void GLAPIENTRY glPushClientAttrib( GLbitfield mask ); /* 1.1 */
13039+
13040+GLAPI void GLAPIENTRY glPopClientAttrib( void ); /* 1.1 */
13041+
13042+
13043+GLAPI GLint GLAPIENTRY glRenderMode( GLenum mode );
13044+
13045+GLAPI GLenum GLAPIENTRY glGetError( void );
13046+
13047+GLAPI const GLubyte * GLAPIENTRY glGetString( GLenum name );
13048+
13049+GLAPI void GLAPIENTRY glFinish( void );
13050+
13051+GLAPI void GLAPIENTRY glFlush( void );
13052+
13053+GLAPI void GLAPIENTRY glHint( GLenum target, GLenum mode );
13054+
13055+
13056+/*
13057+ * Depth Buffer
13058+ */
13059+
13060+GLAPI void GLAPIENTRY glClearDepth( GLclampd depth );
13061+
13062+GLAPI void GLAPIENTRY glDepthFunc( GLenum func );
13063+
13064+GLAPI void GLAPIENTRY glDepthMask( GLboolean flag );
13065+
13066+GLAPI void GLAPIENTRY glDepthRange( GLclampd near_val, GLclampd far_val );
13067+
13068+
13069+/*
13070+ * Accumulation Buffer
13071+ */
13072+
13073+GLAPI void GLAPIENTRY glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
13074+
13075+GLAPI void GLAPIENTRY glAccum( GLenum op, GLfloat value );
13076+
13077+
13078+/*
13079+ * Transformation
13080+ */
13081+
13082+GLAPI void GLAPIENTRY glMatrixMode( GLenum mode );
13083+
13084+GLAPI void GLAPIENTRY glOrtho( GLdouble left, GLdouble right,
13085+ GLdouble bottom, GLdouble top,
13086+ GLdouble near_val, GLdouble far_val );
13087+
13088+GLAPI void GLAPIENTRY glFrustum( GLdouble left, GLdouble right,
13089+ GLdouble bottom, GLdouble top,
13090+ GLdouble near_val, GLdouble far_val );
13091+
13092+GLAPI void GLAPIENTRY glViewport( GLint x, GLint y,
13093+ GLsizei width, GLsizei height );
13094+
13095+GLAPI void GLAPIENTRY glPushMatrix( void );
13096+
13097+GLAPI void GLAPIENTRY glPopMatrix( void );
13098+
13099+GLAPI void GLAPIENTRY glLoadIdentity( void );
13100+
13101+GLAPI void GLAPIENTRY glLoadMatrixd( const GLdouble *m );
13102+GLAPI void GLAPIENTRY glLoadMatrixf( const GLfloat *m );
13103+
13104+GLAPI void GLAPIENTRY glMultMatrixd( const GLdouble *m );
13105+GLAPI void GLAPIENTRY glMultMatrixf( const GLfloat *m );
13106+
13107+GLAPI void GLAPIENTRY glRotated( GLdouble angle,
13108+ GLdouble x, GLdouble y, GLdouble z );
13109+GLAPI void GLAPIENTRY glRotatef( GLfloat angle,
13110+ GLfloat x, GLfloat y, GLfloat z );
13111+
13112+GLAPI void GLAPIENTRY glScaled( GLdouble x, GLdouble y, GLdouble z );
13113+GLAPI void GLAPIENTRY glScalef( GLfloat x, GLfloat y, GLfloat z );
13114+
13115+GLAPI void GLAPIENTRY glTranslated( GLdouble x, GLdouble y, GLdouble z );
13116+GLAPI void GLAPIENTRY glTranslatef( GLfloat x, GLfloat y, GLfloat z );
13117+
13118+
13119+/*
13120+ * Display Lists
13121+ */
13122+
13123+GLAPI GLboolean GLAPIENTRY glIsList( GLuint list );
13124+
13125+GLAPI void GLAPIENTRY glDeleteLists( GLuint list, GLsizei range );
13126+
13127+GLAPI GLuint GLAPIENTRY glGenLists( GLsizei range );
13128+
13129+GLAPI void GLAPIENTRY glNewList( GLuint list, GLenum mode );
13130+
13131+GLAPI void GLAPIENTRY glEndList( void );
13132+
13133+GLAPI void GLAPIENTRY glCallList( GLuint list );
13134+
13135+GLAPI void GLAPIENTRY glCallLists( GLsizei n, GLenum type,
13136+ const GLvoid *lists );
13137+
13138+GLAPI void GLAPIENTRY glListBase( GLuint base );
13139+
13140+
13141+/*
13142+ * Drawing Functions
13143+ */
13144+
13145+GLAPI void GLAPIENTRY glBegin( GLenum mode );
13146+
13147+GLAPI void GLAPIENTRY glEnd( void );
13148+
13149+
13150+GLAPI void GLAPIENTRY glVertex2d( GLdouble x, GLdouble y );
13151+GLAPI void GLAPIENTRY glVertex2f( GLfloat x, GLfloat y );
13152+GLAPI void GLAPIENTRY glVertex2i( GLint x, GLint y );
13153+GLAPI void GLAPIENTRY glVertex2s( GLshort x, GLshort y );
13154+
13155+GLAPI void GLAPIENTRY glVertex3d( GLdouble x, GLdouble y, GLdouble z );
13156+GLAPI void GLAPIENTRY glVertex3f( GLfloat x, GLfloat y, GLfloat z );
13157+GLAPI void GLAPIENTRY glVertex3i( GLint x, GLint y, GLint z );
13158+GLAPI void GLAPIENTRY glVertex3s( GLshort x, GLshort y, GLshort z );
13159+
13160+GLAPI void GLAPIENTRY glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
13161+GLAPI void GLAPIENTRY glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
13162+GLAPI void GLAPIENTRY glVertex4i( GLint x, GLint y, GLint z, GLint w );
13163+GLAPI void GLAPIENTRY glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w );
13164+
13165+GLAPI void GLAPIENTRY glVertex2dv( const GLdouble *v );
13166+GLAPI void GLAPIENTRY glVertex2fv( const GLfloat *v );
13167+GLAPI void GLAPIENTRY glVertex2iv( const GLint *v );
13168+GLAPI void GLAPIENTRY glVertex2sv( const GLshort *v );
13169+
13170+GLAPI void GLAPIENTRY glVertex3dv( const GLdouble *v );
13171+GLAPI void GLAPIENTRY glVertex3fv( const GLfloat *v );
13172+GLAPI void GLAPIENTRY glVertex3iv( const GLint *v );
13173+GLAPI void GLAPIENTRY glVertex3sv( const GLshort *v );
13174+
13175+GLAPI void GLAPIENTRY glVertex4dv( const GLdouble *v );
13176+GLAPI void GLAPIENTRY glVertex4fv( const GLfloat *v );
13177+GLAPI void GLAPIENTRY glVertex4iv( const GLint *v );
13178+GLAPI void GLAPIENTRY glVertex4sv( const GLshort *v );
13179+
13180+
13181+GLAPI void GLAPIENTRY glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz );
13182+GLAPI void GLAPIENTRY glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz );
13183+GLAPI void GLAPIENTRY glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz );
13184+GLAPI void GLAPIENTRY glNormal3i( GLint nx, GLint ny, GLint nz );
13185+GLAPI void GLAPIENTRY glNormal3s( GLshort nx, GLshort ny, GLshort nz );
13186+
13187+GLAPI void GLAPIENTRY glNormal3bv( const GLbyte *v );
13188+GLAPI void GLAPIENTRY glNormal3dv( const GLdouble *v );
13189+GLAPI void GLAPIENTRY glNormal3fv( const GLfloat *v );
13190+GLAPI void GLAPIENTRY glNormal3iv( const GLint *v );
13191+GLAPI void GLAPIENTRY glNormal3sv( const GLshort *v );
13192+
13193+
13194+GLAPI void GLAPIENTRY glIndexd( GLdouble c );
13195+GLAPI void GLAPIENTRY glIndexf( GLfloat c );
13196+GLAPI void GLAPIENTRY glIndexi( GLint c );
13197+GLAPI void GLAPIENTRY glIndexs( GLshort c );
13198+GLAPI void GLAPIENTRY glIndexub( GLubyte c ); /* 1.1 */
13199+
13200+GLAPI void GLAPIENTRY glIndexdv( const GLdouble *c );
13201+GLAPI void GLAPIENTRY glIndexfv( const GLfloat *c );
13202+GLAPI void GLAPIENTRY glIndexiv( const GLint *c );
13203+GLAPI void GLAPIENTRY glIndexsv( const GLshort *c );
13204+GLAPI void GLAPIENTRY glIndexubv( const GLubyte *c ); /* 1.1 */
13205+
13206+GLAPI void GLAPIENTRY glColor3b( GLbyte red, GLbyte green, GLbyte blue );
13207+GLAPI void GLAPIENTRY glColor3d( GLdouble red, GLdouble green, GLdouble blue );
13208+GLAPI void GLAPIENTRY glColor3f( GLfloat red, GLfloat green, GLfloat blue );
13209+GLAPI void GLAPIENTRY glColor3i( GLint red, GLint green, GLint blue );
13210+GLAPI void GLAPIENTRY glColor3s( GLshort red, GLshort green, GLshort blue );
13211+GLAPI void GLAPIENTRY glColor3ub( GLubyte red, GLubyte green, GLubyte blue );
13212+GLAPI void GLAPIENTRY glColor3ui( GLuint red, GLuint green, GLuint blue );
13213+GLAPI void GLAPIENTRY glColor3us( GLushort red, GLushort green, GLushort blue );
13214+
13215+GLAPI void GLAPIENTRY glColor4b( GLbyte red, GLbyte green,
13216+ GLbyte blue, GLbyte alpha );
13217+GLAPI void GLAPIENTRY glColor4d( GLdouble red, GLdouble green,
13218+ GLdouble blue, GLdouble alpha );
13219+GLAPI void GLAPIENTRY glColor4f( GLfloat red, GLfloat green,
13220+ GLfloat blue, GLfloat alpha );
13221+GLAPI void GLAPIENTRY glColor4i( GLint red, GLint green,
13222+ GLint blue, GLint alpha );
13223+GLAPI void GLAPIENTRY glColor4s( GLshort red, GLshort green,
13224+ GLshort blue, GLshort alpha );
13225+GLAPI void GLAPIENTRY glColor4ub( GLubyte red, GLubyte green,
13226+ GLubyte blue, GLubyte alpha );
13227+GLAPI void GLAPIENTRY glColor4ui( GLuint red, GLuint green,
13228+ GLuint blue, GLuint alpha );
13229+GLAPI void GLAPIENTRY glColor4us( GLushort red, GLushort green,
13230+ GLushort blue, GLushort alpha );
13231+
13232+
13233+GLAPI void GLAPIENTRY glColor3bv( const GLbyte *v );
13234+GLAPI void GLAPIENTRY glColor3dv( const GLdouble *v );
13235+GLAPI void GLAPIENTRY glColor3fv( const GLfloat *v );
13236+GLAPI void GLAPIENTRY glColor3iv( const GLint *v );
13237+GLAPI void GLAPIENTRY glColor3sv( const GLshort *v );
13238+GLAPI void GLAPIENTRY glColor3ubv( const GLubyte *v );
13239+GLAPI void GLAPIENTRY glColor3uiv( const GLuint *v );
13240+GLAPI void GLAPIENTRY glColor3usv( const GLushort *v );
13241+
13242+GLAPI void GLAPIENTRY glColor4bv( const GLbyte *v );
13243+GLAPI void GLAPIENTRY glColor4dv( const GLdouble *v );
13244+GLAPI void GLAPIENTRY glColor4fv( const GLfloat *v );
13245+GLAPI void GLAPIENTRY glColor4iv( const GLint *v );
13246+GLAPI void GLAPIENTRY glColor4sv( const GLshort *v );
13247+GLAPI void GLAPIENTRY glColor4ubv( const GLubyte *v );
13248+GLAPI void GLAPIENTRY glColor4uiv( const GLuint *v );
13249+GLAPI void GLAPIENTRY glColor4usv( const GLushort *v );
13250+
13251+
13252+GLAPI void GLAPIENTRY glTexCoord1d( GLdouble s );
13253+GLAPI void GLAPIENTRY glTexCoord1f( GLfloat s );
13254+GLAPI void GLAPIENTRY glTexCoord1i( GLint s );
13255+GLAPI void GLAPIENTRY glTexCoord1s( GLshort s );
13256+
13257+GLAPI void GLAPIENTRY glTexCoord2d( GLdouble s, GLdouble t );
13258+GLAPI void GLAPIENTRY glTexCoord2f( GLfloat s, GLfloat t );
13259+GLAPI void GLAPIENTRY glTexCoord2i( GLint s, GLint t );
13260+GLAPI void GLAPIENTRY glTexCoord2s( GLshort s, GLshort t );
13261+
13262+GLAPI void GLAPIENTRY glTexCoord3d( GLdouble s, GLdouble t, GLdouble r );
13263+GLAPI void GLAPIENTRY glTexCoord3f( GLfloat s, GLfloat t, GLfloat r );
13264+GLAPI void GLAPIENTRY glTexCoord3i( GLint s, GLint t, GLint r );
13265+GLAPI void GLAPIENTRY glTexCoord3s( GLshort s, GLshort t, GLshort r );
13266+
13267+GLAPI void GLAPIENTRY glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q );
13268+GLAPI void GLAPIENTRY glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q );
13269+GLAPI void GLAPIENTRY glTexCoord4i( GLint s, GLint t, GLint r, GLint q );
13270+GLAPI void GLAPIENTRY glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q );
13271+
13272+GLAPI void GLAPIENTRY glTexCoord1dv( const GLdouble *v );
13273+GLAPI void GLAPIENTRY glTexCoord1fv( const GLfloat *v );
13274+GLAPI void GLAPIENTRY glTexCoord1iv( const GLint *v );
13275+GLAPI void GLAPIENTRY glTexCoord1sv( const GLshort *v );
13276+
13277+GLAPI void GLAPIENTRY glTexCoord2dv( const GLdouble *v );
13278+GLAPI void GLAPIENTRY glTexCoord2fv( const GLfloat *v );
13279+GLAPI void GLAPIENTRY glTexCoord2iv( const GLint *v );
13280+GLAPI void GLAPIENTRY glTexCoord2sv( const GLshort *v );
13281+
13282+GLAPI void GLAPIENTRY glTexCoord3dv( const GLdouble *v );
13283+GLAPI void GLAPIENTRY glTexCoord3fv( const GLfloat *v );
13284+GLAPI void GLAPIENTRY glTexCoord3iv( const GLint *v );
13285+GLAPI void GLAPIENTRY glTexCoord3sv( const GLshort *v );
13286+
13287+GLAPI void GLAPIENTRY glTexCoord4dv( const GLdouble *v );
13288+GLAPI void GLAPIENTRY glTexCoord4fv( const GLfloat *v );
13289+GLAPI void GLAPIENTRY glTexCoord4iv( const GLint *v );
13290+GLAPI void GLAPIENTRY glTexCoord4sv( const GLshort *v );
13291+
13292+
13293+GLAPI void GLAPIENTRY glRasterPos2d( GLdouble x, GLdouble y );
13294+GLAPI void GLAPIENTRY glRasterPos2f( GLfloat x, GLfloat y );
13295+GLAPI void GLAPIENTRY glRasterPos2i( GLint x, GLint y );
13296+GLAPI void GLAPIENTRY glRasterPos2s( GLshort x, GLshort y );
13297+
13298+GLAPI void GLAPIENTRY glRasterPos3d( GLdouble x, GLdouble y, GLdouble z );
13299+GLAPI void GLAPIENTRY glRasterPos3f( GLfloat x, GLfloat y, GLfloat z );
13300+GLAPI void GLAPIENTRY glRasterPos3i( GLint x, GLint y, GLint z );
13301+GLAPI void GLAPIENTRY glRasterPos3s( GLshort x, GLshort y, GLshort z );
13302+
13303+GLAPI void GLAPIENTRY glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
13304+GLAPI void GLAPIENTRY glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
13305+GLAPI void GLAPIENTRY glRasterPos4i( GLint x, GLint y, GLint z, GLint w );
13306+GLAPI void GLAPIENTRY glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w );
13307+
13308+GLAPI void GLAPIENTRY glRasterPos2dv( const GLdouble *v );
13309+GLAPI void GLAPIENTRY glRasterPos2fv( const GLfloat *v );
13310+GLAPI void GLAPIENTRY glRasterPos2iv( const GLint *v );
13311+GLAPI void GLAPIENTRY glRasterPos2sv( const GLshort *v );
13312+
13313+GLAPI void GLAPIENTRY glRasterPos3dv( const GLdouble *v );
13314+GLAPI void GLAPIENTRY glRasterPos3fv( const GLfloat *v );
13315+GLAPI void GLAPIENTRY glRasterPos3iv( const GLint *v );
13316+GLAPI void GLAPIENTRY glRasterPos3sv( const GLshort *v );
13317+
13318+GLAPI void GLAPIENTRY glRasterPos4dv( const GLdouble *v );
13319+GLAPI void GLAPIENTRY glRasterPos4fv( const GLfloat *v );
13320+GLAPI void GLAPIENTRY glRasterPos4iv( const GLint *v );
13321+GLAPI void GLAPIENTRY glRasterPos4sv( const GLshort *v );
13322+
13323+
13324+GLAPI void GLAPIENTRY glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 );
13325+GLAPI void GLAPIENTRY glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 );
13326+GLAPI void GLAPIENTRY glRecti( GLint x1, GLint y1, GLint x2, GLint y2 );
13327+GLAPI void GLAPIENTRY glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 );
13328+
13329+
13330+GLAPI void GLAPIENTRY glRectdv( const GLdouble *v1, const GLdouble *v2 );
13331+GLAPI void GLAPIENTRY glRectfv( const GLfloat *v1, const GLfloat *v2 );
13332+GLAPI void GLAPIENTRY glRectiv( const GLint *v1, const GLint *v2 );
13333+GLAPI void GLAPIENTRY glRectsv( const GLshort *v1, const GLshort *v2 );
13334+
13335+
13336+/*
13337+ * Vertex Arrays (1.1)
13338+ */
13339+
13340+GLAPI void GLAPIENTRY glVertexPointer( GLint size, GLenum type,
13341+ GLsizei stride, const GLvoid *ptr );
13342+
13343+GLAPI void GLAPIENTRY glNormalPointer( GLenum type, GLsizei stride,
13344+ const GLvoid *ptr );
13345+
13346+GLAPI void GLAPIENTRY glColorPointer( GLint size, GLenum type,
13347+ GLsizei stride, const GLvoid *ptr );
13348+
13349+GLAPI void GLAPIENTRY glIndexPointer( GLenum type, GLsizei stride,
13350+ const GLvoid *ptr );
13351+
13352+GLAPI void GLAPIENTRY glTexCoordPointer( GLint size, GLenum type,
13353+ GLsizei stride, const GLvoid *ptr );
13354+
13355+GLAPI void GLAPIENTRY glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr );
13356+
13357+GLAPI void GLAPIENTRY glGetPointerv( GLenum pname, GLvoid **params );
13358+
13359+GLAPI void GLAPIENTRY glArrayElement( GLint i );
13360+
13361+GLAPI void GLAPIENTRY glDrawArrays( GLenum mode, GLint first, GLsizei count );
13362+
13363+GLAPI void GLAPIENTRY glDrawElements( GLenum mode, GLsizei count,
13364+ GLenum type, const GLvoid *indices );
13365+
13366+GLAPI void GLAPIENTRY glInterleavedArrays( GLenum format, GLsizei stride,
13367+ const GLvoid *pointer );
13368+
13369+/*
13370+ * Lighting
13371+ */
13372+
13373+GLAPI void GLAPIENTRY glShadeModel( GLenum mode );
13374+
13375+GLAPI void GLAPIENTRY glLightf( GLenum light, GLenum pname, GLfloat param );
13376+GLAPI void GLAPIENTRY glLighti( GLenum light, GLenum pname, GLint param );
13377+GLAPI void GLAPIENTRY glLightfv( GLenum light, GLenum pname,
13378+ const GLfloat *params );
13379+GLAPI void GLAPIENTRY glLightiv( GLenum light, GLenum pname,
13380+ const GLint *params );
13381+
13382+GLAPI void GLAPIENTRY glGetLightfv( GLenum light, GLenum pname,
13383+ GLfloat *params );
13384+GLAPI void GLAPIENTRY glGetLightiv( GLenum light, GLenum pname,
13385+ GLint *params );
13386+
13387+GLAPI void GLAPIENTRY glLightModelf( GLenum pname, GLfloat param );
13388+GLAPI void GLAPIENTRY glLightModeli( GLenum pname, GLint param );
13389+GLAPI void GLAPIENTRY glLightModelfv( GLenum pname, const GLfloat *params );
13390+GLAPI void GLAPIENTRY glLightModeliv( GLenum pname, const GLint *params );
13391+
13392+GLAPI void GLAPIENTRY glMaterialf( GLenum face, GLenum pname, GLfloat param );
13393+GLAPI void GLAPIENTRY glMateriali( GLenum face, GLenum pname, GLint param );
13394+GLAPI void GLAPIENTRY glMaterialfv( GLenum face, GLenum pname, const GLfloat *params );
13395+GLAPI void GLAPIENTRY glMaterialiv( GLenum face, GLenum pname, const GLint *params );
13396+
13397+GLAPI void GLAPIENTRY glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params );
13398+GLAPI void GLAPIENTRY glGetMaterialiv( GLenum face, GLenum pname, GLint *params );
13399+
13400+GLAPI void GLAPIENTRY glColorMaterial( GLenum face, GLenum mode );
13401+
13402+
13403+/*
13404+ * Raster functions
13405+ */
13406+
13407+GLAPI void GLAPIENTRY glPixelZoom( GLfloat xfactor, GLfloat yfactor );
13408+
13409+GLAPI void GLAPIENTRY glPixelStoref( GLenum pname, GLfloat param );
13410+GLAPI void GLAPIENTRY glPixelStorei( GLenum pname, GLint param );
13411+
13412+GLAPI void GLAPIENTRY glPixelTransferf( GLenum pname, GLfloat param );
13413+GLAPI void GLAPIENTRY glPixelTransferi( GLenum pname, GLint param );
13414+
13415+GLAPI void GLAPIENTRY glPixelMapfv( GLenum map, GLsizei mapsize,
13416+ const GLfloat *values );
13417+GLAPI void GLAPIENTRY glPixelMapuiv( GLenum map, GLsizei mapsize,
13418+ const GLuint *values );
13419+GLAPI void GLAPIENTRY glPixelMapusv( GLenum map, GLsizei mapsize,
13420+ const GLushort *values );
13421+
13422+GLAPI void GLAPIENTRY glGetPixelMapfv( GLenum map, GLfloat *values );
13423+GLAPI void GLAPIENTRY glGetPixelMapuiv( GLenum map, GLuint *values );
13424+GLAPI void GLAPIENTRY glGetPixelMapusv( GLenum map, GLushort *values );
13425+
13426+GLAPI void GLAPIENTRY glBitmap( GLsizei width, GLsizei height,
13427+ GLfloat xorig, GLfloat yorig,
13428+ GLfloat xmove, GLfloat ymove,
13429+ const GLubyte *bitmap );
13430+
13431+GLAPI void GLAPIENTRY glReadPixels( GLint x, GLint y,
13432+ GLsizei width, GLsizei height,
13433+ GLenum format, GLenum type,
13434+ GLvoid *pixels );
13435+
13436+GLAPI void GLAPIENTRY glDrawPixels( GLsizei width, GLsizei height,
13437+ GLenum format, GLenum type,
13438+ const GLvoid *pixels );
13439+
13440+GLAPI void GLAPIENTRY glCopyPixels( GLint x, GLint y,
13441+ GLsizei width, GLsizei height,
13442+ GLenum type );
13443+
13444+/*
13445+ * Stenciling
13446+ */
13447+
13448+GLAPI void GLAPIENTRY glStencilFunc( GLenum func, GLint ref, GLuint mask );
13449+
13450+GLAPI void GLAPIENTRY glStencilMask( GLuint mask );
13451+
13452+GLAPI void GLAPIENTRY glStencilOp( GLenum fail, GLenum zfail, GLenum zpass );
13453+
13454+GLAPI void GLAPIENTRY glClearStencil( GLint s );
13455+
13456+
13457+
13458+/*
13459+ * Texture mapping
13460+ */
13461+
13462+GLAPI void GLAPIENTRY glTexGend( GLenum coord, GLenum pname, GLdouble param );
13463+GLAPI void GLAPIENTRY glTexGenf( GLenum coord, GLenum pname, GLfloat param );
13464+GLAPI void GLAPIENTRY glTexGeni( GLenum coord, GLenum pname, GLint param );
13465+
13466+GLAPI void GLAPIENTRY glTexGendv( GLenum coord, GLenum pname, const GLdouble *params );
13467+GLAPI void GLAPIENTRY glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params );
13468+GLAPI void GLAPIENTRY glTexGeniv( GLenum coord, GLenum pname, const GLint *params );
13469+
13470+GLAPI void GLAPIENTRY glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params );
13471+GLAPI void GLAPIENTRY glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params );
13472+GLAPI void GLAPIENTRY glGetTexGeniv( GLenum coord, GLenum pname, GLint *params );
13473+
13474+
13475+GLAPI void GLAPIENTRY glTexEnvf( GLenum target, GLenum pname, GLfloat param );
13476+GLAPI void GLAPIENTRY glTexEnvi( GLenum target, GLenum pname, GLint param );
13477+
13478+GLAPI void GLAPIENTRY glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params );
13479+GLAPI void GLAPIENTRY glTexEnviv( GLenum target, GLenum pname, const GLint *params );
13480+
13481+GLAPI void GLAPIENTRY glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params );
13482+GLAPI void GLAPIENTRY glGetTexEnviv( GLenum target, GLenum pname, GLint *params );
13483+
13484+
13485+GLAPI void GLAPIENTRY glTexParameterf( GLenum target, GLenum pname, GLfloat param );
13486+GLAPI void GLAPIENTRY glTexParameteri( GLenum target, GLenum pname, GLint param );
13487+
13488+GLAPI void GLAPIENTRY glTexParameterfv( GLenum target, GLenum pname,
13489+ const GLfloat *params );
13490+GLAPI void GLAPIENTRY glTexParameteriv( GLenum target, GLenum pname,
13491+ const GLint *params );
13492+
13493+GLAPI void GLAPIENTRY glGetTexParameterfv( GLenum target,
13494+ GLenum pname, GLfloat *params);
13495+GLAPI void GLAPIENTRY glGetTexParameteriv( GLenum target,
13496+ GLenum pname, GLint *params );
13497+
13498+GLAPI void GLAPIENTRY glGetTexLevelParameterfv( GLenum target, GLint level,
13499+ GLenum pname, GLfloat *params );
13500+GLAPI void GLAPIENTRY glGetTexLevelParameteriv( GLenum target, GLint level,
13501+ GLenum pname, GLint *params );
13502+
13503+
13504+GLAPI void GLAPIENTRY glTexImage1D( GLenum target, GLint level,
13505+ GLint internalFormat,
13506+ GLsizei width, GLint border,
13507+ GLenum format, GLenum type,
13508+ const GLvoid *pixels );
13509+
13510+GLAPI void GLAPIENTRY glTexImage2D( GLenum target, GLint level,
13511+ GLint internalFormat,
13512+ GLsizei width, GLsizei height,
13513+ GLint border, GLenum format, GLenum type,
13514+ const GLvoid *pixels );
13515+
13516+GLAPI void GLAPIENTRY glGetTexImage( GLenum target, GLint level,
13517+ GLenum format, GLenum type,
13518+ GLvoid *pixels );
13519+
13520+
13521+/* 1.1 functions */
13522+
13523+GLAPI void GLAPIENTRY glGenTextures( GLsizei n, GLuint *textures );
13524+
13525+GLAPI void GLAPIENTRY glDeleteTextures( GLsizei n, const GLuint *textures);
13526+
13527+GLAPI void GLAPIENTRY glBindTexture( GLenum target, GLuint texture );
13528+
13529+GLAPI void GLAPIENTRY glPrioritizeTextures( GLsizei n,
13530+ const GLuint *textures,
13531+ const GLclampf *priorities );
13532+
13533+GLAPI GLboolean GLAPIENTRY glAreTexturesResident( GLsizei n,
13534+ const GLuint *textures,
13535+ GLboolean *residences );
13536+
13537+GLAPI GLboolean GLAPIENTRY glIsTexture( GLuint texture );
13538+
13539+
13540+GLAPI void GLAPIENTRY glTexSubImage1D( GLenum target, GLint level,
13541+ GLint xoffset,
13542+ GLsizei width, GLenum format,
13543+ GLenum type, const GLvoid *pixels );
13544+
13545+
13546+GLAPI void GLAPIENTRY glTexSubImage2D( GLenum target, GLint level,
13547+ GLint xoffset, GLint yoffset,
13548+ GLsizei width, GLsizei height,
13549+ GLenum format, GLenum type,
13550+ const GLvoid *pixels );
13551+
13552+
13553+GLAPI void GLAPIENTRY glCopyTexImage1D( GLenum target, GLint level,
13554+ GLenum internalformat,
13555+ GLint x, GLint y,
13556+ GLsizei width, GLint border );
13557+
13558+
13559+GLAPI void GLAPIENTRY glCopyTexImage2D( GLenum target, GLint level,
13560+ GLenum internalformat,
13561+ GLint x, GLint y,
13562+ GLsizei width, GLsizei height,
13563+ GLint border );
13564+
13565+
13566+GLAPI void GLAPIENTRY glCopyTexSubImage1D( GLenum target, GLint level,
13567+ GLint xoffset, GLint x, GLint y,
13568+ GLsizei width );
13569+
13570+
13571+GLAPI void GLAPIENTRY glCopyTexSubImage2D( GLenum target, GLint level,
13572+ GLint xoffset, GLint yoffset,
13573+ GLint x, GLint y,
13574+ GLsizei width, GLsizei height );
13575+
13576+
13577+/*
13578+ * Evaluators
13579+ */
13580+
13581+GLAPI void GLAPIENTRY glMap1d( GLenum target, GLdouble u1, GLdouble u2,
13582+ GLint stride,
13583+ GLint order, const GLdouble *points );
13584+GLAPI void GLAPIENTRY glMap1f( GLenum target, GLfloat u1, GLfloat u2,
13585+ GLint stride,
13586+ GLint order, const GLfloat *points );
13587+
13588+GLAPI void GLAPIENTRY glMap2d( GLenum target,
13589+ GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
13590+ GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
13591+ const GLdouble *points );
13592+GLAPI void GLAPIENTRY glMap2f( GLenum target,
13593+ GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
13594+ GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
13595+ const GLfloat *points );
13596+
13597+GLAPI void GLAPIENTRY glGetMapdv( GLenum target, GLenum query, GLdouble *v );
13598+GLAPI void GLAPIENTRY glGetMapfv( GLenum target, GLenum query, GLfloat *v );
13599+GLAPI void GLAPIENTRY glGetMapiv( GLenum target, GLenum query, GLint *v );
13600+
13601+GLAPI void GLAPIENTRY glEvalCoord1d( GLdouble u );
13602+GLAPI void GLAPIENTRY glEvalCoord1f( GLfloat u );
13603+
13604+GLAPI void GLAPIENTRY glEvalCoord1dv( const GLdouble *u );
13605+GLAPI void GLAPIENTRY glEvalCoord1fv( const GLfloat *u );
13606+
13607+GLAPI void GLAPIENTRY glEvalCoord2d( GLdouble u, GLdouble v );
13608+GLAPI void GLAPIENTRY glEvalCoord2f( GLfloat u, GLfloat v );
13609+
13610+GLAPI void GLAPIENTRY glEvalCoord2dv( const GLdouble *u );
13611+GLAPI void GLAPIENTRY glEvalCoord2fv( const GLfloat *u );
13612+
13613+GLAPI void GLAPIENTRY glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 );
13614+GLAPI void GLAPIENTRY glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 );
13615+
13616+GLAPI void GLAPIENTRY glMapGrid2d( GLint un, GLdouble u1, GLdouble u2,
13617+ GLint vn, GLdouble v1, GLdouble v2 );
13618+GLAPI void GLAPIENTRY glMapGrid2f( GLint un, GLfloat u1, GLfloat u2,
13619+ GLint vn, GLfloat v1, GLfloat v2 );
13620+
13621+GLAPI void GLAPIENTRY glEvalPoint1( GLint i );
13622+
13623+GLAPI void GLAPIENTRY glEvalPoint2( GLint i, GLint j );
13624+
13625+GLAPI void GLAPIENTRY glEvalMesh1( GLenum mode, GLint i1, GLint i2 );
13626+
13627+GLAPI void GLAPIENTRY glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
13628+
13629+
13630+/*
13631+ * Fog
13632+ */
13633+
13634+GLAPI void GLAPIENTRY glFogf( GLenum pname, GLfloat param );
13635+
13636+GLAPI void GLAPIENTRY glFogi( GLenum pname, GLint param );
13637+
13638+GLAPI void GLAPIENTRY glFogfv( GLenum pname, const GLfloat *params );
13639+
13640+GLAPI void GLAPIENTRY glFogiv( GLenum pname, const GLint *params );
13641+
13642+
13643+/*
13644+ * Selection and Feedback
13645+ */
13646+
13647+GLAPI void GLAPIENTRY glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer );
13648+
13649+GLAPI void GLAPIENTRY glPassThrough( GLfloat token );
13650+
13651+GLAPI void GLAPIENTRY glSelectBuffer( GLsizei size, GLuint *buffer );
13652+
13653+GLAPI void GLAPIENTRY glInitNames( void );
13654+
13655+GLAPI void GLAPIENTRY glLoadName( GLuint name );
13656+
13657+GLAPI void GLAPIENTRY glPushName( GLuint name );
13658+
13659+GLAPI void GLAPIENTRY glPopName( void );
13660+
13661+
13662+
13663+/*
13664+ * OpenGL 1.2
13665+ */
13666+
13667+#define GL_RESCALE_NORMAL 0x803A
13668+#define GL_CLAMP_TO_EDGE 0x812F
13669+#define GL_MAX_ELEMENTS_VERTICES 0x80E8
13670+#define GL_MAX_ELEMENTS_INDICES 0x80E9
13671+#define GL_BGR 0x80E0
13672+#define GL_BGRA 0x80E1
13673+#define GL_UNSIGNED_BYTE_3_3_2 0x8032
13674+#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
13675+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
13676+#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
13677+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
13678+#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
13679+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
13680+#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
13681+#define GL_UNSIGNED_INT_8_8_8_8 0x8035
13682+#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
13683+#define GL_UNSIGNED_INT_10_10_10_2 0x8036
13684+#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
13685+#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
13686+#define GL_SINGLE_COLOR 0x81F9
13687+#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
13688+#define GL_TEXTURE_MIN_LOD 0x813A
13689+#define GL_TEXTURE_MAX_LOD 0x813B
13690+#define GL_TEXTURE_BASE_LEVEL 0x813C
13691+#define GL_TEXTURE_MAX_LEVEL 0x813D
13692+#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
13693+#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
13694+#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
13695+#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
13696+#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
13697+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
13698+#define GL_PACK_SKIP_IMAGES 0x806B
13699+#define GL_PACK_IMAGE_HEIGHT 0x806C
13700+#define GL_UNPACK_SKIP_IMAGES 0x806D
13701+#define GL_UNPACK_IMAGE_HEIGHT 0x806E
13702+#define GL_TEXTURE_3D 0x806F
13703+#define GL_PROXY_TEXTURE_3D 0x8070
13704+#define GL_TEXTURE_DEPTH 0x8071
13705+#define GL_TEXTURE_WRAP_R 0x8072
13706+#define GL_MAX_3D_TEXTURE_SIZE 0x8073
13707+#define GL_TEXTURE_BINDING_3D 0x806A
13708+
13709+GLAPI void GLAPIENTRY glDrawRangeElements( GLenum mode, GLuint start,
13710+ GLuint end, GLsizei count, GLenum type, const GLvoid *indices );
13711+
13712+GLAPI void GLAPIENTRY glTexImage3D( GLenum target, GLint level,
13713+ GLint internalFormat,
13714+ GLsizei width, GLsizei height,
13715+ GLsizei depth, GLint border,
13716+ GLenum format, GLenum type,
13717+ const GLvoid *pixels );
13718+
13719+GLAPI void GLAPIENTRY glTexSubImage3D( GLenum target, GLint level,
13720+ GLint xoffset, GLint yoffset,
13721+ GLint zoffset, GLsizei width,
13722+ GLsizei height, GLsizei depth,
13723+ GLenum format,
13724+ GLenum type, const GLvoid *pixels);
13725+
13726+GLAPI void GLAPIENTRY glCopyTexSubImage3D( GLenum target, GLint level,
13727+ GLint xoffset, GLint yoffset,
13728+ GLint zoffset, GLint x,
13729+ GLint y, GLsizei width,
13730+ GLsizei height );
13731+
13732+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
13733+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);
13734+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);
13735+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
13736+
13737+
13738+/*
13739+ * GL_ARB_imaging
13740+ */
13741+
13742+#define GL_CONSTANT_COLOR 0x8001
13743+#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
13744+#define GL_CONSTANT_ALPHA 0x8003
13745+#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
13746+#define GL_COLOR_TABLE 0x80D0
13747+#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
13748+#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
13749+#define GL_PROXY_COLOR_TABLE 0x80D3
13750+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
13751+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
13752+#define GL_COLOR_TABLE_SCALE 0x80D6
13753+#define GL_COLOR_TABLE_BIAS 0x80D7
13754+#define GL_COLOR_TABLE_FORMAT 0x80D8
13755+#define GL_COLOR_TABLE_WIDTH 0x80D9
13756+#define GL_COLOR_TABLE_RED_SIZE 0x80DA
13757+#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
13758+#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
13759+#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
13760+#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
13761+#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
13762+#define GL_CONVOLUTION_1D 0x8010
13763+#define GL_CONVOLUTION_2D 0x8011
13764+#define GL_SEPARABLE_2D 0x8012
13765+#define GL_CONVOLUTION_BORDER_MODE 0x8013
13766+#define GL_CONVOLUTION_FILTER_SCALE 0x8014
13767+#define GL_CONVOLUTION_FILTER_BIAS 0x8015
13768+#define GL_REDUCE 0x8016
13769+#define GL_CONVOLUTION_FORMAT 0x8017
13770+#define GL_CONVOLUTION_WIDTH 0x8018
13771+#define GL_CONVOLUTION_HEIGHT 0x8019
13772+#define GL_MAX_CONVOLUTION_WIDTH 0x801A
13773+#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
13774+#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
13775+#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
13776+#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
13777+#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
13778+#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
13779+#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
13780+#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
13781+#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
13782+#define GL_CONSTANT_BORDER 0x8151
13783+#define GL_REPLICATE_BORDER 0x8153
13784+#define GL_CONVOLUTION_BORDER_COLOR 0x8154
13785+#define GL_COLOR_MATRIX 0x80B1
13786+#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
13787+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
13788+#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
13789+#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
13790+#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
13791+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
13792+#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
13793+#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
13794+#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
13795+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
13796+#define GL_HISTOGRAM 0x8024
13797+#define GL_PROXY_HISTOGRAM 0x8025
13798+#define GL_HISTOGRAM_WIDTH 0x8026
13799+#define GL_HISTOGRAM_FORMAT 0x8027
13800+#define GL_HISTOGRAM_RED_SIZE 0x8028
13801+#define GL_HISTOGRAM_GREEN_SIZE 0x8029
13802+#define GL_HISTOGRAM_BLUE_SIZE 0x802A
13803+#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
13804+#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
13805+#define GL_HISTOGRAM_SINK 0x802D
13806+#define GL_MINMAX 0x802E
13807+#define GL_MINMAX_FORMAT 0x802F
13808+#define GL_MINMAX_SINK 0x8030
13809+#define GL_TABLE_TOO_LARGE 0x8031
13810+#define GL_BLEND_EQUATION 0x8009
13811+#define GL_MIN 0x8007
13812+#define GL_MAX 0x8008
13813+#define GL_FUNC_ADD 0x8006
13814+#define GL_FUNC_SUBTRACT 0x800A
13815+#define GL_FUNC_REVERSE_SUBTRACT 0x800B
13816+#define GL_BLEND_COLOR 0x8005
13817+
13818+
13819+GLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat,
13820+ GLsizei width, GLenum format,
13821+ GLenum type, const GLvoid *table );
13822+
13823+GLAPI void GLAPIENTRY glColorSubTable( GLenum target,
13824+ GLsizei start, GLsizei count,
13825+ GLenum format, GLenum type,
13826+ const GLvoid *data );
13827+
13828+GLAPI void GLAPIENTRY glColorTableParameteriv(GLenum target, GLenum pname,
13829+ const GLint *params);
13830+
13831+GLAPI void GLAPIENTRY glColorTableParameterfv(GLenum target, GLenum pname,
13832+ const GLfloat *params);
13833+
13834+GLAPI void GLAPIENTRY glCopyColorSubTable( GLenum target, GLsizei start,
13835+ GLint x, GLint y, GLsizei width );
13836+
13837+GLAPI void GLAPIENTRY glCopyColorTable( GLenum target, GLenum internalformat,
13838+ GLint x, GLint y, GLsizei width );
13839+
13840+GLAPI void GLAPIENTRY glGetColorTable( GLenum target, GLenum format,
13841+ GLenum type, GLvoid *table );
13842+
13843+GLAPI void GLAPIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname,
13844+ GLfloat *params );
13845+
13846+GLAPI void GLAPIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname,
13847+ GLint *params );
13848+
13849+GLAPI void GLAPIENTRY glBlendEquation( GLenum mode );
13850+
13851+GLAPI void GLAPIENTRY glBlendColor( GLclampf red, GLclampf green,
13852+ GLclampf blue, GLclampf alpha );
13853+
13854+GLAPI void GLAPIENTRY glHistogram( GLenum target, GLsizei width,
13855+ GLenum internalformat, GLboolean sink );
13856+
13857+GLAPI void GLAPIENTRY glResetHistogram( GLenum target );
13858+
13859+GLAPI void GLAPIENTRY glGetHistogram( GLenum target, GLboolean reset,
13860+ GLenum format, GLenum type,
13861+ GLvoid *values );
13862+
13863+GLAPI void GLAPIENTRY glGetHistogramParameterfv( GLenum target, GLenum pname,
13864+ GLfloat *params );
13865+
13866+GLAPI void GLAPIENTRY glGetHistogramParameteriv( GLenum target, GLenum pname,
13867+ GLint *params );
13868+
13869+GLAPI void GLAPIENTRY glMinmax( GLenum target, GLenum internalformat,
13870+ GLboolean sink );
13871+
13872+GLAPI void GLAPIENTRY glResetMinmax( GLenum target );
13873+
13874+GLAPI void GLAPIENTRY glGetMinmax( GLenum target, GLboolean reset,
13875+ GLenum format, GLenum types,
13876+ GLvoid *values );
13877+
13878+GLAPI void GLAPIENTRY glGetMinmaxParameterfv( GLenum target, GLenum pname,
13879+ GLfloat *params );
13880+
13881+GLAPI void GLAPIENTRY glGetMinmaxParameteriv( GLenum target, GLenum pname,
13882+ GLint *params );
13883+
13884+GLAPI void GLAPIENTRY glConvolutionFilter1D( GLenum target,
13885+ GLenum internalformat, GLsizei width, GLenum format, GLenum type,
13886+ const GLvoid *image );
13887+
13888+GLAPI void GLAPIENTRY glConvolutionFilter2D( GLenum target,
13889+ GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
13890+ GLenum type, const GLvoid *image );
13891+
13892+GLAPI void GLAPIENTRY glConvolutionParameterf( GLenum target, GLenum pname,
13893+ GLfloat params );
13894+
13895+GLAPI void GLAPIENTRY glConvolutionParameterfv( GLenum target, GLenum pname,
13896+ const GLfloat *params );
13897+
13898+GLAPI void GLAPIENTRY glConvolutionParameteri( GLenum target, GLenum pname,
13899+ GLint params );
13900+
13901+GLAPI void GLAPIENTRY glConvolutionParameteriv( GLenum target, GLenum pname,
13902+ const GLint *params );
13903+
13904+GLAPI void GLAPIENTRY glCopyConvolutionFilter1D( GLenum target,
13905+ GLenum internalformat, GLint x, GLint y, GLsizei width );
13906+
13907+GLAPI void GLAPIENTRY glCopyConvolutionFilter2D( GLenum target,
13908+ GLenum internalformat, GLint x, GLint y, GLsizei width,
13909+ GLsizei height);
13910+
13911+GLAPI void GLAPIENTRY glGetConvolutionFilter( GLenum target, GLenum format,
13912+ GLenum type, GLvoid *image );
13913+
13914+GLAPI void GLAPIENTRY glGetConvolutionParameterfv( GLenum target, GLenum pname,
13915+ GLfloat *params );
13916+
13917+GLAPI void GLAPIENTRY glGetConvolutionParameteriv( GLenum target, GLenum pname,
13918+ GLint *params );
13919+
13920+GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target,
13921+ GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
13922+ GLenum type, const GLvoid *row, const GLvoid *column );
13923+
13924+GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
13925+ GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
13926+
13927+typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
13928+typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
13929+typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
13930+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
13931+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
13932+typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
13933+typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
13934+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
13935+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
13936+typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
13937+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
13938+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
13939+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
13940+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
13941+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
13942+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
13943+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
13944+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
13945+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
13946+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
13947+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
13948+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
13949+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
13950+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
13951+typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
13952+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
13953+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
13954+typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
13955+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
13956+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
13957+typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
13958+typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
13959+typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
13960+typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
13961+
13962+
13963+
13964+/*
13965+ * OpenGL 1.3
13966+ */
13967+
13968+/* multitexture */
13969+#define GL_TEXTURE0 0x84C0
13970+#define GL_TEXTURE1 0x84C1
13971+#define GL_TEXTURE2 0x84C2
13972+#define GL_TEXTURE3 0x84C3
13973+#define GL_TEXTURE4 0x84C4
13974+#define GL_TEXTURE5 0x84C5
13975+#define GL_TEXTURE6 0x84C6
13976+#define GL_TEXTURE7 0x84C7
13977+#define GL_TEXTURE8 0x84C8
13978+#define GL_TEXTURE9 0x84C9
13979+#define GL_TEXTURE10 0x84CA
13980+#define GL_TEXTURE11 0x84CB
13981+#define GL_TEXTURE12 0x84CC
13982+#define GL_TEXTURE13 0x84CD
13983+#define GL_TEXTURE14 0x84CE
13984+#define GL_TEXTURE15 0x84CF
13985+#define GL_TEXTURE16 0x84D0
13986+#define GL_TEXTURE17 0x84D1
13987+#define GL_TEXTURE18 0x84D2
13988+#define GL_TEXTURE19 0x84D3
13989+#define GL_TEXTURE20 0x84D4
13990+#define GL_TEXTURE21 0x84D5
13991+#define GL_TEXTURE22 0x84D6
13992+#define GL_TEXTURE23 0x84D7
13993+#define GL_TEXTURE24 0x84D8
13994+#define GL_TEXTURE25 0x84D9
13995+#define GL_TEXTURE26 0x84DA
13996+#define GL_TEXTURE27 0x84DB
13997+#define GL_TEXTURE28 0x84DC
13998+#define GL_TEXTURE29 0x84DD
13999+#define GL_TEXTURE30 0x84DE
14000+#define GL_TEXTURE31 0x84DF
14001+#define GL_ACTIVE_TEXTURE 0x84E0
14002+#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
14003+#define GL_MAX_TEXTURE_UNITS 0x84E2
14004+/* texture_cube_map */
14005+#define GL_NORMAL_MAP 0x8511
14006+#define GL_REFLECTION_MAP 0x8512
14007+#define GL_TEXTURE_CUBE_MAP 0x8513
14008+#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
14009+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
14010+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
14011+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
14012+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
14013+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
14014+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
14015+#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
14016+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
14017+/* texture_compression */
14018+#define GL_COMPRESSED_ALPHA 0x84E9
14019+#define GL_COMPRESSED_LUMINANCE 0x84EA
14020+#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
14021+#define GL_COMPRESSED_INTENSITY 0x84EC
14022+#define GL_COMPRESSED_RGB 0x84ED
14023+#define GL_COMPRESSED_RGBA 0x84EE
14024+#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
14025+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
14026+#define GL_TEXTURE_COMPRESSED 0x86A1
14027+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
14028+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
14029+/* multisample */
14030+#define GL_MULTISAMPLE 0x809D
14031+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
14032+#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
14033+#define GL_SAMPLE_COVERAGE 0x80A0
14034+#define GL_SAMPLE_BUFFERS 0x80A8
14035+#define GL_SAMPLES 0x80A9
14036+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
14037+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
14038+#define GL_MULTISAMPLE_BIT 0x20000000
14039+/* transpose_matrix */
14040+#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
14041+#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
14042+#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
14043+#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
14044+/* texture_env_combine */
14045+#define GL_COMBINE 0x8570
14046+#define GL_COMBINE_RGB 0x8571
14047+#define GL_COMBINE_ALPHA 0x8572
14048+#define GL_SOURCE0_RGB 0x8580
14049+#define GL_SOURCE1_RGB 0x8581
14050+#define GL_SOURCE2_RGB 0x8582
14051+#define GL_SOURCE0_ALPHA 0x8588
14052+#define GL_SOURCE1_ALPHA 0x8589
14053+#define GL_SOURCE2_ALPHA 0x858A
14054+#define GL_OPERAND0_RGB 0x8590
14055+#define GL_OPERAND1_RGB 0x8591
14056+#define GL_OPERAND2_RGB 0x8592
14057+#define GL_OPERAND0_ALPHA 0x8598
14058+#define GL_OPERAND1_ALPHA 0x8599
14059+#define GL_OPERAND2_ALPHA 0x859A
14060+#define GL_RGB_SCALE 0x8573
14061+#define GL_ADD_SIGNED 0x8574
14062+#define GL_INTERPOLATE 0x8575
14063+#define GL_SUBTRACT 0x84E7
14064+#define GL_CONSTANT 0x8576
14065+#define GL_PRIMARY_COLOR 0x8577
14066+#define GL_PREVIOUS 0x8578
14067+/* texture_env_dot3 */
14068+#define GL_DOT3_RGB 0x86AE
14069+#define GL_DOT3_RGBA 0x86AF
14070+/* texture_border_clamp */
14071+#define GL_CLAMP_TO_BORDER 0x812D
14072+
14073+GLAPI void GLAPIENTRY glActiveTexture( GLenum texture );
14074+
14075+GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture );
14076+
14077+GLAPI void GLAPIENTRY glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data );
14078+
14079+GLAPI void GLAPIENTRY glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data );
14080+
14081+GLAPI void GLAPIENTRY glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data );
14082+
14083+GLAPI void GLAPIENTRY glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data );
14084+
14085+GLAPI void GLAPIENTRY glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data );
14086+
14087+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 );
14088+
14089+GLAPI void GLAPIENTRY glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img );
14090+
14091+GLAPI void GLAPIENTRY glMultiTexCoord1d( GLenum target, GLdouble s );
14092+
14093+GLAPI void GLAPIENTRY glMultiTexCoord1dv( GLenum target, const GLdouble *v );
14094+
14095+GLAPI void GLAPIENTRY glMultiTexCoord1f( GLenum target, GLfloat s );
14096+
14097+GLAPI void GLAPIENTRY glMultiTexCoord1fv( GLenum target, const GLfloat *v );
14098+
14099+GLAPI void GLAPIENTRY glMultiTexCoord1i( GLenum target, GLint s );
14100+
14101+GLAPI void GLAPIENTRY glMultiTexCoord1iv( GLenum target, const GLint *v );
14102+
14103+GLAPI void GLAPIENTRY glMultiTexCoord1s( GLenum target, GLshort s );
14104+
14105+GLAPI void GLAPIENTRY glMultiTexCoord1sv( GLenum target, const GLshort *v );
14106+
14107+GLAPI void GLAPIENTRY glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t );
14108+
14109+GLAPI void GLAPIENTRY glMultiTexCoord2dv( GLenum target, const GLdouble *v );
14110+
14111+GLAPI void GLAPIENTRY glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t );
14112+
14113+GLAPI void GLAPIENTRY glMultiTexCoord2fv( GLenum target, const GLfloat *v );
14114+
14115+GLAPI void GLAPIENTRY glMultiTexCoord2i( GLenum target, GLint s, GLint t );
14116+
14117+GLAPI void GLAPIENTRY glMultiTexCoord2iv( GLenum target, const GLint *v );
14118+
14119+GLAPI void GLAPIENTRY glMultiTexCoord2s( GLenum target, GLshort s, GLshort t );
14120+
14121+GLAPI void GLAPIENTRY glMultiTexCoord2sv( GLenum target, const GLshort *v );
14122+
14123+GLAPI void GLAPIENTRY glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r );
14124+
14125+GLAPI void GLAPIENTRY glMultiTexCoord3dv( GLenum target, const GLdouble *v );
14126+
14127+GLAPI void GLAPIENTRY glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r );
14128+
14129+GLAPI void GLAPIENTRY glMultiTexCoord3fv( GLenum target, const GLfloat *v );
14130+
14131+GLAPI void GLAPIENTRY glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r );
14132+
14133+GLAPI void GLAPIENTRY glMultiTexCoord3iv( GLenum target, const GLint *v );
14134+
14135+GLAPI void GLAPIENTRY glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r );
14136+
14137+GLAPI void GLAPIENTRY glMultiTexCoord3sv( GLenum target, const GLshort *v );
14138+
14139+GLAPI void GLAPIENTRY glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q );
14140+
14141+GLAPI void GLAPIENTRY glMultiTexCoord4dv( GLenum target, const GLdouble *v );
14142+
14143+GLAPI void GLAPIENTRY glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q );
14144+
14145+GLAPI void GLAPIENTRY glMultiTexCoord4fv( GLenum target, const GLfloat *v );
14146+
14147+GLAPI void GLAPIENTRY glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q );
14148+
14149+GLAPI void GLAPIENTRY glMultiTexCoord4iv( GLenum target, const GLint *v );
14150+
14151+GLAPI void GLAPIENTRY glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q );
14152+
14153+GLAPI void GLAPIENTRY glMultiTexCoord4sv( GLenum target, const GLshort *v );
14154+
14155+
14156+GLAPI void GLAPIENTRY glLoadTransposeMatrixd( const GLdouble m[16] );
14157+
14158+GLAPI void GLAPIENTRY glLoadTransposeMatrixf( const GLfloat m[16] );
14159+
14160+GLAPI void GLAPIENTRY glMultTransposeMatrixd( const GLdouble m[16] );
14161+
14162+GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] );
14163+
14164+GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert );
14165+
14166+typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
14167+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
14168+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
14169+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
14170+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
14171+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
14172+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
14173+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
14174+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
14175+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
14176+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
14177+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
14178+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
14179+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
14180+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
14181+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
14182+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
14183+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
14184+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
14185+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
14186+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
14187+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
14188+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
14189+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
14190+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
14191+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
14192+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
14193+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
14194+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
14195+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
14196+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
14197+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
14198+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
14199+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
14200+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
14201+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
14202+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
14203+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
14204+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
14205+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
14206+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
14207+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
14208+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);
14209+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
14210+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
14211+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img);
14212+
14213+
14214+/*
14215+ * GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1)
14216+ */
14217+#ifndef GL_ARB_multitexture
14218+#define GL_ARB_multitexture 1
14219+
14220+#define GL_TEXTURE0_ARB 0x84C0
14221+#define GL_TEXTURE1_ARB 0x84C1
14222+#define GL_TEXTURE2_ARB 0x84C2
14223+#define GL_TEXTURE3_ARB 0x84C3
14224+#define GL_TEXTURE4_ARB 0x84C4
14225+#define GL_TEXTURE5_ARB 0x84C5
14226+#define GL_TEXTURE6_ARB 0x84C6
14227+#define GL_TEXTURE7_ARB 0x84C7
14228+#define GL_TEXTURE8_ARB 0x84C8
14229+#define GL_TEXTURE9_ARB 0x84C9
14230+#define GL_TEXTURE10_ARB 0x84CA
14231+#define GL_TEXTURE11_ARB 0x84CB
14232+#define GL_TEXTURE12_ARB 0x84CC
14233+#define GL_TEXTURE13_ARB 0x84CD
14234+#define GL_TEXTURE14_ARB 0x84CE
14235+#define GL_TEXTURE15_ARB 0x84CF
14236+#define GL_TEXTURE16_ARB 0x84D0
14237+#define GL_TEXTURE17_ARB 0x84D1
14238+#define GL_TEXTURE18_ARB 0x84D2
14239+#define GL_TEXTURE19_ARB 0x84D3
14240+#define GL_TEXTURE20_ARB 0x84D4
14241+#define GL_TEXTURE21_ARB 0x84D5
14242+#define GL_TEXTURE22_ARB 0x84D6
14243+#define GL_TEXTURE23_ARB 0x84D7
14244+#define GL_TEXTURE24_ARB 0x84D8
14245+#define GL_TEXTURE25_ARB 0x84D9
14246+#define GL_TEXTURE26_ARB 0x84DA
14247+#define GL_TEXTURE27_ARB 0x84DB
14248+#define GL_TEXTURE28_ARB 0x84DC
14249+#define GL_TEXTURE29_ARB 0x84DD
14250+#define GL_TEXTURE30_ARB 0x84DE
14251+#define GL_TEXTURE31_ARB 0x84DF
14252+#define GL_ACTIVE_TEXTURE_ARB 0x84E0
14253+#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
14254+#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
14255+
14256+GLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture);
14257+GLAPI void GLAPIENTRY glClientActiveTextureARB(GLenum texture);
14258+GLAPI void GLAPIENTRY glMultiTexCoord1dARB(GLenum target, GLdouble s);
14259+GLAPI void GLAPIENTRY glMultiTexCoord1dvARB(GLenum target, const GLdouble *v);
14260+GLAPI void GLAPIENTRY glMultiTexCoord1fARB(GLenum target, GLfloat s);
14261+GLAPI void GLAPIENTRY glMultiTexCoord1fvARB(GLenum target, const GLfloat *v);
14262+GLAPI void GLAPIENTRY glMultiTexCoord1iARB(GLenum target, GLint s);
14263+GLAPI void GLAPIENTRY glMultiTexCoord1ivARB(GLenum target, const GLint *v);
14264+GLAPI void GLAPIENTRY glMultiTexCoord1sARB(GLenum target, GLshort s);
14265+GLAPI void GLAPIENTRY glMultiTexCoord1svARB(GLenum target, const GLshort *v);
14266+GLAPI void GLAPIENTRY glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t);
14267+GLAPI void GLAPIENTRY glMultiTexCoord2dvARB(GLenum target, const GLdouble *v);
14268+GLAPI void GLAPIENTRY glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t);
14269+GLAPI void GLAPIENTRY glMultiTexCoord2fvARB(GLenum target, const GLfloat *v);
14270+GLAPI void GLAPIENTRY glMultiTexCoord2iARB(GLenum target, GLint s, GLint t);
14271+GLAPI void GLAPIENTRY glMultiTexCoord2ivARB(GLenum target, const GLint *v);
14272+GLAPI void GLAPIENTRY glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t);
14273+GLAPI void GLAPIENTRY glMultiTexCoord2svARB(GLenum target, const GLshort *v);
14274+GLAPI void GLAPIENTRY glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r);
14275+GLAPI void GLAPIENTRY glMultiTexCoord3dvARB(GLenum target, const GLdouble *v);
14276+GLAPI void GLAPIENTRY glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r);
14277+GLAPI void GLAPIENTRY glMultiTexCoord3fvARB(GLenum target, const GLfloat *v);
14278+GLAPI void GLAPIENTRY glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r);
14279+GLAPI void GLAPIENTRY glMultiTexCoord3ivARB(GLenum target, const GLint *v);
14280+GLAPI void GLAPIENTRY glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r);
14281+GLAPI void GLAPIENTRY glMultiTexCoord3svARB(GLenum target, const GLshort *v);
14282+GLAPI void GLAPIENTRY glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
14283+GLAPI void GLAPIENTRY glMultiTexCoord4dvARB(GLenum target, const GLdouble *v);
14284+GLAPI void GLAPIENTRY glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
14285+GLAPI void GLAPIENTRY glMultiTexCoord4fvARB(GLenum target, const GLfloat *v);
14286+GLAPI void GLAPIENTRY glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q);
14287+GLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v);
14288+GLAPI void GLAPIENTRY glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
14289+GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v);
14290+
14291+typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
14292+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
14293+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
14294+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
14295+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
14296+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
14297+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
14298+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
14299+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
14300+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
14301+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
14302+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
14303+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
14304+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
14305+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
14306+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
14307+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
14308+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
14309+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
14310+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
14311+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
14312+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
14313+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
14314+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
14315+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
14316+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
14317+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
14318+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
14319+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
14320+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
14321+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
14322+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
14323+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
14324+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
14325+
14326+#endif /* GL_ARB_multitexture */
14327+
14328+
14329+
14330+/*
14331+ * Define this token if you want "old-style" header file behaviour (extensions
14332+ * defined in gl.h). Otherwise, extensions will be included from glext.h.
14333+ */
14334+#if defined(GL_GLEXT_LEGACY)
14335+
14336+/* All extensions that used to be here are now found in glext.h */
14337+
14338+#else /* GL_GLEXT_LEGACY */
14339+
14340+#include <mesa_glext.h>
14341+
14342+#endif /* GL_GLEXT_LEGACY */
14343+
14344+
14345+
14346+#if GL_ARB_shader_objects
14347+
14348+#ifndef GL_MESA_shader_debug
14349+#define GL_MESA_shader_debug 1
14350+
14351+#define GL_DEBUG_OBJECT_MESA 0x8759
14352+#define GL_DEBUG_PRINT_MESA 0x875A
14353+#define GL_DEBUG_ASSERT_MESA 0x875B
14354+
14355+GLAPI GLhandleARB APIENTRY glCreateDebugObjectMESA (void);
14356+GLAPI void APIENTRY glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
14357+GLAPI void APIENTRY glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength,
14358+ GLsizei *length, GLcharARB *debugLog);
14359+GLAPI GLsizei APIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
14360+
14361+#endif /* GL_MESA_shader_debug */
14362+
14363+#endif /* GL_ARB_shader_objects */
14364+
14365+
14366+/*
14367+ * ???. GL_MESA_packed_depth_stencil
14368+ * XXX obsolete
14369+ */
14370+#ifndef GL_MESA_packed_depth_stencil
14371+#define GL_MESA_packed_depth_stencil 1
14372+
14373+#define GL_DEPTH_STENCIL_MESA 0x8750
14374+#define GL_UNSIGNED_INT_24_8_MESA 0x8751
14375+#define GL_UNSIGNED_INT_8_24_REV_MESA 0x8752
14376+#define GL_UNSIGNED_SHORT_15_1_MESA 0x8753
14377+#define GL_UNSIGNED_SHORT_1_15_REV_MESA 0x8754
14378+
14379+#endif /* GL_MESA_packed_depth_stencil */
14380+
14381+
14382+#ifndef GL_MESA_program_debug
14383+#define GL_MESA_program_debug 1
14384+
14385+#define GL_FRAGMENT_PROGRAM_POSITION_MESA 0x8bb0
14386+#define GL_FRAGMENT_PROGRAM_CALLBACK_MESA 0x8bb1
14387+#define GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA 0x8bb2
14388+#define GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA 0x8bb3
14389+#define GL_VERTEX_PROGRAM_POSITION_MESA 0x8bb4
14390+#define GL_VERTEX_PROGRAM_CALLBACK_MESA 0x8bb5
14391+#define GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA 0x8bb6
14392+#define GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA 0x8bb7
14393+
14394+typedef void (*GLprogramcallbackMESA)(GLenum target, GLvoid *data);
14395+
14396+GLAPI void GLAPIENTRY glProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, GLvoid *data);
14397+
14398+GLAPI void GLAPIENTRY glGetProgramRegisterfvMESA(GLenum target, GLsizei len, const GLubyte *name, GLfloat *v);
14399+
14400+#endif /* GL_MESA_program_debug */
14401+
14402+
14403+#ifndef GL_ATI_blend_equation_separate
14404+#define GL_ATI_blend_equation_separate 1
14405+
14406+#define GL_ALPHA_BLEND_EQUATION_ATI 0x883D
14407+
14408+GLAPI void GLAPIENTRY glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA );
14409+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA);
14410+
14411+#endif /* GL_ATI_blend_equation_separate */
14412+
14413+
14414+
14415+/**
14416+ ** NOTE!!!!! If you add new functions to this file, or update
14417+ ** glext.h be sure to regenerate the gl_mangle.h file. See comments
14418+ ** in that file for details.
14419+ **/
14420+
14421+
14422+
14423+/**********************************************************************
14424+ * Begin system-specific stuff
14425+ */
14426+#if defined(PRAGMA_EXPORT_SUPPORTED)
14427+#pragma export off
14428+#endif
14429+
14430+#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
14431+#pragma import off
14432+#endif
14433+/*
14434+ * End system-specific stuff
14435+ **********************************************************************/
14436+
14437+
14438+#ifdef __cplusplus
14439+}
14440+#endif
14441+
14442+#endif /* __gl_h_ */
14443Index: git/target-i386/mesa_glext.h
14444===================================================================
14445--- /dev/null 1970-01-01 00:00:00.000000000 +0000
14446+++ git/target-i386/mesa_glext.h 2009-05-23 11:22:17.000000000 +0100
14447@@ -0,0 +1,7279 @@
14448+#ifndef __glext_h_
14449+#define __glext_h_
14450+
14451+#ifdef __cplusplus
14452+extern "C" {
14453+#endif
14454+
14455+/*
14456+** Copyright (c) 2007 The Khronos Group Inc.
14457+**
14458+** Permission is hereby granted, free of charge, to any person obtaining a
14459+** copy of this software and/or associated documentation files (the
14460+** "Materials"), to deal in the Materials without restriction, including
14461+** without limitation the rights to use, copy, modify, merge, publish,
14462+** distribute, sublicense, and/or sell copies of the Materials, and to
14463+** permit persons to whom the Materials are furnished to do so, subject to
14464+** the following conditions:
14465+**
14466+** The above copyright notice and this permission notice shall be included
14467+** in all copies or substantial portions of the Materials.
14468+**
14469+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
14470+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14471+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
14472+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
14473+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
14474+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
14475+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
14476+*/
14477+
14478+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
14479+#define WIN32_LEAN_AND_MEAN 1
14480+#include <windows.h>
14481+#endif
14482+
14483+#ifndef APIENTRY
14484+#define APIENTRY
14485+#endif
14486+#ifndef APIENTRYP
14487+#define APIENTRYP APIENTRY *
14488+#endif
14489+#ifndef GLAPI
14490+#define GLAPI extern
14491+#endif
14492+
14493+/*************************************************************/
14494+
14495+/* Header file version number, required by OpenGL ABI for Linux */
14496+/* glext.h last updated 2007/02/12 */
14497+/* Current version at http://www.opengl.org/registry/ */
14498+#define GL_GLEXT_VERSION 39
14499+
14500+#ifndef GL_VERSION_1_2
14501+#define GL_UNSIGNED_BYTE_3_3_2 0x8032
14502+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
14503+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
14504+#define GL_UNSIGNED_INT_8_8_8_8 0x8035
14505+#define GL_UNSIGNED_INT_10_10_10_2 0x8036
14506+#define GL_RESCALE_NORMAL 0x803A
14507+#define GL_TEXTURE_BINDING_3D 0x806A
14508+#define GL_PACK_SKIP_IMAGES 0x806B
14509+#define GL_PACK_IMAGE_HEIGHT 0x806C
14510+#define GL_UNPACK_SKIP_IMAGES 0x806D
14511+#define GL_UNPACK_IMAGE_HEIGHT 0x806E
14512+#define GL_TEXTURE_3D 0x806F
14513+#define GL_PROXY_TEXTURE_3D 0x8070
14514+#define GL_TEXTURE_DEPTH 0x8071
14515+#define GL_TEXTURE_WRAP_R 0x8072
14516+#define GL_MAX_3D_TEXTURE_SIZE 0x8073
14517+#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
14518+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
14519+#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
14520+#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
14521+#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
14522+#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
14523+#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
14524+#define GL_BGR 0x80E0
14525+#define GL_BGRA 0x80E1
14526+#define GL_MAX_ELEMENTS_VERTICES 0x80E8
14527+#define GL_MAX_ELEMENTS_INDICES 0x80E9
14528+#define GL_CLAMP_TO_EDGE 0x812F
14529+#define GL_TEXTURE_MIN_LOD 0x813A
14530+#define GL_TEXTURE_MAX_LOD 0x813B
14531+#define GL_TEXTURE_BASE_LEVEL 0x813C
14532+#define GL_TEXTURE_MAX_LEVEL 0x813D
14533+#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
14534+#define GL_SINGLE_COLOR 0x81F9
14535+#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
14536+#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
14537+#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
14538+#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
14539+#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
14540+#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
14541+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
14542+#endif
14543+
14544+#ifndef GL_ARB_imaging
14545+#define GL_CONSTANT_COLOR 0x8001
14546+#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
14547+#define GL_CONSTANT_ALPHA 0x8003
14548+#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
14549+#define GL_BLEND_COLOR 0x8005
14550+#define GL_FUNC_ADD 0x8006
14551+#define GL_MIN 0x8007
14552+#define GL_MAX 0x8008
14553+#define GL_BLEND_EQUATION 0x8009
14554+#define GL_FUNC_SUBTRACT 0x800A
14555+#define GL_FUNC_REVERSE_SUBTRACT 0x800B
14556+#define GL_CONVOLUTION_1D 0x8010
14557+#define GL_CONVOLUTION_2D 0x8011
14558+#define GL_SEPARABLE_2D 0x8012
14559+#define GL_CONVOLUTION_BORDER_MODE 0x8013
14560+#define GL_CONVOLUTION_FILTER_SCALE 0x8014
14561+#define GL_CONVOLUTION_FILTER_BIAS 0x8015
14562+#define GL_REDUCE 0x8016
14563+#define GL_CONVOLUTION_FORMAT 0x8017
14564+#define GL_CONVOLUTION_WIDTH 0x8018
14565+#define GL_CONVOLUTION_HEIGHT 0x8019
14566+#define GL_MAX_CONVOLUTION_WIDTH 0x801A
14567+#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
14568+#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
14569+#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
14570+#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
14571+#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
14572+#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
14573+#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
14574+#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
14575+#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
14576+#define GL_HISTOGRAM 0x8024
14577+#define GL_PROXY_HISTOGRAM 0x8025
14578+#define GL_HISTOGRAM_WIDTH 0x8026
14579+#define GL_HISTOGRAM_FORMAT 0x8027
14580+#define GL_HISTOGRAM_RED_SIZE 0x8028
14581+#define GL_HISTOGRAM_GREEN_SIZE 0x8029
14582+#define GL_HISTOGRAM_BLUE_SIZE 0x802A
14583+#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
14584+#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
14585+#define GL_HISTOGRAM_SINK 0x802D
14586+#define GL_MINMAX 0x802E
14587+#define GL_MINMAX_FORMAT 0x802F
14588+#define GL_MINMAX_SINK 0x8030
14589+#define GL_TABLE_TOO_LARGE 0x8031
14590+#define GL_COLOR_MATRIX 0x80B1
14591+#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
14592+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
14593+#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
14594+#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
14595+#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
14596+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
14597+#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
14598+#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
14599+#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
14600+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
14601+#define GL_COLOR_TABLE 0x80D0
14602+#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
14603+#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
14604+#define GL_PROXY_COLOR_TABLE 0x80D3
14605+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
14606+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
14607+#define GL_COLOR_TABLE_SCALE 0x80D6
14608+#define GL_COLOR_TABLE_BIAS 0x80D7
14609+#define GL_COLOR_TABLE_FORMAT 0x80D8
14610+#define GL_COLOR_TABLE_WIDTH 0x80D9
14611+#define GL_COLOR_TABLE_RED_SIZE 0x80DA
14612+#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
14613+#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
14614+#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
14615+#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
14616+#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
14617+#define GL_CONSTANT_BORDER 0x8151
14618+#define GL_REPLICATE_BORDER 0x8153
14619+#define GL_CONVOLUTION_BORDER_COLOR 0x8154
14620+#endif
14621+
14622+#ifndef GL_VERSION_1_3
14623+#define GL_TEXTURE0 0x84C0
14624+#define GL_TEXTURE1 0x84C1
14625+#define GL_TEXTURE2 0x84C2
14626+#define GL_TEXTURE3 0x84C3
14627+#define GL_TEXTURE4 0x84C4
14628+#define GL_TEXTURE5 0x84C5
14629+#define GL_TEXTURE6 0x84C6
14630+#define GL_TEXTURE7 0x84C7
14631+#define GL_TEXTURE8 0x84C8
14632+#define GL_TEXTURE9 0x84C9
14633+#define GL_TEXTURE10 0x84CA
14634+#define GL_TEXTURE11 0x84CB
14635+#define GL_TEXTURE12 0x84CC
14636+#define GL_TEXTURE13 0x84CD
14637+#define GL_TEXTURE14 0x84CE
14638+#define GL_TEXTURE15 0x84CF
14639+#define GL_TEXTURE16 0x84D0
14640+#define GL_TEXTURE17 0x84D1
14641+#define GL_TEXTURE18 0x84D2
14642+#define GL_TEXTURE19 0x84D3
14643+#define GL_TEXTURE20 0x84D4
14644+#define GL_TEXTURE21 0x84D5
14645+#define GL_TEXTURE22 0x84D6
14646+#define GL_TEXTURE23 0x84D7
14647+#define GL_TEXTURE24 0x84D8
14648+#define GL_TEXTURE25 0x84D9
14649+#define GL_TEXTURE26 0x84DA
14650+#define GL_TEXTURE27 0x84DB
14651+#define GL_TEXTURE28 0x84DC
14652+#define GL_TEXTURE29 0x84DD
14653+#define GL_TEXTURE30 0x84DE
14654+#define GL_TEXTURE31 0x84DF
14655+#define GL_ACTIVE_TEXTURE 0x84E0
14656+#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
14657+#define GL_MAX_TEXTURE_UNITS 0x84E2
14658+#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
14659+#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
14660+#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
14661+#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
14662+#define GL_MULTISAMPLE 0x809D
14663+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
14664+#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
14665+#define GL_SAMPLE_COVERAGE 0x80A0
14666+#define GL_SAMPLE_BUFFERS 0x80A8
14667+#define GL_SAMPLES 0x80A9
14668+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
14669+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
14670+#define GL_MULTISAMPLE_BIT 0x20000000
14671+#define GL_NORMAL_MAP 0x8511
14672+#define GL_REFLECTION_MAP 0x8512
14673+#define GL_TEXTURE_CUBE_MAP 0x8513
14674+#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
14675+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
14676+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
14677+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
14678+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
14679+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
14680+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
14681+#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
14682+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
14683+#define GL_COMPRESSED_ALPHA 0x84E9
14684+#define GL_COMPRESSED_LUMINANCE 0x84EA
14685+#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
14686+#define GL_COMPRESSED_INTENSITY 0x84EC
14687+#define GL_COMPRESSED_RGB 0x84ED
14688+#define GL_COMPRESSED_RGBA 0x84EE
14689+#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
14690+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
14691+#define GL_TEXTURE_COMPRESSED 0x86A1
14692+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
14693+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
14694+#define GL_CLAMP_TO_BORDER 0x812D
14695+#define GL_COMBINE 0x8570
14696+#define GL_COMBINE_RGB 0x8571
14697+#define GL_COMBINE_ALPHA 0x8572
14698+#define GL_SOURCE0_RGB 0x8580
14699+#define GL_SOURCE1_RGB 0x8581
14700+#define GL_SOURCE2_RGB 0x8582
14701+#define GL_SOURCE0_ALPHA 0x8588
14702+#define GL_SOURCE1_ALPHA 0x8589
14703+#define GL_SOURCE2_ALPHA 0x858A
14704+#define GL_OPERAND0_RGB 0x8590
14705+#define GL_OPERAND1_RGB 0x8591
14706+#define GL_OPERAND2_RGB 0x8592
14707+#define GL_OPERAND0_ALPHA 0x8598
14708+#define GL_OPERAND1_ALPHA 0x8599
14709+#define GL_OPERAND2_ALPHA 0x859A
14710+#define GL_RGB_SCALE 0x8573
14711+#define GL_ADD_SIGNED 0x8574
14712+#define GL_INTERPOLATE 0x8575
14713+#define GL_SUBTRACT 0x84E7
14714+#define GL_CONSTANT 0x8576
14715+#define GL_PRIMARY_COLOR 0x8577
14716+#define GL_PREVIOUS 0x8578
14717+#define GL_DOT3_RGB 0x86AE
14718+#define GL_DOT3_RGBA 0x86AF
14719+#endif
14720+
14721+#ifndef GL_VERSION_1_4
14722+#define GL_BLEND_DST_RGB 0x80C8
14723+#define GL_BLEND_SRC_RGB 0x80C9
14724+#define GL_BLEND_DST_ALPHA 0x80CA
14725+#define GL_BLEND_SRC_ALPHA 0x80CB
14726+#define GL_POINT_SIZE_MIN 0x8126
14727+#define GL_POINT_SIZE_MAX 0x8127
14728+#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
14729+#define GL_POINT_DISTANCE_ATTENUATION 0x8129
14730+#define GL_GENERATE_MIPMAP 0x8191
14731+#define GL_GENERATE_MIPMAP_HINT 0x8192
14732+#define GL_DEPTH_COMPONENT16 0x81A5
14733+#define GL_DEPTH_COMPONENT24 0x81A6
14734+#define GL_DEPTH_COMPONENT32 0x81A7
14735+#define GL_MIRRORED_REPEAT 0x8370
14736+#define GL_FOG_COORDINATE_SOURCE 0x8450
14737+#define GL_FOG_COORDINATE 0x8451
14738+#define GL_FRAGMENT_DEPTH 0x8452
14739+#define GL_CURRENT_FOG_COORDINATE 0x8453
14740+#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454
14741+#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455
14742+#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456
14743+#define GL_FOG_COORDINATE_ARRAY 0x8457
14744+#define GL_COLOR_SUM 0x8458
14745+#define GL_CURRENT_SECONDARY_COLOR 0x8459
14746+#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A
14747+#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B
14748+#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C
14749+#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D
14750+#define GL_SECONDARY_COLOR_ARRAY 0x845E
14751+#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
14752+#define GL_TEXTURE_FILTER_CONTROL 0x8500
14753+#define GL_TEXTURE_LOD_BIAS 0x8501
14754+#define GL_INCR_WRAP 0x8507
14755+#define GL_DECR_WRAP 0x8508
14756+#define GL_TEXTURE_DEPTH_SIZE 0x884A
14757+#define GL_DEPTH_TEXTURE_MODE 0x884B
14758+#define GL_TEXTURE_COMPARE_MODE 0x884C
14759+#define GL_TEXTURE_COMPARE_FUNC 0x884D
14760+#define GL_COMPARE_R_TO_TEXTURE 0x884E
14761+#endif
14762+
14763+#ifndef GL_VERSION_1_5
14764+#define GL_BUFFER_SIZE 0x8764
14765+#define GL_BUFFER_USAGE 0x8765
14766+#define GL_QUERY_COUNTER_BITS 0x8864
14767+#define GL_CURRENT_QUERY 0x8865
14768+#define GL_QUERY_RESULT 0x8866
14769+#define GL_QUERY_RESULT_AVAILABLE 0x8867
14770+#define GL_ARRAY_BUFFER 0x8892
14771+#define GL_ELEMENT_ARRAY_BUFFER 0x8893
14772+#define GL_ARRAY_BUFFER_BINDING 0x8894
14773+#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
14774+#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
14775+#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
14776+#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
14777+#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899
14778+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
14779+#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B
14780+#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C
14781+#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D
14782+#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E
14783+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
14784+#define GL_READ_ONLY 0x88B8
14785+#define GL_WRITE_ONLY 0x88B9
14786+#define GL_READ_WRITE 0x88BA
14787+#define GL_BUFFER_ACCESS 0x88BB
14788+#define GL_BUFFER_MAPPED 0x88BC
14789+#define GL_BUFFER_MAP_POINTER 0x88BD
14790+#define GL_STREAM_DRAW 0x88E0
14791+#define GL_STREAM_READ 0x88E1
14792+#define GL_STREAM_COPY 0x88E2
14793+#define GL_STATIC_DRAW 0x88E4
14794+#define GL_STATIC_READ 0x88E5
14795+#define GL_STATIC_COPY 0x88E6
14796+#define GL_DYNAMIC_DRAW 0x88E8
14797+#define GL_DYNAMIC_READ 0x88E9
14798+#define GL_DYNAMIC_COPY 0x88EA
14799+#define GL_SAMPLES_PASSED 0x8914
14800+#define GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE
14801+#define GL_FOG_COORD GL_FOG_COORDINATE
14802+#define GL_CURRENT_FOG_COORD GL_CURRENT_FOG_COORDINATE
14803+#define GL_FOG_COORD_ARRAY_TYPE GL_FOG_COORDINATE_ARRAY_TYPE
14804+#define GL_FOG_COORD_ARRAY_STRIDE GL_FOG_COORDINATE_ARRAY_STRIDE
14805+#define GL_FOG_COORD_ARRAY_POINTER GL_FOG_COORDINATE_ARRAY_POINTER
14806+#define GL_FOG_COORD_ARRAY GL_FOG_COORDINATE_ARRAY
14807+#define GL_FOG_COORD_ARRAY_BUFFER_BINDING GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING
14808+#define GL_SRC0_RGB GL_SOURCE0_RGB
14809+#define GL_SRC1_RGB GL_SOURCE1_RGB
14810+#define GL_SRC2_RGB GL_SOURCE2_RGB
14811+#define GL_SRC0_ALPHA GL_SOURCE0_ALPHA
14812+#define GL_SRC1_ALPHA GL_SOURCE1_ALPHA
14813+#define GL_SRC2_ALPHA GL_SOURCE2_ALPHA
14814+#endif
14815+
14816+#ifndef GL_VERSION_2_0
14817+#define GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION
14818+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
14819+#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
14820+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
14821+#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
14822+#define GL_CURRENT_VERTEX_ATTRIB 0x8626
14823+#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
14824+#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643
14825+#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
14826+#define GL_STENCIL_BACK_FUNC 0x8800
14827+#define GL_STENCIL_BACK_FAIL 0x8801
14828+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
14829+#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
14830+#define GL_MAX_DRAW_BUFFERS 0x8824
14831+#define GL_DRAW_BUFFER0 0x8825
14832+#define GL_DRAW_BUFFER1 0x8826
14833+#define GL_DRAW_BUFFER2 0x8827
14834+#define GL_DRAW_BUFFER3 0x8828
14835+#define GL_DRAW_BUFFER4 0x8829
14836+#define GL_DRAW_BUFFER5 0x882A
14837+#define GL_DRAW_BUFFER6 0x882B
14838+#define GL_DRAW_BUFFER7 0x882C
14839+#define GL_DRAW_BUFFER8 0x882D
14840+#define GL_DRAW_BUFFER9 0x882E
14841+#define GL_DRAW_BUFFER10 0x882F
14842+#define GL_DRAW_BUFFER11 0x8830
14843+#define GL_DRAW_BUFFER12 0x8831
14844+#define GL_DRAW_BUFFER13 0x8832
14845+#define GL_DRAW_BUFFER14 0x8833
14846+#define GL_DRAW_BUFFER15 0x8834
14847+#define GL_BLEND_EQUATION_ALPHA 0x883D
14848+#define GL_POINT_SPRITE 0x8861
14849+#define GL_COORD_REPLACE 0x8862
14850+#define GL_MAX_VERTEX_ATTRIBS 0x8869
14851+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
14852+#define GL_MAX_TEXTURE_COORDS 0x8871
14853+#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
14854+#define GL_FRAGMENT_SHADER 0x8B30
14855+#define GL_VERTEX_SHADER 0x8B31
14856+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
14857+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
14858+#define GL_MAX_VARYING_FLOATS 0x8B4B
14859+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
14860+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
14861+#define GL_SHADER_TYPE 0x8B4F
14862+#define GL_FLOAT_VEC2 0x8B50
14863+#define GL_FLOAT_VEC3 0x8B51
14864+#define GL_FLOAT_VEC4 0x8B52
14865+#define GL_INT_VEC2 0x8B53
14866+#define GL_INT_VEC3 0x8B54
14867+#define GL_INT_VEC4 0x8B55
14868+#define GL_BOOL 0x8B56
14869+#define GL_BOOL_VEC2 0x8B57
14870+#define GL_BOOL_VEC3 0x8B58
14871+#define GL_BOOL_VEC4 0x8B59
14872+#define GL_FLOAT_MAT2 0x8B5A
14873+#define GL_FLOAT_MAT3 0x8B5B
14874+#define GL_FLOAT_MAT4 0x8B5C
14875+#define GL_SAMPLER_1D 0x8B5D
14876+#define GL_SAMPLER_2D 0x8B5E
14877+#define GL_SAMPLER_3D 0x8B5F
14878+#define GL_SAMPLER_CUBE 0x8B60
14879+#define GL_SAMPLER_1D_SHADOW 0x8B61
14880+#define GL_SAMPLER_2D_SHADOW 0x8B62
14881+#define GL_DELETE_STATUS 0x8B80
14882+#define GL_COMPILE_STATUS 0x8B81
14883+#define GL_LINK_STATUS 0x8B82
14884+#define GL_VALIDATE_STATUS 0x8B83
14885+#define GL_INFO_LOG_LENGTH 0x8B84
14886+#define GL_ATTACHED_SHADERS 0x8B85
14887+#define GL_ACTIVE_UNIFORMS 0x8B86
14888+#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
14889+#define GL_SHADER_SOURCE_LENGTH 0x8B88
14890+#define GL_ACTIVE_ATTRIBUTES 0x8B89
14891+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
14892+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
14893+#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
14894+#define GL_CURRENT_PROGRAM 0x8B8D
14895+#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
14896+#define GL_LOWER_LEFT 0x8CA1
14897+#define GL_UPPER_LEFT 0x8CA2
14898+#define GL_STENCIL_BACK_REF 0x8CA3
14899+#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
14900+#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
14901+#endif
14902+
14903+#ifndef GL_VERSION_2_1
14904+#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F
14905+#define GL_PIXEL_PACK_BUFFER 0x88EB
14906+#define GL_PIXEL_UNPACK_BUFFER 0x88EC
14907+#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
14908+#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
14909+#define GL_FLOAT_MAT2x3 0x8B65
14910+#define GL_FLOAT_MAT2x4 0x8B66
14911+#define GL_FLOAT_MAT3x2 0x8B67
14912+#define GL_FLOAT_MAT3x4 0x8B68
14913+#define GL_FLOAT_MAT4x2 0x8B69
14914+#define GL_FLOAT_MAT4x3 0x8B6A
14915+#define GL_SRGB 0x8C40
14916+#define GL_SRGB8 0x8C41
14917+#define GL_SRGB_ALPHA 0x8C42
14918+#define GL_SRGB8_ALPHA8 0x8C43
14919+#define GL_SLUMINANCE_ALPHA 0x8C44
14920+#define GL_SLUMINANCE8_ALPHA8 0x8C45
14921+#define GL_SLUMINANCE 0x8C46
14922+#define GL_SLUMINANCE8 0x8C47
14923+#define GL_COMPRESSED_SRGB 0x8C48
14924+#define GL_COMPRESSED_SRGB_ALPHA 0x8C49
14925+#define GL_COMPRESSED_SLUMINANCE 0x8C4A
14926+#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B
14927+#endif
14928+
14929+#ifndef GL_ARB_multitexture
14930+#define GL_TEXTURE0_ARB 0x84C0
14931+#define GL_TEXTURE1_ARB 0x84C1
14932+#define GL_TEXTURE2_ARB 0x84C2
14933+#define GL_TEXTURE3_ARB 0x84C3
14934+#define GL_TEXTURE4_ARB 0x84C4
14935+#define GL_TEXTURE5_ARB 0x84C5
14936+#define GL_TEXTURE6_ARB 0x84C6
14937+#define GL_TEXTURE7_ARB 0x84C7
14938+#define GL_TEXTURE8_ARB 0x84C8
14939+#define GL_TEXTURE9_ARB 0x84C9
14940+#define GL_TEXTURE10_ARB 0x84CA
14941+#define GL_TEXTURE11_ARB 0x84CB
14942+#define GL_TEXTURE12_ARB 0x84CC
14943+#define GL_TEXTURE13_ARB 0x84CD
14944+#define GL_TEXTURE14_ARB 0x84CE
14945+#define GL_TEXTURE15_ARB 0x84CF
14946+#define GL_TEXTURE16_ARB 0x84D0
14947+#define GL_TEXTURE17_ARB 0x84D1
14948+#define GL_TEXTURE18_ARB 0x84D2
14949+#define GL_TEXTURE19_ARB 0x84D3
14950+#define GL_TEXTURE20_ARB 0x84D4
14951+#define GL_TEXTURE21_ARB 0x84D5
14952+#define GL_TEXTURE22_ARB 0x84D6
14953+#define GL_TEXTURE23_ARB 0x84D7
14954+#define GL_TEXTURE24_ARB 0x84D8
14955+#define GL_TEXTURE25_ARB 0x84D9
14956+#define GL_TEXTURE26_ARB 0x84DA
14957+#define GL_TEXTURE27_ARB 0x84DB
14958+#define GL_TEXTURE28_ARB 0x84DC
14959+#define GL_TEXTURE29_ARB 0x84DD
14960+#define GL_TEXTURE30_ARB 0x84DE
14961+#define GL_TEXTURE31_ARB 0x84DF
14962+#define GL_ACTIVE_TEXTURE_ARB 0x84E0
14963+#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
14964+#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
14965+#endif
14966+
14967+#ifndef GL_ARB_transpose_matrix
14968+#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3
14969+#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4
14970+#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5
14971+#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6
14972+#endif
14973+
14974+#ifndef GL_ARB_multisample
14975+#define GL_MULTISAMPLE_ARB 0x809D
14976+#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E
14977+#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F
14978+#define GL_SAMPLE_COVERAGE_ARB 0x80A0
14979+#define GL_SAMPLE_BUFFERS_ARB 0x80A8
14980+#define GL_SAMPLES_ARB 0x80A9
14981+#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA
14982+#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB
14983+#define GL_MULTISAMPLE_BIT_ARB 0x20000000
14984+#endif
14985+
14986+#ifndef GL_ARB_texture_env_add
14987+#endif
14988+
14989+#ifndef GL_ARB_texture_cube_map
14990+#define GL_NORMAL_MAP_ARB 0x8511
14991+#define GL_REFLECTION_MAP_ARB 0x8512
14992+#define GL_TEXTURE_CUBE_MAP_ARB 0x8513
14993+#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514
14994+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515
14995+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516
14996+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517
14997+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518
14998+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519
14999+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A
15000+#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B
15001+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C
15002+#endif
15003+
15004+#ifndef GL_ARB_texture_compression
15005+#define GL_COMPRESSED_ALPHA_ARB 0x84E9
15006+#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA
15007+#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB
15008+#define GL_COMPRESSED_INTENSITY_ARB 0x84EC
15009+#define GL_COMPRESSED_RGB_ARB 0x84ED
15010+#define GL_COMPRESSED_RGBA_ARB 0x84EE
15011+#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF
15012+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
15013+#define GL_TEXTURE_COMPRESSED_ARB 0x86A1
15014+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
15015+#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
15016+#endif
15017+
15018+#ifndef GL_ARB_texture_border_clamp
15019+#define GL_CLAMP_TO_BORDER_ARB 0x812D
15020+#endif
15021+
15022+#ifndef GL_ARB_point_parameters
15023+#define GL_POINT_SIZE_MIN_ARB 0x8126
15024+#define GL_POINT_SIZE_MAX_ARB 0x8127
15025+#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128
15026+#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129
15027+#endif
15028+
15029+#ifndef GL_ARB_vertex_blend
15030+#define GL_MAX_VERTEX_UNITS_ARB 0x86A4
15031+#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5
15032+#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6
15033+#define GL_VERTEX_BLEND_ARB 0x86A7
15034+#define GL_CURRENT_WEIGHT_ARB 0x86A8
15035+#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9
15036+#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA
15037+#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB
15038+#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC
15039+#define GL_WEIGHT_ARRAY_ARB 0x86AD
15040+#define GL_MODELVIEW0_ARB 0x1700
15041+#define GL_MODELVIEW1_ARB 0x850A
15042+#define GL_MODELVIEW2_ARB 0x8722
15043+#define GL_MODELVIEW3_ARB 0x8723
15044+#define GL_MODELVIEW4_ARB 0x8724
15045+#define GL_MODELVIEW5_ARB 0x8725
15046+#define GL_MODELVIEW6_ARB 0x8726
15047+#define GL_MODELVIEW7_ARB 0x8727
15048+#define GL_MODELVIEW8_ARB 0x8728
15049+#define GL_MODELVIEW9_ARB 0x8729
15050+#define GL_MODELVIEW10_ARB 0x872A
15051+#define GL_MODELVIEW11_ARB 0x872B
15052+#define GL_MODELVIEW12_ARB 0x872C
15053+#define GL_MODELVIEW13_ARB 0x872D
15054+#define GL_MODELVIEW14_ARB 0x872E
15055+#define GL_MODELVIEW15_ARB 0x872F
15056+#define GL_MODELVIEW16_ARB 0x8730
15057+#define GL_MODELVIEW17_ARB 0x8731
15058+#define GL_MODELVIEW18_ARB 0x8732
15059+#define GL_MODELVIEW19_ARB 0x8733
15060+#define GL_MODELVIEW20_ARB 0x8734
15061+#define GL_MODELVIEW21_ARB 0x8735
15062+#define GL_MODELVIEW22_ARB 0x8736
15063+#define GL_MODELVIEW23_ARB 0x8737
15064+#define GL_MODELVIEW24_ARB 0x8738
15065+#define GL_MODELVIEW25_ARB 0x8739
15066+#define GL_MODELVIEW26_ARB 0x873A
15067+#define GL_MODELVIEW27_ARB 0x873B
15068+#define GL_MODELVIEW28_ARB 0x873C
15069+#define GL_MODELVIEW29_ARB 0x873D
15070+#define GL_MODELVIEW30_ARB 0x873E
15071+#define GL_MODELVIEW31_ARB 0x873F
15072+#endif
15073+
15074+#ifndef GL_ARB_matrix_palette
15075+#define GL_MATRIX_PALETTE_ARB 0x8840
15076+#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841
15077+#define GL_MAX_PALETTE_MATRICES_ARB 0x8842
15078+#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843
15079+#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844
15080+#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845
15081+#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846
15082+#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847
15083+#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848
15084+#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849
15085+#endif
15086+
15087+#ifndef GL_ARB_texture_env_combine
15088+#define GL_COMBINE_ARB 0x8570
15089+#define GL_COMBINE_RGB_ARB 0x8571
15090+#define GL_COMBINE_ALPHA_ARB 0x8572
15091+#define GL_SOURCE0_RGB_ARB 0x8580
15092+#define GL_SOURCE1_RGB_ARB 0x8581
15093+#define GL_SOURCE2_RGB_ARB 0x8582
15094+#define GL_SOURCE0_ALPHA_ARB 0x8588
15095+#define GL_SOURCE1_ALPHA_ARB 0x8589
15096+#define GL_SOURCE2_ALPHA_ARB 0x858A
15097+#define GL_OPERAND0_RGB_ARB 0x8590
15098+#define GL_OPERAND1_RGB_ARB 0x8591
15099+#define GL_OPERAND2_RGB_ARB 0x8592
15100+#define GL_OPERAND0_ALPHA_ARB 0x8598
15101+#define GL_OPERAND1_ALPHA_ARB 0x8599
15102+#define GL_OPERAND2_ALPHA_ARB 0x859A
15103+#define GL_RGB_SCALE_ARB 0x8573
15104+#define GL_ADD_SIGNED_ARB 0x8574
15105+#define GL_INTERPOLATE_ARB 0x8575
15106+#define GL_SUBTRACT_ARB 0x84E7
15107+#define GL_CONSTANT_ARB 0x8576
15108+#define GL_PRIMARY_COLOR_ARB 0x8577
15109+#define GL_PREVIOUS_ARB 0x8578
15110+#endif
15111+
15112+#ifndef GL_ARB_texture_env_crossbar
15113+#endif
15114+
15115+#ifndef GL_ARB_texture_env_dot3
15116+#define GL_DOT3_RGB_ARB 0x86AE
15117+#define GL_DOT3_RGBA_ARB 0x86AF
15118+#endif
15119+
15120+#ifndef GL_ARB_texture_mirrored_repeat
15121+#define GL_MIRRORED_REPEAT_ARB 0x8370
15122+#endif
15123+
15124+#ifndef GL_ARB_depth_texture
15125+#define GL_DEPTH_COMPONENT16_ARB 0x81A5
15126+#define GL_DEPTH_COMPONENT24_ARB 0x81A6
15127+#define GL_DEPTH_COMPONENT32_ARB 0x81A7
15128+#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A
15129+#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B
15130+#endif
15131+
15132+#ifndef GL_ARB_shadow
15133+#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C
15134+#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D
15135+#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E
15136+#endif
15137+
15138+#ifndef GL_ARB_shadow_ambient
15139+#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF
15140+#endif
15141+
15142+#ifndef GL_ARB_window_pos
15143+#endif
15144+
15145+#ifndef GL_ARB_vertex_program
15146+#define GL_COLOR_SUM_ARB 0x8458
15147+#define GL_VERTEX_PROGRAM_ARB 0x8620
15148+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622
15149+#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623
15150+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624
15151+#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625
15152+#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626
15153+#define GL_PROGRAM_LENGTH_ARB 0x8627
15154+#define GL_PROGRAM_STRING_ARB 0x8628
15155+#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E
15156+#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F
15157+#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640
15158+#define GL_CURRENT_MATRIX_ARB 0x8641
15159+#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642
15160+#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643
15161+#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645
15162+#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B
15163+#define GL_PROGRAM_BINDING_ARB 0x8677
15164+#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869
15165+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A
15166+#define GL_PROGRAM_ERROR_STRING_ARB 0x8874
15167+#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875
15168+#define GL_PROGRAM_FORMAT_ARB 0x8876
15169+#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0
15170+#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1
15171+#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2
15172+#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3
15173+#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4
15174+#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5
15175+#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6
15176+#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7
15177+#define GL_PROGRAM_PARAMETERS_ARB 0x88A8
15178+#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9
15179+#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA
15180+#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB
15181+#define GL_PROGRAM_ATTRIBS_ARB 0x88AC
15182+#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD
15183+#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE
15184+#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF
15185+#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0
15186+#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1
15187+#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2
15188+#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3
15189+#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4
15190+#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5
15191+#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6
15192+#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7
15193+#define GL_MATRIX0_ARB 0x88C0
15194+#define GL_MATRIX1_ARB 0x88C1
15195+#define GL_MATRIX2_ARB 0x88C2
15196+#define GL_MATRIX3_ARB 0x88C3
15197+#define GL_MATRIX4_ARB 0x88C4
15198+#define GL_MATRIX5_ARB 0x88C5
15199+#define GL_MATRIX6_ARB 0x88C6
15200+#define GL_MATRIX7_ARB 0x88C7
15201+#define GL_MATRIX8_ARB 0x88C8
15202+#define GL_MATRIX9_ARB 0x88C9
15203+#define GL_MATRIX10_ARB 0x88CA
15204+#define GL_MATRIX11_ARB 0x88CB
15205+#define GL_MATRIX12_ARB 0x88CC
15206+#define GL_MATRIX13_ARB 0x88CD
15207+#define GL_MATRIX14_ARB 0x88CE
15208+#define GL_MATRIX15_ARB 0x88CF
15209+#define GL_MATRIX16_ARB 0x88D0
15210+#define GL_MATRIX17_ARB 0x88D1
15211+#define GL_MATRIX18_ARB 0x88D2
15212+#define GL_MATRIX19_ARB 0x88D3
15213+#define GL_MATRIX20_ARB 0x88D4
15214+#define GL_MATRIX21_ARB 0x88D5
15215+#define GL_MATRIX22_ARB 0x88D6
15216+#define GL_MATRIX23_ARB 0x88D7
15217+#define GL_MATRIX24_ARB 0x88D8
15218+#define GL_MATRIX25_ARB 0x88D9
15219+#define GL_MATRIX26_ARB 0x88DA
15220+#define GL_MATRIX27_ARB 0x88DB
15221+#define GL_MATRIX28_ARB 0x88DC
15222+#define GL_MATRIX29_ARB 0x88DD
15223+#define GL_MATRIX30_ARB 0x88DE
15224+#define GL_MATRIX31_ARB 0x88DF
15225+#endif
15226+
15227+#ifndef GL_ARB_fragment_program
15228+#define GL_FRAGMENT_PROGRAM_ARB 0x8804
15229+#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805
15230+#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806
15231+#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807
15232+#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808
15233+#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809
15234+#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A
15235+#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B
15236+#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C
15237+#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D
15238+#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E
15239+#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F
15240+#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810
15241+#define GL_MAX_TEXTURE_COORDS_ARB 0x8871
15242+#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872
15243+#endif
15244+
15245+#ifndef GL_ARB_vertex_buffer_object
15246+#define GL_BUFFER_SIZE_ARB 0x8764
15247+#define GL_BUFFER_USAGE_ARB 0x8765
15248+#define GL_ARRAY_BUFFER_ARB 0x8892
15249+#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893
15250+#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894
15251+#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895
15252+#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896
15253+#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897
15254+#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898
15255+#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899
15256+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A
15257+#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B
15258+#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C
15259+#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D
15260+#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E
15261+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F
15262+#define GL_READ_ONLY_ARB 0x88B8
15263+#define GL_WRITE_ONLY_ARB 0x88B9
15264+#define GL_READ_WRITE_ARB 0x88BA
15265+#define GL_BUFFER_ACCESS_ARB 0x88BB
15266+#define GL_BUFFER_MAPPED_ARB 0x88BC
15267+#define GL_BUFFER_MAP_POINTER_ARB 0x88BD
15268+#define GL_STREAM_DRAW_ARB 0x88E0
15269+#define GL_STREAM_READ_ARB 0x88E1
15270+#define GL_STREAM_COPY_ARB 0x88E2
15271+#define GL_STATIC_DRAW_ARB 0x88E4
15272+#define GL_STATIC_READ_ARB 0x88E5
15273+#define GL_STATIC_COPY_ARB 0x88E6
15274+#define GL_DYNAMIC_DRAW_ARB 0x88E8
15275+#define GL_DYNAMIC_READ_ARB 0x88E9
15276+#define GL_DYNAMIC_COPY_ARB 0x88EA
15277+#endif
15278+
15279+#ifndef GL_ARB_occlusion_query
15280+#define GL_QUERY_COUNTER_BITS_ARB 0x8864
15281+#define GL_CURRENT_QUERY_ARB 0x8865
15282+#define GL_QUERY_RESULT_ARB 0x8866
15283+#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867
15284+#define GL_SAMPLES_PASSED_ARB 0x8914
15285+#endif
15286+
15287+#ifndef GL_ARB_shader_objects
15288+#define GL_PROGRAM_OBJECT_ARB 0x8B40
15289+#define GL_SHADER_OBJECT_ARB 0x8B48
15290+#define GL_OBJECT_TYPE_ARB 0x8B4E
15291+#define GL_OBJECT_SUBTYPE_ARB 0x8B4F
15292+#define GL_FLOAT_VEC2_ARB 0x8B50
15293+#define GL_FLOAT_VEC3_ARB 0x8B51
15294+#define GL_FLOAT_VEC4_ARB 0x8B52
15295+#define GL_INT_VEC2_ARB 0x8B53
15296+#define GL_INT_VEC3_ARB 0x8B54
15297+#define GL_INT_VEC4_ARB 0x8B55
15298+#define GL_BOOL_ARB 0x8B56
15299+#define GL_BOOL_VEC2_ARB 0x8B57
15300+#define GL_BOOL_VEC3_ARB 0x8B58
15301+#define GL_BOOL_VEC4_ARB 0x8B59
15302+#define GL_FLOAT_MAT2_ARB 0x8B5A
15303+#define GL_FLOAT_MAT3_ARB 0x8B5B
15304+#define GL_FLOAT_MAT4_ARB 0x8B5C
15305+#define GL_SAMPLER_1D_ARB 0x8B5D
15306+#define GL_SAMPLER_2D_ARB 0x8B5E
15307+#define GL_SAMPLER_3D_ARB 0x8B5F
15308+#define GL_SAMPLER_CUBE_ARB 0x8B60
15309+#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61
15310+#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62
15311+#define GL_SAMPLER_2D_RECT_ARB 0x8B63
15312+#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64
15313+#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80
15314+#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81
15315+#define GL_OBJECT_LINK_STATUS_ARB 0x8B82
15316+#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83
15317+#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84
15318+#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85
15319+#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86
15320+#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87
15321+#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88
15322+#endif
15323+
15324+#ifndef GL_ARB_vertex_shader
15325+#define GL_VERTEX_SHADER_ARB 0x8B31
15326+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A
15327+#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B
15328+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C
15329+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D
15330+#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89
15331+#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A
15332+#endif
15333+
15334+#ifndef GL_ARB_fragment_shader
15335+#define GL_FRAGMENT_SHADER_ARB 0x8B30
15336+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49
15337+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B
15338+#endif
15339+
15340+#ifndef GL_ARB_shading_language_100
15341+#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C
15342+#endif
15343+
15344+#ifndef GL_ARB_texture_non_power_of_two
15345+#endif
15346+
15347+#ifndef GL_ARB_point_sprite
15348+#define GL_POINT_SPRITE_ARB 0x8861
15349+#define GL_COORD_REPLACE_ARB 0x8862
15350+#endif
15351+
15352+#ifndef GL_ARB_fragment_program_shadow
15353+#endif
15354+
15355+#ifndef GL_ARB_draw_buffers
15356+#define GL_MAX_DRAW_BUFFERS_ARB 0x8824
15357+#define GL_DRAW_BUFFER0_ARB 0x8825
15358+#define GL_DRAW_BUFFER1_ARB 0x8826
15359+#define GL_DRAW_BUFFER2_ARB 0x8827
15360+#define GL_DRAW_BUFFER3_ARB 0x8828
15361+#define GL_DRAW_BUFFER4_ARB 0x8829
15362+#define GL_DRAW_BUFFER5_ARB 0x882A
15363+#define GL_DRAW_BUFFER6_ARB 0x882B
15364+#define GL_DRAW_BUFFER7_ARB 0x882C
15365+#define GL_DRAW_BUFFER8_ARB 0x882D
15366+#define GL_DRAW_BUFFER9_ARB 0x882E
15367+#define GL_DRAW_BUFFER10_ARB 0x882F
15368+#define GL_DRAW_BUFFER11_ARB 0x8830
15369+#define GL_DRAW_BUFFER12_ARB 0x8831
15370+#define GL_DRAW_BUFFER13_ARB 0x8832
15371+#define GL_DRAW_BUFFER14_ARB 0x8833
15372+#define GL_DRAW_BUFFER15_ARB 0x8834
15373+#endif
15374+
15375+#ifndef GL_ARB_texture_rectangle
15376+#define GL_TEXTURE_RECTANGLE_ARB 0x84F5
15377+#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6
15378+#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7
15379+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
15380+#endif
15381+
15382+#ifndef GL_ARB_color_buffer_float
15383+#define GL_RGBA_FLOAT_MODE_ARB 0x8820
15384+#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A
15385+#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B
15386+#define GL_CLAMP_READ_COLOR_ARB 0x891C
15387+#define GL_FIXED_ONLY_ARB 0x891D
15388+#endif
15389+
15390+#ifndef GL_ARB_half_float_pixel
15391+#define GL_HALF_FLOAT_ARB 0x140B
15392+#endif
15393+
15394+#ifndef GL_ARB_texture_float
15395+#define GL_TEXTURE_RED_TYPE_ARB 0x8C10
15396+#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11
15397+#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12
15398+#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13
15399+#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14
15400+#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15
15401+#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16
15402+#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17
15403+#define GL_RGBA32F_ARB 0x8814
15404+#define GL_RGB32F_ARB 0x8815
15405+#define GL_ALPHA32F_ARB 0x8816
15406+#define GL_INTENSITY32F_ARB 0x8817
15407+#define GL_LUMINANCE32F_ARB 0x8818
15408+#define GL_LUMINANCE_ALPHA32F_ARB 0x8819
15409+#define GL_RGBA16F_ARB 0x881A
15410+#define GL_RGB16F_ARB 0x881B
15411+#define GL_ALPHA16F_ARB 0x881C
15412+#define GL_INTENSITY16F_ARB 0x881D
15413+#define GL_LUMINANCE16F_ARB 0x881E
15414+#define GL_LUMINANCE_ALPHA16F_ARB 0x881F
15415+#endif
15416+
15417+#ifndef GL_ARB_pixel_buffer_object
15418+#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB
15419+#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC
15420+#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED
15421+#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
15422+#endif
15423+
15424+#ifndef GL_EXT_abgr
15425+#define GL_ABGR_EXT 0x8000
15426+#endif
15427+
15428+#ifndef GL_EXT_blend_color
15429+#define GL_CONSTANT_COLOR_EXT 0x8001
15430+#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002
15431+#define GL_CONSTANT_ALPHA_EXT 0x8003
15432+#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004
15433+#define GL_BLEND_COLOR_EXT 0x8005
15434+#endif
15435+
15436+#ifndef GL_EXT_polygon_offset
15437+#define GL_POLYGON_OFFSET_EXT 0x8037
15438+#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038
15439+#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039
15440+#endif
15441+
15442+#ifndef GL_EXT_texture
15443+#define GL_ALPHA4_EXT 0x803B
15444+#define GL_ALPHA8_EXT 0x803C
15445+#define GL_ALPHA12_EXT 0x803D
15446+#define GL_ALPHA16_EXT 0x803E
15447+#define GL_LUMINANCE4_EXT 0x803F
15448+#define GL_LUMINANCE8_EXT 0x8040
15449+#define GL_LUMINANCE12_EXT 0x8041
15450+#define GL_LUMINANCE16_EXT 0x8042
15451+#define GL_LUMINANCE4_ALPHA4_EXT 0x8043
15452+#define GL_LUMINANCE6_ALPHA2_EXT 0x8044
15453+#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
15454+#define GL_LUMINANCE12_ALPHA4_EXT 0x8046
15455+#define GL_LUMINANCE12_ALPHA12_EXT 0x8047
15456+#define GL_LUMINANCE16_ALPHA16_EXT 0x8048
15457+#define GL_INTENSITY_EXT 0x8049
15458+#define GL_INTENSITY4_EXT 0x804A
15459+#define GL_INTENSITY8_EXT 0x804B
15460+#define GL_INTENSITY12_EXT 0x804C
15461+#define GL_INTENSITY16_EXT 0x804D
15462+#define GL_RGB2_EXT 0x804E
15463+#define GL_RGB4_EXT 0x804F
15464+#define GL_RGB5_EXT 0x8050
15465+#define GL_RGB8_EXT 0x8051
15466+#define GL_RGB10_EXT 0x8052
15467+#define GL_RGB12_EXT 0x8053
15468+#define GL_RGB16_EXT 0x8054
15469+#define GL_RGBA2_EXT 0x8055
15470+#define GL_RGBA4_EXT 0x8056
15471+#define GL_RGB5_A1_EXT 0x8057
15472+#define GL_RGBA8_EXT 0x8058
15473+#define GL_RGB10_A2_EXT 0x8059
15474+#define GL_RGBA12_EXT 0x805A
15475+#define GL_RGBA16_EXT 0x805B
15476+#define GL_TEXTURE_RED_SIZE_EXT 0x805C
15477+#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D
15478+#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E
15479+#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F
15480+#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060
15481+#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061
15482+#define GL_REPLACE_EXT 0x8062
15483+#define GL_PROXY_TEXTURE_1D_EXT 0x8063
15484+#define GL_PROXY_TEXTURE_2D_EXT 0x8064
15485+#define GL_TEXTURE_TOO_LARGE_EXT 0x8065
15486+#endif
15487+
15488+#ifndef GL_EXT_texture3D
15489+#define GL_PACK_SKIP_IMAGES_EXT 0x806B
15490+#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C
15491+#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D
15492+#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E
15493+#define GL_TEXTURE_3D_EXT 0x806F
15494+#define GL_PROXY_TEXTURE_3D_EXT 0x8070
15495+#define GL_TEXTURE_DEPTH_EXT 0x8071
15496+#define GL_TEXTURE_WRAP_R_EXT 0x8072
15497+#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073
15498+#endif
15499+
15500+#ifndef GL_SGIS_texture_filter4
15501+#define GL_FILTER4_SGIS 0x8146
15502+#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147
15503+#endif
15504+
15505+#ifndef GL_EXT_subtexture
15506+#endif
15507+
15508+#ifndef GL_EXT_copy_texture
15509+#endif
15510+
15511+#ifndef GL_EXT_histogram
15512+#define GL_HISTOGRAM_EXT 0x8024
15513+#define GL_PROXY_HISTOGRAM_EXT 0x8025
15514+#define GL_HISTOGRAM_WIDTH_EXT 0x8026
15515+#define GL_HISTOGRAM_FORMAT_EXT 0x8027
15516+#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028
15517+#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029
15518+#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A
15519+#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B
15520+#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C
15521+#define GL_HISTOGRAM_SINK_EXT 0x802D
15522+#define GL_MINMAX_EXT 0x802E
15523+#define GL_MINMAX_FORMAT_EXT 0x802F
15524+#define GL_MINMAX_SINK_EXT 0x8030
15525+#define GL_TABLE_TOO_LARGE_EXT 0x8031
15526+#endif
15527+
15528+#ifndef GL_EXT_convolution
15529+#define GL_CONVOLUTION_1D_EXT 0x8010
15530+#define GL_CONVOLUTION_2D_EXT 0x8011
15531+#define GL_SEPARABLE_2D_EXT 0x8012
15532+#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013
15533+#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014
15534+#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015
15535+#define GL_REDUCE_EXT 0x8016
15536+#define GL_CONVOLUTION_FORMAT_EXT 0x8017
15537+#define GL_CONVOLUTION_WIDTH_EXT 0x8018
15538+#define GL_CONVOLUTION_HEIGHT_EXT 0x8019
15539+#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A
15540+#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B
15541+#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C
15542+#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D
15543+#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E
15544+#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F
15545+#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020
15546+#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021
15547+#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022
15548+#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023
15549+#endif
15550+
15551+#ifndef GL_SGI_color_matrix
15552+#define GL_COLOR_MATRIX_SGI 0x80B1
15553+#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2
15554+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3
15555+#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4
15556+#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5
15557+#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6
15558+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7
15559+#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8
15560+#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9
15561+#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA
15562+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB
15563+#endif
15564+
15565+#ifndef GL_SGI_color_table
15566+#define GL_COLOR_TABLE_SGI 0x80D0
15567+#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1
15568+#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2
15569+#define GL_PROXY_COLOR_TABLE_SGI 0x80D3
15570+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4
15571+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5
15572+#define GL_COLOR_TABLE_SCALE_SGI 0x80D6
15573+#define GL_COLOR_TABLE_BIAS_SGI 0x80D7
15574+#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8
15575+#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9
15576+#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA
15577+#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB
15578+#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC
15579+#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD
15580+#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE
15581+#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF
15582+#endif
15583+
15584+#ifndef GL_SGIS_pixel_texture
15585+#define GL_PIXEL_TEXTURE_SGIS 0x8353
15586+#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354
15587+#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355
15588+#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356
15589+#endif
15590+
15591+#ifndef GL_SGIX_pixel_texture
15592+#define GL_PIXEL_TEX_GEN_SGIX 0x8139
15593+#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B
15594+#endif
15595+
15596+#ifndef GL_SGIS_texture4D
15597+#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130
15598+#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131
15599+#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132
15600+#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133
15601+#define GL_TEXTURE_4D_SGIS 0x8134
15602+#define GL_PROXY_TEXTURE_4D_SGIS 0x8135
15603+#define GL_TEXTURE_4DSIZE_SGIS 0x8136
15604+#define GL_TEXTURE_WRAP_Q_SGIS 0x8137
15605+#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138
15606+#define GL_TEXTURE_4D_BINDING_SGIS 0x814F
15607+#endif
15608+
15609+#ifndef GL_SGI_texture_color_table
15610+#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC
15611+#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD
15612+#endif
15613+
15614+#ifndef GL_EXT_cmyka
15615+#define GL_CMYK_EXT 0x800C
15616+#define GL_CMYKA_EXT 0x800D
15617+#define GL_PACK_CMYK_HINT_EXT 0x800E
15618+#define GL_UNPACK_CMYK_HINT_EXT 0x800F
15619+#endif
15620+
15621+#ifndef GL_EXT_texture_object
15622+#define GL_TEXTURE_PRIORITY_EXT 0x8066
15623+#define GL_TEXTURE_RESIDENT_EXT 0x8067
15624+#define GL_TEXTURE_1D_BINDING_EXT 0x8068
15625+#define GL_TEXTURE_2D_BINDING_EXT 0x8069
15626+#define GL_TEXTURE_3D_BINDING_EXT 0x806A
15627+#endif
15628+
15629+#ifndef GL_SGIS_detail_texture
15630+#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095
15631+#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096
15632+#define GL_LINEAR_DETAIL_SGIS 0x8097
15633+#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098
15634+#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099
15635+#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A
15636+#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B
15637+#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C
15638+#endif
15639+
15640+#ifndef GL_SGIS_sharpen_texture
15641+#define GL_LINEAR_SHARPEN_SGIS 0x80AD
15642+#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE
15643+#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF
15644+#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0
15645+#endif
15646+
15647+#ifndef GL_EXT_packed_pixels
15648+#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032
15649+#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033
15650+#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034
15651+#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035
15652+#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036
15653+#endif
15654+
15655+#ifndef GL_SGIS_texture_lod
15656+#define GL_TEXTURE_MIN_LOD_SGIS 0x813A
15657+#define GL_TEXTURE_MAX_LOD_SGIS 0x813B
15658+#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C
15659+#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D
15660+#endif
15661+
15662+#ifndef GL_SGIS_multisample
15663+#define GL_MULTISAMPLE_SGIS 0x809D
15664+#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E
15665+#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F
15666+#define GL_SAMPLE_MASK_SGIS 0x80A0
15667+#define GL_1PASS_SGIS 0x80A1
15668+#define GL_2PASS_0_SGIS 0x80A2
15669+#define GL_2PASS_1_SGIS 0x80A3
15670+#define GL_4PASS_0_SGIS 0x80A4
15671+#define GL_4PASS_1_SGIS 0x80A5
15672+#define GL_4PASS_2_SGIS 0x80A6
15673+#define GL_4PASS_3_SGIS 0x80A7
15674+#define GL_SAMPLE_BUFFERS_SGIS 0x80A8
15675+#define GL_SAMPLES_SGIS 0x80A9
15676+#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA
15677+#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB
15678+#define GL_SAMPLE_PATTERN_SGIS 0x80AC
15679+#endif
15680+
15681+#ifndef GL_EXT_rescale_normal
15682+#define GL_RESCALE_NORMAL_EXT 0x803A
15683+#endif
15684+
15685+#ifndef GL_EXT_vertex_array
15686+#define GL_VERTEX_ARRAY_EXT 0x8074
15687+#define GL_NORMAL_ARRAY_EXT 0x8075
15688+#define GL_COLOR_ARRAY_EXT 0x8076
15689+#define GL_INDEX_ARRAY_EXT 0x8077
15690+#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078
15691+#define GL_EDGE_FLAG_ARRAY_EXT 0x8079
15692+#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A
15693+#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B
15694+#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C
15695+#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D
15696+#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E
15697+#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F
15698+#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080
15699+#define GL_COLOR_ARRAY_SIZE_EXT 0x8081
15700+#define GL_COLOR_ARRAY_TYPE_EXT 0x8082
15701+#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083
15702+#define GL_COLOR_ARRAY_COUNT_EXT 0x8084
15703+#define GL_INDEX_ARRAY_TYPE_EXT 0x8085
15704+#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086
15705+#define GL_INDEX_ARRAY_COUNT_EXT 0x8087
15706+#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088
15707+#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089
15708+#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A
15709+#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B
15710+#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C
15711+#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D
15712+#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E
15713+#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F
15714+#define GL_COLOR_ARRAY_POINTER_EXT 0x8090
15715+#define GL_INDEX_ARRAY_POINTER_EXT 0x8091
15716+#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092
15717+#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093
15718+#endif
15719+
15720+#ifndef GL_EXT_misc_attribute
15721+#endif
15722+
15723+#ifndef GL_SGIS_generate_mipmap
15724+#define GL_GENERATE_MIPMAP_SGIS 0x8191
15725+#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192
15726+#endif
15727+
15728+#ifndef GL_SGIX_clipmap
15729+#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170
15730+#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171
15731+#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172
15732+#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173
15733+#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174
15734+#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175
15735+#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176
15736+#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177
15737+#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178
15738+#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D
15739+#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E
15740+#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F
15741+#endif
15742+
15743+#ifndef GL_SGIX_shadow
15744+#define GL_TEXTURE_COMPARE_SGIX 0x819A
15745+#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B
15746+#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C
15747+#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D
15748+#endif
15749+
15750+#ifndef GL_SGIS_texture_edge_clamp
15751+#define GL_CLAMP_TO_EDGE_SGIS 0x812F
15752+#endif
15753+
15754+#ifndef GL_SGIS_texture_border_clamp
15755+#define GL_CLAMP_TO_BORDER_SGIS 0x812D
15756+#endif
15757+
15758+#ifndef GL_EXT_blend_minmax
15759+#define GL_FUNC_ADD_EXT 0x8006
15760+#define GL_MIN_EXT 0x8007
15761+#define GL_MAX_EXT 0x8008
15762+#define GL_BLEND_EQUATION_EXT 0x8009
15763+#endif
15764+
15765+#ifndef GL_EXT_blend_subtract
15766+#define GL_FUNC_SUBTRACT_EXT 0x800A
15767+#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B
15768+#endif
15769+
15770+#ifndef GL_EXT_blend_logic_op
15771+#endif
15772+
15773+#ifndef GL_SGIX_interlace
15774+#define GL_INTERLACE_SGIX 0x8094
15775+#endif
15776+
15777+#ifndef GL_SGIX_pixel_tiles
15778+#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E
15779+#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F
15780+#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140
15781+#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141
15782+#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142
15783+#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143
15784+#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144
15785+#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145
15786+#endif
15787+
15788+#ifndef GL_SGIS_texture_select
15789+#define GL_DUAL_ALPHA4_SGIS 0x8110
15790+#define GL_DUAL_ALPHA8_SGIS 0x8111
15791+#define GL_DUAL_ALPHA12_SGIS 0x8112
15792+#define GL_DUAL_ALPHA16_SGIS 0x8113
15793+#define GL_DUAL_LUMINANCE4_SGIS 0x8114
15794+#define GL_DUAL_LUMINANCE8_SGIS 0x8115
15795+#define GL_DUAL_LUMINANCE12_SGIS 0x8116
15796+#define GL_DUAL_LUMINANCE16_SGIS 0x8117
15797+#define GL_DUAL_INTENSITY4_SGIS 0x8118
15798+#define GL_DUAL_INTENSITY8_SGIS 0x8119
15799+#define GL_DUAL_INTENSITY12_SGIS 0x811A
15800+#define GL_DUAL_INTENSITY16_SGIS 0x811B
15801+#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C
15802+#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D
15803+#define GL_QUAD_ALPHA4_SGIS 0x811E
15804+#define GL_QUAD_ALPHA8_SGIS 0x811F
15805+#define GL_QUAD_LUMINANCE4_SGIS 0x8120
15806+#define GL_QUAD_LUMINANCE8_SGIS 0x8121
15807+#define GL_QUAD_INTENSITY4_SGIS 0x8122
15808+#define GL_QUAD_INTENSITY8_SGIS 0x8123
15809+#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124
15810+#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125
15811+#endif
15812+
15813+#ifndef GL_SGIX_sprite
15814+#define GL_SPRITE_SGIX 0x8148
15815+#define GL_SPRITE_MODE_SGIX 0x8149
15816+#define GL_SPRITE_AXIS_SGIX 0x814A
15817+#define GL_SPRITE_TRANSLATION_SGIX 0x814B
15818+#define GL_SPRITE_AXIAL_SGIX 0x814C
15819+#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D
15820+#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E
15821+#endif
15822+
15823+#ifndef GL_SGIX_texture_multi_buffer
15824+#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E
15825+#endif
15826+
15827+#ifndef GL_EXT_point_parameters
15828+#define GL_POINT_SIZE_MIN_EXT 0x8126
15829+#define GL_POINT_SIZE_MAX_EXT 0x8127
15830+#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128
15831+#define GL_DISTANCE_ATTENUATION_EXT 0x8129
15832+#endif
15833+
15834+#ifndef GL_SGIS_point_parameters
15835+#define GL_POINT_SIZE_MIN_SGIS 0x8126
15836+#define GL_POINT_SIZE_MAX_SGIS 0x8127
15837+#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128
15838+#define GL_DISTANCE_ATTENUATION_SGIS 0x8129
15839+#endif
15840+
15841+#ifndef GL_SGIX_instruments
15842+#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180
15843+#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181
15844+#endif
15845+
15846+#ifndef GL_SGIX_texture_scale_bias
15847+#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179
15848+#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A
15849+#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B
15850+#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C
15851+#endif
15852+
15853+#ifndef GL_SGIX_framezoom
15854+#define GL_FRAMEZOOM_SGIX 0x818B
15855+#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C
15856+#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D
15857+#endif
15858+
15859+#ifndef GL_SGIX_tag_sample_buffer
15860+#endif
15861+
15862+#ifndef GL_FfdMaskSGIX
15863+#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001
15864+#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002
15865+#endif
15866+
15867+#ifndef GL_SGIX_polynomial_ffd
15868+#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194
15869+#define GL_TEXTURE_DEFORMATION_SGIX 0x8195
15870+#define GL_DEFORMATIONS_MASK_SGIX 0x8196
15871+#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197
15872+#endif
15873+
15874+#ifndef GL_SGIX_reference_plane
15875+#define GL_REFERENCE_PLANE_SGIX 0x817D
15876+#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E
15877+#endif
15878+
15879+#ifndef GL_SGIX_flush_raster
15880+#endif
15881+
15882+#ifndef GL_SGIX_depth_texture
15883+#define GL_DEPTH_COMPONENT16_SGIX 0x81A5
15884+#define GL_DEPTH_COMPONENT24_SGIX 0x81A6
15885+#define GL_DEPTH_COMPONENT32_SGIX 0x81A7
15886+#endif
15887+
15888+#ifndef GL_SGIS_fog_function
15889+#define GL_FOG_FUNC_SGIS 0x812A
15890+#define GL_FOG_FUNC_POINTS_SGIS 0x812B
15891+#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C
15892+#endif
15893+
15894+#ifndef GL_SGIX_fog_offset
15895+#define GL_FOG_OFFSET_SGIX 0x8198
15896+#define GL_FOG_OFFSET_VALUE_SGIX 0x8199
15897+#endif
15898+
15899+#ifndef GL_HP_image_transform
15900+#define GL_IMAGE_SCALE_X_HP 0x8155
15901+#define GL_IMAGE_SCALE_Y_HP 0x8156
15902+#define GL_IMAGE_TRANSLATE_X_HP 0x8157
15903+#define GL_IMAGE_TRANSLATE_Y_HP 0x8158
15904+#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159
15905+#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A
15906+#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B
15907+#define GL_IMAGE_MAG_FILTER_HP 0x815C
15908+#define GL_IMAGE_MIN_FILTER_HP 0x815D
15909+#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E
15910+#define GL_CUBIC_HP 0x815F
15911+#define GL_AVERAGE_HP 0x8160
15912+#define GL_IMAGE_TRANSFORM_2D_HP 0x8161
15913+#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162
15914+#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163
15915+#endif
15916+
15917+#ifndef GL_HP_convolution_border_modes
15918+#define GL_IGNORE_BORDER_HP 0x8150
15919+#define GL_CONSTANT_BORDER_HP 0x8151
15920+#define GL_REPLICATE_BORDER_HP 0x8153
15921+#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154
15922+#endif
15923+
15924+#ifndef GL_INGR_palette_buffer
15925+#endif
15926+
15927+#ifndef GL_SGIX_texture_add_env
15928+#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE
15929+#endif
15930+
15931+#ifndef GL_EXT_color_subtable
15932+#endif
15933+
15934+#ifndef GL_PGI_vertex_hints
15935+#define GL_VERTEX_DATA_HINT_PGI 0x1A22A
15936+#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B
15937+#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C
15938+#define GL_MAX_VERTEX_HINT_PGI 0x1A22D
15939+#define GL_COLOR3_BIT_PGI 0x00010000
15940+#define GL_COLOR4_BIT_PGI 0x00020000
15941+#define GL_EDGEFLAG_BIT_PGI 0x00040000
15942+#define GL_INDEX_BIT_PGI 0x00080000
15943+#define GL_MAT_AMBIENT_BIT_PGI 0x00100000
15944+#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000
15945+#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000
15946+#define GL_MAT_EMISSION_BIT_PGI 0x00800000
15947+#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000
15948+#define GL_MAT_SHININESS_BIT_PGI 0x02000000
15949+#define GL_MAT_SPECULAR_BIT_PGI 0x04000000
15950+#define GL_NORMAL_BIT_PGI 0x08000000
15951+#define GL_TEXCOORD1_BIT_PGI 0x10000000
15952+#define GL_TEXCOORD2_BIT_PGI 0x20000000
15953+#define GL_TEXCOORD3_BIT_PGI 0x40000000
15954+#define GL_TEXCOORD4_BIT_PGI 0x80000000
15955+#define GL_VERTEX23_BIT_PGI 0x00000004
15956+#define GL_VERTEX4_BIT_PGI 0x00000008
15957+#endif
15958+
15959+#ifndef GL_PGI_misc_hints
15960+#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8
15961+#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD
15962+#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE
15963+#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202
15964+#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203
15965+#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204
15966+#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C
15967+#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D
15968+#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E
15969+#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F
15970+#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210
15971+#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211
15972+#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216
15973+#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217
15974+#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218
15975+#define GL_FULL_STIPPLE_HINT_PGI 0x1A219
15976+#define GL_CLIP_NEAR_HINT_PGI 0x1A220
15977+#define GL_CLIP_FAR_HINT_PGI 0x1A221
15978+#define GL_WIDE_LINE_HINT_PGI 0x1A222
15979+#define GL_BACK_NORMALS_HINT_PGI 0x1A223
15980+#endif
15981+
15982+#ifndef GL_EXT_paletted_texture
15983+#define GL_COLOR_INDEX1_EXT 0x80E2
15984+#define GL_COLOR_INDEX2_EXT 0x80E3
15985+#define GL_COLOR_INDEX4_EXT 0x80E4
15986+#define GL_COLOR_INDEX8_EXT 0x80E5
15987+#define GL_COLOR_INDEX12_EXT 0x80E6
15988+#define GL_COLOR_INDEX16_EXT 0x80E7
15989+#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED
15990+#endif
15991+
15992+#ifndef GL_EXT_clip_volume_hint
15993+#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0
15994+#endif
15995+
15996+#ifndef GL_SGIX_list_priority
15997+#define GL_LIST_PRIORITY_SGIX 0x8182
15998+#endif
15999+
16000+#ifndef GL_SGIX_ir_instrument1
16001+#define GL_IR_INSTRUMENT1_SGIX 0x817F
16002+#endif
16003+
16004+#ifndef GL_SGIX_calligraphic_fragment
16005+#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183
16006+#endif
16007+
16008+#ifndef GL_SGIX_texture_lod_bias
16009+#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E
16010+#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F
16011+#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190
16012+#endif
16013+
16014+#ifndef GL_SGIX_shadow_ambient
16015+#define GL_SHADOW_AMBIENT_SGIX 0x80BF
16016+#endif
16017+
16018+#ifndef GL_EXT_index_texture
16019+#endif
16020+
16021+#ifndef GL_EXT_index_material
16022+#define GL_INDEX_MATERIAL_EXT 0x81B8
16023+#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9
16024+#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA
16025+#endif
16026+
16027+#ifndef GL_EXT_index_func
16028+#define GL_INDEX_TEST_EXT 0x81B5
16029+#define GL_INDEX_TEST_FUNC_EXT 0x81B6
16030+#define GL_INDEX_TEST_REF_EXT 0x81B7
16031+#endif
16032+
16033+#ifndef GL_EXT_index_array_formats
16034+#define GL_IUI_V2F_EXT 0x81AD
16035+#define GL_IUI_V3F_EXT 0x81AE
16036+#define GL_IUI_N3F_V2F_EXT 0x81AF
16037+#define GL_IUI_N3F_V3F_EXT 0x81B0
16038+#define GL_T2F_IUI_V2F_EXT 0x81B1
16039+#define GL_T2F_IUI_V3F_EXT 0x81B2
16040+#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3
16041+#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4
16042+#endif
16043+
16044+#ifndef GL_EXT_compiled_vertex_array
16045+#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8
16046+#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9
16047+#endif
16048+
16049+#ifndef GL_EXT_cull_vertex
16050+#define GL_CULL_VERTEX_EXT 0x81AA
16051+#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB
16052+#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC
16053+#endif
16054+
16055+#ifndef GL_SGIX_ycrcb
16056+#define GL_YCRCB_422_SGIX 0x81BB
16057+#define GL_YCRCB_444_SGIX 0x81BC
16058+#endif
16059+
16060+#ifndef GL_SGIX_fragment_lighting
16061+#define GL_FRAGMENT_LIGHTING_SGIX 0x8400
16062+#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401
16063+#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402
16064+#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403
16065+#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404
16066+#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405
16067+#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406
16068+#define GL_LIGHT_ENV_MODE_SGIX 0x8407
16069+#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408
16070+#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409
16071+#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A
16072+#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B
16073+#define GL_FRAGMENT_LIGHT0_SGIX 0x840C
16074+#define GL_FRAGMENT_LIGHT1_SGIX 0x840D
16075+#define GL_FRAGMENT_LIGHT2_SGIX 0x840E
16076+#define GL_FRAGMENT_LIGHT3_SGIX 0x840F
16077+#define GL_FRAGMENT_LIGHT4_SGIX 0x8410
16078+#define GL_FRAGMENT_LIGHT5_SGIX 0x8411
16079+#define GL_FRAGMENT_LIGHT6_SGIX 0x8412
16080+#define GL_FRAGMENT_LIGHT7_SGIX 0x8413
16081+#endif
16082+
16083+#ifndef GL_IBM_rasterpos_clip
16084+#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262
16085+#endif
16086+
16087+#ifndef GL_HP_texture_lighting
16088+#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167
16089+#define GL_TEXTURE_POST_SPECULAR_HP 0x8168
16090+#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169
16091+#endif
16092+
16093+#ifndef GL_EXT_draw_range_elements
16094+#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8
16095+#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9
16096+#endif
16097+
16098+#ifndef GL_WIN_phong_shading
16099+#define GL_PHONG_WIN 0x80EA
16100+#define GL_PHONG_HINT_WIN 0x80EB
16101+#endif
16102+
16103+#ifndef GL_WIN_specular_fog
16104+#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC
16105+#endif
16106+
16107+#ifndef GL_EXT_light_texture
16108+#define GL_FRAGMENT_MATERIAL_EXT 0x8349
16109+#define GL_FRAGMENT_NORMAL_EXT 0x834A
16110+#define GL_FRAGMENT_COLOR_EXT 0x834C
16111+#define GL_ATTENUATION_EXT 0x834D
16112+#define GL_SHADOW_ATTENUATION_EXT 0x834E
16113+#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F
16114+#define GL_TEXTURE_LIGHT_EXT 0x8350
16115+#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351
16116+#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352
16117+/* reuse GL_FRAGMENT_DEPTH_EXT */
16118+#endif
16119+
16120+#ifndef GL_SGIX_blend_alpha_minmax
16121+#define GL_ALPHA_MIN_SGIX 0x8320
16122+#define GL_ALPHA_MAX_SGIX 0x8321
16123+#endif
16124+
16125+#ifndef GL_SGIX_impact_pixel_texture
16126+#define GL_PIXEL_TEX_GEN_Q_CEILING_SGIX 0x8184
16127+#define GL_PIXEL_TEX_GEN_Q_ROUND_SGIX 0x8185
16128+#define GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX 0x8186
16129+#define GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX 0x8187
16130+#define GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX 0x8188
16131+#define GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX 0x8189
16132+#define GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX 0x818A
16133+#endif
16134+
16135+#ifndef GL_EXT_bgra
16136+#define GL_BGR_EXT 0x80E0
16137+#define GL_BGRA_EXT 0x80E1
16138+#endif
16139+
16140+#ifndef GL_SGIX_async
16141+#define GL_ASYNC_MARKER_SGIX 0x8329
16142+#endif
16143+
16144+#ifndef GL_SGIX_async_pixel
16145+#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C
16146+#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D
16147+#define GL_ASYNC_READ_PIXELS_SGIX 0x835E
16148+#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F
16149+#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360
16150+#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361
16151+#endif
16152+
16153+#ifndef GL_SGIX_async_histogram
16154+#define GL_ASYNC_HISTOGRAM_SGIX 0x832C
16155+#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D
16156+#endif
16157+
16158+#ifndef GL_INTEL_texture_scissor
16159+#endif
16160+
16161+#ifndef GL_INTEL_parallel_arrays
16162+#define GL_PARALLEL_ARRAYS_INTEL 0x83F4
16163+#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5
16164+#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6
16165+#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7
16166+#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8
16167+#endif
16168+
16169+#ifndef GL_HP_occlusion_test
16170+#define GL_OCCLUSION_TEST_HP 0x8165
16171+#define GL_OCCLUSION_TEST_RESULT_HP 0x8166
16172+#endif
16173+
16174+#ifndef GL_EXT_pixel_transform
16175+#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330
16176+#define GL_PIXEL_MAG_FILTER_EXT 0x8331
16177+#define GL_PIXEL_MIN_FILTER_EXT 0x8332
16178+#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333
16179+#define GL_CUBIC_EXT 0x8334
16180+#define GL_AVERAGE_EXT 0x8335
16181+#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336
16182+#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337
16183+#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338
16184+#endif
16185+
16186+#ifndef GL_EXT_pixel_transform_color_table
16187+#endif
16188+
16189+#ifndef GL_EXT_shared_texture_palette
16190+#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB
16191+#endif
16192+
16193+#ifndef GL_EXT_separate_specular_color
16194+#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8
16195+#define GL_SINGLE_COLOR_EXT 0x81F9
16196+#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA
16197+#endif
16198+
16199+#ifndef GL_EXT_secondary_color
16200+#define GL_COLOR_SUM_EXT 0x8458
16201+#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459
16202+#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A
16203+#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B
16204+#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C
16205+#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D
16206+#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E
16207+#endif
16208+
16209+#ifndef GL_EXT_texture_perturb_normal
16210+#define GL_PERTURB_EXT 0x85AE
16211+#define GL_TEXTURE_NORMAL_EXT 0x85AF
16212+#endif
16213+
16214+#ifndef GL_EXT_multi_draw_arrays
16215+#endif
16216+
16217+#ifndef GL_EXT_fog_coord
16218+#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450
16219+#define GL_FOG_COORDINATE_EXT 0x8451
16220+#define GL_FRAGMENT_DEPTH_EXT 0x8452
16221+#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453
16222+#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454
16223+#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455
16224+#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456
16225+#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457
16226+#endif
16227+
16228+#ifndef GL_REND_screen_coordinates
16229+#define GL_SCREEN_COORDINATES_REND 0x8490
16230+#define GL_INVERTED_SCREEN_W_REND 0x8491
16231+#endif
16232+
16233+#ifndef GL_EXT_coordinate_frame
16234+#define GL_TANGENT_ARRAY_EXT 0x8439
16235+#define GL_BINORMAL_ARRAY_EXT 0x843A
16236+#define GL_CURRENT_TANGENT_EXT 0x843B
16237+#define GL_CURRENT_BINORMAL_EXT 0x843C
16238+#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E
16239+#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F
16240+#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440
16241+#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441
16242+#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442
16243+#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443
16244+#define GL_MAP1_TANGENT_EXT 0x8444
16245+#define GL_MAP2_TANGENT_EXT 0x8445
16246+#define GL_MAP1_BINORMAL_EXT 0x8446
16247+#define GL_MAP2_BINORMAL_EXT 0x8447
16248+#endif
16249+
16250+#ifndef GL_EXT_texture_env_combine
16251+#define GL_COMBINE_EXT 0x8570
16252+#define GL_COMBINE_RGB_EXT 0x8571
16253+#define GL_COMBINE_ALPHA_EXT 0x8572
16254+#define GL_RGB_SCALE_EXT 0x8573
16255+#define GL_ADD_SIGNED_EXT 0x8574
16256+#define GL_INTERPOLATE_EXT 0x8575
16257+#define GL_CONSTANT_EXT 0x8576
16258+#define GL_PRIMARY_COLOR_EXT 0x8577
16259+#define GL_PREVIOUS_EXT 0x8578
16260+#define GL_SOURCE0_RGB_EXT 0x8580
16261+#define GL_SOURCE1_RGB_EXT 0x8581
16262+#define GL_SOURCE2_RGB_EXT 0x8582
16263+#define GL_SOURCE0_ALPHA_EXT 0x8588
16264+#define GL_SOURCE1_ALPHA_EXT 0x8589
16265+#define GL_SOURCE2_ALPHA_EXT 0x858A
16266+#define GL_OPERAND0_RGB_EXT 0x8590
16267+#define GL_OPERAND1_RGB_EXT 0x8591
16268+#define GL_OPERAND2_RGB_EXT 0x8592
16269+#define GL_OPERAND0_ALPHA_EXT 0x8598
16270+#define GL_OPERAND1_ALPHA_EXT 0x8599
16271+#define GL_OPERAND2_ALPHA_EXT 0x859A
16272+#endif
16273+
16274+#ifndef GL_APPLE_specular_vector
16275+#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0
16276+#endif
16277+
16278+#ifndef GL_APPLE_transform_hint
16279+#define GL_TRANSFORM_HINT_APPLE 0x85B1
16280+#endif
16281+
16282+#ifndef GL_SGIX_fog_scale
16283+#define GL_FOG_SCALE_SGIX 0x81FC
16284+#define GL_FOG_SCALE_VALUE_SGIX 0x81FD
16285+#endif
16286+
16287+#ifndef GL_SUNX_constant_data
16288+#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5
16289+#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6
16290+#endif
16291+
16292+#ifndef GL_SUN_global_alpha
16293+#define GL_GLOBAL_ALPHA_SUN 0x81D9
16294+#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA
16295+#endif
16296+
16297+#ifndef GL_SUN_triangle_list
16298+#define GL_RESTART_SUN 0x0001
16299+#define GL_REPLACE_MIDDLE_SUN 0x0002
16300+#define GL_REPLACE_OLDEST_SUN 0x0003
16301+#define GL_TRIANGLE_LIST_SUN 0x81D7
16302+#define GL_REPLACEMENT_CODE_SUN 0x81D8
16303+#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0
16304+#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1
16305+#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2
16306+#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3
16307+#define GL_R1UI_V3F_SUN 0x85C4
16308+#define GL_R1UI_C4UB_V3F_SUN 0x85C5
16309+#define GL_R1UI_C3F_V3F_SUN 0x85C6
16310+#define GL_R1UI_N3F_V3F_SUN 0x85C7
16311+#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8
16312+#define GL_R1UI_T2F_V3F_SUN 0x85C9
16313+#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA
16314+#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB
16315+#endif
16316+
16317+#ifndef GL_SUN_vertex
16318+#endif
16319+
16320+#ifndef GL_EXT_blend_func_separate
16321+#define GL_BLEND_DST_RGB_EXT 0x80C8
16322+#define GL_BLEND_SRC_RGB_EXT 0x80C9
16323+#define GL_BLEND_DST_ALPHA_EXT 0x80CA
16324+#define GL_BLEND_SRC_ALPHA_EXT 0x80CB
16325+#endif
16326+
16327+#ifndef GL_INGR_color_clamp
16328+#define GL_RED_MIN_CLAMP_INGR 0x8560
16329+#define GL_GREEN_MIN_CLAMP_INGR 0x8561
16330+#define GL_BLUE_MIN_CLAMP_INGR 0x8562
16331+#define GL_ALPHA_MIN_CLAMP_INGR 0x8563
16332+#define GL_RED_MAX_CLAMP_INGR 0x8564
16333+#define GL_GREEN_MAX_CLAMP_INGR 0x8565
16334+#define GL_BLUE_MAX_CLAMP_INGR 0x8566
16335+#define GL_ALPHA_MAX_CLAMP_INGR 0x8567
16336+#endif
16337+
16338+#ifndef GL_INGR_interlace_read
16339+#define GL_INTERLACE_READ_INGR 0x8568
16340+#endif
16341+
16342+#ifndef GL_EXT_stencil_wrap
16343+#define GL_INCR_WRAP_EXT 0x8507
16344+#define GL_DECR_WRAP_EXT 0x8508
16345+#endif
16346+
16347+#ifndef GL_EXT_422_pixels
16348+#define GL_422_EXT 0x80CC
16349+#define GL_422_REV_EXT 0x80CD
16350+#define GL_422_AVERAGE_EXT 0x80CE
16351+#define GL_422_REV_AVERAGE_EXT 0x80CF
16352+#endif
16353+
16354+#ifndef GL_NV_texgen_reflection
16355+#define GL_NORMAL_MAP_NV 0x8511
16356+#define GL_REFLECTION_MAP_NV 0x8512
16357+#endif
16358+
16359+#ifndef GL_EXT_texture_cube_map
16360+#define GL_NORMAL_MAP_EXT 0x8511
16361+#define GL_REFLECTION_MAP_EXT 0x8512
16362+#define GL_TEXTURE_CUBE_MAP_EXT 0x8513
16363+#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514
16364+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515
16365+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516
16366+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517
16367+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518
16368+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519
16369+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A
16370+#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B
16371+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C
16372+#endif
16373+
16374+#ifndef GL_SUN_convolution_border_modes
16375+#define GL_WRAP_BORDER_SUN 0x81D4
16376+#endif
16377+
16378+#ifndef GL_EXT_texture_env_add
16379+#endif
16380+
16381+#ifndef GL_EXT_texture_lod_bias
16382+#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD
16383+#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500
16384+#define GL_TEXTURE_LOD_BIAS_EXT 0x8501
16385+#endif
16386+
16387+#ifndef GL_EXT_texture_filter_anisotropic
16388+#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
16389+#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
16390+#endif
16391+
16392+#ifndef GL_EXT_vertex_weighting
16393+#define GL_MODELVIEW0_STACK_DEPTH_EXT GL_MODELVIEW_STACK_DEPTH
16394+#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502
16395+#define GL_MODELVIEW0_MATRIX_EXT GL_MODELVIEW_MATRIX
16396+#define GL_MODELVIEW1_MATRIX_EXT 0x8506
16397+#define GL_VERTEX_WEIGHTING_EXT 0x8509
16398+#define GL_MODELVIEW0_EXT GL_MODELVIEW
16399+#define GL_MODELVIEW1_EXT 0x850A
16400+#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B
16401+#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C
16402+#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D
16403+#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E
16404+#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F
16405+#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510
16406+#endif
16407+
16408+#ifndef GL_NV_light_max_exponent
16409+#define GL_MAX_SHININESS_NV 0x8504
16410+#define GL_MAX_SPOT_EXPONENT_NV 0x8505
16411+#endif
16412+
16413+#ifndef GL_NV_vertex_array_range
16414+#define GL_VERTEX_ARRAY_RANGE_NV 0x851D
16415+#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E
16416+#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F
16417+#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520
16418+#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521
16419+#endif
16420+
16421+#ifndef GL_NV_register_combiners
16422+#define GL_REGISTER_COMBINERS_NV 0x8522
16423+#define GL_VARIABLE_A_NV 0x8523
16424+#define GL_VARIABLE_B_NV 0x8524
16425+#define GL_VARIABLE_C_NV 0x8525
16426+#define GL_VARIABLE_D_NV 0x8526
16427+#define GL_VARIABLE_E_NV 0x8527
16428+#define GL_VARIABLE_F_NV 0x8528
16429+#define GL_VARIABLE_G_NV 0x8529
16430+#define GL_CONSTANT_COLOR0_NV 0x852A
16431+#define GL_CONSTANT_COLOR1_NV 0x852B
16432+#define GL_PRIMARY_COLOR_NV 0x852C
16433+#define GL_SECONDARY_COLOR_NV 0x852D
16434+#define GL_SPARE0_NV 0x852E
16435+#define GL_SPARE1_NV 0x852F
16436+#define GL_DISCARD_NV 0x8530
16437+#define GL_E_TIMES_F_NV 0x8531
16438+#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532
16439+#define GL_UNSIGNED_IDENTITY_NV 0x8536
16440+#define GL_UNSIGNED_INVERT_NV 0x8537
16441+#define GL_EXPAND_NORMAL_NV 0x8538
16442+#define GL_EXPAND_NEGATE_NV 0x8539
16443+#define GL_HALF_BIAS_NORMAL_NV 0x853A
16444+#define GL_HALF_BIAS_NEGATE_NV 0x853B
16445+#define GL_SIGNED_IDENTITY_NV 0x853C
16446+#define GL_SIGNED_NEGATE_NV 0x853D
16447+#define GL_SCALE_BY_TWO_NV 0x853E
16448+#define GL_SCALE_BY_FOUR_NV 0x853F
16449+#define GL_SCALE_BY_ONE_HALF_NV 0x8540
16450+#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541
16451+#define GL_COMBINER_INPUT_NV 0x8542
16452+#define GL_COMBINER_MAPPING_NV 0x8543
16453+#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544
16454+#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545
16455+#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546
16456+#define GL_COMBINER_MUX_SUM_NV 0x8547
16457+#define GL_COMBINER_SCALE_NV 0x8548
16458+#define GL_COMBINER_BIAS_NV 0x8549
16459+#define GL_COMBINER_AB_OUTPUT_NV 0x854A
16460+#define GL_COMBINER_CD_OUTPUT_NV 0x854B
16461+#define GL_COMBINER_SUM_OUTPUT_NV 0x854C
16462+#define GL_MAX_GENERAL_COMBINERS_NV 0x854D
16463+#define GL_NUM_GENERAL_COMBINERS_NV 0x854E
16464+#define GL_COLOR_SUM_CLAMP_NV 0x854F
16465+#define GL_COMBINER0_NV 0x8550
16466+#define GL_COMBINER1_NV 0x8551
16467+#define GL_COMBINER2_NV 0x8552
16468+#define GL_COMBINER3_NV 0x8553
16469+#define GL_COMBINER4_NV 0x8554
16470+#define GL_COMBINER5_NV 0x8555
16471+#define GL_COMBINER6_NV 0x8556
16472+#define GL_COMBINER7_NV 0x8557
16473+/* reuse GL_TEXTURE0_ARB */
16474+/* reuse GL_TEXTURE1_ARB */
16475+/* reuse GL_ZERO */
16476+/* reuse GL_NONE */
16477+/* reuse GL_FOG */
16478+#endif
16479+
16480+#ifndef GL_NV_fog_distance
16481+#define GL_FOG_DISTANCE_MODE_NV 0x855A
16482+#define GL_EYE_RADIAL_NV 0x855B
16483+#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C
16484+/* reuse GL_EYE_PLANE */
16485+#endif
16486+
16487+#ifndef GL_NV_texgen_emboss
16488+#define GL_EMBOSS_LIGHT_NV 0x855D
16489+#define GL_EMBOSS_CONSTANT_NV 0x855E
16490+#define GL_EMBOSS_MAP_NV 0x855F
16491+#endif
16492+
16493+#ifndef GL_NV_blend_square
16494+#endif
16495+
16496+#ifndef GL_NV_texture_env_combine4
16497+#define GL_COMBINE4_NV 0x8503
16498+#define GL_SOURCE3_RGB_NV 0x8583
16499+#define GL_SOURCE3_ALPHA_NV 0x858B
16500+#define GL_OPERAND3_RGB_NV 0x8593
16501+#define GL_OPERAND3_ALPHA_NV 0x859B
16502+#endif
16503+
16504+#ifndef GL_MESA_resize_buffers
16505+#endif
16506+
16507+#ifndef GL_MESA_window_pos
16508+#endif
16509+
16510+#ifndef GL_EXT_texture_compression_s3tc
16511+#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
16512+#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
16513+#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
16514+#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
16515+#endif
16516+
16517+#ifndef GL_IBM_cull_vertex
16518+#define GL_CULL_VERTEX_IBM 103050
16519+#endif
16520+
16521+#ifndef GL_IBM_multimode_draw_arrays
16522+#endif
16523+
16524+#ifndef GL_IBM_vertex_array_lists
16525+#define GL_VERTEX_ARRAY_LIST_IBM 103070
16526+#define GL_NORMAL_ARRAY_LIST_IBM 103071
16527+#define GL_COLOR_ARRAY_LIST_IBM 103072
16528+#define GL_INDEX_ARRAY_LIST_IBM 103073
16529+#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074
16530+#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075
16531+#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076
16532+#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077
16533+#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080
16534+#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081
16535+#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082
16536+#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083
16537+#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084
16538+#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085
16539+#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086
16540+#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087
16541+#endif
16542+
16543+#ifndef GL_SGIX_subsample
16544+#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0
16545+#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1
16546+#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2
16547+#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3
16548+#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4
16549+#endif
16550+
16551+#ifndef GL_SGIX_ycrcb_subsample
16552+#endif
16553+
16554+#ifndef GL_SGIX_ycrcba
16555+#define GL_YCRCB_SGIX 0x8318
16556+#define GL_YCRCBA_SGIX 0x8319
16557+#endif
16558+
16559+#ifndef GL_SGI_depth_pass_instrument
16560+#define GL_DEPTH_PASS_INSTRUMENT_SGIX 0x8310
16561+#define GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX 0x8311
16562+#define GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX 0x8312
16563+#endif
16564+
16565+#ifndef GL_3DFX_texture_compression_FXT1
16566+#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0
16567+#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1
16568+#endif
16569+
16570+#ifndef GL_3DFX_multisample
16571+#define GL_MULTISAMPLE_3DFX 0x86B2
16572+#define GL_SAMPLE_BUFFERS_3DFX 0x86B3
16573+#define GL_SAMPLES_3DFX 0x86B4
16574+#define GL_MULTISAMPLE_BIT_3DFX 0x20000000
16575+#endif
16576+
16577+#ifndef GL_3DFX_tbuffer
16578+#endif
16579+
16580+#ifndef GL_EXT_multisample
16581+#define GL_MULTISAMPLE_EXT 0x809D
16582+#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E
16583+#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F
16584+#define GL_SAMPLE_MASK_EXT 0x80A0
16585+#define GL_1PASS_EXT 0x80A1
16586+#define GL_2PASS_0_EXT 0x80A2
16587+#define GL_2PASS_1_EXT 0x80A3
16588+#define GL_4PASS_0_EXT 0x80A4
16589+#define GL_4PASS_1_EXT 0x80A5
16590+#define GL_4PASS_2_EXT 0x80A6
16591+#define GL_4PASS_3_EXT 0x80A7
16592+#define GL_SAMPLE_BUFFERS_EXT 0x80A8
16593+#define GL_SAMPLES_EXT 0x80A9
16594+#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA
16595+#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB
16596+#define GL_SAMPLE_PATTERN_EXT 0x80AC
16597+#define GL_MULTISAMPLE_BIT_EXT 0x20000000
16598+#endif
16599+
16600+#ifndef GL_SGIX_vertex_preclip
16601+#define GL_VERTEX_PRECLIP_SGIX 0x83EE
16602+#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF
16603+#endif
16604+
16605+#ifndef GL_SGIX_convolution_accuracy
16606+#define GL_CONVOLUTION_HINT_SGIX 0x8316
16607+#endif
16608+
16609+#ifndef GL_SGIX_resample
16610+#define GL_PACK_RESAMPLE_SGIX 0x842C
16611+#define GL_UNPACK_RESAMPLE_SGIX 0x842D
16612+#define GL_RESAMPLE_REPLICATE_SGIX 0x842E
16613+#define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F
16614+#define GL_RESAMPLE_DECIMATE_SGIX 0x8430
16615+#endif
16616+
16617+#ifndef GL_SGIS_point_line_texgen
16618+#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0
16619+#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1
16620+#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2
16621+#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3
16622+#define GL_EYE_POINT_SGIS 0x81F4
16623+#define GL_OBJECT_POINT_SGIS 0x81F5
16624+#define GL_EYE_LINE_SGIS 0x81F6
16625+#define GL_OBJECT_LINE_SGIS 0x81F7
16626+#endif
16627+
16628+#ifndef GL_SGIS_texture_color_mask
16629+#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF
16630+#endif
16631+
16632+#ifndef GL_EXT_texture_env_dot3
16633+#define GL_DOT3_RGB_EXT 0x8740
16634+#define GL_DOT3_RGBA_EXT 0x8741
16635+#endif
16636+
16637+#ifndef GL_ATI_texture_mirror_once
16638+#define GL_MIRROR_CLAMP_ATI 0x8742
16639+#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743
16640+#endif
16641+
16642+#ifndef GL_NV_fence
16643+#define GL_ALL_COMPLETED_NV 0x84F2
16644+#define GL_FENCE_STATUS_NV 0x84F3
16645+#define GL_FENCE_CONDITION_NV 0x84F4
16646+#endif
16647+
16648+#ifndef GL_IBM_texture_mirrored_repeat
16649+#define GL_MIRRORED_REPEAT_IBM 0x8370
16650+#endif
16651+
16652+#ifndef GL_NV_evaluators
16653+#define GL_EVAL_2D_NV 0x86C0
16654+#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1
16655+#define GL_MAP_TESSELLATION_NV 0x86C2
16656+#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3
16657+#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4
16658+#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5
16659+#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6
16660+#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7
16661+#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8
16662+#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9
16663+#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA
16664+#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB
16665+#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC
16666+#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD
16667+#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE
16668+#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF
16669+#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0
16670+#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1
16671+#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2
16672+#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3
16673+#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4
16674+#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5
16675+#define GL_MAX_MAP_TESSELLATION_NV 0x86D6
16676+#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7
16677+#endif
16678+
16679+#ifndef GL_NV_packed_depth_stencil
16680+#define GL_DEPTH_STENCIL_NV 0x84F9
16681+#define GL_UNSIGNED_INT_24_8_NV 0x84FA
16682+#endif
16683+
16684+#ifndef GL_NV_register_combiners2
16685+#define GL_PER_STAGE_CONSTANTS_NV 0x8535
16686+#endif
16687+
16688+#ifndef GL_NV_texture_compression_vtc
16689+#endif
16690+
16691+#ifndef GL_NV_texture_rectangle
16692+#define GL_TEXTURE_RECTANGLE_NV 0x84F5
16693+#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6
16694+#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7
16695+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8
16696+#endif
16697+
16698+#ifndef GL_NV_texture_shader
16699+#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C
16700+#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D
16701+#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E
16702+#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9
16703+#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA
16704+#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB
16705+#define GL_DSDT_MAG_INTENSITY_NV 0x86DC
16706+#define GL_SHADER_CONSISTENT_NV 0x86DD
16707+#define GL_TEXTURE_SHADER_NV 0x86DE
16708+#define GL_SHADER_OPERATION_NV 0x86DF
16709+#define GL_CULL_MODES_NV 0x86E0
16710+#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1
16711+#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2
16712+#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3
16713+#define GL_OFFSET_TEXTURE_2D_MATRIX_NV GL_OFFSET_TEXTURE_MATRIX_NV
16714+#define GL_OFFSET_TEXTURE_2D_SCALE_NV GL_OFFSET_TEXTURE_SCALE_NV
16715+#define GL_OFFSET_TEXTURE_2D_BIAS_NV GL_OFFSET_TEXTURE_BIAS_NV
16716+#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4
16717+#define GL_CONST_EYE_NV 0x86E5
16718+#define GL_PASS_THROUGH_NV 0x86E6
16719+#define GL_CULL_FRAGMENT_NV 0x86E7
16720+#define GL_OFFSET_TEXTURE_2D_NV 0x86E8
16721+#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9
16722+#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA
16723+#define GL_DOT_PRODUCT_NV 0x86EC
16724+#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED
16725+#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE
16726+#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0
16727+#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1
16728+#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2
16729+#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3
16730+#define GL_HILO_NV 0x86F4
16731+#define GL_DSDT_NV 0x86F5
16732+#define GL_DSDT_MAG_NV 0x86F6
16733+#define GL_DSDT_MAG_VIB_NV 0x86F7
16734+#define GL_HILO16_NV 0x86F8
16735+#define GL_SIGNED_HILO_NV 0x86F9
16736+#define GL_SIGNED_HILO16_NV 0x86FA
16737+#define GL_SIGNED_RGBA_NV 0x86FB
16738+#define GL_SIGNED_RGBA8_NV 0x86FC
16739+#define GL_SIGNED_RGB_NV 0x86FE
16740+#define GL_SIGNED_RGB8_NV 0x86FF
16741+#define GL_SIGNED_LUMINANCE_NV 0x8701
16742+#define GL_SIGNED_LUMINANCE8_NV 0x8702
16743+#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703
16744+#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704
16745+#define GL_SIGNED_ALPHA_NV 0x8705
16746+#define GL_SIGNED_ALPHA8_NV 0x8706
16747+#define GL_SIGNED_INTENSITY_NV 0x8707
16748+#define GL_SIGNED_INTENSITY8_NV 0x8708
16749+#define GL_DSDT8_NV 0x8709
16750+#define GL_DSDT8_MAG8_NV 0x870A
16751+#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B
16752+#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C
16753+#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D
16754+#define GL_HI_SCALE_NV 0x870E
16755+#define GL_LO_SCALE_NV 0x870F
16756+#define GL_DS_SCALE_NV 0x8710
16757+#define GL_DT_SCALE_NV 0x8711
16758+#define GL_MAGNITUDE_SCALE_NV 0x8712
16759+#define GL_VIBRANCE_SCALE_NV 0x8713
16760+#define GL_HI_BIAS_NV 0x8714
16761+#define GL_LO_BIAS_NV 0x8715
16762+#define GL_DS_BIAS_NV 0x8716
16763+#define GL_DT_BIAS_NV 0x8717
16764+#define GL_MAGNITUDE_BIAS_NV 0x8718
16765+#define GL_VIBRANCE_BIAS_NV 0x8719
16766+#define GL_TEXTURE_BORDER_VALUES_NV 0x871A
16767+#define GL_TEXTURE_HI_SIZE_NV 0x871B
16768+#define GL_TEXTURE_LO_SIZE_NV 0x871C
16769+#define GL_TEXTURE_DS_SIZE_NV 0x871D
16770+#define GL_TEXTURE_DT_SIZE_NV 0x871E
16771+#define GL_TEXTURE_MAG_SIZE_NV 0x871F
16772+#endif
16773+
16774+#ifndef GL_NV_texture_shader2
16775+#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF
16776+#endif
16777+
16778+#ifndef GL_NV_vertex_array_range2
16779+#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533
16780+#endif
16781+
16782+#ifndef GL_NV_vertex_program
16783+#define GL_VERTEX_PROGRAM_NV 0x8620
16784+#define GL_VERTEX_STATE_PROGRAM_NV 0x8621
16785+#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623
16786+#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624
16787+#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625
16788+#define GL_CURRENT_ATTRIB_NV 0x8626
16789+#define GL_PROGRAM_LENGTH_NV 0x8627
16790+#define GL_PROGRAM_STRING_NV 0x8628
16791+#define GL_MODELVIEW_PROJECTION_NV 0x8629
16792+#define GL_IDENTITY_NV 0x862A
16793+#define GL_INVERSE_NV 0x862B
16794+#define GL_TRANSPOSE_NV 0x862C
16795+#define GL_INVERSE_TRANSPOSE_NV 0x862D
16796+#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E
16797+#define GL_MAX_TRACK_MATRICES_NV 0x862F
16798+#define GL_MATRIX0_NV 0x8630
16799+#define GL_MATRIX1_NV 0x8631
16800+#define GL_MATRIX2_NV 0x8632
16801+#define GL_MATRIX3_NV 0x8633
16802+#define GL_MATRIX4_NV 0x8634
16803+#define GL_MATRIX5_NV 0x8635
16804+#define GL_MATRIX6_NV 0x8636
16805+#define GL_MATRIX7_NV 0x8637
16806+#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640
16807+#define GL_CURRENT_MATRIX_NV 0x8641
16808+#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642
16809+#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643
16810+#define GL_PROGRAM_PARAMETER_NV 0x8644
16811+#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645
16812+#define GL_PROGRAM_TARGET_NV 0x8646
16813+#define GL_PROGRAM_RESIDENT_NV 0x8647
16814+#define GL_TRACK_MATRIX_NV 0x8648
16815+#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649
16816+#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A
16817+#define GL_PROGRAM_ERROR_POSITION_NV 0x864B
16818+#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650
16819+#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651
16820+#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652
16821+#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653
16822+#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654
16823+#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655
16824+#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656
16825+#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657
16826+#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658
16827+#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659
16828+#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A
16829+#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B
16830+#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C
16831+#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D
16832+#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E
16833+#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F
16834+#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660
16835+#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661
16836+#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662
16837+#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663
16838+#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664
16839+#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665
16840+#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666
16841+#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667
16842+#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668
16843+#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669
16844+#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A
16845+#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B
16846+#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C
16847+#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D
16848+#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E
16849+#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F
16850+#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670
16851+#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671
16852+#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672
16853+#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673
16854+#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674
16855+#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675
16856+#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676
16857+#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677
16858+#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678
16859+#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679
16860+#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A
16861+#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B
16862+#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C
16863+#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D
16864+#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E
16865+#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F
16866+#endif
16867+
16868+#ifndef GL_SGIX_texture_coordinate_clamp
16869+#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369
16870+#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A
16871+#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B
16872+#endif
16873+
16874+#ifndef GL_SGIX_scalebias_hint
16875+#define GL_SCALEBIAS_HINT_SGIX 0x8322
16876+#endif
16877+
16878+#ifndef GL_OML_interlace
16879+#define GL_INTERLACE_OML 0x8980
16880+#define GL_INTERLACE_READ_OML 0x8981
16881+#endif
16882+
16883+#ifndef GL_OML_subsample
16884+#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982
16885+#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983
16886+#endif
16887+
16888+#ifndef GL_OML_resample
16889+#define GL_PACK_RESAMPLE_OML 0x8984
16890+#define GL_UNPACK_RESAMPLE_OML 0x8985
16891+#define GL_RESAMPLE_REPLICATE_OML 0x8986
16892+#define GL_RESAMPLE_ZERO_FILL_OML 0x8987
16893+#define GL_RESAMPLE_AVERAGE_OML 0x8988
16894+#define GL_RESAMPLE_DECIMATE_OML 0x8989
16895+#endif
16896+
16897+#ifndef GL_NV_copy_depth_to_color
16898+#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E
16899+#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F
16900+#endif
16901+
16902+#ifndef GL_ATI_envmap_bumpmap
16903+#define GL_BUMP_ROT_MATRIX_ATI 0x8775
16904+#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776
16905+#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777
16906+#define GL_BUMP_TEX_UNITS_ATI 0x8778
16907+#define GL_DUDV_ATI 0x8779
16908+#define GL_DU8DV8_ATI 0x877A
16909+#define GL_BUMP_ENVMAP_ATI 0x877B
16910+#define GL_BUMP_TARGET_ATI 0x877C
16911+#endif
16912+
16913+#ifndef GL_ATI_fragment_shader
16914+#define GL_FRAGMENT_SHADER_ATI 0x8920
16915+#define GL_REG_0_ATI 0x8921
16916+#define GL_REG_1_ATI 0x8922
16917+#define GL_REG_2_ATI 0x8923
16918+#define GL_REG_3_ATI 0x8924
16919+#define GL_REG_4_ATI 0x8925
16920+#define GL_REG_5_ATI 0x8926
16921+#define GL_REG_6_ATI 0x8927
16922+#define GL_REG_7_ATI 0x8928
16923+#define GL_REG_8_ATI 0x8929
16924+#define GL_REG_9_ATI 0x892A
16925+#define GL_REG_10_ATI 0x892B
16926+#define GL_REG_11_ATI 0x892C
16927+#define GL_REG_12_ATI 0x892D
16928+#define GL_REG_13_ATI 0x892E
16929+#define GL_REG_14_ATI 0x892F
16930+#define GL_REG_15_ATI 0x8930
16931+#define GL_REG_16_ATI 0x8931
16932+#define GL_REG_17_ATI 0x8932
16933+#define GL_REG_18_ATI 0x8933
16934+#define GL_REG_19_ATI 0x8934
16935+#define GL_REG_20_ATI 0x8935
16936+#define GL_REG_21_ATI 0x8936
16937+#define GL_REG_22_ATI 0x8937
16938+#define GL_REG_23_ATI 0x8938
16939+#define GL_REG_24_ATI 0x8939
16940+#define GL_REG_25_ATI 0x893A
16941+#define GL_REG_26_ATI 0x893B
16942+#define GL_REG_27_ATI 0x893C
16943+#define GL_REG_28_ATI 0x893D
16944+#define GL_REG_29_ATI 0x893E
16945+#define GL_REG_30_ATI 0x893F
16946+#define GL_REG_31_ATI 0x8940
16947+#define GL_CON_0_ATI 0x8941
16948+#define GL_CON_1_ATI 0x8942
16949+#define GL_CON_2_ATI 0x8943
16950+#define GL_CON_3_ATI 0x8944
16951+#define GL_CON_4_ATI 0x8945
16952+#define GL_CON_5_ATI 0x8946
16953+#define GL_CON_6_ATI 0x8947
16954+#define GL_CON_7_ATI 0x8948
16955+#define GL_CON_8_ATI 0x8949
16956+#define GL_CON_9_ATI 0x894A
16957+#define GL_CON_10_ATI 0x894B
16958+#define GL_CON_11_ATI 0x894C
16959+#define GL_CON_12_ATI 0x894D
16960+#define GL_CON_13_ATI 0x894E
16961+#define GL_CON_14_ATI 0x894F
16962+#define GL_CON_15_ATI 0x8950
16963+#define GL_CON_16_ATI 0x8951
16964+#define GL_CON_17_ATI 0x8952
16965+#define GL_CON_18_ATI 0x8953
16966+#define GL_CON_19_ATI 0x8954
16967+#define GL_CON_20_ATI 0x8955
16968+#define GL_CON_21_ATI 0x8956
16969+#define GL_CON_22_ATI 0x8957
16970+#define GL_CON_23_ATI 0x8958
16971+#define GL_CON_24_ATI 0x8959
16972+#define GL_CON_25_ATI 0x895A
16973+#define GL_CON_26_ATI 0x895B
16974+#define GL_CON_27_ATI 0x895C
16975+#define GL_CON_28_ATI 0x895D
16976+#define GL_CON_29_ATI 0x895E
16977+#define GL_CON_30_ATI 0x895F
16978+#define GL_CON_31_ATI 0x8960
16979+#define GL_MOV_ATI 0x8961
16980+#define GL_ADD_ATI 0x8963
16981+#define GL_MUL_ATI 0x8964
16982+#define GL_SUB_ATI 0x8965
16983+#define GL_DOT3_ATI 0x8966
16984+#define GL_DOT4_ATI 0x8967
16985+#define GL_MAD_ATI 0x8968
16986+#define GL_LERP_ATI 0x8969
16987+#define GL_CND_ATI 0x896A
16988+#define GL_CND0_ATI 0x896B
16989+#define GL_DOT2_ADD_ATI 0x896C
16990+#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D
16991+#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E
16992+#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F
16993+#define GL_NUM_PASSES_ATI 0x8970
16994+#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971
16995+#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972
16996+#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973
16997+#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974
16998+#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975
16999+#define GL_SWIZZLE_STR_ATI 0x8976
17000+#define GL_SWIZZLE_STQ_ATI 0x8977
17001+#define GL_SWIZZLE_STR_DR_ATI 0x8978
17002+#define GL_SWIZZLE_STQ_DQ_ATI 0x8979
17003+#define GL_SWIZZLE_STRQ_ATI 0x897A
17004+#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B
17005+#define GL_RED_BIT_ATI 0x00000001
17006+#define GL_GREEN_BIT_ATI 0x00000002
17007+#define GL_BLUE_BIT_ATI 0x00000004
17008+#define GL_2X_BIT_ATI 0x00000001
17009+#define GL_4X_BIT_ATI 0x00000002
17010+#define GL_8X_BIT_ATI 0x00000004
17011+#define GL_HALF_BIT_ATI 0x00000008
17012+#define GL_QUARTER_BIT_ATI 0x00000010
17013+#define GL_EIGHTH_BIT_ATI 0x00000020
17014+#define GL_SATURATE_BIT_ATI 0x00000040
17015+#define GL_COMP_BIT_ATI 0x00000002
17016+#define GL_NEGATE_BIT_ATI 0x00000004
17017+#define GL_BIAS_BIT_ATI 0x00000008
17018+#endif
17019+
17020+#ifndef GL_ATI_pn_triangles
17021+#define GL_PN_TRIANGLES_ATI 0x87F0
17022+#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1
17023+#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2
17024+#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3
17025+#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4
17026+#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5
17027+#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6
17028+#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7
17029+#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8
17030+#endif
17031+
17032+#ifndef GL_ATI_vertex_array_object
17033+#define GL_STATIC_ATI 0x8760
17034+#define GL_DYNAMIC_ATI 0x8761
17035+#define GL_PRESERVE_ATI 0x8762
17036+#define GL_DISCARD_ATI 0x8763
17037+#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764
17038+#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765
17039+#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766
17040+#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767
17041+#endif
17042+
17043+#ifndef GL_EXT_vertex_shader
17044+#define GL_VERTEX_SHADER_EXT 0x8780
17045+#define GL_VERTEX_SHADER_BINDING_EXT 0x8781
17046+#define GL_OP_INDEX_EXT 0x8782
17047+#define GL_OP_NEGATE_EXT 0x8783
17048+#define GL_OP_DOT3_EXT 0x8784
17049+#define GL_OP_DOT4_EXT 0x8785
17050+#define GL_OP_MUL_EXT 0x8786
17051+#define GL_OP_ADD_EXT 0x8787
17052+#define GL_OP_MADD_EXT 0x8788
17053+#define GL_OP_FRAC_EXT 0x8789
17054+#define GL_OP_MAX_EXT 0x878A
17055+#define GL_OP_MIN_EXT 0x878B
17056+#define GL_OP_SET_GE_EXT 0x878C
17057+#define GL_OP_SET_LT_EXT 0x878D
17058+#define GL_OP_CLAMP_EXT 0x878E
17059+#define GL_OP_FLOOR_EXT 0x878F
17060+#define GL_OP_ROUND_EXT 0x8790
17061+#define GL_OP_EXP_BASE_2_EXT 0x8791
17062+#define GL_OP_LOG_BASE_2_EXT 0x8792
17063+#define GL_OP_POWER_EXT 0x8793
17064+#define GL_OP_RECIP_EXT 0x8794
17065+#define GL_OP_RECIP_SQRT_EXT 0x8795
17066+#define GL_OP_SUB_EXT 0x8796
17067+#define GL_OP_CROSS_PRODUCT_EXT 0x8797
17068+#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798
17069+#define GL_OP_MOV_EXT 0x8799
17070+#define GL_OUTPUT_VERTEX_EXT 0x879A
17071+#define GL_OUTPUT_COLOR0_EXT 0x879B
17072+#define GL_OUTPUT_COLOR1_EXT 0x879C
17073+#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D
17074+#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E
17075+#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F
17076+#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0
17077+#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1
17078+#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2
17079+#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3
17080+#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4
17081+#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5
17082+#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6
17083+#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7
17084+#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8
17085+#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9
17086+#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA
17087+#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB
17088+#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC
17089+#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD
17090+#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE
17091+#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF
17092+#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0
17093+#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1
17094+#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2
17095+#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3
17096+#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4
17097+#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5
17098+#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6
17099+#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7
17100+#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8
17101+#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9
17102+#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA
17103+#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB
17104+#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC
17105+#define GL_OUTPUT_FOG_EXT 0x87BD
17106+#define GL_SCALAR_EXT 0x87BE
17107+#define GL_VECTOR_EXT 0x87BF
17108+#define GL_MATRIX_EXT 0x87C0
17109+#define GL_VARIANT_EXT 0x87C1
17110+#define GL_INVARIANT_EXT 0x87C2
17111+#define GL_LOCAL_CONSTANT_EXT 0x87C3
17112+#define GL_LOCAL_EXT 0x87C4
17113+#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5
17114+#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6
17115+#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7
17116+#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8
17117+#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9
17118+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA
17119+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB
17120+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC
17121+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD
17122+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE
17123+#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF
17124+#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0
17125+#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1
17126+#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2
17127+#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3
17128+#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4
17129+#define GL_X_EXT 0x87D5
17130+#define GL_Y_EXT 0x87D6
17131+#define GL_Z_EXT 0x87D7
17132+#define GL_W_EXT 0x87D8
17133+#define GL_NEGATIVE_X_EXT 0x87D9
17134+#define GL_NEGATIVE_Y_EXT 0x87DA
17135+#define GL_NEGATIVE_Z_EXT 0x87DB
17136+#define GL_NEGATIVE_W_EXT 0x87DC
17137+#define GL_ZERO_EXT 0x87DD
17138+#define GL_ONE_EXT 0x87DE
17139+#define GL_NEGATIVE_ONE_EXT 0x87DF
17140+#define GL_NORMALIZED_RANGE_EXT 0x87E0
17141+#define GL_FULL_RANGE_EXT 0x87E1
17142+#define GL_CURRENT_VERTEX_EXT 0x87E2
17143+#define GL_MVP_MATRIX_EXT 0x87E3
17144+#define GL_VARIANT_VALUE_EXT 0x87E4
17145+#define GL_VARIANT_DATATYPE_EXT 0x87E5
17146+#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6
17147+#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7
17148+#define GL_VARIANT_ARRAY_EXT 0x87E8
17149+#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9
17150+#define GL_INVARIANT_VALUE_EXT 0x87EA
17151+#define GL_INVARIANT_DATATYPE_EXT 0x87EB
17152+#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC
17153+#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED
17154+#endif
17155+
17156+#ifndef GL_ATI_vertex_streams
17157+#define GL_MAX_VERTEX_STREAMS_ATI 0x876B
17158+#define GL_VERTEX_STREAM0_ATI 0x876C
17159+#define GL_VERTEX_STREAM1_ATI 0x876D
17160+#define GL_VERTEX_STREAM2_ATI 0x876E
17161+#define GL_VERTEX_STREAM3_ATI 0x876F
17162+#define GL_VERTEX_STREAM4_ATI 0x8770
17163+#define GL_VERTEX_STREAM5_ATI 0x8771
17164+#define GL_VERTEX_STREAM6_ATI 0x8772
17165+#define GL_VERTEX_STREAM7_ATI 0x8773
17166+#define GL_VERTEX_SOURCE_ATI 0x8774
17167+#endif
17168+
17169+#ifndef GL_ATI_element_array
17170+#define GL_ELEMENT_ARRAY_ATI 0x8768
17171+#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769
17172+#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A
17173+#endif
17174+
17175+#ifndef GL_SUN_mesh_array
17176+#define GL_QUAD_MESH_SUN 0x8614
17177+#define GL_TRIANGLE_MESH_SUN 0x8615
17178+#endif
17179+
17180+#ifndef GL_SUN_slice_accum
17181+#define GL_SLICE_ACCUM_SUN 0x85CC
17182+#endif
17183+
17184+#ifndef GL_NV_multisample_filter_hint
17185+#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534
17186+#endif
17187+
17188+#ifndef GL_NV_depth_clamp
17189+#define GL_DEPTH_CLAMP_NV 0x864F
17190+#endif
17191+
17192+#ifndef GL_NV_occlusion_query
17193+#define GL_PIXEL_COUNTER_BITS_NV 0x8864
17194+#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865
17195+#define GL_PIXEL_COUNT_NV 0x8866
17196+#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867
17197+#endif
17198+
17199+#ifndef GL_NV_point_sprite
17200+#define GL_POINT_SPRITE_NV 0x8861
17201+#define GL_COORD_REPLACE_NV 0x8862
17202+#define GL_POINT_SPRITE_R_MODE_NV 0x8863
17203+#endif
17204+
17205+#ifndef GL_NV_texture_shader3
17206+#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850
17207+#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851
17208+#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852
17209+#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853
17210+#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854
17211+#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855
17212+#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856
17213+#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857
17214+#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858
17215+#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859
17216+#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A
17217+#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B
17218+#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C
17219+#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D
17220+#define GL_HILO8_NV 0x885E
17221+#define GL_SIGNED_HILO8_NV 0x885F
17222+#define GL_FORCE_BLUE_TO_ONE_NV 0x8860
17223+#endif
17224+
17225+#ifndef GL_NV_vertex_program1_1
17226+#endif
17227+
17228+#ifndef GL_EXT_shadow_funcs
17229+#endif
17230+
17231+#ifndef GL_EXT_stencil_two_side
17232+#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910
17233+#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911
17234+#endif
17235+
17236+#ifndef GL_ATI_text_fragment_shader
17237+#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200
17238+#endif
17239+
17240+#ifndef GL_APPLE_client_storage
17241+#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2
17242+#endif
17243+
17244+#ifndef GL_APPLE_element_array
17245+#define GL_ELEMENT_ARRAY_APPLE 0x8768
17246+#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8769
17247+#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x876A
17248+#endif
17249+
17250+#ifndef GL_APPLE_fence
17251+#define GL_DRAW_PIXELS_APPLE 0x8A0A
17252+#define GL_FENCE_APPLE 0x8A0B
17253+#endif
17254+
17255+#ifndef GL_APPLE_vertex_array_object
17256+#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5
17257+#endif
17258+
17259+#ifndef GL_APPLE_vertex_array_range
17260+#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D
17261+#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E
17262+#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F
17263+#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521
17264+#define GL_STORAGE_CACHED_APPLE 0x85BE
17265+#define GL_STORAGE_SHARED_APPLE 0x85BF
17266+#endif
17267+
17268+#ifndef GL_APPLE_ycbcr_422
17269+#define GL_YCBCR_422_APPLE 0x85B9
17270+#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
17271+#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
17272+#endif
17273+
17274+#ifndef GL_S3_s3tc
17275+#define GL_RGB_S3TC 0x83A0
17276+#define GL_RGB4_S3TC 0x83A1
17277+#define GL_RGBA_S3TC 0x83A2
17278+#define GL_RGBA4_S3TC 0x83A3
17279+#endif
17280+
17281+#ifndef GL_ATI_draw_buffers
17282+#define GL_MAX_DRAW_BUFFERS_ATI 0x8824
17283+#define GL_DRAW_BUFFER0_ATI 0x8825
17284+#define GL_DRAW_BUFFER1_ATI 0x8826
17285+#define GL_DRAW_BUFFER2_ATI 0x8827
17286+#define GL_DRAW_BUFFER3_ATI 0x8828
17287+#define GL_DRAW_BUFFER4_ATI 0x8829
17288+#define GL_DRAW_BUFFER5_ATI 0x882A
17289+#define GL_DRAW_BUFFER6_ATI 0x882B
17290+#define GL_DRAW_BUFFER7_ATI 0x882C
17291+#define GL_DRAW_BUFFER8_ATI 0x882D
17292+#define GL_DRAW_BUFFER9_ATI 0x882E
17293+#define GL_DRAW_BUFFER10_ATI 0x882F
17294+#define GL_DRAW_BUFFER11_ATI 0x8830
17295+#define GL_DRAW_BUFFER12_ATI 0x8831
17296+#define GL_DRAW_BUFFER13_ATI 0x8832
17297+#define GL_DRAW_BUFFER14_ATI 0x8833
17298+#define GL_DRAW_BUFFER15_ATI 0x8834
17299+#endif
17300+
17301+#ifndef GL_ATI_pixel_format_float
17302+#define GL_TYPE_RGBA_FLOAT_ATI 0x8820
17303+#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
17304+#endif
17305+
17306+#ifndef GL_ATI_texture_env_combine3
17307+#define GL_MODULATE_ADD_ATI 0x8744
17308+#define GL_MODULATE_SIGNED_ADD_ATI 0x8745
17309+#define GL_MODULATE_SUBTRACT_ATI 0x8746
17310+#endif
17311+
17312+#ifndef GL_ATI_texture_float
17313+#define GL_RGBA_FLOAT32_ATI 0x8814
17314+#define GL_RGB_FLOAT32_ATI 0x8815
17315+#define GL_ALPHA_FLOAT32_ATI 0x8816
17316+#define GL_INTENSITY_FLOAT32_ATI 0x8817
17317+#define GL_LUMINANCE_FLOAT32_ATI 0x8818
17318+#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819
17319+#define GL_RGBA_FLOAT16_ATI 0x881A
17320+#define GL_RGB_FLOAT16_ATI 0x881B
17321+#define GL_ALPHA_FLOAT16_ATI 0x881C
17322+#define GL_INTENSITY_FLOAT16_ATI 0x881D
17323+#define GL_LUMINANCE_FLOAT16_ATI 0x881E
17324+#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F
17325+#endif
17326+
17327+#ifndef GL_NV_float_buffer
17328+#define GL_FLOAT_R_NV 0x8880
17329+#define GL_FLOAT_RG_NV 0x8881
17330+#define GL_FLOAT_RGB_NV 0x8882
17331+#define GL_FLOAT_RGBA_NV 0x8883
17332+#define GL_FLOAT_R16_NV 0x8884
17333+#define GL_FLOAT_R32_NV 0x8885
17334+#define GL_FLOAT_RG16_NV 0x8886
17335+#define GL_FLOAT_RG32_NV 0x8887
17336+#define GL_FLOAT_RGB16_NV 0x8888
17337+#define GL_FLOAT_RGB32_NV 0x8889
17338+#define GL_FLOAT_RGBA16_NV 0x888A
17339+#define GL_FLOAT_RGBA32_NV 0x888B
17340+#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C
17341+#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D
17342+#define GL_FLOAT_RGBA_MODE_NV 0x888E
17343+#endif
17344+
17345+#ifndef GL_NV_fragment_program
17346+#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868
17347+#define GL_FRAGMENT_PROGRAM_NV 0x8870
17348+#define GL_MAX_TEXTURE_COORDS_NV 0x8871
17349+#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872
17350+#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873
17351+#define GL_PROGRAM_ERROR_STRING_NV 0x8874
17352+#endif
17353+
17354+#ifndef GL_NV_half_float
17355+#define GL_HALF_FLOAT_NV 0x140B
17356+#endif
17357+
17358+#ifndef GL_NV_pixel_data_range
17359+#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878
17360+#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879
17361+#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A
17362+#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B
17363+#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C
17364+#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D
17365+#endif
17366+
17367+#ifndef GL_NV_primitive_restart
17368+#define GL_PRIMITIVE_RESTART_NV 0x8558
17369+#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559
17370+#endif
17371+
17372+#ifndef GL_NV_texture_expand_normal
17373+#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F
17374+#endif
17375+
17376+#ifndef GL_NV_vertex_program2
17377+#endif
17378+
17379+#ifndef GL_ATI_map_object_buffer
17380+#endif
17381+
17382+#ifndef GL_ATI_separate_stencil
17383+#define GL_STENCIL_BACK_FUNC_ATI 0x8800
17384+#define GL_STENCIL_BACK_FAIL_ATI 0x8801
17385+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802
17386+#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803
17387+#endif
17388+
17389+#ifndef GL_ATI_vertex_attrib_array_object
17390+#endif
17391+
17392+#ifndef GL_OES_read_format
17393+#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
17394+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
17395+#endif
17396+
17397+#ifndef GL_EXT_depth_bounds_test
17398+#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890
17399+#define GL_DEPTH_BOUNDS_EXT 0x8891
17400+#endif
17401+
17402+#ifndef GL_EXT_texture_mirror_clamp
17403+#define GL_MIRROR_CLAMP_EXT 0x8742
17404+#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743
17405+#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912
17406+#endif
17407+
17408+#ifndef GL_EXT_blend_equation_separate
17409+#define GL_BLEND_EQUATION_RGB_EXT GL_BLEND_EQUATION
17410+#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D
17411+#endif
17412+
17413+#ifndef GL_MESA_pack_invert
17414+#define GL_PACK_INVERT_MESA 0x8758
17415+#endif
17416+
17417+#ifndef GL_MESA_ycbcr_texture
17418+#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA
17419+#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB
17420+#define GL_YCBCR_MESA 0x8757
17421+#endif
17422+
17423+#ifndef GL_EXT_pixel_buffer_object
17424+#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB
17425+#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC
17426+#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED
17427+#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF
17428+#endif
17429+
17430+#ifndef GL_NV_fragment_program_option
17431+#endif
17432+
17433+#ifndef GL_NV_fragment_program2
17434+#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4
17435+#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5
17436+#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6
17437+#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7
17438+#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8
17439+#endif
17440+
17441+#ifndef GL_NV_vertex_program2_option
17442+/* reuse GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
17443+/* reuse GL_MAX_PROGRAM_CALL_DEPTH_NV */
17444+#endif
17445+
17446+#ifndef GL_NV_vertex_program3
17447+/* reuse GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
17448+#endif
17449+
17450+#ifndef GL_EXT_framebuffer_object
17451+#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
17452+#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8
17453+#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6
17454+#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7
17455+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
17456+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
17457+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
17458+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
17459+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
17460+#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
17461+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
17462+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
17463+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
17464+#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
17465+#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
17466+#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
17467+#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD
17468+#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
17469+#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
17470+#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
17471+#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
17472+#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
17473+#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
17474+#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
17475+#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
17476+#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
17477+#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
17478+#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
17479+#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
17480+#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
17481+#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
17482+#define GL_COLOR_ATTACHMENT13_EXT 0x8CED
17483+#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
17484+#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
17485+#define GL_DEPTH_ATTACHMENT_EXT 0x8D00
17486+#define GL_STENCIL_ATTACHMENT_EXT 0x8D20
17487+#define GL_FRAMEBUFFER_EXT 0x8D40
17488+#define GL_RENDERBUFFER_EXT 0x8D41
17489+#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42
17490+#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43
17491+#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
17492+#define GL_STENCIL_INDEX1_EXT 0x8D46
17493+#define GL_STENCIL_INDEX4_EXT 0x8D47
17494+#define GL_STENCIL_INDEX8_EXT 0x8D48
17495+#define GL_STENCIL_INDEX16_EXT 0x8D49
17496+#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50
17497+#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51
17498+#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52
17499+#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53
17500+#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54
17501+#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55
17502+#endif
17503+
17504+#ifndef GL_GREMEDY_string_marker
17505+#endif
17506+
17507+#ifndef GL_EXT_packed_depth_stencil
17508+#define GL_DEPTH_STENCIL_EXT 0x84F9
17509+#define GL_UNSIGNED_INT_24_8_EXT 0x84FA
17510+#define GL_DEPTH24_STENCIL8_EXT 0x88F0
17511+#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1
17512+#endif
17513+
17514+#ifndef GL_EXT_stencil_clear_tag
17515+#define GL_STENCIL_TAG_BITS_EXT 0x88F2
17516+#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3
17517+#endif
17518+
17519+#ifndef GL_EXT_texture_sRGB
17520+#define GL_SRGB_EXT 0x8C40
17521+#define GL_SRGB8_EXT 0x8C41
17522+#define GL_SRGB_ALPHA_EXT 0x8C42
17523+#define GL_SRGB8_ALPHA8_EXT 0x8C43
17524+#define GL_SLUMINANCE_ALPHA_EXT 0x8C44
17525+#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45
17526+#define GL_SLUMINANCE_EXT 0x8C46
17527+#define GL_SLUMINANCE8_EXT 0x8C47
17528+#define GL_COMPRESSED_SRGB_EXT 0x8C48
17529+#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49
17530+#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A
17531+#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B
17532+#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
17533+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
17534+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
17535+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
17536+#endif
17537+
17538+#ifndef GL_EXT_framebuffer_blit
17539+#define GL_READ_FRAMEBUFFER_EXT 0x8CA8
17540+#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
17541+#define GL_READ_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT
17542+#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CAA
17543+#endif
17544+
17545+#ifndef GL_EXT_framebuffer_multisample
17546+#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
17547+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
17548+#define GL_MAX_SAMPLES_EXT 0x8D57
17549+#endif
17550+
17551+#ifndef GL_MESAX_texture_stack
17552+#define GL_TEXTURE_1D_STACK_MESAX 0x8759
17553+#define GL_TEXTURE_2D_STACK_MESAX 0x875A
17554+#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B
17555+#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C
17556+#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D
17557+#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E
17558+#endif
17559+
17560+#ifndef GL_EXT_timer_query
17561+#define GL_TIME_ELAPSED_EXT 0x88BF
17562+#endif
17563+
17564+#ifndef GL_EXT_gpu_program_parameters
17565+#endif
17566+
17567+#ifndef GL_APPLE_flush_buffer_range
17568+#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12
17569+#define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13
17570+#endif
17571+
17572+#ifndef GL_NV_gpu_program4
17573+#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904
17574+#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905
17575+#define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906
17576+#define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907
17577+#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908
17578+#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909
17579+#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5
17580+#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6
17581+#endif
17582+
17583+#ifndef GL_NV_geometry_program4
17584+#define GL_LINES_ADJACENCY_EXT 0x000A
17585+#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B
17586+#define GL_TRIANGLES_ADJACENCY_EXT 0x000C
17587+#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D
17588+#define GL_GEOMETRY_PROGRAM_NV 0x8C26
17589+#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27
17590+#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28
17591+#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA
17592+#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB
17593+#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC
17594+#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
17595+#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
17596+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
17597+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9
17598+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
17599+#define GL_PROGRAM_POINT_SIZE_EXT 0x8642
17600+#endif
17601+
17602+#ifndef GL_EXT_geometry_shader4
17603+#define GL_GEOMETRY_SHADER_EXT 0x8DD9
17604+/* reuse GL_GEOMETRY_VERTICES_OUT_EXT */
17605+/* reuse GL_GEOMETRY_INPUT_TYPE_EXT */
17606+/* reuse GL_GEOMETRY_OUTPUT_TYPE_EXT */
17607+/* reuse GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT */
17608+#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD
17609+#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE
17610+#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B
17611+#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
17612+#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
17613+#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
17614+/* reuse GL_LINES_ADJACENCY_EXT */
17615+/* reuse GL_LINE_STRIP_ADJACENCY_EXT */
17616+/* reuse GL_TRIANGLES_ADJACENCY_EXT */
17617+/* reuse GL_TRIANGLE_STRIP_ADJACENCY_EXT */
17618+/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT */
17619+/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT */
17620+/* reuse GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT */
17621+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
17622+/* reuse GL_PROGRAM_POINT_SIZE_EXT */
17623+#endif
17624+
17625+#ifndef GL_NV_vertex_program4
17626+#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD
17627+#endif
17628+
17629+#ifndef GL_EXT_gpu_shader4
17630+#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0
17631+#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1
17632+#define GL_SAMPLER_BUFFER_EXT 0x8DC2
17633+#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3
17634+#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4
17635+#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5
17636+#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6
17637+#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7
17638+#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8
17639+#define GL_INT_SAMPLER_1D_EXT 0x8DC9
17640+#define GL_INT_SAMPLER_2D_EXT 0x8DCA
17641+#define GL_INT_SAMPLER_3D_EXT 0x8DCB
17642+#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC
17643+#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD
17644+#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE
17645+#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF
17646+#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0
17647+#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1
17648+#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2
17649+#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3
17650+#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4
17651+#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5
17652+#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6
17653+#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7
17654+#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8
17655+#endif
17656+
17657+#ifndef GL_EXT_draw_instanced
17658+#endif
17659+
17660+#ifndef GL_EXT_packed_float
17661+#define GL_R11F_G11F_B10F_EXT 0x8C3A
17662+#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B
17663+#define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C
17664+#endif
17665+
17666+#ifndef GL_EXT_texture_array
17667+#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18
17668+#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19
17669+#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A
17670+#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B
17671+#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C
17672+#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D
17673+#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF
17674+#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E
17675+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
17676+#endif
17677+
17678+#ifndef GL_EXT_texture_buffer_object
17679+#define GL_TEXTURE_BUFFER_EXT 0x8C2A
17680+#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B
17681+#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C
17682+#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D
17683+#define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E
17684+#endif
17685+
17686+#ifndef GL_EXT_texture_compression_latc
17687+#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70
17688+#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71
17689+#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72
17690+#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73
17691+#endif
17692+
17693+#ifndef GL_EXT_texture_compression_rgtc
17694+#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB
17695+#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC
17696+#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD
17697+#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE
17698+#endif
17699+
17700+#ifndef GL_EXT_texture_shared_exponent
17701+#define GL_RGB9_E5_EXT 0x8C3D
17702+#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E
17703+#define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F
17704+#endif
17705+
17706+#ifndef GL_NV_depth_buffer_float
17707+#define GL_DEPTH_COMPONENT32F_NV 0x8DAB
17708+#define GL_DEPTH32F_STENCIL8_NV 0x8DAC
17709+#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD
17710+#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF
17711+#endif
17712+
17713+#ifndef GL_NV_fragment_program4
17714+#endif
17715+
17716+#ifndef GL_NV_framebuffer_multisample_coverage
17717+#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB
17718+#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10
17719+#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11
17720+#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12
17721+#endif
17722+
17723+#ifndef GL_EXT_framebuffer_sRGB
17724+#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9
17725+#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA
17726+#endif
17727+
17728+#ifndef GL_NV_geometry_shader4
17729+#endif
17730+
17731+#ifndef GL_NV_parameter_buffer_object
17732+#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0
17733+#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1
17734+#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2
17735+#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3
17736+#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4
17737+#endif
17738+
17739+#ifndef GL_EXT_draw_buffers2
17740+#endif
17741+
17742+#ifndef GL_NV_transform_feedback
17743+#define GL_BACK_PRIMARY_COLOR_NV 0x8C77
17744+#define GL_BACK_SECONDARY_COLOR_NV 0x8C78
17745+#define GL_TEXTURE_COORD_NV 0x8C79
17746+#define GL_CLIP_DISTANCE_NV 0x8C7A
17747+#define GL_VERTEX_ID_NV 0x8C7B
17748+#define GL_PRIMITIVE_ID_NV 0x8C7C
17749+#define GL_GENERIC_ATTRIB_NV 0x8C7D
17750+#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E
17751+#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F
17752+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80
17753+#define GL_ACTIVE_VARYINGS_NV 0x8C81
17754+#define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82
17755+#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83
17756+#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84
17757+#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85
17758+#define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86
17759+#define GL_PRIMITIVES_GENERATED_NV 0x8C87
17760+#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88
17761+#define GL_RASTERIZER_DISCARD_NV 0x8C89
17762+#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_ATTRIBS_NV 0x8C8A
17763+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B
17764+#define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C
17765+#define GL_SEPARATE_ATTRIBS_NV 0x8C8D
17766+#define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E
17767+#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F
17768+#endif
17769+
17770+#ifndef GL_EXT_bindable_uniform
17771+#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2
17772+#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3
17773+#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4
17774+#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED
17775+#define GL_UNIFORM_BUFFER_EXT 0x8DEE
17776+#define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF
17777+#endif
17778+
17779+#ifndef GL_EXT_texture_integer
17780+#define GL_RGBA32UI_EXT 0x8D70
17781+#define GL_RGB32UI_EXT 0x8D71
17782+#define GL_ALPHA32UI_EXT 0x8D72
17783+#define GL_INTENSITY32UI_EXT 0x8D73
17784+#define GL_LUMINANCE32UI_EXT 0x8D74
17785+#define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75
17786+#define GL_RGBA16UI_EXT 0x8D76
17787+#define GL_RGB16UI_EXT 0x8D77
17788+#define GL_ALPHA16UI_EXT 0x8D78
17789+#define GL_INTENSITY16UI_EXT 0x8D79
17790+#define GL_LUMINANCE16UI_EXT 0x8D7A
17791+#define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B
17792+#define GL_RGBA8UI_EXT 0x8D7C
17793+#define GL_RGB8UI_EXT 0x8D7D
17794+#define GL_ALPHA8UI_EXT 0x8D7E
17795+#define GL_INTENSITY8UI_EXT 0x8D7F
17796+#define GL_LUMINANCE8UI_EXT 0x8D80
17797+#define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81
17798+#define GL_RGBA32I_EXT 0x8D82
17799+#define GL_RGB32I_EXT 0x8D83
17800+#define GL_ALPHA32I_EXT 0x8D84
17801+#define GL_INTENSITY32I_EXT 0x8D85
17802+#define GL_LUMINANCE32I_EXT 0x8D86
17803+#define GL_LUMINANCE_ALPHA32I_EXT 0x8D87
17804+#define GL_RGBA16I_EXT 0x8D88
17805+#define GL_RGB16I_EXT 0x8D89
17806+#define GL_ALPHA16I_EXT 0x8D8A
17807+#define GL_INTENSITY16I_EXT 0x8D8B
17808+#define GL_LUMINANCE16I_EXT 0x8D8C
17809+#define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D
17810+#define GL_RGBA8I_EXT 0x8D8E
17811+#define GL_RGB8I_EXT 0x8D8F
17812+#define GL_ALPHA8I_EXT 0x8D90
17813+#define GL_INTENSITY8I_EXT 0x8D91
17814+#define GL_LUMINANCE8I_EXT 0x8D92
17815+#define GL_LUMINANCE_ALPHA8I_EXT 0x8D93
17816+#define GL_RED_INTEGER_EXT 0x8D94
17817+#define GL_GREEN_INTEGER_EXT 0x8D95
17818+#define GL_BLUE_INTEGER_EXT 0x8D96
17819+#define GL_ALPHA_INTEGER_EXT 0x8D97
17820+#define GL_RGB_INTEGER_EXT 0x8D98
17821+#define GL_RGBA_INTEGER_EXT 0x8D99
17822+#define GL_BGR_INTEGER_EXT 0x8D9A
17823+#define GL_BGRA_INTEGER_EXT 0x8D9B
17824+#define GL_LUMINANCE_INTEGER_EXT 0x8D9C
17825+#define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D
17826+#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E
17827+#endif
17828+
17829+
17830+/*************************************************************/
17831+
17832+#include <stddef.h>
17833+#ifndef GL_VERSION_2_0
17834+/* GL type for program/shader text */
17835+typedef char GLchar; /* native character */
17836+#endif
17837+
17838+#ifndef GL_VERSION_1_5
17839+/* GL types for handling large vertex buffer objects */
17840+typedef ptrdiff_t GLintptr;
17841+typedef ptrdiff_t GLsizeiptr;
17842+#endif
17843+
17844+#ifndef GL_ARB_vertex_buffer_object
17845+/* GL types for handling large vertex buffer objects */
17846+typedef ptrdiff_t GLintptrARB;
17847+typedef ptrdiff_t GLsizeiptrARB;
17848+#endif
17849+
17850+#ifndef GL_ARB_shader_objects
17851+/* GL types for handling shader object handles and program/shader text */
17852+typedef char GLcharARB; /* native character */
17853+typedef unsigned int GLhandleARB; /* shader object handle */
17854+#endif
17855+
17856+/* GL types for "half" precision (s10e5) float data in host memory */
17857+#ifndef GL_ARB_half_float_pixel
17858+typedef unsigned short GLhalfARB;
17859+#endif
17860+
17861+#ifndef GL_NV_half_float
17862+typedef unsigned short GLhalfNV;
17863+#endif
17864+
17865+#ifndef GLEXT_64_TYPES_DEFINED
17866+/* This code block is duplicated in glext.h, so must be protected */
17867+#define GLEXT_64_TYPES_DEFINED
17868+/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
17869+/* (as used in the GL_EXT_timer_query extension). */
17870+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
17871+#include <inttypes.h>
17872+#elif defined(__sun__)
17873+#include <inttypes.h>
17874+#if defined(__STDC__)
17875+#if defined(__arch64__)
17876+typedef long int int64_t;
17877+typedef unsigned long int uint64_t;
17878+#else
17879+typedef long long int int64_t;
17880+typedef unsigned long long int uint64_t;
17881+#endif /* __arch64__ */
17882+#endif /* __STDC__ */
17883+#elif defined( __VMS )
17884+#include <inttypes.h>
17885+#elif defined(__SCO__) || defined(__USLC__)
17886+#include <stdint.h>
17887+#elif defined(__UNIXOS2__) || defined(__SOL64__)
17888+typedef long int int32_t;
17889+typedef long long int int64_t;
17890+typedef unsigned long long int uint64_t;
17891+#elif defined(_WIN32) && defined(__GNUC__)
17892+#include <stdint.h>
17893+#elif defined(_WIN32)
17894+typedef __int32 int32_t;
17895+typedef __int64 int64_t;
17896+typedef unsigned __int64 uint64_t;
17897+#else
17898+#include <inttypes.h> /* Fallback option */
17899+#endif
17900+#endif
17901+
17902+#ifndef GL_EXT_timer_query
17903+typedef int64_t GLint64EXT;
17904+typedef uint64_t GLuint64EXT;
17905+#endif
17906+
17907+#ifndef GL_VERSION_1_2
17908+#define GL_VERSION_1_2 1
17909+#ifdef GL_GLEXT_PROTOTYPES
17910+GLAPI void APIENTRY glBlendColor (GLclampf, GLclampf, GLclampf, GLclampf);
17911+GLAPI void APIENTRY glBlendEquation (GLenum);
17912+GLAPI void APIENTRY glDrawRangeElements (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
17913+GLAPI void APIENTRY glColorTable (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
17914+GLAPI void APIENTRY glColorTableParameterfv (GLenum, GLenum, const GLfloat *);
17915+GLAPI void APIENTRY glColorTableParameteriv (GLenum, GLenum, const GLint *);
17916+GLAPI void APIENTRY glCopyColorTable (GLenum, GLenum, GLint, GLint, GLsizei);
17917+GLAPI void APIENTRY glGetColorTable (GLenum, GLenum, GLenum, GLvoid *);
17918+GLAPI void APIENTRY glGetColorTableParameterfv (GLenum, GLenum, GLfloat *);
17919+GLAPI void APIENTRY glGetColorTableParameteriv (GLenum, GLenum, GLint *);
17920+GLAPI void APIENTRY glColorSubTable (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
17921+GLAPI void APIENTRY glCopyColorSubTable (GLenum, GLsizei, GLint, GLint, GLsizei);
17922+GLAPI void APIENTRY glConvolutionFilter1D (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
17923+GLAPI void APIENTRY glConvolutionFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
17924+GLAPI void APIENTRY glConvolutionParameterf (GLenum, GLenum, GLfloat);
17925+GLAPI void APIENTRY glConvolutionParameterfv (GLenum, GLenum, const GLfloat *);
17926+GLAPI void APIENTRY glConvolutionParameteri (GLenum, GLenum, GLint);
17927+GLAPI void APIENTRY glConvolutionParameteriv (GLenum, GLenum, const GLint *);
17928+GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum, GLenum, GLint, GLint, GLsizei);
17929+GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
17930+GLAPI void APIENTRY glGetConvolutionFilter (GLenum, GLenum, GLenum, GLvoid *);
17931+GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum, GLenum, GLfloat *);
17932+GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum, GLenum, GLint *);
17933+GLAPI void APIENTRY glGetSeparableFilter (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
17934+GLAPI void APIENTRY glSeparableFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
17935+GLAPI void APIENTRY glGetHistogram (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
17936+GLAPI void APIENTRY glGetHistogramParameterfv (GLenum, GLenum, GLfloat *);
17937+GLAPI void APIENTRY glGetHistogramParameteriv (GLenum, GLenum, GLint *);
17938+GLAPI void APIENTRY glGetMinmax (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
17939+GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum, GLenum, GLfloat *);
17940+GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum, GLenum, GLint *);
17941+GLAPI void APIENTRY glHistogram (GLenum, GLsizei, GLenum, GLboolean);
17942+GLAPI void APIENTRY glMinmax (GLenum, GLenum, GLboolean);
17943+GLAPI void APIENTRY glResetHistogram (GLenum);
17944+GLAPI void APIENTRY glResetMinmax (GLenum);
17945+GLAPI void APIENTRY glTexImage3D (GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
17946+GLAPI void APIENTRY glTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
17947+GLAPI void APIENTRY glCopyTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
17948+#endif /* GL_GLEXT_PROTOTYPES */
17949+typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
17950+typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
17951+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
17952+typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
17953+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
17954+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
17955+typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
17956+typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
17957+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
17958+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
17959+typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
17960+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
17961+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
17962+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
17963+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
17964+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
17965+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
17966+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
17967+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
17968+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
17969+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
17970+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
17971+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
17972+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
17973+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
17974+typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
17975+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
17976+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
17977+typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
17978+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
17979+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
17980+typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
17981+typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
17982+typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
17983+typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
17984+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);
17985+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);
17986+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
17987+#endif
17988+
17989+#ifndef GL_VERSION_1_3
17990+#define GL_VERSION_1_3 1
17991+#ifdef GL_GLEXT_PROTOTYPES
17992+GLAPI void APIENTRY glActiveTexture (GLenum);
17993+GLAPI void APIENTRY glClientActiveTexture (GLenum);
17994+GLAPI void APIENTRY glMultiTexCoord1d (GLenum, GLdouble);
17995+GLAPI void APIENTRY glMultiTexCoord1dv (GLenum, const GLdouble *);
17996+GLAPI void APIENTRY glMultiTexCoord1f (GLenum, GLfloat);
17997+GLAPI void APIENTRY glMultiTexCoord1fv (GLenum, const GLfloat *);
17998+GLAPI void APIENTRY glMultiTexCoord1i (GLenum, GLint);
17999+GLAPI void APIENTRY glMultiTexCoord1iv (GLenum, const GLint *);
18000+GLAPI void APIENTRY glMultiTexCoord1s (GLenum, GLshort);
18001+GLAPI void APIENTRY glMultiTexCoord1sv (GLenum, const GLshort *);
18002+GLAPI void APIENTRY glMultiTexCoord2d (GLenum, GLdouble, GLdouble);
18003+GLAPI void APIENTRY glMultiTexCoord2dv (GLenum, const GLdouble *);
18004+GLAPI void APIENTRY glMultiTexCoord2f (GLenum, GLfloat, GLfloat);
18005+GLAPI void APIENTRY glMultiTexCoord2fv (GLenum, const GLfloat *);
18006+GLAPI void APIENTRY glMultiTexCoord2i (GLenum, GLint, GLint);
18007+GLAPI void APIENTRY glMultiTexCoord2iv (GLenum, const GLint *);
18008+GLAPI void APIENTRY glMultiTexCoord2s (GLenum, GLshort, GLshort);
18009+GLAPI void APIENTRY glMultiTexCoord2sv (GLenum, const GLshort *);
18010+GLAPI void APIENTRY glMultiTexCoord3d (GLenum, GLdouble, GLdouble, GLdouble);
18011+GLAPI void APIENTRY glMultiTexCoord3dv (GLenum, const GLdouble *);
18012+GLAPI void APIENTRY glMultiTexCoord3f (GLenum, GLfloat, GLfloat, GLfloat);
18013+GLAPI void APIENTRY glMultiTexCoord3fv (GLenum, const GLfloat *);
18014+GLAPI void APIENTRY glMultiTexCoord3i (GLenum, GLint, GLint, GLint);
18015+GLAPI void APIENTRY glMultiTexCoord3iv (GLenum, const GLint *);
18016+GLAPI void APIENTRY glMultiTexCoord3s (GLenum, GLshort, GLshort, GLshort);
18017+GLAPI void APIENTRY glMultiTexCoord3sv (GLenum, const GLshort *);
18018+GLAPI void APIENTRY glMultiTexCoord4d (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
18019+GLAPI void APIENTRY glMultiTexCoord4dv (GLenum, const GLdouble *);
18020+GLAPI void APIENTRY glMultiTexCoord4f (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
18021+GLAPI void APIENTRY glMultiTexCoord4fv (GLenum, const GLfloat *);
18022+GLAPI void APIENTRY glMultiTexCoord4i (GLenum, GLint, GLint, GLint, GLint);
18023+GLAPI void APIENTRY glMultiTexCoord4iv (GLenum, const GLint *);
18024+GLAPI void APIENTRY glMultiTexCoord4s (GLenum, GLshort, GLshort, GLshort, GLshort);
18025+GLAPI void APIENTRY glMultiTexCoord4sv (GLenum, const GLshort *);
18026+GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *);
18027+GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *);
18028+GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *);
18029+GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *);
18030+GLAPI void APIENTRY glSampleCoverage (GLclampf, GLboolean);
18031+GLAPI void APIENTRY glCompressedTexImage3D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
18032+GLAPI void APIENTRY glCompressedTexImage2D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
18033+GLAPI void APIENTRY glCompressedTexImage1D (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
18034+GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
18035+GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
18036+GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
18037+GLAPI void APIENTRY glGetCompressedTexImage (GLenum, GLint, GLvoid *);
18038+#endif /* GL_GLEXT_PROTOTYPES */
18039+typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
18040+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
18041+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
18042+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
18043+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
18044+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
18045+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
18046+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
18047+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
18048+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
18049+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
18050+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
18051+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
18052+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
18053+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
18054+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
18055+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
18056+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
18057+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
18058+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
18059+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
18060+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
18061+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
18062+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
18063+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
18064+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
18065+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
18066+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
18067+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
18068+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
18069+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
18070+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
18071+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
18072+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
18073+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
18074+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
18075+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
18076+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
18077+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
18078+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
18079+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
18080+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
18081+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);
18082+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
18083+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
18084+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img);
18085+#endif
18086+
18087+#ifndef GL_VERSION_1_4
18088+#define GL_VERSION_1_4 1
18089+#ifdef GL_GLEXT_PROTOTYPES
18090+GLAPI void APIENTRY glBlendFuncSeparate (GLenum, GLenum, GLenum, GLenum);
18091+GLAPI void APIENTRY glFogCoordf (GLfloat);
18092+GLAPI void APIENTRY glFogCoordfv (const GLfloat *);
18093+GLAPI void APIENTRY glFogCoordd (GLdouble);
18094+GLAPI void APIENTRY glFogCoorddv (const GLdouble *);
18095+GLAPI void APIENTRY glFogCoordPointer (GLenum, GLsizei, const GLvoid *);
18096+GLAPI void APIENTRY glMultiDrawArrays (GLenum, GLint *, GLsizei *, GLsizei);
18097+GLAPI void APIENTRY glMultiDrawElements (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
18098+GLAPI void APIENTRY glPointParameterf (GLenum, GLfloat);
18099+GLAPI void APIENTRY glPointParameterfv (GLenum, const GLfloat *);
18100+GLAPI void APIENTRY glPointParameteri (GLenum, GLint);
18101+GLAPI void APIENTRY glPointParameteriv (GLenum, const GLint *);
18102+GLAPI void APIENTRY glSecondaryColor3b (GLbyte, GLbyte, GLbyte);
18103+GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *);
18104+GLAPI void APIENTRY glSecondaryColor3d (GLdouble, GLdouble, GLdouble);
18105+GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *);
18106+GLAPI void APIENTRY glSecondaryColor3f (GLfloat, GLfloat, GLfloat);
18107+GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *);
18108+GLAPI void APIENTRY glSecondaryColor3i (GLint, GLint, GLint);
18109+GLAPI void APIENTRY glSecondaryColor3iv (const GLint *);
18110+GLAPI void APIENTRY glSecondaryColor3s (GLshort, GLshort, GLshort);
18111+GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *);
18112+GLAPI void APIENTRY glSecondaryColor3ub (GLubyte, GLubyte, GLubyte);
18113+GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *);
18114+GLAPI void APIENTRY glSecondaryColor3ui (GLuint, GLuint, GLuint);
18115+GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *);
18116+GLAPI void APIENTRY glSecondaryColor3us (GLushort, GLushort, GLushort);
18117+GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *);
18118+GLAPI void APIENTRY glSecondaryColorPointer (GLint, GLenum, GLsizei, const GLvoid *);
18119+GLAPI void APIENTRY glWindowPos2d (GLdouble, GLdouble);
18120+GLAPI void APIENTRY glWindowPos2dv (const GLdouble *);
18121+GLAPI void APIENTRY glWindowPos2f (GLfloat, GLfloat);
18122+GLAPI void APIENTRY glWindowPos2fv (const GLfloat *);
18123+GLAPI void APIENTRY glWindowPos2i (GLint, GLint);
18124+GLAPI void APIENTRY glWindowPos2iv (const GLint *);
18125+GLAPI void APIENTRY glWindowPos2s (GLshort, GLshort);
18126+GLAPI void APIENTRY glWindowPos2sv (const GLshort *);
18127+GLAPI void APIENTRY glWindowPos3d (GLdouble, GLdouble, GLdouble);
18128+GLAPI void APIENTRY glWindowPos3dv (const GLdouble *);
18129+GLAPI void APIENTRY glWindowPos3f (GLfloat, GLfloat, GLfloat);
18130+GLAPI void APIENTRY glWindowPos3fv (const GLfloat *);
18131+GLAPI void APIENTRY glWindowPos3i (GLint, GLint, GLint);
18132+GLAPI void APIENTRY glWindowPos3iv (const GLint *);
18133+GLAPI void APIENTRY glWindowPos3s (GLshort, GLshort, GLshort);
18134+GLAPI void APIENTRY glWindowPos3sv (const GLshort *);
18135+#endif /* GL_GLEXT_PROTOTYPES */
18136+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
18137+typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord);
18138+typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord);
18139+typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord);
18140+typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord);
18141+typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
18142+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
18143+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
18144+typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);
18145+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params);
18146+typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param);
18147+typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params);
18148+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue);
18149+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v);
18150+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue);
18151+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v);
18152+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue);
18153+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v);
18154+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue);
18155+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v);
18156+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue);
18157+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v);
18158+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue);
18159+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v);
18160+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue);
18161+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v);
18162+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue);
18163+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v);
18164+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
18165+typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y);
18166+typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v);
18167+typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y);
18168+typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v);
18169+typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y);
18170+typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v);
18171+typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y);
18172+typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v);
18173+typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z);
18174+typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v);
18175+typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z);
18176+typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v);
18177+typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z);
18178+typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v);
18179+typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z);
18180+typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v);
18181+#endif
18182+
18183+#ifndef GL_VERSION_1_5
18184+#define GL_VERSION_1_5 1
18185+#ifdef GL_GLEXT_PROTOTYPES
18186+GLAPI void APIENTRY glGenQueries (GLsizei, GLuint *);
18187+GLAPI void APIENTRY glDeleteQueries (GLsizei, const GLuint *);
18188+GLAPI GLboolean APIENTRY glIsQuery (GLuint);
18189+GLAPI void APIENTRY glBeginQuery (GLenum, GLuint);
18190+GLAPI void APIENTRY glEndQuery (GLenum);
18191+GLAPI void APIENTRY glGetQueryiv (GLenum, GLenum, GLint *);
18192+GLAPI void APIENTRY glGetQueryObjectiv (GLuint, GLenum, GLint *);
18193+GLAPI void APIENTRY glGetQueryObjectuiv (GLuint, GLenum, GLuint *);
18194+GLAPI void APIENTRY glBindBuffer (GLenum, GLuint);
18195+GLAPI void APIENTRY glDeleteBuffers (GLsizei, const GLuint *);
18196+GLAPI void APIENTRY glGenBuffers (GLsizei, GLuint *);
18197+GLAPI GLboolean APIENTRY glIsBuffer (GLuint);
18198+GLAPI void APIENTRY glBufferData (GLenum, GLsizeiptr, const GLvoid *, GLenum);
18199+GLAPI void APIENTRY glBufferSubData (GLenum, GLintptr, GLsizeiptr, const GLvoid *);
18200+GLAPI void APIENTRY glGetBufferSubData (GLenum, GLintptr, GLsizeiptr, GLvoid *);
18201+GLAPI GLvoid* APIENTRY glMapBuffer (GLenum, GLenum);
18202+GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum);
18203+GLAPI void APIENTRY glGetBufferParameteriv (GLenum, GLenum, GLint *);
18204+GLAPI void APIENTRY glGetBufferPointerv (GLenum, GLenum, GLvoid* *);
18205+#endif /* GL_GLEXT_PROTOTYPES */
18206+typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids);
18207+typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids);
18208+typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id);
18209+typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);
18210+typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target);
18211+typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params);
18212+typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params);
18213+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params);
18214+typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
18215+typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
18216+typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
18217+typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);
18218+typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
18219+typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
18220+typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data);
18221+typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
18222+typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target);
18223+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18224+typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params);
18225+#endif
18226+
18227+#ifndef GL_VERSION_2_0
18228+#define GL_VERSION_2_0 1
18229+#ifdef GL_GLEXT_PROTOTYPES
18230+GLAPI void APIENTRY glBlendEquationSeparate (GLenum, GLenum);
18231+GLAPI void APIENTRY glDrawBuffers (GLsizei, const GLenum *);
18232+GLAPI void APIENTRY glStencilOpSeparate (GLenum, GLenum, GLenum, GLenum);
18233+GLAPI void APIENTRY glStencilFuncSeparate (GLenum, GLenum, GLint, GLuint);
18234+GLAPI void APIENTRY glStencilMaskSeparate (GLenum, GLuint);
18235+GLAPI void APIENTRY glAttachShader (GLuint, GLuint);
18236+GLAPI void APIENTRY glBindAttribLocation (GLuint, GLuint, const GLchar *);
18237+GLAPI void APIENTRY glCompileShader (GLuint);
18238+GLAPI GLuint APIENTRY glCreateProgram (void);
18239+GLAPI GLuint APIENTRY glCreateShader (GLenum);
18240+GLAPI void APIENTRY glDeleteProgram (GLuint);
18241+GLAPI void APIENTRY glDeleteShader (GLuint);
18242+GLAPI void APIENTRY glDetachShader (GLuint, GLuint);
18243+GLAPI void APIENTRY glDisableVertexAttribArray (GLuint);
18244+GLAPI void APIENTRY glEnableVertexAttribArray (GLuint);
18245+GLAPI void APIENTRY glGetActiveAttrib (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
18246+GLAPI void APIENTRY glGetActiveUniform (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
18247+GLAPI void APIENTRY glGetAttachedShaders (GLuint, GLsizei, GLsizei *, GLuint *);
18248+GLAPI GLint APIENTRY glGetAttribLocation (GLuint, const GLchar *);
18249+GLAPI void APIENTRY glGetProgramiv (GLuint, GLenum, GLint *);
18250+GLAPI void APIENTRY glGetProgramInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
18251+GLAPI void APIENTRY glGetShaderiv (GLuint, GLenum, GLint *);
18252+GLAPI void APIENTRY glGetShaderInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
18253+GLAPI void APIENTRY glGetShaderSource (GLuint, GLsizei, GLsizei *, GLchar *);
18254+GLAPI GLint APIENTRY glGetUniformLocation (GLuint, const GLchar *);
18255+GLAPI void APIENTRY glGetUniformfv (GLuint, GLint, GLfloat *);
18256+GLAPI void APIENTRY glGetUniformiv (GLuint, GLint, GLint *);
18257+GLAPI void APIENTRY glGetVertexAttribdv (GLuint, GLenum, GLdouble *);
18258+GLAPI void APIENTRY glGetVertexAttribfv (GLuint, GLenum, GLfloat *);
18259+GLAPI void APIENTRY glGetVertexAttribiv (GLuint, GLenum, GLint *);
18260+GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint, GLenum, GLvoid* *);
18261+GLAPI GLboolean APIENTRY glIsProgram (GLuint);
18262+GLAPI GLboolean APIENTRY glIsShader (GLuint);
18263+GLAPI void APIENTRY glLinkProgram (GLuint);
18264+GLAPI void APIENTRY glShaderSource (GLuint, GLsizei, const GLchar* *, const GLint *);
18265+GLAPI void APIENTRY glUseProgram (GLuint);
18266+GLAPI void APIENTRY glUniform1f (GLint, GLfloat);
18267+GLAPI void APIENTRY glUniform2f (GLint, GLfloat, GLfloat);
18268+GLAPI void APIENTRY glUniform3f (GLint, GLfloat, GLfloat, GLfloat);
18269+GLAPI void APIENTRY glUniform4f (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
18270+GLAPI void APIENTRY glUniform1i (GLint, GLint);
18271+GLAPI void APIENTRY glUniform2i (GLint, GLint, GLint);
18272+GLAPI void APIENTRY glUniform3i (GLint, GLint, GLint, GLint);
18273+GLAPI void APIENTRY glUniform4i (GLint, GLint, GLint, GLint, GLint);
18274+GLAPI void APIENTRY glUniform1fv (GLint, GLsizei, const GLfloat *);
18275+GLAPI void APIENTRY glUniform2fv (GLint, GLsizei, const GLfloat *);
18276+GLAPI void APIENTRY glUniform3fv (GLint, GLsizei, const GLfloat *);
18277+GLAPI void APIENTRY glUniform4fv (GLint, GLsizei, const GLfloat *);
18278+GLAPI void APIENTRY glUniform1iv (GLint, GLsizei, const GLint *);
18279+GLAPI void APIENTRY glUniform2iv (GLint, GLsizei, const GLint *);
18280+GLAPI void APIENTRY glUniform3iv (GLint, GLsizei, const GLint *);
18281+GLAPI void APIENTRY glUniform4iv (GLint, GLsizei, const GLint *);
18282+GLAPI void APIENTRY glUniformMatrix2fv (GLint, GLsizei, GLboolean, const GLfloat *);
18283+GLAPI void APIENTRY glUniformMatrix3fv (GLint, GLsizei, GLboolean, const GLfloat *);
18284+GLAPI void APIENTRY glUniformMatrix4fv (GLint, GLsizei, GLboolean, const GLfloat *);
18285+GLAPI void APIENTRY glValidateProgram (GLuint);
18286+GLAPI void APIENTRY glVertexAttrib1d (GLuint, GLdouble);
18287+GLAPI void APIENTRY glVertexAttrib1dv (GLuint, const GLdouble *);
18288+GLAPI void APIENTRY glVertexAttrib1f (GLuint, GLfloat);
18289+GLAPI void APIENTRY glVertexAttrib1fv (GLuint, const GLfloat *);
18290+GLAPI void APIENTRY glVertexAttrib1s (GLuint, GLshort);
18291+GLAPI void APIENTRY glVertexAttrib1sv (GLuint, const GLshort *);
18292+GLAPI void APIENTRY glVertexAttrib2d (GLuint, GLdouble, GLdouble);
18293+GLAPI void APIENTRY glVertexAttrib2dv (GLuint, const GLdouble *);
18294+GLAPI void APIENTRY glVertexAttrib2f (GLuint, GLfloat, GLfloat);
18295+GLAPI void APIENTRY glVertexAttrib2fv (GLuint, const GLfloat *);
18296+GLAPI void APIENTRY glVertexAttrib2s (GLuint, GLshort, GLshort);
18297+GLAPI void APIENTRY glVertexAttrib2sv (GLuint, const GLshort *);
18298+GLAPI void APIENTRY glVertexAttrib3d (GLuint, GLdouble, GLdouble, GLdouble);
18299+GLAPI void APIENTRY glVertexAttrib3dv (GLuint, const GLdouble *);
18300+GLAPI void APIENTRY glVertexAttrib3f (GLuint, GLfloat, GLfloat, GLfloat);
18301+GLAPI void APIENTRY glVertexAttrib3fv (GLuint, const GLfloat *);
18302+GLAPI void APIENTRY glVertexAttrib3s (GLuint, GLshort, GLshort, GLshort);
18303+GLAPI void APIENTRY glVertexAttrib3sv (GLuint, const GLshort *);
18304+GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint, const GLbyte *);
18305+GLAPI void APIENTRY glVertexAttrib4Niv (GLuint, const GLint *);
18306+GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint, const GLshort *);
18307+GLAPI void APIENTRY glVertexAttrib4Nub (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
18308+GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint, const GLubyte *);
18309+GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint, const GLuint *);
18310+GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint, const GLushort *);
18311+GLAPI void APIENTRY glVertexAttrib4bv (GLuint, const GLbyte *);
18312+GLAPI void APIENTRY glVertexAttrib4d (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
18313+GLAPI void APIENTRY glVertexAttrib4dv (GLuint, const GLdouble *);
18314+GLAPI void APIENTRY glVertexAttrib4f (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
18315+GLAPI void APIENTRY glVertexAttrib4fv (GLuint, const GLfloat *);
18316+GLAPI void APIENTRY glVertexAttrib4iv (GLuint, const GLint *);
18317+GLAPI void APIENTRY glVertexAttrib4s (GLuint, GLshort, GLshort, GLshort, GLshort);
18318+GLAPI void APIENTRY glVertexAttrib4sv (GLuint, const GLshort *);
18319+GLAPI void APIENTRY glVertexAttrib4ubv (GLuint, const GLubyte *);
18320+GLAPI void APIENTRY glVertexAttrib4uiv (GLuint, const GLuint *);
18321+GLAPI void APIENTRY glVertexAttrib4usv (GLuint, const GLushort *);
18322+GLAPI void APIENTRY glVertexAttribPointer (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
18323+#endif /* GL_GLEXT_PROTOTYPES */
18324+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
18325+typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs);
18326+typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
18327+typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
18328+typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
18329+typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
18330+typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
18331+typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
18332+typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
18333+typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
18334+typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
18335+typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
18336+typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
18337+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
18338+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
18339+typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
18340+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
18341+typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj);
18342+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
18343+typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
18344+typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
18345+typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
18346+typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
18347+typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
18348+typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
18349+typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
18350+typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
18351+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params);
18352+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
18353+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
18354+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
18355+typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
18356+typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
18357+typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
18358+typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length);
18359+typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
18360+typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
18361+typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
18362+typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
18363+typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
18364+typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
18365+typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
18366+typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
18367+typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
18368+typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18369+typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18370+typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18371+typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18372+typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
18373+typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
18374+typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
18375+typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
18376+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18377+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18378+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18379+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
18380+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);
18381+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v);
18382+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
18383+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
18384+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);
18385+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v);
18386+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);
18387+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v);
18388+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
18389+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
18390+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);
18391+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v);
18392+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
18393+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v);
18394+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
18395+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
18396+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
18397+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v);
18398+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v);
18399+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v);
18400+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v);
18401+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
18402+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v);
18403+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v);
18404+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v);
18405+typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v);
18406+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
18407+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v);
18408+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
18409+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
18410+typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v);
18411+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
18412+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v);
18413+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v);
18414+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v);
18415+typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v);
18416+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
18417+#endif
18418+
18419+#ifndef GL_VERSION_2_1
18420+#define GL_VERSION_2_1 1
18421+#ifdef GL_GLEXT_PROTOTYPES
18422+GLAPI void APIENTRY glUniformMatrix2x3fv (GLint, GLsizei, GLboolean, const GLfloat *);
18423+GLAPI void APIENTRY glUniformMatrix3x2fv (GLint, GLsizei, GLboolean, const GLfloat *);
18424+GLAPI void APIENTRY glUniformMatrix2x4fv (GLint, GLsizei, GLboolean, const GLfloat *);
18425+GLAPI void APIENTRY glUniformMatrix4x2fv (GLint, GLsizei, GLboolean, const GLfloat *);
18426+GLAPI void APIENTRY glUniformMatrix3x4fv (GLint, GLsizei, GLboolean, const GLfloat *);
18427+GLAPI void APIENTRY glUniformMatrix4x3fv (GLint, GLsizei, GLboolean, const GLfloat *);
18428+#endif /* GL_GLEXT_PROTOTYPES */
18429+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18430+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18431+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18432+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18433+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18434+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18435+#endif
18436+
18437+#ifndef GL_ARB_multitexture
18438+#define GL_ARB_multitexture 1
18439+#ifdef GL_GLEXT_PROTOTYPES
18440+GLAPI void APIENTRY glActiveTextureARB (GLenum);
18441+GLAPI void APIENTRY glClientActiveTextureARB (GLenum);
18442+GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum, GLdouble);
18443+GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum, const GLdouble *);
18444+GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum, GLfloat);
18445+GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum, const GLfloat *);
18446+GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum, GLint);
18447+GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum, const GLint *);
18448+GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum, GLshort);
18449+GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum, const GLshort *);
18450+GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum, GLdouble, GLdouble);
18451+GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum, const GLdouble *);
18452+GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum, GLfloat, GLfloat);
18453+GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum, const GLfloat *);
18454+GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum, GLint, GLint);
18455+GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum, const GLint *);
18456+GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum, GLshort, GLshort);
18457+GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum, const GLshort *);
18458+GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum, GLdouble, GLdouble, GLdouble);
18459+GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum, const GLdouble *);
18460+GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum, GLfloat, GLfloat, GLfloat);
18461+GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum, const GLfloat *);
18462+GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum, GLint, GLint, GLint);
18463+GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum, const GLint *);
18464+GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum, GLshort, GLshort, GLshort);
18465+GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum, const GLshort *);
18466+GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
18467+GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum, const GLdouble *);
18468+GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
18469+GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum, const GLfloat *);
18470+GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum, GLint, GLint, GLint, GLint);
18471+GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum, const GLint *);
18472+GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum, GLshort, GLshort, GLshort, GLshort);
18473+GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum, const GLshort *);
18474+#endif /* GL_GLEXT_PROTOTYPES */
18475+typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
18476+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
18477+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
18478+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
18479+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
18480+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
18481+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
18482+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
18483+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
18484+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
18485+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
18486+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
18487+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
18488+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
18489+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
18490+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
18491+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
18492+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
18493+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
18494+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
18495+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
18496+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
18497+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
18498+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
18499+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
18500+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
18501+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
18502+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
18503+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
18504+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
18505+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
18506+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
18507+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
18508+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
18509+#endif
18510+
18511+#ifndef GL_ARB_transpose_matrix
18512+#define GL_ARB_transpose_matrix 1
18513+#ifdef GL_GLEXT_PROTOTYPES
18514+GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *);
18515+GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *);
18516+GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *);
18517+GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *);
18518+#endif /* GL_GLEXT_PROTOTYPES */
18519+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
18520+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
18521+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
18522+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
18523+#endif
18524+
18525+#ifndef GL_ARB_multisample
18526+#define GL_ARB_multisample 1
18527+#ifdef GL_GLEXT_PROTOTYPES
18528+GLAPI void APIENTRY glSampleCoverageARB (GLclampf, GLboolean);
18529+#endif /* GL_GLEXT_PROTOTYPES */
18530+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert);
18531+#endif
18532+
18533+#ifndef GL_ARB_texture_env_add
18534+#define GL_ARB_texture_env_add 1
18535+#endif
18536+
18537+#ifndef GL_ARB_texture_cube_map
18538+#define GL_ARB_texture_cube_map 1
18539+#endif
18540+
18541+#ifndef GL_ARB_texture_compression
18542+#define GL_ARB_texture_compression 1
18543+#ifdef GL_GLEXT_PROTOTYPES
18544+GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
18545+GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
18546+GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
18547+GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
18548+GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
18549+GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
18550+GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum, GLint, GLvoid *);
18551+#endif /* GL_GLEXT_PROTOTYPES */
18552+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
18553+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
18554+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
18555+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);
18556+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
18557+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
18558+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid *img);
18559+#endif
18560+
18561+#ifndef GL_ARB_texture_border_clamp
18562+#define GL_ARB_texture_border_clamp 1
18563+#endif
18564+
18565+#ifndef GL_ARB_point_parameters
18566+#define GL_ARB_point_parameters 1
18567+#ifdef GL_GLEXT_PROTOTYPES
18568+GLAPI void APIENTRY glPointParameterfARB (GLenum, GLfloat);
18569+GLAPI void APIENTRY glPointParameterfvARB (GLenum, const GLfloat *);
18570+#endif /* GL_GLEXT_PROTOTYPES */
18571+typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param);
18572+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params);
18573+#endif
18574+
18575+#ifndef GL_ARB_vertex_blend
18576+#define GL_ARB_vertex_blend 1
18577+#ifdef GL_GLEXT_PROTOTYPES
18578+GLAPI void APIENTRY glWeightbvARB (GLint, const GLbyte *);
18579+GLAPI void APIENTRY glWeightsvARB (GLint, const GLshort *);
18580+GLAPI void APIENTRY glWeightivARB (GLint, const GLint *);
18581+GLAPI void APIENTRY glWeightfvARB (GLint, const GLfloat *);
18582+GLAPI void APIENTRY glWeightdvARB (GLint, const GLdouble *);
18583+GLAPI void APIENTRY glWeightubvARB (GLint, const GLubyte *);
18584+GLAPI void APIENTRY glWeightusvARB (GLint, const GLushort *);
18585+GLAPI void APIENTRY glWeightuivARB (GLint, const GLuint *);
18586+GLAPI void APIENTRY glWeightPointerARB (GLint, GLenum, GLsizei, const GLvoid *);
18587+GLAPI void APIENTRY glVertexBlendARB (GLint);
18588+#endif /* GL_GLEXT_PROTOTYPES */
18589+typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights);
18590+typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights);
18591+typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights);
18592+typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights);
18593+typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights);
18594+typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights);
18595+typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights);
18596+typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights);
18597+typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
18598+typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count);
18599+#endif
18600+
18601+#ifndef GL_ARB_matrix_palette
18602+#define GL_ARB_matrix_palette 1
18603+#ifdef GL_GLEXT_PROTOTYPES
18604+GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint);
18605+GLAPI void APIENTRY glMatrixIndexubvARB (GLint, const GLubyte *);
18606+GLAPI void APIENTRY glMatrixIndexusvARB (GLint, const GLushort *);
18607+GLAPI void APIENTRY glMatrixIndexuivARB (GLint, const GLuint *);
18608+GLAPI void APIENTRY glMatrixIndexPointerARB (GLint, GLenum, GLsizei, const GLvoid *);
18609+#endif /* GL_GLEXT_PROTOTYPES */
18610+typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index);
18611+typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices);
18612+typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices);
18613+typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices);
18614+typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
18615+#endif
18616+
18617+#ifndef GL_ARB_texture_env_combine
18618+#define GL_ARB_texture_env_combine 1
18619+#endif
18620+
18621+#ifndef GL_ARB_texture_env_crossbar
18622+#define GL_ARB_texture_env_crossbar 1
18623+#endif
18624+
18625+#ifndef GL_ARB_texture_env_dot3
18626+#define GL_ARB_texture_env_dot3 1
18627+#endif
18628+
18629+#ifndef GL_ARB_texture_mirrored_repeat
18630+#define GL_ARB_texture_mirrored_repeat 1
18631+#endif
18632+
18633+#ifndef GL_ARB_depth_texture
18634+#define GL_ARB_depth_texture 1
18635+#endif
18636+
18637+#ifndef GL_ARB_shadow
18638+#define GL_ARB_shadow 1
18639+#endif
18640+
18641+#ifndef GL_ARB_shadow_ambient
18642+#define GL_ARB_shadow_ambient 1
18643+#endif
18644+
18645+#ifndef GL_ARB_window_pos
18646+#define GL_ARB_window_pos 1
18647+#ifdef GL_GLEXT_PROTOTYPES
18648+GLAPI void APIENTRY glWindowPos2dARB (GLdouble, GLdouble);
18649+GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *);
18650+GLAPI void APIENTRY glWindowPos2fARB (GLfloat, GLfloat);
18651+GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *);
18652+GLAPI void APIENTRY glWindowPos2iARB (GLint, GLint);
18653+GLAPI void APIENTRY glWindowPos2ivARB (const GLint *);
18654+GLAPI void APIENTRY glWindowPos2sARB (GLshort, GLshort);
18655+GLAPI void APIENTRY glWindowPos2svARB (const GLshort *);
18656+GLAPI void APIENTRY glWindowPos3dARB (GLdouble, GLdouble, GLdouble);
18657+GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *);
18658+GLAPI void APIENTRY glWindowPos3fARB (GLfloat, GLfloat, GLfloat);
18659+GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *);
18660+GLAPI void APIENTRY glWindowPos3iARB (GLint, GLint, GLint);
18661+GLAPI void APIENTRY glWindowPos3ivARB (const GLint *);
18662+GLAPI void APIENTRY glWindowPos3sARB (GLshort, GLshort, GLshort);
18663+GLAPI void APIENTRY glWindowPos3svARB (const GLshort *);
18664+#endif /* GL_GLEXT_PROTOTYPES */
18665+typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y);
18666+typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v);
18667+typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y);
18668+typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v);
18669+typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y);
18670+typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v);
18671+typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y);
18672+typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v);
18673+typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z);
18674+typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v);
18675+typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z);
18676+typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v);
18677+typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z);
18678+typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v);
18679+typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z);
18680+typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v);
18681+#endif
18682+
18683+#ifndef GL_ARB_vertex_program
18684+#define GL_ARB_vertex_program 1
18685+#ifdef GL_GLEXT_PROTOTYPES
18686+GLAPI void APIENTRY glVertexAttrib1dARB (GLuint, GLdouble);
18687+GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint, const GLdouble *);
18688+GLAPI void APIENTRY glVertexAttrib1fARB (GLuint, GLfloat);
18689+GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint, const GLfloat *);
18690+GLAPI void APIENTRY glVertexAttrib1sARB (GLuint, GLshort);
18691+GLAPI void APIENTRY glVertexAttrib1svARB (GLuint, const GLshort *);
18692+GLAPI void APIENTRY glVertexAttrib2dARB (GLuint, GLdouble, GLdouble);
18693+GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint, const GLdouble *);
18694+GLAPI void APIENTRY glVertexAttrib2fARB (GLuint, GLfloat, GLfloat);
18695+GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint, const GLfloat *);
18696+GLAPI void APIENTRY glVertexAttrib2sARB (GLuint, GLshort, GLshort);
18697+GLAPI void APIENTRY glVertexAttrib2svARB (GLuint, const GLshort *);
18698+GLAPI void APIENTRY glVertexAttrib3dARB (GLuint, GLdouble, GLdouble, GLdouble);
18699+GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint, const GLdouble *);
18700+GLAPI void APIENTRY glVertexAttrib3fARB (GLuint, GLfloat, GLfloat, GLfloat);
18701+GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint, const GLfloat *);
18702+GLAPI void APIENTRY glVertexAttrib3sARB (GLuint, GLshort, GLshort, GLshort);
18703+GLAPI void APIENTRY glVertexAttrib3svARB (GLuint, const GLshort *);
18704+GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint, const GLbyte *);
18705+GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint, const GLint *);
18706+GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint, const GLshort *);
18707+GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
18708+GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint, const GLubyte *);
18709+GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint, const GLuint *);
18710+GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint, const GLushort *);
18711+GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint, const GLbyte *);
18712+GLAPI void APIENTRY glVertexAttrib4dARB (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
18713+GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint, const GLdouble *);
18714+GLAPI void APIENTRY glVertexAttrib4fARB (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
18715+GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint, const GLfloat *);
18716+GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint, const GLint *);
18717+GLAPI void APIENTRY glVertexAttrib4sARB (GLuint, GLshort, GLshort, GLshort, GLshort);
18718+GLAPI void APIENTRY glVertexAttrib4svARB (GLuint, const GLshort *);
18719+GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint, const GLubyte *);
18720+GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint, const GLuint *);
18721+GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint, const GLushort *);
18722+GLAPI void APIENTRY glVertexAttribPointerARB (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
18723+GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint);
18724+GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint);
18725+GLAPI void APIENTRY glProgramStringARB (GLenum, GLenum, GLsizei, const GLvoid *);
18726+GLAPI void APIENTRY glBindProgramARB (GLenum, GLuint);
18727+GLAPI void APIENTRY glDeleteProgramsARB (GLsizei, const GLuint *);
18728+GLAPI void APIENTRY glGenProgramsARB (GLsizei, GLuint *);
18729+GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
18730+GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum, GLuint, const GLdouble *);
18731+GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
18732+GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum, GLuint, const GLfloat *);
18733+GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
18734+GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum, GLuint, const GLdouble *);
18735+GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
18736+GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum, GLuint, const GLfloat *);
18737+GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum, GLuint, GLdouble *);
18738+GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum, GLuint, GLfloat *);
18739+GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum, GLuint, GLdouble *);
18740+GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum, GLuint, GLfloat *);
18741+GLAPI void APIENTRY glGetProgramivARB (GLenum, GLenum, GLint *);
18742+GLAPI void APIENTRY glGetProgramStringARB (GLenum, GLenum, GLvoid *);
18743+GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint, GLenum, GLdouble *);
18744+GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint, GLenum, GLfloat *);
18745+GLAPI void APIENTRY glGetVertexAttribivARB (GLuint, GLenum, GLint *);
18746+GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint, GLenum, GLvoid* *);
18747+GLAPI GLboolean APIENTRY glIsProgramARB (GLuint);
18748+#endif /* GL_GLEXT_PROTOTYPES */
18749+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x);
18750+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v);
18751+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);
18752+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v);
18753+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x);
18754+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v);
18755+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y);
18756+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v);
18757+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);
18758+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v);
18759+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y);
18760+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v);
18761+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
18762+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v);
18763+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
18764+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v);
18765+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
18766+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v);
18767+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v);
18768+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v);
18769+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v);
18770+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
18771+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v);
18772+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v);
18773+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v);
18774+typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v);
18775+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
18776+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v);
18777+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
18778+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v);
18779+typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v);
18780+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
18781+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v);
18782+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v);
18783+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v);
18784+typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v);
18785+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
18786+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
18787+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
18788+typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string);
18789+typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program);
18790+typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs);
18791+typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs);
18792+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
18793+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
18794+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
18795+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
18796+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
18797+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
18798+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
18799+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
18800+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
18801+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
18802+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
18803+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
18804+typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);
18805+typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string);
18806+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params);
18807+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params);
18808+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params);
18809+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
18810+typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program);
18811+#endif
18812+
18813+#ifndef GL_ARB_fragment_program
18814+#define GL_ARB_fragment_program 1
18815+/* All ARB_fragment_program entry points are shared with ARB_vertex_program. */
18816+#endif
18817+
18818+#ifndef GL_ARB_vertex_buffer_object
18819+#define GL_ARB_vertex_buffer_object 1
18820+#ifdef GL_GLEXT_PROTOTYPES
18821+GLAPI void APIENTRY glBindBufferARB (GLenum, GLuint);
18822+GLAPI void APIENTRY glDeleteBuffersARB (GLsizei, const GLuint *);
18823+GLAPI void APIENTRY glGenBuffersARB (GLsizei, GLuint *);
18824+GLAPI GLboolean APIENTRY glIsBufferARB (GLuint);
18825+GLAPI void APIENTRY glBufferDataARB (GLenum, GLsizeiptrARB, const GLvoid *, GLenum);
18826+GLAPI void APIENTRY glBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *);
18827+GLAPI void APIENTRY glGetBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *);
18828+GLAPI GLvoid* APIENTRY glMapBufferARB (GLenum, GLenum);
18829+GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum);
18830+GLAPI void APIENTRY glGetBufferParameterivARB (GLenum, GLenum, GLint *);
18831+GLAPI void APIENTRY glGetBufferPointervARB (GLenum, GLenum, GLvoid* *);
18832+#endif /* GL_GLEXT_PROTOTYPES */
18833+typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
18834+typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers);
18835+typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers);
18836+typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer);
18837+typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage);
18838+typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data);
18839+typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data);
18840+typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);
18841+typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target);
18842+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params);
18843+typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params);
18844+#endif
18845+
18846+#ifndef GL_ARB_occlusion_query
18847+#define GL_ARB_occlusion_query 1
18848+#ifdef GL_GLEXT_PROTOTYPES
18849+GLAPI void APIENTRY glGenQueriesARB (GLsizei, GLuint *);
18850+GLAPI void APIENTRY glDeleteQueriesARB (GLsizei, const GLuint *);
18851+GLAPI GLboolean APIENTRY glIsQueryARB (GLuint);
18852+GLAPI void APIENTRY glBeginQueryARB (GLenum, GLuint);
18853+GLAPI void APIENTRY glEndQueryARB (GLenum);
18854+GLAPI void APIENTRY glGetQueryivARB (GLenum, GLenum, GLint *);
18855+GLAPI void APIENTRY glGetQueryObjectivARB (GLuint, GLenum, GLint *);
18856+GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint, GLenum, GLuint *);
18857+#endif /* GL_GLEXT_PROTOTYPES */
18858+typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids);
18859+typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids);
18860+typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id);
18861+typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id);
18862+typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target);
18863+typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params);
18864+typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params);
18865+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params);
18866+#endif
18867+
18868+#ifndef GL_ARB_shader_objects
18869+#define GL_ARB_shader_objects 1
18870+#ifdef GL_GLEXT_PROTOTYPES
18871+GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB);
18872+GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum);
18873+GLAPI void APIENTRY glDetachObjectARB (GLhandleARB, GLhandleARB);
18874+GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum);
18875+GLAPI void APIENTRY glShaderSourceARB (GLhandleARB, GLsizei, const GLcharARB* *, const GLint *);
18876+GLAPI void APIENTRY glCompileShaderARB (GLhandleARB);
18877+GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void);
18878+GLAPI void APIENTRY glAttachObjectARB (GLhandleARB, GLhandleARB);
18879+GLAPI void APIENTRY glLinkProgramARB (GLhandleARB);
18880+GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB);
18881+GLAPI void APIENTRY glValidateProgramARB (GLhandleARB);
18882+GLAPI void APIENTRY glUniform1fARB (GLint, GLfloat);
18883+GLAPI void APIENTRY glUniform2fARB (GLint, GLfloat, GLfloat);
18884+GLAPI void APIENTRY glUniform3fARB (GLint, GLfloat, GLfloat, GLfloat);
18885+GLAPI void APIENTRY glUniform4fARB (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
18886+GLAPI void APIENTRY glUniform1iARB (GLint, GLint);
18887+GLAPI void APIENTRY glUniform2iARB (GLint, GLint, GLint);
18888+GLAPI void APIENTRY glUniform3iARB (GLint, GLint, GLint, GLint);
18889+GLAPI void APIENTRY glUniform4iARB (GLint, GLint, GLint, GLint, GLint);
18890+GLAPI void APIENTRY glUniform1fvARB (GLint, GLsizei, const GLfloat *);
18891+GLAPI void APIENTRY glUniform2fvARB (GLint, GLsizei, const GLfloat *);
18892+GLAPI void APIENTRY glUniform3fvARB (GLint, GLsizei, const GLfloat *);
18893+GLAPI void APIENTRY glUniform4fvARB (GLint, GLsizei, const GLfloat *);
18894+GLAPI void APIENTRY glUniform1ivARB (GLint, GLsizei, const GLint *);
18895+GLAPI void APIENTRY glUniform2ivARB (GLint, GLsizei, const GLint *);
18896+GLAPI void APIENTRY glUniform3ivARB (GLint, GLsizei, const GLint *);
18897+GLAPI void APIENTRY glUniform4ivARB (GLint, GLsizei, const GLint *);
18898+GLAPI void APIENTRY glUniformMatrix2fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
18899+GLAPI void APIENTRY glUniformMatrix3fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
18900+GLAPI void APIENTRY glUniformMatrix4fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
18901+GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB, GLenum, GLfloat *);
18902+GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB, GLenum, GLint *);
18903+GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
18904+GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB, GLsizei, GLsizei *, GLhandleARB *);
18905+GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB, const GLcharARB *);
18906+GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
18907+GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB, GLint, GLfloat *);
18908+GLAPI void APIENTRY glGetUniformivARB (GLhandleARB, GLint, GLint *);
18909+GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
18910+#endif /* GL_GLEXT_PROTOTYPES */
18911+typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj);
18912+typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname);
18913+typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj);
18914+typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType);
18915+typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length);
18916+typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj);
18917+typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void);
18918+typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj);
18919+typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj);
18920+typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj);
18921+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj);
18922+typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0);
18923+typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1);
18924+typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
18925+typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
18926+typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0);
18927+typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1);
18928+typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2);
18929+typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
18930+typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
18931+typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
18932+typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
18933+typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
18934+typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value);
18935+typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value);
18936+typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value);
18937+typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value);
18938+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18939+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18940+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18941+typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params);
18942+typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params);
18943+typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
18944+typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
18945+typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
18946+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
18947+typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params);
18948+typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params);
18949+typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
18950+#endif
18951+
18952+#ifndef GL_ARB_vertex_shader
18953+#define GL_ARB_vertex_shader 1
18954+#ifdef GL_GLEXT_PROTOTYPES
18955+GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB, GLuint, const GLcharARB *);
18956+GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
18957+GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB, const GLcharARB *);
18958+#endif /* GL_GLEXT_PROTOTYPES */
18959+typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name);
18960+typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
18961+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
18962+#endif
18963+
18964+#ifndef GL_ARB_fragment_shader
18965+#define GL_ARB_fragment_shader 1
18966+#endif
18967+
18968+#ifndef GL_ARB_shading_language_100
18969+#define GL_ARB_shading_language_100 1
18970+#endif
18971+
18972+#ifndef GL_ARB_texture_non_power_of_two
18973+#define GL_ARB_texture_non_power_of_two 1
18974+#endif
18975+
18976+#ifndef GL_ARB_point_sprite
18977+#define GL_ARB_point_sprite 1
18978+#endif
18979+
18980+#ifndef GL_ARB_fragment_program_shadow
18981+#define GL_ARB_fragment_program_shadow 1
18982+#endif
18983+
18984+#ifndef GL_ARB_draw_buffers
18985+#define GL_ARB_draw_buffers 1
18986+#ifdef GL_GLEXT_PROTOTYPES
18987+GLAPI void APIENTRY glDrawBuffersARB (GLsizei, const GLenum *);
18988+#endif /* GL_GLEXT_PROTOTYPES */
18989+typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs);
18990+#endif
18991+
18992+#ifndef GL_ARB_texture_rectangle
18993+#define GL_ARB_texture_rectangle 1
18994+#endif
18995+
18996+#ifndef GL_ARB_color_buffer_float
18997+#define GL_ARB_color_buffer_float 1
18998+#ifdef GL_GLEXT_PROTOTYPES
18999+GLAPI void APIENTRY glClampColorARB (GLenum, GLenum);
19000+#endif /* GL_GLEXT_PROTOTYPES */
19001+typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);
19002+#endif
19003+
19004+#ifndef GL_ARB_half_float_pixel
19005+#define GL_ARB_half_float_pixel 1
19006+#endif
19007+
19008+#ifndef GL_ARB_texture_float
19009+#define GL_ARB_texture_float 1
19010+#endif
19011+
19012+#ifndef GL_ARB_pixel_buffer_object
19013+#define GL_ARB_pixel_buffer_object 1
19014+#endif
19015+
19016+#ifndef GL_EXT_abgr
19017+#define GL_EXT_abgr 1
19018+#endif
19019+
19020+#ifndef GL_EXT_blend_color
19021+#define GL_EXT_blend_color 1
19022+#ifdef GL_GLEXT_PROTOTYPES
19023+GLAPI void APIENTRY glBlendColorEXT (GLclampf, GLclampf, GLclampf, GLclampf);
19024+#endif /* GL_GLEXT_PROTOTYPES */
19025+typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
19026+#endif
19027+
19028+#ifndef GL_EXT_polygon_offset
19029+#define GL_EXT_polygon_offset 1
19030+#ifdef GL_GLEXT_PROTOTYPES
19031+GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat, GLfloat);
19032+#endif /* GL_GLEXT_PROTOTYPES */
19033+typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias);
19034+#endif
19035+
19036+#ifndef GL_EXT_texture
19037+#define GL_EXT_texture 1
19038+#endif
19039+
19040+#ifndef GL_EXT_texture3D
19041+#define GL_EXT_texture3D 1
19042+#ifdef GL_GLEXT_PROTOTYPES
19043+GLAPI void APIENTRY glTexImage3DEXT (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
19044+GLAPI void APIENTRY glTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19045+#endif /* GL_GLEXT_PROTOTYPES */
19046+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);
19047+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);
19048+#endif
19049+
19050+#ifndef GL_SGIS_texture_filter4
19051+#define GL_SGIS_texture_filter4 1
19052+#ifdef GL_GLEXT_PROTOTYPES
19053+GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum, GLenum, GLfloat *);
19054+GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum, GLenum, GLsizei, const GLfloat *);
19055+#endif /* GL_GLEXT_PROTOTYPES */
19056+typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights);
19057+typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);
19058+#endif
19059+
19060+#ifndef GL_EXT_subtexture
19061+#define GL_EXT_subtexture 1
19062+#ifdef GL_GLEXT_PROTOTYPES
19063+GLAPI void APIENTRY glTexSubImage1DEXT (GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *);
19064+GLAPI void APIENTRY glTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19065+#endif /* GL_GLEXT_PROTOTYPES */
19066+typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
19067+typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
19068+#endif
19069+
19070+#ifndef GL_EXT_copy_texture
19071+#define GL_EXT_copy_texture 1
19072+#ifdef GL_GLEXT_PROTOTYPES
19073+GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint);
19074+GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint);
19075+GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei);
19076+GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
19077+GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
19078+#endif /* GL_GLEXT_PROTOTYPES */
19079+typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
19080+typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
19081+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
19082+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
19083+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
19084+#endif
19085+
19086+#ifndef GL_EXT_histogram
19087+#define GL_EXT_histogram 1
19088+#ifdef GL_GLEXT_PROTOTYPES
19089+GLAPI void APIENTRY glGetHistogramEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
19090+GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum, GLenum, GLfloat *);
19091+GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum, GLenum, GLint *);
19092+GLAPI void APIENTRY glGetMinmaxEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
19093+GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum, GLenum, GLfloat *);
19094+GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum, GLenum, GLint *);
19095+GLAPI void APIENTRY glHistogramEXT (GLenum, GLsizei, GLenum, GLboolean);
19096+GLAPI void APIENTRY glMinmaxEXT (GLenum, GLenum, GLboolean);
19097+GLAPI void APIENTRY glResetHistogramEXT (GLenum);
19098+GLAPI void APIENTRY glResetMinmaxEXT (GLenum);
19099+#endif /* GL_GLEXT_PROTOTYPES */
19100+typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
19101+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19102+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19103+typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
19104+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19105+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19106+typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
19107+typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink);
19108+typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target);
19109+typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target);
19110+#endif
19111+
19112+#ifndef GL_EXT_convolution
19113+#define GL_EXT_convolution 1
19114+#ifdef GL_GLEXT_PROTOTYPES
19115+GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
19116+GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19117+GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum, GLenum, GLfloat);
19118+GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum, GLenum, const GLfloat *);
19119+GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum, GLenum, GLint);
19120+GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum, GLenum, const GLint *);
19121+GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum, GLenum, GLint, GLint, GLsizei);
19122+GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
19123+GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum, GLenum, GLenum, GLvoid *);
19124+GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum, GLenum, GLfloat *);
19125+GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum, GLenum, GLint *);
19126+GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
19127+GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
19128+#endif /* GL_GLEXT_PROTOTYPES */
19129+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
19130+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
19131+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params);
19132+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
19133+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params);
19134+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
19135+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
19136+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
19137+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
19138+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19139+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19140+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
19141+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
19142+#endif
19143+
19144+#ifndef GL_SGI_color_matrix
19145+#define GL_SGI_color_matrix 1
19146+#endif
19147+
19148+#ifndef GL_SGI_color_table
19149+#define GL_SGI_color_table 1
19150+#ifdef GL_GLEXT_PROTOTYPES
19151+GLAPI void APIENTRY glColorTableSGI (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
19152+GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum, GLenum, const GLfloat *);
19153+GLAPI void APIENTRY glColorTableParameterivSGI (GLenum, GLenum, const GLint *);
19154+GLAPI void APIENTRY glCopyColorTableSGI (GLenum, GLenum, GLint, GLint, GLsizei);
19155+GLAPI void APIENTRY glGetColorTableSGI (GLenum, GLenum, GLenum, GLvoid *);
19156+GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum, GLenum, GLfloat *);
19157+GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum, GLenum, GLint *);
19158+#endif /* GL_GLEXT_PROTOTYPES */
19159+typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
19160+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params);
19161+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params);
19162+typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
19163+typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
19164+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params);
19165+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params);
19166+#endif
19167+
19168+#ifndef GL_SGIX_pixel_texture
19169+#define GL_SGIX_pixel_texture 1
19170+#ifdef GL_GLEXT_PROTOTYPES
19171+GLAPI void APIENTRY glPixelTexGenSGIX (GLenum);
19172+#endif /* GL_GLEXT_PROTOTYPES */
19173+typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode);
19174+#endif
19175+
19176+#ifndef GL_SGIS_pixel_texture
19177+#define GL_SGIS_pixel_texture 1
19178+#ifdef GL_GLEXT_PROTOTYPES
19179+GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum, GLint);
19180+GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum, const GLint *);
19181+GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum, GLfloat);
19182+GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum, const GLfloat *);
19183+GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum, GLint *);
19184+GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum, GLfloat *);
19185+#endif /* GL_GLEXT_PROTOTYPES */
19186+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param);
19187+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params);
19188+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
19189+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
19190+typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params);
19191+typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params);
19192+#endif
19193+
19194+#ifndef GL_SGIS_texture4D
19195+#define GL_SGIS_texture4D 1
19196+#ifdef GL_GLEXT_PROTOTYPES
19197+GLAPI void APIENTRY glTexImage4DSGIS (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
19198+GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19199+#endif /* GL_GLEXT_PROTOTYPES */
19200+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);
19201+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);
19202+#endif
19203+
19204+#ifndef GL_SGI_texture_color_table
19205+#define GL_SGI_texture_color_table 1
19206+#endif
19207+
19208+#ifndef GL_EXT_cmyka
19209+#define GL_EXT_cmyka 1
19210+#endif
19211+
19212+#ifndef GL_EXT_texture_object
19213+#define GL_EXT_texture_object 1
19214+#ifdef GL_GLEXT_PROTOTYPES
19215+GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei, const GLuint *, GLboolean *);
19216+GLAPI void APIENTRY glBindTextureEXT (GLenum, GLuint);
19217+GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei, const GLuint *);
19218+GLAPI void APIENTRY glGenTexturesEXT (GLsizei, GLuint *);
19219+GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint);
19220+GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei, const GLuint *, const GLclampf *);
19221+#endif /* GL_GLEXT_PROTOTYPES */
19222+typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences);
19223+typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture);
19224+typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures);
19225+typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures);
19226+typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture);
19227+typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities);
19228+#endif
19229+
19230+#ifndef GL_SGIS_detail_texture
19231+#define GL_SGIS_detail_texture 1
19232+#ifdef GL_GLEXT_PROTOTYPES
19233+GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum, GLsizei, const GLfloat *);
19234+GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum, GLfloat *);
19235+#endif /* GL_GLEXT_PROTOTYPES */
19236+typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
19237+typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
19238+#endif
19239+
19240+#ifndef GL_SGIS_sharpen_texture
19241+#define GL_SGIS_sharpen_texture 1
19242+#ifdef GL_GLEXT_PROTOTYPES
19243+GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum, GLsizei, const GLfloat *);
19244+GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum, GLfloat *);
19245+#endif /* GL_GLEXT_PROTOTYPES */
19246+typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
19247+typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
19248+#endif
19249+
19250+#ifndef GL_EXT_packed_pixels
19251+#define GL_EXT_packed_pixels 1
19252+#endif
19253+
19254+#ifndef GL_SGIS_texture_lod
19255+#define GL_SGIS_texture_lod 1
19256+#endif
19257+
19258+#ifndef GL_SGIS_multisample
19259+#define GL_SGIS_multisample 1
19260+#ifdef GL_GLEXT_PROTOTYPES
19261+GLAPI void APIENTRY glSampleMaskSGIS (GLclampf, GLboolean);
19262+GLAPI void APIENTRY glSamplePatternSGIS (GLenum);
19263+#endif /* GL_GLEXT_PROTOTYPES */
19264+typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert);
19265+typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern);
19266+#endif
19267+
19268+#ifndef GL_EXT_rescale_normal
19269+#define GL_EXT_rescale_normal 1
19270+#endif
19271+
19272+#ifndef GL_EXT_vertex_array
19273+#define GL_EXT_vertex_array 1
19274+#ifdef GL_GLEXT_PROTOTYPES
19275+GLAPI void APIENTRY glArrayElementEXT (GLint);
19276+GLAPI void APIENTRY glColorPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
19277+GLAPI void APIENTRY glDrawArraysEXT (GLenum, GLint, GLsizei);
19278+GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei, GLsizei, const GLboolean *);
19279+GLAPI void APIENTRY glGetPointervEXT (GLenum, GLvoid* *);
19280+GLAPI void APIENTRY glIndexPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *);
19281+GLAPI void APIENTRY glNormalPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *);
19282+GLAPI void APIENTRY glTexCoordPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
19283+GLAPI void APIENTRY glVertexPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
19284+#endif /* GL_GLEXT_PROTOTYPES */
19285+typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i);
19286+typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19287+typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);
19288+typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer);
19289+typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params);
19290+typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19291+typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19292+typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19293+typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19294+#endif
19295+
19296+#ifndef GL_EXT_misc_attribute
19297+#define GL_EXT_misc_attribute 1
19298+#endif
19299+
19300+#ifndef GL_SGIS_generate_mipmap
19301+#define GL_SGIS_generate_mipmap 1
19302+#endif
19303+
19304+#ifndef GL_SGIX_clipmap
19305+#define GL_SGIX_clipmap 1
19306+#endif
19307+
19308+#ifndef GL_SGIX_shadow
19309+#define GL_SGIX_shadow 1
19310+#endif
19311+
19312+#ifndef GL_SGIS_texture_edge_clamp
19313+#define GL_SGIS_texture_edge_clamp 1
19314+#endif
19315+
19316+#ifndef GL_SGIS_texture_border_clamp
19317+#define GL_SGIS_texture_border_clamp 1
19318+#endif
19319+
19320+#ifndef GL_EXT_blend_minmax
19321+#define GL_EXT_blend_minmax 1
19322+#ifdef GL_GLEXT_PROTOTYPES
19323+GLAPI void APIENTRY glBlendEquationEXT (GLenum);
19324+#endif /* GL_GLEXT_PROTOTYPES */
19325+typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode);
19326+#endif
19327+
19328+#ifndef GL_EXT_blend_subtract
19329+#define GL_EXT_blend_subtract 1
19330+#endif
19331+
19332+#ifndef GL_EXT_blend_logic_op
19333+#define GL_EXT_blend_logic_op 1
19334+#endif
19335+
19336+#ifndef GL_SGIX_interlace
19337+#define GL_SGIX_interlace 1
19338+#endif
19339+
19340+#ifndef GL_SGIX_pixel_tiles
19341+#define GL_SGIX_pixel_tiles 1
19342+#endif
19343+
19344+#ifndef GL_SGIX_texture_select
19345+#define GL_SGIX_texture_select 1
19346+#endif
19347+
19348+#ifndef GL_SGIX_sprite
19349+#define GL_SGIX_sprite 1
19350+#ifdef GL_GLEXT_PROTOTYPES
19351+GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum, GLfloat);
19352+GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum, const GLfloat *);
19353+GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum, GLint);
19354+GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum, const GLint *);
19355+#endif /* GL_GLEXT_PROTOTYPES */
19356+typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param);
19357+typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params);
19358+typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param);
19359+typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params);
19360+#endif
19361+
19362+#ifndef GL_SGIX_texture_multi_buffer
19363+#define GL_SGIX_texture_multi_buffer 1
19364+#endif
19365+
19366+#ifndef GL_EXT_point_parameters
19367+#define GL_EXT_point_parameters 1
19368+#ifdef GL_GLEXT_PROTOTYPES
19369+GLAPI void APIENTRY glPointParameterfEXT (GLenum, GLfloat);
19370+GLAPI void APIENTRY glPointParameterfvEXT (GLenum, const GLfloat *);
19371+/* ERO Begin */
19372+GLAPI void APIENTRY glPointParameteriEXT (GLenum, GLint);
19373+GLAPI void APIENTRY glPointParameterivEXT (GLenum, const GLint *);
19374+/* ERO end */
19375+#endif /* GL_GLEXT_PROTOTYPES */
19376+typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);
19377+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params);
19378+#endif
19379+
19380+#ifndef GL_SGIS_point_parameters
19381+#define GL_SGIS_point_parameters 1
19382+#ifdef GL_GLEXT_PROTOTYPES
19383+GLAPI void APIENTRY glPointParameterfSGIS (GLenum, GLfloat);
19384+GLAPI void APIENTRY glPointParameterfvSGIS (GLenum, const GLfloat *);
19385+#endif /* GL_GLEXT_PROTOTYPES */
19386+typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
19387+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
19388+#endif
19389+
19390+#ifndef GL_SGIX_instruments
19391+#define GL_SGIX_instruments 1
19392+#ifdef GL_GLEXT_PROTOTYPES
19393+GLAPI GLint APIENTRY glGetInstrumentsSGIX (void);
19394+GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei, GLint *);
19395+GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *);
19396+GLAPI void APIENTRY glReadInstrumentsSGIX (GLint);
19397+GLAPI void APIENTRY glStartInstrumentsSGIX (void);
19398+GLAPI void APIENTRY glStopInstrumentsSGIX (GLint);
19399+#endif /* GL_GLEXT_PROTOTYPES */
19400+typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void);
19401+typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer);
19402+typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p);
19403+typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker);
19404+typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void);
19405+typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker);
19406+#endif
19407+
19408+#ifndef GL_SGIX_texture_scale_bias
19409+#define GL_SGIX_texture_scale_bias 1
19410+#endif
19411+
19412+#ifndef GL_SGIX_framezoom
19413+#define GL_SGIX_framezoom 1
19414+#ifdef GL_GLEXT_PROTOTYPES
19415+GLAPI void APIENTRY glFrameZoomSGIX (GLint);
19416+#endif /* GL_GLEXT_PROTOTYPES */
19417+typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor);
19418+#endif
19419+
19420+#ifndef GL_SGIX_tag_sample_buffer
19421+#define GL_SGIX_tag_sample_buffer 1
19422+#ifdef GL_GLEXT_PROTOTYPES
19423+GLAPI void APIENTRY glTagSampleBufferSGIX (void);
19424+#endif /* GL_GLEXT_PROTOTYPES */
19425+typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void);
19426+#endif
19427+
19428+#ifndef GL_SGIX_polynomial_ffd
19429+#define GL_SGIX_polynomial_ffd 1
19430+#ifdef GL_GLEXT_PROTOTYPES
19431+GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *);
19432+GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *);
19433+GLAPI void APIENTRY glDeformSGIX (GLbitfield);
19434+GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield);
19435+#endif /* GL_GLEXT_PROTOTYPES */
19436+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);
19437+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);
19438+typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask);
19439+typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask);
19440+#endif
19441+
19442+#ifndef GL_SGIX_reference_plane
19443+#define GL_SGIX_reference_plane 1
19444+#ifdef GL_GLEXT_PROTOTYPES
19445+GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *);
19446+#endif /* GL_GLEXT_PROTOTYPES */
19447+typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation);
19448+#endif
19449+
19450+#ifndef GL_SGIX_flush_raster
19451+#define GL_SGIX_flush_raster 1
19452+#ifdef GL_GLEXT_PROTOTYPES
19453+GLAPI void APIENTRY glFlushRasterSGIX (void);
19454+#endif /* GL_GLEXT_PROTOTYPES */
19455+typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void);
19456+#endif
19457+
19458+#ifndef GL_SGIX_depth_texture
19459+#define GL_SGIX_depth_texture 1
19460+#endif
19461+
19462+#ifndef GL_SGIS_fog_function
19463+#define GL_SGIS_fog_function 1
19464+#ifdef GL_GLEXT_PROTOTYPES
19465+GLAPI void APIENTRY glFogFuncSGIS (GLsizei, const GLfloat *);
19466+GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *);
19467+#endif /* GL_GLEXT_PROTOTYPES */
19468+typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points);
19469+typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points);
19470+#endif
19471+
19472+#ifndef GL_SGIX_fog_offset
19473+#define GL_SGIX_fog_offset 1
19474+#endif
19475+
19476+#ifndef GL_HP_image_transform
19477+#define GL_HP_image_transform 1
19478+#ifdef GL_GLEXT_PROTOTYPES
19479+GLAPI void APIENTRY glImageTransformParameteriHP (GLenum, GLenum, GLint);
19480+GLAPI void APIENTRY glImageTransformParameterfHP (GLenum, GLenum, GLfloat);
19481+GLAPI void APIENTRY glImageTransformParameterivHP (GLenum, GLenum, const GLint *);
19482+GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum, GLenum, const GLfloat *);
19483+GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum, GLenum, GLint *);
19484+GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum, GLenum, GLfloat *);
19485+#endif /* GL_GLEXT_PROTOTYPES */
19486+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param);
19487+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param);
19488+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params);
19489+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params);
19490+typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params);
19491+typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params);
19492+#endif
19493+
19494+#ifndef GL_HP_convolution_border_modes
19495+#define GL_HP_convolution_border_modes 1
19496+#endif
19497+
19498+#ifndef GL_SGIX_texture_add_env
19499+#define GL_SGIX_texture_add_env 1
19500+#endif
19501+
19502+#ifndef GL_EXT_color_subtable
19503+#define GL_EXT_color_subtable 1
19504+#ifdef GL_GLEXT_PROTOTYPES
19505+GLAPI void APIENTRY glColorSubTableEXT (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19506+GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum, GLsizei, GLint, GLint, GLsizei);
19507+#endif /* GL_GLEXT_PROTOTYPES */
19508+typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
19509+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
19510+#endif
19511+
19512+#ifndef GL_PGI_vertex_hints
19513+#define GL_PGI_vertex_hints 1
19514+#endif
19515+
19516+#ifndef GL_PGI_misc_hints
19517+#define GL_PGI_misc_hints 1
19518+#ifdef GL_GLEXT_PROTOTYPES
19519+GLAPI void APIENTRY glHintPGI (GLenum, GLint);
19520+#endif /* GL_GLEXT_PROTOTYPES */
19521+typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode);
19522+#endif
19523+
19524+#ifndef GL_EXT_paletted_texture
19525+#define GL_EXT_paletted_texture 1
19526+#ifdef GL_GLEXT_PROTOTYPES
19527+GLAPI void APIENTRY glColorTableEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
19528+GLAPI void APIENTRY glGetColorTableEXT (GLenum, GLenum, GLenum, GLvoid *);
19529+GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum, GLenum, GLint *);
19530+GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum, GLenum, GLfloat *);
19531+#endif /* GL_GLEXT_PROTOTYPES */
19532+typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
19533+typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data);
19534+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19535+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19536+#endif
19537+
19538+#ifndef GL_EXT_clip_volume_hint
19539+#define GL_EXT_clip_volume_hint 1
19540+#endif
19541+
19542+#ifndef GL_SGIX_list_priority
19543+#define GL_SGIX_list_priority 1
19544+#ifdef GL_GLEXT_PROTOTYPES
19545+GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint, GLenum, GLfloat *);
19546+GLAPI void APIENTRY glGetListParameterivSGIX (GLuint, GLenum, GLint *);
19547+GLAPI void APIENTRY glListParameterfSGIX (GLuint, GLenum, GLfloat);
19548+GLAPI void APIENTRY glListParameterfvSGIX (GLuint, GLenum, const GLfloat *);
19549+GLAPI void APIENTRY glListParameteriSGIX (GLuint, GLenum, GLint);
19550+GLAPI void APIENTRY glListParameterivSGIX (GLuint, GLenum, const GLint *);
19551+#endif /* GL_GLEXT_PROTOTYPES */
19552+typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params);
19553+typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params);
19554+typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param);
19555+typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params);
19556+typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param);
19557+typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params);
19558+#endif
19559+
19560+#ifndef GL_SGIX_ir_instrument1
19561+#define GL_SGIX_ir_instrument1 1
19562+#endif
19563+
19564+#ifndef GL_SGIX_calligraphic_fragment
19565+#define GL_SGIX_calligraphic_fragment 1
19566+#endif
19567+
19568+#ifndef GL_SGIX_texture_lod_bias
19569+#define GL_SGIX_texture_lod_bias 1
19570+#endif
19571+
19572+#ifndef GL_SGIX_shadow_ambient
19573+#define GL_SGIX_shadow_ambient 1
19574+#endif
19575+
19576+#ifndef GL_EXT_index_texture
19577+#define GL_EXT_index_texture 1
19578+#endif
19579+
19580+#ifndef GL_EXT_index_material
19581+#define GL_EXT_index_material 1
19582+#ifdef GL_GLEXT_PROTOTYPES
19583+GLAPI void APIENTRY glIndexMaterialEXT (GLenum, GLenum);
19584+#endif /* GL_GLEXT_PROTOTYPES */
19585+typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode);
19586+#endif
19587+
19588+#ifndef GL_EXT_index_func
19589+#define GL_EXT_index_func 1
19590+#ifdef GL_GLEXT_PROTOTYPES
19591+GLAPI void APIENTRY glIndexFuncEXT (GLenum, GLclampf);
19592+#endif /* GL_GLEXT_PROTOTYPES */
19593+typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref);
19594+#endif
19595+
19596+#ifndef GL_EXT_index_array_formats
19597+#define GL_EXT_index_array_formats 1
19598+#endif
19599+
19600+#ifndef GL_EXT_compiled_vertex_array
19601+#define GL_EXT_compiled_vertex_array 1
19602+#ifdef GL_GLEXT_PROTOTYPES
19603+GLAPI void APIENTRY glLockArraysEXT (GLint, GLsizei);
19604+GLAPI void APIENTRY glUnlockArraysEXT (void);
19605+#endif /* GL_GLEXT_PROTOTYPES */
19606+typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);
19607+typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void);
19608+#endif
19609+
19610+#ifndef GL_EXT_cull_vertex
19611+#define GL_EXT_cull_vertex 1
19612+#ifdef GL_GLEXT_PROTOTYPES
19613+GLAPI void APIENTRY glCullParameterdvEXT (GLenum, GLdouble *);
19614+GLAPI void APIENTRY glCullParameterfvEXT (GLenum, GLfloat *);
19615+#endif /* GL_GLEXT_PROTOTYPES */
19616+typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params);
19617+typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params);
19618+#endif
19619+
19620+#ifndef GL_SGIX_ycrcb
19621+#define GL_SGIX_ycrcb 1
19622+#endif
19623+
19624+#ifndef GL_SGIX_fragment_lighting
19625+#define GL_SGIX_fragment_lighting 1
19626+#ifdef GL_GLEXT_PROTOTYPES
19627+GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum, GLenum);
19628+GLAPI void APIENTRY glFragmentLightfSGIX (GLenum, GLenum, GLfloat);
19629+GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum, GLenum, const GLfloat *);
19630+GLAPI void APIENTRY glFragmentLightiSGIX (GLenum, GLenum, GLint);
19631+GLAPI void APIENTRY glFragmentLightivSGIX (GLenum, GLenum, const GLint *);
19632+GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum, GLfloat);
19633+GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum, const GLfloat *);
19634+GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum, GLint);
19635+GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum, const GLint *);
19636+GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum, GLenum, GLfloat);
19637+GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum, GLenum, const GLfloat *);
19638+GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum, GLenum, GLint);
19639+GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum, GLenum, const GLint *);
19640+GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum, GLenum, GLfloat *);
19641+GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum, GLenum, GLint *);
19642+GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum, GLenum, GLfloat *);
19643+GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum, GLenum, GLint *);
19644+GLAPI void APIENTRY glLightEnviSGIX (GLenum, GLint);
19645+#endif /* GL_GLEXT_PROTOTYPES */
19646+typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode);
19647+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param);
19648+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);
19649+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param);
19650+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params);
19651+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param);
19652+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params);
19653+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param);
19654+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params);
19655+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param);
19656+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params);
19657+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param);
19658+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params);
19659+typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params);
19660+typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params);
19661+typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params);
19662+typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params);
19663+typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param);
19664+#endif
19665+
19666+#ifndef GL_IBM_rasterpos_clip
19667+#define GL_IBM_rasterpos_clip 1
19668+#endif
19669+
19670+#ifndef GL_HP_texture_lighting
19671+#define GL_HP_texture_lighting 1
19672+#endif
19673+
19674+#ifndef GL_EXT_draw_range_elements
19675+#define GL_EXT_draw_range_elements 1
19676+#ifdef GL_GLEXT_PROTOTYPES
19677+GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
19678+#endif /* GL_GLEXT_PROTOTYPES */
19679+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
19680+#endif
19681+
19682+#ifndef GL_WIN_phong_shading
19683+#define GL_WIN_phong_shading 1
19684+#endif
19685+
19686+#ifndef GL_WIN_specular_fog
19687+#define GL_WIN_specular_fog 1
19688+#endif
19689+
19690+#ifndef GL_EXT_light_texture
19691+#define GL_EXT_light_texture 1
19692+#ifdef GL_GLEXT_PROTOTYPES
19693+GLAPI void APIENTRY glApplyTextureEXT (GLenum);
19694+GLAPI void APIENTRY glTextureLightEXT (GLenum);
19695+GLAPI void APIENTRY glTextureMaterialEXT (GLenum, GLenum);
19696+#endif /* GL_GLEXT_PROTOTYPES */
19697+typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode);
19698+typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname);
19699+typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode);
19700+#endif
19701+
19702+#ifndef GL_SGIX_blend_alpha_minmax
19703+#define GL_SGIX_blend_alpha_minmax 1
19704+#endif
19705+
19706+#ifndef GL_EXT_bgra
19707+#define GL_EXT_bgra 1
19708+#endif
19709+
19710+#ifndef GL_SGIX_async
19711+#define GL_SGIX_async 1
19712+#ifdef GL_GLEXT_PROTOTYPES
19713+GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint);
19714+GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *);
19715+GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *);
19716+GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei);
19717+GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint, GLsizei);
19718+GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint);
19719+#endif /* GL_GLEXT_PROTOTYPES */
19720+typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker);
19721+typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp);
19722+typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp);
19723+typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range);
19724+typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range);
19725+typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker);
19726+#endif
19727+
19728+#ifndef GL_SGIX_async_pixel
19729+#define GL_SGIX_async_pixel 1
19730+#endif
19731+
19732+#ifndef GL_SGIX_async_histogram
19733+#define GL_SGIX_async_histogram 1
19734+#endif
19735+
19736+#ifndef GL_INTEL_parallel_arrays
19737+#define GL_INTEL_parallel_arrays 1
19738+#ifdef GL_GLEXT_PROTOTYPES
19739+GLAPI void APIENTRY glVertexPointervINTEL (GLint, GLenum, const GLvoid* *);
19740+GLAPI void APIENTRY glNormalPointervINTEL (GLenum, const GLvoid* *);
19741+GLAPI void APIENTRY glColorPointervINTEL (GLint, GLenum, const GLvoid* *);
19742+GLAPI void APIENTRY glTexCoordPointervINTEL (GLint, GLenum, const GLvoid* *);
19743+#endif /* GL_GLEXT_PROTOTYPES */
19744+typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
19745+typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer);
19746+typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
19747+typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
19748+#endif
19749+
19750+#ifndef GL_HP_occlusion_test
19751+#define GL_HP_occlusion_test 1
19752+#endif
19753+
19754+#ifndef GL_EXT_pixel_transform
19755+#define GL_EXT_pixel_transform 1
19756+#ifdef GL_GLEXT_PROTOTYPES
19757+GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum, GLenum, GLint);
19758+GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum, GLenum, GLfloat);
19759+GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum, GLenum, const GLint *);
19760+GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum, GLenum, const GLfloat *);
19761+/* ERO Begin */
19762+GLAPI void APIENTRY glGetPixelTransformParameterivEXT (GLenum, GLenum, GLint *);
19763+GLAPI void APIENTRY glGetPixelTransformParameterfvEXT (GLenum, GLenum, GLfloat *);
19764+/* ERO End */
19765+#endif /* GL_GLEXT_PROTOTYPES */
19766+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param);
19767+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param);
19768+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
19769+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
19770+/* ERO Begin */
19771+typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19772+typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19773+/* ERO End */
19774+#endif
19775+
19776+#ifndef GL_EXT_pixel_transform_color_table
19777+#define GL_EXT_pixel_transform_color_table 1
19778+#endif
19779+
19780+#ifndef GL_EXT_shared_texture_palette
19781+#define GL_EXT_shared_texture_palette 1
19782+#endif
19783+
19784+#ifndef GL_EXT_separate_specular_color
19785+#define GL_EXT_separate_specular_color 1
19786+#endif
19787+
19788+#ifndef GL_EXT_secondary_color
19789+#define GL_EXT_secondary_color 1
19790+#ifdef GL_GLEXT_PROTOTYPES
19791+GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte, GLbyte, GLbyte);
19792+GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *);
19793+GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble, GLdouble, GLdouble);
19794+GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *);
19795+GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat, GLfloat, GLfloat);
19796+GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *);
19797+GLAPI void APIENTRY glSecondaryColor3iEXT (GLint, GLint, GLint);
19798+GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *);
19799+GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort, GLshort, GLshort);
19800+GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *);
19801+GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte, GLubyte, GLubyte);
19802+GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *);
19803+GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint, GLuint, GLuint);
19804+GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *);
19805+GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort, GLushort, GLushort);
19806+GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *);
19807+GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint, GLenum, GLsizei, const GLvoid *);
19808+#endif /* GL_GLEXT_PROTOTYPES */
19809+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue);
19810+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v);
19811+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue);
19812+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v);
19813+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);
19814+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);
19815+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue);
19816+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v);
19817+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue);
19818+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v);
19819+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);
19820+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v);
19821+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue);
19822+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);
19823+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);
19824+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);
19825+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
19826+#endif
19827+
19828+#ifndef GL_EXT_texture_perturb_normal
19829+#define GL_EXT_texture_perturb_normal 1
19830+#ifdef GL_GLEXT_PROTOTYPES
19831+GLAPI void APIENTRY glTextureNormalEXT (GLenum);
19832+#endif /* GL_GLEXT_PROTOTYPES */
19833+typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode);
19834+#endif
19835+
19836+#ifndef GL_EXT_multi_draw_arrays
19837+#define GL_EXT_multi_draw_arrays 1
19838+#ifdef GL_GLEXT_PROTOTYPES
19839+GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei);
19840+GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
19841+#endif /* GL_GLEXT_PROTOTYPES */
19842+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
19843+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
19844+#endif
19845+
19846+#ifndef GL_EXT_fog_coord
19847+#define GL_EXT_fog_coord 1
19848+#ifdef GL_GLEXT_PROTOTYPES
19849+GLAPI void APIENTRY glFogCoordfEXT (GLfloat);
19850+GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *);
19851+GLAPI void APIENTRY glFogCoorddEXT (GLdouble);
19852+GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *);
19853+GLAPI void APIENTRY glFogCoordPointerEXT (GLenum, GLsizei, const GLvoid *);
19854+#endif /* GL_GLEXT_PROTOTYPES */
19855+typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord);
19856+typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord);
19857+typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord);
19858+typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord);
19859+typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
19860+#endif
19861+
19862+#ifndef GL_REND_screen_coordinates
19863+#define GL_REND_screen_coordinates 1
19864+#endif
19865+
19866+#ifndef GL_EXT_coordinate_frame
19867+#define GL_EXT_coordinate_frame 1
19868+#ifdef GL_GLEXT_PROTOTYPES
19869+GLAPI void APIENTRY glTangent3bEXT (GLbyte, GLbyte, GLbyte);
19870+GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *);
19871+GLAPI void APIENTRY glTangent3dEXT (GLdouble, GLdouble, GLdouble);
19872+GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *);
19873+GLAPI void APIENTRY glTangent3fEXT (GLfloat, GLfloat, GLfloat);
19874+GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *);
19875+GLAPI void APIENTRY glTangent3iEXT (GLint, GLint, GLint);
19876+GLAPI void APIENTRY glTangent3ivEXT (const GLint *);
19877+GLAPI void APIENTRY glTangent3sEXT (GLshort, GLshort, GLshort);
19878+GLAPI void APIENTRY glTangent3svEXT (const GLshort *);
19879+GLAPI void APIENTRY glBinormal3bEXT (GLbyte, GLbyte, GLbyte);
19880+GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *);
19881+GLAPI void APIENTRY glBinormal3dEXT (GLdouble, GLdouble, GLdouble);
19882+GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *);
19883+GLAPI void APIENTRY glBinormal3fEXT (GLfloat, GLfloat, GLfloat);
19884+GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *);
19885+GLAPI void APIENTRY glBinormal3iEXT (GLint, GLint, GLint);
19886+GLAPI void APIENTRY glBinormal3ivEXT (const GLint *);
19887+GLAPI void APIENTRY glBinormal3sEXT (GLshort, GLshort, GLshort);
19888+GLAPI void APIENTRY glBinormal3svEXT (const GLshort *);
19889+GLAPI void APIENTRY glTangentPointerEXT (GLenum, GLsizei, const GLvoid *);
19890+GLAPI void APIENTRY glBinormalPointerEXT (GLenum, GLsizei, const GLvoid *);
19891+#endif /* GL_GLEXT_PROTOTYPES */
19892+typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz);
19893+typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v);
19894+typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz);
19895+typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v);
19896+typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz);
19897+typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v);
19898+typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz);
19899+typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v);
19900+typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz);
19901+typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v);
19902+typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz);
19903+typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v);
19904+typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz);
19905+typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v);
19906+typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz);
19907+typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v);
19908+typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz);
19909+typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v);
19910+typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz);
19911+typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v);
19912+typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
19913+typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
19914+#endif
19915+
19916+#ifndef GL_EXT_texture_env_combine
19917+#define GL_EXT_texture_env_combine 1
19918+#endif
19919+
19920+#ifndef GL_APPLE_specular_vector
19921+#define GL_APPLE_specular_vector 1
19922+#endif
19923+
19924+#ifndef GL_APPLE_transform_hint
19925+#define GL_APPLE_transform_hint 1
19926+#endif
19927+
19928+#ifndef GL_SGIX_fog_scale
19929+#define GL_SGIX_fog_scale 1
19930+#endif
19931+
19932+#ifndef GL_SUNX_constant_data
19933+#define GL_SUNX_constant_data 1
19934+#ifdef GL_GLEXT_PROTOTYPES
19935+GLAPI void APIENTRY glFinishTextureSUNX (void);
19936+#endif /* GL_GLEXT_PROTOTYPES */
19937+typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void);
19938+#endif
19939+
19940+#ifndef GL_SUN_global_alpha
19941+#define GL_SUN_global_alpha 1
19942+#ifdef GL_GLEXT_PROTOTYPES
19943+GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte);
19944+GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort);
19945+GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint);
19946+GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat);
19947+GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble);
19948+GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte);
19949+GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort);
19950+GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint);
19951+#endif /* GL_GLEXT_PROTOTYPES */
19952+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor);
19953+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor);
19954+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor);
19955+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor);
19956+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor);
19957+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor);
19958+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor);
19959+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor);
19960+#endif
19961+
19962+#ifndef GL_SUN_triangle_list
19963+#define GL_SUN_triangle_list 1
19964+#ifdef GL_GLEXT_PROTOTYPES
19965+GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint);
19966+GLAPI void APIENTRY glReplacementCodeusSUN (GLushort);
19967+GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte);
19968+GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *);
19969+GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *);
19970+GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *);
19971+GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum, GLsizei, const GLvoid* *);
19972+#endif /* GL_GLEXT_PROTOTYPES */
19973+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code);
19974+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code);
19975+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code);
19976+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code);
19977+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code);
19978+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code);
19979+typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer);
19980+#endif
19981+
19982+#ifndef GL_SUN_vertex
19983+#define GL_SUN_vertex 1
19984+#ifdef GL_GLEXT_PROTOTYPES
19985+GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat);
19986+GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *, const GLfloat *);
19987+GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
19988+GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *, const GLfloat *);
19989+GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
19990+GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *, const GLfloat *);
19991+GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
19992+GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *);
19993+GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
19994+GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
19995+GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
19996+GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *, const GLfloat *);
19997+GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
19998+GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *, const GLfloat *);
19999+GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat, GLfloat, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
20000+GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *, const GLubyte *, const GLfloat *);
20001+GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20002+GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
20003+GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20004+GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
20005+GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20006+GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
20007+GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20008+GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
20009+GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat);
20010+GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *, const GLfloat *);
20011+GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
20012+GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *, const GLubyte *, const GLfloat *);
20013+GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20014+GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
20015+GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20016+GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
20017+GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20018+GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *);
20019+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20020+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
20021+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20022+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *);
20023+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20024+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
20025+#endif /* GL_GLEXT_PROTOTYPES */
20026+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
20027+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v);
20028+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
20029+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v);
20030+typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
20031+typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v);
20032+typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20033+typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v);
20034+typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20035+typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v);
20036+typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
20037+typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
20038+typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20039+typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
20040+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
20041+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v);
20042+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
20043+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v);
20044+typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20045+typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v);
20046+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);
20047+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20048+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);
20049+typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20050+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
20051+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v);
20052+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
20053+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v);
20054+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
20055+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v);
20056+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20057+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v);
20058+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);
20059+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20060+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
20061+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v);
20062+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20063+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
20064+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);
20065+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20066+#endif
20067+
20068+#ifndef GL_EXT_blend_func_separate
20069+#define GL_EXT_blend_func_separate 1
20070+#ifdef GL_GLEXT_PROTOTYPES
20071+GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum, GLenum, GLenum, GLenum);
20072+#endif /* GL_GLEXT_PROTOTYPES */
20073+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
20074+#endif
20075+
20076+#ifndef GL_INGR_blend_func_separate
20077+#define GL_INGR_blend_func_separate 1
20078+#ifdef GL_GLEXT_PROTOTYPES
20079+GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum, GLenum, GLenum, GLenum);
20080+#endif /* GL_GLEXT_PROTOTYPES */
20081+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
20082+#endif
20083+
20084+#ifndef GL_INGR_color_clamp
20085+#define GL_INGR_color_clamp 1
20086+#endif
20087+
20088+#ifndef GL_INGR_interlace_read
20089+#define GL_INGR_interlace_read 1
20090+#endif
20091+
20092+#ifndef GL_EXT_stencil_wrap
20093+#define GL_EXT_stencil_wrap 1
20094+#endif
20095+
20096+#ifndef GL_EXT_422_pixels
20097+#define GL_EXT_422_pixels 1
20098+#endif
20099+
20100+#ifndef GL_NV_texgen_reflection
20101+#define GL_NV_texgen_reflection 1
20102+#endif
20103+
20104+#ifndef GL_SUN_convolution_border_modes
20105+#define GL_SUN_convolution_border_modes 1
20106+#endif
20107+
20108+#ifndef GL_EXT_texture_env_add
20109+#define GL_EXT_texture_env_add 1
20110+#endif
20111+
20112+#ifndef GL_EXT_texture_lod_bias
20113+#define GL_EXT_texture_lod_bias 1
20114+#endif
20115+
20116+#ifndef GL_EXT_texture_filter_anisotropic
20117+#define GL_EXT_texture_filter_anisotropic 1
20118+#endif
20119+
20120+#ifndef GL_EXT_vertex_weighting
20121+#define GL_EXT_vertex_weighting 1
20122+#ifdef GL_GLEXT_PROTOTYPES
20123+GLAPI void APIENTRY glVertexWeightfEXT (GLfloat);
20124+GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *);
20125+GLAPI void APIENTRY glVertexWeightPointerEXT (GLsizei, GLenum, GLsizei, const GLvoid *);
20126+#endif /* GL_GLEXT_PROTOTYPES */
20127+typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight);
20128+typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight);
20129+typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer);
20130+#endif
20131+
20132+#ifndef GL_NV_light_max_exponent
20133+#define GL_NV_light_max_exponent 1
20134+#endif
20135+
20136+#ifndef GL_NV_vertex_array_range
20137+#define GL_NV_vertex_array_range 1
20138+#ifdef GL_GLEXT_PROTOTYPES
20139+GLAPI void APIENTRY glFlushVertexArrayRangeNV (void);
20140+GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei, const GLvoid *);
20141+#endif /* GL_GLEXT_PROTOTYPES */
20142+typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void);
20143+typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer);
20144+#endif
20145+
20146+#ifndef GL_NV_register_combiners
20147+#define GL_NV_register_combiners 1
20148+#ifdef GL_GLEXT_PROTOTYPES
20149+GLAPI void APIENTRY glCombinerParameterfvNV (GLenum, const GLfloat *);
20150+GLAPI void APIENTRY glCombinerParameterfNV (GLenum, GLfloat);
20151+GLAPI void APIENTRY glCombinerParameterivNV (GLenum, const GLint *);
20152+GLAPI void APIENTRY glCombinerParameteriNV (GLenum, GLint);
20153+GLAPI void APIENTRY glCombinerInputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum);
20154+GLAPI void APIENTRY glCombinerOutputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean);
20155+GLAPI void APIENTRY glFinalCombinerInputNV (GLenum, GLenum, GLenum, GLenum);
20156+GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum, GLenum, GLenum, GLenum, GLfloat *);
20157+GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum, GLenum, GLenum, GLenum, GLint *);
20158+GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum, GLenum, GLenum, GLfloat *);
20159+GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum, GLenum, GLenum, GLint *);
20160+GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum, GLenum, GLfloat *);
20161+GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum, GLenum, GLint *);
20162+#endif /* GL_GLEXT_PROTOTYPES */
20163+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);
20164+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);
20165+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
20166+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);
20167+typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
20168+typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
20169+typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
20170+typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
20171+typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
20172+typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
20173+typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params);
20174+typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params);
20175+typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params);
20176+#endif
20177+
20178+#ifndef GL_NV_fog_distance
20179+#define GL_NV_fog_distance 1
20180+#endif
20181+
20182+#ifndef GL_NV_texgen_emboss
20183+#define GL_NV_texgen_emboss 1
20184+#endif
20185+
20186+#ifndef GL_NV_blend_square
20187+#define GL_NV_blend_square 1
20188+#endif
20189+
20190+#ifndef GL_NV_texture_env_combine4
20191+#define GL_NV_texture_env_combine4 1
20192+#endif
20193+
20194+#ifndef GL_MESA_resize_buffers
20195+#define GL_MESA_resize_buffers 1
20196+#ifdef GL_GLEXT_PROTOTYPES
20197+GLAPI void APIENTRY glResizeBuffersMESA (void);
20198+#endif /* GL_GLEXT_PROTOTYPES */
20199+typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void);
20200+#endif
20201+
20202+#ifndef GL_MESA_window_pos
20203+#define GL_MESA_window_pos 1
20204+#ifdef GL_GLEXT_PROTOTYPES
20205+GLAPI void APIENTRY glWindowPos2dMESA (GLdouble, GLdouble);
20206+GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *);
20207+GLAPI void APIENTRY glWindowPos2fMESA (GLfloat, GLfloat);
20208+GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *);
20209+GLAPI void APIENTRY glWindowPos2iMESA (GLint, GLint);
20210+GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *);
20211+GLAPI void APIENTRY glWindowPos2sMESA (GLshort, GLshort);
20212+GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *);
20213+GLAPI void APIENTRY glWindowPos3dMESA (GLdouble, GLdouble, GLdouble);
20214+GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *);
20215+GLAPI void APIENTRY glWindowPos3fMESA (GLfloat, GLfloat, GLfloat);
20216+GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *);
20217+GLAPI void APIENTRY glWindowPos3iMESA (GLint, GLint, GLint);
20218+GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *);
20219+GLAPI void APIENTRY glWindowPos3sMESA (GLshort, GLshort, GLshort);
20220+GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *);
20221+GLAPI void APIENTRY glWindowPos4dMESA (GLdouble, GLdouble, GLdouble, GLdouble);
20222+GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *);
20223+GLAPI void APIENTRY glWindowPos4fMESA (GLfloat, GLfloat, GLfloat, GLfloat);
20224+GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *);
20225+GLAPI void APIENTRY glWindowPos4iMESA (GLint, GLint, GLint, GLint);
20226+GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *);
20227+GLAPI void APIENTRY glWindowPos4sMESA (GLshort, GLshort, GLshort, GLshort);
20228+GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *);
20229+#endif /* GL_GLEXT_PROTOTYPES */
20230+typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y);
20231+typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v);
20232+typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y);
20233+typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v);
20234+typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y);
20235+typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v);
20236+typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y);
20237+typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v);
20238+typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z);
20239+typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v);
20240+typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z);
20241+typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v);
20242+typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z);
20243+typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v);
20244+typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z);
20245+typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v);
20246+typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
20247+typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v);
20248+typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20249+typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v);
20250+typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w);
20251+typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v);
20252+typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w);
20253+typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v);
20254+#endif
20255+
20256+#ifndef GL_IBM_cull_vertex
20257+#define GL_IBM_cull_vertex 1
20258+#endif
20259+
20260+#ifndef GL_IBM_multimode_draw_arrays
20261+#define GL_IBM_multimode_draw_arrays 1
20262+#ifdef GL_GLEXT_PROTOTYPES
20263+GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *, const GLint *, const GLsizei *, GLsizei, GLint);
20264+GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *, const GLsizei *, GLenum, const GLvoid* const *, GLsizei, GLint);
20265+#endif /* GL_GLEXT_PROTOTYPES */
20266+typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
20267+typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride);
20268+#endif
20269+
20270+#ifndef GL_IBM_vertex_array_lists
20271+#define GL_IBM_vertex_array_lists 1
20272+#ifdef GL_GLEXT_PROTOTYPES
20273+GLAPI void APIENTRY glColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20274+GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20275+GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint, const GLboolean* *, GLint);
20276+GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
20277+GLAPI void APIENTRY glIndexPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
20278+GLAPI void APIENTRY glNormalPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
20279+GLAPI void APIENTRY glTexCoordPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20280+GLAPI void APIENTRY glVertexPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20281+#endif /* GL_GLEXT_PROTOTYPES */
20282+typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20283+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20284+typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride);
20285+typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20286+typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20287+typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20288+typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20289+typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20290+#endif
20291+
20292+#ifndef GL_SGIX_subsample
20293+#define GL_SGIX_subsample 1
20294+#endif
20295+
20296+#ifndef GL_SGIX_ycrcba
20297+#define GL_SGIX_ycrcba 1
20298+#endif
20299+
20300+#ifndef GL_SGIX_ycrcb_subsample
20301+#define GL_SGIX_ycrcb_subsample 1
20302+#endif
20303+
20304+#ifndef GL_SGIX_depth_pass_instrument
20305+#define GL_SGIX_depth_pass_instrument 1
20306+#endif
20307+
20308+#ifndef GL_3DFX_texture_compression_FXT1
20309+#define GL_3DFX_texture_compression_FXT1 1
20310+#endif
20311+
20312+#ifndef GL_3DFX_multisample
20313+#define GL_3DFX_multisample 1
20314+#endif
20315+
20316+#ifndef GL_3DFX_tbuffer
20317+#define GL_3DFX_tbuffer 1
20318+#ifdef GL_GLEXT_PROTOTYPES
20319+GLAPI void APIENTRY glTbufferMask3DFX (GLuint);
20320+#endif /* GL_GLEXT_PROTOTYPES */
20321+typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask);
20322+#endif
20323+
20324+#ifndef GL_EXT_multisample
20325+#define GL_EXT_multisample 1
20326+#ifdef GL_GLEXT_PROTOTYPES
20327+GLAPI void APIENTRY glSampleMaskEXT (GLclampf, GLboolean);
20328+GLAPI void APIENTRY glSamplePatternEXT (GLenum);
20329+#endif /* GL_GLEXT_PROTOTYPES */
20330+typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert);
20331+typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern);
20332+#endif
20333+
20334+#ifndef GL_SGIX_vertex_preclip
20335+#define GL_SGIX_vertex_preclip 1
20336+#endif
20337+
20338+#ifndef GL_SGIX_convolution_accuracy
20339+#define GL_SGIX_convolution_accuracy 1
20340+#endif
20341+
20342+#ifndef GL_SGIX_resample
20343+#define GL_SGIX_resample 1
20344+#endif
20345+
20346+#ifndef GL_SGIS_point_line_texgen
20347+#define GL_SGIS_point_line_texgen 1
20348+#endif
20349+
20350+#ifndef GL_SGIS_texture_color_mask
20351+#define GL_SGIS_texture_color_mask 1
20352+#ifdef GL_GLEXT_PROTOTYPES
20353+GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean, GLboolean, GLboolean, GLboolean);
20354+#endif /* GL_GLEXT_PROTOTYPES */
20355+typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
20356+#endif
20357+
20358+#ifndef GL_SGIX_igloo_interface
20359+#define GL_SGIX_igloo_interface 1
20360+#ifdef GL_GLEXT_PROTOTYPES
20361+GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum, const GLvoid *);
20362+#endif /* GL_GLEXT_PROTOTYPES */
20363+typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params);
20364+#endif
20365+
20366+#ifndef GL_EXT_texture_env_dot3
20367+#define GL_EXT_texture_env_dot3 1
20368+#endif
20369+
20370+#ifndef GL_ATI_texture_mirror_once
20371+#define GL_ATI_texture_mirror_once 1
20372+#endif
20373+
20374+#ifndef GL_NV_fence
20375+#define GL_NV_fence 1
20376+#ifdef GL_GLEXT_PROTOTYPES
20377+GLAPI void APIENTRY glDeleteFencesNV (GLsizei, const GLuint *);
20378+GLAPI void APIENTRY glGenFencesNV (GLsizei, GLuint *);
20379+GLAPI GLboolean APIENTRY glIsFenceNV (GLuint);
20380+GLAPI GLboolean APIENTRY glTestFenceNV (GLuint);
20381+GLAPI void APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *);
20382+GLAPI void APIENTRY glFinishFenceNV (GLuint);
20383+GLAPI void APIENTRY glSetFenceNV (GLuint, GLenum);
20384+#endif /* GL_GLEXT_PROTOTYPES */
20385+typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
20386+typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
20387+typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
20388+typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
20389+typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
20390+typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
20391+typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
20392+#endif
20393+
20394+#ifndef GL_NV_evaluators
20395+#define GL_NV_evaluators 1
20396+#ifdef GL_GLEXT_PROTOTYPES
20397+GLAPI void APIENTRY glMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLint, GLint, GLboolean, const GLvoid *);
20398+GLAPI void APIENTRY glMapParameterivNV (GLenum, GLenum, const GLint *);
20399+GLAPI void APIENTRY glMapParameterfvNV (GLenum, GLenum, const GLfloat *);
20400+GLAPI void APIENTRY glGetMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLboolean, GLvoid *);
20401+GLAPI void APIENTRY glGetMapParameterivNV (GLenum, GLenum, GLint *);
20402+GLAPI void APIENTRY glGetMapParameterfvNV (GLenum, GLenum, GLfloat *);
20403+GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum, GLuint, GLenum, GLint *);
20404+GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum, GLuint, GLenum, GLfloat *);
20405+GLAPI void APIENTRY glEvalMapsNV (GLenum, GLenum);
20406+#endif /* GL_GLEXT_PROTOTYPES */
20407+typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points);
20408+typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params);
20409+typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params);
20410+typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points);
20411+typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params);
20412+typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params);
20413+typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
20414+typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
20415+typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode);
20416+#endif
20417+
20418+#ifndef GL_NV_packed_depth_stencil
20419+#define GL_NV_packed_depth_stencil 1
20420+#endif
20421+
20422+#ifndef GL_NV_register_combiners2
20423+#define GL_NV_register_combiners2 1
20424+#ifdef GL_GLEXT_PROTOTYPES
20425+GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum, GLenum, const GLfloat *);
20426+GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum, GLenum, GLfloat *);
20427+#endif /* GL_GLEXT_PROTOTYPES */
20428+typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params);
20429+typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params);
20430+#endif
20431+
20432+#ifndef GL_NV_texture_compression_vtc
20433+#define GL_NV_texture_compression_vtc 1
20434+#endif
20435+
20436+#ifndef GL_NV_texture_rectangle
20437+#define GL_NV_texture_rectangle 1
20438+#endif
20439+
20440+#ifndef GL_NV_texture_shader
20441+#define GL_NV_texture_shader 1
20442+#endif
20443+
20444+#ifndef GL_NV_texture_shader2
20445+#define GL_NV_texture_shader2 1
20446+#endif
20447+
20448+#ifndef GL_NV_vertex_array_range2
20449+#define GL_NV_vertex_array_range2 1
20450+#endif
20451+
20452+#ifndef GL_NV_vertex_program
20453+#define GL_NV_vertex_program 1
20454+#ifdef GL_GLEXT_PROTOTYPES
20455+GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei, const GLuint *, GLboolean *);
20456+GLAPI void APIENTRY glBindProgramNV (GLenum, GLuint);
20457+GLAPI void APIENTRY glDeleteProgramsNV (GLsizei, const GLuint *);
20458+GLAPI void APIENTRY glExecuteProgramNV (GLenum, GLuint, const GLfloat *);
20459+GLAPI void APIENTRY glGenProgramsNV (GLsizei, GLuint *);
20460+GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum, GLuint, GLenum, GLdouble *);
20461+GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum, GLuint, GLenum, GLfloat *);
20462+GLAPI void APIENTRY glGetProgramivNV (GLuint, GLenum, GLint *);
20463+GLAPI void APIENTRY glGetProgramStringNV (GLuint, GLenum, GLubyte *);
20464+GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum, GLuint, GLenum, GLint *);
20465+GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint, GLenum, GLdouble *);
20466+GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint, GLenum, GLfloat *);
20467+GLAPI void APIENTRY glGetVertexAttribivNV (GLuint, GLenum, GLint *);
20468+GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint, GLenum, GLvoid* *);
20469+GLAPI GLboolean APIENTRY glIsProgramNV (GLuint);
20470+GLAPI void APIENTRY glLoadProgramNV (GLenum, GLuint, GLsizei, const GLubyte *);
20471+GLAPI void APIENTRY glProgramParameter4dNV (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
20472+GLAPI void APIENTRY glProgramParameter4dvNV (GLenum, GLuint, const GLdouble *);
20473+GLAPI void APIENTRY glProgramParameter4fNV (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
20474+GLAPI void APIENTRY glProgramParameter4fvNV (GLenum, GLuint, const GLfloat *);
20475+GLAPI void APIENTRY glProgramParameters4dvNV (GLenum, GLuint, GLuint, const GLdouble *);
20476+GLAPI void APIENTRY glProgramParameters4fvNV (GLenum, GLuint, GLuint, const GLfloat *);
20477+GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei, const GLuint *);
20478+GLAPI void APIENTRY glTrackMatrixNV (GLenum, GLuint, GLenum, GLenum);
20479+GLAPI void APIENTRY glVertexAttribPointerNV (GLuint, GLint, GLenum, GLsizei, const GLvoid *);
20480+GLAPI void APIENTRY glVertexAttrib1dNV (GLuint, GLdouble);
20481+GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint, const GLdouble *);
20482+GLAPI void APIENTRY glVertexAttrib1fNV (GLuint, GLfloat);
20483+GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint, const GLfloat *);
20484+GLAPI void APIENTRY glVertexAttrib1sNV (GLuint, GLshort);
20485+GLAPI void APIENTRY glVertexAttrib1svNV (GLuint, const GLshort *);
20486+GLAPI void APIENTRY glVertexAttrib2dNV (GLuint, GLdouble, GLdouble);
20487+GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint, const GLdouble *);
20488+GLAPI void APIENTRY glVertexAttrib2fNV (GLuint, GLfloat, GLfloat);
20489+GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint, const GLfloat *);
20490+GLAPI void APIENTRY glVertexAttrib2sNV (GLuint, GLshort, GLshort);
20491+GLAPI void APIENTRY glVertexAttrib2svNV (GLuint, const GLshort *);
20492+GLAPI void APIENTRY glVertexAttrib3dNV (GLuint, GLdouble, GLdouble, GLdouble);
20493+GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint, const GLdouble *);
20494+GLAPI void APIENTRY glVertexAttrib3fNV (GLuint, GLfloat, GLfloat, GLfloat);
20495+GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint, const GLfloat *);
20496+GLAPI void APIENTRY glVertexAttrib3sNV (GLuint, GLshort, GLshort, GLshort);
20497+GLAPI void APIENTRY glVertexAttrib3svNV (GLuint, const GLshort *);
20498+GLAPI void APIENTRY glVertexAttrib4dNV (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
20499+GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint, const GLdouble *);
20500+GLAPI void APIENTRY glVertexAttrib4fNV (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
20501+GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint, const GLfloat *);
20502+GLAPI void APIENTRY glVertexAttrib4sNV (GLuint, GLshort, GLshort, GLshort, GLshort);
20503+GLAPI void APIENTRY glVertexAttrib4svNV (GLuint, const GLshort *);
20504+GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
20505+GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint, const GLubyte *);
20506+GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint, GLsizei, const GLdouble *);
20507+GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint, GLsizei, const GLfloat *);
20508+GLAPI void APIENTRY glVertexAttribs1svNV (GLuint, GLsizei, const GLshort *);
20509+GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint, GLsizei, const GLdouble *);
20510+GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint, GLsizei, const GLfloat *);
20511+GLAPI void APIENTRY glVertexAttribs2svNV (GLuint, GLsizei, const GLshort *);
20512+GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint, GLsizei, const GLdouble *);
20513+GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint, GLsizei, const GLfloat *);
20514+GLAPI void APIENTRY glVertexAttribs3svNV (GLuint, GLsizei, const GLshort *);
20515+GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint, GLsizei, const GLdouble *);
20516+GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint, GLsizei, const GLfloat *);
20517+GLAPI void APIENTRY glVertexAttribs4svNV (GLuint, GLsizei, const GLshort *);
20518+GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint, GLsizei, const GLubyte *);
20519+#endif /* GL_GLEXT_PROTOTYPES */
20520+typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences);
20521+typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id);
20522+typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
20523+typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params);
20524+typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs);
20525+typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params);
20526+typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
20527+typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params);
20528+typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program);
20529+typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params);
20530+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params);
20531+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params);
20532+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params);
20533+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
20534+typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id);
20535+typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
20536+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
20537+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v);
20538+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20539+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v);
20540+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint count, const GLdouble *v);
20541+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint count, const GLfloat *v);
20542+typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
20543+typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform);
20544+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer);
20545+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x);
20546+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v);
20547+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x);
20548+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v);
20549+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x);
20550+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v);
20551+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y);
20552+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v);
20553+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y);
20554+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v);
20555+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y);
20556+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v);
20557+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
20558+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v);
20559+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
20560+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v);
20561+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
20562+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v);
20563+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
20564+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v);
20565+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20566+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v);
20567+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
20568+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v);
20569+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
20570+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v);
20571+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
20572+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
20573+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
20574+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
20575+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
20576+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
20577+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
20578+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
20579+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
20580+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
20581+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
20582+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
20583+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v);
20584+#endif
20585+
20586+#ifndef GL_SGIX_texture_coordinate_clamp
20587+#define GL_SGIX_texture_coordinate_clamp 1
20588+#endif
20589+
20590+#ifndef GL_SGIX_scalebias_hint
20591+#define GL_SGIX_scalebias_hint 1
20592+#endif
20593+
20594+#ifndef GL_OML_interlace
20595+#define GL_OML_interlace 1
20596+#endif
20597+
20598+#ifndef GL_OML_subsample
20599+#define GL_OML_subsample 1
20600+#endif
20601+
20602+#ifndef GL_OML_resample
20603+#define GL_OML_resample 1
20604+#endif
20605+
20606+#ifndef GL_NV_copy_depth_to_color
20607+#define GL_NV_copy_depth_to_color 1
20608+#endif
20609+
20610+#ifndef GL_ATI_envmap_bumpmap
20611+#define GL_ATI_envmap_bumpmap 1
20612+#ifdef GL_GLEXT_PROTOTYPES
20613+GLAPI void APIENTRY glTexBumpParameterivATI (GLenum, const GLint *);
20614+GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum, const GLfloat *);
20615+GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum, GLint *);
20616+GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum, GLfloat *);
20617+#endif /* GL_GLEXT_PROTOTYPES */
20618+typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param);
20619+typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param);
20620+typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param);
20621+typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param);
20622+#endif
20623+
20624+#ifndef GL_ATI_fragment_shader
20625+#define GL_ATI_fragment_shader 1
20626+#ifdef GL_GLEXT_PROTOTYPES
20627+GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint);
20628+GLAPI void APIENTRY glBindFragmentShaderATI (GLuint);
20629+GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint);
20630+GLAPI void APIENTRY glBeginFragmentShaderATI (void);
20631+GLAPI void APIENTRY glEndFragmentShaderATI (void);
20632+GLAPI void APIENTRY glPassTexCoordATI (GLuint, GLuint, GLenum);
20633+GLAPI void APIENTRY glSampleMapATI (GLuint, GLuint, GLenum);
20634+GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
20635+GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
20636+GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
20637+GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
20638+GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
20639+GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
20640+GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint, const GLfloat *);
20641+#endif /* GL_GLEXT_PROTOTYPES */
20642+typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range);
20643+typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id);
20644+typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id);
20645+typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void);
20646+typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void);
20647+typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle);
20648+typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle);
20649+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
20650+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
20651+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);
20652+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
20653+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
20654+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);
20655+typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value);
20656+#endif
20657+
20658+#ifndef GL_ATI_pn_triangles
20659+#define GL_ATI_pn_triangles 1
20660+#ifdef GL_GLEXT_PROTOTYPES
20661+GLAPI void APIENTRY glPNTrianglesiATI (GLenum, GLint);
20662+GLAPI void APIENTRY glPNTrianglesfATI (GLenum, GLfloat);
20663+#endif /* GL_GLEXT_PROTOTYPES */
20664+typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param);
20665+typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param);
20666+#endif
20667+
20668+#ifndef GL_ATI_vertex_array_object
20669+#define GL_ATI_vertex_array_object 1
20670+#ifdef GL_GLEXT_PROTOTYPES
20671+GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei, const GLvoid *, GLenum);
20672+GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint);
20673+GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint, GLuint, GLsizei, const GLvoid *, GLenum);
20674+GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint, GLenum, GLfloat *);
20675+GLAPI void APIENTRY glGetObjectBufferivATI (GLuint, GLenum, GLint *);
20676+GLAPI void APIENTRY glFreeObjectBufferATI (GLuint);
20677+/* ERO Begin */
20678+GLAPI void APIENTRY glDeleteObjectBufferATI (GLuint);
20679+/* ERO End */
20680+GLAPI void APIENTRY glArrayObjectATI (GLenum, GLint, GLenum, GLsizei, GLuint, GLuint);
20681+GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum, GLenum, GLfloat *);
20682+GLAPI void APIENTRY glGetArrayObjectivATI (GLenum, GLenum, GLint *);
20683+GLAPI void APIENTRY glVariantArrayObjectATI (GLuint, GLenum, GLsizei, GLuint, GLuint);
20684+GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint, GLenum, GLfloat *);
20685+GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint, GLenum, GLint *);
20686+#endif /* GL_GLEXT_PROTOTYPES */
20687+typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage);
20688+typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer);
20689+typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve);
20690+typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params);
20691+typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params);
20692+typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer);
20693+typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
20694+typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params);
20695+typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params);
20696+typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
20697+typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params);
20698+typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params);
20699+#endif
20700+
20701+#ifndef GL_EXT_vertex_shader
20702+#define GL_EXT_vertex_shader 1
20703+#ifdef GL_GLEXT_PROTOTYPES
20704+GLAPI void APIENTRY glBeginVertexShaderEXT (void);
20705+GLAPI void APIENTRY glEndVertexShaderEXT (void);
20706+GLAPI void APIENTRY glBindVertexShaderEXT (GLuint);
20707+GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint);
20708+GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint);
20709+GLAPI void APIENTRY glShaderOp1EXT (GLenum, GLuint, GLuint);
20710+GLAPI void APIENTRY glShaderOp2EXT (GLenum, GLuint, GLuint, GLuint);
20711+GLAPI void APIENTRY glShaderOp3EXT (GLenum, GLuint, GLuint, GLuint, GLuint);
20712+GLAPI void APIENTRY glSwizzleEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum);
20713+GLAPI void APIENTRY glWriteMaskEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum);
20714+GLAPI void APIENTRY glInsertComponentEXT (GLuint, GLuint, GLuint);
20715+GLAPI void APIENTRY glExtractComponentEXT (GLuint, GLuint, GLuint);
20716+GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum, GLenum, GLenum, GLuint);
20717+GLAPI void APIENTRY glSetInvariantEXT (GLuint, GLenum, const GLvoid *);
20718+GLAPI void APIENTRY glSetLocalConstantEXT (GLuint, GLenum, const GLvoid *);
20719+GLAPI void APIENTRY glVariantbvEXT (GLuint, const GLbyte *);
20720+GLAPI void APIENTRY glVariantsvEXT (GLuint, const GLshort *);
20721+GLAPI void APIENTRY glVariantivEXT (GLuint, const GLint *);
20722+GLAPI void APIENTRY glVariantfvEXT (GLuint, const GLfloat *);
20723+GLAPI void APIENTRY glVariantdvEXT (GLuint, const GLdouble *);
20724+GLAPI void APIENTRY glVariantubvEXT (GLuint, const GLubyte *);
20725+GLAPI void APIENTRY glVariantusvEXT (GLuint, const GLushort *);
20726+GLAPI void APIENTRY glVariantuivEXT (GLuint, const GLuint *);
20727+GLAPI void APIENTRY glVariantPointerEXT (GLuint, GLenum, GLuint, const GLvoid *);
20728+GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint);
20729+GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint);
20730+GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum, GLenum);
20731+GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum, GLenum);
20732+GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum, GLenum, GLenum);
20733+GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum, GLenum);
20734+GLAPI GLuint APIENTRY glBindParameterEXT (GLenum);
20735+GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint, GLenum);
20736+GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint, GLenum, GLboolean *);
20737+GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint, GLenum, GLint *);
20738+GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint, GLenum, GLfloat *);
20739+GLAPI void APIENTRY glGetVariantPointervEXT (GLuint, GLenum, GLvoid* *);
20740+GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint, GLenum, GLboolean *);
20741+GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint, GLenum, GLint *);
20742+GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint, GLenum, GLfloat *);
20743+GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint, GLenum, GLboolean *);
20744+GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint, GLenum, GLint *);
20745+GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint, GLenum, GLfloat *);
20746+#endif /* GL_GLEXT_PROTOTYPES */
20747+typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void);
20748+typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void);
20749+typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id);
20750+typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range);
20751+typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id);
20752+typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1);
20753+typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
20754+typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
20755+typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
20756+typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
20757+typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
20758+typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
20759+typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);
20760+typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);
20761+typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);
20762+typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr);
20763+typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr);
20764+typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr);
20765+typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr);
20766+typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr);
20767+typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr);
20768+typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr);
20769+typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr);
20770+typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr);
20771+typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
20772+typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
20773+typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value);
20774+typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value);
20775+typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value);
20776+typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value);
20777+typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value);
20778+typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap);
20779+typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
20780+typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
20781+typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
20782+typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data);
20783+typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
20784+typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
20785+typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
20786+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
20787+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
20788+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
20789+#endif
20790+
20791+#ifndef GL_ATI_vertex_streams
20792+#define GL_ATI_vertex_streams 1
20793+#ifdef GL_GLEXT_PROTOTYPES
20794+GLAPI void APIENTRY glVertexStream1sATI (GLenum, GLshort);
20795+GLAPI void APIENTRY glVertexStream1svATI (GLenum, const GLshort *);
20796+GLAPI void APIENTRY glVertexStream1iATI (GLenum, GLint);
20797+GLAPI void APIENTRY glVertexStream1ivATI (GLenum, const GLint *);
20798+GLAPI void APIENTRY glVertexStream1fATI (GLenum, GLfloat);
20799+GLAPI void APIENTRY glVertexStream1fvATI (GLenum, const GLfloat *);
20800+GLAPI void APIENTRY glVertexStream1dATI (GLenum, GLdouble);
20801+GLAPI void APIENTRY glVertexStream1dvATI (GLenum, const GLdouble *);
20802+GLAPI void APIENTRY glVertexStream2sATI (GLenum, GLshort, GLshort);
20803+GLAPI void APIENTRY glVertexStream2svATI (GLenum, const GLshort *);
20804+GLAPI void APIENTRY glVertexStream2iATI (GLenum, GLint, GLint);
20805+GLAPI void APIENTRY glVertexStream2ivATI (GLenum, const GLint *);
20806+GLAPI void APIENTRY glVertexStream2fATI (GLenum, GLfloat, GLfloat);
20807+GLAPI void APIENTRY glVertexStream2fvATI (GLenum, const GLfloat *);
20808+GLAPI void APIENTRY glVertexStream2dATI (GLenum, GLdouble, GLdouble);
20809+GLAPI void APIENTRY glVertexStream2dvATI (GLenum, const GLdouble *);
20810+GLAPI void APIENTRY glVertexStream3sATI (GLenum, GLshort, GLshort, GLshort);
20811+GLAPI void APIENTRY glVertexStream3svATI (GLenum, const GLshort *);
20812+GLAPI void APIENTRY glVertexStream3iATI (GLenum, GLint, GLint, GLint);
20813+GLAPI void APIENTRY glVertexStream3ivATI (GLenum, const GLint *);
20814+GLAPI void APIENTRY glVertexStream3fATI (GLenum, GLfloat, GLfloat, GLfloat);
20815+GLAPI void APIENTRY glVertexStream3fvATI (GLenum, const GLfloat *);
20816+GLAPI void APIENTRY glVertexStream3dATI (GLenum, GLdouble, GLdouble, GLdouble);
20817+GLAPI void APIENTRY glVertexStream3dvATI (GLenum, const GLdouble *);
20818+GLAPI void APIENTRY glVertexStream4sATI (GLenum, GLshort, GLshort, GLshort, GLshort);
20819+GLAPI void APIENTRY glVertexStream4svATI (GLenum, const GLshort *);
20820+GLAPI void APIENTRY glVertexStream4iATI (GLenum, GLint, GLint, GLint, GLint);
20821+GLAPI void APIENTRY glVertexStream4ivATI (GLenum, const GLint *);
20822+GLAPI void APIENTRY glVertexStream4fATI (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
20823+GLAPI void APIENTRY glVertexStream4fvATI (GLenum, const GLfloat *);
20824+GLAPI void APIENTRY glVertexStream4dATI (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
20825+GLAPI void APIENTRY glVertexStream4dvATI (GLenum, const GLdouble *);
20826+GLAPI void APIENTRY glNormalStream3bATI (GLenum, GLbyte, GLbyte, GLbyte);
20827+GLAPI void APIENTRY glNormalStream3bvATI (GLenum, const GLbyte *);
20828+GLAPI void APIENTRY glNormalStream3sATI (GLenum, GLshort, GLshort, GLshort);
20829+GLAPI void APIENTRY glNormalStream3svATI (GLenum, const GLshort *);
20830+GLAPI void APIENTRY glNormalStream3iATI (GLenum, GLint, GLint, GLint);
20831+GLAPI void APIENTRY glNormalStream3ivATI (GLenum, const GLint *);
20832+GLAPI void APIENTRY glNormalStream3fATI (GLenum, GLfloat, GLfloat, GLfloat);
20833+GLAPI void APIENTRY glNormalStream3fvATI (GLenum, const GLfloat *);
20834+GLAPI void APIENTRY glNormalStream3dATI (GLenum, GLdouble, GLdouble, GLdouble);
20835+GLAPI void APIENTRY glNormalStream3dvATI (GLenum, const GLdouble *);
20836+GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum);
20837+GLAPI void APIENTRY glVertexBlendEnviATI (GLenum, GLint);
20838+GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum, GLfloat);
20839+#endif /* GL_GLEXT_PROTOTYPES */
20840+typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x);
20841+typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords);
20842+typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x);
20843+typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords);
20844+typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x);
20845+typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords);
20846+typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x);
20847+typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords);
20848+typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y);
20849+typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords);
20850+typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y);
20851+typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords);
20852+typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y);
20853+typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords);
20854+typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y);
20855+typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords);
20856+typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z);
20857+typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
20858+typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z);
20859+typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
20860+typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
20861+typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
20862+typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
20863+typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
20864+typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
20865+typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords);
20866+typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w);
20867+typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords);
20868+typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20869+typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords);
20870+typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
20871+typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords);
20872+typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);
20873+typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords);
20874+typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz);
20875+typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
20876+typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz);
20877+typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
20878+typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);
20879+typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
20880+typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);
20881+typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
20882+typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream);
20883+typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param);
20884+typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param);
20885+#endif
20886+
20887+#ifndef GL_ATI_element_array
20888+#define GL_ATI_element_array 1
20889+#ifdef GL_GLEXT_PROTOTYPES
20890+GLAPI void APIENTRY glElementPointerATI (GLenum, const GLvoid *);
20891+GLAPI void APIENTRY glDrawElementArrayATI (GLenum, GLsizei);
20892+GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum, GLuint, GLuint, GLsizei);
20893+#endif /* GL_GLEXT_PROTOTYPES */
20894+typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer);
20895+typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count);
20896+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count);
20897+#endif
20898+
20899+#ifndef GL_SUN_mesh_array
20900+#define GL_SUN_mesh_array 1
20901+#ifdef GL_GLEXT_PROTOTYPES
20902+GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum, GLint, GLsizei, GLsizei);
20903+#endif /* GL_GLEXT_PROTOTYPES */
20904+typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width);
20905+#endif
20906+
20907+#ifndef GL_SUN_slice_accum
20908+#define GL_SUN_slice_accum 1
20909+#endif
20910+
20911+#ifndef GL_NV_multisample_filter_hint
20912+#define GL_NV_multisample_filter_hint 1
20913+#endif
20914+
20915+#ifndef GL_NV_depth_clamp
20916+#define GL_NV_depth_clamp 1
20917+#endif
20918+
20919+#ifndef GL_NV_occlusion_query
20920+#define GL_NV_occlusion_query 1
20921+#ifdef GL_GLEXT_PROTOTYPES
20922+GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei, GLuint *);
20923+GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei, const GLuint *);
20924+GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint);
20925+GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint);
20926+GLAPI void APIENTRY glEndOcclusionQueryNV (void);
20927+GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint, GLenum, GLint *);
20928+GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint, GLenum, GLuint *);
20929+#endif /* GL_GLEXT_PROTOTYPES */
20930+typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids);
20931+typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids);
20932+typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id);
20933+typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id);
20934+typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void);
20935+typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params);
20936+typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params);
20937+#endif
20938+
20939+#ifndef GL_NV_point_sprite
20940+#define GL_NV_point_sprite 1
20941+#ifdef GL_GLEXT_PROTOTYPES
20942+GLAPI void APIENTRY glPointParameteriNV (GLenum, GLint);
20943+GLAPI void APIENTRY glPointParameterivNV (GLenum, const GLint *);
20944+#endif /* GL_GLEXT_PROTOTYPES */
20945+typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param);
20946+typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
20947+#endif
20948+
20949+#ifndef GL_NV_texture_shader3
20950+#define GL_NV_texture_shader3 1
20951+#endif
20952+
20953+#ifndef GL_NV_vertex_program1_1
20954+#define GL_NV_vertex_program1_1 1
20955+#endif
20956+
20957+#ifndef GL_EXT_shadow_funcs
20958+#define GL_EXT_shadow_funcs 1
20959+#endif
20960+
20961+#ifndef GL_EXT_stencil_two_side
20962+#define GL_EXT_stencil_two_side 1
20963+#ifdef GL_GLEXT_PROTOTYPES
20964+GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum);
20965+#endif /* GL_GLEXT_PROTOTYPES */
20966+typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face);
20967+#endif
20968+
20969+#ifndef GL_ATI_text_fragment_shader
20970+#define GL_ATI_text_fragment_shader 1
20971+#endif
20972+
20973+#ifndef GL_APPLE_client_storage
20974+#define GL_APPLE_client_storage 1
20975+#endif
20976+
20977+#ifndef GL_APPLE_element_array
20978+#define GL_APPLE_element_array 1
20979+#ifdef GL_GLEXT_PROTOTYPES
20980+GLAPI void APIENTRY glElementPointerAPPLE (GLenum, const GLvoid *);
20981+GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum, GLint, GLsizei);
20982+GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, GLint, GLsizei);
20983+GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum, const GLint *, const GLsizei *, GLsizei);
20984+GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, const GLint *, const GLsizei *, GLsizei);
20985+#endif /* GL_GLEXT_PROTOTYPES */
20986+typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid *pointer);
20987+typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count);
20988+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
20989+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
20990+typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);
20991+#endif
20992+
20993+#ifndef GL_APPLE_fence
20994+#define GL_APPLE_fence 1
20995+#ifdef GL_GLEXT_PROTOTYPES
20996+GLAPI void APIENTRY glGenFencesAPPLE (GLsizei, GLuint *);
20997+GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei, const GLuint *);
20998+GLAPI void APIENTRY glSetFenceAPPLE (GLuint);
20999+GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint);
21000+GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint);
21001+GLAPI void APIENTRY glFinishFenceAPPLE (GLuint);
21002+GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum, GLuint);
21003+GLAPI void APIENTRY glFinishObjectAPPLE (GLenum, GLint);
21004+#endif /* GL_GLEXT_PROTOTYPES */
21005+typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences);
21006+typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences);
21007+typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence);
21008+typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence);
21009+typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence);
21010+typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence);
21011+typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name);
21012+typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);
21013+#endif
21014+
21015+#ifndef GL_APPLE_vertex_array_object
21016+#define GL_APPLE_vertex_array_object 1
21017+#ifdef GL_GLEXT_PROTOTYPES
21018+GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint);
21019+GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei, const GLuint *);
21020+GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, GLuint *);
21021+GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint);
21022+#endif /* GL_GLEXT_PROTOTYPES */
21023+typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
21024+typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
21025+typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);
21026+typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
21027+#endif
21028+
21029+#ifndef GL_APPLE_vertex_array_range
21030+#define GL_APPLE_vertex_array_range 1
21031+#ifdef GL_GLEXT_PROTOTYPES
21032+GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei, GLvoid *);
21033+GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei, GLvoid *);
21034+GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum, GLint);
21035+#endif /* GL_GLEXT_PROTOTYPES */
21036+typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);
21037+typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);
21038+typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param);
21039+#endif
21040+
21041+#ifndef GL_APPLE_ycbcr_422
21042+#define GL_APPLE_ycbcr_422 1
21043+#endif
21044+
21045+#ifndef GL_S3_s3tc
21046+#define GL_S3_s3tc 1
21047+#endif
21048+
21049+#ifndef GL_ATI_draw_buffers
21050+#define GL_ATI_draw_buffers 1
21051+#ifdef GL_GLEXT_PROTOTYPES
21052+GLAPI void APIENTRY glDrawBuffersATI (GLsizei, const GLenum *);
21053+#endif /* GL_GLEXT_PROTOTYPES */
21054+typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs);
21055+#endif
21056+
21057+#ifndef GL_ATI_pixel_format_float
21058+#define GL_ATI_pixel_format_float 1
21059+/* This is really a WGL extension, but defines some associated GL enums.
21060+ * ATI does not export "GL_ATI_pixel_format_float" in the GL_EXTENSIONS string.
21061+ */
21062+#endif
21063+
21064+#ifndef GL_ATI_texture_env_combine3
21065+#define GL_ATI_texture_env_combine3 1
21066+#endif
21067+
21068+#ifndef GL_ATI_texture_float
21069+#define GL_ATI_texture_float 1
21070+#endif
21071+
21072+#ifndef GL_NV_float_buffer
21073+#define GL_NV_float_buffer 1
21074+#endif
21075+
21076+#ifndef GL_NV_fragment_program
21077+#define GL_NV_fragment_program 1
21078+/* Some NV_fragment_program entry points are shared with ARB_vertex_program. */
21079+#ifdef GL_GLEXT_PROTOTYPES
21080+GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat);
21081+GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble);
21082+GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint, GLsizei, const GLubyte *, const GLfloat *);
21083+GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint, GLsizei, const GLubyte *, const GLdouble *);
21084+GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint, GLsizei, const GLubyte *, GLfloat *);
21085+GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint, GLsizei, const GLubyte *, GLdouble *);
21086+#endif /* GL_GLEXT_PROTOTYPES */
21087+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
21088+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
21089+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
21090+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
21091+typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
21092+typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
21093+#endif
21094+
21095+#ifndef GL_NV_half_float
21096+#define GL_NV_half_float 1
21097+#ifdef GL_GLEXT_PROTOTYPES
21098+GLAPI void APIENTRY glVertex2hNV (GLhalfNV, GLhalfNV);
21099+GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *);
21100+GLAPI void APIENTRY glVertex3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21101+GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *);
21102+GLAPI void APIENTRY glVertex4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21103+GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *);
21104+GLAPI void APIENTRY glNormal3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21105+GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *);
21106+GLAPI void APIENTRY glColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21107+GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *);
21108+GLAPI void APIENTRY glColor4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21109+GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *);
21110+GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV);
21111+GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *);
21112+GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV, GLhalfNV);
21113+GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *);
21114+GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21115+GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *);
21116+GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21117+GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *);
21118+GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum, GLhalfNV);
21119+GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum, const GLhalfNV *);
21120+GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum, GLhalfNV, GLhalfNV);
21121+GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum, const GLhalfNV *);
21122+GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV);
21123+GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum, const GLhalfNV *);
21124+GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21125+GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum, const GLhalfNV *);
21126+GLAPI void APIENTRY glFogCoordhNV (GLhalfNV);
21127+GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *);
21128+GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21129+GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *);
21130+GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV);
21131+GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *);
21132+GLAPI void APIENTRY glVertexAttrib1hNV (GLuint, GLhalfNV);
21133+GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint, const GLhalfNV *);
21134+GLAPI void APIENTRY glVertexAttrib2hNV (GLuint, GLhalfNV, GLhalfNV);
21135+GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint, const GLhalfNV *);
21136+GLAPI void APIENTRY glVertexAttrib3hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV);
21137+GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint, const GLhalfNV *);
21138+GLAPI void APIENTRY glVertexAttrib4hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21139+GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint, const GLhalfNV *);
21140+GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint, GLsizei, const GLhalfNV *);
21141+GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint, GLsizei, const GLhalfNV *);
21142+GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint, GLsizei, const GLhalfNV *);
21143+GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint, GLsizei, const GLhalfNV *);
21144+#endif /* GL_GLEXT_PROTOTYPES */
21145+typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y);
21146+typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v);
21147+typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z);
21148+typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v);
21149+typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
21150+typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v);
21151+typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);
21152+typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v);
21153+typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
21154+typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v);
21155+typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);
21156+typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v);
21157+typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s);
21158+typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v);
21159+typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t);
21160+typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v);
21161+typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r);
21162+typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v);
21163+typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
21164+typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v);
21165+typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s);
21166+typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v);
21167+typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t);
21168+typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v);
21169+typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);
21170+typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v);
21171+typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
21172+typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v);
21173+typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog);
21174+typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog);
21175+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
21176+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v);
21177+typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight);
21178+typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight);
21179+typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x);
21180+typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v);
21181+typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y);
21182+typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v);
21183+typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);
21184+typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v);
21185+typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
21186+typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v);
21187+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21188+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21189+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21190+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21191+#endif
21192+
21193+#ifndef GL_NV_pixel_data_range
21194+#define GL_NV_pixel_data_range 1
21195+#ifdef GL_GLEXT_PROTOTYPES
21196+GLAPI void APIENTRY glPixelDataRangeNV (GLenum, GLsizei, GLvoid *);
21197+GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum);
21198+#endif /* GL_GLEXT_PROTOTYPES */
21199+typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, GLvoid *pointer);
21200+typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target);
21201+#endif
21202+
21203+#ifndef GL_NV_primitive_restart
21204+#define GL_NV_primitive_restart 1
21205+#ifdef GL_GLEXT_PROTOTYPES
21206+GLAPI void APIENTRY glPrimitiveRestartNV (void);
21207+GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint);
21208+#endif /* GL_GLEXT_PROTOTYPES */
21209+typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void);
21210+typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index);
21211+#endif
21212+
21213+#ifndef GL_NV_texture_expand_normal
21214+#define GL_NV_texture_expand_normal 1
21215+#endif
21216+
21217+#ifndef GL_NV_vertex_program2
21218+#define GL_NV_vertex_program2 1
21219+#endif
21220+
21221+#ifndef GL_ATI_map_object_buffer
21222+#define GL_ATI_map_object_buffer 1
21223+#ifdef GL_GLEXT_PROTOTYPES
21224+GLAPI GLvoid* APIENTRY glMapObjectBufferATI (GLuint);
21225+GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint);
21226+#endif /* GL_GLEXT_PROTOTYPES */
21227+typedef GLvoid* (APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer);
21228+typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer);
21229+#endif
21230+
21231+#ifndef GL_ATI_separate_stencil
21232+#define GL_ATI_separate_stencil 1
21233+#ifdef GL_GLEXT_PROTOTYPES
21234+GLAPI void APIENTRY glStencilOpSeparateATI (GLenum, GLenum, GLenum, GLenum);
21235+GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum, GLenum, GLint, GLuint);
21236+#endif /* GL_GLEXT_PROTOTYPES */
21237+typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
21238+typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
21239+#endif
21240+
21241+#ifndef GL_ATI_vertex_attrib_array_object
21242+#define GL_ATI_vertex_attrib_array_object 1
21243+#ifdef GL_GLEXT_PROTOTYPES
21244+GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint, GLint, GLenum, GLboolean, GLsizei, GLuint, GLuint);
21245+GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint, GLenum, GLfloat *);
21246+GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint, GLenum, GLint *);
21247+#endif /* GL_GLEXT_PROTOTYPES */
21248+typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
21249+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params);
21250+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params);
21251+#endif
21252+
21253+#ifndef GL_OES_read_format
21254+#define GL_OES_read_format 1
21255+#endif
21256+
21257+#ifndef GL_EXT_depth_bounds_test
21258+#define GL_EXT_depth_bounds_test 1
21259+#ifdef GL_GLEXT_PROTOTYPES
21260+GLAPI void APIENTRY glDepthBoundsEXT (GLclampd, GLclampd);
21261+#endif /* GL_GLEXT_PROTOTYPES */
21262+typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax);
21263+#endif
21264+
21265+#ifndef GL_EXT_texture_mirror_clamp
21266+#define GL_EXT_texture_mirror_clamp 1
21267+#endif
21268+
21269+#ifndef GL_EXT_blend_equation_separate
21270+#define GL_EXT_blend_equation_separate 1
21271+#ifdef GL_GLEXT_PROTOTYPES
21272+GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum, GLenum);
21273+#endif /* GL_GLEXT_PROTOTYPES */
21274+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha);
21275+#endif
21276+
21277+#ifndef GL_MESA_pack_invert
21278+#define GL_MESA_pack_invert 1
21279+#endif
21280+
21281+#ifndef GL_MESA_ycbcr_texture
21282+#define GL_MESA_ycbcr_texture 1
21283+#endif
21284+
21285+#ifndef GL_EXT_pixel_buffer_object
21286+#define GL_EXT_pixel_buffer_object 1
21287+#endif
21288+
21289+#ifndef GL_NV_fragment_program_option
21290+#define GL_NV_fragment_program_option 1
21291+#endif
21292+
21293+#ifndef GL_NV_fragment_program2
21294+#define GL_NV_fragment_program2 1
21295+#endif
21296+
21297+#ifndef GL_NV_vertex_program2_option
21298+#define GL_NV_vertex_program2_option 1
21299+#endif
21300+
21301+#ifndef GL_NV_vertex_program3
21302+#define GL_NV_vertex_program3 1
21303+#endif
21304+
21305+#ifndef GL_EXT_framebuffer_object
21306+#define GL_EXT_framebuffer_object 1
21307+#ifdef GL_GLEXT_PROTOTYPES
21308+GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint);
21309+GLAPI void APIENTRY glBindRenderbufferEXT (GLenum, GLuint);
21310+GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei, const GLuint *);
21311+GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei, GLuint *);
21312+GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum, GLenum, GLsizei, GLsizei);
21313+GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum, GLenum, GLint *);
21314+GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint);
21315+GLAPI void APIENTRY glBindFramebufferEXT (GLenum, GLuint);
21316+GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei, const GLuint *);
21317+GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei, GLuint *);
21318+GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum);
21319+GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
21320+GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
21321+GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLint);
21322+GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum, GLenum, GLenum, GLuint);
21323+GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum, GLenum, GLenum, GLint *);
21324+GLAPI void APIENTRY glGenerateMipmapEXT (GLenum);
21325+#endif /* GL_GLEXT_PROTOTYPES */
21326+typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);
21327+typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);
21328+typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);
21329+typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);
21330+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
21331+typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
21332+typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);
21333+typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
21334+typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);
21335+typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);
21336+typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);
21337+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
21338+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
21339+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
21340+typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
21341+typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
21342+typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);
21343+#endif
21344+
21345+#ifndef GL_GREMEDY_string_marker
21346+#define GL_GREMEDY_string_marker 1
21347+#ifdef GL_GLEXT_PROTOTYPES
21348+GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei, const GLvoid *);
21349+#endif /* GL_GLEXT_PROTOTYPES */
21350+typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string);
21351+#endif
21352+
21353+#ifndef GL_EXT_packed_depth_stencil
21354+#define GL_EXT_packed_depth_stencil 1
21355+#endif
21356+
21357+#ifndef GL_EXT_stencil_clear_tag
21358+#define GL_EXT_stencil_clear_tag 1
21359+#ifdef GL_GLEXT_PROTOTYPES
21360+GLAPI void APIENTRY glStencilClearTagEXT (GLsizei, GLuint);
21361+#endif /* GL_GLEXT_PROTOTYPES */
21362+typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag);
21363+#endif
21364+
21365+#ifndef GL_EXT_texture_sRGB
21366+#define GL_EXT_texture_sRGB 1
21367+#endif
21368+
21369+#ifndef GL_EXT_framebuffer_blit
21370+#define GL_EXT_framebuffer_blit 1
21371+#ifdef GL_GLEXT_PROTOTYPES
21372+GLAPI void APIENTRY glBlitFramebufferEXT (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum);
21373+#endif /* GL_GLEXT_PROTOTYPES */
21374+typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
21375+#endif
21376+
21377+#ifndef GL_EXT_framebuffer_multisample
21378+#define GL_EXT_framebuffer_multisample 1
21379+#ifdef GL_GLEXT_PROTOTYPES
21380+GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
21381+#endif /* GL_GLEXT_PROTOTYPES */
21382+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
21383+#endif
21384+
21385+#ifndef GL_MESAX_texture_stack
21386+#define GL_MESAX_texture_stack 1
21387+#endif
21388+
21389+#ifndef GL_EXT_timer_query
21390+#define GL_EXT_timer_query 1
21391+#ifdef GL_GLEXT_PROTOTYPES
21392+GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint, GLenum, GLint64EXT *);
21393+GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint, GLenum, GLuint64EXT *);
21394+#endif /* GL_GLEXT_PROTOTYPES */
21395+typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params);
21396+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params);
21397+#endif
21398+
21399+#ifndef GL_EXT_gpu_program_parameters
21400+#define GL_EXT_gpu_program_parameters 1
21401+#ifdef GL_GLEXT_PROTOTYPES
21402+GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *);
21403+GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *);
21404+#endif /* GL_GLEXT_PROTOTYPES */
21405+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
21406+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
21407+#endif
21408+
21409+#ifndef GL_APPLE_flush_buffer_range
21410+#define GL_APPLE_flush_buffer_range 1
21411+#ifdef GL_GLEXT_PROTOTYPES
21412+GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum, GLenum, GLint);
21413+GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum, GLintptr, GLsizeiptr);
21414+#endif /* GL_GLEXT_PROTOTYPES */
21415+typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param);
21416+typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size);
21417+#endif
21418+
21419+#ifndef GL_NV_gpu_program4
21420+#define GL_NV_gpu_program4 1
21421+#ifdef GL_GLEXT_PROTOTYPES
21422+GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint);
21423+GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum, GLuint, const GLint *);
21424+GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *);
21425+GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
21426+GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum, GLuint, const GLuint *);
21427+GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *);
21428+GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint);
21429+GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum, GLuint, const GLint *);
21430+GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *);
21431+GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
21432+GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum, GLuint, const GLuint *);
21433+GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *);
21434+GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum, GLuint, GLint *);
21435+GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum, GLuint, GLuint *);
21436+GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum, GLuint, GLint *);
21437+GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum, GLuint, GLuint *);
21438+#endif /* GL_GLEXT_PROTOTYPES */
21439+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
21440+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
21441+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
21442+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
21443+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
21444+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
21445+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
21446+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
21447+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
21448+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
21449+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
21450+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
21451+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
21452+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
21453+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
21454+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
21455+#endif
21456+
21457+#ifndef GL_NV_geometry_program4
21458+#define GL_NV_geometry_program4 1
21459+#ifdef GL_GLEXT_PROTOTYPES
21460+GLAPI void APIENTRY glProgramVertexLimitNV (GLenum, GLint);
21461+GLAPI void APIENTRY glFramebufferTextureEXT (GLenum, GLenum, GLuint, GLint);
21462+GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum, GLenum, GLuint, GLint, GLint);
21463+GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum, GLenum, GLuint, GLint, GLenum);
21464+#endif /* GL_GLEXT_PROTOTYPES */
21465+typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit);
21466+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
21467+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
21468+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
21469+#endif
21470+
21471+#ifndef GL_EXT_geometry_shader4
21472+#define GL_EXT_geometry_shader4 1
21473+#ifdef GL_GLEXT_PROTOTYPES
21474+GLAPI void APIENTRY glProgramParameteriEXT (GLuint, GLenum, GLint);
21475+#endif /* GL_GLEXT_PROTOTYPES */
21476+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
21477+#endif
21478+
21479+#ifndef GL_NV_vertex_program4
21480+#define GL_NV_vertex_program4 1
21481+#ifdef GL_GLEXT_PROTOTYPES
21482+GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint, GLint);
21483+GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint, GLint, GLint);
21484+GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint, GLint, GLint, GLint);
21485+GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint, GLint, GLint, GLint, GLint);
21486+GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint, GLuint);
21487+GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint, GLuint, GLuint);
21488+GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint, GLuint, GLuint, GLuint);
21489+GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint, GLuint, GLuint, GLuint, GLuint);
21490+GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint, const GLint *);
21491+GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint, const GLint *);
21492+GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint, const GLint *);
21493+GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint, const GLint *);
21494+GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint, const GLuint *);
21495+GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint, const GLuint *);
21496+GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint, const GLuint *);
21497+GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint, const GLuint *);
21498+GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint, const GLbyte *);
21499+GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint, const GLshort *);
21500+GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint, const GLubyte *);
21501+GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint, const GLushort *);
21502+GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint, GLint, GLenum, GLsizei, const GLvoid *);
21503+GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint, GLenum, GLint *);
21504+GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint, GLenum, GLuint *);
21505+#endif /* GL_GLEXT_PROTOTYPES */
21506+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x);
21507+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y);
21508+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z);
21509+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
21510+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x);
21511+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y);
21512+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
21513+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
21514+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v);
21515+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v);
21516+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v);
21517+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v);
21518+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v);
21519+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v);
21520+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v);
21521+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v);
21522+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v);
21523+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v);
21524+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v);
21525+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v);
21526+typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
21527+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params);
21528+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params);
21529+#endif
21530+
21531+#ifndef GL_EXT_gpu_shader4
21532+#define GL_EXT_gpu_shader4 1
21533+#ifdef GL_GLEXT_PROTOTYPES
21534+GLAPI void APIENTRY glGetUniformuivEXT (GLuint, GLint, GLuint *);
21535+GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint, GLuint, const GLchar *);
21536+GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint, const GLchar *);
21537+GLAPI void APIENTRY glUniform1uiEXT (GLint, GLuint);
21538+GLAPI void APIENTRY glUniform2uiEXT (GLint, GLuint, GLuint);
21539+GLAPI void APIENTRY glUniform3uiEXT (GLint, GLuint, GLuint, GLuint);
21540+GLAPI void APIENTRY glUniform4uiEXT (GLint, GLuint, GLuint, GLuint, GLuint);
21541+GLAPI void APIENTRY glUniform1uivEXT (GLint, GLsizei, const GLuint *);
21542+GLAPI void APIENTRY glUniform2uivEXT (GLint, GLsizei, const GLuint *);
21543+GLAPI void APIENTRY glUniform3uivEXT (GLint, GLsizei, const GLuint *);
21544+GLAPI void APIENTRY glUniform4uivEXT (GLint, GLsizei, const GLuint *);
21545+#endif /* GL_GLEXT_PROTOTYPES */
21546+typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params);
21547+typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name);
21548+typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name);
21549+typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0);
21550+typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1);
21551+typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
21552+typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
21553+typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
21554+typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
21555+typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
21556+typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
21557+#endif
21558+
21559+#ifndef GL_EXT_draw_instanced
21560+#define GL_EXT_draw_instanced 1
21561+#ifdef GL_GLEXT_PROTOTYPES
21562+GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum, GLint, GLsizei, GLsizei);
21563+GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum, GLsizei, GLenum, const GLvoid *, GLsizei);
21564+#endif /* GL_GLEXT_PROTOTYPES */
21565+typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
21566+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
21567+#endif
21568+
21569+#ifndef GL_EXT_packed_float
21570+#define GL_EXT_packed_float 1
21571+#endif
21572+
21573+#ifndef GL_EXT_texture_array
21574+#define GL_EXT_texture_array 1
21575+#endif
21576+
21577+#ifndef GL_EXT_texture_buffer_object
21578+#define GL_EXT_texture_buffer_object 1
21579+#ifdef GL_GLEXT_PROTOTYPES
21580+GLAPI void APIENTRY glTexBufferEXT (GLenum, GLenum, GLuint);
21581+#endif /* GL_GLEXT_PROTOTYPES */
21582+typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
21583+#endif
21584+
21585+#ifndef GL_EXT_texture_compression_latc
21586+#define GL_EXT_texture_compression_latc 1
21587+#endif
21588+
21589+#ifndef GL_EXT_texture_compression_rgtc
21590+#define GL_EXT_texture_compression_rgtc 1
21591+#endif
21592+
21593+#ifndef GL_EXT_texture_shared_exponent
21594+#define GL_EXT_texture_shared_exponent 1
21595+#endif
21596+
21597+#ifndef GL_NV_depth_buffer_float
21598+#define GL_NV_depth_buffer_float 1
21599+#ifdef GL_GLEXT_PROTOTYPES
21600+GLAPI void APIENTRY glDepthRangedNV (GLdouble, GLdouble);
21601+GLAPI void APIENTRY glClearDepthdNV (GLdouble);
21602+GLAPI void APIENTRY glDepthBoundsdNV (GLdouble, GLdouble);
21603+#endif /* GL_GLEXT_PROTOTYPES */
21604+typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar);
21605+typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth);
21606+typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax);
21607+#endif
21608+
21609+#ifndef GL_NV_fragment_program4
21610+#define GL_NV_fragment_program4 1
21611+#endif
21612+
21613+#ifndef GL_NV_framebuffer_multisample_coverage
21614+#define GL_NV_framebuffer_multisample_coverage 1
21615+#ifdef GL_GLEXT_PROTOTYPES
21616+GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum, GLsizei, GLsizei, GLenum, GLsizei, GLsizei);
21617+#endif /* GL_GLEXT_PROTOTYPES */
21618+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
21619+#endif
21620+
21621+#ifndef GL_EXT_framebuffer_sRGB
21622+#define GL_EXT_framebuffer_sRGB 1
21623+#endif
21624+
21625+#ifndef GL_NV_geometry_shader4
21626+#define GL_NV_geometry_shader4 1
21627+#endif
21628+
21629+#ifndef GL_NV_parameter_buffer_object
21630+#define GL_NV_parameter_buffer_object 1
21631+#ifdef GL_GLEXT_PROTOTYPES
21632+GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum, GLuint, GLuint, GLsizei, const GLfloat *);
21633+GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum, GLuint, GLuint, GLsizei, const GLint *);
21634+GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum, GLuint, GLuint, GLsizei, const GLuint *);
21635+#endif /* GL_GLEXT_PROTOTYPES */
21636+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params);
21637+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params);
21638+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params);
21639+#endif
21640+
21641+#ifndef GL_EXT_draw_buffers2
21642+#define GL_EXT_draw_buffers2 1
21643+#ifdef GL_GLEXT_PROTOTYPES
21644+GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint, GLboolean, GLboolean, GLboolean, GLboolean);
21645+GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum, GLuint, GLboolean *);
21646+GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum, GLuint, GLint *);
21647+GLAPI void APIENTRY glEnableIndexedEXT (GLenum, GLuint);
21648+GLAPI void APIENTRY glDisableIndexedEXT (GLenum, GLuint);
21649+GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum, GLuint);
21650+#endif /* GL_GLEXT_PROTOTYPES */
21651+typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
21652+typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data);
21653+typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data);
21654+typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
21655+typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
21656+typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index);
21657+#endif
21658+
21659+#ifndef GL_NV_transform_feedback
21660+#define GL_NV_transform_feedback 1
21661+#ifdef GL_GLEXT_PROTOTYPES
21662+GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum);
21663+GLAPI void APIENTRY glEndTransformFeedbackNV (void);
21664+GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint, const GLint *, GLenum);
21665+GLAPI void APIENTRY glBindBufferRangeNV (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr);
21666+GLAPI void APIENTRY glBindBufferOffsetNV (GLenum, GLuint, GLuint, GLintptr);
21667+GLAPI void APIENTRY glBindBufferBaseNV (GLenum, GLuint, GLuint);
21668+GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint, GLsizei, const GLint *, GLenum);
21669+GLAPI void APIENTRY glActiveVaryingNV (GLuint, const GLchar *);
21670+GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint, const GLchar *);
21671+GLAPI void APIENTRY glGetActiveVaryingNV (GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *);
21672+GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint, GLuint, GLint *);
21673+#endif /* GL_GLEXT_PROTOTYPES */
21674+typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode);
21675+typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void);
21676+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode);
21677+typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
21678+typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
21679+typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer);
21680+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
21681+typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name);
21682+typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name);
21683+typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
21684+typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location);
21685+#endif
21686+
21687+#ifndef GL_EXT_bindable_uniform
21688+#define GL_EXT_bindable_uniform 1
21689+#ifdef GL_GLEXT_PROTOTYPES
21690+GLAPI void APIENTRY glUniformBufferEXT (GLuint, GLint, GLuint);
21691+GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint, GLint);
21692+GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint, GLint);
21693+#endif /* GL_GLEXT_PROTOTYPES */
21694+typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer);
21695+typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location);
21696+typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location);
21697+#endif
21698+
21699+#ifndef GL_EXT_texture_integer
21700+#define GL_EXT_texture_integer 1
21701+#ifdef GL_GLEXT_PROTOTYPES
21702+GLAPI void APIENTRY glTexParameterIivEXT (GLenum, GLenum, const GLint *);
21703+GLAPI void APIENTRY glTexParameterIuivEXT (GLenum, GLenum, const GLuint *);
21704+GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum, GLenum, GLint *);
21705+GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum, GLenum, GLuint *);
21706+GLAPI void APIENTRY glClearColorIiEXT (GLint, GLint, GLint, GLint);
21707+GLAPI void APIENTRY glClearColorIuiEXT (GLuint, GLuint, GLuint, GLuint);
21708+#endif /* GL_GLEXT_PROTOTYPES */
21709+typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
21710+typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
21711+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
21712+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
21713+typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha);
21714+typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);
21715+#endif
21716+
21717+
21718+#ifdef __cplusplus
21719+}
21720+#endif
21721+
21722+#endif
21723+
21724+
21725+/* ERO */
21726+GLAPI void GLAPIENTRY fake_gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *data);
21727Index: git/target-i386/mesa_glu.h
21728===================================================================
21729--- /dev/null 1970-01-01 00:00:00.000000000 +0000
21730+++ git/target-i386/mesa_glu.h 2009-05-23 11:22:17.000000000 +0100
21731@@ -0,0 +1,354 @@
21732+/*
21733+** License Applicability. Except to the extent portions of this file are
21734+** made subject to an alternative license as permitted in the SGI Free
21735+** Software License B, Version 1.1 (the "License"), the contents of this
21736+** file are subject only to the provisions of the License. You may not use
21737+** this file except in compliance with the License. You may obtain a copy
21738+** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
21739+** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
21740+**
21741+** http://oss.sgi.com/projects/FreeB
21742+**
21743+** Note that, as provided in the License, the Software is distributed on an
21744+** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
21745+** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
21746+** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
21747+** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
21748+**
21749+** Original Code. The Original Code is: OpenGL Sample Implementation,
21750+** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
21751+** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
21752+** Copyright in any portions created by third parties is as indicated
21753+** elsewhere herein. All Rights Reserved.
21754+**
21755+** Additional Notice Provisions: This software was created using the
21756+** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
21757+** not been independently verified as being compliant with the OpenGL(R)
21758+** version 1.2.1 Specification.
21759+*/
21760+
21761+#ifndef __glu_h__
21762+#define __glu_h__
21763+
21764+#if defined(USE_MGL_NAMESPACE)
21765+#include "glu_mangle.h"
21766+#endif
21767+
21768+//#include <GL/gl.h>
21769+#include "mesa_gl.h"
21770+
21771+#ifndef GLAPIENTRY
21772+#define GLAPIENTRY
21773+#endif
21774+
21775+#ifndef GLAPIENTRYP
21776+#define GLAPIENTRYP GLAPIENTRY *
21777+#endif
21778+
21779+#ifdef GLAPI
21780+#undef GLAPI
21781+#endif
21782+
21783+# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GLU32)
21784+# define GLAPI __declspec(dllexport)
21785+# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
21786+# define GLAPI __declspec(dllimport)
21787+# else /* for use with static link lib build of Win32 edition only */
21788+# define GLAPI extern
21789+# endif /* _STATIC_MESA support */
21790+
21791+
21792+#ifndef GLAPI
21793+#define GLAPI
21794+#endif
21795+
21796+#ifdef __cplusplus
21797+extern "C" {
21798+#endif
21799+
21800+/*************************************************************/
21801+
21802+/* Extensions */
21803+#define GLU_EXT_object_space_tess 1
21804+#define GLU_EXT_nurbs_tessellator 1
21805+
21806+/* Boolean */
21807+#define GLU_FALSE 0
21808+#define GLU_TRUE 1
21809+
21810+/* Version */
21811+#define GLU_VERSION_1_1 1
21812+#define GLU_VERSION_1_2 1
21813+#define GLU_VERSION_1_3 1
21814+
21815+/* StringName */
21816+#define GLU_VERSION 100800
21817+#define GLU_EXTENSIONS 100801
21818+
21819+/* ErrorCode */
21820+#define GLU_INVALID_ENUM 100900
21821+#define GLU_INVALID_VALUE 100901
21822+#define GLU_OUT_OF_MEMORY 100902
21823+#define GLU_INCOMPATIBLE_GL_VERSION 100903
21824+#define GLU_INVALID_OPERATION 100904
21825+
21826+/* NurbsDisplay */
21827+/* GLU_FILL */
21828+#define GLU_OUTLINE_POLYGON 100240
21829+#define GLU_OUTLINE_PATCH 100241
21830+
21831+/* NurbsCallback */
21832+#define GLU_NURBS_ERROR 100103
21833+#define GLU_ERROR 100103
21834+#define GLU_NURBS_BEGIN 100164
21835+#define GLU_NURBS_BEGIN_EXT 100164
21836+#define GLU_NURBS_VERTEX 100165
21837+#define GLU_NURBS_VERTEX_EXT 100165
21838+#define GLU_NURBS_NORMAL 100166
21839+#define GLU_NURBS_NORMAL_EXT 100166
21840+#define GLU_NURBS_COLOR 100167
21841+#define GLU_NURBS_COLOR_EXT 100167
21842+#define GLU_NURBS_TEXTURE_COORD 100168
21843+#define GLU_NURBS_TEX_COORD_EXT 100168
21844+#define GLU_NURBS_END 100169
21845+#define GLU_NURBS_END_EXT 100169
21846+#define GLU_NURBS_BEGIN_DATA 100170
21847+#define GLU_NURBS_BEGIN_DATA_EXT 100170
21848+#define GLU_NURBS_VERTEX_DATA 100171
21849+#define GLU_NURBS_VERTEX_DATA_EXT 100171
21850+#define GLU_NURBS_NORMAL_DATA 100172
21851+#define GLU_NURBS_NORMAL_DATA_EXT 100172
21852+#define GLU_NURBS_COLOR_DATA 100173
21853+#define GLU_NURBS_COLOR_DATA_EXT 100173
21854+#define GLU_NURBS_TEXTURE_COORD_DATA 100174
21855+#define GLU_NURBS_TEX_COORD_DATA_EXT 100174
21856+#define GLU_NURBS_END_DATA 100175
21857+#define GLU_NURBS_END_DATA_EXT 100175
21858+
21859+/* NurbsError */
21860+#define GLU_NURBS_ERROR1 100251
21861+#define GLU_NURBS_ERROR2 100252
21862+#define GLU_NURBS_ERROR3 100253
21863+#define GLU_NURBS_ERROR4 100254
21864+#define GLU_NURBS_ERROR5 100255
21865+#define GLU_NURBS_ERROR6 100256
21866+#define GLU_NURBS_ERROR7 100257
21867+#define GLU_NURBS_ERROR8 100258
21868+#define GLU_NURBS_ERROR9 100259
21869+#define GLU_NURBS_ERROR10 100260
21870+#define GLU_NURBS_ERROR11 100261
21871+#define GLU_NURBS_ERROR12 100262
21872+#define GLU_NURBS_ERROR13 100263
21873+#define GLU_NURBS_ERROR14 100264
21874+#define GLU_NURBS_ERROR15 100265
21875+#define GLU_NURBS_ERROR16 100266
21876+#define GLU_NURBS_ERROR17 100267
21877+#define GLU_NURBS_ERROR18 100268
21878+#define GLU_NURBS_ERROR19 100269
21879+#define GLU_NURBS_ERROR20 100270
21880+#define GLU_NURBS_ERROR21 100271
21881+#define GLU_NURBS_ERROR22 100272
21882+#define GLU_NURBS_ERROR23 100273
21883+#define GLU_NURBS_ERROR24 100274
21884+#define GLU_NURBS_ERROR25 100275
21885+#define GLU_NURBS_ERROR26 100276
21886+#define GLU_NURBS_ERROR27 100277
21887+#define GLU_NURBS_ERROR28 100278
21888+#define GLU_NURBS_ERROR29 100279
21889+#define GLU_NURBS_ERROR30 100280
21890+#define GLU_NURBS_ERROR31 100281
21891+#define GLU_NURBS_ERROR32 100282
21892+#define GLU_NURBS_ERROR33 100283
21893+#define GLU_NURBS_ERROR34 100284
21894+#define GLU_NURBS_ERROR35 100285
21895+#define GLU_NURBS_ERROR36 100286
21896+#define GLU_NURBS_ERROR37 100287
21897+
21898+/* NurbsProperty */
21899+#define GLU_AUTO_LOAD_MATRIX 100200
21900+#define GLU_CULLING 100201
21901+#define GLU_SAMPLING_TOLERANCE 100203
21902+#define GLU_DISPLAY_MODE 100204
21903+#define GLU_PARAMETRIC_TOLERANCE 100202
21904+#define GLU_SAMPLING_METHOD 100205
21905+#define GLU_U_STEP 100206
21906+#define GLU_V_STEP 100207
21907+#define GLU_NURBS_MODE 100160
21908+#define GLU_NURBS_MODE_EXT 100160
21909+#define GLU_NURBS_TESSELLATOR 100161
21910+#define GLU_NURBS_TESSELLATOR_EXT 100161
21911+#define GLU_NURBS_RENDERER 100162
21912+#define GLU_NURBS_RENDERER_EXT 100162
21913+
21914+/* NurbsSampling */
21915+#define GLU_OBJECT_PARAMETRIC_ERROR 100208
21916+#define GLU_OBJECT_PARAMETRIC_ERROR_EXT 100208
21917+#define GLU_OBJECT_PATH_LENGTH 100209
21918+#define GLU_OBJECT_PATH_LENGTH_EXT 100209
21919+#define GLU_PATH_LENGTH 100215
21920+#define GLU_PARAMETRIC_ERROR 100216
21921+#define GLU_DOMAIN_DISTANCE 100217
21922+
21923+/* NurbsTrim */
21924+#define GLU_MAP1_TRIM_2 100210
21925+#define GLU_MAP1_TRIM_3 100211
21926+
21927+/* QuadricDrawStyle */
21928+#define GLU_POINT 100010
21929+#define GLU_LINE 100011
21930+#define GLU_FILL 100012
21931+#define GLU_SILHOUETTE 100013
21932+
21933+/* QuadricCallback */
21934+/* GLU_ERROR */
21935+
21936+/* QuadricNormal */
21937+#define GLU_SMOOTH 100000
21938+#define GLU_FLAT 100001
21939+#define GLU_NONE 100002
21940+
21941+/* QuadricOrientation */
21942+#define GLU_OUTSIDE 100020
21943+#define GLU_INSIDE 100021
21944+
21945+/* TessCallback */
21946+#define GLU_TESS_BEGIN 100100
21947+#define GLU_BEGIN 100100
21948+#define GLU_TESS_VERTEX 100101
21949+#define GLU_VERTEX 100101
21950+#define GLU_TESS_END 100102
21951+#define GLU_END 100102
21952+#define GLU_TESS_ERROR 100103
21953+#define GLU_TESS_EDGE_FLAG 100104
21954+#define GLU_EDGE_FLAG 100104
21955+#define GLU_TESS_COMBINE 100105
21956+#define GLU_TESS_BEGIN_DATA 100106
21957+#define GLU_TESS_VERTEX_DATA 100107
21958+#define GLU_TESS_END_DATA 100108
21959+#define GLU_TESS_ERROR_DATA 100109
21960+#define GLU_TESS_EDGE_FLAG_DATA 100110
21961+#define GLU_TESS_COMBINE_DATA 100111
21962+
21963+/* TessContour */
21964+#define GLU_CW 100120
21965+#define GLU_CCW 100121
21966+#define GLU_INTERIOR 100122
21967+#define GLU_EXTERIOR 100123
21968+#define GLU_UNKNOWN 100124
21969+
21970+/* TessProperty */
21971+#define GLU_TESS_WINDING_RULE 100140
21972+#define GLU_TESS_BOUNDARY_ONLY 100141
21973+#define GLU_TESS_TOLERANCE 100142
21974+
21975+/* TessError */
21976+#define GLU_TESS_ERROR1 100151
21977+#define GLU_TESS_ERROR2 100152
21978+#define GLU_TESS_ERROR3 100153
21979+#define GLU_TESS_ERROR4 100154
21980+#define GLU_TESS_ERROR5 100155
21981+#define GLU_TESS_ERROR6 100156
21982+#define GLU_TESS_ERROR7 100157
21983+#define GLU_TESS_ERROR8 100158
21984+#define GLU_TESS_MISSING_BEGIN_POLYGON 100151
21985+#define GLU_TESS_MISSING_BEGIN_CONTOUR 100152
21986+#define GLU_TESS_MISSING_END_POLYGON 100153
21987+#define GLU_TESS_MISSING_END_CONTOUR 100154
21988+#define GLU_TESS_COORD_TOO_LARGE 100155
21989+#define GLU_TESS_NEED_COMBINE_CALLBACK 100156
21990+
21991+/* TessWinding */
21992+#define GLU_TESS_WINDING_ODD 100130
21993+#define GLU_TESS_WINDING_NONZERO 100131
21994+#define GLU_TESS_WINDING_POSITIVE 100132
21995+#define GLU_TESS_WINDING_NEGATIVE 100133
21996+#define GLU_TESS_WINDING_ABS_GEQ_TWO 100134
21997+
21998+/*************************************************************/
21999+
22000+
22001+#ifdef __cplusplus
22002+class GLUnurbs;
22003+class GLUquadric;
22004+class GLUtesselator;
22005+#else
22006+typedef struct GLUnurbs GLUnurbs;
22007+typedef struct GLUquadric GLUquadric;
22008+typedef struct GLUtesselator GLUtesselator;
22009+#endif
22010+
22011+typedef GLUnurbs GLUnurbsObj;
22012+typedef GLUquadric GLUquadricObj;
22013+typedef GLUtesselator GLUtesselatorObj;
22014+typedef GLUtesselator GLUtriangulatorObj;
22015+
22016+#define GLU_TESS_MAX_COORD 1.0e150
22017+
22018+/* Internal convenience typedefs */
22019+typedef void (GLAPIENTRYP _GLUfuncptr)();
22020+
22021+GLAPI void GLAPIENTRY gluBeginCurve (GLUnurbs* nurb);
22022+GLAPI void GLAPIENTRY gluBeginPolygon (GLUtesselator* tess);
22023+GLAPI void GLAPIENTRY gluBeginSurface (GLUnurbs* nurb);
22024+GLAPI void GLAPIENTRY gluBeginTrim (GLUnurbs* nurb);
22025+GLAPI GLint GLAPIENTRY gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
22026+GLAPI GLint GLAPIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
22027+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);
22028+GLAPI GLint GLAPIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data);
22029+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);
22030+GLAPI GLint GLAPIENTRY gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
22031+GLAPI GLboolean GLAPIENTRY gluCheckExtension (const GLubyte *extName, const GLubyte *extString);
22032+GLAPI void GLAPIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
22033+GLAPI void GLAPIENTRY gluDeleteNurbsRenderer (GLUnurbs* nurb);
22034+GLAPI void GLAPIENTRY gluDeleteQuadric (GLUquadric* quad);
22035+GLAPI void GLAPIENTRY gluDeleteTess (GLUtesselator* tess);
22036+GLAPI void GLAPIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
22037+GLAPI void GLAPIENTRY gluEndCurve (GLUnurbs* nurb);
22038+GLAPI void GLAPIENTRY gluEndPolygon (GLUtesselator* tess);
22039+GLAPI void GLAPIENTRY gluEndSurface (GLUnurbs* nurb);
22040+GLAPI void GLAPIENTRY gluEndTrim (GLUnurbs* nurb);
22041+GLAPI const GLubyte * GLAPIENTRY gluErrorString (GLenum error);
22042+GLAPI void GLAPIENTRY gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
22043+GLAPI const GLubyte * GLAPIENTRY gluGetString (GLenum name);
22044+GLAPI void GLAPIENTRY gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
22045+GLAPI void GLAPIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
22046+GLAPI void GLAPIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
22047+GLAPI GLUnurbs* GLAPIENTRY gluNewNurbsRenderer (void);
22048+GLAPI GLUquadric* GLAPIENTRY gluNewQuadric (void);
22049+GLAPI GLUtesselator* GLAPIENTRY gluNewTess (void);
22050+GLAPI void GLAPIENTRY gluNextContour (GLUtesselator* tess, GLenum type);
22051+GLAPI void GLAPIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
22052+GLAPI void GLAPIENTRY gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData);
22053+GLAPI void GLAPIENTRY gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData);
22054+GLAPI void GLAPIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
22055+GLAPI void GLAPIENTRY gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
22056+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);
22057+GLAPI void GLAPIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
22058+GLAPI void GLAPIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
22059+GLAPI void GLAPIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
22060+GLAPI void GLAPIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
22061+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);
22062+GLAPI void GLAPIENTRY gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
22063+GLAPI void GLAPIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
22064+GLAPI void GLAPIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
22065+GLAPI void GLAPIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal);
22066+GLAPI void GLAPIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
22067+GLAPI void GLAPIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture);
22068+GLAPI GLint GLAPIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
22069+GLAPI void GLAPIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
22070+GLAPI void GLAPIENTRY gluTessBeginContour (GLUtesselator* tess);
22071+GLAPI void GLAPIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
22072+GLAPI void GLAPIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
22073+GLAPI void GLAPIENTRY gluTessEndContour (GLUtesselator* tess);
22074+GLAPI void GLAPIENTRY gluTessEndPolygon (GLUtesselator* tess);
22075+GLAPI void GLAPIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
22076+GLAPI void GLAPIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
22077+GLAPI void GLAPIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
22078+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);
22079+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);
22080+
22081+#ifdef __cplusplus
22082+}
22083+#endif
22084+
22085+#endif /* __glu_h__ */
22086Index: git/target-i386/mesa_glx.h
22087===================================================================
22088--- /dev/null 1970-01-01 00:00:00.000000000 +0000
22089+++ git/target-i386/mesa_glx.h 2009-05-23 11:22:17.000000000 +0100
22090@@ -0,0 +1,510 @@
22091+/*
22092+ * Mesa 3-D graphics library
22093+ * Version: 6.5
22094+ *
22095+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
22096+ *
22097+ * Permission is hereby granted, free of charge, to any person obtaining a
22098+ * copy of this software and associated documentation files (the "Software"),
22099+ * to deal in the Software without restriction, including without limitation
22100+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
22101+ * and/or sell copies of the Software, and to permit persons to whom the
22102+ * Software is furnished to do so, subject to the following conditions:
22103+ *
22104+ * The above copyright notice and this permission notice shall be included
22105+ * in all copies or substantial portions of the Software.
22106+ *
22107+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22108+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22109+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22110+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
22111+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22112+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22113+ */
22114+
22115+
22116+#ifndef GLX_H
22117+#define GLX_H
22118+
22119+
22120+#ifdef __VMS
22121+#include <GL/vms_x_fix.h>
22122+# ifdef __cplusplus
22123+/* VMS Xlib.h gives problems with C++.
22124+ * this avoids a bunch of trivial warnings */
22125+#pragma message disable nosimpint
22126+#endif
22127+#endif
22128+#include <X11/Xlib.h>
22129+#include <X11/Xutil.h>
22130+#ifdef __VMS
22131+# ifdef __cplusplus
22132+#pragma message enable nosimpint
22133+#endif
22134+#endif
22135+#include <mesa_gl.h>
22136+
22137+
22138+#if defined(USE_MGL_NAMESPACE)
22139+#include "glx_mangle.h"
22140+#endif
22141+
22142+
22143+#ifdef __cplusplus
22144+extern "C" {
22145+#endif
22146+
22147+
22148+#define GLX_VERSION_1_1 1
22149+#define GLX_VERSION_1_2 1
22150+#define GLX_VERSION_1_3 1
22151+#define GLX_VERSION_1_4 1
22152+
22153+#define GLX_EXTENSION_NAME "GLX"
22154+
22155+
22156+
22157+/*
22158+ * Tokens for glXChooseVisual and glXGetConfig:
22159+ */
22160+#define GLX_USE_GL 1
22161+#define GLX_BUFFER_SIZE 2
22162+#define GLX_LEVEL 3
22163+#define GLX_RGBA 4
22164+#define GLX_DOUBLEBUFFER 5
22165+#define GLX_STEREO 6
22166+#define GLX_AUX_BUFFERS 7
22167+#define GLX_RED_SIZE 8
22168+#define GLX_GREEN_SIZE 9
22169+#define GLX_BLUE_SIZE 10
22170+#define GLX_ALPHA_SIZE 11
22171+#define GLX_DEPTH_SIZE 12
22172+#define GLX_STENCIL_SIZE 13
22173+#define GLX_ACCUM_RED_SIZE 14
22174+#define GLX_ACCUM_GREEN_SIZE 15
22175+#define GLX_ACCUM_BLUE_SIZE 16
22176+#define GLX_ACCUM_ALPHA_SIZE 17
22177+
22178+
22179+/*
22180+ * Error codes returned by glXGetConfig:
22181+ */
22182+#define GLX_BAD_SCREEN 1
22183+#define GLX_BAD_ATTRIBUTE 2
22184+#define GLX_NO_EXTENSION 3
22185+#define GLX_BAD_VISUAL 4
22186+#define GLX_BAD_CONTEXT 5
22187+#define GLX_BAD_VALUE 6
22188+#define GLX_BAD_ENUM 7
22189+
22190+
22191+/*
22192+ * GLX 1.1 and later:
22193+ */
22194+#define GLX_VENDOR 1
22195+#define GLX_VERSION 2
22196+#define GLX_EXTENSIONS 3
22197+
22198+
22199+/*
22200+ * GLX 1.3 and later:
22201+ */
22202+#define GLX_CONFIG_CAVEAT 0x20
22203+#define GLX_DONT_CARE 0xFFFFFFFF
22204+#define GLX_X_VISUAL_TYPE 0x22
22205+#define GLX_TRANSPARENT_TYPE 0x23
22206+#define GLX_TRANSPARENT_INDEX_VALUE 0x24
22207+#define GLX_TRANSPARENT_RED_VALUE 0x25
22208+#define GLX_TRANSPARENT_GREEN_VALUE 0x26
22209+#define GLX_TRANSPARENT_BLUE_VALUE 0x27
22210+#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
22211+#define GLX_WINDOW_BIT 0x00000001
22212+#define GLX_PIXMAP_BIT 0x00000002
22213+#define GLX_PBUFFER_BIT 0x00000004
22214+#define GLX_AUX_BUFFERS_BIT 0x00000010
22215+#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
22216+#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
22217+#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
22218+#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
22219+#define GLX_DEPTH_BUFFER_BIT 0x00000020
22220+#define GLX_STENCIL_BUFFER_BIT 0x00000040
22221+#define GLX_ACCUM_BUFFER_BIT 0x00000080
22222+#define GLX_NONE 0x8000
22223+#define GLX_SLOW_CONFIG 0x8001
22224+#define GLX_TRUE_COLOR 0x8002
22225+#define GLX_DIRECT_COLOR 0x8003
22226+#define GLX_PSEUDO_COLOR 0x8004
22227+#define GLX_STATIC_COLOR 0x8005
22228+#define GLX_GRAY_SCALE 0x8006
22229+#define GLX_STATIC_GRAY 0x8007
22230+#define GLX_TRANSPARENT_RGB 0x8008
22231+#define GLX_TRANSPARENT_INDEX 0x8009
22232+#define GLX_VISUAL_ID 0x800B
22233+#define GLX_SCREEN 0x800C
22234+#define GLX_NON_CONFORMANT_CONFIG 0x800D
22235+#define GLX_DRAWABLE_TYPE 0x8010
22236+#define GLX_RENDER_TYPE 0x8011
22237+#define GLX_X_RENDERABLE 0x8012
22238+#define GLX_FBCONFIG_ID 0x8013
22239+#define GLX_RGBA_TYPE 0x8014
22240+#define GLX_COLOR_INDEX_TYPE 0x8015
22241+#define GLX_MAX_PBUFFER_WIDTH 0x8016
22242+#define GLX_MAX_PBUFFER_HEIGHT 0x8017
22243+#define GLX_MAX_PBUFFER_PIXELS 0x8018
22244+#define GLX_PRESERVED_CONTENTS 0x801B
22245+#define GLX_LARGEST_PBUFFER 0x801C
22246+#define GLX_WIDTH 0x801D
22247+#define GLX_HEIGHT 0x801E
22248+#define GLX_EVENT_MASK 0x801F
22249+#define GLX_DAMAGED 0x8020
22250+#define GLX_SAVED 0x8021
22251+#define GLX_WINDOW 0x8022
22252+#define GLX_PBUFFER 0x8023
22253+#define GLX_PBUFFER_HEIGHT 0x8040
22254+#define GLX_PBUFFER_WIDTH 0x8041
22255+#define GLX_RGBA_BIT 0x00000001
22256+#define GLX_COLOR_INDEX_BIT 0x00000002
22257+#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
22258+
22259+
22260+/*
22261+ * GLX 1.4 and later:
22262+ */
22263+#define GLX_SAMPLE_BUFFERS 0x186a0 /*100000*/
22264+#define GLX_SAMPLES 0x186a1 /*100001*/
22265+
22266+
22267+
22268+typedef struct __GLXcontextRec *GLXContext;
22269+typedef XID GLXPixmap;
22270+typedef XID GLXDrawable;
22271+/* GLX 1.3 and later */
22272+typedef struct __GLXFBConfigRec *GLXFBConfig;
22273+typedef XID GLXFBConfigID;
22274+typedef XID GLXContextID;
22275+typedef XID GLXWindow;
22276+typedef XID GLXPbuffer;
22277+
22278+
22279+
22280+extern XVisualInfo* glXChooseVisual( Display *dpy, int screen,
22281+ int *attribList );
22282+
22283+extern GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis,
22284+ GLXContext shareList, Bool direct );
22285+
22286+extern void glXDestroyContext( Display *dpy, GLXContext ctx );
22287+
22288+extern Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable,
22289+ GLXContext ctx);
22290+
22291+extern void glXCopyContext( Display *dpy, GLXContext src, GLXContext dst,
22292+ unsigned long mask );
22293+
22294+extern void glXSwapBuffers( Display *dpy, GLXDrawable drawable );
22295+
22296+extern GLXPixmap glXCreateGLXPixmap( Display *dpy, XVisualInfo *visual,
22297+ Pixmap pixmap );
22298+
22299+extern void glXDestroyGLXPixmap( Display *dpy, GLXPixmap pixmap );
22300+
22301+extern Bool glXQueryExtension( Display *dpy, int *errorb, int *event );
22302+
22303+extern Bool glXQueryVersion( Display *dpy, int *maj, int *min );
22304+
22305+extern Bool glXIsDirect( Display *dpy, GLXContext ctx );
22306+
22307+extern int glXGetConfig( Display *dpy, XVisualInfo *visual,
22308+ int attrib, int *value );
22309+
22310+extern GLXContext glXGetCurrentContext( void );
22311+
22312+extern GLXDrawable glXGetCurrentDrawable( void );
22313+
22314+extern void glXWaitGL( void );
22315+
22316+extern void glXWaitX( void );
22317+
22318+extern void glXUseXFont( Font font, int first, int count, int list );
22319+
22320+
22321+
22322+/* GLX 1.1 and later */
22323+extern const char *glXQueryExtensionsString( Display *dpy, int screen );
22324+
22325+extern const char *glXQueryServerString( Display *dpy, int screen, int name );
22326+
22327+extern const char *glXGetClientString( Display *dpy, int name );
22328+
22329+
22330+/* GLX 1.2 and later */
22331+extern Display *glXGetCurrentDisplay( void );
22332+
22333+
22334+/* GLX 1.3 and later */
22335+extern GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
22336+ const int *attribList, int *nitems );
22337+
22338+extern int glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config,
22339+ int attribute, int *value );
22340+
22341+extern GLXFBConfig *glXGetFBConfigs( Display *dpy, int screen,
22342+ int *nelements );
22343+
22344+extern XVisualInfo *glXGetVisualFromFBConfig( Display *dpy,
22345+ GLXFBConfig config );
22346+
22347+extern GLXWindow glXCreateWindow( Display *dpy, GLXFBConfig config,
22348+ Window win, const int *attribList );
22349+
22350+extern void glXDestroyWindow( Display *dpy, GLXWindow window );
22351+
22352+extern GLXPixmap glXCreatePixmap( Display *dpy, GLXFBConfig config,
22353+ Pixmap pixmap, const int *attribList );
22354+
22355+extern void glXDestroyPixmap( Display *dpy, GLXPixmap pixmap );
22356+
22357+extern GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config,
22358+ const int *attribList );
22359+
22360+extern void glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf );
22361+
22362+extern void glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute,
22363+ unsigned int *value );
22364+
22365+extern GLXContext glXCreateNewContext( Display *dpy, GLXFBConfig config,
22366+ int renderType, GLXContext shareList,
22367+ Bool direct );
22368+
22369+extern Bool glXMakeContextCurrent( Display *dpy, GLXDrawable draw,
22370+ GLXDrawable read, GLXContext ctx );
22371+
22372+extern GLXDrawable glXGetCurrentReadDrawable( void );
22373+
22374+extern int glXQueryContext( Display *dpy, GLXContext ctx, int attribute,
22375+ int *value );
22376+
22377+extern void glXSelectEvent( Display *dpy, GLXDrawable drawable,
22378+ unsigned long mask );
22379+
22380+extern void glXGetSelectedEvent( Display *dpy, GLXDrawable drawable,
22381+ unsigned long *mask );
22382+
22383+
22384+/* GLX 1.4 and later */
22385+extern void (*glXGetProcAddress(const GLubyte *procname))( void );
22386+
22387+
22388+#ifndef GLX_GLXEXT_LEGACY
22389+
22390+#include <mesa_glxext.h>
22391+
22392+#else
22393+
22394+
22395+
22396+/*
22397+ * ARB 2. GLX_ARB_get_proc_address
22398+ */
22399+#ifndef GLX_ARB_get_proc_address
22400+#define GLX_ARB_get_proc_address 1
22401+
22402+typedef void (*__GLXextFuncPtr)(void);
22403+extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
22404+
22405+#endif /* GLX_ARB_get_proc_address */
22406+
22407+
22408+
22409+#endif /* GLX_GLXEXT_LEGACY */
22410+
22411+
22412+/**
22413+ ** The following aren't in glxext.h yet.
22414+ **/
22415+
22416+
22417+/*
22418+ * ???. GLX_NV_vertex_array_range
22419+ */
22420+#ifndef GLX_NV_vertex_array_range
22421+#define GLX_NV_vertex_array_range
22422+
22423+extern void *glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
22424+extern void glXFreeMemoryNV(GLvoid *pointer);
22425+typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
22426+typedef void ( * PFNGLXFREEMEMORYNVPROC) (GLvoid *pointer);
22427+
22428+#endif /* GLX_NV_vertex_array_range */
22429+
22430+
22431+/*
22432+ * ???. GLX_MESA_allocate_memory
22433+ */
22434+#ifndef GLX_MESA_allocate_memory
22435+#define GLX_MESA_allocate_memory 1
22436+
22437+extern void *glXAllocateMemoryMESA(Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
22438+extern void glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer);
22439+extern GLuint glXGetMemoryOffsetMESA(Display *dpy, int scrn, const void *pointer);
22440+typedef void * ( * PFNGLXALLOCATEMEMORYMESAPROC) (Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
22441+typedef void ( * PFNGLXFREEMEMORYMESAPROC) (Display *dpy, int scrn, void *pointer);
22442+typedef GLuint (* PFNGLXGETMEMORYOFFSETMESAPROC) (Display *dpy, int scrn, const void *pointer);
22443+
22444+#endif /* GLX_MESA_allocate_memory */
22445+
22446+
22447+/*
22448+ * ARB ?. GLX_ARB_render_texture
22449+ * XXX This was never finalized!
22450+ */
22451+#ifndef GLX_ARB_render_texture
22452+#define GLX_ARB_render_texture 1
22453+
22454+extern Bool glXBindTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
22455+extern Bool glXReleaseTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
22456+extern Bool glXDrawableAttribARB(Display *dpy, GLXDrawable draw, const int *attribList);
22457+
22458+#endif /* GLX_ARB_render_texture */
22459+
22460+
22461+#ifndef GLX_ATI_render_texture
22462+#define GLX_ATI_render_texture 1
22463+
22464+extern void glXBindTexImageATI(Display *dpy, GLXPbuffer pbuffer, int buffer);
22465+extern void glXReleaseTexImageATI(Display *dpy, GLXPbuffer pbuffer, int buffer);
22466+extern void glXDrawableAttribATI(Display *dpy, GLXDrawable draw, const int *attribList);
22467+
22468+#endif /* GLX_ATI_render_texture */
22469+
22470+
22471+/*
22472+ * Remove this when glxext.h is updated.
22473+ */
22474+#ifndef GLX_NV_float_buffer
22475+#define GLX_NV_float_buffer 1
22476+
22477+#define GLX_FLOAT_COMPONENTS_NV 0x20B0
22478+
22479+#endif /* GLX_NV_float_buffer */
22480+
22481+
22482+
22483+/*
22484+ * #?. GLX_MESA_swap_frame_usage
22485+ */
22486+#ifndef GLX_MESA_swap_frame_usage
22487+#define GLX_MESA_swap_frame_usage 1
22488+
22489+extern int glXGetFrameUsageMESA(Display *dpy, GLXDrawable drawable, float *usage);
22490+extern int glXBeginFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
22491+extern int glXEndFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
22492+extern int glXQueryFrameTrackingMESA(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
22493+
22494+typedef int (*PFNGLXGETFRAMEUSAGEMESAPROC) (Display *dpy, GLXDrawable drawable, float *usage);
22495+typedef int (*PFNGLXBEGINFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
22496+typedef int (*PFNGLXENDFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
22497+typedef int (*PFNGLXQUERYFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
22498+
22499+#endif /* GLX_MESA_swap_frame_usage */
22500+
22501+
22502+
22503+/*
22504+ * #?. GLX_MESA_swap_control
22505+ */
22506+#ifndef GLX_MESA_swap_control
22507+#define GLX_MESA_swap_control 1
22508+
22509+extern int glXSwapIntervalMESA(unsigned int interval);
22510+extern int glXGetSwapIntervalMESA(void);
22511+
22512+typedef int (*PFNGLXSWAPINTERVALMESAPROC)(unsigned int interval);
22513+typedef int (*PFNGLXGETSWAPINTERVALMESAPROC)(void);
22514+
22515+#endif /* GLX_MESA_swap_control */
22516+
22517+
22518+
22519+/*
22520+ * #?. GLX_EXT_texture_from_pixmap
22521+ * XXX not finished?
22522+ */
22523+#ifndef GLX_EXT_texture_from_pixmap
22524+#define GLX_EXT_texture_from_pixmap 1
22525+
22526+#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
22527+#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
22528+#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
22529+#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
22530+#define GLX_Y_INVERTED_EXT 0x20D4
22531+
22532+#define GLX_TEXTURE_FORMAT_EXT 0x20D5
22533+#define GLX_TEXTURE_TARGET_EXT 0x20D6
22534+#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
22535+
22536+#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
22537+#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
22538+#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
22539+
22540+#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
22541+#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
22542+#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
22543+
22544+#define GLX_TEXTURE_1D_EXT 0x20DB
22545+#define GLX_TEXTURE_2D_EXT 0x20DC
22546+#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
22547+
22548+#define GLX_FRONT_LEFT_EXT 0x20DE
22549+#define GLX_FRONT_RIGHT_EXT 0x20DF
22550+#define GLX_BACK_LEFT_EXT 0x20E0
22551+#define GLX_BACK_RIGHT_EXT 0x20E1
22552+#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
22553+#define GLX_BACK_EXT GLX_BACK_LEFT_EXT
22554+#define GLX_AUX0_EXT 0x20E2
22555+#define GLX_AUX1_EXT 0x20E3
22556+#define GLX_AUX2_EXT 0x20E4
22557+#define GLX_AUX3_EXT 0x20E5
22558+#define GLX_AUX4_EXT 0x20E6
22559+#define GLX_AUX5_EXT 0x20E7
22560+#define GLX_AUX6_EXT 0x20E8
22561+#define GLX_AUX7_EXT 0x20E9
22562+#define GLX_AUX8_EXT 0x20EA
22563+#define GLX_AUX9_EXT 0x20EB
22564+
22565+extern void glXBindTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
22566+extern void glXReleaseTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer);
22567+
22568+#endif /* GLX_EXT_texture_from_pixmap */
22569+
22570+
22571+
22572+
22573+/*** Should these go here, or in another header? */
22574+/*
22575+** GLX Events
22576+*/
22577+typedef struct {
22578+ int event_type; /* GLX_DAMAGED or GLX_SAVED */
22579+ int draw_type; /* GLX_WINDOW or GLX_PBUFFER */
22580+ unsigned long serial; /* # of last request processed by server */
22581+ Bool send_event; /* true if this came for SendEvent request */
22582+ Display *display; /* display the event was read from */
22583+ GLXDrawable drawable; /* XID of Drawable */
22584+ unsigned int buffer_mask; /* mask indicating which buffers are affected */
22585+ unsigned int aux_buffer; /* which aux buffer was affected */
22586+ int x, y;
22587+ int width, height;
22588+ int count; /* if nonzero, at least this many more */
22589+} GLXPbufferClobberEvent;
22590+
22591+typedef union __GLXEvent {
22592+ GLXPbufferClobberEvent glxpbufferclobber;
22593+ long pad[24];
22594+} GLXEvent;
22595+
22596+#ifdef __cplusplus
22597+}
22598+#endif
22599+
22600+#endif
22601Index: git/target-i386/mesa_glxext.h
22602===================================================================
22603--- /dev/null 1970-01-01 00:00:00.000000000 +0000
22604+++ git/target-i386/mesa_glxext.h 2009-05-23 11:22:17.000000000 +0100
22605@@ -0,0 +1,785 @@
22606+#ifndef __glxext_h_
22607+#define __glxext_h_
22608+
22609+#ifdef __cplusplus
22610+extern "C" {
22611+#endif
22612+
22613+/*
22614+** Copyright (c) 2007 The Khronos Group Inc.
22615+**
22616+** Permission is hereby granted, free of charge, to any person obtaining a
22617+** copy of this software and/or associated documentation files (the
22618+** "Materials"), to deal in the Materials without restriction, including
22619+** without limitation the rights to use, copy, modify, merge, publish,
22620+** distribute, sublicense, and/or sell copies of the Materials, and to
22621+** permit persons to whom the Materials are furnished to do so, subject to
22622+** the following conditions:
22623+**
22624+** The above copyright notice and this permission notice shall be included
22625+** in all copies or substantial portions of the Materials.
22626+**
22627+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22628+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22629+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22630+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22631+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22632+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22633+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
22634+*/
22635+
22636+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
22637+#define WIN32_LEAN_AND_MEAN 1
22638+#include <windows.h>
22639+#endif
22640+
22641+#ifndef APIENTRY
22642+#define APIENTRY
22643+#endif
22644+#ifndef APIENTRYP
22645+#define APIENTRYP APIENTRY *
22646+#endif
22647+#ifndef GLAPI
22648+#define GLAPI extern
22649+#endif
22650+
22651+/*************************************************************/
22652+
22653+/* Header file version number, required by OpenGL ABI for Linux */
22654+/* glxext.h last updated 2007/04/21 */
22655+/* Current version at http://www.opengl.org/registry/ */
22656+#define GLX_GLXEXT_VERSION 19
22657+
22658+#ifndef GLX_VERSION_1_3
22659+#define GLX_WINDOW_BIT 0x00000001
22660+#define GLX_PIXMAP_BIT 0x00000002
22661+#define GLX_PBUFFER_BIT 0x00000004
22662+#define GLX_RGBA_BIT 0x00000001
22663+#define GLX_COLOR_INDEX_BIT 0x00000002
22664+#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
22665+#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
22666+#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
22667+#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
22668+#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
22669+#define GLX_AUX_BUFFERS_BIT 0x00000010
22670+#define GLX_DEPTH_BUFFER_BIT 0x00000020
22671+#define GLX_STENCIL_BUFFER_BIT 0x00000040
22672+#define GLX_ACCUM_BUFFER_BIT 0x00000080
22673+#define GLX_CONFIG_CAVEAT 0x20
22674+#define GLX_X_VISUAL_TYPE 0x22
22675+#define GLX_TRANSPARENT_TYPE 0x23
22676+#define GLX_TRANSPARENT_INDEX_VALUE 0x24
22677+#define GLX_TRANSPARENT_RED_VALUE 0x25
22678+#define GLX_TRANSPARENT_GREEN_VALUE 0x26
22679+#define GLX_TRANSPARENT_BLUE_VALUE 0x27
22680+#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
22681+#define GLX_DONT_CARE 0xFFFFFFFF
22682+#define GLX_NONE 0x8000
22683+#define GLX_SLOW_CONFIG 0x8001
22684+#define GLX_TRUE_COLOR 0x8002
22685+#define GLX_DIRECT_COLOR 0x8003
22686+#define GLX_PSEUDO_COLOR 0x8004
22687+#define GLX_STATIC_COLOR 0x8005
22688+#define GLX_GRAY_SCALE 0x8006
22689+#define GLX_STATIC_GRAY 0x8007
22690+#define GLX_TRANSPARENT_RGB 0x8008
22691+#define GLX_TRANSPARENT_INDEX 0x8009
22692+#define GLX_VISUAL_ID 0x800B
22693+#define GLX_SCREEN 0x800C
22694+#define GLX_NON_CONFORMANT_CONFIG 0x800D
22695+#define GLX_DRAWABLE_TYPE 0x8010
22696+#define GLX_RENDER_TYPE 0x8011
22697+#define GLX_X_RENDERABLE 0x8012
22698+#define GLX_FBCONFIG_ID 0x8013
22699+#define GLX_RGBA_TYPE 0x8014
22700+#define GLX_COLOR_INDEX_TYPE 0x8015
22701+#define GLX_MAX_PBUFFER_WIDTH 0x8016
22702+#define GLX_MAX_PBUFFER_HEIGHT 0x8017
22703+#define GLX_MAX_PBUFFER_PIXELS 0x8018
22704+#define GLX_PRESERVED_CONTENTS 0x801B
22705+#define GLX_LARGEST_PBUFFER 0x801C
22706+#define GLX_WIDTH 0x801D
22707+#define GLX_HEIGHT 0x801E
22708+#define GLX_EVENT_MASK 0x801F
22709+#define GLX_DAMAGED 0x8020
22710+#define GLX_SAVED 0x8021
22711+#define GLX_WINDOW 0x8022
22712+#define GLX_PBUFFER 0x8023
22713+#define GLX_PBUFFER_HEIGHT 0x8040
22714+#define GLX_PBUFFER_WIDTH 0x8041
22715+#endif
22716+
22717+#ifndef GLX_VERSION_1_4
22718+#define GLX_SAMPLE_BUFFERS 100000
22719+#define GLX_SAMPLES 100001
22720+#endif
22721+
22722+#ifndef GLX_ARB_get_proc_address
22723+#endif
22724+
22725+#ifndef GLX_ARB_multisample
22726+#define GLX_SAMPLE_BUFFERS_ARB 100000
22727+#define GLX_SAMPLES_ARB 100001
22728+#endif
22729+
22730+#ifndef GLX_ARB_fbconfig_float
22731+#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9
22732+#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
22733+#endif
22734+
22735+#ifndef GLX_SGIS_multisample
22736+#define GLX_SAMPLE_BUFFERS_SGIS 100000
22737+#define GLX_SAMPLES_SGIS 100001
22738+#endif
22739+
22740+#ifndef GLX_EXT_visual_info
22741+#define GLX_X_VISUAL_TYPE_EXT 0x22
22742+#define GLX_TRANSPARENT_TYPE_EXT 0x23
22743+#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
22744+#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
22745+#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
22746+#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
22747+#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
22748+#define GLX_NONE_EXT 0x8000
22749+#define GLX_TRUE_COLOR_EXT 0x8002
22750+#define GLX_DIRECT_COLOR_EXT 0x8003
22751+#define GLX_PSEUDO_COLOR_EXT 0x8004
22752+#define GLX_STATIC_COLOR_EXT 0x8005
22753+#define GLX_GRAY_SCALE_EXT 0x8006
22754+#define GLX_STATIC_GRAY_EXT 0x8007
22755+#define GLX_TRANSPARENT_RGB_EXT 0x8008
22756+#define GLX_TRANSPARENT_INDEX_EXT 0x8009
22757+#endif
22758+
22759+#ifndef GLX_SGI_swap_control
22760+#endif
22761+
22762+#ifndef GLX_SGI_video_sync
22763+#endif
22764+
22765+#ifndef GLX_SGI_make_current_read
22766+#endif
22767+
22768+#ifndef GLX_SGIX_video_source
22769+#endif
22770+
22771+#ifndef GLX_EXT_visual_rating
22772+#define GLX_VISUAL_CAVEAT_EXT 0x20
22773+#define GLX_SLOW_VISUAL_EXT 0x8001
22774+#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
22775+/* reuse GLX_NONE_EXT */
22776+#endif
22777+
22778+#ifndef GLX_EXT_import_context
22779+#define GLX_SHARE_CONTEXT_EXT 0x800A
22780+#define GLX_VISUAL_ID_EXT 0x800B
22781+#define GLX_SCREEN_EXT 0x800C
22782+#endif
22783+
22784+#ifndef GLX_SGIX_fbconfig
22785+#define GLX_WINDOW_BIT_SGIX 0x00000001
22786+#define GLX_PIXMAP_BIT_SGIX 0x00000002
22787+#define GLX_RGBA_BIT_SGIX 0x00000001
22788+#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
22789+#define GLX_DRAWABLE_TYPE_SGIX 0x8010
22790+#define GLX_RENDER_TYPE_SGIX 0x8011
22791+#define GLX_X_RENDERABLE_SGIX 0x8012
22792+#define GLX_FBCONFIG_ID_SGIX 0x8013
22793+#define GLX_RGBA_TYPE_SGIX 0x8014
22794+#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
22795+/* reuse GLX_SCREEN_EXT */
22796+#endif
22797+
22798+#ifndef GLX_SGIX_pbuffer
22799+#define GLX_PBUFFER_BIT_SGIX 0x00000004
22800+#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
22801+#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
22802+#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
22803+#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
22804+#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
22805+#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
22806+#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
22807+#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
22808+#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
22809+#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
22810+#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
22811+#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
22812+#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
22813+#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
22814+#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
22815+#define GLX_PRESERVED_CONTENTS_SGIX 0x801B
22816+#define GLX_LARGEST_PBUFFER_SGIX 0x801C
22817+#define GLX_WIDTH_SGIX 0x801D
22818+#define GLX_HEIGHT_SGIX 0x801E
22819+#define GLX_EVENT_MASK_SGIX 0x801F
22820+#define GLX_DAMAGED_SGIX 0x8020
22821+#define GLX_SAVED_SGIX 0x8021
22822+#define GLX_WINDOW_SGIX 0x8022
22823+#define GLX_PBUFFER_SGIX 0x8023
22824+#endif
22825+
22826+#ifndef GLX_SGI_cushion
22827+#endif
22828+
22829+#ifndef GLX_SGIX_video_resize
22830+#define GLX_SYNC_FRAME_SGIX 0x00000000
22831+#define GLX_SYNC_SWAP_SGIX 0x00000001
22832+#endif
22833+
22834+#ifndef GLX_SGIX_dmbuffer
22835+#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024
22836+#endif
22837+
22838+#ifndef GLX_SGIX_swap_group
22839+#endif
22840+
22841+#ifndef GLX_SGIX_swap_barrier
22842+#endif
22843+
22844+#ifndef GLX_SGIS_blended_overlay
22845+#define GLX_BLENDED_RGBA_SGIS 0x8025
22846+#endif
22847+
22848+#ifndef GLX_SGIS_shared_multisample
22849+#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
22850+#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
22851+#endif
22852+
22853+#ifndef GLX_SUN_get_transparent_index
22854+#endif
22855+
22856+#ifndef GLX_3DFX_multisample
22857+#define GLX_SAMPLE_BUFFERS_3DFX 0x8050
22858+#define GLX_SAMPLES_3DFX 0x8051
22859+#endif
22860+
22861+#ifndef GLX_MESA_copy_sub_buffer
22862+#endif
22863+
22864+#ifndef GLX_MESA_pixmap_colormap
22865+#endif
22866+
22867+#ifndef GLX_MESA_release_buffers
22868+#endif
22869+
22870+#ifndef GLX_MESA_set_3dfx_mode
22871+#define GLX_3DFX_WINDOW_MODE_MESA 0x1
22872+#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
22873+#endif
22874+
22875+#ifndef GLX_SGIX_visual_select_group
22876+#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
22877+#endif
22878+
22879+#ifndef GLX_OML_swap_method
22880+#define GLX_SWAP_METHOD_OML 0x8060
22881+#define GLX_SWAP_EXCHANGE_OML 0x8061
22882+#define GLX_SWAP_COPY_OML 0x8062
22883+#define GLX_SWAP_UNDEFINED_OML 0x8063
22884+#endif
22885+
22886+#ifndef GLX_OML_sync_control
22887+#endif
22888+
22889+#ifndef GLX_NV_float_buffer
22890+#define GLX_FLOAT_COMPONENTS_NV 0x20B0
22891+#endif
22892+
22893+#ifndef GLX_SGIX_hyperpipe
22894+#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
22895+#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
22896+#define GLX_BAD_HYPERPIPE_SGIX 92
22897+#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001
22898+#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002
22899+#define GLX_PIPE_RECT_SGIX 0x00000001
22900+#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002
22901+#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003
22902+#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004
22903+#define GLX_HYPERPIPE_ID_SGIX 0x8030
22904+#endif
22905+
22906+#ifndef GLX_MESA_agp_offset
22907+#endif
22908+
22909+#ifndef GLX_EXT_fbconfig_packed_float
22910+#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
22911+#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008
22912+#endif
22913+
22914+#ifndef GLX_EXT_framebuffer_sRGB
22915+#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
22916+#endif
22917+
22918+#ifndef GLX_EXT_texture_from_pixmap
22919+#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
22920+#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
22921+#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
22922+#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
22923+#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
22924+#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
22925+#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
22926+#define GLX_Y_INVERTED_EXT 0x20D4
22927+#define GLX_TEXTURE_FORMAT_EXT 0x20D5
22928+#define GLX_TEXTURE_TARGET_EXT 0x20D6
22929+#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
22930+#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
22931+#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
22932+#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
22933+#define GLX_TEXTURE_1D_EXT 0x20DB
22934+#define GLX_TEXTURE_2D_EXT 0x20DC
22935+#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
22936+#define GLX_FRONT_LEFT_EXT 0x20DE
22937+#define GLX_FRONT_RIGHT_EXT 0x20DF
22938+#define GLX_BACK_LEFT_EXT 0x20E0
22939+#define GLX_BACK_RIGHT_EXT 0x20E1
22940+#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
22941+#define GLX_BACK_EXT GLX_BACK_LEFT_EXT
22942+#define GLX_AUX0_EXT 0x20E2
22943+#define GLX_AUX1_EXT 0x20E3
22944+#define GLX_AUX2_EXT 0x20E4
22945+#define GLX_AUX3_EXT 0x20E5
22946+#define GLX_AUX4_EXT 0x20E6
22947+#define GLX_AUX5_EXT 0x20E7
22948+#define GLX_AUX6_EXT 0x20E8
22949+#define GLX_AUX7_EXT 0x20E9
22950+#define GLX_AUX8_EXT 0x20EA
22951+#define GLX_AUX9_EXT 0x20EB
22952+#endif
22953+
22954+
22955+/*************************************************************/
22956+
22957+#ifndef GLX_ARB_get_proc_address
22958+typedef void (*__GLXextFuncPtr)(void);
22959+#endif
22960+
22961+#ifndef GLX_SGIX_video_source
22962+typedef XID GLXVideoSourceSGIX;
22963+#endif
22964+
22965+#ifndef GLX_SGIX_fbconfig
22966+typedef XID GLXFBConfigIDSGIX;
22967+typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
22968+#endif
22969+
22970+#ifndef GLX_SGIX_pbuffer
22971+typedef XID GLXPbufferSGIX;
22972+typedef struct {
22973+ int type;
22974+ unsigned long serial; /* # of last request processed by server */
22975+ Bool send_event; /* true if this came for SendEvent request */
22976+ Display *display; /* display the event was read from */
22977+ GLXDrawable drawable; /* i.d. of Drawable */
22978+ int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */
22979+ int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */
22980+ unsigned int mask; /* mask indicating which buffers are affected*/
22981+ int x, y;
22982+ int width, height;
22983+ int count; /* if nonzero, at least this many more */
22984+} GLXBufferClobberEventSGIX;
22985+#endif
22986+
22987+#ifndef GLEXT_64_TYPES_DEFINED
22988+/* This code block is duplicated in glxext.h, so must be protected */
22989+#define GLEXT_64_TYPES_DEFINED
22990+/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
22991+/* (as used in the GLX_OML_sync_control extension). */
22992+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
22993+#include <inttypes.h>
22994+#elif defined(__sun__) || defined(__digital__)
22995+#include <inttypes.h>
22996+#if defined(__STDC__)
22997+#if defined(__arch64__)
22998+typedef long int int64_t;
22999+typedef unsigned long int uint64_t;
23000+#else
23001+typedef long long int int64_t;
23002+typedef unsigned long long int uint64_t;
23003+#endif /* __arch64__ */
23004+#endif /* __STDC__ */
23005+#elif defined( __VMS )
23006+#include <inttypes.h>
23007+#elif defined(__SCO__) || defined(__USLC__)
23008+#include <stdint.h>
23009+#elif defined(__UNIXOS2__) || defined(__SOL64__)
23010+typedef long int int32_t;
23011+typedef long long int int64_t;
23012+typedef unsigned long long int uint64_t;
23013+#elif defined(_WIN32) && defined(__GNUC__)
23014+#include <stdint.h>
23015+#elif defined(_WIN32)
23016+typedef __int32 int32_t;
23017+typedef __int64 int64_t;
23018+typedef unsigned __int64 uint64_t;
23019+#else
23020+#include <inttypes.h> /* Fallback option */
23021+#endif
23022+#endif
23023+
23024+#ifndef GLX_VERSION_1_3
23025+#define GLX_VERSION_1_3 1
23026+#ifdef GLX_GLXEXT_PROTOTYPES
23027+extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *);
23028+extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *);
23029+extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *);
23030+extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig);
23031+extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *);
23032+extern void glXDestroyWindow (Display *, GLXWindow);
23033+extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *);
23034+extern void glXDestroyPixmap (Display *, GLXPixmap);
23035+extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *);
23036+extern void glXDestroyPbuffer (Display *, GLXPbuffer);
23037+extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *);
23038+extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool);
23039+extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext);
23040+extern GLXDrawable glXGetCurrentReadDrawable (void);
23041+extern Display * glXGetCurrentDisplay (void);
23042+extern int glXQueryContext (Display *, GLXContext, int, int *);
23043+extern void glXSelectEvent (Display *, GLXDrawable, unsigned long);
23044+extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *);
23045+#endif /* GLX_GLXEXT_PROTOTYPES */
23046+typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
23047+typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
23048+typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
23049+typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
23050+typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
23051+typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
23052+typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
23053+typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
23054+typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
23055+typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
23056+typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
23057+typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
23058+typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
23059+typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
23060+typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
23061+typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
23062+typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
23063+typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
23064+#endif
23065+
23066+#ifndef GLX_VERSION_1_4
23067+#define GLX_VERSION_1_4 1
23068+#ifdef GLX_GLXEXT_PROTOTYPES
23069+extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *);
23070+#endif /* GLX_GLXEXT_PROTOTYPES */
23071+typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
23072+#endif
23073+
23074+#ifndef GLX_ARB_get_proc_address
23075+#define GLX_ARB_get_proc_address 1
23076+#ifdef GLX_GLXEXT_PROTOTYPES
23077+extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
23078+#endif /* GLX_GLXEXT_PROTOTYPES */
23079+typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
23080+#endif
23081+
23082+#ifndef GLX_ARB_multisample
23083+#define GLX_ARB_multisample 1
23084+#endif
23085+
23086+#ifndef GLX_ARB_fbconfig_float
23087+#define GLX_ARB_fbconfig_float 1
23088+#endif
23089+
23090+#ifndef GLX_SGIS_multisample
23091+#define GLX_SGIS_multisample 1
23092+#endif
23093+
23094+#ifndef GLX_EXT_visual_info
23095+#define GLX_EXT_visual_info 1
23096+#endif
23097+
23098+#ifndef GLX_SGI_swap_control
23099+#define GLX_SGI_swap_control 1
23100+#ifdef GLX_GLXEXT_PROTOTYPES
23101+extern int glXSwapIntervalSGI (int);
23102+#endif /* GLX_GLXEXT_PROTOTYPES */
23103+typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
23104+#endif
23105+
23106+#ifndef GLX_SGI_video_sync
23107+#define GLX_SGI_video_sync 1
23108+#ifdef GLX_GLXEXT_PROTOTYPES
23109+extern int glXGetVideoSyncSGI (unsigned int *);
23110+extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
23111+#endif /* GLX_GLXEXT_PROTOTYPES */
23112+typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
23113+typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
23114+#endif
23115+
23116+#ifndef GLX_SGI_make_current_read
23117+#define GLX_SGI_make_current_read 1
23118+#ifdef GLX_GLXEXT_PROTOTYPES
23119+extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext);
23120+extern GLXDrawable glXGetCurrentReadDrawableSGI (void);
23121+#endif /* GLX_GLXEXT_PROTOTYPES */
23122+typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
23123+typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
23124+#endif
23125+
23126+#ifndef GLX_SGIX_video_source
23127+#define GLX_SGIX_video_source 1
23128+#ifdef _VL_H
23129+#ifdef GLX_GLXEXT_PROTOTYPES
23130+extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode);
23131+extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX);
23132+#endif /* GLX_GLXEXT_PROTOTYPES */
23133+typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
23134+typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
23135+#endif /* _VL_H */
23136+#endif
23137+
23138+#ifndef GLX_EXT_visual_rating
23139+#define GLX_EXT_visual_rating 1
23140+#endif
23141+
23142+#ifndef GLX_EXT_import_context
23143+#define GLX_EXT_import_context 1
23144+#ifdef GLX_GLXEXT_PROTOTYPES
23145+extern Display * glXGetCurrentDisplayEXT (void);
23146+extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *);
23147+extern GLXContextID glXGetContextIDEXT (const GLXContext);
23148+extern GLXContext glXImportContextEXT (Display *, GLXContextID);
23149+extern void glXFreeContextEXT (Display *, GLXContext);
23150+#endif /* GLX_GLXEXT_PROTOTYPES */
23151+typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
23152+typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
23153+typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
23154+typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
23155+typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
23156+#endif
23157+
23158+#ifndef GLX_SGIX_fbconfig
23159+#define GLX_SGIX_fbconfig 1
23160+#ifdef GLX_GLXEXT_PROTOTYPES
23161+extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *);
23162+extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *);
23163+extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap);
23164+extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool);
23165+extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX);
23166+extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *);
23167+#endif /* GLX_GLXEXT_PROTOTYPES */
23168+typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
23169+typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
23170+typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
23171+typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
23172+typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
23173+typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
23174+#endif
23175+
23176+#ifndef GLX_SGIX_pbuffer
23177+#define GLX_SGIX_pbuffer 1
23178+#ifdef GLX_GLXEXT_PROTOTYPES
23179+extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *);
23180+extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX);
23181+extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *);
23182+extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long);
23183+extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *);
23184+#endif /* GLX_GLXEXT_PROTOTYPES */
23185+typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
23186+typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
23187+typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
23188+typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
23189+typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
23190+#endif
23191+
23192+#ifndef GLX_SGI_cushion
23193+#define GLX_SGI_cushion 1
23194+#ifdef GLX_GLXEXT_PROTOTYPES
23195+extern void glXCushionSGI (Display *, Window, float);
23196+#endif /* GLX_GLXEXT_PROTOTYPES */
23197+typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
23198+#endif
23199+
23200+#ifndef GLX_SGIX_video_resize
23201+#define GLX_SGIX_video_resize 1
23202+#ifdef GLX_GLXEXT_PROTOTYPES
23203+extern int glXBindChannelToWindowSGIX (Display *, int, int, Window);
23204+extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int);
23205+extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *);
23206+extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *);
23207+extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum);
23208+#endif /* GLX_GLXEXT_PROTOTYPES */
23209+typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
23210+typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
23211+typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
23212+typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
23213+typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype);
23214+#endif
23215+
23216+#ifndef GLX_SGIX_dmbuffer
23217+#define GLX_SGIX_dmbuffer 1
23218+#ifdef _DM_BUFFER_H_
23219+#ifdef GLX_GLXEXT_PROTOTYPES
23220+extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer);
23221+#endif /* GLX_GLXEXT_PROTOTYPES */
23222+typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
23223+#endif /* _DM_BUFFER_H_ */
23224+#endif
23225+
23226+#ifndef GLX_SGIX_swap_group
23227+#define GLX_SGIX_swap_group 1
23228+#ifdef GLX_GLXEXT_PROTOTYPES
23229+extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable);
23230+#endif /* GLX_GLXEXT_PROTOTYPES */
23231+typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
23232+#endif
23233+
23234+#ifndef GLX_SGIX_swap_barrier
23235+#define GLX_SGIX_swap_barrier 1
23236+#ifdef GLX_GLXEXT_PROTOTYPES
23237+extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int);
23238+extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *);
23239+#endif /* GLX_GLXEXT_PROTOTYPES */
23240+typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
23241+typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
23242+#endif
23243+
23244+#ifndef GLX_SUN_get_transparent_index
23245+#define GLX_SUN_get_transparent_index 1
23246+#ifdef GLX_GLXEXT_PROTOTYPES
23247+extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *);
23248+#endif /* GLX_GLXEXT_PROTOTYPES */
23249+typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
23250+#endif
23251+
23252+#ifndef GLX_MESA_copy_sub_buffer
23253+#define GLX_MESA_copy_sub_buffer 1
23254+#ifdef GLX_GLXEXT_PROTOTYPES
23255+extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int);
23256+#endif /* GLX_GLXEXT_PROTOTYPES */
23257+typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
23258+#endif
23259+
23260+#ifndef GLX_MESA_pixmap_colormap
23261+#define GLX_MESA_pixmap_colormap 1
23262+#ifdef GLX_GLXEXT_PROTOTYPES
23263+extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap);
23264+#endif /* GLX_GLXEXT_PROTOTYPES */
23265+typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
23266+#endif
23267+
23268+#ifndef GLX_MESA_release_buffers
23269+#define GLX_MESA_release_buffers 1
23270+#ifdef GLX_GLXEXT_PROTOTYPES
23271+extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable);
23272+#endif /* GLX_GLXEXT_PROTOTYPES */
23273+typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
23274+#endif
23275+
23276+#ifndef GLX_MESA_set_3dfx_mode
23277+#define GLX_MESA_set_3dfx_mode 1
23278+#ifdef GLX_GLXEXT_PROTOTYPES
23279+extern Bool glXSet3DfxModeMESA (int);
23280+#endif /* GLX_GLXEXT_PROTOTYPES */
23281+typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
23282+#endif
23283+
23284+#ifndef GLX_SGIX_visual_select_group
23285+#define GLX_SGIX_visual_select_group 1
23286+#endif
23287+
23288+#ifndef GLX_OML_swap_method
23289+#define GLX_OML_swap_method 1
23290+#endif
23291+
23292+#ifndef GLX_OML_sync_control
23293+#define GLX_OML_sync_control 1
23294+#ifdef GLX_GLXEXT_PROTOTYPES
23295+extern Bool glXGetSyncValuesOML (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *);
23296+extern Bool glXGetMscRateOML (Display *, GLXDrawable, int32_t *, int32_t *);
23297+extern int64_t glXSwapBuffersMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t);
23298+extern Bool glXWaitForMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *);
23299+extern Bool glXWaitForSbcOML (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *);
23300+#endif /* GLX_GLXEXT_PROTOTYPES */
23301+typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
23302+typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
23303+typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
23304+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);
23305+typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
23306+#endif
23307+
23308+#ifndef GLX_NV_float_buffer
23309+#define GLX_NV_float_buffer 1
23310+#endif
23311+
23312+#ifndef GLX_SGIX_hyperpipe
23313+#define GLX_SGIX_hyperpipe 1
23314+
23315+typedef struct {
23316+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23317+ int networkId;
23318+} GLXHyperpipeNetworkSGIX;
23319+
23320+typedef struct {
23321+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23322+ int channel;
23323+ unsigned int
23324+ participationType;
23325+ int timeSlice;
23326+} GLXHyperpipeConfigSGIX;
23327+
23328+typedef struct {
23329+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23330+ int srcXOrigin, srcYOrigin, srcWidth, srcHeight;
23331+ int destXOrigin, destYOrigin, destWidth, destHeight;
23332+} GLXPipeRect;
23333+
23334+typedef struct {
23335+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23336+ int XOrigin, YOrigin, maxHeight, maxWidth;
23337+} GLXPipeRectLimits;
23338+
23339+#ifdef GLX_GLXEXT_PROTOTYPES
23340+extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *, int *);
23341+extern int glXHyperpipeConfigSGIX (Display *, int, int, GLXHyperpipeConfigSGIX *, int *);
23342+extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *, int, int *);
23343+extern int glXDestroyHyperpipeConfigSGIX (Display *, int);
23344+extern int glXBindHyperpipeSGIX (Display *, int);
23345+extern int glXQueryHyperpipeBestAttribSGIX (Display *, int, int, int, void *, void *);
23346+extern int glXHyperpipeAttribSGIX (Display *, int, int, int, void *);
23347+extern int glXQueryHyperpipeAttribSGIX (Display *, int, int, int, void *);
23348+#endif /* GLX_GLXEXT_PROTOTYPES */
23349+typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);
23350+typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
23351+typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes);
23352+typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId);
23353+typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId);
23354+typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
23355+typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
23356+typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
23357+#endif
23358+
23359+#ifndef GLX_MESA_agp_offset
23360+#define GLX_MESA_agp_offset 1
23361+#ifdef GLX_GLXEXT_PROTOTYPES
23362+extern unsigned int glXGetAGPOffsetMESA (const void *);
23363+#endif /* GLX_GLXEXT_PROTOTYPES */
23364+typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
23365+#endif
23366+
23367+#ifndef GLX_EXT_fbconfig_packed_float
23368+#define GLX_EXT_fbconfig_packed_float 1
23369+#endif
23370+
23371+#ifndef GLX_EXT_framebuffer_sRGB
23372+#define GLX_EXT_framebuffer_sRGB 1
23373+#endif
23374+
23375+#ifndef GLX_EXT_texture_from_pixmap
23376+#define GLX_EXT_texture_from_pixmap 1
23377+#ifdef GLX_GLXEXT_PROTOTYPES
23378+extern void glXBindTexImageEXT (Display *, GLXDrawable, int, const int *);
23379+extern void glXReleaseTexImageEXT (Display *, GLXDrawable, int);
23380+#endif /* GLX_GLXEXT_PROTOTYPES */
23381+typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
23382+typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer);
23383+#endif
23384+
23385+
23386+#ifdef __cplusplus
23387+}
23388+#endif
23389+
23390+#endif
23391Index: git/target-i386/mesa_mipmap.c
23392===================================================================
23393--- /dev/null 1970-01-01 00:00:00.000000000 +0000
23394+++ git/target-i386/mesa_mipmap.c 2009-05-23 11:22:17.000000000 +0100
23395@@ -0,0 +1,824 @@
23396+
23397+/*
23398+ * Mesa 3-D graphics library
23399+ * Version: 3.4
23400+ * Copyright (C) 1995-2000 Brian Paul
23401+ *
23402+ * This library is free software; you can redistribute it and/or
23403+ * modify it under the terms of the GNU Library General Public
23404+ * License as published by the Free Software Foundation; either
23405+ * version 2 of the License, or (at your option) any later version.
23406+ *
23407+ * This library is distributed in the hope that it will be useful,
23408+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
23409+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23410+ * Library General Public License for more details.
23411+ *
23412+ * You should have received a copy of the GNU Library General Public
23413+ * License along with this library; if not, write to the Free
23414+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23415+ */
23416+
23417+
23418+#ifdef PC_HEADER
23419+#include "all.h"
23420+#else
23421+#include <assert.h>
23422+#include <math.h>
23423+#include <stdio.h>
23424+#include <stdlib.h>
23425+//#include "gluP.h"
23426+#endif
23427+
23428+
23429+/*
23430+ * Compute ceiling of integer quotient of A divided by B:
23431+ */
23432+#define CEILING( A, B ) ( (A) % (B) == 0 ? (A)/(B) : (A)/(B)+1 )
23433+
23434+
23435+
23436+#ifdef EPSILON
23437+#undef EPSILON
23438+#endif
23439+#define EPSILON 0.001
23440+
23441+
23442+/* To work around optimizer bug in MSVC4.1 */
23443+#if defined(__WIN32__) && !defined(OPENSTEP)
23444+void
23445+dummy(GLuint j, GLuint k)
23446+{
23447+}
23448+#else
23449+#define dummy(J, K)
23450+#endif
23451+
23452+
23453+static GLint GLAPIENTRY
23454+mesa_gluScaleImage(GLenum format,
23455+ GLsizei widthin, GLsizei heightin,
23456+ GLenum typein, const void *datain,
23457+ GLsizei widthout, GLsizei heightout,
23458+ GLenum typeout, void *dataout)
23459+{
23460+ GLint components, i, j, k;
23461+ GLfloat *tempin, *tempout;
23462+ GLfloat sx, sy;
23463+ GLint unpackrowlength, unpackalignment, unpackskiprows, unpackskippixels;
23464+ GLint packrowlength, packalignment, packskiprows, packskippixels;
23465+ GLint sizein, sizeout;
23466+ GLint rowstride, rowlen;
23467+
23468+
23469+ /* Determine number of components per pixel */
23470+ switch (format) {
23471+ case GL_COLOR_INDEX:
23472+ case GL_STENCIL_INDEX:
23473+ case GL_DEPTH_COMPONENT:
23474+ case GL_RED:
23475+ case GL_GREEN:
23476+ case GL_BLUE:
23477+ case GL_ALPHA:
23478+ case GL_LUMINANCE:
23479+ components = 1;
23480+ break;
23481+ case GL_LUMINANCE_ALPHA:
23482+ components = 2;
23483+ break;
23484+ case GL_RGB:
23485+ case GL_BGR:
23486+ components = 3;
23487+ break;
23488+ case GL_RGBA:
23489+ case GL_BGRA:
23490+#ifdef GL_EXT_abgr
23491+ case GL_ABGR_EXT:
23492+#endif
23493+ components = 4;
23494+ break;
23495+ default:
23496+ return GLU_INVALID_ENUM;
23497+ }
23498+
23499+ /* Determine bytes per input datum */
23500+ switch (typein) {
23501+ case GL_UNSIGNED_BYTE:
23502+ sizein = sizeof(GLubyte);
23503+ break;
23504+ case GL_BYTE:
23505+ sizein = sizeof(GLbyte);
23506+ break;
23507+ case GL_UNSIGNED_SHORT:
23508+ sizein = sizeof(GLushort);
23509+ break;
23510+ case GL_SHORT:
23511+ sizein = sizeof(GLshort);
23512+ break;
23513+ case GL_UNSIGNED_INT:
23514+ sizein = sizeof(GLuint);
23515+ break;
23516+ case GL_INT:
23517+ sizein = sizeof(GLint);
23518+ break;
23519+ case GL_FLOAT:
23520+ sizein = sizeof(GLfloat);
23521+ break;
23522+ case GL_BITMAP:
23523+ /* not implemented yet */
23524+ default:
23525+ return GL_INVALID_ENUM;
23526+ }
23527+
23528+ /* Determine bytes per output datum */
23529+ switch (typeout) {
23530+ case GL_UNSIGNED_BYTE:
23531+ sizeout = sizeof(GLubyte);
23532+ break;
23533+ case GL_BYTE:
23534+ sizeout = sizeof(GLbyte);
23535+ break;
23536+ case GL_UNSIGNED_SHORT:
23537+ sizeout = sizeof(GLushort);
23538+ break;
23539+ case GL_SHORT:
23540+ sizeout = sizeof(GLshort);
23541+ break;
23542+ case GL_UNSIGNED_INT:
23543+ sizeout = sizeof(GLuint);
23544+ break;
23545+ case GL_INT:
23546+ sizeout = sizeof(GLint);
23547+ break;
23548+ case GL_FLOAT:
23549+ sizeout = sizeof(GLfloat);
23550+ break;
23551+ case GL_BITMAP:
23552+ /* not implemented yet */
23553+ default:
23554+ return GL_INVALID_ENUM;
23555+ }
23556+
23557+ /* Get glPixelStore state */
23558+ glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpackrowlength);
23559+ glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpackalignment);
23560+ glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unpackskiprows);
23561+ glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unpackskippixels);
23562+ glGetIntegerv(GL_PACK_ROW_LENGTH, &packrowlength);
23563+ glGetIntegerv(GL_PACK_ALIGNMENT, &packalignment);
23564+ glGetIntegerv(GL_PACK_SKIP_ROWS, &packskiprows);
23565+ glGetIntegerv(GL_PACK_SKIP_PIXELS, &packskippixels);
23566+
23567+ /* Allocate storage for intermediate images */
23568+ tempin = (GLfloat *) malloc(widthin * heightin
23569+ * components * sizeof(GLfloat));
23570+ if (!tempin) {
23571+ return GLU_OUT_OF_MEMORY;
23572+ }
23573+ tempout = (GLfloat *) malloc(widthout * heightout
23574+ * components * sizeof(GLfloat));
23575+ if (!tempout) {
23576+ free(tempin);
23577+ return GLU_OUT_OF_MEMORY;
23578+ }
23579+
23580+
23581+ /*
23582+ * Unpack the pixel data and convert to floating point
23583+ */
23584+
23585+ if (unpackrowlength > 0) {
23586+ rowlen = unpackrowlength;
23587+ }
23588+ else {
23589+ rowlen = widthin;
23590+ }
23591+ if (sizein >= unpackalignment) {
23592+ rowstride = components * rowlen;
23593+ }
23594+ else {
23595+ rowstride = unpackalignment / sizein
23596+ * CEILING(components * rowlen * sizein, unpackalignment);
23597+ }
23598+
23599+ switch (typein) {
23600+ case GL_UNSIGNED_BYTE:
23601+ k = 0;
23602+ for (i = 0; i < heightin; i++) {
23603+ GLubyte *ubptr = (GLubyte *) datain
23604+ + i * rowstride
23605+ + unpackskiprows * rowstride + unpackskippixels * components;
23606+ for (j = 0; j < widthin * components; j++) {
23607+ dummy(j, k);
23608+ tempin[k++] = (GLfloat) * ubptr++;
23609+ }
23610+ }
23611+ break;
23612+ case GL_BYTE:
23613+ k = 0;
23614+ for (i = 0; i < heightin; i++) {
23615+ GLbyte *bptr = (GLbyte *) datain
23616+ + i * rowstride
23617+ + unpackskiprows * rowstride + unpackskippixels * components;
23618+ for (j = 0; j < widthin * components; j++) {
23619+ dummy(j, k);
23620+ tempin[k++] = (GLfloat) * bptr++;
23621+ }
23622+ }
23623+ break;
23624+ case GL_UNSIGNED_SHORT:
23625+ k = 0;
23626+ for (i = 0; i < heightin; i++) {
23627+ GLushort *usptr = (GLushort *) datain
23628+ + i * rowstride
23629+ + unpackskiprows * rowstride + unpackskippixels * components;
23630+ for (j = 0; j < widthin * components; j++) {
23631+ dummy(j, k);
23632+ tempin[k++] = (GLfloat) * usptr++;
23633+ }
23634+ }
23635+ break;
23636+ case GL_SHORT:
23637+ k = 0;
23638+ for (i = 0; i < heightin; i++) {
23639+ GLshort *sptr = (GLshort *) datain
23640+ + i * rowstride
23641+ + unpackskiprows * rowstride + unpackskippixels * components;
23642+ for (j = 0; j < widthin * components; j++) {
23643+ dummy(j, k);
23644+ tempin[k++] = (GLfloat) * sptr++;
23645+ }
23646+ }
23647+ break;
23648+ case GL_UNSIGNED_INT:
23649+ k = 0;
23650+ for (i = 0; i < heightin; i++) {
23651+ GLuint *uiptr = (GLuint *) datain
23652+ + i * rowstride
23653+ + unpackskiprows * rowstride + unpackskippixels * components;
23654+ for (j = 0; j < widthin * components; j++) {
23655+ dummy(j, k);
23656+ tempin[k++] = (GLfloat) * uiptr++;
23657+ }
23658+ }
23659+ break;
23660+ case GL_INT:
23661+ k = 0;
23662+ for (i = 0; i < heightin; i++) {
23663+ GLint *iptr = (GLint *) datain
23664+ + i * rowstride
23665+ + unpackskiprows * rowstride + unpackskippixels * components;
23666+ for (j = 0; j < widthin * components; j++) {
23667+ dummy(j, k);
23668+ tempin[k++] = (GLfloat) * iptr++;
23669+ }
23670+ }
23671+ break;
23672+ case GL_FLOAT:
23673+ k = 0;
23674+ for (i = 0; i < heightin; i++) {
23675+ GLfloat *fptr = (GLfloat *) datain
23676+ + i * rowstride
23677+ + unpackskiprows * rowstride + unpackskippixels * components;
23678+ for (j = 0; j < widthin * components; j++) {
23679+ dummy(j, k);
23680+ tempin[k++] = *fptr++;
23681+ }
23682+ }
23683+ break;
23684+ default:
23685+ return GLU_INVALID_ENUM;
23686+ }
23687+
23688+
23689+ /*
23690+ * Scale the image!
23691+ */
23692+
23693+ if (widthout > 1)
23694+ sx = (GLfloat) (widthin - 1) / (GLfloat) (widthout - 1);
23695+ else
23696+ sx = (GLfloat) (widthin - 1);
23697+ if (heightout > 1)
23698+ sy = (GLfloat) (heightin - 1) / (GLfloat) (heightout - 1);
23699+ else
23700+ sy = (GLfloat) (heightin - 1);
23701+
23702+/*#define POINT_SAMPLE*/
23703+#ifdef POINT_SAMPLE
23704+ for (i = 0; i < heightout; i++) {
23705+ GLint ii = i * sy;
23706+ for (j = 0; j < widthout; j++) {
23707+ GLint jj = j * sx;
23708+
23709+ GLfloat *src = tempin + (ii * widthin + jj) * components;
23710+ GLfloat *dst = tempout + (i * widthout + j) * components;
23711+
23712+ for (k = 0; k < components; k++) {
23713+ *dst++ = *src++;
23714+ }
23715+ }
23716+ }
23717+#else
23718+ if (sx < 1.0 && sy < 1.0) {
23719+ /* magnify both width and height: use weighted sample of 4 pixels */
23720+ GLint i0, i1, j0, j1;
23721+ GLfloat alpha, beta;
23722+ GLfloat *src00, *src01, *src10, *src11;
23723+ GLfloat s1, s2;
23724+ GLfloat *dst;
23725+
23726+ for (i = 0; i < heightout; i++) {
23727+ i0 = i * sy;
23728+ i1 = i0 + 1;
23729+ if (i1 >= heightin)
23730+ i1 = heightin - 1;
23731+/* i1 = (i+1) * sy - EPSILON;*/
23732+ alpha = i * sy - i0;
23733+ for (j = 0; j < widthout; j++) {
23734+ j0 = j * sx;
23735+ j1 = j0 + 1;
23736+ if (j1 >= widthin)
23737+ j1 = widthin - 1;
23738+/* j1 = (j+1) * sx - EPSILON; */
23739+ beta = j * sx - j0;
23740+
23741+ /* compute weighted average of pixels in rect (i0,j0)-(i1,j1) */
23742+ src00 = tempin + (i0 * widthin + j0) * components;
23743+ src01 = tempin + (i0 * widthin + j1) * components;
23744+ src10 = tempin + (i1 * widthin + j0) * components;
23745+ src11 = tempin + (i1 * widthin + j1) * components;
23746+
23747+ dst = tempout + (i * widthout + j) * components;
23748+
23749+ for (k = 0; k < components; k++) {
23750+ s1 = *src00++ * (1.0 - beta) + *src01++ * beta;
23751+ s2 = *src10++ * (1.0 - beta) + *src11++ * beta;
23752+ *dst++ = s1 * (1.0 - alpha) + s2 * alpha;
23753+ }
23754+ }
23755+ }
23756+ }
23757+ else {
23758+ /* shrink width and/or height: use an unweighted box filter */
23759+ GLint i0, i1;
23760+ GLint j0, j1;
23761+ GLint ii, jj;
23762+ GLfloat sum, *dst;
23763+
23764+ for (i = 0; i < heightout; i++) {
23765+ i0 = i * sy;
23766+ i1 = i0 + 1;
23767+ if (i1 >= heightin)
23768+ i1 = heightin - 1;
23769+/* i1 = (i+1) * sy - EPSILON; */
23770+ for (j = 0; j < widthout; j++) {
23771+ j0 = j * sx;
23772+ j1 = j0 + 1;
23773+ if (j1 >= widthin)
23774+ j1 = widthin - 1;
23775+/* j1 = (j+1) * sx - EPSILON; */
23776+
23777+ dst = tempout + (i * widthout + j) * components;
23778+
23779+ /* compute average of pixels in the rectangle (i0,j0)-(i1,j1) */
23780+ for (k = 0; k < components; k++) {
23781+ sum = 0.0;
23782+ for (ii = i0; ii <= i1; ii++) {
23783+ for (jj = j0; jj <= j1; jj++) {
23784+ sum += *(tempin + (ii * widthin + jj) * components + k);
23785+ }
23786+ }
23787+ sum /= (j1 - j0 + 1) * (i1 - i0 + 1);
23788+ *dst++ = sum;
23789+ }
23790+ }
23791+ }
23792+ }
23793+#endif
23794+
23795+
23796+ /*
23797+ * Return output image
23798+ */
23799+
23800+ if (packrowlength > 0) {
23801+ rowlen = packrowlength;
23802+ }
23803+ else {
23804+ rowlen = widthout;
23805+ }
23806+ if (sizeout >= packalignment) {
23807+ rowstride = components * rowlen;
23808+ }
23809+ else {
23810+ rowstride = packalignment / sizeout
23811+ * CEILING(components * rowlen * sizeout, packalignment);
23812+ }
23813+
23814+ switch (typeout) {
23815+ case GL_UNSIGNED_BYTE:
23816+ k = 0;
23817+ for (i = 0; i < heightout; i++) {
23818+ GLubyte *ubptr = (GLubyte *) dataout
23819+ + i * rowstride
23820+ + packskiprows * rowstride + packskippixels * components;
23821+ for (j = 0; j < widthout * components; j++) {
23822+ dummy(j, k + i);
23823+ *ubptr++ = (GLubyte) tempout[k++];
23824+ }
23825+ }
23826+ break;
23827+ case GL_BYTE:
23828+ k = 0;
23829+ for (i = 0; i < heightout; i++) {
23830+ GLbyte *bptr = (GLbyte *) dataout
23831+ + i * rowstride
23832+ + packskiprows * rowstride + packskippixels * components;
23833+ for (j = 0; j < widthout * components; j++) {
23834+ dummy(j, k + i);
23835+ *bptr++ = (GLbyte) tempout[k++];
23836+ }
23837+ }
23838+ break;
23839+ case GL_UNSIGNED_SHORT:
23840+ k = 0;
23841+ for (i = 0; i < heightout; i++) {
23842+ GLushort *usptr = (GLushort *) dataout
23843+ + i * rowstride
23844+ + packskiprows * rowstride + packskippixels * components;
23845+ for (j = 0; j < widthout * components; j++) {
23846+ dummy(j, k + i);
23847+ *usptr++ = (GLushort) tempout[k++];
23848+ }
23849+ }
23850+ break;
23851+ case GL_SHORT:
23852+ k = 0;
23853+ for (i = 0; i < heightout; i++) {
23854+ GLshort *sptr = (GLshort *) dataout
23855+ + i * rowstride
23856+ + packskiprows * rowstride + packskippixels * components;
23857+ for (j = 0; j < widthout * components; j++) {
23858+ dummy(j, k + i);
23859+ *sptr++ = (GLshort) tempout[k++];
23860+ }
23861+ }
23862+ break;
23863+ case GL_UNSIGNED_INT:
23864+ k = 0;
23865+ for (i = 0; i < heightout; i++) {
23866+ GLuint *uiptr = (GLuint *) dataout
23867+ + i * rowstride
23868+ + packskiprows * rowstride + packskippixels * components;
23869+ for (j = 0; j < widthout * components; j++) {
23870+ dummy(j, k + i);
23871+ *uiptr++ = (GLuint) tempout[k++];
23872+ }
23873+ }
23874+ break;
23875+ case GL_INT:
23876+ k = 0;
23877+ for (i = 0; i < heightout; i++) {
23878+ GLint *iptr = (GLint *) dataout
23879+ + i * rowstride
23880+ + packskiprows * rowstride + packskippixels * components;
23881+ for (j = 0; j < widthout * components; j++) {
23882+ dummy(j, k + i);
23883+ *iptr++ = (GLint) tempout[k++];
23884+ }
23885+ }
23886+ break;
23887+ case GL_FLOAT:
23888+ k = 0;
23889+ for (i = 0; i < heightout; i++) {
23890+ GLfloat *fptr = (GLfloat *) dataout
23891+ + i * rowstride
23892+ + packskiprows * rowstride + packskippixels * components;
23893+ for (j = 0; j < widthout * components; j++) {
23894+ dummy(j, k + i);
23895+ *fptr++ = tempout[k++];
23896+ }
23897+ }
23898+ break;
23899+ default:
23900+ return GLU_INVALID_ENUM;
23901+ }
23902+
23903+
23904+ /* free temporary image storage */
23905+ free(tempin);
23906+ free(tempout);
23907+
23908+ return 0;
23909+}
23910+
23911+
23912+
23913+/*
23914+ * Return the largest k such that 2^k <= n.
23915+ */
23916+static GLint
23917+ilog2(GLint n)
23918+{
23919+ GLint k;
23920+
23921+ if (n <= 0)
23922+ return 0;
23923+ for (k = 0; n >>= 1; k++);
23924+ return k;
23925+}
23926+
23927+
23928+
23929+/*
23930+ * Find the value nearest to n which is also a power of two.
23931+ */
23932+static GLint
23933+round2(GLint n)
23934+{
23935+ GLint m;
23936+
23937+ for (m = 1; m < n; m *= 2);
23938+
23939+ /* m>=n */
23940+ if (m - n <= n - m / 2) {
23941+ return m;
23942+ }
23943+ else {
23944+ return m / 2;
23945+ }
23946+}
23947+
23948+
23949+/*
23950+ * Given an pixel format and datatype, return the number of bytes to
23951+ * store one pixel.
23952+ */
23953+static GLint
23954+bytes_per_pixel(GLenum format, GLenum type)
23955+{
23956+ GLint n, m;
23957+
23958+ switch (format) {
23959+ case GL_COLOR_INDEX:
23960+ case GL_STENCIL_INDEX:
23961+ case GL_DEPTH_COMPONENT:
23962+ case GL_RED:
23963+ case GL_GREEN:
23964+ case GL_BLUE:
23965+ case GL_ALPHA:
23966+ case GL_LUMINANCE:
23967+ n = 1;
23968+ break;
23969+ case GL_LUMINANCE_ALPHA:
23970+ n = 2;
23971+ break;
23972+ case GL_RGB:
23973+ case GL_BGR:
23974+ n = 3;
23975+ break;
23976+ case GL_RGBA:
23977+ case GL_BGRA:
23978+#ifdef GL_EXT_abgr
23979+ case GL_ABGR_EXT:
23980+#endif
23981+ n = 4;
23982+ break;
23983+ default:
23984+ n = 0;
23985+ }
23986+
23987+ switch (type) {
23988+ case GL_UNSIGNED_BYTE:
23989+ m = sizeof(GLubyte);
23990+ break;
23991+ case GL_BYTE:
23992+ m = sizeof(GLbyte);
23993+ break;
23994+ case GL_BITMAP:
23995+ m = 1;
23996+ break;
23997+ case GL_UNSIGNED_SHORT:
23998+ m = sizeof(GLushort);
23999+ break;
24000+ case GL_SHORT:
24001+ m = sizeof(GLshort);
24002+ break;
24003+ case GL_UNSIGNED_INT:
24004+ m = sizeof(GLuint);
24005+ break;
24006+ case GL_INT:
24007+ m = sizeof(GLint);
24008+ break;
24009+ case GL_FLOAT:
24010+ m = sizeof(GLfloat);
24011+ break;
24012+ default:
24013+ m = 0;
24014+ }
24015+
24016+ return n * m;
24017+}
24018+
24019+
24020+
24021+/*
24022+ * WARNING: This function isn't finished and has never been tested!!!!
24023+ */
24024+GLint GLAPIENTRY
24025+mesa_gluBuild1DMipmaps(GLenum target, GLint components,
24026+ GLsizei width, GLenum format, GLenum type, const void *data)
24027+{
24028+ GLubyte *texture;
24029+ GLint levels, max_levels;
24030+ GLint new_width, max_width;
24031+ GLint i, j, k, l;
24032+
24033+ if (width < 1)
24034+ return GLU_INVALID_VALUE;
24035+
24036+ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_width);
24037+ max_levels = ilog2(max_width) + 1;
24038+
24039+ /* Compute how many mipmap images to make */
24040+ levels = ilog2(width) + 1;
24041+ if (levels > max_levels) {
24042+ levels = max_levels;
24043+ }
24044+
24045+ new_width = 1 << (levels - 1);
24046+
24047+ texture = (GLubyte *) malloc(new_width * components);
24048+ if (!texture) {
24049+ return GLU_OUT_OF_MEMORY;
24050+ }
24051+
24052+ if (width != new_width) {
24053+ /* initial rescaling */
24054+ switch (type) {
24055+ case GL_UNSIGNED_BYTE:
24056+ {
24057+ GLubyte *ub_data = (GLubyte *) data;
24058+ for (i = 0; i < new_width; i++) {
24059+ j = i * width / new_width;
24060+ for (k = 0; k < components; k++) {
24061+ texture[i * components + k] = ub_data[j * components + k];
24062+ }
24063+ }
24064+ }
24065+ break;
24066+ default:
24067+ /* Not implemented */
24068+ return GLU_ERROR;
24069+ }
24070+ }
24071+
24072+ /* generate and load mipmap images */
24073+ for (l = 0; l < levels; l++) {
24074+ glTexImage1D(GL_TEXTURE_1D, l, components, new_width, 0,
24075+ format, GL_UNSIGNED_BYTE, texture);
24076+
24077+ /* Scale image down to 1/2 size */
24078+ new_width = new_width / 2;
24079+ for (i = 0; i < new_width; i++) {
24080+ for (k = 0; k < components; k++) {
24081+ GLint sample1, sample2;
24082+ sample1 = (GLint) texture[i * 2 * components + k];
24083+ sample2 = (GLint) texture[(i * 2 + 1) * components + k];
24084+ texture[i * components + k] = (GLubyte) ((sample1 + sample2) / 2);
24085+ }
24086+ }
24087+ }
24088+
24089+ free(texture);
24090+
24091+ return 0;
24092+}
24093+
24094+
24095+
24096+GLint GLAPIENTRY
24097+mesa_gluBuild2DMipmaps(GLenum target, GLint components,
24098+ GLsizei width, GLsizei height, GLenum format,
24099+ GLenum type, const void *data)
24100+{
24101+ GLint w, h, maxsize;
24102+ void *image, *newimage;
24103+ GLint neww, newh, level, bpp;
24104+ int error;
24105+ GLboolean done;
24106+ GLint retval = 0;
24107+ GLint unpackrowlength, unpackalignment, unpackskiprows, unpackskippixels;
24108+ GLint packrowlength, packalignment, packskiprows, packskippixels;
24109+
24110+ if (width < 1 || height < 1)
24111+ return GLU_INVALID_VALUE;
24112+
24113+ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxsize);
24114+
24115+ w = round2(width);
24116+ if (w > maxsize) {
24117+ w = maxsize;
24118+ }
24119+ h = round2(height);
24120+ if (h > maxsize) {
24121+ h = maxsize;
24122+ }
24123+
24124+ bpp = bytes_per_pixel(format, type);
24125+ if (bpp == 0) {
24126+ /* probably a bad format or type enum */
24127+ return GLU_INVALID_ENUM;
24128+ }
24129+
24130+ /* Get current glPixelStore values */
24131+ glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpackrowlength);
24132+ glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpackalignment);
24133+ glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unpackskiprows);
24134+ glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unpackskippixels);
24135+ glGetIntegerv(GL_PACK_ROW_LENGTH, &packrowlength);
24136+ glGetIntegerv(GL_PACK_ALIGNMENT, &packalignment);
24137+ glGetIntegerv(GL_PACK_SKIP_ROWS, &packskiprows);
24138+ glGetIntegerv(GL_PACK_SKIP_PIXELS, &packskippixels);
24139+
24140+ /* set pixel packing */
24141+ glPixelStorei(GL_PACK_ROW_LENGTH, 0);
24142+ glPixelStorei(GL_PACK_ALIGNMENT, 1);
24143+ glPixelStorei(GL_PACK_SKIP_ROWS, 0);
24144+ glPixelStorei(GL_PACK_SKIP_PIXELS, 0);
24145+
24146+ done = GL_FALSE;
24147+
24148+ if (w != width || h != height) {
24149+ /* must rescale image to get "top" mipmap texture image */
24150+ image = malloc((w + 4) * h * bpp);
24151+ if (!image) {
24152+ return GLU_OUT_OF_MEMORY;
24153+ }
24154+ error = mesa_gluScaleImage(format, width, height, type, data,
24155+ w, h, type, image);
24156+ if (error) {
24157+ retval = error;
24158+ done = GL_TRUE;
24159+ }
24160+ }
24161+ else {
24162+ image = (void *) data;
24163+ }
24164+
24165+ level = 0;
24166+ while (!done) {
24167+ if (image != data) {
24168+ /* set pixel unpacking */
24169+ glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
24170+ glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
24171+ glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
24172+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
24173+ }
24174+
24175+ glTexImage2D(target, level, components, w, h, 0, format, type, image);
24176+
24177+ if (w == 1 && h == 1)
24178+ break;
24179+
24180+ neww = (w < 2) ? 1 : w / 2;
24181+ newh = (h < 2) ? 1 : h / 2;
24182+ newimage = malloc((neww + 4) * newh * bpp);
24183+ if (!newimage) {
24184+ return GLU_OUT_OF_MEMORY;
24185+ }
24186+
24187+ error = mesa_gluScaleImage(format, w, h, type, image,
24188+ neww, newh, type, newimage);
24189+ if (error) {
24190+ retval = error;
24191+ done = GL_TRUE;
24192+ }
24193+
24194+ if (image != data) {
24195+ free(image);
24196+ }
24197+ image = newimage;
24198+
24199+ w = neww;
24200+ h = newh;
24201+ level++;
24202+ }
24203+
24204+ if (image != data) {
24205+ free(image);
24206+ }
24207+
24208+ /* Restore original glPixelStore state */
24209+ glPixelStorei(GL_UNPACK_ROW_LENGTH, unpackrowlength);
24210+ glPixelStorei(GL_UNPACK_ALIGNMENT, unpackalignment);
24211+ glPixelStorei(GL_UNPACK_SKIP_ROWS, unpackskiprows);
24212+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, unpackskippixels);
24213+ glPixelStorei(GL_PACK_ROW_LENGTH, packrowlength);
24214+ glPixelStorei(GL_PACK_ALIGNMENT, packalignment);
24215+ glPixelStorei(GL_PACK_SKIP_ROWS, packskiprows);
24216+ glPixelStorei(GL_PACK_SKIP_PIXELS, packskippixels);
24217+
24218+ return retval;
24219+}
24220Index: git/target-i386/opengl_exec.c
24221===================================================================
24222--- /dev/null 1970-01-01 00:00:00.000000000 +0000
24223+++ git/target-i386/opengl_exec.c 2009-05-23 11:22:17.000000000 +0100
24224@@ -0,0 +1,3931 @@
24225+/*
24226+ * Host-side implementation of GL/GLX API
24227+ *
24228+ * Copyright (c) 2006,2007 Even Rouault
24229+ *
24230+ * Permission is hereby granted, free of charge, to any person obtaining a copy
24231+ * of this software and associated documentation files (the "Software"), to deal
24232+ * in the Software without restriction, including without limitation the rights
24233+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
24234+ * copies of the Software, and to permit persons to whom the Software is
24235+ * furnished to do so, subject to the following conditions:
24236+ *
24237+ * The above copyright notice and this permission notice shall be included in
24238+ * all copies or substantial portions of the Software.
24239+ *
24240+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24241+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24242+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24243+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24244+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24245+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24246+ * THE SOFTWARE.
24247+ */
24248+
24249+
24250+#include <stdio.h>
24251+#include <stdlib.h>
24252+#include <assert.h>
24253+#include <string.h>
24254+
24255+#include <X11/Xlib.h>
24256+#include <X11/Xutil.h>
24257+
24258+#define GL_GLEXT_PROTOTYPES
24259+#define GLX_GLXEXT_PROTOTYPES
24260+
24261+#include <mesa_gl.h>
24262+#include <mesa_glx.h>
24263+
24264+// TODO
24265+typedef long unsigned int target_phys_addr_t;
24266+
24267+#include "opengl_func.h"
24268+
24269+#include "mesa_glu.h"
24270+#include "mesa_mipmap.c"
24271+
24272+#include "../qemu-common.h"
24273+
24274+//#define SYSTEMATIC_ERROR_CHECK
24275+#define BUFFER_BEGINEND
24276+#define glGetError() 0
24277+
24278+#define GET_EXT_PTR(type, funcname, args_decl) \
24279+ static int detect_##funcname = 0; \
24280+ static type(*ptr_func_##funcname)args_decl = NULL; \
24281+ if (detect_##funcname == 0) \
24282+ { \
24283+ detect_##funcname = 1; \
24284+ ptr_func_##funcname = (type(*)args_decl)glXGetProcAddressARB((const GLubyte*)#funcname); \
24285+ assert (ptr_func_##funcname); \
24286+ }
24287+
24288+#define GET_EXT_PTR_NO_FAIL(type, funcname, args_decl) \
24289+ static int detect_##funcname = 0; \
24290+ static type(*ptr_func_##funcname)args_decl = NULL; \
24291+ if (detect_##funcname == 0) \
24292+ { \
24293+ detect_##funcname = 1; \
24294+ ptr_func_##funcname = (type(*)args_decl)glXGetProcAddressARB((const GLubyte*)#funcname); \
24295+ }
24296+
24297+#ifndef WIN32
24298+#include <dlfcn.h>
24299+#endif
24300+
24301+static void *get_glu_ptr(const char *name)
24302+{
24303+ static void *handle = (void *) -1;
24304+
24305+ if (handle == (void *) -1) {
24306+#ifndef WIN32
24307+ handle = dlopen("libGLU.so", RTLD_LAZY);
24308+ if (!handle)
24309+ fprintf(stderr, "can't load libGLU.so : %s\n", dlerror());
24310+#else
24311+ handle = (void *) LoadLibrary("glu32.dll");
24312+ if (!handle)
24313+ fprintf(stderr, "can't load glu32.dll\n");
24314+#endif
24315+ }
24316+ if (handle) {
24317+#ifndef WIN32
24318+ return dlsym(handle, name);
24319+#else
24320+ return GetProcAddress(handle, name);
24321+#endif
24322+ }
24323+ return NULL;
24324+}
24325+
24326+#define GET_GLU_PTR(type, funcname, args_decl) \
24327+ static int detect_##funcname = 0; \
24328+ static type(*ptr_func_##funcname)args_decl = NULL; \
24329+ if (detect_##funcname == 0) \
24330+ { \
24331+ detect_##funcname = 1; \
24332+ ptr_func_##funcname = (type(*)args_decl)get_glu_ptr(#funcname); \
24333+ }
24334+
24335+int display_function_call = 0;
24336+
24337+static const int defaultAttribList[] = {
24338+ GLX_RGBA,
24339+ GLX_RED_SIZE, 1,
24340+ GLX_GREEN_SIZE, 1,
24341+ GLX_BLUE_SIZE, 1,
24342+ GLX_DOUBLEBUFFER,
24343+ None
24344+};
24345+
24346+static XVisualInfo *get_default_visual(Display *dpy)
24347+{
24348+ static XVisualInfo *vis = NULL;
24349+ XVisualInfo theTemplate;
24350+ int numVisuals;
24351+
24352+ if (vis)
24353+ return vis;
24354+ fprintf(stderr, "get_default_visual\n");
24355+ /* if (vis == NULL) vis = glXChooseVisual(dpy, 0,
24356+ * (int*)defaultAttribList); */
24357+ theTemplate.screen = 0;
24358+ vis = XGetVisualInfo(dpy, VisualScreenMask, &theTemplate, &numVisuals);
24359+
24360+ return vis;
24361+}
24362+
24363+
24364+static Display *parent_dpy = NULL;
24365+static Window qemu_parent_window = 0;
24366+
24367+static Window active_win = 0; /* FIXME */
24368+static int active_win_x = 0;
24369+static int active_win_y = 0;
24370+
24371+void opengl_exec_set_parent_window(Display *_dpy, Window _parent_window)
24372+{
24373+ parent_dpy = _dpy;
24374+ qemu_parent_window = _parent_window;
24375+ if (active_win)
24376+ XReparentWindow(_dpy, active_win, _parent_window, active_win_x,
24377+ active_win_y);
24378+}
24379+
24380+static int local_connection = 0;
24381+void opengl_exec_set_local_connection()
24382+{
24383+ local_connection = 1;
24384+}
24385+
24386+static GLXDrawable create_window(Display *dpy, Window local_parent_window,
24387+ XVisualInfo *vis, const char *name,
24388+ int x, int y, int width, int height)
24389+{
24390+ int scrnum;
24391+ XSetWindowAttributes attr = { 0 };
24392+ unsigned long mask;
24393+ Window root;
24394+ Window win;
24395+
24396+ scrnum = DefaultScreen(dpy);
24397+ root = RootWindow(dpy, scrnum);
24398+
24399+ /* window attributes */
24400+ attr.background_pixel = 0xff000000;
24401+ attr.border_pixel = 0;
24402+ attr.colormap = XCreateColormap(dpy, root, vis->visual, AllocNone);
24403+ attr.event_mask = 0; /* StructureNotifyMask | ExposureMask | KeyPressMask */
24404+ attr.save_under = True;
24405+ // if (local_parent_window == NULL && qemu_parent_window == NULL)
24406+ attr.override_redirect = True;
24407+ // else
24408+ // attr.override_redirect = True;
24409+ attr.cursor = None;
24410+ mask =
24411+ CWBackPixel | CWBorderPixel | CWColormap | CWEventMask |
24412+ CWOverrideRedirect | CWSaveUnder;
24413+
24414+ if (local_parent_window)
24415+ win = XCreateWindow(dpy, local_parent_window, 0, 0, width, height, 0,
24416+ vis->depth, InputOutput, vis->visual, mask, &attr);
24417+ else if (qemu_parent_window)
24418+ win = XCreateWindow(dpy, qemu_parent_window, 0, 0, width, height, 0,
24419+ vis->depth, InputOutput, vis->visual, mask, &attr);
24420+ else
24421+ win = XCreateWindow(dpy, root, 0, 0, width, height, 0, vis->depth,
24422+ InputOutput, vis->visual, mask, &attr);
24423+
24424+ /* set hints and properties */
24425+ {
24426+ XSizeHints sizehints;
24427+
24428+ sizehints.x = x;
24429+ sizehints.y = y;
24430+ sizehints.width = width;
24431+ sizehints.height = height;
24432+ sizehints.flags = USSize | USPosition;
24433+ XSetWMNormalHints(dpy, win, &sizehints);
24434+ XSetStandardProperties(dpy, win, name, name, None,
24435+ (char **) NULL, 0, &sizehints);
24436+ }
24437+
24438+ XSync(dpy, 0);
24439+
24440+ /*
24441+ * int loop = 1; while (loop) { while (XPending(dpy) > 0) { XEvent event;
24442+ * XNextEvent(dpy, &event); switch (event.type) { case CreateNotify: { if
24443+ * (((XCreateWindowEvent*)&event)->window == win) { loop = 0; } break; } }
24444+ * } } */
24445+
24446+ /* TODO */
24447+ if (!active_win)
24448+ active_win = win;
24449+
24450+ return win;
24451+}
24452+
24453+typedef struct {
24454+ void *key;
24455+ void *value;
24456+} Assoc;
24457+
24458+#define MAX_HANDLED_PROCESS 100
24459+#define MAX_ASSOC_SIZE 100
24460+
24461+#define MAX_FBCONFIG 10
24462+
24463+#include "opengl_utils.h"
24464+
24465+#define MAX(a, b) (((a) > (b)) ? (a) : (b))
24466+
24467+
24468+typedef struct {
24469+ int x;
24470+ int y;
24471+ int width;
24472+ int height;
24473+ int map_state;
24474+} WindowPosStruct;
24475+
24476+typedef struct {
24477+ GLbitfield mask;
24478+ int activeTextureIndex;
24479+} ClientState;
24480+
24481+#define MAX_CLIENT_STATE_STACK_SIZE 16
24482+
24483+typedef struct {
24484+ int ref;
24485+ int fake_ctxt;
24486+ int fake_shareList;
24487+ GLXContext context;
24488+ GLXDrawable drawable;
24489+
24490+ void *vertexPointer;
24491+ void *normalPointer;
24492+ void *colorPointer;
24493+ void *secondaryColorPointer;
24494+ void *indexPointer;
24495+ void *texCoordPointer[NB_MAX_TEXTURES];
24496+ void *edgeFlagPointer;
24497+ void *vertexAttribPointer[MY_GL_MAX_VERTEX_ATTRIBS_ARB];
24498+ void *vertexAttribPointerNV[MY_GL_MAX_VERTEX_ATTRIBS_NV];
24499+ void *weightPointer;
24500+ void *matrixIndexPointer;
24501+ void *fogCoordPointer;
24502+ void *variantPointerEXT[MY_GL_MAX_VARIANT_POINTER_EXT];
24503+ void *interleavedArrays;
24504+ void *elementPointerATI;
24505+
24506+ int vertexPointerSize;
24507+ int normalPointerSize;
24508+ int colorPointerSize;
24509+ int secondaryColorPointerSize;
24510+ int indexPointerSize;
24511+ int texCoordPointerSize[NB_MAX_TEXTURES];
24512+ int edgeFlagPointerSize;
24513+ int vertexAttribPointerSize[MY_GL_MAX_VERTEX_ATTRIBS_ARB];
24514+ int vertexAttribPointerNVSize[MY_GL_MAX_VERTEX_ATTRIBS_NV];
24515+ int weightPointerSize;
24516+ int matrixIndexPointerSize;
24517+ int fogCoordPointerSize;
24518+ int variantPointerEXTSize[MY_GL_MAX_VARIANT_POINTER_EXT];
24519+ int interleavedArraysSize;
24520+ int elementPointerATISize;
24521+
24522+ int selectBufferSize;
24523+ void *selectBufferPtr;
24524+ int feedbackBufferSize;
24525+ void *feedbackBufferPtr;
24526+
24527+ ClientState clientStateStack[MAX_CLIENT_STATE_STACK_SIZE];
24528+ int clientStateSp;
24529+ int activeTextureIndex;
24530+
24531+ unsigned int ownTabTextures[32768];
24532+ unsigned int *tabTextures;
24533+ RangeAllocator ownTextureAllocator;
24534+ RangeAllocator *textureAllocator;
24535+
24536+ unsigned int ownTabBuffers[32768];
24537+ unsigned int *tabBuffers;
24538+ RangeAllocator ownBufferAllocator;
24539+ RangeAllocator *bufferAllocator;
24540+
24541+ unsigned int ownTabLists[32768];
24542+ unsigned int *tabLists;
24543+ RangeAllocator ownListAllocator;
24544+ RangeAllocator *listAllocator;
24545+
24546+#ifdef SYSTEMATIC_ERROR_CHECK
24547+ int last_error;
24548+#endif
24549+} GLState;
24550+
24551+typedef struct {
24552+ int process_id;
24553+ int instr_counter;
24554+
24555+ int x, y, width, height;
24556+ WindowPosStruct currentDrawablePos;
24557+
24558+ int next_available_context_number;
24559+ int next_available_pbuffer_number;
24560+
24561+ int nb_states;
24562+ GLState default_state;
24563+ GLState **glstates;
24564+ GLState *current_state;
24565+
24566+ int nfbconfig;
24567+ GLXFBConfig *fbconfigs[MAX_FBCONFIG];
24568+ int fbconfigs_max[MAX_FBCONFIG];
24569+ int nfbconfig_total;
24570+
24571+ Assoc association_fakecontext_glxcontext[MAX_ASSOC_SIZE];
24572+ Assoc association_fakepbuffer_pbuffer[MAX_ASSOC_SIZE];
24573+ Assoc association_clientdrawable_serverdrawable[MAX_ASSOC_SIZE];
24574+ Assoc association_fakecontext_visual[MAX_ASSOC_SIZE];
24575+
24576+ Display *dpy;
24577+
24578+ int began;
24579+ int primitive;
24580+ int bufsize;
24581+ int bufstart;
24582+ arg_t *cmdbuf;
24583+} ProcessStruct;
24584+
24585+static ProcessStruct processes[MAX_HANDLED_PROCESS];
24586+
24587+void init_process_tab()
24588+{
24589+ memset(processes, 0, sizeof(processes));
24590+}
24591+
24592+#define ARG_TO_CHAR(x) (char)(x)
24593+#define ARG_TO_UNSIGNED_CHAR(x) (unsigned char)(x)
24594+#define ARG_TO_SHORT(x) (short)(x)
24595+#define ARG_TO_UNSIGNED_SHORT(x) (unsigned short)(x)
24596+#define ARG_TO_INT(x) (int)(x)
24597+#define ARG_TO_UNSIGNED_INT(x) (unsigned int)(x)
24598+#define ARG_TO_FLOAT(x) (*(float*)&(x))
24599+#define ARG_TO_DOUBLE(x) (*(double*)(x))
24600+
24601+#include "server_stub.c"
24602+
24603+/* ---- */
24604+
24605+#ifdef BUFFER_BEGINEND
24606+/* A user of the following two functions must not buffer any calls that
24607+ * may throw an error (i.e. errors conditions must be checked before
24608+ * storing in the buffer) or return values. */
24609+static inline arg_t *cmd_buffer_alloc(ProcessStruct *process, size_t elems)
24610+{
24611+ arg_t *ret;
24612+
24613+ if (unlikely(process->bufstart + elems > process->bufsize)) {
24614+ process->bufsize = (process->bufsize ?: 0x100) << 1;
24615+ process->cmdbuf = qemu_realloc(process->cmdbuf,
24616+ process->bufsize * sizeof(arg_t));
24617+ }
24618+
24619+ ret = process->cmdbuf + process->bufstart;
24620+ process->bufstart += elems;
24621+ return ret;
24622+}
24623+
24624+static inline void cmd_buffer_replay(ProcessStruct *process)
24625+{
24626+ Signature *sig;
24627+ int func_number;
24628+ int ret_int;
24629+ char ret_char;
24630+ arg_t *call = process->cmdbuf;
24631+
24632+ while (process->bufstart) {
24633+ func_number = *call ++;
24634+ sig = (Signature *) tab_opengl_calls[func_number];
24635+
24636+ execute_func(func_number, call, &ret_int, &ret_char);
24637+
24638+ call += sig->nb_args;
24639+ process->bufstart -= sig->nb_args + 1;
24640+ }
24641+}
24642+#endif
24643+
24644+/* ---- */
24645+
24646+typedef void *ClientGLXDrawable;
24647+static inline ClientGLXDrawable to_drawable(arg_t arg)
24648+{
24649+#ifdef TARGET_X86_64
24650+ if (arg > (unsigned long) -1) {
24651+ fprintf(stderr, "GLXDrawable too big for this implementation\n");
24652+ exit(-1);
24653+ }
24654+#endif
24655+ return (void *) (unsigned long) arg;
24656+}
24657+
24658+GLXContext get_association_fakecontext_glxcontext(
24659+ ProcessStruct *process, int fakecontext)
24660+{
24661+ int i;
24662+
24663+ for (i = 0;
24664+ i < MAX_ASSOC_SIZE &&
24665+ process->association_fakecontext_glxcontext[i].key; i++)
24666+ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
24667+ fakecontext)
24668+ return (GLXContext)
24669+ process->association_fakecontext_glxcontext[i].value;
24670+
24671+ return NULL;
24672+}
24673+
24674+void set_association_fakecontext_glxcontext(
24675+ ProcessStruct *process, int fakecontext, GLXContext glxcontext)
24676+{
24677+ int i;
24678+
24679+ for (i = 0;
24680+ i < MAX_ASSOC_SIZE &&
24681+ process->association_fakecontext_glxcontext[i].key; i++)
24682+ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
24683+ fakecontext)
24684+ break;
24685+
24686+ if (i < MAX_ASSOC_SIZE) {
24687+ process->association_fakecontext_glxcontext[i].key =
24688+ (void *) (long) fakecontext;
24689+ process->association_fakecontext_glxcontext[i].value =
24690+ (void *) glxcontext;
24691+ } else
24692+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
24693+}
24694+
24695+void unset_association_fakecontext_glxcontext(
24696+ ProcessStruct *process, int fakecontext)
24697+{
24698+ int i;
24699+
24700+ for (i = 0;
24701+ i < MAX_ASSOC_SIZE &&
24702+ process->association_fakecontext_glxcontext[i].key; i++)
24703+ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
24704+ fakecontext) {
24705+ memmove(&process->association_fakecontext_glxcontext[i],
24706+ &process->association_fakecontext_glxcontext[i + 1],
24707+ sizeof(Assoc) * (MAX_ASSOC_SIZE - 1 - i));
24708+ return;
24709+ }
24710+}
24711+
24712+/* ---- */
24713+
24714+XVisualInfo *get_association_fakecontext_visual(
24715+ ProcessStruct *process, int fakecontext)
24716+{
24717+ int i;
24718+
24719+ for (i = 0;
24720+ i < MAX_ASSOC_SIZE && process->association_fakecontext_visual[i].key;
24721+ i++)
24722+ if ((int) (long) process->association_fakecontext_visual[i].key ==
24723+ fakecontext)
24724+ return process->association_fakecontext_visual[i].value;
24725+
24726+ return NULL;
24727+}
24728+
24729+void set_association_fakecontext_visual(ProcessStruct *process,
24730+ int fakecontext, XVisualInfo *visual)
24731+{
24732+ int i;
24733+
24734+ for (i = 0;
24735+ i < MAX_ASSOC_SIZE && process->association_fakecontext_visual[i].key;
24736+ i++)
24737+ if ((int) (long) process->association_fakecontext_visual[i].key ==
24738+ fakecontext)
24739+ break;
24740+
24741+ if (i < MAX_ASSOC_SIZE) {
24742+ process->association_fakecontext_visual[i].key =
24743+ (void *) (long) fakecontext;
24744+ process->association_fakecontext_visual[i].value = (void *) visual;
24745+ } else
24746+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
24747+}
24748+
24749+/* ---- */
24750+
24751+GLXPbuffer get_association_fakepbuffer_pbuffer(
24752+ ProcessStruct *process, ClientGLXDrawable fakepbuffer)
24753+{
24754+ int i;
24755+
24756+ for (i = 0; i < MAX_ASSOC_SIZE &&
24757+ process->association_fakepbuffer_pbuffer[i].key; i ++)
24758+ if ((ClientGLXDrawable)
24759+ process->association_fakepbuffer_pbuffer[i].key ==
24760+ fakepbuffer)
24761+ return (GLXPbuffer)
24762+ process->association_fakepbuffer_pbuffer[i].value;
24763+
24764+ return 0;
24765+}
24766+
24767+void set_association_fakepbuffer_pbuffer(ProcessStruct *process,
24768+ ClientGLXDrawable fakepbuffer, GLXPbuffer pbuffer)
24769+{
24770+ int i;
24771+
24772+ for (i = 0;
24773+ i < MAX_ASSOC_SIZE &&
24774+ process->association_fakepbuffer_pbuffer[i].key; i++)
24775+ if ((ClientGLXDrawable)
24776+ process->association_fakepbuffer_pbuffer[i].key ==
24777+ fakepbuffer)
24778+ break;
24779+
24780+ if (i < MAX_ASSOC_SIZE) {
24781+ process->association_fakepbuffer_pbuffer[i].key = (void *) fakepbuffer;
24782+ process->association_fakepbuffer_pbuffer[i].value = (void *) pbuffer;
24783+ } else
24784+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
24785+}
24786+
24787+void unset_association_fakepbuffer_pbuffer(ProcessStruct *process,
24788+ ClientGLXDrawable fakepbuffer)
24789+{
24790+ int i;
24791+
24792+ for (i = 0; i < MAX_ASSOC_SIZE &&
24793+ process->association_fakepbuffer_pbuffer[i].key; i++)
24794+ if ((ClientGLXDrawable)
24795+ process->association_fakepbuffer_pbuffer[i].key ==
24796+ fakepbuffer) {
24797+ memmove(&process->association_fakepbuffer_pbuffer[i],
24798+ &process->association_fakepbuffer_pbuffer[i + 1],
24799+ sizeof(Assoc) * (MAX_ASSOC_SIZE - 1 - i));
24800+ return;
24801+ }
24802+}
24803+
24804+/* ---- */
24805+
24806+GLXDrawable get_association_clientdrawable_serverdrawable(
24807+ ProcessStruct *process, ClientGLXDrawable clientdrawable)
24808+{
24809+ int i;
24810+
24811+ for (i = 0; i < MAX_ASSOC_SIZE &&
24812+ process->association_clientdrawable_serverdrawable[i].key;
24813+ i++)
24814+ if ((ClientGLXDrawable) process->
24815+ association_clientdrawable_serverdrawable[i].key ==
24816+ clientdrawable)
24817+ return (GLXDrawable) process->
24818+ association_clientdrawable_serverdrawable[i].value;
24819+
24820+ return (GLXDrawable) 0;
24821+}
24822+
24823+ClientGLXDrawable get_association_serverdrawable_clientdrawable(
24824+ ProcessStruct *process, GLXDrawable serverdrawable)
24825+{
24826+ int i;
24827+
24828+ for (i = 0; i < MAX_ASSOC_SIZE &&
24829+ process->association_clientdrawable_serverdrawable[i].key;
24830+ i ++)
24831+ if ((GLXDrawable) process->
24832+ association_clientdrawable_serverdrawable[i].value ==
24833+ serverdrawable)
24834+ return (ClientGLXDrawable)
24835+ process->association_clientdrawable_serverdrawable[i].key;
24836+
24837+ return NULL;
24838+}
24839+
24840+void set_association_clientdrawable_serverdrawable(
24841+ ProcessStruct *process, ClientGLXDrawable clientdrawable,
24842+ GLXDrawable serverdrawable)
24843+{
24844+ int i;
24845+
24846+ for (i = 0; process->association_clientdrawable_serverdrawable[i].key;
24847+ i ++)
24848+ if ((ClientGLXDrawable) process->
24849+ association_clientdrawable_serverdrawable[i].key ==
24850+ clientdrawable)
24851+ break;
24852+
24853+ if (i < MAX_ASSOC_SIZE) {
24854+ process->association_clientdrawable_serverdrawable[i].key =
24855+ (void *) clientdrawable;
24856+ process->association_clientdrawable_serverdrawable[i].value =
24857+ (void *) serverdrawable;
24858+ } else
24859+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
24860+}
24861+
24862+static void _get_window_pos(Display *dpy, Window win, WindowPosStruct *pos)
24863+{
24864+ XWindowAttributes window_attributes_return;
24865+ Window child;
24866+ int x, y;
24867+ Window root = DefaultRootWindow(dpy);
24868+
24869+ XGetWindowAttributes(dpy, win, &window_attributes_return);
24870+ XTranslateCoordinates(dpy, win, root, 0, 0, &x, &y, &child);
24871+ /* printf("%d %d %d %d\n", x, y, window_attributes_return.width,
24872+ * window_attributes_return.height); */
24873+ pos->x = x;
24874+ pos->y = y;
24875+ pos->width = window_attributes_return.width;
24876+ pos->height = window_attributes_return.height;
24877+ pos->map_state = window_attributes_return.map_state;
24878+}
24879+
24880+static int is_gl_vendor_ati(Display *dpy)
24881+{
24882+ static int is_gl_vendor_ati_flag = 0;
24883+ static int has_init = 0;
24884+
24885+ if (has_init == 0) {
24886+ has_init = 1;
24887+ is_gl_vendor_ati_flag =
24888+ (strncmp(glXGetClientString(dpy, GLX_VENDOR), "ATI", 3) == 0);
24889+ }
24890+ return is_gl_vendor_ati_flag;
24891+}
24892+
24893+static int get_server_texture(ProcessStruct *process,
24894+ unsigned int client_texture)
24895+{
24896+ unsigned int server_texture = 0;
24897+
24898+ if (client_texture < 32768) {
24899+ server_texture = process->current_state->tabTextures[client_texture];
24900+ } else {
24901+ fprintf(stderr, "invalid texture name %d\n", client_texture);
24902+ }
24903+ return server_texture;
24904+}
24905+
24906+static int get_server_buffer(ProcessStruct *process,
24907+ unsigned int client_buffer)
24908+{
24909+ unsigned int server_buffer = 0;
24910+
24911+ if (client_buffer < 32768) {
24912+ server_buffer = process->current_state->tabBuffers[client_buffer];
24913+ } else {
24914+ fprintf(stderr, "invalid buffer name %d\n", client_buffer);
24915+ }
24916+ return server_buffer;
24917+}
24918+
24919+
24920+static int get_server_list(ProcessStruct *process, unsigned int client_list)
24921+{
24922+ unsigned int server_list = 0;
24923+
24924+ if (client_list < 32768) {
24925+ server_list = process->current_state->tabLists[client_list];
24926+ } else {
24927+ fprintf(stderr, "invalid list name %d\n", client_list);
24928+ }
24929+ return server_list;
24930+}
24931+
24932+GLXFBConfig get_fbconfig(ProcessStruct *process, int client_fbconfig)
24933+{
24934+ int i;
24935+ int nbtotal = 0;
24936+
24937+ for (i = 0; i < process->nfbconfig; i++) {
24938+ assert(client_fbconfig >= 1 + nbtotal);
24939+ if (client_fbconfig <= nbtotal + process->fbconfigs_max[i]) {
24940+ return process->fbconfigs[i][client_fbconfig - 1 - nbtotal];
24941+ }
24942+ nbtotal += process->fbconfigs_max[i];
24943+ }
24944+ return 0;
24945+}
24946+
24947+typedef struct {
24948+ int attribListLength;
24949+ int *attribList;
24950+ XVisualInfo *visInfo;
24951+} AssocAttribListVisual;
24952+
24953+static int nTabAssocAttribListVisual = 0;
24954+static AssocAttribListVisual *tabAssocAttribListVisual = NULL;
24955+
24956+static int _compute_length_of_attrib_list_including_zero(const int *attribList,
24957+ int
24958+ booleanMustHaveValue)
24959+{
24960+ int i = 0;
24961+
24962+ while (attribList[i]) {
24963+ if (booleanMustHaveValue ||
24964+ !(attribList[i] == GLX_USE_GL || attribList[i] == GLX_RGBA ||
24965+ attribList[i] == GLX_DOUBLEBUFFER ||
24966+ attribList[i] == GLX_STEREO)) {
24967+ i += 2;
24968+ } else {
24969+ i++;
24970+ }
24971+ }
24972+ return i + 1;
24973+}
24974+
24975+static int glXChooseVisualFunc(Display *dpy, const int *_attribList)
24976+{
24977+ if (_attribList == NULL)
24978+ return 0;
24979+ int attribListLength =
24980+ _compute_length_of_attrib_list_including_zero(_attribList, 0);
24981+ int i;
24982+
24983+ int *attribList = malloc(sizeof(int) * attribListLength);
24984+ memcpy(attribList, _attribList, sizeof(int) * attribListLength);
24985+
24986+ i = 0;
24987+ while (attribList[i]) {
24988+ if (!
24989+ (attribList[i] == GLX_USE_GL || attribList[i] == GLX_RGBA ||
24990+ attribList[i] == GLX_DOUBLEBUFFER ||
24991+ attribList[i] == GLX_STEREO)) {
24992+ if (attribList[i] == GLX_SAMPLE_BUFFERS && attribList[i + 1] != 0
24993+ && getenv("DISABLE_SAMPLE_BUFFERS")) {
24994+ fprintf(stderr, "Disabling GLX_SAMPLE_BUFFERS\n");
24995+ attribList[i + 1] = 0;
24996+ }
24997+ i += 2;
24998+ } else {
24999+ i++;
25000+ }
25001+ }
25002+
25003+ for (i = 0; i < nTabAssocAttribListVisual; i++) {
25004+ if (tabAssocAttribListVisual[i].attribListLength == attribListLength
25005+ && memcmp(tabAssocAttribListVisual[i].attribList, attribList,
25006+ attribListLength * sizeof(int)) == 0) {
25007+ free(attribList);
25008+ return (tabAssocAttribListVisual[i].
25009+ visInfo) ? tabAssocAttribListVisual[i].visInfo->
25010+ visualid : 0;
25011+ }
25012+ }
25013+ XVisualInfo *visInfo = glXChooseVisual(dpy, 0, attribList);
25014+
25015+ tabAssocAttribListVisual = realloc(
25016+ tabAssocAttribListVisual, sizeof(AssocAttribListVisual) *
25017+ (nTabAssocAttribListVisual + 1));
25018+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribListLength =
25019+ attribListLength;
25020+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList =
25021+ (int *) malloc(sizeof(int) * attribListLength);
25022+ memcpy(tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList,
25023+ attribList, sizeof(int) * attribListLength);
25024+ tabAssocAttribListVisual[nTabAssocAttribListVisual].visInfo = visInfo;
25025+ nTabAssocAttribListVisual++;
25026+ free(attribList);
25027+ return (visInfo) ? visInfo->visualid : 0;
25028+}
25029+
25030+static XVisualInfo *get_visual_info_from_visual_id(Display *dpy,
25031+ int visualid)
25032+{
25033+ int i, n;
25034+ XVisualInfo template;
25035+ XVisualInfo *visInfo;
25036+
25037+ for (i = 0; i < nTabAssocAttribListVisual; i++) {
25038+ if (tabAssocAttribListVisual[i].visInfo &&
25039+ tabAssocAttribListVisual[i].visInfo->visualid == visualid) {
25040+ return tabAssocAttribListVisual[i].visInfo;
25041+ }
25042+ }
25043+ template.visualid = visualid;
25044+ visInfo = XGetVisualInfo(dpy, VisualIDMask, &template, &n);
25045+ tabAssocAttribListVisual =
25046+ realloc(tabAssocAttribListVisual,
25047+ sizeof(AssocAttribListVisual) * (nTabAssocAttribListVisual +
25048+ 1));
25049+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribListLength = 0;
25050+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList = NULL;
25051+ tabAssocAttribListVisual[nTabAssocAttribListVisual].visInfo = visInfo;
25052+ nTabAssocAttribListVisual++;
25053+ return visInfo;
25054+}
25055+
25056+typedef struct {
25057+ int x;
25058+ int y;
25059+ int width;
25060+ int height;
25061+ int xhot;
25062+ int yhot;
25063+ int *pixels;
25064+} ClientCursor;
25065+
25066+#if 0
25067+static ClientCursor client_cursor = { 0 };
25068+#endif
25069+
25070+static void do_glClientActiveTextureARB(int texture)
25071+{
25072+ GET_EXT_PTR_NO_FAIL(void, glClientActiveTextureARB, (int));
25073+
25074+ if (ptr_func_glClientActiveTextureARB) {
25075+ ptr_func_glClientActiveTextureARB(texture);
25076+ }
25077+}
25078+
25079+#ifdef CURSOR_TRICK
25080+static void do_glActiveTextureARB(int texture)
25081+{
25082+ GET_EXT_PTR_NO_FAIL(void, glActiveTextureARB, (int));
25083+
25084+ if (ptr_func_glActiveTextureARB) {
25085+ ptr_func_glActiveTextureARB(texture);
25086+ }
25087+}
25088+
25089+static void do_glUseProgramObjectARB(GLhandleARB programObj)
25090+{
25091+ GET_EXT_PTR_NO_FAIL(void, glUseProgramObjectARB, (GLhandleARB));
25092+
25093+ if (ptr_func_glUseProgramObjectARB) {
25094+ ptr_func_glUseProgramObjectARB(programObj);
25095+ }
25096+}
25097+#endif
25098+
25099+static void destroy_gl_state(GLState *state)
25100+{
25101+ int i;
25102+
25103+ if (state->vertexPointer)
25104+ free(state->vertexPointer);
25105+ if (state->normalPointer)
25106+ free(state->normalPointer);
25107+ if (state->indexPointer)
25108+ free(state->indexPointer);
25109+ if (state->colorPointer)
25110+ free(state->colorPointer);
25111+ if (state->secondaryColorPointer)
25112+ free(state->secondaryColorPointer);
25113+ for (i = 0; i < NB_MAX_TEXTURES; i++) {
25114+ if (state->texCoordPointer[i])
25115+ free(state->texCoordPointer[i]);
25116+ }
25117+ for (i = 0; i < MY_GL_MAX_VERTEX_ATTRIBS_ARB; i++) {
25118+ if (state->vertexAttribPointer[i])
25119+ free(state->vertexAttribPointer[i]);
25120+ }
25121+ for (i = 0; i < MY_GL_MAX_VERTEX_ATTRIBS_NV; i++) {
25122+ if (state->vertexAttribPointerNV[i])
25123+ free(state->vertexAttribPointerNV[i]);
25124+ }
25125+ if (state->weightPointer)
25126+ free(state->weightPointer);
25127+ if (state->matrixIndexPointer)
25128+ free(state->matrixIndexPointer);
25129+ if (state->fogCoordPointer)
25130+ free(state->fogCoordPointer);
25131+ for (i = 0; i < MY_GL_MAX_VARIANT_POINTER_EXT; i++) {
25132+ if (state->variantPointerEXT[i])
25133+ free(state->variantPointerEXT[i]);
25134+ }
25135+ if (state->interleavedArrays)
25136+ free(state->interleavedArrays);
25137+ if (state->elementPointerATI)
25138+ free(state->elementPointerATI);
25139+}
25140+
25141+static void init_gl_state(GLState *state)
25142+{
25143+ state->textureAllocator = &state->ownTextureAllocator;
25144+ state->tabTextures = state->ownTabTextures;
25145+ state->bufferAllocator = &state->ownBufferAllocator;
25146+ state->tabBuffers = state->ownTabBuffers;
25147+ state->listAllocator = &state->ownListAllocator;
25148+ state->tabLists = state->ownTabLists;
25149+}
25150+
25151+/*
25152+ * Translate the nth element of list from type to GLuint.
25153+ */
25154+static GLuint translate_id(GLsizei n, GLenum type, const GLvoid *list)
25155+{
25156+ GLbyte *bptr;
25157+ GLubyte *ubptr;
25158+ GLshort *sptr;
25159+ GLushort *usptr;
25160+ GLint *iptr;
25161+ GLuint *uiptr;
25162+ GLfloat *fptr;
25163+
25164+ switch (type) {
25165+ case GL_BYTE:
25166+ bptr = (GLbyte *) list;
25167+ return (GLuint) *(bptr + n);
25168+ case GL_UNSIGNED_BYTE:
25169+ ubptr = (GLubyte *) list;
25170+ return (GLuint) *(ubptr + n);
25171+ case GL_SHORT:
25172+ sptr = (GLshort *) list;
25173+ return (GLuint) *(sptr + n);
25174+ case GL_UNSIGNED_SHORT:
25175+ usptr = (GLushort *) list;
25176+ return (GLuint) *(usptr + n);
25177+ case GL_INT:
25178+ iptr = (GLint *) list;
25179+ return (GLuint) *(iptr + n);
25180+ case GL_UNSIGNED_INT:
25181+ uiptr = (GLuint *) list;
25182+ return (GLuint) *(uiptr + n);
25183+ case GL_FLOAT:
25184+ fptr = (GLfloat *) list;
25185+ return (GLuint) *(fptr + n);
25186+ case GL_2_BYTES:
25187+ ubptr = ((GLubyte *) list) + 2 * n;
25188+ return (GLuint) *ubptr * 256 + (GLuint) *(ubptr + 1);
25189+ case GL_3_BYTES:
25190+ ubptr = ((GLubyte *) list) + 3 * n;
25191+ return (GLuint) *ubptr * 65536 + (GLuint) *(ubptr + 1) * 256 +
25192+ (GLuint) *(ubptr + 2);
25193+ case GL_4_BYTES:
25194+ ubptr = ((GLubyte *) list) + 4 * n;
25195+ return (GLuint) *ubptr * 16777216 + (GLuint) *(ubptr + 1) * 65536 +
25196+ (GLuint) *(ubptr + 2) * 256 + (GLuint) *(ubptr + 3);
25197+ default:
25198+ return 0;
25199+ }
25200+}
25201+
25202+void _create_context(ProcessStruct *process, GLXContext ctxt, int fake_ctxt,
25203+ GLXContext shareList, int fake_shareList)
25204+{
25205+ process->glstates =
25206+ realloc(process->glstates,
25207+ (process->nb_states + 1) * sizeof(GLState *));
25208+ process->glstates[process->nb_states] = malloc(sizeof(GLState));
25209+ memset(process->glstates[process->nb_states], 0, sizeof(GLState));
25210+ process->glstates[process->nb_states]->ref = 1;
25211+ process->glstates[process->nb_states]->context = ctxt;
25212+ process->glstates[process->nb_states]->fake_ctxt = fake_ctxt;
25213+ process->glstates[process->nb_states]->fake_shareList = fake_shareList;
25214+ init_gl_state(process->glstates[process->nb_states]);
25215+ if (shareList && fake_shareList) {
25216+ int i;
25217+
25218+ for (i = 0; i < process->nb_states; i++) {
25219+ if (process->glstates[i]->fake_ctxt == fake_shareList) {
25220+ process->glstates[i]->ref++;
25221+ process->glstates[process->nb_states]->textureAllocator =
25222+ process->glstates[i]->textureAllocator;
25223+ process->glstates[process->nb_states]->tabTextures =
25224+ process->glstates[i]->tabTextures;
25225+ process->glstates[process->nb_states]->bufferAllocator =
25226+ process->glstates[i]->bufferAllocator;
25227+ process->glstates[process->nb_states]->tabBuffers =
25228+ process->glstates[i]->tabBuffers;
25229+ process->glstates[process->nb_states]->listAllocator =
25230+ process->glstates[i]->listAllocator;
25231+ process->glstates[process->nb_states]->tabLists =
25232+ process->glstates[i]->tabLists;
25233+ break;
25234+ }
25235+ }
25236+ }
25237+ process->nb_states++;
25238+}
25239+
25240+static ProcessStruct *process;
25241+
25242+void do_disconnect_current(void)
25243+{
25244+ int i;
25245+ Display *dpy = process->dpy;
25246+
25247+ glXMakeCurrent(dpy, 0, NULL);
25248+
25249+ for (i = 0; i < MAX_ASSOC_SIZE &&
25250+ process->association_fakecontext_glxcontext[i].key; i ++) {
25251+ GLXContext ctxt = process->association_fakecontext_glxcontext[i].value;
25252+
25253+ fprintf(stderr, "Destroy context corresponding to fake_context"
25254+ " = %ld\n", (long) process->
25255+ association_fakecontext_glxcontext[i].key);
25256+ glXDestroyContext(dpy, ctxt);
25257+ }
25258+
25259+ GET_EXT_PTR(void, glXDestroyPbuffer, (Display *, GLXPbuffer));
25260+
25261+ for (i = 0; i < MAX_ASSOC_SIZE &&
25262+ process->association_fakepbuffer_pbuffer[i].key; i ++) {
25263+ GLXPbuffer pbuffer = (GLXPbuffer)
25264+ process->association_fakepbuffer_pbuffer[i].value;
25265+
25266+ fprintf(stderr, "Destroy pbuffer corresponding to fake_pbuffer"
25267+ " = %ld\n", (long) process->
25268+ association_fakepbuffer_pbuffer[i].key);
25269+ if (!is_gl_vendor_ati(dpy))
25270+ ptr_func_glXDestroyPbuffer(dpy, pbuffer);
25271+ }
25272+
25273+ for (i = 0; i < MAX_ASSOC_SIZE && process->
25274+ association_clientdrawable_serverdrawable[i].key; i ++) {
25275+ Window win = (Window) process->
25276+ association_clientdrawable_serverdrawable[i].value;
25277+
25278+ fprintf(stderr, "Destroy window %x corresponding to client_drawable "
25279+ "= %p\n", (int) win, process->
25280+ association_clientdrawable_serverdrawable[i].key);
25281+
25282+ XDestroyWindow(dpy, win);
25283+ if (active_win == win)
25284+ active_win = 0;
25285+
25286+ int loop = 1; // 1;
25287+ while (loop) {
25288+ while (XPending(dpy) > 0) {
25289+ XEvent event;
25290+
25291+ XNextEvent(dpy, &event);
25292+ switch (event.type) {
25293+ case DestroyNotify:
25294+ {
25295+ if (((XDestroyWindowEvent *) &event)->window == win)
25296+ loop = 0;
25297+ break;
25298+ }
25299+ }
25300+ }
25301+ break; /* TODO */
25302+ }
25303+ }
25304+
25305+ for (i = 0; i < process->nb_states; i++) {
25306+ destroy_gl_state(process->glstates[i]);
25307+ free(process->glstates[i]);
25308+ }
25309+ destroy_gl_state(&process->default_state);
25310+ free(process->glstates);
25311+
25312+ if (process->cmdbuf)
25313+ qemu_free(process->cmdbuf);
25314+
25315+ for (i = 0; &processes[i] != process; i ++);
25316+ memmove(&processes[i], &processes[i + 1],
25317+ (MAX_HANDLED_PROCESS - 1 - i) * sizeof(ProcessStruct));
25318+}
25319+
25320+static const int beginend_allowed[GL_N_CALLS] = {
25321+#undef MAGIC_MACRO
25322+#define MAGIC_MACRO(name) [name ## _func] = 1,
25323+#include "gl_beginend.h"
25324+};
25325+
25326+void do_context_switch(Display *dpy, pid_t pid, int call)
25327+{
25328+ int i;
25329+
25330+ for (i = 0; i < MAX_HANDLED_PROCESS; i ++)
25331+ if (processes[i].process_id == pid) {
25332+ process = &processes[i];
25333+ break;
25334+ } else if (processes[i].process_id == 0) {
25335+ process = &processes[i];
25336+ memset(process, 0, sizeof(ProcessStruct));
25337+ process->process_id = pid;
25338+ init_gl_state(&process->default_state);
25339+ process->current_state = &process->default_state;
25340+ process->dpy = dpy;
25341+ break;
25342+ }
25343+ if (process == NULL) {
25344+ fprintf(stderr, "Too many processes !\n");
25345+ exit(-1);
25346+ }
25347+
25348+ switch (call) {
25349+ case _init32_func:
25350+ case _init64_func:
25351+ case _exit_process_func:
25352+ case glXMakeCurrent_func:
25353+ /* Do nothing */
25354+ break;
25355+
25356+ default:
25357+#if 0
25358+ glFlush();
25359+ glFinish();
25360+ glXSwapBuffers(dpy, drawable);
25361+ if (process->current_state == &process->default_state)
25362+ /* Where do commands like glViewport go when no drawable or
25363+ * context are current - i.e. after a call to
25364+ * glXMakeCurrent(dpy, 0, 0) ? */;
25365+ else
25366+#endif
25367+ glXMakeCurrent(dpy, process->current_state->drawable,
25368+ process->current_state->context);
25369+ }
25370+}
25371+
25372+int do_function_call(int func_number, arg_t *args, char *ret_string)
25373+{
25374+ char ret_char = 0;
25375+ int ret_int = 0;
25376+ const char *ret_str = NULL;
25377+ Display *dpy = process->dpy;
25378+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
25379+ int ret_type = signature->ret_type;
25380+
25381+ if (parent_dpy)
25382+ dpy = parent_dpy;
25383+
25384+ process->instr_counter++;
25385+ if (display_function_call)
25386+ fprintf(stderr, "[%d]> %s\n", process->instr_counter,
25387+ tab_opengl_calls_name[func_number]);
25388+
25389+#ifdef BUFFER_BEGINEND
25390+ if (process->began) {
25391+ /* Need to check for any errors now because later we won't have
25392+ * a chance to report them. */
25393+ if (beginend_allowed[func_number]) {
25394+ arg_t *buf = cmd_buffer_alloc(process, signature->nb_args + 1);
25395+
25396+ /* TODO: pointer arguments */
25397+ buf[0] = func_number;
25398+ memcpy(buf + 1, args, signature->nb_args * sizeof(arg_t));
25399+ } else if (likely(func_number == glEnd_func)) {
25400+ process->began = 0;
25401+
25402+ glBegin(process->primitive);
25403+ cmd_buffer_replay(process);
25404+ glEnd();
25405+ } else {
25406+ /* TODO: properly report */
25407+#ifdef SYSTEMATIC_ERROR_CHECK
25408+ process->current_state->last_error = INVALID_OPERATION;
25409+#endif
25410+ }
25411+
25412+ func_number = -1;
25413+ }
25414+#endif
25415+
25416+ switch (func_number) {
25417+ case -1:
25418+ break;
25419+
25420+ case _init_func:
25421+ *(int *) args[1] = 1;
25422+ break;
25423+
25424+ case _synchronize_func:
25425+ ret_int = 1;
25426+ break;
25427+
25428+ case _exit_process_func:
25429+ do_disconnect_current();
25430+ break;
25431+
25432+ case _changeWindowState_func:
25433+ {
25434+ ClientGLXDrawable client_drawable = to_drawable(args[0]);
25435+
25436+ if (display_function_call)
25437+ fprintf(stderr, "client_drawable=%p\n",
25438+ (void *) client_drawable);
25439+
25440+ GLXDrawable drawable =
25441+ get_association_clientdrawable_serverdrawable(
25442+ process, client_drawable);
25443+ if (drawable) {
25444+ if (args[1] == IsViewable) {
25445+ WindowPosStruct pos;
25446+
25447+ _get_window_pos(dpy, drawable, &pos);
25448+ if (pos.map_state != args[1]) {
25449+ XMapWindow(dpy, drawable);
25450+
25451+ int loop = 1; // 1;
25452+
25453+ while (loop) {
25454+ while (XPending(dpy) > 0) {
25455+ XEvent event;
25456+
25457+ XNextEvent(dpy, &event);
25458+ switch (event.type) {
25459+ case ConfigureNotify:
25460+ {
25461+ if (((XConfigureEvent *) &event)->
25462+ window == drawable) {
25463+ loop = 0;
25464+ }
25465+ break;
25466+ }
25467+ }
25468+ }
25469+ break; /* TODO */
25470+ }
25471+ }
25472+ }
25473+ }
25474+
25475+ break;
25476+ }
25477+
25478+ case _moveResizeWindow_func:
25479+ {
25480+ int *params = (int *) args[1];
25481+ ClientGLXDrawable client_drawable = to_drawable(args[0]);
25482+
25483+ if (display_function_call)
25484+ fprintf(stderr, "client_drawable=%p\n",
25485+ (void *) client_drawable);
25486+
25487+ GLXDrawable drawable =
25488+ get_association_clientdrawable_serverdrawable(
25489+ process, client_drawable);
25490+ if (drawable) {
25491+ WindowPosStruct pos;
25492+
25493+ _get_window_pos(dpy, drawable, &pos);
25494+ if (!
25495+ (params[0] == pos.x && params[1] == pos.y &&
25496+ params[2] == pos.width && params[3] == pos.height)) {
25497+ int redim = !(params[2] == pos.width &&
25498+ params[3] == pos.height);
25499+ active_win_x = params[0];
25500+ active_win_y = params[1];
25501+
25502+ fprintf(stderr, "old x=%d y=%d width=%d height=%d\n",
25503+ pos.x, pos.y, pos.width, pos.height);
25504+ fprintf(stderr, "new x=%d y=%d width=%d height=%d\n",
25505+ params[0], params[1], params[2], params[3]);
25506+ XMoveResizeWindow(dpy, drawable, params[0], params[1],
25507+ params[2], params[3]);
25508+ int loop = 0; // = 1
25509+
25510+ while (loop) {
25511+ while (XPending(dpy) > 0) {
25512+ XEvent event;
25513+
25514+ XNextEvent(dpy, &event);
25515+ switch (event.type) {
25516+ case ConfigureNotify:
25517+ {
25518+ if (((XConfigureEvent *) &event)->
25519+ window == drawable) {
25520+ loop = 0;
25521+ }
25522+ break;
25523+ }
25524+ }
25525+ }
25526+ }
25527+ /* The window should have resized by now, but force the
25528+ * new size anyway. */
25529+ _get_window_pos(dpy, drawable, &pos);
25530+ pos.width = params[2];
25531+ pos.height = params[3];
25532+ process->currentDrawablePos = pos;
25533+ // if (getenv("FORCE_GL_VIEWPORT"))
25534+ if (redim)
25535+ glViewport(0, 0, pos.width, pos.height);
25536+ }
25537+ }
25538+ break;
25539+ }
25540+
25541+ case _send_cursor_func:
25542+ {
25543+#if 0
25544+ int x = args[0];
25545+ int y = args[1];
25546+ int width = args[2];
25547+ int height = args[3];
25548+ int xhot = args[4];
25549+ int yhot = args[5];
25550+ int *pixels = (int *) args[6];
25551+
25552+ client_cursor.x = x;
25553+ client_cursor.y = y;
25554+ client_cursor.width = width;
25555+ client_cursor.height = height;
25556+ client_cursor.xhot = xhot;
25557+ client_cursor.yhot = yhot;
25558+ if (pixels) {
25559+ client_cursor.pixels =
25560+ realloc(client_cursor.pixels,
25561+ client_cursor.width * client_cursor.height *
25562+ sizeof(int));
25563+ memcpy(client_cursor.pixels, pixels,
25564+ client_cursor.width * client_cursor.height *
25565+ sizeof(int));
25566+ }
25567+ int in_window = (x >= 0 && y >= 0 &&
25568+ x < process->currentDrawablePos.width &&
25569+ y < process->currentDrawablePos.height);
25570+ // fprintf(stderr, "cursor at %d %d (%s)\n", x, y, (in_window) ?
25571+ // "in window" : "not in window");
25572+#endif
25573+ break;
25574+ }
25575+
25576+#ifdef BUFFER_BEGINEND
25577+ case glBegin_func:
25578+ process->began = 1;
25579+ process->primitive = args[0];
25580+ break;
25581+#endif
25582+
25583+ case glXWaitGL_func:
25584+ {
25585+ glXWaitGL();
25586+ ret_int = 0;
25587+ break;
25588+ }
25589+
25590+ case glXWaitX_func:
25591+ {
25592+ glXWaitX();
25593+ ret_int = 0;
25594+ break;
25595+ }
25596+
25597+ case glXChooseVisual_func:
25598+ {
25599+ ret_int = glXChooseVisualFunc(dpy, (int *) args[2]);
25600+ break;
25601+ }
25602+
25603+ case glXQueryExtensionsString_func:
25604+ {
25605+ ret_str = glXQueryExtensionsString(dpy, 0);
25606+ break;
25607+ }
25608+
25609+ case glXQueryServerString_func:
25610+ {
25611+ ret_str = glXQueryServerString(dpy, 0, args[2]);
25612+ break;
25613+ }
25614+
25615+ case glXGetClientString_func:
25616+ {
25617+ ret_str = glXGetClientString(dpy, args[1]);
25618+ break;
25619+ }
25620+
25621+ case glXGetScreenDriver_func:
25622+ {
25623+ GET_EXT_PTR(const char *, glXGetScreenDriver, (Display *, int));
25624+
25625+ ret_str = ptr_func_glXGetScreenDriver(dpy, 0);
25626+ break;
25627+ }
25628+
25629+ case glXGetDriverConfig_func:
25630+ {
25631+ GET_EXT_PTR(const char *, glXGetDriverConfig, (const char *));
25632+
25633+ ret_str = ptr_func_glXGetDriverConfig((const char *) args[0]);
25634+ break;
25635+ }
25636+
25637+ case glXCreateContext_func:
25638+ {
25639+ int visualid = (int) args[1];
25640+ int fake_shareList = (int) args[2];
25641+
25642+ if (1 || display_function_call)
25643+ fprintf(stderr, "visualid=%d, fake_shareList=%d\n", visualid,
25644+ fake_shareList);
25645+
25646+ GLXContext shareList = get_association_fakecontext_glxcontext(
25647+ process, fake_shareList);
25648+ XVisualInfo *vis = get_visual_info_from_visual_id(dpy, visualid);
25649+ GLXContext ctxt;
25650+
25651+ if (vis) {
25652+ ctxt = glXCreateContext(dpy, vis, shareList, args[3]);
25653+ } else {
25654+ vis = get_default_visual(dpy);
25655+ int saved_visualid = vis->visualid;
25656+
25657+ vis->visualid = visualid ?: saved_visualid;
25658+ ctxt = glXCreateContext(dpy, vis, shareList, args[3]);
25659+ vis->visualid = saved_visualid;
25660+ }
25661+
25662+ if (ctxt) {
25663+ int fake_ctxt =++ process->next_available_context_number;
25664+
25665+ set_association_fakecontext_visual(process, fake_ctxt, vis);
25666+ set_association_fakecontext_glxcontext(process,
25667+ fake_ctxt, ctxt);
25668+ ret_int = fake_ctxt;
25669+
25670+ _create_context(process, ctxt, fake_ctxt, shareList,
25671+ fake_shareList);
25672+ } else {
25673+ ret_int = 0;
25674+ }
25675+
25676+ break;
25677+ }
25678+
25679+
25680+ case glXCreateNewContext_func:
25681+ {
25682+ GET_EXT_PTR(GLXContext, glXCreateNewContext,
25683+ (Display *, GLXFBConfig, int, GLXContext, int));
25684+ int client_fbconfig = args[1];
25685+
25686+ ret_int = 0;
25687+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
25688+
25689+ if (fbconfig) {
25690+ int fake_shareList = args[3];
25691+ GLXContext shareList = get_association_fakecontext_glxcontext(
25692+ process, fake_shareList);
25693+ process->next_available_context_number++;
25694+ int fake_ctxt = process->next_available_context_number;
25695+ GLXContext ctxt = ptr_func_glXCreateNewContext(
25696+ dpy, fbconfig, args[2], shareList, args[4]);
25697+ set_association_fakecontext_glxcontext(
25698+ process, fake_ctxt, ctxt);
25699+ ret_int = fake_ctxt;
25700+
25701+ _create_context(process, ctxt, fake_ctxt, shareList,
25702+ fake_shareList);
25703+ }
25704+ break;
25705+ }
25706+
25707+ case glXCopyContext_func:
25708+ {
25709+ int fake_src_ctxt = (int) args[1];
25710+ int fake_dst_ctxt = (int) args[2];
25711+ GLXContext src_ctxt;
25712+ GLXContext dst_ctxt;
25713+
25714+ if (display_function_call)
25715+ fprintf(stderr, "fake_src_ctxt=%i, fake_dst_ctxt=%i\n",
25716+ fake_src_ctxt, fake_dst_ctxt);
25717+
25718+ if (!(src_ctxt = get_association_fakecontext_glxcontext(
25719+ process, fake_src_ctxt)))
25720+ fprintf(stderr, "invalid fake_src_ctxt (%i) !\n",
25721+ fake_src_ctxt);
25722+ else
25723+ if (!(dst_ctxt = get_association_fakecontext_glxcontext(
25724+ process, fake_dst_ctxt))) {
25725+ fprintf(stderr, "invalid fake_dst_ctxt (%i) !\n",
25726+ fake_dst_ctxt);
25727+ } else
25728+ glXCopyContext(dpy, src_ctxt, dst_ctxt, args[3]);
25729+
25730+ break;
25731+ }
25732+
25733+ case glXDestroyContext_func:
25734+ {
25735+ int fake_ctxt = (int) args[1];
25736+
25737+ if (display_function_call)
25738+ fprintf(stderr, "fake_ctxt=%d\n", fake_ctxt);
25739+
25740+ GLXContext ctxt = get_association_fakecontext_glxcontext(
25741+ process, fake_ctxt);
25742+ if (ctxt == NULL) {
25743+ fprintf(stderr, "invalid fake_ctxt (%p) !\n",
25744+ (void *) (long) fake_ctxt);
25745+ } else {
25746+ int i;
25747+
25748+ for (i = 0; i < process->nb_states; i ++) {
25749+ if (process->glstates[i]->fake_ctxt == fake_ctxt) {
25750+ if (ctxt == process->current_state->context)
25751+ process->current_state = &process->default_state;
25752+
25753+ int fake_shareList =
25754+ process->glstates[i]->fake_shareList;
25755+ process->glstates[i]->ref--;
25756+ if (process->glstates[i]->ref == 0) {
25757+ fprintf(stderr,
25758+ "destroy_gl_state fake_ctxt = %d\n",
25759+ process->glstates[i]->fake_ctxt);
25760+ destroy_gl_state(process->glstates[i]);
25761+ free(process->glstates[i]);
25762+ memmove(&process->glstates[i],
25763+ &process->glstates[i + 1],
25764+ (process->nb_states - i - 1) *
25765+ sizeof(GLState *));
25766+ process->nb_states --;
25767+ }
25768+
25769+ if (fake_shareList) {
25770+ for (i = 0; i < process->nb_states; i++) {
25771+ if (process->glstates[i]->fake_ctxt ==
25772+ fake_shareList) {
25773+ process->glstates[i]->ref--;
25774+ if (process->glstates[i]->ref == 0) {
25775+ fprintf(stderr,
25776+ "destroy_gl_state fake_ctxt = %d\n",
25777+ process->glstates[i]->
25778+ fake_ctxt);
25779+ destroy_gl_state(process->
25780+ glstates[i]);
25781+ free(process->glstates[i]);
25782+ memmove(&process->glstates[i],
25783+ &process->glstates[i + 1],
25784+ (process->nb_states - i - 1) *
25785+ sizeof(GLState *));
25786+ process->nb_states --;
25787+ }
25788+ break;
25789+ }
25790+ }
25791+ }
25792+
25793+ glXDestroyContext(dpy, ctxt);
25794+ unset_association_fakecontext_glxcontext(
25795+ process, fake_ctxt);
25796+
25797+ break;
25798+ }
25799+ }
25800+ }
25801+ break;
25802+ }
25803+
25804+ case glXQueryVersion_func:
25805+ {
25806+ ret_int = glXQueryVersion(dpy, (int *) args[1], (int *) args[2]);
25807+ break;
25808+ }
25809+
25810+ case glGetString_func:
25811+ {
25812+ ret_str = (char *) glGetString(args[0]);
25813+ break;
25814+ }
25815+
25816+ case glXMakeCurrent_func:
25817+ {
25818+ int i;
25819+ ClientGLXDrawable client_drawable = to_drawable(args[1]);
25820+ GLXDrawable drawable = 0;
25821+ int fake_ctxt = (int) args[2];
25822+
25823+ if (display_function_call)
25824+ fprintf(stderr, "client_drawable=%p fake_ctx=%d\n",
25825+ (void *) client_drawable, fake_ctxt);
25826+
25827+ if (client_drawable == 0 && fake_ctxt == 0) {
25828+ ret_int = glXMakeCurrent(dpy, 0, NULL);
25829+ process->current_state = &process->default_state;
25830+ } else if ((drawable = (GLXDrawable)
25831+ get_association_fakepbuffer_pbuffer(
25832+ process, client_drawable))) {
25833+ GLXContext ctxt = get_association_fakecontext_glxcontext(
25834+ process, fake_ctxt);
25835+ if (ctxt == NULL) {
25836+ fprintf(stderr, "invalid fake_ctxt (%d) (*)!\n",
25837+ fake_ctxt);
25838+ ret_int = 0;
25839+ } else
25840+ ret_int = glXMakeCurrent(dpy, drawable, ctxt);
25841+ } else {
25842+ GLXContext ctxt = get_association_fakecontext_glxcontext(
25843+ process, fake_ctxt);
25844+ if (ctxt == NULL) {
25845+ fprintf(stderr, "invalid fake_ctxt (%d)!\n", fake_ctxt);
25846+ ret_int = 0;
25847+ } else {
25848+ drawable = get_association_clientdrawable_serverdrawable(
25849+ process, client_drawable);
25850+ if (drawable == 0) {
25851+ XVisualInfo *vis = get_association_fakecontext_visual(
25852+ process, fake_ctxt);
25853+ if (vis == NULL)
25854+ vis = get_default_visual(dpy);
25855+ /* if (local_connection) drawable = client_drawable;
25856+ * else */
25857+ {
25858+ if ((int) (long) client_drawable ==
25859+ RootWindow(dpy, 0) &&
25860+ local_connection) {
25861+ drawable = (GLXDrawable) client_drawable;
25862+ } else {
25863+ drawable = create_window(
25864+ dpy, local_connection ?
25865+ (Window) client_drawable :
25866+ 0, vis, "", 0, 0, 16, 16);
25867+ }
25868+ }
25869+ set_association_clientdrawable_serverdrawable(process,
25870+ client_drawable, drawable);
25871+ }
25872+
25873+ ret_int = glXMakeCurrent(dpy, drawable, ctxt);
25874+ }
25875+ }
25876+
25877+ if (ret_int) {
25878+ for (i = 0; i < process->nb_states; i ++) {
25879+ if (process->glstates[i]->fake_ctxt == fake_ctxt) {
25880+ /* HACK !!! REMOVE */
25881+ process->current_state = process->glstates[i];
25882+ process->current_state->drawable = drawable;
25883+ break;
25884+ }
25885+ }
25886+
25887+ if (i == process->nb_states) {
25888+ fprintf(stderr, "error remembering the new context\n");
25889+ exit(-1);
25890+ }
25891+ }
25892+ break;
25893+ }
25894+
25895+ case glXSwapBuffers_func:
25896+ {
25897+ ClientGLXDrawable client_drawable = to_drawable(args[1]);
25898+
25899+ if (display_function_call)
25900+ fprintf(stderr, "client_drawable=%p\n", client_drawable);
25901+
25902+ GLXDrawable drawable =
25903+ get_association_clientdrawable_serverdrawable(
25904+ process, client_drawable);
25905+ if (!drawable) {
25906+ fprintf(stderr, "unknown client_drawable (%p) !\n",
25907+ (void *) client_drawable);
25908+ } else {
25909+#ifdef CURSOR_TRICK
25910+ if (client_cursor.pixels && local_connection == 0) {
25911+ glPushAttrib(GL_ALL_ATTRIB_BITS);
25912+ glPushClientAttrib(GL_ALL_ATTRIB_BITS);
25913+
25914+ glMatrixMode(GL_PROJECTION);
25915+ glPushMatrix();
25916+ glLoadIdentity();
25917+ glOrtho(0, process->currentDrawablePos.width,
25918+ process->currentDrawablePos.height, 0, -1, 1);
25919+ glMatrixMode(GL_MODELVIEW);
25920+ glPushMatrix();
25921+ glLoadIdentity();
25922+ glPixelZoom(1, -1);
25923+
25924+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
25925+ glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
25926+ glPixelStorei(GL_UNPACK_SWAP_BYTES, 0);
25927+ glPixelStorei(GL_UNPACK_LSB_FIRST, 0);
25928+ glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
25929+ glShadeModel(GL_SMOOTH);
25930+
25931+ glEnable(GL_BLEND);
25932+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
25933+ glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
25934+
25935+ int i, numUnits;
25936+
25937+ glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &numUnits);
25938+ for (i = 0; i < numUnits; i++) {
25939+ do_glActiveTextureARB(GL_TEXTURE0_ARB + i);
25940+ glDisable(GL_TEXTURE_1D);
25941+ glDisable(GL_TEXTURE_2D);
25942+ glDisable(GL_TEXTURE_3D);
25943+ }
25944+ glDisable(GL_ALPHA_TEST);
25945+ glDisable(GL_DEPTH_TEST);
25946+ glDisable(GL_STENCIL_TEST);
25947+ glDisable(GL_SCISSOR_TEST);
25948+ glDisable(GL_FRAGMENT_PROGRAM_ARB);
25949+ glDisable(GL_VERTEX_PROGRAM_ARB);
25950+ do_glUseProgramObjectARB(0);
25951+
25952+ // memset(client_cursor.pixels, 255, client_cursor.width
25953+ // * client_cursor.height * sizeof(int));
25954+
25955+ glRasterPos2d(client_cursor.x - client_cursor.xhot,
25956+ client_cursor.y - client_cursor.yhot);
25957+ glDrawPixels(client_cursor.width, client_cursor.height,
25958+ GL_BGRA, GL_UNSIGNED_BYTE,
25959+ client_cursor.pixels);
25960+
25961+ glMatrixMode(GL_MODELVIEW);
25962+ glPopMatrix();
25963+
25964+ glMatrixMode(GL_PROJECTION);
25965+ glPopMatrix();
25966+
25967+ glPopClientAttrib();
25968+ glPopAttrib();
25969+ }
25970+#endif
25971+
25972+ ////////// HORRIBLE HORRIBLE HACK
25973+ if (drawable != active_win && active_win) {
25974+ glXMakeCurrent(dpy, active_win,
25975+ processes[0].current_state->context);
25976+ glXSwapBuffers(dpy, active_win);
25977+ glXMakeCurrent(dpy, process->current_state->drawable,
25978+ process->current_state->context);
25979+ }
25980+ glXSwapBuffers(dpy, drawable);
25981+ }
25982+ break;
25983+ }
25984+
25985+ case glXIsDirect_func:
25986+ {
25987+ int fake_ctxt = (int) args[1];
25988+
25989+ if (display_function_call)
25990+ fprintf(stderr, "fake_ctx=%x\n", fake_ctxt);
25991+ GLXContext ctxt =
25992+ get_association_fakecontext_glxcontext(process, fake_ctxt);
25993+ if (ctxt == NULL) {
25994+ fprintf(stderr, "invalid fake_ctxt (%x) !\n", fake_ctxt);
25995+ ret_char = False;
25996+ } else {
25997+ ret_char = glXIsDirect(dpy, ctxt);
25998+ }
25999+ break;
26000+ }
26001+
26002+ case glXGetConfig_func:
26003+ {
26004+ int visualid = args[1];
26005+ XVisualInfo *vis = NULL;
26006+
26007+ if (visualid)
26008+ vis = get_visual_info_from_visual_id(dpy, visualid);
26009+ if (vis == NULL)
26010+ vis = get_default_visual(dpy);
26011+ ret_int = glXGetConfig(dpy, vis, args[2], (int *) args[3]);
26012+ break;
26013+ }
26014+
26015+ case glXGetConfig_extended_func:
26016+ {
26017+ int visualid = args[1];
26018+ int n = args[2];
26019+ int i;
26020+ XVisualInfo *vis = NULL;
26021+ int *attribs = (int *) args[3];
26022+ int *values = (int *) args[4];
26023+ int *res = (int *) args[5];
26024+
26025+ if (visualid)
26026+ vis = get_visual_info_from_visual_id(dpy, visualid);
26027+ if (vis == NULL)
26028+ vis = get_default_visual(dpy);
26029+
26030+ for (i = 0; i < n; i++) {
26031+ res[i] = glXGetConfig(dpy, vis, attribs[i], &values[i]);
26032+ }
26033+ break;
26034+ }
26035+
26036+ case glXUseXFont_func:
26037+ {
26038+ /* implementation is client-side only :-) */
26039+ break;
26040+ }
26041+
26042+ case glXQueryExtension_func:
26043+ {
26044+ ret_int =
26045+ glXQueryExtension(dpy, (int *) args[1], (int *) args[2]);
26046+ break;
26047+ }
26048+
26049+ case glXChooseFBConfig_func:
26050+ {
26051+ GET_EXT_PTR(GLXFBConfig *, glXChooseFBConfig,
26052+ (Display *, int, int *, int *));
26053+ if (process->nfbconfig == MAX_FBCONFIG) {
26054+ *(int *) args[3] = 0;
26055+ ret_int = 0;
26056+ } else {
26057+ GLXFBConfig *fbconfigs =
26058+ ptr_func_glXChooseFBConfig(dpy, args[1], (int *) args[2],
26059+ (int *) args[3]);
26060+ if (fbconfigs) {
26061+ process->fbconfigs[process->nfbconfig] = fbconfigs;
26062+ process->fbconfigs_max[process->nfbconfig] =
26063+ *(int *) args[3];
26064+ process->nfbconfig++;
26065+ ret_int = 1 + process->nfbconfig_total;
26066+ process->nfbconfig_total +=
26067+ process->fbconfigs_max[process->nfbconfig];
26068+ } else {
26069+ ret_int = 0;
26070+ }
26071+ }
26072+ break;
26073+ }
26074+
26075+ case glXChooseFBConfigSGIX_func:
26076+ {
26077+ GET_EXT_PTR(GLXFBConfigSGIX *, glXChooseFBConfigSGIX,
26078+ (Display *, int, int *, int *));
26079+ if (process->nfbconfig == MAX_FBCONFIG) {
26080+ *(int *) args[3] = 0;
26081+ ret_int = 0;
26082+ } else {
26083+ GLXFBConfigSGIX *fbconfigs =
26084+ ptr_func_glXChooseFBConfigSGIX(dpy, args[1],
26085+ (int *) args[2],
26086+ (int *) args[3]);
26087+ if (fbconfigs) {
26088+ process->fbconfigs[process->nfbconfig] = fbconfigs;
26089+ process->fbconfigs_max[process->nfbconfig] =
26090+ *(int *) args[3];
26091+ process->nfbconfig++;
26092+ ret_int = 1 + process->nfbconfig_total;
26093+ process->nfbconfig_total +=
26094+ process->fbconfigs_max[process->nfbconfig];
26095+ } else {
26096+ ret_int = 0;
26097+ }
26098+ }
26099+ break;
26100+ }
26101+
26102+ case glXGetFBConfigs_func:
26103+ {
26104+ GET_EXT_PTR(GLXFBConfig *, glXGetFBConfigs,
26105+ (Display *, int, int *));
26106+ if (process->nfbconfig == MAX_FBCONFIG) {
26107+ *(int *) args[2] = 0;
26108+ ret_int = 0;
26109+ } else {
26110+ GLXFBConfig *fbconfigs =
26111+ ptr_func_glXGetFBConfigs(dpy, args[1], (int *) args[2]);
26112+ if (fbconfigs) {
26113+ process->fbconfigs[process->nfbconfig] = fbconfigs;
26114+ process->fbconfigs_max[process->nfbconfig] =
26115+ *(int *) args[2];
26116+ process->nfbconfig++;
26117+ ret_int = 1 + process->nfbconfig_total;
26118+ process->nfbconfig_total +=
26119+ process->fbconfigs_max[process->nfbconfig];
26120+ } else {
26121+ ret_int = 0;
26122+ }
26123+ }
26124+ break;
26125+ }
26126+
26127+ case glXCreatePbuffer_func:
26128+ {
26129+ GET_EXT_PTR(GLXPbuffer, glXCreatePbuffer,
26130+ (Display *, GLXFBConfig, int *));
26131+ int client_fbconfig = args[1];
26132+
26133+ ret_int = 0;
26134+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26135+
26136+ if (fbconfig) {
26137+ GLXPbuffer pbuffer =
26138+ ptr_func_glXCreatePbuffer(dpy, fbconfig, (int *) args[2]);
26139+ fprintf(stderr, "glXCreatePbuffer --> %x\n", (int) pbuffer);
26140+ if (pbuffer) {
26141+ ClientGLXDrawable fake_pbuffer = to_drawable(
26142+ ++ process->next_available_pbuffer_number);
26143+
26144+ set_association_fakepbuffer_pbuffer(
26145+ process, fake_pbuffer, pbuffer);
26146+ fprintf(stderr,
26147+ "set_association_fakepbuffer_pbuffer(%p, %x)\n",
26148+ fake_pbuffer, (int) (long) pbuffer);
26149+ ret_int = (int) (long) fake_pbuffer;
26150+ }
26151+ }
26152+ break;
26153+ }
26154+
26155+ case glXCreateGLXPbufferSGIX_func:
26156+ {
26157+ GET_EXT_PTR(GLXPbufferSGIX, glXCreateGLXPbufferSGIX,
26158+ (Display *, GLXFBConfig, int, int, int *));
26159+ int client_fbconfig = args[1];
26160+
26161+ ret_int = 0;
26162+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26163+
26164+ if (fbconfig) {
26165+ GLXPbufferSGIX pbuffer = ptr_func_glXCreateGLXPbufferSGIX(
26166+ dpy, fbconfig,
26167+ args[2], args[3], (int *) args[4]);
26168+ if (pbuffer) {
26169+ ClientGLXDrawable fake_pbuffer = to_drawable(
26170+ ++ process->next_available_pbuffer_number);
26171+
26172+ set_association_fakepbuffer_pbuffer(
26173+ process, fake_pbuffer, pbuffer);
26174+ ret_int = (int) (long) fake_pbuffer;
26175+ }
26176+ }
26177+ break;
26178+ }
26179+
26180+ case glXDestroyPbuffer_func:
26181+ {
26182+ GET_EXT_PTR(void, glXDestroyPbuffer, (Display *, GLXPbuffer));
26183+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26184+
26185+ if (display_function_call)
26186+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26187+
26188+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26189+ process, fake_pbuffer);
26190+ if (pbuffer == 0) {
26191+ fprintf(stderr, "invalid fake_pbuffer (%p) !\n",
26192+ fake_pbuffer);
26193+ } else {
26194+ if (!is_gl_vendor_ati(dpy))
26195+ ptr_func_glXDestroyPbuffer(dpy, pbuffer);
26196+ unset_association_fakepbuffer_pbuffer(process, fake_pbuffer);
26197+ }
26198+ break;
26199+ }
26200+
26201+ case glXDestroyGLXPbufferSGIX_func:
26202+ {
26203+ GET_EXT_PTR(void, glXDestroyGLXPbufferSGIX,
26204+ (Display *, GLXPbuffer));
26205+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26206+
26207+ if (display_function_call)
26208+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26209+
26210+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26211+ process, fake_pbuffer);
26212+ if (pbuffer == 0) {
26213+ fprintf(stderr, "invalid fake_pbuffer (%p) !\n",
26214+ fake_pbuffer);
26215+ } else {
26216+ if (!is_gl_vendor_ati(dpy))
26217+ ptr_func_glXDestroyGLXPbufferSGIX(dpy, pbuffer);
26218+ unset_association_fakepbuffer_pbuffer(process, fake_pbuffer);
26219+ }
26220+ break;
26221+ }
26222+
26223+ case glXBindTexImageATI_func:
26224+ {
26225+ GET_EXT_PTR(void, glXBindTexImageATI,
26226+ (Display *, GLXPbuffer, int));
26227+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26228+
26229+ if (display_function_call)
26230+ fprintf(stderr, "fake_pbuffer=%p\n",
26231+ fake_pbuffer);
26232+
26233+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26234+ process, fake_pbuffer);
26235+ if (pbuffer == 0) {
26236+ fprintf(stderr,
26237+ "glXBindTexImageATI : invalid fake_pbuffer (%p) !\n",
26238+ fake_pbuffer);
26239+ } else {
26240+ ptr_func_glXBindTexImageATI(dpy, pbuffer, args[2]);
26241+ }
26242+ break;
26243+ }
26244+
26245+ case glXReleaseTexImageATI_func:
26246+ {
26247+ GET_EXT_PTR(void, glXReleaseTexImageATI,
26248+ (Display *, GLXPbuffer, int));
26249+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26250+
26251+ if (display_function_call)
26252+ fprintf(stderr, "fake_pbuffer=%d\n",
26253+ (int) (long) fake_pbuffer);
26254+
26255+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26256+ process, fake_pbuffer);
26257+ if (pbuffer == 0) {
26258+ fprintf(stderr,
26259+ "glXReleaseTexImageATI : invalid fake_pbuffer (%d) !\n",
26260+ (int) (long) fake_pbuffer);
26261+ } else {
26262+ ptr_func_glXReleaseTexImageATI(dpy, pbuffer, args[2]);
26263+ }
26264+ break;
26265+ }
26266+
26267+ case glXBindTexImageARB_func:
26268+ {
26269+ GET_EXT_PTR(Bool, glXBindTexImageARB,
26270+ (Display *, GLXPbuffer, int));
26271+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26272+
26273+ if (display_function_call)
26274+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26275+
26276+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26277+ process, fake_pbuffer);
26278+ if (pbuffer == 0) {
26279+ fprintf(stderr,
26280+ "glXBindTexImageARB : invalid fake_pbuffer (%p) !\n",
26281+ fake_pbuffer);
26282+ ret_int = 0;
26283+ } else {
26284+ ret_int = ptr_func_glXBindTexImageARB(dpy, pbuffer, args[2]);
26285+ }
26286+ break;
26287+ }
26288+
26289+ case glXReleaseTexImageARB_func:
26290+ {
26291+ GET_EXT_PTR(Bool, glXReleaseTexImageARB,
26292+ (Display *, GLXPbuffer, int));
26293+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26294+
26295+ if (display_function_call)
26296+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26297+
26298+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26299+ process, fake_pbuffer);
26300+ if (pbuffer == 0) {
26301+ fprintf(stderr,
26302+ "glXReleaseTexImageARB : invalid fake_pbuffer (%p) !\n",
26303+ fake_pbuffer);
26304+ ret_int = 0;
26305+ } else {
26306+ ret_int =
26307+ ptr_func_glXReleaseTexImageARB(dpy, pbuffer, args[2]);
26308+ }
26309+ break;
26310+ }
26311+
26312+ case glXGetFBConfigAttrib_func:
26313+ {
26314+ GET_EXT_PTR(int, glXGetFBConfigAttrib,
26315+ (Display *, GLXFBConfig, int, int *));
26316+ int client_fbconfig = args[1];
26317+
26318+ ret_int = 0;
26319+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26320+
26321+ if (fbconfig)
26322+ ret_int =
26323+ ptr_func_glXGetFBConfigAttrib(dpy, fbconfig, args[2],
26324+ (int *) args[3]);
26325+ break;
26326+ }
26327+
26328+ case glXGetFBConfigAttrib_extended_func:
26329+ {
26330+ GET_EXT_PTR(int, glXGetFBConfigAttrib,
26331+ (Display *, GLXFBConfig, int, int *));
26332+ int client_fbconfig = args[1];
26333+ int n = args[2];
26334+ int i;
26335+ int *attribs = (int *) args[3];
26336+ int *values = (int *) args[4];
26337+ int *res = (int *) args[5];
26338+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26339+
26340+ for (i = 0; i < n; i++) {
26341+ if (fbconfig) {
26342+ res[i] =
26343+ ptr_func_glXGetFBConfigAttrib(dpy, fbconfig,
26344+ attribs[i], &values[i]);
26345+ } else {
26346+ res[i] = 0;
26347+ }
26348+ }
26349+ break;
26350+ }
26351+
26352+ case glXGetFBConfigAttribSGIX_func:
26353+ {
26354+ GET_EXT_PTR(int, glXGetFBConfigAttribSGIX,
26355+ (Display *, GLXFBConfigSGIX, int, int *));
26356+ int client_fbconfig = args[1];
26357+
26358+ ret_int = 0;
26359+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26360+
26361+ if (fbconfig)
26362+ ret_int =
26363+ ptr_func_glXGetFBConfigAttribSGIX(dpy,
26364+ (GLXFBConfigSGIX)
26365+ fbconfig, args[2],
26366+ (int *) args[3]);
26367+ break;
26368+ }
26369+
26370+ case glXQueryContext_func:
26371+ {
26372+ GET_EXT_PTR(int, glXQueryContext,
26373+ (Display *, GLXContext, int, int *));
26374+ int fake_ctxt = (int) args[1];
26375+
26376+ if (display_function_call)
26377+ fprintf(stderr, "fake_ctx=%i\n", fake_ctxt);
26378+ GLXContext ctxt =
26379+ get_association_fakecontext_glxcontext(process, fake_ctxt);
26380+ if (ctxt == NULL) {
26381+ fprintf(stderr, "invalid fake_ctxt (%i) !\n", fake_ctxt);
26382+ ret_int = 0;
26383+ } else {
26384+ ret_int =
26385+ ptr_func_glXQueryContext(dpy, ctxt, args[2],
26386+ (int *) args[3]);
26387+ }
26388+ break;
26389+ }
26390+
26391+ case glXQueryDrawable_func:
26392+ {
26393+ GET_EXT_PTR(void, glXQueryDrawable,
26394+ (Display *, GLXDrawable, int, int *));
26395+ ClientGLXDrawable client_drawable = to_drawable(args[1]);
26396+ GLXDrawable drawable =
26397+ get_association_clientdrawable_serverdrawable(
26398+ process, client_drawable);
26399+
26400+ if (display_function_call)
26401+ fprintf(stderr, "client_drawable=%p\n",
26402+ client_drawable);
26403+
26404+ if (!drawable)
26405+ fprintf(stderr, "invalid client_drawable (%p) !\n",
26406+ client_drawable);
26407+ else
26408+ ptr_func_glXQueryDrawable(dpy, drawable,
26409+ args[2], (int *) args[3]);
26410+
26411+ break;
26412+ }
26413+
26414+ case glXQueryGLXPbufferSGIX_func:
26415+ {
26416+ GET_EXT_PTR(int, glXQueryGLXPbufferSGIX,
26417+ (Display *, GLXFBConfigSGIX, int, int *));
26418+ int client_fbconfig = args[1];
26419+
26420+ ret_int = 0;
26421+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26422+
26423+ if (fbconfig)
26424+ ret_int = ptr_func_glXQueryGLXPbufferSGIX(dpy,
26425+ (GLXFBConfigSGIX) fbconfig,
26426+ args[2], (int *) args[3]);
26427+ break;
26428+ }
26429+
26430+ case glXCreateContextWithConfigSGIX_func:
26431+ {
26432+ GET_EXT_PTR(GLXContext, glXCreateContextWithConfigSGIX,
26433+ (Display *, GLXFBConfigSGIX, int, GLXContext, int));
26434+ int client_fbconfig = args[1];
26435+
26436+ ret_int = 0;
26437+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26438+
26439+ if (fbconfig) {
26440+ GLXContext shareList = get_association_fakecontext_glxcontext(
26441+ process, (int) args[3]);
26442+ process->next_available_context_number++;
26443+ int fake_ctxt = process->next_available_context_number;
26444+ GLXContext ctxt = ptr_func_glXCreateContextWithConfigSGIX(
26445+ dpy, (GLXFBConfigSGIX) fbconfig, args[2],
26446+ shareList, args[4]);
26447+ set_association_fakecontext_glxcontext(
26448+ process, fake_ctxt, ctxt);
26449+ ret_int = fake_ctxt;
26450+ }
26451+ break;
26452+ }
26453+
26454+ case glXGetVisualFromFBConfig_func:
26455+ {
26456+ GET_EXT_PTR(XVisualInfo *, glXGetVisualFromFBConfig,
26457+ (Display *, GLXFBConfig));
26458+ int client_fbconfig = args[1];
26459+
26460+ ret_int = 0;
26461+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26462+
26463+ if (fbconfig) {
26464+ XVisualInfo *vis =
26465+ ptr_func_glXGetVisualFromFBConfig(dpy, fbconfig);
26466+ ret_int = (vis) ? vis->visualid : 0;
26467+ if (vis) {
26468+ tabAssocAttribListVisual =
26469+ realloc(tabAssocAttribListVisual,
26470+ sizeof(AssocAttribListVisual) *
26471+ (nTabAssocAttribListVisual + 1));
26472+ tabAssocAttribListVisual[nTabAssocAttribListVisual].
26473+ attribListLength = 0;
26474+ tabAssocAttribListVisual[nTabAssocAttribListVisual].
26475+ attribList = NULL;
26476+ tabAssocAttribListVisual[nTabAssocAttribListVisual].
26477+ visInfo = vis;
26478+ nTabAssocAttribListVisual++;
26479+ }
26480+ if (display_function_call)
26481+ fprintf(stderr, "visualid = %d\n", ret_int);
26482+ }
26483+ break;
26484+ }
26485+
26486+ case glXSwapIntervalSGI_func:
26487+ {
26488+ GET_EXT_PTR(int, glXSwapIntervalSGI, (int));
26489+
26490+ ret_int = ptr_func_glXSwapIntervalSGI(args[0]);
26491+ break;
26492+ }
26493+
26494+ case glXGetProcAddress_fake_func:
26495+ {
26496+ if (display_function_call)
26497+ fprintf(stderr, "%s\n", (char *) args[0]);
26498+ ret_int = glXGetProcAddressARB((const GLubyte *) args[0]) != NULL;
26499+ break;
26500+ }
26501+
26502+ case glXGetProcAddress_global_fake_func:
26503+ {
26504+ int nbElts = args[0];
26505+ char *huge_buffer = (char *) args[1];
26506+ char *result = (char *) args[2];
26507+ int i;
26508+
26509+ for (i = 0; i < nbElts; i++) {
26510+ int len = strlen(huge_buffer);
26511+
26512+ result[i] =
26513+ glXGetProcAddressARB((const GLubyte *) huge_buffer) !=
26514+ NULL;
26515+ huge_buffer += len + 1;
26516+ }
26517+ break;
26518+ }
26519+
26520+/* Begin of texture stuff */
26521+ case glBindTexture_func:
26522+ case glBindTextureEXT_func:
26523+ {
26524+ int target = args[0];
26525+ unsigned int client_texture = args[1];
26526+ unsigned int server_texture;
26527+
26528+ if (client_texture == 0) {
26529+ glBindTexture(target, 0);
26530+ } else {
26531+ alloc_value(process->current_state->textureAllocator,
26532+ client_texture);
26533+ server_texture =
26534+ process->current_state->tabTextures[client_texture];
26535+ if (server_texture == 0) {
26536+ glGenTextures(1, &server_texture);
26537+ process->current_state->tabTextures[client_texture] =
26538+ server_texture;
26539+ }
26540+ glBindTexture(target, server_texture);
26541+ }
26542+ break;
26543+ }
26544+
26545+ case glGenTextures_fake_func:
26546+ {
26547+ GET_EXT_PTR(void, glGenTextures, (GLsizei n, GLuint *textures));
26548+ int i;
26549+ int n = args[0];
26550+ unsigned int *clientTabTextures = malloc(n * sizeof(int));
26551+ unsigned int *serverTabTextures = malloc(n * sizeof(int));
26552+
26553+ alloc_range(process->current_state->textureAllocator, n,
26554+ clientTabTextures);
26555+
26556+ ptr_func_glGenTextures(n, serverTabTextures);
26557+ for (i = 0; i < n; i++) {
26558+ process->current_state->tabTextures[clientTabTextures[i]] =
26559+ serverTabTextures[i];
26560+ }
26561+
26562+ free(clientTabTextures);
26563+ free(serverTabTextures);
26564+ break;
26565+ }
26566+
26567+
26568+ case glDeleteTextures_func:
26569+ {
26570+ GET_EXT_PTR(void, glDeleteTextures,
26571+ (GLsizei n, const GLuint *textures));
26572+ int i;
26573+ int n = args[0];
26574+ unsigned int *clientTabTextures = (unsigned int *) args[1];
26575+
26576+ delete_range(process->current_state->textureAllocator, n,
26577+ clientTabTextures);
26578+
26579+ unsigned int *serverTabTextures = malloc(n * sizeof(int));
26580+
26581+ for (i = 0; i < n; i++) {
26582+ serverTabTextures[i] =
26583+ get_server_texture(process, clientTabTextures[i]);
26584+ }
26585+ ptr_func_glDeleteTextures(n, serverTabTextures);
26586+ for (i = 0; i < n; i++) {
26587+ process->current_state->tabTextures[clientTabTextures[i]] = 0;
26588+ }
26589+ free(serverTabTextures);
26590+ break;
26591+ }
26592+
26593+ case glPrioritizeTextures_func:
26594+ {
26595+ GET_EXT_PTR(void, glPrioritizeTextures,
26596+ (GLsizei n, const GLuint *textures,
26597+ const GLclampf *priorities));
26598+
26599+ int i;
26600+ int n = args[0];
26601+ unsigned int *textures = (unsigned int *) args[1];
26602+
26603+ for (i = 0; i < n; i++) {
26604+ textures[i] = get_server_texture(process, textures[i]);
26605+ }
26606+ ptr_func_glPrioritizeTextures(n, textures,
26607+ (const GLclampf *) args[2]);
26608+ break;
26609+ }
26610+
26611+ case glAreTexturesResident_func:
26612+ {
26613+ GET_EXT_PTR(void, glAreTexturesResident,
26614+ (GLsizei n, const GLuint *textures,
26615+ GLboolean *residences));
26616+ int i;
26617+ int n = args[0];
26618+ unsigned int *textures = (unsigned int *) args[1];
26619+
26620+ for (i = 0; i < n; i++) {
26621+ textures[i] = get_server_texture(process, textures[i]);
26622+ }
26623+ ptr_func_glAreTexturesResident(n, textures,
26624+ (GLboolean *) args[2]);
26625+ break;
26626+ }
26627+
26628+ case glIsTexture_func:
26629+ case glIsTextureEXT_func:
26630+ {
26631+ GET_EXT_PTR(GLboolean, glIsTexture, (GLuint texture));
26632+ unsigned int client_texture = args[0];
26633+ unsigned int server_texture =
26634+ get_server_texture(process, client_texture);
26635+ if (server_texture)
26636+ ret_char = ptr_func_glIsTexture(server_texture);
26637+ else
26638+ ret_char = 0;
26639+ break;
26640+ }
26641+
26642+ case glFramebufferTexture1DEXT_func:
26643+ {
26644+ GET_EXT_PTR(void, glFramebufferTexture1DEXT,
26645+ (int, int, int, int, int));
26646+ unsigned int client_texture = args[3];
26647+ unsigned int server_texture =
26648+ get_server_texture(process, client_texture);
26649+ if (server_texture)
26650+ ptr_func_glFramebufferTexture1DEXT(args[0], args[1], args[2],
26651+ server_texture, args[4]);
26652+ break;
26653+ }
26654+
26655+ case glFramebufferTexture2DEXT_func:
26656+ {
26657+ GET_EXT_PTR(void, glFramebufferTexture2DEXT,
26658+ (int, int, int, int, int));
26659+ unsigned int client_texture = args[3];
26660+ unsigned int server_texture =
26661+ get_server_texture(process, client_texture);
26662+ if (server_texture)
26663+ ptr_func_glFramebufferTexture2DEXT(args[0], args[1], args[2],
26664+ server_texture, args[4]);
26665+ break;
26666+ }
26667+
26668+ case glFramebufferTexture3DEXT_func:
26669+ {
26670+ GET_EXT_PTR(void, glFramebufferTexture3DEXT,
26671+ (int, int, int, int, int, int));
26672+ unsigned int client_texture = args[3];
26673+ unsigned int server_texture =
26674+ get_server_texture(process, client_texture);
26675+ if (server_texture)
26676+ ptr_func_glFramebufferTexture3DEXT(args[0], args[1], args[2],
26677+ server_texture, args[4],
26678+ args[5]);
26679+ break;
26680+ }
26681+/* End of texture stuff */
26682+
26683+/* Begin of list stuff */
26684+ case glIsList_func:
26685+ {
26686+ unsigned int client_list = args[0];
26687+ unsigned int server_list = get_server_list(process, client_list);
26688+
26689+ if (server_list)
26690+ ret_char = glIsList(server_list);
26691+ else
26692+ ret_char = 0;
26693+ break;
26694+ }
26695+
26696+ case glDeleteLists_func:
26697+ {
26698+ int i;
26699+ unsigned int first_client = args[0];
26700+ int n = args[1];
26701+
26702+ unsigned int first_server =
26703+ get_server_list(process, first_client);
26704+ for (i = 0; i < n; i++) {
26705+ if (get_server_list(process, first_client + i) !=
26706+ first_server + i)
26707+ break;
26708+ }
26709+ if (i == n) {
26710+ glDeleteLists(first_server, n);
26711+ } else {
26712+ for (i = 0; i < n; i++) {
26713+ glDeleteLists(get_server_list(process, first_client + i),
26714+ 1);
26715+ }
26716+ }
26717+
26718+ for (i = 0; i < n; i++) {
26719+ process->current_state->tabLists[first_client + i] = 0;
26720+ }
26721+ delete_consecutive_values(process->current_state->listAllocator,
26722+ first_client, n);
26723+ break;
26724+ }
26725+
26726+ case glGenLists_fake_func:
26727+ {
26728+ int i;
26729+ int n = args[0];
26730+ unsigned int server_first = glGenLists(n);
26731+
26732+ if (server_first) {
26733+ unsigned int client_first =
26734+ alloc_range(process->current_state->listAllocator, n,
26735+ NULL);
26736+ for (i = 0; i < n; i++) {
26737+ process->current_state->tabLists[client_first + i] =
26738+ server_first + i;
26739+ }
26740+ }
26741+ break;
26742+ }
26743+
26744+ case glNewList_func:
26745+ {
26746+ unsigned int client_list = args[0];
26747+ int mode = args[1];
26748+
26749+ alloc_value(process->current_state->listAllocator, client_list);
26750+ unsigned int server_list = get_server_list(process, client_list);
26751+
26752+ if (server_list == 0) {
26753+ server_list = glGenLists(1);
26754+ process->current_state->tabLists[client_list] = server_list;
26755+ }
26756+ glNewList(server_list, mode);
26757+ break;
26758+ }
26759+
26760+ case glCallList_func:
26761+ {
26762+ unsigned int client_list = args[0];
26763+ unsigned int server_list = get_server_list(process, client_list);
26764+
26765+ glCallList(server_list);
26766+ break;
26767+ }
26768+
26769+ case glCallLists_func:
26770+ {
26771+ int i;
26772+ int n = args[0];
26773+ int type = args[1];
26774+ const GLvoid *lists = (const GLvoid *) args[2];
26775+ int *new_lists = malloc(sizeof(int) * n);
26776+
26777+ for (i = 0; i < n; i++) {
26778+ new_lists[i] =
26779+ get_server_list(process, translate_id(i, type, lists));
26780+ }
26781+ glCallLists(n, GL_UNSIGNED_INT, new_lists);
26782+ free(new_lists);
26783+ break;
26784+ }
26785+
26786+
26787+/* End of list stuff */
26788+
26789+/* Begin of buffer stuff */
26790+ case glBindBufferARB_func:
26791+ {
26792+ GET_EXT_PTR(void, glBindBufferARB, (int, int));
26793+ int target = args[0];
26794+ unsigned int client_buffer = args[1];
26795+ unsigned int server_buffer;
26796+
26797+ if (client_buffer == 0) {
26798+ ptr_func_glBindBufferARB(target, 0);
26799+ } else {
26800+ server_buffer = get_server_buffer(process, client_buffer);
26801+ ptr_func_glBindBufferARB(target, server_buffer);
26802+ }
26803+ break;
26804+ }
26805+
26806+ case glGenBuffersARB_fake_func:
26807+ {
26808+ GET_EXT_PTR(void, glGenBuffersARB, (int, unsigned int *));
26809+ int i;
26810+ int n = args[0];
26811+ unsigned int *clientTabBuffers = malloc(n * sizeof(int));
26812+ unsigned int *serverTabBuffers = malloc(n * sizeof(int));
26813+
26814+ alloc_range(process->current_state->bufferAllocator, n,
26815+ clientTabBuffers);
26816+
26817+ ptr_func_glGenBuffersARB(n, serverTabBuffers);
26818+ for (i = 0; i < n; i++) {
26819+ process->current_state->tabBuffers[clientTabBuffers[i]] =
26820+ serverTabBuffers[i];
26821+ }
26822+
26823+ free(clientTabBuffers);
26824+ free(serverTabBuffers);
26825+ break;
26826+ }
26827+
26828+
26829+ case glDeleteBuffersARB_func:
26830+ {
26831+ GET_EXT_PTR(void, glDeleteBuffersARB, (int, int *));
26832+ int i;
26833+ int n = args[0];
26834+ unsigned int *clientTabBuffers = (unsigned int *) args[1];
26835+
26836+ delete_range(process->current_state->bufferAllocator, n,
26837+ clientTabBuffers);
26838+
26839+ int *serverTabBuffers = malloc(n * sizeof(int));
26840+
26841+ for (i = 0; i < n; i++) {
26842+ serverTabBuffers[i] =
26843+ get_server_buffer(process, clientTabBuffers[i]);
26844+ }
26845+ ptr_func_glDeleteBuffersARB(n, serverTabBuffers);
26846+ for (i = 0; i < n; i++) {
26847+ process->current_state->tabBuffers[clientTabBuffers[i]] = 0;
26848+ }
26849+ free(serverTabBuffers);
26850+ break;
26851+ }
26852+
26853+ case glIsBufferARB_func:
26854+ {
26855+ GET_EXT_PTR(int, glIsBufferARB, (int));
26856+ unsigned int client_buffer = args[0];
26857+ unsigned int server_buffer =
26858+ get_server_buffer(process, client_buffer);
26859+ if (server_buffer)
26860+ ret_int = ptr_func_glIsBufferARB(server_buffer);
26861+ else
26862+ ret_int = 0;
26863+ break;
26864+ }
26865+
26866+/* End of buffer stuff */
26867+
26868+ case glShaderSourceARB_fake_func:
26869+ {
26870+ GET_EXT_PTR(void, glShaderSourceARB, (int, int, char **, void *));
26871+ int size = args[1];
26872+ int i;
26873+ int acc_length = 0;
26874+ GLcharARB **tab_prog = malloc(size * sizeof(GLcharARB *));
26875+ int *tab_length = (int *) args[3];
26876+
26877+ for (i = 0; i < size; i++) {
26878+ tab_prog[i] = ((GLcharARB *) args[2]) + acc_length;
26879+ acc_length += tab_length[i];
26880+ }
26881+ ptr_func_glShaderSourceARB(args[0], args[1], tab_prog,
26882+ tab_length);
26883+ free(tab_prog);
26884+ break;
26885+ }
26886+
26887+ case glShaderSource_fake_func:
26888+ {
26889+ GET_EXT_PTR(void, glShaderSource, (int, int, char **, void *));
26890+ int size = args[1];
26891+ int i;
26892+ int acc_length = 0;
26893+ GLcharARB **tab_prog = malloc(size * sizeof(GLcharARB *));
26894+ int *tab_length = (int *) args[3];
26895+
26896+ for (i = 0; i < size; i++) {
26897+ tab_prog[i] = ((GLcharARB *) args[2]) + acc_length;
26898+ acc_length += tab_length[i];
26899+ }
26900+ ptr_func_glShaderSource(args[0], args[1], tab_prog, tab_length);
26901+ free(tab_prog);
26902+ break;
26903+ }
26904+
26905+ case glVertexPointer_fake_func:
26906+ {
26907+ int offset = args[0];
26908+ int size = args[1];
26909+ int type = args[2];
26910+ int stride = args[3];
26911+ int bytes_size = args[4];
26912+
26913+ process->current_state->vertexPointerSize =
26914+ MAX(process->current_state->vertexPointerSize,
26915+ offset + bytes_size);
26916+ process->current_state->vertexPointer =
26917+ realloc(process->current_state->vertexPointer,
26918+ process->current_state->vertexPointerSize);
26919+ memcpy(process->current_state->vertexPointer + offset,
26920+ (void *) args[5], bytes_size);
26921+ /* fprintf(stderr, "glVertexPointer_fake_func size=%d, type=%d,
26922+ * stride=%d, byte_size=%d\n", size, type, stride, bytes_size); */
26923+ glVertexPointer(size, type, stride,
26924+ process->current_state->vertexPointer);
26925+ break;
26926+ }
26927+
26928+ case glNormalPointer_fake_func:
26929+ {
26930+ int offset = args[0];
26931+ int type = args[1];
26932+ int stride = args[2];
26933+ int bytes_size = args[3];
26934+
26935+ process->current_state->normalPointerSize =
26936+ MAX(process->current_state->normalPointerSize,
26937+ offset + bytes_size);
26938+ process->current_state->normalPointer =
26939+ realloc(process->current_state->normalPointer,
26940+ process->current_state->normalPointerSize);
26941+ memcpy(process->current_state->normalPointer + offset,
26942+ (void *) args[4], bytes_size);
26943+ // fprintf(stderr, "glNormalPointer_fake_func type=%d, stride=%d,
26944+ // byte_size=%d\n", type, stride, bytes_size);
26945+ glNormalPointer(type, stride,
26946+ process->current_state->normalPointer);
26947+ break;
26948+ }
26949+
26950+ case glIndexPointer_fake_func:
26951+ {
26952+ int offset = args[0];
26953+ int type = args[1];
26954+ int stride = args[2];
26955+ int bytes_size = args[3];
26956+
26957+ process->current_state->indexPointerSize =
26958+ MAX(process->current_state->indexPointerSize,
26959+ offset + bytes_size);
26960+ process->current_state->indexPointer =
26961+ realloc(process->current_state->indexPointer,
26962+ process->current_state->indexPointerSize);
26963+ memcpy(process->current_state->indexPointer + offset,
26964+ (void *) args[4], bytes_size);
26965+ // fprintf(stderr, "glIndexPointer_fake_func type=%d, stride=%d,
26966+ // byte_size=%d\n", type, stride, bytes_size);
26967+ glIndexPointer(type, stride,
26968+ process->current_state->indexPointer);
26969+ break;
26970+ }
26971+
26972+ case glEdgeFlagPointer_fake_func:
26973+ {
26974+ int offset = args[0];
26975+ int stride = args[1];
26976+ int bytes_size = args[2];
26977+
26978+ process->current_state->edgeFlagPointerSize =
26979+ MAX(process->current_state->edgeFlagPointerSize,
26980+ offset + bytes_size);
26981+ process->current_state->edgeFlagPointer =
26982+ realloc(process->current_state->edgeFlagPointer,
26983+ process->current_state->edgeFlagPointerSize);
26984+ memcpy(process->current_state->edgeFlagPointer + offset,
26985+ (void *) args[3], bytes_size);
26986+ // fprintf(stderr, "glEdgeFlagPointer_fake_func stride = %d,
26987+ // bytes_size=%d\n", stride, bytes_size);
26988+ glEdgeFlagPointer(stride,
26989+ process->current_state->edgeFlagPointer);
26990+ break;
26991+ }
26992+
26993+ case glVertexAttribPointerARB_fake_func:
26994+ {
26995+ GET_EXT_PTR(void, glVertexAttribPointerARB,
26996+ (int, int, int, int, int, void *));
26997+ int offset = args[0];
26998+ int index = args[1];
26999+ int size = args[2];
27000+ int type = args[3];
27001+ int normalized = args[4];
27002+ int stride = args[5];
27003+ int bytes_size = args[6];
27004+
27005+ process->current_state->vertexAttribPointerSize[index] =
27006+ MAX(process->current_state->vertexAttribPointerSize[index],
27007+ offset + bytes_size);
27008+ process->current_state->vertexAttribPointer[index] =
27009+ realloc(process->current_state->vertexAttribPointer[index],
27010+ process->current_state->
27011+ vertexAttribPointerSize[index]);
27012+ memcpy(process->current_state->vertexAttribPointer[index] +
27013+ offset, (void *) args[7], bytes_size);
27014+ ptr_func_glVertexAttribPointerARB(index, size, type, normalized,
27015+ stride,
27016+ process->current_state->
27017+ vertexAttribPointer[index]);
27018+ break;
27019+ }
27020+
27021+ case glVertexAttribPointerNV_fake_func:
27022+ {
27023+ GET_EXT_PTR(void, glVertexAttribPointerNV,
27024+ (int, int, int, int, void *));
27025+ int offset = args[0];
27026+ int index = args[1];
27027+ int size = args[2];
27028+ int type = args[3];
27029+ int stride = args[4];
27030+ int bytes_size = args[5];
27031+
27032+ process->current_state->vertexAttribPointerNVSize[index] =
27033+ MAX(process->current_state->vertexAttribPointerNVSize[index],
27034+ offset + bytes_size);
27035+ process->current_state->vertexAttribPointerNV[index] =
27036+ realloc(process->current_state->vertexAttribPointerNV[index],
27037+ process->current_state->
27038+ vertexAttribPointerNVSize[index]);
27039+ memcpy(process->current_state->vertexAttribPointerNV[index] +
27040+ offset, (void *) args[6], bytes_size);
27041+ ptr_func_glVertexAttribPointerNV(index, size, type, stride,
27042+ process->current_state->
27043+ vertexAttribPointerNV[index]);
27044+ break;
27045+ }
27046+
27047+ case glColorPointer_fake_func:
27048+ {
27049+ int offset = args[0];
27050+ int size = args[1];
27051+ int type = args[2];
27052+ int stride = args[3];
27053+ int bytes_size = args[4];
27054+
27055+ process->current_state->colorPointerSize =
27056+ MAX(process->current_state->colorPointerSize,
27057+ offset + bytes_size);
27058+ process->current_state->colorPointer =
27059+ realloc(process->current_state->colorPointer,
27060+ process->current_state->colorPointerSize);
27061+ memcpy(process->current_state->colorPointer + offset,
27062+ (void *) args[5], bytes_size);
27063+ // fprintf(stderr, "glColorPointer_fake_func bytes_size = %d\n",
27064+ // bytes_size);
27065+ glColorPointer(size, type, stride,
27066+ process->current_state->colorPointer);
27067+
27068+ break;
27069+ }
27070+
27071+ case glSecondaryColorPointer_fake_func:
27072+ {
27073+ GET_EXT_PTR(void, glSecondaryColorPointer,
27074+ (int, int, int, void *));
27075+ int offset = args[0];
27076+ int size = args[1];
27077+ int type = args[2];
27078+ int stride = args[3];
27079+ int bytes_size = args[4];
27080+
27081+ process->current_state->secondaryColorPointerSize =
27082+ MAX(process->current_state->secondaryColorPointerSize,
27083+ offset + bytes_size);
27084+ process->current_state->secondaryColorPointer =
27085+ realloc(process->current_state->secondaryColorPointer,
27086+ process->current_state->secondaryColorPointerSize);
27087+ memcpy(process->current_state->secondaryColorPointer + offset,
27088+ (void *) args[5], bytes_size);
27089+ // fprintf(stderr, "glSecondaryColorPointer_fake_func bytes_size
27090+ // = %d\n", bytes_size);
27091+ ptr_func_glSecondaryColorPointer(size, type, stride,
27092+ process->current_state->
27093+ secondaryColorPointer);
27094+
27095+ break;
27096+ }
27097+
27098+ case glPushClientAttrib_func:
27099+ {
27100+ int mask = args[0];
27101+
27102+ if (process->current_state->clientStateSp <
27103+ MAX_CLIENT_STATE_STACK_SIZE) {
27104+ process->current_state->clientStateStack[process->
27105+ current_state->
27106+ clientStateSp].mask =
27107+ mask;
27108+ if (mask & GL_CLIENT_VERTEX_ARRAY_BIT) {
27109+ process->current_state->clientStateStack[process->
27110+ current_state->
27111+ clientStateSp].
27112+ activeTextureIndex =
27113+ process->current_state->activeTextureIndex;
27114+ }
27115+ process->current_state->clientStateSp++;
27116+ }
27117+ glPushClientAttrib(mask);
27118+ break;
27119+ }
27120+
27121+ case glPopClientAttrib_func:
27122+ {
27123+ if (process->current_state->clientStateSp > 0) {
27124+ process->current_state->clientStateSp--;
27125+ if (process->current_state->
27126+ clientStateStack[process->current_state->clientStateSp].
27127+ mask & GL_CLIENT_VERTEX_ARRAY_BIT) {
27128+ process->current_state->activeTextureIndex =
27129+ process->current_state->clientStateStack[process->
27130+ current_state->
27131+ clientStateSp].
27132+ activeTextureIndex;
27133+ }
27134+ }
27135+ glPopClientAttrib();
27136+ break;
27137+ }
27138+
27139+ case glClientActiveTexture_func:
27140+ case glClientActiveTextureARB_func:
27141+ {
27142+ int activeTexture = args[0];
27143+
27144+ process->current_state->activeTextureIndex =
27145+ activeTexture - GL_TEXTURE0_ARB;
27146+ do_glClientActiveTextureARB(activeTexture);
27147+ break;
27148+ }
27149+
27150+ case glTexCoordPointer_fake_func:
27151+ {
27152+ int offset = args[0];
27153+ int index = args[1];
27154+ int size = args[2];
27155+ int type = args[3];
27156+ int stride = args[4];
27157+ int bytes_size = args[5];
27158+
27159+ process->current_state->texCoordPointerSize[index] =
27160+ MAX(process->current_state->texCoordPointerSize[index],
27161+ offset + bytes_size);
27162+ process->current_state->texCoordPointer[index] =
27163+ realloc(process->current_state->texCoordPointer[index],
27164+ process->current_state->texCoordPointerSize[index]);
27165+ memcpy(process->current_state->texCoordPointer[index] + offset,
27166+ (void *) args[6], bytes_size);
27167+ /* fprintf(stderr, "glTexCoordPointer_fake_func size=%d, type=%d,
27168+ * stride=%d, byte_size=%d\n", size, type, stride, bytes_size); */
27169+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + index);
27170+ glTexCoordPointer(size, type, stride,
27171+ process->current_state->texCoordPointer[index]);
27172+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27173+ process->current_state->
27174+ activeTextureIndex);
27175+ break;
27176+ }
27177+
27178+ case glWeightPointerARB_fake_func:
27179+ {
27180+ GET_EXT_PTR(void, glWeightPointerARB, (int, int, int, void *));
27181+ int offset = args[0];
27182+ int size = args[1];
27183+ int type = args[2];
27184+ int stride = args[3];
27185+ int bytes_size = args[4];
27186+
27187+ process->current_state->weightPointerSize =
27188+ MAX(process->current_state->weightPointerSize,
27189+ offset + bytes_size);
27190+ process->current_state->weightPointer =
27191+ realloc(process->current_state->weightPointer,
27192+ process->current_state->weightPointerSize);
27193+ memcpy(process->current_state->weightPointer + offset,
27194+ (void *) args[5], bytes_size);
27195+ /* fprintf(stderr, "glWeightPointerARB_fake_func size=%d,
27196+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27197+ * bytes_size); */
27198+ ptr_func_glWeightPointerARB(size, type, stride,
27199+ process->current_state->
27200+ weightPointer);
27201+ break;
27202+ }
27203+
27204+ case glMatrixIndexPointerARB_fake_func:
27205+ {
27206+ GET_EXT_PTR(void, glMatrixIndexPointerARB,
27207+ (int, int, int, void *));
27208+ int offset = args[0];
27209+ int size = args[1];
27210+ int type = args[2];
27211+ int stride = args[3];
27212+ int bytes_size = args[4];
27213+
27214+ process->current_state->matrixIndexPointerSize =
27215+ MAX(process->current_state->matrixIndexPointerSize,
27216+ offset + bytes_size);
27217+ process->current_state->matrixIndexPointer =
27218+ realloc(process->current_state->matrixIndexPointer,
27219+ process->current_state->matrixIndexPointerSize);
27220+ memcpy(process->current_state->matrixIndexPointer + offset,
27221+ (void *) args[5], bytes_size);
27222+ /* fprintf(stderr, "glMatrixIndexPointerARB_fake_func size=%d,
27223+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27224+ * bytes_size); */
27225+ ptr_func_glMatrixIndexPointerARB(size, type, stride,
27226+ process->current_state->
27227+ matrixIndexPointer);
27228+ break;
27229+ }
27230+
27231+ case glFogCoordPointer_fake_func:
27232+ {
27233+ GET_EXT_PTR(void, glFogCoordPointer, (int, int, void *));
27234+ int offset = args[0];
27235+ int type = args[1];
27236+ int stride = args[2];
27237+ int bytes_size = args[3];
27238+
27239+ process->current_state->fogCoordPointerSize =
27240+ MAX(process->current_state->fogCoordPointerSize,
27241+ offset + bytes_size);
27242+ process->current_state->fogCoordPointer =
27243+ realloc(process->current_state->fogCoordPointer,
27244+ process->current_state->fogCoordPointerSize);
27245+ memcpy(process->current_state->fogCoordPointer + offset,
27246+ (void *) args[4], bytes_size);
27247+ // fprintf(stderr, "glFogCoordPointer_fake_func type=%d,
27248+ // stride=%d, byte_size=%d\n", type, stride, bytes_size);
27249+ ptr_func_glFogCoordPointer(type, stride,
27250+ process->current_state->
27251+ fogCoordPointer);
27252+ break;
27253+ }
27254+
27255+ case glVariantPointerEXT_fake_func:
27256+ {
27257+ GET_EXT_PTR(void, glVariantPointerEXT, (int, int, int, void *));
27258+ int offset = args[0];
27259+ int id = args[1];
27260+ int type = args[2];
27261+ int stride = args[3];
27262+ int bytes_size = args[4];
27263+
27264+ process->current_state->variantPointerEXTSize[id] =
27265+ MAX(process->current_state->variantPointerEXTSize[id],
27266+ offset + bytes_size);
27267+ process->current_state->variantPointerEXT[id] =
27268+ realloc(process->current_state->variantPointerEXT[id],
27269+ process->current_state->variantPointerEXTSize[id]);
27270+ memcpy(process->current_state->variantPointerEXT[id] + offset,
27271+ (void *) args[5], bytes_size);
27272+ // fprintf(stderr, "glVariantPointerEXT_fake_func[%d] type=%d,
27273+ // stride=%d, byte_size=%d\n", id, type, stride, bytes_size);
27274+ ptr_func_glVariantPointerEXT(id, type, stride,
27275+ process->current_state->
27276+ variantPointerEXT[id]);
27277+ break;
27278+ }
27279+
27280+ case glInterleavedArrays_fake_func:
27281+ {
27282+ GET_EXT_PTR(void, glInterleavedArrays, (int, int, void *));
27283+ int offset = args[0];
27284+ int format = args[1];
27285+ int stride = args[2];
27286+ int bytes_size = args[3];
27287+
27288+ process->current_state->interleavedArraysSize =
27289+ MAX(process->current_state->interleavedArraysSize,
27290+ offset + bytes_size);
27291+ process->current_state->interleavedArrays =
27292+ realloc(process->current_state->interleavedArrays,
27293+ process->current_state->interleavedArraysSize);
27294+ memcpy(process->current_state->interleavedArrays + offset,
27295+ (void *) args[4], bytes_size);
27296+ // fprintf(stderr, "glInterleavedArrays_fake_func format=%d,
27297+ // stride=%d, byte_size=%d\n", format, stride, bytes_size);
27298+ ptr_func_glInterleavedArrays(format, stride,
27299+ process->current_state->
27300+ interleavedArrays);
27301+ break;
27302+ }
27303+
27304+ case glElementPointerATI_fake_func:
27305+ {
27306+ GET_EXT_PTR(void, glElementPointerATI, (int, void *));
27307+ int type = args[0];
27308+ int bytes_size = args[1];
27309+
27310+ process->current_state->elementPointerATISize = bytes_size;
27311+ process->current_state->elementPointerATI =
27312+ realloc(process->current_state->elementPointerATI,
27313+ process->current_state->elementPointerATISize);
27314+ memcpy(process->current_state->elementPointerATI,
27315+ (void *) args[2], bytes_size);
27316+ // fprintf(stderr, "glElementPointerATI_fake_func type=%d,
27317+ // byte_size=%d\n", type, bytes_size);
27318+ ptr_func_glElementPointerATI(type,
27319+ process->current_state->
27320+ elementPointerATI);
27321+ break;
27322+ }
27323+
27324+ case glTexCoordPointer01_fake_func:
27325+ {
27326+ int size = args[0];
27327+ int type = args[1];
27328+ int stride = args[2];
27329+ int bytes_size = args[3];
27330+
27331+ process->current_state->texCoordPointerSize[0] = bytes_size;
27332+ process->current_state->texCoordPointer[0] =
27333+ realloc(process->current_state->texCoordPointer[0],
27334+ bytes_size);
27335+ memcpy(process->current_state->texCoordPointer[0],
27336+ (void *) args[4], bytes_size);
27337+ /* fprintf(stderr, "glTexCoordPointer01_fake_func size=%d,
27338+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27339+ * bytes_size); */
27340+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27341+ glTexCoordPointer(size, type, stride,
27342+ process->current_state->texCoordPointer[0]);
27343+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
27344+ glTexCoordPointer(size, type, stride,
27345+ process->current_state->texCoordPointer[0]);
27346+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27347+ process->current_state->
27348+ activeTextureIndex);
27349+ break;
27350+ }
27351+
27352+ case glTexCoordPointer012_fake_func:
27353+ {
27354+ int size = args[0];
27355+ int type = args[1];
27356+ int stride = args[2];
27357+ int bytes_size = args[3];
27358+
27359+ process->current_state->texCoordPointerSize[0] = bytes_size;
27360+ process->current_state->texCoordPointer[0] =
27361+ realloc(process->current_state->texCoordPointer[0],
27362+ bytes_size);
27363+ memcpy(process->current_state->texCoordPointer[0],
27364+ (void *) args[4], bytes_size);
27365+ /* fprintf(stderr, "glTexCoordPointer012_fake_func size=%d,
27366+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27367+ * bytes_size); */
27368+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27369+ glTexCoordPointer(size, type, stride,
27370+ process->current_state->texCoordPointer[0]);
27371+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
27372+ glTexCoordPointer(size, type, stride,
27373+ process->current_state->texCoordPointer[0]);
27374+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
27375+ glTexCoordPointer(size, type, stride,
27376+ process->current_state->texCoordPointer[0]);
27377+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27378+ process->current_state->
27379+ activeTextureIndex);
27380+ break;
27381+ }
27382+
27383+ case glVertexAndNormalPointer_fake_func:
27384+ {
27385+ int vertexPointerSize = args[0];
27386+ int vertexPointerType = args[1];
27387+ int vertexPointerStride = args[2];
27388+ int normalPointerType = args[3];
27389+ int normalPointerStride = args[4];
27390+ int bytes_size = args[5];
27391+ void *ptr = (void *) args[6];
27392+
27393+ process->current_state->vertexPointerSize = bytes_size;
27394+ process->current_state->vertexPointer =
27395+ realloc(process->current_state->vertexPointer, bytes_size);
27396+ memcpy(process->current_state->vertexPointer, ptr, bytes_size);
27397+ glVertexPointer(vertexPointerSize, vertexPointerType,
27398+ vertexPointerStride,
27399+ process->current_state->vertexPointer);
27400+ glNormalPointer(normalPointerType, normalPointerStride,
27401+ process->current_state->vertexPointer);
27402+ break;
27403+ }
27404+
27405+ case glVertexNormalPointerInterlaced_fake_func:
27406+ {
27407+ int i = 0;
27408+ int offset = args[i++];
27409+ int vertexPointerSize = args[i++];
27410+ int vertexPointerType = args[i++];
27411+ int stride = args[i++];
27412+ int normalPointerOffset = args[i++];
27413+ int normalPointerType = args[i++];
27414+ int bytes_size = args[i++];
27415+ void *ptr = (void *) args[i++];
27416+
27417+ process->current_state->vertexPointerSize =
27418+ MAX(process->current_state->vertexPointerSize,
27419+ offset + bytes_size);
27420+ process->current_state->vertexPointer =
27421+ realloc(process->current_state->vertexPointer,
27422+ process->current_state->vertexPointerSize);
27423+ memcpy(process->current_state->vertexPointer + offset, ptr,
27424+ bytes_size);
27425+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27426+ process->current_state->vertexPointer);
27427+ glNormalPointer(normalPointerType, stride,
27428+ process->current_state->vertexPointer +
27429+ normalPointerOffset);
27430+ break;
27431+ }
27432+
27433+ case glTuxRacerDrawElements_fake_func:
27434+ {
27435+ int mode = args[0];
27436+ int count = args[1];
27437+ int isColorEnabled = args[2];
27438+ void *ptr = (void *) args[3];
27439+ int stride =
27440+ 6 * sizeof(float) +
27441+ ((isColorEnabled) ? 4 * sizeof(unsigned char) : 0);
27442+ glVertexPointer(3, GL_FLOAT, stride, ptr);
27443+ glNormalPointer(GL_FLOAT, stride, ptr + 3 * sizeof(float));
27444+ if (isColorEnabled)
27445+ glColorPointer(4, GL_UNSIGNED_BYTE, stride,
27446+ ptr + 6 * sizeof(float));
27447+ glDrawArrays(mode, 0, count);
27448+ break;
27449+ }
27450+
27451+ case glVertexNormalColorPointerInterlaced_fake_func:
27452+ {
27453+ int i = 0;
27454+ int offset = args[i++];
27455+ int vertexPointerSize = args[i++];
27456+ int vertexPointerType = args[i++];
27457+ int stride = args[i++];
27458+ int normalPointerOffset = args[i++];
27459+ int normalPointerType = args[i++];
27460+ int colorPointerOffset = args[i++];
27461+ int colorPointerSize = args[i++];
27462+ int colorPointerType = args[i++];
27463+ int bytes_size = args[i++];
27464+ void *ptr = (void *) args[i++];
27465+
27466+ process->current_state->vertexPointerSize =
27467+ MAX(process->current_state->vertexPointerSize,
27468+ offset + bytes_size);
27469+ process->current_state->vertexPointer =
27470+ realloc(process->current_state->vertexPointer,
27471+ process->current_state->vertexPointerSize);
27472+ memcpy(process->current_state->vertexPointer + offset, ptr,
27473+ bytes_size);
27474+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27475+ process->current_state->vertexPointer);
27476+ glNormalPointer(normalPointerType, stride,
27477+ process->current_state->vertexPointer +
27478+ normalPointerOffset);
27479+ glColorPointer(colorPointerSize, colorPointerType, stride,
27480+ process->current_state->vertexPointer +
27481+ colorPointerOffset);
27482+ break;
27483+ }
27484+
27485+ case glVertexColorTexCoord0PointerInterlaced_fake_func:
27486+ {
27487+ int i = 0;
27488+ int offset = args[i++];
27489+ int vertexPointerSize = args[i++];
27490+ int vertexPointerType = args[i++];
27491+ int stride = args[i++];
27492+ int colorPointerOffset = args[i++];
27493+ int colorPointerSize = args[i++];
27494+ int colorPointerType = args[i++];
27495+ int texCoord0PointerOffset = args[i++];
27496+ int texCoord0PointerSize = args[i++];
27497+ int texCoord0PointerType = args[i++];
27498+ int bytes_size = args[i++];
27499+ void *ptr = (void *) args[i++];
27500+
27501+ process->current_state->vertexPointerSize =
27502+ MAX(process->current_state->vertexPointerSize,
27503+ offset + bytes_size);
27504+ process->current_state->vertexPointer =
27505+ realloc(process->current_state->vertexPointer,
27506+ process->current_state->vertexPointerSize);
27507+ memcpy(process->current_state->vertexPointer + offset, ptr,
27508+ bytes_size);
27509+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27510+ process->current_state->vertexPointer);
27511+ glColorPointer(colorPointerSize, colorPointerType, stride,
27512+ process->current_state->vertexPointer +
27513+ colorPointerOffset);
27514+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27515+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
27516+ stride,
27517+ process->current_state->vertexPointer +
27518+ texCoord0PointerOffset);
27519+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27520+ process->current_state->
27521+ activeTextureIndex);
27522+ break;
27523+ }
27524+
27525+ case glVertexNormalTexCoord0PointerInterlaced_fake_func:
27526+ {
27527+ int i = 0;
27528+ int offset = args[i++];
27529+ int vertexPointerSize = args[i++];
27530+ int vertexPointerType = args[i++];
27531+ int stride = args[i++];
27532+ int normalPointerOffset = args[i++];
27533+ int normalPointerType = args[i++];
27534+ int texCoord0PointerOffset = args[i++];
27535+ int texCoord0PointerSize = args[i++];
27536+ int texCoord0PointerType = args[i++];
27537+ int bytes_size = args[i++];
27538+ void *ptr = (void *) args[i++];
27539+
27540+ process->current_state->vertexPointerSize =
27541+ MAX(process->current_state->vertexPointerSize,
27542+ offset + bytes_size);
27543+ process->current_state->vertexPointer =
27544+ realloc(process->current_state->vertexPointer,
27545+ process->current_state->vertexPointerSize);
27546+ memcpy(process->current_state->vertexPointer + offset, ptr,
27547+ bytes_size);
27548+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27549+ process->current_state->vertexPointer);
27550+ glNormalPointer(normalPointerType, stride,
27551+ process->current_state->vertexPointer +
27552+ normalPointerOffset);
27553+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27554+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
27555+ stride,
27556+ process->current_state->vertexPointer +
27557+ texCoord0PointerOffset);
27558+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27559+ process->current_state->
27560+ activeTextureIndex);
27561+ break;
27562+ }
27563+
27564+ case glVertexNormalTexCoord01PointerInterlaced_fake_func:
27565+ {
27566+ int i = 0;
27567+ int offset = args[i++];
27568+ int vertexPointerSize = args[i++];
27569+ int vertexPointerType = args[i++];
27570+ int stride = args[i++];
27571+ int normalPointerOffset = args[i++];
27572+ int normalPointerType = args[i++];
27573+ int texCoord0PointerOffset = args[i++];
27574+ int texCoord0PointerSize = args[i++];
27575+ int texCoord0PointerType = args[i++];
27576+ int texCoord1PointerOffset = args[i++];
27577+ int texCoord1PointerSize = args[i++];
27578+ int texCoord1PointerType = args[i++];
27579+ int bytes_size = args[i++];
27580+ void *ptr = (void *) args[i++];
27581+
27582+ process->current_state->vertexPointerSize =
27583+ MAX(process->current_state->vertexPointerSize,
27584+ offset + bytes_size);
27585+ process->current_state->vertexPointer =
27586+ realloc(process->current_state->vertexPointer,
27587+ process->current_state->vertexPointerSize);
27588+ memcpy(process->current_state->vertexPointer + offset, ptr,
27589+ bytes_size);
27590+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27591+ process->current_state->vertexPointer);
27592+ glNormalPointer(normalPointerType, stride,
27593+ process->current_state->vertexPointer +
27594+ normalPointerOffset);
27595+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27596+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
27597+ stride,
27598+ process->current_state->vertexPointer +
27599+ texCoord0PointerOffset);
27600+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
27601+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
27602+ stride,
27603+ process->current_state->vertexPointer +
27604+ texCoord1PointerOffset);
27605+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27606+ process->current_state->
27607+ activeTextureIndex);
27608+ break;
27609+ }
27610+
27611+ case glVertexNormalTexCoord012PointerInterlaced_fake_func:
27612+ {
27613+ int i = 0;
27614+ int offset = args[i++];
27615+ int vertexPointerSize = args[i++];
27616+ int vertexPointerType = args[i++];
27617+ int stride = args[i++];
27618+ int normalPointerOffset = args[i++];
27619+ int normalPointerType = args[i++];
27620+ int texCoord0PointerOffset = args[i++];
27621+ int texCoord0PointerSize = args[i++];
27622+ int texCoord0PointerType = args[i++];
27623+ int texCoord1PointerOffset = args[i++];
27624+ int texCoord1PointerSize = args[i++];
27625+ int texCoord1PointerType = args[i++];
27626+ int texCoord2PointerOffset = args[i++];
27627+ int texCoord2PointerSize = args[i++];
27628+ int texCoord2PointerType = args[i++];
27629+ int bytes_size = args[i++];
27630+ void *ptr = (void *) args[i++];
27631+
27632+ process->current_state->vertexPointerSize =
27633+ MAX(process->current_state->vertexPointerSize,
27634+ offset + bytes_size);
27635+ process->current_state->vertexPointer =
27636+ realloc(process->current_state->vertexPointer,
27637+ process->current_state->vertexPointerSize);
27638+ memcpy(process->current_state->vertexPointer + offset, ptr,
27639+ bytes_size);
27640+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27641+ process->current_state->vertexPointer);
27642+ glNormalPointer(normalPointerType, stride,
27643+ process->current_state->vertexPointer +
27644+ normalPointerOffset);
27645+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27646+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
27647+ stride,
27648+ process->current_state->vertexPointer +
27649+ texCoord0PointerOffset);
27650+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
27651+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
27652+ stride,
27653+ process->current_state->vertexPointer +
27654+ texCoord1PointerOffset);
27655+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
27656+ glTexCoordPointer(texCoord2PointerSize, texCoord2PointerType,
27657+ stride,
27658+ process->current_state->vertexPointer +
27659+ texCoord2PointerOffset);
27660+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27661+ process->current_state->
27662+ activeTextureIndex);
27663+ break;
27664+ }
27665+
27666+ case glVertexNormalColorTexCoord0PointerInterlaced_fake_func:
27667+ {
27668+ int i = 0;
27669+ int offset = args[i++];
27670+ int vertexPointerSize = args[i++];
27671+ int vertexPointerType = args[i++];
27672+ int stride = args[i++];
27673+ int normalPointerOffset = args[i++];
27674+ int normalPointerType = args[i++];
27675+ int colorPointerOffset = args[i++];
27676+ int colorPointerSize = args[i++];
27677+ int colorPointerType = args[i++];
27678+ int texCoord0PointerOffset = args[i++];
27679+ int texCoord0PointerSize = args[i++];
27680+ int texCoord0PointerType = args[i++];
27681+ int bytes_size = args[i++];
27682+ void *ptr = (void *) args[i++];
27683+
27684+ process->current_state->vertexPointerSize =
27685+ MAX(process->current_state->vertexPointerSize,
27686+ offset + bytes_size);
27687+ process->current_state->vertexPointer =
27688+ realloc(process->current_state->vertexPointer,
27689+ process->current_state->vertexPointerSize);
27690+ memcpy(process->current_state->vertexPointer + offset, ptr,
27691+ bytes_size);
27692+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27693+ process->current_state->vertexPointer);
27694+ glNormalPointer(normalPointerType, stride,
27695+ process->current_state->vertexPointer +
27696+ normalPointerOffset);
27697+ glColorPointer(colorPointerSize, colorPointerType, stride,
27698+ process->current_state->vertexPointer +
27699+ colorPointerOffset);
27700+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27701+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
27702+ stride,
27703+ process->current_state->vertexPointer +
27704+ texCoord0PointerOffset);
27705+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27706+ process->current_state->
27707+ activeTextureIndex);
27708+ break;
27709+ }
27710+
27711+ case glVertexNormalColorTexCoord01PointerInterlaced_fake_func:
27712+ {
27713+ int i = 0;
27714+ int offset = args[i++];
27715+ int vertexPointerSize = args[i++];
27716+ int vertexPointerType = args[i++];
27717+ int stride = args[i++];
27718+ int normalPointerOffset = args[i++];
27719+ int normalPointerType = args[i++];
27720+ int colorPointerOffset = args[i++];
27721+ int colorPointerSize = args[i++];
27722+ int colorPointerType = args[i++];
27723+ int texCoord0PointerOffset = args[i++];
27724+ int texCoord0PointerSize = args[i++];
27725+ int texCoord0PointerType = args[i++];
27726+ int texCoord1PointerOffset = args[i++];
27727+ int texCoord1PointerSize = args[i++];
27728+ int texCoord1PointerType = args[i++];
27729+ int bytes_size = args[i++];
27730+ void *ptr = (void *) args[i++];
27731+
27732+ process->current_state->vertexPointerSize =
27733+ MAX(process->current_state->vertexPointerSize,
27734+ offset + bytes_size);
27735+ process->current_state->vertexPointer =
27736+ realloc(process->current_state->vertexPointer,
27737+ process->current_state->vertexPointerSize);
27738+ memcpy(process->current_state->vertexPointer + offset, ptr,
27739+ bytes_size);
27740+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27741+ process->current_state->vertexPointer);
27742+ glNormalPointer(normalPointerType, stride,
27743+ process->current_state->vertexPointer +
27744+ normalPointerOffset);
27745+ glColorPointer(colorPointerSize, colorPointerType, stride,
27746+ process->current_state->vertexPointer +
27747+ colorPointerOffset);
27748+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27749+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
27750+ stride,
27751+ process->current_state->vertexPointer +
27752+ texCoord0PointerOffset);
27753+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
27754+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
27755+ stride,
27756+ process->current_state->vertexPointer +
27757+ texCoord1PointerOffset);
27758+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27759+ process->current_state->
27760+ activeTextureIndex);
27761+ break;
27762+ }
27763+
27764+ case glVertexNormalColorTexCoord012PointerInterlaced_fake_func:
27765+ {
27766+ int i = 0;
27767+ int offset = args[i++];
27768+ int vertexPointerSize = args[i++];
27769+ int vertexPointerType = args[i++];
27770+ int stride = args[i++];
27771+ int normalPointerOffset = args[i++];
27772+ int normalPointerType = args[i++];
27773+ int colorPointerOffset = args[i++];
27774+ int colorPointerSize = args[i++];
27775+ int colorPointerType = args[i++];
27776+ int texCoord0PointerOffset = args[i++];
27777+ int texCoord0PointerSize = args[i++];
27778+ int texCoord0PointerType = args[i++];
27779+ int texCoord1PointerOffset = args[i++];
27780+ int texCoord1PointerSize = args[i++];
27781+ int texCoord1PointerType = args[i++];
27782+ int texCoord2PointerOffset = args[i++];
27783+ int texCoord2PointerSize = args[i++];
27784+ int texCoord2PointerType = args[i++];
27785+ int bytes_size = args[i++];
27786+ void *ptr = (void *) args[i++];
27787+
27788+ process->current_state->vertexPointerSize =
27789+ MAX(process->current_state->vertexPointerSize,
27790+ offset + bytes_size);
27791+ process->current_state->vertexPointer =
27792+ realloc(process->current_state->vertexPointer,
27793+ process->current_state->vertexPointerSize);
27794+ memcpy(process->current_state->vertexPointer + offset, ptr,
27795+ bytes_size);
27796+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27797+ process->current_state->vertexPointer);
27798+ glNormalPointer(normalPointerType, stride,
27799+ process->current_state->vertexPointer +
27800+ normalPointerOffset);
27801+ glColorPointer(colorPointerSize, colorPointerType, stride,
27802+ process->current_state->vertexPointer +
27803+ colorPointerOffset);
27804+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27805+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
27806+ stride,
27807+ process->current_state->vertexPointer +
27808+ texCoord0PointerOffset);
27809+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
27810+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
27811+ stride,
27812+ process->current_state->vertexPointer +
27813+ texCoord1PointerOffset);
27814+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
27815+ glTexCoordPointer(texCoord2PointerSize, texCoord2PointerType,
27816+ stride,
27817+ process->current_state->vertexPointer +
27818+ texCoord2PointerOffset);
27819+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27820+ process->current_state->
27821+ activeTextureIndex);
27822+ break;
27823+ }
27824+
27825+ case _glVertexPointer_buffer_func:
27826+ {
27827+ glVertexPointer(args[0], args[1], args[2], (void *) args[3]);
27828+ break;
27829+ }
27830+
27831+ case _glNormalPointer_buffer_func:
27832+ {
27833+ glNormalPointer(args[0], args[1], (void *) args[2]);
27834+ break;
27835+ }
27836+
27837+ case _glColorPointer_buffer_func:
27838+ {
27839+ glColorPointer(args[0], args[1], args[2], (void *) args[3]);
27840+ break;
27841+ }
27842+
27843+ case _glSecondaryColorPointer_buffer_func:
27844+ {
27845+ GET_EXT_PTR(void, glSecondaryColorPointer,
27846+ (int, int, int, void *));
27847+ ptr_func_glSecondaryColorPointer(args[0], args[1], args[2],
27848+ (void *) args[3]);
27849+ break;
27850+ }
27851+
27852+ case _glIndexPointer_buffer_func:
27853+ {
27854+ glIndexPointer(args[0], args[1], (void *) args[2]);
27855+ break;
27856+ }
27857+
27858+ case _glTexCoordPointer_buffer_func:
27859+ {
27860+ glTexCoordPointer(args[0], args[1], args[2], (void *) args[3]);
27861+ break;
27862+ }
27863+
27864+ case _glEdgeFlagPointer_buffer_func:
27865+ {
27866+ glEdgeFlagPointer(args[0], (void *) args[1]);
27867+ break;
27868+ }
27869+
27870+ case _glVertexAttribPointerARB_buffer_func:
27871+ {
27872+ GET_EXT_PTR(void, glVertexAttribPointerARB,
27873+ (int, int, int, int, int, void *));
27874+ ptr_func_glVertexAttribPointerARB(args[0], args[1], args[2],
27875+ args[3], args[4],
27876+ (void *) args[5]);
27877+ break;
27878+ }
27879+
27880+ case _glWeightPointerARB_buffer_func:
27881+ {
27882+ GET_EXT_PTR(void, glWeightPointerARB, (int, int, int, void *));
27883+
27884+ ptr_func_glWeightPointerARB(args[0], args[1], args[2],
27885+ (void *) args[3]);
27886+ break;
27887+ }
27888+
27889+ case _glMatrixIndexPointerARB_buffer_func:
27890+ {
27891+ GET_EXT_PTR(void, glMatrixIndexPointerARB,
27892+ (int, int, int, void *));
27893+ ptr_func_glMatrixIndexPointerARB(args[0], args[1], args[2],
27894+ (void *) args[3]);
27895+ break;
27896+ }
27897+
27898+ case _glFogCoordPointer_buffer_func:
27899+ {
27900+ GET_EXT_PTR(void, glFogCoordPointer, (int, int, void *));
27901+
27902+ ptr_func_glFogCoordPointer(args[0], args[1], (void *) args[2]);
27903+ break;
27904+ }
27905+
27906+ case _glVariantPointerEXT_buffer_func:
27907+ {
27908+ GET_EXT_PTR(void, glVariantPointerEXT, (int, int, int, void *));
27909+
27910+ ptr_func_glVariantPointerEXT(args[0], args[1], args[2],
27911+ (void *) args[3]);
27912+ break;
27913+ }
27914+
27915+ case _glDrawElements_buffer_func:
27916+ {
27917+ glDrawElements(args[0], args[1], args[2], (void *) args[3]);
27918+ break;
27919+ }
27920+
27921+ case _glDrawRangeElements_buffer_func:
27922+ {
27923+ glDrawRangeElements(args[0], args[1], args[2], args[3], args[4],
27924+ (void *) args[5]);
27925+ break;
27926+ }
27927+
27928+ case _glMultiDrawElements_buffer_func:
27929+ {
27930+ GET_EXT_PTR(void, glMultiDrawElements,
27931+ (int, int *, int, void **, int));
27932+ ptr_func_glMultiDrawElements(args[0], (int *) args[1], args[2],
27933+ (void **) args[3], args[4]);
27934+ break;
27935+ }
27936+
27937+ case _glGetError_fake_func:
27938+ {
27939+ break;
27940+ }
27941+
27942+ case glGetIntegerv_func:
27943+ {
27944+ glGetIntegerv(args[0], (int *) args[1]);
27945+ fprintf(stderr, "glGetIntegerv(%x)=%d\n", (int) args[0],
27946+ *(int *) args[1]);
27947+ break;
27948+ }
27949+
27950+ case _glReadPixels_pbo_func:
27951+ {
27952+ glReadPixels(ARG_TO_INT(args[0]), ARG_TO_INT(args[1]),
27953+ ARG_TO_INT(args[2]), ARG_TO_INT(args[3]),
27954+ ARG_TO_UNSIGNED_INT(args[4]),
27955+ ARG_TO_UNSIGNED_INT(args[5]), (void *) (args[6]));
27956+ break;
27957+ }
27958+
27959+ case _glDrawPixels_pbo_func:
27960+ {
27961+ glDrawPixels(ARG_TO_INT(args[0]), ARG_TO_INT(args[1]),
27962+ ARG_TO_UNSIGNED_INT(args[2]),
27963+ ARG_TO_UNSIGNED_INT(args[3]),
27964+ (const void *) (args[4]));
27965+ break;
27966+ }
27967+
27968+ case _glMapBufferARB_fake_func:
27969+ {
27970+ GET_EXT_PTR(GLvoid *, glMapBufferARB, (GLenum, GLenum));
27971+ GET_EXT_PTR(GLboolean, glUnmapBufferARB, (GLenum));
27972+ int target = args[0];
27973+ int size = args[1];
27974+ void *dst_ptr = (void *) args[2];
27975+ void *src_ptr = ptr_func_glMapBufferARB(target, GL_READ_ONLY);
27976+
27977+ if (src_ptr) {
27978+ memcpy(dst_ptr, src_ptr, size);
27979+ ret_int = ptr_func_glUnmapBufferARB(target);
27980+ } else {
27981+ ret_int = 0;
27982+ }
27983+ break;
27984+ }
27985+
27986+ case fake_gluBuild2DMipmaps_func:
27987+ {
27988+ GET_GLU_PTR(GLint, gluBuild2DMipmaps,
27989+ (GLenum arg_0, GLint arg_1, GLsizei arg_2,
27990+ GLsizei arg_3, GLenum arg_4, GLenum arg_5,
27991+ const GLvoid *arg_6));
27992+ if (ptr_func_gluBuild2DMipmaps == NULL)
27993+ ptr_func_gluBuild2DMipmaps = mesa_gluBuild2DMipmaps;
27994+ ptr_func_gluBuild2DMipmaps(ARG_TO_UNSIGNED_INT(args[0]),
27995+ ARG_TO_INT(args[1]),
27996+ ARG_TO_INT(args[2]),
27997+ ARG_TO_INT(args[3]),
27998+ ARG_TO_UNSIGNED_INT(args[4]),
27999+ ARG_TO_UNSIGNED_INT(args[5]),
28000+ (const void *) (args[6]));
28001+ break;
28002+ }
28003+
28004+ case _glSelectBuffer_fake_func:
28005+ {
28006+ process->current_state->selectBufferSize = args[0] * 4;
28007+ process->current_state->selectBufferPtr =
28008+ realloc(process->current_state->selectBufferPtr,
28009+ process->current_state->selectBufferSize);
28010+ glSelectBuffer(args[0], process->current_state->selectBufferPtr);
28011+ break;
28012+ }
28013+
28014+ case _glGetSelectBuffer_fake_func:
28015+ {
28016+ void *ptr = (void *) args[0];
28017+
28018+ memcpy(ptr, process->current_state->selectBufferPtr,
28019+ process->current_state->selectBufferSize);
28020+ break;
28021+ }
28022+
28023+ case _glFeedbackBuffer_fake_func:
28024+ {
28025+ process->current_state->feedbackBufferSize = args[0] * 4;
28026+ process->current_state->feedbackBufferPtr =
28027+ realloc(process->current_state->feedbackBufferPtr,
28028+ process->current_state->feedbackBufferSize);
28029+ glFeedbackBuffer(args[0], args[1],
28030+ process->current_state->feedbackBufferPtr);
28031+ break;
28032+ }
28033+
28034+ case _glGetFeedbackBuffer_fake_func:
28035+ {
28036+ void *ptr = (void *) args[0];
28037+
28038+ memcpy(ptr, process->current_state->feedbackBufferPtr,
28039+ process->current_state->feedbackBufferSize);
28040+ break;
28041+ }
28042+
28043+ /*
28044+ * case glEnableClientState_func: { if (display_function_call)
28045+ * fprintf(stderr, "cap : %s\n", nameArrays[args[0] -
28046+ * GL_VERTEX_ARRAY]); glEnableClientState(args[0]); break; }
28047+ *
28048+ * case glDisableClientState_func: { if (display_function_call)
28049+ * fprintf(stderr, "cap : %s\n", nameArrays[args[0] -
28050+ * GL_VERTEX_ARRAY]); glDisableClientState(args[0]); break; }
28051+ *
28052+ * case glClientActiveTexture_func: case
28053+ * glClientActiveTextureARB_func: { if (display_function_call)
28054+ * fprintf(stderr, "client activeTexture %d\n", args[0] -
28055+ * GL_TEXTURE0_ARB); glClientActiveTextureARB(args[0]); break; }
28056+ *
28057+ * case glActiveTextureARB_func: { if (display_function_call)
28058+ * fprintf(stderr, "server activeTexture %d\n", args[0] -
28059+ * GL_TEXTURE0_ARB); glActiveTextureARB(args[0]); break; }
28060+ *
28061+ * case glLockArraysEXT_func: break;
28062+ *
28063+ * case glUnlockArraysEXT_func: break;
28064+ *
28065+ * case glArrayElement_func: { glArrayElement(args[0]); break; }
28066+ *
28067+ * case glDrawArrays_func: { glDrawArrays(args[0],args[1],args[2]);
28068+ * break; }
28069+ *
28070+ * case glDrawElements_func: {
28071+ * glDrawElements(args[0],args[1],args[2],(void*)args[3]); break; }
28072+ *
28073+ * case glDrawRangeElements_func: {
28074+ * glDrawRangeElements(args[0],args[1],args[2],args[3],args[4],(void*)args[5]);
28075+ * break; } */
28076+
28077+ case glGetError_func:
28078+ {
28079+#ifdef SYSTEMATIC_ERROR_CHECK
28080+ ret_int = process->current_state->last_error;
28081+#else
28082+ ret_int = glGetError();
28083+#endif
28084+ break;
28085+ }
28086+
28087+ case glNewObjectBufferATI_func:
28088+ {
28089+ GET_EXT_PTR(int, glNewObjectBufferATI, (int, void *, int));
28090+
28091+ ret_int = ptr_func_glNewObjectBufferATI(args[0],
28092+ (void *) args[1], args[2]);
28093+ break;
28094+ }
28095+
28096+ case glClear_func:
28097+ /* HACK workaround for an unexplainable issue */
28098+ if (args[0] & GL_COLOR_BUFFER_BIT)
28099+ glClear(GL_COLOR_BUFFER_BIT);
28100+ if (args[0] & GL_STENCIL_BUFFER_BIT)
28101+ glClear(GL_STENCIL_BUFFER_BIT);
28102+ if (args[0] & GL_DEPTH_BUFFER_BIT)
28103+ glClear(GL_DEPTH_BUFFER_BIT);
28104+ if (args[0] & GL_ACCUM_BUFFER_BIT)
28105+ glClear(GL_ACCUM_BUFFER_BIT);
28106+ break;
28107+
28108+ default:
28109+ execute_func(func_number, args, &ret_int, &ret_char);
28110+ break;
28111+ }
28112+
28113+#ifdef SYSTEMATIC_ERROR_CHECK
28114+ if (func_number == glGetError_func) {
28115+ process->current_state->last_error = 0;
28116+ } else {
28117+ process->current_state->last_error = glGetError();
28118+ if (process->current_state->last_error != 0) {
28119+ printf("error %s 0x%x\n", tab_opengl_calls_name[func_number],
28120+ process->current_state->last_error);
28121+ }
28122+ }
28123+#endif
28124+
28125+ switch (ret_type) {
28126+ case TYPE_NONE:
28127+ break;
28128+
28129+ case TYPE_CHAR:
28130+ case TYPE_UNSIGNED_CHAR:
28131+ ret_int = ret_char;
28132+ break;
28133+
28134+ case TYPE_INT:
28135+ case TYPE_UNSIGNED_INT:
28136+ break;
28137+
28138+ case TYPE_CONST_CHAR:
28139+ {
28140+ strncpy(ret_string, (ret_str) ? ret_str : "", 32768);
28141+ break;
28142+ }
28143+
28144+ default:
28145+ fprintf(stderr, "unexpected ret type : %d\n", ret_type);
28146+ exit(-1);
28147+ break;
28148+ }
28149+
28150+ if (display_function_call)
28151+ fprintf(stderr, "[%d]< %s\n", process->instr_counter,
28152+ tab_opengl_calls_name[func_number]);
28153+
28154+ return ret_int;
28155+}
28156Index: git/target-i386/opengl_func.h
28157===================================================================
28158--- /dev/null 1970-01-01 00:00:00.000000000 +0000
28159+++ git/target-i386/opengl_func.h 2009-05-23 11:22:17.000000000 +0100
28160@@ -0,0 +1,1108 @@
28161+/*
28162+ * Main header for both host and guest sides
28163+ *
28164+ * Copyright (c) 2006,2007 Even Rouault
28165+ *
28166+ * Permission is hereby granted, free of charge, to any person obtaining a copy
28167+ * of this software and associated documentation files (the "Software"), to deal
28168+ * in the Software without restriction, including without limitation the rights
28169+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
28170+ * copies of the Software, and to permit persons to whom the Software is
28171+ * furnished to do so, subject to the following conditions:
28172+ *
28173+ * The above copyright notice and this permission notice shall be included in
28174+ * all copies or substantial portions of the Software.
28175+ *
28176+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28177+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28178+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
28179+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28180+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28181+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28182+ * THE SOFTWARE.
28183+ */
28184+
28185+#include "mesa_gl.h"
28186+#include "mesa_glext.h"
28187+
28188+/* Argument list are internally of a type that can hold a target pointer
28189+ * or a host pointer. */
28190+typedef target_phys_addr_t arg_t;
28191+
28192+enum {
28193+ TYPE_NONE,
28194+ TYPE_CHAR,
28195+ TYPE_UNSIGNED_CHAR,
28196+ TYPE_SHORT,
28197+ TYPE_UNSIGNED_SHORT,
28198+ TYPE_INT,
28199+ TYPE_UNSIGNED_INT,
28200+ TYPE_FLOAT,
28201+ TYPE_DOUBLE,
28202+ TYPE_1CHAR,
28203+ TYPE_2CHAR,
28204+ TYPE_3CHAR,
28205+ TYPE_4CHAR,
28206+ TYPE_128UCHAR,
28207+ TYPE_1SHORT,
28208+ TYPE_2SHORT,
28209+ TYPE_3SHORT,
28210+ TYPE_4SHORT,
28211+ TYPE_1INT,
28212+ TYPE_2INT,
28213+ TYPE_3INT,
28214+ TYPE_4INT,
28215+ TYPE_1FLOAT,
28216+ TYPE_2FLOAT,
28217+ TYPE_3FLOAT,
28218+ TYPE_4FLOAT,
28219+ TYPE_16FLOAT,
28220+ TYPE_1DOUBLE,
28221+ TYPE_2DOUBLE,
28222+ TYPE_3DOUBLE,
28223+ TYPE_4DOUBLE,
28224+ TYPE_16DOUBLE,
28225+ TYPE_OUT_1INT,
28226+ TYPE_OUT_1FLOAT,
28227+ TYPE_OUT_4CHAR,
28228+ TYPE_OUT_4INT,
28229+ TYPE_OUT_4FLOAT,
28230+ TYPE_OUT_4DOUBLE,
28231+ TYPE_OUT_128UCHAR,
28232+ TYPE_CONST_CHAR,
28233+ TYPE_ARRAY_CHAR,
28234+ TYPE_ARRAY_SHORT,
28235+ TYPE_ARRAY_INT,
28236+ TYPE_ARRAY_FLOAT,
28237+ TYPE_ARRAY_DOUBLE,
28238+ TYPE_IN_IGNORED_POINTER,
28239+ TYPE_OUT_ARRAY_CHAR,
28240+ TYPE_OUT_ARRAY_SHORT,
28241+ TYPE_OUT_ARRAY_INT,
28242+ TYPE_OUT_ARRAY_FLOAT,
28243+ TYPE_OUT_ARRAY_DOUBLE,
28244+ TYPE_NULL_TERMINATED_STRING,
28245+
28246+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28247+ TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28248+ TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28249+ TYPE_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28250+ TYPE_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28251+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28252+ TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28253+ TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28254+ TYPE_OUT_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28255+ TYPE_OUT_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28256+ /* .... */
28257+ TYPE_LAST,
28258+ /* .... */
28259+ TYPE_1UCHAR = TYPE_CHAR,
28260+ TYPE_1USHORT = TYPE_1SHORT,
28261+ TYPE_1UINT = TYPE_1INT,
28262+ TYPE_OUT_1UINT = TYPE_OUT_1INT,
28263+ TYPE_OUT_4UCHAR = TYPE_OUT_4CHAR,
28264+ TYPE_ARRAY_VOID = TYPE_ARRAY_CHAR,
28265+ TYPE_ARRAY_SIGNED_CHAR = TYPE_ARRAY_CHAR,
28266+ TYPE_ARRAY_UNSIGNED_CHAR = TYPE_ARRAY_CHAR,
28267+ TYPE_ARRAY_UNSIGNED_SHORT = TYPE_ARRAY_SHORT,
28268+ TYPE_ARRAY_UNSIGNED_INT = TYPE_ARRAY_INT,
28269+ TYPE_OUT_ARRAY_VOID = TYPE_OUT_ARRAY_CHAR,
28270+ TYPE_OUT_ARRAY_SIGNED_CHAR = TYPE_OUT_ARRAY_CHAR,
28271+ TYPE_OUT_ARRAY_UNSIGNED_CHAR = TYPE_OUT_ARRAY_CHAR,
28272+ TYPE_OUT_ARRAY_UNSIGNED_SHORT = TYPE_OUT_ARRAY_SHORT,
28273+ TYPE_OUT_ARRAY_UNSIGNED_INT = TYPE_OUT_ARRAY_INT,
28274+ TYPE_ARRAY_VOID_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28275+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28276+ TYPE_ARRAY_SIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28277+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28278+ TYPE_ARRAY_UNSIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28279+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28280+ TYPE_ARRAY_UNSIGNED_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28281+ TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28282+ TYPE_ARRAY_UNSIGNED_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28283+ TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28284+ TYPE_OUT_ARRAY_VOID_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28285+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28286+ TYPE_OUT_ARRAY_SIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28287+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28288+ TYPE_OUT_ARRAY_UNSIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28289+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28290+ TYPE_OUT_ARRAY_UNSIGNED_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28291+ TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28292+ TYPE_OUT_ARRAY_UNSIGNED_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28293+ TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28294+};
28295+
28296+#define CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS \
28297+ case TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28298+ case TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28299+ case TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28300+ case TYPE_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28301+ case TYPE_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28302+
28303+#define CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS \
28304+ case TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28305+ case TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28306+ case TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28307+ case TYPE_OUT_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28308+ case TYPE_OUT_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28309+
28310+#define CASE_IN_UNKNOWN_SIZE_POINTERS \
28311+ case TYPE_ARRAY_CHAR: \
28312+ case TYPE_ARRAY_SHORT: \
28313+ case TYPE_ARRAY_INT: \
28314+ case TYPE_ARRAY_FLOAT: \
28315+ case TYPE_ARRAY_DOUBLE
28316+
28317+#define CASE_IN_KNOWN_SIZE_POINTERS \
28318+ case TYPE_1CHAR:\
28319+ case TYPE_2CHAR:\
28320+ case TYPE_3CHAR:\
28321+ case TYPE_4CHAR:\
28322+ case TYPE_128UCHAR:\
28323+ case TYPE_1SHORT:\
28324+ case TYPE_2SHORT:\
28325+ case TYPE_3SHORT:\
28326+ case TYPE_4SHORT:\
28327+ case TYPE_1INT:\
28328+ case TYPE_2INT:\
28329+ case TYPE_3INT:\
28330+ case TYPE_4INT:\
28331+ case TYPE_1FLOAT:\
28332+ case TYPE_2FLOAT:\
28333+ case TYPE_3FLOAT:\
28334+ case TYPE_4FLOAT:\
28335+ case TYPE_16FLOAT:\
28336+ case TYPE_1DOUBLE:\
28337+ case TYPE_2DOUBLE:\
28338+ case TYPE_3DOUBLE:\
28339+ case TYPE_4DOUBLE:\
28340+ case TYPE_16DOUBLE
28341+
28342+#define CASE_OUT_UNKNOWN_SIZE_POINTERS \
28343+ case TYPE_OUT_ARRAY_CHAR: \
28344+ case TYPE_OUT_ARRAY_SHORT: \
28345+ case TYPE_OUT_ARRAY_INT: \
28346+ case TYPE_OUT_ARRAY_FLOAT: \
28347+ case TYPE_OUT_ARRAY_DOUBLE
28348+
28349+#define CASE_OUT_KNOWN_SIZE_POINTERS \
28350+ case TYPE_OUT_1INT: \
28351+ case TYPE_OUT_1FLOAT: \
28352+ case TYPE_OUT_4CHAR: \
28353+ case TYPE_OUT_4INT: \
28354+ case TYPE_OUT_4FLOAT: \
28355+ case TYPE_OUT_4DOUBLE: \
28356+ case TYPE_OUT_128UCHAR \
28357+
28358+#define CASE_IN_POINTERS CASE_IN_UNKNOWN_SIZE_POINTERS: CASE_IN_KNOWN_SIZE_POINTERS: CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28359+#define CASE_OUT_POINTERS CASE_OUT_UNKNOWN_SIZE_POINTERS: CASE_OUT_KNOWN_SIZE_POINTERS: CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28360+
28361+#define CASE_POINTERS CASE_IN_POINTERS: CASE_OUT_POINTERS
28362+#define CASE_KNOWN_SIZE_POINTERS CASE_IN_KNOWN_SIZE_POINTERS: CASE_OUT_KNOWN_SIZE_POINTERS
28363+
28364+
28365+#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)
28366+#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)
28367+#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)
28368+#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)
28369+#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)
28370+
28371+#define NB_MAX_TEXTURES 16
28372+#define MY_GL_MAX_VERTEX_ATTRIBS_ARB 16
28373+#define MY_GL_MAX_VERTEX_ATTRIBS_NV 16
28374+#define MY_GL_MAX_VARIANT_POINTER_EXT 16
28375+
28376+static int tab_args_type_length[] = {
28377+ 0,
28378+ sizeof(char),
28379+ sizeof(unsigned char),
28380+ sizeof(short),
28381+ sizeof(unsigned short),
28382+ sizeof(int),
28383+ sizeof(unsigned int),
28384+ sizeof(float),
28385+ sizeof(double),
28386+ 1 * sizeof(char),
28387+ 2 * sizeof(char),
28388+ 3 * sizeof(char),
28389+ 4 * sizeof(char),
28390+ 128 * sizeof(char),
28391+ 1 * sizeof(short),
28392+ 2 * sizeof(short),
28393+ 3 * sizeof(short),
28394+ 4 * sizeof(short),
28395+ 1 * sizeof(int),
28396+ 2 * sizeof(int),
28397+ 3 * sizeof(int),
28398+ 4 * sizeof(int),
28399+ 1 * sizeof(float),
28400+ 2 * sizeof(float),
28401+ 3 * sizeof(float),
28402+ 4 * sizeof(float),
28403+ 16 * sizeof(float),
28404+ 1 * sizeof(double),
28405+ 2 * sizeof(double),
28406+ 3 * sizeof(double),
28407+ 4 * sizeof(double),
28408+ 16 * sizeof(double),
28409+ sizeof(int),
28410+ sizeof(float),
28411+ 4 * sizeof(char),
28412+ 4 * sizeof(int),
28413+ 4 * sizeof(float),
28414+ 4 * sizeof(double),
28415+ 128 * sizeof(char),
28416+ 0,
28417+ 0,
28418+ 0,
28419+ 0,
28420+ 0,
28421+ 0,
28422+ 0,
28423+ 0,
28424+ 0,
28425+ 0,
28426+ 0,
28427+ 0,
28428+ 0,
28429+
28430+ /* the following sizes are the size of 1 element of the array */
28431+ sizeof(char),
28432+ sizeof(short),
28433+ sizeof(int),
28434+ sizeof(float),
28435+ sizeof(double),
28436+ sizeof(char),
28437+ sizeof(short),
28438+ sizeof(int),
28439+ sizeof(float),
28440+ sizeof(double),
28441+};
28442+
28443+typedef struct {
28444+ int ret_type;
28445+ int has_out_parameters;
28446+ int nb_args;
28447+ int args_type[0];
28448+} Signature;
28449+
28450+static const int _init32_signature[] =
28451+ { TYPE_NONE, 1, 2, TYPE_INT, TYPE_OUT_1INT };
28452+static const int _init64_signature[] =
28453+ { TYPE_NONE, 1, 2, TYPE_INT, TYPE_OUT_1INT };
28454+
28455+static const int _synchronize_signature[] = { TYPE_INT, 0, 0 };
28456+
28457+static const int _serialized_calls_signature[] =
28458+ { TYPE_NONE, 0, 1, TYPE_ARRAY_CHAR };
28459+
28460+static const int _exit_process_signature[] = { TYPE_NONE, 0, 0 };
28461+
28462+static const int _changeWindowState_signature[] =
28463+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
28464+
28465+static const int _moveResizeWindow_signature[] =
28466+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_4INT };
28467+
28468+static const int _send_cursor_signature[] =
28469+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT,
28470+ TYPE_INT, TYPE_INT,
28471+ TYPE_INT, TYPE_INT,
28472+ TYPE_ARRAY_INT
28473+};
28474+
28475+/* XVisualInfo* glXChooseVisual( Display *dpy, int screen, int *attribList ) */
28476+static const int glXChooseVisual_signature[] =
28477+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT };
28478+
28479+/*GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis,
28480+ GLXContext shareList, Bool direct )*/
28481+static const int glXCreateContext_signature[] =
28482+ { TYPE_INT, 0, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT };
28483+
28484+static const int glXCopyContext_signature[] =
28485+ { TYPE_NONE, 0, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28486+TYPE_INT };
28487+
28488+/* void glXDestroyContext( Display *dpy, GLXContext ctx ) */
28489+static const int glXDestroyContext_signature[] =
28490+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28491+
28492+/* Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable, GLXContext ctx) */
28493+//static const int glXMakeCurrent_signature[] = {TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT};
28494+/* making it asynchronous */
28495+static const int glXMakeCurrent_signature[] =
28496+ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
28497+
28498+/*int glXGetConfig( Display *dpy, XVisualInfo *visual,
28499+ int attrib, int *value )*/
28500+static const int glXGetConfig_signature[] =
28501+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28502+TYPE_OUT_1INT };
28503+
28504+/* "glXGetConfig_extended"(dpy, visual_id, int n, int* attribs, int* values, int* rets) */
28505+static const int glXGetConfig_extended_signature[] =
28506+ { TYPE_NONE, 1, 6, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28507+TYPE_ARRAY_INT, TYPE_OUT_ARRAY_INT, TYPE_OUT_ARRAY_INT };
28508+
28509+/* void glXSwapBuffers( Display *dpy, GLXDrawable drawable ); */
28510+static const int glXSwapBuffers_signature[] =
28511+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28512+
28513+/* Bool glXQueryVersion( Display *dpy, int *maj, int *min ) */
28514+static const int glXQueryVersion_signature[] =
28515+ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_OUT_1INT, TYPE_OUT_1INT };
28516+
28517+/* Bool glXQueryExtension( Display *dpy, int *errorBase, int *eventBase ) */
28518+static const int glXQueryExtension_signature[] =
28519+ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_OUT_1INT, TYPE_OUT_1INT };
28520+
28521+static const int glXWaitGL_signature[] = { TYPE_INT, 0, 0 };
28522+static const int glXWaitX_signature[] = { TYPE_INT, 0, 0 };
28523+
28524+/* GLX 1.1 and later */
28525+
28526+/* const char *glXGetClientString( Display *dpy, int name ) */
28527+static const int glXGetClientString_signature[] =
28528+ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28529+
28530+/*const char *glXQueryExtensionsString( Display *dpy, int screen ) */
28531+static const int glXQueryExtensionsString_signature[] =
28532+ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28533+
28534+/* const char *glXQueryServerString( Display *dpy, int screen, int name ) */
28535+static const int glXQueryServerString_signature[] =
28536+ { TYPE_CONST_CHAR, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
28537+
28538+
28539+static const int glXGetProcAddress_fake_signature[] =
28540+ { TYPE_INT, 0, 1, TYPE_NULL_TERMINATED_STRING };
28541+
28542+static const int glXGetProcAddress_global_fake_signature[] =
28543+ { TYPE_NONE, 1, 3, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_OUT_ARRAY_CHAR };
28544+
28545+
28546+/* GLX 1.3 and later */
28547+
28548+/*
28549+GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
28550+ const int *attribList, int *nitems ); */
28551+static const int glXChooseFBConfig_signature[] =
28552+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT,
28553+TYPE_OUT_1INT };
28554+
28555+static const int glXChooseFBConfigSGIX_signature[] =
28556+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT,
28557+TYPE_OUT_1INT };
28558+
28559+static const int glXGetFBConfigs_signature[] =
28560+ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_OUT_1INT };
28561+
28562+/* "glXGetFBConfigAttrib_extended"(dpy, fbconfig, int n, int* attribs, int* values, int* rets) */
28563+static const int glXGetFBConfigAttrib_extended_signature[] =
28564+ { TYPE_NONE, 1, 6, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28565+TYPE_ARRAY_INT, TYPE_OUT_ARRAY_INT, TYPE_OUT_ARRAY_INT };
28566+
28567+
28568+/* GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config,
28569+ const int *attribList ) */
28570+static const int glXCreatePbuffer_signature[] =
28571+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT };
28572+
28573+static const int glXCreateGLXPbufferSGIX_signature[] =
28574+ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
28575+TYPE_ARRAY_INT };
28576+
28577+static const int glXDestroyPbuffer_signature[] =
28578+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28579+
28580+static const int glXDestroyGLXPbufferSGIX_signature[] =
28581+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28582+
28583+/* GLXContext glXCreateNewContext(Display * dpy
28584+ GLXFBConfig config
28585+ int renderType
28586+ GLXContext ShareList
28587+ Bool Direct) */
28588+static const int glXCreateNewContext_signature[] =
28589+ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
28590+TYPE_INT };
28591+
28592+static const int glXCreateContextWithConfigSGIX_signature[] =
28593+ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
28594+TYPE_INT };
28595+
28596+/*XVisualInfo *glXGetVisualFromFBConfig( Display *dpy, GLXFBConfig config ) */
28597+static const int glXGetVisualFromFBConfig_signature[] =
28598+ { TYPE_INT, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28599+
28600+/*int glXGetFBConfigAttrib(Display *dpy, GLXFBConfig config, int attribute, int *value)*/
28601+static const int glXGetFBConfigAttrib_signature[] =
28602+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28603+TYPE_OUT_1INT };
28604+
28605+static const int glXGetFBConfigAttribSGIX_signature[] =
28606+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28607+TYPE_OUT_1INT };
28608+
28609+static const int glXQueryContext_signature[] =
28610+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28611+TYPE_OUT_1INT };
28612+
28613+static const int glXQueryGLXPbufferSGIX_signature[] =
28614+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28615+TYPE_OUT_1INT };
28616+
28617+static const int glXQueryDrawable_signature[] =
28618+ { TYPE_NONE, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28619+TYPE_OUT_1INT };
28620+
28621+/* void glXUseXFont( Font font, int first, int count, int list ) */
28622+static const int glXUseXFont_signature[] =
28623+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
28624+
28625+/* Bool glXIsDirect( Display *dpy, GLXContext ctx ) */
28626+static const int glXIsDirect_signature[] =
28627+ { TYPE_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28628+
28629+static const int glXGetScreenDriver_signature[] =
28630+ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28631+
28632+static const int glXGetDriverConfig_signature[] =
28633+ { TYPE_CONST_CHAR, 0, 1, TYPE_NULL_TERMINATED_STRING };
28634+
28635+
28636+static const int glXWaitVideoSyncSGI_signature[] =
28637+ { TYPE_INT, 1, 3, TYPE_INT, TYPE_INT, TYPE_OUT_1INT };
28638+
28639+static const int glXGetVideoSyncSGI_signature[] =
28640+ { TYPE_INT, 1, 1, TYPE_OUT_1INT };
28641+
28642+static const int glXSwapIntervalSGI_signature[] =
28643+ { TYPE_INT, 0, 1, TYPE_INT };
28644+
28645+static const int glXBindTexImageATI_signature[] =
28646+ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
28647+static const int glXReleaseTexImageATI_signature[] =
28648+ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
28649+static const int glXBindTexImageARB_signature[] =
28650+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
28651+static const int glXReleaseTexImageARB_signature[] =
28652+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
28653+
28654+/* const GLubyte * glGetString( GLenum name ) */
28655+static const int glGetString_signature[] =
28656+ { TYPE_CONST_CHAR, 0, 1, TYPE_INT };
28657+
28658+/* void glShaderSourceARB (GLhandleARB handle , GLsizei size, const GLcharARB* *p_tab_prog, const GLint * tab_length) */
28659+/* --> void glShaderSourceARB (GLhandleARB handle , GLsizei size, const GLcharARB* all_progs, const GLint * tab_length) */
28660+static const int glShaderSourceARB_fake_signature[] =
28661+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_ARRAY_INT };
28662+static const int glShaderSource_fake_signature[] =
28663+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_ARRAY_INT };
28664+
28665+static const int glVertexPointer_fake_signature[] =
28666+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28667+TYPE_ARRAY_CHAR };
28668+static const int glNormalPointer_fake_signature[] =
28669+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28670+TYPE_ARRAY_CHAR };
28671+static const int glColorPointer_fake_signature[] =
28672+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28673+TYPE_ARRAY_CHAR };
28674+static const int glSecondaryColorPointer_fake_signature[] =
28675+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28676+TYPE_ARRAY_CHAR };
28677+static const int glIndexPointer_fake_signature[] =
28678+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28679+TYPE_ARRAY_CHAR };
28680+static const int glTexCoordPointer_fake_signature[] =
28681+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28682+TYPE_INT, TYPE_ARRAY_CHAR };
28683+static const int glEdgeFlagPointer_fake_signature[] =
28684+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
28685+static const int glVertexAttribPointerARB_fake_signature[] =
28686+ { TYPE_NONE, 0, 8, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28687+TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
28688+static const int glVertexAttribPointerNV_fake_signature[] =
28689+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28690+TYPE_INT, TYPE_ARRAY_CHAR };
28691+static const int glWeightPointerARB_fake_signature[] =
28692+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28693+TYPE_ARRAY_CHAR };
28694+static const int glMatrixIndexPointerARB_fake_signature[] =
28695+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28696+TYPE_ARRAY_CHAR };
28697+static const int glFogCoordPointer_fake_signature[] =
28698+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28699+TYPE_ARRAY_CHAR };
28700+static const int glInterleavedArrays_fake_signature[] =
28701+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28702+TYPE_ARRAY_CHAR };
28703+static const int glElementPointerATI_fake_signature[] =
28704+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
28705+static const int glVariantPointerEXT_fake_signature[] =
28706+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28707+TYPE_ARRAY_CHAR };
28708+static const int glTuxRacerDrawElements_fake_signature[] =
28709+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
28710+static const int glVertexAndNormalPointer_fake_signature[] =
28711+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28712+TYPE_INT, TYPE_ARRAY_CHAR };
28713+static const int glTexCoordPointer01_fake_signature[] =
28714+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28715+TYPE_ARRAY_CHAR };
28716+static const int glTexCoordPointer012_fake_signature[] =
28717+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28718+TYPE_ARRAY_CHAR };
28719+static const int glVertexNormalPointerInterlaced_fake_signature[] =
28720+ { TYPE_NONE, 0, 8, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28721+TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
28722+static const int glVertexNormalColorPointerInterlaced_fake_signature[] =
28723+ { TYPE_NONE, 0, 11, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28724+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
28725+static const int glVertexColorTexCoord0PointerInterlaced_fake_signature[] =
28726+ { TYPE_NONE, 0, 12, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28727+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
28728+static const int glVertexNormalTexCoord0PointerInterlaced_fake_signature[] =
28729+ { TYPE_NONE, 0, 11, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28730+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
28731+static const int glVertexNormalTexCoord01PointerInterlaced_fake_signature[] =
28732+ { TYPE_NONE, 0, 14, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28733+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
28734+static const int glVertexNormalTexCoord012PointerInterlaced_fake_signature[] =
28735+ { TYPE_NONE, 0, 17, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28736+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 };
28737+static const int
28738+ glVertexNormalColorTexCoord0PointerInterlaced_fake_signature[] =
28739+ { TYPE_NONE, 0, 14, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28740+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28741+TYPE_ARRAY_CHAR };
28742+static const int
28743+ glVertexNormalColorTexCoord01PointerInterlaced_fake_signature[] =
28744+ { TYPE_NONE, 0, 17, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28745+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28746+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
28747+static const int
28748+ glVertexNormalColorTexCoord012PointerInterlaced_fake_signature[] =
28749+ { TYPE_NONE, 0, 20, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28750+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28751+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
28752+
28753+static const int glGenTextures_fake_signature[] =
28754+ { TYPE_NONE, 0, 1, TYPE_INT };
28755+static const int glGenBuffersARB_fake_signature[] =
28756+ { TYPE_NONE, 0, 1, TYPE_INT };
28757+static const int glGenLists_fake_signature[] = { TYPE_NONE, 0, 1, TYPE_INT };
28758+
28759+static const int _glDrawElements_buffer_signature[] =
28760+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
28761+static const int _glDrawRangeElements_buffer_signature[] =
28762+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28763+TYPE_INT };
28764+static const int _glMultiDrawElements_buffer_signature[] =
28765+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_ARRAY_INT, TYPE_INT, TYPE_ARRAY_INT,
28766+TYPE_INT };
28767+
28768+static const int _glVertexPointer_buffer_signature[] =
28769+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
28770+static const int _glNormalPointer_buffer_signature[] =
28771+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
28772+static const int _glColorPointer_buffer_signature[] =
28773+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
28774+static const int _glSecondaryColorPointer_buffer_signature[] =
28775+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
28776+static const int _glIndexPointer_buffer_signature[] =
28777+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
28778+static const int _glTexCoordPointer_buffer_signature[] =
28779+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
28780+static const int _glEdgeFlagPointer_buffer_signature[] =
28781+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
28782+static const int _glVertexAttribPointerARB_buffer_signature[] =
28783+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28784+TYPE_INT };
28785+static const int _glWeightPointerARB_buffer_signature[] =
28786+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
28787+static const int _glMatrixIndexPointerARB_buffer_signature[] =
28788+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
28789+static const int _glFogCoordPointer_buffer_signature[] =
28790+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
28791+static const int _glVariantPointerEXT_buffer_signature[] =
28792+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
28793+
28794+static const int _glReadPixels_pbo_signature[] =
28795+ { TYPE_INT, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
28796+TYPE_INT, TYPE_INT };
28797+static const int _glDrawPixels_pbo_signature[] =
28798+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
28799+static const int _glMapBufferARB_fake_signature[] =
28800+ { TYPE_INT, 1, 3, TYPE_INT, TYPE_INT, TYPE_OUT_ARRAY_CHAR };
28801+
28802+static const int _glSelectBuffer_fake_signature[] =
28803+ { TYPE_NONE, 0, 1, TYPE_INT };
28804+static const int _glGetSelectBuffer_fake_signature[] =
28805+ { TYPE_NONE, 1, 1, TYPE_ARRAY_CHAR };
28806+static const int _glFeedbackBuffer_fake_signature[] =
28807+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
28808+static const int _glGetFeedbackBuffer_fake_signature[] =
28809+ { TYPE_NONE, 1, 1, TYPE_ARRAY_CHAR };
28810+
28811+static const int _glGetError_fake_signature[] = { TYPE_NONE, 0, 0 };
28812+
28813+#define timesynchro_func -1
28814+#define memorize_array_func -2
28815+#define reuse_array_func -3
28816+
28817+#include "gl_func.h"
28818+
28819+static GLint __glTexParameter_size(FILE *err_file, GLenum pname)
28820+{
28821+ switch (pname) {
28822+ case GL_TEXTURE_MAG_FILTER:
28823+ case GL_TEXTURE_MIN_FILTER:
28824+ case GL_TEXTURE_WRAP_S:
28825+ case GL_TEXTURE_WRAP_T:
28826+ case GL_TEXTURE_PRIORITY:
28827+ case GL_TEXTURE_WRAP_R:
28828+ case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
28829+/* case GL_SHADOW_AMBIENT_SGIX:*/
28830+ case GL_TEXTURE_MIN_LOD:
28831+ case GL_TEXTURE_MAX_LOD:
28832+ case GL_TEXTURE_BASE_LEVEL:
28833+ case GL_TEXTURE_MAX_LEVEL:
28834+ case GL_TEXTURE_CLIPMAP_FRAME_SGIX:
28835+ case GL_TEXTURE_LOD_BIAS_S_SGIX:
28836+ case GL_TEXTURE_LOD_BIAS_T_SGIX:
28837+ case GL_TEXTURE_LOD_BIAS_R_SGIX:
28838+ case GL_GENERATE_MIPMAP:
28839+/* case GL_GENERATE_MIPMAP_SGIS:*/
28840+ case GL_TEXTURE_COMPARE_SGIX:
28841+ case GL_TEXTURE_COMPARE_OPERATOR_SGIX:
28842+ case GL_TEXTURE_MAX_CLAMP_S_SGIX:
28843+ case GL_TEXTURE_MAX_CLAMP_T_SGIX:
28844+ case GL_TEXTURE_MAX_CLAMP_R_SGIX:
28845+ case GL_TEXTURE_MAX_ANISOTROPY_EXT:
28846+ case GL_TEXTURE_LOD_BIAS:
28847+/* case GL_TEXTURE_LOD_BIAS_EXT:*/
28848+ case GL_DEPTH_TEXTURE_MODE:
28849+/* case GL_DEPTH_TEXTURE_MODE_ARB:*/
28850+ case GL_TEXTURE_COMPARE_MODE:
28851+/* case GL_TEXTURE_COMPARE_MODE_ARB:*/
28852+ case GL_TEXTURE_COMPARE_FUNC:
28853+/* case GL_TEXTURE_COMPARE_FUNC_ARB:*/
28854+ case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV:
28855+ return 1;
28856+ case GL_TEXTURE_CLIPMAP_CENTER_SGIX:
28857+ case GL_TEXTURE_CLIPMAP_OFFSET_SGIX:
28858+ return 2;
28859+ case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX:
28860+ return 3;
28861+ case GL_TEXTURE_BORDER_COLOR:
28862+ case GL_POST_TEXTURE_FILTER_BIAS_SGIX:
28863+ case GL_POST_TEXTURE_FILTER_SCALE_SGIX:
28864+ return 4;
28865+ default:
28866+ fprintf(err_file, "unhandled pname = %d\n", pname);
28867+ return 0;
28868+ }
28869+}
28870+
28871+static int __glLight_size(FILE *err_file, GLenum pname)
28872+{
28873+ switch (pname) {
28874+ case GL_AMBIENT:
28875+ case GL_DIFFUSE:
28876+ case GL_SPECULAR:
28877+ case GL_POSITION:
28878+ return 4;
28879+ break;
28880+
28881+ case GL_SPOT_DIRECTION:
28882+ return 3;
28883+ break;
28884+
28885+ case GL_SPOT_EXPONENT:
28886+ case GL_SPOT_CUTOFF:
28887+ case GL_CONSTANT_ATTENUATION:
28888+ case GL_LINEAR_ATTENUATION:
28889+ case GL_QUADRATIC_ATTENUATION:
28890+ return 1;
28891+ break;
28892+
28893+ default:
28894+ fprintf(err_file, "unhandled pname = %d\n", pname);
28895+ return 0;
28896+ }
28897+}
28898+
28899+static int __glMaterial_size(FILE *err_file, GLenum pname)
28900+{
28901+ switch (pname) {
28902+ case GL_AMBIENT:
28903+ case GL_DIFFUSE:
28904+ case GL_SPECULAR:
28905+ case GL_EMISSION:
28906+ case GL_AMBIENT_AND_DIFFUSE:
28907+ return 4;
28908+ break;
28909+
28910+ case GL_SHININESS:
28911+ return 1;
28912+ break;
28913+
28914+ case GL_COLOR_INDEXES:
28915+ return 3;
28916+ break;
28917+
28918+ default:
28919+ fprintf(err_file, "unhandled pname = %d\n", pname);
28920+ return 0;
28921+ }
28922+}
28923+
28924+static inline int compute_arg_length(FILE *err_file, int func_number,
28925+ int arg_i, arg_t *args)
28926+{
28927+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
28928+ int *args_type = signature->args_type;
28929+
28930+ switch (func_number) {
28931+ case glProgramNamedParameter4fNV_func:
28932+ case glProgramNamedParameter4dNV_func:
28933+ case glProgramNamedParameter4fvNV_func:
28934+ case glProgramNamedParameter4dvNV_func:
28935+ case glGetProgramNamedParameterfvNV_func:
28936+ case glGetProgramNamedParameterdvNV_func:
28937+ if (arg_i == 2)
28938+ return 1 * args[arg_i - 1] *
28939+ tab_args_type_length[args_type[arg_i]];
28940+ break;
28941+
28942+ case glProgramStringARB_func:
28943+ case glLoadProgramNV_func:
28944+ case glGenProgramsNV_func:
28945+ case glDeleteProgramsNV_func:
28946+ case glGenProgramsARB_func:
28947+ case glDeleteProgramsARB_func:
28948+ case glRequestResidentProgramsNV_func:
28949+ case glDrawBuffers_func:
28950+ case glDrawBuffersARB_func:
28951+ case glDrawBuffersATI_func:
28952+ case glDeleteBuffers_func:
28953+ case glDeleteBuffersARB_func:
28954+ case glDeleteTextures_func:
28955+ case glDeleteTexturesEXT_func:
28956+ case glGenFramebuffersEXT_func:
28957+ case glDeleteFramebuffersEXT_func:
28958+ case glGenRenderbuffersEXT_func:
28959+ case glDeleteRenderbuffersEXT_func:
28960+ case glGenQueries_func:
28961+ case glGenQueriesARB_func:
28962+ case glDeleteQueries_func:
28963+ case glDeleteQueriesARB_func:
28964+ case glGenOcclusionQueriesNV_func:
28965+ case glDeleteOcclusionQueriesNV_func:
28966+ case glGenFencesNV_func:
28967+ case glDeleteFencesNV_func:
28968+ case glUniform1fv_func:
28969+ case glUniform1iv_func:
28970+ case glUniform1fvARB_func:
28971+ case glUniform1ivARB_func:
28972+ case glUniform1uivEXT_func:
28973+ case glVertexAttribs1dvNV_func:
28974+ case glVertexAttribs1fvNV_func:
28975+ case glVertexAttribs1svNV_func:
28976+ case glVertexAttribs1hvNV_func:
28977+ case glWeightbvARB_func:
28978+ case glWeightsvARB_func:
28979+ case glWeightivARB_func:
28980+ case glWeightfvARB_func:
28981+ case glWeightdvARB_func:
28982+ case glWeightubvARB_func:
28983+ case glWeightusvARB_func:
28984+ case glWeightuivARB_func:
28985+ case glPixelMapfv_func:
28986+ case glPixelMapuiv_func:
28987+ case glPixelMapusv_func:
28988+ case glProgramBufferParametersfvNV_func:
28989+ case glProgramBufferParametersIivNV_func:
28990+ case glProgramBufferParametersIuivNV_func:
28991+ case glTransformFeedbackAttribsNV_func:
28992+ case glTransformFeedbackVaryingsNV_func:
28993+ if (arg_i == signature->nb_args - 1)
28994+ return 1 * args[arg_i - 1] *
28995+ tab_args_type_length[args_type[arg_i]];
28996+ break;
28997+
28998+ case glUniform2fv_func:
28999+ case glUniform2iv_func:
29000+ case glUniform2fvARB_func:
29001+ case glUniform2ivARB_func:
29002+ case glUniform2uivEXT_func:
29003+ case glVertexAttribs2dvNV_func:
29004+ case glVertexAttribs2fvNV_func:
29005+ case glVertexAttribs2svNV_func:
29006+ case glVertexAttribs2hvNV_func:
29007+ case glDetailTexFuncSGIS_func:
29008+ case glSharpenTexFuncSGIS_func:
29009+ if (arg_i == signature->nb_args - 1)
29010+ return 2 * args[arg_i - 1] *
29011+ tab_args_type_length[args_type[arg_i]];
29012+ break;
29013+
29014+ case glUniform3fv_func:
29015+ case glUniform3iv_func:
29016+ case glUniform3fvARB_func:
29017+ case glUniform3ivARB_func:
29018+ case glUniform3uivEXT_func:
29019+ case glVertexAttribs3dvNV_func:
29020+ case glVertexAttribs3fvNV_func:
29021+ case glVertexAttribs3svNV_func:
29022+ case glVertexAttribs3hvNV_func:
29023+ if (arg_i == signature->nb_args - 1)
29024+ return 3 * args[arg_i - 1] *
29025+ tab_args_type_length[args_type[arg_i]];
29026+ break;
29027+
29028+ case glUniform4fv_func:
29029+ case glUniform4iv_func:
29030+ case glUniform4fvARB_func:
29031+ case glUniform4ivARB_func:
29032+ case glUniform4uivEXT_func:
29033+ case glVertexAttribs4dvNV_func:
29034+ case glVertexAttribs4fvNV_func:
29035+ case glVertexAttribs4svNV_func:
29036+ case glVertexAttribs4hvNV_func:
29037+ case glVertexAttribs4ubvNV_func:
29038+ case glProgramParameters4fvNV_func:
29039+ case glProgramParameters4dvNV_func:
29040+ case glProgramLocalParameters4fvEXT_func:
29041+ case glProgramEnvParameters4fvEXT_func:
29042+ case glProgramLocalParametersI4ivNV_func:
29043+ case glProgramLocalParametersI4uivNV_func:
29044+ case glProgramEnvParametersI4ivNV_func:
29045+ case glProgramEnvParametersI4uivNV_func:
29046+ if (arg_i == signature->nb_args - 1)
29047+ return 4 * args[arg_i - 1] *
29048+ tab_args_type_length[args_type[arg_i]];
29049+ break;
29050+
29051+ case glPrioritizeTextures_func:
29052+ case glPrioritizeTexturesEXT_func:
29053+ case glAreProgramsResidentNV_func:
29054+ case glAreTexturesResident_func:
29055+ case glAreTexturesResidentEXT_func:
29056+ if (arg_i == 1 || arg_i == 2)
29057+ return args[0] * tab_args_type_length[args_type[arg_i]];
29058+ break;
29059+
29060+ case glLightfv_func:
29061+ case glLightiv_func:
29062+ case glGetLightfv_func:
29063+ case glGetLightiv_func:
29064+ case glFragmentLightfvSGIX_func:
29065+ case glFragmentLightivSGIX_func:
29066+ case glGetFragmentLightfvSGIX_func:
29067+ case glGetFragmentLightivSGIX_func:
29068+ if (arg_i == signature->nb_args - 1)
29069+ return __glLight_size(err_file,
29070+ args[arg_i -
29071+ 1]) *
29072+ tab_args_type_length[args_type[arg_i]];
29073+ break;
29074+
29075+ case glLightModelfv_func:
29076+ case glLightModeliv_func:
29077+ if (arg_i == signature->nb_args - 1)
29078+ return ((args[arg_i - 1] ==
29079+ GL_LIGHT_MODEL_AMBIENT) ? 4 : 1) *
29080+ tab_args_type_length[args_type[arg_i]];
29081+ break;
29082+
29083+ case glFragmentLightModelfvSGIX_func:
29084+ case glFragmentLightModelivSGIX_func:
29085+ if (arg_i == signature->nb_args - 1)
29086+ return ((args[arg_i - 1] ==
29087+ GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX) ? 4 : 1) *
29088+ tab_args_type_length[args_type[arg_i]];
29089+ break;
29090+
29091+ case glMaterialfv_func:
29092+ case glMaterialiv_func:
29093+ case glGetMaterialfv_func:
29094+ case glGetMaterialiv_func:
29095+ case glFragmentMaterialfvSGIX_func:
29096+ case glFragmentMaterialivSGIX_func:
29097+ case glGetFragmentMaterialfvSGIX_func:
29098+ case glGetFragmentMaterialivSGIX_func:
29099+ if (arg_i == signature->nb_args - 1)
29100+ return __glMaterial_size(err_file,
29101+ args[arg_i -
29102+ 1]) *
29103+ tab_args_type_length[args_type[arg_i]];
29104+ break;
29105+
29106+ case glTexParameterfv_func:
29107+ case glTexParameteriv_func:
29108+ case glGetTexParameterfv_func:
29109+ case glGetTexParameteriv_func:
29110+ case glTexParameterIivEXT_func:
29111+ case glTexParameterIuivEXT_func:
29112+ case glGetTexParameterIivEXT_func:
29113+ case glGetTexParameterIuivEXT_func:
29114+ if (arg_i == signature->nb_args - 1)
29115+ return __glTexParameter_size(err_file,
29116+ args[arg_i -
29117+ 1]) *
29118+ tab_args_type_length[args_type[arg_i]];
29119+ break;
29120+
29121+ case glFogiv_func:
29122+ case glFogfv_func:
29123+ if (arg_i == signature->nb_args - 1)
29124+ return ((args[arg_i - 1] ==
29125+ GL_FOG_COLOR) ? 4 : 1) *
29126+ tab_args_type_length[args_type[arg_i]];
29127+ break;
29128+
29129+ case glTexGendv_func:
29130+ case glTexGenfv_func:
29131+ case glTexGeniv_func:
29132+ case glGetTexGendv_func:
29133+ case glGetTexGenfv_func:
29134+ case glGetTexGeniv_func:
29135+ if (arg_i == signature->nb_args - 1)
29136+ return ((args[arg_i - 1] ==
29137+ GL_TEXTURE_GEN_MODE) ? 1 : 4) *
29138+ tab_args_type_length[args_type[arg_i]];
29139+ break;
29140+
29141+ case glTexEnvfv_func:
29142+ case glTexEnviv_func:
29143+ case glGetTexEnvfv_func:
29144+ case glGetTexEnviv_func:
29145+ if (arg_i == signature->nb_args - 1)
29146+ return ((args[arg_i - 1] ==
29147+ GL_TEXTURE_ENV_MODE) ? 1 : 4) *
29148+ tab_args_type_length[args_type[arg_i]];
29149+ break;
29150+
29151+ case glConvolutionParameterfv_func:
29152+ case glConvolutionParameteriv_func:
29153+ case glGetConvolutionParameterfv_func:
29154+ case glGetConvolutionParameteriv_func:
29155+ case glConvolutionParameterfvEXT_func:
29156+ case glConvolutionParameterivEXT_func:
29157+ case glGetConvolutionParameterfvEXT_func:
29158+ case glGetConvolutionParameterivEXT_func:
29159+ if (arg_i == signature->nb_args - 1)
29160+ return ((args[arg_i - 1] == GL_CONVOLUTION_BORDER_COLOR ||
29161+ args[arg_i - 1] == GL_CONVOLUTION_FILTER_SCALE ||
29162+ args[arg_i - 1] ==
29163+ GL_CONVOLUTION_FILTER_BIAS) ? 4 : 1) *
29164+ tab_args_type_length[args_type[arg_i]];
29165+ break;
29166+
29167+ case glGetVertexAttribfvARB_func:
29168+ case glGetVertexAttribfvNV_func:
29169+ case glGetVertexAttribfv_func:
29170+ case glGetVertexAttribdvARB_func:
29171+ case glGetVertexAttribdvNV_func:
29172+ case glGetVertexAttribdv_func:
29173+ case glGetVertexAttribivARB_func:
29174+ case glGetVertexAttribivNV_func:
29175+ case glGetVertexAttribiv_func:
29176+ case glGetVertexAttribIivEXT_func:
29177+ case glGetVertexAttribIuivEXT_func:
29178+ if (arg_i == signature->nb_args - 1)
29179+ return ((args[arg_i - 1] ==
29180+ GL_CURRENT_VERTEX_ATTRIB_ARB) ? 4 : 1) *
29181+ tab_args_type_length[args_type[arg_i]];
29182+ break;
29183+
29184+
29185+ case glPointParameterfv_func:
29186+ case glPointParameterfvEXT_func:
29187+ case glPointParameterfvARB_func:
29188+ case glPointParameterfvSGIS_func:
29189+ case glPointParameteriv_func:
29190+ case glPointParameterivEXT_func:
29191+ if (arg_i == signature->nb_args - 1)
29192+ return ((args[arg_i - 1] ==
29193+ GL_POINT_DISTANCE_ATTENUATION) ? 3 : 1) *
29194+ tab_args_type_length[args_type[arg_i]];
29195+ break;
29196+
29197+ case glUniformMatrix2fv_func:
29198+ case glUniformMatrix2fvARB_func:
29199+ if (arg_i == signature->nb_args - 1)
29200+ return 2 * 2 * args[1] * tab_args_type_length[args_type[arg_i]];
29201+ break;
29202+
29203+ case glUniformMatrix3fv_func:
29204+ case glUniformMatrix3fvARB_func:
29205+ if (arg_i == signature->nb_args - 1)
29206+ return 3 * 3 * args[1] * tab_args_type_length[args_type[arg_i]];
29207+ break;
29208+
29209+ case glUniformMatrix4fv_func:
29210+ case glUniformMatrix4fvARB_func:
29211+ if (arg_i == signature->nb_args - 1)
29212+ return 4 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
29213+ break;
29214+
29215+ case glUniformMatrix2x3fv_func:
29216+ case glUniformMatrix3x2fv_func:
29217+ if (arg_i == signature->nb_args - 1)
29218+ return 2 * 3 * args[1] * tab_args_type_length[args_type[arg_i]];
29219+ break;
29220+
29221+ case glUniformMatrix2x4fv_func:
29222+ case glUniformMatrix4x2fv_func:
29223+ if (arg_i == signature->nb_args - 1)
29224+ return 2 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
29225+ break;
29226+
29227+ case glUniformMatrix3x4fv_func:
29228+ case glUniformMatrix4x3fv_func:
29229+ if (arg_i == signature->nb_args - 1)
29230+ return 3 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
29231+ break;
29232+
29233+ case glSpriteParameterivSGIX_func:
29234+ case glSpriteParameterfvSGIX_func:
29235+ if (arg_i == signature->nb_args - 1)
29236+ return ((args[arg_i - 1] ==
29237+ GL_SPRITE_MODE_SGIX) ? 1 : 3) *
29238+ tab_args_type_length[args_type[arg_i]];
29239+ break;
29240+
29241+ default:
29242+ break;
29243+ }
29244+
29245+ fprintf(err_file,
29246+ "invalid combination for compute_arg_length : func_number=%d, arg_i=%d\n",
29247+ func_number, arg_i);
29248+ return 0;
29249+}
29250+
29251+#define IS_NULL_POINTER_OK_FOR_FUNC(func_number) \
29252+ (func_number == glBitmap_func || \
29253+ func_number == _send_cursor_func || \
29254+ func_number == glTexImage1D_func || \
29255+ func_number == glTexImage2D_func || \
29256+ func_number == glTexImage3D_func || \
29257+ func_number == glBufferDataARB_func || \
29258+ func_number == glNewObjectBufferATI_func)
29259+
29260+#ifdef __amd64__
29261+#define _init_func _init64_func
29262+#else
29263+#ifdef __i386__
29264+#define _init_func _init32_func
29265+#else
29266+#error Unsupported ABI
29267+#endif
29268+#endif
29269Index: git/target-i386/opengl_player.c
29270===================================================================
29271--- /dev/null 1970-01-01 00:00:00.000000000 +0000
29272+++ git/target-i386/opengl_player.c 2009-05-23 11:22:17.000000000 +0100
29273@@ -0,0 +1,1461 @@
29274+/*
29275+ * Plays a sequence of OpenGL calls recorded either under qemu or with opengl_server
29276+ *
29277+ * Copyright (c) 2007 Even Rouault
29278+ *
29279+ * Permission is hereby granted, free of charge, to any person obtaining a copy
29280+ * of this software and associated documentation files (the "Software"), to deal
29281+ * in the Software without restriction, including without limitation the rights
29282+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
29283+ * copies of the Software, and to permit persons to whom the Software is
29284+ * furnished to do so, subject to the following conditions:
29285+ *
29286+ * The above copyright notice and this permission notice shall be included in
29287+ * all copies or substantial portions of the Software.
29288+ *
29289+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
29290+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29291+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
29292+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29293+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29294+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
29295+ * THE SOFTWARE.
29296+ */
29297+
29298+/* gcc -O2 -g -Wall opengl_player.c opengl_exec.c -o opengl_player -I../i386-softmmu -I. -I.. -lGL */
29299+
29300+#include <stdlib.h>
29301+#include <stdio.h>
29302+#include <string.h>
29303+#include <assert.h>
29304+#include <unistd.h>
29305+#include <sys/time.h>
29306+#include <math.h>
29307+
29308+#include <GL/gl.h>
29309+#include <X11/Xlib.h>
29310+
29311+// TODO
29312+typedef long unsigned int target_phys_addr_t;
29313+
29314+#include "opengl_func.h"
29315+#include "opengl_utils.h"
29316+
29317+//#include "ffmpeg/avcodec.h"
29318+
29319+extern void init_process_tab(void);
29320+extern int do_function_call(int, arg_t *, char *);
29321+
29322+void do_disconnect_current(void);
29323+void do_context_switch(Display *dpy, pid_t pid, int call);
29324+
29325+typedef struct {
29326+ int n_used;
29327+ unsigned int crc;
29328+ int size;
29329+ long long last_use;
29330+} RecordBufferedArray;
29331+
29332+typedef struct {
29333+ int size;
29334+ long file_offset;
29335+} ReplayBufferedArray;
29336+
29337+#define N_BUFFERED_ARRAYS 1024
29338+RecordBufferedArray recordBufferedArrays[N_BUFFERED_ARRAYS];
29339+
29340+#define INSTR_WINDOW_SIZE 65536
29341+short instrWindow[INSTR_WINDOW_SIZE];
29342+int instrWindowCount = 0;
29343+int instrWindowPtr = 0;
29344+int instrWindowBeginPtr = 0;
29345+
29346+#include "ghash.c"
29347+
29348+#define PRIME 131
29349+
29350+typedef struct {
29351+ int iFirstOccur;
29352+ int nbOccur;
29353+ int hash;
29354+} SeqDesc;
29355+
29356+typedef struct {
29357+ int hash;
29358+ int offset;
29359+} HashElt;
29360+
29361+int sort_hash_N;
29362+short *sort_hash_tab;
29363+int count_compar;
29364+int collision_detected;
29365+
29366+static int sort_hash(const void *ptrA, const void *ptrB)
29367+{
29368+ const HashElt *a = (const HashElt *) ptrA;
29369+ const HashElt *b = (const HashElt *) ptrB;
29370+
29371+ count_compar++;
29372+ if (a->hash == b->hash) {
29373+ int j;
29374+
29375+ for (j = 0; j < sort_hash_N; j++) {
29376+ if (sort_hash_tab[a->offset + j] != sort_hash_tab[b->offset + j]) {
29377+ collision_detected = 1;
29378+ // fprintf(stderr, "collision de hash !\n");
29379+ return sort_hash_tab[a->offset + j] <
29380+ sort_hash_tab[b->offset + j] ? -1 : 1;
29381+ }
29382+ }
29383+ return a->offset - b->offset;
29384+ } else if (a->hash < b->hash)
29385+ return -1;
29386+ else
29387+ return 1;
29388+}
29389+
29390+static int sort_seq_desc_by_occur(const void *ptrA, const void *ptrB)
29391+{
29392+ const SeqDesc *a = (const SeqDesc *) ptrA;
29393+ const SeqDesc *b = (const SeqDesc *) ptrB;
29394+
29395+ return b->nbOccur - a->nbOccur;
29396+}
29397+
29398+static int sort_seq_desc_by_offset(const void *ptrA, const void *ptrB)
29399+{
29400+ const SeqDesc *a = (const SeqDesc *) ptrA;
29401+ const SeqDesc *b = (const SeqDesc *) ptrB;
29402+
29403+ return a->iFirstOccur - b->iFirstOccur;
29404+}
29405+
29406+void find_repeated_seq(short *tab, int iStart, int length)
29407+{
29408+ // SimpleHashTable* tableHash = simple_hash_table_new(free);
29409+ int N = 10;
29410+ int i;
29411+ int hash = 0;
29412+ int primeN = 1;
29413+ HashElt *tabHash = malloc(sizeof(HashElt) * (length - N + 1));
29414+
29415+ short *new_tab = malloc(sizeof(short) * length);
29416+ memcpy(&new_tab[0], &tab[iStart], sizeof(short) * (length - iStart));
29417+ memcpy(&new_tab[length - iStart], &tab[0], sizeof(short) * iStart);
29418+ tab = new_tab;
29419+
29420+ sort_hash_N = N;
29421+ sort_hash_tab = tab;
29422+
29423+ fprintf(stderr, "(start) iStart = %d\n", iStart);
29424+ for (i = 0; i < N; i++) {
29425+ primeN *= PRIME;
29426+ }
29427+ for (i = 0; i < length; i++) {
29428+ hash = hash * PRIME + tab[i];
29429+ if (i >= N) {
29430+ hash -= tab[i - N] * primeN;
29431+ }
29432+ if (i >= N - 1) {
29433+ tabHash[i - (N - 1)].offset = i - (N - 1);
29434+ tabHash[i - (N - 1)].hash =
29435+ /* (i == 100) ? tabHash[0].hash : */ hash;
29436+#if 0
29437+ void **p_n_occurences =
29438+ simple_hash_table_lookup_pointer(tableHash, hash);
29439+ if (p_n_occurences == NULL) {
29440+ SeqDesc *seqDesc = malloc(sizeof(SeqDesc));
29441+
29442+ seqDesc->iFirstOccur = i - (N - 1);
29443+ seqDesc->nbOccur = 1;
29444+ simple_hash_table_insert(tableHash, hash, seqDesc);
29445+ } else {
29446+ SeqDesc *seqDesc = (SeqDesc *) (*p_n_occurences);
29447+ int j;
29448+
29449+ for (j = 0; j < N; j++) {
29450+ if (tab[(iStart + seqDesc->iFirstOccur + j) % length] !=
29451+ tab[(iStart + i - (N - 1) + j) % length])
29452+ break;
29453+ }
29454+ if (j != N)
29455+ fprintf(stderr, "arg\n");
29456+ seqDesc->nbOccur++;
29457+ // fprintf(stderr, "iStart = %d, i = %d, iFirstOccur = %d,
29458+ // nbOccur = %d\n", iStart, i, seqDesc->iFirstOccur,
29459+ // seqDesc->nbOccur);
29460+ }
29461+#endif
29462+ }
29463+ }
29464+ collision_detected = 0;
29465+ count_compar = 0;
29466+ qsort(tabHash, length - N + 1, sizeof(HashElt), sort_hash);
29467+ if (!collision_detected) {
29468+ SeqDesc *tabSeqDesc = (SeqDesc *) malloc(sizeof(SeqDesc) * length);
29469+ int nbSeqDesc = 0;
29470+ int lastI = 0;
29471+ int prevHash = tabHash[0].hash;
29472+
29473+ for (i = 1; i < length - N + 1; i++) {
29474+ if (tabHash[i].hash != prevHash) {
29475+ tabSeqDesc[nbSeqDesc].iFirstOccur = tabHash[lastI].offset;
29476+ tabSeqDesc[nbSeqDesc].nbOccur = i - lastI;
29477+ tabSeqDesc[nbSeqDesc].hash = prevHash;
29478+ nbSeqDesc++;
29479+ lastI = i;
29480+ prevHash = tabHash[i].hash;
29481+ }
29482+ }
29483+ tabSeqDesc[nbSeqDesc].iFirstOccur = tabHash[lastI].offset;
29484+ tabSeqDesc[nbSeqDesc].nbOccur = i - lastI;
29485+ nbSeqDesc++;
29486+ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc), sort_seq_desc_by_occur);
29487+ for (i = 0; i < nbSeqDesc; i++) {
29488+ if (tabSeqDesc[i].nbOccur < 10)
29489+ break;
29490+ // fprintf(stderr, "%d %d\n", tabSeqDesc[i].iFirstOccur,
29491+ // tabSeqDesc[i].nbOccur);
29492+ }
29493+ nbSeqDesc = i;
29494+ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc),
29495+ sort_seq_desc_by_offset);
29496+ lastI = tabSeqDesc[0].iFirstOccur;
29497+ int maxI = 0;
29498+ int j = 0;
29499+
29500+ for (i = 1; i < nbSeqDesc; i++) {
29501+ if (tabSeqDesc[i].iFirstOccur - lastI <= N) {
29502+ if (tabSeqDesc[i].nbOccur > tabSeqDesc[maxI].nbOccur) {
29503+ maxI = i;
29504+ }
29505+ } else {
29506+ tabSeqDesc[j].iFirstOccur = tabSeqDesc[maxI].iFirstOccur;
29507+ tabSeqDesc[j].nbOccur = tabSeqDesc[maxI].nbOccur;
29508+ j++;
29509+#define MAX(a,b) (((a)>(b)) ? (a) : (b))
29510+ lastI = tabSeqDesc[maxI].iFirstOccur;
29511+ while (i < nbSeqDesc &&
29512+ tabSeqDesc[i].iFirstOccur - lastI <= N)
29513+ i++;
29514+ if (i == nbSeqDesc)
29515+ break;
29516+ maxI = i;
29517+ }
29518+ }
29519+ nbSeqDesc = j;
29520+ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc), sort_seq_desc_by_occur);
29521+ for (i = 0; i < nbSeqDesc; i++) {
29522+ fprintf(stderr, "offset=%d occurNb=%d hash=%d:",
29523+ tabSeqDesc[i].iFirstOccur, tabSeqDesc[i].nbOccur,
29524+ tabSeqDesc[i].hash);
29525+ for (j = 0; j < N; j++)
29526+ fprintf(stderr, "%d ", tab[tabSeqDesc[i].iFirstOccur + j]);
29527+ fprintf(stderr, "\n");
29528+ }
29529+ free(tabSeqDesc);
29530+ } else {
29531+ fprintf(stderr, "collision de hash !\n");
29532+ }
29533+
29534+ fprintf(stderr, "(end) iStart = %d (count_compar = %d)\n", iStart,
29535+ count_compar);
29536+ // simple_hash_table_foreach(tableHash,
29537+ free(tabHash);
29538+ free(tab);
29539+#if 0
29540+ simple_hash_table_destroy(tableHash);
29541+#endif
29542+#if 0
29543+ int i, j, k;
29544+
29545+ for (i = 0; i < length; i++) {
29546+ int nMaxContiguous = 0;
29547+ int jMax = 0;
29548+
29549+ for (j = 0; j < length; j++) {
29550+ int nContiguous = 0;
29551+
29552+ for (k = 0; k < j - i; k++) {
29553+ if (tab[(iStart + i + k) % length] ==
29554+ tab[(iStart + i + j + k) % length]) {
29555+ nContiguous++;
29556+ } else
29557+ break;
29558+ }
29559+ if (nContiguous >= nMaxContiguous) {
29560+ nMaxContiguous = nContiguous;
29561+ jMax = j;
29562+ }
29563+ }
29564+ fprintf(stderr, "iStart = %d, i = %d, j = %d, nContiguous = %d\n",
29565+ iStart, i, i + jMax, nMaxContiguous);
29566+ }
29567+#endif
29568+}
29569+
29570+#define MAX_SERVER_STATE_STACK_SIZE 16
29571+
29572+typedef struct {
29573+ GLbitfield mask;
29574+ int matrixMode;
29575+ int lastMatrixOp;
29576+} ServerState;
29577+
29578+typedef struct {
29579+ ServerState stackAttrib[MAX_SERVER_STATE_STACK_SIZE];
29580+ int stackAttribPtr;
29581+ int matrixMode;
29582+ int lastMatrixOp;
29583+} GLState;
29584+
29585+#define NB_STATES 100
29586+GLState states[NB_STATES];
29587+
29588+void usage()
29589+{
29590+ printf("Usage : opengl_player [OPTION] filename\n\n");
29591+ printf
29592+ ("filename is the file where to read the OpenGL flow ('/tmp/debug_gl.bin' by default)\n");
29593+ printf("'-' is supported and stands for standard input\n\n");
29594+ printf("The following options are available :\n");
29595+ printf
29596+ ("--debug : output debugging trace on stderr\n");
29597+ printf("--disable-real-time-play-back : play as fast as possible\n");
29598+ printf
29599+ ("--show-hard-disk-bandwidth : displays regularly the data bandwidth\n");
29600+ printf("--h or --help : display this help\n");
29601+}
29602+
29603+int main(int argc, char *argv[])
29604+{
29605+ static int args_size[50];
29606+ int i;
29607+ int visualid_fbconfig_read = -1;
29608+ int visualid_fbconfig_real = 0;
29609+ char *filename = "/tmp/debug_gl.bin";
29610+ int slowdown = 0;
29611+ int debug = 0;
29612+ char *ret_string;
29613+ arg_t args[50];
29614+ struct timeval start_time, last_time, current_time;
29615+ int noplay = 0;
29616+ int count_last_time = 0, count_current = 0;
29617+ int refresh_rate = 500;
29618+ int disable_real_time_play_back = 0;
29619+ int show_hard_disk_bandwith = 0;
29620+ int last_offset = 0;
29621+ int resize = 0;
29622+ int window_width = 0, window_height = 0;
29623+ int orig_window_width = 0;
29624+ int show_offset = 0;
29625+ int show_diff_offset = 0;
29626+ int last_cmd_offset = 0;
29627+ FILE *compressed_file = NULL;
29628+ int sizeBufferedArraysPlay = 0;
29629+ ReplayBufferedArray *replayBufferedArrays = NULL;
29630+ int currentState = 0;
29631+
29632+ memset(recordBufferedArrays, 0, sizeof(recordBufferedArrays));
29633+ memset(states, 0, sizeof(states));
29634+ for (i = 0; i < NB_STATES; i++) {
29635+ states[i].matrixMode = GL_MODELVIEW;
29636+ states[i].lastMatrixOp = -1;
29637+ }
29638+
29639+ /* avcodec_init(); AVCodec* avCodec =
29640+ * avcodec_find_encoder(CODEC_ID_MPEG2VIDEO); AVCodecContext*
29641+ * avCodecContext = avcodec_alloc_context(); */
29642+
29643+ for (i = 1; i < argc; i++) {
29644+ if (argv[i][0] == '-' && argv[i][1] == '-')
29645+ argv[i] = argv[i] + 1;
29646+
29647+ if (strncmp(argv[i], "-slowdown=", strlen("-slowdown=")) == 0) {
29648+ slowdown = atoi(argv[i] + strlen("-slowdown="));
29649+ } else if (strcmp(argv[i], "-noplay") == 0) {
29650+ noplay = 1;
29651+ } else if (strcmp(argv[i], "-debug") == 0) {
29652+ debug = 1;
29653+ } else if (strcmp(argv[i], "-disable-real-time-play-back") == 0) {
29654+ disable_real_time_play_back = 1;
29655+ } else if (strcmp(argv[i], "-show-hard-disk-bandwidth") == 0) {
29656+ show_hard_disk_bandwith = 1;
29657+ } else if (strcmp(argv[i], "-show-offset") == 0) {
29658+ show_offset = 1;
29659+ } else
29660+ if (strncmp
29661+ (argv[i], "-show-diff-offset",
29662+ strlen("-show-diff-offset")) == 0) {
29663+ show_diff_offset = atoi(argv[i] + strlen("-show-diff-offset="));
29664+ } else if (strncmp(argv[i], "-width=", strlen("-width=")) == 0) {
29665+ window_width = atoi(argv[i] + strlen("-width="));
29666+ resize = 1;
29667+ } else if (strncmp(argv[i], "-refreshrate=", strlen("-refreshrate="))
29668+ == 0) {
29669+ refresh_rate = atoi(argv[i] + strlen("-refreshrate="));
29670+ } else
29671+ if (strncmp
29672+ (argv[i], "-output-compressed-filename=",
29673+ strlen("-output-compressed-filename=")) == 0) {
29674+ char *compressed_filename =
29675+ argv[i] + strlen("-output-compressed-filename=");
29676+ compressed_file = fopen(compressed_filename, "wb");
29677+ } else if (strcmp(argv[i], "-") == 0) {
29678+ filename = NULL;
29679+ } else if (strcmp(argv[i], "-h") == 0 ||
29680+ strcmp(argv[i], "-help") == 0) {
29681+ usage();
29682+ return 0;
29683+ } else
29684+ filename = argv[i];
29685+ }
29686+ FILE *f = (filename) ? fopen(filename, "rb") : stdin;
29687+
29688+ if (f == NULL) {
29689+ fprintf(stderr, "cannot open %s\n", filename);
29690+ return 0;
29691+ }
29692+ // FILE* fout = fopen("/tmp/raw", "wb");
29693+
29694+ init_process_tab();
29695+ ret_string = malloc(32768);
29696+
29697+ gettimeofday(&start_time, NULL);
29698+ gettimeofday(&last_time, NULL);
29699+
29700+// void* buffer= NULL;
29701+#define WRITE_UNSIGNED_CHAR(x) do { unsigned char myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
29702+#define WRITE_SHORT(x) do { short myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
29703+#define WRITE_INT(x) do { int myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
29704+#define WRITE_LONGLONG(x) do { long long myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
29705+#define WRITE_FLOAT(x) do { float myvar = (float)x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
29706+#define WRITE_3DOUBLE_AS_3FLOAT(x) do { float myfloats[] = { x[0], x[1], x[2] }; fwrite(myfloats, sizeof(myvar), 1, compressed_file); } while(0)
29707+
29708+ // FILE* fopcodes = fopen("/tmp/opcodes.bin", "wb");
29709+ do_context_switch(XOpenDisplay(NULL), 1, _init32_func);
29710+
29711+ long long instr_count = 0;
29712+
29713+ while (1) {
29714+ short func_number;
29715+ short memorize_array_play = -1;
29716+ short reuse_array_play = -1;
29717+
29718+ begin:
29719+ if (fread(&func_number, sizeof(short), 1, f) == 0)
29720+ break;
29721+ if (func_number == _exit_process_func)
29722+ break;
29723+
29724+ if (func_number == _serialized_calls_func) {
29725+ continue;
29726+ }
29727+ // fwrite(&func_number, sizeof(short), 1, fopcodes);
29728+
29729+ /*
29730+ * instrWindow[instrWindowPtr] = func_number; instrWindowPtr++; if
29731+ * (instrWindowPtr == INSTR_WINDOW_SIZE) instrWindowPtr = 0;
29732+ * instrWindowCount++; if (instrWindowCount >= INSTR_WINDOW_SIZE) {
29733+ * if ((instrWindowCount % (INSTR_WINDOW_SIZE / 2)) == 0)
29734+ * find_repeated_seq(instrWindow, instrWindowBeginPtr,
29735+ * INSTR_WINDOW_SIZE); instrWindowBeginPtr++; if (instrWindowBeginPtr
29736+ * == INSTR_WINDOW_SIZE) instrWindowBeginPtr = 0; } */
29737+
29738+ /* -1 is special code that indicates time synchro */
29739+ if (func_number == timesynchro_func) {
29740+ long long ts_file;
29741+ fread(&ts_file, sizeof(long long), 1, f);
29742+
29743+ if (compressed_file) {
29744+ WRITE_SHORT(timesynchro_func);
29745+ WRITE_LONGLONG(ts_file);
29746+ }
29747+
29748+ if (!disable_real_time_play_back) {
29749+ gettimeofday(&current_time, NULL);
29750+ long long ts_real =
29751+ (current_time.tv_sec -
29752+ start_time.tv_sec) * (long long) 1000000 +
29753+ current_time.tv_usec - start_time.tv_usec;
29754+ // fprintf(stderr, "%d %d\n", (int)ts_real, (int)ts_file);
29755+ if (ts_real < ts_file/* && ts_file - ts_real > 100 * 1000 */) {
29756+ /* we're playing too fast */
29757+ // fprintf(stderr, "waiting %d usec\n", (int)(ts_file -
29758+ // ts_real));
29759+ usleep((int) (ts_file - ts_real));
29760+ }
29761+ }
29762+ continue;
29763+ } else if (func_number == memorize_array_func) {
29764+ fread(&memorize_array_play, sizeof(short), 1, f);
29765+ goto begin;
29766+ } else if (func_number == reuse_array_func) {
29767+ fread(&reuse_array_play, sizeof(short), 1, f);
29768+ goto begin;
29769+ }
29770+
29771+ assert(func_number >= 0);
29772+
29773+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
29774+ int nb_args = signature->nb_args;
29775+ int *args_type = signature->args_type;
29776+
29777+ for (i = 0; i < nb_args; i++) {
29778+ switch (args_type[i]) {
29779+#if 0
29780+ case TYPE_UNSIGNED_CHAR:
29781+ case TYPE_CHAR:
29782+ {
29783+ char c;
29784+
29785+ fread(&c, sizeof(c), 1, f);
29786+ args[i] = c;
29787+ break;
29788+ }
29789+
29790+ case TYPE_UNSIGNED_SHORT:
29791+ case TYPE_SHORT:
29792+ {
29793+ short s;
29794+
29795+ fread(&s, sizeof(s), 1, f);
29796+ args[i] = s;
29797+ break;
29798+ }
29799+
29800+ case TYPE_FLOAT:
29801+ fread(&args[i], sizeof(int), 1, f);
29802+ break;
29803+
29804+#endif
29805+ case TYPE_UNSIGNED_CHAR:
29806+ case TYPE_CHAR:
29807+ case TYPE_UNSIGNED_INT:
29808+ case TYPE_INT:
29809+ case TYPE_UNSIGNED_SHORT:
29810+ case TYPE_SHORT:
29811+ case TYPE_FLOAT:
29812+ {
29813+ int n;
29814+ fread(&n, sizeof(int), 1, f);
29815+ args[i] = n;
29816+ break;
29817+ }
29818+
29819+ case TYPE_NULL_TERMINATED_STRING:
29820+ CASE_IN_UNKNOWN_SIZE_POINTERS:
29821+ fread(&args_size[i], sizeof(int), 1, f);
29822+ if (args_size[i]) {
29823+ args[i] = (long) malloc(args_size[i]);
29824+ fread((void *) args[i], args_size[i], 1, f);
29825+ } else {
29826+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
29827+ fprintf(stderr, "call %s arg %d\n",
29828+ tab_opengl_calls_name[func_number], i);
29829+ }
29830+ args[i] = 0;
29831+ }
29832+ if (reuse_array_play >= 0) {
29833+ long current_pos = ftell(f);
29834+
29835+ args_size[i] =
29836+ replayBufferedArrays[reuse_array_play].size;
29837+ args[i] = (long) malloc(args_size[i]);
29838+ fseek(f,
29839+ replayBufferedArrays[reuse_array_play].file_offset,
29840+ SEEK_SET);
29841+ fread((void *) args[i], args_size[i], 1, f);
29842+ fseek(f, current_pos, SEEK_SET);
29843+ }
29844+ if (memorize_array_play >= 0) {
29845+ assert(memorize_array_play <= sizeBufferedArraysPlay);
29846+ if (memorize_array_play == sizeBufferedArraysPlay) {
29847+ sizeBufferedArraysPlay++;
29848+ replayBufferedArrays =
29849+ realloc(replayBufferedArrays,
29850+ sizeBufferedArraysPlay *
29851+ sizeof(ReplayBufferedArray));
29852+ replayBufferedArrays[sizeBufferedArraysPlay -
29853+ 1].file_offset = 0;
29854+ }
29855+ replayBufferedArrays[memorize_array_play].file_offset =
29856+ ftell(f) - args_size[i];
29857+ replayBufferedArrays[memorize_array_play].size =
29858+ args_size[i];
29859+ }
29860+ break;
29861+
29862+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
29863+ {
29864+ args_size[i] =
29865+ compute_arg_length(stderr, func_number, i, args);
29866+ args[i] =
29867+ (args_size[i]) ? (long) malloc(args_size[i]) : 0;
29868+ fread((void *) args[i], args_size[i], 1, f);
29869+ break;
29870+ }
29871+
29872+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
29873+ {
29874+ args_size[i] =
29875+ compute_arg_length(stderr, func_number, i, args);
29876+ args[i] = (long) malloc(args_size[i]);
29877+ break;
29878+ }
29879+
29880+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
29881+ {
29882+ fread(&args_size[i], sizeof(int), 1, f);
29883+ if (args_size[i]) {
29884+ args[i] = (long) malloc(args_size[i]);
29885+ } else {
29886+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
29887+ fprintf(stderr, "call %s arg %d\n",
29888+ tab_opengl_calls_name[func_number], i);
29889+ }
29890+ args[i] = 0;
29891+ }
29892+ break;
29893+ }
29894+
29895+ CASE_OUT_KNOWN_SIZE_POINTERS:
29896+ {
29897+ args_size[i] = tab_args_type_length[args_type[i]];
29898+ assert(args_size[i]);
29899+ args[i] = (long) malloc(args_size[i]);
29900+ break;
29901+ }
29902+
29903+ case TYPE_DOUBLE:
29904+ CASE_IN_KNOWN_SIZE_POINTERS:
29905+ args_size[i] = tab_args_type_length[args_type[i]];
29906+ args[i] = (long) malloc(args_size[i]);
29907+ fread((void *) args[i], args_size[i], 1, f);
29908+ break;
29909+
29910+ case TYPE_IN_IGNORED_POINTER:
29911+ args[i] = 0;
29912+ break;
29913+
29914+ default:
29915+ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
29916+ tab_opengl_calls_name[func_number], i);
29917+ do_disconnect_current();
29918+ return 0;
29919+ }
29920+ }
29921+ if (debug)
29922+ display_gl_call(stderr, func_number, args, args_size);
29923+
29924+ if (debug && reuse_array_play != -1)
29925+ fprintf(stderr, "reuse_array_play %d\n", reuse_array_play);
29926+ if (debug && memorize_array_play != -1)
29927+ fprintf(stderr, "memorize_array_play %d\n", memorize_array_play);
29928+
29929+ if (compressed_file) {
29930+ int reuse_array = -1;
29931+ int memorize_array = -1;
29932+ void *ptr = NULL;
29933+ int bytes_size = 0;
29934+ int do_default = 1;
29935+
29936+ switch (func_number) {
29937+ case glXMakeCurrent_func:
29938+ {
29939+ currentState = args[2];
29940+ assert(currentState >= 0 && currentState < NB_STATES);
29941+ break;
29942+ }
29943+
29944+ case glMatrixMode_func:
29945+ {
29946+ if (states[currentState].matrixMode == args[0]) {
29947+ do_default = 0;
29948+ } else {
29949+ states[currentState].matrixMode = args[0];
29950+ }
29951+ break;
29952+ }
29953+
29954+ case glLoadIdentity_func:
29955+ case glLoadMatrixd_func:
29956+ case glLoadMatrixf_func:
29957+ case glMultMatrixd_func:
29958+ case glMultMatrixf_func:
29959+ case glOrtho_func:
29960+ case glFrustum_func:
29961+ case glRotated_func:
29962+ case glRotatef_func:
29963+ case glScaled_func:
29964+ case glScalef_func:
29965+ case glTranslated_func:
29966+ case glTranslatef_func:
29967+ case glPushMatrix_func:
29968+ case glPopMatrix_func:
29969+ {
29970+ if (states[currentState].matrixMode == 5890) {
29971+ if (states[currentState].lastMatrixOp ==
29972+ glLoadIdentity_func &&
29973+ func_number == glLoadIdentity_func) {
29974+ do_default = 0;
29975+ }
29976+ states[currentState].lastMatrixOp = func_number;
29977+ }
29978+ break;
29979+ }
29980+
29981+ case glPushAttrib_func:
29982+ {
29983+ if (states[currentState].stackAttribPtr <
29984+ MAX_SERVER_STATE_STACK_SIZE) {
29985+ int mask = args[0];
29986+
29987+ states[currentState].stackAttrib[states[currentState].
29988+ stackAttribPtr].
29989+ mask = mask;
29990+ if (mask & GL_TRANSFORM_BIT) {
29991+ states[currentState].
29992+ stackAttrib[states[currentState].
29993+ stackAttribPtr].matrixMode =
29994+ states[currentState].matrixMode;
29995+ states[currentState].
29996+ stackAttrib[states[currentState].
29997+ stackAttribPtr].lastMatrixOp =
29998+ states[currentState].lastMatrixOp;
29999+ }
30000+ states[currentState].stackAttribPtr++;
30001+ }
30002+ break;
30003+ }
30004+
30005+ case glPopAttrib_func:
30006+ {
30007+ if (states[currentState].stackAttribPtr > 0) {
30008+ --states[currentState].stackAttribPtr;
30009+ if (states[currentState].
30010+ stackAttrib[states[currentState].stackAttribPtr].
30011+ mask & GL_TRANSFORM_BIT) {
30012+ states[currentState].matrixMode =
30013+ states[currentState].
30014+ stackAttrib[states[currentState].
30015+ stackAttribPtr].matrixMode;
30016+ states[currentState].lastMatrixOp =
30017+ states[currentState].
30018+ stackAttrib[states[currentState].
30019+ stackAttribPtr].lastMatrixOp;
30020+ }
30021+ }
30022+ break;
30023+ }
30024+
30025+ case glBufferDataARB_func:
30026+ {
30027+ ptr = (void *) args[2];
30028+ bytes_size = args_size[2];
30029+ break;
30030+ }
30031+
30032+ case glVertexPointer_fake_func:
30033+ case glTexCoordPointer_fake_func:
30034+ case glTexCoordPointer01_fake_func:
30035+ case glDrawElements_func:
30036+ {
30037+ ptr = (void *) args[nb_args - 1];
30038+ bytes_size = args_size[nb_args - 1];
30039+ break;
30040+ }
30041+
30042+ default:
30043+ break;
30044+ }
30045+
30046+ if (ptr) {
30047+ unsigned int crc = calc_checksum(ptr, bytes_size, 0xFFFFFFFF);
30048+ long long minInterest = 0x7FFFFFFFFFFFFFFFLL;
30049+ int iMinUsed = -1;
30050+
30051+ instr_count++;
30052+
30053+ for (i = 0; i < N_BUFFERED_ARRAYS; i++) {
30054+ if (recordBufferedArrays[i].crc == crc) {
30055+ // fprintf(stderr, "reusing %d for crc %d\n", i,
30056+ // crc);
30057+ reuse_array = i;
30058+ // fprintf(stderr, "reuse_array %d\n", i);
30059+ recordBufferedArrays[i].n_used++;
30060+ recordBufferedArrays[i].last_use = instr_count;
30061+ break;
30062+ } else if (recordBufferedArrays[i].n_used == 0) {
30063+ // fprintf(stderr, "memorize_array %d\n", i);
30064+ memorize_array = i;
30065+ recordBufferedArrays[i].n_used = 1;
30066+ recordBufferedArrays[i].crc = crc;
30067+ recordBufferedArrays[i].size = bytes_size;
30068+ recordBufferedArrays[i].last_use = instr_count;
30069+ break;
30070+ } else {
30071+ long long interest =
30072+ N_BUFFERED_ARRAYS *
30073+ recordBufferedArrays[i].n_used / (instr_count -
30074+ recordBufferedArrays
30075+ [i].
30076+ last_use)
30077+ /** recordBufferedArrays[i].size*/ ;
30078+ if (interest < minInterest) {
30079+ iMinUsed = i;
30080+ minInterest = interest;
30081+ }
30082+ }
30083+ }
30084+ static unsigned int *discardedCrcs = NULL;
30085+ static int nDiscardedCrcs = 0;
30086+
30087+ if (i == N_BUFFERED_ARRAYS) {
30088+ int j;
30089+
30090+ for (j = 0; j < nDiscardedCrcs; j++) {
30091+ if (discardedCrcs[j] == crc) {
30092+ fprintf(stderr,
30093+ "%x was discarded before and is asked now...\n",
30094+ crc);
30095+ discardedCrcs[j] =
30096+ recordBufferedArrays[iMinUsed].crc;
30097+ break;
30098+ }
30099+ }
30100+ if (j == nDiscardedCrcs) {
30101+ discardedCrcs =
30102+ realloc(discardedCrcs,
30103+ sizeof(int) * (nDiscardedCrcs + 1));
30104+ discardedCrcs[nDiscardedCrcs++] =
30105+ recordBufferedArrays[iMinUsed].crc;
30106+ }
30107+ fprintf(stderr, "discarding %x\n",
30108+ recordBufferedArrays[iMinUsed].crc);
30109+
30110+ memorize_array = iMinUsed;
30111+ recordBufferedArrays[iMinUsed].n_used = 1;
30112+ recordBufferedArrays[iMinUsed].crc = crc;
30113+ recordBufferedArrays[iMinUsed].size = bytes_size;
30114+ recordBufferedArrays[iMinUsed].last_use = instr_count;
30115+ }
30116+
30117+ if (reuse_array != -1) {
30118+ WRITE_SHORT(reuse_array_func);
30119+ WRITE_SHORT(reuse_array);
30120+ } else if (memorize_array != -1) {
30121+ WRITE_SHORT(memorize_array_func);
30122+ WRITE_SHORT(memorize_array);
30123+ }
30124+ }
30125+
30126+ switch (func_number) {
30127+ case glXChooseVisual_func:
30128+ case glXQueryVersion_func:
30129+ case glXQueryExtension_func:
30130+ case glXGetClientString_func:
30131+ case glXQueryExtensionsString_func:
30132+ case glXQueryServerString_func:
30133+ case glXGetProcAddress_fake_func:
30134+ case glXGetProcAddress_global_fake_func:
30135+ case glXGetConfig_func:
30136+ case glXGetConfig_extended_func:
30137+ case glGetIntegerv_func:
30138+ case glGetFloatv_func:
30139+ case glGetBooleanv_func:
30140+ case glGetDoublev_func:
30141+ case glIsEnabled_func:
30142+ case _glGetError_fake_func:
30143+ case glGetString_func:
30144+ {
30145+ do_default = 0;
30146+ break;
30147+ }
30148+
30149+ case glLoadMatrixd_func:
30150+ {
30151+ int j;
30152+
30153+ WRITE_SHORT(glLoadMatrixf_func);
30154+ double *ptr = (double *) args[0];
30155+
30156+ for (j = 0; j < 16; j++) {
30157+ WRITE_FLOAT(ptr[j]);
30158+ }
30159+ do_default = 0;
30160+ break;
30161+ }
30162+
30163+ case glMultMatrixd_func:
30164+ {
30165+ int j;
30166+
30167+ WRITE_SHORT(glMultMatrixf_func);
30168+ double *ptr = (double *) args[0];
30169+
30170+ for (j = 0; j < 16; j++) {
30171+ WRITE_FLOAT(ptr[j]);
30172+ }
30173+ do_default = 0;
30174+ break;
30175+ }
30176+
30177+ case glTranslated_func:
30178+ {
30179+ WRITE_SHORT(glTranslatef_func);
30180+ WRITE_FLOAT(*(double *) args[0]);
30181+ WRITE_FLOAT(*(double *) args[1]);
30182+ WRITE_FLOAT(*(double *) args[2]);
30183+ do_default = 0;
30184+ break;
30185+ }
30186+
30187+ case glScalef_func:
30188+ {
30189+ if (*(float *) &args[0] == 1 && *(float *) &args[1] == 1
30190+ && *(float *) &args[2] == 1)
30191+ do_default = 0;
30192+ break;
30193+ }
30194+
30195+ case glScaled_func:
30196+ {
30197+ if (!
30198+ (*(double *) args[0] == 1 && *(double *) args[1] == 1
30199+ && *(double *) args[2] == 1)) {
30200+ WRITE_SHORT(glScalef_func);
30201+ WRITE_FLOAT(*(double *) args[0]);
30202+ WRITE_FLOAT(*(double *) args[1]);
30203+ WRITE_FLOAT(*(double *) args[2]);
30204+ }
30205+ do_default = 0;
30206+ break;
30207+ }
30208+
30209+ case glRotated_func:
30210+ {
30211+ WRITE_SHORT(glRotatef_func);
30212+ WRITE_FLOAT(*(double *) args[0]);
30213+ WRITE_FLOAT(*(double *) args[1]);
30214+ WRITE_FLOAT(*(double *) args[2]);
30215+ WRITE_FLOAT(*(double *) args[3]);
30216+ do_default = 0;
30217+ break;
30218+ }
30219+#define IS_SHORT(x) ((x) >= -32768 && (x) < 32768)
30220+
30221+ case glRasterPos2i_func:
30222+ {
30223+ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
30224+ WRITE_SHORT(glRasterPos2s_func);
30225+ WRITE_SHORT(args[0]);
30226+ WRITE_SHORT(args[1]);
30227+ do_default = 0;
30228+ }
30229+ break;
30230+ }
30231+
30232+ case glVertex2i_func:
30233+ {
30234+ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
30235+ WRITE_SHORT(glVertex2s_func);
30236+ WRITE_SHORT(args[0]);
30237+ WRITE_SHORT(args[1]);
30238+ do_default = 0;
30239+ }
30240+ break;
30241+ }
30242+
30243+ case glTexCoord2i_func:
30244+ {
30245+ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
30246+ WRITE_SHORT(glTexCoord2s_func);
30247+ WRITE_SHORT(args[0]);
30248+ WRITE_SHORT(args[1]);
30249+ do_default = 0;
30250+ }
30251+ break;
30252+ }
30253+
30254+ case glTexCoord2fv_func:
30255+ {
30256+ float *ptr = (float *) args[0];
30257+ float u = ptr[0];
30258+ float v = ptr[1];
30259+
30260+ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7) {
30261+ int ui = (int) u;
30262+ int vi = (int) v;
30263+
30264+ if (IS_SHORT(ui) && IS_SHORT(vi)) {
30265+ WRITE_SHORT(glTexCoord2s_func);
30266+ WRITE_SHORT(ui);
30267+ WRITE_SHORT(vi);
30268+ do_default = 0;
30269+ }
30270+ }
30271+ break;
30272+ }
30273+
30274+ case glTexCoord2f_func:
30275+ {
30276+ float u = *(float *) &args[0];
30277+ float v = *(float *) &args[1];
30278+
30279+ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7) {
30280+ int ui = (int) u;
30281+ int vi = (int) v;
30282+
30283+ if (IS_SHORT(ui) && IS_SHORT(vi)) {
30284+ WRITE_SHORT(glTexCoord2s_func);
30285+ WRITE_SHORT(ui);
30286+ WRITE_SHORT(vi);
30287+ do_default = 0;
30288+ }
30289+ }
30290+ break;
30291+ }
30292+
30293+ case glColor3f_func:
30294+ {
30295+ WRITE_SHORT(glColor3ub_func);
30296+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
30297+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
30298+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
30299+ do_default = 0;
30300+ break;
30301+ }
30302+
30303+ case glColor4f_func:
30304+ {
30305+ if (*(float *) &args[3] == 1) {
30306+ WRITE_SHORT(glColor3ub_func);
30307+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
30308+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
30309+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
30310+ } else {
30311+ WRITE_SHORT(glColor4ub_func);
30312+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
30313+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
30314+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
30315+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[3]);
30316+ }
30317+ do_default = 0;
30318+ break;
30319+ }
30320+
30321+ case glColor4fv_func:
30322+ {
30323+ float *ptr = (float *) args[0];
30324+
30325+ if (ptr[3] == 1) {
30326+ WRITE_SHORT(glColor3ub_func);
30327+ WRITE_UNSIGNED_CHAR(255 * ptr[0]);
30328+ WRITE_UNSIGNED_CHAR(255 * ptr[1]);
30329+ WRITE_UNSIGNED_CHAR(255 * ptr[2]);
30330+ } else {
30331+ WRITE_SHORT(glColor4ub_func);
30332+ WRITE_UNSIGNED_CHAR(255 * ptr[0]);
30333+ WRITE_UNSIGNED_CHAR(255 * ptr[1]);
30334+ WRITE_UNSIGNED_CHAR(255 * ptr[2]);
30335+ WRITE_UNSIGNED_CHAR(255 * ptr[3]);
30336+ }
30337+ do_default = 0;
30338+ break;
30339+ }
30340+
30341+ case glColor3d_func:
30342+ {
30343+ WRITE_SHORT(glColor3ub_func);
30344+ WRITE_UNSIGNED_CHAR(255 * *(double *) args[0]);
30345+ WRITE_UNSIGNED_CHAR(255 * *(double *) args[1]);
30346+ WRITE_UNSIGNED_CHAR(255 * *(double *) args[2]);
30347+ do_default = 0;
30348+ break;
30349+ }
30350+
30351+ case glVertex3f_func:
30352+ {
30353+ if (*(float *) &args[2] == 0) {
30354+ WRITE_SHORT(glVertex2f_func);
30355+ WRITE_FLOAT(*(float *) &args[0]);
30356+ WRITE_FLOAT(*(float *) &args[1]);
30357+ do_default = 0;
30358+ }
30359+ break;
30360+ }
30361+
30362+ case glVertex3d_func:
30363+ {
30364+ WRITE_SHORT(glVertex3f_func);
30365+ WRITE_FLOAT(*(double *) args[0]);
30366+ WRITE_FLOAT(*(double *) args[1]);
30367+ WRITE_FLOAT(*(double *) args[2]);
30368+ do_default = 0;
30369+ break;
30370+ }
30371+
30372+ case glNormal3fv_func:
30373+ {
30374+ float *ptr = (float *) args[0];
30375+ float u = ptr[0];
30376+ float v = ptr[1];
30377+ float w = ptr[2];
30378+
30379+ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7
30380+ && fabs(w - (int) w) < 1e-7) {
30381+ int ui = (int) u;
30382+ int vi = (int) v;
30383+ int wi = (int) w;
30384+
30385+ if (IS_SHORT(ui) && IS_SHORT(vi) && IS_SHORT(wi)) {
30386+ WRITE_SHORT(glNormal3sv_func);
30387+ WRITE_SHORT(ui);
30388+ WRITE_SHORT(vi);
30389+ WRITE_SHORT(wi);
30390+ do_default = 0;
30391+ }
30392+ }
30393+ break;
30394+ }
30395+
30396+ case glNormal3d_func:
30397+ {
30398+ WRITE_SHORT(glNormal3f_func);
30399+ WRITE_FLOAT(*(double *) args[0]);
30400+ WRITE_FLOAT(*(double *) args[1]);
30401+ WRITE_FLOAT(*(double *) args[2]);
30402+ do_default = 0;
30403+ break;
30404+ }
30405+
30406+ case glDrawElements_func:
30407+ {
30408+ int mode = args[0];
30409+ int count = args[1];
30410+ int type = args[2];
30411+
30412+ if (type == GL_UNSIGNED_INT) {
30413+ int j;
30414+ unsigned int *ptr = (unsigned int *) args[3];
30415+
30416+ for (j = 0; j < count; j++) {
30417+ if ((ptr[j] >> 16) != 0)
30418+ break;
30419+ }
30420+ if (j == count) {
30421+ WRITE_SHORT(func_number);
30422+ WRITE_INT(mode);
30423+ WRITE_INT(count);
30424+ WRITE_INT(GL_UNSIGNED_SHORT);
30425+ if (reuse_array != -1) {
30426+ WRITE_INT(0);
30427+ } else {
30428+ WRITE_INT(count * sizeof(short));
30429+ for (j = 0; j < count; j++) {
30430+ WRITE_SHORT(ptr[j]);
30431+ }
30432+ }
30433+ do_default = 0;
30434+ } else
30435+ do_default = 1;
30436+ } else if (reuse_array != -1) {
30437+ WRITE_SHORT(func_number);
30438+ WRITE_INT(mode);
30439+ WRITE_INT(count);
30440+ WRITE_INT(type);
30441+ WRITE_INT(0);
30442+ do_default = 0;
30443+ } else
30444+ do_default = 1;
30445+ break;
30446+ }
30447+
30448+ case glBufferDataARB_func:
30449+ {
30450+ if (reuse_array != -1) {
30451+ WRITE_SHORT(glBufferDataARB_func);
30452+ WRITE_INT(args[0]);
30453+ WRITE_INT(args[1]);
30454+ WRITE_INT(0);
30455+ WRITE_INT(args[3]);
30456+ do_default = 0;
30457+ }
30458+ break;
30459+ }
30460+
30461+ case glVertexPointer_fake_func:
30462+ case glTexCoordPointer_fake_func:
30463+ case glTexCoordPointer01_fake_func:
30464+ {
30465+ int offset = 0, index = 0, size, type, stride, bytes_size;
30466+ void *ptr;
30467+ int countarg = 0;
30468+
30469+ if (func_number == glVertexPointer_fake_func ||
30470+ func_number == glTexCoordPointer_fake_func)
30471+ offset = args[countarg++];
30472+ if (func_number == glTexCoordPointer_fake_func)
30473+ index = args[countarg++];
30474+ size = args[countarg++];
30475+ type = args[countarg++];
30476+ stride = args[countarg++];
30477+ bytes_size = args[countarg++];
30478+ ptr = (void *) args[countarg++];
30479+ if (type == GL_DOUBLE) {
30480+ int count;
30481+ int j, k;
30482+
30483+ if (stride == 0)
30484+ stride = size * sizeof(double);
30485+ assert((bytes_size % stride) == 0);
30486+ assert((offset % stride) == 0);
30487+ offset = (offset / stride) * size * sizeof(float);
30488+ count = bytes_size / stride;
30489+ WRITE_SHORT(func_number);
30490+ if (func_number == glVertexPointer_fake_func ||
30491+ func_number == glTexCoordPointer_fake_func)
30492+ WRITE_INT(offset);
30493+ if (func_number == glTexCoordPointer_fake_func)
30494+ WRITE_INT(index);
30495+ WRITE_INT(size);
30496+ WRITE_INT(GL_FLOAT);
30497+ WRITE_INT(0);
30498+ WRITE_INT(count * size * sizeof(float));
30499+ if (reuse_array != -1) {
30500+ WRITE_INT(0);
30501+ } else {
30502+ WRITE_INT(count * size * sizeof(float));
30503+ for (j = 0; j < count; j++) {
30504+ for (k = 0; k < size; k++) {
30505+ WRITE_FLOAT(*(double *)
30506+ (ptr + j * stride +
30507+ k * sizeof(double)));
30508+ }
30509+ }
30510+ }
30511+ do_default = 0;
30512+ } else if (reuse_array != -1) {
30513+ WRITE_SHORT(func_number);
30514+ if (func_number == glVertexPointer_fake_func ||
30515+ func_number == glTexCoordPointer_fake_func)
30516+ WRITE_INT(offset);
30517+ if (func_number == glTexCoordPointer_fake_func)
30518+ WRITE_INT(index);
30519+ WRITE_INT(size);
30520+ WRITE_INT(type);
30521+ WRITE_INT(stride);
30522+ WRITE_INT(bytes_size);
30523+ WRITE_INT(0);
30524+ do_default = 0;
30525+ } else
30526+ do_default = 1;
30527+ break;
30528+ }
30529+
30530+ default:
30531+ break;
30532+ }
30533+
30534+ if (do_default) {
30535+ fwrite(&func_number, sizeof(short), 1, compressed_file);
30536+ for (i = 0; i < nb_args; i++) {
30537+ switch (args_type[i]) {
30538+ case TYPE_UNSIGNED_CHAR:
30539+ case TYPE_CHAR:
30540+ {
30541+ char c = args[i];
30542+
30543+ fwrite(&c, sizeof(c), 1, compressed_file);
30544+ break;
30545+ }
30546+
30547+ case TYPE_UNSIGNED_SHORT:
30548+ case TYPE_SHORT:
30549+ {
30550+ short s = args[i];
30551+
30552+ fwrite(&s, sizeof(s), 1, compressed_file);
30553+ break;
30554+ }
30555+
30556+ case TYPE_UNSIGNED_INT:
30557+ case TYPE_INT:
30558+ case TYPE_FLOAT:{
30559+ int n = args[i];
30560+ fwrite(&n, sizeof(int), 1, compressed_file);
30561+ break;
30562+ }
30563+
30564+ case TYPE_NULL_TERMINATED_STRING:
30565+ CASE_IN_UNKNOWN_SIZE_POINTERS:
30566+ fwrite(&args_size[i], sizeof(int), 1,
30567+ compressed_file);
30568+ if (args_size[i]) {
30569+ fwrite((void *) args[i], args_size[i], 1,
30570+ compressed_file);
30571+ }
30572+ break;
30573+
30574+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
30575+ {
30576+ fwrite(&args_size[i], sizeof(int), 1,
30577+ compressed_file);
30578+ break;
30579+ }
30580+
30581+ CASE_OUT_KNOWN_SIZE_POINTERS:
30582+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
30583+ {
30584+ break;
30585+ }
30586+
30587+ case TYPE_DOUBLE:
30588+ CASE_IN_KNOWN_SIZE_POINTERS:
30589+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
30590+ fwrite((void *) args[i], args_size[i], 1,
30591+ compressed_file);
30592+ break;
30593+
30594+ case TYPE_IN_IGNORED_POINTER:
30595+ break;
30596+
30597+ default:
30598+ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
30599+ tab_opengl_calls_name[func_number], i);
30600+ do_disconnect_current();
30601+ return 0;
30602+ }
30603+ }
30604+ }
30605+ }
30606+
30607+ int new_offset = ftell(f);
30608+
30609+ if (show_offset ||
30610+ (show_diff_offset &&
30611+ new_offset - last_cmd_offset >= show_diff_offset)) {
30612+ fprintf(stderr, "offset = %d, diff=%d\n", new_offset,
30613+ new_offset - last_cmd_offset);
30614+ }
30615+ last_cmd_offset = new_offset;
30616+
30617+ if (func_number == glXCreateContext_func &&
30618+ args[1] == visualid_fbconfig_read) {
30619+ args[1] = visualid_fbconfig_real;
30620+ }
30621+ if (debug) {
30622+ if (func_number == glBindProgramARB_func) {
30623+ fprintf(stderr, "glBindProgramARB_func(y, x) : x = %d\n",
30624+ (int) args[1]);
30625+ } else if (func_number == glXGetProcAddress_fake_func) {
30626+ fprintf(stderr, "glXGetProcAddress_fake(%s)\n",
30627+ (char *) args[0]);
30628+ }
30629+ }
30630+
30631+ if (debug && func_number == glEnable_func) {
30632+ fprintf(stderr, "enable(0x%x)\n", (int) args[0]);
30633+ } else if (debug && func_number == glDisable_func) {
30634+ fprintf(stderr, "disable(0x%x)\n", (int) args[0]);
30635+ }
30636+
30637+ if (resize) {
30638+ if (func_number == _moveResizeWindow_func) {
30639+ int *params = (int *) args[1];
30640+
30641+ orig_window_width = params[2];
30642+ window_height = params[3] =
30643+ params[3] * window_width / params[2];
30644+ params[2] = window_width;
30645+ // buffer = malloc(4 * window_width * window_height);
30646+ } else if (func_number == glViewport_func ||
30647+ func_number == glScissor_func) {
30648+ args[0] = args[0] * window_width / orig_window_width;
30649+ args[1] = args[1] * window_width / orig_window_width;
30650+ args[2] = args[2] * window_width / orig_window_width;
30651+ args[3] = args[3] * window_width / orig_window_width;
30652+ }
30653+ } else if (func_number == _moveResizeWindow_func) {
30654+ int *params = (int *) args[1];
30655+
30656+ window_width = params[2];
30657+ window_height = params[3];
30658+ // buffer = malloc(4 * window_width * window_height);
30659+ }
30660+
30661+ int ret =
30662+ (noplay) ? 0 : do_function_call(func_number, args, ret_string);
30663+
30664+ if (func_number == glXSwapBuffers_func) {
30665+ /* glReadPixels(0, 0, window_width, window_height, GL_RGBA,
30666+ * GL_UNSIGNED_BYTE, buffer); fwrite(buffer, 4 * window_width *
30667+ * window_height, 1, fout); */
30668+
30669+ int diff_time;
30670+
30671+ count_current++;
30672+ gettimeofday(&current_time, NULL);
30673+ diff_time =
30674+ (current_time.tv_sec - last_time.tv_sec) * 1000 +
30675+ (current_time.tv_usec - last_time.tv_usec) / 1000;
30676+ if (diff_time > refresh_rate) {
30677+ printf("%d frames in %.1f seconds = %.3f FPS\n",
30678+ count_current - count_last_time, diff_time / 1000.,
30679+ (count_current - count_last_time) * 1000. / diff_time);
30680+ if (show_hard_disk_bandwith) {
30681+ int current_offset = ftell(f);
30682+
30683+ printf("bandwidth : %.1f MB/s\n",
30684+ (current_offset - last_offset) * 1e-6);
30685+ last_offset = current_offset;
30686+ }
30687+ last_time.tv_sec = current_time.tv_sec;
30688+ last_time.tv_usec = current_time.tv_usec;
30689+ count_last_time = count_current;
30690+ }
30691+ usleep(slowdown * 50000);
30692+ }
30693+ if (debug && func_number == glGenProgramsARB_func && args[0] == 1) {
30694+ fprintf(stderr, "glGenProgramsARB_func(1, &x) : x = %d\n",
30695+ *(int *) args[1]);
30696+ }
30697+
30698+ if (func_number == glXGetVisualFromFBConfig_func) {
30699+ fread(&visualid_fbconfig_read, sizeof(int), 1, f);
30700+ visualid_fbconfig_real = ret;
30701+ }
30702+
30703+ for (i = 0; i < nb_args; i++) {
30704+ switch (args_type[i]) {
30705+ case TYPE_UNSIGNED_INT:
30706+ case TYPE_INT:
30707+ case TYPE_UNSIGNED_CHAR:
30708+ case TYPE_CHAR:
30709+ case TYPE_UNSIGNED_SHORT:
30710+ case TYPE_SHORT:
30711+ case TYPE_FLOAT:
30712+ break;
30713+
30714+ case TYPE_NULL_TERMINATED_STRING:
30715+ CASE_POINTERS:
30716+ case TYPE_DOUBLE:
30717+ if (args[i])
30718+ free((void *) args[i]);
30719+ break;
30720+
30721+ case TYPE_IN_IGNORED_POINTER:
30722+ args[i] = 0;
30723+ break;
30724+
30725+ default:
30726+ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
30727+ tab_opengl_calls_name[func_number], i);
30728+ do_disconnect_current();
30729+ return 0;
30730+ }
30731+ }
30732+ }
30733+ return 0;
30734+}
30735Index: git/target-i386/opengl_server.c
30736===================================================================
30737--- /dev/null 1970-01-01 00:00:00.000000000 +0000
30738+++ git/target-i386/opengl_server.c 2009-05-23 11:22:17.000000000 +0100
30739@@ -0,0 +1,826 @@
30740+/*
30741+ * TCP/IP OpenGL server
30742+ *
30743+ * Copyright (c) 2007 Even Rouault
30744+ *
30745+ * Permission is hereby granted, free of charge, to any person obtaining a copy
30746+ * of this software and associated documentation files (the "Software"), to deal
30747+ * in the Software without restriction, including without limitation the rights
30748+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
30749+ * copies of the Software, and to permit persons to whom the Software is
30750+ * furnished to do so, subject to the following conditions:
30751+ *
30752+ * The above copyright notice and this permission notice shall be included in
30753+ * all copies or substantial portions of the Software.
30754+ *
30755+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30756+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
30757+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
30758+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30759+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30760+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
30761+ * THE SOFTWARE.
30762+ */
30763+
30764+/* gcc -Wall -O2 -g opengl_server.c opengl_exec.c -o opengl_server -I../i386-softmmu -I. -I.. -lGL */
30765+
30766+#include <stdio.h>
30767+#include <errno.h>
30768+#include <stdlib.h>
30769+#include <unistd.h>
30770+#include <string.h>
30771+#include <assert.h>
30772+#include <sys/types.h>
30773+#include <sys/socket.h>
30774+#include <netinet/in.h>
30775+#include <netinet/tcp.h>
30776+#include <netdb.h>
30777+#include <arpa/inet.h>
30778+#include <sys/time.h>
30779+#include <signal.h>
30780+
30781+#include <X11/Xlib.h>
30782+#include <X11/Xutil.h>
30783+
30784+#define PORT 5555
30785+
30786+#define ENABLE_GL_LOG
30787+
30788+#include "opengl_func.h"
30789+#include "opengl_utils.h"
30790+
30791+static int refresh_rate = 1000;
30792+static int must_save = 0;
30793+static int timestamp = 1; /* only valid if must_save == 1. include timestamps in the save file to enable real-time playback */
30794+
30795+extern int display_function_call;
30796+extern void init_process_tab(void);
30797+extern int do_function_call(Display *, int, int, arg_t *, char *);
30798+extern void opengl_exec_set_local_connection(void);
30799+extern void opengl_exec_set_parent_window(Display *_dpy, Window _parent_window);
30800+
30801+#ifdef ENABLE_GL_LOG
30802+static FILE* f = NULL;
30803+
30804+static char* filename = "/tmp/debug_gl.bin";
30805+
30806+#define write_gl_debug_init() do { if (f == NULL) f = fopen(filename, "wb"); } while(0)
30807+
30808+static void inline write_gl_debug_cmd_char(char my_int)
30809+{
30810+ write_gl_debug_init();
30811+ fwrite(&my_int, sizeof(my_int), 1, f);
30812+}
30813+
30814+static void inline write_gl_debug_cmd_short(short my_int)
30815+{
30816+ write_gl_debug_init();
30817+ fwrite(&my_int, sizeof(my_int), 1, f);
30818+}
30819+
30820+static void inline write_gl_debug_cmd_int(int my_int)
30821+{
30822+ write_gl_debug_init();
30823+ fwrite(&my_int, sizeof(my_int), 1, f);
30824+}
30825+
30826+static void inline write_gl_debug_cmd_longlong(long long my_longlong)
30827+{
30828+ write_gl_debug_init();
30829+ fwrite(&my_longlong, sizeof(my_longlong), 1, f);
30830+}
30831+
30832+static void inline write_gl_debug_cmd_buffer_with_size(int size, void* buffer)
30833+{
30834+ write_gl_debug_init();
30835+ fwrite(&size, sizeof(int), 1, f);
30836+ if (size)
30837+ fwrite(buffer, size, 1, f);
30838+}
30839+
30840+static void inline write_gl_debug_cmd_buffer_without_size(int size, void* buffer)
30841+{
30842+ write_gl_debug_init();
30843+ if (size)
30844+ fwrite(buffer, size, 1, f);
30845+}
30846+
30847+static void inline write_gl_debug_end()
30848+{
30849+ write_gl_debug_init();
30850+ fclose(f);
30851+ f = NULL;
30852+}
30853+
30854+#endif
30855+
30856+static void write_sock_data(int sock, void* data, int len)
30857+{
30858+ if (len && data)
30859+ {
30860+ int offset = 0;
30861+ while(offset < len)
30862+ {
30863+ int nwritten = write(sock, data + offset, len - offset);
30864+ if (nwritten == -1)
30865+ {
30866+ if (errno == EINTR)
30867+ continue;
30868+ perror("write");
30869+ assert(nwritten != -1);
30870+ }
30871+ offset += nwritten;
30872+ }
30873+ }
30874+}
30875+
30876+static void inline write_sock_int(int sock, int my_int)
30877+{
30878+ write_sock_data(sock, &my_int, sizeof(int));
30879+}
30880+
30881+static int total_read = 0;
30882+static void read_sock_data(int sock, void* data, int len)
30883+{
30884+ if (len)
30885+ {
30886+ int offset = 0;
30887+ while(offset < len)
30888+ {
30889+ int nread = read(sock, data + offset, len - offset);
30890+ if (nread == -1)
30891+ {
30892+ if (errno == EINTR)
30893+ continue;
30894+ perror("read");
30895+ assert(nread != -1);
30896+ }
30897+ if (nread == 0)
30898+ {
30899+ fprintf(stderr, "nread = 0\n");
30900+ }
30901+ assert(nread > 0);
30902+ offset += nread;
30903+ total_read += nread;
30904+ }
30905+ }
30906+}
30907+
30908+static int inline read_sock_int(int sock)
30909+{
30910+ int ret;
30911+ read_sock_data(sock, &ret, sizeof(int));
30912+ return ret;
30913+}
30914+
30915+static short inline read_sock_short(int sock)
30916+{
30917+ short ret;
30918+ read_sock_data(sock, &ret, sizeof(short));
30919+ return ret;
30920+}
30921+
30922+
30923+static Display* dpy = NULL;
30924+static int parent_xid = -1;
30925+
30926+
30927+static struct timeval last_time, current_time, time_stamp_start;
30928+static int count_last_time = 0, count_current = 0;
30929+
30930+static struct timeval last_read_time, current_read_time;
30931+
30932+int has_x_error = 0;
30933+
30934+int
30935+read_from_client (int sock)
30936+{
30937+ arg_t args[50];
30938+ int args_size[50];
30939+ char ret_string[32768];
30940+ char command_buffer[65536*16];
30941+
30942+ if (dpy == NULL)
30943+ {
30944+ init_process_tab();
30945+ dpy = XOpenDisplay(NULL);
30946+ if (parent_xid != -1)
30947+ {
30948+ opengl_exec_set_parent_window(dpy, parent_xid);
30949+ }
30950+ }
30951+
30952+ int i;
30953+ int func_number = read_sock_short(sock);
30954+
30955+ Signature* signature = (Signature*)tab_opengl_calls[func_number];
30956+ int ret_type = signature->ret_type;
30957+ int nb_args = signature->nb_args;
30958+ int* args_type = signature->args_type;
30959+ int pid = 0;
30960+
30961+ if (func_number == _serialized_calls_func)
30962+ {
30963+ int command_buffer_size = read_sock_int(sock);
30964+ int commmand_buffer_offset = 0;
30965+ read_sock_data(sock, command_buffer, command_buffer_size);
30966+ /* TODO: must convert if client is different word size */
30967+
30968+#ifdef ENABLE_GL_LOG
30969+ if (must_save) write_gl_debug_cmd_short(_serialized_calls_func);
30970+#endif
30971+
30972+ while(commmand_buffer_offset < command_buffer_size)
30973+ {
30974+ func_number = *(short*)(command_buffer + commmand_buffer_offset);
30975+ if( ! (func_number >= 0 && func_number < GL_N_CALLS) )
30976+ {
30977+ fprintf(stderr, "func_number >= 0 && func_number < GL_N_CALLS failed at "
30978+ "commmand_buffer_offset=%d (command_buffer_size=%d)\n",
30979+ commmand_buffer_offset, command_buffer_size);
30980+ exit(-1);
30981+ }
30982+
30983+#ifdef ENABLE_GL_LOG
30984+ if (must_save) write_gl_debug_cmd_short(func_number);
30985+#endif
30986+ commmand_buffer_offset += sizeof(short);
30987+
30988+
30989+ signature = (Signature*)tab_opengl_calls[func_number];
30990+ ret_type = signature->ret_type;
30991+ assert(ret_type == TYPE_NONE);
30992+ nb_args = signature->nb_args;
30993+ args_type = signature->args_type;
30994+
30995+ for(i=0;i<nb_args;i++)
30996+ {
30997+ switch(args_type[i])
30998+ {
30999+ case TYPE_UNSIGNED_CHAR:
31000+ case TYPE_CHAR:
31001+ {
31002+ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
31003+#ifdef ENABLE_GL_LOG
31004+ if (must_save) write_gl_debug_cmd_char(args[i]);
31005+#endif
31006+ commmand_buffer_offset += sizeof(int);
31007+ break;
31008+ }
31009+
31010+ case TYPE_UNSIGNED_SHORT:
31011+ case TYPE_SHORT:
31012+ {
31013+ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
31014+#ifdef ENABLE_GL_LOG
31015+ if (must_save) write_gl_debug_cmd_short(args[i]);
31016+#endif
31017+ commmand_buffer_offset += sizeof(int);
31018+ break;
31019+ }
31020+
31021+ case TYPE_UNSIGNED_INT:
31022+ case TYPE_INT:
31023+ case TYPE_FLOAT:
31024+ {
31025+ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
31026+#ifdef ENABLE_GL_LOG
31027+ if (must_save) write_gl_debug_cmd_int(args[i]);
31028+#endif
31029+ commmand_buffer_offset += sizeof(int);
31030+ break;
31031+ }
31032+
31033+ case TYPE_NULL_TERMINATED_STRING:
31034+ CASE_IN_UNKNOWN_SIZE_POINTERS:
31035+ {
31036+ args_size[i] = *(int*)(command_buffer + commmand_buffer_offset);
31037+ commmand_buffer_offset += sizeof(int);
31038+
31039+ if (args_size[i] == 0)
31040+ {
31041+ args[i] = 0;
31042+ }
31043+ else
31044+ {
31045+ args[i] = (long)(command_buffer + commmand_buffer_offset);
31046+ }
31047+
31048+ if (args[i] == 0)
31049+ {
31050+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
31051+ {
31052+ fprintf(stderr, "call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31053+ return 0;
31054+ }
31055+ }
31056+#ifdef ENABLE_GL_LOG
31057+ if (must_save) write_gl_debug_cmd_buffer_with_size(args_size[i], (void*)args[i]);
31058+#endif
31059+ commmand_buffer_offset += args_size[i];
31060+
31061+ break;
31062+ }
31063+
31064+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31065+ {
31066+ args_size[i] = compute_arg_length(stderr, func_number, i, args);
31067+ args[i] = (args_size[i]) ? (long)(command_buffer + commmand_buffer_offset) : 0;
31068+#ifdef ENABLE_GL_LOG
31069+ if (must_save) write_gl_debug_cmd_buffer_without_size(args_size[i], (void*)args[i]);
31070+#endif
31071+ commmand_buffer_offset += args_size[i];
31072+ break;
31073+ }
31074+
31075+ CASE_OUT_POINTERS:
31076+ {
31077+ fprintf(stderr, "shouldn't happen TYPE_OUT_xxxx : call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31078+ return 0;
31079+ break;
31080+ }
31081+
31082+ case TYPE_DOUBLE:
31083+ CASE_IN_KNOWN_SIZE_POINTERS:
31084+ args[i] = (long)(command_buffer + commmand_buffer_offset);
31085+ args_size[i] = tab_args_type_length[args_type[i]];
31086+#ifdef ENABLE_GL_LOG
31087+ if (must_save) write_gl_debug_cmd_buffer_without_size(tab_args_type_length[args_type[i]], (void*)args[i]);
31088+#endif
31089+ commmand_buffer_offset += tab_args_type_length[args_type[i]];
31090+ break;
31091+
31092+ case TYPE_IN_IGNORED_POINTER:
31093+ args[i] = 0;
31094+ break;
31095+
31096+ default:
31097+ fprintf(stderr, "shouldn't happen : call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31098+ return 0;
31099+ break;
31100+ }
31101+ }
31102+
31103+ if (display_function_call) display_gl_call(stderr, func_number, args, args_size);
31104+
31105+ do_function_call(dpy, func_number, 1, args, ret_string);
31106+ }
31107+ }
31108+ else
31109+ {
31110+#ifdef ENABLE_GL_LOG
31111+ if (must_save && func_number != _synchronize_func) write_gl_debug_cmd_short(func_number);
31112+#endif
31113+
31114+ for(i=0;i<nb_args;i++)
31115+ {
31116+ switch(args_type[i])
31117+ {
31118+ case TYPE_UNSIGNED_CHAR:
31119+ case TYPE_CHAR:
31120+ args[i] = read_sock_int(sock);
31121+#ifdef ENABLE_GL_LOG
31122+ if (must_save) write_gl_debug_cmd_char(args[i]);
31123+#endif
31124+ break;
31125+
31126+ case TYPE_UNSIGNED_SHORT:
31127+ case TYPE_SHORT:
31128+ args[i] = read_sock_int(sock);
31129+#ifdef ENABLE_GL_LOG
31130+ if (must_save) write_gl_debug_cmd_short(args[i]);
31131+#endif
31132+ break;
31133+
31134+ case TYPE_UNSIGNED_INT:
31135+ case TYPE_INT:
31136+ case TYPE_FLOAT:
31137+ args[i] = read_sock_int(sock);
31138+#ifdef ENABLE_GL_LOG
31139+ if (must_save) write_gl_debug_cmd_int(args[i]);
31140+#endif
31141+ break;
31142+
31143+ case TYPE_NULL_TERMINATED_STRING:
31144+ CASE_IN_UNKNOWN_SIZE_POINTERS:
31145+ {
31146+ args_size[i] = read_sock_int(sock);
31147+ if (args_size[i])
31148+ {
31149+ args[i] = (long)malloc(args_size[i]);
31150+ read_sock_data(sock, (void*)args[i], args_size[i]);
31151+ }
31152+ else
31153+ {
31154+ args[i] = 0;
31155+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
31156+ {
31157+ fprintf(stderr, "call %s arg %d\n", tab_opengl_calls_name[func_number], i);
31158+ return 0;
31159+ }
31160+ }
31161+#ifdef ENABLE_GL_LOG
31162+ if (must_save) write_gl_debug_cmd_buffer_with_size(args_size[i], (void*)args[i]);
31163+#endif
31164+ break;
31165+ }
31166+
31167+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31168+ {
31169+ args_size[i] = compute_arg_length(stderr, func_number, i, args);
31170+ args[i] = (args_size[i]) ? (long)malloc(args_size[i]) : 0;
31171+ read_sock_data(sock, (void*)args[i], args_size[i]);
31172+#ifdef ENABLE_GL_LOG
31173+ if (must_save) write_gl_debug_cmd_buffer_without_size(args_size[i], (void*)args[i]);
31174+#endif
31175+ break;
31176+ }
31177+
31178+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31179+ {
31180+ args_size[i] = compute_arg_length(stderr, func_number, i, args);
31181+ args[i] = (long)malloc(args_size[i]);
31182+ break;
31183+ }
31184+
31185+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
31186+ {
31187+ args_size[i] = read_sock_int(sock);
31188+ if (func_number == glGetProgramLocalParameterdvARB_func)
31189+ {
31190+ fprintf(stderr, "size = %d\n", args_size[i]);
31191+ }
31192+ if (args_size[i])
31193+ {
31194+ args[i] = (long)malloc(args_size[i]);
31195+ }
31196+ else
31197+ {
31198+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
31199+ {
31200+ fprintf(stderr, "call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31201+ return 0;
31202+ };
31203+ args[i] = 0;
31204+ }
31205+ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
31206+#ifdef ENABLE_GL_LOG
31207+ if (must_save) write_gl_debug_cmd_int(args_size[i]);
31208+#endif
31209+ break;
31210+ }
31211+
31212+ CASE_OUT_KNOWN_SIZE_POINTERS:
31213+ {
31214+ args_size[i] = tab_args_type_length[args_type[i]];
31215+ assert(args_size[i]);
31216+ args[i] = (long)malloc(args_size[i]);
31217+ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
31218+ break;
31219+ }
31220+
31221+ case TYPE_DOUBLE:
31222+ CASE_IN_KNOWN_SIZE_POINTERS:
31223+ args_size[i] = tab_args_type_length[args_type[i]];
31224+ args[i] = (long)malloc(args_size[i]);
31225+ read_sock_data(sock, (void*)args[i], args_size[i]);
31226+#ifdef ENABLE_GL_LOG
31227+ if (must_save) write_gl_debug_cmd_buffer_without_size(tab_args_type_length[args_type[i]], (void*)args[i]);
31228+#endif
31229+ break;
31230+
31231+ case TYPE_IN_IGNORED_POINTER:
31232+ args[i] = 0;
31233+ break;
31234+
31235+ default:
31236+ fprintf(stderr, "shouldn't happen : call %s arg %d\n", tab_opengl_calls_name[func_number], i);
31237+ return 0;
31238+ break;
31239+ }
31240+ }
31241+
31242+ if (display_function_call) display_gl_call(stderr, func_number, args, args_size);
31243+
31244+ if (getenv("ALWAYS_FLUSH")) fflush(f);
31245+
31246+ int ret = do_function_call(dpy, func_number, 1, args, ret_string);
31247+#ifdef ENABLE_GL_LOG
31248+ if (must_save && func_number == glXGetVisualFromFBConfig_func)
31249+ {
31250+ write_gl_debug_cmd_int(ret);
31251+ }
31252+#endif
31253+
31254+ for(i=0;i<nb_args;i++)
31255+ {
31256+ switch(args_type[i])
31257+ {
31258+ case TYPE_UNSIGNED_INT:
31259+ case TYPE_INT:
31260+ case TYPE_UNSIGNED_CHAR:
31261+ case TYPE_CHAR:
31262+ case TYPE_UNSIGNED_SHORT:
31263+ case TYPE_SHORT:
31264+ case TYPE_FLOAT:
31265+ break;
31266+
31267+ case TYPE_NULL_TERMINATED_STRING:
31268+ case TYPE_DOUBLE:
31269+ CASE_IN_POINTERS:
31270+ if (args[i]) free((void*)args[i]);
31271+ break;
31272+
31273+ CASE_OUT_POINTERS:
31274+ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
31275+ write_sock_data(sock, (void*)args[i], args_size[i]);
31276+ if (display_function_call)
31277+ {
31278+ if (args_type[i] == TYPE_OUT_1INT)
31279+ {
31280+ fprintf(stderr, "out[%d] : %d\n", i, *(int*)args[i]);
31281+ }
31282+ else if (args_type[i] == TYPE_OUT_1FLOAT)
31283+ {
31284+ fprintf(stderr, "out[%d] : %f\n", i, *(float*)args[i]);
31285+ }
31286+ }
31287+ if (args[i]) free((void*)args[i]);
31288+ break;
31289+
31290+ case TYPE_IN_IGNORED_POINTER:
31291+ args[i] = 0;
31292+ break;
31293+
31294+ default:
31295+ fprintf(stderr, "shouldn't happen : call %s arg %d\n", tab_opengl_calls_name[func_number], i);
31296+ return 0;
31297+ break;
31298+ }
31299+ }
31300+
31301+ if (signature->ret_type == TYPE_CONST_CHAR)
31302+ {
31303+ write_sock_int(sock, strlen(ret_string) + 1);
31304+ write_sock_data(sock, ret_string, strlen(ret_string) + 1);
31305+ }
31306+ else if (signature->ret_type != TYPE_NONE)
31307+ {
31308+ write_sock_int(sock, ret);
31309+ }
31310+
31311+#ifdef ENABLE_GL_LOG
31312+ if (must_save && func_number == _exit_process_func)
31313+ {
31314+ write_gl_debug_end();
31315+ }
31316+#endif
31317+ if (func_number == _exit_process_func)
31318+ {
31319+ return -1;
31320+ }
31321+ else if (func_number == glXSwapBuffers_func)
31322+ {
31323+ int diff_time;
31324+ count_current++;
31325+ gettimeofday(&current_time, NULL);
31326+#ifdef ENABLE_GL_LOG
31327+ if (must_save && timestamp)
31328+ {
31329+ long long ts = (current_time.tv_sec - time_stamp_start.tv_sec) * (long long)1000000 + current_time.tv_usec - time_stamp_start.tv_usec;
31330+ /* -1 is special code that indicates time synchro */
31331+ write_gl_debug_cmd_short(timesynchro_func);
31332+ write_gl_debug_cmd_longlong(ts);
31333+ }
31334+#endif
31335+ diff_time = (current_time.tv_sec - last_time.tv_sec) * 1000 + (current_time.tv_usec - last_time.tv_usec) / 1000;
31336+ if (diff_time > refresh_rate)
31337+ {
31338+#ifdef ENABLE_GL_LOG
31339+ fflush(f);
31340+#endif
31341+ printf("%d frames in %.1f seconds = %.3f FPS\n",
31342+ count_current - count_last_time,
31343+ diff_time / 1000.,
31344+ (count_current - count_last_time) * 1000. / diff_time);
31345+ last_time.tv_sec = current_time.tv_sec;
31346+ last_time.tv_usec = current_time.tv_usec;
31347+ count_last_time = count_current;
31348+ }
31349+ }
31350+ }
31351+ return 0;
31352+}
31353+
31354+int
31355+make_socket (uint16_t port)
31356+{
31357+ int sock;
31358+ struct sockaddr_in name;
31359+
31360+ /* Create the socket. */
31361+ sock = socket (PF_INET, SOCK_STREAM, 0);
31362+ if (sock < 0)
31363+ {
31364+ perror ("socket");
31365+ exit (EXIT_FAILURE);
31366+ }
31367+
31368+ /* Give the socket a name. */
31369+ name.sin_family = AF_INET;
31370+ name.sin_port = htons (port);
31371+ name.sin_addr.s_addr = htonl (INADDR_ANY);
31372+ if (bind (sock, (struct sockaddr *) &name, sizeof (name)) < 0)
31373+ {
31374+ perror ("bind");
31375+ exit (EXIT_FAILURE);
31376+ }
31377+
31378+ return sock;
31379+}
31380+
31381+static int x_error_handler(Display *display,
31382+ XErrorEvent *error)
31383+{
31384+ char buf[64];
31385+ XGetErrorText(display, error->error_code, buf, 63);
31386+ fprintf (stderr, "The program received an X Window System error.\n"
31387+ "This probably reflects a bug in the program.\n"
31388+ "The error was '%s'.\n"
31389+ " (Details: serial %ld error_code %d request_code %d minor_code %d)\n",
31390+ buf,
31391+ error->serial,
31392+ error->error_code,
31393+ error->request_code,
31394+ error->minor_code);
31395+ has_x_error = 1;
31396+ return 0;
31397+}
31398+
31399+void usage()
31400+{
31401+ printf("Usage : opengl_server [OPTION]\n\n");
31402+ printf("The following options are available :\n");
31403+ printf("--port=XXXX : set XXX as the port number for the TCP/IP server (default : 5555)\n");
31404+ printf("--debug : output debugging trace on stderr\n");
31405+ printf("--save : dump the serialialized OpenGL flow in a file (default : /tmp/debug_gl.bin)\n");
31406+ printf("--filename=X : the file where to write the serailized OpenGL flow\n");
31407+ printf("--different-windows : even if the client is on 127.0.0.1, display OpenGL on a new X window\n");
31408+ printf("--parent-xid=XXX : use XXX as the XID of the parent X window where to display the OpenGL flow\n");
31409+ printf(" This is useful if you want to run accelerated OpenGL inside a non-patched QEMU\n");
31410+ printf(" or from another emulator, through TCP/IP\n");
31411+ printf("--h or --help : display this help\n");
31412+}
31413+
31414+int
31415+main (int argc, char* argv[])
31416+{
31417+ int sock;
31418+ fd_set active_fd_set, read_fd_set;
31419+ int i;
31420+ struct sockaddr_in clientname;
31421+ socklen_t size;
31422+ int port = PORT;
31423+ int different_windows = 0;
31424+
31425+ for(i=1;i<argc;i++)
31426+ {
31427+ if (argv[i][0] == '-' && argv[i][1] == '-')
31428+ argv[i] = argv[i]+1;
31429+
31430+ if (strcmp(argv[i], "-debug") == 0)
31431+ {
31432+ display_function_call = 1;
31433+ }
31434+ else if (strcmp(argv[i], "-save") == 0)
31435+ {
31436+ must_save = 1;
31437+ }
31438+ else if (strncmp(argv[i], "-port=",6) == 0)
31439+ {
31440+ port = atoi(argv[i] + 6);
31441+ }
31442+ else if (strncmp(argv[i], "-filename=",strlen("-filename=")) == 0)
31443+ {
31444+ filename = argv[i] + strlen("-filename=");
31445+ }
31446+ else if (strncmp(argv[i], "-parent-xid=",strlen("-parent-xid=")) == 0)
31447+ {
31448+ char* c = argv[i] + strlen("-parent-xid=");
31449+ parent_xid = strtol(c, NULL, 0);
31450+ different_windows = 1;
31451+ }
31452+ else if (strcmp(argv[i], "-different-windows") == 0)
31453+ {
31454+ different_windows = 1;
31455+ }
31456+ else if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "-help") == 0)
31457+ {
31458+ usage();
31459+ return 0;
31460+ }
31461+ else
31462+ {
31463+ fprintf(stderr, "unknown parameter : %s\n", argv[i]);
31464+ usage();
31465+ return -1;
31466+ }
31467+ }
31468+
31469+ /* Create the socket and set it up to accept connections. */
31470+ sock = make_socket (port);
31471+
31472+ int flag = 1;
31473+ if (setsockopt(sock, IPPROTO_IP, SO_REUSEADDR,(char *)&flag, sizeof(int)) != 0)
31474+ {
31475+ perror("setsockopt SO_REUSEADDR");
31476+ }
31477+ if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,(char *)&flag, sizeof(int)) != 0)
31478+ {
31479+ perror("setsockopt TCP_NODELAY");
31480+ }
31481+
31482+ if (listen (sock, 1) < 0)
31483+ {
31484+ perror ("listen");
31485+ exit (EXIT_FAILURE);
31486+ }
31487+
31488+ struct sigaction action;
31489+ action.sa_handler = SIG_IGN;
31490+ action.sa_flags = SA_NOCLDWAIT;
31491+ sigaction(SIGCHLD,&action,NULL);
31492+
31493+ FD_ZERO (&active_fd_set);
31494+ FD_SET (sock, &active_fd_set);
31495+
31496+ while(1)
31497+ {
31498+ int new, pid;
31499+
31500+ read_fd_set = active_fd_set;
31501+ if (select (FD_SETSIZE, &read_fd_set, NULL, NULL, NULL) < 0)
31502+ {
31503+ perror ("select");
31504+ exit (EXIT_FAILURE);
31505+ }
31506+
31507+ size = sizeof (clientname);
31508+ new = accept (sock, (struct sockaddr *) &clientname, &size);
31509+ if (new < 0)
31510+ {
31511+ perror ("accept");
31512+ exit (EXIT_FAILURE);
31513+ }
31514+ pid = fork();
31515+ if (pid == -1)
31516+ {
31517+ perror ("fork");
31518+ exit(EXIT_FAILURE);
31519+ }
31520+ if (pid == 0)
31521+ {
31522+ close(sock);
31523+
31524+ fprintf (stderr, "Server: connect from host %s, port %hd.\n",
31525+ inet_ntoa (clientname.sin_addr),
31526+ ntohs (clientname.sin_port));
31527+
31528+ gettimeofday(&last_time, NULL);
31529+ gettimeofday(&last_read_time, NULL);
31530+
31531+ if (strcmp(inet_ntoa(clientname.sin_addr), "127.0.0.1") == 0 &&
31532+ different_windows == 0)
31533+ {
31534+ opengl_exec_set_local_connection();
31535+ }
31536+
31537+ if (timestamp)
31538+ {
31539+ gettimeofday(&time_stamp_start, NULL);
31540+ }
31541+
31542+ XSetErrorHandler(x_error_handler);
31543+
31544+ while(1)
31545+ {
31546+ if (read_from_client (new) < 0)
31547+ {
31548+ do_function_call(dpy, _exit_process_func, 1, NULL, NULL);
31549+
31550+ fprintf (stderr, "Server: disconnect from host %s, port %hd.\n",
31551+ inet_ntoa (clientname.sin_addr),
31552+ ntohs (clientname.sin_port));
31553+
31554+ return 0;
31555+ }
31556+ }
31557+ }
31558+ else
31559+ {
31560+ close(new);
31561+ }
31562+ }
31563+
31564+ return 0;
31565+}
31566Index: git/target-i386/opengl_utils.h
31567===================================================================
31568--- /dev/null 1970-01-01 00:00:00.000000000 +0000
31569+++ git/target-i386/opengl_utils.h 2009-05-23 11:22:17.000000000 +0100
31570@@ -0,0 +1,453 @@
31571+/*
31572+ * Functions used by host & client sides
31573+ *
31574+ * Copyright (c) 2007 Even Rouault
31575+ *
31576+ * Permission is hereby granted, free of charge, to any person obtaining a copy
31577+ * of this software and associated documentation files (the "Software"), to deal
31578+ * in the Software without restriction, including without limitation the rights
31579+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
31580+ * copies of the Software, and to permit persons to whom the Software is
31581+ * furnished to do so, subject to the following conditions:
31582+ *
31583+ * The above copyright notice and this permission notice shall be included in
31584+ * all copies or substantial portions of the Software.
31585+ *
31586+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31587+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31588+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
31589+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31590+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31591+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
31592+ * THE SOFTWARE.
31593+ */
31594+
31595+
31596+#ifndef _OPENGL_UTILS
31597+#define _OPENGL_UTILS
31598+
31599+typedef struct {
31600+ unsigned int *values;
31601+ int nbValues;
31602+} RangeAllocator;
31603+
31604+/*
31605+static void print_range(RangeAllocator* range)
31606+{
31607+ int i;
31608+ printf("%s", "table : ");
31609+ for(i=0;i<range->nbValues;i++)
31610+ {
31611+ printf("%d ", range->values[i]);
31612+ }
31613+ printf("\n");
31614+}
31615+*/
31616+
31617+static inline void alloc_value(RangeAllocator *range, unsigned int value)
31618+{
31619+ if (value == 0)
31620+ return;
31621+ if (range->nbValues >= 1) {
31622+ int lower = 0;
31623+ int upper = range->nbValues - 1;
31624+
31625+ while (1) {
31626+ int mid = (lower + upper) / 2;
31627+
31628+ if (range->values[mid] > value)
31629+ upper = mid;
31630+ else if (range->values[mid] < value)
31631+ lower = mid;
31632+ else
31633+ break;
31634+ if (upper - lower <= 1) {
31635+ if (value < range->values[lower]) {
31636+ range->values =
31637+ realloc(range->values,
31638+ (range->nbValues + 1) * sizeof(int));
31639+ memmove(&range->values[lower + 1], &range->values[lower],
31640+ (range->nbValues - lower) * sizeof(int));
31641+ range->values[lower] = value;
31642+ range->nbValues++;
31643+ } else if (value == range->values[lower]) {
31644+ } else if (value < range->values[upper]) {
31645+ range->values =
31646+ realloc(range->values,
31647+ (range->nbValues + 1) * sizeof(int));
31648+ memmove(&range->values[upper + 1], &range->values[upper],
31649+ (range->nbValues - upper) * sizeof(int));
31650+ range->values[upper] = value;
31651+ range->nbValues++;
31652+ } else if (value == range->values[upper]) {
31653+ } else {
31654+ upper++;
31655+
31656+ range->values =
31657+ realloc(range->values,
31658+ (range->nbValues + 1) * sizeof(int));
31659+ memmove(&range->values[upper + 1], &range->values[upper],
31660+ (range->nbValues - upper) * sizeof(int));
31661+ range->values[upper] = value;
31662+ range->nbValues++;
31663+ }
31664+ break;
31665+ }
31666+ }
31667+ } else {
31668+ range->values = malloc(sizeof(int));
31669+ range->values[0] = value;
31670+ range->nbValues = 1;
31671+ }
31672+}
31673+
31674+/* return first value */
31675+static inline unsigned int alloc_range(RangeAllocator *range, int n,
31676+ unsigned int *values)
31677+{
31678+ int i, j;
31679+
31680+ if (range->nbValues == 0) {
31681+ range->nbValues = n;
31682+ range->values = malloc(n * sizeof(int));
31683+ for (i = 0; i < n; i++) {
31684+ range->values[i] = i + 1;
31685+ if (values)
31686+ values[i] = range->values[i];
31687+ }
31688+ return 1;
31689+ } else {
31690+ int lastValue = 1;
31691+
31692+ for (i = 0; i < range->nbValues; i++) {
31693+ if ((int) range->values[i] - (int) lastValue - 1 >= n) {
31694+ range->values =
31695+ realloc(range->values,
31696+ (range->nbValues + n) * sizeof(int));
31697+ memmove(&range->values[i + n], &range->values[i],
31698+ (range->nbValues - i) * sizeof(int));
31699+ for (j = 0; j < n; j++) {
31700+ range->values[i + j] = lastValue + 1 + j;
31701+ if (values)
31702+ values[j] = range->values[i + j];
31703+ }
31704+ range->nbValues += n;
31705+ break;
31706+ } else
31707+ lastValue = range->values[i];
31708+ }
31709+ if (i == range->nbValues) {
31710+ range->values =
31711+ realloc(range->values, (range->nbValues + n) * sizeof(int));
31712+ for (j = 0; j < n; j++) {
31713+ range->values[i + j] = lastValue + 1 + j;
31714+ if (values)
31715+ values[j] = range->values[i + j];
31716+ }
31717+ range->nbValues += n;
31718+ }
31719+ return lastValue + 1;
31720+ }
31721+}
31722+
31723+static inline void delete_value(RangeAllocator *range, unsigned int value)
31724+{
31725+ if (value == 0)
31726+ return;
31727+ if (range->nbValues >= 1) {
31728+ int lower = 0;
31729+ int upper = range->nbValues - 1;
31730+
31731+ while (1) {
31732+ int mid = (lower + upper) / 2;
31733+
31734+ if (range->values[mid] > value)
31735+ upper = mid;
31736+ else if (range->values[mid] < value)
31737+ lower = mid;
31738+ else {
31739+ lower = upper = mid;
31740+ }
31741+ if (upper - lower <= 1) {
31742+ if (value == range->values[lower]) {
31743+ memmove(&range->values[lower], &range->values[lower + 1],
31744+ (range->nbValues - lower - 1) * sizeof(int));
31745+ range->nbValues--;
31746+ } else if (value == range->values[upper]) {
31747+ memmove(&range->values[upper], &range->values[upper + 1],
31748+ (range->nbValues - upper - 1) * sizeof(int));
31749+ range->nbValues--;
31750+ }
31751+ break;
31752+ }
31753+ }
31754+ }
31755+}
31756+
31757+static inline void delete_range(RangeAllocator *range, int n,
31758+ const unsigned int *values)
31759+{
31760+ int i;
31761+
31762+ for (i = 0; i < n; i++) {
31763+ delete_value(range, values[i]);
31764+ }
31765+}
31766+
31767+static inline void delete_consecutive_values(RangeAllocator *range,
31768+ unsigned int first, int n)
31769+{
31770+ int i;
31771+
31772+ for (i = 0; i < n; i++) {
31773+ delete_value(range, first + i);
31774+ }
31775+}
31776+
31777+
31778+/*****************************************************************/
31779+/* */
31780+/* CRC LOOKUP TABLE */
31781+/* ================ */
31782+/* The following CRC lookup table was generated automagically */
31783+/* by the Rocksoft^tm Model CRC Algorithm Table Generation */
31784+/* Program V1.0 using the following model parameters: */
31785+/* */
31786+/* Width : 4 bytes. */
31787+/* Poly : 0x04C11DB7L */
31788+/* Reverse : TRUE. */
31789+/* */
31790+/* For more information on the Rocksoft^tm Model CRC Algorithm, */
31791+/* see the document titled "A Painless Guide to CRC Error */
31792+/* Detection Algorithms" by Ross Williams */
31793+/* (ross@guest.adelaide.edu.au.). This document is likely to be */
31794+/* in the FTP archive "ftp.adelaide.edu.au/pub/rocksoft". */
31795+/* */
31796+/*****************************************************************/
31797+
31798+static const unsigned int crctable[256] = {
31799+ 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,
31800+ 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
31801+ 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,
31802+ 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
31803+ 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,
31804+ 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
31805+ 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,
31806+ 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,
31807+ 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,
31808+ 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
31809+ 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,
31810+ 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
31811+ 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,
31812+ 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,
31813+ 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,
31814+ 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,
31815+ 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,
31816+ 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
31817+ 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,
31818+ 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
31819+ 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,
31820+ 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,
31821+ 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,
31822+ 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
31823+ 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,
31824+ 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,
31825+ 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,
31826+ 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,
31827+ 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,
31828+ 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
31829+ 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,
31830+ 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,
31831+ 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,
31832+ 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,
31833+ 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,
31834+ 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
31835+ 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,
31836+ 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,
31837+ 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,
31838+ 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
31839+ 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,
31840+ 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
31841+ 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,
31842+ 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,
31843+ 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,
31844+ 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,
31845+ 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,
31846+ 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
31847+ 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,
31848+ 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
31849+ 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,
31850+ 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,
31851+ 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,
31852+ 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
31853+ 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,
31854+ 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,
31855+ 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,
31856+ 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,
31857+ 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,
31858+ 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
31859+ 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,
31860+ 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,
31861+ 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,
31862+ 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
31863+};
31864+
31865+static unsigned int calc_checksum(const void *_ptr, int length,
31866+ unsigned int seed)
31867+{
31868+ int i;
31869+ unsigned int crc = seed;
31870+ unsigned char *ptr = (unsigned char *) _ptr;
31871+
31872+ if (ptr == NULL)
31873+ return -1;
31874+ for (i = 0; i < length; i++) {
31875+ crc = crctable[(crc ^ *ptr++) & 0xFF] ^ (crc >> 8);
31876+ }
31877+ return crc;
31878+}
31879+
31880+
31881+static inline void display_gl_call(FILE *f,
31882+ int func_number, arg_t *args, int *args_size)
31883+{
31884+ int i;
31885+
31886+ if (func_number < 0) {
31887+ fprintf(f, "unknown call : %d\n", func_number);
31888+ return;
31889+ }
31890+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
31891+ int nb_args = signature->nb_args;
31892+ int *args_type = signature->args_type;
31893+
31894+ fprintf(f, "%s(", tab_opengl_calls_name[func_number]);
31895+
31896+ for (i = 0; i < nb_args; i++) {
31897+ switch (args_type[i]) {
31898+ case TYPE_UNSIGNED_CHAR:
31899+ case TYPE_CHAR:
31900+ {
31901+ fprintf(f, "%d", (char) args[i]);
31902+ break;
31903+ }
31904+
31905+ case TYPE_UNSIGNED_SHORT:
31906+ case TYPE_SHORT:
31907+ {
31908+ fprintf(f, "%d", (short) args[i]);
31909+ break;
31910+ }
31911+
31912+ case TYPE_UNSIGNED_INT:
31913+ case TYPE_INT:
31914+ {
31915+ fprintf(f, "%d", (int) args[i]);
31916+ break;
31917+ }
31918+
31919+ case TYPE_FLOAT:
31920+ fprintf(f, "%f", *(float *) &args[i]);
31921+ break;
31922+
31923+ case TYPE_DOUBLE:
31924+ CASE_IN_KNOWN_SIZE_POINTERS:
31925+ case TYPE_NULL_TERMINATED_STRING:
31926+ CASE_IN_UNKNOWN_SIZE_POINTERS:
31927+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31928+ if (args_type[i] == TYPE_NULL_TERMINATED_STRING) {
31929+ fprintf(f, "\"%s\"", (char *) args[i]);
31930+ } else if (args_type[i] == TYPE_DOUBLE)
31931+ fprintf(f, "%f", *(double *) args[i]);
31932+ else if (IS_ARRAY_CHAR(args_type[i]) &&
31933+ args_size[i] <= 4 * sizeof(char)) {
31934+ int j;
31935+ int n = args_size[i] / sizeof(char);
31936+
31937+ fprintf(f, "(");
31938+ for (j = 0; j < n; j++) {
31939+ fprintf(f, "%d", ((unsigned char *) args[i])[j]);
31940+ if (j != n - 1)
31941+ fprintf(f, ", ");
31942+ }
31943+ fprintf(f, ")");
31944+ } else if (IS_ARRAY_SHORT(args_type[i]) &&
31945+ args_size[i] <= 4 * sizeof(short)) {
31946+ int j;
31947+ int n = args_size[i] / sizeof(short);
31948+
31949+ fprintf(f, "(");
31950+ for (j = 0; j < n; j++) {
31951+ fprintf(f, "%d", ((short *) args[i])[j]);
31952+ if (j != n - 1)
31953+ fprintf(f, ", ");
31954+ }
31955+ fprintf(f, ")");
31956+ } else if (IS_ARRAY_INT(args_type[i]) &&
31957+ args_size[i] <= 4 * sizeof(int)) {
31958+ int j;
31959+ int n = args_size[i] / sizeof(int);
31960+
31961+ fprintf(f, "(");
31962+ for (j = 0; j < n; j++) {
31963+ fprintf(f, "%d", ((int *) args[i])[j]);
31964+ if (j != n - 1)
31965+ fprintf(f, ", ");
31966+ }
31967+ fprintf(f, ")");
31968+ } else if (IS_ARRAY_FLOAT(args_type[i]) &&
31969+ args_size[i] <= 4 * sizeof(float)) {
31970+ int j;
31971+ int n = args_size[i] / sizeof(float);
31972+
31973+ fprintf(f, "(");
31974+ for (j = 0; j < n; j++) {
31975+ fprintf(f, "%f", ((float *) args[i])[j]);
31976+ if (j != n - 1)
31977+ fprintf(f, ", ");
31978+ }
31979+ fprintf(f, ")");
31980+ } else if (IS_ARRAY_DOUBLE(args_type[i]) &&
31981+ args_size[i] <= 4 * sizeof(double)) {
31982+ int j;
31983+ int n = args_size[i] / sizeof(double);
31984+
31985+ fprintf(f, "(");
31986+ for (j = 0; j < n; j++) {
31987+ fprintf(f, "%f", ((double *) args[i])[j]);
31988+ if (j != n - 1)
31989+ fprintf(f, ", ");
31990+ }
31991+ fprintf(f, ")");
31992+ } else {
31993+ fprintf(f, "%d bytes", args_size[i]);
31994+ fprintf(f, "(crc = 0x%x)",
31995+ calc_checksum((void *) args[i], args_size[i],
31996+ 0xFFFFFFFF));
31997+ }
31998+ break;
31999+
32000+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
32001+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
32002+ CASE_OUT_KNOWN_SIZE_POINTERS:
32003+ {
32004+ fprintf(f, "%d bytes (OUT)", args_size[i]);
32005+ break;
32006+ }
32007+
32008+ case TYPE_IN_IGNORED_POINTER:
32009+ break;
32010+
32011+ default:
32012+ fprintf(f, "shouldn't happen : call %s arg %d\n",
32013+ tab_opengl_calls_name[func_number], i);
32014+ return;
32015+ break;
32016+ }
32017+ if (i < nb_args - 1)
32018+ fprintf(f, ", ");
32019+ }
32020+ fprintf(f, ")\n");
32021+}
32022+
32023+#endif
32024Index: git/target-i386/parse_gl_h.c
32025===================================================================
32026--- /dev/null 1970-01-01 00:00:00.000000000 +0000
32027+++ git/target-i386/parse_gl_h.c 2009-05-23 11:22:17.000000000 +0100
32028@@ -0,0 +1,1496 @@
32029+/*
32030+ * Parse gl.h et glx.h to auto-generate source code
32031+ *
32032+ * Copyright (c) 2006,2007 Even Rouault
32033+ *
32034+ * Permission is hereby granted, free of charge, to any person obtaining a copy
32035+ * of this software and associated documentation files (the "Software"), to deal
32036+ * in the Software without restriction, including without limitation the rights
32037+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
32038+ * copies of the Software, and to permit persons to whom the Software is
32039+ * furnished to do so, subject to the following conditions:
32040+ *
32041+ * The above copyright notice and this permission notice shall be included in
32042+ * all copies or substantial portions of the Software.
32043+ *
32044+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32045+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32046+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
32047+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
32048+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32049+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
32050+ * THE SOFTWARE.
32051+ */
32052+
32053+/* gcc -g parse_gl_h.c -o parse_gl_h && ./parse_gl_h */
32054+#include <stdio.h>
32055+#include <stdlib.h>
32056+#include <string.h>
32057+#include <assert.h>
32058+
32059+int isExtByName(const char* name)
32060+{
32061+ return (strstr(name, "ARB") != NULL) ||
32062+ (strstr(name, "IBM") != NULL) ||
32063+ (strstr(name, "EXT") != NULL) ||
32064+ (strstr(name, "ATI") != NULL) ||
32065+ (strstr(name, "NV") != NULL) ||
32066+ (strstr(name, "MESA") != NULL) ||
32067+ (strstr(name, "APPLE") != NULL) ||
32068+ (strstr(name, "SUN") != NULL) ||
32069+ (strstr(name, "SGI") != NULL);
32070+}
32071+
32072+char* get_arg_type(char* s)
32073+{
32074+ while(*s == ' ' || *s == '\t') s++;
32075+ char* n = s;
32076+ char* c = strstr(n, "const");
32077+ if (c)
32078+ n += 6;
32079+
32080+ char* t = strstr(n, " ");
32081+ if (t)
32082+ {
32083+ if (t[1] == '*')
32084+ t += 2;
32085+ t[0] = 0;
32086+ char* ori = t;
32087+ t = strstr(t+1, "[");
32088+ if (t)
32089+ {
32090+ memmove(ori, t, strlen(t));
32091+ strstr(ori, "]")[1] = 0;
32092+ }
32093+ }
32094+ return strdup(s);
32095+}
32096+
32097+typedef struct
32098+{
32099+ char* type;
32100+ char* name;
32101+ int nargs;
32102+ char** args;
32103+ int ok;
32104+ int just_for_server_side;
32105+ int has_out_parameters;
32106+ int isExt;
32107+} FuncDesc;
32108+
32109+int isExt(FuncDesc* func)
32110+{
32111+ return func->isExt;
32112+}
32113+
32114+char* get_type_string(char* type)
32115+{
32116+ if (strstr(type, "[16]"))
32117+ {
32118+ if (strstr(type, "float"))
32119+ return ("TYPE_16FLOAT");
32120+ else if (strstr(type, "double"))
32121+ return ("TYPE_16DOUBLE");
32122+ else
32123+ {
32124+ printf("inconnu %s\n", type);
32125+ exit(-1);
32126+ }
32127+ }
32128+ else if (strstr(type, "[128]") && strstr(type, "GLubyte"))
32129+ return strstr(type, "const") ? "TYPE_128UCHAR" : "TYPE_OUT_128UCHAR";
32130+ else if (strstr(type, "const GLvoid *"))
32131+ return "TYPE_ARRAY_VOID";
32132+ else if (strstr(type, "const GLchar *") ||
32133+ strstr(type, "const GLcharARB *"))
32134+ return "TYPE_NULL_TERMINATED_STRING";
32135+ else if (strstr(type, "const GLbyte *"))
32136+ return "TYPE_ARRAY_SIGNED_CHAR";
32137+ else if (strstr(type, "const GLubyte *"))
32138+ return "TYPE_ARRAY_UNSIGNED_CHAR";
32139+ else if (strstr(type, "const GLshort *"))
32140+ return "TYPE_ARRAY_SHORT";
32141+ else if (strstr(type, "const GLushort *") ||
32142+ strstr(type, "const GLhalfNV *"))
32143+ return "TYPE_ARRAY_UNSIGNED_SHORT";
32144+ else if (strstr(type, "const GLint *"))
32145+ return "TYPE_ARRAY_INT";
32146+ else if (strstr(type, "const GLuint *") ||
32147+ strstr(type, "const GLenum *"))
32148+ return "TYPE_ARRAY_UNSIGNED_INT";
32149+ else if (strstr(type, "const GLfloat *") ||
32150+ strstr(type, "const GLclampf *"))
32151+ return "TYPE_ARRAY_FLOAT";
32152+ else if (strstr(type, "const GLdouble *"))
32153+ return "TYPE_ARRAY_DOUBLE";
32154+ else if (strstr(type, "GLvoid *"))
32155+ return "TYPE_OUT_ARRAY_VOID";
32156+ else if (strstr(type, "GLboolean *") ||
32157+ strstr(type, "GLubyte *"))
32158+ return "TYPE_OUT_ARRAY_UNSIGNED_CHAR";
32159+ else if (strstr(type, "GLcharARB *") ||
32160+ strstr(type, "GLchar *"))
32161+ return "TYPE_OUT_ARRAY_CHAR";
32162+ else if (strstr(type, "GLshort *"))
32163+ return "TYPE_OUT_ARRAY_SHORT";
32164+ else if (strstr(type, "GLushort *"))
32165+ return "TYPE_OUT_ARRAY_UNSIGNED_SHORT";
32166+ else if (strstr(type, "GLint *")||
32167+ strstr(type, "GLsizei *"))
32168+ return "TYPE_OUT_ARRAY_INT";
32169+ else if (strstr(type, "GLuint *") ||
32170+ strstr(type, "GLenum *") ||
32171+ strstr(type, "GLhandleARB *"))
32172+ return "TYPE_OUT_ARRAY_UNSIGNED_INT";
32173+ else if (strstr(type, "GLfloat *"))
32174+ return "TYPE_OUT_ARRAY_FLOAT";
32175+ else if (strstr(type, "GLdouble *"))
32176+ return "TYPE_OUT_ARRAY_DOUBLE";
32177+ else if (strcmp(type, "void") == 0)
32178+ return("TYPE_NONE");
32179+ else if (strcmp(type, "GLbyte") == 0)
32180+ return("TYPE_CHAR");
32181+ else if (strcmp(type, "GLubyte") == 0 ||
32182+ strcmp(type, "GLboolean") == 0)
32183+ return("TYPE_UNSIGNED_CHAR");
32184+ else if (strcmp(type, "GLshort") == 0)
32185+ return("TYPE_SHORT");
32186+ else if (strcmp(type, "GLushort") == 0 ||
32187+ strcmp(type, "GLhalfNV") == 0)
32188+ return("TYPE_UNSIGNED_SHORT");
32189+ else if (strcmp(type, "GLint") == 0 ||
32190+ strcmp(type, "GLsizei") == 0 ||
32191+ strcmp(type, "GLintptr") == 0 ||
32192+ strcmp(type, "GLsizeiptr") == 0 ||
32193+ strcmp(type, "GLintptrARB") == 0 ||
32194+ strcmp(type, "GLsizeiptrARB") == 0)
32195+ return("TYPE_INT");
32196+ else if (strcmp(type, "GLenum") == 0 ||
32197+ strcmp(type, "GLuint") == 0 ||
32198+ strcmp(type, "GLhandleARB") == 0 ||
32199+ strcmp(type, "GLbitfield") == 0)
32200+ return("TYPE_UNSIGNED_INT");
32201+ else if (strcmp(type, "GLfloat") == 0 ||
32202+ strcmp(type, "GLclampf") == 0)
32203+ return("TYPE_FLOAT");
32204+ else if (strcmp(type, "GLdouble") == 0 ||
32205+ strcmp(type, "GLclampd") == 0)
32206+ return("TYPE_DOUBLE");
32207+ else
32208+ {
32209+ printf("inconnu %s\n", type);
32210+ exit(-1);
32211+ }
32212+}
32213+
32214+typedef struct
32215+{
32216+ char* letter;
32217+ char* signature_type_name;
32218+ char* gl_c_type_name;
32219+ char* c_type_name;
32220+} ForIsKnownArgVector;
32221+
32222+#define N_ELEMENTS(x) (sizeof(x)/sizeof(x[0]))
32223+#define N_FIELDS_IN_ARG_VECTOR 4
32224+
32225+
32226+typedef struct
32227+{
32228+ char* func_name;
32229+ char* signature_type_name;
32230+} KnownLastArgFunc;
32231+
32232+static KnownLastArgFunc knownLastArgFuncs[] =
32233+{
32234+{"glFogCoordfv", "TYPE_1FLOAT"},
32235+{"glFogCoorddv", "TYPE_1DOUBLE"},
32236+{"glFogCoordfvEXT", "TYPE_1FLOAT"},
32237+{"glFogCoorddvEXT", "TYPE_1DOUBLE"},
32238+{"glFogCoordhvNV", "TYPE_1USHORT"},
32239+
32240+{"glGetFenceivNV", "TYPE_OUT_1INT"},
32241+
32242+{"glGetTexLevelParameteriv", "TYPE_OUT_1INT" },
32243+{"glGetTexLevelParameterfv", "TYPE_OUT_1FLOAT" },
32244+
32245+{"glGetRenderbufferParameterivEXT", "TYPE_OUT_1INT"},
32246+{"glGetFramebufferAttachmentParameterivEXT", "TYPE_OUT_1INT"},
32247+{"glGetFinalCombinerInputParameterivNV", "TYPE_OUT_1INT"},
32248+{"glGetCombinerOutputParameterivNV", "TYPE_OUT_1INT"},
32249+{"glGetCombinerInputParameterivNV", "TYPE_OUT_1INT"},
32250+{"glGetOcclusionQueryivNV", "TYPE_OUT_1INT"},
32251+{"glGetOcclusionQueryuivNV", "TYPE_OUT_1UINT"},
32252+{"glGetObjectParameterivARB", "TYPE_OUT_1INT"},
32253+{"glGetQueryivARB", "TYPE_OUT_1INT"},
32254+{"glGetQueryiv", "TYPE_OUT_1INT"},
32255+{"glGetQueryObjectivARB", "TYPE_OUT_1INT"},
32256+{"glGetQueryObjectiv", "TYPE_OUT_1INT"},
32257+{"glGetQueryObjectuivARB", "TYPE_OUT_1UINT"},
32258+{"glGetQueryObjectuiv", "TYPE_OUT_1UINT"},
32259+{"glGetProgramivARB", "TYPE_OUT_1INT"},
32260+{"glGetProgramiv", "TYPE_OUT_1INT"},
32261+{"glGetProgramivNV", "TYPE_OUT_1INT"},
32262+{"glGetShaderiv", "TYPE_OUT_1INT"},
32263+
32264+{"glCombinerParameterfvNV", "TYPE_1FLOAT"},
32265+{"glCombinerParameterivNV", "TYPE_1INT"},
32266+
32267+{"glGetFinalCombinerInputParameterfvNV", "TYPE_OUT_1FLOAT"},
32268+{"glGetCombinerOutputParameterfvNV", "TYPE_OUT_1FLOAT"},
32269+{"glGetCombinerInputParameterfvNV", "TYPE_OUT_1FLOAT"},
32270+{"glGetObjectParameterfvARB", "TYPE_OUT_1FLOAT"},
32271+
32272+{"glCombinerStageParameterfvNV", "TYPE_4FLOAT"},
32273+{"glGetCombinerStageParameterfvNV", "TYPE_OUT_4FLOAT"},
32274+
32275+{"glTexBumpParameterivATI", "TYPE_1INT"},
32276+{"glTexBumpParameterfvATI", "TYPE_1FLOAT"},
32277+{"glGetTexBumpParameterivATI", "TYPE_OUT_1INT"},
32278+{"glGetTexBumpParameterfvATI", "TYPE_OUT_1FLOAT"},
32279+
32280+{"glGetProgramLocalParameterfvARB", "TYPE_OUT_4FLOAT"},
32281+{"glGetProgramLocalParameterdvARB", "TYPE_OUT_4DOUBLE"},
32282+{"glGetProgramEnvParameterfvARB", "TYPE_OUT_4FLOAT"},
32283+{"glGetProgramEnvParameterdvARB", "TYPE_OUT_4DOUBLE"},
32284+{"glGetProgramLocalParameterIivNV", "TYPE_OUT_1INT"},
32285+{"glGetProgramLocalParameterIuivNV", "TYPE_OUT_1UINT"},
32286+{"glGetProgramEnvParameterIivNV", "TYPE_OUT_1INT"},
32287+{"glGetProgramEnvParameterIuivNV", "TYPE_OUT_1UINT"},
32288+
32289+{"glGetProgramParameterfvNV", "TYPE_OUT_4FLOAT"},
32290+{"glGetProgramParameterdvNV", "TYPE_OUT_4DOUBLE"},
32291+{"glGetProgramNamedParameterfvNV", "TYPE_OUT_4FLOAT"},
32292+{"glGetProgramNamedParameterdvNV", "TYPE_OUT_4DOUBLE"},
32293+
32294+{"glCullParameterfvEXT", "TYPE_4FLOAT"},
32295+{"glCullParameterdvEXT", "TYPE_4DOUBLE"},
32296+
32297+{"glGetTrackMatrixivNV", "TYPE_OUT_1INT"},
32298+{"glExecuteProgramNV", "TYPE_4FLOAT"},
32299+
32300+{"glEdgeFlagv", "TYPE_1UCHAR"},
32301+
32302+{"glClipPlane", "TYPE_4DOUBLE"},
32303+{"glGetClipPlane", "TYPE_OUT_4DOUBLE"},
32304+
32305+{"glSetFragmentShaderConstantATI", "TYPE_4FLOAT"},
32306+
32307+{"glGetObjectBufferfvATI", "TYPE_OUT_1FLOAT"},
32308+{"glGetObjectBufferivATI", "TYPE_OUT_1INT"},
32309+{"glGetArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
32310+{"glGetArrayObjectivATI", "TYPE_OUT_1INT"},
32311+{"glGetVariantArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
32312+{"glGetVariantArrayObjectivATI", "TYPE_OUT_1INT"},
32313+{"glGetVertexAttribArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
32314+{"glGetVertexAttribArrayObjectivATI", "TYPE_OUT_1INT"},
32315+
32316+{"glPixelTransformParameterivEXT", "TYPE_1INT"},
32317+{"glPixelTransformParameterfvEXT", "TYPE_1FLOAT"},
32318+{"glGetPixelTransformParameterivEXT", "TYPE_OUT_1INT"},
32319+{"glGetPixelTransformParameterfvEXT", "TYPE_OUT_1FLOAT"},
32320+
32321+{"glColorTableParameterfv", "TYPE_4FLOAT"},
32322+{"glColorTableParameteriv", "TYPE_4INT"},
32323+{"glGetColorTableParameterfv", "TYPE_OUT_4FLOAT"},
32324+{"glGetColorTableParameteriv", "TYPE_OUT_4INT"},
32325+{"glColorTableParameterfvEXT", "TYPE_4FLOAT"},
32326+{"glColorTableParameterivEXT", "TYPE_4INT"},
32327+{"glGetColorTableParameterfvEXT", "TYPE_OUT_4FLOAT"},
32328+{"glGetColorTableParameterivEXT", "TYPE_OUT_4INT"},
32329+
32330+{"glGetMinmaxParameterfv", "TYPE_OUT_1FLOAT"},
32331+{"glGetMinmaxParameteriv", "TYPE_OUT_1INT"},
32332+{"glGetHistogramParameterfv", "TYPE_OUT_1FLOAT"},
32333+{"glGetHistogramParameteriv", "TYPE_OUT_1INT"},
32334+{"glGetMinmaxParameterfvEXT", "TYPE_OUT_1FLOAT"},
32335+{"glGetMinmaxParameterivEXT", "TYPE_OUT_1INT"},
32336+{"glGetHistogramParameterfvEXT", "TYPE_OUT_1FLOAT"},
32337+{"glGetHistogramParameterivEXT", "TYPE_OUT_1INT"},
32338+
32339+/* Not sure at all for the 2 followingo ones ! */
32340+{"glGetBooleanIndexedvEXT", "TYPE_OUT_4UCHAR"},
32341+{"glGetIntegerIndexedvEXT", "TYPE_OUT_4INT"},
32342+
32343+{"glReferencePlaneSGIX", "TYPE_4DOUBLE"},
32344+
32345+{"glGetTransformFeedbackVaryingNV", "TYPE_OUT_1INT"},
32346+
32347+};
32348+
32349+int is_known_arg_vector(FuncDesc* desc, char** p_signature_type_name, char** p_c_type_name)
32350+{
32351+ static ForIsKnownArgVector my_tab[] =
32352+ {
32353+ { "b", "CHAR", "GLbyte", "signed char" },
32354+ { "Boolean", "CHAR", "GLboolean", "unsigned char" },
32355+ { "s", "SHORT", "GLshort", "short" },
32356+ { "i", "INT", "GLint", "int" },
32357+ { "Integer", "INT", "GLint", "int" },
32358+ { "ub", "CHAR", "GLubyte", "unsigned char" },
32359+ { "h", "SHORT", "GLhalf", "unsigned short" },
32360+ { "us", "SHORT", "GLushort", "unsigned short" },
32361+ { "ui", "INT", "GLuint", "unsigned int" },
32362+ { "Nb", "CHAR", "GLbyte", "signed char" },
32363+ { "Ns", "SHORT", "GLshort", "short" },
32364+ { "Ni", "INT", "GLint", "int" },
32365+ { "Nub", "CHAR", "GLubyte", "unsigned char" },
32366+ { "Nus", "SHORT", "GLushort", "unsigned short" },
32367+ { "Nui", "INT", "GLuint", "unsigned int" },
32368+
32369+ { "f", "FLOAT", "GLfloat", "float" },
32370+ { "Float", "FLOAT", "GLfloat", "float" },
32371+ { "d", "DOUBLE", "GLdouble", "double" },
32372+ };
32373+
32374+ if (desc->nargs == 0)
32375+ return 0;
32376+
32377+ int i , j;
32378+
32379+ if (strstr(desc->name, "glVertexAttribs") ||
32380+ strstr(desc->name, "glProgramParameters") ||
32381+ strstr(desc->name, "glProgramEnvParameters") ||
32382+ strstr(desc->name, "glProgramLocalParameters") ||
32383+ (strstr(desc->name, "glUniform") && (strstr(desc->name, "iv") || strstr(desc->name, "fv"))))
32384+ return 0;
32385+
32386+ static char signatures[N_ELEMENTS(my_tab)][N_FIELDS_IN_ARG_VECTOR][20] = {0};
32387+ char signature[10];
32388+
32389+ for(i=0;i<N_ELEMENTS(knownLastArgFuncs);i++)
32390+ {
32391+ if (strcmp(desc->name, knownLastArgFuncs[i].func_name) == 0)
32392+ {
32393+ if (p_signature_type_name)
32394+ {
32395+ *p_signature_type_name = knownLastArgFuncs[i].signature_type_name;
32396+ }
32397+ if (p_c_type_name)
32398+ {
32399+ if (strstr(knownLastArgFuncs[i].signature_type_name, "FLOAT"))
32400+ *p_c_type_name = "float";
32401+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "DOUBLE"))
32402+ *p_c_type_name = "double";
32403+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "UINT"))
32404+ *p_c_type_name = "unsigned int";
32405+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "INT"))
32406+ *p_c_type_name = "int";
32407+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "USHORT"))
32408+ *p_c_type_name = "unsigned short";
32409+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "SHORT"))
32410+ *p_c_type_name = "short";
32411+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "UCHAR"))
32412+ *p_c_type_name = "unsigned char";
32413+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "CHAR"))
32414+ *p_c_type_name = "char";
32415+ else
32416+ assert(0);
32417+ }
32418+ return 1;
32419+ }
32420+ }
32421+
32422+ for(i=0;i<N_ELEMENTS(my_tab);i++)
32423+ {
32424+ for(j=1;j<=N_FIELDS_IN_ARG_VECTOR;j++)
32425+ {
32426+ if (strstr(desc->name, "glIndex") && strstr(desc->name, "v"))
32427+ sprintf(signature, "%sv", my_tab[i].letter);
32428+ else
32429+ sprintf(signature, "%d%sv", j, my_tab[i].letter);
32430+ if (strstr(desc->name, signature) &&
32431+ strstr(desc->args[desc->nargs - 1], my_tab[i].gl_c_type_name) &&
32432+ strstr(desc->args[desc->nargs - 1], "*"))
32433+ {
32434+ if (p_signature_type_name)
32435+ {
32436+ if (signatures[i][j-1][0] == 0)
32437+ sprintf(signatures[i][j-1], "TYPE_%d%s", j, my_tab[i].signature_type_name);
32438+ *p_signature_type_name = signatures[i][j-1];
32439+ }
32440+ if (p_c_type_name) *p_c_type_name = my_tab[i].c_type_name;
32441+ return 1;
32442+ }
32443+ }
32444+ }
32445+ return 0;
32446+}
32447+
32448+static void print_server_side_argument(FILE* server_stub, int j, char* glType)
32449+{
32450+ const char* symbolic_type = get_type_string(glType);
32451+ if (strcmp(symbolic_type, "TYPE_CHAR") == 0)
32452+ fprintf(server_stub, "ARG_TO_CHAR(args[%d])", j);
32453+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_CHAR") == 0)
32454+ fprintf(server_stub, "ARG_TO_UNSIGNED_CHAR(args[%d])", j);
32455+ else if (strcmp(symbolic_type, "TYPE_SHORT") == 0)
32456+ fprintf(server_stub, "ARG_TO_SHORT(args[%d])", j);
32457+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_SHORT") == 0)
32458+ fprintf(server_stub, "ARG_TO_UNSIGNED_SHORT(args[%d])", j);
32459+ else if (strcmp(symbolic_type, "TYPE_INT") == 0)
32460+ fprintf(server_stub, "ARG_TO_INT(args[%d])", j);
32461+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_INT") == 0)
32462+ fprintf(server_stub, "ARG_TO_UNSIGNED_INT(args[%d])", j);
32463+ else if (strcmp(symbolic_type, "TYPE_FLOAT") == 0)
32464+ fprintf(server_stub, "ARG_TO_FLOAT(args[%d])", j);
32465+ else if (strcmp(symbolic_type, "TYPE_16FLOAT") == 0)
32466+ fprintf(server_stub, "(const float*)(args[%d])", j);
32467+ else if (strcmp(symbolic_type, "TYPE_DOUBLE") == 0)
32468+ fprintf(server_stub, "ARG_TO_DOUBLE(args[%d])", j);
32469+ else if ( strcmp(symbolic_type, "TYPE_16DOUBLE") == 0)
32470+ fprintf(server_stub, "(const double*)(args[%d])", j);
32471+ else if ( strcmp(symbolic_type, "TYPE_OUT_128UCHAR") == 0)
32472+ fprintf(server_stub, "(unsigned char*)(args[%d])", j);
32473+ else if ( strcmp(symbolic_type, "TYPE_128UCHAR") == 0)
32474+ fprintf(server_stub, "(const unsigned char*)(args[%d])", j);
32475+ else if ( strcmp(symbolic_type, "TYPE_NULL_TERMINATED_STRING") == 0)
32476+ fprintf(server_stub, "(const char*)(args[%d])", j);
32477+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_SHORT") == 0)
32478+ fprintf(server_stub, "(const short*)(args[%d])", j);
32479+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_SHORT") == 0)
32480+ fprintf(server_stub, "(const unsigned short*)(args[%d])", j);
32481+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_INT") == 0)
32482+ fprintf(server_stub, "(const int*)(args[%d])", j);
32483+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_INT") == 0)
32484+ fprintf(server_stub, "(const unsigned int*)(args[%d])", j);
32485+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_FLOAT") == 0)
32486+ fprintf(server_stub, "(const float*)(args[%d])", j);
32487+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_DOUBLE") == 0)
32488+ fprintf(server_stub, "(const double*)(args[%d])", j);
32489+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_CHAR") == 0)
32490+ fprintf(server_stub, "(const char*)(args[%d])", j);
32491+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_SIGNED_CHAR") == 0)
32492+ fprintf(server_stub, "(const signed char*)(args[%d])", j);
32493+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_VOID") == 0)
32494+ fprintf(server_stub, "(const void*)(args[%d])", j);
32495+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_CHAR") == 0)
32496+ fprintf(server_stub, "(const unsigned char*)(args[%d])", j);
32497+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_SHORT") == 0)
32498+ fprintf(server_stub, "(short*)(args[%d])", j);
32499+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_SHORT") == 0)
32500+ fprintf(server_stub, "(unsigned short*)(args[%d])", j);
32501+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_INT") == 0)
32502+ fprintf(server_stub, "(int*)(args[%d])", j);
32503+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_INT") == 0)
32504+ fprintf(server_stub, "(unsigned int*)(args[%d])", j);
32505+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_FLOAT") == 0)
32506+ fprintf(server_stub, "(float*)(args[%d])", j);
32507+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_DOUBLE") == 0)
32508+ fprintf(server_stub, "(double*)(args[%d])", j);
32509+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_VOID") == 0)
32510+ fprintf(server_stub, "(void*)(args[%d])", j);
32511+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_CHAR") == 0)
32512+ fprintf(server_stub, "(char*)(args[%d])", j);
32513+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_CHAR") == 0)
32514+ fprintf(server_stub, "(unsigned char*)(args[%d])", j);
32515+
32516+ else
32517+ {
32518+ fprintf(stderr, "Unknown : %s\n", symbolic_type);
32519+ assert(0);
32520+ }
32521+}
32522+
32523+static const char* func_dealt_by_hand[500] = { NULL };
32524+
32525+
32526+static const char* ignore_func[] =
32527+{
32528+ "glGetPointerv",
32529+ "glRectdv",
32530+ "glRectfv",
32531+ "glRectiv",
32532+ "glRectsv",
32533+ "glMultiDrawArrays",
32534+ "glMultiDrawArraysEXT",
32535+ "glMultiDrawElements",
32536+ "glMultiDrawElementsEXT",
32537+ "glUnmapBuffer",
32538+ "glUnmapBufferARB",
32539+ "glLoadTransposeMatrixf",
32540+ "glLoadTransposeMatrixd",
32541+ "glMultTransposeMatrixf",
32542+ "glMultTransposeMatrixd",
32543+ "glLoadTransposeMatrixfARB",
32544+ "glLoadTransposeMatrixdARB",
32545+ "glMultTransposeMatrixfARB",
32546+ "glMultTransposeMatrixdARB",
32547+
32548+ "glPixelDataRangeNV",
32549+ "glFlushPixelDataRangeNV",
32550+ "glVertexArrayRangeNV",
32551+ "glFlushVertexArrayRangeNV",
32552+ "glVertexWeightfEXT",
32553+
32554+ "glGetBufferPointerv",
32555+ "glGetBufferPointervARB",
32556+ "glGetVertexAttribPointerv",
32557+ "glGetVertexAttribPointervARB",
32558+ "glVertexAttribPointer",
32559+ "glVertexAttribPointerARB",
32560+ "glGetVariantPointervEXT",
32561+ NULL,
32562+};
32563+
32564+void get_func_dealt_by_hand()
32565+{
32566+ FILE* f = fopen("../target-i386/gl_func_perso.h", "r");
32567+ char buffer[256];
32568+ int i = 0;
32569+ char* c;
32570+ while(fgets(buffer, 256, f))
32571+ {
32572+ if (strstr(buffer, "MAGIC_MACRO("))
32573+ {
32574+ func_dealt_by_hand[i] = strdup(strstr(buffer, "MAGIC_MACRO(") + strlen("MAGIC_MACRO("));
32575+ * strstr(func_dealt_by_hand[i], ")") = 0;
32576+ c = strstr(func_dealt_by_hand[i], "_");
32577+ if (c && c != func_dealt_by_hand[i]) *c = 0;
32578+ i ++;
32579+ }
32580+ }
32581+ fclose(f);
32582+
32583+ int j = 0;
32584+ while(ignore_func[j])
32585+ {
32586+ func_dealt_by_hand[i] = ignore_func[j];
32587+ i++;
32588+ j++;
32589+ }
32590+}
32591+
32592+static const char* just_for_server_side_list[] =
32593+{
32594+ "glEnableClientState",
32595+ "glDisableClientState",
32596+ "glPushClientAttrib",
32597+ "glPopClientAttrib",
32598+ "glPixelStorei",
32599+ "glPixelStoref",
32600+ "glClientActiveTexture",
32601+ "glClientActiveTextureARB",
32602+ "glEnableVertexAttribArray",
32603+ "glEnableVertexAttribArrayARB",
32604+ "glDisableVertexAttribArray",
32605+ "glDisableVertexAttribArrayARB",
32606+ "glDrawElementArrayATI",
32607+ "glDrawRangeElementArrayATI",
32608+ "glGenSymbolsEXT",
32609+ "glFreeObjectBufferATI",
32610+ "glUnmapObjectBufferATI",
32611+ "glLockArraysEXT",
32612+ "glUnlockArraysEXT",
32613+ "glDepthFunc",
32614+ "glFogf",
32615+ "glFogi",
32616+ "glClipPlane",
32617+ "glGetClipPlane",
32618+
32619+/* begin of openquartz optimization */
32620+#if 1
32621+ "glMatrixMode",
32622+ "glOrtho",
32623+ "glFrustum",
32624+ "glPushMatrix",
32625+ "glPopMatrix",
32626+ "glLoadIdentity",
32627+ "glLoadMatrixd",
32628+ "glLoadMatrixf",
32629+ "glMultMatrixd",
32630+ "glMultMatrixf",
32631+ "glRotated",
32632+ "glRotatef",
32633+ "glScaled",
32634+ "glScalef",
32635+ "glTranslated",
32636+ "glTranslatef",
32637+#endif
32638+/* end of openquartz optimization */
32639+
32640+ "glGetError",
32641+ "glActiveTextureARB",
32642+
32643+ "glViewport",
32644+ "glScissor",
32645+
32646+ "glBindBufferARB",
32647+ "glDeleteBuffersARB",
32648+ "glGenBuffersARB",
32649+ "glBufferDataARB",
32650+ "glBufferSubDataARB",
32651+ "glGetBufferSubDataARB",
32652+ "glGetBufferParameterivARB",
32653+ "glBindBuffer",
32654+ "glDeleteBuffers",
32655+ "glGenBuffers",
32656+ "glBufferData",
32657+ "glBufferSubData",
32658+ "glGetBufferSubData",
32659+ "glGetBufferParameteriv",
32660+
32661+ "glPushAttrib",
32662+ "glPopAttrib",
32663+ "glEnable",
32664+ "glDisable",
32665+ "glIsEnabled",
32666+ "glBindTexture",
32667+ "glBindTextureEXT",
32668+ "glFogfv",
32669+ "glFogiv",
32670+ "glBitmap",
32671+ "glGetTexImage",
32672+ "glReadPixels",
32673+ "glDrawPixels",
32674+ "glSelectBuffer",
32675+ "glFeedbackBuffer",
32676+
32677+ "glTexImage1D",
32678+ "glTexImage2D",
32679+ "glTexImage3D",
32680+ "glTexSubImage1D",
32681+ "glTexSubImage2D",
32682+ "glTexSubImage3D",
32683+
32684+ "glTexImage3DEXT",
32685+ "glTexSubImage1DEXT",
32686+ "glTexSubImage2DEXT",
32687+ "glTexSubImage3DEXT",
32688+
32689+ "glGetCompressedTexImage",
32690+ "glCompressedTexImage1D",
32691+ "glCompressedTexImage2D",
32692+ "glCompressedTexImage3D",
32693+ "glCompressedTexSubImage1D",
32694+ "glCompressedTexSubImage2D",
32695+ "glCompressedTexSubImage3D",
32696+
32697+ "glGetCompressedTexImageARB",
32698+ "glCompressedTexImage1DARB",
32699+ "glCompressedTexImage2DARB",
32700+ "glCompressedTexImage3DARB",
32701+ "glCompressedTexSubImage1DARB",
32702+ "glCompressedTexSubImage2DARB",
32703+ "glCompressedTexSubImage3DARB",
32704+
32705+ "glCallLists",
32706+ "glNewList",
32707+ "glDeleteLists",
32708+ "glGenLists",
32709+
32710+ "glGenTextures",
32711+ "glDeleteTextures",
32712+ "glDeleteTexturesEXT",
32713+ "glMap1f",
32714+ "glMap1d",
32715+ "glMap2f",
32716+ "glMap2d",
32717+ "glGetMapdv",
32718+ "glGetMapfv",
32719+ "glGetMapiv",
32720+ "glGetBooleanv",
32721+ "glGetIntegerv",
32722+ "glGetFloatv",
32723+ "glGetDoublev",
32724+
32725+ "glGetPixelMapfv",
32726+ "glGetPixelMapuiv",
32727+ "glGetPixelMapusv",
32728+ "glGetProgramStringARB",
32729+ "glGetProgramStringNV",
32730+ "glArrayElement",
32731+ "glDrawArrays",
32732+ "glDrawElements",
32733+ "glDrawRangeElements",
32734+ "glDrawRangeElementsEXT",
32735+ "glGetProgramInfoLog",
32736+ "glGetTexLevelParameteriv",
32737+ "glGetInfoLogARB",
32738+ "glGetShaderInfoLog",
32739+ "glGetAttachedObjectsARB",
32740+ "glGetAttachedShaders",
32741+ "glGetActiveUniformARB",
32742+ "glGetActiveUniform",
32743+ "glGetUniformLocationARB",
32744+ "glGetUniformLocation",
32745+ "glGetUniformfvARB",
32746+ "glGetUniformfv",
32747+ "glGetUniformivARB",
32748+ "glGetUniformiv",
32749+ "glGetUniformuivEXT",
32750+ "glGetShaderSourceARB",
32751+ "glGetShaderSource",
32752+ "glGetActiveAttribARB",
32753+ "glGetActiveAttrib",
32754+ "glGetAttribLocationARB",
32755+ "glGetAttribLocation",
32756+
32757+ "glNewObjectBufferATI",
32758+ "glUpdateObjectBufferATI",
32759+
32760+ "glSetLocalConstantEXT",
32761+ "glSetInvariantEXT",
32762+ "glVariantbvEXT",
32763+ "glVariantsvEXT",
32764+ "glVariantivEXT",
32765+ "glVariantfvEXT",
32766+ "glVariantdvEXT",
32767+ "glVariantubvEXT",
32768+ "glVariantusvEXT",
32769+ "glVariantuivEXT",
32770+ "glGetVariantBooleanvEXT",
32771+ "glGetVariantIntegervEXT",
32772+ "glGetVariantFloatvEXT",
32773+ "glGetInvariantBooleanvEXT",
32774+ "glGetInvariantIntegervEXT",
32775+ "glGetInvariantFloatvEXT",
32776+ "glGetLocalConstantBooleanvEXT",
32777+ "glGetLocalConstantIntegervEXT",
32778+ "glGetLocalConstantFloatvEXT",
32779+
32780+ "glMatrixIndexubvARB",
32781+ "glMatrixIndexusvARB",
32782+ "glMatrixIndexuivARB",
32783+
32784+ "glColorTable",
32785+ "glColorSubTable",
32786+ "glGetColorTable",
32787+ "glConvolutionFilter1D",
32788+ "glConvolutionFilter2D",
32789+ "glGetConvolutionFilter",
32790+ "glSeparableFilter2D",
32791+ "glGetSeparableFilter",
32792+ "glGetHistogram",
32793+ "glGetMinmax",
32794+ "glColorTableEXT",
32795+ "glColorSubTableEXT",
32796+ "glGetColorTableEXT",
32797+ "glConvolutionFilter1DEXT",
32798+ "glConvolutionFilter2DEXT",
32799+ "glGetConvolutionFilterEXT",
32800+ "glSeparableFilter2DEXT",
32801+ "glGetSeparableFilterEXT",
32802+ "glGetHistogramEXT",
32803+ "glGetMinmaxEXT",
32804+
32805+ "glGetTexParameterfv",
32806+
32807+ "glGetVertexAttribivARB",
32808+ "glGetVertexAttribfvARB",
32809+ "glGetVertexAttribdvARB",
32810+ "glGetVertexAttribiv",
32811+ "glGetVertexAttribfv",
32812+ "glGetVertexAttribdv",
32813+
32814+ "glGetDetailTexFuncSGIS",
32815+ "glGetSharpenTexFuncSGIS",
32816+
32817+ "fake_gluBuild2DMipmaps",
32818+
32819+ "glRenderMode",
32820+
32821+ "glEnableVariantClientStateEXT",
32822+ "glDisableVariantClientStateEXT",
32823+
32824+ "glGetActiveVaryingNV",
32825+
32826+ NULL,
32827+};
32828+
32829+static int just_for_server_side_func(char* funcname)
32830+{
32831+ int i;
32832+ for(i=0;just_for_server_side_list[i];i++)
32833+ {
32834+ if (strcmp(just_for_server_side_list[i], funcname) == 0)
32835+ return 1;
32836+ }
32837+ return 0;
32838+}
32839+
32840+int parse(FILE* f, FuncDesc* funcDesc, int funcDescCount, int ignoreEXT)
32841+{
32842+ char buffer[256];
32843+ while(fgets(buffer, 256, f))
32844+ {
32845+
32846+ if (strncmp(buffer, "GLAPI", 5) == 0 && strstr(buffer, "APIENTRY") && strstr(buffer, "("))
32847+ {
32848+ int i = 0;
32849+ int skip = 0;
32850+ if (func_dealt_by_hand[0] == 0)
32851+ {
32852+ get_func_dealt_by_hand();
32853+ }
32854+ while (func_dealt_by_hand[i])
32855+ {
32856+ if (strstr(buffer, func_dealt_by_hand[i]))
32857+ {
32858+ skip = 1;
32859+ break;
32860+ }
32861+ i++;
32862+ }
32863+ if (skip)
32864+ continue;
32865+
32866+ char** args = malloc(15 * sizeof(char*));
32867+ int narg = 0;
32868+ char* type = buffer + 6;
32869+ char* n = strstr(type, "GLAPIENTRY") ? strstr(type, "GLAPIENTRY") : strstr(type, "APIENTRY");
32870+ int skip_length = strstr(type, "GLAPIENTRY") ? 11 : 9;
32871+ n[-1] = 0;
32872+ type = strdup(type);
32873+ n += skip_length;
32874+ char* fonc = n;
32875+ n = strstr(n, "(");
32876+ if (n[-1] == ' ') n[-1] = 0;
32877+ n[0] = 0;
32878+ fonc = strdup(fonc);
32879+ /*if (strstr(fonc, "glLockArraysEXT") || strstr(fonc, "glUnlockArraysEXT"))
32880+ {
32881+ }
32882+ else*/
32883+
32884+
32885+ if (ignoreEXT == 1 && isExtByName(fonc))
32886+ {
32887+ free(type);
32888+ free(fonc);
32889+ continue;
32890+ }
32891+ n++;
32892+ while(1)
32893+ {
32894+ char* virg = strstr(n, ",");
32895+ if (virg)
32896+ {
32897+ args[narg] = n;
32898+ virg[0] = 0;
32899+ args[narg] = get_arg_type(args[narg]);
32900+ narg++;
32901+ n = virg+1;
32902+ }
32903+ else
32904+ break;
32905+ }
32906+ while (strstr(n, ")") == 0)
32907+ {
32908+ fgets(buffer, 256, f);
32909+ n = buffer;
32910+ while(1)
32911+ {
32912+ char* virg = strstr(n, ",");
32913+ if (virg)
32914+ {
32915+ args[narg] = n;
32916+ virg[0] = 0;
32917+ args[narg] = get_arg_type(args[narg]);
32918+ narg++;
32919+ n = virg+1;
32920+ }
32921+ else
32922+ break;
32923+ }
32924+ }
32925+ char* par = strstr(n, ")");
32926+ args[narg] = n;
32927+ par[0] = 0;
32928+ args[narg] = get_arg_type(args[narg]);
32929+ narg++;
32930+
32931+
32932+ /*printf("%s %s (", type, fonc);
32933+ for(i=0;i<narg;i++)
32934+ {
32935+ printf("%s,", args[i]);
32936+ }
32937+ printf(")\n");*/
32938+
32939+ for(i=0;i<funcDescCount;i++)
32940+ {
32941+ if (strcmp(funcDesc[i].name, fonc) == 0)
32942+ {
32943+ if (ignoreEXT == 0)
32944+ funcDesc[i].isExt = 1;
32945+ break;
32946+ }
32947+ }
32948+ if (i == funcDescCount)
32949+ {
32950+ funcDesc[funcDescCount].type = type;
32951+ funcDesc[funcDescCount].name = fonc;
32952+ funcDesc[funcDescCount].nargs = narg;
32953+ funcDesc[funcDescCount].args = args;
32954+ funcDesc[funcDescCount].isExt = ignoreEXT == 0;
32955+ funcDescCount++;
32956+ }
32957+ else
32958+ {
32959+ free(fonc);
32960+ free(args);
32961+ free(type);
32962+ }
32963+ /*
32964+ for(i=0;i<narg;i++)
32965+ {
32966+ free(args[i]);
32967+ }
32968+ free(fonc);
32969+ free(type);*/
32970+ }
32971+ }
32972+ return funcDescCount;
32973+}
32974+
32975+typedef struct
32976+{
32977+ char* str;
32978+ int i;
32979+} StringIntStruct;
32980+
32981+StringIntStruct argDependingOnPreviousArgTab[] =
32982+{
32983+ { "glLoadProgramNV", 3},
32984+ { "ProgramNamedParameter", 2},
32985+ { "glDeleteBuffers", 1},
32986+ { "glDrawBuffers", 1},
32987+ { "glGenPrograms", 1},
32988+ { "glDeletePrograms", 1},
32989+ { "glGenQueries", 1},
32990+ { "glDeleteQueries", 1},
32991+ { "glGenFencesNV", 1},
32992+ { "glDeleteFencesNV", 1},
32993+ { "glGenOcclusionQueriesNV", 1},
32994+ { "glDeleteOcclusionQueriesNV", 1},
32995+ { "glRequestResidentProgramsNV", 1},
32996+ { "glDeleteTextures", 1},
32997+ { "glGenFramebuffersEXT", 1},
32998+ { "glDeleteFramebuffersEXT", 1},
32999+ { "glGenRenderbuffersEXT", 1},
33000+ { "glDeleteRenderbuffersEXT", 1},
33001+ { "glUniform1fv", 2},
33002+ { "glUniform2fv", 2},
33003+ { "glUniform3fv", 2},
33004+ { "glUniform4fv", 2},
33005+ { "glUniform1iv", 2},
33006+ { "glUniform2iv", 2},
33007+ { "glUniform3iv", 2},
33008+ { "glUniform4iv", 2},
33009+ { "glUniform1uivEXT", 2},
33010+ { "glUniform2uivEXT", 2},
33011+ { "glUniform3uivEXT", 2},
33012+ { "glUniform4uivEXT", 2},
33013+ { "glProgramParameters4fvNV", 3},
33014+ { "glProgramParameters4dvNV", 3},
33015+ { "glProgramLocalParameters4fvEXT", 3},
33016+ { "glProgramLocalParametersI4ivNV", 3},
33017+ { "glProgramLocalParametersI4uivNV", 3},
33018+ { "glProgramEnvParameters4fvEXT", 3},
33019+ { "glProgramEnvParametersI4ivNV", 3},
33020+ { "glProgramEnvParametersI4uivNV", 3},
33021+ { "glAreProgramsResidentNV", 1} ,
33022+ { "glAreProgramsResidentNV", 2} ,
33023+ { "glAreTexturesResident", 1} ,
33024+ { "glAreTexturesResident", 2} ,
33025+ { "glPrioritizeTextures", 1} ,
33026+ { "glPrioritizeTextures", 2} ,
33027+ { "glProgramStringARB", 3} ,
33028+
33029+ { "glVertexAttribs", 2},
33030+
33031+ { "glUniformMatrix", 3 },
33032+
33033+ { "glGetVertexAttribfv", 2},
33034+ { "glGetVertexAttribiv", 2},
33035+ { "glGetVertexAttribdv", 2},
33036+ { "glGetVertexAttribIivEXT", 2},
33037+ { "glGetVertexAttribIuivEXT", 2},
33038+
33039+ { "glPointParameterfv", 1},
33040+ { "glPointParameteriv", 1},
33041+
33042+ { "glWeightbvARB", 1},
33043+ { "glWeightsvARB", 1},
33044+ { "glWeightivARB", 1},
33045+ { "glWeightfvARB", 1},
33046+ { "glWeightdvARB", 1},
33047+ { "glWeightubvARB", 1},
33048+ { "glWeightusvARB", 1},
33049+ { "glWeightuivARB", 1},
33050+
33051+ { "glTexEnvfv", 2},
33052+ { "glTexEnviv", 2},
33053+ { "glGetTexEnvfv", 2},
33054+ { "glGetTexEnviv", 2},
33055+ { "glTexGendv", 2},
33056+ { "glTexGenfv", 2},
33057+ { "glTexGeniv", 2},
33058+ { "glGetTexGendv", 2},
33059+ { "glGetTexGenfv", 2},
33060+ { "glGetTexGeniv", 2},
33061+
33062+ { "glLightfv", 2},
33063+ { "glLightiv", 2},
33064+ { "glGetLightfv", 2},
33065+ { "glGetLightiv", 2},
33066+ { "glFragmentLightfvSGIX", 2},
33067+ { "glFragmentLightivSGIX", 2},
33068+ { "glGetFragmentLightfvSGIX", 2},
33069+ { "glGetFragmentLightivSGIX", 2},
33070+
33071+
33072+ { "glLightModelfv", 1},
33073+ { "glLightModeliv", 1},
33074+ { "glFragmentLightModelfvSGIX", 1},
33075+ { "glFragmentLightModelivSGIX", 1},
33076+
33077+ { "glMaterialfv", 2},
33078+ { "glMaterialiv", 2},
33079+ { "glGetMaterialfv", 2},
33080+ { "glGetMaterialiv", 2},
33081+ { "glFragmentMaterialfvSGIX", 2},
33082+ { "glFragmentMaterialivSGIX", 2},
33083+ { "glGetFragmentMaterialfvSGIX", 2},
33084+ { "glGetFragmentMaterialivSGIX", 2},
33085+
33086+ { "glFogiv", 1},
33087+ { "glFogfv", 1},
33088+
33089+ { "glTexParameterfv", 2},
33090+ { "glTexParameteriv", 2},
33091+ { "glGetTexParameterfv", 2},
33092+ { "glGetTexParameteriv", 2},
33093+
33094+ { "glTexParameterIivEXT", 2},
33095+ { "glTexParameterIuivEXT", 2},
33096+ { "glGetTexParameterIivEXT", 2},
33097+ { "glGetTexParameterIuivEXT", 2},
33098+
33099+ { "glPixelMapfv", 2},
33100+ { "glPixelMapuiv", 2},
33101+ { "glPixelMapusv", 2},
33102+
33103+ { "glDetailTexFuncSGIS", 2 },
33104+ { "glSharpenTexFuncSGIS", 2 },
33105+
33106+ { "glSpriteParameterfvSGIX", 1 },
33107+ { "glSpriteParameterivSGIX", 1 },
33108+
33109+ { "ConvolutionParameter", 2},
33110+
33111+ { "glProgramBufferParametersfvNV", 4},
33112+ { "glProgramBufferParametersIivNV", 4},
33113+ { "glProgramBufferParametersIuivNV", 4},
33114+
33115+ { "glTransformFeedbackAttribsNV", 1},
33116+ { "glTransformFeedbackVaryingsNV", 2},
33117+};
33118+
33119+int is_arg_of_length_depending_on_previous_args(FuncDesc* funcDesc, int j)
33120+{
33121+ int i;
33122+ if (strstr(funcDesc->args[j], "*") == NULL)
33123+ return 0;
33124+ for(i=0;i< N_ELEMENTS(argDependingOnPreviousArgTab); i++)
33125+ {
33126+ if (strstr(funcDesc->name, argDependingOnPreviousArgTab[i].str) && j == argDependingOnPreviousArgTab[i].i)
33127+ return 1;
33128+ }
33129+ return 0;
33130+}
33131+
33132+static void fprintf_prototype_args(FILE* f, FuncDesc* funcDesc)
33133+{
33134+ int j;
33135+ for(j=0;j<funcDesc->nargs;j++)
33136+ {
33137+ if (j != 0) fprintf(f,", ");
33138+ if (strstr(funcDesc->args[j], "[16]"))
33139+ {
33140+ if (strstr(funcDesc->args[j], "float"))
33141+ {
33142+ fprintf(f, "const GLfloat arg_%d[16]", j);
33143+ }
33144+ else if (strstr(funcDesc->args[j], "double"))
33145+ {
33146+ fprintf(f, "const GLdouble arg_%d[16]", j);
33147+ }
33148+ else
33149+ {
33150+ exit(-1);
33151+ }
33152+ }
33153+ else if (strstr(funcDesc->args[j], "[128]") && strstr(funcDesc->args[j], "GLubyte"))
33154+ fprintf(f, (strstr(funcDesc->args[j], "const")) ? "const GLubyte* arg_%d" : "GLubyte* arg_%d", j);
33155+ else
33156+ fprintf(f, "%s arg_%d", funcDesc->args[j], j);
33157+ }
33158+}
33159+
33160+int main(int argc, char* argv[])
33161+{
33162+ FuncDesc funcDesc[3000];
33163+ int funcDescCount = 0;
33164+ FILE* f;
33165+
33166+ f = fopen("../target-i386/mesa_gl.h", "r");
33167+ assert(f);
33168+ /*if (!f)
33169+ f = fopen("/usr/include/GL/gl.h", "r");*/
33170+ funcDescCount = parse(f, funcDesc, 0, 1);
33171+ fclose(f);
33172+
33173+ f = fopen("../target-i386/mesa_glext.h", "r");
33174+ assert(f);
33175+ /*if (!f)
33176+ f = fopen("/usr/include/GL/glext.h", "r");*/
33177+ funcDescCount = parse(f, funcDesc, funcDescCount, 0);
33178+ fclose(f);
33179+
33180+ FILE* header = fopen("gl_func.h", "w");
33181+ FILE* client_stub = fopen("client_stub.c", "w");
33182+ FILE* server_stub = fopen("server_stub.c", "w");
33183+
33184+ fprintf(header, "/* This is a generated file. DO NOT EDIT ! */\n\n");
33185+ fprintf(header, "#define COMPOSE(x,y) x##y\n");
33186+ fprintf(header, "#define MAGIC_MACRO(x) COMPOSE(x,_func)\n");
33187+ fprintf(header, "enum {\n"
33188+ "#include \"gl_func_perso.h\"\n");
33189+
33190+ fprintf(client_stub, "/* This is a generated file. DO NOT EDIT ! */\n\n");
33191+
33192+ fprintf(server_stub, "/* This is a generated file. DO NOT EDIT ! */\n\n");
33193+
33194+ int i;
33195+ for(i=0;i<funcDescCount;i++)
33196+ {
33197+ funcDesc[i].ok = 0;
33198+ char* name = funcDesc[i].name;
33199+ char* type = funcDesc[i].type;
33200+ if ((strcmp(type, "void") == 0 || strcmp(type, "GLboolean") == 0 ||
33201+ strcmp(type, "GLuint") == 0 || strcmp(type, "GLint") == 0 ||
33202+ strcmp(type, "GLenum") == 0) || strcmp(type, "GLhandleARB") == 0 ||
33203+ strcmp(type, "GLhalf") == 0 || strcmp(type, "GLhalfNV") == 0)
33204+ {
33205+ int pointer_of_unknown_size = 0;
33206+ int j;
33207+
33208+ if (funcDesc[i].nargs == 1 && strcmp(funcDesc[i].args[0], "void") == 0)
33209+ {
33210+ funcDesc[i].nargs = 0;
33211+ }
33212+ for(j=0;j<funcDesc[i].nargs-1;j++)
33213+ {
33214+ if (!is_arg_of_length_depending_on_previous_args(&funcDesc[i], j) &&
33215+ strstr(funcDesc[i].args[j], "const GLchar") == NULL &&
33216+ strstr(funcDesc[i].args[j], "[16]") == NULL)
33217+ {
33218+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "*") != NULL;
33219+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "[") != NULL;
33220+ }
33221+ }
33222+
33223+ if (pointer_of_unknown_size == 0)
33224+ {
33225+ char* signature_type_name;
33226+ if (is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL))
33227+ {
33228+ if (strstr(signature_type_name, "TYPE_OUT"))
33229+ funcDesc[i].has_out_parameters = 1;
33230+ }
33231+ else
33232+ {
33233+ if (funcDesc[i].nargs-1 >= 0)
33234+ {
33235+ j = funcDesc[i].nargs-1;
33236+ if (!is_arg_of_length_depending_on_previous_args(&funcDesc[i], j) &&
33237+ strstr(funcDesc[i].args[j], "const GLchar") == NULL &&
33238+ strstr(funcDesc[i].args[j], "[16]") == NULL)
33239+ {
33240+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "*") != NULL;
33241+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "[") != NULL;
33242+ }
33243+ }
33244+ }
33245+ }
33246+ if (pointer_of_unknown_size && funcDesc[i].nargs == 1)
33247+ {
33248+ if (strstr(funcDesc[i].name, "Matrixf") || strstr(funcDesc[i].name, "Matrixd"))
33249+ {
33250+ free(funcDesc[i].args[0]);
33251+ if (strstr(funcDesc[i].name, "Matrixf"))
33252+ funcDesc[i].args[0] = strdup("GLfloat m[16]");
33253+ else
33254+ funcDesc[i].args[0] = strdup("GLdouble m[16]");
33255+ pointer_of_unknown_size = 0;
33256+ }
33257+ else if (strcmp(funcDesc[i].name, "glPolygonStipple") == 0)
33258+ {
33259+ free(funcDesc[i].args[0]);
33260+ funcDesc[i].args[0] = strdup("const GLubyte mask[128]");
33261+ pointer_of_unknown_size = 0;
33262+ }
33263+ else if (strcmp(funcDesc[i].name, "glGetPolygonStipple") == 0)
33264+ {
33265+ free(funcDesc[i].args[0]);
33266+ funcDesc[i].args[0] = strdup("GLubyte mask[128]");
33267+ funcDesc[i].has_out_parameters = 1;
33268+ pointer_of_unknown_size = 0;
33269+ }
33270+ }
33271+ if (just_for_server_side_func(name) || pointer_of_unknown_size == 0)
33272+ {
33273+ fprintf(header, " %s_func,\n", funcDesc[i].name);
33274+ funcDesc[i].ok = 1;
33275+ if (just_for_server_side_func(name))
33276+ funcDesc[i].just_for_server_side = 1;
33277+ for(j=0;j<funcDesc[i].nargs;j++)
33278+ {
33279+ if (strstr(get_type_string(funcDesc[i].args[j]), "OUT"))
33280+ funcDesc[i].has_out_parameters = 1;
33281+ }
33282+ }
33283+ else
33284+ {
33285+ fprintf(stderr, "not handled either manually or automatically : %s\n", funcDesc[i].name);
33286+ }
33287+ }
33288+ }
33289+
33290+ fprintf(header, " GL_N_CALLS\n};\n");
33291+
33292+
33293+ fprintf(server_stub, "void execute_func(int func_number, arg_t *args, int *pret_int, char *pret_char)\n");
33294+ fprintf(server_stub, "{\n");
33295+ fprintf(server_stub, " switch(func_number)\n");
33296+ fprintf(server_stub, " {\n");
33297+
33298+
33299+ for(i=0;i<funcDescCount;i++)
33300+ {
33301+ if (funcDesc[i].ok)
33302+ {
33303+ fprintf(header, "static const int %s_signature[] = { %s, %d, ",
33304+ funcDesc[i].name,
33305+ get_type_string(funcDesc[i].type),
33306+ funcDesc[i].has_out_parameters);
33307+ fprintf(header, "%d", funcDesc[i].nargs);
33308+ int j;
33309+ char* signature_type_name;
33310+ int n_args_to_check = is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL) ? funcDesc[i].nargs - 1 : funcDesc[i].nargs;
33311+
33312+ for(j=0;j<n_args_to_check;j++)
33313+ {
33314+ if (is_arg_of_length_depending_on_previous_args(&funcDesc[i], j))
33315+ {
33316+ fprintf(header, ", %s_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS", get_type_string(funcDesc[i].args[j]));
33317+ }
33318+ else
33319+ fprintf(header, ", %s", get_type_string(funcDesc[i].args[j]));
33320+ }
33321+
33322+ if (is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL))
33323+ {
33324+ fprintf(header, ", %s", signature_type_name);
33325+ }
33326+ fprintf(header, "};\n");
33327+
33328+
33329+ if (funcDesc[i].just_for_server_side == 0)
33330+ {
33331+ if (isExt(&funcDesc[i]))
33332+ fprintf(client_stub, "GLAPI %s APIENTRY EXT_FUNC(%s) (", funcDesc[i].type, funcDesc[i].name);
33333+ else
33334+ fprintf(client_stub, "GLAPI %s APIENTRY %s(", funcDesc[i].type, funcDesc[i].name);
33335+ fprintf_prototype_args(client_stub, &funcDesc[i]);
33336+ fprintf(client_stub, ")\n");
33337+ fprintf(client_stub, "{\n");
33338+ if (strcmp(funcDesc[i].type, "void") != 0)
33339+ {
33340+ fprintf(client_stub, " %s ret;\n", funcDesc[i].type);
33341+ if (isExt(&funcDesc[i]))
33342+ fprintf(client_stub, " CHECK_PROC_WITH_RET(%s);\n", funcDesc[i].name);
33343+ }
33344+ else
33345+ {
33346+ if (isExt(&funcDesc[i]))
33347+ fprintf(client_stub, " CHECK_PROC(%s);\n", funcDesc[i].name);
33348+ }
33349+
33350+ /*
33351+ fprintf(client_stub, " do_opengl_call(%s_func, %s",
33352+ funcDesc[i].name, (strcmp(funcDesc[i].type, "void") == 0) ? "NULL" : "&ret");
33353+ for(j=0;j<funcDesc[i].nargs;j++)
33354+ {
33355+ fprintf(client_stub, ", arg_%d", j);
33356+ }
33357+ fprintf(client_stub, ");\n");
33358+ */
33359+
33360+ if (funcDesc[i].nargs)
33361+ {
33362+ fprintf(client_stub, " long args[] = { ");
33363+ for(j=0;j<funcDesc[i].nargs;j++)
33364+ {
33365+ if (j > 0) fprintf(client_stub, ", ");
33366+ if (strstr(funcDesc[i].args[j], "*"))
33367+ {
33368+ fprintf(client_stub, "POINTER_TO_ARG(arg_%d)", j);
33369+ }
33370+ else
33371+ {
33372+ const char* symbolic_type = get_type_string(funcDesc[i].args[j]);
33373+ if (strcmp(symbolic_type, "TYPE_CHAR") == 0)
33374+ fprintf(client_stub, "CHAR_TO_ARG");
33375+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_CHAR") == 0)
33376+ fprintf(client_stub, "UNSIGNED_CHAR_TO_ARG");
33377+ else if (strcmp(symbolic_type, "TYPE_SHORT") == 0)
33378+ fprintf(client_stub, "SHORT_TO_ARG");
33379+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_SHORT") == 0)
33380+ fprintf(client_stub, "UNSIGNED_SHORT_TO_ARG");
33381+ else if (strcmp(symbolic_type, "TYPE_INT") == 0)
33382+ fprintf(client_stub, "INT_TO_ARG");
33383+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_INT") == 0)
33384+ fprintf(client_stub, "UNSIGNED_INT_TO_ARG");
33385+ else if (strcmp(symbolic_type, "TYPE_FLOAT") == 0)
33386+ fprintf(client_stub, "FLOAT_TO_ARG");
33387+ else if (strcmp(symbolic_type, "TYPE_16FLOAT") == 0)
33388+ fprintf(client_stub, "POINTER_TO_ARG");
33389+ else if (strcmp(symbolic_type, "TYPE_DOUBLE") == 0)
33390+ fprintf(client_stub, "DOUBLE_TO_ARG");
33391+ else if ( strcmp(symbolic_type, "TYPE_16DOUBLE") == 0)
33392+ fprintf(client_stub, "POINTER_TO_ARG");
33393+ else if ( strcmp(symbolic_type, "TYPE_128UCHAR") == 0 || strcmp(symbolic_type, "TYPE_OUT_128UCHAR") == 0)
33394+ fprintf(client_stub, "POINTER_TO_ARG");
33395+ else
33396+ {
33397+ fprintf(stderr, "Unknown : %s\n", symbolic_type);
33398+ assert(0);
33399+ }
33400+ fprintf(client_stub, "(arg_%d)", j);
33401+ }
33402+ }
33403+ fprintf(client_stub, "};\n");
33404+ }
33405+
33406+ fprintf(client_stub, " do_opengl_call(%s_func, %s, %s, NULL);\n",
33407+ funcDesc[i].name, (strcmp(funcDesc[i].type, "void") == 0) ? "NULL" : "&ret",
33408+ (funcDesc[i].nargs) ? "args" : "NULL");
33409+
33410+ if (strcmp(funcDesc[i].type, "void") != 0)
33411+ {
33412+ fprintf(client_stub, " return ret;\n");
33413+ }
33414+ fprintf(client_stub, "}\n\n");
33415+ }
33416+
33417+ fprintf(server_stub, " case %s_func:\n", funcDesc[i].name);
33418+ fprintf(server_stub, " {\n");
33419+
33420+ if (isExt(&funcDesc[i]))
33421+ {
33422+ fprintf(server_stub, " GET_EXT_PTR(%s, %s, (", funcDesc[i].type, funcDesc[i].name);
33423+ fprintf_prototype_args(server_stub, &funcDesc[i]);
33424+ fprintf(server_stub, "));\n");
33425+ }
33426+
33427+ fprintf(server_stub, " ");
33428+
33429+ if (strcmp(funcDesc[i].type, "void") == 0)
33430+ ;
33431+ else if (strcmp(get_type_string(funcDesc[i].type), "TYPE_INT") == 0 ||
33432+ strcmp(get_type_string(funcDesc[i].type), "TYPE_UNSIGNED_INT") == 0)
33433+ fprintf(server_stub, "*pret_int = ");
33434+ else if (strcmp(get_type_string(funcDesc[i].type), "TYPE_CHAR") == 0 ||
33435+ strcmp(get_type_string(funcDesc[i].type), "TYPE_UNSIGNED_CHAR") == 0)
33436+ fprintf(server_stub, "*pret_char = ");
33437+ else
33438+ {
33439+ fprintf(stderr, "unknown ret type = %s\n", get_type_string(funcDesc[i].type));
33440+ exit(-1);
33441+ }
33442+ /*if (strstr(funcDesc[i].name, "EXT"))
33443+ {
33444+ char* dup = strdup(funcDesc[i].name);
33445+ *strstr(dup, "EXT") = 0;
33446+ fprintf(server_stub, "%s(", dup);
33447+ free(dup);
33448+ }
33449+ else*/
33450+ {
33451+ if (isExt(&funcDesc[i]))
33452+ fprintf(server_stub, "ptr_func_%s(", funcDesc[i].name);
33453+ else
33454+ fprintf(server_stub, "%s(", funcDesc[i].name);
33455+ }
33456+ char* c_type_name;
33457+ if (is_known_arg_vector(&funcDesc[i], NULL, &c_type_name))
33458+ {
33459+ for(j=0;j<funcDesc[i].nargs - 1;j++)
33460+ {
33461+ if (j != 0) fprintf(server_stub,", ");
33462+ print_server_side_argument(server_stub, j, funcDesc[i].args[j]);
33463+ }
33464+ if (j != 0) fprintf(server_stub,", ");
33465+ if (strstr(funcDesc[i].args[funcDesc[i].nargs - 1], "const"))
33466+ fprintf(server_stub, "(const %s*)args[%d]", c_type_name, j);
33467+ else
33468+ fprintf(server_stub, "(%s*)args[%d]", c_type_name, j);
33469+ }
33470+ else
33471+ {
33472+ for(j=0;j<funcDesc[i].nargs;j++)
33473+ {
33474+ if (j != 0) fprintf(server_stub,", ");
33475+ print_server_side_argument(server_stub, j, funcDesc[i].args[j]);
33476+ }
33477+ }
33478+ fprintf(server_stub, ");\n");
33479+
33480+ fprintf(server_stub, " break;\n");
33481+ fprintf(server_stub, " }\n");
33482+ }
33483+ }
33484+
33485+ fprintf(server_stub, " default:\n");
33486+ fprintf(server_stub, " fprintf(stderr, \"unknown=%%d\", func_number);\n");
33487+ fprintf(server_stub, " break;\n");
33488+ fprintf(server_stub, " }\n");
33489+ fprintf(server_stub, "}\n");
33490+
33491+ fprintf(header, "#undef MAGIC_MACRO\n");
33492+ fprintf(header, "#define MAGIC_MACRO(x) COMPOSE(x,_signature)\n");
33493+ fprintf(header, "static const int* tab_opengl_calls[GL_N_CALLS] =\n");
33494+ fprintf(header, "{\n");
33495+ fprintf(header, "#include \"gl_func_perso.h\"\n");
33496+ for(i=0;i<funcDescCount;i++)
33497+ {
33498+ if (funcDesc[i].ok)
33499+ {
33500+ fprintf(header, " %s_signature,\n", funcDesc[i].name);
33501+ }
33502+ }
33503+ fprintf(header, "};\n\n");
33504+
33505+ fprintf(header, "#undef MAGIC_MACRO\n");
33506+ fprintf(header, "#define MAGIC_MACRO(x) #x\n");
33507+ fprintf(header, "static const char* tab_opengl_calls_name[GL_N_CALLS] =\n");
33508+ fprintf(header, "{\n");
33509+ fprintf(header, "#include \"gl_func_perso.h\"\n");
33510+ for(i=0;i<funcDescCount;i++)
33511+ {
33512+ if (funcDesc[i].ok)
33513+ {
33514+ fprintf(header, " \"%s\",\n", funcDesc[i].name);
33515+ }
33516+ }
33517+ fprintf(header, "};\n\n");
33518+
33519+ fclose(header);
33520+ fclose(server_stub);
33521+ fclose(client_stub);
33522+
33523+ return 0;
33524+}
33525Index: git/target-i386/parse_mesa_get_c.c
33526===================================================================
33527--- /dev/null 1970-01-01 00:00:00.000000000 +0000
33528+++ git/target-i386/parse_mesa_get_c.c 2009-05-23 11:22:17.000000000 +0100
33529@@ -0,0 +1,225 @@
33530+/*
33531+ * Parse the "get.c" from mesa source tree to generate "glgetv_cst.h"
33532+ *
33533+ * Copyright (c) 2007 Even Rouault
33534+ *
33535+ * Permission is hereby granted, free of charge, to any person obtaining a copy
33536+ * of this software and associated documentation files (the "Software"), to deal
33537+ * in the Software without restriction, including without limitation the rights
33538+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
33539+ * copies of the Software, and to permit persons to whom the Software is
33540+ * furnished to do so, subject to the following conditions:
33541+ *
33542+ * The above copyright notice and this permission notice shall be included in
33543+ * all copies or substantial portions of the Software.
33544+ *
33545+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
33546+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
33547+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
33548+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33549+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
33550+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
33551+ * THE SOFTWARE.
33552+ */
33553+
33554+// gcc -Wall parse_mesa_get_c.c -o parse_mesa_get_c -I. && ./parse_mesa_get_c
33555+
33556+#include <stdlib.h>
33557+#include <stdio.h>
33558+#include <string.h>
33559+#include <assert.h>
33560+
33561+#include "mesa_gl.h"
33562+#include "mesa_glext.h"
33563+
33564+/* #include "mesa_enums.c" */
33565+
33566+int gl_lookup_enum_by_name(const char* name)
33567+{
33568+ FILE* f;
33569+ char buffer[256];
33570+ char template1[256];
33571+ char template2[256];
33572+ int i;
33573+ sprintf(template1, "#define %s\t", name);
33574+ sprintf(template2, "#define %s ", name);
33575+ for(i=0;i<2;i++)
33576+ {
33577+ if (i == 0)
33578+ f = fopen("mesa_gl.h", "r");
33579+ else
33580+ f = fopen("mesa_glext.h", "r");
33581+ while(fgets(buffer, 256, f))
33582+ {
33583+ if (strstr(buffer, template1) || strstr(buffer, template2))
33584+ {
33585+ char* c = strstr(buffer, "0x");
33586+ assert(c);
33587+ int ret;
33588+ ret = strtol(c, NULL, 16);
33589+ return ret;
33590+ }
33591+ }
33592+ fclose(f);
33593+ }
33594+
33595+ return -1;
33596+}
33597+
33598+typedef struct
33599+{
33600+ int value;
33601+ char* name;
33602+ int nb_elts;
33603+} Token;
33604+
33605+int compare_func(Token* a, Token* b)
33606+{
33607+ return a->value - b->value;
33608+}
33609+
33610+typedef struct
33611+{
33612+ int i;
33613+ char* str;
33614+} Cpl;
33615+#define CPL(x) {x, #x}
33616+
33617+Cpl constantsOneVal[] =
33618+{
33619+ CPL(GL_MAX_GENERAL_COMBINERS_NV),
33620+ CPL(GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT),
33621+ CPL(GL_MAX_VERTEX_SHADER_VARIANTS_EXT),
33622+ CPL(GL_MAX_VERTEX_SHADER_INVARIANTS_EXT),
33623+ CPL(GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
33624+ CPL(GL_MAX_VERTEX_SHADER_LOCALS_EXT),
33625+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT),
33626+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT),
33627+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT),
33628+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
33629+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
33630+};
33631+#define NB_CONSTANTS_ONE_VAL 11
33632+
33633+int main(int argc, char* argv[])
33634+{
33635+ FILE* f = fopen("mesa_get.c", "r");
33636+ char buffer[256];
33637+ int state = 0;
33638+ char name[256];
33639+ int count = 0;
33640+ char template[256];
33641+ Token tokens[1000];
33642+ int ntoken = 0;
33643+ int i;
33644+ FILE* outf = fopen("glgetv_cst.h", "w");
33645+
33646+ fprintf(outf, "/* This is a generated file. Do not edit !*/\n");
33647+ fprintf(outf, "typedef struct {\n");
33648+ fprintf(outf, " GLuint count;\n");
33649+ fprintf(outf, " GLenum token;\n");
33650+ fprintf(outf, " const char *name;\n");
33651+ fprintf(outf, "} GlGetConstant ;\n");
33652+ fprintf(outf, "static const GlGetConstant gl_get_constants[] = {\n");
33653+
33654+ while(fgets(buffer, 256, f))
33655+ {
33656+ if (strstr(buffer, "_mesa_GetBooleanv"))
33657+ {
33658+ state = 1;
33659+ }
33660+ else if (state == 1)
33661+ {
33662+ if (strstr(buffer, "_mesa_GetFloatv"))
33663+ {
33664+ break;
33665+ }
33666+ else if (strstr(buffer, "case GL_"))
33667+ {
33668+ strcpy(name, strstr(buffer, "case GL_") + 5);
33669+ *strstr(name, ":") = 0;
33670+ count = 0;
33671+ strcpy(template, "params[0]");
33672+ }
33673+ else if (strstr(buffer, template))
33674+ {
33675+ count ++;
33676+ sprintf(template, "params[%d]", count);
33677+ }
33678+ else if (strstr(buffer, "break"))
33679+ {
33680+ if (count > 0)
33681+ {
33682+ int gl_lookup = gl_lookup_enum_by_name(name);
33683+ /*
33684+ int mesa_lookup = _mesa_lookup_enum_by_name(name);
33685+ if (mesa_lookup != -1)
33686+ {
33687+ if(mesa_lookup != gl_lookup)
33688+ {
33689+ fprintf(stderr, "wrong : %s %d %d !\n", name, mesa_lookup, gl_lookup);
33690+ exit(-1);
33691+ }
33692+ }*/
33693+ if (gl_lookup == -1)
33694+ {
33695+ fprintf(stderr, "not found in includes : %s\n", name);
33696+ //fprintf(outf, "/* { %d, unknown value, \"%s\" },*/\n", count, name);
33697+ }
33698+ else
33699+ {
33700+ //fprintf(outf, " { %d, 0x%04x, \"%s\" },\n", count, gl_lookup, name);
33701+ tokens[ntoken].value = gl_lookup;
33702+ tokens[ntoken].nb_elts = count;
33703+ tokens[ntoken].name = strdup(name);
33704+ ntoken++;
33705+ }
33706+ /*fprintf(outf, "#ifdef %s\n", name);
33707+ fprintf(outf, " { %d, MAKE_TOKEN_NAME(%s) },\n", count, name);
33708+ fprintf(outf, "#endif\n");*/
33709+ }
33710+ else
33711+ fprintf(stderr, "not recognized : %s\n", name);
33712+ }
33713+ }
33714+ }
33715+
33716+ for(i=0;i<NB_CONSTANTS_ONE_VAL;i++)
33717+ {
33718+ tokens[ntoken].value = constantsOneVal[i].i;
33719+ tokens[ntoken].nb_elts = 1;
33720+ tokens[ntoken].name = strdup(constantsOneVal[i].str);
33721+ ntoken++;
33722+ }
33723+
33724+ tokens[ntoken].value = GL_SPRITE_MODE_SGIX;
33725+ tokens[ntoken].nb_elts = 1;
33726+ tokens[ntoken].name = strdup("GL_SPRITE_MODE_SGIX");
33727+ ntoken++;
33728+
33729+ tokens[ntoken].value = GL_SPRITE_AXIS_SGIX ;
33730+ tokens[ntoken].nb_elts = 3;
33731+ tokens[ntoken].name = strdup("GL_SPRITE_AXIS_SGIX ");
33732+ ntoken++;
33733+
33734+ tokens[ntoken].value = GL_SPRITE_TRANSLATION_SGIX;
33735+ tokens[ntoken].nb_elts = 3;
33736+ tokens[ntoken].name = strdup("GL_SPRITE_TRANSLATION_SGIX");
33737+ ntoken++;
33738+
33739+ tokens[ntoken].value = GL_REFERENCE_PLANE_EQUATION_SGIX;
33740+ tokens[ntoken].nb_elts = 4;
33741+ tokens[ntoken].name = strdup("GL_REFERENCE_PLANE_EQUATION_SGIX");
33742+ ntoken++;
33743+
33744+
33745+ qsort(tokens, ntoken, sizeof(Token), compare_func);
33746+ for(i=0;i<ntoken;i++)
33747+ {
33748+ fprintf(outf, " { %d, 0x%04x, \"%s\" },\n", tokens[i].nb_elts, tokens[i].value, tokens[i].name);
33749+ }
33750+ fprintf(outf, "};\n");
33751+ fclose(f);
33752+ fclose(outf);
33753+ return 0;
33754+}
33755Index: git/target-i386/translate.c
33756===================================================================
33757--- git.orig/target-i386/translate.c 2009-05-23 11:22:16.000000000 +0100
33758+++ git/target-i386/translate.c 2009-05-23 11:22:17.000000000 +0100
33759@@ -2592,11 +2592,18 @@
33760 s->is_jmp = 3;
33761 }
33762
33763+int enable_gl = 0;
33764+
33765 /* an interrupt is different from an exception because of the
33766 privilege checks */
33767 static void gen_interrupt(DisasContext *s, int intno,
33768 target_ulong cur_eip, target_ulong next_eip)
33769 {
33770+ if (enable_gl && intno == 0x99) {
33771+ gen_helper_opengl();
33772+ return;
33773+ }
33774+
33775 if (s->cc_op != CC_OP_DYNAMIC)
33776 gen_op_set_cc_op(s->cc_op);
33777 gen_jmp_im(cur_eip);
33778Index: git/vl.c
33779===================================================================
33780--- git.orig/vl.c 2009-05-23 11:22:16.000000000 +0100
33781+++ git/vl.c 2009-05-23 11:23:18.000000000 +0100
33782@@ -253,6 +253,7 @@
33783 #endif
33784 int nb_drives_opt;
33785 struct drive_opt drives_opt[MAX_DRIVES];
33786+extern int enable_gl;
33787
33788 static CPUState *cur_cpu;
33789 static CPUState *next_cpu;
33790@@ -4214,6 +4215,7 @@
33791 QEMU_OPTION_show_cursor,
33792 QEMU_OPTION_semihosting,
33793 QEMU_OPTION_old_param,
33794+ QEMU_OPTION_enable_gl,
33795 QEMU_OPTION_tb_size,
33796 QEMU_OPTION_incoming,
33797 QEMU_OPTION_chroot,
33798@@ -4345,6 +4347,7 @@
33799 { "old-param", 0, QEMU_OPTION_old_param },
33800 #endif
33801 { "tb-size", HAS_ARG, QEMU_OPTION_tb_size },
33802+ { "enable-gl", 0, QEMU_OPTION_enable_gl },
33803 { "incoming", HAS_ARG, QEMU_OPTION_incoming },
33804 { "chroot", HAS_ARG, QEMU_OPTION_chroot },
33805 { "runas", HAS_ARG, QEMU_OPTION_runas },
33806@@ -5261,6 +5264,11 @@
33807 }
33808 }
33809 break;
33810+#ifdef TARGET_OPENGL_OK
33811+ case QEMU_OPTION_enable_gl:
33812+ enable_gl = 1;
33813+ break;
33814+#endif
33815 case QEMU_OPTION_tb_size:
33816 tb_size = strtol(optarg, NULL, 0);
33817 if (tb_size < 0)
33818Index: git/hw/opengl_dummy.c
33819===================================================================
33820--- /dev/null 1970-01-01 00:00:00.000000000 +0000
33821+++ git/hw/opengl_dummy.c 2009-05-23 11:22:17.000000000 +0100
33822@@ -0,0 +1,9 @@
33823+#include "../qemu-common.h"
33824+
33825+#include <X11/Xlib.h>
33826+#include <X11/Xutil.h>
33827+
33828+void opengl_exec_set_parent_window(Display *_dpy, Window _parent_window)
33829+{
33830+ return;
33831+}