summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemu-0.13.0
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu-0.13.0')
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/enable-i386-linux-user.patch53
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/fix-configure-checks.patch20
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/fix-dirent.patch12
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/fix-nogl.patch96
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/glflags.patch13
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/init-info.patch16
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/linker-flags.patch22
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/no-strip.patch26
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/parallel_make.patch34
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/port92_fix.patch196
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/powerpc_rom.binbin0 -> 4096 bytes
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/qemu-git-qemugl-host.patch34364
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/qemu-ppc-hack.patch108
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/qemu-vmware-vga-depth.patch115
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/qemugl-allow-glxcontext-release.patch63
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/vmware-vga-fifo-rewind.patch198
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/wacom-tablet-fix.patch65
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/workaround_bad_futex_headers.patch24
18 files changed, 35425 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/enable-i386-linux-user.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/enable-i386-linux-user.patch
new file mode 100644
index 0000000000..95420ef99e
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.13.0/enable-i386-linux-user.patch
@@ -0,0 +1,53 @@
1Enable i386-linux-user
2
3Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
4
5Index: qemu-0.13.0/Makefile.target
6===================================================================
7--- qemu-0.13.0.orig/Makefile.target 2011-01-17 16:50:39.000000000 +0800
8+++ qemu-0.13.0/Makefile.target 2011-01-17 16:50:41.000000000 +0800
9@@ -54,8 +54,13 @@
10 libobj-y += cpuid.o
11 endif
12 libobj-$(CONFIG_NEED_MMU) += mmu.o
13+ifndef CONFIG_LINUX_USER
14 libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o
15 libobj-$(TARGET_X86_64) += helper_opengl.o opengl_exec.o
16+else
17+libobj-$(TARGET_I386) += dummygl.o
18+libobj-$(TARGET_X86_64) += dummygl.o
19+endif #CONFIG_LINUX_USER
20 libobj-$(TARGET_ARM) += dummygl.o
21 libobj-$(TARGET_MIPS) += dummygl.o
22 libobj-$(TARGET_PPC) += dummygl.o
23Index: qemu-0.13.0/target-i386/dummygl.c
24===================================================================
25--- /dev/null 1970-01-01 00:00:00.000000000 +0000
26+++ qemu-0.13.0/target-i386/dummygl.c 2011-01-17 16:50:41.000000000 +0800
27@@ -0,0 +1,26 @@
28+#include <string.h>
29+#include <stdlib.h>
30+#include <assert.h>
31+#include <stdint.h>
32+#include <X11/Xlib.h>
33+#include <X11/Xutil.h>
34+
35+void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window)
36+{
37+
38+}
39+
40+void opengl_process_enable(void)
41+{
42+
43+}
44+
45+
46+void mem_opengl(uint64_t ptr)
47+{
48+
49+}
50+
51+void helper_opengl(void)
52+{
53+}
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/fix-configure-checks.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/fix-configure-checks.patch
new file mode 100644
index 0000000000..46ddc6e206
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.13.0/fix-configure-checks.patch
@@ -0,0 +1,20 @@
1In native builds, qemu can fail to find zlib development files in the native
2sysroot and the build machine might not have zlib-dev packages installed.
3
4Add CFLAGS to qemu's CFLAGS which in the native case means BUILD_CFLAGS are
5added and files in the sysroot can be found.
6
7Patch from Paul Eggleton, Comments by RP 28/11/10
8
9Index: qemu-0.13.0/configure
10===================================================================
11--- qemu-0.13.0.orig/configure 2010-10-16 04:56:09.000000000 +0800
12+++ qemu-0.13.0/configure 2011-01-15 18:19:41.000000000 +0800
13@@ -134,6 +134,7 @@
14 QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS"
15 QEMU_CFLAGS="-D_FORTIFY_SOURCE=2 $QEMU_CFLAGS"
16 QEMU_CFLAGS="-I. -I\$(SRC_PATH) $QEMU_CFLAGS"
17+QEMU_CFLAGS="$QEMU_CFLAGS $CFLAGS"
18 LDFLAGS="-g $LDFLAGS"
19
20 gcc_flags="-Wold-style-declaration -Wold-style-definition -fstack-protector-all"
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/fix-dirent.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/fix-dirent.patch
new file mode 100644
index 0000000000..8bbfa0e88e
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.13.0/fix-dirent.patch
@@ -0,0 +1,12 @@
1Index: qemu/linux-user/syscall.c
2===================================================================
3--- qemu.orig/linux-user/syscall.c 2010-05-11 13:16:22.421783949 -0400
4+++ qemu/linux-user/syscall.c 2010-05-11 13:16:31.759805849 -0400
5@@ -26,6 +26,7 @@
6 #include <errno.h>
7 #include <unistd.h>
8 #include <fcntl.h>
9+#include <dirent.h>
10 #include <time.h>
11 #include <limits.h>
12 #include <sys/types.h>
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/fix-nogl.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/fix-nogl.patch
new file mode 100644
index 0000000000..fa518abbf7
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.13.0/fix-nogl.patch
@@ -0,0 +1,96 @@
1Index: qemu-0.13.0/Makefile.target
2===================================================================
3--- qemu-0.13.0.orig/Makefile.target 2011-01-17 16:53:08.000000000 +0800
4+++ qemu-0.13.0/Makefile.target 2011-01-17 16:53:11.000000000 +0800
5@@ -55,6 +55,10 @@
6 endif
7 libobj-$(CONFIG_NEED_MMU) += mmu.o
8 libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o
9+libobj-$(TARGET_X86_64) += helper_opengl.o opengl_exec.o
10+libobj-$(TARGET_ARM) += dummygl.o
11+libobj-$(TARGET_MIPS) += dummygl.o
12+libobj-$(TARGET_PPC) += dummygl.o
13 libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
14
15 libobj-y += disas.o
16Index: qemu-0.13.0/target-arm/dummygl.c
17===================================================================
18--- /dev/null 1970-01-01 00:00:00.000000000 +0000
19+++ qemu-0.13.0/target-arm/dummygl.c 2011-01-17 16:53:11.000000000 +0800
20@@ -0,0 +1,22 @@
21+#include <string.h>
22+#include <stdlib.h>
23+#include <assert.h>
24+#include <stdint.h>
25+#include <X11/Xlib.h>
26+#include <X11/Xutil.h>
27+
28+void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window)
29+{
30+
31+}
32+
33+void opengl_process_enable(void)
34+{
35+
36+}
37+
38+
39+void mem_opengl(uint64_t ptr)
40+{
41+
42+}
43Index: qemu-0.13.0/target-mips/dummygl.c
44===================================================================
45--- /dev/null 1970-01-01 00:00:00.000000000 +0000
46+++ qemu-0.13.0/target-mips/dummygl.c 2011-01-17 16:53:11.000000000 +0800
47@@ -0,0 +1,22 @@
48+#include <string.h>
49+#include <stdlib.h>
50+#include <assert.h>
51+#include <stdint.h>
52+#include <X11/Xlib.h>
53+#include <X11/Xutil.h>
54+
55+void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window)
56+{
57+
58+}
59+
60+void opengl_process_enable(void)
61+{
62+
63+}
64+
65+
66+void mem_opengl(uint64_t ptr)
67+{
68+
69+}
70Index: qemu-0.13.0/target-ppc/dummygl.c
71===================================================================
72--- /dev/null 1970-01-01 00:00:00.000000000 +0000
73+++ qemu-0.13.0/target-ppc/dummygl.c 2011-01-17 16:53:11.000000000 +0800
74@@ -0,0 +1,22 @@
75+#include <string.h>
76+#include <stdlib.h>
77+#include <assert.h>
78+#include <stdint.h>
79+#include <X11/Xlib.h>
80+#include <X11/Xutil.h>
81+
82+void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window)
83+{
84+
85+}
86+
87+void opengl_process_enable(void)
88+{
89+
90+}
91+
92+
93+void mem_opengl(uint64_t ptr)
94+{
95+
96+}
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/glflags.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/glflags.patch
new file mode 100644
index 0000000000..0a27c2dee1
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.13.0/glflags.patch
@@ -0,0 +1,13 @@
1Index: git/Makefile.target
2===================================================================
3--- git.orig/Makefile.target 2010-05-27 12:35:26.000000000 -0400
4+++ git/Makefile.target 2010-05-27 12:59:53.520415731 -0400
5@@ -326,7 +326,7 @@ vl.o: qemu-options.h
6
7 monitor.o: qemu-monitor.h
8
9-LIBS += -lGL -lGLU
10+LIBS += -lGL
11
12 ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)
13
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/init-info.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/init-info.patch
new file mode 100644
index 0000000000..77022ae541
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.13.0/init-info.patch
@@ -0,0 +1,16 @@
1# This is a workaround to the crashes seen on Ubuntu. Setting info to zero
2# makes info.info.x11.display zero and avoids the calls to
3# opengl_exec_set_parent_window, one of which is crashing.
4
5Index: qemu-0.13.0/ui/sdl.c
6===================================================================
7--- qemu-0.13.0.orig/ui/sdl.c 2011-01-15 17:40:59.000000000 +0800
8+++ qemu-0.13.0/ui/sdl.c 2011-01-15 17:41:04.000000000 +0800
9@@ -857,6 +857,7 @@
10 vi = SDL_GetVideoInfo();
11 host_format = *(vi->vfmt);
12
13+ bzero(&info, sizeof(info));
14 SDL_GetWMInfo(&info);
15 if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display)
16 opengl_exec_set_parent_window(info.info.x11.display,
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/linker-flags.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/linker-flags.patch
new file mode 100644
index 0000000000..54c480f94b
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.13.0/linker-flags.patch
@@ -0,0 +1,22 @@
1Fedora 13 switched the default behaviour of the linker to no longer
2indirectly link to required libraries (i.e. dependencies of a library
3already linked to). Therefore we need to explicitly pass the depended on
4libraries into the linker for building to work on Fedora 13.
5
6More information is available on the Fedora Wiki:
7https://fedoraproject.org/wiki/UnderstandingDSOLinkChange
8
9JL - 15/06/10
10Index: qemu-0.13.0/Makefile.target
11===================================================================
12--- qemu-0.13.0.orig/Makefile.target 2011-01-15 17:30:45.000000000 +0800
13+++ qemu-0.13.0/Makefile.target 2011-01-15 17:33:22.000000000 +0800
14@@ -193,7 +193,7 @@
15 obj-y += rwhandler.o
16 obj-$(CONFIG_KVM) += kvm.o kvm-all.o
17 obj-$(CONFIG_NO_KVM) += kvm-stub.o
18-LIBS+=-lz
19+LIBS+=-lz -lX11 -ldl
20
21 QEMU_CFLAGS += $(VNC_TLS_CFLAGS)
22 QEMU_CFLAGS += $(VNC_SASL_CFLAGS)
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/no-strip.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/no-strip.patch
new file mode 100644
index 0000000000..62cdec6109
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.13.0/no-strip.patch
@@ -0,0 +1,26 @@
1Index: qemu-0.13.0/Makefile
2===================================================================
3--- qemu-0.13.0.orig/Makefile 2011-01-17 16:41:59.000000000 +0800
4+++ qemu-0.13.0/Makefile 2011-01-17 16:44:57.000000000 +0800
5@@ -185,7 +185,7 @@
6 install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig
7 $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
8 ifneq ($(TOOLS),)
9- $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
10+ $(INSTALL_PROG) $(TOOLS) "$(DESTDIR)$(bindir)"
11 endif
12 ifneq ($(BLOBS),)
13 $(INSTALL_DIR) "$(DESTDIR)$(datadir)"
14Index: qemu-0.13.0/Makefile.target
15===================================================================
16--- qemu-0.13.0.orig/Makefile.target 2011-01-17 16:42:36.000000000 +0800
17+++ qemu-0.13.0/Makefile.target 2011-01-17 16:44:57.000000000 +0800
18@@ -351,7 +351,7 @@
19
20 install: all
21 ifneq ($(PROGS),)
22- $(INSTALL) -m 755 $(STRIP_OPT) $(PROGS) "$(DESTDIR)$(bindir)"
23+ $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)"
24 endif
25
26 # Include automatically generated dependency files
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/parallel_make.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/parallel_make.patch
new file mode 100644
index 0000000000..278b1a759d
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.13.0/parallel_make.patch
@@ -0,0 +1,34 @@
1Make -j(>=6) always fail as some job depends on config-host.h. Added following
2patch in upstream to resolve it.
3
4Could remove it in next upgrade if necessary.
5
6Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
7
8commit f0acb38015409024683911380daa94cc974e4e0e
9Author: Paul Brook <paul@codesourcery.com>
10Date: Fri Nov 26 18:46:03 2010 +0000
11
12 Add missing dependency.
13
14 Teach Makefile that cmd.o depends on a generated header (specifically
15 config-host.h).
16
17 Signed-off-by: Paul Brook <paul@codesourcery.com>
18 (cherry picked from commit 6e14404aab26f74a448747d1e793ac16bde8a92b)
19
20 Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
21
22Index: qemu-0.13.0/Makefile
23===================================================================
24--- qemu-0.13.0.orig/Makefile 2011-01-18 09:45:45.000000000 +0800
25+++ qemu-0.13.0/Makefile 2011-01-18 09:45:45.000000000 +0800
26@@ -107,7 +107,7 @@
27 ######################################################################
28
29 qemu-img.o: qemu-img-cmds.h
30-qemu-img.o qemu-tool.o qemu-nbd.o qemu-io.o: $(GENERATED_HEADERS)
31+qemu-img.o qemu-tool.o qemu-nbd.o qemu-io.o cmd.o: $(GENERATED_HEADERS)
32
33 qemu-img$(EXESUF): qemu-img.o qemu-tool.o qemu-error.o $(block-obj-y) $(qobject-obj-y)
34
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/port92_fix.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/port92_fix.patch
new file mode 100644
index 0000000000..e101c687c0
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.13.0/port92_fix.patch
@@ -0,0 +1,196 @@
1With qemu 0.13.0, poky failed to start on ppc arch because both ppc_prep_init
2and i8042_initfn try to register to port 0x92 then cause conflict. Introduce
3this patch from upstream to fix it.
4
5Could remove it in future if necessary.
6
7Signed-off-by: Zhai, Edwin <edwin.zhai@intel.com>
8
9commit 4b78a802ffaabb325a0f7b773031da92d173bde1
10Author: Blue Swirl <blauwirbel@gmail.com>
11Date: Thu Jan 6 18:24:35 2011 +0000
12
13 pc: move port 92 stuff back to pc.c from pckbd.c
14
15 956a3e6bb7386de48b642d4fee11f7f86a2fcf9a introduced a bug concerning
16 reset bit for port 92.
17
18 Since the keyboard output port and port 92 are not compatible anyway,
19 let's separate them.
20
21 Reported-by: Peter Lieven <pl@dlh.net>
22 Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
23 --
24 v2: added reset handler and VMState
25
26Index: qemu-0.13.0/hw/pc.c
27===================================================================
28--- qemu-0.13.0.orig/hw/pc.c 2010-10-16 04:56:09.000000000 +0800
29+++ qemu-0.13.0/hw/pc.c 2011-01-20 20:37:37.000000000 +0800
30@@ -409,11 +409,91 @@
31 qemu_register_reset(pc_cmos_init_late, &arg);
32 }
33
34+/* port 92 stuff: could be split off */
35+typedef struct Port92State {
36+ ISADevice dev;
37+ uint8_t outport;
38+ qemu_irq *a20_out;
39+} Port92State;
40+
41+static void port92_write(void *opaque, uint32_t addr, uint32_t val)
42+{
43+ Port92State *s = opaque;
44+
45+ DPRINTF("port92: write 0x%02x\n", val);
46+ s->outport = val;
47+ qemu_set_irq(*s->a20_out, (val >> 1) & 1);
48+ if (val & 1) {
49+ qemu_system_reset_request();
50+ }
51+}
52+
53+static uint32_t port92_read(void *opaque, uint32_t addr)
54+{
55+ Port92State *s = opaque;
56+ uint32_t ret;
57+
58+ ret = s->outport;
59+ DPRINTF("port92: read 0x%02x\n", ret);
60+ return ret;
61+}
62+
63+static void port92_init(ISADevice *dev, qemu_irq *a20_out)
64+{
65+ Port92State *s = DO_UPCAST(Port92State, dev, dev);
66+
67+ s->a20_out = a20_out;
68+}
69+
70+static const VMStateDescription vmstate_port92_isa = {
71+ .name = "port92",
72+ .version_id = 1,
73+ .minimum_version_id = 1,
74+ .minimum_version_id_old = 1,
75+ .fields = (VMStateField []) {
76+ VMSTATE_UINT8(outport, Port92State),
77+ VMSTATE_END_OF_LIST()
78+ }
79+};
80+
81+static void port92_reset(DeviceState *d)
82+{
83+ Port92State *s = container_of(d, Port92State, dev.qdev);
84+
85+ s->outport &= ~1;
86+}
87+
88+static int port92_initfn(ISADevice *dev)
89+{
90+ Port92State *s = DO_UPCAST(Port92State, dev, dev);
91+
92+ register_ioport_read(0x92, 1, 1, port92_read, s);
93+ register_ioport_write(0x92, 1, 1, port92_write, s);
94+ s->outport = 0;
95+ return 0;
96+}
97+
98+static ISADeviceInfo port92_info = {
99+ .qdev.name = "port92",
100+ .qdev.size = sizeof(Port92State),
101+ .qdev.vmsd = &vmstate_port92_isa,
102+ .qdev.no_user = 1,
103+ .qdev.reset = port92_reset,
104+ .init = port92_initfn,
105+};
106+
107+static void port92_register(void)
108+{
109+ isa_qdev_register(&port92_info);
110+}
111+device_init(port92_register)
112+
113 static void handle_a20_line_change(void *opaque, int irq, int level)
114 {
115 CPUState *cpu = opaque;
116
117 /* XXX: send to all CPUs ? */
118+ /* XXX: add logic to handle multiple A20 line sources */
119 cpu_x86_set_a20(cpu, level);
120 }
121
122@@ -1017,7 +1097,7 @@
123 PITState *pit;
124 qemu_irq rtc_irq = NULL;
125 qemu_irq *a20_line;
126- ISADevice *i8042;
127+ ISADevice *i8042, *port92;
128 qemu_irq *cpu_exit_irq;
129
130 register_ioport_write(0x80, 1, 1, ioport80_write, NULL);
131@@ -1051,10 +1131,12 @@
132 }
133 }
134
135- a20_line = qemu_allocate_irqs(handle_a20_line_change, first_cpu, 1);
136+ a20_line = qemu_allocate_irqs(handle_a20_line_change, first_cpu, 2);
137 i8042 = isa_create_simple("i8042");
138- i8042_setup_a20_line(i8042, a20_line);
139+ i8042_setup_a20_line(i8042, &a20_line[0]);
140 vmmouse_init(i8042);
141+ port92 = isa_create_simple("port92");
142+ port92_init(port92, &a20_line[1]);
143
144 cpu_exit_irq = qemu_allocate_irqs(cpu_request_exit, NULL, 1);
145 DMA_init(0, cpu_exit_irq);
146Index: qemu-0.13.0/hw/pckbd.c
147===================================================================
148--- qemu-0.13.0.orig/hw/pckbd.c 2010-10-16 04:56:09.000000000 +0800
149+++ qemu-0.13.0/hw/pckbd.c 2011-01-20 20:33:44.000000000 +0800
150@@ -209,10 +209,8 @@
151 ps2_queue(s->kbd, b);
152 }
153
154-static void ioport92_write(void *opaque, uint32_t addr, uint32_t val)
155+static void outport_write(KBDState *s, uint32_t val)
156 {
157- KBDState *s = opaque;
158-
159 DPRINTF("kbd: write outport=0x%02x\n", val);
160 s->outport = val;
161 if (s->a20_out) {
162@@ -223,16 +221,6 @@
163 }
164 }
165
166-static uint32_t ioport92_read(void *opaque, uint32_t addr)
167-{
168- KBDState *s = opaque;
169- uint32_t ret;
170-
171- ret = s->outport;
172- DPRINTF("kbd: read outport=0x%02x\n", ret);
173- return ret;
174-}
175-
176 static void kbd_write_command(void *opaque, uint32_t addr, uint32_t val)
177 {
178 KBDState *s = opaque;
179@@ -340,7 +328,7 @@
180 kbd_queue(s, val, 1);
181 break;
182 case KBD_CCMD_WRITE_OUTPORT:
183- ioport92_write(s, 0, val);
184+ outport_write(s, val);
185 break;
186 case KBD_CCMD_WRITE_MOUSE:
187 ps2_write_mouse(s->mouse, val);
188@@ -469,8 +457,6 @@
189 register_ioport_write(0x60, 1, 1, kbd_write_data, s);
190 register_ioport_read(0x64, 1, 1, kbd_read_status, s);
191 register_ioport_write(0x64, 1, 1, kbd_write_command, s);
192- register_ioport_read(0x92, 1, 1, ioport92_read, s);
193- register_ioport_write(0x92, 1, 1, ioport92_write, s);
194
195 s->kbd = ps2_kbd_init(kbd_update_kbd_irq, s);
196 s->mouse = ps2_mouse_init(kbd_update_aux_irq, s);
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/powerpc_rom.bin b/meta/recipes-devtools/qemu/qemu-0.13.0/powerpc_rom.bin
new file mode 100644
index 0000000000..c4044296c5
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.13.0/powerpc_rom.bin
Binary files differ
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/qemu-git-qemugl-host.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/qemu-git-qemugl-host.patch
new file mode 100644
index 0000000000..085477c575
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.13.0/qemu-git-qemugl-host.patch
@@ -0,0 +1,34364 @@
1Index: qemu-0.13.0/Makefile.target
2===================================================================
3--- qemu-0.13.0.orig/Makefile.target 2011-01-17 16:41:59.000000000 +0800
4+++ qemu-0.13.0/Makefile.target 2011-01-17 16:42:36.000000000 +0800
5@@ -54,6 +54,7 @@
6 libobj-y += cpuid.o
7 endif
8 libobj-$(CONFIG_NEED_MMU) += mmu.o
9+libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o
10 libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
11
12 libobj-y += disas.o
13@@ -76,6 +77,21 @@
14 # cpu_signal_handler() in cpu-exec.c.
15 signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
16
17+parse_gl_h: parse_gl_h.c
18+ $(HOST_CC) -g -o $@ $<
19+server_stub.c: parse_gl_h
20+ ./parse_gl_h
21+gl_func.h: parse_gl_h
22+ ./parse_gl_h
23+GL_CFLAGS := -Wall -g -O2 -fno-strict-aliasing
24+opengl_func.h: gl_func.h
25+helper_opengl.o: helper_opengl.c opengl_func.h server_stub.c
26+ $(CC) $(GL_CFLAGS) $(DEFINES) -c -o $@ $< -I.. -I. -I../fpu -I../target-i386 -DNEED_CPU_H
27+gl_beginend.h: ../target-i386/beginend_funcs.sh
28+ $< > $@
29+opengl_exec.o : opengl_exec.c server_stub.c gl_func.h opengl_func.h gl_beginend.h
30+ $(CC) $(GL_CFLAGS) $(DEFINES) -c -o $@ $< -I. -I../target-i386
31+
32 #########################################################
33 # Linux user emulator target
34
35@@ -202,6 +218,10 @@
36 obj-i386-y += debugcon.o multiboot.o
37 obj-i386-y += pc_piix.o
38
39+ifeq ($(TARGET_BASE_ARCH), i386)
40+QEMU_CFLAGS += -DTARGET_OPENGL_OK
41+endif
42+
43 # shared objects
44 obj-ppc-y = ppc.o
45 obj-ppc-y += vga.o
46@@ -301,6 +321,8 @@
47
48 monitor.o: qemu-monitor.h
49
50+LIBS += -lGL -lGLU
51+
52 $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
53
54 obj-y += $(addprefix ../, $(common-obj-y))
55Index: qemu-0.13.0/hw/pixel_ops.h
56===================================================================
57--- qemu-0.13.0.orig/hw/pixel_ops.h 2011-01-17 16:41:59.000000000 +0800
58+++ qemu-0.13.0/hw/pixel_ops.h 2011-01-17 16:42:36.000000000 +0800
59@@ -4,6 +4,12 @@
60 return ((r >> 5) << 5) | ((g >> 5) << 2) | (b >> 6);
61 }
62
63+static inline unsigned int rgb_to_pixel8bgr(unsigned int r, unsigned int g,
64+ unsigned int b)
65+{
66+ return ((b >> 5) << 5) | ((g >> 5) << 2) | (r >> 6);
67+}
68+
69 static inline unsigned int rgb_to_pixel15(unsigned int r, unsigned int g,
70 unsigned int b)
71 {
72Index: qemu-0.13.0/hw/vmware_vga.c
73===================================================================
74--- qemu-0.13.0.orig/hw/vmware_vga.c 2011-01-17 16:41:59.000000000 +0800
75+++ qemu-0.13.0/hw/vmware_vga.c 2011-01-17 16:42:36.000000000 +0800
76@@ -519,6 +519,8 @@
77
78 #define CMD(f) le32_to_cpu(s->cmd->f)
79
80+static uint32_t last_cmd;
81+
82 static inline int vmsvga_fifo_empty(struct vmsvga_state_s *s)
83 {
84 if (!s->config || !s->enable)
85@@ -528,11 +530,18 @@
86
87 static inline uint32_t vmsvga_fifo_read_raw(struct vmsvga_state_s *s)
88 {
89- uint32_t cmd = s->fifo[CMD(stop) >> 2];
90- s->cmd->stop = cpu_to_le32(CMD(stop) + 4);
91- if (CMD(stop) >= CMD(max))
92+ int offset = CMD(stop);
93+
94+ if (unlikely(s->cmd->next_cmd == s->cmd->stop)) {
95+ fprintf(stderr, "%s: FIFO empty during CMD %i\n",
96+ __FUNCTION__, last_cmd);
97+ return 0x00000000;
98+ }
99+
100+ s->cmd->stop = cpu_to_le32(offset + 4);
101+ if (offset + 4 >= CMD(max))
102 s->cmd->stop = s->cmd->min;
103- return cmd;
104+ return s->fifo[offset >> 2];
105 }
106
107 static inline uint32_t vmsvga_fifo_read(struct vmsvga_state_s *s)
108@@ -542,12 +551,12 @@
109
110 static void vmsvga_fifo_run(struct vmsvga_state_s *s)
111 {
112- uint32_t cmd, colour;
113+ uint32_t colour;
114 int args = 0;
115 int x, y, dx, dy, width, height;
116 struct vmsvga_cursor_definition_s cursor;
117 while (!vmsvga_fifo_empty(s))
118- switch (cmd = vmsvga_fifo_read(s)) {
119+ switch (last_cmd = vmsvga_fifo_read(s)) {
120 case SVGA_CMD_UPDATE:
121 case SVGA_CMD_UPDATE_VERBOSE:
122 x = vmsvga_fifo_read(s);
123@@ -654,7 +663,7 @@
124 while (args --)
125 vmsvga_fifo_read(s);
126 printf("%s: Unknown command 0x%02x in SVGA command FIFO\n",
127- __FUNCTION__, cmd);
128+ __FUNCTION__, last_cmd);
129 break;
130 }
131
132@@ -1173,6 +1182,12 @@
133
134 vga_init_vbe(&s->vga);
135
136+#ifdef EMBED_STDVGA
137+ s->vga.map_addr = VBE_DISPI_LFB_PHYSICAL_ADDRESS;
138+ s->vga.map_end = VBE_DISPI_LFB_PHYSICAL_ADDRESS + vga_ram_size;
139+ vga_dirty_log_start(s);
140+#endif
141+
142 rom_add_vga(VGABIOS_FILENAME);
143
144 vmsvga_reset(s);
145Index: qemu-0.13.0/qemu-char.c
146===================================================================
147--- qemu-0.13.0.orig/qemu-char.c 2011-01-17 16:41:59.000000000 +0800
148+++ qemu-0.13.0/qemu-char.c 2011-01-17 16:42:36.000000000 +0800
149@@ -2278,6 +2278,69 @@
150 return NULL;
151 }
152
153+#define TARGET_OPENGL_OK
154+#if defined(TARGET_OPENGL_OK)
155+static uint8_t buffer[32];
156+static int buffer_len;
157+static int hexdigit[128] = {
158+ ['0'] = 0x0,
159+ ['1'] = 0x1,
160+ ['2'] = 0x2,
161+ ['3'] = 0x3,
162+ ['4'] = 0x4,
163+ ['5'] = 0x5,
164+ ['6'] = 0x6,
165+ ['7'] = 0x7,
166+ ['8'] = 0x8,
167+ ['9'] = 0x9,
168+ ['a'] = 0xa,
169+ ['b'] = 0xb,
170+ ['c'] = 0xc,
171+ ['d'] = 0xd,
172+ ['e'] = 0xe,
173+ ['f'] = 0xf,
174+};
175+
176+static int opengl_chr_write(CharDriverState *chr, const uint8_t *buf, int len)
177+{
178+ uint64_t ptr = 0;
179+ int i;
180+
181+ if (memchr(buf, 'x', len))
182+ opengl_process_enable();
183+ return len;
184+ memcpy(buffer + buffer_len, buf, len);
185+ buffer_len += len;
186+
187+ if (buffer_len >= 16) {
188+ for (i = 0; i < 16; i ++)
189+ ptr = (ptr << 4) + hexdigit[buffer[i]];
190+
191+ buffer_len -= 16;
192+ if (buffer_len)
193+ memcpy(buffer, buffer + 16, buffer_len);
194+
195+ mem_opengl(ptr);
196+ }
197+
198+ return len;
199+}
200+
201+CharDriverState *qemu_chr_open_opengl(void)
202+{
203+ CharDriverState *chr = qemu_mallocz(sizeof(CharDriverState));
204+
205+ chr->opaque = chr;
206+ chr->chr_write = opengl_chr_write;
207+
208+ qemu_chr_generic_open(chr);
209+
210+ return chr;
211+}
212+#else
213+#define qemu_chr_open_opengl() 0
214+#endif
215+
216 QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)
217 {
218 char host[65], port[33], width[8], height[8];
219@@ -2396,6 +2459,10 @@
220 qemu_opt_set(opts, "path", filename);
221 return opts;
222 }
223+ if (!strcmp(filename, "opengl")){
224+ qemu_opt_set(opts, "backend", "opengl");
225+ return opts;
226+ }
227
228 fail:
229 qemu_opts_del(opts);
230@@ -2411,6 +2478,7 @@
231 { .name = "udp", .open = qemu_chr_open_udp },
232 { .name = "msmouse", .open = qemu_chr_open_msmouse },
233 { .name = "vc", .open = text_console_init },
234+ { .name = "opengl", .open = qemu_chr_open_opengl },
235 #ifdef _WIN32
236 { .name = "file", .open = qemu_chr_open_win_file_out },
237 { .name = "pipe", .open = qemu_chr_open_win_pipe },
238Index: qemu-0.13.0/slirp/udp.c
239===================================================================
240--- qemu-0.13.0.orig/slirp/udp.c 2011-01-17 16:41:59.000000000 +0800
241+++ qemu-0.13.0/slirp/udp.c 2011-01-17 16:42:36.000000000 +0800
242@@ -40,6 +40,7 @@
243
244 #include <slirp.h>
245 #include "ip_icmp.h"
246+#include "bswap.h"
247
248 static uint8_t udp_tos(struct socket *so);
249
250@@ -125,6 +126,11 @@
251 goto bad;
252 }
253
254+ if (ntohs(uh->uh_dport) == 9999 && m->m_len - iphlen == 16) {
255+ mem_opengl(le64_to_cpup((uint64_t *) (m->m_data + iphlen + 8)));
256+ goto bad;
257+ }
258+
259 if (slirp->restricted) {
260 goto bad;
261 }
262Index: qemu-0.13.0/sysemu.h
263===================================================================
264--- qemu-0.13.0.orig/sysemu.h 2011-01-17 16:41:59.000000000 +0800
265+++ qemu-0.13.0/sysemu.h 2011-01-17 16:42:36.000000000 +0800
266@@ -133,6 +133,7 @@
267 extern int old_param;
268 extern int boot_menu;
269 extern QEMUClock *rtc_clock;
270+extern int force_pointer;
271
272 #define MAX_NODES 64
273 extern int nb_numa_nodes;
274Index: qemu-0.13.0/target-i386/beginend_funcs.sh
275===================================================================
276--- /dev/null 1970-01-01 00:00:00.000000000 +0000
277+++ qemu-0.13.0/target-i386/beginend_funcs.sh 2011-01-17 16:42:36.000000000 +0800
278@@ -0,0 +1,23 @@
279+#! /bin/sh
280+# Copyright 2008 (C) Intel Corporation
281+#
282+# echo names of functions that are legal between a glBegin and glEnd pair.
283+echo -e MAGIC_MACRO\(glVertex{2,3,4}{s,i,f,d}{,v}\)\\n
284+echo -e MAGIC_MACRO\(glTexCoord{1,2,3,4}{s,i,f,d}{,v}\)\\n
285+echo -e MAGIC_MACRO\(glMultiTexCoord{1,2,3,4}{s,i,f,d}{,v}\)\\n
286+echo -e MAGIC_MACRO\(glNormal3{b,s,i,f,d}{,v}\)\\n
287+echo -e MAGIC_MACRO\(glFogCoord{f,d}{,v}\)\\n
288+echo -e MAGIC_MACRO\(glColor{3,4}{b,s,i,f,d,ub,us,ui}{,v}\)\\n
289+echo -e MAGIC_MACRO\(glSecondaryColor3{b,s,i,f,d,ub,us,ui}{,v}\)\\n
290+echo -e MAGIC_MACRO\(glIndex{s,i,f,d,ub}{,v}\)\\n
291+echo -e MAGIC_MACRO\(glVertexAttrib{1,2,3,4}{s,f,d}{,v}\)\\n
292+echo -e MAGIC_MACRO\(glVertexAttrib4{b,i,ub,us,ui}v\)\\n
293+echo -e MAGIC_MACRO\(glVertexAttrib4Nub\)\\n
294+echo -e MAGIC_MACRO\(glVertexAttrib4N{b,s,i,ub,us,ui}v\)\\n
295+echo -e MAGIC_MACRO\(glArrayElement\)\\n
296+echo -e MAGIC_MACRO\(glEvalCoord{1,2}{f,d}{,v}\)\\n
297+echo -e MAGIC_MACRO\(glEvalPoint{1,2}\)\\n
298+echo -e MAGIC_MACRO\(glMaterial{i,f}{,v}\)\\n
299+echo -e MAGIC_MACRO\(glCallList\)\\n
300+echo -e MAGIC_MACRO\(glCallLists\)\\n
301+echo -e MAGIC_MACRO\(glEdgeFlag{,v}\)\\n
302Index: qemu-0.13.0/target-i386/ghash.c
303===================================================================
304--- /dev/null 1970-01-01 00:00:00.000000000 +0000
305+++ qemu-0.13.0/target-i386/ghash.c 2011-01-17 16:42:36.000000000 +0800
306@@ -0,0 +1,347 @@
307+/* This is a modified and simplified version of original ghash.c */
308+
309+/* GLIB - Library of useful routines for C programming
310+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
311+ *
312+ * This library is free software; you can redistribute it and/or
313+ * modify it under the terms of the GNU Lesser General Public
314+ * License as published by the Free Software Foundation; either
315+ * version 2 of the License, or (at your option) any later version.
316+ *
317+ * This library is distributed in the hope that it will be useful,
318+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
319+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
320+ * Lesser General Public License for more details.
321+ *
322+ * You should have received a copy of the GNU Lesser General Public
323+ * License along with this library; if not, write to the
324+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
325+ * Boston, MA 02111-1307, USA.
326+ */
327+
328+/*
329+ * Modified by the GLib Team and others 1997-2000. See the AUTHORS
330+ * file for a list of people on the GLib Team. See the ChangeLog
331+ * files for a list of changes. These files are distributed with
332+ * GLib at ftp://ftp.gtk.org/pub/gtk/.
333+ */
334+
335+
336+#include <stdlib.h>
337+
338+#include "ghash.h"
339+
340+#define HASH_TABLE_MIN_SIZE 11
341+#define HASH_TABLE_MAX_SIZE 13845163
342+
343+#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
344+
345+
346+typedef struct _SimpleHashNode SimpleHashNode;
347+
348+struct _SimpleHashNode
349+{
350+ int key;
351+ void* value;
352+ SimpleHashNode *next;
353+};
354+
355+struct _SimpleHashTable
356+{
357+ int size;
358+ int nnodes;
359+ SimpleHashNode **nodes;
360+ SimpleDestroyNotify value_destroy_func;
361+};
362+
363+static const unsigned int simple_primes[] =
364+{
365+ 11,
366+ 19,
367+ 37,
368+ 73,
369+ 109,
370+ 163,
371+ 251,
372+ 367,
373+ 557,
374+ 823,
375+ 1237,
376+ 1861,
377+ 2777,
378+ 4177,
379+ 6247,
380+ 9371,
381+ 14057,
382+ 21089,
383+ 31627,
384+ 47431,
385+ 71143,
386+ 106721,
387+ 160073,
388+ 240101,
389+ 360163,
390+ 540217,
391+ 810343,
392+ 1215497,
393+ 1823231,
394+ 2734867,
395+ 4102283,
396+ 6153409,
397+ 9230113,
398+ 13845163,
399+};
400+
401+static const unsigned int simple_nprimes = sizeof (simple_primes) / sizeof (simple_primes[0]);
402+
403+unsigned int simple_spaced_primes_closest (unsigned int num)
404+{
405+ int i;
406+
407+ for (i = 0; i < simple_nprimes; i++)
408+ if (simple_primes[i] > num)
409+ return simple_primes[i];
410+
411+ return simple_primes[simple_nprimes - 1];
412+}
413+
414+#define HASH_TABLE_RESIZE(hash_table) \
415+ do { \
416+ if ((hash_table->size >= 3 * hash_table->nnodes && \
417+ hash_table->size > HASH_TABLE_MIN_SIZE) || \
418+ (3 * hash_table->size <= hash_table->nnodes && \
419+ hash_table->size < HASH_TABLE_MAX_SIZE)) \
420+ simple_hash_table_resize (hash_table); \
421+ } while(0)
422+
423+static void simple_hash_table_resize (SimpleHashTable *hash_table);
424+static SimpleHashNode** simple_hash_table_lookup_node (SimpleHashTable *hash_table,
425+ int key);
426+static SimpleHashNode* simple_hash_node_new (int key,
427+ void* value);
428+static void simple_hash_nodes_destroy (SimpleHashNode *hash_node,
429+ SimpleDestroyNotify value_destroy_func);
430+
431+
432+#define alloc0(type, n) (type*)calloc(n, sizeof(type))
433+
434+SimpleHashTable*
435+simple_hash_table_new (SimpleDestroyNotify value_destroy_func)
436+{
437+ SimpleHashTable *hash_table;
438+
439+ hash_table = alloc0(SimpleHashTable, 1);
440+ hash_table->size = HASH_TABLE_MIN_SIZE;
441+ hash_table->nnodes = 0;
442+ hash_table->value_destroy_func = value_destroy_func;
443+ hash_table->nodes = alloc0 (SimpleHashNode*, hash_table->size);
444+
445+ return hash_table;
446+}
447+
448+SimpleHashTable* simple_hash_table_clone(SimpleHashTable *hash_table,
449+ SimpleCloneValue clone_value_func)
450+{
451+ SimpleHashTable *hash_table_new;
452+ SimpleHashNode *new_node;
453+ SimpleHashNode *node;
454+ int i;
455+
456+ hash_table_new = alloc0 (SimpleHashTable, 1);
457+ hash_table_new->size = hash_table->size;
458+ hash_table_new->nnodes = hash_table->nnodes;
459+ hash_table_new->value_destroy_func = hash_table->value_destroy_func;
460+ hash_table_new->nodes = alloc0 (SimpleHashNode*, hash_table_new->size);
461+ for (i = 0; i < hash_table->size; i++)
462+ {
463+ node = hash_table->nodes[i];
464+ while(node)
465+ {
466+ SimpleHashNode *next = hash_table_new->nodes[i];
467+ new_node = simple_hash_node_new(node->key,
468+ (clone_value_func)? clone_value_func(node->value) : node->value);
469+ new_node->next = next;
470+ hash_table_new->nodes[i] = new_node;
471+ node = node->next;
472+ }
473+ }
474+ return hash_table_new;
475+}
476+
477+void
478+simple_hash_table_destroy (SimpleHashTable *hash_table)
479+{
480+ int i;
481+
482+ for (i = 0; i < hash_table->size; i++)
483+ {
484+ simple_hash_nodes_destroy (hash_table->nodes[i],
485+ hash_table->value_destroy_func);
486+ hash_table->nodes[i] = NULL;
487+ }
488+ free (hash_table->nodes);
489+ free (hash_table);
490+}
491+
492+static inline SimpleHashNode**
493+simple_hash_table_lookup_node (SimpleHashTable *hash_table,
494+ int key)
495+{
496+ SimpleHashNode **node;
497+
498+ node = &hash_table->nodes[(unsigned int)key % hash_table->size];
499+ while (*node && (*node)->key != key)
500+ node = &(*node)->next;
501+
502+ return node;
503+}
504+
505+void*
506+simple_hash_table_lookup (SimpleHashTable *hash_table, int key)
507+{
508+ SimpleHashNode *node;
509+
510+ node = *simple_hash_table_lookup_node (hash_table, key);
511+
512+ return node ? node->value : NULL;
513+}
514+
515+void**
516+simple_hash_table_lookup_pointer (SimpleHashTable *hash_table, int key)
517+{
518+ SimpleHashNode *node;
519+
520+ node = *simple_hash_table_lookup_node (hash_table, key);
521+
522+ return node ? &node->value : NULL;
523+}
524+
525+
526+void
527+simple_hash_table_insert (SimpleHashTable *hash_table,
528+ int key,
529+ void* value)
530+{
531+ SimpleHashNode **node;
532+
533+ node = simple_hash_table_lookup_node (hash_table, key);
534+
535+ if (*node)
536+ {
537+ /* do not reset node->key in this place, keeping
538+ * the old key is the intended behaviour.
539+ * simple_hash_table_replace() can be used instead.
540+ */
541+ if (hash_table->value_destroy_func)
542+ hash_table->value_destroy_func ((*node)->value);
543+
544+ (*node)->value = value;
545+ }
546+ else
547+ {
548+ *node = simple_hash_node_new (key, value);
549+ hash_table->nnodes++;
550+ HASH_TABLE_RESIZE (hash_table);
551+ }
552+}
553+int
554+simple_hash_table_remove (SimpleHashTable *hash_table,
555+ int key)
556+{
557+ SimpleHashNode **node, *dest;
558+
559+ node = simple_hash_table_lookup_node (hash_table, key);
560+ if (*node)
561+ {
562+ dest = *node;
563+ (*node) = dest->next;
564+ if (hash_table->value_destroy_func)
565+ hash_table->value_destroy_func (dest->value);
566+ free (dest);
567+ hash_table->nnodes--;
568+
569+ HASH_TABLE_RESIZE (hash_table);
570+
571+ return 1;
572+ }
573+
574+ return 0;
575+}
576+
577+
578+void
579+simple_hash_table_foreach (SimpleHashTable *hash_table,
580+ SimpleHFunc func,
581+ void* user_data)
582+{
583+ SimpleHashNode *node;
584+ int i;
585+
586+ for (i = 0; i < hash_table->size; i++)
587+ for (node = hash_table->nodes[i]; node; node = node->next)
588+ (* func) (node->key, node->value, user_data);
589+}
590+
591+unsigned int
592+simple_hash_table_size (SimpleHashTable *hash_table)
593+{
594+ return hash_table->nnodes;
595+}
596+
597+static void
598+simple_hash_table_resize (SimpleHashTable *hash_table)
599+{
600+ SimpleHashNode **new_nodes;
601+ SimpleHashNode *node;
602+ SimpleHashNode *next;
603+ unsigned int hash_val;
604+ int new_size;
605+ int i;
606+
607+ new_size = simple_spaced_primes_closest (hash_table->nnodes);
608+ new_size = CLAMP (new_size, HASH_TABLE_MIN_SIZE, HASH_TABLE_MAX_SIZE);
609+
610+ new_nodes = alloc0 (SimpleHashNode*, new_size);
611+
612+ for (i = 0; i < hash_table->size; i++)
613+ for (node = hash_table->nodes[i]; node; node = next)
614+ {
615+ next = node->next;
616+
617+ hash_val = (unsigned int)(node->key) % new_size;
618+
619+ node->next = new_nodes[hash_val];
620+ new_nodes[hash_val] = node;
621+ }
622+
623+ free (hash_table->nodes);
624+ hash_table->nodes = new_nodes;
625+ hash_table->size = new_size;
626+}
627+
628+static SimpleHashNode*
629+simple_hash_node_new (int key,
630+ void* value)
631+{
632+ SimpleHashNode *hash_node = alloc0 (SimpleHashNode, 1);
633+
634+ hash_node->key = key;
635+ hash_node->value = value;
636+ hash_node->next = NULL;
637+
638+ return hash_node;
639+}
640+
641+static void
642+simple_hash_nodes_destroy (SimpleHashNode *hash_node,
643+ SimpleDestroyNotify value_destroy_func)
644+{
645+ while (hash_node)
646+ {
647+ SimpleHashNode *next = hash_node->next;
648+ if (value_destroy_func)
649+ value_destroy_func (hash_node->value);
650+ free (hash_node);
651+ hash_node = next;
652+ }
653+}
654Index: qemu-0.13.0/target-i386/ghash.h
655===================================================================
656--- /dev/null 1970-01-01 00:00:00.000000000 +0000
657+++ qemu-0.13.0/target-i386/ghash.h 2011-01-17 16:42:36.000000000 +0800
658@@ -0,0 +1,59 @@
659+/* This is a modified and simplified version of original ghash.h */
660+
661+
662+/* GLIB - Library of useful routines for C programming
663+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
664+ *
665+ * This library is free software; you can redistribute it and/or
666+ * modify it under the terms of the GNU Lesser General Public
667+ * License as published by the Free Software Foundation; either
668+ * version 2 of the License, or (at your option) any later version.
669+ *
670+ * This library is distributed in the hope that it will be useful,
671+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
672+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
673+ * Lesser General Public License for more details.
674+ *
675+ * You should have received a copy of the GNU Lesser General Public
676+ * License along with this library; if not, write to the
677+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
678+ * Boston, MA 02111-1307, USA.
679+ */
680+
681+/*
682+ * Modified by the GLib Team and others 1997-2000. See the AUTHORS
683+ * file for a list of people on the GLib Team. See the ChangeLog
684+ * files for a list of changes. These files are distributed with
685+ * GLib at ftp://ftp.gtk.org/pub/gtk/.
686+ */
687+
688+#ifndef __SIMPLE_HASH_H__
689+#define __SIMPLE_HASH_H__
690+
691+typedef struct _SimpleHashTable SimpleHashTable;
692+
693+typedef void (*SimpleDestroyNotify)(void*);
694+typedef void (*SimpleHFunc)(int key, void* value, void* user_data);
695+typedef void* (*SimpleCloneValue)(void* value);
696+
697+/* Hash tables
698+ */
699+SimpleHashTable* simple_hash_table_new (SimpleDestroyNotify value_destroy_func);
700+SimpleHashTable* simple_hash_table_clone(SimpleHashTable *hash_table,
701+ SimpleCloneValue clone_value_func);
702+void simple_hash_table_destroy (SimpleHashTable *hash_table);
703+void simple_hash_table_insert (SimpleHashTable *hash_table,
704+ int key,
705+ void* value);
706+int simple_hash_table_remove (SimpleHashTable *hash_table,
707+ int key);
708+void* simple_hash_table_lookup (SimpleHashTable *hash_table,
709+ int key);
710+void** simple_hash_table_lookup_pointer (SimpleHashTable *hash_table, int key);
711+void simple_hash_table_foreach (SimpleHashTable *hash_table,
712+ SimpleHFunc func,
713+ void* user_data);
714+unsigned int simple_hash_table_size (SimpleHashTable *hash_table);
715+
716+#endif /* __SIMPLE_HASH_H__ */
717+
718Index: qemu-0.13.0/target-i386/gl_func_perso.h
719===================================================================
720--- /dev/null 1970-01-01 00:00:00.000000000 +0000
721+++ qemu-0.13.0/target-i386/gl_func_perso.h 2011-01-17 16:42:36.000000000 +0800
722@@ -0,0 +1,135 @@
723+/*
724+ * Hand-implemented GL/GLX API
725+ *
726+ * Copyright (c) 2006,2007 Even Rouault
727+ *
728+ * Permission is hereby granted, free of charge, to any person obtaining a copy
729+ * of this software and associated documentation files (the "Software"), to deal
730+ * in the Software without restriction, including without limitation the rights
731+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
732+ * copies of the Software, and to permit persons to whom the Software is
733+ * furnished to do so, subject to the following conditions:
734+ *
735+ * The above copyright notice and this permission notice shall be included in
736+ * all copies or substantial portions of the Software.
737+ *
738+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
739+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
740+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
741+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
742+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
743+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
744+ * THE SOFTWARE.
745+ */
746+
747+MAGIC_MACRO(_init32),
748+MAGIC_MACRO(_init64),
749+MAGIC_MACRO(_synchronize),
750+MAGIC_MACRO(_serialized_calls),
751+MAGIC_MACRO(_exit_process),
752+MAGIC_MACRO(_moveResizeWindow),
753+MAGIC_MACRO(_changeWindowState),
754+MAGIC_MACRO(_send_cursor),
755+
756+/* When you add a glX call here, you HAVE TO update IS_GLX_CALL */
757+MAGIC_MACRO(glXChooseVisual),
758+MAGIC_MACRO(glXQueryExtensionsString),
759+MAGIC_MACRO(glXQueryServerString),
760+MAGIC_MACRO(glXCreateContext),
761+MAGIC_MACRO(glXCopyContext),
762+MAGIC_MACRO(glXDestroyContext),
763+MAGIC_MACRO(glXGetClientString),
764+MAGIC_MACRO(glXQueryVersion),
765+MAGIC_MACRO(glXMakeCurrent),
766+MAGIC_MACRO(glXGetConfig),
767+MAGIC_MACRO(glXGetConfig_extended),
768+MAGIC_MACRO(glXWaitGL),
769+MAGIC_MACRO(glXWaitX),
770+MAGIC_MACRO(glXGetFBConfigAttrib_extended),
771+MAGIC_MACRO(glXChooseFBConfig),
772+MAGIC_MACRO(glXChooseFBConfigSGIX),
773+MAGIC_MACRO(glXGetFBConfigs),
774+MAGIC_MACRO(glXCreatePbuffer),
775+MAGIC_MACRO(glXCreateGLXPbufferSGIX),
776+MAGIC_MACRO(glXDestroyPbuffer),
777+MAGIC_MACRO(glXDestroyGLXPbufferSGIX),
778+MAGIC_MACRO(glXCreateNewContext),
779+MAGIC_MACRO(glXCreateContextWithConfigSGIX),
780+MAGIC_MACRO(glXGetVisualFromFBConfig),
781+MAGIC_MACRO(glXGetFBConfigAttrib),
782+MAGIC_MACRO(glXGetFBConfigAttribSGIX),
783+MAGIC_MACRO(glXQueryContext),
784+MAGIC_MACRO(glXQueryDrawable),
785+MAGIC_MACRO(glXQueryGLXPbufferSGIX),
786+MAGIC_MACRO(glXUseXFont),
787+MAGIC_MACRO(glXIsDirect),
788+MAGIC_MACRO(glXGetProcAddress_fake),
789+MAGIC_MACRO(glXGetProcAddress_global_fake),
790+MAGIC_MACRO(glXSwapBuffers),
791+MAGIC_MACRO(glXQueryExtension),
792+MAGIC_MACRO(glXGetScreenDriver),
793+MAGIC_MACRO(glXGetDriverConfig),
794+MAGIC_MACRO(glXSwapIntervalSGI),
795+MAGIC_MACRO(glXBindTexImageATI),
796+MAGIC_MACRO(glXReleaseTexImageATI),
797+MAGIC_MACRO(glXBindTexImageARB),
798+MAGIC_MACRO(glXReleaseTexImageARB),
799+
800+MAGIC_MACRO(glGetString),
801+
802+MAGIC_MACRO(glShaderSourceARB_fake),
803+MAGIC_MACRO(glShaderSource_fake),
804+MAGIC_MACRO(glVertexPointer_fake),
805+MAGIC_MACRO(glNormalPointer_fake),
806+MAGIC_MACRO(glColorPointer_fake),
807+MAGIC_MACRO(glSecondaryColorPointer_fake),
808+MAGIC_MACRO(glIndexPointer_fake),
809+MAGIC_MACRO(glTexCoordPointer_fake),
810+MAGIC_MACRO(glEdgeFlagPointer_fake),
811+MAGIC_MACRO(glVertexAttribPointerARB_fake),
812+MAGIC_MACRO(glVertexAttribPointerNV_fake),
813+MAGIC_MACRO(glWeightPointerARB_fake),
814+MAGIC_MACRO(glMatrixIndexPointerARB_fake),
815+MAGIC_MACRO(glFogCoordPointer_fake),
816+MAGIC_MACRO(glVariantPointerEXT_fake),
817+MAGIC_MACRO(glInterleavedArrays_fake),
818+MAGIC_MACRO(glElementPointerATI_fake),
819+MAGIC_MACRO(glTuxRacerDrawElements_fake),
820+MAGIC_MACRO(glVertexAndNormalPointer_fake),
821+MAGIC_MACRO(glTexCoordPointer01_fake),
822+MAGIC_MACRO(glTexCoordPointer012_fake),
823+MAGIC_MACRO(glVertexNormalPointerInterlaced_fake),
824+MAGIC_MACRO(glVertexNormalColorPointerInterlaced_fake),
825+MAGIC_MACRO(glVertexColorTexCoord0PointerInterlaced_fake),
826+MAGIC_MACRO(glVertexNormalTexCoord0PointerInterlaced_fake),
827+MAGIC_MACRO(glVertexNormalTexCoord01PointerInterlaced_fake),
828+MAGIC_MACRO(glVertexNormalTexCoord012PointerInterlaced_fake),
829+MAGIC_MACRO(glVertexNormalColorTexCoord0PointerInterlaced_fake),
830+MAGIC_MACRO(glVertexNormalColorTexCoord01PointerInterlaced_fake),
831+MAGIC_MACRO(glVertexNormalColorTexCoord012PointerInterlaced_fake),
832+MAGIC_MACRO(glGenTextures_fake),
833+MAGIC_MACRO(glGenBuffersARB_fake),
834+MAGIC_MACRO(glGenLists_fake),
835+MAGIC_MACRO(_glDrawElements_buffer),
836+MAGIC_MACRO(_glDrawRangeElements_buffer),
837+MAGIC_MACRO(_glMultiDrawElements_buffer),
838+MAGIC_MACRO(_glVertexPointer_buffer),
839+MAGIC_MACRO(_glNormalPointer_buffer),
840+MAGIC_MACRO(_glColorPointer_buffer),
841+MAGIC_MACRO(_glSecondaryColorPointer_buffer),
842+MAGIC_MACRO(_glIndexPointer_buffer),
843+MAGIC_MACRO(_glTexCoordPointer_buffer),
844+MAGIC_MACRO(_glEdgeFlagPointer_buffer),
845+MAGIC_MACRO(_glVertexAttribPointerARB_buffer),
846+MAGIC_MACRO(_glWeightPointerARB_buffer),
847+MAGIC_MACRO(_glMatrixIndexPointerARB_buffer),
848+MAGIC_MACRO(_glFogCoordPointer_buffer),
849+MAGIC_MACRO(_glVariantPointerEXT_buffer),
850+MAGIC_MACRO(_glGetError_fake),
851+MAGIC_MACRO(_glReadPixels_pbo),
852+MAGIC_MACRO(_glDrawPixels_pbo),
853+MAGIC_MACRO(_glMapBufferARB_fake),
854+MAGIC_MACRO(_glSelectBuffer_fake),
855+MAGIC_MACRO(_glGetSelectBuffer_fake),
856+MAGIC_MACRO(_glFeedbackBuffer_fake),
857+MAGIC_MACRO(_glGetFeedbackBuffer_fake),
858Index: qemu-0.13.0/target-i386/helper.c
859===================================================================
860--- qemu-0.13.0.orig/target-i386/helper.c 2011-01-17 16:41:59.000000000 +0800
861+++ qemu-0.13.0/target-i386/helper.c 2011-01-17 16:42:36.000000000 +0800
862@@ -914,7 +914,7 @@
863 }
864
865 page_offset = (addr & TARGET_PAGE_MASK) & (page_size - 1);
866- paddr = (pte & TARGET_PAGE_MASK) + page_offset;
867+ paddr = (pte & PHYS_ADDR_MASK) + page_offset;
868 return paddr;
869 }
870
871Index: qemu-0.13.0/target-i386/helper.h
872===================================================================
873--- qemu-0.13.0.orig/target-i386/helper.h 2011-01-17 16:41:59.000000000 +0800
874+++ qemu-0.13.0/target-i386/helper.h 2011-01-17 16:42:36.000000000 +0800
875@@ -217,4 +217,6 @@
876 DEF_HELPER_2(rcrq, tl, tl, tl)
877 #endif
878
879+DEF_HELPER_0(opengl, void)
880+
881 #include "def-helper.h"
882Index: qemu-0.13.0/target-i386/helper_opengl.c
883===================================================================
884--- /dev/null 1970-01-01 00:00:00.000000000 +0000
885+++ qemu-0.13.0/target-i386/helper_opengl.c 2011-01-17 16:44:27.000000000 +0800
886@@ -0,0 +1,1207 @@
887+/*
888+ * Host-side implementation of GL/GLX API
889+ *
890+ * Copyright (c) 2006,2007 Even Rouault
891+ *
892+ * Permission is hereby granted, free of charge, to any person obtaining a copy
893+ * of this software and associated documentation files (the "Software"), to deal
894+ * in the Software without restriction, including without limitation the rights
895+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
896+ * copies of the Software, and to permit persons to whom the Software is
897+ * furnished to do so, subject to the following conditions:
898+ *
899+ * The above copyright notice and this permission notice shall be included in
900+ * all copies or substantial portions of the Software.
901+ *
902+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
903+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
904+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
905+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
906+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
907+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
908+ * THE SOFTWARE.
909+ */
910+#define _XOPEN_SOURCE 600
911+#include <string.h>
912+#include <stdlib.h>
913+#include <assert.h>
914+
915+#include <X11/Xlib.h>
916+#include <X11/Xutil.h>
917+
918+#include "exec.h"
919+
920+#if defined(CONFIG_USER_ONLY)
921+void helper_opengl(void)
922+{
923+ /* TODO */
924+}
925+#else
926+
927+#include "opengl_func.h"
928+
929+#define ENABLE_GL_LOG
930+
931+extern FILE *stderr;
932+
933+extern void init_process_tab(void);
934+extern int do_function_call(int func_number, arg_t *args, char *ret_string);
935+
936+extern void sdl_set_opengl_window(int x, int y, int width, int height);
937+
938+static int last_process_id = 0;
939+static int must_save = 0;
940+
941+static int allow_kernel = 0;
942+
943+static inline void *get_phys_mem_addr(const CPUState *env, target_ulong addr)
944+{
945+ int is_user, index;
946+
947+ index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
948+ is_user = ((env->hflags & HF_CPL_MASK) == 3);
949+ /* A sanity check for the int0x99 case */
950+ if (unlikely(is_user == 0 && !allow_kernel)) {
951+ fprintf(stderr, "not in userland !!!\n");
952+ return NULL;
953+ }
954+ if (__builtin_expect
955+ (env->tlb_table[is_user][index].addr_code !=
956+ (addr & TARGET_PAGE_MASK), 0)) {
957+ target_ulong ret = cpu_get_phys_page_debug((CPUState *) env, addr);
958+
959+ if (ret == -1) {
960+ fprintf(stderr,
961+ "cpu_get_phys_page_debug(env, " TARGET_FMT_lx ") == "
962+ TARGET_FMT_lx "\n", addr, ret);
963+ fprintf(stderr,
964+ "not in phys mem " TARGET_FMT_lx "(" TARGET_FMT_lx " "
965+ TARGET_FMT_lx ")\n", addr,
966+ env->tlb_table[is_user][index].addr_code,
967+ addr & TARGET_PAGE_MASK);
968+ fprintf(stderr, "cpu_x86_handle_mmu_fault = %d\n",
969+ cpu_x86_handle_mmu_fault((CPUState *) env, addr, 0, 1, 1));
970+ return NULL;
971+ } else {
972+ if (ret + TARGET_PAGE_SIZE <= ram_bytes_total()) {
973+ return qemu_get_ram_ptr(ret +
974+ (((target_ulong) addr) & (TARGET_PAGE_SIZE - 1)));
975+ } else {
976+ fprintf(stderr,
977+ "cpu_get_phys_page_debug(env, " TARGET_FMT_lx ") == "
978+ TARGET_FMT_lx "\n", addr, ret);
979+ fprintf(stderr,
980+ "ret=" TARGET_FMT_lx " last_ram_offset= " TARGET_FMT_lx
981+ "\n", ret, (target_ulong) ram_bytes_total());
982+ return NULL;
983+ }
984+ }
985+ } else
986+ return (void *) (addr + env->tlb_table[is_user][index].addend);
987+}
988+
989+#ifndef MIN
990+#define MIN(a, b) (((a) < (b)) ? (a) : (b))
991+#endif
992+
993+enum {
994+ NOT_MAPPED,
995+ MAPPED_CONTIGUOUS,
996+ MAPPED_NOT_CONTIGUOUS
997+};
998+
999+#define TARGET_ADDR_LOW_ALIGN(x) ((target_ulong)(x) & ~(TARGET_PAGE_SIZE - 1))
1000+
1001+/* Return NOT_MAPPED if a page is not mapped into target physical memory */
1002+/* MAPPED_CONTIGUOUS if all pages are mapped into target physical memory and contiguous */
1003+/* MAPPED_NOT_CONTIGUOUS if all pages are mapped into target physical memory but not contiguous */
1004+static int get_target_mem_state(const CPUState *env,
1005+ target_ulong target_addr, int len)
1006+{
1007+ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
1008+ int to_end_page =
1009+ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
1010+ int ret = MAPPED_CONTIGUOUS;
1011+
1012+ if (aligned_target_addr != target_addr) {
1013+ void *phys_addr = get_phys_mem_addr(env, aligned_target_addr);
1014+ void *last_phys_addr = phys_addr;
1015+
1016+ if (phys_addr == 0) {
1017+ return NOT_MAPPED;
1018+ }
1019+ if (len > to_end_page) {
1020+ len -= to_end_page;
1021+ aligned_target_addr += TARGET_PAGE_SIZE;
1022+ int i;
1023+
1024+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
1025+ void *phys_addr =
1026+ get_phys_mem_addr(env, aligned_target_addr + i);
1027+ if (phys_addr == 0) {
1028+ return NOT_MAPPED;
1029+ }
1030+ if (phys_addr != last_phys_addr + TARGET_PAGE_SIZE)
1031+ ret = MAPPED_NOT_CONTIGUOUS;
1032+ last_phys_addr = phys_addr;
1033+ }
1034+ }
1035+ } else {
1036+ void *last_phys_addr = NULL;
1037+ int i;
1038+
1039+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
1040+ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
1041+
1042+ if (phys_addr == 0) {
1043+ return NOT_MAPPED;
1044+ }
1045+ if (i != 0 && phys_addr != last_phys_addr + TARGET_PAGE_SIZE)
1046+ ret = MAPPED_NOT_CONTIGUOUS;
1047+ last_phys_addr = phys_addr;
1048+ }
1049+ }
1050+ return ret;
1051+}
1052+
1053+/* copy len bytes from host memory at addr host_addr to target memory at logical addr target_addr */
1054+/* Returns 1 if successfull, 0 if some target pages are not mapped into target physical memory */
1055+static int memcpy_host_to_target(const CPUState *env,
1056+ target_ulong target_addr,
1057+ const void *host_addr, int len)
1058+{
1059+ int i;
1060+ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
1061+ int to_end_page =
1062+ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
1063+ int ret = get_target_mem_state(env, target_addr, len);
1064+
1065+ if (ret == NOT_MAPPED) {
1066+ return 0;
1067+ }
1068+
1069+ if (ret == MAPPED_CONTIGUOUS) {
1070+ void *phys_addr = get_phys_mem_addr(env, target_addr);
1071+
1072+ memcpy(phys_addr, host_addr, len);
1073+ } else {
1074+ if (aligned_target_addr != target_addr) {
1075+ void *phys_addr = get_phys_mem_addr(env, target_addr);
1076+
1077+ memcpy(phys_addr, host_addr, MIN(len, to_end_page));
1078+ if (len <= to_end_page) {
1079+ return 1;
1080+ }
1081+ len -= to_end_page;
1082+ host_addr += to_end_page;
1083+ target_addr = aligned_target_addr + TARGET_PAGE_SIZE;
1084+ }
1085+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
1086+ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
1087+
1088+ memcpy(phys_addr, host_addr + i,
1089+ (i + TARGET_PAGE_SIZE <=
1090+ len) ? TARGET_PAGE_SIZE : len & (TARGET_PAGE_SIZE - 1));
1091+ }
1092+ }
1093+
1094+ return 1;
1095+}
1096+
1097+static int memcpy_target_to_host(const CPUState *env, void *host_addr,
1098+ target_ulong target_addr, int len)
1099+{
1100+ int i;
1101+ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
1102+ int to_end_page =
1103+ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
1104+ int ret = get_target_mem_state(env, target_addr, len);
1105+
1106+ if (ret == NOT_MAPPED) {
1107+ return 0;
1108+ }
1109+
1110+ if (ret == MAPPED_CONTIGUOUS) {
1111+ void *phys_addr = get_phys_mem_addr(env, target_addr);
1112+
1113+ memcpy(host_addr, phys_addr, len);
1114+ } else {
1115+ if (aligned_target_addr != target_addr) {
1116+ void *phys_addr = get_phys_mem_addr(env, target_addr);
1117+
1118+ memcpy(host_addr, phys_addr, MIN(len, to_end_page));
1119+ if (len <= to_end_page)
1120+ return 1;
1121+
1122+ len -= to_end_page;
1123+ host_addr += to_end_page;
1124+ target_addr = aligned_target_addr + TARGET_PAGE_SIZE;
1125+ }
1126+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
1127+ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
1128+
1129+ memcpy(host_addr + i, phys_addr,
1130+ (i + TARGET_PAGE_SIZE <=
1131+ len) ? TARGET_PAGE_SIZE : len & (TARGET_PAGE_SIZE - 1));
1132+ }
1133+ }
1134+
1135+ return 1;
1136+}
1137+
1138+static int memcpy_target_to_host_1_1(const CPUState *env, void *host_addr,
1139+ target_ulong target_addr, int nb_args)
1140+{
1141+ return memcpy_target_to_host(env, host_addr, target_addr, nb_args * 8);
1142+}
1143+
1144+static int wordsize = 0;
1145+static int (*argcpy_target_to_host) (const CPUState *env, void *host_addr,
1146+ target_ulong target_addr, int nb_args) =
1147+ memcpy_target_to_host_1_1;
1148+
1149+void do_disconnect_current(void);
1150+void do_context_switch(Display *dpy, pid_t pid, int call);
1151+
1152+static void disconnect_current(void)
1153+{
1154+ last_process_id = 0;
1155+
1156+ return do_disconnect_current();
1157+}
1158+
1159+static int memcpy_target32_to_host(const CPUState *env, void *host_addr,
1160+ target_ulong target_addr, int nb_args)
1161+{
1162+ int ret;
1163+ uint32_t args_temp[nb_args], *src = args_temp;
1164+ arg_t *dest = host_addr;
1165+
1166+ ret = memcpy_target_to_host(env, args_temp, target_addr, nb_args * 4);
1167+ if (!ret)
1168+ return ret;
1169+
1170+ while (nb_args) {
1171+ /* TODO: endianness */
1172+ *dest = 0;
1173+ *(uint32_t *) (dest++) = *src++;
1174+ nb_args--;
1175+ }
1176+
1177+ return ret;
1178+}
1179+
1180+static int memcpy_target64_to_host(const CPUState *env, void *host_addr,
1181+ target_ulong target_addr, int nb_args)
1182+{
1183+ int ret;
1184+ uint64_t args_temp[nb_args], *src = args_temp;
1185+ arg_t *dest = host_addr;
1186+
1187+ ret = memcpy_target_to_host(env, args_temp, target_addr, nb_args * 8);
1188+ if (!ret)
1189+ return ret;
1190+
1191+ while (nb_args) {
1192+ /* TODO: endianness */
1193+ *dest = 0;
1194+ *(uint64_t *) (dest++) = *src++;
1195+ nb_args--;
1196+ }
1197+
1198+ return ret;
1199+}
1200+
1201+static int host_offset = 0;
1202+static void reset_host_offset()
1203+{
1204+ host_offset = 0;
1205+}
1206+
1207+/* Return a host pointer with the content of [target_addr, target_addr + len bytes[ */
1208+/* Do not free or modify */
1209+static const void *get_host_read_pointer(const CPUState *env,
1210+ const target_ulong target_addr, int len)
1211+{
1212+ int ret = get_target_mem_state(env, target_addr, len);
1213+
1214+ if (ret == NOT_MAPPED) {
1215+ return NULL;
1216+ } else if (ret == MAPPED_CONTIGUOUS) {
1217+ return get_phys_mem_addr(env, target_addr);
1218+ } else {
1219+ static int host_mem_size = 0;
1220+ static void *host_mem = NULL;
1221+ static void *ret;
1222+
1223+ if (host_mem_size < host_offset + len) {
1224+ host_mem_size = 2 * host_mem_size + host_offset + len;
1225+ host_mem = realloc(host_mem, host_mem_size);
1226+ }
1227+ ret = host_mem + host_offset;
1228+ assert(memcpy_target_to_host(env, ret, target_addr, len));
1229+ host_offset += len;
1230+ return ret;
1231+ }
1232+}
1233+
1234+int doing_opengl = 0;
1235+static int last_func_number = -1;
1236+static size_t(*my_strlen) (const char *) = NULL;
1237+
1238+#ifdef ENABLE_GL_LOG
1239+static FILE *f = NULL;
1240+static int logger_pid = 0;
1241+
1242+#define write_gl_debug_init() do { if (f == NULL) f = fopen("/tmp/debug_gl.bin", "wb"); } while(0)
1243+
1244+void write_gl_debug_cmd_int(int my_int)
1245+{
1246+ write_gl_debug_init();
1247+ fwrite(&my_int, sizeof(int), 1, f);
1248+ fflush(f);
1249+}
1250+
1251+void write_gl_debug_cmd_short(short my_int)
1252+{
1253+ write_gl_debug_init();
1254+ fwrite(&my_int, sizeof(short), 1, f);
1255+ fflush(f);
1256+}
1257+
1258+static void inline write_gl_debug_cmd_buffer_with_size(int size, void *buffer)
1259+{
1260+ write_gl_debug_init();
1261+ fwrite(&size, sizeof(int), 1, f);
1262+ if (size)
1263+ fwrite(buffer, size, 1, f);
1264+}
1265+
1266+static void inline write_gl_debug_cmd_buffer_without_size(
1267+ int size, void *buffer)
1268+{
1269+ write_gl_debug_init();
1270+ if (size)
1271+ fwrite(buffer, size, 1, f);
1272+}
1273+
1274+void write_gl_debug_end(void)
1275+{
1276+ write_gl_debug_init();
1277+ fclose(f);
1278+ f = NULL;
1279+ logger_pid = 0;
1280+ must_save = 0;
1281+}
1282+
1283+static inline int is_logging(int pid)
1284+{
1285+ return must_save && pid == logger_pid;
1286+}
1287+#endif
1288+
1289+#include <dlfcn.h>
1290+#include <signal.h>
1291+
1292+static void (*anticrash_handler) (void *) = NULL;
1293+static void (*show_stack_from_signal_handler) (int, int, int) = NULL;
1294+
1295+void my_anticrash_sigsegv_handler(int signum, siginfo_t *info, void *ptr)
1296+{
1297+ static int counter = 0;
1298+
1299+ counter++;
1300+
1301+ printf("oops\n");
1302+
1303+ /* if (show_stack_from_signal_handler && counter == 1) { struct ucontext*
1304+ * ctxt = (struct ucontext*)ptr; show_stack_from_signal_handler(10,
1305+ * ctxt->uc_mcontext.gregs[REG_EBP], ctxt->uc_mcontext.gregs[REG_ESP]); } */
1306+ anticrash_handler(ptr);
1307+
1308+ counter--;
1309+}
1310+
1311+static int decode_call_int(CPUState *env, int func_number, int pid,
1312+ target_ulong target_ret_string,
1313+ target_ulong in_args, target_ulong in_args_size)
1314+{
1315+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
1316+ int ret_type = signature->ret_type;
1317+ /* int has_out_parameters = signature->has_out_parameters; */
1318+ int nb_args = signature->nb_args;
1319+ int *args_type = signature->args_type;
1320+ int i;
1321+ int ret;
1322+ int *args_size = NULL;
1323+ target_ulong saved_out_ptr[50];
1324+ static char *ret_string = NULL;
1325+ static arg_t args[50];
1326+ static Display *dpy = NULL;
1327+
1328+ if (dpy == NULL) {
1329+ void *handle = dlopen("libanticrash.so", RTLD_LAZY);
1330+
1331+ if (handle) {
1332+ anticrash_handler = dlsym(handle, "anticrash_handler");
1333+ if (anticrash_handler) {
1334+ fprintf(stderr, "anticrash handler enabled\n");
1335+ struct sigaction sigsegv_action;
1336+ struct sigaction old_sigsegv_action;
1337+
1338+ sigsegv_action.sa_sigaction = my_anticrash_sigsegv_handler;
1339+ sigemptyset(&(sigsegv_action.sa_mask));
1340+ sigsegv_action.sa_flags = SA_SIGINFO | SA_NODEFER;
1341+ sigaction(SIGSEGV, &sigsegv_action, &old_sigsegv_action);
1342+ }
1343+ }
1344+ handle = dlopen("libgetstack.so", RTLD_LAZY);
1345+ if (handle) {
1346+ show_stack_from_signal_handler =
1347+ dlsym(handle, "show_stack_from_signal_handler");
1348+ }
1349+
1350+ dpy = XOpenDisplay(NULL);
1351+ init_process_tab();
1352+ ret_string = malloc(32768);
1353+ my_strlen = strlen;
1354+ }
1355+
1356+ if (unlikely(last_func_number == _exit_process_func &&
1357+ func_number == _exit_process_func)) {
1358+ last_func_number = -1;
1359+ return 0;
1360+ }
1361+
1362+ if (last_process_id != pid) {
1363+ do_context_switch(dpy, pid, func_number);
1364+ last_process_id = pid;
1365+ }
1366+
1367+ if (unlikely(func_number == _exit_process_func))
1368+ last_process_id = 0;
1369+
1370+ if (!wordsize) {
1371+ if (func_number == _init32_func || func_number == _init64_func) {
1372+ if (func_number == _init32_func) {
1373+ wordsize = 32;
1374+ argcpy_target_to_host = memcpy_target32_to_host;
1375+ } else {
1376+ wordsize = 64;
1377+ argcpy_target_to_host = memcpy_target64_to_host;
1378+ }
1379+ } else
1380+ fprintf(stderr, "commands submitted before initialisation done\n");
1381+ }
1382+
1383+ reset_host_offset();
1384+
1385+ if (nb_args) {
1386+
1387+ if (argcpy_target_to_host(env, args, in_args, nb_args) == 0) {
1388+ fprintf(stderr, "call %s pid=%d\n",
1389+ tab_opengl_calls_name[func_number], pid);
1390+ fprintf(stderr, "cannot get call parameters\n");
1391+ disconnect_current();
1392+ return 0;
1393+ }
1394+
1395+ args_size =
1396+ (int *) get_host_read_pointer(env, in_args_size,
1397+ sizeof(int) * nb_args);
1398+ if (args_size == NULL) {
1399+ fprintf(stderr, "call %s pid=%d\n",
1400+ tab_opengl_calls_name[func_number], pid);
1401+ fprintf(stderr, "cannot get call parameters size\n");
1402+ disconnect_current();
1403+ return 0;
1404+ }
1405+ }
1406+
1407+ if (func_number == _serialized_calls_func) {
1408+ int command_buffer_size = args_size[0];
1409+ const void *command_buffer =
1410+ get_host_read_pointer(env, args[0], command_buffer_size);
1411+ int commmand_buffer_offset = 0;
1412+
1413+ args_size = NULL;
1414+#ifdef ENABLE_GL_LOG
1415+ if (is_logging(pid))
1416+ write_gl_debug_cmd_short(_serialized_calls_func);
1417+#endif
1418+
1419+ while (commmand_buffer_offset < command_buffer_size) {
1420+ func_number =
1421+ *(short *) (command_buffer + commmand_buffer_offset);
1422+ if (!(func_number >= 0 && func_number < GL_N_CALLS)) {
1423+ fprintf(stderr,
1424+ "func_number >= 0 && func_number < GL_N_CALLS failed at "
1425+ "commmand_buffer_offset=%d (command_buffer_size=%d)\n",
1426+ commmand_buffer_offset, command_buffer_size);
1427+ return 0;
1428+ }
1429+ commmand_buffer_offset += sizeof(short);
1430+#ifdef ENABLE_GL_LOG
1431+ if (is_logging(pid))
1432+ write_gl_debug_cmd_short(func_number);
1433+#endif
1434+
1435+ signature = (Signature *) tab_opengl_calls[func_number];
1436+ ret_type = signature->ret_type;
1437+ assert(ret_type == TYPE_NONE);
1438+ nb_args = signature->nb_args;
1439+ args_type = signature->args_type;
1440+
1441+ for (i = 0; i < nb_args; i++) {
1442+ switch (args_type[i]) {
1443+ case TYPE_UNSIGNED_INT:
1444+ case TYPE_INT:
1445+ case TYPE_UNSIGNED_CHAR:
1446+ case TYPE_CHAR:
1447+ case TYPE_UNSIGNED_SHORT:
1448+ case TYPE_SHORT:
1449+ case TYPE_FLOAT:
1450+ {
1451+ args[i] =
1452+ *(int *) (command_buffer +
1453+ commmand_buffer_offset);
1454+#ifdef ENABLE_GL_LOG
1455+ if (is_logging(pid))
1456+ write_gl_debug_cmd_int(args[i]);
1457+#endif
1458+ commmand_buffer_offset += sizeof(int);
1459+ break;
1460+ }
1461+
1462+ case TYPE_NULL_TERMINATED_STRING:
1463+ CASE_IN_UNKNOWN_SIZE_POINTERS:
1464+ {
1465+ int arg_size =
1466+ *(int *) (command_buffer +
1467+ commmand_buffer_offset);
1468+ commmand_buffer_offset += sizeof(int);
1469+
1470+ if (arg_size == 0) {
1471+ args[i] = 0;
1472+ } else {
1473+ args[i] =
1474+ (long) (command_buffer +
1475+ commmand_buffer_offset);
1476+ }
1477+
1478+ if (args[i] == 0) {
1479+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
1480+ fprintf(stderr, "call %s arg %d pid=%d\n",
1481+ tab_opengl_calls_name[func_number], i,
1482+ pid);
1483+ disconnect_current();
1484+ return 0;
1485+ }
1486+ } else {
1487+ if (arg_size == 0) {
1488+ fprintf(stderr, "call %s arg %d pid=%d\n",
1489+ tab_opengl_calls_name[func_number], i,
1490+ pid);
1491+ fprintf(stderr, "args_size[i] == 0 !!\n");
1492+ disconnect_current();
1493+ return 0;
1494+ }
1495+ }
1496+#ifdef ENABLE_GL_LOG
1497+ if (is_logging(pid))
1498+ write_gl_debug_cmd_buffer_with_size(arg_size,
1499+ (void *)
1500+ args[i]);
1501+#endif
1502+ commmand_buffer_offset += arg_size;
1503+
1504+ break;
1505+ }
1506+
1507+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
1508+ {
1509+ int arg_size =
1510+ compute_arg_length(stderr, func_number, i, args);
1511+ args[i] =
1512+ (arg_size) ? (long) (command_buffer +
1513+ commmand_buffer_offset) : 0;
1514+#ifdef ENABLE_GL_LOG
1515+ if (is_logging(pid))
1516+ write_gl_debug_cmd_buffer_without_size(arg_size,
1517+ (void *)
1518+ args[i]);
1519+#endif
1520+ commmand_buffer_offset += arg_size;
1521+ break;
1522+ }
1523+
1524+ CASE_OUT_POINTERS:
1525+ {
1526+ fprintf(stderr,
1527+ "shouldn't happen TYPE_OUT_xxxx : call %s arg %d pid=%d\n",
1528+ tab_opengl_calls_name[func_number], i, pid);
1529+ disconnect_current();
1530+ return 0;
1531+ }
1532+
1533+ case TYPE_DOUBLE:
1534+ CASE_IN_KNOWN_SIZE_POINTERS:
1535+ args[i] =
1536+ (long) (command_buffer + commmand_buffer_offset);
1537+#ifdef ENABLE_GL_LOG
1538+ if (is_logging(pid))
1539+ write_gl_debug_cmd_buffer_without_size(
1540+ tab_args_type_length[args_type[i]],
1541+ (void *) args[i]);
1542+#endif
1543+ commmand_buffer_offset +=
1544+ tab_args_type_length[args_type[i]];
1545+ break;
1546+
1547+ case TYPE_IN_IGNORED_POINTER:
1548+ args[i] = 0;
1549+ break;
1550+
1551+ default:
1552+ fprintf(stderr,
1553+ "shouldn't happen : call %s arg %d pid=%d\n",
1554+ tab_opengl_calls_name[func_number], i, pid);
1555+ disconnect_current();
1556+ return 0;
1557+ }
1558+ }
1559+ do_function_call(func_number, args, ret_string);
1560+ }
1561+
1562+ ret = 0;
1563+ } else {
1564+#ifdef ENABLE_GL_LOG
1565+ if (is_logging(pid))
1566+ write_gl_debug_cmd_short(func_number);
1567+#endif
1568+
1569+ for (i = 0; i < nb_args; i++) {
1570+ switch (args_type[i]) {
1571+ case TYPE_UNSIGNED_INT:
1572+ case TYPE_INT:
1573+ case TYPE_UNSIGNED_CHAR:
1574+ case TYPE_CHAR:
1575+ case TYPE_UNSIGNED_SHORT:
1576+ case TYPE_SHORT:
1577+ case TYPE_FLOAT:
1578+#ifdef ENABLE_GL_LOG
1579+ if (is_logging(pid))
1580+ write_gl_debug_cmd_int(args[i]);
1581+#endif
1582+ break;
1583+
1584+ case TYPE_NULL_TERMINATED_STRING:
1585+ CASE_IN_UNKNOWN_SIZE_POINTERS:
1586+ if (args[i] == 0 && args_size[i] == 0) {
1587+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
1588+ fprintf(stderr, "call %s arg %d pid=%d\n",
1589+ tab_opengl_calls_name[func_number], i, pid);
1590+ disconnect_current();
1591+ return 0;
1592+ }
1593+ } else if (args[i] == 0 && args_size[i] != 0) {
1594+ fprintf(stderr, "call %s arg %d pid=%d\n",
1595+ tab_opengl_calls_name[func_number], i, pid);
1596+ fprintf(stderr, "args[i] == 0 && args_size[i] != 0 !!\n");
1597+ disconnect_current();
1598+ return 0;
1599+ } else if (args[i] != 0 && args_size[i] == 0) {
1600+ fprintf(stderr, "call %s arg %d pid=%d\n",
1601+ tab_opengl_calls_name[func_number], i, pid);
1602+ fprintf(stderr, "args[i] != 0 && args_size[i] == 0 !!\n");
1603+ disconnect_current();
1604+ return 0;
1605+ }
1606+ if (args[i]) {
1607+ args[i] =
1608+ (arg_t) get_host_read_pointer(env, args[i],
1609+ args_size[i]);
1610+ if (args[i] == 0) {
1611+ fprintf(stderr, "call %s arg %d pid=%d\n",
1612+ tab_opengl_calls_name[func_number], i, pid);
1613+ fprintf(stderr, "can not get %d bytes\n",
1614+ args_size[i]);
1615+ disconnect_current();
1616+ return 0;
1617+ }
1618+ }
1619+#ifdef ENABLE_GL_LOG
1620+ if (is_logging(pid))
1621+ write_gl_debug_cmd_buffer_with_size(args_size[i],
1622+ (void *) args[i]);
1623+#endif
1624+ break;
1625+
1626+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
1627+ {
1628+ args_size[i] =
1629+ compute_arg_length(stderr, func_number, i, args);
1630+ args[i] = (args_size[i]) ? (arg_t)
1631+ get_host_read_pointer(env,
1632+ args[i], args_size [i]) : 0;
1633+ if (args[i] == 0 && args_size[i] != 0) {
1634+ fprintf(stderr, "call %s arg %d pid=%d\n",
1635+ tab_opengl_calls_name[func_number], i, pid);
1636+ fprintf(stderr, "can not get %d bytes\n",
1637+ args_size[i]);
1638+ disconnect_current();
1639+ return 0;
1640+ }
1641+#ifdef ENABLE_GL_LOG
1642+ if (is_logging(pid))
1643+ write_gl_debug_cmd_buffer_without_size(args_size[i],
1644+ (void *) args[i]);
1645+#endif
1646+ break;
1647+ }
1648+
1649+ CASE_OUT_POINTERS:
1650+ {
1651+ int mem_state;
1652+
1653+#ifdef ENABLE_GL_LOG
1654+ if (is_logging(pid))
1655+ switch (args_type[i]) {
1656+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
1657+ write_gl_debug_cmd_int(args_size[i]);
1658+ break;
1659+
1660+ default:
1661+ break;
1662+ }
1663+#endif
1664+
1665+ if (func_number == glXQueryExtension_func && args[i] == 0) {
1666+ saved_out_ptr[i] = 0;
1667+ continue;
1668+ }
1669+ if (args[i] == 0 && args_size[i] == 0) {
1670+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
1671+ fprintf(stderr, "call %s arg %d pid=%d\n",
1672+ tab_opengl_calls_name[func_number], i,
1673+ pid);
1674+ disconnect_current();
1675+ return 0;
1676+ }
1677+ fprintf(stderr, "call %s arg %d pid=%d\n",
1678+ tab_opengl_calls_name[func_number], i, pid);
1679+ disconnect_current();
1680+ return 0;
1681+ } else if (args[i] == 0 && args_size[i] != 0) {
1682+ fprintf(stderr, "call %s arg %d pid=%d\n",
1683+ tab_opengl_calls_name[func_number], i, pid);
1684+ fprintf(stderr,
1685+ "args[i] == 0 && args_size[i] != 0 !!\n");
1686+ disconnect_current();
1687+ return 0;
1688+ } else if (args[i] != 0 && args_size[i] == 0) {
1689+ fprintf(stderr, "call %s arg %d pid=%d\n",
1690+ tab_opengl_calls_name[func_number], i, pid);
1691+ fprintf(stderr,
1692+ "args[i] != 0 && args_size[i] == 0 !!\n");
1693+ disconnect_current();
1694+ return 0;
1695+ }
1696+ if (args[i]) {
1697+ mem_state =
1698+ get_target_mem_state(env, args[i], args_size[i]);
1699+ if (mem_state == NOT_MAPPED) {
1700+ fprintf(stderr,
1701+ "call %s arg %d pid=%d addr="
1702+ TARGET_FMT_lx " size=%d NOT_MAPPED\n",
1703+ tab_opengl_calls_name[func_number], i,
1704+ pid, args[i], args_size[i]);
1705+ disconnect_current();
1706+ return 0;
1707+ } else if (mem_state == MAPPED_CONTIGUOUS) {
1708+ saved_out_ptr[i] = 0;
1709+ args[i] = (arg_t) get_phys_mem_addr(env, args[i]);
1710+ } else {
1711+ saved_out_ptr[i] = args[i];
1712+ args[i] = (arg_t) malloc(args_size[i]);
1713+ }
1714+ } else {
1715+ saved_out_ptr[i] = 0;
1716+ }
1717+ break;
1718+ }
1719+
1720+ case TYPE_DOUBLE:
1721+ CASE_IN_KNOWN_SIZE_POINTERS:
1722+ if (args[i] == 0) {
1723+ fprintf(stderr, "call %s arg %d pid=%d\n",
1724+ tab_opengl_calls_name[func_number], i, pid);
1725+ fprintf(stderr, "can not get %d bytes\n",
1726+ tab_args_type_length[args_type[i]]);
1727+ disconnect_current();
1728+ return 0;
1729+ }
1730+ args[i] = (arg_t) get_host_read_pointer(env,
1731+ args[i], tab_args_type_length[args_type[i]]);
1732+ if (args[i] == 0) {
1733+ fprintf(stderr, "call %s arg %d pid=%d\n",
1734+ tab_opengl_calls_name[func_number], i, pid);
1735+ fprintf(stderr, "can not get %d bytes\n",
1736+ tab_args_type_length[args_type[i]]);
1737+ disconnect_current();
1738+ return 0;
1739+ }
1740+#ifdef ENABLE_GL_LOG
1741+ if (is_logging(pid))
1742+ write_gl_debug_cmd_buffer_without_size
1743+ (tab_args_type_length[args_type[i]],
1744+ (void *) args[i]);
1745+#endif
1746+ break;
1747+
1748+ case TYPE_IN_IGNORED_POINTER:
1749+ args[i] = 0;
1750+ break;
1751+
1752+ default:
1753+ fprintf(stderr, "shouldn't happen : call %s arg %d pid=%d\n",
1754+ tab_opengl_calls_name[func_number], i, pid);
1755+ disconnect_current();
1756+ return 0;
1757+ }
1758+ }
1759+
1760+ if (ret_type == TYPE_CONST_CHAR) {
1761+ ret_string[0] = 0;
1762+ }
1763+
1764+ if (func_number == _init32_func || func_number == _init64_func) {
1765+ if (func_number == _init32_func) {
1766+ if (wordsize != 32) {
1767+ fprintf(stderr,
1768+ "clients with different ABIs not supported\n");
1769+ exit(-1);
1770+ }
1771+ } else {
1772+ if (wordsize != 64) {
1773+ fprintf(stderr,
1774+ "clients with different ABIs not supported\n");
1775+ exit(-1);
1776+ }
1777+ }
1778+
1779+ if (must_save && args[0])
1780+ fprintf(stderr, "error: pid %i is already recording\n",
1781+ logger_pid);
1782+ else if (args[0]) {
1783+ logger_pid = pid;
1784+ must_save = 1;
1785+ }
1786+#ifdef USE_KQEMU
1787+ if (env->kqemu_enabled)
1788+ *(int *) args[1] = 2;
1789+ else
1790+#endif
1791+ *(int *) args[1] = 1;
1792+ ret = 0;
1793+ } else {
1794+ ret = do_function_call(func_number, args, ret_string);
1795+ }
1796+#ifdef ENABLE_GL_LOG
1797+ if (is_logging(pid) && func_number == glXGetVisualFromFBConfig_func)
1798+ write_gl_debug_cmd_int(ret);
1799+#endif
1800+ for (i = 0; i < nb_args; i++) {
1801+ switch (args_type[i]) {
1802+ CASE_OUT_POINTERS:
1803+ {
1804+ if (saved_out_ptr[i]) {
1805+ if (memcpy_host_to_target(env, saved_out_ptr[i],
1806+ (void *) args[i],
1807+ args_size[i]) == 0) {
1808+ fprintf(stderr, "could not copy out parameters "
1809+ "back to user space\n");
1810+ disconnect_current();
1811+ return 0;
1812+ }
1813+ free((void *) args[i]);
1814+ }
1815+ break;
1816+ }
1817+
1818+ default:
1819+ break;
1820+ }
1821+ }
1822+
1823+ if (ret_type == TYPE_CONST_CHAR)
1824+ if (target_ret_string) {
1825+ /* the my_strlen stuff is a hack to workaround a GCC bug if
1826+ * using directly strlen... */
1827+ if (memcpy_host_to_target(env, target_ret_string, ret_string,
1828+ my_strlen(ret_string) + 1) == 0) {
1829+ fprintf(stderr, "cannot copy out parameters "
1830+ "back to user space\n");
1831+ disconnect_current();
1832+ return 0;
1833+ }
1834+ }
1835+ }
1836+
1837+#ifdef ENABLE_GL_LOG
1838+ if (is_logging(pid) && func_number == _exit_process_func) {
1839+ write_gl_debug_end();
1840+ }
1841+#endif
1842+
1843+ return ret;
1844+}
1845+
1846+static int decode_call(CPUState *env, int func_number, int pid,
1847+ target_ulong target_ret_string, target_ulong in_args,
1848+ target_ulong in_args_size)
1849+{
1850+ if (!(func_number >= 0 && func_number < GL_N_CALLS)) {
1851+ fprintf(stderr,
1852+ "func_number >= 0 && func_number < GL_N_CALLS failed\n");
1853+ return 0;
1854+ }
1855+
1856+ return decode_call_int(env, func_number, pid,
1857+ target_ret_string, in_args, in_args_size);
1858+}
1859+
1860+#define env first_cpu
1861+
1862+void helper_opengl(void)
1863+{
1864+ doing_opengl = 1;
1865+ env->regs[R_EAX] =
1866+ decode_call(env, env->regs[R_EAX], env->regs[R_EBX], env->regs[R_ECX],
1867+ env->regs[R_EDX], env->regs[R_ESI]);
1868+ doing_opengl = 0;
1869+}
1870+
1871+void mem_opengl(uint64_t ptr)
1872+{
1873+ uint64_t *params = get_phys_mem_addr(env, ptr);
1874+ int ret;
1875+
1876+ /* Execute */
1877+ doing_opengl = 1;
1878+ ret = decode_call(env, le64_to_cpu(params[0]),
1879+ le64_to_cpu(params[1]), le64_to_cpu(params[2]),
1880+ le64_to_cpu(params[3]), le64_to_cpu(params[4]));
1881+ doing_opengl = 0;
1882+
1883+ params[0] = cpu_to_le64(ret);
1884+ params[5] = 0;
1885+}
1886+
1887+#define THREADINFO_TASK_OFFSET 0x0 //// 0x0
1888+#define THREADSTRUCT_IOPL_OFFSET 0x78 //// 0x80
1889+#define TASKSTRUCT_NEXT_OFFSET 0x1a0 //// 0x1e8
1890+#define TASKSTRUCT_PREV_OFFSET 0x1a4 //// 0x1ec
1891+#define TASKSTRUCT_RCRED_OFFSET 0x29c //// 0x2b4
1892+#define TASKSTRUCT_CRED_OFFSET 0x2a0 //// 0x2b8
1893+#define TASKSTRUCT_COMM_OFFSET 0x2c0 //// 0x2fc
1894+#define TASKSTRUCT_THREAD_OFFSET 0x2e4 //// 0x318
1895+#define TASKSTRUCT_IO_CTX_OFFSET 0x40c //// 0x428
1896+#define CRED_CAPINH_OFFSET 0x28
1897+#define CRED_CAPPER_OFFSET 0x30
1898+#define CRED_CAPEFF_OFFSET 0x38
1899+#define CRED_CAPBST_OFFSET 0x40
1900+/* How to obtain the numbers:
1901+ * $ gbd vmlinux
1902+ * ...
1903+ * (gdb) print &((struct task_struct *) 0)->real_cred
1904+ * $22 = (const struct cred **) 0x29c
1905+ * (gdb) print &((struct task_struct *) 0)->cred
1906+ * $23 = (const struct cred **) 0x2a0
1907+ * (gbd) ...
1908+ * ...
1909+ * (gdb) ^D
1910+ * $ vim target-i386/helper_opengl.c
1911+ * ...
1912+ * :wq
1913+ * $ make
1914+ * ...
1915+ *
1916+ * Testing:
1917+ * $ x86_64-softmmu/qemu-system-x86_64 -s -hda ...
1918+ * ^Z
1919+ * [1]+ Stopped x86_64-softmmu/qemu-system-x86_64 -s -hda ...
1920+ * $ bg
1921+ * [1]+ x86_64-softmmu/qemu-system-x86_64 -s -hda ...
1922+ * $ gdb
1923+ * ...
1924+ * (gdb) target remote localhost:1234
1925+ * ...
1926+ * (gdb) print ((char *) *(unsigned int *) ((unsigned int) $rsp & ~8191)) +
1927+ * 0x2c0
1928+ * $9 = 0xc094062c "swapper"
1929+ * (gdb) print (char *) (*(unsigned int *) (((char *) *(unsigned int *)
1930+ * ((unsigned int) $rsp & ~8191)) + 0x1a0) - 0x1a0) + 0x2c0
1931+ * $10 = 0xdf87cee0 "init"
1932+ * ...
1933+ */
1934+
1935+#define CAP_SYS_RAWIO 17
1936+
1937+#define THREAD_SIZE (TARGET_PAGE_SIZE << 1)
1938+static ram_addr_t x86_current_thread(void)
1939+{
1940+ return env->regs[R_ESP] & ~(THREAD_SIZE - 1);
1941+}
1942+
1943+static ram_addr_t x86_current_task(void)
1944+{
1945+ return *(uint32_t *) get_phys_mem_addr(env,
1946+ x86_current_thread() + THREADINFO_TASK_OFFSET);
1947+}
1948+
1949+static ram_addr_t x86_current_io_ctx(void)
1950+{
1951+ return *(uint32_t *) get_phys_mem_addr(env,
1952+ x86_current_task() + TASKSTRUCT_IO_CTX_OFFSET);
1953+}
1954+
1955+static ram_addr_t x86_task_name(ram_addr_t proc)
1956+{
1957+ return x86_current_task() + TASKSTRUCT_COMM_OFFSET;
1958+}
1959+
1960+static ram_addr_t x86_task_next(ram_addr_t proc)
1961+{
1962+ return *(uint32_t *) get_phys_mem_addr(env,
1963+ x86_current_task() + TASKSTRUCT_NEXT_OFFSET) -
1964+ TASKSTRUCT_NEXT_OFFSET;
1965+}
1966+
1967+static void x86_cap_set(ram_addr_t caps, int cap)
1968+{
1969+ int offset = cap >> 5;
1970+ int mask = 1 << (cap & 31);
1971+
1972+ *(uint32_t *) get_phys_mem_addr(env, caps + offset) |= mask;
1973+}
1974+
1975+static void x86_cred_cap_set(ram_addr_t creds, int cap)
1976+{
1977+ x86_cap_set(creds + CRED_CAPINH_OFFSET, cap);
1978+ x86_cap_set(creds + CRED_CAPPER_OFFSET, cap);
1979+ x86_cap_set(creds + CRED_CAPEFF_OFFSET, cap);
1980+ x86_cap_set(creds + CRED_CAPBST_OFFSET, cap);
1981+}
1982+
1983+static void x86_task_cap_set(ram_addr_t proc, int cap)
1984+{
1985+ x86_cred_cap_set(*(uint32_t *) get_phys_mem_addr(env,
1986+ proc + TASKSTRUCT_RCRED_OFFSET), cap);
1987+ x86_cred_cap_set(*(uint32_t *) get_phys_mem_addr(env,
1988+ proc + TASKSTRUCT_CRED_OFFSET), cap);
1989+}
1990+
1991+#include "kvm.h"
1992+
1993+/* The putting and getting of the register set seems to incure a too
1994+ * high overhead. It's at least 4 ioctl's each. */
1995+#if 0
1996+static void opengl_ioport_write(void *data, uint32_t addr, uint32_t val)
1997+{
1998+ /* Ignore the first outb after iopl which is emulated by the kernel. */
1999+ if (val == (uint8_t) -1)
2000+ return;
2001+
2002+ if (kvm_enabled())
2003+ kvm_arch_get_registers(env);
2004+ doing_opengl = 1;
2005+ env->regs[R_EAX] =
2006+ decode_call(env, env->regs[R_EAX], env->regs[R_EBX], env->regs[R_ECX],
2007+ env->regs[R_ESI], env->regs[R_EDI]);
2008+ doing_opengl = 0;
2009+ if (kvm_enabled())
2010+ kvm_arch_put_registers(env);
2011+}
2012+#else
2013+static void get_regs(void)
2014+{
2015+ /* We only really need the eflags and cr[0..4] */
2016+ if (kvm_enabled())
2017+ kvm_get_sregs(env);
2018+}
2019+
2020+static void opengl_ioport_write(void *data, uint32_t addr, uint32_t val)
2021+{
2022+ uint64_t *params;
2023+ int ret;
2024+
2025+ /* Only need to fetch the registers after a guest's context switch...
2026+ * the problem is, to find out about context switches we already need
2027+ * to fetch rsp
2028+ * TODO: pass the pid in val. the params pointer doesn't need to be
2029+ * passed on all calls because it can be a global and be constant.
2030+ */
2031+ get_regs();
2032+
2033+ params = get_phys_mem_addr(env, (target_ulong) val);
2034+
2035+ /* Execute */
2036+ doing_opengl = 1;
2037+ ret = decode_call(env, le64_to_cpu(params[0]),
2038+ le64_to_cpu(params[1]), le64_to_cpu(params[2]),
2039+ le64_to_cpu(params[3]), le64_to_cpu(params[4]));
2040+ doing_opengl = 0;
2041+
2042+ params[0] = cpu_to_le64(ret);
2043+ params[5] = 0;
2044+}
2045+#endif
2046+
2047+static void opengl_ioport_write_first(void *data, uint32_t addr, uint32_t val)
2048+{
2049+ if (val != (uint32_t) -1)
2050+ return;
2051+
2052+ /* Ignore the first outb after iopl which is emulated by the kernel. */
2053+
2054+ register_ioport_write(9996, 4, 4, opengl_ioport_write, (void *) 1);
2055+}
2056+
2057+void io_register(void)
2058+{
2059+ register_ioport_write(9996, 4, 4, opengl_ioport_write_first, (void *) 1);
2060+}
2061+
2062+void opengl_process_enable(void)
2063+{
2064+ ram_addr_t task;
2065+ char *name;
2066+ int newlevel = 3;
2067+ uint32_t iopl = newlevel << 12;
2068+ void *ioplptr;
2069+
2070+ if (kvm_enabled())
2071+ kvm_arch_get_registers(env);
2072+ allow_kernel = 1;
2073+
2074+ task = x86_current_task();
2075+ x86_task_cap_set(task, CAP_SYS_RAWIO);
2076+ name = get_phys_mem_addr(env, x86_task_name(task));
2077+
2078+ ioplptr = get_phys_mem_addr(env, task +
2079+ TASKSTRUCT_THREAD_OFFSET + THREADSTRUCT_IOPL_OFFSET);
2080+ ((uint32_t *) ioplptr)[0] = cpu_to_le32(iopl);
2081+
2082+ env->eflags &= ~0x3000;
2083+ env->eflags |= newlevel << 12;
2084+
2085+ allow_kernel = 0;
2086+ if (kvm_enabled())
2087+ kvm_arch_put_registers(env, KVM_PUT_RUNTIME_STATE);
2088+
2089+ printf("Granted OpenGL access to process '%s'\n", name);
2090+
2091+ io_register();
2092+}
2093+#endif
2094Index: qemu-0.13.0/target-i386/kvm.c
2095===================================================================
2096--- qemu-0.13.0.orig/target-i386/kvm.c 2011-01-17 16:41:59.000000000 +0800
2097+++ qemu-0.13.0/target-i386/kvm.c 2011-01-17 16:42:36.000000000 +0800
2098@@ -746,7 +746,7 @@
2099 #endif
2100 }
2101
2102-static int kvm_get_sregs(CPUState *env)
2103+int kvm_get_sregs(CPUState *env)
2104 {
2105 struct kvm_sregs sregs;
2106 uint32_t hflags;
2107Index: qemu-0.13.0/target-i386/mesa_enums.c
2108===================================================================
2109--- /dev/null 1970-01-01 00:00:00.000000000 +0000
2110+++ qemu-0.13.0/target-i386/mesa_enums.c 2011-01-17 16:42:36.000000000 +0800
2111@@ -0,0 +1,4890 @@
2112+/* DO NOT EDIT - This file generated automatically by gl_enums.py (from Mesa) script */
2113+
2114+/*
2115+ * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
2116+ * All Rights Reserved.
2117+ *
2118+ * Permission is hereby granted, free of charge, to any person obtaining a
2119+ * copy of this software and associated documentation files (the "Software"),
2120+ * to deal in the Software without restriction, including without limitation
2121+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
2122+ * and/or sell copies of the Software, and to permit persons to whom the
2123+ * Software is furnished to do so, subject to the following conditions:
2124+ *
2125+ * The above copyright notice and this permission notice (including the next
2126+ * paragraph) shall be included in all copies or substantial portions of the
2127+ * Software.
2128+ *
2129+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2130+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2131+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
2132+ * BRIAN PAUL,
2133+ * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
2134+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
2135+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2136+ * SOFTWARE.
2137+ */
2138+
2139+#include "glheader.h"
2140+#include "enums.h"
2141+#include "imports.h"
2142+
2143+typedef struct {
2144+ size_t offset;
2145+ int n;
2146+} enum_elt;
2147+
2148+LONGSTRING static const char enum_string_table[] =
2149+ "GL_2D\0"
2150+ "GL_2_BYTES\0"
2151+ "GL_3D\0"
2152+ "GL_3D_COLOR\0"
2153+ "GL_3D_COLOR_TEXTURE\0"
2154+ "GL_3_BYTES\0"
2155+ "GL_4D_COLOR_TEXTURE\0"
2156+ "GL_4_BYTES\0"
2157+ "GL_ACCUM\0"
2158+ "GL_ACCUM_ALPHA_BITS\0"
2159+ "GL_ACCUM_BLUE_BITS\0"
2160+ "GL_ACCUM_BUFFER_BIT\0"
2161+ "GL_ACCUM_CLEAR_VALUE\0"
2162+ "GL_ACCUM_GREEN_BITS\0"
2163+ "GL_ACCUM_RED_BITS\0"
2164+ "GL_ACTIVE_ATTRIBUTES\0"
2165+ "GL_ACTIVE_ATTRIBUTE_MAX_LENGTH\0"
2166+ "GL_ACTIVE_STENCIL_FACE_EXT\0"
2167+ "GL_ACTIVE_TEXTURE\0"
2168+ "GL_ACTIVE_TEXTURE_ARB\0"
2169+ "GL_ACTIVE_UNIFORMS\0"
2170+ "GL_ACTIVE_UNIFORM_MAX_LENGTH\0"
2171+ "GL_ACTIVE_VERTEX_UNITS_ARB\0"
2172+ "GL_ADD\0"
2173+ "GL_ADD_SIGNED\0"
2174+ "GL_ADD_SIGNED_ARB\0"
2175+ "GL_ADD_SIGNED_EXT\0"
2176+ "GL_ALIASED_LINE_WIDTH_RANGE\0"
2177+ "GL_ALIASED_POINT_SIZE_RANGE\0"
2178+ "GL_ALL_ATTRIB_BITS\0"
2179+ "GL_ALL_CLIENT_ATTRIB_BITS\0"
2180+ "GL_ALPHA\0"
2181+ "GL_ALPHA12\0"
2182+ "GL_ALPHA12_EXT\0"
2183+ "GL_ALPHA16\0"
2184+ "GL_ALPHA16_EXT\0"
2185+ "GL_ALPHA4\0"
2186+ "GL_ALPHA4_EXT\0"
2187+ "GL_ALPHA8\0"
2188+ "GL_ALPHA8_EXT\0"
2189+ "GL_ALPHA_BIAS\0"
2190+ "GL_ALPHA_BITS\0"
2191+ "GL_ALPHA_SCALE\0"
2192+ "GL_ALPHA_TEST\0"
2193+ "GL_ALPHA_TEST_FUNC\0"
2194+ "GL_ALPHA_TEST_REF\0"
2195+ "GL_ALWAYS\0"
2196+ "GL_AMBIENT\0"
2197+ "GL_AMBIENT_AND_DIFFUSE\0"
2198+ "GL_AND\0"
2199+ "GL_AND_INVERTED\0"
2200+ "GL_AND_REVERSE\0"
2201+ "GL_ARRAY_BUFFER\0"
2202+ "GL_ARRAY_BUFFER_ARB\0"
2203+ "GL_ARRAY_BUFFER_BINDING\0"
2204+ "GL_ARRAY_BUFFER_BINDING_ARB\0"
2205+ "GL_ATTACHED_SHADERS\0"
2206+ "GL_ATTRIB_ARRAY_POINTER_NV\0"
2207+ "GL_ATTRIB_ARRAY_SIZE_NV\0"
2208+ "GL_ATTRIB_ARRAY_STRIDE_NV\0"
2209+ "GL_ATTRIB_ARRAY_TYPE_NV\0"
2210+ "GL_ATTRIB_STACK_DEPTH\0"
2211+ "GL_AUTO_NORMAL\0"
2212+ "GL_AUX0\0"
2213+ "GL_AUX1\0"
2214+ "GL_AUX2\0"
2215+ "GL_AUX3\0"
2216+ "GL_AUX_BUFFERS\0"
2217+ "GL_BACK\0"
2218+ "GL_BACK_LEFT\0"
2219+ "GL_BACK_RIGHT\0"
2220+ "GL_BGR\0"
2221+ "GL_BGRA\0"
2222+ "GL_BITMAP\0"
2223+ "GL_BITMAP_TOKEN\0"
2224+ "GL_BLEND\0"
2225+ "GL_BLEND_COLOR\0"
2226+ "GL_BLEND_COLOR_EXT\0"
2227+ "GL_BLEND_DST\0"
2228+ "GL_BLEND_DST_ALPHA\0"
2229+ "GL_BLEND_DST_RGB\0"
2230+ "GL_BLEND_EQUATION\0"
2231+ "GL_BLEND_EQUATION_ALPHA\0"
2232+ "GL_BLEND_EQUATION_ALPHA_EXT\0"
2233+ "GL_BLEND_EQUATION_EXT\0"
2234+ "GL_BLEND_EQUATION_RGB_EXT\0"
2235+ "GL_BLEND_SRC\0"
2236+ "GL_BLEND_SRC_ALPHA\0"
2237+ "GL_BLEND_SRC_RGB\0"
2238+ "GL_BLUE\0"
2239+ "GL_BLUE_BIAS\0"
2240+ "GL_BLUE_BITS\0"
2241+ "GL_BLUE_SCALE\0"
2242+ "GL_BOOL\0"
2243+ "GL_BOOL_ARB\0"
2244+ "GL_BOOL_VEC2\0"
2245+ "GL_BOOL_VEC2_ARB\0"
2246+ "GL_BOOL_VEC3\0"
2247+ "GL_BOOL_VEC3_ARB\0"
2248+ "GL_BOOL_VEC4\0"
2249+ "GL_BOOL_VEC4_ARB\0"
2250+ "GL_BUFFER_ACCESS\0"
2251+ "GL_BUFFER_ACCESS_ARB\0"
2252+ "GL_BUFFER_MAPPED\0"
2253+ "GL_BUFFER_MAPPED_ARB\0"
2254+ "GL_BUFFER_MAP_POINTER\0"
2255+ "GL_BUFFER_MAP_POINTER_ARB\0"
2256+ "GL_BUFFER_SIZE\0"
2257+ "GL_BUFFER_SIZE_ARB\0"
2258+ "GL_BUFFER_USAGE\0"
2259+ "GL_BUFFER_USAGE_ARB\0"
2260+ "GL_BYTE\0"
2261+ "GL_C3F_V3F\0"
2262+ "GL_C4F_N3F_V3F\0"
2263+ "GL_C4UB_V2F\0"
2264+ "GL_C4UB_V3F\0"
2265+ "GL_CCW\0"
2266+ "GL_CLAMP\0"
2267+ "GL_CLAMP_TO_BORDER\0"
2268+ "GL_CLAMP_TO_BORDER_ARB\0"
2269+ "GL_CLAMP_TO_BORDER_SGIS\0"
2270+ "GL_CLAMP_TO_EDGE\0"
2271+ "GL_CLAMP_TO_EDGE_SGIS\0"
2272+ "GL_CLEAR\0"
2273+ "GL_CLIENT_ACTIVE_TEXTURE\0"
2274+ "GL_CLIENT_ACTIVE_TEXTURE_ARB\0"
2275+ "GL_CLIENT_ALL_ATTRIB_BITS\0"
2276+ "GL_CLIENT_ATTRIB_STACK_DEPTH\0"
2277+ "GL_CLIENT_PIXEL_STORE_BIT\0"
2278+ "GL_CLIENT_VERTEX_ARRAY_BIT\0"
2279+ "GL_CLIP_PLANE0\0"
2280+ "GL_CLIP_PLANE1\0"
2281+ "GL_CLIP_PLANE2\0"
2282+ "GL_CLIP_PLANE3\0"
2283+ "GL_CLIP_PLANE4\0"
2284+ "GL_CLIP_PLANE5\0"
2285+ "GL_CLIP_VOLUME_CLIPPING_HINT_EXT\0"
2286+ "GL_COEFF\0"
2287+ "GL_COLOR\0"
2288+ "GL_COLOR_ARRAY\0"
2289+ "GL_COLOR_ARRAY_BUFFER_BINDING\0"
2290+ "GL_COLOR_ARRAY_BUFFER_BINDING_ARB\0"
2291+ "GL_COLOR_ARRAY_POINTER\0"
2292+ "GL_COLOR_ARRAY_SIZE\0"
2293+ "GL_COLOR_ARRAY_STRIDE\0"
2294+ "GL_COLOR_ARRAY_TYPE\0"
2295+ "GL_COLOR_ATTACHMENT0_EXT\0"
2296+ "GL_COLOR_ATTACHMENT10_EXT\0"
2297+ "GL_COLOR_ATTACHMENT11_EXT\0"
2298+ "GL_COLOR_ATTACHMENT12_EXT\0"
2299+ "GL_COLOR_ATTACHMENT13_EXT\0"
2300+ "GL_COLOR_ATTACHMENT14_EXT\0"
2301+ "GL_COLOR_ATTACHMENT15_EXT\0"
2302+ "GL_COLOR_ATTACHMENT1_EXT\0"
2303+ "GL_COLOR_ATTACHMENT2_EXT\0"
2304+ "GL_COLOR_ATTACHMENT3_EXT\0"
2305+ "GL_COLOR_ATTACHMENT4_EXT\0"
2306+ "GL_COLOR_ATTACHMENT5_EXT\0"
2307+ "GL_COLOR_ATTACHMENT6_EXT\0"
2308+ "GL_COLOR_ATTACHMENT7_EXT\0"
2309+ "GL_COLOR_ATTACHMENT8_EXT\0"
2310+ "GL_COLOR_ATTACHMENT9_EXT\0"
2311+ "GL_COLOR_BUFFER_BIT\0"
2312+ "GL_COLOR_CLEAR_VALUE\0"
2313+ "GL_COLOR_INDEX\0"
2314+ "GL_COLOR_INDEXES\0"
2315+ "GL_COLOR_LOGIC_OP\0"
2316+ "GL_COLOR_MATERIAL\0"
2317+ "GL_COLOR_MATERIAL_FACE\0"
2318+ "GL_COLOR_MATERIAL_PARAMETER\0"
2319+ "GL_COLOR_MATRIX\0"
2320+ "GL_COLOR_MATRIX_SGI\0"
2321+ "GL_COLOR_MATRIX_STACK_DEPTH\0"
2322+ "GL_COLOR_MATRIX_STACK_DEPTH_SGI\0"
2323+ "GL_COLOR_SUM\0"
2324+ "GL_COLOR_SUM_ARB\0"
2325+ "GL_COLOR_TABLE\0"
2326+ "GL_COLOR_TABLE_ALPHA_SIZE\0"
2327+ "GL_COLOR_TABLE_ALPHA_SIZE_EXT\0"
2328+ "GL_COLOR_TABLE_ALPHA_SIZE_SGI\0"
2329+ "GL_COLOR_TABLE_BIAS\0"
2330+ "GL_COLOR_TABLE_BIAS_SGI\0"
2331+ "GL_COLOR_TABLE_BLUE_SIZE\0"
2332+ "GL_COLOR_TABLE_BLUE_SIZE_EXT\0"
2333+ "GL_COLOR_TABLE_BLUE_SIZE_SGI\0"
2334+ "GL_COLOR_TABLE_FORMAT\0"
2335+ "GL_COLOR_TABLE_FORMAT_EXT\0"
2336+ "GL_COLOR_TABLE_FORMAT_SGI\0"
2337+ "GL_COLOR_TABLE_GREEN_SIZE\0"
2338+ "GL_COLOR_TABLE_GREEN_SIZE_EXT\0"
2339+ "GL_COLOR_TABLE_GREEN_SIZE_SGI\0"
2340+ "GL_COLOR_TABLE_INTENSITY_SIZE\0"
2341+ "GL_COLOR_TABLE_INTENSITY_SIZE_EXT\0"
2342+ "GL_COLOR_TABLE_INTENSITY_SIZE_SGI\0"
2343+ "GL_COLOR_TABLE_LUMINANCE_SIZE\0"
2344+ "GL_COLOR_TABLE_LUMINANCE_SIZE_EXT\0"
2345+ "GL_COLOR_TABLE_LUMINANCE_SIZE_SGI\0"
2346+ "GL_COLOR_TABLE_RED_SIZE\0"
2347+ "GL_COLOR_TABLE_RED_SIZE_EXT\0"
2348+ "GL_COLOR_TABLE_RED_SIZE_SGI\0"
2349+ "GL_COLOR_TABLE_SCALE\0"
2350+ "GL_COLOR_TABLE_SCALE_SGI\0"
2351+ "GL_COLOR_TABLE_WIDTH\0"
2352+ "GL_COLOR_TABLE_WIDTH_EXT\0"
2353+ "GL_COLOR_TABLE_WIDTH_SGI\0"
2354+ "GL_COLOR_WRITEMASK\0"
2355+ "GL_COMBINE\0"
2356+ "GL_COMBINE4\0"
2357+ "GL_COMBINE_ALPHA\0"
2358+ "GL_COMBINE_ALPHA_ARB\0"
2359+ "GL_COMBINE_ALPHA_EXT\0"
2360+ "GL_COMBINE_ARB\0"
2361+ "GL_COMBINE_EXT\0"
2362+ "GL_COMBINE_RGB\0"
2363+ "GL_COMBINE_RGB_ARB\0"
2364+ "GL_COMBINE_RGB_EXT\0"
2365+ "GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT\0"
2366+ "GL_COMPARE_R_TO_TEXTURE\0"
2367+ "GL_COMPARE_R_TO_TEXTURE_ARB\0"
2368+ "GL_COMPILE\0"
2369+ "GL_COMPILE_AND_EXECUTE\0"
2370+ "GL_COMPILE_STATUS\0"
2371+ "GL_COMPRESSED_ALPHA\0"
2372+ "GL_COMPRESSED_ALPHA_ARB\0"
2373+ "GL_COMPRESSED_INTENSITY\0"
2374+ "GL_COMPRESSED_INTENSITY_ARB\0"
2375+ "GL_COMPRESSED_LUMINANCE\0"
2376+ "GL_COMPRESSED_LUMINANCE_ALPHA\0"
2377+ "GL_COMPRESSED_LUMINANCE_ALPHA_ARB\0"
2378+ "GL_COMPRESSED_LUMINANCE_ARB\0"
2379+ "GL_COMPRESSED_RGB\0"
2380+ "GL_COMPRESSED_RGBA\0"
2381+ "GL_COMPRESSED_RGBA_ARB\0"
2382+ "GL_COMPRESSED_RGBA_FXT1_3DFX\0"
2383+ "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT\0"
2384+ "GL_COMPRESSED_RGBA_S3TC_DXT3_EXT\0"
2385+ "GL_COMPRESSED_RGBA_S3TC_DXT5_EXT\0"
2386+ "GL_COMPRESSED_RGB_ARB\0"
2387+ "GL_COMPRESSED_RGB_FXT1_3DFX\0"
2388+ "GL_COMPRESSED_RGB_S3TC_DXT1_EXT\0"
2389+ "GL_COMPRESSED_TEXTURE_FORMATS\0"
2390+ "GL_CONSTANT\0"
2391+ "GL_CONSTANT_ALPHA\0"
2392+ "GL_CONSTANT_ALPHA_EXT\0"
2393+ "GL_CONSTANT_ARB\0"
2394+ "GL_CONSTANT_ATTENUATION\0"
2395+ "GL_CONSTANT_BORDER_HP\0"
2396+ "GL_CONSTANT_COLOR\0"
2397+ "GL_CONSTANT_COLOR_EXT\0"
2398+ "GL_CONSTANT_EXT\0"
2399+ "GL_CONVOLUTION_1D\0"
2400+ "GL_CONVOLUTION_2D\0"
2401+ "GL_CONVOLUTION_BORDER_COLOR\0"
2402+ "GL_CONVOLUTION_BORDER_COLOR_HP\0"
2403+ "GL_CONVOLUTION_BORDER_MODE\0"
2404+ "GL_CONVOLUTION_BORDER_MODE_EXT\0"
2405+ "GL_CONVOLUTION_FILTER_BIAS\0"
2406+ "GL_CONVOLUTION_FILTER_BIAS_EXT\0"
2407+ "GL_CONVOLUTION_FILTER_SCALE\0"
2408+ "GL_CONVOLUTION_FILTER_SCALE_EXT\0"
2409+ "GL_CONVOLUTION_FORMAT\0"
2410+ "GL_CONVOLUTION_FORMAT_EXT\0"
2411+ "GL_CONVOLUTION_HEIGHT\0"
2412+ "GL_CONVOLUTION_HEIGHT_EXT\0"
2413+ "GL_CONVOLUTION_WIDTH\0"
2414+ "GL_CONVOLUTION_WIDTH_EXT\0"
2415+ "GL_COORD_REPLACE\0"
2416+ "GL_COORD_REPLACE_ARB\0"
2417+ "GL_COORD_REPLACE_NV\0"
2418+ "GL_COPY\0"
2419+ "GL_COPY_INVERTED\0"
2420+ "GL_COPY_PIXEL_TOKEN\0"
2421+ "GL_CULL_FACE\0"
2422+ "GL_CULL_FACE_MODE\0"
2423+ "GL_CULL_VERTEX_EXT\0"
2424+ "GL_CULL_VERTEX_EYE_POSITION_EXT\0"
2425+ "GL_CULL_VERTEX_OBJECT_POSITION_EXT\0"
2426+ "GL_CURRENT_ATTRIB_NV\0"
2427+ "GL_CURRENT_BIT\0"
2428+ "GL_CURRENT_COLOR\0"
2429+ "GL_CURRENT_FOG_COORD\0"
2430+ "GL_CURRENT_FOG_COORDINATE\0"
2431+ "GL_CURRENT_INDEX\0"
2432+ "GL_CURRENT_MATRIX_ARB\0"
2433+ "GL_CURRENT_MATRIX_INDEX_ARB\0"
2434+ "GL_CURRENT_MATRIX_NV\0"
2435+ "GL_CURRENT_MATRIX_STACK_DEPTH_ARB\0"
2436+ "GL_CURRENT_MATRIX_STACK_DEPTH_NV\0"
2437+ "GL_CURRENT_NORMAL\0"
2438+ "GL_CURRENT_PALETTE_MATRIX_ARB\0"
2439+ "GL_CURRENT_PROGRAM\0"
2440+ "GL_CURRENT_QUERY\0"
2441+ "GL_CURRENT_QUERY_ARB\0"
2442+ "GL_CURRENT_RASTER_COLOR\0"
2443+ "GL_CURRENT_RASTER_DISTANCE\0"
2444+ "GL_CURRENT_RASTER_INDEX\0"
2445+ "GL_CURRENT_RASTER_POSITION\0"
2446+ "GL_CURRENT_RASTER_POSITION_VALID\0"
2447+ "GL_CURRENT_RASTER_TEXTURE_COORDS\0"
2448+ "GL_CURRENT_SECONDARY_COLOR\0"
2449+ "GL_CURRENT_TEXTURE_COORDS\0"
2450+ "GL_CURRENT_VERTEX_ATTRIB\0"
2451+ "GL_CURRENT_VERTEX_ATTRIB_ARB\0"
2452+ "GL_CURRENT_WEIGHT_ARB\0"
2453+ "GL_CW\0"
2454+ "GL_DEBUG_ASSERT_MESA\0"
2455+ "GL_DEBUG_OBJECT_MESA\0"
2456+ "GL_DEBUG_PRINT_MESA\0"
2457+ "GL_DECAL\0"
2458+ "GL_DECR\0"
2459+ "GL_DECR_WRAP\0"
2460+ "GL_DECR_WRAP_EXT\0"
2461+ "GL_DELETE_STATUS\0"
2462+ "GL_DEPTH\0"
2463+ "GL_DEPTH_ATTACHMENT_EXT\0"
2464+ "GL_DEPTH_BIAS\0"
2465+ "GL_DEPTH_BITS\0"
2466+ "GL_DEPTH_BOUNDS_EXT\0"
2467+ "GL_DEPTH_BOUNDS_TEST_EXT\0"
2468+ "GL_DEPTH_BUFFER_BIT\0"
2469+ "GL_DEPTH_CLAMP_NV\0"
2470+ "GL_DEPTH_CLEAR_VALUE\0"
2471+ "GL_DEPTH_COMPONENT\0"
2472+ "GL_DEPTH_COMPONENT16\0"
2473+ "GL_DEPTH_COMPONENT16_ARB\0"
2474+ "GL_DEPTH_COMPONENT16_SGIX\0"
2475+ "GL_DEPTH_COMPONENT24\0"
2476+ "GL_DEPTH_COMPONENT24_ARB\0"
2477+ "GL_DEPTH_COMPONENT24_SGIX\0"
2478+ "GL_DEPTH_COMPONENT32\0"
2479+ "GL_DEPTH_COMPONENT32_ARB\0"
2480+ "GL_DEPTH_COMPONENT32_SGIX\0"
2481+ "GL_DEPTH_FUNC\0"
2482+ "GL_DEPTH_RANGE\0"
2483+ "GL_DEPTH_SCALE\0"
2484+ "GL_DEPTH_STENCIL_NV\0"
2485+ "GL_DEPTH_STENCIL_TO_BGRA_NV\0"
2486+ "GL_DEPTH_STENCIL_TO_RGBA_NV\0"
2487+ "GL_DEPTH_TEST\0"
2488+ "GL_DEPTH_TEXTURE_MODE\0"
2489+ "GL_DEPTH_TEXTURE_MODE_ARB\0"
2490+ "GL_DEPTH_WRITEMASK\0"
2491+ "GL_DIFFUSE\0"
2492+ "GL_DITHER\0"
2493+ "GL_DOMAIN\0"
2494+ "GL_DONT_CARE\0"
2495+ "GL_DOT3_RGB\0"
2496+ "GL_DOT3_RGBA\0"
2497+ "GL_DOT3_RGBA_ARB\0"
2498+ "GL_DOT3_RGBA_EXT\0"
2499+ "GL_DOT3_RGB_ARB\0"
2500+ "GL_DOT3_RGB_EXT\0"
2501+ "GL_DOUBLE\0"
2502+ "GL_DOUBLEBUFFER\0"
2503+ "GL_DRAW_BUFFER\0"
2504+ "GL_DRAW_BUFFER0\0"
2505+ "GL_DRAW_BUFFER0_ARB\0"
2506+ "GL_DRAW_BUFFER0_ATI\0"
2507+ "GL_DRAW_BUFFER1\0"
2508+ "GL_DRAW_BUFFER10\0"
2509+ "GL_DRAW_BUFFER10_ARB\0"
2510+ "GL_DRAW_BUFFER10_ATI\0"
2511+ "GL_DRAW_BUFFER11\0"
2512+ "GL_DRAW_BUFFER11_ARB\0"
2513+ "GL_DRAW_BUFFER11_ATI\0"
2514+ "GL_DRAW_BUFFER12\0"
2515+ "GL_DRAW_BUFFER12_ARB\0"
2516+ "GL_DRAW_BUFFER12_ATI\0"
2517+ "GL_DRAW_BUFFER13\0"
2518+ "GL_DRAW_BUFFER13_ARB\0"
2519+ "GL_DRAW_BUFFER13_ATI\0"
2520+ "GL_DRAW_BUFFER14\0"
2521+ "GL_DRAW_BUFFER14_ARB\0"
2522+ "GL_DRAW_BUFFER14_ATI\0"
2523+ "GL_DRAW_BUFFER15\0"
2524+ "GL_DRAW_BUFFER15_ARB\0"
2525+ "GL_DRAW_BUFFER15_ATI\0"
2526+ "GL_DRAW_BUFFER1_ARB\0"
2527+ "GL_DRAW_BUFFER1_ATI\0"
2528+ "GL_DRAW_BUFFER2\0"
2529+ "GL_DRAW_BUFFER2_ARB\0"
2530+ "GL_DRAW_BUFFER2_ATI\0"
2531+ "GL_DRAW_BUFFER3\0"
2532+ "GL_DRAW_BUFFER3_ARB\0"
2533+ "GL_DRAW_BUFFER3_ATI\0"
2534+ "GL_DRAW_BUFFER4\0"
2535+ "GL_DRAW_BUFFER4_ARB\0"
2536+ "GL_DRAW_BUFFER4_ATI\0"
2537+ "GL_DRAW_BUFFER5\0"
2538+ "GL_DRAW_BUFFER5_ARB\0"
2539+ "GL_DRAW_BUFFER5_ATI\0"
2540+ "GL_DRAW_BUFFER6\0"
2541+ "GL_DRAW_BUFFER6_ARB\0"
2542+ "GL_DRAW_BUFFER6_ATI\0"
2543+ "GL_DRAW_BUFFER7\0"
2544+ "GL_DRAW_BUFFER7_ARB\0"
2545+ "GL_DRAW_BUFFER7_ATI\0"
2546+ "GL_DRAW_BUFFER8\0"
2547+ "GL_DRAW_BUFFER8_ARB\0"
2548+ "GL_DRAW_BUFFER8_ATI\0"
2549+ "GL_DRAW_BUFFER9\0"
2550+ "GL_DRAW_BUFFER9_ARB\0"
2551+ "GL_DRAW_BUFFER9_ATI\0"
2552+ "GL_DRAW_FRAMEBUFFER_BINDING_EXT\0"
2553+ "GL_DRAW_FRAMEBUFFER_EXT\0"
2554+ "GL_DRAW_PIXEL_TOKEN\0"
2555+ "GL_DST_ALPHA\0"
2556+ "GL_DST_COLOR\0"
2557+ "GL_DYNAMIC_COPY\0"
2558+ "GL_DYNAMIC_COPY_ARB\0"
2559+ "GL_DYNAMIC_DRAW\0"
2560+ "GL_DYNAMIC_DRAW_ARB\0"
2561+ "GL_DYNAMIC_READ\0"
2562+ "GL_DYNAMIC_READ_ARB\0"
2563+ "GL_EDGE_FLAG\0"
2564+ "GL_EDGE_FLAG_ARRAY\0"
2565+ "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING\0"
2566+ "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB\0"
2567+ "GL_EDGE_FLAG_ARRAY_POINTER\0"
2568+ "GL_EDGE_FLAG_ARRAY_STRIDE\0"
2569+ "GL_ELEMENT_ARRAY_BUFFER\0"
2570+ "GL_ELEMENT_ARRAY_BUFFER_ARB\0"
2571+ "GL_ELEMENT_ARRAY_BUFFER_BINDING\0"
2572+ "GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB\0"
2573+ "GL_EMISSION\0"
2574+ "GL_ENABLE_BIT\0"
2575+ "GL_EQUAL\0"
2576+ "GL_EQUIV\0"
2577+ "GL_EVAL_BIT\0"
2578+ "GL_EXP\0"
2579+ "GL_EXP2\0"
2580+ "GL_EXTENSIONS\0"
2581+ "GL_EYE_LINEAR\0"
2582+ "GL_EYE_PLANE\0"
2583+ "GL_EYE_PLANE_ABSOLUTE_NV\0"
2584+ "GL_EYE_RADIAL_NV\0"
2585+ "GL_FALSE\0"
2586+ "GL_FASTEST\0"
2587+ "GL_FEEDBACK\0"
2588+ "GL_FEEDBACK_BUFFER_POINTER\0"
2589+ "GL_FEEDBACK_BUFFER_SIZE\0"
2590+ "GL_FEEDBACK_BUFFER_TYPE\0"
2591+ "GL_FILL\0"
2592+ "GL_FLAT\0"
2593+ "GL_FLOAT\0"
2594+ "GL_FLOAT_MAT2\0"
2595+ "GL_FLOAT_MAT2_ARB\0"
2596+ "GL_FLOAT_MAT3\0"
2597+ "GL_FLOAT_MAT3_ARB\0"
2598+ "GL_FLOAT_MAT4\0"
2599+ "GL_FLOAT_MAT4_ARB\0"
2600+ "GL_FLOAT_VEC2\0"
2601+ "GL_FLOAT_VEC2_ARB\0"
2602+ "GL_FLOAT_VEC3\0"
2603+ "GL_FLOAT_VEC3_ARB\0"
2604+ "GL_FLOAT_VEC4\0"
2605+ "GL_FLOAT_VEC4_ARB\0"
2606+ "GL_FOG\0"
2607+ "GL_FOG_BIT\0"
2608+ "GL_FOG_COLOR\0"
2609+ "GL_FOG_COORD\0"
2610+ "GL_FOG_COORDINATE\0"
2611+ "GL_FOG_COORDINATE_ARRAY\0"
2612+ "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING\0"
2613+ "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB\0"
2614+ "GL_FOG_COORDINATE_ARRAY_POINTER\0"
2615+ "GL_FOG_COORDINATE_ARRAY_STRIDE\0"
2616+ "GL_FOG_COORDINATE_ARRAY_TYPE\0"
2617+ "GL_FOG_COORDINATE_SOURCE\0"
2618+ "GL_FOG_COORD_ARRAY\0"
2619+ "GL_FOG_COORD_ARRAY_BUFFER_BINDING\0"
2620+ "GL_FOG_COORD_ARRAY_POINTER\0"
2621+ "GL_FOG_COORD_ARRAY_STRIDE\0"
2622+ "GL_FOG_COORD_ARRAY_TYPE\0"
2623+ "GL_FOG_COORD_SRC\0"
2624+ "GL_FOG_DENSITY\0"
2625+ "GL_FOG_DISTANCE_MODE_NV\0"
2626+ "GL_FOG_END\0"
2627+ "GL_FOG_HINT\0"
2628+ "GL_FOG_INDEX\0"
2629+ "GL_FOG_MODE\0"
2630+ "GL_FOG_OFFSET_SGIX\0"
2631+ "GL_FOG_OFFSET_VALUE_SGIX\0"
2632+ "GL_FOG_START\0"
2633+ "GL_FRAGMENT_DEPTH\0"
2634+ "GL_FRAGMENT_PROGRAM_ARB\0"
2635+ "GL_FRAGMENT_SHADER\0"
2636+ "GL_FRAGMENT_SHADER_ARB\0"
2637+ "GL_FRAGMENT_SHADER_DERIVATIVE_HINT\0"
2638+ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT\0"
2639+ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT\0"
2640+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT\0"
2641+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT\0"
2642+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT\0"
2643+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT\0"
2644+ "GL_FRAMEBUFFER_BINDING_EXT\0"
2645+ "GL_FRAMEBUFFER_COMPLETE_EXT\0"
2646+ "GL_FRAMEBUFFER_EXT\0"
2647+ "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT\0"
2648+ "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT\0"
2649+ "GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT\0"
2650+ "GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT\0"
2651+ "GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT\0"
2652+ "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT\0"
2653+ "GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT\0"
2654+ "GL_FRAMEBUFFER_STATUS_ERROR_EXT\0"
2655+ "GL_FRAMEBUFFER_UNSUPPORTED_EXT\0"
2656+ "GL_FRONT\0"
2657+ "GL_FRONT_AND_BACK\0"
2658+ "GL_FRONT_FACE\0"
2659+ "GL_FRONT_LEFT\0"
2660+ "GL_FRONT_RIGHT\0"
2661+ "GL_FUNC_ADD\0"
2662+ "GL_FUNC_ADD_EXT\0"
2663+ "GL_FUNC_REVERSE_SUBTRACT\0"
2664+ "GL_FUNC_REVERSE_SUBTRACT_EXT\0"
2665+ "GL_FUNC_SUBTRACT\0"
2666+ "GL_FUNC_SUBTRACT_EXT\0"
2667+ "GL_GENERATE_MIPMAP\0"
2668+ "GL_GENERATE_MIPMAP_HINT\0"
2669+ "GL_GENERATE_MIPMAP_HINT_SGIS\0"
2670+ "GL_GENERATE_MIPMAP_SGIS\0"
2671+ "GL_GEQUAL\0"
2672+ "GL_GL_BLEND_EQUATION_RGB\0"
2673+ "GL_GL_COMPRESSED_SLUMINANCE\0"
2674+ "GL_GL_COMPRESSED_SLUMINANCE_ALPHA\0"
2675+ "GL_GL_COMPRESSED_SRGB\0"
2676+ "GL_GL_COMPRESSED_SRGB_ALPHA\0"
2677+ "GL_GL_CURRENT_RASTER_SECONDARY_COLOR\0"
2678+ "GL_GL_FLOAT_MAT2x3\0"
2679+ "GL_GL_FLOAT_MAT2x4\0"
2680+ "GL_GL_FLOAT_MAT3x2\0"
2681+ "GL_GL_FLOAT_MAT3x4\0"
2682+ "GL_GL_FLOAT_MAT4x2\0"
2683+ "GL_GL_FLOAT_MAT4x3\0"
2684+ "GL_GL_PIXEL_PACK_BUFFER\0"
2685+ "GL_GL_PIXEL_PACK_BUFFER_BINDING\0"
2686+ "GL_GL_PIXEL_UNPACK_BUFFER\0"
2687+ "GL_GL_PIXEL_UNPACK_BUFFER_BINDING\0"
2688+ "GL_GL_SLUMINANCE\0"
2689+ "GL_GL_SLUMINANCE8\0"
2690+ "GL_GL_SLUMINANCE8_ALPHA8\0"
2691+ "GL_GL_SLUMINANCE_ALPHA\0"
2692+ "GL_GL_SRGB\0"
2693+ "GL_GL_SRGB8\0"
2694+ "GL_GL_SRGB8_ALPHA8\0"
2695+ "GL_GL_SRGB_ALPHA\0"
2696+ "GL_GREATER\0"
2697+ "GL_GREEN\0"
2698+ "GL_GREEN_BIAS\0"
2699+ "GL_GREEN_BITS\0"
2700+ "GL_GREEN_SCALE\0"
2701+ "GL_HINT_BIT\0"
2702+ "GL_HISTOGRAM\0"
2703+ "GL_HISTOGRAM_ALPHA_SIZE\0"
2704+ "GL_HISTOGRAM_ALPHA_SIZE_EXT\0"
2705+ "GL_HISTOGRAM_BLUE_SIZE\0"
2706+ "GL_HISTOGRAM_BLUE_SIZE_EXT\0"
2707+ "GL_HISTOGRAM_EXT\0"
2708+ "GL_HISTOGRAM_FORMAT\0"
2709+ "GL_HISTOGRAM_FORMAT_EXT\0"
2710+ "GL_HISTOGRAM_GREEN_SIZE\0"
2711+ "GL_HISTOGRAM_GREEN_SIZE_EXT\0"
2712+ "GL_HISTOGRAM_LUMINANCE_SIZE\0"
2713+ "GL_HISTOGRAM_LUMINANCE_SIZE_EXT\0"
2714+ "GL_HISTOGRAM_RED_SIZE\0"
2715+ "GL_HISTOGRAM_RED_SIZE_EXT\0"
2716+ "GL_HISTOGRAM_SINK\0"
2717+ "GL_HISTOGRAM_SINK_EXT\0"
2718+ "GL_HISTOGRAM_WIDTH\0"
2719+ "GL_HISTOGRAM_WIDTH_EXT\0"
2720+ "GL_IDENTITY_NV\0"
2721+ "GL_IGNORE_BORDER_HP\0"
2722+ "GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES\0"
2723+ "GL_IMPLEMENTATION_COLOR_READ_TYPE_OES\0"
2724+ "GL_INCR\0"
2725+ "GL_INCR_WRAP\0"
2726+ "GL_INCR_WRAP_EXT\0"
2727+ "GL_INDEX_ARRAY\0"
2728+ "GL_INDEX_ARRAY_BUFFER_BINDING\0"
2729+ "GL_INDEX_ARRAY_BUFFER_BINDING_ARB\0"
2730+ "GL_INDEX_ARRAY_POINTER\0"
2731+ "GL_INDEX_ARRAY_STRIDE\0"
2732+ "GL_INDEX_ARRAY_TYPE\0"
2733+ "GL_INDEX_BITS\0"
2734+ "GL_INDEX_CLEAR_VALUE\0"
2735+ "GL_INDEX_LOGIC_OP\0"
2736+ "GL_INDEX_MODE\0"
2737+ "GL_INDEX_OFFSET\0"
2738+ "GL_INDEX_SHIFT\0"
2739+ "GL_INDEX_WRITEMASK\0"
2740+ "GL_INFO_LOG_LENGTH\0"
2741+ "GL_INT\0"
2742+ "GL_INTENSITY\0"
2743+ "GL_INTENSITY12\0"
2744+ "GL_INTENSITY12_EXT\0"
2745+ "GL_INTENSITY16\0"
2746+ "GL_INTENSITY16_EXT\0"
2747+ "GL_INTENSITY4\0"
2748+ "GL_INTENSITY4_EXT\0"
2749+ "GL_INTENSITY8\0"
2750+ "GL_INTENSITY8_EXT\0"
2751+ "GL_INTENSITY_EXT\0"
2752+ "GL_INTERPOLATE\0"
2753+ "GL_INTERPOLATE_ARB\0"
2754+ "GL_INTERPOLATE_EXT\0"
2755+ "GL_INT_VEC2\0"
2756+ "GL_INT_VEC2_ARB\0"
2757+ "GL_INT_VEC3\0"
2758+ "GL_INT_VEC3_ARB\0"
2759+ "GL_INT_VEC4\0"
2760+ "GL_INT_VEC4_ARB\0"
2761+ "GL_INVALID_ENUM\0"
2762+ "GL_INVALID_FRAMEBUFFER_OPERATION_EXT\0"
2763+ "GL_INVALID_OPERATION\0"
2764+ "GL_INVALID_VALUE\0"
2765+ "GL_INVERSE_NV\0"
2766+ "GL_INVERSE_TRANSPOSE_NV\0"
2767+ "GL_INVERT\0"
2768+ "GL_KEEP\0"
2769+ "GL_LEFT\0"
2770+ "GL_LEQUAL\0"
2771+ "GL_LESS\0"
2772+ "GL_LIGHT0\0"
2773+ "GL_LIGHT1\0"
2774+ "GL_LIGHT2\0"
2775+ "GL_LIGHT3\0"
2776+ "GL_LIGHT4\0"
2777+ "GL_LIGHT5\0"
2778+ "GL_LIGHT6\0"
2779+ "GL_LIGHT7\0"
2780+ "GL_LIGHTING\0"
2781+ "GL_LIGHTING_BIT\0"
2782+ "GL_LIGHT_MODEL_AMBIENT\0"
2783+ "GL_LIGHT_MODEL_COLOR_CONTROL\0"
2784+ "GL_LIGHT_MODEL_COLOR_CONTROL_EXT\0"
2785+ "GL_LIGHT_MODEL_LOCAL_VIEWER\0"
2786+ "GL_LIGHT_MODEL_TWO_SIDE\0"
2787+ "GL_LINE\0"
2788+ "GL_LINEAR\0"
2789+ "GL_LINEAR_ATTENUATION\0"
2790+ "GL_LINEAR_CLIPMAP_LINEAR_SGIX\0"
2791+ "GL_LINEAR_CLIPMAP_NEAREST_SGIX\0"
2792+ "GL_LINEAR_MIPMAP_LINEAR\0"
2793+ "GL_LINEAR_MIPMAP_NEAREST\0"
2794+ "GL_LINES\0"
2795+ "GL_LINE_BIT\0"
2796+ "GL_LINE_LOOP\0"
2797+ "GL_LINE_RESET_TOKEN\0"
2798+ "GL_LINE_SMOOTH\0"
2799+ "GL_LINE_SMOOTH_HINT\0"
2800+ "GL_LINE_STIPPLE\0"
2801+ "GL_LINE_STIPPLE_PATTERN\0"
2802+ "GL_LINE_STIPPLE_REPEAT\0"
2803+ "GL_LINE_STRIP\0"
2804+ "GL_LINE_TOKEN\0"
2805+ "GL_LINE_WIDTH\0"
2806+ "GL_LINE_WIDTH_GRANULARITY\0"
2807+ "GL_LINE_WIDTH_RANGE\0"
2808+ "GL_LINK_STATUS\0"
2809+ "GL_LIST_BASE\0"
2810+ "GL_LIST_BIT\0"
2811+ "GL_LIST_INDEX\0"
2812+ "GL_LIST_MODE\0"
2813+ "GL_LOAD\0"
2814+ "GL_LOGIC_OP\0"
2815+ "GL_LOGIC_OP_MODE\0"
2816+ "GL_LOWER_LEFT\0"
2817+ "GL_LUMINANCE\0"
2818+ "GL_LUMINANCE12\0"
2819+ "GL_LUMINANCE12_ALPHA12\0"
2820+ "GL_LUMINANCE12_ALPHA12_EXT\0"
2821+ "GL_LUMINANCE12_ALPHA4\0"
2822+ "GL_LUMINANCE12_ALPHA4_EXT\0"
2823+ "GL_LUMINANCE12_EXT\0"
2824+ "GL_LUMINANCE16\0"
2825+ "GL_LUMINANCE16_ALPHA16\0"
2826+ "GL_LUMINANCE16_ALPHA16_EXT\0"
2827+ "GL_LUMINANCE16_EXT\0"
2828+ "GL_LUMINANCE4\0"
2829+ "GL_LUMINANCE4_ALPHA4\0"
2830+ "GL_LUMINANCE4_ALPHA4_EXT\0"
2831+ "GL_LUMINANCE4_EXT\0"
2832+ "GL_LUMINANCE6_ALPHA2\0"
2833+ "GL_LUMINANCE6_ALPHA2_EXT\0"
2834+ "GL_LUMINANCE8\0"
2835+ "GL_LUMINANCE8_ALPHA8\0"
2836+ "GL_LUMINANCE8_ALPHA8_EXT\0"
2837+ "GL_LUMINANCE8_EXT\0"
2838+ "GL_LUMINANCE_ALPHA\0"
2839+ "GL_MAP1_COLOR_4\0"
2840+ "GL_MAP1_GRID_DOMAIN\0"
2841+ "GL_MAP1_GRID_SEGMENTS\0"
2842+ "GL_MAP1_INDEX\0"
2843+ "GL_MAP1_NORMAL\0"
2844+ "GL_MAP1_TEXTURE_COORD_1\0"
2845+ "GL_MAP1_TEXTURE_COORD_2\0"
2846+ "GL_MAP1_TEXTURE_COORD_3\0"
2847+ "GL_MAP1_TEXTURE_COORD_4\0"
2848+ "GL_MAP1_VERTEX_3\0"
2849+ "GL_MAP1_VERTEX_4\0"
2850+ "GL_MAP1_VERTEX_ATTRIB0_4_NV\0"
2851+ "GL_MAP1_VERTEX_ATTRIB10_4_NV\0"
2852+ "GL_MAP1_VERTEX_ATTRIB11_4_NV\0"
2853+ "GL_MAP1_VERTEX_ATTRIB12_4_NV\0"
2854+ "GL_MAP1_VERTEX_ATTRIB13_4_NV\0"
2855+ "GL_MAP1_VERTEX_ATTRIB14_4_NV\0"
2856+ "GL_MAP1_VERTEX_ATTRIB15_4_NV\0"
2857+ "GL_MAP1_VERTEX_ATTRIB1_4_NV\0"
2858+ "GL_MAP1_VERTEX_ATTRIB2_4_NV\0"
2859+ "GL_MAP1_VERTEX_ATTRIB3_4_NV\0"
2860+ "GL_MAP1_VERTEX_ATTRIB4_4_NV\0"
2861+ "GL_MAP1_VERTEX_ATTRIB5_4_NV\0"
2862+ "GL_MAP1_VERTEX_ATTRIB6_4_NV\0"
2863+ "GL_MAP1_VERTEX_ATTRIB7_4_NV\0"
2864+ "GL_MAP1_VERTEX_ATTRIB8_4_NV\0"
2865+ "GL_MAP1_VERTEX_ATTRIB9_4_NV\0"
2866+ "GL_MAP2_COLOR_4\0"
2867+ "GL_MAP2_GRID_DOMAIN\0"
2868+ "GL_MAP2_GRID_SEGMENTS\0"
2869+ "GL_MAP2_INDEX\0"
2870+ "GL_MAP2_NORMAL\0"
2871+ "GL_MAP2_TEXTURE_COORD_1\0"
2872+ "GL_MAP2_TEXTURE_COORD_2\0"
2873+ "GL_MAP2_TEXTURE_COORD_3\0"
2874+ "GL_MAP2_TEXTURE_COORD_4\0"
2875+ "GL_MAP2_VERTEX_3\0"
2876+ "GL_MAP2_VERTEX_4\0"
2877+ "GL_MAP2_VERTEX_ATTRIB0_4_NV\0"
2878+ "GL_MAP2_VERTEX_ATTRIB10_4_NV\0"
2879+ "GL_MAP2_VERTEX_ATTRIB11_4_NV\0"
2880+ "GL_MAP2_VERTEX_ATTRIB12_4_NV\0"
2881+ "GL_MAP2_VERTEX_ATTRIB13_4_NV\0"
2882+ "GL_MAP2_VERTEX_ATTRIB14_4_NV\0"
2883+ "GL_MAP2_VERTEX_ATTRIB15_4_NV\0"
2884+ "GL_MAP2_VERTEX_ATTRIB1_4_NV\0"
2885+ "GL_MAP2_VERTEX_ATTRIB2_4_NV\0"
2886+ "GL_MAP2_VERTEX_ATTRIB3_4_NV\0"
2887+ "GL_MAP2_VERTEX_ATTRIB4_4_NV\0"
2888+ "GL_MAP2_VERTEX_ATTRIB5_4_NV\0"
2889+ "GL_MAP2_VERTEX_ATTRIB6_4_NV\0"
2890+ "GL_MAP2_VERTEX_ATTRIB7_4_NV\0"
2891+ "GL_MAP2_VERTEX_ATTRIB8_4_NV\0"
2892+ "GL_MAP2_VERTEX_ATTRIB9_4_NV\0"
2893+ "GL_MAP_COLOR\0"
2894+ "GL_MAP_STENCIL\0"
2895+ "GL_MATRIX0_ARB\0"
2896+ "GL_MATRIX0_NV\0"
2897+ "GL_MATRIX10_ARB\0"
2898+ "GL_MATRIX11_ARB\0"
2899+ "GL_MATRIX12_ARB\0"
2900+ "GL_MATRIX13_ARB\0"
2901+ "GL_MATRIX14_ARB\0"
2902+ "GL_MATRIX15_ARB\0"
2903+ "GL_MATRIX16_ARB\0"
2904+ "GL_MATRIX17_ARB\0"
2905+ "GL_MATRIX18_ARB\0"
2906+ "GL_MATRIX19_ARB\0"
2907+ "GL_MATRIX1_ARB\0"
2908+ "GL_MATRIX1_NV\0"
2909+ "GL_MATRIX20_ARB\0"
2910+ "GL_MATRIX21_ARB\0"
2911+ "GL_MATRIX22_ARB\0"
2912+ "GL_MATRIX23_ARB\0"
2913+ "GL_MATRIX24_ARB\0"
2914+ "GL_MATRIX25_ARB\0"
2915+ "GL_MATRIX26_ARB\0"
2916+ "GL_MATRIX27_ARB\0"
2917+ "GL_MATRIX28_ARB\0"
2918+ "GL_MATRIX29_ARB\0"
2919+ "GL_MATRIX2_ARB\0"
2920+ "GL_MATRIX2_NV\0"
2921+ "GL_MATRIX30_ARB\0"
2922+ "GL_MATRIX31_ARB\0"
2923+ "GL_MATRIX3_ARB\0"
2924+ "GL_MATRIX3_NV\0"
2925+ "GL_MATRIX4_ARB\0"
2926+ "GL_MATRIX4_NV\0"
2927+ "GL_MATRIX5_ARB\0"
2928+ "GL_MATRIX5_NV\0"
2929+ "GL_MATRIX6_ARB\0"
2930+ "GL_MATRIX6_NV\0"
2931+ "GL_MATRIX7_ARB\0"
2932+ "GL_MATRIX7_NV\0"
2933+ "GL_MATRIX8_ARB\0"
2934+ "GL_MATRIX9_ARB\0"
2935+ "GL_MATRIX_INDEX_ARRAY_ARB\0"
2936+ "GL_MATRIX_INDEX_ARRAY_POINTER_ARB\0"
2937+ "GL_MATRIX_INDEX_ARRAY_SIZE_ARB\0"
2938+ "GL_MATRIX_INDEX_ARRAY_STRIDE_ARB\0"
2939+ "GL_MATRIX_INDEX_ARRAY_TYPE_ARB\0"
2940+ "GL_MATRIX_MODE\0"
2941+ "GL_MATRIX_PALETTE_ARB\0"
2942+ "GL_MAX\0"
2943+ "GL_MAX_3D_TEXTURE_SIZE\0"
2944+ "GL_MAX_ARRAY_TEXTURE_LAYERS_EXT\0"
2945+ "GL_MAX_ATTRIB_STACK_DEPTH\0"
2946+ "GL_MAX_CLIENT_ATTRIB_STACK_DEPTH\0"
2947+ "GL_MAX_CLIPMAP_DEPTH_SGIX\0"
2948+ "GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX\0"
2949+ "GL_MAX_CLIP_PLANES\0"
2950+ "GL_MAX_COLOR_ATTACHMENTS_EXT\0"
2951+ "GL_MAX_COLOR_MATRIX_STACK_DEPTH\0"
2952+ "GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI\0"
2953+ "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS\0"
2954+ "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB\0"
2955+ "GL_MAX_CONVOLUTION_HEIGHT\0"
2956+ "GL_MAX_CONVOLUTION_HEIGHT_EXT\0"
2957+ "GL_MAX_CONVOLUTION_WIDTH\0"
2958+ "GL_MAX_CONVOLUTION_WIDTH_EXT\0"
2959+ "GL_MAX_CUBE_MAP_TEXTURE_SIZE\0"
2960+ "GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB\0"
2961+ "GL_MAX_DRAW_BUFFERS\0"
2962+ "GL_MAX_DRAW_BUFFERS_ARB\0"
2963+ "GL_MAX_DRAW_BUFFERS_ATI\0"
2964+ "GL_MAX_ELEMENTS_INDICES\0"
2965+ "GL_MAX_ELEMENTS_VERTICES\0"
2966+ "GL_MAX_EVAL_ORDER\0"
2967+ "GL_MAX_EXT\0"
2968+ "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS\0"
2969+ "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB\0"
2970+ "GL_MAX_LIGHTS\0"
2971+ "GL_MAX_LIST_NESTING\0"
2972+ "GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB\0"
2973+ "GL_MAX_MODELVIEW_STACK_DEPTH\0"
2974+ "GL_MAX_NAME_STACK_DEPTH\0"
2975+ "GL_MAX_PALETTE_MATRICES_ARB\0"
2976+ "GL_MAX_PIXEL_MAP_TABLE\0"
2977+ "GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB\0"
2978+ "GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB\0"
2979+ "GL_MAX_PROGRAM_ATTRIBS_ARB\0"
2980+ "GL_MAX_PROGRAM_CALL_DEPTH_NV\0"
2981+ "GL_MAX_PROGRAM_ENV_PARAMETERS_ARB\0"
2982+ "GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV\0"
2983+ "GL_MAX_PROGRAM_IF_DEPTH_NV\0"
2984+ "GL_MAX_PROGRAM_INSTRUCTIONS_ARB\0"
2985+ "GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB\0"
2986+ "GL_MAX_PROGRAM_LOOP_COUNT_NV\0"
2987+ "GL_MAX_PROGRAM_LOOP_DEPTH_NV\0"
2988+ "GL_MAX_PROGRAM_MATRICES_ARB\0"
2989+ "GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB\0"
2990+ "GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB\0"
2991+ "GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB\0"
2992+ "GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB\0"
2993+ "GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB\0"
2994+ "GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB\0"
2995+ "GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB\0"
2996+ "GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB\0"
2997+ "GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB\0"
2998+ "GL_MAX_PROGRAM_PARAMETERS_ARB\0"
2999+ "GL_MAX_PROGRAM_TEMPORARIES_ARB\0"
3000+ "GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB\0"
3001+ "GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB\0"
3002+ "GL_MAX_PROJECTION_STACK_DEPTH\0"
3003+ "GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB\0"
3004+ "GL_MAX_RECTANGLE_TEXTURE_SIZE_NV\0"
3005+ "GL_MAX_RENDERBUFFER_SIZE_EXT\0"
3006+ "GL_MAX_SHININESS_NV\0"
3007+ "GL_MAX_SPOT_EXPONENT_NV\0"
3008+ "GL_MAX_TEXTURE_COORDS\0"
3009+ "GL_MAX_TEXTURE_COORDS_ARB\0"
3010+ "GL_MAX_TEXTURE_IMAGE_UNITS\0"
3011+ "GL_MAX_TEXTURE_IMAGE_UNITS_ARB\0"
3012+ "GL_MAX_TEXTURE_LOD_BIAS\0"
3013+ "GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT\0"
3014+ "GL_MAX_TEXTURE_SIZE\0"
3015+ "GL_MAX_TEXTURE_STACK_DEPTH\0"
3016+ "GL_MAX_TEXTURE_UNITS\0"
3017+ "GL_MAX_TEXTURE_UNITS_ARB\0"
3018+ "GL_MAX_TRACK_MATRICES_NV\0"
3019+ "GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV\0"
3020+ "GL_MAX_VARYING_FLOATS\0"
3021+ "GL_MAX_VARYING_FLOATS_ARB\0"
3022+ "GL_MAX_VERTEX_ATTRIBS\0"
3023+ "GL_MAX_VERTEX_ATTRIBS_ARB\0"
3024+ "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS\0"
3025+ "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB\0"
3026+ "GL_MAX_VERTEX_UNIFORM_COMPONENTS\0"
3027+ "GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB\0"
3028+ "GL_MAX_VERTEX_UNITS_ARB\0"
3029+ "GL_MAX_VIEWPORT_DIMS\0"
3030+ "GL_MIN\0"
3031+ "GL_MINMAX\0"
3032+ "GL_MINMAX_EXT\0"
3033+ "GL_MINMAX_FORMAT\0"
3034+ "GL_MINMAX_FORMAT_EXT\0"
3035+ "GL_MINMAX_SINK\0"
3036+ "GL_MINMAX_SINK_EXT\0"
3037+ "GL_MIN_EXT\0"
3038+ "GL_MIRRORED_REPEAT\0"
3039+ "GL_MIRRORED_REPEAT_ARB\0"
3040+ "GL_MIRRORED_REPEAT_IBM\0"
3041+ "GL_MIRROR_CLAMP_ATI\0"
3042+ "GL_MIRROR_CLAMP_EXT\0"
3043+ "GL_MIRROR_CLAMP_TO_BORDER_EXT\0"
3044+ "GL_MIRROR_CLAMP_TO_EDGE_ATI\0"
3045+ "GL_MIRROR_CLAMP_TO_EDGE_EXT\0"
3046+ "GL_MODELVIEW\0"
3047+ "GL_MODELVIEW0_ARB\0"
3048+ "GL_MODELVIEW10_ARB\0"
3049+ "GL_MODELVIEW11_ARB\0"
3050+ "GL_MODELVIEW12_ARB\0"
3051+ "GL_MODELVIEW13_ARB\0"
3052+ "GL_MODELVIEW14_ARB\0"
3053+ "GL_MODELVIEW15_ARB\0"
3054+ "GL_MODELVIEW16_ARB\0"
3055+ "GL_MODELVIEW17_ARB\0"
3056+ "GL_MODELVIEW18_ARB\0"
3057+ "GL_MODELVIEW19_ARB\0"
3058+ "GL_MODELVIEW1_ARB\0"
3059+ "GL_MODELVIEW20_ARB\0"
3060+ "GL_MODELVIEW21_ARB\0"
3061+ "GL_MODELVIEW22_ARB\0"
3062+ "GL_MODELVIEW23_ARB\0"
3063+ "GL_MODELVIEW24_ARB\0"
3064+ "GL_MODELVIEW25_ARB\0"
3065+ "GL_MODELVIEW26_ARB\0"
3066+ "GL_MODELVIEW27_ARB\0"
3067+ "GL_MODELVIEW28_ARB\0"
3068+ "GL_MODELVIEW29_ARB\0"
3069+ "GL_MODELVIEW2_ARB\0"
3070+ "GL_MODELVIEW30_ARB\0"
3071+ "GL_MODELVIEW31_ARB\0"
3072+ "GL_MODELVIEW3_ARB\0"
3073+ "GL_MODELVIEW4_ARB\0"
3074+ "GL_MODELVIEW5_ARB\0"
3075+ "GL_MODELVIEW6_ARB\0"
3076+ "GL_MODELVIEW7_ARB\0"
3077+ "GL_MODELVIEW8_ARB\0"
3078+ "GL_MODELVIEW9_ARB\0"
3079+ "GL_MODELVIEW_MATRIX\0"
3080+ "GL_MODELVIEW_PROJECTION_NV\0"
3081+ "GL_MODELVIEW_STACK_DEPTH\0"
3082+ "GL_MODULATE\0"
3083+ "GL_MODULATE_ADD_ATI\0"
3084+ "GL_MODULATE_SIGNED_ADD_ATI\0"
3085+ "GL_MODULATE_SUBTRACT_ATI\0"
3086+ "GL_MULT\0"
3087+ "GL_MULTISAMPLE\0"
3088+ "GL_MULTISAMPLE_3DFX\0"
3089+ "GL_MULTISAMPLE_ARB\0"
3090+ "GL_MULTISAMPLE_BIT\0"
3091+ "GL_MULTISAMPLE_BIT_3DFX\0"
3092+ "GL_MULTISAMPLE_BIT_ARB\0"
3093+ "GL_MULTISAMPLE_FILTER_HINT_NV\0"
3094+ "GL_N3F_V3F\0"
3095+ "GL_NAME_STACK_DEPTH\0"
3096+ "GL_NAND\0"
3097+ "GL_NEAREST\0"
3098+ "GL_NEAREST_CLIPMAP_LINEAR_SGIX\0"
3099+ "GL_NEAREST_CLIPMAP_NEAREST_SGIX\0"
3100+ "GL_NEAREST_MIPMAP_LINEAR\0"
3101+ "GL_NEAREST_MIPMAP_NEAREST\0"
3102+ "GL_NEVER\0"
3103+ "GL_NICEST\0"
3104+ "GL_NONE\0"
3105+ "GL_NOOP\0"
3106+ "GL_NOR\0"
3107+ "GL_NORMALIZE\0"
3108+ "GL_NORMAL_ARRAY\0"
3109+ "GL_NORMAL_ARRAY_BUFFER_BINDING\0"
3110+ "GL_NORMAL_ARRAY_BUFFER_BINDING_ARB\0"
3111+ "GL_NORMAL_ARRAY_POINTER\0"
3112+ "GL_NORMAL_ARRAY_STRIDE\0"
3113+ "GL_NORMAL_ARRAY_TYPE\0"
3114+ "GL_NORMAL_MAP\0"
3115+ "GL_NORMAL_MAP_ARB\0"
3116+ "GL_NORMAL_MAP_NV\0"
3117+ "GL_NOTEQUAL\0"
3118+ "GL_NO_ERROR\0"
3119+ "GL_NUM_COMPRESSED_TEXTURE_FORMATS\0"
3120+ "GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB\0"
3121+ "GL_OBJECT_ACTIVE_ATTRIBUTES_ARB\0"
3122+ "GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB\0"
3123+ "GL_OBJECT_ACTIVE_UNIFORMS_ARB\0"
3124+ "GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB\0"
3125+ "GL_OBJECT_ATTACHED_OBJECTS_ARB\0"
3126+ "GL_OBJECT_COMPILE_STATUS_ARB\0"
3127+ "GL_OBJECT_DELETE_STATUS_ARB\0"
3128+ "GL_OBJECT_INFO_LOG_LENGTH_ARB\0"
3129+ "GL_OBJECT_LINEAR\0"
3130+ "GL_OBJECT_LINK_STATUS_ARB\0"
3131+ "GL_OBJECT_PLANE\0"
3132+ "GL_OBJECT_SHADER_SOURCE_LENGTH_ARB\0"
3133+ "GL_OBJECT_SUBTYPE_ARB\0"
3134+ "GL_OBJECT_TYPE_ARB\0"
3135+ "GL_OBJECT_VALIDATE_STATUS_ARB\0"
3136+ "GL_OCCLUSION_TEST_HP\0"
3137+ "GL_OCCLUSION_TEST_RESULT_HP\0"
3138+ "GL_ONE\0"
3139+ "GL_ONE_MINUS_CONSTANT_ALPHA\0"
3140+ "GL_ONE_MINUS_CONSTANT_ALPHA_EXT\0"
3141+ "GL_ONE_MINUS_CONSTANT_COLOR\0"
3142+ "GL_ONE_MINUS_CONSTANT_COLOR_EXT\0"
3143+ "GL_ONE_MINUS_DST_ALPHA\0"
3144+ "GL_ONE_MINUS_DST_COLOR\0"
3145+ "GL_ONE_MINUS_SRC_ALPHA\0"
3146+ "GL_ONE_MINUS_SRC_COLOR\0"
3147+ "GL_OPERAND0_ALPHA\0"
3148+ "GL_OPERAND0_ALPHA_ARB\0"
3149+ "GL_OPERAND0_ALPHA_EXT\0"
3150+ "GL_OPERAND0_RGB\0"
3151+ "GL_OPERAND0_RGB_ARB\0"
3152+ "GL_OPERAND0_RGB_EXT\0"
3153+ "GL_OPERAND1_ALPHA\0"
3154+ "GL_OPERAND1_ALPHA_ARB\0"
3155+ "GL_OPERAND1_ALPHA_EXT\0"
3156+ "GL_OPERAND1_RGB\0"
3157+ "GL_OPERAND1_RGB_ARB\0"
3158+ "GL_OPERAND1_RGB_EXT\0"
3159+ "GL_OPERAND2_ALPHA\0"
3160+ "GL_OPERAND2_ALPHA_ARB\0"
3161+ "GL_OPERAND2_ALPHA_EXT\0"
3162+ "GL_OPERAND2_RGB\0"
3163+ "GL_OPERAND2_RGB_ARB\0"
3164+ "GL_OPERAND2_RGB_EXT\0"
3165+ "GL_OPERAND3_ALPHA_NV\0"
3166+ "GL_OPERAND3_RGB_NV\0"
3167+ "GL_OR\0"
3168+ "GL_ORDER\0"
3169+ "GL_OR_INVERTED\0"
3170+ "GL_OR_REVERSE\0"
3171+ "GL_OUT_OF_MEMORY\0"
3172+ "GL_PACK_ALIGNMENT\0"
3173+ "GL_PACK_IMAGE_HEIGHT\0"
3174+ "GL_PACK_INVERT_MESA\0"
3175+ "GL_PACK_LSB_FIRST\0"
3176+ "GL_PACK_ROW_LENGTH\0"
3177+ "GL_PACK_SKIP_IMAGES\0"
3178+ "GL_PACK_SKIP_PIXELS\0"
3179+ "GL_PACK_SKIP_ROWS\0"
3180+ "GL_PACK_SWAP_BYTES\0"
3181+ "GL_PALETTE4_R5_G6_B5_OES\0"
3182+ "GL_PALETTE4_RGB5_A1_OES\0"
3183+ "GL_PALETTE4_RGB8_OES\0"
3184+ "GL_PALETTE4_RGBA4_OES\0"
3185+ "GL_PALETTE4_RGBA8_OES\0"
3186+ "GL_PALETTE8_R5_G6_B5_OES\0"
3187+ "GL_PALETTE8_RGB5_A1_OES\0"
3188+ "GL_PALETTE8_RGB8_OES\0"
3189+ "GL_PALETTE8_RGBA4_OES\0"
3190+ "GL_PALETTE8_RGBA8_OES\0"
3191+ "GL_PASS_THROUGH_TOKEN\0"
3192+ "GL_PERSPECTIVE_CORRECTION_HINT\0"
3193+ "GL_PIXEL_MAP_A_TO_A\0"
3194+ "GL_PIXEL_MAP_A_TO_A_SIZE\0"
3195+ "GL_PIXEL_MAP_B_TO_B\0"
3196+ "GL_PIXEL_MAP_B_TO_B_SIZE\0"
3197+ "GL_PIXEL_MAP_G_TO_G\0"
3198+ "GL_PIXEL_MAP_G_TO_G_SIZE\0"
3199+ "GL_PIXEL_MAP_I_TO_A\0"
3200+ "GL_PIXEL_MAP_I_TO_A_SIZE\0"
3201+ "GL_PIXEL_MAP_I_TO_B\0"
3202+ "GL_PIXEL_MAP_I_TO_B_SIZE\0"
3203+ "GL_PIXEL_MAP_I_TO_G\0"
3204+ "GL_PIXEL_MAP_I_TO_G_SIZE\0"
3205+ "GL_PIXEL_MAP_I_TO_I\0"
3206+ "GL_PIXEL_MAP_I_TO_I_SIZE\0"
3207+ "GL_PIXEL_MAP_I_TO_R\0"
3208+ "GL_PIXEL_MAP_I_TO_R_SIZE\0"
3209+ "GL_PIXEL_MAP_R_TO_R\0"
3210+ "GL_PIXEL_MAP_R_TO_R_SIZE\0"
3211+ "GL_PIXEL_MAP_S_TO_S\0"
3212+ "GL_PIXEL_MAP_S_TO_S_SIZE\0"
3213+ "GL_PIXEL_MODE_BIT\0"
3214+ "GL_PIXEL_PACK_BUFFER_BINDING_EXT\0"
3215+ "GL_PIXEL_PACK_BUFFER_EXT\0"
3216+ "GL_PIXEL_UNPACK_BUFFER_BINDING_EXT\0"
3217+ "GL_PIXEL_UNPACK_BUFFER_EXT\0"
3218+ "GL_POINT\0"
3219+ "GL_POINTS\0"
3220+ "GL_POINT_BIT\0"
3221+ "GL_POINT_DISTANCE_ATTENUATION\0"
3222+ "GL_POINT_DISTANCE_ATTENUATION_ARB\0"
3223+ "GL_POINT_DISTANCE_ATTENUATION_EXT\0"
3224+ "GL_POINT_DISTANCE_ATTENUATION_SGIS\0"
3225+ "GL_POINT_FADE_THRESHOLD_SIZE\0"
3226+ "GL_POINT_FADE_THRESHOLD_SIZE_ARB\0"
3227+ "GL_POINT_FADE_THRESHOLD_SIZE_EXT\0"
3228+ "GL_POINT_FADE_THRESHOLD_SIZE_SGIS\0"
3229+ "GL_POINT_SIZE\0"
3230+ "GL_POINT_SIZE_GRANULARITY\0"
3231+ "GL_POINT_SIZE_MAX\0"
3232+ "GL_POINT_SIZE_MAX_ARB\0"
3233+ "GL_POINT_SIZE_MAX_EXT\0"
3234+ "GL_POINT_SIZE_MAX_SGIS\0"
3235+ "GL_POINT_SIZE_MIN\0"
3236+ "GL_POINT_SIZE_MIN_ARB\0"
3237+ "GL_POINT_SIZE_MIN_EXT\0"
3238+ "GL_POINT_SIZE_MIN_SGIS\0"
3239+ "GL_POINT_SIZE_RANGE\0"
3240+ "GL_POINT_SMOOTH\0"
3241+ "GL_POINT_SMOOTH_HINT\0"
3242+ "GL_POINT_SPRITE\0"
3243+ "GL_POINT_SPRITE_ARB\0"
3244+ "GL_POINT_SPRITE_COORD_ORIGIN\0"
3245+ "GL_POINT_SPRITE_NV\0"
3246+ "GL_POINT_SPRITE_R_MODE_NV\0"
3247+ "GL_POINT_TOKEN\0"
3248+ "GL_POLYGON\0"
3249+ "GL_POLYGON_BIT\0"
3250+ "GL_POLYGON_MODE\0"
3251+ "GL_POLYGON_OFFSET_BIAS\0"
3252+ "GL_POLYGON_OFFSET_FACTOR\0"
3253+ "GL_POLYGON_OFFSET_FILL\0"
3254+ "GL_POLYGON_OFFSET_LINE\0"
3255+ "GL_POLYGON_OFFSET_POINT\0"
3256+ "GL_POLYGON_OFFSET_UNITS\0"
3257+ "GL_POLYGON_SMOOTH\0"
3258+ "GL_POLYGON_SMOOTH_HINT\0"
3259+ "GL_POLYGON_STIPPLE\0"
3260+ "GL_POLYGON_STIPPLE_BIT\0"
3261+ "GL_POLYGON_TOKEN\0"
3262+ "GL_POSITION\0"
3263+ "GL_POST_COLOR_MATRIX_ALPHA_BIAS\0"
3264+ "GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI\0"
3265+ "GL_POST_COLOR_MATRIX_ALPHA_SCALE\0"
3266+ "GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI\0"
3267+ "GL_POST_COLOR_MATRIX_BLUE_BIAS\0"
3268+ "GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI\0"
3269+ "GL_POST_COLOR_MATRIX_BLUE_SCALE\0"
3270+ "GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI\0"
3271+ "GL_POST_COLOR_MATRIX_COLOR_TABLE\0"
3272+ "GL_POST_COLOR_MATRIX_GREEN_BIAS\0"
3273+ "GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI\0"
3274+ "GL_POST_COLOR_MATRIX_GREEN_SCALE\0"
3275+ "GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI\0"
3276+ "GL_POST_COLOR_MATRIX_RED_BIAS\0"
3277+ "GL_POST_COLOR_MATRIX_RED_BIAS_SGI\0"
3278+ "GL_POST_COLOR_MATRIX_RED_SCALE\0"
3279+ "GL_POST_COLOR_MATRIX_RED_SCALE_SGI\0"
3280+ "GL_POST_CONVOLUTION_ALPHA_BIAS\0"
3281+ "GL_POST_CONVOLUTION_ALPHA_BIAS_EXT\0"
3282+ "GL_POST_CONVOLUTION_ALPHA_SCALE\0"
3283+ "GL_POST_CONVOLUTION_ALPHA_SCALE_EXT\0"
3284+ "GL_POST_CONVOLUTION_BLUE_BIAS\0"
3285+ "GL_POST_CONVOLUTION_BLUE_BIAS_EXT\0"
3286+ "GL_POST_CONVOLUTION_BLUE_SCALE\0"
3287+ "GL_POST_CONVOLUTION_BLUE_SCALE_EXT\0"
3288+ "GL_POST_CONVOLUTION_COLOR_TABLE\0"
3289+ "GL_POST_CONVOLUTION_GREEN_BIAS\0"
3290+ "GL_POST_CONVOLUTION_GREEN_BIAS_EXT\0"
3291+ "GL_POST_CONVOLUTION_GREEN_SCALE\0"
3292+ "GL_POST_CONVOLUTION_GREEN_SCALE_EXT\0"
3293+ "GL_POST_CONVOLUTION_RED_BIAS\0"
3294+ "GL_POST_CONVOLUTION_RED_BIAS_EXT\0"
3295+ "GL_POST_CONVOLUTION_RED_SCALE\0"
3296+ "GL_POST_CONVOLUTION_RED_SCALE_EXT\0"
3297+ "GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX\0"
3298+ "GL_POST_TEXTURE_FILTER_BIAS_SGIX\0"
3299+ "GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX\0"
3300+ "GL_POST_TEXTURE_FILTER_SCALE_SGIX\0"
3301+ "GL_PREVIOUS\0"
3302+ "GL_PREVIOUS_ARB\0"
3303+ "GL_PREVIOUS_EXT\0"
3304+ "GL_PRIMARY_COLOR\0"
3305+ "GL_PRIMARY_COLOR_ARB\0"
3306+ "GL_PRIMARY_COLOR_EXT\0"
3307+ "GL_PROGRAM_ADDRESS_REGISTERS_ARB\0"
3308+ "GL_PROGRAM_ALU_INSTRUCTIONS_ARB\0"
3309+ "GL_PROGRAM_ATTRIBS_ARB\0"
3310+ "GL_PROGRAM_BINDING_ARB\0"
3311+ "GL_PROGRAM_ERROR_POSITION_ARB\0"
3312+ "GL_PROGRAM_ERROR_POSITION_NV\0"
3313+ "GL_PROGRAM_ERROR_STRING_ARB\0"
3314+ "GL_PROGRAM_FORMAT_ARB\0"
3315+ "GL_PROGRAM_FORMAT_ASCII_ARB\0"
3316+ "GL_PROGRAM_INSTRUCTIONS_ARB\0"
3317+ "GL_PROGRAM_LENGTH_ARB\0"
3318+ "GL_PROGRAM_LENGTH_NV\0"
3319+ "GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB\0"
3320+ "GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB\0"
3321+ "GL_PROGRAM_NATIVE_ATTRIBS_ARB\0"
3322+ "GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB\0"
3323+ "GL_PROGRAM_NATIVE_PARAMETERS_ARB\0"
3324+ "GL_PROGRAM_NATIVE_TEMPORARIES_ARB\0"
3325+ "GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB\0"
3326+ "GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB\0"
3327+ "GL_PROGRAM_OBJECT_ARB\0"
3328+ "GL_PROGRAM_PARAMETERS_ARB\0"
3329+ "GL_PROGRAM_PARAMETER_NV\0"
3330+ "GL_PROGRAM_RESIDENT_NV\0"
3331+ "GL_PROGRAM_STRING_ARB\0"
3332+ "GL_PROGRAM_STRING_NV\0"
3333+ "GL_PROGRAM_TARGET_NV\0"
3334+ "GL_PROGRAM_TEMPORARIES_ARB\0"
3335+ "GL_PROGRAM_TEX_INDIRECTIONS_ARB\0"
3336+ "GL_PROGRAM_TEX_INSTRUCTIONS_ARB\0"
3337+ "GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB\0"
3338+ "GL_PROJECTION\0"
3339+ "GL_PROJECTION_MATRIX\0"
3340+ "GL_PROJECTION_STACK_DEPTH\0"
3341+ "GL_PROXY_COLOR_TABLE\0"
3342+ "GL_PROXY_HISTOGRAM\0"
3343+ "GL_PROXY_HISTOGRAM_EXT\0"
3344+ "GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE\0"
3345+ "GL_PROXY_POST_CONVOLUTION_COLOR_TABLE\0"
3346+ "GL_PROXY_TEXTURE_1D\0"
3347+ "GL_PROXY_TEXTURE_1D_ARRAY_EXT\0"
3348+ "GL_PROXY_TEXTURE_1D_EXT\0"
3349+ "GL_PROXY_TEXTURE_2D\0"
3350+ "GL_PROXY_TEXTURE_2D_ARRAY_EXT\0"
3351+ "GL_PROXY_TEXTURE_2D_EXT\0"
3352+ "GL_PROXY_TEXTURE_3D\0"
3353+ "GL_PROXY_TEXTURE_COLOR_TABLE_SGI\0"
3354+ "GL_PROXY_TEXTURE_CUBE_MAP\0"
3355+ "GL_PROXY_TEXTURE_CUBE_MAP_ARB\0"
3356+ "GL_PROXY_TEXTURE_RECTANGLE_ARB\0"
3357+ "GL_PROXY_TEXTURE_RECTANGLE_NV\0"
3358+ "GL_Q\0"
3359+ "GL_QUADRATIC_ATTENUATION\0"
3360+ "GL_QUADS\0"
3361+ "GL_QUAD_MESH_SUN\0"
3362+ "GL_QUAD_STRIP\0"
3363+ "GL_QUERY_COUNTER_BITS\0"
3364+ "GL_QUERY_COUNTER_BITS_ARB\0"
3365+ "GL_QUERY_RESULT\0"
3366+ "GL_QUERY_RESULT_ARB\0"
3367+ "GL_QUERY_RESULT_AVAILABLE\0"
3368+ "GL_QUERY_RESULT_AVAILABLE_ARB\0"
3369+ "GL_R\0"
3370+ "GL_R3_G3_B2\0"
3371+ "GL_RASTER_POSITION_UNCLIPPED_IBM\0"
3372+ "GL_READ_BUFFER\0"
3373+ "GL_READ_FRAMEBUFFER_BINDING_EXT\0"
3374+ "GL_READ_FRAMEBUFFER_EXT\0"
3375+ "GL_READ_ONLY\0"
3376+ "GL_READ_ONLY_ARB\0"
3377+ "GL_READ_WRITE\0"
3378+ "GL_READ_WRITE_ARB\0"
3379+ "GL_RED\0"
3380+ "GL_REDUCE\0"
3381+ "GL_REDUCE_EXT\0"
3382+ "GL_RED_BIAS\0"
3383+ "GL_RED_BITS\0"
3384+ "GL_RED_SCALE\0"
3385+ "GL_REFLECTION_MAP\0"
3386+ "GL_REFLECTION_MAP_ARB\0"
3387+ "GL_REFLECTION_MAP_NV\0"
3388+ "GL_RENDER\0"
3389+ "GL_RENDERBUFFER_BINDING_EXT\0"
3390+ "GL_RENDERBUFFER_EXT\0"
3391+ "GL_RENDERBUFFER_HEIGHT_EXT\0"
3392+ "GL_RENDERBUFFER_INTERNAL_FORMAT_EXT\0"
3393+ "GL_RENDERBUFFER_WIDTH_EXT\0"
3394+ "GL_RENDERER\0"
3395+ "GL_RENDER_MODE\0"
3396+ "GL_REPEAT\0"
3397+ "GL_REPLACE\0"
3398+ "GL_REPLACE_EXT\0"
3399+ "GL_REPLICATE_BORDER_HP\0"
3400+ "GL_RESCALE_NORMAL\0"
3401+ "GL_RESCALE_NORMAL_EXT\0"
3402+ "GL_RETURN\0"
3403+ "GL_RGB\0"
3404+ "GL_RGB10\0"
3405+ "GL_RGB10_A2\0"
3406+ "GL_RGB10_A2_EXT\0"
3407+ "GL_RGB10_EXT\0"
3408+ "GL_RGB12\0"
3409+ "GL_RGB12_EXT\0"
3410+ "GL_RGB16\0"
3411+ "GL_RGB16_EXT\0"
3412+ "GL_RGB2_EXT\0"
3413+ "GL_RGB4\0"
3414+ "GL_RGB4_EXT\0"
3415+ "GL_RGB4_S3TC\0"
3416+ "GL_RGB5\0"
3417+ "GL_RGB5_A1\0"
3418+ "GL_RGB5_A1_EXT\0"
3419+ "GL_RGB5_EXT\0"
3420+ "GL_RGB8\0"
3421+ "GL_RGB8_EXT\0"
3422+ "GL_RGBA\0"
3423+ "GL_RGBA12\0"
3424+ "GL_RGBA12_EXT\0"
3425+ "GL_RGBA16\0"
3426+ "GL_RGBA16_EXT\0"
3427+ "GL_RGBA2\0"
3428+ "GL_RGBA2_EXT\0"
3429+ "GL_RGBA4\0"
3430+ "GL_RGBA4_DXT5_S3TC\0"
3431+ "GL_RGBA4_EXT\0"
3432+ "GL_RGBA4_S3TC\0"
3433+ "GL_RGBA8\0"
3434+ "GL_RGBA8_EXT\0"
3435+ "GL_RGBA_DXT5_S3TC\0"
3436+ "GL_RGBA_MODE\0"
3437+ "GL_RGBA_S3TC\0"
3438+ "GL_RGB_S3TC\0"
3439+ "GL_RGB_SCALE\0"
3440+ "GL_RGB_SCALE_ARB\0"
3441+ "GL_RGB_SCALE_EXT\0"
3442+ "GL_RIGHT\0"
3443+ "GL_S\0"
3444+ "GL_SAMPLER_1D\0"
3445+ "GL_SAMPLER_1D_SHADOW\0"
3446+ "GL_SAMPLER_2D\0"
3447+ "GL_SAMPLER_2D_SHADOW\0"
3448+ "GL_SAMPLER_3D\0"
3449+ "GL_SAMPLER_CUBE\0"
3450+ "GL_SAMPLES\0"
3451+ "GL_SAMPLES_3DFX\0"
3452+ "GL_SAMPLES_ARB\0"
3453+ "GL_SAMPLES_PASSED\0"
3454+ "GL_SAMPLES_PASSED_ARB\0"
3455+ "GL_SAMPLE_ALPHA_TO_COVERAGE\0"
3456+ "GL_SAMPLE_ALPHA_TO_COVERAGE_ARB\0"
3457+ "GL_SAMPLE_ALPHA_TO_ONE\0"
3458+ "GL_SAMPLE_ALPHA_TO_ONE_ARB\0"
3459+ "GL_SAMPLE_BUFFERS\0"
3460+ "GL_SAMPLE_BUFFERS_3DFX\0"
3461+ "GL_SAMPLE_BUFFERS_ARB\0"
3462+ "GL_SAMPLE_COVERAGE\0"
3463+ "GL_SAMPLE_COVERAGE_ARB\0"
3464+ "GL_SAMPLE_COVERAGE_INVERT\0"
3465+ "GL_SAMPLE_COVERAGE_INVERT_ARB\0"
3466+ "GL_SAMPLE_COVERAGE_VALUE\0"
3467+ "GL_SAMPLE_COVERAGE_VALUE_ARB\0"
3468+ "GL_SCISSOR_BIT\0"
3469+ "GL_SCISSOR_BOX\0"
3470+ "GL_SCISSOR_TEST\0"
3471+ "GL_SECONDARY_COLOR_ARRAY\0"
3472+ "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING\0"
3473+ "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB\0"
3474+ "GL_SECONDARY_COLOR_ARRAY_POINTER\0"
3475+ "GL_SECONDARY_COLOR_ARRAY_SIZE\0"
3476+ "GL_SECONDARY_COLOR_ARRAY_STRIDE\0"
3477+ "GL_SECONDARY_COLOR_ARRAY_TYPE\0"
3478+ "GL_SELECT\0"
3479+ "GL_SELECTION_BUFFER_POINTER\0"
3480+ "GL_SELECTION_BUFFER_SIZE\0"
3481+ "GL_SEPARABLE_2D\0"
3482+ "GL_SEPARATE_SPECULAR_COLOR\0"
3483+ "GL_SEPARATE_SPECULAR_COLOR_EXT\0"
3484+ "GL_SET\0"
3485+ "GL_SHADER_OBJECT_ARB\0"
3486+ "GL_SHADER_SOURCE_LENGTH\0"
3487+ "GL_SHADER_TYPE\0"
3488+ "GL_SHADE_MODEL\0"
3489+ "GL_SHADING_LANGUAGE_VERSION\0"
3490+ "GL_SHADOW_AMBIENT_SGIX\0"
3491+ "GL_SHARED_TEXTURE_PALETTE_EXT\0"
3492+ "GL_SHININESS\0"
3493+ "GL_SHORT\0"
3494+ "GL_SINGLE_COLOR\0"
3495+ "GL_SINGLE_COLOR_EXT\0"
3496+ "GL_SLICE_ACCUM_SUN\0"
3497+ "GL_SMOOTH\0"
3498+ "GL_SMOOTH_LINE_WIDTH_GRANULARITY\0"
3499+ "GL_SMOOTH_LINE_WIDTH_RANGE\0"
3500+ "GL_SMOOTH_POINT_SIZE_GRANULARITY\0"
3501+ "GL_SMOOTH_POINT_SIZE_RANGE\0"
3502+ "GL_SOURCE0_ALPHA\0"
3503+ "GL_SOURCE0_ALPHA_ARB\0"
3504+ "GL_SOURCE0_ALPHA_EXT\0"
3505+ "GL_SOURCE0_RGB\0"
3506+ "GL_SOURCE0_RGB_ARB\0"
3507+ "GL_SOURCE0_RGB_EXT\0"
3508+ "GL_SOURCE1_ALPHA\0"
3509+ "GL_SOURCE1_ALPHA_ARB\0"
3510+ "GL_SOURCE1_ALPHA_EXT\0"
3511+ "GL_SOURCE1_RGB\0"
3512+ "GL_SOURCE1_RGB_ARB\0"
3513+ "GL_SOURCE1_RGB_EXT\0"
3514+ "GL_SOURCE2_ALPHA\0"
3515+ "GL_SOURCE2_ALPHA_ARB\0"
3516+ "GL_SOURCE2_ALPHA_EXT\0"
3517+ "GL_SOURCE2_RGB\0"
3518+ "GL_SOURCE2_RGB_ARB\0"
3519+ "GL_SOURCE2_RGB_EXT\0"
3520+ "GL_SOURCE3_ALPHA_NV\0"
3521+ "GL_SOURCE3_RGB_NV\0"
3522+ "GL_SPECULAR\0"
3523+ "GL_SPHERE_MAP\0"
3524+ "GL_SPOT_CUTOFF\0"
3525+ "GL_SPOT_DIRECTION\0"
3526+ "GL_SPOT_EXPONENT\0"
3527+ "GL_SRC0_ALPHA\0"
3528+ "GL_SRC0_RGB\0"
3529+ "GL_SRC1_ALPHA\0"
3530+ "GL_SRC1_RGB\0"
3531+ "GL_SRC2_ALPHA\0"
3532+ "GL_SRC2_RGB\0"
3533+ "GL_SRC_ALPHA\0"
3534+ "GL_SRC_ALPHA_SATURATE\0"
3535+ "GL_SRC_COLOR\0"
3536+ "GL_STACK_OVERFLOW\0"
3537+ "GL_STACK_UNDERFLOW\0"
3538+ "GL_STATIC_COPY\0"
3539+ "GL_STATIC_COPY_ARB\0"
3540+ "GL_STATIC_DRAW\0"
3541+ "GL_STATIC_DRAW_ARB\0"
3542+ "GL_STATIC_READ\0"
3543+ "GL_STATIC_READ_ARB\0"
3544+ "GL_STENCIL\0"
3545+ "GL_STENCIL_ATTACHMENT_EXT\0"
3546+ "GL_STENCIL_BACK_FAIL\0"
3547+ "GL_STENCIL_BACK_FUNC\0"
3548+ "GL_STENCIL_BACK_PASS_DEPTH_FAIL\0"
3549+ "GL_STENCIL_BACK_PASS_DEPTH_PASS\0"
3550+ "GL_STENCIL_BACK_REF\0"
3551+ "GL_STENCIL_BACK_VALUE_MASK\0"
3552+ "GL_STENCIL_BACK_WRITEMASK\0"
3553+ "GL_STENCIL_BITS\0"
3554+ "GL_STENCIL_BUFFER_BIT\0"
3555+ "GL_STENCIL_CLEAR_VALUE\0"
3556+ "GL_STENCIL_FAIL\0"
3557+ "GL_STENCIL_FUNC\0"
3558+ "GL_STENCIL_INDEX\0"
3559+ "GL_STENCIL_INDEX16_EXT\0"
3560+ "GL_STENCIL_INDEX1_EXT\0"
3561+ "GL_STENCIL_INDEX4_EXT\0"
3562+ "GL_STENCIL_INDEX8_EXT\0"
3563+ "GL_STENCIL_INDEX_EXT\0"
3564+ "GL_STENCIL_PASS_DEPTH_FAIL\0"
3565+ "GL_STENCIL_PASS_DEPTH_PASS\0"
3566+ "GL_STENCIL_REF\0"
3567+ "GL_STENCIL_TEST\0"
3568+ "GL_STENCIL_TEST_TWO_SIDE_EXT\0"
3569+ "GL_STENCIL_VALUE_MASK\0"
3570+ "GL_STENCIL_WRITEMASK\0"
3571+ "GL_STEREO\0"
3572+ "GL_STREAM_COPY\0"
3573+ "GL_STREAM_COPY_ARB\0"
3574+ "GL_STREAM_DRAW\0"
3575+ "GL_STREAM_DRAW_ARB\0"
3576+ "GL_STREAM_READ\0"
3577+ "GL_STREAM_READ_ARB\0"
3578+ "GL_SUBPIXEL_BITS\0"
3579+ "GL_SUBTRACT\0"
3580+ "GL_SUBTRACT_ARB\0"
3581+ "GL_T\0"
3582+ "GL_T2F_C3F_V3F\0"
3583+ "GL_T2F_C4F_N3F_V3F\0"
3584+ "GL_T2F_C4UB_V3F\0"
3585+ "GL_T2F_N3F_V3F\0"
3586+ "GL_T2F_V3F\0"
3587+ "GL_T4F_C4F_N3F_V4F\0"
3588+ "GL_T4F_V4F\0"
3589+ "GL_TABLE_TOO_LARGE_EXT\0"
3590+ "GL_TEXTURE\0"
3591+ "GL_TEXTURE0\0"
3592+ "GL_TEXTURE0_ARB\0"
3593+ "GL_TEXTURE1\0"
3594+ "GL_TEXTURE10\0"
3595+ "GL_TEXTURE10_ARB\0"
3596+ "GL_TEXTURE11\0"
3597+ "GL_TEXTURE11_ARB\0"
3598+ "GL_TEXTURE12\0"
3599+ "GL_TEXTURE12_ARB\0"
3600+ "GL_TEXTURE13\0"
3601+ "GL_TEXTURE13_ARB\0"
3602+ "GL_TEXTURE14\0"
3603+ "GL_TEXTURE14_ARB\0"
3604+ "GL_TEXTURE15\0"
3605+ "GL_TEXTURE15_ARB\0"
3606+ "GL_TEXTURE16\0"
3607+ "GL_TEXTURE16_ARB\0"
3608+ "GL_TEXTURE17\0"
3609+ "GL_TEXTURE17_ARB\0"
3610+ "GL_TEXTURE18\0"
3611+ "GL_TEXTURE18_ARB\0"
3612+ "GL_TEXTURE19\0"
3613+ "GL_TEXTURE19_ARB\0"
3614+ "GL_TEXTURE1_ARB\0"
3615+ "GL_TEXTURE2\0"
3616+ "GL_TEXTURE20\0"
3617+ "GL_TEXTURE20_ARB\0"
3618+ "GL_TEXTURE21\0"
3619+ "GL_TEXTURE21_ARB\0"
3620+ "GL_TEXTURE22\0"
3621+ "GL_TEXTURE22_ARB\0"
3622+ "GL_TEXTURE23\0"
3623+ "GL_TEXTURE23_ARB\0"
3624+ "GL_TEXTURE24\0"
3625+ "GL_TEXTURE24_ARB\0"
3626+ "GL_TEXTURE25\0"
3627+ "GL_TEXTURE25_ARB\0"
3628+ "GL_TEXTURE26\0"
3629+ "GL_TEXTURE26_ARB\0"
3630+ "GL_TEXTURE27\0"
3631+ "GL_TEXTURE27_ARB\0"
3632+ "GL_TEXTURE28\0"
3633+ "GL_TEXTURE28_ARB\0"
3634+ "GL_TEXTURE29\0"
3635+ "GL_TEXTURE29_ARB\0"
3636+ "GL_TEXTURE2_ARB\0"
3637+ "GL_TEXTURE3\0"
3638+ "GL_TEXTURE30\0"
3639+ "GL_TEXTURE30_ARB\0"
3640+ "GL_TEXTURE31\0"
3641+ "GL_TEXTURE31_ARB\0"
3642+ "GL_TEXTURE3_ARB\0"
3643+ "GL_TEXTURE4\0"
3644+ "GL_TEXTURE4_ARB\0"
3645+ "GL_TEXTURE5\0"
3646+ "GL_TEXTURE5_ARB\0"
3647+ "GL_TEXTURE6\0"
3648+ "GL_TEXTURE6_ARB\0"
3649+ "GL_TEXTURE7\0"
3650+ "GL_TEXTURE7_ARB\0"
3651+ "GL_TEXTURE8\0"
3652+ "GL_TEXTURE8_ARB\0"
3653+ "GL_TEXTURE9\0"
3654+ "GL_TEXTURE9_ARB\0"
3655+ "GL_TEXTURE_1D\0"
3656+ "GL_TEXTURE_1D_ARRAY_EXT\0"
3657+ "GL_TEXTURE_2D\0"
3658+ "GL_TEXTURE_2D_ARRAY_EXT\0"
3659+ "GL_TEXTURE_3D\0"
3660+ "GL_TEXTURE_ALPHA_SIZE\0"
3661+ "GL_TEXTURE_ALPHA_SIZE_EXT\0"
3662+ "GL_TEXTURE_BASE_LEVEL\0"
3663+ "GL_TEXTURE_BINDING_1D\0"
3664+ "GL_TEXTURE_BINDING_1D_ARRAY_EXT\0"
3665+ "GL_TEXTURE_BINDING_2D\0"
3666+ "GL_TEXTURE_BINDING_2D_ARRAY_EXT\0"
3667+ "GL_TEXTURE_BINDING_3D\0"
3668+ "GL_TEXTURE_BINDING_CUBE_MAP\0"
3669+ "GL_TEXTURE_BINDING_CUBE_MAP_ARB\0"
3670+ "GL_TEXTURE_BINDING_RECTANGLE_ARB\0"
3671+ "GL_TEXTURE_BINDING_RECTANGLE_NV\0"
3672+ "GL_TEXTURE_BIT\0"
3673+ "GL_TEXTURE_BLUE_SIZE\0"
3674+ "GL_TEXTURE_BLUE_SIZE_EXT\0"
3675+ "GL_TEXTURE_BORDER\0"
3676+ "GL_TEXTURE_BORDER_COLOR\0"
3677+ "GL_TEXTURE_CLIPMAP_CENTER_SGIX\0"
3678+ "GL_TEXTURE_CLIPMAP_DEPTH_SGIX\0"
3679+ "GL_TEXTURE_CLIPMAP_FRAME_SGIX\0"
3680+ "GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX\0"
3681+ "GL_TEXTURE_CLIPMAP_OFFSET_SGIX\0"
3682+ "GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX\0"
3683+ "GL_TEXTURE_COLOR_TABLE_SGI\0"
3684+ "GL_TEXTURE_COLOR_WRITEMASK_SGIS\0"
3685+ "GL_TEXTURE_COMPARE_FAIL_VALUE_ARB\0"
3686+ "GL_TEXTURE_COMPARE_FUNC\0"
3687+ "GL_TEXTURE_COMPARE_FUNC_ARB\0"
3688+ "GL_TEXTURE_COMPARE_MODE\0"
3689+ "GL_TEXTURE_COMPARE_MODE_ARB\0"
3690+ "GL_TEXTURE_COMPARE_OPERATOR_SGIX\0"
3691+ "GL_TEXTURE_COMPARE_SGIX\0"
3692+ "GL_TEXTURE_COMPONENTS\0"
3693+ "GL_TEXTURE_COMPRESSED\0"
3694+ "GL_TEXTURE_COMPRESSED_ARB\0"
3695+ "GL_TEXTURE_COMPRESSED_FORMATS_ARB\0"
3696+ "GL_TEXTURE_COMPRESSED_IMAGE_SIZE\0"
3697+ "GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB\0"
3698+ "GL_TEXTURE_COMPRESSION_HINT\0"
3699+ "GL_TEXTURE_COMPRESSION_HINT_ARB\0"
3700+ "GL_TEXTURE_COORD_ARRAY\0"
3701+ "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING\0"
3702+ "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB\0"
3703+ "GL_TEXTURE_COORD_ARRAY_POINTER\0"
3704+ "GL_TEXTURE_COORD_ARRAY_SIZE\0"
3705+ "GL_TEXTURE_COORD_ARRAY_STRIDE\0"
3706+ "GL_TEXTURE_COORD_ARRAY_TYPE\0"
3707+ "GL_TEXTURE_CUBE_MAP\0"
3708+ "GL_TEXTURE_CUBE_MAP_ARB\0"
3709+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_X\0"
3710+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB\0"
3711+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y\0"
3712+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB\0"
3713+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z\0"
3714+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB\0"
3715+ "GL_TEXTURE_CUBE_MAP_POSITIVE_X\0"
3716+ "GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB\0"
3717+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Y\0"
3718+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB\0"
3719+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Z\0"
3720+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB\0"
3721+ "GL_TEXTURE_DEPTH\0"
3722+ "GL_TEXTURE_DEPTH_SIZE\0"
3723+ "GL_TEXTURE_DEPTH_SIZE_ARB\0"
3724+ "GL_TEXTURE_ENV\0"
3725+ "GL_TEXTURE_ENV_COLOR\0"
3726+ "GL_TEXTURE_ENV_MODE\0"
3727+ "GL_TEXTURE_FILTER_CONTROL\0"
3728+ "GL_TEXTURE_GEN_MODE\0"
3729+ "GL_TEXTURE_GEN_Q\0"
3730+ "GL_TEXTURE_GEN_R\0"
3731+ "GL_TEXTURE_GEN_S\0"
3732+ "GL_TEXTURE_GEN_T\0"
3733+ "GL_TEXTURE_GEQUAL_R_SGIX\0"
3734+ "GL_TEXTURE_GREEN_SIZE\0"
3735+ "GL_TEXTURE_GREEN_SIZE_EXT\0"
3736+ "GL_TEXTURE_HEIGHT\0"
3737+ "GL_TEXTURE_INDEX_SIZE_EXT\0"
3738+ "GL_TEXTURE_INTENSITY_SIZE\0"
3739+ "GL_TEXTURE_INTENSITY_SIZE_EXT\0"
3740+ "GL_TEXTURE_INTERNAL_FORMAT\0"
3741+ "GL_TEXTURE_LEQUAL_R_SGIX\0"
3742+ "GL_TEXTURE_LOD_BIAS\0"
3743+ "GL_TEXTURE_LOD_BIAS_EXT\0"
3744+ "GL_TEXTURE_LOD_BIAS_R_SGIX\0"
3745+ "GL_TEXTURE_LOD_BIAS_S_SGIX\0"
3746+ "GL_TEXTURE_LOD_BIAS_T_SGIX\0"
3747+ "GL_TEXTURE_LUMINANCE_SIZE\0"
3748+ "GL_TEXTURE_LUMINANCE_SIZE_EXT\0"
3749+ "GL_TEXTURE_MAG_FILTER\0"
3750+ "GL_TEXTURE_MATRIX\0"
3751+ "GL_TEXTURE_MAX_ANISOTROPY_EXT\0"
3752+ "GL_TEXTURE_MAX_CLAMP_R_SGIX\0"
3753+ "GL_TEXTURE_MAX_CLAMP_S_SGIX\0"
3754+ "GL_TEXTURE_MAX_CLAMP_T_SGIX\0"
3755+ "GL_TEXTURE_MAX_LEVEL\0"
3756+ "GL_TEXTURE_MAX_LOD\0"
3757+ "GL_TEXTURE_MIN_FILTER\0"
3758+ "GL_TEXTURE_MIN_LOD\0"
3759+ "GL_TEXTURE_PRIORITY\0"
3760+ "GL_TEXTURE_RECTANGLE_ARB\0"
3761+ "GL_TEXTURE_RECTANGLE_NV\0"
3762+ "GL_TEXTURE_RED_SIZE\0"
3763+ "GL_TEXTURE_RED_SIZE_EXT\0"
3764+ "GL_TEXTURE_RESIDENT\0"
3765+ "GL_TEXTURE_STACK_DEPTH\0"
3766+ "GL_TEXTURE_TOO_LARGE_EXT\0"
3767+ "GL_TEXTURE_UNSIGNED_REMAP_MODE_NV\0"
3768+ "GL_TEXTURE_WIDTH\0"
3769+ "GL_TEXTURE_WRAP_R\0"
3770+ "GL_TEXTURE_WRAP_S\0"
3771+ "GL_TEXTURE_WRAP_T\0"
3772+ "GL_TIME_ELAPSED_EXT\0"
3773+ "GL_TRACK_MATRIX_NV\0"
3774+ "GL_TRACK_MATRIX_TRANSFORM_NV\0"
3775+ "GL_TRANSFORM_BIT\0"
3776+ "GL_TRANSPOSE_COLOR_MATRIX\0"
3777+ "GL_TRANSPOSE_COLOR_MATRIX_ARB\0"
3778+ "GL_TRANSPOSE_CURRENT_MATRIX_ARB\0"
3779+ "GL_TRANSPOSE_MODELVIEW_MATRIX\0"
3780+ "GL_TRANSPOSE_MODELVIEW_MATRIX_ARB\0"
3781+ "GL_TRANSPOSE_NV\0"
3782+ "GL_TRANSPOSE_PROJECTION_MATRIX\0"
3783+ "GL_TRANSPOSE_PROJECTION_MATRIX_ARB\0"
3784+ "GL_TRANSPOSE_TEXTURE_MATRIX\0"
3785+ "GL_TRANSPOSE_TEXTURE_MATRIX_ARB\0"
3786+ "GL_TRIANGLES\0"
3787+ "GL_TRIANGLE_FAN\0"
3788+ "GL_TRIANGLE_MESH_SUN\0"
3789+ "GL_TRIANGLE_STRIP\0"
3790+ "GL_TRUE\0"
3791+ "GL_UNPACK_ALIGNMENT\0"
3792+ "GL_UNPACK_IMAGE_HEIGHT\0"
3793+ "GL_UNPACK_LSB_FIRST\0"
3794+ "GL_UNPACK_ROW_LENGTH\0"
3795+ "GL_UNPACK_SKIP_IMAGES\0"
3796+ "GL_UNPACK_SKIP_PIXELS\0"
3797+ "GL_UNPACK_SKIP_ROWS\0"
3798+ "GL_UNPACK_SWAP_BYTES\0"
3799+ "GL_UNSIGNED_BYTE\0"
3800+ "GL_UNSIGNED_BYTE_2_3_3_REV\0"
3801+ "GL_UNSIGNED_BYTE_3_3_2\0"
3802+ "GL_UNSIGNED_INT\0"
3803+ "GL_UNSIGNED_INT_10_10_10_2\0"
3804+ "GL_UNSIGNED_INT_24_8_NV\0"
3805+ "GL_UNSIGNED_INT_2_10_10_10_REV\0"
3806+ "GL_UNSIGNED_INT_8_8_8_8\0"
3807+ "GL_UNSIGNED_INT_8_8_8_8_REV\0"
3808+ "GL_UNSIGNED_SHORT\0"
3809+ "GL_UNSIGNED_SHORT_1_5_5_5_REV\0"
3810+ "GL_UNSIGNED_SHORT_4_4_4_4\0"
3811+ "GL_UNSIGNED_SHORT_4_4_4_4_REV\0"
3812+ "GL_UNSIGNED_SHORT_5_5_5_1\0"
3813+ "GL_UNSIGNED_SHORT_5_6_5\0"
3814+ "GL_UNSIGNED_SHORT_5_6_5_REV\0"
3815+ "GL_UNSIGNED_SHORT_8_8_APPLE\0"
3816+ "GL_UNSIGNED_SHORT_8_8_MESA\0"
3817+ "GL_UNSIGNED_SHORT_8_8_REV_APPLE\0"
3818+ "GL_UNSIGNED_SHORT_8_8_REV_MESA\0"
3819+ "GL_UPPER_LEFT\0"
3820+ "GL_V2F\0"
3821+ "GL_V3F\0"
3822+ "GL_VALIDATE_STATUS\0"
3823+ "GL_VENDOR\0"
3824+ "GL_VERSION\0"
3825+ "GL_VERTEX_ARRAY\0"
3826+ "GL_VERTEX_ARRAY_BINDING_APPLE\0"
3827+ "GL_VERTEX_ARRAY_BUFFER_BINDING\0"
3828+ "GL_VERTEX_ARRAY_BUFFER_BINDING_ARB\0"
3829+ "GL_VERTEX_ARRAY_POINTER\0"
3830+ "GL_VERTEX_ARRAY_SIZE\0"
3831+ "GL_VERTEX_ARRAY_STRIDE\0"
3832+ "GL_VERTEX_ARRAY_TYPE\0"
3833+ "GL_VERTEX_ATTRIB_ARRAY0_NV\0"
3834+ "GL_VERTEX_ATTRIB_ARRAY10_NV\0"
3835+ "GL_VERTEX_ATTRIB_ARRAY11_NV\0"
3836+ "GL_VERTEX_ATTRIB_ARRAY12_NV\0"
3837+ "GL_VERTEX_ATTRIB_ARRAY13_NV\0"
3838+ "GL_VERTEX_ATTRIB_ARRAY14_NV\0"
3839+ "GL_VERTEX_ATTRIB_ARRAY15_NV\0"
3840+ "GL_VERTEX_ATTRIB_ARRAY1_NV\0"
3841+ "GL_VERTEX_ATTRIB_ARRAY2_NV\0"
3842+ "GL_VERTEX_ATTRIB_ARRAY3_NV\0"
3843+ "GL_VERTEX_ATTRIB_ARRAY4_NV\0"
3844+ "GL_VERTEX_ATTRIB_ARRAY5_NV\0"
3845+ "GL_VERTEX_ATTRIB_ARRAY6_NV\0"
3846+ "GL_VERTEX_ATTRIB_ARRAY7_NV\0"
3847+ "GL_VERTEX_ATTRIB_ARRAY8_NV\0"
3848+ "GL_VERTEX_ATTRIB_ARRAY9_NV\0"
3849+ "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\0"
3850+ "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB\0"
3851+ "GL_VERTEX_ATTRIB_ARRAY_ENABLED\0"
3852+ "GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB\0"
3853+ "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED\0"
3854+ "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB\0"
3855+ "GL_VERTEX_ATTRIB_ARRAY_POINTER\0"
3856+ "GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB\0"
3857+ "GL_VERTEX_ATTRIB_ARRAY_SIZE\0"
3858+ "GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB\0"
3859+ "GL_VERTEX_ATTRIB_ARRAY_STRIDE\0"
3860+ "GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB\0"
3861+ "GL_VERTEX_ATTRIB_ARRAY_TYPE\0"
3862+ "GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB\0"
3863+ "GL_VERTEX_BLEND_ARB\0"
3864+ "GL_VERTEX_PROGRAM_ARB\0"
3865+ "GL_VERTEX_PROGRAM_BINDING_NV\0"
3866+ "GL_VERTEX_PROGRAM_NV\0"
3867+ "GL_VERTEX_PROGRAM_POINT_SIZE\0"
3868+ "GL_VERTEX_PROGRAM_POINT_SIZE_ARB\0"
3869+ "GL_VERTEX_PROGRAM_POINT_SIZE_NV\0"
3870+ "GL_VERTEX_PROGRAM_TWO_SIDE\0"
3871+ "GL_VERTEX_PROGRAM_TWO_SIDE_ARB\0"
3872+ "GL_VERTEX_PROGRAM_TWO_SIDE_NV\0"
3873+ "GL_VERTEX_SHADER\0"
3874+ "GL_VERTEX_SHADER_ARB\0"
3875+ "GL_VERTEX_STATE_PROGRAM_NV\0"
3876+ "GL_VIEWPORT\0"
3877+ "GL_VIEWPORT_BIT\0"
3878+ "GL_WEIGHT_ARRAY_ARB\0"
3879+ "GL_WEIGHT_ARRAY_BUFFER_BINDING\0"
3880+ "GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB\0"
3881+ "GL_WEIGHT_ARRAY_POINTER_ARB\0"
3882+ "GL_WEIGHT_ARRAY_SIZE_ARB\0"
3883+ "GL_WEIGHT_ARRAY_STRIDE_ARB\0"
3884+ "GL_WEIGHT_ARRAY_TYPE_ARB\0"
3885+ "GL_WEIGHT_SUM_UNITY_ARB\0"
3886+ "GL_WRAP_BORDER_SUN\0"
3887+ "GL_WRITE_ONLY\0"
3888+ "GL_WRITE_ONLY_ARB\0"
3889+ "GL_XOR\0"
3890+ "GL_YCBCR_422_APPLE\0"
3891+ "GL_YCBCR_MESA\0"
3892+ "GL_ZERO\0"
3893+ "GL_ZOOM_X\0"
3894+ "GL_ZOOM_Y\0"
3895+ ;
3896+
3897+static const enum_elt all_enums[1746] =
3898+{
3899+ { 0, 0x00000600 }, /* GL_2D */
3900+ { 6, 0x00001407 }, /* GL_2_BYTES */
3901+ { 17, 0x00000601 }, /* GL_3D */
3902+ { 23, 0x00000602 }, /* GL_3D_COLOR */
3903+ { 35, 0x00000603 }, /* GL_3D_COLOR_TEXTURE */
3904+ { 55, 0x00001408 }, /* GL_3_BYTES */
3905+ { 66, 0x00000604 }, /* GL_4D_COLOR_TEXTURE */
3906+ { 86, 0x00001409 }, /* GL_4_BYTES */
3907+ { 97, 0x00000100 }, /* GL_ACCUM */
3908+ { 106, 0x00000D5B }, /* GL_ACCUM_ALPHA_BITS */
3909+ { 126, 0x00000D5A }, /* GL_ACCUM_BLUE_BITS */
3910+ { 145, 0x00000200 }, /* GL_ACCUM_BUFFER_BIT */
3911+ { 165, 0x00000B80 }, /* GL_ACCUM_CLEAR_VALUE */
3912+ { 186, 0x00000D59 }, /* GL_ACCUM_GREEN_BITS */
3913+ { 206, 0x00000D58 }, /* GL_ACCUM_RED_BITS */
3914+ { 224, 0x00008B89 }, /* GL_ACTIVE_ATTRIBUTES */
3915+ { 245, 0x00008B8A }, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
3916+ { 276, 0x00008911 }, /* GL_ACTIVE_STENCIL_FACE_EXT */
3917+ { 303, 0x000084E0 }, /* GL_ACTIVE_TEXTURE */
3918+ { 321, 0x000084E0 }, /* GL_ACTIVE_TEXTURE_ARB */
3919+ { 343, 0x00008B86 }, /* GL_ACTIVE_UNIFORMS */
3920+ { 362, 0x00008B87 }, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
3921+ { 391, 0x000086A5 }, /* GL_ACTIVE_VERTEX_UNITS_ARB */
3922+ { 418, 0x00000104 }, /* GL_ADD */
3923+ { 425, 0x00008574 }, /* GL_ADD_SIGNED */
3924+ { 439, 0x00008574 }, /* GL_ADD_SIGNED_ARB */
3925+ { 457, 0x00008574 }, /* GL_ADD_SIGNED_EXT */
3926+ { 475, 0x0000846E }, /* GL_ALIASED_LINE_WIDTH_RANGE */
3927+ { 503, 0x0000846D }, /* GL_ALIASED_POINT_SIZE_RANGE */
3928+ { 531, 0x000FFFFF }, /* GL_ALL_ATTRIB_BITS */
3929+ { 550, 0xFFFFFFFF }, /* GL_ALL_CLIENT_ATTRIB_BITS */
3930+ { 576, 0x00001906 }, /* GL_ALPHA */
3931+ { 585, 0x0000803D }, /* GL_ALPHA12 */
3932+ { 596, 0x0000803D }, /* GL_ALPHA12_EXT */
3933+ { 611, 0x0000803E }, /* GL_ALPHA16 */
3934+ { 622, 0x0000803E }, /* GL_ALPHA16_EXT */
3935+ { 637, 0x0000803B }, /* GL_ALPHA4 */
3936+ { 647, 0x0000803B }, /* GL_ALPHA4_EXT */
3937+ { 661, 0x0000803C }, /* GL_ALPHA8 */
3938+ { 671, 0x0000803C }, /* GL_ALPHA8_EXT */
3939+ { 685, 0x00000D1D }, /* GL_ALPHA_BIAS */
3940+ { 699, 0x00000D55 }, /* GL_ALPHA_BITS */
3941+ { 713, 0x00000D1C }, /* GL_ALPHA_SCALE */
3942+ { 728, 0x00000BC0 }, /* GL_ALPHA_TEST */
3943+ { 742, 0x00000BC1 }, /* GL_ALPHA_TEST_FUNC */
3944+ { 761, 0x00000BC2 }, /* GL_ALPHA_TEST_REF */
3945+ { 779, 0x00000207 }, /* GL_ALWAYS */
3946+ { 789, 0x00001200 }, /* GL_AMBIENT */
3947+ { 800, 0x00001602 }, /* GL_AMBIENT_AND_DIFFUSE */
3948+ { 823, 0x00001501 }, /* GL_AND */
3949+ { 830, 0x00001504 }, /* GL_AND_INVERTED */
3950+ { 846, 0x00001502 }, /* GL_AND_REVERSE */
3951+ { 861, 0x00008892 }, /* GL_ARRAY_BUFFER */
3952+ { 877, 0x00008892 }, /* GL_ARRAY_BUFFER_ARB */
3953+ { 897, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING */
3954+ { 921, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING_ARB */
3955+ { 949, 0x00008B85 }, /* GL_ATTACHED_SHADERS */
3956+ { 969, 0x00008645 }, /* GL_ATTRIB_ARRAY_POINTER_NV */
3957+ { 996, 0x00008623 }, /* GL_ATTRIB_ARRAY_SIZE_NV */
3958+ { 1020, 0x00008624 }, /* GL_ATTRIB_ARRAY_STRIDE_NV */
3959+ { 1046, 0x00008625 }, /* GL_ATTRIB_ARRAY_TYPE_NV */
3960+ { 1070, 0x00000BB0 }, /* GL_ATTRIB_STACK_DEPTH */
3961+ { 1092, 0x00000D80 }, /* GL_AUTO_NORMAL */
3962+ { 1107, 0x00000409 }, /* GL_AUX0 */
3963+ { 1115, 0x0000040A }, /* GL_AUX1 */
3964+ { 1123, 0x0000040B }, /* GL_AUX2 */
3965+ { 1131, 0x0000040C }, /* GL_AUX3 */
3966+ { 1139, 0x00000C00 }, /* GL_AUX_BUFFERS */
3967+ { 1154, 0x00000405 }, /* GL_BACK */
3968+ { 1162, 0x00000402 }, /* GL_BACK_LEFT */
3969+ { 1175, 0x00000403 }, /* GL_BACK_RIGHT */
3970+ { 1189, 0x000080E0 }, /* GL_BGR */
3971+ { 1196, 0x000080E1 }, /* GL_BGRA */
3972+ { 1204, 0x00001A00 }, /* GL_BITMAP */
3973+ { 1214, 0x00000704 }, /* GL_BITMAP_TOKEN */
3974+ { 1230, 0x00000BE2 }, /* GL_BLEND */
3975+ { 1239, 0x00008005 }, /* GL_BLEND_COLOR */
3976+ { 1254, 0x00008005 }, /* GL_BLEND_COLOR_EXT */
3977+ { 1273, 0x00000BE0 }, /* GL_BLEND_DST */
3978+ { 1286, 0x000080CA }, /* GL_BLEND_DST_ALPHA */
3979+ { 1305, 0x000080C8 }, /* GL_BLEND_DST_RGB */
3980+ { 1322, 0x00008009 }, /* GL_BLEND_EQUATION */
3981+ { 1340, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA */
3982+ { 1364, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_EXT */
3983+ { 1392, 0x00008009 }, /* GL_BLEND_EQUATION_EXT */
3984+ { 1414, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_EXT */
3985+ { 1440, 0x00000BE1 }, /* GL_BLEND_SRC */
3986+ { 1453, 0x000080CB }, /* GL_BLEND_SRC_ALPHA */
3987+ { 1472, 0x000080C9 }, /* GL_BLEND_SRC_RGB */
3988+ { 1489, 0x00001905 }, /* GL_BLUE */
3989+ { 1497, 0x00000D1B }, /* GL_BLUE_BIAS */
3990+ { 1510, 0x00000D54 }, /* GL_BLUE_BITS */
3991+ { 1523, 0x00000D1A }, /* GL_BLUE_SCALE */
3992+ { 1537, 0x00008B56 }, /* GL_BOOL */
3993+ { 1545, 0x00008B56 }, /* GL_BOOL_ARB */
3994+ { 1557, 0x00008B57 }, /* GL_BOOL_VEC2 */
3995+ { 1570, 0x00008B57 }, /* GL_BOOL_VEC2_ARB */
3996+ { 1587, 0x00008B58 }, /* GL_BOOL_VEC3 */
3997+ { 1600, 0x00008B58 }, /* GL_BOOL_VEC3_ARB */
3998+ { 1617, 0x00008B59 }, /* GL_BOOL_VEC4 */
3999+ { 1630, 0x00008B59 }, /* GL_BOOL_VEC4_ARB */
4000+ { 1647, 0x000088BB }, /* GL_BUFFER_ACCESS */
4001+ { 1664, 0x000088BB }, /* GL_BUFFER_ACCESS_ARB */
4002+ { 1685, 0x000088BC }, /* GL_BUFFER_MAPPED */
4003+ { 1702, 0x000088BC }, /* GL_BUFFER_MAPPED_ARB */
4004+ { 1723, 0x000088BD }, /* GL_BUFFER_MAP_POINTER */
4005+ { 1745, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_ARB */
4006+ { 1771, 0x00008764 }, /* GL_BUFFER_SIZE */
4007+ { 1786, 0x00008764 }, /* GL_BUFFER_SIZE_ARB */
4008+ { 1805, 0x00008765 }, /* GL_BUFFER_USAGE */
4009+ { 1821, 0x00008765 }, /* GL_BUFFER_USAGE_ARB */
4010+ { 1841, 0x00001400 }, /* GL_BYTE */
4011+ { 1849, 0x00002A24 }, /* GL_C3F_V3F */
4012+ { 1860, 0x00002A26 }, /* GL_C4F_N3F_V3F */
4013+ { 1875, 0x00002A22 }, /* GL_C4UB_V2F */
4014+ { 1887, 0x00002A23 }, /* GL_C4UB_V3F */
4015+ { 1899, 0x00000901 }, /* GL_CCW */
4016+ { 1906, 0x00002900 }, /* GL_CLAMP */
4017+ { 1915, 0x0000812D }, /* GL_CLAMP_TO_BORDER */
4018+ { 1934, 0x0000812D }, /* GL_CLAMP_TO_BORDER_ARB */
4019+ { 1957, 0x0000812D }, /* GL_CLAMP_TO_BORDER_SGIS */
4020+ { 1981, 0x0000812F }, /* GL_CLAMP_TO_EDGE */
4021+ { 1998, 0x0000812F }, /* GL_CLAMP_TO_EDGE_SGIS */
4022+ { 2020, 0x00001500 }, /* GL_CLEAR */
4023+ { 2029, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE */
4024+ { 2054, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE_ARB */
4025+ { 2083, 0xFFFFFFFF }, /* GL_CLIENT_ALL_ATTRIB_BITS */
4026+ { 2109, 0x00000BB1 }, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
4027+ { 2138, 0x00000001 }, /* GL_CLIENT_PIXEL_STORE_BIT */
4028+ { 2164, 0x00000002 }, /* GL_CLIENT_VERTEX_ARRAY_BIT */
4029+ { 2191, 0x00003000 }, /* GL_CLIP_PLANE0 */
4030+ { 2206, 0x00003001 }, /* GL_CLIP_PLANE1 */
4031+ { 2221, 0x00003002 }, /* GL_CLIP_PLANE2 */
4032+ { 2236, 0x00003003 }, /* GL_CLIP_PLANE3 */
4033+ { 2251, 0x00003004 }, /* GL_CLIP_PLANE4 */
4034+ { 2266, 0x00003005 }, /* GL_CLIP_PLANE5 */
4035+ { 2281, 0x000080F0 }, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
4036+ { 2314, 0x00000A00 }, /* GL_COEFF */
4037+ { 2323, 0x00001800 }, /* GL_COLOR */
4038+ { 2332, 0x00008076 }, /* GL_COLOR_ARRAY */
4039+ { 2347, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING */
4040+ { 2377, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING_ARB */
4041+ { 2411, 0x00008090 }, /* GL_COLOR_ARRAY_POINTER */
4042+ { 2434, 0x00008081 }, /* GL_COLOR_ARRAY_SIZE */
4043+ { 2454, 0x00008083 }, /* GL_COLOR_ARRAY_STRIDE */
4044+ { 2476, 0x00008082 }, /* GL_COLOR_ARRAY_TYPE */
4045+ { 2496, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_EXT */
4046+ { 2521, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10_EXT */
4047+ { 2547, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11_EXT */
4048+ { 2573, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12_EXT */
4049+ { 2599, 0x00008CED }, /* GL_COLOR_ATTACHMENT13_EXT */
4050+ { 2625, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14_EXT */
4051+ { 2651, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15_EXT */
4052+ { 2677, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1_EXT */
4053+ { 2702, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2_EXT */
4054+ { 2727, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3_EXT */
4055+ { 2752, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4_EXT */
4056+ { 2777, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5_EXT */
4057+ { 2802, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6_EXT */
4058+ { 2827, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7_EXT */
4059+ { 2852, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8_EXT */
4060+ { 2877, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9_EXT */
4061+ { 2902, 0x00004000 }, /* GL_COLOR_BUFFER_BIT */
4062+ { 2922, 0x00000C22 }, /* GL_COLOR_CLEAR_VALUE */
4063+ { 2943, 0x00001900 }, /* GL_COLOR_INDEX */
4064+ { 2958, 0x00001603 }, /* GL_COLOR_INDEXES */
4065+ { 2975, 0x00000BF2 }, /* GL_COLOR_LOGIC_OP */
4066+ { 2993, 0x00000B57 }, /* GL_COLOR_MATERIAL */
4067+ { 3011, 0x00000B55 }, /* GL_COLOR_MATERIAL_FACE */
4068+ { 3034, 0x00000B56 }, /* GL_COLOR_MATERIAL_PARAMETER */
4069+ { 3062, 0x000080B1 }, /* GL_COLOR_MATRIX */
4070+ { 3078, 0x000080B1 }, /* GL_COLOR_MATRIX_SGI */
4071+ { 3098, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH */
4072+ { 3126, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH_SGI */
4073+ { 3158, 0x00008458 }, /* GL_COLOR_SUM */
4074+ { 3171, 0x00008458 }, /* GL_COLOR_SUM_ARB */
4075+ { 3188, 0x000080D0 }, /* GL_COLOR_TABLE */
4076+ { 3203, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE */
4077+ { 3229, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_EXT */
4078+ { 3259, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_SGI */
4079+ { 3289, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS */
4080+ { 3309, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS_SGI */
4081+ { 3333, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE */
4082+ { 3358, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_EXT */
4083+ { 3387, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_SGI */
4084+ { 3416, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT */
4085+ { 3438, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_EXT */
4086+ { 3464, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_SGI */
4087+ { 3490, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE */
4088+ { 3516, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_EXT */
4089+ { 3546, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_SGI */
4090+ { 3576, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE */
4091+ { 3606, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_EXT */
4092+ { 3640, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_SGI */
4093+ { 3674, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
4094+ { 3704, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_EXT */
4095+ { 3738, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_SGI */
4096+ { 3772, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE */
4097+ { 3796, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_EXT */
4098+ { 3824, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_SGI */
4099+ { 3852, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE */
4100+ { 3873, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE_SGI */
4101+ { 3898, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH */
4102+ { 3919, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_EXT */
4103+ { 3944, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_SGI */
4104+ { 3969, 0x00000C23 }, /* GL_COLOR_WRITEMASK */
4105+ { 3988, 0x00008570 }, /* GL_COMBINE */
4106+ { 3999, 0x00008503 }, /* GL_COMBINE4 */
4107+ { 4011, 0x00008572 }, /* GL_COMBINE_ALPHA */
4108+ { 4028, 0x00008572 }, /* GL_COMBINE_ALPHA_ARB */
4109+ { 4049, 0x00008572 }, /* GL_COMBINE_ALPHA_EXT */
4110+ { 4070, 0x00008570 }, /* GL_COMBINE_ARB */
4111+ { 4085, 0x00008570 }, /* GL_COMBINE_EXT */
4112+ { 4100, 0x00008571 }, /* GL_COMBINE_RGB */
4113+ { 4115, 0x00008571 }, /* GL_COMBINE_RGB_ARB */
4114+ { 4134, 0x00008571 }, /* GL_COMBINE_RGB_EXT */
4115+ { 4153, 0x0000884E }, /* GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT */
4116+ { 4189, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE */
4117+ { 4213, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE_ARB */
4118+ { 4241, 0x00001300 }, /* GL_COMPILE */
4119+ { 4252, 0x00001301 }, /* GL_COMPILE_AND_EXECUTE */
4120+ { 4275, 0x00008B81 }, /* GL_COMPILE_STATUS */
4121+ { 4293, 0x000084E9 }, /* GL_COMPRESSED_ALPHA */
4122+ { 4313, 0x000084E9 }, /* GL_COMPRESSED_ALPHA_ARB */
4123+ { 4337, 0x000084EC }, /* GL_COMPRESSED_INTENSITY */
4124+ { 4361, 0x000084EC }, /* GL_COMPRESSED_INTENSITY_ARB */
4125+ { 4389, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE */
4126+ { 4413, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA */
4127+ { 4443, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA_ARB */
4128+ { 4477, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE_ARB */
4129+ { 4505, 0x000084ED }, /* GL_COMPRESSED_RGB */
4130+ { 4523, 0x000084EE }, /* GL_COMPRESSED_RGBA */
4131+ { 4542, 0x000084EE }, /* GL_COMPRESSED_RGBA_ARB */
4132+ { 4565, 0x000086B1 }, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
4133+ { 4594, 0x000083F1 }, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
4134+ { 4627, 0x000083F2 }, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
4135+ { 4660, 0x000083F3 }, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
4136+ { 4693, 0x000084ED }, /* GL_COMPRESSED_RGB_ARB */
4137+ { 4715, 0x000086B0 }, /* GL_COMPRESSED_RGB_FXT1_3DFX */
4138+ { 4743, 0x000083F0 }, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
4139+ { 4775, 0x000086A3 }, /* GL_COMPRESSED_TEXTURE_FORMATS */
4140+ { 4805, 0x00008576 }, /* GL_CONSTANT */
4141+ { 4817, 0x00008003 }, /* GL_CONSTANT_ALPHA */
4142+ { 4835, 0x00008003 }, /* GL_CONSTANT_ALPHA_EXT */
4143+ { 4857, 0x00008576 }, /* GL_CONSTANT_ARB */
4144+ { 4873, 0x00001207 }, /* GL_CONSTANT_ATTENUATION */
4145+ { 4897, 0x00008151 }, /* GL_CONSTANT_BORDER_HP */
4146+ { 4919, 0x00008001 }, /* GL_CONSTANT_COLOR */
4147+ { 4937, 0x00008001 }, /* GL_CONSTANT_COLOR_EXT */
4148+ { 4959, 0x00008576 }, /* GL_CONSTANT_EXT */
4149+ { 4975, 0x00008010 }, /* GL_CONVOLUTION_1D */
4150+ { 4993, 0x00008011 }, /* GL_CONVOLUTION_2D */
4151+ { 5011, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR */
4152+ { 5039, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR_HP */
4153+ { 5070, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE */
4154+ { 5097, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE_EXT */
4155+ { 5128, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS */
4156+ { 5155, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS_EXT */
4157+ { 5186, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE */
4158+ { 5214, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE_EXT */
4159+ { 5246, 0x00008017 }, /* GL_CONVOLUTION_FORMAT */
4160+ { 5268, 0x00008017 }, /* GL_CONVOLUTION_FORMAT_EXT */
4161+ { 5294, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT */
4162+ { 5316, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT_EXT */
4163+ { 5342, 0x00008018 }, /* GL_CONVOLUTION_WIDTH */
4164+ { 5363, 0x00008018 }, /* GL_CONVOLUTION_WIDTH_EXT */
4165+ { 5388, 0x00008862 }, /* GL_COORD_REPLACE */
4166+ { 5405, 0x00008862 }, /* GL_COORD_REPLACE_ARB */
4167+ { 5426, 0x00008862 }, /* GL_COORD_REPLACE_NV */
4168+ { 5446, 0x00001503 }, /* GL_COPY */
4169+ { 5454, 0x0000150C }, /* GL_COPY_INVERTED */
4170+ { 5471, 0x00000706 }, /* GL_COPY_PIXEL_TOKEN */
4171+ { 5491, 0x00000B44 }, /* GL_CULL_FACE */
4172+ { 5504, 0x00000B45 }, /* GL_CULL_FACE_MODE */
4173+ { 5522, 0x000081AA }, /* GL_CULL_VERTEX_EXT */
4174+ { 5541, 0x000081AC }, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
4175+ { 5573, 0x000081AB }, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
4176+ { 5608, 0x00008626 }, /* GL_CURRENT_ATTRIB_NV */
4177+ { 5629, 0x00000001 }, /* GL_CURRENT_BIT */
4178+ { 5644, 0x00000B00 }, /* GL_CURRENT_COLOR */
4179+ { 5661, 0x00008453 }, /* GL_CURRENT_FOG_COORD */
4180+ { 5682, 0x00008453 }, /* GL_CURRENT_FOG_COORDINATE */
4181+ { 5708, 0x00000B01 }, /* GL_CURRENT_INDEX */
4182+ { 5725, 0x00008641 }, /* GL_CURRENT_MATRIX_ARB */
4183+ { 5747, 0x00008845 }, /* GL_CURRENT_MATRIX_INDEX_ARB */
4184+ { 5775, 0x00008641 }, /* GL_CURRENT_MATRIX_NV */
4185+ { 5796, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
4186+ { 5830, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_NV */
4187+ { 5863, 0x00000B02 }, /* GL_CURRENT_NORMAL */
4188+ { 5881, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_ARB */
4189+ { 5911, 0x00008B8D }, /* GL_CURRENT_PROGRAM */
4190+ { 5930, 0x00008865 }, /* GL_CURRENT_QUERY */
4191+ { 5947, 0x00008865 }, /* GL_CURRENT_QUERY_ARB */
4192+ { 5968, 0x00000B04 }, /* GL_CURRENT_RASTER_COLOR */
4193+ { 5992, 0x00000B09 }, /* GL_CURRENT_RASTER_DISTANCE */
4194+ { 6019, 0x00000B05 }, /* GL_CURRENT_RASTER_INDEX */
4195+ { 6043, 0x00000B07 }, /* GL_CURRENT_RASTER_POSITION */
4196+ { 6070, 0x00000B08 }, /* GL_CURRENT_RASTER_POSITION_VALID */
4197+ { 6103, 0x00000B06 }, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
4198+ { 6136, 0x00008459 }, /* GL_CURRENT_SECONDARY_COLOR */
4199+ { 6163, 0x00000B03 }, /* GL_CURRENT_TEXTURE_COORDS */
4200+ { 6189, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB */
4201+ { 6214, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB_ARB */
4202+ { 6243, 0x000086A8 }, /* GL_CURRENT_WEIGHT_ARB */
4203+ { 6265, 0x00000900 }, /* GL_CW */
4204+ { 6271, 0x0000875B }, /* GL_DEBUG_ASSERT_MESA */
4205+ { 6292, 0x00008759 }, /* GL_DEBUG_OBJECT_MESA */
4206+ { 6313, 0x0000875A }, /* GL_DEBUG_PRINT_MESA */
4207+ { 6333, 0x00002101 }, /* GL_DECAL */
4208+ { 6342, 0x00001E03 }, /* GL_DECR */
4209+ { 6350, 0x00008508 }, /* GL_DECR_WRAP */
4210+ { 6363, 0x00008508 }, /* GL_DECR_WRAP_EXT */
4211+ { 6380, 0x00008B80 }, /* GL_DELETE_STATUS */
4212+ { 6397, 0x00001801 }, /* GL_DEPTH */
4213+ { 6406, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */
4214+ { 6430, 0x00000D1F }, /* GL_DEPTH_BIAS */
4215+ { 6444, 0x00000D56 }, /* GL_DEPTH_BITS */
4216+ { 6458, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */
4217+ { 6478, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */
4218+ { 6503, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */
4219+ { 6523, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */
4220+ { 6541, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */
4221+ { 6562, 0x00001902 }, /* GL_DEPTH_COMPONENT */
4222+ { 6581, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */
4223+ { 6602, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */
4224+ { 6627, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */
4225+ { 6653, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */
4226+ { 6674, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */
4227+ { 6699, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */
4228+ { 6725, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */
4229+ { 6746, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */
4230+ { 6771, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */
4231+ { 6797, 0x00000B74 }, /* GL_DEPTH_FUNC */
4232+ { 6811, 0x00000B70 }, /* GL_DEPTH_RANGE */
4233+ { 6826, 0x00000D1E }, /* GL_DEPTH_SCALE */
4234+ { 6841, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */
4235+ { 6861, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
4236+ { 6889, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
4237+ { 6917, 0x00000B71 }, /* GL_DEPTH_TEST */
4238+ { 6931, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */
4239+ { 6953, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */
4240+ { 6979, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */
4241+ { 6998, 0x00001201 }, /* GL_DIFFUSE */
4242+ { 7009, 0x00000BD0 }, /* GL_DITHER */
4243+ { 7019, 0x00000A02 }, /* GL_DOMAIN */
4244+ { 7029, 0x00001100 }, /* GL_DONT_CARE */
4245+ { 7042, 0x000086AE }, /* GL_DOT3_RGB */
4246+ { 7054, 0x000086AF }, /* GL_DOT3_RGBA */
4247+ { 7067, 0x000086AF }, /* GL_DOT3_RGBA_ARB */
4248+ { 7084, 0x00008741 }, /* GL_DOT3_RGBA_EXT */
4249+ { 7101, 0x000086AE }, /* GL_DOT3_RGB_ARB */
4250+ { 7117, 0x00008740 }, /* GL_DOT3_RGB_EXT */
4251+ { 7133, 0x0000140A }, /* GL_DOUBLE */
4252+ { 7143, 0x00000C32 }, /* GL_DOUBLEBUFFER */
4253+ { 7159, 0x00000C01 }, /* GL_DRAW_BUFFER */
4254+ { 7174, 0x00008825 }, /* GL_DRAW_BUFFER0 */
4255+ { 7190, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */
4256+ { 7210, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */
4257+ { 7230, 0x00008826 }, /* GL_DRAW_BUFFER1 */
4258+ { 7246, 0x0000882F }, /* GL_DRAW_BUFFER10 */
4259+ { 7263, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */
4260+ { 7284, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */
4261+ { 7305, 0x00008830 }, /* GL_DRAW_BUFFER11 */
4262+ { 7322, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */
4263+ { 7343, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */
4264+ { 7364, 0x00008831 }, /* GL_DRAW_BUFFER12 */
4265+ { 7381, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */
4266+ { 7402, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */
4267+ { 7423, 0x00008832 }, /* GL_DRAW_BUFFER13 */
4268+ { 7440, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */
4269+ { 7461, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */
4270+ { 7482, 0x00008833 }, /* GL_DRAW_BUFFER14 */
4271+ { 7499, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */
4272+ { 7520, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */
4273+ { 7541, 0x00008834 }, /* GL_DRAW_BUFFER15 */
4274+ { 7558, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */
4275+ { 7579, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */
4276+ { 7600, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */
4277+ { 7620, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */
4278+ { 7640, 0x00008827 }, /* GL_DRAW_BUFFER2 */
4279+ { 7656, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */
4280+ { 7676, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */
4281+ { 7696, 0x00008828 }, /* GL_DRAW_BUFFER3 */
4282+ { 7712, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */
4283+ { 7732, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */
4284+ { 7752, 0x00008829 }, /* GL_DRAW_BUFFER4 */
4285+ { 7768, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */
4286+ { 7788, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */
4287+ { 7808, 0x0000882A }, /* GL_DRAW_BUFFER5 */
4288+ { 7824, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */
4289+ { 7844, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */
4290+ { 7864, 0x0000882B }, /* GL_DRAW_BUFFER6 */
4291+ { 7880, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */
4292+ { 7900, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */
4293+ { 7920, 0x0000882C }, /* GL_DRAW_BUFFER7 */
4294+ { 7936, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */
4295+ { 7956, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */
4296+ { 7976, 0x0000882D }, /* GL_DRAW_BUFFER8 */
4297+ { 7992, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */
4298+ { 8012, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */
4299+ { 8032, 0x0000882E }, /* GL_DRAW_BUFFER9 */
4300+ { 8048, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */
4301+ { 8068, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */
4302+ { 8088, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
4303+ { 8120, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */
4304+ { 8144, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */
4305+ { 8164, 0x00000304 }, /* GL_DST_ALPHA */
4306+ { 8177, 0x00000306 }, /* GL_DST_COLOR */
4307+ { 8190, 0x000088EA }, /* GL_DYNAMIC_COPY */
4308+ { 8206, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */
4309+ { 8226, 0x000088E8 }, /* GL_DYNAMIC_DRAW */
4310+ { 8242, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */
4311+ { 8262, 0x000088E9 }, /* GL_DYNAMIC_READ */
4312+ { 8278, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */
4313+ { 8298, 0x00000B43 }, /* GL_EDGE_FLAG */
4314+ { 8311, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */
4315+ { 8330, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
4316+ { 8364, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */
4317+ { 8402, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */
4318+ { 8429, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */
4319+ { 8455, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */
4320+ { 8479, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER_ARB */
4321+ { 8507, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
4322+ { 8539, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */
4323+ { 8575, 0x00001600 }, /* GL_EMISSION */
4324+ { 8587, 0x00002000 }, /* GL_ENABLE_BIT */
4325+ { 8601, 0x00000202 }, /* GL_EQUAL */
4326+ { 8610, 0x00001509 }, /* GL_EQUIV */
4327+ { 8619, 0x00010000 }, /* GL_EVAL_BIT */
4328+ { 8631, 0x00000800 }, /* GL_EXP */
4329+ { 8638, 0x00000801 }, /* GL_EXP2 */
4330+ { 8646, 0x00001F03 }, /* GL_EXTENSIONS */
4331+ { 8660, 0x00002400 }, /* GL_EYE_LINEAR */
4332+ { 8674, 0x00002502 }, /* GL_EYE_PLANE */
4333+ { 8687, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */
4334+ { 8712, 0x0000855B }, /* GL_EYE_RADIAL_NV */
4335+ { 8729, 0x00000000 }, /* GL_FALSE */
4336+ { 8738, 0x00001101 }, /* GL_FASTEST */
4337+ { 8749, 0x00001C01 }, /* GL_FEEDBACK */
4338+ { 8761, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */
4339+ { 8788, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */
4340+ { 8812, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */
4341+ { 8836, 0x00001B02 }, /* GL_FILL */
4342+ { 8844, 0x00001D00 }, /* GL_FLAT */
4343+ { 8852, 0x00001406 }, /* GL_FLOAT */
4344+ { 8861, 0x00008B5A }, /* GL_FLOAT_MAT2 */
4345+ { 8875, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */
4346+ { 8893, 0x00008B5B }, /* GL_FLOAT_MAT3 */
4347+ { 8907, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */
4348+ { 8925, 0x00008B5C }, /* GL_FLOAT_MAT4 */
4349+ { 8939, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */
4350+ { 8957, 0x00008B50 }, /* GL_FLOAT_VEC2 */
4351+ { 8971, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */
4352+ { 8989, 0x00008B51 }, /* GL_FLOAT_VEC3 */
4353+ { 9003, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */
4354+ { 9021, 0x00008B52 }, /* GL_FLOAT_VEC4 */
4355+ { 9035, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */
4356+ { 9053, 0x00000B60 }, /* GL_FOG */
4357+ { 9060, 0x00000080 }, /* GL_FOG_BIT */
4358+ { 9071, 0x00000B66 }, /* GL_FOG_COLOR */
4359+ { 9084, 0x00008451 }, /* GL_FOG_COORD */
4360+ { 9097, 0x00008451 }, /* GL_FOG_COORDINATE */
4361+ { 9115, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */
4362+ { 9139, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
4363+ { 9178, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */
4364+ { 9221, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */
4365+ { 9253, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
4366+ { 9284, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */
4367+ { 9313, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */
4368+ { 9338, 0x00008457 }, /* GL_FOG_COORD_ARRAY */
4369+ { 9357, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */
4370+ { 9391, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */
4371+ { 9418, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */
4372+ { 9444, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */
4373+ { 9468, 0x00008450 }, /* GL_FOG_COORD_SRC */
4374+ { 9485, 0x00000B62 }, /* GL_FOG_DENSITY */
4375+ { 9500, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */
4376+ { 9524, 0x00000B64 }, /* GL_FOG_END */
4377+ { 9535, 0x00000C54 }, /* GL_FOG_HINT */
4378+ { 9547, 0x00000B61 }, /* GL_FOG_INDEX */
4379+ { 9560, 0x00000B65 }, /* GL_FOG_MODE */
4380+ { 9572, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */
4381+ { 9591, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */
4382+ { 9616, 0x00000B63 }, /* GL_FOG_START */
4383+ { 9629, 0x00008452 }, /* GL_FRAGMENT_DEPTH */
4384+ { 9647, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */
4385+ { 9671, 0x00008B30 }, /* GL_FRAGMENT_SHADER */
4386+ { 9690, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */
4387+ { 9713, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
4388+ { 9748, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
4389+ { 9790, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
4390+ { 9832, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
4391+ { 9881, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
4392+ { 9933, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
4393+ { 9977, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
4394+ { 10021, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */
4395+ { 10048, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */
4396+ { 10076, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */
4397+ { 10095, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
4398+ { 10136, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
4399+ { 10177, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
4400+ { 10219, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
4401+ { 10270, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
4402+ { 10308, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
4403+ { 10357, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
4404+ { 10399, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
4405+ { 10431, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
4406+ { 10462, 0x00000404 }, /* GL_FRONT */
4407+ { 10471, 0x00000408 }, /* GL_FRONT_AND_BACK */
4408+ { 10489, 0x00000B46 }, /* GL_FRONT_FACE */
4409+ { 10503, 0x00000400 }, /* GL_FRONT_LEFT */
4410+ { 10517, 0x00000401 }, /* GL_FRONT_RIGHT */
4411+ { 10532, 0x00008006 }, /* GL_FUNC_ADD */
4412+ { 10544, 0x00008006 }, /* GL_FUNC_ADD_EXT */
4413+ { 10560, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */
4414+ { 10585, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */
4415+ { 10614, 0x0000800A }, /* GL_FUNC_SUBTRACT */
4416+ { 10631, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */
4417+ { 10652, 0x00008191 }, /* GL_GENERATE_MIPMAP */
4418+ { 10671, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */
4419+ { 10695, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */
4420+ { 10724, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */
4421+ { 10748, 0x00000206 }, /* GL_GEQUAL */
4422+ { 10758, 0x00008009 }, /* GL_GL_BLEND_EQUATION_RGB */
4423+ { 10783, 0x00008C4A }, /* GL_GL_COMPRESSED_SLUMINANCE */
4424+ { 10811, 0x00008C4B }, /* GL_GL_COMPRESSED_SLUMINANCE_ALPHA */
4425+ { 10845, 0x00008C48 }, /* GL_GL_COMPRESSED_SRGB */
4426+ { 10867, 0x00008C49 }, /* GL_GL_COMPRESSED_SRGB_ALPHA */
4427+ { 10895, 0x0000845F }, /* GL_GL_CURRENT_RASTER_SECONDARY_COLOR */
4428+ { 10932, 0x00008B65 }, /* GL_GL_FLOAT_MAT2x3 */
4429+ { 10951, 0x00008B66 }, /* GL_GL_FLOAT_MAT2x4 */
4430+ { 10970, 0x00008B67 }, /* GL_GL_FLOAT_MAT3x2 */
4431+ { 10989, 0x00008B68 }, /* GL_GL_FLOAT_MAT3x4 */
4432+ { 11008, 0x00008B69 }, /* GL_GL_FLOAT_MAT4x2 */
4433+ { 11027, 0x00008B6A }, /* GL_GL_FLOAT_MAT4x3 */
4434+ { 11046, 0x000088EB }, /* GL_GL_PIXEL_PACK_BUFFER */
4435+ { 11070, 0x000088ED }, /* GL_GL_PIXEL_PACK_BUFFER_BINDING */
4436+ { 11102, 0x000088EC }, /* GL_GL_PIXEL_UNPACK_BUFFER */
4437+ { 11128, 0x000088EF }, /* GL_GL_PIXEL_UNPACK_BUFFER_BINDING */
4438+ { 11162, 0x00008C46 }, /* GL_GL_SLUMINANCE */
4439+ { 11179, 0x00008C47 }, /* GL_GL_SLUMINANCE8 */
4440+ { 11197, 0x00008C45 }, /* GL_GL_SLUMINANCE8_ALPHA8 */
4441+ { 11222, 0x00008C44 }, /* GL_GL_SLUMINANCE_ALPHA */
4442+ { 11245, 0x00008C40 }, /* GL_GL_SRGB */
4443+ { 11256, 0x00008C41 }, /* GL_GL_SRGB8 */
4444+ { 11268, 0x00008C43 }, /* GL_GL_SRGB8_ALPHA8 */
4445+ { 11287, 0x00008C42 }, /* GL_GL_SRGB_ALPHA */
4446+ { 11304, 0x00000204 }, /* GL_GREATER */
4447+ { 11315, 0x00001904 }, /* GL_GREEN */
4448+ { 11324, 0x00000D19 }, /* GL_GREEN_BIAS */
4449+ { 11338, 0x00000D53 }, /* GL_GREEN_BITS */
4450+ { 11352, 0x00000D18 }, /* GL_GREEN_SCALE */
4451+ { 11367, 0x00008000 }, /* GL_HINT_BIT */
4452+ { 11379, 0x00008024 }, /* GL_HISTOGRAM */
4453+ { 11392, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */
4454+ { 11416, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */
4455+ { 11444, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */
4456+ { 11467, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */
4457+ { 11494, 0x00008024 }, /* GL_HISTOGRAM_EXT */
4458+ { 11511, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */
4459+ { 11531, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */
4460+ { 11555, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */
4461+ { 11579, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */
4462+ { 11607, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */
4463+ { 11635, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */
4464+ { 11667, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */
4465+ { 11689, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */
4466+ { 11715, 0x0000802D }, /* GL_HISTOGRAM_SINK */
4467+ { 11733, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */
4468+ { 11755, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */
4469+ { 11774, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */
4470+ { 11797, 0x0000862A }, /* GL_IDENTITY_NV */
4471+ { 11812, 0x00008150 }, /* GL_IGNORE_BORDER_HP */
4472+ { 11832, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
4473+ { 11872, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
4474+ { 11910, 0x00001E02 }, /* GL_INCR */
4475+ { 11918, 0x00008507 }, /* GL_INCR_WRAP */
4476+ { 11931, 0x00008507 }, /* GL_INCR_WRAP_EXT */
4477+ { 11948, 0x00008077 }, /* GL_INDEX_ARRAY */
4478+ { 11963, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */
4479+ { 11993, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */
4480+ { 12027, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */
4481+ { 12050, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */
4482+ { 12072, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */
4483+ { 12092, 0x00000D51 }, /* GL_INDEX_BITS */
4484+ { 12106, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */
4485+ { 12127, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */
4486+ { 12145, 0x00000C30 }, /* GL_INDEX_MODE */
4487+ { 12159, 0x00000D13 }, /* GL_INDEX_OFFSET */
4488+ { 12175, 0x00000D12 }, /* GL_INDEX_SHIFT */
4489+ { 12190, 0x00000C21 }, /* GL_INDEX_WRITEMASK */
4490+ { 12209, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */
4491+ { 12228, 0x00001404 }, /* GL_INT */
4492+ { 12235, 0x00008049 }, /* GL_INTENSITY */
4493+ { 12248, 0x0000804C }, /* GL_INTENSITY12 */
4494+ { 12263, 0x0000804C }, /* GL_INTENSITY12_EXT */
4495+ { 12282, 0x0000804D }, /* GL_INTENSITY16 */
4496+ { 12297, 0x0000804D }, /* GL_INTENSITY16_EXT */
4497+ { 12316, 0x0000804A }, /* GL_INTENSITY4 */
4498+ { 12330, 0x0000804A }, /* GL_INTENSITY4_EXT */
4499+ { 12348, 0x0000804B }, /* GL_INTENSITY8 */
4500+ { 12362, 0x0000804B }, /* GL_INTENSITY8_EXT */
4501+ { 12380, 0x00008049 }, /* GL_INTENSITY_EXT */
4502+ { 12397, 0x00008575 }, /* GL_INTERPOLATE */
4503+ { 12412, 0x00008575 }, /* GL_INTERPOLATE_ARB */
4504+ { 12431, 0x00008575 }, /* GL_INTERPOLATE_EXT */
4505+ { 12450, 0x00008B53 }, /* GL_INT_VEC2 */
4506+ { 12462, 0x00008B53 }, /* GL_INT_VEC2_ARB */
4507+ { 12478, 0x00008B54 }, /* GL_INT_VEC3 */
4508+ { 12490, 0x00008B54 }, /* GL_INT_VEC3_ARB */
4509+ { 12506, 0x00008B55 }, /* GL_INT_VEC4 */
4510+ { 12518, 0x00008B55 }, /* GL_INT_VEC4_ARB */
4511+ { 12534, 0x00000500 }, /* GL_INVALID_ENUM */
4512+ { 12550, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
4513+ { 12587, 0x00000502 }, /* GL_INVALID_OPERATION */
4514+ { 12608, 0x00000501 }, /* GL_INVALID_VALUE */
4515+ { 12625, 0x0000862B }, /* GL_INVERSE_NV */
4516+ { 12639, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */
4517+ { 12663, 0x0000150A }, /* GL_INVERT */
4518+ { 12673, 0x00001E00 }, /* GL_KEEP */
4519+ { 12681, 0x00000406 }, /* GL_LEFT */
4520+ { 12689, 0x00000203 }, /* GL_LEQUAL */
4521+ { 12699, 0x00000201 }, /* GL_LESS */
4522+ { 12707, 0x00004000 }, /* GL_LIGHT0 */
4523+ { 12717, 0x00004001 }, /* GL_LIGHT1 */
4524+ { 12727, 0x00004002 }, /* GL_LIGHT2 */
4525+ { 12737, 0x00004003 }, /* GL_LIGHT3 */
4526+ { 12747, 0x00004004 }, /* GL_LIGHT4 */
4527+ { 12757, 0x00004005 }, /* GL_LIGHT5 */
4528+ { 12767, 0x00004006 }, /* GL_LIGHT6 */
4529+ { 12777, 0x00004007 }, /* GL_LIGHT7 */
4530+ { 12787, 0x00000B50 }, /* GL_LIGHTING */
4531+ { 12799, 0x00000040 }, /* GL_LIGHTING_BIT */
4532+ { 12815, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */
4533+ { 12838, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */
4534+ { 12867, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */
4535+ { 12900, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
4536+ { 12928, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */
4537+ { 12952, 0x00001B01 }, /* GL_LINE */
4538+ { 12960, 0x00002601 }, /* GL_LINEAR */
4539+ { 12970, 0x00001208 }, /* GL_LINEAR_ATTENUATION */
4540+ { 12992, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
4541+ { 13022, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
4542+ { 13053, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */
4543+ { 13077, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */
4544+ { 13102, 0x00000001 }, /* GL_LINES */
4545+ { 13111, 0x00000004 }, /* GL_LINE_BIT */
4546+ { 13123, 0x00000002 }, /* GL_LINE_LOOP */
4547+ { 13136, 0x00000707 }, /* GL_LINE_RESET_TOKEN */
4548+ { 13156, 0x00000B20 }, /* GL_LINE_SMOOTH */
4549+ { 13171, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */
4550+ { 13191, 0x00000B24 }, /* GL_LINE_STIPPLE */
4551+ { 13207, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */
4552+ { 13231, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */
4553+ { 13254, 0x00000003 }, /* GL_LINE_STRIP */
4554+ { 13268, 0x00000702 }, /* GL_LINE_TOKEN */
4555+ { 13282, 0x00000B21 }, /* GL_LINE_WIDTH */
4556+ { 13296, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */
4557+ { 13322, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */
4558+ { 13342, 0x00008B82 }, /* GL_LINK_STATUS */
4559+ { 13357, 0x00000B32 }, /* GL_LIST_BASE */
4560+ { 13370, 0x00020000 }, /* GL_LIST_BIT */
4561+ { 13382, 0x00000B33 }, /* GL_LIST_INDEX */
4562+ { 13396, 0x00000B30 }, /* GL_LIST_MODE */
4563+ { 13409, 0x00000101 }, /* GL_LOAD */
4564+ { 13417, 0x00000BF1 }, /* GL_LOGIC_OP */
4565+ { 13429, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */
4566+ { 13446, 0x00008CA1 }, /* GL_LOWER_LEFT */
4567+ { 13460, 0x00001909 }, /* GL_LUMINANCE */
4568+ { 13473, 0x00008041 }, /* GL_LUMINANCE12 */
4569+ { 13488, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */
4570+ { 13511, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */
4571+ { 13538, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */
4572+ { 13560, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */
4573+ { 13586, 0x00008041 }, /* GL_LUMINANCE12_EXT */
4574+ { 13605, 0x00008042 }, /* GL_LUMINANCE16 */
4575+ { 13620, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */
4576+ { 13643, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */
4577+ { 13670, 0x00008042 }, /* GL_LUMINANCE16_EXT */
4578+ { 13689, 0x0000803F }, /* GL_LUMINANCE4 */
4579+ { 13703, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */
4580+ { 13724, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */
4581+ { 13749, 0x0000803F }, /* GL_LUMINANCE4_EXT */
4582+ { 13767, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */
4583+ { 13788, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */
4584+ { 13813, 0x00008040 }, /* GL_LUMINANCE8 */
4585+ { 13827, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */
4586+ { 13848, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */
4587+ { 13873, 0x00008040 }, /* GL_LUMINANCE8_EXT */
4588+ { 13891, 0x0000190A }, /* GL_LUMINANCE_ALPHA */
4589+ { 13910, 0x00000D90 }, /* GL_MAP1_COLOR_4 */
4590+ { 13926, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */
4591+ { 13946, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */
4592+ { 13968, 0x00000D91 }, /* GL_MAP1_INDEX */
4593+ { 13982, 0x00000D92 }, /* GL_MAP1_NORMAL */
4594+ { 13997, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */
4595+ { 14021, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */
4596+ { 14045, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */
4597+ { 14069, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */
4598+ { 14093, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */
4599+ { 14110, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */
4600+ { 14127, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
4601+ { 14155, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
4602+ { 14184, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
4603+ { 14213, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
4604+ { 14242, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
4605+ { 14271, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
4606+ { 14300, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
4607+ { 14329, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
4608+ { 14357, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
4609+ { 14385, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
4610+ { 14413, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
4611+ { 14441, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
4612+ { 14469, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
4613+ { 14497, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
4614+ { 14525, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
4615+ { 14553, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
4616+ { 14581, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */
4617+ { 14597, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */
4618+ { 14617, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */
4619+ { 14639, 0x00000DB1 }, /* GL_MAP2_INDEX */
4620+ { 14653, 0x00000DB2 }, /* GL_MAP2_NORMAL */
4621+ { 14668, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */
4622+ { 14692, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */
4623+ { 14716, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */
4624+ { 14740, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */
4625+ { 14764, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */
4626+ { 14781, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */
4627+ { 14798, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
4628+ { 14826, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
4629+ { 14855, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
4630+ { 14884, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
4631+ { 14913, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
4632+ { 14942, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
4633+ { 14971, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
4634+ { 15000, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
4635+ { 15028, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
4636+ { 15056, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
4637+ { 15084, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
4638+ { 15112, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
4639+ { 15140, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
4640+ { 15168, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */
4641+ { 15196, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
4642+ { 15224, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
4643+ { 15252, 0x00000D10 }, /* GL_MAP_COLOR */
4644+ { 15265, 0x00000D11 }, /* GL_MAP_STENCIL */
4645+ { 15280, 0x000088C0 }, /* GL_MATRIX0_ARB */
4646+ { 15295, 0x00008630 }, /* GL_MATRIX0_NV */
4647+ { 15309, 0x000088CA }, /* GL_MATRIX10_ARB */
4648+ { 15325, 0x000088CB }, /* GL_MATRIX11_ARB */
4649+ { 15341, 0x000088CC }, /* GL_MATRIX12_ARB */
4650+ { 15357, 0x000088CD }, /* GL_MATRIX13_ARB */
4651+ { 15373, 0x000088CE }, /* GL_MATRIX14_ARB */
4652+ { 15389, 0x000088CF }, /* GL_MATRIX15_ARB */
4653+ { 15405, 0x000088D0 }, /* GL_MATRIX16_ARB */
4654+ { 15421, 0x000088D1 }, /* GL_MATRIX17_ARB */
4655+ { 15437, 0x000088D2 }, /* GL_MATRIX18_ARB */
4656+ { 15453, 0x000088D3 }, /* GL_MATRIX19_ARB */
4657+ { 15469, 0x000088C1 }, /* GL_MATRIX1_ARB */
4658+ { 15484, 0x00008631 }, /* GL_MATRIX1_NV */
4659+ { 15498, 0x000088D4 }, /* GL_MATRIX20_ARB */
4660+ { 15514, 0x000088D5 }, /* GL_MATRIX21_ARB */
4661+ { 15530, 0x000088D6 }, /* GL_MATRIX22_ARB */
4662+ { 15546, 0x000088D7 }, /* GL_MATRIX23_ARB */
4663+ { 15562, 0x000088D8 }, /* GL_MATRIX24_ARB */
4664+ { 15578, 0x000088D9 }, /* GL_MATRIX25_ARB */
4665+ { 15594, 0x000088DA }, /* GL_MATRIX26_ARB */
4666+ { 15610, 0x000088DB }, /* GL_MATRIX27_ARB */
4667+ { 15626, 0x000088DC }, /* GL_MATRIX28_ARB */
4668+ { 15642, 0x000088DD }, /* GL_MATRIX29_ARB */
4669+ { 15658, 0x000088C2 }, /* GL_MATRIX2_ARB */
4670+ { 15673, 0x00008632 }, /* GL_MATRIX2_NV */
4671+ { 15687, 0x000088DE }, /* GL_MATRIX30_ARB */
4672+ { 15703, 0x000088DF }, /* GL_MATRIX31_ARB */
4673+ { 15719, 0x000088C3 }, /* GL_MATRIX3_ARB */
4674+ { 15734, 0x00008633 }, /* GL_MATRIX3_NV */
4675+ { 15748, 0x000088C4 }, /* GL_MATRIX4_ARB */
4676+ { 15763, 0x00008634 }, /* GL_MATRIX4_NV */
4677+ { 15777, 0x000088C5 }, /* GL_MATRIX5_ARB */
4678+ { 15792, 0x00008635 }, /* GL_MATRIX5_NV */
4679+ { 15806, 0x000088C6 }, /* GL_MATRIX6_ARB */
4680+ { 15821, 0x00008636 }, /* GL_MATRIX6_NV */
4681+ { 15835, 0x000088C7 }, /* GL_MATRIX7_ARB */
4682+ { 15850, 0x00008637 }, /* GL_MATRIX7_NV */
4683+ { 15864, 0x000088C8 }, /* GL_MATRIX8_ARB */
4684+ { 15879, 0x000088C9 }, /* GL_MATRIX9_ARB */
4685+ { 15894, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */
4686+ { 15920, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
4687+ { 15954, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
4688+ { 15985, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
4689+ { 16018, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
4690+ { 16049, 0x00000BA0 }, /* GL_MATRIX_MODE */
4691+ { 16064, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */
4692+ { 16086, 0x00008008 }, /* GL_MAX */
4693+ { 16093, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */
4694+ { 16116, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
4695+ { 16148, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */
4696+ { 16174, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
4697+ { 16207, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
4698+ { 16233, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
4699+ { 16267, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */
4700+ { 16286, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
4701+ { 16315, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
4702+ { 16347, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */
4703+ { 16383, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
4704+ { 16419, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
4705+ { 16459, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */
4706+ { 16485, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */
4707+ { 16515, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */
4708+ { 16540, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */
4709+ { 16569, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
4710+ { 16598, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */
4711+ { 16631, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */
4712+ { 16651, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */
4713+ { 16675, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */
4714+ { 16699, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */
4715+ { 16723, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */
4716+ { 16748, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */
4717+ { 16766, 0x00008008 }, /* GL_MAX_EXT */
4718+ { 16777, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
4719+ { 16812, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
4720+ { 16851, 0x00000D31 }, /* GL_MAX_LIGHTS */
4721+ { 16865, 0x00000B31 }, /* GL_MAX_LIST_NESTING */
4722+ { 16885, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
4723+ { 16923, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */
4724+ { 16952, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */
4725+ { 16976, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */
4726+ { 17004, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */
4727+ { 17027, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
4728+ { 17064, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
4729+ { 17100, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
4730+ { 17127, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
4731+ { 17156, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
4732+ { 17190, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
4733+ { 17226, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
4734+ { 17253, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
4735+ { 17285, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
4736+ { 17321, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
4737+ { 17350, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
4738+ { 17379, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */
4739+ { 17407, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
4740+ { 17445, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
4741+ { 17489, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
4742+ { 17532, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
4743+ { 17566, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
4744+ { 17605, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
4745+ { 17642, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
4746+ { 17680, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
4747+ { 17723, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
4748+ { 17766, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
4749+ { 17796, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
4750+ { 17827, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
4751+ { 17863, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
4752+ { 17899, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */
4753+ { 17929, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
4754+ { 17963, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */
4755+ { 17996, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
4756+ { 18025, 0x00008504 }, /* GL_MAX_SHININESS_NV */
4757+ { 18045, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */
4758+ { 18069, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */
4759+ { 18091, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */
4760+ { 18117, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */
4761+ { 18144, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
4762+ { 18175, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */
4763+ { 18199, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
4764+ { 18233, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */
4765+ { 18253, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */
4766+ { 18280, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */
4767+ { 18301, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */
4768+ { 18326, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */
4769+ { 18351, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
4770+ { 18386, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */
4771+ { 18408, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */
4772+ { 18434, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */
4773+ { 18456, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */
4774+ { 18482, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
4775+ { 18516, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
4776+ { 18554, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
4777+ { 18587, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
4778+ { 18624, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */
4779+ { 18648, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */
4780+ { 18669, 0x00008007 }, /* GL_MIN */
4781+ { 18676, 0x0000802E }, /* GL_MINMAX */
4782+ { 18686, 0x0000802E }, /* GL_MINMAX_EXT */
4783+ { 18700, 0x0000802F }, /* GL_MINMAX_FORMAT */
4784+ { 18717, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */
4785+ { 18738, 0x00008030 }, /* GL_MINMAX_SINK */
4786+ { 18753, 0x00008030 }, /* GL_MINMAX_SINK_EXT */
4787+ { 18772, 0x00008007 }, /* GL_MIN_EXT */
4788+ { 18783, 0x00008370 }, /* GL_MIRRORED_REPEAT */
4789+ { 18802, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */
4790+ { 18825, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */
4791+ { 18848, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */
4792+ { 18868, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */
4793+ { 18888, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
4794+ { 18918, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */
4795+ { 18946, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
4796+ { 18974, 0x00001700 }, /* GL_MODELVIEW */
4797+ { 18987, 0x00001700 }, /* GL_MODELVIEW0_ARB */
4798+ { 19005, 0x0000872A }, /* GL_MODELVIEW10_ARB */
4799+ { 19024, 0x0000872B }, /* GL_MODELVIEW11_ARB */
4800+ { 19043, 0x0000872C }, /* GL_MODELVIEW12_ARB */
4801+ { 19062, 0x0000872D }, /* GL_MODELVIEW13_ARB */
4802+ { 19081, 0x0000872E }, /* GL_MODELVIEW14_ARB */
4803+ { 19100, 0x0000872F }, /* GL_MODELVIEW15_ARB */
4804+ { 19119, 0x00008730 }, /* GL_MODELVIEW16_ARB */
4805+ { 19138, 0x00008731 }, /* GL_MODELVIEW17_ARB */
4806+ { 19157, 0x00008732 }, /* GL_MODELVIEW18_ARB */
4807+ { 19176, 0x00008733 }, /* GL_MODELVIEW19_ARB */
4808+ { 19195, 0x0000850A }, /* GL_MODELVIEW1_ARB */
4809+ { 19213, 0x00008734 }, /* GL_MODELVIEW20_ARB */
4810+ { 19232, 0x00008735 }, /* GL_MODELVIEW21_ARB */
4811+ { 19251, 0x00008736 }, /* GL_MODELVIEW22_ARB */
4812+ { 19270, 0x00008737 }, /* GL_MODELVIEW23_ARB */
4813+ { 19289, 0x00008738 }, /* GL_MODELVIEW24_ARB */
4814+ { 19308, 0x00008739 }, /* GL_MODELVIEW25_ARB */
4815+ { 19327, 0x0000873A }, /* GL_MODELVIEW26_ARB */
4816+ { 19346, 0x0000873B }, /* GL_MODELVIEW27_ARB */
4817+ { 19365, 0x0000873C }, /* GL_MODELVIEW28_ARB */
4818+ { 19384, 0x0000873D }, /* GL_MODELVIEW29_ARB */
4819+ { 19403, 0x00008722 }, /* GL_MODELVIEW2_ARB */
4820+ { 19421, 0x0000873E }, /* GL_MODELVIEW30_ARB */
4821+ { 19440, 0x0000873F }, /* GL_MODELVIEW31_ARB */
4822+ { 19459, 0x00008723 }, /* GL_MODELVIEW3_ARB */
4823+ { 19477, 0x00008724 }, /* GL_MODELVIEW4_ARB */
4824+ { 19495, 0x00008725 }, /* GL_MODELVIEW5_ARB */
4825+ { 19513, 0x00008726 }, /* GL_MODELVIEW6_ARB */
4826+ { 19531, 0x00008727 }, /* GL_MODELVIEW7_ARB */
4827+ { 19549, 0x00008728 }, /* GL_MODELVIEW8_ARB */
4828+ { 19567, 0x00008729 }, /* GL_MODELVIEW9_ARB */
4829+ { 19585, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */
4830+ { 19605, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */
4831+ { 19632, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */
4832+ { 19657, 0x00002100 }, /* GL_MODULATE */
4833+ { 19669, 0x00008744 }, /* GL_MODULATE_ADD_ATI */
4834+ { 19689, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */
4835+ { 19716, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */
4836+ { 19741, 0x00000103 }, /* GL_MULT */
4837+ { 19749, 0x0000809D }, /* GL_MULTISAMPLE */
4838+ { 19764, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */
4839+ { 19784, 0x0000809D }, /* GL_MULTISAMPLE_ARB */
4840+ { 19803, 0x20000000 }, /* GL_MULTISAMPLE_BIT */
4841+ { 19822, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */
4842+ { 19846, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */
4843+ { 19869, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */
4844+ { 19899, 0x00002A25 }, /* GL_N3F_V3F */
4845+ { 19910, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */
4846+ { 19930, 0x0000150E }, /* GL_NAND */
4847+ { 19938, 0x00002600 }, /* GL_NEAREST */
4848+ { 19949, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
4849+ { 19980, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
4850+ { 20012, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */
4851+ { 20037, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */
4852+ { 20063, 0x00000200 }, /* GL_NEVER */
4853+ { 20072, 0x00001102 }, /* GL_NICEST */
4854+ { 20082, 0x00000000 }, /* GL_NONE */
4855+ { 20090, 0x00001505 }, /* GL_NOOP */
4856+ { 20098, 0x00001508 }, /* GL_NOR */
4857+ { 20105, 0x00000BA1 }, /* GL_NORMALIZE */
4858+ { 20118, 0x00008075 }, /* GL_NORMAL_ARRAY */
4859+ { 20134, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
4860+ { 20165, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */
4861+ { 20200, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */
4862+ { 20224, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */
4863+ { 20247, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */
4864+ { 20268, 0x00008511 }, /* GL_NORMAL_MAP */
4865+ { 20282, 0x00008511 }, /* GL_NORMAL_MAP_ARB */
4866+ { 20300, 0x00008511 }, /* GL_NORMAL_MAP_NV */
4867+ { 20317, 0x00000205 }, /* GL_NOTEQUAL */
4868+ { 20329, 0x00000000 }, /* GL_NO_ERROR */
4869+ { 20341, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
4870+ { 20375, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */
4871+ { 20413, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
4872+ { 20445, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
4873+ { 20487, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
4874+ { 20517, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
4875+ { 20557, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
4876+ { 20588, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */
4877+ { 20617, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */
4878+ { 20645, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
4879+ { 20675, 0x00002401 }, /* GL_OBJECT_LINEAR */
4880+ { 20692, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */
4881+ { 20718, 0x00002501 }, /* GL_OBJECT_PLANE */
4882+ { 20734, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
4883+ { 20769, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */
4884+ { 20791, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */
4885+ { 20810, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */
4886+ { 20840, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */
4887+ { 20861, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */
4888+ { 20889, 0x00000001 }, /* GL_ONE */
4889+ { 20896, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */
4890+ { 20924, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */
4891+ { 20956, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */
4892+ { 20984, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */
4893+ { 21016, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */
4894+ { 21039, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */
4895+ { 21062, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */
4896+ { 21085, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */
4897+ { 21108, 0x00008598 }, /* GL_OPERAND0_ALPHA */
4898+ { 21126, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */
4899+ { 21148, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */
4900+ { 21170, 0x00008590 }, /* GL_OPERAND0_RGB */
4901+ { 21186, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */
4902+ { 21206, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */
4903+ { 21226, 0x00008599 }, /* GL_OPERAND1_ALPHA */
4904+ { 21244, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */
4905+ { 21266, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */
4906+ { 21288, 0x00008591 }, /* GL_OPERAND1_RGB */
4907+ { 21304, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */
4908+ { 21324, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */
4909+ { 21344, 0x0000859A }, /* GL_OPERAND2_ALPHA */
4910+ { 21362, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */
4911+ { 21384, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */
4912+ { 21406, 0x00008592 }, /* GL_OPERAND2_RGB */
4913+ { 21422, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */
4914+ { 21442, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */
4915+ { 21462, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */
4916+ { 21483, 0x00008593 }, /* GL_OPERAND3_RGB_NV */
4917+ { 21502, 0x00001507 }, /* GL_OR */
4918+ { 21508, 0x00000A01 }, /* GL_ORDER */
4919+ { 21517, 0x0000150D }, /* GL_OR_INVERTED */
4920+ { 21532, 0x0000150B }, /* GL_OR_REVERSE */
4921+ { 21546, 0x00000505 }, /* GL_OUT_OF_MEMORY */
4922+ { 21563, 0x00000D05 }, /* GL_PACK_ALIGNMENT */
4923+ { 21581, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */
4924+ { 21602, 0x00008758 }, /* GL_PACK_INVERT_MESA */
4925+ { 21622, 0x00000D01 }, /* GL_PACK_LSB_FIRST */
4926+ { 21640, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */
4927+ { 21659, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */
4928+ { 21679, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */
4929+ { 21699, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */
4930+ { 21717, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */
4931+ { 21736, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */
4932+ { 21761, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */
4933+ { 21785, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */
4934+ { 21806, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */
4935+ { 21828, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */
4936+ { 21850, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */
4937+ { 21875, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */
4938+ { 21899, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */
4939+ { 21920, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */
4940+ { 21942, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */
4941+ { 21964, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */
4942+ { 21986, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */
4943+ { 22017, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */
4944+ { 22037, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */
4945+ { 22062, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */
4946+ { 22082, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */
4947+ { 22107, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */
4948+ { 22127, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */
4949+ { 22152, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */
4950+ { 22172, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */
4951+ { 22197, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */
4952+ { 22217, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */
4953+ { 22242, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */
4954+ { 22262, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */
4955+ { 22287, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */
4956+ { 22307, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */
4957+ { 22332, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */
4958+ { 22352, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */
4959+ { 22377, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */
4960+ { 22397, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */
4961+ { 22422, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */
4962+ { 22442, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */
4963+ { 22467, 0x00000020 }, /* GL_PIXEL_MODE_BIT */
4964+ { 22485, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
4965+ { 22518, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */
4966+ { 22543, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
4967+ { 22578, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */
4968+ { 22605, 0x00001B00 }, /* GL_POINT */
4969+ { 22614, 0x00000000 }, /* GL_POINTS */
4970+ { 22624, 0x00000002 }, /* GL_POINT_BIT */
4971+ { 22637, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */
4972+ { 22667, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */
4973+ { 22701, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */
4974+ { 22735, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */
4975+ { 22770, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */
4976+ { 22799, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */
4977+ { 22832, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */
4978+ { 22865, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */
4979+ { 22899, 0x00000B11 }, /* GL_POINT_SIZE */
4980+ { 22913, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */
4981+ { 22939, 0x00008127 }, /* GL_POINT_SIZE_MAX */
4982+ { 22957, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */
4983+ { 22979, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */
4984+ { 23001, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */
4985+ { 23024, 0x00008126 }, /* GL_POINT_SIZE_MIN */
4986+ { 23042, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */
4987+ { 23064, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */
4988+ { 23086, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */
4989+ { 23109, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */
4990+ { 23129, 0x00000B10 }, /* GL_POINT_SMOOTH */
4991+ { 23145, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */
4992+ { 23166, 0x00008861 }, /* GL_POINT_SPRITE */
4993+ { 23182, 0x00008861 }, /* GL_POINT_SPRITE_ARB */
4994+ { 23202, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */
4995+ { 23231, 0x00008861 }, /* GL_POINT_SPRITE_NV */
4996+ { 23250, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */
4997+ { 23276, 0x00000701 }, /* GL_POINT_TOKEN */
4998+ { 23291, 0x00000009 }, /* GL_POLYGON */
4999+ { 23302, 0x00000008 }, /* GL_POLYGON_BIT */
5000+ { 23317, 0x00000B40 }, /* GL_POLYGON_MODE */
5001+ { 23333, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */
5002+ { 23356, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */
5003+ { 23381, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */
5004+ { 23404, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */
5005+ { 23427, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */
5006+ { 23451, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */
5007+ { 23475, 0x00000B41 }, /* GL_POLYGON_SMOOTH */
5008+ { 23493, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */
5009+ { 23516, 0x00000B42 }, /* GL_POLYGON_STIPPLE */
5010+ { 23535, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */
5011+ { 23558, 0x00000703 }, /* GL_POLYGON_TOKEN */
5012+ { 23575, 0x00001203 }, /* GL_POSITION */
5013+ { 23587, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
5014+ { 23619, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */
5015+ { 23655, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
5016+ { 23688, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */
5017+ { 23725, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
5018+ { 23756, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */
5019+ { 23791, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
5020+ { 23823, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */
5021+ { 23859, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
5022+ { 23892, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
5023+ { 23924, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */
5024+ { 23960, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
5025+ { 23993, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */
5026+ { 24030, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */
5027+ { 24060, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */
5028+ { 24094, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */
5029+ { 24125, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */
5030+ { 24160, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
5031+ { 24191, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */
5032+ { 24226, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
5033+ { 24258, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */
5034+ { 24294, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */
5035+ { 24324, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */
5036+ { 24358, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */
5037+ { 24389, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */
5038+ { 24424, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */
5039+ { 24456, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */
5040+ { 24487, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */
5041+ { 24522, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */
5042+ { 24554, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */
5043+ { 24590, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */
5044+ { 24619, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */
5045+ { 24652, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */
5046+ { 24682, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */
5047+ { 24716, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
5048+ { 24755, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
5049+ { 24788, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
5050+ { 24828, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
5051+ { 24862, 0x00008578 }, /* GL_PREVIOUS */
5052+ { 24874, 0x00008578 }, /* GL_PREVIOUS_ARB */
5053+ { 24890, 0x00008578 }, /* GL_PREVIOUS_EXT */
5054+ { 24906, 0x00008577 }, /* GL_PRIMARY_COLOR */
5055+ { 24923, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */
5056+ { 24944, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */
5057+ { 24965, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
5058+ { 24998, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
5059+ { 25030, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */
5060+ { 25053, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */
5061+ { 25076, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */
5062+ { 25106, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */
5063+ { 25135, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */
5064+ { 25163, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */
5065+ { 25185, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */
5066+ { 25213, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */
5067+ { 25241, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */
5068+ { 25263, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */
5069+ { 25284, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
5070+ { 25324, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
5071+ { 25363, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
5072+ { 25393, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
5073+ { 25428, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
5074+ { 25461, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
5075+ { 25495, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
5076+ { 25534, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
5077+ { 25573, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */
5078+ { 25595, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */
5079+ { 25621, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */
5080+ { 25645, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */
5081+ { 25668, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */
5082+ { 25690, 0x00008628 }, /* GL_PROGRAM_STRING_NV */
5083+ { 25711, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */
5084+ { 25732, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */
5085+ { 25759, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
5086+ { 25791, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
5087+ { 25823, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
5088+ { 25858, 0x00001701 }, /* GL_PROJECTION */
5089+ { 25872, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */
5090+ { 25893, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */
5091+ { 25919, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */
5092+ { 25940, 0x00008025 }, /* GL_PROXY_HISTOGRAM */
5093+ { 25959, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */
5094+ { 25982, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
5095+ { 26021, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
5096+ { 26059, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */
5097+ { 26079, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
5098+ { 26109, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */
5099+ { 26133, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */
5100+ { 26153, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
5101+ { 26183, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */
5102+ { 26207, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */
5103+ { 26227, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
5104+ { 26260, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */
5105+ { 26286, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */
5106+ { 26316, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
5107+ { 26347, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */
5108+ { 26377, 0x00002003 }, /* GL_Q */
5109+ { 26382, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */
5110+ { 26407, 0x00000007 }, /* GL_QUADS */
5111+ { 26416, 0x00008614 }, /* GL_QUAD_MESH_SUN */
5112+ { 26433, 0x00000008 }, /* GL_QUAD_STRIP */
5113+ { 26447, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */
5114+ { 26469, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */
5115+ { 26495, 0x00008866 }, /* GL_QUERY_RESULT */
5116+ { 26511, 0x00008866 }, /* GL_QUERY_RESULT_ARB */
5117+ { 26531, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */
5118+ { 26557, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */
5119+ { 26587, 0x00002002 }, /* GL_R */
5120+ { 26592, 0x00002A10 }, /* GL_R3_G3_B2 */
5121+ { 26604, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
5122+ { 26637, 0x00000C02 }, /* GL_READ_BUFFER */
5123+ { 26652, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
5124+ { 26684, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */
5125+ { 26708, 0x000088B8 }, /* GL_READ_ONLY */
5126+ { 26721, 0x000088B8 }, /* GL_READ_ONLY_ARB */
5127+ { 26738, 0x000088BA }, /* GL_READ_WRITE */
5128+ { 26752, 0x000088BA }, /* GL_READ_WRITE_ARB */
5129+ { 26770, 0x00001903 }, /* GL_RED */
5130+ { 26777, 0x00008016 }, /* GL_REDUCE */
5131+ { 26787, 0x00008016 }, /* GL_REDUCE_EXT */
5132+ { 26801, 0x00000D15 }, /* GL_RED_BIAS */
5133+ { 26813, 0x00000D52 }, /* GL_RED_BITS */
5134+ { 26825, 0x00000D14 }, /* GL_RED_SCALE */
5135+ { 26838, 0x00008512 }, /* GL_REFLECTION_MAP */
5136+ { 26856, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */
5137+ { 26878, 0x00008512 }, /* GL_REFLECTION_MAP_NV */
5138+ { 26899, 0x00001C00 }, /* GL_RENDER */
5139+ { 26909, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */
5140+ { 26937, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */
5141+ { 26957, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */
5142+ { 26984, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
5143+ { 27020, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */
5144+ { 27046, 0x00001F01 }, /* GL_RENDERER */
5145+ { 27058, 0x00000C40 }, /* GL_RENDER_MODE */
5146+ { 27073, 0x00002901 }, /* GL_REPEAT */
5147+ { 27083, 0x00001E01 }, /* GL_REPLACE */
5148+ { 27094, 0x00008062 }, /* GL_REPLACE_EXT */
5149+ { 27109, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */
5150+ { 27132, 0x0000803A }, /* GL_RESCALE_NORMAL */
5151+ { 27150, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */
5152+ { 27172, 0x00000102 }, /* GL_RETURN */
5153+ { 27182, 0x00001907 }, /* GL_RGB */
5154+ { 27189, 0x00008052 }, /* GL_RGB10 */
5155+ { 27198, 0x00008059 }, /* GL_RGB10_A2 */
5156+ { 27210, 0x00008059 }, /* GL_RGB10_A2_EXT */
5157+ { 27226, 0x00008052 }, /* GL_RGB10_EXT */
5158+ { 27239, 0x00008053 }, /* GL_RGB12 */
5159+ { 27248, 0x00008053 }, /* GL_RGB12_EXT */
5160+ { 27261, 0x00008054 }, /* GL_RGB16 */
5161+ { 27270, 0x00008054 }, /* GL_RGB16_EXT */
5162+ { 27283, 0x0000804E }, /* GL_RGB2_EXT */
5163+ { 27295, 0x0000804F }, /* GL_RGB4 */
5164+ { 27303, 0x0000804F }, /* GL_RGB4_EXT */
5165+ { 27315, 0x000083A1 }, /* GL_RGB4_S3TC */
5166+ { 27328, 0x00008050 }, /* GL_RGB5 */
5167+ { 27336, 0x00008057 }, /* GL_RGB5_A1 */
5168+ { 27347, 0x00008057 }, /* GL_RGB5_A1_EXT */
5169+ { 27362, 0x00008050 }, /* GL_RGB5_EXT */
5170+ { 27374, 0x00008051 }, /* GL_RGB8 */
5171+ { 27382, 0x00008051 }, /* GL_RGB8_EXT */
5172+ { 27394, 0x00001908 }, /* GL_RGBA */
5173+ { 27402, 0x0000805A }, /* GL_RGBA12 */
5174+ { 27412, 0x0000805A }, /* GL_RGBA12_EXT */
5175+ { 27426, 0x0000805B }, /* GL_RGBA16 */
5176+ { 27436, 0x0000805B }, /* GL_RGBA16_EXT */
5177+ { 27450, 0x00008055 }, /* GL_RGBA2 */
5178+ { 27459, 0x00008055 }, /* GL_RGBA2_EXT */
5179+ { 27472, 0x00008056 }, /* GL_RGBA4 */
5180+ { 27481, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */
5181+ { 27500, 0x00008056 }, /* GL_RGBA4_EXT */
5182+ { 27513, 0x000083A3 }, /* GL_RGBA4_S3TC */
5183+ { 27527, 0x00008058 }, /* GL_RGBA8 */
5184+ { 27536, 0x00008058 }, /* GL_RGBA8_EXT */
5185+ { 27549, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */
5186+ { 27567, 0x00000C31 }, /* GL_RGBA_MODE */
5187+ { 27580, 0x000083A2 }, /* GL_RGBA_S3TC */
5188+ { 27593, 0x000083A0 }, /* GL_RGB_S3TC */
5189+ { 27605, 0x00008573 }, /* GL_RGB_SCALE */
5190+ { 27618, 0x00008573 }, /* GL_RGB_SCALE_ARB */
5191+ { 27635, 0x00008573 }, /* GL_RGB_SCALE_EXT */
5192+ { 27652, 0x00000407 }, /* GL_RIGHT */
5193+ { 27661, 0x00002000 }, /* GL_S */
5194+ { 27666, 0x00008B5D }, /* GL_SAMPLER_1D */
5195+ { 27680, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */
5196+ { 27701, 0x00008B5E }, /* GL_SAMPLER_2D */
5197+ { 27715, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */
5198+ { 27736, 0x00008B5F }, /* GL_SAMPLER_3D */
5199+ { 27750, 0x00008B60 }, /* GL_SAMPLER_CUBE */
5200+ { 27766, 0x000080A9 }, /* GL_SAMPLES */
5201+ { 27777, 0x000086B4 }, /* GL_SAMPLES_3DFX */
5202+ { 27793, 0x000080A9 }, /* GL_SAMPLES_ARB */
5203+ { 27808, 0x00008914 }, /* GL_SAMPLES_PASSED */
5204+ { 27826, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */
5205+ { 27848, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
5206+ { 27876, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */
5207+ { 27908, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */
5208+ { 27931, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */
5209+ { 27958, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */
5210+ { 27976, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */
5211+ { 27999, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */
5212+ { 28021, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */
5213+ { 28040, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */
5214+ { 28063, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */
5215+ { 28089, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */
5216+ { 28119, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */
5217+ { 28144, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */
5218+ { 28173, 0x00080000 }, /* GL_SCISSOR_BIT */
5219+ { 28188, 0x00000C10 }, /* GL_SCISSOR_BOX */
5220+ { 28203, 0x00000C11 }, /* GL_SCISSOR_TEST */
5221+ { 28219, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */
5222+ { 28244, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
5223+ { 28284, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */
5224+ { 28328, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
5225+ { 28361, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
5226+ { 28391, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
5227+ { 28423, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
5228+ { 28453, 0x00001C02 }, /* GL_SELECT */
5229+ { 28463, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */
5230+ { 28491, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */
5231+ { 28516, 0x00008012 }, /* GL_SEPARABLE_2D */
5232+ { 28532, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */
5233+ { 28559, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */
5234+ { 28590, 0x0000150F }, /* GL_SET */
5235+ { 28597, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */
5236+ { 28618, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */
5237+ { 28642, 0x00008B4F }, /* GL_SHADER_TYPE */
5238+ { 28657, 0x00000B54 }, /* GL_SHADE_MODEL */
5239+ { 28672, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */
5240+ { 28700, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */
5241+ { 28723, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */
5242+ { 28753, 0x00001601 }, /* GL_SHININESS */
5243+ { 28766, 0x00001402 }, /* GL_SHORT */
5244+ { 28775, 0x000081F9 }, /* GL_SINGLE_COLOR */
5245+ { 28791, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */
5246+ { 28811, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */
5247+ { 28830, 0x00001D01 }, /* GL_SMOOTH */
5248+ { 28840, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */
5249+ { 28873, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */
5250+ { 28900, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */
5251+ { 28933, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */
5252+ { 28960, 0x00008588 }, /* GL_SOURCE0_ALPHA */
5253+ { 28977, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */
5254+ { 28998, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */
5255+ { 29019, 0x00008580 }, /* GL_SOURCE0_RGB */
5256+ { 29034, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */
5257+ { 29053, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */
5258+ { 29072, 0x00008589 }, /* GL_SOURCE1_ALPHA */
5259+ { 29089, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */
5260+ { 29110, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */
5261+ { 29131, 0x00008581 }, /* GL_SOURCE1_RGB */
5262+ { 29146, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */
5263+ { 29165, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */
5264+ { 29184, 0x0000858A }, /* GL_SOURCE2_ALPHA */
5265+ { 29201, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */
5266+ { 29222, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */
5267+ { 29243, 0x00008582 }, /* GL_SOURCE2_RGB */
5268+ { 29258, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */
5269+ { 29277, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */
5270+ { 29296, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */
5271+ { 29316, 0x00008583 }, /* GL_SOURCE3_RGB_NV */
5272+ { 29334, 0x00001202 }, /* GL_SPECULAR */
5273+ { 29346, 0x00002402 }, /* GL_SPHERE_MAP */
5274+ { 29360, 0x00001206 }, /* GL_SPOT_CUTOFF */
5275+ { 29375, 0x00001204 }, /* GL_SPOT_DIRECTION */
5276+ { 29393, 0x00001205 }, /* GL_SPOT_EXPONENT */
5277+ { 29410, 0x00008588 }, /* GL_SRC0_ALPHA */
5278+ { 29424, 0x00008580 }, /* GL_SRC0_RGB */
5279+ { 29436, 0x00008589 }, /* GL_SRC1_ALPHA */
5280+ { 29450, 0x00008581 }, /* GL_SRC1_RGB */
5281+ { 29462, 0x0000858A }, /* GL_SRC2_ALPHA */
5282+ { 29476, 0x00008582 }, /* GL_SRC2_RGB */
5283+ { 29488, 0x00000302 }, /* GL_SRC_ALPHA */
5284+ { 29501, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */
5285+ { 29523, 0x00000300 }, /* GL_SRC_COLOR */
5286+ { 29536, 0x00000503 }, /* GL_STACK_OVERFLOW */
5287+ { 29554, 0x00000504 }, /* GL_STACK_UNDERFLOW */
5288+ { 29573, 0x000088E6 }, /* GL_STATIC_COPY */
5289+ { 29588, 0x000088E6 }, /* GL_STATIC_COPY_ARB */
5290+ { 29607, 0x000088E4 }, /* GL_STATIC_DRAW */
5291+ { 29622, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */
5292+ { 29641, 0x000088E5 }, /* GL_STATIC_READ */
5293+ { 29656, 0x000088E5 }, /* GL_STATIC_READ_ARB */
5294+ { 29675, 0x00001802 }, /* GL_STENCIL */
5295+ { 29686, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */
5296+ { 29712, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */
5297+ { 29733, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */
5298+ { 29754, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
5299+ { 29786, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
5300+ { 29818, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */
5301+ { 29838, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */
5302+ { 29865, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */
5303+ { 29891, 0x00000D57 }, /* GL_STENCIL_BITS */
5304+ { 29907, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */
5305+ { 29929, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */
5306+ { 29952, 0x00000B94 }, /* GL_STENCIL_FAIL */
5307+ { 29968, 0x00000B92 }, /* GL_STENCIL_FUNC */
5308+ { 29984, 0x00001901 }, /* GL_STENCIL_INDEX */
5309+ { 30001, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */
5310+ { 30024, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */
5311+ { 30046, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */
5312+ { 30068, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */
5313+ { 30090, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */
5314+ { 30111, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */
5315+ { 30138, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */
5316+ { 30165, 0x00000B97 }, /* GL_STENCIL_REF */
5317+ { 30180, 0x00000B90 }, /* GL_STENCIL_TEST */
5318+ { 30196, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
5319+ { 30225, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */
5320+ { 30247, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */
5321+ { 30268, 0x00000C33 }, /* GL_STEREO */
5322+ { 30278, 0x000088E2 }, /* GL_STREAM_COPY */
5323+ { 30293, 0x000088E2 }, /* GL_STREAM_COPY_ARB */
5324+ { 30312, 0x000088E0 }, /* GL_STREAM_DRAW */
5325+ { 30327, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */
5326+ { 30346, 0x000088E1 }, /* GL_STREAM_READ */
5327+ { 30361, 0x000088E1 }, /* GL_STREAM_READ_ARB */
5328+ { 30380, 0x00000D50 }, /* GL_SUBPIXEL_BITS */
5329+ { 30397, 0x000084E7 }, /* GL_SUBTRACT */
5330+ { 30409, 0x000084E7 }, /* GL_SUBTRACT_ARB */
5331+ { 30425, 0x00002001 }, /* GL_T */
5332+ { 30430, 0x00002A2A }, /* GL_T2F_C3F_V3F */
5333+ { 30445, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */
5334+ { 30464, 0x00002A29 }, /* GL_T2F_C4UB_V3F */
5335+ { 30480, 0x00002A2B }, /* GL_T2F_N3F_V3F */
5336+ { 30495, 0x00002A27 }, /* GL_T2F_V3F */
5337+ { 30506, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */
5338+ { 30525, 0x00002A28 }, /* GL_T4F_V4F */
5339+ { 30536, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */
5340+ { 30559, 0x00001702 }, /* GL_TEXTURE */
5341+ { 30570, 0x000084C0 }, /* GL_TEXTURE0 */
5342+ { 30582, 0x000084C0 }, /* GL_TEXTURE0_ARB */
5343+ { 30598, 0x000084C1 }, /* GL_TEXTURE1 */
5344+ { 30610, 0x000084CA }, /* GL_TEXTURE10 */
5345+ { 30623, 0x000084CA }, /* GL_TEXTURE10_ARB */
5346+ { 30640, 0x000084CB }, /* GL_TEXTURE11 */
5347+ { 30653, 0x000084CB }, /* GL_TEXTURE11_ARB */
5348+ { 30670, 0x000084CC }, /* GL_TEXTURE12 */
5349+ { 30683, 0x000084CC }, /* GL_TEXTURE12_ARB */
5350+ { 30700, 0x000084CD }, /* GL_TEXTURE13 */
5351+ { 30713, 0x000084CD }, /* GL_TEXTURE13_ARB */
5352+ { 30730, 0x000084CE }, /* GL_TEXTURE14 */
5353+ { 30743, 0x000084CE }, /* GL_TEXTURE14_ARB */
5354+ { 30760, 0x000084CF }, /* GL_TEXTURE15 */
5355+ { 30773, 0x000084CF }, /* GL_TEXTURE15_ARB */
5356+ { 30790, 0x000084D0 }, /* GL_TEXTURE16 */
5357+ { 30803, 0x000084D0 }, /* GL_TEXTURE16_ARB */
5358+ { 30820, 0x000084D1 }, /* GL_TEXTURE17 */
5359+ { 30833, 0x000084D1 }, /* GL_TEXTURE17_ARB */
5360+ { 30850, 0x000084D2 }, /* GL_TEXTURE18 */
5361+ { 30863, 0x000084D2 }, /* GL_TEXTURE18_ARB */
5362+ { 30880, 0x000084D3 }, /* GL_TEXTURE19 */
5363+ { 30893, 0x000084D3 }, /* GL_TEXTURE19_ARB */
5364+ { 30910, 0x000084C1 }, /* GL_TEXTURE1_ARB */
5365+ { 30926, 0x000084C2 }, /* GL_TEXTURE2 */
5366+ { 30938, 0x000084D4 }, /* GL_TEXTURE20 */
5367+ { 30951, 0x000084D4 }, /* GL_TEXTURE20_ARB */
5368+ { 30968, 0x000084D5 }, /* GL_TEXTURE21 */
5369+ { 30981, 0x000084D5 }, /* GL_TEXTURE21_ARB */
5370+ { 30998, 0x000084D6 }, /* GL_TEXTURE22 */
5371+ { 31011, 0x000084D6 }, /* GL_TEXTURE22_ARB */
5372+ { 31028, 0x000084D7 }, /* GL_TEXTURE23 */
5373+ { 31041, 0x000084D7 }, /* GL_TEXTURE23_ARB */
5374+ { 31058, 0x000084D8 }, /* GL_TEXTURE24 */
5375+ { 31071, 0x000084D8 }, /* GL_TEXTURE24_ARB */
5376+ { 31088, 0x000084D9 }, /* GL_TEXTURE25 */
5377+ { 31101, 0x000084D9 }, /* GL_TEXTURE25_ARB */
5378+ { 31118, 0x000084DA }, /* GL_TEXTURE26 */
5379+ { 31131, 0x000084DA }, /* GL_TEXTURE26_ARB */
5380+ { 31148, 0x000084DB }, /* GL_TEXTURE27 */
5381+ { 31161, 0x000084DB }, /* GL_TEXTURE27_ARB */
5382+ { 31178, 0x000084DC }, /* GL_TEXTURE28 */
5383+ { 31191, 0x000084DC }, /* GL_TEXTURE28_ARB */
5384+ { 31208, 0x000084DD }, /* GL_TEXTURE29 */
5385+ { 31221, 0x000084DD }, /* GL_TEXTURE29_ARB */
5386+ { 31238, 0x000084C2 }, /* GL_TEXTURE2_ARB */
5387+ { 31254, 0x000084C3 }, /* GL_TEXTURE3 */
5388+ { 31266, 0x000084DE }, /* GL_TEXTURE30 */
5389+ { 31279, 0x000084DE }, /* GL_TEXTURE30_ARB */
5390+ { 31296, 0x000084DF }, /* GL_TEXTURE31 */
5391+ { 31309, 0x000084DF }, /* GL_TEXTURE31_ARB */
5392+ { 31326, 0x000084C3 }, /* GL_TEXTURE3_ARB */
5393+ { 31342, 0x000084C4 }, /* GL_TEXTURE4 */
5394+ { 31354, 0x000084C4 }, /* GL_TEXTURE4_ARB */
5395+ { 31370, 0x000084C5 }, /* GL_TEXTURE5 */
5396+ { 31382, 0x000084C5 }, /* GL_TEXTURE5_ARB */
5397+ { 31398, 0x000084C6 }, /* GL_TEXTURE6 */
5398+ { 31410, 0x000084C6 }, /* GL_TEXTURE6_ARB */
5399+ { 31426, 0x000084C7 }, /* GL_TEXTURE7 */
5400+ { 31438, 0x000084C7 }, /* GL_TEXTURE7_ARB */
5401+ { 31454, 0x000084C8 }, /* GL_TEXTURE8 */
5402+ { 31466, 0x000084C8 }, /* GL_TEXTURE8_ARB */
5403+ { 31482, 0x000084C9 }, /* GL_TEXTURE9 */
5404+ { 31494, 0x000084C9 }, /* GL_TEXTURE9_ARB */
5405+ { 31510, 0x00000DE0 }, /* GL_TEXTURE_1D */
5406+ { 31524, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */
5407+ { 31548, 0x00000DE1 }, /* GL_TEXTURE_2D */
5408+ { 31562, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */
5409+ { 31586, 0x0000806F }, /* GL_TEXTURE_3D */
5410+ { 31600, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */
5411+ { 31622, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */
5412+ { 31648, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */
5413+ { 31670, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */
5414+ { 31692, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
5415+ { 31724, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */
5416+ { 31746, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
5417+ { 31778, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */
5418+ { 31800, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */
5419+ { 31828, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */
5420+ { 31860, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
5421+ { 31893, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */
5422+ { 31925, 0x00040000 }, /* GL_TEXTURE_BIT */
5423+ { 31940, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */
5424+ { 31961, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */
5425+ { 31986, 0x00001005 }, /* GL_TEXTURE_BORDER */
5426+ { 32004, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */
5427+ { 32028, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
5428+ { 32059, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
5429+ { 32089, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
5430+ { 32119, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
5431+ { 32154, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
5432+ { 32185, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
5433+ { 32223, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */
5434+ { 32250, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
5435+ { 32282, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
5436+ { 32316, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */
5437+ { 32340, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */
5438+ { 32368, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */
5439+ { 32392, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */
5440+ { 32420, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
5441+ { 32453, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */
5442+ { 32477, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */
5443+ { 32499, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */
5444+ { 32521, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */
5445+ { 32547, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */
5446+ { 32581, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
5447+ { 32614, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */
5448+ { 32651, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */
5449+ { 32679, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */
5450+ { 32711, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */
5451+ { 32734, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
5452+ { 32772, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */
5453+ { 32814, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */
5454+ { 32845, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */
5455+ { 32873, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
5456+ { 32903, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */
5457+ { 32931, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */
5458+ { 32951, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */
5459+ { 32975, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
5460+ { 33006, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */
5461+ { 33041, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
5462+ { 33072, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */
5463+ { 33107, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
5464+ { 33138, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */
5465+ { 33173, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
5466+ { 33204, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */
5467+ { 33239, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
5468+ { 33270, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */
5469+ { 33305, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
5470+ { 33336, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */
5471+ { 33371, 0x00008071 }, /* GL_TEXTURE_DEPTH */
5472+ { 33388, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */
5473+ { 33410, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */
5474+ { 33436, 0x00002300 }, /* GL_TEXTURE_ENV */
5475+ { 33451, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */
5476+ { 33472, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */
5477+ { 33492, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */
5478+ { 33518, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */
5479+ { 33538, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */
5480+ { 33555, 0x00000C62 }, /* GL_TEXTURE_GEN_R */
5481+ { 33572, 0x00000C60 }, /* GL_TEXTURE_GEN_S */
5482+ { 33589, 0x00000C61 }, /* GL_TEXTURE_GEN_T */
5483+ { 33606, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */
5484+ { 33631, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */
5485+ { 33653, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */
5486+ { 33679, 0x00001001 }, /* GL_TEXTURE_HEIGHT */
5487+ { 33697, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */
5488+ { 33723, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */
5489+ { 33749, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */
5490+ { 33779, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */
5491+ { 33806, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */
5492+ { 33831, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */
5493+ { 33851, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */
5494+ { 33875, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
5495+ { 33902, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
5496+ { 33929, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
5497+ { 33956, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */
5498+ { 33982, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */
5499+ { 34012, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */
5500+ { 34034, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */
5501+ { 34052, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
5502+ { 34082, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
5503+ { 34110, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
5504+ { 34138, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
5505+ { 34166, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */
5506+ { 34187, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */
5507+ { 34206, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */
5508+ { 34228, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */
5509+ { 34247, 0x00008066 }, /* GL_TEXTURE_PRIORITY */
5510+ { 34267, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */
5511+ { 34292, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */
5512+ { 34316, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */
5513+ { 34336, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */
5514+ { 34360, 0x00008067 }, /* GL_TEXTURE_RESIDENT */
5515+ { 34380, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */
5516+ { 34403, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */
5517+ { 34428, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
5518+ { 34462, 0x00001000 }, /* GL_TEXTURE_WIDTH */
5519+ { 34479, 0x00008072 }, /* GL_TEXTURE_WRAP_R */
5520+ { 34497, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
5521+ { 34515, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
5522+ { 34533, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
5523+ { 34553, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
5524+ { 34572, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
5525+ { 34601, 0x00001000 }, /* GL_TRANSFORM_BIT */
5526+ { 34618, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
5527+ { 34644, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
5528+ { 34674, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
5529+ { 34706, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
5530+ { 34736, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
5531+ { 34770, 0x0000862C }, /* GL_TRANSPOSE_NV */
5532+ { 34786, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
5533+ { 34817, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
5534+ { 34852, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
5535+ { 34880, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
5536+ { 34912, 0x00000004 }, /* GL_TRIANGLES */
5537+ { 34925, 0x00000006 }, /* GL_TRIANGLE_FAN */
5538+ { 34941, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
5539+ { 34962, 0x00000005 }, /* GL_TRIANGLE_STRIP */
5540+ { 34980, 0x00000001 }, /* GL_TRUE */
5541+ { 34988, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
5542+ { 35008, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
5543+ { 35031, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
5544+ { 35051, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
5545+ { 35072, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
5546+ { 35094, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
5547+ { 35116, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
5548+ { 35136, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
5549+ { 35157, 0x00001401 }, /* GL_UNSIGNED_BYTE */
5550+ { 35174, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
5551+ { 35201, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
5552+ { 35224, 0x00001405 }, /* GL_UNSIGNED_INT */
5553+ { 35240, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
5554+ { 35267, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
5555+ { 35291, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
5556+ { 35322, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
5557+ { 35346, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
5558+ { 35374, 0x00001403 }, /* GL_UNSIGNED_SHORT */
5559+ { 35392, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
5560+ { 35422, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
5561+ { 35448, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
5562+ { 35478, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
5563+ { 35504, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
5564+ { 35528, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
5565+ { 35556, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
5566+ { 35584, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
5567+ { 35611, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
5568+ { 35643, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
5569+ { 35674, 0x00008CA2 }, /* GL_UPPER_LEFT */
5570+ { 35688, 0x00002A20 }, /* GL_V2F */
5571+ { 35695, 0x00002A21 }, /* GL_V3F */
5572+ { 35702, 0x00008B83 }, /* GL_VALIDATE_STATUS */
5573+ { 35721, 0x00001F00 }, /* GL_VENDOR */
5574+ { 35731, 0x00001F02 }, /* GL_VERSION */
5575+ { 35742, 0x00008074 }, /* GL_VERTEX_ARRAY */
5576+ { 35758, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
5577+ { 35788, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
5578+ { 35819, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
5579+ { 35854, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
5580+ { 35878, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
5581+ { 35899, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
5582+ { 35922, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
5583+ { 35943, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
5584+ { 35970, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
5585+ { 35998, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
5586+ { 36026, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
5587+ { 36054, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
5588+ { 36082, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
5589+ { 36110, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
5590+ { 36138, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
5591+ { 36165, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
5592+ { 36192, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
5593+ { 36219, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
5594+ { 36246, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
5595+ { 36273, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
5596+ { 36300, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
5597+ { 36327, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
5598+ { 36354, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
5599+ { 36381, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
5600+ { 36419, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
5601+ { 36461, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
5602+ { 36492, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
5603+ { 36527, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
5604+ { 36561, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
5605+ { 36599, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
5606+ { 36630, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
5607+ { 36665, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
5608+ { 36693, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
5609+ { 36725, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
5610+ { 36755, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
5611+ { 36789, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
5612+ { 36817, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
5613+ { 36849, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
5614+ { 36869, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
5615+ { 36891, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
5616+ { 36920, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
5617+ { 36941, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
5618+ { 36970, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
5619+ { 37003, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
5620+ { 37035, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
5621+ { 37062, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
5622+ { 37093, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
5623+ { 37123, 0x00008B31 }, /* GL_VERTEX_SHADER */
5624+ { 37140, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
5625+ { 37161, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
5626+ { 37188, 0x00000BA2 }, /* GL_VIEWPORT */
5627+ { 37200, 0x00000800 }, /* GL_VIEWPORT_BIT */
5628+ { 37216, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
5629+ { 37236, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
5630+ { 37267, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
5631+ { 37302, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
5632+ { 37330, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
5633+ { 37355, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
5634+ { 37382, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
5635+ { 37407, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
5636+ { 37431, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
5637+ { 37450, 0x000088B9 }, /* GL_WRITE_ONLY */
5638+ { 37464, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
5639+ { 37482, 0x00001506 }, /* GL_XOR */
5640+ { 37489, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
5641+ { 37508, 0x00008757 }, /* GL_YCBCR_MESA */
5642+ { 37522, 0x00000000 }, /* GL_ZERO */
5643+ { 37530, 0x00000D16 }, /* GL_ZOOM_X */
5644+ { 37540, 0x00000D17 }, /* GL_ZOOM_Y */
5645+};
5646+
5647+static const unsigned reduced_enums[1284] =
5648+{
5649+ 436, /* GL_FALSE */
5650+ 645, /* GL_LINES */
5651+ 647, /* GL_LINE_LOOP */
5652+ 654, /* GL_LINE_STRIP */
5653+ 1637, /* GL_TRIANGLES */
5654+ 1640, /* GL_TRIANGLE_STRIP */
5655+ 1638, /* GL_TRIANGLE_FAN */
5656+ 1211, /* GL_QUADS */
5657+ 1213, /* GL_QUAD_STRIP */
5658+ 1099, /* GL_POLYGON */
5659+ 1111, /* GL_POLYGON_STIPPLE_BIT */
5660+ 1064, /* GL_PIXEL_MODE_BIT */
5661+ 632, /* GL_LIGHTING_BIT */
5662+ 458, /* GL_FOG_BIT */
5663+ 8, /* GL_ACCUM */
5664+ 664, /* GL_LOAD */
5665+ 1253, /* GL_RETURN */
5666+ 937, /* GL_MULT */
5667+ 23, /* GL_ADD */
5668+ 953, /* GL_NEVER */
5669+ 622, /* GL_LESS */
5670+ 426, /* GL_EQUAL */
5671+ 621, /* GL_LEQUAL */
5672+ 547, /* GL_GREATER */
5673+ 968, /* GL_NOTEQUAL */
5674+ 522, /* GL_GEQUAL */
5675+ 46, /* GL_ALWAYS */
5676+ 1386, /* GL_SRC_COLOR */
5677+ 997, /* GL_ONE_MINUS_SRC_COLOR */
5678+ 1384, /* GL_SRC_ALPHA */
5679+ 996, /* GL_ONE_MINUS_SRC_ALPHA */
5680+ 406, /* GL_DST_ALPHA */
5681+ 994, /* GL_ONE_MINUS_DST_ALPHA */
5682+ 407, /* GL_DST_COLOR */
5683+ 995, /* GL_ONE_MINUS_DST_COLOR */
5684+ 1385, /* GL_SRC_ALPHA_SATURATE */
5685+ 510, /* GL_FRONT_LEFT */
5686+ 511, /* GL_FRONT_RIGHT */
5687+ 69, /* GL_BACK_LEFT */
5688+ 70, /* GL_BACK_RIGHT */
5689+ 507, /* GL_FRONT */
5690+ 68, /* GL_BACK */
5691+ 620, /* GL_LEFT */
5692+ 1293, /* GL_RIGHT */
5693+ 508, /* GL_FRONT_AND_BACK */
5694+ 63, /* GL_AUX0 */
5695+ 64, /* GL_AUX1 */
5696+ 65, /* GL_AUX2 */
5697+ 66, /* GL_AUX3 */
5698+ 612, /* GL_INVALID_ENUM */
5699+ 615, /* GL_INVALID_VALUE */
5700+ 614, /* GL_INVALID_OPERATION */
5701+ 1387, /* GL_STACK_OVERFLOW */
5702+ 1388, /* GL_STACK_UNDERFLOW */
5703+ 1022, /* GL_OUT_OF_MEMORY */
5704+ 613, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
5705+ 0, /* GL_2D */
5706+ 2, /* GL_3D */
5707+ 3, /* GL_3D_COLOR */
5708+ 4, /* GL_3D_COLOR_TEXTURE */
5709+ 6, /* GL_4D_COLOR_TEXTURE */
5710+ 1042, /* GL_PASS_THROUGH_TOKEN */
5711+ 1098, /* GL_POINT_TOKEN */
5712+ 655, /* GL_LINE_TOKEN */
5713+ 1112, /* GL_POLYGON_TOKEN */
5714+ 74, /* GL_BITMAP_TOKEN */
5715+ 405, /* GL_DRAW_PIXEL_TOKEN */
5716+ 271, /* GL_COPY_PIXEL_TOKEN */
5717+ 648, /* GL_LINE_RESET_TOKEN */
5718+ 429, /* GL_EXP */
5719+ 430, /* GL_EXP2 */
5720+ 304, /* GL_CW */
5721+ 116, /* GL_CCW */
5722+ 137, /* GL_COEFF */
5723+ 1019, /* GL_ORDER */
5724+ 344, /* GL_DOMAIN */
5725+ 279, /* GL_CURRENT_COLOR */
5726+ 282, /* GL_CURRENT_INDEX */
5727+ 288, /* GL_CURRENT_NORMAL */
5728+ 300, /* GL_CURRENT_TEXTURE_COORDS */
5729+ 293, /* GL_CURRENT_RASTER_COLOR */
5730+ 295, /* GL_CURRENT_RASTER_INDEX */
5731+ 298, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
5732+ 296, /* GL_CURRENT_RASTER_POSITION */
5733+ 297, /* GL_CURRENT_RASTER_POSITION_VALID */
5734+ 294, /* GL_CURRENT_RASTER_DISTANCE */
5735+ 1091, /* GL_POINT_SMOOTH */
5736+ 1080, /* GL_POINT_SIZE */
5737+ 1090, /* GL_POINT_SIZE_RANGE */
5738+ 1081, /* GL_POINT_SIZE_GRANULARITY */
5739+ 649, /* GL_LINE_SMOOTH */
5740+ 656, /* GL_LINE_WIDTH */
5741+ 658, /* GL_LINE_WIDTH_RANGE */
5742+ 657, /* GL_LINE_WIDTH_GRANULARITY */
5743+ 651, /* GL_LINE_STIPPLE */
5744+ 652, /* GL_LINE_STIPPLE_PATTERN */
5745+ 653, /* GL_LINE_STIPPLE_REPEAT */
5746+ 663, /* GL_LIST_MODE */
5747+ 822, /* GL_MAX_LIST_NESTING */
5748+ 660, /* GL_LIST_BASE */
5749+ 662, /* GL_LIST_INDEX */
5750+ 1101, /* GL_POLYGON_MODE */
5751+ 1108, /* GL_POLYGON_SMOOTH */
5752+ 1110, /* GL_POLYGON_STIPPLE */
5753+ 414, /* GL_EDGE_FLAG */
5754+ 272, /* GL_CULL_FACE */
5755+ 273, /* GL_CULL_FACE_MODE */
5756+ 509, /* GL_FRONT_FACE */
5757+ 631, /* GL_LIGHTING */
5758+ 636, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
5759+ 637, /* GL_LIGHT_MODEL_TWO_SIDE */
5760+ 633, /* GL_LIGHT_MODEL_AMBIENT */
5761+ 1339, /* GL_SHADE_MODEL */
5762+ 168, /* GL_COLOR_MATERIAL_FACE */
5763+ 169, /* GL_COLOR_MATERIAL_PARAMETER */
5764+ 167, /* GL_COLOR_MATERIAL */
5765+ 457, /* GL_FOG */
5766+ 479, /* GL_FOG_INDEX */
5767+ 475, /* GL_FOG_DENSITY */
5768+ 483, /* GL_FOG_START */
5769+ 477, /* GL_FOG_END */
5770+ 480, /* GL_FOG_MODE */
5771+ 459, /* GL_FOG_COLOR */
5772+ 333, /* GL_DEPTH_RANGE */
5773+ 338, /* GL_DEPTH_TEST */
5774+ 341, /* GL_DEPTH_WRITEMASK */
5775+ 321, /* GL_DEPTH_CLEAR_VALUE */
5776+ 332, /* GL_DEPTH_FUNC */
5777+ 12, /* GL_ACCUM_CLEAR_VALUE */
5778+ 1418, /* GL_STENCIL_TEST */
5779+ 1406, /* GL_STENCIL_CLEAR_VALUE */
5780+ 1408, /* GL_STENCIL_FUNC */
5781+ 1420, /* GL_STENCIL_VALUE_MASK */
5782+ 1407, /* GL_STENCIL_FAIL */
5783+ 1415, /* GL_STENCIL_PASS_DEPTH_FAIL */
5784+ 1416, /* GL_STENCIL_PASS_DEPTH_PASS */
5785+ 1417, /* GL_STENCIL_REF */
5786+ 1421, /* GL_STENCIL_WRITEMASK */
5787+ 791, /* GL_MATRIX_MODE */
5788+ 958, /* GL_NORMALIZE */
5789+ 1727, /* GL_VIEWPORT */
5790+ 932, /* GL_MODELVIEW_STACK_DEPTH */
5791+ 1191, /* GL_PROJECTION_STACK_DEPTH */
5792+ 1616, /* GL_TEXTURE_STACK_DEPTH */
5793+ 930, /* GL_MODELVIEW_MATRIX */
5794+ 1190, /* GL_PROJECTION_MATRIX */
5795+ 1601, /* GL_TEXTURE_MATRIX */
5796+ 61, /* GL_ATTRIB_STACK_DEPTH */
5797+ 127, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
5798+ 43, /* GL_ALPHA_TEST */
5799+ 44, /* GL_ALPHA_TEST_FUNC */
5800+ 45, /* GL_ALPHA_TEST_REF */
5801+ 343, /* GL_DITHER */
5802+ 78, /* GL_BLEND_DST */
5803+ 86, /* GL_BLEND_SRC */
5804+ 75, /* GL_BLEND */
5805+ 666, /* GL_LOGIC_OP_MODE */
5806+ 586, /* GL_INDEX_LOGIC_OP */
5807+ 166, /* GL_COLOR_LOGIC_OP */
5808+ 67, /* GL_AUX_BUFFERS */
5809+ 354, /* GL_DRAW_BUFFER */
5810+ 1223, /* GL_READ_BUFFER */
5811+ 1320, /* GL_SCISSOR_BOX */
5812+ 1321, /* GL_SCISSOR_TEST */
5813+ 585, /* GL_INDEX_CLEAR_VALUE */
5814+ 590, /* GL_INDEX_WRITEMASK */
5815+ 163, /* GL_COLOR_CLEAR_VALUE */
5816+ 205, /* GL_COLOR_WRITEMASK */
5817+ 587, /* GL_INDEX_MODE */
5818+ 1287, /* GL_RGBA_MODE */
5819+ 353, /* GL_DOUBLEBUFFER */
5820+ 1422, /* GL_STEREO */
5821+ 1246, /* GL_RENDER_MODE */
5822+ 1043, /* GL_PERSPECTIVE_CORRECTION_HINT */
5823+ 1092, /* GL_POINT_SMOOTH_HINT */
5824+ 650, /* GL_LINE_SMOOTH_HINT */
5825+ 1109, /* GL_POLYGON_SMOOTH_HINT */
5826+ 478, /* GL_FOG_HINT */
5827+ 1582, /* GL_TEXTURE_GEN_S */
5828+ 1583, /* GL_TEXTURE_GEN_T */
5829+ 1581, /* GL_TEXTURE_GEN_R */
5830+ 1580, /* GL_TEXTURE_GEN_Q */
5831+ 1056, /* GL_PIXEL_MAP_I_TO_I */
5832+ 1062, /* GL_PIXEL_MAP_S_TO_S */
5833+ 1058, /* GL_PIXEL_MAP_I_TO_R */
5834+ 1054, /* GL_PIXEL_MAP_I_TO_G */
5835+ 1052, /* GL_PIXEL_MAP_I_TO_B */
5836+ 1050, /* GL_PIXEL_MAP_I_TO_A */
5837+ 1060, /* GL_PIXEL_MAP_R_TO_R */
5838+ 1048, /* GL_PIXEL_MAP_G_TO_G */
5839+ 1046, /* GL_PIXEL_MAP_B_TO_B */
5840+ 1044, /* GL_PIXEL_MAP_A_TO_A */
5841+ 1057, /* GL_PIXEL_MAP_I_TO_I_SIZE */
5842+ 1063, /* GL_PIXEL_MAP_S_TO_S_SIZE */
5843+ 1059, /* GL_PIXEL_MAP_I_TO_R_SIZE */
5844+ 1055, /* GL_PIXEL_MAP_I_TO_G_SIZE */
5845+ 1053, /* GL_PIXEL_MAP_I_TO_B_SIZE */
5846+ 1051, /* GL_PIXEL_MAP_I_TO_A_SIZE */
5847+ 1061, /* GL_PIXEL_MAP_R_TO_R_SIZE */
5848+ 1049, /* GL_PIXEL_MAP_G_TO_G_SIZE */
5849+ 1047, /* GL_PIXEL_MAP_B_TO_B_SIZE */
5850+ 1045, /* GL_PIXEL_MAP_A_TO_A_SIZE */
5851+ 1649, /* GL_UNPACK_SWAP_BYTES */
5852+ 1644, /* GL_UNPACK_LSB_FIRST */
5853+ 1645, /* GL_UNPACK_ROW_LENGTH */
5854+ 1648, /* GL_UNPACK_SKIP_ROWS */
5855+ 1647, /* GL_UNPACK_SKIP_PIXELS */
5856+ 1642, /* GL_UNPACK_ALIGNMENT */
5857+ 1031, /* GL_PACK_SWAP_BYTES */
5858+ 1026, /* GL_PACK_LSB_FIRST */
5859+ 1027, /* GL_PACK_ROW_LENGTH */
5860+ 1030, /* GL_PACK_SKIP_ROWS */
5861+ 1029, /* GL_PACK_SKIP_PIXELS */
5862+ 1023, /* GL_PACK_ALIGNMENT */
5863+ 744, /* GL_MAP_COLOR */
5864+ 745, /* GL_MAP_STENCIL */
5865+ 589, /* GL_INDEX_SHIFT */
5866+ 588, /* GL_INDEX_OFFSET */
5867+ 1235, /* GL_RED_SCALE */
5868+ 1233, /* GL_RED_BIAS */
5869+ 1744, /* GL_ZOOM_X */
5870+ 1745, /* GL_ZOOM_Y */
5871+ 551, /* GL_GREEN_SCALE */
5872+ 549, /* GL_GREEN_BIAS */
5873+ 92, /* GL_BLUE_SCALE */
5874+ 90, /* GL_BLUE_BIAS */
5875+ 42, /* GL_ALPHA_SCALE */
5876+ 40, /* GL_ALPHA_BIAS */
5877+ 334, /* GL_DEPTH_SCALE */
5878+ 315, /* GL_DEPTH_BIAS */
5879+ 817, /* GL_MAX_EVAL_ORDER */
5880+ 821, /* GL_MAX_LIGHTS */
5881+ 800, /* GL_MAX_CLIP_PLANES */
5882+ 865, /* GL_MAX_TEXTURE_SIZE */
5883+ 827, /* GL_MAX_PIXEL_MAP_TABLE */
5884+ 796, /* GL_MAX_ATTRIB_STACK_DEPTH */
5885+ 824, /* GL_MAX_MODELVIEW_STACK_DEPTH */
5886+ 825, /* GL_MAX_NAME_STACK_DEPTH */
5887+ 853, /* GL_MAX_PROJECTION_STACK_DEPTH */
5888+ 866, /* GL_MAX_TEXTURE_STACK_DEPTH */
5889+ 880, /* GL_MAX_VIEWPORT_DIMS */
5890+ 797, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
5891+ 1429, /* GL_SUBPIXEL_BITS */
5892+ 584, /* GL_INDEX_BITS */
5893+ 1234, /* GL_RED_BITS */
5894+ 550, /* GL_GREEN_BITS */
5895+ 91, /* GL_BLUE_BITS */
5896+ 41, /* GL_ALPHA_BITS */
5897+ 316, /* GL_DEPTH_BITS */
5898+ 1404, /* GL_STENCIL_BITS */
5899+ 14, /* GL_ACCUM_RED_BITS */
5900+ 13, /* GL_ACCUM_GREEN_BITS */
5901+ 10, /* GL_ACCUM_BLUE_BITS */
5902+ 9, /* GL_ACCUM_ALPHA_BITS */
5903+ 946, /* GL_NAME_STACK_DEPTH */
5904+ 62, /* GL_AUTO_NORMAL */
5905+ 690, /* GL_MAP1_COLOR_4 */
5906+ 693, /* GL_MAP1_INDEX */
5907+ 694, /* GL_MAP1_NORMAL */
5908+ 695, /* GL_MAP1_TEXTURE_COORD_1 */
5909+ 696, /* GL_MAP1_TEXTURE_COORD_2 */
5910+ 697, /* GL_MAP1_TEXTURE_COORD_3 */
5911+ 698, /* GL_MAP1_TEXTURE_COORD_4 */
5912+ 699, /* GL_MAP1_VERTEX_3 */
5913+ 700, /* GL_MAP1_VERTEX_4 */
5914+ 717, /* GL_MAP2_COLOR_4 */
5915+ 720, /* GL_MAP2_INDEX */
5916+ 721, /* GL_MAP2_NORMAL */
5917+ 722, /* GL_MAP2_TEXTURE_COORD_1 */
5918+ 723, /* GL_MAP2_TEXTURE_COORD_2 */
5919+ 724, /* GL_MAP2_TEXTURE_COORD_3 */
5920+ 725, /* GL_MAP2_TEXTURE_COORD_4 */
5921+ 726, /* GL_MAP2_VERTEX_3 */
5922+ 727, /* GL_MAP2_VERTEX_4 */
5923+ 691, /* GL_MAP1_GRID_DOMAIN */
5924+ 692, /* GL_MAP1_GRID_SEGMENTS */
5925+ 718, /* GL_MAP2_GRID_DOMAIN */
5926+ 719, /* GL_MAP2_GRID_SEGMENTS */
5927+ 1506, /* GL_TEXTURE_1D */
5928+ 1508, /* GL_TEXTURE_2D */
5929+ 439, /* GL_FEEDBACK_BUFFER_POINTER */
5930+ 440, /* GL_FEEDBACK_BUFFER_SIZE */
5931+ 441, /* GL_FEEDBACK_BUFFER_TYPE */
5932+ 1330, /* GL_SELECTION_BUFFER_POINTER */
5933+ 1331, /* GL_SELECTION_BUFFER_SIZE */
5934+ 1619, /* GL_TEXTURE_WIDTH */
5935+ 1587, /* GL_TEXTURE_HEIGHT */
5936+ 1543, /* GL_TEXTURE_COMPONENTS */
5937+ 1527, /* GL_TEXTURE_BORDER_COLOR */
5938+ 1526, /* GL_TEXTURE_BORDER */
5939+ 345, /* GL_DONT_CARE */
5940+ 437, /* GL_FASTEST */
5941+ 954, /* GL_NICEST */
5942+ 47, /* GL_AMBIENT */
5943+ 342, /* GL_DIFFUSE */
5944+ 1373, /* GL_SPECULAR */
5945+ 1113, /* GL_POSITION */
5946+ 1376, /* GL_SPOT_DIRECTION */
5947+ 1377, /* GL_SPOT_EXPONENT */
5948+ 1375, /* GL_SPOT_CUTOFF */
5949+ 245, /* GL_CONSTANT_ATTENUATION */
5950+ 640, /* GL_LINEAR_ATTENUATION */
5951+ 1210, /* GL_QUADRATIC_ATTENUATION */
5952+ 219, /* GL_COMPILE */
5953+ 220, /* GL_COMPILE_AND_EXECUTE */
5954+ 111, /* GL_BYTE */
5955+ 1650, /* GL_UNSIGNED_BYTE */
5956+ 1344, /* GL_SHORT */
5957+ 1659, /* GL_UNSIGNED_SHORT */
5958+ 592, /* GL_INT */
5959+ 1653, /* GL_UNSIGNED_INT */
5960+ 444, /* GL_FLOAT */
5961+ 1, /* GL_2_BYTES */
5962+ 5, /* GL_3_BYTES */
5963+ 7, /* GL_4_BYTES */
5964+ 352, /* GL_DOUBLE */
5965+ 123, /* GL_CLEAR */
5966+ 49, /* GL_AND */
5967+ 51, /* GL_AND_REVERSE */
5968+ 269, /* GL_COPY */
5969+ 50, /* GL_AND_INVERTED */
5970+ 956, /* GL_NOOP */
5971+ 1740, /* GL_XOR */
5972+ 1018, /* GL_OR */
5973+ 957, /* GL_NOR */
5974+ 427, /* GL_EQUIV */
5975+ 618, /* GL_INVERT */
5976+ 1021, /* GL_OR_REVERSE */
5977+ 270, /* GL_COPY_INVERTED */
5978+ 1020, /* GL_OR_INVERTED */
5979+ 947, /* GL_NAND */
5980+ 1335, /* GL_SET */
5981+ 424, /* GL_EMISSION */
5982+ 1343, /* GL_SHININESS */
5983+ 48, /* GL_AMBIENT_AND_DIFFUSE */
5984+ 165, /* GL_COLOR_INDEXES */
5985+ 897, /* GL_MODELVIEW */
5986+ 1189, /* GL_PROJECTION */
5987+ 1441, /* GL_TEXTURE */
5988+ 138, /* GL_COLOR */
5989+ 313, /* GL_DEPTH */
5990+ 1395, /* GL_STENCIL */
5991+ 164, /* GL_COLOR_INDEX */
5992+ 1409, /* GL_STENCIL_INDEX */
5993+ 322, /* GL_DEPTH_COMPONENT */
5994+ 1230, /* GL_RED */
5995+ 548, /* GL_GREEN */
5996+ 89, /* GL_BLUE */
5997+ 31, /* GL_ALPHA */
5998+ 1254, /* GL_RGB */
5999+ 1273, /* GL_RGBA */
6000+ 668, /* GL_LUMINANCE */
6001+ 689, /* GL_LUMINANCE_ALPHA */
6002+ 73, /* GL_BITMAP */
6003+ 1069, /* GL_POINT */
6004+ 638, /* GL_LINE */
6005+ 442, /* GL_FILL */
6006+ 1239, /* GL_RENDER */
6007+ 438, /* GL_FEEDBACK */
6008+ 1329, /* GL_SELECT */
6009+ 443, /* GL_FLAT */
6010+ 1348, /* GL_SMOOTH */
6011+ 619, /* GL_KEEP */
6012+ 1248, /* GL_REPLACE */
6013+ 575, /* GL_INCR */
6014+ 309, /* GL_DECR */
6015+ 1674, /* GL_VENDOR */
6016+ 1245, /* GL_RENDERER */
6017+ 1675, /* GL_VERSION */
6018+ 431, /* GL_EXTENSIONS */
6019+ 1294, /* GL_S */
6020+ 1432, /* GL_T */
6021+ 1220, /* GL_R */
6022+ 1209, /* GL_Q */
6023+ 933, /* GL_MODULATE */
6024+ 308, /* GL_DECAL */
6025+ 1577, /* GL_TEXTURE_ENV_MODE */
6026+ 1576, /* GL_TEXTURE_ENV_COLOR */
6027+ 1575, /* GL_TEXTURE_ENV */
6028+ 432, /* GL_EYE_LINEAR */
6029+ 980, /* GL_OBJECT_LINEAR */
6030+ 1374, /* GL_SPHERE_MAP */
6031+ 1579, /* GL_TEXTURE_GEN_MODE */
6032+ 982, /* GL_OBJECT_PLANE */
6033+ 433, /* GL_EYE_PLANE */
6034+ 948, /* GL_NEAREST */
6035+ 639, /* GL_LINEAR */
6036+ 952, /* GL_NEAREST_MIPMAP_NEAREST */
6037+ 644, /* GL_LINEAR_MIPMAP_NEAREST */
6038+ 951, /* GL_NEAREST_MIPMAP_LINEAR */
6039+ 643, /* GL_LINEAR_MIPMAP_LINEAR */
6040+ 1600, /* GL_TEXTURE_MAG_FILTER */
6041+ 1608, /* GL_TEXTURE_MIN_FILTER */
6042+ 1621, /* GL_TEXTURE_WRAP_S */
6043+ 1622, /* GL_TEXTURE_WRAP_T */
6044+ 117, /* GL_CLAMP */
6045+ 1247, /* GL_REPEAT */
6046+ 1107, /* GL_POLYGON_OFFSET_UNITS */
6047+ 1106, /* GL_POLYGON_OFFSET_POINT */
6048+ 1105, /* GL_POLYGON_OFFSET_LINE */
6049+ 1221, /* GL_R3_G3_B2 */
6050+ 1671, /* GL_V2F */
6051+ 1672, /* GL_V3F */
6052+ 114, /* GL_C4UB_V2F */
6053+ 115, /* GL_C4UB_V3F */
6054+ 112, /* GL_C3F_V3F */
6055+ 945, /* GL_N3F_V3F */
6056+ 113, /* GL_C4F_N3F_V3F */
6057+ 1437, /* GL_T2F_V3F */
6058+ 1439, /* GL_T4F_V4F */
6059+ 1435, /* GL_T2F_C4UB_V3F */
6060+ 1433, /* GL_T2F_C3F_V3F */
6061+ 1436, /* GL_T2F_N3F_V3F */
6062+ 1434, /* GL_T2F_C4F_N3F_V3F */
6063+ 1438, /* GL_T4F_C4F_N3F_V4F */
6064+ 130, /* GL_CLIP_PLANE0 */
6065+ 131, /* GL_CLIP_PLANE1 */
6066+ 132, /* GL_CLIP_PLANE2 */
6067+ 133, /* GL_CLIP_PLANE3 */
6068+ 134, /* GL_CLIP_PLANE4 */
6069+ 135, /* GL_CLIP_PLANE5 */
6070+ 623, /* GL_LIGHT0 */
6071+ 624, /* GL_LIGHT1 */
6072+ 625, /* GL_LIGHT2 */
6073+ 626, /* GL_LIGHT3 */
6074+ 627, /* GL_LIGHT4 */
6075+ 628, /* GL_LIGHT5 */
6076+ 629, /* GL_LIGHT6 */
6077+ 630, /* GL_LIGHT7 */
6078+ 552, /* GL_HINT_BIT */
6079+ 247, /* GL_CONSTANT_COLOR */
6080+ 992, /* GL_ONE_MINUS_CONSTANT_COLOR */
6081+ 242, /* GL_CONSTANT_ALPHA */
6082+ 990, /* GL_ONE_MINUS_CONSTANT_ALPHA */
6083+ 76, /* GL_BLEND_COLOR */
6084+ 512, /* GL_FUNC_ADD */
6085+ 881, /* GL_MIN */
6086+ 793, /* GL_MAX */
6087+ 81, /* GL_BLEND_EQUATION */
6088+ 516, /* GL_FUNC_SUBTRACT */
6089+ 514, /* GL_FUNC_REVERSE_SUBTRACT */
6090+ 250, /* GL_CONVOLUTION_1D */
6091+ 251, /* GL_CONVOLUTION_2D */
6092+ 1332, /* GL_SEPARABLE_2D */
6093+ 254, /* GL_CONVOLUTION_BORDER_MODE */
6094+ 258, /* GL_CONVOLUTION_FILTER_SCALE */
6095+ 256, /* GL_CONVOLUTION_FILTER_BIAS */
6096+ 1231, /* GL_REDUCE */
6097+ 260, /* GL_CONVOLUTION_FORMAT */
6098+ 264, /* GL_CONVOLUTION_WIDTH */
6099+ 262, /* GL_CONVOLUTION_HEIGHT */
6100+ 808, /* GL_MAX_CONVOLUTION_WIDTH */
6101+ 806, /* GL_MAX_CONVOLUTION_HEIGHT */
6102+ 1146, /* GL_POST_CONVOLUTION_RED_SCALE */
6103+ 1142, /* GL_POST_CONVOLUTION_GREEN_SCALE */
6104+ 1137, /* GL_POST_CONVOLUTION_BLUE_SCALE */
6105+ 1133, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
6106+ 1144, /* GL_POST_CONVOLUTION_RED_BIAS */
6107+ 1140, /* GL_POST_CONVOLUTION_GREEN_BIAS */
6108+ 1135, /* GL_POST_CONVOLUTION_BLUE_BIAS */
6109+ 1131, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
6110+ 553, /* GL_HISTOGRAM */
6111+ 1193, /* GL_PROXY_HISTOGRAM */
6112+ 569, /* GL_HISTOGRAM_WIDTH */
6113+ 559, /* GL_HISTOGRAM_FORMAT */
6114+ 565, /* GL_HISTOGRAM_RED_SIZE */
6115+ 561, /* GL_HISTOGRAM_GREEN_SIZE */
6116+ 556, /* GL_HISTOGRAM_BLUE_SIZE */
6117+ 554, /* GL_HISTOGRAM_ALPHA_SIZE */
6118+ 563, /* GL_HISTOGRAM_LUMINANCE_SIZE */
6119+ 567, /* GL_HISTOGRAM_SINK */
6120+ 882, /* GL_MINMAX */
6121+ 884, /* GL_MINMAX_FORMAT */
6122+ 886, /* GL_MINMAX_SINK */
6123+ 1440, /* GL_TABLE_TOO_LARGE_EXT */
6124+ 1652, /* GL_UNSIGNED_BYTE_3_3_2 */
6125+ 1661, /* GL_UNSIGNED_SHORT_4_4_4_4 */
6126+ 1663, /* GL_UNSIGNED_SHORT_5_5_5_1 */
6127+ 1657, /* GL_UNSIGNED_INT_8_8_8_8 */
6128+ 1654, /* GL_UNSIGNED_INT_10_10_10_2 */
6129+ 1104, /* GL_POLYGON_OFFSET_FILL */
6130+ 1103, /* GL_POLYGON_OFFSET_FACTOR */
6131+ 1102, /* GL_POLYGON_OFFSET_BIAS */
6132+ 1251, /* GL_RESCALE_NORMAL */
6133+ 36, /* GL_ALPHA4 */
6134+ 38, /* GL_ALPHA8 */
6135+ 32, /* GL_ALPHA12 */
6136+ 34, /* GL_ALPHA16 */
6137+ 679, /* GL_LUMINANCE4 */
6138+ 685, /* GL_LUMINANCE8 */
6139+ 669, /* GL_LUMINANCE12 */
6140+ 675, /* GL_LUMINANCE16 */
6141+ 680, /* GL_LUMINANCE4_ALPHA4 */
6142+ 683, /* GL_LUMINANCE6_ALPHA2 */
6143+ 686, /* GL_LUMINANCE8_ALPHA8 */
6144+ 672, /* GL_LUMINANCE12_ALPHA4 */
6145+ 670, /* GL_LUMINANCE12_ALPHA12 */
6146+ 676, /* GL_LUMINANCE16_ALPHA16 */
6147+ 593, /* GL_INTENSITY */
6148+ 598, /* GL_INTENSITY4 */
6149+ 600, /* GL_INTENSITY8 */
6150+ 594, /* GL_INTENSITY12 */
6151+ 596, /* GL_INTENSITY16 */
6152+ 1263, /* GL_RGB2_EXT */
6153+ 1264, /* GL_RGB4 */
6154+ 1267, /* GL_RGB5 */
6155+ 1271, /* GL_RGB8 */
6156+ 1255, /* GL_RGB10 */
6157+ 1259, /* GL_RGB12 */
6158+ 1261, /* GL_RGB16 */
6159+ 1278, /* GL_RGBA2 */
6160+ 1280, /* GL_RGBA4 */
6161+ 1268, /* GL_RGB5_A1 */
6162+ 1284, /* GL_RGBA8 */
6163+ 1256, /* GL_RGB10_A2 */
6164+ 1274, /* GL_RGBA12 */
6165+ 1276, /* GL_RGBA16 */
6166+ 1613, /* GL_TEXTURE_RED_SIZE */
6167+ 1585, /* GL_TEXTURE_GREEN_SIZE */
6168+ 1524, /* GL_TEXTURE_BLUE_SIZE */
6169+ 1511, /* GL_TEXTURE_ALPHA_SIZE */
6170+ 1598, /* GL_TEXTURE_LUMINANCE_SIZE */
6171+ 1589, /* GL_TEXTURE_INTENSITY_SIZE */
6172+ 1249, /* GL_REPLACE_EXT */
6173+ 1197, /* GL_PROXY_TEXTURE_1D */
6174+ 1200, /* GL_PROXY_TEXTURE_2D */
6175+ 1617, /* GL_TEXTURE_TOO_LARGE_EXT */
6176+ 1610, /* GL_TEXTURE_PRIORITY */
6177+ 1615, /* GL_TEXTURE_RESIDENT */
6178+ 1514, /* GL_TEXTURE_BINDING_1D */
6179+ 1516, /* GL_TEXTURE_BINDING_2D */
6180+ 1518, /* GL_TEXTURE_BINDING_3D */
6181+ 1028, /* GL_PACK_SKIP_IMAGES */
6182+ 1024, /* GL_PACK_IMAGE_HEIGHT */
6183+ 1646, /* GL_UNPACK_SKIP_IMAGES */
6184+ 1643, /* GL_UNPACK_IMAGE_HEIGHT */
6185+ 1510, /* GL_TEXTURE_3D */
6186+ 1203, /* GL_PROXY_TEXTURE_3D */
6187+ 1572, /* GL_TEXTURE_DEPTH */
6188+ 1620, /* GL_TEXTURE_WRAP_R */
6189+ 794, /* GL_MAX_3D_TEXTURE_SIZE */
6190+ 1676, /* GL_VERTEX_ARRAY */
6191+ 959, /* GL_NORMAL_ARRAY */
6192+ 139, /* GL_COLOR_ARRAY */
6193+ 578, /* GL_INDEX_ARRAY */
6194+ 1551, /* GL_TEXTURE_COORD_ARRAY */
6195+ 415, /* GL_EDGE_FLAG_ARRAY */
6196+ 1681, /* GL_VERTEX_ARRAY_SIZE */
6197+ 1683, /* GL_VERTEX_ARRAY_TYPE */
6198+ 1682, /* GL_VERTEX_ARRAY_STRIDE */
6199+ 964, /* GL_NORMAL_ARRAY_TYPE */
6200+ 963, /* GL_NORMAL_ARRAY_STRIDE */
6201+ 143, /* GL_COLOR_ARRAY_SIZE */
6202+ 145, /* GL_COLOR_ARRAY_TYPE */
6203+ 144, /* GL_COLOR_ARRAY_STRIDE */
6204+ 583, /* GL_INDEX_ARRAY_TYPE */
6205+ 582, /* GL_INDEX_ARRAY_STRIDE */
6206+ 1555, /* GL_TEXTURE_COORD_ARRAY_SIZE */
6207+ 1557, /* GL_TEXTURE_COORD_ARRAY_TYPE */
6208+ 1556, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
6209+ 419, /* GL_EDGE_FLAG_ARRAY_STRIDE */
6210+ 1680, /* GL_VERTEX_ARRAY_POINTER */
6211+ 962, /* GL_NORMAL_ARRAY_POINTER */
6212+ 142, /* GL_COLOR_ARRAY_POINTER */
6213+ 581, /* GL_INDEX_ARRAY_POINTER */
6214+ 1554, /* GL_TEXTURE_COORD_ARRAY_POINTER */
6215+ 418, /* GL_EDGE_FLAG_ARRAY_POINTER */
6216+ 938, /* GL_MULTISAMPLE */
6217+ 1306, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
6218+ 1308, /* GL_SAMPLE_ALPHA_TO_ONE */
6219+ 1313, /* GL_SAMPLE_COVERAGE */
6220+ 1310, /* GL_SAMPLE_BUFFERS */
6221+ 1301, /* GL_SAMPLES */
6222+ 1317, /* GL_SAMPLE_COVERAGE_VALUE */
6223+ 1315, /* GL_SAMPLE_COVERAGE_INVERT */
6224+ 170, /* GL_COLOR_MATRIX */
6225+ 172, /* GL_COLOR_MATRIX_STACK_DEPTH */
6226+ 802, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
6227+ 1129, /* GL_POST_COLOR_MATRIX_RED_SCALE */
6228+ 1125, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
6229+ 1120, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
6230+ 1116, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
6231+ 1127, /* GL_POST_COLOR_MATRIX_RED_BIAS */
6232+ 1123, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
6233+ 1118, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
6234+ 1114, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
6235+ 1534, /* GL_TEXTURE_COLOR_TABLE_SGI */
6236+ 1204, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
6237+ 1536, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
6238+ 80, /* GL_BLEND_DST_RGB */
6239+ 88, /* GL_BLEND_SRC_RGB */
6240+ 79, /* GL_BLEND_DST_ALPHA */
6241+ 87, /* GL_BLEND_SRC_ALPHA */
6242+ 176, /* GL_COLOR_TABLE */
6243+ 1139, /* GL_POST_CONVOLUTION_COLOR_TABLE */
6244+ 1122, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
6245+ 1192, /* GL_PROXY_COLOR_TABLE */
6246+ 1196, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
6247+ 1195, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
6248+ 200, /* GL_COLOR_TABLE_SCALE */
6249+ 180, /* GL_COLOR_TABLE_BIAS */
6250+ 185, /* GL_COLOR_TABLE_FORMAT */
6251+ 202, /* GL_COLOR_TABLE_WIDTH */
6252+ 197, /* GL_COLOR_TABLE_RED_SIZE */
6253+ 188, /* GL_COLOR_TABLE_GREEN_SIZE */
6254+ 182, /* GL_COLOR_TABLE_BLUE_SIZE */
6255+ 177, /* GL_COLOR_TABLE_ALPHA_SIZE */
6256+ 194, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
6257+ 191, /* GL_COLOR_TABLE_INTENSITY_SIZE */
6258+ 71, /* GL_BGR */
6259+ 72, /* GL_BGRA */
6260+ 816, /* GL_MAX_ELEMENTS_VERTICES */
6261+ 815, /* GL_MAX_ELEMENTS_INDICES */
6262+ 1588, /* GL_TEXTURE_INDEX_SIZE_EXT */
6263+ 136, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
6264+ 1086, /* GL_POINT_SIZE_MIN */
6265+ 1082, /* GL_POINT_SIZE_MAX */
6266+ 1076, /* GL_POINT_FADE_THRESHOLD_SIZE */
6267+ 1072, /* GL_POINT_DISTANCE_ATTENUATION */
6268+ 118, /* GL_CLAMP_TO_BORDER */
6269+ 121, /* GL_CLAMP_TO_EDGE */
6270+ 1609, /* GL_TEXTURE_MIN_LOD */
6271+ 1607, /* GL_TEXTURE_MAX_LOD */
6272+ 1513, /* GL_TEXTURE_BASE_LEVEL */
6273+ 1606, /* GL_TEXTURE_MAX_LEVEL */
6274+ 572, /* GL_IGNORE_BORDER_HP */
6275+ 246, /* GL_CONSTANT_BORDER_HP */
6276+ 1250, /* GL_REPLICATE_BORDER_HP */
6277+ 252, /* GL_CONVOLUTION_BORDER_COLOR */
6278+ 987, /* GL_OCCLUSION_TEST_HP */
6279+ 988, /* GL_OCCLUSION_TEST_RESULT_HP */
6280+ 641, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
6281+ 1528, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
6282+ 1530, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
6283+ 1532, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
6284+ 1533, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
6285+ 1531, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
6286+ 1529, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
6287+ 798, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
6288+ 799, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
6289+ 1149, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
6290+ 1151, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
6291+ 1148, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
6292+ 1150, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
6293+ 1596, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
6294+ 1597, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
6295+ 1595, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
6296+ 518, /* GL_GENERATE_MIPMAP */
6297+ 519, /* GL_GENERATE_MIPMAP_HINT */
6298+ 481, /* GL_FOG_OFFSET_SGIX */
6299+ 482, /* GL_FOG_OFFSET_VALUE_SGIX */
6300+ 1542, /* GL_TEXTURE_COMPARE_SGIX */
6301+ 1541, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
6302+ 1592, /* GL_TEXTURE_LEQUAL_R_SGIX */
6303+ 1584, /* GL_TEXTURE_GEQUAL_R_SGIX */
6304+ 323, /* GL_DEPTH_COMPONENT16 */
6305+ 326, /* GL_DEPTH_COMPONENT24 */
6306+ 329, /* GL_DEPTH_COMPONENT32 */
6307+ 274, /* GL_CULL_VERTEX_EXT */
6308+ 276, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
6309+ 275, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
6310+ 1737, /* GL_WRAP_BORDER_SUN */
6311+ 1535, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
6312+ 634, /* GL_LIGHT_MODEL_COLOR_CONTROL */
6313+ 1345, /* GL_SINGLE_COLOR */
6314+ 1333, /* GL_SEPARATE_SPECULAR_COLOR */
6315+ 1342, /* GL_SHARED_TEXTURE_PALETTE_EXT */
6316+ 1651, /* GL_UNSIGNED_BYTE_2_3_3_REV */
6317+ 1664, /* GL_UNSIGNED_SHORT_5_6_5 */
6318+ 1665, /* GL_UNSIGNED_SHORT_5_6_5_REV */
6319+ 1662, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
6320+ 1660, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
6321+ 1658, /* GL_UNSIGNED_INT_8_8_8_8_REV */
6322+ 1656, /* GL_UNSIGNED_INT_2_10_10_10_REV */
6323+ 1604, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
6324+ 1605, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
6325+ 1603, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
6326+ 889, /* GL_MIRRORED_REPEAT */
6327+ 1289, /* GL_RGB_S3TC */
6328+ 1266, /* GL_RGB4_S3TC */
6329+ 1288, /* GL_RGBA_S3TC */
6330+ 1283, /* GL_RGBA4_S3TC */
6331+ 1286, /* GL_RGBA_DXT5_S3TC */
6332+ 1281, /* GL_RGBA4_DXT5_S3TC */
6333+ 239, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
6334+ 234, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
6335+ 235, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
6336+ 236, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
6337+ 950, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
6338+ 949, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
6339+ 642, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
6340+ 468, /* GL_FOG_COORDINATE_SOURCE */
6341+ 460, /* GL_FOG_COORD */
6342+ 484, /* GL_FRAGMENT_DEPTH */
6343+ 280, /* GL_CURRENT_FOG_COORD */
6344+ 467, /* GL_FOG_COORDINATE_ARRAY_TYPE */
6345+ 466, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
6346+ 465, /* GL_FOG_COORDINATE_ARRAY_POINTER */
6347+ 462, /* GL_FOG_COORDINATE_ARRAY */
6348+ 174, /* GL_COLOR_SUM */
6349+ 299, /* GL_CURRENT_SECONDARY_COLOR */
6350+ 1326, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
6351+ 1328, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
6352+ 1327, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
6353+ 1325, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
6354+ 1322, /* GL_SECONDARY_COLOR_ARRAY */
6355+ 528, /* GL_GL_CURRENT_RASTER_SECONDARY_COLOR */
6356+ 28, /* GL_ALIASED_POINT_SIZE_RANGE */
6357+ 27, /* GL_ALIASED_LINE_WIDTH_RANGE */
6358+ 1442, /* GL_TEXTURE0 */
6359+ 1444, /* GL_TEXTURE1 */
6360+ 1466, /* GL_TEXTURE2 */
6361+ 1488, /* GL_TEXTURE3 */
6362+ 1494, /* GL_TEXTURE4 */
6363+ 1496, /* GL_TEXTURE5 */
6364+ 1498, /* GL_TEXTURE6 */
6365+ 1500, /* GL_TEXTURE7 */
6366+ 1502, /* GL_TEXTURE8 */
6367+ 1504, /* GL_TEXTURE9 */
6368+ 1445, /* GL_TEXTURE10 */
6369+ 1447, /* GL_TEXTURE11 */
6370+ 1449, /* GL_TEXTURE12 */
6371+ 1451, /* GL_TEXTURE13 */
6372+ 1453, /* GL_TEXTURE14 */
6373+ 1455, /* GL_TEXTURE15 */
6374+ 1457, /* GL_TEXTURE16 */
6375+ 1459, /* GL_TEXTURE17 */
6376+ 1461, /* GL_TEXTURE18 */
6377+ 1463, /* GL_TEXTURE19 */
6378+ 1467, /* GL_TEXTURE20 */
6379+ 1469, /* GL_TEXTURE21 */
6380+ 1471, /* GL_TEXTURE22 */
6381+ 1473, /* GL_TEXTURE23 */
6382+ 1475, /* GL_TEXTURE24 */
6383+ 1477, /* GL_TEXTURE25 */
6384+ 1479, /* GL_TEXTURE26 */
6385+ 1481, /* GL_TEXTURE27 */
6386+ 1483, /* GL_TEXTURE28 */
6387+ 1485, /* GL_TEXTURE29 */
6388+ 1489, /* GL_TEXTURE30 */
6389+ 1491, /* GL_TEXTURE31 */
6390+ 18, /* GL_ACTIVE_TEXTURE */
6391+ 124, /* GL_CLIENT_ACTIVE_TEXTURE */
6392+ 867, /* GL_MAX_TEXTURE_UNITS */
6393+ 1630, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
6394+ 1633, /* GL_TRANSPOSE_PROJECTION_MATRIX */
6395+ 1635, /* GL_TRANSPOSE_TEXTURE_MATRIX */
6396+ 1627, /* GL_TRANSPOSE_COLOR_MATRIX */
6397+ 1430, /* GL_SUBTRACT */
6398+ 856, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
6399+ 222, /* GL_COMPRESSED_ALPHA */
6400+ 226, /* GL_COMPRESSED_LUMINANCE */
6401+ 227, /* GL_COMPRESSED_LUMINANCE_ALPHA */
6402+ 224, /* GL_COMPRESSED_INTENSITY */
6403+ 230, /* GL_COMPRESSED_RGB */
6404+ 231, /* GL_COMPRESSED_RGBA */
6405+ 1549, /* GL_TEXTURE_COMPRESSION_HINT */
6406+ 1611, /* GL_TEXTURE_RECTANGLE_ARB */
6407+ 1521, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
6408+ 1207, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
6409+ 854, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
6410+ 335, /* GL_DEPTH_STENCIL_NV */
6411+ 1655, /* GL_UNSIGNED_INT_24_8_NV */
6412+ 863, /* GL_MAX_TEXTURE_LOD_BIAS */
6413+ 1602, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
6414+ 864, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
6415+ 1578, /* GL_TEXTURE_FILTER_CONTROL */
6416+ 1593, /* GL_TEXTURE_LOD_BIAS */
6417+ 207, /* GL_COMBINE4 */
6418+ 857, /* GL_MAX_SHININESS_NV */
6419+ 858, /* GL_MAX_SPOT_EXPONENT_NV */
6420+ 576, /* GL_INCR_WRAP */
6421+ 310, /* GL_DECR_WRAP */
6422+ 909, /* GL_MODELVIEW1_ARB */
6423+ 965, /* GL_NORMAL_MAP */
6424+ 1236, /* GL_REFLECTION_MAP */
6425+ 1558, /* GL_TEXTURE_CUBE_MAP */
6426+ 1519, /* GL_TEXTURE_BINDING_CUBE_MAP */
6427+ 1566, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
6428+ 1560, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
6429+ 1568, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
6430+ 1562, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
6431+ 1570, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
6432+ 1564, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
6433+ 1205, /* GL_PROXY_TEXTURE_CUBE_MAP */
6434+ 810, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
6435+ 944, /* GL_MULTISAMPLE_FILTER_HINT_NV */
6436+ 476, /* GL_FOG_DISTANCE_MODE_NV */
6437+ 435, /* GL_EYE_RADIAL_NV */
6438+ 434, /* GL_EYE_PLANE_ABSOLUTE_NV */
6439+ 206, /* GL_COMBINE */
6440+ 213, /* GL_COMBINE_RGB */
6441+ 208, /* GL_COMBINE_ALPHA */
6442+ 1290, /* GL_RGB_SCALE */
6443+ 24, /* GL_ADD_SIGNED */
6444+ 603, /* GL_INTERPOLATE */
6445+ 241, /* GL_CONSTANT */
6446+ 1155, /* GL_PRIMARY_COLOR */
6447+ 1152, /* GL_PREVIOUS */
6448+ 1356, /* GL_SOURCE0_RGB */
6449+ 1362, /* GL_SOURCE1_RGB */
6450+ 1368, /* GL_SOURCE2_RGB */
6451+ 1372, /* GL_SOURCE3_RGB_NV */
6452+ 1353, /* GL_SOURCE0_ALPHA */
6453+ 1359, /* GL_SOURCE1_ALPHA */
6454+ 1365, /* GL_SOURCE2_ALPHA */
6455+ 1371, /* GL_SOURCE3_ALPHA_NV */
6456+ 1001, /* GL_OPERAND0_RGB */
6457+ 1007, /* GL_OPERAND1_RGB */
6458+ 1013, /* GL_OPERAND2_RGB */
6459+ 1017, /* GL_OPERAND3_RGB_NV */
6460+ 998, /* GL_OPERAND0_ALPHA */
6461+ 1004, /* GL_OPERAND1_ALPHA */
6462+ 1010, /* GL_OPERAND2_ALPHA */
6463+ 1016, /* GL_OPERAND3_ALPHA_NV */
6464+ 1677, /* GL_VERTEX_ARRAY_BINDING_APPLE */
6465+ 1741, /* GL_YCBCR_422_APPLE */
6466+ 1666, /* GL_UNSIGNED_SHORT_8_8_APPLE */
6467+ 1668, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
6468+ 1347, /* GL_SLICE_ACCUM_SUN */
6469+ 1212, /* GL_QUAD_MESH_SUN */
6470+ 1639, /* GL_TRIANGLE_MESH_SUN */
6471+ 1715, /* GL_VERTEX_PROGRAM_ARB */
6472+ 1726, /* GL_VERTEX_STATE_PROGRAM_NV */
6473+ 1702, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
6474+ 1708, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
6475+ 1710, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
6476+ 1712, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
6477+ 301, /* GL_CURRENT_VERTEX_ATTRIB */
6478+ 1168, /* GL_PROGRAM_LENGTH_ARB */
6479+ 1182, /* GL_PROGRAM_STRING_ARB */
6480+ 931, /* GL_MODELVIEW_PROJECTION_NV */
6481+ 571, /* GL_IDENTITY_NV */
6482+ 616, /* GL_INVERSE_NV */
6483+ 1632, /* GL_TRANSPOSE_NV */
6484+ 617, /* GL_INVERSE_TRANSPOSE_NV */
6485+ 840, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
6486+ 839, /* GL_MAX_PROGRAM_MATRICES_ARB */
6487+ 747, /* GL_MATRIX0_NV */
6488+ 759, /* GL_MATRIX1_NV */
6489+ 771, /* GL_MATRIX2_NV */
6490+ 775, /* GL_MATRIX3_NV */
6491+ 777, /* GL_MATRIX4_NV */
6492+ 779, /* GL_MATRIX5_NV */
6493+ 781, /* GL_MATRIX6_NV */
6494+ 783, /* GL_MATRIX7_NV */
6495+ 286, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
6496+ 283, /* GL_CURRENT_MATRIX_ARB */
6497+ 1718, /* GL_VERTEX_PROGRAM_POINT_SIZE */
6498+ 1721, /* GL_VERTEX_PROGRAM_TWO_SIDE */
6499+ 1180, /* GL_PROGRAM_PARAMETER_NV */
6500+ 1706, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
6501+ 1184, /* GL_PROGRAM_TARGET_NV */
6502+ 1181, /* GL_PROGRAM_RESIDENT_NV */
6503+ 1624, /* GL_TRACK_MATRIX_NV */
6504+ 1625, /* GL_TRACK_MATRIX_TRANSFORM_NV */
6505+ 1716, /* GL_VERTEX_PROGRAM_BINDING_NV */
6506+ 1162, /* GL_PROGRAM_ERROR_POSITION_ARB */
6507+ 320, /* GL_DEPTH_CLAMP_NV */
6508+ 1684, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
6509+ 1691, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
6510+ 1692, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
6511+ 1693, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
6512+ 1694, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
6513+ 1695, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
6514+ 1696, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
6515+ 1697, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
6516+ 1698, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
6517+ 1699, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
6518+ 1685, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
6519+ 1686, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
6520+ 1687, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
6521+ 1688, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
6522+ 1689, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
6523+ 1690, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
6524+ 701, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
6525+ 708, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
6526+ 709, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
6527+ 710, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
6528+ 711, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
6529+ 712, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
6530+ 713, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
6531+ 714, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
6532+ 715, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
6533+ 716, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
6534+ 702, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
6535+ 703, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
6536+ 704, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
6537+ 705, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
6538+ 706, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
6539+ 707, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
6540+ 728, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
6541+ 735, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
6542+ 736, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
6543+ 737, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
6544+ 738, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
6545+ 739, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
6546+ 740, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
6547+ 1161, /* GL_PROGRAM_BINDING_ARB */
6548+ 742, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
6549+ 743, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
6550+ 729, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
6551+ 730, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
6552+ 731, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
6553+ 732, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
6554+ 733, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
6555+ 734, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
6556+ 1547, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
6557+ 1544, /* GL_TEXTURE_COMPRESSED */
6558+ 970, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
6559+ 240, /* GL_COMPRESSED_TEXTURE_FORMATS */
6560+ 879, /* GL_MAX_VERTEX_UNITS_ARB */
6561+ 22, /* GL_ACTIVE_VERTEX_UNITS_ARB */
6562+ 1736, /* GL_WEIGHT_SUM_UNITY_ARB */
6563+ 1714, /* GL_VERTEX_BLEND_ARB */
6564+ 303, /* GL_CURRENT_WEIGHT_ARB */
6565+ 1735, /* GL_WEIGHT_ARRAY_TYPE_ARB */
6566+ 1734, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
6567+ 1733, /* GL_WEIGHT_ARRAY_SIZE_ARB */
6568+ 1732, /* GL_WEIGHT_ARRAY_POINTER_ARB */
6569+ 1729, /* GL_WEIGHT_ARRAY_ARB */
6570+ 346, /* GL_DOT3_RGB */
6571+ 347, /* GL_DOT3_RGBA */
6572+ 238, /* GL_COMPRESSED_RGB_FXT1_3DFX */
6573+ 233, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
6574+ 939, /* GL_MULTISAMPLE_3DFX */
6575+ 1311, /* GL_SAMPLE_BUFFERS_3DFX */
6576+ 1302, /* GL_SAMPLES_3DFX */
6577+ 920, /* GL_MODELVIEW2_ARB */
6578+ 923, /* GL_MODELVIEW3_ARB */
6579+ 924, /* GL_MODELVIEW4_ARB */
6580+ 925, /* GL_MODELVIEW5_ARB */
6581+ 926, /* GL_MODELVIEW6_ARB */
6582+ 927, /* GL_MODELVIEW7_ARB */
6583+ 928, /* GL_MODELVIEW8_ARB */
6584+ 929, /* GL_MODELVIEW9_ARB */
6585+ 899, /* GL_MODELVIEW10_ARB */
6586+ 900, /* GL_MODELVIEW11_ARB */
6587+ 901, /* GL_MODELVIEW12_ARB */
6588+ 902, /* GL_MODELVIEW13_ARB */
6589+ 903, /* GL_MODELVIEW14_ARB */
6590+ 904, /* GL_MODELVIEW15_ARB */
6591+ 905, /* GL_MODELVIEW16_ARB */
6592+ 906, /* GL_MODELVIEW17_ARB */
6593+ 907, /* GL_MODELVIEW18_ARB */
6594+ 908, /* GL_MODELVIEW19_ARB */
6595+ 910, /* GL_MODELVIEW20_ARB */
6596+ 911, /* GL_MODELVIEW21_ARB */
6597+ 912, /* GL_MODELVIEW22_ARB */
6598+ 913, /* GL_MODELVIEW23_ARB */
6599+ 914, /* GL_MODELVIEW24_ARB */
6600+ 915, /* GL_MODELVIEW25_ARB */
6601+ 916, /* GL_MODELVIEW26_ARB */
6602+ 917, /* GL_MODELVIEW27_ARB */
6603+ 918, /* GL_MODELVIEW28_ARB */
6604+ 919, /* GL_MODELVIEW29_ARB */
6605+ 921, /* GL_MODELVIEW30_ARB */
6606+ 922, /* GL_MODELVIEW31_ARB */
6607+ 351, /* GL_DOT3_RGB_EXT */
6608+ 349, /* GL_DOT3_RGBA_EXT */
6609+ 893, /* GL_MIRROR_CLAMP_EXT */
6610+ 896, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
6611+ 934, /* GL_MODULATE_ADD_ATI */
6612+ 935, /* GL_MODULATE_SIGNED_ADD_ATI */
6613+ 936, /* GL_MODULATE_SUBTRACT_ATI */
6614+ 1742, /* GL_YCBCR_MESA */
6615+ 1025, /* GL_PACK_INVERT_MESA */
6616+ 306, /* GL_DEBUG_OBJECT_MESA */
6617+ 307, /* GL_DEBUG_PRINT_MESA */
6618+ 305, /* GL_DEBUG_ASSERT_MESA */
6619+ 107, /* GL_BUFFER_SIZE */
6620+ 109, /* GL_BUFFER_USAGE */
6621+ 1398, /* GL_STENCIL_BACK_FUNC */
6622+ 1397, /* GL_STENCIL_BACK_FAIL */
6623+ 1399, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
6624+ 1400, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
6625+ 485, /* GL_FRAGMENT_PROGRAM_ARB */
6626+ 1159, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
6627+ 1187, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
6628+ 1186, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
6629+ 1171, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
6630+ 1177, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
6631+ 1176, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
6632+ 829, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
6633+ 852, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
6634+ 851, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
6635+ 842, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
6636+ 848, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
6637+ 847, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
6638+ 812, /* GL_MAX_DRAW_BUFFERS */
6639+ 355, /* GL_DRAW_BUFFER0 */
6640+ 358, /* GL_DRAW_BUFFER1 */
6641+ 379, /* GL_DRAW_BUFFER2 */
6642+ 382, /* GL_DRAW_BUFFER3 */
6643+ 385, /* GL_DRAW_BUFFER4 */
6644+ 388, /* GL_DRAW_BUFFER5 */
6645+ 391, /* GL_DRAW_BUFFER6 */
6646+ 394, /* GL_DRAW_BUFFER7 */
6647+ 397, /* GL_DRAW_BUFFER8 */
6648+ 400, /* GL_DRAW_BUFFER9 */
6649+ 359, /* GL_DRAW_BUFFER10 */
6650+ 362, /* GL_DRAW_BUFFER11 */
6651+ 365, /* GL_DRAW_BUFFER12 */
6652+ 368, /* GL_DRAW_BUFFER13 */
6653+ 371, /* GL_DRAW_BUFFER14 */
6654+ 374, /* GL_DRAW_BUFFER15 */
6655+ 82, /* GL_BLEND_EQUATION_ALPHA */
6656+ 792, /* GL_MATRIX_PALETTE_ARB */
6657+ 823, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
6658+ 826, /* GL_MAX_PALETTE_MATRICES_ARB */
6659+ 289, /* GL_CURRENT_PALETTE_MATRIX_ARB */
6660+ 786, /* GL_MATRIX_INDEX_ARRAY_ARB */
6661+ 284, /* GL_CURRENT_MATRIX_INDEX_ARB */
6662+ 788, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
6663+ 790, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
6664+ 789, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
6665+ 787, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
6666+ 1573, /* GL_TEXTURE_DEPTH_SIZE */
6667+ 339, /* GL_DEPTH_TEXTURE_MODE */
6668+ 1539, /* GL_TEXTURE_COMPARE_MODE */
6669+ 1537, /* GL_TEXTURE_COMPARE_FUNC */
6670+ 217, /* GL_COMPARE_R_TO_TEXTURE */
6671+ 1093, /* GL_POINT_SPRITE */
6672+ 266, /* GL_COORD_REPLACE */
6673+ 1097, /* GL_POINT_SPRITE_R_MODE_NV */
6674+ 1214, /* GL_QUERY_COUNTER_BITS */
6675+ 291, /* GL_CURRENT_QUERY */
6676+ 1216, /* GL_QUERY_RESULT */
6677+ 1218, /* GL_QUERY_RESULT_AVAILABLE */
6678+ 873, /* GL_MAX_VERTEX_ATTRIBS */
6679+ 1704, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
6680+ 337, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
6681+ 336, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
6682+ 859, /* GL_MAX_TEXTURE_COORDS */
6683+ 861, /* GL_MAX_TEXTURE_IMAGE_UNITS */
6684+ 1164, /* GL_PROGRAM_ERROR_STRING_ARB */
6685+ 1166, /* GL_PROGRAM_FORMAT_ASCII_ARB */
6686+ 1165, /* GL_PROGRAM_FORMAT_ARB */
6687+ 1618, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
6688+ 318, /* GL_DEPTH_BOUNDS_TEST_EXT */
6689+ 317, /* GL_DEPTH_BOUNDS_EXT */
6690+ 52, /* GL_ARRAY_BUFFER */
6691+ 420, /* GL_ELEMENT_ARRAY_BUFFER */
6692+ 54, /* GL_ARRAY_BUFFER_BINDING */
6693+ 422, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
6694+ 1678, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
6695+ 960, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
6696+ 140, /* GL_COLOR_ARRAY_BUFFER_BINDING */
6697+ 579, /* GL_INDEX_ARRAY_BUFFER_BINDING */
6698+ 1552, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
6699+ 416, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
6700+ 1323, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
6701+ 463, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
6702+ 1730, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
6703+ 1700, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
6704+ 1167, /* GL_PROGRAM_INSTRUCTIONS_ARB */
6705+ 835, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
6706+ 1173, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
6707+ 844, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
6708+ 1185, /* GL_PROGRAM_TEMPORARIES_ARB */
6709+ 850, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
6710+ 1175, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
6711+ 846, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
6712+ 1179, /* GL_PROGRAM_PARAMETERS_ARB */
6713+ 849, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
6714+ 1174, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
6715+ 845, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
6716+ 1160, /* GL_PROGRAM_ATTRIBS_ARB */
6717+ 830, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
6718+ 1172, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
6719+ 843, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
6720+ 1158, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
6721+ 828, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
6722+ 1170, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
6723+ 841, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
6724+ 836, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
6725+ 832, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
6726+ 1188, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
6727+ 1629, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
6728+ 1226, /* GL_READ_ONLY */
6729+ 1738, /* GL_WRITE_ONLY */
6730+ 1228, /* GL_READ_WRITE */
6731+ 101, /* GL_BUFFER_ACCESS */
6732+ 103, /* GL_BUFFER_MAPPED */
6733+ 105, /* GL_BUFFER_MAP_POINTER */
6734+ 1623, /* GL_TIME_ELAPSED_EXT */
6735+ 746, /* GL_MATRIX0_ARB */
6736+ 758, /* GL_MATRIX1_ARB */
6737+ 770, /* GL_MATRIX2_ARB */
6738+ 774, /* GL_MATRIX3_ARB */
6739+ 776, /* GL_MATRIX4_ARB */
6740+ 778, /* GL_MATRIX5_ARB */
6741+ 780, /* GL_MATRIX6_ARB */
6742+ 782, /* GL_MATRIX7_ARB */
6743+ 784, /* GL_MATRIX8_ARB */
6744+ 785, /* GL_MATRIX9_ARB */
6745+ 748, /* GL_MATRIX10_ARB */
6746+ 749, /* GL_MATRIX11_ARB */
6747+ 750, /* GL_MATRIX12_ARB */
6748+ 751, /* GL_MATRIX13_ARB */
6749+ 752, /* GL_MATRIX14_ARB */
6750+ 753, /* GL_MATRIX15_ARB */
6751+ 754, /* GL_MATRIX16_ARB */
6752+ 755, /* GL_MATRIX17_ARB */
6753+ 756, /* GL_MATRIX18_ARB */
6754+ 757, /* GL_MATRIX19_ARB */
6755+ 760, /* GL_MATRIX20_ARB */
6756+ 761, /* GL_MATRIX21_ARB */
6757+ 762, /* GL_MATRIX22_ARB */
6758+ 763, /* GL_MATRIX23_ARB */
6759+ 764, /* GL_MATRIX24_ARB */
6760+ 765, /* GL_MATRIX25_ARB */
6761+ 766, /* GL_MATRIX26_ARB */
6762+ 767, /* GL_MATRIX27_ARB */
6763+ 768, /* GL_MATRIX28_ARB */
6764+ 769, /* GL_MATRIX29_ARB */
6765+ 772, /* GL_MATRIX30_ARB */
6766+ 773, /* GL_MATRIX31_ARB */
6767+ 1425, /* GL_STREAM_DRAW */
6768+ 1427, /* GL_STREAM_READ */
6769+ 1423, /* GL_STREAM_COPY */
6770+ 1391, /* GL_STATIC_DRAW */
6771+ 1393, /* GL_STATIC_READ */
6772+ 1389, /* GL_STATIC_COPY */
6773+ 410, /* GL_DYNAMIC_DRAW */
6774+ 412, /* GL_DYNAMIC_READ */
6775+ 408, /* GL_DYNAMIC_COPY */
6776+ 535, /* GL_GL_PIXEL_PACK_BUFFER */
6777+ 537, /* GL_GL_PIXEL_UNPACK_BUFFER */
6778+ 536, /* GL_GL_PIXEL_PACK_BUFFER_BINDING */
6779+ 538, /* GL_GL_PIXEL_UNPACK_BUFFER_BINDING */
6780+ 833, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
6781+ 831, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
6782+ 834, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
6783+ 838, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
6784+ 837, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
6785+ 795, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
6786+ 1419, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
6787+ 17, /* GL_ACTIVE_STENCIL_FACE_EXT */
6788+ 894, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
6789+ 1304, /* GL_SAMPLES_PASSED */
6790+ 486, /* GL_FRAGMENT_SHADER */
6791+ 1724, /* GL_VERTEX_SHADER */
6792+ 1178, /* GL_PROGRAM_OBJECT_ARB */
6793+ 1336, /* GL_SHADER_OBJECT_ARB */
6794+ 819, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
6795+ 877, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
6796+ 871, /* GL_MAX_VARYING_FLOATS */
6797+ 875, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
6798+ 804, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
6799+ 985, /* GL_OBJECT_TYPE_ARB */
6800+ 1338, /* GL_SHADER_TYPE */
6801+ 451, /* GL_FLOAT_VEC2 */
6802+ 453, /* GL_FLOAT_VEC3 */
6803+ 455, /* GL_FLOAT_VEC4 */
6804+ 606, /* GL_INT_VEC2 */
6805+ 608, /* GL_INT_VEC3 */
6806+ 610, /* GL_INT_VEC4 */
6807+ 93, /* GL_BOOL */
6808+ 95, /* GL_BOOL_VEC2 */
6809+ 97, /* GL_BOOL_VEC3 */
6810+ 99, /* GL_BOOL_VEC4 */
6811+ 445, /* GL_FLOAT_MAT2 */
6812+ 447, /* GL_FLOAT_MAT3 */
6813+ 449, /* GL_FLOAT_MAT4 */
6814+ 1295, /* GL_SAMPLER_1D */
6815+ 1297, /* GL_SAMPLER_2D */
6816+ 1299, /* GL_SAMPLER_3D */
6817+ 1300, /* GL_SAMPLER_CUBE */
6818+ 1296, /* GL_SAMPLER_1D_SHADOW */
6819+ 1298, /* GL_SAMPLER_2D_SHADOW */
6820+ 529, /* GL_GL_FLOAT_MAT2x3 */
6821+ 530, /* GL_GL_FLOAT_MAT2x4 */
6822+ 531, /* GL_GL_FLOAT_MAT3x2 */
6823+ 532, /* GL_GL_FLOAT_MAT3x4 */
6824+ 533, /* GL_GL_FLOAT_MAT4x2 */
6825+ 534, /* GL_GL_FLOAT_MAT4x3 */
6826+ 312, /* GL_DELETE_STATUS */
6827+ 221, /* GL_COMPILE_STATUS */
6828+ 659, /* GL_LINK_STATUS */
6829+ 1673, /* GL_VALIDATE_STATUS */
6830+ 591, /* GL_INFO_LOG_LENGTH */
6831+ 56, /* GL_ATTACHED_SHADERS */
6832+ 20, /* GL_ACTIVE_UNIFORMS */
6833+ 21, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
6834+ 1337, /* GL_SHADER_SOURCE_LENGTH */
6835+ 15, /* GL_ACTIVE_ATTRIBUTES */
6836+ 16, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
6837+ 488, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
6838+ 1340, /* GL_SHADING_LANGUAGE_VERSION */
6839+ 290, /* GL_CURRENT_PROGRAM */
6840+ 1034, /* GL_PALETTE4_RGB8_OES */
6841+ 1036, /* GL_PALETTE4_RGBA8_OES */
6842+ 1032, /* GL_PALETTE4_R5_G6_B5_OES */
6843+ 1035, /* GL_PALETTE4_RGBA4_OES */
6844+ 1033, /* GL_PALETTE4_RGB5_A1_OES */
6845+ 1039, /* GL_PALETTE8_RGB8_OES */
6846+ 1041, /* GL_PALETTE8_RGBA8_OES */
6847+ 1037, /* GL_PALETTE8_R5_G6_B5_OES */
6848+ 1040, /* GL_PALETTE8_RGBA4_OES */
6849+ 1038, /* GL_PALETTE8_RGB5_A1_OES */
6850+ 574, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
6851+ 573, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
6852+ 1507, /* GL_TEXTURE_1D_ARRAY_EXT */
6853+ 1198, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
6854+ 1509, /* GL_TEXTURE_2D_ARRAY_EXT */
6855+ 1201, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
6856+ 1515, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
6857+ 1517, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
6858+ 543, /* GL_GL_SRGB */
6859+ 544, /* GL_GL_SRGB8 */
6860+ 546, /* GL_GL_SRGB_ALPHA */
6861+ 545, /* GL_GL_SRGB8_ALPHA8 */
6862+ 542, /* GL_GL_SLUMINANCE_ALPHA */
6863+ 541, /* GL_GL_SLUMINANCE8_ALPHA8 */
6864+ 539, /* GL_GL_SLUMINANCE */
6865+ 540, /* GL_GL_SLUMINANCE8 */
6866+ 526, /* GL_GL_COMPRESSED_SRGB */
6867+ 527, /* GL_GL_COMPRESSED_SRGB_ALPHA */
6868+ 524, /* GL_GL_COMPRESSED_SLUMINANCE */
6869+ 525, /* GL_GL_COMPRESSED_SLUMINANCE_ALPHA */
6870+ 1095, /* GL_POINT_SPRITE_COORD_ORIGIN */
6871+ 667, /* GL_LOWER_LEFT */
6872+ 1670, /* GL_UPPER_LEFT */
6873+ 1401, /* GL_STENCIL_BACK_REF */
6874+ 1402, /* GL_STENCIL_BACK_VALUE_MASK */
6875+ 1403, /* GL_STENCIL_BACK_WRITEMASK */
6876+ 403, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
6877+ 1240, /* GL_RENDERBUFFER_BINDING_EXT */
6878+ 1225, /* GL_READ_FRAMEBUFFER_EXT */
6879+ 404, /* GL_DRAW_FRAMEBUFFER_EXT */
6880+ 1224, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
6881+ 490, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
6882+ 489, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
6883+ 494, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
6884+ 492, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
6885+ 491, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
6886+ 496, /* GL_FRAMEBUFFER_COMPLETE_EXT */
6887+ 498, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
6888+ 503, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
6889+ 501, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
6890+ 499, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
6891+ 502, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
6892+ 500, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
6893+ 504, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
6894+ 506, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
6895+ 505, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
6896+ 801, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
6897+ 146, /* GL_COLOR_ATTACHMENT0_EXT */
6898+ 153, /* GL_COLOR_ATTACHMENT1_EXT */
6899+ 154, /* GL_COLOR_ATTACHMENT2_EXT */
6900+ 155, /* GL_COLOR_ATTACHMENT3_EXT */
6901+ 156, /* GL_COLOR_ATTACHMENT4_EXT */
6902+ 157, /* GL_COLOR_ATTACHMENT5_EXT */
6903+ 158, /* GL_COLOR_ATTACHMENT6_EXT */
6904+ 159, /* GL_COLOR_ATTACHMENT7_EXT */
6905+ 160, /* GL_COLOR_ATTACHMENT8_EXT */
6906+ 161, /* GL_COLOR_ATTACHMENT9_EXT */
6907+ 147, /* GL_COLOR_ATTACHMENT10_EXT */
6908+ 148, /* GL_COLOR_ATTACHMENT11_EXT */
6909+ 149, /* GL_COLOR_ATTACHMENT12_EXT */
6910+ 150, /* GL_COLOR_ATTACHMENT13_EXT */
6911+ 151, /* GL_COLOR_ATTACHMENT14_EXT */
6912+ 152, /* GL_COLOR_ATTACHMENT15_EXT */
6913+ 314, /* GL_DEPTH_ATTACHMENT_EXT */
6914+ 1396, /* GL_STENCIL_ATTACHMENT_EXT */
6915+ 497, /* GL_FRAMEBUFFER_EXT */
6916+ 1241, /* GL_RENDERBUFFER_EXT */
6917+ 1244, /* GL_RENDERBUFFER_WIDTH_EXT */
6918+ 1242, /* GL_RENDERBUFFER_HEIGHT_EXT */
6919+ 1243, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
6920+ 1414, /* GL_STENCIL_INDEX_EXT */
6921+ 1411, /* GL_STENCIL_INDEX1_EXT */
6922+ 1412, /* GL_STENCIL_INDEX4_EXT */
6923+ 1413, /* GL_STENCIL_INDEX8_EXT */
6924+ 1410, /* GL_STENCIL_INDEX16_EXT */
6925+ 428, /* GL_EVAL_BIT */
6926+ 1222, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
6927+ 661, /* GL_LIST_BIT */
6928+ 1523, /* GL_TEXTURE_BIT */
6929+ 1319, /* GL_SCISSOR_BIT */
6930+ 29, /* GL_ALL_ATTRIB_BITS */
6931+ 941, /* GL_MULTISAMPLE_BIT */
6932+ 30, /* GL_ALL_CLIENT_ATTRIB_BITS */
6933+};
6934+
6935+#define Elements(x) sizeof(x)/sizeof(*x)
6936+
6937+typedef int (*cfunc)(const void *, const void *);
6938+
6939+/**
6940+ * Compare a key name to an element in the \c all_enums array.
6941+ *
6942+ * \c bsearch always passes the key as the first parameter and the pointer
6943+ * to the array element as the second parameter. We can elimiate some
6944+ * extra work by taking advantage of that fact.
6945+ *
6946+ * \param a Pointer to the desired enum name.
6947+ * \param b Pointer to an element of the \c all_enums array.
6948+ */
6949+static int compar_name( const char *a, const enum_elt *b )
6950+{
6951+ return _mesa_strcmp( a, & enum_string_table[ b->offset ] );
6952+}
6953+
6954+/**
6955+ * Compare a key enum value to an element in the \c all_enums array.
6956+ *
6957+ * \c bsearch always passes the key as the first parameter and the pointer
6958+ * to the array element as the second parameter. We can elimiate some
6959+ * extra work by taking advantage of that fact.
6960+ *
6961+ * \param a Pointer to the desired enum name.
6962+ * \param b Pointer to an index into the \c all_enums array.
6963+ */
6964+static int compar_nr( const int *a, const unsigned *b )
6965+{
6966+ return a[0] - all_enums[*b].n;
6967+}
6968+
6969+
6970+static char token_tmp[20];
6971+
6972+const char *_mesa_lookup_enum_by_nr( int nr )
6973+{
6974+ unsigned * i;
6975+
6976+ i = (unsigned *)bsearch( & nr, reduced_enums, Elements(reduced_enums),
6977+ sizeof(reduced_enums[0]), (cfunc) compar_nr );
6978+
6979+ if ( i != NULL ) {
6980+ return & enum_string_table[ all_enums[ *i ].offset ];
6981+ }
6982+ else {
6983+ /* this is not re-entrant safe, no big deal here */
6984+ _mesa_sprintf(token_tmp, "0x%x", nr);
6985+ return token_tmp;
6986+ }
6987+}
6988+
6989+int _mesa_lookup_enum_by_name( const char *symbol )
6990+{
6991+ enum_elt * f = NULL;
6992+
6993+ if ( symbol != NULL ) {
6994+ f = (enum_elt *)bsearch( symbol, all_enums, Elements(all_enums),
6995+ sizeof( enum_elt ), (cfunc) compar_name );
6996+ }
6997+
6998+ return (f != NULL) ? f->n : -1;
6999+}
7000+
7001+
7002Index: qemu-0.13.0/target-i386/mesa_get.c
7003===================================================================
7004--- /dev/null 1970-01-01 00:00:00.000000000 +0000
7005+++ qemu-0.13.0/target-i386/mesa_get.c 2011-01-17 16:42:36.000000000 +0800
7006@@ -0,0 +1,5563 @@
7007+
7008+/***
7009+ *** NOTE!!! DO NOT EDIT THIS FILE!!! IT IS GENERATED BY get_gen.py
7010+ ***/
7011+
7012+#include "glheader.h"
7013+#include "context.h"
7014+#include "enable.h"
7015+#include "extensions.h"
7016+#include "fbobject.h"
7017+#include "get.h"
7018+#include "macros.h"
7019+#include "mtypes.h"
7020+#include "state.h"
7021+#include "texcompress.h"
7022+
7023+
7024+#define FLOAT_TO_BOOLEAN(X) ( (X) ? GL_TRUE : GL_FALSE )
7025+
7026+#define INT_TO_BOOLEAN(I) ( (I) ? GL_TRUE : GL_FALSE )
7027+
7028+#define ENUM_TO_BOOLEAN(E) ( (E) ? GL_TRUE : GL_FALSE )
7029+#define ENUM_TO_INT(E) ( (GLint) (E) )
7030+#define ENUM_TO_FLOAT(E) ( (GLfloat) (E) )
7031+
7032+#define BOOLEAN_TO_INT(B) ( (GLint) (B) )
7033+#define BOOLEAN_TO_FLOAT(B) ( (B) ? 1.0F : 0.0F )
7034+
7035+
7036+/*
7037+ * Check if named extension is enabled, if not generate error and return.
7038+ */
7039+#define CHECK_EXT1(EXT1, FUNC) \
7040+ if (!ctx->Extensions.EXT1) { \
7041+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
7042+ return; \
7043+ }
7044+
7045+/*
7046+ * Check if either of two extensions is enabled.
7047+ */
7048+#define CHECK_EXT2(EXT1, EXT2, FUNC) \
7049+ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2) { \
7050+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
7051+ return; \
7052+ }
7053+
7054+/*
7055+ * Check if either of three extensions is enabled.
7056+ */
7057+#define CHECK_EXT3(EXT1, EXT2, EXT3, FUNC) \
7058+ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2 && \
7059+ !ctx->Extensions.EXT3) { \
7060+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
7061+ return; \
7062+ }
7063+
7064+/*
7065+ * Check if either of four extensions is enabled.
7066+ */
7067+#define CHECK_EXT4(EXT1, EXT2, EXT3, EXT4, FUNC) \
7068+ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2 && \
7069+ !ctx->Extensions.EXT3 && !ctx->Extensions.EXT4) { \
7070+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
7071+ return; \
7072+ }
7073+
7074+
7075+void GLAPIENTRY
7076+_mesa_GetBooleanv( GLenum pname, GLboolean *params )
7077+{
7078+ GET_CURRENT_CONTEXT(ctx);
7079+ ASSERT_OUTSIDE_BEGIN_END(ctx);
7080+
7081+ if (!params)
7082+ return;
7083+
7084+ if (ctx->NewState)
7085+ _mesa_update_state(ctx);
7086+
7087+ if (ctx->Driver.GetBooleanv &&
7088+ ctx->Driver.GetBooleanv(ctx, pname, params))
7089+ return;
7090+
7091+ switch (pname) {
7092+ case GL_ACCUM_RED_BITS:
7093+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumRedBits);
7094+ break;
7095+ case GL_ACCUM_GREEN_BITS:
7096+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumGreenBits);
7097+ break;
7098+ case GL_ACCUM_BLUE_BITS:
7099+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumBlueBits);
7100+ break;
7101+ case GL_ACCUM_ALPHA_BITS:
7102+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumAlphaBits);
7103+ break;
7104+ case GL_ACCUM_CLEAR_VALUE:
7105+ params[0] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[0]);
7106+ params[1] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[1]);
7107+ params[2] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[2]);
7108+ params[3] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[3]);
7109+ break;
7110+ case GL_ALPHA_BIAS:
7111+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.AlphaBias);
7112+ break;
7113+ case GL_ALPHA_BITS:
7114+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.alphaBits);
7115+ break;
7116+ case GL_ALPHA_SCALE:
7117+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.AlphaScale);
7118+ break;
7119+ case GL_ALPHA_TEST:
7120+ params[0] = ctx->Color.AlphaEnabled;
7121+ break;
7122+ case GL_ALPHA_TEST_FUNC:
7123+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.AlphaFunc);
7124+ break;
7125+ case GL_ALPHA_TEST_REF:
7126+ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.AlphaRef);
7127+ break;
7128+ case GL_ATTRIB_STACK_DEPTH:
7129+ params[0] = INT_TO_BOOLEAN(ctx->AttribStackDepth);
7130+ break;
7131+ case GL_AUTO_NORMAL:
7132+ params[0] = ctx->Eval.AutoNormal;
7133+ break;
7134+ case GL_AUX_BUFFERS:
7135+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.numAuxBuffers);
7136+ break;
7137+ case GL_BLEND:
7138+ params[0] = ctx->Color.BlendEnabled;
7139+ break;
7140+ case GL_BLEND_DST:
7141+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstRGB);
7142+ break;
7143+ case GL_BLEND_SRC:
7144+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcRGB);
7145+ break;
7146+ case GL_BLEND_SRC_RGB_EXT:
7147+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcRGB);
7148+ break;
7149+ case GL_BLEND_DST_RGB_EXT:
7150+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstRGB);
7151+ break;
7152+ case GL_BLEND_SRC_ALPHA_EXT:
7153+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcA);
7154+ break;
7155+ case GL_BLEND_DST_ALPHA_EXT:
7156+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstA);
7157+ break;
7158+ case GL_BLEND_EQUATION:
7159+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendEquationRGB );
7160+ break;
7161+ case GL_BLEND_EQUATION_ALPHA_EXT:
7162+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendEquationA );
7163+ break;
7164+ case GL_BLEND_COLOR_EXT:
7165+ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[0]);
7166+ params[1] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[1]);
7167+ params[2] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[2]);
7168+ params[3] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[3]);
7169+ break;
7170+ case GL_BLUE_BIAS:
7171+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.BlueBias);
7172+ break;
7173+ case GL_BLUE_BITS:
7174+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.blueBits);
7175+ break;
7176+ case GL_BLUE_SCALE:
7177+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.BlueScale);
7178+ break;
7179+ case GL_CLIENT_ATTRIB_STACK_DEPTH:
7180+ params[0] = INT_TO_BOOLEAN(ctx->ClientAttribStackDepth);
7181+ break;
7182+ case GL_CLIP_PLANE0:
7183+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 0) & 1;
7184+ break;
7185+ case GL_CLIP_PLANE1:
7186+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 1) & 1;
7187+ break;
7188+ case GL_CLIP_PLANE2:
7189+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 2) & 1;
7190+ break;
7191+ case GL_CLIP_PLANE3:
7192+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 3) & 1;
7193+ break;
7194+ case GL_CLIP_PLANE4:
7195+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 4) & 1;
7196+ break;
7197+ case GL_CLIP_PLANE5:
7198+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 5) & 1;
7199+ break;
7200+ case GL_COLOR_CLEAR_VALUE:
7201+ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[0]);
7202+ params[1] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[1]);
7203+ params[2] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[2]);
7204+ params[3] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[3]);
7205+ break;
7206+ case GL_COLOR_MATERIAL:
7207+ params[0] = ctx->Light.ColorMaterialEnabled;
7208+ break;
7209+ case GL_COLOR_MATERIAL_FACE:
7210+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ColorMaterialFace);
7211+ break;
7212+ case GL_COLOR_MATERIAL_PARAMETER:
7213+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ColorMaterialMode);
7214+ break;
7215+ case GL_COLOR_WRITEMASK:
7216+ params[0] = INT_TO_BOOLEAN(ctx->Color.ColorMask[RCOMP] ? 1 : 0);
7217+ params[1] = INT_TO_BOOLEAN(ctx->Color.ColorMask[GCOMP] ? 1 : 0);
7218+ params[2] = INT_TO_BOOLEAN(ctx->Color.ColorMask[BCOMP] ? 1 : 0);
7219+ params[3] = INT_TO_BOOLEAN(ctx->Color.ColorMask[ACOMP] ? 1 : 0);
7220+ break;
7221+ case GL_CULL_FACE:
7222+ params[0] = ctx->Polygon.CullFlag;
7223+ break;
7224+ case GL_CULL_FACE_MODE:
7225+ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.CullFaceMode);
7226+ break;
7227+ case GL_CURRENT_COLOR:
7228+ {
7229+ FLUSH_CURRENT(ctx, 0);
7230+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]);
7231+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]);
7232+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]);
7233+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]);
7234+ }
7235+ break;
7236+ case GL_CURRENT_INDEX:
7237+ {
7238+ FLUSH_CURRENT(ctx, 0);
7239+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]);
7240+ }
7241+ break;
7242+ case GL_CURRENT_NORMAL:
7243+ {
7244+ FLUSH_CURRENT(ctx, 0);
7245+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]);
7246+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]);
7247+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]);
7248+ }
7249+ break;
7250+ case GL_CURRENT_RASTER_COLOR:
7251+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[0]);
7252+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[1]);
7253+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[2]);
7254+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[3]);
7255+ break;
7256+ case GL_CURRENT_RASTER_DISTANCE:
7257+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterDistance);
7258+ break;
7259+ case GL_CURRENT_RASTER_INDEX:
7260+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterIndex);
7261+ break;
7262+ case GL_CURRENT_RASTER_POSITION:
7263+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[0]);
7264+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[1]);
7265+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[2]);
7266+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[3]);
7267+ break;
7268+ case GL_CURRENT_RASTER_SECONDARY_COLOR:
7269+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[0]);
7270+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[1]);
7271+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[2]);
7272+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[3]);
7273+ break;
7274+ case GL_CURRENT_RASTER_TEXTURE_COORDS:
7275+ {
7276+ const GLuint texUnit = ctx->Texture.CurrentUnit;
7277+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][0]);
7278+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][1]);
7279+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][2]);
7280+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][3]);
7281+ }
7282+ break;
7283+ case GL_CURRENT_RASTER_POSITION_VALID:
7284+ params[0] = ctx->Current.RasterPosValid;
7285+ break;
7286+ case GL_CURRENT_TEXTURE_COORDS:
7287+ {
7288+ const GLuint texUnit = ctx->Texture.CurrentUnit;
7289+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]);
7290+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]);
7291+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]);
7292+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]);
7293+ }
7294+ break;
7295+ case GL_DEPTH_BIAS:
7296+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.DepthBias);
7297+ break;
7298+ case GL_DEPTH_BITS:
7299+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.depthBits);
7300+ break;
7301+ case GL_DEPTH_CLEAR_VALUE:
7302+ params[0] = FLOAT_TO_BOOLEAN(ctx->Depth.Clear);
7303+ break;
7304+ case GL_DEPTH_FUNC:
7305+ params[0] = ENUM_TO_BOOLEAN(ctx->Depth.Func);
7306+ break;
7307+ case GL_DEPTH_RANGE:
7308+ params[0] = FLOAT_TO_BOOLEAN(ctx->Viewport.Near);
7309+ params[1] = FLOAT_TO_BOOLEAN(ctx->Viewport.Far);
7310+ break;
7311+ case GL_DEPTH_SCALE:
7312+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.DepthScale);
7313+ break;
7314+ case GL_DEPTH_TEST:
7315+ params[0] = ctx->Depth.Test;
7316+ break;
7317+ case GL_DEPTH_WRITEMASK:
7318+ params[0] = ctx->Depth.Mask;
7319+ break;
7320+ case GL_DITHER:
7321+ params[0] = ctx->Color.DitherFlag;
7322+ break;
7323+ case GL_DOUBLEBUFFER:
7324+ params[0] = ctx->DrawBuffer->Visual.doubleBufferMode;
7325+ break;
7326+ case GL_DRAW_BUFFER:
7327+ params[0] = ENUM_TO_BOOLEAN(ctx->DrawBuffer->ColorDrawBuffer[0]);
7328+ break;
7329+ case GL_EDGE_FLAG:
7330+ {
7331+ FLUSH_CURRENT(ctx, 0);
7332+ params[0] = ctx->Current.EdgeFlag;
7333+ }
7334+ break;
7335+ case GL_FEEDBACK_BUFFER_SIZE:
7336+ params[0] = INT_TO_BOOLEAN(ctx->Feedback.BufferSize);
7337+ break;
7338+ case GL_FEEDBACK_BUFFER_TYPE:
7339+ params[0] = ENUM_TO_BOOLEAN(ctx->Feedback.Type);
7340+ break;
7341+ case GL_FOG:
7342+ params[0] = ctx->Fog.Enabled;
7343+ break;
7344+ case GL_FOG_COLOR:
7345+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[0]);
7346+ params[1] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[1]);
7347+ params[2] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[2]);
7348+ params[3] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[3]);
7349+ break;
7350+ case GL_FOG_DENSITY:
7351+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Density);
7352+ break;
7353+ case GL_FOG_END:
7354+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.End);
7355+ break;
7356+ case GL_FOG_HINT:
7357+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.Fog);
7358+ break;
7359+ case GL_FOG_INDEX:
7360+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Index);
7361+ break;
7362+ case GL_FOG_MODE:
7363+ params[0] = ENUM_TO_BOOLEAN(ctx->Fog.Mode);
7364+ break;
7365+ case GL_FOG_START:
7366+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Start);
7367+ break;
7368+ case GL_FRONT_FACE:
7369+ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.FrontFace);
7370+ break;
7371+ case GL_GREEN_BIAS:
7372+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.GreenBias);
7373+ break;
7374+ case GL_GREEN_BITS:
7375+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.greenBits);
7376+ break;
7377+ case GL_GREEN_SCALE:
7378+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.GreenScale);
7379+ break;
7380+ case GL_INDEX_BITS:
7381+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.indexBits);
7382+ break;
7383+ case GL_INDEX_CLEAR_VALUE:
7384+ params[0] = INT_TO_BOOLEAN(ctx->Color.ClearIndex);
7385+ break;
7386+ case GL_INDEX_MODE:
7387+ params[0] = !ctx->DrawBuffer->Visual.rgbMode;
7388+ break;
7389+ case GL_INDEX_OFFSET:
7390+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.IndexOffset);
7391+ break;
7392+ case GL_INDEX_SHIFT:
7393+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.IndexShift);
7394+ break;
7395+ case GL_INDEX_WRITEMASK:
7396+ params[0] = INT_TO_BOOLEAN(ctx->Color.IndexMask);
7397+ break;
7398+ case GL_LIGHT0:
7399+ params[0] = ctx->Light.Light[0].Enabled;
7400+ break;
7401+ case GL_LIGHT1:
7402+ params[0] = ctx->Light.Light[1].Enabled;
7403+ break;
7404+ case GL_LIGHT2:
7405+ params[0] = ctx->Light.Light[2].Enabled;
7406+ break;
7407+ case GL_LIGHT3:
7408+ params[0] = ctx->Light.Light[3].Enabled;
7409+ break;
7410+ case GL_LIGHT4:
7411+ params[0] = ctx->Light.Light[4].Enabled;
7412+ break;
7413+ case GL_LIGHT5:
7414+ params[0] = ctx->Light.Light[5].Enabled;
7415+ break;
7416+ case GL_LIGHT6:
7417+ params[0] = ctx->Light.Light[6].Enabled;
7418+ break;
7419+ case GL_LIGHT7:
7420+ params[0] = ctx->Light.Light[7].Enabled;
7421+ break;
7422+ case GL_LIGHTING:
7423+ params[0] = ctx->Light.Enabled;
7424+ break;
7425+ case GL_LIGHT_MODEL_AMBIENT:
7426+ params[0] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[0]);
7427+ params[1] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[1]);
7428+ params[2] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[2]);
7429+ params[3] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[3]);
7430+ break;
7431+ case GL_LIGHT_MODEL_COLOR_CONTROL:
7432+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.Model.ColorControl);
7433+ break;
7434+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
7435+ params[0] = ctx->Light.Model.LocalViewer;
7436+ break;
7437+ case GL_LIGHT_MODEL_TWO_SIDE:
7438+ params[0] = ctx->Light.Model.TwoSide;
7439+ break;
7440+ case GL_LINE_SMOOTH:
7441+ params[0] = ctx->Line.SmoothFlag;
7442+ break;
7443+ case GL_LINE_SMOOTH_HINT:
7444+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.LineSmooth);
7445+ break;
7446+ case GL_LINE_STIPPLE:
7447+ params[0] = ctx->Line.StippleFlag;
7448+ break;
7449+ case GL_LINE_STIPPLE_PATTERN:
7450+ params[0] = INT_TO_BOOLEAN(ctx->Line.StipplePattern);
7451+ break;
7452+ case GL_LINE_STIPPLE_REPEAT:
7453+ params[0] = INT_TO_BOOLEAN(ctx->Line.StippleFactor);
7454+ break;
7455+ case GL_LINE_WIDTH:
7456+ params[0] = FLOAT_TO_BOOLEAN(ctx->Line.Width);
7457+ break;
7458+ case GL_LINE_WIDTH_GRANULARITY:
7459+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.LineWidthGranularity);
7460+ break;
7461+ case GL_LINE_WIDTH_RANGE:
7462+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinLineWidthAA);
7463+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxLineWidthAA);
7464+ break;
7465+ case GL_ALIASED_LINE_WIDTH_RANGE:
7466+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinLineWidth);
7467+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxLineWidth);
7468+ break;
7469+ case GL_LIST_BASE:
7470+ params[0] = INT_TO_BOOLEAN(ctx->List.ListBase);
7471+ break;
7472+ case GL_LIST_INDEX:
7473+ params[0] = INT_TO_BOOLEAN(ctx->ListState.CurrentListNum);
7474+ break;
7475+ case GL_LIST_MODE:
7476+ {
7477+ GLenum mode;
7478+ if (!ctx->CompileFlag)
7479+ mode = 0;
7480+ else if (ctx->ExecuteFlag)
7481+ mode = GL_COMPILE_AND_EXECUTE;
7482+ else
7483+ mode = GL_COMPILE;
7484+ params[0] = ENUM_TO_BOOLEAN(mode);
7485+ }
7486+ break;
7487+ case GL_INDEX_LOGIC_OP:
7488+ params[0] = ctx->Color.IndexLogicOpEnabled;
7489+ break;
7490+ case GL_COLOR_LOGIC_OP:
7491+ params[0] = ctx->Color.ColorLogicOpEnabled;
7492+ break;
7493+ case GL_LOGIC_OP_MODE:
7494+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.LogicOp);
7495+ break;
7496+ case GL_MAP1_COLOR_4:
7497+ params[0] = ctx->Eval.Map1Color4;
7498+ break;
7499+ case GL_MAP1_GRID_DOMAIN:
7500+ params[0] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid1u1);
7501+ params[1] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid1u2);
7502+ break;
7503+ case GL_MAP1_GRID_SEGMENTS:
7504+ params[0] = INT_TO_BOOLEAN(ctx->Eval.MapGrid1un);
7505+ break;
7506+ case GL_MAP1_INDEX:
7507+ params[0] = ctx->Eval.Map1Index;
7508+ break;
7509+ case GL_MAP1_NORMAL:
7510+ params[0] = ctx->Eval.Map1Normal;
7511+ break;
7512+ case GL_MAP1_TEXTURE_COORD_1:
7513+ params[0] = ctx->Eval.Map1TextureCoord1;
7514+ break;
7515+ case GL_MAP1_TEXTURE_COORD_2:
7516+ params[0] = ctx->Eval.Map1TextureCoord2;
7517+ break;
7518+ case GL_MAP1_TEXTURE_COORD_3:
7519+ params[0] = ctx->Eval.Map1TextureCoord3;
7520+ break;
7521+ case GL_MAP1_TEXTURE_COORD_4:
7522+ params[0] = ctx->Eval.Map1TextureCoord4;
7523+ break;
7524+ case GL_MAP1_VERTEX_3:
7525+ params[0] = ctx->Eval.Map1Vertex3;
7526+ break;
7527+ case GL_MAP1_VERTEX_4:
7528+ params[0] = ctx->Eval.Map1Vertex4;
7529+ break;
7530+ case GL_MAP2_COLOR_4:
7531+ params[0] = ctx->Eval.Map2Color4;
7532+ break;
7533+ case GL_MAP2_GRID_DOMAIN:
7534+ params[0] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2u1);
7535+ params[1] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2u2);
7536+ params[2] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2v1);
7537+ params[3] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2v2);
7538+ break;
7539+ case GL_MAP2_GRID_SEGMENTS:
7540+ params[0] = INT_TO_BOOLEAN(ctx->Eval.MapGrid2un);
7541+ params[1] = INT_TO_BOOLEAN(ctx->Eval.MapGrid2vn);
7542+ break;
7543+ case GL_MAP2_INDEX:
7544+ params[0] = ctx->Eval.Map2Index;
7545+ break;
7546+ case GL_MAP2_NORMAL:
7547+ params[0] = ctx->Eval.Map2Normal;
7548+ break;
7549+ case GL_MAP2_TEXTURE_COORD_1:
7550+ params[0] = ctx->Eval.Map2TextureCoord1;
7551+ break;
7552+ case GL_MAP2_TEXTURE_COORD_2:
7553+ params[0] = ctx->Eval.Map2TextureCoord2;
7554+ break;
7555+ case GL_MAP2_TEXTURE_COORD_3:
7556+ params[0] = ctx->Eval.Map2TextureCoord3;
7557+ break;
7558+ case GL_MAP2_TEXTURE_COORD_4:
7559+ params[0] = ctx->Eval.Map2TextureCoord4;
7560+ break;
7561+ case GL_MAP2_VERTEX_3:
7562+ params[0] = ctx->Eval.Map2Vertex3;
7563+ break;
7564+ case GL_MAP2_VERTEX_4:
7565+ params[0] = ctx->Eval.Map2Vertex4;
7566+ break;
7567+ case GL_MAP_COLOR:
7568+ params[0] = ctx->Pixel.MapColorFlag;
7569+ break;
7570+ case GL_MAP_STENCIL:
7571+ params[0] = ctx->Pixel.MapStencilFlag;
7572+ break;
7573+ case GL_MATRIX_MODE:
7574+ params[0] = ENUM_TO_BOOLEAN(ctx->Transform.MatrixMode);
7575+ break;
7576+ case GL_MAX_ATTRIB_STACK_DEPTH:
7577+ params[0] = INT_TO_BOOLEAN(MAX_ATTRIB_STACK_DEPTH);
7578+ break;
7579+ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
7580+ params[0] = INT_TO_BOOLEAN(MAX_CLIENT_ATTRIB_STACK_DEPTH);
7581+ break;
7582+ case GL_MAX_CLIP_PLANES:
7583+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxClipPlanes);
7584+ break;
7585+ case GL_MAX_ELEMENTS_VERTICES:
7586+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxArrayLockSize);
7587+ break;
7588+ case GL_MAX_ELEMENTS_INDICES:
7589+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxArrayLockSize);
7590+ break;
7591+ case GL_MAX_EVAL_ORDER:
7592+ params[0] = INT_TO_BOOLEAN(MAX_EVAL_ORDER);
7593+ break;
7594+ case GL_MAX_LIGHTS:
7595+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxLights);
7596+ break;
7597+ case GL_MAX_LIST_NESTING:
7598+ params[0] = INT_TO_BOOLEAN(MAX_LIST_NESTING);
7599+ break;
7600+ case GL_MAX_MODELVIEW_STACK_DEPTH:
7601+ params[0] = INT_TO_BOOLEAN(MAX_MODELVIEW_STACK_DEPTH);
7602+ break;
7603+ case GL_MAX_NAME_STACK_DEPTH:
7604+ params[0] = INT_TO_BOOLEAN(MAX_NAME_STACK_DEPTH);
7605+ break;
7606+ case GL_MAX_PIXEL_MAP_TABLE:
7607+ params[0] = INT_TO_BOOLEAN(MAX_PIXEL_MAP_TABLE);
7608+ break;
7609+ case GL_MAX_PROJECTION_STACK_DEPTH:
7610+ params[0] = INT_TO_BOOLEAN(MAX_PROJECTION_STACK_DEPTH);
7611+ break;
7612+ case GL_MAX_TEXTURE_SIZE:
7613+ params[0] = INT_TO_BOOLEAN(1 << (ctx->Const.MaxTextureLevels - 1));
7614+ break;
7615+ case GL_MAX_3D_TEXTURE_SIZE:
7616+ params[0] = INT_TO_BOOLEAN(1 << (ctx->Const.Max3DTextureLevels - 1));
7617+ break;
7618+ case GL_MAX_TEXTURE_STACK_DEPTH:
7619+ params[0] = INT_TO_BOOLEAN(MAX_TEXTURE_STACK_DEPTH);
7620+ break;
7621+ case GL_MAX_VIEWPORT_DIMS:
7622+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxViewportWidth);
7623+ params[1] = INT_TO_BOOLEAN(ctx->Const.MaxViewportHeight);
7624+ break;
7625+ case GL_MODELVIEW_MATRIX:
7626+ {
7627+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
7628+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7629+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
7630+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
7631+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
7632+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
7633+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7634+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
7635+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
7636+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
7637+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
7638+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7639+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
7640+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
7641+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
7642+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
7643+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7644+ }
7645+ break;
7646+ case GL_MODELVIEW_STACK_DEPTH:
7647+ params[0] = INT_TO_BOOLEAN(ctx->ModelviewMatrixStack.Depth + 1);
7648+ break;
7649+ case GL_NAME_STACK_DEPTH:
7650+ params[0] = INT_TO_BOOLEAN(ctx->Select.NameStackDepth);
7651+ break;
7652+ case GL_NORMALIZE:
7653+ params[0] = ctx->Transform.Normalize;
7654+ break;
7655+ case GL_PACK_ALIGNMENT:
7656+ params[0] = INT_TO_BOOLEAN(ctx->Pack.Alignment);
7657+ break;
7658+ case GL_PACK_LSB_FIRST:
7659+ params[0] = ctx->Pack.LsbFirst;
7660+ break;
7661+ case GL_PACK_ROW_LENGTH:
7662+ params[0] = INT_TO_BOOLEAN(ctx->Pack.RowLength);
7663+ break;
7664+ case GL_PACK_SKIP_PIXELS:
7665+ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipPixels);
7666+ break;
7667+ case GL_PACK_SKIP_ROWS:
7668+ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipRows);
7669+ break;
7670+ case GL_PACK_SWAP_BYTES:
7671+ params[0] = ctx->Pack.SwapBytes;
7672+ break;
7673+ case GL_PACK_SKIP_IMAGES_EXT:
7674+ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipImages);
7675+ break;
7676+ case GL_PACK_IMAGE_HEIGHT_EXT:
7677+ params[0] = INT_TO_BOOLEAN(ctx->Pack.ImageHeight);
7678+ break;
7679+ case GL_PACK_INVERT_MESA:
7680+ params[0] = ctx->Pack.Invert;
7681+ break;
7682+ case GL_PERSPECTIVE_CORRECTION_HINT:
7683+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PerspectiveCorrection);
7684+ break;
7685+ case GL_PIXEL_MAP_A_TO_A_SIZE:
7686+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapAtoAsize);
7687+ break;
7688+ case GL_PIXEL_MAP_B_TO_B_SIZE:
7689+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapBtoBsize);
7690+ break;
7691+ case GL_PIXEL_MAP_G_TO_G_SIZE:
7692+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapGtoGsize);
7693+ break;
7694+ case GL_PIXEL_MAP_I_TO_A_SIZE:
7695+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoAsize);
7696+ break;
7697+ case GL_PIXEL_MAP_I_TO_B_SIZE:
7698+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoBsize);
7699+ break;
7700+ case GL_PIXEL_MAP_I_TO_G_SIZE:
7701+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoGsize);
7702+ break;
7703+ case GL_PIXEL_MAP_I_TO_I_SIZE:
7704+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoIsize);
7705+ break;
7706+ case GL_PIXEL_MAP_I_TO_R_SIZE:
7707+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoRsize);
7708+ break;
7709+ case GL_PIXEL_MAP_R_TO_R_SIZE:
7710+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapRtoRsize);
7711+ break;
7712+ case GL_PIXEL_MAP_S_TO_S_SIZE:
7713+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapStoSsize);
7714+ break;
7715+ case GL_POINT_SIZE:
7716+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Size);
7717+ break;
7718+ case GL_POINT_SIZE_GRANULARITY:
7719+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.PointSizeGranularity);
7720+ break;
7721+ case GL_POINT_SIZE_RANGE:
7722+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinPointSizeAA);
7723+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxPointSizeAA);
7724+ break;
7725+ case GL_ALIASED_POINT_SIZE_RANGE:
7726+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinPointSize);
7727+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxPointSize);
7728+ break;
7729+ case GL_POINT_SMOOTH:
7730+ params[0] = ctx->Point.SmoothFlag;
7731+ break;
7732+ case GL_POINT_SMOOTH_HINT:
7733+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PointSmooth);
7734+ break;
7735+ case GL_POINT_SIZE_MIN_EXT:
7736+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.MinSize);
7737+ break;
7738+ case GL_POINT_SIZE_MAX_EXT:
7739+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.MaxSize);
7740+ break;
7741+ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
7742+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Threshold);
7743+ break;
7744+ case GL_DISTANCE_ATTENUATION_EXT:
7745+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Params[0]);
7746+ params[1] = FLOAT_TO_BOOLEAN(ctx->Point.Params[1]);
7747+ params[2] = FLOAT_TO_BOOLEAN(ctx->Point.Params[2]);
7748+ break;
7749+ case GL_POLYGON_MODE:
7750+ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.FrontMode);
7751+ params[1] = ENUM_TO_BOOLEAN(ctx->Polygon.BackMode);
7752+ break;
7753+ case GL_POLYGON_OFFSET_BIAS_EXT:
7754+ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetUnits);
7755+ break;
7756+ case GL_POLYGON_OFFSET_FACTOR:
7757+ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetFactor );
7758+ break;
7759+ case GL_POLYGON_OFFSET_UNITS:
7760+ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetUnits );
7761+ break;
7762+ case GL_POLYGON_SMOOTH:
7763+ params[0] = ctx->Polygon.SmoothFlag;
7764+ break;
7765+ case GL_POLYGON_SMOOTH_HINT:
7766+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PolygonSmooth);
7767+ break;
7768+ case GL_POLYGON_STIPPLE:
7769+ params[0] = ctx->Polygon.StippleFlag;
7770+ break;
7771+ case GL_PROJECTION_MATRIX:
7772+ {
7773+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
7774+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7775+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
7776+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
7777+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
7778+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
7779+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7780+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
7781+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
7782+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
7783+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
7784+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7785+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
7786+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
7787+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
7788+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
7789+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7790+ }
7791+ break;
7792+ case GL_PROJECTION_STACK_DEPTH:
7793+ params[0] = INT_TO_BOOLEAN(ctx->ProjectionMatrixStack.Depth + 1);
7794+ break;
7795+ case GL_READ_BUFFER:
7796+ params[0] = ENUM_TO_BOOLEAN(ctx->ReadBuffer->ColorReadBuffer);
7797+ break;
7798+ case GL_RED_BIAS:
7799+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.RedBias);
7800+ break;
7801+ case GL_RED_BITS:
7802+ params[0] = INT_TO_BOOLEAN( ctx->DrawBuffer->Visual.redBits );
7803+ break;
7804+ case GL_RED_SCALE:
7805+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.RedScale);
7806+ break;
7807+ case GL_RENDER_MODE:
7808+ params[0] = ENUM_TO_BOOLEAN(ctx->RenderMode);
7809+ break;
7810+ case GL_RESCALE_NORMAL:
7811+ params[0] = ctx->Transform.RescaleNormals;
7812+ break;
7813+ case GL_RGBA_MODE:
7814+ params[0] = ctx->DrawBuffer->Visual.rgbMode;
7815+ break;
7816+ case GL_SCISSOR_BOX:
7817+ params[0] = INT_TO_BOOLEAN(ctx->Scissor.X);
7818+ params[1] = INT_TO_BOOLEAN(ctx->Scissor.Y);
7819+ params[2] = INT_TO_BOOLEAN(ctx->Scissor.Width);
7820+ params[3] = INT_TO_BOOLEAN(ctx->Scissor.Height);
7821+ break;
7822+ case GL_SCISSOR_TEST:
7823+ params[0] = ctx->Scissor.Enabled;
7824+ break;
7825+ case GL_SELECTION_BUFFER_SIZE:
7826+ params[0] = INT_TO_BOOLEAN(ctx->Select.BufferSize);
7827+ break;
7828+ case GL_SHADE_MODEL:
7829+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ShadeModel);
7830+ break;
7831+ case GL_SHARED_TEXTURE_PALETTE_EXT:
7832+ params[0] = ctx->Texture.SharedPalette;
7833+ break;
7834+ case GL_STENCIL_BITS:
7835+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.stencilBits);
7836+ break;
7837+ case GL_STENCIL_CLEAR_VALUE:
7838+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Clear);
7839+ break;
7840+ case GL_STENCIL_FAIL:
7841+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
7842+ break;
7843+ case GL_STENCIL_FUNC:
7844+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
7845+ break;
7846+ case GL_STENCIL_PASS_DEPTH_FAIL:
7847+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
7848+ break;
7849+ case GL_STENCIL_PASS_DEPTH_PASS:
7850+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
7851+ break;
7852+ case GL_STENCIL_REF:
7853+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Ref[ctx->Stencil.ActiveFace]);
7854+ break;
7855+ case GL_STENCIL_TEST:
7856+ params[0] = ctx->Stencil.Enabled;
7857+ break;
7858+ case GL_STENCIL_VALUE_MASK:
7859+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]);
7860+ break;
7861+ case GL_STENCIL_WRITEMASK:
7862+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]);
7863+ break;
7864+ case GL_STEREO:
7865+ params[0] = ctx->DrawBuffer->Visual.stereoMode;
7866+ break;
7867+ case GL_SUBPIXEL_BITS:
7868+ params[0] = INT_TO_BOOLEAN(ctx->Const.SubPixelBits);
7869+ break;
7870+ case GL_TEXTURE_1D:
7871+ params[0] = _mesa_IsEnabled(GL_TEXTURE_1D);
7872+ break;
7873+ case GL_TEXTURE_2D:
7874+ params[0] = _mesa_IsEnabled(GL_TEXTURE_2D);
7875+ break;
7876+ case GL_TEXTURE_3D:
7877+ params[0] = _mesa_IsEnabled(GL_TEXTURE_3D);
7878+ break;
7879+ case GL_TEXTURE_BINDING_1D:
7880+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name);
7881+ break;
7882+ case GL_TEXTURE_BINDING_2D:
7883+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name);
7884+ break;
7885+ case GL_TEXTURE_BINDING_3D:
7886+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name);
7887+ break;
7888+ case GL_TEXTURE_ENV_COLOR:
7889+ {
7890+ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
7891+ params[0] = FLOAT_TO_BOOLEAN(color[0]);
7892+ params[1] = FLOAT_TO_BOOLEAN(color[1]);
7893+ params[2] = FLOAT_TO_BOOLEAN(color[2]);
7894+ params[3] = FLOAT_TO_BOOLEAN(color[3]);
7895+ }
7896+ break;
7897+ case GL_TEXTURE_ENV_MODE:
7898+ params[0] = ENUM_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
7899+ break;
7900+ case GL_TEXTURE_GEN_S:
7901+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0);
7902+ break;
7903+ case GL_TEXTURE_GEN_T:
7904+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0);
7905+ break;
7906+ case GL_TEXTURE_GEN_R:
7907+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0);
7908+ break;
7909+ case GL_TEXTURE_GEN_Q:
7910+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0);
7911+ break;
7912+ case GL_TEXTURE_MATRIX:
7913+ {
7914+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
7915+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7916+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
7917+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
7918+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
7919+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
7920+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7921+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
7922+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
7923+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
7924+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
7925+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7926+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
7927+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
7928+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
7929+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
7930+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7931+ }
7932+ break;
7933+ case GL_TEXTURE_STACK_DEPTH:
7934+ params[0] = INT_TO_BOOLEAN(ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1);
7935+ break;
7936+ case GL_UNPACK_ALIGNMENT:
7937+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.Alignment);
7938+ break;
7939+ case GL_UNPACK_LSB_FIRST:
7940+ params[0] = ctx->Unpack.LsbFirst;
7941+ break;
7942+ case GL_UNPACK_ROW_LENGTH:
7943+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.RowLength);
7944+ break;
7945+ case GL_UNPACK_SKIP_PIXELS:
7946+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipPixels);
7947+ break;
7948+ case GL_UNPACK_SKIP_ROWS:
7949+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipRows);
7950+ break;
7951+ case GL_UNPACK_SWAP_BYTES:
7952+ params[0] = ctx->Unpack.SwapBytes;
7953+ break;
7954+ case GL_UNPACK_SKIP_IMAGES_EXT:
7955+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipImages);
7956+ break;
7957+ case GL_UNPACK_IMAGE_HEIGHT_EXT:
7958+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.ImageHeight);
7959+ break;
7960+ case GL_UNPACK_CLIENT_STORAGE_APPLE:
7961+ params[0] = ctx->Unpack.ClientStorage;
7962+ break;
7963+ case GL_VIEWPORT:
7964+ params[0] = INT_TO_BOOLEAN(ctx->Viewport.X);
7965+ params[1] = INT_TO_BOOLEAN(ctx->Viewport.Y);
7966+ params[2] = INT_TO_BOOLEAN(ctx->Viewport.Width);
7967+ params[3] = INT_TO_BOOLEAN(ctx->Viewport.Height);
7968+ break;
7969+ case GL_ZOOM_X:
7970+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.ZoomX);
7971+ break;
7972+ case GL_ZOOM_Y:
7973+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.ZoomY);
7974+ break;
7975+ case GL_VERTEX_ARRAY:
7976+ params[0] = ctx->Array.ArrayObj->Vertex.Enabled;
7977+ break;
7978+ case GL_VERTEX_ARRAY_SIZE:
7979+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Size);
7980+ break;
7981+ case GL_VERTEX_ARRAY_TYPE:
7982+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Type);
7983+ break;
7984+ case GL_VERTEX_ARRAY_STRIDE:
7985+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Stride);
7986+ break;
7987+ case GL_VERTEX_ARRAY_COUNT_EXT:
7988+ params[0] = INT_TO_BOOLEAN(0);
7989+ break;
7990+ case GL_NORMAL_ARRAY:
7991+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Enabled);
7992+ break;
7993+ case GL_NORMAL_ARRAY_TYPE:
7994+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Type);
7995+ break;
7996+ case GL_NORMAL_ARRAY_STRIDE:
7997+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Stride);
7998+ break;
7999+ case GL_NORMAL_ARRAY_COUNT_EXT:
8000+ params[0] = INT_TO_BOOLEAN(0);
8001+ break;
8002+ case GL_COLOR_ARRAY:
8003+ params[0] = ctx->Array.ArrayObj->Color.Enabled;
8004+ break;
8005+ case GL_COLOR_ARRAY_SIZE:
8006+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Size);
8007+ break;
8008+ case GL_COLOR_ARRAY_TYPE:
8009+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Type);
8010+ break;
8011+ case GL_COLOR_ARRAY_STRIDE:
8012+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Stride);
8013+ break;
8014+ case GL_COLOR_ARRAY_COUNT_EXT:
8015+ params[0] = INT_TO_BOOLEAN(0);
8016+ break;
8017+ case GL_INDEX_ARRAY:
8018+ params[0] = ctx->Array.ArrayObj->Index.Enabled;
8019+ break;
8020+ case GL_INDEX_ARRAY_TYPE:
8021+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Index.Type);
8022+ break;
8023+ case GL_INDEX_ARRAY_STRIDE:
8024+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Index.Stride);
8025+ break;
8026+ case GL_INDEX_ARRAY_COUNT_EXT:
8027+ params[0] = INT_TO_BOOLEAN(0);
8028+ break;
8029+ case GL_TEXTURE_COORD_ARRAY:
8030+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled;
8031+ break;
8032+ case GL_TEXTURE_COORD_ARRAY_SIZE:
8033+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
8034+ break;
8035+ case GL_TEXTURE_COORD_ARRAY_TYPE:
8036+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
8037+ break;
8038+ case GL_TEXTURE_COORD_ARRAY_STRIDE:
8039+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
8040+ break;
8041+ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
8042+ params[0] = INT_TO_BOOLEAN(0);
8043+ break;
8044+ case GL_EDGE_FLAG_ARRAY:
8045+ params[0] = ctx->Array.ArrayObj->EdgeFlag.Enabled;
8046+ break;
8047+ case GL_EDGE_FLAG_ARRAY_STRIDE:
8048+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->EdgeFlag.Stride);
8049+ break;
8050+ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
8051+ params[0] = INT_TO_BOOLEAN(0);
8052+ break;
8053+ case GL_MAX_TEXTURE_UNITS_ARB:
8054+ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
8055+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureUnits);
8056+ break;
8057+ case GL_ACTIVE_TEXTURE_ARB:
8058+ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
8059+ params[0] = INT_TO_BOOLEAN(GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit);
8060+ break;
8061+ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
8062+ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
8063+ params[0] = INT_TO_BOOLEAN(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
8064+ break;
8065+ case GL_TEXTURE_CUBE_MAP_ARB:
8066+ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
8067+ params[0] = _mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB);
8068+ break;
8069+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
8070+ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
8071+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name);
8072+ break;
8073+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
8074+ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
8075+ params[0] = INT_TO_BOOLEAN((1 << (ctx->Const.MaxCubeTextureLevels - 1)));
8076+ break;
8077+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
8078+ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
8079+ params[0] = INT_TO_BOOLEAN(ctx->Hint.TextureCompression);
8080+ break;
8081+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
8082+ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
8083+ params[0] = INT_TO_BOOLEAN(_mesa_get_compressed_formats(ctx, NULL, GL_FALSE));
8084+ break;
8085+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
8086+ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
8087+ {
8088+ GLint formats[100];
8089+ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
8090+ ASSERT(n <= 100);
8091+ for (i = 0; i < n; i++)
8092+ params[i] = ENUM_TO_INT(formats[i]);
8093+ }
8094+ break;
8095+ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
8096+ CHECK_EXT1(EXT_compiled_vertex_array, "GetBooleanv");
8097+ params[0] = INT_TO_BOOLEAN(ctx->Array.LockFirst);
8098+ break;
8099+ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
8100+ CHECK_EXT1(EXT_compiled_vertex_array, "GetBooleanv");
8101+ params[0] = INT_TO_BOOLEAN(ctx->Array.LockCount);
8102+ break;
8103+ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
8104+ {
8105+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
8106+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8107+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8108+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8109+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8110+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8111+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8112+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8113+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8114+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8115+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8116+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8117+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8118+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8119+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8120+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8121+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8122+ }
8123+ break;
8124+ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
8125+ {
8126+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
8127+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8128+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8129+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8130+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8131+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8132+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8133+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8134+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8135+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8136+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8137+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8138+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8139+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8140+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8141+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8142+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8143+ }
8144+ break;
8145+ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
8146+ {
8147+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
8148+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8149+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8150+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8151+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8152+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8153+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8154+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8155+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8156+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8157+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8158+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8159+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8160+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8161+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8162+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8163+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8164+ }
8165+ break;
8166+ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
8167+ {
8168+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
8169+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8170+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8171+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8172+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8173+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8174+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8175+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8176+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8177+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8178+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8179+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8180+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8181+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8182+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8183+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8184+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8185+ }
8186+ break;
8187+ case GL_COLOR_MATRIX_SGI:
8188+ {
8189+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
8190+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8191+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
8192+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
8193+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
8194+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
8195+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8196+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
8197+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
8198+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
8199+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
8200+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8201+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
8202+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
8203+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
8204+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
8205+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8206+ }
8207+ break;
8208+ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
8209+ params[0] = INT_TO_BOOLEAN(ctx->ColorMatrixStack.Depth + 1);
8210+ break;
8211+ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
8212+ params[0] = INT_TO_BOOLEAN(MAX_COLOR_STACK_DEPTH);
8213+ break;
8214+ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
8215+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[0]);
8216+ break;
8217+ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
8218+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[1]);
8219+ break;
8220+ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
8221+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[2]);
8222+ break;
8223+ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
8224+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[3]);
8225+ break;
8226+ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
8227+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[0]);
8228+ break;
8229+ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
8230+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[1]);
8231+ break;
8232+ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
8233+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[2]);
8234+ break;
8235+ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
8236+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[3]);
8237+ break;
8238+ case GL_CONVOLUTION_1D_EXT:
8239+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8240+ params[0] = ctx->Pixel.Convolution1DEnabled;
8241+ break;
8242+ case GL_CONVOLUTION_2D_EXT:
8243+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8244+ params[0] = ctx->Pixel.Convolution2DEnabled;
8245+ break;
8246+ case GL_SEPARABLE_2D_EXT:
8247+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8248+ params[0] = ctx->Pixel.Separable2DEnabled;
8249+ break;
8250+ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
8251+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8252+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[0]);
8253+ break;
8254+ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
8255+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8256+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[1]);
8257+ break;
8258+ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
8259+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8260+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[2]);
8261+ break;
8262+ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
8263+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8264+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[3]);
8265+ break;
8266+ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
8267+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8268+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[0]);
8269+ break;
8270+ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
8271+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8272+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[1]);
8273+ break;
8274+ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
8275+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8276+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[2]);
8277+ break;
8278+ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
8279+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8280+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[3]);
8281+ break;
8282+ case GL_HISTOGRAM:
8283+ CHECK_EXT1(EXT_histogram, "GetBooleanv");
8284+ params[0] = ctx->Pixel.HistogramEnabled;
8285+ break;
8286+ case GL_MINMAX:
8287+ CHECK_EXT1(EXT_histogram, "GetBooleanv");
8288+ params[0] = ctx->Pixel.MinMaxEnabled;
8289+ break;
8290+ case GL_COLOR_TABLE_SGI:
8291+ CHECK_EXT1(SGI_color_table, "GetBooleanv");
8292+ params[0] = ctx->Pixel.ColorTableEnabled;
8293+ break;
8294+ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
8295+ CHECK_EXT1(SGI_color_table, "GetBooleanv");
8296+ params[0] = ctx->Pixel.PostConvolutionColorTableEnabled;
8297+ break;
8298+ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
8299+ CHECK_EXT1(SGI_color_table, "GetBooleanv");
8300+ params[0] = ctx->Pixel.PostColorMatrixColorTableEnabled;
8301+ break;
8302+ case GL_TEXTURE_COLOR_TABLE_SGI:
8303+ CHECK_EXT1(SGI_texture_color_table, "GetBooleanv");
8304+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled;
8305+ break;
8306+ case GL_COLOR_SUM_EXT:
8307+ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetBooleanv");
8308+ params[0] = ctx->Fog.ColorSumEnabled;
8309+ break;
8310+ case GL_CURRENT_SECONDARY_COLOR_EXT:
8311+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8312+ {
8313+ FLUSH_CURRENT(ctx, 0);
8314+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]);
8315+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]);
8316+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]);
8317+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]);
8318+ }
8319+ break;
8320+ case GL_SECONDARY_COLOR_ARRAY_EXT:
8321+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8322+ params[0] = ctx->Array.ArrayObj->SecondaryColor.Enabled;
8323+ break;
8324+ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
8325+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8326+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Type);
8327+ break;
8328+ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
8329+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8330+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Stride);
8331+ break;
8332+ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
8333+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8334+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Size);
8335+ break;
8336+ case GL_CURRENT_FOG_COORDINATE_EXT:
8337+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8338+ {
8339+ FLUSH_CURRENT(ctx, 0);
8340+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_FOG][0]);
8341+ }
8342+ break;
8343+ case GL_FOG_COORDINATE_ARRAY_EXT:
8344+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8345+ params[0] = ctx->Array.ArrayObj->FogCoord.Enabled;
8346+ break;
8347+ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
8348+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8349+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.Type);
8350+ break;
8351+ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
8352+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8353+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.Stride);
8354+ break;
8355+ case GL_FOG_COORDINATE_SOURCE_EXT:
8356+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8357+ params[0] = ENUM_TO_BOOLEAN(ctx->Fog.FogCoordinateSource);
8358+ break;
8359+ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
8360+ CHECK_EXT1(EXT_texture_lod_bias, "GetBooleanv");
8361+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxTextureLodBias);
8362+ break;
8363+ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
8364+ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetBooleanv");
8365+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxTextureMaxAnisotropy);
8366+ break;
8367+ case GL_MULTISAMPLE_ARB:
8368+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8369+ params[0] = ctx->Multisample.Enabled;
8370+ break;
8371+ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
8372+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8373+ params[0] = ctx->Multisample.SampleAlphaToCoverage;
8374+ break;
8375+ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
8376+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8377+ params[0] = ctx->Multisample.SampleAlphaToOne;
8378+ break;
8379+ case GL_SAMPLE_COVERAGE_ARB:
8380+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8381+ params[0] = ctx->Multisample.SampleCoverage;
8382+ break;
8383+ case GL_SAMPLE_COVERAGE_VALUE_ARB:
8384+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8385+ params[0] = FLOAT_TO_BOOLEAN(ctx->Multisample.SampleCoverageValue);
8386+ break;
8387+ case GL_SAMPLE_COVERAGE_INVERT_ARB:
8388+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8389+ params[0] = ctx->Multisample.SampleCoverageInvert;
8390+ break;
8391+ case GL_SAMPLE_BUFFERS_ARB:
8392+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8393+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.sampleBuffers);
8394+ break;
8395+ case GL_SAMPLES_ARB:
8396+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8397+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.samples);
8398+ break;
8399+ case GL_RASTER_POSITION_UNCLIPPED_IBM:
8400+ CHECK_EXT1(IBM_rasterpos_clip, "GetBooleanv");
8401+ params[0] = ctx->Transform.RasterPositionUnclipped;
8402+ break;
8403+ case GL_POINT_SPRITE_NV:
8404+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetBooleanv");
8405+ params[0] = ctx->Point.PointSprite;
8406+ break;
8407+ case GL_POINT_SPRITE_R_MODE_NV:
8408+ CHECK_EXT1(NV_point_sprite, "GetBooleanv");
8409+ params[0] = ENUM_TO_BOOLEAN(ctx->Point.SpriteRMode);
8410+ break;
8411+ case GL_POINT_SPRITE_COORD_ORIGIN:
8412+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetBooleanv");
8413+ params[0] = ENUM_TO_BOOLEAN(ctx->Point.SpriteOrigin);
8414+ break;
8415+ case GL_GENERATE_MIPMAP_HINT_SGIS:
8416+ CHECK_EXT1(SGIS_generate_mipmap, "GetBooleanv");
8417+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.GenerateMipmap);
8418+ break;
8419+ case GL_VERTEX_PROGRAM_BINDING_NV:
8420+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8421+ params[0] = INT_TO_BOOLEAN((ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0));
8422+ break;
8423+ case GL_VERTEX_ATTRIB_ARRAY0_NV:
8424+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8425+ params[0] = ctx->Array.ArrayObj->VertexAttrib[0].Enabled;
8426+ break;
8427+ case GL_VERTEX_ATTRIB_ARRAY1_NV:
8428+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8429+ params[0] = ctx->Array.ArrayObj->VertexAttrib[1].Enabled;
8430+ break;
8431+ case GL_VERTEX_ATTRIB_ARRAY2_NV:
8432+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8433+ params[0] = ctx->Array.ArrayObj->VertexAttrib[2].Enabled;
8434+ break;
8435+ case GL_VERTEX_ATTRIB_ARRAY3_NV:
8436+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8437+ params[0] = ctx->Array.ArrayObj->VertexAttrib[3].Enabled;
8438+ break;
8439+ case GL_VERTEX_ATTRIB_ARRAY4_NV:
8440+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8441+ params[0] = ctx->Array.ArrayObj->VertexAttrib[4].Enabled;
8442+ break;
8443+ case GL_VERTEX_ATTRIB_ARRAY5_NV:
8444+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8445+ params[0] = ctx->Array.ArrayObj->VertexAttrib[5].Enabled;
8446+ break;
8447+ case GL_VERTEX_ATTRIB_ARRAY6_NV:
8448+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8449+ params[0] = ctx->Array.ArrayObj->VertexAttrib[6].Enabled;
8450+ break;
8451+ case GL_VERTEX_ATTRIB_ARRAY7_NV:
8452+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8453+ params[0] = ctx->Array.ArrayObj->VertexAttrib[7].Enabled;
8454+ break;
8455+ case GL_VERTEX_ATTRIB_ARRAY8_NV:
8456+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8457+ params[0] = ctx->Array.ArrayObj->VertexAttrib[8].Enabled;
8458+ break;
8459+ case GL_VERTEX_ATTRIB_ARRAY9_NV:
8460+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8461+ params[0] = ctx->Array.ArrayObj->VertexAttrib[9].Enabled;
8462+ break;
8463+ case GL_VERTEX_ATTRIB_ARRAY10_NV:
8464+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8465+ params[0] = ctx->Array.ArrayObj->VertexAttrib[10].Enabled;
8466+ break;
8467+ case GL_VERTEX_ATTRIB_ARRAY11_NV:
8468+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8469+ params[0] = ctx->Array.ArrayObj->VertexAttrib[11].Enabled;
8470+ break;
8471+ case GL_VERTEX_ATTRIB_ARRAY12_NV:
8472+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8473+ params[0] = ctx->Array.ArrayObj->VertexAttrib[12].Enabled;
8474+ break;
8475+ case GL_VERTEX_ATTRIB_ARRAY13_NV:
8476+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8477+ params[0] = ctx->Array.ArrayObj->VertexAttrib[13].Enabled;
8478+ break;
8479+ case GL_VERTEX_ATTRIB_ARRAY14_NV:
8480+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8481+ params[0] = ctx->Array.ArrayObj->VertexAttrib[14].Enabled;
8482+ break;
8483+ case GL_VERTEX_ATTRIB_ARRAY15_NV:
8484+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8485+ params[0] = ctx->Array.ArrayObj->VertexAttrib[15].Enabled;
8486+ break;
8487+ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
8488+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8489+ params[0] = ctx->Eval.Map1Attrib[0];
8490+ break;
8491+ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
8492+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8493+ params[0] = ctx->Eval.Map1Attrib[1];
8494+ break;
8495+ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
8496+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8497+ params[0] = ctx->Eval.Map1Attrib[2];
8498+ break;
8499+ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
8500+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8501+ params[0] = ctx->Eval.Map1Attrib[3];
8502+ break;
8503+ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
8504+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8505+ params[0] = ctx->Eval.Map1Attrib[4];
8506+ break;
8507+ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
8508+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8509+ params[0] = ctx->Eval.Map1Attrib[5];
8510+ break;
8511+ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
8512+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8513+ params[0] = ctx->Eval.Map1Attrib[6];
8514+ break;
8515+ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
8516+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8517+ params[0] = ctx->Eval.Map1Attrib[7];
8518+ break;
8519+ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
8520+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8521+ params[0] = ctx->Eval.Map1Attrib[8];
8522+ break;
8523+ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
8524+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8525+ params[0] = ctx->Eval.Map1Attrib[9];
8526+ break;
8527+ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
8528+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8529+ params[0] = ctx->Eval.Map1Attrib[10];
8530+ break;
8531+ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
8532+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8533+ params[0] = ctx->Eval.Map1Attrib[11];
8534+ break;
8535+ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
8536+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8537+ params[0] = ctx->Eval.Map1Attrib[12];
8538+ break;
8539+ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
8540+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8541+ params[0] = ctx->Eval.Map1Attrib[13];
8542+ break;
8543+ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
8544+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8545+ params[0] = ctx->Eval.Map1Attrib[14];
8546+ break;
8547+ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
8548+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8549+ params[0] = ctx->Eval.Map1Attrib[15];
8550+ break;
8551+ case GL_FRAGMENT_PROGRAM_NV:
8552+ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
8553+ params[0] = ctx->FragmentProgram.Enabled;
8554+ break;
8555+ case GL_FRAGMENT_PROGRAM_BINDING_NV:
8556+ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
8557+ params[0] = INT_TO_BOOLEAN(ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0);
8558+ break;
8559+ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
8560+ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
8561+ params[0] = INT_TO_BOOLEAN(MAX_NV_FRAGMENT_PROGRAM_PARAMS);
8562+ break;
8563+ case GL_TEXTURE_RECTANGLE_NV:
8564+ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
8565+ params[0] = _mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV);
8566+ break;
8567+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
8568+ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
8569+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name);
8570+ break;
8571+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
8572+ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
8573+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureRectSize);
8574+ break;
8575+ case GL_STENCIL_TEST_TWO_SIDE_EXT:
8576+ CHECK_EXT1(EXT_stencil_two_side, "GetBooleanv");
8577+ params[0] = ctx->Stencil.TestTwoSide;
8578+ break;
8579+ case GL_ACTIVE_STENCIL_FACE_EXT:
8580+ CHECK_EXT1(EXT_stencil_two_side, "GetBooleanv");
8581+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
8582+ break;
8583+ case GL_MAX_SHININESS_NV:
8584+ CHECK_EXT1(NV_light_max_exponent, "GetBooleanv");
8585+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxShininess);
8586+ break;
8587+ case GL_MAX_SPOT_EXPONENT_NV:
8588+ CHECK_EXT1(NV_light_max_exponent, "GetBooleanv");
8589+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxSpotExponent);
8590+ break;
8591+ case GL_ARRAY_BUFFER_BINDING_ARB:
8592+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8593+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayBufferObj->Name);
8594+ break;
8595+ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
8596+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8597+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
8598+ break;
8599+ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
8600+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8601+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.BufferObj->Name);
8602+ break;
8603+ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
8604+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8605+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.BufferObj->Name);
8606+ break;
8607+ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
8608+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8609+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Index.BufferObj->Name);
8610+ break;
8611+ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
8612+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8613+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
8614+ break;
8615+ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
8616+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8617+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
8618+ break;
8619+ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
8620+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8621+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
8622+ break;
8623+ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
8624+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8625+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
8626+ break;
8627+ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
8628+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8629+ params[0] = INT_TO_BOOLEAN(ctx->Array.ElementArrayBufferObj->Name);
8630+ break;
8631+ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
8632+ CHECK_EXT1(EXT_pixel_buffer_object, "GetBooleanv");
8633+ params[0] = INT_TO_BOOLEAN(ctx->Pack.BufferObj->Name);
8634+ break;
8635+ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
8636+ CHECK_EXT1(EXT_pixel_buffer_object, "GetBooleanv");
8637+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.BufferObj->Name);
8638+ break;
8639+ case GL_VERTEX_PROGRAM_ARB:
8640+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
8641+ params[0] = ctx->VertexProgram.Enabled;
8642+ break;
8643+ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
8644+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
8645+ params[0] = ctx->VertexProgram.PointSizeEnabled;
8646+ break;
8647+ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
8648+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
8649+ params[0] = ctx->VertexProgram.TwoSideEnabled;
8650+ break;
8651+ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
8652+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
8653+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxProgramMatrixStackDepth);
8654+ break;
8655+ case GL_MAX_PROGRAM_MATRICES_ARB:
8656+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
8657+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxProgramMatrices);
8658+ break;
8659+ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
8660+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
8661+ params[0] = ctx->CurrentStack->Depth + 1;
8662+ break;
8663+ case GL_CURRENT_MATRIX_ARB:
8664+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetBooleanv");
8665+ {
8666+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
8667+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8668+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
8669+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
8670+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
8671+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
8672+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8673+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
8674+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
8675+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
8676+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
8677+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8678+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
8679+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
8680+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
8681+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
8682+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8683+ }
8684+ break;
8685+ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
8686+ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetBooleanv");
8687+ {
8688+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
8689+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8690+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8691+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8692+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8693+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8694+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8695+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8696+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8697+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8698+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8699+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8700+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8701+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8702+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8703+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8704+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8705+ }
8706+ break;
8707+ case GL_MAX_VERTEX_ATTRIBS_ARB:
8708+ CHECK_EXT1(ARB_vertex_program, "GetBooleanv");
8709+ params[0] = INT_TO_BOOLEAN(ctx->Const.VertexProgram.MaxAttribs);
8710+ break;
8711+ case GL_PROGRAM_ERROR_POSITION_ARB:
8712+ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetBooleanv");
8713+ params[0] = INT_TO_BOOLEAN(ctx->Program.ErrorPos);
8714+ break;
8715+ case GL_FRAGMENT_PROGRAM_ARB:
8716+ CHECK_EXT1(ARB_fragment_program, "GetBooleanv");
8717+ params[0] = ctx->FragmentProgram.Enabled;
8718+ break;
8719+ case GL_MAX_TEXTURE_COORDS_ARB:
8720+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetBooleanv");
8721+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureCoordUnits);
8722+ break;
8723+ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
8724+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetBooleanv");
8725+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureImageUnits);
8726+ break;
8727+ case GL_DEPTH_BOUNDS_TEST_EXT:
8728+ CHECK_EXT1(EXT_depth_bounds_test, "GetBooleanv");
8729+ params[0] = ctx->Depth.BoundsTest;
8730+ break;
8731+ case GL_DEPTH_BOUNDS_EXT:
8732+ CHECK_EXT1(EXT_depth_bounds_test, "GetBooleanv");
8733+ params[0] = FLOAT_TO_BOOLEAN(ctx->Depth.BoundsMin);
8734+ params[1] = FLOAT_TO_BOOLEAN(ctx->Depth.BoundsMax);
8735+ break;
8736+ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
8737+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8738+ params[0] = ctx->FragmentProgram.CallbackEnabled;
8739+ break;
8740+ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
8741+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8742+ params[0] = ctx->VertexProgram.CallbackEnabled;
8743+ break;
8744+ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
8745+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8746+ params[0] = INT_TO_BOOLEAN(ctx->FragmentProgram.CurrentPosition);
8747+ break;
8748+ case GL_VERTEX_PROGRAM_POSITION_MESA:
8749+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8750+ params[0] = INT_TO_BOOLEAN(ctx->VertexProgram.CurrentPosition);
8751+ break;
8752+ case GL_MAX_DRAW_BUFFERS_ARB:
8753+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8754+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxDrawBuffers);
8755+ break;
8756+ case GL_DRAW_BUFFER0_ARB:
8757+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8758+ params[0] = ENUM_TO_BOOLEAN(ctx->DrawBuffer->ColorDrawBuffer[0]);
8759+ break;
8760+ case GL_DRAW_BUFFER1_ARB:
8761+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8762+ {
8763+ GLenum buffer;
8764+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
8765+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
8766+ return;
8767+ }
8768+ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
8769+ params[0] = ENUM_TO_BOOLEAN(buffer);
8770+ }
8771+ break;
8772+ case GL_DRAW_BUFFER2_ARB:
8773+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8774+ {
8775+ GLenum buffer;
8776+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
8777+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
8778+ return;
8779+ }
8780+ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
8781+ params[0] = ENUM_TO_BOOLEAN(buffer);
8782+ }
8783+ break;
8784+ case GL_DRAW_BUFFER3_ARB:
8785+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8786+ {
8787+ GLenum buffer;
8788+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
8789+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
8790+ return;
8791+ }
8792+ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
8793+ params[0] = ENUM_TO_BOOLEAN(buffer);
8794+ }
8795+ break;
8796+ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
8797+ CHECK_EXT1(OES_read_format, "GetBooleanv");
8798+ params[0] = INT_TO_BOOLEAN(ctx->Const.ColorReadType);
8799+ break;
8800+ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
8801+ CHECK_EXT1(OES_read_format, "GetBooleanv");
8802+ params[0] = INT_TO_BOOLEAN(ctx->Const.ColorReadFormat);
8803+ break;
8804+ case GL_NUM_FRAGMENT_REGISTERS_ATI:
8805+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8806+ params[0] = INT_TO_BOOLEAN(6);
8807+ break;
8808+ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
8809+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8810+ params[0] = INT_TO_BOOLEAN(8);
8811+ break;
8812+ case GL_NUM_PASSES_ATI:
8813+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8814+ params[0] = INT_TO_BOOLEAN(2);
8815+ break;
8816+ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
8817+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8818+ params[0] = INT_TO_BOOLEAN(8);
8819+ break;
8820+ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
8821+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8822+ params[0] = INT_TO_BOOLEAN(16);
8823+ break;
8824+ case GL_COLOR_ALPHA_PAIRING_ATI:
8825+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8826+ params[0] = GL_TRUE;
8827+ break;
8828+ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
8829+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8830+ params[0] = INT_TO_BOOLEAN(3);
8831+ break;
8832+ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
8833+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8834+ params[0] = INT_TO_BOOLEAN(3);
8835+ break;
8836+ case GL_STENCIL_BACK_FUNC:
8837+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.Function[1]);
8838+ break;
8839+ case GL_STENCIL_BACK_VALUE_MASK:
8840+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.ValueMask[1]);
8841+ break;
8842+ case GL_STENCIL_BACK_REF:
8843+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Ref[1]);
8844+ break;
8845+ case GL_STENCIL_BACK_FAIL:
8846+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.FailFunc[1]);
8847+ break;
8848+ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
8849+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZFailFunc[1]);
8850+ break;
8851+ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
8852+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZPassFunc[1]);
8853+ break;
8854+ case GL_FRAMEBUFFER_BINDING_EXT:
8855+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
8856+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Name);
8857+ break;
8858+ case GL_RENDERBUFFER_BINDING_EXT:
8859+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
8860+ params[0] = INT_TO_BOOLEAN(ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0);
8861+ break;
8862+ case GL_MAX_COLOR_ATTACHMENTS_EXT:
8863+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
8864+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxColorAttachments);
8865+ break;
8866+ case GL_MAX_RENDERBUFFER_SIZE_EXT:
8867+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
8868+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxRenderbufferSize);
8869+ break;
8870+ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
8871+ CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
8872+ params[0] = INT_TO_BOOLEAN(MAX_FRAGMENT_UNIFORM_COMPONENTS);
8873+ break;
8874+ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
8875+ CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
8876+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.FragmentShaderDerivative);
8877+ break;
8878+ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
8879+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
8880+ params[0] = INT_TO_BOOLEAN(MAX_VERTEX_UNIFORM_COMPONENTS);
8881+ break;
8882+ case GL_MAX_VARYING_FLOATS_ARB:
8883+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
8884+ params[0] = INT_TO_BOOLEAN(MAX_VARYING_FLOATS);
8885+ break;
8886+ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
8887+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
8888+ params[0] = INT_TO_BOOLEAN(MAX_VERTEX_TEXTURE_IMAGE_UNITS);
8889+ break;
8890+ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
8891+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
8892+ params[0] = INT_TO_BOOLEAN(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
8893+ break;
8894+ default:
8895+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv(pname=0x%x)", pname);
8896+ }
8897+}
8898+
8899+void GLAPIENTRY
8900+_mesa_GetFloatv( GLenum pname, GLfloat *params )
8901+{
8902+ GET_CURRENT_CONTEXT(ctx);
8903+ ASSERT_OUTSIDE_BEGIN_END(ctx);
8904+
8905+ if (!params)
8906+ return;
8907+
8908+ if (ctx->NewState)
8909+ _mesa_update_state(ctx);
8910+
8911+ if (ctx->Driver.GetFloatv &&
8912+ ctx->Driver.GetFloatv(ctx, pname, params))
8913+ return;
8914+
8915+ switch (pname) {
8916+ case GL_ACCUM_RED_BITS:
8917+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumRedBits);
8918+ break;
8919+ case GL_ACCUM_GREEN_BITS:
8920+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumGreenBits);
8921+ break;
8922+ case GL_ACCUM_BLUE_BITS:
8923+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumBlueBits);
8924+ break;
8925+ case GL_ACCUM_ALPHA_BITS:
8926+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumAlphaBits);
8927+ break;
8928+ case GL_ACCUM_CLEAR_VALUE:
8929+ params[0] = ctx->Accum.ClearColor[0];
8930+ params[1] = ctx->Accum.ClearColor[1];
8931+ params[2] = ctx->Accum.ClearColor[2];
8932+ params[3] = ctx->Accum.ClearColor[3];
8933+ break;
8934+ case GL_ALPHA_BIAS:
8935+ params[0] = ctx->Pixel.AlphaBias;
8936+ break;
8937+ case GL_ALPHA_BITS:
8938+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.alphaBits);
8939+ break;
8940+ case GL_ALPHA_SCALE:
8941+ params[0] = ctx->Pixel.AlphaScale;
8942+ break;
8943+ case GL_ALPHA_TEST:
8944+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.AlphaEnabled);
8945+ break;
8946+ case GL_ALPHA_TEST_FUNC:
8947+ params[0] = ENUM_TO_FLOAT(ctx->Color.AlphaFunc);
8948+ break;
8949+ case GL_ALPHA_TEST_REF:
8950+ params[0] = ctx->Color.AlphaRef;
8951+ break;
8952+ case GL_ATTRIB_STACK_DEPTH:
8953+ params[0] = (GLfloat)(ctx->AttribStackDepth);
8954+ break;
8955+ case GL_AUTO_NORMAL:
8956+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.AutoNormal);
8957+ break;
8958+ case GL_AUX_BUFFERS:
8959+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.numAuxBuffers);
8960+ break;
8961+ case GL_BLEND:
8962+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.BlendEnabled);
8963+ break;
8964+ case GL_BLEND_DST:
8965+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstRGB);
8966+ break;
8967+ case GL_BLEND_SRC:
8968+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcRGB);
8969+ break;
8970+ case GL_BLEND_SRC_RGB_EXT:
8971+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcRGB);
8972+ break;
8973+ case GL_BLEND_DST_RGB_EXT:
8974+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstRGB);
8975+ break;
8976+ case GL_BLEND_SRC_ALPHA_EXT:
8977+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcA);
8978+ break;
8979+ case GL_BLEND_DST_ALPHA_EXT:
8980+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstA);
8981+ break;
8982+ case GL_BLEND_EQUATION:
8983+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendEquationRGB );
8984+ break;
8985+ case GL_BLEND_EQUATION_ALPHA_EXT:
8986+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendEquationA );
8987+ break;
8988+ case GL_BLEND_COLOR_EXT:
8989+ params[0] = ctx->Color.BlendColor[0];
8990+ params[1] = ctx->Color.BlendColor[1];
8991+ params[2] = ctx->Color.BlendColor[2];
8992+ params[3] = ctx->Color.BlendColor[3];
8993+ break;
8994+ case GL_BLUE_BIAS:
8995+ params[0] = ctx->Pixel.BlueBias;
8996+ break;
8997+ case GL_BLUE_BITS:
8998+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.blueBits);
8999+ break;
9000+ case GL_BLUE_SCALE:
9001+ params[0] = ctx->Pixel.BlueScale;
9002+ break;
9003+ case GL_CLIENT_ATTRIB_STACK_DEPTH:
9004+ params[0] = (GLfloat)(ctx->ClientAttribStackDepth);
9005+ break;
9006+ case GL_CLIP_PLANE0:
9007+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 0) & 1);
9008+ break;
9009+ case GL_CLIP_PLANE1:
9010+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 1) & 1);
9011+ break;
9012+ case GL_CLIP_PLANE2:
9013+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 2) & 1);
9014+ break;
9015+ case GL_CLIP_PLANE3:
9016+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 3) & 1);
9017+ break;
9018+ case GL_CLIP_PLANE4:
9019+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 4) & 1);
9020+ break;
9021+ case GL_CLIP_PLANE5:
9022+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 5) & 1);
9023+ break;
9024+ case GL_COLOR_CLEAR_VALUE:
9025+ params[0] = ctx->Color.ClearColor[0];
9026+ params[1] = ctx->Color.ClearColor[1];
9027+ params[2] = ctx->Color.ClearColor[2];
9028+ params[3] = ctx->Color.ClearColor[3];
9029+ break;
9030+ case GL_COLOR_MATERIAL:
9031+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.ColorMaterialEnabled);
9032+ break;
9033+ case GL_COLOR_MATERIAL_FACE:
9034+ params[0] = ENUM_TO_FLOAT(ctx->Light.ColorMaterialFace);
9035+ break;
9036+ case GL_COLOR_MATERIAL_PARAMETER:
9037+ params[0] = ENUM_TO_FLOAT(ctx->Light.ColorMaterialMode);
9038+ break;
9039+ case GL_COLOR_WRITEMASK:
9040+ params[0] = (GLfloat)(ctx->Color.ColorMask[RCOMP] ? 1 : 0);
9041+ params[1] = (GLfloat)(ctx->Color.ColorMask[GCOMP] ? 1 : 0);
9042+ params[2] = (GLfloat)(ctx->Color.ColorMask[BCOMP] ? 1 : 0);
9043+ params[3] = (GLfloat)(ctx->Color.ColorMask[ACOMP] ? 1 : 0);
9044+ break;
9045+ case GL_CULL_FACE:
9046+ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.CullFlag);
9047+ break;
9048+ case GL_CULL_FACE_MODE:
9049+ params[0] = ENUM_TO_FLOAT(ctx->Polygon.CullFaceMode);
9050+ break;
9051+ case GL_CURRENT_COLOR:
9052+ {
9053+ FLUSH_CURRENT(ctx, 0);
9054+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0];
9055+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1];
9056+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2];
9057+ params[3] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3];
9058+ }
9059+ break;
9060+ case GL_CURRENT_INDEX:
9061+ {
9062+ FLUSH_CURRENT(ctx, 0);
9063+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0];
9064+ }
9065+ break;
9066+ case GL_CURRENT_NORMAL:
9067+ {
9068+ FLUSH_CURRENT(ctx, 0);
9069+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0];
9070+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1];
9071+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2];
9072+ }
9073+ break;
9074+ case GL_CURRENT_RASTER_COLOR:
9075+ params[0] = ctx->Current.RasterColor[0];
9076+ params[1] = ctx->Current.RasterColor[1];
9077+ params[2] = ctx->Current.RasterColor[2];
9078+ params[3] = ctx->Current.RasterColor[3];
9079+ break;
9080+ case GL_CURRENT_RASTER_DISTANCE:
9081+ params[0] = ctx->Current.RasterDistance;
9082+ break;
9083+ case GL_CURRENT_RASTER_INDEX:
9084+ params[0] = ctx->Current.RasterIndex;
9085+ break;
9086+ case GL_CURRENT_RASTER_POSITION:
9087+ params[0] = ctx->Current.RasterPos[0];
9088+ params[1] = ctx->Current.RasterPos[1];
9089+ params[2] = ctx->Current.RasterPos[2];
9090+ params[3] = ctx->Current.RasterPos[3];
9091+ break;
9092+ case GL_CURRENT_RASTER_SECONDARY_COLOR:
9093+ params[0] = ctx->Current.RasterSecondaryColor[0];
9094+ params[1] = ctx->Current.RasterSecondaryColor[1];
9095+ params[2] = ctx->Current.RasterSecondaryColor[2];
9096+ params[3] = ctx->Current.RasterSecondaryColor[3];
9097+ break;
9098+ case GL_CURRENT_RASTER_TEXTURE_COORDS:
9099+ {
9100+ const GLuint texUnit = ctx->Texture.CurrentUnit;
9101+ params[0] = ctx->Current.RasterTexCoords[texUnit][0];
9102+ params[1] = ctx->Current.RasterTexCoords[texUnit][1];
9103+ params[2] = ctx->Current.RasterTexCoords[texUnit][2];
9104+ params[3] = ctx->Current.RasterTexCoords[texUnit][3];
9105+ }
9106+ break;
9107+ case GL_CURRENT_RASTER_POSITION_VALID:
9108+ params[0] = BOOLEAN_TO_FLOAT(ctx->Current.RasterPosValid);
9109+ break;
9110+ case GL_CURRENT_TEXTURE_COORDS:
9111+ {
9112+ const GLuint texUnit = ctx->Texture.CurrentUnit;
9113+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0];
9114+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1];
9115+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2];
9116+ params[3] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3];
9117+ }
9118+ break;
9119+ case GL_DEPTH_BIAS:
9120+ params[0] = ctx->Pixel.DepthBias;
9121+ break;
9122+ case GL_DEPTH_BITS:
9123+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.depthBits);
9124+ break;
9125+ case GL_DEPTH_CLEAR_VALUE:
9126+ params[0] = ctx->Depth.Clear;
9127+ break;
9128+ case GL_DEPTH_FUNC:
9129+ params[0] = ENUM_TO_FLOAT(ctx->Depth.Func);
9130+ break;
9131+ case GL_DEPTH_RANGE:
9132+ params[0] = ctx->Viewport.Near;
9133+ params[1] = ctx->Viewport.Far;
9134+ break;
9135+ case GL_DEPTH_SCALE:
9136+ params[0] = ctx->Pixel.DepthScale;
9137+ break;
9138+ case GL_DEPTH_TEST:
9139+ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.Test);
9140+ break;
9141+ case GL_DEPTH_WRITEMASK:
9142+ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.Mask);
9143+ break;
9144+ case GL_DITHER:
9145+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.DitherFlag);
9146+ break;
9147+ case GL_DOUBLEBUFFER:
9148+ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.doubleBufferMode);
9149+ break;
9150+ case GL_DRAW_BUFFER:
9151+ params[0] = ENUM_TO_FLOAT(ctx->DrawBuffer->ColorDrawBuffer[0]);
9152+ break;
9153+ case GL_EDGE_FLAG:
9154+ {
9155+ FLUSH_CURRENT(ctx, 0);
9156+ params[0] = BOOLEAN_TO_FLOAT(ctx->Current.EdgeFlag);
9157+ }
9158+ break;
9159+ case GL_FEEDBACK_BUFFER_SIZE:
9160+ params[0] = (GLfloat)(ctx->Feedback.BufferSize);
9161+ break;
9162+ case GL_FEEDBACK_BUFFER_TYPE:
9163+ params[0] = ENUM_TO_FLOAT(ctx->Feedback.Type);
9164+ break;
9165+ case GL_FOG:
9166+ params[0] = BOOLEAN_TO_FLOAT(ctx->Fog.Enabled);
9167+ break;
9168+ case GL_FOG_COLOR:
9169+ params[0] = ctx->Fog.Color[0];
9170+ params[1] = ctx->Fog.Color[1];
9171+ params[2] = ctx->Fog.Color[2];
9172+ params[3] = ctx->Fog.Color[3];
9173+ break;
9174+ case GL_FOG_DENSITY:
9175+ params[0] = ctx->Fog.Density;
9176+ break;
9177+ case GL_FOG_END:
9178+ params[0] = ctx->Fog.End;
9179+ break;
9180+ case GL_FOG_HINT:
9181+ params[0] = ENUM_TO_FLOAT(ctx->Hint.Fog);
9182+ break;
9183+ case GL_FOG_INDEX:
9184+ params[0] = ctx->Fog.Index;
9185+ break;
9186+ case GL_FOG_MODE:
9187+ params[0] = ENUM_TO_FLOAT(ctx->Fog.Mode);
9188+ break;
9189+ case GL_FOG_START:
9190+ params[0] = ctx->Fog.Start;
9191+ break;
9192+ case GL_FRONT_FACE:
9193+ params[0] = ENUM_TO_FLOAT(ctx->Polygon.FrontFace);
9194+ break;
9195+ case GL_GREEN_BIAS:
9196+ params[0] = ctx->Pixel.GreenBias;
9197+ break;
9198+ case GL_GREEN_BITS:
9199+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.greenBits);
9200+ break;
9201+ case GL_GREEN_SCALE:
9202+ params[0] = ctx->Pixel.GreenScale;
9203+ break;
9204+ case GL_INDEX_BITS:
9205+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.indexBits);
9206+ break;
9207+ case GL_INDEX_CLEAR_VALUE:
9208+ params[0] = (GLfloat)(ctx->Color.ClearIndex);
9209+ break;
9210+ case GL_INDEX_MODE:
9211+ params[0] = BOOLEAN_TO_FLOAT(!ctx->DrawBuffer->Visual.rgbMode);
9212+ break;
9213+ case GL_INDEX_OFFSET:
9214+ params[0] = (GLfloat)(ctx->Pixel.IndexOffset);
9215+ break;
9216+ case GL_INDEX_SHIFT:
9217+ params[0] = (GLfloat)(ctx->Pixel.IndexShift);
9218+ break;
9219+ case GL_INDEX_WRITEMASK:
9220+ params[0] = (GLfloat)(ctx->Color.IndexMask);
9221+ break;
9222+ case GL_LIGHT0:
9223+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[0].Enabled);
9224+ break;
9225+ case GL_LIGHT1:
9226+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[1].Enabled);
9227+ break;
9228+ case GL_LIGHT2:
9229+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[2].Enabled);
9230+ break;
9231+ case GL_LIGHT3:
9232+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[3].Enabled);
9233+ break;
9234+ case GL_LIGHT4:
9235+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[4].Enabled);
9236+ break;
9237+ case GL_LIGHT5:
9238+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[5].Enabled);
9239+ break;
9240+ case GL_LIGHT6:
9241+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[6].Enabled);
9242+ break;
9243+ case GL_LIGHT7:
9244+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[7].Enabled);
9245+ break;
9246+ case GL_LIGHTING:
9247+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Enabled);
9248+ break;
9249+ case GL_LIGHT_MODEL_AMBIENT:
9250+ params[0] = ctx->Light.Model.Ambient[0];
9251+ params[1] = ctx->Light.Model.Ambient[1];
9252+ params[2] = ctx->Light.Model.Ambient[2];
9253+ params[3] = ctx->Light.Model.Ambient[3];
9254+ break;
9255+ case GL_LIGHT_MODEL_COLOR_CONTROL:
9256+ params[0] = ENUM_TO_FLOAT(ctx->Light.Model.ColorControl);
9257+ break;
9258+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
9259+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Model.LocalViewer);
9260+ break;
9261+ case GL_LIGHT_MODEL_TWO_SIDE:
9262+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Model.TwoSide);
9263+ break;
9264+ case GL_LINE_SMOOTH:
9265+ params[0] = BOOLEAN_TO_FLOAT(ctx->Line.SmoothFlag);
9266+ break;
9267+ case GL_LINE_SMOOTH_HINT:
9268+ params[0] = ENUM_TO_FLOAT(ctx->Hint.LineSmooth);
9269+ break;
9270+ case GL_LINE_STIPPLE:
9271+ params[0] = BOOLEAN_TO_FLOAT(ctx->Line.StippleFlag);
9272+ break;
9273+ case GL_LINE_STIPPLE_PATTERN:
9274+ params[0] = (GLfloat)(ctx->Line.StipplePattern);
9275+ break;
9276+ case GL_LINE_STIPPLE_REPEAT:
9277+ params[0] = (GLfloat)(ctx->Line.StippleFactor);
9278+ break;
9279+ case GL_LINE_WIDTH:
9280+ params[0] = ctx->Line.Width;
9281+ break;
9282+ case GL_LINE_WIDTH_GRANULARITY:
9283+ params[0] = ctx->Const.LineWidthGranularity;
9284+ break;
9285+ case GL_LINE_WIDTH_RANGE:
9286+ params[0] = ctx->Const.MinLineWidthAA;
9287+ params[1] = ctx->Const.MaxLineWidthAA;
9288+ break;
9289+ case GL_ALIASED_LINE_WIDTH_RANGE:
9290+ params[0] = ctx->Const.MinLineWidth;
9291+ params[1] = ctx->Const.MaxLineWidth;
9292+ break;
9293+ case GL_LIST_BASE:
9294+ params[0] = (GLfloat)(ctx->List.ListBase);
9295+ break;
9296+ case GL_LIST_INDEX:
9297+ params[0] = (GLfloat)(ctx->ListState.CurrentListNum);
9298+ break;
9299+ case GL_LIST_MODE:
9300+ {
9301+ GLenum mode;
9302+ if (!ctx->CompileFlag)
9303+ mode = 0;
9304+ else if (ctx->ExecuteFlag)
9305+ mode = GL_COMPILE_AND_EXECUTE;
9306+ else
9307+ mode = GL_COMPILE;
9308+ params[0] = ENUM_TO_FLOAT(mode);
9309+ }
9310+ break;
9311+ case GL_INDEX_LOGIC_OP:
9312+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.IndexLogicOpEnabled);
9313+ break;
9314+ case GL_COLOR_LOGIC_OP:
9315+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.ColorLogicOpEnabled);
9316+ break;
9317+ case GL_LOGIC_OP_MODE:
9318+ params[0] = ENUM_TO_FLOAT(ctx->Color.LogicOp);
9319+ break;
9320+ case GL_MAP1_COLOR_4:
9321+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Color4);
9322+ break;
9323+ case GL_MAP1_GRID_DOMAIN:
9324+ params[0] = ctx->Eval.MapGrid1u1;
9325+ params[1] = ctx->Eval.MapGrid1u2;
9326+ break;
9327+ case GL_MAP1_GRID_SEGMENTS:
9328+ params[0] = (GLfloat)(ctx->Eval.MapGrid1un);
9329+ break;
9330+ case GL_MAP1_INDEX:
9331+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Index);
9332+ break;
9333+ case GL_MAP1_NORMAL:
9334+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Normal);
9335+ break;
9336+ case GL_MAP1_TEXTURE_COORD_1:
9337+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord1);
9338+ break;
9339+ case GL_MAP1_TEXTURE_COORD_2:
9340+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord2);
9341+ break;
9342+ case GL_MAP1_TEXTURE_COORD_3:
9343+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord3);
9344+ break;
9345+ case GL_MAP1_TEXTURE_COORD_4:
9346+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord4);
9347+ break;
9348+ case GL_MAP1_VERTEX_3:
9349+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Vertex3);
9350+ break;
9351+ case GL_MAP1_VERTEX_4:
9352+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Vertex4);
9353+ break;
9354+ case GL_MAP2_COLOR_4:
9355+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Color4);
9356+ break;
9357+ case GL_MAP2_GRID_DOMAIN:
9358+ params[0] = ctx->Eval.MapGrid2u1;
9359+ params[1] = ctx->Eval.MapGrid2u2;
9360+ params[2] = ctx->Eval.MapGrid2v1;
9361+ params[3] = ctx->Eval.MapGrid2v2;
9362+ break;
9363+ case GL_MAP2_GRID_SEGMENTS:
9364+ params[0] = (GLfloat)(ctx->Eval.MapGrid2un);
9365+ params[1] = (GLfloat)(ctx->Eval.MapGrid2vn);
9366+ break;
9367+ case GL_MAP2_INDEX:
9368+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Index);
9369+ break;
9370+ case GL_MAP2_NORMAL:
9371+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Normal);
9372+ break;
9373+ case GL_MAP2_TEXTURE_COORD_1:
9374+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord1);
9375+ break;
9376+ case GL_MAP2_TEXTURE_COORD_2:
9377+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord2);
9378+ break;
9379+ case GL_MAP2_TEXTURE_COORD_3:
9380+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord3);
9381+ break;
9382+ case GL_MAP2_TEXTURE_COORD_4:
9383+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord4);
9384+ break;
9385+ case GL_MAP2_VERTEX_3:
9386+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Vertex3);
9387+ break;
9388+ case GL_MAP2_VERTEX_4:
9389+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Vertex4);
9390+ break;
9391+ case GL_MAP_COLOR:
9392+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MapColorFlag);
9393+ break;
9394+ case GL_MAP_STENCIL:
9395+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MapStencilFlag);
9396+ break;
9397+ case GL_MATRIX_MODE:
9398+ params[0] = ENUM_TO_FLOAT(ctx->Transform.MatrixMode);
9399+ break;
9400+ case GL_MAX_ATTRIB_STACK_DEPTH:
9401+ params[0] = (GLfloat)(MAX_ATTRIB_STACK_DEPTH);
9402+ break;
9403+ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
9404+ params[0] = (GLfloat)(MAX_CLIENT_ATTRIB_STACK_DEPTH);
9405+ break;
9406+ case GL_MAX_CLIP_PLANES:
9407+ params[0] = (GLfloat)(ctx->Const.MaxClipPlanes);
9408+ break;
9409+ case GL_MAX_ELEMENTS_VERTICES:
9410+ params[0] = (GLfloat)(ctx->Const.MaxArrayLockSize);
9411+ break;
9412+ case GL_MAX_ELEMENTS_INDICES:
9413+ params[0] = (GLfloat)(ctx->Const.MaxArrayLockSize);
9414+ break;
9415+ case GL_MAX_EVAL_ORDER:
9416+ params[0] = (GLfloat)(MAX_EVAL_ORDER);
9417+ break;
9418+ case GL_MAX_LIGHTS:
9419+ params[0] = (GLfloat)(ctx->Const.MaxLights);
9420+ break;
9421+ case GL_MAX_LIST_NESTING:
9422+ params[0] = (GLfloat)(MAX_LIST_NESTING);
9423+ break;
9424+ case GL_MAX_MODELVIEW_STACK_DEPTH:
9425+ params[0] = (GLfloat)(MAX_MODELVIEW_STACK_DEPTH);
9426+ break;
9427+ case GL_MAX_NAME_STACK_DEPTH:
9428+ params[0] = (GLfloat)(MAX_NAME_STACK_DEPTH);
9429+ break;
9430+ case GL_MAX_PIXEL_MAP_TABLE:
9431+ params[0] = (GLfloat)(MAX_PIXEL_MAP_TABLE);
9432+ break;
9433+ case GL_MAX_PROJECTION_STACK_DEPTH:
9434+ params[0] = (GLfloat)(MAX_PROJECTION_STACK_DEPTH);
9435+ break;
9436+ case GL_MAX_TEXTURE_SIZE:
9437+ params[0] = (GLfloat)(1 << (ctx->Const.MaxTextureLevels - 1));
9438+ break;
9439+ case GL_MAX_3D_TEXTURE_SIZE:
9440+ params[0] = (GLfloat)(1 << (ctx->Const.Max3DTextureLevels - 1));
9441+ break;
9442+ case GL_MAX_TEXTURE_STACK_DEPTH:
9443+ params[0] = (GLfloat)(MAX_TEXTURE_STACK_DEPTH);
9444+ break;
9445+ case GL_MAX_VIEWPORT_DIMS:
9446+ params[0] = (GLfloat)(ctx->Const.MaxViewportWidth);
9447+ params[1] = (GLfloat)(ctx->Const.MaxViewportHeight);
9448+ break;
9449+ case GL_MODELVIEW_MATRIX:
9450+ {
9451+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
9452+ params[0] = matrix[0];
9453+ params[1] = matrix[1];
9454+ params[2] = matrix[2];
9455+ params[3] = matrix[3];
9456+ params[4] = matrix[4];
9457+ params[5] = matrix[5];
9458+ params[6] = matrix[6];
9459+ params[7] = matrix[7];
9460+ params[8] = matrix[8];
9461+ params[9] = matrix[9];
9462+ params[10] = matrix[10];
9463+ params[11] = matrix[11];
9464+ params[12] = matrix[12];
9465+ params[13] = matrix[13];
9466+ params[14] = matrix[14];
9467+ params[15] = matrix[15];
9468+ }
9469+ break;
9470+ case GL_MODELVIEW_STACK_DEPTH:
9471+ params[0] = (GLfloat)(ctx->ModelviewMatrixStack.Depth + 1);
9472+ break;
9473+ case GL_NAME_STACK_DEPTH:
9474+ params[0] = (GLfloat)(ctx->Select.NameStackDepth);
9475+ break;
9476+ case GL_NORMALIZE:
9477+ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.Normalize);
9478+ break;
9479+ case GL_PACK_ALIGNMENT:
9480+ params[0] = (GLfloat)(ctx->Pack.Alignment);
9481+ break;
9482+ case GL_PACK_LSB_FIRST:
9483+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.LsbFirst);
9484+ break;
9485+ case GL_PACK_ROW_LENGTH:
9486+ params[0] = (GLfloat)(ctx->Pack.RowLength);
9487+ break;
9488+ case GL_PACK_SKIP_PIXELS:
9489+ params[0] = (GLfloat)(ctx->Pack.SkipPixels);
9490+ break;
9491+ case GL_PACK_SKIP_ROWS:
9492+ params[0] = (GLfloat)(ctx->Pack.SkipRows);
9493+ break;
9494+ case GL_PACK_SWAP_BYTES:
9495+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.SwapBytes);
9496+ break;
9497+ case GL_PACK_SKIP_IMAGES_EXT:
9498+ params[0] = (GLfloat)(ctx->Pack.SkipImages);
9499+ break;
9500+ case GL_PACK_IMAGE_HEIGHT_EXT:
9501+ params[0] = (GLfloat)(ctx->Pack.ImageHeight);
9502+ break;
9503+ case GL_PACK_INVERT_MESA:
9504+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.Invert);
9505+ break;
9506+ case GL_PERSPECTIVE_CORRECTION_HINT:
9507+ params[0] = ENUM_TO_FLOAT(ctx->Hint.PerspectiveCorrection);
9508+ break;
9509+ case GL_PIXEL_MAP_A_TO_A_SIZE:
9510+ params[0] = (GLfloat)(ctx->Pixel.MapAtoAsize);
9511+ break;
9512+ case GL_PIXEL_MAP_B_TO_B_SIZE:
9513+ params[0] = (GLfloat)(ctx->Pixel.MapBtoBsize);
9514+ break;
9515+ case GL_PIXEL_MAP_G_TO_G_SIZE:
9516+ params[0] = (GLfloat)(ctx->Pixel.MapGtoGsize);
9517+ break;
9518+ case GL_PIXEL_MAP_I_TO_A_SIZE:
9519+ params[0] = (GLfloat)(ctx->Pixel.MapItoAsize);
9520+ break;
9521+ case GL_PIXEL_MAP_I_TO_B_SIZE:
9522+ params[0] = (GLfloat)(ctx->Pixel.MapItoBsize);
9523+ break;
9524+ case GL_PIXEL_MAP_I_TO_G_SIZE:
9525+ params[0] = (GLfloat)(ctx->Pixel.MapItoGsize);
9526+ break;
9527+ case GL_PIXEL_MAP_I_TO_I_SIZE:
9528+ params[0] = (GLfloat)(ctx->Pixel.MapItoIsize);
9529+ break;
9530+ case GL_PIXEL_MAP_I_TO_R_SIZE:
9531+ params[0] = (GLfloat)(ctx->Pixel.MapItoRsize);
9532+ break;
9533+ case GL_PIXEL_MAP_R_TO_R_SIZE:
9534+ params[0] = (GLfloat)(ctx->Pixel.MapRtoRsize);
9535+ break;
9536+ case GL_PIXEL_MAP_S_TO_S_SIZE:
9537+ params[0] = (GLfloat)(ctx->Pixel.MapStoSsize);
9538+ break;
9539+ case GL_POINT_SIZE:
9540+ params[0] = ctx->Point.Size;
9541+ break;
9542+ case GL_POINT_SIZE_GRANULARITY:
9543+ params[0] = ctx->Const.PointSizeGranularity;
9544+ break;
9545+ case GL_POINT_SIZE_RANGE:
9546+ params[0] = ctx->Const.MinPointSizeAA;
9547+ params[1] = ctx->Const.MaxPointSizeAA;
9548+ break;
9549+ case GL_ALIASED_POINT_SIZE_RANGE:
9550+ params[0] = ctx->Const.MinPointSize;
9551+ params[1] = ctx->Const.MaxPointSize;
9552+ break;
9553+ case GL_POINT_SMOOTH:
9554+ params[0] = BOOLEAN_TO_FLOAT(ctx->Point.SmoothFlag);
9555+ break;
9556+ case GL_POINT_SMOOTH_HINT:
9557+ params[0] = ENUM_TO_FLOAT(ctx->Hint.PointSmooth);
9558+ break;
9559+ case GL_POINT_SIZE_MIN_EXT:
9560+ params[0] = ctx->Point.MinSize;
9561+ break;
9562+ case GL_POINT_SIZE_MAX_EXT:
9563+ params[0] = ctx->Point.MaxSize;
9564+ break;
9565+ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
9566+ params[0] = ctx->Point.Threshold;
9567+ break;
9568+ case GL_DISTANCE_ATTENUATION_EXT:
9569+ params[0] = ctx->Point.Params[0];
9570+ params[1] = ctx->Point.Params[1];
9571+ params[2] = ctx->Point.Params[2];
9572+ break;
9573+ case GL_POLYGON_MODE:
9574+ params[0] = ENUM_TO_FLOAT(ctx->Polygon.FrontMode);
9575+ params[1] = ENUM_TO_FLOAT(ctx->Polygon.BackMode);
9576+ break;
9577+ case GL_POLYGON_OFFSET_BIAS_EXT:
9578+ params[0] = ctx->Polygon.OffsetUnits;
9579+ break;
9580+ case GL_POLYGON_OFFSET_FACTOR:
9581+ params[0] = ctx->Polygon.OffsetFactor ;
9582+ break;
9583+ case GL_POLYGON_OFFSET_UNITS:
9584+ params[0] = ctx->Polygon.OffsetUnits ;
9585+ break;
9586+ case GL_POLYGON_SMOOTH:
9587+ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.SmoothFlag);
9588+ break;
9589+ case GL_POLYGON_SMOOTH_HINT:
9590+ params[0] = ENUM_TO_FLOAT(ctx->Hint.PolygonSmooth);
9591+ break;
9592+ case GL_POLYGON_STIPPLE:
9593+ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.StippleFlag);
9594+ break;
9595+ case GL_PROJECTION_MATRIX:
9596+ {
9597+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
9598+ params[0] = matrix[0];
9599+ params[1] = matrix[1];
9600+ params[2] = matrix[2];
9601+ params[3] = matrix[3];
9602+ params[4] = matrix[4];
9603+ params[5] = matrix[5];
9604+ params[6] = matrix[6];
9605+ params[7] = matrix[7];
9606+ params[8] = matrix[8];
9607+ params[9] = matrix[9];
9608+ params[10] = matrix[10];
9609+ params[11] = matrix[11];
9610+ params[12] = matrix[12];
9611+ params[13] = matrix[13];
9612+ params[14] = matrix[14];
9613+ params[15] = matrix[15];
9614+ }
9615+ break;
9616+ case GL_PROJECTION_STACK_DEPTH:
9617+ params[0] = (GLfloat)(ctx->ProjectionMatrixStack.Depth + 1);
9618+ break;
9619+ case GL_READ_BUFFER:
9620+ params[0] = ENUM_TO_FLOAT(ctx->ReadBuffer->ColorReadBuffer);
9621+ break;
9622+ case GL_RED_BIAS:
9623+ params[0] = ctx->Pixel.RedBias;
9624+ break;
9625+ case GL_RED_BITS:
9626+ params[0] = (GLfloat)( ctx->DrawBuffer->Visual.redBits );
9627+ break;
9628+ case GL_RED_SCALE:
9629+ params[0] = ctx->Pixel.RedScale;
9630+ break;
9631+ case GL_RENDER_MODE:
9632+ params[0] = ENUM_TO_FLOAT(ctx->RenderMode);
9633+ break;
9634+ case GL_RESCALE_NORMAL:
9635+ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.RescaleNormals);
9636+ break;
9637+ case GL_RGBA_MODE:
9638+ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.rgbMode);
9639+ break;
9640+ case GL_SCISSOR_BOX:
9641+ params[0] = (GLfloat)(ctx->Scissor.X);
9642+ params[1] = (GLfloat)(ctx->Scissor.Y);
9643+ params[2] = (GLfloat)(ctx->Scissor.Width);
9644+ params[3] = (GLfloat)(ctx->Scissor.Height);
9645+ break;
9646+ case GL_SCISSOR_TEST:
9647+ params[0] = BOOLEAN_TO_FLOAT(ctx->Scissor.Enabled);
9648+ break;
9649+ case GL_SELECTION_BUFFER_SIZE:
9650+ params[0] = (GLfloat)(ctx->Select.BufferSize);
9651+ break;
9652+ case GL_SHADE_MODEL:
9653+ params[0] = ENUM_TO_FLOAT(ctx->Light.ShadeModel);
9654+ break;
9655+ case GL_SHARED_TEXTURE_PALETTE_EXT:
9656+ params[0] = BOOLEAN_TO_FLOAT(ctx->Texture.SharedPalette);
9657+ break;
9658+ case GL_STENCIL_BITS:
9659+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.stencilBits);
9660+ break;
9661+ case GL_STENCIL_CLEAR_VALUE:
9662+ params[0] = (GLfloat)(ctx->Stencil.Clear);
9663+ break;
9664+ case GL_STENCIL_FAIL:
9665+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
9666+ break;
9667+ case GL_STENCIL_FUNC:
9668+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
9669+ break;
9670+ case GL_STENCIL_PASS_DEPTH_FAIL:
9671+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
9672+ break;
9673+ case GL_STENCIL_PASS_DEPTH_PASS:
9674+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
9675+ break;
9676+ case GL_STENCIL_REF:
9677+ params[0] = (GLfloat)(ctx->Stencil.Ref[ctx->Stencil.ActiveFace]);
9678+ break;
9679+ case GL_STENCIL_TEST:
9680+ params[0] = BOOLEAN_TO_FLOAT(ctx->Stencil.Enabled);
9681+ break;
9682+ case GL_STENCIL_VALUE_MASK:
9683+ params[0] = (GLfloat)(ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]);
9684+ break;
9685+ case GL_STENCIL_WRITEMASK:
9686+ params[0] = (GLfloat)(ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]);
9687+ break;
9688+ case GL_STEREO:
9689+ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.stereoMode);
9690+ break;
9691+ case GL_SUBPIXEL_BITS:
9692+ params[0] = (GLfloat)(ctx->Const.SubPixelBits);
9693+ break;
9694+ case GL_TEXTURE_1D:
9695+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_1D));
9696+ break;
9697+ case GL_TEXTURE_2D:
9698+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_2D));
9699+ break;
9700+ case GL_TEXTURE_3D:
9701+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_3D));
9702+ break;
9703+ case GL_TEXTURE_BINDING_1D:
9704+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name);
9705+ break;
9706+ case GL_TEXTURE_BINDING_2D:
9707+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name);
9708+ break;
9709+ case GL_TEXTURE_BINDING_3D:
9710+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name);
9711+ break;
9712+ case GL_TEXTURE_ENV_COLOR:
9713+ {
9714+ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
9715+ params[0] = color[0];
9716+ params[1] = color[1];
9717+ params[2] = color[2];
9718+ params[3] = color[3];
9719+ }
9720+ break;
9721+ case GL_TEXTURE_ENV_MODE:
9722+ params[0] = ENUM_TO_FLOAT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
9723+ break;
9724+ case GL_TEXTURE_GEN_S:
9725+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
9726+ break;
9727+ case GL_TEXTURE_GEN_T:
9728+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0));
9729+ break;
9730+ case GL_TEXTURE_GEN_R:
9731+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0));
9732+ break;
9733+ case GL_TEXTURE_GEN_Q:
9734+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0));
9735+ break;
9736+ case GL_TEXTURE_MATRIX:
9737+ {
9738+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
9739+ params[0] = matrix[0];
9740+ params[1] = matrix[1];
9741+ params[2] = matrix[2];
9742+ params[3] = matrix[3];
9743+ params[4] = matrix[4];
9744+ params[5] = matrix[5];
9745+ params[6] = matrix[6];
9746+ params[7] = matrix[7];
9747+ params[8] = matrix[8];
9748+ params[9] = matrix[9];
9749+ params[10] = matrix[10];
9750+ params[11] = matrix[11];
9751+ params[12] = matrix[12];
9752+ params[13] = matrix[13];
9753+ params[14] = matrix[14];
9754+ params[15] = matrix[15];
9755+ }
9756+ break;
9757+ case GL_TEXTURE_STACK_DEPTH:
9758+ params[0] = (GLfloat)(ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1);
9759+ break;
9760+ case GL_UNPACK_ALIGNMENT:
9761+ params[0] = (GLfloat)(ctx->Unpack.Alignment);
9762+ break;
9763+ case GL_UNPACK_LSB_FIRST:
9764+ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.LsbFirst);
9765+ break;
9766+ case GL_UNPACK_ROW_LENGTH:
9767+ params[0] = (GLfloat)(ctx->Unpack.RowLength);
9768+ break;
9769+ case GL_UNPACK_SKIP_PIXELS:
9770+ params[0] = (GLfloat)(ctx->Unpack.SkipPixels);
9771+ break;
9772+ case GL_UNPACK_SKIP_ROWS:
9773+ params[0] = (GLfloat)(ctx->Unpack.SkipRows);
9774+ break;
9775+ case GL_UNPACK_SWAP_BYTES:
9776+ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.SwapBytes);
9777+ break;
9778+ case GL_UNPACK_SKIP_IMAGES_EXT:
9779+ params[0] = (GLfloat)(ctx->Unpack.SkipImages);
9780+ break;
9781+ case GL_UNPACK_IMAGE_HEIGHT_EXT:
9782+ params[0] = (GLfloat)(ctx->Unpack.ImageHeight);
9783+ break;
9784+ case GL_UNPACK_CLIENT_STORAGE_APPLE:
9785+ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.ClientStorage);
9786+ break;
9787+ case GL_VIEWPORT:
9788+ params[0] = (GLfloat)(ctx->Viewport.X);
9789+ params[1] = (GLfloat)(ctx->Viewport.Y);
9790+ params[2] = (GLfloat)(ctx->Viewport.Width);
9791+ params[3] = (GLfloat)(ctx->Viewport.Height);
9792+ break;
9793+ case GL_ZOOM_X:
9794+ params[0] = ctx->Pixel.ZoomX;
9795+ break;
9796+ case GL_ZOOM_Y:
9797+ params[0] = ctx->Pixel.ZoomY;
9798+ break;
9799+ case GL_VERTEX_ARRAY:
9800+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Vertex.Enabled);
9801+ break;
9802+ case GL_VERTEX_ARRAY_SIZE:
9803+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.Size);
9804+ break;
9805+ case GL_VERTEX_ARRAY_TYPE:
9806+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Vertex.Type);
9807+ break;
9808+ case GL_VERTEX_ARRAY_STRIDE:
9809+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.Stride);
9810+ break;
9811+ case GL_VERTEX_ARRAY_COUNT_EXT:
9812+ params[0] = (GLfloat)(0);
9813+ break;
9814+ case GL_NORMAL_ARRAY:
9815+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Normal.Enabled);
9816+ break;
9817+ case GL_NORMAL_ARRAY_TYPE:
9818+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Normal.Type);
9819+ break;
9820+ case GL_NORMAL_ARRAY_STRIDE:
9821+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Normal.Stride);
9822+ break;
9823+ case GL_NORMAL_ARRAY_COUNT_EXT:
9824+ params[0] = (GLfloat)(0);
9825+ break;
9826+ case GL_COLOR_ARRAY:
9827+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Color.Enabled);
9828+ break;
9829+ case GL_COLOR_ARRAY_SIZE:
9830+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.Size);
9831+ break;
9832+ case GL_COLOR_ARRAY_TYPE:
9833+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Color.Type);
9834+ break;
9835+ case GL_COLOR_ARRAY_STRIDE:
9836+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.Stride);
9837+ break;
9838+ case GL_COLOR_ARRAY_COUNT_EXT:
9839+ params[0] = (GLfloat)(0);
9840+ break;
9841+ case GL_INDEX_ARRAY:
9842+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Index.Enabled);
9843+ break;
9844+ case GL_INDEX_ARRAY_TYPE:
9845+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Index.Type);
9846+ break;
9847+ case GL_INDEX_ARRAY_STRIDE:
9848+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Index.Stride);
9849+ break;
9850+ case GL_INDEX_ARRAY_COUNT_EXT:
9851+ params[0] = (GLfloat)(0);
9852+ break;
9853+ case GL_TEXTURE_COORD_ARRAY:
9854+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
9855+ break;
9856+ case GL_TEXTURE_COORD_ARRAY_SIZE:
9857+ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
9858+ break;
9859+ case GL_TEXTURE_COORD_ARRAY_TYPE:
9860+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
9861+ break;
9862+ case GL_TEXTURE_COORD_ARRAY_STRIDE:
9863+ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
9864+ break;
9865+ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
9866+ params[0] = (GLfloat)(0);
9867+ break;
9868+ case GL_EDGE_FLAG_ARRAY:
9869+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->EdgeFlag.Enabled);
9870+ break;
9871+ case GL_EDGE_FLAG_ARRAY_STRIDE:
9872+ params[0] = (GLfloat)(ctx->Array.ArrayObj->EdgeFlag.Stride);
9873+ break;
9874+ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
9875+ params[0] = (GLfloat)(0);
9876+ break;
9877+ case GL_MAX_TEXTURE_UNITS_ARB:
9878+ CHECK_EXT1(ARB_multitexture, "GetFloatv");
9879+ params[0] = (GLfloat)(ctx->Const.MaxTextureUnits);
9880+ break;
9881+ case GL_ACTIVE_TEXTURE_ARB:
9882+ CHECK_EXT1(ARB_multitexture, "GetFloatv");
9883+ params[0] = (GLfloat)(GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit);
9884+ break;
9885+ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
9886+ CHECK_EXT1(ARB_multitexture, "GetFloatv");
9887+ params[0] = (GLfloat)(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
9888+ break;
9889+ case GL_TEXTURE_CUBE_MAP_ARB:
9890+ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
9891+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB));
9892+ break;
9893+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
9894+ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
9895+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name);
9896+ break;
9897+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
9898+ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
9899+ params[0] = (GLfloat)((1 << (ctx->Const.MaxCubeTextureLevels - 1)));
9900+ break;
9901+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
9902+ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
9903+ params[0] = (GLfloat)(ctx->Hint.TextureCompression);
9904+ break;
9905+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
9906+ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
9907+ params[0] = (GLfloat)(_mesa_get_compressed_formats(ctx, NULL, GL_FALSE));
9908+ break;
9909+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
9910+ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
9911+ {
9912+ GLint formats[100];
9913+ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
9914+ ASSERT(n <= 100);
9915+ for (i = 0; i < n; i++)
9916+ params[i] = ENUM_TO_INT(formats[i]);
9917+ }
9918+ break;
9919+ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
9920+ CHECK_EXT1(EXT_compiled_vertex_array, "GetFloatv");
9921+ params[0] = (GLfloat)(ctx->Array.LockFirst);
9922+ break;
9923+ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
9924+ CHECK_EXT1(EXT_compiled_vertex_array, "GetFloatv");
9925+ params[0] = (GLfloat)(ctx->Array.LockCount);
9926+ break;
9927+ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
9928+ {
9929+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
9930+ params[0] = matrix[0];
9931+ params[1] = matrix[4];
9932+ params[2] = matrix[8];
9933+ params[3] = matrix[12];
9934+ params[4] = matrix[1];
9935+ params[5] = matrix[5];
9936+ params[6] = matrix[9];
9937+ params[7] = matrix[13];
9938+ params[8] = matrix[2];
9939+ params[9] = matrix[6];
9940+ params[10] = matrix[10];
9941+ params[11] = matrix[14];
9942+ params[12] = matrix[3];
9943+ params[13] = matrix[7];
9944+ params[14] = matrix[11];
9945+ params[15] = matrix[15];
9946+ }
9947+ break;
9948+ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
9949+ {
9950+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
9951+ params[0] = matrix[0];
9952+ params[1] = matrix[4];
9953+ params[2] = matrix[8];
9954+ params[3] = matrix[12];
9955+ params[4] = matrix[1];
9956+ params[5] = matrix[5];
9957+ params[6] = matrix[9];
9958+ params[7] = matrix[13];
9959+ params[8] = matrix[2];
9960+ params[9] = matrix[6];
9961+ params[10] = matrix[10];
9962+ params[11] = matrix[14];
9963+ params[12] = matrix[3];
9964+ params[13] = matrix[7];
9965+ params[14] = matrix[11];
9966+ params[15] = matrix[15];
9967+ }
9968+ break;
9969+ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
9970+ {
9971+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
9972+ params[0] = matrix[0];
9973+ params[1] = matrix[4];
9974+ params[2] = matrix[8];
9975+ params[3] = matrix[12];
9976+ params[4] = matrix[1];
9977+ params[5] = matrix[5];
9978+ params[6] = matrix[9];
9979+ params[7] = matrix[13];
9980+ params[8] = matrix[2];
9981+ params[9] = matrix[6];
9982+ params[10] = matrix[10];
9983+ params[11] = matrix[14];
9984+ params[12] = matrix[3];
9985+ params[13] = matrix[7];
9986+ params[14] = matrix[11];
9987+ params[15] = matrix[15];
9988+ }
9989+ break;
9990+ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
9991+ {
9992+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
9993+ params[0] = matrix[0];
9994+ params[1] = matrix[4];
9995+ params[2] = matrix[8];
9996+ params[3] = matrix[12];
9997+ params[4] = matrix[1];
9998+ params[5] = matrix[5];
9999+ params[6] = matrix[9];
10000+ params[7] = matrix[13];
10001+ params[8] = matrix[2];
10002+ params[9] = matrix[6];
10003+ params[10] = matrix[10];
10004+ params[11] = matrix[14];
10005+ params[12] = matrix[3];
10006+ params[13] = matrix[7];
10007+ params[14] = matrix[11];
10008+ params[15] = matrix[15];
10009+ }
10010+ break;
10011+ case GL_COLOR_MATRIX_SGI:
10012+ {
10013+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
10014+ params[0] = matrix[0];
10015+ params[1] = matrix[1];
10016+ params[2] = matrix[2];
10017+ params[3] = matrix[3];
10018+ params[4] = matrix[4];
10019+ params[5] = matrix[5];
10020+ params[6] = matrix[6];
10021+ params[7] = matrix[7];
10022+ params[8] = matrix[8];
10023+ params[9] = matrix[9];
10024+ params[10] = matrix[10];
10025+ params[11] = matrix[11];
10026+ params[12] = matrix[12];
10027+ params[13] = matrix[13];
10028+ params[14] = matrix[14];
10029+ params[15] = matrix[15];
10030+ }
10031+ break;
10032+ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
10033+ params[0] = (GLfloat)(ctx->ColorMatrixStack.Depth + 1);
10034+ break;
10035+ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
10036+ params[0] = (GLfloat)(MAX_COLOR_STACK_DEPTH);
10037+ break;
10038+ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
10039+ params[0] = ctx->Pixel.PostColorMatrixScale[0];
10040+ break;
10041+ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
10042+ params[0] = ctx->Pixel.PostColorMatrixScale[1];
10043+ break;
10044+ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
10045+ params[0] = ctx->Pixel.PostColorMatrixScale[2];
10046+ break;
10047+ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
10048+ params[0] = ctx->Pixel.PostColorMatrixScale[3];
10049+ break;
10050+ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
10051+ params[0] = ctx->Pixel.PostColorMatrixBias[0];
10052+ break;
10053+ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
10054+ params[0] = ctx->Pixel.PostColorMatrixBias[1];
10055+ break;
10056+ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
10057+ params[0] = ctx->Pixel.PostColorMatrixBias[2];
10058+ break;
10059+ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
10060+ params[0] = ctx->Pixel.PostColorMatrixBias[3];
10061+ break;
10062+ case GL_CONVOLUTION_1D_EXT:
10063+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10064+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Convolution1DEnabled);
10065+ break;
10066+ case GL_CONVOLUTION_2D_EXT:
10067+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10068+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Convolution2DEnabled);
10069+ break;
10070+ case GL_SEPARABLE_2D_EXT:
10071+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10072+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Separable2DEnabled);
10073+ break;
10074+ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
10075+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10076+ params[0] = ctx->Pixel.PostConvolutionScale[0];
10077+ break;
10078+ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
10079+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10080+ params[0] = ctx->Pixel.PostConvolutionScale[1];
10081+ break;
10082+ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
10083+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10084+ params[0] = ctx->Pixel.PostConvolutionScale[2];
10085+ break;
10086+ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
10087+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10088+ params[0] = ctx->Pixel.PostConvolutionScale[3];
10089+ break;
10090+ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
10091+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10092+ params[0] = ctx->Pixel.PostConvolutionBias[0];
10093+ break;
10094+ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
10095+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10096+ params[0] = ctx->Pixel.PostConvolutionBias[1];
10097+ break;
10098+ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
10099+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10100+ params[0] = ctx->Pixel.PostConvolutionBias[2];
10101+ break;
10102+ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
10103+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10104+ params[0] = ctx->Pixel.PostConvolutionBias[3];
10105+ break;
10106+ case GL_HISTOGRAM:
10107+ CHECK_EXT1(EXT_histogram, "GetFloatv");
10108+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.HistogramEnabled);
10109+ break;
10110+ case GL_MINMAX:
10111+ CHECK_EXT1(EXT_histogram, "GetFloatv");
10112+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MinMaxEnabled);
10113+ break;
10114+ case GL_COLOR_TABLE_SGI:
10115+ CHECK_EXT1(SGI_color_table, "GetFloatv");
10116+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.ColorTableEnabled);
10117+ break;
10118+ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
10119+ CHECK_EXT1(SGI_color_table, "GetFloatv");
10120+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.PostConvolutionColorTableEnabled);
10121+ break;
10122+ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
10123+ CHECK_EXT1(SGI_color_table, "GetFloatv");
10124+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.PostColorMatrixColorTableEnabled);
10125+ break;
10126+ case GL_TEXTURE_COLOR_TABLE_SGI:
10127+ CHECK_EXT1(SGI_texture_color_table, "GetFloatv");
10128+ params[0] = BOOLEAN_TO_FLOAT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled);
10129+ break;
10130+ case GL_COLOR_SUM_EXT:
10131+ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetFloatv");
10132+ params[0] = BOOLEAN_TO_FLOAT(ctx->Fog.ColorSumEnabled);
10133+ break;
10134+ case GL_CURRENT_SECONDARY_COLOR_EXT:
10135+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10136+ {
10137+ FLUSH_CURRENT(ctx, 0);
10138+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0];
10139+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1];
10140+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2];
10141+ params[3] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3];
10142+ }
10143+ break;
10144+ case GL_SECONDARY_COLOR_ARRAY_EXT:
10145+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10146+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->SecondaryColor.Enabled);
10147+ break;
10148+ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
10149+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10150+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->SecondaryColor.Type);
10151+ break;
10152+ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
10153+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10154+ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.Stride);
10155+ break;
10156+ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
10157+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10158+ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.Size);
10159+ break;
10160+ case GL_CURRENT_FOG_COORDINATE_EXT:
10161+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10162+ {
10163+ FLUSH_CURRENT(ctx, 0);
10164+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_FOG][0];
10165+ }
10166+ break;
10167+ case GL_FOG_COORDINATE_ARRAY_EXT:
10168+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10169+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->FogCoord.Enabled);
10170+ break;
10171+ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
10172+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10173+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->FogCoord.Type);
10174+ break;
10175+ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
10176+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10177+ params[0] = (GLfloat)(ctx->Array.ArrayObj->FogCoord.Stride);
10178+ break;
10179+ case GL_FOG_COORDINATE_SOURCE_EXT:
10180+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10181+ params[0] = ENUM_TO_FLOAT(ctx->Fog.FogCoordinateSource);
10182+ break;
10183+ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
10184+ CHECK_EXT1(EXT_texture_lod_bias, "GetFloatv");
10185+ params[0] = ctx->Const.MaxTextureLodBias;
10186+ break;
10187+ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
10188+ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetFloatv");
10189+ params[0] = ctx->Const.MaxTextureMaxAnisotropy;
10190+ break;
10191+ case GL_MULTISAMPLE_ARB:
10192+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10193+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.Enabled);
10194+ break;
10195+ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
10196+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10197+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleAlphaToCoverage);
10198+ break;
10199+ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
10200+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10201+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleAlphaToOne);
10202+ break;
10203+ case GL_SAMPLE_COVERAGE_ARB:
10204+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10205+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleCoverage);
10206+ break;
10207+ case GL_SAMPLE_COVERAGE_VALUE_ARB:
10208+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10209+ params[0] = ctx->Multisample.SampleCoverageValue;
10210+ break;
10211+ case GL_SAMPLE_COVERAGE_INVERT_ARB:
10212+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10213+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleCoverageInvert);
10214+ break;
10215+ case GL_SAMPLE_BUFFERS_ARB:
10216+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10217+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.sampleBuffers);
10218+ break;
10219+ case GL_SAMPLES_ARB:
10220+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10221+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.samples);
10222+ break;
10223+ case GL_RASTER_POSITION_UNCLIPPED_IBM:
10224+ CHECK_EXT1(IBM_rasterpos_clip, "GetFloatv");
10225+ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.RasterPositionUnclipped);
10226+ break;
10227+ case GL_POINT_SPRITE_NV:
10228+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetFloatv");
10229+ params[0] = BOOLEAN_TO_FLOAT(ctx->Point.PointSprite);
10230+ break;
10231+ case GL_POINT_SPRITE_R_MODE_NV:
10232+ CHECK_EXT1(NV_point_sprite, "GetFloatv");
10233+ params[0] = ENUM_TO_FLOAT(ctx->Point.SpriteRMode);
10234+ break;
10235+ case GL_POINT_SPRITE_COORD_ORIGIN:
10236+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetFloatv");
10237+ params[0] = ENUM_TO_FLOAT(ctx->Point.SpriteOrigin);
10238+ break;
10239+ case GL_GENERATE_MIPMAP_HINT_SGIS:
10240+ CHECK_EXT1(SGIS_generate_mipmap, "GetFloatv");
10241+ params[0] = ENUM_TO_FLOAT(ctx->Hint.GenerateMipmap);
10242+ break;
10243+ case GL_VERTEX_PROGRAM_BINDING_NV:
10244+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10245+ params[0] = (GLfloat)((ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0));
10246+ break;
10247+ case GL_VERTEX_ATTRIB_ARRAY0_NV:
10248+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10249+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[0].Enabled);
10250+ break;
10251+ case GL_VERTEX_ATTRIB_ARRAY1_NV:
10252+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10253+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[1].Enabled);
10254+ break;
10255+ case GL_VERTEX_ATTRIB_ARRAY2_NV:
10256+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10257+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[2].Enabled);
10258+ break;
10259+ case GL_VERTEX_ATTRIB_ARRAY3_NV:
10260+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10261+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[3].Enabled);
10262+ break;
10263+ case GL_VERTEX_ATTRIB_ARRAY4_NV:
10264+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10265+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[4].Enabled);
10266+ break;
10267+ case GL_VERTEX_ATTRIB_ARRAY5_NV:
10268+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10269+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[5].Enabled);
10270+ break;
10271+ case GL_VERTEX_ATTRIB_ARRAY6_NV:
10272+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10273+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[6].Enabled);
10274+ break;
10275+ case GL_VERTEX_ATTRIB_ARRAY7_NV:
10276+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10277+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[7].Enabled);
10278+ break;
10279+ case GL_VERTEX_ATTRIB_ARRAY8_NV:
10280+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10281+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[8].Enabled);
10282+ break;
10283+ case GL_VERTEX_ATTRIB_ARRAY9_NV:
10284+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10285+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[9].Enabled);
10286+ break;
10287+ case GL_VERTEX_ATTRIB_ARRAY10_NV:
10288+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10289+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[10].Enabled);
10290+ break;
10291+ case GL_VERTEX_ATTRIB_ARRAY11_NV:
10292+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10293+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[11].Enabled);
10294+ break;
10295+ case GL_VERTEX_ATTRIB_ARRAY12_NV:
10296+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10297+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[12].Enabled);
10298+ break;
10299+ case GL_VERTEX_ATTRIB_ARRAY13_NV:
10300+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10301+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[13].Enabled);
10302+ break;
10303+ case GL_VERTEX_ATTRIB_ARRAY14_NV:
10304+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10305+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[14].Enabled);
10306+ break;
10307+ case GL_VERTEX_ATTRIB_ARRAY15_NV:
10308+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10309+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[15].Enabled);
10310+ break;
10311+ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
10312+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10313+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[0]);
10314+ break;
10315+ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
10316+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10317+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[1]);
10318+ break;
10319+ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
10320+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10321+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[2]);
10322+ break;
10323+ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
10324+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10325+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[3]);
10326+ break;
10327+ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
10328+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10329+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[4]);
10330+ break;
10331+ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
10332+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10333+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[5]);
10334+ break;
10335+ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
10336+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10337+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[6]);
10338+ break;
10339+ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
10340+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10341+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[7]);
10342+ break;
10343+ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
10344+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10345+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[8]);
10346+ break;
10347+ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
10348+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10349+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[9]);
10350+ break;
10351+ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
10352+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10353+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[10]);
10354+ break;
10355+ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
10356+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10357+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[11]);
10358+ break;
10359+ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
10360+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10361+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[12]);
10362+ break;
10363+ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
10364+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10365+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[13]);
10366+ break;
10367+ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
10368+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10369+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[14]);
10370+ break;
10371+ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
10372+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10373+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[15]);
10374+ break;
10375+ case GL_FRAGMENT_PROGRAM_NV:
10376+ CHECK_EXT1(NV_fragment_program, "GetFloatv");
10377+ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.Enabled);
10378+ break;
10379+ case GL_FRAGMENT_PROGRAM_BINDING_NV:
10380+ CHECK_EXT1(NV_fragment_program, "GetFloatv");
10381+ params[0] = (GLfloat)(ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0);
10382+ break;
10383+ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
10384+ CHECK_EXT1(NV_fragment_program, "GetFloatv");
10385+ params[0] = (GLfloat)(MAX_NV_FRAGMENT_PROGRAM_PARAMS);
10386+ break;
10387+ case GL_TEXTURE_RECTANGLE_NV:
10388+ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
10389+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV));
10390+ break;
10391+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
10392+ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
10393+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name);
10394+ break;
10395+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
10396+ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
10397+ params[0] = (GLfloat)(ctx->Const.MaxTextureRectSize);
10398+ break;
10399+ case GL_STENCIL_TEST_TWO_SIDE_EXT:
10400+ CHECK_EXT1(EXT_stencil_two_side, "GetFloatv");
10401+ params[0] = BOOLEAN_TO_FLOAT(ctx->Stencil.TestTwoSide);
10402+ break;
10403+ case GL_ACTIVE_STENCIL_FACE_EXT:
10404+ CHECK_EXT1(EXT_stencil_two_side, "GetFloatv");
10405+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
10406+ break;
10407+ case GL_MAX_SHININESS_NV:
10408+ CHECK_EXT1(NV_light_max_exponent, "GetFloatv");
10409+ params[0] = ctx->Const.MaxShininess;
10410+ break;
10411+ case GL_MAX_SPOT_EXPONENT_NV:
10412+ CHECK_EXT1(NV_light_max_exponent, "GetFloatv");
10413+ params[0] = ctx->Const.MaxSpotExponent;
10414+ break;
10415+ case GL_ARRAY_BUFFER_BINDING_ARB:
10416+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10417+ params[0] = (GLfloat)(ctx->Array.ArrayBufferObj->Name);
10418+ break;
10419+ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
10420+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10421+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
10422+ break;
10423+ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
10424+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10425+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Normal.BufferObj->Name);
10426+ break;
10427+ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
10428+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10429+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.BufferObj->Name);
10430+ break;
10431+ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
10432+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10433+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Index.BufferObj->Name);
10434+ break;
10435+ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
10436+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10437+ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
10438+ break;
10439+ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
10440+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10441+ params[0] = (GLfloat)(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
10442+ break;
10443+ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
10444+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10445+ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
10446+ break;
10447+ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
10448+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10449+ params[0] = (GLfloat)(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
10450+ break;
10451+ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
10452+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10453+ params[0] = (GLfloat)(ctx->Array.ElementArrayBufferObj->Name);
10454+ break;
10455+ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
10456+ CHECK_EXT1(EXT_pixel_buffer_object, "GetFloatv");
10457+ params[0] = (GLfloat)(ctx->Pack.BufferObj->Name);
10458+ break;
10459+ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
10460+ CHECK_EXT1(EXT_pixel_buffer_object, "GetFloatv");
10461+ params[0] = (GLfloat)(ctx->Unpack.BufferObj->Name);
10462+ break;
10463+ case GL_VERTEX_PROGRAM_ARB:
10464+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
10465+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.Enabled);
10466+ break;
10467+ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
10468+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
10469+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.PointSizeEnabled);
10470+ break;
10471+ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
10472+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
10473+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.TwoSideEnabled);
10474+ break;
10475+ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
10476+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
10477+ params[0] = (GLfloat)(ctx->Const.MaxProgramMatrixStackDepth);
10478+ break;
10479+ case GL_MAX_PROGRAM_MATRICES_ARB:
10480+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
10481+ params[0] = (GLfloat)(ctx->Const.MaxProgramMatrices);
10482+ break;
10483+ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
10484+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
10485+ params[0] = BOOLEAN_TO_FLOAT(ctx->CurrentStack->Depth + 1);
10486+ break;
10487+ case GL_CURRENT_MATRIX_ARB:
10488+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetFloatv");
10489+ {
10490+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
10491+ params[0] = matrix[0];
10492+ params[1] = matrix[1];
10493+ params[2] = matrix[2];
10494+ params[3] = matrix[3];
10495+ params[4] = matrix[4];
10496+ params[5] = matrix[5];
10497+ params[6] = matrix[6];
10498+ params[7] = matrix[7];
10499+ params[8] = matrix[8];
10500+ params[9] = matrix[9];
10501+ params[10] = matrix[10];
10502+ params[11] = matrix[11];
10503+ params[12] = matrix[12];
10504+ params[13] = matrix[13];
10505+ params[14] = matrix[14];
10506+ params[15] = matrix[15];
10507+ }
10508+ break;
10509+ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
10510+ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetFloatv");
10511+ {
10512+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
10513+ params[0] = matrix[0];
10514+ params[1] = matrix[4];
10515+ params[2] = matrix[8];
10516+ params[3] = matrix[12];
10517+ params[4] = matrix[1];
10518+ params[5] = matrix[5];
10519+ params[6] = matrix[9];
10520+ params[7] = matrix[13];
10521+ params[8] = matrix[2];
10522+ params[9] = matrix[6];
10523+ params[10] = matrix[10];
10524+ params[11] = matrix[14];
10525+ params[12] = matrix[3];
10526+ params[13] = matrix[7];
10527+ params[14] = matrix[11];
10528+ params[15] = matrix[15];
10529+ }
10530+ break;
10531+ case GL_MAX_VERTEX_ATTRIBS_ARB:
10532+ CHECK_EXT1(ARB_vertex_program, "GetFloatv");
10533+ params[0] = (GLfloat)(ctx->Const.VertexProgram.MaxAttribs);
10534+ break;
10535+ case GL_PROGRAM_ERROR_POSITION_ARB:
10536+ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetFloatv");
10537+ params[0] = (GLfloat)(ctx->Program.ErrorPos);
10538+ break;
10539+ case GL_FRAGMENT_PROGRAM_ARB:
10540+ CHECK_EXT1(ARB_fragment_program, "GetFloatv");
10541+ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.Enabled);
10542+ break;
10543+ case GL_MAX_TEXTURE_COORDS_ARB:
10544+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetFloatv");
10545+ params[0] = (GLfloat)(ctx->Const.MaxTextureCoordUnits);
10546+ break;
10547+ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
10548+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetFloatv");
10549+ params[0] = (GLfloat)(ctx->Const.MaxTextureImageUnits);
10550+ break;
10551+ case GL_DEPTH_BOUNDS_TEST_EXT:
10552+ CHECK_EXT1(EXT_depth_bounds_test, "GetFloatv");
10553+ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.BoundsTest);
10554+ break;
10555+ case GL_DEPTH_BOUNDS_EXT:
10556+ CHECK_EXT1(EXT_depth_bounds_test, "GetFloatv");
10557+ params[0] = ctx->Depth.BoundsMin;
10558+ params[1] = ctx->Depth.BoundsMax;
10559+ break;
10560+ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
10561+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10562+ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.CallbackEnabled);
10563+ break;
10564+ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
10565+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10566+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.CallbackEnabled);
10567+ break;
10568+ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
10569+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10570+ params[0] = (GLfloat)(ctx->FragmentProgram.CurrentPosition);
10571+ break;
10572+ case GL_VERTEX_PROGRAM_POSITION_MESA:
10573+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10574+ params[0] = (GLfloat)(ctx->VertexProgram.CurrentPosition);
10575+ break;
10576+ case GL_MAX_DRAW_BUFFERS_ARB:
10577+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10578+ params[0] = (GLfloat)(ctx->Const.MaxDrawBuffers);
10579+ break;
10580+ case GL_DRAW_BUFFER0_ARB:
10581+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10582+ params[0] = ENUM_TO_FLOAT(ctx->DrawBuffer->ColorDrawBuffer[0]);
10583+ break;
10584+ case GL_DRAW_BUFFER1_ARB:
10585+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10586+ {
10587+ GLenum buffer;
10588+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
10589+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
10590+ return;
10591+ }
10592+ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
10593+ params[0] = ENUM_TO_FLOAT(buffer);
10594+ }
10595+ break;
10596+ case GL_DRAW_BUFFER2_ARB:
10597+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10598+ {
10599+ GLenum buffer;
10600+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
10601+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
10602+ return;
10603+ }
10604+ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
10605+ params[0] = ENUM_TO_FLOAT(buffer);
10606+ }
10607+ break;
10608+ case GL_DRAW_BUFFER3_ARB:
10609+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10610+ {
10611+ GLenum buffer;
10612+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
10613+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
10614+ return;
10615+ }
10616+ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
10617+ params[0] = ENUM_TO_FLOAT(buffer);
10618+ }
10619+ break;
10620+ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
10621+ CHECK_EXT1(OES_read_format, "GetFloatv");
10622+ params[0] = (GLfloat)(ctx->Const.ColorReadType);
10623+ break;
10624+ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
10625+ CHECK_EXT1(OES_read_format, "GetFloatv");
10626+ params[0] = (GLfloat)(ctx->Const.ColorReadFormat);
10627+ break;
10628+ case GL_NUM_FRAGMENT_REGISTERS_ATI:
10629+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10630+ params[0] = (GLfloat)(6);
10631+ break;
10632+ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
10633+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10634+ params[0] = (GLfloat)(8);
10635+ break;
10636+ case GL_NUM_PASSES_ATI:
10637+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10638+ params[0] = (GLfloat)(2);
10639+ break;
10640+ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
10641+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10642+ params[0] = (GLfloat)(8);
10643+ break;
10644+ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
10645+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10646+ params[0] = (GLfloat)(16);
10647+ break;
10648+ case GL_COLOR_ALPHA_PAIRING_ATI:
10649+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10650+ params[0] = BOOLEAN_TO_FLOAT(GL_TRUE);
10651+ break;
10652+ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
10653+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10654+ params[0] = (GLfloat)(3);
10655+ break;
10656+ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
10657+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10658+ params[0] = (GLfloat)(3);
10659+ break;
10660+ case GL_STENCIL_BACK_FUNC:
10661+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.Function[1]);
10662+ break;
10663+ case GL_STENCIL_BACK_VALUE_MASK:
10664+ params[0] = (GLfloat)(ctx->Stencil.ValueMask[1]);
10665+ break;
10666+ case GL_STENCIL_BACK_REF:
10667+ params[0] = (GLfloat)(ctx->Stencil.Ref[1]);
10668+ break;
10669+ case GL_STENCIL_BACK_FAIL:
10670+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.FailFunc[1]);
10671+ break;
10672+ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
10673+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZFailFunc[1]);
10674+ break;
10675+ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
10676+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZPassFunc[1]);
10677+ break;
10678+ case GL_FRAMEBUFFER_BINDING_EXT:
10679+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10680+ params[0] = (GLfloat)(ctx->DrawBuffer->Name);
10681+ break;
10682+ case GL_RENDERBUFFER_BINDING_EXT:
10683+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10684+ params[0] = (GLfloat)(ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0);
10685+ break;
10686+ case GL_MAX_COLOR_ATTACHMENTS_EXT:
10687+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10688+ params[0] = (GLfloat)(ctx->Const.MaxColorAttachments);
10689+ break;
10690+ case GL_MAX_RENDERBUFFER_SIZE_EXT:
10691+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10692+ params[0] = (GLfloat)(ctx->Const.MaxRenderbufferSize);
10693+ break;
10694+ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
10695+ CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
10696+ params[0] = (GLfloat)(MAX_FRAGMENT_UNIFORM_COMPONENTS);
10697+ break;
10698+ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
10699+ CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
10700+ params[0] = ENUM_TO_FLOAT(ctx->Hint.FragmentShaderDerivative);
10701+ break;
10702+ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
10703+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10704+ params[0] = (GLfloat)(MAX_VERTEX_UNIFORM_COMPONENTS);
10705+ break;
10706+ case GL_MAX_VARYING_FLOATS_ARB:
10707+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10708+ params[0] = (GLfloat)(MAX_VARYING_FLOATS);
10709+ break;
10710+ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
10711+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10712+ params[0] = (GLfloat)(MAX_VERTEX_TEXTURE_IMAGE_UNITS);
10713+ break;
10714+ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
10715+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10716+ params[0] = (GLfloat)(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
10717+ break;
10718+ default:
10719+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv(pname=0x%x)", pname);
10720+ }
10721+}
10722+
10723+void GLAPIENTRY
10724+_mesa_GetIntegerv( GLenum pname, GLint *params )
10725+{
10726+ GET_CURRENT_CONTEXT(ctx);
10727+ ASSERT_OUTSIDE_BEGIN_END(ctx);
10728+
10729+ if (!params)
10730+ return;
10731+
10732+ if (ctx->NewState)
10733+ _mesa_update_state(ctx);
10734+
10735+ if (ctx->Driver.GetIntegerv &&
10736+ ctx->Driver.GetIntegerv(ctx, pname, params))
10737+ return;
10738+
10739+ switch (pname) {
10740+ case GL_ACCUM_RED_BITS:
10741+ params[0] = ctx->DrawBuffer->Visual.accumRedBits;
10742+ break;
10743+ case GL_ACCUM_GREEN_BITS:
10744+ params[0] = ctx->DrawBuffer->Visual.accumGreenBits;
10745+ break;
10746+ case GL_ACCUM_BLUE_BITS:
10747+ params[0] = ctx->DrawBuffer->Visual.accumBlueBits;
10748+ break;
10749+ case GL_ACCUM_ALPHA_BITS:
10750+ params[0] = ctx->DrawBuffer->Visual.accumAlphaBits;
10751+ break;
10752+ case GL_ACCUM_CLEAR_VALUE:
10753+ params[0] = FLOAT_TO_INT(ctx->Accum.ClearColor[0]);
10754+ params[1] = FLOAT_TO_INT(ctx->Accum.ClearColor[1]);
10755+ params[2] = FLOAT_TO_INT(ctx->Accum.ClearColor[2]);
10756+ params[3] = FLOAT_TO_INT(ctx->Accum.ClearColor[3]);
10757+ break;
10758+ case GL_ALPHA_BIAS:
10759+ params[0] = IROUND(ctx->Pixel.AlphaBias);
10760+ break;
10761+ case GL_ALPHA_BITS:
10762+ params[0] = ctx->DrawBuffer->Visual.alphaBits;
10763+ break;
10764+ case GL_ALPHA_SCALE:
10765+ params[0] = IROUND(ctx->Pixel.AlphaScale);
10766+ break;
10767+ case GL_ALPHA_TEST:
10768+ params[0] = BOOLEAN_TO_INT(ctx->Color.AlphaEnabled);
10769+ break;
10770+ case GL_ALPHA_TEST_FUNC:
10771+ params[0] = ENUM_TO_INT(ctx->Color.AlphaFunc);
10772+ break;
10773+ case GL_ALPHA_TEST_REF:
10774+ params[0] = FLOAT_TO_INT(ctx->Color.AlphaRef);
10775+ break;
10776+ case GL_ATTRIB_STACK_DEPTH:
10777+ params[0] = ctx->AttribStackDepth;
10778+ break;
10779+ case GL_AUTO_NORMAL:
10780+ params[0] = BOOLEAN_TO_INT(ctx->Eval.AutoNormal);
10781+ break;
10782+ case GL_AUX_BUFFERS:
10783+ params[0] = ctx->DrawBuffer->Visual.numAuxBuffers;
10784+ break;
10785+ case GL_BLEND:
10786+ params[0] = BOOLEAN_TO_INT(ctx->Color.BlendEnabled);
10787+ break;
10788+ case GL_BLEND_DST:
10789+ params[0] = ENUM_TO_INT(ctx->Color.BlendDstRGB);
10790+ break;
10791+ case GL_BLEND_SRC:
10792+ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcRGB);
10793+ break;
10794+ case GL_BLEND_SRC_RGB_EXT:
10795+ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcRGB);
10796+ break;
10797+ case GL_BLEND_DST_RGB_EXT:
10798+ params[0] = ENUM_TO_INT(ctx->Color.BlendDstRGB);
10799+ break;
10800+ case GL_BLEND_SRC_ALPHA_EXT:
10801+ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcA);
10802+ break;
10803+ case GL_BLEND_DST_ALPHA_EXT:
10804+ params[0] = ENUM_TO_INT(ctx->Color.BlendDstA);
10805+ break;
10806+ case GL_BLEND_EQUATION:
10807+ params[0] = ENUM_TO_INT(ctx->Color.BlendEquationRGB );
10808+ break;
10809+ case GL_BLEND_EQUATION_ALPHA_EXT:
10810+ params[0] = ENUM_TO_INT(ctx->Color.BlendEquationA );
10811+ break;
10812+ case GL_BLEND_COLOR_EXT:
10813+ params[0] = FLOAT_TO_INT(ctx->Color.BlendColor[0]);
10814+ params[1] = FLOAT_TO_INT(ctx->Color.BlendColor[1]);
10815+ params[2] = FLOAT_TO_INT(ctx->Color.BlendColor[2]);
10816+ params[3] = FLOAT_TO_INT(ctx->Color.BlendColor[3]);
10817+ break;
10818+ case GL_BLUE_BIAS:
10819+ params[0] = IROUND(ctx->Pixel.BlueBias);
10820+ break;
10821+ case GL_BLUE_BITS:
10822+ params[0] = ctx->DrawBuffer->Visual.blueBits;
10823+ break;
10824+ case GL_BLUE_SCALE:
10825+ params[0] = IROUND(ctx->Pixel.BlueScale);
10826+ break;
10827+ case GL_CLIENT_ATTRIB_STACK_DEPTH:
10828+ params[0] = ctx->ClientAttribStackDepth;
10829+ break;
10830+ case GL_CLIP_PLANE0:
10831+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 0) & 1);
10832+ break;
10833+ case GL_CLIP_PLANE1:
10834+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 1) & 1);
10835+ break;
10836+ case GL_CLIP_PLANE2:
10837+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 2) & 1);
10838+ break;
10839+ case GL_CLIP_PLANE3:
10840+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 3) & 1);
10841+ break;
10842+ case GL_CLIP_PLANE4:
10843+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 4) & 1);
10844+ break;
10845+ case GL_CLIP_PLANE5:
10846+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 5) & 1);
10847+ break;
10848+ case GL_COLOR_CLEAR_VALUE:
10849+ params[0] = FLOAT_TO_INT(ctx->Color.ClearColor[0]);
10850+ params[1] = FLOAT_TO_INT(ctx->Color.ClearColor[1]);
10851+ params[2] = FLOAT_TO_INT(ctx->Color.ClearColor[2]);
10852+ params[3] = FLOAT_TO_INT(ctx->Color.ClearColor[3]);
10853+ break;
10854+ case GL_COLOR_MATERIAL:
10855+ params[0] = BOOLEAN_TO_INT(ctx->Light.ColorMaterialEnabled);
10856+ break;
10857+ case GL_COLOR_MATERIAL_FACE:
10858+ params[0] = ENUM_TO_INT(ctx->Light.ColorMaterialFace);
10859+ break;
10860+ case GL_COLOR_MATERIAL_PARAMETER:
10861+ params[0] = ENUM_TO_INT(ctx->Light.ColorMaterialMode);
10862+ break;
10863+ case GL_COLOR_WRITEMASK:
10864+ params[0] = ctx->Color.ColorMask[RCOMP] ? 1 : 0;
10865+ params[1] = ctx->Color.ColorMask[GCOMP] ? 1 : 0;
10866+ params[2] = ctx->Color.ColorMask[BCOMP] ? 1 : 0;
10867+ params[3] = ctx->Color.ColorMask[ACOMP] ? 1 : 0;
10868+ break;
10869+ case GL_CULL_FACE:
10870+ params[0] = BOOLEAN_TO_INT(ctx->Polygon.CullFlag);
10871+ break;
10872+ case GL_CULL_FACE_MODE:
10873+ params[0] = ENUM_TO_INT(ctx->Polygon.CullFaceMode);
10874+ break;
10875+ case GL_CURRENT_COLOR:
10876+ {
10877+ FLUSH_CURRENT(ctx, 0);
10878+ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]);
10879+ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]);
10880+ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]);
10881+ params[3] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]);
10882+ }
10883+ break;
10884+ case GL_CURRENT_INDEX:
10885+ {
10886+ FLUSH_CURRENT(ctx, 0);
10887+ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]);
10888+ }
10889+ break;
10890+ case GL_CURRENT_NORMAL:
10891+ {
10892+ FLUSH_CURRENT(ctx, 0);
10893+ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]);
10894+ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]);
10895+ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]);
10896+ }
10897+ break;
10898+ case GL_CURRENT_RASTER_COLOR:
10899+ params[0] = FLOAT_TO_INT(ctx->Current.RasterColor[0]);
10900+ params[1] = FLOAT_TO_INT(ctx->Current.RasterColor[1]);
10901+ params[2] = FLOAT_TO_INT(ctx->Current.RasterColor[2]);
10902+ params[3] = FLOAT_TO_INT(ctx->Current.RasterColor[3]);
10903+ break;
10904+ case GL_CURRENT_RASTER_DISTANCE:
10905+ params[0] = IROUND(ctx->Current.RasterDistance);
10906+ break;
10907+ case GL_CURRENT_RASTER_INDEX:
10908+ params[0] = IROUND(ctx->Current.RasterIndex);
10909+ break;
10910+ case GL_CURRENT_RASTER_POSITION:
10911+ params[0] = IROUND(ctx->Current.RasterPos[0]);
10912+ params[1] = IROUND(ctx->Current.RasterPos[1]);
10913+ params[2] = IROUND(ctx->Current.RasterPos[2]);
10914+ params[3] = IROUND(ctx->Current.RasterPos[3]);
10915+ break;
10916+ case GL_CURRENT_RASTER_SECONDARY_COLOR:
10917+ params[0] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[0]);
10918+ params[1] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[1]);
10919+ params[2] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[2]);
10920+ params[3] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[3]);
10921+ break;
10922+ case GL_CURRENT_RASTER_TEXTURE_COORDS:
10923+ {
10924+ const GLuint texUnit = ctx->Texture.CurrentUnit;
10925+ params[0] = IROUND(ctx->Current.RasterTexCoords[texUnit][0]);
10926+ params[1] = IROUND(ctx->Current.RasterTexCoords[texUnit][1]);
10927+ params[2] = IROUND(ctx->Current.RasterTexCoords[texUnit][2]);
10928+ params[3] = IROUND(ctx->Current.RasterTexCoords[texUnit][3]);
10929+ }
10930+ break;
10931+ case GL_CURRENT_RASTER_POSITION_VALID:
10932+ params[0] = BOOLEAN_TO_INT(ctx->Current.RasterPosValid);
10933+ break;
10934+ case GL_CURRENT_TEXTURE_COORDS:
10935+ {
10936+ const GLuint texUnit = ctx->Texture.CurrentUnit;
10937+ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]);
10938+ params[1] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]);
10939+ params[2] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]);
10940+ params[3] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]);
10941+ }
10942+ break;
10943+ case GL_DEPTH_BIAS:
10944+ params[0] = IROUND(ctx->Pixel.DepthBias);
10945+ break;
10946+ case GL_DEPTH_BITS:
10947+ params[0] = ctx->DrawBuffer->Visual.depthBits;
10948+ break;
10949+ case GL_DEPTH_CLEAR_VALUE:
10950+ params[0] = IROUND(ctx->Depth.Clear);
10951+ break;
10952+ case GL_DEPTH_FUNC:
10953+ params[0] = ENUM_TO_INT(ctx->Depth.Func);
10954+ break;
10955+ case GL_DEPTH_RANGE:
10956+ params[0] = FLOAT_TO_INT(ctx->Viewport.Near);
10957+ params[1] = FLOAT_TO_INT(ctx->Viewport.Far);
10958+ break;
10959+ case GL_DEPTH_SCALE:
10960+ params[0] = IROUND(ctx->Pixel.DepthScale);
10961+ break;
10962+ case GL_DEPTH_TEST:
10963+ params[0] = BOOLEAN_TO_INT(ctx->Depth.Test);
10964+ break;
10965+ case GL_DEPTH_WRITEMASK:
10966+ params[0] = BOOLEAN_TO_INT(ctx->Depth.Mask);
10967+ break;
10968+ case GL_DITHER:
10969+ params[0] = BOOLEAN_TO_INT(ctx->Color.DitherFlag);
10970+ break;
10971+ case GL_DOUBLEBUFFER:
10972+ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.doubleBufferMode);
10973+ break;
10974+ case GL_DRAW_BUFFER:
10975+ params[0] = ENUM_TO_INT(ctx->DrawBuffer->ColorDrawBuffer[0]);
10976+ break;
10977+ case GL_EDGE_FLAG:
10978+ {
10979+ FLUSH_CURRENT(ctx, 0);
10980+ params[0] = BOOLEAN_TO_INT(ctx->Current.EdgeFlag);
10981+ }
10982+ break;
10983+ case GL_FEEDBACK_BUFFER_SIZE:
10984+ params[0] = ctx->Feedback.BufferSize;
10985+ break;
10986+ case GL_FEEDBACK_BUFFER_TYPE:
10987+ params[0] = ENUM_TO_INT(ctx->Feedback.Type);
10988+ break;
10989+ case GL_FOG:
10990+ params[0] = BOOLEAN_TO_INT(ctx->Fog.Enabled);
10991+ break;
10992+ case GL_FOG_COLOR:
10993+ params[0] = FLOAT_TO_INT(ctx->Fog.Color[0]);
10994+ params[1] = FLOAT_TO_INT(ctx->Fog.Color[1]);
10995+ params[2] = FLOAT_TO_INT(ctx->Fog.Color[2]);
10996+ params[3] = FLOAT_TO_INT(ctx->Fog.Color[3]);
10997+ break;
10998+ case GL_FOG_DENSITY:
10999+ params[0] = IROUND(ctx->Fog.Density);
11000+ break;
11001+ case GL_FOG_END:
11002+ params[0] = IROUND(ctx->Fog.End);
11003+ break;
11004+ case GL_FOG_HINT:
11005+ params[0] = ENUM_TO_INT(ctx->Hint.Fog);
11006+ break;
11007+ case GL_FOG_INDEX:
11008+ params[0] = IROUND(ctx->Fog.Index);
11009+ break;
11010+ case GL_FOG_MODE:
11011+ params[0] = ENUM_TO_INT(ctx->Fog.Mode);
11012+ break;
11013+ case GL_FOG_START:
11014+ params[0] = IROUND(ctx->Fog.Start);
11015+ break;
11016+ case GL_FRONT_FACE:
11017+ params[0] = ENUM_TO_INT(ctx->Polygon.FrontFace);
11018+ break;
11019+ case GL_GREEN_BIAS:
11020+ params[0] = IROUND(ctx->Pixel.GreenBias);
11021+ break;
11022+ case GL_GREEN_BITS:
11023+ params[0] = ctx->DrawBuffer->Visual.greenBits;
11024+ break;
11025+ case GL_GREEN_SCALE:
11026+ params[0] = IROUND(ctx->Pixel.GreenScale);
11027+ break;
11028+ case GL_INDEX_BITS:
11029+ params[0] = ctx->DrawBuffer->Visual.indexBits;
11030+ break;
11031+ case GL_INDEX_CLEAR_VALUE:
11032+ params[0] = ctx->Color.ClearIndex;
11033+ break;
11034+ case GL_INDEX_MODE:
11035+ params[0] = BOOLEAN_TO_INT(!ctx->DrawBuffer->Visual.rgbMode);
11036+ break;
11037+ case GL_INDEX_OFFSET:
11038+ params[0] = ctx->Pixel.IndexOffset;
11039+ break;
11040+ case GL_INDEX_SHIFT:
11041+ params[0] = ctx->Pixel.IndexShift;
11042+ break;
11043+ case GL_INDEX_WRITEMASK:
11044+ params[0] = ctx->Color.IndexMask;
11045+ break;
11046+ case GL_LIGHT0:
11047+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[0].Enabled);
11048+ break;
11049+ case GL_LIGHT1:
11050+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[1].Enabled);
11051+ break;
11052+ case GL_LIGHT2:
11053+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[2].Enabled);
11054+ break;
11055+ case GL_LIGHT3:
11056+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[3].Enabled);
11057+ break;
11058+ case GL_LIGHT4:
11059+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[4].Enabled);
11060+ break;
11061+ case GL_LIGHT5:
11062+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[5].Enabled);
11063+ break;
11064+ case GL_LIGHT6:
11065+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[6].Enabled);
11066+ break;
11067+ case GL_LIGHT7:
11068+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[7].Enabled);
11069+ break;
11070+ case GL_LIGHTING:
11071+ params[0] = BOOLEAN_TO_INT(ctx->Light.Enabled);
11072+ break;
11073+ case GL_LIGHT_MODEL_AMBIENT:
11074+ params[0] = FLOAT_TO_INT(ctx->Light.Model.Ambient[0]);
11075+ params[1] = FLOAT_TO_INT(ctx->Light.Model.Ambient[1]);
11076+ params[2] = FLOAT_TO_INT(ctx->Light.Model.Ambient[2]);
11077+ params[3] = FLOAT_TO_INT(ctx->Light.Model.Ambient[3]);
11078+ break;
11079+ case GL_LIGHT_MODEL_COLOR_CONTROL:
11080+ params[0] = ENUM_TO_INT(ctx->Light.Model.ColorControl);
11081+ break;
11082+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
11083+ params[0] = BOOLEAN_TO_INT(ctx->Light.Model.LocalViewer);
11084+ break;
11085+ case GL_LIGHT_MODEL_TWO_SIDE:
11086+ params[0] = BOOLEAN_TO_INT(ctx->Light.Model.TwoSide);
11087+ break;
11088+ case GL_LINE_SMOOTH:
11089+ params[0] = BOOLEAN_TO_INT(ctx->Line.SmoothFlag);
11090+ break;
11091+ case GL_LINE_SMOOTH_HINT:
11092+ params[0] = ENUM_TO_INT(ctx->Hint.LineSmooth);
11093+ break;
11094+ case GL_LINE_STIPPLE:
11095+ params[0] = BOOLEAN_TO_INT(ctx->Line.StippleFlag);
11096+ break;
11097+ case GL_LINE_STIPPLE_PATTERN:
11098+ params[0] = ctx->Line.StipplePattern;
11099+ break;
11100+ case GL_LINE_STIPPLE_REPEAT:
11101+ params[0] = ctx->Line.StippleFactor;
11102+ break;
11103+ case GL_LINE_WIDTH:
11104+ params[0] = IROUND(ctx->Line.Width);
11105+ break;
11106+ case GL_LINE_WIDTH_GRANULARITY:
11107+ params[0] = IROUND(ctx->Const.LineWidthGranularity);
11108+ break;
11109+ case GL_LINE_WIDTH_RANGE:
11110+ params[0] = IROUND(ctx->Const.MinLineWidthAA);
11111+ params[1] = IROUND(ctx->Const.MaxLineWidthAA);
11112+ break;
11113+ case GL_ALIASED_LINE_WIDTH_RANGE:
11114+ params[0] = IROUND(ctx->Const.MinLineWidth);
11115+ params[1] = IROUND(ctx->Const.MaxLineWidth);
11116+ break;
11117+ case GL_LIST_BASE:
11118+ params[0] = ctx->List.ListBase;
11119+ break;
11120+ case GL_LIST_INDEX:
11121+ params[0] = ctx->ListState.CurrentListNum;
11122+ break;
11123+ case GL_LIST_MODE:
11124+ {
11125+ GLenum mode;
11126+ if (!ctx->CompileFlag)
11127+ mode = 0;
11128+ else if (ctx->ExecuteFlag)
11129+ mode = GL_COMPILE_AND_EXECUTE;
11130+ else
11131+ mode = GL_COMPILE;
11132+ params[0] = ENUM_TO_INT(mode);
11133+ }
11134+ break;
11135+ case GL_INDEX_LOGIC_OP:
11136+ params[0] = BOOLEAN_TO_INT(ctx->Color.IndexLogicOpEnabled);
11137+ break;
11138+ case GL_COLOR_LOGIC_OP:
11139+ params[0] = BOOLEAN_TO_INT(ctx->Color.ColorLogicOpEnabled);
11140+ break;
11141+ case GL_LOGIC_OP_MODE:
11142+ params[0] = ENUM_TO_INT(ctx->Color.LogicOp);
11143+ break;
11144+ case GL_MAP1_COLOR_4:
11145+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Color4);
11146+ break;
11147+ case GL_MAP1_GRID_DOMAIN:
11148+ params[0] = IROUND(ctx->Eval.MapGrid1u1);
11149+ params[1] = IROUND(ctx->Eval.MapGrid1u2);
11150+ break;
11151+ case GL_MAP1_GRID_SEGMENTS:
11152+ params[0] = ctx->Eval.MapGrid1un;
11153+ break;
11154+ case GL_MAP1_INDEX:
11155+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Index);
11156+ break;
11157+ case GL_MAP1_NORMAL:
11158+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Normal);
11159+ break;
11160+ case GL_MAP1_TEXTURE_COORD_1:
11161+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord1);
11162+ break;
11163+ case GL_MAP1_TEXTURE_COORD_2:
11164+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord2);
11165+ break;
11166+ case GL_MAP1_TEXTURE_COORD_3:
11167+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord3);
11168+ break;
11169+ case GL_MAP1_TEXTURE_COORD_4:
11170+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord4);
11171+ break;
11172+ case GL_MAP1_VERTEX_3:
11173+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Vertex3);
11174+ break;
11175+ case GL_MAP1_VERTEX_4:
11176+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Vertex4);
11177+ break;
11178+ case GL_MAP2_COLOR_4:
11179+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Color4);
11180+ break;
11181+ case GL_MAP2_GRID_DOMAIN:
11182+ params[0] = IROUND(ctx->Eval.MapGrid2u1);
11183+ params[1] = IROUND(ctx->Eval.MapGrid2u2);
11184+ params[2] = IROUND(ctx->Eval.MapGrid2v1);
11185+ params[3] = IROUND(ctx->Eval.MapGrid2v2);
11186+ break;
11187+ case GL_MAP2_GRID_SEGMENTS:
11188+ params[0] = ctx->Eval.MapGrid2un;
11189+ params[1] = ctx->Eval.MapGrid2vn;
11190+ break;
11191+ case GL_MAP2_INDEX:
11192+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Index);
11193+ break;
11194+ case GL_MAP2_NORMAL:
11195+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Normal);
11196+ break;
11197+ case GL_MAP2_TEXTURE_COORD_1:
11198+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord1);
11199+ break;
11200+ case GL_MAP2_TEXTURE_COORD_2:
11201+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord2);
11202+ break;
11203+ case GL_MAP2_TEXTURE_COORD_3:
11204+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord3);
11205+ break;
11206+ case GL_MAP2_TEXTURE_COORD_4:
11207+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord4);
11208+ break;
11209+ case GL_MAP2_VERTEX_3:
11210+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Vertex3);
11211+ break;
11212+ case GL_MAP2_VERTEX_4:
11213+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Vertex4);
11214+ break;
11215+ case GL_MAP_COLOR:
11216+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MapColorFlag);
11217+ break;
11218+ case GL_MAP_STENCIL:
11219+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MapStencilFlag);
11220+ break;
11221+ case GL_MATRIX_MODE:
11222+ params[0] = ENUM_TO_INT(ctx->Transform.MatrixMode);
11223+ break;
11224+ case GL_MAX_ATTRIB_STACK_DEPTH:
11225+ params[0] = MAX_ATTRIB_STACK_DEPTH;
11226+ break;
11227+ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
11228+ params[0] = MAX_CLIENT_ATTRIB_STACK_DEPTH;
11229+ break;
11230+ case GL_MAX_CLIP_PLANES:
11231+ params[0] = ctx->Const.MaxClipPlanes;
11232+ break;
11233+ case GL_MAX_ELEMENTS_VERTICES:
11234+ params[0] = ctx->Const.MaxArrayLockSize;
11235+ break;
11236+ case GL_MAX_ELEMENTS_INDICES:
11237+ params[0] = ctx->Const.MaxArrayLockSize;
11238+ break;
11239+ case GL_MAX_EVAL_ORDER:
11240+ params[0] = MAX_EVAL_ORDER;
11241+ break;
11242+ case GL_MAX_LIGHTS:
11243+ params[0] = ctx->Const.MaxLights;
11244+ break;
11245+ case GL_MAX_LIST_NESTING:
11246+ params[0] = MAX_LIST_NESTING;
11247+ break;
11248+ case GL_MAX_MODELVIEW_STACK_DEPTH:
11249+ params[0] = MAX_MODELVIEW_STACK_DEPTH;
11250+ break;
11251+ case GL_MAX_NAME_STACK_DEPTH:
11252+ params[0] = MAX_NAME_STACK_DEPTH;
11253+ break;
11254+ case GL_MAX_PIXEL_MAP_TABLE:
11255+ params[0] = MAX_PIXEL_MAP_TABLE;
11256+ break;
11257+ case GL_MAX_PROJECTION_STACK_DEPTH:
11258+ params[0] = MAX_PROJECTION_STACK_DEPTH;
11259+ break;
11260+ case GL_MAX_TEXTURE_SIZE:
11261+ params[0] = 1 << (ctx->Const.MaxTextureLevels - 1);
11262+ break;
11263+ case GL_MAX_3D_TEXTURE_SIZE:
11264+ params[0] = 1 << (ctx->Const.Max3DTextureLevels - 1);
11265+ break;
11266+ case GL_MAX_TEXTURE_STACK_DEPTH:
11267+ params[0] = MAX_TEXTURE_STACK_DEPTH;
11268+ break;
11269+ case GL_MAX_VIEWPORT_DIMS:
11270+ params[0] = ctx->Const.MaxViewportWidth;
11271+ params[1] = ctx->Const.MaxViewportHeight;
11272+ break;
11273+ case GL_MODELVIEW_MATRIX:
11274+ {
11275+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
11276+ params[0] = IROUND(matrix[0]);
11277+ params[1] = IROUND(matrix[1]);
11278+ params[2] = IROUND(matrix[2]);
11279+ params[3] = IROUND(matrix[3]);
11280+ params[4] = IROUND(matrix[4]);
11281+ params[5] = IROUND(matrix[5]);
11282+ params[6] = IROUND(matrix[6]);
11283+ params[7] = IROUND(matrix[7]);
11284+ params[8] = IROUND(matrix[8]);
11285+ params[9] = IROUND(matrix[9]);
11286+ params[10] = IROUND(matrix[10]);
11287+ params[11] = IROUND(matrix[11]);
11288+ params[12] = IROUND(matrix[12]);
11289+ params[13] = IROUND(matrix[13]);
11290+ params[14] = IROUND(matrix[14]);
11291+ params[15] = IROUND(matrix[15]);
11292+ }
11293+ break;
11294+ case GL_MODELVIEW_STACK_DEPTH:
11295+ params[0] = ctx->ModelviewMatrixStack.Depth + 1;
11296+ break;
11297+ case GL_NAME_STACK_DEPTH:
11298+ params[0] = ctx->Select.NameStackDepth;
11299+ break;
11300+ case GL_NORMALIZE:
11301+ params[0] = BOOLEAN_TO_INT(ctx->Transform.Normalize);
11302+ break;
11303+ case GL_PACK_ALIGNMENT:
11304+ params[0] = ctx->Pack.Alignment;
11305+ break;
11306+ case GL_PACK_LSB_FIRST:
11307+ params[0] = BOOLEAN_TO_INT(ctx->Pack.LsbFirst);
11308+ break;
11309+ case GL_PACK_ROW_LENGTH:
11310+ params[0] = ctx->Pack.RowLength;
11311+ break;
11312+ case GL_PACK_SKIP_PIXELS:
11313+ params[0] = ctx->Pack.SkipPixels;
11314+ break;
11315+ case GL_PACK_SKIP_ROWS:
11316+ params[0] = ctx->Pack.SkipRows;
11317+ break;
11318+ case GL_PACK_SWAP_BYTES:
11319+ params[0] = BOOLEAN_TO_INT(ctx->Pack.SwapBytes);
11320+ break;
11321+ case GL_PACK_SKIP_IMAGES_EXT:
11322+ params[0] = ctx->Pack.SkipImages;
11323+ break;
11324+ case GL_PACK_IMAGE_HEIGHT_EXT:
11325+ params[0] = ctx->Pack.ImageHeight;
11326+ break;
11327+ case GL_PACK_INVERT_MESA:
11328+ params[0] = BOOLEAN_TO_INT(ctx->Pack.Invert);
11329+ break;
11330+ case GL_PERSPECTIVE_CORRECTION_HINT:
11331+ params[0] = ENUM_TO_INT(ctx->Hint.PerspectiveCorrection);
11332+ break;
11333+ case GL_PIXEL_MAP_A_TO_A_SIZE:
11334+ params[0] = ctx->Pixel.MapAtoAsize;
11335+ break;
11336+ case GL_PIXEL_MAP_B_TO_B_SIZE:
11337+ params[0] = ctx->Pixel.MapBtoBsize;
11338+ break;
11339+ case GL_PIXEL_MAP_G_TO_G_SIZE:
11340+ params[0] = ctx->Pixel.MapGtoGsize;
11341+ break;
11342+ case GL_PIXEL_MAP_I_TO_A_SIZE:
11343+ params[0] = ctx->Pixel.MapItoAsize;
11344+ break;
11345+ case GL_PIXEL_MAP_I_TO_B_SIZE:
11346+ params[0] = ctx->Pixel.MapItoBsize;
11347+ break;
11348+ case GL_PIXEL_MAP_I_TO_G_SIZE:
11349+ params[0] = ctx->Pixel.MapItoGsize;
11350+ break;
11351+ case GL_PIXEL_MAP_I_TO_I_SIZE:
11352+ params[0] = ctx->Pixel.MapItoIsize;
11353+ break;
11354+ case GL_PIXEL_MAP_I_TO_R_SIZE:
11355+ params[0] = ctx->Pixel.MapItoRsize;
11356+ break;
11357+ case GL_PIXEL_MAP_R_TO_R_SIZE:
11358+ params[0] = ctx->Pixel.MapRtoRsize;
11359+ break;
11360+ case GL_PIXEL_MAP_S_TO_S_SIZE:
11361+ params[0] = ctx->Pixel.MapStoSsize;
11362+ break;
11363+ case GL_POINT_SIZE:
11364+ params[0] = IROUND(ctx->Point.Size);
11365+ break;
11366+ case GL_POINT_SIZE_GRANULARITY:
11367+ params[0] = IROUND(ctx->Const.PointSizeGranularity);
11368+ break;
11369+ case GL_POINT_SIZE_RANGE:
11370+ params[0] = IROUND(ctx->Const.MinPointSizeAA);
11371+ params[1] = IROUND(ctx->Const.MaxPointSizeAA);
11372+ break;
11373+ case GL_ALIASED_POINT_SIZE_RANGE:
11374+ params[0] = IROUND(ctx->Const.MinPointSize);
11375+ params[1] = IROUND(ctx->Const.MaxPointSize);
11376+ break;
11377+ case GL_POINT_SMOOTH:
11378+ params[0] = BOOLEAN_TO_INT(ctx->Point.SmoothFlag);
11379+ break;
11380+ case GL_POINT_SMOOTH_HINT:
11381+ params[0] = ENUM_TO_INT(ctx->Hint.PointSmooth);
11382+ break;
11383+ case GL_POINT_SIZE_MIN_EXT:
11384+ params[0] = IROUND(ctx->Point.MinSize);
11385+ break;
11386+ case GL_POINT_SIZE_MAX_EXT:
11387+ params[0] = IROUND(ctx->Point.MaxSize);
11388+ break;
11389+ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
11390+ params[0] = IROUND(ctx->Point.Threshold);
11391+ break;
11392+ case GL_DISTANCE_ATTENUATION_EXT:
11393+ params[0] = IROUND(ctx->Point.Params[0]);
11394+ params[1] = IROUND(ctx->Point.Params[1]);
11395+ params[2] = IROUND(ctx->Point.Params[2]);
11396+ break;
11397+ case GL_POLYGON_MODE:
11398+ params[0] = ENUM_TO_INT(ctx->Polygon.FrontMode);
11399+ params[1] = ENUM_TO_INT(ctx->Polygon.BackMode);
11400+ break;
11401+ case GL_POLYGON_OFFSET_BIAS_EXT:
11402+ params[0] = IROUND(ctx->Polygon.OffsetUnits);
11403+ break;
11404+ case GL_POLYGON_OFFSET_FACTOR:
11405+ params[0] = IROUND(ctx->Polygon.OffsetFactor );
11406+ break;
11407+ case GL_POLYGON_OFFSET_UNITS:
11408+ params[0] = IROUND(ctx->Polygon.OffsetUnits );
11409+ break;
11410+ case GL_POLYGON_SMOOTH:
11411+ params[0] = BOOLEAN_TO_INT(ctx->Polygon.SmoothFlag);
11412+ break;
11413+ case GL_POLYGON_SMOOTH_HINT:
11414+ params[0] = ENUM_TO_INT(ctx->Hint.PolygonSmooth);
11415+ break;
11416+ case GL_POLYGON_STIPPLE:
11417+ params[0] = BOOLEAN_TO_INT(ctx->Polygon.StippleFlag);
11418+ break;
11419+ case GL_PROJECTION_MATRIX:
11420+ {
11421+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
11422+ params[0] = IROUND(matrix[0]);
11423+ params[1] = IROUND(matrix[1]);
11424+ params[2] = IROUND(matrix[2]);
11425+ params[3] = IROUND(matrix[3]);
11426+ params[4] = IROUND(matrix[4]);
11427+ params[5] = IROUND(matrix[5]);
11428+ params[6] = IROUND(matrix[6]);
11429+ params[7] = IROUND(matrix[7]);
11430+ params[8] = IROUND(matrix[8]);
11431+ params[9] = IROUND(matrix[9]);
11432+ params[10] = IROUND(matrix[10]);
11433+ params[11] = IROUND(matrix[11]);
11434+ params[12] = IROUND(matrix[12]);
11435+ params[13] = IROUND(matrix[13]);
11436+ params[14] = IROUND(matrix[14]);
11437+ params[15] = IROUND(matrix[15]);
11438+ }
11439+ break;
11440+ case GL_PROJECTION_STACK_DEPTH:
11441+ params[0] = ctx->ProjectionMatrixStack.Depth + 1;
11442+ break;
11443+ case GL_READ_BUFFER:
11444+ params[0] = ENUM_TO_INT(ctx->ReadBuffer->ColorReadBuffer);
11445+ break;
11446+ case GL_RED_BIAS:
11447+ params[0] = IROUND(ctx->Pixel.RedBias);
11448+ break;
11449+ case GL_RED_BITS:
11450+ params[0] = ctx->DrawBuffer->Visual.redBits ;
11451+ break;
11452+ case GL_RED_SCALE:
11453+ params[0] = IROUND(ctx->Pixel.RedScale);
11454+ break;
11455+ case GL_RENDER_MODE:
11456+ params[0] = ENUM_TO_INT(ctx->RenderMode);
11457+ break;
11458+ case GL_RESCALE_NORMAL:
11459+ params[0] = BOOLEAN_TO_INT(ctx->Transform.RescaleNormals);
11460+ break;
11461+ case GL_RGBA_MODE:
11462+ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.rgbMode);
11463+ break;
11464+ case GL_SCISSOR_BOX:
11465+ params[0] = ctx->Scissor.X;
11466+ params[1] = ctx->Scissor.Y;
11467+ params[2] = ctx->Scissor.Width;
11468+ params[3] = ctx->Scissor.Height;
11469+ break;
11470+ case GL_SCISSOR_TEST:
11471+ params[0] = BOOLEAN_TO_INT(ctx->Scissor.Enabled);
11472+ break;
11473+ case GL_SELECTION_BUFFER_SIZE:
11474+ params[0] = ctx->Select.BufferSize;
11475+ break;
11476+ case GL_SHADE_MODEL:
11477+ params[0] = ENUM_TO_INT(ctx->Light.ShadeModel);
11478+ break;
11479+ case GL_SHARED_TEXTURE_PALETTE_EXT:
11480+ params[0] = BOOLEAN_TO_INT(ctx->Texture.SharedPalette);
11481+ break;
11482+ case GL_STENCIL_BITS:
11483+ params[0] = ctx->DrawBuffer->Visual.stencilBits;
11484+ break;
11485+ case GL_STENCIL_CLEAR_VALUE:
11486+ params[0] = ctx->Stencil.Clear;
11487+ break;
11488+ case GL_STENCIL_FAIL:
11489+ params[0] = ENUM_TO_INT(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
11490+ break;
11491+ case GL_STENCIL_FUNC:
11492+ params[0] = ENUM_TO_INT(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
11493+ break;
11494+ case GL_STENCIL_PASS_DEPTH_FAIL:
11495+ params[0] = ENUM_TO_INT(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
11496+ break;
11497+ case GL_STENCIL_PASS_DEPTH_PASS:
11498+ params[0] = ENUM_TO_INT(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
11499+ break;
11500+ case GL_STENCIL_REF:
11501+ params[0] = ctx->Stencil.Ref[ctx->Stencil.ActiveFace];
11502+ break;
11503+ case GL_STENCIL_TEST:
11504+ params[0] = BOOLEAN_TO_INT(ctx->Stencil.Enabled);
11505+ break;
11506+ case GL_STENCIL_VALUE_MASK:
11507+ params[0] = ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace];
11508+ break;
11509+ case GL_STENCIL_WRITEMASK:
11510+ params[0] = ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace];
11511+ break;
11512+ case GL_STEREO:
11513+ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.stereoMode);
11514+ break;
11515+ case GL_SUBPIXEL_BITS:
11516+ params[0] = ctx->Const.SubPixelBits;
11517+ break;
11518+ case GL_TEXTURE_1D:
11519+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_1D));
11520+ break;
11521+ case GL_TEXTURE_2D:
11522+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_2D));
11523+ break;
11524+ case GL_TEXTURE_3D:
11525+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_3D));
11526+ break;
11527+ case GL_TEXTURE_BINDING_1D:
11528+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name;
11529+ break;
11530+ case GL_TEXTURE_BINDING_2D:
11531+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name;
11532+ break;
11533+ case GL_TEXTURE_BINDING_3D:
11534+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name;
11535+ break;
11536+ case GL_TEXTURE_ENV_COLOR:
11537+ {
11538+ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
11539+ params[0] = FLOAT_TO_INT(color[0]);
11540+ params[1] = FLOAT_TO_INT(color[1]);
11541+ params[2] = FLOAT_TO_INT(color[2]);
11542+ params[3] = FLOAT_TO_INT(color[3]);
11543+ }
11544+ break;
11545+ case GL_TEXTURE_ENV_MODE:
11546+ params[0] = ENUM_TO_INT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
11547+ break;
11548+ case GL_TEXTURE_GEN_S:
11549+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
11550+ break;
11551+ case GL_TEXTURE_GEN_T:
11552+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0));
11553+ break;
11554+ case GL_TEXTURE_GEN_R:
11555+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0));
11556+ break;
11557+ case GL_TEXTURE_GEN_Q:
11558+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0));
11559+ break;
11560+ case GL_TEXTURE_MATRIX:
11561+ {
11562+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
11563+ params[0] = IROUND(matrix[0]);
11564+ params[1] = IROUND(matrix[1]);
11565+ params[2] = IROUND(matrix[2]);
11566+ params[3] = IROUND(matrix[3]);
11567+ params[4] = IROUND(matrix[4]);
11568+ params[5] = IROUND(matrix[5]);
11569+ params[6] = IROUND(matrix[6]);
11570+ params[7] = IROUND(matrix[7]);
11571+ params[8] = IROUND(matrix[8]);
11572+ params[9] = IROUND(matrix[9]);
11573+ params[10] = IROUND(matrix[10]);
11574+ params[11] = IROUND(matrix[11]);
11575+ params[12] = IROUND(matrix[12]);
11576+ params[13] = IROUND(matrix[13]);
11577+ params[14] = IROUND(matrix[14]);
11578+ params[15] = IROUND(matrix[15]);
11579+ }
11580+ break;
11581+ case GL_TEXTURE_STACK_DEPTH:
11582+ params[0] = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1;
11583+ break;
11584+ case GL_UNPACK_ALIGNMENT:
11585+ params[0] = ctx->Unpack.Alignment;
11586+ break;
11587+ case GL_UNPACK_LSB_FIRST:
11588+ params[0] = BOOLEAN_TO_INT(ctx->Unpack.LsbFirst);
11589+ break;
11590+ case GL_UNPACK_ROW_LENGTH:
11591+ params[0] = ctx->Unpack.RowLength;
11592+ break;
11593+ case GL_UNPACK_SKIP_PIXELS:
11594+ params[0] = ctx->Unpack.SkipPixels;
11595+ break;
11596+ case GL_UNPACK_SKIP_ROWS:
11597+ params[0] = ctx->Unpack.SkipRows;
11598+ break;
11599+ case GL_UNPACK_SWAP_BYTES:
11600+ params[0] = BOOLEAN_TO_INT(ctx->Unpack.SwapBytes);
11601+ break;
11602+ case GL_UNPACK_SKIP_IMAGES_EXT:
11603+ params[0] = ctx->Unpack.SkipImages;
11604+ break;
11605+ case GL_UNPACK_IMAGE_HEIGHT_EXT:
11606+ params[0] = ctx->Unpack.ImageHeight;
11607+ break;
11608+ case GL_UNPACK_CLIENT_STORAGE_APPLE:
11609+ params[0] = BOOLEAN_TO_INT(ctx->Unpack.ClientStorage);
11610+ break;
11611+ case GL_VIEWPORT:
11612+ params[0] = ctx->Viewport.X;
11613+ params[1] = ctx->Viewport.Y;
11614+ params[2] = ctx->Viewport.Width;
11615+ params[3] = ctx->Viewport.Height;
11616+ break;
11617+ case GL_ZOOM_X:
11618+ params[0] = IROUND(ctx->Pixel.ZoomX);
11619+ break;
11620+ case GL_ZOOM_Y:
11621+ params[0] = IROUND(ctx->Pixel.ZoomY);
11622+ break;
11623+ case GL_VERTEX_ARRAY:
11624+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Vertex.Enabled);
11625+ break;
11626+ case GL_VERTEX_ARRAY_SIZE:
11627+ params[0] = ctx->Array.ArrayObj->Vertex.Size;
11628+ break;
11629+ case GL_VERTEX_ARRAY_TYPE:
11630+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Vertex.Type);
11631+ break;
11632+ case GL_VERTEX_ARRAY_STRIDE:
11633+ params[0] = ctx->Array.ArrayObj->Vertex.Stride;
11634+ break;
11635+ case GL_VERTEX_ARRAY_COUNT_EXT:
11636+ params[0] = 0;
11637+ break;
11638+ case GL_NORMAL_ARRAY:
11639+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Normal.Enabled);
11640+ break;
11641+ case GL_NORMAL_ARRAY_TYPE:
11642+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Normal.Type);
11643+ break;
11644+ case GL_NORMAL_ARRAY_STRIDE:
11645+ params[0] = ctx->Array.ArrayObj->Normal.Stride;
11646+ break;
11647+ case GL_NORMAL_ARRAY_COUNT_EXT:
11648+ params[0] = 0;
11649+ break;
11650+ case GL_COLOR_ARRAY:
11651+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Color.Enabled);
11652+ break;
11653+ case GL_COLOR_ARRAY_SIZE:
11654+ params[0] = ctx->Array.ArrayObj->Color.Size;
11655+ break;
11656+ case GL_COLOR_ARRAY_TYPE:
11657+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Color.Type);
11658+ break;
11659+ case GL_COLOR_ARRAY_STRIDE:
11660+ params[0] = ctx->Array.ArrayObj->Color.Stride;
11661+ break;
11662+ case GL_COLOR_ARRAY_COUNT_EXT:
11663+ params[0] = 0;
11664+ break;
11665+ case GL_INDEX_ARRAY:
11666+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Index.Enabled);
11667+ break;
11668+ case GL_INDEX_ARRAY_TYPE:
11669+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Index.Type);
11670+ break;
11671+ case GL_INDEX_ARRAY_STRIDE:
11672+ params[0] = ctx->Array.ArrayObj->Index.Stride;
11673+ break;
11674+ case GL_INDEX_ARRAY_COUNT_EXT:
11675+ params[0] = 0;
11676+ break;
11677+ case GL_TEXTURE_COORD_ARRAY:
11678+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
11679+ break;
11680+ case GL_TEXTURE_COORD_ARRAY_SIZE:
11681+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size;
11682+ break;
11683+ case GL_TEXTURE_COORD_ARRAY_TYPE:
11684+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
11685+ break;
11686+ case GL_TEXTURE_COORD_ARRAY_STRIDE:
11687+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride;
11688+ break;
11689+ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
11690+ params[0] = 0;
11691+ break;
11692+ case GL_EDGE_FLAG_ARRAY:
11693+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->EdgeFlag.Enabled);
11694+ break;
11695+ case GL_EDGE_FLAG_ARRAY_STRIDE:
11696+ params[0] = ctx->Array.ArrayObj->EdgeFlag.Stride;
11697+ break;
11698+ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
11699+ params[0] = 0;
11700+ break;
11701+ case GL_MAX_TEXTURE_UNITS_ARB:
11702+ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
11703+ params[0] = ctx->Const.MaxTextureUnits;
11704+ break;
11705+ case GL_ACTIVE_TEXTURE_ARB:
11706+ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
11707+ params[0] = GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit;
11708+ break;
11709+ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
11710+ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
11711+ params[0] = GL_TEXTURE0_ARB + ctx->Array.ActiveTexture;
11712+ break;
11713+ case GL_TEXTURE_CUBE_MAP_ARB:
11714+ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
11715+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB));
11716+ break;
11717+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
11718+ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
11719+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name;
11720+ break;
11721+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
11722+ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
11723+ params[0] = (1 << (ctx->Const.MaxCubeTextureLevels - 1));
11724+ break;
11725+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
11726+ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
11727+ params[0] = ctx->Hint.TextureCompression;
11728+ break;
11729+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
11730+ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
11731+ params[0] = _mesa_get_compressed_formats(ctx, NULL, GL_FALSE);
11732+ break;
11733+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
11734+ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
11735+ {
11736+ GLint formats[100];
11737+ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
11738+ ASSERT(n <= 100);
11739+ for (i = 0; i < n; i++)
11740+ params[i] = ENUM_TO_INT(formats[i]);
11741+ }
11742+ break;
11743+ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
11744+ CHECK_EXT1(EXT_compiled_vertex_array, "GetIntegerv");
11745+ params[0] = ctx->Array.LockFirst;
11746+ break;
11747+ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
11748+ CHECK_EXT1(EXT_compiled_vertex_array, "GetIntegerv");
11749+ params[0] = ctx->Array.LockCount;
11750+ break;
11751+ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
11752+ {
11753+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
11754+ params[0] = IROUND(matrix[0]);
11755+ params[1] = IROUND(matrix[4]);
11756+ params[2] = IROUND(matrix[8]);
11757+ params[3] = IROUND(matrix[12]);
11758+ params[4] = IROUND(matrix[1]);
11759+ params[5] = IROUND(matrix[5]);
11760+ params[6] = IROUND(matrix[9]);
11761+ params[7] = IROUND(matrix[13]);
11762+ params[8] = IROUND(matrix[2]);
11763+ params[9] = IROUND(matrix[6]);
11764+ params[10] = IROUND(matrix[10]);
11765+ params[11] = IROUND(matrix[14]);
11766+ params[12] = IROUND(matrix[3]);
11767+ params[13] = IROUND(matrix[7]);
11768+ params[14] = IROUND(matrix[11]);
11769+ params[15] = IROUND(matrix[15]);
11770+ }
11771+ break;
11772+ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
11773+ {
11774+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
11775+ params[0] = IROUND(matrix[0]);
11776+ params[1] = IROUND(matrix[4]);
11777+ params[2] = IROUND(matrix[8]);
11778+ params[3] = IROUND(matrix[12]);
11779+ params[4] = IROUND(matrix[1]);
11780+ params[5] = IROUND(matrix[5]);
11781+ params[6] = IROUND(matrix[9]);
11782+ params[7] = IROUND(matrix[13]);
11783+ params[8] = IROUND(matrix[2]);
11784+ params[9] = IROUND(matrix[6]);
11785+ params[10] = IROUND(matrix[10]);
11786+ params[11] = IROUND(matrix[14]);
11787+ params[12] = IROUND(matrix[3]);
11788+ params[13] = IROUND(matrix[7]);
11789+ params[14] = IROUND(matrix[11]);
11790+ params[15] = IROUND(matrix[15]);
11791+ }
11792+ break;
11793+ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
11794+ {
11795+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
11796+ params[0] = IROUND(matrix[0]);
11797+ params[1] = IROUND(matrix[4]);
11798+ params[2] = IROUND(matrix[8]);
11799+ params[3] = IROUND(matrix[12]);
11800+ params[4] = IROUND(matrix[1]);
11801+ params[5] = IROUND(matrix[5]);
11802+ params[6] = IROUND(matrix[9]);
11803+ params[7] = IROUND(matrix[13]);
11804+ params[8] = IROUND(matrix[2]);
11805+ params[9] = IROUND(matrix[6]);
11806+ params[10] = IROUND(matrix[10]);
11807+ params[11] = IROUND(matrix[14]);
11808+ params[12] = IROUND(matrix[3]);
11809+ params[13] = IROUND(matrix[7]);
11810+ params[14] = IROUND(matrix[11]);
11811+ params[15] = IROUND(matrix[15]);
11812+ }
11813+ break;
11814+ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
11815+ {
11816+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
11817+ params[0] = IROUND(matrix[0]);
11818+ params[1] = IROUND(matrix[4]);
11819+ params[2] = IROUND(matrix[8]);
11820+ params[3] = IROUND(matrix[12]);
11821+ params[4] = IROUND(matrix[1]);
11822+ params[5] = IROUND(matrix[5]);
11823+ params[6] = IROUND(matrix[9]);
11824+ params[7] = IROUND(matrix[13]);
11825+ params[8] = IROUND(matrix[2]);
11826+ params[9] = IROUND(matrix[6]);
11827+ params[10] = IROUND(matrix[10]);
11828+ params[11] = IROUND(matrix[14]);
11829+ params[12] = IROUND(matrix[3]);
11830+ params[13] = IROUND(matrix[7]);
11831+ params[14] = IROUND(matrix[11]);
11832+ params[15] = IROUND(matrix[15]);
11833+ }
11834+ break;
11835+ case GL_COLOR_MATRIX_SGI:
11836+ {
11837+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
11838+ params[0] = IROUND(matrix[0]);
11839+ params[1] = IROUND(matrix[1]);
11840+ params[2] = IROUND(matrix[2]);
11841+ params[3] = IROUND(matrix[3]);
11842+ params[4] = IROUND(matrix[4]);
11843+ params[5] = IROUND(matrix[5]);
11844+ params[6] = IROUND(matrix[6]);
11845+ params[7] = IROUND(matrix[7]);
11846+ params[8] = IROUND(matrix[8]);
11847+ params[9] = IROUND(matrix[9]);
11848+ params[10] = IROUND(matrix[10]);
11849+ params[11] = IROUND(matrix[11]);
11850+ params[12] = IROUND(matrix[12]);
11851+ params[13] = IROUND(matrix[13]);
11852+ params[14] = IROUND(matrix[14]);
11853+ params[15] = IROUND(matrix[15]);
11854+ }
11855+ break;
11856+ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
11857+ params[0] = ctx->ColorMatrixStack.Depth + 1;
11858+ break;
11859+ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
11860+ params[0] = MAX_COLOR_STACK_DEPTH;
11861+ break;
11862+ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
11863+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[0]);
11864+ break;
11865+ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
11866+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[1]);
11867+ break;
11868+ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
11869+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[2]);
11870+ break;
11871+ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
11872+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[3]);
11873+ break;
11874+ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
11875+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[0]);
11876+ break;
11877+ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
11878+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[1]);
11879+ break;
11880+ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
11881+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[2]);
11882+ break;
11883+ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
11884+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[3]);
11885+ break;
11886+ case GL_CONVOLUTION_1D_EXT:
11887+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11888+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Convolution1DEnabled);
11889+ break;
11890+ case GL_CONVOLUTION_2D_EXT:
11891+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11892+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Convolution2DEnabled);
11893+ break;
11894+ case GL_SEPARABLE_2D_EXT:
11895+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11896+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Separable2DEnabled);
11897+ break;
11898+ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
11899+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11900+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[0]);
11901+ break;
11902+ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
11903+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11904+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[1]);
11905+ break;
11906+ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
11907+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11908+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[2]);
11909+ break;
11910+ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
11911+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11912+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[3]);
11913+ break;
11914+ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
11915+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11916+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[0]);
11917+ break;
11918+ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
11919+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11920+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[1]);
11921+ break;
11922+ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
11923+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11924+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[2]);
11925+ break;
11926+ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
11927+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11928+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[3]);
11929+ break;
11930+ case GL_HISTOGRAM:
11931+ CHECK_EXT1(EXT_histogram, "GetIntegerv");
11932+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.HistogramEnabled);
11933+ break;
11934+ case GL_MINMAX:
11935+ CHECK_EXT1(EXT_histogram, "GetIntegerv");
11936+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MinMaxEnabled);
11937+ break;
11938+ case GL_COLOR_TABLE_SGI:
11939+ CHECK_EXT1(SGI_color_table, "GetIntegerv");
11940+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.ColorTableEnabled);
11941+ break;
11942+ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
11943+ CHECK_EXT1(SGI_color_table, "GetIntegerv");
11944+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.PostConvolutionColorTableEnabled);
11945+ break;
11946+ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
11947+ CHECK_EXT1(SGI_color_table, "GetIntegerv");
11948+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.PostColorMatrixColorTableEnabled);
11949+ break;
11950+ case GL_TEXTURE_COLOR_TABLE_SGI:
11951+ CHECK_EXT1(SGI_texture_color_table, "GetIntegerv");
11952+ params[0] = BOOLEAN_TO_INT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled);
11953+ break;
11954+ case GL_COLOR_SUM_EXT:
11955+ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetIntegerv");
11956+ params[0] = BOOLEAN_TO_INT(ctx->Fog.ColorSumEnabled);
11957+ break;
11958+ case GL_CURRENT_SECONDARY_COLOR_EXT:
11959+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
11960+ {
11961+ FLUSH_CURRENT(ctx, 0);
11962+ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]);
11963+ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]);
11964+ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]);
11965+ params[3] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]);
11966+ }
11967+ break;
11968+ case GL_SECONDARY_COLOR_ARRAY_EXT:
11969+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
11970+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->SecondaryColor.Enabled);
11971+ break;
11972+ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
11973+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
11974+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->SecondaryColor.Type);
11975+ break;
11976+ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
11977+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
11978+ params[0] = ctx->Array.ArrayObj->SecondaryColor.Stride;
11979+ break;
11980+ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
11981+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
11982+ params[0] = ctx->Array.ArrayObj->SecondaryColor.Size;
11983+ break;
11984+ case GL_CURRENT_FOG_COORDINATE_EXT:
11985+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
11986+ {
11987+ FLUSH_CURRENT(ctx, 0);
11988+ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_FOG][0]);
11989+ }
11990+ break;
11991+ case GL_FOG_COORDINATE_ARRAY_EXT:
11992+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
11993+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->FogCoord.Enabled);
11994+ break;
11995+ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
11996+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
11997+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->FogCoord.Type);
11998+ break;
11999+ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
12000+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
12001+ params[0] = ctx->Array.ArrayObj->FogCoord.Stride;
12002+ break;
12003+ case GL_FOG_COORDINATE_SOURCE_EXT:
12004+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
12005+ params[0] = ENUM_TO_INT(ctx->Fog.FogCoordinateSource);
12006+ break;
12007+ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
12008+ CHECK_EXT1(EXT_texture_lod_bias, "GetIntegerv");
12009+ params[0] = IROUND(ctx->Const.MaxTextureLodBias);
12010+ break;
12011+ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
12012+ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetIntegerv");
12013+ params[0] = IROUND(ctx->Const.MaxTextureMaxAnisotropy);
12014+ break;
12015+ case GL_MULTISAMPLE_ARB:
12016+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12017+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.Enabled);
12018+ break;
12019+ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
12020+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12021+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleAlphaToCoverage);
12022+ break;
12023+ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
12024+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12025+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleAlphaToOne);
12026+ break;
12027+ case GL_SAMPLE_COVERAGE_ARB:
12028+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12029+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleCoverage);
12030+ break;
12031+ case GL_SAMPLE_COVERAGE_VALUE_ARB:
12032+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12033+ params[0] = IROUND(ctx->Multisample.SampleCoverageValue);
12034+ break;
12035+ case GL_SAMPLE_COVERAGE_INVERT_ARB:
12036+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12037+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleCoverageInvert);
12038+ break;
12039+ case GL_SAMPLE_BUFFERS_ARB:
12040+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12041+ params[0] = ctx->DrawBuffer->Visual.sampleBuffers;
12042+ break;
12043+ case GL_SAMPLES_ARB:
12044+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12045+ params[0] = ctx->DrawBuffer->Visual.samples;
12046+ break;
12047+ case GL_RASTER_POSITION_UNCLIPPED_IBM:
12048+ CHECK_EXT1(IBM_rasterpos_clip, "GetIntegerv");
12049+ params[0] = BOOLEAN_TO_INT(ctx->Transform.RasterPositionUnclipped);
12050+ break;
12051+ case GL_POINT_SPRITE_NV:
12052+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetIntegerv");
12053+ params[0] = BOOLEAN_TO_INT(ctx->Point.PointSprite);
12054+ break;
12055+ case GL_POINT_SPRITE_R_MODE_NV:
12056+ CHECK_EXT1(NV_point_sprite, "GetIntegerv");
12057+ params[0] = ENUM_TO_INT(ctx->Point.SpriteRMode);
12058+ break;
12059+ case GL_POINT_SPRITE_COORD_ORIGIN:
12060+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetIntegerv");
12061+ params[0] = ENUM_TO_INT(ctx->Point.SpriteOrigin);
12062+ break;
12063+ case GL_GENERATE_MIPMAP_HINT_SGIS:
12064+ CHECK_EXT1(SGIS_generate_mipmap, "GetIntegerv");
12065+ params[0] = ENUM_TO_INT(ctx->Hint.GenerateMipmap);
12066+ break;
12067+ case GL_VERTEX_PROGRAM_BINDING_NV:
12068+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12069+ params[0] = (ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0);
12070+ break;
12071+ case GL_VERTEX_ATTRIB_ARRAY0_NV:
12072+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12073+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[0].Enabled);
12074+ break;
12075+ case GL_VERTEX_ATTRIB_ARRAY1_NV:
12076+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12077+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[1].Enabled);
12078+ break;
12079+ case GL_VERTEX_ATTRIB_ARRAY2_NV:
12080+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12081+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[2].Enabled);
12082+ break;
12083+ case GL_VERTEX_ATTRIB_ARRAY3_NV:
12084+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12085+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[3].Enabled);
12086+ break;
12087+ case GL_VERTEX_ATTRIB_ARRAY4_NV:
12088+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12089+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[4].Enabled);
12090+ break;
12091+ case GL_VERTEX_ATTRIB_ARRAY5_NV:
12092+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12093+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[5].Enabled);
12094+ break;
12095+ case GL_VERTEX_ATTRIB_ARRAY6_NV:
12096+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12097+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[6].Enabled);
12098+ break;
12099+ case GL_VERTEX_ATTRIB_ARRAY7_NV:
12100+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12101+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[7].Enabled);
12102+ break;
12103+ case GL_VERTEX_ATTRIB_ARRAY8_NV:
12104+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12105+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[8].Enabled);
12106+ break;
12107+ case GL_VERTEX_ATTRIB_ARRAY9_NV:
12108+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12109+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[9].Enabled);
12110+ break;
12111+ case GL_VERTEX_ATTRIB_ARRAY10_NV:
12112+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12113+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[10].Enabled);
12114+ break;
12115+ case GL_VERTEX_ATTRIB_ARRAY11_NV:
12116+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12117+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[11].Enabled);
12118+ break;
12119+ case GL_VERTEX_ATTRIB_ARRAY12_NV:
12120+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12121+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[12].Enabled);
12122+ break;
12123+ case GL_VERTEX_ATTRIB_ARRAY13_NV:
12124+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12125+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[13].Enabled);
12126+ break;
12127+ case GL_VERTEX_ATTRIB_ARRAY14_NV:
12128+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12129+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[14].Enabled);
12130+ break;
12131+ case GL_VERTEX_ATTRIB_ARRAY15_NV:
12132+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12133+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[15].Enabled);
12134+ break;
12135+ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
12136+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12137+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[0]);
12138+ break;
12139+ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
12140+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12141+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[1]);
12142+ break;
12143+ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
12144+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12145+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[2]);
12146+ break;
12147+ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
12148+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12149+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[3]);
12150+ break;
12151+ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
12152+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12153+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[4]);
12154+ break;
12155+ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
12156+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12157+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[5]);
12158+ break;
12159+ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
12160+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12161+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[6]);
12162+ break;
12163+ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
12164+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12165+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[7]);
12166+ break;
12167+ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
12168+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12169+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[8]);
12170+ break;
12171+ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
12172+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12173+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[9]);
12174+ break;
12175+ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
12176+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12177+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[10]);
12178+ break;
12179+ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
12180+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12181+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[11]);
12182+ break;
12183+ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
12184+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12185+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[12]);
12186+ break;
12187+ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
12188+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12189+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[13]);
12190+ break;
12191+ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
12192+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12193+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[14]);
12194+ break;
12195+ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
12196+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12197+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[15]);
12198+ break;
12199+ case GL_FRAGMENT_PROGRAM_NV:
12200+ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
12201+ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.Enabled);
12202+ break;
12203+ case GL_FRAGMENT_PROGRAM_BINDING_NV:
12204+ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
12205+ params[0] = ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0;
12206+ break;
12207+ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
12208+ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
12209+ params[0] = MAX_NV_FRAGMENT_PROGRAM_PARAMS;
12210+ break;
12211+ case GL_TEXTURE_RECTANGLE_NV:
12212+ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
12213+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV));
12214+ break;
12215+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
12216+ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
12217+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name;
12218+ break;
12219+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
12220+ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
12221+ params[0] = ctx->Const.MaxTextureRectSize;
12222+ break;
12223+ case GL_STENCIL_TEST_TWO_SIDE_EXT:
12224+ CHECK_EXT1(EXT_stencil_two_side, "GetIntegerv");
12225+ params[0] = BOOLEAN_TO_INT(ctx->Stencil.TestTwoSide);
12226+ break;
12227+ case GL_ACTIVE_STENCIL_FACE_EXT:
12228+ CHECK_EXT1(EXT_stencil_two_side, "GetIntegerv");
12229+ params[0] = ENUM_TO_INT(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
12230+ break;
12231+ case GL_MAX_SHININESS_NV:
12232+ CHECK_EXT1(NV_light_max_exponent, "GetIntegerv");
12233+ params[0] = IROUND(ctx->Const.MaxShininess);
12234+ break;
12235+ case GL_MAX_SPOT_EXPONENT_NV:
12236+ CHECK_EXT1(NV_light_max_exponent, "GetIntegerv");
12237+ params[0] = IROUND(ctx->Const.MaxSpotExponent);
12238+ break;
12239+ case GL_ARRAY_BUFFER_BINDING_ARB:
12240+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12241+ params[0] = ctx->Array.ArrayBufferObj->Name;
12242+ break;
12243+ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
12244+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12245+ params[0] = ctx->Array.ArrayObj->Vertex.BufferObj->Name;
12246+ break;
12247+ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
12248+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12249+ params[0] = ctx->Array.ArrayObj->Normal.BufferObj->Name;
12250+ break;
12251+ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
12252+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12253+ params[0] = ctx->Array.ArrayObj->Color.BufferObj->Name;
12254+ break;
12255+ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
12256+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12257+ params[0] = ctx->Array.ArrayObj->Index.BufferObj->Name;
12258+ break;
12259+ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
12260+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12261+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name;
12262+ break;
12263+ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
12264+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12265+ params[0] = ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name;
12266+ break;
12267+ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
12268+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12269+ params[0] = ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name;
12270+ break;
12271+ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
12272+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12273+ params[0] = ctx->Array.ArrayObj->FogCoord.BufferObj->Name;
12274+ break;
12275+ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
12276+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12277+ params[0] = ctx->Array.ElementArrayBufferObj->Name;
12278+ break;
12279+ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
12280+ CHECK_EXT1(EXT_pixel_buffer_object, "GetIntegerv");
12281+ params[0] = ctx->Pack.BufferObj->Name;
12282+ break;
12283+ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
12284+ CHECK_EXT1(EXT_pixel_buffer_object, "GetIntegerv");
12285+ params[0] = ctx->Unpack.BufferObj->Name;
12286+ break;
12287+ case GL_VERTEX_PROGRAM_ARB:
12288+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
12289+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.Enabled);
12290+ break;
12291+ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
12292+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
12293+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.PointSizeEnabled);
12294+ break;
12295+ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
12296+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
12297+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.TwoSideEnabled);
12298+ break;
12299+ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
12300+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
12301+ params[0] = ctx->Const.MaxProgramMatrixStackDepth;
12302+ break;
12303+ case GL_MAX_PROGRAM_MATRICES_ARB:
12304+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
12305+ params[0] = ctx->Const.MaxProgramMatrices;
12306+ break;
12307+ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
12308+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
12309+ params[0] = BOOLEAN_TO_INT(ctx->CurrentStack->Depth + 1);
12310+ break;
12311+ case GL_CURRENT_MATRIX_ARB:
12312+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetIntegerv");
12313+ {
12314+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
12315+ params[0] = IROUND(matrix[0]);
12316+ params[1] = IROUND(matrix[1]);
12317+ params[2] = IROUND(matrix[2]);
12318+ params[3] = IROUND(matrix[3]);
12319+ params[4] = IROUND(matrix[4]);
12320+ params[5] = IROUND(matrix[5]);
12321+ params[6] = IROUND(matrix[6]);
12322+ params[7] = IROUND(matrix[7]);
12323+ params[8] = IROUND(matrix[8]);
12324+ params[9] = IROUND(matrix[9]);
12325+ params[10] = IROUND(matrix[10]);
12326+ params[11] = IROUND(matrix[11]);
12327+ params[12] = IROUND(matrix[12]);
12328+ params[13] = IROUND(matrix[13]);
12329+ params[14] = IROUND(matrix[14]);
12330+ params[15] = IROUND(matrix[15]);
12331+ }
12332+ break;
12333+ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
12334+ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetIntegerv");
12335+ {
12336+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
12337+ params[0] = IROUND(matrix[0]);
12338+ params[1] = IROUND(matrix[4]);
12339+ params[2] = IROUND(matrix[8]);
12340+ params[3] = IROUND(matrix[12]);
12341+ params[4] = IROUND(matrix[1]);
12342+ params[5] = IROUND(matrix[5]);
12343+ params[6] = IROUND(matrix[9]);
12344+ params[7] = IROUND(matrix[13]);
12345+ params[8] = IROUND(matrix[2]);
12346+ params[9] = IROUND(matrix[6]);
12347+ params[10] = IROUND(matrix[10]);
12348+ params[11] = IROUND(matrix[14]);
12349+ params[12] = IROUND(matrix[3]);
12350+ params[13] = IROUND(matrix[7]);
12351+ params[14] = IROUND(matrix[11]);
12352+ params[15] = IROUND(matrix[15]);
12353+ }
12354+ break;
12355+ case GL_MAX_VERTEX_ATTRIBS_ARB:
12356+ CHECK_EXT1(ARB_vertex_program, "GetIntegerv");
12357+ params[0] = ctx->Const.VertexProgram.MaxAttribs;
12358+ break;
12359+ case GL_PROGRAM_ERROR_POSITION_ARB:
12360+ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetIntegerv");
12361+ params[0] = ctx->Program.ErrorPos;
12362+ break;
12363+ case GL_FRAGMENT_PROGRAM_ARB:
12364+ CHECK_EXT1(ARB_fragment_program, "GetIntegerv");
12365+ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.Enabled);
12366+ break;
12367+ case GL_MAX_TEXTURE_COORDS_ARB:
12368+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetIntegerv");
12369+ params[0] = ctx->Const.MaxTextureCoordUnits;
12370+ break;
12371+ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
12372+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetIntegerv");
12373+ params[0] = ctx->Const.MaxTextureImageUnits;
12374+ break;
12375+ case GL_DEPTH_BOUNDS_TEST_EXT:
12376+ CHECK_EXT1(EXT_depth_bounds_test, "GetIntegerv");
12377+ params[0] = BOOLEAN_TO_INT(ctx->Depth.BoundsTest);
12378+ break;
12379+ case GL_DEPTH_BOUNDS_EXT:
12380+ CHECK_EXT1(EXT_depth_bounds_test, "GetIntegerv");
12381+ params[0] = IROUND(ctx->Depth.BoundsMin);
12382+ params[1] = IROUND(ctx->Depth.BoundsMax);
12383+ break;
12384+ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
12385+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12386+ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.CallbackEnabled);
12387+ break;
12388+ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
12389+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12390+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.CallbackEnabled);
12391+ break;
12392+ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
12393+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12394+ params[0] = ctx->FragmentProgram.CurrentPosition;
12395+ break;
12396+ case GL_VERTEX_PROGRAM_POSITION_MESA:
12397+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12398+ params[0] = ctx->VertexProgram.CurrentPosition;
12399+ break;
12400+ case GL_MAX_DRAW_BUFFERS_ARB:
12401+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12402+ params[0] = ctx->Const.MaxDrawBuffers;
12403+ break;
12404+ case GL_DRAW_BUFFER0_ARB:
12405+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12406+ params[0] = ENUM_TO_INT(ctx->DrawBuffer->ColorDrawBuffer[0]);
12407+ break;
12408+ case GL_DRAW_BUFFER1_ARB:
12409+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12410+ {
12411+ GLenum buffer;
12412+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
12413+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
12414+ return;
12415+ }
12416+ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
12417+ params[0] = ENUM_TO_INT(buffer);
12418+ }
12419+ break;
12420+ case GL_DRAW_BUFFER2_ARB:
12421+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12422+ {
12423+ GLenum buffer;
12424+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
12425+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
12426+ return;
12427+ }
12428+ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
12429+ params[0] = ENUM_TO_INT(buffer);
12430+ }
12431+ break;
12432+ case GL_DRAW_BUFFER3_ARB:
12433+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12434+ {
12435+ GLenum buffer;
12436+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
12437+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
12438+ return;
12439+ }
12440+ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
12441+ params[0] = ENUM_TO_INT(buffer);
12442+ }
12443+ break;
12444+ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
12445+ CHECK_EXT1(OES_read_format, "GetIntegerv");
12446+ params[0] = ctx->Const.ColorReadType;
12447+ break;
12448+ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
12449+ CHECK_EXT1(OES_read_format, "GetIntegerv");
12450+ params[0] = ctx->Const.ColorReadFormat;
12451+ break;
12452+ case GL_NUM_FRAGMENT_REGISTERS_ATI:
12453+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12454+ params[0] = 6;
12455+ break;
12456+ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
12457+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12458+ params[0] = 8;
12459+ break;
12460+ case GL_NUM_PASSES_ATI:
12461+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12462+ params[0] = 2;
12463+ break;
12464+ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
12465+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12466+ params[0] = 8;
12467+ break;
12468+ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
12469+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12470+ params[0] = 16;
12471+ break;
12472+ case GL_COLOR_ALPHA_PAIRING_ATI:
12473+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12474+ params[0] = BOOLEAN_TO_INT(GL_TRUE);
12475+ break;
12476+ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
12477+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12478+ params[0] = 3;
12479+ break;
12480+ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
12481+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12482+ params[0] = 3;
12483+ break;
12484+ case GL_STENCIL_BACK_FUNC:
12485+ params[0] = ENUM_TO_INT(ctx->Stencil.Function[1]);
12486+ break;
12487+ case GL_STENCIL_BACK_VALUE_MASK:
12488+ params[0] = ctx->Stencil.ValueMask[1];
12489+ break;
12490+ case GL_STENCIL_BACK_REF:
12491+ params[0] = ctx->Stencil.Ref[1];
12492+ break;
12493+ case GL_STENCIL_BACK_FAIL:
12494+ params[0] = ENUM_TO_INT(ctx->Stencil.FailFunc[1]);
12495+ break;
12496+ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
12497+ params[0] = ENUM_TO_INT(ctx->Stencil.ZFailFunc[1]);
12498+ break;
12499+ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
12500+ params[0] = ENUM_TO_INT(ctx->Stencil.ZPassFunc[1]);
12501+ break;
12502+ case GL_FRAMEBUFFER_BINDING_EXT:
12503+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12504+ params[0] = ctx->DrawBuffer->Name;
12505+ break;
12506+ case GL_RENDERBUFFER_BINDING_EXT:
12507+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12508+ params[0] = ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0;
12509+ break;
12510+ case GL_MAX_COLOR_ATTACHMENTS_EXT:
12511+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12512+ params[0] = ctx->Const.MaxColorAttachments;
12513+ break;
12514+ case GL_MAX_RENDERBUFFER_SIZE_EXT:
12515+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12516+ params[0] = ctx->Const.MaxRenderbufferSize;
12517+ break;
12518+ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
12519+ CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
12520+ params[0] = MAX_FRAGMENT_UNIFORM_COMPONENTS;
12521+ break;
12522+ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
12523+ CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
12524+ params[0] = ENUM_TO_INT(ctx->Hint.FragmentShaderDerivative);
12525+ break;
12526+ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
12527+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12528+ params[0] = MAX_VERTEX_UNIFORM_COMPONENTS;
12529+ break;
12530+ case GL_MAX_VARYING_FLOATS_ARB:
12531+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12532+ params[0] = MAX_VARYING_FLOATS;
12533+ break;
12534+ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
12535+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12536+ params[0] = MAX_VERTEX_TEXTURE_IMAGE_UNITS;
12537+ break;
12538+ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
12539+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12540+ params[0] = MAX_COMBINED_TEXTURE_IMAGE_UNITS;
12541+ break;
12542+ default:
12543+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv(pname=0x%x)", pname);
12544+ }
12545+}
12546+
12547+
12548+void GLAPIENTRY
12549+_mesa_GetDoublev( GLenum pname, GLdouble *params )
12550+{
12551+ const GLfloat magic = -1234.5F;
12552+ GLfloat values[16];
12553+ GLuint i;
12554+
12555+ if (!params)
12556+ return;
12557+
12558+ /* Init temp array to magic numbers so we can figure out how many values
12559+ * are returned by the GetFloatv() call.
12560+ */
12561+ for (i = 0; i < 16; i++)
12562+ values[i] = magic;
12563+
12564+ _mesa_GetFloatv(pname, values);
12565+
12566+ for (i = 0; i < 16 && values[i] != magic; i++)
12567+ params[i] = (GLdouble) values[i];
12568+}
12569+
12570Index: qemu-0.13.0/target-i386/mesa_gl.h
12571===================================================================
12572--- /dev/null 1970-01-01 00:00:00.000000000 +0000
12573+++ qemu-0.13.0/target-i386/mesa_gl.h 2011-01-17 16:42:36.000000000 +0800
12574@@ -0,0 +1,2251 @@
12575+/*
12576+ * Mesa 3-D graphics library
12577+ * Version: 6.5.1
12578+ *
12579+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
12580+ *
12581+ * Permission is hereby granted, free of charge, to any person obtaining a
12582+ * copy of this software and associated documentation files (the "Software"),
12583+ * to deal in the Software without restriction, including without limitation
12584+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12585+ * and/or sell copies of the Software, and to permit persons to whom the
12586+ * Software is furnished to do so, subject to the following conditions:
12587+ *
12588+ * The above copyright notice and this permission notice shall be included
12589+ * in all copies or substantial portions of the Software.
12590+ *
12591+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
12592+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12593+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
12594+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
12595+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
12596+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12597+ */
12598+
12599+
12600+#ifndef __gl_h_
12601+#define __gl_h_
12602+
12603+#if defined(USE_MGL_NAMESPACE)
12604+#include "gl_mangle.h"
12605+#endif
12606+
12607+
12608+/**********************************************************************
12609+ * Begin system-specific stuff. Do not do any of this when building
12610+ * for SciTech SNAP, as this is all done before this header file is
12611+ * included.
12612+ */
12613+#if !defined(__SCITECH_SNAP__)
12614+
12615+#if defined(__BEOS__)
12616+#include <stdlib.h> /* to get some BeOS-isms */
12617+#endif
12618+
12619+#if !defined(OPENSTEP) && (defined(NeXT) || defined(NeXT_PDO))
12620+#define OPENSTEP
12621+#endif
12622+
12623+#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__)
12624+#define __WIN32__
12625+#endif
12626+
12627+#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__))
12628+# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
12629+# define GLAPI __declspec(dllexport)
12630+# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
12631+# define GLAPI __declspec(dllimport)
12632+# else /* for use with static link lib build of Win32 edition only */
12633+# define GLAPI extern
12634+# endif /* _STATIC_MESA support */
12635+# define GLAPIENTRY __stdcall
12636+#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
12637+# define GLAPI extern
12638+# define GLAPIENTRY __stdcall
12639+#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
12640+# define GLAPI __attribute__((visibility("default")))
12641+# define GLAPIENTRY
12642+#endif /* WIN32 && !CYGWIN */
12643+
12644+#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__)
12645+# define PRAGMA_EXPORT_SUPPORTED 1
12646+#endif
12647+
12648+/*
12649+ * WINDOWS: Include windows.h here to define APIENTRY.
12650+ * It is also useful when applications include this file by
12651+ * including only glut.h, since glut.h depends on windows.h.
12652+ * Applications needing to include windows.h with parms other
12653+ * than "WIN32_LEAN_AND_MEAN" may include windows.h before
12654+ * glut.h or gl.h.
12655+ */
12656+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
12657+#define WIN32_LEAN_AND_MEAN 1
12658+#include <windows.h>
12659+#endif
12660+
12661+#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP) && !defined(__CYGWIN__)
12662+#include <GL/mesa_wgl.h>
12663+#endif
12664+
12665+#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
12666+#pragma import on
12667+#endif
12668+
12669+#ifndef GLAPI
12670+#define GLAPI extern
12671+#endif
12672+
12673+#ifndef GLAPIENTRY
12674+#define GLAPIENTRY
12675+#endif
12676+
12677+#ifndef APIENTRY
12678+#define APIENTRY GLAPIENTRY
12679+#endif
12680+
12681+/* "P" suffix to be used for a pointer to a function */
12682+#ifndef APIENTRYP
12683+#define APIENTRYP APIENTRY *
12684+#endif
12685+
12686+#ifndef GLAPIENTRYP
12687+#define GLAPIENTRYP GLAPIENTRY *
12688+#endif
12689+
12690+#ifdef CENTERLINE_CLPP
12691+#define signed
12692+#endif
12693+
12694+#if defined(PRAGMA_EXPORT_SUPPORTED)
12695+#pragma export on
12696+#endif
12697+
12698+#endif /* !__SCITECH_SNAP__ */
12699+/*
12700+ * End system-specific stuff.
12701+ **********************************************************************/
12702+
12703+
12704+
12705+#ifdef __cplusplus
12706+extern "C" {
12707+#endif
12708+
12709+
12710+
12711+#define GL_VERSION_1_1 1
12712+#define GL_VERSION_1_2 1
12713+#define GL_VERSION_1_3 1
12714+#define GL_ARB_imaging 1
12715+
12716+
12717+/*
12718+ * Datatypes
12719+ */
12720+typedef unsigned int GLenum;
12721+typedef unsigned char GLboolean;
12722+typedef unsigned int GLbitfield;
12723+typedef void GLvoid;
12724+typedef signed char GLbyte; /* 1-byte signed */
12725+typedef short GLshort; /* 2-byte signed */
12726+typedef int GLint; /* 4-byte signed */
12727+typedef unsigned char GLubyte; /* 1-byte unsigned */
12728+typedef unsigned short GLushort; /* 2-byte unsigned */
12729+typedef unsigned int GLuint; /* 4-byte unsigned */
12730+typedef int GLsizei; /* 4-byte signed */
12731+typedef float GLfloat; /* single precision float */
12732+typedef float GLclampf; /* single precision float in [0,1] */
12733+typedef double GLdouble; /* double precision float */
12734+typedef double GLclampd; /* double precision float in [0,1] */
12735+
12736+
12737+
12738+/*
12739+ * Constants
12740+ */
12741+
12742+/* Boolean values */
12743+#define GL_FALSE 0x0
12744+#define GL_TRUE 0x1
12745+
12746+/* Data types */
12747+#define GL_BYTE 0x1400
12748+#define GL_UNSIGNED_BYTE 0x1401
12749+#define GL_SHORT 0x1402
12750+#define GL_UNSIGNED_SHORT 0x1403
12751+#define GL_INT 0x1404
12752+#define GL_UNSIGNED_INT 0x1405
12753+#define GL_FLOAT 0x1406
12754+#define GL_2_BYTES 0x1407
12755+#define GL_3_BYTES 0x1408
12756+#define GL_4_BYTES 0x1409
12757+#define GL_DOUBLE 0x140A
12758+
12759+/* Primitives */
12760+#define GL_POINTS 0x0000
12761+#define GL_LINES 0x0001
12762+#define GL_LINE_LOOP 0x0002
12763+#define GL_LINE_STRIP 0x0003
12764+#define GL_TRIANGLES 0x0004
12765+#define GL_TRIANGLE_STRIP 0x0005
12766+#define GL_TRIANGLE_FAN 0x0006
12767+#define GL_QUADS 0x0007
12768+#define GL_QUAD_STRIP 0x0008
12769+#define GL_POLYGON 0x0009
12770+
12771+/* Vertex Arrays */
12772+#define GL_VERTEX_ARRAY 0x8074
12773+#define GL_NORMAL_ARRAY 0x8075
12774+#define GL_COLOR_ARRAY 0x8076
12775+#define GL_INDEX_ARRAY 0x8077
12776+#define GL_TEXTURE_COORD_ARRAY 0x8078
12777+#define GL_EDGE_FLAG_ARRAY 0x8079
12778+#define GL_VERTEX_ARRAY_SIZE 0x807A
12779+#define GL_VERTEX_ARRAY_TYPE 0x807B
12780+#define GL_VERTEX_ARRAY_STRIDE 0x807C
12781+#define GL_NORMAL_ARRAY_TYPE 0x807E
12782+#define GL_NORMAL_ARRAY_STRIDE 0x807F
12783+#define GL_COLOR_ARRAY_SIZE 0x8081
12784+#define GL_COLOR_ARRAY_TYPE 0x8082
12785+#define GL_COLOR_ARRAY_STRIDE 0x8083
12786+#define GL_INDEX_ARRAY_TYPE 0x8085
12787+#define GL_INDEX_ARRAY_STRIDE 0x8086
12788+#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
12789+#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
12790+#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
12791+#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
12792+#define GL_VERTEX_ARRAY_POINTER 0x808E
12793+#define GL_NORMAL_ARRAY_POINTER 0x808F
12794+#define GL_COLOR_ARRAY_POINTER 0x8090
12795+#define GL_INDEX_ARRAY_POINTER 0x8091
12796+#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
12797+#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
12798+#define GL_V2F 0x2A20
12799+#define GL_V3F 0x2A21
12800+#define GL_C4UB_V2F 0x2A22
12801+#define GL_C4UB_V3F 0x2A23
12802+#define GL_C3F_V3F 0x2A24
12803+#define GL_N3F_V3F 0x2A25
12804+#define GL_C4F_N3F_V3F 0x2A26
12805+#define GL_T2F_V3F 0x2A27
12806+#define GL_T4F_V4F 0x2A28
12807+#define GL_T2F_C4UB_V3F 0x2A29
12808+#define GL_T2F_C3F_V3F 0x2A2A
12809+#define GL_T2F_N3F_V3F 0x2A2B
12810+#define GL_T2F_C4F_N3F_V3F 0x2A2C
12811+#define GL_T4F_C4F_N3F_V4F 0x2A2D
12812+
12813+/* Matrix Mode */
12814+#define GL_MATRIX_MODE 0x0BA0
12815+#define GL_MODELVIEW 0x1700
12816+#define GL_PROJECTION 0x1701
12817+#define GL_TEXTURE 0x1702
12818+
12819+/* Points */
12820+#define GL_POINT_SMOOTH 0x0B10
12821+#define GL_POINT_SIZE 0x0B11
12822+#define GL_POINT_SIZE_GRANULARITY 0x0B13
12823+#define GL_POINT_SIZE_RANGE 0x0B12
12824+
12825+/* Lines */
12826+#define GL_LINE_SMOOTH 0x0B20
12827+#define GL_LINE_STIPPLE 0x0B24
12828+#define GL_LINE_STIPPLE_PATTERN 0x0B25
12829+#define GL_LINE_STIPPLE_REPEAT 0x0B26
12830+#define GL_LINE_WIDTH 0x0B21
12831+#define GL_LINE_WIDTH_GRANULARITY 0x0B23
12832+#define GL_LINE_WIDTH_RANGE 0x0B22
12833+
12834+/* Polygons */
12835+#define GL_POINT 0x1B00
12836+#define GL_LINE 0x1B01
12837+#define GL_FILL 0x1B02
12838+#define GL_CW 0x0900
12839+#define GL_CCW 0x0901
12840+#define GL_FRONT 0x0404
12841+#define GL_BACK 0x0405
12842+#define GL_POLYGON_MODE 0x0B40
12843+#define GL_POLYGON_SMOOTH 0x0B41
12844+#define GL_POLYGON_STIPPLE 0x0B42
12845+#define GL_EDGE_FLAG 0x0B43
12846+#define GL_CULL_FACE 0x0B44
12847+#define GL_CULL_FACE_MODE 0x0B45
12848+#define GL_FRONT_FACE 0x0B46
12849+#define GL_POLYGON_OFFSET_FACTOR 0x8038
12850+#define GL_POLYGON_OFFSET_UNITS 0x2A00
12851+#define GL_POLYGON_OFFSET_POINT 0x2A01
12852+#define GL_POLYGON_OFFSET_LINE 0x2A02
12853+#define GL_POLYGON_OFFSET_FILL 0x8037
12854+
12855+/* Display Lists */
12856+#define GL_COMPILE 0x1300
12857+#define GL_COMPILE_AND_EXECUTE 0x1301
12858+#define GL_LIST_BASE 0x0B32
12859+#define GL_LIST_INDEX 0x0B33
12860+#define GL_LIST_MODE 0x0B30
12861+
12862+/* Depth buffer */
12863+#define GL_NEVER 0x0200
12864+#define GL_LESS 0x0201
12865+#define GL_EQUAL 0x0202
12866+#define GL_LEQUAL 0x0203
12867+#define GL_GREATER 0x0204
12868+#define GL_NOTEQUAL 0x0205
12869+#define GL_GEQUAL 0x0206
12870+#define GL_ALWAYS 0x0207
12871+#define GL_DEPTH_TEST 0x0B71
12872+#define GL_DEPTH_BITS 0x0D56
12873+#define GL_DEPTH_CLEAR_VALUE 0x0B73
12874+#define GL_DEPTH_FUNC 0x0B74
12875+#define GL_DEPTH_RANGE 0x0B70
12876+#define GL_DEPTH_WRITEMASK 0x0B72
12877+#define GL_DEPTH_COMPONENT 0x1902
12878+
12879+/* Lighting */
12880+#define GL_LIGHTING 0x0B50
12881+#define GL_LIGHT0 0x4000
12882+#define GL_LIGHT1 0x4001
12883+#define GL_LIGHT2 0x4002
12884+#define GL_LIGHT3 0x4003
12885+#define GL_LIGHT4 0x4004
12886+#define GL_LIGHT5 0x4005
12887+#define GL_LIGHT6 0x4006
12888+#define GL_LIGHT7 0x4007
12889+#define GL_SPOT_EXPONENT 0x1205
12890+#define GL_SPOT_CUTOFF 0x1206
12891+#define GL_CONSTANT_ATTENUATION 0x1207
12892+#define GL_LINEAR_ATTENUATION 0x1208
12893+#define GL_QUADRATIC_ATTENUATION 0x1209
12894+#define GL_AMBIENT 0x1200
12895+#define GL_DIFFUSE 0x1201
12896+#define GL_SPECULAR 0x1202
12897+#define GL_SHININESS 0x1601
12898+#define GL_EMISSION 0x1600
12899+#define GL_POSITION 0x1203
12900+#define GL_SPOT_DIRECTION 0x1204
12901+#define GL_AMBIENT_AND_DIFFUSE 0x1602
12902+#define GL_COLOR_INDEXES 0x1603
12903+#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
12904+#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
12905+#define GL_LIGHT_MODEL_AMBIENT 0x0B53
12906+#define GL_FRONT_AND_BACK 0x0408
12907+#define GL_SHADE_MODEL 0x0B54
12908+#define GL_FLAT 0x1D00
12909+#define GL_SMOOTH 0x1D01
12910+#define GL_COLOR_MATERIAL 0x0B57
12911+#define GL_COLOR_MATERIAL_FACE 0x0B55
12912+#define GL_COLOR_MATERIAL_PARAMETER 0x0B56
12913+#define GL_NORMALIZE 0x0BA1
12914+
12915+/* User clipping planes */
12916+#define GL_CLIP_PLANE0 0x3000
12917+#define GL_CLIP_PLANE1 0x3001
12918+#define GL_CLIP_PLANE2 0x3002
12919+#define GL_CLIP_PLANE3 0x3003
12920+#define GL_CLIP_PLANE4 0x3004
12921+#define GL_CLIP_PLANE5 0x3005
12922+
12923+/* Accumulation buffer */
12924+#define GL_ACCUM_RED_BITS 0x0D58
12925+#define GL_ACCUM_GREEN_BITS 0x0D59
12926+#define GL_ACCUM_BLUE_BITS 0x0D5A
12927+#define GL_ACCUM_ALPHA_BITS 0x0D5B
12928+#define GL_ACCUM_CLEAR_VALUE 0x0B80
12929+#define GL_ACCUM 0x0100
12930+#define GL_ADD 0x0104
12931+#define GL_LOAD 0x0101
12932+#define GL_MULT 0x0103
12933+#define GL_RETURN 0x0102
12934+
12935+/* Alpha testing */
12936+#define GL_ALPHA_TEST 0x0BC0
12937+#define GL_ALPHA_TEST_REF 0x0BC2
12938+#define GL_ALPHA_TEST_FUNC 0x0BC1
12939+
12940+/* Blending */
12941+#define GL_BLEND 0x0BE2
12942+#define GL_BLEND_SRC 0x0BE1
12943+#define GL_BLEND_DST 0x0BE0
12944+#define GL_ZERO 0x0
12945+#define GL_ONE 0x1
12946+#define GL_SRC_COLOR 0x0300
12947+#define GL_ONE_MINUS_SRC_COLOR 0x0301
12948+#define GL_SRC_ALPHA 0x0302
12949+#define GL_ONE_MINUS_SRC_ALPHA 0x0303
12950+#define GL_DST_ALPHA 0x0304
12951+#define GL_ONE_MINUS_DST_ALPHA 0x0305
12952+#define GL_DST_COLOR 0x0306
12953+#define GL_ONE_MINUS_DST_COLOR 0x0307
12954+#define GL_SRC_ALPHA_SATURATE 0x0308
12955+
12956+/* Render Mode */
12957+#define GL_FEEDBACK 0x1C01
12958+#define GL_RENDER 0x1C00
12959+#define GL_SELECT 0x1C02
12960+
12961+/* Feedback */
12962+#define GL_2D 0x0600
12963+#define GL_3D 0x0601
12964+#define GL_3D_COLOR 0x0602
12965+#define GL_3D_COLOR_TEXTURE 0x0603
12966+#define GL_4D_COLOR_TEXTURE 0x0604
12967+#define GL_POINT_TOKEN 0x0701
12968+#define GL_LINE_TOKEN 0x0702
12969+#define GL_LINE_RESET_TOKEN 0x0707
12970+#define GL_POLYGON_TOKEN 0x0703
12971+#define GL_BITMAP_TOKEN 0x0704
12972+#define GL_DRAW_PIXEL_TOKEN 0x0705
12973+#define GL_COPY_PIXEL_TOKEN 0x0706
12974+#define GL_PASS_THROUGH_TOKEN 0x0700
12975+#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0
12976+#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1
12977+#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
12978+
12979+/* Selection */
12980+#define GL_SELECTION_BUFFER_POINTER 0x0DF3
12981+#define GL_SELECTION_BUFFER_SIZE 0x0DF4
12982+
12983+/* Fog */
12984+#define GL_FOG 0x0B60
12985+#define GL_FOG_MODE 0x0B65
12986+#define GL_FOG_DENSITY 0x0B62
12987+#define GL_FOG_COLOR 0x0B66
12988+#define GL_FOG_INDEX 0x0B61
12989+#define GL_FOG_START 0x0B63
12990+#define GL_FOG_END 0x0B64
12991+#define GL_LINEAR 0x2601
12992+#define GL_EXP 0x0800
12993+#define GL_EXP2 0x0801
12994+
12995+/* Logic Ops */
12996+#define GL_LOGIC_OP 0x0BF1
12997+#define GL_INDEX_LOGIC_OP 0x0BF1
12998+#define GL_COLOR_LOGIC_OP 0x0BF2
12999+#define GL_LOGIC_OP_MODE 0x0BF0
13000+#define GL_CLEAR 0x1500
13001+#define GL_SET 0x150F
13002+#define GL_COPY 0x1503
13003+#define GL_COPY_INVERTED 0x150C
13004+#define GL_NOOP 0x1505
13005+#define GL_INVERT 0x150A
13006+#define GL_AND 0x1501
13007+#define GL_NAND 0x150E
13008+#define GL_OR 0x1507
13009+#define GL_NOR 0x1508
13010+#define GL_XOR 0x1506
13011+#define GL_EQUIV 0x1509
13012+#define GL_AND_REVERSE 0x1502
13013+#define GL_AND_INVERTED 0x1504
13014+#define GL_OR_REVERSE 0x150B
13015+#define GL_OR_INVERTED 0x150D
13016+
13017+/* Stencil */
13018+#define GL_STENCIL_BITS 0x0D57
13019+#define GL_STENCIL_TEST 0x0B90
13020+#define GL_STENCIL_CLEAR_VALUE 0x0B91
13021+#define GL_STENCIL_FUNC 0x0B92
13022+#define GL_STENCIL_VALUE_MASK 0x0B93
13023+#define GL_STENCIL_FAIL 0x0B94
13024+#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
13025+#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
13026+#define GL_STENCIL_REF 0x0B97
13027+#define GL_STENCIL_WRITEMASK 0x0B98
13028+#define GL_STENCIL_INDEX 0x1901
13029+#define GL_KEEP 0x1E00
13030+#define GL_REPLACE 0x1E01
13031+#define GL_INCR 0x1E02
13032+#define GL_DECR 0x1E03
13033+
13034+/* Buffers, Pixel Drawing/Reading */
13035+#define GL_NONE 0x0
13036+#define GL_LEFT 0x0406
13037+#define GL_RIGHT 0x0407
13038+/*GL_FRONT 0x0404 */
13039+/*GL_BACK 0x0405 */
13040+/*GL_FRONT_AND_BACK 0x0408 */
13041+#define GL_FRONT_LEFT 0x0400
13042+#define GL_FRONT_RIGHT 0x0401
13043+#define GL_BACK_LEFT 0x0402
13044+#define GL_BACK_RIGHT 0x0403
13045+#define GL_AUX0 0x0409
13046+#define GL_AUX1 0x040A
13047+#define GL_AUX2 0x040B
13048+#define GL_AUX3 0x040C
13049+#define GL_COLOR_INDEX 0x1900
13050+#define GL_RED 0x1903
13051+#define GL_GREEN 0x1904
13052+#define GL_BLUE 0x1905
13053+#define GL_ALPHA 0x1906
13054+#define GL_LUMINANCE 0x1909
13055+#define GL_LUMINANCE_ALPHA 0x190A
13056+#define GL_ALPHA_BITS 0x0D55
13057+#define GL_RED_BITS 0x0D52
13058+#define GL_GREEN_BITS 0x0D53
13059+#define GL_BLUE_BITS 0x0D54
13060+#define GL_INDEX_BITS 0x0D51
13061+#define GL_SUBPIXEL_BITS 0x0D50
13062+#define GL_AUX_BUFFERS 0x0C00
13063+#define GL_READ_BUFFER 0x0C02
13064+#define GL_DRAW_BUFFER 0x0C01
13065+#define GL_DOUBLEBUFFER 0x0C32
13066+#define GL_STEREO 0x0C33
13067+#define GL_BITMAP 0x1A00
13068+#define GL_COLOR 0x1800
13069+#define GL_DEPTH 0x1801
13070+#define GL_STENCIL 0x1802
13071+#define GL_DITHER 0x0BD0
13072+#define GL_RGB 0x1907
13073+#define GL_RGBA 0x1908
13074+
13075+/* Implementation limits */
13076+#define GL_MAX_LIST_NESTING 0x0B31
13077+#define GL_MAX_EVAL_ORDER 0x0D30
13078+#define GL_MAX_LIGHTS 0x0D31
13079+#define GL_MAX_CLIP_PLANES 0x0D32
13080+#define GL_MAX_TEXTURE_SIZE 0x0D33
13081+#define GL_MAX_PIXEL_MAP_TABLE 0x0D34
13082+#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
13083+#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
13084+#define GL_MAX_NAME_STACK_DEPTH 0x0D37
13085+#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
13086+#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
13087+#define GL_MAX_VIEWPORT_DIMS 0x0D3A
13088+#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
13089+
13090+/* Gets */
13091+#define GL_ATTRIB_STACK_DEPTH 0x0BB0
13092+#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
13093+#define GL_COLOR_CLEAR_VALUE 0x0C22
13094+#define GL_COLOR_WRITEMASK 0x0C23
13095+#define GL_CURRENT_INDEX 0x0B01
13096+#define GL_CURRENT_COLOR 0x0B00
13097+#define GL_CURRENT_NORMAL 0x0B02
13098+#define GL_CURRENT_RASTER_COLOR 0x0B04
13099+#define GL_CURRENT_RASTER_DISTANCE 0x0B09
13100+#define GL_CURRENT_RASTER_INDEX 0x0B05
13101+#define GL_CURRENT_RASTER_POSITION 0x0B07
13102+#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
13103+#define GL_CURRENT_RASTER_POSITION_VALID 0x0B08
13104+#define GL_CURRENT_TEXTURE_COORDS 0x0B03
13105+#define GL_INDEX_CLEAR_VALUE 0x0C20
13106+#define GL_INDEX_MODE 0x0C30
13107+#define GL_INDEX_WRITEMASK 0x0C21
13108+#define GL_MODELVIEW_MATRIX 0x0BA6
13109+#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
13110+#define GL_NAME_STACK_DEPTH 0x0D70
13111+#define GL_PROJECTION_MATRIX 0x0BA7
13112+#define GL_PROJECTION_STACK_DEPTH 0x0BA4
13113+#define GL_RENDER_MODE 0x0C40
13114+#define GL_RGBA_MODE 0x0C31
13115+#define GL_TEXTURE_MATRIX 0x0BA8
13116+#define GL_TEXTURE_STACK_DEPTH 0x0BA5
13117+#define GL_VIEWPORT 0x0BA2
13118+
13119+/* Evaluators */
13120+#define GL_AUTO_NORMAL 0x0D80
13121+#define GL_MAP1_COLOR_4 0x0D90
13122+#define GL_MAP1_INDEX 0x0D91
13123+#define GL_MAP1_NORMAL 0x0D92
13124+#define GL_MAP1_TEXTURE_COORD_1 0x0D93
13125+#define GL_MAP1_TEXTURE_COORD_2 0x0D94
13126+#define GL_MAP1_TEXTURE_COORD_3 0x0D95
13127+#define GL_MAP1_TEXTURE_COORD_4 0x0D96
13128+#define GL_MAP1_VERTEX_3 0x0D97
13129+#define GL_MAP1_VERTEX_4 0x0D98
13130+#define GL_MAP2_COLOR_4 0x0DB0
13131+#define GL_MAP2_INDEX 0x0DB1
13132+#define GL_MAP2_NORMAL 0x0DB2
13133+#define GL_MAP2_TEXTURE_COORD_1 0x0DB3
13134+#define GL_MAP2_TEXTURE_COORD_2 0x0DB4
13135+#define GL_MAP2_TEXTURE_COORD_3 0x0DB5
13136+#define GL_MAP2_TEXTURE_COORD_4 0x0DB6
13137+#define GL_MAP2_VERTEX_3 0x0DB7
13138+#define GL_MAP2_VERTEX_4 0x0DB8
13139+#define GL_MAP1_GRID_DOMAIN 0x0DD0
13140+#define GL_MAP1_GRID_SEGMENTS 0x0DD1
13141+#define GL_MAP2_GRID_DOMAIN 0x0DD2
13142+#define GL_MAP2_GRID_SEGMENTS 0x0DD3
13143+#define GL_COEFF 0x0A00
13144+#define GL_ORDER 0x0A01
13145+#define GL_DOMAIN 0x0A02
13146+
13147+/* Hints */
13148+#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
13149+#define GL_POINT_SMOOTH_HINT 0x0C51
13150+#define GL_LINE_SMOOTH_HINT 0x0C52
13151+#define GL_POLYGON_SMOOTH_HINT 0x0C53
13152+#define GL_FOG_HINT 0x0C54
13153+#define GL_DONT_CARE 0x1100
13154+#define GL_FASTEST 0x1101
13155+#define GL_NICEST 0x1102
13156+
13157+/* Scissor box */
13158+#define GL_SCISSOR_BOX 0x0C10
13159+#define GL_SCISSOR_TEST 0x0C11
13160+
13161+/* Pixel Mode / Transfer */
13162+#define GL_MAP_COLOR 0x0D10
13163+#define GL_MAP_STENCIL 0x0D11
13164+#define GL_INDEX_SHIFT 0x0D12
13165+#define GL_INDEX_OFFSET 0x0D13
13166+#define GL_RED_SCALE 0x0D14
13167+#define GL_RED_BIAS 0x0D15
13168+#define GL_GREEN_SCALE 0x0D18
13169+#define GL_GREEN_BIAS 0x0D19
13170+#define GL_BLUE_SCALE 0x0D1A
13171+#define GL_BLUE_BIAS 0x0D1B
13172+#define GL_ALPHA_SCALE 0x0D1C
13173+#define GL_ALPHA_BIAS 0x0D1D
13174+#define GL_DEPTH_SCALE 0x0D1E
13175+#define GL_DEPTH_BIAS 0x0D1F
13176+#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
13177+#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
13178+#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
13179+#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
13180+#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
13181+#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
13182+#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
13183+#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
13184+#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
13185+#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
13186+#define GL_PIXEL_MAP_S_TO_S 0x0C71
13187+#define GL_PIXEL_MAP_I_TO_I 0x0C70
13188+#define GL_PIXEL_MAP_I_TO_R 0x0C72
13189+#define GL_PIXEL_MAP_I_TO_G 0x0C73
13190+#define GL_PIXEL_MAP_I_TO_B 0x0C74
13191+#define GL_PIXEL_MAP_I_TO_A 0x0C75
13192+#define GL_PIXEL_MAP_R_TO_R 0x0C76
13193+#define GL_PIXEL_MAP_G_TO_G 0x0C77
13194+#define GL_PIXEL_MAP_B_TO_B 0x0C78
13195+#define GL_PIXEL_MAP_A_TO_A 0x0C79
13196+#define GL_PACK_ALIGNMENT 0x0D05
13197+#define GL_PACK_LSB_FIRST 0x0D01
13198+#define GL_PACK_ROW_LENGTH 0x0D02
13199+#define GL_PACK_SKIP_PIXELS 0x0D04
13200+#define GL_PACK_SKIP_ROWS 0x0D03
13201+#define GL_PACK_SWAP_BYTES 0x0D00
13202+#define GL_UNPACK_ALIGNMENT 0x0CF5
13203+#define GL_UNPACK_LSB_FIRST 0x0CF1
13204+#define GL_UNPACK_ROW_LENGTH 0x0CF2
13205+#define GL_UNPACK_SKIP_PIXELS 0x0CF4
13206+#define GL_UNPACK_SKIP_ROWS 0x0CF3
13207+#define GL_UNPACK_SWAP_BYTES 0x0CF0
13208+#define GL_ZOOM_X 0x0D16
13209+#define GL_ZOOM_Y 0x0D17
13210+
13211+/* Texture mapping */
13212+#define GL_TEXTURE_ENV 0x2300
13213+#define GL_TEXTURE_ENV_MODE 0x2200
13214+#define GL_TEXTURE_1D 0x0DE0
13215+#define GL_TEXTURE_2D 0x0DE1
13216+#define GL_TEXTURE_WRAP_S 0x2802
13217+#define GL_TEXTURE_WRAP_T 0x2803
13218+#define GL_TEXTURE_MAG_FILTER 0x2800
13219+#define GL_TEXTURE_MIN_FILTER 0x2801
13220+#define GL_TEXTURE_ENV_COLOR 0x2201
13221+#define GL_TEXTURE_GEN_S 0x0C60
13222+#define GL_TEXTURE_GEN_T 0x0C61
13223+#define GL_TEXTURE_GEN_MODE 0x2500
13224+#define GL_TEXTURE_BORDER_COLOR 0x1004
13225+#define GL_TEXTURE_WIDTH 0x1000
13226+#define GL_TEXTURE_HEIGHT 0x1001
13227+#define GL_TEXTURE_BORDER 0x1005
13228+#define GL_TEXTURE_COMPONENTS 0x1003
13229+#define GL_TEXTURE_RED_SIZE 0x805C
13230+#define GL_TEXTURE_GREEN_SIZE 0x805D
13231+#define GL_TEXTURE_BLUE_SIZE 0x805E
13232+#define GL_TEXTURE_ALPHA_SIZE 0x805F
13233+#define GL_TEXTURE_LUMINANCE_SIZE 0x8060
13234+#define GL_TEXTURE_INTENSITY_SIZE 0x8061
13235+#define GL_NEAREST_MIPMAP_NEAREST 0x2700
13236+#define GL_NEAREST_MIPMAP_LINEAR 0x2702
13237+#define GL_LINEAR_MIPMAP_NEAREST 0x2701
13238+#define GL_LINEAR_MIPMAP_LINEAR 0x2703
13239+#define GL_OBJECT_LINEAR 0x2401
13240+#define GL_OBJECT_PLANE 0x2501
13241+#define GL_EYE_LINEAR 0x2400
13242+#define GL_EYE_PLANE 0x2502
13243+#define GL_SPHERE_MAP 0x2402
13244+#define GL_DECAL 0x2101
13245+#define GL_MODULATE 0x2100
13246+#define GL_NEAREST 0x2600
13247+#define GL_REPEAT 0x2901
13248+#define GL_CLAMP 0x2900
13249+#define GL_S 0x2000
13250+#define GL_T 0x2001
13251+#define GL_R 0x2002
13252+#define GL_Q 0x2003
13253+#define GL_TEXTURE_GEN_R 0x0C62
13254+#define GL_TEXTURE_GEN_Q 0x0C63
13255+
13256+/* Utility */
13257+#define GL_VENDOR 0x1F00
13258+#define GL_RENDERER 0x1F01
13259+#define GL_VERSION 0x1F02
13260+#define GL_EXTENSIONS 0x1F03
13261+
13262+/* Errors */
13263+#define GL_NO_ERROR 0x0
13264+#define GL_INVALID_ENUM 0x0500
13265+#define GL_INVALID_VALUE 0x0501
13266+#define GL_INVALID_OPERATION 0x0502
13267+#define GL_STACK_OVERFLOW 0x0503
13268+#define GL_STACK_UNDERFLOW 0x0504
13269+#define GL_OUT_OF_MEMORY 0x0505
13270+
13271+/* glPush/PopAttrib bits */
13272+#define GL_CURRENT_BIT 0x00000001
13273+#define GL_POINT_BIT 0x00000002
13274+#define GL_LINE_BIT 0x00000004
13275+#define GL_POLYGON_BIT 0x00000008
13276+#define GL_POLYGON_STIPPLE_BIT 0x00000010
13277+#define GL_PIXEL_MODE_BIT 0x00000020
13278+#define GL_LIGHTING_BIT 0x00000040
13279+#define GL_FOG_BIT 0x00000080
13280+#define GL_DEPTH_BUFFER_BIT 0x00000100
13281+#define GL_ACCUM_BUFFER_BIT 0x00000200
13282+#define GL_STENCIL_BUFFER_BIT 0x00000400
13283+#define GL_VIEWPORT_BIT 0x00000800
13284+#define GL_TRANSFORM_BIT 0x00001000
13285+#define GL_ENABLE_BIT 0x00002000
13286+#define GL_COLOR_BUFFER_BIT 0x00004000
13287+#define GL_HINT_BIT 0x00008000
13288+#define GL_EVAL_BIT 0x00010000
13289+#define GL_LIST_BIT 0x00020000
13290+#define GL_TEXTURE_BIT 0x00040000
13291+#define GL_SCISSOR_BIT 0x00080000
13292+#define GL_ALL_ATTRIB_BITS 0x000FFFFF
13293+
13294+
13295+/* OpenGL 1.1 */
13296+#define GL_PROXY_TEXTURE_1D 0x8063
13297+#define GL_PROXY_TEXTURE_2D 0x8064
13298+#define GL_TEXTURE_PRIORITY 0x8066
13299+#define GL_TEXTURE_RESIDENT 0x8067
13300+#define GL_TEXTURE_BINDING_1D 0x8068
13301+#define GL_TEXTURE_BINDING_2D 0x8069
13302+#define GL_TEXTURE_INTERNAL_FORMAT 0x1003
13303+#define GL_ALPHA4 0x803B
13304+#define GL_ALPHA8 0x803C
13305+#define GL_ALPHA12 0x803D
13306+#define GL_ALPHA16 0x803E
13307+#define GL_LUMINANCE4 0x803F
13308+#define GL_LUMINANCE8 0x8040
13309+#define GL_LUMINANCE12 0x8041
13310+#define GL_LUMINANCE16 0x8042
13311+#define GL_LUMINANCE4_ALPHA4 0x8043
13312+#define GL_LUMINANCE6_ALPHA2 0x8044
13313+#define GL_LUMINANCE8_ALPHA8 0x8045
13314+#define GL_LUMINANCE12_ALPHA4 0x8046
13315+#define GL_LUMINANCE12_ALPHA12 0x8047
13316+#define GL_LUMINANCE16_ALPHA16 0x8048
13317+#define GL_INTENSITY 0x8049
13318+#define GL_INTENSITY4 0x804A
13319+#define GL_INTENSITY8 0x804B
13320+#define GL_INTENSITY12 0x804C
13321+#define GL_INTENSITY16 0x804D
13322+#define GL_R3_G3_B2 0x2A10
13323+#define GL_RGB4 0x804F
13324+#define GL_RGB5 0x8050
13325+#define GL_RGB8 0x8051
13326+#define GL_RGB10 0x8052
13327+#define GL_RGB12 0x8053
13328+#define GL_RGB16 0x8054
13329+#define GL_RGBA2 0x8055
13330+#define GL_RGBA4 0x8056
13331+#define GL_RGB5_A1 0x8057
13332+#define GL_RGBA8 0x8058
13333+#define GL_RGB10_A2 0x8059
13334+#define GL_RGBA12 0x805A
13335+#define GL_RGBA16 0x805B
13336+#define GL_CLIENT_PIXEL_STORE_BIT 0x00000001
13337+#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
13338+#define GL_ALL_CLIENT_ATTRIB_BITS 0xFFFFFFFF
13339+#define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF
13340+
13341+
13342+
13343+/*
13344+ * Miscellaneous
13345+ */
13346+
13347+GLAPI void GLAPIENTRY glClearIndex( GLfloat c );
13348+
13349+GLAPI void GLAPIENTRY glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
13350+
13351+GLAPI void GLAPIENTRY glClear( GLbitfield mask );
13352+
13353+GLAPI void GLAPIENTRY glIndexMask( GLuint mask );
13354+
13355+GLAPI void GLAPIENTRY glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );
13356+
13357+GLAPI void GLAPIENTRY glAlphaFunc( GLenum func, GLclampf ref );
13358+
13359+GLAPI void GLAPIENTRY glBlendFunc( GLenum sfactor, GLenum dfactor );
13360+
13361+GLAPI void GLAPIENTRY glLogicOp( GLenum opcode );
13362+
13363+GLAPI void GLAPIENTRY glCullFace( GLenum mode );
13364+
13365+GLAPI void GLAPIENTRY glFrontFace( GLenum mode );
13366+
13367+GLAPI void GLAPIENTRY glPointSize( GLfloat size );
13368+
13369+GLAPI void GLAPIENTRY glLineWidth( GLfloat width );
13370+
13371+GLAPI void GLAPIENTRY glLineStipple( GLint factor, GLushort pattern );
13372+
13373+GLAPI void GLAPIENTRY glPolygonMode( GLenum face, GLenum mode );
13374+
13375+GLAPI void GLAPIENTRY glPolygonOffset( GLfloat factor, GLfloat units );
13376+
13377+GLAPI void GLAPIENTRY glPolygonStipple( const GLubyte *mask );
13378+
13379+GLAPI void GLAPIENTRY glGetPolygonStipple( GLubyte *mask );
13380+
13381+GLAPI void GLAPIENTRY glEdgeFlag( GLboolean flag );
13382+
13383+GLAPI void GLAPIENTRY glEdgeFlagv( const GLboolean *flag );
13384+
13385+GLAPI void GLAPIENTRY glScissor( GLint x, GLint y, GLsizei width, GLsizei height);
13386+
13387+GLAPI void GLAPIENTRY glClipPlane( GLenum plane, const GLdouble *equation );
13388+
13389+GLAPI void GLAPIENTRY glGetClipPlane( GLenum plane, GLdouble *equation );
13390+
13391+GLAPI void GLAPIENTRY glDrawBuffer( GLenum mode );
13392+
13393+GLAPI void GLAPIENTRY glReadBuffer( GLenum mode );
13394+
13395+GLAPI void GLAPIENTRY glEnable( GLenum cap );
13396+
13397+GLAPI void GLAPIENTRY glDisable( GLenum cap );
13398+
13399+GLAPI GLboolean GLAPIENTRY glIsEnabled( GLenum cap );
13400+
13401+
13402+GLAPI void GLAPIENTRY glEnableClientState( GLenum cap ); /* 1.1 */
13403+
13404+GLAPI void GLAPIENTRY glDisableClientState( GLenum cap ); /* 1.1 */
13405+
13406+
13407+GLAPI void GLAPIENTRY glGetBooleanv( GLenum pname, GLboolean *params );
13408+
13409+GLAPI void GLAPIENTRY glGetDoublev( GLenum pname, GLdouble *params );
13410+
13411+GLAPI void GLAPIENTRY glGetFloatv( GLenum pname, GLfloat *params );
13412+
13413+GLAPI void GLAPIENTRY glGetIntegerv( GLenum pname, GLint *params );
13414+
13415+
13416+GLAPI void GLAPIENTRY glPushAttrib( GLbitfield mask );
13417+
13418+GLAPI void GLAPIENTRY glPopAttrib( void );
13419+
13420+
13421+GLAPI void GLAPIENTRY glPushClientAttrib( GLbitfield mask ); /* 1.1 */
13422+
13423+GLAPI void GLAPIENTRY glPopClientAttrib( void ); /* 1.1 */
13424+
13425+
13426+GLAPI GLint GLAPIENTRY glRenderMode( GLenum mode );
13427+
13428+GLAPI GLenum GLAPIENTRY glGetError( void );
13429+
13430+GLAPI const GLubyte * GLAPIENTRY glGetString( GLenum name );
13431+
13432+GLAPI void GLAPIENTRY glFinish( void );
13433+
13434+GLAPI void GLAPIENTRY glFlush( void );
13435+
13436+GLAPI void GLAPIENTRY glHint( GLenum target, GLenum mode );
13437+
13438+
13439+/*
13440+ * Depth Buffer
13441+ */
13442+
13443+GLAPI void GLAPIENTRY glClearDepth( GLclampd depth );
13444+
13445+GLAPI void GLAPIENTRY glDepthFunc( GLenum func );
13446+
13447+GLAPI void GLAPIENTRY glDepthMask( GLboolean flag );
13448+
13449+GLAPI void GLAPIENTRY glDepthRange( GLclampd near_val, GLclampd far_val );
13450+
13451+
13452+/*
13453+ * Accumulation Buffer
13454+ */
13455+
13456+GLAPI void GLAPIENTRY glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
13457+
13458+GLAPI void GLAPIENTRY glAccum( GLenum op, GLfloat value );
13459+
13460+
13461+/*
13462+ * Transformation
13463+ */
13464+
13465+GLAPI void GLAPIENTRY glMatrixMode( GLenum mode );
13466+
13467+GLAPI void GLAPIENTRY glOrtho( GLdouble left, GLdouble right,
13468+ GLdouble bottom, GLdouble top,
13469+ GLdouble near_val, GLdouble far_val );
13470+
13471+GLAPI void GLAPIENTRY glFrustum( GLdouble left, GLdouble right,
13472+ GLdouble bottom, GLdouble top,
13473+ GLdouble near_val, GLdouble far_val );
13474+
13475+GLAPI void GLAPIENTRY glViewport( GLint x, GLint y,
13476+ GLsizei width, GLsizei height );
13477+
13478+GLAPI void GLAPIENTRY glPushMatrix( void );
13479+
13480+GLAPI void GLAPIENTRY glPopMatrix( void );
13481+
13482+GLAPI void GLAPIENTRY glLoadIdentity( void );
13483+
13484+GLAPI void GLAPIENTRY glLoadMatrixd( const GLdouble *m );
13485+GLAPI void GLAPIENTRY glLoadMatrixf( const GLfloat *m );
13486+
13487+GLAPI void GLAPIENTRY glMultMatrixd( const GLdouble *m );
13488+GLAPI void GLAPIENTRY glMultMatrixf( const GLfloat *m );
13489+
13490+GLAPI void GLAPIENTRY glRotated( GLdouble angle,
13491+ GLdouble x, GLdouble y, GLdouble z );
13492+GLAPI void GLAPIENTRY glRotatef( GLfloat angle,
13493+ GLfloat x, GLfloat y, GLfloat z );
13494+
13495+GLAPI void GLAPIENTRY glScaled( GLdouble x, GLdouble y, GLdouble z );
13496+GLAPI void GLAPIENTRY glScalef( GLfloat x, GLfloat y, GLfloat z );
13497+
13498+GLAPI void GLAPIENTRY glTranslated( GLdouble x, GLdouble y, GLdouble z );
13499+GLAPI void GLAPIENTRY glTranslatef( GLfloat x, GLfloat y, GLfloat z );
13500+
13501+
13502+/*
13503+ * Display Lists
13504+ */
13505+
13506+GLAPI GLboolean GLAPIENTRY glIsList( GLuint list );
13507+
13508+GLAPI void GLAPIENTRY glDeleteLists( GLuint list, GLsizei range );
13509+
13510+GLAPI GLuint GLAPIENTRY glGenLists( GLsizei range );
13511+
13512+GLAPI void GLAPIENTRY glNewList( GLuint list, GLenum mode );
13513+
13514+GLAPI void GLAPIENTRY glEndList( void );
13515+
13516+GLAPI void GLAPIENTRY glCallList( GLuint list );
13517+
13518+GLAPI void GLAPIENTRY glCallLists( GLsizei n, GLenum type,
13519+ const GLvoid *lists );
13520+
13521+GLAPI void GLAPIENTRY glListBase( GLuint base );
13522+
13523+
13524+/*
13525+ * Drawing Functions
13526+ */
13527+
13528+GLAPI void GLAPIENTRY glBegin( GLenum mode );
13529+
13530+GLAPI void GLAPIENTRY glEnd( void );
13531+
13532+
13533+GLAPI void GLAPIENTRY glVertex2d( GLdouble x, GLdouble y );
13534+GLAPI void GLAPIENTRY glVertex2f( GLfloat x, GLfloat y );
13535+GLAPI void GLAPIENTRY glVertex2i( GLint x, GLint y );
13536+GLAPI void GLAPIENTRY glVertex2s( GLshort x, GLshort y );
13537+
13538+GLAPI void GLAPIENTRY glVertex3d( GLdouble x, GLdouble y, GLdouble z );
13539+GLAPI void GLAPIENTRY glVertex3f( GLfloat x, GLfloat y, GLfloat z );
13540+GLAPI void GLAPIENTRY glVertex3i( GLint x, GLint y, GLint z );
13541+GLAPI void GLAPIENTRY glVertex3s( GLshort x, GLshort y, GLshort z );
13542+
13543+GLAPI void GLAPIENTRY glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
13544+GLAPI void GLAPIENTRY glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
13545+GLAPI void GLAPIENTRY glVertex4i( GLint x, GLint y, GLint z, GLint w );
13546+GLAPI void GLAPIENTRY glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w );
13547+
13548+GLAPI void GLAPIENTRY glVertex2dv( const GLdouble *v );
13549+GLAPI void GLAPIENTRY glVertex2fv( const GLfloat *v );
13550+GLAPI void GLAPIENTRY glVertex2iv( const GLint *v );
13551+GLAPI void GLAPIENTRY glVertex2sv( const GLshort *v );
13552+
13553+GLAPI void GLAPIENTRY glVertex3dv( const GLdouble *v );
13554+GLAPI void GLAPIENTRY glVertex3fv( const GLfloat *v );
13555+GLAPI void GLAPIENTRY glVertex3iv( const GLint *v );
13556+GLAPI void GLAPIENTRY glVertex3sv( const GLshort *v );
13557+
13558+GLAPI void GLAPIENTRY glVertex4dv( const GLdouble *v );
13559+GLAPI void GLAPIENTRY glVertex4fv( const GLfloat *v );
13560+GLAPI void GLAPIENTRY glVertex4iv( const GLint *v );
13561+GLAPI void GLAPIENTRY glVertex4sv( const GLshort *v );
13562+
13563+
13564+GLAPI void GLAPIENTRY glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz );
13565+GLAPI void GLAPIENTRY glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz );
13566+GLAPI void GLAPIENTRY glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz );
13567+GLAPI void GLAPIENTRY glNormal3i( GLint nx, GLint ny, GLint nz );
13568+GLAPI void GLAPIENTRY glNormal3s( GLshort nx, GLshort ny, GLshort nz );
13569+
13570+GLAPI void GLAPIENTRY glNormal3bv( const GLbyte *v );
13571+GLAPI void GLAPIENTRY glNormal3dv( const GLdouble *v );
13572+GLAPI void GLAPIENTRY glNormal3fv( const GLfloat *v );
13573+GLAPI void GLAPIENTRY glNormal3iv( const GLint *v );
13574+GLAPI void GLAPIENTRY glNormal3sv( const GLshort *v );
13575+
13576+
13577+GLAPI void GLAPIENTRY glIndexd( GLdouble c );
13578+GLAPI void GLAPIENTRY glIndexf( GLfloat c );
13579+GLAPI void GLAPIENTRY glIndexi( GLint c );
13580+GLAPI void GLAPIENTRY glIndexs( GLshort c );
13581+GLAPI void GLAPIENTRY glIndexub( GLubyte c ); /* 1.1 */
13582+
13583+GLAPI void GLAPIENTRY glIndexdv( const GLdouble *c );
13584+GLAPI void GLAPIENTRY glIndexfv( const GLfloat *c );
13585+GLAPI void GLAPIENTRY glIndexiv( const GLint *c );
13586+GLAPI void GLAPIENTRY glIndexsv( const GLshort *c );
13587+GLAPI void GLAPIENTRY glIndexubv( const GLubyte *c ); /* 1.1 */
13588+
13589+GLAPI void GLAPIENTRY glColor3b( GLbyte red, GLbyte green, GLbyte blue );
13590+GLAPI void GLAPIENTRY glColor3d( GLdouble red, GLdouble green, GLdouble blue );
13591+GLAPI void GLAPIENTRY glColor3f( GLfloat red, GLfloat green, GLfloat blue );
13592+GLAPI void GLAPIENTRY glColor3i( GLint red, GLint green, GLint blue );
13593+GLAPI void GLAPIENTRY glColor3s( GLshort red, GLshort green, GLshort blue );
13594+GLAPI void GLAPIENTRY glColor3ub( GLubyte red, GLubyte green, GLubyte blue );
13595+GLAPI void GLAPIENTRY glColor3ui( GLuint red, GLuint green, GLuint blue );
13596+GLAPI void GLAPIENTRY glColor3us( GLushort red, GLushort green, GLushort blue );
13597+
13598+GLAPI void GLAPIENTRY glColor4b( GLbyte red, GLbyte green,
13599+ GLbyte blue, GLbyte alpha );
13600+GLAPI void GLAPIENTRY glColor4d( GLdouble red, GLdouble green,
13601+ GLdouble blue, GLdouble alpha );
13602+GLAPI void GLAPIENTRY glColor4f( GLfloat red, GLfloat green,
13603+ GLfloat blue, GLfloat alpha );
13604+GLAPI void GLAPIENTRY glColor4i( GLint red, GLint green,
13605+ GLint blue, GLint alpha );
13606+GLAPI void GLAPIENTRY glColor4s( GLshort red, GLshort green,
13607+ GLshort blue, GLshort alpha );
13608+GLAPI void GLAPIENTRY glColor4ub( GLubyte red, GLubyte green,
13609+ GLubyte blue, GLubyte alpha );
13610+GLAPI void GLAPIENTRY glColor4ui( GLuint red, GLuint green,
13611+ GLuint blue, GLuint alpha );
13612+GLAPI void GLAPIENTRY glColor4us( GLushort red, GLushort green,
13613+ GLushort blue, GLushort alpha );
13614+
13615+
13616+GLAPI void GLAPIENTRY glColor3bv( const GLbyte *v );
13617+GLAPI void GLAPIENTRY glColor3dv( const GLdouble *v );
13618+GLAPI void GLAPIENTRY glColor3fv( const GLfloat *v );
13619+GLAPI void GLAPIENTRY glColor3iv( const GLint *v );
13620+GLAPI void GLAPIENTRY glColor3sv( const GLshort *v );
13621+GLAPI void GLAPIENTRY glColor3ubv( const GLubyte *v );
13622+GLAPI void GLAPIENTRY glColor3uiv( const GLuint *v );
13623+GLAPI void GLAPIENTRY glColor3usv( const GLushort *v );
13624+
13625+GLAPI void GLAPIENTRY glColor4bv( const GLbyte *v );
13626+GLAPI void GLAPIENTRY glColor4dv( const GLdouble *v );
13627+GLAPI void GLAPIENTRY glColor4fv( const GLfloat *v );
13628+GLAPI void GLAPIENTRY glColor4iv( const GLint *v );
13629+GLAPI void GLAPIENTRY glColor4sv( const GLshort *v );
13630+GLAPI void GLAPIENTRY glColor4ubv( const GLubyte *v );
13631+GLAPI void GLAPIENTRY glColor4uiv( const GLuint *v );
13632+GLAPI void GLAPIENTRY glColor4usv( const GLushort *v );
13633+
13634+
13635+GLAPI void GLAPIENTRY glTexCoord1d( GLdouble s );
13636+GLAPI void GLAPIENTRY glTexCoord1f( GLfloat s );
13637+GLAPI void GLAPIENTRY glTexCoord1i( GLint s );
13638+GLAPI void GLAPIENTRY glTexCoord1s( GLshort s );
13639+
13640+GLAPI void GLAPIENTRY glTexCoord2d( GLdouble s, GLdouble t );
13641+GLAPI void GLAPIENTRY glTexCoord2f( GLfloat s, GLfloat t );
13642+GLAPI void GLAPIENTRY glTexCoord2i( GLint s, GLint t );
13643+GLAPI void GLAPIENTRY glTexCoord2s( GLshort s, GLshort t );
13644+
13645+GLAPI void GLAPIENTRY glTexCoord3d( GLdouble s, GLdouble t, GLdouble r );
13646+GLAPI void GLAPIENTRY glTexCoord3f( GLfloat s, GLfloat t, GLfloat r );
13647+GLAPI void GLAPIENTRY glTexCoord3i( GLint s, GLint t, GLint r );
13648+GLAPI void GLAPIENTRY glTexCoord3s( GLshort s, GLshort t, GLshort r );
13649+
13650+GLAPI void GLAPIENTRY glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q );
13651+GLAPI void GLAPIENTRY glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q );
13652+GLAPI void GLAPIENTRY glTexCoord4i( GLint s, GLint t, GLint r, GLint q );
13653+GLAPI void GLAPIENTRY glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q );
13654+
13655+GLAPI void GLAPIENTRY glTexCoord1dv( const GLdouble *v );
13656+GLAPI void GLAPIENTRY glTexCoord1fv( const GLfloat *v );
13657+GLAPI void GLAPIENTRY glTexCoord1iv( const GLint *v );
13658+GLAPI void GLAPIENTRY glTexCoord1sv( const GLshort *v );
13659+
13660+GLAPI void GLAPIENTRY glTexCoord2dv( const GLdouble *v );
13661+GLAPI void GLAPIENTRY glTexCoord2fv( const GLfloat *v );
13662+GLAPI void GLAPIENTRY glTexCoord2iv( const GLint *v );
13663+GLAPI void GLAPIENTRY glTexCoord2sv( const GLshort *v );
13664+
13665+GLAPI void GLAPIENTRY glTexCoord3dv( const GLdouble *v );
13666+GLAPI void GLAPIENTRY glTexCoord3fv( const GLfloat *v );
13667+GLAPI void GLAPIENTRY glTexCoord3iv( const GLint *v );
13668+GLAPI void GLAPIENTRY glTexCoord3sv( const GLshort *v );
13669+
13670+GLAPI void GLAPIENTRY glTexCoord4dv( const GLdouble *v );
13671+GLAPI void GLAPIENTRY glTexCoord4fv( const GLfloat *v );
13672+GLAPI void GLAPIENTRY glTexCoord4iv( const GLint *v );
13673+GLAPI void GLAPIENTRY glTexCoord4sv( const GLshort *v );
13674+
13675+
13676+GLAPI void GLAPIENTRY glRasterPos2d( GLdouble x, GLdouble y );
13677+GLAPI void GLAPIENTRY glRasterPos2f( GLfloat x, GLfloat y );
13678+GLAPI void GLAPIENTRY glRasterPos2i( GLint x, GLint y );
13679+GLAPI void GLAPIENTRY glRasterPos2s( GLshort x, GLshort y );
13680+
13681+GLAPI void GLAPIENTRY glRasterPos3d( GLdouble x, GLdouble y, GLdouble z );
13682+GLAPI void GLAPIENTRY glRasterPos3f( GLfloat x, GLfloat y, GLfloat z );
13683+GLAPI void GLAPIENTRY glRasterPos3i( GLint x, GLint y, GLint z );
13684+GLAPI void GLAPIENTRY glRasterPos3s( GLshort x, GLshort y, GLshort z );
13685+
13686+GLAPI void GLAPIENTRY glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
13687+GLAPI void GLAPIENTRY glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
13688+GLAPI void GLAPIENTRY glRasterPos4i( GLint x, GLint y, GLint z, GLint w );
13689+GLAPI void GLAPIENTRY glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w );
13690+
13691+GLAPI void GLAPIENTRY glRasterPos2dv( const GLdouble *v );
13692+GLAPI void GLAPIENTRY glRasterPos2fv( const GLfloat *v );
13693+GLAPI void GLAPIENTRY glRasterPos2iv( const GLint *v );
13694+GLAPI void GLAPIENTRY glRasterPos2sv( const GLshort *v );
13695+
13696+GLAPI void GLAPIENTRY glRasterPos3dv( const GLdouble *v );
13697+GLAPI void GLAPIENTRY glRasterPos3fv( const GLfloat *v );
13698+GLAPI void GLAPIENTRY glRasterPos3iv( const GLint *v );
13699+GLAPI void GLAPIENTRY glRasterPos3sv( const GLshort *v );
13700+
13701+GLAPI void GLAPIENTRY glRasterPos4dv( const GLdouble *v );
13702+GLAPI void GLAPIENTRY glRasterPos4fv( const GLfloat *v );
13703+GLAPI void GLAPIENTRY glRasterPos4iv( const GLint *v );
13704+GLAPI void GLAPIENTRY glRasterPos4sv( const GLshort *v );
13705+
13706+
13707+GLAPI void GLAPIENTRY glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 );
13708+GLAPI void GLAPIENTRY glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 );
13709+GLAPI void GLAPIENTRY glRecti( GLint x1, GLint y1, GLint x2, GLint y2 );
13710+GLAPI void GLAPIENTRY glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 );
13711+
13712+
13713+GLAPI void GLAPIENTRY glRectdv( const GLdouble *v1, const GLdouble *v2 );
13714+GLAPI void GLAPIENTRY glRectfv( const GLfloat *v1, const GLfloat *v2 );
13715+GLAPI void GLAPIENTRY glRectiv( const GLint *v1, const GLint *v2 );
13716+GLAPI void GLAPIENTRY glRectsv( const GLshort *v1, const GLshort *v2 );
13717+
13718+
13719+/*
13720+ * Vertex Arrays (1.1)
13721+ */
13722+
13723+GLAPI void GLAPIENTRY glVertexPointer( GLint size, GLenum type,
13724+ GLsizei stride, const GLvoid *ptr );
13725+
13726+GLAPI void GLAPIENTRY glNormalPointer( GLenum type, GLsizei stride,
13727+ const GLvoid *ptr );
13728+
13729+GLAPI void GLAPIENTRY glColorPointer( GLint size, GLenum type,
13730+ GLsizei stride, const GLvoid *ptr );
13731+
13732+GLAPI void GLAPIENTRY glIndexPointer( GLenum type, GLsizei stride,
13733+ const GLvoid *ptr );
13734+
13735+GLAPI void GLAPIENTRY glTexCoordPointer( GLint size, GLenum type,
13736+ GLsizei stride, const GLvoid *ptr );
13737+
13738+GLAPI void GLAPIENTRY glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr );
13739+
13740+GLAPI void GLAPIENTRY glGetPointerv( GLenum pname, GLvoid **params );
13741+
13742+GLAPI void GLAPIENTRY glArrayElement( GLint i );
13743+
13744+GLAPI void GLAPIENTRY glDrawArrays( GLenum mode, GLint first, GLsizei count );
13745+
13746+GLAPI void GLAPIENTRY glDrawElements( GLenum mode, GLsizei count,
13747+ GLenum type, const GLvoid *indices );
13748+
13749+GLAPI void GLAPIENTRY glInterleavedArrays( GLenum format, GLsizei stride,
13750+ const GLvoid *pointer );
13751+
13752+/*
13753+ * Lighting
13754+ */
13755+
13756+GLAPI void GLAPIENTRY glShadeModel( GLenum mode );
13757+
13758+GLAPI void GLAPIENTRY glLightf( GLenum light, GLenum pname, GLfloat param );
13759+GLAPI void GLAPIENTRY glLighti( GLenum light, GLenum pname, GLint param );
13760+GLAPI void GLAPIENTRY glLightfv( GLenum light, GLenum pname,
13761+ const GLfloat *params );
13762+GLAPI void GLAPIENTRY glLightiv( GLenum light, GLenum pname,
13763+ const GLint *params );
13764+
13765+GLAPI void GLAPIENTRY glGetLightfv( GLenum light, GLenum pname,
13766+ GLfloat *params );
13767+GLAPI void GLAPIENTRY glGetLightiv( GLenum light, GLenum pname,
13768+ GLint *params );
13769+
13770+GLAPI void GLAPIENTRY glLightModelf( GLenum pname, GLfloat param );
13771+GLAPI void GLAPIENTRY glLightModeli( GLenum pname, GLint param );
13772+GLAPI void GLAPIENTRY glLightModelfv( GLenum pname, const GLfloat *params );
13773+GLAPI void GLAPIENTRY glLightModeliv( GLenum pname, const GLint *params );
13774+
13775+GLAPI void GLAPIENTRY glMaterialf( GLenum face, GLenum pname, GLfloat param );
13776+GLAPI void GLAPIENTRY glMateriali( GLenum face, GLenum pname, GLint param );
13777+GLAPI void GLAPIENTRY glMaterialfv( GLenum face, GLenum pname, const GLfloat *params );
13778+GLAPI void GLAPIENTRY glMaterialiv( GLenum face, GLenum pname, const GLint *params );
13779+
13780+GLAPI void GLAPIENTRY glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params );
13781+GLAPI void GLAPIENTRY glGetMaterialiv( GLenum face, GLenum pname, GLint *params );
13782+
13783+GLAPI void GLAPIENTRY glColorMaterial( GLenum face, GLenum mode );
13784+
13785+
13786+/*
13787+ * Raster functions
13788+ */
13789+
13790+GLAPI void GLAPIENTRY glPixelZoom( GLfloat xfactor, GLfloat yfactor );
13791+
13792+GLAPI void GLAPIENTRY glPixelStoref( GLenum pname, GLfloat param );
13793+GLAPI void GLAPIENTRY glPixelStorei( GLenum pname, GLint param );
13794+
13795+GLAPI void GLAPIENTRY glPixelTransferf( GLenum pname, GLfloat param );
13796+GLAPI void GLAPIENTRY glPixelTransferi( GLenum pname, GLint param );
13797+
13798+GLAPI void GLAPIENTRY glPixelMapfv( GLenum map, GLsizei mapsize,
13799+ const GLfloat *values );
13800+GLAPI void GLAPIENTRY glPixelMapuiv( GLenum map, GLsizei mapsize,
13801+ const GLuint *values );
13802+GLAPI void GLAPIENTRY glPixelMapusv( GLenum map, GLsizei mapsize,
13803+ const GLushort *values );
13804+
13805+GLAPI void GLAPIENTRY glGetPixelMapfv( GLenum map, GLfloat *values );
13806+GLAPI void GLAPIENTRY glGetPixelMapuiv( GLenum map, GLuint *values );
13807+GLAPI void GLAPIENTRY glGetPixelMapusv( GLenum map, GLushort *values );
13808+
13809+GLAPI void GLAPIENTRY glBitmap( GLsizei width, GLsizei height,
13810+ GLfloat xorig, GLfloat yorig,
13811+ GLfloat xmove, GLfloat ymove,
13812+ const GLubyte *bitmap );
13813+
13814+GLAPI void GLAPIENTRY glReadPixels( GLint x, GLint y,
13815+ GLsizei width, GLsizei height,
13816+ GLenum format, GLenum type,
13817+ GLvoid *pixels );
13818+
13819+GLAPI void GLAPIENTRY glDrawPixels( GLsizei width, GLsizei height,
13820+ GLenum format, GLenum type,
13821+ const GLvoid *pixels );
13822+
13823+GLAPI void GLAPIENTRY glCopyPixels( GLint x, GLint y,
13824+ GLsizei width, GLsizei height,
13825+ GLenum type );
13826+
13827+/*
13828+ * Stenciling
13829+ */
13830+
13831+GLAPI void GLAPIENTRY glStencilFunc( GLenum func, GLint ref, GLuint mask );
13832+
13833+GLAPI void GLAPIENTRY glStencilMask( GLuint mask );
13834+
13835+GLAPI void GLAPIENTRY glStencilOp( GLenum fail, GLenum zfail, GLenum zpass );
13836+
13837+GLAPI void GLAPIENTRY glClearStencil( GLint s );
13838+
13839+
13840+
13841+/*
13842+ * Texture mapping
13843+ */
13844+
13845+GLAPI void GLAPIENTRY glTexGend( GLenum coord, GLenum pname, GLdouble param );
13846+GLAPI void GLAPIENTRY glTexGenf( GLenum coord, GLenum pname, GLfloat param );
13847+GLAPI void GLAPIENTRY glTexGeni( GLenum coord, GLenum pname, GLint param );
13848+
13849+GLAPI void GLAPIENTRY glTexGendv( GLenum coord, GLenum pname, const GLdouble *params );
13850+GLAPI void GLAPIENTRY glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params );
13851+GLAPI void GLAPIENTRY glTexGeniv( GLenum coord, GLenum pname, const GLint *params );
13852+
13853+GLAPI void GLAPIENTRY glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params );
13854+GLAPI void GLAPIENTRY glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params );
13855+GLAPI void GLAPIENTRY glGetTexGeniv( GLenum coord, GLenum pname, GLint *params );
13856+
13857+
13858+GLAPI void GLAPIENTRY glTexEnvf( GLenum target, GLenum pname, GLfloat param );
13859+GLAPI void GLAPIENTRY glTexEnvi( GLenum target, GLenum pname, GLint param );
13860+
13861+GLAPI void GLAPIENTRY glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params );
13862+GLAPI void GLAPIENTRY glTexEnviv( GLenum target, GLenum pname, const GLint *params );
13863+
13864+GLAPI void GLAPIENTRY glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params );
13865+GLAPI void GLAPIENTRY glGetTexEnviv( GLenum target, GLenum pname, GLint *params );
13866+
13867+
13868+GLAPI void GLAPIENTRY glTexParameterf( GLenum target, GLenum pname, GLfloat param );
13869+GLAPI void GLAPIENTRY glTexParameteri( GLenum target, GLenum pname, GLint param );
13870+
13871+GLAPI void GLAPIENTRY glTexParameterfv( GLenum target, GLenum pname,
13872+ const GLfloat *params );
13873+GLAPI void GLAPIENTRY glTexParameteriv( GLenum target, GLenum pname,
13874+ const GLint *params );
13875+
13876+GLAPI void GLAPIENTRY glGetTexParameterfv( GLenum target,
13877+ GLenum pname, GLfloat *params);
13878+GLAPI void GLAPIENTRY glGetTexParameteriv( GLenum target,
13879+ GLenum pname, GLint *params );
13880+
13881+GLAPI void GLAPIENTRY glGetTexLevelParameterfv( GLenum target, GLint level,
13882+ GLenum pname, GLfloat *params );
13883+GLAPI void GLAPIENTRY glGetTexLevelParameteriv( GLenum target, GLint level,
13884+ GLenum pname, GLint *params );
13885+
13886+
13887+GLAPI void GLAPIENTRY glTexImage1D( GLenum target, GLint level,
13888+ GLint internalFormat,
13889+ GLsizei width, GLint border,
13890+ GLenum format, GLenum type,
13891+ const GLvoid *pixels );
13892+
13893+GLAPI void GLAPIENTRY glTexImage2D( GLenum target, GLint level,
13894+ GLint internalFormat,
13895+ GLsizei width, GLsizei height,
13896+ GLint border, GLenum format, GLenum type,
13897+ const GLvoid *pixels );
13898+
13899+GLAPI void GLAPIENTRY glGetTexImage( GLenum target, GLint level,
13900+ GLenum format, GLenum type,
13901+ GLvoid *pixels );
13902+
13903+
13904+/* 1.1 functions */
13905+
13906+GLAPI void GLAPIENTRY glGenTextures( GLsizei n, GLuint *textures );
13907+
13908+GLAPI void GLAPIENTRY glDeleteTextures( GLsizei n, const GLuint *textures);
13909+
13910+GLAPI void GLAPIENTRY glBindTexture( GLenum target, GLuint texture );
13911+
13912+GLAPI void GLAPIENTRY glPrioritizeTextures( GLsizei n,
13913+ const GLuint *textures,
13914+ const GLclampf *priorities );
13915+
13916+GLAPI GLboolean GLAPIENTRY glAreTexturesResident( GLsizei n,
13917+ const GLuint *textures,
13918+ GLboolean *residences );
13919+
13920+GLAPI GLboolean GLAPIENTRY glIsTexture( GLuint texture );
13921+
13922+
13923+GLAPI void GLAPIENTRY glTexSubImage1D( GLenum target, GLint level,
13924+ GLint xoffset,
13925+ GLsizei width, GLenum format,
13926+ GLenum type, const GLvoid *pixels );
13927+
13928+
13929+GLAPI void GLAPIENTRY glTexSubImage2D( GLenum target, GLint level,
13930+ GLint xoffset, GLint yoffset,
13931+ GLsizei width, GLsizei height,
13932+ GLenum format, GLenum type,
13933+ const GLvoid *pixels );
13934+
13935+
13936+GLAPI void GLAPIENTRY glCopyTexImage1D( GLenum target, GLint level,
13937+ GLenum internalformat,
13938+ GLint x, GLint y,
13939+ GLsizei width, GLint border );
13940+
13941+
13942+GLAPI void GLAPIENTRY glCopyTexImage2D( GLenum target, GLint level,
13943+ GLenum internalformat,
13944+ GLint x, GLint y,
13945+ GLsizei width, GLsizei height,
13946+ GLint border );
13947+
13948+
13949+GLAPI void GLAPIENTRY glCopyTexSubImage1D( GLenum target, GLint level,
13950+ GLint xoffset, GLint x, GLint y,
13951+ GLsizei width );
13952+
13953+
13954+GLAPI void GLAPIENTRY glCopyTexSubImage2D( GLenum target, GLint level,
13955+ GLint xoffset, GLint yoffset,
13956+ GLint x, GLint y,
13957+ GLsizei width, GLsizei height );
13958+
13959+
13960+/*
13961+ * Evaluators
13962+ */
13963+
13964+GLAPI void GLAPIENTRY glMap1d( GLenum target, GLdouble u1, GLdouble u2,
13965+ GLint stride,
13966+ GLint order, const GLdouble *points );
13967+GLAPI void GLAPIENTRY glMap1f( GLenum target, GLfloat u1, GLfloat u2,
13968+ GLint stride,
13969+ GLint order, const GLfloat *points );
13970+
13971+GLAPI void GLAPIENTRY glMap2d( GLenum target,
13972+ GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
13973+ GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
13974+ const GLdouble *points );
13975+GLAPI void GLAPIENTRY glMap2f( GLenum target,
13976+ GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
13977+ GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
13978+ const GLfloat *points );
13979+
13980+GLAPI void GLAPIENTRY glGetMapdv( GLenum target, GLenum query, GLdouble *v );
13981+GLAPI void GLAPIENTRY glGetMapfv( GLenum target, GLenum query, GLfloat *v );
13982+GLAPI void GLAPIENTRY glGetMapiv( GLenum target, GLenum query, GLint *v );
13983+
13984+GLAPI void GLAPIENTRY glEvalCoord1d( GLdouble u );
13985+GLAPI void GLAPIENTRY glEvalCoord1f( GLfloat u );
13986+
13987+GLAPI void GLAPIENTRY glEvalCoord1dv( const GLdouble *u );
13988+GLAPI void GLAPIENTRY glEvalCoord1fv( const GLfloat *u );
13989+
13990+GLAPI void GLAPIENTRY glEvalCoord2d( GLdouble u, GLdouble v );
13991+GLAPI void GLAPIENTRY glEvalCoord2f( GLfloat u, GLfloat v );
13992+
13993+GLAPI void GLAPIENTRY glEvalCoord2dv( const GLdouble *u );
13994+GLAPI void GLAPIENTRY glEvalCoord2fv( const GLfloat *u );
13995+
13996+GLAPI void GLAPIENTRY glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 );
13997+GLAPI void GLAPIENTRY glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 );
13998+
13999+GLAPI void GLAPIENTRY glMapGrid2d( GLint un, GLdouble u1, GLdouble u2,
14000+ GLint vn, GLdouble v1, GLdouble v2 );
14001+GLAPI void GLAPIENTRY glMapGrid2f( GLint un, GLfloat u1, GLfloat u2,
14002+ GLint vn, GLfloat v1, GLfloat v2 );
14003+
14004+GLAPI void GLAPIENTRY glEvalPoint1( GLint i );
14005+
14006+GLAPI void GLAPIENTRY glEvalPoint2( GLint i, GLint j );
14007+
14008+GLAPI void GLAPIENTRY glEvalMesh1( GLenum mode, GLint i1, GLint i2 );
14009+
14010+GLAPI void GLAPIENTRY glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
14011+
14012+
14013+/*
14014+ * Fog
14015+ */
14016+
14017+GLAPI void GLAPIENTRY glFogf( GLenum pname, GLfloat param );
14018+
14019+GLAPI void GLAPIENTRY glFogi( GLenum pname, GLint param );
14020+
14021+GLAPI void GLAPIENTRY glFogfv( GLenum pname, const GLfloat *params );
14022+
14023+GLAPI void GLAPIENTRY glFogiv( GLenum pname, const GLint *params );
14024+
14025+
14026+/*
14027+ * Selection and Feedback
14028+ */
14029+
14030+GLAPI void GLAPIENTRY glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer );
14031+
14032+GLAPI void GLAPIENTRY glPassThrough( GLfloat token );
14033+
14034+GLAPI void GLAPIENTRY glSelectBuffer( GLsizei size, GLuint *buffer );
14035+
14036+GLAPI void GLAPIENTRY glInitNames( void );
14037+
14038+GLAPI void GLAPIENTRY glLoadName( GLuint name );
14039+
14040+GLAPI void GLAPIENTRY glPushName( GLuint name );
14041+
14042+GLAPI void GLAPIENTRY glPopName( void );
14043+
14044+
14045+
14046+/*
14047+ * OpenGL 1.2
14048+ */
14049+
14050+#define GL_RESCALE_NORMAL 0x803A
14051+#define GL_CLAMP_TO_EDGE 0x812F
14052+#define GL_MAX_ELEMENTS_VERTICES 0x80E8
14053+#define GL_MAX_ELEMENTS_INDICES 0x80E9
14054+#define GL_BGR 0x80E0
14055+#define GL_BGRA 0x80E1
14056+#define GL_UNSIGNED_BYTE_3_3_2 0x8032
14057+#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
14058+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
14059+#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
14060+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
14061+#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
14062+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
14063+#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
14064+#define GL_UNSIGNED_INT_8_8_8_8 0x8035
14065+#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
14066+#define GL_UNSIGNED_INT_10_10_10_2 0x8036
14067+#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
14068+#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
14069+#define GL_SINGLE_COLOR 0x81F9
14070+#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
14071+#define GL_TEXTURE_MIN_LOD 0x813A
14072+#define GL_TEXTURE_MAX_LOD 0x813B
14073+#define GL_TEXTURE_BASE_LEVEL 0x813C
14074+#define GL_TEXTURE_MAX_LEVEL 0x813D
14075+#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
14076+#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
14077+#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
14078+#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
14079+#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
14080+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
14081+#define GL_PACK_SKIP_IMAGES 0x806B
14082+#define GL_PACK_IMAGE_HEIGHT 0x806C
14083+#define GL_UNPACK_SKIP_IMAGES 0x806D
14084+#define GL_UNPACK_IMAGE_HEIGHT 0x806E
14085+#define GL_TEXTURE_3D 0x806F
14086+#define GL_PROXY_TEXTURE_3D 0x8070
14087+#define GL_TEXTURE_DEPTH 0x8071
14088+#define GL_TEXTURE_WRAP_R 0x8072
14089+#define GL_MAX_3D_TEXTURE_SIZE 0x8073
14090+#define GL_TEXTURE_BINDING_3D 0x806A
14091+
14092+GLAPI void GLAPIENTRY glDrawRangeElements( GLenum mode, GLuint start,
14093+ GLuint end, GLsizei count, GLenum type, const GLvoid *indices );
14094+
14095+GLAPI void GLAPIENTRY glTexImage3D( GLenum target, GLint level,
14096+ GLint internalFormat,
14097+ GLsizei width, GLsizei height,
14098+ GLsizei depth, GLint border,
14099+ GLenum format, GLenum type,
14100+ const GLvoid *pixels );
14101+
14102+GLAPI void GLAPIENTRY glTexSubImage3D( GLenum target, GLint level,
14103+ GLint xoffset, GLint yoffset,
14104+ GLint zoffset, GLsizei width,
14105+ GLsizei height, GLsizei depth,
14106+ GLenum format,
14107+ GLenum type, const GLvoid *pixels);
14108+
14109+GLAPI void GLAPIENTRY glCopyTexSubImage3D( GLenum target, GLint level,
14110+ GLint xoffset, GLint yoffset,
14111+ GLint zoffset, GLint x,
14112+ GLint y, GLsizei width,
14113+ GLsizei height );
14114+
14115+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
14116+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);
14117+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);
14118+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
14119+
14120+
14121+/*
14122+ * GL_ARB_imaging
14123+ */
14124+
14125+#define GL_CONSTANT_COLOR 0x8001
14126+#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
14127+#define GL_CONSTANT_ALPHA 0x8003
14128+#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
14129+#define GL_COLOR_TABLE 0x80D0
14130+#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
14131+#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
14132+#define GL_PROXY_COLOR_TABLE 0x80D3
14133+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
14134+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
14135+#define GL_COLOR_TABLE_SCALE 0x80D6
14136+#define GL_COLOR_TABLE_BIAS 0x80D7
14137+#define GL_COLOR_TABLE_FORMAT 0x80D8
14138+#define GL_COLOR_TABLE_WIDTH 0x80D9
14139+#define GL_COLOR_TABLE_RED_SIZE 0x80DA
14140+#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
14141+#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
14142+#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
14143+#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
14144+#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
14145+#define GL_CONVOLUTION_1D 0x8010
14146+#define GL_CONVOLUTION_2D 0x8011
14147+#define GL_SEPARABLE_2D 0x8012
14148+#define GL_CONVOLUTION_BORDER_MODE 0x8013
14149+#define GL_CONVOLUTION_FILTER_SCALE 0x8014
14150+#define GL_CONVOLUTION_FILTER_BIAS 0x8015
14151+#define GL_REDUCE 0x8016
14152+#define GL_CONVOLUTION_FORMAT 0x8017
14153+#define GL_CONVOLUTION_WIDTH 0x8018
14154+#define GL_CONVOLUTION_HEIGHT 0x8019
14155+#define GL_MAX_CONVOLUTION_WIDTH 0x801A
14156+#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
14157+#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
14158+#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
14159+#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
14160+#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
14161+#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
14162+#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
14163+#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
14164+#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
14165+#define GL_CONSTANT_BORDER 0x8151
14166+#define GL_REPLICATE_BORDER 0x8153
14167+#define GL_CONVOLUTION_BORDER_COLOR 0x8154
14168+#define GL_COLOR_MATRIX 0x80B1
14169+#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
14170+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
14171+#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
14172+#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
14173+#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
14174+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
14175+#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
14176+#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
14177+#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
14178+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
14179+#define GL_HISTOGRAM 0x8024
14180+#define GL_PROXY_HISTOGRAM 0x8025
14181+#define GL_HISTOGRAM_WIDTH 0x8026
14182+#define GL_HISTOGRAM_FORMAT 0x8027
14183+#define GL_HISTOGRAM_RED_SIZE 0x8028
14184+#define GL_HISTOGRAM_GREEN_SIZE 0x8029
14185+#define GL_HISTOGRAM_BLUE_SIZE 0x802A
14186+#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
14187+#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
14188+#define GL_HISTOGRAM_SINK 0x802D
14189+#define GL_MINMAX 0x802E
14190+#define GL_MINMAX_FORMAT 0x802F
14191+#define GL_MINMAX_SINK 0x8030
14192+#define GL_TABLE_TOO_LARGE 0x8031
14193+#define GL_BLEND_EQUATION 0x8009
14194+#define GL_MIN 0x8007
14195+#define GL_MAX 0x8008
14196+#define GL_FUNC_ADD 0x8006
14197+#define GL_FUNC_SUBTRACT 0x800A
14198+#define GL_FUNC_REVERSE_SUBTRACT 0x800B
14199+#define GL_BLEND_COLOR 0x8005
14200+
14201+
14202+GLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat,
14203+ GLsizei width, GLenum format,
14204+ GLenum type, const GLvoid *table );
14205+
14206+GLAPI void GLAPIENTRY glColorSubTable( GLenum target,
14207+ GLsizei start, GLsizei count,
14208+ GLenum format, GLenum type,
14209+ const GLvoid *data );
14210+
14211+GLAPI void GLAPIENTRY glColorTableParameteriv(GLenum target, GLenum pname,
14212+ const GLint *params);
14213+
14214+GLAPI void GLAPIENTRY glColorTableParameterfv(GLenum target, GLenum pname,
14215+ const GLfloat *params);
14216+
14217+GLAPI void GLAPIENTRY glCopyColorSubTable( GLenum target, GLsizei start,
14218+ GLint x, GLint y, GLsizei width );
14219+
14220+GLAPI void GLAPIENTRY glCopyColorTable( GLenum target, GLenum internalformat,
14221+ GLint x, GLint y, GLsizei width );
14222+
14223+GLAPI void GLAPIENTRY glGetColorTable( GLenum target, GLenum format,
14224+ GLenum type, GLvoid *table );
14225+
14226+GLAPI void GLAPIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname,
14227+ GLfloat *params );
14228+
14229+GLAPI void GLAPIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname,
14230+ GLint *params );
14231+
14232+GLAPI void GLAPIENTRY glBlendEquation( GLenum mode );
14233+
14234+GLAPI void GLAPIENTRY glBlendColor( GLclampf red, GLclampf green,
14235+ GLclampf blue, GLclampf alpha );
14236+
14237+GLAPI void GLAPIENTRY glHistogram( GLenum target, GLsizei width,
14238+ GLenum internalformat, GLboolean sink );
14239+
14240+GLAPI void GLAPIENTRY glResetHistogram( GLenum target );
14241+
14242+GLAPI void GLAPIENTRY glGetHistogram( GLenum target, GLboolean reset,
14243+ GLenum format, GLenum type,
14244+ GLvoid *values );
14245+
14246+GLAPI void GLAPIENTRY glGetHistogramParameterfv( GLenum target, GLenum pname,
14247+ GLfloat *params );
14248+
14249+GLAPI void GLAPIENTRY glGetHistogramParameteriv( GLenum target, GLenum pname,
14250+ GLint *params );
14251+
14252+GLAPI void GLAPIENTRY glMinmax( GLenum target, GLenum internalformat,
14253+ GLboolean sink );
14254+
14255+GLAPI void GLAPIENTRY glResetMinmax( GLenum target );
14256+
14257+GLAPI void GLAPIENTRY glGetMinmax( GLenum target, GLboolean reset,
14258+ GLenum format, GLenum types,
14259+ GLvoid *values );
14260+
14261+GLAPI void GLAPIENTRY glGetMinmaxParameterfv( GLenum target, GLenum pname,
14262+ GLfloat *params );
14263+
14264+GLAPI void GLAPIENTRY glGetMinmaxParameteriv( GLenum target, GLenum pname,
14265+ GLint *params );
14266+
14267+GLAPI void GLAPIENTRY glConvolutionFilter1D( GLenum target,
14268+ GLenum internalformat, GLsizei width, GLenum format, GLenum type,
14269+ const GLvoid *image );
14270+
14271+GLAPI void GLAPIENTRY glConvolutionFilter2D( GLenum target,
14272+ GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
14273+ GLenum type, const GLvoid *image );
14274+
14275+GLAPI void GLAPIENTRY glConvolutionParameterf( GLenum target, GLenum pname,
14276+ GLfloat params );
14277+
14278+GLAPI void GLAPIENTRY glConvolutionParameterfv( GLenum target, GLenum pname,
14279+ const GLfloat *params );
14280+
14281+GLAPI void GLAPIENTRY glConvolutionParameteri( GLenum target, GLenum pname,
14282+ GLint params );
14283+
14284+GLAPI void GLAPIENTRY glConvolutionParameteriv( GLenum target, GLenum pname,
14285+ const GLint *params );
14286+
14287+GLAPI void GLAPIENTRY glCopyConvolutionFilter1D( GLenum target,
14288+ GLenum internalformat, GLint x, GLint y, GLsizei width );
14289+
14290+GLAPI void GLAPIENTRY glCopyConvolutionFilter2D( GLenum target,
14291+ GLenum internalformat, GLint x, GLint y, GLsizei width,
14292+ GLsizei height);
14293+
14294+GLAPI void GLAPIENTRY glGetConvolutionFilter( GLenum target, GLenum format,
14295+ GLenum type, GLvoid *image );
14296+
14297+GLAPI void GLAPIENTRY glGetConvolutionParameterfv( GLenum target, GLenum pname,
14298+ GLfloat *params );
14299+
14300+GLAPI void GLAPIENTRY glGetConvolutionParameteriv( GLenum target, GLenum pname,
14301+ GLint *params );
14302+
14303+GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target,
14304+ GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
14305+ GLenum type, const GLvoid *row, const GLvoid *column );
14306+
14307+GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
14308+ GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
14309+
14310+typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
14311+typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
14312+typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
14313+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
14314+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
14315+typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
14316+typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
14317+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
14318+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
14319+typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
14320+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
14321+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
14322+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
14323+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
14324+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
14325+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
14326+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
14327+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
14328+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
14329+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
14330+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
14331+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
14332+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
14333+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
14334+typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
14335+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
14336+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
14337+typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
14338+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
14339+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
14340+typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
14341+typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
14342+typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
14343+typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
14344+
14345+
14346+
14347+/*
14348+ * OpenGL 1.3
14349+ */
14350+
14351+/* multitexture */
14352+#define GL_TEXTURE0 0x84C0
14353+#define GL_TEXTURE1 0x84C1
14354+#define GL_TEXTURE2 0x84C2
14355+#define GL_TEXTURE3 0x84C3
14356+#define GL_TEXTURE4 0x84C4
14357+#define GL_TEXTURE5 0x84C5
14358+#define GL_TEXTURE6 0x84C6
14359+#define GL_TEXTURE7 0x84C7
14360+#define GL_TEXTURE8 0x84C8
14361+#define GL_TEXTURE9 0x84C9
14362+#define GL_TEXTURE10 0x84CA
14363+#define GL_TEXTURE11 0x84CB
14364+#define GL_TEXTURE12 0x84CC
14365+#define GL_TEXTURE13 0x84CD
14366+#define GL_TEXTURE14 0x84CE
14367+#define GL_TEXTURE15 0x84CF
14368+#define GL_TEXTURE16 0x84D0
14369+#define GL_TEXTURE17 0x84D1
14370+#define GL_TEXTURE18 0x84D2
14371+#define GL_TEXTURE19 0x84D3
14372+#define GL_TEXTURE20 0x84D4
14373+#define GL_TEXTURE21 0x84D5
14374+#define GL_TEXTURE22 0x84D6
14375+#define GL_TEXTURE23 0x84D7
14376+#define GL_TEXTURE24 0x84D8
14377+#define GL_TEXTURE25 0x84D9
14378+#define GL_TEXTURE26 0x84DA
14379+#define GL_TEXTURE27 0x84DB
14380+#define GL_TEXTURE28 0x84DC
14381+#define GL_TEXTURE29 0x84DD
14382+#define GL_TEXTURE30 0x84DE
14383+#define GL_TEXTURE31 0x84DF
14384+#define GL_ACTIVE_TEXTURE 0x84E0
14385+#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
14386+#define GL_MAX_TEXTURE_UNITS 0x84E2
14387+/* texture_cube_map */
14388+#define GL_NORMAL_MAP 0x8511
14389+#define GL_REFLECTION_MAP 0x8512
14390+#define GL_TEXTURE_CUBE_MAP 0x8513
14391+#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
14392+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
14393+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
14394+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
14395+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
14396+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
14397+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
14398+#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
14399+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
14400+/* texture_compression */
14401+#define GL_COMPRESSED_ALPHA 0x84E9
14402+#define GL_COMPRESSED_LUMINANCE 0x84EA
14403+#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
14404+#define GL_COMPRESSED_INTENSITY 0x84EC
14405+#define GL_COMPRESSED_RGB 0x84ED
14406+#define GL_COMPRESSED_RGBA 0x84EE
14407+#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
14408+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
14409+#define GL_TEXTURE_COMPRESSED 0x86A1
14410+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
14411+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
14412+/* multisample */
14413+#define GL_MULTISAMPLE 0x809D
14414+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
14415+#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
14416+#define GL_SAMPLE_COVERAGE 0x80A0
14417+#define GL_SAMPLE_BUFFERS 0x80A8
14418+#define GL_SAMPLES 0x80A9
14419+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
14420+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
14421+#define GL_MULTISAMPLE_BIT 0x20000000
14422+/* transpose_matrix */
14423+#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
14424+#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
14425+#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
14426+#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
14427+/* texture_env_combine */
14428+#define GL_COMBINE 0x8570
14429+#define GL_COMBINE_RGB 0x8571
14430+#define GL_COMBINE_ALPHA 0x8572
14431+#define GL_SOURCE0_RGB 0x8580
14432+#define GL_SOURCE1_RGB 0x8581
14433+#define GL_SOURCE2_RGB 0x8582
14434+#define GL_SOURCE0_ALPHA 0x8588
14435+#define GL_SOURCE1_ALPHA 0x8589
14436+#define GL_SOURCE2_ALPHA 0x858A
14437+#define GL_OPERAND0_RGB 0x8590
14438+#define GL_OPERAND1_RGB 0x8591
14439+#define GL_OPERAND2_RGB 0x8592
14440+#define GL_OPERAND0_ALPHA 0x8598
14441+#define GL_OPERAND1_ALPHA 0x8599
14442+#define GL_OPERAND2_ALPHA 0x859A
14443+#define GL_RGB_SCALE 0x8573
14444+#define GL_ADD_SIGNED 0x8574
14445+#define GL_INTERPOLATE 0x8575
14446+#define GL_SUBTRACT 0x84E7
14447+#define GL_CONSTANT 0x8576
14448+#define GL_PRIMARY_COLOR 0x8577
14449+#define GL_PREVIOUS 0x8578
14450+/* texture_env_dot3 */
14451+#define GL_DOT3_RGB 0x86AE
14452+#define GL_DOT3_RGBA 0x86AF
14453+/* texture_border_clamp */
14454+#define GL_CLAMP_TO_BORDER 0x812D
14455+
14456+GLAPI void GLAPIENTRY glActiveTexture( GLenum texture );
14457+
14458+GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture );
14459+
14460+GLAPI void GLAPIENTRY glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data );
14461+
14462+GLAPI void GLAPIENTRY glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data );
14463+
14464+GLAPI void GLAPIENTRY glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data );
14465+
14466+GLAPI void GLAPIENTRY glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data );
14467+
14468+GLAPI void GLAPIENTRY glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data );
14469+
14470+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 );
14471+
14472+GLAPI void GLAPIENTRY glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img );
14473+
14474+GLAPI void GLAPIENTRY glMultiTexCoord1d( GLenum target, GLdouble s );
14475+
14476+GLAPI void GLAPIENTRY glMultiTexCoord1dv( GLenum target, const GLdouble *v );
14477+
14478+GLAPI void GLAPIENTRY glMultiTexCoord1f( GLenum target, GLfloat s );
14479+
14480+GLAPI void GLAPIENTRY glMultiTexCoord1fv( GLenum target, const GLfloat *v );
14481+
14482+GLAPI void GLAPIENTRY glMultiTexCoord1i( GLenum target, GLint s );
14483+
14484+GLAPI void GLAPIENTRY glMultiTexCoord1iv( GLenum target, const GLint *v );
14485+
14486+GLAPI void GLAPIENTRY glMultiTexCoord1s( GLenum target, GLshort s );
14487+
14488+GLAPI void GLAPIENTRY glMultiTexCoord1sv( GLenum target, const GLshort *v );
14489+
14490+GLAPI void GLAPIENTRY glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t );
14491+
14492+GLAPI void GLAPIENTRY glMultiTexCoord2dv( GLenum target, const GLdouble *v );
14493+
14494+GLAPI void GLAPIENTRY glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t );
14495+
14496+GLAPI void GLAPIENTRY glMultiTexCoord2fv( GLenum target, const GLfloat *v );
14497+
14498+GLAPI void GLAPIENTRY glMultiTexCoord2i( GLenum target, GLint s, GLint t );
14499+
14500+GLAPI void GLAPIENTRY glMultiTexCoord2iv( GLenum target, const GLint *v );
14501+
14502+GLAPI void GLAPIENTRY glMultiTexCoord2s( GLenum target, GLshort s, GLshort t );
14503+
14504+GLAPI void GLAPIENTRY glMultiTexCoord2sv( GLenum target, const GLshort *v );
14505+
14506+GLAPI void GLAPIENTRY glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r );
14507+
14508+GLAPI void GLAPIENTRY glMultiTexCoord3dv( GLenum target, const GLdouble *v );
14509+
14510+GLAPI void GLAPIENTRY glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r );
14511+
14512+GLAPI void GLAPIENTRY glMultiTexCoord3fv( GLenum target, const GLfloat *v );
14513+
14514+GLAPI void GLAPIENTRY glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r );
14515+
14516+GLAPI void GLAPIENTRY glMultiTexCoord3iv( GLenum target, const GLint *v );
14517+
14518+GLAPI void GLAPIENTRY glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r );
14519+
14520+GLAPI void GLAPIENTRY glMultiTexCoord3sv( GLenum target, const GLshort *v );
14521+
14522+GLAPI void GLAPIENTRY glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q );
14523+
14524+GLAPI void GLAPIENTRY glMultiTexCoord4dv( GLenum target, const GLdouble *v );
14525+
14526+GLAPI void GLAPIENTRY glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q );
14527+
14528+GLAPI void GLAPIENTRY glMultiTexCoord4fv( GLenum target, const GLfloat *v );
14529+
14530+GLAPI void GLAPIENTRY glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q );
14531+
14532+GLAPI void GLAPIENTRY glMultiTexCoord4iv( GLenum target, const GLint *v );
14533+
14534+GLAPI void GLAPIENTRY glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q );
14535+
14536+GLAPI void GLAPIENTRY glMultiTexCoord4sv( GLenum target, const GLshort *v );
14537+
14538+
14539+GLAPI void GLAPIENTRY glLoadTransposeMatrixd( const GLdouble m[16] );
14540+
14541+GLAPI void GLAPIENTRY glLoadTransposeMatrixf( const GLfloat m[16] );
14542+
14543+GLAPI void GLAPIENTRY glMultTransposeMatrixd( const GLdouble m[16] );
14544+
14545+GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] );
14546+
14547+GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert );
14548+
14549+typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
14550+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
14551+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
14552+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
14553+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
14554+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
14555+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
14556+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
14557+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
14558+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
14559+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
14560+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
14561+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
14562+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
14563+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
14564+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
14565+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
14566+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
14567+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
14568+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
14569+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
14570+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
14571+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
14572+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
14573+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
14574+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
14575+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
14576+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
14577+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
14578+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
14579+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
14580+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
14581+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
14582+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
14583+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
14584+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
14585+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
14586+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
14587+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
14588+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
14589+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
14590+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
14591+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);
14592+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
14593+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
14594+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img);
14595+
14596+
14597+/*
14598+ * GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1)
14599+ */
14600+#ifndef GL_ARB_multitexture
14601+#define GL_ARB_multitexture 1
14602+
14603+#define GL_TEXTURE0_ARB 0x84C0
14604+#define GL_TEXTURE1_ARB 0x84C1
14605+#define GL_TEXTURE2_ARB 0x84C2
14606+#define GL_TEXTURE3_ARB 0x84C3
14607+#define GL_TEXTURE4_ARB 0x84C4
14608+#define GL_TEXTURE5_ARB 0x84C5
14609+#define GL_TEXTURE6_ARB 0x84C6
14610+#define GL_TEXTURE7_ARB 0x84C7
14611+#define GL_TEXTURE8_ARB 0x84C8
14612+#define GL_TEXTURE9_ARB 0x84C9
14613+#define GL_TEXTURE10_ARB 0x84CA
14614+#define GL_TEXTURE11_ARB 0x84CB
14615+#define GL_TEXTURE12_ARB 0x84CC
14616+#define GL_TEXTURE13_ARB 0x84CD
14617+#define GL_TEXTURE14_ARB 0x84CE
14618+#define GL_TEXTURE15_ARB 0x84CF
14619+#define GL_TEXTURE16_ARB 0x84D0
14620+#define GL_TEXTURE17_ARB 0x84D1
14621+#define GL_TEXTURE18_ARB 0x84D2
14622+#define GL_TEXTURE19_ARB 0x84D3
14623+#define GL_TEXTURE20_ARB 0x84D4
14624+#define GL_TEXTURE21_ARB 0x84D5
14625+#define GL_TEXTURE22_ARB 0x84D6
14626+#define GL_TEXTURE23_ARB 0x84D7
14627+#define GL_TEXTURE24_ARB 0x84D8
14628+#define GL_TEXTURE25_ARB 0x84D9
14629+#define GL_TEXTURE26_ARB 0x84DA
14630+#define GL_TEXTURE27_ARB 0x84DB
14631+#define GL_TEXTURE28_ARB 0x84DC
14632+#define GL_TEXTURE29_ARB 0x84DD
14633+#define GL_TEXTURE30_ARB 0x84DE
14634+#define GL_TEXTURE31_ARB 0x84DF
14635+#define GL_ACTIVE_TEXTURE_ARB 0x84E0
14636+#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
14637+#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
14638+
14639+GLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture);
14640+GLAPI void GLAPIENTRY glClientActiveTextureARB(GLenum texture);
14641+GLAPI void GLAPIENTRY glMultiTexCoord1dARB(GLenum target, GLdouble s);
14642+GLAPI void GLAPIENTRY glMultiTexCoord1dvARB(GLenum target, const GLdouble *v);
14643+GLAPI void GLAPIENTRY glMultiTexCoord1fARB(GLenum target, GLfloat s);
14644+GLAPI void GLAPIENTRY glMultiTexCoord1fvARB(GLenum target, const GLfloat *v);
14645+GLAPI void GLAPIENTRY glMultiTexCoord1iARB(GLenum target, GLint s);
14646+GLAPI void GLAPIENTRY glMultiTexCoord1ivARB(GLenum target, const GLint *v);
14647+GLAPI void GLAPIENTRY glMultiTexCoord1sARB(GLenum target, GLshort s);
14648+GLAPI void GLAPIENTRY glMultiTexCoord1svARB(GLenum target, const GLshort *v);
14649+GLAPI void GLAPIENTRY glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t);
14650+GLAPI void GLAPIENTRY glMultiTexCoord2dvARB(GLenum target, const GLdouble *v);
14651+GLAPI void GLAPIENTRY glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t);
14652+GLAPI void GLAPIENTRY glMultiTexCoord2fvARB(GLenum target, const GLfloat *v);
14653+GLAPI void GLAPIENTRY glMultiTexCoord2iARB(GLenum target, GLint s, GLint t);
14654+GLAPI void GLAPIENTRY glMultiTexCoord2ivARB(GLenum target, const GLint *v);
14655+GLAPI void GLAPIENTRY glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t);
14656+GLAPI void GLAPIENTRY glMultiTexCoord2svARB(GLenum target, const GLshort *v);
14657+GLAPI void GLAPIENTRY glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r);
14658+GLAPI void GLAPIENTRY glMultiTexCoord3dvARB(GLenum target, const GLdouble *v);
14659+GLAPI void GLAPIENTRY glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r);
14660+GLAPI void GLAPIENTRY glMultiTexCoord3fvARB(GLenum target, const GLfloat *v);
14661+GLAPI void GLAPIENTRY glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r);
14662+GLAPI void GLAPIENTRY glMultiTexCoord3ivARB(GLenum target, const GLint *v);
14663+GLAPI void GLAPIENTRY glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r);
14664+GLAPI void GLAPIENTRY glMultiTexCoord3svARB(GLenum target, const GLshort *v);
14665+GLAPI void GLAPIENTRY glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
14666+GLAPI void GLAPIENTRY glMultiTexCoord4dvARB(GLenum target, const GLdouble *v);
14667+GLAPI void GLAPIENTRY glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
14668+GLAPI void GLAPIENTRY glMultiTexCoord4fvARB(GLenum target, const GLfloat *v);
14669+GLAPI void GLAPIENTRY glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q);
14670+GLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v);
14671+GLAPI void GLAPIENTRY glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
14672+GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v);
14673+
14674+typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
14675+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
14676+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
14677+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
14678+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
14679+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
14680+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
14681+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
14682+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
14683+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
14684+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
14685+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
14686+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
14687+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
14688+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
14689+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
14690+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
14691+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
14692+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
14693+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
14694+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
14695+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
14696+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
14697+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
14698+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
14699+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
14700+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
14701+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
14702+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
14703+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
14704+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
14705+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
14706+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
14707+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
14708+
14709+#endif /* GL_ARB_multitexture */
14710+
14711+
14712+
14713+/*
14714+ * Define this token if you want "old-style" header file behaviour (extensions
14715+ * defined in gl.h). Otherwise, extensions will be included from glext.h.
14716+ */
14717+#if defined(GL_GLEXT_LEGACY)
14718+
14719+/* All extensions that used to be here are now found in glext.h */
14720+
14721+#else /* GL_GLEXT_LEGACY */
14722+
14723+#include <mesa_glext.h>
14724+
14725+#endif /* GL_GLEXT_LEGACY */
14726+
14727+
14728+
14729+#if GL_ARB_shader_objects
14730+
14731+#ifndef GL_MESA_shader_debug
14732+#define GL_MESA_shader_debug 1
14733+
14734+#define GL_DEBUG_OBJECT_MESA 0x8759
14735+#define GL_DEBUG_PRINT_MESA 0x875A
14736+#define GL_DEBUG_ASSERT_MESA 0x875B
14737+
14738+GLAPI GLhandleARB APIENTRY glCreateDebugObjectMESA (void);
14739+GLAPI void APIENTRY glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
14740+GLAPI void APIENTRY glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength,
14741+ GLsizei *length, GLcharARB *debugLog);
14742+GLAPI GLsizei APIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
14743+
14744+#endif /* GL_MESA_shader_debug */
14745+
14746+#endif /* GL_ARB_shader_objects */
14747+
14748+
14749+/*
14750+ * ???. GL_MESA_packed_depth_stencil
14751+ * XXX obsolete
14752+ */
14753+#ifndef GL_MESA_packed_depth_stencil
14754+#define GL_MESA_packed_depth_stencil 1
14755+
14756+#define GL_DEPTH_STENCIL_MESA 0x8750
14757+#define GL_UNSIGNED_INT_24_8_MESA 0x8751
14758+#define GL_UNSIGNED_INT_8_24_REV_MESA 0x8752
14759+#define GL_UNSIGNED_SHORT_15_1_MESA 0x8753
14760+#define GL_UNSIGNED_SHORT_1_15_REV_MESA 0x8754
14761+
14762+#endif /* GL_MESA_packed_depth_stencil */
14763+
14764+
14765+#ifndef GL_MESA_program_debug
14766+#define GL_MESA_program_debug 1
14767+
14768+#define GL_FRAGMENT_PROGRAM_POSITION_MESA 0x8bb0
14769+#define GL_FRAGMENT_PROGRAM_CALLBACK_MESA 0x8bb1
14770+#define GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA 0x8bb2
14771+#define GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA 0x8bb3
14772+#define GL_VERTEX_PROGRAM_POSITION_MESA 0x8bb4
14773+#define GL_VERTEX_PROGRAM_CALLBACK_MESA 0x8bb5
14774+#define GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA 0x8bb6
14775+#define GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA 0x8bb7
14776+
14777+typedef void (*GLprogramcallbackMESA)(GLenum target, GLvoid *data);
14778+
14779+GLAPI void GLAPIENTRY glProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, GLvoid *data);
14780+
14781+GLAPI void GLAPIENTRY glGetProgramRegisterfvMESA(GLenum target, GLsizei len, const GLubyte *name, GLfloat *v);
14782+
14783+#endif /* GL_MESA_program_debug */
14784+
14785+
14786+#ifndef GL_ATI_blend_equation_separate
14787+#define GL_ATI_blend_equation_separate 1
14788+
14789+#define GL_ALPHA_BLEND_EQUATION_ATI 0x883D
14790+
14791+GLAPI void GLAPIENTRY glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA );
14792+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA);
14793+
14794+#endif /* GL_ATI_blend_equation_separate */
14795+
14796+
14797+
14798+/**
14799+ ** NOTE!!!!! If you add new functions to this file, or update
14800+ ** glext.h be sure to regenerate the gl_mangle.h file. See comments
14801+ ** in that file for details.
14802+ **/
14803+
14804+
14805+
14806+/**********************************************************************
14807+ * Begin system-specific stuff
14808+ */
14809+#if defined(PRAGMA_EXPORT_SUPPORTED)
14810+#pragma export off
14811+#endif
14812+
14813+#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
14814+#pragma import off
14815+#endif
14816+/*
14817+ * End system-specific stuff
14818+ **********************************************************************/
14819+
14820+
14821+#ifdef __cplusplus
14822+}
14823+#endif
14824+
14825+#endif /* __gl_h_ */
14826Index: qemu-0.13.0/target-i386/mesa_glext.h
14827===================================================================
14828--- /dev/null 1970-01-01 00:00:00.000000000 +0000
14829+++ qemu-0.13.0/target-i386/mesa_glext.h 2011-01-17 16:42:36.000000000 +0800
14830@@ -0,0 +1,7279 @@
14831+#ifndef __glext_h_
14832+#define __glext_h_
14833+
14834+#ifdef __cplusplus
14835+extern "C" {
14836+#endif
14837+
14838+/*
14839+** Copyright (c) 2007 The Khronos Group Inc.
14840+**
14841+** Permission is hereby granted, free of charge, to any person obtaining a
14842+** copy of this software and/or associated documentation files (the
14843+** "Materials"), to deal in the Materials without restriction, including
14844+** without limitation the rights to use, copy, modify, merge, publish,
14845+** distribute, sublicense, and/or sell copies of the Materials, and to
14846+** permit persons to whom the Materials are furnished to do so, subject to
14847+** the following conditions:
14848+**
14849+** The above copyright notice and this permission notice shall be included
14850+** in all copies or substantial portions of the Materials.
14851+**
14852+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
14853+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14854+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
14855+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
14856+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
14857+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
14858+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
14859+*/
14860+
14861+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
14862+#define WIN32_LEAN_AND_MEAN 1
14863+#include <windows.h>
14864+#endif
14865+
14866+#ifndef APIENTRY
14867+#define APIENTRY
14868+#endif
14869+#ifndef APIENTRYP
14870+#define APIENTRYP APIENTRY *
14871+#endif
14872+#ifndef GLAPI
14873+#define GLAPI extern
14874+#endif
14875+
14876+/*************************************************************/
14877+
14878+/* Header file version number, required by OpenGL ABI for Linux */
14879+/* glext.h last updated 2007/02/12 */
14880+/* Current version at http://www.opengl.org/registry/ */
14881+#define GL_GLEXT_VERSION 39
14882+
14883+#ifndef GL_VERSION_1_2
14884+#define GL_UNSIGNED_BYTE_3_3_2 0x8032
14885+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
14886+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
14887+#define GL_UNSIGNED_INT_8_8_8_8 0x8035
14888+#define GL_UNSIGNED_INT_10_10_10_2 0x8036
14889+#define GL_RESCALE_NORMAL 0x803A
14890+#define GL_TEXTURE_BINDING_3D 0x806A
14891+#define GL_PACK_SKIP_IMAGES 0x806B
14892+#define GL_PACK_IMAGE_HEIGHT 0x806C
14893+#define GL_UNPACK_SKIP_IMAGES 0x806D
14894+#define GL_UNPACK_IMAGE_HEIGHT 0x806E
14895+#define GL_TEXTURE_3D 0x806F
14896+#define GL_PROXY_TEXTURE_3D 0x8070
14897+#define GL_TEXTURE_DEPTH 0x8071
14898+#define GL_TEXTURE_WRAP_R 0x8072
14899+#define GL_MAX_3D_TEXTURE_SIZE 0x8073
14900+#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
14901+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
14902+#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
14903+#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
14904+#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
14905+#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
14906+#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
14907+#define GL_BGR 0x80E0
14908+#define GL_BGRA 0x80E1
14909+#define GL_MAX_ELEMENTS_VERTICES 0x80E8
14910+#define GL_MAX_ELEMENTS_INDICES 0x80E9
14911+#define GL_CLAMP_TO_EDGE 0x812F
14912+#define GL_TEXTURE_MIN_LOD 0x813A
14913+#define GL_TEXTURE_MAX_LOD 0x813B
14914+#define GL_TEXTURE_BASE_LEVEL 0x813C
14915+#define GL_TEXTURE_MAX_LEVEL 0x813D
14916+#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
14917+#define GL_SINGLE_COLOR 0x81F9
14918+#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
14919+#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
14920+#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
14921+#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
14922+#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
14923+#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
14924+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
14925+#endif
14926+
14927+#ifndef GL_ARB_imaging
14928+#define GL_CONSTANT_COLOR 0x8001
14929+#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
14930+#define GL_CONSTANT_ALPHA 0x8003
14931+#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
14932+#define GL_BLEND_COLOR 0x8005
14933+#define GL_FUNC_ADD 0x8006
14934+#define GL_MIN 0x8007
14935+#define GL_MAX 0x8008
14936+#define GL_BLEND_EQUATION 0x8009
14937+#define GL_FUNC_SUBTRACT 0x800A
14938+#define GL_FUNC_REVERSE_SUBTRACT 0x800B
14939+#define GL_CONVOLUTION_1D 0x8010
14940+#define GL_CONVOLUTION_2D 0x8011
14941+#define GL_SEPARABLE_2D 0x8012
14942+#define GL_CONVOLUTION_BORDER_MODE 0x8013
14943+#define GL_CONVOLUTION_FILTER_SCALE 0x8014
14944+#define GL_CONVOLUTION_FILTER_BIAS 0x8015
14945+#define GL_REDUCE 0x8016
14946+#define GL_CONVOLUTION_FORMAT 0x8017
14947+#define GL_CONVOLUTION_WIDTH 0x8018
14948+#define GL_CONVOLUTION_HEIGHT 0x8019
14949+#define GL_MAX_CONVOLUTION_WIDTH 0x801A
14950+#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
14951+#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
14952+#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
14953+#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
14954+#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
14955+#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
14956+#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
14957+#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
14958+#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
14959+#define GL_HISTOGRAM 0x8024
14960+#define GL_PROXY_HISTOGRAM 0x8025
14961+#define GL_HISTOGRAM_WIDTH 0x8026
14962+#define GL_HISTOGRAM_FORMAT 0x8027
14963+#define GL_HISTOGRAM_RED_SIZE 0x8028
14964+#define GL_HISTOGRAM_GREEN_SIZE 0x8029
14965+#define GL_HISTOGRAM_BLUE_SIZE 0x802A
14966+#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
14967+#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
14968+#define GL_HISTOGRAM_SINK 0x802D
14969+#define GL_MINMAX 0x802E
14970+#define GL_MINMAX_FORMAT 0x802F
14971+#define GL_MINMAX_SINK 0x8030
14972+#define GL_TABLE_TOO_LARGE 0x8031
14973+#define GL_COLOR_MATRIX 0x80B1
14974+#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
14975+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
14976+#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
14977+#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
14978+#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
14979+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
14980+#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
14981+#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
14982+#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
14983+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
14984+#define GL_COLOR_TABLE 0x80D0
14985+#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
14986+#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
14987+#define GL_PROXY_COLOR_TABLE 0x80D3
14988+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
14989+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
14990+#define GL_COLOR_TABLE_SCALE 0x80D6
14991+#define GL_COLOR_TABLE_BIAS 0x80D7
14992+#define GL_COLOR_TABLE_FORMAT 0x80D8
14993+#define GL_COLOR_TABLE_WIDTH 0x80D9
14994+#define GL_COLOR_TABLE_RED_SIZE 0x80DA
14995+#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
14996+#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
14997+#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
14998+#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
14999+#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
15000+#define GL_CONSTANT_BORDER 0x8151
15001+#define GL_REPLICATE_BORDER 0x8153
15002+#define GL_CONVOLUTION_BORDER_COLOR 0x8154
15003+#endif
15004+
15005+#ifndef GL_VERSION_1_3
15006+#define GL_TEXTURE0 0x84C0
15007+#define GL_TEXTURE1 0x84C1
15008+#define GL_TEXTURE2 0x84C2
15009+#define GL_TEXTURE3 0x84C3
15010+#define GL_TEXTURE4 0x84C4
15011+#define GL_TEXTURE5 0x84C5
15012+#define GL_TEXTURE6 0x84C6
15013+#define GL_TEXTURE7 0x84C7
15014+#define GL_TEXTURE8 0x84C8
15015+#define GL_TEXTURE9 0x84C9
15016+#define GL_TEXTURE10 0x84CA
15017+#define GL_TEXTURE11 0x84CB
15018+#define GL_TEXTURE12 0x84CC
15019+#define GL_TEXTURE13 0x84CD
15020+#define GL_TEXTURE14 0x84CE
15021+#define GL_TEXTURE15 0x84CF
15022+#define GL_TEXTURE16 0x84D0
15023+#define GL_TEXTURE17 0x84D1
15024+#define GL_TEXTURE18 0x84D2
15025+#define GL_TEXTURE19 0x84D3
15026+#define GL_TEXTURE20 0x84D4
15027+#define GL_TEXTURE21 0x84D5
15028+#define GL_TEXTURE22 0x84D6
15029+#define GL_TEXTURE23 0x84D7
15030+#define GL_TEXTURE24 0x84D8
15031+#define GL_TEXTURE25 0x84D9
15032+#define GL_TEXTURE26 0x84DA
15033+#define GL_TEXTURE27 0x84DB
15034+#define GL_TEXTURE28 0x84DC
15035+#define GL_TEXTURE29 0x84DD
15036+#define GL_TEXTURE30 0x84DE
15037+#define GL_TEXTURE31 0x84DF
15038+#define GL_ACTIVE_TEXTURE 0x84E0
15039+#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
15040+#define GL_MAX_TEXTURE_UNITS 0x84E2
15041+#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
15042+#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
15043+#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
15044+#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
15045+#define GL_MULTISAMPLE 0x809D
15046+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
15047+#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
15048+#define GL_SAMPLE_COVERAGE 0x80A0
15049+#define GL_SAMPLE_BUFFERS 0x80A8
15050+#define GL_SAMPLES 0x80A9
15051+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
15052+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
15053+#define GL_MULTISAMPLE_BIT 0x20000000
15054+#define GL_NORMAL_MAP 0x8511
15055+#define GL_REFLECTION_MAP 0x8512
15056+#define GL_TEXTURE_CUBE_MAP 0x8513
15057+#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
15058+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
15059+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
15060+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
15061+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
15062+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
15063+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
15064+#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
15065+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
15066+#define GL_COMPRESSED_ALPHA 0x84E9
15067+#define GL_COMPRESSED_LUMINANCE 0x84EA
15068+#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
15069+#define GL_COMPRESSED_INTENSITY 0x84EC
15070+#define GL_COMPRESSED_RGB 0x84ED
15071+#define GL_COMPRESSED_RGBA 0x84EE
15072+#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
15073+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
15074+#define GL_TEXTURE_COMPRESSED 0x86A1
15075+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
15076+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
15077+#define GL_CLAMP_TO_BORDER 0x812D
15078+#define GL_COMBINE 0x8570
15079+#define GL_COMBINE_RGB 0x8571
15080+#define GL_COMBINE_ALPHA 0x8572
15081+#define GL_SOURCE0_RGB 0x8580
15082+#define GL_SOURCE1_RGB 0x8581
15083+#define GL_SOURCE2_RGB 0x8582
15084+#define GL_SOURCE0_ALPHA 0x8588
15085+#define GL_SOURCE1_ALPHA 0x8589
15086+#define GL_SOURCE2_ALPHA 0x858A
15087+#define GL_OPERAND0_RGB 0x8590
15088+#define GL_OPERAND1_RGB 0x8591
15089+#define GL_OPERAND2_RGB 0x8592
15090+#define GL_OPERAND0_ALPHA 0x8598
15091+#define GL_OPERAND1_ALPHA 0x8599
15092+#define GL_OPERAND2_ALPHA 0x859A
15093+#define GL_RGB_SCALE 0x8573
15094+#define GL_ADD_SIGNED 0x8574
15095+#define GL_INTERPOLATE 0x8575
15096+#define GL_SUBTRACT 0x84E7
15097+#define GL_CONSTANT 0x8576
15098+#define GL_PRIMARY_COLOR 0x8577
15099+#define GL_PREVIOUS 0x8578
15100+#define GL_DOT3_RGB 0x86AE
15101+#define GL_DOT3_RGBA 0x86AF
15102+#endif
15103+
15104+#ifndef GL_VERSION_1_4
15105+#define GL_BLEND_DST_RGB 0x80C8
15106+#define GL_BLEND_SRC_RGB 0x80C9
15107+#define GL_BLEND_DST_ALPHA 0x80CA
15108+#define GL_BLEND_SRC_ALPHA 0x80CB
15109+#define GL_POINT_SIZE_MIN 0x8126
15110+#define GL_POINT_SIZE_MAX 0x8127
15111+#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
15112+#define GL_POINT_DISTANCE_ATTENUATION 0x8129
15113+#define GL_GENERATE_MIPMAP 0x8191
15114+#define GL_GENERATE_MIPMAP_HINT 0x8192
15115+#define GL_DEPTH_COMPONENT16 0x81A5
15116+#define GL_DEPTH_COMPONENT24 0x81A6
15117+#define GL_DEPTH_COMPONENT32 0x81A7
15118+#define GL_MIRRORED_REPEAT 0x8370
15119+#define GL_FOG_COORDINATE_SOURCE 0x8450
15120+#define GL_FOG_COORDINATE 0x8451
15121+#define GL_FRAGMENT_DEPTH 0x8452
15122+#define GL_CURRENT_FOG_COORDINATE 0x8453
15123+#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454
15124+#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455
15125+#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456
15126+#define GL_FOG_COORDINATE_ARRAY 0x8457
15127+#define GL_COLOR_SUM 0x8458
15128+#define GL_CURRENT_SECONDARY_COLOR 0x8459
15129+#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A
15130+#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B
15131+#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C
15132+#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D
15133+#define GL_SECONDARY_COLOR_ARRAY 0x845E
15134+#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
15135+#define GL_TEXTURE_FILTER_CONTROL 0x8500
15136+#define GL_TEXTURE_LOD_BIAS 0x8501
15137+#define GL_INCR_WRAP 0x8507
15138+#define GL_DECR_WRAP 0x8508
15139+#define GL_TEXTURE_DEPTH_SIZE 0x884A
15140+#define GL_DEPTH_TEXTURE_MODE 0x884B
15141+#define GL_TEXTURE_COMPARE_MODE 0x884C
15142+#define GL_TEXTURE_COMPARE_FUNC 0x884D
15143+#define GL_COMPARE_R_TO_TEXTURE 0x884E
15144+#endif
15145+
15146+#ifndef GL_VERSION_1_5
15147+#define GL_BUFFER_SIZE 0x8764
15148+#define GL_BUFFER_USAGE 0x8765
15149+#define GL_QUERY_COUNTER_BITS 0x8864
15150+#define GL_CURRENT_QUERY 0x8865
15151+#define GL_QUERY_RESULT 0x8866
15152+#define GL_QUERY_RESULT_AVAILABLE 0x8867
15153+#define GL_ARRAY_BUFFER 0x8892
15154+#define GL_ELEMENT_ARRAY_BUFFER 0x8893
15155+#define GL_ARRAY_BUFFER_BINDING 0x8894
15156+#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
15157+#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
15158+#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
15159+#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
15160+#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899
15161+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
15162+#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B
15163+#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C
15164+#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D
15165+#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E
15166+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
15167+#define GL_READ_ONLY 0x88B8
15168+#define GL_WRITE_ONLY 0x88B9
15169+#define GL_READ_WRITE 0x88BA
15170+#define GL_BUFFER_ACCESS 0x88BB
15171+#define GL_BUFFER_MAPPED 0x88BC
15172+#define GL_BUFFER_MAP_POINTER 0x88BD
15173+#define GL_STREAM_DRAW 0x88E0
15174+#define GL_STREAM_READ 0x88E1
15175+#define GL_STREAM_COPY 0x88E2
15176+#define GL_STATIC_DRAW 0x88E4
15177+#define GL_STATIC_READ 0x88E5
15178+#define GL_STATIC_COPY 0x88E6
15179+#define GL_DYNAMIC_DRAW 0x88E8
15180+#define GL_DYNAMIC_READ 0x88E9
15181+#define GL_DYNAMIC_COPY 0x88EA
15182+#define GL_SAMPLES_PASSED 0x8914
15183+#define GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE
15184+#define GL_FOG_COORD GL_FOG_COORDINATE
15185+#define GL_CURRENT_FOG_COORD GL_CURRENT_FOG_COORDINATE
15186+#define GL_FOG_COORD_ARRAY_TYPE GL_FOG_COORDINATE_ARRAY_TYPE
15187+#define GL_FOG_COORD_ARRAY_STRIDE GL_FOG_COORDINATE_ARRAY_STRIDE
15188+#define GL_FOG_COORD_ARRAY_POINTER GL_FOG_COORDINATE_ARRAY_POINTER
15189+#define GL_FOG_COORD_ARRAY GL_FOG_COORDINATE_ARRAY
15190+#define GL_FOG_COORD_ARRAY_BUFFER_BINDING GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING
15191+#define GL_SRC0_RGB GL_SOURCE0_RGB
15192+#define GL_SRC1_RGB GL_SOURCE1_RGB
15193+#define GL_SRC2_RGB GL_SOURCE2_RGB
15194+#define GL_SRC0_ALPHA GL_SOURCE0_ALPHA
15195+#define GL_SRC1_ALPHA GL_SOURCE1_ALPHA
15196+#define GL_SRC2_ALPHA GL_SOURCE2_ALPHA
15197+#endif
15198+
15199+#ifndef GL_VERSION_2_0
15200+#define GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION
15201+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
15202+#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
15203+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
15204+#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
15205+#define GL_CURRENT_VERTEX_ATTRIB 0x8626
15206+#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
15207+#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643
15208+#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
15209+#define GL_STENCIL_BACK_FUNC 0x8800
15210+#define GL_STENCIL_BACK_FAIL 0x8801
15211+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
15212+#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
15213+#define GL_MAX_DRAW_BUFFERS 0x8824
15214+#define GL_DRAW_BUFFER0 0x8825
15215+#define GL_DRAW_BUFFER1 0x8826
15216+#define GL_DRAW_BUFFER2 0x8827
15217+#define GL_DRAW_BUFFER3 0x8828
15218+#define GL_DRAW_BUFFER4 0x8829
15219+#define GL_DRAW_BUFFER5 0x882A
15220+#define GL_DRAW_BUFFER6 0x882B
15221+#define GL_DRAW_BUFFER7 0x882C
15222+#define GL_DRAW_BUFFER8 0x882D
15223+#define GL_DRAW_BUFFER9 0x882E
15224+#define GL_DRAW_BUFFER10 0x882F
15225+#define GL_DRAW_BUFFER11 0x8830
15226+#define GL_DRAW_BUFFER12 0x8831
15227+#define GL_DRAW_BUFFER13 0x8832
15228+#define GL_DRAW_BUFFER14 0x8833
15229+#define GL_DRAW_BUFFER15 0x8834
15230+#define GL_BLEND_EQUATION_ALPHA 0x883D
15231+#define GL_POINT_SPRITE 0x8861
15232+#define GL_COORD_REPLACE 0x8862
15233+#define GL_MAX_VERTEX_ATTRIBS 0x8869
15234+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
15235+#define GL_MAX_TEXTURE_COORDS 0x8871
15236+#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
15237+#define GL_FRAGMENT_SHADER 0x8B30
15238+#define GL_VERTEX_SHADER 0x8B31
15239+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
15240+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
15241+#define GL_MAX_VARYING_FLOATS 0x8B4B
15242+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
15243+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
15244+#define GL_SHADER_TYPE 0x8B4F
15245+#define GL_FLOAT_VEC2 0x8B50
15246+#define GL_FLOAT_VEC3 0x8B51
15247+#define GL_FLOAT_VEC4 0x8B52
15248+#define GL_INT_VEC2 0x8B53
15249+#define GL_INT_VEC3 0x8B54
15250+#define GL_INT_VEC4 0x8B55
15251+#define GL_BOOL 0x8B56
15252+#define GL_BOOL_VEC2 0x8B57
15253+#define GL_BOOL_VEC3 0x8B58
15254+#define GL_BOOL_VEC4 0x8B59
15255+#define GL_FLOAT_MAT2 0x8B5A
15256+#define GL_FLOAT_MAT3 0x8B5B
15257+#define GL_FLOAT_MAT4 0x8B5C
15258+#define GL_SAMPLER_1D 0x8B5D
15259+#define GL_SAMPLER_2D 0x8B5E
15260+#define GL_SAMPLER_3D 0x8B5F
15261+#define GL_SAMPLER_CUBE 0x8B60
15262+#define GL_SAMPLER_1D_SHADOW 0x8B61
15263+#define GL_SAMPLER_2D_SHADOW 0x8B62
15264+#define GL_DELETE_STATUS 0x8B80
15265+#define GL_COMPILE_STATUS 0x8B81
15266+#define GL_LINK_STATUS 0x8B82
15267+#define GL_VALIDATE_STATUS 0x8B83
15268+#define GL_INFO_LOG_LENGTH 0x8B84
15269+#define GL_ATTACHED_SHADERS 0x8B85
15270+#define GL_ACTIVE_UNIFORMS 0x8B86
15271+#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
15272+#define GL_SHADER_SOURCE_LENGTH 0x8B88
15273+#define GL_ACTIVE_ATTRIBUTES 0x8B89
15274+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
15275+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
15276+#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
15277+#define GL_CURRENT_PROGRAM 0x8B8D
15278+#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
15279+#define GL_LOWER_LEFT 0x8CA1
15280+#define GL_UPPER_LEFT 0x8CA2
15281+#define GL_STENCIL_BACK_REF 0x8CA3
15282+#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
15283+#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
15284+#endif
15285+
15286+#ifndef GL_VERSION_2_1
15287+#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F
15288+#define GL_PIXEL_PACK_BUFFER 0x88EB
15289+#define GL_PIXEL_UNPACK_BUFFER 0x88EC
15290+#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
15291+#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
15292+#define GL_FLOAT_MAT2x3 0x8B65
15293+#define GL_FLOAT_MAT2x4 0x8B66
15294+#define GL_FLOAT_MAT3x2 0x8B67
15295+#define GL_FLOAT_MAT3x4 0x8B68
15296+#define GL_FLOAT_MAT4x2 0x8B69
15297+#define GL_FLOAT_MAT4x3 0x8B6A
15298+#define GL_SRGB 0x8C40
15299+#define GL_SRGB8 0x8C41
15300+#define GL_SRGB_ALPHA 0x8C42
15301+#define GL_SRGB8_ALPHA8 0x8C43
15302+#define GL_SLUMINANCE_ALPHA 0x8C44
15303+#define GL_SLUMINANCE8_ALPHA8 0x8C45
15304+#define GL_SLUMINANCE 0x8C46
15305+#define GL_SLUMINANCE8 0x8C47
15306+#define GL_COMPRESSED_SRGB 0x8C48
15307+#define GL_COMPRESSED_SRGB_ALPHA 0x8C49
15308+#define GL_COMPRESSED_SLUMINANCE 0x8C4A
15309+#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B
15310+#endif
15311+
15312+#ifndef GL_ARB_multitexture
15313+#define GL_TEXTURE0_ARB 0x84C0
15314+#define GL_TEXTURE1_ARB 0x84C1
15315+#define GL_TEXTURE2_ARB 0x84C2
15316+#define GL_TEXTURE3_ARB 0x84C3
15317+#define GL_TEXTURE4_ARB 0x84C4
15318+#define GL_TEXTURE5_ARB 0x84C5
15319+#define GL_TEXTURE6_ARB 0x84C6
15320+#define GL_TEXTURE7_ARB 0x84C7
15321+#define GL_TEXTURE8_ARB 0x84C8
15322+#define GL_TEXTURE9_ARB 0x84C9
15323+#define GL_TEXTURE10_ARB 0x84CA
15324+#define GL_TEXTURE11_ARB 0x84CB
15325+#define GL_TEXTURE12_ARB 0x84CC
15326+#define GL_TEXTURE13_ARB 0x84CD
15327+#define GL_TEXTURE14_ARB 0x84CE
15328+#define GL_TEXTURE15_ARB 0x84CF
15329+#define GL_TEXTURE16_ARB 0x84D0
15330+#define GL_TEXTURE17_ARB 0x84D1
15331+#define GL_TEXTURE18_ARB 0x84D2
15332+#define GL_TEXTURE19_ARB 0x84D3
15333+#define GL_TEXTURE20_ARB 0x84D4
15334+#define GL_TEXTURE21_ARB 0x84D5
15335+#define GL_TEXTURE22_ARB 0x84D6
15336+#define GL_TEXTURE23_ARB 0x84D7
15337+#define GL_TEXTURE24_ARB 0x84D8
15338+#define GL_TEXTURE25_ARB 0x84D9
15339+#define GL_TEXTURE26_ARB 0x84DA
15340+#define GL_TEXTURE27_ARB 0x84DB
15341+#define GL_TEXTURE28_ARB 0x84DC
15342+#define GL_TEXTURE29_ARB 0x84DD
15343+#define GL_TEXTURE30_ARB 0x84DE
15344+#define GL_TEXTURE31_ARB 0x84DF
15345+#define GL_ACTIVE_TEXTURE_ARB 0x84E0
15346+#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
15347+#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
15348+#endif
15349+
15350+#ifndef GL_ARB_transpose_matrix
15351+#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3
15352+#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4
15353+#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5
15354+#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6
15355+#endif
15356+
15357+#ifndef GL_ARB_multisample
15358+#define GL_MULTISAMPLE_ARB 0x809D
15359+#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E
15360+#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F
15361+#define GL_SAMPLE_COVERAGE_ARB 0x80A0
15362+#define GL_SAMPLE_BUFFERS_ARB 0x80A8
15363+#define GL_SAMPLES_ARB 0x80A9
15364+#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA
15365+#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB
15366+#define GL_MULTISAMPLE_BIT_ARB 0x20000000
15367+#endif
15368+
15369+#ifndef GL_ARB_texture_env_add
15370+#endif
15371+
15372+#ifndef GL_ARB_texture_cube_map
15373+#define GL_NORMAL_MAP_ARB 0x8511
15374+#define GL_REFLECTION_MAP_ARB 0x8512
15375+#define GL_TEXTURE_CUBE_MAP_ARB 0x8513
15376+#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514
15377+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515
15378+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516
15379+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517
15380+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518
15381+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519
15382+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A
15383+#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B
15384+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C
15385+#endif
15386+
15387+#ifndef GL_ARB_texture_compression
15388+#define GL_COMPRESSED_ALPHA_ARB 0x84E9
15389+#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA
15390+#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB
15391+#define GL_COMPRESSED_INTENSITY_ARB 0x84EC
15392+#define GL_COMPRESSED_RGB_ARB 0x84ED
15393+#define GL_COMPRESSED_RGBA_ARB 0x84EE
15394+#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF
15395+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
15396+#define GL_TEXTURE_COMPRESSED_ARB 0x86A1
15397+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
15398+#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
15399+#endif
15400+
15401+#ifndef GL_ARB_texture_border_clamp
15402+#define GL_CLAMP_TO_BORDER_ARB 0x812D
15403+#endif
15404+
15405+#ifndef GL_ARB_point_parameters
15406+#define GL_POINT_SIZE_MIN_ARB 0x8126
15407+#define GL_POINT_SIZE_MAX_ARB 0x8127
15408+#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128
15409+#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129
15410+#endif
15411+
15412+#ifndef GL_ARB_vertex_blend
15413+#define GL_MAX_VERTEX_UNITS_ARB 0x86A4
15414+#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5
15415+#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6
15416+#define GL_VERTEX_BLEND_ARB 0x86A7
15417+#define GL_CURRENT_WEIGHT_ARB 0x86A8
15418+#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9
15419+#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA
15420+#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB
15421+#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC
15422+#define GL_WEIGHT_ARRAY_ARB 0x86AD
15423+#define GL_MODELVIEW0_ARB 0x1700
15424+#define GL_MODELVIEW1_ARB 0x850A
15425+#define GL_MODELVIEW2_ARB 0x8722
15426+#define GL_MODELVIEW3_ARB 0x8723
15427+#define GL_MODELVIEW4_ARB 0x8724
15428+#define GL_MODELVIEW5_ARB 0x8725
15429+#define GL_MODELVIEW6_ARB 0x8726
15430+#define GL_MODELVIEW7_ARB 0x8727
15431+#define GL_MODELVIEW8_ARB 0x8728
15432+#define GL_MODELVIEW9_ARB 0x8729
15433+#define GL_MODELVIEW10_ARB 0x872A
15434+#define GL_MODELVIEW11_ARB 0x872B
15435+#define GL_MODELVIEW12_ARB 0x872C
15436+#define GL_MODELVIEW13_ARB 0x872D
15437+#define GL_MODELVIEW14_ARB 0x872E
15438+#define GL_MODELVIEW15_ARB 0x872F
15439+#define GL_MODELVIEW16_ARB 0x8730
15440+#define GL_MODELVIEW17_ARB 0x8731
15441+#define GL_MODELVIEW18_ARB 0x8732
15442+#define GL_MODELVIEW19_ARB 0x8733
15443+#define GL_MODELVIEW20_ARB 0x8734
15444+#define GL_MODELVIEW21_ARB 0x8735
15445+#define GL_MODELVIEW22_ARB 0x8736
15446+#define GL_MODELVIEW23_ARB 0x8737
15447+#define GL_MODELVIEW24_ARB 0x8738
15448+#define GL_MODELVIEW25_ARB 0x8739
15449+#define GL_MODELVIEW26_ARB 0x873A
15450+#define GL_MODELVIEW27_ARB 0x873B
15451+#define GL_MODELVIEW28_ARB 0x873C
15452+#define GL_MODELVIEW29_ARB 0x873D
15453+#define GL_MODELVIEW30_ARB 0x873E
15454+#define GL_MODELVIEW31_ARB 0x873F
15455+#endif
15456+
15457+#ifndef GL_ARB_matrix_palette
15458+#define GL_MATRIX_PALETTE_ARB 0x8840
15459+#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841
15460+#define GL_MAX_PALETTE_MATRICES_ARB 0x8842
15461+#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843
15462+#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844
15463+#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845
15464+#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846
15465+#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847
15466+#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848
15467+#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849
15468+#endif
15469+
15470+#ifndef GL_ARB_texture_env_combine
15471+#define GL_COMBINE_ARB 0x8570
15472+#define GL_COMBINE_RGB_ARB 0x8571
15473+#define GL_COMBINE_ALPHA_ARB 0x8572
15474+#define GL_SOURCE0_RGB_ARB 0x8580
15475+#define GL_SOURCE1_RGB_ARB 0x8581
15476+#define GL_SOURCE2_RGB_ARB 0x8582
15477+#define GL_SOURCE0_ALPHA_ARB 0x8588
15478+#define GL_SOURCE1_ALPHA_ARB 0x8589
15479+#define GL_SOURCE2_ALPHA_ARB 0x858A
15480+#define GL_OPERAND0_RGB_ARB 0x8590
15481+#define GL_OPERAND1_RGB_ARB 0x8591
15482+#define GL_OPERAND2_RGB_ARB 0x8592
15483+#define GL_OPERAND0_ALPHA_ARB 0x8598
15484+#define GL_OPERAND1_ALPHA_ARB 0x8599
15485+#define GL_OPERAND2_ALPHA_ARB 0x859A
15486+#define GL_RGB_SCALE_ARB 0x8573
15487+#define GL_ADD_SIGNED_ARB 0x8574
15488+#define GL_INTERPOLATE_ARB 0x8575
15489+#define GL_SUBTRACT_ARB 0x84E7
15490+#define GL_CONSTANT_ARB 0x8576
15491+#define GL_PRIMARY_COLOR_ARB 0x8577
15492+#define GL_PREVIOUS_ARB 0x8578
15493+#endif
15494+
15495+#ifndef GL_ARB_texture_env_crossbar
15496+#endif
15497+
15498+#ifndef GL_ARB_texture_env_dot3
15499+#define GL_DOT3_RGB_ARB 0x86AE
15500+#define GL_DOT3_RGBA_ARB 0x86AF
15501+#endif
15502+
15503+#ifndef GL_ARB_texture_mirrored_repeat
15504+#define GL_MIRRORED_REPEAT_ARB 0x8370
15505+#endif
15506+
15507+#ifndef GL_ARB_depth_texture
15508+#define GL_DEPTH_COMPONENT16_ARB 0x81A5
15509+#define GL_DEPTH_COMPONENT24_ARB 0x81A6
15510+#define GL_DEPTH_COMPONENT32_ARB 0x81A7
15511+#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A
15512+#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B
15513+#endif
15514+
15515+#ifndef GL_ARB_shadow
15516+#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C
15517+#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D
15518+#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E
15519+#endif
15520+
15521+#ifndef GL_ARB_shadow_ambient
15522+#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF
15523+#endif
15524+
15525+#ifndef GL_ARB_window_pos
15526+#endif
15527+
15528+#ifndef GL_ARB_vertex_program
15529+#define GL_COLOR_SUM_ARB 0x8458
15530+#define GL_VERTEX_PROGRAM_ARB 0x8620
15531+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622
15532+#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623
15533+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624
15534+#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625
15535+#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626
15536+#define GL_PROGRAM_LENGTH_ARB 0x8627
15537+#define GL_PROGRAM_STRING_ARB 0x8628
15538+#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E
15539+#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F
15540+#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640
15541+#define GL_CURRENT_MATRIX_ARB 0x8641
15542+#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642
15543+#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643
15544+#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645
15545+#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B
15546+#define GL_PROGRAM_BINDING_ARB 0x8677
15547+#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869
15548+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A
15549+#define GL_PROGRAM_ERROR_STRING_ARB 0x8874
15550+#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875
15551+#define GL_PROGRAM_FORMAT_ARB 0x8876
15552+#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0
15553+#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1
15554+#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2
15555+#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3
15556+#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4
15557+#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5
15558+#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6
15559+#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7
15560+#define GL_PROGRAM_PARAMETERS_ARB 0x88A8
15561+#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9
15562+#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA
15563+#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB
15564+#define GL_PROGRAM_ATTRIBS_ARB 0x88AC
15565+#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD
15566+#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE
15567+#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF
15568+#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0
15569+#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1
15570+#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2
15571+#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3
15572+#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4
15573+#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5
15574+#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6
15575+#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7
15576+#define GL_MATRIX0_ARB 0x88C0
15577+#define GL_MATRIX1_ARB 0x88C1
15578+#define GL_MATRIX2_ARB 0x88C2
15579+#define GL_MATRIX3_ARB 0x88C3
15580+#define GL_MATRIX4_ARB 0x88C4
15581+#define GL_MATRIX5_ARB 0x88C5
15582+#define GL_MATRIX6_ARB 0x88C6
15583+#define GL_MATRIX7_ARB 0x88C7
15584+#define GL_MATRIX8_ARB 0x88C8
15585+#define GL_MATRIX9_ARB 0x88C9
15586+#define GL_MATRIX10_ARB 0x88CA
15587+#define GL_MATRIX11_ARB 0x88CB
15588+#define GL_MATRIX12_ARB 0x88CC
15589+#define GL_MATRIX13_ARB 0x88CD
15590+#define GL_MATRIX14_ARB 0x88CE
15591+#define GL_MATRIX15_ARB 0x88CF
15592+#define GL_MATRIX16_ARB 0x88D0
15593+#define GL_MATRIX17_ARB 0x88D1
15594+#define GL_MATRIX18_ARB 0x88D2
15595+#define GL_MATRIX19_ARB 0x88D3
15596+#define GL_MATRIX20_ARB 0x88D4
15597+#define GL_MATRIX21_ARB 0x88D5
15598+#define GL_MATRIX22_ARB 0x88D6
15599+#define GL_MATRIX23_ARB 0x88D7
15600+#define GL_MATRIX24_ARB 0x88D8
15601+#define GL_MATRIX25_ARB 0x88D9
15602+#define GL_MATRIX26_ARB 0x88DA
15603+#define GL_MATRIX27_ARB 0x88DB
15604+#define GL_MATRIX28_ARB 0x88DC
15605+#define GL_MATRIX29_ARB 0x88DD
15606+#define GL_MATRIX30_ARB 0x88DE
15607+#define GL_MATRIX31_ARB 0x88DF
15608+#endif
15609+
15610+#ifndef GL_ARB_fragment_program
15611+#define GL_FRAGMENT_PROGRAM_ARB 0x8804
15612+#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805
15613+#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806
15614+#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807
15615+#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808
15616+#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809
15617+#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A
15618+#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B
15619+#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C
15620+#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D
15621+#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E
15622+#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F
15623+#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810
15624+#define GL_MAX_TEXTURE_COORDS_ARB 0x8871
15625+#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872
15626+#endif
15627+
15628+#ifndef GL_ARB_vertex_buffer_object
15629+#define GL_BUFFER_SIZE_ARB 0x8764
15630+#define GL_BUFFER_USAGE_ARB 0x8765
15631+#define GL_ARRAY_BUFFER_ARB 0x8892
15632+#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893
15633+#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894
15634+#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895
15635+#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896
15636+#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897
15637+#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898
15638+#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899
15639+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A
15640+#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B
15641+#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C
15642+#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D
15643+#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E
15644+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F
15645+#define GL_READ_ONLY_ARB 0x88B8
15646+#define GL_WRITE_ONLY_ARB 0x88B9
15647+#define GL_READ_WRITE_ARB 0x88BA
15648+#define GL_BUFFER_ACCESS_ARB 0x88BB
15649+#define GL_BUFFER_MAPPED_ARB 0x88BC
15650+#define GL_BUFFER_MAP_POINTER_ARB 0x88BD
15651+#define GL_STREAM_DRAW_ARB 0x88E0
15652+#define GL_STREAM_READ_ARB 0x88E1
15653+#define GL_STREAM_COPY_ARB 0x88E2
15654+#define GL_STATIC_DRAW_ARB 0x88E4
15655+#define GL_STATIC_READ_ARB 0x88E5
15656+#define GL_STATIC_COPY_ARB 0x88E6
15657+#define GL_DYNAMIC_DRAW_ARB 0x88E8
15658+#define GL_DYNAMIC_READ_ARB 0x88E9
15659+#define GL_DYNAMIC_COPY_ARB 0x88EA
15660+#endif
15661+
15662+#ifndef GL_ARB_occlusion_query
15663+#define GL_QUERY_COUNTER_BITS_ARB 0x8864
15664+#define GL_CURRENT_QUERY_ARB 0x8865
15665+#define GL_QUERY_RESULT_ARB 0x8866
15666+#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867
15667+#define GL_SAMPLES_PASSED_ARB 0x8914
15668+#endif
15669+
15670+#ifndef GL_ARB_shader_objects
15671+#define GL_PROGRAM_OBJECT_ARB 0x8B40
15672+#define GL_SHADER_OBJECT_ARB 0x8B48
15673+#define GL_OBJECT_TYPE_ARB 0x8B4E
15674+#define GL_OBJECT_SUBTYPE_ARB 0x8B4F
15675+#define GL_FLOAT_VEC2_ARB 0x8B50
15676+#define GL_FLOAT_VEC3_ARB 0x8B51
15677+#define GL_FLOAT_VEC4_ARB 0x8B52
15678+#define GL_INT_VEC2_ARB 0x8B53
15679+#define GL_INT_VEC3_ARB 0x8B54
15680+#define GL_INT_VEC4_ARB 0x8B55
15681+#define GL_BOOL_ARB 0x8B56
15682+#define GL_BOOL_VEC2_ARB 0x8B57
15683+#define GL_BOOL_VEC3_ARB 0x8B58
15684+#define GL_BOOL_VEC4_ARB 0x8B59
15685+#define GL_FLOAT_MAT2_ARB 0x8B5A
15686+#define GL_FLOAT_MAT3_ARB 0x8B5B
15687+#define GL_FLOAT_MAT4_ARB 0x8B5C
15688+#define GL_SAMPLER_1D_ARB 0x8B5D
15689+#define GL_SAMPLER_2D_ARB 0x8B5E
15690+#define GL_SAMPLER_3D_ARB 0x8B5F
15691+#define GL_SAMPLER_CUBE_ARB 0x8B60
15692+#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61
15693+#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62
15694+#define GL_SAMPLER_2D_RECT_ARB 0x8B63
15695+#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64
15696+#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80
15697+#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81
15698+#define GL_OBJECT_LINK_STATUS_ARB 0x8B82
15699+#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83
15700+#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84
15701+#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85
15702+#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86
15703+#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87
15704+#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88
15705+#endif
15706+
15707+#ifndef GL_ARB_vertex_shader
15708+#define GL_VERTEX_SHADER_ARB 0x8B31
15709+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A
15710+#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B
15711+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C
15712+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D
15713+#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89
15714+#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A
15715+#endif
15716+
15717+#ifndef GL_ARB_fragment_shader
15718+#define GL_FRAGMENT_SHADER_ARB 0x8B30
15719+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49
15720+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B
15721+#endif
15722+
15723+#ifndef GL_ARB_shading_language_100
15724+#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C
15725+#endif
15726+
15727+#ifndef GL_ARB_texture_non_power_of_two
15728+#endif
15729+
15730+#ifndef GL_ARB_point_sprite
15731+#define GL_POINT_SPRITE_ARB 0x8861
15732+#define GL_COORD_REPLACE_ARB 0x8862
15733+#endif
15734+
15735+#ifndef GL_ARB_fragment_program_shadow
15736+#endif
15737+
15738+#ifndef GL_ARB_draw_buffers
15739+#define GL_MAX_DRAW_BUFFERS_ARB 0x8824
15740+#define GL_DRAW_BUFFER0_ARB 0x8825
15741+#define GL_DRAW_BUFFER1_ARB 0x8826
15742+#define GL_DRAW_BUFFER2_ARB 0x8827
15743+#define GL_DRAW_BUFFER3_ARB 0x8828
15744+#define GL_DRAW_BUFFER4_ARB 0x8829
15745+#define GL_DRAW_BUFFER5_ARB 0x882A
15746+#define GL_DRAW_BUFFER6_ARB 0x882B
15747+#define GL_DRAW_BUFFER7_ARB 0x882C
15748+#define GL_DRAW_BUFFER8_ARB 0x882D
15749+#define GL_DRAW_BUFFER9_ARB 0x882E
15750+#define GL_DRAW_BUFFER10_ARB 0x882F
15751+#define GL_DRAW_BUFFER11_ARB 0x8830
15752+#define GL_DRAW_BUFFER12_ARB 0x8831
15753+#define GL_DRAW_BUFFER13_ARB 0x8832
15754+#define GL_DRAW_BUFFER14_ARB 0x8833
15755+#define GL_DRAW_BUFFER15_ARB 0x8834
15756+#endif
15757+
15758+#ifndef GL_ARB_texture_rectangle
15759+#define GL_TEXTURE_RECTANGLE_ARB 0x84F5
15760+#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6
15761+#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7
15762+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
15763+#endif
15764+
15765+#ifndef GL_ARB_color_buffer_float
15766+#define GL_RGBA_FLOAT_MODE_ARB 0x8820
15767+#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A
15768+#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B
15769+#define GL_CLAMP_READ_COLOR_ARB 0x891C
15770+#define GL_FIXED_ONLY_ARB 0x891D
15771+#endif
15772+
15773+#ifndef GL_ARB_half_float_pixel
15774+#define GL_HALF_FLOAT_ARB 0x140B
15775+#endif
15776+
15777+#ifndef GL_ARB_texture_float
15778+#define GL_TEXTURE_RED_TYPE_ARB 0x8C10
15779+#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11
15780+#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12
15781+#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13
15782+#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14
15783+#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15
15784+#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16
15785+#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17
15786+#define GL_RGBA32F_ARB 0x8814
15787+#define GL_RGB32F_ARB 0x8815
15788+#define GL_ALPHA32F_ARB 0x8816
15789+#define GL_INTENSITY32F_ARB 0x8817
15790+#define GL_LUMINANCE32F_ARB 0x8818
15791+#define GL_LUMINANCE_ALPHA32F_ARB 0x8819
15792+#define GL_RGBA16F_ARB 0x881A
15793+#define GL_RGB16F_ARB 0x881B
15794+#define GL_ALPHA16F_ARB 0x881C
15795+#define GL_INTENSITY16F_ARB 0x881D
15796+#define GL_LUMINANCE16F_ARB 0x881E
15797+#define GL_LUMINANCE_ALPHA16F_ARB 0x881F
15798+#endif
15799+
15800+#ifndef GL_ARB_pixel_buffer_object
15801+#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB
15802+#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC
15803+#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED
15804+#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
15805+#endif
15806+
15807+#ifndef GL_EXT_abgr
15808+#define GL_ABGR_EXT 0x8000
15809+#endif
15810+
15811+#ifndef GL_EXT_blend_color
15812+#define GL_CONSTANT_COLOR_EXT 0x8001
15813+#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002
15814+#define GL_CONSTANT_ALPHA_EXT 0x8003
15815+#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004
15816+#define GL_BLEND_COLOR_EXT 0x8005
15817+#endif
15818+
15819+#ifndef GL_EXT_polygon_offset
15820+#define GL_POLYGON_OFFSET_EXT 0x8037
15821+#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038
15822+#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039
15823+#endif
15824+
15825+#ifndef GL_EXT_texture
15826+#define GL_ALPHA4_EXT 0x803B
15827+#define GL_ALPHA8_EXT 0x803C
15828+#define GL_ALPHA12_EXT 0x803D
15829+#define GL_ALPHA16_EXT 0x803E
15830+#define GL_LUMINANCE4_EXT 0x803F
15831+#define GL_LUMINANCE8_EXT 0x8040
15832+#define GL_LUMINANCE12_EXT 0x8041
15833+#define GL_LUMINANCE16_EXT 0x8042
15834+#define GL_LUMINANCE4_ALPHA4_EXT 0x8043
15835+#define GL_LUMINANCE6_ALPHA2_EXT 0x8044
15836+#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
15837+#define GL_LUMINANCE12_ALPHA4_EXT 0x8046
15838+#define GL_LUMINANCE12_ALPHA12_EXT 0x8047
15839+#define GL_LUMINANCE16_ALPHA16_EXT 0x8048
15840+#define GL_INTENSITY_EXT 0x8049
15841+#define GL_INTENSITY4_EXT 0x804A
15842+#define GL_INTENSITY8_EXT 0x804B
15843+#define GL_INTENSITY12_EXT 0x804C
15844+#define GL_INTENSITY16_EXT 0x804D
15845+#define GL_RGB2_EXT 0x804E
15846+#define GL_RGB4_EXT 0x804F
15847+#define GL_RGB5_EXT 0x8050
15848+#define GL_RGB8_EXT 0x8051
15849+#define GL_RGB10_EXT 0x8052
15850+#define GL_RGB12_EXT 0x8053
15851+#define GL_RGB16_EXT 0x8054
15852+#define GL_RGBA2_EXT 0x8055
15853+#define GL_RGBA4_EXT 0x8056
15854+#define GL_RGB5_A1_EXT 0x8057
15855+#define GL_RGBA8_EXT 0x8058
15856+#define GL_RGB10_A2_EXT 0x8059
15857+#define GL_RGBA12_EXT 0x805A
15858+#define GL_RGBA16_EXT 0x805B
15859+#define GL_TEXTURE_RED_SIZE_EXT 0x805C
15860+#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D
15861+#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E
15862+#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F
15863+#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060
15864+#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061
15865+#define GL_REPLACE_EXT 0x8062
15866+#define GL_PROXY_TEXTURE_1D_EXT 0x8063
15867+#define GL_PROXY_TEXTURE_2D_EXT 0x8064
15868+#define GL_TEXTURE_TOO_LARGE_EXT 0x8065
15869+#endif
15870+
15871+#ifndef GL_EXT_texture3D
15872+#define GL_PACK_SKIP_IMAGES_EXT 0x806B
15873+#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C
15874+#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D
15875+#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E
15876+#define GL_TEXTURE_3D_EXT 0x806F
15877+#define GL_PROXY_TEXTURE_3D_EXT 0x8070
15878+#define GL_TEXTURE_DEPTH_EXT 0x8071
15879+#define GL_TEXTURE_WRAP_R_EXT 0x8072
15880+#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073
15881+#endif
15882+
15883+#ifndef GL_SGIS_texture_filter4
15884+#define GL_FILTER4_SGIS 0x8146
15885+#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147
15886+#endif
15887+
15888+#ifndef GL_EXT_subtexture
15889+#endif
15890+
15891+#ifndef GL_EXT_copy_texture
15892+#endif
15893+
15894+#ifndef GL_EXT_histogram
15895+#define GL_HISTOGRAM_EXT 0x8024
15896+#define GL_PROXY_HISTOGRAM_EXT 0x8025
15897+#define GL_HISTOGRAM_WIDTH_EXT 0x8026
15898+#define GL_HISTOGRAM_FORMAT_EXT 0x8027
15899+#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028
15900+#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029
15901+#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A
15902+#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B
15903+#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C
15904+#define GL_HISTOGRAM_SINK_EXT 0x802D
15905+#define GL_MINMAX_EXT 0x802E
15906+#define GL_MINMAX_FORMAT_EXT 0x802F
15907+#define GL_MINMAX_SINK_EXT 0x8030
15908+#define GL_TABLE_TOO_LARGE_EXT 0x8031
15909+#endif
15910+
15911+#ifndef GL_EXT_convolution
15912+#define GL_CONVOLUTION_1D_EXT 0x8010
15913+#define GL_CONVOLUTION_2D_EXT 0x8011
15914+#define GL_SEPARABLE_2D_EXT 0x8012
15915+#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013
15916+#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014
15917+#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015
15918+#define GL_REDUCE_EXT 0x8016
15919+#define GL_CONVOLUTION_FORMAT_EXT 0x8017
15920+#define GL_CONVOLUTION_WIDTH_EXT 0x8018
15921+#define GL_CONVOLUTION_HEIGHT_EXT 0x8019
15922+#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A
15923+#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B
15924+#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C
15925+#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D
15926+#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E
15927+#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F
15928+#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020
15929+#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021
15930+#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022
15931+#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023
15932+#endif
15933+
15934+#ifndef GL_SGI_color_matrix
15935+#define GL_COLOR_MATRIX_SGI 0x80B1
15936+#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2
15937+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3
15938+#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4
15939+#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5
15940+#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6
15941+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7
15942+#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8
15943+#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9
15944+#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA
15945+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB
15946+#endif
15947+
15948+#ifndef GL_SGI_color_table
15949+#define GL_COLOR_TABLE_SGI 0x80D0
15950+#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1
15951+#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2
15952+#define GL_PROXY_COLOR_TABLE_SGI 0x80D3
15953+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4
15954+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5
15955+#define GL_COLOR_TABLE_SCALE_SGI 0x80D6
15956+#define GL_COLOR_TABLE_BIAS_SGI 0x80D7
15957+#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8
15958+#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9
15959+#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA
15960+#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB
15961+#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC
15962+#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD
15963+#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE
15964+#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF
15965+#endif
15966+
15967+#ifndef GL_SGIS_pixel_texture
15968+#define GL_PIXEL_TEXTURE_SGIS 0x8353
15969+#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354
15970+#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355
15971+#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356
15972+#endif
15973+
15974+#ifndef GL_SGIX_pixel_texture
15975+#define GL_PIXEL_TEX_GEN_SGIX 0x8139
15976+#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B
15977+#endif
15978+
15979+#ifndef GL_SGIS_texture4D
15980+#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130
15981+#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131
15982+#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132
15983+#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133
15984+#define GL_TEXTURE_4D_SGIS 0x8134
15985+#define GL_PROXY_TEXTURE_4D_SGIS 0x8135
15986+#define GL_TEXTURE_4DSIZE_SGIS 0x8136
15987+#define GL_TEXTURE_WRAP_Q_SGIS 0x8137
15988+#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138
15989+#define GL_TEXTURE_4D_BINDING_SGIS 0x814F
15990+#endif
15991+
15992+#ifndef GL_SGI_texture_color_table
15993+#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC
15994+#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD
15995+#endif
15996+
15997+#ifndef GL_EXT_cmyka
15998+#define GL_CMYK_EXT 0x800C
15999+#define GL_CMYKA_EXT 0x800D
16000+#define GL_PACK_CMYK_HINT_EXT 0x800E
16001+#define GL_UNPACK_CMYK_HINT_EXT 0x800F
16002+#endif
16003+
16004+#ifndef GL_EXT_texture_object
16005+#define GL_TEXTURE_PRIORITY_EXT 0x8066
16006+#define GL_TEXTURE_RESIDENT_EXT 0x8067
16007+#define GL_TEXTURE_1D_BINDING_EXT 0x8068
16008+#define GL_TEXTURE_2D_BINDING_EXT 0x8069
16009+#define GL_TEXTURE_3D_BINDING_EXT 0x806A
16010+#endif
16011+
16012+#ifndef GL_SGIS_detail_texture
16013+#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095
16014+#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096
16015+#define GL_LINEAR_DETAIL_SGIS 0x8097
16016+#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098
16017+#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099
16018+#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A
16019+#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B
16020+#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C
16021+#endif
16022+
16023+#ifndef GL_SGIS_sharpen_texture
16024+#define GL_LINEAR_SHARPEN_SGIS 0x80AD
16025+#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE
16026+#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF
16027+#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0
16028+#endif
16029+
16030+#ifndef GL_EXT_packed_pixels
16031+#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032
16032+#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033
16033+#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034
16034+#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035
16035+#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036
16036+#endif
16037+
16038+#ifndef GL_SGIS_texture_lod
16039+#define GL_TEXTURE_MIN_LOD_SGIS 0x813A
16040+#define GL_TEXTURE_MAX_LOD_SGIS 0x813B
16041+#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C
16042+#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D
16043+#endif
16044+
16045+#ifndef GL_SGIS_multisample
16046+#define GL_MULTISAMPLE_SGIS 0x809D
16047+#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E
16048+#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F
16049+#define GL_SAMPLE_MASK_SGIS 0x80A0
16050+#define GL_1PASS_SGIS 0x80A1
16051+#define GL_2PASS_0_SGIS 0x80A2
16052+#define GL_2PASS_1_SGIS 0x80A3
16053+#define GL_4PASS_0_SGIS 0x80A4
16054+#define GL_4PASS_1_SGIS 0x80A5
16055+#define GL_4PASS_2_SGIS 0x80A6
16056+#define GL_4PASS_3_SGIS 0x80A7
16057+#define GL_SAMPLE_BUFFERS_SGIS 0x80A8
16058+#define GL_SAMPLES_SGIS 0x80A9
16059+#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA
16060+#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB
16061+#define GL_SAMPLE_PATTERN_SGIS 0x80AC
16062+#endif
16063+
16064+#ifndef GL_EXT_rescale_normal
16065+#define GL_RESCALE_NORMAL_EXT 0x803A
16066+#endif
16067+
16068+#ifndef GL_EXT_vertex_array
16069+#define GL_VERTEX_ARRAY_EXT 0x8074
16070+#define GL_NORMAL_ARRAY_EXT 0x8075
16071+#define GL_COLOR_ARRAY_EXT 0x8076
16072+#define GL_INDEX_ARRAY_EXT 0x8077
16073+#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078
16074+#define GL_EDGE_FLAG_ARRAY_EXT 0x8079
16075+#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A
16076+#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B
16077+#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C
16078+#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D
16079+#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E
16080+#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F
16081+#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080
16082+#define GL_COLOR_ARRAY_SIZE_EXT 0x8081
16083+#define GL_COLOR_ARRAY_TYPE_EXT 0x8082
16084+#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083
16085+#define GL_COLOR_ARRAY_COUNT_EXT 0x8084
16086+#define GL_INDEX_ARRAY_TYPE_EXT 0x8085
16087+#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086
16088+#define GL_INDEX_ARRAY_COUNT_EXT 0x8087
16089+#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088
16090+#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089
16091+#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A
16092+#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B
16093+#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C
16094+#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D
16095+#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E
16096+#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F
16097+#define GL_COLOR_ARRAY_POINTER_EXT 0x8090
16098+#define GL_INDEX_ARRAY_POINTER_EXT 0x8091
16099+#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092
16100+#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093
16101+#endif
16102+
16103+#ifndef GL_EXT_misc_attribute
16104+#endif
16105+
16106+#ifndef GL_SGIS_generate_mipmap
16107+#define GL_GENERATE_MIPMAP_SGIS 0x8191
16108+#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192
16109+#endif
16110+
16111+#ifndef GL_SGIX_clipmap
16112+#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170
16113+#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171
16114+#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172
16115+#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173
16116+#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174
16117+#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175
16118+#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176
16119+#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177
16120+#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178
16121+#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D
16122+#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E
16123+#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F
16124+#endif
16125+
16126+#ifndef GL_SGIX_shadow
16127+#define GL_TEXTURE_COMPARE_SGIX 0x819A
16128+#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B
16129+#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C
16130+#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D
16131+#endif
16132+
16133+#ifndef GL_SGIS_texture_edge_clamp
16134+#define GL_CLAMP_TO_EDGE_SGIS 0x812F
16135+#endif
16136+
16137+#ifndef GL_SGIS_texture_border_clamp
16138+#define GL_CLAMP_TO_BORDER_SGIS 0x812D
16139+#endif
16140+
16141+#ifndef GL_EXT_blend_minmax
16142+#define GL_FUNC_ADD_EXT 0x8006
16143+#define GL_MIN_EXT 0x8007
16144+#define GL_MAX_EXT 0x8008
16145+#define GL_BLEND_EQUATION_EXT 0x8009
16146+#endif
16147+
16148+#ifndef GL_EXT_blend_subtract
16149+#define GL_FUNC_SUBTRACT_EXT 0x800A
16150+#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B
16151+#endif
16152+
16153+#ifndef GL_EXT_blend_logic_op
16154+#endif
16155+
16156+#ifndef GL_SGIX_interlace
16157+#define GL_INTERLACE_SGIX 0x8094
16158+#endif
16159+
16160+#ifndef GL_SGIX_pixel_tiles
16161+#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E
16162+#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F
16163+#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140
16164+#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141
16165+#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142
16166+#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143
16167+#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144
16168+#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145
16169+#endif
16170+
16171+#ifndef GL_SGIS_texture_select
16172+#define GL_DUAL_ALPHA4_SGIS 0x8110
16173+#define GL_DUAL_ALPHA8_SGIS 0x8111
16174+#define GL_DUAL_ALPHA12_SGIS 0x8112
16175+#define GL_DUAL_ALPHA16_SGIS 0x8113
16176+#define GL_DUAL_LUMINANCE4_SGIS 0x8114
16177+#define GL_DUAL_LUMINANCE8_SGIS 0x8115
16178+#define GL_DUAL_LUMINANCE12_SGIS 0x8116
16179+#define GL_DUAL_LUMINANCE16_SGIS 0x8117
16180+#define GL_DUAL_INTENSITY4_SGIS 0x8118
16181+#define GL_DUAL_INTENSITY8_SGIS 0x8119
16182+#define GL_DUAL_INTENSITY12_SGIS 0x811A
16183+#define GL_DUAL_INTENSITY16_SGIS 0x811B
16184+#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C
16185+#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D
16186+#define GL_QUAD_ALPHA4_SGIS 0x811E
16187+#define GL_QUAD_ALPHA8_SGIS 0x811F
16188+#define GL_QUAD_LUMINANCE4_SGIS 0x8120
16189+#define GL_QUAD_LUMINANCE8_SGIS 0x8121
16190+#define GL_QUAD_INTENSITY4_SGIS 0x8122
16191+#define GL_QUAD_INTENSITY8_SGIS 0x8123
16192+#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124
16193+#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125
16194+#endif
16195+
16196+#ifndef GL_SGIX_sprite
16197+#define GL_SPRITE_SGIX 0x8148
16198+#define GL_SPRITE_MODE_SGIX 0x8149
16199+#define GL_SPRITE_AXIS_SGIX 0x814A
16200+#define GL_SPRITE_TRANSLATION_SGIX 0x814B
16201+#define GL_SPRITE_AXIAL_SGIX 0x814C
16202+#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D
16203+#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E
16204+#endif
16205+
16206+#ifndef GL_SGIX_texture_multi_buffer
16207+#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E
16208+#endif
16209+
16210+#ifndef GL_EXT_point_parameters
16211+#define GL_POINT_SIZE_MIN_EXT 0x8126
16212+#define GL_POINT_SIZE_MAX_EXT 0x8127
16213+#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128
16214+#define GL_DISTANCE_ATTENUATION_EXT 0x8129
16215+#endif
16216+
16217+#ifndef GL_SGIS_point_parameters
16218+#define GL_POINT_SIZE_MIN_SGIS 0x8126
16219+#define GL_POINT_SIZE_MAX_SGIS 0x8127
16220+#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128
16221+#define GL_DISTANCE_ATTENUATION_SGIS 0x8129
16222+#endif
16223+
16224+#ifndef GL_SGIX_instruments
16225+#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180
16226+#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181
16227+#endif
16228+
16229+#ifndef GL_SGIX_texture_scale_bias
16230+#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179
16231+#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A
16232+#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B
16233+#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C
16234+#endif
16235+
16236+#ifndef GL_SGIX_framezoom
16237+#define GL_FRAMEZOOM_SGIX 0x818B
16238+#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C
16239+#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D
16240+#endif
16241+
16242+#ifndef GL_SGIX_tag_sample_buffer
16243+#endif
16244+
16245+#ifndef GL_FfdMaskSGIX
16246+#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001
16247+#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002
16248+#endif
16249+
16250+#ifndef GL_SGIX_polynomial_ffd
16251+#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194
16252+#define GL_TEXTURE_DEFORMATION_SGIX 0x8195
16253+#define GL_DEFORMATIONS_MASK_SGIX 0x8196
16254+#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197
16255+#endif
16256+
16257+#ifndef GL_SGIX_reference_plane
16258+#define GL_REFERENCE_PLANE_SGIX 0x817D
16259+#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E
16260+#endif
16261+
16262+#ifndef GL_SGIX_flush_raster
16263+#endif
16264+
16265+#ifndef GL_SGIX_depth_texture
16266+#define GL_DEPTH_COMPONENT16_SGIX 0x81A5
16267+#define GL_DEPTH_COMPONENT24_SGIX 0x81A6
16268+#define GL_DEPTH_COMPONENT32_SGIX 0x81A7
16269+#endif
16270+
16271+#ifndef GL_SGIS_fog_function
16272+#define GL_FOG_FUNC_SGIS 0x812A
16273+#define GL_FOG_FUNC_POINTS_SGIS 0x812B
16274+#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C
16275+#endif
16276+
16277+#ifndef GL_SGIX_fog_offset
16278+#define GL_FOG_OFFSET_SGIX 0x8198
16279+#define GL_FOG_OFFSET_VALUE_SGIX 0x8199
16280+#endif
16281+
16282+#ifndef GL_HP_image_transform
16283+#define GL_IMAGE_SCALE_X_HP 0x8155
16284+#define GL_IMAGE_SCALE_Y_HP 0x8156
16285+#define GL_IMAGE_TRANSLATE_X_HP 0x8157
16286+#define GL_IMAGE_TRANSLATE_Y_HP 0x8158
16287+#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159
16288+#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A
16289+#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B
16290+#define GL_IMAGE_MAG_FILTER_HP 0x815C
16291+#define GL_IMAGE_MIN_FILTER_HP 0x815D
16292+#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E
16293+#define GL_CUBIC_HP 0x815F
16294+#define GL_AVERAGE_HP 0x8160
16295+#define GL_IMAGE_TRANSFORM_2D_HP 0x8161
16296+#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162
16297+#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163
16298+#endif
16299+
16300+#ifndef GL_HP_convolution_border_modes
16301+#define GL_IGNORE_BORDER_HP 0x8150
16302+#define GL_CONSTANT_BORDER_HP 0x8151
16303+#define GL_REPLICATE_BORDER_HP 0x8153
16304+#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154
16305+#endif
16306+
16307+#ifndef GL_INGR_palette_buffer
16308+#endif
16309+
16310+#ifndef GL_SGIX_texture_add_env
16311+#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE
16312+#endif
16313+
16314+#ifndef GL_EXT_color_subtable
16315+#endif
16316+
16317+#ifndef GL_PGI_vertex_hints
16318+#define GL_VERTEX_DATA_HINT_PGI 0x1A22A
16319+#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B
16320+#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C
16321+#define GL_MAX_VERTEX_HINT_PGI 0x1A22D
16322+#define GL_COLOR3_BIT_PGI 0x00010000
16323+#define GL_COLOR4_BIT_PGI 0x00020000
16324+#define GL_EDGEFLAG_BIT_PGI 0x00040000
16325+#define GL_INDEX_BIT_PGI 0x00080000
16326+#define GL_MAT_AMBIENT_BIT_PGI 0x00100000
16327+#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000
16328+#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000
16329+#define GL_MAT_EMISSION_BIT_PGI 0x00800000
16330+#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000
16331+#define GL_MAT_SHININESS_BIT_PGI 0x02000000
16332+#define GL_MAT_SPECULAR_BIT_PGI 0x04000000
16333+#define GL_NORMAL_BIT_PGI 0x08000000
16334+#define GL_TEXCOORD1_BIT_PGI 0x10000000
16335+#define GL_TEXCOORD2_BIT_PGI 0x20000000
16336+#define GL_TEXCOORD3_BIT_PGI 0x40000000
16337+#define GL_TEXCOORD4_BIT_PGI 0x80000000
16338+#define GL_VERTEX23_BIT_PGI 0x00000004
16339+#define GL_VERTEX4_BIT_PGI 0x00000008
16340+#endif
16341+
16342+#ifndef GL_PGI_misc_hints
16343+#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8
16344+#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD
16345+#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE
16346+#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202
16347+#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203
16348+#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204
16349+#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C
16350+#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D
16351+#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E
16352+#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F
16353+#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210
16354+#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211
16355+#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216
16356+#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217
16357+#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218
16358+#define GL_FULL_STIPPLE_HINT_PGI 0x1A219
16359+#define GL_CLIP_NEAR_HINT_PGI 0x1A220
16360+#define GL_CLIP_FAR_HINT_PGI 0x1A221
16361+#define GL_WIDE_LINE_HINT_PGI 0x1A222
16362+#define GL_BACK_NORMALS_HINT_PGI 0x1A223
16363+#endif
16364+
16365+#ifndef GL_EXT_paletted_texture
16366+#define GL_COLOR_INDEX1_EXT 0x80E2
16367+#define GL_COLOR_INDEX2_EXT 0x80E3
16368+#define GL_COLOR_INDEX4_EXT 0x80E4
16369+#define GL_COLOR_INDEX8_EXT 0x80E5
16370+#define GL_COLOR_INDEX12_EXT 0x80E6
16371+#define GL_COLOR_INDEX16_EXT 0x80E7
16372+#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED
16373+#endif
16374+
16375+#ifndef GL_EXT_clip_volume_hint
16376+#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0
16377+#endif
16378+
16379+#ifndef GL_SGIX_list_priority
16380+#define GL_LIST_PRIORITY_SGIX 0x8182
16381+#endif
16382+
16383+#ifndef GL_SGIX_ir_instrument1
16384+#define GL_IR_INSTRUMENT1_SGIX 0x817F
16385+#endif
16386+
16387+#ifndef GL_SGIX_calligraphic_fragment
16388+#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183
16389+#endif
16390+
16391+#ifndef GL_SGIX_texture_lod_bias
16392+#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E
16393+#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F
16394+#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190
16395+#endif
16396+
16397+#ifndef GL_SGIX_shadow_ambient
16398+#define GL_SHADOW_AMBIENT_SGIX 0x80BF
16399+#endif
16400+
16401+#ifndef GL_EXT_index_texture
16402+#endif
16403+
16404+#ifndef GL_EXT_index_material
16405+#define GL_INDEX_MATERIAL_EXT 0x81B8
16406+#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9
16407+#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA
16408+#endif
16409+
16410+#ifndef GL_EXT_index_func
16411+#define GL_INDEX_TEST_EXT 0x81B5
16412+#define GL_INDEX_TEST_FUNC_EXT 0x81B6
16413+#define GL_INDEX_TEST_REF_EXT 0x81B7
16414+#endif
16415+
16416+#ifndef GL_EXT_index_array_formats
16417+#define GL_IUI_V2F_EXT 0x81AD
16418+#define GL_IUI_V3F_EXT 0x81AE
16419+#define GL_IUI_N3F_V2F_EXT 0x81AF
16420+#define GL_IUI_N3F_V3F_EXT 0x81B0
16421+#define GL_T2F_IUI_V2F_EXT 0x81B1
16422+#define GL_T2F_IUI_V3F_EXT 0x81B2
16423+#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3
16424+#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4
16425+#endif
16426+
16427+#ifndef GL_EXT_compiled_vertex_array
16428+#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8
16429+#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9
16430+#endif
16431+
16432+#ifndef GL_EXT_cull_vertex
16433+#define GL_CULL_VERTEX_EXT 0x81AA
16434+#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB
16435+#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC
16436+#endif
16437+
16438+#ifndef GL_SGIX_ycrcb
16439+#define GL_YCRCB_422_SGIX 0x81BB
16440+#define GL_YCRCB_444_SGIX 0x81BC
16441+#endif
16442+
16443+#ifndef GL_SGIX_fragment_lighting
16444+#define GL_FRAGMENT_LIGHTING_SGIX 0x8400
16445+#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401
16446+#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402
16447+#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403
16448+#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404
16449+#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405
16450+#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406
16451+#define GL_LIGHT_ENV_MODE_SGIX 0x8407
16452+#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408
16453+#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409
16454+#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A
16455+#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B
16456+#define GL_FRAGMENT_LIGHT0_SGIX 0x840C
16457+#define GL_FRAGMENT_LIGHT1_SGIX 0x840D
16458+#define GL_FRAGMENT_LIGHT2_SGIX 0x840E
16459+#define GL_FRAGMENT_LIGHT3_SGIX 0x840F
16460+#define GL_FRAGMENT_LIGHT4_SGIX 0x8410
16461+#define GL_FRAGMENT_LIGHT5_SGIX 0x8411
16462+#define GL_FRAGMENT_LIGHT6_SGIX 0x8412
16463+#define GL_FRAGMENT_LIGHT7_SGIX 0x8413
16464+#endif
16465+
16466+#ifndef GL_IBM_rasterpos_clip
16467+#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262
16468+#endif
16469+
16470+#ifndef GL_HP_texture_lighting
16471+#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167
16472+#define GL_TEXTURE_POST_SPECULAR_HP 0x8168
16473+#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169
16474+#endif
16475+
16476+#ifndef GL_EXT_draw_range_elements
16477+#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8
16478+#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9
16479+#endif
16480+
16481+#ifndef GL_WIN_phong_shading
16482+#define GL_PHONG_WIN 0x80EA
16483+#define GL_PHONG_HINT_WIN 0x80EB
16484+#endif
16485+
16486+#ifndef GL_WIN_specular_fog
16487+#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC
16488+#endif
16489+
16490+#ifndef GL_EXT_light_texture
16491+#define GL_FRAGMENT_MATERIAL_EXT 0x8349
16492+#define GL_FRAGMENT_NORMAL_EXT 0x834A
16493+#define GL_FRAGMENT_COLOR_EXT 0x834C
16494+#define GL_ATTENUATION_EXT 0x834D
16495+#define GL_SHADOW_ATTENUATION_EXT 0x834E
16496+#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F
16497+#define GL_TEXTURE_LIGHT_EXT 0x8350
16498+#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351
16499+#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352
16500+/* reuse GL_FRAGMENT_DEPTH_EXT */
16501+#endif
16502+
16503+#ifndef GL_SGIX_blend_alpha_minmax
16504+#define GL_ALPHA_MIN_SGIX 0x8320
16505+#define GL_ALPHA_MAX_SGIX 0x8321
16506+#endif
16507+
16508+#ifndef GL_SGIX_impact_pixel_texture
16509+#define GL_PIXEL_TEX_GEN_Q_CEILING_SGIX 0x8184
16510+#define GL_PIXEL_TEX_GEN_Q_ROUND_SGIX 0x8185
16511+#define GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX 0x8186
16512+#define GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX 0x8187
16513+#define GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX 0x8188
16514+#define GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX 0x8189
16515+#define GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX 0x818A
16516+#endif
16517+
16518+#ifndef GL_EXT_bgra
16519+#define GL_BGR_EXT 0x80E0
16520+#define GL_BGRA_EXT 0x80E1
16521+#endif
16522+
16523+#ifndef GL_SGIX_async
16524+#define GL_ASYNC_MARKER_SGIX 0x8329
16525+#endif
16526+
16527+#ifndef GL_SGIX_async_pixel
16528+#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C
16529+#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D
16530+#define GL_ASYNC_READ_PIXELS_SGIX 0x835E
16531+#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F
16532+#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360
16533+#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361
16534+#endif
16535+
16536+#ifndef GL_SGIX_async_histogram
16537+#define GL_ASYNC_HISTOGRAM_SGIX 0x832C
16538+#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D
16539+#endif
16540+
16541+#ifndef GL_INTEL_texture_scissor
16542+#endif
16543+
16544+#ifndef GL_INTEL_parallel_arrays
16545+#define GL_PARALLEL_ARRAYS_INTEL 0x83F4
16546+#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5
16547+#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6
16548+#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7
16549+#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8
16550+#endif
16551+
16552+#ifndef GL_HP_occlusion_test
16553+#define GL_OCCLUSION_TEST_HP 0x8165
16554+#define GL_OCCLUSION_TEST_RESULT_HP 0x8166
16555+#endif
16556+
16557+#ifndef GL_EXT_pixel_transform
16558+#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330
16559+#define GL_PIXEL_MAG_FILTER_EXT 0x8331
16560+#define GL_PIXEL_MIN_FILTER_EXT 0x8332
16561+#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333
16562+#define GL_CUBIC_EXT 0x8334
16563+#define GL_AVERAGE_EXT 0x8335
16564+#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336
16565+#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337
16566+#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338
16567+#endif
16568+
16569+#ifndef GL_EXT_pixel_transform_color_table
16570+#endif
16571+
16572+#ifndef GL_EXT_shared_texture_palette
16573+#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB
16574+#endif
16575+
16576+#ifndef GL_EXT_separate_specular_color
16577+#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8
16578+#define GL_SINGLE_COLOR_EXT 0x81F9
16579+#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA
16580+#endif
16581+
16582+#ifndef GL_EXT_secondary_color
16583+#define GL_COLOR_SUM_EXT 0x8458
16584+#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459
16585+#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A
16586+#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B
16587+#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C
16588+#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D
16589+#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E
16590+#endif
16591+
16592+#ifndef GL_EXT_texture_perturb_normal
16593+#define GL_PERTURB_EXT 0x85AE
16594+#define GL_TEXTURE_NORMAL_EXT 0x85AF
16595+#endif
16596+
16597+#ifndef GL_EXT_multi_draw_arrays
16598+#endif
16599+
16600+#ifndef GL_EXT_fog_coord
16601+#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450
16602+#define GL_FOG_COORDINATE_EXT 0x8451
16603+#define GL_FRAGMENT_DEPTH_EXT 0x8452
16604+#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453
16605+#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454
16606+#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455
16607+#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456
16608+#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457
16609+#endif
16610+
16611+#ifndef GL_REND_screen_coordinates
16612+#define GL_SCREEN_COORDINATES_REND 0x8490
16613+#define GL_INVERTED_SCREEN_W_REND 0x8491
16614+#endif
16615+
16616+#ifndef GL_EXT_coordinate_frame
16617+#define GL_TANGENT_ARRAY_EXT 0x8439
16618+#define GL_BINORMAL_ARRAY_EXT 0x843A
16619+#define GL_CURRENT_TANGENT_EXT 0x843B
16620+#define GL_CURRENT_BINORMAL_EXT 0x843C
16621+#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E
16622+#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F
16623+#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440
16624+#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441
16625+#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442
16626+#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443
16627+#define GL_MAP1_TANGENT_EXT 0x8444
16628+#define GL_MAP2_TANGENT_EXT 0x8445
16629+#define GL_MAP1_BINORMAL_EXT 0x8446
16630+#define GL_MAP2_BINORMAL_EXT 0x8447
16631+#endif
16632+
16633+#ifndef GL_EXT_texture_env_combine
16634+#define GL_COMBINE_EXT 0x8570
16635+#define GL_COMBINE_RGB_EXT 0x8571
16636+#define GL_COMBINE_ALPHA_EXT 0x8572
16637+#define GL_RGB_SCALE_EXT 0x8573
16638+#define GL_ADD_SIGNED_EXT 0x8574
16639+#define GL_INTERPOLATE_EXT 0x8575
16640+#define GL_CONSTANT_EXT 0x8576
16641+#define GL_PRIMARY_COLOR_EXT 0x8577
16642+#define GL_PREVIOUS_EXT 0x8578
16643+#define GL_SOURCE0_RGB_EXT 0x8580
16644+#define GL_SOURCE1_RGB_EXT 0x8581
16645+#define GL_SOURCE2_RGB_EXT 0x8582
16646+#define GL_SOURCE0_ALPHA_EXT 0x8588
16647+#define GL_SOURCE1_ALPHA_EXT 0x8589
16648+#define GL_SOURCE2_ALPHA_EXT 0x858A
16649+#define GL_OPERAND0_RGB_EXT 0x8590
16650+#define GL_OPERAND1_RGB_EXT 0x8591
16651+#define GL_OPERAND2_RGB_EXT 0x8592
16652+#define GL_OPERAND0_ALPHA_EXT 0x8598
16653+#define GL_OPERAND1_ALPHA_EXT 0x8599
16654+#define GL_OPERAND2_ALPHA_EXT 0x859A
16655+#endif
16656+
16657+#ifndef GL_APPLE_specular_vector
16658+#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0
16659+#endif
16660+
16661+#ifndef GL_APPLE_transform_hint
16662+#define GL_TRANSFORM_HINT_APPLE 0x85B1
16663+#endif
16664+
16665+#ifndef GL_SGIX_fog_scale
16666+#define GL_FOG_SCALE_SGIX 0x81FC
16667+#define GL_FOG_SCALE_VALUE_SGIX 0x81FD
16668+#endif
16669+
16670+#ifndef GL_SUNX_constant_data
16671+#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5
16672+#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6
16673+#endif
16674+
16675+#ifndef GL_SUN_global_alpha
16676+#define GL_GLOBAL_ALPHA_SUN 0x81D9
16677+#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA
16678+#endif
16679+
16680+#ifndef GL_SUN_triangle_list
16681+#define GL_RESTART_SUN 0x0001
16682+#define GL_REPLACE_MIDDLE_SUN 0x0002
16683+#define GL_REPLACE_OLDEST_SUN 0x0003
16684+#define GL_TRIANGLE_LIST_SUN 0x81D7
16685+#define GL_REPLACEMENT_CODE_SUN 0x81D8
16686+#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0
16687+#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1
16688+#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2
16689+#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3
16690+#define GL_R1UI_V3F_SUN 0x85C4
16691+#define GL_R1UI_C4UB_V3F_SUN 0x85C5
16692+#define GL_R1UI_C3F_V3F_SUN 0x85C6
16693+#define GL_R1UI_N3F_V3F_SUN 0x85C7
16694+#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8
16695+#define GL_R1UI_T2F_V3F_SUN 0x85C9
16696+#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA
16697+#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB
16698+#endif
16699+
16700+#ifndef GL_SUN_vertex
16701+#endif
16702+
16703+#ifndef GL_EXT_blend_func_separate
16704+#define GL_BLEND_DST_RGB_EXT 0x80C8
16705+#define GL_BLEND_SRC_RGB_EXT 0x80C9
16706+#define GL_BLEND_DST_ALPHA_EXT 0x80CA
16707+#define GL_BLEND_SRC_ALPHA_EXT 0x80CB
16708+#endif
16709+
16710+#ifndef GL_INGR_color_clamp
16711+#define GL_RED_MIN_CLAMP_INGR 0x8560
16712+#define GL_GREEN_MIN_CLAMP_INGR 0x8561
16713+#define GL_BLUE_MIN_CLAMP_INGR 0x8562
16714+#define GL_ALPHA_MIN_CLAMP_INGR 0x8563
16715+#define GL_RED_MAX_CLAMP_INGR 0x8564
16716+#define GL_GREEN_MAX_CLAMP_INGR 0x8565
16717+#define GL_BLUE_MAX_CLAMP_INGR 0x8566
16718+#define GL_ALPHA_MAX_CLAMP_INGR 0x8567
16719+#endif
16720+
16721+#ifndef GL_INGR_interlace_read
16722+#define GL_INTERLACE_READ_INGR 0x8568
16723+#endif
16724+
16725+#ifndef GL_EXT_stencil_wrap
16726+#define GL_INCR_WRAP_EXT 0x8507
16727+#define GL_DECR_WRAP_EXT 0x8508
16728+#endif
16729+
16730+#ifndef GL_EXT_422_pixels
16731+#define GL_422_EXT 0x80CC
16732+#define GL_422_REV_EXT 0x80CD
16733+#define GL_422_AVERAGE_EXT 0x80CE
16734+#define GL_422_REV_AVERAGE_EXT 0x80CF
16735+#endif
16736+
16737+#ifndef GL_NV_texgen_reflection
16738+#define GL_NORMAL_MAP_NV 0x8511
16739+#define GL_REFLECTION_MAP_NV 0x8512
16740+#endif
16741+
16742+#ifndef GL_EXT_texture_cube_map
16743+#define GL_NORMAL_MAP_EXT 0x8511
16744+#define GL_REFLECTION_MAP_EXT 0x8512
16745+#define GL_TEXTURE_CUBE_MAP_EXT 0x8513
16746+#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514
16747+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515
16748+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516
16749+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517
16750+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518
16751+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519
16752+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A
16753+#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B
16754+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C
16755+#endif
16756+
16757+#ifndef GL_SUN_convolution_border_modes
16758+#define GL_WRAP_BORDER_SUN 0x81D4
16759+#endif
16760+
16761+#ifndef GL_EXT_texture_env_add
16762+#endif
16763+
16764+#ifndef GL_EXT_texture_lod_bias
16765+#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD
16766+#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500
16767+#define GL_TEXTURE_LOD_BIAS_EXT 0x8501
16768+#endif
16769+
16770+#ifndef GL_EXT_texture_filter_anisotropic
16771+#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
16772+#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
16773+#endif
16774+
16775+#ifndef GL_EXT_vertex_weighting
16776+#define GL_MODELVIEW0_STACK_DEPTH_EXT GL_MODELVIEW_STACK_DEPTH
16777+#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502
16778+#define GL_MODELVIEW0_MATRIX_EXT GL_MODELVIEW_MATRIX
16779+#define GL_MODELVIEW1_MATRIX_EXT 0x8506
16780+#define GL_VERTEX_WEIGHTING_EXT 0x8509
16781+#define GL_MODELVIEW0_EXT GL_MODELVIEW
16782+#define GL_MODELVIEW1_EXT 0x850A
16783+#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B
16784+#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C
16785+#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D
16786+#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E
16787+#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F
16788+#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510
16789+#endif
16790+
16791+#ifndef GL_NV_light_max_exponent
16792+#define GL_MAX_SHININESS_NV 0x8504
16793+#define GL_MAX_SPOT_EXPONENT_NV 0x8505
16794+#endif
16795+
16796+#ifndef GL_NV_vertex_array_range
16797+#define GL_VERTEX_ARRAY_RANGE_NV 0x851D
16798+#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E
16799+#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F
16800+#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520
16801+#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521
16802+#endif
16803+
16804+#ifndef GL_NV_register_combiners
16805+#define GL_REGISTER_COMBINERS_NV 0x8522
16806+#define GL_VARIABLE_A_NV 0x8523
16807+#define GL_VARIABLE_B_NV 0x8524
16808+#define GL_VARIABLE_C_NV 0x8525
16809+#define GL_VARIABLE_D_NV 0x8526
16810+#define GL_VARIABLE_E_NV 0x8527
16811+#define GL_VARIABLE_F_NV 0x8528
16812+#define GL_VARIABLE_G_NV 0x8529
16813+#define GL_CONSTANT_COLOR0_NV 0x852A
16814+#define GL_CONSTANT_COLOR1_NV 0x852B
16815+#define GL_PRIMARY_COLOR_NV 0x852C
16816+#define GL_SECONDARY_COLOR_NV 0x852D
16817+#define GL_SPARE0_NV 0x852E
16818+#define GL_SPARE1_NV 0x852F
16819+#define GL_DISCARD_NV 0x8530
16820+#define GL_E_TIMES_F_NV 0x8531
16821+#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532
16822+#define GL_UNSIGNED_IDENTITY_NV 0x8536
16823+#define GL_UNSIGNED_INVERT_NV 0x8537
16824+#define GL_EXPAND_NORMAL_NV 0x8538
16825+#define GL_EXPAND_NEGATE_NV 0x8539
16826+#define GL_HALF_BIAS_NORMAL_NV 0x853A
16827+#define GL_HALF_BIAS_NEGATE_NV 0x853B
16828+#define GL_SIGNED_IDENTITY_NV 0x853C
16829+#define GL_SIGNED_NEGATE_NV 0x853D
16830+#define GL_SCALE_BY_TWO_NV 0x853E
16831+#define GL_SCALE_BY_FOUR_NV 0x853F
16832+#define GL_SCALE_BY_ONE_HALF_NV 0x8540
16833+#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541
16834+#define GL_COMBINER_INPUT_NV 0x8542
16835+#define GL_COMBINER_MAPPING_NV 0x8543
16836+#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544
16837+#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545
16838+#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546
16839+#define GL_COMBINER_MUX_SUM_NV 0x8547
16840+#define GL_COMBINER_SCALE_NV 0x8548
16841+#define GL_COMBINER_BIAS_NV 0x8549
16842+#define GL_COMBINER_AB_OUTPUT_NV 0x854A
16843+#define GL_COMBINER_CD_OUTPUT_NV 0x854B
16844+#define GL_COMBINER_SUM_OUTPUT_NV 0x854C
16845+#define GL_MAX_GENERAL_COMBINERS_NV 0x854D
16846+#define GL_NUM_GENERAL_COMBINERS_NV 0x854E
16847+#define GL_COLOR_SUM_CLAMP_NV 0x854F
16848+#define GL_COMBINER0_NV 0x8550
16849+#define GL_COMBINER1_NV 0x8551
16850+#define GL_COMBINER2_NV 0x8552
16851+#define GL_COMBINER3_NV 0x8553
16852+#define GL_COMBINER4_NV 0x8554
16853+#define GL_COMBINER5_NV 0x8555
16854+#define GL_COMBINER6_NV 0x8556
16855+#define GL_COMBINER7_NV 0x8557
16856+/* reuse GL_TEXTURE0_ARB */
16857+/* reuse GL_TEXTURE1_ARB */
16858+/* reuse GL_ZERO */
16859+/* reuse GL_NONE */
16860+/* reuse GL_FOG */
16861+#endif
16862+
16863+#ifndef GL_NV_fog_distance
16864+#define GL_FOG_DISTANCE_MODE_NV 0x855A
16865+#define GL_EYE_RADIAL_NV 0x855B
16866+#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C
16867+/* reuse GL_EYE_PLANE */
16868+#endif
16869+
16870+#ifndef GL_NV_texgen_emboss
16871+#define GL_EMBOSS_LIGHT_NV 0x855D
16872+#define GL_EMBOSS_CONSTANT_NV 0x855E
16873+#define GL_EMBOSS_MAP_NV 0x855F
16874+#endif
16875+
16876+#ifndef GL_NV_blend_square
16877+#endif
16878+
16879+#ifndef GL_NV_texture_env_combine4
16880+#define GL_COMBINE4_NV 0x8503
16881+#define GL_SOURCE3_RGB_NV 0x8583
16882+#define GL_SOURCE3_ALPHA_NV 0x858B
16883+#define GL_OPERAND3_RGB_NV 0x8593
16884+#define GL_OPERAND3_ALPHA_NV 0x859B
16885+#endif
16886+
16887+#ifndef GL_MESA_resize_buffers
16888+#endif
16889+
16890+#ifndef GL_MESA_window_pos
16891+#endif
16892+
16893+#ifndef GL_EXT_texture_compression_s3tc
16894+#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
16895+#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
16896+#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
16897+#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
16898+#endif
16899+
16900+#ifndef GL_IBM_cull_vertex
16901+#define GL_CULL_VERTEX_IBM 103050
16902+#endif
16903+
16904+#ifndef GL_IBM_multimode_draw_arrays
16905+#endif
16906+
16907+#ifndef GL_IBM_vertex_array_lists
16908+#define GL_VERTEX_ARRAY_LIST_IBM 103070
16909+#define GL_NORMAL_ARRAY_LIST_IBM 103071
16910+#define GL_COLOR_ARRAY_LIST_IBM 103072
16911+#define GL_INDEX_ARRAY_LIST_IBM 103073
16912+#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074
16913+#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075
16914+#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076
16915+#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077
16916+#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080
16917+#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081
16918+#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082
16919+#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083
16920+#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084
16921+#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085
16922+#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086
16923+#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087
16924+#endif
16925+
16926+#ifndef GL_SGIX_subsample
16927+#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0
16928+#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1
16929+#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2
16930+#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3
16931+#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4
16932+#endif
16933+
16934+#ifndef GL_SGIX_ycrcb_subsample
16935+#endif
16936+
16937+#ifndef GL_SGIX_ycrcba
16938+#define GL_YCRCB_SGIX 0x8318
16939+#define GL_YCRCBA_SGIX 0x8319
16940+#endif
16941+
16942+#ifndef GL_SGI_depth_pass_instrument
16943+#define GL_DEPTH_PASS_INSTRUMENT_SGIX 0x8310
16944+#define GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX 0x8311
16945+#define GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX 0x8312
16946+#endif
16947+
16948+#ifndef GL_3DFX_texture_compression_FXT1
16949+#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0
16950+#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1
16951+#endif
16952+
16953+#ifndef GL_3DFX_multisample
16954+#define GL_MULTISAMPLE_3DFX 0x86B2
16955+#define GL_SAMPLE_BUFFERS_3DFX 0x86B3
16956+#define GL_SAMPLES_3DFX 0x86B4
16957+#define GL_MULTISAMPLE_BIT_3DFX 0x20000000
16958+#endif
16959+
16960+#ifndef GL_3DFX_tbuffer
16961+#endif
16962+
16963+#ifndef GL_EXT_multisample
16964+#define GL_MULTISAMPLE_EXT 0x809D
16965+#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E
16966+#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F
16967+#define GL_SAMPLE_MASK_EXT 0x80A0
16968+#define GL_1PASS_EXT 0x80A1
16969+#define GL_2PASS_0_EXT 0x80A2
16970+#define GL_2PASS_1_EXT 0x80A3
16971+#define GL_4PASS_0_EXT 0x80A4
16972+#define GL_4PASS_1_EXT 0x80A5
16973+#define GL_4PASS_2_EXT 0x80A6
16974+#define GL_4PASS_3_EXT 0x80A7
16975+#define GL_SAMPLE_BUFFERS_EXT 0x80A8
16976+#define GL_SAMPLES_EXT 0x80A9
16977+#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA
16978+#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB
16979+#define GL_SAMPLE_PATTERN_EXT 0x80AC
16980+#define GL_MULTISAMPLE_BIT_EXT 0x20000000
16981+#endif
16982+
16983+#ifndef GL_SGIX_vertex_preclip
16984+#define GL_VERTEX_PRECLIP_SGIX 0x83EE
16985+#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF
16986+#endif
16987+
16988+#ifndef GL_SGIX_convolution_accuracy
16989+#define GL_CONVOLUTION_HINT_SGIX 0x8316
16990+#endif
16991+
16992+#ifndef GL_SGIX_resample
16993+#define GL_PACK_RESAMPLE_SGIX 0x842C
16994+#define GL_UNPACK_RESAMPLE_SGIX 0x842D
16995+#define GL_RESAMPLE_REPLICATE_SGIX 0x842E
16996+#define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F
16997+#define GL_RESAMPLE_DECIMATE_SGIX 0x8430
16998+#endif
16999+
17000+#ifndef GL_SGIS_point_line_texgen
17001+#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0
17002+#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1
17003+#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2
17004+#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3
17005+#define GL_EYE_POINT_SGIS 0x81F4
17006+#define GL_OBJECT_POINT_SGIS 0x81F5
17007+#define GL_EYE_LINE_SGIS 0x81F6
17008+#define GL_OBJECT_LINE_SGIS 0x81F7
17009+#endif
17010+
17011+#ifndef GL_SGIS_texture_color_mask
17012+#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF
17013+#endif
17014+
17015+#ifndef GL_EXT_texture_env_dot3
17016+#define GL_DOT3_RGB_EXT 0x8740
17017+#define GL_DOT3_RGBA_EXT 0x8741
17018+#endif
17019+
17020+#ifndef GL_ATI_texture_mirror_once
17021+#define GL_MIRROR_CLAMP_ATI 0x8742
17022+#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743
17023+#endif
17024+
17025+#ifndef GL_NV_fence
17026+#define GL_ALL_COMPLETED_NV 0x84F2
17027+#define GL_FENCE_STATUS_NV 0x84F3
17028+#define GL_FENCE_CONDITION_NV 0x84F4
17029+#endif
17030+
17031+#ifndef GL_IBM_texture_mirrored_repeat
17032+#define GL_MIRRORED_REPEAT_IBM 0x8370
17033+#endif
17034+
17035+#ifndef GL_NV_evaluators
17036+#define GL_EVAL_2D_NV 0x86C0
17037+#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1
17038+#define GL_MAP_TESSELLATION_NV 0x86C2
17039+#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3
17040+#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4
17041+#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5
17042+#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6
17043+#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7
17044+#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8
17045+#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9
17046+#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA
17047+#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB
17048+#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC
17049+#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD
17050+#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE
17051+#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF
17052+#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0
17053+#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1
17054+#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2
17055+#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3
17056+#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4
17057+#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5
17058+#define GL_MAX_MAP_TESSELLATION_NV 0x86D6
17059+#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7
17060+#endif
17061+
17062+#ifndef GL_NV_packed_depth_stencil
17063+#define GL_DEPTH_STENCIL_NV 0x84F9
17064+#define GL_UNSIGNED_INT_24_8_NV 0x84FA
17065+#endif
17066+
17067+#ifndef GL_NV_register_combiners2
17068+#define GL_PER_STAGE_CONSTANTS_NV 0x8535
17069+#endif
17070+
17071+#ifndef GL_NV_texture_compression_vtc
17072+#endif
17073+
17074+#ifndef GL_NV_texture_rectangle
17075+#define GL_TEXTURE_RECTANGLE_NV 0x84F5
17076+#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6
17077+#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7
17078+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8
17079+#endif
17080+
17081+#ifndef GL_NV_texture_shader
17082+#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C
17083+#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D
17084+#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E
17085+#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9
17086+#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA
17087+#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB
17088+#define GL_DSDT_MAG_INTENSITY_NV 0x86DC
17089+#define GL_SHADER_CONSISTENT_NV 0x86DD
17090+#define GL_TEXTURE_SHADER_NV 0x86DE
17091+#define GL_SHADER_OPERATION_NV 0x86DF
17092+#define GL_CULL_MODES_NV 0x86E0
17093+#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1
17094+#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2
17095+#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3
17096+#define GL_OFFSET_TEXTURE_2D_MATRIX_NV GL_OFFSET_TEXTURE_MATRIX_NV
17097+#define GL_OFFSET_TEXTURE_2D_SCALE_NV GL_OFFSET_TEXTURE_SCALE_NV
17098+#define GL_OFFSET_TEXTURE_2D_BIAS_NV GL_OFFSET_TEXTURE_BIAS_NV
17099+#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4
17100+#define GL_CONST_EYE_NV 0x86E5
17101+#define GL_PASS_THROUGH_NV 0x86E6
17102+#define GL_CULL_FRAGMENT_NV 0x86E7
17103+#define GL_OFFSET_TEXTURE_2D_NV 0x86E8
17104+#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9
17105+#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA
17106+#define GL_DOT_PRODUCT_NV 0x86EC
17107+#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED
17108+#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE
17109+#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0
17110+#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1
17111+#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2
17112+#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3
17113+#define GL_HILO_NV 0x86F4
17114+#define GL_DSDT_NV 0x86F5
17115+#define GL_DSDT_MAG_NV 0x86F6
17116+#define GL_DSDT_MAG_VIB_NV 0x86F7
17117+#define GL_HILO16_NV 0x86F8
17118+#define GL_SIGNED_HILO_NV 0x86F9
17119+#define GL_SIGNED_HILO16_NV 0x86FA
17120+#define GL_SIGNED_RGBA_NV 0x86FB
17121+#define GL_SIGNED_RGBA8_NV 0x86FC
17122+#define GL_SIGNED_RGB_NV 0x86FE
17123+#define GL_SIGNED_RGB8_NV 0x86FF
17124+#define GL_SIGNED_LUMINANCE_NV 0x8701
17125+#define GL_SIGNED_LUMINANCE8_NV 0x8702
17126+#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703
17127+#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704
17128+#define GL_SIGNED_ALPHA_NV 0x8705
17129+#define GL_SIGNED_ALPHA8_NV 0x8706
17130+#define GL_SIGNED_INTENSITY_NV 0x8707
17131+#define GL_SIGNED_INTENSITY8_NV 0x8708
17132+#define GL_DSDT8_NV 0x8709
17133+#define GL_DSDT8_MAG8_NV 0x870A
17134+#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B
17135+#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C
17136+#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D
17137+#define GL_HI_SCALE_NV 0x870E
17138+#define GL_LO_SCALE_NV 0x870F
17139+#define GL_DS_SCALE_NV 0x8710
17140+#define GL_DT_SCALE_NV 0x8711
17141+#define GL_MAGNITUDE_SCALE_NV 0x8712
17142+#define GL_VIBRANCE_SCALE_NV 0x8713
17143+#define GL_HI_BIAS_NV 0x8714
17144+#define GL_LO_BIAS_NV 0x8715
17145+#define GL_DS_BIAS_NV 0x8716
17146+#define GL_DT_BIAS_NV 0x8717
17147+#define GL_MAGNITUDE_BIAS_NV 0x8718
17148+#define GL_VIBRANCE_BIAS_NV 0x8719
17149+#define GL_TEXTURE_BORDER_VALUES_NV 0x871A
17150+#define GL_TEXTURE_HI_SIZE_NV 0x871B
17151+#define GL_TEXTURE_LO_SIZE_NV 0x871C
17152+#define GL_TEXTURE_DS_SIZE_NV 0x871D
17153+#define GL_TEXTURE_DT_SIZE_NV 0x871E
17154+#define GL_TEXTURE_MAG_SIZE_NV 0x871F
17155+#endif
17156+
17157+#ifndef GL_NV_texture_shader2
17158+#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF
17159+#endif
17160+
17161+#ifndef GL_NV_vertex_array_range2
17162+#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533
17163+#endif
17164+
17165+#ifndef GL_NV_vertex_program
17166+#define GL_VERTEX_PROGRAM_NV 0x8620
17167+#define GL_VERTEX_STATE_PROGRAM_NV 0x8621
17168+#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623
17169+#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624
17170+#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625
17171+#define GL_CURRENT_ATTRIB_NV 0x8626
17172+#define GL_PROGRAM_LENGTH_NV 0x8627
17173+#define GL_PROGRAM_STRING_NV 0x8628
17174+#define GL_MODELVIEW_PROJECTION_NV 0x8629
17175+#define GL_IDENTITY_NV 0x862A
17176+#define GL_INVERSE_NV 0x862B
17177+#define GL_TRANSPOSE_NV 0x862C
17178+#define GL_INVERSE_TRANSPOSE_NV 0x862D
17179+#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E
17180+#define GL_MAX_TRACK_MATRICES_NV 0x862F
17181+#define GL_MATRIX0_NV 0x8630
17182+#define GL_MATRIX1_NV 0x8631
17183+#define GL_MATRIX2_NV 0x8632
17184+#define GL_MATRIX3_NV 0x8633
17185+#define GL_MATRIX4_NV 0x8634
17186+#define GL_MATRIX5_NV 0x8635
17187+#define GL_MATRIX6_NV 0x8636
17188+#define GL_MATRIX7_NV 0x8637
17189+#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640
17190+#define GL_CURRENT_MATRIX_NV 0x8641
17191+#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642
17192+#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643
17193+#define GL_PROGRAM_PARAMETER_NV 0x8644
17194+#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645
17195+#define GL_PROGRAM_TARGET_NV 0x8646
17196+#define GL_PROGRAM_RESIDENT_NV 0x8647
17197+#define GL_TRACK_MATRIX_NV 0x8648
17198+#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649
17199+#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A
17200+#define GL_PROGRAM_ERROR_POSITION_NV 0x864B
17201+#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650
17202+#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651
17203+#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652
17204+#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653
17205+#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654
17206+#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655
17207+#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656
17208+#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657
17209+#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658
17210+#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659
17211+#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A
17212+#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B
17213+#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C
17214+#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D
17215+#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E
17216+#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F
17217+#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660
17218+#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661
17219+#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662
17220+#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663
17221+#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664
17222+#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665
17223+#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666
17224+#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667
17225+#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668
17226+#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669
17227+#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A
17228+#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B
17229+#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C
17230+#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D
17231+#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E
17232+#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F
17233+#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670
17234+#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671
17235+#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672
17236+#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673
17237+#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674
17238+#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675
17239+#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676
17240+#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677
17241+#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678
17242+#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679
17243+#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A
17244+#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B
17245+#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C
17246+#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D
17247+#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E
17248+#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F
17249+#endif
17250+
17251+#ifndef GL_SGIX_texture_coordinate_clamp
17252+#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369
17253+#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A
17254+#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B
17255+#endif
17256+
17257+#ifndef GL_SGIX_scalebias_hint
17258+#define GL_SCALEBIAS_HINT_SGIX 0x8322
17259+#endif
17260+
17261+#ifndef GL_OML_interlace
17262+#define GL_INTERLACE_OML 0x8980
17263+#define GL_INTERLACE_READ_OML 0x8981
17264+#endif
17265+
17266+#ifndef GL_OML_subsample
17267+#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982
17268+#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983
17269+#endif
17270+
17271+#ifndef GL_OML_resample
17272+#define GL_PACK_RESAMPLE_OML 0x8984
17273+#define GL_UNPACK_RESAMPLE_OML 0x8985
17274+#define GL_RESAMPLE_REPLICATE_OML 0x8986
17275+#define GL_RESAMPLE_ZERO_FILL_OML 0x8987
17276+#define GL_RESAMPLE_AVERAGE_OML 0x8988
17277+#define GL_RESAMPLE_DECIMATE_OML 0x8989
17278+#endif
17279+
17280+#ifndef GL_NV_copy_depth_to_color
17281+#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E
17282+#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F
17283+#endif
17284+
17285+#ifndef GL_ATI_envmap_bumpmap
17286+#define GL_BUMP_ROT_MATRIX_ATI 0x8775
17287+#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776
17288+#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777
17289+#define GL_BUMP_TEX_UNITS_ATI 0x8778
17290+#define GL_DUDV_ATI 0x8779
17291+#define GL_DU8DV8_ATI 0x877A
17292+#define GL_BUMP_ENVMAP_ATI 0x877B
17293+#define GL_BUMP_TARGET_ATI 0x877C
17294+#endif
17295+
17296+#ifndef GL_ATI_fragment_shader
17297+#define GL_FRAGMENT_SHADER_ATI 0x8920
17298+#define GL_REG_0_ATI 0x8921
17299+#define GL_REG_1_ATI 0x8922
17300+#define GL_REG_2_ATI 0x8923
17301+#define GL_REG_3_ATI 0x8924
17302+#define GL_REG_4_ATI 0x8925
17303+#define GL_REG_5_ATI 0x8926
17304+#define GL_REG_6_ATI 0x8927
17305+#define GL_REG_7_ATI 0x8928
17306+#define GL_REG_8_ATI 0x8929
17307+#define GL_REG_9_ATI 0x892A
17308+#define GL_REG_10_ATI 0x892B
17309+#define GL_REG_11_ATI 0x892C
17310+#define GL_REG_12_ATI 0x892D
17311+#define GL_REG_13_ATI 0x892E
17312+#define GL_REG_14_ATI 0x892F
17313+#define GL_REG_15_ATI 0x8930
17314+#define GL_REG_16_ATI 0x8931
17315+#define GL_REG_17_ATI 0x8932
17316+#define GL_REG_18_ATI 0x8933
17317+#define GL_REG_19_ATI 0x8934
17318+#define GL_REG_20_ATI 0x8935
17319+#define GL_REG_21_ATI 0x8936
17320+#define GL_REG_22_ATI 0x8937
17321+#define GL_REG_23_ATI 0x8938
17322+#define GL_REG_24_ATI 0x8939
17323+#define GL_REG_25_ATI 0x893A
17324+#define GL_REG_26_ATI 0x893B
17325+#define GL_REG_27_ATI 0x893C
17326+#define GL_REG_28_ATI 0x893D
17327+#define GL_REG_29_ATI 0x893E
17328+#define GL_REG_30_ATI 0x893F
17329+#define GL_REG_31_ATI 0x8940
17330+#define GL_CON_0_ATI 0x8941
17331+#define GL_CON_1_ATI 0x8942
17332+#define GL_CON_2_ATI 0x8943
17333+#define GL_CON_3_ATI 0x8944
17334+#define GL_CON_4_ATI 0x8945
17335+#define GL_CON_5_ATI 0x8946
17336+#define GL_CON_6_ATI 0x8947
17337+#define GL_CON_7_ATI 0x8948
17338+#define GL_CON_8_ATI 0x8949
17339+#define GL_CON_9_ATI 0x894A
17340+#define GL_CON_10_ATI 0x894B
17341+#define GL_CON_11_ATI 0x894C
17342+#define GL_CON_12_ATI 0x894D
17343+#define GL_CON_13_ATI 0x894E
17344+#define GL_CON_14_ATI 0x894F
17345+#define GL_CON_15_ATI 0x8950
17346+#define GL_CON_16_ATI 0x8951
17347+#define GL_CON_17_ATI 0x8952
17348+#define GL_CON_18_ATI 0x8953
17349+#define GL_CON_19_ATI 0x8954
17350+#define GL_CON_20_ATI 0x8955
17351+#define GL_CON_21_ATI 0x8956
17352+#define GL_CON_22_ATI 0x8957
17353+#define GL_CON_23_ATI 0x8958
17354+#define GL_CON_24_ATI 0x8959
17355+#define GL_CON_25_ATI 0x895A
17356+#define GL_CON_26_ATI 0x895B
17357+#define GL_CON_27_ATI 0x895C
17358+#define GL_CON_28_ATI 0x895D
17359+#define GL_CON_29_ATI 0x895E
17360+#define GL_CON_30_ATI 0x895F
17361+#define GL_CON_31_ATI 0x8960
17362+#define GL_MOV_ATI 0x8961
17363+#define GL_ADD_ATI 0x8963
17364+#define GL_MUL_ATI 0x8964
17365+#define GL_SUB_ATI 0x8965
17366+#define GL_DOT3_ATI 0x8966
17367+#define GL_DOT4_ATI 0x8967
17368+#define GL_MAD_ATI 0x8968
17369+#define GL_LERP_ATI 0x8969
17370+#define GL_CND_ATI 0x896A
17371+#define GL_CND0_ATI 0x896B
17372+#define GL_DOT2_ADD_ATI 0x896C
17373+#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D
17374+#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E
17375+#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F
17376+#define GL_NUM_PASSES_ATI 0x8970
17377+#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971
17378+#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972
17379+#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973
17380+#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974
17381+#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975
17382+#define GL_SWIZZLE_STR_ATI 0x8976
17383+#define GL_SWIZZLE_STQ_ATI 0x8977
17384+#define GL_SWIZZLE_STR_DR_ATI 0x8978
17385+#define GL_SWIZZLE_STQ_DQ_ATI 0x8979
17386+#define GL_SWIZZLE_STRQ_ATI 0x897A
17387+#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B
17388+#define GL_RED_BIT_ATI 0x00000001
17389+#define GL_GREEN_BIT_ATI 0x00000002
17390+#define GL_BLUE_BIT_ATI 0x00000004
17391+#define GL_2X_BIT_ATI 0x00000001
17392+#define GL_4X_BIT_ATI 0x00000002
17393+#define GL_8X_BIT_ATI 0x00000004
17394+#define GL_HALF_BIT_ATI 0x00000008
17395+#define GL_QUARTER_BIT_ATI 0x00000010
17396+#define GL_EIGHTH_BIT_ATI 0x00000020
17397+#define GL_SATURATE_BIT_ATI 0x00000040
17398+#define GL_COMP_BIT_ATI 0x00000002
17399+#define GL_NEGATE_BIT_ATI 0x00000004
17400+#define GL_BIAS_BIT_ATI 0x00000008
17401+#endif
17402+
17403+#ifndef GL_ATI_pn_triangles
17404+#define GL_PN_TRIANGLES_ATI 0x87F0
17405+#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1
17406+#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2
17407+#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3
17408+#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4
17409+#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5
17410+#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6
17411+#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7
17412+#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8
17413+#endif
17414+
17415+#ifndef GL_ATI_vertex_array_object
17416+#define GL_STATIC_ATI 0x8760
17417+#define GL_DYNAMIC_ATI 0x8761
17418+#define GL_PRESERVE_ATI 0x8762
17419+#define GL_DISCARD_ATI 0x8763
17420+#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764
17421+#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765
17422+#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766
17423+#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767
17424+#endif
17425+
17426+#ifndef GL_EXT_vertex_shader
17427+#define GL_VERTEX_SHADER_EXT 0x8780
17428+#define GL_VERTEX_SHADER_BINDING_EXT 0x8781
17429+#define GL_OP_INDEX_EXT 0x8782
17430+#define GL_OP_NEGATE_EXT 0x8783
17431+#define GL_OP_DOT3_EXT 0x8784
17432+#define GL_OP_DOT4_EXT 0x8785
17433+#define GL_OP_MUL_EXT 0x8786
17434+#define GL_OP_ADD_EXT 0x8787
17435+#define GL_OP_MADD_EXT 0x8788
17436+#define GL_OP_FRAC_EXT 0x8789
17437+#define GL_OP_MAX_EXT 0x878A
17438+#define GL_OP_MIN_EXT 0x878B
17439+#define GL_OP_SET_GE_EXT 0x878C
17440+#define GL_OP_SET_LT_EXT 0x878D
17441+#define GL_OP_CLAMP_EXT 0x878E
17442+#define GL_OP_FLOOR_EXT 0x878F
17443+#define GL_OP_ROUND_EXT 0x8790
17444+#define GL_OP_EXP_BASE_2_EXT 0x8791
17445+#define GL_OP_LOG_BASE_2_EXT 0x8792
17446+#define GL_OP_POWER_EXT 0x8793
17447+#define GL_OP_RECIP_EXT 0x8794
17448+#define GL_OP_RECIP_SQRT_EXT 0x8795
17449+#define GL_OP_SUB_EXT 0x8796
17450+#define GL_OP_CROSS_PRODUCT_EXT 0x8797
17451+#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798
17452+#define GL_OP_MOV_EXT 0x8799
17453+#define GL_OUTPUT_VERTEX_EXT 0x879A
17454+#define GL_OUTPUT_COLOR0_EXT 0x879B
17455+#define GL_OUTPUT_COLOR1_EXT 0x879C
17456+#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D
17457+#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E
17458+#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F
17459+#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0
17460+#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1
17461+#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2
17462+#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3
17463+#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4
17464+#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5
17465+#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6
17466+#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7
17467+#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8
17468+#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9
17469+#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA
17470+#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB
17471+#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC
17472+#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD
17473+#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE
17474+#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF
17475+#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0
17476+#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1
17477+#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2
17478+#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3
17479+#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4
17480+#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5
17481+#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6
17482+#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7
17483+#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8
17484+#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9
17485+#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA
17486+#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB
17487+#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC
17488+#define GL_OUTPUT_FOG_EXT 0x87BD
17489+#define GL_SCALAR_EXT 0x87BE
17490+#define GL_VECTOR_EXT 0x87BF
17491+#define GL_MATRIX_EXT 0x87C0
17492+#define GL_VARIANT_EXT 0x87C1
17493+#define GL_INVARIANT_EXT 0x87C2
17494+#define GL_LOCAL_CONSTANT_EXT 0x87C3
17495+#define GL_LOCAL_EXT 0x87C4
17496+#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5
17497+#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6
17498+#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7
17499+#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8
17500+#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9
17501+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA
17502+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB
17503+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC
17504+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD
17505+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE
17506+#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF
17507+#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0
17508+#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1
17509+#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2
17510+#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3
17511+#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4
17512+#define GL_X_EXT 0x87D5
17513+#define GL_Y_EXT 0x87D6
17514+#define GL_Z_EXT 0x87D7
17515+#define GL_W_EXT 0x87D8
17516+#define GL_NEGATIVE_X_EXT 0x87D9
17517+#define GL_NEGATIVE_Y_EXT 0x87DA
17518+#define GL_NEGATIVE_Z_EXT 0x87DB
17519+#define GL_NEGATIVE_W_EXT 0x87DC
17520+#define GL_ZERO_EXT 0x87DD
17521+#define GL_ONE_EXT 0x87DE
17522+#define GL_NEGATIVE_ONE_EXT 0x87DF
17523+#define GL_NORMALIZED_RANGE_EXT 0x87E0
17524+#define GL_FULL_RANGE_EXT 0x87E1
17525+#define GL_CURRENT_VERTEX_EXT 0x87E2
17526+#define GL_MVP_MATRIX_EXT 0x87E3
17527+#define GL_VARIANT_VALUE_EXT 0x87E4
17528+#define GL_VARIANT_DATATYPE_EXT 0x87E5
17529+#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6
17530+#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7
17531+#define GL_VARIANT_ARRAY_EXT 0x87E8
17532+#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9
17533+#define GL_INVARIANT_VALUE_EXT 0x87EA
17534+#define GL_INVARIANT_DATATYPE_EXT 0x87EB
17535+#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC
17536+#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED
17537+#endif
17538+
17539+#ifndef GL_ATI_vertex_streams
17540+#define GL_MAX_VERTEX_STREAMS_ATI 0x876B
17541+#define GL_VERTEX_STREAM0_ATI 0x876C
17542+#define GL_VERTEX_STREAM1_ATI 0x876D
17543+#define GL_VERTEX_STREAM2_ATI 0x876E
17544+#define GL_VERTEX_STREAM3_ATI 0x876F
17545+#define GL_VERTEX_STREAM4_ATI 0x8770
17546+#define GL_VERTEX_STREAM5_ATI 0x8771
17547+#define GL_VERTEX_STREAM6_ATI 0x8772
17548+#define GL_VERTEX_STREAM7_ATI 0x8773
17549+#define GL_VERTEX_SOURCE_ATI 0x8774
17550+#endif
17551+
17552+#ifndef GL_ATI_element_array
17553+#define GL_ELEMENT_ARRAY_ATI 0x8768
17554+#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769
17555+#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A
17556+#endif
17557+
17558+#ifndef GL_SUN_mesh_array
17559+#define GL_QUAD_MESH_SUN 0x8614
17560+#define GL_TRIANGLE_MESH_SUN 0x8615
17561+#endif
17562+
17563+#ifndef GL_SUN_slice_accum
17564+#define GL_SLICE_ACCUM_SUN 0x85CC
17565+#endif
17566+
17567+#ifndef GL_NV_multisample_filter_hint
17568+#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534
17569+#endif
17570+
17571+#ifndef GL_NV_depth_clamp
17572+#define GL_DEPTH_CLAMP_NV 0x864F
17573+#endif
17574+
17575+#ifndef GL_NV_occlusion_query
17576+#define GL_PIXEL_COUNTER_BITS_NV 0x8864
17577+#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865
17578+#define GL_PIXEL_COUNT_NV 0x8866
17579+#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867
17580+#endif
17581+
17582+#ifndef GL_NV_point_sprite
17583+#define GL_POINT_SPRITE_NV 0x8861
17584+#define GL_COORD_REPLACE_NV 0x8862
17585+#define GL_POINT_SPRITE_R_MODE_NV 0x8863
17586+#endif
17587+
17588+#ifndef GL_NV_texture_shader3
17589+#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850
17590+#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851
17591+#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852
17592+#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853
17593+#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854
17594+#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855
17595+#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856
17596+#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857
17597+#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858
17598+#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859
17599+#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A
17600+#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B
17601+#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C
17602+#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D
17603+#define GL_HILO8_NV 0x885E
17604+#define GL_SIGNED_HILO8_NV 0x885F
17605+#define GL_FORCE_BLUE_TO_ONE_NV 0x8860
17606+#endif
17607+
17608+#ifndef GL_NV_vertex_program1_1
17609+#endif
17610+
17611+#ifndef GL_EXT_shadow_funcs
17612+#endif
17613+
17614+#ifndef GL_EXT_stencil_two_side
17615+#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910
17616+#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911
17617+#endif
17618+
17619+#ifndef GL_ATI_text_fragment_shader
17620+#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200
17621+#endif
17622+
17623+#ifndef GL_APPLE_client_storage
17624+#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2
17625+#endif
17626+
17627+#ifndef GL_APPLE_element_array
17628+#define GL_ELEMENT_ARRAY_APPLE 0x8768
17629+#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8769
17630+#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x876A
17631+#endif
17632+
17633+#ifndef GL_APPLE_fence
17634+#define GL_DRAW_PIXELS_APPLE 0x8A0A
17635+#define GL_FENCE_APPLE 0x8A0B
17636+#endif
17637+
17638+#ifndef GL_APPLE_vertex_array_object
17639+#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5
17640+#endif
17641+
17642+#ifndef GL_APPLE_vertex_array_range
17643+#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D
17644+#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E
17645+#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F
17646+#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521
17647+#define GL_STORAGE_CACHED_APPLE 0x85BE
17648+#define GL_STORAGE_SHARED_APPLE 0x85BF
17649+#endif
17650+
17651+#ifndef GL_APPLE_ycbcr_422
17652+#define GL_YCBCR_422_APPLE 0x85B9
17653+#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
17654+#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
17655+#endif
17656+
17657+#ifndef GL_S3_s3tc
17658+#define GL_RGB_S3TC 0x83A0
17659+#define GL_RGB4_S3TC 0x83A1
17660+#define GL_RGBA_S3TC 0x83A2
17661+#define GL_RGBA4_S3TC 0x83A3
17662+#endif
17663+
17664+#ifndef GL_ATI_draw_buffers
17665+#define GL_MAX_DRAW_BUFFERS_ATI 0x8824
17666+#define GL_DRAW_BUFFER0_ATI 0x8825
17667+#define GL_DRAW_BUFFER1_ATI 0x8826
17668+#define GL_DRAW_BUFFER2_ATI 0x8827
17669+#define GL_DRAW_BUFFER3_ATI 0x8828
17670+#define GL_DRAW_BUFFER4_ATI 0x8829
17671+#define GL_DRAW_BUFFER5_ATI 0x882A
17672+#define GL_DRAW_BUFFER6_ATI 0x882B
17673+#define GL_DRAW_BUFFER7_ATI 0x882C
17674+#define GL_DRAW_BUFFER8_ATI 0x882D
17675+#define GL_DRAW_BUFFER9_ATI 0x882E
17676+#define GL_DRAW_BUFFER10_ATI 0x882F
17677+#define GL_DRAW_BUFFER11_ATI 0x8830
17678+#define GL_DRAW_BUFFER12_ATI 0x8831
17679+#define GL_DRAW_BUFFER13_ATI 0x8832
17680+#define GL_DRAW_BUFFER14_ATI 0x8833
17681+#define GL_DRAW_BUFFER15_ATI 0x8834
17682+#endif
17683+
17684+#ifndef GL_ATI_pixel_format_float
17685+#define GL_TYPE_RGBA_FLOAT_ATI 0x8820
17686+#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
17687+#endif
17688+
17689+#ifndef GL_ATI_texture_env_combine3
17690+#define GL_MODULATE_ADD_ATI 0x8744
17691+#define GL_MODULATE_SIGNED_ADD_ATI 0x8745
17692+#define GL_MODULATE_SUBTRACT_ATI 0x8746
17693+#endif
17694+
17695+#ifndef GL_ATI_texture_float
17696+#define GL_RGBA_FLOAT32_ATI 0x8814
17697+#define GL_RGB_FLOAT32_ATI 0x8815
17698+#define GL_ALPHA_FLOAT32_ATI 0x8816
17699+#define GL_INTENSITY_FLOAT32_ATI 0x8817
17700+#define GL_LUMINANCE_FLOAT32_ATI 0x8818
17701+#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819
17702+#define GL_RGBA_FLOAT16_ATI 0x881A
17703+#define GL_RGB_FLOAT16_ATI 0x881B
17704+#define GL_ALPHA_FLOAT16_ATI 0x881C
17705+#define GL_INTENSITY_FLOAT16_ATI 0x881D
17706+#define GL_LUMINANCE_FLOAT16_ATI 0x881E
17707+#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F
17708+#endif
17709+
17710+#ifndef GL_NV_float_buffer
17711+#define GL_FLOAT_R_NV 0x8880
17712+#define GL_FLOAT_RG_NV 0x8881
17713+#define GL_FLOAT_RGB_NV 0x8882
17714+#define GL_FLOAT_RGBA_NV 0x8883
17715+#define GL_FLOAT_R16_NV 0x8884
17716+#define GL_FLOAT_R32_NV 0x8885
17717+#define GL_FLOAT_RG16_NV 0x8886
17718+#define GL_FLOAT_RG32_NV 0x8887
17719+#define GL_FLOAT_RGB16_NV 0x8888
17720+#define GL_FLOAT_RGB32_NV 0x8889
17721+#define GL_FLOAT_RGBA16_NV 0x888A
17722+#define GL_FLOAT_RGBA32_NV 0x888B
17723+#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C
17724+#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D
17725+#define GL_FLOAT_RGBA_MODE_NV 0x888E
17726+#endif
17727+
17728+#ifndef GL_NV_fragment_program
17729+#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868
17730+#define GL_FRAGMENT_PROGRAM_NV 0x8870
17731+#define GL_MAX_TEXTURE_COORDS_NV 0x8871
17732+#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872
17733+#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873
17734+#define GL_PROGRAM_ERROR_STRING_NV 0x8874
17735+#endif
17736+
17737+#ifndef GL_NV_half_float
17738+#define GL_HALF_FLOAT_NV 0x140B
17739+#endif
17740+
17741+#ifndef GL_NV_pixel_data_range
17742+#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878
17743+#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879
17744+#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A
17745+#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B
17746+#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C
17747+#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D
17748+#endif
17749+
17750+#ifndef GL_NV_primitive_restart
17751+#define GL_PRIMITIVE_RESTART_NV 0x8558
17752+#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559
17753+#endif
17754+
17755+#ifndef GL_NV_texture_expand_normal
17756+#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F
17757+#endif
17758+
17759+#ifndef GL_NV_vertex_program2
17760+#endif
17761+
17762+#ifndef GL_ATI_map_object_buffer
17763+#endif
17764+
17765+#ifndef GL_ATI_separate_stencil
17766+#define GL_STENCIL_BACK_FUNC_ATI 0x8800
17767+#define GL_STENCIL_BACK_FAIL_ATI 0x8801
17768+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802
17769+#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803
17770+#endif
17771+
17772+#ifndef GL_ATI_vertex_attrib_array_object
17773+#endif
17774+
17775+#ifndef GL_OES_read_format
17776+#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
17777+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
17778+#endif
17779+
17780+#ifndef GL_EXT_depth_bounds_test
17781+#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890
17782+#define GL_DEPTH_BOUNDS_EXT 0x8891
17783+#endif
17784+
17785+#ifndef GL_EXT_texture_mirror_clamp
17786+#define GL_MIRROR_CLAMP_EXT 0x8742
17787+#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743
17788+#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912
17789+#endif
17790+
17791+#ifndef GL_EXT_blend_equation_separate
17792+#define GL_BLEND_EQUATION_RGB_EXT GL_BLEND_EQUATION
17793+#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D
17794+#endif
17795+
17796+#ifndef GL_MESA_pack_invert
17797+#define GL_PACK_INVERT_MESA 0x8758
17798+#endif
17799+
17800+#ifndef GL_MESA_ycbcr_texture
17801+#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA
17802+#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB
17803+#define GL_YCBCR_MESA 0x8757
17804+#endif
17805+
17806+#ifndef GL_EXT_pixel_buffer_object
17807+#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB
17808+#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC
17809+#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED
17810+#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF
17811+#endif
17812+
17813+#ifndef GL_NV_fragment_program_option
17814+#endif
17815+
17816+#ifndef GL_NV_fragment_program2
17817+#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4
17818+#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5
17819+#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6
17820+#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7
17821+#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8
17822+#endif
17823+
17824+#ifndef GL_NV_vertex_program2_option
17825+/* reuse GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
17826+/* reuse GL_MAX_PROGRAM_CALL_DEPTH_NV */
17827+#endif
17828+
17829+#ifndef GL_NV_vertex_program3
17830+/* reuse GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
17831+#endif
17832+
17833+#ifndef GL_EXT_framebuffer_object
17834+#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
17835+#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8
17836+#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6
17837+#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7
17838+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
17839+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
17840+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
17841+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
17842+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
17843+#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
17844+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
17845+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
17846+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
17847+#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
17848+#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
17849+#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
17850+#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD
17851+#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
17852+#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
17853+#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
17854+#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
17855+#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
17856+#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
17857+#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
17858+#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
17859+#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
17860+#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
17861+#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
17862+#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
17863+#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
17864+#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
17865+#define GL_COLOR_ATTACHMENT13_EXT 0x8CED
17866+#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
17867+#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
17868+#define GL_DEPTH_ATTACHMENT_EXT 0x8D00
17869+#define GL_STENCIL_ATTACHMENT_EXT 0x8D20
17870+#define GL_FRAMEBUFFER_EXT 0x8D40
17871+#define GL_RENDERBUFFER_EXT 0x8D41
17872+#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42
17873+#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43
17874+#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
17875+#define GL_STENCIL_INDEX1_EXT 0x8D46
17876+#define GL_STENCIL_INDEX4_EXT 0x8D47
17877+#define GL_STENCIL_INDEX8_EXT 0x8D48
17878+#define GL_STENCIL_INDEX16_EXT 0x8D49
17879+#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50
17880+#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51
17881+#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52
17882+#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53
17883+#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54
17884+#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55
17885+#endif
17886+
17887+#ifndef GL_GREMEDY_string_marker
17888+#endif
17889+
17890+#ifndef GL_EXT_packed_depth_stencil
17891+#define GL_DEPTH_STENCIL_EXT 0x84F9
17892+#define GL_UNSIGNED_INT_24_8_EXT 0x84FA
17893+#define GL_DEPTH24_STENCIL8_EXT 0x88F0
17894+#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1
17895+#endif
17896+
17897+#ifndef GL_EXT_stencil_clear_tag
17898+#define GL_STENCIL_TAG_BITS_EXT 0x88F2
17899+#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3
17900+#endif
17901+
17902+#ifndef GL_EXT_texture_sRGB
17903+#define GL_SRGB_EXT 0x8C40
17904+#define GL_SRGB8_EXT 0x8C41
17905+#define GL_SRGB_ALPHA_EXT 0x8C42
17906+#define GL_SRGB8_ALPHA8_EXT 0x8C43
17907+#define GL_SLUMINANCE_ALPHA_EXT 0x8C44
17908+#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45
17909+#define GL_SLUMINANCE_EXT 0x8C46
17910+#define GL_SLUMINANCE8_EXT 0x8C47
17911+#define GL_COMPRESSED_SRGB_EXT 0x8C48
17912+#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49
17913+#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A
17914+#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B
17915+#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
17916+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
17917+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
17918+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
17919+#endif
17920+
17921+#ifndef GL_EXT_framebuffer_blit
17922+#define GL_READ_FRAMEBUFFER_EXT 0x8CA8
17923+#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
17924+#define GL_READ_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT
17925+#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CAA
17926+#endif
17927+
17928+#ifndef GL_EXT_framebuffer_multisample
17929+#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
17930+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
17931+#define GL_MAX_SAMPLES_EXT 0x8D57
17932+#endif
17933+
17934+#ifndef GL_MESAX_texture_stack
17935+#define GL_TEXTURE_1D_STACK_MESAX 0x8759
17936+#define GL_TEXTURE_2D_STACK_MESAX 0x875A
17937+#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B
17938+#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C
17939+#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D
17940+#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E
17941+#endif
17942+
17943+#ifndef GL_EXT_timer_query
17944+#define GL_TIME_ELAPSED_EXT 0x88BF
17945+#endif
17946+
17947+#ifndef GL_EXT_gpu_program_parameters
17948+#endif
17949+
17950+#ifndef GL_APPLE_flush_buffer_range
17951+#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12
17952+#define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13
17953+#endif
17954+
17955+#ifndef GL_NV_gpu_program4
17956+#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904
17957+#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905
17958+#define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906
17959+#define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907
17960+#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908
17961+#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909
17962+#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5
17963+#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6
17964+#endif
17965+
17966+#ifndef GL_NV_geometry_program4
17967+#define GL_LINES_ADJACENCY_EXT 0x000A
17968+#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B
17969+#define GL_TRIANGLES_ADJACENCY_EXT 0x000C
17970+#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D
17971+#define GL_GEOMETRY_PROGRAM_NV 0x8C26
17972+#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27
17973+#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28
17974+#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA
17975+#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB
17976+#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC
17977+#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
17978+#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
17979+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
17980+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9
17981+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
17982+#define GL_PROGRAM_POINT_SIZE_EXT 0x8642
17983+#endif
17984+
17985+#ifndef GL_EXT_geometry_shader4
17986+#define GL_GEOMETRY_SHADER_EXT 0x8DD9
17987+/* reuse GL_GEOMETRY_VERTICES_OUT_EXT */
17988+/* reuse GL_GEOMETRY_INPUT_TYPE_EXT */
17989+/* reuse GL_GEOMETRY_OUTPUT_TYPE_EXT */
17990+/* reuse GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT */
17991+#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD
17992+#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE
17993+#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B
17994+#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
17995+#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
17996+#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
17997+/* reuse GL_LINES_ADJACENCY_EXT */
17998+/* reuse GL_LINE_STRIP_ADJACENCY_EXT */
17999+/* reuse GL_TRIANGLES_ADJACENCY_EXT */
18000+/* reuse GL_TRIANGLE_STRIP_ADJACENCY_EXT */
18001+/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT */
18002+/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT */
18003+/* reuse GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT */
18004+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
18005+/* reuse GL_PROGRAM_POINT_SIZE_EXT */
18006+#endif
18007+
18008+#ifndef GL_NV_vertex_program4
18009+#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD
18010+#endif
18011+
18012+#ifndef GL_EXT_gpu_shader4
18013+#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0
18014+#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1
18015+#define GL_SAMPLER_BUFFER_EXT 0x8DC2
18016+#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3
18017+#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4
18018+#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5
18019+#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6
18020+#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7
18021+#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8
18022+#define GL_INT_SAMPLER_1D_EXT 0x8DC9
18023+#define GL_INT_SAMPLER_2D_EXT 0x8DCA
18024+#define GL_INT_SAMPLER_3D_EXT 0x8DCB
18025+#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC
18026+#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD
18027+#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE
18028+#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF
18029+#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0
18030+#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1
18031+#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2
18032+#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3
18033+#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4
18034+#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5
18035+#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6
18036+#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7
18037+#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8
18038+#endif
18039+
18040+#ifndef GL_EXT_draw_instanced
18041+#endif
18042+
18043+#ifndef GL_EXT_packed_float
18044+#define GL_R11F_G11F_B10F_EXT 0x8C3A
18045+#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B
18046+#define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C
18047+#endif
18048+
18049+#ifndef GL_EXT_texture_array
18050+#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18
18051+#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19
18052+#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A
18053+#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B
18054+#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C
18055+#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D
18056+#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF
18057+#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E
18058+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
18059+#endif
18060+
18061+#ifndef GL_EXT_texture_buffer_object
18062+#define GL_TEXTURE_BUFFER_EXT 0x8C2A
18063+#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B
18064+#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C
18065+#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D
18066+#define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E
18067+#endif
18068+
18069+#ifndef GL_EXT_texture_compression_latc
18070+#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70
18071+#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71
18072+#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72
18073+#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73
18074+#endif
18075+
18076+#ifndef GL_EXT_texture_compression_rgtc
18077+#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB
18078+#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC
18079+#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD
18080+#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE
18081+#endif
18082+
18083+#ifndef GL_EXT_texture_shared_exponent
18084+#define GL_RGB9_E5_EXT 0x8C3D
18085+#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E
18086+#define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F
18087+#endif
18088+
18089+#ifndef GL_NV_depth_buffer_float
18090+#define GL_DEPTH_COMPONENT32F_NV 0x8DAB
18091+#define GL_DEPTH32F_STENCIL8_NV 0x8DAC
18092+#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD
18093+#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF
18094+#endif
18095+
18096+#ifndef GL_NV_fragment_program4
18097+#endif
18098+
18099+#ifndef GL_NV_framebuffer_multisample_coverage
18100+#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB
18101+#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10
18102+#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11
18103+#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12
18104+#endif
18105+
18106+#ifndef GL_EXT_framebuffer_sRGB
18107+#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9
18108+#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA
18109+#endif
18110+
18111+#ifndef GL_NV_geometry_shader4
18112+#endif
18113+
18114+#ifndef GL_NV_parameter_buffer_object
18115+#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0
18116+#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1
18117+#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2
18118+#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3
18119+#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4
18120+#endif
18121+
18122+#ifndef GL_EXT_draw_buffers2
18123+#endif
18124+
18125+#ifndef GL_NV_transform_feedback
18126+#define GL_BACK_PRIMARY_COLOR_NV 0x8C77
18127+#define GL_BACK_SECONDARY_COLOR_NV 0x8C78
18128+#define GL_TEXTURE_COORD_NV 0x8C79
18129+#define GL_CLIP_DISTANCE_NV 0x8C7A
18130+#define GL_VERTEX_ID_NV 0x8C7B
18131+#define GL_PRIMITIVE_ID_NV 0x8C7C
18132+#define GL_GENERIC_ATTRIB_NV 0x8C7D
18133+#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E
18134+#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F
18135+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80
18136+#define GL_ACTIVE_VARYINGS_NV 0x8C81
18137+#define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82
18138+#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83
18139+#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84
18140+#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85
18141+#define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86
18142+#define GL_PRIMITIVES_GENERATED_NV 0x8C87
18143+#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88
18144+#define GL_RASTERIZER_DISCARD_NV 0x8C89
18145+#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_ATTRIBS_NV 0x8C8A
18146+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B
18147+#define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C
18148+#define GL_SEPARATE_ATTRIBS_NV 0x8C8D
18149+#define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E
18150+#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F
18151+#endif
18152+
18153+#ifndef GL_EXT_bindable_uniform
18154+#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2
18155+#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3
18156+#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4
18157+#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED
18158+#define GL_UNIFORM_BUFFER_EXT 0x8DEE
18159+#define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF
18160+#endif
18161+
18162+#ifndef GL_EXT_texture_integer
18163+#define GL_RGBA32UI_EXT 0x8D70
18164+#define GL_RGB32UI_EXT 0x8D71
18165+#define GL_ALPHA32UI_EXT 0x8D72
18166+#define GL_INTENSITY32UI_EXT 0x8D73
18167+#define GL_LUMINANCE32UI_EXT 0x8D74
18168+#define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75
18169+#define GL_RGBA16UI_EXT 0x8D76
18170+#define GL_RGB16UI_EXT 0x8D77
18171+#define GL_ALPHA16UI_EXT 0x8D78
18172+#define GL_INTENSITY16UI_EXT 0x8D79
18173+#define GL_LUMINANCE16UI_EXT 0x8D7A
18174+#define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B
18175+#define GL_RGBA8UI_EXT 0x8D7C
18176+#define GL_RGB8UI_EXT 0x8D7D
18177+#define GL_ALPHA8UI_EXT 0x8D7E
18178+#define GL_INTENSITY8UI_EXT 0x8D7F
18179+#define GL_LUMINANCE8UI_EXT 0x8D80
18180+#define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81
18181+#define GL_RGBA32I_EXT 0x8D82
18182+#define GL_RGB32I_EXT 0x8D83
18183+#define GL_ALPHA32I_EXT 0x8D84
18184+#define GL_INTENSITY32I_EXT 0x8D85
18185+#define GL_LUMINANCE32I_EXT 0x8D86
18186+#define GL_LUMINANCE_ALPHA32I_EXT 0x8D87
18187+#define GL_RGBA16I_EXT 0x8D88
18188+#define GL_RGB16I_EXT 0x8D89
18189+#define GL_ALPHA16I_EXT 0x8D8A
18190+#define GL_INTENSITY16I_EXT 0x8D8B
18191+#define GL_LUMINANCE16I_EXT 0x8D8C
18192+#define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D
18193+#define GL_RGBA8I_EXT 0x8D8E
18194+#define GL_RGB8I_EXT 0x8D8F
18195+#define GL_ALPHA8I_EXT 0x8D90
18196+#define GL_INTENSITY8I_EXT 0x8D91
18197+#define GL_LUMINANCE8I_EXT 0x8D92
18198+#define GL_LUMINANCE_ALPHA8I_EXT 0x8D93
18199+#define GL_RED_INTEGER_EXT 0x8D94
18200+#define GL_GREEN_INTEGER_EXT 0x8D95
18201+#define GL_BLUE_INTEGER_EXT 0x8D96
18202+#define GL_ALPHA_INTEGER_EXT 0x8D97
18203+#define GL_RGB_INTEGER_EXT 0x8D98
18204+#define GL_RGBA_INTEGER_EXT 0x8D99
18205+#define GL_BGR_INTEGER_EXT 0x8D9A
18206+#define GL_BGRA_INTEGER_EXT 0x8D9B
18207+#define GL_LUMINANCE_INTEGER_EXT 0x8D9C
18208+#define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D
18209+#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E
18210+#endif
18211+
18212+
18213+/*************************************************************/
18214+
18215+#include <stddef.h>
18216+#ifndef GL_VERSION_2_0
18217+/* GL type for program/shader text */
18218+typedef char GLchar; /* native character */
18219+#endif
18220+
18221+#ifndef GL_VERSION_1_5
18222+/* GL types for handling large vertex buffer objects */
18223+typedef ptrdiff_t GLintptr;
18224+typedef ptrdiff_t GLsizeiptr;
18225+#endif
18226+
18227+#ifndef GL_ARB_vertex_buffer_object
18228+/* GL types for handling large vertex buffer objects */
18229+typedef ptrdiff_t GLintptrARB;
18230+typedef ptrdiff_t GLsizeiptrARB;
18231+#endif
18232+
18233+#ifndef GL_ARB_shader_objects
18234+/* GL types for handling shader object handles and program/shader text */
18235+typedef char GLcharARB; /* native character */
18236+typedef unsigned int GLhandleARB; /* shader object handle */
18237+#endif
18238+
18239+/* GL types for "half" precision (s10e5) float data in host memory */
18240+#ifndef GL_ARB_half_float_pixel
18241+typedef unsigned short GLhalfARB;
18242+#endif
18243+
18244+#ifndef GL_NV_half_float
18245+typedef unsigned short GLhalfNV;
18246+#endif
18247+
18248+#ifndef GLEXT_64_TYPES_DEFINED
18249+/* This code block is duplicated in glext.h, so must be protected */
18250+#define GLEXT_64_TYPES_DEFINED
18251+/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
18252+/* (as used in the GL_EXT_timer_query extension). */
18253+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
18254+#include <inttypes.h>
18255+#elif defined(__sun__)
18256+#include <inttypes.h>
18257+#if defined(__STDC__)
18258+#if defined(__arch64__)
18259+typedef long int int64_t;
18260+typedef unsigned long int uint64_t;
18261+#else
18262+typedef long long int int64_t;
18263+typedef unsigned long long int uint64_t;
18264+#endif /* __arch64__ */
18265+#endif /* __STDC__ */
18266+#elif defined( __VMS )
18267+#include <inttypes.h>
18268+#elif defined(__SCO__) || defined(__USLC__)
18269+#include <stdint.h>
18270+#elif defined(__UNIXOS2__) || defined(__SOL64__)
18271+typedef long int int32_t;
18272+typedef long long int int64_t;
18273+typedef unsigned long long int uint64_t;
18274+#elif defined(_WIN32) && defined(__GNUC__)
18275+#include <stdint.h>
18276+#elif defined(_WIN32)
18277+typedef __int32 int32_t;
18278+typedef __int64 int64_t;
18279+typedef unsigned __int64 uint64_t;
18280+#else
18281+#include <inttypes.h> /* Fallback option */
18282+#endif
18283+#endif
18284+
18285+#ifndef GL_EXT_timer_query
18286+typedef int64_t GLint64EXT;
18287+typedef uint64_t GLuint64EXT;
18288+#endif
18289+
18290+#ifndef GL_VERSION_1_2
18291+#define GL_VERSION_1_2 1
18292+#ifdef GL_GLEXT_PROTOTYPES
18293+GLAPI void APIENTRY glBlendColor (GLclampf, GLclampf, GLclampf, GLclampf);
18294+GLAPI void APIENTRY glBlendEquation (GLenum);
18295+GLAPI void APIENTRY glDrawRangeElements (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
18296+GLAPI void APIENTRY glColorTable (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
18297+GLAPI void APIENTRY glColorTableParameterfv (GLenum, GLenum, const GLfloat *);
18298+GLAPI void APIENTRY glColorTableParameteriv (GLenum, GLenum, const GLint *);
18299+GLAPI void APIENTRY glCopyColorTable (GLenum, GLenum, GLint, GLint, GLsizei);
18300+GLAPI void APIENTRY glGetColorTable (GLenum, GLenum, GLenum, GLvoid *);
18301+GLAPI void APIENTRY glGetColorTableParameterfv (GLenum, GLenum, GLfloat *);
18302+GLAPI void APIENTRY glGetColorTableParameteriv (GLenum, GLenum, GLint *);
18303+GLAPI void APIENTRY glColorSubTable (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
18304+GLAPI void APIENTRY glCopyColorSubTable (GLenum, GLsizei, GLint, GLint, GLsizei);
18305+GLAPI void APIENTRY glConvolutionFilter1D (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
18306+GLAPI void APIENTRY glConvolutionFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
18307+GLAPI void APIENTRY glConvolutionParameterf (GLenum, GLenum, GLfloat);
18308+GLAPI void APIENTRY glConvolutionParameterfv (GLenum, GLenum, const GLfloat *);
18309+GLAPI void APIENTRY glConvolutionParameteri (GLenum, GLenum, GLint);
18310+GLAPI void APIENTRY glConvolutionParameteriv (GLenum, GLenum, const GLint *);
18311+GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum, GLenum, GLint, GLint, GLsizei);
18312+GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
18313+GLAPI void APIENTRY glGetConvolutionFilter (GLenum, GLenum, GLenum, GLvoid *);
18314+GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum, GLenum, GLfloat *);
18315+GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum, GLenum, GLint *);
18316+GLAPI void APIENTRY glGetSeparableFilter (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
18317+GLAPI void APIENTRY glSeparableFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
18318+GLAPI void APIENTRY glGetHistogram (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
18319+GLAPI void APIENTRY glGetHistogramParameterfv (GLenum, GLenum, GLfloat *);
18320+GLAPI void APIENTRY glGetHistogramParameteriv (GLenum, GLenum, GLint *);
18321+GLAPI void APIENTRY glGetMinmax (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
18322+GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum, GLenum, GLfloat *);
18323+GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum, GLenum, GLint *);
18324+GLAPI void APIENTRY glHistogram (GLenum, GLsizei, GLenum, GLboolean);
18325+GLAPI void APIENTRY glMinmax (GLenum, GLenum, GLboolean);
18326+GLAPI void APIENTRY glResetHistogram (GLenum);
18327+GLAPI void APIENTRY glResetMinmax (GLenum);
18328+GLAPI void APIENTRY glTexImage3D (GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
18329+GLAPI void APIENTRY glTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
18330+GLAPI void APIENTRY glCopyTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
18331+#endif /* GL_GLEXT_PROTOTYPES */
18332+typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
18333+typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
18334+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
18335+typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
18336+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
18337+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
18338+typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
18339+typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
18340+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
18341+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18342+typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
18343+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
18344+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
18345+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
18346+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
18347+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
18348+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
18349+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
18350+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
18351+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
18352+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
18353+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
18354+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18355+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
18356+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
18357+typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
18358+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
18359+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18360+typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
18361+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
18362+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18363+typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
18364+typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
18365+typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
18366+typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
18367+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);
18368+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);
18369+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
18370+#endif
18371+
18372+#ifndef GL_VERSION_1_3
18373+#define GL_VERSION_1_3 1
18374+#ifdef GL_GLEXT_PROTOTYPES
18375+GLAPI void APIENTRY glActiveTexture (GLenum);
18376+GLAPI void APIENTRY glClientActiveTexture (GLenum);
18377+GLAPI void APIENTRY glMultiTexCoord1d (GLenum, GLdouble);
18378+GLAPI void APIENTRY glMultiTexCoord1dv (GLenum, const GLdouble *);
18379+GLAPI void APIENTRY glMultiTexCoord1f (GLenum, GLfloat);
18380+GLAPI void APIENTRY glMultiTexCoord1fv (GLenum, const GLfloat *);
18381+GLAPI void APIENTRY glMultiTexCoord1i (GLenum, GLint);
18382+GLAPI void APIENTRY glMultiTexCoord1iv (GLenum, const GLint *);
18383+GLAPI void APIENTRY glMultiTexCoord1s (GLenum, GLshort);
18384+GLAPI void APIENTRY glMultiTexCoord1sv (GLenum, const GLshort *);
18385+GLAPI void APIENTRY glMultiTexCoord2d (GLenum, GLdouble, GLdouble);
18386+GLAPI void APIENTRY glMultiTexCoord2dv (GLenum, const GLdouble *);
18387+GLAPI void APIENTRY glMultiTexCoord2f (GLenum, GLfloat, GLfloat);
18388+GLAPI void APIENTRY glMultiTexCoord2fv (GLenum, const GLfloat *);
18389+GLAPI void APIENTRY glMultiTexCoord2i (GLenum, GLint, GLint);
18390+GLAPI void APIENTRY glMultiTexCoord2iv (GLenum, const GLint *);
18391+GLAPI void APIENTRY glMultiTexCoord2s (GLenum, GLshort, GLshort);
18392+GLAPI void APIENTRY glMultiTexCoord2sv (GLenum, const GLshort *);
18393+GLAPI void APIENTRY glMultiTexCoord3d (GLenum, GLdouble, GLdouble, GLdouble);
18394+GLAPI void APIENTRY glMultiTexCoord3dv (GLenum, const GLdouble *);
18395+GLAPI void APIENTRY glMultiTexCoord3f (GLenum, GLfloat, GLfloat, GLfloat);
18396+GLAPI void APIENTRY glMultiTexCoord3fv (GLenum, const GLfloat *);
18397+GLAPI void APIENTRY glMultiTexCoord3i (GLenum, GLint, GLint, GLint);
18398+GLAPI void APIENTRY glMultiTexCoord3iv (GLenum, const GLint *);
18399+GLAPI void APIENTRY glMultiTexCoord3s (GLenum, GLshort, GLshort, GLshort);
18400+GLAPI void APIENTRY glMultiTexCoord3sv (GLenum, const GLshort *);
18401+GLAPI void APIENTRY glMultiTexCoord4d (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
18402+GLAPI void APIENTRY glMultiTexCoord4dv (GLenum, const GLdouble *);
18403+GLAPI void APIENTRY glMultiTexCoord4f (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
18404+GLAPI void APIENTRY glMultiTexCoord4fv (GLenum, const GLfloat *);
18405+GLAPI void APIENTRY glMultiTexCoord4i (GLenum, GLint, GLint, GLint, GLint);
18406+GLAPI void APIENTRY glMultiTexCoord4iv (GLenum, const GLint *);
18407+GLAPI void APIENTRY glMultiTexCoord4s (GLenum, GLshort, GLshort, GLshort, GLshort);
18408+GLAPI void APIENTRY glMultiTexCoord4sv (GLenum, const GLshort *);
18409+GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *);
18410+GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *);
18411+GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *);
18412+GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *);
18413+GLAPI void APIENTRY glSampleCoverage (GLclampf, GLboolean);
18414+GLAPI void APIENTRY glCompressedTexImage3D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
18415+GLAPI void APIENTRY glCompressedTexImage2D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
18416+GLAPI void APIENTRY glCompressedTexImage1D (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
18417+GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
18418+GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
18419+GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
18420+GLAPI void APIENTRY glGetCompressedTexImage (GLenum, GLint, GLvoid *);
18421+#endif /* GL_GLEXT_PROTOTYPES */
18422+typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
18423+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
18424+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
18425+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
18426+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
18427+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
18428+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
18429+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
18430+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
18431+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
18432+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
18433+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
18434+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
18435+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
18436+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
18437+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
18438+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
18439+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
18440+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
18441+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
18442+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
18443+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
18444+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
18445+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
18446+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
18447+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
18448+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
18449+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
18450+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
18451+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
18452+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
18453+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
18454+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
18455+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
18456+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
18457+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
18458+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
18459+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
18460+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
18461+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
18462+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
18463+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
18464+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);
18465+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
18466+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
18467+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img);
18468+#endif
18469+
18470+#ifndef GL_VERSION_1_4
18471+#define GL_VERSION_1_4 1
18472+#ifdef GL_GLEXT_PROTOTYPES
18473+GLAPI void APIENTRY glBlendFuncSeparate (GLenum, GLenum, GLenum, GLenum);
18474+GLAPI void APIENTRY glFogCoordf (GLfloat);
18475+GLAPI void APIENTRY glFogCoordfv (const GLfloat *);
18476+GLAPI void APIENTRY glFogCoordd (GLdouble);
18477+GLAPI void APIENTRY glFogCoorddv (const GLdouble *);
18478+GLAPI void APIENTRY glFogCoordPointer (GLenum, GLsizei, const GLvoid *);
18479+GLAPI void APIENTRY glMultiDrawArrays (GLenum, GLint *, GLsizei *, GLsizei);
18480+GLAPI void APIENTRY glMultiDrawElements (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
18481+GLAPI void APIENTRY glPointParameterf (GLenum, GLfloat);
18482+GLAPI void APIENTRY glPointParameterfv (GLenum, const GLfloat *);
18483+GLAPI void APIENTRY glPointParameteri (GLenum, GLint);
18484+GLAPI void APIENTRY glPointParameteriv (GLenum, const GLint *);
18485+GLAPI void APIENTRY glSecondaryColor3b (GLbyte, GLbyte, GLbyte);
18486+GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *);
18487+GLAPI void APIENTRY glSecondaryColor3d (GLdouble, GLdouble, GLdouble);
18488+GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *);
18489+GLAPI void APIENTRY glSecondaryColor3f (GLfloat, GLfloat, GLfloat);
18490+GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *);
18491+GLAPI void APIENTRY glSecondaryColor3i (GLint, GLint, GLint);
18492+GLAPI void APIENTRY glSecondaryColor3iv (const GLint *);
18493+GLAPI void APIENTRY glSecondaryColor3s (GLshort, GLshort, GLshort);
18494+GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *);
18495+GLAPI void APIENTRY glSecondaryColor3ub (GLubyte, GLubyte, GLubyte);
18496+GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *);
18497+GLAPI void APIENTRY glSecondaryColor3ui (GLuint, GLuint, GLuint);
18498+GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *);
18499+GLAPI void APIENTRY glSecondaryColor3us (GLushort, GLushort, GLushort);
18500+GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *);
18501+GLAPI void APIENTRY glSecondaryColorPointer (GLint, GLenum, GLsizei, const GLvoid *);
18502+GLAPI void APIENTRY glWindowPos2d (GLdouble, GLdouble);
18503+GLAPI void APIENTRY glWindowPos2dv (const GLdouble *);
18504+GLAPI void APIENTRY glWindowPos2f (GLfloat, GLfloat);
18505+GLAPI void APIENTRY glWindowPos2fv (const GLfloat *);
18506+GLAPI void APIENTRY glWindowPos2i (GLint, GLint);
18507+GLAPI void APIENTRY glWindowPos2iv (const GLint *);
18508+GLAPI void APIENTRY glWindowPos2s (GLshort, GLshort);
18509+GLAPI void APIENTRY glWindowPos2sv (const GLshort *);
18510+GLAPI void APIENTRY glWindowPos3d (GLdouble, GLdouble, GLdouble);
18511+GLAPI void APIENTRY glWindowPos3dv (const GLdouble *);
18512+GLAPI void APIENTRY glWindowPos3f (GLfloat, GLfloat, GLfloat);
18513+GLAPI void APIENTRY glWindowPos3fv (const GLfloat *);
18514+GLAPI void APIENTRY glWindowPos3i (GLint, GLint, GLint);
18515+GLAPI void APIENTRY glWindowPos3iv (const GLint *);
18516+GLAPI void APIENTRY glWindowPos3s (GLshort, GLshort, GLshort);
18517+GLAPI void APIENTRY glWindowPos3sv (const GLshort *);
18518+#endif /* GL_GLEXT_PROTOTYPES */
18519+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
18520+typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord);
18521+typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord);
18522+typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord);
18523+typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord);
18524+typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
18525+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
18526+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
18527+typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);
18528+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params);
18529+typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param);
18530+typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params);
18531+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue);
18532+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v);
18533+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue);
18534+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v);
18535+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue);
18536+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v);
18537+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue);
18538+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v);
18539+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue);
18540+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v);
18541+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue);
18542+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v);
18543+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue);
18544+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v);
18545+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue);
18546+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v);
18547+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
18548+typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y);
18549+typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v);
18550+typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y);
18551+typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v);
18552+typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y);
18553+typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v);
18554+typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y);
18555+typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v);
18556+typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z);
18557+typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v);
18558+typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z);
18559+typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v);
18560+typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z);
18561+typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v);
18562+typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z);
18563+typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v);
18564+#endif
18565+
18566+#ifndef GL_VERSION_1_5
18567+#define GL_VERSION_1_5 1
18568+#ifdef GL_GLEXT_PROTOTYPES
18569+GLAPI void APIENTRY glGenQueries (GLsizei, GLuint *);
18570+GLAPI void APIENTRY glDeleteQueries (GLsizei, const GLuint *);
18571+GLAPI GLboolean APIENTRY glIsQuery (GLuint);
18572+GLAPI void APIENTRY glBeginQuery (GLenum, GLuint);
18573+GLAPI void APIENTRY glEndQuery (GLenum);
18574+GLAPI void APIENTRY glGetQueryiv (GLenum, GLenum, GLint *);
18575+GLAPI void APIENTRY glGetQueryObjectiv (GLuint, GLenum, GLint *);
18576+GLAPI void APIENTRY glGetQueryObjectuiv (GLuint, GLenum, GLuint *);
18577+GLAPI void APIENTRY glBindBuffer (GLenum, GLuint);
18578+GLAPI void APIENTRY glDeleteBuffers (GLsizei, const GLuint *);
18579+GLAPI void APIENTRY glGenBuffers (GLsizei, GLuint *);
18580+GLAPI GLboolean APIENTRY glIsBuffer (GLuint);
18581+GLAPI void APIENTRY glBufferData (GLenum, GLsizeiptr, const GLvoid *, GLenum);
18582+GLAPI void APIENTRY glBufferSubData (GLenum, GLintptr, GLsizeiptr, const GLvoid *);
18583+GLAPI void APIENTRY glGetBufferSubData (GLenum, GLintptr, GLsizeiptr, GLvoid *);
18584+GLAPI GLvoid* APIENTRY glMapBuffer (GLenum, GLenum);
18585+GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum);
18586+GLAPI void APIENTRY glGetBufferParameteriv (GLenum, GLenum, GLint *);
18587+GLAPI void APIENTRY glGetBufferPointerv (GLenum, GLenum, GLvoid* *);
18588+#endif /* GL_GLEXT_PROTOTYPES */
18589+typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids);
18590+typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids);
18591+typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id);
18592+typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);
18593+typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target);
18594+typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params);
18595+typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params);
18596+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params);
18597+typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
18598+typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
18599+typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
18600+typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);
18601+typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
18602+typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
18603+typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data);
18604+typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
18605+typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target);
18606+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18607+typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params);
18608+#endif
18609+
18610+#ifndef GL_VERSION_2_0
18611+#define GL_VERSION_2_0 1
18612+#ifdef GL_GLEXT_PROTOTYPES
18613+GLAPI void APIENTRY glBlendEquationSeparate (GLenum, GLenum);
18614+GLAPI void APIENTRY glDrawBuffers (GLsizei, const GLenum *);
18615+GLAPI void APIENTRY glStencilOpSeparate (GLenum, GLenum, GLenum, GLenum);
18616+GLAPI void APIENTRY glStencilFuncSeparate (GLenum, GLenum, GLint, GLuint);
18617+GLAPI void APIENTRY glStencilMaskSeparate (GLenum, GLuint);
18618+GLAPI void APIENTRY glAttachShader (GLuint, GLuint);
18619+GLAPI void APIENTRY glBindAttribLocation (GLuint, GLuint, const GLchar *);
18620+GLAPI void APIENTRY glCompileShader (GLuint);
18621+GLAPI GLuint APIENTRY glCreateProgram (void);
18622+GLAPI GLuint APIENTRY glCreateShader (GLenum);
18623+GLAPI void APIENTRY glDeleteProgram (GLuint);
18624+GLAPI void APIENTRY glDeleteShader (GLuint);
18625+GLAPI void APIENTRY glDetachShader (GLuint, GLuint);
18626+GLAPI void APIENTRY glDisableVertexAttribArray (GLuint);
18627+GLAPI void APIENTRY glEnableVertexAttribArray (GLuint);
18628+GLAPI void APIENTRY glGetActiveAttrib (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
18629+GLAPI void APIENTRY glGetActiveUniform (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
18630+GLAPI void APIENTRY glGetAttachedShaders (GLuint, GLsizei, GLsizei *, GLuint *);
18631+GLAPI GLint APIENTRY glGetAttribLocation (GLuint, const GLchar *);
18632+GLAPI void APIENTRY glGetProgramiv (GLuint, GLenum, GLint *);
18633+GLAPI void APIENTRY glGetProgramInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
18634+GLAPI void APIENTRY glGetShaderiv (GLuint, GLenum, GLint *);
18635+GLAPI void APIENTRY glGetShaderInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
18636+GLAPI void APIENTRY glGetShaderSource (GLuint, GLsizei, GLsizei *, GLchar *);
18637+GLAPI GLint APIENTRY glGetUniformLocation (GLuint, const GLchar *);
18638+GLAPI void APIENTRY glGetUniformfv (GLuint, GLint, GLfloat *);
18639+GLAPI void APIENTRY glGetUniformiv (GLuint, GLint, GLint *);
18640+GLAPI void APIENTRY glGetVertexAttribdv (GLuint, GLenum, GLdouble *);
18641+GLAPI void APIENTRY glGetVertexAttribfv (GLuint, GLenum, GLfloat *);
18642+GLAPI void APIENTRY glGetVertexAttribiv (GLuint, GLenum, GLint *);
18643+GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint, GLenum, GLvoid* *);
18644+GLAPI GLboolean APIENTRY glIsProgram (GLuint);
18645+GLAPI GLboolean APIENTRY glIsShader (GLuint);
18646+GLAPI void APIENTRY glLinkProgram (GLuint);
18647+GLAPI void APIENTRY glShaderSource (GLuint, GLsizei, const GLchar* *, const GLint *);
18648+GLAPI void APIENTRY glUseProgram (GLuint);
18649+GLAPI void APIENTRY glUniform1f (GLint, GLfloat);
18650+GLAPI void APIENTRY glUniform2f (GLint, GLfloat, GLfloat);
18651+GLAPI void APIENTRY glUniform3f (GLint, GLfloat, GLfloat, GLfloat);
18652+GLAPI void APIENTRY glUniform4f (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
18653+GLAPI void APIENTRY glUniform1i (GLint, GLint);
18654+GLAPI void APIENTRY glUniform2i (GLint, GLint, GLint);
18655+GLAPI void APIENTRY glUniform3i (GLint, GLint, GLint, GLint);
18656+GLAPI void APIENTRY glUniform4i (GLint, GLint, GLint, GLint, GLint);
18657+GLAPI void APIENTRY glUniform1fv (GLint, GLsizei, const GLfloat *);
18658+GLAPI void APIENTRY glUniform2fv (GLint, GLsizei, const GLfloat *);
18659+GLAPI void APIENTRY glUniform3fv (GLint, GLsizei, const GLfloat *);
18660+GLAPI void APIENTRY glUniform4fv (GLint, GLsizei, const GLfloat *);
18661+GLAPI void APIENTRY glUniform1iv (GLint, GLsizei, const GLint *);
18662+GLAPI void APIENTRY glUniform2iv (GLint, GLsizei, const GLint *);
18663+GLAPI void APIENTRY glUniform3iv (GLint, GLsizei, const GLint *);
18664+GLAPI void APIENTRY glUniform4iv (GLint, GLsizei, const GLint *);
18665+GLAPI void APIENTRY glUniformMatrix2fv (GLint, GLsizei, GLboolean, const GLfloat *);
18666+GLAPI void APIENTRY glUniformMatrix3fv (GLint, GLsizei, GLboolean, const GLfloat *);
18667+GLAPI void APIENTRY glUniformMatrix4fv (GLint, GLsizei, GLboolean, const GLfloat *);
18668+GLAPI void APIENTRY glValidateProgram (GLuint);
18669+GLAPI void APIENTRY glVertexAttrib1d (GLuint, GLdouble);
18670+GLAPI void APIENTRY glVertexAttrib1dv (GLuint, const GLdouble *);
18671+GLAPI void APIENTRY glVertexAttrib1f (GLuint, GLfloat);
18672+GLAPI void APIENTRY glVertexAttrib1fv (GLuint, const GLfloat *);
18673+GLAPI void APIENTRY glVertexAttrib1s (GLuint, GLshort);
18674+GLAPI void APIENTRY glVertexAttrib1sv (GLuint, const GLshort *);
18675+GLAPI void APIENTRY glVertexAttrib2d (GLuint, GLdouble, GLdouble);
18676+GLAPI void APIENTRY glVertexAttrib2dv (GLuint, const GLdouble *);
18677+GLAPI void APIENTRY glVertexAttrib2f (GLuint, GLfloat, GLfloat);
18678+GLAPI void APIENTRY glVertexAttrib2fv (GLuint, const GLfloat *);
18679+GLAPI void APIENTRY glVertexAttrib2s (GLuint, GLshort, GLshort);
18680+GLAPI void APIENTRY glVertexAttrib2sv (GLuint, const GLshort *);
18681+GLAPI void APIENTRY glVertexAttrib3d (GLuint, GLdouble, GLdouble, GLdouble);
18682+GLAPI void APIENTRY glVertexAttrib3dv (GLuint, const GLdouble *);
18683+GLAPI void APIENTRY glVertexAttrib3f (GLuint, GLfloat, GLfloat, GLfloat);
18684+GLAPI void APIENTRY glVertexAttrib3fv (GLuint, const GLfloat *);
18685+GLAPI void APIENTRY glVertexAttrib3s (GLuint, GLshort, GLshort, GLshort);
18686+GLAPI void APIENTRY glVertexAttrib3sv (GLuint, const GLshort *);
18687+GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint, const GLbyte *);
18688+GLAPI void APIENTRY glVertexAttrib4Niv (GLuint, const GLint *);
18689+GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint, const GLshort *);
18690+GLAPI void APIENTRY glVertexAttrib4Nub (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
18691+GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint, const GLubyte *);
18692+GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint, const GLuint *);
18693+GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint, const GLushort *);
18694+GLAPI void APIENTRY glVertexAttrib4bv (GLuint, const GLbyte *);
18695+GLAPI void APIENTRY glVertexAttrib4d (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
18696+GLAPI void APIENTRY glVertexAttrib4dv (GLuint, const GLdouble *);
18697+GLAPI void APIENTRY glVertexAttrib4f (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
18698+GLAPI void APIENTRY glVertexAttrib4fv (GLuint, const GLfloat *);
18699+GLAPI void APIENTRY glVertexAttrib4iv (GLuint, const GLint *);
18700+GLAPI void APIENTRY glVertexAttrib4s (GLuint, GLshort, GLshort, GLshort, GLshort);
18701+GLAPI void APIENTRY glVertexAttrib4sv (GLuint, const GLshort *);
18702+GLAPI void APIENTRY glVertexAttrib4ubv (GLuint, const GLubyte *);
18703+GLAPI void APIENTRY glVertexAttrib4uiv (GLuint, const GLuint *);
18704+GLAPI void APIENTRY glVertexAttrib4usv (GLuint, const GLushort *);
18705+GLAPI void APIENTRY glVertexAttribPointer (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
18706+#endif /* GL_GLEXT_PROTOTYPES */
18707+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
18708+typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs);
18709+typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
18710+typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
18711+typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
18712+typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
18713+typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
18714+typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
18715+typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
18716+typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
18717+typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
18718+typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
18719+typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
18720+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
18721+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
18722+typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
18723+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
18724+typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj);
18725+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
18726+typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
18727+typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
18728+typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
18729+typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
18730+typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
18731+typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
18732+typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
18733+typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
18734+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params);
18735+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
18736+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
18737+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
18738+typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
18739+typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
18740+typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
18741+typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length);
18742+typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
18743+typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
18744+typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
18745+typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
18746+typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
18747+typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
18748+typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
18749+typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
18750+typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
18751+typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18752+typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18753+typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18754+typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18755+typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
18756+typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
18757+typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
18758+typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
18759+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18760+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18761+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18762+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
18763+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);
18764+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v);
18765+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
18766+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
18767+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);
18768+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v);
18769+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);
18770+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v);
18771+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
18772+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
18773+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);
18774+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v);
18775+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
18776+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v);
18777+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
18778+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
18779+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
18780+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v);
18781+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v);
18782+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v);
18783+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v);
18784+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
18785+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v);
18786+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v);
18787+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v);
18788+typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v);
18789+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
18790+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v);
18791+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
18792+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
18793+typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v);
18794+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
18795+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v);
18796+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v);
18797+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v);
18798+typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v);
18799+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
18800+#endif
18801+
18802+#ifndef GL_VERSION_2_1
18803+#define GL_VERSION_2_1 1
18804+#ifdef GL_GLEXT_PROTOTYPES
18805+GLAPI void APIENTRY glUniformMatrix2x3fv (GLint, GLsizei, GLboolean, const GLfloat *);
18806+GLAPI void APIENTRY glUniformMatrix3x2fv (GLint, GLsizei, GLboolean, const GLfloat *);
18807+GLAPI void APIENTRY glUniformMatrix2x4fv (GLint, GLsizei, GLboolean, const GLfloat *);
18808+GLAPI void APIENTRY glUniformMatrix4x2fv (GLint, GLsizei, GLboolean, const GLfloat *);
18809+GLAPI void APIENTRY glUniformMatrix3x4fv (GLint, GLsizei, GLboolean, const GLfloat *);
18810+GLAPI void APIENTRY glUniformMatrix4x3fv (GLint, GLsizei, GLboolean, const GLfloat *);
18811+#endif /* GL_GLEXT_PROTOTYPES */
18812+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18813+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18814+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18815+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18816+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18817+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18818+#endif
18819+
18820+#ifndef GL_ARB_multitexture
18821+#define GL_ARB_multitexture 1
18822+#ifdef GL_GLEXT_PROTOTYPES
18823+GLAPI void APIENTRY glActiveTextureARB (GLenum);
18824+GLAPI void APIENTRY glClientActiveTextureARB (GLenum);
18825+GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum, GLdouble);
18826+GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum, const GLdouble *);
18827+GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum, GLfloat);
18828+GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum, const GLfloat *);
18829+GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum, GLint);
18830+GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum, const GLint *);
18831+GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum, GLshort);
18832+GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum, const GLshort *);
18833+GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum, GLdouble, GLdouble);
18834+GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum, const GLdouble *);
18835+GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum, GLfloat, GLfloat);
18836+GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum, const GLfloat *);
18837+GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum, GLint, GLint);
18838+GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum, const GLint *);
18839+GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum, GLshort, GLshort);
18840+GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum, const GLshort *);
18841+GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum, GLdouble, GLdouble, GLdouble);
18842+GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum, const GLdouble *);
18843+GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum, GLfloat, GLfloat, GLfloat);
18844+GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum, const GLfloat *);
18845+GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum, GLint, GLint, GLint);
18846+GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum, const GLint *);
18847+GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum, GLshort, GLshort, GLshort);
18848+GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum, const GLshort *);
18849+GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
18850+GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum, const GLdouble *);
18851+GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
18852+GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum, const GLfloat *);
18853+GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum, GLint, GLint, GLint, GLint);
18854+GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum, const GLint *);
18855+GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum, GLshort, GLshort, GLshort, GLshort);
18856+GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum, const GLshort *);
18857+#endif /* GL_GLEXT_PROTOTYPES */
18858+typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
18859+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
18860+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
18861+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
18862+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
18863+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
18864+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
18865+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
18866+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
18867+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
18868+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
18869+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
18870+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
18871+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
18872+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
18873+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
18874+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
18875+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
18876+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
18877+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
18878+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
18879+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
18880+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
18881+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
18882+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
18883+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
18884+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
18885+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
18886+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
18887+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
18888+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
18889+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
18890+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
18891+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
18892+#endif
18893+
18894+#ifndef GL_ARB_transpose_matrix
18895+#define GL_ARB_transpose_matrix 1
18896+#ifdef GL_GLEXT_PROTOTYPES
18897+GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *);
18898+GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *);
18899+GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *);
18900+GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *);
18901+#endif /* GL_GLEXT_PROTOTYPES */
18902+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
18903+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
18904+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
18905+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
18906+#endif
18907+
18908+#ifndef GL_ARB_multisample
18909+#define GL_ARB_multisample 1
18910+#ifdef GL_GLEXT_PROTOTYPES
18911+GLAPI void APIENTRY glSampleCoverageARB (GLclampf, GLboolean);
18912+#endif /* GL_GLEXT_PROTOTYPES */
18913+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert);
18914+#endif
18915+
18916+#ifndef GL_ARB_texture_env_add
18917+#define GL_ARB_texture_env_add 1
18918+#endif
18919+
18920+#ifndef GL_ARB_texture_cube_map
18921+#define GL_ARB_texture_cube_map 1
18922+#endif
18923+
18924+#ifndef GL_ARB_texture_compression
18925+#define GL_ARB_texture_compression 1
18926+#ifdef GL_GLEXT_PROTOTYPES
18927+GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
18928+GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
18929+GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
18930+GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
18931+GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
18932+GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
18933+GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum, GLint, GLvoid *);
18934+#endif /* GL_GLEXT_PROTOTYPES */
18935+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
18936+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
18937+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
18938+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);
18939+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
18940+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
18941+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid *img);
18942+#endif
18943+
18944+#ifndef GL_ARB_texture_border_clamp
18945+#define GL_ARB_texture_border_clamp 1
18946+#endif
18947+
18948+#ifndef GL_ARB_point_parameters
18949+#define GL_ARB_point_parameters 1
18950+#ifdef GL_GLEXT_PROTOTYPES
18951+GLAPI void APIENTRY glPointParameterfARB (GLenum, GLfloat);
18952+GLAPI void APIENTRY glPointParameterfvARB (GLenum, const GLfloat *);
18953+#endif /* GL_GLEXT_PROTOTYPES */
18954+typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param);
18955+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params);
18956+#endif
18957+
18958+#ifndef GL_ARB_vertex_blend
18959+#define GL_ARB_vertex_blend 1
18960+#ifdef GL_GLEXT_PROTOTYPES
18961+GLAPI void APIENTRY glWeightbvARB (GLint, const GLbyte *);
18962+GLAPI void APIENTRY glWeightsvARB (GLint, const GLshort *);
18963+GLAPI void APIENTRY glWeightivARB (GLint, const GLint *);
18964+GLAPI void APIENTRY glWeightfvARB (GLint, const GLfloat *);
18965+GLAPI void APIENTRY glWeightdvARB (GLint, const GLdouble *);
18966+GLAPI void APIENTRY glWeightubvARB (GLint, const GLubyte *);
18967+GLAPI void APIENTRY glWeightusvARB (GLint, const GLushort *);
18968+GLAPI void APIENTRY glWeightuivARB (GLint, const GLuint *);
18969+GLAPI void APIENTRY glWeightPointerARB (GLint, GLenum, GLsizei, const GLvoid *);
18970+GLAPI void APIENTRY glVertexBlendARB (GLint);
18971+#endif /* GL_GLEXT_PROTOTYPES */
18972+typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights);
18973+typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights);
18974+typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights);
18975+typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights);
18976+typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights);
18977+typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights);
18978+typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights);
18979+typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights);
18980+typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
18981+typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count);
18982+#endif
18983+
18984+#ifndef GL_ARB_matrix_palette
18985+#define GL_ARB_matrix_palette 1
18986+#ifdef GL_GLEXT_PROTOTYPES
18987+GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint);
18988+GLAPI void APIENTRY glMatrixIndexubvARB (GLint, const GLubyte *);
18989+GLAPI void APIENTRY glMatrixIndexusvARB (GLint, const GLushort *);
18990+GLAPI void APIENTRY glMatrixIndexuivARB (GLint, const GLuint *);
18991+GLAPI void APIENTRY glMatrixIndexPointerARB (GLint, GLenum, GLsizei, const GLvoid *);
18992+#endif /* GL_GLEXT_PROTOTYPES */
18993+typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index);
18994+typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices);
18995+typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices);
18996+typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices);
18997+typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
18998+#endif
18999+
19000+#ifndef GL_ARB_texture_env_combine
19001+#define GL_ARB_texture_env_combine 1
19002+#endif
19003+
19004+#ifndef GL_ARB_texture_env_crossbar
19005+#define GL_ARB_texture_env_crossbar 1
19006+#endif
19007+
19008+#ifndef GL_ARB_texture_env_dot3
19009+#define GL_ARB_texture_env_dot3 1
19010+#endif
19011+
19012+#ifndef GL_ARB_texture_mirrored_repeat
19013+#define GL_ARB_texture_mirrored_repeat 1
19014+#endif
19015+
19016+#ifndef GL_ARB_depth_texture
19017+#define GL_ARB_depth_texture 1
19018+#endif
19019+
19020+#ifndef GL_ARB_shadow
19021+#define GL_ARB_shadow 1
19022+#endif
19023+
19024+#ifndef GL_ARB_shadow_ambient
19025+#define GL_ARB_shadow_ambient 1
19026+#endif
19027+
19028+#ifndef GL_ARB_window_pos
19029+#define GL_ARB_window_pos 1
19030+#ifdef GL_GLEXT_PROTOTYPES
19031+GLAPI void APIENTRY glWindowPos2dARB (GLdouble, GLdouble);
19032+GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *);
19033+GLAPI void APIENTRY glWindowPos2fARB (GLfloat, GLfloat);
19034+GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *);
19035+GLAPI void APIENTRY glWindowPos2iARB (GLint, GLint);
19036+GLAPI void APIENTRY glWindowPos2ivARB (const GLint *);
19037+GLAPI void APIENTRY glWindowPos2sARB (GLshort, GLshort);
19038+GLAPI void APIENTRY glWindowPos2svARB (const GLshort *);
19039+GLAPI void APIENTRY glWindowPos3dARB (GLdouble, GLdouble, GLdouble);
19040+GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *);
19041+GLAPI void APIENTRY glWindowPos3fARB (GLfloat, GLfloat, GLfloat);
19042+GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *);
19043+GLAPI void APIENTRY glWindowPos3iARB (GLint, GLint, GLint);
19044+GLAPI void APIENTRY glWindowPos3ivARB (const GLint *);
19045+GLAPI void APIENTRY glWindowPos3sARB (GLshort, GLshort, GLshort);
19046+GLAPI void APIENTRY glWindowPos3svARB (const GLshort *);
19047+#endif /* GL_GLEXT_PROTOTYPES */
19048+typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y);
19049+typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v);
19050+typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y);
19051+typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v);
19052+typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y);
19053+typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v);
19054+typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y);
19055+typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v);
19056+typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z);
19057+typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v);
19058+typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z);
19059+typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v);
19060+typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z);
19061+typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v);
19062+typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z);
19063+typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v);
19064+#endif
19065+
19066+#ifndef GL_ARB_vertex_program
19067+#define GL_ARB_vertex_program 1
19068+#ifdef GL_GLEXT_PROTOTYPES
19069+GLAPI void APIENTRY glVertexAttrib1dARB (GLuint, GLdouble);
19070+GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint, const GLdouble *);
19071+GLAPI void APIENTRY glVertexAttrib1fARB (GLuint, GLfloat);
19072+GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint, const GLfloat *);
19073+GLAPI void APIENTRY glVertexAttrib1sARB (GLuint, GLshort);
19074+GLAPI void APIENTRY glVertexAttrib1svARB (GLuint, const GLshort *);
19075+GLAPI void APIENTRY glVertexAttrib2dARB (GLuint, GLdouble, GLdouble);
19076+GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint, const GLdouble *);
19077+GLAPI void APIENTRY glVertexAttrib2fARB (GLuint, GLfloat, GLfloat);
19078+GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint, const GLfloat *);
19079+GLAPI void APIENTRY glVertexAttrib2sARB (GLuint, GLshort, GLshort);
19080+GLAPI void APIENTRY glVertexAttrib2svARB (GLuint, const GLshort *);
19081+GLAPI void APIENTRY glVertexAttrib3dARB (GLuint, GLdouble, GLdouble, GLdouble);
19082+GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint, const GLdouble *);
19083+GLAPI void APIENTRY glVertexAttrib3fARB (GLuint, GLfloat, GLfloat, GLfloat);
19084+GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint, const GLfloat *);
19085+GLAPI void APIENTRY glVertexAttrib3sARB (GLuint, GLshort, GLshort, GLshort);
19086+GLAPI void APIENTRY glVertexAttrib3svARB (GLuint, const GLshort *);
19087+GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint, const GLbyte *);
19088+GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint, const GLint *);
19089+GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint, const GLshort *);
19090+GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
19091+GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint, const GLubyte *);
19092+GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint, const GLuint *);
19093+GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint, const GLushort *);
19094+GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint, const GLbyte *);
19095+GLAPI void APIENTRY glVertexAttrib4dARB (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
19096+GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint, const GLdouble *);
19097+GLAPI void APIENTRY glVertexAttrib4fARB (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
19098+GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint, const GLfloat *);
19099+GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint, const GLint *);
19100+GLAPI void APIENTRY glVertexAttrib4sARB (GLuint, GLshort, GLshort, GLshort, GLshort);
19101+GLAPI void APIENTRY glVertexAttrib4svARB (GLuint, const GLshort *);
19102+GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint, const GLubyte *);
19103+GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint, const GLuint *);
19104+GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint, const GLushort *);
19105+GLAPI void APIENTRY glVertexAttribPointerARB (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
19106+GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint);
19107+GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint);
19108+GLAPI void APIENTRY glProgramStringARB (GLenum, GLenum, GLsizei, const GLvoid *);
19109+GLAPI void APIENTRY glBindProgramARB (GLenum, GLuint);
19110+GLAPI void APIENTRY glDeleteProgramsARB (GLsizei, const GLuint *);
19111+GLAPI void APIENTRY glGenProgramsARB (GLsizei, GLuint *);
19112+GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
19113+GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum, GLuint, const GLdouble *);
19114+GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
19115+GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum, GLuint, const GLfloat *);
19116+GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
19117+GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum, GLuint, const GLdouble *);
19118+GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
19119+GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum, GLuint, const GLfloat *);
19120+GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum, GLuint, GLdouble *);
19121+GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum, GLuint, GLfloat *);
19122+GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum, GLuint, GLdouble *);
19123+GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum, GLuint, GLfloat *);
19124+GLAPI void APIENTRY glGetProgramivARB (GLenum, GLenum, GLint *);
19125+GLAPI void APIENTRY glGetProgramStringARB (GLenum, GLenum, GLvoid *);
19126+GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint, GLenum, GLdouble *);
19127+GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint, GLenum, GLfloat *);
19128+GLAPI void APIENTRY glGetVertexAttribivARB (GLuint, GLenum, GLint *);
19129+GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint, GLenum, GLvoid* *);
19130+GLAPI GLboolean APIENTRY glIsProgramARB (GLuint);
19131+#endif /* GL_GLEXT_PROTOTYPES */
19132+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x);
19133+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v);
19134+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);
19135+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v);
19136+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x);
19137+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v);
19138+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y);
19139+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v);
19140+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);
19141+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v);
19142+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y);
19143+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v);
19144+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
19145+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v);
19146+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
19147+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v);
19148+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
19149+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v);
19150+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v);
19151+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v);
19152+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v);
19153+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
19154+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v);
19155+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v);
19156+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v);
19157+typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v);
19158+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
19159+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v);
19160+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
19161+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v);
19162+typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v);
19163+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
19164+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v);
19165+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v);
19166+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v);
19167+typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v);
19168+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
19169+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
19170+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
19171+typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string);
19172+typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program);
19173+typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs);
19174+typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs);
19175+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
19176+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
19177+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
19178+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
19179+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
19180+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
19181+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
19182+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
19183+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
19184+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
19185+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
19186+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
19187+typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);
19188+typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string);
19189+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params);
19190+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params);
19191+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params);
19192+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
19193+typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program);
19194+#endif
19195+
19196+#ifndef GL_ARB_fragment_program
19197+#define GL_ARB_fragment_program 1
19198+/* All ARB_fragment_program entry points are shared with ARB_vertex_program. */
19199+#endif
19200+
19201+#ifndef GL_ARB_vertex_buffer_object
19202+#define GL_ARB_vertex_buffer_object 1
19203+#ifdef GL_GLEXT_PROTOTYPES
19204+GLAPI void APIENTRY glBindBufferARB (GLenum, GLuint);
19205+GLAPI void APIENTRY glDeleteBuffersARB (GLsizei, const GLuint *);
19206+GLAPI void APIENTRY glGenBuffersARB (GLsizei, GLuint *);
19207+GLAPI GLboolean APIENTRY glIsBufferARB (GLuint);
19208+GLAPI void APIENTRY glBufferDataARB (GLenum, GLsizeiptrARB, const GLvoid *, GLenum);
19209+GLAPI void APIENTRY glBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *);
19210+GLAPI void APIENTRY glGetBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *);
19211+GLAPI GLvoid* APIENTRY glMapBufferARB (GLenum, GLenum);
19212+GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum);
19213+GLAPI void APIENTRY glGetBufferParameterivARB (GLenum, GLenum, GLint *);
19214+GLAPI void APIENTRY glGetBufferPointervARB (GLenum, GLenum, GLvoid* *);
19215+#endif /* GL_GLEXT_PROTOTYPES */
19216+typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
19217+typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers);
19218+typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers);
19219+typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer);
19220+typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage);
19221+typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data);
19222+typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data);
19223+typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);
19224+typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target);
19225+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params);
19226+typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params);
19227+#endif
19228+
19229+#ifndef GL_ARB_occlusion_query
19230+#define GL_ARB_occlusion_query 1
19231+#ifdef GL_GLEXT_PROTOTYPES
19232+GLAPI void APIENTRY glGenQueriesARB (GLsizei, GLuint *);
19233+GLAPI void APIENTRY glDeleteQueriesARB (GLsizei, const GLuint *);
19234+GLAPI GLboolean APIENTRY glIsQueryARB (GLuint);
19235+GLAPI void APIENTRY glBeginQueryARB (GLenum, GLuint);
19236+GLAPI void APIENTRY glEndQueryARB (GLenum);
19237+GLAPI void APIENTRY glGetQueryivARB (GLenum, GLenum, GLint *);
19238+GLAPI void APIENTRY glGetQueryObjectivARB (GLuint, GLenum, GLint *);
19239+GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint, GLenum, GLuint *);
19240+#endif /* GL_GLEXT_PROTOTYPES */
19241+typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids);
19242+typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids);
19243+typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id);
19244+typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id);
19245+typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target);
19246+typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params);
19247+typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params);
19248+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params);
19249+#endif
19250+
19251+#ifndef GL_ARB_shader_objects
19252+#define GL_ARB_shader_objects 1
19253+#ifdef GL_GLEXT_PROTOTYPES
19254+GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB);
19255+GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum);
19256+GLAPI void APIENTRY glDetachObjectARB (GLhandleARB, GLhandleARB);
19257+GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum);
19258+GLAPI void APIENTRY glShaderSourceARB (GLhandleARB, GLsizei, const GLcharARB* *, const GLint *);
19259+GLAPI void APIENTRY glCompileShaderARB (GLhandleARB);
19260+GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void);
19261+GLAPI void APIENTRY glAttachObjectARB (GLhandleARB, GLhandleARB);
19262+GLAPI void APIENTRY glLinkProgramARB (GLhandleARB);
19263+GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB);
19264+GLAPI void APIENTRY glValidateProgramARB (GLhandleARB);
19265+GLAPI void APIENTRY glUniform1fARB (GLint, GLfloat);
19266+GLAPI void APIENTRY glUniform2fARB (GLint, GLfloat, GLfloat);
19267+GLAPI void APIENTRY glUniform3fARB (GLint, GLfloat, GLfloat, GLfloat);
19268+GLAPI void APIENTRY glUniform4fARB (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
19269+GLAPI void APIENTRY glUniform1iARB (GLint, GLint);
19270+GLAPI void APIENTRY glUniform2iARB (GLint, GLint, GLint);
19271+GLAPI void APIENTRY glUniform3iARB (GLint, GLint, GLint, GLint);
19272+GLAPI void APIENTRY glUniform4iARB (GLint, GLint, GLint, GLint, GLint);
19273+GLAPI void APIENTRY glUniform1fvARB (GLint, GLsizei, const GLfloat *);
19274+GLAPI void APIENTRY glUniform2fvARB (GLint, GLsizei, const GLfloat *);
19275+GLAPI void APIENTRY glUniform3fvARB (GLint, GLsizei, const GLfloat *);
19276+GLAPI void APIENTRY glUniform4fvARB (GLint, GLsizei, const GLfloat *);
19277+GLAPI void APIENTRY glUniform1ivARB (GLint, GLsizei, const GLint *);
19278+GLAPI void APIENTRY glUniform2ivARB (GLint, GLsizei, const GLint *);
19279+GLAPI void APIENTRY glUniform3ivARB (GLint, GLsizei, const GLint *);
19280+GLAPI void APIENTRY glUniform4ivARB (GLint, GLsizei, const GLint *);
19281+GLAPI void APIENTRY glUniformMatrix2fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
19282+GLAPI void APIENTRY glUniformMatrix3fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
19283+GLAPI void APIENTRY glUniformMatrix4fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
19284+GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB, GLenum, GLfloat *);
19285+GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB, GLenum, GLint *);
19286+GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
19287+GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB, GLsizei, GLsizei *, GLhandleARB *);
19288+GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB, const GLcharARB *);
19289+GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
19290+GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB, GLint, GLfloat *);
19291+GLAPI void APIENTRY glGetUniformivARB (GLhandleARB, GLint, GLint *);
19292+GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
19293+#endif /* GL_GLEXT_PROTOTYPES */
19294+typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj);
19295+typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname);
19296+typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj);
19297+typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType);
19298+typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length);
19299+typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj);
19300+typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void);
19301+typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj);
19302+typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj);
19303+typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj);
19304+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj);
19305+typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0);
19306+typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1);
19307+typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
19308+typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
19309+typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0);
19310+typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1);
19311+typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2);
19312+typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
19313+typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
19314+typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
19315+typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
19316+typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
19317+typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value);
19318+typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value);
19319+typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value);
19320+typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value);
19321+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
19322+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
19323+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
19324+typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params);
19325+typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params);
19326+typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
19327+typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
19328+typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
19329+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
19330+typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params);
19331+typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params);
19332+typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
19333+#endif
19334+
19335+#ifndef GL_ARB_vertex_shader
19336+#define GL_ARB_vertex_shader 1
19337+#ifdef GL_GLEXT_PROTOTYPES
19338+GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB, GLuint, const GLcharARB *);
19339+GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
19340+GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB, const GLcharARB *);
19341+#endif /* GL_GLEXT_PROTOTYPES */
19342+typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name);
19343+typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
19344+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
19345+#endif
19346+
19347+#ifndef GL_ARB_fragment_shader
19348+#define GL_ARB_fragment_shader 1
19349+#endif
19350+
19351+#ifndef GL_ARB_shading_language_100
19352+#define GL_ARB_shading_language_100 1
19353+#endif
19354+
19355+#ifndef GL_ARB_texture_non_power_of_two
19356+#define GL_ARB_texture_non_power_of_two 1
19357+#endif
19358+
19359+#ifndef GL_ARB_point_sprite
19360+#define GL_ARB_point_sprite 1
19361+#endif
19362+
19363+#ifndef GL_ARB_fragment_program_shadow
19364+#define GL_ARB_fragment_program_shadow 1
19365+#endif
19366+
19367+#ifndef GL_ARB_draw_buffers
19368+#define GL_ARB_draw_buffers 1
19369+#ifdef GL_GLEXT_PROTOTYPES
19370+GLAPI void APIENTRY glDrawBuffersARB (GLsizei, const GLenum *);
19371+#endif /* GL_GLEXT_PROTOTYPES */
19372+typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs);
19373+#endif
19374+
19375+#ifndef GL_ARB_texture_rectangle
19376+#define GL_ARB_texture_rectangle 1
19377+#endif
19378+
19379+#ifndef GL_ARB_color_buffer_float
19380+#define GL_ARB_color_buffer_float 1
19381+#ifdef GL_GLEXT_PROTOTYPES
19382+GLAPI void APIENTRY glClampColorARB (GLenum, GLenum);
19383+#endif /* GL_GLEXT_PROTOTYPES */
19384+typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);
19385+#endif
19386+
19387+#ifndef GL_ARB_half_float_pixel
19388+#define GL_ARB_half_float_pixel 1
19389+#endif
19390+
19391+#ifndef GL_ARB_texture_float
19392+#define GL_ARB_texture_float 1
19393+#endif
19394+
19395+#ifndef GL_ARB_pixel_buffer_object
19396+#define GL_ARB_pixel_buffer_object 1
19397+#endif
19398+
19399+#ifndef GL_EXT_abgr
19400+#define GL_EXT_abgr 1
19401+#endif
19402+
19403+#ifndef GL_EXT_blend_color
19404+#define GL_EXT_blend_color 1
19405+#ifdef GL_GLEXT_PROTOTYPES
19406+GLAPI void APIENTRY glBlendColorEXT (GLclampf, GLclampf, GLclampf, GLclampf);
19407+#endif /* GL_GLEXT_PROTOTYPES */
19408+typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
19409+#endif
19410+
19411+#ifndef GL_EXT_polygon_offset
19412+#define GL_EXT_polygon_offset 1
19413+#ifdef GL_GLEXT_PROTOTYPES
19414+GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat, GLfloat);
19415+#endif /* GL_GLEXT_PROTOTYPES */
19416+typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias);
19417+#endif
19418+
19419+#ifndef GL_EXT_texture
19420+#define GL_EXT_texture 1
19421+#endif
19422+
19423+#ifndef GL_EXT_texture3D
19424+#define GL_EXT_texture3D 1
19425+#ifdef GL_GLEXT_PROTOTYPES
19426+GLAPI void APIENTRY glTexImage3DEXT (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
19427+GLAPI void APIENTRY glTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19428+#endif /* GL_GLEXT_PROTOTYPES */
19429+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);
19430+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);
19431+#endif
19432+
19433+#ifndef GL_SGIS_texture_filter4
19434+#define GL_SGIS_texture_filter4 1
19435+#ifdef GL_GLEXT_PROTOTYPES
19436+GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum, GLenum, GLfloat *);
19437+GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum, GLenum, GLsizei, const GLfloat *);
19438+#endif /* GL_GLEXT_PROTOTYPES */
19439+typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights);
19440+typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);
19441+#endif
19442+
19443+#ifndef GL_EXT_subtexture
19444+#define GL_EXT_subtexture 1
19445+#ifdef GL_GLEXT_PROTOTYPES
19446+GLAPI void APIENTRY glTexSubImage1DEXT (GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *);
19447+GLAPI void APIENTRY glTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19448+#endif /* GL_GLEXT_PROTOTYPES */
19449+typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
19450+typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
19451+#endif
19452+
19453+#ifndef GL_EXT_copy_texture
19454+#define GL_EXT_copy_texture 1
19455+#ifdef GL_GLEXT_PROTOTYPES
19456+GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint);
19457+GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint);
19458+GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei);
19459+GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
19460+GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
19461+#endif /* GL_GLEXT_PROTOTYPES */
19462+typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
19463+typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
19464+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
19465+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
19466+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
19467+#endif
19468+
19469+#ifndef GL_EXT_histogram
19470+#define GL_EXT_histogram 1
19471+#ifdef GL_GLEXT_PROTOTYPES
19472+GLAPI void APIENTRY glGetHistogramEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
19473+GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum, GLenum, GLfloat *);
19474+GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum, GLenum, GLint *);
19475+GLAPI void APIENTRY glGetMinmaxEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
19476+GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum, GLenum, GLfloat *);
19477+GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum, GLenum, GLint *);
19478+GLAPI void APIENTRY glHistogramEXT (GLenum, GLsizei, GLenum, GLboolean);
19479+GLAPI void APIENTRY glMinmaxEXT (GLenum, GLenum, GLboolean);
19480+GLAPI void APIENTRY glResetHistogramEXT (GLenum);
19481+GLAPI void APIENTRY glResetMinmaxEXT (GLenum);
19482+#endif /* GL_GLEXT_PROTOTYPES */
19483+typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
19484+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19485+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19486+typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
19487+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19488+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19489+typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
19490+typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink);
19491+typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target);
19492+typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target);
19493+#endif
19494+
19495+#ifndef GL_EXT_convolution
19496+#define GL_EXT_convolution 1
19497+#ifdef GL_GLEXT_PROTOTYPES
19498+GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
19499+GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19500+GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum, GLenum, GLfloat);
19501+GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum, GLenum, const GLfloat *);
19502+GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum, GLenum, GLint);
19503+GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum, GLenum, const GLint *);
19504+GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum, GLenum, GLint, GLint, GLsizei);
19505+GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
19506+GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum, GLenum, GLenum, GLvoid *);
19507+GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum, GLenum, GLfloat *);
19508+GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum, GLenum, GLint *);
19509+GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
19510+GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
19511+#endif /* GL_GLEXT_PROTOTYPES */
19512+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
19513+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
19514+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params);
19515+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
19516+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params);
19517+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
19518+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
19519+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
19520+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
19521+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19522+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19523+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
19524+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
19525+#endif
19526+
19527+#ifndef GL_SGI_color_matrix
19528+#define GL_SGI_color_matrix 1
19529+#endif
19530+
19531+#ifndef GL_SGI_color_table
19532+#define GL_SGI_color_table 1
19533+#ifdef GL_GLEXT_PROTOTYPES
19534+GLAPI void APIENTRY glColorTableSGI (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
19535+GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum, GLenum, const GLfloat *);
19536+GLAPI void APIENTRY glColorTableParameterivSGI (GLenum, GLenum, const GLint *);
19537+GLAPI void APIENTRY glCopyColorTableSGI (GLenum, GLenum, GLint, GLint, GLsizei);
19538+GLAPI void APIENTRY glGetColorTableSGI (GLenum, GLenum, GLenum, GLvoid *);
19539+GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum, GLenum, GLfloat *);
19540+GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum, GLenum, GLint *);
19541+#endif /* GL_GLEXT_PROTOTYPES */
19542+typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
19543+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params);
19544+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params);
19545+typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
19546+typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
19547+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params);
19548+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params);
19549+#endif
19550+
19551+#ifndef GL_SGIX_pixel_texture
19552+#define GL_SGIX_pixel_texture 1
19553+#ifdef GL_GLEXT_PROTOTYPES
19554+GLAPI void APIENTRY glPixelTexGenSGIX (GLenum);
19555+#endif /* GL_GLEXT_PROTOTYPES */
19556+typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode);
19557+#endif
19558+
19559+#ifndef GL_SGIS_pixel_texture
19560+#define GL_SGIS_pixel_texture 1
19561+#ifdef GL_GLEXT_PROTOTYPES
19562+GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum, GLint);
19563+GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum, const GLint *);
19564+GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum, GLfloat);
19565+GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum, const GLfloat *);
19566+GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum, GLint *);
19567+GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum, GLfloat *);
19568+#endif /* GL_GLEXT_PROTOTYPES */
19569+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param);
19570+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params);
19571+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
19572+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
19573+typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params);
19574+typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params);
19575+#endif
19576+
19577+#ifndef GL_SGIS_texture4D
19578+#define GL_SGIS_texture4D 1
19579+#ifdef GL_GLEXT_PROTOTYPES
19580+GLAPI void APIENTRY glTexImage4DSGIS (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
19581+GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19582+#endif /* GL_GLEXT_PROTOTYPES */
19583+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);
19584+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);
19585+#endif
19586+
19587+#ifndef GL_SGI_texture_color_table
19588+#define GL_SGI_texture_color_table 1
19589+#endif
19590+
19591+#ifndef GL_EXT_cmyka
19592+#define GL_EXT_cmyka 1
19593+#endif
19594+
19595+#ifndef GL_EXT_texture_object
19596+#define GL_EXT_texture_object 1
19597+#ifdef GL_GLEXT_PROTOTYPES
19598+GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei, const GLuint *, GLboolean *);
19599+GLAPI void APIENTRY glBindTextureEXT (GLenum, GLuint);
19600+GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei, const GLuint *);
19601+GLAPI void APIENTRY glGenTexturesEXT (GLsizei, GLuint *);
19602+GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint);
19603+GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei, const GLuint *, const GLclampf *);
19604+#endif /* GL_GLEXT_PROTOTYPES */
19605+typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences);
19606+typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture);
19607+typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures);
19608+typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures);
19609+typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture);
19610+typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities);
19611+#endif
19612+
19613+#ifndef GL_SGIS_detail_texture
19614+#define GL_SGIS_detail_texture 1
19615+#ifdef GL_GLEXT_PROTOTYPES
19616+GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum, GLsizei, const GLfloat *);
19617+GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum, GLfloat *);
19618+#endif /* GL_GLEXT_PROTOTYPES */
19619+typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
19620+typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
19621+#endif
19622+
19623+#ifndef GL_SGIS_sharpen_texture
19624+#define GL_SGIS_sharpen_texture 1
19625+#ifdef GL_GLEXT_PROTOTYPES
19626+GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum, GLsizei, const GLfloat *);
19627+GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum, GLfloat *);
19628+#endif /* GL_GLEXT_PROTOTYPES */
19629+typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
19630+typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
19631+#endif
19632+
19633+#ifndef GL_EXT_packed_pixels
19634+#define GL_EXT_packed_pixels 1
19635+#endif
19636+
19637+#ifndef GL_SGIS_texture_lod
19638+#define GL_SGIS_texture_lod 1
19639+#endif
19640+
19641+#ifndef GL_SGIS_multisample
19642+#define GL_SGIS_multisample 1
19643+#ifdef GL_GLEXT_PROTOTYPES
19644+GLAPI void APIENTRY glSampleMaskSGIS (GLclampf, GLboolean);
19645+GLAPI void APIENTRY glSamplePatternSGIS (GLenum);
19646+#endif /* GL_GLEXT_PROTOTYPES */
19647+typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert);
19648+typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern);
19649+#endif
19650+
19651+#ifndef GL_EXT_rescale_normal
19652+#define GL_EXT_rescale_normal 1
19653+#endif
19654+
19655+#ifndef GL_EXT_vertex_array
19656+#define GL_EXT_vertex_array 1
19657+#ifdef GL_GLEXT_PROTOTYPES
19658+GLAPI void APIENTRY glArrayElementEXT (GLint);
19659+GLAPI void APIENTRY glColorPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
19660+GLAPI void APIENTRY glDrawArraysEXT (GLenum, GLint, GLsizei);
19661+GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei, GLsizei, const GLboolean *);
19662+GLAPI void APIENTRY glGetPointervEXT (GLenum, GLvoid* *);
19663+GLAPI void APIENTRY glIndexPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *);
19664+GLAPI void APIENTRY glNormalPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *);
19665+GLAPI void APIENTRY glTexCoordPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
19666+GLAPI void APIENTRY glVertexPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
19667+#endif /* GL_GLEXT_PROTOTYPES */
19668+typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i);
19669+typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19670+typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);
19671+typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer);
19672+typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params);
19673+typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19674+typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19675+typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19676+typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19677+#endif
19678+
19679+#ifndef GL_EXT_misc_attribute
19680+#define GL_EXT_misc_attribute 1
19681+#endif
19682+
19683+#ifndef GL_SGIS_generate_mipmap
19684+#define GL_SGIS_generate_mipmap 1
19685+#endif
19686+
19687+#ifndef GL_SGIX_clipmap
19688+#define GL_SGIX_clipmap 1
19689+#endif
19690+
19691+#ifndef GL_SGIX_shadow
19692+#define GL_SGIX_shadow 1
19693+#endif
19694+
19695+#ifndef GL_SGIS_texture_edge_clamp
19696+#define GL_SGIS_texture_edge_clamp 1
19697+#endif
19698+
19699+#ifndef GL_SGIS_texture_border_clamp
19700+#define GL_SGIS_texture_border_clamp 1
19701+#endif
19702+
19703+#ifndef GL_EXT_blend_minmax
19704+#define GL_EXT_blend_minmax 1
19705+#ifdef GL_GLEXT_PROTOTYPES
19706+GLAPI void APIENTRY glBlendEquationEXT (GLenum);
19707+#endif /* GL_GLEXT_PROTOTYPES */
19708+typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode);
19709+#endif
19710+
19711+#ifndef GL_EXT_blend_subtract
19712+#define GL_EXT_blend_subtract 1
19713+#endif
19714+
19715+#ifndef GL_EXT_blend_logic_op
19716+#define GL_EXT_blend_logic_op 1
19717+#endif
19718+
19719+#ifndef GL_SGIX_interlace
19720+#define GL_SGIX_interlace 1
19721+#endif
19722+
19723+#ifndef GL_SGIX_pixel_tiles
19724+#define GL_SGIX_pixel_tiles 1
19725+#endif
19726+
19727+#ifndef GL_SGIX_texture_select
19728+#define GL_SGIX_texture_select 1
19729+#endif
19730+
19731+#ifndef GL_SGIX_sprite
19732+#define GL_SGIX_sprite 1
19733+#ifdef GL_GLEXT_PROTOTYPES
19734+GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum, GLfloat);
19735+GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum, const GLfloat *);
19736+GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum, GLint);
19737+GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum, const GLint *);
19738+#endif /* GL_GLEXT_PROTOTYPES */
19739+typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param);
19740+typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params);
19741+typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param);
19742+typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params);
19743+#endif
19744+
19745+#ifndef GL_SGIX_texture_multi_buffer
19746+#define GL_SGIX_texture_multi_buffer 1
19747+#endif
19748+
19749+#ifndef GL_EXT_point_parameters
19750+#define GL_EXT_point_parameters 1
19751+#ifdef GL_GLEXT_PROTOTYPES
19752+GLAPI void APIENTRY glPointParameterfEXT (GLenum, GLfloat);
19753+GLAPI void APIENTRY glPointParameterfvEXT (GLenum, const GLfloat *);
19754+/* ERO Begin */
19755+GLAPI void APIENTRY glPointParameteriEXT (GLenum, GLint);
19756+GLAPI void APIENTRY glPointParameterivEXT (GLenum, const GLint *);
19757+/* ERO end */
19758+#endif /* GL_GLEXT_PROTOTYPES */
19759+typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);
19760+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params);
19761+#endif
19762+
19763+#ifndef GL_SGIS_point_parameters
19764+#define GL_SGIS_point_parameters 1
19765+#ifdef GL_GLEXT_PROTOTYPES
19766+GLAPI void APIENTRY glPointParameterfSGIS (GLenum, GLfloat);
19767+GLAPI void APIENTRY glPointParameterfvSGIS (GLenum, const GLfloat *);
19768+#endif /* GL_GLEXT_PROTOTYPES */
19769+typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
19770+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
19771+#endif
19772+
19773+#ifndef GL_SGIX_instruments
19774+#define GL_SGIX_instruments 1
19775+#ifdef GL_GLEXT_PROTOTYPES
19776+GLAPI GLint APIENTRY glGetInstrumentsSGIX (void);
19777+GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei, GLint *);
19778+GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *);
19779+GLAPI void APIENTRY glReadInstrumentsSGIX (GLint);
19780+GLAPI void APIENTRY glStartInstrumentsSGIX (void);
19781+GLAPI void APIENTRY glStopInstrumentsSGIX (GLint);
19782+#endif /* GL_GLEXT_PROTOTYPES */
19783+typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void);
19784+typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer);
19785+typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p);
19786+typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker);
19787+typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void);
19788+typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker);
19789+#endif
19790+
19791+#ifndef GL_SGIX_texture_scale_bias
19792+#define GL_SGIX_texture_scale_bias 1
19793+#endif
19794+
19795+#ifndef GL_SGIX_framezoom
19796+#define GL_SGIX_framezoom 1
19797+#ifdef GL_GLEXT_PROTOTYPES
19798+GLAPI void APIENTRY glFrameZoomSGIX (GLint);
19799+#endif /* GL_GLEXT_PROTOTYPES */
19800+typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor);
19801+#endif
19802+
19803+#ifndef GL_SGIX_tag_sample_buffer
19804+#define GL_SGIX_tag_sample_buffer 1
19805+#ifdef GL_GLEXT_PROTOTYPES
19806+GLAPI void APIENTRY glTagSampleBufferSGIX (void);
19807+#endif /* GL_GLEXT_PROTOTYPES */
19808+typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void);
19809+#endif
19810+
19811+#ifndef GL_SGIX_polynomial_ffd
19812+#define GL_SGIX_polynomial_ffd 1
19813+#ifdef GL_GLEXT_PROTOTYPES
19814+GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *);
19815+GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *);
19816+GLAPI void APIENTRY glDeformSGIX (GLbitfield);
19817+GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield);
19818+#endif /* GL_GLEXT_PROTOTYPES */
19819+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);
19820+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);
19821+typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask);
19822+typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask);
19823+#endif
19824+
19825+#ifndef GL_SGIX_reference_plane
19826+#define GL_SGIX_reference_plane 1
19827+#ifdef GL_GLEXT_PROTOTYPES
19828+GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *);
19829+#endif /* GL_GLEXT_PROTOTYPES */
19830+typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation);
19831+#endif
19832+
19833+#ifndef GL_SGIX_flush_raster
19834+#define GL_SGIX_flush_raster 1
19835+#ifdef GL_GLEXT_PROTOTYPES
19836+GLAPI void APIENTRY glFlushRasterSGIX (void);
19837+#endif /* GL_GLEXT_PROTOTYPES */
19838+typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void);
19839+#endif
19840+
19841+#ifndef GL_SGIX_depth_texture
19842+#define GL_SGIX_depth_texture 1
19843+#endif
19844+
19845+#ifndef GL_SGIS_fog_function
19846+#define GL_SGIS_fog_function 1
19847+#ifdef GL_GLEXT_PROTOTYPES
19848+GLAPI void APIENTRY glFogFuncSGIS (GLsizei, const GLfloat *);
19849+GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *);
19850+#endif /* GL_GLEXT_PROTOTYPES */
19851+typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points);
19852+typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points);
19853+#endif
19854+
19855+#ifndef GL_SGIX_fog_offset
19856+#define GL_SGIX_fog_offset 1
19857+#endif
19858+
19859+#ifndef GL_HP_image_transform
19860+#define GL_HP_image_transform 1
19861+#ifdef GL_GLEXT_PROTOTYPES
19862+GLAPI void APIENTRY glImageTransformParameteriHP (GLenum, GLenum, GLint);
19863+GLAPI void APIENTRY glImageTransformParameterfHP (GLenum, GLenum, GLfloat);
19864+GLAPI void APIENTRY glImageTransformParameterivHP (GLenum, GLenum, const GLint *);
19865+GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum, GLenum, const GLfloat *);
19866+GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum, GLenum, GLint *);
19867+GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum, GLenum, GLfloat *);
19868+#endif /* GL_GLEXT_PROTOTYPES */
19869+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param);
19870+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param);
19871+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params);
19872+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params);
19873+typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params);
19874+typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params);
19875+#endif
19876+
19877+#ifndef GL_HP_convolution_border_modes
19878+#define GL_HP_convolution_border_modes 1
19879+#endif
19880+
19881+#ifndef GL_SGIX_texture_add_env
19882+#define GL_SGIX_texture_add_env 1
19883+#endif
19884+
19885+#ifndef GL_EXT_color_subtable
19886+#define GL_EXT_color_subtable 1
19887+#ifdef GL_GLEXT_PROTOTYPES
19888+GLAPI void APIENTRY glColorSubTableEXT (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19889+GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum, GLsizei, GLint, GLint, GLsizei);
19890+#endif /* GL_GLEXT_PROTOTYPES */
19891+typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
19892+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
19893+#endif
19894+
19895+#ifndef GL_PGI_vertex_hints
19896+#define GL_PGI_vertex_hints 1
19897+#endif
19898+
19899+#ifndef GL_PGI_misc_hints
19900+#define GL_PGI_misc_hints 1
19901+#ifdef GL_GLEXT_PROTOTYPES
19902+GLAPI void APIENTRY glHintPGI (GLenum, GLint);
19903+#endif /* GL_GLEXT_PROTOTYPES */
19904+typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode);
19905+#endif
19906+
19907+#ifndef GL_EXT_paletted_texture
19908+#define GL_EXT_paletted_texture 1
19909+#ifdef GL_GLEXT_PROTOTYPES
19910+GLAPI void APIENTRY glColorTableEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
19911+GLAPI void APIENTRY glGetColorTableEXT (GLenum, GLenum, GLenum, GLvoid *);
19912+GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum, GLenum, GLint *);
19913+GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum, GLenum, GLfloat *);
19914+#endif /* GL_GLEXT_PROTOTYPES */
19915+typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
19916+typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data);
19917+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19918+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19919+#endif
19920+
19921+#ifndef GL_EXT_clip_volume_hint
19922+#define GL_EXT_clip_volume_hint 1
19923+#endif
19924+
19925+#ifndef GL_SGIX_list_priority
19926+#define GL_SGIX_list_priority 1
19927+#ifdef GL_GLEXT_PROTOTYPES
19928+GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint, GLenum, GLfloat *);
19929+GLAPI void APIENTRY glGetListParameterivSGIX (GLuint, GLenum, GLint *);
19930+GLAPI void APIENTRY glListParameterfSGIX (GLuint, GLenum, GLfloat);
19931+GLAPI void APIENTRY glListParameterfvSGIX (GLuint, GLenum, const GLfloat *);
19932+GLAPI void APIENTRY glListParameteriSGIX (GLuint, GLenum, GLint);
19933+GLAPI void APIENTRY glListParameterivSGIX (GLuint, GLenum, const GLint *);
19934+#endif /* GL_GLEXT_PROTOTYPES */
19935+typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params);
19936+typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params);
19937+typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param);
19938+typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params);
19939+typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param);
19940+typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params);
19941+#endif
19942+
19943+#ifndef GL_SGIX_ir_instrument1
19944+#define GL_SGIX_ir_instrument1 1
19945+#endif
19946+
19947+#ifndef GL_SGIX_calligraphic_fragment
19948+#define GL_SGIX_calligraphic_fragment 1
19949+#endif
19950+
19951+#ifndef GL_SGIX_texture_lod_bias
19952+#define GL_SGIX_texture_lod_bias 1
19953+#endif
19954+
19955+#ifndef GL_SGIX_shadow_ambient
19956+#define GL_SGIX_shadow_ambient 1
19957+#endif
19958+
19959+#ifndef GL_EXT_index_texture
19960+#define GL_EXT_index_texture 1
19961+#endif
19962+
19963+#ifndef GL_EXT_index_material
19964+#define GL_EXT_index_material 1
19965+#ifdef GL_GLEXT_PROTOTYPES
19966+GLAPI void APIENTRY glIndexMaterialEXT (GLenum, GLenum);
19967+#endif /* GL_GLEXT_PROTOTYPES */
19968+typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode);
19969+#endif
19970+
19971+#ifndef GL_EXT_index_func
19972+#define GL_EXT_index_func 1
19973+#ifdef GL_GLEXT_PROTOTYPES
19974+GLAPI void APIENTRY glIndexFuncEXT (GLenum, GLclampf);
19975+#endif /* GL_GLEXT_PROTOTYPES */
19976+typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref);
19977+#endif
19978+
19979+#ifndef GL_EXT_index_array_formats
19980+#define GL_EXT_index_array_formats 1
19981+#endif
19982+
19983+#ifndef GL_EXT_compiled_vertex_array
19984+#define GL_EXT_compiled_vertex_array 1
19985+#ifdef GL_GLEXT_PROTOTYPES
19986+GLAPI void APIENTRY glLockArraysEXT (GLint, GLsizei);
19987+GLAPI void APIENTRY glUnlockArraysEXT (void);
19988+#endif /* GL_GLEXT_PROTOTYPES */
19989+typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);
19990+typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void);
19991+#endif
19992+
19993+#ifndef GL_EXT_cull_vertex
19994+#define GL_EXT_cull_vertex 1
19995+#ifdef GL_GLEXT_PROTOTYPES
19996+GLAPI void APIENTRY glCullParameterdvEXT (GLenum, GLdouble *);
19997+GLAPI void APIENTRY glCullParameterfvEXT (GLenum, GLfloat *);
19998+#endif /* GL_GLEXT_PROTOTYPES */
19999+typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params);
20000+typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params);
20001+#endif
20002+
20003+#ifndef GL_SGIX_ycrcb
20004+#define GL_SGIX_ycrcb 1
20005+#endif
20006+
20007+#ifndef GL_SGIX_fragment_lighting
20008+#define GL_SGIX_fragment_lighting 1
20009+#ifdef GL_GLEXT_PROTOTYPES
20010+GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum, GLenum);
20011+GLAPI void APIENTRY glFragmentLightfSGIX (GLenum, GLenum, GLfloat);
20012+GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum, GLenum, const GLfloat *);
20013+GLAPI void APIENTRY glFragmentLightiSGIX (GLenum, GLenum, GLint);
20014+GLAPI void APIENTRY glFragmentLightivSGIX (GLenum, GLenum, const GLint *);
20015+GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum, GLfloat);
20016+GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum, const GLfloat *);
20017+GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum, GLint);
20018+GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum, const GLint *);
20019+GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum, GLenum, GLfloat);
20020+GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum, GLenum, const GLfloat *);
20021+GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum, GLenum, GLint);
20022+GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum, GLenum, const GLint *);
20023+GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum, GLenum, GLfloat *);
20024+GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum, GLenum, GLint *);
20025+GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum, GLenum, GLfloat *);
20026+GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum, GLenum, GLint *);
20027+GLAPI void APIENTRY glLightEnviSGIX (GLenum, GLint);
20028+#endif /* GL_GLEXT_PROTOTYPES */
20029+typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode);
20030+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param);
20031+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);
20032+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param);
20033+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params);
20034+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param);
20035+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params);
20036+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param);
20037+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params);
20038+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param);
20039+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params);
20040+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param);
20041+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params);
20042+typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params);
20043+typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params);
20044+typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params);
20045+typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params);
20046+typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param);
20047+#endif
20048+
20049+#ifndef GL_IBM_rasterpos_clip
20050+#define GL_IBM_rasterpos_clip 1
20051+#endif
20052+
20053+#ifndef GL_HP_texture_lighting
20054+#define GL_HP_texture_lighting 1
20055+#endif
20056+
20057+#ifndef GL_EXT_draw_range_elements
20058+#define GL_EXT_draw_range_elements 1
20059+#ifdef GL_GLEXT_PROTOTYPES
20060+GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
20061+#endif /* GL_GLEXT_PROTOTYPES */
20062+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
20063+#endif
20064+
20065+#ifndef GL_WIN_phong_shading
20066+#define GL_WIN_phong_shading 1
20067+#endif
20068+
20069+#ifndef GL_WIN_specular_fog
20070+#define GL_WIN_specular_fog 1
20071+#endif
20072+
20073+#ifndef GL_EXT_light_texture
20074+#define GL_EXT_light_texture 1
20075+#ifdef GL_GLEXT_PROTOTYPES
20076+GLAPI void APIENTRY glApplyTextureEXT (GLenum);
20077+GLAPI void APIENTRY glTextureLightEXT (GLenum);
20078+GLAPI void APIENTRY glTextureMaterialEXT (GLenum, GLenum);
20079+#endif /* GL_GLEXT_PROTOTYPES */
20080+typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode);
20081+typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname);
20082+typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode);
20083+#endif
20084+
20085+#ifndef GL_SGIX_blend_alpha_minmax
20086+#define GL_SGIX_blend_alpha_minmax 1
20087+#endif
20088+
20089+#ifndef GL_EXT_bgra
20090+#define GL_EXT_bgra 1
20091+#endif
20092+
20093+#ifndef GL_SGIX_async
20094+#define GL_SGIX_async 1
20095+#ifdef GL_GLEXT_PROTOTYPES
20096+GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint);
20097+GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *);
20098+GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *);
20099+GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei);
20100+GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint, GLsizei);
20101+GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint);
20102+#endif /* GL_GLEXT_PROTOTYPES */
20103+typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker);
20104+typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp);
20105+typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp);
20106+typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range);
20107+typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range);
20108+typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker);
20109+#endif
20110+
20111+#ifndef GL_SGIX_async_pixel
20112+#define GL_SGIX_async_pixel 1
20113+#endif
20114+
20115+#ifndef GL_SGIX_async_histogram
20116+#define GL_SGIX_async_histogram 1
20117+#endif
20118+
20119+#ifndef GL_INTEL_parallel_arrays
20120+#define GL_INTEL_parallel_arrays 1
20121+#ifdef GL_GLEXT_PROTOTYPES
20122+GLAPI void APIENTRY glVertexPointervINTEL (GLint, GLenum, const GLvoid* *);
20123+GLAPI void APIENTRY glNormalPointervINTEL (GLenum, const GLvoid* *);
20124+GLAPI void APIENTRY glColorPointervINTEL (GLint, GLenum, const GLvoid* *);
20125+GLAPI void APIENTRY glTexCoordPointervINTEL (GLint, GLenum, const GLvoid* *);
20126+#endif /* GL_GLEXT_PROTOTYPES */
20127+typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
20128+typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer);
20129+typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
20130+typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
20131+#endif
20132+
20133+#ifndef GL_HP_occlusion_test
20134+#define GL_HP_occlusion_test 1
20135+#endif
20136+
20137+#ifndef GL_EXT_pixel_transform
20138+#define GL_EXT_pixel_transform 1
20139+#ifdef GL_GLEXT_PROTOTYPES
20140+GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum, GLenum, GLint);
20141+GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum, GLenum, GLfloat);
20142+GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum, GLenum, const GLint *);
20143+GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum, GLenum, const GLfloat *);
20144+/* ERO Begin */
20145+GLAPI void APIENTRY glGetPixelTransformParameterivEXT (GLenum, GLenum, GLint *);
20146+GLAPI void APIENTRY glGetPixelTransformParameterfvEXT (GLenum, GLenum, GLfloat *);
20147+/* ERO End */
20148+#endif /* GL_GLEXT_PROTOTYPES */
20149+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param);
20150+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param);
20151+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
20152+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
20153+/* ERO Begin */
20154+typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
20155+typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
20156+/* ERO End */
20157+#endif
20158+
20159+#ifndef GL_EXT_pixel_transform_color_table
20160+#define GL_EXT_pixel_transform_color_table 1
20161+#endif
20162+
20163+#ifndef GL_EXT_shared_texture_palette
20164+#define GL_EXT_shared_texture_palette 1
20165+#endif
20166+
20167+#ifndef GL_EXT_separate_specular_color
20168+#define GL_EXT_separate_specular_color 1
20169+#endif
20170+
20171+#ifndef GL_EXT_secondary_color
20172+#define GL_EXT_secondary_color 1
20173+#ifdef GL_GLEXT_PROTOTYPES
20174+GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte, GLbyte, GLbyte);
20175+GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *);
20176+GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble, GLdouble, GLdouble);
20177+GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *);
20178+GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat, GLfloat, GLfloat);
20179+GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *);
20180+GLAPI void APIENTRY glSecondaryColor3iEXT (GLint, GLint, GLint);
20181+GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *);
20182+GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort, GLshort, GLshort);
20183+GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *);
20184+GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte, GLubyte, GLubyte);
20185+GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *);
20186+GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint, GLuint, GLuint);
20187+GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *);
20188+GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort, GLushort, GLushort);
20189+GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *);
20190+GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint, GLenum, GLsizei, const GLvoid *);
20191+#endif /* GL_GLEXT_PROTOTYPES */
20192+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue);
20193+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v);
20194+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue);
20195+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v);
20196+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);
20197+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);
20198+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue);
20199+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v);
20200+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue);
20201+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v);
20202+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);
20203+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v);
20204+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue);
20205+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);
20206+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);
20207+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);
20208+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
20209+#endif
20210+
20211+#ifndef GL_EXT_texture_perturb_normal
20212+#define GL_EXT_texture_perturb_normal 1
20213+#ifdef GL_GLEXT_PROTOTYPES
20214+GLAPI void APIENTRY glTextureNormalEXT (GLenum);
20215+#endif /* GL_GLEXT_PROTOTYPES */
20216+typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode);
20217+#endif
20218+
20219+#ifndef GL_EXT_multi_draw_arrays
20220+#define GL_EXT_multi_draw_arrays 1
20221+#ifdef GL_GLEXT_PROTOTYPES
20222+GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei);
20223+GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
20224+#endif /* GL_GLEXT_PROTOTYPES */
20225+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
20226+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
20227+#endif
20228+
20229+#ifndef GL_EXT_fog_coord
20230+#define GL_EXT_fog_coord 1
20231+#ifdef GL_GLEXT_PROTOTYPES
20232+GLAPI void APIENTRY glFogCoordfEXT (GLfloat);
20233+GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *);
20234+GLAPI void APIENTRY glFogCoorddEXT (GLdouble);
20235+GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *);
20236+GLAPI void APIENTRY glFogCoordPointerEXT (GLenum, GLsizei, const GLvoid *);
20237+#endif /* GL_GLEXT_PROTOTYPES */
20238+typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord);
20239+typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord);
20240+typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord);
20241+typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord);
20242+typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
20243+#endif
20244+
20245+#ifndef GL_REND_screen_coordinates
20246+#define GL_REND_screen_coordinates 1
20247+#endif
20248+
20249+#ifndef GL_EXT_coordinate_frame
20250+#define GL_EXT_coordinate_frame 1
20251+#ifdef GL_GLEXT_PROTOTYPES
20252+GLAPI void APIENTRY glTangent3bEXT (GLbyte, GLbyte, GLbyte);
20253+GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *);
20254+GLAPI void APIENTRY glTangent3dEXT (GLdouble, GLdouble, GLdouble);
20255+GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *);
20256+GLAPI void APIENTRY glTangent3fEXT (GLfloat, GLfloat, GLfloat);
20257+GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *);
20258+GLAPI void APIENTRY glTangent3iEXT (GLint, GLint, GLint);
20259+GLAPI void APIENTRY glTangent3ivEXT (const GLint *);
20260+GLAPI void APIENTRY glTangent3sEXT (GLshort, GLshort, GLshort);
20261+GLAPI void APIENTRY glTangent3svEXT (const GLshort *);
20262+GLAPI void APIENTRY glBinormal3bEXT (GLbyte, GLbyte, GLbyte);
20263+GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *);
20264+GLAPI void APIENTRY glBinormal3dEXT (GLdouble, GLdouble, GLdouble);
20265+GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *);
20266+GLAPI void APIENTRY glBinormal3fEXT (GLfloat, GLfloat, GLfloat);
20267+GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *);
20268+GLAPI void APIENTRY glBinormal3iEXT (GLint, GLint, GLint);
20269+GLAPI void APIENTRY glBinormal3ivEXT (const GLint *);
20270+GLAPI void APIENTRY glBinormal3sEXT (GLshort, GLshort, GLshort);
20271+GLAPI void APIENTRY glBinormal3svEXT (const GLshort *);
20272+GLAPI void APIENTRY glTangentPointerEXT (GLenum, GLsizei, const GLvoid *);
20273+GLAPI void APIENTRY glBinormalPointerEXT (GLenum, GLsizei, const GLvoid *);
20274+#endif /* GL_GLEXT_PROTOTYPES */
20275+typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz);
20276+typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v);
20277+typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz);
20278+typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v);
20279+typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz);
20280+typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v);
20281+typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz);
20282+typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v);
20283+typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz);
20284+typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v);
20285+typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz);
20286+typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v);
20287+typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz);
20288+typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v);
20289+typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz);
20290+typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v);
20291+typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz);
20292+typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v);
20293+typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz);
20294+typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v);
20295+typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
20296+typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
20297+#endif
20298+
20299+#ifndef GL_EXT_texture_env_combine
20300+#define GL_EXT_texture_env_combine 1
20301+#endif
20302+
20303+#ifndef GL_APPLE_specular_vector
20304+#define GL_APPLE_specular_vector 1
20305+#endif
20306+
20307+#ifndef GL_APPLE_transform_hint
20308+#define GL_APPLE_transform_hint 1
20309+#endif
20310+
20311+#ifndef GL_SGIX_fog_scale
20312+#define GL_SGIX_fog_scale 1
20313+#endif
20314+
20315+#ifndef GL_SUNX_constant_data
20316+#define GL_SUNX_constant_data 1
20317+#ifdef GL_GLEXT_PROTOTYPES
20318+GLAPI void APIENTRY glFinishTextureSUNX (void);
20319+#endif /* GL_GLEXT_PROTOTYPES */
20320+typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void);
20321+#endif
20322+
20323+#ifndef GL_SUN_global_alpha
20324+#define GL_SUN_global_alpha 1
20325+#ifdef GL_GLEXT_PROTOTYPES
20326+GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte);
20327+GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort);
20328+GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint);
20329+GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat);
20330+GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble);
20331+GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte);
20332+GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort);
20333+GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint);
20334+#endif /* GL_GLEXT_PROTOTYPES */
20335+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor);
20336+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor);
20337+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor);
20338+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor);
20339+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor);
20340+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor);
20341+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor);
20342+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor);
20343+#endif
20344+
20345+#ifndef GL_SUN_triangle_list
20346+#define GL_SUN_triangle_list 1
20347+#ifdef GL_GLEXT_PROTOTYPES
20348+GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint);
20349+GLAPI void APIENTRY glReplacementCodeusSUN (GLushort);
20350+GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte);
20351+GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *);
20352+GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *);
20353+GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *);
20354+GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum, GLsizei, const GLvoid* *);
20355+#endif /* GL_GLEXT_PROTOTYPES */
20356+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code);
20357+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code);
20358+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code);
20359+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code);
20360+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code);
20361+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code);
20362+typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer);
20363+#endif
20364+
20365+#ifndef GL_SUN_vertex
20366+#define GL_SUN_vertex 1
20367+#ifdef GL_GLEXT_PROTOTYPES
20368+GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat);
20369+GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *, const GLfloat *);
20370+GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
20371+GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *, const GLfloat *);
20372+GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20373+GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *, const GLfloat *);
20374+GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20375+GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *);
20376+GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20377+GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
20378+GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20379+GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *, const GLfloat *);
20380+GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20381+GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *, const GLfloat *);
20382+GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat, GLfloat, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
20383+GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *, const GLubyte *, const GLfloat *);
20384+GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20385+GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
20386+GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20387+GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
20388+GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20389+GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
20390+GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20391+GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
20392+GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat);
20393+GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *, const GLfloat *);
20394+GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
20395+GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *, const GLubyte *, const GLfloat *);
20396+GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20397+GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
20398+GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20399+GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
20400+GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20401+GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *);
20402+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20403+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
20404+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20405+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *);
20406+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20407+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
20408+#endif /* GL_GLEXT_PROTOTYPES */
20409+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
20410+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v);
20411+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
20412+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v);
20413+typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
20414+typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v);
20415+typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20416+typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v);
20417+typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20418+typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v);
20419+typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
20420+typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
20421+typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20422+typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
20423+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
20424+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v);
20425+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
20426+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v);
20427+typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20428+typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v);
20429+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);
20430+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20431+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);
20432+typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20433+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
20434+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v);
20435+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
20436+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v);
20437+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
20438+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v);
20439+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20440+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v);
20441+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);
20442+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20443+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
20444+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v);
20445+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20446+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
20447+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);
20448+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20449+#endif
20450+
20451+#ifndef GL_EXT_blend_func_separate
20452+#define GL_EXT_blend_func_separate 1
20453+#ifdef GL_GLEXT_PROTOTYPES
20454+GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum, GLenum, GLenum, GLenum);
20455+#endif /* GL_GLEXT_PROTOTYPES */
20456+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
20457+#endif
20458+
20459+#ifndef GL_INGR_blend_func_separate
20460+#define GL_INGR_blend_func_separate 1
20461+#ifdef GL_GLEXT_PROTOTYPES
20462+GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum, GLenum, GLenum, GLenum);
20463+#endif /* GL_GLEXT_PROTOTYPES */
20464+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
20465+#endif
20466+
20467+#ifndef GL_INGR_color_clamp
20468+#define GL_INGR_color_clamp 1
20469+#endif
20470+
20471+#ifndef GL_INGR_interlace_read
20472+#define GL_INGR_interlace_read 1
20473+#endif
20474+
20475+#ifndef GL_EXT_stencil_wrap
20476+#define GL_EXT_stencil_wrap 1
20477+#endif
20478+
20479+#ifndef GL_EXT_422_pixels
20480+#define GL_EXT_422_pixels 1
20481+#endif
20482+
20483+#ifndef GL_NV_texgen_reflection
20484+#define GL_NV_texgen_reflection 1
20485+#endif
20486+
20487+#ifndef GL_SUN_convolution_border_modes
20488+#define GL_SUN_convolution_border_modes 1
20489+#endif
20490+
20491+#ifndef GL_EXT_texture_env_add
20492+#define GL_EXT_texture_env_add 1
20493+#endif
20494+
20495+#ifndef GL_EXT_texture_lod_bias
20496+#define GL_EXT_texture_lod_bias 1
20497+#endif
20498+
20499+#ifndef GL_EXT_texture_filter_anisotropic
20500+#define GL_EXT_texture_filter_anisotropic 1
20501+#endif
20502+
20503+#ifndef GL_EXT_vertex_weighting
20504+#define GL_EXT_vertex_weighting 1
20505+#ifdef GL_GLEXT_PROTOTYPES
20506+GLAPI void APIENTRY glVertexWeightfEXT (GLfloat);
20507+GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *);
20508+GLAPI void APIENTRY glVertexWeightPointerEXT (GLsizei, GLenum, GLsizei, const GLvoid *);
20509+#endif /* GL_GLEXT_PROTOTYPES */
20510+typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight);
20511+typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight);
20512+typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer);
20513+#endif
20514+
20515+#ifndef GL_NV_light_max_exponent
20516+#define GL_NV_light_max_exponent 1
20517+#endif
20518+
20519+#ifndef GL_NV_vertex_array_range
20520+#define GL_NV_vertex_array_range 1
20521+#ifdef GL_GLEXT_PROTOTYPES
20522+GLAPI void APIENTRY glFlushVertexArrayRangeNV (void);
20523+GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei, const GLvoid *);
20524+#endif /* GL_GLEXT_PROTOTYPES */
20525+typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void);
20526+typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer);
20527+#endif
20528+
20529+#ifndef GL_NV_register_combiners
20530+#define GL_NV_register_combiners 1
20531+#ifdef GL_GLEXT_PROTOTYPES
20532+GLAPI void APIENTRY glCombinerParameterfvNV (GLenum, const GLfloat *);
20533+GLAPI void APIENTRY glCombinerParameterfNV (GLenum, GLfloat);
20534+GLAPI void APIENTRY glCombinerParameterivNV (GLenum, const GLint *);
20535+GLAPI void APIENTRY glCombinerParameteriNV (GLenum, GLint);
20536+GLAPI void APIENTRY glCombinerInputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum);
20537+GLAPI void APIENTRY glCombinerOutputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean);
20538+GLAPI void APIENTRY glFinalCombinerInputNV (GLenum, GLenum, GLenum, GLenum);
20539+GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum, GLenum, GLenum, GLenum, GLfloat *);
20540+GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum, GLenum, GLenum, GLenum, GLint *);
20541+GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum, GLenum, GLenum, GLfloat *);
20542+GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum, GLenum, GLenum, GLint *);
20543+GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum, GLenum, GLfloat *);
20544+GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum, GLenum, GLint *);
20545+#endif /* GL_GLEXT_PROTOTYPES */
20546+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);
20547+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);
20548+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
20549+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);
20550+typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
20551+typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
20552+typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
20553+typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
20554+typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
20555+typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
20556+typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params);
20557+typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params);
20558+typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params);
20559+#endif
20560+
20561+#ifndef GL_NV_fog_distance
20562+#define GL_NV_fog_distance 1
20563+#endif
20564+
20565+#ifndef GL_NV_texgen_emboss
20566+#define GL_NV_texgen_emboss 1
20567+#endif
20568+
20569+#ifndef GL_NV_blend_square
20570+#define GL_NV_blend_square 1
20571+#endif
20572+
20573+#ifndef GL_NV_texture_env_combine4
20574+#define GL_NV_texture_env_combine4 1
20575+#endif
20576+
20577+#ifndef GL_MESA_resize_buffers
20578+#define GL_MESA_resize_buffers 1
20579+#ifdef GL_GLEXT_PROTOTYPES
20580+GLAPI void APIENTRY glResizeBuffersMESA (void);
20581+#endif /* GL_GLEXT_PROTOTYPES */
20582+typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void);
20583+#endif
20584+
20585+#ifndef GL_MESA_window_pos
20586+#define GL_MESA_window_pos 1
20587+#ifdef GL_GLEXT_PROTOTYPES
20588+GLAPI void APIENTRY glWindowPos2dMESA (GLdouble, GLdouble);
20589+GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *);
20590+GLAPI void APIENTRY glWindowPos2fMESA (GLfloat, GLfloat);
20591+GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *);
20592+GLAPI void APIENTRY glWindowPos2iMESA (GLint, GLint);
20593+GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *);
20594+GLAPI void APIENTRY glWindowPos2sMESA (GLshort, GLshort);
20595+GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *);
20596+GLAPI void APIENTRY glWindowPos3dMESA (GLdouble, GLdouble, GLdouble);
20597+GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *);
20598+GLAPI void APIENTRY glWindowPos3fMESA (GLfloat, GLfloat, GLfloat);
20599+GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *);
20600+GLAPI void APIENTRY glWindowPos3iMESA (GLint, GLint, GLint);
20601+GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *);
20602+GLAPI void APIENTRY glWindowPos3sMESA (GLshort, GLshort, GLshort);
20603+GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *);
20604+GLAPI void APIENTRY glWindowPos4dMESA (GLdouble, GLdouble, GLdouble, GLdouble);
20605+GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *);
20606+GLAPI void APIENTRY glWindowPos4fMESA (GLfloat, GLfloat, GLfloat, GLfloat);
20607+GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *);
20608+GLAPI void APIENTRY glWindowPos4iMESA (GLint, GLint, GLint, GLint);
20609+GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *);
20610+GLAPI void APIENTRY glWindowPos4sMESA (GLshort, GLshort, GLshort, GLshort);
20611+GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *);
20612+#endif /* GL_GLEXT_PROTOTYPES */
20613+typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y);
20614+typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v);
20615+typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y);
20616+typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v);
20617+typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y);
20618+typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v);
20619+typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y);
20620+typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v);
20621+typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z);
20622+typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v);
20623+typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z);
20624+typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v);
20625+typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z);
20626+typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v);
20627+typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z);
20628+typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v);
20629+typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
20630+typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v);
20631+typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20632+typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v);
20633+typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w);
20634+typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v);
20635+typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w);
20636+typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v);
20637+#endif
20638+
20639+#ifndef GL_IBM_cull_vertex
20640+#define GL_IBM_cull_vertex 1
20641+#endif
20642+
20643+#ifndef GL_IBM_multimode_draw_arrays
20644+#define GL_IBM_multimode_draw_arrays 1
20645+#ifdef GL_GLEXT_PROTOTYPES
20646+GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *, const GLint *, const GLsizei *, GLsizei, GLint);
20647+GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *, const GLsizei *, GLenum, const GLvoid* const *, GLsizei, GLint);
20648+#endif /* GL_GLEXT_PROTOTYPES */
20649+typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
20650+typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride);
20651+#endif
20652+
20653+#ifndef GL_IBM_vertex_array_lists
20654+#define GL_IBM_vertex_array_lists 1
20655+#ifdef GL_GLEXT_PROTOTYPES
20656+GLAPI void APIENTRY glColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20657+GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20658+GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint, const GLboolean* *, GLint);
20659+GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
20660+GLAPI void APIENTRY glIndexPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
20661+GLAPI void APIENTRY glNormalPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
20662+GLAPI void APIENTRY glTexCoordPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20663+GLAPI void APIENTRY glVertexPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20664+#endif /* GL_GLEXT_PROTOTYPES */
20665+typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20666+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20667+typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride);
20668+typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20669+typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20670+typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20671+typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20672+typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20673+#endif
20674+
20675+#ifndef GL_SGIX_subsample
20676+#define GL_SGIX_subsample 1
20677+#endif
20678+
20679+#ifndef GL_SGIX_ycrcba
20680+#define GL_SGIX_ycrcba 1
20681+#endif
20682+
20683+#ifndef GL_SGIX_ycrcb_subsample
20684+#define GL_SGIX_ycrcb_subsample 1
20685+#endif
20686+
20687+#ifndef GL_SGIX_depth_pass_instrument
20688+#define GL_SGIX_depth_pass_instrument 1
20689+#endif
20690+
20691+#ifndef GL_3DFX_texture_compression_FXT1
20692+#define GL_3DFX_texture_compression_FXT1 1
20693+#endif
20694+
20695+#ifndef GL_3DFX_multisample
20696+#define GL_3DFX_multisample 1
20697+#endif
20698+
20699+#ifndef GL_3DFX_tbuffer
20700+#define GL_3DFX_tbuffer 1
20701+#ifdef GL_GLEXT_PROTOTYPES
20702+GLAPI void APIENTRY glTbufferMask3DFX (GLuint);
20703+#endif /* GL_GLEXT_PROTOTYPES */
20704+typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask);
20705+#endif
20706+
20707+#ifndef GL_EXT_multisample
20708+#define GL_EXT_multisample 1
20709+#ifdef GL_GLEXT_PROTOTYPES
20710+GLAPI void APIENTRY glSampleMaskEXT (GLclampf, GLboolean);
20711+GLAPI void APIENTRY glSamplePatternEXT (GLenum);
20712+#endif /* GL_GLEXT_PROTOTYPES */
20713+typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert);
20714+typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern);
20715+#endif
20716+
20717+#ifndef GL_SGIX_vertex_preclip
20718+#define GL_SGIX_vertex_preclip 1
20719+#endif
20720+
20721+#ifndef GL_SGIX_convolution_accuracy
20722+#define GL_SGIX_convolution_accuracy 1
20723+#endif
20724+
20725+#ifndef GL_SGIX_resample
20726+#define GL_SGIX_resample 1
20727+#endif
20728+
20729+#ifndef GL_SGIS_point_line_texgen
20730+#define GL_SGIS_point_line_texgen 1
20731+#endif
20732+
20733+#ifndef GL_SGIS_texture_color_mask
20734+#define GL_SGIS_texture_color_mask 1
20735+#ifdef GL_GLEXT_PROTOTYPES
20736+GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean, GLboolean, GLboolean, GLboolean);
20737+#endif /* GL_GLEXT_PROTOTYPES */
20738+typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
20739+#endif
20740+
20741+#ifndef GL_SGIX_igloo_interface
20742+#define GL_SGIX_igloo_interface 1
20743+#ifdef GL_GLEXT_PROTOTYPES
20744+GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum, const GLvoid *);
20745+#endif /* GL_GLEXT_PROTOTYPES */
20746+typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params);
20747+#endif
20748+
20749+#ifndef GL_EXT_texture_env_dot3
20750+#define GL_EXT_texture_env_dot3 1
20751+#endif
20752+
20753+#ifndef GL_ATI_texture_mirror_once
20754+#define GL_ATI_texture_mirror_once 1
20755+#endif
20756+
20757+#ifndef GL_NV_fence
20758+#define GL_NV_fence 1
20759+#ifdef GL_GLEXT_PROTOTYPES
20760+GLAPI void APIENTRY glDeleteFencesNV (GLsizei, const GLuint *);
20761+GLAPI void APIENTRY glGenFencesNV (GLsizei, GLuint *);
20762+GLAPI GLboolean APIENTRY glIsFenceNV (GLuint);
20763+GLAPI GLboolean APIENTRY glTestFenceNV (GLuint);
20764+GLAPI void APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *);
20765+GLAPI void APIENTRY glFinishFenceNV (GLuint);
20766+GLAPI void APIENTRY glSetFenceNV (GLuint, GLenum);
20767+#endif /* GL_GLEXT_PROTOTYPES */
20768+typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
20769+typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
20770+typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
20771+typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
20772+typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
20773+typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
20774+typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
20775+#endif
20776+
20777+#ifndef GL_NV_evaluators
20778+#define GL_NV_evaluators 1
20779+#ifdef GL_GLEXT_PROTOTYPES
20780+GLAPI void APIENTRY glMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLint, GLint, GLboolean, const GLvoid *);
20781+GLAPI void APIENTRY glMapParameterivNV (GLenum, GLenum, const GLint *);
20782+GLAPI void APIENTRY glMapParameterfvNV (GLenum, GLenum, const GLfloat *);
20783+GLAPI void APIENTRY glGetMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLboolean, GLvoid *);
20784+GLAPI void APIENTRY glGetMapParameterivNV (GLenum, GLenum, GLint *);
20785+GLAPI void APIENTRY glGetMapParameterfvNV (GLenum, GLenum, GLfloat *);
20786+GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum, GLuint, GLenum, GLint *);
20787+GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum, GLuint, GLenum, GLfloat *);
20788+GLAPI void APIENTRY glEvalMapsNV (GLenum, GLenum);
20789+#endif /* GL_GLEXT_PROTOTYPES */
20790+typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points);
20791+typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params);
20792+typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params);
20793+typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points);
20794+typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params);
20795+typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params);
20796+typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
20797+typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
20798+typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode);
20799+#endif
20800+
20801+#ifndef GL_NV_packed_depth_stencil
20802+#define GL_NV_packed_depth_stencil 1
20803+#endif
20804+
20805+#ifndef GL_NV_register_combiners2
20806+#define GL_NV_register_combiners2 1
20807+#ifdef GL_GLEXT_PROTOTYPES
20808+GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum, GLenum, const GLfloat *);
20809+GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum, GLenum, GLfloat *);
20810+#endif /* GL_GLEXT_PROTOTYPES */
20811+typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params);
20812+typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params);
20813+#endif
20814+
20815+#ifndef GL_NV_texture_compression_vtc
20816+#define GL_NV_texture_compression_vtc 1
20817+#endif
20818+
20819+#ifndef GL_NV_texture_rectangle
20820+#define GL_NV_texture_rectangle 1
20821+#endif
20822+
20823+#ifndef GL_NV_texture_shader
20824+#define GL_NV_texture_shader 1
20825+#endif
20826+
20827+#ifndef GL_NV_texture_shader2
20828+#define GL_NV_texture_shader2 1
20829+#endif
20830+
20831+#ifndef GL_NV_vertex_array_range2
20832+#define GL_NV_vertex_array_range2 1
20833+#endif
20834+
20835+#ifndef GL_NV_vertex_program
20836+#define GL_NV_vertex_program 1
20837+#ifdef GL_GLEXT_PROTOTYPES
20838+GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei, const GLuint *, GLboolean *);
20839+GLAPI void APIENTRY glBindProgramNV (GLenum, GLuint);
20840+GLAPI void APIENTRY glDeleteProgramsNV (GLsizei, const GLuint *);
20841+GLAPI void APIENTRY glExecuteProgramNV (GLenum, GLuint, const GLfloat *);
20842+GLAPI void APIENTRY glGenProgramsNV (GLsizei, GLuint *);
20843+GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum, GLuint, GLenum, GLdouble *);
20844+GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum, GLuint, GLenum, GLfloat *);
20845+GLAPI void APIENTRY glGetProgramivNV (GLuint, GLenum, GLint *);
20846+GLAPI void APIENTRY glGetProgramStringNV (GLuint, GLenum, GLubyte *);
20847+GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum, GLuint, GLenum, GLint *);
20848+GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint, GLenum, GLdouble *);
20849+GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint, GLenum, GLfloat *);
20850+GLAPI void APIENTRY glGetVertexAttribivNV (GLuint, GLenum, GLint *);
20851+GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint, GLenum, GLvoid* *);
20852+GLAPI GLboolean APIENTRY glIsProgramNV (GLuint);
20853+GLAPI void APIENTRY glLoadProgramNV (GLenum, GLuint, GLsizei, const GLubyte *);
20854+GLAPI void APIENTRY glProgramParameter4dNV (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
20855+GLAPI void APIENTRY glProgramParameter4dvNV (GLenum, GLuint, const GLdouble *);
20856+GLAPI void APIENTRY glProgramParameter4fNV (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
20857+GLAPI void APIENTRY glProgramParameter4fvNV (GLenum, GLuint, const GLfloat *);
20858+GLAPI void APIENTRY glProgramParameters4dvNV (GLenum, GLuint, GLuint, const GLdouble *);
20859+GLAPI void APIENTRY glProgramParameters4fvNV (GLenum, GLuint, GLuint, const GLfloat *);
20860+GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei, const GLuint *);
20861+GLAPI void APIENTRY glTrackMatrixNV (GLenum, GLuint, GLenum, GLenum);
20862+GLAPI void APIENTRY glVertexAttribPointerNV (GLuint, GLint, GLenum, GLsizei, const GLvoid *);
20863+GLAPI void APIENTRY glVertexAttrib1dNV (GLuint, GLdouble);
20864+GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint, const GLdouble *);
20865+GLAPI void APIENTRY glVertexAttrib1fNV (GLuint, GLfloat);
20866+GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint, const GLfloat *);
20867+GLAPI void APIENTRY glVertexAttrib1sNV (GLuint, GLshort);
20868+GLAPI void APIENTRY glVertexAttrib1svNV (GLuint, const GLshort *);
20869+GLAPI void APIENTRY glVertexAttrib2dNV (GLuint, GLdouble, GLdouble);
20870+GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint, const GLdouble *);
20871+GLAPI void APIENTRY glVertexAttrib2fNV (GLuint, GLfloat, GLfloat);
20872+GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint, const GLfloat *);
20873+GLAPI void APIENTRY glVertexAttrib2sNV (GLuint, GLshort, GLshort);
20874+GLAPI void APIENTRY glVertexAttrib2svNV (GLuint, const GLshort *);
20875+GLAPI void APIENTRY glVertexAttrib3dNV (GLuint, GLdouble, GLdouble, GLdouble);
20876+GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint, const GLdouble *);
20877+GLAPI void APIENTRY glVertexAttrib3fNV (GLuint, GLfloat, GLfloat, GLfloat);
20878+GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint, const GLfloat *);
20879+GLAPI void APIENTRY glVertexAttrib3sNV (GLuint, GLshort, GLshort, GLshort);
20880+GLAPI void APIENTRY glVertexAttrib3svNV (GLuint, const GLshort *);
20881+GLAPI void APIENTRY glVertexAttrib4dNV (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
20882+GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint, const GLdouble *);
20883+GLAPI void APIENTRY glVertexAttrib4fNV (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
20884+GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint, const GLfloat *);
20885+GLAPI void APIENTRY glVertexAttrib4sNV (GLuint, GLshort, GLshort, GLshort, GLshort);
20886+GLAPI void APIENTRY glVertexAttrib4svNV (GLuint, const GLshort *);
20887+GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
20888+GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint, const GLubyte *);
20889+GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint, GLsizei, const GLdouble *);
20890+GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint, GLsizei, const GLfloat *);
20891+GLAPI void APIENTRY glVertexAttribs1svNV (GLuint, GLsizei, const GLshort *);
20892+GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint, GLsizei, const GLdouble *);
20893+GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint, GLsizei, const GLfloat *);
20894+GLAPI void APIENTRY glVertexAttribs2svNV (GLuint, GLsizei, const GLshort *);
20895+GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint, GLsizei, const GLdouble *);
20896+GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint, GLsizei, const GLfloat *);
20897+GLAPI void APIENTRY glVertexAttribs3svNV (GLuint, GLsizei, const GLshort *);
20898+GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint, GLsizei, const GLdouble *);
20899+GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint, GLsizei, const GLfloat *);
20900+GLAPI void APIENTRY glVertexAttribs4svNV (GLuint, GLsizei, const GLshort *);
20901+GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint, GLsizei, const GLubyte *);
20902+#endif /* GL_GLEXT_PROTOTYPES */
20903+typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences);
20904+typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id);
20905+typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
20906+typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params);
20907+typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs);
20908+typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params);
20909+typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
20910+typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params);
20911+typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program);
20912+typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params);
20913+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params);
20914+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params);
20915+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params);
20916+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
20917+typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id);
20918+typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
20919+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
20920+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v);
20921+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20922+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v);
20923+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint count, const GLdouble *v);
20924+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint count, const GLfloat *v);
20925+typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
20926+typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform);
20927+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer);
20928+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x);
20929+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v);
20930+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x);
20931+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v);
20932+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x);
20933+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v);
20934+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y);
20935+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v);
20936+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y);
20937+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v);
20938+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y);
20939+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v);
20940+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
20941+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v);
20942+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
20943+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v);
20944+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
20945+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v);
20946+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
20947+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v);
20948+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20949+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v);
20950+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
20951+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v);
20952+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
20953+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v);
20954+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
20955+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
20956+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
20957+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
20958+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
20959+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
20960+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
20961+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
20962+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
20963+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
20964+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
20965+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
20966+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v);
20967+#endif
20968+
20969+#ifndef GL_SGIX_texture_coordinate_clamp
20970+#define GL_SGIX_texture_coordinate_clamp 1
20971+#endif
20972+
20973+#ifndef GL_SGIX_scalebias_hint
20974+#define GL_SGIX_scalebias_hint 1
20975+#endif
20976+
20977+#ifndef GL_OML_interlace
20978+#define GL_OML_interlace 1
20979+#endif
20980+
20981+#ifndef GL_OML_subsample
20982+#define GL_OML_subsample 1
20983+#endif
20984+
20985+#ifndef GL_OML_resample
20986+#define GL_OML_resample 1
20987+#endif
20988+
20989+#ifndef GL_NV_copy_depth_to_color
20990+#define GL_NV_copy_depth_to_color 1
20991+#endif
20992+
20993+#ifndef GL_ATI_envmap_bumpmap
20994+#define GL_ATI_envmap_bumpmap 1
20995+#ifdef GL_GLEXT_PROTOTYPES
20996+GLAPI void APIENTRY glTexBumpParameterivATI (GLenum, const GLint *);
20997+GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum, const GLfloat *);
20998+GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum, GLint *);
20999+GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum, GLfloat *);
21000+#endif /* GL_GLEXT_PROTOTYPES */
21001+typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param);
21002+typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param);
21003+typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param);
21004+typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param);
21005+#endif
21006+
21007+#ifndef GL_ATI_fragment_shader
21008+#define GL_ATI_fragment_shader 1
21009+#ifdef GL_GLEXT_PROTOTYPES
21010+GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint);
21011+GLAPI void APIENTRY glBindFragmentShaderATI (GLuint);
21012+GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint);
21013+GLAPI void APIENTRY glBeginFragmentShaderATI (void);
21014+GLAPI void APIENTRY glEndFragmentShaderATI (void);
21015+GLAPI void APIENTRY glPassTexCoordATI (GLuint, GLuint, GLenum);
21016+GLAPI void APIENTRY glSampleMapATI (GLuint, GLuint, GLenum);
21017+GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21018+GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21019+GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21020+GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
21021+GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21022+GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21023+GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint, const GLfloat *);
21024+#endif /* GL_GLEXT_PROTOTYPES */
21025+typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range);
21026+typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id);
21027+typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id);
21028+typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void);
21029+typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void);
21030+typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle);
21031+typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle);
21032+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
21033+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
21034+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);
21035+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
21036+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
21037+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);
21038+typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value);
21039+#endif
21040+
21041+#ifndef GL_ATI_pn_triangles
21042+#define GL_ATI_pn_triangles 1
21043+#ifdef GL_GLEXT_PROTOTYPES
21044+GLAPI void APIENTRY glPNTrianglesiATI (GLenum, GLint);
21045+GLAPI void APIENTRY glPNTrianglesfATI (GLenum, GLfloat);
21046+#endif /* GL_GLEXT_PROTOTYPES */
21047+typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param);
21048+typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param);
21049+#endif
21050+
21051+#ifndef GL_ATI_vertex_array_object
21052+#define GL_ATI_vertex_array_object 1
21053+#ifdef GL_GLEXT_PROTOTYPES
21054+GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei, const GLvoid *, GLenum);
21055+GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint);
21056+GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint, GLuint, GLsizei, const GLvoid *, GLenum);
21057+GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint, GLenum, GLfloat *);
21058+GLAPI void APIENTRY glGetObjectBufferivATI (GLuint, GLenum, GLint *);
21059+GLAPI void APIENTRY glFreeObjectBufferATI (GLuint);
21060+/* ERO Begin */
21061+GLAPI void APIENTRY glDeleteObjectBufferATI (GLuint);
21062+/* ERO End */
21063+GLAPI void APIENTRY glArrayObjectATI (GLenum, GLint, GLenum, GLsizei, GLuint, GLuint);
21064+GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum, GLenum, GLfloat *);
21065+GLAPI void APIENTRY glGetArrayObjectivATI (GLenum, GLenum, GLint *);
21066+GLAPI void APIENTRY glVariantArrayObjectATI (GLuint, GLenum, GLsizei, GLuint, GLuint);
21067+GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint, GLenum, GLfloat *);
21068+GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint, GLenum, GLint *);
21069+#endif /* GL_GLEXT_PROTOTYPES */
21070+typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage);
21071+typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer);
21072+typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve);
21073+typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params);
21074+typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params);
21075+typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer);
21076+typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
21077+typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params);
21078+typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params);
21079+typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
21080+typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params);
21081+typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params);
21082+#endif
21083+
21084+#ifndef GL_EXT_vertex_shader
21085+#define GL_EXT_vertex_shader 1
21086+#ifdef GL_GLEXT_PROTOTYPES
21087+GLAPI void APIENTRY glBeginVertexShaderEXT (void);
21088+GLAPI void APIENTRY glEndVertexShaderEXT (void);
21089+GLAPI void APIENTRY glBindVertexShaderEXT (GLuint);
21090+GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint);
21091+GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint);
21092+GLAPI void APIENTRY glShaderOp1EXT (GLenum, GLuint, GLuint);
21093+GLAPI void APIENTRY glShaderOp2EXT (GLenum, GLuint, GLuint, GLuint);
21094+GLAPI void APIENTRY glShaderOp3EXT (GLenum, GLuint, GLuint, GLuint, GLuint);
21095+GLAPI void APIENTRY glSwizzleEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum);
21096+GLAPI void APIENTRY glWriteMaskEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum);
21097+GLAPI void APIENTRY glInsertComponentEXT (GLuint, GLuint, GLuint);
21098+GLAPI void APIENTRY glExtractComponentEXT (GLuint, GLuint, GLuint);
21099+GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum, GLenum, GLenum, GLuint);
21100+GLAPI void APIENTRY glSetInvariantEXT (GLuint, GLenum, const GLvoid *);
21101+GLAPI void APIENTRY glSetLocalConstantEXT (GLuint, GLenum, const GLvoid *);
21102+GLAPI void APIENTRY glVariantbvEXT (GLuint, const GLbyte *);
21103+GLAPI void APIENTRY glVariantsvEXT (GLuint, const GLshort *);
21104+GLAPI void APIENTRY glVariantivEXT (GLuint, const GLint *);
21105+GLAPI void APIENTRY glVariantfvEXT (GLuint, const GLfloat *);
21106+GLAPI void APIENTRY glVariantdvEXT (GLuint, const GLdouble *);
21107+GLAPI void APIENTRY glVariantubvEXT (GLuint, const GLubyte *);
21108+GLAPI void APIENTRY glVariantusvEXT (GLuint, const GLushort *);
21109+GLAPI void APIENTRY glVariantuivEXT (GLuint, const GLuint *);
21110+GLAPI void APIENTRY glVariantPointerEXT (GLuint, GLenum, GLuint, const GLvoid *);
21111+GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint);
21112+GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint);
21113+GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum, GLenum);
21114+GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum, GLenum);
21115+GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum, GLenum, GLenum);
21116+GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum, GLenum);
21117+GLAPI GLuint APIENTRY glBindParameterEXT (GLenum);
21118+GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint, GLenum);
21119+GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint, GLenum, GLboolean *);
21120+GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint, GLenum, GLint *);
21121+GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint, GLenum, GLfloat *);
21122+GLAPI void APIENTRY glGetVariantPointervEXT (GLuint, GLenum, GLvoid* *);
21123+GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint, GLenum, GLboolean *);
21124+GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint, GLenum, GLint *);
21125+GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint, GLenum, GLfloat *);
21126+GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint, GLenum, GLboolean *);
21127+GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint, GLenum, GLint *);
21128+GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint, GLenum, GLfloat *);
21129+#endif /* GL_GLEXT_PROTOTYPES */
21130+typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void);
21131+typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void);
21132+typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id);
21133+typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range);
21134+typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id);
21135+typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1);
21136+typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
21137+typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
21138+typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
21139+typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
21140+typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
21141+typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
21142+typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);
21143+typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);
21144+typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);
21145+typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr);
21146+typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr);
21147+typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr);
21148+typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr);
21149+typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr);
21150+typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr);
21151+typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr);
21152+typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr);
21153+typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr);
21154+typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
21155+typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
21156+typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value);
21157+typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value);
21158+typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value);
21159+typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value);
21160+typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value);
21161+typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap);
21162+typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
21163+typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
21164+typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
21165+typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data);
21166+typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
21167+typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
21168+typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
21169+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
21170+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
21171+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
21172+#endif
21173+
21174+#ifndef GL_ATI_vertex_streams
21175+#define GL_ATI_vertex_streams 1
21176+#ifdef GL_GLEXT_PROTOTYPES
21177+GLAPI void APIENTRY glVertexStream1sATI (GLenum, GLshort);
21178+GLAPI void APIENTRY glVertexStream1svATI (GLenum, const GLshort *);
21179+GLAPI void APIENTRY glVertexStream1iATI (GLenum, GLint);
21180+GLAPI void APIENTRY glVertexStream1ivATI (GLenum, const GLint *);
21181+GLAPI void APIENTRY glVertexStream1fATI (GLenum, GLfloat);
21182+GLAPI void APIENTRY glVertexStream1fvATI (GLenum, const GLfloat *);
21183+GLAPI void APIENTRY glVertexStream1dATI (GLenum, GLdouble);
21184+GLAPI void APIENTRY glVertexStream1dvATI (GLenum, const GLdouble *);
21185+GLAPI void APIENTRY glVertexStream2sATI (GLenum, GLshort, GLshort);
21186+GLAPI void APIENTRY glVertexStream2svATI (GLenum, const GLshort *);
21187+GLAPI void APIENTRY glVertexStream2iATI (GLenum, GLint, GLint);
21188+GLAPI void APIENTRY glVertexStream2ivATI (GLenum, const GLint *);
21189+GLAPI void APIENTRY glVertexStream2fATI (GLenum, GLfloat, GLfloat);
21190+GLAPI void APIENTRY glVertexStream2fvATI (GLenum, const GLfloat *);
21191+GLAPI void APIENTRY glVertexStream2dATI (GLenum, GLdouble, GLdouble);
21192+GLAPI void APIENTRY glVertexStream2dvATI (GLenum, const GLdouble *);
21193+GLAPI void APIENTRY glVertexStream3sATI (GLenum, GLshort, GLshort, GLshort);
21194+GLAPI void APIENTRY glVertexStream3svATI (GLenum, const GLshort *);
21195+GLAPI void APIENTRY glVertexStream3iATI (GLenum, GLint, GLint, GLint);
21196+GLAPI void APIENTRY glVertexStream3ivATI (GLenum, const GLint *);
21197+GLAPI void APIENTRY glVertexStream3fATI (GLenum, GLfloat, GLfloat, GLfloat);
21198+GLAPI void APIENTRY glVertexStream3fvATI (GLenum, const GLfloat *);
21199+GLAPI void APIENTRY glVertexStream3dATI (GLenum, GLdouble, GLdouble, GLdouble);
21200+GLAPI void APIENTRY glVertexStream3dvATI (GLenum, const GLdouble *);
21201+GLAPI void APIENTRY glVertexStream4sATI (GLenum, GLshort, GLshort, GLshort, GLshort);
21202+GLAPI void APIENTRY glVertexStream4svATI (GLenum, const GLshort *);
21203+GLAPI void APIENTRY glVertexStream4iATI (GLenum, GLint, GLint, GLint, GLint);
21204+GLAPI void APIENTRY glVertexStream4ivATI (GLenum, const GLint *);
21205+GLAPI void APIENTRY glVertexStream4fATI (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
21206+GLAPI void APIENTRY glVertexStream4fvATI (GLenum, const GLfloat *);
21207+GLAPI void APIENTRY glVertexStream4dATI (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
21208+GLAPI void APIENTRY glVertexStream4dvATI (GLenum, const GLdouble *);
21209+GLAPI void APIENTRY glNormalStream3bATI (GLenum, GLbyte, GLbyte, GLbyte);
21210+GLAPI void APIENTRY glNormalStream3bvATI (GLenum, const GLbyte *);
21211+GLAPI void APIENTRY glNormalStream3sATI (GLenum, GLshort, GLshort, GLshort);
21212+GLAPI void APIENTRY glNormalStream3svATI (GLenum, const GLshort *);
21213+GLAPI void APIENTRY glNormalStream3iATI (GLenum, GLint, GLint, GLint);
21214+GLAPI void APIENTRY glNormalStream3ivATI (GLenum, const GLint *);
21215+GLAPI void APIENTRY glNormalStream3fATI (GLenum, GLfloat, GLfloat, GLfloat);
21216+GLAPI void APIENTRY glNormalStream3fvATI (GLenum, const GLfloat *);
21217+GLAPI void APIENTRY glNormalStream3dATI (GLenum, GLdouble, GLdouble, GLdouble);
21218+GLAPI void APIENTRY glNormalStream3dvATI (GLenum, const GLdouble *);
21219+GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum);
21220+GLAPI void APIENTRY glVertexBlendEnviATI (GLenum, GLint);
21221+GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum, GLfloat);
21222+#endif /* GL_GLEXT_PROTOTYPES */
21223+typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x);
21224+typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords);
21225+typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x);
21226+typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords);
21227+typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x);
21228+typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords);
21229+typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x);
21230+typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords);
21231+typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y);
21232+typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords);
21233+typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y);
21234+typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords);
21235+typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y);
21236+typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords);
21237+typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y);
21238+typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords);
21239+typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z);
21240+typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
21241+typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z);
21242+typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
21243+typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
21244+typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
21245+typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
21246+typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
21247+typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
21248+typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords);
21249+typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w);
21250+typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords);
21251+typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
21252+typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords);
21253+typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
21254+typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords);
21255+typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);
21256+typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords);
21257+typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz);
21258+typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
21259+typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz);
21260+typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
21261+typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);
21262+typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
21263+typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);
21264+typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
21265+typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream);
21266+typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param);
21267+typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param);
21268+#endif
21269+
21270+#ifndef GL_ATI_element_array
21271+#define GL_ATI_element_array 1
21272+#ifdef GL_GLEXT_PROTOTYPES
21273+GLAPI void APIENTRY glElementPointerATI (GLenum, const GLvoid *);
21274+GLAPI void APIENTRY glDrawElementArrayATI (GLenum, GLsizei);
21275+GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum, GLuint, GLuint, GLsizei);
21276+#endif /* GL_GLEXT_PROTOTYPES */
21277+typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer);
21278+typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count);
21279+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count);
21280+#endif
21281+
21282+#ifndef GL_SUN_mesh_array
21283+#define GL_SUN_mesh_array 1
21284+#ifdef GL_GLEXT_PROTOTYPES
21285+GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum, GLint, GLsizei, GLsizei);
21286+#endif /* GL_GLEXT_PROTOTYPES */
21287+typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width);
21288+#endif
21289+
21290+#ifndef GL_SUN_slice_accum
21291+#define GL_SUN_slice_accum 1
21292+#endif
21293+
21294+#ifndef GL_NV_multisample_filter_hint
21295+#define GL_NV_multisample_filter_hint 1
21296+#endif
21297+
21298+#ifndef GL_NV_depth_clamp
21299+#define GL_NV_depth_clamp 1
21300+#endif
21301+
21302+#ifndef GL_NV_occlusion_query
21303+#define GL_NV_occlusion_query 1
21304+#ifdef GL_GLEXT_PROTOTYPES
21305+GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei, GLuint *);
21306+GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei, const GLuint *);
21307+GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint);
21308+GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint);
21309+GLAPI void APIENTRY glEndOcclusionQueryNV (void);
21310+GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint, GLenum, GLint *);
21311+GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint, GLenum, GLuint *);
21312+#endif /* GL_GLEXT_PROTOTYPES */
21313+typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids);
21314+typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids);
21315+typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id);
21316+typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id);
21317+typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void);
21318+typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params);
21319+typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params);
21320+#endif
21321+
21322+#ifndef GL_NV_point_sprite
21323+#define GL_NV_point_sprite 1
21324+#ifdef GL_GLEXT_PROTOTYPES
21325+GLAPI void APIENTRY glPointParameteriNV (GLenum, GLint);
21326+GLAPI void APIENTRY glPointParameterivNV (GLenum, const GLint *);
21327+#endif /* GL_GLEXT_PROTOTYPES */
21328+typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param);
21329+typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
21330+#endif
21331+
21332+#ifndef GL_NV_texture_shader3
21333+#define GL_NV_texture_shader3 1
21334+#endif
21335+
21336+#ifndef GL_NV_vertex_program1_1
21337+#define GL_NV_vertex_program1_1 1
21338+#endif
21339+
21340+#ifndef GL_EXT_shadow_funcs
21341+#define GL_EXT_shadow_funcs 1
21342+#endif
21343+
21344+#ifndef GL_EXT_stencil_two_side
21345+#define GL_EXT_stencil_two_side 1
21346+#ifdef GL_GLEXT_PROTOTYPES
21347+GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum);
21348+#endif /* GL_GLEXT_PROTOTYPES */
21349+typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face);
21350+#endif
21351+
21352+#ifndef GL_ATI_text_fragment_shader
21353+#define GL_ATI_text_fragment_shader 1
21354+#endif
21355+
21356+#ifndef GL_APPLE_client_storage
21357+#define GL_APPLE_client_storage 1
21358+#endif
21359+
21360+#ifndef GL_APPLE_element_array
21361+#define GL_APPLE_element_array 1
21362+#ifdef GL_GLEXT_PROTOTYPES
21363+GLAPI void APIENTRY glElementPointerAPPLE (GLenum, const GLvoid *);
21364+GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum, GLint, GLsizei);
21365+GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, GLint, GLsizei);
21366+GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum, const GLint *, const GLsizei *, GLsizei);
21367+GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, const GLint *, const GLsizei *, GLsizei);
21368+#endif /* GL_GLEXT_PROTOTYPES */
21369+typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid *pointer);
21370+typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count);
21371+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
21372+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
21373+typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);
21374+#endif
21375+
21376+#ifndef GL_APPLE_fence
21377+#define GL_APPLE_fence 1
21378+#ifdef GL_GLEXT_PROTOTYPES
21379+GLAPI void APIENTRY glGenFencesAPPLE (GLsizei, GLuint *);
21380+GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei, const GLuint *);
21381+GLAPI void APIENTRY glSetFenceAPPLE (GLuint);
21382+GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint);
21383+GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint);
21384+GLAPI void APIENTRY glFinishFenceAPPLE (GLuint);
21385+GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum, GLuint);
21386+GLAPI void APIENTRY glFinishObjectAPPLE (GLenum, GLint);
21387+#endif /* GL_GLEXT_PROTOTYPES */
21388+typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences);
21389+typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences);
21390+typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence);
21391+typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence);
21392+typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence);
21393+typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence);
21394+typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name);
21395+typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);
21396+#endif
21397+
21398+#ifndef GL_APPLE_vertex_array_object
21399+#define GL_APPLE_vertex_array_object 1
21400+#ifdef GL_GLEXT_PROTOTYPES
21401+GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint);
21402+GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei, const GLuint *);
21403+GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, GLuint *);
21404+GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint);
21405+#endif /* GL_GLEXT_PROTOTYPES */
21406+typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
21407+typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
21408+typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);
21409+typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
21410+#endif
21411+
21412+#ifndef GL_APPLE_vertex_array_range
21413+#define GL_APPLE_vertex_array_range 1
21414+#ifdef GL_GLEXT_PROTOTYPES
21415+GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei, GLvoid *);
21416+GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei, GLvoid *);
21417+GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum, GLint);
21418+#endif /* GL_GLEXT_PROTOTYPES */
21419+typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);
21420+typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);
21421+typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param);
21422+#endif
21423+
21424+#ifndef GL_APPLE_ycbcr_422
21425+#define GL_APPLE_ycbcr_422 1
21426+#endif
21427+
21428+#ifndef GL_S3_s3tc
21429+#define GL_S3_s3tc 1
21430+#endif
21431+
21432+#ifndef GL_ATI_draw_buffers
21433+#define GL_ATI_draw_buffers 1
21434+#ifdef GL_GLEXT_PROTOTYPES
21435+GLAPI void APIENTRY glDrawBuffersATI (GLsizei, const GLenum *);
21436+#endif /* GL_GLEXT_PROTOTYPES */
21437+typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs);
21438+#endif
21439+
21440+#ifndef GL_ATI_pixel_format_float
21441+#define GL_ATI_pixel_format_float 1
21442+/* This is really a WGL extension, but defines some associated GL enums.
21443+ * ATI does not export "GL_ATI_pixel_format_float" in the GL_EXTENSIONS string.
21444+ */
21445+#endif
21446+
21447+#ifndef GL_ATI_texture_env_combine3
21448+#define GL_ATI_texture_env_combine3 1
21449+#endif
21450+
21451+#ifndef GL_ATI_texture_float
21452+#define GL_ATI_texture_float 1
21453+#endif
21454+
21455+#ifndef GL_NV_float_buffer
21456+#define GL_NV_float_buffer 1
21457+#endif
21458+
21459+#ifndef GL_NV_fragment_program
21460+#define GL_NV_fragment_program 1
21461+/* Some NV_fragment_program entry points are shared with ARB_vertex_program. */
21462+#ifdef GL_GLEXT_PROTOTYPES
21463+GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat);
21464+GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble);
21465+GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint, GLsizei, const GLubyte *, const GLfloat *);
21466+GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint, GLsizei, const GLubyte *, const GLdouble *);
21467+GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint, GLsizei, const GLubyte *, GLfloat *);
21468+GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint, GLsizei, const GLubyte *, GLdouble *);
21469+#endif /* GL_GLEXT_PROTOTYPES */
21470+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
21471+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
21472+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
21473+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
21474+typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
21475+typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
21476+#endif
21477+
21478+#ifndef GL_NV_half_float
21479+#define GL_NV_half_float 1
21480+#ifdef GL_GLEXT_PROTOTYPES
21481+GLAPI void APIENTRY glVertex2hNV (GLhalfNV, GLhalfNV);
21482+GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *);
21483+GLAPI void APIENTRY glVertex3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21484+GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *);
21485+GLAPI void APIENTRY glVertex4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21486+GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *);
21487+GLAPI void APIENTRY glNormal3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21488+GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *);
21489+GLAPI void APIENTRY glColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21490+GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *);
21491+GLAPI void APIENTRY glColor4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21492+GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *);
21493+GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV);
21494+GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *);
21495+GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV, GLhalfNV);
21496+GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *);
21497+GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21498+GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *);
21499+GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21500+GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *);
21501+GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum, GLhalfNV);
21502+GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum, const GLhalfNV *);
21503+GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum, GLhalfNV, GLhalfNV);
21504+GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum, const GLhalfNV *);
21505+GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV);
21506+GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum, const GLhalfNV *);
21507+GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21508+GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum, const GLhalfNV *);
21509+GLAPI void APIENTRY glFogCoordhNV (GLhalfNV);
21510+GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *);
21511+GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21512+GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *);
21513+GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV);
21514+GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *);
21515+GLAPI void APIENTRY glVertexAttrib1hNV (GLuint, GLhalfNV);
21516+GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint, const GLhalfNV *);
21517+GLAPI void APIENTRY glVertexAttrib2hNV (GLuint, GLhalfNV, GLhalfNV);
21518+GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint, const GLhalfNV *);
21519+GLAPI void APIENTRY glVertexAttrib3hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV);
21520+GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint, const GLhalfNV *);
21521+GLAPI void APIENTRY glVertexAttrib4hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21522+GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint, const GLhalfNV *);
21523+GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint, GLsizei, const GLhalfNV *);
21524+GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint, GLsizei, const GLhalfNV *);
21525+GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint, GLsizei, const GLhalfNV *);
21526+GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint, GLsizei, const GLhalfNV *);
21527+#endif /* GL_GLEXT_PROTOTYPES */
21528+typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y);
21529+typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v);
21530+typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z);
21531+typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v);
21532+typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
21533+typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v);
21534+typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);
21535+typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v);
21536+typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
21537+typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v);
21538+typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);
21539+typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v);
21540+typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s);
21541+typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v);
21542+typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t);
21543+typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v);
21544+typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r);
21545+typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v);
21546+typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
21547+typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v);
21548+typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s);
21549+typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v);
21550+typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t);
21551+typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v);
21552+typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);
21553+typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v);
21554+typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
21555+typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v);
21556+typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog);
21557+typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog);
21558+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
21559+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v);
21560+typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight);
21561+typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight);
21562+typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x);
21563+typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v);
21564+typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y);
21565+typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v);
21566+typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);
21567+typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v);
21568+typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
21569+typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v);
21570+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21571+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21572+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21573+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21574+#endif
21575+
21576+#ifndef GL_NV_pixel_data_range
21577+#define GL_NV_pixel_data_range 1
21578+#ifdef GL_GLEXT_PROTOTYPES
21579+GLAPI void APIENTRY glPixelDataRangeNV (GLenum, GLsizei, GLvoid *);
21580+GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum);
21581+#endif /* GL_GLEXT_PROTOTYPES */
21582+typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, GLvoid *pointer);
21583+typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target);
21584+#endif
21585+
21586+#ifndef GL_NV_primitive_restart
21587+#define GL_NV_primitive_restart 1
21588+#ifdef GL_GLEXT_PROTOTYPES
21589+GLAPI void APIENTRY glPrimitiveRestartNV (void);
21590+GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint);
21591+#endif /* GL_GLEXT_PROTOTYPES */
21592+typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void);
21593+typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index);
21594+#endif
21595+
21596+#ifndef GL_NV_texture_expand_normal
21597+#define GL_NV_texture_expand_normal 1
21598+#endif
21599+
21600+#ifndef GL_NV_vertex_program2
21601+#define GL_NV_vertex_program2 1
21602+#endif
21603+
21604+#ifndef GL_ATI_map_object_buffer
21605+#define GL_ATI_map_object_buffer 1
21606+#ifdef GL_GLEXT_PROTOTYPES
21607+GLAPI GLvoid* APIENTRY glMapObjectBufferATI (GLuint);
21608+GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint);
21609+#endif /* GL_GLEXT_PROTOTYPES */
21610+typedef GLvoid* (APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer);
21611+typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer);
21612+#endif
21613+
21614+#ifndef GL_ATI_separate_stencil
21615+#define GL_ATI_separate_stencil 1
21616+#ifdef GL_GLEXT_PROTOTYPES
21617+GLAPI void APIENTRY glStencilOpSeparateATI (GLenum, GLenum, GLenum, GLenum);
21618+GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum, GLenum, GLint, GLuint);
21619+#endif /* GL_GLEXT_PROTOTYPES */
21620+typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
21621+typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
21622+#endif
21623+
21624+#ifndef GL_ATI_vertex_attrib_array_object
21625+#define GL_ATI_vertex_attrib_array_object 1
21626+#ifdef GL_GLEXT_PROTOTYPES
21627+GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint, GLint, GLenum, GLboolean, GLsizei, GLuint, GLuint);
21628+GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint, GLenum, GLfloat *);
21629+GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint, GLenum, GLint *);
21630+#endif /* GL_GLEXT_PROTOTYPES */
21631+typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
21632+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params);
21633+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params);
21634+#endif
21635+
21636+#ifndef GL_OES_read_format
21637+#define GL_OES_read_format 1
21638+#endif
21639+
21640+#ifndef GL_EXT_depth_bounds_test
21641+#define GL_EXT_depth_bounds_test 1
21642+#ifdef GL_GLEXT_PROTOTYPES
21643+GLAPI void APIENTRY glDepthBoundsEXT (GLclampd, GLclampd);
21644+#endif /* GL_GLEXT_PROTOTYPES */
21645+typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax);
21646+#endif
21647+
21648+#ifndef GL_EXT_texture_mirror_clamp
21649+#define GL_EXT_texture_mirror_clamp 1
21650+#endif
21651+
21652+#ifndef GL_EXT_blend_equation_separate
21653+#define GL_EXT_blend_equation_separate 1
21654+#ifdef GL_GLEXT_PROTOTYPES
21655+GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum, GLenum);
21656+#endif /* GL_GLEXT_PROTOTYPES */
21657+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha);
21658+#endif
21659+
21660+#ifndef GL_MESA_pack_invert
21661+#define GL_MESA_pack_invert 1
21662+#endif
21663+
21664+#ifndef GL_MESA_ycbcr_texture
21665+#define GL_MESA_ycbcr_texture 1
21666+#endif
21667+
21668+#ifndef GL_EXT_pixel_buffer_object
21669+#define GL_EXT_pixel_buffer_object 1
21670+#endif
21671+
21672+#ifndef GL_NV_fragment_program_option
21673+#define GL_NV_fragment_program_option 1
21674+#endif
21675+
21676+#ifndef GL_NV_fragment_program2
21677+#define GL_NV_fragment_program2 1
21678+#endif
21679+
21680+#ifndef GL_NV_vertex_program2_option
21681+#define GL_NV_vertex_program2_option 1
21682+#endif
21683+
21684+#ifndef GL_NV_vertex_program3
21685+#define GL_NV_vertex_program3 1
21686+#endif
21687+
21688+#ifndef GL_EXT_framebuffer_object
21689+#define GL_EXT_framebuffer_object 1
21690+#ifdef GL_GLEXT_PROTOTYPES
21691+GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint);
21692+GLAPI void APIENTRY glBindRenderbufferEXT (GLenum, GLuint);
21693+GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei, const GLuint *);
21694+GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei, GLuint *);
21695+GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum, GLenum, GLsizei, GLsizei);
21696+GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum, GLenum, GLint *);
21697+GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint);
21698+GLAPI void APIENTRY glBindFramebufferEXT (GLenum, GLuint);
21699+GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei, const GLuint *);
21700+GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei, GLuint *);
21701+GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum);
21702+GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
21703+GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
21704+GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLint);
21705+GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum, GLenum, GLenum, GLuint);
21706+GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum, GLenum, GLenum, GLint *);
21707+GLAPI void APIENTRY glGenerateMipmapEXT (GLenum);
21708+#endif /* GL_GLEXT_PROTOTYPES */
21709+typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);
21710+typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);
21711+typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);
21712+typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);
21713+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
21714+typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
21715+typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);
21716+typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
21717+typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);
21718+typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);
21719+typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);
21720+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
21721+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
21722+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
21723+typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
21724+typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
21725+typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);
21726+#endif
21727+
21728+#ifndef GL_GREMEDY_string_marker
21729+#define GL_GREMEDY_string_marker 1
21730+#ifdef GL_GLEXT_PROTOTYPES
21731+GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei, const GLvoid *);
21732+#endif /* GL_GLEXT_PROTOTYPES */
21733+typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string);
21734+#endif
21735+
21736+#ifndef GL_EXT_packed_depth_stencil
21737+#define GL_EXT_packed_depth_stencil 1
21738+#endif
21739+
21740+#ifndef GL_EXT_stencil_clear_tag
21741+#define GL_EXT_stencil_clear_tag 1
21742+#ifdef GL_GLEXT_PROTOTYPES
21743+GLAPI void APIENTRY glStencilClearTagEXT (GLsizei, GLuint);
21744+#endif /* GL_GLEXT_PROTOTYPES */
21745+typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag);
21746+#endif
21747+
21748+#ifndef GL_EXT_texture_sRGB
21749+#define GL_EXT_texture_sRGB 1
21750+#endif
21751+
21752+#ifndef GL_EXT_framebuffer_blit
21753+#define GL_EXT_framebuffer_blit 1
21754+#ifdef GL_GLEXT_PROTOTYPES
21755+GLAPI void APIENTRY glBlitFramebufferEXT (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum);
21756+#endif /* GL_GLEXT_PROTOTYPES */
21757+typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
21758+#endif
21759+
21760+#ifndef GL_EXT_framebuffer_multisample
21761+#define GL_EXT_framebuffer_multisample 1
21762+#ifdef GL_GLEXT_PROTOTYPES
21763+GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
21764+#endif /* GL_GLEXT_PROTOTYPES */
21765+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
21766+#endif
21767+
21768+#ifndef GL_MESAX_texture_stack
21769+#define GL_MESAX_texture_stack 1
21770+#endif
21771+
21772+#ifndef GL_EXT_timer_query
21773+#define GL_EXT_timer_query 1
21774+#ifdef GL_GLEXT_PROTOTYPES
21775+GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint, GLenum, GLint64EXT *);
21776+GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint, GLenum, GLuint64EXT *);
21777+#endif /* GL_GLEXT_PROTOTYPES */
21778+typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params);
21779+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params);
21780+#endif
21781+
21782+#ifndef GL_EXT_gpu_program_parameters
21783+#define GL_EXT_gpu_program_parameters 1
21784+#ifdef GL_GLEXT_PROTOTYPES
21785+GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *);
21786+GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *);
21787+#endif /* GL_GLEXT_PROTOTYPES */
21788+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
21789+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
21790+#endif
21791+
21792+#ifndef GL_APPLE_flush_buffer_range
21793+#define GL_APPLE_flush_buffer_range 1
21794+#ifdef GL_GLEXT_PROTOTYPES
21795+GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum, GLenum, GLint);
21796+GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum, GLintptr, GLsizeiptr);
21797+#endif /* GL_GLEXT_PROTOTYPES */
21798+typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param);
21799+typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size);
21800+#endif
21801+
21802+#ifndef GL_NV_gpu_program4
21803+#define GL_NV_gpu_program4 1
21804+#ifdef GL_GLEXT_PROTOTYPES
21805+GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint);
21806+GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum, GLuint, const GLint *);
21807+GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *);
21808+GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
21809+GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum, GLuint, const GLuint *);
21810+GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *);
21811+GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint);
21812+GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum, GLuint, const GLint *);
21813+GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *);
21814+GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
21815+GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum, GLuint, const GLuint *);
21816+GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *);
21817+GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum, GLuint, GLint *);
21818+GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum, GLuint, GLuint *);
21819+GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum, GLuint, GLint *);
21820+GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum, GLuint, GLuint *);
21821+#endif /* GL_GLEXT_PROTOTYPES */
21822+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
21823+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
21824+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
21825+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
21826+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
21827+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
21828+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
21829+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
21830+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
21831+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
21832+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
21833+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
21834+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
21835+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
21836+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
21837+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
21838+#endif
21839+
21840+#ifndef GL_NV_geometry_program4
21841+#define GL_NV_geometry_program4 1
21842+#ifdef GL_GLEXT_PROTOTYPES
21843+GLAPI void APIENTRY glProgramVertexLimitNV (GLenum, GLint);
21844+GLAPI void APIENTRY glFramebufferTextureEXT (GLenum, GLenum, GLuint, GLint);
21845+GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum, GLenum, GLuint, GLint, GLint);
21846+GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum, GLenum, GLuint, GLint, GLenum);
21847+#endif /* GL_GLEXT_PROTOTYPES */
21848+typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit);
21849+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
21850+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
21851+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
21852+#endif
21853+
21854+#ifndef GL_EXT_geometry_shader4
21855+#define GL_EXT_geometry_shader4 1
21856+#ifdef GL_GLEXT_PROTOTYPES
21857+GLAPI void APIENTRY glProgramParameteriEXT (GLuint, GLenum, GLint);
21858+#endif /* GL_GLEXT_PROTOTYPES */
21859+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
21860+#endif
21861+
21862+#ifndef GL_NV_vertex_program4
21863+#define GL_NV_vertex_program4 1
21864+#ifdef GL_GLEXT_PROTOTYPES
21865+GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint, GLint);
21866+GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint, GLint, GLint);
21867+GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint, GLint, GLint, GLint);
21868+GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint, GLint, GLint, GLint, GLint);
21869+GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint, GLuint);
21870+GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint, GLuint, GLuint);
21871+GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint, GLuint, GLuint, GLuint);
21872+GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint, GLuint, GLuint, GLuint, GLuint);
21873+GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint, const GLint *);
21874+GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint, const GLint *);
21875+GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint, const GLint *);
21876+GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint, const GLint *);
21877+GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint, const GLuint *);
21878+GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint, const GLuint *);
21879+GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint, const GLuint *);
21880+GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint, const GLuint *);
21881+GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint, const GLbyte *);
21882+GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint, const GLshort *);
21883+GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint, const GLubyte *);
21884+GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint, const GLushort *);
21885+GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint, GLint, GLenum, GLsizei, const GLvoid *);
21886+GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint, GLenum, GLint *);
21887+GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint, GLenum, GLuint *);
21888+#endif /* GL_GLEXT_PROTOTYPES */
21889+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x);
21890+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y);
21891+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z);
21892+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
21893+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x);
21894+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y);
21895+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
21896+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
21897+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v);
21898+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v);
21899+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v);
21900+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v);
21901+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v);
21902+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v);
21903+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v);
21904+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v);
21905+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v);
21906+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v);
21907+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v);
21908+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v);
21909+typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
21910+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params);
21911+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params);
21912+#endif
21913+
21914+#ifndef GL_EXT_gpu_shader4
21915+#define GL_EXT_gpu_shader4 1
21916+#ifdef GL_GLEXT_PROTOTYPES
21917+GLAPI void APIENTRY glGetUniformuivEXT (GLuint, GLint, GLuint *);
21918+GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint, GLuint, const GLchar *);
21919+GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint, const GLchar *);
21920+GLAPI void APIENTRY glUniform1uiEXT (GLint, GLuint);
21921+GLAPI void APIENTRY glUniform2uiEXT (GLint, GLuint, GLuint);
21922+GLAPI void APIENTRY glUniform3uiEXT (GLint, GLuint, GLuint, GLuint);
21923+GLAPI void APIENTRY glUniform4uiEXT (GLint, GLuint, GLuint, GLuint, GLuint);
21924+GLAPI void APIENTRY glUniform1uivEXT (GLint, GLsizei, const GLuint *);
21925+GLAPI void APIENTRY glUniform2uivEXT (GLint, GLsizei, const GLuint *);
21926+GLAPI void APIENTRY glUniform3uivEXT (GLint, GLsizei, const GLuint *);
21927+GLAPI void APIENTRY glUniform4uivEXT (GLint, GLsizei, const GLuint *);
21928+#endif /* GL_GLEXT_PROTOTYPES */
21929+typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params);
21930+typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name);
21931+typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name);
21932+typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0);
21933+typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1);
21934+typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
21935+typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
21936+typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
21937+typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
21938+typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
21939+typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
21940+#endif
21941+
21942+#ifndef GL_EXT_draw_instanced
21943+#define GL_EXT_draw_instanced 1
21944+#ifdef GL_GLEXT_PROTOTYPES
21945+GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum, GLint, GLsizei, GLsizei);
21946+GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum, GLsizei, GLenum, const GLvoid *, GLsizei);
21947+#endif /* GL_GLEXT_PROTOTYPES */
21948+typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
21949+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
21950+#endif
21951+
21952+#ifndef GL_EXT_packed_float
21953+#define GL_EXT_packed_float 1
21954+#endif
21955+
21956+#ifndef GL_EXT_texture_array
21957+#define GL_EXT_texture_array 1
21958+#endif
21959+
21960+#ifndef GL_EXT_texture_buffer_object
21961+#define GL_EXT_texture_buffer_object 1
21962+#ifdef GL_GLEXT_PROTOTYPES
21963+GLAPI void APIENTRY glTexBufferEXT (GLenum, GLenum, GLuint);
21964+#endif /* GL_GLEXT_PROTOTYPES */
21965+typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
21966+#endif
21967+
21968+#ifndef GL_EXT_texture_compression_latc
21969+#define GL_EXT_texture_compression_latc 1
21970+#endif
21971+
21972+#ifndef GL_EXT_texture_compression_rgtc
21973+#define GL_EXT_texture_compression_rgtc 1
21974+#endif
21975+
21976+#ifndef GL_EXT_texture_shared_exponent
21977+#define GL_EXT_texture_shared_exponent 1
21978+#endif
21979+
21980+#ifndef GL_NV_depth_buffer_float
21981+#define GL_NV_depth_buffer_float 1
21982+#ifdef GL_GLEXT_PROTOTYPES
21983+GLAPI void APIENTRY glDepthRangedNV (GLdouble, GLdouble);
21984+GLAPI void APIENTRY glClearDepthdNV (GLdouble);
21985+GLAPI void APIENTRY glDepthBoundsdNV (GLdouble, GLdouble);
21986+#endif /* GL_GLEXT_PROTOTYPES */
21987+typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar);
21988+typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth);
21989+typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax);
21990+#endif
21991+
21992+#ifndef GL_NV_fragment_program4
21993+#define GL_NV_fragment_program4 1
21994+#endif
21995+
21996+#ifndef GL_NV_framebuffer_multisample_coverage
21997+#define GL_NV_framebuffer_multisample_coverage 1
21998+#ifdef GL_GLEXT_PROTOTYPES
21999+GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum, GLsizei, GLsizei, GLenum, GLsizei, GLsizei);
22000+#endif /* GL_GLEXT_PROTOTYPES */
22001+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
22002+#endif
22003+
22004+#ifndef GL_EXT_framebuffer_sRGB
22005+#define GL_EXT_framebuffer_sRGB 1
22006+#endif
22007+
22008+#ifndef GL_NV_geometry_shader4
22009+#define GL_NV_geometry_shader4 1
22010+#endif
22011+
22012+#ifndef GL_NV_parameter_buffer_object
22013+#define GL_NV_parameter_buffer_object 1
22014+#ifdef GL_GLEXT_PROTOTYPES
22015+GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum, GLuint, GLuint, GLsizei, const GLfloat *);
22016+GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum, GLuint, GLuint, GLsizei, const GLint *);
22017+GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum, GLuint, GLuint, GLsizei, const GLuint *);
22018+#endif /* GL_GLEXT_PROTOTYPES */
22019+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params);
22020+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params);
22021+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params);
22022+#endif
22023+
22024+#ifndef GL_EXT_draw_buffers2
22025+#define GL_EXT_draw_buffers2 1
22026+#ifdef GL_GLEXT_PROTOTYPES
22027+GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint, GLboolean, GLboolean, GLboolean, GLboolean);
22028+GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum, GLuint, GLboolean *);
22029+GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum, GLuint, GLint *);
22030+GLAPI void APIENTRY glEnableIndexedEXT (GLenum, GLuint);
22031+GLAPI void APIENTRY glDisableIndexedEXT (GLenum, GLuint);
22032+GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum, GLuint);
22033+#endif /* GL_GLEXT_PROTOTYPES */
22034+typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
22035+typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data);
22036+typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data);
22037+typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
22038+typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
22039+typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index);
22040+#endif
22041+
22042+#ifndef GL_NV_transform_feedback
22043+#define GL_NV_transform_feedback 1
22044+#ifdef GL_GLEXT_PROTOTYPES
22045+GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum);
22046+GLAPI void APIENTRY glEndTransformFeedbackNV (void);
22047+GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint, const GLint *, GLenum);
22048+GLAPI void APIENTRY glBindBufferRangeNV (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr);
22049+GLAPI void APIENTRY glBindBufferOffsetNV (GLenum, GLuint, GLuint, GLintptr);
22050+GLAPI void APIENTRY glBindBufferBaseNV (GLenum, GLuint, GLuint);
22051+GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint, GLsizei, const GLint *, GLenum);
22052+GLAPI void APIENTRY glActiveVaryingNV (GLuint, const GLchar *);
22053+GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint, const GLchar *);
22054+GLAPI void APIENTRY glGetActiveVaryingNV (GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *);
22055+GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint, GLuint, GLint *);
22056+#endif /* GL_GLEXT_PROTOTYPES */
22057+typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode);
22058+typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void);
22059+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode);
22060+typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
22061+typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
22062+typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer);
22063+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
22064+typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name);
22065+typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name);
22066+typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
22067+typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location);
22068+#endif
22069+
22070+#ifndef GL_EXT_bindable_uniform
22071+#define GL_EXT_bindable_uniform 1
22072+#ifdef GL_GLEXT_PROTOTYPES
22073+GLAPI void APIENTRY glUniformBufferEXT (GLuint, GLint, GLuint);
22074+GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint, GLint);
22075+GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint, GLint);
22076+#endif /* GL_GLEXT_PROTOTYPES */
22077+typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer);
22078+typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location);
22079+typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location);
22080+#endif
22081+
22082+#ifndef GL_EXT_texture_integer
22083+#define GL_EXT_texture_integer 1
22084+#ifdef GL_GLEXT_PROTOTYPES
22085+GLAPI void APIENTRY glTexParameterIivEXT (GLenum, GLenum, const GLint *);
22086+GLAPI void APIENTRY glTexParameterIuivEXT (GLenum, GLenum, const GLuint *);
22087+GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum, GLenum, GLint *);
22088+GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum, GLenum, GLuint *);
22089+GLAPI void APIENTRY glClearColorIiEXT (GLint, GLint, GLint, GLint);
22090+GLAPI void APIENTRY glClearColorIuiEXT (GLuint, GLuint, GLuint, GLuint);
22091+#endif /* GL_GLEXT_PROTOTYPES */
22092+typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
22093+typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
22094+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
22095+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
22096+typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha);
22097+typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);
22098+#endif
22099+
22100+
22101+#ifdef __cplusplus
22102+}
22103+#endif
22104+
22105+#endif
22106+
22107+
22108+/* ERO */
22109+GLAPI void GLAPIENTRY fake_gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *data);
22110Index: qemu-0.13.0/target-i386/mesa_glu.h
22111===================================================================
22112--- /dev/null 1970-01-01 00:00:00.000000000 +0000
22113+++ qemu-0.13.0/target-i386/mesa_glu.h 2011-01-17 16:42:36.000000000 +0800
22114@@ -0,0 +1,354 @@
22115+/*
22116+** License Applicability. Except to the extent portions of this file are
22117+** made subject to an alternative license as permitted in the SGI Free
22118+** Software License B, Version 1.1 (the "License"), the contents of this
22119+** file are subject only to the provisions of the License. You may not use
22120+** this file except in compliance with the License. You may obtain a copy
22121+** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
22122+** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
22123+**
22124+** http://oss.sgi.com/projects/FreeB
22125+**
22126+** Note that, as provided in the License, the Software is distributed on an
22127+** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
22128+** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
22129+** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
22130+** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
22131+**
22132+** Original Code. The Original Code is: OpenGL Sample Implementation,
22133+** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
22134+** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
22135+** Copyright in any portions created by third parties is as indicated
22136+** elsewhere herein. All Rights Reserved.
22137+**
22138+** Additional Notice Provisions: This software was created using the
22139+** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
22140+** not been independently verified as being compliant with the OpenGL(R)
22141+** version 1.2.1 Specification.
22142+*/
22143+
22144+#ifndef __glu_h__
22145+#define __glu_h__
22146+
22147+#if defined(USE_MGL_NAMESPACE)
22148+#include "glu_mangle.h"
22149+#endif
22150+
22151+//#include <GL/gl.h>
22152+#include "mesa_gl.h"
22153+
22154+#ifndef GLAPIENTRY
22155+#define GLAPIENTRY
22156+#endif
22157+
22158+#ifndef GLAPIENTRYP
22159+#define GLAPIENTRYP GLAPIENTRY *
22160+#endif
22161+
22162+#ifdef GLAPI
22163+#undef GLAPI
22164+#endif
22165+
22166+# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GLU32)
22167+# define GLAPI __declspec(dllexport)
22168+# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
22169+# define GLAPI __declspec(dllimport)
22170+# else /* for use with static link lib build of Win32 edition only */
22171+# define GLAPI extern
22172+# endif /* _STATIC_MESA support */
22173+
22174+
22175+#ifndef GLAPI
22176+#define GLAPI
22177+#endif
22178+
22179+#ifdef __cplusplus
22180+extern "C" {
22181+#endif
22182+
22183+/*************************************************************/
22184+
22185+/* Extensions */
22186+#define GLU_EXT_object_space_tess 1
22187+#define GLU_EXT_nurbs_tessellator 1
22188+
22189+/* Boolean */
22190+#define GLU_FALSE 0
22191+#define GLU_TRUE 1
22192+
22193+/* Version */
22194+#define GLU_VERSION_1_1 1
22195+#define GLU_VERSION_1_2 1
22196+#define GLU_VERSION_1_3 1
22197+
22198+/* StringName */
22199+#define GLU_VERSION 100800
22200+#define GLU_EXTENSIONS 100801
22201+
22202+/* ErrorCode */
22203+#define GLU_INVALID_ENUM 100900
22204+#define GLU_INVALID_VALUE 100901
22205+#define GLU_OUT_OF_MEMORY 100902
22206+#define GLU_INCOMPATIBLE_GL_VERSION 100903
22207+#define GLU_INVALID_OPERATION 100904
22208+
22209+/* NurbsDisplay */
22210+/* GLU_FILL */
22211+#define GLU_OUTLINE_POLYGON 100240
22212+#define GLU_OUTLINE_PATCH 100241
22213+
22214+/* NurbsCallback */
22215+#define GLU_NURBS_ERROR 100103
22216+#define GLU_ERROR 100103
22217+#define GLU_NURBS_BEGIN 100164
22218+#define GLU_NURBS_BEGIN_EXT 100164
22219+#define GLU_NURBS_VERTEX 100165
22220+#define GLU_NURBS_VERTEX_EXT 100165
22221+#define GLU_NURBS_NORMAL 100166
22222+#define GLU_NURBS_NORMAL_EXT 100166
22223+#define GLU_NURBS_COLOR 100167
22224+#define GLU_NURBS_COLOR_EXT 100167
22225+#define GLU_NURBS_TEXTURE_COORD 100168
22226+#define GLU_NURBS_TEX_COORD_EXT 100168
22227+#define GLU_NURBS_END 100169
22228+#define GLU_NURBS_END_EXT 100169
22229+#define GLU_NURBS_BEGIN_DATA 100170
22230+#define GLU_NURBS_BEGIN_DATA_EXT 100170
22231+#define GLU_NURBS_VERTEX_DATA 100171
22232+#define GLU_NURBS_VERTEX_DATA_EXT 100171
22233+#define GLU_NURBS_NORMAL_DATA 100172
22234+#define GLU_NURBS_NORMAL_DATA_EXT 100172
22235+#define GLU_NURBS_COLOR_DATA 100173
22236+#define GLU_NURBS_COLOR_DATA_EXT 100173
22237+#define GLU_NURBS_TEXTURE_COORD_DATA 100174
22238+#define GLU_NURBS_TEX_COORD_DATA_EXT 100174
22239+#define GLU_NURBS_END_DATA 100175
22240+#define GLU_NURBS_END_DATA_EXT 100175
22241+
22242+/* NurbsError */
22243+#define GLU_NURBS_ERROR1 100251
22244+#define GLU_NURBS_ERROR2 100252
22245+#define GLU_NURBS_ERROR3 100253
22246+#define GLU_NURBS_ERROR4 100254
22247+#define GLU_NURBS_ERROR5 100255
22248+#define GLU_NURBS_ERROR6 100256
22249+#define GLU_NURBS_ERROR7 100257
22250+#define GLU_NURBS_ERROR8 100258
22251+#define GLU_NURBS_ERROR9 100259
22252+#define GLU_NURBS_ERROR10 100260
22253+#define GLU_NURBS_ERROR11 100261
22254+#define GLU_NURBS_ERROR12 100262
22255+#define GLU_NURBS_ERROR13 100263
22256+#define GLU_NURBS_ERROR14 100264
22257+#define GLU_NURBS_ERROR15 100265
22258+#define GLU_NURBS_ERROR16 100266
22259+#define GLU_NURBS_ERROR17 100267
22260+#define GLU_NURBS_ERROR18 100268
22261+#define GLU_NURBS_ERROR19 100269
22262+#define GLU_NURBS_ERROR20 100270
22263+#define GLU_NURBS_ERROR21 100271
22264+#define GLU_NURBS_ERROR22 100272
22265+#define GLU_NURBS_ERROR23 100273
22266+#define GLU_NURBS_ERROR24 100274
22267+#define GLU_NURBS_ERROR25 100275
22268+#define GLU_NURBS_ERROR26 100276
22269+#define GLU_NURBS_ERROR27 100277
22270+#define GLU_NURBS_ERROR28 100278
22271+#define GLU_NURBS_ERROR29 100279
22272+#define GLU_NURBS_ERROR30 100280
22273+#define GLU_NURBS_ERROR31 100281
22274+#define GLU_NURBS_ERROR32 100282
22275+#define GLU_NURBS_ERROR33 100283
22276+#define GLU_NURBS_ERROR34 100284
22277+#define GLU_NURBS_ERROR35 100285
22278+#define GLU_NURBS_ERROR36 100286
22279+#define GLU_NURBS_ERROR37 100287
22280+
22281+/* NurbsProperty */
22282+#define GLU_AUTO_LOAD_MATRIX 100200
22283+#define GLU_CULLING 100201
22284+#define GLU_SAMPLING_TOLERANCE 100203
22285+#define GLU_DISPLAY_MODE 100204
22286+#define GLU_PARAMETRIC_TOLERANCE 100202
22287+#define GLU_SAMPLING_METHOD 100205
22288+#define GLU_U_STEP 100206
22289+#define GLU_V_STEP 100207
22290+#define GLU_NURBS_MODE 100160
22291+#define GLU_NURBS_MODE_EXT 100160
22292+#define GLU_NURBS_TESSELLATOR 100161
22293+#define GLU_NURBS_TESSELLATOR_EXT 100161
22294+#define GLU_NURBS_RENDERER 100162
22295+#define GLU_NURBS_RENDERER_EXT 100162
22296+
22297+/* NurbsSampling */
22298+#define GLU_OBJECT_PARAMETRIC_ERROR 100208
22299+#define GLU_OBJECT_PARAMETRIC_ERROR_EXT 100208
22300+#define GLU_OBJECT_PATH_LENGTH 100209
22301+#define GLU_OBJECT_PATH_LENGTH_EXT 100209
22302+#define GLU_PATH_LENGTH 100215
22303+#define GLU_PARAMETRIC_ERROR 100216
22304+#define GLU_DOMAIN_DISTANCE 100217
22305+
22306+/* NurbsTrim */
22307+#define GLU_MAP1_TRIM_2 100210
22308+#define GLU_MAP1_TRIM_3 100211
22309+
22310+/* QuadricDrawStyle */
22311+#define GLU_POINT 100010
22312+#define GLU_LINE 100011
22313+#define GLU_FILL 100012
22314+#define GLU_SILHOUETTE 100013
22315+
22316+/* QuadricCallback */
22317+/* GLU_ERROR */
22318+
22319+/* QuadricNormal */
22320+#define GLU_SMOOTH 100000
22321+#define GLU_FLAT 100001
22322+#define GLU_NONE 100002
22323+
22324+/* QuadricOrientation */
22325+#define GLU_OUTSIDE 100020
22326+#define GLU_INSIDE 100021
22327+
22328+/* TessCallback */
22329+#define GLU_TESS_BEGIN 100100
22330+#define GLU_BEGIN 100100
22331+#define GLU_TESS_VERTEX 100101
22332+#define GLU_VERTEX 100101
22333+#define GLU_TESS_END 100102
22334+#define GLU_END 100102
22335+#define GLU_TESS_ERROR 100103
22336+#define GLU_TESS_EDGE_FLAG 100104
22337+#define GLU_EDGE_FLAG 100104
22338+#define GLU_TESS_COMBINE 100105
22339+#define GLU_TESS_BEGIN_DATA 100106
22340+#define GLU_TESS_VERTEX_DATA 100107
22341+#define GLU_TESS_END_DATA 100108
22342+#define GLU_TESS_ERROR_DATA 100109
22343+#define GLU_TESS_EDGE_FLAG_DATA 100110
22344+#define GLU_TESS_COMBINE_DATA 100111
22345+
22346+/* TessContour */
22347+#define GLU_CW 100120
22348+#define GLU_CCW 100121
22349+#define GLU_INTERIOR 100122
22350+#define GLU_EXTERIOR 100123
22351+#define GLU_UNKNOWN 100124
22352+
22353+/* TessProperty */
22354+#define GLU_TESS_WINDING_RULE 100140
22355+#define GLU_TESS_BOUNDARY_ONLY 100141
22356+#define GLU_TESS_TOLERANCE 100142
22357+
22358+/* TessError */
22359+#define GLU_TESS_ERROR1 100151
22360+#define GLU_TESS_ERROR2 100152
22361+#define GLU_TESS_ERROR3 100153
22362+#define GLU_TESS_ERROR4 100154
22363+#define GLU_TESS_ERROR5 100155
22364+#define GLU_TESS_ERROR6 100156
22365+#define GLU_TESS_ERROR7 100157
22366+#define GLU_TESS_ERROR8 100158
22367+#define GLU_TESS_MISSING_BEGIN_POLYGON 100151
22368+#define GLU_TESS_MISSING_BEGIN_CONTOUR 100152
22369+#define GLU_TESS_MISSING_END_POLYGON 100153
22370+#define GLU_TESS_MISSING_END_CONTOUR 100154
22371+#define GLU_TESS_COORD_TOO_LARGE 100155
22372+#define GLU_TESS_NEED_COMBINE_CALLBACK 100156
22373+
22374+/* TessWinding */
22375+#define GLU_TESS_WINDING_ODD 100130
22376+#define GLU_TESS_WINDING_NONZERO 100131
22377+#define GLU_TESS_WINDING_POSITIVE 100132
22378+#define GLU_TESS_WINDING_NEGATIVE 100133
22379+#define GLU_TESS_WINDING_ABS_GEQ_TWO 100134
22380+
22381+/*************************************************************/
22382+
22383+
22384+#ifdef __cplusplus
22385+class GLUnurbs;
22386+class GLUquadric;
22387+class GLUtesselator;
22388+#else
22389+typedef struct GLUnurbs GLUnurbs;
22390+typedef struct GLUquadric GLUquadric;
22391+typedef struct GLUtesselator GLUtesselator;
22392+#endif
22393+
22394+typedef GLUnurbs GLUnurbsObj;
22395+typedef GLUquadric GLUquadricObj;
22396+typedef GLUtesselator GLUtesselatorObj;
22397+typedef GLUtesselator GLUtriangulatorObj;
22398+
22399+#define GLU_TESS_MAX_COORD 1.0e150
22400+
22401+/* Internal convenience typedefs */
22402+typedef void (GLAPIENTRYP _GLUfuncptr)();
22403+
22404+GLAPI void GLAPIENTRY gluBeginCurve (GLUnurbs* nurb);
22405+GLAPI void GLAPIENTRY gluBeginPolygon (GLUtesselator* tess);
22406+GLAPI void GLAPIENTRY gluBeginSurface (GLUnurbs* nurb);
22407+GLAPI void GLAPIENTRY gluBeginTrim (GLUnurbs* nurb);
22408+GLAPI GLint GLAPIENTRY gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
22409+GLAPI GLint GLAPIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
22410+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);
22411+GLAPI GLint GLAPIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data);
22412+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);
22413+GLAPI GLint GLAPIENTRY gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
22414+GLAPI GLboolean GLAPIENTRY gluCheckExtension (const GLubyte *extName, const GLubyte *extString);
22415+GLAPI void GLAPIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
22416+GLAPI void GLAPIENTRY gluDeleteNurbsRenderer (GLUnurbs* nurb);
22417+GLAPI void GLAPIENTRY gluDeleteQuadric (GLUquadric* quad);
22418+GLAPI void GLAPIENTRY gluDeleteTess (GLUtesselator* tess);
22419+GLAPI void GLAPIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
22420+GLAPI void GLAPIENTRY gluEndCurve (GLUnurbs* nurb);
22421+GLAPI void GLAPIENTRY gluEndPolygon (GLUtesselator* tess);
22422+GLAPI void GLAPIENTRY gluEndSurface (GLUnurbs* nurb);
22423+GLAPI void GLAPIENTRY gluEndTrim (GLUnurbs* nurb);
22424+GLAPI const GLubyte * GLAPIENTRY gluErrorString (GLenum error);
22425+GLAPI void GLAPIENTRY gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
22426+GLAPI const GLubyte * GLAPIENTRY gluGetString (GLenum name);
22427+GLAPI void GLAPIENTRY gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
22428+GLAPI void GLAPIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
22429+GLAPI void GLAPIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
22430+GLAPI GLUnurbs* GLAPIENTRY gluNewNurbsRenderer (void);
22431+GLAPI GLUquadric* GLAPIENTRY gluNewQuadric (void);
22432+GLAPI GLUtesselator* GLAPIENTRY gluNewTess (void);
22433+GLAPI void GLAPIENTRY gluNextContour (GLUtesselator* tess, GLenum type);
22434+GLAPI void GLAPIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
22435+GLAPI void GLAPIENTRY gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData);
22436+GLAPI void GLAPIENTRY gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData);
22437+GLAPI void GLAPIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
22438+GLAPI void GLAPIENTRY gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
22439+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);
22440+GLAPI void GLAPIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
22441+GLAPI void GLAPIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
22442+GLAPI void GLAPIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
22443+GLAPI void GLAPIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
22444+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);
22445+GLAPI void GLAPIENTRY gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
22446+GLAPI void GLAPIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
22447+GLAPI void GLAPIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
22448+GLAPI void GLAPIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal);
22449+GLAPI void GLAPIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
22450+GLAPI void GLAPIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture);
22451+GLAPI GLint GLAPIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
22452+GLAPI void GLAPIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
22453+GLAPI void GLAPIENTRY gluTessBeginContour (GLUtesselator* tess);
22454+GLAPI void GLAPIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
22455+GLAPI void GLAPIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
22456+GLAPI void GLAPIENTRY gluTessEndContour (GLUtesselator* tess);
22457+GLAPI void GLAPIENTRY gluTessEndPolygon (GLUtesselator* tess);
22458+GLAPI void GLAPIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
22459+GLAPI void GLAPIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
22460+GLAPI void GLAPIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
22461+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);
22462+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);
22463+
22464+#ifdef __cplusplus
22465+}
22466+#endif
22467+
22468+#endif /* __glu_h__ */
22469Index: qemu-0.13.0/target-i386/mesa_glx.h
22470===================================================================
22471--- /dev/null 1970-01-01 00:00:00.000000000 +0000
22472+++ qemu-0.13.0/target-i386/mesa_glx.h 2011-01-17 16:42:36.000000000 +0800
22473@@ -0,0 +1,510 @@
22474+/*
22475+ * Mesa 3-D graphics library
22476+ * Version: 6.5
22477+ *
22478+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
22479+ *
22480+ * Permission is hereby granted, free of charge, to any person obtaining a
22481+ * copy of this software and associated documentation files (the "Software"),
22482+ * to deal in the Software without restriction, including without limitation
22483+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
22484+ * and/or sell copies of the Software, and to permit persons to whom the
22485+ * Software is furnished to do so, subject to the following conditions:
22486+ *
22487+ * The above copyright notice and this permission notice shall be included
22488+ * in all copies or substantial portions of the Software.
22489+ *
22490+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22491+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22492+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22493+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
22494+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22495+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22496+ */
22497+
22498+
22499+#ifndef GLX_H
22500+#define GLX_H
22501+
22502+
22503+#ifdef __VMS
22504+#include <GL/vms_x_fix.h>
22505+# ifdef __cplusplus
22506+/* VMS Xlib.h gives problems with C++.
22507+ * this avoids a bunch of trivial warnings */
22508+#pragma message disable nosimpint
22509+#endif
22510+#endif
22511+#include <X11/Xlib.h>
22512+#include <X11/Xutil.h>
22513+#ifdef __VMS
22514+# ifdef __cplusplus
22515+#pragma message enable nosimpint
22516+#endif
22517+#endif
22518+#include <mesa_gl.h>
22519+
22520+
22521+#if defined(USE_MGL_NAMESPACE)
22522+#include "glx_mangle.h"
22523+#endif
22524+
22525+
22526+#ifdef __cplusplus
22527+extern "C" {
22528+#endif
22529+
22530+
22531+#define GLX_VERSION_1_1 1
22532+#define GLX_VERSION_1_2 1
22533+#define GLX_VERSION_1_3 1
22534+#define GLX_VERSION_1_4 1
22535+
22536+#define GLX_EXTENSION_NAME "GLX"
22537+
22538+
22539+
22540+/*
22541+ * Tokens for glXChooseVisual and glXGetConfig:
22542+ */
22543+#define GLX_USE_GL 1
22544+#define GLX_BUFFER_SIZE 2
22545+#define GLX_LEVEL 3
22546+#define GLX_RGBA 4
22547+#define GLX_DOUBLEBUFFER 5
22548+#define GLX_STEREO 6
22549+#define GLX_AUX_BUFFERS 7
22550+#define GLX_RED_SIZE 8
22551+#define GLX_GREEN_SIZE 9
22552+#define GLX_BLUE_SIZE 10
22553+#define GLX_ALPHA_SIZE 11
22554+#define GLX_DEPTH_SIZE 12
22555+#define GLX_STENCIL_SIZE 13
22556+#define GLX_ACCUM_RED_SIZE 14
22557+#define GLX_ACCUM_GREEN_SIZE 15
22558+#define GLX_ACCUM_BLUE_SIZE 16
22559+#define GLX_ACCUM_ALPHA_SIZE 17
22560+
22561+
22562+/*
22563+ * Error codes returned by glXGetConfig:
22564+ */
22565+#define GLX_BAD_SCREEN 1
22566+#define GLX_BAD_ATTRIBUTE 2
22567+#define GLX_NO_EXTENSION 3
22568+#define GLX_BAD_VISUAL 4
22569+#define GLX_BAD_CONTEXT 5
22570+#define GLX_BAD_VALUE 6
22571+#define GLX_BAD_ENUM 7
22572+
22573+
22574+/*
22575+ * GLX 1.1 and later:
22576+ */
22577+#define GLX_VENDOR 1
22578+#define GLX_VERSION 2
22579+#define GLX_EXTENSIONS 3
22580+
22581+
22582+/*
22583+ * GLX 1.3 and later:
22584+ */
22585+#define GLX_CONFIG_CAVEAT 0x20
22586+#define GLX_DONT_CARE 0xFFFFFFFF
22587+#define GLX_X_VISUAL_TYPE 0x22
22588+#define GLX_TRANSPARENT_TYPE 0x23
22589+#define GLX_TRANSPARENT_INDEX_VALUE 0x24
22590+#define GLX_TRANSPARENT_RED_VALUE 0x25
22591+#define GLX_TRANSPARENT_GREEN_VALUE 0x26
22592+#define GLX_TRANSPARENT_BLUE_VALUE 0x27
22593+#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
22594+#define GLX_WINDOW_BIT 0x00000001
22595+#define GLX_PIXMAP_BIT 0x00000002
22596+#define GLX_PBUFFER_BIT 0x00000004
22597+#define GLX_AUX_BUFFERS_BIT 0x00000010
22598+#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
22599+#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
22600+#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
22601+#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
22602+#define GLX_DEPTH_BUFFER_BIT 0x00000020
22603+#define GLX_STENCIL_BUFFER_BIT 0x00000040
22604+#define GLX_ACCUM_BUFFER_BIT 0x00000080
22605+#define GLX_NONE 0x8000
22606+#define GLX_SLOW_CONFIG 0x8001
22607+#define GLX_TRUE_COLOR 0x8002
22608+#define GLX_DIRECT_COLOR 0x8003
22609+#define GLX_PSEUDO_COLOR 0x8004
22610+#define GLX_STATIC_COLOR 0x8005
22611+#define GLX_GRAY_SCALE 0x8006
22612+#define GLX_STATIC_GRAY 0x8007
22613+#define GLX_TRANSPARENT_RGB 0x8008
22614+#define GLX_TRANSPARENT_INDEX 0x8009
22615+#define GLX_VISUAL_ID 0x800B
22616+#define GLX_SCREEN 0x800C
22617+#define GLX_NON_CONFORMANT_CONFIG 0x800D
22618+#define GLX_DRAWABLE_TYPE 0x8010
22619+#define GLX_RENDER_TYPE 0x8011
22620+#define GLX_X_RENDERABLE 0x8012
22621+#define GLX_FBCONFIG_ID 0x8013
22622+#define GLX_RGBA_TYPE 0x8014
22623+#define GLX_COLOR_INDEX_TYPE 0x8015
22624+#define GLX_MAX_PBUFFER_WIDTH 0x8016
22625+#define GLX_MAX_PBUFFER_HEIGHT 0x8017
22626+#define GLX_MAX_PBUFFER_PIXELS 0x8018
22627+#define GLX_PRESERVED_CONTENTS 0x801B
22628+#define GLX_LARGEST_PBUFFER 0x801C
22629+#define GLX_WIDTH 0x801D
22630+#define GLX_HEIGHT 0x801E
22631+#define GLX_EVENT_MASK 0x801F
22632+#define GLX_DAMAGED 0x8020
22633+#define GLX_SAVED 0x8021
22634+#define GLX_WINDOW 0x8022
22635+#define GLX_PBUFFER 0x8023
22636+#define GLX_PBUFFER_HEIGHT 0x8040
22637+#define GLX_PBUFFER_WIDTH 0x8041
22638+#define GLX_RGBA_BIT 0x00000001
22639+#define GLX_COLOR_INDEX_BIT 0x00000002
22640+#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
22641+
22642+
22643+/*
22644+ * GLX 1.4 and later:
22645+ */
22646+#define GLX_SAMPLE_BUFFERS 0x186a0 /*100000*/
22647+#define GLX_SAMPLES 0x186a1 /*100001*/
22648+
22649+
22650+
22651+typedef struct __GLXcontextRec *GLXContext;
22652+typedef XID GLXPixmap;
22653+typedef XID GLXDrawable;
22654+/* GLX 1.3 and later */
22655+typedef struct __GLXFBConfigRec *GLXFBConfig;
22656+typedef XID GLXFBConfigID;
22657+typedef XID GLXContextID;
22658+typedef XID GLXWindow;
22659+typedef XID GLXPbuffer;
22660+
22661+
22662+
22663+extern XVisualInfo* glXChooseVisual( Display *dpy, int screen,
22664+ int *attribList );
22665+
22666+extern GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis,
22667+ GLXContext shareList, Bool direct );
22668+
22669+extern void glXDestroyContext( Display *dpy, GLXContext ctx );
22670+
22671+extern Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable,
22672+ GLXContext ctx);
22673+
22674+extern void glXCopyContext( Display *dpy, GLXContext src, GLXContext dst,
22675+ unsigned long mask );
22676+
22677+extern void glXSwapBuffers( Display *dpy, GLXDrawable drawable );
22678+
22679+extern GLXPixmap glXCreateGLXPixmap( Display *dpy, XVisualInfo *visual,
22680+ Pixmap pixmap );
22681+
22682+extern void glXDestroyGLXPixmap( Display *dpy, GLXPixmap pixmap );
22683+
22684+extern Bool glXQueryExtension( Display *dpy, int *errorb, int *event );
22685+
22686+extern Bool glXQueryVersion( Display *dpy, int *maj, int *min );
22687+
22688+extern Bool glXIsDirect( Display *dpy, GLXContext ctx );
22689+
22690+extern int glXGetConfig( Display *dpy, XVisualInfo *visual,
22691+ int attrib, int *value );
22692+
22693+extern GLXContext glXGetCurrentContext( void );
22694+
22695+extern GLXDrawable glXGetCurrentDrawable( void );
22696+
22697+extern void glXWaitGL( void );
22698+
22699+extern void glXWaitX( void );
22700+
22701+extern void glXUseXFont( Font font, int first, int count, int list );
22702+
22703+
22704+
22705+/* GLX 1.1 and later */
22706+extern const char *glXQueryExtensionsString( Display *dpy, int screen );
22707+
22708+extern const char *glXQueryServerString( Display *dpy, int screen, int name );
22709+
22710+extern const char *glXGetClientString( Display *dpy, int name );
22711+
22712+
22713+/* GLX 1.2 and later */
22714+extern Display *glXGetCurrentDisplay( void );
22715+
22716+
22717+/* GLX 1.3 and later */
22718+extern GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
22719+ const int *attribList, int *nitems );
22720+
22721+extern int glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config,
22722+ int attribute, int *value );
22723+
22724+extern GLXFBConfig *glXGetFBConfigs( Display *dpy, int screen,
22725+ int *nelements );
22726+
22727+extern XVisualInfo *glXGetVisualFromFBConfig( Display *dpy,
22728+ GLXFBConfig config );
22729+
22730+extern GLXWindow glXCreateWindow( Display *dpy, GLXFBConfig config,
22731+ Window win, const int *attribList );
22732+
22733+extern void glXDestroyWindow( Display *dpy, GLXWindow window );
22734+
22735+extern GLXPixmap glXCreatePixmap( Display *dpy, GLXFBConfig config,
22736+ Pixmap pixmap, const int *attribList );
22737+
22738+extern void glXDestroyPixmap( Display *dpy, GLXPixmap pixmap );
22739+
22740+extern GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config,
22741+ const int *attribList );
22742+
22743+extern void glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf );
22744+
22745+extern void glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute,
22746+ unsigned int *value );
22747+
22748+extern GLXContext glXCreateNewContext( Display *dpy, GLXFBConfig config,
22749+ int renderType, GLXContext shareList,
22750+ Bool direct );
22751+
22752+extern Bool glXMakeContextCurrent( Display *dpy, GLXDrawable draw,
22753+ GLXDrawable read, GLXContext ctx );
22754+
22755+extern GLXDrawable glXGetCurrentReadDrawable( void );
22756+
22757+extern int glXQueryContext( Display *dpy, GLXContext ctx, int attribute,
22758+ int *value );
22759+
22760+extern void glXSelectEvent( Display *dpy, GLXDrawable drawable,
22761+ unsigned long mask );
22762+
22763+extern void glXGetSelectedEvent( Display *dpy, GLXDrawable drawable,
22764+ unsigned long *mask );
22765+
22766+
22767+/* GLX 1.4 and later */
22768+extern void (*glXGetProcAddress(const GLubyte *procname))( void );
22769+
22770+
22771+#ifndef GLX_GLXEXT_LEGACY
22772+
22773+#include <mesa_glxext.h>
22774+
22775+#else
22776+
22777+
22778+
22779+/*
22780+ * ARB 2. GLX_ARB_get_proc_address
22781+ */
22782+#ifndef GLX_ARB_get_proc_address
22783+#define GLX_ARB_get_proc_address 1
22784+
22785+typedef void (*__GLXextFuncPtr)(void);
22786+extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
22787+
22788+#endif /* GLX_ARB_get_proc_address */
22789+
22790+
22791+
22792+#endif /* GLX_GLXEXT_LEGACY */
22793+
22794+
22795+/**
22796+ ** The following aren't in glxext.h yet.
22797+ **/
22798+
22799+
22800+/*
22801+ * ???. GLX_NV_vertex_array_range
22802+ */
22803+#ifndef GLX_NV_vertex_array_range
22804+#define GLX_NV_vertex_array_range
22805+
22806+extern void *glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
22807+extern void glXFreeMemoryNV(GLvoid *pointer);
22808+typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
22809+typedef void ( * PFNGLXFREEMEMORYNVPROC) (GLvoid *pointer);
22810+
22811+#endif /* GLX_NV_vertex_array_range */
22812+
22813+
22814+/*
22815+ * ???. GLX_MESA_allocate_memory
22816+ */
22817+#ifndef GLX_MESA_allocate_memory
22818+#define GLX_MESA_allocate_memory 1
22819+
22820+extern void *glXAllocateMemoryMESA(Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
22821+extern void glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer);
22822+extern GLuint glXGetMemoryOffsetMESA(Display *dpy, int scrn, const void *pointer);
22823+typedef void * ( * PFNGLXALLOCATEMEMORYMESAPROC) (Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
22824+typedef void ( * PFNGLXFREEMEMORYMESAPROC) (Display *dpy, int scrn, void *pointer);
22825+typedef GLuint (* PFNGLXGETMEMORYOFFSETMESAPROC) (Display *dpy, int scrn, const void *pointer);
22826+
22827+#endif /* GLX_MESA_allocate_memory */
22828+
22829+
22830+/*
22831+ * ARB ?. GLX_ARB_render_texture
22832+ * XXX This was never finalized!
22833+ */
22834+#ifndef GLX_ARB_render_texture
22835+#define GLX_ARB_render_texture 1
22836+
22837+extern Bool glXBindTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
22838+extern Bool glXReleaseTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
22839+extern Bool glXDrawableAttribARB(Display *dpy, GLXDrawable draw, const int *attribList);
22840+
22841+#endif /* GLX_ARB_render_texture */
22842+
22843+
22844+#ifndef GLX_ATI_render_texture
22845+#define GLX_ATI_render_texture 1
22846+
22847+extern void glXBindTexImageATI(Display *dpy, GLXPbuffer pbuffer, int buffer);
22848+extern void glXReleaseTexImageATI(Display *dpy, GLXPbuffer pbuffer, int buffer);
22849+extern void glXDrawableAttribATI(Display *dpy, GLXDrawable draw, const int *attribList);
22850+
22851+#endif /* GLX_ATI_render_texture */
22852+
22853+
22854+/*
22855+ * Remove this when glxext.h is updated.
22856+ */
22857+#ifndef GLX_NV_float_buffer
22858+#define GLX_NV_float_buffer 1
22859+
22860+#define GLX_FLOAT_COMPONENTS_NV 0x20B0
22861+
22862+#endif /* GLX_NV_float_buffer */
22863+
22864+
22865+
22866+/*
22867+ * #?. GLX_MESA_swap_frame_usage
22868+ */
22869+#ifndef GLX_MESA_swap_frame_usage
22870+#define GLX_MESA_swap_frame_usage 1
22871+
22872+extern int glXGetFrameUsageMESA(Display *dpy, GLXDrawable drawable, float *usage);
22873+extern int glXBeginFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
22874+extern int glXEndFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
22875+extern int glXQueryFrameTrackingMESA(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
22876+
22877+typedef int (*PFNGLXGETFRAMEUSAGEMESAPROC) (Display *dpy, GLXDrawable drawable, float *usage);
22878+typedef int (*PFNGLXBEGINFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
22879+typedef int (*PFNGLXENDFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
22880+typedef int (*PFNGLXQUERYFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
22881+
22882+#endif /* GLX_MESA_swap_frame_usage */
22883+
22884+
22885+
22886+/*
22887+ * #?. GLX_MESA_swap_control
22888+ */
22889+#ifndef GLX_MESA_swap_control
22890+#define GLX_MESA_swap_control 1
22891+
22892+extern int glXSwapIntervalMESA(unsigned int interval);
22893+extern int glXGetSwapIntervalMESA(void);
22894+
22895+typedef int (*PFNGLXSWAPINTERVALMESAPROC)(unsigned int interval);
22896+typedef int (*PFNGLXGETSWAPINTERVALMESAPROC)(void);
22897+
22898+#endif /* GLX_MESA_swap_control */
22899+
22900+
22901+
22902+/*
22903+ * #?. GLX_EXT_texture_from_pixmap
22904+ * XXX not finished?
22905+ */
22906+#ifndef GLX_EXT_texture_from_pixmap
22907+#define GLX_EXT_texture_from_pixmap 1
22908+
22909+#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
22910+#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
22911+#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
22912+#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
22913+#define GLX_Y_INVERTED_EXT 0x20D4
22914+
22915+#define GLX_TEXTURE_FORMAT_EXT 0x20D5
22916+#define GLX_TEXTURE_TARGET_EXT 0x20D6
22917+#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
22918+
22919+#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
22920+#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
22921+#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
22922+
22923+#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
22924+#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
22925+#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
22926+
22927+#define GLX_TEXTURE_1D_EXT 0x20DB
22928+#define GLX_TEXTURE_2D_EXT 0x20DC
22929+#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
22930+
22931+#define GLX_FRONT_LEFT_EXT 0x20DE
22932+#define GLX_FRONT_RIGHT_EXT 0x20DF
22933+#define GLX_BACK_LEFT_EXT 0x20E0
22934+#define GLX_BACK_RIGHT_EXT 0x20E1
22935+#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
22936+#define GLX_BACK_EXT GLX_BACK_LEFT_EXT
22937+#define GLX_AUX0_EXT 0x20E2
22938+#define GLX_AUX1_EXT 0x20E3
22939+#define GLX_AUX2_EXT 0x20E4
22940+#define GLX_AUX3_EXT 0x20E5
22941+#define GLX_AUX4_EXT 0x20E6
22942+#define GLX_AUX5_EXT 0x20E7
22943+#define GLX_AUX6_EXT 0x20E8
22944+#define GLX_AUX7_EXT 0x20E9
22945+#define GLX_AUX8_EXT 0x20EA
22946+#define GLX_AUX9_EXT 0x20EB
22947+
22948+extern void glXBindTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
22949+extern void glXReleaseTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer);
22950+
22951+#endif /* GLX_EXT_texture_from_pixmap */
22952+
22953+
22954+
22955+
22956+/*** Should these go here, or in another header? */
22957+/*
22958+** GLX Events
22959+*/
22960+typedef struct {
22961+ int event_type; /* GLX_DAMAGED or GLX_SAVED */
22962+ int draw_type; /* GLX_WINDOW or GLX_PBUFFER */
22963+ unsigned long serial; /* # of last request processed by server */
22964+ Bool send_event; /* true if this came for SendEvent request */
22965+ Display *display; /* display the event was read from */
22966+ GLXDrawable drawable; /* XID of Drawable */
22967+ unsigned int buffer_mask; /* mask indicating which buffers are affected */
22968+ unsigned int aux_buffer; /* which aux buffer was affected */
22969+ int x, y;
22970+ int width, height;
22971+ int count; /* if nonzero, at least this many more */
22972+} GLXPbufferClobberEvent;
22973+
22974+typedef union __GLXEvent {
22975+ GLXPbufferClobberEvent glxpbufferclobber;
22976+ long pad[24];
22977+} GLXEvent;
22978+
22979+#ifdef __cplusplus
22980+}
22981+#endif
22982+
22983+#endif
22984Index: qemu-0.13.0/target-i386/mesa_glxext.h
22985===================================================================
22986--- /dev/null 1970-01-01 00:00:00.000000000 +0000
22987+++ qemu-0.13.0/target-i386/mesa_glxext.h 2011-01-17 16:42:36.000000000 +0800
22988@@ -0,0 +1,785 @@
22989+#ifndef __glxext_h_
22990+#define __glxext_h_
22991+
22992+#ifdef __cplusplus
22993+extern "C" {
22994+#endif
22995+
22996+/*
22997+** Copyright (c) 2007 The Khronos Group Inc.
22998+**
22999+** Permission is hereby granted, free of charge, to any person obtaining a
23000+** copy of this software and/or associated documentation files (the
23001+** "Materials"), to deal in the Materials without restriction, including
23002+** without limitation the rights to use, copy, modify, merge, publish,
23003+** distribute, sublicense, and/or sell copies of the Materials, and to
23004+** permit persons to whom the Materials are furnished to do so, subject to
23005+** the following conditions:
23006+**
23007+** The above copyright notice and this permission notice shall be included
23008+** in all copies or substantial portions of the Materials.
23009+**
23010+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23011+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23012+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23013+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
23014+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23015+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23016+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
23017+*/
23018+
23019+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
23020+#define WIN32_LEAN_AND_MEAN 1
23021+#include <windows.h>
23022+#endif
23023+
23024+#ifndef APIENTRY
23025+#define APIENTRY
23026+#endif
23027+#ifndef APIENTRYP
23028+#define APIENTRYP APIENTRY *
23029+#endif
23030+#ifndef GLAPI
23031+#define GLAPI extern
23032+#endif
23033+
23034+/*************************************************************/
23035+
23036+/* Header file version number, required by OpenGL ABI for Linux */
23037+/* glxext.h last updated 2007/04/21 */
23038+/* Current version at http://www.opengl.org/registry/ */
23039+#define GLX_GLXEXT_VERSION 19
23040+
23041+#ifndef GLX_VERSION_1_3
23042+#define GLX_WINDOW_BIT 0x00000001
23043+#define GLX_PIXMAP_BIT 0x00000002
23044+#define GLX_PBUFFER_BIT 0x00000004
23045+#define GLX_RGBA_BIT 0x00000001
23046+#define GLX_COLOR_INDEX_BIT 0x00000002
23047+#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
23048+#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
23049+#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
23050+#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
23051+#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
23052+#define GLX_AUX_BUFFERS_BIT 0x00000010
23053+#define GLX_DEPTH_BUFFER_BIT 0x00000020
23054+#define GLX_STENCIL_BUFFER_BIT 0x00000040
23055+#define GLX_ACCUM_BUFFER_BIT 0x00000080
23056+#define GLX_CONFIG_CAVEAT 0x20
23057+#define GLX_X_VISUAL_TYPE 0x22
23058+#define GLX_TRANSPARENT_TYPE 0x23
23059+#define GLX_TRANSPARENT_INDEX_VALUE 0x24
23060+#define GLX_TRANSPARENT_RED_VALUE 0x25
23061+#define GLX_TRANSPARENT_GREEN_VALUE 0x26
23062+#define GLX_TRANSPARENT_BLUE_VALUE 0x27
23063+#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
23064+#define GLX_DONT_CARE 0xFFFFFFFF
23065+#define GLX_NONE 0x8000
23066+#define GLX_SLOW_CONFIG 0x8001
23067+#define GLX_TRUE_COLOR 0x8002
23068+#define GLX_DIRECT_COLOR 0x8003
23069+#define GLX_PSEUDO_COLOR 0x8004
23070+#define GLX_STATIC_COLOR 0x8005
23071+#define GLX_GRAY_SCALE 0x8006
23072+#define GLX_STATIC_GRAY 0x8007
23073+#define GLX_TRANSPARENT_RGB 0x8008
23074+#define GLX_TRANSPARENT_INDEX 0x8009
23075+#define GLX_VISUAL_ID 0x800B
23076+#define GLX_SCREEN 0x800C
23077+#define GLX_NON_CONFORMANT_CONFIG 0x800D
23078+#define GLX_DRAWABLE_TYPE 0x8010
23079+#define GLX_RENDER_TYPE 0x8011
23080+#define GLX_X_RENDERABLE 0x8012
23081+#define GLX_FBCONFIG_ID 0x8013
23082+#define GLX_RGBA_TYPE 0x8014
23083+#define GLX_COLOR_INDEX_TYPE 0x8015
23084+#define GLX_MAX_PBUFFER_WIDTH 0x8016
23085+#define GLX_MAX_PBUFFER_HEIGHT 0x8017
23086+#define GLX_MAX_PBUFFER_PIXELS 0x8018
23087+#define GLX_PRESERVED_CONTENTS 0x801B
23088+#define GLX_LARGEST_PBUFFER 0x801C
23089+#define GLX_WIDTH 0x801D
23090+#define GLX_HEIGHT 0x801E
23091+#define GLX_EVENT_MASK 0x801F
23092+#define GLX_DAMAGED 0x8020
23093+#define GLX_SAVED 0x8021
23094+#define GLX_WINDOW 0x8022
23095+#define GLX_PBUFFER 0x8023
23096+#define GLX_PBUFFER_HEIGHT 0x8040
23097+#define GLX_PBUFFER_WIDTH 0x8041
23098+#endif
23099+
23100+#ifndef GLX_VERSION_1_4
23101+#define GLX_SAMPLE_BUFFERS 100000
23102+#define GLX_SAMPLES 100001
23103+#endif
23104+
23105+#ifndef GLX_ARB_get_proc_address
23106+#endif
23107+
23108+#ifndef GLX_ARB_multisample
23109+#define GLX_SAMPLE_BUFFERS_ARB 100000
23110+#define GLX_SAMPLES_ARB 100001
23111+#endif
23112+
23113+#ifndef GLX_ARB_fbconfig_float
23114+#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9
23115+#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
23116+#endif
23117+
23118+#ifndef GLX_SGIS_multisample
23119+#define GLX_SAMPLE_BUFFERS_SGIS 100000
23120+#define GLX_SAMPLES_SGIS 100001
23121+#endif
23122+
23123+#ifndef GLX_EXT_visual_info
23124+#define GLX_X_VISUAL_TYPE_EXT 0x22
23125+#define GLX_TRANSPARENT_TYPE_EXT 0x23
23126+#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
23127+#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
23128+#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
23129+#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
23130+#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
23131+#define GLX_NONE_EXT 0x8000
23132+#define GLX_TRUE_COLOR_EXT 0x8002
23133+#define GLX_DIRECT_COLOR_EXT 0x8003
23134+#define GLX_PSEUDO_COLOR_EXT 0x8004
23135+#define GLX_STATIC_COLOR_EXT 0x8005
23136+#define GLX_GRAY_SCALE_EXT 0x8006
23137+#define GLX_STATIC_GRAY_EXT 0x8007
23138+#define GLX_TRANSPARENT_RGB_EXT 0x8008
23139+#define GLX_TRANSPARENT_INDEX_EXT 0x8009
23140+#endif
23141+
23142+#ifndef GLX_SGI_swap_control
23143+#endif
23144+
23145+#ifndef GLX_SGI_video_sync
23146+#endif
23147+
23148+#ifndef GLX_SGI_make_current_read
23149+#endif
23150+
23151+#ifndef GLX_SGIX_video_source
23152+#endif
23153+
23154+#ifndef GLX_EXT_visual_rating
23155+#define GLX_VISUAL_CAVEAT_EXT 0x20
23156+#define GLX_SLOW_VISUAL_EXT 0x8001
23157+#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
23158+/* reuse GLX_NONE_EXT */
23159+#endif
23160+
23161+#ifndef GLX_EXT_import_context
23162+#define GLX_SHARE_CONTEXT_EXT 0x800A
23163+#define GLX_VISUAL_ID_EXT 0x800B
23164+#define GLX_SCREEN_EXT 0x800C
23165+#endif
23166+
23167+#ifndef GLX_SGIX_fbconfig
23168+#define GLX_WINDOW_BIT_SGIX 0x00000001
23169+#define GLX_PIXMAP_BIT_SGIX 0x00000002
23170+#define GLX_RGBA_BIT_SGIX 0x00000001
23171+#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
23172+#define GLX_DRAWABLE_TYPE_SGIX 0x8010
23173+#define GLX_RENDER_TYPE_SGIX 0x8011
23174+#define GLX_X_RENDERABLE_SGIX 0x8012
23175+#define GLX_FBCONFIG_ID_SGIX 0x8013
23176+#define GLX_RGBA_TYPE_SGIX 0x8014
23177+#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
23178+/* reuse GLX_SCREEN_EXT */
23179+#endif
23180+
23181+#ifndef GLX_SGIX_pbuffer
23182+#define GLX_PBUFFER_BIT_SGIX 0x00000004
23183+#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
23184+#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
23185+#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
23186+#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
23187+#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
23188+#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
23189+#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
23190+#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
23191+#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
23192+#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
23193+#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
23194+#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
23195+#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
23196+#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
23197+#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
23198+#define GLX_PRESERVED_CONTENTS_SGIX 0x801B
23199+#define GLX_LARGEST_PBUFFER_SGIX 0x801C
23200+#define GLX_WIDTH_SGIX 0x801D
23201+#define GLX_HEIGHT_SGIX 0x801E
23202+#define GLX_EVENT_MASK_SGIX 0x801F
23203+#define GLX_DAMAGED_SGIX 0x8020
23204+#define GLX_SAVED_SGIX 0x8021
23205+#define GLX_WINDOW_SGIX 0x8022
23206+#define GLX_PBUFFER_SGIX 0x8023
23207+#endif
23208+
23209+#ifndef GLX_SGI_cushion
23210+#endif
23211+
23212+#ifndef GLX_SGIX_video_resize
23213+#define GLX_SYNC_FRAME_SGIX 0x00000000
23214+#define GLX_SYNC_SWAP_SGIX 0x00000001
23215+#endif
23216+
23217+#ifndef GLX_SGIX_dmbuffer
23218+#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024
23219+#endif
23220+
23221+#ifndef GLX_SGIX_swap_group
23222+#endif
23223+
23224+#ifndef GLX_SGIX_swap_barrier
23225+#endif
23226+
23227+#ifndef GLX_SGIS_blended_overlay
23228+#define GLX_BLENDED_RGBA_SGIS 0x8025
23229+#endif
23230+
23231+#ifndef GLX_SGIS_shared_multisample
23232+#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
23233+#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
23234+#endif
23235+
23236+#ifndef GLX_SUN_get_transparent_index
23237+#endif
23238+
23239+#ifndef GLX_3DFX_multisample
23240+#define GLX_SAMPLE_BUFFERS_3DFX 0x8050
23241+#define GLX_SAMPLES_3DFX 0x8051
23242+#endif
23243+
23244+#ifndef GLX_MESA_copy_sub_buffer
23245+#endif
23246+
23247+#ifndef GLX_MESA_pixmap_colormap
23248+#endif
23249+
23250+#ifndef GLX_MESA_release_buffers
23251+#endif
23252+
23253+#ifndef GLX_MESA_set_3dfx_mode
23254+#define GLX_3DFX_WINDOW_MODE_MESA 0x1
23255+#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
23256+#endif
23257+
23258+#ifndef GLX_SGIX_visual_select_group
23259+#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
23260+#endif
23261+
23262+#ifndef GLX_OML_swap_method
23263+#define GLX_SWAP_METHOD_OML 0x8060
23264+#define GLX_SWAP_EXCHANGE_OML 0x8061
23265+#define GLX_SWAP_COPY_OML 0x8062
23266+#define GLX_SWAP_UNDEFINED_OML 0x8063
23267+#endif
23268+
23269+#ifndef GLX_OML_sync_control
23270+#endif
23271+
23272+#ifndef GLX_NV_float_buffer
23273+#define GLX_FLOAT_COMPONENTS_NV 0x20B0
23274+#endif
23275+
23276+#ifndef GLX_SGIX_hyperpipe
23277+#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
23278+#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
23279+#define GLX_BAD_HYPERPIPE_SGIX 92
23280+#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001
23281+#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002
23282+#define GLX_PIPE_RECT_SGIX 0x00000001
23283+#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002
23284+#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003
23285+#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004
23286+#define GLX_HYPERPIPE_ID_SGIX 0x8030
23287+#endif
23288+
23289+#ifndef GLX_MESA_agp_offset
23290+#endif
23291+
23292+#ifndef GLX_EXT_fbconfig_packed_float
23293+#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
23294+#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008
23295+#endif
23296+
23297+#ifndef GLX_EXT_framebuffer_sRGB
23298+#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
23299+#endif
23300+
23301+#ifndef GLX_EXT_texture_from_pixmap
23302+#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
23303+#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
23304+#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
23305+#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
23306+#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
23307+#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
23308+#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
23309+#define GLX_Y_INVERTED_EXT 0x20D4
23310+#define GLX_TEXTURE_FORMAT_EXT 0x20D5
23311+#define GLX_TEXTURE_TARGET_EXT 0x20D6
23312+#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
23313+#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
23314+#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
23315+#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
23316+#define GLX_TEXTURE_1D_EXT 0x20DB
23317+#define GLX_TEXTURE_2D_EXT 0x20DC
23318+#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
23319+#define GLX_FRONT_LEFT_EXT 0x20DE
23320+#define GLX_FRONT_RIGHT_EXT 0x20DF
23321+#define GLX_BACK_LEFT_EXT 0x20E0
23322+#define GLX_BACK_RIGHT_EXT 0x20E1
23323+#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
23324+#define GLX_BACK_EXT GLX_BACK_LEFT_EXT
23325+#define GLX_AUX0_EXT 0x20E2
23326+#define GLX_AUX1_EXT 0x20E3
23327+#define GLX_AUX2_EXT 0x20E4
23328+#define GLX_AUX3_EXT 0x20E5
23329+#define GLX_AUX4_EXT 0x20E6
23330+#define GLX_AUX5_EXT 0x20E7
23331+#define GLX_AUX6_EXT 0x20E8
23332+#define GLX_AUX7_EXT 0x20E9
23333+#define GLX_AUX8_EXT 0x20EA
23334+#define GLX_AUX9_EXT 0x20EB
23335+#endif
23336+
23337+
23338+/*************************************************************/
23339+
23340+#ifndef GLX_ARB_get_proc_address
23341+typedef void (*__GLXextFuncPtr)(void);
23342+#endif
23343+
23344+#ifndef GLX_SGIX_video_source
23345+typedef XID GLXVideoSourceSGIX;
23346+#endif
23347+
23348+#ifndef GLX_SGIX_fbconfig
23349+typedef XID GLXFBConfigIDSGIX;
23350+typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
23351+#endif
23352+
23353+#ifndef GLX_SGIX_pbuffer
23354+typedef XID GLXPbufferSGIX;
23355+typedef struct {
23356+ int type;
23357+ unsigned long serial; /* # of last request processed by server */
23358+ Bool send_event; /* true if this came for SendEvent request */
23359+ Display *display; /* display the event was read from */
23360+ GLXDrawable drawable; /* i.d. of Drawable */
23361+ int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */
23362+ int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */
23363+ unsigned int mask; /* mask indicating which buffers are affected*/
23364+ int x, y;
23365+ int width, height;
23366+ int count; /* if nonzero, at least this many more */
23367+} GLXBufferClobberEventSGIX;
23368+#endif
23369+
23370+#ifndef GLEXT_64_TYPES_DEFINED
23371+/* This code block is duplicated in glxext.h, so must be protected */
23372+#define GLEXT_64_TYPES_DEFINED
23373+/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
23374+/* (as used in the GLX_OML_sync_control extension). */
23375+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
23376+#include <inttypes.h>
23377+#elif defined(__sun__) || defined(__digital__)
23378+#include <inttypes.h>
23379+#if defined(__STDC__)
23380+#if defined(__arch64__)
23381+typedef long int int64_t;
23382+typedef unsigned long int uint64_t;
23383+#else
23384+typedef long long int int64_t;
23385+typedef unsigned long long int uint64_t;
23386+#endif /* __arch64__ */
23387+#endif /* __STDC__ */
23388+#elif defined( __VMS )
23389+#include <inttypes.h>
23390+#elif defined(__SCO__) || defined(__USLC__)
23391+#include <stdint.h>
23392+#elif defined(__UNIXOS2__) || defined(__SOL64__)
23393+typedef long int int32_t;
23394+typedef long long int int64_t;
23395+typedef unsigned long long int uint64_t;
23396+#elif defined(_WIN32) && defined(__GNUC__)
23397+#include <stdint.h>
23398+#elif defined(_WIN32)
23399+typedef __int32 int32_t;
23400+typedef __int64 int64_t;
23401+typedef unsigned __int64 uint64_t;
23402+#else
23403+#include <inttypes.h> /* Fallback option */
23404+#endif
23405+#endif
23406+
23407+#ifndef GLX_VERSION_1_3
23408+#define GLX_VERSION_1_3 1
23409+#ifdef GLX_GLXEXT_PROTOTYPES
23410+extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *);
23411+extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *);
23412+extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *);
23413+extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig);
23414+extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *);
23415+extern void glXDestroyWindow (Display *, GLXWindow);
23416+extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *);
23417+extern void glXDestroyPixmap (Display *, GLXPixmap);
23418+extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *);
23419+extern void glXDestroyPbuffer (Display *, GLXPbuffer);
23420+extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *);
23421+extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool);
23422+extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext);
23423+extern GLXDrawable glXGetCurrentReadDrawable (void);
23424+extern Display * glXGetCurrentDisplay (void);
23425+extern int glXQueryContext (Display *, GLXContext, int, int *);
23426+extern void glXSelectEvent (Display *, GLXDrawable, unsigned long);
23427+extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *);
23428+#endif /* GLX_GLXEXT_PROTOTYPES */
23429+typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
23430+typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
23431+typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
23432+typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
23433+typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
23434+typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
23435+typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
23436+typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
23437+typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
23438+typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
23439+typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
23440+typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
23441+typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
23442+typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
23443+typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
23444+typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
23445+typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
23446+typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
23447+#endif
23448+
23449+#ifndef GLX_VERSION_1_4
23450+#define GLX_VERSION_1_4 1
23451+#ifdef GLX_GLXEXT_PROTOTYPES
23452+extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *);
23453+#endif /* GLX_GLXEXT_PROTOTYPES */
23454+typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
23455+#endif
23456+
23457+#ifndef GLX_ARB_get_proc_address
23458+#define GLX_ARB_get_proc_address 1
23459+#ifdef GLX_GLXEXT_PROTOTYPES
23460+extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
23461+#endif /* GLX_GLXEXT_PROTOTYPES */
23462+typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
23463+#endif
23464+
23465+#ifndef GLX_ARB_multisample
23466+#define GLX_ARB_multisample 1
23467+#endif
23468+
23469+#ifndef GLX_ARB_fbconfig_float
23470+#define GLX_ARB_fbconfig_float 1
23471+#endif
23472+
23473+#ifndef GLX_SGIS_multisample
23474+#define GLX_SGIS_multisample 1
23475+#endif
23476+
23477+#ifndef GLX_EXT_visual_info
23478+#define GLX_EXT_visual_info 1
23479+#endif
23480+
23481+#ifndef GLX_SGI_swap_control
23482+#define GLX_SGI_swap_control 1
23483+#ifdef GLX_GLXEXT_PROTOTYPES
23484+extern int glXSwapIntervalSGI (int);
23485+#endif /* GLX_GLXEXT_PROTOTYPES */
23486+typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
23487+#endif
23488+
23489+#ifndef GLX_SGI_video_sync
23490+#define GLX_SGI_video_sync 1
23491+#ifdef GLX_GLXEXT_PROTOTYPES
23492+extern int glXGetVideoSyncSGI (unsigned int *);
23493+extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
23494+#endif /* GLX_GLXEXT_PROTOTYPES */
23495+typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
23496+typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
23497+#endif
23498+
23499+#ifndef GLX_SGI_make_current_read
23500+#define GLX_SGI_make_current_read 1
23501+#ifdef GLX_GLXEXT_PROTOTYPES
23502+extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext);
23503+extern GLXDrawable glXGetCurrentReadDrawableSGI (void);
23504+#endif /* GLX_GLXEXT_PROTOTYPES */
23505+typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
23506+typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
23507+#endif
23508+
23509+#ifndef GLX_SGIX_video_source
23510+#define GLX_SGIX_video_source 1
23511+#ifdef _VL_H
23512+#ifdef GLX_GLXEXT_PROTOTYPES
23513+extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode);
23514+extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX);
23515+#endif /* GLX_GLXEXT_PROTOTYPES */
23516+typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
23517+typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
23518+#endif /* _VL_H */
23519+#endif
23520+
23521+#ifndef GLX_EXT_visual_rating
23522+#define GLX_EXT_visual_rating 1
23523+#endif
23524+
23525+#ifndef GLX_EXT_import_context
23526+#define GLX_EXT_import_context 1
23527+#ifdef GLX_GLXEXT_PROTOTYPES
23528+extern Display * glXGetCurrentDisplayEXT (void);
23529+extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *);
23530+extern GLXContextID glXGetContextIDEXT (const GLXContext);
23531+extern GLXContext glXImportContextEXT (Display *, GLXContextID);
23532+extern void glXFreeContextEXT (Display *, GLXContext);
23533+#endif /* GLX_GLXEXT_PROTOTYPES */
23534+typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
23535+typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
23536+typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
23537+typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
23538+typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
23539+#endif
23540+
23541+#ifndef GLX_SGIX_fbconfig
23542+#define GLX_SGIX_fbconfig 1
23543+#ifdef GLX_GLXEXT_PROTOTYPES
23544+extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *);
23545+extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *);
23546+extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap);
23547+extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool);
23548+extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX);
23549+extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *);
23550+#endif /* GLX_GLXEXT_PROTOTYPES */
23551+typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
23552+typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
23553+typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
23554+typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
23555+typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
23556+typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
23557+#endif
23558+
23559+#ifndef GLX_SGIX_pbuffer
23560+#define GLX_SGIX_pbuffer 1
23561+#ifdef GLX_GLXEXT_PROTOTYPES
23562+extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *);
23563+extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX);
23564+extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *);
23565+extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long);
23566+extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *);
23567+#endif /* GLX_GLXEXT_PROTOTYPES */
23568+typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
23569+typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
23570+typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
23571+typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
23572+typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
23573+#endif
23574+
23575+#ifndef GLX_SGI_cushion
23576+#define GLX_SGI_cushion 1
23577+#ifdef GLX_GLXEXT_PROTOTYPES
23578+extern void glXCushionSGI (Display *, Window, float);
23579+#endif /* GLX_GLXEXT_PROTOTYPES */
23580+typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
23581+#endif
23582+
23583+#ifndef GLX_SGIX_video_resize
23584+#define GLX_SGIX_video_resize 1
23585+#ifdef GLX_GLXEXT_PROTOTYPES
23586+extern int glXBindChannelToWindowSGIX (Display *, int, int, Window);
23587+extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int);
23588+extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *);
23589+extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *);
23590+extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum);
23591+#endif /* GLX_GLXEXT_PROTOTYPES */
23592+typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
23593+typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
23594+typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
23595+typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
23596+typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype);
23597+#endif
23598+
23599+#ifndef GLX_SGIX_dmbuffer
23600+#define GLX_SGIX_dmbuffer 1
23601+#ifdef _DM_BUFFER_H_
23602+#ifdef GLX_GLXEXT_PROTOTYPES
23603+extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer);
23604+#endif /* GLX_GLXEXT_PROTOTYPES */
23605+typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
23606+#endif /* _DM_BUFFER_H_ */
23607+#endif
23608+
23609+#ifndef GLX_SGIX_swap_group
23610+#define GLX_SGIX_swap_group 1
23611+#ifdef GLX_GLXEXT_PROTOTYPES
23612+extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable);
23613+#endif /* GLX_GLXEXT_PROTOTYPES */
23614+typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
23615+#endif
23616+
23617+#ifndef GLX_SGIX_swap_barrier
23618+#define GLX_SGIX_swap_barrier 1
23619+#ifdef GLX_GLXEXT_PROTOTYPES
23620+extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int);
23621+extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *);
23622+#endif /* GLX_GLXEXT_PROTOTYPES */
23623+typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
23624+typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
23625+#endif
23626+
23627+#ifndef GLX_SUN_get_transparent_index
23628+#define GLX_SUN_get_transparent_index 1
23629+#ifdef GLX_GLXEXT_PROTOTYPES
23630+extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *);
23631+#endif /* GLX_GLXEXT_PROTOTYPES */
23632+typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
23633+#endif
23634+
23635+#ifndef GLX_MESA_copy_sub_buffer
23636+#define GLX_MESA_copy_sub_buffer 1
23637+#ifdef GLX_GLXEXT_PROTOTYPES
23638+extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int);
23639+#endif /* GLX_GLXEXT_PROTOTYPES */
23640+typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
23641+#endif
23642+
23643+#ifndef GLX_MESA_pixmap_colormap
23644+#define GLX_MESA_pixmap_colormap 1
23645+#ifdef GLX_GLXEXT_PROTOTYPES
23646+extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap);
23647+#endif /* GLX_GLXEXT_PROTOTYPES */
23648+typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
23649+#endif
23650+
23651+#ifndef GLX_MESA_release_buffers
23652+#define GLX_MESA_release_buffers 1
23653+#ifdef GLX_GLXEXT_PROTOTYPES
23654+extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable);
23655+#endif /* GLX_GLXEXT_PROTOTYPES */
23656+typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
23657+#endif
23658+
23659+#ifndef GLX_MESA_set_3dfx_mode
23660+#define GLX_MESA_set_3dfx_mode 1
23661+#ifdef GLX_GLXEXT_PROTOTYPES
23662+extern Bool glXSet3DfxModeMESA (int);
23663+#endif /* GLX_GLXEXT_PROTOTYPES */
23664+typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
23665+#endif
23666+
23667+#ifndef GLX_SGIX_visual_select_group
23668+#define GLX_SGIX_visual_select_group 1
23669+#endif
23670+
23671+#ifndef GLX_OML_swap_method
23672+#define GLX_OML_swap_method 1
23673+#endif
23674+
23675+#ifndef GLX_OML_sync_control
23676+#define GLX_OML_sync_control 1
23677+#ifdef GLX_GLXEXT_PROTOTYPES
23678+extern Bool glXGetSyncValuesOML (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *);
23679+extern Bool glXGetMscRateOML (Display *, GLXDrawable, int32_t *, int32_t *);
23680+extern int64_t glXSwapBuffersMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t);
23681+extern Bool glXWaitForMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *);
23682+extern Bool glXWaitForSbcOML (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *);
23683+#endif /* GLX_GLXEXT_PROTOTYPES */
23684+typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
23685+typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
23686+typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
23687+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);
23688+typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
23689+#endif
23690+
23691+#ifndef GLX_NV_float_buffer
23692+#define GLX_NV_float_buffer 1
23693+#endif
23694+
23695+#ifndef GLX_SGIX_hyperpipe
23696+#define GLX_SGIX_hyperpipe 1
23697+
23698+typedef struct {
23699+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23700+ int networkId;
23701+} GLXHyperpipeNetworkSGIX;
23702+
23703+typedef struct {
23704+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23705+ int channel;
23706+ unsigned int
23707+ participationType;
23708+ int timeSlice;
23709+} GLXHyperpipeConfigSGIX;
23710+
23711+typedef struct {
23712+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23713+ int srcXOrigin, srcYOrigin, srcWidth, srcHeight;
23714+ int destXOrigin, destYOrigin, destWidth, destHeight;
23715+} GLXPipeRect;
23716+
23717+typedef struct {
23718+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23719+ int XOrigin, YOrigin, maxHeight, maxWidth;
23720+} GLXPipeRectLimits;
23721+
23722+#ifdef GLX_GLXEXT_PROTOTYPES
23723+extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *, int *);
23724+extern int glXHyperpipeConfigSGIX (Display *, int, int, GLXHyperpipeConfigSGIX *, int *);
23725+extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *, int, int *);
23726+extern int glXDestroyHyperpipeConfigSGIX (Display *, int);
23727+extern int glXBindHyperpipeSGIX (Display *, int);
23728+extern int glXQueryHyperpipeBestAttribSGIX (Display *, int, int, int, void *, void *);
23729+extern int glXHyperpipeAttribSGIX (Display *, int, int, int, void *);
23730+extern int glXQueryHyperpipeAttribSGIX (Display *, int, int, int, void *);
23731+#endif /* GLX_GLXEXT_PROTOTYPES */
23732+typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);
23733+typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
23734+typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes);
23735+typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId);
23736+typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId);
23737+typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
23738+typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
23739+typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
23740+#endif
23741+
23742+#ifndef GLX_MESA_agp_offset
23743+#define GLX_MESA_agp_offset 1
23744+#ifdef GLX_GLXEXT_PROTOTYPES
23745+extern unsigned int glXGetAGPOffsetMESA (const void *);
23746+#endif /* GLX_GLXEXT_PROTOTYPES */
23747+typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
23748+#endif
23749+
23750+#ifndef GLX_EXT_fbconfig_packed_float
23751+#define GLX_EXT_fbconfig_packed_float 1
23752+#endif
23753+
23754+#ifndef GLX_EXT_framebuffer_sRGB
23755+#define GLX_EXT_framebuffer_sRGB 1
23756+#endif
23757+
23758+#ifndef GLX_EXT_texture_from_pixmap
23759+#define GLX_EXT_texture_from_pixmap 1
23760+#ifdef GLX_GLXEXT_PROTOTYPES
23761+extern void glXBindTexImageEXT (Display *, GLXDrawable, int, const int *);
23762+extern void glXReleaseTexImageEXT (Display *, GLXDrawable, int);
23763+#endif /* GLX_GLXEXT_PROTOTYPES */
23764+typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
23765+typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer);
23766+#endif
23767+
23768+
23769+#ifdef __cplusplus
23770+}
23771+#endif
23772+
23773+#endif
23774Index: qemu-0.13.0/target-i386/mesa_mipmap.c
23775===================================================================
23776--- /dev/null 1970-01-01 00:00:00.000000000 +0000
23777+++ qemu-0.13.0/target-i386/mesa_mipmap.c 2011-01-17 16:42:36.000000000 +0800
23778@@ -0,0 +1,824 @@
23779+
23780+/*
23781+ * Mesa 3-D graphics library
23782+ * Version: 3.4
23783+ * Copyright (C) 1995-2000 Brian Paul
23784+ *
23785+ * This library is free software; you can redistribute it and/or
23786+ * modify it under the terms of the GNU Library General Public
23787+ * License as published by the Free Software Foundation; either
23788+ * version 2 of the License, or (at your option) any later version.
23789+ *
23790+ * This library is distributed in the hope that it will be useful,
23791+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
23792+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23793+ * Library General Public License for more details.
23794+ *
23795+ * You should have received a copy of the GNU Library General Public
23796+ * License along with this library; if not, write to the Free
23797+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23798+ */
23799+
23800+
23801+#ifdef PC_HEADER
23802+#include "all.h"
23803+#else
23804+#include <assert.h>
23805+#include <math.h>
23806+#include <stdio.h>
23807+#include <stdlib.h>
23808+//#include "gluP.h"
23809+#endif
23810+
23811+
23812+/*
23813+ * Compute ceiling of integer quotient of A divided by B:
23814+ */
23815+#define CEILING( A, B ) ( (A) % (B) == 0 ? (A)/(B) : (A)/(B)+1 )
23816+
23817+
23818+
23819+#ifdef EPSILON
23820+#undef EPSILON
23821+#endif
23822+#define EPSILON 0.001
23823+
23824+
23825+/* To work around optimizer bug in MSVC4.1 */
23826+#if defined(__WIN32__) && !defined(OPENSTEP)
23827+void
23828+dummy(GLuint j, GLuint k)
23829+{
23830+}
23831+#else
23832+#define dummy(J, K)
23833+#endif
23834+
23835+
23836+static GLint GLAPIENTRY
23837+mesa_gluScaleImage(GLenum format,
23838+ GLsizei widthin, GLsizei heightin,
23839+ GLenum typein, const void *datain,
23840+ GLsizei widthout, GLsizei heightout,
23841+ GLenum typeout, void *dataout)
23842+{
23843+ GLint components, i, j, k;
23844+ GLfloat *tempin, *tempout;
23845+ GLfloat sx, sy;
23846+ GLint unpackrowlength, unpackalignment, unpackskiprows, unpackskippixels;
23847+ GLint packrowlength, packalignment, packskiprows, packskippixels;
23848+ GLint sizein, sizeout;
23849+ GLint rowstride, rowlen;
23850+
23851+
23852+ /* Determine number of components per pixel */
23853+ switch (format) {
23854+ case GL_COLOR_INDEX:
23855+ case GL_STENCIL_INDEX:
23856+ case GL_DEPTH_COMPONENT:
23857+ case GL_RED:
23858+ case GL_GREEN:
23859+ case GL_BLUE:
23860+ case GL_ALPHA:
23861+ case GL_LUMINANCE:
23862+ components = 1;
23863+ break;
23864+ case GL_LUMINANCE_ALPHA:
23865+ components = 2;
23866+ break;
23867+ case GL_RGB:
23868+ case GL_BGR:
23869+ components = 3;
23870+ break;
23871+ case GL_RGBA:
23872+ case GL_BGRA:
23873+#ifdef GL_EXT_abgr
23874+ case GL_ABGR_EXT:
23875+#endif
23876+ components = 4;
23877+ break;
23878+ default:
23879+ return GLU_INVALID_ENUM;
23880+ }
23881+
23882+ /* Determine bytes per input datum */
23883+ switch (typein) {
23884+ case GL_UNSIGNED_BYTE:
23885+ sizein = sizeof(GLubyte);
23886+ break;
23887+ case GL_BYTE:
23888+ sizein = sizeof(GLbyte);
23889+ break;
23890+ case GL_UNSIGNED_SHORT:
23891+ sizein = sizeof(GLushort);
23892+ break;
23893+ case GL_SHORT:
23894+ sizein = sizeof(GLshort);
23895+ break;
23896+ case GL_UNSIGNED_INT:
23897+ sizein = sizeof(GLuint);
23898+ break;
23899+ case GL_INT:
23900+ sizein = sizeof(GLint);
23901+ break;
23902+ case GL_FLOAT:
23903+ sizein = sizeof(GLfloat);
23904+ break;
23905+ case GL_BITMAP:
23906+ /* not implemented yet */
23907+ default:
23908+ return GL_INVALID_ENUM;
23909+ }
23910+
23911+ /* Determine bytes per output datum */
23912+ switch (typeout) {
23913+ case GL_UNSIGNED_BYTE:
23914+ sizeout = sizeof(GLubyte);
23915+ break;
23916+ case GL_BYTE:
23917+ sizeout = sizeof(GLbyte);
23918+ break;
23919+ case GL_UNSIGNED_SHORT:
23920+ sizeout = sizeof(GLushort);
23921+ break;
23922+ case GL_SHORT:
23923+ sizeout = sizeof(GLshort);
23924+ break;
23925+ case GL_UNSIGNED_INT:
23926+ sizeout = sizeof(GLuint);
23927+ break;
23928+ case GL_INT:
23929+ sizeout = sizeof(GLint);
23930+ break;
23931+ case GL_FLOAT:
23932+ sizeout = sizeof(GLfloat);
23933+ break;
23934+ case GL_BITMAP:
23935+ /* not implemented yet */
23936+ default:
23937+ return GL_INVALID_ENUM;
23938+ }
23939+
23940+ /* Get glPixelStore state */
23941+ glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpackrowlength);
23942+ glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpackalignment);
23943+ glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unpackskiprows);
23944+ glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unpackskippixels);
23945+ glGetIntegerv(GL_PACK_ROW_LENGTH, &packrowlength);
23946+ glGetIntegerv(GL_PACK_ALIGNMENT, &packalignment);
23947+ glGetIntegerv(GL_PACK_SKIP_ROWS, &packskiprows);
23948+ glGetIntegerv(GL_PACK_SKIP_PIXELS, &packskippixels);
23949+
23950+ /* Allocate storage for intermediate images */
23951+ tempin = (GLfloat *) malloc(widthin * heightin
23952+ * components * sizeof(GLfloat));
23953+ if (!tempin) {
23954+ return GLU_OUT_OF_MEMORY;
23955+ }
23956+ tempout = (GLfloat *) malloc(widthout * heightout
23957+ * components * sizeof(GLfloat));
23958+ if (!tempout) {
23959+ free(tempin);
23960+ return GLU_OUT_OF_MEMORY;
23961+ }
23962+
23963+
23964+ /*
23965+ * Unpack the pixel data and convert to floating point
23966+ */
23967+
23968+ if (unpackrowlength > 0) {
23969+ rowlen = unpackrowlength;
23970+ }
23971+ else {
23972+ rowlen = widthin;
23973+ }
23974+ if (sizein >= unpackalignment) {
23975+ rowstride = components * rowlen;
23976+ }
23977+ else {
23978+ rowstride = unpackalignment / sizein
23979+ * CEILING(components * rowlen * sizein, unpackalignment);
23980+ }
23981+
23982+ switch (typein) {
23983+ case GL_UNSIGNED_BYTE:
23984+ k = 0;
23985+ for (i = 0; i < heightin; i++) {
23986+ GLubyte *ubptr = (GLubyte *) datain
23987+ + i * rowstride
23988+ + unpackskiprows * rowstride + unpackskippixels * components;
23989+ for (j = 0; j < widthin * components; j++) {
23990+ dummy(j, k);
23991+ tempin[k++] = (GLfloat) * ubptr++;
23992+ }
23993+ }
23994+ break;
23995+ case GL_BYTE:
23996+ k = 0;
23997+ for (i = 0; i < heightin; i++) {
23998+ GLbyte *bptr = (GLbyte *) datain
23999+ + i * rowstride
24000+ + unpackskiprows * rowstride + unpackskippixels * components;
24001+ for (j = 0; j < widthin * components; j++) {
24002+ dummy(j, k);
24003+ tempin[k++] = (GLfloat) * bptr++;
24004+ }
24005+ }
24006+ break;
24007+ case GL_UNSIGNED_SHORT:
24008+ k = 0;
24009+ for (i = 0; i < heightin; i++) {
24010+ GLushort *usptr = (GLushort *) datain
24011+ + i * rowstride
24012+ + unpackskiprows * rowstride + unpackskippixels * components;
24013+ for (j = 0; j < widthin * components; j++) {
24014+ dummy(j, k);
24015+ tempin[k++] = (GLfloat) * usptr++;
24016+ }
24017+ }
24018+ break;
24019+ case GL_SHORT:
24020+ k = 0;
24021+ for (i = 0; i < heightin; i++) {
24022+ GLshort *sptr = (GLshort *) datain
24023+ + i * rowstride
24024+ + unpackskiprows * rowstride + unpackskippixels * components;
24025+ for (j = 0; j < widthin * components; j++) {
24026+ dummy(j, k);
24027+ tempin[k++] = (GLfloat) * sptr++;
24028+ }
24029+ }
24030+ break;
24031+ case GL_UNSIGNED_INT:
24032+ k = 0;
24033+ for (i = 0; i < heightin; i++) {
24034+ GLuint *uiptr = (GLuint *) datain
24035+ + i * rowstride
24036+ + unpackskiprows * rowstride + unpackskippixels * components;
24037+ for (j = 0; j < widthin * components; j++) {
24038+ dummy(j, k);
24039+ tempin[k++] = (GLfloat) * uiptr++;
24040+ }
24041+ }
24042+ break;
24043+ case GL_INT:
24044+ k = 0;
24045+ for (i = 0; i < heightin; i++) {
24046+ GLint *iptr = (GLint *) datain
24047+ + i * rowstride
24048+ + unpackskiprows * rowstride + unpackskippixels * components;
24049+ for (j = 0; j < widthin * components; j++) {
24050+ dummy(j, k);
24051+ tempin[k++] = (GLfloat) * iptr++;
24052+ }
24053+ }
24054+ break;
24055+ case GL_FLOAT:
24056+ k = 0;
24057+ for (i = 0; i < heightin; i++) {
24058+ GLfloat *fptr = (GLfloat *) datain
24059+ + i * rowstride
24060+ + unpackskiprows * rowstride + unpackskippixels * components;
24061+ for (j = 0; j < widthin * components; j++) {
24062+ dummy(j, k);
24063+ tempin[k++] = *fptr++;
24064+ }
24065+ }
24066+ break;
24067+ default:
24068+ return GLU_INVALID_ENUM;
24069+ }
24070+
24071+
24072+ /*
24073+ * Scale the image!
24074+ */
24075+
24076+ if (widthout > 1)
24077+ sx = (GLfloat) (widthin - 1) / (GLfloat) (widthout - 1);
24078+ else
24079+ sx = (GLfloat) (widthin - 1);
24080+ if (heightout > 1)
24081+ sy = (GLfloat) (heightin - 1) / (GLfloat) (heightout - 1);
24082+ else
24083+ sy = (GLfloat) (heightin - 1);
24084+
24085+/*#define POINT_SAMPLE*/
24086+#ifdef POINT_SAMPLE
24087+ for (i = 0; i < heightout; i++) {
24088+ GLint ii = i * sy;
24089+ for (j = 0; j < widthout; j++) {
24090+ GLint jj = j * sx;
24091+
24092+ GLfloat *src = tempin + (ii * widthin + jj) * components;
24093+ GLfloat *dst = tempout + (i * widthout + j) * components;
24094+
24095+ for (k = 0; k < components; k++) {
24096+ *dst++ = *src++;
24097+ }
24098+ }
24099+ }
24100+#else
24101+ if (sx < 1.0 && sy < 1.0) {
24102+ /* magnify both width and height: use weighted sample of 4 pixels */
24103+ GLint i0, i1, j0, j1;
24104+ GLfloat alpha, beta;
24105+ GLfloat *src00, *src01, *src10, *src11;
24106+ GLfloat s1, s2;
24107+ GLfloat *dst;
24108+
24109+ for (i = 0; i < heightout; i++) {
24110+ i0 = i * sy;
24111+ i1 = i0 + 1;
24112+ if (i1 >= heightin)
24113+ i1 = heightin - 1;
24114+/* i1 = (i+1) * sy - EPSILON;*/
24115+ alpha = i * sy - i0;
24116+ for (j = 0; j < widthout; j++) {
24117+ j0 = j * sx;
24118+ j1 = j0 + 1;
24119+ if (j1 >= widthin)
24120+ j1 = widthin - 1;
24121+/* j1 = (j+1) * sx - EPSILON; */
24122+ beta = j * sx - j0;
24123+
24124+ /* compute weighted average of pixels in rect (i0,j0)-(i1,j1) */
24125+ src00 = tempin + (i0 * widthin + j0) * components;
24126+ src01 = tempin + (i0 * widthin + j1) * components;
24127+ src10 = tempin + (i1 * widthin + j0) * components;
24128+ src11 = tempin + (i1 * widthin + j1) * components;
24129+
24130+ dst = tempout + (i * widthout + j) * components;
24131+
24132+ for (k = 0; k < components; k++) {
24133+ s1 = *src00++ * (1.0 - beta) + *src01++ * beta;
24134+ s2 = *src10++ * (1.0 - beta) + *src11++ * beta;
24135+ *dst++ = s1 * (1.0 - alpha) + s2 * alpha;
24136+ }
24137+ }
24138+ }
24139+ }
24140+ else {
24141+ /* shrink width and/or height: use an unweighted box filter */
24142+ GLint i0, i1;
24143+ GLint j0, j1;
24144+ GLint ii, jj;
24145+ GLfloat sum, *dst;
24146+
24147+ for (i = 0; i < heightout; i++) {
24148+ i0 = i * sy;
24149+ i1 = i0 + 1;
24150+ if (i1 >= heightin)
24151+ i1 = heightin - 1;
24152+/* i1 = (i+1) * sy - EPSILON; */
24153+ for (j = 0; j < widthout; j++) {
24154+ j0 = j * sx;
24155+ j1 = j0 + 1;
24156+ if (j1 >= widthin)
24157+ j1 = widthin - 1;
24158+/* j1 = (j+1) * sx - EPSILON; */
24159+
24160+ dst = tempout + (i * widthout + j) * components;
24161+
24162+ /* compute average of pixels in the rectangle (i0,j0)-(i1,j1) */
24163+ for (k = 0; k < components; k++) {
24164+ sum = 0.0;
24165+ for (ii = i0; ii <= i1; ii++) {
24166+ for (jj = j0; jj <= j1; jj++) {
24167+ sum += *(tempin + (ii * widthin + jj) * components + k);
24168+ }
24169+ }
24170+ sum /= (j1 - j0 + 1) * (i1 - i0 + 1);
24171+ *dst++ = sum;
24172+ }
24173+ }
24174+ }
24175+ }
24176+#endif
24177+
24178+
24179+ /*
24180+ * Return output image
24181+ */
24182+
24183+ if (packrowlength > 0) {
24184+ rowlen = packrowlength;
24185+ }
24186+ else {
24187+ rowlen = widthout;
24188+ }
24189+ if (sizeout >= packalignment) {
24190+ rowstride = components * rowlen;
24191+ }
24192+ else {
24193+ rowstride = packalignment / sizeout
24194+ * CEILING(components * rowlen * sizeout, packalignment);
24195+ }
24196+
24197+ switch (typeout) {
24198+ case GL_UNSIGNED_BYTE:
24199+ k = 0;
24200+ for (i = 0; i < heightout; i++) {
24201+ GLubyte *ubptr = (GLubyte *) dataout
24202+ + i * rowstride
24203+ + packskiprows * rowstride + packskippixels * components;
24204+ for (j = 0; j < widthout * components; j++) {
24205+ dummy(j, k + i);
24206+ *ubptr++ = (GLubyte) tempout[k++];
24207+ }
24208+ }
24209+ break;
24210+ case GL_BYTE:
24211+ k = 0;
24212+ for (i = 0; i < heightout; i++) {
24213+ GLbyte *bptr = (GLbyte *) dataout
24214+ + i * rowstride
24215+ + packskiprows * rowstride + packskippixels * components;
24216+ for (j = 0; j < widthout * components; j++) {
24217+ dummy(j, k + i);
24218+ *bptr++ = (GLbyte) tempout[k++];
24219+ }
24220+ }
24221+ break;
24222+ case GL_UNSIGNED_SHORT:
24223+ k = 0;
24224+ for (i = 0; i < heightout; i++) {
24225+ GLushort *usptr = (GLushort *) dataout
24226+ + i * rowstride
24227+ + packskiprows * rowstride + packskippixels * components;
24228+ for (j = 0; j < widthout * components; j++) {
24229+ dummy(j, k + i);
24230+ *usptr++ = (GLushort) tempout[k++];
24231+ }
24232+ }
24233+ break;
24234+ case GL_SHORT:
24235+ k = 0;
24236+ for (i = 0; i < heightout; i++) {
24237+ GLshort *sptr = (GLshort *) dataout
24238+ + i * rowstride
24239+ + packskiprows * rowstride + packskippixels * components;
24240+ for (j = 0; j < widthout * components; j++) {
24241+ dummy(j, k + i);
24242+ *sptr++ = (GLshort) tempout[k++];
24243+ }
24244+ }
24245+ break;
24246+ case GL_UNSIGNED_INT:
24247+ k = 0;
24248+ for (i = 0; i < heightout; i++) {
24249+ GLuint *uiptr = (GLuint *) dataout
24250+ + i * rowstride
24251+ + packskiprows * rowstride + packskippixels * components;
24252+ for (j = 0; j < widthout * components; j++) {
24253+ dummy(j, k + i);
24254+ *uiptr++ = (GLuint) tempout[k++];
24255+ }
24256+ }
24257+ break;
24258+ case GL_INT:
24259+ k = 0;
24260+ for (i = 0; i < heightout; i++) {
24261+ GLint *iptr = (GLint *) dataout
24262+ + i * rowstride
24263+ + packskiprows * rowstride + packskippixels * components;
24264+ for (j = 0; j < widthout * components; j++) {
24265+ dummy(j, k + i);
24266+ *iptr++ = (GLint) tempout[k++];
24267+ }
24268+ }
24269+ break;
24270+ case GL_FLOAT:
24271+ k = 0;
24272+ for (i = 0; i < heightout; i++) {
24273+ GLfloat *fptr = (GLfloat *) dataout
24274+ + i * rowstride
24275+ + packskiprows * rowstride + packskippixels * components;
24276+ for (j = 0; j < widthout * components; j++) {
24277+ dummy(j, k + i);
24278+ *fptr++ = tempout[k++];
24279+ }
24280+ }
24281+ break;
24282+ default:
24283+ return GLU_INVALID_ENUM;
24284+ }
24285+
24286+
24287+ /* free temporary image storage */
24288+ free(tempin);
24289+ free(tempout);
24290+
24291+ return 0;
24292+}
24293+
24294+
24295+
24296+/*
24297+ * Return the largest k such that 2^k <= n.
24298+ */
24299+static GLint
24300+ilog2(GLint n)
24301+{
24302+ GLint k;
24303+
24304+ if (n <= 0)
24305+ return 0;
24306+ for (k = 0; n >>= 1; k++);
24307+ return k;
24308+}
24309+
24310+
24311+
24312+/*
24313+ * Find the value nearest to n which is also a power of two.
24314+ */
24315+static GLint
24316+round2(GLint n)
24317+{
24318+ GLint m;
24319+
24320+ for (m = 1; m < n; m *= 2);
24321+
24322+ /* m>=n */
24323+ if (m - n <= n - m / 2) {
24324+ return m;
24325+ }
24326+ else {
24327+ return m / 2;
24328+ }
24329+}
24330+
24331+
24332+/*
24333+ * Given an pixel format and datatype, return the number of bytes to
24334+ * store one pixel.
24335+ */
24336+static GLint
24337+bytes_per_pixel(GLenum format, GLenum type)
24338+{
24339+ GLint n, m;
24340+
24341+ switch (format) {
24342+ case GL_COLOR_INDEX:
24343+ case GL_STENCIL_INDEX:
24344+ case GL_DEPTH_COMPONENT:
24345+ case GL_RED:
24346+ case GL_GREEN:
24347+ case GL_BLUE:
24348+ case GL_ALPHA:
24349+ case GL_LUMINANCE:
24350+ n = 1;
24351+ break;
24352+ case GL_LUMINANCE_ALPHA:
24353+ n = 2;
24354+ break;
24355+ case GL_RGB:
24356+ case GL_BGR:
24357+ n = 3;
24358+ break;
24359+ case GL_RGBA:
24360+ case GL_BGRA:
24361+#ifdef GL_EXT_abgr
24362+ case GL_ABGR_EXT:
24363+#endif
24364+ n = 4;
24365+ break;
24366+ default:
24367+ n = 0;
24368+ }
24369+
24370+ switch (type) {
24371+ case GL_UNSIGNED_BYTE:
24372+ m = sizeof(GLubyte);
24373+ break;
24374+ case GL_BYTE:
24375+ m = sizeof(GLbyte);
24376+ break;
24377+ case GL_BITMAP:
24378+ m = 1;
24379+ break;
24380+ case GL_UNSIGNED_SHORT:
24381+ m = sizeof(GLushort);
24382+ break;
24383+ case GL_SHORT:
24384+ m = sizeof(GLshort);
24385+ break;
24386+ case GL_UNSIGNED_INT:
24387+ m = sizeof(GLuint);
24388+ break;
24389+ case GL_INT:
24390+ m = sizeof(GLint);
24391+ break;
24392+ case GL_FLOAT:
24393+ m = sizeof(GLfloat);
24394+ break;
24395+ default:
24396+ m = 0;
24397+ }
24398+
24399+ return n * m;
24400+}
24401+
24402+
24403+
24404+/*
24405+ * WARNING: This function isn't finished and has never been tested!!!!
24406+ */
24407+GLint GLAPIENTRY
24408+mesa_gluBuild1DMipmaps(GLenum target, GLint components,
24409+ GLsizei width, GLenum format, GLenum type, const void *data)
24410+{
24411+ GLubyte *texture;
24412+ GLint levels, max_levels;
24413+ GLint new_width, max_width;
24414+ GLint i, j, k, l;
24415+
24416+ if (width < 1)
24417+ return GLU_INVALID_VALUE;
24418+
24419+ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_width);
24420+ max_levels = ilog2(max_width) + 1;
24421+
24422+ /* Compute how many mipmap images to make */
24423+ levels = ilog2(width) + 1;
24424+ if (levels > max_levels) {
24425+ levels = max_levels;
24426+ }
24427+
24428+ new_width = 1 << (levels - 1);
24429+
24430+ texture = (GLubyte *) malloc(new_width * components);
24431+ if (!texture) {
24432+ return GLU_OUT_OF_MEMORY;
24433+ }
24434+
24435+ if (width != new_width) {
24436+ /* initial rescaling */
24437+ switch (type) {
24438+ case GL_UNSIGNED_BYTE:
24439+ {
24440+ GLubyte *ub_data = (GLubyte *) data;
24441+ for (i = 0; i < new_width; i++) {
24442+ j = i * width / new_width;
24443+ for (k = 0; k < components; k++) {
24444+ texture[i * components + k] = ub_data[j * components + k];
24445+ }
24446+ }
24447+ }
24448+ break;
24449+ default:
24450+ /* Not implemented */
24451+ return GLU_ERROR;
24452+ }
24453+ }
24454+
24455+ /* generate and load mipmap images */
24456+ for (l = 0; l < levels; l++) {
24457+ glTexImage1D(GL_TEXTURE_1D, l, components, new_width, 0,
24458+ format, GL_UNSIGNED_BYTE, texture);
24459+
24460+ /* Scale image down to 1/2 size */
24461+ new_width = new_width / 2;
24462+ for (i = 0; i < new_width; i++) {
24463+ for (k = 0; k < components; k++) {
24464+ GLint sample1, sample2;
24465+ sample1 = (GLint) texture[i * 2 * components + k];
24466+ sample2 = (GLint) texture[(i * 2 + 1) * components + k];
24467+ texture[i * components + k] = (GLubyte) ((sample1 + sample2) / 2);
24468+ }
24469+ }
24470+ }
24471+
24472+ free(texture);
24473+
24474+ return 0;
24475+}
24476+
24477+
24478+
24479+GLint GLAPIENTRY
24480+mesa_gluBuild2DMipmaps(GLenum target, GLint components,
24481+ GLsizei width, GLsizei height, GLenum format,
24482+ GLenum type, const void *data)
24483+{
24484+ GLint w, h, maxsize;
24485+ void *image, *newimage;
24486+ GLint neww, newh, level, bpp;
24487+ int error;
24488+ GLboolean done;
24489+ GLint retval = 0;
24490+ GLint unpackrowlength, unpackalignment, unpackskiprows, unpackskippixels;
24491+ GLint packrowlength, packalignment, packskiprows, packskippixels;
24492+
24493+ if (width < 1 || height < 1)
24494+ return GLU_INVALID_VALUE;
24495+
24496+ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxsize);
24497+
24498+ w = round2(width);
24499+ if (w > maxsize) {
24500+ w = maxsize;
24501+ }
24502+ h = round2(height);
24503+ if (h > maxsize) {
24504+ h = maxsize;
24505+ }
24506+
24507+ bpp = bytes_per_pixel(format, type);
24508+ if (bpp == 0) {
24509+ /* probably a bad format or type enum */
24510+ return GLU_INVALID_ENUM;
24511+ }
24512+
24513+ /* Get current glPixelStore values */
24514+ glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpackrowlength);
24515+ glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpackalignment);
24516+ glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unpackskiprows);
24517+ glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unpackskippixels);
24518+ glGetIntegerv(GL_PACK_ROW_LENGTH, &packrowlength);
24519+ glGetIntegerv(GL_PACK_ALIGNMENT, &packalignment);
24520+ glGetIntegerv(GL_PACK_SKIP_ROWS, &packskiprows);
24521+ glGetIntegerv(GL_PACK_SKIP_PIXELS, &packskippixels);
24522+
24523+ /* set pixel packing */
24524+ glPixelStorei(GL_PACK_ROW_LENGTH, 0);
24525+ glPixelStorei(GL_PACK_ALIGNMENT, 1);
24526+ glPixelStorei(GL_PACK_SKIP_ROWS, 0);
24527+ glPixelStorei(GL_PACK_SKIP_PIXELS, 0);
24528+
24529+ done = GL_FALSE;
24530+
24531+ if (w != width || h != height) {
24532+ /* must rescale image to get "top" mipmap texture image */
24533+ image = malloc((w + 4) * h * bpp);
24534+ if (!image) {
24535+ return GLU_OUT_OF_MEMORY;
24536+ }
24537+ error = mesa_gluScaleImage(format, width, height, type, data,
24538+ w, h, type, image);
24539+ if (error) {
24540+ retval = error;
24541+ done = GL_TRUE;
24542+ }
24543+ }
24544+ else {
24545+ image = (void *) data;
24546+ }
24547+
24548+ level = 0;
24549+ while (!done) {
24550+ if (image != data) {
24551+ /* set pixel unpacking */
24552+ glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
24553+ glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
24554+ glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
24555+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
24556+ }
24557+
24558+ glTexImage2D(target, level, components, w, h, 0, format, type, image);
24559+
24560+ if (w == 1 && h == 1)
24561+ break;
24562+
24563+ neww = (w < 2) ? 1 : w / 2;
24564+ newh = (h < 2) ? 1 : h / 2;
24565+ newimage = malloc((neww + 4) * newh * bpp);
24566+ if (!newimage) {
24567+ return GLU_OUT_OF_MEMORY;
24568+ }
24569+
24570+ error = mesa_gluScaleImage(format, w, h, type, image,
24571+ neww, newh, type, newimage);
24572+ if (error) {
24573+ retval = error;
24574+ done = GL_TRUE;
24575+ }
24576+
24577+ if (image != data) {
24578+ free(image);
24579+ }
24580+ image = newimage;
24581+
24582+ w = neww;
24583+ h = newh;
24584+ level++;
24585+ }
24586+
24587+ if (image != data) {
24588+ free(image);
24589+ }
24590+
24591+ /* Restore original glPixelStore state */
24592+ glPixelStorei(GL_UNPACK_ROW_LENGTH, unpackrowlength);
24593+ glPixelStorei(GL_UNPACK_ALIGNMENT, unpackalignment);
24594+ glPixelStorei(GL_UNPACK_SKIP_ROWS, unpackskiprows);
24595+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, unpackskippixels);
24596+ glPixelStorei(GL_PACK_ROW_LENGTH, packrowlength);
24597+ glPixelStorei(GL_PACK_ALIGNMENT, packalignment);
24598+ glPixelStorei(GL_PACK_SKIP_ROWS, packskiprows);
24599+ glPixelStorei(GL_PACK_SKIP_PIXELS, packskippixels);
24600+
24601+ return retval;
24602+}
24603Index: qemu-0.13.0/target-i386/opengl_exec.c
24604===================================================================
24605--- /dev/null 1970-01-01 00:00:00.000000000 +0000
24606+++ qemu-0.13.0/target-i386/opengl_exec.c 2011-01-17 16:42:36.000000000 +0800
24607@@ -0,0 +1,3931 @@
24608+/*
24609+ * Host-side implementation of GL/GLX API
24610+ *
24611+ * Copyright (c) 2006,2007 Even Rouault
24612+ *
24613+ * Permission is hereby granted, free of charge, to any person obtaining a copy
24614+ * of this software and associated documentation files (the "Software"), to deal
24615+ * in the Software without restriction, including without limitation the rights
24616+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
24617+ * copies of the Software, and to permit persons to whom the Software is
24618+ * furnished to do so, subject to the following conditions:
24619+ *
24620+ * The above copyright notice and this permission notice shall be included in
24621+ * all copies or substantial portions of the Software.
24622+ *
24623+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24624+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24625+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24626+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24627+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24628+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24629+ * THE SOFTWARE.
24630+ */
24631+
24632+
24633+#include <stdio.h>
24634+#include <stdlib.h>
24635+#include <assert.h>
24636+#include <string.h>
24637+
24638+#include <X11/Xlib.h>
24639+#include <X11/Xutil.h>
24640+
24641+#define GL_GLEXT_PROTOTYPES
24642+#define GLX_GLXEXT_PROTOTYPES
24643+
24644+#include <mesa_gl.h>
24645+#include <mesa_glx.h>
24646+
24647+// TODO
24648+typedef long unsigned int target_phys_addr_t;
24649+
24650+#include "opengl_func.h"
24651+
24652+#include "mesa_glu.h"
24653+#include "mesa_mipmap.c"
24654+
24655+#include "../qemu-common.h"
24656+
24657+//#define SYSTEMATIC_ERROR_CHECK
24658+#define BUFFER_BEGINEND
24659+#define glGetError() 0
24660+
24661+#define GET_EXT_PTR(type, funcname, args_decl) \
24662+ static int detect_##funcname = 0; \
24663+ static type(*ptr_func_##funcname)args_decl = NULL; \
24664+ if (detect_##funcname == 0) \
24665+ { \
24666+ detect_##funcname = 1; \
24667+ ptr_func_##funcname = (type(*)args_decl)glXGetProcAddressARB((const GLubyte*)#funcname); \
24668+ assert (ptr_func_##funcname); \
24669+ }
24670+
24671+#define GET_EXT_PTR_NO_FAIL(type, funcname, args_decl) \
24672+ static int detect_##funcname = 0; \
24673+ static type(*ptr_func_##funcname)args_decl = NULL; \
24674+ if (detect_##funcname == 0) \
24675+ { \
24676+ detect_##funcname = 1; \
24677+ ptr_func_##funcname = (type(*)args_decl)glXGetProcAddressARB((const GLubyte*)#funcname); \
24678+ }
24679+
24680+#ifndef WIN32
24681+#include <dlfcn.h>
24682+#endif
24683+
24684+static void *get_glu_ptr(const char *name)
24685+{
24686+ static void *handle = (void *) -1;
24687+
24688+ if (handle == (void *) -1) {
24689+#ifndef WIN32
24690+ handle = dlopen("libGLU.so", RTLD_LAZY);
24691+ if (!handle)
24692+ fprintf(stderr, "can't load libGLU.so : %s\n", dlerror());
24693+#else
24694+ handle = (void *) LoadLibrary("glu32.dll");
24695+ if (!handle)
24696+ fprintf(stderr, "can't load glu32.dll\n");
24697+#endif
24698+ }
24699+ if (handle) {
24700+#ifndef WIN32
24701+ return dlsym(handle, name);
24702+#else
24703+ return GetProcAddress(handle, name);
24704+#endif
24705+ }
24706+ return NULL;
24707+}
24708+
24709+#define GET_GLU_PTR(type, funcname, args_decl) \
24710+ static int detect_##funcname = 0; \
24711+ static type(*ptr_func_##funcname)args_decl = NULL; \
24712+ if (detect_##funcname == 0) \
24713+ { \
24714+ detect_##funcname = 1; \
24715+ ptr_func_##funcname = (type(*)args_decl)get_glu_ptr(#funcname); \
24716+ }
24717+
24718+int display_function_call = 0;
24719+
24720+static const int defaultAttribList[] = {
24721+ GLX_RGBA,
24722+ GLX_RED_SIZE, 1,
24723+ GLX_GREEN_SIZE, 1,
24724+ GLX_BLUE_SIZE, 1,
24725+ GLX_DOUBLEBUFFER,
24726+ None
24727+};
24728+
24729+static XVisualInfo *get_default_visual(Display *dpy)
24730+{
24731+ static XVisualInfo *vis = NULL;
24732+ XVisualInfo theTemplate;
24733+ int numVisuals;
24734+
24735+ if (vis)
24736+ return vis;
24737+ fprintf(stderr, "get_default_visual\n");
24738+ /* if (vis == NULL) vis = glXChooseVisual(dpy, 0,
24739+ * (int*)defaultAttribList); */
24740+ theTemplate.screen = 0;
24741+ vis = XGetVisualInfo(dpy, VisualScreenMask, &theTemplate, &numVisuals);
24742+
24743+ return vis;
24744+}
24745+
24746+
24747+static Display *parent_dpy = NULL;
24748+static Window qemu_parent_window = 0;
24749+
24750+static Window active_win = 0; /* FIXME */
24751+static int active_win_x = 0;
24752+static int active_win_y = 0;
24753+
24754+void opengl_exec_set_parent_window(Display *_dpy, Window _parent_window)
24755+{
24756+ parent_dpy = _dpy;
24757+ qemu_parent_window = _parent_window;
24758+ if (active_win)
24759+ XReparentWindow(_dpy, active_win, _parent_window, active_win_x,
24760+ active_win_y);
24761+}
24762+
24763+static int local_connection = 0;
24764+void opengl_exec_set_local_connection()
24765+{
24766+ local_connection = 1;
24767+}
24768+
24769+static GLXDrawable create_window(Display *dpy, Window local_parent_window,
24770+ XVisualInfo *vis, const char *name,
24771+ int x, int y, int width, int height)
24772+{
24773+ int scrnum;
24774+ XSetWindowAttributes attr = { 0 };
24775+ unsigned long mask;
24776+ Window root;
24777+ Window win;
24778+
24779+ scrnum = DefaultScreen(dpy);
24780+ root = RootWindow(dpy, scrnum);
24781+
24782+ /* window attributes */
24783+ attr.background_pixel = 0xff000000;
24784+ attr.border_pixel = 0;
24785+ attr.colormap = XCreateColormap(dpy, root, vis->visual, AllocNone);
24786+ attr.event_mask = 0; /* StructureNotifyMask | ExposureMask | KeyPressMask */
24787+ attr.save_under = True;
24788+ // if (local_parent_window == NULL && qemu_parent_window == NULL)
24789+ attr.override_redirect = True;
24790+ // else
24791+ // attr.override_redirect = True;
24792+ attr.cursor = None;
24793+ mask =
24794+ CWBackPixel | CWBorderPixel | CWColormap | CWEventMask |
24795+ CWOverrideRedirect | CWSaveUnder;
24796+
24797+ if (local_parent_window)
24798+ win = XCreateWindow(dpy, local_parent_window, 0, 0, width, height, 0,
24799+ vis->depth, InputOutput, vis->visual, mask, &attr);
24800+ else if (qemu_parent_window)
24801+ win = XCreateWindow(dpy, qemu_parent_window, 0, 0, width, height, 0,
24802+ vis->depth, InputOutput, vis->visual, mask, &attr);
24803+ else
24804+ win = XCreateWindow(dpy, root, 0, 0, width, height, 0, vis->depth,
24805+ InputOutput, vis->visual, mask, &attr);
24806+
24807+ /* set hints and properties */
24808+ {
24809+ XSizeHints sizehints;
24810+
24811+ sizehints.x = x;
24812+ sizehints.y = y;
24813+ sizehints.width = width;
24814+ sizehints.height = height;
24815+ sizehints.flags = USSize | USPosition;
24816+ XSetWMNormalHints(dpy, win, &sizehints);
24817+ XSetStandardProperties(dpy, win, name, name, None,
24818+ (char **) NULL, 0, &sizehints);
24819+ }
24820+
24821+ XSync(dpy, 0);
24822+
24823+ /*
24824+ * int loop = 1; while (loop) { while (XPending(dpy) > 0) { XEvent event;
24825+ * XNextEvent(dpy, &event); switch (event.type) { case CreateNotify: { if
24826+ * (((XCreateWindowEvent*)&event)->window == win) { loop = 0; } break; } }
24827+ * } } */
24828+
24829+ /* TODO */
24830+ if (!active_win)
24831+ active_win = win;
24832+
24833+ return win;
24834+}
24835+
24836+typedef struct {
24837+ void *key;
24838+ void *value;
24839+} Assoc;
24840+
24841+#define MAX_HANDLED_PROCESS 100
24842+#define MAX_ASSOC_SIZE 100
24843+
24844+#define MAX_FBCONFIG 10
24845+
24846+#include "opengl_utils.h"
24847+
24848+#define MAX(a, b) (((a) > (b)) ? (a) : (b))
24849+
24850+
24851+typedef struct {
24852+ int x;
24853+ int y;
24854+ int width;
24855+ int height;
24856+ int map_state;
24857+} WindowPosStruct;
24858+
24859+typedef struct {
24860+ GLbitfield mask;
24861+ int activeTextureIndex;
24862+} ClientState;
24863+
24864+#define MAX_CLIENT_STATE_STACK_SIZE 16
24865+
24866+typedef struct {
24867+ int ref;
24868+ int fake_ctxt;
24869+ int fake_shareList;
24870+ GLXContext context;
24871+ GLXDrawable drawable;
24872+
24873+ void *vertexPointer;
24874+ void *normalPointer;
24875+ void *colorPointer;
24876+ void *secondaryColorPointer;
24877+ void *indexPointer;
24878+ void *texCoordPointer[NB_MAX_TEXTURES];
24879+ void *edgeFlagPointer;
24880+ void *vertexAttribPointer[MY_GL_MAX_VERTEX_ATTRIBS_ARB];
24881+ void *vertexAttribPointerNV[MY_GL_MAX_VERTEX_ATTRIBS_NV];
24882+ void *weightPointer;
24883+ void *matrixIndexPointer;
24884+ void *fogCoordPointer;
24885+ void *variantPointerEXT[MY_GL_MAX_VARIANT_POINTER_EXT];
24886+ void *interleavedArrays;
24887+ void *elementPointerATI;
24888+
24889+ int vertexPointerSize;
24890+ int normalPointerSize;
24891+ int colorPointerSize;
24892+ int secondaryColorPointerSize;
24893+ int indexPointerSize;
24894+ int texCoordPointerSize[NB_MAX_TEXTURES];
24895+ int edgeFlagPointerSize;
24896+ int vertexAttribPointerSize[MY_GL_MAX_VERTEX_ATTRIBS_ARB];
24897+ int vertexAttribPointerNVSize[MY_GL_MAX_VERTEX_ATTRIBS_NV];
24898+ int weightPointerSize;
24899+ int matrixIndexPointerSize;
24900+ int fogCoordPointerSize;
24901+ int variantPointerEXTSize[MY_GL_MAX_VARIANT_POINTER_EXT];
24902+ int interleavedArraysSize;
24903+ int elementPointerATISize;
24904+
24905+ int selectBufferSize;
24906+ void *selectBufferPtr;
24907+ int feedbackBufferSize;
24908+ void *feedbackBufferPtr;
24909+
24910+ ClientState clientStateStack[MAX_CLIENT_STATE_STACK_SIZE];
24911+ int clientStateSp;
24912+ int activeTextureIndex;
24913+
24914+ unsigned int ownTabTextures[32768];
24915+ unsigned int *tabTextures;
24916+ RangeAllocator ownTextureAllocator;
24917+ RangeAllocator *textureAllocator;
24918+
24919+ unsigned int ownTabBuffers[32768];
24920+ unsigned int *tabBuffers;
24921+ RangeAllocator ownBufferAllocator;
24922+ RangeAllocator *bufferAllocator;
24923+
24924+ unsigned int ownTabLists[32768];
24925+ unsigned int *tabLists;
24926+ RangeAllocator ownListAllocator;
24927+ RangeAllocator *listAllocator;
24928+
24929+#ifdef SYSTEMATIC_ERROR_CHECK
24930+ int last_error;
24931+#endif
24932+} GLState;
24933+
24934+typedef struct {
24935+ int process_id;
24936+ int instr_counter;
24937+
24938+ int x, y, width, height;
24939+ WindowPosStruct currentDrawablePos;
24940+
24941+ int next_available_context_number;
24942+ int next_available_pbuffer_number;
24943+
24944+ int nb_states;
24945+ GLState default_state;
24946+ GLState **glstates;
24947+ GLState *current_state;
24948+
24949+ int nfbconfig;
24950+ GLXFBConfig *fbconfigs[MAX_FBCONFIG];
24951+ int fbconfigs_max[MAX_FBCONFIG];
24952+ int nfbconfig_total;
24953+
24954+ Assoc association_fakecontext_glxcontext[MAX_ASSOC_SIZE];
24955+ Assoc association_fakepbuffer_pbuffer[MAX_ASSOC_SIZE];
24956+ Assoc association_clientdrawable_serverdrawable[MAX_ASSOC_SIZE];
24957+ Assoc association_fakecontext_visual[MAX_ASSOC_SIZE];
24958+
24959+ Display *dpy;
24960+
24961+ int began;
24962+ int primitive;
24963+ int bufsize;
24964+ int bufstart;
24965+ arg_t *cmdbuf;
24966+} ProcessStruct;
24967+
24968+static ProcessStruct processes[MAX_HANDLED_PROCESS];
24969+
24970+void init_process_tab()
24971+{
24972+ memset(processes, 0, sizeof(processes));
24973+}
24974+
24975+#define ARG_TO_CHAR(x) (char)(x)
24976+#define ARG_TO_UNSIGNED_CHAR(x) (unsigned char)(x)
24977+#define ARG_TO_SHORT(x) (short)(x)
24978+#define ARG_TO_UNSIGNED_SHORT(x) (unsigned short)(x)
24979+#define ARG_TO_INT(x) (int)(x)
24980+#define ARG_TO_UNSIGNED_INT(x) (unsigned int)(x)
24981+#define ARG_TO_FLOAT(x) (*(float*)&(x))
24982+#define ARG_TO_DOUBLE(x) (*(double*)(x))
24983+
24984+#include "server_stub.c"
24985+
24986+/* ---- */
24987+
24988+#ifdef BUFFER_BEGINEND
24989+/* A user of the following two functions must not buffer any calls that
24990+ * may throw an error (i.e. errors conditions must be checked before
24991+ * storing in the buffer) or return values. */
24992+static inline arg_t *cmd_buffer_alloc(ProcessStruct *process, size_t elems)
24993+{
24994+ arg_t *ret;
24995+
24996+ if (unlikely(process->bufstart + elems > process->bufsize)) {
24997+ process->bufsize = (process->bufsize ?: 0x100) << 1;
24998+ process->cmdbuf = qemu_realloc(process->cmdbuf,
24999+ process->bufsize * sizeof(arg_t));
25000+ }
25001+
25002+ ret = process->cmdbuf + process->bufstart;
25003+ process->bufstart += elems;
25004+ return ret;
25005+}
25006+
25007+static inline void cmd_buffer_replay(ProcessStruct *process)
25008+{
25009+ Signature *sig;
25010+ int func_number;
25011+ int ret_int;
25012+ char ret_char;
25013+ arg_t *call = process->cmdbuf;
25014+
25015+ while (process->bufstart) {
25016+ func_number = *call ++;
25017+ sig = (Signature *) tab_opengl_calls[func_number];
25018+
25019+ execute_func(func_number, call, &ret_int, &ret_char);
25020+
25021+ call += sig->nb_args;
25022+ process->bufstart -= sig->nb_args + 1;
25023+ }
25024+}
25025+#endif
25026+
25027+/* ---- */
25028+
25029+typedef void *ClientGLXDrawable;
25030+static inline ClientGLXDrawable to_drawable(arg_t arg)
25031+{
25032+#ifdef TARGET_X86_64
25033+ if (arg > (unsigned long) -1) {
25034+ fprintf(stderr, "GLXDrawable too big for this implementation\n");
25035+ exit(-1);
25036+ }
25037+#endif
25038+ return (void *) (unsigned long) arg;
25039+}
25040+
25041+GLXContext get_association_fakecontext_glxcontext(
25042+ ProcessStruct *process, int fakecontext)
25043+{
25044+ int i;
25045+
25046+ for (i = 0;
25047+ i < MAX_ASSOC_SIZE &&
25048+ process->association_fakecontext_glxcontext[i].key; i++)
25049+ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
25050+ fakecontext)
25051+ return (GLXContext)
25052+ process->association_fakecontext_glxcontext[i].value;
25053+
25054+ return NULL;
25055+}
25056+
25057+void set_association_fakecontext_glxcontext(
25058+ ProcessStruct *process, int fakecontext, GLXContext glxcontext)
25059+{
25060+ int i;
25061+
25062+ for (i = 0;
25063+ i < MAX_ASSOC_SIZE &&
25064+ process->association_fakecontext_glxcontext[i].key; i++)
25065+ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
25066+ fakecontext)
25067+ break;
25068+
25069+ if (i < MAX_ASSOC_SIZE) {
25070+ process->association_fakecontext_glxcontext[i].key =
25071+ (void *) (long) fakecontext;
25072+ process->association_fakecontext_glxcontext[i].value =
25073+ (void *) glxcontext;
25074+ } else
25075+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
25076+}
25077+
25078+void unset_association_fakecontext_glxcontext(
25079+ ProcessStruct *process, int fakecontext)
25080+{
25081+ int i;
25082+
25083+ for (i = 0;
25084+ i < MAX_ASSOC_SIZE &&
25085+ process->association_fakecontext_glxcontext[i].key; i++)
25086+ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
25087+ fakecontext) {
25088+ memmove(&process->association_fakecontext_glxcontext[i],
25089+ &process->association_fakecontext_glxcontext[i + 1],
25090+ sizeof(Assoc) * (MAX_ASSOC_SIZE - 1 - i));
25091+ return;
25092+ }
25093+}
25094+
25095+/* ---- */
25096+
25097+XVisualInfo *get_association_fakecontext_visual(
25098+ ProcessStruct *process, int fakecontext)
25099+{
25100+ int i;
25101+
25102+ for (i = 0;
25103+ i < MAX_ASSOC_SIZE && process->association_fakecontext_visual[i].key;
25104+ i++)
25105+ if ((int) (long) process->association_fakecontext_visual[i].key ==
25106+ fakecontext)
25107+ return process->association_fakecontext_visual[i].value;
25108+
25109+ return NULL;
25110+}
25111+
25112+void set_association_fakecontext_visual(ProcessStruct *process,
25113+ int fakecontext, XVisualInfo *visual)
25114+{
25115+ int i;
25116+
25117+ for (i = 0;
25118+ i < MAX_ASSOC_SIZE && process->association_fakecontext_visual[i].key;
25119+ i++)
25120+ if ((int) (long) process->association_fakecontext_visual[i].key ==
25121+ fakecontext)
25122+ break;
25123+
25124+ if (i < MAX_ASSOC_SIZE) {
25125+ process->association_fakecontext_visual[i].key =
25126+ (void *) (long) fakecontext;
25127+ process->association_fakecontext_visual[i].value = (void *) visual;
25128+ } else
25129+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
25130+}
25131+
25132+/* ---- */
25133+
25134+GLXPbuffer get_association_fakepbuffer_pbuffer(
25135+ ProcessStruct *process, ClientGLXDrawable fakepbuffer)
25136+{
25137+ int i;
25138+
25139+ for (i = 0; i < MAX_ASSOC_SIZE &&
25140+ process->association_fakepbuffer_pbuffer[i].key; i ++)
25141+ if ((ClientGLXDrawable)
25142+ process->association_fakepbuffer_pbuffer[i].key ==
25143+ fakepbuffer)
25144+ return (GLXPbuffer)
25145+ process->association_fakepbuffer_pbuffer[i].value;
25146+
25147+ return 0;
25148+}
25149+
25150+void set_association_fakepbuffer_pbuffer(ProcessStruct *process,
25151+ ClientGLXDrawable fakepbuffer, GLXPbuffer pbuffer)
25152+{
25153+ int i;
25154+
25155+ for (i = 0;
25156+ i < MAX_ASSOC_SIZE &&
25157+ process->association_fakepbuffer_pbuffer[i].key; i++)
25158+ if ((ClientGLXDrawable)
25159+ process->association_fakepbuffer_pbuffer[i].key ==
25160+ fakepbuffer)
25161+ break;
25162+
25163+ if (i < MAX_ASSOC_SIZE) {
25164+ process->association_fakepbuffer_pbuffer[i].key = (void *) fakepbuffer;
25165+ process->association_fakepbuffer_pbuffer[i].value = (void *) pbuffer;
25166+ } else
25167+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
25168+}
25169+
25170+void unset_association_fakepbuffer_pbuffer(ProcessStruct *process,
25171+ ClientGLXDrawable fakepbuffer)
25172+{
25173+ int i;
25174+
25175+ for (i = 0; i < MAX_ASSOC_SIZE &&
25176+ process->association_fakepbuffer_pbuffer[i].key; i++)
25177+ if ((ClientGLXDrawable)
25178+ process->association_fakepbuffer_pbuffer[i].key ==
25179+ fakepbuffer) {
25180+ memmove(&process->association_fakepbuffer_pbuffer[i],
25181+ &process->association_fakepbuffer_pbuffer[i + 1],
25182+ sizeof(Assoc) * (MAX_ASSOC_SIZE - 1 - i));
25183+ return;
25184+ }
25185+}
25186+
25187+/* ---- */
25188+
25189+GLXDrawable get_association_clientdrawable_serverdrawable(
25190+ ProcessStruct *process, ClientGLXDrawable clientdrawable)
25191+{
25192+ int i;
25193+
25194+ for (i = 0; i < MAX_ASSOC_SIZE &&
25195+ process->association_clientdrawable_serverdrawable[i].key;
25196+ i++)
25197+ if ((ClientGLXDrawable) process->
25198+ association_clientdrawable_serverdrawable[i].key ==
25199+ clientdrawable)
25200+ return (GLXDrawable) process->
25201+ association_clientdrawable_serverdrawable[i].value;
25202+
25203+ return (GLXDrawable) 0;
25204+}
25205+
25206+ClientGLXDrawable get_association_serverdrawable_clientdrawable(
25207+ ProcessStruct *process, GLXDrawable serverdrawable)
25208+{
25209+ int i;
25210+
25211+ for (i = 0; i < MAX_ASSOC_SIZE &&
25212+ process->association_clientdrawable_serverdrawable[i].key;
25213+ i ++)
25214+ if ((GLXDrawable) process->
25215+ association_clientdrawable_serverdrawable[i].value ==
25216+ serverdrawable)
25217+ return (ClientGLXDrawable)
25218+ process->association_clientdrawable_serverdrawable[i].key;
25219+
25220+ return NULL;
25221+}
25222+
25223+void set_association_clientdrawable_serverdrawable(
25224+ ProcessStruct *process, ClientGLXDrawable clientdrawable,
25225+ GLXDrawable serverdrawable)
25226+{
25227+ int i;
25228+
25229+ for (i = 0; process->association_clientdrawable_serverdrawable[i].key;
25230+ i ++)
25231+ if ((ClientGLXDrawable) process->
25232+ association_clientdrawable_serverdrawable[i].key ==
25233+ clientdrawable)
25234+ break;
25235+
25236+ if (i < MAX_ASSOC_SIZE) {
25237+ process->association_clientdrawable_serverdrawable[i].key =
25238+ (void *) clientdrawable;
25239+ process->association_clientdrawable_serverdrawable[i].value =
25240+ (void *) serverdrawable;
25241+ } else
25242+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
25243+}
25244+
25245+static void _get_window_pos(Display *dpy, Window win, WindowPosStruct *pos)
25246+{
25247+ XWindowAttributes window_attributes_return;
25248+ Window child;
25249+ int x, y;
25250+ Window root = DefaultRootWindow(dpy);
25251+
25252+ XGetWindowAttributes(dpy, win, &window_attributes_return);
25253+ XTranslateCoordinates(dpy, win, root, 0, 0, &x, &y, &child);
25254+ /* printf("%d %d %d %d\n", x, y, window_attributes_return.width,
25255+ * window_attributes_return.height); */
25256+ pos->x = x;
25257+ pos->y = y;
25258+ pos->width = window_attributes_return.width;
25259+ pos->height = window_attributes_return.height;
25260+ pos->map_state = window_attributes_return.map_state;
25261+}
25262+
25263+static int is_gl_vendor_ati(Display *dpy)
25264+{
25265+ static int is_gl_vendor_ati_flag = 0;
25266+ static int has_init = 0;
25267+
25268+ if (has_init == 0) {
25269+ has_init = 1;
25270+ is_gl_vendor_ati_flag =
25271+ (strncmp(glXGetClientString(dpy, GLX_VENDOR), "ATI", 3) == 0);
25272+ }
25273+ return is_gl_vendor_ati_flag;
25274+}
25275+
25276+static int get_server_texture(ProcessStruct *process,
25277+ unsigned int client_texture)
25278+{
25279+ unsigned int server_texture = 0;
25280+
25281+ if (client_texture < 32768) {
25282+ server_texture = process->current_state->tabTextures[client_texture];
25283+ } else {
25284+ fprintf(stderr, "invalid texture name %d\n", client_texture);
25285+ }
25286+ return server_texture;
25287+}
25288+
25289+static int get_server_buffer(ProcessStruct *process,
25290+ unsigned int client_buffer)
25291+{
25292+ unsigned int server_buffer = 0;
25293+
25294+ if (client_buffer < 32768) {
25295+ server_buffer = process->current_state->tabBuffers[client_buffer];
25296+ } else {
25297+ fprintf(stderr, "invalid buffer name %d\n", client_buffer);
25298+ }
25299+ return server_buffer;
25300+}
25301+
25302+
25303+static int get_server_list(ProcessStruct *process, unsigned int client_list)
25304+{
25305+ unsigned int server_list = 0;
25306+
25307+ if (client_list < 32768) {
25308+ server_list = process->current_state->tabLists[client_list];
25309+ } else {
25310+ fprintf(stderr, "invalid list name %d\n", client_list);
25311+ }
25312+ return server_list;
25313+}
25314+
25315+GLXFBConfig get_fbconfig(ProcessStruct *process, int client_fbconfig)
25316+{
25317+ int i;
25318+ int nbtotal = 0;
25319+
25320+ for (i = 0; i < process->nfbconfig; i++) {
25321+ assert(client_fbconfig >= 1 + nbtotal);
25322+ if (client_fbconfig <= nbtotal + process->fbconfigs_max[i]) {
25323+ return process->fbconfigs[i][client_fbconfig - 1 - nbtotal];
25324+ }
25325+ nbtotal += process->fbconfigs_max[i];
25326+ }
25327+ return 0;
25328+}
25329+
25330+typedef struct {
25331+ int attribListLength;
25332+ int *attribList;
25333+ XVisualInfo *visInfo;
25334+} AssocAttribListVisual;
25335+
25336+static int nTabAssocAttribListVisual = 0;
25337+static AssocAttribListVisual *tabAssocAttribListVisual = NULL;
25338+
25339+static int _compute_length_of_attrib_list_including_zero(const int *attribList,
25340+ int
25341+ booleanMustHaveValue)
25342+{
25343+ int i = 0;
25344+
25345+ while (attribList[i]) {
25346+ if (booleanMustHaveValue ||
25347+ !(attribList[i] == GLX_USE_GL || attribList[i] == GLX_RGBA ||
25348+ attribList[i] == GLX_DOUBLEBUFFER ||
25349+ attribList[i] == GLX_STEREO)) {
25350+ i += 2;
25351+ } else {
25352+ i++;
25353+ }
25354+ }
25355+ return i + 1;
25356+}
25357+
25358+static int glXChooseVisualFunc(Display *dpy, const int *_attribList)
25359+{
25360+ if (_attribList == NULL)
25361+ return 0;
25362+ int attribListLength =
25363+ _compute_length_of_attrib_list_including_zero(_attribList, 0);
25364+ int i;
25365+
25366+ int *attribList = malloc(sizeof(int) * attribListLength);
25367+ memcpy(attribList, _attribList, sizeof(int) * attribListLength);
25368+
25369+ i = 0;
25370+ while (attribList[i]) {
25371+ if (!
25372+ (attribList[i] == GLX_USE_GL || attribList[i] == GLX_RGBA ||
25373+ attribList[i] == GLX_DOUBLEBUFFER ||
25374+ attribList[i] == GLX_STEREO)) {
25375+ if (attribList[i] == GLX_SAMPLE_BUFFERS && attribList[i + 1] != 0
25376+ && getenv("DISABLE_SAMPLE_BUFFERS")) {
25377+ fprintf(stderr, "Disabling GLX_SAMPLE_BUFFERS\n");
25378+ attribList[i + 1] = 0;
25379+ }
25380+ i += 2;
25381+ } else {
25382+ i++;
25383+ }
25384+ }
25385+
25386+ for (i = 0; i < nTabAssocAttribListVisual; i++) {
25387+ if (tabAssocAttribListVisual[i].attribListLength == attribListLength
25388+ && memcmp(tabAssocAttribListVisual[i].attribList, attribList,
25389+ attribListLength * sizeof(int)) == 0) {
25390+ free(attribList);
25391+ return (tabAssocAttribListVisual[i].
25392+ visInfo) ? tabAssocAttribListVisual[i].visInfo->
25393+ visualid : 0;
25394+ }
25395+ }
25396+ XVisualInfo *visInfo = glXChooseVisual(dpy, 0, attribList);
25397+
25398+ tabAssocAttribListVisual = realloc(
25399+ tabAssocAttribListVisual, sizeof(AssocAttribListVisual) *
25400+ (nTabAssocAttribListVisual + 1));
25401+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribListLength =
25402+ attribListLength;
25403+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList =
25404+ (int *) malloc(sizeof(int) * attribListLength);
25405+ memcpy(tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList,
25406+ attribList, sizeof(int) * attribListLength);
25407+ tabAssocAttribListVisual[nTabAssocAttribListVisual].visInfo = visInfo;
25408+ nTabAssocAttribListVisual++;
25409+ free(attribList);
25410+ return (visInfo) ? visInfo->visualid : 0;
25411+}
25412+
25413+static XVisualInfo *get_visual_info_from_visual_id(Display *dpy,
25414+ int visualid)
25415+{
25416+ int i, n;
25417+ XVisualInfo template;
25418+ XVisualInfo *visInfo;
25419+
25420+ for (i = 0; i < nTabAssocAttribListVisual; i++) {
25421+ if (tabAssocAttribListVisual[i].visInfo &&
25422+ tabAssocAttribListVisual[i].visInfo->visualid == visualid) {
25423+ return tabAssocAttribListVisual[i].visInfo;
25424+ }
25425+ }
25426+ template.visualid = visualid;
25427+ visInfo = XGetVisualInfo(dpy, VisualIDMask, &template, &n);
25428+ tabAssocAttribListVisual =
25429+ realloc(tabAssocAttribListVisual,
25430+ sizeof(AssocAttribListVisual) * (nTabAssocAttribListVisual +
25431+ 1));
25432+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribListLength = 0;
25433+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList = NULL;
25434+ tabAssocAttribListVisual[nTabAssocAttribListVisual].visInfo = visInfo;
25435+ nTabAssocAttribListVisual++;
25436+ return visInfo;
25437+}
25438+
25439+typedef struct {
25440+ int x;
25441+ int y;
25442+ int width;
25443+ int height;
25444+ int xhot;
25445+ int yhot;
25446+ int *pixels;
25447+} ClientCursor;
25448+
25449+#if 0
25450+static ClientCursor client_cursor = { 0 };
25451+#endif
25452+
25453+static void do_glClientActiveTextureARB(int texture)
25454+{
25455+ GET_EXT_PTR_NO_FAIL(void, glClientActiveTextureARB, (int));
25456+
25457+ if (ptr_func_glClientActiveTextureARB) {
25458+ ptr_func_glClientActiveTextureARB(texture);
25459+ }
25460+}
25461+
25462+#ifdef CURSOR_TRICK
25463+static void do_glActiveTextureARB(int texture)
25464+{
25465+ GET_EXT_PTR_NO_FAIL(void, glActiveTextureARB, (int));
25466+
25467+ if (ptr_func_glActiveTextureARB) {
25468+ ptr_func_glActiveTextureARB(texture);
25469+ }
25470+}
25471+
25472+static void do_glUseProgramObjectARB(GLhandleARB programObj)
25473+{
25474+ GET_EXT_PTR_NO_FAIL(void, glUseProgramObjectARB, (GLhandleARB));
25475+
25476+ if (ptr_func_glUseProgramObjectARB) {
25477+ ptr_func_glUseProgramObjectARB(programObj);
25478+ }
25479+}
25480+#endif
25481+
25482+static void destroy_gl_state(GLState *state)
25483+{
25484+ int i;
25485+
25486+ if (state->vertexPointer)
25487+ free(state->vertexPointer);
25488+ if (state->normalPointer)
25489+ free(state->normalPointer);
25490+ if (state->indexPointer)
25491+ free(state->indexPointer);
25492+ if (state->colorPointer)
25493+ free(state->colorPointer);
25494+ if (state->secondaryColorPointer)
25495+ free(state->secondaryColorPointer);
25496+ for (i = 0; i < NB_MAX_TEXTURES; i++) {
25497+ if (state->texCoordPointer[i])
25498+ free(state->texCoordPointer[i]);
25499+ }
25500+ for (i = 0; i < MY_GL_MAX_VERTEX_ATTRIBS_ARB; i++) {
25501+ if (state->vertexAttribPointer[i])
25502+ free(state->vertexAttribPointer[i]);
25503+ }
25504+ for (i = 0; i < MY_GL_MAX_VERTEX_ATTRIBS_NV; i++) {
25505+ if (state->vertexAttribPointerNV[i])
25506+ free(state->vertexAttribPointerNV[i]);
25507+ }
25508+ if (state->weightPointer)
25509+ free(state->weightPointer);
25510+ if (state->matrixIndexPointer)
25511+ free(state->matrixIndexPointer);
25512+ if (state->fogCoordPointer)
25513+ free(state->fogCoordPointer);
25514+ for (i = 0; i < MY_GL_MAX_VARIANT_POINTER_EXT; i++) {
25515+ if (state->variantPointerEXT[i])
25516+ free(state->variantPointerEXT[i]);
25517+ }
25518+ if (state->interleavedArrays)
25519+ free(state->interleavedArrays);
25520+ if (state->elementPointerATI)
25521+ free(state->elementPointerATI);
25522+}
25523+
25524+static void init_gl_state(GLState *state)
25525+{
25526+ state->textureAllocator = &state->ownTextureAllocator;
25527+ state->tabTextures = state->ownTabTextures;
25528+ state->bufferAllocator = &state->ownBufferAllocator;
25529+ state->tabBuffers = state->ownTabBuffers;
25530+ state->listAllocator = &state->ownListAllocator;
25531+ state->tabLists = state->ownTabLists;
25532+}
25533+
25534+/*
25535+ * Translate the nth element of list from type to GLuint.
25536+ */
25537+static GLuint translate_id(GLsizei n, GLenum type, const GLvoid *list)
25538+{
25539+ GLbyte *bptr;
25540+ GLubyte *ubptr;
25541+ GLshort *sptr;
25542+ GLushort *usptr;
25543+ GLint *iptr;
25544+ GLuint *uiptr;
25545+ GLfloat *fptr;
25546+
25547+ switch (type) {
25548+ case GL_BYTE:
25549+ bptr = (GLbyte *) list;
25550+ return (GLuint) *(bptr + n);
25551+ case GL_UNSIGNED_BYTE:
25552+ ubptr = (GLubyte *) list;
25553+ return (GLuint) *(ubptr + n);
25554+ case GL_SHORT:
25555+ sptr = (GLshort *) list;
25556+ return (GLuint) *(sptr + n);
25557+ case GL_UNSIGNED_SHORT:
25558+ usptr = (GLushort *) list;
25559+ return (GLuint) *(usptr + n);
25560+ case GL_INT:
25561+ iptr = (GLint *) list;
25562+ return (GLuint) *(iptr + n);
25563+ case GL_UNSIGNED_INT:
25564+ uiptr = (GLuint *) list;
25565+ return (GLuint) *(uiptr + n);
25566+ case GL_FLOAT:
25567+ fptr = (GLfloat *) list;
25568+ return (GLuint) *(fptr + n);
25569+ case GL_2_BYTES:
25570+ ubptr = ((GLubyte *) list) + 2 * n;
25571+ return (GLuint) *ubptr * 256 + (GLuint) *(ubptr + 1);
25572+ case GL_3_BYTES:
25573+ ubptr = ((GLubyte *) list) + 3 * n;
25574+ return (GLuint) *ubptr * 65536 + (GLuint) *(ubptr + 1) * 256 +
25575+ (GLuint) *(ubptr + 2);
25576+ case GL_4_BYTES:
25577+ ubptr = ((GLubyte *) list) + 4 * n;
25578+ return (GLuint) *ubptr * 16777216 + (GLuint) *(ubptr + 1) * 65536 +
25579+ (GLuint) *(ubptr + 2) * 256 + (GLuint) *(ubptr + 3);
25580+ default:
25581+ return 0;
25582+ }
25583+}
25584+
25585+void _create_context(ProcessStruct *process, GLXContext ctxt, int fake_ctxt,
25586+ GLXContext shareList, int fake_shareList)
25587+{
25588+ process->glstates =
25589+ realloc(process->glstates,
25590+ (process->nb_states + 1) * sizeof(GLState *));
25591+ process->glstates[process->nb_states] = malloc(sizeof(GLState));
25592+ memset(process->glstates[process->nb_states], 0, sizeof(GLState));
25593+ process->glstates[process->nb_states]->ref = 1;
25594+ process->glstates[process->nb_states]->context = ctxt;
25595+ process->glstates[process->nb_states]->fake_ctxt = fake_ctxt;
25596+ process->glstates[process->nb_states]->fake_shareList = fake_shareList;
25597+ init_gl_state(process->glstates[process->nb_states]);
25598+ if (shareList && fake_shareList) {
25599+ int i;
25600+
25601+ for (i = 0; i < process->nb_states; i++) {
25602+ if (process->glstates[i]->fake_ctxt == fake_shareList) {
25603+ process->glstates[i]->ref++;
25604+ process->glstates[process->nb_states]->textureAllocator =
25605+ process->glstates[i]->textureAllocator;
25606+ process->glstates[process->nb_states]->tabTextures =
25607+ process->glstates[i]->tabTextures;
25608+ process->glstates[process->nb_states]->bufferAllocator =
25609+ process->glstates[i]->bufferAllocator;
25610+ process->glstates[process->nb_states]->tabBuffers =
25611+ process->glstates[i]->tabBuffers;
25612+ process->glstates[process->nb_states]->listAllocator =
25613+ process->glstates[i]->listAllocator;
25614+ process->glstates[process->nb_states]->tabLists =
25615+ process->glstates[i]->tabLists;
25616+ break;
25617+ }
25618+ }
25619+ }
25620+ process->nb_states++;
25621+}
25622+
25623+static ProcessStruct *process;
25624+
25625+void do_disconnect_current(void)
25626+{
25627+ int i;
25628+ Display *dpy = process->dpy;
25629+
25630+ glXMakeCurrent(dpy, 0, NULL);
25631+
25632+ for (i = 0; i < MAX_ASSOC_SIZE &&
25633+ process->association_fakecontext_glxcontext[i].key; i ++) {
25634+ GLXContext ctxt = process->association_fakecontext_glxcontext[i].value;
25635+
25636+ fprintf(stderr, "Destroy context corresponding to fake_context"
25637+ " = %ld\n", (long) process->
25638+ association_fakecontext_glxcontext[i].key);
25639+ glXDestroyContext(dpy, ctxt);
25640+ }
25641+
25642+ GET_EXT_PTR(void, glXDestroyPbuffer, (Display *, GLXPbuffer));
25643+
25644+ for (i = 0; i < MAX_ASSOC_SIZE &&
25645+ process->association_fakepbuffer_pbuffer[i].key; i ++) {
25646+ GLXPbuffer pbuffer = (GLXPbuffer)
25647+ process->association_fakepbuffer_pbuffer[i].value;
25648+
25649+ fprintf(stderr, "Destroy pbuffer corresponding to fake_pbuffer"
25650+ " = %ld\n", (long) process->
25651+ association_fakepbuffer_pbuffer[i].key);
25652+ if (!is_gl_vendor_ati(dpy))
25653+ ptr_func_glXDestroyPbuffer(dpy, pbuffer);
25654+ }
25655+
25656+ for (i = 0; i < MAX_ASSOC_SIZE && process->
25657+ association_clientdrawable_serverdrawable[i].key; i ++) {
25658+ Window win = (Window) process->
25659+ association_clientdrawable_serverdrawable[i].value;
25660+
25661+ fprintf(stderr, "Destroy window %x corresponding to client_drawable "
25662+ "= %p\n", (int) win, process->
25663+ association_clientdrawable_serverdrawable[i].key);
25664+
25665+ XDestroyWindow(dpy, win);
25666+ if (active_win == win)
25667+ active_win = 0;
25668+
25669+ int loop = 1; // 1;
25670+ while (loop) {
25671+ while (XPending(dpy) > 0) {
25672+ XEvent event;
25673+
25674+ XNextEvent(dpy, &event);
25675+ switch (event.type) {
25676+ case DestroyNotify:
25677+ {
25678+ if (((XDestroyWindowEvent *) &event)->window == win)
25679+ loop = 0;
25680+ break;
25681+ }
25682+ }
25683+ }
25684+ break; /* TODO */
25685+ }
25686+ }
25687+
25688+ for (i = 0; i < process->nb_states; i++) {
25689+ destroy_gl_state(process->glstates[i]);
25690+ free(process->glstates[i]);
25691+ }
25692+ destroy_gl_state(&process->default_state);
25693+ free(process->glstates);
25694+
25695+ if (process->cmdbuf)
25696+ qemu_free(process->cmdbuf);
25697+
25698+ for (i = 0; &processes[i] != process; i ++);
25699+ memmove(&processes[i], &processes[i + 1],
25700+ (MAX_HANDLED_PROCESS - 1 - i) * sizeof(ProcessStruct));
25701+}
25702+
25703+static const int beginend_allowed[GL_N_CALLS] = {
25704+#undef MAGIC_MACRO
25705+#define MAGIC_MACRO(name) [name ## _func] = 1,
25706+#include "gl_beginend.h"
25707+};
25708+
25709+void do_context_switch(Display *dpy, pid_t pid, int call)
25710+{
25711+ int i;
25712+
25713+ for (i = 0; i < MAX_HANDLED_PROCESS; i ++)
25714+ if (processes[i].process_id == pid) {
25715+ process = &processes[i];
25716+ break;
25717+ } else if (processes[i].process_id == 0) {
25718+ process = &processes[i];
25719+ memset(process, 0, sizeof(ProcessStruct));
25720+ process->process_id = pid;
25721+ init_gl_state(&process->default_state);
25722+ process->current_state = &process->default_state;
25723+ process->dpy = dpy;
25724+ break;
25725+ }
25726+ if (process == NULL) {
25727+ fprintf(stderr, "Too many processes !\n");
25728+ exit(-1);
25729+ }
25730+
25731+ switch (call) {
25732+ case _init32_func:
25733+ case _init64_func:
25734+ case _exit_process_func:
25735+ case glXMakeCurrent_func:
25736+ /* Do nothing */
25737+ break;
25738+
25739+ default:
25740+#if 0
25741+ glFlush();
25742+ glFinish();
25743+ glXSwapBuffers(dpy, drawable);
25744+ if (process->current_state == &process->default_state)
25745+ /* Where do commands like glViewport go when no drawable or
25746+ * context are current - i.e. after a call to
25747+ * glXMakeCurrent(dpy, 0, 0) ? */;
25748+ else
25749+#endif
25750+ glXMakeCurrent(dpy, process->current_state->drawable,
25751+ process->current_state->context);
25752+ }
25753+}
25754+
25755+int do_function_call(int func_number, arg_t *args, char *ret_string)
25756+{
25757+ char ret_char = 0;
25758+ int ret_int = 0;
25759+ const char *ret_str = NULL;
25760+ Display *dpy = process->dpy;
25761+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
25762+ int ret_type = signature->ret_type;
25763+
25764+ if (parent_dpy)
25765+ dpy = parent_dpy;
25766+
25767+ process->instr_counter++;
25768+ if (display_function_call)
25769+ fprintf(stderr, "[%d]> %s\n", process->instr_counter,
25770+ tab_opengl_calls_name[func_number]);
25771+
25772+#ifdef BUFFER_BEGINEND
25773+ if (process->began) {
25774+ /* Need to check for any errors now because later we won't have
25775+ * a chance to report them. */
25776+ if (beginend_allowed[func_number]) {
25777+ arg_t *buf = cmd_buffer_alloc(process, signature->nb_args + 1);
25778+
25779+ /* TODO: pointer arguments */
25780+ buf[0] = func_number;
25781+ memcpy(buf + 1, args, signature->nb_args * sizeof(arg_t));
25782+ } else if (likely(func_number == glEnd_func)) {
25783+ process->began = 0;
25784+
25785+ glBegin(process->primitive);
25786+ cmd_buffer_replay(process);
25787+ glEnd();
25788+ } else {
25789+ /* TODO: properly report */
25790+#ifdef SYSTEMATIC_ERROR_CHECK
25791+ process->current_state->last_error = INVALID_OPERATION;
25792+#endif
25793+ }
25794+
25795+ func_number = -1;
25796+ }
25797+#endif
25798+
25799+ switch (func_number) {
25800+ case -1:
25801+ break;
25802+
25803+ case _init_func:
25804+ *(int *) args[1] = 1;
25805+ break;
25806+
25807+ case _synchronize_func:
25808+ ret_int = 1;
25809+ break;
25810+
25811+ case _exit_process_func:
25812+ do_disconnect_current();
25813+ break;
25814+
25815+ case _changeWindowState_func:
25816+ {
25817+ ClientGLXDrawable client_drawable = to_drawable(args[0]);
25818+
25819+ if (display_function_call)
25820+ fprintf(stderr, "client_drawable=%p\n",
25821+ (void *) client_drawable);
25822+
25823+ GLXDrawable drawable =
25824+ get_association_clientdrawable_serverdrawable(
25825+ process, client_drawable);
25826+ if (drawable) {
25827+ if (args[1] == IsViewable) {
25828+ WindowPosStruct pos;
25829+
25830+ _get_window_pos(dpy, drawable, &pos);
25831+ if (pos.map_state != args[1]) {
25832+ XMapWindow(dpy, drawable);
25833+
25834+ int loop = 1; // 1;
25835+
25836+ while (loop) {
25837+ while (XPending(dpy) > 0) {
25838+ XEvent event;
25839+
25840+ XNextEvent(dpy, &event);
25841+ switch (event.type) {
25842+ case ConfigureNotify:
25843+ {
25844+ if (((XConfigureEvent *) &event)->
25845+ window == drawable) {
25846+ loop = 0;
25847+ }
25848+ break;
25849+ }
25850+ }
25851+ }
25852+ break; /* TODO */
25853+ }
25854+ }
25855+ }
25856+ }
25857+
25858+ break;
25859+ }
25860+
25861+ case _moveResizeWindow_func:
25862+ {
25863+ int *params = (int *) args[1];
25864+ ClientGLXDrawable client_drawable = to_drawable(args[0]);
25865+
25866+ if (display_function_call)
25867+ fprintf(stderr, "client_drawable=%p\n",
25868+ (void *) client_drawable);
25869+
25870+ GLXDrawable drawable =
25871+ get_association_clientdrawable_serverdrawable(
25872+ process, client_drawable);
25873+ if (drawable) {
25874+ WindowPosStruct pos;
25875+
25876+ _get_window_pos(dpy, drawable, &pos);
25877+ if (!
25878+ (params[0] == pos.x && params[1] == pos.y &&
25879+ params[2] == pos.width && params[3] == pos.height)) {
25880+ int redim = !(params[2] == pos.width &&
25881+ params[3] == pos.height);
25882+ active_win_x = params[0];
25883+ active_win_y = params[1];
25884+
25885+ fprintf(stderr, "old x=%d y=%d width=%d height=%d\n",
25886+ pos.x, pos.y, pos.width, pos.height);
25887+ fprintf(stderr, "new x=%d y=%d width=%d height=%d\n",
25888+ params[0], params[1], params[2], params[3]);
25889+ XMoveResizeWindow(dpy, drawable, params[0], params[1],
25890+ params[2], params[3]);
25891+ int loop = 0; // = 1
25892+
25893+ while (loop) {
25894+ while (XPending(dpy) > 0) {
25895+ XEvent event;
25896+
25897+ XNextEvent(dpy, &event);
25898+ switch (event.type) {
25899+ case ConfigureNotify:
25900+ {
25901+ if (((XConfigureEvent *) &event)->
25902+ window == drawable) {
25903+ loop = 0;
25904+ }
25905+ break;
25906+ }
25907+ }
25908+ }
25909+ }
25910+ /* The window should have resized by now, but force the
25911+ * new size anyway. */
25912+ _get_window_pos(dpy, drawable, &pos);
25913+ pos.width = params[2];
25914+ pos.height = params[3];
25915+ process->currentDrawablePos = pos;
25916+ // if (getenv("FORCE_GL_VIEWPORT"))
25917+ if (redim)
25918+ glViewport(0, 0, pos.width, pos.height);
25919+ }
25920+ }
25921+ break;
25922+ }
25923+
25924+ case _send_cursor_func:
25925+ {
25926+#if 0
25927+ int x = args[0];
25928+ int y = args[1];
25929+ int width = args[2];
25930+ int height = args[3];
25931+ int xhot = args[4];
25932+ int yhot = args[5];
25933+ int *pixels = (int *) args[6];
25934+
25935+ client_cursor.x = x;
25936+ client_cursor.y = y;
25937+ client_cursor.width = width;
25938+ client_cursor.height = height;
25939+ client_cursor.xhot = xhot;
25940+ client_cursor.yhot = yhot;
25941+ if (pixels) {
25942+ client_cursor.pixels =
25943+ realloc(client_cursor.pixels,
25944+ client_cursor.width * client_cursor.height *
25945+ sizeof(int));
25946+ memcpy(client_cursor.pixels, pixels,
25947+ client_cursor.width * client_cursor.height *
25948+ sizeof(int));
25949+ }
25950+ int in_window = (x >= 0 && y >= 0 &&
25951+ x < process->currentDrawablePos.width &&
25952+ y < process->currentDrawablePos.height);
25953+ // fprintf(stderr, "cursor at %d %d (%s)\n", x, y, (in_window) ?
25954+ // "in window" : "not in window");
25955+#endif
25956+ break;
25957+ }
25958+
25959+#ifdef BUFFER_BEGINEND
25960+ case glBegin_func:
25961+ process->began = 1;
25962+ process->primitive = args[0];
25963+ break;
25964+#endif
25965+
25966+ case glXWaitGL_func:
25967+ {
25968+ glXWaitGL();
25969+ ret_int = 0;
25970+ break;
25971+ }
25972+
25973+ case glXWaitX_func:
25974+ {
25975+ glXWaitX();
25976+ ret_int = 0;
25977+ break;
25978+ }
25979+
25980+ case glXChooseVisual_func:
25981+ {
25982+ ret_int = glXChooseVisualFunc(dpy, (int *) args[2]);
25983+ break;
25984+ }
25985+
25986+ case glXQueryExtensionsString_func:
25987+ {
25988+ ret_str = glXQueryExtensionsString(dpy, 0);
25989+ break;
25990+ }
25991+
25992+ case glXQueryServerString_func:
25993+ {
25994+ ret_str = glXQueryServerString(dpy, 0, args[2]);
25995+ break;
25996+ }
25997+
25998+ case glXGetClientString_func:
25999+ {
26000+ ret_str = glXGetClientString(dpy, args[1]);
26001+ break;
26002+ }
26003+
26004+ case glXGetScreenDriver_func:
26005+ {
26006+ GET_EXT_PTR(const char *, glXGetScreenDriver, (Display *, int));
26007+
26008+ ret_str = ptr_func_glXGetScreenDriver(dpy, 0);
26009+ break;
26010+ }
26011+
26012+ case glXGetDriverConfig_func:
26013+ {
26014+ GET_EXT_PTR(const char *, glXGetDriverConfig, (const char *));
26015+
26016+ ret_str = ptr_func_glXGetDriverConfig((const char *) args[0]);
26017+ break;
26018+ }
26019+
26020+ case glXCreateContext_func:
26021+ {
26022+ int visualid = (int) args[1];
26023+ int fake_shareList = (int) args[2];
26024+
26025+ if (1 || display_function_call)
26026+ fprintf(stderr, "visualid=%d, fake_shareList=%d\n", visualid,
26027+ fake_shareList);
26028+
26029+ GLXContext shareList = get_association_fakecontext_glxcontext(
26030+ process, fake_shareList);
26031+ XVisualInfo *vis = get_visual_info_from_visual_id(dpy, visualid);
26032+ GLXContext ctxt;
26033+
26034+ if (vis) {
26035+ ctxt = glXCreateContext(dpy, vis, shareList, args[3]);
26036+ } else {
26037+ vis = get_default_visual(dpy);
26038+ int saved_visualid = vis->visualid;
26039+
26040+ vis->visualid = visualid ?: saved_visualid;
26041+ ctxt = glXCreateContext(dpy, vis, shareList, args[3]);
26042+ vis->visualid = saved_visualid;
26043+ }
26044+
26045+ if (ctxt) {
26046+ int fake_ctxt =++ process->next_available_context_number;
26047+
26048+ set_association_fakecontext_visual(process, fake_ctxt, vis);
26049+ set_association_fakecontext_glxcontext(process,
26050+ fake_ctxt, ctxt);
26051+ ret_int = fake_ctxt;
26052+
26053+ _create_context(process, ctxt, fake_ctxt, shareList,
26054+ fake_shareList);
26055+ } else {
26056+ ret_int = 0;
26057+ }
26058+
26059+ break;
26060+ }
26061+
26062+
26063+ case glXCreateNewContext_func:
26064+ {
26065+ GET_EXT_PTR(GLXContext, glXCreateNewContext,
26066+ (Display *, GLXFBConfig, int, GLXContext, int));
26067+ int client_fbconfig = args[1];
26068+
26069+ ret_int = 0;
26070+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26071+
26072+ if (fbconfig) {
26073+ int fake_shareList = args[3];
26074+ GLXContext shareList = get_association_fakecontext_glxcontext(
26075+ process, fake_shareList);
26076+ process->next_available_context_number++;
26077+ int fake_ctxt = process->next_available_context_number;
26078+ GLXContext ctxt = ptr_func_glXCreateNewContext(
26079+ dpy, fbconfig, args[2], shareList, args[4]);
26080+ set_association_fakecontext_glxcontext(
26081+ process, fake_ctxt, ctxt);
26082+ ret_int = fake_ctxt;
26083+
26084+ _create_context(process, ctxt, fake_ctxt, shareList,
26085+ fake_shareList);
26086+ }
26087+ break;
26088+ }
26089+
26090+ case glXCopyContext_func:
26091+ {
26092+ int fake_src_ctxt = (int) args[1];
26093+ int fake_dst_ctxt = (int) args[2];
26094+ GLXContext src_ctxt;
26095+ GLXContext dst_ctxt;
26096+
26097+ if (display_function_call)
26098+ fprintf(stderr, "fake_src_ctxt=%i, fake_dst_ctxt=%i\n",
26099+ fake_src_ctxt, fake_dst_ctxt);
26100+
26101+ if (!(src_ctxt = get_association_fakecontext_glxcontext(
26102+ process, fake_src_ctxt)))
26103+ fprintf(stderr, "invalid fake_src_ctxt (%i) !\n",
26104+ fake_src_ctxt);
26105+ else
26106+ if (!(dst_ctxt = get_association_fakecontext_glxcontext(
26107+ process, fake_dst_ctxt))) {
26108+ fprintf(stderr, "invalid fake_dst_ctxt (%i) !\n",
26109+ fake_dst_ctxt);
26110+ } else
26111+ glXCopyContext(dpy, src_ctxt, dst_ctxt, args[3]);
26112+
26113+ break;
26114+ }
26115+
26116+ case glXDestroyContext_func:
26117+ {
26118+ int fake_ctxt = (int) args[1];
26119+
26120+ if (display_function_call)
26121+ fprintf(stderr, "fake_ctxt=%d\n", fake_ctxt);
26122+
26123+ GLXContext ctxt = get_association_fakecontext_glxcontext(
26124+ process, fake_ctxt);
26125+ if (ctxt == NULL) {
26126+ fprintf(stderr, "invalid fake_ctxt (%p) !\n",
26127+ (void *) (long) fake_ctxt);
26128+ } else {
26129+ int i;
26130+
26131+ for (i = 0; i < process->nb_states; i ++) {
26132+ if (process->glstates[i]->fake_ctxt == fake_ctxt) {
26133+ if (ctxt == process->current_state->context)
26134+ process->current_state = &process->default_state;
26135+
26136+ int fake_shareList =
26137+ process->glstates[i]->fake_shareList;
26138+ process->glstates[i]->ref--;
26139+ if (process->glstates[i]->ref == 0) {
26140+ fprintf(stderr,
26141+ "destroy_gl_state fake_ctxt = %d\n",
26142+ process->glstates[i]->fake_ctxt);
26143+ destroy_gl_state(process->glstates[i]);
26144+ free(process->glstates[i]);
26145+ memmove(&process->glstates[i],
26146+ &process->glstates[i + 1],
26147+ (process->nb_states - i - 1) *
26148+ sizeof(GLState *));
26149+ process->nb_states --;
26150+ }
26151+
26152+ if (fake_shareList) {
26153+ for (i = 0; i < process->nb_states; i++) {
26154+ if (process->glstates[i]->fake_ctxt ==
26155+ fake_shareList) {
26156+ process->glstates[i]->ref--;
26157+ if (process->glstates[i]->ref == 0) {
26158+ fprintf(stderr,
26159+ "destroy_gl_state fake_ctxt = %d\n",
26160+ process->glstates[i]->
26161+ fake_ctxt);
26162+ destroy_gl_state(process->
26163+ glstates[i]);
26164+ free(process->glstates[i]);
26165+ memmove(&process->glstates[i],
26166+ &process->glstates[i + 1],
26167+ (process->nb_states - i - 1) *
26168+ sizeof(GLState *));
26169+ process->nb_states --;
26170+ }
26171+ break;
26172+ }
26173+ }
26174+ }
26175+
26176+ glXDestroyContext(dpy, ctxt);
26177+ unset_association_fakecontext_glxcontext(
26178+ process, fake_ctxt);
26179+
26180+ break;
26181+ }
26182+ }
26183+ }
26184+ break;
26185+ }
26186+
26187+ case glXQueryVersion_func:
26188+ {
26189+ ret_int = glXQueryVersion(dpy, (int *) args[1], (int *) args[2]);
26190+ break;
26191+ }
26192+
26193+ case glGetString_func:
26194+ {
26195+ ret_str = (char *) glGetString(args[0]);
26196+ break;
26197+ }
26198+
26199+ case glXMakeCurrent_func:
26200+ {
26201+ int i;
26202+ ClientGLXDrawable client_drawable = to_drawable(args[1]);
26203+ GLXDrawable drawable = 0;
26204+ int fake_ctxt = (int) args[2];
26205+
26206+ if (display_function_call)
26207+ fprintf(stderr, "client_drawable=%p fake_ctx=%d\n",
26208+ (void *) client_drawable, fake_ctxt);
26209+
26210+ if (client_drawable == 0 && fake_ctxt == 0) {
26211+ ret_int = glXMakeCurrent(dpy, 0, NULL);
26212+ process->current_state = &process->default_state;
26213+ } else if ((drawable = (GLXDrawable)
26214+ get_association_fakepbuffer_pbuffer(
26215+ process, client_drawable))) {
26216+ GLXContext ctxt = get_association_fakecontext_glxcontext(
26217+ process, fake_ctxt);
26218+ if (ctxt == NULL) {
26219+ fprintf(stderr, "invalid fake_ctxt (%d) (*)!\n",
26220+ fake_ctxt);
26221+ ret_int = 0;
26222+ } else
26223+ ret_int = glXMakeCurrent(dpy, drawable, ctxt);
26224+ } else {
26225+ GLXContext ctxt = get_association_fakecontext_glxcontext(
26226+ process, fake_ctxt);
26227+ if (ctxt == NULL) {
26228+ fprintf(stderr, "invalid fake_ctxt (%d)!\n", fake_ctxt);
26229+ ret_int = 0;
26230+ } else {
26231+ drawable = get_association_clientdrawable_serverdrawable(
26232+ process, client_drawable);
26233+ if (drawable == 0) {
26234+ XVisualInfo *vis = get_association_fakecontext_visual(
26235+ process, fake_ctxt);
26236+ if (vis == NULL)
26237+ vis = get_default_visual(dpy);
26238+ /* if (local_connection) drawable = client_drawable;
26239+ * else */
26240+ {
26241+ if ((int) (long) client_drawable ==
26242+ RootWindow(dpy, 0) &&
26243+ local_connection) {
26244+ drawable = (GLXDrawable) client_drawable;
26245+ } else {
26246+ drawable = create_window(
26247+ dpy, local_connection ?
26248+ (Window) client_drawable :
26249+ 0, vis, "", 0, 0, 16, 16);
26250+ }
26251+ }
26252+ set_association_clientdrawable_serverdrawable(process,
26253+ client_drawable, drawable);
26254+ }
26255+
26256+ ret_int = glXMakeCurrent(dpy, drawable, ctxt);
26257+ }
26258+ }
26259+
26260+ if (ret_int) {
26261+ for (i = 0; i < process->nb_states; i ++) {
26262+ if (process->glstates[i]->fake_ctxt == fake_ctxt) {
26263+ /* HACK !!! REMOVE */
26264+ process->current_state = process->glstates[i];
26265+ process->current_state->drawable = drawable;
26266+ break;
26267+ }
26268+ }
26269+
26270+ if (i == process->nb_states) {
26271+ fprintf(stderr, "error remembering the new context\n");
26272+ exit(-1);
26273+ }
26274+ }
26275+ break;
26276+ }
26277+
26278+ case glXSwapBuffers_func:
26279+ {
26280+ ClientGLXDrawable client_drawable = to_drawable(args[1]);
26281+
26282+ if (display_function_call)
26283+ fprintf(stderr, "client_drawable=%p\n", client_drawable);
26284+
26285+ GLXDrawable drawable =
26286+ get_association_clientdrawable_serverdrawable(
26287+ process, client_drawable);
26288+ if (!drawable) {
26289+ fprintf(stderr, "unknown client_drawable (%p) !\n",
26290+ (void *) client_drawable);
26291+ } else {
26292+#ifdef CURSOR_TRICK
26293+ if (client_cursor.pixels && local_connection == 0) {
26294+ glPushAttrib(GL_ALL_ATTRIB_BITS);
26295+ glPushClientAttrib(GL_ALL_ATTRIB_BITS);
26296+
26297+ glMatrixMode(GL_PROJECTION);
26298+ glPushMatrix();
26299+ glLoadIdentity();
26300+ glOrtho(0, process->currentDrawablePos.width,
26301+ process->currentDrawablePos.height, 0, -1, 1);
26302+ glMatrixMode(GL_MODELVIEW);
26303+ glPushMatrix();
26304+ glLoadIdentity();
26305+ glPixelZoom(1, -1);
26306+
26307+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
26308+ glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
26309+ glPixelStorei(GL_UNPACK_SWAP_BYTES, 0);
26310+ glPixelStorei(GL_UNPACK_LSB_FIRST, 0);
26311+ glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
26312+ glShadeModel(GL_SMOOTH);
26313+
26314+ glEnable(GL_BLEND);
26315+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
26316+ glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
26317+
26318+ int i, numUnits;
26319+
26320+ glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &numUnits);
26321+ for (i = 0; i < numUnits; i++) {
26322+ do_glActiveTextureARB(GL_TEXTURE0_ARB + i);
26323+ glDisable(GL_TEXTURE_1D);
26324+ glDisable(GL_TEXTURE_2D);
26325+ glDisable(GL_TEXTURE_3D);
26326+ }
26327+ glDisable(GL_ALPHA_TEST);
26328+ glDisable(GL_DEPTH_TEST);
26329+ glDisable(GL_STENCIL_TEST);
26330+ glDisable(GL_SCISSOR_TEST);
26331+ glDisable(GL_FRAGMENT_PROGRAM_ARB);
26332+ glDisable(GL_VERTEX_PROGRAM_ARB);
26333+ do_glUseProgramObjectARB(0);
26334+
26335+ // memset(client_cursor.pixels, 255, client_cursor.width
26336+ // * client_cursor.height * sizeof(int));
26337+
26338+ glRasterPos2d(client_cursor.x - client_cursor.xhot,
26339+ client_cursor.y - client_cursor.yhot);
26340+ glDrawPixels(client_cursor.width, client_cursor.height,
26341+ GL_BGRA, GL_UNSIGNED_BYTE,
26342+ client_cursor.pixels);
26343+
26344+ glMatrixMode(GL_MODELVIEW);
26345+ glPopMatrix();
26346+
26347+ glMatrixMode(GL_PROJECTION);
26348+ glPopMatrix();
26349+
26350+ glPopClientAttrib();
26351+ glPopAttrib();
26352+ }
26353+#endif
26354+
26355+ ////////// HORRIBLE HORRIBLE HACK
26356+ if (drawable != active_win && active_win) {
26357+ glXMakeCurrent(dpy, active_win,
26358+ processes[0].current_state->context);
26359+ glXSwapBuffers(dpy, active_win);
26360+ glXMakeCurrent(dpy, process->current_state->drawable,
26361+ process->current_state->context);
26362+ }
26363+ glXSwapBuffers(dpy, drawable);
26364+ }
26365+ break;
26366+ }
26367+
26368+ case glXIsDirect_func:
26369+ {
26370+ int fake_ctxt = (int) args[1];
26371+
26372+ if (display_function_call)
26373+ fprintf(stderr, "fake_ctx=%x\n", fake_ctxt);
26374+ GLXContext ctxt =
26375+ get_association_fakecontext_glxcontext(process, fake_ctxt);
26376+ if (ctxt == NULL) {
26377+ fprintf(stderr, "invalid fake_ctxt (%x) !\n", fake_ctxt);
26378+ ret_char = False;
26379+ } else {
26380+ ret_char = glXIsDirect(dpy, ctxt);
26381+ }
26382+ break;
26383+ }
26384+
26385+ case glXGetConfig_func:
26386+ {
26387+ int visualid = args[1];
26388+ XVisualInfo *vis = NULL;
26389+
26390+ if (visualid)
26391+ vis = get_visual_info_from_visual_id(dpy, visualid);
26392+ if (vis == NULL)
26393+ vis = get_default_visual(dpy);
26394+ ret_int = glXGetConfig(dpy, vis, args[2], (int *) args[3]);
26395+ break;
26396+ }
26397+
26398+ case glXGetConfig_extended_func:
26399+ {
26400+ int visualid = args[1];
26401+ int n = args[2];
26402+ int i;
26403+ XVisualInfo *vis = NULL;
26404+ int *attribs = (int *) args[3];
26405+ int *values = (int *) args[4];
26406+ int *res = (int *) args[5];
26407+
26408+ if (visualid)
26409+ vis = get_visual_info_from_visual_id(dpy, visualid);
26410+ if (vis == NULL)
26411+ vis = get_default_visual(dpy);
26412+
26413+ for (i = 0; i < n; i++) {
26414+ res[i] = glXGetConfig(dpy, vis, attribs[i], &values[i]);
26415+ }
26416+ break;
26417+ }
26418+
26419+ case glXUseXFont_func:
26420+ {
26421+ /* implementation is client-side only :-) */
26422+ break;
26423+ }
26424+
26425+ case glXQueryExtension_func:
26426+ {
26427+ ret_int =
26428+ glXQueryExtension(dpy, (int *) args[1], (int *) args[2]);
26429+ break;
26430+ }
26431+
26432+ case glXChooseFBConfig_func:
26433+ {
26434+ GET_EXT_PTR(GLXFBConfig *, glXChooseFBConfig,
26435+ (Display *, int, int *, int *));
26436+ if (process->nfbconfig == MAX_FBCONFIG) {
26437+ *(int *) args[3] = 0;
26438+ ret_int = 0;
26439+ } else {
26440+ GLXFBConfig *fbconfigs =
26441+ ptr_func_glXChooseFBConfig(dpy, args[1], (int *) args[2],
26442+ (int *) args[3]);
26443+ if (fbconfigs) {
26444+ process->fbconfigs[process->nfbconfig] = fbconfigs;
26445+ process->fbconfigs_max[process->nfbconfig] =
26446+ *(int *) args[3];
26447+ process->nfbconfig++;
26448+ ret_int = 1 + process->nfbconfig_total;
26449+ process->nfbconfig_total +=
26450+ process->fbconfigs_max[process->nfbconfig];
26451+ } else {
26452+ ret_int = 0;
26453+ }
26454+ }
26455+ break;
26456+ }
26457+
26458+ case glXChooseFBConfigSGIX_func:
26459+ {
26460+ GET_EXT_PTR(GLXFBConfigSGIX *, glXChooseFBConfigSGIX,
26461+ (Display *, int, int *, int *));
26462+ if (process->nfbconfig == MAX_FBCONFIG) {
26463+ *(int *) args[3] = 0;
26464+ ret_int = 0;
26465+ } else {
26466+ GLXFBConfigSGIX *fbconfigs =
26467+ ptr_func_glXChooseFBConfigSGIX(dpy, args[1],
26468+ (int *) args[2],
26469+ (int *) args[3]);
26470+ if (fbconfigs) {
26471+ process->fbconfigs[process->nfbconfig] = fbconfigs;
26472+ process->fbconfigs_max[process->nfbconfig] =
26473+ *(int *) args[3];
26474+ process->nfbconfig++;
26475+ ret_int = 1 + process->nfbconfig_total;
26476+ process->nfbconfig_total +=
26477+ process->fbconfigs_max[process->nfbconfig];
26478+ } else {
26479+ ret_int = 0;
26480+ }
26481+ }
26482+ break;
26483+ }
26484+
26485+ case glXGetFBConfigs_func:
26486+ {
26487+ GET_EXT_PTR(GLXFBConfig *, glXGetFBConfigs,
26488+ (Display *, int, int *));
26489+ if (process->nfbconfig == MAX_FBCONFIG) {
26490+ *(int *) args[2] = 0;
26491+ ret_int = 0;
26492+ } else {
26493+ GLXFBConfig *fbconfigs =
26494+ ptr_func_glXGetFBConfigs(dpy, args[1], (int *) args[2]);
26495+ if (fbconfigs) {
26496+ process->fbconfigs[process->nfbconfig] = fbconfigs;
26497+ process->fbconfigs_max[process->nfbconfig] =
26498+ *(int *) args[2];
26499+ process->nfbconfig++;
26500+ ret_int = 1 + process->nfbconfig_total;
26501+ process->nfbconfig_total +=
26502+ process->fbconfigs_max[process->nfbconfig];
26503+ } else {
26504+ ret_int = 0;
26505+ }
26506+ }
26507+ break;
26508+ }
26509+
26510+ case glXCreatePbuffer_func:
26511+ {
26512+ GET_EXT_PTR(GLXPbuffer, glXCreatePbuffer,
26513+ (Display *, GLXFBConfig, int *));
26514+ int client_fbconfig = args[1];
26515+
26516+ ret_int = 0;
26517+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26518+
26519+ if (fbconfig) {
26520+ GLXPbuffer pbuffer =
26521+ ptr_func_glXCreatePbuffer(dpy, fbconfig, (int *) args[2]);
26522+ fprintf(stderr, "glXCreatePbuffer --> %x\n", (int) pbuffer);
26523+ if (pbuffer) {
26524+ ClientGLXDrawable fake_pbuffer = to_drawable(
26525+ ++ process->next_available_pbuffer_number);
26526+
26527+ set_association_fakepbuffer_pbuffer(
26528+ process, fake_pbuffer, pbuffer);
26529+ fprintf(stderr,
26530+ "set_association_fakepbuffer_pbuffer(%p, %x)\n",
26531+ fake_pbuffer, (int) (long) pbuffer);
26532+ ret_int = (int) (long) fake_pbuffer;
26533+ }
26534+ }
26535+ break;
26536+ }
26537+
26538+ case glXCreateGLXPbufferSGIX_func:
26539+ {
26540+ GET_EXT_PTR(GLXPbufferSGIX, glXCreateGLXPbufferSGIX,
26541+ (Display *, GLXFBConfig, int, int, int *));
26542+ int client_fbconfig = args[1];
26543+
26544+ ret_int = 0;
26545+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26546+
26547+ if (fbconfig) {
26548+ GLXPbufferSGIX pbuffer = ptr_func_glXCreateGLXPbufferSGIX(
26549+ dpy, fbconfig,
26550+ args[2], args[3], (int *) args[4]);
26551+ if (pbuffer) {
26552+ ClientGLXDrawable fake_pbuffer = to_drawable(
26553+ ++ process->next_available_pbuffer_number);
26554+
26555+ set_association_fakepbuffer_pbuffer(
26556+ process, fake_pbuffer, pbuffer);
26557+ ret_int = (int) (long) fake_pbuffer;
26558+ }
26559+ }
26560+ break;
26561+ }
26562+
26563+ case glXDestroyPbuffer_func:
26564+ {
26565+ GET_EXT_PTR(void, glXDestroyPbuffer, (Display *, GLXPbuffer));
26566+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26567+
26568+ if (display_function_call)
26569+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26570+
26571+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26572+ process, fake_pbuffer);
26573+ if (pbuffer == 0) {
26574+ fprintf(stderr, "invalid fake_pbuffer (%p) !\n",
26575+ fake_pbuffer);
26576+ } else {
26577+ if (!is_gl_vendor_ati(dpy))
26578+ ptr_func_glXDestroyPbuffer(dpy, pbuffer);
26579+ unset_association_fakepbuffer_pbuffer(process, fake_pbuffer);
26580+ }
26581+ break;
26582+ }
26583+
26584+ case glXDestroyGLXPbufferSGIX_func:
26585+ {
26586+ GET_EXT_PTR(void, glXDestroyGLXPbufferSGIX,
26587+ (Display *, GLXPbuffer));
26588+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26589+
26590+ if (display_function_call)
26591+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26592+
26593+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26594+ process, fake_pbuffer);
26595+ if (pbuffer == 0) {
26596+ fprintf(stderr, "invalid fake_pbuffer (%p) !\n",
26597+ fake_pbuffer);
26598+ } else {
26599+ if (!is_gl_vendor_ati(dpy))
26600+ ptr_func_glXDestroyGLXPbufferSGIX(dpy, pbuffer);
26601+ unset_association_fakepbuffer_pbuffer(process, fake_pbuffer);
26602+ }
26603+ break;
26604+ }
26605+
26606+ case glXBindTexImageATI_func:
26607+ {
26608+ GET_EXT_PTR(void, glXBindTexImageATI,
26609+ (Display *, GLXPbuffer, int));
26610+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26611+
26612+ if (display_function_call)
26613+ fprintf(stderr, "fake_pbuffer=%p\n",
26614+ fake_pbuffer);
26615+
26616+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26617+ process, fake_pbuffer);
26618+ if (pbuffer == 0) {
26619+ fprintf(stderr,
26620+ "glXBindTexImageATI : invalid fake_pbuffer (%p) !\n",
26621+ fake_pbuffer);
26622+ } else {
26623+ ptr_func_glXBindTexImageATI(dpy, pbuffer, args[2]);
26624+ }
26625+ break;
26626+ }
26627+
26628+ case glXReleaseTexImageATI_func:
26629+ {
26630+ GET_EXT_PTR(void, glXReleaseTexImageATI,
26631+ (Display *, GLXPbuffer, int));
26632+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26633+
26634+ if (display_function_call)
26635+ fprintf(stderr, "fake_pbuffer=%d\n",
26636+ (int) (long) fake_pbuffer);
26637+
26638+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26639+ process, fake_pbuffer);
26640+ if (pbuffer == 0) {
26641+ fprintf(stderr,
26642+ "glXReleaseTexImageATI : invalid fake_pbuffer (%d) !\n",
26643+ (int) (long) fake_pbuffer);
26644+ } else {
26645+ ptr_func_glXReleaseTexImageATI(dpy, pbuffer, args[2]);
26646+ }
26647+ break;
26648+ }
26649+
26650+ case glXBindTexImageARB_func:
26651+ {
26652+ GET_EXT_PTR(Bool, glXBindTexImageARB,
26653+ (Display *, GLXPbuffer, int));
26654+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26655+
26656+ if (display_function_call)
26657+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26658+
26659+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26660+ process, fake_pbuffer);
26661+ if (pbuffer == 0) {
26662+ fprintf(stderr,
26663+ "glXBindTexImageARB : invalid fake_pbuffer (%p) !\n",
26664+ fake_pbuffer);
26665+ ret_int = 0;
26666+ } else {
26667+ ret_int = ptr_func_glXBindTexImageARB(dpy, pbuffer, args[2]);
26668+ }
26669+ break;
26670+ }
26671+
26672+ case glXReleaseTexImageARB_func:
26673+ {
26674+ GET_EXT_PTR(Bool, glXReleaseTexImageARB,
26675+ (Display *, GLXPbuffer, int));
26676+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26677+
26678+ if (display_function_call)
26679+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26680+
26681+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26682+ process, fake_pbuffer);
26683+ if (pbuffer == 0) {
26684+ fprintf(stderr,
26685+ "glXReleaseTexImageARB : invalid fake_pbuffer (%p) !\n",
26686+ fake_pbuffer);
26687+ ret_int = 0;
26688+ } else {
26689+ ret_int =
26690+ ptr_func_glXReleaseTexImageARB(dpy, pbuffer, args[2]);
26691+ }
26692+ break;
26693+ }
26694+
26695+ case glXGetFBConfigAttrib_func:
26696+ {
26697+ GET_EXT_PTR(int, glXGetFBConfigAttrib,
26698+ (Display *, GLXFBConfig, int, int *));
26699+ int client_fbconfig = args[1];
26700+
26701+ ret_int = 0;
26702+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26703+
26704+ if (fbconfig)
26705+ ret_int =
26706+ ptr_func_glXGetFBConfigAttrib(dpy, fbconfig, args[2],
26707+ (int *) args[3]);
26708+ break;
26709+ }
26710+
26711+ case glXGetFBConfigAttrib_extended_func:
26712+ {
26713+ GET_EXT_PTR(int, glXGetFBConfigAttrib,
26714+ (Display *, GLXFBConfig, int, int *));
26715+ int client_fbconfig = args[1];
26716+ int n = args[2];
26717+ int i;
26718+ int *attribs = (int *) args[3];
26719+ int *values = (int *) args[4];
26720+ int *res = (int *) args[5];
26721+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26722+
26723+ for (i = 0; i < n; i++) {
26724+ if (fbconfig) {
26725+ res[i] =
26726+ ptr_func_glXGetFBConfigAttrib(dpy, fbconfig,
26727+ attribs[i], &values[i]);
26728+ } else {
26729+ res[i] = 0;
26730+ }
26731+ }
26732+ break;
26733+ }
26734+
26735+ case glXGetFBConfigAttribSGIX_func:
26736+ {
26737+ GET_EXT_PTR(int, glXGetFBConfigAttribSGIX,
26738+ (Display *, GLXFBConfigSGIX, int, int *));
26739+ int client_fbconfig = args[1];
26740+
26741+ ret_int = 0;
26742+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26743+
26744+ if (fbconfig)
26745+ ret_int =
26746+ ptr_func_glXGetFBConfigAttribSGIX(dpy,
26747+ (GLXFBConfigSGIX)
26748+ fbconfig, args[2],
26749+ (int *) args[3]);
26750+ break;
26751+ }
26752+
26753+ case glXQueryContext_func:
26754+ {
26755+ GET_EXT_PTR(int, glXQueryContext,
26756+ (Display *, GLXContext, int, int *));
26757+ int fake_ctxt = (int) args[1];
26758+
26759+ if (display_function_call)
26760+ fprintf(stderr, "fake_ctx=%i\n", fake_ctxt);
26761+ GLXContext ctxt =
26762+ get_association_fakecontext_glxcontext(process, fake_ctxt);
26763+ if (ctxt == NULL) {
26764+ fprintf(stderr, "invalid fake_ctxt (%i) !\n", fake_ctxt);
26765+ ret_int = 0;
26766+ } else {
26767+ ret_int =
26768+ ptr_func_glXQueryContext(dpy, ctxt, args[2],
26769+ (int *) args[3]);
26770+ }
26771+ break;
26772+ }
26773+
26774+ case glXQueryDrawable_func:
26775+ {
26776+ GET_EXT_PTR(void, glXQueryDrawable,
26777+ (Display *, GLXDrawable, int, int *));
26778+ ClientGLXDrawable client_drawable = to_drawable(args[1]);
26779+ GLXDrawable drawable =
26780+ get_association_clientdrawable_serverdrawable(
26781+ process, client_drawable);
26782+
26783+ if (display_function_call)
26784+ fprintf(stderr, "client_drawable=%p\n",
26785+ client_drawable);
26786+
26787+ if (!drawable)
26788+ fprintf(stderr, "invalid client_drawable (%p) !\n",
26789+ client_drawable);
26790+ else
26791+ ptr_func_glXQueryDrawable(dpy, drawable,
26792+ args[2], (int *) args[3]);
26793+
26794+ break;
26795+ }
26796+
26797+ case glXQueryGLXPbufferSGIX_func:
26798+ {
26799+ GET_EXT_PTR(int, glXQueryGLXPbufferSGIX,
26800+ (Display *, GLXFBConfigSGIX, int, int *));
26801+ int client_fbconfig = args[1];
26802+
26803+ ret_int = 0;
26804+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26805+
26806+ if (fbconfig)
26807+ ret_int = ptr_func_glXQueryGLXPbufferSGIX(dpy,
26808+ (GLXFBConfigSGIX) fbconfig,
26809+ args[2], (int *) args[3]);
26810+ break;
26811+ }
26812+
26813+ case glXCreateContextWithConfigSGIX_func:
26814+ {
26815+ GET_EXT_PTR(GLXContext, glXCreateContextWithConfigSGIX,
26816+ (Display *, GLXFBConfigSGIX, int, GLXContext, int));
26817+ int client_fbconfig = args[1];
26818+
26819+ ret_int = 0;
26820+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26821+
26822+ if (fbconfig) {
26823+ GLXContext shareList = get_association_fakecontext_glxcontext(
26824+ process, (int) args[3]);
26825+ process->next_available_context_number++;
26826+ int fake_ctxt = process->next_available_context_number;
26827+ GLXContext ctxt = ptr_func_glXCreateContextWithConfigSGIX(
26828+ dpy, (GLXFBConfigSGIX) fbconfig, args[2],
26829+ shareList, args[4]);
26830+ set_association_fakecontext_glxcontext(
26831+ process, fake_ctxt, ctxt);
26832+ ret_int = fake_ctxt;
26833+ }
26834+ break;
26835+ }
26836+
26837+ case glXGetVisualFromFBConfig_func:
26838+ {
26839+ GET_EXT_PTR(XVisualInfo *, glXGetVisualFromFBConfig,
26840+ (Display *, GLXFBConfig));
26841+ int client_fbconfig = args[1];
26842+
26843+ ret_int = 0;
26844+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26845+
26846+ if (fbconfig) {
26847+ XVisualInfo *vis =
26848+ ptr_func_glXGetVisualFromFBConfig(dpy, fbconfig);
26849+ ret_int = (vis) ? vis->visualid : 0;
26850+ if (vis) {
26851+ tabAssocAttribListVisual =
26852+ realloc(tabAssocAttribListVisual,
26853+ sizeof(AssocAttribListVisual) *
26854+ (nTabAssocAttribListVisual + 1));
26855+ tabAssocAttribListVisual[nTabAssocAttribListVisual].
26856+ attribListLength = 0;
26857+ tabAssocAttribListVisual[nTabAssocAttribListVisual].
26858+ attribList = NULL;
26859+ tabAssocAttribListVisual[nTabAssocAttribListVisual].
26860+ visInfo = vis;
26861+ nTabAssocAttribListVisual++;
26862+ }
26863+ if (display_function_call)
26864+ fprintf(stderr, "visualid = %d\n", ret_int);
26865+ }
26866+ break;
26867+ }
26868+
26869+ case glXSwapIntervalSGI_func:
26870+ {
26871+ GET_EXT_PTR(int, glXSwapIntervalSGI, (int));
26872+
26873+ ret_int = ptr_func_glXSwapIntervalSGI(args[0]);
26874+ break;
26875+ }
26876+
26877+ case glXGetProcAddress_fake_func:
26878+ {
26879+ if (display_function_call)
26880+ fprintf(stderr, "%s\n", (char *) args[0]);
26881+ ret_int = glXGetProcAddressARB((const GLubyte *) args[0]) != NULL;
26882+ break;
26883+ }
26884+
26885+ case glXGetProcAddress_global_fake_func:
26886+ {
26887+ int nbElts = args[0];
26888+ char *huge_buffer = (char *) args[1];
26889+ char *result = (char *) args[2];
26890+ int i;
26891+
26892+ for (i = 0; i < nbElts; i++) {
26893+ int len = strlen(huge_buffer);
26894+
26895+ result[i] =
26896+ glXGetProcAddressARB((const GLubyte *) huge_buffer) !=
26897+ NULL;
26898+ huge_buffer += len + 1;
26899+ }
26900+ break;
26901+ }
26902+
26903+/* Begin of texture stuff */
26904+ case glBindTexture_func:
26905+ case glBindTextureEXT_func:
26906+ {
26907+ int target = args[0];
26908+ unsigned int client_texture = args[1];
26909+ unsigned int server_texture;
26910+
26911+ if (client_texture == 0) {
26912+ glBindTexture(target, 0);
26913+ } else {
26914+ alloc_value(process->current_state->textureAllocator,
26915+ client_texture);
26916+ server_texture =
26917+ process->current_state->tabTextures[client_texture];
26918+ if (server_texture == 0) {
26919+ glGenTextures(1, &server_texture);
26920+ process->current_state->tabTextures[client_texture] =
26921+ server_texture;
26922+ }
26923+ glBindTexture(target, server_texture);
26924+ }
26925+ break;
26926+ }
26927+
26928+ case glGenTextures_fake_func:
26929+ {
26930+ GET_EXT_PTR(void, glGenTextures, (GLsizei n, GLuint *textures));
26931+ int i;
26932+ int n = args[0];
26933+ unsigned int *clientTabTextures = malloc(n * sizeof(int));
26934+ unsigned int *serverTabTextures = malloc(n * sizeof(int));
26935+
26936+ alloc_range(process->current_state->textureAllocator, n,
26937+ clientTabTextures);
26938+
26939+ ptr_func_glGenTextures(n, serverTabTextures);
26940+ for (i = 0; i < n; i++) {
26941+ process->current_state->tabTextures[clientTabTextures[i]] =
26942+ serverTabTextures[i];
26943+ }
26944+
26945+ free(clientTabTextures);
26946+ free(serverTabTextures);
26947+ break;
26948+ }
26949+
26950+
26951+ case glDeleteTextures_func:
26952+ {
26953+ GET_EXT_PTR(void, glDeleteTextures,
26954+ (GLsizei n, const GLuint *textures));
26955+ int i;
26956+ int n = args[0];
26957+ unsigned int *clientTabTextures = (unsigned int *) args[1];
26958+
26959+ delete_range(process->current_state->textureAllocator, n,
26960+ clientTabTextures);
26961+
26962+ unsigned int *serverTabTextures = malloc(n * sizeof(int));
26963+
26964+ for (i = 0; i < n; i++) {
26965+ serverTabTextures[i] =
26966+ get_server_texture(process, clientTabTextures[i]);
26967+ }
26968+ ptr_func_glDeleteTextures(n, serverTabTextures);
26969+ for (i = 0; i < n; i++) {
26970+ process->current_state->tabTextures[clientTabTextures[i]] = 0;
26971+ }
26972+ free(serverTabTextures);
26973+ break;
26974+ }
26975+
26976+ case glPrioritizeTextures_func:
26977+ {
26978+ GET_EXT_PTR(void, glPrioritizeTextures,
26979+ (GLsizei n, const GLuint *textures,
26980+ const GLclampf *priorities));
26981+
26982+ int i;
26983+ int n = args[0];
26984+ unsigned int *textures = (unsigned int *) args[1];
26985+
26986+ for (i = 0; i < n; i++) {
26987+ textures[i] = get_server_texture(process, textures[i]);
26988+ }
26989+ ptr_func_glPrioritizeTextures(n, textures,
26990+ (const GLclampf *) args[2]);
26991+ break;
26992+ }
26993+
26994+ case glAreTexturesResident_func:
26995+ {
26996+ GET_EXT_PTR(void, glAreTexturesResident,
26997+ (GLsizei n, const GLuint *textures,
26998+ GLboolean *residences));
26999+ int i;
27000+ int n = args[0];
27001+ unsigned int *textures = (unsigned int *) args[1];
27002+
27003+ for (i = 0; i < n; i++) {
27004+ textures[i] = get_server_texture(process, textures[i]);
27005+ }
27006+ ptr_func_glAreTexturesResident(n, textures,
27007+ (GLboolean *) args[2]);
27008+ break;
27009+ }
27010+
27011+ case glIsTexture_func:
27012+ case glIsTextureEXT_func:
27013+ {
27014+ GET_EXT_PTR(GLboolean, glIsTexture, (GLuint texture));
27015+ unsigned int client_texture = args[0];
27016+ unsigned int server_texture =
27017+ get_server_texture(process, client_texture);
27018+ if (server_texture)
27019+ ret_char = ptr_func_glIsTexture(server_texture);
27020+ else
27021+ ret_char = 0;
27022+ break;
27023+ }
27024+
27025+ case glFramebufferTexture1DEXT_func:
27026+ {
27027+ GET_EXT_PTR(void, glFramebufferTexture1DEXT,
27028+ (int, int, int, int, int));
27029+ unsigned int client_texture = args[3];
27030+ unsigned int server_texture =
27031+ get_server_texture(process, client_texture);
27032+ if (server_texture)
27033+ ptr_func_glFramebufferTexture1DEXT(args[0], args[1], args[2],
27034+ server_texture, args[4]);
27035+ break;
27036+ }
27037+
27038+ case glFramebufferTexture2DEXT_func:
27039+ {
27040+ GET_EXT_PTR(void, glFramebufferTexture2DEXT,
27041+ (int, int, int, int, int));
27042+ unsigned int client_texture = args[3];
27043+ unsigned int server_texture =
27044+ get_server_texture(process, client_texture);
27045+ if (server_texture)
27046+ ptr_func_glFramebufferTexture2DEXT(args[0], args[1], args[2],
27047+ server_texture, args[4]);
27048+ break;
27049+ }
27050+
27051+ case glFramebufferTexture3DEXT_func:
27052+ {
27053+ GET_EXT_PTR(void, glFramebufferTexture3DEXT,
27054+ (int, int, int, int, int, int));
27055+ unsigned int client_texture = args[3];
27056+ unsigned int server_texture =
27057+ get_server_texture(process, client_texture);
27058+ if (server_texture)
27059+ ptr_func_glFramebufferTexture3DEXT(args[0], args[1], args[2],
27060+ server_texture, args[4],
27061+ args[5]);
27062+ break;
27063+ }
27064+/* End of texture stuff */
27065+
27066+/* Begin of list stuff */
27067+ case glIsList_func:
27068+ {
27069+ unsigned int client_list = args[0];
27070+ unsigned int server_list = get_server_list(process, client_list);
27071+
27072+ if (server_list)
27073+ ret_char = glIsList(server_list);
27074+ else
27075+ ret_char = 0;
27076+ break;
27077+ }
27078+
27079+ case glDeleteLists_func:
27080+ {
27081+ int i;
27082+ unsigned int first_client = args[0];
27083+ int n = args[1];
27084+
27085+ unsigned int first_server =
27086+ get_server_list(process, first_client);
27087+ for (i = 0; i < n; i++) {
27088+ if (get_server_list(process, first_client + i) !=
27089+ first_server + i)
27090+ break;
27091+ }
27092+ if (i == n) {
27093+ glDeleteLists(first_server, n);
27094+ } else {
27095+ for (i = 0; i < n; i++) {
27096+ glDeleteLists(get_server_list(process, first_client + i),
27097+ 1);
27098+ }
27099+ }
27100+
27101+ for (i = 0; i < n; i++) {
27102+ process->current_state->tabLists[first_client + i] = 0;
27103+ }
27104+ delete_consecutive_values(process->current_state->listAllocator,
27105+ first_client, n);
27106+ break;
27107+ }
27108+
27109+ case glGenLists_fake_func:
27110+ {
27111+ int i;
27112+ int n = args[0];
27113+ unsigned int server_first = glGenLists(n);
27114+
27115+ if (server_first) {
27116+ unsigned int client_first =
27117+ alloc_range(process->current_state->listAllocator, n,
27118+ NULL);
27119+ for (i = 0; i < n; i++) {
27120+ process->current_state->tabLists[client_first + i] =
27121+ server_first + i;
27122+ }
27123+ }
27124+ break;
27125+ }
27126+
27127+ case glNewList_func:
27128+ {
27129+ unsigned int client_list = args[0];
27130+ int mode = args[1];
27131+
27132+ alloc_value(process->current_state->listAllocator, client_list);
27133+ unsigned int server_list = get_server_list(process, client_list);
27134+
27135+ if (server_list == 0) {
27136+ server_list = glGenLists(1);
27137+ process->current_state->tabLists[client_list] = server_list;
27138+ }
27139+ glNewList(server_list, mode);
27140+ break;
27141+ }
27142+
27143+ case glCallList_func:
27144+ {
27145+ unsigned int client_list = args[0];
27146+ unsigned int server_list = get_server_list(process, client_list);
27147+
27148+ glCallList(server_list);
27149+ break;
27150+ }
27151+
27152+ case glCallLists_func:
27153+ {
27154+ int i;
27155+ int n = args[0];
27156+ int type = args[1];
27157+ const GLvoid *lists = (const GLvoid *) args[2];
27158+ int *new_lists = malloc(sizeof(int) * n);
27159+
27160+ for (i = 0; i < n; i++) {
27161+ new_lists[i] =
27162+ get_server_list(process, translate_id(i, type, lists));
27163+ }
27164+ glCallLists(n, GL_UNSIGNED_INT, new_lists);
27165+ free(new_lists);
27166+ break;
27167+ }
27168+
27169+
27170+/* End of list stuff */
27171+
27172+/* Begin of buffer stuff */
27173+ case glBindBufferARB_func:
27174+ {
27175+ GET_EXT_PTR(void, glBindBufferARB, (int, int));
27176+ int target = args[0];
27177+ unsigned int client_buffer = args[1];
27178+ unsigned int server_buffer;
27179+
27180+ if (client_buffer == 0) {
27181+ ptr_func_glBindBufferARB(target, 0);
27182+ } else {
27183+ server_buffer = get_server_buffer(process, client_buffer);
27184+ ptr_func_glBindBufferARB(target, server_buffer);
27185+ }
27186+ break;
27187+ }
27188+
27189+ case glGenBuffersARB_fake_func:
27190+ {
27191+ GET_EXT_PTR(void, glGenBuffersARB, (int, unsigned int *));
27192+ int i;
27193+ int n = args[0];
27194+ unsigned int *clientTabBuffers = malloc(n * sizeof(int));
27195+ unsigned int *serverTabBuffers = malloc(n * sizeof(int));
27196+
27197+ alloc_range(process->current_state->bufferAllocator, n,
27198+ clientTabBuffers);
27199+
27200+ ptr_func_glGenBuffersARB(n, serverTabBuffers);
27201+ for (i = 0; i < n; i++) {
27202+ process->current_state->tabBuffers[clientTabBuffers[i]] =
27203+ serverTabBuffers[i];
27204+ }
27205+
27206+ free(clientTabBuffers);
27207+ free(serverTabBuffers);
27208+ break;
27209+ }
27210+
27211+
27212+ case glDeleteBuffersARB_func:
27213+ {
27214+ GET_EXT_PTR(void, glDeleteBuffersARB, (int, int *));
27215+ int i;
27216+ int n = args[0];
27217+ unsigned int *clientTabBuffers = (unsigned int *) args[1];
27218+
27219+ delete_range(process->current_state->bufferAllocator, n,
27220+ clientTabBuffers);
27221+
27222+ int *serverTabBuffers = malloc(n * sizeof(int));
27223+
27224+ for (i = 0; i < n; i++) {
27225+ serverTabBuffers[i] =
27226+ get_server_buffer(process, clientTabBuffers[i]);
27227+ }
27228+ ptr_func_glDeleteBuffersARB(n, serverTabBuffers);
27229+ for (i = 0; i < n; i++) {
27230+ process->current_state->tabBuffers[clientTabBuffers[i]] = 0;
27231+ }
27232+ free(serverTabBuffers);
27233+ break;
27234+ }
27235+
27236+ case glIsBufferARB_func:
27237+ {
27238+ GET_EXT_PTR(int, glIsBufferARB, (int));
27239+ unsigned int client_buffer = args[0];
27240+ unsigned int server_buffer =
27241+ get_server_buffer(process, client_buffer);
27242+ if (server_buffer)
27243+ ret_int = ptr_func_glIsBufferARB(server_buffer);
27244+ else
27245+ ret_int = 0;
27246+ break;
27247+ }
27248+
27249+/* End of buffer stuff */
27250+
27251+ case glShaderSourceARB_fake_func:
27252+ {
27253+ GET_EXT_PTR(void, glShaderSourceARB, (int, int, char **, void *));
27254+ int size = args[1];
27255+ int i;
27256+ int acc_length = 0;
27257+ GLcharARB **tab_prog = malloc(size * sizeof(GLcharARB *));
27258+ int *tab_length = (int *) args[3];
27259+
27260+ for (i = 0; i < size; i++) {
27261+ tab_prog[i] = ((GLcharARB *) args[2]) + acc_length;
27262+ acc_length += tab_length[i];
27263+ }
27264+ ptr_func_glShaderSourceARB(args[0], args[1], tab_prog,
27265+ tab_length);
27266+ free(tab_prog);
27267+ break;
27268+ }
27269+
27270+ case glShaderSource_fake_func:
27271+ {
27272+ GET_EXT_PTR(void, glShaderSource, (int, int, char **, void *));
27273+ int size = args[1];
27274+ int i;
27275+ int acc_length = 0;
27276+ GLcharARB **tab_prog = malloc(size * sizeof(GLcharARB *));
27277+ int *tab_length = (int *) args[3];
27278+
27279+ for (i = 0; i < size; i++) {
27280+ tab_prog[i] = ((GLcharARB *) args[2]) + acc_length;
27281+ acc_length += tab_length[i];
27282+ }
27283+ ptr_func_glShaderSource(args[0], args[1], tab_prog, tab_length);
27284+ free(tab_prog);
27285+ break;
27286+ }
27287+
27288+ case glVertexPointer_fake_func:
27289+ {
27290+ int offset = args[0];
27291+ int size = args[1];
27292+ int type = args[2];
27293+ int stride = args[3];
27294+ int bytes_size = args[4];
27295+
27296+ process->current_state->vertexPointerSize =
27297+ MAX(process->current_state->vertexPointerSize,
27298+ offset + bytes_size);
27299+ process->current_state->vertexPointer =
27300+ realloc(process->current_state->vertexPointer,
27301+ process->current_state->vertexPointerSize);
27302+ memcpy(process->current_state->vertexPointer + offset,
27303+ (void *) args[5], bytes_size);
27304+ /* fprintf(stderr, "glVertexPointer_fake_func size=%d, type=%d,
27305+ * stride=%d, byte_size=%d\n", size, type, stride, bytes_size); */
27306+ glVertexPointer(size, type, stride,
27307+ process->current_state->vertexPointer);
27308+ break;
27309+ }
27310+
27311+ case glNormalPointer_fake_func:
27312+ {
27313+ int offset = args[0];
27314+ int type = args[1];
27315+ int stride = args[2];
27316+ int bytes_size = args[3];
27317+
27318+ process->current_state->normalPointerSize =
27319+ MAX(process->current_state->normalPointerSize,
27320+ offset + bytes_size);
27321+ process->current_state->normalPointer =
27322+ realloc(process->current_state->normalPointer,
27323+ process->current_state->normalPointerSize);
27324+ memcpy(process->current_state->normalPointer + offset,
27325+ (void *) args[4], bytes_size);
27326+ // fprintf(stderr, "glNormalPointer_fake_func type=%d, stride=%d,
27327+ // byte_size=%d\n", type, stride, bytes_size);
27328+ glNormalPointer(type, stride,
27329+ process->current_state->normalPointer);
27330+ break;
27331+ }
27332+
27333+ case glIndexPointer_fake_func:
27334+ {
27335+ int offset = args[0];
27336+ int type = args[1];
27337+ int stride = args[2];
27338+ int bytes_size = args[3];
27339+
27340+ process->current_state->indexPointerSize =
27341+ MAX(process->current_state->indexPointerSize,
27342+ offset + bytes_size);
27343+ process->current_state->indexPointer =
27344+ realloc(process->current_state->indexPointer,
27345+ process->current_state->indexPointerSize);
27346+ memcpy(process->current_state->indexPointer + offset,
27347+ (void *) args[4], bytes_size);
27348+ // fprintf(stderr, "glIndexPointer_fake_func type=%d, stride=%d,
27349+ // byte_size=%d\n", type, stride, bytes_size);
27350+ glIndexPointer(type, stride,
27351+ process->current_state->indexPointer);
27352+ break;
27353+ }
27354+
27355+ case glEdgeFlagPointer_fake_func:
27356+ {
27357+ int offset = args[0];
27358+ int stride = args[1];
27359+ int bytes_size = args[2];
27360+
27361+ process->current_state->edgeFlagPointerSize =
27362+ MAX(process->current_state->edgeFlagPointerSize,
27363+ offset + bytes_size);
27364+ process->current_state->edgeFlagPointer =
27365+ realloc(process->current_state->edgeFlagPointer,
27366+ process->current_state->edgeFlagPointerSize);
27367+ memcpy(process->current_state->edgeFlagPointer + offset,
27368+ (void *) args[3], bytes_size);
27369+ // fprintf(stderr, "glEdgeFlagPointer_fake_func stride = %d,
27370+ // bytes_size=%d\n", stride, bytes_size);
27371+ glEdgeFlagPointer(stride,
27372+ process->current_state->edgeFlagPointer);
27373+ break;
27374+ }
27375+
27376+ case glVertexAttribPointerARB_fake_func:
27377+ {
27378+ GET_EXT_PTR(void, glVertexAttribPointerARB,
27379+ (int, int, int, int, int, void *));
27380+ int offset = args[0];
27381+ int index = args[1];
27382+ int size = args[2];
27383+ int type = args[3];
27384+ int normalized = args[4];
27385+ int stride = args[5];
27386+ int bytes_size = args[6];
27387+
27388+ process->current_state->vertexAttribPointerSize[index] =
27389+ MAX(process->current_state->vertexAttribPointerSize[index],
27390+ offset + bytes_size);
27391+ process->current_state->vertexAttribPointer[index] =
27392+ realloc(process->current_state->vertexAttribPointer[index],
27393+ process->current_state->
27394+ vertexAttribPointerSize[index]);
27395+ memcpy(process->current_state->vertexAttribPointer[index] +
27396+ offset, (void *) args[7], bytes_size);
27397+ ptr_func_glVertexAttribPointerARB(index, size, type, normalized,
27398+ stride,
27399+ process->current_state->
27400+ vertexAttribPointer[index]);
27401+ break;
27402+ }
27403+
27404+ case glVertexAttribPointerNV_fake_func:
27405+ {
27406+ GET_EXT_PTR(void, glVertexAttribPointerNV,
27407+ (int, int, int, int, void *));
27408+ int offset = args[0];
27409+ int index = args[1];
27410+ int size = args[2];
27411+ int type = args[3];
27412+ int stride = args[4];
27413+ int bytes_size = args[5];
27414+
27415+ process->current_state->vertexAttribPointerNVSize[index] =
27416+ MAX(process->current_state->vertexAttribPointerNVSize[index],
27417+ offset + bytes_size);
27418+ process->current_state->vertexAttribPointerNV[index] =
27419+ realloc(process->current_state->vertexAttribPointerNV[index],
27420+ process->current_state->
27421+ vertexAttribPointerNVSize[index]);
27422+ memcpy(process->current_state->vertexAttribPointerNV[index] +
27423+ offset, (void *) args[6], bytes_size);
27424+ ptr_func_glVertexAttribPointerNV(index, size, type, stride,
27425+ process->current_state->
27426+ vertexAttribPointerNV[index]);
27427+ break;
27428+ }
27429+
27430+ case glColorPointer_fake_func:
27431+ {
27432+ int offset = args[0];
27433+ int size = args[1];
27434+ int type = args[2];
27435+ int stride = args[3];
27436+ int bytes_size = args[4];
27437+
27438+ process->current_state->colorPointerSize =
27439+ MAX(process->current_state->colorPointerSize,
27440+ offset + bytes_size);
27441+ process->current_state->colorPointer =
27442+ realloc(process->current_state->colorPointer,
27443+ process->current_state->colorPointerSize);
27444+ memcpy(process->current_state->colorPointer + offset,
27445+ (void *) args[5], bytes_size);
27446+ // fprintf(stderr, "glColorPointer_fake_func bytes_size = %d\n",
27447+ // bytes_size);
27448+ glColorPointer(size, type, stride,
27449+ process->current_state->colorPointer);
27450+
27451+ break;
27452+ }
27453+
27454+ case glSecondaryColorPointer_fake_func:
27455+ {
27456+ GET_EXT_PTR(void, glSecondaryColorPointer,
27457+ (int, int, int, void *));
27458+ int offset = args[0];
27459+ int size = args[1];
27460+ int type = args[2];
27461+ int stride = args[3];
27462+ int bytes_size = args[4];
27463+
27464+ process->current_state->secondaryColorPointerSize =
27465+ MAX(process->current_state->secondaryColorPointerSize,
27466+ offset + bytes_size);
27467+ process->current_state->secondaryColorPointer =
27468+ realloc(process->current_state->secondaryColorPointer,
27469+ process->current_state->secondaryColorPointerSize);
27470+ memcpy(process->current_state->secondaryColorPointer + offset,
27471+ (void *) args[5], bytes_size);
27472+ // fprintf(stderr, "glSecondaryColorPointer_fake_func bytes_size
27473+ // = %d\n", bytes_size);
27474+ ptr_func_glSecondaryColorPointer(size, type, stride,
27475+ process->current_state->
27476+ secondaryColorPointer);
27477+
27478+ break;
27479+ }
27480+
27481+ case glPushClientAttrib_func:
27482+ {
27483+ int mask = args[0];
27484+
27485+ if (process->current_state->clientStateSp <
27486+ MAX_CLIENT_STATE_STACK_SIZE) {
27487+ process->current_state->clientStateStack[process->
27488+ current_state->
27489+ clientStateSp].mask =
27490+ mask;
27491+ if (mask & GL_CLIENT_VERTEX_ARRAY_BIT) {
27492+ process->current_state->clientStateStack[process->
27493+ current_state->
27494+ clientStateSp].
27495+ activeTextureIndex =
27496+ process->current_state->activeTextureIndex;
27497+ }
27498+ process->current_state->clientStateSp++;
27499+ }
27500+ glPushClientAttrib(mask);
27501+ break;
27502+ }
27503+
27504+ case glPopClientAttrib_func:
27505+ {
27506+ if (process->current_state->clientStateSp > 0) {
27507+ process->current_state->clientStateSp--;
27508+ if (process->current_state->
27509+ clientStateStack[process->current_state->clientStateSp].
27510+ mask & GL_CLIENT_VERTEX_ARRAY_BIT) {
27511+ process->current_state->activeTextureIndex =
27512+ process->current_state->clientStateStack[process->
27513+ current_state->
27514+ clientStateSp].
27515+ activeTextureIndex;
27516+ }
27517+ }
27518+ glPopClientAttrib();
27519+ break;
27520+ }
27521+
27522+ case glClientActiveTexture_func:
27523+ case glClientActiveTextureARB_func:
27524+ {
27525+ int activeTexture = args[0];
27526+
27527+ process->current_state->activeTextureIndex =
27528+ activeTexture - GL_TEXTURE0_ARB;
27529+ do_glClientActiveTextureARB(activeTexture);
27530+ break;
27531+ }
27532+
27533+ case glTexCoordPointer_fake_func:
27534+ {
27535+ int offset = args[0];
27536+ int index = args[1];
27537+ int size = args[2];
27538+ int type = args[3];
27539+ int stride = args[4];
27540+ int bytes_size = args[5];
27541+
27542+ process->current_state->texCoordPointerSize[index] =
27543+ MAX(process->current_state->texCoordPointerSize[index],
27544+ offset + bytes_size);
27545+ process->current_state->texCoordPointer[index] =
27546+ realloc(process->current_state->texCoordPointer[index],
27547+ process->current_state->texCoordPointerSize[index]);
27548+ memcpy(process->current_state->texCoordPointer[index] + offset,
27549+ (void *) args[6], bytes_size);
27550+ /* fprintf(stderr, "glTexCoordPointer_fake_func size=%d, type=%d,
27551+ * stride=%d, byte_size=%d\n", size, type, stride, bytes_size); */
27552+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + index);
27553+ glTexCoordPointer(size, type, stride,
27554+ process->current_state->texCoordPointer[index]);
27555+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27556+ process->current_state->
27557+ activeTextureIndex);
27558+ break;
27559+ }
27560+
27561+ case glWeightPointerARB_fake_func:
27562+ {
27563+ GET_EXT_PTR(void, glWeightPointerARB, (int, int, int, void *));
27564+ int offset = args[0];
27565+ int size = args[1];
27566+ int type = args[2];
27567+ int stride = args[3];
27568+ int bytes_size = args[4];
27569+
27570+ process->current_state->weightPointerSize =
27571+ MAX(process->current_state->weightPointerSize,
27572+ offset + bytes_size);
27573+ process->current_state->weightPointer =
27574+ realloc(process->current_state->weightPointer,
27575+ process->current_state->weightPointerSize);
27576+ memcpy(process->current_state->weightPointer + offset,
27577+ (void *) args[5], bytes_size);
27578+ /* fprintf(stderr, "glWeightPointerARB_fake_func size=%d,
27579+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27580+ * bytes_size); */
27581+ ptr_func_glWeightPointerARB(size, type, stride,
27582+ process->current_state->
27583+ weightPointer);
27584+ break;
27585+ }
27586+
27587+ case glMatrixIndexPointerARB_fake_func:
27588+ {
27589+ GET_EXT_PTR(void, glMatrixIndexPointerARB,
27590+ (int, int, int, void *));
27591+ int offset = args[0];
27592+ int size = args[1];
27593+ int type = args[2];
27594+ int stride = args[3];
27595+ int bytes_size = args[4];
27596+
27597+ process->current_state->matrixIndexPointerSize =
27598+ MAX(process->current_state->matrixIndexPointerSize,
27599+ offset + bytes_size);
27600+ process->current_state->matrixIndexPointer =
27601+ realloc(process->current_state->matrixIndexPointer,
27602+ process->current_state->matrixIndexPointerSize);
27603+ memcpy(process->current_state->matrixIndexPointer + offset,
27604+ (void *) args[5], bytes_size);
27605+ /* fprintf(stderr, "glMatrixIndexPointerARB_fake_func size=%d,
27606+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27607+ * bytes_size); */
27608+ ptr_func_glMatrixIndexPointerARB(size, type, stride,
27609+ process->current_state->
27610+ matrixIndexPointer);
27611+ break;
27612+ }
27613+
27614+ case glFogCoordPointer_fake_func:
27615+ {
27616+ GET_EXT_PTR(void, glFogCoordPointer, (int, int, void *));
27617+ int offset = args[0];
27618+ int type = args[1];
27619+ int stride = args[2];
27620+ int bytes_size = args[3];
27621+
27622+ process->current_state->fogCoordPointerSize =
27623+ MAX(process->current_state->fogCoordPointerSize,
27624+ offset + bytes_size);
27625+ process->current_state->fogCoordPointer =
27626+ realloc(process->current_state->fogCoordPointer,
27627+ process->current_state->fogCoordPointerSize);
27628+ memcpy(process->current_state->fogCoordPointer + offset,
27629+ (void *) args[4], bytes_size);
27630+ // fprintf(stderr, "glFogCoordPointer_fake_func type=%d,
27631+ // stride=%d, byte_size=%d\n", type, stride, bytes_size);
27632+ ptr_func_glFogCoordPointer(type, stride,
27633+ process->current_state->
27634+ fogCoordPointer);
27635+ break;
27636+ }
27637+
27638+ case glVariantPointerEXT_fake_func:
27639+ {
27640+ GET_EXT_PTR(void, glVariantPointerEXT, (int, int, int, void *));
27641+ int offset = args[0];
27642+ int id = args[1];
27643+ int type = args[2];
27644+ int stride = args[3];
27645+ int bytes_size = args[4];
27646+
27647+ process->current_state->variantPointerEXTSize[id] =
27648+ MAX(process->current_state->variantPointerEXTSize[id],
27649+ offset + bytes_size);
27650+ process->current_state->variantPointerEXT[id] =
27651+ realloc(process->current_state->variantPointerEXT[id],
27652+ process->current_state->variantPointerEXTSize[id]);
27653+ memcpy(process->current_state->variantPointerEXT[id] + offset,
27654+ (void *) args[5], bytes_size);
27655+ // fprintf(stderr, "glVariantPointerEXT_fake_func[%d] type=%d,
27656+ // stride=%d, byte_size=%d\n", id, type, stride, bytes_size);
27657+ ptr_func_glVariantPointerEXT(id, type, stride,
27658+ process->current_state->
27659+ variantPointerEXT[id]);
27660+ break;
27661+ }
27662+
27663+ case glInterleavedArrays_fake_func:
27664+ {
27665+ GET_EXT_PTR(void, glInterleavedArrays, (int, int, void *));
27666+ int offset = args[0];
27667+ int format = args[1];
27668+ int stride = args[2];
27669+ int bytes_size = args[3];
27670+
27671+ process->current_state->interleavedArraysSize =
27672+ MAX(process->current_state->interleavedArraysSize,
27673+ offset + bytes_size);
27674+ process->current_state->interleavedArrays =
27675+ realloc(process->current_state->interleavedArrays,
27676+ process->current_state->interleavedArraysSize);
27677+ memcpy(process->current_state->interleavedArrays + offset,
27678+ (void *) args[4], bytes_size);
27679+ // fprintf(stderr, "glInterleavedArrays_fake_func format=%d,
27680+ // stride=%d, byte_size=%d\n", format, stride, bytes_size);
27681+ ptr_func_glInterleavedArrays(format, stride,
27682+ process->current_state->
27683+ interleavedArrays);
27684+ break;
27685+ }
27686+
27687+ case glElementPointerATI_fake_func:
27688+ {
27689+ GET_EXT_PTR(void, glElementPointerATI, (int, void *));
27690+ int type = args[0];
27691+ int bytes_size = args[1];
27692+
27693+ process->current_state->elementPointerATISize = bytes_size;
27694+ process->current_state->elementPointerATI =
27695+ realloc(process->current_state->elementPointerATI,
27696+ process->current_state->elementPointerATISize);
27697+ memcpy(process->current_state->elementPointerATI,
27698+ (void *) args[2], bytes_size);
27699+ // fprintf(stderr, "glElementPointerATI_fake_func type=%d,
27700+ // byte_size=%d\n", type, bytes_size);
27701+ ptr_func_glElementPointerATI(type,
27702+ process->current_state->
27703+ elementPointerATI);
27704+ break;
27705+ }
27706+
27707+ case glTexCoordPointer01_fake_func:
27708+ {
27709+ int size = args[0];
27710+ int type = args[1];
27711+ int stride = args[2];
27712+ int bytes_size = args[3];
27713+
27714+ process->current_state->texCoordPointerSize[0] = bytes_size;
27715+ process->current_state->texCoordPointer[0] =
27716+ realloc(process->current_state->texCoordPointer[0],
27717+ bytes_size);
27718+ memcpy(process->current_state->texCoordPointer[0],
27719+ (void *) args[4], bytes_size);
27720+ /* fprintf(stderr, "glTexCoordPointer01_fake_func size=%d,
27721+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27722+ * bytes_size); */
27723+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27724+ glTexCoordPointer(size, type, stride,
27725+ process->current_state->texCoordPointer[0]);
27726+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
27727+ glTexCoordPointer(size, type, stride,
27728+ process->current_state->texCoordPointer[0]);
27729+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27730+ process->current_state->
27731+ activeTextureIndex);
27732+ break;
27733+ }
27734+
27735+ case glTexCoordPointer012_fake_func:
27736+ {
27737+ int size = args[0];
27738+ int type = args[1];
27739+ int stride = args[2];
27740+ int bytes_size = args[3];
27741+
27742+ process->current_state->texCoordPointerSize[0] = bytes_size;
27743+ process->current_state->texCoordPointer[0] =
27744+ realloc(process->current_state->texCoordPointer[0],
27745+ bytes_size);
27746+ memcpy(process->current_state->texCoordPointer[0],
27747+ (void *) args[4], bytes_size);
27748+ /* fprintf(stderr, "glTexCoordPointer012_fake_func size=%d,
27749+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27750+ * bytes_size); */
27751+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27752+ glTexCoordPointer(size, type, stride,
27753+ process->current_state->texCoordPointer[0]);
27754+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
27755+ glTexCoordPointer(size, type, stride,
27756+ process->current_state->texCoordPointer[0]);
27757+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
27758+ glTexCoordPointer(size, type, stride,
27759+ process->current_state->texCoordPointer[0]);
27760+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27761+ process->current_state->
27762+ activeTextureIndex);
27763+ break;
27764+ }
27765+
27766+ case glVertexAndNormalPointer_fake_func:
27767+ {
27768+ int vertexPointerSize = args[0];
27769+ int vertexPointerType = args[1];
27770+ int vertexPointerStride = args[2];
27771+ int normalPointerType = args[3];
27772+ int normalPointerStride = args[4];
27773+ int bytes_size = args[5];
27774+ void *ptr = (void *) args[6];
27775+
27776+ process->current_state->vertexPointerSize = bytes_size;
27777+ process->current_state->vertexPointer =
27778+ realloc(process->current_state->vertexPointer, bytes_size);
27779+ memcpy(process->current_state->vertexPointer, ptr, bytes_size);
27780+ glVertexPointer(vertexPointerSize, vertexPointerType,
27781+ vertexPointerStride,
27782+ process->current_state->vertexPointer);
27783+ glNormalPointer(normalPointerType, normalPointerStride,
27784+ process->current_state->vertexPointer);
27785+ break;
27786+ }
27787+
27788+ case glVertexNormalPointerInterlaced_fake_func:
27789+ {
27790+ int i = 0;
27791+ int offset = args[i++];
27792+ int vertexPointerSize = args[i++];
27793+ int vertexPointerType = args[i++];
27794+ int stride = args[i++];
27795+ int normalPointerOffset = args[i++];
27796+ int normalPointerType = args[i++];
27797+ int bytes_size = args[i++];
27798+ void *ptr = (void *) args[i++];
27799+
27800+ process->current_state->vertexPointerSize =
27801+ MAX(process->current_state->vertexPointerSize,
27802+ offset + bytes_size);
27803+ process->current_state->vertexPointer =
27804+ realloc(process->current_state->vertexPointer,
27805+ process->current_state->vertexPointerSize);
27806+ memcpy(process->current_state->vertexPointer + offset, ptr,
27807+ bytes_size);
27808+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27809+ process->current_state->vertexPointer);
27810+ glNormalPointer(normalPointerType, stride,
27811+ process->current_state->vertexPointer +
27812+ normalPointerOffset);
27813+ break;
27814+ }
27815+
27816+ case glTuxRacerDrawElements_fake_func:
27817+ {
27818+ int mode = args[0];
27819+ int count = args[1];
27820+ int isColorEnabled = args[2];
27821+ void *ptr = (void *) args[3];
27822+ int stride =
27823+ 6 * sizeof(float) +
27824+ ((isColorEnabled) ? 4 * sizeof(unsigned char) : 0);
27825+ glVertexPointer(3, GL_FLOAT, stride, ptr);
27826+ glNormalPointer(GL_FLOAT, stride, ptr + 3 * sizeof(float));
27827+ if (isColorEnabled)
27828+ glColorPointer(4, GL_UNSIGNED_BYTE, stride,
27829+ ptr + 6 * sizeof(float));
27830+ glDrawArrays(mode, 0, count);
27831+ break;
27832+ }
27833+
27834+ case glVertexNormalColorPointerInterlaced_fake_func:
27835+ {
27836+ int i = 0;
27837+ int offset = args[i++];
27838+ int vertexPointerSize = args[i++];
27839+ int vertexPointerType = args[i++];
27840+ int stride = args[i++];
27841+ int normalPointerOffset = args[i++];
27842+ int normalPointerType = args[i++];
27843+ int colorPointerOffset = args[i++];
27844+ int colorPointerSize = args[i++];
27845+ int colorPointerType = args[i++];
27846+ int bytes_size = args[i++];
27847+ void *ptr = (void *) args[i++];
27848+
27849+ process->current_state->vertexPointerSize =
27850+ MAX(process->current_state->vertexPointerSize,
27851+ offset + bytes_size);
27852+ process->current_state->vertexPointer =
27853+ realloc(process->current_state->vertexPointer,
27854+ process->current_state->vertexPointerSize);
27855+ memcpy(process->current_state->vertexPointer + offset, ptr,
27856+ bytes_size);
27857+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27858+ process->current_state->vertexPointer);
27859+ glNormalPointer(normalPointerType, stride,
27860+ process->current_state->vertexPointer +
27861+ normalPointerOffset);
27862+ glColorPointer(colorPointerSize, colorPointerType, stride,
27863+ process->current_state->vertexPointer +
27864+ colorPointerOffset);
27865+ break;
27866+ }
27867+
27868+ case glVertexColorTexCoord0PointerInterlaced_fake_func:
27869+ {
27870+ int i = 0;
27871+ int offset = args[i++];
27872+ int vertexPointerSize = args[i++];
27873+ int vertexPointerType = args[i++];
27874+ int stride = args[i++];
27875+ int colorPointerOffset = args[i++];
27876+ int colorPointerSize = args[i++];
27877+ int colorPointerType = args[i++];
27878+ int texCoord0PointerOffset = args[i++];
27879+ int texCoord0PointerSize = args[i++];
27880+ int texCoord0PointerType = args[i++];
27881+ int bytes_size = args[i++];
27882+ void *ptr = (void *) args[i++];
27883+
27884+ process->current_state->vertexPointerSize =
27885+ MAX(process->current_state->vertexPointerSize,
27886+ offset + bytes_size);
27887+ process->current_state->vertexPointer =
27888+ realloc(process->current_state->vertexPointer,
27889+ process->current_state->vertexPointerSize);
27890+ memcpy(process->current_state->vertexPointer + offset, ptr,
27891+ bytes_size);
27892+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27893+ process->current_state->vertexPointer);
27894+ glColorPointer(colorPointerSize, colorPointerType, stride,
27895+ process->current_state->vertexPointer +
27896+ colorPointerOffset);
27897+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27898+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
27899+ stride,
27900+ process->current_state->vertexPointer +
27901+ texCoord0PointerOffset);
27902+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27903+ process->current_state->
27904+ activeTextureIndex);
27905+ break;
27906+ }
27907+
27908+ case glVertexNormalTexCoord0PointerInterlaced_fake_func:
27909+ {
27910+ int i = 0;
27911+ int offset = args[i++];
27912+ int vertexPointerSize = args[i++];
27913+ int vertexPointerType = args[i++];
27914+ int stride = args[i++];
27915+ int normalPointerOffset = args[i++];
27916+ int normalPointerType = args[i++];
27917+ int texCoord0PointerOffset = args[i++];
27918+ int texCoord0PointerSize = args[i++];
27919+ int texCoord0PointerType = args[i++];
27920+ int bytes_size = args[i++];
27921+ void *ptr = (void *) args[i++];
27922+
27923+ process->current_state->vertexPointerSize =
27924+ MAX(process->current_state->vertexPointerSize,
27925+ offset + bytes_size);
27926+ process->current_state->vertexPointer =
27927+ realloc(process->current_state->vertexPointer,
27928+ process->current_state->vertexPointerSize);
27929+ memcpy(process->current_state->vertexPointer + offset, ptr,
27930+ bytes_size);
27931+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27932+ process->current_state->vertexPointer);
27933+ glNormalPointer(normalPointerType, stride,
27934+ process->current_state->vertexPointer +
27935+ normalPointerOffset);
27936+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27937+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
27938+ stride,
27939+ process->current_state->vertexPointer +
27940+ texCoord0PointerOffset);
27941+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27942+ process->current_state->
27943+ activeTextureIndex);
27944+ break;
27945+ }
27946+
27947+ case glVertexNormalTexCoord01PointerInterlaced_fake_func:
27948+ {
27949+ int i = 0;
27950+ int offset = args[i++];
27951+ int vertexPointerSize = args[i++];
27952+ int vertexPointerType = args[i++];
27953+ int stride = args[i++];
27954+ int normalPointerOffset = args[i++];
27955+ int normalPointerType = args[i++];
27956+ int texCoord0PointerOffset = args[i++];
27957+ int texCoord0PointerSize = args[i++];
27958+ int texCoord0PointerType = args[i++];
27959+ int texCoord1PointerOffset = args[i++];
27960+ int texCoord1PointerSize = args[i++];
27961+ int texCoord1PointerType = args[i++];
27962+ int bytes_size = args[i++];
27963+ void *ptr = (void *) args[i++];
27964+
27965+ process->current_state->vertexPointerSize =
27966+ MAX(process->current_state->vertexPointerSize,
27967+ offset + bytes_size);
27968+ process->current_state->vertexPointer =
27969+ realloc(process->current_state->vertexPointer,
27970+ process->current_state->vertexPointerSize);
27971+ memcpy(process->current_state->vertexPointer + offset, ptr,
27972+ bytes_size);
27973+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27974+ process->current_state->vertexPointer);
27975+ glNormalPointer(normalPointerType, stride,
27976+ process->current_state->vertexPointer +
27977+ normalPointerOffset);
27978+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27979+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
27980+ stride,
27981+ process->current_state->vertexPointer +
27982+ texCoord0PointerOffset);
27983+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
27984+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
27985+ stride,
27986+ process->current_state->vertexPointer +
27987+ texCoord1PointerOffset);
27988+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27989+ process->current_state->
27990+ activeTextureIndex);
27991+ break;
27992+ }
27993+
27994+ case glVertexNormalTexCoord012PointerInterlaced_fake_func:
27995+ {
27996+ int i = 0;
27997+ int offset = args[i++];
27998+ int vertexPointerSize = args[i++];
27999+ int vertexPointerType = args[i++];
28000+ int stride = args[i++];
28001+ int normalPointerOffset = args[i++];
28002+ int normalPointerType = args[i++];
28003+ int texCoord0PointerOffset = args[i++];
28004+ int texCoord0PointerSize = args[i++];
28005+ int texCoord0PointerType = args[i++];
28006+ int texCoord1PointerOffset = args[i++];
28007+ int texCoord1PointerSize = args[i++];
28008+ int texCoord1PointerType = args[i++];
28009+ int texCoord2PointerOffset = args[i++];
28010+ int texCoord2PointerSize = args[i++];
28011+ int texCoord2PointerType = args[i++];
28012+ int bytes_size = args[i++];
28013+ void *ptr = (void *) args[i++];
28014+
28015+ process->current_state->vertexPointerSize =
28016+ MAX(process->current_state->vertexPointerSize,
28017+ offset + bytes_size);
28018+ process->current_state->vertexPointer =
28019+ realloc(process->current_state->vertexPointer,
28020+ process->current_state->vertexPointerSize);
28021+ memcpy(process->current_state->vertexPointer + offset, ptr,
28022+ bytes_size);
28023+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28024+ process->current_state->vertexPointer);
28025+ glNormalPointer(normalPointerType, stride,
28026+ process->current_state->vertexPointer +
28027+ normalPointerOffset);
28028+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28029+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28030+ stride,
28031+ process->current_state->vertexPointer +
28032+ texCoord0PointerOffset);
28033+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
28034+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
28035+ stride,
28036+ process->current_state->vertexPointer +
28037+ texCoord1PointerOffset);
28038+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
28039+ glTexCoordPointer(texCoord2PointerSize, texCoord2PointerType,
28040+ stride,
28041+ process->current_state->vertexPointer +
28042+ texCoord2PointerOffset);
28043+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28044+ process->current_state->
28045+ activeTextureIndex);
28046+ break;
28047+ }
28048+
28049+ case glVertexNormalColorTexCoord0PointerInterlaced_fake_func:
28050+ {
28051+ int i = 0;
28052+ int offset = args[i++];
28053+ int vertexPointerSize = args[i++];
28054+ int vertexPointerType = args[i++];
28055+ int stride = args[i++];
28056+ int normalPointerOffset = args[i++];
28057+ int normalPointerType = args[i++];
28058+ int colorPointerOffset = args[i++];
28059+ int colorPointerSize = args[i++];
28060+ int colorPointerType = args[i++];
28061+ int texCoord0PointerOffset = args[i++];
28062+ int texCoord0PointerSize = args[i++];
28063+ int texCoord0PointerType = args[i++];
28064+ int bytes_size = args[i++];
28065+ void *ptr = (void *) args[i++];
28066+
28067+ process->current_state->vertexPointerSize =
28068+ MAX(process->current_state->vertexPointerSize,
28069+ offset + bytes_size);
28070+ process->current_state->vertexPointer =
28071+ realloc(process->current_state->vertexPointer,
28072+ process->current_state->vertexPointerSize);
28073+ memcpy(process->current_state->vertexPointer + offset, ptr,
28074+ bytes_size);
28075+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28076+ process->current_state->vertexPointer);
28077+ glNormalPointer(normalPointerType, stride,
28078+ process->current_state->vertexPointer +
28079+ normalPointerOffset);
28080+ glColorPointer(colorPointerSize, colorPointerType, stride,
28081+ process->current_state->vertexPointer +
28082+ colorPointerOffset);
28083+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28084+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28085+ stride,
28086+ process->current_state->vertexPointer +
28087+ texCoord0PointerOffset);
28088+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28089+ process->current_state->
28090+ activeTextureIndex);
28091+ break;
28092+ }
28093+
28094+ case glVertexNormalColorTexCoord01PointerInterlaced_fake_func:
28095+ {
28096+ int i = 0;
28097+ int offset = args[i++];
28098+ int vertexPointerSize = args[i++];
28099+ int vertexPointerType = args[i++];
28100+ int stride = args[i++];
28101+ int normalPointerOffset = args[i++];
28102+ int normalPointerType = args[i++];
28103+ int colorPointerOffset = args[i++];
28104+ int colorPointerSize = args[i++];
28105+ int colorPointerType = args[i++];
28106+ int texCoord0PointerOffset = args[i++];
28107+ int texCoord0PointerSize = args[i++];
28108+ int texCoord0PointerType = args[i++];
28109+ int texCoord1PointerOffset = args[i++];
28110+ int texCoord1PointerSize = args[i++];
28111+ int texCoord1PointerType = args[i++];
28112+ int bytes_size = args[i++];
28113+ void *ptr = (void *) args[i++];
28114+
28115+ process->current_state->vertexPointerSize =
28116+ MAX(process->current_state->vertexPointerSize,
28117+ offset + bytes_size);
28118+ process->current_state->vertexPointer =
28119+ realloc(process->current_state->vertexPointer,
28120+ process->current_state->vertexPointerSize);
28121+ memcpy(process->current_state->vertexPointer + offset, ptr,
28122+ bytes_size);
28123+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28124+ process->current_state->vertexPointer);
28125+ glNormalPointer(normalPointerType, stride,
28126+ process->current_state->vertexPointer +
28127+ normalPointerOffset);
28128+ glColorPointer(colorPointerSize, colorPointerType, stride,
28129+ process->current_state->vertexPointer +
28130+ colorPointerOffset);
28131+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28132+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28133+ stride,
28134+ process->current_state->vertexPointer +
28135+ texCoord0PointerOffset);
28136+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
28137+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
28138+ stride,
28139+ process->current_state->vertexPointer +
28140+ texCoord1PointerOffset);
28141+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28142+ process->current_state->
28143+ activeTextureIndex);
28144+ break;
28145+ }
28146+
28147+ case glVertexNormalColorTexCoord012PointerInterlaced_fake_func:
28148+ {
28149+ int i = 0;
28150+ int offset = args[i++];
28151+ int vertexPointerSize = args[i++];
28152+ int vertexPointerType = args[i++];
28153+ int stride = args[i++];
28154+ int normalPointerOffset = args[i++];
28155+ int normalPointerType = args[i++];
28156+ int colorPointerOffset = args[i++];
28157+ int colorPointerSize = args[i++];
28158+ int colorPointerType = args[i++];
28159+ int texCoord0PointerOffset = args[i++];
28160+ int texCoord0PointerSize = args[i++];
28161+ int texCoord0PointerType = args[i++];
28162+ int texCoord1PointerOffset = args[i++];
28163+ int texCoord1PointerSize = args[i++];
28164+ int texCoord1PointerType = args[i++];
28165+ int texCoord2PointerOffset = args[i++];
28166+ int texCoord2PointerSize = args[i++];
28167+ int texCoord2PointerType = args[i++];
28168+ int bytes_size = args[i++];
28169+ void *ptr = (void *) args[i++];
28170+
28171+ process->current_state->vertexPointerSize =
28172+ MAX(process->current_state->vertexPointerSize,
28173+ offset + bytes_size);
28174+ process->current_state->vertexPointer =
28175+ realloc(process->current_state->vertexPointer,
28176+ process->current_state->vertexPointerSize);
28177+ memcpy(process->current_state->vertexPointer + offset, ptr,
28178+ bytes_size);
28179+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28180+ process->current_state->vertexPointer);
28181+ glNormalPointer(normalPointerType, stride,
28182+ process->current_state->vertexPointer +
28183+ normalPointerOffset);
28184+ glColorPointer(colorPointerSize, colorPointerType, stride,
28185+ process->current_state->vertexPointer +
28186+ colorPointerOffset);
28187+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28188+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28189+ stride,
28190+ process->current_state->vertexPointer +
28191+ texCoord0PointerOffset);
28192+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
28193+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
28194+ stride,
28195+ process->current_state->vertexPointer +
28196+ texCoord1PointerOffset);
28197+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
28198+ glTexCoordPointer(texCoord2PointerSize, texCoord2PointerType,
28199+ stride,
28200+ process->current_state->vertexPointer +
28201+ texCoord2PointerOffset);
28202+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28203+ process->current_state->
28204+ activeTextureIndex);
28205+ break;
28206+ }
28207+
28208+ case _glVertexPointer_buffer_func:
28209+ {
28210+ glVertexPointer(args[0], args[1], args[2], (void *) args[3]);
28211+ break;
28212+ }
28213+
28214+ case _glNormalPointer_buffer_func:
28215+ {
28216+ glNormalPointer(args[0], args[1], (void *) args[2]);
28217+ break;
28218+ }
28219+
28220+ case _glColorPointer_buffer_func:
28221+ {
28222+ glColorPointer(args[0], args[1], args[2], (void *) args[3]);
28223+ break;
28224+ }
28225+
28226+ case _glSecondaryColorPointer_buffer_func:
28227+ {
28228+ GET_EXT_PTR(void, glSecondaryColorPointer,
28229+ (int, int, int, void *));
28230+ ptr_func_glSecondaryColorPointer(args[0], args[1], args[2],
28231+ (void *) args[3]);
28232+ break;
28233+ }
28234+
28235+ case _glIndexPointer_buffer_func:
28236+ {
28237+ glIndexPointer(args[0], args[1], (void *) args[2]);
28238+ break;
28239+ }
28240+
28241+ case _glTexCoordPointer_buffer_func:
28242+ {
28243+ glTexCoordPointer(args[0], args[1], args[2], (void *) args[3]);
28244+ break;
28245+ }
28246+
28247+ case _glEdgeFlagPointer_buffer_func:
28248+ {
28249+ glEdgeFlagPointer(args[0], (void *) args[1]);
28250+ break;
28251+ }
28252+
28253+ case _glVertexAttribPointerARB_buffer_func:
28254+ {
28255+ GET_EXT_PTR(void, glVertexAttribPointerARB,
28256+ (int, int, int, int, int, void *));
28257+ ptr_func_glVertexAttribPointerARB(args[0], args[1], args[2],
28258+ args[3], args[4],
28259+ (void *) args[5]);
28260+ break;
28261+ }
28262+
28263+ case _glWeightPointerARB_buffer_func:
28264+ {
28265+ GET_EXT_PTR(void, glWeightPointerARB, (int, int, int, void *));
28266+
28267+ ptr_func_glWeightPointerARB(args[0], args[1], args[2],
28268+ (void *) args[3]);
28269+ break;
28270+ }
28271+
28272+ case _glMatrixIndexPointerARB_buffer_func:
28273+ {
28274+ GET_EXT_PTR(void, glMatrixIndexPointerARB,
28275+ (int, int, int, void *));
28276+ ptr_func_glMatrixIndexPointerARB(args[0], args[1], args[2],
28277+ (void *) args[3]);
28278+ break;
28279+ }
28280+
28281+ case _glFogCoordPointer_buffer_func:
28282+ {
28283+ GET_EXT_PTR(void, glFogCoordPointer, (int, int, void *));
28284+
28285+ ptr_func_glFogCoordPointer(args[0], args[1], (void *) args[2]);
28286+ break;
28287+ }
28288+
28289+ case _glVariantPointerEXT_buffer_func:
28290+ {
28291+ GET_EXT_PTR(void, glVariantPointerEXT, (int, int, int, void *));
28292+
28293+ ptr_func_glVariantPointerEXT(args[0], args[1], args[2],
28294+ (void *) args[3]);
28295+ break;
28296+ }
28297+
28298+ case _glDrawElements_buffer_func:
28299+ {
28300+ glDrawElements(args[0], args[1], args[2], (void *) args[3]);
28301+ break;
28302+ }
28303+
28304+ case _glDrawRangeElements_buffer_func:
28305+ {
28306+ glDrawRangeElements(args[0], args[1], args[2], args[3], args[4],
28307+ (void *) args[5]);
28308+ break;
28309+ }
28310+
28311+ case _glMultiDrawElements_buffer_func:
28312+ {
28313+ GET_EXT_PTR(void, glMultiDrawElements,
28314+ (int, int *, int, void **, int));
28315+ ptr_func_glMultiDrawElements(args[0], (int *) args[1], args[2],
28316+ (void **) args[3], args[4]);
28317+ break;
28318+ }
28319+
28320+ case _glGetError_fake_func:
28321+ {
28322+ break;
28323+ }
28324+
28325+ case glGetIntegerv_func:
28326+ {
28327+ glGetIntegerv(args[0], (int *) args[1]);
28328+ fprintf(stderr, "glGetIntegerv(%x)=%d\n", (int) args[0],
28329+ *(int *) args[1]);
28330+ break;
28331+ }
28332+
28333+ case _glReadPixels_pbo_func:
28334+ {
28335+ glReadPixels(ARG_TO_INT(args[0]), ARG_TO_INT(args[1]),
28336+ ARG_TO_INT(args[2]), ARG_TO_INT(args[3]),
28337+ ARG_TO_UNSIGNED_INT(args[4]),
28338+ ARG_TO_UNSIGNED_INT(args[5]), (void *) (args[6]));
28339+ break;
28340+ }
28341+
28342+ case _glDrawPixels_pbo_func:
28343+ {
28344+ glDrawPixels(ARG_TO_INT(args[0]), ARG_TO_INT(args[1]),
28345+ ARG_TO_UNSIGNED_INT(args[2]),
28346+ ARG_TO_UNSIGNED_INT(args[3]),
28347+ (const void *) (args[4]));
28348+ break;
28349+ }
28350+
28351+ case _glMapBufferARB_fake_func:
28352+ {
28353+ GET_EXT_PTR(GLvoid *, glMapBufferARB, (GLenum, GLenum));
28354+ GET_EXT_PTR(GLboolean, glUnmapBufferARB, (GLenum));
28355+ int target = args[0];
28356+ int size = args[1];
28357+ void *dst_ptr = (void *) args[2];
28358+ void *src_ptr = ptr_func_glMapBufferARB(target, GL_READ_ONLY);
28359+
28360+ if (src_ptr) {
28361+ memcpy(dst_ptr, src_ptr, size);
28362+ ret_int = ptr_func_glUnmapBufferARB(target);
28363+ } else {
28364+ ret_int = 0;
28365+ }
28366+ break;
28367+ }
28368+
28369+ case fake_gluBuild2DMipmaps_func:
28370+ {
28371+ GET_GLU_PTR(GLint, gluBuild2DMipmaps,
28372+ (GLenum arg_0, GLint arg_1, GLsizei arg_2,
28373+ GLsizei arg_3, GLenum arg_4, GLenum arg_5,
28374+ const GLvoid *arg_6));
28375+ if (ptr_func_gluBuild2DMipmaps == NULL)
28376+ ptr_func_gluBuild2DMipmaps = mesa_gluBuild2DMipmaps;
28377+ ptr_func_gluBuild2DMipmaps(ARG_TO_UNSIGNED_INT(args[0]),
28378+ ARG_TO_INT(args[1]),
28379+ ARG_TO_INT(args[2]),
28380+ ARG_TO_INT(args[3]),
28381+ ARG_TO_UNSIGNED_INT(args[4]),
28382+ ARG_TO_UNSIGNED_INT(args[5]),
28383+ (const void *) (args[6]));
28384+ break;
28385+ }
28386+
28387+ case _glSelectBuffer_fake_func:
28388+ {
28389+ process->current_state->selectBufferSize = args[0] * 4;
28390+ process->current_state->selectBufferPtr =
28391+ realloc(process->current_state->selectBufferPtr,
28392+ process->current_state->selectBufferSize);
28393+ glSelectBuffer(args[0], process->current_state->selectBufferPtr);
28394+ break;
28395+ }
28396+
28397+ case _glGetSelectBuffer_fake_func:
28398+ {
28399+ void *ptr = (void *) args[0];
28400+
28401+ memcpy(ptr, process->current_state->selectBufferPtr,
28402+ process->current_state->selectBufferSize);
28403+ break;
28404+ }
28405+
28406+ case _glFeedbackBuffer_fake_func:
28407+ {
28408+ process->current_state->feedbackBufferSize = args[0] * 4;
28409+ process->current_state->feedbackBufferPtr =
28410+ realloc(process->current_state->feedbackBufferPtr,
28411+ process->current_state->feedbackBufferSize);
28412+ glFeedbackBuffer(args[0], args[1],
28413+ process->current_state->feedbackBufferPtr);
28414+ break;
28415+ }
28416+
28417+ case _glGetFeedbackBuffer_fake_func:
28418+ {
28419+ void *ptr = (void *) args[0];
28420+
28421+ memcpy(ptr, process->current_state->feedbackBufferPtr,
28422+ process->current_state->feedbackBufferSize);
28423+ break;
28424+ }
28425+
28426+ /*
28427+ * case glEnableClientState_func: { if (display_function_call)
28428+ * fprintf(stderr, "cap : %s\n", nameArrays[args[0] -
28429+ * GL_VERTEX_ARRAY]); glEnableClientState(args[0]); break; }
28430+ *
28431+ * case glDisableClientState_func: { if (display_function_call)
28432+ * fprintf(stderr, "cap : %s\n", nameArrays[args[0] -
28433+ * GL_VERTEX_ARRAY]); glDisableClientState(args[0]); break; }
28434+ *
28435+ * case glClientActiveTexture_func: case
28436+ * glClientActiveTextureARB_func: { if (display_function_call)
28437+ * fprintf(stderr, "client activeTexture %d\n", args[0] -
28438+ * GL_TEXTURE0_ARB); glClientActiveTextureARB(args[0]); break; }
28439+ *
28440+ * case glActiveTextureARB_func: { if (display_function_call)
28441+ * fprintf(stderr, "server activeTexture %d\n", args[0] -
28442+ * GL_TEXTURE0_ARB); glActiveTextureARB(args[0]); break; }
28443+ *
28444+ * case glLockArraysEXT_func: break;
28445+ *
28446+ * case glUnlockArraysEXT_func: break;
28447+ *
28448+ * case glArrayElement_func: { glArrayElement(args[0]); break; }
28449+ *
28450+ * case glDrawArrays_func: { glDrawArrays(args[0],args[1],args[2]);
28451+ * break; }
28452+ *
28453+ * case glDrawElements_func: {
28454+ * glDrawElements(args[0],args[1],args[2],(void*)args[3]); break; }
28455+ *
28456+ * case glDrawRangeElements_func: {
28457+ * glDrawRangeElements(args[0],args[1],args[2],args[3],args[4],(void*)args[5]);
28458+ * break; } */
28459+
28460+ case glGetError_func:
28461+ {
28462+#ifdef SYSTEMATIC_ERROR_CHECK
28463+ ret_int = process->current_state->last_error;
28464+#else
28465+ ret_int = glGetError();
28466+#endif
28467+ break;
28468+ }
28469+
28470+ case glNewObjectBufferATI_func:
28471+ {
28472+ GET_EXT_PTR(int, glNewObjectBufferATI, (int, void *, int));
28473+
28474+ ret_int = ptr_func_glNewObjectBufferATI(args[0],
28475+ (void *) args[1], args[2]);
28476+ break;
28477+ }
28478+
28479+ case glClear_func:
28480+ /* HACK workaround for an unexplainable issue */
28481+ if (args[0] & GL_COLOR_BUFFER_BIT)
28482+ glClear(GL_COLOR_BUFFER_BIT);
28483+ if (args[0] & GL_STENCIL_BUFFER_BIT)
28484+ glClear(GL_STENCIL_BUFFER_BIT);
28485+ if (args[0] & GL_DEPTH_BUFFER_BIT)
28486+ glClear(GL_DEPTH_BUFFER_BIT);
28487+ if (args[0] & GL_ACCUM_BUFFER_BIT)
28488+ glClear(GL_ACCUM_BUFFER_BIT);
28489+ break;
28490+
28491+ default:
28492+ execute_func(func_number, args, &ret_int, &ret_char);
28493+ break;
28494+ }
28495+
28496+#ifdef SYSTEMATIC_ERROR_CHECK
28497+ if (func_number == glGetError_func) {
28498+ process->current_state->last_error = 0;
28499+ } else {
28500+ process->current_state->last_error = glGetError();
28501+ if (process->current_state->last_error != 0) {
28502+ printf("error %s 0x%x\n", tab_opengl_calls_name[func_number],
28503+ process->current_state->last_error);
28504+ }
28505+ }
28506+#endif
28507+
28508+ switch (ret_type) {
28509+ case TYPE_NONE:
28510+ break;
28511+
28512+ case TYPE_CHAR:
28513+ case TYPE_UNSIGNED_CHAR:
28514+ ret_int = ret_char;
28515+ break;
28516+
28517+ case TYPE_INT:
28518+ case TYPE_UNSIGNED_INT:
28519+ break;
28520+
28521+ case TYPE_CONST_CHAR:
28522+ {
28523+ strncpy(ret_string, (ret_str) ? ret_str : "", 32768);
28524+ break;
28525+ }
28526+
28527+ default:
28528+ fprintf(stderr, "unexpected ret type : %d\n", ret_type);
28529+ exit(-1);
28530+ break;
28531+ }
28532+
28533+ if (display_function_call)
28534+ fprintf(stderr, "[%d]< %s\n", process->instr_counter,
28535+ tab_opengl_calls_name[func_number]);
28536+
28537+ return ret_int;
28538+}
28539Index: qemu-0.13.0/target-i386/opengl_func.h
28540===================================================================
28541--- /dev/null 1970-01-01 00:00:00.000000000 +0000
28542+++ qemu-0.13.0/target-i386/opengl_func.h 2011-01-17 16:42:36.000000000 +0800
28543@@ -0,0 +1,1108 @@
28544+/*
28545+ * Main header for both host and guest sides
28546+ *
28547+ * Copyright (c) 2006,2007 Even Rouault
28548+ *
28549+ * Permission is hereby granted, free of charge, to any person obtaining a copy
28550+ * of this software and associated documentation files (the "Software"), to deal
28551+ * in the Software without restriction, including without limitation the rights
28552+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
28553+ * copies of the Software, and to permit persons to whom the Software is
28554+ * furnished to do so, subject to the following conditions:
28555+ *
28556+ * The above copyright notice and this permission notice shall be included in
28557+ * all copies or substantial portions of the Software.
28558+ *
28559+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28560+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28561+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
28562+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28563+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28564+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28565+ * THE SOFTWARE.
28566+ */
28567+
28568+#include "mesa_gl.h"
28569+#include "mesa_glext.h"
28570+
28571+/* Argument list are internally of a type that can hold a target pointer
28572+ * or a host pointer. */
28573+typedef target_phys_addr_t arg_t;
28574+
28575+enum {
28576+ TYPE_NONE,
28577+ TYPE_CHAR,
28578+ TYPE_UNSIGNED_CHAR,
28579+ TYPE_SHORT,
28580+ TYPE_UNSIGNED_SHORT,
28581+ TYPE_INT,
28582+ TYPE_UNSIGNED_INT,
28583+ TYPE_FLOAT,
28584+ TYPE_DOUBLE,
28585+ TYPE_1CHAR,
28586+ TYPE_2CHAR,
28587+ TYPE_3CHAR,
28588+ TYPE_4CHAR,
28589+ TYPE_128UCHAR,
28590+ TYPE_1SHORT,
28591+ TYPE_2SHORT,
28592+ TYPE_3SHORT,
28593+ TYPE_4SHORT,
28594+ TYPE_1INT,
28595+ TYPE_2INT,
28596+ TYPE_3INT,
28597+ TYPE_4INT,
28598+ TYPE_1FLOAT,
28599+ TYPE_2FLOAT,
28600+ TYPE_3FLOAT,
28601+ TYPE_4FLOAT,
28602+ TYPE_16FLOAT,
28603+ TYPE_1DOUBLE,
28604+ TYPE_2DOUBLE,
28605+ TYPE_3DOUBLE,
28606+ TYPE_4DOUBLE,
28607+ TYPE_16DOUBLE,
28608+ TYPE_OUT_1INT,
28609+ TYPE_OUT_1FLOAT,
28610+ TYPE_OUT_4CHAR,
28611+ TYPE_OUT_4INT,
28612+ TYPE_OUT_4FLOAT,
28613+ TYPE_OUT_4DOUBLE,
28614+ TYPE_OUT_128UCHAR,
28615+ TYPE_CONST_CHAR,
28616+ TYPE_ARRAY_CHAR,
28617+ TYPE_ARRAY_SHORT,
28618+ TYPE_ARRAY_INT,
28619+ TYPE_ARRAY_FLOAT,
28620+ TYPE_ARRAY_DOUBLE,
28621+ TYPE_IN_IGNORED_POINTER,
28622+ TYPE_OUT_ARRAY_CHAR,
28623+ TYPE_OUT_ARRAY_SHORT,
28624+ TYPE_OUT_ARRAY_INT,
28625+ TYPE_OUT_ARRAY_FLOAT,
28626+ TYPE_OUT_ARRAY_DOUBLE,
28627+ TYPE_NULL_TERMINATED_STRING,
28628+
28629+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28630+ TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28631+ TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28632+ TYPE_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28633+ TYPE_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28634+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28635+ TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28636+ TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28637+ TYPE_OUT_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28638+ TYPE_OUT_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28639+ /* .... */
28640+ TYPE_LAST,
28641+ /* .... */
28642+ TYPE_1UCHAR = TYPE_CHAR,
28643+ TYPE_1USHORT = TYPE_1SHORT,
28644+ TYPE_1UINT = TYPE_1INT,
28645+ TYPE_OUT_1UINT = TYPE_OUT_1INT,
28646+ TYPE_OUT_4UCHAR = TYPE_OUT_4CHAR,
28647+ TYPE_ARRAY_VOID = TYPE_ARRAY_CHAR,
28648+ TYPE_ARRAY_SIGNED_CHAR = TYPE_ARRAY_CHAR,
28649+ TYPE_ARRAY_UNSIGNED_CHAR = TYPE_ARRAY_CHAR,
28650+ TYPE_ARRAY_UNSIGNED_SHORT = TYPE_ARRAY_SHORT,
28651+ TYPE_ARRAY_UNSIGNED_INT = TYPE_ARRAY_INT,
28652+ TYPE_OUT_ARRAY_VOID = TYPE_OUT_ARRAY_CHAR,
28653+ TYPE_OUT_ARRAY_SIGNED_CHAR = TYPE_OUT_ARRAY_CHAR,
28654+ TYPE_OUT_ARRAY_UNSIGNED_CHAR = TYPE_OUT_ARRAY_CHAR,
28655+ TYPE_OUT_ARRAY_UNSIGNED_SHORT = TYPE_OUT_ARRAY_SHORT,
28656+ TYPE_OUT_ARRAY_UNSIGNED_INT = TYPE_OUT_ARRAY_INT,
28657+ TYPE_ARRAY_VOID_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28658+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28659+ TYPE_ARRAY_SIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28660+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28661+ TYPE_ARRAY_UNSIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28662+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28663+ TYPE_ARRAY_UNSIGNED_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28664+ TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28665+ TYPE_ARRAY_UNSIGNED_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28666+ TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28667+ TYPE_OUT_ARRAY_VOID_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28668+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28669+ TYPE_OUT_ARRAY_SIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28670+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28671+ TYPE_OUT_ARRAY_UNSIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28672+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28673+ TYPE_OUT_ARRAY_UNSIGNED_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28674+ TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28675+ TYPE_OUT_ARRAY_UNSIGNED_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28676+ TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28677+};
28678+
28679+#define CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS \
28680+ case TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28681+ case TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28682+ case TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28683+ case TYPE_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28684+ case TYPE_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28685+
28686+#define CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS \
28687+ case TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28688+ case TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28689+ case TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28690+ case TYPE_OUT_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28691+ case TYPE_OUT_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28692+
28693+#define CASE_IN_UNKNOWN_SIZE_POINTERS \
28694+ case TYPE_ARRAY_CHAR: \
28695+ case TYPE_ARRAY_SHORT: \
28696+ case TYPE_ARRAY_INT: \
28697+ case TYPE_ARRAY_FLOAT: \
28698+ case TYPE_ARRAY_DOUBLE
28699+
28700+#define CASE_IN_KNOWN_SIZE_POINTERS \
28701+ case TYPE_1CHAR:\
28702+ case TYPE_2CHAR:\
28703+ case TYPE_3CHAR:\
28704+ case TYPE_4CHAR:\
28705+ case TYPE_128UCHAR:\
28706+ case TYPE_1SHORT:\
28707+ case TYPE_2SHORT:\
28708+ case TYPE_3SHORT:\
28709+ case TYPE_4SHORT:\
28710+ case TYPE_1INT:\
28711+ case TYPE_2INT:\
28712+ case TYPE_3INT:\
28713+ case TYPE_4INT:\
28714+ case TYPE_1FLOAT:\
28715+ case TYPE_2FLOAT:\
28716+ case TYPE_3FLOAT:\
28717+ case TYPE_4FLOAT:\
28718+ case TYPE_16FLOAT:\
28719+ case TYPE_1DOUBLE:\
28720+ case TYPE_2DOUBLE:\
28721+ case TYPE_3DOUBLE:\
28722+ case TYPE_4DOUBLE:\
28723+ case TYPE_16DOUBLE
28724+
28725+#define CASE_OUT_UNKNOWN_SIZE_POINTERS \
28726+ case TYPE_OUT_ARRAY_CHAR: \
28727+ case TYPE_OUT_ARRAY_SHORT: \
28728+ case TYPE_OUT_ARRAY_INT: \
28729+ case TYPE_OUT_ARRAY_FLOAT: \
28730+ case TYPE_OUT_ARRAY_DOUBLE
28731+
28732+#define CASE_OUT_KNOWN_SIZE_POINTERS \
28733+ case TYPE_OUT_1INT: \
28734+ case TYPE_OUT_1FLOAT: \
28735+ case TYPE_OUT_4CHAR: \
28736+ case TYPE_OUT_4INT: \
28737+ case TYPE_OUT_4FLOAT: \
28738+ case TYPE_OUT_4DOUBLE: \
28739+ case TYPE_OUT_128UCHAR \
28740+
28741+#define CASE_IN_POINTERS CASE_IN_UNKNOWN_SIZE_POINTERS: CASE_IN_KNOWN_SIZE_POINTERS: CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28742+#define CASE_OUT_POINTERS CASE_OUT_UNKNOWN_SIZE_POINTERS: CASE_OUT_KNOWN_SIZE_POINTERS: CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28743+
28744+#define CASE_POINTERS CASE_IN_POINTERS: CASE_OUT_POINTERS
28745+#define CASE_KNOWN_SIZE_POINTERS CASE_IN_KNOWN_SIZE_POINTERS: CASE_OUT_KNOWN_SIZE_POINTERS
28746+
28747+
28748+#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)
28749+#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)
28750+#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)
28751+#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)
28752+#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)
28753+
28754+#define NB_MAX_TEXTURES 16
28755+#define MY_GL_MAX_VERTEX_ATTRIBS_ARB 16
28756+#define MY_GL_MAX_VERTEX_ATTRIBS_NV 16
28757+#define MY_GL_MAX_VARIANT_POINTER_EXT 16
28758+
28759+static int tab_args_type_length[] = {
28760+ 0,
28761+ sizeof(char),
28762+ sizeof(unsigned char),
28763+ sizeof(short),
28764+ sizeof(unsigned short),
28765+ sizeof(int),
28766+ sizeof(unsigned int),
28767+ sizeof(float),
28768+ sizeof(double),
28769+ 1 * sizeof(char),
28770+ 2 * sizeof(char),
28771+ 3 * sizeof(char),
28772+ 4 * sizeof(char),
28773+ 128 * sizeof(char),
28774+ 1 * sizeof(short),
28775+ 2 * sizeof(short),
28776+ 3 * sizeof(short),
28777+ 4 * sizeof(short),
28778+ 1 * sizeof(int),
28779+ 2 * sizeof(int),
28780+ 3 * sizeof(int),
28781+ 4 * sizeof(int),
28782+ 1 * sizeof(float),
28783+ 2 * sizeof(float),
28784+ 3 * sizeof(float),
28785+ 4 * sizeof(float),
28786+ 16 * sizeof(float),
28787+ 1 * sizeof(double),
28788+ 2 * sizeof(double),
28789+ 3 * sizeof(double),
28790+ 4 * sizeof(double),
28791+ 16 * sizeof(double),
28792+ sizeof(int),
28793+ sizeof(float),
28794+ 4 * sizeof(char),
28795+ 4 * sizeof(int),
28796+ 4 * sizeof(float),
28797+ 4 * sizeof(double),
28798+ 128 * sizeof(char),
28799+ 0,
28800+ 0,
28801+ 0,
28802+ 0,
28803+ 0,
28804+ 0,
28805+ 0,
28806+ 0,
28807+ 0,
28808+ 0,
28809+ 0,
28810+ 0,
28811+ 0,
28812+
28813+ /* the following sizes are the size of 1 element of the array */
28814+ sizeof(char),
28815+ sizeof(short),
28816+ sizeof(int),
28817+ sizeof(float),
28818+ sizeof(double),
28819+ sizeof(char),
28820+ sizeof(short),
28821+ sizeof(int),
28822+ sizeof(float),
28823+ sizeof(double),
28824+};
28825+
28826+typedef struct {
28827+ int ret_type;
28828+ int has_out_parameters;
28829+ int nb_args;
28830+ int args_type[0];
28831+} Signature;
28832+
28833+static const int _init32_signature[] =
28834+ { TYPE_NONE, 1, 2, TYPE_INT, TYPE_OUT_1INT };
28835+static const int _init64_signature[] =
28836+ { TYPE_NONE, 1, 2, TYPE_INT, TYPE_OUT_1INT };
28837+
28838+static const int _synchronize_signature[] = { TYPE_INT, 0, 0 };
28839+
28840+static const int _serialized_calls_signature[] =
28841+ { TYPE_NONE, 0, 1, TYPE_ARRAY_CHAR };
28842+
28843+static const int _exit_process_signature[] = { TYPE_NONE, 0, 0 };
28844+
28845+static const int _changeWindowState_signature[] =
28846+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
28847+
28848+static const int _moveResizeWindow_signature[] =
28849+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_4INT };
28850+
28851+static const int _send_cursor_signature[] =
28852+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT,
28853+ TYPE_INT, TYPE_INT,
28854+ TYPE_INT, TYPE_INT,
28855+ TYPE_ARRAY_INT
28856+};
28857+
28858+/* XVisualInfo* glXChooseVisual( Display *dpy, int screen, int *attribList ) */
28859+static const int glXChooseVisual_signature[] =
28860+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT };
28861+
28862+/*GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis,
28863+ GLXContext shareList, Bool direct )*/
28864+static const int glXCreateContext_signature[] =
28865+ { TYPE_INT, 0, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT };
28866+
28867+static const int glXCopyContext_signature[] =
28868+ { TYPE_NONE, 0, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28869+TYPE_INT };
28870+
28871+/* void glXDestroyContext( Display *dpy, GLXContext ctx ) */
28872+static const int glXDestroyContext_signature[] =
28873+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28874+
28875+/* Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable, GLXContext ctx) */
28876+//static const int glXMakeCurrent_signature[] = {TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT};
28877+/* making it asynchronous */
28878+static const int glXMakeCurrent_signature[] =
28879+ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
28880+
28881+/*int glXGetConfig( Display *dpy, XVisualInfo *visual,
28882+ int attrib, int *value )*/
28883+static const int glXGetConfig_signature[] =
28884+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28885+TYPE_OUT_1INT };
28886+
28887+/* "glXGetConfig_extended"(dpy, visual_id, int n, int* attribs, int* values, int* rets) */
28888+static const int glXGetConfig_extended_signature[] =
28889+ { TYPE_NONE, 1, 6, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28890+TYPE_ARRAY_INT, TYPE_OUT_ARRAY_INT, TYPE_OUT_ARRAY_INT };
28891+
28892+/* void glXSwapBuffers( Display *dpy, GLXDrawable drawable ); */
28893+static const int glXSwapBuffers_signature[] =
28894+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28895+
28896+/* Bool glXQueryVersion( Display *dpy, int *maj, int *min ) */
28897+static const int glXQueryVersion_signature[] =
28898+ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_OUT_1INT, TYPE_OUT_1INT };
28899+
28900+/* Bool glXQueryExtension( Display *dpy, int *errorBase, int *eventBase ) */
28901+static const int glXQueryExtension_signature[] =
28902+ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_OUT_1INT, TYPE_OUT_1INT };
28903+
28904+static const int glXWaitGL_signature[] = { TYPE_INT, 0, 0 };
28905+static const int glXWaitX_signature[] = { TYPE_INT, 0, 0 };
28906+
28907+/* GLX 1.1 and later */
28908+
28909+/* const char *glXGetClientString( Display *dpy, int name ) */
28910+static const int glXGetClientString_signature[] =
28911+ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28912+
28913+/*const char *glXQueryExtensionsString( Display *dpy, int screen ) */
28914+static const int glXQueryExtensionsString_signature[] =
28915+ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28916+
28917+/* const char *glXQueryServerString( Display *dpy, int screen, int name ) */
28918+static const int glXQueryServerString_signature[] =
28919+ { TYPE_CONST_CHAR, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
28920+
28921+
28922+static const int glXGetProcAddress_fake_signature[] =
28923+ { TYPE_INT, 0, 1, TYPE_NULL_TERMINATED_STRING };
28924+
28925+static const int glXGetProcAddress_global_fake_signature[] =
28926+ { TYPE_NONE, 1, 3, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_OUT_ARRAY_CHAR };
28927+
28928+
28929+/* GLX 1.3 and later */
28930+
28931+/*
28932+GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
28933+ const int *attribList, int *nitems ); */
28934+static const int glXChooseFBConfig_signature[] =
28935+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT,
28936+TYPE_OUT_1INT };
28937+
28938+static const int glXChooseFBConfigSGIX_signature[] =
28939+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT,
28940+TYPE_OUT_1INT };
28941+
28942+static const int glXGetFBConfigs_signature[] =
28943+ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_OUT_1INT };
28944+
28945+/* "glXGetFBConfigAttrib_extended"(dpy, fbconfig, int n, int* attribs, int* values, int* rets) */
28946+static const int glXGetFBConfigAttrib_extended_signature[] =
28947+ { TYPE_NONE, 1, 6, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28948+TYPE_ARRAY_INT, TYPE_OUT_ARRAY_INT, TYPE_OUT_ARRAY_INT };
28949+
28950+
28951+/* GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config,
28952+ const int *attribList ) */
28953+static const int glXCreatePbuffer_signature[] =
28954+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT };
28955+
28956+static const int glXCreateGLXPbufferSGIX_signature[] =
28957+ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
28958+TYPE_ARRAY_INT };
28959+
28960+static const int glXDestroyPbuffer_signature[] =
28961+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28962+
28963+static const int glXDestroyGLXPbufferSGIX_signature[] =
28964+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28965+
28966+/* GLXContext glXCreateNewContext(Display * dpy
28967+ GLXFBConfig config
28968+ int renderType
28969+ GLXContext ShareList
28970+ Bool Direct) */
28971+static const int glXCreateNewContext_signature[] =
28972+ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
28973+TYPE_INT };
28974+
28975+static const int glXCreateContextWithConfigSGIX_signature[] =
28976+ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
28977+TYPE_INT };
28978+
28979+/*XVisualInfo *glXGetVisualFromFBConfig( Display *dpy, GLXFBConfig config ) */
28980+static const int glXGetVisualFromFBConfig_signature[] =
28981+ { TYPE_INT, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28982+
28983+/*int glXGetFBConfigAttrib(Display *dpy, GLXFBConfig config, int attribute, int *value)*/
28984+static const int glXGetFBConfigAttrib_signature[] =
28985+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28986+TYPE_OUT_1INT };
28987+
28988+static const int glXGetFBConfigAttribSGIX_signature[] =
28989+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28990+TYPE_OUT_1INT };
28991+
28992+static const int glXQueryContext_signature[] =
28993+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28994+TYPE_OUT_1INT };
28995+
28996+static const int glXQueryGLXPbufferSGIX_signature[] =
28997+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28998+TYPE_OUT_1INT };
28999+
29000+static const int glXQueryDrawable_signature[] =
29001+ { TYPE_NONE, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29002+TYPE_OUT_1INT };
29003+
29004+/* void glXUseXFont( Font font, int first, int count, int list ) */
29005+static const int glXUseXFont_signature[] =
29006+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29007+
29008+/* Bool glXIsDirect( Display *dpy, GLXContext ctx ) */
29009+static const int glXIsDirect_signature[] =
29010+ { TYPE_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29011+
29012+static const int glXGetScreenDriver_signature[] =
29013+ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29014+
29015+static const int glXGetDriverConfig_signature[] =
29016+ { TYPE_CONST_CHAR, 0, 1, TYPE_NULL_TERMINATED_STRING };
29017+
29018+
29019+static const int glXWaitVideoSyncSGI_signature[] =
29020+ { TYPE_INT, 1, 3, TYPE_INT, TYPE_INT, TYPE_OUT_1INT };
29021+
29022+static const int glXGetVideoSyncSGI_signature[] =
29023+ { TYPE_INT, 1, 1, TYPE_OUT_1INT };
29024+
29025+static const int glXSwapIntervalSGI_signature[] =
29026+ { TYPE_INT, 0, 1, TYPE_INT };
29027+
29028+static const int glXBindTexImageATI_signature[] =
29029+ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
29030+static const int glXReleaseTexImageATI_signature[] =
29031+ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
29032+static const int glXBindTexImageARB_signature[] =
29033+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
29034+static const int glXReleaseTexImageARB_signature[] =
29035+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
29036+
29037+/* const GLubyte * glGetString( GLenum name ) */
29038+static const int glGetString_signature[] =
29039+ { TYPE_CONST_CHAR, 0, 1, TYPE_INT };
29040+
29041+/* void glShaderSourceARB (GLhandleARB handle , GLsizei size, const GLcharARB* *p_tab_prog, const GLint * tab_length) */
29042+/* --> void glShaderSourceARB (GLhandleARB handle , GLsizei size, const GLcharARB* all_progs, const GLint * tab_length) */
29043+static const int glShaderSourceARB_fake_signature[] =
29044+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_ARRAY_INT };
29045+static const int glShaderSource_fake_signature[] =
29046+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_ARRAY_INT };
29047+
29048+static const int glVertexPointer_fake_signature[] =
29049+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29050+TYPE_ARRAY_CHAR };
29051+static const int glNormalPointer_fake_signature[] =
29052+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29053+TYPE_ARRAY_CHAR };
29054+static const int glColorPointer_fake_signature[] =
29055+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29056+TYPE_ARRAY_CHAR };
29057+static const int glSecondaryColorPointer_fake_signature[] =
29058+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29059+TYPE_ARRAY_CHAR };
29060+static const int glIndexPointer_fake_signature[] =
29061+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29062+TYPE_ARRAY_CHAR };
29063+static const int glTexCoordPointer_fake_signature[] =
29064+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29065+TYPE_INT, TYPE_ARRAY_CHAR };
29066+static const int glEdgeFlagPointer_fake_signature[] =
29067+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29068+static const int glVertexAttribPointerARB_fake_signature[] =
29069+ { TYPE_NONE, 0, 8, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29070+TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29071+static const int glVertexAttribPointerNV_fake_signature[] =
29072+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29073+TYPE_INT, TYPE_ARRAY_CHAR };
29074+static const int glWeightPointerARB_fake_signature[] =
29075+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29076+TYPE_ARRAY_CHAR };
29077+static const int glMatrixIndexPointerARB_fake_signature[] =
29078+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29079+TYPE_ARRAY_CHAR };
29080+static const int glFogCoordPointer_fake_signature[] =
29081+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29082+TYPE_ARRAY_CHAR };
29083+static const int glInterleavedArrays_fake_signature[] =
29084+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29085+TYPE_ARRAY_CHAR };
29086+static const int glElementPointerATI_fake_signature[] =
29087+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29088+static const int glVariantPointerEXT_fake_signature[] =
29089+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29090+TYPE_ARRAY_CHAR };
29091+static const int glTuxRacerDrawElements_fake_signature[] =
29092+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29093+static const int glVertexAndNormalPointer_fake_signature[] =
29094+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29095+TYPE_INT, TYPE_ARRAY_CHAR };
29096+static const int glTexCoordPointer01_fake_signature[] =
29097+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29098+TYPE_ARRAY_CHAR };
29099+static const int glTexCoordPointer012_fake_signature[] =
29100+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29101+TYPE_ARRAY_CHAR };
29102+static const int glVertexNormalPointerInterlaced_fake_signature[] =
29103+ { TYPE_NONE, 0, 8, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29104+TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29105+static const int glVertexNormalColorPointerInterlaced_fake_signature[] =
29106+ { TYPE_NONE, 0, 11, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29107+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29108+static const int glVertexColorTexCoord0PointerInterlaced_fake_signature[] =
29109+ { TYPE_NONE, 0, 12, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29110+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29111+static const int glVertexNormalTexCoord0PointerInterlaced_fake_signature[] =
29112+ { TYPE_NONE, 0, 11, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29113+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29114+static const int glVertexNormalTexCoord01PointerInterlaced_fake_signature[] =
29115+ { TYPE_NONE, 0, 14, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29116+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29117+static const int glVertexNormalTexCoord012PointerInterlaced_fake_signature[] =
29118+ { TYPE_NONE, 0, 17, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29119+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 };
29120+static const int
29121+ glVertexNormalColorTexCoord0PointerInterlaced_fake_signature[] =
29122+ { TYPE_NONE, 0, 14, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29123+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29124+TYPE_ARRAY_CHAR };
29125+static const int
29126+ glVertexNormalColorTexCoord01PointerInterlaced_fake_signature[] =
29127+ { TYPE_NONE, 0, 17, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29128+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29129+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29130+static const int
29131+ glVertexNormalColorTexCoord012PointerInterlaced_fake_signature[] =
29132+ { TYPE_NONE, 0, 20, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29133+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29134+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29135+
29136+static const int glGenTextures_fake_signature[] =
29137+ { TYPE_NONE, 0, 1, TYPE_INT };
29138+static const int glGenBuffersARB_fake_signature[] =
29139+ { TYPE_NONE, 0, 1, TYPE_INT };
29140+static const int glGenLists_fake_signature[] = { TYPE_NONE, 0, 1, TYPE_INT };
29141+
29142+static const int _glDrawElements_buffer_signature[] =
29143+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29144+static const int _glDrawRangeElements_buffer_signature[] =
29145+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29146+TYPE_INT };
29147+static const int _glMultiDrawElements_buffer_signature[] =
29148+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_ARRAY_INT, TYPE_INT, TYPE_ARRAY_INT,
29149+TYPE_INT };
29150+
29151+static const int _glVertexPointer_buffer_signature[] =
29152+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29153+static const int _glNormalPointer_buffer_signature[] =
29154+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
29155+static const int _glColorPointer_buffer_signature[] =
29156+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29157+static const int _glSecondaryColorPointer_buffer_signature[] =
29158+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29159+static const int _glIndexPointer_buffer_signature[] =
29160+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
29161+static const int _glTexCoordPointer_buffer_signature[] =
29162+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29163+static const int _glEdgeFlagPointer_buffer_signature[] =
29164+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
29165+static const int _glVertexAttribPointerARB_buffer_signature[] =
29166+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29167+TYPE_INT };
29168+static const int _glWeightPointerARB_buffer_signature[] =
29169+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29170+static const int _glMatrixIndexPointerARB_buffer_signature[] =
29171+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29172+static const int _glFogCoordPointer_buffer_signature[] =
29173+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
29174+static const int _glVariantPointerEXT_buffer_signature[] =
29175+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29176+
29177+static const int _glReadPixels_pbo_signature[] =
29178+ { TYPE_INT, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29179+TYPE_INT, TYPE_INT };
29180+static const int _glDrawPixels_pbo_signature[] =
29181+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29182+static const int _glMapBufferARB_fake_signature[] =
29183+ { TYPE_INT, 1, 3, TYPE_INT, TYPE_INT, TYPE_OUT_ARRAY_CHAR };
29184+
29185+static const int _glSelectBuffer_fake_signature[] =
29186+ { TYPE_NONE, 0, 1, TYPE_INT };
29187+static const int _glGetSelectBuffer_fake_signature[] =
29188+ { TYPE_NONE, 1, 1, TYPE_ARRAY_CHAR };
29189+static const int _glFeedbackBuffer_fake_signature[] =
29190+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
29191+static const int _glGetFeedbackBuffer_fake_signature[] =
29192+ { TYPE_NONE, 1, 1, TYPE_ARRAY_CHAR };
29193+
29194+static const int _glGetError_fake_signature[] = { TYPE_NONE, 0, 0 };
29195+
29196+#define timesynchro_func -1
29197+#define memorize_array_func -2
29198+#define reuse_array_func -3
29199+
29200+#include "gl_func.h"
29201+
29202+static GLint __glTexParameter_size(FILE *err_file, GLenum pname)
29203+{
29204+ switch (pname) {
29205+ case GL_TEXTURE_MAG_FILTER:
29206+ case GL_TEXTURE_MIN_FILTER:
29207+ case GL_TEXTURE_WRAP_S:
29208+ case GL_TEXTURE_WRAP_T:
29209+ case GL_TEXTURE_PRIORITY:
29210+ case GL_TEXTURE_WRAP_R:
29211+ case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
29212+/* case GL_SHADOW_AMBIENT_SGIX:*/
29213+ case GL_TEXTURE_MIN_LOD:
29214+ case GL_TEXTURE_MAX_LOD:
29215+ case GL_TEXTURE_BASE_LEVEL:
29216+ case GL_TEXTURE_MAX_LEVEL:
29217+ case GL_TEXTURE_CLIPMAP_FRAME_SGIX:
29218+ case GL_TEXTURE_LOD_BIAS_S_SGIX:
29219+ case GL_TEXTURE_LOD_BIAS_T_SGIX:
29220+ case GL_TEXTURE_LOD_BIAS_R_SGIX:
29221+ case GL_GENERATE_MIPMAP:
29222+/* case GL_GENERATE_MIPMAP_SGIS:*/
29223+ case GL_TEXTURE_COMPARE_SGIX:
29224+ case GL_TEXTURE_COMPARE_OPERATOR_SGIX:
29225+ case GL_TEXTURE_MAX_CLAMP_S_SGIX:
29226+ case GL_TEXTURE_MAX_CLAMP_T_SGIX:
29227+ case GL_TEXTURE_MAX_CLAMP_R_SGIX:
29228+ case GL_TEXTURE_MAX_ANISOTROPY_EXT:
29229+ case GL_TEXTURE_LOD_BIAS:
29230+/* case GL_TEXTURE_LOD_BIAS_EXT:*/
29231+ case GL_DEPTH_TEXTURE_MODE:
29232+/* case GL_DEPTH_TEXTURE_MODE_ARB:*/
29233+ case GL_TEXTURE_COMPARE_MODE:
29234+/* case GL_TEXTURE_COMPARE_MODE_ARB:*/
29235+ case GL_TEXTURE_COMPARE_FUNC:
29236+/* case GL_TEXTURE_COMPARE_FUNC_ARB:*/
29237+ case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV:
29238+ return 1;
29239+ case GL_TEXTURE_CLIPMAP_CENTER_SGIX:
29240+ case GL_TEXTURE_CLIPMAP_OFFSET_SGIX:
29241+ return 2;
29242+ case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX:
29243+ return 3;
29244+ case GL_TEXTURE_BORDER_COLOR:
29245+ case GL_POST_TEXTURE_FILTER_BIAS_SGIX:
29246+ case GL_POST_TEXTURE_FILTER_SCALE_SGIX:
29247+ return 4;
29248+ default:
29249+ fprintf(err_file, "unhandled pname = %d\n", pname);
29250+ return 0;
29251+ }
29252+}
29253+
29254+static int __glLight_size(FILE *err_file, GLenum pname)
29255+{
29256+ switch (pname) {
29257+ case GL_AMBIENT:
29258+ case GL_DIFFUSE:
29259+ case GL_SPECULAR:
29260+ case GL_POSITION:
29261+ return 4;
29262+ break;
29263+
29264+ case GL_SPOT_DIRECTION:
29265+ return 3;
29266+ break;
29267+
29268+ case GL_SPOT_EXPONENT:
29269+ case GL_SPOT_CUTOFF:
29270+ case GL_CONSTANT_ATTENUATION:
29271+ case GL_LINEAR_ATTENUATION:
29272+ case GL_QUADRATIC_ATTENUATION:
29273+ return 1;
29274+ break;
29275+
29276+ default:
29277+ fprintf(err_file, "unhandled pname = %d\n", pname);
29278+ return 0;
29279+ }
29280+}
29281+
29282+static int __glMaterial_size(FILE *err_file, GLenum pname)
29283+{
29284+ switch (pname) {
29285+ case GL_AMBIENT:
29286+ case GL_DIFFUSE:
29287+ case GL_SPECULAR:
29288+ case GL_EMISSION:
29289+ case GL_AMBIENT_AND_DIFFUSE:
29290+ return 4;
29291+ break;
29292+
29293+ case GL_SHININESS:
29294+ return 1;
29295+ break;
29296+
29297+ case GL_COLOR_INDEXES:
29298+ return 3;
29299+ break;
29300+
29301+ default:
29302+ fprintf(err_file, "unhandled pname = %d\n", pname);
29303+ return 0;
29304+ }
29305+}
29306+
29307+static inline int compute_arg_length(FILE *err_file, int func_number,
29308+ int arg_i, arg_t *args)
29309+{
29310+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
29311+ int *args_type = signature->args_type;
29312+
29313+ switch (func_number) {
29314+ case glProgramNamedParameter4fNV_func:
29315+ case glProgramNamedParameter4dNV_func:
29316+ case glProgramNamedParameter4fvNV_func:
29317+ case glProgramNamedParameter4dvNV_func:
29318+ case glGetProgramNamedParameterfvNV_func:
29319+ case glGetProgramNamedParameterdvNV_func:
29320+ if (arg_i == 2)
29321+ return 1 * args[arg_i - 1] *
29322+ tab_args_type_length[args_type[arg_i]];
29323+ break;
29324+
29325+ case glProgramStringARB_func:
29326+ case glLoadProgramNV_func:
29327+ case glGenProgramsNV_func:
29328+ case glDeleteProgramsNV_func:
29329+ case glGenProgramsARB_func:
29330+ case glDeleteProgramsARB_func:
29331+ case glRequestResidentProgramsNV_func:
29332+ case glDrawBuffers_func:
29333+ case glDrawBuffersARB_func:
29334+ case glDrawBuffersATI_func:
29335+ case glDeleteBuffers_func:
29336+ case glDeleteBuffersARB_func:
29337+ case glDeleteTextures_func:
29338+ case glDeleteTexturesEXT_func:
29339+ case glGenFramebuffersEXT_func:
29340+ case glDeleteFramebuffersEXT_func:
29341+ case glGenRenderbuffersEXT_func:
29342+ case glDeleteRenderbuffersEXT_func:
29343+ case glGenQueries_func:
29344+ case glGenQueriesARB_func:
29345+ case glDeleteQueries_func:
29346+ case glDeleteQueriesARB_func:
29347+ case glGenOcclusionQueriesNV_func:
29348+ case glDeleteOcclusionQueriesNV_func:
29349+ case glGenFencesNV_func:
29350+ case glDeleteFencesNV_func:
29351+ case glUniform1fv_func:
29352+ case glUniform1iv_func:
29353+ case glUniform1fvARB_func:
29354+ case glUniform1ivARB_func:
29355+ case glUniform1uivEXT_func:
29356+ case glVertexAttribs1dvNV_func:
29357+ case glVertexAttribs1fvNV_func:
29358+ case glVertexAttribs1svNV_func:
29359+ case glVertexAttribs1hvNV_func:
29360+ case glWeightbvARB_func:
29361+ case glWeightsvARB_func:
29362+ case glWeightivARB_func:
29363+ case glWeightfvARB_func:
29364+ case glWeightdvARB_func:
29365+ case glWeightubvARB_func:
29366+ case glWeightusvARB_func:
29367+ case glWeightuivARB_func:
29368+ case glPixelMapfv_func:
29369+ case glPixelMapuiv_func:
29370+ case glPixelMapusv_func:
29371+ case glProgramBufferParametersfvNV_func:
29372+ case glProgramBufferParametersIivNV_func:
29373+ case glProgramBufferParametersIuivNV_func:
29374+ case glTransformFeedbackAttribsNV_func:
29375+ case glTransformFeedbackVaryingsNV_func:
29376+ if (arg_i == signature->nb_args - 1)
29377+ return 1 * args[arg_i - 1] *
29378+ tab_args_type_length[args_type[arg_i]];
29379+ break;
29380+
29381+ case glUniform2fv_func:
29382+ case glUniform2iv_func:
29383+ case glUniform2fvARB_func:
29384+ case glUniform2ivARB_func:
29385+ case glUniform2uivEXT_func:
29386+ case glVertexAttribs2dvNV_func:
29387+ case glVertexAttribs2fvNV_func:
29388+ case glVertexAttribs2svNV_func:
29389+ case glVertexAttribs2hvNV_func:
29390+ case glDetailTexFuncSGIS_func:
29391+ case glSharpenTexFuncSGIS_func:
29392+ if (arg_i == signature->nb_args - 1)
29393+ return 2 * args[arg_i - 1] *
29394+ tab_args_type_length[args_type[arg_i]];
29395+ break;
29396+
29397+ case glUniform3fv_func:
29398+ case glUniform3iv_func:
29399+ case glUniform3fvARB_func:
29400+ case glUniform3ivARB_func:
29401+ case glUniform3uivEXT_func:
29402+ case glVertexAttribs3dvNV_func:
29403+ case glVertexAttribs3fvNV_func:
29404+ case glVertexAttribs3svNV_func:
29405+ case glVertexAttribs3hvNV_func:
29406+ if (arg_i == signature->nb_args - 1)
29407+ return 3 * args[arg_i - 1] *
29408+ tab_args_type_length[args_type[arg_i]];
29409+ break;
29410+
29411+ case glUniform4fv_func:
29412+ case glUniform4iv_func:
29413+ case glUniform4fvARB_func:
29414+ case glUniform4ivARB_func:
29415+ case glUniform4uivEXT_func:
29416+ case glVertexAttribs4dvNV_func:
29417+ case glVertexAttribs4fvNV_func:
29418+ case glVertexAttribs4svNV_func:
29419+ case glVertexAttribs4hvNV_func:
29420+ case glVertexAttribs4ubvNV_func:
29421+ case glProgramParameters4fvNV_func:
29422+ case glProgramParameters4dvNV_func:
29423+ case glProgramLocalParameters4fvEXT_func:
29424+ case glProgramEnvParameters4fvEXT_func:
29425+ case glProgramLocalParametersI4ivNV_func:
29426+ case glProgramLocalParametersI4uivNV_func:
29427+ case glProgramEnvParametersI4ivNV_func:
29428+ case glProgramEnvParametersI4uivNV_func:
29429+ if (arg_i == signature->nb_args - 1)
29430+ return 4 * args[arg_i - 1] *
29431+ tab_args_type_length[args_type[arg_i]];
29432+ break;
29433+
29434+ case glPrioritizeTextures_func:
29435+ case glPrioritizeTexturesEXT_func:
29436+ case glAreProgramsResidentNV_func:
29437+ case glAreTexturesResident_func:
29438+ case glAreTexturesResidentEXT_func:
29439+ if (arg_i == 1 || arg_i == 2)
29440+ return args[0] * tab_args_type_length[args_type[arg_i]];
29441+ break;
29442+
29443+ case glLightfv_func:
29444+ case glLightiv_func:
29445+ case glGetLightfv_func:
29446+ case glGetLightiv_func:
29447+ case glFragmentLightfvSGIX_func:
29448+ case glFragmentLightivSGIX_func:
29449+ case glGetFragmentLightfvSGIX_func:
29450+ case glGetFragmentLightivSGIX_func:
29451+ if (arg_i == signature->nb_args - 1)
29452+ return __glLight_size(err_file,
29453+ args[arg_i -
29454+ 1]) *
29455+ tab_args_type_length[args_type[arg_i]];
29456+ break;
29457+
29458+ case glLightModelfv_func:
29459+ case glLightModeliv_func:
29460+ if (arg_i == signature->nb_args - 1)
29461+ return ((args[arg_i - 1] ==
29462+ GL_LIGHT_MODEL_AMBIENT) ? 4 : 1) *
29463+ tab_args_type_length[args_type[arg_i]];
29464+ break;
29465+
29466+ case glFragmentLightModelfvSGIX_func:
29467+ case glFragmentLightModelivSGIX_func:
29468+ if (arg_i == signature->nb_args - 1)
29469+ return ((args[arg_i - 1] ==
29470+ GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX) ? 4 : 1) *
29471+ tab_args_type_length[args_type[arg_i]];
29472+ break;
29473+
29474+ case glMaterialfv_func:
29475+ case glMaterialiv_func:
29476+ case glGetMaterialfv_func:
29477+ case glGetMaterialiv_func:
29478+ case glFragmentMaterialfvSGIX_func:
29479+ case glFragmentMaterialivSGIX_func:
29480+ case glGetFragmentMaterialfvSGIX_func:
29481+ case glGetFragmentMaterialivSGIX_func:
29482+ if (arg_i == signature->nb_args - 1)
29483+ return __glMaterial_size(err_file,
29484+ args[arg_i -
29485+ 1]) *
29486+ tab_args_type_length[args_type[arg_i]];
29487+ break;
29488+
29489+ case glTexParameterfv_func:
29490+ case glTexParameteriv_func:
29491+ case glGetTexParameterfv_func:
29492+ case glGetTexParameteriv_func:
29493+ case glTexParameterIivEXT_func:
29494+ case glTexParameterIuivEXT_func:
29495+ case glGetTexParameterIivEXT_func:
29496+ case glGetTexParameterIuivEXT_func:
29497+ if (arg_i == signature->nb_args - 1)
29498+ return __glTexParameter_size(err_file,
29499+ args[arg_i -
29500+ 1]) *
29501+ tab_args_type_length[args_type[arg_i]];
29502+ break;
29503+
29504+ case glFogiv_func:
29505+ case glFogfv_func:
29506+ if (arg_i == signature->nb_args - 1)
29507+ return ((args[arg_i - 1] ==
29508+ GL_FOG_COLOR) ? 4 : 1) *
29509+ tab_args_type_length[args_type[arg_i]];
29510+ break;
29511+
29512+ case glTexGendv_func:
29513+ case glTexGenfv_func:
29514+ case glTexGeniv_func:
29515+ case glGetTexGendv_func:
29516+ case glGetTexGenfv_func:
29517+ case glGetTexGeniv_func:
29518+ if (arg_i == signature->nb_args - 1)
29519+ return ((args[arg_i - 1] ==
29520+ GL_TEXTURE_GEN_MODE) ? 1 : 4) *
29521+ tab_args_type_length[args_type[arg_i]];
29522+ break;
29523+
29524+ case glTexEnvfv_func:
29525+ case glTexEnviv_func:
29526+ case glGetTexEnvfv_func:
29527+ case glGetTexEnviv_func:
29528+ if (arg_i == signature->nb_args - 1)
29529+ return ((args[arg_i - 1] ==
29530+ GL_TEXTURE_ENV_MODE) ? 1 : 4) *
29531+ tab_args_type_length[args_type[arg_i]];
29532+ break;
29533+
29534+ case glConvolutionParameterfv_func:
29535+ case glConvolutionParameteriv_func:
29536+ case glGetConvolutionParameterfv_func:
29537+ case glGetConvolutionParameteriv_func:
29538+ case glConvolutionParameterfvEXT_func:
29539+ case glConvolutionParameterivEXT_func:
29540+ case glGetConvolutionParameterfvEXT_func:
29541+ case glGetConvolutionParameterivEXT_func:
29542+ if (arg_i == signature->nb_args - 1)
29543+ return ((args[arg_i - 1] == GL_CONVOLUTION_BORDER_COLOR ||
29544+ args[arg_i - 1] == GL_CONVOLUTION_FILTER_SCALE ||
29545+ args[arg_i - 1] ==
29546+ GL_CONVOLUTION_FILTER_BIAS) ? 4 : 1) *
29547+ tab_args_type_length[args_type[arg_i]];
29548+ break;
29549+
29550+ case glGetVertexAttribfvARB_func:
29551+ case glGetVertexAttribfvNV_func:
29552+ case glGetVertexAttribfv_func:
29553+ case glGetVertexAttribdvARB_func:
29554+ case glGetVertexAttribdvNV_func:
29555+ case glGetVertexAttribdv_func:
29556+ case glGetVertexAttribivARB_func:
29557+ case glGetVertexAttribivNV_func:
29558+ case glGetVertexAttribiv_func:
29559+ case glGetVertexAttribIivEXT_func:
29560+ case glGetVertexAttribIuivEXT_func:
29561+ if (arg_i == signature->nb_args - 1)
29562+ return ((args[arg_i - 1] ==
29563+ GL_CURRENT_VERTEX_ATTRIB_ARB) ? 4 : 1) *
29564+ tab_args_type_length[args_type[arg_i]];
29565+ break;
29566+
29567+
29568+ case glPointParameterfv_func:
29569+ case glPointParameterfvEXT_func:
29570+ case glPointParameterfvARB_func:
29571+ case glPointParameterfvSGIS_func:
29572+ case glPointParameteriv_func:
29573+ case glPointParameterivEXT_func:
29574+ if (arg_i == signature->nb_args - 1)
29575+ return ((args[arg_i - 1] ==
29576+ GL_POINT_DISTANCE_ATTENUATION) ? 3 : 1) *
29577+ tab_args_type_length[args_type[arg_i]];
29578+ break;
29579+
29580+ case glUniformMatrix2fv_func:
29581+ case glUniformMatrix2fvARB_func:
29582+ if (arg_i == signature->nb_args - 1)
29583+ return 2 * 2 * args[1] * tab_args_type_length[args_type[arg_i]];
29584+ break;
29585+
29586+ case glUniformMatrix3fv_func:
29587+ case glUniformMatrix3fvARB_func:
29588+ if (arg_i == signature->nb_args - 1)
29589+ return 3 * 3 * args[1] * tab_args_type_length[args_type[arg_i]];
29590+ break;
29591+
29592+ case glUniformMatrix4fv_func:
29593+ case glUniformMatrix4fvARB_func:
29594+ if (arg_i == signature->nb_args - 1)
29595+ return 4 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
29596+ break;
29597+
29598+ case glUniformMatrix2x3fv_func:
29599+ case glUniformMatrix3x2fv_func:
29600+ if (arg_i == signature->nb_args - 1)
29601+ return 2 * 3 * args[1] * tab_args_type_length[args_type[arg_i]];
29602+ break;
29603+
29604+ case glUniformMatrix2x4fv_func:
29605+ case glUniformMatrix4x2fv_func:
29606+ if (arg_i == signature->nb_args - 1)
29607+ return 2 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
29608+ break;
29609+
29610+ case glUniformMatrix3x4fv_func:
29611+ case glUniformMatrix4x3fv_func:
29612+ if (arg_i == signature->nb_args - 1)
29613+ return 3 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
29614+ break;
29615+
29616+ case glSpriteParameterivSGIX_func:
29617+ case glSpriteParameterfvSGIX_func:
29618+ if (arg_i == signature->nb_args - 1)
29619+ return ((args[arg_i - 1] ==
29620+ GL_SPRITE_MODE_SGIX) ? 1 : 3) *
29621+ tab_args_type_length[args_type[arg_i]];
29622+ break;
29623+
29624+ default:
29625+ break;
29626+ }
29627+
29628+ fprintf(err_file,
29629+ "invalid combination for compute_arg_length : func_number=%d, arg_i=%d\n",
29630+ func_number, arg_i);
29631+ return 0;
29632+}
29633+
29634+#define IS_NULL_POINTER_OK_FOR_FUNC(func_number) \
29635+ (func_number == glBitmap_func || \
29636+ func_number == _send_cursor_func || \
29637+ func_number == glTexImage1D_func || \
29638+ func_number == glTexImage2D_func || \
29639+ func_number == glTexImage3D_func || \
29640+ func_number == glBufferDataARB_func || \
29641+ func_number == glNewObjectBufferATI_func)
29642+
29643+#ifdef __amd64__
29644+#define _init_func _init64_func
29645+#else
29646+#ifdef __i386__
29647+#define _init_func _init32_func
29648+#else
29649+#error Unsupported ABI
29650+#endif
29651+#endif
29652Index: qemu-0.13.0/target-i386/opengl_player.c
29653===================================================================
29654--- /dev/null 1970-01-01 00:00:00.000000000 +0000
29655+++ qemu-0.13.0/target-i386/opengl_player.c 2011-01-17 16:42:36.000000000 +0800
29656@@ -0,0 +1,1461 @@
29657+/*
29658+ * Plays a sequence of OpenGL calls recorded either under qemu or with opengl_server
29659+ *
29660+ * Copyright (c) 2007 Even Rouault
29661+ *
29662+ * Permission is hereby granted, free of charge, to any person obtaining a copy
29663+ * of this software and associated documentation files (the "Software"), to deal
29664+ * in the Software without restriction, including without limitation the rights
29665+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
29666+ * copies of the Software, and to permit persons to whom the Software is
29667+ * furnished to do so, subject to the following conditions:
29668+ *
29669+ * The above copyright notice and this permission notice shall be included in
29670+ * all copies or substantial portions of the Software.
29671+ *
29672+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
29673+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29674+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
29675+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29676+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29677+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
29678+ * THE SOFTWARE.
29679+ */
29680+
29681+/* gcc -O2 -g -Wall opengl_player.c opengl_exec.c -o opengl_player -I../i386-softmmu -I. -I.. -lGL */
29682+
29683+#include <stdlib.h>
29684+#include <stdio.h>
29685+#include <string.h>
29686+#include <assert.h>
29687+#include <unistd.h>
29688+#include <sys/time.h>
29689+#include <math.h>
29690+
29691+#include <GL/gl.h>
29692+#include <X11/Xlib.h>
29693+
29694+// TODO
29695+typedef long unsigned int target_phys_addr_t;
29696+
29697+#include "opengl_func.h"
29698+#include "opengl_utils.h"
29699+
29700+//#include "ffmpeg/avcodec.h"
29701+
29702+extern void init_process_tab(void);
29703+extern int do_function_call(int, arg_t *, char *);
29704+
29705+void do_disconnect_current(void);
29706+void do_context_switch(Display *dpy, pid_t pid, int call);
29707+
29708+typedef struct {
29709+ int n_used;
29710+ unsigned int crc;
29711+ int size;
29712+ long long last_use;
29713+} RecordBufferedArray;
29714+
29715+typedef struct {
29716+ int size;
29717+ long file_offset;
29718+} ReplayBufferedArray;
29719+
29720+#define N_BUFFERED_ARRAYS 1024
29721+RecordBufferedArray recordBufferedArrays[N_BUFFERED_ARRAYS];
29722+
29723+#define INSTR_WINDOW_SIZE 65536
29724+short instrWindow[INSTR_WINDOW_SIZE];
29725+int instrWindowCount = 0;
29726+int instrWindowPtr = 0;
29727+int instrWindowBeginPtr = 0;
29728+
29729+#include "ghash.c"
29730+
29731+#define PRIME 131
29732+
29733+typedef struct {
29734+ int iFirstOccur;
29735+ int nbOccur;
29736+ int hash;
29737+} SeqDesc;
29738+
29739+typedef struct {
29740+ int hash;
29741+ int offset;
29742+} HashElt;
29743+
29744+int sort_hash_N;
29745+short *sort_hash_tab;
29746+int count_compar;
29747+int collision_detected;
29748+
29749+static int sort_hash(const void *ptrA, const void *ptrB)
29750+{
29751+ const HashElt *a = (const HashElt *) ptrA;
29752+ const HashElt *b = (const HashElt *) ptrB;
29753+
29754+ count_compar++;
29755+ if (a->hash == b->hash) {
29756+ int j;
29757+
29758+ for (j = 0; j < sort_hash_N; j++) {
29759+ if (sort_hash_tab[a->offset + j] != sort_hash_tab[b->offset + j]) {
29760+ collision_detected = 1;
29761+ // fprintf(stderr, "collision de hash !\n");
29762+ return sort_hash_tab[a->offset + j] <
29763+ sort_hash_tab[b->offset + j] ? -1 : 1;
29764+ }
29765+ }
29766+ return a->offset - b->offset;
29767+ } else if (a->hash < b->hash)
29768+ return -1;
29769+ else
29770+ return 1;
29771+}
29772+
29773+static int sort_seq_desc_by_occur(const void *ptrA, const void *ptrB)
29774+{
29775+ const SeqDesc *a = (const SeqDesc *) ptrA;
29776+ const SeqDesc *b = (const SeqDesc *) ptrB;
29777+
29778+ return b->nbOccur - a->nbOccur;
29779+}
29780+
29781+static int sort_seq_desc_by_offset(const void *ptrA, const void *ptrB)
29782+{
29783+ const SeqDesc *a = (const SeqDesc *) ptrA;
29784+ const SeqDesc *b = (const SeqDesc *) ptrB;
29785+
29786+ return a->iFirstOccur - b->iFirstOccur;
29787+}
29788+
29789+void find_repeated_seq(short *tab, int iStart, int length)
29790+{
29791+ // SimpleHashTable* tableHash = simple_hash_table_new(free);
29792+ int N = 10;
29793+ int i;
29794+ int hash = 0;
29795+ int primeN = 1;
29796+ HashElt *tabHash = malloc(sizeof(HashElt) * (length - N + 1));
29797+
29798+ short *new_tab = malloc(sizeof(short) * length);
29799+ memcpy(&new_tab[0], &tab[iStart], sizeof(short) * (length - iStart));
29800+ memcpy(&new_tab[length - iStart], &tab[0], sizeof(short) * iStart);
29801+ tab = new_tab;
29802+
29803+ sort_hash_N = N;
29804+ sort_hash_tab = tab;
29805+
29806+ fprintf(stderr, "(start) iStart = %d\n", iStart);
29807+ for (i = 0; i < N; i++) {
29808+ primeN *= PRIME;
29809+ }
29810+ for (i = 0; i < length; i++) {
29811+ hash = hash * PRIME + tab[i];
29812+ if (i >= N) {
29813+ hash -= tab[i - N] * primeN;
29814+ }
29815+ if (i >= N - 1) {
29816+ tabHash[i - (N - 1)].offset = i - (N - 1);
29817+ tabHash[i - (N - 1)].hash =
29818+ /* (i == 100) ? tabHash[0].hash : */ hash;
29819+#if 0
29820+ void **p_n_occurences =
29821+ simple_hash_table_lookup_pointer(tableHash, hash);
29822+ if (p_n_occurences == NULL) {
29823+ SeqDesc *seqDesc = malloc(sizeof(SeqDesc));
29824+
29825+ seqDesc->iFirstOccur = i - (N - 1);
29826+ seqDesc->nbOccur = 1;
29827+ simple_hash_table_insert(tableHash, hash, seqDesc);
29828+ } else {
29829+ SeqDesc *seqDesc = (SeqDesc *) (*p_n_occurences);
29830+ int j;
29831+
29832+ for (j = 0; j < N; j++) {
29833+ if (tab[(iStart + seqDesc->iFirstOccur + j) % length] !=
29834+ tab[(iStart + i - (N - 1) + j) % length])
29835+ break;
29836+ }
29837+ if (j != N)
29838+ fprintf(stderr, "arg\n");
29839+ seqDesc->nbOccur++;
29840+ // fprintf(stderr, "iStart = %d, i = %d, iFirstOccur = %d,
29841+ // nbOccur = %d\n", iStart, i, seqDesc->iFirstOccur,
29842+ // seqDesc->nbOccur);
29843+ }
29844+#endif
29845+ }
29846+ }
29847+ collision_detected = 0;
29848+ count_compar = 0;
29849+ qsort(tabHash, length - N + 1, sizeof(HashElt), sort_hash);
29850+ if (!collision_detected) {
29851+ SeqDesc *tabSeqDesc = (SeqDesc *) malloc(sizeof(SeqDesc) * length);
29852+ int nbSeqDesc = 0;
29853+ int lastI = 0;
29854+ int prevHash = tabHash[0].hash;
29855+
29856+ for (i = 1; i < length - N + 1; i++) {
29857+ if (tabHash[i].hash != prevHash) {
29858+ tabSeqDesc[nbSeqDesc].iFirstOccur = tabHash[lastI].offset;
29859+ tabSeqDesc[nbSeqDesc].nbOccur = i - lastI;
29860+ tabSeqDesc[nbSeqDesc].hash = prevHash;
29861+ nbSeqDesc++;
29862+ lastI = i;
29863+ prevHash = tabHash[i].hash;
29864+ }
29865+ }
29866+ tabSeqDesc[nbSeqDesc].iFirstOccur = tabHash[lastI].offset;
29867+ tabSeqDesc[nbSeqDesc].nbOccur = i - lastI;
29868+ nbSeqDesc++;
29869+ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc), sort_seq_desc_by_occur);
29870+ for (i = 0; i < nbSeqDesc; i++) {
29871+ if (tabSeqDesc[i].nbOccur < 10)
29872+ break;
29873+ // fprintf(stderr, "%d %d\n", tabSeqDesc[i].iFirstOccur,
29874+ // tabSeqDesc[i].nbOccur);
29875+ }
29876+ nbSeqDesc = i;
29877+ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc),
29878+ sort_seq_desc_by_offset);
29879+ lastI = tabSeqDesc[0].iFirstOccur;
29880+ int maxI = 0;
29881+ int j = 0;
29882+
29883+ for (i = 1; i < nbSeqDesc; i++) {
29884+ if (tabSeqDesc[i].iFirstOccur - lastI <= N) {
29885+ if (tabSeqDesc[i].nbOccur > tabSeqDesc[maxI].nbOccur) {
29886+ maxI = i;
29887+ }
29888+ } else {
29889+ tabSeqDesc[j].iFirstOccur = tabSeqDesc[maxI].iFirstOccur;
29890+ tabSeqDesc[j].nbOccur = tabSeqDesc[maxI].nbOccur;
29891+ j++;
29892+#define MAX(a,b) (((a)>(b)) ? (a) : (b))
29893+ lastI = tabSeqDesc[maxI].iFirstOccur;
29894+ while (i < nbSeqDesc &&
29895+ tabSeqDesc[i].iFirstOccur - lastI <= N)
29896+ i++;
29897+ if (i == nbSeqDesc)
29898+ break;
29899+ maxI = i;
29900+ }
29901+ }
29902+ nbSeqDesc = j;
29903+ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc), sort_seq_desc_by_occur);
29904+ for (i = 0; i < nbSeqDesc; i++) {
29905+ fprintf(stderr, "offset=%d occurNb=%d hash=%d:",
29906+ tabSeqDesc[i].iFirstOccur, tabSeqDesc[i].nbOccur,
29907+ tabSeqDesc[i].hash);
29908+ for (j = 0; j < N; j++)
29909+ fprintf(stderr, "%d ", tab[tabSeqDesc[i].iFirstOccur + j]);
29910+ fprintf(stderr, "\n");
29911+ }
29912+ free(tabSeqDesc);
29913+ } else {
29914+ fprintf(stderr, "collision de hash !\n");
29915+ }
29916+
29917+ fprintf(stderr, "(end) iStart = %d (count_compar = %d)\n", iStart,
29918+ count_compar);
29919+ // simple_hash_table_foreach(tableHash,
29920+ free(tabHash);
29921+ free(tab);
29922+#if 0
29923+ simple_hash_table_destroy(tableHash);
29924+#endif
29925+#if 0
29926+ int i, j, k;
29927+
29928+ for (i = 0; i < length; i++) {
29929+ int nMaxContiguous = 0;
29930+ int jMax = 0;
29931+
29932+ for (j = 0; j < length; j++) {
29933+ int nContiguous = 0;
29934+
29935+ for (k = 0; k < j - i; k++) {
29936+ if (tab[(iStart + i + k) % length] ==
29937+ tab[(iStart + i + j + k) % length]) {
29938+ nContiguous++;
29939+ } else
29940+ break;
29941+ }
29942+ if (nContiguous >= nMaxContiguous) {
29943+ nMaxContiguous = nContiguous;
29944+ jMax = j;
29945+ }
29946+ }
29947+ fprintf(stderr, "iStart = %d, i = %d, j = %d, nContiguous = %d\n",
29948+ iStart, i, i + jMax, nMaxContiguous);
29949+ }
29950+#endif
29951+}
29952+
29953+#define MAX_SERVER_STATE_STACK_SIZE 16
29954+
29955+typedef struct {
29956+ GLbitfield mask;
29957+ int matrixMode;
29958+ int lastMatrixOp;
29959+} ServerState;
29960+
29961+typedef struct {
29962+ ServerState stackAttrib[MAX_SERVER_STATE_STACK_SIZE];
29963+ int stackAttribPtr;
29964+ int matrixMode;
29965+ int lastMatrixOp;
29966+} GLState;
29967+
29968+#define NB_STATES 100
29969+GLState states[NB_STATES];
29970+
29971+void usage()
29972+{
29973+ printf("Usage : opengl_player [OPTION] filename\n\n");
29974+ printf
29975+ ("filename is the file where to read the OpenGL flow ('/tmp/debug_gl.bin' by default)\n");
29976+ printf("'-' is supported and stands for standard input\n\n");
29977+ printf("The following options are available :\n");
29978+ printf
29979+ ("--debug : output debugging trace on stderr\n");
29980+ printf("--disable-real-time-play-back : play as fast as possible\n");
29981+ printf
29982+ ("--show-hard-disk-bandwidth : displays regularly the data bandwidth\n");
29983+ printf("--h or --help : display this help\n");
29984+}
29985+
29986+int main(int argc, char *argv[])
29987+{
29988+ static int args_size[50];
29989+ int i;
29990+ int visualid_fbconfig_read = -1;
29991+ int visualid_fbconfig_real = 0;
29992+ char *filename = "/tmp/debug_gl.bin";
29993+ int slowdown = 0;
29994+ int debug = 0;
29995+ char *ret_string;
29996+ arg_t args[50];
29997+ struct timeval start_time, last_time, current_time;
29998+ int noplay = 0;
29999+ int count_last_time = 0, count_current = 0;
30000+ int refresh_rate = 500;
30001+ int disable_real_time_play_back = 0;
30002+ int show_hard_disk_bandwith = 0;
30003+ int last_offset = 0;
30004+ int resize = 0;
30005+ int window_width = 0, window_height = 0;
30006+ int orig_window_width = 0;
30007+ int show_offset = 0;
30008+ int show_diff_offset = 0;
30009+ int last_cmd_offset = 0;
30010+ FILE *compressed_file = NULL;
30011+ int sizeBufferedArraysPlay = 0;
30012+ ReplayBufferedArray *replayBufferedArrays = NULL;
30013+ int currentState = 0;
30014+
30015+ memset(recordBufferedArrays, 0, sizeof(recordBufferedArrays));
30016+ memset(states, 0, sizeof(states));
30017+ for (i = 0; i < NB_STATES; i++) {
30018+ states[i].matrixMode = GL_MODELVIEW;
30019+ states[i].lastMatrixOp = -1;
30020+ }
30021+
30022+ /* avcodec_init(); AVCodec* avCodec =
30023+ * avcodec_find_encoder(CODEC_ID_MPEG2VIDEO); AVCodecContext*
30024+ * avCodecContext = avcodec_alloc_context(); */
30025+
30026+ for (i = 1; i < argc; i++) {
30027+ if (argv[i][0] == '-' && argv[i][1] == '-')
30028+ argv[i] = argv[i] + 1;
30029+
30030+ if (strncmp(argv[i], "-slowdown=", strlen("-slowdown=")) == 0) {
30031+ slowdown = atoi(argv[i] + strlen("-slowdown="));
30032+ } else if (strcmp(argv[i], "-noplay") == 0) {
30033+ noplay = 1;
30034+ } else if (strcmp(argv[i], "-debug") == 0) {
30035+ debug = 1;
30036+ } else if (strcmp(argv[i], "-disable-real-time-play-back") == 0) {
30037+ disable_real_time_play_back = 1;
30038+ } else if (strcmp(argv[i], "-show-hard-disk-bandwidth") == 0) {
30039+ show_hard_disk_bandwith = 1;
30040+ } else if (strcmp(argv[i], "-show-offset") == 0) {
30041+ show_offset = 1;
30042+ } else
30043+ if (strncmp
30044+ (argv[i], "-show-diff-offset",
30045+ strlen("-show-diff-offset")) == 0) {
30046+ show_diff_offset = atoi(argv[i] + strlen("-show-diff-offset="));
30047+ } else if (strncmp(argv[i], "-width=", strlen("-width=")) == 0) {
30048+ window_width = atoi(argv[i] + strlen("-width="));
30049+ resize = 1;
30050+ } else if (strncmp(argv[i], "-refreshrate=", strlen("-refreshrate="))
30051+ == 0) {
30052+ refresh_rate = atoi(argv[i] + strlen("-refreshrate="));
30053+ } else
30054+ if (strncmp
30055+ (argv[i], "-output-compressed-filename=",
30056+ strlen("-output-compressed-filename=")) == 0) {
30057+ char *compressed_filename =
30058+ argv[i] + strlen("-output-compressed-filename=");
30059+ compressed_file = fopen(compressed_filename, "wb");
30060+ } else if (strcmp(argv[i], "-") == 0) {
30061+ filename = NULL;
30062+ } else if (strcmp(argv[i], "-h") == 0 ||
30063+ strcmp(argv[i], "-help") == 0) {
30064+ usage();
30065+ return 0;
30066+ } else
30067+ filename = argv[i];
30068+ }
30069+ FILE *f = (filename) ? fopen(filename, "rb") : stdin;
30070+
30071+ if (f == NULL) {
30072+ fprintf(stderr, "cannot open %s\n", filename);
30073+ return 0;
30074+ }
30075+ // FILE* fout = fopen("/tmp/raw", "wb");
30076+
30077+ init_process_tab();
30078+ ret_string = malloc(32768);
30079+
30080+ gettimeofday(&start_time, NULL);
30081+ gettimeofday(&last_time, NULL);
30082+
30083+// void* buffer= NULL;
30084+#define WRITE_UNSIGNED_CHAR(x) do { unsigned char myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30085+#define WRITE_SHORT(x) do { short myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30086+#define WRITE_INT(x) do { int myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30087+#define WRITE_LONGLONG(x) do { long long myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30088+#define WRITE_FLOAT(x) do { float myvar = (float)x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30089+#define WRITE_3DOUBLE_AS_3FLOAT(x) do { float myfloats[] = { x[0], x[1], x[2] }; fwrite(myfloats, sizeof(myvar), 1, compressed_file); } while(0)
30090+
30091+ // FILE* fopcodes = fopen("/tmp/opcodes.bin", "wb");
30092+ do_context_switch(XOpenDisplay(NULL), 1, _init32_func);
30093+
30094+ long long instr_count = 0;
30095+
30096+ while (1) {
30097+ short func_number;
30098+ short memorize_array_play = -1;
30099+ short reuse_array_play = -1;
30100+
30101+ begin:
30102+ if (fread(&func_number, sizeof(short), 1, f) == 0)
30103+ break;
30104+ if (func_number == _exit_process_func)
30105+ break;
30106+
30107+ if (func_number == _serialized_calls_func) {
30108+ continue;
30109+ }
30110+ // fwrite(&func_number, sizeof(short), 1, fopcodes);
30111+
30112+ /*
30113+ * instrWindow[instrWindowPtr] = func_number; instrWindowPtr++; if
30114+ * (instrWindowPtr == INSTR_WINDOW_SIZE) instrWindowPtr = 0;
30115+ * instrWindowCount++; if (instrWindowCount >= INSTR_WINDOW_SIZE) {
30116+ * if ((instrWindowCount % (INSTR_WINDOW_SIZE / 2)) == 0)
30117+ * find_repeated_seq(instrWindow, instrWindowBeginPtr,
30118+ * INSTR_WINDOW_SIZE); instrWindowBeginPtr++; if (instrWindowBeginPtr
30119+ * == INSTR_WINDOW_SIZE) instrWindowBeginPtr = 0; } */
30120+
30121+ /* -1 is special code that indicates time synchro */
30122+ if (func_number == timesynchro_func) {
30123+ long long ts_file;
30124+ fread(&ts_file, sizeof(long long), 1, f);
30125+
30126+ if (compressed_file) {
30127+ WRITE_SHORT(timesynchro_func);
30128+ WRITE_LONGLONG(ts_file);
30129+ }
30130+
30131+ if (!disable_real_time_play_back) {
30132+ gettimeofday(&current_time, NULL);
30133+ long long ts_real =
30134+ (current_time.tv_sec -
30135+ start_time.tv_sec) * (long long) 1000000 +
30136+ current_time.tv_usec - start_time.tv_usec;
30137+ // fprintf(stderr, "%d %d\n", (int)ts_real, (int)ts_file);
30138+ if (ts_real < ts_file/* && ts_file - ts_real > 100 * 1000 */) {
30139+ /* we're playing too fast */
30140+ // fprintf(stderr, "waiting %d usec\n", (int)(ts_file -
30141+ // ts_real));
30142+ usleep((int) (ts_file - ts_real));
30143+ }
30144+ }
30145+ continue;
30146+ } else if (func_number == memorize_array_func) {
30147+ fread(&memorize_array_play, sizeof(short), 1, f);
30148+ goto begin;
30149+ } else if (func_number == reuse_array_func) {
30150+ fread(&reuse_array_play, sizeof(short), 1, f);
30151+ goto begin;
30152+ }
30153+
30154+ assert(func_number >= 0);
30155+
30156+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
30157+ int nb_args = signature->nb_args;
30158+ int *args_type = signature->args_type;
30159+
30160+ for (i = 0; i < nb_args; i++) {
30161+ switch (args_type[i]) {
30162+#if 0
30163+ case TYPE_UNSIGNED_CHAR:
30164+ case TYPE_CHAR:
30165+ {
30166+ char c;
30167+
30168+ fread(&c, sizeof(c), 1, f);
30169+ args[i] = c;
30170+ break;
30171+ }
30172+
30173+ case TYPE_UNSIGNED_SHORT:
30174+ case TYPE_SHORT:
30175+ {
30176+ short s;
30177+
30178+ fread(&s, sizeof(s), 1, f);
30179+ args[i] = s;
30180+ break;
30181+ }
30182+
30183+ case TYPE_FLOAT:
30184+ fread(&args[i], sizeof(int), 1, f);
30185+ break;
30186+
30187+#endif
30188+ case TYPE_UNSIGNED_CHAR:
30189+ case TYPE_CHAR:
30190+ case TYPE_UNSIGNED_INT:
30191+ case TYPE_INT:
30192+ case TYPE_UNSIGNED_SHORT:
30193+ case TYPE_SHORT:
30194+ case TYPE_FLOAT:
30195+ {
30196+ int n;
30197+ fread(&n, sizeof(int), 1, f);
30198+ args[i] = n;
30199+ break;
30200+ }
30201+
30202+ case TYPE_NULL_TERMINATED_STRING:
30203+ CASE_IN_UNKNOWN_SIZE_POINTERS:
30204+ fread(&args_size[i], sizeof(int), 1, f);
30205+ if (args_size[i]) {
30206+ args[i] = (long) malloc(args_size[i]);
30207+ fread((void *) args[i], args_size[i], 1, f);
30208+ } else {
30209+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
30210+ fprintf(stderr, "call %s arg %d\n",
30211+ tab_opengl_calls_name[func_number], i);
30212+ }
30213+ args[i] = 0;
30214+ }
30215+ if (reuse_array_play >= 0) {
30216+ long current_pos = ftell(f);
30217+
30218+ args_size[i] =
30219+ replayBufferedArrays[reuse_array_play].size;
30220+ args[i] = (long) malloc(args_size[i]);
30221+ fseek(f,
30222+ replayBufferedArrays[reuse_array_play].file_offset,
30223+ SEEK_SET);
30224+ fread((void *) args[i], args_size[i], 1, f);
30225+ fseek(f, current_pos, SEEK_SET);
30226+ }
30227+ if (memorize_array_play >= 0) {
30228+ assert(memorize_array_play <= sizeBufferedArraysPlay);
30229+ if (memorize_array_play == sizeBufferedArraysPlay) {
30230+ sizeBufferedArraysPlay++;
30231+ replayBufferedArrays =
30232+ realloc(replayBufferedArrays,
30233+ sizeBufferedArraysPlay *
30234+ sizeof(ReplayBufferedArray));
30235+ replayBufferedArrays[sizeBufferedArraysPlay -
30236+ 1].file_offset = 0;
30237+ }
30238+ replayBufferedArrays[memorize_array_play].file_offset =
30239+ ftell(f) - args_size[i];
30240+ replayBufferedArrays[memorize_array_play].size =
30241+ args_size[i];
30242+ }
30243+ break;
30244+
30245+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
30246+ {
30247+ args_size[i] =
30248+ compute_arg_length(stderr, func_number, i, args);
30249+ args[i] =
30250+ (args_size[i]) ? (long) malloc(args_size[i]) : 0;
30251+ fread((void *) args[i], args_size[i], 1, f);
30252+ break;
30253+ }
30254+
30255+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
30256+ {
30257+ args_size[i] =
30258+ compute_arg_length(stderr, func_number, i, args);
30259+ args[i] = (long) malloc(args_size[i]);
30260+ break;
30261+ }
30262+
30263+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
30264+ {
30265+ fread(&args_size[i], sizeof(int), 1, f);
30266+ if (args_size[i]) {
30267+ args[i] = (long) malloc(args_size[i]);
30268+ } else {
30269+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
30270+ fprintf(stderr, "call %s arg %d\n",
30271+ tab_opengl_calls_name[func_number], i);
30272+ }
30273+ args[i] = 0;
30274+ }
30275+ break;
30276+ }
30277+
30278+ CASE_OUT_KNOWN_SIZE_POINTERS:
30279+ {
30280+ args_size[i] = tab_args_type_length[args_type[i]];
30281+ assert(args_size[i]);
30282+ args[i] = (long) malloc(args_size[i]);
30283+ break;
30284+ }
30285+
30286+ case TYPE_DOUBLE:
30287+ CASE_IN_KNOWN_SIZE_POINTERS:
30288+ args_size[i] = tab_args_type_length[args_type[i]];
30289+ args[i] = (long) malloc(args_size[i]);
30290+ fread((void *) args[i], args_size[i], 1, f);
30291+ break;
30292+
30293+ case TYPE_IN_IGNORED_POINTER:
30294+ args[i] = 0;
30295+ break;
30296+
30297+ default:
30298+ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
30299+ tab_opengl_calls_name[func_number], i);
30300+ do_disconnect_current();
30301+ return 0;
30302+ }
30303+ }
30304+ if (debug)
30305+ display_gl_call(stderr, func_number, args, args_size);
30306+
30307+ if (debug && reuse_array_play != -1)
30308+ fprintf(stderr, "reuse_array_play %d\n", reuse_array_play);
30309+ if (debug && memorize_array_play != -1)
30310+ fprintf(stderr, "memorize_array_play %d\n", memorize_array_play);
30311+
30312+ if (compressed_file) {
30313+ int reuse_array = -1;
30314+ int memorize_array = -1;
30315+ void *ptr = NULL;
30316+ int bytes_size = 0;
30317+ int do_default = 1;
30318+
30319+ switch (func_number) {
30320+ case glXMakeCurrent_func:
30321+ {
30322+ currentState = args[2];
30323+ assert(currentState >= 0 && currentState < NB_STATES);
30324+ break;
30325+ }
30326+
30327+ case glMatrixMode_func:
30328+ {
30329+ if (states[currentState].matrixMode == args[0]) {
30330+ do_default = 0;
30331+ } else {
30332+ states[currentState].matrixMode = args[0];
30333+ }
30334+ break;
30335+ }
30336+
30337+ case glLoadIdentity_func:
30338+ case glLoadMatrixd_func:
30339+ case glLoadMatrixf_func:
30340+ case glMultMatrixd_func:
30341+ case glMultMatrixf_func:
30342+ case glOrtho_func:
30343+ case glFrustum_func:
30344+ case glRotated_func:
30345+ case glRotatef_func:
30346+ case glScaled_func:
30347+ case glScalef_func:
30348+ case glTranslated_func:
30349+ case glTranslatef_func:
30350+ case glPushMatrix_func:
30351+ case glPopMatrix_func:
30352+ {
30353+ if (states[currentState].matrixMode == 5890) {
30354+ if (states[currentState].lastMatrixOp ==
30355+ glLoadIdentity_func &&
30356+ func_number == glLoadIdentity_func) {
30357+ do_default = 0;
30358+ }
30359+ states[currentState].lastMatrixOp = func_number;
30360+ }
30361+ break;
30362+ }
30363+
30364+ case glPushAttrib_func:
30365+ {
30366+ if (states[currentState].stackAttribPtr <
30367+ MAX_SERVER_STATE_STACK_SIZE) {
30368+ int mask = args[0];
30369+
30370+ states[currentState].stackAttrib[states[currentState].
30371+ stackAttribPtr].
30372+ mask = mask;
30373+ if (mask & GL_TRANSFORM_BIT) {
30374+ states[currentState].
30375+ stackAttrib[states[currentState].
30376+ stackAttribPtr].matrixMode =
30377+ states[currentState].matrixMode;
30378+ states[currentState].
30379+ stackAttrib[states[currentState].
30380+ stackAttribPtr].lastMatrixOp =
30381+ states[currentState].lastMatrixOp;
30382+ }
30383+ states[currentState].stackAttribPtr++;
30384+ }
30385+ break;
30386+ }
30387+
30388+ case glPopAttrib_func:
30389+ {
30390+ if (states[currentState].stackAttribPtr > 0) {
30391+ --states[currentState].stackAttribPtr;
30392+ if (states[currentState].
30393+ stackAttrib[states[currentState].stackAttribPtr].
30394+ mask & GL_TRANSFORM_BIT) {
30395+ states[currentState].matrixMode =
30396+ states[currentState].
30397+ stackAttrib[states[currentState].
30398+ stackAttribPtr].matrixMode;
30399+ states[currentState].lastMatrixOp =
30400+ states[currentState].
30401+ stackAttrib[states[currentState].
30402+ stackAttribPtr].lastMatrixOp;
30403+ }
30404+ }
30405+ break;
30406+ }
30407+
30408+ case glBufferDataARB_func:
30409+ {
30410+ ptr = (void *) args[2];
30411+ bytes_size = args_size[2];
30412+ break;
30413+ }
30414+
30415+ case glVertexPointer_fake_func:
30416+ case glTexCoordPointer_fake_func:
30417+ case glTexCoordPointer01_fake_func:
30418+ case glDrawElements_func:
30419+ {
30420+ ptr = (void *) args[nb_args - 1];
30421+ bytes_size = args_size[nb_args - 1];
30422+ break;
30423+ }
30424+
30425+ default:
30426+ break;
30427+ }
30428+
30429+ if (ptr) {
30430+ unsigned int crc = calc_checksum(ptr, bytes_size, 0xFFFFFFFF);
30431+ long long minInterest = 0x7FFFFFFFFFFFFFFFLL;
30432+ int iMinUsed = -1;
30433+
30434+ instr_count++;
30435+
30436+ for (i = 0; i < N_BUFFERED_ARRAYS; i++) {
30437+ if (recordBufferedArrays[i].crc == crc) {
30438+ // fprintf(stderr, "reusing %d for crc %d\n", i,
30439+ // crc);
30440+ reuse_array = i;
30441+ // fprintf(stderr, "reuse_array %d\n", i);
30442+ recordBufferedArrays[i].n_used++;
30443+ recordBufferedArrays[i].last_use = instr_count;
30444+ break;
30445+ } else if (recordBufferedArrays[i].n_used == 0) {
30446+ // fprintf(stderr, "memorize_array %d\n", i);
30447+ memorize_array = i;
30448+ recordBufferedArrays[i].n_used = 1;
30449+ recordBufferedArrays[i].crc = crc;
30450+ recordBufferedArrays[i].size = bytes_size;
30451+ recordBufferedArrays[i].last_use = instr_count;
30452+ break;
30453+ } else {
30454+ long long interest =
30455+ N_BUFFERED_ARRAYS *
30456+ recordBufferedArrays[i].n_used / (instr_count -
30457+ recordBufferedArrays
30458+ [i].
30459+ last_use)
30460+ /** recordBufferedArrays[i].size*/ ;
30461+ if (interest < minInterest) {
30462+ iMinUsed = i;
30463+ minInterest = interest;
30464+ }
30465+ }
30466+ }
30467+ static unsigned int *discardedCrcs = NULL;
30468+ static int nDiscardedCrcs = 0;
30469+
30470+ if (i == N_BUFFERED_ARRAYS) {
30471+ int j;
30472+
30473+ for (j = 0; j < nDiscardedCrcs; j++) {
30474+ if (discardedCrcs[j] == crc) {
30475+ fprintf(stderr,
30476+ "%x was discarded before and is asked now...\n",
30477+ crc);
30478+ discardedCrcs[j] =
30479+ recordBufferedArrays[iMinUsed].crc;
30480+ break;
30481+ }
30482+ }
30483+ if (j == nDiscardedCrcs) {
30484+ discardedCrcs =
30485+ realloc(discardedCrcs,
30486+ sizeof(int) * (nDiscardedCrcs + 1));
30487+ discardedCrcs[nDiscardedCrcs++] =
30488+ recordBufferedArrays[iMinUsed].crc;
30489+ }
30490+ fprintf(stderr, "discarding %x\n",
30491+ recordBufferedArrays[iMinUsed].crc);
30492+
30493+ memorize_array = iMinUsed;
30494+ recordBufferedArrays[iMinUsed].n_used = 1;
30495+ recordBufferedArrays[iMinUsed].crc = crc;
30496+ recordBufferedArrays[iMinUsed].size = bytes_size;
30497+ recordBufferedArrays[iMinUsed].last_use = instr_count;
30498+ }
30499+
30500+ if (reuse_array != -1) {
30501+ WRITE_SHORT(reuse_array_func);
30502+ WRITE_SHORT(reuse_array);
30503+ } else if (memorize_array != -1) {
30504+ WRITE_SHORT(memorize_array_func);
30505+ WRITE_SHORT(memorize_array);
30506+ }
30507+ }
30508+
30509+ switch (func_number) {
30510+ case glXChooseVisual_func:
30511+ case glXQueryVersion_func:
30512+ case glXQueryExtension_func:
30513+ case glXGetClientString_func:
30514+ case glXQueryExtensionsString_func:
30515+ case glXQueryServerString_func:
30516+ case glXGetProcAddress_fake_func:
30517+ case glXGetProcAddress_global_fake_func:
30518+ case glXGetConfig_func:
30519+ case glXGetConfig_extended_func:
30520+ case glGetIntegerv_func:
30521+ case glGetFloatv_func:
30522+ case glGetBooleanv_func:
30523+ case glGetDoublev_func:
30524+ case glIsEnabled_func:
30525+ case _glGetError_fake_func:
30526+ case glGetString_func:
30527+ {
30528+ do_default = 0;
30529+ break;
30530+ }
30531+
30532+ case glLoadMatrixd_func:
30533+ {
30534+ int j;
30535+
30536+ WRITE_SHORT(glLoadMatrixf_func);
30537+ double *ptr = (double *) args[0];
30538+
30539+ for (j = 0; j < 16; j++) {
30540+ WRITE_FLOAT(ptr[j]);
30541+ }
30542+ do_default = 0;
30543+ break;
30544+ }
30545+
30546+ case glMultMatrixd_func:
30547+ {
30548+ int j;
30549+
30550+ WRITE_SHORT(glMultMatrixf_func);
30551+ double *ptr = (double *) args[0];
30552+
30553+ for (j = 0; j < 16; j++) {
30554+ WRITE_FLOAT(ptr[j]);
30555+ }
30556+ do_default = 0;
30557+ break;
30558+ }
30559+
30560+ case glTranslated_func:
30561+ {
30562+ WRITE_SHORT(glTranslatef_func);
30563+ WRITE_FLOAT(*(double *) args[0]);
30564+ WRITE_FLOAT(*(double *) args[1]);
30565+ WRITE_FLOAT(*(double *) args[2]);
30566+ do_default = 0;
30567+ break;
30568+ }
30569+
30570+ case glScalef_func:
30571+ {
30572+ if (*(float *) &args[0] == 1 && *(float *) &args[1] == 1
30573+ && *(float *) &args[2] == 1)
30574+ do_default = 0;
30575+ break;
30576+ }
30577+
30578+ case glScaled_func:
30579+ {
30580+ if (!
30581+ (*(double *) args[0] == 1 && *(double *) args[1] == 1
30582+ && *(double *) args[2] == 1)) {
30583+ WRITE_SHORT(glScalef_func);
30584+ WRITE_FLOAT(*(double *) args[0]);
30585+ WRITE_FLOAT(*(double *) args[1]);
30586+ WRITE_FLOAT(*(double *) args[2]);
30587+ }
30588+ do_default = 0;
30589+ break;
30590+ }
30591+
30592+ case glRotated_func:
30593+ {
30594+ WRITE_SHORT(glRotatef_func);
30595+ WRITE_FLOAT(*(double *) args[0]);
30596+ WRITE_FLOAT(*(double *) args[1]);
30597+ WRITE_FLOAT(*(double *) args[2]);
30598+ WRITE_FLOAT(*(double *) args[3]);
30599+ do_default = 0;
30600+ break;
30601+ }
30602+#define IS_SHORT(x) ((x) >= -32768 && (x) < 32768)
30603+
30604+ case glRasterPos2i_func:
30605+ {
30606+ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
30607+ WRITE_SHORT(glRasterPos2s_func);
30608+ WRITE_SHORT(args[0]);
30609+ WRITE_SHORT(args[1]);
30610+ do_default = 0;
30611+ }
30612+ break;
30613+ }
30614+
30615+ case glVertex2i_func:
30616+ {
30617+ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
30618+ WRITE_SHORT(glVertex2s_func);
30619+ WRITE_SHORT(args[0]);
30620+ WRITE_SHORT(args[1]);
30621+ do_default = 0;
30622+ }
30623+ break;
30624+ }
30625+
30626+ case glTexCoord2i_func:
30627+ {
30628+ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
30629+ WRITE_SHORT(glTexCoord2s_func);
30630+ WRITE_SHORT(args[0]);
30631+ WRITE_SHORT(args[1]);
30632+ do_default = 0;
30633+ }
30634+ break;
30635+ }
30636+
30637+ case glTexCoord2fv_func:
30638+ {
30639+ float *ptr = (float *) args[0];
30640+ float u = ptr[0];
30641+ float v = ptr[1];
30642+
30643+ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7) {
30644+ int ui = (int) u;
30645+ int vi = (int) v;
30646+
30647+ if (IS_SHORT(ui) && IS_SHORT(vi)) {
30648+ WRITE_SHORT(glTexCoord2s_func);
30649+ WRITE_SHORT(ui);
30650+ WRITE_SHORT(vi);
30651+ do_default = 0;
30652+ }
30653+ }
30654+ break;
30655+ }
30656+
30657+ case glTexCoord2f_func:
30658+ {
30659+ float u = *(float *) &args[0];
30660+ float v = *(float *) &args[1];
30661+
30662+ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7) {
30663+ int ui = (int) u;
30664+ int vi = (int) v;
30665+
30666+ if (IS_SHORT(ui) && IS_SHORT(vi)) {
30667+ WRITE_SHORT(glTexCoord2s_func);
30668+ WRITE_SHORT(ui);
30669+ WRITE_SHORT(vi);
30670+ do_default = 0;
30671+ }
30672+ }
30673+ break;
30674+ }
30675+
30676+ case glColor3f_func:
30677+ {
30678+ WRITE_SHORT(glColor3ub_func);
30679+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
30680+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
30681+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
30682+ do_default = 0;
30683+ break;
30684+ }
30685+
30686+ case glColor4f_func:
30687+ {
30688+ if (*(float *) &args[3] == 1) {
30689+ WRITE_SHORT(glColor3ub_func);
30690+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
30691+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
30692+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
30693+ } else {
30694+ WRITE_SHORT(glColor4ub_func);
30695+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
30696+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
30697+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
30698+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[3]);
30699+ }
30700+ do_default = 0;
30701+ break;
30702+ }
30703+
30704+ case glColor4fv_func:
30705+ {
30706+ float *ptr = (float *) args[0];
30707+
30708+ if (ptr[3] == 1) {
30709+ WRITE_SHORT(glColor3ub_func);
30710+ WRITE_UNSIGNED_CHAR(255 * ptr[0]);
30711+ WRITE_UNSIGNED_CHAR(255 * ptr[1]);
30712+ WRITE_UNSIGNED_CHAR(255 * ptr[2]);
30713+ } else {
30714+ WRITE_SHORT(glColor4ub_func);
30715+ WRITE_UNSIGNED_CHAR(255 * ptr[0]);
30716+ WRITE_UNSIGNED_CHAR(255 * ptr[1]);
30717+ WRITE_UNSIGNED_CHAR(255 * ptr[2]);
30718+ WRITE_UNSIGNED_CHAR(255 * ptr[3]);
30719+ }
30720+ do_default = 0;
30721+ break;
30722+ }
30723+
30724+ case glColor3d_func:
30725+ {
30726+ WRITE_SHORT(glColor3ub_func);
30727+ WRITE_UNSIGNED_CHAR(255 * *(double *) args[0]);
30728+ WRITE_UNSIGNED_CHAR(255 * *(double *) args[1]);
30729+ WRITE_UNSIGNED_CHAR(255 * *(double *) args[2]);
30730+ do_default = 0;
30731+ break;
30732+ }
30733+
30734+ case glVertex3f_func:
30735+ {
30736+ if (*(float *) &args[2] == 0) {
30737+ WRITE_SHORT(glVertex2f_func);
30738+ WRITE_FLOAT(*(float *) &args[0]);
30739+ WRITE_FLOAT(*(float *) &args[1]);
30740+ do_default = 0;
30741+ }
30742+ break;
30743+ }
30744+
30745+ case glVertex3d_func:
30746+ {
30747+ WRITE_SHORT(glVertex3f_func);
30748+ WRITE_FLOAT(*(double *) args[0]);
30749+ WRITE_FLOAT(*(double *) args[1]);
30750+ WRITE_FLOAT(*(double *) args[2]);
30751+ do_default = 0;
30752+ break;
30753+ }
30754+
30755+ case glNormal3fv_func:
30756+ {
30757+ float *ptr = (float *) args[0];
30758+ float u = ptr[0];
30759+ float v = ptr[1];
30760+ float w = ptr[2];
30761+
30762+ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7
30763+ && fabs(w - (int) w) < 1e-7) {
30764+ int ui = (int) u;
30765+ int vi = (int) v;
30766+ int wi = (int) w;
30767+
30768+ if (IS_SHORT(ui) && IS_SHORT(vi) && IS_SHORT(wi)) {
30769+ WRITE_SHORT(glNormal3sv_func);
30770+ WRITE_SHORT(ui);
30771+ WRITE_SHORT(vi);
30772+ WRITE_SHORT(wi);
30773+ do_default = 0;
30774+ }
30775+ }
30776+ break;
30777+ }
30778+
30779+ case glNormal3d_func:
30780+ {
30781+ WRITE_SHORT(glNormal3f_func);
30782+ WRITE_FLOAT(*(double *) args[0]);
30783+ WRITE_FLOAT(*(double *) args[1]);
30784+ WRITE_FLOAT(*(double *) args[2]);
30785+ do_default = 0;
30786+ break;
30787+ }
30788+
30789+ case glDrawElements_func:
30790+ {
30791+ int mode = args[0];
30792+ int count = args[1];
30793+ int type = args[2];
30794+
30795+ if (type == GL_UNSIGNED_INT) {
30796+ int j;
30797+ unsigned int *ptr = (unsigned int *) args[3];
30798+
30799+ for (j = 0; j < count; j++) {
30800+ if ((ptr[j] >> 16) != 0)
30801+ break;
30802+ }
30803+ if (j == count) {
30804+ WRITE_SHORT(func_number);
30805+ WRITE_INT(mode);
30806+ WRITE_INT(count);
30807+ WRITE_INT(GL_UNSIGNED_SHORT);
30808+ if (reuse_array != -1) {
30809+ WRITE_INT(0);
30810+ } else {
30811+ WRITE_INT(count * sizeof(short));
30812+ for (j = 0; j < count; j++) {
30813+ WRITE_SHORT(ptr[j]);
30814+ }
30815+ }
30816+ do_default = 0;
30817+ } else
30818+ do_default = 1;
30819+ } else if (reuse_array != -1) {
30820+ WRITE_SHORT(func_number);
30821+ WRITE_INT(mode);
30822+ WRITE_INT(count);
30823+ WRITE_INT(type);
30824+ WRITE_INT(0);
30825+ do_default = 0;
30826+ } else
30827+ do_default = 1;
30828+ break;
30829+ }
30830+
30831+ case glBufferDataARB_func:
30832+ {
30833+ if (reuse_array != -1) {
30834+ WRITE_SHORT(glBufferDataARB_func);
30835+ WRITE_INT(args[0]);
30836+ WRITE_INT(args[1]);
30837+ WRITE_INT(0);
30838+ WRITE_INT(args[3]);
30839+ do_default = 0;
30840+ }
30841+ break;
30842+ }
30843+
30844+ case glVertexPointer_fake_func:
30845+ case glTexCoordPointer_fake_func:
30846+ case glTexCoordPointer01_fake_func:
30847+ {
30848+ int offset = 0, index = 0, size, type, stride, bytes_size;
30849+ void *ptr;
30850+ int countarg = 0;
30851+
30852+ if (func_number == glVertexPointer_fake_func ||
30853+ func_number == glTexCoordPointer_fake_func)
30854+ offset = args[countarg++];
30855+ if (func_number == glTexCoordPointer_fake_func)
30856+ index = args[countarg++];
30857+ size = args[countarg++];
30858+ type = args[countarg++];
30859+ stride = args[countarg++];
30860+ bytes_size = args[countarg++];
30861+ ptr = (void *) args[countarg++];
30862+ if (type == GL_DOUBLE) {
30863+ int count;
30864+ int j, k;
30865+
30866+ if (stride == 0)
30867+ stride = size * sizeof(double);
30868+ assert((bytes_size % stride) == 0);
30869+ assert((offset % stride) == 0);
30870+ offset = (offset / stride) * size * sizeof(float);
30871+ count = bytes_size / stride;
30872+ WRITE_SHORT(func_number);
30873+ if (func_number == glVertexPointer_fake_func ||
30874+ func_number == glTexCoordPointer_fake_func)
30875+ WRITE_INT(offset);
30876+ if (func_number == glTexCoordPointer_fake_func)
30877+ WRITE_INT(index);
30878+ WRITE_INT(size);
30879+ WRITE_INT(GL_FLOAT);
30880+ WRITE_INT(0);
30881+ WRITE_INT(count * size * sizeof(float));
30882+ if (reuse_array != -1) {
30883+ WRITE_INT(0);
30884+ } else {
30885+ WRITE_INT(count * size * sizeof(float));
30886+ for (j = 0; j < count; j++) {
30887+ for (k = 0; k < size; k++) {
30888+ WRITE_FLOAT(*(double *)
30889+ (ptr + j * stride +
30890+ k * sizeof(double)));
30891+ }
30892+ }
30893+ }
30894+ do_default = 0;
30895+ } else if (reuse_array != -1) {
30896+ WRITE_SHORT(func_number);
30897+ if (func_number == glVertexPointer_fake_func ||
30898+ func_number == glTexCoordPointer_fake_func)
30899+ WRITE_INT(offset);
30900+ if (func_number == glTexCoordPointer_fake_func)
30901+ WRITE_INT(index);
30902+ WRITE_INT(size);
30903+ WRITE_INT(type);
30904+ WRITE_INT(stride);
30905+ WRITE_INT(bytes_size);
30906+ WRITE_INT(0);
30907+ do_default = 0;
30908+ } else
30909+ do_default = 1;
30910+ break;
30911+ }
30912+
30913+ default:
30914+ break;
30915+ }
30916+
30917+ if (do_default) {
30918+ fwrite(&func_number, sizeof(short), 1, compressed_file);
30919+ for (i = 0; i < nb_args; i++) {
30920+ switch (args_type[i]) {
30921+ case TYPE_UNSIGNED_CHAR:
30922+ case TYPE_CHAR:
30923+ {
30924+ char c = args[i];
30925+
30926+ fwrite(&c, sizeof(c), 1, compressed_file);
30927+ break;
30928+ }
30929+
30930+ case TYPE_UNSIGNED_SHORT:
30931+ case TYPE_SHORT:
30932+ {
30933+ short s = args[i];
30934+
30935+ fwrite(&s, sizeof(s), 1, compressed_file);
30936+ break;
30937+ }
30938+
30939+ case TYPE_UNSIGNED_INT:
30940+ case TYPE_INT:
30941+ case TYPE_FLOAT:{
30942+ int n = args[i];
30943+ fwrite(&n, sizeof(int), 1, compressed_file);
30944+ break;
30945+ }
30946+
30947+ case TYPE_NULL_TERMINATED_STRING:
30948+ CASE_IN_UNKNOWN_SIZE_POINTERS:
30949+ fwrite(&args_size[i], sizeof(int), 1,
30950+ compressed_file);
30951+ if (args_size[i]) {
30952+ fwrite((void *) args[i], args_size[i], 1,
30953+ compressed_file);
30954+ }
30955+ break;
30956+
30957+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
30958+ {
30959+ fwrite(&args_size[i], sizeof(int), 1,
30960+ compressed_file);
30961+ break;
30962+ }
30963+
30964+ CASE_OUT_KNOWN_SIZE_POINTERS:
30965+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
30966+ {
30967+ break;
30968+ }
30969+
30970+ case TYPE_DOUBLE:
30971+ CASE_IN_KNOWN_SIZE_POINTERS:
30972+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
30973+ fwrite((void *) args[i], args_size[i], 1,
30974+ compressed_file);
30975+ break;
30976+
30977+ case TYPE_IN_IGNORED_POINTER:
30978+ break;
30979+
30980+ default:
30981+ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
30982+ tab_opengl_calls_name[func_number], i);
30983+ do_disconnect_current();
30984+ return 0;
30985+ }
30986+ }
30987+ }
30988+ }
30989+
30990+ int new_offset = ftell(f);
30991+
30992+ if (show_offset ||
30993+ (show_diff_offset &&
30994+ new_offset - last_cmd_offset >= show_diff_offset)) {
30995+ fprintf(stderr, "offset = %d, diff=%d\n", new_offset,
30996+ new_offset - last_cmd_offset);
30997+ }
30998+ last_cmd_offset = new_offset;
30999+
31000+ if (func_number == glXCreateContext_func &&
31001+ args[1] == visualid_fbconfig_read) {
31002+ args[1] = visualid_fbconfig_real;
31003+ }
31004+ if (debug) {
31005+ if (func_number == glBindProgramARB_func) {
31006+ fprintf(stderr, "glBindProgramARB_func(y, x) : x = %d\n",
31007+ (int) args[1]);
31008+ } else if (func_number == glXGetProcAddress_fake_func) {
31009+ fprintf(stderr, "glXGetProcAddress_fake(%s)\n",
31010+ (char *) args[0]);
31011+ }
31012+ }
31013+
31014+ if (debug && func_number == glEnable_func) {
31015+ fprintf(stderr, "enable(0x%x)\n", (int) args[0]);
31016+ } else if (debug && func_number == glDisable_func) {
31017+ fprintf(stderr, "disable(0x%x)\n", (int) args[0]);
31018+ }
31019+
31020+ if (resize) {
31021+ if (func_number == _moveResizeWindow_func) {
31022+ int *params = (int *) args[1];
31023+
31024+ orig_window_width = params[2];
31025+ window_height = params[3] =
31026+ params[3] * window_width / params[2];
31027+ params[2] = window_width;
31028+ // buffer = malloc(4 * window_width * window_height);
31029+ } else if (func_number == glViewport_func ||
31030+ func_number == glScissor_func) {
31031+ args[0] = args[0] * window_width / orig_window_width;
31032+ args[1] = args[1] * window_width / orig_window_width;
31033+ args[2] = args[2] * window_width / orig_window_width;
31034+ args[3] = args[3] * window_width / orig_window_width;
31035+ }
31036+ } else if (func_number == _moveResizeWindow_func) {
31037+ int *params = (int *) args[1];
31038+
31039+ window_width = params[2];
31040+ window_height = params[3];
31041+ // buffer = malloc(4 * window_width * window_height);
31042+ }
31043+
31044+ int ret =
31045+ (noplay) ? 0 : do_function_call(func_number, args, ret_string);
31046+
31047+ if (func_number == glXSwapBuffers_func) {
31048+ /* glReadPixels(0, 0, window_width, window_height, GL_RGBA,
31049+ * GL_UNSIGNED_BYTE, buffer); fwrite(buffer, 4 * window_width *
31050+ * window_height, 1, fout); */
31051+
31052+ int diff_time;
31053+
31054+ count_current++;
31055+ gettimeofday(&current_time, NULL);
31056+ diff_time =
31057+ (current_time.tv_sec - last_time.tv_sec) * 1000 +
31058+ (current_time.tv_usec - last_time.tv_usec) / 1000;
31059+ if (diff_time > refresh_rate) {
31060+ printf("%d frames in %.1f seconds = %.3f FPS\n",
31061+ count_current - count_last_time, diff_time / 1000.,
31062+ (count_current - count_last_time) * 1000. / diff_time);
31063+ if (show_hard_disk_bandwith) {
31064+ int current_offset = ftell(f);
31065+
31066+ printf("bandwidth : %.1f MB/s\n",
31067+ (current_offset - last_offset) * 1e-6);
31068+ last_offset = current_offset;
31069+ }
31070+ last_time.tv_sec = current_time.tv_sec;
31071+ last_time.tv_usec = current_time.tv_usec;
31072+ count_last_time = count_current;
31073+ }
31074+ usleep(slowdown * 50000);
31075+ }
31076+ if (debug && func_number == glGenProgramsARB_func && args[0] == 1) {
31077+ fprintf(stderr, "glGenProgramsARB_func(1, &x) : x = %d\n",
31078+ *(int *) args[1]);
31079+ }
31080+
31081+ if (func_number == glXGetVisualFromFBConfig_func) {
31082+ fread(&visualid_fbconfig_read, sizeof(int), 1, f);
31083+ visualid_fbconfig_real = ret;
31084+ }
31085+
31086+ for (i = 0; i < nb_args; i++) {
31087+ switch (args_type[i]) {
31088+ case TYPE_UNSIGNED_INT:
31089+ case TYPE_INT:
31090+ case TYPE_UNSIGNED_CHAR:
31091+ case TYPE_CHAR:
31092+ case TYPE_UNSIGNED_SHORT:
31093+ case TYPE_SHORT:
31094+ case TYPE_FLOAT:
31095+ break;
31096+
31097+ case TYPE_NULL_TERMINATED_STRING:
31098+ CASE_POINTERS:
31099+ case TYPE_DOUBLE:
31100+ if (args[i])
31101+ free((void *) args[i]);
31102+ break;
31103+
31104+ case TYPE_IN_IGNORED_POINTER:
31105+ args[i] = 0;
31106+ break;
31107+
31108+ default:
31109+ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
31110+ tab_opengl_calls_name[func_number], i);
31111+ do_disconnect_current();
31112+ return 0;
31113+ }
31114+ }
31115+ }
31116+ return 0;
31117+}
31118Index: qemu-0.13.0/target-i386/opengl_server.c
31119===================================================================
31120--- /dev/null 1970-01-01 00:00:00.000000000 +0000
31121+++ qemu-0.13.0/target-i386/opengl_server.c 2011-01-17 16:42:36.000000000 +0800
31122@@ -0,0 +1,826 @@
31123+/*
31124+ * TCP/IP OpenGL server
31125+ *
31126+ * Copyright (c) 2007 Even Rouault
31127+ *
31128+ * Permission is hereby granted, free of charge, to any person obtaining a copy
31129+ * of this software and associated documentation files (the "Software"), to deal
31130+ * in the Software without restriction, including without limitation the rights
31131+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
31132+ * copies of the Software, and to permit persons to whom the Software is
31133+ * furnished to do so, subject to the following conditions:
31134+ *
31135+ * The above copyright notice and this permission notice shall be included in
31136+ * all copies or substantial portions of the Software.
31137+ *
31138+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31139+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31140+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
31141+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31142+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31143+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
31144+ * THE SOFTWARE.
31145+ */
31146+
31147+/* gcc -Wall -O2 -g opengl_server.c opengl_exec.c -o opengl_server -I../i386-softmmu -I. -I.. -lGL */
31148+
31149+#include <stdio.h>
31150+#include <errno.h>
31151+#include <stdlib.h>
31152+#include <unistd.h>
31153+#include <string.h>
31154+#include <assert.h>
31155+#include <sys/types.h>
31156+#include <sys/socket.h>
31157+#include <netinet/in.h>
31158+#include <netinet/tcp.h>
31159+#include <netdb.h>
31160+#include <arpa/inet.h>
31161+#include <sys/time.h>
31162+#include <signal.h>
31163+
31164+#include <X11/Xlib.h>
31165+#include <X11/Xutil.h>
31166+
31167+#define PORT 5555
31168+
31169+#define ENABLE_GL_LOG
31170+
31171+#include "opengl_func.h"
31172+#include "opengl_utils.h"
31173+
31174+static int refresh_rate = 1000;
31175+static int must_save = 0;
31176+static int timestamp = 1; /* only valid if must_save == 1. include timestamps in the save file to enable real-time playback */
31177+
31178+extern int display_function_call;
31179+extern void init_process_tab(void);
31180+extern int do_function_call(Display *, int, int, arg_t *, char *);
31181+extern void opengl_exec_set_local_connection(void);
31182+extern void opengl_exec_set_parent_window(Display *_dpy, Window _parent_window);
31183+
31184+#ifdef ENABLE_GL_LOG
31185+static FILE* f = NULL;
31186+
31187+static char* filename = "/tmp/debug_gl.bin";
31188+
31189+#define write_gl_debug_init() do { if (f == NULL) f = fopen(filename, "wb"); } while(0)
31190+
31191+static void inline write_gl_debug_cmd_char(char my_int)
31192+{
31193+ write_gl_debug_init();
31194+ fwrite(&my_int, sizeof(my_int), 1, f);
31195+}
31196+
31197+static void inline write_gl_debug_cmd_short(short my_int)
31198+{
31199+ write_gl_debug_init();
31200+ fwrite(&my_int, sizeof(my_int), 1, f);
31201+}
31202+
31203+static void inline write_gl_debug_cmd_int(int my_int)
31204+{
31205+ write_gl_debug_init();
31206+ fwrite(&my_int, sizeof(my_int), 1, f);
31207+}
31208+
31209+static void inline write_gl_debug_cmd_longlong(long long my_longlong)
31210+{
31211+ write_gl_debug_init();
31212+ fwrite(&my_longlong, sizeof(my_longlong), 1, f);
31213+}
31214+
31215+static void inline write_gl_debug_cmd_buffer_with_size(int size, void* buffer)
31216+{
31217+ write_gl_debug_init();
31218+ fwrite(&size, sizeof(int), 1, f);
31219+ if (size)
31220+ fwrite(buffer, size, 1, f);
31221+}
31222+
31223+static void inline write_gl_debug_cmd_buffer_without_size(int size, void* buffer)
31224+{
31225+ write_gl_debug_init();
31226+ if (size)
31227+ fwrite(buffer, size, 1, f);
31228+}
31229+
31230+static void inline write_gl_debug_end()
31231+{
31232+ write_gl_debug_init();
31233+ fclose(f);
31234+ f = NULL;
31235+}
31236+
31237+#endif
31238+
31239+static void write_sock_data(int sock, void* data, int len)
31240+{
31241+ if (len && data)
31242+ {
31243+ int offset = 0;
31244+ while(offset < len)
31245+ {
31246+ int nwritten = write(sock, data + offset, len - offset);
31247+ if (nwritten == -1)
31248+ {
31249+ if (errno == EINTR)
31250+ continue;
31251+ perror("write");
31252+ assert(nwritten != -1);
31253+ }
31254+ offset += nwritten;
31255+ }
31256+ }
31257+}
31258+
31259+static void inline write_sock_int(int sock, int my_int)
31260+{
31261+ write_sock_data(sock, &my_int, sizeof(int));
31262+}
31263+
31264+static int total_read = 0;
31265+static void read_sock_data(int sock, void* data, int len)
31266+{
31267+ if (len)
31268+ {
31269+ int offset = 0;
31270+ while(offset < len)
31271+ {
31272+ int nread = read(sock, data + offset, len - offset);
31273+ if (nread == -1)
31274+ {
31275+ if (errno == EINTR)
31276+ continue;
31277+ perror("read");
31278+ assert(nread != -1);
31279+ }
31280+ if (nread == 0)
31281+ {
31282+ fprintf(stderr, "nread = 0\n");
31283+ }
31284+ assert(nread > 0);
31285+ offset += nread;
31286+ total_read += nread;
31287+ }
31288+ }
31289+}
31290+
31291+static int inline read_sock_int(int sock)
31292+{
31293+ int ret;
31294+ read_sock_data(sock, &ret, sizeof(int));
31295+ return ret;
31296+}
31297+
31298+static short inline read_sock_short(int sock)
31299+{
31300+ short ret;
31301+ read_sock_data(sock, &ret, sizeof(short));
31302+ return ret;
31303+}
31304+
31305+
31306+static Display* dpy = NULL;
31307+static int parent_xid = -1;
31308+
31309+
31310+static struct timeval last_time, current_time, time_stamp_start;
31311+static int count_last_time = 0, count_current = 0;
31312+
31313+static struct timeval last_read_time, current_read_time;
31314+
31315+int has_x_error = 0;
31316+
31317+int
31318+read_from_client (int sock)
31319+{
31320+ arg_t args[50];
31321+ int args_size[50];
31322+ char ret_string[32768];
31323+ char command_buffer[65536*16];
31324+
31325+ if (dpy == NULL)
31326+ {
31327+ init_process_tab();
31328+ dpy = XOpenDisplay(NULL);
31329+ if (parent_xid != -1)
31330+ {
31331+ opengl_exec_set_parent_window(dpy, parent_xid);
31332+ }
31333+ }
31334+
31335+ int i;
31336+ int func_number = read_sock_short(sock);
31337+
31338+ Signature* signature = (Signature*)tab_opengl_calls[func_number];
31339+ int ret_type = signature->ret_type;
31340+ int nb_args = signature->nb_args;
31341+ int* args_type = signature->args_type;
31342+ int pid = 0;
31343+
31344+ if (func_number == _serialized_calls_func)
31345+ {
31346+ int command_buffer_size = read_sock_int(sock);
31347+ int commmand_buffer_offset = 0;
31348+ read_sock_data(sock, command_buffer, command_buffer_size);
31349+ /* TODO: must convert if client is different word size */
31350+
31351+#ifdef ENABLE_GL_LOG
31352+ if (must_save) write_gl_debug_cmd_short(_serialized_calls_func);
31353+#endif
31354+
31355+ while(commmand_buffer_offset < command_buffer_size)
31356+ {
31357+ func_number = *(short*)(command_buffer + commmand_buffer_offset);
31358+ if( ! (func_number >= 0 && func_number < GL_N_CALLS) )
31359+ {
31360+ fprintf(stderr, "func_number >= 0 && func_number < GL_N_CALLS failed at "
31361+ "commmand_buffer_offset=%d (command_buffer_size=%d)\n",
31362+ commmand_buffer_offset, command_buffer_size);
31363+ exit(-1);
31364+ }
31365+
31366+#ifdef ENABLE_GL_LOG
31367+ if (must_save) write_gl_debug_cmd_short(func_number);
31368+#endif
31369+ commmand_buffer_offset += sizeof(short);
31370+
31371+
31372+ signature = (Signature*)tab_opengl_calls[func_number];
31373+ ret_type = signature->ret_type;
31374+ assert(ret_type == TYPE_NONE);
31375+ nb_args = signature->nb_args;
31376+ args_type = signature->args_type;
31377+
31378+ for(i=0;i<nb_args;i++)
31379+ {
31380+ switch(args_type[i])
31381+ {
31382+ case TYPE_UNSIGNED_CHAR:
31383+ case TYPE_CHAR:
31384+ {
31385+ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
31386+#ifdef ENABLE_GL_LOG
31387+ if (must_save) write_gl_debug_cmd_char(args[i]);
31388+#endif
31389+ commmand_buffer_offset += sizeof(int);
31390+ break;
31391+ }
31392+
31393+ case TYPE_UNSIGNED_SHORT:
31394+ case TYPE_SHORT:
31395+ {
31396+ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
31397+#ifdef ENABLE_GL_LOG
31398+ if (must_save) write_gl_debug_cmd_short(args[i]);
31399+#endif
31400+ commmand_buffer_offset += sizeof(int);
31401+ break;
31402+ }
31403+
31404+ case TYPE_UNSIGNED_INT:
31405+ case TYPE_INT:
31406+ case TYPE_FLOAT:
31407+ {
31408+ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
31409+#ifdef ENABLE_GL_LOG
31410+ if (must_save) write_gl_debug_cmd_int(args[i]);
31411+#endif
31412+ commmand_buffer_offset += sizeof(int);
31413+ break;
31414+ }
31415+
31416+ case TYPE_NULL_TERMINATED_STRING:
31417+ CASE_IN_UNKNOWN_SIZE_POINTERS:
31418+ {
31419+ args_size[i] = *(int*)(command_buffer + commmand_buffer_offset);
31420+ commmand_buffer_offset += sizeof(int);
31421+
31422+ if (args_size[i] == 0)
31423+ {
31424+ args[i] = 0;
31425+ }
31426+ else
31427+ {
31428+ args[i] = (long)(command_buffer + commmand_buffer_offset);
31429+ }
31430+
31431+ if (args[i] == 0)
31432+ {
31433+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
31434+ {
31435+ fprintf(stderr, "call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31436+ return 0;
31437+ }
31438+ }
31439+#ifdef ENABLE_GL_LOG
31440+ if (must_save) write_gl_debug_cmd_buffer_with_size(args_size[i], (void*)args[i]);
31441+#endif
31442+ commmand_buffer_offset += args_size[i];
31443+
31444+ break;
31445+ }
31446+
31447+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31448+ {
31449+ args_size[i] = compute_arg_length(stderr, func_number, i, args);
31450+ args[i] = (args_size[i]) ? (long)(command_buffer + commmand_buffer_offset) : 0;
31451+#ifdef ENABLE_GL_LOG
31452+ if (must_save) write_gl_debug_cmd_buffer_without_size(args_size[i], (void*)args[i]);
31453+#endif
31454+ commmand_buffer_offset += args_size[i];
31455+ break;
31456+ }
31457+
31458+ CASE_OUT_POINTERS:
31459+ {
31460+ fprintf(stderr, "shouldn't happen TYPE_OUT_xxxx : call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31461+ return 0;
31462+ break;
31463+ }
31464+
31465+ case TYPE_DOUBLE:
31466+ CASE_IN_KNOWN_SIZE_POINTERS:
31467+ args[i] = (long)(command_buffer + commmand_buffer_offset);
31468+ args_size[i] = tab_args_type_length[args_type[i]];
31469+#ifdef ENABLE_GL_LOG
31470+ if (must_save) write_gl_debug_cmd_buffer_without_size(tab_args_type_length[args_type[i]], (void*)args[i]);
31471+#endif
31472+ commmand_buffer_offset += tab_args_type_length[args_type[i]];
31473+ break;
31474+
31475+ case TYPE_IN_IGNORED_POINTER:
31476+ args[i] = 0;
31477+ break;
31478+
31479+ default:
31480+ fprintf(stderr, "shouldn't happen : call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31481+ return 0;
31482+ break;
31483+ }
31484+ }
31485+
31486+ if (display_function_call) display_gl_call(stderr, func_number, args, args_size);
31487+
31488+ do_function_call(dpy, func_number, 1, args, ret_string);
31489+ }
31490+ }
31491+ else
31492+ {
31493+#ifdef ENABLE_GL_LOG
31494+ if (must_save && func_number != _synchronize_func) write_gl_debug_cmd_short(func_number);
31495+#endif
31496+
31497+ for(i=0;i<nb_args;i++)
31498+ {
31499+ switch(args_type[i])
31500+ {
31501+ case TYPE_UNSIGNED_CHAR:
31502+ case TYPE_CHAR:
31503+ args[i] = read_sock_int(sock);
31504+#ifdef ENABLE_GL_LOG
31505+ if (must_save) write_gl_debug_cmd_char(args[i]);
31506+#endif
31507+ break;
31508+
31509+ case TYPE_UNSIGNED_SHORT:
31510+ case TYPE_SHORT:
31511+ args[i] = read_sock_int(sock);
31512+#ifdef ENABLE_GL_LOG
31513+ if (must_save) write_gl_debug_cmd_short(args[i]);
31514+#endif
31515+ break;
31516+
31517+ case TYPE_UNSIGNED_INT:
31518+ case TYPE_INT:
31519+ case TYPE_FLOAT:
31520+ args[i] = read_sock_int(sock);
31521+#ifdef ENABLE_GL_LOG
31522+ if (must_save) write_gl_debug_cmd_int(args[i]);
31523+#endif
31524+ break;
31525+
31526+ case TYPE_NULL_TERMINATED_STRING:
31527+ CASE_IN_UNKNOWN_SIZE_POINTERS:
31528+ {
31529+ args_size[i] = read_sock_int(sock);
31530+ if (args_size[i])
31531+ {
31532+ args[i] = (long)malloc(args_size[i]);
31533+ read_sock_data(sock, (void*)args[i], args_size[i]);
31534+ }
31535+ else
31536+ {
31537+ args[i] = 0;
31538+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
31539+ {
31540+ fprintf(stderr, "call %s arg %d\n", tab_opengl_calls_name[func_number], i);
31541+ return 0;
31542+ }
31543+ }
31544+#ifdef ENABLE_GL_LOG
31545+ if (must_save) write_gl_debug_cmd_buffer_with_size(args_size[i], (void*)args[i]);
31546+#endif
31547+ break;
31548+ }
31549+
31550+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31551+ {
31552+ args_size[i] = compute_arg_length(stderr, func_number, i, args);
31553+ args[i] = (args_size[i]) ? (long)malloc(args_size[i]) : 0;
31554+ read_sock_data(sock, (void*)args[i], args_size[i]);
31555+#ifdef ENABLE_GL_LOG
31556+ if (must_save) write_gl_debug_cmd_buffer_without_size(args_size[i], (void*)args[i]);
31557+#endif
31558+ break;
31559+ }
31560+
31561+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31562+ {
31563+ args_size[i] = compute_arg_length(stderr, func_number, i, args);
31564+ args[i] = (long)malloc(args_size[i]);
31565+ break;
31566+ }
31567+
31568+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
31569+ {
31570+ args_size[i] = read_sock_int(sock);
31571+ if (func_number == glGetProgramLocalParameterdvARB_func)
31572+ {
31573+ fprintf(stderr, "size = %d\n", args_size[i]);
31574+ }
31575+ if (args_size[i])
31576+ {
31577+ args[i] = (long)malloc(args_size[i]);
31578+ }
31579+ else
31580+ {
31581+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
31582+ {
31583+ fprintf(stderr, "call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31584+ return 0;
31585+ };
31586+ args[i] = 0;
31587+ }
31588+ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
31589+#ifdef ENABLE_GL_LOG
31590+ if (must_save) write_gl_debug_cmd_int(args_size[i]);
31591+#endif
31592+ break;
31593+ }
31594+
31595+ CASE_OUT_KNOWN_SIZE_POINTERS:
31596+ {
31597+ args_size[i] = tab_args_type_length[args_type[i]];
31598+ assert(args_size[i]);
31599+ args[i] = (long)malloc(args_size[i]);
31600+ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
31601+ break;
31602+ }
31603+
31604+ case TYPE_DOUBLE:
31605+ CASE_IN_KNOWN_SIZE_POINTERS:
31606+ args_size[i] = tab_args_type_length[args_type[i]];
31607+ args[i] = (long)malloc(args_size[i]);
31608+ read_sock_data(sock, (void*)args[i], args_size[i]);
31609+#ifdef ENABLE_GL_LOG
31610+ if (must_save) write_gl_debug_cmd_buffer_without_size(tab_args_type_length[args_type[i]], (void*)args[i]);
31611+#endif
31612+ break;
31613+
31614+ case TYPE_IN_IGNORED_POINTER:
31615+ args[i] = 0;
31616+ break;
31617+
31618+ default:
31619+ fprintf(stderr, "shouldn't happen : call %s arg %d\n", tab_opengl_calls_name[func_number], i);
31620+ return 0;
31621+ break;
31622+ }
31623+ }
31624+
31625+ if (display_function_call) display_gl_call(stderr, func_number, args, args_size);
31626+
31627+ if (getenv("ALWAYS_FLUSH")) fflush(f);
31628+
31629+ int ret = do_function_call(dpy, func_number, 1, args, ret_string);
31630+#ifdef ENABLE_GL_LOG
31631+ if (must_save && func_number == glXGetVisualFromFBConfig_func)
31632+ {
31633+ write_gl_debug_cmd_int(ret);
31634+ }
31635+#endif
31636+
31637+ for(i=0;i<nb_args;i++)
31638+ {
31639+ switch(args_type[i])
31640+ {
31641+ case TYPE_UNSIGNED_INT:
31642+ case TYPE_INT:
31643+ case TYPE_UNSIGNED_CHAR:
31644+ case TYPE_CHAR:
31645+ case TYPE_UNSIGNED_SHORT:
31646+ case TYPE_SHORT:
31647+ case TYPE_FLOAT:
31648+ break;
31649+
31650+ case TYPE_NULL_TERMINATED_STRING:
31651+ case TYPE_DOUBLE:
31652+ CASE_IN_POINTERS:
31653+ if (args[i]) free((void*)args[i]);
31654+ break;
31655+
31656+ CASE_OUT_POINTERS:
31657+ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
31658+ write_sock_data(sock, (void*)args[i], args_size[i]);
31659+ if (display_function_call)
31660+ {
31661+ if (args_type[i] == TYPE_OUT_1INT)
31662+ {
31663+ fprintf(stderr, "out[%d] : %d\n", i, *(int*)args[i]);
31664+ }
31665+ else if (args_type[i] == TYPE_OUT_1FLOAT)
31666+ {
31667+ fprintf(stderr, "out[%d] : %f\n", i, *(float*)args[i]);
31668+ }
31669+ }
31670+ if (args[i]) free((void*)args[i]);
31671+ break;
31672+
31673+ case TYPE_IN_IGNORED_POINTER:
31674+ args[i] = 0;
31675+ break;
31676+
31677+ default:
31678+ fprintf(stderr, "shouldn't happen : call %s arg %d\n", tab_opengl_calls_name[func_number], i);
31679+ return 0;
31680+ break;
31681+ }
31682+ }
31683+
31684+ if (signature->ret_type == TYPE_CONST_CHAR)
31685+ {
31686+ write_sock_int(sock, strlen(ret_string) + 1);
31687+ write_sock_data(sock, ret_string, strlen(ret_string) + 1);
31688+ }
31689+ else if (signature->ret_type != TYPE_NONE)
31690+ {
31691+ write_sock_int(sock, ret);
31692+ }
31693+
31694+#ifdef ENABLE_GL_LOG
31695+ if (must_save && func_number == _exit_process_func)
31696+ {
31697+ write_gl_debug_end();
31698+ }
31699+#endif
31700+ if (func_number == _exit_process_func)
31701+ {
31702+ return -1;
31703+ }
31704+ else if (func_number == glXSwapBuffers_func)
31705+ {
31706+ int diff_time;
31707+ count_current++;
31708+ gettimeofday(&current_time, NULL);
31709+#ifdef ENABLE_GL_LOG
31710+ if (must_save && timestamp)
31711+ {
31712+ long long ts = (current_time.tv_sec - time_stamp_start.tv_sec) * (long long)1000000 + current_time.tv_usec - time_stamp_start.tv_usec;
31713+ /* -1 is special code that indicates time synchro */
31714+ write_gl_debug_cmd_short(timesynchro_func);
31715+ write_gl_debug_cmd_longlong(ts);
31716+ }
31717+#endif
31718+ diff_time = (current_time.tv_sec - last_time.tv_sec) * 1000 + (current_time.tv_usec - last_time.tv_usec) / 1000;
31719+ if (diff_time > refresh_rate)
31720+ {
31721+#ifdef ENABLE_GL_LOG
31722+ fflush(f);
31723+#endif
31724+ printf("%d frames in %.1f seconds = %.3f FPS\n",
31725+ count_current - count_last_time,
31726+ diff_time / 1000.,
31727+ (count_current - count_last_time) * 1000. / diff_time);
31728+ last_time.tv_sec = current_time.tv_sec;
31729+ last_time.tv_usec = current_time.tv_usec;
31730+ count_last_time = count_current;
31731+ }
31732+ }
31733+ }
31734+ return 0;
31735+}
31736+
31737+int
31738+make_socket (uint16_t port)
31739+{
31740+ int sock;
31741+ struct sockaddr_in name;
31742+
31743+ /* Create the socket. */
31744+ sock = socket (PF_INET, SOCK_STREAM, 0);
31745+ if (sock < 0)
31746+ {
31747+ perror ("socket");
31748+ exit (EXIT_FAILURE);
31749+ }
31750+
31751+ /* Give the socket a name. */
31752+ name.sin_family = AF_INET;
31753+ name.sin_port = htons (port);
31754+ name.sin_addr.s_addr = htonl (INADDR_ANY);
31755+ if (bind (sock, (struct sockaddr *) &name, sizeof (name)) < 0)
31756+ {
31757+ perror ("bind");
31758+ exit (EXIT_FAILURE);
31759+ }
31760+
31761+ return sock;
31762+}
31763+
31764+static int x_error_handler(Display *display,
31765+ XErrorEvent *error)
31766+{
31767+ char buf[64];
31768+ XGetErrorText(display, error->error_code, buf, 63);
31769+ fprintf (stderr, "The program received an X Window System error.\n"
31770+ "This probably reflects a bug in the program.\n"
31771+ "The error was '%s'.\n"
31772+ " (Details: serial %ld error_code %d request_code %d minor_code %d)\n",
31773+ buf,
31774+ error->serial,
31775+ error->error_code,
31776+ error->request_code,
31777+ error->minor_code);
31778+ has_x_error = 1;
31779+ return 0;
31780+}
31781+
31782+void usage()
31783+{
31784+ printf("Usage : opengl_server [OPTION]\n\n");
31785+ printf("The following options are available :\n");
31786+ printf("--port=XXXX : set XXX as the port number for the TCP/IP server (default : 5555)\n");
31787+ printf("--debug : output debugging trace on stderr\n");
31788+ printf("--save : dump the serialialized OpenGL flow in a file (default : /tmp/debug_gl.bin)\n");
31789+ printf("--filename=X : the file where to write the serailized OpenGL flow\n");
31790+ printf("--different-windows : even if the client is on 127.0.0.1, display OpenGL on a new X window\n");
31791+ printf("--parent-xid=XXX : use XXX as the XID of the parent X window where to display the OpenGL flow\n");
31792+ printf(" This is useful if you want to run accelerated OpenGL inside a non-patched QEMU\n");
31793+ printf(" or from another emulator, through TCP/IP\n");
31794+ printf("--h or --help : display this help\n");
31795+}
31796+
31797+int
31798+main (int argc, char* argv[])
31799+{
31800+ int sock;
31801+ fd_set active_fd_set, read_fd_set;
31802+ int i;
31803+ struct sockaddr_in clientname;
31804+ socklen_t size;
31805+ int port = PORT;
31806+ int different_windows = 0;
31807+
31808+ for(i=1;i<argc;i++)
31809+ {
31810+ if (argv[i][0] == '-' && argv[i][1] == '-')
31811+ argv[i] = argv[i]+1;
31812+
31813+ if (strcmp(argv[i], "-debug") == 0)
31814+ {
31815+ display_function_call = 1;
31816+ }
31817+ else if (strcmp(argv[i], "-save") == 0)
31818+ {
31819+ must_save = 1;
31820+ }
31821+ else if (strncmp(argv[i], "-port=",6) == 0)
31822+ {
31823+ port = atoi(argv[i] + 6);
31824+ }
31825+ else if (strncmp(argv[i], "-filename=",strlen("-filename=")) == 0)
31826+ {
31827+ filename = argv[i] + strlen("-filename=");
31828+ }
31829+ else if (strncmp(argv[i], "-parent-xid=",strlen("-parent-xid=")) == 0)
31830+ {
31831+ char* c = argv[i] + strlen("-parent-xid=");
31832+ parent_xid = strtol(c, NULL, 0);
31833+ different_windows = 1;
31834+ }
31835+ else if (strcmp(argv[i], "-different-windows") == 0)
31836+ {
31837+ different_windows = 1;
31838+ }
31839+ else if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "-help") == 0)
31840+ {
31841+ usage();
31842+ return 0;
31843+ }
31844+ else
31845+ {
31846+ fprintf(stderr, "unknown parameter : %s\n", argv[i]);
31847+ usage();
31848+ return -1;
31849+ }
31850+ }
31851+
31852+ /* Create the socket and set it up to accept connections. */
31853+ sock = make_socket (port);
31854+
31855+ int flag = 1;
31856+ if (setsockopt(sock, IPPROTO_IP, SO_REUSEADDR,(char *)&flag, sizeof(int)) != 0)
31857+ {
31858+ perror("setsockopt SO_REUSEADDR");
31859+ }
31860+ if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,(char *)&flag, sizeof(int)) != 0)
31861+ {
31862+ perror("setsockopt TCP_NODELAY");
31863+ }
31864+
31865+ if (listen (sock, 1) < 0)
31866+ {
31867+ perror ("listen");
31868+ exit (EXIT_FAILURE);
31869+ }
31870+
31871+ struct sigaction action;
31872+ action.sa_handler = SIG_IGN;
31873+ action.sa_flags = SA_NOCLDWAIT;
31874+ sigaction(SIGCHLD,&action,NULL);
31875+
31876+ FD_ZERO (&active_fd_set);
31877+ FD_SET (sock, &active_fd_set);
31878+
31879+ while(1)
31880+ {
31881+ int new, pid;
31882+
31883+ read_fd_set = active_fd_set;
31884+ if (select (FD_SETSIZE, &read_fd_set, NULL, NULL, NULL) < 0)
31885+ {
31886+ perror ("select");
31887+ exit (EXIT_FAILURE);
31888+ }
31889+
31890+ size = sizeof (clientname);
31891+ new = accept (sock, (struct sockaddr *) &clientname, &size);
31892+ if (new < 0)
31893+ {
31894+ perror ("accept");
31895+ exit (EXIT_FAILURE);
31896+ }
31897+ pid = fork();
31898+ if (pid == -1)
31899+ {
31900+ perror ("fork");
31901+ exit(EXIT_FAILURE);
31902+ }
31903+ if (pid == 0)
31904+ {
31905+ close(sock);
31906+
31907+ fprintf (stderr, "Server: connect from host %s, port %hd.\n",
31908+ inet_ntoa (clientname.sin_addr),
31909+ ntohs (clientname.sin_port));
31910+
31911+ gettimeofday(&last_time, NULL);
31912+ gettimeofday(&last_read_time, NULL);
31913+
31914+ if (strcmp(inet_ntoa(clientname.sin_addr), "127.0.0.1") == 0 &&
31915+ different_windows == 0)
31916+ {
31917+ opengl_exec_set_local_connection();
31918+ }
31919+
31920+ if (timestamp)
31921+ {
31922+ gettimeofday(&time_stamp_start, NULL);
31923+ }
31924+
31925+ XSetErrorHandler(x_error_handler);
31926+
31927+ while(1)
31928+ {
31929+ if (read_from_client (new) < 0)
31930+ {
31931+ do_function_call(dpy, _exit_process_func, 1, NULL, NULL);
31932+
31933+ fprintf (stderr, "Server: disconnect from host %s, port %hd.\n",
31934+ inet_ntoa (clientname.sin_addr),
31935+ ntohs (clientname.sin_port));
31936+
31937+ return 0;
31938+ }
31939+ }
31940+ }
31941+ else
31942+ {
31943+ close(new);
31944+ }
31945+ }
31946+
31947+ return 0;
31948+}
31949Index: qemu-0.13.0/target-i386/opengl_utils.h
31950===================================================================
31951--- /dev/null 1970-01-01 00:00:00.000000000 +0000
31952+++ qemu-0.13.0/target-i386/opengl_utils.h 2011-01-17 16:42:36.000000000 +0800
31953@@ -0,0 +1,453 @@
31954+/*
31955+ * Functions used by host & client sides
31956+ *
31957+ * Copyright (c) 2007 Even Rouault
31958+ *
31959+ * Permission is hereby granted, free of charge, to any person obtaining a copy
31960+ * of this software and associated documentation files (the "Software"), to deal
31961+ * in the Software without restriction, including without limitation the rights
31962+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
31963+ * copies of the Software, and to permit persons to whom the Software is
31964+ * furnished to do so, subject to the following conditions:
31965+ *
31966+ * The above copyright notice and this permission notice shall be included in
31967+ * all copies or substantial portions of the Software.
31968+ *
31969+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31970+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31971+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
31972+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31973+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31974+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
31975+ * THE SOFTWARE.
31976+ */
31977+
31978+
31979+#ifndef _OPENGL_UTILS
31980+#define _OPENGL_UTILS
31981+
31982+typedef struct {
31983+ unsigned int *values;
31984+ int nbValues;
31985+} RangeAllocator;
31986+
31987+/*
31988+static void print_range(RangeAllocator* range)
31989+{
31990+ int i;
31991+ printf("%s", "table : ");
31992+ for(i=0;i<range->nbValues;i++)
31993+ {
31994+ printf("%d ", range->values[i]);
31995+ }
31996+ printf("\n");
31997+}
31998+*/
31999+
32000+static inline void alloc_value(RangeAllocator *range, unsigned int value)
32001+{
32002+ if (value == 0)
32003+ return;
32004+ if (range->nbValues >= 1) {
32005+ int lower = 0;
32006+ int upper = range->nbValues - 1;
32007+
32008+ while (1) {
32009+ int mid = (lower + upper) / 2;
32010+
32011+ if (range->values[mid] > value)
32012+ upper = mid;
32013+ else if (range->values[mid] < value)
32014+ lower = mid;
32015+ else
32016+ break;
32017+ if (upper - lower <= 1) {
32018+ if (value < range->values[lower]) {
32019+ range->values =
32020+ realloc(range->values,
32021+ (range->nbValues + 1) * sizeof(int));
32022+ memmove(&range->values[lower + 1], &range->values[lower],
32023+ (range->nbValues - lower) * sizeof(int));
32024+ range->values[lower] = value;
32025+ range->nbValues++;
32026+ } else if (value == range->values[lower]) {
32027+ } else if (value < range->values[upper]) {
32028+ range->values =
32029+ realloc(range->values,
32030+ (range->nbValues + 1) * sizeof(int));
32031+ memmove(&range->values[upper + 1], &range->values[upper],
32032+ (range->nbValues - upper) * sizeof(int));
32033+ range->values[upper] = value;
32034+ range->nbValues++;
32035+ } else if (value == range->values[upper]) {
32036+ } else {
32037+ upper++;
32038+
32039+ range->values =
32040+ realloc(range->values,
32041+ (range->nbValues + 1) * sizeof(int));
32042+ memmove(&range->values[upper + 1], &range->values[upper],
32043+ (range->nbValues - upper) * sizeof(int));
32044+ range->values[upper] = value;
32045+ range->nbValues++;
32046+ }
32047+ break;
32048+ }
32049+ }
32050+ } else {
32051+ range->values = malloc(sizeof(int));
32052+ range->values[0] = value;
32053+ range->nbValues = 1;
32054+ }
32055+}
32056+
32057+/* return first value */
32058+static inline unsigned int alloc_range(RangeAllocator *range, int n,
32059+ unsigned int *values)
32060+{
32061+ int i, j;
32062+
32063+ if (range->nbValues == 0) {
32064+ range->nbValues = n;
32065+ range->values = malloc(n * sizeof(int));
32066+ for (i = 0; i < n; i++) {
32067+ range->values[i] = i + 1;
32068+ if (values)
32069+ values[i] = range->values[i];
32070+ }
32071+ return 1;
32072+ } else {
32073+ int lastValue = 1;
32074+
32075+ for (i = 0; i < range->nbValues; i++) {
32076+ if ((int) range->values[i] - (int) lastValue - 1 >= n) {
32077+ range->values =
32078+ realloc(range->values,
32079+ (range->nbValues + n) * sizeof(int));
32080+ memmove(&range->values[i + n], &range->values[i],
32081+ (range->nbValues - i) * sizeof(int));
32082+ for (j = 0; j < n; j++) {
32083+ range->values[i + j] = lastValue + 1 + j;
32084+ if (values)
32085+ values[j] = range->values[i + j];
32086+ }
32087+ range->nbValues += n;
32088+ break;
32089+ } else
32090+ lastValue = range->values[i];
32091+ }
32092+ if (i == range->nbValues) {
32093+ range->values =
32094+ realloc(range->values, (range->nbValues + n) * sizeof(int));
32095+ for (j = 0; j < n; j++) {
32096+ range->values[i + j] = lastValue + 1 + j;
32097+ if (values)
32098+ values[j] = range->values[i + j];
32099+ }
32100+ range->nbValues += n;
32101+ }
32102+ return lastValue + 1;
32103+ }
32104+}
32105+
32106+static inline void delete_value(RangeAllocator *range, unsigned int value)
32107+{
32108+ if (value == 0)
32109+ return;
32110+ if (range->nbValues >= 1) {
32111+ int lower = 0;
32112+ int upper = range->nbValues - 1;
32113+
32114+ while (1) {
32115+ int mid = (lower + upper) / 2;
32116+
32117+ if (range->values[mid] > value)
32118+ upper = mid;
32119+ else if (range->values[mid] < value)
32120+ lower = mid;
32121+ else {
32122+ lower = upper = mid;
32123+ }
32124+ if (upper - lower <= 1) {
32125+ if (value == range->values[lower]) {
32126+ memmove(&range->values[lower], &range->values[lower + 1],
32127+ (range->nbValues - lower - 1) * sizeof(int));
32128+ range->nbValues--;
32129+ } else if (value == range->values[upper]) {
32130+ memmove(&range->values[upper], &range->values[upper + 1],
32131+ (range->nbValues - upper - 1) * sizeof(int));
32132+ range->nbValues--;
32133+ }
32134+ break;
32135+ }
32136+ }
32137+ }
32138+}
32139+
32140+static inline void delete_range(RangeAllocator *range, int n,
32141+ const unsigned int *values)
32142+{
32143+ int i;
32144+
32145+ for (i = 0; i < n; i++) {
32146+ delete_value(range, values[i]);
32147+ }
32148+}
32149+
32150+static inline void delete_consecutive_values(RangeAllocator *range,
32151+ unsigned int first, int n)
32152+{
32153+ int i;
32154+
32155+ for (i = 0; i < n; i++) {
32156+ delete_value(range, first + i);
32157+ }
32158+}
32159+
32160+
32161+/*****************************************************************/
32162+/* */
32163+/* CRC LOOKUP TABLE */
32164+/* ================ */
32165+/* The following CRC lookup table was generated automagically */
32166+/* by the Rocksoft^tm Model CRC Algorithm Table Generation */
32167+/* Program V1.0 using the following model parameters: */
32168+/* */
32169+/* Width : 4 bytes. */
32170+/* Poly : 0x04C11DB7L */
32171+/* Reverse : TRUE. */
32172+/* */
32173+/* For more information on the Rocksoft^tm Model CRC Algorithm, */
32174+/* see the document titled "A Painless Guide to CRC Error */
32175+/* Detection Algorithms" by Ross Williams */
32176+/* (ross@guest.adelaide.edu.au.). This document is likely to be */
32177+/* in the FTP archive "ftp.adelaide.edu.au/pub/rocksoft". */
32178+/* */
32179+/*****************************************************************/
32180+
32181+static const unsigned int crctable[256] = {
32182+ 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,
32183+ 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
32184+ 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,
32185+ 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
32186+ 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,
32187+ 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
32188+ 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,
32189+ 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,
32190+ 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,
32191+ 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
32192+ 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,
32193+ 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
32194+ 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,
32195+ 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,
32196+ 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,
32197+ 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,
32198+ 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,
32199+ 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
32200+ 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,
32201+ 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
32202+ 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,
32203+ 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,
32204+ 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,
32205+ 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
32206+ 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,
32207+ 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,
32208+ 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,
32209+ 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,
32210+ 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,
32211+ 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
32212+ 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,
32213+ 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,
32214+ 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,
32215+ 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,
32216+ 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,
32217+ 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
32218+ 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,
32219+ 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,
32220+ 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,
32221+ 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
32222+ 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,
32223+ 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
32224+ 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,
32225+ 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,
32226+ 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,
32227+ 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,
32228+ 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,
32229+ 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
32230+ 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,
32231+ 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
32232+ 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,
32233+ 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,
32234+ 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,
32235+ 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
32236+ 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,
32237+ 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,
32238+ 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,
32239+ 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,
32240+ 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,
32241+ 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
32242+ 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,
32243+ 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,
32244+ 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,
32245+ 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
32246+};
32247+
32248+static unsigned int calc_checksum(const void *_ptr, int length,
32249+ unsigned int seed)
32250+{
32251+ int i;
32252+ unsigned int crc = seed;
32253+ unsigned char *ptr = (unsigned char *) _ptr;
32254+
32255+ if (ptr == NULL)
32256+ return -1;
32257+ for (i = 0; i < length; i++) {
32258+ crc = crctable[(crc ^ *ptr++) & 0xFF] ^ (crc >> 8);
32259+ }
32260+ return crc;
32261+}
32262+
32263+
32264+static inline void display_gl_call(FILE *f,
32265+ int func_number, arg_t *args, int *args_size)
32266+{
32267+ int i;
32268+
32269+ if (func_number < 0) {
32270+ fprintf(f, "unknown call : %d\n", func_number);
32271+ return;
32272+ }
32273+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
32274+ int nb_args = signature->nb_args;
32275+ int *args_type = signature->args_type;
32276+
32277+ fprintf(f, "%s(", tab_opengl_calls_name[func_number]);
32278+
32279+ for (i = 0; i < nb_args; i++) {
32280+ switch (args_type[i]) {
32281+ case TYPE_UNSIGNED_CHAR:
32282+ case TYPE_CHAR:
32283+ {
32284+ fprintf(f, "%d", (char) args[i]);
32285+ break;
32286+ }
32287+
32288+ case TYPE_UNSIGNED_SHORT:
32289+ case TYPE_SHORT:
32290+ {
32291+ fprintf(f, "%d", (short) args[i]);
32292+ break;
32293+ }
32294+
32295+ case TYPE_UNSIGNED_INT:
32296+ case TYPE_INT:
32297+ {
32298+ fprintf(f, "%d", (int) args[i]);
32299+ break;
32300+ }
32301+
32302+ case TYPE_FLOAT:
32303+ fprintf(f, "%f", *(float *) &args[i]);
32304+ break;
32305+
32306+ case TYPE_DOUBLE:
32307+ CASE_IN_KNOWN_SIZE_POINTERS:
32308+ case TYPE_NULL_TERMINATED_STRING:
32309+ CASE_IN_UNKNOWN_SIZE_POINTERS:
32310+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
32311+ if (args_type[i] == TYPE_NULL_TERMINATED_STRING) {
32312+ fprintf(f, "\"%s\"", (char *) args[i]);
32313+ } else if (args_type[i] == TYPE_DOUBLE)
32314+ fprintf(f, "%f", *(double *) args[i]);
32315+ else if (IS_ARRAY_CHAR(args_type[i]) &&
32316+ args_size[i] <= 4 * sizeof(char)) {
32317+ int j;
32318+ int n = args_size[i] / sizeof(char);
32319+
32320+ fprintf(f, "(");
32321+ for (j = 0; j < n; j++) {
32322+ fprintf(f, "%d", ((unsigned char *) args[i])[j]);
32323+ if (j != n - 1)
32324+ fprintf(f, ", ");
32325+ }
32326+ fprintf(f, ")");
32327+ } else if (IS_ARRAY_SHORT(args_type[i]) &&
32328+ args_size[i] <= 4 * sizeof(short)) {
32329+ int j;
32330+ int n = args_size[i] / sizeof(short);
32331+
32332+ fprintf(f, "(");
32333+ for (j = 0; j < n; j++) {
32334+ fprintf(f, "%d", ((short *) args[i])[j]);
32335+ if (j != n - 1)
32336+ fprintf(f, ", ");
32337+ }
32338+ fprintf(f, ")");
32339+ } else if (IS_ARRAY_INT(args_type[i]) &&
32340+ args_size[i] <= 4 * sizeof(int)) {
32341+ int j;
32342+ int n = args_size[i] / sizeof(int);
32343+
32344+ fprintf(f, "(");
32345+ for (j = 0; j < n; j++) {
32346+ fprintf(f, "%d", ((int *) args[i])[j]);
32347+ if (j != n - 1)
32348+ fprintf(f, ", ");
32349+ }
32350+ fprintf(f, ")");
32351+ } else if (IS_ARRAY_FLOAT(args_type[i]) &&
32352+ args_size[i] <= 4 * sizeof(float)) {
32353+ int j;
32354+ int n = args_size[i] / sizeof(float);
32355+
32356+ fprintf(f, "(");
32357+ for (j = 0; j < n; j++) {
32358+ fprintf(f, "%f", ((float *) args[i])[j]);
32359+ if (j != n - 1)
32360+ fprintf(f, ", ");
32361+ }
32362+ fprintf(f, ")");
32363+ } else if (IS_ARRAY_DOUBLE(args_type[i]) &&
32364+ args_size[i] <= 4 * sizeof(double)) {
32365+ int j;
32366+ int n = args_size[i] / sizeof(double);
32367+
32368+ fprintf(f, "(");
32369+ for (j = 0; j < n; j++) {
32370+ fprintf(f, "%f", ((double *) args[i])[j]);
32371+ if (j != n - 1)
32372+ fprintf(f, ", ");
32373+ }
32374+ fprintf(f, ")");
32375+ } else {
32376+ fprintf(f, "%d bytes", args_size[i]);
32377+ fprintf(f, "(crc = 0x%x)",
32378+ calc_checksum((void *) args[i], args_size[i],
32379+ 0xFFFFFFFF));
32380+ }
32381+ break;
32382+
32383+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
32384+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
32385+ CASE_OUT_KNOWN_SIZE_POINTERS:
32386+ {
32387+ fprintf(f, "%d bytes (OUT)", args_size[i]);
32388+ break;
32389+ }
32390+
32391+ case TYPE_IN_IGNORED_POINTER:
32392+ break;
32393+
32394+ default:
32395+ fprintf(f, "shouldn't happen : call %s arg %d\n",
32396+ tab_opengl_calls_name[func_number], i);
32397+ return;
32398+ break;
32399+ }
32400+ if (i < nb_args - 1)
32401+ fprintf(f, ", ");
32402+ }
32403+ fprintf(f, ")\n");
32404+}
32405+
32406+#endif
32407Index: qemu-0.13.0/target-i386/parse_gl_h.c
32408===================================================================
32409--- /dev/null 1970-01-01 00:00:00.000000000 +0000
32410+++ qemu-0.13.0/target-i386/parse_gl_h.c 2011-01-17 16:42:36.000000000 +0800
32411@@ -0,0 +1,1496 @@
32412+/*
32413+ * Parse gl.h et glx.h to auto-generate source code
32414+ *
32415+ * Copyright (c) 2006,2007 Even Rouault
32416+ *
32417+ * Permission is hereby granted, free of charge, to any person obtaining a copy
32418+ * of this software and associated documentation files (the "Software"), to deal
32419+ * in the Software without restriction, including without limitation the rights
32420+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
32421+ * copies of the Software, and to permit persons to whom the Software is
32422+ * furnished to do so, subject to the following conditions:
32423+ *
32424+ * The above copyright notice and this permission notice shall be included in
32425+ * all copies or substantial portions of the Software.
32426+ *
32427+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32428+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32429+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
32430+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
32431+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32432+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
32433+ * THE SOFTWARE.
32434+ */
32435+
32436+/* gcc -g parse_gl_h.c -o parse_gl_h && ./parse_gl_h */
32437+#include <stdio.h>
32438+#include <stdlib.h>
32439+#include <string.h>
32440+#include <assert.h>
32441+
32442+int isExtByName(const char* name)
32443+{
32444+ return (strstr(name, "ARB") != NULL) ||
32445+ (strstr(name, "IBM") != NULL) ||
32446+ (strstr(name, "EXT") != NULL) ||
32447+ (strstr(name, "ATI") != NULL) ||
32448+ (strstr(name, "NV") != NULL) ||
32449+ (strstr(name, "MESA") != NULL) ||
32450+ (strstr(name, "APPLE") != NULL) ||
32451+ (strstr(name, "SUN") != NULL) ||
32452+ (strstr(name, "SGI") != NULL);
32453+}
32454+
32455+char* get_arg_type(char* s)
32456+{
32457+ while(*s == ' ' || *s == '\t') s++;
32458+ char* n = s;
32459+ char* c = strstr(n, "const");
32460+ if (c)
32461+ n += 6;
32462+
32463+ char* t = strstr(n, " ");
32464+ if (t)
32465+ {
32466+ if (t[1] == '*')
32467+ t += 2;
32468+ t[0] = 0;
32469+ char* ori = t;
32470+ t = strstr(t+1, "[");
32471+ if (t)
32472+ {
32473+ memmove(ori, t, strlen(t));
32474+ strstr(ori, "]")[1] = 0;
32475+ }
32476+ }
32477+ return strdup(s);
32478+}
32479+
32480+typedef struct
32481+{
32482+ char* type;
32483+ char* name;
32484+ int nargs;
32485+ char** args;
32486+ int ok;
32487+ int just_for_server_side;
32488+ int has_out_parameters;
32489+ int isExt;
32490+} FuncDesc;
32491+
32492+int isExt(FuncDesc* func)
32493+{
32494+ return func->isExt;
32495+}
32496+
32497+char* get_type_string(char* type)
32498+{
32499+ if (strstr(type, "[16]"))
32500+ {
32501+ if (strstr(type, "float"))
32502+ return ("TYPE_16FLOAT");
32503+ else if (strstr(type, "double"))
32504+ return ("TYPE_16DOUBLE");
32505+ else
32506+ {
32507+ printf("inconnu %s\n", type);
32508+ exit(-1);
32509+ }
32510+ }
32511+ else if (strstr(type, "[128]") && strstr(type, "GLubyte"))
32512+ return strstr(type, "const") ? "TYPE_128UCHAR" : "TYPE_OUT_128UCHAR";
32513+ else if (strstr(type, "const GLvoid *"))
32514+ return "TYPE_ARRAY_VOID";
32515+ else if (strstr(type, "const GLchar *") ||
32516+ strstr(type, "const GLcharARB *"))
32517+ return "TYPE_NULL_TERMINATED_STRING";
32518+ else if (strstr(type, "const GLbyte *"))
32519+ return "TYPE_ARRAY_SIGNED_CHAR";
32520+ else if (strstr(type, "const GLubyte *"))
32521+ return "TYPE_ARRAY_UNSIGNED_CHAR";
32522+ else if (strstr(type, "const GLshort *"))
32523+ return "TYPE_ARRAY_SHORT";
32524+ else if (strstr(type, "const GLushort *") ||
32525+ strstr(type, "const GLhalfNV *"))
32526+ return "TYPE_ARRAY_UNSIGNED_SHORT";
32527+ else if (strstr(type, "const GLint *"))
32528+ return "TYPE_ARRAY_INT";
32529+ else if (strstr(type, "const GLuint *") ||
32530+ strstr(type, "const GLenum *"))
32531+ return "TYPE_ARRAY_UNSIGNED_INT";
32532+ else if (strstr(type, "const GLfloat *") ||
32533+ strstr(type, "const GLclampf *"))
32534+ return "TYPE_ARRAY_FLOAT";
32535+ else if (strstr(type, "const GLdouble *"))
32536+ return "TYPE_ARRAY_DOUBLE";
32537+ else if (strstr(type, "GLvoid *"))
32538+ return "TYPE_OUT_ARRAY_VOID";
32539+ else if (strstr(type, "GLboolean *") ||
32540+ strstr(type, "GLubyte *"))
32541+ return "TYPE_OUT_ARRAY_UNSIGNED_CHAR";
32542+ else if (strstr(type, "GLcharARB *") ||
32543+ strstr(type, "GLchar *"))
32544+ return "TYPE_OUT_ARRAY_CHAR";
32545+ else if (strstr(type, "GLshort *"))
32546+ return "TYPE_OUT_ARRAY_SHORT";
32547+ else if (strstr(type, "GLushort *"))
32548+ return "TYPE_OUT_ARRAY_UNSIGNED_SHORT";
32549+ else if (strstr(type, "GLint *")||
32550+ strstr(type, "GLsizei *"))
32551+ return "TYPE_OUT_ARRAY_INT";
32552+ else if (strstr(type, "GLuint *") ||
32553+ strstr(type, "GLenum *") ||
32554+ strstr(type, "GLhandleARB *"))
32555+ return "TYPE_OUT_ARRAY_UNSIGNED_INT";
32556+ else if (strstr(type, "GLfloat *"))
32557+ return "TYPE_OUT_ARRAY_FLOAT";
32558+ else if (strstr(type, "GLdouble *"))
32559+ return "TYPE_OUT_ARRAY_DOUBLE";
32560+ else if (strcmp(type, "void") == 0)
32561+ return("TYPE_NONE");
32562+ else if (strcmp(type, "GLbyte") == 0)
32563+ return("TYPE_CHAR");
32564+ else if (strcmp(type, "GLubyte") == 0 ||
32565+ strcmp(type, "GLboolean") == 0)
32566+ return("TYPE_UNSIGNED_CHAR");
32567+ else if (strcmp(type, "GLshort") == 0)
32568+ return("TYPE_SHORT");
32569+ else if (strcmp(type, "GLushort") == 0 ||
32570+ strcmp(type, "GLhalfNV") == 0)
32571+ return("TYPE_UNSIGNED_SHORT");
32572+ else if (strcmp(type, "GLint") == 0 ||
32573+ strcmp(type, "GLsizei") == 0 ||
32574+ strcmp(type, "GLintptr") == 0 ||
32575+ strcmp(type, "GLsizeiptr") == 0 ||
32576+ strcmp(type, "GLintptrARB") == 0 ||
32577+ strcmp(type, "GLsizeiptrARB") == 0)
32578+ return("TYPE_INT");
32579+ else if (strcmp(type, "GLenum") == 0 ||
32580+ strcmp(type, "GLuint") == 0 ||
32581+ strcmp(type, "GLhandleARB") == 0 ||
32582+ strcmp(type, "GLbitfield") == 0)
32583+ return("TYPE_UNSIGNED_INT");
32584+ else if (strcmp(type, "GLfloat") == 0 ||
32585+ strcmp(type, "GLclampf") == 0)
32586+ return("TYPE_FLOAT");
32587+ else if (strcmp(type, "GLdouble") == 0 ||
32588+ strcmp(type, "GLclampd") == 0)
32589+ return("TYPE_DOUBLE");
32590+ else
32591+ {
32592+ printf("inconnu %s\n", type);
32593+ exit(-1);
32594+ }
32595+}
32596+
32597+typedef struct
32598+{
32599+ char* letter;
32600+ char* signature_type_name;
32601+ char* gl_c_type_name;
32602+ char* c_type_name;
32603+} ForIsKnownArgVector;
32604+
32605+#define N_ELEMENTS(x) (sizeof(x)/sizeof(x[0]))
32606+#define N_FIELDS_IN_ARG_VECTOR 4
32607+
32608+
32609+typedef struct
32610+{
32611+ char* func_name;
32612+ char* signature_type_name;
32613+} KnownLastArgFunc;
32614+
32615+static KnownLastArgFunc knownLastArgFuncs[] =
32616+{
32617+{"glFogCoordfv", "TYPE_1FLOAT"},
32618+{"glFogCoorddv", "TYPE_1DOUBLE"},
32619+{"glFogCoordfvEXT", "TYPE_1FLOAT"},
32620+{"glFogCoorddvEXT", "TYPE_1DOUBLE"},
32621+{"glFogCoordhvNV", "TYPE_1USHORT"},
32622+
32623+{"glGetFenceivNV", "TYPE_OUT_1INT"},
32624+
32625+{"glGetTexLevelParameteriv", "TYPE_OUT_1INT" },
32626+{"glGetTexLevelParameterfv", "TYPE_OUT_1FLOAT" },
32627+
32628+{"glGetRenderbufferParameterivEXT", "TYPE_OUT_1INT"},
32629+{"glGetFramebufferAttachmentParameterivEXT", "TYPE_OUT_1INT"},
32630+{"glGetFinalCombinerInputParameterivNV", "TYPE_OUT_1INT"},
32631+{"glGetCombinerOutputParameterivNV", "TYPE_OUT_1INT"},
32632+{"glGetCombinerInputParameterivNV", "TYPE_OUT_1INT"},
32633+{"glGetOcclusionQueryivNV", "TYPE_OUT_1INT"},
32634+{"glGetOcclusionQueryuivNV", "TYPE_OUT_1UINT"},
32635+{"glGetObjectParameterivARB", "TYPE_OUT_1INT"},
32636+{"glGetQueryivARB", "TYPE_OUT_1INT"},
32637+{"glGetQueryiv", "TYPE_OUT_1INT"},
32638+{"glGetQueryObjectivARB", "TYPE_OUT_1INT"},
32639+{"glGetQueryObjectiv", "TYPE_OUT_1INT"},
32640+{"glGetQueryObjectuivARB", "TYPE_OUT_1UINT"},
32641+{"glGetQueryObjectuiv", "TYPE_OUT_1UINT"},
32642+{"glGetProgramivARB", "TYPE_OUT_1INT"},
32643+{"glGetProgramiv", "TYPE_OUT_1INT"},
32644+{"glGetProgramivNV", "TYPE_OUT_1INT"},
32645+{"glGetShaderiv", "TYPE_OUT_1INT"},
32646+
32647+{"glCombinerParameterfvNV", "TYPE_1FLOAT"},
32648+{"glCombinerParameterivNV", "TYPE_1INT"},
32649+
32650+{"glGetFinalCombinerInputParameterfvNV", "TYPE_OUT_1FLOAT"},
32651+{"glGetCombinerOutputParameterfvNV", "TYPE_OUT_1FLOAT"},
32652+{"glGetCombinerInputParameterfvNV", "TYPE_OUT_1FLOAT"},
32653+{"glGetObjectParameterfvARB", "TYPE_OUT_1FLOAT"},
32654+
32655+{"glCombinerStageParameterfvNV", "TYPE_4FLOAT"},
32656+{"glGetCombinerStageParameterfvNV", "TYPE_OUT_4FLOAT"},
32657+
32658+{"glTexBumpParameterivATI", "TYPE_1INT"},
32659+{"glTexBumpParameterfvATI", "TYPE_1FLOAT"},
32660+{"glGetTexBumpParameterivATI", "TYPE_OUT_1INT"},
32661+{"glGetTexBumpParameterfvATI", "TYPE_OUT_1FLOAT"},
32662+
32663+{"glGetProgramLocalParameterfvARB", "TYPE_OUT_4FLOAT"},
32664+{"glGetProgramLocalParameterdvARB", "TYPE_OUT_4DOUBLE"},
32665+{"glGetProgramEnvParameterfvARB", "TYPE_OUT_4FLOAT"},
32666+{"glGetProgramEnvParameterdvARB", "TYPE_OUT_4DOUBLE"},
32667+{"glGetProgramLocalParameterIivNV", "TYPE_OUT_1INT"},
32668+{"glGetProgramLocalParameterIuivNV", "TYPE_OUT_1UINT"},
32669+{"glGetProgramEnvParameterIivNV", "TYPE_OUT_1INT"},
32670+{"glGetProgramEnvParameterIuivNV", "TYPE_OUT_1UINT"},
32671+
32672+{"glGetProgramParameterfvNV", "TYPE_OUT_4FLOAT"},
32673+{"glGetProgramParameterdvNV", "TYPE_OUT_4DOUBLE"},
32674+{"glGetProgramNamedParameterfvNV", "TYPE_OUT_4FLOAT"},
32675+{"glGetProgramNamedParameterdvNV", "TYPE_OUT_4DOUBLE"},
32676+
32677+{"glCullParameterfvEXT", "TYPE_4FLOAT"},
32678+{"glCullParameterdvEXT", "TYPE_4DOUBLE"},
32679+
32680+{"glGetTrackMatrixivNV", "TYPE_OUT_1INT"},
32681+{"glExecuteProgramNV", "TYPE_4FLOAT"},
32682+
32683+{"glEdgeFlagv", "TYPE_1UCHAR"},
32684+
32685+{"glClipPlane", "TYPE_4DOUBLE"},
32686+{"glGetClipPlane", "TYPE_OUT_4DOUBLE"},
32687+
32688+{"glSetFragmentShaderConstantATI", "TYPE_4FLOAT"},
32689+
32690+{"glGetObjectBufferfvATI", "TYPE_OUT_1FLOAT"},
32691+{"glGetObjectBufferivATI", "TYPE_OUT_1INT"},
32692+{"glGetArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
32693+{"glGetArrayObjectivATI", "TYPE_OUT_1INT"},
32694+{"glGetVariantArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
32695+{"glGetVariantArrayObjectivATI", "TYPE_OUT_1INT"},
32696+{"glGetVertexAttribArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
32697+{"glGetVertexAttribArrayObjectivATI", "TYPE_OUT_1INT"},
32698+
32699+{"glPixelTransformParameterivEXT", "TYPE_1INT"},
32700+{"glPixelTransformParameterfvEXT", "TYPE_1FLOAT"},
32701+{"glGetPixelTransformParameterivEXT", "TYPE_OUT_1INT"},
32702+{"glGetPixelTransformParameterfvEXT", "TYPE_OUT_1FLOAT"},
32703+
32704+{"glColorTableParameterfv", "TYPE_4FLOAT"},
32705+{"glColorTableParameteriv", "TYPE_4INT"},
32706+{"glGetColorTableParameterfv", "TYPE_OUT_4FLOAT"},
32707+{"glGetColorTableParameteriv", "TYPE_OUT_4INT"},
32708+{"glColorTableParameterfvEXT", "TYPE_4FLOAT"},
32709+{"glColorTableParameterivEXT", "TYPE_4INT"},
32710+{"glGetColorTableParameterfvEXT", "TYPE_OUT_4FLOAT"},
32711+{"glGetColorTableParameterivEXT", "TYPE_OUT_4INT"},
32712+
32713+{"glGetMinmaxParameterfv", "TYPE_OUT_1FLOAT"},
32714+{"glGetMinmaxParameteriv", "TYPE_OUT_1INT"},
32715+{"glGetHistogramParameterfv", "TYPE_OUT_1FLOAT"},
32716+{"glGetHistogramParameteriv", "TYPE_OUT_1INT"},
32717+{"glGetMinmaxParameterfvEXT", "TYPE_OUT_1FLOAT"},
32718+{"glGetMinmaxParameterivEXT", "TYPE_OUT_1INT"},
32719+{"glGetHistogramParameterfvEXT", "TYPE_OUT_1FLOAT"},
32720+{"glGetHistogramParameterivEXT", "TYPE_OUT_1INT"},
32721+
32722+/* Not sure at all for the 2 followingo ones ! */
32723+{"glGetBooleanIndexedvEXT", "TYPE_OUT_4UCHAR"},
32724+{"glGetIntegerIndexedvEXT", "TYPE_OUT_4INT"},
32725+
32726+{"glReferencePlaneSGIX", "TYPE_4DOUBLE"},
32727+
32728+{"glGetTransformFeedbackVaryingNV", "TYPE_OUT_1INT"},
32729+
32730+};
32731+
32732+int is_known_arg_vector(FuncDesc* desc, char** p_signature_type_name, char** p_c_type_name)
32733+{
32734+ static ForIsKnownArgVector my_tab[] =
32735+ {
32736+ { "b", "CHAR", "GLbyte", "signed char" },
32737+ { "Boolean", "CHAR", "GLboolean", "unsigned char" },
32738+ { "s", "SHORT", "GLshort", "short" },
32739+ { "i", "INT", "GLint", "int" },
32740+ { "Integer", "INT", "GLint", "int" },
32741+ { "ub", "CHAR", "GLubyte", "unsigned char" },
32742+ { "h", "SHORT", "GLhalf", "unsigned short" },
32743+ { "us", "SHORT", "GLushort", "unsigned short" },
32744+ { "ui", "INT", "GLuint", "unsigned int" },
32745+ { "Nb", "CHAR", "GLbyte", "signed char" },
32746+ { "Ns", "SHORT", "GLshort", "short" },
32747+ { "Ni", "INT", "GLint", "int" },
32748+ { "Nub", "CHAR", "GLubyte", "unsigned char" },
32749+ { "Nus", "SHORT", "GLushort", "unsigned short" },
32750+ { "Nui", "INT", "GLuint", "unsigned int" },
32751+
32752+ { "f", "FLOAT", "GLfloat", "float" },
32753+ { "Float", "FLOAT", "GLfloat", "float" },
32754+ { "d", "DOUBLE", "GLdouble", "double" },
32755+ };
32756+
32757+ if (desc->nargs == 0)
32758+ return 0;
32759+
32760+ int i , j;
32761+
32762+ if (strstr(desc->name, "glVertexAttribs") ||
32763+ strstr(desc->name, "glProgramParameters") ||
32764+ strstr(desc->name, "glProgramEnvParameters") ||
32765+ strstr(desc->name, "glProgramLocalParameters") ||
32766+ (strstr(desc->name, "glUniform") && (strstr(desc->name, "iv") || strstr(desc->name, "fv"))))
32767+ return 0;
32768+
32769+ static char signatures[N_ELEMENTS(my_tab)][N_FIELDS_IN_ARG_VECTOR][20] = {0};
32770+ char signature[10];
32771+
32772+ for(i=0;i<N_ELEMENTS(knownLastArgFuncs);i++)
32773+ {
32774+ if (strcmp(desc->name, knownLastArgFuncs[i].func_name) == 0)
32775+ {
32776+ if (p_signature_type_name)
32777+ {
32778+ *p_signature_type_name = knownLastArgFuncs[i].signature_type_name;
32779+ }
32780+ if (p_c_type_name)
32781+ {
32782+ if (strstr(knownLastArgFuncs[i].signature_type_name, "FLOAT"))
32783+ *p_c_type_name = "float";
32784+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "DOUBLE"))
32785+ *p_c_type_name = "double";
32786+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "UINT"))
32787+ *p_c_type_name = "unsigned int";
32788+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "INT"))
32789+ *p_c_type_name = "int";
32790+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "USHORT"))
32791+ *p_c_type_name = "unsigned short";
32792+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "SHORT"))
32793+ *p_c_type_name = "short";
32794+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "UCHAR"))
32795+ *p_c_type_name = "unsigned char";
32796+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "CHAR"))
32797+ *p_c_type_name = "char";
32798+ else
32799+ assert(0);
32800+ }
32801+ return 1;
32802+ }
32803+ }
32804+
32805+ for(i=0;i<N_ELEMENTS(my_tab);i++)
32806+ {
32807+ for(j=1;j<=N_FIELDS_IN_ARG_VECTOR;j++)
32808+ {
32809+ if (strstr(desc->name, "glIndex") && strstr(desc->name, "v"))
32810+ sprintf(signature, "%sv", my_tab[i].letter);
32811+ else
32812+ sprintf(signature, "%d%sv", j, my_tab[i].letter);
32813+ if (strstr(desc->name, signature) &&
32814+ strstr(desc->args[desc->nargs - 1], my_tab[i].gl_c_type_name) &&
32815+ strstr(desc->args[desc->nargs - 1], "*"))
32816+ {
32817+ if (p_signature_type_name)
32818+ {
32819+ if (signatures[i][j-1][0] == 0)
32820+ sprintf(signatures[i][j-1], "TYPE_%d%s", j, my_tab[i].signature_type_name);
32821+ *p_signature_type_name = signatures[i][j-1];
32822+ }
32823+ if (p_c_type_name) *p_c_type_name = my_tab[i].c_type_name;
32824+ return 1;
32825+ }
32826+ }
32827+ }
32828+ return 0;
32829+}
32830+
32831+static void print_server_side_argument(FILE* server_stub, int j, char* glType)
32832+{
32833+ const char* symbolic_type = get_type_string(glType);
32834+ if (strcmp(symbolic_type, "TYPE_CHAR") == 0)
32835+ fprintf(server_stub, "ARG_TO_CHAR(args[%d])", j);
32836+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_CHAR") == 0)
32837+ fprintf(server_stub, "ARG_TO_UNSIGNED_CHAR(args[%d])", j);
32838+ else if (strcmp(symbolic_type, "TYPE_SHORT") == 0)
32839+ fprintf(server_stub, "ARG_TO_SHORT(args[%d])", j);
32840+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_SHORT") == 0)
32841+ fprintf(server_stub, "ARG_TO_UNSIGNED_SHORT(args[%d])", j);
32842+ else if (strcmp(symbolic_type, "TYPE_INT") == 0)
32843+ fprintf(server_stub, "ARG_TO_INT(args[%d])", j);
32844+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_INT") == 0)
32845+ fprintf(server_stub, "ARG_TO_UNSIGNED_INT(args[%d])", j);
32846+ else if (strcmp(symbolic_type, "TYPE_FLOAT") == 0)
32847+ fprintf(server_stub, "ARG_TO_FLOAT(args[%d])", j);
32848+ else if (strcmp(symbolic_type, "TYPE_16FLOAT") == 0)
32849+ fprintf(server_stub, "(const float*)(args[%d])", j);
32850+ else if (strcmp(symbolic_type, "TYPE_DOUBLE") == 0)
32851+ fprintf(server_stub, "ARG_TO_DOUBLE(args[%d])", j);
32852+ else if ( strcmp(symbolic_type, "TYPE_16DOUBLE") == 0)
32853+ fprintf(server_stub, "(const double*)(args[%d])", j);
32854+ else if ( strcmp(symbolic_type, "TYPE_OUT_128UCHAR") == 0)
32855+ fprintf(server_stub, "(unsigned char*)(args[%d])", j);
32856+ else if ( strcmp(symbolic_type, "TYPE_128UCHAR") == 0)
32857+ fprintf(server_stub, "(const unsigned char*)(args[%d])", j);
32858+ else if ( strcmp(symbolic_type, "TYPE_NULL_TERMINATED_STRING") == 0)
32859+ fprintf(server_stub, "(const char*)(args[%d])", j);
32860+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_SHORT") == 0)
32861+ fprintf(server_stub, "(const short*)(args[%d])", j);
32862+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_SHORT") == 0)
32863+ fprintf(server_stub, "(const unsigned short*)(args[%d])", j);
32864+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_INT") == 0)
32865+ fprintf(server_stub, "(const int*)(args[%d])", j);
32866+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_INT") == 0)
32867+ fprintf(server_stub, "(const unsigned int*)(args[%d])", j);
32868+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_FLOAT") == 0)
32869+ fprintf(server_stub, "(const float*)(args[%d])", j);
32870+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_DOUBLE") == 0)
32871+ fprintf(server_stub, "(const double*)(args[%d])", j);
32872+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_CHAR") == 0)
32873+ fprintf(server_stub, "(const char*)(args[%d])", j);
32874+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_SIGNED_CHAR") == 0)
32875+ fprintf(server_stub, "(const signed char*)(args[%d])", j);
32876+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_VOID") == 0)
32877+ fprintf(server_stub, "(const void*)(args[%d])", j);
32878+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_CHAR") == 0)
32879+ fprintf(server_stub, "(const unsigned char*)(args[%d])", j);
32880+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_SHORT") == 0)
32881+ fprintf(server_stub, "(short*)(args[%d])", j);
32882+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_SHORT") == 0)
32883+ fprintf(server_stub, "(unsigned short*)(args[%d])", j);
32884+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_INT") == 0)
32885+ fprintf(server_stub, "(int*)(args[%d])", j);
32886+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_INT") == 0)
32887+ fprintf(server_stub, "(unsigned int*)(args[%d])", j);
32888+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_FLOAT") == 0)
32889+ fprintf(server_stub, "(float*)(args[%d])", j);
32890+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_DOUBLE") == 0)
32891+ fprintf(server_stub, "(double*)(args[%d])", j);
32892+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_VOID") == 0)
32893+ fprintf(server_stub, "(void*)(args[%d])", j);
32894+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_CHAR") == 0)
32895+ fprintf(server_stub, "(char*)(args[%d])", j);
32896+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_CHAR") == 0)
32897+ fprintf(server_stub, "(unsigned char*)(args[%d])", j);
32898+
32899+ else
32900+ {
32901+ fprintf(stderr, "Unknown : %s\n", symbolic_type);
32902+ assert(0);
32903+ }
32904+}
32905+
32906+static const char* func_dealt_by_hand[500] = { NULL };
32907+
32908+
32909+static const char* ignore_func[] =
32910+{
32911+ "glGetPointerv",
32912+ "glRectdv",
32913+ "glRectfv",
32914+ "glRectiv",
32915+ "glRectsv",
32916+ "glMultiDrawArrays",
32917+ "glMultiDrawArraysEXT",
32918+ "glMultiDrawElements",
32919+ "glMultiDrawElementsEXT",
32920+ "glUnmapBuffer",
32921+ "glUnmapBufferARB",
32922+ "glLoadTransposeMatrixf",
32923+ "glLoadTransposeMatrixd",
32924+ "glMultTransposeMatrixf",
32925+ "glMultTransposeMatrixd",
32926+ "glLoadTransposeMatrixfARB",
32927+ "glLoadTransposeMatrixdARB",
32928+ "glMultTransposeMatrixfARB",
32929+ "glMultTransposeMatrixdARB",
32930+
32931+ "glPixelDataRangeNV",
32932+ "glFlushPixelDataRangeNV",
32933+ "glVertexArrayRangeNV",
32934+ "glFlushVertexArrayRangeNV",
32935+ "glVertexWeightfEXT",
32936+
32937+ "glGetBufferPointerv",
32938+ "glGetBufferPointervARB",
32939+ "glGetVertexAttribPointerv",
32940+ "glGetVertexAttribPointervARB",
32941+ "glVertexAttribPointer",
32942+ "glVertexAttribPointerARB",
32943+ "glGetVariantPointervEXT",
32944+ NULL,
32945+};
32946+
32947+void get_func_dealt_by_hand()
32948+{
32949+ FILE* f = fopen("../target-i386/gl_func_perso.h", "r");
32950+ char buffer[256];
32951+ int i = 0;
32952+ char* c;
32953+ while(fgets(buffer, 256, f))
32954+ {
32955+ if (strstr(buffer, "MAGIC_MACRO("))
32956+ {
32957+ func_dealt_by_hand[i] = strdup(strstr(buffer, "MAGIC_MACRO(") + strlen("MAGIC_MACRO("));
32958+ * strstr(func_dealt_by_hand[i], ")") = 0;
32959+ c = strstr(func_dealt_by_hand[i], "_");
32960+ if (c && c != func_dealt_by_hand[i]) *c = 0;
32961+ i ++;
32962+ }
32963+ }
32964+ fclose(f);
32965+
32966+ int j = 0;
32967+ while(ignore_func[j])
32968+ {
32969+ func_dealt_by_hand[i] = ignore_func[j];
32970+ i++;
32971+ j++;
32972+ }
32973+}
32974+
32975+static const char* just_for_server_side_list[] =
32976+{
32977+ "glEnableClientState",
32978+ "glDisableClientState",
32979+ "glPushClientAttrib",
32980+ "glPopClientAttrib",
32981+ "glPixelStorei",
32982+ "glPixelStoref",
32983+ "glClientActiveTexture",
32984+ "glClientActiveTextureARB",
32985+ "glEnableVertexAttribArray",
32986+ "glEnableVertexAttribArrayARB",
32987+ "glDisableVertexAttribArray",
32988+ "glDisableVertexAttribArrayARB",
32989+ "glDrawElementArrayATI",
32990+ "glDrawRangeElementArrayATI",
32991+ "glGenSymbolsEXT",
32992+ "glFreeObjectBufferATI",
32993+ "glUnmapObjectBufferATI",
32994+ "glLockArraysEXT",
32995+ "glUnlockArraysEXT",
32996+ "glDepthFunc",
32997+ "glFogf",
32998+ "glFogi",
32999+ "glClipPlane",
33000+ "glGetClipPlane",
33001+
33002+/* begin of openquartz optimization */
33003+#if 1
33004+ "glMatrixMode",
33005+ "glOrtho",
33006+ "glFrustum",
33007+ "glPushMatrix",
33008+ "glPopMatrix",
33009+ "glLoadIdentity",
33010+ "glLoadMatrixd",
33011+ "glLoadMatrixf",
33012+ "glMultMatrixd",
33013+ "glMultMatrixf",
33014+ "glRotated",
33015+ "glRotatef",
33016+ "glScaled",
33017+ "glScalef",
33018+ "glTranslated",
33019+ "glTranslatef",
33020+#endif
33021+/* end of openquartz optimization */
33022+
33023+ "glGetError",
33024+ "glActiveTextureARB",
33025+
33026+ "glViewport",
33027+ "glScissor",
33028+
33029+ "glBindBufferARB",
33030+ "glDeleteBuffersARB",
33031+ "glGenBuffersARB",
33032+ "glBufferDataARB",
33033+ "glBufferSubDataARB",
33034+ "glGetBufferSubDataARB",
33035+ "glGetBufferParameterivARB",
33036+ "glBindBuffer",
33037+ "glDeleteBuffers",
33038+ "glGenBuffers",
33039+ "glBufferData",
33040+ "glBufferSubData",
33041+ "glGetBufferSubData",
33042+ "glGetBufferParameteriv",
33043+
33044+ "glPushAttrib",
33045+ "glPopAttrib",
33046+ "glEnable",
33047+ "glDisable",
33048+ "glIsEnabled",
33049+ "glBindTexture",
33050+ "glBindTextureEXT",
33051+ "glFogfv",
33052+ "glFogiv",
33053+ "glBitmap",
33054+ "glGetTexImage",
33055+ "glReadPixels",
33056+ "glDrawPixels",
33057+ "glSelectBuffer",
33058+ "glFeedbackBuffer",
33059+
33060+ "glTexImage1D",
33061+ "glTexImage2D",
33062+ "glTexImage3D",
33063+ "glTexSubImage1D",
33064+ "glTexSubImage2D",
33065+ "glTexSubImage3D",
33066+
33067+ "glTexImage3DEXT",
33068+ "glTexSubImage1DEXT",
33069+ "glTexSubImage2DEXT",
33070+ "glTexSubImage3DEXT",
33071+
33072+ "glGetCompressedTexImage",
33073+ "glCompressedTexImage1D",
33074+ "glCompressedTexImage2D",
33075+ "glCompressedTexImage3D",
33076+ "glCompressedTexSubImage1D",
33077+ "glCompressedTexSubImage2D",
33078+ "glCompressedTexSubImage3D",
33079+
33080+ "glGetCompressedTexImageARB",
33081+ "glCompressedTexImage1DARB",
33082+ "glCompressedTexImage2DARB",
33083+ "glCompressedTexImage3DARB",
33084+ "glCompressedTexSubImage1DARB",
33085+ "glCompressedTexSubImage2DARB",
33086+ "glCompressedTexSubImage3DARB",
33087+
33088+ "glCallLists",
33089+ "glNewList",
33090+ "glDeleteLists",
33091+ "glGenLists",
33092+
33093+ "glGenTextures",
33094+ "glDeleteTextures",
33095+ "glDeleteTexturesEXT",
33096+ "glMap1f",
33097+ "glMap1d",
33098+ "glMap2f",
33099+ "glMap2d",
33100+ "glGetMapdv",
33101+ "glGetMapfv",
33102+ "glGetMapiv",
33103+ "glGetBooleanv",
33104+ "glGetIntegerv",
33105+ "glGetFloatv",
33106+ "glGetDoublev",
33107+
33108+ "glGetPixelMapfv",
33109+ "glGetPixelMapuiv",
33110+ "glGetPixelMapusv",
33111+ "glGetProgramStringARB",
33112+ "glGetProgramStringNV",
33113+ "glArrayElement",
33114+ "glDrawArrays",
33115+ "glDrawElements",
33116+ "glDrawRangeElements",
33117+ "glDrawRangeElementsEXT",
33118+ "glGetProgramInfoLog",
33119+ "glGetTexLevelParameteriv",
33120+ "glGetInfoLogARB",
33121+ "glGetShaderInfoLog",
33122+ "glGetAttachedObjectsARB",
33123+ "glGetAttachedShaders",
33124+ "glGetActiveUniformARB",
33125+ "glGetActiveUniform",
33126+ "glGetUniformLocationARB",
33127+ "glGetUniformLocation",
33128+ "glGetUniformfvARB",
33129+ "glGetUniformfv",
33130+ "glGetUniformivARB",
33131+ "glGetUniformiv",
33132+ "glGetUniformuivEXT",
33133+ "glGetShaderSourceARB",
33134+ "glGetShaderSource",
33135+ "glGetActiveAttribARB",
33136+ "glGetActiveAttrib",
33137+ "glGetAttribLocationARB",
33138+ "glGetAttribLocation",
33139+
33140+ "glNewObjectBufferATI",
33141+ "glUpdateObjectBufferATI",
33142+
33143+ "glSetLocalConstantEXT",
33144+ "glSetInvariantEXT",
33145+ "glVariantbvEXT",
33146+ "glVariantsvEXT",
33147+ "glVariantivEXT",
33148+ "glVariantfvEXT",
33149+ "glVariantdvEXT",
33150+ "glVariantubvEXT",
33151+ "glVariantusvEXT",
33152+ "glVariantuivEXT",
33153+ "glGetVariantBooleanvEXT",
33154+ "glGetVariantIntegervEXT",
33155+ "glGetVariantFloatvEXT",
33156+ "glGetInvariantBooleanvEXT",
33157+ "glGetInvariantIntegervEXT",
33158+ "glGetInvariantFloatvEXT",
33159+ "glGetLocalConstantBooleanvEXT",
33160+ "glGetLocalConstantIntegervEXT",
33161+ "glGetLocalConstantFloatvEXT",
33162+
33163+ "glMatrixIndexubvARB",
33164+ "glMatrixIndexusvARB",
33165+ "glMatrixIndexuivARB",
33166+
33167+ "glColorTable",
33168+ "glColorSubTable",
33169+ "glGetColorTable",
33170+ "glConvolutionFilter1D",
33171+ "glConvolutionFilter2D",
33172+ "glGetConvolutionFilter",
33173+ "glSeparableFilter2D",
33174+ "glGetSeparableFilter",
33175+ "glGetHistogram",
33176+ "glGetMinmax",
33177+ "glColorTableEXT",
33178+ "glColorSubTableEXT",
33179+ "glGetColorTableEXT",
33180+ "glConvolutionFilter1DEXT",
33181+ "glConvolutionFilter2DEXT",
33182+ "glGetConvolutionFilterEXT",
33183+ "glSeparableFilter2DEXT",
33184+ "glGetSeparableFilterEXT",
33185+ "glGetHistogramEXT",
33186+ "glGetMinmaxEXT",
33187+
33188+ "glGetTexParameterfv",
33189+
33190+ "glGetVertexAttribivARB",
33191+ "glGetVertexAttribfvARB",
33192+ "glGetVertexAttribdvARB",
33193+ "glGetVertexAttribiv",
33194+ "glGetVertexAttribfv",
33195+ "glGetVertexAttribdv",
33196+
33197+ "glGetDetailTexFuncSGIS",
33198+ "glGetSharpenTexFuncSGIS",
33199+
33200+ "fake_gluBuild2DMipmaps",
33201+
33202+ "glRenderMode",
33203+
33204+ "glEnableVariantClientStateEXT",
33205+ "glDisableVariantClientStateEXT",
33206+
33207+ "glGetActiveVaryingNV",
33208+
33209+ NULL,
33210+};
33211+
33212+static int just_for_server_side_func(char* funcname)
33213+{
33214+ int i;
33215+ for(i=0;just_for_server_side_list[i];i++)
33216+ {
33217+ if (strcmp(just_for_server_side_list[i], funcname) == 0)
33218+ return 1;
33219+ }
33220+ return 0;
33221+}
33222+
33223+int parse(FILE* f, FuncDesc* funcDesc, int funcDescCount, int ignoreEXT)
33224+{
33225+ char buffer[256];
33226+ while(fgets(buffer, 256, f))
33227+ {
33228+
33229+ if (strncmp(buffer, "GLAPI", 5) == 0 && strstr(buffer, "APIENTRY") && strstr(buffer, "("))
33230+ {
33231+ int i = 0;
33232+ int skip = 0;
33233+ if (func_dealt_by_hand[0] == 0)
33234+ {
33235+ get_func_dealt_by_hand();
33236+ }
33237+ while (func_dealt_by_hand[i])
33238+ {
33239+ if (strstr(buffer, func_dealt_by_hand[i]))
33240+ {
33241+ skip = 1;
33242+ break;
33243+ }
33244+ i++;
33245+ }
33246+ if (skip)
33247+ continue;
33248+
33249+ char** args = malloc(15 * sizeof(char*));
33250+ int narg = 0;
33251+ char* type = buffer + 6;
33252+ char* n = strstr(type, "GLAPIENTRY") ? strstr(type, "GLAPIENTRY") : strstr(type, "APIENTRY");
33253+ int skip_length = strstr(type, "GLAPIENTRY") ? 11 : 9;
33254+ n[-1] = 0;
33255+ type = strdup(type);
33256+ n += skip_length;
33257+ char* fonc = n;
33258+ n = strstr(n, "(");
33259+ if (n[-1] == ' ') n[-1] = 0;
33260+ n[0] = 0;
33261+ fonc = strdup(fonc);
33262+ /*if (strstr(fonc, "glLockArraysEXT") || strstr(fonc, "glUnlockArraysEXT"))
33263+ {
33264+ }
33265+ else*/
33266+
33267+
33268+ if (ignoreEXT == 1 && isExtByName(fonc))
33269+ {
33270+ free(type);
33271+ free(fonc);
33272+ continue;
33273+ }
33274+ n++;
33275+ while(1)
33276+ {
33277+ char* virg = strstr(n, ",");
33278+ if (virg)
33279+ {
33280+ args[narg] = n;
33281+ virg[0] = 0;
33282+ args[narg] = get_arg_type(args[narg]);
33283+ narg++;
33284+ n = virg+1;
33285+ }
33286+ else
33287+ break;
33288+ }
33289+ while (strstr(n, ")") == 0)
33290+ {
33291+ fgets(buffer, 256, f);
33292+ n = buffer;
33293+ while(1)
33294+ {
33295+ char* virg = strstr(n, ",");
33296+ if (virg)
33297+ {
33298+ args[narg] = n;
33299+ virg[0] = 0;
33300+ args[narg] = get_arg_type(args[narg]);
33301+ narg++;
33302+ n = virg+1;
33303+ }
33304+ else
33305+ break;
33306+ }
33307+ }
33308+ char* par = strstr(n, ")");
33309+ args[narg] = n;
33310+ par[0] = 0;
33311+ args[narg] = get_arg_type(args[narg]);
33312+ narg++;
33313+
33314+
33315+ /*printf("%s %s (", type, fonc);
33316+ for(i=0;i<narg;i++)
33317+ {
33318+ printf("%s,", args[i]);
33319+ }
33320+ printf(")\n");*/
33321+
33322+ for(i=0;i<funcDescCount;i++)
33323+ {
33324+ if (strcmp(funcDesc[i].name, fonc) == 0)
33325+ {
33326+ if (ignoreEXT == 0)
33327+ funcDesc[i].isExt = 1;
33328+ break;
33329+ }
33330+ }
33331+ if (i == funcDescCount)
33332+ {
33333+ funcDesc[funcDescCount].type = type;
33334+ funcDesc[funcDescCount].name = fonc;
33335+ funcDesc[funcDescCount].nargs = narg;
33336+ funcDesc[funcDescCount].args = args;
33337+ funcDesc[funcDescCount].isExt = ignoreEXT == 0;
33338+ funcDescCount++;
33339+ }
33340+ else
33341+ {
33342+ free(fonc);
33343+ free(args);
33344+ free(type);
33345+ }
33346+ /*
33347+ for(i=0;i<narg;i++)
33348+ {
33349+ free(args[i]);
33350+ }
33351+ free(fonc);
33352+ free(type);*/
33353+ }
33354+ }
33355+ return funcDescCount;
33356+}
33357+
33358+typedef struct
33359+{
33360+ char* str;
33361+ int i;
33362+} StringIntStruct;
33363+
33364+StringIntStruct argDependingOnPreviousArgTab[] =
33365+{
33366+ { "glLoadProgramNV", 3},
33367+ { "ProgramNamedParameter", 2},
33368+ { "glDeleteBuffers", 1},
33369+ { "glDrawBuffers", 1},
33370+ { "glGenPrograms", 1},
33371+ { "glDeletePrograms", 1},
33372+ { "glGenQueries", 1},
33373+ { "glDeleteQueries", 1},
33374+ { "glGenFencesNV", 1},
33375+ { "glDeleteFencesNV", 1},
33376+ { "glGenOcclusionQueriesNV", 1},
33377+ { "glDeleteOcclusionQueriesNV", 1},
33378+ { "glRequestResidentProgramsNV", 1},
33379+ { "glDeleteTextures", 1},
33380+ { "glGenFramebuffersEXT", 1},
33381+ { "glDeleteFramebuffersEXT", 1},
33382+ { "glGenRenderbuffersEXT", 1},
33383+ { "glDeleteRenderbuffersEXT", 1},
33384+ { "glUniform1fv", 2},
33385+ { "glUniform2fv", 2},
33386+ { "glUniform3fv", 2},
33387+ { "glUniform4fv", 2},
33388+ { "glUniform1iv", 2},
33389+ { "glUniform2iv", 2},
33390+ { "glUniform3iv", 2},
33391+ { "glUniform4iv", 2},
33392+ { "glUniform1uivEXT", 2},
33393+ { "glUniform2uivEXT", 2},
33394+ { "glUniform3uivEXT", 2},
33395+ { "glUniform4uivEXT", 2},
33396+ { "glProgramParameters4fvNV", 3},
33397+ { "glProgramParameters4dvNV", 3},
33398+ { "glProgramLocalParameters4fvEXT", 3},
33399+ { "glProgramLocalParametersI4ivNV", 3},
33400+ { "glProgramLocalParametersI4uivNV", 3},
33401+ { "glProgramEnvParameters4fvEXT", 3},
33402+ { "glProgramEnvParametersI4ivNV", 3},
33403+ { "glProgramEnvParametersI4uivNV", 3},
33404+ { "glAreProgramsResidentNV", 1} ,
33405+ { "glAreProgramsResidentNV", 2} ,
33406+ { "glAreTexturesResident", 1} ,
33407+ { "glAreTexturesResident", 2} ,
33408+ { "glPrioritizeTextures", 1} ,
33409+ { "glPrioritizeTextures", 2} ,
33410+ { "glProgramStringARB", 3} ,
33411+
33412+ { "glVertexAttribs", 2},
33413+
33414+ { "glUniformMatrix", 3 },
33415+
33416+ { "glGetVertexAttribfv", 2},
33417+ { "glGetVertexAttribiv", 2},
33418+ { "glGetVertexAttribdv", 2},
33419+ { "glGetVertexAttribIivEXT", 2},
33420+ { "glGetVertexAttribIuivEXT", 2},
33421+
33422+ { "glPointParameterfv", 1},
33423+ { "glPointParameteriv", 1},
33424+
33425+ { "glWeightbvARB", 1},
33426+ { "glWeightsvARB", 1},
33427+ { "glWeightivARB", 1},
33428+ { "glWeightfvARB", 1},
33429+ { "glWeightdvARB", 1},
33430+ { "glWeightubvARB", 1},
33431+ { "glWeightusvARB", 1},
33432+ { "glWeightuivARB", 1},
33433+
33434+ { "glTexEnvfv", 2},
33435+ { "glTexEnviv", 2},
33436+ { "glGetTexEnvfv", 2},
33437+ { "glGetTexEnviv", 2},
33438+ { "glTexGendv", 2},
33439+ { "glTexGenfv", 2},
33440+ { "glTexGeniv", 2},
33441+ { "glGetTexGendv", 2},
33442+ { "glGetTexGenfv", 2},
33443+ { "glGetTexGeniv", 2},
33444+
33445+ { "glLightfv", 2},
33446+ { "glLightiv", 2},
33447+ { "glGetLightfv", 2},
33448+ { "glGetLightiv", 2},
33449+ { "glFragmentLightfvSGIX", 2},
33450+ { "glFragmentLightivSGIX", 2},
33451+ { "glGetFragmentLightfvSGIX", 2},
33452+ { "glGetFragmentLightivSGIX", 2},
33453+
33454+
33455+ { "glLightModelfv", 1},
33456+ { "glLightModeliv", 1},
33457+ { "glFragmentLightModelfvSGIX", 1},
33458+ { "glFragmentLightModelivSGIX", 1},
33459+
33460+ { "glMaterialfv", 2},
33461+ { "glMaterialiv", 2},
33462+ { "glGetMaterialfv", 2},
33463+ { "glGetMaterialiv", 2},
33464+ { "glFragmentMaterialfvSGIX", 2},
33465+ { "glFragmentMaterialivSGIX", 2},
33466+ { "glGetFragmentMaterialfvSGIX", 2},
33467+ { "glGetFragmentMaterialivSGIX", 2},
33468+
33469+ { "glFogiv", 1},
33470+ { "glFogfv", 1},
33471+
33472+ { "glTexParameterfv", 2},
33473+ { "glTexParameteriv", 2},
33474+ { "glGetTexParameterfv", 2},
33475+ { "glGetTexParameteriv", 2},
33476+
33477+ { "glTexParameterIivEXT", 2},
33478+ { "glTexParameterIuivEXT", 2},
33479+ { "glGetTexParameterIivEXT", 2},
33480+ { "glGetTexParameterIuivEXT", 2},
33481+
33482+ { "glPixelMapfv", 2},
33483+ { "glPixelMapuiv", 2},
33484+ { "glPixelMapusv", 2},
33485+
33486+ { "glDetailTexFuncSGIS", 2 },
33487+ { "glSharpenTexFuncSGIS", 2 },
33488+
33489+ { "glSpriteParameterfvSGIX", 1 },
33490+ { "glSpriteParameterivSGIX", 1 },
33491+
33492+ { "ConvolutionParameter", 2},
33493+
33494+ { "glProgramBufferParametersfvNV", 4},
33495+ { "glProgramBufferParametersIivNV", 4},
33496+ { "glProgramBufferParametersIuivNV", 4},
33497+
33498+ { "glTransformFeedbackAttribsNV", 1},
33499+ { "glTransformFeedbackVaryingsNV", 2},
33500+};
33501+
33502+int is_arg_of_length_depending_on_previous_args(FuncDesc* funcDesc, int j)
33503+{
33504+ int i;
33505+ if (strstr(funcDesc->args[j], "*") == NULL)
33506+ return 0;
33507+ for(i=0;i< N_ELEMENTS(argDependingOnPreviousArgTab); i++)
33508+ {
33509+ if (strstr(funcDesc->name, argDependingOnPreviousArgTab[i].str) && j == argDependingOnPreviousArgTab[i].i)
33510+ return 1;
33511+ }
33512+ return 0;
33513+}
33514+
33515+static void fprintf_prototype_args(FILE* f, FuncDesc* funcDesc)
33516+{
33517+ int j;
33518+ for(j=0;j<funcDesc->nargs;j++)
33519+ {
33520+ if (j != 0) fprintf(f,", ");
33521+ if (strstr(funcDesc->args[j], "[16]"))
33522+ {
33523+ if (strstr(funcDesc->args[j], "float"))
33524+ {
33525+ fprintf(f, "const GLfloat arg_%d[16]", j);
33526+ }
33527+ else if (strstr(funcDesc->args[j], "double"))
33528+ {
33529+ fprintf(f, "const GLdouble arg_%d[16]", j);
33530+ }
33531+ else
33532+ {
33533+ exit(-1);
33534+ }
33535+ }
33536+ else if (strstr(funcDesc->args[j], "[128]") && strstr(funcDesc->args[j], "GLubyte"))
33537+ fprintf(f, (strstr(funcDesc->args[j], "const")) ? "const GLubyte* arg_%d" : "GLubyte* arg_%d", j);
33538+ else
33539+ fprintf(f, "%s arg_%d", funcDesc->args[j], j);
33540+ }
33541+}
33542+
33543+int main(int argc, char* argv[])
33544+{
33545+ FuncDesc funcDesc[3000];
33546+ int funcDescCount = 0;
33547+ FILE* f;
33548+
33549+ f = fopen("../target-i386/mesa_gl.h", "r");
33550+ assert(f);
33551+ /*if (!f)
33552+ f = fopen("/usr/include/GL/gl.h", "r");*/
33553+ funcDescCount = parse(f, funcDesc, 0, 1);
33554+ fclose(f);
33555+
33556+ f = fopen("../target-i386/mesa_glext.h", "r");
33557+ assert(f);
33558+ /*if (!f)
33559+ f = fopen("/usr/include/GL/glext.h", "r");*/
33560+ funcDescCount = parse(f, funcDesc, funcDescCount, 0);
33561+ fclose(f);
33562+
33563+ FILE* header = fopen("gl_func.h", "w");
33564+ FILE* client_stub = fopen("client_stub.c", "w");
33565+ FILE* server_stub = fopen("server_stub.c", "w");
33566+
33567+ fprintf(header, "/* This is a generated file. DO NOT EDIT ! */\n\n");
33568+ fprintf(header, "#define COMPOSE(x,y) x##y\n");
33569+ fprintf(header, "#define MAGIC_MACRO(x) COMPOSE(x,_func)\n");
33570+ fprintf(header, "enum {\n"
33571+ "#include \"gl_func_perso.h\"\n");
33572+
33573+ fprintf(client_stub, "/* This is a generated file. DO NOT EDIT ! */\n\n");
33574+
33575+ fprintf(server_stub, "/* This is a generated file. DO NOT EDIT ! */\n\n");
33576+
33577+ int i;
33578+ for(i=0;i<funcDescCount;i++)
33579+ {
33580+ funcDesc[i].ok = 0;
33581+ char* name = funcDesc[i].name;
33582+ char* type = funcDesc[i].type;
33583+ if ((strcmp(type, "void") == 0 || strcmp(type, "GLboolean") == 0 ||
33584+ strcmp(type, "GLuint") == 0 || strcmp(type, "GLint") == 0 ||
33585+ strcmp(type, "GLenum") == 0) || strcmp(type, "GLhandleARB") == 0 ||
33586+ strcmp(type, "GLhalf") == 0 || strcmp(type, "GLhalfNV") == 0)
33587+ {
33588+ int pointer_of_unknown_size = 0;
33589+ int j;
33590+
33591+ if (funcDesc[i].nargs == 1 && strcmp(funcDesc[i].args[0], "void") == 0)
33592+ {
33593+ funcDesc[i].nargs = 0;
33594+ }
33595+ for(j=0;j<funcDesc[i].nargs-1;j++)
33596+ {
33597+ if (!is_arg_of_length_depending_on_previous_args(&funcDesc[i], j) &&
33598+ strstr(funcDesc[i].args[j], "const GLchar") == NULL &&
33599+ strstr(funcDesc[i].args[j], "[16]") == NULL)
33600+ {
33601+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "*") != NULL;
33602+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "[") != NULL;
33603+ }
33604+ }
33605+
33606+ if (pointer_of_unknown_size == 0)
33607+ {
33608+ char* signature_type_name;
33609+ if (is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL))
33610+ {
33611+ if (strstr(signature_type_name, "TYPE_OUT"))
33612+ funcDesc[i].has_out_parameters = 1;
33613+ }
33614+ else
33615+ {
33616+ if (funcDesc[i].nargs-1 >= 0)
33617+ {
33618+ j = funcDesc[i].nargs-1;
33619+ if (!is_arg_of_length_depending_on_previous_args(&funcDesc[i], j) &&
33620+ strstr(funcDesc[i].args[j], "const GLchar") == NULL &&
33621+ strstr(funcDesc[i].args[j], "[16]") == NULL)
33622+ {
33623+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "*") != NULL;
33624+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "[") != NULL;
33625+ }
33626+ }
33627+ }
33628+ }
33629+ if (pointer_of_unknown_size && funcDesc[i].nargs == 1)
33630+ {
33631+ if (strstr(funcDesc[i].name, "Matrixf") || strstr(funcDesc[i].name, "Matrixd"))
33632+ {
33633+ free(funcDesc[i].args[0]);
33634+ if (strstr(funcDesc[i].name, "Matrixf"))
33635+ funcDesc[i].args[0] = strdup("GLfloat m[16]");
33636+ else
33637+ funcDesc[i].args[0] = strdup("GLdouble m[16]");
33638+ pointer_of_unknown_size = 0;
33639+ }
33640+ else if (strcmp(funcDesc[i].name, "glPolygonStipple") == 0)
33641+ {
33642+ free(funcDesc[i].args[0]);
33643+ funcDesc[i].args[0] = strdup("const GLubyte mask[128]");
33644+ pointer_of_unknown_size = 0;
33645+ }
33646+ else if (strcmp(funcDesc[i].name, "glGetPolygonStipple") == 0)
33647+ {
33648+ free(funcDesc[i].args[0]);
33649+ funcDesc[i].args[0] = strdup("GLubyte mask[128]");
33650+ funcDesc[i].has_out_parameters = 1;
33651+ pointer_of_unknown_size = 0;
33652+ }
33653+ }
33654+ if (just_for_server_side_func(name) || pointer_of_unknown_size == 0)
33655+ {
33656+ fprintf(header, " %s_func,\n", funcDesc[i].name);
33657+ funcDesc[i].ok = 1;
33658+ if (just_for_server_side_func(name))
33659+ funcDesc[i].just_for_server_side = 1;
33660+ for(j=0;j<funcDesc[i].nargs;j++)
33661+ {
33662+ if (strstr(get_type_string(funcDesc[i].args[j]), "OUT"))
33663+ funcDesc[i].has_out_parameters = 1;
33664+ }
33665+ }
33666+ else
33667+ {
33668+ fprintf(stderr, "not handled either manually or automatically : %s\n", funcDesc[i].name);
33669+ }
33670+ }
33671+ }
33672+
33673+ fprintf(header, " GL_N_CALLS\n};\n");
33674+
33675+
33676+ fprintf(server_stub, "void execute_func(int func_number, arg_t *args, int *pret_int, char *pret_char)\n");
33677+ fprintf(server_stub, "{\n");
33678+ fprintf(server_stub, " switch(func_number)\n");
33679+ fprintf(server_stub, " {\n");
33680+
33681+
33682+ for(i=0;i<funcDescCount;i++)
33683+ {
33684+ if (funcDesc[i].ok)
33685+ {
33686+ fprintf(header, "static const int %s_signature[] = { %s, %d, ",
33687+ funcDesc[i].name,
33688+ get_type_string(funcDesc[i].type),
33689+ funcDesc[i].has_out_parameters);
33690+ fprintf(header, "%d", funcDesc[i].nargs);
33691+ int j;
33692+ char* signature_type_name;
33693+ int n_args_to_check = is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL) ? funcDesc[i].nargs - 1 : funcDesc[i].nargs;
33694+
33695+ for(j=0;j<n_args_to_check;j++)
33696+ {
33697+ if (is_arg_of_length_depending_on_previous_args(&funcDesc[i], j))
33698+ {
33699+ fprintf(header, ", %s_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS", get_type_string(funcDesc[i].args[j]));
33700+ }
33701+ else
33702+ fprintf(header, ", %s", get_type_string(funcDesc[i].args[j]));
33703+ }
33704+
33705+ if (is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL))
33706+ {
33707+ fprintf(header, ", %s", signature_type_name);
33708+ }
33709+ fprintf(header, "};\n");
33710+
33711+
33712+ if (funcDesc[i].just_for_server_side == 0)
33713+ {
33714+ if (isExt(&funcDesc[i]))
33715+ fprintf(client_stub, "GLAPI %s APIENTRY EXT_FUNC(%s) (", funcDesc[i].type, funcDesc[i].name);
33716+ else
33717+ fprintf(client_stub, "GLAPI %s APIENTRY %s(", funcDesc[i].type, funcDesc[i].name);
33718+ fprintf_prototype_args(client_stub, &funcDesc[i]);
33719+ fprintf(client_stub, ")\n");
33720+ fprintf(client_stub, "{\n");
33721+ if (strcmp(funcDesc[i].type, "void") != 0)
33722+ {
33723+ fprintf(client_stub, " %s ret;\n", funcDesc[i].type);
33724+ if (isExt(&funcDesc[i]))
33725+ fprintf(client_stub, " CHECK_PROC_WITH_RET(%s);\n", funcDesc[i].name);
33726+ }
33727+ else
33728+ {
33729+ if (isExt(&funcDesc[i]))
33730+ fprintf(client_stub, " CHECK_PROC(%s);\n", funcDesc[i].name);
33731+ }
33732+
33733+ /*
33734+ fprintf(client_stub, " do_opengl_call(%s_func, %s",
33735+ funcDesc[i].name, (strcmp(funcDesc[i].type, "void") == 0) ? "NULL" : "&ret");
33736+ for(j=0;j<funcDesc[i].nargs;j++)
33737+ {
33738+ fprintf(client_stub, ", arg_%d", j);
33739+ }
33740+ fprintf(client_stub, ");\n");
33741+ */
33742+
33743+ if (funcDesc[i].nargs)
33744+ {
33745+ fprintf(client_stub, " long args[] = { ");
33746+ for(j=0;j<funcDesc[i].nargs;j++)
33747+ {
33748+ if (j > 0) fprintf(client_stub, ", ");
33749+ if (strstr(funcDesc[i].args[j], "*"))
33750+ {
33751+ fprintf(client_stub, "POINTER_TO_ARG(arg_%d)", j);
33752+ }
33753+ else
33754+ {
33755+ const char* symbolic_type = get_type_string(funcDesc[i].args[j]);
33756+ if (strcmp(symbolic_type, "TYPE_CHAR") == 0)
33757+ fprintf(client_stub, "CHAR_TO_ARG");
33758+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_CHAR") == 0)
33759+ fprintf(client_stub, "UNSIGNED_CHAR_TO_ARG");
33760+ else if (strcmp(symbolic_type, "TYPE_SHORT") == 0)
33761+ fprintf(client_stub, "SHORT_TO_ARG");
33762+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_SHORT") == 0)
33763+ fprintf(client_stub, "UNSIGNED_SHORT_TO_ARG");
33764+ else if (strcmp(symbolic_type, "TYPE_INT") == 0)
33765+ fprintf(client_stub, "INT_TO_ARG");
33766+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_INT") == 0)
33767+ fprintf(client_stub, "UNSIGNED_INT_TO_ARG");
33768+ else if (strcmp(symbolic_type, "TYPE_FLOAT") == 0)
33769+ fprintf(client_stub, "FLOAT_TO_ARG");
33770+ else if (strcmp(symbolic_type, "TYPE_16FLOAT") == 0)
33771+ fprintf(client_stub, "POINTER_TO_ARG");
33772+ else if (strcmp(symbolic_type, "TYPE_DOUBLE") == 0)
33773+ fprintf(client_stub, "DOUBLE_TO_ARG");
33774+ else if ( strcmp(symbolic_type, "TYPE_16DOUBLE") == 0)
33775+ fprintf(client_stub, "POINTER_TO_ARG");
33776+ else if ( strcmp(symbolic_type, "TYPE_128UCHAR") == 0 || strcmp(symbolic_type, "TYPE_OUT_128UCHAR") == 0)
33777+ fprintf(client_stub, "POINTER_TO_ARG");
33778+ else
33779+ {
33780+ fprintf(stderr, "Unknown : %s\n", symbolic_type);
33781+ assert(0);
33782+ }
33783+ fprintf(client_stub, "(arg_%d)", j);
33784+ }
33785+ }
33786+ fprintf(client_stub, "};\n");
33787+ }
33788+
33789+ fprintf(client_stub, " do_opengl_call(%s_func, %s, %s, NULL);\n",
33790+ funcDesc[i].name, (strcmp(funcDesc[i].type, "void") == 0) ? "NULL" : "&ret",
33791+ (funcDesc[i].nargs) ? "args" : "NULL");
33792+
33793+ if (strcmp(funcDesc[i].type, "void") != 0)
33794+ {
33795+ fprintf(client_stub, " return ret;\n");
33796+ }
33797+ fprintf(client_stub, "}\n\n");
33798+ }
33799+
33800+ fprintf(server_stub, " case %s_func:\n", funcDesc[i].name);
33801+ fprintf(server_stub, " {\n");
33802+
33803+ if (isExt(&funcDesc[i]))
33804+ {
33805+ fprintf(server_stub, " GET_EXT_PTR(%s, %s, (", funcDesc[i].type, funcDesc[i].name);
33806+ fprintf_prototype_args(server_stub, &funcDesc[i]);
33807+ fprintf(server_stub, "));\n");
33808+ }
33809+
33810+ fprintf(server_stub, " ");
33811+
33812+ if (strcmp(funcDesc[i].type, "void") == 0)
33813+ ;
33814+ else if (strcmp(get_type_string(funcDesc[i].type), "TYPE_INT") == 0 ||
33815+ strcmp(get_type_string(funcDesc[i].type), "TYPE_UNSIGNED_INT") == 0)
33816+ fprintf(server_stub, "*pret_int = ");
33817+ else if (strcmp(get_type_string(funcDesc[i].type), "TYPE_CHAR") == 0 ||
33818+ strcmp(get_type_string(funcDesc[i].type), "TYPE_UNSIGNED_CHAR") == 0)
33819+ fprintf(server_stub, "*pret_char = ");
33820+ else
33821+ {
33822+ fprintf(stderr, "unknown ret type = %s\n", get_type_string(funcDesc[i].type));
33823+ exit(-1);
33824+ }
33825+ /*if (strstr(funcDesc[i].name, "EXT"))
33826+ {
33827+ char* dup = strdup(funcDesc[i].name);
33828+ *strstr(dup, "EXT") = 0;
33829+ fprintf(server_stub, "%s(", dup);
33830+ free(dup);
33831+ }
33832+ else*/
33833+ {
33834+ if (isExt(&funcDesc[i]))
33835+ fprintf(server_stub, "ptr_func_%s(", funcDesc[i].name);
33836+ else
33837+ fprintf(server_stub, "%s(", funcDesc[i].name);
33838+ }
33839+ char* c_type_name;
33840+ if (is_known_arg_vector(&funcDesc[i], NULL, &c_type_name))
33841+ {
33842+ for(j=0;j<funcDesc[i].nargs - 1;j++)
33843+ {
33844+ if (j != 0) fprintf(server_stub,", ");
33845+ print_server_side_argument(server_stub, j, funcDesc[i].args[j]);
33846+ }
33847+ if (j != 0) fprintf(server_stub,", ");
33848+ if (strstr(funcDesc[i].args[funcDesc[i].nargs - 1], "const"))
33849+ fprintf(server_stub, "(const %s*)args[%d]", c_type_name, j);
33850+ else
33851+ fprintf(server_stub, "(%s*)args[%d]", c_type_name, j);
33852+ }
33853+ else
33854+ {
33855+ for(j=0;j<funcDesc[i].nargs;j++)
33856+ {
33857+ if (j != 0) fprintf(server_stub,", ");
33858+ print_server_side_argument(server_stub, j, funcDesc[i].args[j]);
33859+ }
33860+ }
33861+ fprintf(server_stub, ");\n");
33862+
33863+ fprintf(server_stub, " break;\n");
33864+ fprintf(server_stub, " }\n");
33865+ }
33866+ }
33867+
33868+ fprintf(server_stub, " default:\n");
33869+ fprintf(server_stub, " fprintf(stderr, \"unknown=%%d\", func_number);\n");
33870+ fprintf(server_stub, " break;\n");
33871+ fprintf(server_stub, " }\n");
33872+ fprintf(server_stub, "}\n");
33873+
33874+ fprintf(header, "#undef MAGIC_MACRO\n");
33875+ fprintf(header, "#define MAGIC_MACRO(x) COMPOSE(x,_signature)\n");
33876+ fprintf(header, "static const int* tab_opengl_calls[GL_N_CALLS] =\n");
33877+ fprintf(header, "{\n");
33878+ fprintf(header, "#include \"gl_func_perso.h\"\n");
33879+ for(i=0;i<funcDescCount;i++)
33880+ {
33881+ if (funcDesc[i].ok)
33882+ {
33883+ fprintf(header, " %s_signature,\n", funcDesc[i].name);
33884+ }
33885+ }
33886+ fprintf(header, "};\n\n");
33887+
33888+ fprintf(header, "#undef MAGIC_MACRO\n");
33889+ fprintf(header, "#define MAGIC_MACRO(x) #x\n");
33890+ fprintf(header, "static const char* tab_opengl_calls_name[GL_N_CALLS] =\n");
33891+ fprintf(header, "{\n");
33892+ fprintf(header, "#include \"gl_func_perso.h\"\n");
33893+ for(i=0;i<funcDescCount;i++)
33894+ {
33895+ if (funcDesc[i].ok)
33896+ {
33897+ fprintf(header, " \"%s\",\n", funcDesc[i].name);
33898+ }
33899+ }
33900+ fprintf(header, "};\n\n");
33901+
33902+ fclose(header);
33903+ fclose(server_stub);
33904+ fclose(client_stub);
33905+
33906+ return 0;
33907+}
33908Index: qemu-0.13.0/target-i386/parse_mesa_get_c.c
33909===================================================================
33910--- /dev/null 1970-01-01 00:00:00.000000000 +0000
33911+++ qemu-0.13.0/target-i386/parse_mesa_get_c.c 2011-01-17 16:42:36.000000000 +0800
33912@@ -0,0 +1,225 @@
33913+/*
33914+ * Parse the "get.c" from mesa source tree to generate "glgetv_cst.h"
33915+ *
33916+ * Copyright (c) 2007 Even Rouault
33917+ *
33918+ * Permission is hereby granted, free of charge, to any person obtaining a copy
33919+ * of this software and associated documentation files (the "Software"), to deal
33920+ * in the Software without restriction, including without limitation the rights
33921+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
33922+ * copies of the Software, and to permit persons to whom the Software is
33923+ * furnished to do so, subject to the following conditions:
33924+ *
33925+ * The above copyright notice and this permission notice shall be included in
33926+ * all copies or substantial portions of the Software.
33927+ *
33928+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
33929+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
33930+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
33931+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33932+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
33933+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
33934+ * THE SOFTWARE.
33935+ */
33936+
33937+// gcc -Wall parse_mesa_get_c.c -o parse_mesa_get_c -I. && ./parse_mesa_get_c
33938+
33939+#include <stdlib.h>
33940+#include <stdio.h>
33941+#include <string.h>
33942+#include <assert.h>
33943+
33944+#include "mesa_gl.h"
33945+#include "mesa_glext.h"
33946+
33947+/* #include "mesa_enums.c" */
33948+
33949+int gl_lookup_enum_by_name(const char* name)
33950+{
33951+ FILE* f;
33952+ char buffer[256];
33953+ char template1[256];
33954+ char template2[256];
33955+ int i;
33956+ sprintf(template1, "#define %s\t", name);
33957+ sprintf(template2, "#define %s ", name);
33958+ for(i=0;i<2;i++)
33959+ {
33960+ if (i == 0)
33961+ f = fopen("mesa_gl.h", "r");
33962+ else
33963+ f = fopen("mesa_glext.h", "r");
33964+ while(fgets(buffer, 256, f))
33965+ {
33966+ if (strstr(buffer, template1) || strstr(buffer, template2))
33967+ {
33968+ char* c = strstr(buffer, "0x");
33969+ assert(c);
33970+ int ret;
33971+ ret = strtol(c, NULL, 16);
33972+ return ret;
33973+ }
33974+ }
33975+ fclose(f);
33976+ }
33977+
33978+ return -1;
33979+}
33980+
33981+typedef struct
33982+{
33983+ int value;
33984+ char* name;
33985+ int nb_elts;
33986+} Token;
33987+
33988+int compare_func(Token* a, Token* b)
33989+{
33990+ return a->value - b->value;
33991+}
33992+
33993+typedef struct
33994+{
33995+ int i;
33996+ char* str;
33997+} Cpl;
33998+#define CPL(x) {x, #x}
33999+
34000+Cpl constantsOneVal[] =
34001+{
34002+ CPL(GL_MAX_GENERAL_COMBINERS_NV),
34003+ CPL(GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT),
34004+ CPL(GL_MAX_VERTEX_SHADER_VARIANTS_EXT),
34005+ CPL(GL_MAX_VERTEX_SHADER_INVARIANTS_EXT),
34006+ CPL(GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
34007+ CPL(GL_MAX_VERTEX_SHADER_LOCALS_EXT),
34008+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT),
34009+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT),
34010+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT),
34011+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
34012+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
34013+};
34014+#define NB_CONSTANTS_ONE_VAL 11
34015+
34016+int main(int argc, char* argv[])
34017+{
34018+ FILE* f = fopen("mesa_get.c", "r");
34019+ char buffer[256];
34020+ int state = 0;
34021+ char name[256];
34022+ int count = 0;
34023+ char template[256];
34024+ Token tokens[1000];
34025+ int ntoken = 0;
34026+ int i;
34027+ FILE* outf = fopen("glgetv_cst.h", "w");
34028+
34029+ fprintf(outf, "/* This is a generated file. Do not edit !*/\n");
34030+ fprintf(outf, "typedef struct {\n");
34031+ fprintf(outf, " GLuint count;\n");
34032+ fprintf(outf, " GLenum token;\n");
34033+ fprintf(outf, " const char *name;\n");
34034+ fprintf(outf, "} GlGetConstant ;\n");
34035+ fprintf(outf, "static const GlGetConstant gl_get_constants[] = {\n");
34036+
34037+ while(fgets(buffer, 256, f))
34038+ {
34039+ if (strstr(buffer, "_mesa_GetBooleanv"))
34040+ {
34041+ state = 1;
34042+ }
34043+ else if (state == 1)
34044+ {
34045+ if (strstr(buffer, "_mesa_GetFloatv"))
34046+ {
34047+ break;
34048+ }
34049+ else if (strstr(buffer, "case GL_"))
34050+ {
34051+ strcpy(name, strstr(buffer, "case GL_") + 5);
34052+ *strstr(name, ":") = 0;
34053+ count = 0;
34054+ strcpy(template, "params[0]");
34055+ }
34056+ else if (strstr(buffer, template))
34057+ {
34058+ count ++;
34059+ sprintf(template, "params[%d]", count);
34060+ }
34061+ else if (strstr(buffer, "break"))
34062+ {
34063+ if (count > 0)
34064+ {
34065+ int gl_lookup = gl_lookup_enum_by_name(name);
34066+ /*
34067+ int mesa_lookup = _mesa_lookup_enum_by_name(name);
34068+ if (mesa_lookup != -1)
34069+ {
34070+ if(mesa_lookup != gl_lookup)
34071+ {
34072+ fprintf(stderr, "wrong : %s %d %d !\n", name, mesa_lookup, gl_lookup);
34073+ exit(-1);
34074+ }
34075+ }*/
34076+ if (gl_lookup == -1)
34077+ {
34078+ fprintf(stderr, "not found in includes : %s\n", name);
34079+ //fprintf(outf, "/* { %d, unknown value, \"%s\" },*/\n", count, name);
34080+ }
34081+ else
34082+ {
34083+ //fprintf(outf, " { %d, 0x%04x, \"%s\" },\n", count, gl_lookup, name);
34084+ tokens[ntoken].value = gl_lookup;
34085+ tokens[ntoken].nb_elts = count;
34086+ tokens[ntoken].name = strdup(name);
34087+ ntoken++;
34088+ }
34089+ /*fprintf(outf, "#ifdef %s\n", name);
34090+ fprintf(outf, " { %d, MAKE_TOKEN_NAME(%s) },\n", count, name);
34091+ fprintf(outf, "#endif\n");*/
34092+ }
34093+ else
34094+ fprintf(stderr, "not recognized : %s\n", name);
34095+ }
34096+ }
34097+ }
34098+
34099+ for(i=0;i<NB_CONSTANTS_ONE_VAL;i++)
34100+ {
34101+ tokens[ntoken].value = constantsOneVal[i].i;
34102+ tokens[ntoken].nb_elts = 1;
34103+ tokens[ntoken].name = strdup(constantsOneVal[i].str);
34104+ ntoken++;
34105+ }
34106+
34107+ tokens[ntoken].value = GL_SPRITE_MODE_SGIX;
34108+ tokens[ntoken].nb_elts = 1;
34109+ tokens[ntoken].name = strdup("GL_SPRITE_MODE_SGIX");
34110+ ntoken++;
34111+
34112+ tokens[ntoken].value = GL_SPRITE_AXIS_SGIX ;
34113+ tokens[ntoken].nb_elts = 3;
34114+ tokens[ntoken].name = strdup("GL_SPRITE_AXIS_SGIX ");
34115+ ntoken++;
34116+
34117+ tokens[ntoken].value = GL_SPRITE_TRANSLATION_SGIX;
34118+ tokens[ntoken].nb_elts = 3;
34119+ tokens[ntoken].name = strdup("GL_SPRITE_TRANSLATION_SGIX");
34120+ ntoken++;
34121+
34122+ tokens[ntoken].value = GL_REFERENCE_PLANE_EQUATION_SGIX;
34123+ tokens[ntoken].nb_elts = 4;
34124+ tokens[ntoken].name = strdup("GL_REFERENCE_PLANE_EQUATION_SGIX");
34125+ ntoken++;
34126+
34127+
34128+ qsort(tokens, ntoken, sizeof(Token), compare_func);
34129+ for(i=0;i<ntoken;i++)
34130+ {
34131+ fprintf(outf, " { %d, 0x%04x, \"%s\" },\n", tokens[i].nb_elts, tokens[i].value, tokens[i].name);
34132+ }
34133+ fprintf(outf, "};\n");
34134+ fclose(f);
34135+ fclose(outf);
34136+ return 0;
34137+}
34138Index: qemu-0.13.0/target-i386/translate.c
34139===================================================================
34140--- qemu-0.13.0.orig/target-i386/translate.c 2011-01-17 16:41:59.000000000 +0800
34141+++ qemu-0.13.0/target-i386/translate.c 2011-01-17 16:42:36.000000000 +0800
34142@@ -745,6 +745,8 @@
34143 int state_saved;
34144 target_ulong next_eip;
34145
34146+ return;
34147+
34148 state_saved = 0;
34149 if (s->pe && (s->cpl > s->iopl || s->vm86)) {
34150 if (s->cc_op != CC_OP_DYNAMIC)
34151@@ -2672,11 +2674,18 @@
34152 s->is_jmp = DISAS_TB_JUMP;
34153 }
34154
34155+int enable_gl = 0;
34156+
34157 /* an interrupt is different from an exception because of the
34158 privilege checks */
34159 static void gen_interrupt(DisasContext *s, int intno,
34160 target_ulong cur_eip, target_ulong next_eip)
34161 {
34162+ if (enable_gl && intno == 0x99) {
34163+ gen_helper_opengl();
34164+ return;
34165+ }
34166+
34167 if (s->cc_op != CC_OP_DYNAMIC)
34168 gen_op_set_cc_op(s->cc_op);
34169 gen_jmp_im(cur_eip);
34170Index: qemu-0.13.0/vl.c
34171===================================================================
34172--- qemu-0.13.0.orig/vl.c 2011-01-17 16:41:59.000000000 +0800
34173+++ qemu-0.13.0/vl.c 2011-01-17 16:42:36.000000000 +0800
34174@@ -217,12 +217,14 @@
34175 int nb_option_roms;
34176 int semihosting_enabled = 0;
34177 int old_param = 0;
34178+int force_pointer = 0;
34179 const char *qemu_name;
34180 int alt_grab = 0;
34181 int ctrl_grab = 0;
34182 unsigned int nb_prom_envs = 0;
34183 const char *prom_envs[MAX_PROM_ENVS];
34184 int boot_menu;
34185+extern int enable_gl;
34186
34187 int nb_numa_nodes;
34188 uint64_t node_mem[MAX_NODES];
34189@@ -1433,6 +1435,8 @@
34190 } else if (strstart(p, "xenfb", &opts)) {
34191 vga_interface_type = VGA_XENFB;
34192 } else if (!strstart(p, "none", &opts)) {
34193+ }
34194+ else {
34195 invalid_vga:
34196 fprintf(stderr, "Unknown vga type: %s\n", p);
34197 exit(1);
34198@@ -2535,6 +2539,9 @@
34199 case QEMU_OPTION_old_param:
34200 old_param = 1;
34201 break;
34202+ case QEMU_OPTION_force_pointer:
34203+ force_pointer = 1;
34204+ break;
34205 case QEMU_OPTION_clock:
34206 configure_alarms(optarg);
34207 break;
34208@@ -2548,6 +2555,12 @@
34209 }
34210 configure_rtc(opts);
34211 break;
34212+#ifdef TARGET_OPENGL_OK
34213+ case QEMU_OPTION_enable_gl:
34214+ fprintf(stderr, "Enabling opengl\n");
34215+ enable_gl = 1;
34216+ break;
34217+#endif
34218 case QEMU_OPTION_tb_size:
34219 tb_size = strtol(optarg, NULL, 0);
34220 if (tb_size < 0)
34221@@ -2887,6 +2900,14 @@
34222 if (foreach_device_config(DEV_USB, usb_parse) < 0)
34223 exit(1);
34224 }
34225+#ifdef TARGET_OPENGL_OK
34226+ if (enable_gl) {
34227+ /* Use second serial port */
34228+ int opengl_serial = 1;
34229+
34230+ add_device_config(DEV_SERIAL, "opengl");
34231+ }
34232+#endif
34233
34234 /* init generic devices */
34235 if (qemu_opts_foreach(&qemu_device_opts, device_init_func, NULL, 1) != 0)
34236Index: qemu-0.13.0/qemu-options.hx
34237===================================================================
34238--- qemu-0.13.0.orig/qemu-options.hx 2011-01-17 16:41:59.000000000 +0800
34239+++ qemu-0.13.0/qemu-options.hx 2011-01-17 16:44:27.000000000 +0800
34240@@ -2024,6 +2024,18 @@
34241 re-inject them.
34242 ETEXI
34243
34244+DEF("enable-gl", 0, QEMU_OPTION_enable_gl, \
34245+ "-enable-gl\n", QEMU_ARCH_I386)
34246+STEXI
34247+@item -enable-gl
34248+ETEXI
34249+
34250+DEF("force-pointer", 0, QEMU_OPTION_force_pointer, \
34251+ "-force-pointer\n", QEMU_ARCH_ALL)
34252+STEXI
34253+@item -force-pointer
34254+ETEXI
34255+
34256 DEF("icount", HAS_ARG, QEMU_OPTION_icount, \
34257 "-icount [N|auto]\n" \
34258 " enable virtual instruction counter with 2^N clock ticks per\n" \
34259Index: qemu-0.13.0/ui/sdl.c
34260===================================================================
34261--- qemu-0.13.0.orig/ui/sdl.c 2011-01-17 16:41:59.000000000 +0800
34262+++ qemu-0.13.0/ui/sdl.c 2011-01-17 16:42:36.000000000 +0800
34263@@ -59,6 +59,8 @@
34264 static int scaling_active = 0;
34265 static Notifier mouse_mode_notifier;
34266
34267+extern void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window);
34268+
34269 static void sdl_update(DisplayState *ds, int x, int y, int w, int h)
34270 {
34271 // printf("updating x=%d y=%d w=%d h=%d\n", x, y, w, h);
34272@@ -121,12 +123,22 @@
34273
34274 static void sdl_resize(DisplayState *ds)
34275 {
34276- if (!allocator) {
34277+ SDL_SysWMinfo info;
34278+ static Display *dpy;
34279+
34280+ if (!allocator) {
34281 if (!scaling_active)
34282 do_sdl_resize(ds_get_width(ds), ds_get_height(ds), 0);
34283 else if (real_screen->format->BitsPerPixel != ds_get_bits_per_pixel(ds))
34284 do_sdl_resize(real_screen->w, real_screen->h, ds_get_bits_per_pixel(ds));
34285 sdl_setdata(ds);
34286+
34287+ SDL_GetWMInfo(&info);
34288+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display &&
34289+ (!dpy || dpy == info.info.x11.display)) {
34290+ dpy = info.info.x11.display;
34291+ opengl_exec_set_parent_window(dpy, info.info.x11.window);
34292+ }
34293 } else {
34294 if (guest_screen != NULL) {
34295 SDL_FreeSurface(guest_screen);
34296@@ -455,7 +467,7 @@
34297
34298 if (!kbd_mouse_is_absolute()) {
34299 SDL_ShowCursor(1);
34300- if (guest_cursor &&
34301+ if (guest_cursor && !force_pointer &&
34302 (gui_grab || kbd_mouse_is_absolute() || absolute_enabled))
34303 SDL_SetCursor(guest_sprite);
34304 else
34305@@ -466,7 +478,8 @@
34306 static void sdl_grab_start(void)
34307 {
34308 if (guest_cursor) {
34309- SDL_SetCursor(guest_sprite);
34310+ if (!force_pointer)
34311+ SDL_SetCursor(guest_sprite);
34312 if (!kbd_mouse_is_absolute() && !absolute_enabled)
34313 SDL_WarpMouse(guest_x, guest_y);
34314 } else
34315@@ -768,7 +781,8 @@
34316 if (!guest_cursor)
34317 sdl_show_cursor();
34318 if (gui_grab || kbd_mouse_is_absolute() || absolute_enabled) {
34319- SDL_SetCursor(guest_sprite);
34320+ if (!force_pointer)
34321+ SDL_SetCursor(guest_sprite);
34322 if (!kbd_mouse_is_absolute() && !absolute_enabled)
34323 SDL_WarpMouse(x, y);
34324 }
34325@@ -796,7 +810,7 @@
34326 qemu_free(image);
34327 qemu_free(mask);
34328
34329- if (guest_cursor &&
34330+ if (guest_cursor && !force_pointer &&
34331 (gui_grab || kbd_mouse_is_absolute() || absolute_enabled))
34332 SDL_SetCursor(guest_sprite);
34333 }
34334@@ -813,6 +827,7 @@
34335 int flags;
34336 uint8_t data = 0;
34337 DisplayAllocator *da;
34338+ SDL_SysWMinfo info;
34339 const SDL_VideoInfo *vi;
34340
34341 #if defined(__APPLE__)
34342@@ -842,6 +857,12 @@
34343 vi = SDL_GetVideoInfo();
34344 host_format = *(vi->vfmt);
34345
34346+ SDL_GetWMInfo(&info);
34347+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display)
34348+ opengl_exec_set_parent_window(info.info.x11.display,
34349+ RootWindow(info.info.x11.display,
34350+ DefaultScreen(info.info.x11.display)));
34351+
34352 dcl = qemu_mallocz(sizeof(DisplayChangeListener));
34353 dcl->dpy_update = sdl_update;
34354 dcl->dpy_resize = sdl_resize;
34355@@ -876,4 +897,9 @@
34356 gui_fullscreen_initial_grab = 1;
34357 sdl_grab_start();
34358 }
34359+
34360+ SDL_GetWMInfo(&info);
34361+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display)
34362+ opengl_exec_set_parent_window(info.info.x11.display,
34363+ info.info.x11.window);
34364 }
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/qemu-ppc-hack.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/qemu-ppc-hack.patch
new file mode 100644
index 0000000000..6f45788183
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.13.0/qemu-ppc-hack.patch
@@ -0,0 +1,108 @@
1Quick fixes to get the ppc system model to boot a 603e based
2kernel.
3
4Index: qemu-0.13.0/hw/m48t59.c
5===================================================================
6--- qemu-0.13.0.orig/hw/m48t59.c 2010-10-16 04:56:09.000000000 +0800
7+++ qemu-0.13.0/hw/m48t59.c 2011-01-17 16:40:09.000000000 +0800
8@@ -50,6 +50,7 @@
9 */
10
11 struct M48t59State {
12+ SysBusDevice busdev;
13 /* Model parameters */
14 uint32_t type; // 2 = m48t02, 8 = m48t08, 59 = m48t59
15 /* Hardware parameters */
16@@ -74,11 +75,6 @@
17 M48t59State state;
18 } M48t59ISAState;
19
20-typedef struct M48t59SysBusState {
21- SysBusDevice busdev;
22- M48t59State state;
23-} M48t59SysBusState;
24-
25 /* Fake timer functions */
26
27 /* Alarm management */
28@@ -629,8 +625,7 @@
29
30 static void m48t59_reset_sysbus(DeviceState *d)
31 {
32- M48t59SysBusState *sys = container_of(d, M48t59SysBusState, busdev.qdev);
33- M48t59State *NVRAM = &sys->state;
34+ M48t59State *NVRAM = container_of(d, M48t59State, busdev.qdev);
35
36 m48t59_reset_common(NVRAM);
37 }
38@@ -641,7 +636,7 @@
39 {
40 DeviceState *dev;
41 SysBusDevice *s;
42- M48t59SysBusState *d;
43+ M48t59State *d;
44
45 dev = qdev_create(NULL, "m48t59");
46 qdev_prop_set_uint32(dev, "type", type);
47@@ -658,9 +653,9 @@
48 sysbus_mmio_map(s, 0, mem_base);
49 }
50
51- d = FROM_SYSBUS(M48t59SysBusState, s);
52+ d = FROM_SYSBUS(M48t59State, s);
53
54- return &d->state;
55+ return d;
56 }
57
58 M48t59State *m48t59_init_isa(uint32_t io_base, uint16_t size, int type)
59@@ -710,8 +705,7 @@
60
61 static int m48t59_init1(SysBusDevice *dev)
62 {
63- M48t59SysBusState *d = FROM_SYSBUS(M48t59SysBusState, dev);
64- M48t59State *s = &d->state;
65+ M48t59State *s = FROM_SYSBUS(M48t59State, dev);
66 int mem_index;
67
68 sysbus_init_irq(dev, &s->IRQ);
69@@ -740,12 +734,12 @@
70 static SysBusDeviceInfo m48t59_info = {
71 .init = m48t59_init1,
72 .qdev.name = "m48t59",
73- .qdev.size = sizeof(M48t59SysBusState),
74+ .qdev.size = sizeof(M48t59State),
75 .qdev.reset = m48t59_reset_sysbus,
76 .qdev.props = (Property[]) {
77- DEFINE_PROP_UINT32("size", M48t59SysBusState, state.size, -1),
78- DEFINE_PROP_UINT32("type", M48t59SysBusState, state.type, -1),
79- DEFINE_PROP_HEX32( "io_base", M48t59SysBusState, state.io_base, 0),
80+ DEFINE_PROP_UINT32("size", M48t59State, size, -1),
81+ DEFINE_PROP_UINT32("type", M48t59State, type, -1),
82+ DEFINE_PROP_HEX32( "io_base", M48t59State, io_base, 0),
83 DEFINE_PROP_END_OF_LIST(),
84 }
85 };
86Index: qemu-0.13.0/hw/ppc_prep.c
87===================================================================
88--- qemu-0.13.0.orig/hw/ppc_prep.c 2010-10-16 04:56:09.000000000 +0800
89+++ qemu-0.13.0/hw/ppc_prep.c 2011-01-15 18:29:25.000000000 +0800
90@@ -74,7 +74,7 @@
91 /* Constants for devices init */
92 static const int ide_iobase[2] = { 0x1f0, 0x170 };
93 static const int ide_iobase2[2] = { 0x3f6, 0x376 };
94-static const int ide_irq[2] = { 13, 13 };
95+static const int ide_irq[2] = { 13, 14 };
96
97 #define NE2000_NB_MAX 6
98
99@@ -631,9 +631,6 @@
100 if (filename) {
101 qemu_free(filename);
102 }
103- if (env->nip < 0xFFF80000 && bios_size < 0x00100000) {
104- hw_error("PowerPC 601 / 620 / 970 need a 1MB BIOS\n");
105- }
106
107 if (linux_boot) {
108 kernel_base = KERNEL_LOAD_ADDR;
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/qemu-vmware-vga-depth.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/qemu-vmware-vga-depth.patch
new file mode 100644
index 0000000000..5bdbaf3937
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.13.0/qemu-vmware-vga-depth.patch
@@ -0,0 +1,115 @@
1# fix VMware VGA driver depth calculation error, which may cause segmentation fault
2#
3# ktian1, 06/29/2010
4Index: qemu-0.13.0/console.h
5===================================================================
6--- qemu-0.13.0.orig/console.h 2011-01-17 16:41:58.000000000 +0800
7+++ qemu-0.13.0/console.h 2011-01-17 16:48:00.000000000 +0800
8@@ -171,6 +171,12 @@
9 void (*free_displaysurface)(DisplaySurface *surface);
10 };
11
12+struct DisplayPostCallback {
13+ void (*postcall) (void *);
14+ void *parm;
15+ struct DisplayPostCallback *next;
16+};
17+
18 struct DisplayState {
19 struct DisplaySurface *surface;
20 void *opaque;
21@@ -178,6 +184,7 @@
22
23 struct DisplayAllocator* allocator;
24 struct DisplayChangeListener* listeners;
25+ struct DisplayPostCallback* postcalls;
26
27 void (*mouse_set)(int x, int y, int on);
28 void (*cursor_define)(QEMUCursor *cursor);
29@@ -229,6 +236,12 @@
30 ds->listeners = dcl;
31 }
32
33+static inline void register_displaypostcallback(DisplayState *ds, DisplayPostCallback *dpc)
34+{
35+ dpc->next = ds->postcalls;
36+ ds->postcalls = dpc;
37+}
38+
39 static inline void dpy_update(DisplayState *s, int x, int y, int w, int h)
40 {
41 struct DisplayChangeListener *dcl = s->listeners;
42Index: qemu-0.13.0/hw/vmware_vga.c
43===================================================================
44--- qemu-0.13.0.orig/hw/vmware_vga.c 2011-01-17 16:42:36.000000000 +0800
45+++ qemu-0.13.0/hw/vmware_vga.c 2011-01-17 16:48:00.000000000 +0800
46@@ -957,8 +957,9 @@
47 }
48 }
49
50-static void vmsvga_reset(struct vmsvga_state_s *s)
51+static void vmsvga_reset(void *parm)
52 {
53+ struct vmsvga_state_s *s = (struct vmsvga_state_s *)parm;
54 s->index = 0;
55 s->enable = 0;
56 s->config = 0;
57@@ -1163,6 +1164,8 @@
58
59 static void vmsvga_init(struct vmsvga_state_s *s, int vga_ram_size)
60 {
61+ DisplayPostCallback *dpc;
62+
63 s->scratch_size = SVGA_SCRATCH_SIZE;
64 s->scratch = qemu_malloc(s->scratch_size * 4);
65
66@@ -1190,7 +1193,10 @@
67
68 rom_add_vga(VGABIOS_FILENAME);
69
70- vmsvga_reset(s);
71+ dpc = qemu_mallocz(sizeof(DisplayPostCallback));
72+ dpc->postcall = vmsvga_reset;
73+ dpc->parm = s;
74+ register_displaypostcallback(s->vga.ds, dpc);
75 }
76
77 static void pci_vmsvga_map_ioport(PCIDevice *pci_dev, int region_num,
78Index: qemu-0.13.0/qemu-common.h
79===================================================================
80--- qemu-0.13.0.orig/qemu-common.h 2011-01-17 16:41:58.000000000 +0800
81+++ qemu-0.13.0/qemu-common.h 2011-01-17 16:48:00.000000000 +0800
82@@ -205,6 +205,7 @@
83 typedef struct DisplayChangeListener DisplayChangeListener;
84 typedef struct DisplaySurface DisplaySurface;
85 typedef struct DisplayAllocator DisplayAllocator;
86+typedef struct DisplayPostCallback DisplayPostCallback;
87 typedef struct PixelFormat PixelFormat;
88 typedef struct TextConsole TextConsole;
89 typedef TextConsole QEMUConsole;
90Index: qemu-0.13.0/vl.c
91===================================================================
92--- qemu-0.13.0.orig/vl.c 2011-01-17 16:42:36.000000000 +0800
93+++ qemu-0.13.0/vl.c 2011-01-17 16:48:00.000000000 +0800
94@@ -1814,6 +1814,7 @@
95 char boot_devices[33] = "cad"; /* default to HD->floppy->CD-ROM */
96 DisplayState *ds;
97 DisplayChangeListener *dcl;
98+ DisplayPostCallback *dpc;
99 int cyls, heads, secs, translation;
100 QemuOpts *hda_opts = NULL, *opts;
101 int optind;
102@@ -2960,6 +2961,13 @@
103 }
104 dpy_resize(ds);
105
106+ dpc = ds->postcalls;
107+ while (dpc != NULL) {
108+ if (dpc->postcall != NULL)
109+ dpc->postcall(dpc->parm);
110+ dpc = dpc->next;
111+ }
112+
113 dcl = ds->listeners;
114 while (dcl != NULL) {
115 if (dcl->dpy_refresh != NULL) {
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/qemugl-allow-glxcontext-release.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/qemugl-allow-glxcontext-release.patch
new file mode 100644
index 0000000000..43acc361a0
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.13.0/qemugl-allow-glxcontext-release.patch
@@ -0,0 +1,63 @@
1Allow releasing the GLXContext/Drawable with glXMakeCurrent.
2
3---
4commit d942ed4e853e08d2298f3e11e9a952c1d952bff5
5tree f0a934efd8a8ff48e2d96f0d6fc7d70bef106bfe
6parent 93619e6be184f8de08759d347825ee0d678a6f9c
7author Andrzej Zaborowski <andrew.zaborowski@intel.com> Tue, 16 Jun 2009 22:22:05 +0200
8committer Andrzej Zaborowski <andrew.zaborowski@intel.com> Tue, 16 Jun 2009 22:22:05 +0200
9
10 target-i386/opengl_exec.c | 31 ++++++++++++++++---------------
11 1 files changed, 16 insertions(+), 15 deletions(-)
12
13Index: qemu/target-i386/opengl_exec.c
14===================================================================
15--- qemu.orig/target-i386/opengl_exec.c 2010-05-10 18:46:43.175394992 -0400
16+++ qemu/target-i386/opengl_exec.c 2010-05-10 18:46:43.218419933 -0400
17@@ -1600,10 +1600,9 @@ int do_function_call(int func_number, ar
18 fprintf(stderr, "client_drawable=%p fake_ctx=%d\n",
19 (void *) client_drawable, fake_ctxt);
20
21- if (client_drawable == 0 && fake_ctxt == 0) {
22+ if (client_drawable == 0 && fake_ctxt == 0)
23 ret_int = glXMakeCurrent(dpy, 0, NULL);
24- process->current_state = &process->default_state;
25- } else if ((drawable = (GLXDrawable)
26+ else if ((drawable = (GLXDrawable)
27 get_association_fakepbuffer_pbuffer(
28 process, client_drawable))) {
29 GLXContext ctxt = get_association_fakecontext_glxcontext(
30@@ -1651,19 +1650,21 @@ int do_function_call(int func_number, ar
31 }
32
33 if (ret_int) {
34- for (i = 0; i < process->nb_states; i ++) {
35- if (process->glstates[i]->fake_ctxt == fake_ctxt) {
36- /* HACK !!! REMOVE */
37- process->current_state = process->glstates[i];
38- process->current_state->drawable = drawable;
39- break;
40- }
41- }
42+ if (fake_ctxt) {
43+ for (i = 0; i < process->nb_states; i ++)
44+ if (process->glstates[i]->fake_ctxt == fake_ctxt) {
45+ /* HACK !!! REMOVE */
46+ process->current_state = process->glstates[i];
47+ process->current_state->drawable = drawable;
48+ break;
49+ }
50
51- if (i == process->nb_states) {
52- fprintf(stderr, "error remembering the new context\n");
53- exit(-1);
54- }
55+ if (i == process->nb_states) {
56+ fprintf(stderr, "error remembering the new context\n");
57+ exit(-1);
58+ }
59+ } else
60+ process->current_state = &process->default_state;
61 }
62 break;
63 }
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/vmware-vga-fifo-rewind.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/vmware-vga-fifo-rewind.patch
new file mode 100644
index 0000000000..867e54ba11
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.13.0/vmware-vga-fifo-rewind.patch
@@ -0,0 +1,198 @@
1commit 4dedc07ffbbc66002e0fd2b97d5516fe6aca5eea
2Author: Andrzej Zaborowski <balrog@zabor.org>
3Date: Fri Sep 10 02:23:31 2010 +0200
4
5 vmware_vga: Add checks to deal with non-atomic fifo writes.
6
7 Janne Huttunen noticed that the FIFO end pointer is updated by the
8 guest after writing each word to the FIFO, at least the X.org driver
9 which is open does this. This means that there's no way for the
10 host to know if the guest is in the middle a write operation. Qemu
11 thus needs to read the beginning of the command up to when it's able
12 to tell how many words are expected for the given command. It will
13 abort reading and rewind the FIFO if there aren't enough words yet,
14 this should be relatively rare but it is suspected to have been the
15 cause of the occasional FIFO overrun that killed the display.
16
17Index: qemu-0.13.0/hw/vmware_vga.c
18===================================================================
19--- qemu-0.13.0.orig/hw/vmware_vga.c 2011-01-15 18:06:06.000000000 +0800
20+++ qemu-0.13.0/hw/vmware_vga.c 2011-01-15 18:17:04.000000000 +0800
21@@ -521,27 +521,37 @@
22
23 static uint32_t last_cmd;
24
25-static inline int vmsvga_fifo_empty(struct vmsvga_state_s *s)
26+static inline int vmsvga_fifo_length(struct vmsvga_state_s *s)
27 {
28+ int num;
29 if (!s->config || !s->enable)
30- return 1;
31- return (s->cmd->next_cmd == s->cmd->stop);
32+ return 0;
33+ num = CMD(next_cmd) - CMD(stop);
34+ if (num < 0)
35+ num += CMD(max) - CMD(min);
36+ return num >> 2;
37 }
38
39 static inline uint32_t vmsvga_fifo_read_raw(struct vmsvga_state_s *s)
40 {
41- int offset = CMD(stop);
42+ uint32_t cmd = s->fifo[CMD(stop) >> 2];
43
44+ /* If parameter is not available in FIFO, return 0 rather than random
45+ * value. Also update the stop as missing parameter will be inserted
46+ * soonly, else it will be treated as new command next time.
47+ * With rewinding in vmsvga_fifo_run, this unlikely happen.
48+ */
49 if (unlikely(s->cmd->next_cmd == s->cmd->stop)) {
50 fprintf(stderr, "%s: FIFO empty during CMD %i\n",
51 __FUNCTION__, last_cmd);
52- return 0x00000000;
53+ cmd = 0;
54 }
55
56- s->cmd->stop = cpu_to_le32(offset + 4);
57- if (offset + 4 >= CMD(max))
58+ s->cmd->stop = cpu_to_le32(CMD(stop) + 4);
59+ if (CMD(stop) >= CMD(max))
60 s->cmd->stop = s->cmd->min;
61- return s->fifo[offset >> 2];
62+
63+ return cmd;
64 }
65
66 static inline uint32_t vmsvga_fifo_read(struct vmsvga_state_s *s)
67@@ -552,13 +562,23 @@
68 static void vmsvga_fifo_run(struct vmsvga_state_s *s)
69 {
70 uint32_t colour;
71- int args = 0;
72+ int args, len;
73 int x, y, dx, dy, width, height;
74 struct vmsvga_cursor_definition_s cursor;
75- while (!vmsvga_fifo_empty(s))
76+ uint32_t cmd_start;
77+
78+ len = vmsvga_fifo_length(s);
79+ while (len > 0) {
80+ /* May need to go back to the start of the command if incomplete */
81+ cmd_start = s->cmd->stop;
82+
83 switch (last_cmd = vmsvga_fifo_read(s)) {
84 case SVGA_CMD_UPDATE:
85 case SVGA_CMD_UPDATE_VERBOSE:
86+ len -= 5;
87+ if (len <0)
88+ goto rewind;
89+
90 x = vmsvga_fifo_read(s);
91 y = vmsvga_fifo_read(s);
92 width = vmsvga_fifo_read(s);
93@@ -567,6 +587,10 @@
94 break;
95
96 case SVGA_CMD_RECT_FILL:
97+ len -= 6;
98+ if (len < 0)
99+ goto rewind;
100+
101 colour = vmsvga_fifo_read(s);
102 x = vmsvga_fifo_read(s);
103 y = vmsvga_fifo_read(s);
104@@ -576,10 +600,15 @@
105 vmsvga_fill_rect(s, colour, x, y, width, height);
106 break;
107 #else
108+ args = 0;
109 goto badcmd;
110 #endif
111
112 case SVGA_CMD_RECT_COPY:
113+ len -= 7;
114+ if (len < 0)
115+ goto rewind;
116+
117 x = vmsvga_fifo_read(s);
118 y = vmsvga_fifo_read(s);
119 dx = vmsvga_fifo_read(s);
120@@ -590,10 +619,15 @@
121 vmsvga_copy_rect(s, x, y, dx, dy, width, height);
122 break;
123 #else
124+ args = 0;
125 goto badcmd;
126 #endif
127
128 case SVGA_CMD_DEFINE_CURSOR:
129+ len -= 8;
130+ if (len < 0)
131+ goto rewind;
132+
133 cursor.id = vmsvga_fifo_read(s);
134 cursor.hot_x = vmsvga_fifo_read(s);
135 cursor.hot_y = vmsvga_fifo_read(s);
136@@ -602,11 +636,14 @@
137 vmsvga_fifo_read(s);
138 cursor.bpp = vmsvga_fifo_read(s);
139
140+ args = SVGA_BITMAP_SIZE(x, y) + SVGA_PIXMAP_SIZE(x, y, cursor.bpp);
141 if (SVGA_BITMAP_SIZE(x, y) > sizeof cursor.mask ||
142- SVGA_PIXMAP_SIZE(x, y, cursor.bpp) > sizeof cursor.image) {
143- args = SVGA_BITMAP_SIZE(x, y) + SVGA_PIXMAP_SIZE(x, y, cursor.bpp);
144+ SVGA_PIXMAP_SIZE(x, y, cursor.bpp) > sizeof cursor.image)
145 goto badcmd;
146- }
147+
148+ len -= args;
149+ if (len < 0)
150+ goto rewind;
151
152 for (args = 0; args < SVGA_BITMAP_SIZE(x, y); args ++)
153 cursor.mask[args] = vmsvga_fifo_read_raw(s);
154@@ -625,6 +662,10 @@
155 * for so we can avoid FIFO desync if driver uses them illegally.
156 */
157 case SVGA_CMD_DEFINE_ALPHA_CURSOR:
158+ len -= 6;
159+ if (len < 0)
160+ goto rewind;
161+
162 vmsvga_fifo_read(s);
163 vmsvga_fifo_read(s);
164 vmsvga_fifo_read(s);
165@@ -639,6 +680,10 @@
166 args = 7;
167 goto badcmd;
168 case SVGA_CMD_DRAW_GLYPH_CLIPPED:
169+ len -= 4;
170+ if (len < 0)
171+ goto rewind;
172+
173 vmsvga_fifo_read(s);
174 vmsvga_fifo_read(s);
175 args = 7 + (vmsvga_fifo_read(s) >> 2);
176@@ -659,14 +704,22 @@
177 break; /* Nop */
178
179 default:
180+ args = 0;
181 badcmd:
182+ len -= args;
183+ if (len < 0)
184+ goto rewind;
185 while (args --)
186 vmsvga_fifo_read(s);
187 printf("%s: Unknown command 0x%02x in SVGA command FIFO\n",
188 __FUNCTION__, last_cmd);
189 break;
190+ rewind:
191+ s->cmd->stop = cmd_start;
192+ break;
193 }
194
195+ }
196 s->syncing = 0;
197 }
198
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/wacom-tablet-fix.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/wacom-tablet-fix.patch
new file mode 100644
index 0000000000..b8210db2b1
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.13.0/wacom-tablet-fix.patch
@@ -0,0 +1,65 @@
1qemu 0.13.0 cause seg fault in qemu_remove_mouse_event_handler, this patch from
2upstream can fix it.
3
4Should remove it in next upgrade if necessary.
5
6Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
7
8commit b2d4d8329963b13c5cebe5944dcc99f0e9d1b5c7
9Author: Gerd Hoffmann <kraxel@redhat.com>
10Date: Fri Oct 8 12:30:14 2010 +0200
11
12 wacom tablet: activate event handlers.
13
14 Add qemu_activate_mouse_event_handler() calls to the usb wavom tablet so
15 it actually receives events. Also make sure we only remove the handler
16 if we registered it before.
17
18 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
19 Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
20
21Index: qemu-0.13.0/hw/usb-wacom.c
22===================================================================
23--- qemu-0.13.0.orig/hw/usb-wacom.c 2010-10-16 04:56:09.000000000 +0800
24+++ qemu-0.13.0/hw/usb-wacom.c 2011-01-18 16:58:44.000000000 +0800
25@@ -160,6 +160,7 @@
26 if (!s->mouse_grabbed) {
27 s->eh_entry = qemu_add_mouse_event_handler(usb_mouse_event, s, 0,
28 "QEMU PenPartner tablet");
29+ qemu_activate_mouse_event_handler(s->eh_entry);
30 s->mouse_grabbed = 1;
31 }
32
33@@ -197,6 +198,7 @@
34 if (!s->mouse_grabbed) {
35 s->eh_entry = qemu_add_mouse_event_handler(usb_wacom_event, s, 1,
36 "QEMU PenPartner tablet");
37+ qemu_activate_mouse_event_handler(s->eh_entry);
38 s->mouse_grabbed = 1;
39 }
40
41@@ -334,8 +336,10 @@
42 ret = 0;
43 break;
44 case WACOM_SET_REPORT:
45- qemu_remove_mouse_event_handler(s->eh_entry);
46- s->mouse_grabbed = 0;
47+ if (s->mouse_grabbed) {
48+ qemu_remove_mouse_event_handler(s->eh_entry);
49+ s->mouse_grabbed = 0;
50+ }
51 s->mode = data[0];
52 ret = 0;
53 break;
54@@ -397,7 +401,10 @@
55 {
56 USBWacomState *s = (USBWacomState *) dev;
57
58- qemu_remove_mouse_event_handler(s->eh_entry);
59+ if (s->mouse_grabbed) {
60+ qemu_remove_mouse_event_handler(s->eh_entry);
61+ s->mouse_grabbed = 0;
62+ }
63 }
64
65 static int usb_wacom_initfn(USBDevice *dev)
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/workaround_bad_futex_headers.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/workaround_bad_futex_headers.patch
new file mode 100644
index 0000000000..a08e2d9acd
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.13.0/workaround_bad_futex_headers.patch
@@ -0,0 +1,24 @@
1---
2 linux-user/syscall.c | 10 +++++++++-
3 1 file changed, 9 insertions(+), 1 deletion(-)
4
5Index: qemu-0.13.0/linux-user/syscall.c
6===================================================================
7--- qemu-0.13.0.orig/linux-user/syscall.c 2011-01-17 16:52:18.000000000 +0800
8+++ qemu-0.13.0/linux-user/syscall.c 2011-01-17 16:52:20.000000000 +0800
9@@ -99,6 +99,15 @@
10 #define CLONE_NPTL_FLAGS2 0
11 #endif
12
13+#define FUTEX_WAIT 0
14+#define FUTEX_WAKE 1
15+#define FUTEX_FD 2
16+#define FUTEX_REQUEUE 3
17+#define FUTEX_CMP_REQUEUE 4
18+#define FUTEX_WAKE_OP 5
19+#define FUTEX_LOCK_PI 6
20+#define FUTEX_UNLOCK_PI 7
21+
22 //#define DEBUG
23
24 //#include <linux/msdos_fs.h>