summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/qemu')
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/Detect-and-use-GCC-atomic-builtins-for-locking.patch86
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/arm-bgr.patch30
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/enable-i386-linux-user.patch55
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/fallback-to-safe-mmap_min_addr.patch39
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/fix-configure-checks.patch22
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/fix-nogl.patch127
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/glflags.patch15
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/init-info.patch18
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/larger_default_ram_size.patch22
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/linker-flags.patch25
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/no-strip.patch15
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/opengl-sdl-fix.patch43
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/powerpc_rom.binbin4096 -> 0 bytes
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/qemu-git-qemugl-host.patch34368
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/qemu-vmware-vga-depth.patch118
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/qemugl-allow-glxcontext-release.patch65
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/qemugl-fix.patch74
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.14.0/spice-qxl-locking-fix-for-qemu-kvm.patch152
-rw-r--r--meta/recipes-devtools/qemu/qemu_0.14.0.bb48
19 files changed, 0 insertions, 35322 deletions
diff --git a/meta/recipes-devtools/qemu/qemu-0.14.0/Detect-and-use-GCC-atomic-builtins-for-locking.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/Detect-and-use-GCC-atomic-builtins-for-locking.patch
deleted file mode 100644
index eb107b8497..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.14.0/Detect-and-use-GCC-atomic-builtins-for-locking.patch
+++ /dev/null
@@ -1,86 +0,0 @@
1From de01f17a2cb88dc5ff53cc321342b888c33b120a Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Lo=C3=AFc=20Minier?= <lool@dooz.org>
3Date: Thu, 11 Feb 2010 17:42:33 +0100
4Subject: [PATCH] Detect and use GCC atomic builtins for locking
5
6---
7 configure | 17 +++++++++++++++++
8 qemu-lock.h | 13 +++++++++++++
9 2 files changed, 30 insertions(+), 0 deletions(-)
10
11Upstream-Status: Pending
12
13Index: qemu-0.14.0/configure
14===================================================================
15--- qemu-0.14.0.orig/configure
16+++ qemu-0.14.0/configure
17@@ -2243,6 +2243,20 @@ fi
18 ##########################################
19
20 ##########################################
21+# check if we have gcc atomic built-ins
22+gcc_atomic_builtins=no
23+cat > $TMPC << EOF
24+int main(void) {
25+ int i;
26+ __sync_lock_test_and_set(&i, 1);
27+ __sync_lock_release(&i);
28+}
29+EOF
30+if compile_prog "" ""; then
31+ gcc_atomic_builtins=yes
32+fi
33+
34+##########################################
35 # check if we have fdatasync
36
37 fdatasync=no
38@@ -2731,6 +2745,9 @@ fi
39 if test "$gcc_attribute_warn_unused_result" = "yes" ; then
40 echo "CONFIG_GCC_ATTRIBUTE_WARN_UNUSED_RESULT=y" >> $config_host_mak
41 fi
42+if test "$gcc_atomic_builtins" = "yes" ; then
43+ echo "CONFIG_GCC_ATOMIC_BUILTINS=y" >> $config_host_mak
44+fi
45 if test "$fdatasync" = "yes" ; then
46 echo "CONFIG_FDATASYNC=y" >> $config_host_mak
47 fi
48Index: qemu-0.14.0/qemu-lock.h
49===================================================================
50--- qemu-0.14.0.orig/qemu-lock.h
51+++ qemu-0.14.0/qemu-lock.h
52@@ -33,6 +33,14 @@
53
54 #else
55
56+#ifdef CONFIG_GCC_ATOMIC_BUILTINS
57+typedef int spinlock_t;
58+
59+#define SPIN_LOCK_UNLOCKED 0
60+
61+#define resetlock(p) __sync_lock_release((p))
62+#else /* CONFIG_GCC_ATOMIC_BUILTINS */
63+
64 #if defined(__hppa__)
65
66 typedef int spinlock_t[4];
67@@ -56,7 +64,11 @@ static inline void resetlock (spinlock_t
68 }
69
70 #endif
71+#endif /* !CONFIG_GCC_ATOMIC_BUILTINS */
72
73+#ifdef CONFIG_GCC_ATOMIC_BUILTINS
74+#define testandset(p) __sync_lock_test_and_set((p), 1)
75+#else /* CONFIG_GCC_ATOMIC_BUILTINS */
76 #if defined(_ARCH_PPC)
77 static inline int testandset (int *p)
78 {
79@@ -213,6 +225,7 @@ static inline int testandset (int *p)
80 #else
81 #error unimplemented CPU support
82 #endif
83+#endif /* !CONFIG_GCC_ATOMIC_BUILTINS */
84
85 #if defined(CONFIG_USER_ONLY)
86 static inline void spin_lock(spinlock_t *lock)
diff --git a/meta/recipes-devtools/qemu/qemu-0.14.0/arm-bgr.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/arm-bgr.patch
deleted file mode 100644
index a8fe65a1ea..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.14.0/arm-bgr.patch
+++ /dev/null
@@ -1,30 +0,0 @@
1After kernel commit:
2
3http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-3.0/commit/?h=meta&id=9728c1b6a724daefc413b44e10253cdbb5e06d08
4
5It appears that the emulated colours in qemu are incorrect and that
6the red and blue channels are reversed. This patch reverses that logic
7so the colours are correctly displayed on the versatile platform which
8doesn't support the BGR bit.
9
10RP 16/9/2011
11
12Upstream-Status: Pending
13
14Index: qemu-0.14.0/hw/pl110.c
15===================================================================
16--- qemu-0.14.0.orig/hw/pl110.c 2011-09-16 14:45:34.228668514 +0100
17+++ qemu-0.14.0/hw/pl110.c 2011-09-16 15:17:22.458671206 +0100
18@@ -141,7 +141,11 @@
19 fprintf(stderr, "pl110: Bad color depth\n");
20 exit(1);
21 }
22- if (s->cr & PL110_CR_BGR)
23+
24+ if (s->versatile && s->bpp == BPP_16)
25+ /* Code assumes BPP_16 == 565 and BGR is never set on the versatile in 565 mode */
26+ bpp_offset = 0;
27+ else if (s->cr & PL110_CR_BGR)
28 bpp_offset = 0;
29 else
30 bpp_offset = 18;
diff --git a/meta/recipes-devtools/qemu/qemu-0.14.0/enable-i386-linux-user.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/enable-i386-linux-user.patch
deleted file mode 100644
index bb0d6a3848..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.14.0/enable-i386-linux-user.patch
+++ /dev/null
@@ -1,55 +0,0 @@
1Enable i386-linux-user
2
3Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
4
5Upstream-Status: Inappropriate [configuration]
6
7Index: qemu-0.14.0/Makefile.target
8===================================================================
9--- qemu-0.14.0.orig/Makefile.target
10+++ qemu-0.14.0/Makefile.target
11@@ -78,8 +78,13 @@ ifeq ($(TARGET_BASE_ARCH), i386)
12 libobj-y += cpuid.o
13 endif
14 libobj-$(CONFIG_NEED_MMU) += mmu.o
15+ifndef CONFIG_LINUX_USER
16 libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o
17 libobj-$(TARGET_X86_64) += helper_opengl.o opengl_exec.o
18+else
19+libobj-$(TARGET_I386) += dummygl.o
20+libobj-$(TARGET_X86_64) += dummygl.o
21+endif #CONFIG_LINUX_USER
22 libobj-$(TARGET_ARM) += dummygl.o
23 libobj-$(TARGET_MIPS) += dummygl.o
24 libobj-$(TARGET_PPC) += dummygl.o
25Index: qemu-0.14.0/target-i386/dummygl.c
26===================================================================
27--- /dev/null
28+++ qemu-0.14.0/target-i386/dummygl.c
29@@ -0,0 +1,26 @@
30+#include <string.h>
31+#include <stdlib.h>
32+#include <assert.h>
33+#include <stdint.h>
34+#include <X11/Xlib.h>
35+#include <X11/Xutil.h>
36+
37+void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window)
38+{
39+
40+}
41+
42+void opengl_process_enable(void)
43+{
44+
45+}
46+
47+
48+void mem_opengl(uint64_t ptr)
49+{
50+
51+}
52+
53+void helper_opengl(void)
54+{
55+}
diff --git a/meta/recipes-devtools/qemu/qemu-0.14.0/fallback-to-safe-mmap_min_addr.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/fallback-to-safe-mmap_min_addr.patch
deleted file mode 100644
index 2075386b9f..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.14.0/fallback-to-safe-mmap_min_addr.patch
+++ /dev/null
@@ -1,39 +0,0 @@
1From c313f89c33217ac0e471554dace2144718f86669 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Thu, 13 May 2010 12:23:40 +0200
4Subject: [PATCH] linux-user: use default mmap_min_addr 65536 when /proc/sys/vm/mmap_min_addr cannot be read
5
6* 65536 is default at least for ubuntu and fedora.
7---
8 linux-user/main.c | 5 +++++
9 1 files changed, 5 insertions(+), 0 deletions(-)
10
11Upstream-Status: Pending
12
13Index: qemu-0.14.0/linux-user/main.c
14===================================================================
15--- qemu-0.14.0.orig/linux-user/main.c
16+++ qemu-0.14.0/linux-user/main.c
17@@ -36,6 +36,7 @@
18 #include "envlist.h"
19
20 #define DEBUG_LOGFILE "/tmp/qemu.log"
21+#define MMAP_MIN_ADDR_DEFAULT 65536
22
23 char *exec_path;
24
25@@ -3010,8 +3011,14 @@ int main(int argc, char **argv, char **e
26 if (fscanf(fp, "%lu", &tmp) == 1) {
27 mmap_min_addr = tmp;
28 qemu_log("host mmap_min_addr=0x%lx\n", mmap_min_addr);
29+ } else {
30+ qemu_log("cannot read value from /proc/sys/vm/mmap_min_addr, assuming %d\n", MMAP_MIN_ADDR_DEFAULT);
31+ mmap_min_addr = MMAP_MIN_ADDR_DEFAULT;
32 }
33 fclose(fp);
34+ } else {
35+ qemu_log("cannot open /proc/sys/vm/mmap_min_addr for reading, assuming %d\n", MMAP_MIN_ADDR_DEFAULT);
36+ mmap_min_addr = MMAP_MIN_ADDR_DEFAULT;
37 }
38 }
39
diff --git a/meta/recipes-devtools/qemu/qemu-0.14.0/fix-configure-checks.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/fix-configure-checks.patch
deleted file mode 100644
index 96881bb91b..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.14.0/fix-configure-checks.patch
+++ /dev/null
@@ -1,22 +0,0 @@
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
9Upstream-Status: Inappropriate [embedded specific]
10
11Index: qemu-0.14.0/configure
12===================================================================
13--- qemu-0.14.0.orig/configure
14+++ qemu-0.14.0/configure
15@@ -229,6 +229,7 @@ QEMU_CFLAGS="-Wstrict-prototypes -Wredun
16 QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS"
17 QEMU_CFLAGS="-D_FORTIFY_SOURCE=2 $QEMU_CFLAGS"
18 QEMU_INCLUDES="-I. -I\$(SRC_PATH)"
19+QEMU_CFLAGS="$QEMU_CFLAGS $CFLAGS"
20 LDFLAGS="-g $LDFLAGS"
21
22 # make source path absolute
diff --git a/meta/recipes-devtools/qemu/qemu-0.14.0/fix-nogl.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/fix-nogl.patch
deleted file mode 100644
index 83b2752589..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.14.0/fix-nogl.patch
+++ /dev/null
@@ -1,127 +0,0 @@
1Upstream-Status: Inappropriate [configuration]
2
3Index: qemu-0.14.0/Makefile.target
4===================================================================
5--- qemu-0.14.0.orig/Makefile.target
6+++ qemu-0.14.0/Makefile.target
7@@ -79,6 +79,12 @@ libobj-y += cpuid.o
8 endif
9 libobj-$(CONFIG_NEED_MMU) += mmu.o
10 libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o
11+libobj-$(TARGET_X86_64) += helper_opengl.o opengl_exec.o
12+libobj-$(TARGET_ARM) += dummygl.o
13+libobj-$(TARGET_MIPS) += dummygl.o
14+libobj-$(TARGET_MIPS64) += dummygl.o
15+libobj-$(TARGET_PPC) += dummygl.o
16+libobj-$(TARGET_SH4) += dummygl.o
17 libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
18
19 libobj-y += disas.o
20Index: qemu-0.14.0/target-arm/dummygl.c
21===================================================================
22--- /dev/null
23+++ qemu-0.14.0/target-arm/dummygl.c
24@@ -0,0 +1,22 @@
25+#include <string.h>
26+#include <stdlib.h>
27+#include <assert.h>
28+#include <stdint.h>
29+#include <X11/Xlib.h>
30+#include <X11/Xutil.h>
31+
32+void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window)
33+{
34+
35+}
36+
37+void opengl_process_enable(void)
38+{
39+
40+}
41+
42+
43+void mem_opengl(uint64_t ptr)
44+{
45+
46+}
47Index: qemu-0.14.0/target-mips/dummygl.c
48===================================================================
49--- /dev/null
50+++ qemu-0.14.0/target-mips/dummygl.c
51@@ -0,0 +1,22 @@
52+#include <string.h>
53+#include <stdlib.h>
54+#include <assert.h>
55+#include <stdint.h>
56+#include <X11/Xlib.h>
57+#include <X11/Xutil.h>
58+
59+void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window)
60+{
61+
62+}
63+
64+void opengl_process_enable(void)
65+{
66+
67+}
68+
69+
70+void mem_opengl(uint64_t ptr)
71+{
72+
73+}
74Index: qemu-0.14.0/target-ppc/dummygl.c
75===================================================================
76--- /dev/null
77+++ qemu-0.14.0/target-ppc/dummygl.c
78@@ -0,0 +1,22 @@
79+#include <string.h>
80+#include <stdlib.h>
81+#include <assert.h>
82+#include <stdint.h>
83+#include <X11/Xlib.h>
84+#include <X11/Xutil.h>
85+
86+void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window)
87+{
88+
89+}
90+
91+void opengl_process_enable(void)
92+{
93+
94+}
95+
96+
97+void mem_opengl(uint64_t ptr)
98+{
99+
100+}
101Index: qemu-0.14.0/target-sh4/dummygl.c
102===================================================================
103--- /dev/null
104+++ qemu-0.14.0/target-sh4/dummygl.c
105@@ -0,0 +1,22 @@
106+#include <string.h>
107+#include <stdlib.h>
108+#include <assert.h>
109+#include <stdint.h>
110+#include <X11/Xlib.h>
111+#include <X11/Xutil.h>
112+
113+void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window)
114+{
115+
116+}
117+
118+void opengl_process_enable(void)
119+{
120+
121+}
122+
123+
124+void mem_opengl(uint64_t ptr)
125+{
126+
127+}
diff --git a/meta/recipes-devtools/qemu/qemu-0.14.0/glflags.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/glflags.patch
deleted file mode 100644
index 0ad5551d47..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.14.0/glflags.patch
+++ /dev/null
@@ -1,15 +0,0 @@
1Upstream-Status: Inappropriate [configuration]
2
3Index: qemu-0.14.0/Makefile.target
4===================================================================
5--- qemu-0.14.0.orig/Makefile.target 2011-04-04 12:12:19.142871742 +0100
6+++ qemu-0.14.0/Makefile.target 2011-04-04 12:12:21.772871742 +0100
7@@ -362,7 +362,7 @@
8
9 monitor.o: hmp-commands.h qmp-commands.h
10
11-LIBS += -lGL -lGLU
12+LIBS += -lGL
13
14 $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
15
diff --git a/meta/recipes-devtools/qemu/qemu-0.14.0/init-info.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/init-info.patch
deleted file mode 100644
index 2250444a2b..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.14.0/init-info.patch
+++ /dev/null
@@ -1,18 +0,0 @@
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
5Upstream-Status: Pending
6
7Index: qemu-0.14.0/ui/sdl.c
8===================================================================
9--- qemu-0.14.0.orig/ui/sdl.c
10+++ qemu-0.14.0/ui/sdl.c
11@@ -863,6 +863,7 @@ void sdl_display_init(DisplayState *ds,
12 vi = SDL_GetVideoInfo();
13 host_format = *(vi->vfmt);
14
15+ bzero(&info, sizeof(info));
16 SDL_GetWMInfo(&info);
17 if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display)
18 opengl_exec_set_parent_window(info.info.x11.display,
diff --git a/meta/recipes-devtools/qemu/qemu-0.14.0/larger_default_ram_size.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/larger_default_ram_size.patch
deleted file mode 100644
index 711c36071d..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.14.0/larger_default_ram_size.patch
+++ /dev/null
@@ -1,22 +0,0 @@
1This patch is taken from debian. 128M is too less sometimes if distro
2with lot of packages is booted so this patch raises the default to 384M
3
4It has not been applied to upstream qemu
5
6Khem Raj <raj.khem@gmail.com>
7
8Upstream-Status: Pending
9
10Index: qemu-0.14.0/vl.c
11===================================================================
12--- qemu-0.14.0.orig/vl.c
13+++ qemu-0.14.0/vl.c
14@@ -168,7 +168,7 @@ int main(int argc, char **argv)
15 //#define DEBUG_NET
16 //#define DEBUG_SLIRP
17
18-#define DEFAULT_RAM_SIZE 128
19+#define DEFAULT_RAM_SIZE 384
20
21 #define MAX_VIRTIO_CONSOLES 1
22
diff --git a/meta/recipes-devtools/qemu/qemu-0.14.0/linker-flags.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/linker-flags.patch
deleted file mode 100644
index c0d1e5541d..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.14.0/linker-flags.patch
+++ /dev/null
@@ -1,25 +0,0 @@
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
10
11Upstream-Status: Inappropriate [configuration]
12
13Index: qemu-0.14.0/Makefile.target
14===================================================================
15--- qemu-0.14.0.orig/Makefile.target
16+++ qemu-0.14.0/Makefile.target
17@@ -218,7 +218,7 @@ obj-$(CONFIG_REALLY_VIRTFS) += virtio-9p
18 obj-y += rwhandler.o
19 obj-$(CONFIG_KVM) += kvm.o kvm-all.o
20 obj-$(CONFIG_NO_KVM) += kvm-stub.o
21-LIBS+=-lz
22+LIBS+=-lz -lX11 -ldl
23
24 QEMU_CFLAGS += $(VNC_TLS_CFLAGS)
25 QEMU_CFLAGS += $(VNC_SASL_CFLAGS)
diff --git a/meta/recipes-devtools/qemu/qemu-0.14.0/no-strip.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/no-strip.patch
deleted file mode 100644
index d6a4377cd0..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.14.0/no-strip.patch
+++ /dev/null
@@ -1,15 +0,0 @@
1Upstream-Status: Inappropriate [configuration]
2
3Index: qemu-0.14.0/Makefile
4===================================================================
5--- qemu-0.14.0.orig/Makefile
6+++ qemu-0.14.0/Makefile
7@@ -235,7 +235,7 @@ install-sysconfig:
8 install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig
9 $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
10 ifneq ($(TOOLS),)
11- $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
12+ $(INSTALL_PROG) $(TOOLS) "$(DESTDIR)$(bindir)"
13 endif
14 ifneq ($(BLOBS),)
15 $(INSTALL_DIR) "$(DESTDIR)$(datadir)"
diff --git a/meta/recipes-devtools/qemu/qemu-0.14.0/opengl-sdl-fix.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/opengl-sdl-fix.patch
deleted file mode 100644
index e73bb7bfe9..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.14.0/opengl-sdl-fix.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1Upstream-Status: Inappropriate [configuration]
2
3diff -u -r qemu-0.14.0/Makefile.target qemu-0.14.0-fixed/Makefile.target
4--- qemu-0.14.0/Makefile.target 2011-04-26 21:22:17.627637741 -0700
5+++ qemu-0.14.0-fixed/Makefile.target 2011-04-26 21:23:02.767637747 -0700
6@@ -82,8 +82,10 @@
7 libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o
8 libobj-$(TARGET_X86_64) += helper_opengl.o opengl_exec.o
9 else
10+ifdef CONFIG_SDL
11 libobj-$(TARGET_I386) += dummygl.o
12 libobj-$(TARGET_X86_64) += dummygl.o
13+endif
14 endif #CONFIG_LINUX_USER
15 libobj-$(TARGET_ARM) += dummygl.o
16 libobj-$(TARGET_MIPS) += dummygl.o
17Only in qemu-0.14.0-fixed: config.log
18diff -u -r qemu-0.14.0/target-i386/helper.h qemu-0.14.0-fixed/target-i386/helper.h
19--- qemu-0.14.0/target-i386/helper.h 2011-04-26 21:22:11.418637742 -0700
20+++ qemu-0.14.0-fixed/target-i386/helper.h 2011-04-26 21:23:02.539637747 -0700
21@@ -217,6 +217,9 @@
22 DEF_HELPER_2(rcrq, tl, tl, tl)
23 #endif
24
25+#ifdef CONFIG_SDL
26 DEF_HELPER_0(opengl, void)
27+#endif
28+
29
30 #include "def-helper.h"
31diff -u -r qemu-0.14.0/target-i386/translate.c qemu-0.14.0-fixed/target-i386/translate.c
32--- qemu-0.14.0/target-i386/translate.c 2011-04-26 21:22:21.600637743 -0700
33+++ qemu-0.14.0-fixed/target-i386/translate.c 2011-04-26 21:23:02.538637747 -0700
34@@ -2659,7 +2659,7 @@
35 static void gen_interrupt(DisasContext *s, int intno,
36 target_ulong cur_eip, target_ulong next_eip)
37 {
38-#if !defined(CONFIG_USER_ONLY)
39+#if !defined(CONFIG_USER_ONLY) && defined(CONFIG_SDL)
40 if (enable_gl && intno == 0x99) {
41 gen_helper_opengl();
42 return;
43
diff --git a/meta/recipes-devtools/qemu/qemu-0.14.0/powerpc_rom.bin b/meta/recipes-devtools/qemu/qemu-0.14.0/powerpc_rom.bin
deleted file mode 100644
index c4044296c5..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.14.0/powerpc_rom.bin
+++ /dev/null
Binary files differ
diff --git a/meta/recipes-devtools/qemu/qemu-0.14.0/qemu-git-qemugl-host.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/qemu-git-qemugl-host.patch
deleted file mode 100644
index 4fb972a60b..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.14.0/qemu-git-qemugl-host.patch
+++ /dev/null
@@ -1,34368 +0,0 @@
1Upstream-Status: Inappropriate [other] - qemugl patch need huge changes for upstream
2
3Index: qemu-0.14.0/Makefile.target
4===================================================================
5--- qemu-0.14.0.orig/Makefile.target
6+++ qemu-0.14.0/Makefile.target
7@@ -78,6 +78,7 @@ ifeq ($(TARGET_BASE_ARCH), i386)
8 libobj-y += cpuid.o
9 endif
10 libobj-$(CONFIG_NEED_MMU) += mmu.o
11+libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o
12 libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
13
14 libobj-y += disas.o
15@@ -100,6 +101,21 @@ op_helper.o cpu-exec.o: QEMU_CFLAGS += $
16 # cpu_signal_handler() in cpu-exec.c.
17 signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
18
19+parse_gl_h: parse_gl_h.c
20+ $(HOST_CC) -g -o $@ $<
21+server_stub.c: parse_gl_h
22+ ./parse_gl_h
23+gl_func.h: parse_gl_h
24+ ./parse_gl_h
25+GL_CFLAGS := -Wall -g -O2 -fno-strict-aliasing
26+opengl_func.h: gl_func.h
27+helper_opengl.o: helper_opengl.c opengl_func.h server_stub.c
28+ $(CC) $(GL_CFLAGS) $(DEFINES) -c -o $@ $< -I.. -I. -I../fpu -I../target-i386 -DNEED_CPU_H
29+gl_beginend.h: ../target-i386/beginend_funcs.sh
30+ $< > $@
31+opengl_exec.o : opengl_exec.c server_stub.c gl_func.h opengl_func.h gl_beginend.h
32+ $(CC) $(GL_CFLAGS) $(DEFINES) -c -o $@ $< -I. -I../target-i386
33+
34 #########################################################
35 # Linux user emulator target
36
37@@ -221,6 +237,10 @@ obj-i386-y += debugcon.o multiboot.o
38 obj-i386-y += pc_piix.o
39 obj-i386-$(CONFIG_SPICE) += qxl.o qxl-logger.o qxl-render.o
40
41+ifeq ($(TARGET_BASE_ARCH), i386)
42+QEMU_CFLAGS += -DTARGET_OPENGL_OK
43+endif
44+
45 # shared objects
46 obj-ppc-y = ppc.o
47 obj-ppc-y += vga.o
48@@ -331,6 +351,8 @@ main.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
49
50 monitor.o: hmp-commands.h qmp-commands.h
51
52+LIBS += -lGL -lGLU
53+
54 $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
55
56 obj-y += $(addprefix ../, $(common-obj-y))
57Index: qemu-0.14.0/hw/pixel_ops.h
58===================================================================
59--- qemu-0.14.0.orig/hw/pixel_ops.h
60+++ qemu-0.14.0/hw/pixel_ops.h
61@@ -4,6 +4,12 @@ static inline unsigned int rgb_to_pixel8
62 return ((r >> 5) << 5) | ((g >> 5) << 2) | (b >> 6);
63 }
64
65+static inline unsigned int rgb_to_pixel8bgr(unsigned int r, unsigned int g,
66+ unsigned int b)
67+{
68+ return ((b >> 5) << 5) | ((g >> 5) << 2) | (r >> 6);
69+}
70+
71 static inline unsigned int rgb_to_pixel15(unsigned int r, unsigned int g,
72 unsigned int b)
73 {
74Index: qemu-0.14.0/hw/vmware_vga.c
75===================================================================
76--- qemu-0.14.0.orig/hw/vmware_vga.c
77+++ qemu-0.14.0/hw/vmware_vga.c
78@@ -517,6 +517,8 @@ static inline void vmsvga_cursor_define(
79
80 #define CMD(f) le32_to_cpu(s->cmd->f)
81
82+static uint32_t last_cmd;
83+
84 static inline int vmsvga_fifo_length(struct vmsvga_state_s *s)
85 {
86 int num;
87@@ -530,11 +532,18 @@ static inline int vmsvga_fifo_length(str
88
89 static inline uint32_t vmsvga_fifo_read_raw(struct vmsvga_state_s *s)
90 {
91- uint32_t cmd = s->fifo[CMD(stop) >> 2];
92- s->cmd->stop = cpu_to_le32(CMD(stop) + 4);
93- if (CMD(stop) >= CMD(max))
94+ int offset = CMD(stop);
95+
96+ if (unlikely(s->cmd->next_cmd == s->cmd->stop)) {
97+ fprintf(stderr, "%s: FIFO empty during CMD %i\n",
98+ __FUNCTION__, last_cmd);
99+ return 0x00000000;
100+ }
101+
102+ s->cmd->stop = cpu_to_le32(offset + 4);
103+ if (offset + 4 >= CMD(max))
104 s->cmd->stop = s->cmd->min;
105- return cmd;
106+ return s->fifo[offset >> 2];
107 }
108
109 static inline uint32_t vmsvga_fifo_read(struct vmsvga_state_s *s)
110@@ -544,7 +553,7 @@ static inline uint32_t vmsvga_fifo_read(
111
112 static void vmsvga_fifo_run(struct vmsvga_state_s *s)
113 {
114- uint32_t cmd, colour;
115+ uint32_t colour;
116 int args, len;
117 int x, y, dx, dy, width, height;
118 struct vmsvga_cursor_definition_s cursor;
119@@ -555,7 +564,7 @@ static void vmsvga_fifo_run(struct vmsvg
120 /* May need to go back to the start of the command if incomplete */
121 cmd_start = s->cmd->stop;
122
123- switch (cmd = vmsvga_fifo_read(s)) {
124+ switch (last_cmd = vmsvga_fifo_read(s)) {
125 case SVGA_CMD_UPDATE:
126 case SVGA_CMD_UPDATE_VERBOSE:
127 len -= 5;
128@@ -695,7 +704,7 @@ static void vmsvga_fifo_run(struct vmsvg
129 while (args --)
130 vmsvga_fifo_read(s);
131 printf("%s: Unknown command 0x%02x in SVGA command FIFO\n",
132- __FUNCTION__, cmd);
133+ __FUNCTION__, last_cmd);
134 break;
135
136 rewind:
137@@ -1216,6 +1225,11 @@ static void vmsvga_init(struct vmsvga_st
138 vga_common_init(&s->vga, vga_ram_size);
139 vga_init(&s->vga);
140 vmstate_register(NULL, 0, &vmstate_vga_common, &s->vga);
141+#ifdef EMBED_STDVGA
142+ s->vga.map_addr = VBE_DISPI_LFB_PHYSICAL_ADDRESS;
143+ s->vga.map_end = VBE_DISPI_LFB_PHYSICAL_ADDRESS + vga_ram_size;
144+ vga_dirty_log_start(s);
145+#endif
146
147 vmsvga_reset(s);
148 }
149Index: qemu-0.14.0/qemu-char.c
150===================================================================
151--- qemu-0.14.0.orig/qemu-char.c
152+++ qemu-0.14.0/qemu-char.c
153@@ -2334,6 +2334,69 @@ size_t qemu_chr_mem_osize(const CharDriv
154 return d->outbuf_size;
155 }
156
157+#define TARGET_OPENGL_OK
158+#if defined(TARGET_OPENGL_OK)
159+static uint8_t buffer[32];
160+static int buffer_len;
161+static int hexdigit[128] = {
162+ ['0'] = 0x0,
163+ ['1'] = 0x1,
164+ ['2'] = 0x2,
165+ ['3'] = 0x3,
166+ ['4'] = 0x4,
167+ ['5'] = 0x5,
168+ ['6'] = 0x6,
169+ ['7'] = 0x7,
170+ ['8'] = 0x8,
171+ ['9'] = 0x9,
172+ ['a'] = 0xa,
173+ ['b'] = 0xb,
174+ ['c'] = 0xc,
175+ ['d'] = 0xd,
176+ ['e'] = 0xe,
177+ ['f'] = 0xf,
178+};
179+
180+static int opengl_chr_write(CharDriverState *chr, const uint8_t *buf, int len)
181+{
182+ uint64_t ptr = 0;
183+ int i;
184+
185+ if (memchr(buf, 'x', len))
186+ opengl_process_enable();
187+ return len;
188+ memcpy(buffer + buffer_len, buf, len);
189+ buffer_len += len;
190+
191+ if (buffer_len >= 16) {
192+ for (i = 0; i < 16; i ++)
193+ ptr = (ptr << 4) + hexdigit[buffer[i]];
194+
195+ buffer_len -= 16;
196+ if (buffer_len)
197+ memcpy(buffer, buffer + 16, buffer_len);
198+
199+ mem_opengl(ptr);
200+ }
201+
202+ return len;
203+}
204+
205+CharDriverState *qemu_chr_open_opengl(void)
206+{
207+ CharDriverState *chr = qemu_mallocz(sizeof(CharDriverState));
208+
209+ chr->opaque = chr;
210+ chr->chr_write = opengl_chr_write;
211+
212+ qemu_chr_generic_open(chr);
213+
214+ return chr;
215+}
216+#else
217+#define qemu_chr_open_opengl() 0
218+#endif
219+
220 QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)
221 {
222 char host[65], port[33], width[8], height[8];
223@@ -2452,6 +2515,10 @@ QemuOpts *qemu_chr_parse_compat(const ch
224 qemu_opt_set(opts, "path", filename);
225 return opts;
226 }
227+ if (!strcmp(filename, "opengl")){
228+ qemu_opt_set(opts, "backend", "opengl");
229+ return opts;
230+ }
231
232 fail:
233 qemu_opts_del(opts);
234@@ -2467,6 +2534,7 @@ static const struct {
235 { .name = "udp", .open = qemu_chr_open_udp },
236 { .name = "msmouse", .open = qemu_chr_open_msmouse },
237 { .name = "vc", .open = text_console_init },
238+ { .name = "opengl", .open = qemu_chr_open_opengl },
239 #ifdef _WIN32
240 { .name = "file", .open = qemu_chr_open_win_file_out },
241 { .name = "pipe", .open = qemu_chr_open_win_pipe },
242Index: qemu-0.14.0/slirp/udp.c
243===================================================================
244--- qemu-0.14.0.orig/slirp/udp.c
245+++ qemu-0.14.0/slirp/udp.c
246@@ -40,6 +40,7 @@
247
248 #include <slirp.h>
249 #include "ip_icmp.h"
250+#include "bswap.h"
251
252 static uint8_t udp_tos(struct socket *so);
253
254@@ -125,6 +126,11 @@ udp_input(register struct mbuf *m, int i
255 goto bad;
256 }
257
258+ if (ntohs(uh->uh_dport) == 9999 && m->m_len - iphlen == 16) {
259+ mem_opengl(le64_to_cpup((uint64_t *) (m->m_data + iphlen + 8)));
260+ goto bad;
261+ }
262+
263 if (slirp->restricted) {
264 goto bad;
265 }
266Index: qemu-0.14.0/sysemu.h
267===================================================================
268--- qemu-0.14.0.orig/sysemu.h
269+++ qemu-0.14.0/sysemu.h
270@@ -136,6 +136,7 @@ extern int semihosting_enabled;
271 extern int old_param;
272 extern int boot_menu;
273 extern QEMUClock *rtc_clock;
274+extern int force_pointer;
275
276 #define MAX_NODES 64
277 extern int nb_numa_nodes;
278Index: qemu-0.14.0/target-i386/beginend_funcs.sh
279===================================================================
280--- /dev/null
281+++ qemu-0.14.0/target-i386/beginend_funcs.sh
282@@ -0,0 +1,23 @@
283+#! /bin/bash
284+# Copyright 2008 (C) Intel Corporation
285+#
286+# echo names of functions that are legal between a glBegin and glEnd pair.
287+echo -e MAGIC_MACRO\(glVertex{2,3,4}{s,i,f,d}{,v}\)\\n
288+echo -e MAGIC_MACRO\(glTexCoord{1,2,3,4}{s,i,f,d}{,v}\)\\n
289+echo -e MAGIC_MACRO\(glMultiTexCoord{1,2,3,4}{s,i,f,d}{,v}\)\\n
290+echo -e MAGIC_MACRO\(glNormal3{b,s,i,f,d}{,v}\)\\n
291+echo -e MAGIC_MACRO\(glFogCoord{f,d}{,v}\)\\n
292+echo -e MAGIC_MACRO\(glColor{3,4}{b,s,i,f,d,ub,us,ui}{,v}\)\\n
293+echo -e MAGIC_MACRO\(glSecondaryColor3{b,s,i,f,d,ub,us,ui}{,v}\)\\n
294+echo -e MAGIC_MACRO\(glIndex{s,i,f,d,ub}{,v}\)\\n
295+echo -e MAGIC_MACRO\(glVertexAttrib{1,2,3,4}{s,f,d}{,v}\)\\n
296+echo -e MAGIC_MACRO\(glVertexAttrib4{b,i,ub,us,ui}v\)\\n
297+echo -e MAGIC_MACRO\(glVertexAttrib4Nub\)\\n
298+echo -e MAGIC_MACRO\(glVertexAttrib4N{b,s,i,ub,us,ui}v\)\\n
299+echo -e MAGIC_MACRO\(glArrayElement\)\\n
300+echo -e MAGIC_MACRO\(glEvalCoord{1,2}{f,d}{,v}\)\\n
301+echo -e MAGIC_MACRO\(glEvalPoint{1,2}\)\\n
302+echo -e MAGIC_MACRO\(glMaterial{i,f}{,v}\)\\n
303+echo -e MAGIC_MACRO\(glCallList\)\\n
304+echo -e MAGIC_MACRO\(glCallLists\)\\n
305+echo -e MAGIC_MACRO\(glEdgeFlag{,v}\)\\n
306Index: qemu-0.14.0/target-i386/ghash.c
307===================================================================
308--- /dev/null
309+++ qemu-0.14.0/target-i386/ghash.c
310@@ -0,0 +1,347 @@
311+/* This is a modified and simplified version of original ghash.c */
312+
313+/* GLIB - Library of useful routines for C programming
314+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
315+ *
316+ * This library is free software; you can redistribute it and/or
317+ * modify it under the terms of the GNU Lesser General Public
318+ * License as published by the Free Software Foundation; either
319+ * version 2 of the License, or (at your option) any later version.
320+ *
321+ * This library is distributed in the hope that it will be useful,
322+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
323+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
324+ * Lesser General Public License for more details.
325+ *
326+ * You should have received a copy of the GNU Lesser General Public
327+ * License along with this library; if not, write to the
328+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
329+ * Boston, MA 02111-1307, USA.
330+ */
331+
332+/*
333+ * Modified by the GLib Team and others 1997-2000. See the AUTHORS
334+ * file for a list of people on the GLib Team. See the ChangeLog
335+ * files for a list of changes. These files are distributed with
336+ * GLib at ftp://ftp.gtk.org/pub/gtk/.
337+ */
338+
339+
340+#include <stdlib.h>
341+
342+#include "ghash.h"
343+
344+#define HASH_TABLE_MIN_SIZE 11
345+#define HASH_TABLE_MAX_SIZE 13845163
346+
347+#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
348+
349+
350+typedef struct _SimpleHashNode SimpleHashNode;
351+
352+struct _SimpleHashNode
353+{
354+ int key;
355+ void* value;
356+ SimpleHashNode *next;
357+};
358+
359+struct _SimpleHashTable
360+{
361+ int size;
362+ int nnodes;
363+ SimpleHashNode **nodes;
364+ SimpleDestroyNotify value_destroy_func;
365+};
366+
367+static const unsigned int simple_primes[] =
368+{
369+ 11,
370+ 19,
371+ 37,
372+ 73,
373+ 109,
374+ 163,
375+ 251,
376+ 367,
377+ 557,
378+ 823,
379+ 1237,
380+ 1861,
381+ 2777,
382+ 4177,
383+ 6247,
384+ 9371,
385+ 14057,
386+ 21089,
387+ 31627,
388+ 47431,
389+ 71143,
390+ 106721,
391+ 160073,
392+ 240101,
393+ 360163,
394+ 540217,
395+ 810343,
396+ 1215497,
397+ 1823231,
398+ 2734867,
399+ 4102283,
400+ 6153409,
401+ 9230113,
402+ 13845163,
403+};
404+
405+static const unsigned int simple_nprimes = sizeof (simple_primes) / sizeof (simple_primes[0]);
406+
407+unsigned int simple_spaced_primes_closest (unsigned int num)
408+{
409+ int i;
410+
411+ for (i = 0; i < simple_nprimes; i++)
412+ if (simple_primes[i] > num)
413+ return simple_primes[i];
414+
415+ return simple_primes[simple_nprimes - 1];
416+}
417+
418+#define HASH_TABLE_RESIZE(hash_table) \
419+ do { \
420+ if ((hash_table->size >= 3 * hash_table->nnodes && \
421+ hash_table->size > HASH_TABLE_MIN_SIZE) || \
422+ (3 * hash_table->size <= hash_table->nnodes && \
423+ hash_table->size < HASH_TABLE_MAX_SIZE)) \
424+ simple_hash_table_resize (hash_table); \
425+ } while(0)
426+
427+static void simple_hash_table_resize (SimpleHashTable *hash_table);
428+static SimpleHashNode** simple_hash_table_lookup_node (SimpleHashTable *hash_table,
429+ int key);
430+static SimpleHashNode* simple_hash_node_new (int key,
431+ void* value);
432+static void simple_hash_nodes_destroy (SimpleHashNode *hash_node,
433+ SimpleDestroyNotify value_destroy_func);
434+
435+
436+#define alloc0(type, n) (type*)calloc(n, sizeof(type))
437+
438+SimpleHashTable*
439+simple_hash_table_new (SimpleDestroyNotify value_destroy_func)
440+{
441+ SimpleHashTable *hash_table;
442+
443+ hash_table = alloc0(SimpleHashTable, 1);
444+ hash_table->size = HASH_TABLE_MIN_SIZE;
445+ hash_table->nnodes = 0;
446+ hash_table->value_destroy_func = value_destroy_func;
447+ hash_table->nodes = alloc0 (SimpleHashNode*, hash_table->size);
448+
449+ return hash_table;
450+}
451+
452+SimpleHashTable* simple_hash_table_clone(SimpleHashTable *hash_table,
453+ SimpleCloneValue clone_value_func)
454+{
455+ SimpleHashTable *hash_table_new;
456+ SimpleHashNode *new_node;
457+ SimpleHashNode *node;
458+ int i;
459+
460+ hash_table_new = alloc0 (SimpleHashTable, 1);
461+ hash_table_new->size = hash_table->size;
462+ hash_table_new->nnodes = hash_table->nnodes;
463+ hash_table_new->value_destroy_func = hash_table->value_destroy_func;
464+ hash_table_new->nodes = alloc0 (SimpleHashNode*, hash_table_new->size);
465+ for (i = 0; i < hash_table->size; i++)
466+ {
467+ node = hash_table->nodes[i];
468+ while(node)
469+ {
470+ SimpleHashNode *next = hash_table_new->nodes[i];
471+ new_node = simple_hash_node_new(node->key,
472+ (clone_value_func)? clone_value_func(node->value) : node->value);
473+ new_node->next = next;
474+ hash_table_new->nodes[i] = new_node;
475+ node = node->next;
476+ }
477+ }
478+ return hash_table_new;
479+}
480+
481+void
482+simple_hash_table_destroy (SimpleHashTable *hash_table)
483+{
484+ int i;
485+
486+ for (i = 0; i < hash_table->size; i++)
487+ {
488+ simple_hash_nodes_destroy (hash_table->nodes[i],
489+ hash_table->value_destroy_func);
490+ hash_table->nodes[i] = NULL;
491+ }
492+ free (hash_table->nodes);
493+ free (hash_table);
494+}
495+
496+static inline SimpleHashNode**
497+simple_hash_table_lookup_node (SimpleHashTable *hash_table,
498+ int key)
499+{
500+ SimpleHashNode **node;
501+
502+ node = &hash_table->nodes[(unsigned int)key % hash_table->size];
503+ while (*node && (*node)->key != key)
504+ node = &(*node)->next;
505+
506+ return node;
507+}
508+
509+void*
510+simple_hash_table_lookup (SimpleHashTable *hash_table, int key)
511+{
512+ SimpleHashNode *node;
513+
514+ node = *simple_hash_table_lookup_node (hash_table, key);
515+
516+ return node ? node->value : NULL;
517+}
518+
519+void**
520+simple_hash_table_lookup_pointer (SimpleHashTable *hash_table, int key)
521+{
522+ SimpleHashNode *node;
523+
524+ node = *simple_hash_table_lookup_node (hash_table, key);
525+
526+ return node ? &node->value : NULL;
527+}
528+
529+
530+void
531+simple_hash_table_insert (SimpleHashTable *hash_table,
532+ int key,
533+ void* value)
534+{
535+ SimpleHashNode **node;
536+
537+ node = simple_hash_table_lookup_node (hash_table, key);
538+
539+ if (*node)
540+ {
541+ /* do not reset node->key in this place, keeping
542+ * the old key is the intended behaviour.
543+ * simple_hash_table_replace() can be used instead.
544+ */
545+ if (hash_table->value_destroy_func)
546+ hash_table->value_destroy_func ((*node)->value);
547+
548+ (*node)->value = value;
549+ }
550+ else
551+ {
552+ *node = simple_hash_node_new (key, value);
553+ hash_table->nnodes++;
554+ HASH_TABLE_RESIZE (hash_table);
555+ }
556+}
557+int
558+simple_hash_table_remove (SimpleHashTable *hash_table,
559+ int key)
560+{
561+ SimpleHashNode **node, *dest;
562+
563+ node = simple_hash_table_lookup_node (hash_table, key);
564+ if (*node)
565+ {
566+ dest = *node;
567+ (*node) = dest->next;
568+ if (hash_table->value_destroy_func)
569+ hash_table->value_destroy_func (dest->value);
570+ free (dest);
571+ hash_table->nnodes--;
572+
573+ HASH_TABLE_RESIZE (hash_table);
574+
575+ return 1;
576+ }
577+
578+ return 0;
579+}
580+
581+
582+void
583+simple_hash_table_foreach (SimpleHashTable *hash_table,
584+ SimpleHFunc func,
585+ void* user_data)
586+{
587+ SimpleHashNode *node;
588+ int i;
589+
590+ for (i = 0; i < hash_table->size; i++)
591+ for (node = hash_table->nodes[i]; node; node = node->next)
592+ (* func) (node->key, node->value, user_data);
593+}
594+
595+unsigned int
596+simple_hash_table_size (SimpleHashTable *hash_table)
597+{
598+ return hash_table->nnodes;
599+}
600+
601+static void
602+simple_hash_table_resize (SimpleHashTable *hash_table)
603+{
604+ SimpleHashNode **new_nodes;
605+ SimpleHashNode *node;
606+ SimpleHashNode *next;
607+ unsigned int hash_val;
608+ int new_size;
609+ int i;
610+
611+ new_size = simple_spaced_primes_closest (hash_table->nnodes);
612+ new_size = CLAMP (new_size, HASH_TABLE_MIN_SIZE, HASH_TABLE_MAX_SIZE);
613+
614+ new_nodes = alloc0 (SimpleHashNode*, new_size);
615+
616+ for (i = 0; i < hash_table->size; i++)
617+ for (node = hash_table->nodes[i]; node; node = next)
618+ {
619+ next = node->next;
620+
621+ hash_val = (unsigned int)(node->key) % new_size;
622+
623+ node->next = new_nodes[hash_val];
624+ new_nodes[hash_val] = node;
625+ }
626+
627+ free (hash_table->nodes);
628+ hash_table->nodes = new_nodes;
629+ hash_table->size = new_size;
630+}
631+
632+static SimpleHashNode*
633+simple_hash_node_new (int key,
634+ void* value)
635+{
636+ SimpleHashNode *hash_node = alloc0 (SimpleHashNode, 1);
637+
638+ hash_node->key = key;
639+ hash_node->value = value;
640+ hash_node->next = NULL;
641+
642+ return hash_node;
643+}
644+
645+static void
646+simple_hash_nodes_destroy (SimpleHashNode *hash_node,
647+ SimpleDestroyNotify value_destroy_func)
648+{
649+ while (hash_node)
650+ {
651+ SimpleHashNode *next = hash_node->next;
652+ if (value_destroy_func)
653+ value_destroy_func (hash_node->value);
654+ free (hash_node);
655+ hash_node = next;
656+ }
657+}
658Index: qemu-0.14.0/target-i386/ghash.h
659===================================================================
660--- /dev/null
661+++ qemu-0.14.0/target-i386/ghash.h
662@@ -0,0 +1,59 @@
663+/* This is a modified and simplified version of original ghash.h */
664+
665+
666+/* GLIB - Library of useful routines for C programming
667+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
668+ *
669+ * This library is free software; you can redistribute it and/or
670+ * modify it under the terms of the GNU Lesser General Public
671+ * License as published by the Free Software Foundation; either
672+ * version 2 of the License, or (at your option) any later version.
673+ *
674+ * This library is distributed in the hope that it will be useful,
675+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
676+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
677+ * Lesser General Public License for more details.
678+ *
679+ * You should have received a copy of the GNU Lesser General Public
680+ * License along with this library; if not, write to the
681+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
682+ * Boston, MA 02111-1307, USA.
683+ */
684+
685+/*
686+ * Modified by the GLib Team and others 1997-2000. See the AUTHORS
687+ * file for a list of people on the GLib Team. See the ChangeLog
688+ * files for a list of changes. These files are distributed with
689+ * GLib at ftp://ftp.gtk.org/pub/gtk/.
690+ */
691+
692+#ifndef __SIMPLE_HASH_H__
693+#define __SIMPLE_HASH_H__
694+
695+typedef struct _SimpleHashTable SimpleHashTable;
696+
697+typedef void (*SimpleDestroyNotify)(void*);
698+typedef void (*SimpleHFunc)(int key, void* value, void* user_data);
699+typedef void* (*SimpleCloneValue)(void* value);
700+
701+/* Hash tables
702+ */
703+SimpleHashTable* simple_hash_table_new (SimpleDestroyNotify value_destroy_func);
704+SimpleHashTable* simple_hash_table_clone(SimpleHashTable *hash_table,
705+ SimpleCloneValue clone_value_func);
706+void simple_hash_table_destroy (SimpleHashTable *hash_table);
707+void simple_hash_table_insert (SimpleHashTable *hash_table,
708+ int key,
709+ void* value);
710+int simple_hash_table_remove (SimpleHashTable *hash_table,
711+ int key);
712+void* simple_hash_table_lookup (SimpleHashTable *hash_table,
713+ int key);
714+void** simple_hash_table_lookup_pointer (SimpleHashTable *hash_table, int key);
715+void simple_hash_table_foreach (SimpleHashTable *hash_table,
716+ SimpleHFunc func,
717+ void* user_data);
718+unsigned int simple_hash_table_size (SimpleHashTable *hash_table);
719+
720+#endif /* __SIMPLE_HASH_H__ */
721+
722Index: qemu-0.14.0/target-i386/gl_func_perso.h
723===================================================================
724--- /dev/null
725+++ qemu-0.14.0/target-i386/gl_func_perso.h
726@@ -0,0 +1,135 @@
727+/*
728+ * Hand-implemented GL/GLX API
729+ *
730+ * Copyright (c) 2006,2007 Even Rouault
731+ *
732+ * Permission is hereby granted, free of charge, to any person obtaining a copy
733+ * of this software and associated documentation files (the "Software"), to deal
734+ * in the Software without restriction, including without limitation the rights
735+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
736+ * copies of the Software, and to permit persons to whom the Software is
737+ * furnished to do so, subject to the following conditions:
738+ *
739+ * The above copyright notice and this permission notice shall be included in
740+ * all copies or substantial portions of the Software.
741+ *
742+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
743+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
744+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
745+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
746+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
747+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
748+ * THE SOFTWARE.
749+ */
750+
751+MAGIC_MACRO(_init32),
752+MAGIC_MACRO(_init64),
753+MAGIC_MACRO(_synchronize),
754+MAGIC_MACRO(_serialized_calls),
755+MAGIC_MACRO(_exit_process),
756+MAGIC_MACRO(_moveResizeWindow),
757+MAGIC_MACRO(_changeWindowState),
758+MAGIC_MACRO(_send_cursor),
759+
760+/* When you add a glX call here, you HAVE TO update IS_GLX_CALL */
761+MAGIC_MACRO(glXChooseVisual),
762+MAGIC_MACRO(glXQueryExtensionsString),
763+MAGIC_MACRO(glXQueryServerString),
764+MAGIC_MACRO(glXCreateContext),
765+MAGIC_MACRO(glXCopyContext),
766+MAGIC_MACRO(glXDestroyContext),
767+MAGIC_MACRO(glXGetClientString),
768+MAGIC_MACRO(glXQueryVersion),
769+MAGIC_MACRO(glXMakeCurrent),
770+MAGIC_MACRO(glXGetConfig),
771+MAGIC_MACRO(glXGetConfig_extended),
772+MAGIC_MACRO(glXWaitGL),
773+MAGIC_MACRO(glXWaitX),
774+MAGIC_MACRO(glXGetFBConfigAttrib_extended),
775+MAGIC_MACRO(glXChooseFBConfig),
776+MAGIC_MACRO(glXChooseFBConfigSGIX),
777+MAGIC_MACRO(glXGetFBConfigs),
778+MAGIC_MACRO(glXCreatePbuffer),
779+MAGIC_MACRO(glXCreateGLXPbufferSGIX),
780+MAGIC_MACRO(glXDestroyPbuffer),
781+MAGIC_MACRO(glXDestroyGLXPbufferSGIX),
782+MAGIC_MACRO(glXCreateNewContext),
783+MAGIC_MACRO(glXCreateContextWithConfigSGIX),
784+MAGIC_MACRO(glXGetVisualFromFBConfig),
785+MAGIC_MACRO(glXGetFBConfigAttrib),
786+MAGIC_MACRO(glXGetFBConfigAttribSGIX),
787+MAGIC_MACRO(glXQueryContext),
788+MAGIC_MACRO(glXQueryDrawable),
789+MAGIC_MACRO(glXQueryGLXPbufferSGIX),
790+MAGIC_MACRO(glXUseXFont),
791+MAGIC_MACRO(glXIsDirect),
792+MAGIC_MACRO(glXGetProcAddress_fake),
793+MAGIC_MACRO(glXGetProcAddress_global_fake),
794+MAGIC_MACRO(glXSwapBuffers),
795+MAGIC_MACRO(glXQueryExtension),
796+MAGIC_MACRO(glXGetScreenDriver),
797+MAGIC_MACRO(glXGetDriverConfig),
798+MAGIC_MACRO(glXSwapIntervalSGI),
799+MAGIC_MACRO(glXBindTexImageATI),
800+MAGIC_MACRO(glXReleaseTexImageATI),
801+MAGIC_MACRO(glXBindTexImageARB),
802+MAGIC_MACRO(glXReleaseTexImageARB),
803+
804+MAGIC_MACRO(glGetString),
805+
806+MAGIC_MACRO(glShaderSourceARB_fake),
807+MAGIC_MACRO(glShaderSource_fake),
808+MAGIC_MACRO(glVertexPointer_fake),
809+MAGIC_MACRO(glNormalPointer_fake),
810+MAGIC_MACRO(glColorPointer_fake),
811+MAGIC_MACRO(glSecondaryColorPointer_fake),
812+MAGIC_MACRO(glIndexPointer_fake),
813+MAGIC_MACRO(glTexCoordPointer_fake),
814+MAGIC_MACRO(glEdgeFlagPointer_fake),
815+MAGIC_MACRO(glVertexAttribPointerARB_fake),
816+MAGIC_MACRO(glVertexAttribPointerNV_fake),
817+MAGIC_MACRO(glWeightPointerARB_fake),
818+MAGIC_MACRO(glMatrixIndexPointerARB_fake),
819+MAGIC_MACRO(glFogCoordPointer_fake),
820+MAGIC_MACRO(glVariantPointerEXT_fake),
821+MAGIC_MACRO(glInterleavedArrays_fake),
822+MAGIC_MACRO(glElementPointerATI_fake),
823+MAGIC_MACRO(glTuxRacerDrawElements_fake),
824+MAGIC_MACRO(glVertexAndNormalPointer_fake),
825+MAGIC_MACRO(glTexCoordPointer01_fake),
826+MAGIC_MACRO(glTexCoordPointer012_fake),
827+MAGIC_MACRO(glVertexNormalPointerInterlaced_fake),
828+MAGIC_MACRO(glVertexNormalColorPointerInterlaced_fake),
829+MAGIC_MACRO(glVertexColorTexCoord0PointerInterlaced_fake),
830+MAGIC_MACRO(glVertexNormalTexCoord0PointerInterlaced_fake),
831+MAGIC_MACRO(glVertexNormalTexCoord01PointerInterlaced_fake),
832+MAGIC_MACRO(glVertexNormalTexCoord012PointerInterlaced_fake),
833+MAGIC_MACRO(glVertexNormalColorTexCoord0PointerInterlaced_fake),
834+MAGIC_MACRO(glVertexNormalColorTexCoord01PointerInterlaced_fake),
835+MAGIC_MACRO(glVertexNormalColorTexCoord012PointerInterlaced_fake),
836+MAGIC_MACRO(glGenTextures_fake),
837+MAGIC_MACRO(glGenBuffersARB_fake),
838+MAGIC_MACRO(glGenLists_fake),
839+MAGIC_MACRO(_glDrawElements_buffer),
840+MAGIC_MACRO(_glDrawRangeElements_buffer),
841+MAGIC_MACRO(_glMultiDrawElements_buffer),
842+MAGIC_MACRO(_glVertexPointer_buffer),
843+MAGIC_MACRO(_glNormalPointer_buffer),
844+MAGIC_MACRO(_glColorPointer_buffer),
845+MAGIC_MACRO(_glSecondaryColorPointer_buffer),
846+MAGIC_MACRO(_glIndexPointer_buffer),
847+MAGIC_MACRO(_glTexCoordPointer_buffer),
848+MAGIC_MACRO(_glEdgeFlagPointer_buffer),
849+MAGIC_MACRO(_glVertexAttribPointerARB_buffer),
850+MAGIC_MACRO(_glWeightPointerARB_buffer),
851+MAGIC_MACRO(_glMatrixIndexPointerARB_buffer),
852+MAGIC_MACRO(_glFogCoordPointer_buffer),
853+MAGIC_MACRO(_glVariantPointerEXT_buffer),
854+MAGIC_MACRO(_glGetError_fake),
855+MAGIC_MACRO(_glReadPixels_pbo),
856+MAGIC_MACRO(_glDrawPixels_pbo),
857+MAGIC_MACRO(_glMapBufferARB_fake),
858+MAGIC_MACRO(_glSelectBuffer_fake),
859+MAGIC_MACRO(_glGetSelectBuffer_fake),
860+MAGIC_MACRO(_glFeedbackBuffer_fake),
861+MAGIC_MACRO(_glGetFeedbackBuffer_fake),
862Index: qemu-0.14.0/target-i386/helper.c
863===================================================================
864--- qemu-0.14.0.orig/target-i386/helper.c
865+++ qemu-0.14.0/target-i386/helper.c
866@@ -962,7 +962,7 @@ target_phys_addr_t cpu_get_phys_page_deb
867 }
868
869 page_offset = (addr & TARGET_PAGE_MASK) & (page_size - 1);
870- paddr = (pte & TARGET_PAGE_MASK) + page_offset;
871+ paddr = (pte & PHYS_ADDR_MASK) + page_offset;
872 return paddr;
873 }
874
875Index: qemu-0.14.0/target-i386/helper.h
876===================================================================
877--- qemu-0.14.0.orig/target-i386/helper.h
878+++ qemu-0.14.0/target-i386/helper.h
879@@ -217,4 +217,6 @@ DEF_HELPER_2(rclq, tl, tl, tl)
880 DEF_HELPER_2(rcrq, tl, tl, tl)
881 #endif
882
883+DEF_HELPER_0(opengl, void)
884+
885 #include "def-helper.h"
886Index: qemu-0.14.0/target-i386/helper_opengl.c
887===================================================================
888--- /dev/null
889+++ qemu-0.14.0/target-i386/helper_opengl.c
890@@ -0,0 +1,1207 @@
891+/*
892+ * Host-side implementation of GL/GLX API
893+ *
894+ * Copyright (c) 2006,2007 Even Rouault
895+ *
896+ * Permission is hereby granted, free of charge, to any person obtaining a copy
897+ * of this software and associated documentation files (the "Software"), to deal
898+ * in the Software without restriction, including without limitation the rights
899+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
900+ * copies of the Software, and to permit persons to whom the Software is
901+ * furnished to do so, subject to the following conditions:
902+ *
903+ * The above copyright notice and this permission notice shall be included in
904+ * all copies or substantial portions of the Software.
905+ *
906+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
907+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
908+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
909+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
910+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
911+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
912+ * THE SOFTWARE.
913+ */
914+#define _XOPEN_SOURCE 600
915+#include <string.h>
916+#include <stdlib.h>
917+#include <assert.h>
918+
919+#include <X11/Xlib.h>
920+#include <X11/Xutil.h>
921+
922+#include "exec.h"
923+
924+#if defined(CONFIG_USER_ONLY)
925+void helper_opengl(void)
926+{
927+ /* TODO */
928+}
929+#else
930+
931+#include "opengl_func.h"
932+
933+#define ENABLE_GL_LOG
934+
935+extern FILE *stderr;
936+
937+extern void init_process_tab(void);
938+extern int do_function_call(int func_number, arg_t *args, char *ret_string);
939+
940+extern void sdl_set_opengl_window(int x, int y, int width, int height);
941+
942+static int last_process_id = 0;
943+static int must_save = 0;
944+
945+static int allow_kernel = 0;
946+
947+static inline void *get_phys_mem_addr(const CPUState *env, target_ulong addr)
948+{
949+ int is_user, index;
950+
951+ index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
952+ is_user = ((env->hflags & HF_CPL_MASK) == 3);
953+ /* A sanity check for the int0x99 case */
954+ if (unlikely(is_user == 0 && !allow_kernel)) {
955+ fprintf(stderr, "not in userland !!!\n");
956+ return NULL;
957+ }
958+ if (__builtin_expect
959+ (env->tlb_table[is_user][index].addr_code !=
960+ (addr & TARGET_PAGE_MASK), 0)) {
961+ target_ulong ret = cpu_get_phys_page_debug((CPUState *) env, addr);
962+
963+ if (ret == -1) {
964+ fprintf(stderr,
965+ "cpu_get_phys_page_debug(env, " TARGET_FMT_lx ") == "
966+ TARGET_FMT_lx "\n", addr, ret);
967+ fprintf(stderr,
968+ "not in phys mem " TARGET_FMT_lx "(" TARGET_FMT_lx " "
969+ TARGET_FMT_lx ")\n", addr,
970+ env->tlb_table[is_user][index].addr_code,
971+ addr & TARGET_PAGE_MASK);
972+ fprintf(stderr, "cpu_x86_handle_mmu_fault = %d\n",
973+ cpu_x86_handle_mmu_fault((CPUState *) env, addr, 0, 1, 1));
974+ return NULL;
975+ } else {
976+ if (ret + TARGET_PAGE_SIZE <= ram_bytes_total()) {
977+ return qemu_get_ram_ptr(ret +
978+ (((target_ulong) addr) & (TARGET_PAGE_SIZE - 1)));
979+ } else {
980+ fprintf(stderr,
981+ "cpu_get_phys_page_debug(env, " TARGET_FMT_lx ") == "
982+ TARGET_FMT_lx "\n", addr, ret);
983+ fprintf(stderr,
984+ "ret=" TARGET_FMT_lx " last_ram_offset= " TARGET_FMT_lx
985+ "\n", ret, (target_ulong) ram_bytes_total());
986+ return NULL;
987+ }
988+ }
989+ } else
990+ return (void *) (addr + env->tlb_table[is_user][index].addend);
991+}
992+
993+#ifndef MIN
994+#define MIN(a, b) (((a) < (b)) ? (a) : (b))
995+#endif
996+
997+enum {
998+ NOT_MAPPED,
999+ MAPPED_CONTIGUOUS,
1000+ MAPPED_NOT_CONTIGUOUS
1001+};
1002+
1003+#define TARGET_ADDR_LOW_ALIGN(x) ((target_ulong)(x) & ~(TARGET_PAGE_SIZE - 1))
1004+
1005+/* Return NOT_MAPPED if a page is not mapped into target physical memory */
1006+/* MAPPED_CONTIGUOUS if all pages are mapped into target physical memory and contiguous */
1007+/* MAPPED_NOT_CONTIGUOUS if all pages are mapped into target physical memory but not contiguous */
1008+static int get_target_mem_state(const CPUState *env,
1009+ target_ulong target_addr, int len)
1010+{
1011+ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
1012+ int to_end_page =
1013+ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
1014+ int ret = MAPPED_CONTIGUOUS;
1015+
1016+ if (aligned_target_addr != target_addr) {
1017+ void *phys_addr = get_phys_mem_addr(env, aligned_target_addr);
1018+ void *last_phys_addr = phys_addr;
1019+
1020+ if (phys_addr == 0) {
1021+ return NOT_MAPPED;
1022+ }
1023+ if (len > to_end_page) {
1024+ len -= to_end_page;
1025+ aligned_target_addr += TARGET_PAGE_SIZE;
1026+ int i;
1027+
1028+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
1029+ void *phys_addr =
1030+ get_phys_mem_addr(env, aligned_target_addr + i);
1031+ if (phys_addr == 0) {
1032+ return NOT_MAPPED;
1033+ }
1034+ if (phys_addr != last_phys_addr + TARGET_PAGE_SIZE)
1035+ ret = MAPPED_NOT_CONTIGUOUS;
1036+ last_phys_addr = phys_addr;
1037+ }
1038+ }
1039+ } else {
1040+ void *last_phys_addr = NULL;
1041+ int i;
1042+
1043+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
1044+ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
1045+
1046+ if (phys_addr == 0) {
1047+ return NOT_MAPPED;
1048+ }
1049+ if (i != 0 && phys_addr != last_phys_addr + TARGET_PAGE_SIZE)
1050+ ret = MAPPED_NOT_CONTIGUOUS;
1051+ last_phys_addr = phys_addr;
1052+ }
1053+ }
1054+ return ret;
1055+}
1056+
1057+/* copy len bytes from host memory at addr host_addr to target memory at logical addr target_addr */
1058+/* Returns 1 if successfull, 0 if some target pages are not mapped into target physical memory */
1059+static int memcpy_host_to_target(const CPUState *env,
1060+ target_ulong target_addr,
1061+ const void *host_addr, int len)
1062+{
1063+ int i;
1064+ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
1065+ int to_end_page =
1066+ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
1067+ int ret = get_target_mem_state(env, target_addr, len);
1068+
1069+ if (ret == NOT_MAPPED) {
1070+ return 0;
1071+ }
1072+
1073+ if (ret == MAPPED_CONTIGUOUS) {
1074+ void *phys_addr = get_phys_mem_addr(env, target_addr);
1075+
1076+ memcpy(phys_addr, host_addr, len);
1077+ } else {
1078+ if (aligned_target_addr != target_addr) {
1079+ void *phys_addr = get_phys_mem_addr(env, target_addr);
1080+
1081+ memcpy(phys_addr, host_addr, MIN(len, to_end_page));
1082+ if (len <= to_end_page) {
1083+ return 1;
1084+ }
1085+ len -= to_end_page;
1086+ host_addr += to_end_page;
1087+ target_addr = aligned_target_addr + TARGET_PAGE_SIZE;
1088+ }
1089+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
1090+ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
1091+
1092+ memcpy(phys_addr, host_addr + i,
1093+ (i + TARGET_PAGE_SIZE <=
1094+ len) ? TARGET_PAGE_SIZE : len & (TARGET_PAGE_SIZE - 1));
1095+ }
1096+ }
1097+
1098+ return 1;
1099+}
1100+
1101+static int memcpy_target_to_host(const CPUState *env, void *host_addr,
1102+ target_ulong target_addr, int len)
1103+{
1104+ int i;
1105+ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
1106+ int to_end_page =
1107+ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
1108+ int ret = get_target_mem_state(env, target_addr, len);
1109+
1110+ if (ret == NOT_MAPPED) {
1111+ return 0;
1112+ }
1113+
1114+ if (ret == MAPPED_CONTIGUOUS) {
1115+ void *phys_addr = get_phys_mem_addr(env, target_addr);
1116+
1117+ memcpy(host_addr, phys_addr, len);
1118+ } else {
1119+ if (aligned_target_addr != target_addr) {
1120+ void *phys_addr = get_phys_mem_addr(env, target_addr);
1121+
1122+ memcpy(host_addr, phys_addr, MIN(len, to_end_page));
1123+ if (len <= to_end_page)
1124+ return 1;
1125+
1126+ len -= to_end_page;
1127+ host_addr += to_end_page;
1128+ target_addr = aligned_target_addr + TARGET_PAGE_SIZE;
1129+ }
1130+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
1131+ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
1132+
1133+ memcpy(host_addr + i, phys_addr,
1134+ (i + TARGET_PAGE_SIZE <=
1135+ len) ? TARGET_PAGE_SIZE : len & (TARGET_PAGE_SIZE - 1));
1136+ }
1137+ }
1138+
1139+ return 1;
1140+}
1141+
1142+static int memcpy_target_to_host_1_1(const CPUState *env, void *host_addr,
1143+ target_ulong target_addr, int nb_args)
1144+{
1145+ return memcpy_target_to_host(env, host_addr, target_addr, nb_args * 8);
1146+}
1147+
1148+static int wordsize = 0;
1149+static int (*argcpy_target_to_host) (const CPUState *env, void *host_addr,
1150+ target_ulong target_addr, int nb_args) =
1151+ memcpy_target_to_host_1_1;
1152+
1153+void do_disconnect_current(void);
1154+void do_context_switch(Display *dpy, pid_t pid, int call);
1155+
1156+static void disconnect_current(void)
1157+{
1158+ last_process_id = 0;
1159+
1160+ return do_disconnect_current();
1161+}
1162+
1163+static int memcpy_target32_to_host(const CPUState *env, void *host_addr,
1164+ target_ulong target_addr, int nb_args)
1165+{
1166+ int ret;
1167+ uint32_t args_temp[nb_args], *src = args_temp;
1168+ arg_t *dest = host_addr;
1169+
1170+ ret = memcpy_target_to_host(env, args_temp, target_addr, nb_args * 4);
1171+ if (!ret)
1172+ return ret;
1173+
1174+ while (nb_args) {
1175+ /* TODO: endianness */
1176+ *dest = 0;
1177+ *(uint32_t *) (dest++) = *src++;
1178+ nb_args--;
1179+ }
1180+
1181+ return ret;
1182+}
1183+
1184+static int memcpy_target64_to_host(const CPUState *env, void *host_addr,
1185+ target_ulong target_addr, int nb_args)
1186+{
1187+ int ret;
1188+ uint64_t args_temp[nb_args], *src = args_temp;
1189+ arg_t *dest = host_addr;
1190+
1191+ ret = memcpy_target_to_host(env, args_temp, target_addr, nb_args * 8);
1192+ if (!ret)
1193+ return ret;
1194+
1195+ while (nb_args) {
1196+ /* TODO: endianness */
1197+ *dest = 0;
1198+ *(uint64_t *) (dest++) = *src++;
1199+ nb_args--;
1200+ }
1201+
1202+ return ret;
1203+}
1204+
1205+static int host_offset = 0;
1206+static void reset_host_offset()
1207+{
1208+ host_offset = 0;
1209+}
1210+
1211+/* Return a host pointer with the content of [target_addr, target_addr + len bytes[ */
1212+/* Do not free or modify */
1213+static const void *get_host_read_pointer(const CPUState *env,
1214+ const target_ulong target_addr, int len)
1215+{
1216+ int ret = get_target_mem_state(env, target_addr, len);
1217+
1218+ if (ret == NOT_MAPPED) {
1219+ return NULL;
1220+ } else if (ret == MAPPED_CONTIGUOUS) {
1221+ return get_phys_mem_addr(env, target_addr);
1222+ } else {
1223+ static int host_mem_size = 0;
1224+ static void *host_mem = NULL;
1225+ static void *ret;
1226+
1227+ if (host_mem_size < host_offset + len) {
1228+ host_mem_size = 2 * host_mem_size + host_offset + len;
1229+ host_mem = realloc(host_mem, host_mem_size);
1230+ }
1231+ ret = host_mem + host_offset;
1232+ assert(memcpy_target_to_host(env, ret, target_addr, len));
1233+ host_offset += len;
1234+ return ret;
1235+ }
1236+}
1237+
1238+int doing_opengl = 0;
1239+static int last_func_number = -1;
1240+static size_t(*my_strlen) (const char *) = NULL;
1241+
1242+#ifdef ENABLE_GL_LOG
1243+static FILE *f = NULL;
1244+static int logger_pid = 0;
1245+
1246+#define write_gl_debug_init() do { if (f == NULL) f = fopen("/tmp/debug_gl.bin", "wb"); } while(0)
1247+
1248+void write_gl_debug_cmd_int(int my_int)
1249+{
1250+ write_gl_debug_init();
1251+ fwrite(&my_int, sizeof(int), 1, f);
1252+ fflush(f);
1253+}
1254+
1255+void write_gl_debug_cmd_short(short my_int)
1256+{
1257+ write_gl_debug_init();
1258+ fwrite(&my_int, sizeof(short), 1, f);
1259+ fflush(f);
1260+}
1261+
1262+static void inline write_gl_debug_cmd_buffer_with_size(int size, void *buffer)
1263+{
1264+ write_gl_debug_init();
1265+ fwrite(&size, sizeof(int), 1, f);
1266+ if (size)
1267+ fwrite(buffer, size, 1, f);
1268+}
1269+
1270+static void inline write_gl_debug_cmd_buffer_without_size(
1271+ int size, void *buffer)
1272+{
1273+ write_gl_debug_init();
1274+ if (size)
1275+ fwrite(buffer, size, 1, f);
1276+}
1277+
1278+void write_gl_debug_end(void)
1279+{
1280+ write_gl_debug_init();
1281+ fclose(f);
1282+ f = NULL;
1283+ logger_pid = 0;
1284+ must_save = 0;
1285+}
1286+
1287+static inline int is_logging(int pid)
1288+{
1289+ return must_save && pid == logger_pid;
1290+}
1291+#endif
1292+
1293+#include <dlfcn.h>
1294+#include <signal.h>
1295+
1296+static void (*anticrash_handler) (void *) = NULL;
1297+static void (*show_stack_from_signal_handler) (int, int, int) = NULL;
1298+
1299+void my_anticrash_sigsegv_handler(int signum, siginfo_t *info, void *ptr)
1300+{
1301+ static int counter = 0;
1302+
1303+ counter++;
1304+
1305+ printf("oops\n");
1306+
1307+ /* if (show_stack_from_signal_handler && counter == 1) { struct ucontext*
1308+ * ctxt = (struct ucontext*)ptr; show_stack_from_signal_handler(10,
1309+ * ctxt->uc_mcontext.gregs[REG_EBP], ctxt->uc_mcontext.gregs[REG_ESP]); } */
1310+ anticrash_handler(ptr);
1311+
1312+ counter--;
1313+}
1314+
1315+static int decode_call_int(CPUState *env, int func_number, int pid,
1316+ target_ulong target_ret_string,
1317+ target_ulong in_args, target_ulong in_args_size)
1318+{
1319+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
1320+ int ret_type = signature->ret_type;
1321+ /* int has_out_parameters = signature->has_out_parameters; */
1322+ int nb_args = signature->nb_args;
1323+ int *args_type = signature->args_type;
1324+ int i;
1325+ int ret;
1326+ int *args_size = NULL;
1327+ target_ulong saved_out_ptr[50];
1328+ static char *ret_string = NULL;
1329+ static arg_t args[50];
1330+ static Display *dpy = NULL;
1331+
1332+ if (dpy == NULL) {
1333+ void *handle = dlopen("libanticrash.so", RTLD_LAZY);
1334+
1335+ if (handle) {
1336+ anticrash_handler = dlsym(handle, "anticrash_handler");
1337+ if (anticrash_handler) {
1338+ fprintf(stderr, "anticrash handler enabled\n");
1339+ struct sigaction sigsegv_action;
1340+ struct sigaction old_sigsegv_action;
1341+
1342+ sigsegv_action.sa_sigaction = my_anticrash_sigsegv_handler;
1343+ sigemptyset(&(sigsegv_action.sa_mask));
1344+ sigsegv_action.sa_flags = SA_SIGINFO | SA_NODEFER;
1345+ sigaction(SIGSEGV, &sigsegv_action, &old_sigsegv_action);
1346+ }
1347+ }
1348+ handle = dlopen("libgetstack.so", RTLD_LAZY);
1349+ if (handle) {
1350+ show_stack_from_signal_handler =
1351+ dlsym(handle, "show_stack_from_signal_handler");
1352+ }
1353+
1354+ dpy = XOpenDisplay(NULL);
1355+ init_process_tab();
1356+ ret_string = malloc(32768);
1357+ my_strlen = strlen;
1358+ }
1359+
1360+ if (unlikely(last_func_number == _exit_process_func &&
1361+ func_number == _exit_process_func)) {
1362+ last_func_number = -1;
1363+ return 0;
1364+ }
1365+
1366+ if (last_process_id != pid) {
1367+ do_context_switch(dpy, pid, func_number);
1368+ last_process_id = pid;
1369+ }
1370+
1371+ if (unlikely(func_number == _exit_process_func))
1372+ last_process_id = 0;
1373+
1374+ if (!wordsize) {
1375+ if (func_number == _init32_func || func_number == _init64_func) {
1376+ if (func_number == _init32_func) {
1377+ wordsize = 32;
1378+ argcpy_target_to_host = memcpy_target32_to_host;
1379+ } else {
1380+ wordsize = 64;
1381+ argcpy_target_to_host = memcpy_target64_to_host;
1382+ }
1383+ } else
1384+ fprintf(stderr, "commands submitted before initialisation done\n");
1385+ }
1386+
1387+ reset_host_offset();
1388+
1389+ if (nb_args) {
1390+
1391+ if (argcpy_target_to_host(env, args, in_args, nb_args) == 0) {
1392+ fprintf(stderr, "call %s pid=%d\n",
1393+ tab_opengl_calls_name[func_number], pid);
1394+ fprintf(stderr, "cannot get call parameters\n");
1395+ disconnect_current();
1396+ return 0;
1397+ }
1398+
1399+ args_size =
1400+ (int *) get_host_read_pointer(env, in_args_size,
1401+ sizeof(int) * nb_args);
1402+ if (args_size == NULL) {
1403+ fprintf(stderr, "call %s pid=%d\n",
1404+ tab_opengl_calls_name[func_number], pid);
1405+ fprintf(stderr, "cannot get call parameters size\n");
1406+ disconnect_current();
1407+ return 0;
1408+ }
1409+ }
1410+
1411+ if (func_number == _serialized_calls_func) {
1412+ int command_buffer_size = args_size[0];
1413+ const void *command_buffer =
1414+ get_host_read_pointer(env, args[0], command_buffer_size);
1415+ int commmand_buffer_offset = 0;
1416+
1417+ args_size = NULL;
1418+#ifdef ENABLE_GL_LOG
1419+ if (is_logging(pid))
1420+ write_gl_debug_cmd_short(_serialized_calls_func);
1421+#endif
1422+
1423+ while (commmand_buffer_offset < command_buffer_size) {
1424+ func_number =
1425+ *(short *) (command_buffer + commmand_buffer_offset);
1426+ if (!(func_number >= 0 && func_number < GL_N_CALLS)) {
1427+ fprintf(stderr,
1428+ "func_number >= 0 && func_number < GL_N_CALLS failed at "
1429+ "commmand_buffer_offset=%d (command_buffer_size=%d)\n",
1430+ commmand_buffer_offset, command_buffer_size);
1431+ return 0;
1432+ }
1433+ commmand_buffer_offset += sizeof(short);
1434+#ifdef ENABLE_GL_LOG
1435+ if (is_logging(pid))
1436+ write_gl_debug_cmd_short(func_number);
1437+#endif
1438+
1439+ signature = (Signature *) tab_opengl_calls[func_number];
1440+ ret_type = signature->ret_type;
1441+ assert(ret_type == TYPE_NONE);
1442+ nb_args = signature->nb_args;
1443+ args_type = signature->args_type;
1444+
1445+ for (i = 0; i < nb_args; i++) {
1446+ switch (args_type[i]) {
1447+ case TYPE_UNSIGNED_INT:
1448+ case TYPE_INT:
1449+ case TYPE_UNSIGNED_CHAR:
1450+ case TYPE_CHAR:
1451+ case TYPE_UNSIGNED_SHORT:
1452+ case TYPE_SHORT:
1453+ case TYPE_FLOAT:
1454+ {
1455+ args[i] =
1456+ *(int *) (command_buffer +
1457+ commmand_buffer_offset);
1458+#ifdef ENABLE_GL_LOG
1459+ if (is_logging(pid))
1460+ write_gl_debug_cmd_int(args[i]);
1461+#endif
1462+ commmand_buffer_offset += sizeof(int);
1463+ break;
1464+ }
1465+
1466+ case TYPE_NULL_TERMINATED_STRING:
1467+ CASE_IN_UNKNOWN_SIZE_POINTERS:
1468+ {
1469+ int arg_size =
1470+ *(int *) (command_buffer +
1471+ commmand_buffer_offset);
1472+ commmand_buffer_offset += sizeof(int);
1473+
1474+ if (arg_size == 0) {
1475+ args[i] = 0;
1476+ } else {
1477+ args[i] =
1478+ (long) (command_buffer +
1479+ commmand_buffer_offset);
1480+ }
1481+
1482+ if (args[i] == 0) {
1483+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
1484+ fprintf(stderr, "call %s arg %d pid=%d\n",
1485+ tab_opengl_calls_name[func_number], i,
1486+ pid);
1487+ disconnect_current();
1488+ return 0;
1489+ }
1490+ } else {
1491+ if (arg_size == 0) {
1492+ fprintf(stderr, "call %s arg %d pid=%d\n",
1493+ tab_opengl_calls_name[func_number], i,
1494+ pid);
1495+ fprintf(stderr, "args_size[i] == 0 !!\n");
1496+ disconnect_current();
1497+ return 0;
1498+ }
1499+ }
1500+#ifdef ENABLE_GL_LOG
1501+ if (is_logging(pid))
1502+ write_gl_debug_cmd_buffer_with_size(arg_size,
1503+ (void *)
1504+ args[i]);
1505+#endif
1506+ commmand_buffer_offset += arg_size;
1507+
1508+ break;
1509+ }
1510+
1511+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
1512+ {
1513+ int arg_size =
1514+ compute_arg_length(stderr, func_number, i, args);
1515+ args[i] =
1516+ (arg_size) ? (long) (command_buffer +
1517+ commmand_buffer_offset) : 0;
1518+#ifdef ENABLE_GL_LOG
1519+ if (is_logging(pid))
1520+ write_gl_debug_cmd_buffer_without_size(arg_size,
1521+ (void *)
1522+ args[i]);
1523+#endif
1524+ commmand_buffer_offset += arg_size;
1525+ break;
1526+ }
1527+
1528+ CASE_OUT_POINTERS:
1529+ {
1530+ fprintf(stderr,
1531+ "shouldn't happen TYPE_OUT_xxxx : call %s arg %d pid=%d\n",
1532+ tab_opengl_calls_name[func_number], i, pid);
1533+ disconnect_current();
1534+ return 0;
1535+ }
1536+
1537+ case TYPE_DOUBLE:
1538+ CASE_IN_KNOWN_SIZE_POINTERS:
1539+ args[i] =
1540+ (long) (command_buffer + commmand_buffer_offset);
1541+#ifdef ENABLE_GL_LOG
1542+ if (is_logging(pid))
1543+ write_gl_debug_cmd_buffer_without_size(
1544+ tab_args_type_length[args_type[i]],
1545+ (void *) args[i]);
1546+#endif
1547+ commmand_buffer_offset +=
1548+ tab_args_type_length[args_type[i]];
1549+ break;
1550+
1551+ case TYPE_IN_IGNORED_POINTER:
1552+ args[i] = 0;
1553+ break;
1554+
1555+ default:
1556+ fprintf(stderr,
1557+ "shouldn't happen : call %s arg %d pid=%d\n",
1558+ tab_opengl_calls_name[func_number], i, pid);
1559+ disconnect_current();
1560+ return 0;
1561+ }
1562+ }
1563+ do_function_call(func_number, args, ret_string);
1564+ }
1565+
1566+ ret = 0;
1567+ } else {
1568+#ifdef ENABLE_GL_LOG
1569+ if (is_logging(pid))
1570+ write_gl_debug_cmd_short(func_number);
1571+#endif
1572+
1573+ for (i = 0; i < nb_args; i++) {
1574+ switch (args_type[i]) {
1575+ case TYPE_UNSIGNED_INT:
1576+ case TYPE_INT:
1577+ case TYPE_UNSIGNED_CHAR:
1578+ case TYPE_CHAR:
1579+ case TYPE_UNSIGNED_SHORT:
1580+ case TYPE_SHORT:
1581+ case TYPE_FLOAT:
1582+#ifdef ENABLE_GL_LOG
1583+ if (is_logging(pid))
1584+ write_gl_debug_cmd_int(args[i]);
1585+#endif
1586+ break;
1587+
1588+ case TYPE_NULL_TERMINATED_STRING:
1589+ CASE_IN_UNKNOWN_SIZE_POINTERS:
1590+ if (args[i] == 0 && args_size[i] == 0) {
1591+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
1592+ fprintf(stderr, "call %s arg %d pid=%d\n",
1593+ tab_opengl_calls_name[func_number], i, pid);
1594+ disconnect_current();
1595+ return 0;
1596+ }
1597+ } else if (args[i] == 0 && args_size[i] != 0) {
1598+ fprintf(stderr, "call %s arg %d pid=%d\n",
1599+ tab_opengl_calls_name[func_number], i, pid);
1600+ fprintf(stderr, "args[i] == 0 && args_size[i] != 0 !!\n");
1601+ disconnect_current();
1602+ return 0;
1603+ } else if (args[i] != 0 && args_size[i] == 0) {
1604+ fprintf(stderr, "call %s arg %d pid=%d\n",
1605+ tab_opengl_calls_name[func_number], i, pid);
1606+ fprintf(stderr, "args[i] != 0 && args_size[i] == 0 !!\n");
1607+ disconnect_current();
1608+ return 0;
1609+ }
1610+ if (args[i]) {
1611+ args[i] =
1612+ (arg_t) get_host_read_pointer(env, args[i],
1613+ args_size[i]);
1614+ if (args[i] == 0) {
1615+ fprintf(stderr, "call %s arg %d pid=%d\n",
1616+ tab_opengl_calls_name[func_number], i, pid);
1617+ fprintf(stderr, "can not get %d bytes\n",
1618+ args_size[i]);
1619+ disconnect_current();
1620+ return 0;
1621+ }
1622+ }
1623+#ifdef ENABLE_GL_LOG
1624+ if (is_logging(pid))
1625+ write_gl_debug_cmd_buffer_with_size(args_size[i],
1626+ (void *) args[i]);
1627+#endif
1628+ break;
1629+
1630+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
1631+ {
1632+ args_size[i] =
1633+ compute_arg_length(stderr, func_number, i, args);
1634+ args[i] = (args_size[i]) ? (arg_t)
1635+ get_host_read_pointer(env,
1636+ args[i], args_size [i]) : 0;
1637+ if (args[i] == 0 && args_size[i] != 0) {
1638+ fprintf(stderr, "call %s arg %d pid=%d\n",
1639+ tab_opengl_calls_name[func_number], i, pid);
1640+ fprintf(stderr, "can not get %d bytes\n",
1641+ args_size[i]);
1642+ disconnect_current();
1643+ return 0;
1644+ }
1645+#ifdef ENABLE_GL_LOG
1646+ if (is_logging(pid))
1647+ write_gl_debug_cmd_buffer_without_size(args_size[i],
1648+ (void *) args[i]);
1649+#endif
1650+ break;
1651+ }
1652+
1653+ CASE_OUT_POINTERS:
1654+ {
1655+ int mem_state;
1656+
1657+#ifdef ENABLE_GL_LOG
1658+ if (is_logging(pid))
1659+ switch (args_type[i]) {
1660+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
1661+ write_gl_debug_cmd_int(args_size[i]);
1662+ break;
1663+
1664+ default:
1665+ break;
1666+ }
1667+#endif
1668+
1669+ if (func_number == glXQueryExtension_func && args[i] == 0) {
1670+ saved_out_ptr[i] = 0;
1671+ continue;
1672+ }
1673+ if (args[i] == 0 && args_size[i] == 0) {
1674+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
1675+ fprintf(stderr, "call %s arg %d pid=%d\n",
1676+ tab_opengl_calls_name[func_number], i,
1677+ pid);
1678+ disconnect_current();
1679+ return 0;
1680+ }
1681+ fprintf(stderr, "call %s arg %d pid=%d\n",
1682+ tab_opengl_calls_name[func_number], i, pid);
1683+ disconnect_current();
1684+ return 0;
1685+ } else if (args[i] == 0 && args_size[i] != 0) {
1686+ fprintf(stderr, "call %s arg %d pid=%d\n",
1687+ tab_opengl_calls_name[func_number], i, pid);
1688+ fprintf(stderr,
1689+ "args[i] == 0 && args_size[i] != 0 !!\n");
1690+ disconnect_current();
1691+ return 0;
1692+ } else if (args[i] != 0 && args_size[i] == 0) {
1693+ fprintf(stderr, "call %s arg %d pid=%d\n",
1694+ tab_opengl_calls_name[func_number], i, pid);
1695+ fprintf(stderr,
1696+ "args[i] != 0 && args_size[i] == 0 !!\n");
1697+ disconnect_current();
1698+ return 0;
1699+ }
1700+ if (args[i]) {
1701+ mem_state =
1702+ get_target_mem_state(env, args[i], args_size[i]);
1703+ if (mem_state == NOT_MAPPED) {
1704+ fprintf(stderr,
1705+ "call %s arg %d pid=%d addr="
1706+ TARGET_FMT_lx " size=%d NOT_MAPPED\n",
1707+ tab_opengl_calls_name[func_number], i,
1708+ pid, args[i], args_size[i]);
1709+ disconnect_current();
1710+ return 0;
1711+ } else if (mem_state == MAPPED_CONTIGUOUS) {
1712+ saved_out_ptr[i] = 0;
1713+ args[i] = (arg_t) get_phys_mem_addr(env, args[i]);
1714+ } else {
1715+ saved_out_ptr[i] = args[i];
1716+ args[i] = (arg_t) malloc(args_size[i]);
1717+ }
1718+ } else {
1719+ saved_out_ptr[i] = 0;
1720+ }
1721+ break;
1722+ }
1723+
1724+ case TYPE_DOUBLE:
1725+ CASE_IN_KNOWN_SIZE_POINTERS:
1726+ if (args[i] == 0) {
1727+ fprintf(stderr, "call %s arg %d pid=%d\n",
1728+ tab_opengl_calls_name[func_number], i, pid);
1729+ fprintf(stderr, "can not get %d bytes\n",
1730+ tab_args_type_length[args_type[i]]);
1731+ disconnect_current();
1732+ return 0;
1733+ }
1734+ args[i] = (arg_t) get_host_read_pointer(env,
1735+ args[i], tab_args_type_length[args_type[i]]);
1736+ if (args[i] == 0) {
1737+ fprintf(stderr, "call %s arg %d pid=%d\n",
1738+ tab_opengl_calls_name[func_number], i, pid);
1739+ fprintf(stderr, "can not get %d bytes\n",
1740+ tab_args_type_length[args_type[i]]);
1741+ disconnect_current();
1742+ return 0;
1743+ }
1744+#ifdef ENABLE_GL_LOG
1745+ if (is_logging(pid))
1746+ write_gl_debug_cmd_buffer_without_size
1747+ (tab_args_type_length[args_type[i]],
1748+ (void *) args[i]);
1749+#endif
1750+ break;
1751+
1752+ case TYPE_IN_IGNORED_POINTER:
1753+ args[i] = 0;
1754+ break;
1755+
1756+ default:
1757+ fprintf(stderr, "shouldn't happen : call %s arg %d pid=%d\n",
1758+ tab_opengl_calls_name[func_number], i, pid);
1759+ disconnect_current();
1760+ return 0;
1761+ }
1762+ }
1763+
1764+ if (ret_type == TYPE_CONST_CHAR) {
1765+ ret_string[0] = 0;
1766+ }
1767+
1768+ if (func_number == _init32_func || func_number == _init64_func) {
1769+ if (func_number == _init32_func) {
1770+ if (wordsize != 32) {
1771+ fprintf(stderr,
1772+ "clients with different ABIs not supported\n");
1773+ exit(-1);
1774+ }
1775+ } else {
1776+ if (wordsize != 64) {
1777+ fprintf(stderr,
1778+ "clients with different ABIs not supported\n");
1779+ exit(-1);
1780+ }
1781+ }
1782+
1783+ if (must_save && args[0])
1784+ fprintf(stderr, "error: pid %i is already recording\n",
1785+ logger_pid);
1786+ else if (args[0]) {
1787+ logger_pid = pid;
1788+ must_save = 1;
1789+ }
1790+#ifdef USE_KQEMU
1791+ if (env->kqemu_enabled)
1792+ *(int *) args[1] = 2;
1793+ else
1794+#endif
1795+ *(int *) args[1] = 1;
1796+ ret = 0;
1797+ } else {
1798+ ret = do_function_call(func_number, args, ret_string);
1799+ }
1800+#ifdef ENABLE_GL_LOG
1801+ if (is_logging(pid) && func_number == glXGetVisualFromFBConfig_func)
1802+ write_gl_debug_cmd_int(ret);
1803+#endif
1804+ for (i = 0; i < nb_args; i++) {
1805+ switch (args_type[i]) {
1806+ CASE_OUT_POINTERS:
1807+ {
1808+ if (saved_out_ptr[i]) {
1809+ if (memcpy_host_to_target(env, saved_out_ptr[i],
1810+ (void *) args[i],
1811+ args_size[i]) == 0) {
1812+ fprintf(stderr, "could not copy out parameters "
1813+ "back to user space\n");
1814+ disconnect_current();
1815+ return 0;
1816+ }
1817+ free((void *) args[i]);
1818+ }
1819+ break;
1820+ }
1821+
1822+ default:
1823+ break;
1824+ }
1825+ }
1826+
1827+ if (ret_type == TYPE_CONST_CHAR)
1828+ if (target_ret_string) {
1829+ /* the my_strlen stuff is a hack to workaround a GCC bug if
1830+ * using directly strlen... */
1831+ if (memcpy_host_to_target(env, target_ret_string, ret_string,
1832+ my_strlen(ret_string) + 1) == 0) {
1833+ fprintf(stderr, "cannot copy out parameters "
1834+ "back to user space\n");
1835+ disconnect_current();
1836+ return 0;
1837+ }
1838+ }
1839+ }
1840+
1841+#ifdef ENABLE_GL_LOG
1842+ if (is_logging(pid) && func_number == _exit_process_func) {
1843+ write_gl_debug_end();
1844+ }
1845+#endif
1846+
1847+ return ret;
1848+}
1849+
1850+static int decode_call(CPUState *env, int func_number, int pid,
1851+ target_ulong target_ret_string, target_ulong in_args,
1852+ target_ulong in_args_size)
1853+{
1854+ if (!(func_number >= 0 && func_number < GL_N_CALLS)) {
1855+ fprintf(stderr,
1856+ "func_number >= 0 && func_number < GL_N_CALLS failed\n");
1857+ return 0;
1858+ }
1859+
1860+ return decode_call_int(env, func_number, pid,
1861+ target_ret_string, in_args, in_args_size);
1862+}
1863+
1864+#define env first_cpu
1865+
1866+void helper_opengl(void)
1867+{
1868+ doing_opengl = 1;
1869+ env->regs[R_EAX] =
1870+ decode_call(env, env->regs[R_EAX], env->regs[R_EBX], env->regs[R_ECX],
1871+ env->regs[R_EDX], env->regs[R_ESI]);
1872+ doing_opengl = 0;
1873+}
1874+
1875+void mem_opengl(uint64_t ptr)
1876+{
1877+ uint64_t *params = get_phys_mem_addr(env, ptr);
1878+ int ret;
1879+
1880+ /* Execute */
1881+ doing_opengl = 1;
1882+ ret = decode_call(env, le64_to_cpu(params[0]),
1883+ le64_to_cpu(params[1]), le64_to_cpu(params[2]),
1884+ le64_to_cpu(params[3]), le64_to_cpu(params[4]));
1885+ doing_opengl = 0;
1886+
1887+ params[0] = cpu_to_le64(ret);
1888+ params[5] = 0;
1889+}
1890+
1891+#define THREADINFO_TASK_OFFSET 0x0 //// 0x0
1892+#define THREADSTRUCT_IOPL_OFFSET 0x78 //// 0x80
1893+#define TASKSTRUCT_NEXT_OFFSET 0x1a0 //// 0x1e8
1894+#define TASKSTRUCT_PREV_OFFSET 0x1a4 //// 0x1ec
1895+#define TASKSTRUCT_RCRED_OFFSET 0x29c //// 0x2b4
1896+#define TASKSTRUCT_CRED_OFFSET 0x2a0 //// 0x2b8
1897+#define TASKSTRUCT_COMM_OFFSET 0x2c0 //// 0x2fc
1898+#define TASKSTRUCT_THREAD_OFFSET 0x2e4 //// 0x318
1899+#define TASKSTRUCT_IO_CTX_OFFSET 0x40c //// 0x428
1900+#define CRED_CAPINH_OFFSET 0x28
1901+#define CRED_CAPPER_OFFSET 0x30
1902+#define CRED_CAPEFF_OFFSET 0x38
1903+#define CRED_CAPBST_OFFSET 0x40
1904+/* How to obtain the numbers:
1905+ * $ gbd vmlinux
1906+ * ...
1907+ * (gdb) print &((struct task_struct *) 0)->real_cred
1908+ * $22 = (const struct cred **) 0x29c
1909+ * (gdb) print &((struct task_struct *) 0)->cred
1910+ * $23 = (const struct cred **) 0x2a0
1911+ * (gbd) ...
1912+ * ...
1913+ * (gdb) ^D
1914+ * $ vim target-i386/helper_opengl.c
1915+ * ...
1916+ * :wq
1917+ * $ make
1918+ * ...
1919+ *
1920+ * Testing:
1921+ * $ x86_64-softmmu/qemu-system-x86_64 -s -hda ...
1922+ * ^Z
1923+ * [1]+ Stopped x86_64-softmmu/qemu-system-x86_64 -s -hda ...
1924+ * $ bg
1925+ * [1]+ x86_64-softmmu/qemu-system-x86_64 -s -hda ...
1926+ * $ gdb
1927+ * ...
1928+ * (gdb) target remote localhost:1234
1929+ * ...
1930+ * (gdb) print ((char *) *(unsigned int *) ((unsigned int) $rsp & ~8191)) +
1931+ * 0x2c0
1932+ * $9 = 0xc094062c "swapper"
1933+ * (gdb) print (char *) (*(unsigned int *) (((char *) *(unsigned int *)
1934+ * ((unsigned int) $rsp & ~8191)) + 0x1a0) - 0x1a0) + 0x2c0
1935+ * $10 = 0xdf87cee0 "init"
1936+ * ...
1937+ */
1938+
1939+#define CAP_SYS_RAWIO 17
1940+
1941+#define THREAD_SIZE (TARGET_PAGE_SIZE << 1)
1942+static ram_addr_t x86_current_thread(void)
1943+{
1944+ return env->regs[R_ESP] & ~(THREAD_SIZE - 1);
1945+}
1946+
1947+static ram_addr_t x86_current_task(void)
1948+{
1949+ return *(uint32_t *) get_phys_mem_addr(env,
1950+ x86_current_thread() + THREADINFO_TASK_OFFSET);
1951+}
1952+
1953+static ram_addr_t x86_current_io_ctx(void)
1954+{
1955+ return *(uint32_t *) get_phys_mem_addr(env,
1956+ x86_current_task() + TASKSTRUCT_IO_CTX_OFFSET);
1957+}
1958+
1959+static ram_addr_t x86_task_name(ram_addr_t proc)
1960+{
1961+ return x86_current_task() + TASKSTRUCT_COMM_OFFSET;
1962+}
1963+
1964+static ram_addr_t x86_task_next(ram_addr_t proc)
1965+{
1966+ return *(uint32_t *) get_phys_mem_addr(env,
1967+ x86_current_task() + TASKSTRUCT_NEXT_OFFSET) -
1968+ TASKSTRUCT_NEXT_OFFSET;
1969+}
1970+
1971+static void x86_cap_set(ram_addr_t caps, int cap)
1972+{
1973+ int offset = cap >> 5;
1974+ int mask = 1 << (cap & 31);
1975+
1976+ *(uint32_t *) get_phys_mem_addr(env, caps + offset) |= mask;
1977+}
1978+
1979+static void x86_cred_cap_set(ram_addr_t creds, int cap)
1980+{
1981+ x86_cap_set(creds + CRED_CAPINH_OFFSET, cap);
1982+ x86_cap_set(creds + CRED_CAPPER_OFFSET, cap);
1983+ x86_cap_set(creds + CRED_CAPEFF_OFFSET, cap);
1984+ x86_cap_set(creds + CRED_CAPBST_OFFSET, cap);
1985+}
1986+
1987+static void x86_task_cap_set(ram_addr_t proc, int cap)
1988+{
1989+ x86_cred_cap_set(*(uint32_t *) get_phys_mem_addr(env,
1990+ proc + TASKSTRUCT_RCRED_OFFSET), cap);
1991+ x86_cred_cap_set(*(uint32_t *) get_phys_mem_addr(env,
1992+ proc + TASKSTRUCT_CRED_OFFSET), cap);
1993+}
1994+
1995+#include "kvm.h"
1996+
1997+/* The putting and getting of the register set seems to incure a too
1998+ * high overhead. It's at least 4 ioctl's each. */
1999+#if 0
2000+static void opengl_ioport_write(void *data, uint32_t addr, uint32_t val)
2001+{
2002+ /* Ignore the first outb after iopl which is emulated by the kernel. */
2003+ if (val == (uint8_t) -1)
2004+ return;
2005+
2006+ if (kvm_enabled())
2007+ kvm_arch_get_registers(env);
2008+ doing_opengl = 1;
2009+ env->regs[R_EAX] =
2010+ decode_call(env, env->regs[R_EAX], env->regs[R_EBX], env->regs[R_ECX],
2011+ env->regs[R_ESI], env->regs[R_EDI]);
2012+ doing_opengl = 0;
2013+ if (kvm_enabled())
2014+ kvm_arch_put_registers(env);
2015+}
2016+#else
2017+static void get_regs(void)
2018+{
2019+ /* We only really need the eflags and cr[0..4] */
2020+ if (kvm_enabled())
2021+ kvm_get_sregs(env);
2022+}
2023+
2024+static void opengl_ioport_write(void *data, uint32_t addr, uint32_t val)
2025+{
2026+ uint64_t *params;
2027+ int ret;
2028+
2029+ /* Only need to fetch the registers after a guest's context switch...
2030+ * the problem is, to find out about context switches we already need
2031+ * to fetch rsp
2032+ * TODO: pass the pid in val. the params pointer doesn't need to be
2033+ * passed on all calls because it can be a global and be constant.
2034+ */
2035+ get_regs();
2036+
2037+ params = get_phys_mem_addr(env, (target_ulong) val);
2038+
2039+ /* Execute */
2040+ doing_opengl = 1;
2041+ ret = decode_call(env, le64_to_cpu(params[0]),
2042+ le64_to_cpu(params[1]), le64_to_cpu(params[2]),
2043+ le64_to_cpu(params[3]), le64_to_cpu(params[4]));
2044+ doing_opengl = 0;
2045+
2046+ params[0] = cpu_to_le64(ret);
2047+ params[5] = 0;
2048+}
2049+#endif
2050+
2051+static void opengl_ioport_write_first(void *data, uint32_t addr, uint32_t val)
2052+{
2053+ if (val != (uint32_t) -1)
2054+ return;
2055+
2056+ /* Ignore the first outb after iopl which is emulated by the kernel. */
2057+
2058+ register_ioport_write(9996, 4, 4, opengl_ioport_write, (void *) 1);
2059+}
2060+
2061+void io_register(void)
2062+{
2063+ register_ioport_write(9996, 4, 4, opengl_ioport_write_first, (void *) 1);
2064+}
2065+
2066+void opengl_process_enable(void)
2067+{
2068+ ram_addr_t task;
2069+ char *name;
2070+ int newlevel = 3;
2071+ uint32_t iopl = newlevel << 12;
2072+ void *ioplptr;
2073+
2074+ if (kvm_enabled())
2075+ kvm_arch_get_registers(env);
2076+ allow_kernel = 1;
2077+
2078+ task = x86_current_task();
2079+ x86_task_cap_set(task, CAP_SYS_RAWIO);
2080+ name = get_phys_mem_addr(env, x86_task_name(task));
2081+
2082+ ioplptr = get_phys_mem_addr(env, task +
2083+ TASKSTRUCT_THREAD_OFFSET + THREADSTRUCT_IOPL_OFFSET);
2084+ ((uint32_t *) ioplptr)[0] = cpu_to_le32(iopl);
2085+
2086+ env->eflags &= ~0x3000;
2087+ env->eflags |= newlevel << 12;
2088+
2089+ allow_kernel = 0;
2090+ if (kvm_enabled())
2091+ kvm_arch_put_registers(env, KVM_PUT_RUNTIME_STATE);
2092+
2093+ printf("Granted OpenGL access to process '%s'\n", name);
2094+
2095+ io_register();
2096+}
2097+#endif
2098Index: qemu-0.14.0/target-i386/kvm.c
2099===================================================================
2100--- qemu-0.14.0.orig/target-i386/kvm.c
2101+++ qemu-0.14.0/target-i386/kvm.c
2102@@ -957,7 +957,7 @@ static int kvm_get_xcrs(CPUState *env)
2103 #endif
2104 }
2105
2106-static int kvm_get_sregs(CPUState *env)
2107+int kvm_get_sregs(CPUState *env)
2108 {
2109 struct kvm_sregs sregs;
2110 uint32_t hflags;
2111Index: qemu-0.14.0/target-i386/mesa_enums.c
2112===================================================================
2113--- /dev/null
2114+++ qemu-0.14.0/target-i386/mesa_enums.c
2115@@ -0,0 +1,4890 @@
2116+/* DO NOT EDIT - This file generated automatically by gl_enums.py (from Mesa) script */
2117+
2118+/*
2119+ * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
2120+ * All Rights Reserved.
2121+ *
2122+ * Permission is hereby granted, free of charge, to any person obtaining a
2123+ * copy of this software and associated documentation files (the "Software"),
2124+ * to deal in the Software without restriction, including without limitation
2125+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
2126+ * and/or sell copies of the Software, and to permit persons to whom the
2127+ * Software is furnished to do so, subject to the following conditions:
2128+ *
2129+ * The above copyright notice and this permission notice (including the next
2130+ * paragraph) shall be included in all copies or substantial portions of the
2131+ * Software.
2132+ *
2133+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2134+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2135+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
2136+ * BRIAN PAUL,
2137+ * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
2138+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
2139+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2140+ * SOFTWARE.
2141+ */
2142+
2143+#include "glheader.h"
2144+#include "enums.h"
2145+#include "imports.h"
2146+
2147+typedef struct {
2148+ size_t offset;
2149+ int n;
2150+} enum_elt;
2151+
2152+LONGSTRING static const char enum_string_table[] =
2153+ "GL_2D\0"
2154+ "GL_2_BYTES\0"
2155+ "GL_3D\0"
2156+ "GL_3D_COLOR\0"
2157+ "GL_3D_COLOR_TEXTURE\0"
2158+ "GL_3_BYTES\0"
2159+ "GL_4D_COLOR_TEXTURE\0"
2160+ "GL_4_BYTES\0"
2161+ "GL_ACCUM\0"
2162+ "GL_ACCUM_ALPHA_BITS\0"
2163+ "GL_ACCUM_BLUE_BITS\0"
2164+ "GL_ACCUM_BUFFER_BIT\0"
2165+ "GL_ACCUM_CLEAR_VALUE\0"
2166+ "GL_ACCUM_GREEN_BITS\0"
2167+ "GL_ACCUM_RED_BITS\0"
2168+ "GL_ACTIVE_ATTRIBUTES\0"
2169+ "GL_ACTIVE_ATTRIBUTE_MAX_LENGTH\0"
2170+ "GL_ACTIVE_STENCIL_FACE_EXT\0"
2171+ "GL_ACTIVE_TEXTURE\0"
2172+ "GL_ACTIVE_TEXTURE_ARB\0"
2173+ "GL_ACTIVE_UNIFORMS\0"
2174+ "GL_ACTIVE_UNIFORM_MAX_LENGTH\0"
2175+ "GL_ACTIVE_VERTEX_UNITS_ARB\0"
2176+ "GL_ADD\0"
2177+ "GL_ADD_SIGNED\0"
2178+ "GL_ADD_SIGNED_ARB\0"
2179+ "GL_ADD_SIGNED_EXT\0"
2180+ "GL_ALIASED_LINE_WIDTH_RANGE\0"
2181+ "GL_ALIASED_POINT_SIZE_RANGE\0"
2182+ "GL_ALL_ATTRIB_BITS\0"
2183+ "GL_ALL_CLIENT_ATTRIB_BITS\0"
2184+ "GL_ALPHA\0"
2185+ "GL_ALPHA12\0"
2186+ "GL_ALPHA12_EXT\0"
2187+ "GL_ALPHA16\0"
2188+ "GL_ALPHA16_EXT\0"
2189+ "GL_ALPHA4\0"
2190+ "GL_ALPHA4_EXT\0"
2191+ "GL_ALPHA8\0"
2192+ "GL_ALPHA8_EXT\0"
2193+ "GL_ALPHA_BIAS\0"
2194+ "GL_ALPHA_BITS\0"
2195+ "GL_ALPHA_SCALE\0"
2196+ "GL_ALPHA_TEST\0"
2197+ "GL_ALPHA_TEST_FUNC\0"
2198+ "GL_ALPHA_TEST_REF\0"
2199+ "GL_ALWAYS\0"
2200+ "GL_AMBIENT\0"
2201+ "GL_AMBIENT_AND_DIFFUSE\0"
2202+ "GL_AND\0"
2203+ "GL_AND_INVERTED\0"
2204+ "GL_AND_REVERSE\0"
2205+ "GL_ARRAY_BUFFER\0"
2206+ "GL_ARRAY_BUFFER_ARB\0"
2207+ "GL_ARRAY_BUFFER_BINDING\0"
2208+ "GL_ARRAY_BUFFER_BINDING_ARB\0"
2209+ "GL_ATTACHED_SHADERS\0"
2210+ "GL_ATTRIB_ARRAY_POINTER_NV\0"
2211+ "GL_ATTRIB_ARRAY_SIZE_NV\0"
2212+ "GL_ATTRIB_ARRAY_STRIDE_NV\0"
2213+ "GL_ATTRIB_ARRAY_TYPE_NV\0"
2214+ "GL_ATTRIB_STACK_DEPTH\0"
2215+ "GL_AUTO_NORMAL\0"
2216+ "GL_AUX0\0"
2217+ "GL_AUX1\0"
2218+ "GL_AUX2\0"
2219+ "GL_AUX3\0"
2220+ "GL_AUX_BUFFERS\0"
2221+ "GL_BACK\0"
2222+ "GL_BACK_LEFT\0"
2223+ "GL_BACK_RIGHT\0"
2224+ "GL_BGR\0"
2225+ "GL_BGRA\0"
2226+ "GL_BITMAP\0"
2227+ "GL_BITMAP_TOKEN\0"
2228+ "GL_BLEND\0"
2229+ "GL_BLEND_COLOR\0"
2230+ "GL_BLEND_COLOR_EXT\0"
2231+ "GL_BLEND_DST\0"
2232+ "GL_BLEND_DST_ALPHA\0"
2233+ "GL_BLEND_DST_RGB\0"
2234+ "GL_BLEND_EQUATION\0"
2235+ "GL_BLEND_EQUATION_ALPHA\0"
2236+ "GL_BLEND_EQUATION_ALPHA_EXT\0"
2237+ "GL_BLEND_EQUATION_EXT\0"
2238+ "GL_BLEND_EQUATION_RGB_EXT\0"
2239+ "GL_BLEND_SRC\0"
2240+ "GL_BLEND_SRC_ALPHA\0"
2241+ "GL_BLEND_SRC_RGB\0"
2242+ "GL_BLUE\0"
2243+ "GL_BLUE_BIAS\0"
2244+ "GL_BLUE_BITS\0"
2245+ "GL_BLUE_SCALE\0"
2246+ "GL_BOOL\0"
2247+ "GL_BOOL_ARB\0"
2248+ "GL_BOOL_VEC2\0"
2249+ "GL_BOOL_VEC2_ARB\0"
2250+ "GL_BOOL_VEC3\0"
2251+ "GL_BOOL_VEC3_ARB\0"
2252+ "GL_BOOL_VEC4\0"
2253+ "GL_BOOL_VEC4_ARB\0"
2254+ "GL_BUFFER_ACCESS\0"
2255+ "GL_BUFFER_ACCESS_ARB\0"
2256+ "GL_BUFFER_MAPPED\0"
2257+ "GL_BUFFER_MAPPED_ARB\0"
2258+ "GL_BUFFER_MAP_POINTER\0"
2259+ "GL_BUFFER_MAP_POINTER_ARB\0"
2260+ "GL_BUFFER_SIZE\0"
2261+ "GL_BUFFER_SIZE_ARB\0"
2262+ "GL_BUFFER_USAGE\0"
2263+ "GL_BUFFER_USAGE_ARB\0"
2264+ "GL_BYTE\0"
2265+ "GL_C3F_V3F\0"
2266+ "GL_C4F_N3F_V3F\0"
2267+ "GL_C4UB_V2F\0"
2268+ "GL_C4UB_V3F\0"
2269+ "GL_CCW\0"
2270+ "GL_CLAMP\0"
2271+ "GL_CLAMP_TO_BORDER\0"
2272+ "GL_CLAMP_TO_BORDER_ARB\0"
2273+ "GL_CLAMP_TO_BORDER_SGIS\0"
2274+ "GL_CLAMP_TO_EDGE\0"
2275+ "GL_CLAMP_TO_EDGE_SGIS\0"
2276+ "GL_CLEAR\0"
2277+ "GL_CLIENT_ACTIVE_TEXTURE\0"
2278+ "GL_CLIENT_ACTIVE_TEXTURE_ARB\0"
2279+ "GL_CLIENT_ALL_ATTRIB_BITS\0"
2280+ "GL_CLIENT_ATTRIB_STACK_DEPTH\0"
2281+ "GL_CLIENT_PIXEL_STORE_BIT\0"
2282+ "GL_CLIENT_VERTEX_ARRAY_BIT\0"
2283+ "GL_CLIP_PLANE0\0"
2284+ "GL_CLIP_PLANE1\0"
2285+ "GL_CLIP_PLANE2\0"
2286+ "GL_CLIP_PLANE3\0"
2287+ "GL_CLIP_PLANE4\0"
2288+ "GL_CLIP_PLANE5\0"
2289+ "GL_CLIP_VOLUME_CLIPPING_HINT_EXT\0"
2290+ "GL_COEFF\0"
2291+ "GL_COLOR\0"
2292+ "GL_COLOR_ARRAY\0"
2293+ "GL_COLOR_ARRAY_BUFFER_BINDING\0"
2294+ "GL_COLOR_ARRAY_BUFFER_BINDING_ARB\0"
2295+ "GL_COLOR_ARRAY_POINTER\0"
2296+ "GL_COLOR_ARRAY_SIZE\0"
2297+ "GL_COLOR_ARRAY_STRIDE\0"
2298+ "GL_COLOR_ARRAY_TYPE\0"
2299+ "GL_COLOR_ATTACHMENT0_EXT\0"
2300+ "GL_COLOR_ATTACHMENT10_EXT\0"
2301+ "GL_COLOR_ATTACHMENT11_EXT\0"
2302+ "GL_COLOR_ATTACHMENT12_EXT\0"
2303+ "GL_COLOR_ATTACHMENT13_EXT\0"
2304+ "GL_COLOR_ATTACHMENT14_EXT\0"
2305+ "GL_COLOR_ATTACHMENT15_EXT\0"
2306+ "GL_COLOR_ATTACHMENT1_EXT\0"
2307+ "GL_COLOR_ATTACHMENT2_EXT\0"
2308+ "GL_COLOR_ATTACHMENT3_EXT\0"
2309+ "GL_COLOR_ATTACHMENT4_EXT\0"
2310+ "GL_COLOR_ATTACHMENT5_EXT\0"
2311+ "GL_COLOR_ATTACHMENT6_EXT\0"
2312+ "GL_COLOR_ATTACHMENT7_EXT\0"
2313+ "GL_COLOR_ATTACHMENT8_EXT\0"
2314+ "GL_COLOR_ATTACHMENT9_EXT\0"
2315+ "GL_COLOR_BUFFER_BIT\0"
2316+ "GL_COLOR_CLEAR_VALUE\0"
2317+ "GL_COLOR_INDEX\0"
2318+ "GL_COLOR_INDEXES\0"
2319+ "GL_COLOR_LOGIC_OP\0"
2320+ "GL_COLOR_MATERIAL\0"
2321+ "GL_COLOR_MATERIAL_FACE\0"
2322+ "GL_COLOR_MATERIAL_PARAMETER\0"
2323+ "GL_COLOR_MATRIX\0"
2324+ "GL_COLOR_MATRIX_SGI\0"
2325+ "GL_COLOR_MATRIX_STACK_DEPTH\0"
2326+ "GL_COLOR_MATRIX_STACK_DEPTH_SGI\0"
2327+ "GL_COLOR_SUM\0"
2328+ "GL_COLOR_SUM_ARB\0"
2329+ "GL_COLOR_TABLE\0"
2330+ "GL_COLOR_TABLE_ALPHA_SIZE\0"
2331+ "GL_COLOR_TABLE_ALPHA_SIZE_EXT\0"
2332+ "GL_COLOR_TABLE_ALPHA_SIZE_SGI\0"
2333+ "GL_COLOR_TABLE_BIAS\0"
2334+ "GL_COLOR_TABLE_BIAS_SGI\0"
2335+ "GL_COLOR_TABLE_BLUE_SIZE\0"
2336+ "GL_COLOR_TABLE_BLUE_SIZE_EXT\0"
2337+ "GL_COLOR_TABLE_BLUE_SIZE_SGI\0"
2338+ "GL_COLOR_TABLE_FORMAT\0"
2339+ "GL_COLOR_TABLE_FORMAT_EXT\0"
2340+ "GL_COLOR_TABLE_FORMAT_SGI\0"
2341+ "GL_COLOR_TABLE_GREEN_SIZE\0"
2342+ "GL_COLOR_TABLE_GREEN_SIZE_EXT\0"
2343+ "GL_COLOR_TABLE_GREEN_SIZE_SGI\0"
2344+ "GL_COLOR_TABLE_INTENSITY_SIZE\0"
2345+ "GL_COLOR_TABLE_INTENSITY_SIZE_EXT\0"
2346+ "GL_COLOR_TABLE_INTENSITY_SIZE_SGI\0"
2347+ "GL_COLOR_TABLE_LUMINANCE_SIZE\0"
2348+ "GL_COLOR_TABLE_LUMINANCE_SIZE_EXT\0"
2349+ "GL_COLOR_TABLE_LUMINANCE_SIZE_SGI\0"
2350+ "GL_COLOR_TABLE_RED_SIZE\0"
2351+ "GL_COLOR_TABLE_RED_SIZE_EXT\0"
2352+ "GL_COLOR_TABLE_RED_SIZE_SGI\0"
2353+ "GL_COLOR_TABLE_SCALE\0"
2354+ "GL_COLOR_TABLE_SCALE_SGI\0"
2355+ "GL_COLOR_TABLE_WIDTH\0"
2356+ "GL_COLOR_TABLE_WIDTH_EXT\0"
2357+ "GL_COLOR_TABLE_WIDTH_SGI\0"
2358+ "GL_COLOR_WRITEMASK\0"
2359+ "GL_COMBINE\0"
2360+ "GL_COMBINE4\0"
2361+ "GL_COMBINE_ALPHA\0"
2362+ "GL_COMBINE_ALPHA_ARB\0"
2363+ "GL_COMBINE_ALPHA_EXT\0"
2364+ "GL_COMBINE_ARB\0"
2365+ "GL_COMBINE_EXT\0"
2366+ "GL_COMBINE_RGB\0"
2367+ "GL_COMBINE_RGB_ARB\0"
2368+ "GL_COMBINE_RGB_EXT\0"
2369+ "GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT\0"
2370+ "GL_COMPARE_R_TO_TEXTURE\0"
2371+ "GL_COMPARE_R_TO_TEXTURE_ARB\0"
2372+ "GL_COMPILE\0"
2373+ "GL_COMPILE_AND_EXECUTE\0"
2374+ "GL_COMPILE_STATUS\0"
2375+ "GL_COMPRESSED_ALPHA\0"
2376+ "GL_COMPRESSED_ALPHA_ARB\0"
2377+ "GL_COMPRESSED_INTENSITY\0"
2378+ "GL_COMPRESSED_INTENSITY_ARB\0"
2379+ "GL_COMPRESSED_LUMINANCE\0"
2380+ "GL_COMPRESSED_LUMINANCE_ALPHA\0"
2381+ "GL_COMPRESSED_LUMINANCE_ALPHA_ARB\0"
2382+ "GL_COMPRESSED_LUMINANCE_ARB\0"
2383+ "GL_COMPRESSED_RGB\0"
2384+ "GL_COMPRESSED_RGBA\0"
2385+ "GL_COMPRESSED_RGBA_ARB\0"
2386+ "GL_COMPRESSED_RGBA_FXT1_3DFX\0"
2387+ "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT\0"
2388+ "GL_COMPRESSED_RGBA_S3TC_DXT3_EXT\0"
2389+ "GL_COMPRESSED_RGBA_S3TC_DXT5_EXT\0"
2390+ "GL_COMPRESSED_RGB_ARB\0"
2391+ "GL_COMPRESSED_RGB_FXT1_3DFX\0"
2392+ "GL_COMPRESSED_RGB_S3TC_DXT1_EXT\0"
2393+ "GL_COMPRESSED_TEXTURE_FORMATS\0"
2394+ "GL_CONSTANT\0"
2395+ "GL_CONSTANT_ALPHA\0"
2396+ "GL_CONSTANT_ALPHA_EXT\0"
2397+ "GL_CONSTANT_ARB\0"
2398+ "GL_CONSTANT_ATTENUATION\0"
2399+ "GL_CONSTANT_BORDER_HP\0"
2400+ "GL_CONSTANT_COLOR\0"
2401+ "GL_CONSTANT_COLOR_EXT\0"
2402+ "GL_CONSTANT_EXT\0"
2403+ "GL_CONVOLUTION_1D\0"
2404+ "GL_CONVOLUTION_2D\0"
2405+ "GL_CONVOLUTION_BORDER_COLOR\0"
2406+ "GL_CONVOLUTION_BORDER_COLOR_HP\0"
2407+ "GL_CONVOLUTION_BORDER_MODE\0"
2408+ "GL_CONVOLUTION_BORDER_MODE_EXT\0"
2409+ "GL_CONVOLUTION_FILTER_BIAS\0"
2410+ "GL_CONVOLUTION_FILTER_BIAS_EXT\0"
2411+ "GL_CONVOLUTION_FILTER_SCALE\0"
2412+ "GL_CONVOLUTION_FILTER_SCALE_EXT\0"
2413+ "GL_CONVOLUTION_FORMAT\0"
2414+ "GL_CONVOLUTION_FORMAT_EXT\0"
2415+ "GL_CONVOLUTION_HEIGHT\0"
2416+ "GL_CONVOLUTION_HEIGHT_EXT\0"
2417+ "GL_CONVOLUTION_WIDTH\0"
2418+ "GL_CONVOLUTION_WIDTH_EXT\0"
2419+ "GL_COORD_REPLACE\0"
2420+ "GL_COORD_REPLACE_ARB\0"
2421+ "GL_COORD_REPLACE_NV\0"
2422+ "GL_COPY\0"
2423+ "GL_COPY_INVERTED\0"
2424+ "GL_COPY_PIXEL_TOKEN\0"
2425+ "GL_CULL_FACE\0"
2426+ "GL_CULL_FACE_MODE\0"
2427+ "GL_CULL_VERTEX_EXT\0"
2428+ "GL_CULL_VERTEX_EYE_POSITION_EXT\0"
2429+ "GL_CULL_VERTEX_OBJECT_POSITION_EXT\0"
2430+ "GL_CURRENT_ATTRIB_NV\0"
2431+ "GL_CURRENT_BIT\0"
2432+ "GL_CURRENT_COLOR\0"
2433+ "GL_CURRENT_FOG_COORD\0"
2434+ "GL_CURRENT_FOG_COORDINATE\0"
2435+ "GL_CURRENT_INDEX\0"
2436+ "GL_CURRENT_MATRIX_ARB\0"
2437+ "GL_CURRENT_MATRIX_INDEX_ARB\0"
2438+ "GL_CURRENT_MATRIX_NV\0"
2439+ "GL_CURRENT_MATRIX_STACK_DEPTH_ARB\0"
2440+ "GL_CURRENT_MATRIX_STACK_DEPTH_NV\0"
2441+ "GL_CURRENT_NORMAL\0"
2442+ "GL_CURRENT_PALETTE_MATRIX_ARB\0"
2443+ "GL_CURRENT_PROGRAM\0"
2444+ "GL_CURRENT_QUERY\0"
2445+ "GL_CURRENT_QUERY_ARB\0"
2446+ "GL_CURRENT_RASTER_COLOR\0"
2447+ "GL_CURRENT_RASTER_DISTANCE\0"
2448+ "GL_CURRENT_RASTER_INDEX\0"
2449+ "GL_CURRENT_RASTER_POSITION\0"
2450+ "GL_CURRENT_RASTER_POSITION_VALID\0"
2451+ "GL_CURRENT_RASTER_TEXTURE_COORDS\0"
2452+ "GL_CURRENT_SECONDARY_COLOR\0"
2453+ "GL_CURRENT_TEXTURE_COORDS\0"
2454+ "GL_CURRENT_VERTEX_ATTRIB\0"
2455+ "GL_CURRENT_VERTEX_ATTRIB_ARB\0"
2456+ "GL_CURRENT_WEIGHT_ARB\0"
2457+ "GL_CW\0"
2458+ "GL_DEBUG_ASSERT_MESA\0"
2459+ "GL_DEBUG_OBJECT_MESA\0"
2460+ "GL_DEBUG_PRINT_MESA\0"
2461+ "GL_DECAL\0"
2462+ "GL_DECR\0"
2463+ "GL_DECR_WRAP\0"
2464+ "GL_DECR_WRAP_EXT\0"
2465+ "GL_DELETE_STATUS\0"
2466+ "GL_DEPTH\0"
2467+ "GL_DEPTH_ATTACHMENT_EXT\0"
2468+ "GL_DEPTH_BIAS\0"
2469+ "GL_DEPTH_BITS\0"
2470+ "GL_DEPTH_BOUNDS_EXT\0"
2471+ "GL_DEPTH_BOUNDS_TEST_EXT\0"
2472+ "GL_DEPTH_BUFFER_BIT\0"
2473+ "GL_DEPTH_CLAMP_NV\0"
2474+ "GL_DEPTH_CLEAR_VALUE\0"
2475+ "GL_DEPTH_COMPONENT\0"
2476+ "GL_DEPTH_COMPONENT16\0"
2477+ "GL_DEPTH_COMPONENT16_ARB\0"
2478+ "GL_DEPTH_COMPONENT16_SGIX\0"
2479+ "GL_DEPTH_COMPONENT24\0"
2480+ "GL_DEPTH_COMPONENT24_ARB\0"
2481+ "GL_DEPTH_COMPONENT24_SGIX\0"
2482+ "GL_DEPTH_COMPONENT32\0"
2483+ "GL_DEPTH_COMPONENT32_ARB\0"
2484+ "GL_DEPTH_COMPONENT32_SGIX\0"
2485+ "GL_DEPTH_FUNC\0"
2486+ "GL_DEPTH_RANGE\0"
2487+ "GL_DEPTH_SCALE\0"
2488+ "GL_DEPTH_STENCIL_NV\0"
2489+ "GL_DEPTH_STENCIL_TO_BGRA_NV\0"
2490+ "GL_DEPTH_STENCIL_TO_RGBA_NV\0"
2491+ "GL_DEPTH_TEST\0"
2492+ "GL_DEPTH_TEXTURE_MODE\0"
2493+ "GL_DEPTH_TEXTURE_MODE_ARB\0"
2494+ "GL_DEPTH_WRITEMASK\0"
2495+ "GL_DIFFUSE\0"
2496+ "GL_DITHER\0"
2497+ "GL_DOMAIN\0"
2498+ "GL_DONT_CARE\0"
2499+ "GL_DOT3_RGB\0"
2500+ "GL_DOT3_RGBA\0"
2501+ "GL_DOT3_RGBA_ARB\0"
2502+ "GL_DOT3_RGBA_EXT\0"
2503+ "GL_DOT3_RGB_ARB\0"
2504+ "GL_DOT3_RGB_EXT\0"
2505+ "GL_DOUBLE\0"
2506+ "GL_DOUBLEBUFFER\0"
2507+ "GL_DRAW_BUFFER\0"
2508+ "GL_DRAW_BUFFER0\0"
2509+ "GL_DRAW_BUFFER0_ARB\0"
2510+ "GL_DRAW_BUFFER0_ATI\0"
2511+ "GL_DRAW_BUFFER1\0"
2512+ "GL_DRAW_BUFFER10\0"
2513+ "GL_DRAW_BUFFER10_ARB\0"
2514+ "GL_DRAW_BUFFER10_ATI\0"
2515+ "GL_DRAW_BUFFER11\0"
2516+ "GL_DRAW_BUFFER11_ARB\0"
2517+ "GL_DRAW_BUFFER11_ATI\0"
2518+ "GL_DRAW_BUFFER12\0"
2519+ "GL_DRAW_BUFFER12_ARB\0"
2520+ "GL_DRAW_BUFFER12_ATI\0"
2521+ "GL_DRAW_BUFFER13\0"
2522+ "GL_DRAW_BUFFER13_ARB\0"
2523+ "GL_DRAW_BUFFER13_ATI\0"
2524+ "GL_DRAW_BUFFER14\0"
2525+ "GL_DRAW_BUFFER14_ARB\0"
2526+ "GL_DRAW_BUFFER14_ATI\0"
2527+ "GL_DRAW_BUFFER15\0"
2528+ "GL_DRAW_BUFFER15_ARB\0"
2529+ "GL_DRAW_BUFFER15_ATI\0"
2530+ "GL_DRAW_BUFFER1_ARB\0"
2531+ "GL_DRAW_BUFFER1_ATI\0"
2532+ "GL_DRAW_BUFFER2\0"
2533+ "GL_DRAW_BUFFER2_ARB\0"
2534+ "GL_DRAW_BUFFER2_ATI\0"
2535+ "GL_DRAW_BUFFER3\0"
2536+ "GL_DRAW_BUFFER3_ARB\0"
2537+ "GL_DRAW_BUFFER3_ATI\0"
2538+ "GL_DRAW_BUFFER4\0"
2539+ "GL_DRAW_BUFFER4_ARB\0"
2540+ "GL_DRAW_BUFFER4_ATI\0"
2541+ "GL_DRAW_BUFFER5\0"
2542+ "GL_DRAW_BUFFER5_ARB\0"
2543+ "GL_DRAW_BUFFER5_ATI\0"
2544+ "GL_DRAW_BUFFER6\0"
2545+ "GL_DRAW_BUFFER6_ARB\0"
2546+ "GL_DRAW_BUFFER6_ATI\0"
2547+ "GL_DRAW_BUFFER7\0"
2548+ "GL_DRAW_BUFFER7_ARB\0"
2549+ "GL_DRAW_BUFFER7_ATI\0"
2550+ "GL_DRAW_BUFFER8\0"
2551+ "GL_DRAW_BUFFER8_ARB\0"
2552+ "GL_DRAW_BUFFER8_ATI\0"
2553+ "GL_DRAW_BUFFER9\0"
2554+ "GL_DRAW_BUFFER9_ARB\0"
2555+ "GL_DRAW_BUFFER9_ATI\0"
2556+ "GL_DRAW_FRAMEBUFFER_BINDING_EXT\0"
2557+ "GL_DRAW_FRAMEBUFFER_EXT\0"
2558+ "GL_DRAW_PIXEL_TOKEN\0"
2559+ "GL_DST_ALPHA\0"
2560+ "GL_DST_COLOR\0"
2561+ "GL_DYNAMIC_COPY\0"
2562+ "GL_DYNAMIC_COPY_ARB\0"
2563+ "GL_DYNAMIC_DRAW\0"
2564+ "GL_DYNAMIC_DRAW_ARB\0"
2565+ "GL_DYNAMIC_READ\0"
2566+ "GL_DYNAMIC_READ_ARB\0"
2567+ "GL_EDGE_FLAG\0"
2568+ "GL_EDGE_FLAG_ARRAY\0"
2569+ "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING\0"
2570+ "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB\0"
2571+ "GL_EDGE_FLAG_ARRAY_POINTER\0"
2572+ "GL_EDGE_FLAG_ARRAY_STRIDE\0"
2573+ "GL_ELEMENT_ARRAY_BUFFER\0"
2574+ "GL_ELEMENT_ARRAY_BUFFER_ARB\0"
2575+ "GL_ELEMENT_ARRAY_BUFFER_BINDING\0"
2576+ "GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB\0"
2577+ "GL_EMISSION\0"
2578+ "GL_ENABLE_BIT\0"
2579+ "GL_EQUAL\0"
2580+ "GL_EQUIV\0"
2581+ "GL_EVAL_BIT\0"
2582+ "GL_EXP\0"
2583+ "GL_EXP2\0"
2584+ "GL_EXTENSIONS\0"
2585+ "GL_EYE_LINEAR\0"
2586+ "GL_EYE_PLANE\0"
2587+ "GL_EYE_PLANE_ABSOLUTE_NV\0"
2588+ "GL_EYE_RADIAL_NV\0"
2589+ "GL_FALSE\0"
2590+ "GL_FASTEST\0"
2591+ "GL_FEEDBACK\0"
2592+ "GL_FEEDBACK_BUFFER_POINTER\0"
2593+ "GL_FEEDBACK_BUFFER_SIZE\0"
2594+ "GL_FEEDBACK_BUFFER_TYPE\0"
2595+ "GL_FILL\0"
2596+ "GL_FLAT\0"
2597+ "GL_FLOAT\0"
2598+ "GL_FLOAT_MAT2\0"
2599+ "GL_FLOAT_MAT2_ARB\0"
2600+ "GL_FLOAT_MAT3\0"
2601+ "GL_FLOAT_MAT3_ARB\0"
2602+ "GL_FLOAT_MAT4\0"
2603+ "GL_FLOAT_MAT4_ARB\0"
2604+ "GL_FLOAT_VEC2\0"
2605+ "GL_FLOAT_VEC2_ARB\0"
2606+ "GL_FLOAT_VEC3\0"
2607+ "GL_FLOAT_VEC3_ARB\0"
2608+ "GL_FLOAT_VEC4\0"
2609+ "GL_FLOAT_VEC4_ARB\0"
2610+ "GL_FOG\0"
2611+ "GL_FOG_BIT\0"
2612+ "GL_FOG_COLOR\0"
2613+ "GL_FOG_COORD\0"
2614+ "GL_FOG_COORDINATE\0"
2615+ "GL_FOG_COORDINATE_ARRAY\0"
2616+ "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING\0"
2617+ "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB\0"
2618+ "GL_FOG_COORDINATE_ARRAY_POINTER\0"
2619+ "GL_FOG_COORDINATE_ARRAY_STRIDE\0"
2620+ "GL_FOG_COORDINATE_ARRAY_TYPE\0"
2621+ "GL_FOG_COORDINATE_SOURCE\0"
2622+ "GL_FOG_COORD_ARRAY\0"
2623+ "GL_FOG_COORD_ARRAY_BUFFER_BINDING\0"
2624+ "GL_FOG_COORD_ARRAY_POINTER\0"
2625+ "GL_FOG_COORD_ARRAY_STRIDE\0"
2626+ "GL_FOG_COORD_ARRAY_TYPE\0"
2627+ "GL_FOG_COORD_SRC\0"
2628+ "GL_FOG_DENSITY\0"
2629+ "GL_FOG_DISTANCE_MODE_NV\0"
2630+ "GL_FOG_END\0"
2631+ "GL_FOG_HINT\0"
2632+ "GL_FOG_INDEX\0"
2633+ "GL_FOG_MODE\0"
2634+ "GL_FOG_OFFSET_SGIX\0"
2635+ "GL_FOG_OFFSET_VALUE_SGIX\0"
2636+ "GL_FOG_START\0"
2637+ "GL_FRAGMENT_DEPTH\0"
2638+ "GL_FRAGMENT_PROGRAM_ARB\0"
2639+ "GL_FRAGMENT_SHADER\0"
2640+ "GL_FRAGMENT_SHADER_ARB\0"
2641+ "GL_FRAGMENT_SHADER_DERIVATIVE_HINT\0"
2642+ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT\0"
2643+ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT\0"
2644+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT\0"
2645+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT\0"
2646+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT\0"
2647+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT\0"
2648+ "GL_FRAMEBUFFER_BINDING_EXT\0"
2649+ "GL_FRAMEBUFFER_COMPLETE_EXT\0"
2650+ "GL_FRAMEBUFFER_EXT\0"
2651+ "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT\0"
2652+ "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT\0"
2653+ "GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT\0"
2654+ "GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT\0"
2655+ "GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT\0"
2656+ "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT\0"
2657+ "GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT\0"
2658+ "GL_FRAMEBUFFER_STATUS_ERROR_EXT\0"
2659+ "GL_FRAMEBUFFER_UNSUPPORTED_EXT\0"
2660+ "GL_FRONT\0"
2661+ "GL_FRONT_AND_BACK\0"
2662+ "GL_FRONT_FACE\0"
2663+ "GL_FRONT_LEFT\0"
2664+ "GL_FRONT_RIGHT\0"
2665+ "GL_FUNC_ADD\0"
2666+ "GL_FUNC_ADD_EXT\0"
2667+ "GL_FUNC_REVERSE_SUBTRACT\0"
2668+ "GL_FUNC_REVERSE_SUBTRACT_EXT\0"
2669+ "GL_FUNC_SUBTRACT\0"
2670+ "GL_FUNC_SUBTRACT_EXT\0"
2671+ "GL_GENERATE_MIPMAP\0"
2672+ "GL_GENERATE_MIPMAP_HINT\0"
2673+ "GL_GENERATE_MIPMAP_HINT_SGIS\0"
2674+ "GL_GENERATE_MIPMAP_SGIS\0"
2675+ "GL_GEQUAL\0"
2676+ "GL_GL_BLEND_EQUATION_RGB\0"
2677+ "GL_GL_COMPRESSED_SLUMINANCE\0"
2678+ "GL_GL_COMPRESSED_SLUMINANCE_ALPHA\0"
2679+ "GL_GL_COMPRESSED_SRGB\0"
2680+ "GL_GL_COMPRESSED_SRGB_ALPHA\0"
2681+ "GL_GL_CURRENT_RASTER_SECONDARY_COLOR\0"
2682+ "GL_GL_FLOAT_MAT2x3\0"
2683+ "GL_GL_FLOAT_MAT2x4\0"
2684+ "GL_GL_FLOAT_MAT3x2\0"
2685+ "GL_GL_FLOAT_MAT3x4\0"
2686+ "GL_GL_FLOAT_MAT4x2\0"
2687+ "GL_GL_FLOAT_MAT4x3\0"
2688+ "GL_GL_PIXEL_PACK_BUFFER\0"
2689+ "GL_GL_PIXEL_PACK_BUFFER_BINDING\0"
2690+ "GL_GL_PIXEL_UNPACK_BUFFER\0"
2691+ "GL_GL_PIXEL_UNPACK_BUFFER_BINDING\0"
2692+ "GL_GL_SLUMINANCE\0"
2693+ "GL_GL_SLUMINANCE8\0"
2694+ "GL_GL_SLUMINANCE8_ALPHA8\0"
2695+ "GL_GL_SLUMINANCE_ALPHA\0"
2696+ "GL_GL_SRGB\0"
2697+ "GL_GL_SRGB8\0"
2698+ "GL_GL_SRGB8_ALPHA8\0"
2699+ "GL_GL_SRGB_ALPHA\0"
2700+ "GL_GREATER\0"
2701+ "GL_GREEN\0"
2702+ "GL_GREEN_BIAS\0"
2703+ "GL_GREEN_BITS\0"
2704+ "GL_GREEN_SCALE\0"
2705+ "GL_HINT_BIT\0"
2706+ "GL_HISTOGRAM\0"
2707+ "GL_HISTOGRAM_ALPHA_SIZE\0"
2708+ "GL_HISTOGRAM_ALPHA_SIZE_EXT\0"
2709+ "GL_HISTOGRAM_BLUE_SIZE\0"
2710+ "GL_HISTOGRAM_BLUE_SIZE_EXT\0"
2711+ "GL_HISTOGRAM_EXT\0"
2712+ "GL_HISTOGRAM_FORMAT\0"
2713+ "GL_HISTOGRAM_FORMAT_EXT\0"
2714+ "GL_HISTOGRAM_GREEN_SIZE\0"
2715+ "GL_HISTOGRAM_GREEN_SIZE_EXT\0"
2716+ "GL_HISTOGRAM_LUMINANCE_SIZE\0"
2717+ "GL_HISTOGRAM_LUMINANCE_SIZE_EXT\0"
2718+ "GL_HISTOGRAM_RED_SIZE\0"
2719+ "GL_HISTOGRAM_RED_SIZE_EXT\0"
2720+ "GL_HISTOGRAM_SINK\0"
2721+ "GL_HISTOGRAM_SINK_EXT\0"
2722+ "GL_HISTOGRAM_WIDTH\0"
2723+ "GL_HISTOGRAM_WIDTH_EXT\0"
2724+ "GL_IDENTITY_NV\0"
2725+ "GL_IGNORE_BORDER_HP\0"
2726+ "GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES\0"
2727+ "GL_IMPLEMENTATION_COLOR_READ_TYPE_OES\0"
2728+ "GL_INCR\0"
2729+ "GL_INCR_WRAP\0"
2730+ "GL_INCR_WRAP_EXT\0"
2731+ "GL_INDEX_ARRAY\0"
2732+ "GL_INDEX_ARRAY_BUFFER_BINDING\0"
2733+ "GL_INDEX_ARRAY_BUFFER_BINDING_ARB\0"
2734+ "GL_INDEX_ARRAY_POINTER\0"
2735+ "GL_INDEX_ARRAY_STRIDE\0"
2736+ "GL_INDEX_ARRAY_TYPE\0"
2737+ "GL_INDEX_BITS\0"
2738+ "GL_INDEX_CLEAR_VALUE\0"
2739+ "GL_INDEX_LOGIC_OP\0"
2740+ "GL_INDEX_MODE\0"
2741+ "GL_INDEX_OFFSET\0"
2742+ "GL_INDEX_SHIFT\0"
2743+ "GL_INDEX_WRITEMASK\0"
2744+ "GL_INFO_LOG_LENGTH\0"
2745+ "GL_INT\0"
2746+ "GL_INTENSITY\0"
2747+ "GL_INTENSITY12\0"
2748+ "GL_INTENSITY12_EXT\0"
2749+ "GL_INTENSITY16\0"
2750+ "GL_INTENSITY16_EXT\0"
2751+ "GL_INTENSITY4\0"
2752+ "GL_INTENSITY4_EXT\0"
2753+ "GL_INTENSITY8\0"
2754+ "GL_INTENSITY8_EXT\0"
2755+ "GL_INTENSITY_EXT\0"
2756+ "GL_INTERPOLATE\0"
2757+ "GL_INTERPOLATE_ARB\0"
2758+ "GL_INTERPOLATE_EXT\0"
2759+ "GL_INT_VEC2\0"
2760+ "GL_INT_VEC2_ARB\0"
2761+ "GL_INT_VEC3\0"
2762+ "GL_INT_VEC3_ARB\0"
2763+ "GL_INT_VEC4\0"
2764+ "GL_INT_VEC4_ARB\0"
2765+ "GL_INVALID_ENUM\0"
2766+ "GL_INVALID_FRAMEBUFFER_OPERATION_EXT\0"
2767+ "GL_INVALID_OPERATION\0"
2768+ "GL_INVALID_VALUE\0"
2769+ "GL_INVERSE_NV\0"
2770+ "GL_INVERSE_TRANSPOSE_NV\0"
2771+ "GL_INVERT\0"
2772+ "GL_KEEP\0"
2773+ "GL_LEFT\0"
2774+ "GL_LEQUAL\0"
2775+ "GL_LESS\0"
2776+ "GL_LIGHT0\0"
2777+ "GL_LIGHT1\0"
2778+ "GL_LIGHT2\0"
2779+ "GL_LIGHT3\0"
2780+ "GL_LIGHT4\0"
2781+ "GL_LIGHT5\0"
2782+ "GL_LIGHT6\0"
2783+ "GL_LIGHT7\0"
2784+ "GL_LIGHTING\0"
2785+ "GL_LIGHTING_BIT\0"
2786+ "GL_LIGHT_MODEL_AMBIENT\0"
2787+ "GL_LIGHT_MODEL_COLOR_CONTROL\0"
2788+ "GL_LIGHT_MODEL_COLOR_CONTROL_EXT\0"
2789+ "GL_LIGHT_MODEL_LOCAL_VIEWER\0"
2790+ "GL_LIGHT_MODEL_TWO_SIDE\0"
2791+ "GL_LINE\0"
2792+ "GL_LINEAR\0"
2793+ "GL_LINEAR_ATTENUATION\0"
2794+ "GL_LINEAR_CLIPMAP_LINEAR_SGIX\0"
2795+ "GL_LINEAR_CLIPMAP_NEAREST_SGIX\0"
2796+ "GL_LINEAR_MIPMAP_LINEAR\0"
2797+ "GL_LINEAR_MIPMAP_NEAREST\0"
2798+ "GL_LINES\0"
2799+ "GL_LINE_BIT\0"
2800+ "GL_LINE_LOOP\0"
2801+ "GL_LINE_RESET_TOKEN\0"
2802+ "GL_LINE_SMOOTH\0"
2803+ "GL_LINE_SMOOTH_HINT\0"
2804+ "GL_LINE_STIPPLE\0"
2805+ "GL_LINE_STIPPLE_PATTERN\0"
2806+ "GL_LINE_STIPPLE_REPEAT\0"
2807+ "GL_LINE_STRIP\0"
2808+ "GL_LINE_TOKEN\0"
2809+ "GL_LINE_WIDTH\0"
2810+ "GL_LINE_WIDTH_GRANULARITY\0"
2811+ "GL_LINE_WIDTH_RANGE\0"
2812+ "GL_LINK_STATUS\0"
2813+ "GL_LIST_BASE\0"
2814+ "GL_LIST_BIT\0"
2815+ "GL_LIST_INDEX\0"
2816+ "GL_LIST_MODE\0"
2817+ "GL_LOAD\0"
2818+ "GL_LOGIC_OP\0"
2819+ "GL_LOGIC_OP_MODE\0"
2820+ "GL_LOWER_LEFT\0"
2821+ "GL_LUMINANCE\0"
2822+ "GL_LUMINANCE12\0"
2823+ "GL_LUMINANCE12_ALPHA12\0"
2824+ "GL_LUMINANCE12_ALPHA12_EXT\0"
2825+ "GL_LUMINANCE12_ALPHA4\0"
2826+ "GL_LUMINANCE12_ALPHA4_EXT\0"
2827+ "GL_LUMINANCE12_EXT\0"
2828+ "GL_LUMINANCE16\0"
2829+ "GL_LUMINANCE16_ALPHA16\0"
2830+ "GL_LUMINANCE16_ALPHA16_EXT\0"
2831+ "GL_LUMINANCE16_EXT\0"
2832+ "GL_LUMINANCE4\0"
2833+ "GL_LUMINANCE4_ALPHA4\0"
2834+ "GL_LUMINANCE4_ALPHA4_EXT\0"
2835+ "GL_LUMINANCE4_EXT\0"
2836+ "GL_LUMINANCE6_ALPHA2\0"
2837+ "GL_LUMINANCE6_ALPHA2_EXT\0"
2838+ "GL_LUMINANCE8\0"
2839+ "GL_LUMINANCE8_ALPHA8\0"
2840+ "GL_LUMINANCE8_ALPHA8_EXT\0"
2841+ "GL_LUMINANCE8_EXT\0"
2842+ "GL_LUMINANCE_ALPHA\0"
2843+ "GL_MAP1_COLOR_4\0"
2844+ "GL_MAP1_GRID_DOMAIN\0"
2845+ "GL_MAP1_GRID_SEGMENTS\0"
2846+ "GL_MAP1_INDEX\0"
2847+ "GL_MAP1_NORMAL\0"
2848+ "GL_MAP1_TEXTURE_COORD_1\0"
2849+ "GL_MAP1_TEXTURE_COORD_2\0"
2850+ "GL_MAP1_TEXTURE_COORD_3\0"
2851+ "GL_MAP1_TEXTURE_COORD_4\0"
2852+ "GL_MAP1_VERTEX_3\0"
2853+ "GL_MAP1_VERTEX_4\0"
2854+ "GL_MAP1_VERTEX_ATTRIB0_4_NV\0"
2855+ "GL_MAP1_VERTEX_ATTRIB10_4_NV\0"
2856+ "GL_MAP1_VERTEX_ATTRIB11_4_NV\0"
2857+ "GL_MAP1_VERTEX_ATTRIB12_4_NV\0"
2858+ "GL_MAP1_VERTEX_ATTRIB13_4_NV\0"
2859+ "GL_MAP1_VERTEX_ATTRIB14_4_NV\0"
2860+ "GL_MAP1_VERTEX_ATTRIB15_4_NV\0"
2861+ "GL_MAP1_VERTEX_ATTRIB1_4_NV\0"
2862+ "GL_MAP1_VERTEX_ATTRIB2_4_NV\0"
2863+ "GL_MAP1_VERTEX_ATTRIB3_4_NV\0"
2864+ "GL_MAP1_VERTEX_ATTRIB4_4_NV\0"
2865+ "GL_MAP1_VERTEX_ATTRIB5_4_NV\0"
2866+ "GL_MAP1_VERTEX_ATTRIB6_4_NV\0"
2867+ "GL_MAP1_VERTEX_ATTRIB7_4_NV\0"
2868+ "GL_MAP1_VERTEX_ATTRIB8_4_NV\0"
2869+ "GL_MAP1_VERTEX_ATTRIB9_4_NV\0"
2870+ "GL_MAP2_COLOR_4\0"
2871+ "GL_MAP2_GRID_DOMAIN\0"
2872+ "GL_MAP2_GRID_SEGMENTS\0"
2873+ "GL_MAP2_INDEX\0"
2874+ "GL_MAP2_NORMAL\0"
2875+ "GL_MAP2_TEXTURE_COORD_1\0"
2876+ "GL_MAP2_TEXTURE_COORD_2\0"
2877+ "GL_MAP2_TEXTURE_COORD_3\0"
2878+ "GL_MAP2_TEXTURE_COORD_4\0"
2879+ "GL_MAP2_VERTEX_3\0"
2880+ "GL_MAP2_VERTEX_4\0"
2881+ "GL_MAP2_VERTEX_ATTRIB0_4_NV\0"
2882+ "GL_MAP2_VERTEX_ATTRIB10_4_NV\0"
2883+ "GL_MAP2_VERTEX_ATTRIB11_4_NV\0"
2884+ "GL_MAP2_VERTEX_ATTRIB12_4_NV\0"
2885+ "GL_MAP2_VERTEX_ATTRIB13_4_NV\0"
2886+ "GL_MAP2_VERTEX_ATTRIB14_4_NV\0"
2887+ "GL_MAP2_VERTEX_ATTRIB15_4_NV\0"
2888+ "GL_MAP2_VERTEX_ATTRIB1_4_NV\0"
2889+ "GL_MAP2_VERTEX_ATTRIB2_4_NV\0"
2890+ "GL_MAP2_VERTEX_ATTRIB3_4_NV\0"
2891+ "GL_MAP2_VERTEX_ATTRIB4_4_NV\0"
2892+ "GL_MAP2_VERTEX_ATTRIB5_4_NV\0"
2893+ "GL_MAP2_VERTEX_ATTRIB6_4_NV\0"
2894+ "GL_MAP2_VERTEX_ATTRIB7_4_NV\0"
2895+ "GL_MAP2_VERTEX_ATTRIB8_4_NV\0"
2896+ "GL_MAP2_VERTEX_ATTRIB9_4_NV\0"
2897+ "GL_MAP_COLOR\0"
2898+ "GL_MAP_STENCIL\0"
2899+ "GL_MATRIX0_ARB\0"
2900+ "GL_MATRIX0_NV\0"
2901+ "GL_MATRIX10_ARB\0"
2902+ "GL_MATRIX11_ARB\0"
2903+ "GL_MATRIX12_ARB\0"
2904+ "GL_MATRIX13_ARB\0"
2905+ "GL_MATRIX14_ARB\0"
2906+ "GL_MATRIX15_ARB\0"
2907+ "GL_MATRIX16_ARB\0"
2908+ "GL_MATRIX17_ARB\0"
2909+ "GL_MATRIX18_ARB\0"
2910+ "GL_MATRIX19_ARB\0"
2911+ "GL_MATRIX1_ARB\0"
2912+ "GL_MATRIX1_NV\0"
2913+ "GL_MATRIX20_ARB\0"
2914+ "GL_MATRIX21_ARB\0"
2915+ "GL_MATRIX22_ARB\0"
2916+ "GL_MATRIX23_ARB\0"
2917+ "GL_MATRIX24_ARB\0"
2918+ "GL_MATRIX25_ARB\0"
2919+ "GL_MATRIX26_ARB\0"
2920+ "GL_MATRIX27_ARB\0"
2921+ "GL_MATRIX28_ARB\0"
2922+ "GL_MATRIX29_ARB\0"
2923+ "GL_MATRIX2_ARB\0"
2924+ "GL_MATRIX2_NV\0"
2925+ "GL_MATRIX30_ARB\0"
2926+ "GL_MATRIX31_ARB\0"
2927+ "GL_MATRIX3_ARB\0"
2928+ "GL_MATRIX3_NV\0"
2929+ "GL_MATRIX4_ARB\0"
2930+ "GL_MATRIX4_NV\0"
2931+ "GL_MATRIX5_ARB\0"
2932+ "GL_MATRIX5_NV\0"
2933+ "GL_MATRIX6_ARB\0"
2934+ "GL_MATRIX6_NV\0"
2935+ "GL_MATRIX7_ARB\0"
2936+ "GL_MATRIX7_NV\0"
2937+ "GL_MATRIX8_ARB\0"
2938+ "GL_MATRIX9_ARB\0"
2939+ "GL_MATRIX_INDEX_ARRAY_ARB\0"
2940+ "GL_MATRIX_INDEX_ARRAY_POINTER_ARB\0"
2941+ "GL_MATRIX_INDEX_ARRAY_SIZE_ARB\0"
2942+ "GL_MATRIX_INDEX_ARRAY_STRIDE_ARB\0"
2943+ "GL_MATRIX_INDEX_ARRAY_TYPE_ARB\0"
2944+ "GL_MATRIX_MODE\0"
2945+ "GL_MATRIX_PALETTE_ARB\0"
2946+ "GL_MAX\0"
2947+ "GL_MAX_3D_TEXTURE_SIZE\0"
2948+ "GL_MAX_ARRAY_TEXTURE_LAYERS_EXT\0"
2949+ "GL_MAX_ATTRIB_STACK_DEPTH\0"
2950+ "GL_MAX_CLIENT_ATTRIB_STACK_DEPTH\0"
2951+ "GL_MAX_CLIPMAP_DEPTH_SGIX\0"
2952+ "GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX\0"
2953+ "GL_MAX_CLIP_PLANES\0"
2954+ "GL_MAX_COLOR_ATTACHMENTS_EXT\0"
2955+ "GL_MAX_COLOR_MATRIX_STACK_DEPTH\0"
2956+ "GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI\0"
2957+ "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS\0"
2958+ "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB\0"
2959+ "GL_MAX_CONVOLUTION_HEIGHT\0"
2960+ "GL_MAX_CONVOLUTION_HEIGHT_EXT\0"
2961+ "GL_MAX_CONVOLUTION_WIDTH\0"
2962+ "GL_MAX_CONVOLUTION_WIDTH_EXT\0"
2963+ "GL_MAX_CUBE_MAP_TEXTURE_SIZE\0"
2964+ "GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB\0"
2965+ "GL_MAX_DRAW_BUFFERS\0"
2966+ "GL_MAX_DRAW_BUFFERS_ARB\0"
2967+ "GL_MAX_DRAW_BUFFERS_ATI\0"
2968+ "GL_MAX_ELEMENTS_INDICES\0"
2969+ "GL_MAX_ELEMENTS_VERTICES\0"
2970+ "GL_MAX_EVAL_ORDER\0"
2971+ "GL_MAX_EXT\0"
2972+ "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS\0"
2973+ "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB\0"
2974+ "GL_MAX_LIGHTS\0"
2975+ "GL_MAX_LIST_NESTING\0"
2976+ "GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB\0"
2977+ "GL_MAX_MODELVIEW_STACK_DEPTH\0"
2978+ "GL_MAX_NAME_STACK_DEPTH\0"
2979+ "GL_MAX_PALETTE_MATRICES_ARB\0"
2980+ "GL_MAX_PIXEL_MAP_TABLE\0"
2981+ "GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB\0"
2982+ "GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB\0"
2983+ "GL_MAX_PROGRAM_ATTRIBS_ARB\0"
2984+ "GL_MAX_PROGRAM_CALL_DEPTH_NV\0"
2985+ "GL_MAX_PROGRAM_ENV_PARAMETERS_ARB\0"
2986+ "GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV\0"
2987+ "GL_MAX_PROGRAM_IF_DEPTH_NV\0"
2988+ "GL_MAX_PROGRAM_INSTRUCTIONS_ARB\0"
2989+ "GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB\0"
2990+ "GL_MAX_PROGRAM_LOOP_COUNT_NV\0"
2991+ "GL_MAX_PROGRAM_LOOP_DEPTH_NV\0"
2992+ "GL_MAX_PROGRAM_MATRICES_ARB\0"
2993+ "GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB\0"
2994+ "GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB\0"
2995+ "GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB\0"
2996+ "GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB\0"
2997+ "GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB\0"
2998+ "GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB\0"
2999+ "GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB\0"
3000+ "GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB\0"
3001+ "GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB\0"
3002+ "GL_MAX_PROGRAM_PARAMETERS_ARB\0"
3003+ "GL_MAX_PROGRAM_TEMPORARIES_ARB\0"
3004+ "GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB\0"
3005+ "GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB\0"
3006+ "GL_MAX_PROJECTION_STACK_DEPTH\0"
3007+ "GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB\0"
3008+ "GL_MAX_RECTANGLE_TEXTURE_SIZE_NV\0"
3009+ "GL_MAX_RENDERBUFFER_SIZE_EXT\0"
3010+ "GL_MAX_SHININESS_NV\0"
3011+ "GL_MAX_SPOT_EXPONENT_NV\0"
3012+ "GL_MAX_TEXTURE_COORDS\0"
3013+ "GL_MAX_TEXTURE_COORDS_ARB\0"
3014+ "GL_MAX_TEXTURE_IMAGE_UNITS\0"
3015+ "GL_MAX_TEXTURE_IMAGE_UNITS_ARB\0"
3016+ "GL_MAX_TEXTURE_LOD_BIAS\0"
3017+ "GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT\0"
3018+ "GL_MAX_TEXTURE_SIZE\0"
3019+ "GL_MAX_TEXTURE_STACK_DEPTH\0"
3020+ "GL_MAX_TEXTURE_UNITS\0"
3021+ "GL_MAX_TEXTURE_UNITS_ARB\0"
3022+ "GL_MAX_TRACK_MATRICES_NV\0"
3023+ "GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV\0"
3024+ "GL_MAX_VARYING_FLOATS\0"
3025+ "GL_MAX_VARYING_FLOATS_ARB\0"
3026+ "GL_MAX_VERTEX_ATTRIBS\0"
3027+ "GL_MAX_VERTEX_ATTRIBS_ARB\0"
3028+ "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS\0"
3029+ "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB\0"
3030+ "GL_MAX_VERTEX_UNIFORM_COMPONENTS\0"
3031+ "GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB\0"
3032+ "GL_MAX_VERTEX_UNITS_ARB\0"
3033+ "GL_MAX_VIEWPORT_DIMS\0"
3034+ "GL_MIN\0"
3035+ "GL_MINMAX\0"
3036+ "GL_MINMAX_EXT\0"
3037+ "GL_MINMAX_FORMAT\0"
3038+ "GL_MINMAX_FORMAT_EXT\0"
3039+ "GL_MINMAX_SINK\0"
3040+ "GL_MINMAX_SINK_EXT\0"
3041+ "GL_MIN_EXT\0"
3042+ "GL_MIRRORED_REPEAT\0"
3043+ "GL_MIRRORED_REPEAT_ARB\0"
3044+ "GL_MIRRORED_REPEAT_IBM\0"
3045+ "GL_MIRROR_CLAMP_ATI\0"
3046+ "GL_MIRROR_CLAMP_EXT\0"
3047+ "GL_MIRROR_CLAMP_TO_BORDER_EXT\0"
3048+ "GL_MIRROR_CLAMP_TO_EDGE_ATI\0"
3049+ "GL_MIRROR_CLAMP_TO_EDGE_EXT\0"
3050+ "GL_MODELVIEW\0"
3051+ "GL_MODELVIEW0_ARB\0"
3052+ "GL_MODELVIEW10_ARB\0"
3053+ "GL_MODELVIEW11_ARB\0"
3054+ "GL_MODELVIEW12_ARB\0"
3055+ "GL_MODELVIEW13_ARB\0"
3056+ "GL_MODELVIEW14_ARB\0"
3057+ "GL_MODELVIEW15_ARB\0"
3058+ "GL_MODELVIEW16_ARB\0"
3059+ "GL_MODELVIEW17_ARB\0"
3060+ "GL_MODELVIEW18_ARB\0"
3061+ "GL_MODELVIEW19_ARB\0"
3062+ "GL_MODELVIEW1_ARB\0"
3063+ "GL_MODELVIEW20_ARB\0"
3064+ "GL_MODELVIEW21_ARB\0"
3065+ "GL_MODELVIEW22_ARB\0"
3066+ "GL_MODELVIEW23_ARB\0"
3067+ "GL_MODELVIEW24_ARB\0"
3068+ "GL_MODELVIEW25_ARB\0"
3069+ "GL_MODELVIEW26_ARB\0"
3070+ "GL_MODELVIEW27_ARB\0"
3071+ "GL_MODELVIEW28_ARB\0"
3072+ "GL_MODELVIEW29_ARB\0"
3073+ "GL_MODELVIEW2_ARB\0"
3074+ "GL_MODELVIEW30_ARB\0"
3075+ "GL_MODELVIEW31_ARB\0"
3076+ "GL_MODELVIEW3_ARB\0"
3077+ "GL_MODELVIEW4_ARB\0"
3078+ "GL_MODELVIEW5_ARB\0"
3079+ "GL_MODELVIEW6_ARB\0"
3080+ "GL_MODELVIEW7_ARB\0"
3081+ "GL_MODELVIEW8_ARB\0"
3082+ "GL_MODELVIEW9_ARB\0"
3083+ "GL_MODELVIEW_MATRIX\0"
3084+ "GL_MODELVIEW_PROJECTION_NV\0"
3085+ "GL_MODELVIEW_STACK_DEPTH\0"
3086+ "GL_MODULATE\0"
3087+ "GL_MODULATE_ADD_ATI\0"
3088+ "GL_MODULATE_SIGNED_ADD_ATI\0"
3089+ "GL_MODULATE_SUBTRACT_ATI\0"
3090+ "GL_MULT\0"
3091+ "GL_MULTISAMPLE\0"
3092+ "GL_MULTISAMPLE_3DFX\0"
3093+ "GL_MULTISAMPLE_ARB\0"
3094+ "GL_MULTISAMPLE_BIT\0"
3095+ "GL_MULTISAMPLE_BIT_3DFX\0"
3096+ "GL_MULTISAMPLE_BIT_ARB\0"
3097+ "GL_MULTISAMPLE_FILTER_HINT_NV\0"
3098+ "GL_N3F_V3F\0"
3099+ "GL_NAME_STACK_DEPTH\0"
3100+ "GL_NAND\0"
3101+ "GL_NEAREST\0"
3102+ "GL_NEAREST_CLIPMAP_LINEAR_SGIX\0"
3103+ "GL_NEAREST_CLIPMAP_NEAREST_SGIX\0"
3104+ "GL_NEAREST_MIPMAP_LINEAR\0"
3105+ "GL_NEAREST_MIPMAP_NEAREST\0"
3106+ "GL_NEVER\0"
3107+ "GL_NICEST\0"
3108+ "GL_NONE\0"
3109+ "GL_NOOP\0"
3110+ "GL_NOR\0"
3111+ "GL_NORMALIZE\0"
3112+ "GL_NORMAL_ARRAY\0"
3113+ "GL_NORMAL_ARRAY_BUFFER_BINDING\0"
3114+ "GL_NORMAL_ARRAY_BUFFER_BINDING_ARB\0"
3115+ "GL_NORMAL_ARRAY_POINTER\0"
3116+ "GL_NORMAL_ARRAY_STRIDE\0"
3117+ "GL_NORMAL_ARRAY_TYPE\0"
3118+ "GL_NORMAL_MAP\0"
3119+ "GL_NORMAL_MAP_ARB\0"
3120+ "GL_NORMAL_MAP_NV\0"
3121+ "GL_NOTEQUAL\0"
3122+ "GL_NO_ERROR\0"
3123+ "GL_NUM_COMPRESSED_TEXTURE_FORMATS\0"
3124+ "GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB\0"
3125+ "GL_OBJECT_ACTIVE_ATTRIBUTES_ARB\0"
3126+ "GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB\0"
3127+ "GL_OBJECT_ACTIVE_UNIFORMS_ARB\0"
3128+ "GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB\0"
3129+ "GL_OBJECT_ATTACHED_OBJECTS_ARB\0"
3130+ "GL_OBJECT_COMPILE_STATUS_ARB\0"
3131+ "GL_OBJECT_DELETE_STATUS_ARB\0"
3132+ "GL_OBJECT_INFO_LOG_LENGTH_ARB\0"
3133+ "GL_OBJECT_LINEAR\0"
3134+ "GL_OBJECT_LINK_STATUS_ARB\0"
3135+ "GL_OBJECT_PLANE\0"
3136+ "GL_OBJECT_SHADER_SOURCE_LENGTH_ARB\0"
3137+ "GL_OBJECT_SUBTYPE_ARB\0"
3138+ "GL_OBJECT_TYPE_ARB\0"
3139+ "GL_OBJECT_VALIDATE_STATUS_ARB\0"
3140+ "GL_OCCLUSION_TEST_HP\0"
3141+ "GL_OCCLUSION_TEST_RESULT_HP\0"
3142+ "GL_ONE\0"
3143+ "GL_ONE_MINUS_CONSTANT_ALPHA\0"
3144+ "GL_ONE_MINUS_CONSTANT_ALPHA_EXT\0"
3145+ "GL_ONE_MINUS_CONSTANT_COLOR\0"
3146+ "GL_ONE_MINUS_CONSTANT_COLOR_EXT\0"
3147+ "GL_ONE_MINUS_DST_ALPHA\0"
3148+ "GL_ONE_MINUS_DST_COLOR\0"
3149+ "GL_ONE_MINUS_SRC_ALPHA\0"
3150+ "GL_ONE_MINUS_SRC_COLOR\0"
3151+ "GL_OPERAND0_ALPHA\0"
3152+ "GL_OPERAND0_ALPHA_ARB\0"
3153+ "GL_OPERAND0_ALPHA_EXT\0"
3154+ "GL_OPERAND0_RGB\0"
3155+ "GL_OPERAND0_RGB_ARB\0"
3156+ "GL_OPERAND0_RGB_EXT\0"
3157+ "GL_OPERAND1_ALPHA\0"
3158+ "GL_OPERAND1_ALPHA_ARB\0"
3159+ "GL_OPERAND1_ALPHA_EXT\0"
3160+ "GL_OPERAND1_RGB\0"
3161+ "GL_OPERAND1_RGB_ARB\0"
3162+ "GL_OPERAND1_RGB_EXT\0"
3163+ "GL_OPERAND2_ALPHA\0"
3164+ "GL_OPERAND2_ALPHA_ARB\0"
3165+ "GL_OPERAND2_ALPHA_EXT\0"
3166+ "GL_OPERAND2_RGB\0"
3167+ "GL_OPERAND2_RGB_ARB\0"
3168+ "GL_OPERAND2_RGB_EXT\0"
3169+ "GL_OPERAND3_ALPHA_NV\0"
3170+ "GL_OPERAND3_RGB_NV\0"
3171+ "GL_OR\0"
3172+ "GL_ORDER\0"
3173+ "GL_OR_INVERTED\0"
3174+ "GL_OR_REVERSE\0"
3175+ "GL_OUT_OF_MEMORY\0"
3176+ "GL_PACK_ALIGNMENT\0"
3177+ "GL_PACK_IMAGE_HEIGHT\0"
3178+ "GL_PACK_INVERT_MESA\0"
3179+ "GL_PACK_LSB_FIRST\0"
3180+ "GL_PACK_ROW_LENGTH\0"
3181+ "GL_PACK_SKIP_IMAGES\0"
3182+ "GL_PACK_SKIP_PIXELS\0"
3183+ "GL_PACK_SKIP_ROWS\0"
3184+ "GL_PACK_SWAP_BYTES\0"
3185+ "GL_PALETTE4_R5_G6_B5_OES\0"
3186+ "GL_PALETTE4_RGB5_A1_OES\0"
3187+ "GL_PALETTE4_RGB8_OES\0"
3188+ "GL_PALETTE4_RGBA4_OES\0"
3189+ "GL_PALETTE4_RGBA8_OES\0"
3190+ "GL_PALETTE8_R5_G6_B5_OES\0"
3191+ "GL_PALETTE8_RGB5_A1_OES\0"
3192+ "GL_PALETTE8_RGB8_OES\0"
3193+ "GL_PALETTE8_RGBA4_OES\0"
3194+ "GL_PALETTE8_RGBA8_OES\0"
3195+ "GL_PASS_THROUGH_TOKEN\0"
3196+ "GL_PERSPECTIVE_CORRECTION_HINT\0"
3197+ "GL_PIXEL_MAP_A_TO_A\0"
3198+ "GL_PIXEL_MAP_A_TO_A_SIZE\0"
3199+ "GL_PIXEL_MAP_B_TO_B\0"
3200+ "GL_PIXEL_MAP_B_TO_B_SIZE\0"
3201+ "GL_PIXEL_MAP_G_TO_G\0"
3202+ "GL_PIXEL_MAP_G_TO_G_SIZE\0"
3203+ "GL_PIXEL_MAP_I_TO_A\0"
3204+ "GL_PIXEL_MAP_I_TO_A_SIZE\0"
3205+ "GL_PIXEL_MAP_I_TO_B\0"
3206+ "GL_PIXEL_MAP_I_TO_B_SIZE\0"
3207+ "GL_PIXEL_MAP_I_TO_G\0"
3208+ "GL_PIXEL_MAP_I_TO_G_SIZE\0"
3209+ "GL_PIXEL_MAP_I_TO_I\0"
3210+ "GL_PIXEL_MAP_I_TO_I_SIZE\0"
3211+ "GL_PIXEL_MAP_I_TO_R\0"
3212+ "GL_PIXEL_MAP_I_TO_R_SIZE\0"
3213+ "GL_PIXEL_MAP_R_TO_R\0"
3214+ "GL_PIXEL_MAP_R_TO_R_SIZE\0"
3215+ "GL_PIXEL_MAP_S_TO_S\0"
3216+ "GL_PIXEL_MAP_S_TO_S_SIZE\0"
3217+ "GL_PIXEL_MODE_BIT\0"
3218+ "GL_PIXEL_PACK_BUFFER_BINDING_EXT\0"
3219+ "GL_PIXEL_PACK_BUFFER_EXT\0"
3220+ "GL_PIXEL_UNPACK_BUFFER_BINDING_EXT\0"
3221+ "GL_PIXEL_UNPACK_BUFFER_EXT\0"
3222+ "GL_POINT\0"
3223+ "GL_POINTS\0"
3224+ "GL_POINT_BIT\0"
3225+ "GL_POINT_DISTANCE_ATTENUATION\0"
3226+ "GL_POINT_DISTANCE_ATTENUATION_ARB\0"
3227+ "GL_POINT_DISTANCE_ATTENUATION_EXT\0"
3228+ "GL_POINT_DISTANCE_ATTENUATION_SGIS\0"
3229+ "GL_POINT_FADE_THRESHOLD_SIZE\0"
3230+ "GL_POINT_FADE_THRESHOLD_SIZE_ARB\0"
3231+ "GL_POINT_FADE_THRESHOLD_SIZE_EXT\0"
3232+ "GL_POINT_FADE_THRESHOLD_SIZE_SGIS\0"
3233+ "GL_POINT_SIZE\0"
3234+ "GL_POINT_SIZE_GRANULARITY\0"
3235+ "GL_POINT_SIZE_MAX\0"
3236+ "GL_POINT_SIZE_MAX_ARB\0"
3237+ "GL_POINT_SIZE_MAX_EXT\0"
3238+ "GL_POINT_SIZE_MAX_SGIS\0"
3239+ "GL_POINT_SIZE_MIN\0"
3240+ "GL_POINT_SIZE_MIN_ARB\0"
3241+ "GL_POINT_SIZE_MIN_EXT\0"
3242+ "GL_POINT_SIZE_MIN_SGIS\0"
3243+ "GL_POINT_SIZE_RANGE\0"
3244+ "GL_POINT_SMOOTH\0"
3245+ "GL_POINT_SMOOTH_HINT\0"
3246+ "GL_POINT_SPRITE\0"
3247+ "GL_POINT_SPRITE_ARB\0"
3248+ "GL_POINT_SPRITE_COORD_ORIGIN\0"
3249+ "GL_POINT_SPRITE_NV\0"
3250+ "GL_POINT_SPRITE_R_MODE_NV\0"
3251+ "GL_POINT_TOKEN\0"
3252+ "GL_POLYGON\0"
3253+ "GL_POLYGON_BIT\0"
3254+ "GL_POLYGON_MODE\0"
3255+ "GL_POLYGON_OFFSET_BIAS\0"
3256+ "GL_POLYGON_OFFSET_FACTOR\0"
3257+ "GL_POLYGON_OFFSET_FILL\0"
3258+ "GL_POLYGON_OFFSET_LINE\0"
3259+ "GL_POLYGON_OFFSET_POINT\0"
3260+ "GL_POLYGON_OFFSET_UNITS\0"
3261+ "GL_POLYGON_SMOOTH\0"
3262+ "GL_POLYGON_SMOOTH_HINT\0"
3263+ "GL_POLYGON_STIPPLE\0"
3264+ "GL_POLYGON_STIPPLE_BIT\0"
3265+ "GL_POLYGON_TOKEN\0"
3266+ "GL_POSITION\0"
3267+ "GL_POST_COLOR_MATRIX_ALPHA_BIAS\0"
3268+ "GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI\0"
3269+ "GL_POST_COLOR_MATRIX_ALPHA_SCALE\0"
3270+ "GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI\0"
3271+ "GL_POST_COLOR_MATRIX_BLUE_BIAS\0"
3272+ "GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI\0"
3273+ "GL_POST_COLOR_MATRIX_BLUE_SCALE\0"
3274+ "GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI\0"
3275+ "GL_POST_COLOR_MATRIX_COLOR_TABLE\0"
3276+ "GL_POST_COLOR_MATRIX_GREEN_BIAS\0"
3277+ "GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI\0"
3278+ "GL_POST_COLOR_MATRIX_GREEN_SCALE\0"
3279+ "GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI\0"
3280+ "GL_POST_COLOR_MATRIX_RED_BIAS\0"
3281+ "GL_POST_COLOR_MATRIX_RED_BIAS_SGI\0"
3282+ "GL_POST_COLOR_MATRIX_RED_SCALE\0"
3283+ "GL_POST_COLOR_MATRIX_RED_SCALE_SGI\0"
3284+ "GL_POST_CONVOLUTION_ALPHA_BIAS\0"
3285+ "GL_POST_CONVOLUTION_ALPHA_BIAS_EXT\0"
3286+ "GL_POST_CONVOLUTION_ALPHA_SCALE\0"
3287+ "GL_POST_CONVOLUTION_ALPHA_SCALE_EXT\0"
3288+ "GL_POST_CONVOLUTION_BLUE_BIAS\0"
3289+ "GL_POST_CONVOLUTION_BLUE_BIAS_EXT\0"
3290+ "GL_POST_CONVOLUTION_BLUE_SCALE\0"
3291+ "GL_POST_CONVOLUTION_BLUE_SCALE_EXT\0"
3292+ "GL_POST_CONVOLUTION_COLOR_TABLE\0"
3293+ "GL_POST_CONVOLUTION_GREEN_BIAS\0"
3294+ "GL_POST_CONVOLUTION_GREEN_BIAS_EXT\0"
3295+ "GL_POST_CONVOLUTION_GREEN_SCALE\0"
3296+ "GL_POST_CONVOLUTION_GREEN_SCALE_EXT\0"
3297+ "GL_POST_CONVOLUTION_RED_BIAS\0"
3298+ "GL_POST_CONVOLUTION_RED_BIAS_EXT\0"
3299+ "GL_POST_CONVOLUTION_RED_SCALE\0"
3300+ "GL_POST_CONVOLUTION_RED_SCALE_EXT\0"
3301+ "GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX\0"
3302+ "GL_POST_TEXTURE_FILTER_BIAS_SGIX\0"
3303+ "GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX\0"
3304+ "GL_POST_TEXTURE_FILTER_SCALE_SGIX\0"
3305+ "GL_PREVIOUS\0"
3306+ "GL_PREVIOUS_ARB\0"
3307+ "GL_PREVIOUS_EXT\0"
3308+ "GL_PRIMARY_COLOR\0"
3309+ "GL_PRIMARY_COLOR_ARB\0"
3310+ "GL_PRIMARY_COLOR_EXT\0"
3311+ "GL_PROGRAM_ADDRESS_REGISTERS_ARB\0"
3312+ "GL_PROGRAM_ALU_INSTRUCTIONS_ARB\0"
3313+ "GL_PROGRAM_ATTRIBS_ARB\0"
3314+ "GL_PROGRAM_BINDING_ARB\0"
3315+ "GL_PROGRAM_ERROR_POSITION_ARB\0"
3316+ "GL_PROGRAM_ERROR_POSITION_NV\0"
3317+ "GL_PROGRAM_ERROR_STRING_ARB\0"
3318+ "GL_PROGRAM_FORMAT_ARB\0"
3319+ "GL_PROGRAM_FORMAT_ASCII_ARB\0"
3320+ "GL_PROGRAM_INSTRUCTIONS_ARB\0"
3321+ "GL_PROGRAM_LENGTH_ARB\0"
3322+ "GL_PROGRAM_LENGTH_NV\0"
3323+ "GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB\0"
3324+ "GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB\0"
3325+ "GL_PROGRAM_NATIVE_ATTRIBS_ARB\0"
3326+ "GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB\0"
3327+ "GL_PROGRAM_NATIVE_PARAMETERS_ARB\0"
3328+ "GL_PROGRAM_NATIVE_TEMPORARIES_ARB\0"
3329+ "GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB\0"
3330+ "GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB\0"
3331+ "GL_PROGRAM_OBJECT_ARB\0"
3332+ "GL_PROGRAM_PARAMETERS_ARB\0"
3333+ "GL_PROGRAM_PARAMETER_NV\0"
3334+ "GL_PROGRAM_RESIDENT_NV\0"
3335+ "GL_PROGRAM_STRING_ARB\0"
3336+ "GL_PROGRAM_STRING_NV\0"
3337+ "GL_PROGRAM_TARGET_NV\0"
3338+ "GL_PROGRAM_TEMPORARIES_ARB\0"
3339+ "GL_PROGRAM_TEX_INDIRECTIONS_ARB\0"
3340+ "GL_PROGRAM_TEX_INSTRUCTIONS_ARB\0"
3341+ "GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB\0"
3342+ "GL_PROJECTION\0"
3343+ "GL_PROJECTION_MATRIX\0"
3344+ "GL_PROJECTION_STACK_DEPTH\0"
3345+ "GL_PROXY_COLOR_TABLE\0"
3346+ "GL_PROXY_HISTOGRAM\0"
3347+ "GL_PROXY_HISTOGRAM_EXT\0"
3348+ "GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE\0"
3349+ "GL_PROXY_POST_CONVOLUTION_COLOR_TABLE\0"
3350+ "GL_PROXY_TEXTURE_1D\0"
3351+ "GL_PROXY_TEXTURE_1D_ARRAY_EXT\0"
3352+ "GL_PROXY_TEXTURE_1D_EXT\0"
3353+ "GL_PROXY_TEXTURE_2D\0"
3354+ "GL_PROXY_TEXTURE_2D_ARRAY_EXT\0"
3355+ "GL_PROXY_TEXTURE_2D_EXT\0"
3356+ "GL_PROXY_TEXTURE_3D\0"
3357+ "GL_PROXY_TEXTURE_COLOR_TABLE_SGI\0"
3358+ "GL_PROXY_TEXTURE_CUBE_MAP\0"
3359+ "GL_PROXY_TEXTURE_CUBE_MAP_ARB\0"
3360+ "GL_PROXY_TEXTURE_RECTANGLE_ARB\0"
3361+ "GL_PROXY_TEXTURE_RECTANGLE_NV\0"
3362+ "GL_Q\0"
3363+ "GL_QUADRATIC_ATTENUATION\0"
3364+ "GL_QUADS\0"
3365+ "GL_QUAD_MESH_SUN\0"
3366+ "GL_QUAD_STRIP\0"
3367+ "GL_QUERY_COUNTER_BITS\0"
3368+ "GL_QUERY_COUNTER_BITS_ARB\0"
3369+ "GL_QUERY_RESULT\0"
3370+ "GL_QUERY_RESULT_ARB\0"
3371+ "GL_QUERY_RESULT_AVAILABLE\0"
3372+ "GL_QUERY_RESULT_AVAILABLE_ARB\0"
3373+ "GL_R\0"
3374+ "GL_R3_G3_B2\0"
3375+ "GL_RASTER_POSITION_UNCLIPPED_IBM\0"
3376+ "GL_READ_BUFFER\0"
3377+ "GL_READ_FRAMEBUFFER_BINDING_EXT\0"
3378+ "GL_READ_FRAMEBUFFER_EXT\0"
3379+ "GL_READ_ONLY\0"
3380+ "GL_READ_ONLY_ARB\0"
3381+ "GL_READ_WRITE\0"
3382+ "GL_READ_WRITE_ARB\0"
3383+ "GL_RED\0"
3384+ "GL_REDUCE\0"
3385+ "GL_REDUCE_EXT\0"
3386+ "GL_RED_BIAS\0"
3387+ "GL_RED_BITS\0"
3388+ "GL_RED_SCALE\0"
3389+ "GL_REFLECTION_MAP\0"
3390+ "GL_REFLECTION_MAP_ARB\0"
3391+ "GL_REFLECTION_MAP_NV\0"
3392+ "GL_RENDER\0"
3393+ "GL_RENDERBUFFER_BINDING_EXT\0"
3394+ "GL_RENDERBUFFER_EXT\0"
3395+ "GL_RENDERBUFFER_HEIGHT_EXT\0"
3396+ "GL_RENDERBUFFER_INTERNAL_FORMAT_EXT\0"
3397+ "GL_RENDERBUFFER_WIDTH_EXT\0"
3398+ "GL_RENDERER\0"
3399+ "GL_RENDER_MODE\0"
3400+ "GL_REPEAT\0"
3401+ "GL_REPLACE\0"
3402+ "GL_REPLACE_EXT\0"
3403+ "GL_REPLICATE_BORDER_HP\0"
3404+ "GL_RESCALE_NORMAL\0"
3405+ "GL_RESCALE_NORMAL_EXT\0"
3406+ "GL_RETURN\0"
3407+ "GL_RGB\0"
3408+ "GL_RGB10\0"
3409+ "GL_RGB10_A2\0"
3410+ "GL_RGB10_A2_EXT\0"
3411+ "GL_RGB10_EXT\0"
3412+ "GL_RGB12\0"
3413+ "GL_RGB12_EXT\0"
3414+ "GL_RGB16\0"
3415+ "GL_RGB16_EXT\0"
3416+ "GL_RGB2_EXT\0"
3417+ "GL_RGB4\0"
3418+ "GL_RGB4_EXT\0"
3419+ "GL_RGB4_S3TC\0"
3420+ "GL_RGB5\0"
3421+ "GL_RGB5_A1\0"
3422+ "GL_RGB5_A1_EXT\0"
3423+ "GL_RGB5_EXT\0"
3424+ "GL_RGB8\0"
3425+ "GL_RGB8_EXT\0"
3426+ "GL_RGBA\0"
3427+ "GL_RGBA12\0"
3428+ "GL_RGBA12_EXT\0"
3429+ "GL_RGBA16\0"
3430+ "GL_RGBA16_EXT\0"
3431+ "GL_RGBA2\0"
3432+ "GL_RGBA2_EXT\0"
3433+ "GL_RGBA4\0"
3434+ "GL_RGBA4_DXT5_S3TC\0"
3435+ "GL_RGBA4_EXT\0"
3436+ "GL_RGBA4_S3TC\0"
3437+ "GL_RGBA8\0"
3438+ "GL_RGBA8_EXT\0"
3439+ "GL_RGBA_DXT5_S3TC\0"
3440+ "GL_RGBA_MODE\0"
3441+ "GL_RGBA_S3TC\0"
3442+ "GL_RGB_S3TC\0"
3443+ "GL_RGB_SCALE\0"
3444+ "GL_RGB_SCALE_ARB\0"
3445+ "GL_RGB_SCALE_EXT\0"
3446+ "GL_RIGHT\0"
3447+ "GL_S\0"
3448+ "GL_SAMPLER_1D\0"
3449+ "GL_SAMPLER_1D_SHADOW\0"
3450+ "GL_SAMPLER_2D\0"
3451+ "GL_SAMPLER_2D_SHADOW\0"
3452+ "GL_SAMPLER_3D\0"
3453+ "GL_SAMPLER_CUBE\0"
3454+ "GL_SAMPLES\0"
3455+ "GL_SAMPLES_3DFX\0"
3456+ "GL_SAMPLES_ARB\0"
3457+ "GL_SAMPLES_PASSED\0"
3458+ "GL_SAMPLES_PASSED_ARB\0"
3459+ "GL_SAMPLE_ALPHA_TO_COVERAGE\0"
3460+ "GL_SAMPLE_ALPHA_TO_COVERAGE_ARB\0"
3461+ "GL_SAMPLE_ALPHA_TO_ONE\0"
3462+ "GL_SAMPLE_ALPHA_TO_ONE_ARB\0"
3463+ "GL_SAMPLE_BUFFERS\0"
3464+ "GL_SAMPLE_BUFFERS_3DFX\0"
3465+ "GL_SAMPLE_BUFFERS_ARB\0"
3466+ "GL_SAMPLE_COVERAGE\0"
3467+ "GL_SAMPLE_COVERAGE_ARB\0"
3468+ "GL_SAMPLE_COVERAGE_INVERT\0"
3469+ "GL_SAMPLE_COVERAGE_INVERT_ARB\0"
3470+ "GL_SAMPLE_COVERAGE_VALUE\0"
3471+ "GL_SAMPLE_COVERAGE_VALUE_ARB\0"
3472+ "GL_SCISSOR_BIT\0"
3473+ "GL_SCISSOR_BOX\0"
3474+ "GL_SCISSOR_TEST\0"
3475+ "GL_SECONDARY_COLOR_ARRAY\0"
3476+ "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING\0"
3477+ "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB\0"
3478+ "GL_SECONDARY_COLOR_ARRAY_POINTER\0"
3479+ "GL_SECONDARY_COLOR_ARRAY_SIZE\0"
3480+ "GL_SECONDARY_COLOR_ARRAY_STRIDE\0"
3481+ "GL_SECONDARY_COLOR_ARRAY_TYPE\0"
3482+ "GL_SELECT\0"
3483+ "GL_SELECTION_BUFFER_POINTER\0"
3484+ "GL_SELECTION_BUFFER_SIZE\0"
3485+ "GL_SEPARABLE_2D\0"
3486+ "GL_SEPARATE_SPECULAR_COLOR\0"
3487+ "GL_SEPARATE_SPECULAR_COLOR_EXT\0"
3488+ "GL_SET\0"
3489+ "GL_SHADER_OBJECT_ARB\0"
3490+ "GL_SHADER_SOURCE_LENGTH\0"
3491+ "GL_SHADER_TYPE\0"
3492+ "GL_SHADE_MODEL\0"
3493+ "GL_SHADING_LANGUAGE_VERSION\0"
3494+ "GL_SHADOW_AMBIENT_SGIX\0"
3495+ "GL_SHARED_TEXTURE_PALETTE_EXT\0"
3496+ "GL_SHININESS\0"
3497+ "GL_SHORT\0"
3498+ "GL_SINGLE_COLOR\0"
3499+ "GL_SINGLE_COLOR_EXT\0"
3500+ "GL_SLICE_ACCUM_SUN\0"
3501+ "GL_SMOOTH\0"
3502+ "GL_SMOOTH_LINE_WIDTH_GRANULARITY\0"
3503+ "GL_SMOOTH_LINE_WIDTH_RANGE\0"
3504+ "GL_SMOOTH_POINT_SIZE_GRANULARITY\0"
3505+ "GL_SMOOTH_POINT_SIZE_RANGE\0"
3506+ "GL_SOURCE0_ALPHA\0"
3507+ "GL_SOURCE0_ALPHA_ARB\0"
3508+ "GL_SOURCE0_ALPHA_EXT\0"
3509+ "GL_SOURCE0_RGB\0"
3510+ "GL_SOURCE0_RGB_ARB\0"
3511+ "GL_SOURCE0_RGB_EXT\0"
3512+ "GL_SOURCE1_ALPHA\0"
3513+ "GL_SOURCE1_ALPHA_ARB\0"
3514+ "GL_SOURCE1_ALPHA_EXT\0"
3515+ "GL_SOURCE1_RGB\0"
3516+ "GL_SOURCE1_RGB_ARB\0"
3517+ "GL_SOURCE1_RGB_EXT\0"
3518+ "GL_SOURCE2_ALPHA\0"
3519+ "GL_SOURCE2_ALPHA_ARB\0"
3520+ "GL_SOURCE2_ALPHA_EXT\0"
3521+ "GL_SOURCE2_RGB\0"
3522+ "GL_SOURCE2_RGB_ARB\0"
3523+ "GL_SOURCE2_RGB_EXT\0"
3524+ "GL_SOURCE3_ALPHA_NV\0"
3525+ "GL_SOURCE3_RGB_NV\0"
3526+ "GL_SPECULAR\0"
3527+ "GL_SPHERE_MAP\0"
3528+ "GL_SPOT_CUTOFF\0"
3529+ "GL_SPOT_DIRECTION\0"
3530+ "GL_SPOT_EXPONENT\0"
3531+ "GL_SRC0_ALPHA\0"
3532+ "GL_SRC0_RGB\0"
3533+ "GL_SRC1_ALPHA\0"
3534+ "GL_SRC1_RGB\0"
3535+ "GL_SRC2_ALPHA\0"
3536+ "GL_SRC2_RGB\0"
3537+ "GL_SRC_ALPHA\0"
3538+ "GL_SRC_ALPHA_SATURATE\0"
3539+ "GL_SRC_COLOR\0"
3540+ "GL_STACK_OVERFLOW\0"
3541+ "GL_STACK_UNDERFLOW\0"
3542+ "GL_STATIC_COPY\0"
3543+ "GL_STATIC_COPY_ARB\0"
3544+ "GL_STATIC_DRAW\0"
3545+ "GL_STATIC_DRAW_ARB\0"
3546+ "GL_STATIC_READ\0"
3547+ "GL_STATIC_READ_ARB\0"
3548+ "GL_STENCIL\0"
3549+ "GL_STENCIL_ATTACHMENT_EXT\0"
3550+ "GL_STENCIL_BACK_FAIL\0"
3551+ "GL_STENCIL_BACK_FUNC\0"
3552+ "GL_STENCIL_BACK_PASS_DEPTH_FAIL\0"
3553+ "GL_STENCIL_BACK_PASS_DEPTH_PASS\0"
3554+ "GL_STENCIL_BACK_REF\0"
3555+ "GL_STENCIL_BACK_VALUE_MASK\0"
3556+ "GL_STENCIL_BACK_WRITEMASK\0"
3557+ "GL_STENCIL_BITS\0"
3558+ "GL_STENCIL_BUFFER_BIT\0"
3559+ "GL_STENCIL_CLEAR_VALUE\0"
3560+ "GL_STENCIL_FAIL\0"
3561+ "GL_STENCIL_FUNC\0"
3562+ "GL_STENCIL_INDEX\0"
3563+ "GL_STENCIL_INDEX16_EXT\0"
3564+ "GL_STENCIL_INDEX1_EXT\0"
3565+ "GL_STENCIL_INDEX4_EXT\0"
3566+ "GL_STENCIL_INDEX8_EXT\0"
3567+ "GL_STENCIL_INDEX_EXT\0"
3568+ "GL_STENCIL_PASS_DEPTH_FAIL\0"
3569+ "GL_STENCIL_PASS_DEPTH_PASS\0"
3570+ "GL_STENCIL_REF\0"
3571+ "GL_STENCIL_TEST\0"
3572+ "GL_STENCIL_TEST_TWO_SIDE_EXT\0"
3573+ "GL_STENCIL_VALUE_MASK\0"
3574+ "GL_STENCIL_WRITEMASK\0"
3575+ "GL_STEREO\0"
3576+ "GL_STREAM_COPY\0"
3577+ "GL_STREAM_COPY_ARB\0"
3578+ "GL_STREAM_DRAW\0"
3579+ "GL_STREAM_DRAW_ARB\0"
3580+ "GL_STREAM_READ\0"
3581+ "GL_STREAM_READ_ARB\0"
3582+ "GL_SUBPIXEL_BITS\0"
3583+ "GL_SUBTRACT\0"
3584+ "GL_SUBTRACT_ARB\0"
3585+ "GL_T\0"
3586+ "GL_T2F_C3F_V3F\0"
3587+ "GL_T2F_C4F_N3F_V3F\0"
3588+ "GL_T2F_C4UB_V3F\0"
3589+ "GL_T2F_N3F_V3F\0"
3590+ "GL_T2F_V3F\0"
3591+ "GL_T4F_C4F_N3F_V4F\0"
3592+ "GL_T4F_V4F\0"
3593+ "GL_TABLE_TOO_LARGE_EXT\0"
3594+ "GL_TEXTURE\0"
3595+ "GL_TEXTURE0\0"
3596+ "GL_TEXTURE0_ARB\0"
3597+ "GL_TEXTURE1\0"
3598+ "GL_TEXTURE10\0"
3599+ "GL_TEXTURE10_ARB\0"
3600+ "GL_TEXTURE11\0"
3601+ "GL_TEXTURE11_ARB\0"
3602+ "GL_TEXTURE12\0"
3603+ "GL_TEXTURE12_ARB\0"
3604+ "GL_TEXTURE13\0"
3605+ "GL_TEXTURE13_ARB\0"
3606+ "GL_TEXTURE14\0"
3607+ "GL_TEXTURE14_ARB\0"
3608+ "GL_TEXTURE15\0"
3609+ "GL_TEXTURE15_ARB\0"
3610+ "GL_TEXTURE16\0"
3611+ "GL_TEXTURE16_ARB\0"
3612+ "GL_TEXTURE17\0"
3613+ "GL_TEXTURE17_ARB\0"
3614+ "GL_TEXTURE18\0"
3615+ "GL_TEXTURE18_ARB\0"
3616+ "GL_TEXTURE19\0"
3617+ "GL_TEXTURE19_ARB\0"
3618+ "GL_TEXTURE1_ARB\0"
3619+ "GL_TEXTURE2\0"
3620+ "GL_TEXTURE20\0"
3621+ "GL_TEXTURE20_ARB\0"
3622+ "GL_TEXTURE21\0"
3623+ "GL_TEXTURE21_ARB\0"
3624+ "GL_TEXTURE22\0"
3625+ "GL_TEXTURE22_ARB\0"
3626+ "GL_TEXTURE23\0"
3627+ "GL_TEXTURE23_ARB\0"
3628+ "GL_TEXTURE24\0"
3629+ "GL_TEXTURE24_ARB\0"
3630+ "GL_TEXTURE25\0"
3631+ "GL_TEXTURE25_ARB\0"
3632+ "GL_TEXTURE26\0"
3633+ "GL_TEXTURE26_ARB\0"
3634+ "GL_TEXTURE27\0"
3635+ "GL_TEXTURE27_ARB\0"
3636+ "GL_TEXTURE28\0"
3637+ "GL_TEXTURE28_ARB\0"
3638+ "GL_TEXTURE29\0"
3639+ "GL_TEXTURE29_ARB\0"
3640+ "GL_TEXTURE2_ARB\0"
3641+ "GL_TEXTURE3\0"
3642+ "GL_TEXTURE30\0"
3643+ "GL_TEXTURE30_ARB\0"
3644+ "GL_TEXTURE31\0"
3645+ "GL_TEXTURE31_ARB\0"
3646+ "GL_TEXTURE3_ARB\0"
3647+ "GL_TEXTURE4\0"
3648+ "GL_TEXTURE4_ARB\0"
3649+ "GL_TEXTURE5\0"
3650+ "GL_TEXTURE5_ARB\0"
3651+ "GL_TEXTURE6\0"
3652+ "GL_TEXTURE6_ARB\0"
3653+ "GL_TEXTURE7\0"
3654+ "GL_TEXTURE7_ARB\0"
3655+ "GL_TEXTURE8\0"
3656+ "GL_TEXTURE8_ARB\0"
3657+ "GL_TEXTURE9\0"
3658+ "GL_TEXTURE9_ARB\0"
3659+ "GL_TEXTURE_1D\0"
3660+ "GL_TEXTURE_1D_ARRAY_EXT\0"
3661+ "GL_TEXTURE_2D\0"
3662+ "GL_TEXTURE_2D_ARRAY_EXT\0"
3663+ "GL_TEXTURE_3D\0"
3664+ "GL_TEXTURE_ALPHA_SIZE\0"
3665+ "GL_TEXTURE_ALPHA_SIZE_EXT\0"
3666+ "GL_TEXTURE_BASE_LEVEL\0"
3667+ "GL_TEXTURE_BINDING_1D\0"
3668+ "GL_TEXTURE_BINDING_1D_ARRAY_EXT\0"
3669+ "GL_TEXTURE_BINDING_2D\0"
3670+ "GL_TEXTURE_BINDING_2D_ARRAY_EXT\0"
3671+ "GL_TEXTURE_BINDING_3D\0"
3672+ "GL_TEXTURE_BINDING_CUBE_MAP\0"
3673+ "GL_TEXTURE_BINDING_CUBE_MAP_ARB\0"
3674+ "GL_TEXTURE_BINDING_RECTANGLE_ARB\0"
3675+ "GL_TEXTURE_BINDING_RECTANGLE_NV\0"
3676+ "GL_TEXTURE_BIT\0"
3677+ "GL_TEXTURE_BLUE_SIZE\0"
3678+ "GL_TEXTURE_BLUE_SIZE_EXT\0"
3679+ "GL_TEXTURE_BORDER\0"
3680+ "GL_TEXTURE_BORDER_COLOR\0"
3681+ "GL_TEXTURE_CLIPMAP_CENTER_SGIX\0"
3682+ "GL_TEXTURE_CLIPMAP_DEPTH_SGIX\0"
3683+ "GL_TEXTURE_CLIPMAP_FRAME_SGIX\0"
3684+ "GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX\0"
3685+ "GL_TEXTURE_CLIPMAP_OFFSET_SGIX\0"
3686+ "GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX\0"
3687+ "GL_TEXTURE_COLOR_TABLE_SGI\0"
3688+ "GL_TEXTURE_COLOR_WRITEMASK_SGIS\0"
3689+ "GL_TEXTURE_COMPARE_FAIL_VALUE_ARB\0"
3690+ "GL_TEXTURE_COMPARE_FUNC\0"
3691+ "GL_TEXTURE_COMPARE_FUNC_ARB\0"
3692+ "GL_TEXTURE_COMPARE_MODE\0"
3693+ "GL_TEXTURE_COMPARE_MODE_ARB\0"
3694+ "GL_TEXTURE_COMPARE_OPERATOR_SGIX\0"
3695+ "GL_TEXTURE_COMPARE_SGIX\0"
3696+ "GL_TEXTURE_COMPONENTS\0"
3697+ "GL_TEXTURE_COMPRESSED\0"
3698+ "GL_TEXTURE_COMPRESSED_ARB\0"
3699+ "GL_TEXTURE_COMPRESSED_FORMATS_ARB\0"
3700+ "GL_TEXTURE_COMPRESSED_IMAGE_SIZE\0"
3701+ "GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB\0"
3702+ "GL_TEXTURE_COMPRESSION_HINT\0"
3703+ "GL_TEXTURE_COMPRESSION_HINT_ARB\0"
3704+ "GL_TEXTURE_COORD_ARRAY\0"
3705+ "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING\0"
3706+ "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB\0"
3707+ "GL_TEXTURE_COORD_ARRAY_POINTER\0"
3708+ "GL_TEXTURE_COORD_ARRAY_SIZE\0"
3709+ "GL_TEXTURE_COORD_ARRAY_STRIDE\0"
3710+ "GL_TEXTURE_COORD_ARRAY_TYPE\0"
3711+ "GL_TEXTURE_CUBE_MAP\0"
3712+ "GL_TEXTURE_CUBE_MAP_ARB\0"
3713+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_X\0"
3714+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB\0"
3715+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y\0"
3716+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB\0"
3717+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z\0"
3718+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB\0"
3719+ "GL_TEXTURE_CUBE_MAP_POSITIVE_X\0"
3720+ "GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB\0"
3721+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Y\0"
3722+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB\0"
3723+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Z\0"
3724+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB\0"
3725+ "GL_TEXTURE_DEPTH\0"
3726+ "GL_TEXTURE_DEPTH_SIZE\0"
3727+ "GL_TEXTURE_DEPTH_SIZE_ARB\0"
3728+ "GL_TEXTURE_ENV\0"
3729+ "GL_TEXTURE_ENV_COLOR\0"
3730+ "GL_TEXTURE_ENV_MODE\0"
3731+ "GL_TEXTURE_FILTER_CONTROL\0"
3732+ "GL_TEXTURE_GEN_MODE\0"
3733+ "GL_TEXTURE_GEN_Q\0"
3734+ "GL_TEXTURE_GEN_R\0"
3735+ "GL_TEXTURE_GEN_S\0"
3736+ "GL_TEXTURE_GEN_T\0"
3737+ "GL_TEXTURE_GEQUAL_R_SGIX\0"
3738+ "GL_TEXTURE_GREEN_SIZE\0"
3739+ "GL_TEXTURE_GREEN_SIZE_EXT\0"
3740+ "GL_TEXTURE_HEIGHT\0"
3741+ "GL_TEXTURE_INDEX_SIZE_EXT\0"
3742+ "GL_TEXTURE_INTENSITY_SIZE\0"
3743+ "GL_TEXTURE_INTENSITY_SIZE_EXT\0"
3744+ "GL_TEXTURE_INTERNAL_FORMAT\0"
3745+ "GL_TEXTURE_LEQUAL_R_SGIX\0"
3746+ "GL_TEXTURE_LOD_BIAS\0"
3747+ "GL_TEXTURE_LOD_BIAS_EXT\0"
3748+ "GL_TEXTURE_LOD_BIAS_R_SGIX\0"
3749+ "GL_TEXTURE_LOD_BIAS_S_SGIX\0"
3750+ "GL_TEXTURE_LOD_BIAS_T_SGIX\0"
3751+ "GL_TEXTURE_LUMINANCE_SIZE\0"
3752+ "GL_TEXTURE_LUMINANCE_SIZE_EXT\0"
3753+ "GL_TEXTURE_MAG_FILTER\0"
3754+ "GL_TEXTURE_MATRIX\0"
3755+ "GL_TEXTURE_MAX_ANISOTROPY_EXT\0"
3756+ "GL_TEXTURE_MAX_CLAMP_R_SGIX\0"
3757+ "GL_TEXTURE_MAX_CLAMP_S_SGIX\0"
3758+ "GL_TEXTURE_MAX_CLAMP_T_SGIX\0"
3759+ "GL_TEXTURE_MAX_LEVEL\0"
3760+ "GL_TEXTURE_MAX_LOD\0"
3761+ "GL_TEXTURE_MIN_FILTER\0"
3762+ "GL_TEXTURE_MIN_LOD\0"
3763+ "GL_TEXTURE_PRIORITY\0"
3764+ "GL_TEXTURE_RECTANGLE_ARB\0"
3765+ "GL_TEXTURE_RECTANGLE_NV\0"
3766+ "GL_TEXTURE_RED_SIZE\0"
3767+ "GL_TEXTURE_RED_SIZE_EXT\0"
3768+ "GL_TEXTURE_RESIDENT\0"
3769+ "GL_TEXTURE_STACK_DEPTH\0"
3770+ "GL_TEXTURE_TOO_LARGE_EXT\0"
3771+ "GL_TEXTURE_UNSIGNED_REMAP_MODE_NV\0"
3772+ "GL_TEXTURE_WIDTH\0"
3773+ "GL_TEXTURE_WRAP_R\0"
3774+ "GL_TEXTURE_WRAP_S\0"
3775+ "GL_TEXTURE_WRAP_T\0"
3776+ "GL_TIME_ELAPSED_EXT\0"
3777+ "GL_TRACK_MATRIX_NV\0"
3778+ "GL_TRACK_MATRIX_TRANSFORM_NV\0"
3779+ "GL_TRANSFORM_BIT\0"
3780+ "GL_TRANSPOSE_COLOR_MATRIX\0"
3781+ "GL_TRANSPOSE_COLOR_MATRIX_ARB\0"
3782+ "GL_TRANSPOSE_CURRENT_MATRIX_ARB\0"
3783+ "GL_TRANSPOSE_MODELVIEW_MATRIX\0"
3784+ "GL_TRANSPOSE_MODELVIEW_MATRIX_ARB\0"
3785+ "GL_TRANSPOSE_NV\0"
3786+ "GL_TRANSPOSE_PROJECTION_MATRIX\0"
3787+ "GL_TRANSPOSE_PROJECTION_MATRIX_ARB\0"
3788+ "GL_TRANSPOSE_TEXTURE_MATRIX\0"
3789+ "GL_TRANSPOSE_TEXTURE_MATRIX_ARB\0"
3790+ "GL_TRIANGLES\0"
3791+ "GL_TRIANGLE_FAN\0"
3792+ "GL_TRIANGLE_MESH_SUN\0"
3793+ "GL_TRIANGLE_STRIP\0"
3794+ "GL_TRUE\0"
3795+ "GL_UNPACK_ALIGNMENT\0"
3796+ "GL_UNPACK_IMAGE_HEIGHT\0"
3797+ "GL_UNPACK_LSB_FIRST\0"
3798+ "GL_UNPACK_ROW_LENGTH\0"
3799+ "GL_UNPACK_SKIP_IMAGES\0"
3800+ "GL_UNPACK_SKIP_PIXELS\0"
3801+ "GL_UNPACK_SKIP_ROWS\0"
3802+ "GL_UNPACK_SWAP_BYTES\0"
3803+ "GL_UNSIGNED_BYTE\0"
3804+ "GL_UNSIGNED_BYTE_2_3_3_REV\0"
3805+ "GL_UNSIGNED_BYTE_3_3_2\0"
3806+ "GL_UNSIGNED_INT\0"
3807+ "GL_UNSIGNED_INT_10_10_10_2\0"
3808+ "GL_UNSIGNED_INT_24_8_NV\0"
3809+ "GL_UNSIGNED_INT_2_10_10_10_REV\0"
3810+ "GL_UNSIGNED_INT_8_8_8_8\0"
3811+ "GL_UNSIGNED_INT_8_8_8_8_REV\0"
3812+ "GL_UNSIGNED_SHORT\0"
3813+ "GL_UNSIGNED_SHORT_1_5_5_5_REV\0"
3814+ "GL_UNSIGNED_SHORT_4_4_4_4\0"
3815+ "GL_UNSIGNED_SHORT_4_4_4_4_REV\0"
3816+ "GL_UNSIGNED_SHORT_5_5_5_1\0"
3817+ "GL_UNSIGNED_SHORT_5_6_5\0"
3818+ "GL_UNSIGNED_SHORT_5_6_5_REV\0"
3819+ "GL_UNSIGNED_SHORT_8_8_APPLE\0"
3820+ "GL_UNSIGNED_SHORT_8_8_MESA\0"
3821+ "GL_UNSIGNED_SHORT_8_8_REV_APPLE\0"
3822+ "GL_UNSIGNED_SHORT_8_8_REV_MESA\0"
3823+ "GL_UPPER_LEFT\0"
3824+ "GL_V2F\0"
3825+ "GL_V3F\0"
3826+ "GL_VALIDATE_STATUS\0"
3827+ "GL_VENDOR\0"
3828+ "GL_VERSION\0"
3829+ "GL_VERTEX_ARRAY\0"
3830+ "GL_VERTEX_ARRAY_BINDING_APPLE\0"
3831+ "GL_VERTEX_ARRAY_BUFFER_BINDING\0"
3832+ "GL_VERTEX_ARRAY_BUFFER_BINDING_ARB\0"
3833+ "GL_VERTEX_ARRAY_POINTER\0"
3834+ "GL_VERTEX_ARRAY_SIZE\0"
3835+ "GL_VERTEX_ARRAY_STRIDE\0"
3836+ "GL_VERTEX_ARRAY_TYPE\0"
3837+ "GL_VERTEX_ATTRIB_ARRAY0_NV\0"
3838+ "GL_VERTEX_ATTRIB_ARRAY10_NV\0"
3839+ "GL_VERTEX_ATTRIB_ARRAY11_NV\0"
3840+ "GL_VERTEX_ATTRIB_ARRAY12_NV\0"
3841+ "GL_VERTEX_ATTRIB_ARRAY13_NV\0"
3842+ "GL_VERTEX_ATTRIB_ARRAY14_NV\0"
3843+ "GL_VERTEX_ATTRIB_ARRAY15_NV\0"
3844+ "GL_VERTEX_ATTRIB_ARRAY1_NV\0"
3845+ "GL_VERTEX_ATTRIB_ARRAY2_NV\0"
3846+ "GL_VERTEX_ATTRIB_ARRAY3_NV\0"
3847+ "GL_VERTEX_ATTRIB_ARRAY4_NV\0"
3848+ "GL_VERTEX_ATTRIB_ARRAY5_NV\0"
3849+ "GL_VERTEX_ATTRIB_ARRAY6_NV\0"
3850+ "GL_VERTEX_ATTRIB_ARRAY7_NV\0"
3851+ "GL_VERTEX_ATTRIB_ARRAY8_NV\0"
3852+ "GL_VERTEX_ATTRIB_ARRAY9_NV\0"
3853+ "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\0"
3854+ "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB\0"
3855+ "GL_VERTEX_ATTRIB_ARRAY_ENABLED\0"
3856+ "GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB\0"
3857+ "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED\0"
3858+ "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB\0"
3859+ "GL_VERTEX_ATTRIB_ARRAY_POINTER\0"
3860+ "GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB\0"
3861+ "GL_VERTEX_ATTRIB_ARRAY_SIZE\0"
3862+ "GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB\0"
3863+ "GL_VERTEX_ATTRIB_ARRAY_STRIDE\0"
3864+ "GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB\0"
3865+ "GL_VERTEX_ATTRIB_ARRAY_TYPE\0"
3866+ "GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB\0"
3867+ "GL_VERTEX_BLEND_ARB\0"
3868+ "GL_VERTEX_PROGRAM_ARB\0"
3869+ "GL_VERTEX_PROGRAM_BINDING_NV\0"
3870+ "GL_VERTEX_PROGRAM_NV\0"
3871+ "GL_VERTEX_PROGRAM_POINT_SIZE\0"
3872+ "GL_VERTEX_PROGRAM_POINT_SIZE_ARB\0"
3873+ "GL_VERTEX_PROGRAM_POINT_SIZE_NV\0"
3874+ "GL_VERTEX_PROGRAM_TWO_SIDE\0"
3875+ "GL_VERTEX_PROGRAM_TWO_SIDE_ARB\0"
3876+ "GL_VERTEX_PROGRAM_TWO_SIDE_NV\0"
3877+ "GL_VERTEX_SHADER\0"
3878+ "GL_VERTEX_SHADER_ARB\0"
3879+ "GL_VERTEX_STATE_PROGRAM_NV\0"
3880+ "GL_VIEWPORT\0"
3881+ "GL_VIEWPORT_BIT\0"
3882+ "GL_WEIGHT_ARRAY_ARB\0"
3883+ "GL_WEIGHT_ARRAY_BUFFER_BINDING\0"
3884+ "GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB\0"
3885+ "GL_WEIGHT_ARRAY_POINTER_ARB\0"
3886+ "GL_WEIGHT_ARRAY_SIZE_ARB\0"
3887+ "GL_WEIGHT_ARRAY_STRIDE_ARB\0"
3888+ "GL_WEIGHT_ARRAY_TYPE_ARB\0"
3889+ "GL_WEIGHT_SUM_UNITY_ARB\0"
3890+ "GL_WRAP_BORDER_SUN\0"
3891+ "GL_WRITE_ONLY\0"
3892+ "GL_WRITE_ONLY_ARB\0"
3893+ "GL_XOR\0"
3894+ "GL_YCBCR_422_APPLE\0"
3895+ "GL_YCBCR_MESA\0"
3896+ "GL_ZERO\0"
3897+ "GL_ZOOM_X\0"
3898+ "GL_ZOOM_Y\0"
3899+ ;
3900+
3901+static const enum_elt all_enums[1746] =
3902+{
3903+ { 0, 0x00000600 }, /* GL_2D */
3904+ { 6, 0x00001407 }, /* GL_2_BYTES */
3905+ { 17, 0x00000601 }, /* GL_3D */
3906+ { 23, 0x00000602 }, /* GL_3D_COLOR */
3907+ { 35, 0x00000603 }, /* GL_3D_COLOR_TEXTURE */
3908+ { 55, 0x00001408 }, /* GL_3_BYTES */
3909+ { 66, 0x00000604 }, /* GL_4D_COLOR_TEXTURE */
3910+ { 86, 0x00001409 }, /* GL_4_BYTES */
3911+ { 97, 0x00000100 }, /* GL_ACCUM */
3912+ { 106, 0x00000D5B }, /* GL_ACCUM_ALPHA_BITS */
3913+ { 126, 0x00000D5A }, /* GL_ACCUM_BLUE_BITS */
3914+ { 145, 0x00000200 }, /* GL_ACCUM_BUFFER_BIT */
3915+ { 165, 0x00000B80 }, /* GL_ACCUM_CLEAR_VALUE */
3916+ { 186, 0x00000D59 }, /* GL_ACCUM_GREEN_BITS */
3917+ { 206, 0x00000D58 }, /* GL_ACCUM_RED_BITS */
3918+ { 224, 0x00008B89 }, /* GL_ACTIVE_ATTRIBUTES */
3919+ { 245, 0x00008B8A }, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
3920+ { 276, 0x00008911 }, /* GL_ACTIVE_STENCIL_FACE_EXT */
3921+ { 303, 0x000084E0 }, /* GL_ACTIVE_TEXTURE */
3922+ { 321, 0x000084E0 }, /* GL_ACTIVE_TEXTURE_ARB */
3923+ { 343, 0x00008B86 }, /* GL_ACTIVE_UNIFORMS */
3924+ { 362, 0x00008B87 }, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
3925+ { 391, 0x000086A5 }, /* GL_ACTIVE_VERTEX_UNITS_ARB */
3926+ { 418, 0x00000104 }, /* GL_ADD */
3927+ { 425, 0x00008574 }, /* GL_ADD_SIGNED */
3928+ { 439, 0x00008574 }, /* GL_ADD_SIGNED_ARB */
3929+ { 457, 0x00008574 }, /* GL_ADD_SIGNED_EXT */
3930+ { 475, 0x0000846E }, /* GL_ALIASED_LINE_WIDTH_RANGE */
3931+ { 503, 0x0000846D }, /* GL_ALIASED_POINT_SIZE_RANGE */
3932+ { 531, 0x000FFFFF }, /* GL_ALL_ATTRIB_BITS */
3933+ { 550, 0xFFFFFFFF }, /* GL_ALL_CLIENT_ATTRIB_BITS */
3934+ { 576, 0x00001906 }, /* GL_ALPHA */
3935+ { 585, 0x0000803D }, /* GL_ALPHA12 */
3936+ { 596, 0x0000803D }, /* GL_ALPHA12_EXT */
3937+ { 611, 0x0000803E }, /* GL_ALPHA16 */
3938+ { 622, 0x0000803E }, /* GL_ALPHA16_EXT */
3939+ { 637, 0x0000803B }, /* GL_ALPHA4 */
3940+ { 647, 0x0000803B }, /* GL_ALPHA4_EXT */
3941+ { 661, 0x0000803C }, /* GL_ALPHA8 */
3942+ { 671, 0x0000803C }, /* GL_ALPHA8_EXT */
3943+ { 685, 0x00000D1D }, /* GL_ALPHA_BIAS */
3944+ { 699, 0x00000D55 }, /* GL_ALPHA_BITS */
3945+ { 713, 0x00000D1C }, /* GL_ALPHA_SCALE */
3946+ { 728, 0x00000BC0 }, /* GL_ALPHA_TEST */
3947+ { 742, 0x00000BC1 }, /* GL_ALPHA_TEST_FUNC */
3948+ { 761, 0x00000BC2 }, /* GL_ALPHA_TEST_REF */
3949+ { 779, 0x00000207 }, /* GL_ALWAYS */
3950+ { 789, 0x00001200 }, /* GL_AMBIENT */
3951+ { 800, 0x00001602 }, /* GL_AMBIENT_AND_DIFFUSE */
3952+ { 823, 0x00001501 }, /* GL_AND */
3953+ { 830, 0x00001504 }, /* GL_AND_INVERTED */
3954+ { 846, 0x00001502 }, /* GL_AND_REVERSE */
3955+ { 861, 0x00008892 }, /* GL_ARRAY_BUFFER */
3956+ { 877, 0x00008892 }, /* GL_ARRAY_BUFFER_ARB */
3957+ { 897, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING */
3958+ { 921, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING_ARB */
3959+ { 949, 0x00008B85 }, /* GL_ATTACHED_SHADERS */
3960+ { 969, 0x00008645 }, /* GL_ATTRIB_ARRAY_POINTER_NV */
3961+ { 996, 0x00008623 }, /* GL_ATTRIB_ARRAY_SIZE_NV */
3962+ { 1020, 0x00008624 }, /* GL_ATTRIB_ARRAY_STRIDE_NV */
3963+ { 1046, 0x00008625 }, /* GL_ATTRIB_ARRAY_TYPE_NV */
3964+ { 1070, 0x00000BB0 }, /* GL_ATTRIB_STACK_DEPTH */
3965+ { 1092, 0x00000D80 }, /* GL_AUTO_NORMAL */
3966+ { 1107, 0x00000409 }, /* GL_AUX0 */
3967+ { 1115, 0x0000040A }, /* GL_AUX1 */
3968+ { 1123, 0x0000040B }, /* GL_AUX2 */
3969+ { 1131, 0x0000040C }, /* GL_AUX3 */
3970+ { 1139, 0x00000C00 }, /* GL_AUX_BUFFERS */
3971+ { 1154, 0x00000405 }, /* GL_BACK */
3972+ { 1162, 0x00000402 }, /* GL_BACK_LEFT */
3973+ { 1175, 0x00000403 }, /* GL_BACK_RIGHT */
3974+ { 1189, 0x000080E0 }, /* GL_BGR */
3975+ { 1196, 0x000080E1 }, /* GL_BGRA */
3976+ { 1204, 0x00001A00 }, /* GL_BITMAP */
3977+ { 1214, 0x00000704 }, /* GL_BITMAP_TOKEN */
3978+ { 1230, 0x00000BE2 }, /* GL_BLEND */
3979+ { 1239, 0x00008005 }, /* GL_BLEND_COLOR */
3980+ { 1254, 0x00008005 }, /* GL_BLEND_COLOR_EXT */
3981+ { 1273, 0x00000BE0 }, /* GL_BLEND_DST */
3982+ { 1286, 0x000080CA }, /* GL_BLEND_DST_ALPHA */
3983+ { 1305, 0x000080C8 }, /* GL_BLEND_DST_RGB */
3984+ { 1322, 0x00008009 }, /* GL_BLEND_EQUATION */
3985+ { 1340, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA */
3986+ { 1364, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_EXT */
3987+ { 1392, 0x00008009 }, /* GL_BLEND_EQUATION_EXT */
3988+ { 1414, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_EXT */
3989+ { 1440, 0x00000BE1 }, /* GL_BLEND_SRC */
3990+ { 1453, 0x000080CB }, /* GL_BLEND_SRC_ALPHA */
3991+ { 1472, 0x000080C9 }, /* GL_BLEND_SRC_RGB */
3992+ { 1489, 0x00001905 }, /* GL_BLUE */
3993+ { 1497, 0x00000D1B }, /* GL_BLUE_BIAS */
3994+ { 1510, 0x00000D54 }, /* GL_BLUE_BITS */
3995+ { 1523, 0x00000D1A }, /* GL_BLUE_SCALE */
3996+ { 1537, 0x00008B56 }, /* GL_BOOL */
3997+ { 1545, 0x00008B56 }, /* GL_BOOL_ARB */
3998+ { 1557, 0x00008B57 }, /* GL_BOOL_VEC2 */
3999+ { 1570, 0x00008B57 }, /* GL_BOOL_VEC2_ARB */
4000+ { 1587, 0x00008B58 }, /* GL_BOOL_VEC3 */
4001+ { 1600, 0x00008B58 }, /* GL_BOOL_VEC3_ARB */
4002+ { 1617, 0x00008B59 }, /* GL_BOOL_VEC4 */
4003+ { 1630, 0x00008B59 }, /* GL_BOOL_VEC4_ARB */
4004+ { 1647, 0x000088BB }, /* GL_BUFFER_ACCESS */
4005+ { 1664, 0x000088BB }, /* GL_BUFFER_ACCESS_ARB */
4006+ { 1685, 0x000088BC }, /* GL_BUFFER_MAPPED */
4007+ { 1702, 0x000088BC }, /* GL_BUFFER_MAPPED_ARB */
4008+ { 1723, 0x000088BD }, /* GL_BUFFER_MAP_POINTER */
4009+ { 1745, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_ARB */
4010+ { 1771, 0x00008764 }, /* GL_BUFFER_SIZE */
4011+ { 1786, 0x00008764 }, /* GL_BUFFER_SIZE_ARB */
4012+ { 1805, 0x00008765 }, /* GL_BUFFER_USAGE */
4013+ { 1821, 0x00008765 }, /* GL_BUFFER_USAGE_ARB */
4014+ { 1841, 0x00001400 }, /* GL_BYTE */
4015+ { 1849, 0x00002A24 }, /* GL_C3F_V3F */
4016+ { 1860, 0x00002A26 }, /* GL_C4F_N3F_V3F */
4017+ { 1875, 0x00002A22 }, /* GL_C4UB_V2F */
4018+ { 1887, 0x00002A23 }, /* GL_C4UB_V3F */
4019+ { 1899, 0x00000901 }, /* GL_CCW */
4020+ { 1906, 0x00002900 }, /* GL_CLAMP */
4021+ { 1915, 0x0000812D }, /* GL_CLAMP_TO_BORDER */
4022+ { 1934, 0x0000812D }, /* GL_CLAMP_TO_BORDER_ARB */
4023+ { 1957, 0x0000812D }, /* GL_CLAMP_TO_BORDER_SGIS */
4024+ { 1981, 0x0000812F }, /* GL_CLAMP_TO_EDGE */
4025+ { 1998, 0x0000812F }, /* GL_CLAMP_TO_EDGE_SGIS */
4026+ { 2020, 0x00001500 }, /* GL_CLEAR */
4027+ { 2029, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE */
4028+ { 2054, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE_ARB */
4029+ { 2083, 0xFFFFFFFF }, /* GL_CLIENT_ALL_ATTRIB_BITS */
4030+ { 2109, 0x00000BB1 }, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
4031+ { 2138, 0x00000001 }, /* GL_CLIENT_PIXEL_STORE_BIT */
4032+ { 2164, 0x00000002 }, /* GL_CLIENT_VERTEX_ARRAY_BIT */
4033+ { 2191, 0x00003000 }, /* GL_CLIP_PLANE0 */
4034+ { 2206, 0x00003001 }, /* GL_CLIP_PLANE1 */
4035+ { 2221, 0x00003002 }, /* GL_CLIP_PLANE2 */
4036+ { 2236, 0x00003003 }, /* GL_CLIP_PLANE3 */
4037+ { 2251, 0x00003004 }, /* GL_CLIP_PLANE4 */
4038+ { 2266, 0x00003005 }, /* GL_CLIP_PLANE5 */
4039+ { 2281, 0x000080F0 }, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
4040+ { 2314, 0x00000A00 }, /* GL_COEFF */
4041+ { 2323, 0x00001800 }, /* GL_COLOR */
4042+ { 2332, 0x00008076 }, /* GL_COLOR_ARRAY */
4043+ { 2347, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING */
4044+ { 2377, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING_ARB */
4045+ { 2411, 0x00008090 }, /* GL_COLOR_ARRAY_POINTER */
4046+ { 2434, 0x00008081 }, /* GL_COLOR_ARRAY_SIZE */
4047+ { 2454, 0x00008083 }, /* GL_COLOR_ARRAY_STRIDE */
4048+ { 2476, 0x00008082 }, /* GL_COLOR_ARRAY_TYPE */
4049+ { 2496, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_EXT */
4050+ { 2521, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10_EXT */
4051+ { 2547, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11_EXT */
4052+ { 2573, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12_EXT */
4053+ { 2599, 0x00008CED }, /* GL_COLOR_ATTACHMENT13_EXT */
4054+ { 2625, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14_EXT */
4055+ { 2651, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15_EXT */
4056+ { 2677, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1_EXT */
4057+ { 2702, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2_EXT */
4058+ { 2727, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3_EXT */
4059+ { 2752, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4_EXT */
4060+ { 2777, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5_EXT */
4061+ { 2802, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6_EXT */
4062+ { 2827, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7_EXT */
4063+ { 2852, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8_EXT */
4064+ { 2877, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9_EXT */
4065+ { 2902, 0x00004000 }, /* GL_COLOR_BUFFER_BIT */
4066+ { 2922, 0x00000C22 }, /* GL_COLOR_CLEAR_VALUE */
4067+ { 2943, 0x00001900 }, /* GL_COLOR_INDEX */
4068+ { 2958, 0x00001603 }, /* GL_COLOR_INDEXES */
4069+ { 2975, 0x00000BF2 }, /* GL_COLOR_LOGIC_OP */
4070+ { 2993, 0x00000B57 }, /* GL_COLOR_MATERIAL */
4071+ { 3011, 0x00000B55 }, /* GL_COLOR_MATERIAL_FACE */
4072+ { 3034, 0x00000B56 }, /* GL_COLOR_MATERIAL_PARAMETER */
4073+ { 3062, 0x000080B1 }, /* GL_COLOR_MATRIX */
4074+ { 3078, 0x000080B1 }, /* GL_COLOR_MATRIX_SGI */
4075+ { 3098, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH */
4076+ { 3126, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH_SGI */
4077+ { 3158, 0x00008458 }, /* GL_COLOR_SUM */
4078+ { 3171, 0x00008458 }, /* GL_COLOR_SUM_ARB */
4079+ { 3188, 0x000080D0 }, /* GL_COLOR_TABLE */
4080+ { 3203, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE */
4081+ { 3229, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_EXT */
4082+ { 3259, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_SGI */
4083+ { 3289, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS */
4084+ { 3309, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS_SGI */
4085+ { 3333, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE */
4086+ { 3358, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_EXT */
4087+ { 3387, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_SGI */
4088+ { 3416, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT */
4089+ { 3438, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_EXT */
4090+ { 3464, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_SGI */
4091+ { 3490, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE */
4092+ { 3516, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_EXT */
4093+ { 3546, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_SGI */
4094+ { 3576, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE */
4095+ { 3606, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_EXT */
4096+ { 3640, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_SGI */
4097+ { 3674, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
4098+ { 3704, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_EXT */
4099+ { 3738, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_SGI */
4100+ { 3772, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE */
4101+ { 3796, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_EXT */
4102+ { 3824, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_SGI */
4103+ { 3852, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE */
4104+ { 3873, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE_SGI */
4105+ { 3898, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH */
4106+ { 3919, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_EXT */
4107+ { 3944, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_SGI */
4108+ { 3969, 0x00000C23 }, /* GL_COLOR_WRITEMASK */
4109+ { 3988, 0x00008570 }, /* GL_COMBINE */
4110+ { 3999, 0x00008503 }, /* GL_COMBINE4 */
4111+ { 4011, 0x00008572 }, /* GL_COMBINE_ALPHA */
4112+ { 4028, 0x00008572 }, /* GL_COMBINE_ALPHA_ARB */
4113+ { 4049, 0x00008572 }, /* GL_COMBINE_ALPHA_EXT */
4114+ { 4070, 0x00008570 }, /* GL_COMBINE_ARB */
4115+ { 4085, 0x00008570 }, /* GL_COMBINE_EXT */
4116+ { 4100, 0x00008571 }, /* GL_COMBINE_RGB */
4117+ { 4115, 0x00008571 }, /* GL_COMBINE_RGB_ARB */
4118+ { 4134, 0x00008571 }, /* GL_COMBINE_RGB_EXT */
4119+ { 4153, 0x0000884E }, /* GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT */
4120+ { 4189, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE */
4121+ { 4213, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE_ARB */
4122+ { 4241, 0x00001300 }, /* GL_COMPILE */
4123+ { 4252, 0x00001301 }, /* GL_COMPILE_AND_EXECUTE */
4124+ { 4275, 0x00008B81 }, /* GL_COMPILE_STATUS */
4125+ { 4293, 0x000084E9 }, /* GL_COMPRESSED_ALPHA */
4126+ { 4313, 0x000084E9 }, /* GL_COMPRESSED_ALPHA_ARB */
4127+ { 4337, 0x000084EC }, /* GL_COMPRESSED_INTENSITY */
4128+ { 4361, 0x000084EC }, /* GL_COMPRESSED_INTENSITY_ARB */
4129+ { 4389, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE */
4130+ { 4413, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA */
4131+ { 4443, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA_ARB */
4132+ { 4477, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE_ARB */
4133+ { 4505, 0x000084ED }, /* GL_COMPRESSED_RGB */
4134+ { 4523, 0x000084EE }, /* GL_COMPRESSED_RGBA */
4135+ { 4542, 0x000084EE }, /* GL_COMPRESSED_RGBA_ARB */
4136+ { 4565, 0x000086B1 }, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
4137+ { 4594, 0x000083F1 }, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
4138+ { 4627, 0x000083F2 }, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
4139+ { 4660, 0x000083F3 }, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
4140+ { 4693, 0x000084ED }, /* GL_COMPRESSED_RGB_ARB */
4141+ { 4715, 0x000086B0 }, /* GL_COMPRESSED_RGB_FXT1_3DFX */
4142+ { 4743, 0x000083F0 }, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
4143+ { 4775, 0x000086A3 }, /* GL_COMPRESSED_TEXTURE_FORMATS */
4144+ { 4805, 0x00008576 }, /* GL_CONSTANT */
4145+ { 4817, 0x00008003 }, /* GL_CONSTANT_ALPHA */
4146+ { 4835, 0x00008003 }, /* GL_CONSTANT_ALPHA_EXT */
4147+ { 4857, 0x00008576 }, /* GL_CONSTANT_ARB */
4148+ { 4873, 0x00001207 }, /* GL_CONSTANT_ATTENUATION */
4149+ { 4897, 0x00008151 }, /* GL_CONSTANT_BORDER_HP */
4150+ { 4919, 0x00008001 }, /* GL_CONSTANT_COLOR */
4151+ { 4937, 0x00008001 }, /* GL_CONSTANT_COLOR_EXT */
4152+ { 4959, 0x00008576 }, /* GL_CONSTANT_EXT */
4153+ { 4975, 0x00008010 }, /* GL_CONVOLUTION_1D */
4154+ { 4993, 0x00008011 }, /* GL_CONVOLUTION_2D */
4155+ { 5011, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR */
4156+ { 5039, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR_HP */
4157+ { 5070, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE */
4158+ { 5097, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE_EXT */
4159+ { 5128, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS */
4160+ { 5155, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS_EXT */
4161+ { 5186, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE */
4162+ { 5214, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE_EXT */
4163+ { 5246, 0x00008017 }, /* GL_CONVOLUTION_FORMAT */
4164+ { 5268, 0x00008017 }, /* GL_CONVOLUTION_FORMAT_EXT */
4165+ { 5294, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT */
4166+ { 5316, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT_EXT */
4167+ { 5342, 0x00008018 }, /* GL_CONVOLUTION_WIDTH */
4168+ { 5363, 0x00008018 }, /* GL_CONVOLUTION_WIDTH_EXT */
4169+ { 5388, 0x00008862 }, /* GL_COORD_REPLACE */
4170+ { 5405, 0x00008862 }, /* GL_COORD_REPLACE_ARB */
4171+ { 5426, 0x00008862 }, /* GL_COORD_REPLACE_NV */
4172+ { 5446, 0x00001503 }, /* GL_COPY */
4173+ { 5454, 0x0000150C }, /* GL_COPY_INVERTED */
4174+ { 5471, 0x00000706 }, /* GL_COPY_PIXEL_TOKEN */
4175+ { 5491, 0x00000B44 }, /* GL_CULL_FACE */
4176+ { 5504, 0x00000B45 }, /* GL_CULL_FACE_MODE */
4177+ { 5522, 0x000081AA }, /* GL_CULL_VERTEX_EXT */
4178+ { 5541, 0x000081AC }, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
4179+ { 5573, 0x000081AB }, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
4180+ { 5608, 0x00008626 }, /* GL_CURRENT_ATTRIB_NV */
4181+ { 5629, 0x00000001 }, /* GL_CURRENT_BIT */
4182+ { 5644, 0x00000B00 }, /* GL_CURRENT_COLOR */
4183+ { 5661, 0x00008453 }, /* GL_CURRENT_FOG_COORD */
4184+ { 5682, 0x00008453 }, /* GL_CURRENT_FOG_COORDINATE */
4185+ { 5708, 0x00000B01 }, /* GL_CURRENT_INDEX */
4186+ { 5725, 0x00008641 }, /* GL_CURRENT_MATRIX_ARB */
4187+ { 5747, 0x00008845 }, /* GL_CURRENT_MATRIX_INDEX_ARB */
4188+ { 5775, 0x00008641 }, /* GL_CURRENT_MATRIX_NV */
4189+ { 5796, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
4190+ { 5830, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_NV */
4191+ { 5863, 0x00000B02 }, /* GL_CURRENT_NORMAL */
4192+ { 5881, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_ARB */
4193+ { 5911, 0x00008B8D }, /* GL_CURRENT_PROGRAM */
4194+ { 5930, 0x00008865 }, /* GL_CURRENT_QUERY */
4195+ { 5947, 0x00008865 }, /* GL_CURRENT_QUERY_ARB */
4196+ { 5968, 0x00000B04 }, /* GL_CURRENT_RASTER_COLOR */
4197+ { 5992, 0x00000B09 }, /* GL_CURRENT_RASTER_DISTANCE */
4198+ { 6019, 0x00000B05 }, /* GL_CURRENT_RASTER_INDEX */
4199+ { 6043, 0x00000B07 }, /* GL_CURRENT_RASTER_POSITION */
4200+ { 6070, 0x00000B08 }, /* GL_CURRENT_RASTER_POSITION_VALID */
4201+ { 6103, 0x00000B06 }, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
4202+ { 6136, 0x00008459 }, /* GL_CURRENT_SECONDARY_COLOR */
4203+ { 6163, 0x00000B03 }, /* GL_CURRENT_TEXTURE_COORDS */
4204+ { 6189, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB */
4205+ { 6214, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB_ARB */
4206+ { 6243, 0x000086A8 }, /* GL_CURRENT_WEIGHT_ARB */
4207+ { 6265, 0x00000900 }, /* GL_CW */
4208+ { 6271, 0x0000875B }, /* GL_DEBUG_ASSERT_MESA */
4209+ { 6292, 0x00008759 }, /* GL_DEBUG_OBJECT_MESA */
4210+ { 6313, 0x0000875A }, /* GL_DEBUG_PRINT_MESA */
4211+ { 6333, 0x00002101 }, /* GL_DECAL */
4212+ { 6342, 0x00001E03 }, /* GL_DECR */
4213+ { 6350, 0x00008508 }, /* GL_DECR_WRAP */
4214+ { 6363, 0x00008508 }, /* GL_DECR_WRAP_EXT */
4215+ { 6380, 0x00008B80 }, /* GL_DELETE_STATUS */
4216+ { 6397, 0x00001801 }, /* GL_DEPTH */
4217+ { 6406, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */
4218+ { 6430, 0x00000D1F }, /* GL_DEPTH_BIAS */
4219+ { 6444, 0x00000D56 }, /* GL_DEPTH_BITS */
4220+ { 6458, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */
4221+ { 6478, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */
4222+ { 6503, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */
4223+ { 6523, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */
4224+ { 6541, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */
4225+ { 6562, 0x00001902 }, /* GL_DEPTH_COMPONENT */
4226+ { 6581, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */
4227+ { 6602, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */
4228+ { 6627, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */
4229+ { 6653, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */
4230+ { 6674, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */
4231+ { 6699, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */
4232+ { 6725, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */
4233+ { 6746, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */
4234+ { 6771, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */
4235+ { 6797, 0x00000B74 }, /* GL_DEPTH_FUNC */
4236+ { 6811, 0x00000B70 }, /* GL_DEPTH_RANGE */
4237+ { 6826, 0x00000D1E }, /* GL_DEPTH_SCALE */
4238+ { 6841, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */
4239+ { 6861, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
4240+ { 6889, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
4241+ { 6917, 0x00000B71 }, /* GL_DEPTH_TEST */
4242+ { 6931, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */
4243+ { 6953, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */
4244+ { 6979, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */
4245+ { 6998, 0x00001201 }, /* GL_DIFFUSE */
4246+ { 7009, 0x00000BD0 }, /* GL_DITHER */
4247+ { 7019, 0x00000A02 }, /* GL_DOMAIN */
4248+ { 7029, 0x00001100 }, /* GL_DONT_CARE */
4249+ { 7042, 0x000086AE }, /* GL_DOT3_RGB */
4250+ { 7054, 0x000086AF }, /* GL_DOT3_RGBA */
4251+ { 7067, 0x000086AF }, /* GL_DOT3_RGBA_ARB */
4252+ { 7084, 0x00008741 }, /* GL_DOT3_RGBA_EXT */
4253+ { 7101, 0x000086AE }, /* GL_DOT3_RGB_ARB */
4254+ { 7117, 0x00008740 }, /* GL_DOT3_RGB_EXT */
4255+ { 7133, 0x0000140A }, /* GL_DOUBLE */
4256+ { 7143, 0x00000C32 }, /* GL_DOUBLEBUFFER */
4257+ { 7159, 0x00000C01 }, /* GL_DRAW_BUFFER */
4258+ { 7174, 0x00008825 }, /* GL_DRAW_BUFFER0 */
4259+ { 7190, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */
4260+ { 7210, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */
4261+ { 7230, 0x00008826 }, /* GL_DRAW_BUFFER1 */
4262+ { 7246, 0x0000882F }, /* GL_DRAW_BUFFER10 */
4263+ { 7263, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */
4264+ { 7284, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */
4265+ { 7305, 0x00008830 }, /* GL_DRAW_BUFFER11 */
4266+ { 7322, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */
4267+ { 7343, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */
4268+ { 7364, 0x00008831 }, /* GL_DRAW_BUFFER12 */
4269+ { 7381, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */
4270+ { 7402, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */
4271+ { 7423, 0x00008832 }, /* GL_DRAW_BUFFER13 */
4272+ { 7440, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */
4273+ { 7461, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */
4274+ { 7482, 0x00008833 }, /* GL_DRAW_BUFFER14 */
4275+ { 7499, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */
4276+ { 7520, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */
4277+ { 7541, 0x00008834 }, /* GL_DRAW_BUFFER15 */
4278+ { 7558, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */
4279+ { 7579, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */
4280+ { 7600, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */
4281+ { 7620, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */
4282+ { 7640, 0x00008827 }, /* GL_DRAW_BUFFER2 */
4283+ { 7656, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */
4284+ { 7676, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */
4285+ { 7696, 0x00008828 }, /* GL_DRAW_BUFFER3 */
4286+ { 7712, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */
4287+ { 7732, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */
4288+ { 7752, 0x00008829 }, /* GL_DRAW_BUFFER4 */
4289+ { 7768, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */
4290+ { 7788, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */
4291+ { 7808, 0x0000882A }, /* GL_DRAW_BUFFER5 */
4292+ { 7824, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */
4293+ { 7844, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */
4294+ { 7864, 0x0000882B }, /* GL_DRAW_BUFFER6 */
4295+ { 7880, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */
4296+ { 7900, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */
4297+ { 7920, 0x0000882C }, /* GL_DRAW_BUFFER7 */
4298+ { 7936, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */
4299+ { 7956, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */
4300+ { 7976, 0x0000882D }, /* GL_DRAW_BUFFER8 */
4301+ { 7992, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */
4302+ { 8012, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */
4303+ { 8032, 0x0000882E }, /* GL_DRAW_BUFFER9 */
4304+ { 8048, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */
4305+ { 8068, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */
4306+ { 8088, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
4307+ { 8120, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */
4308+ { 8144, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */
4309+ { 8164, 0x00000304 }, /* GL_DST_ALPHA */
4310+ { 8177, 0x00000306 }, /* GL_DST_COLOR */
4311+ { 8190, 0x000088EA }, /* GL_DYNAMIC_COPY */
4312+ { 8206, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */
4313+ { 8226, 0x000088E8 }, /* GL_DYNAMIC_DRAW */
4314+ { 8242, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */
4315+ { 8262, 0x000088E9 }, /* GL_DYNAMIC_READ */
4316+ { 8278, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */
4317+ { 8298, 0x00000B43 }, /* GL_EDGE_FLAG */
4318+ { 8311, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */
4319+ { 8330, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
4320+ { 8364, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */
4321+ { 8402, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */
4322+ { 8429, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */
4323+ { 8455, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */
4324+ { 8479, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER_ARB */
4325+ { 8507, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
4326+ { 8539, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */
4327+ { 8575, 0x00001600 }, /* GL_EMISSION */
4328+ { 8587, 0x00002000 }, /* GL_ENABLE_BIT */
4329+ { 8601, 0x00000202 }, /* GL_EQUAL */
4330+ { 8610, 0x00001509 }, /* GL_EQUIV */
4331+ { 8619, 0x00010000 }, /* GL_EVAL_BIT */
4332+ { 8631, 0x00000800 }, /* GL_EXP */
4333+ { 8638, 0x00000801 }, /* GL_EXP2 */
4334+ { 8646, 0x00001F03 }, /* GL_EXTENSIONS */
4335+ { 8660, 0x00002400 }, /* GL_EYE_LINEAR */
4336+ { 8674, 0x00002502 }, /* GL_EYE_PLANE */
4337+ { 8687, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */
4338+ { 8712, 0x0000855B }, /* GL_EYE_RADIAL_NV */
4339+ { 8729, 0x00000000 }, /* GL_FALSE */
4340+ { 8738, 0x00001101 }, /* GL_FASTEST */
4341+ { 8749, 0x00001C01 }, /* GL_FEEDBACK */
4342+ { 8761, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */
4343+ { 8788, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */
4344+ { 8812, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */
4345+ { 8836, 0x00001B02 }, /* GL_FILL */
4346+ { 8844, 0x00001D00 }, /* GL_FLAT */
4347+ { 8852, 0x00001406 }, /* GL_FLOAT */
4348+ { 8861, 0x00008B5A }, /* GL_FLOAT_MAT2 */
4349+ { 8875, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */
4350+ { 8893, 0x00008B5B }, /* GL_FLOAT_MAT3 */
4351+ { 8907, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */
4352+ { 8925, 0x00008B5C }, /* GL_FLOAT_MAT4 */
4353+ { 8939, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */
4354+ { 8957, 0x00008B50 }, /* GL_FLOAT_VEC2 */
4355+ { 8971, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */
4356+ { 8989, 0x00008B51 }, /* GL_FLOAT_VEC3 */
4357+ { 9003, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */
4358+ { 9021, 0x00008B52 }, /* GL_FLOAT_VEC4 */
4359+ { 9035, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */
4360+ { 9053, 0x00000B60 }, /* GL_FOG */
4361+ { 9060, 0x00000080 }, /* GL_FOG_BIT */
4362+ { 9071, 0x00000B66 }, /* GL_FOG_COLOR */
4363+ { 9084, 0x00008451 }, /* GL_FOG_COORD */
4364+ { 9097, 0x00008451 }, /* GL_FOG_COORDINATE */
4365+ { 9115, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */
4366+ { 9139, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
4367+ { 9178, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */
4368+ { 9221, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */
4369+ { 9253, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
4370+ { 9284, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */
4371+ { 9313, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */
4372+ { 9338, 0x00008457 }, /* GL_FOG_COORD_ARRAY */
4373+ { 9357, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */
4374+ { 9391, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */
4375+ { 9418, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */
4376+ { 9444, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */
4377+ { 9468, 0x00008450 }, /* GL_FOG_COORD_SRC */
4378+ { 9485, 0x00000B62 }, /* GL_FOG_DENSITY */
4379+ { 9500, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */
4380+ { 9524, 0x00000B64 }, /* GL_FOG_END */
4381+ { 9535, 0x00000C54 }, /* GL_FOG_HINT */
4382+ { 9547, 0x00000B61 }, /* GL_FOG_INDEX */
4383+ { 9560, 0x00000B65 }, /* GL_FOG_MODE */
4384+ { 9572, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */
4385+ { 9591, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */
4386+ { 9616, 0x00000B63 }, /* GL_FOG_START */
4387+ { 9629, 0x00008452 }, /* GL_FRAGMENT_DEPTH */
4388+ { 9647, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */
4389+ { 9671, 0x00008B30 }, /* GL_FRAGMENT_SHADER */
4390+ { 9690, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */
4391+ { 9713, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
4392+ { 9748, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
4393+ { 9790, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
4394+ { 9832, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
4395+ { 9881, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
4396+ { 9933, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
4397+ { 9977, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
4398+ { 10021, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */
4399+ { 10048, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */
4400+ { 10076, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */
4401+ { 10095, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
4402+ { 10136, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
4403+ { 10177, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
4404+ { 10219, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
4405+ { 10270, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
4406+ { 10308, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
4407+ { 10357, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
4408+ { 10399, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
4409+ { 10431, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
4410+ { 10462, 0x00000404 }, /* GL_FRONT */
4411+ { 10471, 0x00000408 }, /* GL_FRONT_AND_BACK */
4412+ { 10489, 0x00000B46 }, /* GL_FRONT_FACE */
4413+ { 10503, 0x00000400 }, /* GL_FRONT_LEFT */
4414+ { 10517, 0x00000401 }, /* GL_FRONT_RIGHT */
4415+ { 10532, 0x00008006 }, /* GL_FUNC_ADD */
4416+ { 10544, 0x00008006 }, /* GL_FUNC_ADD_EXT */
4417+ { 10560, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */
4418+ { 10585, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */
4419+ { 10614, 0x0000800A }, /* GL_FUNC_SUBTRACT */
4420+ { 10631, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */
4421+ { 10652, 0x00008191 }, /* GL_GENERATE_MIPMAP */
4422+ { 10671, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */
4423+ { 10695, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */
4424+ { 10724, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */
4425+ { 10748, 0x00000206 }, /* GL_GEQUAL */
4426+ { 10758, 0x00008009 }, /* GL_GL_BLEND_EQUATION_RGB */
4427+ { 10783, 0x00008C4A }, /* GL_GL_COMPRESSED_SLUMINANCE */
4428+ { 10811, 0x00008C4B }, /* GL_GL_COMPRESSED_SLUMINANCE_ALPHA */
4429+ { 10845, 0x00008C48 }, /* GL_GL_COMPRESSED_SRGB */
4430+ { 10867, 0x00008C49 }, /* GL_GL_COMPRESSED_SRGB_ALPHA */
4431+ { 10895, 0x0000845F }, /* GL_GL_CURRENT_RASTER_SECONDARY_COLOR */
4432+ { 10932, 0x00008B65 }, /* GL_GL_FLOAT_MAT2x3 */
4433+ { 10951, 0x00008B66 }, /* GL_GL_FLOAT_MAT2x4 */
4434+ { 10970, 0x00008B67 }, /* GL_GL_FLOAT_MAT3x2 */
4435+ { 10989, 0x00008B68 }, /* GL_GL_FLOAT_MAT3x4 */
4436+ { 11008, 0x00008B69 }, /* GL_GL_FLOAT_MAT4x2 */
4437+ { 11027, 0x00008B6A }, /* GL_GL_FLOAT_MAT4x3 */
4438+ { 11046, 0x000088EB }, /* GL_GL_PIXEL_PACK_BUFFER */
4439+ { 11070, 0x000088ED }, /* GL_GL_PIXEL_PACK_BUFFER_BINDING */
4440+ { 11102, 0x000088EC }, /* GL_GL_PIXEL_UNPACK_BUFFER */
4441+ { 11128, 0x000088EF }, /* GL_GL_PIXEL_UNPACK_BUFFER_BINDING */
4442+ { 11162, 0x00008C46 }, /* GL_GL_SLUMINANCE */
4443+ { 11179, 0x00008C47 }, /* GL_GL_SLUMINANCE8 */
4444+ { 11197, 0x00008C45 }, /* GL_GL_SLUMINANCE8_ALPHA8 */
4445+ { 11222, 0x00008C44 }, /* GL_GL_SLUMINANCE_ALPHA */
4446+ { 11245, 0x00008C40 }, /* GL_GL_SRGB */
4447+ { 11256, 0x00008C41 }, /* GL_GL_SRGB8 */
4448+ { 11268, 0x00008C43 }, /* GL_GL_SRGB8_ALPHA8 */
4449+ { 11287, 0x00008C42 }, /* GL_GL_SRGB_ALPHA */
4450+ { 11304, 0x00000204 }, /* GL_GREATER */
4451+ { 11315, 0x00001904 }, /* GL_GREEN */
4452+ { 11324, 0x00000D19 }, /* GL_GREEN_BIAS */
4453+ { 11338, 0x00000D53 }, /* GL_GREEN_BITS */
4454+ { 11352, 0x00000D18 }, /* GL_GREEN_SCALE */
4455+ { 11367, 0x00008000 }, /* GL_HINT_BIT */
4456+ { 11379, 0x00008024 }, /* GL_HISTOGRAM */
4457+ { 11392, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */
4458+ { 11416, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */
4459+ { 11444, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */
4460+ { 11467, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */
4461+ { 11494, 0x00008024 }, /* GL_HISTOGRAM_EXT */
4462+ { 11511, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */
4463+ { 11531, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */
4464+ { 11555, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */
4465+ { 11579, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */
4466+ { 11607, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */
4467+ { 11635, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */
4468+ { 11667, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */
4469+ { 11689, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */
4470+ { 11715, 0x0000802D }, /* GL_HISTOGRAM_SINK */
4471+ { 11733, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */
4472+ { 11755, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */
4473+ { 11774, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */
4474+ { 11797, 0x0000862A }, /* GL_IDENTITY_NV */
4475+ { 11812, 0x00008150 }, /* GL_IGNORE_BORDER_HP */
4476+ { 11832, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
4477+ { 11872, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
4478+ { 11910, 0x00001E02 }, /* GL_INCR */
4479+ { 11918, 0x00008507 }, /* GL_INCR_WRAP */
4480+ { 11931, 0x00008507 }, /* GL_INCR_WRAP_EXT */
4481+ { 11948, 0x00008077 }, /* GL_INDEX_ARRAY */
4482+ { 11963, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */
4483+ { 11993, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */
4484+ { 12027, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */
4485+ { 12050, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */
4486+ { 12072, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */
4487+ { 12092, 0x00000D51 }, /* GL_INDEX_BITS */
4488+ { 12106, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */
4489+ { 12127, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */
4490+ { 12145, 0x00000C30 }, /* GL_INDEX_MODE */
4491+ { 12159, 0x00000D13 }, /* GL_INDEX_OFFSET */
4492+ { 12175, 0x00000D12 }, /* GL_INDEX_SHIFT */
4493+ { 12190, 0x00000C21 }, /* GL_INDEX_WRITEMASK */
4494+ { 12209, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */
4495+ { 12228, 0x00001404 }, /* GL_INT */
4496+ { 12235, 0x00008049 }, /* GL_INTENSITY */
4497+ { 12248, 0x0000804C }, /* GL_INTENSITY12 */
4498+ { 12263, 0x0000804C }, /* GL_INTENSITY12_EXT */
4499+ { 12282, 0x0000804D }, /* GL_INTENSITY16 */
4500+ { 12297, 0x0000804D }, /* GL_INTENSITY16_EXT */
4501+ { 12316, 0x0000804A }, /* GL_INTENSITY4 */
4502+ { 12330, 0x0000804A }, /* GL_INTENSITY4_EXT */
4503+ { 12348, 0x0000804B }, /* GL_INTENSITY8 */
4504+ { 12362, 0x0000804B }, /* GL_INTENSITY8_EXT */
4505+ { 12380, 0x00008049 }, /* GL_INTENSITY_EXT */
4506+ { 12397, 0x00008575 }, /* GL_INTERPOLATE */
4507+ { 12412, 0x00008575 }, /* GL_INTERPOLATE_ARB */
4508+ { 12431, 0x00008575 }, /* GL_INTERPOLATE_EXT */
4509+ { 12450, 0x00008B53 }, /* GL_INT_VEC2 */
4510+ { 12462, 0x00008B53 }, /* GL_INT_VEC2_ARB */
4511+ { 12478, 0x00008B54 }, /* GL_INT_VEC3 */
4512+ { 12490, 0x00008B54 }, /* GL_INT_VEC3_ARB */
4513+ { 12506, 0x00008B55 }, /* GL_INT_VEC4 */
4514+ { 12518, 0x00008B55 }, /* GL_INT_VEC4_ARB */
4515+ { 12534, 0x00000500 }, /* GL_INVALID_ENUM */
4516+ { 12550, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
4517+ { 12587, 0x00000502 }, /* GL_INVALID_OPERATION */
4518+ { 12608, 0x00000501 }, /* GL_INVALID_VALUE */
4519+ { 12625, 0x0000862B }, /* GL_INVERSE_NV */
4520+ { 12639, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */
4521+ { 12663, 0x0000150A }, /* GL_INVERT */
4522+ { 12673, 0x00001E00 }, /* GL_KEEP */
4523+ { 12681, 0x00000406 }, /* GL_LEFT */
4524+ { 12689, 0x00000203 }, /* GL_LEQUAL */
4525+ { 12699, 0x00000201 }, /* GL_LESS */
4526+ { 12707, 0x00004000 }, /* GL_LIGHT0 */
4527+ { 12717, 0x00004001 }, /* GL_LIGHT1 */
4528+ { 12727, 0x00004002 }, /* GL_LIGHT2 */
4529+ { 12737, 0x00004003 }, /* GL_LIGHT3 */
4530+ { 12747, 0x00004004 }, /* GL_LIGHT4 */
4531+ { 12757, 0x00004005 }, /* GL_LIGHT5 */
4532+ { 12767, 0x00004006 }, /* GL_LIGHT6 */
4533+ { 12777, 0x00004007 }, /* GL_LIGHT7 */
4534+ { 12787, 0x00000B50 }, /* GL_LIGHTING */
4535+ { 12799, 0x00000040 }, /* GL_LIGHTING_BIT */
4536+ { 12815, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */
4537+ { 12838, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */
4538+ { 12867, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */
4539+ { 12900, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
4540+ { 12928, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */
4541+ { 12952, 0x00001B01 }, /* GL_LINE */
4542+ { 12960, 0x00002601 }, /* GL_LINEAR */
4543+ { 12970, 0x00001208 }, /* GL_LINEAR_ATTENUATION */
4544+ { 12992, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
4545+ { 13022, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
4546+ { 13053, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */
4547+ { 13077, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */
4548+ { 13102, 0x00000001 }, /* GL_LINES */
4549+ { 13111, 0x00000004 }, /* GL_LINE_BIT */
4550+ { 13123, 0x00000002 }, /* GL_LINE_LOOP */
4551+ { 13136, 0x00000707 }, /* GL_LINE_RESET_TOKEN */
4552+ { 13156, 0x00000B20 }, /* GL_LINE_SMOOTH */
4553+ { 13171, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */
4554+ { 13191, 0x00000B24 }, /* GL_LINE_STIPPLE */
4555+ { 13207, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */
4556+ { 13231, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */
4557+ { 13254, 0x00000003 }, /* GL_LINE_STRIP */
4558+ { 13268, 0x00000702 }, /* GL_LINE_TOKEN */
4559+ { 13282, 0x00000B21 }, /* GL_LINE_WIDTH */
4560+ { 13296, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */
4561+ { 13322, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */
4562+ { 13342, 0x00008B82 }, /* GL_LINK_STATUS */
4563+ { 13357, 0x00000B32 }, /* GL_LIST_BASE */
4564+ { 13370, 0x00020000 }, /* GL_LIST_BIT */
4565+ { 13382, 0x00000B33 }, /* GL_LIST_INDEX */
4566+ { 13396, 0x00000B30 }, /* GL_LIST_MODE */
4567+ { 13409, 0x00000101 }, /* GL_LOAD */
4568+ { 13417, 0x00000BF1 }, /* GL_LOGIC_OP */
4569+ { 13429, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */
4570+ { 13446, 0x00008CA1 }, /* GL_LOWER_LEFT */
4571+ { 13460, 0x00001909 }, /* GL_LUMINANCE */
4572+ { 13473, 0x00008041 }, /* GL_LUMINANCE12 */
4573+ { 13488, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */
4574+ { 13511, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */
4575+ { 13538, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */
4576+ { 13560, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */
4577+ { 13586, 0x00008041 }, /* GL_LUMINANCE12_EXT */
4578+ { 13605, 0x00008042 }, /* GL_LUMINANCE16 */
4579+ { 13620, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */
4580+ { 13643, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */
4581+ { 13670, 0x00008042 }, /* GL_LUMINANCE16_EXT */
4582+ { 13689, 0x0000803F }, /* GL_LUMINANCE4 */
4583+ { 13703, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */
4584+ { 13724, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */
4585+ { 13749, 0x0000803F }, /* GL_LUMINANCE4_EXT */
4586+ { 13767, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */
4587+ { 13788, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */
4588+ { 13813, 0x00008040 }, /* GL_LUMINANCE8 */
4589+ { 13827, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */
4590+ { 13848, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */
4591+ { 13873, 0x00008040 }, /* GL_LUMINANCE8_EXT */
4592+ { 13891, 0x0000190A }, /* GL_LUMINANCE_ALPHA */
4593+ { 13910, 0x00000D90 }, /* GL_MAP1_COLOR_4 */
4594+ { 13926, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */
4595+ { 13946, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */
4596+ { 13968, 0x00000D91 }, /* GL_MAP1_INDEX */
4597+ { 13982, 0x00000D92 }, /* GL_MAP1_NORMAL */
4598+ { 13997, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */
4599+ { 14021, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */
4600+ { 14045, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */
4601+ { 14069, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */
4602+ { 14093, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */
4603+ { 14110, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */
4604+ { 14127, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
4605+ { 14155, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
4606+ { 14184, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
4607+ { 14213, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
4608+ { 14242, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
4609+ { 14271, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
4610+ { 14300, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
4611+ { 14329, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
4612+ { 14357, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
4613+ { 14385, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
4614+ { 14413, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
4615+ { 14441, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
4616+ { 14469, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
4617+ { 14497, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
4618+ { 14525, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
4619+ { 14553, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
4620+ { 14581, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */
4621+ { 14597, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */
4622+ { 14617, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */
4623+ { 14639, 0x00000DB1 }, /* GL_MAP2_INDEX */
4624+ { 14653, 0x00000DB2 }, /* GL_MAP2_NORMAL */
4625+ { 14668, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */
4626+ { 14692, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */
4627+ { 14716, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */
4628+ { 14740, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */
4629+ { 14764, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */
4630+ { 14781, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */
4631+ { 14798, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
4632+ { 14826, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
4633+ { 14855, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
4634+ { 14884, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
4635+ { 14913, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
4636+ { 14942, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
4637+ { 14971, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
4638+ { 15000, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
4639+ { 15028, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
4640+ { 15056, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
4641+ { 15084, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
4642+ { 15112, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
4643+ { 15140, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
4644+ { 15168, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */
4645+ { 15196, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
4646+ { 15224, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
4647+ { 15252, 0x00000D10 }, /* GL_MAP_COLOR */
4648+ { 15265, 0x00000D11 }, /* GL_MAP_STENCIL */
4649+ { 15280, 0x000088C0 }, /* GL_MATRIX0_ARB */
4650+ { 15295, 0x00008630 }, /* GL_MATRIX0_NV */
4651+ { 15309, 0x000088CA }, /* GL_MATRIX10_ARB */
4652+ { 15325, 0x000088CB }, /* GL_MATRIX11_ARB */
4653+ { 15341, 0x000088CC }, /* GL_MATRIX12_ARB */
4654+ { 15357, 0x000088CD }, /* GL_MATRIX13_ARB */
4655+ { 15373, 0x000088CE }, /* GL_MATRIX14_ARB */
4656+ { 15389, 0x000088CF }, /* GL_MATRIX15_ARB */
4657+ { 15405, 0x000088D0 }, /* GL_MATRIX16_ARB */
4658+ { 15421, 0x000088D1 }, /* GL_MATRIX17_ARB */
4659+ { 15437, 0x000088D2 }, /* GL_MATRIX18_ARB */
4660+ { 15453, 0x000088D3 }, /* GL_MATRIX19_ARB */
4661+ { 15469, 0x000088C1 }, /* GL_MATRIX1_ARB */
4662+ { 15484, 0x00008631 }, /* GL_MATRIX1_NV */
4663+ { 15498, 0x000088D4 }, /* GL_MATRIX20_ARB */
4664+ { 15514, 0x000088D5 }, /* GL_MATRIX21_ARB */
4665+ { 15530, 0x000088D6 }, /* GL_MATRIX22_ARB */
4666+ { 15546, 0x000088D7 }, /* GL_MATRIX23_ARB */
4667+ { 15562, 0x000088D8 }, /* GL_MATRIX24_ARB */
4668+ { 15578, 0x000088D9 }, /* GL_MATRIX25_ARB */
4669+ { 15594, 0x000088DA }, /* GL_MATRIX26_ARB */
4670+ { 15610, 0x000088DB }, /* GL_MATRIX27_ARB */
4671+ { 15626, 0x000088DC }, /* GL_MATRIX28_ARB */
4672+ { 15642, 0x000088DD }, /* GL_MATRIX29_ARB */
4673+ { 15658, 0x000088C2 }, /* GL_MATRIX2_ARB */
4674+ { 15673, 0x00008632 }, /* GL_MATRIX2_NV */
4675+ { 15687, 0x000088DE }, /* GL_MATRIX30_ARB */
4676+ { 15703, 0x000088DF }, /* GL_MATRIX31_ARB */
4677+ { 15719, 0x000088C3 }, /* GL_MATRIX3_ARB */
4678+ { 15734, 0x00008633 }, /* GL_MATRIX3_NV */
4679+ { 15748, 0x000088C4 }, /* GL_MATRIX4_ARB */
4680+ { 15763, 0x00008634 }, /* GL_MATRIX4_NV */
4681+ { 15777, 0x000088C5 }, /* GL_MATRIX5_ARB */
4682+ { 15792, 0x00008635 }, /* GL_MATRIX5_NV */
4683+ { 15806, 0x000088C6 }, /* GL_MATRIX6_ARB */
4684+ { 15821, 0x00008636 }, /* GL_MATRIX6_NV */
4685+ { 15835, 0x000088C7 }, /* GL_MATRIX7_ARB */
4686+ { 15850, 0x00008637 }, /* GL_MATRIX7_NV */
4687+ { 15864, 0x000088C8 }, /* GL_MATRIX8_ARB */
4688+ { 15879, 0x000088C9 }, /* GL_MATRIX9_ARB */
4689+ { 15894, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */
4690+ { 15920, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
4691+ { 15954, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
4692+ { 15985, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
4693+ { 16018, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
4694+ { 16049, 0x00000BA0 }, /* GL_MATRIX_MODE */
4695+ { 16064, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */
4696+ { 16086, 0x00008008 }, /* GL_MAX */
4697+ { 16093, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */
4698+ { 16116, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
4699+ { 16148, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */
4700+ { 16174, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
4701+ { 16207, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
4702+ { 16233, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
4703+ { 16267, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */
4704+ { 16286, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
4705+ { 16315, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
4706+ { 16347, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */
4707+ { 16383, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
4708+ { 16419, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
4709+ { 16459, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */
4710+ { 16485, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */
4711+ { 16515, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */
4712+ { 16540, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */
4713+ { 16569, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
4714+ { 16598, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */
4715+ { 16631, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */
4716+ { 16651, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */
4717+ { 16675, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */
4718+ { 16699, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */
4719+ { 16723, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */
4720+ { 16748, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */
4721+ { 16766, 0x00008008 }, /* GL_MAX_EXT */
4722+ { 16777, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
4723+ { 16812, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
4724+ { 16851, 0x00000D31 }, /* GL_MAX_LIGHTS */
4725+ { 16865, 0x00000B31 }, /* GL_MAX_LIST_NESTING */
4726+ { 16885, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
4727+ { 16923, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */
4728+ { 16952, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */
4729+ { 16976, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */
4730+ { 17004, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */
4731+ { 17027, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
4732+ { 17064, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
4733+ { 17100, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
4734+ { 17127, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
4735+ { 17156, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
4736+ { 17190, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
4737+ { 17226, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
4738+ { 17253, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
4739+ { 17285, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
4740+ { 17321, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
4741+ { 17350, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
4742+ { 17379, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */
4743+ { 17407, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
4744+ { 17445, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
4745+ { 17489, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
4746+ { 17532, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
4747+ { 17566, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
4748+ { 17605, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
4749+ { 17642, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
4750+ { 17680, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
4751+ { 17723, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
4752+ { 17766, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
4753+ { 17796, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
4754+ { 17827, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
4755+ { 17863, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
4756+ { 17899, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */
4757+ { 17929, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
4758+ { 17963, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */
4759+ { 17996, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
4760+ { 18025, 0x00008504 }, /* GL_MAX_SHININESS_NV */
4761+ { 18045, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */
4762+ { 18069, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */
4763+ { 18091, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */
4764+ { 18117, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */
4765+ { 18144, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
4766+ { 18175, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */
4767+ { 18199, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
4768+ { 18233, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */
4769+ { 18253, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */
4770+ { 18280, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */
4771+ { 18301, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */
4772+ { 18326, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */
4773+ { 18351, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
4774+ { 18386, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */
4775+ { 18408, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */
4776+ { 18434, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */
4777+ { 18456, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */
4778+ { 18482, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
4779+ { 18516, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
4780+ { 18554, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
4781+ { 18587, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
4782+ { 18624, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */
4783+ { 18648, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */
4784+ { 18669, 0x00008007 }, /* GL_MIN */
4785+ { 18676, 0x0000802E }, /* GL_MINMAX */
4786+ { 18686, 0x0000802E }, /* GL_MINMAX_EXT */
4787+ { 18700, 0x0000802F }, /* GL_MINMAX_FORMAT */
4788+ { 18717, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */
4789+ { 18738, 0x00008030 }, /* GL_MINMAX_SINK */
4790+ { 18753, 0x00008030 }, /* GL_MINMAX_SINK_EXT */
4791+ { 18772, 0x00008007 }, /* GL_MIN_EXT */
4792+ { 18783, 0x00008370 }, /* GL_MIRRORED_REPEAT */
4793+ { 18802, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */
4794+ { 18825, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */
4795+ { 18848, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */
4796+ { 18868, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */
4797+ { 18888, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
4798+ { 18918, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */
4799+ { 18946, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
4800+ { 18974, 0x00001700 }, /* GL_MODELVIEW */
4801+ { 18987, 0x00001700 }, /* GL_MODELVIEW0_ARB */
4802+ { 19005, 0x0000872A }, /* GL_MODELVIEW10_ARB */
4803+ { 19024, 0x0000872B }, /* GL_MODELVIEW11_ARB */
4804+ { 19043, 0x0000872C }, /* GL_MODELVIEW12_ARB */
4805+ { 19062, 0x0000872D }, /* GL_MODELVIEW13_ARB */
4806+ { 19081, 0x0000872E }, /* GL_MODELVIEW14_ARB */
4807+ { 19100, 0x0000872F }, /* GL_MODELVIEW15_ARB */
4808+ { 19119, 0x00008730 }, /* GL_MODELVIEW16_ARB */
4809+ { 19138, 0x00008731 }, /* GL_MODELVIEW17_ARB */
4810+ { 19157, 0x00008732 }, /* GL_MODELVIEW18_ARB */
4811+ { 19176, 0x00008733 }, /* GL_MODELVIEW19_ARB */
4812+ { 19195, 0x0000850A }, /* GL_MODELVIEW1_ARB */
4813+ { 19213, 0x00008734 }, /* GL_MODELVIEW20_ARB */
4814+ { 19232, 0x00008735 }, /* GL_MODELVIEW21_ARB */
4815+ { 19251, 0x00008736 }, /* GL_MODELVIEW22_ARB */
4816+ { 19270, 0x00008737 }, /* GL_MODELVIEW23_ARB */
4817+ { 19289, 0x00008738 }, /* GL_MODELVIEW24_ARB */
4818+ { 19308, 0x00008739 }, /* GL_MODELVIEW25_ARB */
4819+ { 19327, 0x0000873A }, /* GL_MODELVIEW26_ARB */
4820+ { 19346, 0x0000873B }, /* GL_MODELVIEW27_ARB */
4821+ { 19365, 0x0000873C }, /* GL_MODELVIEW28_ARB */
4822+ { 19384, 0x0000873D }, /* GL_MODELVIEW29_ARB */
4823+ { 19403, 0x00008722 }, /* GL_MODELVIEW2_ARB */
4824+ { 19421, 0x0000873E }, /* GL_MODELVIEW30_ARB */
4825+ { 19440, 0x0000873F }, /* GL_MODELVIEW31_ARB */
4826+ { 19459, 0x00008723 }, /* GL_MODELVIEW3_ARB */
4827+ { 19477, 0x00008724 }, /* GL_MODELVIEW4_ARB */
4828+ { 19495, 0x00008725 }, /* GL_MODELVIEW5_ARB */
4829+ { 19513, 0x00008726 }, /* GL_MODELVIEW6_ARB */
4830+ { 19531, 0x00008727 }, /* GL_MODELVIEW7_ARB */
4831+ { 19549, 0x00008728 }, /* GL_MODELVIEW8_ARB */
4832+ { 19567, 0x00008729 }, /* GL_MODELVIEW9_ARB */
4833+ { 19585, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */
4834+ { 19605, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */
4835+ { 19632, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */
4836+ { 19657, 0x00002100 }, /* GL_MODULATE */
4837+ { 19669, 0x00008744 }, /* GL_MODULATE_ADD_ATI */
4838+ { 19689, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */
4839+ { 19716, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */
4840+ { 19741, 0x00000103 }, /* GL_MULT */
4841+ { 19749, 0x0000809D }, /* GL_MULTISAMPLE */
4842+ { 19764, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */
4843+ { 19784, 0x0000809D }, /* GL_MULTISAMPLE_ARB */
4844+ { 19803, 0x20000000 }, /* GL_MULTISAMPLE_BIT */
4845+ { 19822, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */
4846+ { 19846, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */
4847+ { 19869, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */
4848+ { 19899, 0x00002A25 }, /* GL_N3F_V3F */
4849+ { 19910, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */
4850+ { 19930, 0x0000150E }, /* GL_NAND */
4851+ { 19938, 0x00002600 }, /* GL_NEAREST */
4852+ { 19949, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
4853+ { 19980, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
4854+ { 20012, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */
4855+ { 20037, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */
4856+ { 20063, 0x00000200 }, /* GL_NEVER */
4857+ { 20072, 0x00001102 }, /* GL_NICEST */
4858+ { 20082, 0x00000000 }, /* GL_NONE */
4859+ { 20090, 0x00001505 }, /* GL_NOOP */
4860+ { 20098, 0x00001508 }, /* GL_NOR */
4861+ { 20105, 0x00000BA1 }, /* GL_NORMALIZE */
4862+ { 20118, 0x00008075 }, /* GL_NORMAL_ARRAY */
4863+ { 20134, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
4864+ { 20165, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */
4865+ { 20200, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */
4866+ { 20224, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */
4867+ { 20247, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */
4868+ { 20268, 0x00008511 }, /* GL_NORMAL_MAP */
4869+ { 20282, 0x00008511 }, /* GL_NORMAL_MAP_ARB */
4870+ { 20300, 0x00008511 }, /* GL_NORMAL_MAP_NV */
4871+ { 20317, 0x00000205 }, /* GL_NOTEQUAL */
4872+ { 20329, 0x00000000 }, /* GL_NO_ERROR */
4873+ { 20341, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
4874+ { 20375, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */
4875+ { 20413, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
4876+ { 20445, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
4877+ { 20487, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
4878+ { 20517, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
4879+ { 20557, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
4880+ { 20588, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */
4881+ { 20617, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */
4882+ { 20645, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
4883+ { 20675, 0x00002401 }, /* GL_OBJECT_LINEAR */
4884+ { 20692, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */
4885+ { 20718, 0x00002501 }, /* GL_OBJECT_PLANE */
4886+ { 20734, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
4887+ { 20769, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */
4888+ { 20791, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */
4889+ { 20810, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */
4890+ { 20840, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */
4891+ { 20861, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */
4892+ { 20889, 0x00000001 }, /* GL_ONE */
4893+ { 20896, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */
4894+ { 20924, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */
4895+ { 20956, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */
4896+ { 20984, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */
4897+ { 21016, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */
4898+ { 21039, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */
4899+ { 21062, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */
4900+ { 21085, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */
4901+ { 21108, 0x00008598 }, /* GL_OPERAND0_ALPHA */
4902+ { 21126, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */
4903+ { 21148, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */
4904+ { 21170, 0x00008590 }, /* GL_OPERAND0_RGB */
4905+ { 21186, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */
4906+ { 21206, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */
4907+ { 21226, 0x00008599 }, /* GL_OPERAND1_ALPHA */
4908+ { 21244, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */
4909+ { 21266, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */
4910+ { 21288, 0x00008591 }, /* GL_OPERAND1_RGB */
4911+ { 21304, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */
4912+ { 21324, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */
4913+ { 21344, 0x0000859A }, /* GL_OPERAND2_ALPHA */
4914+ { 21362, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */
4915+ { 21384, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */
4916+ { 21406, 0x00008592 }, /* GL_OPERAND2_RGB */
4917+ { 21422, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */
4918+ { 21442, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */
4919+ { 21462, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */
4920+ { 21483, 0x00008593 }, /* GL_OPERAND3_RGB_NV */
4921+ { 21502, 0x00001507 }, /* GL_OR */
4922+ { 21508, 0x00000A01 }, /* GL_ORDER */
4923+ { 21517, 0x0000150D }, /* GL_OR_INVERTED */
4924+ { 21532, 0x0000150B }, /* GL_OR_REVERSE */
4925+ { 21546, 0x00000505 }, /* GL_OUT_OF_MEMORY */
4926+ { 21563, 0x00000D05 }, /* GL_PACK_ALIGNMENT */
4927+ { 21581, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */
4928+ { 21602, 0x00008758 }, /* GL_PACK_INVERT_MESA */
4929+ { 21622, 0x00000D01 }, /* GL_PACK_LSB_FIRST */
4930+ { 21640, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */
4931+ { 21659, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */
4932+ { 21679, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */
4933+ { 21699, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */
4934+ { 21717, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */
4935+ { 21736, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */
4936+ { 21761, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */
4937+ { 21785, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */
4938+ { 21806, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */
4939+ { 21828, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */
4940+ { 21850, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */
4941+ { 21875, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */
4942+ { 21899, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */
4943+ { 21920, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */
4944+ { 21942, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */
4945+ { 21964, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */
4946+ { 21986, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */
4947+ { 22017, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */
4948+ { 22037, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */
4949+ { 22062, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */
4950+ { 22082, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */
4951+ { 22107, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */
4952+ { 22127, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */
4953+ { 22152, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */
4954+ { 22172, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */
4955+ { 22197, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */
4956+ { 22217, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */
4957+ { 22242, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */
4958+ { 22262, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */
4959+ { 22287, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */
4960+ { 22307, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */
4961+ { 22332, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */
4962+ { 22352, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */
4963+ { 22377, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */
4964+ { 22397, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */
4965+ { 22422, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */
4966+ { 22442, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */
4967+ { 22467, 0x00000020 }, /* GL_PIXEL_MODE_BIT */
4968+ { 22485, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
4969+ { 22518, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */
4970+ { 22543, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
4971+ { 22578, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */
4972+ { 22605, 0x00001B00 }, /* GL_POINT */
4973+ { 22614, 0x00000000 }, /* GL_POINTS */
4974+ { 22624, 0x00000002 }, /* GL_POINT_BIT */
4975+ { 22637, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */
4976+ { 22667, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */
4977+ { 22701, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */
4978+ { 22735, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */
4979+ { 22770, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */
4980+ { 22799, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */
4981+ { 22832, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */
4982+ { 22865, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */
4983+ { 22899, 0x00000B11 }, /* GL_POINT_SIZE */
4984+ { 22913, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */
4985+ { 22939, 0x00008127 }, /* GL_POINT_SIZE_MAX */
4986+ { 22957, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */
4987+ { 22979, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */
4988+ { 23001, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */
4989+ { 23024, 0x00008126 }, /* GL_POINT_SIZE_MIN */
4990+ { 23042, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */
4991+ { 23064, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */
4992+ { 23086, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */
4993+ { 23109, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */
4994+ { 23129, 0x00000B10 }, /* GL_POINT_SMOOTH */
4995+ { 23145, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */
4996+ { 23166, 0x00008861 }, /* GL_POINT_SPRITE */
4997+ { 23182, 0x00008861 }, /* GL_POINT_SPRITE_ARB */
4998+ { 23202, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */
4999+ { 23231, 0x00008861 }, /* GL_POINT_SPRITE_NV */
5000+ { 23250, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */
5001+ { 23276, 0x00000701 }, /* GL_POINT_TOKEN */
5002+ { 23291, 0x00000009 }, /* GL_POLYGON */
5003+ { 23302, 0x00000008 }, /* GL_POLYGON_BIT */
5004+ { 23317, 0x00000B40 }, /* GL_POLYGON_MODE */
5005+ { 23333, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */
5006+ { 23356, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */
5007+ { 23381, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */
5008+ { 23404, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */
5009+ { 23427, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */
5010+ { 23451, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */
5011+ { 23475, 0x00000B41 }, /* GL_POLYGON_SMOOTH */
5012+ { 23493, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */
5013+ { 23516, 0x00000B42 }, /* GL_POLYGON_STIPPLE */
5014+ { 23535, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */
5015+ { 23558, 0x00000703 }, /* GL_POLYGON_TOKEN */
5016+ { 23575, 0x00001203 }, /* GL_POSITION */
5017+ { 23587, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
5018+ { 23619, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */
5019+ { 23655, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
5020+ { 23688, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */
5021+ { 23725, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
5022+ { 23756, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */
5023+ { 23791, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
5024+ { 23823, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */
5025+ { 23859, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
5026+ { 23892, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
5027+ { 23924, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */
5028+ { 23960, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
5029+ { 23993, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */
5030+ { 24030, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */
5031+ { 24060, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */
5032+ { 24094, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */
5033+ { 24125, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */
5034+ { 24160, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
5035+ { 24191, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */
5036+ { 24226, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
5037+ { 24258, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */
5038+ { 24294, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */
5039+ { 24324, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */
5040+ { 24358, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */
5041+ { 24389, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */
5042+ { 24424, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */
5043+ { 24456, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */
5044+ { 24487, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */
5045+ { 24522, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */
5046+ { 24554, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */
5047+ { 24590, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */
5048+ { 24619, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */
5049+ { 24652, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */
5050+ { 24682, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */
5051+ { 24716, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
5052+ { 24755, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
5053+ { 24788, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
5054+ { 24828, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
5055+ { 24862, 0x00008578 }, /* GL_PREVIOUS */
5056+ { 24874, 0x00008578 }, /* GL_PREVIOUS_ARB */
5057+ { 24890, 0x00008578 }, /* GL_PREVIOUS_EXT */
5058+ { 24906, 0x00008577 }, /* GL_PRIMARY_COLOR */
5059+ { 24923, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */
5060+ { 24944, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */
5061+ { 24965, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
5062+ { 24998, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
5063+ { 25030, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */
5064+ { 25053, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */
5065+ { 25076, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */
5066+ { 25106, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */
5067+ { 25135, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */
5068+ { 25163, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */
5069+ { 25185, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */
5070+ { 25213, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */
5071+ { 25241, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */
5072+ { 25263, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */
5073+ { 25284, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
5074+ { 25324, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
5075+ { 25363, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
5076+ { 25393, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
5077+ { 25428, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
5078+ { 25461, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
5079+ { 25495, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
5080+ { 25534, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
5081+ { 25573, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */
5082+ { 25595, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */
5083+ { 25621, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */
5084+ { 25645, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */
5085+ { 25668, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */
5086+ { 25690, 0x00008628 }, /* GL_PROGRAM_STRING_NV */
5087+ { 25711, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */
5088+ { 25732, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */
5089+ { 25759, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
5090+ { 25791, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
5091+ { 25823, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
5092+ { 25858, 0x00001701 }, /* GL_PROJECTION */
5093+ { 25872, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */
5094+ { 25893, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */
5095+ { 25919, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */
5096+ { 25940, 0x00008025 }, /* GL_PROXY_HISTOGRAM */
5097+ { 25959, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */
5098+ { 25982, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
5099+ { 26021, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
5100+ { 26059, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */
5101+ { 26079, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
5102+ { 26109, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */
5103+ { 26133, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */
5104+ { 26153, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
5105+ { 26183, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */
5106+ { 26207, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */
5107+ { 26227, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
5108+ { 26260, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */
5109+ { 26286, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */
5110+ { 26316, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
5111+ { 26347, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */
5112+ { 26377, 0x00002003 }, /* GL_Q */
5113+ { 26382, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */
5114+ { 26407, 0x00000007 }, /* GL_QUADS */
5115+ { 26416, 0x00008614 }, /* GL_QUAD_MESH_SUN */
5116+ { 26433, 0x00000008 }, /* GL_QUAD_STRIP */
5117+ { 26447, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */
5118+ { 26469, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */
5119+ { 26495, 0x00008866 }, /* GL_QUERY_RESULT */
5120+ { 26511, 0x00008866 }, /* GL_QUERY_RESULT_ARB */
5121+ { 26531, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */
5122+ { 26557, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */
5123+ { 26587, 0x00002002 }, /* GL_R */
5124+ { 26592, 0x00002A10 }, /* GL_R3_G3_B2 */
5125+ { 26604, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
5126+ { 26637, 0x00000C02 }, /* GL_READ_BUFFER */
5127+ { 26652, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
5128+ { 26684, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */
5129+ { 26708, 0x000088B8 }, /* GL_READ_ONLY */
5130+ { 26721, 0x000088B8 }, /* GL_READ_ONLY_ARB */
5131+ { 26738, 0x000088BA }, /* GL_READ_WRITE */
5132+ { 26752, 0x000088BA }, /* GL_READ_WRITE_ARB */
5133+ { 26770, 0x00001903 }, /* GL_RED */
5134+ { 26777, 0x00008016 }, /* GL_REDUCE */
5135+ { 26787, 0x00008016 }, /* GL_REDUCE_EXT */
5136+ { 26801, 0x00000D15 }, /* GL_RED_BIAS */
5137+ { 26813, 0x00000D52 }, /* GL_RED_BITS */
5138+ { 26825, 0x00000D14 }, /* GL_RED_SCALE */
5139+ { 26838, 0x00008512 }, /* GL_REFLECTION_MAP */
5140+ { 26856, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */
5141+ { 26878, 0x00008512 }, /* GL_REFLECTION_MAP_NV */
5142+ { 26899, 0x00001C00 }, /* GL_RENDER */
5143+ { 26909, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */
5144+ { 26937, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */
5145+ { 26957, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */
5146+ { 26984, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
5147+ { 27020, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */
5148+ { 27046, 0x00001F01 }, /* GL_RENDERER */
5149+ { 27058, 0x00000C40 }, /* GL_RENDER_MODE */
5150+ { 27073, 0x00002901 }, /* GL_REPEAT */
5151+ { 27083, 0x00001E01 }, /* GL_REPLACE */
5152+ { 27094, 0x00008062 }, /* GL_REPLACE_EXT */
5153+ { 27109, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */
5154+ { 27132, 0x0000803A }, /* GL_RESCALE_NORMAL */
5155+ { 27150, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */
5156+ { 27172, 0x00000102 }, /* GL_RETURN */
5157+ { 27182, 0x00001907 }, /* GL_RGB */
5158+ { 27189, 0x00008052 }, /* GL_RGB10 */
5159+ { 27198, 0x00008059 }, /* GL_RGB10_A2 */
5160+ { 27210, 0x00008059 }, /* GL_RGB10_A2_EXT */
5161+ { 27226, 0x00008052 }, /* GL_RGB10_EXT */
5162+ { 27239, 0x00008053 }, /* GL_RGB12 */
5163+ { 27248, 0x00008053 }, /* GL_RGB12_EXT */
5164+ { 27261, 0x00008054 }, /* GL_RGB16 */
5165+ { 27270, 0x00008054 }, /* GL_RGB16_EXT */
5166+ { 27283, 0x0000804E }, /* GL_RGB2_EXT */
5167+ { 27295, 0x0000804F }, /* GL_RGB4 */
5168+ { 27303, 0x0000804F }, /* GL_RGB4_EXT */
5169+ { 27315, 0x000083A1 }, /* GL_RGB4_S3TC */
5170+ { 27328, 0x00008050 }, /* GL_RGB5 */
5171+ { 27336, 0x00008057 }, /* GL_RGB5_A1 */
5172+ { 27347, 0x00008057 }, /* GL_RGB5_A1_EXT */
5173+ { 27362, 0x00008050 }, /* GL_RGB5_EXT */
5174+ { 27374, 0x00008051 }, /* GL_RGB8 */
5175+ { 27382, 0x00008051 }, /* GL_RGB8_EXT */
5176+ { 27394, 0x00001908 }, /* GL_RGBA */
5177+ { 27402, 0x0000805A }, /* GL_RGBA12 */
5178+ { 27412, 0x0000805A }, /* GL_RGBA12_EXT */
5179+ { 27426, 0x0000805B }, /* GL_RGBA16 */
5180+ { 27436, 0x0000805B }, /* GL_RGBA16_EXT */
5181+ { 27450, 0x00008055 }, /* GL_RGBA2 */
5182+ { 27459, 0x00008055 }, /* GL_RGBA2_EXT */
5183+ { 27472, 0x00008056 }, /* GL_RGBA4 */
5184+ { 27481, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */
5185+ { 27500, 0x00008056 }, /* GL_RGBA4_EXT */
5186+ { 27513, 0x000083A3 }, /* GL_RGBA4_S3TC */
5187+ { 27527, 0x00008058 }, /* GL_RGBA8 */
5188+ { 27536, 0x00008058 }, /* GL_RGBA8_EXT */
5189+ { 27549, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */
5190+ { 27567, 0x00000C31 }, /* GL_RGBA_MODE */
5191+ { 27580, 0x000083A2 }, /* GL_RGBA_S3TC */
5192+ { 27593, 0x000083A0 }, /* GL_RGB_S3TC */
5193+ { 27605, 0x00008573 }, /* GL_RGB_SCALE */
5194+ { 27618, 0x00008573 }, /* GL_RGB_SCALE_ARB */
5195+ { 27635, 0x00008573 }, /* GL_RGB_SCALE_EXT */
5196+ { 27652, 0x00000407 }, /* GL_RIGHT */
5197+ { 27661, 0x00002000 }, /* GL_S */
5198+ { 27666, 0x00008B5D }, /* GL_SAMPLER_1D */
5199+ { 27680, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */
5200+ { 27701, 0x00008B5E }, /* GL_SAMPLER_2D */
5201+ { 27715, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */
5202+ { 27736, 0x00008B5F }, /* GL_SAMPLER_3D */
5203+ { 27750, 0x00008B60 }, /* GL_SAMPLER_CUBE */
5204+ { 27766, 0x000080A9 }, /* GL_SAMPLES */
5205+ { 27777, 0x000086B4 }, /* GL_SAMPLES_3DFX */
5206+ { 27793, 0x000080A9 }, /* GL_SAMPLES_ARB */
5207+ { 27808, 0x00008914 }, /* GL_SAMPLES_PASSED */
5208+ { 27826, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */
5209+ { 27848, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
5210+ { 27876, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */
5211+ { 27908, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */
5212+ { 27931, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */
5213+ { 27958, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */
5214+ { 27976, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */
5215+ { 27999, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */
5216+ { 28021, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */
5217+ { 28040, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */
5218+ { 28063, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */
5219+ { 28089, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */
5220+ { 28119, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */
5221+ { 28144, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */
5222+ { 28173, 0x00080000 }, /* GL_SCISSOR_BIT */
5223+ { 28188, 0x00000C10 }, /* GL_SCISSOR_BOX */
5224+ { 28203, 0x00000C11 }, /* GL_SCISSOR_TEST */
5225+ { 28219, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */
5226+ { 28244, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
5227+ { 28284, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */
5228+ { 28328, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
5229+ { 28361, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
5230+ { 28391, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
5231+ { 28423, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
5232+ { 28453, 0x00001C02 }, /* GL_SELECT */
5233+ { 28463, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */
5234+ { 28491, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */
5235+ { 28516, 0x00008012 }, /* GL_SEPARABLE_2D */
5236+ { 28532, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */
5237+ { 28559, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */
5238+ { 28590, 0x0000150F }, /* GL_SET */
5239+ { 28597, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */
5240+ { 28618, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */
5241+ { 28642, 0x00008B4F }, /* GL_SHADER_TYPE */
5242+ { 28657, 0x00000B54 }, /* GL_SHADE_MODEL */
5243+ { 28672, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */
5244+ { 28700, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */
5245+ { 28723, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */
5246+ { 28753, 0x00001601 }, /* GL_SHININESS */
5247+ { 28766, 0x00001402 }, /* GL_SHORT */
5248+ { 28775, 0x000081F9 }, /* GL_SINGLE_COLOR */
5249+ { 28791, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */
5250+ { 28811, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */
5251+ { 28830, 0x00001D01 }, /* GL_SMOOTH */
5252+ { 28840, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */
5253+ { 28873, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */
5254+ { 28900, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */
5255+ { 28933, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */
5256+ { 28960, 0x00008588 }, /* GL_SOURCE0_ALPHA */
5257+ { 28977, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */
5258+ { 28998, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */
5259+ { 29019, 0x00008580 }, /* GL_SOURCE0_RGB */
5260+ { 29034, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */
5261+ { 29053, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */
5262+ { 29072, 0x00008589 }, /* GL_SOURCE1_ALPHA */
5263+ { 29089, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */
5264+ { 29110, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */
5265+ { 29131, 0x00008581 }, /* GL_SOURCE1_RGB */
5266+ { 29146, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */
5267+ { 29165, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */
5268+ { 29184, 0x0000858A }, /* GL_SOURCE2_ALPHA */
5269+ { 29201, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */
5270+ { 29222, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */
5271+ { 29243, 0x00008582 }, /* GL_SOURCE2_RGB */
5272+ { 29258, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */
5273+ { 29277, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */
5274+ { 29296, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */
5275+ { 29316, 0x00008583 }, /* GL_SOURCE3_RGB_NV */
5276+ { 29334, 0x00001202 }, /* GL_SPECULAR */
5277+ { 29346, 0x00002402 }, /* GL_SPHERE_MAP */
5278+ { 29360, 0x00001206 }, /* GL_SPOT_CUTOFF */
5279+ { 29375, 0x00001204 }, /* GL_SPOT_DIRECTION */
5280+ { 29393, 0x00001205 }, /* GL_SPOT_EXPONENT */
5281+ { 29410, 0x00008588 }, /* GL_SRC0_ALPHA */
5282+ { 29424, 0x00008580 }, /* GL_SRC0_RGB */
5283+ { 29436, 0x00008589 }, /* GL_SRC1_ALPHA */
5284+ { 29450, 0x00008581 }, /* GL_SRC1_RGB */
5285+ { 29462, 0x0000858A }, /* GL_SRC2_ALPHA */
5286+ { 29476, 0x00008582 }, /* GL_SRC2_RGB */
5287+ { 29488, 0x00000302 }, /* GL_SRC_ALPHA */
5288+ { 29501, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */
5289+ { 29523, 0x00000300 }, /* GL_SRC_COLOR */
5290+ { 29536, 0x00000503 }, /* GL_STACK_OVERFLOW */
5291+ { 29554, 0x00000504 }, /* GL_STACK_UNDERFLOW */
5292+ { 29573, 0x000088E6 }, /* GL_STATIC_COPY */
5293+ { 29588, 0x000088E6 }, /* GL_STATIC_COPY_ARB */
5294+ { 29607, 0x000088E4 }, /* GL_STATIC_DRAW */
5295+ { 29622, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */
5296+ { 29641, 0x000088E5 }, /* GL_STATIC_READ */
5297+ { 29656, 0x000088E5 }, /* GL_STATIC_READ_ARB */
5298+ { 29675, 0x00001802 }, /* GL_STENCIL */
5299+ { 29686, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */
5300+ { 29712, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */
5301+ { 29733, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */
5302+ { 29754, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
5303+ { 29786, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
5304+ { 29818, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */
5305+ { 29838, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */
5306+ { 29865, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */
5307+ { 29891, 0x00000D57 }, /* GL_STENCIL_BITS */
5308+ { 29907, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */
5309+ { 29929, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */
5310+ { 29952, 0x00000B94 }, /* GL_STENCIL_FAIL */
5311+ { 29968, 0x00000B92 }, /* GL_STENCIL_FUNC */
5312+ { 29984, 0x00001901 }, /* GL_STENCIL_INDEX */
5313+ { 30001, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */
5314+ { 30024, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */
5315+ { 30046, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */
5316+ { 30068, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */
5317+ { 30090, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */
5318+ { 30111, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */
5319+ { 30138, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */
5320+ { 30165, 0x00000B97 }, /* GL_STENCIL_REF */
5321+ { 30180, 0x00000B90 }, /* GL_STENCIL_TEST */
5322+ { 30196, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
5323+ { 30225, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */
5324+ { 30247, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */
5325+ { 30268, 0x00000C33 }, /* GL_STEREO */
5326+ { 30278, 0x000088E2 }, /* GL_STREAM_COPY */
5327+ { 30293, 0x000088E2 }, /* GL_STREAM_COPY_ARB */
5328+ { 30312, 0x000088E0 }, /* GL_STREAM_DRAW */
5329+ { 30327, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */
5330+ { 30346, 0x000088E1 }, /* GL_STREAM_READ */
5331+ { 30361, 0x000088E1 }, /* GL_STREAM_READ_ARB */
5332+ { 30380, 0x00000D50 }, /* GL_SUBPIXEL_BITS */
5333+ { 30397, 0x000084E7 }, /* GL_SUBTRACT */
5334+ { 30409, 0x000084E7 }, /* GL_SUBTRACT_ARB */
5335+ { 30425, 0x00002001 }, /* GL_T */
5336+ { 30430, 0x00002A2A }, /* GL_T2F_C3F_V3F */
5337+ { 30445, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */
5338+ { 30464, 0x00002A29 }, /* GL_T2F_C4UB_V3F */
5339+ { 30480, 0x00002A2B }, /* GL_T2F_N3F_V3F */
5340+ { 30495, 0x00002A27 }, /* GL_T2F_V3F */
5341+ { 30506, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */
5342+ { 30525, 0x00002A28 }, /* GL_T4F_V4F */
5343+ { 30536, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */
5344+ { 30559, 0x00001702 }, /* GL_TEXTURE */
5345+ { 30570, 0x000084C0 }, /* GL_TEXTURE0 */
5346+ { 30582, 0x000084C0 }, /* GL_TEXTURE0_ARB */
5347+ { 30598, 0x000084C1 }, /* GL_TEXTURE1 */
5348+ { 30610, 0x000084CA }, /* GL_TEXTURE10 */
5349+ { 30623, 0x000084CA }, /* GL_TEXTURE10_ARB */
5350+ { 30640, 0x000084CB }, /* GL_TEXTURE11 */
5351+ { 30653, 0x000084CB }, /* GL_TEXTURE11_ARB */
5352+ { 30670, 0x000084CC }, /* GL_TEXTURE12 */
5353+ { 30683, 0x000084CC }, /* GL_TEXTURE12_ARB */
5354+ { 30700, 0x000084CD }, /* GL_TEXTURE13 */
5355+ { 30713, 0x000084CD }, /* GL_TEXTURE13_ARB */
5356+ { 30730, 0x000084CE }, /* GL_TEXTURE14 */
5357+ { 30743, 0x000084CE }, /* GL_TEXTURE14_ARB */
5358+ { 30760, 0x000084CF }, /* GL_TEXTURE15 */
5359+ { 30773, 0x000084CF }, /* GL_TEXTURE15_ARB */
5360+ { 30790, 0x000084D0 }, /* GL_TEXTURE16 */
5361+ { 30803, 0x000084D0 }, /* GL_TEXTURE16_ARB */
5362+ { 30820, 0x000084D1 }, /* GL_TEXTURE17 */
5363+ { 30833, 0x000084D1 }, /* GL_TEXTURE17_ARB */
5364+ { 30850, 0x000084D2 }, /* GL_TEXTURE18 */
5365+ { 30863, 0x000084D2 }, /* GL_TEXTURE18_ARB */
5366+ { 30880, 0x000084D3 }, /* GL_TEXTURE19 */
5367+ { 30893, 0x000084D3 }, /* GL_TEXTURE19_ARB */
5368+ { 30910, 0x000084C1 }, /* GL_TEXTURE1_ARB */
5369+ { 30926, 0x000084C2 }, /* GL_TEXTURE2 */
5370+ { 30938, 0x000084D4 }, /* GL_TEXTURE20 */
5371+ { 30951, 0x000084D4 }, /* GL_TEXTURE20_ARB */
5372+ { 30968, 0x000084D5 }, /* GL_TEXTURE21 */
5373+ { 30981, 0x000084D5 }, /* GL_TEXTURE21_ARB */
5374+ { 30998, 0x000084D6 }, /* GL_TEXTURE22 */
5375+ { 31011, 0x000084D6 }, /* GL_TEXTURE22_ARB */
5376+ { 31028, 0x000084D7 }, /* GL_TEXTURE23 */
5377+ { 31041, 0x000084D7 }, /* GL_TEXTURE23_ARB */
5378+ { 31058, 0x000084D8 }, /* GL_TEXTURE24 */
5379+ { 31071, 0x000084D8 }, /* GL_TEXTURE24_ARB */
5380+ { 31088, 0x000084D9 }, /* GL_TEXTURE25 */
5381+ { 31101, 0x000084D9 }, /* GL_TEXTURE25_ARB */
5382+ { 31118, 0x000084DA }, /* GL_TEXTURE26 */
5383+ { 31131, 0x000084DA }, /* GL_TEXTURE26_ARB */
5384+ { 31148, 0x000084DB }, /* GL_TEXTURE27 */
5385+ { 31161, 0x000084DB }, /* GL_TEXTURE27_ARB */
5386+ { 31178, 0x000084DC }, /* GL_TEXTURE28 */
5387+ { 31191, 0x000084DC }, /* GL_TEXTURE28_ARB */
5388+ { 31208, 0x000084DD }, /* GL_TEXTURE29 */
5389+ { 31221, 0x000084DD }, /* GL_TEXTURE29_ARB */
5390+ { 31238, 0x000084C2 }, /* GL_TEXTURE2_ARB */
5391+ { 31254, 0x000084C3 }, /* GL_TEXTURE3 */
5392+ { 31266, 0x000084DE }, /* GL_TEXTURE30 */
5393+ { 31279, 0x000084DE }, /* GL_TEXTURE30_ARB */
5394+ { 31296, 0x000084DF }, /* GL_TEXTURE31 */
5395+ { 31309, 0x000084DF }, /* GL_TEXTURE31_ARB */
5396+ { 31326, 0x000084C3 }, /* GL_TEXTURE3_ARB */
5397+ { 31342, 0x000084C4 }, /* GL_TEXTURE4 */
5398+ { 31354, 0x000084C4 }, /* GL_TEXTURE4_ARB */
5399+ { 31370, 0x000084C5 }, /* GL_TEXTURE5 */
5400+ { 31382, 0x000084C5 }, /* GL_TEXTURE5_ARB */
5401+ { 31398, 0x000084C6 }, /* GL_TEXTURE6 */
5402+ { 31410, 0x000084C6 }, /* GL_TEXTURE6_ARB */
5403+ { 31426, 0x000084C7 }, /* GL_TEXTURE7 */
5404+ { 31438, 0x000084C7 }, /* GL_TEXTURE7_ARB */
5405+ { 31454, 0x000084C8 }, /* GL_TEXTURE8 */
5406+ { 31466, 0x000084C8 }, /* GL_TEXTURE8_ARB */
5407+ { 31482, 0x000084C9 }, /* GL_TEXTURE9 */
5408+ { 31494, 0x000084C9 }, /* GL_TEXTURE9_ARB */
5409+ { 31510, 0x00000DE0 }, /* GL_TEXTURE_1D */
5410+ { 31524, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */
5411+ { 31548, 0x00000DE1 }, /* GL_TEXTURE_2D */
5412+ { 31562, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */
5413+ { 31586, 0x0000806F }, /* GL_TEXTURE_3D */
5414+ { 31600, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */
5415+ { 31622, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */
5416+ { 31648, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */
5417+ { 31670, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */
5418+ { 31692, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
5419+ { 31724, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */
5420+ { 31746, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
5421+ { 31778, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */
5422+ { 31800, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */
5423+ { 31828, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */
5424+ { 31860, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
5425+ { 31893, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */
5426+ { 31925, 0x00040000 }, /* GL_TEXTURE_BIT */
5427+ { 31940, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */
5428+ { 31961, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */
5429+ { 31986, 0x00001005 }, /* GL_TEXTURE_BORDER */
5430+ { 32004, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */
5431+ { 32028, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
5432+ { 32059, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
5433+ { 32089, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
5434+ { 32119, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
5435+ { 32154, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
5436+ { 32185, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
5437+ { 32223, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */
5438+ { 32250, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
5439+ { 32282, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
5440+ { 32316, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */
5441+ { 32340, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */
5442+ { 32368, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */
5443+ { 32392, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */
5444+ { 32420, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
5445+ { 32453, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */
5446+ { 32477, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */
5447+ { 32499, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */
5448+ { 32521, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */
5449+ { 32547, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */
5450+ { 32581, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
5451+ { 32614, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */
5452+ { 32651, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */
5453+ { 32679, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */
5454+ { 32711, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */
5455+ { 32734, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
5456+ { 32772, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */
5457+ { 32814, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */
5458+ { 32845, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */
5459+ { 32873, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
5460+ { 32903, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */
5461+ { 32931, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */
5462+ { 32951, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */
5463+ { 32975, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
5464+ { 33006, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */
5465+ { 33041, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
5466+ { 33072, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */
5467+ { 33107, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
5468+ { 33138, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */
5469+ { 33173, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
5470+ { 33204, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */
5471+ { 33239, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
5472+ { 33270, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */
5473+ { 33305, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
5474+ { 33336, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */
5475+ { 33371, 0x00008071 }, /* GL_TEXTURE_DEPTH */
5476+ { 33388, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */
5477+ { 33410, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */
5478+ { 33436, 0x00002300 }, /* GL_TEXTURE_ENV */
5479+ { 33451, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */
5480+ { 33472, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */
5481+ { 33492, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */
5482+ { 33518, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */
5483+ { 33538, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */
5484+ { 33555, 0x00000C62 }, /* GL_TEXTURE_GEN_R */
5485+ { 33572, 0x00000C60 }, /* GL_TEXTURE_GEN_S */
5486+ { 33589, 0x00000C61 }, /* GL_TEXTURE_GEN_T */
5487+ { 33606, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */
5488+ { 33631, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */
5489+ { 33653, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */
5490+ { 33679, 0x00001001 }, /* GL_TEXTURE_HEIGHT */
5491+ { 33697, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */
5492+ { 33723, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */
5493+ { 33749, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */
5494+ { 33779, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */
5495+ { 33806, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */
5496+ { 33831, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */
5497+ { 33851, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */
5498+ { 33875, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
5499+ { 33902, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
5500+ { 33929, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
5501+ { 33956, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */
5502+ { 33982, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */
5503+ { 34012, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */
5504+ { 34034, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */
5505+ { 34052, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
5506+ { 34082, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
5507+ { 34110, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
5508+ { 34138, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
5509+ { 34166, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */
5510+ { 34187, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */
5511+ { 34206, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */
5512+ { 34228, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */
5513+ { 34247, 0x00008066 }, /* GL_TEXTURE_PRIORITY */
5514+ { 34267, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */
5515+ { 34292, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */
5516+ { 34316, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */
5517+ { 34336, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */
5518+ { 34360, 0x00008067 }, /* GL_TEXTURE_RESIDENT */
5519+ { 34380, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */
5520+ { 34403, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */
5521+ { 34428, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
5522+ { 34462, 0x00001000 }, /* GL_TEXTURE_WIDTH */
5523+ { 34479, 0x00008072 }, /* GL_TEXTURE_WRAP_R */
5524+ { 34497, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
5525+ { 34515, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
5526+ { 34533, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
5527+ { 34553, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
5528+ { 34572, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
5529+ { 34601, 0x00001000 }, /* GL_TRANSFORM_BIT */
5530+ { 34618, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
5531+ { 34644, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
5532+ { 34674, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
5533+ { 34706, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
5534+ { 34736, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
5535+ { 34770, 0x0000862C }, /* GL_TRANSPOSE_NV */
5536+ { 34786, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
5537+ { 34817, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
5538+ { 34852, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
5539+ { 34880, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
5540+ { 34912, 0x00000004 }, /* GL_TRIANGLES */
5541+ { 34925, 0x00000006 }, /* GL_TRIANGLE_FAN */
5542+ { 34941, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
5543+ { 34962, 0x00000005 }, /* GL_TRIANGLE_STRIP */
5544+ { 34980, 0x00000001 }, /* GL_TRUE */
5545+ { 34988, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
5546+ { 35008, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
5547+ { 35031, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
5548+ { 35051, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
5549+ { 35072, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
5550+ { 35094, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
5551+ { 35116, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
5552+ { 35136, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
5553+ { 35157, 0x00001401 }, /* GL_UNSIGNED_BYTE */
5554+ { 35174, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
5555+ { 35201, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
5556+ { 35224, 0x00001405 }, /* GL_UNSIGNED_INT */
5557+ { 35240, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
5558+ { 35267, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
5559+ { 35291, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
5560+ { 35322, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
5561+ { 35346, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
5562+ { 35374, 0x00001403 }, /* GL_UNSIGNED_SHORT */
5563+ { 35392, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
5564+ { 35422, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
5565+ { 35448, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
5566+ { 35478, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
5567+ { 35504, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
5568+ { 35528, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
5569+ { 35556, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
5570+ { 35584, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
5571+ { 35611, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
5572+ { 35643, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
5573+ { 35674, 0x00008CA2 }, /* GL_UPPER_LEFT */
5574+ { 35688, 0x00002A20 }, /* GL_V2F */
5575+ { 35695, 0x00002A21 }, /* GL_V3F */
5576+ { 35702, 0x00008B83 }, /* GL_VALIDATE_STATUS */
5577+ { 35721, 0x00001F00 }, /* GL_VENDOR */
5578+ { 35731, 0x00001F02 }, /* GL_VERSION */
5579+ { 35742, 0x00008074 }, /* GL_VERTEX_ARRAY */
5580+ { 35758, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
5581+ { 35788, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
5582+ { 35819, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
5583+ { 35854, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
5584+ { 35878, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
5585+ { 35899, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
5586+ { 35922, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
5587+ { 35943, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
5588+ { 35970, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
5589+ { 35998, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
5590+ { 36026, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
5591+ { 36054, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
5592+ { 36082, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
5593+ { 36110, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
5594+ { 36138, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
5595+ { 36165, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
5596+ { 36192, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
5597+ { 36219, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
5598+ { 36246, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
5599+ { 36273, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
5600+ { 36300, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
5601+ { 36327, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
5602+ { 36354, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
5603+ { 36381, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
5604+ { 36419, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
5605+ { 36461, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
5606+ { 36492, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
5607+ { 36527, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
5608+ { 36561, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
5609+ { 36599, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
5610+ { 36630, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
5611+ { 36665, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
5612+ { 36693, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
5613+ { 36725, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
5614+ { 36755, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
5615+ { 36789, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
5616+ { 36817, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
5617+ { 36849, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
5618+ { 36869, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
5619+ { 36891, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
5620+ { 36920, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
5621+ { 36941, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
5622+ { 36970, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
5623+ { 37003, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
5624+ { 37035, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
5625+ { 37062, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
5626+ { 37093, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
5627+ { 37123, 0x00008B31 }, /* GL_VERTEX_SHADER */
5628+ { 37140, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
5629+ { 37161, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
5630+ { 37188, 0x00000BA2 }, /* GL_VIEWPORT */
5631+ { 37200, 0x00000800 }, /* GL_VIEWPORT_BIT */
5632+ { 37216, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
5633+ { 37236, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
5634+ { 37267, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
5635+ { 37302, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
5636+ { 37330, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
5637+ { 37355, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
5638+ { 37382, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
5639+ { 37407, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
5640+ { 37431, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
5641+ { 37450, 0x000088B9 }, /* GL_WRITE_ONLY */
5642+ { 37464, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
5643+ { 37482, 0x00001506 }, /* GL_XOR */
5644+ { 37489, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
5645+ { 37508, 0x00008757 }, /* GL_YCBCR_MESA */
5646+ { 37522, 0x00000000 }, /* GL_ZERO */
5647+ { 37530, 0x00000D16 }, /* GL_ZOOM_X */
5648+ { 37540, 0x00000D17 }, /* GL_ZOOM_Y */
5649+};
5650+
5651+static const unsigned reduced_enums[1284] =
5652+{
5653+ 436, /* GL_FALSE */
5654+ 645, /* GL_LINES */
5655+ 647, /* GL_LINE_LOOP */
5656+ 654, /* GL_LINE_STRIP */
5657+ 1637, /* GL_TRIANGLES */
5658+ 1640, /* GL_TRIANGLE_STRIP */
5659+ 1638, /* GL_TRIANGLE_FAN */
5660+ 1211, /* GL_QUADS */
5661+ 1213, /* GL_QUAD_STRIP */
5662+ 1099, /* GL_POLYGON */
5663+ 1111, /* GL_POLYGON_STIPPLE_BIT */
5664+ 1064, /* GL_PIXEL_MODE_BIT */
5665+ 632, /* GL_LIGHTING_BIT */
5666+ 458, /* GL_FOG_BIT */
5667+ 8, /* GL_ACCUM */
5668+ 664, /* GL_LOAD */
5669+ 1253, /* GL_RETURN */
5670+ 937, /* GL_MULT */
5671+ 23, /* GL_ADD */
5672+ 953, /* GL_NEVER */
5673+ 622, /* GL_LESS */
5674+ 426, /* GL_EQUAL */
5675+ 621, /* GL_LEQUAL */
5676+ 547, /* GL_GREATER */
5677+ 968, /* GL_NOTEQUAL */
5678+ 522, /* GL_GEQUAL */
5679+ 46, /* GL_ALWAYS */
5680+ 1386, /* GL_SRC_COLOR */
5681+ 997, /* GL_ONE_MINUS_SRC_COLOR */
5682+ 1384, /* GL_SRC_ALPHA */
5683+ 996, /* GL_ONE_MINUS_SRC_ALPHA */
5684+ 406, /* GL_DST_ALPHA */
5685+ 994, /* GL_ONE_MINUS_DST_ALPHA */
5686+ 407, /* GL_DST_COLOR */
5687+ 995, /* GL_ONE_MINUS_DST_COLOR */
5688+ 1385, /* GL_SRC_ALPHA_SATURATE */
5689+ 510, /* GL_FRONT_LEFT */
5690+ 511, /* GL_FRONT_RIGHT */
5691+ 69, /* GL_BACK_LEFT */
5692+ 70, /* GL_BACK_RIGHT */
5693+ 507, /* GL_FRONT */
5694+ 68, /* GL_BACK */
5695+ 620, /* GL_LEFT */
5696+ 1293, /* GL_RIGHT */
5697+ 508, /* GL_FRONT_AND_BACK */
5698+ 63, /* GL_AUX0 */
5699+ 64, /* GL_AUX1 */
5700+ 65, /* GL_AUX2 */
5701+ 66, /* GL_AUX3 */
5702+ 612, /* GL_INVALID_ENUM */
5703+ 615, /* GL_INVALID_VALUE */
5704+ 614, /* GL_INVALID_OPERATION */
5705+ 1387, /* GL_STACK_OVERFLOW */
5706+ 1388, /* GL_STACK_UNDERFLOW */
5707+ 1022, /* GL_OUT_OF_MEMORY */
5708+ 613, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
5709+ 0, /* GL_2D */
5710+ 2, /* GL_3D */
5711+ 3, /* GL_3D_COLOR */
5712+ 4, /* GL_3D_COLOR_TEXTURE */
5713+ 6, /* GL_4D_COLOR_TEXTURE */
5714+ 1042, /* GL_PASS_THROUGH_TOKEN */
5715+ 1098, /* GL_POINT_TOKEN */
5716+ 655, /* GL_LINE_TOKEN */
5717+ 1112, /* GL_POLYGON_TOKEN */
5718+ 74, /* GL_BITMAP_TOKEN */
5719+ 405, /* GL_DRAW_PIXEL_TOKEN */
5720+ 271, /* GL_COPY_PIXEL_TOKEN */
5721+ 648, /* GL_LINE_RESET_TOKEN */
5722+ 429, /* GL_EXP */
5723+ 430, /* GL_EXP2 */
5724+ 304, /* GL_CW */
5725+ 116, /* GL_CCW */
5726+ 137, /* GL_COEFF */
5727+ 1019, /* GL_ORDER */
5728+ 344, /* GL_DOMAIN */
5729+ 279, /* GL_CURRENT_COLOR */
5730+ 282, /* GL_CURRENT_INDEX */
5731+ 288, /* GL_CURRENT_NORMAL */
5732+ 300, /* GL_CURRENT_TEXTURE_COORDS */
5733+ 293, /* GL_CURRENT_RASTER_COLOR */
5734+ 295, /* GL_CURRENT_RASTER_INDEX */
5735+ 298, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
5736+ 296, /* GL_CURRENT_RASTER_POSITION */
5737+ 297, /* GL_CURRENT_RASTER_POSITION_VALID */
5738+ 294, /* GL_CURRENT_RASTER_DISTANCE */
5739+ 1091, /* GL_POINT_SMOOTH */
5740+ 1080, /* GL_POINT_SIZE */
5741+ 1090, /* GL_POINT_SIZE_RANGE */
5742+ 1081, /* GL_POINT_SIZE_GRANULARITY */
5743+ 649, /* GL_LINE_SMOOTH */
5744+ 656, /* GL_LINE_WIDTH */
5745+ 658, /* GL_LINE_WIDTH_RANGE */
5746+ 657, /* GL_LINE_WIDTH_GRANULARITY */
5747+ 651, /* GL_LINE_STIPPLE */
5748+ 652, /* GL_LINE_STIPPLE_PATTERN */
5749+ 653, /* GL_LINE_STIPPLE_REPEAT */
5750+ 663, /* GL_LIST_MODE */
5751+ 822, /* GL_MAX_LIST_NESTING */
5752+ 660, /* GL_LIST_BASE */
5753+ 662, /* GL_LIST_INDEX */
5754+ 1101, /* GL_POLYGON_MODE */
5755+ 1108, /* GL_POLYGON_SMOOTH */
5756+ 1110, /* GL_POLYGON_STIPPLE */
5757+ 414, /* GL_EDGE_FLAG */
5758+ 272, /* GL_CULL_FACE */
5759+ 273, /* GL_CULL_FACE_MODE */
5760+ 509, /* GL_FRONT_FACE */
5761+ 631, /* GL_LIGHTING */
5762+ 636, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
5763+ 637, /* GL_LIGHT_MODEL_TWO_SIDE */
5764+ 633, /* GL_LIGHT_MODEL_AMBIENT */
5765+ 1339, /* GL_SHADE_MODEL */
5766+ 168, /* GL_COLOR_MATERIAL_FACE */
5767+ 169, /* GL_COLOR_MATERIAL_PARAMETER */
5768+ 167, /* GL_COLOR_MATERIAL */
5769+ 457, /* GL_FOG */
5770+ 479, /* GL_FOG_INDEX */
5771+ 475, /* GL_FOG_DENSITY */
5772+ 483, /* GL_FOG_START */
5773+ 477, /* GL_FOG_END */
5774+ 480, /* GL_FOG_MODE */
5775+ 459, /* GL_FOG_COLOR */
5776+ 333, /* GL_DEPTH_RANGE */
5777+ 338, /* GL_DEPTH_TEST */
5778+ 341, /* GL_DEPTH_WRITEMASK */
5779+ 321, /* GL_DEPTH_CLEAR_VALUE */
5780+ 332, /* GL_DEPTH_FUNC */
5781+ 12, /* GL_ACCUM_CLEAR_VALUE */
5782+ 1418, /* GL_STENCIL_TEST */
5783+ 1406, /* GL_STENCIL_CLEAR_VALUE */
5784+ 1408, /* GL_STENCIL_FUNC */
5785+ 1420, /* GL_STENCIL_VALUE_MASK */
5786+ 1407, /* GL_STENCIL_FAIL */
5787+ 1415, /* GL_STENCIL_PASS_DEPTH_FAIL */
5788+ 1416, /* GL_STENCIL_PASS_DEPTH_PASS */
5789+ 1417, /* GL_STENCIL_REF */
5790+ 1421, /* GL_STENCIL_WRITEMASK */
5791+ 791, /* GL_MATRIX_MODE */
5792+ 958, /* GL_NORMALIZE */
5793+ 1727, /* GL_VIEWPORT */
5794+ 932, /* GL_MODELVIEW_STACK_DEPTH */
5795+ 1191, /* GL_PROJECTION_STACK_DEPTH */
5796+ 1616, /* GL_TEXTURE_STACK_DEPTH */
5797+ 930, /* GL_MODELVIEW_MATRIX */
5798+ 1190, /* GL_PROJECTION_MATRIX */
5799+ 1601, /* GL_TEXTURE_MATRIX */
5800+ 61, /* GL_ATTRIB_STACK_DEPTH */
5801+ 127, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
5802+ 43, /* GL_ALPHA_TEST */
5803+ 44, /* GL_ALPHA_TEST_FUNC */
5804+ 45, /* GL_ALPHA_TEST_REF */
5805+ 343, /* GL_DITHER */
5806+ 78, /* GL_BLEND_DST */
5807+ 86, /* GL_BLEND_SRC */
5808+ 75, /* GL_BLEND */
5809+ 666, /* GL_LOGIC_OP_MODE */
5810+ 586, /* GL_INDEX_LOGIC_OP */
5811+ 166, /* GL_COLOR_LOGIC_OP */
5812+ 67, /* GL_AUX_BUFFERS */
5813+ 354, /* GL_DRAW_BUFFER */
5814+ 1223, /* GL_READ_BUFFER */
5815+ 1320, /* GL_SCISSOR_BOX */
5816+ 1321, /* GL_SCISSOR_TEST */
5817+ 585, /* GL_INDEX_CLEAR_VALUE */
5818+ 590, /* GL_INDEX_WRITEMASK */
5819+ 163, /* GL_COLOR_CLEAR_VALUE */
5820+ 205, /* GL_COLOR_WRITEMASK */
5821+ 587, /* GL_INDEX_MODE */
5822+ 1287, /* GL_RGBA_MODE */
5823+ 353, /* GL_DOUBLEBUFFER */
5824+ 1422, /* GL_STEREO */
5825+ 1246, /* GL_RENDER_MODE */
5826+ 1043, /* GL_PERSPECTIVE_CORRECTION_HINT */
5827+ 1092, /* GL_POINT_SMOOTH_HINT */
5828+ 650, /* GL_LINE_SMOOTH_HINT */
5829+ 1109, /* GL_POLYGON_SMOOTH_HINT */
5830+ 478, /* GL_FOG_HINT */
5831+ 1582, /* GL_TEXTURE_GEN_S */
5832+ 1583, /* GL_TEXTURE_GEN_T */
5833+ 1581, /* GL_TEXTURE_GEN_R */
5834+ 1580, /* GL_TEXTURE_GEN_Q */
5835+ 1056, /* GL_PIXEL_MAP_I_TO_I */
5836+ 1062, /* GL_PIXEL_MAP_S_TO_S */
5837+ 1058, /* GL_PIXEL_MAP_I_TO_R */
5838+ 1054, /* GL_PIXEL_MAP_I_TO_G */
5839+ 1052, /* GL_PIXEL_MAP_I_TO_B */
5840+ 1050, /* GL_PIXEL_MAP_I_TO_A */
5841+ 1060, /* GL_PIXEL_MAP_R_TO_R */
5842+ 1048, /* GL_PIXEL_MAP_G_TO_G */
5843+ 1046, /* GL_PIXEL_MAP_B_TO_B */
5844+ 1044, /* GL_PIXEL_MAP_A_TO_A */
5845+ 1057, /* GL_PIXEL_MAP_I_TO_I_SIZE */
5846+ 1063, /* GL_PIXEL_MAP_S_TO_S_SIZE */
5847+ 1059, /* GL_PIXEL_MAP_I_TO_R_SIZE */
5848+ 1055, /* GL_PIXEL_MAP_I_TO_G_SIZE */
5849+ 1053, /* GL_PIXEL_MAP_I_TO_B_SIZE */
5850+ 1051, /* GL_PIXEL_MAP_I_TO_A_SIZE */
5851+ 1061, /* GL_PIXEL_MAP_R_TO_R_SIZE */
5852+ 1049, /* GL_PIXEL_MAP_G_TO_G_SIZE */
5853+ 1047, /* GL_PIXEL_MAP_B_TO_B_SIZE */
5854+ 1045, /* GL_PIXEL_MAP_A_TO_A_SIZE */
5855+ 1649, /* GL_UNPACK_SWAP_BYTES */
5856+ 1644, /* GL_UNPACK_LSB_FIRST */
5857+ 1645, /* GL_UNPACK_ROW_LENGTH */
5858+ 1648, /* GL_UNPACK_SKIP_ROWS */
5859+ 1647, /* GL_UNPACK_SKIP_PIXELS */
5860+ 1642, /* GL_UNPACK_ALIGNMENT */
5861+ 1031, /* GL_PACK_SWAP_BYTES */
5862+ 1026, /* GL_PACK_LSB_FIRST */
5863+ 1027, /* GL_PACK_ROW_LENGTH */
5864+ 1030, /* GL_PACK_SKIP_ROWS */
5865+ 1029, /* GL_PACK_SKIP_PIXELS */
5866+ 1023, /* GL_PACK_ALIGNMENT */
5867+ 744, /* GL_MAP_COLOR */
5868+ 745, /* GL_MAP_STENCIL */
5869+ 589, /* GL_INDEX_SHIFT */
5870+ 588, /* GL_INDEX_OFFSET */
5871+ 1235, /* GL_RED_SCALE */
5872+ 1233, /* GL_RED_BIAS */
5873+ 1744, /* GL_ZOOM_X */
5874+ 1745, /* GL_ZOOM_Y */
5875+ 551, /* GL_GREEN_SCALE */
5876+ 549, /* GL_GREEN_BIAS */
5877+ 92, /* GL_BLUE_SCALE */
5878+ 90, /* GL_BLUE_BIAS */
5879+ 42, /* GL_ALPHA_SCALE */
5880+ 40, /* GL_ALPHA_BIAS */
5881+ 334, /* GL_DEPTH_SCALE */
5882+ 315, /* GL_DEPTH_BIAS */
5883+ 817, /* GL_MAX_EVAL_ORDER */
5884+ 821, /* GL_MAX_LIGHTS */
5885+ 800, /* GL_MAX_CLIP_PLANES */
5886+ 865, /* GL_MAX_TEXTURE_SIZE */
5887+ 827, /* GL_MAX_PIXEL_MAP_TABLE */
5888+ 796, /* GL_MAX_ATTRIB_STACK_DEPTH */
5889+ 824, /* GL_MAX_MODELVIEW_STACK_DEPTH */
5890+ 825, /* GL_MAX_NAME_STACK_DEPTH */
5891+ 853, /* GL_MAX_PROJECTION_STACK_DEPTH */
5892+ 866, /* GL_MAX_TEXTURE_STACK_DEPTH */
5893+ 880, /* GL_MAX_VIEWPORT_DIMS */
5894+ 797, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
5895+ 1429, /* GL_SUBPIXEL_BITS */
5896+ 584, /* GL_INDEX_BITS */
5897+ 1234, /* GL_RED_BITS */
5898+ 550, /* GL_GREEN_BITS */
5899+ 91, /* GL_BLUE_BITS */
5900+ 41, /* GL_ALPHA_BITS */
5901+ 316, /* GL_DEPTH_BITS */
5902+ 1404, /* GL_STENCIL_BITS */
5903+ 14, /* GL_ACCUM_RED_BITS */
5904+ 13, /* GL_ACCUM_GREEN_BITS */
5905+ 10, /* GL_ACCUM_BLUE_BITS */
5906+ 9, /* GL_ACCUM_ALPHA_BITS */
5907+ 946, /* GL_NAME_STACK_DEPTH */
5908+ 62, /* GL_AUTO_NORMAL */
5909+ 690, /* GL_MAP1_COLOR_4 */
5910+ 693, /* GL_MAP1_INDEX */
5911+ 694, /* GL_MAP1_NORMAL */
5912+ 695, /* GL_MAP1_TEXTURE_COORD_1 */
5913+ 696, /* GL_MAP1_TEXTURE_COORD_2 */
5914+ 697, /* GL_MAP1_TEXTURE_COORD_3 */
5915+ 698, /* GL_MAP1_TEXTURE_COORD_4 */
5916+ 699, /* GL_MAP1_VERTEX_3 */
5917+ 700, /* GL_MAP1_VERTEX_4 */
5918+ 717, /* GL_MAP2_COLOR_4 */
5919+ 720, /* GL_MAP2_INDEX */
5920+ 721, /* GL_MAP2_NORMAL */
5921+ 722, /* GL_MAP2_TEXTURE_COORD_1 */
5922+ 723, /* GL_MAP2_TEXTURE_COORD_2 */
5923+ 724, /* GL_MAP2_TEXTURE_COORD_3 */
5924+ 725, /* GL_MAP2_TEXTURE_COORD_4 */
5925+ 726, /* GL_MAP2_VERTEX_3 */
5926+ 727, /* GL_MAP2_VERTEX_4 */
5927+ 691, /* GL_MAP1_GRID_DOMAIN */
5928+ 692, /* GL_MAP1_GRID_SEGMENTS */
5929+ 718, /* GL_MAP2_GRID_DOMAIN */
5930+ 719, /* GL_MAP2_GRID_SEGMENTS */
5931+ 1506, /* GL_TEXTURE_1D */
5932+ 1508, /* GL_TEXTURE_2D */
5933+ 439, /* GL_FEEDBACK_BUFFER_POINTER */
5934+ 440, /* GL_FEEDBACK_BUFFER_SIZE */
5935+ 441, /* GL_FEEDBACK_BUFFER_TYPE */
5936+ 1330, /* GL_SELECTION_BUFFER_POINTER */
5937+ 1331, /* GL_SELECTION_BUFFER_SIZE */
5938+ 1619, /* GL_TEXTURE_WIDTH */
5939+ 1587, /* GL_TEXTURE_HEIGHT */
5940+ 1543, /* GL_TEXTURE_COMPONENTS */
5941+ 1527, /* GL_TEXTURE_BORDER_COLOR */
5942+ 1526, /* GL_TEXTURE_BORDER */
5943+ 345, /* GL_DONT_CARE */
5944+ 437, /* GL_FASTEST */
5945+ 954, /* GL_NICEST */
5946+ 47, /* GL_AMBIENT */
5947+ 342, /* GL_DIFFUSE */
5948+ 1373, /* GL_SPECULAR */
5949+ 1113, /* GL_POSITION */
5950+ 1376, /* GL_SPOT_DIRECTION */
5951+ 1377, /* GL_SPOT_EXPONENT */
5952+ 1375, /* GL_SPOT_CUTOFF */
5953+ 245, /* GL_CONSTANT_ATTENUATION */
5954+ 640, /* GL_LINEAR_ATTENUATION */
5955+ 1210, /* GL_QUADRATIC_ATTENUATION */
5956+ 219, /* GL_COMPILE */
5957+ 220, /* GL_COMPILE_AND_EXECUTE */
5958+ 111, /* GL_BYTE */
5959+ 1650, /* GL_UNSIGNED_BYTE */
5960+ 1344, /* GL_SHORT */
5961+ 1659, /* GL_UNSIGNED_SHORT */
5962+ 592, /* GL_INT */
5963+ 1653, /* GL_UNSIGNED_INT */
5964+ 444, /* GL_FLOAT */
5965+ 1, /* GL_2_BYTES */
5966+ 5, /* GL_3_BYTES */
5967+ 7, /* GL_4_BYTES */
5968+ 352, /* GL_DOUBLE */
5969+ 123, /* GL_CLEAR */
5970+ 49, /* GL_AND */
5971+ 51, /* GL_AND_REVERSE */
5972+ 269, /* GL_COPY */
5973+ 50, /* GL_AND_INVERTED */
5974+ 956, /* GL_NOOP */
5975+ 1740, /* GL_XOR */
5976+ 1018, /* GL_OR */
5977+ 957, /* GL_NOR */
5978+ 427, /* GL_EQUIV */
5979+ 618, /* GL_INVERT */
5980+ 1021, /* GL_OR_REVERSE */
5981+ 270, /* GL_COPY_INVERTED */
5982+ 1020, /* GL_OR_INVERTED */
5983+ 947, /* GL_NAND */
5984+ 1335, /* GL_SET */
5985+ 424, /* GL_EMISSION */
5986+ 1343, /* GL_SHININESS */
5987+ 48, /* GL_AMBIENT_AND_DIFFUSE */
5988+ 165, /* GL_COLOR_INDEXES */
5989+ 897, /* GL_MODELVIEW */
5990+ 1189, /* GL_PROJECTION */
5991+ 1441, /* GL_TEXTURE */
5992+ 138, /* GL_COLOR */
5993+ 313, /* GL_DEPTH */
5994+ 1395, /* GL_STENCIL */
5995+ 164, /* GL_COLOR_INDEX */
5996+ 1409, /* GL_STENCIL_INDEX */
5997+ 322, /* GL_DEPTH_COMPONENT */
5998+ 1230, /* GL_RED */
5999+ 548, /* GL_GREEN */
6000+ 89, /* GL_BLUE */
6001+ 31, /* GL_ALPHA */
6002+ 1254, /* GL_RGB */
6003+ 1273, /* GL_RGBA */
6004+ 668, /* GL_LUMINANCE */
6005+ 689, /* GL_LUMINANCE_ALPHA */
6006+ 73, /* GL_BITMAP */
6007+ 1069, /* GL_POINT */
6008+ 638, /* GL_LINE */
6009+ 442, /* GL_FILL */
6010+ 1239, /* GL_RENDER */
6011+ 438, /* GL_FEEDBACK */
6012+ 1329, /* GL_SELECT */
6013+ 443, /* GL_FLAT */
6014+ 1348, /* GL_SMOOTH */
6015+ 619, /* GL_KEEP */
6016+ 1248, /* GL_REPLACE */
6017+ 575, /* GL_INCR */
6018+ 309, /* GL_DECR */
6019+ 1674, /* GL_VENDOR */
6020+ 1245, /* GL_RENDERER */
6021+ 1675, /* GL_VERSION */
6022+ 431, /* GL_EXTENSIONS */
6023+ 1294, /* GL_S */
6024+ 1432, /* GL_T */
6025+ 1220, /* GL_R */
6026+ 1209, /* GL_Q */
6027+ 933, /* GL_MODULATE */
6028+ 308, /* GL_DECAL */
6029+ 1577, /* GL_TEXTURE_ENV_MODE */
6030+ 1576, /* GL_TEXTURE_ENV_COLOR */
6031+ 1575, /* GL_TEXTURE_ENV */
6032+ 432, /* GL_EYE_LINEAR */
6033+ 980, /* GL_OBJECT_LINEAR */
6034+ 1374, /* GL_SPHERE_MAP */
6035+ 1579, /* GL_TEXTURE_GEN_MODE */
6036+ 982, /* GL_OBJECT_PLANE */
6037+ 433, /* GL_EYE_PLANE */
6038+ 948, /* GL_NEAREST */
6039+ 639, /* GL_LINEAR */
6040+ 952, /* GL_NEAREST_MIPMAP_NEAREST */
6041+ 644, /* GL_LINEAR_MIPMAP_NEAREST */
6042+ 951, /* GL_NEAREST_MIPMAP_LINEAR */
6043+ 643, /* GL_LINEAR_MIPMAP_LINEAR */
6044+ 1600, /* GL_TEXTURE_MAG_FILTER */
6045+ 1608, /* GL_TEXTURE_MIN_FILTER */
6046+ 1621, /* GL_TEXTURE_WRAP_S */
6047+ 1622, /* GL_TEXTURE_WRAP_T */
6048+ 117, /* GL_CLAMP */
6049+ 1247, /* GL_REPEAT */
6050+ 1107, /* GL_POLYGON_OFFSET_UNITS */
6051+ 1106, /* GL_POLYGON_OFFSET_POINT */
6052+ 1105, /* GL_POLYGON_OFFSET_LINE */
6053+ 1221, /* GL_R3_G3_B2 */
6054+ 1671, /* GL_V2F */
6055+ 1672, /* GL_V3F */
6056+ 114, /* GL_C4UB_V2F */
6057+ 115, /* GL_C4UB_V3F */
6058+ 112, /* GL_C3F_V3F */
6059+ 945, /* GL_N3F_V3F */
6060+ 113, /* GL_C4F_N3F_V3F */
6061+ 1437, /* GL_T2F_V3F */
6062+ 1439, /* GL_T4F_V4F */
6063+ 1435, /* GL_T2F_C4UB_V3F */
6064+ 1433, /* GL_T2F_C3F_V3F */
6065+ 1436, /* GL_T2F_N3F_V3F */
6066+ 1434, /* GL_T2F_C4F_N3F_V3F */
6067+ 1438, /* GL_T4F_C4F_N3F_V4F */
6068+ 130, /* GL_CLIP_PLANE0 */
6069+ 131, /* GL_CLIP_PLANE1 */
6070+ 132, /* GL_CLIP_PLANE2 */
6071+ 133, /* GL_CLIP_PLANE3 */
6072+ 134, /* GL_CLIP_PLANE4 */
6073+ 135, /* GL_CLIP_PLANE5 */
6074+ 623, /* GL_LIGHT0 */
6075+ 624, /* GL_LIGHT1 */
6076+ 625, /* GL_LIGHT2 */
6077+ 626, /* GL_LIGHT3 */
6078+ 627, /* GL_LIGHT4 */
6079+ 628, /* GL_LIGHT5 */
6080+ 629, /* GL_LIGHT6 */
6081+ 630, /* GL_LIGHT7 */
6082+ 552, /* GL_HINT_BIT */
6083+ 247, /* GL_CONSTANT_COLOR */
6084+ 992, /* GL_ONE_MINUS_CONSTANT_COLOR */
6085+ 242, /* GL_CONSTANT_ALPHA */
6086+ 990, /* GL_ONE_MINUS_CONSTANT_ALPHA */
6087+ 76, /* GL_BLEND_COLOR */
6088+ 512, /* GL_FUNC_ADD */
6089+ 881, /* GL_MIN */
6090+ 793, /* GL_MAX */
6091+ 81, /* GL_BLEND_EQUATION */
6092+ 516, /* GL_FUNC_SUBTRACT */
6093+ 514, /* GL_FUNC_REVERSE_SUBTRACT */
6094+ 250, /* GL_CONVOLUTION_1D */
6095+ 251, /* GL_CONVOLUTION_2D */
6096+ 1332, /* GL_SEPARABLE_2D */
6097+ 254, /* GL_CONVOLUTION_BORDER_MODE */
6098+ 258, /* GL_CONVOLUTION_FILTER_SCALE */
6099+ 256, /* GL_CONVOLUTION_FILTER_BIAS */
6100+ 1231, /* GL_REDUCE */
6101+ 260, /* GL_CONVOLUTION_FORMAT */
6102+ 264, /* GL_CONVOLUTION_WIDTH */
6103+ 262, /* GL_CONVOLUTION_HEIGHT */
6104+ 808, /* GL_MAX_CONVOLUTION_WIDTH */
6105+ 806, /* GL_MAX_CONVOLUTION_HEIGHT */
6106+ 1146, /* GL_POST_CONVOLUTION_RED_SCALE */
6107+ 1142, /* GL_POST_CONVOLUTION_GREEN_SCALE */
6108+ 1137, /* GL_POST_CONVOLUTION_BLUE_SCALE */
6109+ 1133, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
6110+ 1144, /* GL_POST_CONVOLUTION_RED_BIAS */
6111+ 1140, /* GL_POST_CONVOLUTION_GREEN_BIAS */
6112+ 1135, /* GL_POST_CONVOLUTION_BLUE_BIAS */
6113+ 1131, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
6114+ 553, /* GL_HISTOGRAM */
6115+ 1193, /* GL_PROXY_HISTOGRAM */
6116+ 569, /* GL_HISTOGRAM_WIDTH */
6117+ 559, /* GL_HISTOGRAM_FORMAT */
6118+ 565, /* GL_HISTOGRAM_RED_SIZE */
6119+ 561, /* GL_HISTOGRAM_GREEN_SIZE */
6120+ 556, /* GL_HISTOGRAM_BLUE_SIZE */
6121+ 554, /* GL_HISTOGRAM_ALPHA_SIZE */
6122+ 563, /* GL_HISTOGRAM_LUMINANCE_SIZE */
6123+ 567, /* GL_HISTOGRAM_SINK */
6124+ 882, /* GL_MINMAX */
6125+ 884, /* GL_MINMAX_FORMAT */
6126+ 886, /* GL_MINMAX_SINK */
6127+ 1440, /* GL_TABLE_TOO_LARGE_EXT */
6128+ 1652, /* GL_UNSIGNED_BYTE_3_3_2 */
6129+ 1661, /* GL_UNSIGNED_SHORT_4_4_4_4 */
6130+ 1663, /* GL_UNSIGNED_SHORT_5_5_5_1 */
6131+ 1657, /* GL_UNSIGNED_INT_8_8_8_8 */
6132+ 1654, /* GL_UNSIGNED_INT_10_10_10_2 */
6133+ 1104, /* GL_POLYGON_OFFSET_FILL */
6134+ 1103, /* GL_POLYGON_OFFSET_FACTOR */
6135+ 1102, /* GL_POLYGON_OFFSET_BIAS */
6136+ 1251, /* GL_RESCALE_NORMAL */
6137+ 36, /* GL_ALPHA4 */
6138+ 38, /* GL_ALPHA8 */
6139+ 32, /* GL_ALPHA12 */
6140+ 34, /* GL_ALPHA16 */
6141+ 679, /* GL_LUMINANCE4 */
6142+ 685, /* GL_LUMINANCE8 */
6143+ 669, /* GL_LUMINANCE12 */
6144+ 675, /* GL_LUMINANCE16 */
6145+ 680, /* GL_LUMINANCE4_ALPHA4 */
6146+ 683, /* GL_LUMINANCE6_ALPHA2 */
6147+ 686, /* GL_LUMINANCE8_ALPHA8 */
6148+ 672, /* GL_LUMINANCE12_ALPHA4 */
6149+ 670, /* GL_LUMINANCE12_ALPHA12 */
6150+ 676, /* GL_LUMINANCE16_ALPHA16 */
6151+ 593, /* GL_INTENSITY */
6152+ 598, /* GL_INTENSITY4 */
6153+ 600, /* GL_INTENSITY8 */
6154+ 594, /* GL_INTENSITY12 */
6155+ 596, /* GL_INTENSITY16 */
6156+ 1263, /* GL_RGB2_EXT */
6157+ 1264, /* GL_RGB4 */
6158+ 1267, /* GL_RGB5 */
6159+ 1271, /* GL_RGB8 */
6160+ 1255, /* GL_RGB10 */
6161+ 1259, /* GL_RGB12 */
6162+ 1261, /* GL_RGB16 */
6163+ 1278, /* GL_RGBA2 */
6164+ 1280, /* GL_RGBA4 */
6165+ 1268, /* GL_RGB5_A1 */
6166+ 1284, /* GL_RGBA8 */
6167+ 1256, /* GL_RGB10_A2 */
6168+ 1274, /* GL_RGBA12 */
6169+ 1276, /* GL_RGBA16 */
6170+ 1613, /* GL_TEXTURE_RED_SIZE */
6171+ 1585, /* GL_TEXTURE_GREEN_SIZE */
6172+ 1524, /* GL_TEXTURE_BLUE_SIZE */
6173+ 1511, /* GL_TEXTURE_ALPHA_SIZE */
6174+ 1598, /* GL_TEXTURE_LUMINANCE_SIZE */
6175+ 1589, /* GL_TEXTURE_INTENSITY_SIZE */
6176+ 1249, /* GL_REPLACE_EXT */
6177+ 1197, /* GL_PROXY_TEXTURE_1D */
6178+ 1200, /* GL_PROXY_TEXTURE_2D */
6179+ 1617, /* GL_TEXTURE_TOO_LARGE_EXT */
6180+ 1610, /* GL_TEXTURE_PRIORITY */
6181+ 1615, /* GL_TEXTURE_RESIDENT */
6182+ 1514, /* GL_TEXTURE_BINDING_1D */
6183+ 1516, /* GL_TEXTURE_BINDING_2D */
6184+ 1518, /* GL_TEXTURE_BINDING_3D */
6185+ 1028, /* GL_PACK_SKIP_IMAGES */
6186+ 1024, /* GL_PACK_IMAGE_HEIGHT */
6187+ 1646, /* GL_UNPACK_SKIP_IMAGES */
6188+ 1643, /* GL_UNPACK_IMAGE_HEIGHT */
6189+ 1510, /* GL_TEXTURE_3D */
6190+ 1203, /* GL_PROXY_TEXTURE_3D */
6191+ 1572, /* GL_TEXTURE_DEPTH */
6192+ 1620, /* GL_TEXTURE_WRAP_R */
6193+ 794, /* GL_MAX_3D_TEXTURE_SIZE */
6194+ 1676, /* GL_VERTEX_ARRAY */
6195+ 959, /* GL_NORMAL_ARRAY */
6196+ 139, /* GL_COLOR_ARRAY */
6197+ 578, /* GL_INDEX_ARRAY */
6198+ 1551, /* GL_TEXTURE_COORD_ARRAY */
6199+ 415, /* GL_EDGE_FLAG_ARRAY */
6200+ 1681, /* GL_VERTEX_ARRAY_SIZE */
6201+ 1683, /* GL_VERTEX_ARRAY_TYPE */
6202+ 1682, /* GL_VERTEX_ARRAY_STRIDE */
6203+ 964, /* GL_NORMAL_ARRAY_TYPE */
6204+ 963, /* GL_NORMAL_ARRAY_STRIDE */
6205+ 143, /* GL_COLOR_ARRAY_SIZE */
6206+ 145, /* GL_COLOR_ARRAY_TYPE */
6207+ 144, /* GL_COLOR_ARRAY_STRIDE */
6208+ 583, /* GL_INDEX_ARRAY_TYPE */
6209+ 582, /* GL_INDEX_ARRAY_STRIDE */
6210+ 1555, /* GL_TEXTURE_COORD_ARRAY_SIZE */
6211+ 1557, /* GL_TEXTURE_COORD_ARRAY_TYPE */
6212+ 1556, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
6213+ 419, /* GL_EDGE_FLAG_ARRAY_STRIDE */
6214+ 1680, /* GL_VERTEX_ARRAY_POINTER */
6215+ 962, /* GL_NORMAL_ARRAY_POINTER */
6216+ 142, /* GL_COLOR_ARRAY_POINTER */
6217+ 581, /* GL_INDEX_ARRAY_POINTER */
6218+ 1554, /* GL_TEXTURE_COORD_ARRAY_POINTER */
6219+ 418, /* GL_EDGE_FLAG_ARRAY_POINTER */
6220+ 938, /* GL_MULTISAMPLE */
6221+ 1306, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
6222+ 1308, /* GL_SAMPLE_ALPHA_TO_ONE */
6223+ 1313, /* GL_SAMPLE_COVERAGE */
6224+ 1310, /* GL_SAMPLE_BUFFERS */
6225+ 1301, /* GL_SAMPLES */
6226+ 1317, /* GL_SAMPLE_COVERAGE_VALUE */
6227+ 1315, /* GL_SAMPLE_COVERAGE_INVERT */
6228+ 170, /* GL_COLOR_MATRIX */
6229+ 172, /* GL_COLOR_MATRIX_STACK_DEPTH */
6230+ 802, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
6231+ 1129, /* GL_POST_COLOR_MATRIX_RED_SCALE */
6232+ 1125, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
6233+ 1120, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
6234+ 1116, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
6235+ 1127, /* GL_POST_COLOR_MATRIX_RED_BIAS */
6236+ 1123, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
6237+ 1118, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
6238+ 1114, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
6239+ 1534, /* GL_TEXTURE_COLOR_TABLE_SGI */
6240+ 1204, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
6241+ 1536, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
6242+ 80, /* GL_BLEND_DST_RGB */
6243+ 88, /* GL_BLEND_SRC_RGB */
6244+ 79, /* GL_BLEND_DST_ALPHA */
6245+ 87, /* GL_BLEND_SRC_ALPHA */
6246+ 176, /* GL_COLOR_TABLE */
6247+ 1139, /* GL_POST_CONVOLUTION_COLOR_TABLE */
6248+ 1122, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
6249+ 1192, /* GL_PROXY_COLOR_TABLE */
6250+ 1196, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
6251+ 1195, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
6252+ 200, /* GL_COLOR_TABLE_SCALE */
6253+ 180, /* GL_COLOR_TABLE_BIAS */
6254+ 185, /* GL_COLOR_TABLE_FORMAT */
6255+ 202, /* GL_COLOR_TABLE_WIDTH */
6256+ 197, /* GL_COLOR_TABLE_RED_SIZE */
6257+ 188, /* GL_COLOR_TABLE_GREEN_SIZE */
6258+ 182, /* GL_COLOR_TABLE_BLUE_SIZE */
6259+ 177, /* GL_COLOR_TABLE_ALPHA_SIZE */
6260+ 194, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
6261+ 191, /* GL_COLOR_TABLE_INTENSITY_SIZE */
6262+ 71, /* GL_BGR */
6263+ 72, /* GL_BGRA */
6264+ 816, /* GL_MAX_ELEMENTS_VERTICES */
6265+ 815, /* GL_MAX_ELEMENTS_INDICES */
6266+ 1588, /* GL_TEXTURE_INDEX_SIZE_EXT */
6267+ 136, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
6268+ 1086, /* GL_POINT_SIZE_MIN */
6269+ 1082, /* GL_POINT_SIZE_MAX */
6270+ 1076, /* GL_POINT_FADE_THRESHOLD_SIZE */
6271+ 1072, /* GL_POINT_DISTANCE_ATTENUATION */
6272+ 118, /* GL_CLAMP_TO_BORDER */
6273+ 121, /* GL_CLAMP_TO_EDGE */
6274+ 1609, /* GL_TEXTURE_MIN_LOD */
6275+ 1607, /* GL_TEXTURE_MAX_LOD */
6276+ 1513, /* GL_TEXTURE_BASE_LEVEL */
6277+ 1606, /* GL_TEXTURE_MAX_LEVEL */
6278+ 572, /* GL_IGNORE_BORDER_HP */
6279+ 246, /* GL_CONSTANT_BORDER_HP */
6280+ 1250, /* GL_REPLICATE_BORDER_HP */
6281+ 252, /* GL_CONVOLUTION_BORDER_COLOR */
6282+ 987, /* GL_OCCLUSION_TEST_HP */
6283+ 988, /* GL_OCCLUSION_TEST_RESULT_HP */
6284+ 641, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
6285+ 1528, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
6286+ 1530, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
6287+ 1532, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
6288+ 1533, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
6289+ 1531, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
6290+ 1529, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
6291+ 798, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
6292+ 799, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
6293+ 1149, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
6294+ 1151, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
6295+ 1148, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
6296+ 1150, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
6297+ 1596, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
6298+ 1597, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
6299+ 1595, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
6300+ 518, /* GL_GENERATE_MIPMAP */
6301+ 519, /* GL_GENERATE_MIPMAP_HINT */
6302+ 481, /* GL_FOG_OFFSET_SGIX */
6303+ 482, /* GL_FOG_OFFSET_VALUE_SGIX */
6304+ 1542, /* GL_TEXTURE_COMPARE_SGIX */
6305+ 1541, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
6306+ 1592, /* GL_TEXTURE_LEQUAL_R_SGIX */
6307+ 1584, /* GL_TEXTURE_GEQUAL_R_SGIX */
6308+ 323, /* GL_DEPTH_COMPONENT16 */
6309+ 326, /* GL_DEPTH_COMPONENT24 */
6310+ 329, /* GL_DEPTH_COMPONENT32 */
6311+ 274, /* GL_CULL_VERTEX_EXT */
6312+ 276, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
6313+ 275, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
6314+ 1737, /* GL_WRAP_BORDER_SUN */
6315+ 1535, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
6316+ 634, /* GL_LIGHT_MODEL_COLOR_CONTROL */
6317+ 1345, /* GL_SINGLE_COLOR */
6318+ 1333, /* GL_SEPARATE_SPECULAR_COLOR */
6319+ 1342, /* GL_SHARED_TEXTURE_PALETTE_EXT */
6320+ 1651, /* GL_UNSIGNED_BYTE_2_3_3_REV */
6321+ 1664, /* GL_UNSIGNED_SHORT_5_6_5 */
6322+ 1665, /* GL_UNSIGNED_SHORT_5_6_5_REV */
6323+ 1662, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
6324+ 1660, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
6325+ 1658, /* GL_UNSIGNED_INT_8_8_8_8_REV */
6326+ 1656, /* GL_UNSIGNED_INT_2_10_10_10_REV */
6327+ 1604, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
6328+ 1605, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
6329+ 1603, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
6330+ 889, /* GL_MIRRORED_REPEAT */
6331+ 1289, /* GL_RGB_S3TC */
6332+ 1266, /* GL_RGB4_S3TC */
6333+ 1288, /* GL_RGBA_S3TC */
6334+ 1283, /* GL_RGBA4_S3TC */
6335+ 1286, /* GL_RGBA_DXT5_S3TC */
6336+ 1281, /* GL_RGBA4_DXT5_S3TC */
6337+ 239, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
6338+ 234, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
6339+ 235, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
6340+ 236, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
6341+ 950, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
6342+ 949, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
6343+ 642, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
6344+ 468, /* GL_FOG_COORDINATE_SOURCE */
6345+ 460, /* GL_FOG_COORD */
6346+ 484, /* GL_FRAGMENT_DEPTH */
6347+ 280, /* GL_CURRENT_FOG_COORD */
6348+ 467, /* GL_FOG_COORDINATE_ARRAY_TYPE */
6349+ 466, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
6350+ 465, /* GL_FOG_COORDINATE_ARRAY_POINTER */
6351+ 462, /* GL_FOG_COORDINATE_ARRAY */
6352+ 174, /* GL_COLOR_SUM */
6353+ 299, /* GL_CURRENT_SECONDARY_COLOR */
6354+ 1326, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
6355+ 1328, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
6356+ 1327, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
6357+ 1325, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
6358+ 1322, /* GL_SECONDARY_COLOR_ARRAY */
6359+ 528, /* GL_GL_CURRENT_RASTER_SECONDARY_COLOR */
6360+ 28, /* GL_ALIASED_POINT_SIZE_RANGE */
6361+ 27, /* GL_ALIASED_LINE_WIDTH_RANGE */
6362+ 1442, /* GL_TEXTURE0 */
6363+ 1444, /* GL_TEXTURE1 */
6364+ 1466, /* GL_TEXTURE2 */
6365+ 1488, /* GL_TEXTURE3 */
6366+ 1494, /* GL_TEXTURE4 */
6367+ 1496, /* GL_TEXTURE5 */
6368+ 1498, /* GL_TEXTURE6 */
6369+ 1500, /* GL_TEXTURE7 */
6370+ 1502, /* GL_TEXTURE8 */
6371+ 1504, /* GL_TEXTURE9 */
6372+ 1445, /* GL_TEXTURE10 */
6373+ 1447, /* GL_TEXTURE11 */
6374+ 1449, /* GL_TEXTURE12 */
6375+ 1451, /* GL_TEXTURE13 */
6376+ 1453, /* GL_TEXTURE14 */
6377+ 1455, /* GL_TEXTURE15 */
6378+ 1457, /* GL_TEXTURE16 */
6379+ 1459, /* GL_TEXTURE17 */
6380+ 1461, /* GL_TEXTURE18 */
6381+ 1463, /* GL_TEXTURE19 */
6382+ 1467, /* GL_TEXTURE20 */
6383+ 1469, /* GL_TEXTURE21 */
6384+ 1471, /* GL_TEXTURE22 */
6385+ 1473, /* GL_TEXTURE23 */
6386+ 1475, /* GL_TEXTURE24 */
6387+ 1477, /* GL_TEXTURE25 */
6388+ 1479, /* GL_TEXTURE26 */
6389+ 1481, /* GL_TEXTURE27 */
6390+ 1483, /* GL_TEXTURE28 */
6391+ 1485, /* GL_TEXTURE29 */
6392+ 1489, /* GL_TEXTURE30 */
6393+ 1491, /* GL_TEXTURE31 */
6394+ 18, /* GL_ACTIVE_TEXTURE */
6395+ 124, /* GL_CLIENT_ACTIVE_TEXTURE */
6396+ 867, /* GL_MAX_TEXTURE_UNITS */
6397+ 1630, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
6398+ 1633, /* GL_TRANSPOSE_PROJECTION_MATRIX */
6399+ 1635, /* GL_TRANSPOSE_TEXTURE_MATRIX */
6400+ 1627, /* GL_TRANSPOSE_COLOR_MATRIX */
6401+ 1430, /* GL_SUBTRACT */
6402+ 856, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
6403+ 222, /* GL_COMPRESSED_ALPHA */
6404+ 226, /* GL_COMPRESSED_LUMINANCE */
6405+ 227, /* GL_COMPRESSED_LUMINANCE_ALPHA */
6406+ 224, /* GL_COMPRESSED_INTENSITY */
6407+ 230, /* GL_COMPRESSED_RGB */
6408+ 231, /* GL_COMPRESSED_RGBA */
6409+ 1549, /* GL_TEXTURE_COMPRESSION_HINT */
6410+ 1611, /* GL_TEXTURE_RECTANGLE_ARB */
6411+ 1521, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
6412+ 1207, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
6413+ 854, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
6414+ 335, /* GL_DEPTH_STENCIL_NV */
6415+ 1655, /* GL_UNSIGNED_INT_24_8_NV */
6416+ 863, /* GL_MAX_TEXTURE_LOD_BIAS */
6417+ 1602, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
6418+ 864, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
6419+ 1578, /* GL_TEXTURE_FILTER_CONTROL */
6420+ 1593, /* GL_TEXTURE_LOD_BIAS */
6421+ 207, /* GL_COMBINE4 */
6422+ 857, /* GL_MAX_SHININESS_NV */
6423+ 858, /* GL_MAX_SPOT_EXPONENT_NV */
6424+ 576, /* GL_INCR_WRAP */
6425+ 310, /* GL_DECR_WRAP */
6426+ 909, /* GL_MODELVIEW1_ARB */
6427+ 965, /* GL_NORMAL_MAP */
6428+ 1236, /* GL_REFLECTION_MAP */
6429+ 1558, /* GL_TEXTURE_CUBE_MAP */
6430+ 1519, /* GL_TEXTURE_BINDING_CUBE_MAP */
6431+ 1566, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
6432+ 1560, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
6433+ 1568, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
6434+ 1562, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
6435+ 1570, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
6436+ 1564, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
6437+ 1205, /* GL_PROXY_TEXTURE_CUBE_MAP */
6438+ 810, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
6439+ 944, /* GL_MULTISAMPLE_FILTER_HINT_NV */
6440+ 476, /* GL_FOG_DISTANCE_MODE_NV */
6441+ 435, /* GL_EYE_RADIAL_NV */
6442+ 434, /* GL_EYE_PLANE_ABSOLUTE_NV */
6443+ 206, /* GL_COMBINE */
6444+ 213, /* GL_COMBINE_RGB */
6445+ 208, /* GL_COMBINE_ALPHA */
6446+ 1290, /* GL_RGB_SCALE */
6447+ 24, /* GL_ADD_SIGNED */
6448+ 603, /* GL_INTERPOLATE */
6449+ 241, /* GL_CONSTANT */
6450+ 1155, /* GL_PRIMARY_COLOR */
6451+ 1152, /* GL_PREVIOUS */
6452+ 1356, /* GL_SOURCE0_RGB */
6453+ 1362, /* GL_SOURCE1_RGB */
6454+ 1368, /* GL_SOURCE2_RGB */
6455+ 1372, /* GL_SOURCE3_RGB_NV */
6456+ 1353, /* GL_SOURCE0_ALPHA */
6457+ 1359, /* GL_SOURCE1_ALPHA */
6458+ 1365, /* GL_SOURCE2_ALPHA */
6459+ 1371, /* GL_SOURCE3_ALPHA_NV */
6460+ 1001, /* GL_OPERAND0_RGB */
6461+ 1007, /* GL_OPERAND1_RGB */
6462+ 1013, /* GL_OPERAND2_RGB */
6463+ 1017, /* GL_OPERAND3_RGB_NV */
6464+ 998, /* GL_OPERAND0_ALPHA */
6465+ 1004, /* GL_OPERAND1_ALPHA */
6466+ 1010, /* GL_OPERAND2_ALPHA */
6467+ 1016, /* GL_OPERAND3_ALPHA_NV */
6468+ 1677, /* GL_VERTEX_ARRAY_BINDING_APPLE */
6469+ 1741, /* GL_YCBCR_422_APPLE */
6470+ 1666, /* GL_UNSIGNED_SHORT_8_8_APPLE */
6471+ 1668, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
6472+ 1347, /* GL_SLICE_ACCUM_SUN */
6473+ 1212, /* GL_QUAD_MESH_SUN */
6474+ 1639, /* GL_TRIANGLE_MESH_SUN */
6475+ 1715, /* GL_VERTEX_PROGRAM_ARB */
6476+ 1726, /* GL_VERTEX_STATE_PROGRAM_NV */
6477+ 1702, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
6478+ 1708, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
6479+ 1710, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
6480+ 1712, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
6481+ 301, /* GL_CURRENT_VERTEX_ATTRIB */
6482+ 1168, /* GL_PROGRAM_LENGTH_ARB */
6483+ 1182, /* GL_PROGRAM_STRING_ARB */
6484+ 931, /* GL_MODELVIEW_PROJECTION_NV */
6485+ 571, /* GL_IDENTITY_NV */
6486+ 616, /* GL_INVERSE_NV */
6487+ 1632, /* GL_TRANSPOSE_NV */
6488+ 617, /* GL_INVERSE_TRANSPOSE_NV */
6489+ 840, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
6490+ 839, /* GL_MAX_PROGRAM_MATRICES_ARB */
6491+ 747, /* GL_MATRIX0_NV */
6492+ 759, /* GL_MATRIX1_NV */
6493+ 771, /* GL_MATRIX2_NV */
6494+ 775, /* GL_MATRIX3_NV */
6495+ 777, /* GL_MATRIX4_NV */
6496+ 779, /* GL_MATRIX5_NV */
6497+ 781, /* GL_MATRIX6_NV */
6498+ 783, /* GL_MATRIX7_NV */
6499+ 286, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
6500+ 283, /* GL_CURRENT_MATRIX_ARB */
6501+ 1718, /* GL_VERTEX_PROGRAM_POINT_SIZE */
6502+ 1721, /* GL_VERTEX_PROGRAM_TWO_SIDE */
6503+ 1180, /* GL_PROGRAM_PARAMETER_NV */
6504+ 1706, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
6505+ 1184, /* GL_PROGRAM_TARGET_NV */
6506+ 1181, /* GL_PROGRAM_RESIDENT_NV */
6507+ 1624, /* GL_TRACK_MATRIX_NV */
6508+ 1625, /* GL_TRACK_MATRIX_TRANSFORM_NV */
6509+ 1716, /* GL_VERTEX_PROGRAM_BINDING_NV */
6510+ 1162, /* GL_PROGRAM_ERROR_POSITION_ARB */
6511+ 320, /* GL_DEPTH_CLAMP_NV */
6512+ 1684, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
6513+ 1691, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
6514+ 1692, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
6515+ 1693, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
6516+ 1694, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
6517+ 1695, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
6518+ 1696, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
6519+ 1697, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
6520+ 1698, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
6521+ 1699, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
6522+ 1685, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
6523+ 1686, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
6524+ 1687, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
6525+ 1688, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
6526+ 1689, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
6527+ 1690, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
6528+ 701, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
6529+ 708, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
6530+ 709, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
6531+ 710, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
6532+ 711, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
6533+ 712, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
6534+ 713, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
6535+ 714, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
6536+ 715, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
6537+ 716, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
6538+ 702, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
6539+ 703, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
6540+ 704, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
6541+ 705, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
6542+ 706, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
6543+ 707, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
6544+ 728, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
6545+ 735, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
6546+ 736, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
6547+ 737, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
6548+ 738, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
6549+ 739, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
6550+ 740, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
6551+ 1161, /* GL_PROGRAM_BINDING_ARB */
6552+ 742, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
6553+ 743, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
6554+ 729, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
6555+ 730, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
6556+ 731, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
6557+ 732, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
6558+ 733, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
6559+ 734, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
6560+ 1547, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
6561+ 1544, /* GL_TEXTURE_COMPRESSED */
6562+ 970, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
6563+ 240, /* GL_COMPRESSED_TEXTURE_FORMATS */
6564+ 879, /* GL_MAX_VERTEX_UNITS_ARB */
6565+ 22, /* GL_ACTIVE_VERTEX_UNITS_ARB */
6566+ 1736, /* GL_WEIGHT_SUM_UNITY_ARB */
6567+ 1714, /* GL_VERTEX_BLEND_ARB */
6568+ 303, /* GL_CURRENT_WEIGHT_ARB */
6569+ 1735, /* GL_WEIGHT_ARRAY_TYPE_ARB */
6570+ 1734, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
6571+ 1733, /* GL_WEIGHT_ARRAY_SIZE_ARB */
6572+ 1732, /* GL_WEIGHT_ARRAY_POINTER_ARB */
6573+ 1729, /* GL_WEIGHT_ARRAY_ARB */
6574+ 346, /* GL_DOT3_RGB */
6575+ 347, /* GL_DOT3_RGBA */
6576+ 238, /* GL_COMPRESSED_RGB_FXT1_3DFX */
6577+ 233, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
6578+ 939, /* GL_MULTISAMPLE_3DFX */
6579+ 1311, /* GL_SAMPLE_BUFFERS_3DFX */
6580+ 1302, /* GL_SAMPLES_3DFX */
6581+ 920, /* GL_MODELVIEW2_ARB */
6582+ 923, /* GL_MODELVIEW3_ARB */
6583+ 924, /* GL_MODELVIEW4_ARB */
6584+ 925, /* GL_MODELVIEW5_ARB */
6585+ 926, /* GL_MODELVIEW6_ARB */
6586+ 927, /* GL_MODELVIEW7_ARB */
6587+ 928, /* GL_MODELVIEW8_ARB */
6588+ 929, /* GL_MODELVIEW9_ARB */
6589+ 899, /* GL_MODELVIEW10_ARB */
6590+ 900, /* GL_MODELVIEW11_ARB */
6591+ 901, /* GL_MODELVIEW12_ARB */
6592+ 902, /* GL_MODELVIEW13_ARB */
6593+ 903, /* GL_MODELVIEW14_ARB */
6594+ 904, /* GL_MODELVIEW15_ARB */
6595+ 905, /* GL_MODELVIEW16_ARB */
6596+ 906, /* GL_MODELVIEW17_ARB */
6597+ 907, /* GL_MODELVIEW18_ARB */
6598+ 908, /* GL_MODELVIEW19_ARB */
6599+ 910, /* GL_MODELVIEW20_ARB */
6600+ 911, /* GL_MODELVIEW21_ARB */
6601+ 912, /* GL_MODELVIEW22_ARB */
6602+ 913, /* GL_MODELVIEW23_ARB */
6603+ 914, /* GL_MODELVIEW24_ARB */
6604+ 915, /* GL_MODELVIEW25_ARB */
6605+ 916, /* GL_MODELVIEW26_ARB */
6606+ 917, /* GL_MODELVIEW27_ARB */
6607+ 918, /* GL_MODELVIEW28_ARB */
6608+ 919, /* GL_MODELVIEW29_ARB */
6609+ 921, /* GL_MODELVIEW30_ARB */
6610+ 922, /* GL_MODELVIEW31_ARB */
6611+ 351, /* GL_DOT3_RGB_EXT */
6612+ 349, /* GL_DOT3_RGBA_EXT */
6613+ 893, /* GL_MIRROR_CLAMP_EXT */
6614+ 896, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
6615+ 934, /* GL_MODULATE_ADD_ATI */
6616+ 935, /* GL_MODULATE_SIGNED_ADD_ATI */
6617+ 936, /* GL_MODULATE_SUBTRACT_ATI */
6618+ 1742, /* GL_YCBCR_MESA */
6619+ 1025, /* GL_PACK_INVERT_MESA */
6620+ 306, /* GL_DEBUG_OBJECT_MESA */
6621+ 307, /* GL_DEBUG_PRINT_MESA */
6622+ 305, /* GL_DEBUG_ASSERT_MESA */
6623+ 107, /* GL_BUFFER_SIZE */
6624+ 109, /* GL_BUFFER_USAGE */
6625+ 1398, /* GL_STENCIL_BACK_FUNC */
6626+ 1397, /* GL_STENCIL_BACK_FAIL */
6627+ 1399, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
6628+ 1400, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
6629+ 485, /* GL_FRAGMENT_PROGRAM_ARB */
6630+ 1159, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
6631+ 1187, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
6632+ 1186, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
6633+ 1171, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
6634+ 1177, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
6635+ 1176, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
6636+ 829, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
6637+ 852, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
6638+ 851, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
6639+ 842, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
6640+ 848, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
6641+ 847, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
6642+ 812, /* GL_MAX_DRAW_BUFFERS */
6643+ 355, /* GL_DRAW_BUFFER0 */
6644+ 358, /* GL_DRAW_BUFFER1 */
6645+ 379, /* GL_DRAW_BUFFER2 */
6646+ 382, /* GL_DRAW_BUFFER3 */
6647+ 385, /* GL_DRAW_BUFFER4 */
6648+ 388, /* GL_DRAW_BUFFER5 */
6649+ 391, /* GL_DRAW_BUFFER6 */
6650+ 394, /* GL_DRAW_BUFFER7 */
6651+ 397, /* GL_DRAW_BUFFER8 */
6652+ 400, /* GL_DRAW_BUFFER9 */
6653+ 359, /* GL_DRAW_BUFFER10 */
6654+ 362, /* GL_DRAW_BUFFER11 */
6655+ 365, /* GL_DRAW_BUFFER12 */
6656+ 368, /* GL_DRAW_BUFFER13 */
6657+ 371, /* GL_DRAW_BUFFER14 */
6658+ 374, /* GL_DRAW_BUFFER15 */
6659+ 82, /* GL_BLEND_EQUATION_ALPHA */
6660+ 792, /* GL_MATRIX_PALETTE_ARB */
6661+ 823, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
6662+ 826, /* GL_MAX_PALETTE_MATRICES_ARB */
6663+ 289, /* GL_CURRENT_PALETTE_MATRIX_ARB */
6664+ 786, /* GL_MATRIX_INDEX_ARRAY_ARB */
6665+ 284, /* GL_CURRENT_MATRIX_INDEX_ARB */
6666+ 788, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
6667+ 790, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
6668+ 789, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
6669+ 787, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
6670+ 1573, /* GL_TEXTURE_DEPTH_SIZE */
6671+ 339, /* GL_DEPTH_TEXTURE_MODE */
6672+ 1539, /* GL_TEXTURE_COMPARE_MODE */
6673+ 1537, /* GL_TEXTURE_COMPARE_FUNC */
6674+ 217, /* GL_COMPARE_R_TO_TEXTURE */
6675+ 1093, /* GL_POINT_SPRITE */
6676+ 266, /* GL_COORD_REPLACE */
6677+ 1097, /* GL_POINT_SPRITE_R_MODE_NV */
6678+ 1214, /* GL_QUERY_COUNTER_BITS */
6679+ 291, /* GL_CURRENT_QUERY */
6680+ 1216, /* GL_QUERY_RESULT */
6681+ 1218, /* GL_QUERY_RESULT_AVAILABLE */
6682+ 873, /* GL_MAX_VERTEX_ATTRIBS */
6683+ 1704, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
6684+ 337, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
6685+ 336, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
6686+ 859, /* GL_MAX_TEXTURE_COORDS */
6687+ 861, /* GL_MAX_TEXTURE_IMAGE_UNITS */
6688+ 1164, /* GL_PROGRAM_ERROR_STRING_ARB */
6689+ 1166, /* GL_PROGRAM_FORMAT_ASCII_ARB */
6690+ 1165, /* GL_PROGRAM_FORMAT_ARB */
6691+ 1618, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
6692+ 318, /* GL_DEPTH_BOUNDS_TEST_EXT */
6693+ 317, /* GL_DEPTH_BOUNDS_EXT */
6694+ 52, /* GL_ARRAY_BUFFER */
6695+ 420, /* GL_ELEMENT_ARRAY_BUFFER */
6696+ 54, /* GL_ARRAY_BUFFER_BINDING */
6697+ 422, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
6698+ 1678, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
6699+ 960, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
6700+ 140, /* GL_COLOR_ARRAY_BUFFER_BINDING */
6701+ 579, /* GL_INDEX_ARRAY_BUFFER_BINDING */
6702+ 1552, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
6703+ 416, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
6704+ 1323, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
6705+ 463, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
6706+ 1730, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
6707+ 1700, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
6708+ 1167, /* GL_PROGRAM_INSTRUCTIONS_ARB */
6709+ 835, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
6710+ 1173, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
6711+ 844, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
6712+ 1185, /* GL_PROGRAM_TEMPORARIES_ARB */
6713+ 850, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
6714+ 1175, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
6715+ 846, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
6716+ 1179, /* GL_PROGRAM_PARAMETERS_ARB */
6717+ 849, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
6718+ 1174, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
6719+ 845, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
6720+ 1160, /* GL_PROGRAM_ATTRIBS_ARB */
6721+ 830, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
6722+ 1172, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
6723+ 843, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
6724+ 1158, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
6725+ 828, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
6726+ 1170, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
6727+ 841, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
6728+ 836, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
6729+ 832, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
6730+ 1188, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
6731+ 1629, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
6732+ 1226, /* GL_READ_ONLY */
6733+ 1738, /* GL_WRITE_ONLY */
6734+ 1228, /* GL_READ_WRITE */
6735+ 101, /* GL_BUFFER_ACCESS */
6736+ 103, /* GL_BUFFER_MAPPED */
6737+ 105, /* GL_BUFFER_MAP_POINTER */
6738+ 1623, /* GL_TIME_ELAPSED_EXT */
6739+ 746, /* GL_MATRIX0_ARB */
6740+ 758, /* GL_MATRIX1_ARB */
6741+ 770, /* GL_MATRIX2_ARB */
6742+ 774, /* GL_MATRIX3_ARB */
6743+ 776, /* GL_MATRIX4_ARB */
6744+ 778, /* GL_MATRIX5_ARB */
6745+ 780, /* GL_MATRIX6_ARB */
6746+ 782, /* GL_MATRIX7_ARB */
6747+ 784, /* GL_MATRIX8_ARB */
6748+ 785, /* GL_MATRIX9_ARB */
6749+ 748, /* GL_MATRIX10_ARB */
6750+ 749, /* GL_MATRIX11_ARB */
6751+ 750, /* GL_MATRIX12_ARB */
6752+ 751, /* GL_MATRIX13_ARB */
6753+ 752, /* GL_MATRIX14_ARB */
6754+ 753, /* GL_MATRIX15_ARB */
6755+ 754, /* GL_MATRIX16_ARB */
6756+ 755, /* GL_MATRIX17_ARB */
6757+ 756, /* GL_MATRIX18_ARB */
6758+ 757, /* GL_MATRIX19_ARB */
6759+ 760, /* GL_MATRIX20_ARB */
6760+ 761, /* GL_MATRIX21_ARB */
6761+ 762, /* GL_MATRIX22_ARB */
6762+ 763, /* GL_MATRIX23_ARB */
6763+ 764, /* GL_MATRIX24_ARB */
6764+ 765, /* GL_MATRIX25_ARB */
6765+ 766, /* GL_MATRIX26_ARB */
6766+ 767, /* GL_MATRIX27_ARB */
6767+ 768, /* GL_MATRIX28_ARB */
6768+ 769, /* GL_MATRIX29_ARB */
6769+ 772, /* GL_MATRIX30_ARB */
6770+ 773, /* GL_MATRIX31_ARB */
6771+ 1425, /* GL_STREAM_DRAW */
6772+ 1427, /* GL_STREAM_READ */
6773+ 1423, /* GL_STREAM_COPY */
6774+ 1391, /* GL_STATIC_DRAW */
6775+ 1393, /* GL_STATIC_READ */
6776+ 1389, /* GL_STATIC_COPY */
6777+ 410, /* GL_DYNAMIC_DRAW */
6778+ 412, /* GL_DYNAMIC_READ */
6779+ 408, /* GL_DYNAMIC_COPY */
6780+ 535, /* GL_GL_PIXEL_PACK_BUFFER */
6781+ 537, /* GL_GL_PIXEL_UNPACK_BUFFER */
6782+ 536, /* GL_GL_PIXEL_PACK_BUFFER_BINDING */
6783+ 538, /* GL_GL_PIXEL_UNPACK_BUFFER_BINDING */
6784+ 833, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
6785+ 831, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
6786+ 834, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
6787+ 838, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
6788+ 837, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
6789+ 795, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
6790+ 1419, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
6791+ 17, /* GL_ACTIVE_STENCIL_FACE_EXT */
6792+ 894, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
6793+ 1304, /* GL_SAMPLES_PASSED */
6794+ 486, /* GL_FRAGMENT_SHADER */
6795+ 1724, /* GL_VERTEX_SHADER */
6796+ 1178, /* GL_PROGRAM_OBJECT_ARB */
6797+ 1336, /* GL_SHADER_OBJECT_ARB */
6798+ 819, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
6799+ 877, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
6800+ 871, /* GL_MAX_VARYING_FLOATS */
6801+ 875, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
6802+ 804, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
6803+ 985, /* GL_OBJECT_TYPE_ARB */
6804+ 1338, /* GL_SHADER_TYPE */
6805+ 451, /* GL_FLOAT_VEC2 */
6806+ 453, /* GL_FLOAT_VEC3 */
6807+ 455, /* GL_FLOAT_VEC4 */
6808+ 606, /* GL_INT_VEC2 */
6809+ 608, /* GL_INT_VEC3 */
6810+ 610, /* GL_INT_VEC4 */
6811+ 93, /* GL_BOOL */
6812+ 95, /* GL_BOOL_VEC2 */
6813+ 97, /* GL_BOOL_VEC3 */
6814+ 99, /* GL_BOOL_VEC4 */
6815+ 445, /* GL_FLOAT_MAT2 */
6816+ 447, /* GL_FLOAT_MAT3 */
6817+ 449, /* GL_FLOAT_MAT4 */
6818+ 1295, /* GL_SAMPLER_1D */
6819+ 1297, /* GL_SAMPLER_2D */
6820+ 1299, /* GL_SAMPLER_3D */
6821+ 1300, /* GL_SAMPLER_CUBE */
6822+ 1296, /* GL_SAMPLER_1D_SHADOW */
6823+ 1298, /* GL_SAMPLER_2D_SHADOW */
6824+ 529, /* GL_GL_FLOAT_MAT2x3 */
6825+ 530, /* GL_GL_FLOAT_MAT2x4 */
6826+ 531, /* GL_GL_FLOAT_MAT3x2 */
6827+ 532, /* GL_GL_FLOAT_MAT3x4 */
6828+ 533, /* GL_GL_FLOAT_MAT4x2 */
6829+ 534, /* GL_GL_FLOAT_MAT4x3 */
6830+ 312, /* GL_DELETE_STATUS */
6831+ 221, /* GL_COMPILE_STATUS */
6832+ 659, /* GL_LINK_STATUS */
6833+ 1673, /* GL_VALIDATE_STATUS */
6834+ 591, /* GL_INFO_LOG_LENGTH */
6835+ 56, /* GL_ATTACHED_SHADERS */
6836+ 20, /* GL_ACTIVE_UNIFORMS */
6837+ 21, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
6838+ 1337, /* GL_SHADER_SOURCE_LENGTH */
6839+ 15, /* GL_ACTIVE_ATTRIBUTES */
6840+ 16, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
6841+ 488, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
6842+ 1340, /* GL_SHADING_LANGUAGE_VERSION */
6843+ 290, /* GL_CURRENT_PROGRAM */
6844+ 1034, /* GL_PALETTE4_RGB8_OES */
6845+ 1036, /* GL_PALETTE4_RGBA8_OES */
6846+ 1032, /* GL_PALETTE4_R5_G6_B5_OES */
6847+ 1035, /* GL_PALETTE4_RGBA4_OES */
6848+ 1033, /* GL_PALETTE4_RGB5_A1_OES */
6849+ 1039, /* GL_PALETTE8_RGB8_OES */
6850+ 1041, /* GL_PALETTE8_RGBA8_OES */
6851+ 1037, /* GL_PALETTE8_R5_G6_B5_OES */
6852+ 1040, /* GL_PALETTE8_RGBA4_OES */
6853+ 1038, /* GL_PALETTE8_RGB5_A1_OES */
6854+ 574, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
6855+ 573, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
6856+ 1507, /* GL_TEXTURE_1D_ARRAY_EXT */
6857+ 1198, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
6858+ 1509, /* GL_TEXTURE_2D_ARRAY_EXT */
6859+ 1201, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
6860+ 1515, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
6861+ 1517, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
6862+ 543, /* GL_GL_SRGB */
6863+ 544, /* GL_GL_SRGB8 */
6864+ 546, /* GL_GL_SRGB_ALPHA */
6865+ 545, /* GL_GL_SRGB8_ALPHA8 */
6866+ 542, /* GL_GL_SLUMINANCE_ALPHA */
6867+ 541, /* GL_GL_SLUMINANCE8_ALPHA8 */
6868+ 539, /* GL_GL_SLUMINANCE */
6869+ 540, /* GL_GL_SLUMINANCE8 */
6870+ 526, /* GL_GL_COMPRESSED_SRGB */
6871+ 527, /* GL_GL_COMPRESSED_SRGB_ALPHA */
6872+ 524, /* GL_GL_COMPRESSED_SLUMINANCE */
6873+ 525, /* GL_GL_COMPRESSED_SLUMINANCE_ALPHA */
6874+ 1095, /* GL_POINT_SPRITE_COORD_ORIGIN */
6875+ 667, /* GL_LOWER_LEFT */
6876+ 1670, /* GL_UPPER_LEFT */
6877+ 1401, /* GL_STENCIL_BACK_REF */
6878+ 1402, /* GL_STENCIL_BACK_VALUE_MASK */
6879+ 1403, /* GL_STENCIL_BACK_WRITEMASK */
6880+ 403, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
6881+ 1240, /* GL_RENDERBUFFER_BINDING_EXT */
6882+ 1225, /* GL_READ_FRAMEBUFFER_EXT */
6883+ 404, /* GL_DRAW_FRAMEBUFFER_EXT */
6884+ 1224, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
6885+ 490, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
6886+ 489, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
6887+ 494, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
6888+ 492, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
6889+ 491, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
6890+ 496, /* GL_FRAMEBUFFER_COMPLETE_EXT */
6891+ 498, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
6892+ 503, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
6893+ 501, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
6894+ 499, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
6895+ 502, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
6896+ 500, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
6897+ 504, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
6898+ 506, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
6899+ 505, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
6900+ 801, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
6901+ 146, /* GL_COLOR_ATTACHMENT0_EXT */
6902+ 153, /* GL_COLOR_ATTACHMENT1_EXT */
6903+ 154, /* GL_COLOR_ATTACHMENT2_EXT */
6904+ 155, /* GL_COLOR_ATTACHMENT3_EXT */
6905+ 156, /* GL_COLOR_ATTACHMENT4_EXT */
6906+ 157, /* GL_COLOR_ATTACHMENT5_EXT */
6907+ 158, /* GL_COLOR_ATTACHMENT6_EXT */
6908+ 159, /* GL_COLOR_ATTACHMENT7_EXT */
6909+ 160, /* GL_COLOR_ATTACHMENT8_EXT */
6910+ 161, /* GL_COLOR_ATTACHMENT9_EXT */
6911+ 147, /* GL_COLOR_ATTACHMENT10_EXT */
6912+ 148, /* GL_COLOR_ATTACHMENT11_EXT */
6913+ 149, /* GL_COLOR_ATTACHMENT12_EXT */
6914+ 150, /* GL_COLOR_ATTACHMENT13_EXT */
6915+ 151, /* GL_COLOR_ATTACHMENT14_EXT */
6916+ 152, /* GL_COLOR_ATTACHMENT15_EXT */
6917+ 314, /* GL_DEPTH_ATTACHMENT_EXT */
6918+ 1396, /* GL_STENCIL_ATTACHMENT_EXT */
6919+ 497, /* GL_FRAMEBUFFER_EXT */
6920+ 1241, /* GL_RENDERBUFFER_EXT */
6921+ 1244, /* GL_RENDERBUFFER_WIDTH_EXT */
6922+ 1242, /* GL_RENDERBUFFER_HEIGHT_EXT */
6923+ 1243, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
6924+ 1414, /* GL_STENCIL_INDEX_EXT */
6925+ 1411, /* GL_STENCIL_INDEX1_EXT */
6926+ 1412, /* GL_STENCIL_INDEX4_EXT */
6927+ 1413, /* GL_STENCIL_INDEX8_EXT */
6928+ 1410, /* GL_STENCIL_INDEX16_EXT */
6929+ 428, /* GL_EVAL_BIT */
6930+ 1222, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
6931+ 661, /* GL_LIST_BIT */
6932+ 1523, /* GL_TEXTURE_BIT */
6933+ 1319, /* GL_SCISSOR_BIT */
6934+ 29, /* GL_ALL_ATTRIB_BITS */
6935+ 941, /* GL_MULTISAMPLE_BIT */
6936+ 30, /* GL_ALL_CLIENT_ATTRIB_BITS */
6937+};
6938+
6939+#define Elements(x) sizeof(x)/sizeof(*x)
6940+
6941+typedef int (*cfunc)(const void *, const void *);
6942+
6943+/**
6944+ * Compare a key name to an element in the \c all_enums array.
6945+ *
6946+ * \c bsearch always passes the key as the first parameter and the pointer
6947+ * to the array element as the second parameter. We can elimiate some
6948+ * extra work by taking advantage of that fact.
6949+ *
6950+ * \param a Pointer to the desired enum name.
6951+ * \param b Pointer to an element of the \c all_enums array.
6952+ */
6953+static int compar_name( const char *a, const enum_elt *b )
6954+{
6955+ return _mesa_strcmp( a, & enum_string_table[ b->offset ] );
6956+}
6957+
6958+/**
6959+ * Compare a key enum value to an element in the \c all_enums array.
6960+ *
6961+ * \c bsearch always passes the key as the first parameter and the pointer
6962+ * to the array element as the second parameter. We can elimiate some
6963+ * extra work by taking advantage of that fact.
6964+ *
6965+ * \param a Pointer to the desired enum name.
6966+ * \param b Pointer to an index into the \c all_enums array.
6967+ */
6968+static int compar_nr( const int *a, const unsigned *b )
6969+{
6970+ return a[0] - all_enums[*b].n;
6971+}
6972+
6973+
6974+static char token_tmp[20];
6975+
6976+const char *_mesa_lookup_enum_by_nr( int nr )
6977+{
6978+ unsigned * i;
6979+
6980+ i = (unsigned *)bsearch( & nr, reduced_enums, Elements(reduced_enums),
6981+ sizeof(reduced_enums[0]), (cfunc) compar_nr );
6982+
6983+ if ( i != NULL ) {
6984+ return & enum_string_table[ all_enums[ *i ].offset ];
6985+ }
6986+ else {
6987+ /* this is not re-entrant safe, no big deal here */
6988+ _mesa_sprintf(token_tmp, "0x%x", nr);
6989+ return token_tmp;
6990+ }
6991+}
6992+
6993+int _mesa_lookup_enum_by_name( const char *symbol )
6994+{
6995+ enum_elt * f = NULL;
6996+
6997+ if ( symbol != NULL ) {
6998+ f = (enum_elt *)bsearch( symbol, all_enums, Elements(all_enums),
6999+ sizeof( enum_elt ), (cfunc) compar_name );
7000+ }
7001+
7002+ return (f != NULL) ? f->n : -1;
7003+}
7004+
7005+
7006Index: qemu-0.14.0/target-i386/mesa_get.c
7007===================================================================
7008--- /dev/null
7009+++ qemu-0.14.0/target-i386/mesa_get.c
7010@@ -0,0 +1,5563 @@
7011+
7012+/***
7013+ *** NOTE!!! DO NOT EDIT THIS FILE!!! IT IS GENERATED BY get_gen.py
7014+ ***/
7015+
7016+#include "glheader.h"
7017+#include "context.h"
7018+#include "enable.h"
7019+#include "extensions.h"
7020+#include "fbobject.h"
7021+#include "get.h"
7022+#include "macros.h"
7023+#include "mtypes.h"
7024+#include "state.h"
7025+#include "texcompress.h"
7026+
7027+
7028+#define FLOAT_TO_BOOLEAN(X) ( (X) ? GL_TRUE : GL_FALSE )
7029+
7030+#define INT_TO_BOOLEAN(I) ( (I) ? GL_TRUE : GL_FALSE )
7031+
7032+#define ENUM_TO_BOOLEAN(E) ( (E) ? GL_TRUE : GL_FALSE )
7033+#define ENUM_TO_INT(E) ( (GLint) (E) )
7034+#define ENUM_TO_FLOAT(E) ( (GLfloat) (E) )
7035+
7036+#define BOOLEAN_TO_INT(B) ( (GLint) (B) )
7037+#define BOOLEAN_TO_FLOAT(B) ( (B) ? 1.0F : 0.0F )
7038+
7039+
7040+/*
7041+ * Check if named extension is enabled, if not generate error and return.
7042+ */
7043+#define CHECK_EXT1(EXT1, FUNC) \
7044+ if (!ctx->Extensions.EXT1) { \
7045+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
7046+ return; \
7047+ }
7048+
7049+/*
7050+ * Check if either of two extensions is enabled.
7051+ */
7052+#define CHECK_EXT2(EXT1, EXT2, FUNC) \
7053+ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2) { \
7054+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
7055+ return; \
7056+ }
7057+
7058+/*
7059+ * Check if either of three extensions is enabled.
7060+ */
7061+#define CHECK_EXT3(EXT1, EXT2, EXT3, FUNC) \
7062+ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2 && \
7063+ !ctx->Extensions.EXT3) { \
7064+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
7065+ return; \
7066+ }
7067+
7068+/*
7069+ * Check if either of four extensions is enabled.
7070+ */
7071+#define CHECK_EXT4(EXT1, EXT2, EXT3, EXT4, FUNC) \
7072+ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2 && \
7073+ !ctx->Extensions.EXT3 && !ctx->Extensions.EXT4) { \
7074+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
7075+ return; \
7076+ }
7077+
7078+
7079+void GLAPIENTRY
7080+_mesa_GetBooleanv( GLenum pname, GLboolean *params )
7081+{
7082+ GET_CURRENT_CONTEXT(ctx);
7083+ ASSERT_OUTSIDE_BEGIN_END(ctx);
7084+
7085+ if (!params)
7086+ return;
7087+
7088+ if (ctx->NewState)
7089+ _mesa_update_state(ctx);
7090+
7091+ if (ctx->Driver.GetBooleanv &&
7092+ ctx->Driver.GetBooleanv(ctx, pname, params))
7093+ return;
7094+
7095+ switch (pname) {
7096+ case GL_ACCUM_RED_BITS:
7097+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumRedBits);
7098+ break;
7099+ case GL_ACCUM_GREEN_BITS:
7100+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumGreenBits);
7101+ break;
7102+ case GL_ACCUM_BLUE_BITS:
7103+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumBlueBits);
7104+ break;
7105+ case GL_ACCUM_ALPHA_BITS:
7106+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumAlphaBits);
7107+ break;
7108+ case GL_ACCUM_CLEAR_VALUE:
7109+ params[0] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[0]);
7110+ params[1] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[1]);
7111+ params[2] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[2]);
7112+ params[3] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[3]);
7113+ break;
7114+ case GL_ALPHA_BIAS:
7115+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.AlphaBias);
7116+ break;
7117+ case GL_ALPHA_BITS:
7118+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.alphaBits);
7119+ break;
7120+ case GL_ALPHA_SCALE:
7121+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.AlphaScale);
7122+ break;
7123+ case GL_ALPHA_TEST:
7124+ params[0] = ctx->Color.AlphaEnabled;
7125+ break;
7126+ case GL_ALPHA_TEST_FUNC:
7127+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.AlphaFunc);
7128+ break;
7129+ case GL_ALPHA_TEST_REF:
7130+ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.AlphaRef);
7131+ break;
7132+ case GL_ATTRIB_STACK_DEPTH:
7133+ params[0] = INT_TO_BOOLEAN(ctx->AttribStackDepth);
7134+ break;
7135+ case GL_AUTO_NORMAL:
7136+ params[0] = ctx->Eval.AutoNormal;
7137+ break;
7138+ case GL_AUX_BUFFERS:
7139+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.numAuxBuffers);
7140+ break;
7141+ case GL_BLEND:
7142+ params[0] = ctx->Color.BlendEnabled;
7143+ break;
7144+ case GL_BLEND_DST:
7145+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstRGB);
7146+ break;
7147+ case GL_BLEND_SRC:
7148+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcRGB);
7149+ break;
7150+ case GL_BLEND_SRC_RGB_EXT:
7151+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcRGB);
7152+ break;
7153+ case GL_BLEND_DST_RGB_EXT:
7154+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstRGB);
7155+ break;
7156+ case GL_BLEND_SRC_ALPHA_EXT:
7157+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcA);
7158+ break;
7159+ case GL_BLEND_DST_ALPHA_EXT:
7160+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstA);
7161+ break;
7162+ case GL_BLEND_EQUATION:
7163+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendEquationRGB );
7164+ break;
7165+ case GL_BLEND_EQUATION_ALPHA_EXT:
7166+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendEquationA );
7167+ break;
7168+ case GL_BLEND_COLOR_EXT:
7169+ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[0]);
7170+ params[1] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[1]);
7171+ params[2] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[2]);
7172+ params[3] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[3]);
7173+ break;
7174+ case GL_BLUE_BIAS:
7175+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.BlueBias);
7176+ break;
7177+ case GL_BLUE_BITS:
7178+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.blueBits);
7179+ break;
7180+ case GL_BLUE_SCALE:
7181+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.BlueScale);
7182+ break;
7183+ case GL_CLIENT_ATTRIB_STACK_DEPTH:
7184+ params[0] = INT_TO_BOOLEAN(ctx->ClientAttribStackDepth);
7185+ break;
7186+ case GL_CLIP_PLANE0:
7187+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 0) & 1;
7188+ break;
7189+ case GL_CLIP_PLANE1:
7190+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 1) & 1;
7191+ break;
7192+ case GL_CLIP_PLANE2:
7193+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 2) & 1;
7194+ break;
7195+ case GL_CLIP_PLANE3:
7196+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 3) & 1;
7197+ break;
7198+ case GL_CLIP_PLANE4:
7199+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 4) & 1;
7200+ break;
7201+ case GL_CLIP_PLANE5:
7202+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 5) & 1;
7203+ break;
7204+ case GL_COLOR_CLEAR_VALUE:
7205+ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[0]);
7206+ params[1] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[1]);
7207+ params[2] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[2]);
7208+ params[3] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[3]);
7209+ break;
7210+ case GL_COLOR_MATERIAL:
7211+ params[0] = ctx->Light.ColorMaterialEnabled;
7212+ break;
7213+ case GL_COLOR_MATERIAL_FACE:
7214+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ColorMaterialFace);
7215+ break;
7216+ case GL_COLOR_MATERIAL_PARAMETER:
7217+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ColorMaterialMode);
7218+ break;
7219+ case GL_COLOR_WRITEMASK:
7220+ params[0] = INT_TO_BOOLEAN(ctx->Color.ColorMask[RCOMP] ? 1 : 0);
7221+ params[1] = INT_TO_BOOLEAN(ctx->Color.ColorMask[GCOMP] ? 1 : 0);
7222+ params[2] = INT_TO_BOOLEAN(ctx->Color.ColorMask[BCOMP] ? 1 : 0);
7223+ params[3] = INT_TO_BOOLEAN(ctx->Color.ColorMask[ACOMP] ? 1 : 0);
7224+ break;
7225+ case GL_CULL_FACE:
7226+ params[0] = ctx->Polygon.CullFlag;
7227+ break;
7228+ case GL_CULL_FACE_MODE:
7229+ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.CullFaceMode);
7230+ break;
7231+ case GL_CURRENT_COLOR:
7232+ {
7233+ FLUSH_CURRENT(ctx, 0);
7234+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]);
7235+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]);
7236+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]);
7237+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]);
7238+ }
7239+ break;
7240+ case GL_CURRENT_INDEX:
7241+ {
7242+ FLUSH_CURRENT(ctx, 0);
7243+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]);
7244+ }
7245+ break;
7246+ case GL_CURRENT_NORMAL:
7247+ {
7248+ FLUSH_CURRENT(ctx, 0);
7249+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]);
7250+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]);
7251+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]);
7252+ }
7253+ break;
7254+ case GL_CURRENT_RASTER_COLOR:
7255+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[0]);
7256+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[1]);
7257+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[2]);
7258+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[3]);
7259+ break;
7260+ case GL_CURRENT_RASTER_DISTANCE:
7261+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterDistance);
7262+ break;
7263+ case GL_CURRENT_RASTER_INDEX:
7264+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterIndex);
7265+ break;
7266+ case GL_CURRENT_RASTER_POSITION:
7267+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[0]);
7268+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[1]);
7269+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[2]);
7270+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[3]);
7271+ break;
7272+ case GL_CURRENT_RASTER_SECONDARY_COLOR:
7273+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[0]);
7274+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[1]);
7275+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[2]);
7276+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[3]);
7277+ break;
7278+ case GL_CURRENT_RASTER_TEXTURE_COORDS:
7279+ {
7280+ const GLuint texUnit = ctx->Texture.CurrentUnit;
7281+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][0]);
7282+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][1]);
7283+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][2]);
7284+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][3]);
7285+ }
7286+ break;
7287+ case GL_CURRENT_RASTER_POSITION_VALID:
7288+ params[0] = ctx->Current.RasterPosValid;
7289+ break;
7290+ case GL_CURRENT_TEXTURE_COORDS:
7291+ {
7292+ const GLuint texUnit = ctx->Texture.CurrentUnit;
7293+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]);
7294+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]);
7295+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]);
7296+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]);
7297+ }
7298+ break;
7299+ case GL_DEPTH_BIAS:
7300+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.DepthBias);
7301+ break;
7302+ case GL_DEPTH_BITS:
7303+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.depthBits);
7304+ break;
7305+ case GL_DEPTH_CLEAR_VALUE:
7306+ params[0] = FLOAT_TO_BOOLEAN(ctx->Depth.Clear);
7307+ break;
7308+ case GL_DEPTH_FUNC:
7309+ params[0] = ENUM_TO_BOOLEAN(ctx->Depth.Func);
7310+ break;
7311+ case GL_DEPTH_RANGE:
7312+ params[0] = FLOAT_TO_BOOLEAN(ctx->Viewport.Near);
7313+ params[1] = FLOAT_TO_BOOLEAN(ctx->Viewport.Far);
7314+ break;
7315+ case GL_DEPTH_SCALE:
7316+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.DepthScale);
7317+ break;
7318+ case GL_DEPTH_TEST:
7319+ params[0] = ctx->Depth.Test;
7320+ break;
7321+ case GL_DEPTH_WRITEMASK:
7322+ params[0] = ctx->Depth.Mask;
7323+ break;
7324+ case GL_DITHER:
7325+ params[0] = ctx->Color.DitherFlag;
7326+ break;
7327+ case GL_DOUBLEBUFFER:
7328+ params[0] = ctx->DrawBuffer->Visual.doubleBufferMode;
7329+ break;
7330+ case GL_DRAW_BUFFER:
7331+ params[0] = ENUM_TO_BOOLEAN(ctx->DrawBuffer->ColorDrawBuffer[0]);
7332+ break;
7333+ case GL_EDGE_FLAG:
7334+ {
7335+ FLUSH_CURRENT(ctx, 0);
7336+ params[0] = ctx->Current.EdgeFlag;
7337+ }
7338+ break;
7339+ case GL_FEEDBACK_BUFFER_SIZE:
7340+ params[0] = INT_TO_BOOLEAN(ctx->Feedback.BufferSize);
7341+ break;
7342+ case GL_FEEDBACK_BUFFER_TYPE:
7343+ params[0] = ENUM_TO_BOOLEAN(ctx->Feedback.Type);
7344+ break;
7345+ case GL_FOG:
7346+ params[0] = ctx->Fog.Enabled;
7347+ break;
7348+ case GL_FOG_COLOR:
7349+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[0]);
7350+ params[1] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[1]);
7351+ params[2] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[2]);
7352+ params[3] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[3]);
7353+ break;
7354+ case GL_FOG_DENSITY:
7355+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Density);
7356+ break;
7357+ case GL_FOG_END:
7358+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.End);
7359+ break;
7360+ case GL_FOG_HINT:
7361+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.Fog);
7362+ break;
7363+ case GL_FOG_INDEX:
7364+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Index);
7365+ break;
7366+ case GL_FOG_MODE:
7367+ params[0] = ENUM_TO_BOOLEAN(ctx->Fog.Mode);
7368+ break;
7369+ case GL_FOG_START:
7370+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Start);
7371+ break;
7372+ case GL_FRONT_FACE:
7373+ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.FrontFace);
7374+ break;
7375+ case GL_GREEN_BIAS:
7376+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.GreenBias);
7377+ break;
7378+ case GL_GREEN_BITS:
7379+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.greenBits);
7380+ break;
7381+ case GL_GREEN_SCALE:
7382+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.GreenScale);
7383+ break;
7384+ case GL_INDEX_BITS:
7385+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.indexBits);
7386+ break;
7387+ case GL_INDEX_CLEAR_VALUE:
7388+ params[0] = INT_TO_BOOLEAN(ctx->Color.ClearIndex);
7389+ break;
7390+ case GL_INDEX_MODE:
7391+ params[0] = !ctx->DrawBuffer->Visual.rgbMode;
7392+ break;
7393+ case GL_INDEX_OFFSET:
7394+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.IndexOffset);
7395+ break;
7396+ case GL_INDEX_SHIFT:
7397+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.IndexShift);
7398+ break;
7399+ case GL_INDEX_WRITEMASK:
7400+ params[0] = INT_TO_BOOLEAN(ctx->Color.IndexMask);
7401+ break;
7402+ case GL_LIGHT0:
7403+ params[0] = ctx->Light.Light[0].Enabled;
7404+ break;
7405+ case GL_LIGHT1:
7406+ params[0] = ctx->Light.Light[1].Enabled;
7407+ break;
7408+ case GL_LIGHT2:
7409+ params[0] = ctx->Light.Light[2].Enabled;
7410+ break;
7411+ case GL_LIGHT3:
7412+ params[0] = ctx->Light.Light[3].Enabled;
7413+ break;
7414+ case GL_LIGHT4:
7415+ params[0] = ctx->Light.Light[4].Enabled;
7416+ break;
7417+ case GL_LIGHT5:
7418+ params[0] = ctx->Light.Light[5].Enabled;
7419+ break;
7420+ case GL_LIGHT6:
7421+ params[0] = ctx->Light.Light[6].Enabled;
7422+ break;
7423+ case GL_LIGHT7:
7424+ params[0] = ctx->Light.Light[7].Enabled;
7425+ break;
7426+ case GL_LIGHTING:
7427+ params[0] = ctx->Light.Enabled;
7428+ break;
7429+ case GL_LIGHT_MODEL_AMBIENT:
7430+ params[0] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[0]);
7431+ params[1] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[1]);
7432+ params[2] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[2]);
7433+ params[3] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[3]);
7434+ break;
7435+ case GL_LIGHT_MODEL_COLOR_CONTROL:
7436+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.Model.ColorControl);
7437+ break;
7438+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
7439+ params[0] = ctx->Light.Model.LocalViewer;
7440+ break;
7441+ case GL_LIGHT_MODEL_TWO_SIDE:
7442+ params[0] = ctx->Light.Model.TwoSide;
7443+ break;
7444+ case GL_LINE_SMOOTH:
7445+ params[0] = ctx->Line.SmoothFlag;
7446+ break;
7447+ case GL_LINE_SMOOTH_HINT:
7448+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.LineSmooth);
7449+ break;
7450+ case GL_LINE_STIPPLE:
7451+ params[0] = ctx->Line.StippleFlag;
7452+ break;
7453+ case GL_LINE_STIPPLE_PATTERN:
7454+ params[0] = INT_TO_BOOLEAN(ctx->Line.StipplePattern);
7455+ break;
7456+ case GL_LINE_STIPPLE_REPEAT:
7457+ params[0] = INT_TO_BOOLEAN(ctx->Line.StippleFactor);
7458+ break;
7459+ case GL_LINE_WIDTH:
7460+ params[0] = FLOAT_TO_BOOLEAN(ctx->Line.Width);
7461+ break;
7462+ case GL_LINE_WIDTH_GRANULARITY:
7463+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.LineWidthGranularity);
7464+ break;
7465+ case GL_LINE_WIDTH_RANGE:
7466+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinLineWidthAA);
7467+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxLineWidthAA);
7468+ break;
7469+ case GL_ALIASED_LINE_WIDTH_RANGE:
7470+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinLineWidth);
7471+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxLineWidth);
7472+ break;
7473+ case GL_LIST_BASE:
7474+ params[0] = INT_TO_BOOLEAN(ctx->List.ListBase);
7475+ break;
7476+ case GL_LIST_INDEX:
7477+ params[0] = INT_TO_BOOLEAN(ctx->ListState.CurrentListNum);
7478+ break;
7479+ case GL_LIST_MODE:
7480+ {
7481+ GLenum mode;
7482+ if (!ctx->CompileFlag)
7483+ mode = 0;
7484+ else if (ctx->ExecuteFlag)
7485+ mode = GL_COMPILE_AND_EXECUTE;
7486+ else
7487+ mode = GL_COMPILE;
7488+ params[0] = ENUM_TO_BOOLEAN(mode);
7489+ }
7490+ break;
7491+ case GL_INDEX_LOGIC_OP:
7492+ params[0] = ctx->Color.IndexLogicOpEnabled;
7493+ break;
7494+ case GL_COLOR_LOGIC_OP:
7495+ params[0] = ctx->Color.ColorLogicOpEnabled;
7496+ break;
7497+ case GL_LOGIC_OP_MODE:
7498+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.LogicOp);
7499+ break;
7500+ case GL_MAP1_COLOR_4:
7501+ params[0] = ctx->Eval.Map1Color4;
7502+ break;
7503+ case GL_MAP1_GRID_DOMAIN:
7504+ params[0] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid1u1);
7505+ params[1] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid1u2);
7506+ break;
7507+ case GL_MAP1_GRID_SEGMENTS:
7508+ params[0] = INT_TO_BOOLEAN(ctx->Eval.MapGrid1un);
7509+ break;
7510+ case GL_MAP1_INDEX:
7511+ params[0] = ctx->Eval.Map1Index;
7512+ break;
7513+ case GL_MAP1_NORMAL:
7514+ params[0] = ctx->Eval.Map1Normal;
7515+ break;
7516+ case GL_MAP1_TEXTURE_COORD_1:
7517+ params[0] = ctx->Eval.Map1TextureCoord1;
7518+ break;
7519+ case GL_MAP1_TEXTURE_COORD_2:
7520+ params[0] = ctx->Eval.Map1TextureCoord2;
7521+ break;
7522+ case GL_MAP1_TEXTURE_COORD_3:
7523+ params[0] = ctx->Eval.Map1TextureCoord3;
7524+ break;
7525+ case GL_MAP1_TEXTURE_COORD_4:
7526+ params[0] = ctx->Eval.Map1TextureCoord4;
7527+ break;
7528+ case GL_MAP1_VERTEX_3:
7529+ params[0] = ctx->Eval.Map1Vertex3;
7530+ break;
7531+ case GL_MAP1_VERTEX_4:
7532+ params[0] = ctx->Eval.Map1Vertex4;
7533+ break;
7534+ case GL_MAP2_COLOR_4:
7535+ params[0] = ctx->Eval.Map2Color4;
7536+ break;
7537+ case GL_MAP2_GRID_DOMAIN:
7538+ params[0] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2u1);
7539+ params[1] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2u2);
7540+ params[2] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2v1);
7541+ params[3] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2v2);
7542+ break;
7543+ case GL_MAP2_GRID_SEGMENTS:
7544+ params[0] = INT_TO_BOOLEAN(ctx->Eval.MapGrid2un);
7545+ params[1] = INT_TO_BOOLEAN(ctx->Eval.MapGrid2vn);
7546+ break;
7547+ case GL_MAP2_INDEX:
7548+ params[0] = ctx->Eval.Map2Index;
7549+ break;
7550+ case GL_MAP2_NORMAL:
7551+ params[0] = ctx->Eval.Map2Normal;
7552+ break;
7553+ case GL_MAP2_TEXTURE_COORD_1:
7554+ params[0] = ctx->Eval.Map2TextureCoord1;
7555+ break;
7556+ case GL_MAP2_TEXTURE_COORD_2:
7557+ params[0] = ctx->Eval.Map2TextureCoord2;
7558+ break;
7559+ case GL_MAP2_TEXTURE_COORD_3:
7560+ params[0] = ctx->Eval.Map2TextureCoord3;
7561+ break;
7562+ case GL_MAP2_TEXTURE_COORD_4:
7563+ params[0] = ctx->Eval.Map2TextureCoord4;
7564+ break;
7565+ case GL_MAP2_VERTEX_3:
7566+ params[0] = ctx->Eval.Map2Vertex3;
7567+ break;
7568+ case GL_MAP2_VERTEX_4:
7569+ params[0] = ctx->Eval.Map2Vertex4;
7570+ break;
7571+ case GL_MAP_COLOR:
7572+ params[0] = ctx->Pixel.MapColorFlag;
7573+ break;
7574+ case GL_MAP_STENCIL:
7575+ params[0] = ctx->Pixel.MapStencilFlag;
7576+ break;
7577+ case GL_MATRIX_MODE:
7578+ params[0] = ENUM_TO_BOOLEAN(ctx->Transform.MatrixMode);
7579+ break;
7580+ case GL_MAX_ATTRIB_STACK_DEPTH:
7581+ params[0] = INT_TO_BOOLEAN(MAX_ATTRIB_STACK_DEPTH);
7582+ break;
7583+ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
7584+ params[0] = INT_TO_BOOLEAN(MAX_CLIENT_ATTRIB_STACK_DEPTH);
7585+ break;
7586+ case GL_MAX_CLIP_PLANES:
7587+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxClipPlanes);
7588+ break;
7589+ case GL_MAX_ELEMENTS_VERTICES:
7590+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxArrayLockSize);
7591+ break;
7592+ case GL_MAX_ELEMENTS_INDICES:
7593+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxArrayLockSize);
7594+ break;
7595+ case GL_MAX_EVAL_ORDER:
7596+ params[0] = INT_TO_BOOLEAN(MAX_EVAL_ORDER);
7597+ break;
7598+ case GL_MAX_LIGHTS:
7599+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxLights);
7600+ break;
7601+ case GL_MAX_LIST_NESTING:
7602+ params[0] = INT_TO_BOOLEAN(MAX_LIST_NESTING);
7603+ break;
7604+ case GL_MAX_MODELVIEW_STACK_DEPTH:
7605+ params[0] = INT_TO_BOOLEAN(MAX_MODELVIEW_STACK_DEPTH);
7606+ break;
7607+ case GL_MAX_NAME_STACK_DEPTH:
7608+ params[0] = INT_TO_BOOLEAN(MAX_NAME_STACK_DEPTH);
7609+ break;
7610+ case GL_MAX_PIXEL_MAP_TABLE:
7611+ params[0] = INT_TO_BOOLEAN(MAX_PIXEL_MAP_TABLE);
7612+ break;
7613+ case GL_MAX_PROJECTION_STACK_DEPTH:
7614+ params[0] = INT_TO_BOOLEAN(MAX_PROJECTION_STACK_DEPTH);
7615+ break;
7616+ case GL_MAX_TEXTURE_SIZE:
7617+ params[0] = INT_TO_BOOLEAN(1 << (ctx->Const.MaxTextureLevels - 1));
7618+ break;
7619+ case GL_MAX_3D_TEXTURE_SIZE:
7620+ params[0] = INT_TO_BOOLEAN(1 << (ctx->Const.Max3DTextureLevels - 1));
7621+ break;
7622+ case GL_MAX_TEXTURE_STACK_DEPTH:
7623+ params[0] = INT_TO_BOOLEAN(MAX_TEXTURE_STACK_DEPTH);
7624+ break;
7625+ case GL_MAX_VIEWPORT_DIMS:
7626+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxViewportWidth);
7627+ params[1] = INT_TO_BOOLEAN(ctx->Const.MaxViewportHeight);
7628+ break;
7629+ case GL_MODELVIEW_MATRIX:
7630+ {
7631+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
7632+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7633+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
7634+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
7635+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
7636+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
7637+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7638+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
7639+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
7640+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
7641+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
7642+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7643+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
7644+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
7645+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
7646+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
7647+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7648+ }
7649+ break;
7650+ case GL_MODELVIEW_STACK_DEPTH:
7651+ params[0] = INT_TO_BOOLEAN(ctx->ModelviewMatrixStack.Depth + 1);
7652+ break;
7653+ case GL_NAME_STACK_DEPTH:
7654+ params[0] = INT_TO_BOOLEAN(ctx->Select.NameStackDepth);
7655+ break;
7656+ case GL_NORMALIZE:
7657+ params[0] = ctx->Transform.Normalize;
7658+ break;
7659+ case GL_PACK_ALIGNMENT:
7660+ params[0] = INT_TO_BOOLEAN(ctx->Pack.Alignment);
7661+ break;
7662+ case GL_PACK_LSB_FIRST:
7663+ params[0] = ctx->Pack.LsbFirst;
7664+ break;
7665+ case GL_PACK_ROW_LENGTH:
7666+ params[0] = INT_TO_BOOLEAN(ctx->Pack.RowLength);
7667+ break;
7668+ case GL_PACK_SKIP_PIXELS:
7669+ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipPixels);
7670+ break;
7671+ case GL_PACK_SKIP_ROWS:
7672+ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipRows);
7673+ break;
7674+ case GL_PACK_SWAP_BYTES:
7675+ params[0] = ctx->Pack.SwapBytes;
7676+ break;
7677+ case GL_PACK_SKIP_IMAGES_EXT:
7678+ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipImages);
7679+ break;
7680+ case GL_PACK_IMAGE_HEIGHT_EXT:
7681+ params[0] = INT_TO_BOOLEAN(ctx->Pack.ImageHeight);
7682+ break;
7683+ case GL_PACK_INVERT_MESA:
7684+ params[0] = ctx->Pack.Invert;
7685+ break;
7686+ case GL_PERSPECTIVE_CORRECTION_HINT:
7687+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PerspectiveCorrection);
7688+ break;
7689+ case GL_PIXEL_MAP_A_TO_A_SIZE:
7690+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapAtoAsize);
7691+ break;
7692+ case GL_PIXEL_MAP_B_TO_B_SIZE:
7693+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapBtoBsize);
7694+ break;
7695+ case GL_PIXEL_MAP_G_TO_G_SIZE:
7696+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapGtoGsize);
7697+ break;
7698+ case GL_PIXEL_MAP_I_TO_A_SIZE:
7699+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoAsize);
7700+ break;
7701+ case GL_PIXEL_MAP_I_TO_B_SIZE:
7702+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoBsize);
7703+ break;
7704+ case GL_PIXEL_MAP_I_TO_G_SIZE:
7705+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoGsize);
7706+ break;
7707+ case GL_PIXEL_MAP_I_TO_I_SIZE:
7708+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoIsize);
7709+ break;
7710+ case GL_PIXEL_MAP_I_TO_R_SIZE:
7711+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoRsize);
7712+ break;
7713+ case GL_PIXEL_MAP_R_TO_R_SIZE:
7714+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapRtoRsize);
7715+ break;
7716+ case GL_PIXEL_MAP_S_TO_S_SIZE:
7717+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapStoSsize);
7718+ break;
7719+ case GL_POINT_SIZE:
7720+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Size);
7721+ break;
7722+ case GL_POINT_SIZE_GRANULARITY:
7723+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.PointSizeGranularity);
7724+ break;
7725+ case GL_POINT_SIZE_RANGE:
7726+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinPointSizeAA);
7727+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxPointSizeAA);
7728+ break;
7729+ case GL_ALIASED_POINT_SIZE_RANGE:
7730+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinPointSize);
7731+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxPointSize);
7732+ break;
7733+ case GL_POINT_SMOOTH:
7734+ params[0] = ctx->Point.SmoothFlag;
7735+ break;
7736+ case GL_POINT_SMOOTH_HINT:
7737+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PointSmooth);
7738+ break;
7739+ case GL_POINT_SIZE_MIN_EXT:
7740+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.MinSize);
7741+ break;
7742+ case GL_POINT_SIZE_MAX_EXT:
7743+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.MaxSize);
7744+ break;
7745+ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
7746+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Threshold);
7747+ break;
7748+ case GL_DISTANCE_ATTENUATION_EXT:
7749+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Params[0]);
7750+ params[1] = FLOAT_TO_BOOLEAN(ctx->Point.Params[1]);
7751+ params[2] = FLOAT_TO_BOOLEAN(ctx->Point.Params[2]);
7752+ break;
7753+ case GL_POLYGON_MODE:
7754+ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.FrontMode);
7755+ params[1] = ENUM_TO_BOOLEAN(ctx->Polygon.BackMode);
7756+ break;
7757+ case GL_POLYGON_OFFSET_BIAS_EXT:
7758+ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetUnits);
7759+ break;
7760+ case GL_POLYGON_OFFSET_FACTOR:
7761+ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetFactor );
7762+ break;
7763+ case GL_POLYGON_OFFSET_UNITS:
7764+ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetUnits );
7765+ break;
7766+ case GL_POLYGON_SMOOTH:
7767+ params[0] = ctx->Polygon.SmoothFlag;
7768+ break;
7769+ case GL_POLYGON_SMOOTH_HINT:
7770+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PolygonSmooth);
7771+ break;
7772+ case GL_POLYGON_STIPPLE:
7773+ params[0] = ctx->Polygon.StippleFlag;
7774+ break;
7775+ case GL_PROJECTION_MATRIX:
7776+ {
7777+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
7778+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7779+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
7780+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
7781+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
7782+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
7783+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7784+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
7785+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
7786+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
7787+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
7788+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7789+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
7790+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
7791+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
7792+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
7793+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7794+ }
7795+ break;
7796+ case GL_PROJECTION_STACK_DEPTH:
7797+ params[0] = INT_TO_BOOLEAN(ctx->ProjectionMatrixStack.Depth + 1);
7798+ break;
7799+ case GL_READ_BUFFER:
7800+ params[0] = ENUM_TO_BOOLEAN(ctx->ReadBuffer->ColorReadBuffer);
7801+ break;
7802+ case GL_RED_BIAS:
7803+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.RedBias);
7804+ break;
7805+ case GL_RED_BITS:
7806+ params[0] = INT_TO_BOOLEAN( ctx->DrawBuffer->Visual.redBits );
7807+ break;
7808+ case GL_RED_SCALE:
7809+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.RedScale);
7810+ break;
7811+ case GL_RENDER_MODE:
7812+ params[0] = ENUM_TO_BOOLEAN(ctx->RenderMode);
7813+ break;
7814+ case GL_RESCALE_NORMAL:
7815+ params[0] = ctx->Transform.RescaleNormals;
7816+ break;
7817+ case GL_RGBA_MODE:
7818+ params[0] = ctx->DrawBuffer->Visual.rgbMode;
7819+ break;
7820+ case GL_SCISSOR_BOX:
7821+ params[0] = INT_TO_BOOLEAN(ctx->Scissor.X);
7822+ params[1] = INT_TO_BOOLEAN(ctx->Scissor.Y);
7823+ params[2] = INT_TO_BOOLEAN(ctx->Scissor.Width);
7824+ params[3] = INT_TO_BOOLEAN(ctx->Scissor.Height);
7825+ break;
7826+ case GL_SCISSOR_TEST:
7827+ params[0] = ctx->Scissor.Enabled;
7828+ break;
7829+ case GL_SELECTION_BUFFER_SIZE:
7830+ params[0] = INT_TO_BOOLEAN(ctx->Select.BufferSize);
7831+ break;
7832+ case GL_SHADE_MODEL:
7833+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ShadeModel);
7834+ break;
7835+ case GL_SHARED_TEXTURE_PALETTE_EXT:
7836+ params[0] = ctx->Texture.SharedPalette;
7837+ break;
7838+ case GL_STENCIL_BITS:
7839+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.stencilBits);
7840+ break;
7841+ case GL_STENCIL_CLEAR_VALUE:
7842+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Clear);
7843+ break;
7844+ case GL_STENCIL_FAIL:
7845+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
7846+ break;
7847+ case GL_STENCIL_FUNC:
7848+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
7849+ break;
7850+ case GL_STENCIL_PASS_DEPTH_FAIL:
7851+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
7852+ break;
7853+ case GL_STENCIL_PASS_DEPTH_PASS:
7854+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
7855+ break;
7856+ case GL_STENCIL_REF:
7857+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Ref[ctx->Stencil.ActiveFace]);
7858+ break;
7859+ case GL_STENCIL_TEST:
7860+ params[0] = ctx->Stencil.Enabled;
7861+ break;
7862+ case GL_STENCIL_VALUE_MASK:
7863+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]);
7864+ break;
7865+ case GL_STENCIL_WRITEMASK:
7866+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]);
7867+ break;
7868+ case GL_STEREO:
7869+ params[0] = ctx->DrawBuffer->Visual.stereoMode;
7870+ break;
7871+ case GL_SUBPIXEL_BITS:
7872+ params[0] = INT_TO_BOOLEAN(ctx->Const.SubPixelBits);
7873+ break;
7874+ case GL_TEXTURE_1D:
7875+ params[0] = _mesa_IsEnabled(GL_TEXTURE_1D);
7876+ break;
7877+ case GL_TEXTURE_2D:
7878+ params[0] = _mesa_IsEnabled(GL_TEXTURE_2D);
7879+ break;
7880+ case GL_TEXTURE_3D:
7881+ params[0] = _mesa_IsEnabled(GL_TEXTURE_3D);
7882+ break;
7883+ case GL_TEXTURE_BINDING_1D:
7884+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name);
7885+ break;
7886+ case GL_TEXTURE_BINDING_2D:
7887+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name);
7888+ break;
7889+ case GL_TEXTURE_BINDING_3D:
7890+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name);
7891+ break;
7892+ case GL_TEXTURE_ENV_COLOR:
7893+ {
7894+ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
7895+ params[0] = FLOAT_TO_BOOLEAN(color[0]);
7896+ params[1] = FLOAT_TO_BOOLEAN(color[1]);
7897+ params[2] = FLOAT_TO_BOOLEAN(color[2]);
7898+ params[3] = FLOAT_TO_BOOLEAN(color[3]);
7899+ }
7900+ break;
7901+ case GL_TEXTURE_ENV_MODE:
7902+ params[0] = ENUM_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
7903+ break;
7904+ case GL_TEXTURE_GEN_S:
7905+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0);
7906+ break;
7907+ case GL_TEXTURE_GEN_T:
7908+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0);
7909+ break;
7910+ case GL_TEXTURE_GEN_R:
7911+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0);
7912+ break;
7913+ case GL_TEXTURE_GEN_Q:
7914+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0);
7915+ break;
7916+ case GL_TEXTURE_MATRIX:
7917+ {
7918+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
7919+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7920+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
7921+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
7922+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
7923+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
7924+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7925+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
7926+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
7927+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
7928+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
7929+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7930+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
7931+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
7932+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
7933+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
7934+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7935+ }
7936+ break;
7937+ case GL_TEXTURE_STACK_DEPTH:
7938+ params[0] = INT_TO_BOOLEAN(ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1);
7939+ break;
7940+ case GL_UNPACK_ALIGNMENT:
7941+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.Alignment);
7942+ break;
7943+ case GL_UNPACK_LSB_FIRST:
7944+ params[0] = ctx->Unpack.LsbFirst;
7945+ break;
7946+ case GL_UNPACK_ROW_LENGTH:
7947+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.RowLength);
7948+ break;
7949+ case GL_UNPACK_SKIP_PIXELS:
7950+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipPixels);
7951+ break;
7952+ case GL_UNPACK_SKIP_ROWS:
7953+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipRows);
7954+ break;
7955+ case GL_UNPACK_SWAP_BYTES:
7956+ params[0] = ctx->Unpack.SwapBytes;
7957+ break;
7958+ case GL_UNPACK_SKIP_IMAGES_EXT:
7959+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipImages);
7960+ break;
7961+ case GL_UNPACK_IMAGE_HEIGHT_EXT:
7962+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.ImageHeight);
7963+ break;
7964+ case GL_UNPACK_CLIENT_STORAGE_APPLE:
7965+ params[0] = ctx->Unpack.ClientStorage;
7966+ break;
7967+ case GL_VIEWPORT:
7968+ params[0] = INT_TO_BOOLEAN(ctx->Viewport.X);
7969+ params[1] = INT_TO_BOOLEAN(ctx->Viewport.Y);
7970+ params[2] = INT_TO_BOOLEAN(ctx->Viewport.Width);
7971+ params[3] = INT_TO_BOOLEAN(ctx->Viewport.Height);
7972+ break;
7973+ case GL_ZOOM_X:
7974+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.ZoomX);
7975+ break;
7976+ case GL_ZOOM_Y:
7977+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.ZoomY);
7978+ break;
7979+ case GL_VERTEX_ARRAY:
7980+ params[0] = ctx->Array.ArrayObj->Vertex.Enabled;
7981+ break;
7982+ case GL_VERTEX_ARRAY_SIZE:
7983+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Size);
7984+ break;
7985+ case GL_VERTEX_ARRAY_TYPE:
7986+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Type);
7987+ break;
7988+ case GL_VERTEX_ARRAY_STRIDE:
7989+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Stride);
7990+ break;
7991+ case GL_VERTEX_ARRAY_COUNT_EXT:
7992+ params[0] = INT_TO_BOOLEAN(0);
7993+ break;
7994+ case GL_NORMAL_ARRAY:
7995+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Enabled);
7996+ break;
7997+ case GL_NORMAL_ARRAY_TYPE:
7998+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Type);
7999+ break;
8000+ case GL_NORMAL_ARRAY_STRIDE:
8001+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Stride);
8002+ break;
8003+ case GL_NORMAL_ARRAY_COUNT_EXT:
8004+ params[0] = INT_TO_BOOLEAN(0);
8005+ break;
8006+ case GL_COLOR_ARRAY:
8007+ params[0] = ctx->Array.ArrayObj->Color.Enabled;
8008+ break;
8009+ case GL_COLOR_ARRAY_SIZE:
8010+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Size);
8011+ break;
8012+ case GL_COLOR_ARRAY_TYPE:
8013+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Type);
8014+ break;
8015+ case GL_COLOR_ARRAY_STRIDE:
8016+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Stride);
8017+ break;
8018+ case GL_COLOR_ARRAY_COUNT_EXT:
8019+ params[0] = INT_TO_BOOLEAN(0);
8020+ break;
8021+ case GL_INDEX_ARRAY:
8022+ params[0] = ctx->Array.ArrayObj->Index.Enabled;
8023+ break;
8024+ case GL_INDEX_ARRAY_TYPE:
8025+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Index.Type);
8026+ break;
8027+ case GL_INDEX_ARRAY_STRIDE:
8028+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Index.Stride);
8029+ break;
8030+ case GL_INDEX_ARRAY_COUNT_EXT:
8031+ params[0] = INT_TO_BOOLEAN(0);
8032+ break;
8033+ case GL_TEXTURE_COORD_ARRAY:
8034+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled;
8035+ break;
8036+ case GL_TEXTURE_COORD_ARRAY_SIZE:
8037+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
8038+ break;
8039+ case GL_TEXTURE_COORD_ARRAY_TYPE:
8040+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
8041+ break;
8042+ case GL_TEXTURE_COORD_ARRAY_STRIDE:
8043+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
8044+ break;
8045+ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
8046+ params[0] = INT_TO_BOOLEAN(0);
8047+ break;
8048+ case GL_EDGE_FLAG_ARRAY:
8049+ params[0] = ctx->Array.ArrayObj->EdgeFlag.Enabled;
8050+ break;
8051+ case GL_EDGE_FLAG_ARRAY_STRIDE:
8052+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->EdgeFlag.Stride);
8053+ break;
8054+ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
8055+ params[0] = INT_TO_BOOLEAN(0);
8056+ break;
8057+ case GL_MAX_TEXTURE_UNITS_ARB:
8058+ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
8059+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureUnits);
8060+ break;
8061+ case GL_ACTIVE_TEXTURE_ARB:
8062+ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
8063+ params[0] = INT_TO_BOOLEAN(GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit);
8064+ break;
8065+ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
8066+ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
8067+ params[0] = INT_TO_BOOLEAN(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
8068+ break;
8069+ case GL_TEXTURE_CUBE_MAP_ARB:
8070+ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
8071+ params[0] = _mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB);
8072+ break;
8073+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
8074+ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
8075+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name);
8076+ break;
8077+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
8078+ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
8079+ params[0] = INT_TO_BOOLEAN((1 << (ctx->Const.MaxCubeTextureLevels - 1)));
8080+ break;
8081+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
8082+ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
8083+ params[0] = INT_TO_BOOLEAN(ctx->Hint.TextureCompression);
8084+ break;
8085+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
8086+ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
8087+ params[0] = INT_TO_BOOLEAN(_mesa_get_compressed_formats(ctx, NULL, GL_FALSE));
8088+ break;
8089+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
8090+ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
8091+ {
8092+ GLint formats[100];
8093+ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
8094+ ASSERT(n <= 100);
8095+ for (i = 0; i < n; i++)
8096+ params[i] = ENUM_TO_INT(formats[i]);
8097+ }
8098+ break;
8099+ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
8100+ CHECK_EXT1(EXT_compiled_vertex_array, "GetBooleanv");
8101+ params[0] = INT_TO_BOOLEAN(ctx->Array.LockFirst);
8102+ break;
8103+ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
8104+ CHECK_EXT1(EXT_compiled_vertex_array, "GetBooleanv");
8105+ params[0] = INT_TO_BOOLEAN(ctx->Array.LockCount);
8106+ break;
8107+ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
8108+ {
8109+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
8110+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8111+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8112+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8113+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8114+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8115+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8116+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8117+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8118+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8119+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8120+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8121+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8122+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8123+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8124+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8125+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8126+ }
8127+ break;
8128+ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
8129+ {
8130+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
8131+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8132+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8133+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8134+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8135+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8136+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8137+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8138+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8139+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8140+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8141+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8142+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8143+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8144+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8145+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8146+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8147+ }
8148+ break;
8149+ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
8150+ {
8151+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
8152+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8153+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8154+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8155+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8156+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8157+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8158+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8159+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8160+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8161+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8162+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8163+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8164+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8165+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8166+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8167+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8168+ }
8169+ break;
8170+ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
8171+ {
8172+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
8173+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8174+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8175+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8176+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8177+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8178+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8179+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8180+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8181+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8182+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8183+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8184+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8185+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8186+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8187+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8188+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8189+ }
8190+ break;
8191+ case GL_COLOR_MATRIX_SGI:
8192+ {
8193+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
8194+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8195+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
8196+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
8197+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
8198+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
8199+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8200+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
8201+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
8202+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
8203+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
8204+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8205+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
8206+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
8207+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
8208+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
8209+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8210+ }
8211+ break;
8212+ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
8213+ params[0] = INT_TO_BOOLEAN(ctx->ColorMatrixStack.Depth + 1);
8214+ break;
8215+ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
8216+ params[0] = INT_TO_BOOLEAN(MAX_COLOR_STACK_DEPTH);
8217+ break;
8218+ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
8219+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[0]);
8220+ break;
8221+ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
8222+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[1]);
8223+ break;
8224+ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
8225+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[2]);
8226+ break;
8227+ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
8228+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[3]);
8229+ break;
8230+ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
8231+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[0]);
8232+ break;
8233+ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
8234+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[1]);
8235+ break;
8236+ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
8237+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[2]);
8238+ break;
8239+ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
8240+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[3]);
8241+ break;
8242+ case GL_CONVOLUTION_1D_EXT:
8243+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8244+ params[0] = ctx->Pixel.Convolution1DEnabled;
8245+ break;
8246+ case GL_CONVOLUTION_2D_EXT:
8247+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8248+ params[0] = ctx->Pixel.Convolution2DEnabled;
8249+ break;
8250+ case GL_SEPARABLE_2D_EXT:
8251+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8252+ params[0] = ctx->Pixel.Separable2DEnabled;
8253+ break;
8254+ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
8255+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8256+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[0]);
8257+ break;
8258+ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
8259+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8260+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[1]);
8261+ break;
8262+ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
8263+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8264+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[2]);
8265+ break;
8266+ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
8267+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8268+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[3]);
8269+ break;
8270+ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
8271+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8272+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[0]);
8273+ break;
8274+ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
8275+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8276+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[1]);
8277+ break;
8278+ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
8279+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8280+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[2]);
8281+ break;
8282+ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
8283+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8284+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[3]);
8285+ break;
8286+ case GL_HISTOGRAM:
8287+ CHECK_EXT1(EXT_histogram, "GetBooleanv");
8288+ params[0] = ctx->Pixel.HistogramEnabled;
8289+ break;
8290+ case GL_MINMAX:
8291+ CHECK_EXT1(EXT_histogram, "GetBooleanv");
8292+ params[0] = ctx->Pixel.MinMaxEnabled;
8293+ break;
8294+ case GL_COLOR_TABLE_SGI:
8295+ CHECK_EXT1(SGI_color_table, "GetBooleanv");
8296+ params[0] = ctx->Pixel.ColorTableEnabled;
8297+ break;
8298+ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
8299+ CHECK_EXT1(SGI_color_table, "GetBooleanv");
8300+ params[0] = ctx->Pixel.PostConvolutionColorTableEnabled;
8301+ break;
8302+ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
8303+ CHECK_EXT1(SGI_color_table, "GetBooleanv");
8304+ params[0] = ctx->Pixel.PostColorMatrixColorTableEnabled;
8305+ break;
8306+ case GL_TEXTURE_COLOR_TABLE_SGI:
8307+ CHECK_EXT1(SGI_texture_color_table, "GetBooleanv");
8308+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled;
8309+ break;
8310+ case GL_COLOR_SUM_EXT:
8311+ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetBooleanv");
8312+ params[0] = ctx->Fog.ColorSumEnabled;
8313+ break;
8314+ case GL_CURRENT_SECONDARY_COLOR_EXT:
8315+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8316+ {
8317+ FLUSH_CURRENT(ctx, 0);
8318+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]);
8319+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]);
8320+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]);
8321+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]);
8322+ }
8323+ break;
8324+ case GL_SECONDARY_COLOR_ARRAY_EXT:
8325+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8326+ params[0] = ctx->Array.ArrayObj->SecondaryColor.Enabled;
8327+ break;
8328+ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
8329+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8330+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Type);
8331+ break;
8332+ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
8333+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8334+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Stride);
8335+ break;
8336+ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
8337+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8338+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Size);
8339+ break;
8340+ case GL_CURRENT_FOG_COORDINATE_EXT:
8341+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8342+ {
8343+ FLUSH_CURRENT(ctx, 0);
8344+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_FOG][0]);
8345+ }
8346+ break;
8347+ case GL_FOG_COORDINATE_ARRAY_EXT:
8348+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8349+ params[0] = ctx->Array.ArrayObj->FogCoord.Enabled;
8350+ break;
8351+ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
8352+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8353+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.Type);
8354+ break;
8355+ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
8356+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8357+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.Stride);
8358+ break;
8359+ case GL_FOG_COORDINATE_SOURCE_EXT:
8360+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8361+ params[0] = ENUM_TO_BOOLEAN(ctx->Fog.FogCoordinateSource);
8362+ break;
8363+ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
8364+ CHECK_EXT1(EXT_texture_lod_bias, "GetBooleanv");
8365+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxTextureLodBias);
8366+ break;
8367+ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
8368+ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetBooleanv");
8369+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxTextureMaxAnisotropy);
8370+ break;
8371+ case GL_MULTISAMPLE_ARB:
8372+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8373+ params[0] = ctx->Multisample.Enabled;
8374+ break;
8375+ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
8376+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8377+ params[0] = ctx->Multisample.SampleAlphaToCoverage;
8378+ break;
8379+ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
8380+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8381+ params[0] = ctx->Multisample.SampleAlphaToOne;
8382+ break;
8383+ case GL_SAMPLE_COVERAGE_ARB:
8384+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8385+ params[0] = ctx->Multisample.SampleCoverage;
8386+ break;
8387+ case GL_SAMPLE_COVERAGE_VALUE_ARB:
8388+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8389+ params[0] = FLOAT_TO_BOOLEAN(ctx->Multisample.SampleCoverageValue);
8390+ break;
8391+ case GL_SAMPLE_COVERAGE_INVERT_ARB:
8392+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8393+ params[0] = ctx->Multisample.SampleCoverageInvert;
8394+ break;
8395+ case GL_SAMPLE_BUFFERS_ARB:
8396+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8397+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.sampleBuffers);
8398+ break;
8399+ case GL_SAMPLES_ARB:
8400+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8401+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.samples);
8402+ break;
8403+ case GL_RASTER_POSITION_UNCLIPPED_IBM:
8404+ CHECK_EXT1(IBM_rasterpos_clip, "GetBooleanv");
8405+ params[0] = ctx->Transform.RasterPositionUnclipped;
8406+ break;
8407+ case GL_POINT_SPRITE_NV:
8408+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetBooleanv");
8409+ params[0] = ctx->Point.PointSprite;
8410+ break;
8411+ case GL_POINT_SPRITE_R_MODE_NV:
8412+ CHECK_EXT1(NV_point_sprite, "GetBooleanv");
8413+ params[0] = ENUM_TO_BOOLEAN(ctx->Point.SpriteRMode);
8414+ break;
8415+ case GL_POINT_SPRITE_COORD_ORIGIN:
8416+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetBooleanv");
8417+ params[0] = ENUM_TO_BOOLEAN(ctx->Point.SpriteOrigin);
8418+ break;
8419+ case GL_GENERATE_MIPMAP_HINT_SGIS:
8420+ CHECK_EXT1(SGIS_generate_mipmap, "GetBooleanv");
8421+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.GenerateMipmap);
8422+ break;
8423+ case GL_VERTEX_PROGRAM_BINDING_NV:
8424+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8425+ params[0] = INT_TO_BOOLEAN((ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0));
8426+ break;
8427+ case GL_VERTEX_ATTRIB_ARRAY0_NV:
8428+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8429+ params[0] = ctx->Array.ArrayObj->VertexAttrib[0].Enabled;
8430+ break;
8431+ case GL_VERTEX_ATTRIB_ARRAY1_NV:
8432+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8433+ params[0] = ctx->Array.ArrayObj->VertexAttrib[1].Enabled;
8434+ break;
8435+ case GL_VERTEX_ATTRIB_ARRAY2_NV:
8436+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8437+ params[0] = ctx->Array.ArrayObj->VertexAttrib[2].Enabled;
8438+ break;
8439+ case GL_VERTEX_ATTRIB_ARRAY3_NV:
8440+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8441+ params[0] = ctx->Array.ArrayObj->VertexAttrib[3].Enabled;
8442+ break;
8443+ case GL_VERTEX_ATTRIB_ARRAY4_NV:
8444+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8445+ params[0] = ctx->Array.ArrayObj->VertexAttrib[4].Enabled;
8446+ break;
8447+ case GL_VERTEX_ATTRIB_ARRAY5_NV:
8448+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8449+ params[0] = ctx->Array.ArrayObj->VertexAttrib[5].Enabled;
8450+ break;
8451+ case GL_VERTEX_ATTRIB_ARRAY6_NV:
8452+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8453+ params[0] = ctx->Array.ArrayObj->VertexAttrib[6].Enabled;
8454+ break;
8455+ case GL_VERTEX_ATTRIB_ARRAY7_NV:
8456+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8457+ params[0] = ctx->Array.ArrayObj->VertexAttrib[7].Enabled;
8458+ break;
8459+ case GL_VERTEX_ATTRIB_ARRAY8_NV:
8460+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8461+ params[0] = ctx->Array.ArrayObj->VertexAttrib[8].Enabled;
8462+ break;
8463+ case GL_VERTEX_ATTRIB_ARRAY9_NV:
8464+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8465+ params[0] = ctx->Array.ArrayObj->VertexAttrib[9].Enabled;
8466+ break;
8467+ case GL_VERTEX_ATTRIB_ARRAY10_NV:
8468+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8469+ params[0] = ctx->Array.ArrayObj->VertexAttrib[10].Enabled;
8470+ break;
8471+ case GL_VERTEX_ATTRIB_ARRAY11_NV:
8472+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8473+ params[0] = ctx->Array.ArrayObj->VertexAttrib[11].Enabled;
8474+ break;
8475+ case GL_VERTEX_ATTRIB_ARRAY12_NV:
8476+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8477+ params[0] = ctx->Array.ArrayObj->VertexAttrib[12].Enabled;
8478+ break;
8479+ case GL_VERTEX_ATTRIB_ARRAY13_NV:
8480+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8481+ params[0] = ctx->Array.ArrayObj->VertexAttrib[13].Enabled;
8482+ break;
8483+ case GL_VERTEX_ATTRIB_ARRAY14_NV:
8484+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8485+ params[0] = ctx->Array.ArrayObj->VertexAttrib[14].Enabled;
8486+ break;
8487+ case GL_VERTEX_ATTRIB_ARRAY15_NV:
8488+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8489+ params[0] = ctx->Array.ArrayObj->VertexAttrib[15].Enabled;
8490+ break;
8491+ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
8492+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8493+ params[0] = ctx->Eval.Map1Attrib[0];
8494+ break;
8495+ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
8496+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8497+ params[0] = ctx->Eval.Map1Attrib[1];
8498+ break;
8499+ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
8500+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8501+ params[0] = ctx->Eval.Map1Attrib[2];
8502+ break;
8503+ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
8504+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8505+ params[0] = ctx->Eval.Map1Attrib[3];
8506+ break;
8507+ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
8508+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8509+ params[0] = ctx->Eval.Map1Attrib[4];
8510+ break;
8511+ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
8512+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8513+ params[0] = ctx->Eval.Map1Attrib[5];
8514+ break;
8515+ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
8516+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8517+ params[0] = ctx->Eval.Map1Attrib[6];
8518+ break;
8519+ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
8520+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8521+ params[0] = ctx->Eval.Map1Attrib[7];
8522+ break;
8523+ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
8524+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8525+ params[0] = ctx->Eval.Map1Attrib[8];
8526+ break;
8527+ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
8528+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8529+ params[0] = ctx->Eval.Map1Attrib[9];
8530+ break;
8531+ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
8532+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8533+ params[0] = ctx->Eval.Map1Attrib[10];
8534+ break;
8535+ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
8536+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8537+ params[0] = ctx->Eval.Map1Attrib[11];
8538+ break;
8539+ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
8540+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8541+ params[0] = ctx->Eval.Map1Attrib[12];
8542+ break;
8543+ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
8544+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8545+ params[0] = ctx->Eval.Map1Attrib[13];
8546+ break;
8547+ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
8548+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8549+ params[0] = ctx->Eval.Map1Attrib[14];
8550+ break;
8551+ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
8552+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8553+ params[0] = ctx->Eval.Map1Attrib[15];
8554+ break;
8555+ case GL_FRAGMENT_PROGRAM_NV:
8556+ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
8557+ params[0] = ctx->FragmentProgram.Enabled;
8558+ break;
8559+ case GL_FRAGMENT_PROGRAM_BINDING_NV:
8560+ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
8561+ params[0] = INT_TO_BOOLEAN(ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0);
8562+ break;
8563+ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
8564+ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
8565+ params[0] = INT_TO_BOOLEAN(MAX_NV_FRAGMENT_PROGRAM_PARAMS);
8566+ break;
8567+ case GL_TEXTURE_RECTANGLE_NV:
8568+ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
8569+ params[0] = _mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV);
8570+ break;
8571+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
8572+ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
8573+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name);
8574+ break;
8575+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
8576+ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
8577+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureRectSize);
8578+ break;
8579+ case GL_STENCIL_TEST_TWO_SIDE_EXT:
8580+ CHECK_EXT1(EXT_stencil_two_side, "GetBooleanv");
8581+ params[0] = ctx->Stencil.TestTwoSide;
8582+ break;
8583+ case GL_ACTIVE_STENCIL_FACE_EXT:
8584+ CHECK_EXT1(EXT_stencil_two_side, "GetBooleanv");
8585+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
8586+ break;
8587+ case GL_MAX_SHININESS_NV:
8588+ CHECK_EXT1(NV_light_max_exponent, "GetBooleanv");
8589+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxShininess);
8590+ break;
8591+ case GL_MAX_SPOT_EXPONENT_NV:
8592+ CHECK_EXT1(NV_light_max_exponent, "GetBooleanv");
8593+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxSpotExponent);
8594+ break;
8595+ case GL_ARRAY_BUFFER_BINDING_ARB:
8596+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8597+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayBufferObj->Name);
8598+ break;
8599+ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
8600+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8601+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
8602+ break;
8603+ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
8604+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8605+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.BufferObj->Name);
8606+ break;
8607+ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
8608+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8609+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.BufferObj->Name);
8610+ break;
8611+ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
8612+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8613+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Index.BufferObj->Name);
8614+ break;
8615+ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
8616+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8617+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
8618+ break;
8619+ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
8620+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8621+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
8622+ break;
8623+ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
8624+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8625+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
8626+ break;
8627+ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
8628+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8629+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
8630+ break;
8631+ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
8632+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8633+ params[0] = INT_TO_BOOLEAN(ctx->Array.ElementArrayBufferObj->Name);
8634+ break;
8635+ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
8636+ CHECK_EXT1(EXT_pixel_buffer_object, "GetBooleanv");
8637+ params[0] = INT_TO_BOOLEAN(ctx->Pack.BufferObj->Name);
8638+ break;
8639+ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
8640+ CHECK_EXT1(EXT_pixel_buffer_object, "GetBooleanv");
8641+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.BufferObj->Name);
8642+ break;
8643+ case GL_VERTEX_PROGRAM_ARB:
8644+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
8645+ params[0] = ctx->VertexProgram.Enabled;
8646+ break;
8647+ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
8648+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
8649+ params[0] = ctx->VertexProgram.PointSizeEnabled;
8650+ break;
8651+ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
8652+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
8653+ params[0] = ctx->VertexProgram.TwoSideEnabled;
8654+ break;
8655+ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
8656+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
8657+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxProgramMatrixStackDepth);
8658+ break;
8659+ case GL_MAX_PROGRAM_MATRICES_ARB:
8660+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
8661+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxProgramMatrices);
8662+ break;
8663+ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
8664+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
8665+ params[0] = ctx->CurrentStack->Depth + 1;
8666+ break;
8667+ case GL_CURRENT_MATRIX_ARB:
8668+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetBooleanv");
8669+ {
8670+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
8671+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8672+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
8673+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
8674+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
8675+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
8676+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8677+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
8678+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
8679+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
8680+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
8681+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8682+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
8683+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
8684+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
8685+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
8686+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8687+ }
8688+ break;
8689+ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
8690+ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetBooleanv");
8691+ {
8692+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
8693+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8694+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8695+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8696+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8697+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8698+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8699+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8700+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8701+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8702+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8703+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8704+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8705+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8706+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8707+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8708+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8709+ }
8710+ break;
8711+ case GL_MAX_VERTEX_ATTRIBS_ARB:
8712+ CHECK_EXT1(ARB_vertex_program, "GetBooleanv");
8713+ params[0] = INT_TO_BOOLEAN(ctx->Const.VertexProgram.MaxAttribs);
8714+ break;
8715+ case GL_PROGRAM_ERROR_POSITION_ARB:
8716+ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetBooleanv");
8717+ params[0] = INT_TO_BOOLEAN(ctx->Program.ErrorPos);
8718+ break;
8719+ case GL_FRAGMENT_PROGRAM_ARB:
8720+ CHECK_EXT1(ARB_fragment_program, "GetBooleanv");
8721+ params[0] = ctx->FragmentProgram.Enabled;
8722+ break;
8723+ case GL_MAX_TEXTURE_COORDS_ARB:
8724+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetBooleanv");
8725+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureCoordUnits);
8726+ break;
8727+ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
8728+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetBooleanv");
8729+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureImageUnits);
8730+ break;
8731+ case GL_DEPTH_BOUNDS_TEST_EXT:
8732+ CHECK_EXT1(EXT_depth_bounds_test, "GetBooleanv");
8733+ params[0] = ctx->Depth.BoundsTest;
8734+ break;
8735+ case GL_DEPTH_BOUNDS_EXT:
8736+ CHECK_EXT1(EXT_depth_bounds_test, "GetBooleanv");
8737+ params[0] = FLOAT_TO_BOOLEAN(ctx->Depth.BoundsMin);
8738+ params[1] = FLOAT_TO_BOOLEAN(ctx->Depth.BoundsMax);
8739+ break;
8740+ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
8741+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8742+ params[0] = ctx->FragmentProgram.CallbackEnabled;
8743+ break;
8744+ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
8745+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8746+ params[0] = ctx->VertexProgram.CallbackEnabled;
8747+ break;
8748+ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
8749+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8750+ params[0] = INT_TO_BOOLEAN(ctx->FragmentProgram.CurrentPosition);
8751+ break;
8752+ case GL_VERTEX_PROGRAM_POSITION_MESA:
8753+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8754+ params[0] = INT_TO_BOOLEAN(ctx->VertexProgram.CurrentPosition);
8755+ break;
8756+ case GL_MAX_DRAW_BUFFERS_ARB:
8757+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8758+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxDrawBuffers);
8759+ break;
8760+ case GL_DRAW_BUFFER0_ARB:
8761+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8762+ params[0] = ENUM_TO_BOOLEAN(ctx->DrawBuffer->ColorDrawBuffer[0]);
8763+ break;
8764+ case GL_DRAW_BUFFER1_ARB:
8765+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8766+ {
8767+ GLenum buffer;
8768+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
8769+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
8770+ return;
8771+ }
8772+ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
8773+ params[0] = ENUM_TO_BOOLEAN(buffer);
8774+ }
8775+ break;
8776+ case GL_DRAW_BUFFER2_ARB:
8777+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8778+ {
8779+ GLenum buffer;
8780+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
8781+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
8782+ return;
8783+ }
8784+ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
8785+ params[0] = ENUM_TO_BOOLEAN(buffer);
8786+ }
8787+ break;
8788+ case GL_DRAW_BUFFER3_ARB:
8789+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8790+ {
8791+ GLenum buffer;
8792+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
8793+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
8794+ return;
8795+ }
8796+ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
8797+ params[0] = ENUM_TO_BOOLEAN(buffer);
8798+ }
8799+ break;
8800+ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
8801+ CHECK_EXT1(OES_read_format, "GetBooleanv");
8802+ params[0] = INT_TO_BOOLEAN(ctx->Const.ColorReadType);
8803+ break;
8804+ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
8805+ CHECK_EXT1(OES_read_format, "GetBooleanv");
8806+ params[0] = INT_TO_BOOLEAN(ctx->Const.ColorReadFormat);
8807+ break;
8808+ case GL_NUM_FRAGMENT_REGISTERS_ATI:
8809+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8810+ params[0] = INT_TO_BOOLEAN(6);
8811+ break;
8812+ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
8813+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8814+ params[0] = INT_TO_BOOLEAN(8);
8815+ break;
8816+ case GL_NUM_PASSES_ATI:
8817+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8818+ params[0] = INT_TO_BOOLEAN(2);
8819+ break;
8820+ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
8821+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8822+ params[0] = INT_TO_BOOLEAN(8);
8823+ break;
8824+ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
8825+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8826+ params[0] = INT_TO_BOOLEAN(16);
8827+ break;
8828+ case GL_COLOR_ALPHA_PAIRING_ATI:
8829+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8830+ params[0] = GL_TRUE;
8831+ break;
8832+ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
8833+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8834+ params[0] = INT_TO_BOOLEAN(3);
8835+ break;
8836+ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
8837+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8838+ params[0] = INT_TO_BOOLEAN(3);
8839+ break;
8840+ case GL_STENCIL_BACK_FUNC:
8841+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.Function[1]);
8842+ break;
8843+ case GL_STENCIL_BACK_VALUE_MASK:
8844+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.ValueMask[1]);
8845+ break;
8846+ case GL_STENCIL_BACK_REF:
8847+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Ref[1]);
8848+ break;
8849+ case GL_STENCIL_BACK_FAIL:
8850+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.FailFunc[1]);
8851+ break;
8852+ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
8853+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZFailFunc[1]);
8854+ break;
8855+ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
8856+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZPassFunc[1]);
8857+ break;
8858+ case GL_FRAMEBUFFER_BINDING_EXT:
8859+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
8860+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Name);
8861+ break;
8862+ case GL_RENDERBUFFER_BINDING_EXT:
8863+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
8864+ params[0] = INT_TO_BOOLEAN(ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0);
8865+ break;
8866+ case GL_MAX_COLOR_ATTACHMENTS_EXT:
8867+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
8868+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxColorAttachments);
8869+ break;
8870+ case GL_MAX_RENDERBUFFER_SIZE_EXT:
8871+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
8872+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxRenderbufferSize);
8873+ break;
8874+ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
8875+ CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
8876+ params[0] = INT_TO_BOOLEAN(MAX_FRAGMENT_UNIFORM_COMPONENTS);
8877+ break;
8878+ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
8879+ CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
8880+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.FragmentShaderDerivative);
8881+ break;
8882+ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
8883+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
8884+ params[0] = INT_TO_BOOLEAN(MAX_VERTEX_UNIFORM_COMPONENTS);
8885+ break;
8886+ case GL_MAX_VARYING_FLOATS_ARB:
8887+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
8888+ params[0] = INT_TO_BOOLEAN(MAX_VARYING_FLOATS);
8889+ break;
8890+ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
8891+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
8892+ params[0] = INT_TO_BOOLEAN(MAX_VERTEX_TEXTURE_IMAGE_UNITS);
8893+ break;
8894+ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
8895+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
8896+ params[0] = INT_TO_BOOLEAN(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
8897+ break;
8898+ default:
8899+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv(pname=0x%x)", pname);
8900+ }
8901+}
8902+
8903+void GLAPIENTRY
8904+_mesa_GetFloatv( GLenum pname, GLfloat *params )
8905+{
8906+ GET_CURRENT_CONTEXT(ctx);
8907+ ASSERT_OUTSIDE_BEGIN_END(ctx);
8908+
8909+ if (!params)
8910+ return;
8911+
8912+ if (ctx->NewState)
8913+ _mesa_update_state(ctx);
8914+
8915+ if (ctx->Driver.GetFloatv &&
8916+ ctx->Driver.GetFloatv(ctx, pname, params))
8917+ return;
8918+
8919+ switch (pname) {
8920+ case GL_ACCUM_RED_BITS:
8921+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumRedBits);
8922+ break;
8923+ case GL_ACCUM_GREEN_BITS:
8924+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumGreenBits);
8925+ break;
8926+ case GL_ACCUM_BLUE_BITS:
8927+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumBlueBits);
8928+ break;
8929+ case GL_ACCUM_ALPHA_BITS:
8930+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumAlphaBits);
8931+ break;
8932+ case GL_ACCUM_CLEAR_VALUE:
8933+ params[0] = ctx->Accum.ClearColor[0];
8934+ params[1] = ctx->Accum.ClearColor[1];
8935+ params[2] = ctx->Accum.ClearColor[2];
8936+ params[3] = ctx->Accum.ClearColor[3];
8937+ break;
8938+ case GL_ALPHA_BIAS:
8939+ params[0] = ctx->Pixel.AlphaBias;
8940+ break;
8941+ case GL_ALPHA_BITS:
8942+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.alphaBits);
8943+ break;
8944+ case GL_ALPHA_SCALE:
8945+ params[0] = ctx->Pixel.AlphaScale;
8946+ break;
8947+ case GL_ALPHA_TEST:
8948+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.AlphaEnabled);
8949+ break;
8950+ case GL_ALPHA_TEST_FUNC:
8951+ params[0] = ENUM_TO_FLOAT(ctx->Color.AlphaFunc);
8952+ break;
8953+ case GL_ALPHA_TEST_REF:
8954+ params[0] = ctx->Color.AlphaRef;
8955+ break;
8956+ case GL_ATTRIB_STACK_DEPTH:
8957+ params[0] = (GLfloat)(ctx->AttribStackDepth);
8958+ break;
8959+ case GL_AUTO_NORMAL:
8960+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.AutoNormal);
8961+ break;
8962+ case GL_AUX_BUFFERS:
8963+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.numAuxBuffers);
8964+ break;
8965+ case GL_BLEND:
8966+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.BlendEnabled);
8967+ break;
8968+ case GL_BLEND_DST:
8969+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstRGB);
8970+ break;
8971+ case GL_BLEND_SRC:
8972+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcRGB);
8973+ break;
8974+ case GL_BLEND_SRC_RGB_EXT:
8975+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcRGB);
8976+ break;
8977+ case GL_BLEND_DST_RGB_EXT:
8978+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstRGB);
8979+ break;
8980+ case GL_BLEND_SRC_ALPHA_EXT:
8981+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcA);
8982+ break;
8983+ case GL_BLEND_DST_ALPHA_EXT:
8984+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstA);
8985+ break;
8986+ case GL_BLEND_EQUATION:
8987+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendEquationRGB );
8988+ break;
8989+ case GL_BLEND_EQUATION_ALPHA_EXT:
8990+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendEquationA );
8991+ break;
8992+ case GL_BLEND_COLOR_EXT:
8993+ params[0] = ctx->Color.BlendColor[0];
8994+ params[1] = ctx->Color.BlendColor[1];
8995+ params[2] = ctx->Color.BlendColor[2];
8996+ params[3] = ctx->Color.BlendColor[3];
8997+ break;
8998+ case GL_BLUE_BIAS:
8999+ params[0] = ctx->Pixel.BlueBias;
9000+ break;
9001+ case GL_BLUE_BITS:
9002+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.blueBits);
9003+ break;
9004+ case GL_BLUE_SCALE:
9005+ params[0] = ctx->Pixel.BlueScale;
9006+ break;
9007+ case GL_CLIENT_ATTRIB_STACK_DEPTH:
9008+ params[0] = (GLfloat)(ctx->ClientAttribStackDepth);
9009+ break;
9010+ case GL_CLIP_PLANE0:
9011+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 0) & 1);
9012+ break;
9013+ case GL_CLIP_PLANE1:
9014+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 1) & 1);
9015+ break;
9016+ case GL_CLIP_PLANE2:
9017+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 2) & 1);
9018+ break;
9019+ case GL_CLIP_PLANE3:
9020+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 3) & 1);
9021+ break;
9022+ case GL_CLIP_PLANE4:
9023+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 4) & 1);
9024+ break;
9025+ case GL_CLIP_PLANE5:
9026+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 5) & 1);
9027+ break;
9028+ case GL_COLOR_CLEAR_VALUE:
9029+ params[0] = ctx->Color.ClearColor[0];
9030+ params[1] = ctx->Color.ClearColor[1];
9031+ params[2] = ctx->Color.ClearColor[2];
9032+ params[3] = ctx->Color.ClearColor[3];
9033+ break;
9034+ case GL_COLOR_MATERIAL:
9035+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.ColorMaterialEnabled);
9036+ break;
9037+ case GL_COLOR_MATERIAL_FACE:
9038+ params[0] = ENUM_TO_FLOAT(ctx->Light.ColorMaterialFace);
9039+ break;
9040+ case GL_COLOR_MATERIAL_PARAMETER:
9041+ params[0] = ENUM_TO_FLOAT(ctx->Light.ColorMaterialMode);
9042+ break;
9043+ case GL_COLOR_WRITEMASK:
9044+ params[0] = (GLfloat)(ctx->Color.ColorMask[RCOMP] ? 1 : 0);
9045+ params[1] = (GLfloat)(ctx->Color.ColorMask[GCOMP] ? 1 : 0);
9046+ params[2] = (GLfloat)(ctx->Color.ColorMask[BCOMP] ? 1 : 0);
9047+ params[3] = (GLfloat)(ctx->Color.ColorMask[ACOMP] ? 1 : 0);
9048+ break;
9049+ case GL_CULL_FACE:
9050+ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.CullFlag);
9051+ break;
9052+ case GL_CULL_FACE_MODE:
9053+ params[0] = ENUM_TO_FLOAT(ctx->Polygon.CullFaceMode);
9054+ break;
9055+ case GL_CURRENT_COLOR:
9056+ {
9057+ FLUSH_CURRENT(ctx, 0);
9058+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0];
9059+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1];
9060+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2];
9061+ params[3] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3];
9062+ }
9063+ break;
9064+ case GL_CURRENT_INDEX:
9065+ {
9066+ FLUSH_CURRENT(ctx, 0);
9067+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0];
9068+ }
9069+ break;
9070+ case GL_CURRENT_NORMAL:
9071+ {
9072+ FLUSH_CURRENT(ctx, 0);
9073+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0];
9074+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1];
9075+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2];
9076+ }
9077+ break;
9078+ case GL_CURRENT_RASTER_COLOR:
9079+ params[0] = ctx->Current.RasterColor[0];
9080+ params[1] = ctx->Current.RasterColor[1];
9081+ params[2] = ctx->Current.RasterColor[2];
9082+ params[3] = ctx->Current.RasterColor[3];
9083+ break;
9084+ case GL_CURRENT_RASTER_DISTANCE:
9085+ params[0] = ctx->Current.RasterDistance;
9086+ break;
9087+ case GL_CURRENT_RASTER_INDEX:
9088+ params[0] = ctx->Current.RasterIndex;
9089+ break;
9090+ case GL_CURRENT_RASTER_POSITION:
9091+ params[0] = ctx->Current.RasterPos[0];
9092+ params[1] = ctx->Current.RasterPos[1];
9093+ params[2] = ctx->Current.RasterPos[2];
9094+ params[3] = ctx->Current.RasterPos[3];
9095+ break;
9096+ case GL_CURRENT_RASTER_SECONDARY_COLOR:
9097+ params[0] = ctx->Current.RasterSecondaryColor[0];
9098+ params[1] = ctx->Current.RasterSecondaryColor[1];
9099+ params[2] = ctx->Current.RasterSecondaryColor[2];
9100+ params[3] = ctx->Current.RasterSecondaryColor[3];
9101+ break;
9102+ case GL_CURRENT_RASTER_TEXTURE_COORDS:
9103+ {
9104+ const GLuint texUnit = ctx->Texture.CurrentUnit;
9105+ params[0] = ctx->Current.RasterTexCoords[texUnit][0];
9106+ params[1] = ctx->Current.RasterTexCoords[texUnit][1];
9107+ params[2] = ctx->Current.RasterTexCoords[texUnit][2];
9108+ params[3] = ctx->Current.RasterTexCoords[texUnit][3];
9109+ }
9110+ break;
9111+ case GL_CURRENT_RASTER_POSITION_VALID:
9112+ params[0] = BOOLEAN_TO_FLOAT(ctx->Current.RasterPosValid);
9113+ break;
9114+ case GL_CURRENT_TEXTURE_COORDS:
9115+ {
9116+ const GLuint texUnit = ctx->Texture.CurrentUnit;
9117+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0];
9118+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1];
9119+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2];
9120+ params[3] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3];
9121+ }
9122+ break;
9123+ case GL_DEPTH_BIAS:
9124+ params[0] = ctx->Pixel.DepthBias;
9125+ break;
9126+ case GL_DEPTH_BITS:
9127+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.depthBits);
9128+ break;
9129+ case GL_DEPTH_CLEAR_VALUE:
9130+ params[0] = ctx->Depth.Clear;
9131+ break;
9132+ case GL_DEPTH_FUNC:
9133+ params[0] = ENUM_TO_FLOAT(ctx->Depth.Func);
9134+ break;
9135+ case GL_DEPTH_RANGE:
9136+ params[0] = ctx->Viewport.Near;
9137+ params[1] = ctx->Viewport.Far;
9138+ break;
9139+ case GL_DEPTH_SCALE:
9140+ params[0] = ctx->Pixel.DepthScale;
9141+ break;
9142+ case GL_DEPTH_TEST:
9143+ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.Test);
9144+ break;
9145+ case GL_DEPTH_WRITEMASK:
9146+ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.Mask);
9147+ break;
9148+ case GL_DITHER:
9149+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.DitherFlag);
9150+ break;
9151+ case GL_DOUBLEBUFFER:
9152+ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.doubleBufferMode);
9153+ break;
9154+ case GL_DRAW_BUFFER:
9155+ params[0] = ENUM_TO_FLOAT(ctx->DrawBuffer->ColorDrawBuffer[0]);
9156+ break;
9157+ case GL_EDGE_FLAG:
9158+ {
9159+ FLUSH_CURRENT(ctx, 0);
9160+ params[0] = BOOLEAN_TO_FLOAT(ctx->Current.EdgeFlag);
9161+ }
9162+ break;
9163+ case GL_FEEDBACK_BUFFER_SIZE:
9164+ params[0] = (GLfloat)(ctx->Feedback.BufferSize);
9165+ break;
9166+ case GL_FEEDBACK_BUFFER_TYPE:
9167+ params[0] = ENUM_TO_FLOAT(ctx->Feedback.Type);
9168+ break;
9169+ case GL_FOG:
9170+ params[0] = BOOLEAN_TO_FLOAT(ctx->Fog.Enabled);
9171+ break;
9172+ case GL_FOG_COLOR:
9173+ params[0] = ctx->Fog.Color[0];
9174+ params[1] = ctx->Fog.Color[1];
9175+ params[2] = ctx->Fog.Color[2];
9176+ params[3] = ctx->Fog.Color[3];
9177+ break;
9178+ case GL_FOG_DENSITY:
9179+ params[0] = ctx->Fog.Density;
9180+ break;
9181+ case GL_FOG_END:
9182+ params[0] = ctx->Fog.End;
9183+ break;
9184+ case GL_FOG_HINT:
9185+ params[0] = ENUM_TO_FLOAT(ctx->Hint.Fog);
9186+ break;
9187+ case GL_FOG_INDEX:
9188+ params[0] = ctx->Fog.Index;
9189+ break;
9190+ case GL_FOG_MODE:
9191+ params[0] = ENUM_TO_FLOAT(ctx->Fog.Mode);
9192+ break;
9193+ case GL_FOG_START:
9194+ params[0] = ctx->Fog.Start;
9195+ break;
9196+ case GL_FRONT_FACE:
9197+ params[0] = ENUM_TO_FLOAT(ctx->Polygon.FrontFace);
9198+ break;
9199+ case GL_GREEN_BIAS:
9200+ params[0] = ctx->Pixel.GreenBias;
9201+ break;
9202+ case GL_GREEN_BITS:
9203+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.greenBits);
9204+ break;
9205+ case GL_GREEN_SCALE:
9206+ params[0] = ctx->Pixel.GreenScale;
9207+ break;
9208+ case GL_INDEX_BITS:
9209+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.indexBits);
9210+ break;
9211+ case GL_INDEX_CLEAR_VALUE:
9212+ params[0] = (GLfloat)(ctx->Color.ClearIndex);
9213+ break;
9214+ case GL_INDEX_MODE:
9215+ params[0] = BOOLEAN_TO_FLOAT(!ctx->DrawBuffer->Visual.rgbMode);
9216+ break;
9217+ case GL_INDEX_OFFSET:
9218+ params[0] = (GLfloat)(ctx->Pixel.IndexOffset);
9219+ break;
9220+ case GL_INDEX_SHIFT:
9221+ params[0] = (GLfloat)(ctx->Pixel.IndexShift);
9222+ break;
9223+ case GL_INDEX_WRITEMASK:
9224+ params[0] = (GLfloat)(ctx->Color.IndexMask);
9225+ break;
9226+ case GL_LIGHT0:
9227+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[0].Enabled);
9228+ break;
9229+ case GL_LIGHT1:
9230+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[1].Enabled);
9231+ break;
9232+ case GL_LIGHT2:
9233+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[2].Enabled);
9234+ break;
9235+ case GL_LIGHT3:
9236+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[3].Enabled);
9237+ break;
9238+ case GL_LIGHT4:
9239+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[4].Enabled);
9240+ break;
9241+ case GL_LIGHT5:
9242+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[5].Enabled);
9243+ break;
9244+ case GL_LIGHT6:
9245+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[6].Enabled);
9246+ break;
9247+ case GL_LIGHT7:
9248+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[7].Enabled);
9249+ break;
9250+ case GL_LIGHTING:
9251+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Enabled);
9252+ break;
9253+ case GL_LIGHT_MODEL_AMBIENT:
9254+ params[0] = ctx->Light.Model.Ambient[0];
9255+ params[1] = ctx->Light.Model.Ambient[1];
9256+ params[2] = ctx->Light.Model.Ambient[2];
9257+ params[3] = ctx->Light.Model.Ambient[3];
9258+ break;
9259+ case GL_LIGHT_MODEL_COLOR_CONTROL:
9260+ params[0] = ENUM_TO_FLOAT(ctx->Light.Model.ColorControl);
9261+ break;
9262+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
9263+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Model.LocalViewer);
9264+ break;
9265+ case GL_LIGHT_MODEL_TWO_SIDE:
9266+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Model.TwoSide);
9267+ break;
9268+ case GL_LINE_SMOOTH:
9269+ params[0] = BOOLEAN_TO_FLOAT(ctx->Line.SmoothFlag);
9270+ break;
9271+ case GL_LINE_SMOOTH_HINT:
9272+ params[0] = ENUM_TO_FLOAT(ctx->Hint.LineSmooth);
9273+ break;
9274+ case GL_LINE_STIPPLE:
9275+ params[0] = BOOLEAN_TO_FLOAT(ctx->Line.StippleFlag);
9276+ break;
9277+ case GL_LINE_STIPPLE_PATTERN:
9278+ params[0] = (GLfloat)(ctx->Line.StipplePattern);
9279+ break;
9280+ case GL_LINE_STIPPLE_REPEAT:
9281+ params[0] = (GLfloat)(ctx->Line.StippleFactor);
9282+ break;
9283+ case GL_LINE_WIDTH:
9284+ params[0] = ctx->Line.Width;
9285+ break;
9286+ case GL_LINE_WIDTH_GRANULARITY:
9287+ params[0] = ctx->Const.LineWidthGranularity;
9288+ break;
9289+ case GL_LINE_WIDTH_RANGE:
9290+ params[0] = ctx->Const.MinLineWidthAA;
9291+ params[1] = ctx->Const.MaxLineWidthAA;
9292+ break;
9293+ case GL_ALIASED_LINE_WIDTH_RANGE:
9294+ params[0] = ctx->Const.MinLineWidth;
9295+ params[1] = ctx->Const.MaxLineWidth;
9296+ break;
9297+ case GL_LIST_BASE:
9298+ params[0] = (GLfloat)(ctx->List.ListBase);
9299+ break;
9300+ case GL_LIST_INDEX:
9301+ params[0] = (GLfloat)(ctx->ListState.CurrentListNum);
9302+ break;
9303+ case GL_LIST_MODE:
9304+ {
9305+ GLenum mode;
9306+ if (!ctx->CompileFlag)
9307+ mode = 0;
9308+ else if (ctx->ExecuteFlag)
9309+ mode = GL_COMPILE_AND_EXECUTE;
9310+ else
9311+ mode = GL_COMPILE;
9312+ params[0] = ENUM_TO_FLOAT(mode);
9313+ }
9314+ break;
9315+ case GL_INDEX_LOGIC_OP:
9316+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.IndexLogicOpEnabled);
9317+ break;
9318+ case GL_COLOR_LOGIC_OP:
9319+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.ColorLogicOpEnabled);
9320+ break;
9321+ case GL_LOGIC_OP_MODE:
9322+ params[0] = ENUM_TO_FLOAT(ctx->Color.LogicOp);
9323+ break;
9324+ case GL_MAP1_COLOR_4:
9325+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Color4);
9326+ break;
9327+ case GL_MAP1_GRID_DOMAIN:
9328+ params[0] = ctx->Eval.MapGrid1u1;
9329+ params[1] = ctx->Eval.MapGrid1u2;
9330+ break;
9331+ case GL_MAP1_GRID_SEGMENTS:
9332+ params[0] = (GLfloat)(ctx->Eval.MapGrid1un);
9333+ break;
9334+ case GL_MAP1_INDEX:
9335+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Index);
9336+ break;
9337+ case GL_MAP1_NORMAL:
9338+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Normal);
9339+ break;
9340+ case GL_MAP1_TEXTURE_COORD_1:
9341+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord1);
9342+ break;
9343+ case GL_MAP1_TEXTURE_COORD_2:
9344+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord2);
9345+ break;
9346+ case GL_MAP1_TEXTURE_COORD_3:
9347+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord3);
9348+ break;
9349+ case GL_MAP1_TEXTURE_COORD_4:
9350+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord4);
9351+ break;
9352+ case GL_MAP1_VERTEX_3:
9353+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Vertex3);
9354+ break;
9355+ case GL_MAP1_VERTEX_4:
9356+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Vertex4);
9357+ break;
9358+ case GL_MAP2_COLOR_4:
9359+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Color4);
9360+ break;
9361+ case GL_MAP2_GRID_DOMAIN:
9362+ params[0] = ctx->Eval.MapGrid2u1;
9363+ params[1] = ctx->Eval.MapGrid2u2;
9364+ params[2] = ctx->Eval.MapGrid2v1;
9365+ params[3] = ctx->Eval.MapGrid2v2;
9366+ break;
9367+ case GL_MAP2_GRID_SEGMENTS:
9368+ params[0] = (GLfloat)(ctx->Eval.MapGrid2un);
9369+ params[1] = (GLfloat)(ctx->Eval.MapGrid2vn);
9370+ break;
9371+ case GL_MAP2_INDEX:
9372+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Index);
9373+ break;
9374+ case GL_MAP2_NORMAL:
9375+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Normal);
9376+ break;
9377+ case GL_MAP2_TEXTURE_COORD_1:
9378+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord1);
9379+ break;
9380+ case GL_MAP2_TEXTURE_COORD_2:
9381+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord2);
9382+ break;
9383+ case GL_MAP2_TEXTURE_COORD_3:
9384+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord3);
9385+ break;
9386+ case GL_MAP2_TEXTURE_COORD_4:
9387+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord4);
9388+ break;
9389+ case GL_MAP2_VERTEX_3:
9390+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Vertex3);
9391+ break;
9392+ case GL_MAP2_VERTEX_4:
9393+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Vertex4);
9394+ break;
9395+ case GL_MAP_COLOR:
9396+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MapColorFlag);
9397+ break;
9398+ case GL_MAP_STENCIL:
9399+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MapStencilFlag);
9400+ break;
9401+ case GL_MATRIX_MODE:
9402+ params[0] = ENUM_TO_FLOAT(ctx->Transform.MatrixMode);
9403+ break;
9404+ case GL_MAX_ATTRIB_STACK_DEPTH:
9405+ params[0] = (GLfloat)(MAX_ATTRIB_STACK_DEPTH);
9406+ break;
9407+ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
9408+ params[0] = (GLfloat)(MAX_CLIENT_ATTRIB_STACK_DEPTH);
9409+ break;
9410+ case GL_MAX_CLIP_PLANES:
9411+ params[0] = (GLfloat)(ctx->Const.MaxClipPlanes);
9412+ break;
9413+ case GL_MAX_ELEMENTS_VERTICES:
9414+ params[0] = (GLfloat)(ctx->Const.MaxArrayLockSize);
9415+ break;
9416+ case GL_MAX_ELEMENTS_INDICES:
9417+ params[0] = (GLfloat)(ctx->Const.MaxArrayLockSize);
9418+ break;
9419+ case GL_MAX_EVAL_ORDER:
9420+ params[0] = (GLfloat)(MAX_EVAL_ORDER);
9421+ break;
9422+ case GL_MAX_LIGHTS:
9423+ params[0] = (GLfloat)(ctx->Const.MaxLights);
9424+ break;
9425+ case GL_MAX_LIST_NESTING:
9426+ params[0] = (GLfloat)(MAX_LIST_NESTING);
9427+ break;
9428+ case GL_MAX_MODELVIEW_STACK_DEPTH:
9429+ params[0] = (GLfloat)(MAX_MODELVIEW_STACK_DEPTH);
9430+ break;
9431+ case GL_MAX_NAME_STACK_DEPTH:
9432+ params[0] = (GLfloat)(MAX_NAME_STACK_DEPTH);
9433+ break;
9434+ case GL_MAX_PIXEL_MAP_TABLE:
9435+ params[0] = (GLfloat)(MAX_PIXEL_MAP_TABLE);
9436+ break;
9437+ case GL_MAX_PROJECTION_STACK_DEPTH:
9438+ params[0] = (GLfloat)(MAX_PROJECTION_STACK_DEPTH);
9439+ break;
9440+ case GL_MAX_TEXTURE_SIZE:
9441+ params[0] = (GLfloat)(1 << (ctx->Const.MaxTextureLevels - 1));
9442+ break;
9443+ case GL_MAX_3D_TEXTURE_SIZE:
9444+ params[0] = (GLfloat)(1 << (ctx->Const.Max3DTextureLevels - 1));
9445+ break;
9446+ case GL_MAX_TEXTURE_STACK_DEPTH:
9447+ params[0] = (GLfloat)(MAX_TEXTURE_STACK_DEPTH);
9448+ break;
9449+ case GL_MAX_VIEWPORT_DIMS:
9450+ params[0] = (GLfloat)(ctx->Const.MaxViewportWidth);
9451+ params[1] = (GLfloat)(ctx->Const.MaxViewportHeight);
9452+ break;
9453+ case GL_MODELVIEW_MATRIX:
9454+ {
9455+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
9456+ params[0] = matrix[0];
9457+ params[1] = matrix[1];
9458+ params[2] = matrix[2];
9459+ params[3] = matrix[3];
9460+ params[4] = matrix[4];
9461+ params[5] = matrix[5];
9462+ params[6] = matrix[6];
9463+ params[7] = matrix[7];
9464+ params[8] = matrix[8];
9465+ params[9] = matrix[9];
9466+ params[10] = matrix[10];
9467+ params[11] = matrix[11];
9468+ params[12] = matrix[12];
9469+ params[13] = matrix[13];
9470+ params[14] = matrix[14];
9471+ params[15] = matrix[15];
9472+ }
9473+ break;
9474+ case GL_MODELVIEW_STACK_DEPTH:
9475+ params[0] = (GLfloat)(ctx->ModelviewMatrixStack.Depth + 1);
9476+ break;
9477+ case GL_NAME_STACK_DEPTH:
9478+ params[0] = (GLfloat)(ctx->Select.NameStackDepth);
9479+ break;
9480+ case GL_NORMALIZE:
9481+ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.Normalize);
9482+ break;
9483+ case GL_PACK_ALIGNMENT:
9484+ params[0] = (GLfloat)(ctx->Pack.Alignment);
9485+ break;
9486+ case GL_PACK_LSB_FIRST:
9487+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.LsbFirst);
9488+ break;
9489+ case GL_PACK_ROW_LENGTH:
9490+ params[0] = (GLfloat)(ctx->Pack.RowLength);
9491+ break;
9492+ case GL_PACK_SKIP_PIXELS:
9493+ params[0] = (GLfloat)(ctx->Pack.SkipPixels);
9494+ break;
9495+ case GL_PACK_SKIP_ROWS:
9496+ params[0] = (GLfloat)(ctx->Pack.SkipRows);
9497+ break;
9498+ case GL_PACK_SWAP_BYTES:
9499+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.SwapBytes);
9500+ break;
9501+ case GL_PACK_SKIP_IMAGES_EXT:
9502+ params[0] = (GLfloat)(ctx->Pack.SkipImages);
9503+ break;
9504+ case GL_PACK_IMAGE_HEIGHT_EXT:
9505+ params[0] = (GLfloat)(ctx->Pack.ImageHeight);
9506+ break;
9507+ case GL_PACK_INVERT_MESA:
9508+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.Invert);
9509+ break;
9510+ case GL_PERSPECTIVE_CORRECTION_HINT:
9511+ params[0] = ENUM_TO_FLOAT(ctx->Hint.PerspectiveCorrection);
9512+ break;
9513+ case GL_PIXEL_MAP_A_TO_A_SIZE:
9514+ params[0] = (GLfloat)(ctx->Pixel.MapAtoAsize);
9515+ break;
9516+ case GL_PIXEL_MAP_B_TO_B_SIZE:
9517+ params[0] = (GLfloat)(ctx->Pixel.MapBtoBsize);
9518+ break;
9519+ case GL_PIXEL_MAP_G_TO_G_SIZE:
9520+ params[0] = (GLfloat)(ctx->Pixel.MapGtoGsize);
9521+ break;
9522+ case GL_PIXEL_MAP_I_TO_A_SIZE:
9523+ params[0] = (GLfloat)(ctx->Pixel.MapItoAsize);
9524+ break;
9525+ case GL_PIXEL_MAP_I_TO_B_SIZE:
9526+ params[0] = (GLfloat)(ctx->Pixel.MapItoBsize);
9527+ break;
9528+ case GL_PIXEL_MAP_I_TO_G_SIZE:
9529+ params[0] = (GLfloat)(ctx->Pixel.MapItoGsize);
9530+ break;
9531+ case GL_PIXEL_MAP_I_TO_I_SIZE:
9532+ params[0] = (GLfloat)(ctx->Pixel.MapItoIsize);
9533+ break;
9534+ case GL_PIXEL_MAP_I_TO_R_SIZE:
9535+ params[0] = (GLfloat)(ctx->Pixel.MapItoRsize);
9536+ break;
9537+ case GL_PIXEL_MAP_R_TO_R_SIZE:
9538+ params[0] = (GLfloat)(ctx->Pixel.MapRtoRsize);
9539+ break;
9540+ case GL_PIXEL_MAP_S_TO_S_SIZE:
9541+ params[0] = (GLfloat)(ctx->Pixel.MapStoSsize);
9542+ break;
9543+ case GL_POINT_SIZE:
9544+ params[0] = ctx->Point.Size;
9545+ break;
9546+ case GL_POINT_SIZE_GRANULARITY:
9547+ params[0] = ctx->Const.PointSizeGranularity;
9548+ break;
9549+ case GL_POINT_SIZE_RANGE:
9550+ params[0] = ctx->Const.MinPointSizeAA;
9551+ params[1] = ctx->Const.MaxPointSizeAA;
9552+ break;
9553+ case GL_ALIASED_POINT_SIZE_RANGE:
9554+ params[0] = ctx->Const.MinPointSize;
9555+ params[1] = ctx->Const.MaxPointSize;
9556+ break;
9557+ case GL_POINT_SMOOTH:
9558+ params[0] = BOOLEAN_TO_FLOAT(ctx->Point.SmoothFlag);
9559+ break;
9560+ case GL_POINT_SMOOTH_HINT:
9561+ params[0] = ENUM_TO_FLOAT(ctx->Hint.PointSmooth);
9562+ break;
9563+ case GL_POINT_SIZE_MIN_EXT:
9564+ params[0] = ctx->Point.MinSize;
9565+ break;
9566+ case GL_POINT_SIZE_MAX_EXT:
9567+ params[0] = ctx->Point.MaxSize;
9568+ break;
9569+ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
9570+ params[0] = ctx->Point.Threshold;
9571+ break;
9572+ case GL_DISTANCE_ATTENUATION_EXT:
9573+ params[0] = ctx->Point.Params[0];
9574+ params[1] = ctx->Point.Params[1];
9575+ params[2] = ctx->Point.Params[2];
9576+ break;
9577+ case GL_POLYGON_MODE:
9578+ params[0] = ENUM_TO_FLOAT(ctx->Polygon.FrontMode);
9579+ params[1] = ENUM_TO_FLOAT(ctx->Polygon.BackMode);
9580+ break;
9581+ case GL_POLYGON_OFFSET_BIAS_EXT:
9582+ params[0] = ctx->Polygon.OffsetUnits;
9583+ break;
9584+ case GL_POLYGON_OFFSET_FACTOR:
9585+ params[0] = ctx->Polygon.OffsetFactor ;
9586+ break;
9587+ case GL_POLYGON_OFFSET_UNITS:
9588+ params[0] = ctx->Polygon.OffsetUnits ;
9589+ break;
9590+ case GL_POLYGON_SMOOTH:
9591+ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.SmoothFlag);
9592+ break;
9593+ case GL_POLYGON_SMOOTH_HINT:
9594+ params[0] = ENUM_TO_FLOAT(ctx->Hint.PolygonSmooth);
9595+ break;
9596+ case GL_POLYGON_STIPPLE:
9597+ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.StippleFlag);
9598+ break;
9599+ case GL_PROJECTION_MATRIX:
9600+ {
9601+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
9602+ params[0] = matrix[0];
9603+ params[1] = matrix[1];
9604+ params[2] = matrix[2];
9605+ params[3] = matrix[3];
9606+ params[4] = matrix[4];
9607+ params[5] = matrix[5];
9608+ params[6] = matrix[6];
9609+ params[7] = matrix[7];
9610+ params[8] = matrix[8];
9611+ params[9] = matrix[9];
9612+ params[10] = matrix[10];
9613+ params[11] = matrix[11];
9614+ params[12] = matrix[12];
9615+ params[13] = matrix[13];
9616+ params[14] = matrix[14];
9617+ params[15] = matrix[15];
9618+ }
9619+ break;
9620+ case GL_PROJECTION_STACK_DEPTH:
9621+ params[0] = (GLfloat)(ctx->ProjectionMatrixStack.Depth + 1);
9622+ break;
9623+ case GL_READ_BUFFER:
9624+ params[0] = ENUM_TO_FLOAT(ctx->ReadBuffer->ColorReadBuffer);
9625+ break;
9626+ case GL_RED_BIAS:
9627+ params[0] = ctx->Pixel.RedBias;
9628+ break;
9629+ case GL_RED_BITS:
9630+ params[0] = (GLfloat)( ctx->DrawBuffer->Visual.redBits );
9631+ break;
9632+ case GL_RED_SCALE:
9633+ params[0] = ctx->Pixel.RedScale;
9634+ break;
9635+ case GL_RENDER_MODE:
9636+ params[0] = ENUM_TO_FLOAT(ctx->RenderMode);
9637+ break;
9638+ case GL_RESCALE_NORMAL:
9639+ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.RescaleNormals);
9640+ break;
9641+ case GL_RGBA_MODE:
9642+ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.rgbMode);
9643+ break;
9644+ case GL_SCISSOR_BOX:
9645+ params[0] = (GLfloat)(ctx->Scissor.X);
9646+ params[1] = (GLfloat)(ctx->Scissor.Y);
9647+ params[2] = (GLfloat)(ctx->Scissor.Width);
9648+ params[3] = (GLfloat)(ctx->Scissor.Height);
9649+ break;
9650+ case GL_SCISSOR_TEST:
9651+ params[0] = BOOLEAN_TO_FLOAT(ctx->Scissor.Enabled);
9652+ break;
9653+ case GL_SELECTION_BUFFER_SIZE:
9654+ params[0] = (GLfloat)(ctx->Select.BufferSize);
9655+ break;
9656+ case GL_SHADE_MODEL:
9657+ params[0] = ENUM_TO_FLOAT(ctx->Light.ShadeModel);
9658+ break;
9659+ case GL_SHARED_TEXTURE_PALETTE_EXT:
9660+ params[0] = BOOLEAN_TO_FLOAT(ctx->Texture.SharedPalette);
9661+ break;
9662+ case GL_STENCIL_BITS:
9663+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.stencilBits);
9664+ break;
9665+ case GL_STENCIL_CLEAR_VALUE:
9666+ params[0] = (GLfloat)(ctx->Stencil.Clear);
9667+ break;
9668+ case GL_STENCIL_FAIL:
9669+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
9670+ break;
9671+ case GL_STENCIL_FUNC:
9672+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
9673+ break;
9674+ case GL_STENCIL_PASS_DEPTH_FAIL:
9675+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
9676+ break;
9677+ case GL_STENCIL_PASS_DEPTH_PASS:
9678+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
9679+ break;
9680+ case GL_STENCIL_REF:
9681+ params[0] = (GLfloat)(ctx->Stencil.Ref[ctx->Stencil.ActiveFace]);
9682+ break;
9683+ case GL_STENCIL_TEST:
9684+ params[0] = BOOLEAN_TO_FLOAT(ctx->Stencil.Enabled);
9685+ break;
9686+ case GL_STENCIL_VALUE_MASK:
9687+ params[0] = (GLfloat)(ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]);
9688+ break;
9689+ case GL_STENCIL_WRITEMASK:
9690+ params[0] = (GLfloat)(ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]);
9691+ break;
9692+ case GL_STEREO:
9693+ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.stereoMode);
9694+ break;
9695+ case GL_SUBPIXEL_BITS:
9696+ params[0] = (GLfloat)(ctx->Const.SubPixelBits);
9697+ break;
9698+ case GL_TEXTURE_1D:
9699+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_1D));
9700+ break;
9701+ case GL_TEXTURE_2D:
9702+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_2D));
9703+ break;
9704+ case GL_TEXTURE_3D:
9705+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_3D));
9706+ break;
9707+ case GL_TEXTURE_BINDING_1D:
9708+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name);
9709+ break;
9710+ case GL_TEXTURE_BINDING_2D:
9711+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name);
9712+ break;
9713+ case GL_TEXTURE_BINDING_3D:
9714+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name);
9715+ break;
9716+ case GL_TEXTURE_ENV_COLOR:
9717+ {
9718+ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
9719+ params[0] = color[0];
9720+ params[1] = color[1];
9721+ params[2] = color[2];
9722+ params[3] = color[3];
9723+ }
9724+ break;
9725+ case GL_TEXTURE_ENV_MODE:
9726+ params[0] = ENUM_TO_FLOAT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
9727+ break;
9728+ case GL_TEXTURE_GEN_S:
9729+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
9730+ break;
9731+ case GL_TEXTURE_GEN_T:
9732+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0));
9733+ break;
9734+ case GL_TEXTURE_GEN_R:
9735+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0));
9736+ break;
9737+ case GL_TEXTURE_GEN_Q:
9738+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0));
9739+ break;
9740+ case GL_TEXTURE_MATRIX:
9741+ {
9742+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
9743+ params[0] = matrix[0];
9744+ params[1] = matrix[1];
9745+ params[2] = matrix[2];
9746+ params[3] = matrix[3];
9747+ params[4] = matrix[4];
9748+ params[5] = matrix[5];
9749+ params[6] = matrix[6];
9750+ params[7] = matrix[7];
9751+ params[8] = matrix[8];
9752+ params[9] = matrix[9];
9753+ params[10] = matrix[10];
9754+ params[11] = matrix[11];
9755+ params[12] = matrix[12];
9756+ params[13] = matrix[13];
9757+ params[14] = matrix[14];
9758+ params[15] = matrix[15];
9759+ }
9760+ break;
9761+ case GL_TEXTURE_STACK_DEPTH:
9762+ params[0] = (GLfloat)(ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1);
9763+ break;
9764+ case GL_UNPACK_ALIGNMENT:
9765+ params[0] = (GLfloat)(ctx->Unpack.Alignment);
9766+ break;
9767+ case GL_UNPACK_LSB_FIRST:
9768+ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.LsbFirst);
9769+ break;
9770+ case GL_UNPACK_ROW_LENGTH:
9771+ params[0] = (GLfloat)(ctx->Unpack.RowLength);
9772+ break;
9773+ case GL_UNPACK_SKIP_PIXELS:
9774+ params[0] = (GLfloat)(ctx->Unpack.SkipPixels);
9775+ break;
9776+ case GL_UNPACK_SKIP_ROWS:
9777+ params[0] = (GLfloat)(ctx->Unpack.SkipRows);
9778+ break;
9779+ case GL_UNPACK_SWAP_BYTES:
9780+ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.SwapBytes);
9781+ break;
9782+ case GL_UNPACK_SKIP_IMAGES_EXT:
9783+ params[0] = (GLfloat)(ctx->Unpack.SkipImages);
9784+ break;
9785+ case GL_UNPACK_IMAGE_HEIGHT_EXT:
9786+ params[0] = (GLfloat)(ctx->Unpack.ImageHeight);
9787+ break;
9788+ case GL_UNPACK_CLIENT_STORAGE_APPLE:
9789+ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.ClientStorage);
9790+ break;
9791+ case GL_VIEWPORT:
9792+ params[0] = (GLfloat)(ctx->Viewport.X);
9793+ params[1] = (GLfloat)(ctx->Viewport.Y);
9794+ params[2] = (GLfloat)(ctx->Viewport.Width);
9795+ params[3] = (GLfloat)(ctx->Viewport.Height);
9796+ break;
9797+ case GL_ZOOM_X:
9798+ params[0] = ctx->Pixel.ZoomX;
9799+ break;
9800+ case GL_ZOOM_Y:
9801+ params[0] = ctx->Pixel.ZoomY;
9802+ break;
9803+ case GL_VERTEX_ARRAY:
9804+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Vertex.Enabled);
9805+ break;
9806+ case GL_VERTEX_ARRAY_SIZE:
9807+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.Size);
9808+ break;
9809+ case GL_VERTEX_ARRAY_TYPE:
9810+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Vertex.Type);
9811+ break;
9812+ case GL_VERTEX_ARRAY_STRIDE:
9813+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.Stride);
9814+ break;
9815+ case GL_VERTEX_ARRAY_COUNT_EXT:
9816+ params[0] = (GLfloat)(0);
9817+ break;
9818+ case GL_NORMAL_ARRAY:
9819+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Normal.Enabled);
9820+ break;
9821+ case GL_NORMAL_ARRAY_TYPE:
9822+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Normal.Type);
9823+ break;
9824+ case GL_NORMAL_ARRAY_STRIDE:
9825+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Normal.Stride);
9826+ break;
9827+ case GL_NORMAL_ARRAY_COUNT_EXT:
9828+ params[0] = (GLfloat)(0);
9829+ break;
9830+ case GL_COLOR_ARRAY:
9831+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Color.Enabled);
9832+ break;
9833+ case GL_COLOR_ARRAY_SIZE:
9834+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.Size);
9835+ break;
9836+ case GL_COLOR_ARRAY_TYPE:
9837+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Color.Type);
9838+ break;
9839+ case GL_COLOR_ARRAY_STRIDE:
9840+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.Stride);
9841+ break;
9842+ case GL_COLOR_ARRAY_COUNT_EXT:
9843+ params[0] = (GLfloat)(0);
9844+ break;
9845+ case GL_INDEX_ARRAY:
9846+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Index.Enabled);
9847+ break;
9848+ case GL_INDEX_ARRAY_TYPE:
9849+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Index.Type);
9850+ break;
9851+ case GL_INDEX_ARRAY_STRIDE:
9852+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Index.Stride);
9853+ break;
9854+ case GL_INDEX_ARRAY_COUNT_EXT:
9855+ params[0] = (GLfloat)(0);
9856+ break;
9857+ case GL_TEXTURE_COORD_ARRAY:
9858+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
9859+ break;
9860+ case GL_TEXTURE_COORD_ARRAY_SIZE:
9861+ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
9862+ break;
9863+ case GL_TEXTURE_COORD_ARRAY_TYPE:
9864+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
9865+ break;
9866+ case GL_TEXTURE_COORD_ARRAY_STRIDE:
9867+ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
9868+ break;
9869+ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
9870+ params[0] = (GLfloat)(0);
9871+ break;
9872+ case GL_EDGE_FLAG_ARRAY:
9873+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->EdgeFlag.Enabled);
9874+ break;
9875+ case GL_EDGE_FLAG_ARRAY_STRIDE:
9876+ params[0] = (GLfloat)(ctx->Array.ArrayObj->EdgeFlag.Stride);
9877+ break;
9878+ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
9879+ params[0] = (GLfloat)(0);
9880+ break;
9881+ case GL_MAX_TEXTURE_UNITS_ARB:
9882+ CHECK_EXT1(ARB_multitexture, "GetFloatv");
9883+ params[0] = (GLfloat)(ctx->Const.MaxTextureUnits);
9884+ break;
9885+ case GL_ACTIVE_TEXTURE_ARB:
9886+ CHECK_EXT1(ARB_multitexture, "GetFloatv");
9887+ params[0] = (GLfloat)(GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit);
9888+ break;
9889+ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
9890+ CHECK_EXT1(ARB_multitexture, "GetFloatv");
9891+ params[0] = (GLfloat)(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
9892+ break;
9893+ case GL_TEXTURE_CUBE_MAP_ARB:
9894+ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
9895+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB));
9896+ break;
9897+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
9898+ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
9899+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name);
9900+ break;
9901+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
9902+ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
9903+ params[0] = (GLfloat)((1 << (ctx->Const.MaxCubeTextureLevels - 1)));
9904+ break;
9905+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
9906+ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
9907+ params[0] = (GLfloat)(ctx->Hint.TextureCompression);
9908+ break;
9909+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
9910+ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
9911+ params[0] = (GLfloat)(_mesa_get_compressed_formats(ctx, NULL, GL_FALSE));
9912+ break;
9913+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
9914+ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
9915+ {
9916+ GLint formats[100];
9917+ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
9918+ ASSERT(n <= 100);
9919+ for (i = 0; i < n; i++)
9920+ params[i] = ENUM_TO_INT(formats[i]);
9921+ }
9922+ break;
9923+ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
9924+ CHECK_EXT1(EXT_compiled_vertex_array, "GetFloatv");
9925+ params[0] = (GLfloat)(ctx->Array.LockFirst);
9926+ break;
9927+ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
9928+ CHECK_EXT1(EXT_compiled_vertex_array, "GetFloatv");
9929+ params[0] = (GLfloat)(ctx->Array.LockCount);
9930+ break;
9931+ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
9932+ {
9933+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
9934+ params[0] = matrix[0];
9935+ params[1] = matrix[4];
9936+ params[2] = matrix[8];
9937+ params[3] = matrix[12];
9938+ params[4] = matrix[1];
9939+ params[5] = matrix[5];
9940+ params[6] = matrix[9];
9941+ params[7] = matrix[13];
9942+ params[8] = matrix[2];
9943+ params[9] = matrix[6];
9944+ params[10] = matrix[10];
9945+ params[11] = matrix[14];
9946+ params[12] = matrix[3];
9947+ params[13] = matrix[7];
9948+ params[14] = matrix[11];
9949+ params[15] = matrix[15];
9950+ }
9951+ break;
9952+ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
9953+ {
9954+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
9955+ params[0] = matrix[0];
9956+ params[1] = matrix[4];
9957+ params[2] = matrix[8];
9958+ params[3] = matrix[12];
9959+ params[4] = matrix[1];
9960+ params[5] = matrix[5];
9961+ params[6] = matrix[9];
9962+ params[7] = matrix[13];
9963+ params[8] = matrix[2];
9964+ params[9] = matrix[6];
9965+ params[10] = matrix[10];
9966+ params[11] = matrix[14];
9967+ params[12] = matrix[3];
9968+ params[13] = matrix[7];
9969+ params[14] = matrix[11];
9970+ params[15] = matrix[15];
9971+ }
9972+ break;
9973+ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
9974+ {
9975+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
9976+ params[0] = matrix[0];
9977+ params[1] = matrix[4];
9978+ params[2] = matrix[8];
9979+ params[3] = matrix[12];
9980+ params[4] = matrix[1];
9981+ params[5] = matrix[5];
9982+ params[6] = matrix[9];
9983+ params[7] = matrix[13];
9984+ params[8] = matrix[2];
9985+ params[9] = matrix[6];
9986+ params[10] = matrix[10];
9987+ params[11] = matrix[14];
9988+ params[12] = matrix[3];
9989+ params[13] = matrix[7];
9990+ params[14] = matrix[11];
9991+ params[15] = matrix[15];
9992+ }
9993+ break;
9994+ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
9995+ {
9996+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
9997+ params[0] = matrix[0];
9998+ params[1] = matrix[4];
9999+ params[2] = matrix[8];
10000+ params[3] = matrix[12];
10001+ params[4] = matrix[1];
10002+ params[5] = matrix[5];
10003+ params[6] = matrix[9];
10004+ params[7] = matrix[13];
10005+ params[8] = matrix[2];
10006+ params[9] = matrix[6];
10007+ params[10] = matrix[10];
10008+ params[11] = matrix[14];
10009+ params[12] = matrix[3];
10010+ params[13] = matrix[7];
10011+ params[14] = matrix[11];
10012+ params[15] = matrix[15];
10013+ }
10014+ break;
10015+ case GL_COLOR_MATRIX_SGI:
10016+ {
10017+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
10018+ params[0] = matrix[0];
10019+ params[1] = matrix[1];
10020+ params[2] = matrix[2];
10021+ params[3] = matrix[3];
10022+ params[4] = matrix[4];
10023+ params[5] = matrix[5];
10024+ params[6] = matrix[6];
10025+ params[7] = matrix[7];
10026+ params[8] = matrix[8];
10027+ params[9] = matrix[9];
10028+ params[10] = matrix[10];
10029+ params[11] = matrix[11];
10030+ params[12] = matrix[12];
10031+ params[13] = matrix[13];
10032+ params[14] = matrix[14];
10033+ params[15] = matrix[15];
10034+ }
10035+ break;
10036+ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
10037+ params[0] = (GLfloat)(ctx->ColorMatrixStack.Depth + 1);
10038+ break;
10039+ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
10040+ params[0] = (GLfloat)(MAX_COLOR_STACK_DEPTH);
10041+ break;
10042+ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
10043+ params[0] = ctx->Pixel.PostColorMatrixScale[0];
10044+ break;
10045+ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
10046+ params[0] = ctx->Pixel.PostColorMatrixScale[1];
10047+ break;
10048+ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
10049+ params[0] = ctx->Pixel.PostColorMatrixScale[2];
10050+ break;
10051+ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
10052+ params[0] = ctx->Pixel.PostColorMatrixScale[3];
10053+ break;
10054+ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
10055+ params[0] = ctx->Pixel.PostColorMatrixBias[0];
10056+ break;
10057+ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
10058+ params[0] = ctx->Pixel.PostColorMatrixBias[1];
10059+ break;
10060+ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
10061+ params[0] = ctx->Pixel.PostColorMatrixBias[2];
10062+ break;
10063+ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
10064+ params[0] = ctx->Pixel.PostColorMatrixBias[3];
10065+ break;
10066+ case GL_CONVOLUTION_1D_EXT:
10067+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10068+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Convolution1DEnabled);
10069+ break;
10070+ case GL_CONVOLUTION_2D_EXT:
10071+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10072+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Convolution2DEnabled);
10073+ break;
10074+ case GL_SEPARABLE_2D_EXT:
10075+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10076+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Separable2DEnabled);
10077+ break;
10078+ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
10079+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10080+ params[0] = ctx->Pixel.PostConvolutionScale[0];
10081+ break;
10082+ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
10083+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10084+ params[0] = ctx->Pixel.PostConvolutionScale[1];
10085+ break;
10086+ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
10087+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10088+ params[0] = ctx->Pixel.PostConvolutionScale[2];
10089+ break;
10090+ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
10091+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10092+ params[0] = ctx->Pixel.PostConvolutionScale[3];
10093+ break;
10094+ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
10095+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10096+ params[0] = ctx->Pixel.PostConvolutionBias[0];
10097+ break;
10098+ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
10099+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10100+ params[0] = ctx->Pixel.PostConvolutionBias[1];
10101+ break;
10102+ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
10103+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10104+ params[0] = ctx->Pixel.PostConvolutionBias[2];
10105+ break;
10106+ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
10107+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10108+ params[0] = ctx->Pixel.PostConvolutionBias[3];
10109+ break;
10110+ case GL_HISTOGRAM:
10111+ CHECK_EXT1(EXT_histogram, "GetFloatv");
10112+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.HistogramEnabled);
10113+ break;
10114+ case GL_MINMAX:
10115+ CHECK_EXT1(EXT_histogram, "GetFloatv");
10116+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MinMaxEnabled);
10117+ break;
10118+ case GL_COLOR_TABLE_SGI:
10119+ CHECK_EXT1(SGI_color_table, "GetFloatv");
10120+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.ColorTableEnabled);
10121+ break;
10122+ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
10123+ CHECK_EXT1(SGI_color_table, "GetFloatv");
10124+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.PostConvolutionColorTableEnabled);
10125+ break;
10126+ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
10127+ CHECK_EXT1(SGI_color_table, "GetFloatv");
10128+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.PostColorMatrixColorTableEnabled);
10129+ break;
10130+ case GL_TEXTURE_COLOR_TABLE_SGI:
10131+ CHECK_EXT1(SGI_texture_color_table, "GetFloatv");
10132+ params[0] = BOOLEAN_TO_FLOAT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled);
10133+ break;
10134+ case GL_COLOR_SUM_EXT:
10135+ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetFloatv");
10136+ params[0] = BOOLEAN_TO_FLOAT(ctx->Fog.ColorSumEnabled);
10137+ break;
10138+ case GL_CURRENT_SECONDARY_COLOR_EXT:
10139+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10140+ {
10141+ FLUSH_CURRENT(ctx, 0);
10142+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0];
10143+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1];
10144+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2];
10145+ params[3] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3];
10146+ }
10147+ break;
10148+ case GL_SECONDARY_COLOR_ARRAY_EXT:
10149+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10150+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->SecondaryColor.Enabled);
10151+ break;
10152+ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
10153+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10154+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->SecondaryColor.Type);
10155+ break;
10156+ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
10157+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10158+ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.Stride);
10159+ break;
10160+ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
10161+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10162+ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.Size);
10163+ break;
10164+ case GL_CURRENT_FOG_COORDINATE_EXT:
10165+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10166+ {
10167+ FLUSH_CURRENT(ctx, 0);
10168+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_FOG][0];
10169+ }
10170+ break;
10171+ case GL_FOG_COORDINATE_ARRAY_EXT:
10172+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10173+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->FogCoord.Enabled);
10174+ break;
10175+ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
10176+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10177+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->FogCoord.Type);
10178+ break;
10179+ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
10180+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10181+ params[0] = (GLfloat)(ctx->Array.ArrayObj->FogCoord.Stride);
10182+ break;
10183+ case GL_FOG_COORDINATE_SOURCE_EXT:
10184+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10185+ params[0] = ENUM_TO_FLOAT(ctx->Fog.FogCoordinateSource);
10186+ break;
10187+ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
10188+ CHECK_EXT1(EXT_texture_lod_bias, "GetFloatv");
10189+ params[0] = ctx->Const.MaxTextureLodBias;
10190+ break;
10191+ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
10192+ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetFloatv");
10193+ params[0] = ctx->Const.MaxTextureMaxAnisotropy;
10194+ break;
10195+ case GL_MULTISAMPLE_ARB:
10196+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10197+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.Enabled);
10198+ break;
10199+ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
10200+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10201+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleAlphaToCoverage);
10202+ break;
10203+ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
10204+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10205+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleAlphaToOne);
10206+ break;
10207+ case GL_SAMPLE_COVERAGE_ARB:
10208+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10209+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleCoverage);
10210+ break;
10211+ case GL_SAMPLE_COVERAGE_VALUE_ARB:
10212+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10213+ params[0] = ctx->Multisample.SampleCoverageValue;
10214+ break;
10215+ case GL_SAMPLE_COVERAGE_INVERT_ARB:
10216+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10217+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleCoverageInvert);
10218+ break;
10219+ case GL_SAMPLE_BUFFERS_ARB:
10220+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10221+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.sampleBuffers);
10222+ break;
10223+ case GL_SAMPLES_ARB:
10224+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10225+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.samples);
10226+ break;
10227+ case GL_RASTER_POSITION_UNCLIPPED_IBM:
10228+ CHECK_EXT1(IBM_rasterpos_clip, "GetFloatv");
10229+ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.RasterPositionUnclipped);
10230+ break;
10231+ case GL_POINT_SPRITE_NV:
10232+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetFloatv");
10233+ params[0] = BOOLEAN_TO_FLOAT(ctx->Point.PointSprite);
10234+ break;
10235+ case GL_POINT_SPRITE_R_MODE_NV:
10236+ CHECK_EXT1(NV_point_sprite, "GetFloatv");
10237+ params[0] = ENUM_TO_FLOAT(ctx->Point.SpriteRMode);
10238+ break;
10239+ case GL_POINT_SPRITE_COORD_ORIGIN:
10240+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetFloatv");
10241+ params[0] = ENUM_TO_FLOAT(ctx->Point.SpriteOrigin);
10242+ break;
10243+ case GL_GENERATE_MIPMAP_HINT_SGIS:
10244+ CHECK_EXT1(SGIS_generate_mipmap, "GetFloatv");
10245+ params[0] = ENUM_TO_FLOAT(ctx->Hint.GenerateMipmap);
10246+ break;
10247+ case GL_VERTEX_PROGRAM_BINDING_NV:
10248+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10249+ params[0] = (GLfloat)((ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0));
10250+ break;
10251+ case GL_VERTEX_ATTRIB_ARRAY0_NV:
10252+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10253+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[0].Enabled);
10254+ break;
10255+ case GL_VERTEX_ATTRIB_ARRAY1_NV:
10256+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10257+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[1].Enabled);
10258+ break;
10259+ case GL_VERTEX_ATTRIB_ARRAY2_NV:
10260+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10261+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[2].Enabled);
10262+ break;
10263+ case GL_VERTEX_ATTRIB_ARRAY3_NV:
10264+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10265+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[3].Enabled);
10266+ break;
10267+ case GL_VERTEX_ATTRIB_ARRAY4_NV:
10268+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10269+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[4].Enabled);
10270+ break;
10271+ case GL_VERTEX_ATTRIB_ARRAY5_NV:
10272+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10273+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[5].Enabled);
10274+ break;
10275+ case GL_VERTEX_ATTRIB_ARRAY6_NV:
10276+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10277+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[6].Enabled);
10278+ break;
10279+ case GL_VERTEX_ATTRIB_ARRAY7_NV:
10280+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10281+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[7].Enabled);
10282+ break;
10283+ case GL_VERTEX_ATTRIB_ARRAY8_NV:
10284+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10285+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[8].Enabled);
10286+ break;
10287+ case GL_VERTEX_ATTRIB_ARRAY9_NV:
10288+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10289+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[9].Enabled);
10290+ break;
10291+ case GL_VERTEX_ATTRIB_ARRAY10_NV:
10292+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10293+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[10].Enabled);
10294+ break;
10295+ case GL_VERTEX_ATTRIB_ARRAY11_NV:
10296+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10297+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[11].Enabled);
10298+ break;
10299+ case GL_VERTEX_ATTRIB_ARRAY12_NV:
10300+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10301+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[12].Enabled);
10302+ break;
10303+ case GL_VERTEX_ATTRIB_ARRAY13_NV:
10304+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10305+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[13].Enabled);
10306+ break;
10307+ case GL_VERTEX_ATTRIB_ARRAY14_NV:
10308+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10309+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[14].Enabled);
10310+ break;
10311+ case GL_VERTEX_ATTRIB_ARRAY15_NV:
10312+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10313+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[15].Enabled);
10314+ break;
10315+ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
10316+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10317+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[0]);
10318+ break;
10319+ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
10320+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10321+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[1]);
10322+ break;
10323+ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
10324+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10325+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[2]);
10326+ break;
10327+ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
10328+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10329+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[3]);
10330+ break;
10331+ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
10332+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10333+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[4]);
10334+ break;
10335+ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
10336+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10337+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[5]);
10338+ break;
10339+ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
10340+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10341+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[6]);
10342+ break;
10343+ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
10344+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10345+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[7]);
10346+ break;
10347+ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
10348+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10349+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[8]);
10350+ break;
10351+ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
10352+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10353+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[9]);
10354+ break;
10355+ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
10356+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10357+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[10]);
10358+ break;
10359+ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
10360+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10361+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[11]);
10362+ break;
10363+ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
10364+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10365+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[12]);
10366+ break;
10367+ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
10368+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10369+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[13]);
10370+ break;
10371+ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
10372+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10373+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[14]);
10374+ break;
10375+ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
10376+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10377+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[15]);
10378+ break;
10379+ case GL_FRAGMENT_PROGRAM_NV:
10380+ CHECK_EXT1(NV_fragment_program, "GetFloatv");
10381+ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.Enabled);
10382+ break;
10383+ case GL_FRAGMENT_PROGRAM_BINDING_NV:
10384+ CHECK_EXT1(NV_fragment_program, "GetFloatv");
10385+ params[0] = (GLfloat)(ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0);
10386+ break;
10387+ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
10388+ CHECK_EXT1(NV_fragment_program, "GetFloatv");
10389+ params[0] = (GLfloat)(MAX_NV_FRAGMENT_PROGRAM_PARAMS);
10390+ break;
10391+ case GL_TEXTURE_RECTANGLE_NV:
10392+ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
10393+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV));
10394+ break;
10395+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
10396+ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
10397+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name);
10398+ break;
10399+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
10400+ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
10401+ params[0] = (GLfloat)(ctx->Const.MaxTextureRectSize);
10402+ break;
10403+ case GL_STENCIL_TEST_TWO_SIDE_EXT:
10404+ CHECK_EXT1(EXT_stencil_two_side, "GetFloatv");
10405+ params[0] = BOOLEAN_TO_FLOAT(ctx->Stencil.TestTwoSide);
10406+ break;
10407+ case GL_ACTIVE_STENCIL_FACE_EXT:
10408+ CHECK_EXT1(EXT_stencil_two_side, "GetFloatv");
10409+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
10410+ break;
10411+ case GL_MAX_SHININESS_NV:
10412+ CHECK_EXT1(NV_light_max_exponent, "GetFloatv");
10413+ params[0] = ctx->Const.MaxShininess;
10414+ break;
10415+ case GL_MAX_SPOT_EXPONENT_NV:
10416+ CHECK_EXT1(NV_light_max_exponent, "GetFloatv");
10417+ params[0] = ctx->Const.MaxSpotExponent;
10418+ break;
10419+ case GL_ARRAY_BUFFER_BINDING_ARB:
10420+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10421+ params[0] = (GLfloat)(ctx->Array.ArrayBufferObj->Name);
10422+ break;
10423+ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
10424+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10425+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
10426+ break;
10427+ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
10428+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10429+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Normal.BufferObj->Name);
10430+ break;
10431+ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
10432+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10433+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.BufferObj->Name);
10434+ break;
10435+ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
10436+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10437+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Index.BufferObj->Name);
10438+ break;
10439+ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
10440+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10441+ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
10442+ break;
10443+ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
10444+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10445+ params[0] = (GLfloat)(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
10446+ break;
10447+ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
10448+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10449+ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
10450+ break;
10451+ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
10452+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10453+ params[0] = (GLfloat)(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
10454+ break;
10455+ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
10456+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10457+ params[0] = (GLfloat)(ctx->Array.ElementArrayBufferObj->Name);
10458+ break;
10459+ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
10460+ CHECK_EXT1(EXT_pixel_buffer_object, "GetFloatv");
10461+ params[0] = (GLfloat)(ctx->Pack.BufferObj->Name);
10462+ break;
10463+ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
10464+ CHECK_EXT1(EXT_pixel_buffer_object, "GetFloatv");
10465+ params[0] = (GLfloat)(ctx->Unpack.BufferObj->Name);
10466+ break;
10467+ case GL_VERTEX_PROGRAM_ARB:
10468+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
10469+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.Enabled);
10470+ break;
10471+ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
10472+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
10473+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.PointSizeEnabled);
10474+ break;
10475+ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
10476+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
10477+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.TwoSideEnabled);
10478+ break;
10479+ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
10480+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
10481+ params[0] = (GLfloat)(ctx->Const.MaxProgramMatrixStackDepth);
10482+ break;
10483+ case GL_MAX_PROGRAM_MATRICES_ARB:
10484+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
10485+ params[0] = (GLfloat)(ctx->Const.MaxProgramMatrices);
10486+ break;
10487+ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
10488+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
10489+ params[0] = BOOLEAN_TO_FLOAT(ctx->CurrentStack->Depth + 1);
10490+ break;
10491+ case GL_CURRENT_MATRIX_ARB:
10492+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetFloatv");
10493+ {
10494+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
10495+ params[0] = matrix[0];
10496+ params[1] = matrix[1];
10497+ params[2] = matrix[2];
10498+ params[3] = matrix[3];
10499+ params[4] = matrix[4];
10500+ params[5] = matrix[5];
10501+ params[6] = matrix[6];
10502+ params[7] = matrix[7];
10503+ params[8] = matrix[8];
10504+ params[9] = matrix[9];
10505+ params[10] = matrix[10];
10506+ params[11] = matrix[11];
10507+ params[12] = matrix[12];
10508+ params[13] = matrix[13];
10509+ params[14] = matrix[14];
10510+ params[15] = matrix[15];
10511+ }
10512+ break;
10513+ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
10514+ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetFloatv");
10515+ {
10516+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
10517+ params[0] = matrix[0];
10518+ params[1] = matrix[4];
10519+ params[2] = matrix[8];
10520+ params[3] = matrix[12];
10521+ params[4] = matrix[1];
10522+ params[5] = matrix[5];
10523+ params[6] = matrix[9];
10524+ params[7] = matrix[13];
10525+ params[8] = matrix[2];
10526+ params[9] = matrix[6];
10527+ params[10] = matrix[10];
10528+ params[11] = matrix[14];
10529+ params[12] = matrix[3];
10530+ params[13] = matrix[7];
10531+ params[14] = matrix[11];
10532+ params[15] = matrix[15];
10533+ }
10534+ break;
10535+ case GL_MAX_VERTEX_ATTRIBS_ARB:
10536+ CHECK_EXT1(ARB_vertex_program, "GetFloatv");
10537+ params[0] = (GLfloat)(ctx->Const.VertexProgram.MaxAttribs);
10538+ break;
10539+ case GL_PROGRAM_ERROR_POSITION_ARB:
10540+ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetFloatv");
10541+ params[0] = (GLfloat)(ctx->Program.ErrorPos);
10542+ break;
10543+ case GL_FRAGMENT_PROGRAM_ARB:
10544+ CHECK_EXT1(ARB_fragment_program, "GetFloatv");
10545+ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.Enabled);
10546+ break;
10547+ case GL_MAX_TEXTURE_COORDS_ARB:
10548+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetFloatv");
10549+ params[0] = (GLfloat)(ctx->Const.MaxTextureCoordUnits);
10550+ break;
10551+ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
10552+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetFloatv");
10553+ params[0] = (GLfloat)(ctx->Const.MaxTextureImageUnits);
10554+ break;
10555+ case GL_DEPTH_BOUNDS_TEST_EXT:
10556+ CHECK_EXT1(EXT_depth_bounds_test, "GetFloatv");
10557+ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.BoundsTest);
10558+ break;
10559+ case GL_DEPTH_BOUNDS_EXT:
10560+ CHECK_EXT1(EXT_depth_bounds_test, "GetFloatv");
10561+ params[0] = ctx->Depth.BoundsMin;
10562+ params[1] = ctx->Depth.BoundsMax;
10563+ break;
10564+ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
10565+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10566+ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.CallbackEnabled);
10567+ break;
10568+ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
10569+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10570+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.CallbackEnabled);
10571+ break;
10572+ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
10573+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10574+ params[0] = (GLfloat)(ctx->FragmentProgram.CurrentPosition);
10575+ break;
10576+ case GL_VERTEX_PROGRAM_POSITION_MESA:
10577+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10578+ params[0] = (GLfloat)(ctx->VertexProgram.CurrentPosition);
10579+ break;
10580+ case GL_MAX_DRAW_BUFFERS_ARB:
10581+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10582+ params[0] = (GLfloat)(ctx->Const.MaxDrawBuffers);
10583+ break;
10584+ case GL_DRAW_BUFFER0_ARB:
10585+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10586+ params[0] = ENUM_TO_FLOAT(ctx->DrawBuffer->ColorDrawBuffer[0]);
10587+ break;
10588+ case GL_DRAW_BUFFER1_ARB:
10589+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10590+ {
10591+ GLenum buffer;
10592+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
10593+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
10594+ return;
10595+ }
10596+ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
10597+ params[0] = ENUM_TO_FLOAT(buffer);
10598+ }
10599+ break;
10600+ case GL_DRAW_BUFFER2_ARB:
10601+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10602+ {
10603+ GLenum buffer;
10604+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
10605+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
10606+ return;
10607+ }
10608+ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
10609+ params[0] = ENUM_TO_FLOAT(buffer);
10610+ }
10611+ break;
10612+ case GL_DRAW_BUFFER3_ARB:
10613+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10614+ {
10615+ GLenum buffer;
10616+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
10617+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
10618+ return;
10619+ }
10620+ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
10621+ params[0] = ENUM_TO_FLOAT(buffer);
10622+ }
10623+ break;
10624+ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
10625+ CHECK_EXT1(OES_read_format, "GetFloatv");
10626+ params[0] = (GLfloat)(ctx->Const.ColorReadType);
10627+ break;
10628+ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
10629+ CHECK_EXT1(OES_read_format, "GetFloatv");
10630+ params[0] = (GLfloat)(ctx->Const.ColorReadFormat);
10631+ break;
10632+ case GL_NUM_FRAGMENT_REGISTERS_ATI:
10633+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10634+ params[0] = (GLfloat)(6);
10635+ break;
10636+ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
10637+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10638+ params[0] = (GLfloat)(8);
10639+ break;
10640+ case GL_NUM_PASSES_ATI:
10641+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10642+ params[0] = (GLfloat)(2);
10643+ break;
10644+ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
10645+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10646+ params[0] = (GLfloat)(8);
10647+ break;
10648+ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
10649+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10650+ params[0] = (GLfloat)(16);
10651+ break;
10652+ case GL_COLOR_ALPHA_PAIRING_ATI:
10653+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10654+ params[0] = BOOLEAN_TO_FLOAT(GL_TRUE);
10655+ break;
10656+ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
10657+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10658+ params[0] = (GLfloat)(3);
10659+ break;
10660+ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
10661+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10662+ params[0] = (GLfloat)(3);
10663+ break;
10664+ case GL_STENCIL_BACK_FUNC:
10665+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.Function[1]);
10666+ break;
10667+ case GL_STENCIL_BACK_VALUE_MASK:
10668+ params[0] = (GLfloat)(ctx->Stencil.ValueMask[1]);
10669+ break;
10670+ case GL_STENCIL_BACK_REF:
10671+ params[0] = (GLfloat)(ctx->Stencil.Ref[1]);
10672+ break;
10673+ case GL_STENCIL_BACK_FAIL:
10674+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.FailFunc[1]);
10675+ break;
10676+ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
10677+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZFailFunc[1]);
10678+ break;
10679+ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
10680+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZPassFunc[1]);
10681+ break;
10682+ case GL_FRAMEBUFFER_BINDING_EXT:
10683+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10684+ params[0] = (GLfloat)(ctx->DrawBuffer->Name);
10685+ break;
10686+ case GL_RENDERBUFFER_BINDING_EXT:
10687+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10688+ params[0] = (GLfloat)(ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0);
10689+ break;
10690+ case GL_MAX_COLOR_ATTACHMENTS_EXT:
10691+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10692+ params[0] = (GLfloat)(ctx->Const.MaxColorAttachments);
10693+ break;
10694+ case GL_MAX_RENDERBUFFER_SIZE_EXT:
10695+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10696+ params[0] = (GLfloat)(ctx->Const.MaxRenderbufferSize);
10697+ break;
10698+ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
10699+ CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
10700+ params[0] = (GLfloat)(MAX_FRAGMENT_UNIFORM_COMPONENTS);
10701+ break;
10702+ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
10703+ CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
10704+ params[0] = ENUM_TO_FLOAT(ctx->Hint.FragmentShaderDerivative);
10705+ break;
10706+ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
10707+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10708+ params[0] = (GLfloat)(MAX_VERTEX_UNIFORM_COMPONENTS);
10709+ break;
10710+ case GL_MAX_VARYING_FLOATS_ARB:
10711+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10712+ params[0] = (GLfloat)(MAX_VARYING_FLOATS);
10713+ break;
10714+ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
10715+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10716+ params[0] = (GLfloat)(MAX_VERTEX_TEXTURE_IMAGE_UNITS);
10717+ break;
10718+ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
10719+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10720+ params[0] = (GLfloat)(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
10721+ break;
10722+ default:
10723+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv(pname=0x%x)", pname);
10724+ }
10725+}
10726+
10727+void GLAPIENTRY
10728+_mesa_GetIntegerv( GLenum pname, GLint *params )
10729+{
10730+ GET_CURRENT_CONTEXT(ctx);
10731+ ASSERT_OUTSIDE_BEGIN_END(ctx);
10732+
10733+ if (!params)
10734+ return;
10735+
10736+ if (ctx->NewState)
10737+ _mesa_update_state(ctx);
10738+
10739+ if (ctx->Driver.GetIntegerv &&
10740+ ctx->Driver.GetIntegerv(ctx, pname, params))
10741+ return;
10742+
10743+ switch (pname) {
10744+ case GL_ACCUM_RED_BITS:
10745+ params[0] = ctx->DrawBuffer->Visual.accumRedBits;
10746+ break;
10747+ case GL_ACCUM_GREEN_BITS:
10748+ params[0] = ctx->DrawBuffer->Visual.accumGreenBits;
10749+ break;
10750+ case GL_ACCUM_BLUE_BITS:
10751+ params[0] = ctx->DrawBuffer->Visual.accumBlueBits;
10752+ break;
10753+ case GL_ACCUM_ALPHA_BITS:
10754+ params[0] = ctx->DrawBuffer->Visual.accumAlphaBits;
10755+ break;
10756+ case GL_ACCUM_CLEAR_VALUE:
10757+ params[0] = FLOAT_TO_INT(ctx->Accum.ClearColor[0]);
10758+ params[1] = FLOAT_TO_INT(ctx->Accum.ClearColor[1]);
10759+ params[2] = FLOAT_TO_INT(ctx->Accum.ClearColor[2]);
10760+ params[3] = FLOAT_TO_INT(ctx->Accum.ClearColor[3]);
10761+ break;
10762+ case GL_ALPHA_BIAS:
10763+ params[0] = IROUND(ctx->Pixel.AlphaBias);
10764+ break;
10765+ case GL_ALPHA_BITS:
10766+ params[0] = ctx->DrawBuffer->Visual.alphaBits;
10767+ break;
10768+ case GL_ALPHA_SCALE:
10769+ params[0] = IROUND(ctx->Pixel.AlphaScale);
10770+ break;
10771+ case GL_ALPHA_TEST:
10772+ params[0] = BOOLEAN_TO_INT(ctx->Color.AlphaEnabled);
10773+ break;
10774+ case GL_ALPHA_TEST_FUNC:
10775+ params[0] = ENUM_TO_INT(ctx->Color.AlphaFunc);
10776+ break;
10777+ case GL_ALPHA_TEST_REF:
10778+ params[0] = FLOAT_TO_INT(ctx->Color.AlphaRef);
10779+ break;
10780+ case GL_ATTRIB_STACK_DEPTH:
10781+ params[0] = ctx->AttribStackDepth;
10782+ break;
10783+ case GL_AUTO_NORMAL:
10784+ params[0] = BOOLEAN_TO_INT(ctx->Eval.AutoNormal);
10785+ break;
10786+ case GL_AUX_BUFFERS:
10787+ params[0] = ctx->DrawBuffer->Visual.numAuxBuffers;
10788+ break;
10789+ case GL_BLEND:
10790+ params[0] = BOOLEAN_TO_INT(ctx->Color.BlendEnabled);
10791+ break;
10792+ case GL_BLEND_DST:
10793+ params[0] = ENUM_TO_INT(ctx->Color.BlendDstRGB);
10794+ break;
10795+ case GL_BLEND_SRC:
10796+ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcRGB);
10797+ break;
10798+ case GL_BLEND_SRC_RGB_EXT:
10799+ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcRGB);
10800+ break;
10801+ case GL_BLEND_DST_RGB_EXT:
10802+ params[0] = ENUM_TO_INT(ctx->Color.BlendDstRGB);
10803+ break;
10804+ case GL_BLEND_SRC_ALPHA_EXT:
10805+ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcA);
10806+ break;
10807+ case GL_BLEND_DST_ALPHA_EXT:
10808+ params[0] = ENUM_TO_INT(ctx->Color.BlendDstA);
10809+ break;
10810+ case GL_BLEND_EQUATION:
10811+ params[0] = ENUM_TO_INT(ctx->Color.BlendEquationRGB );
10812+ break;
10813+ case GL_BLEND_EQUATION_ALPHA_EXT:
10814+ params[0] = ENUM_TO_INT(ctx->Color.BlendEquationA );
10815+ break;
10816+ case GL_BLEND_COLOR_EXT:
10817+ params[0] = FLOAT_TO_INT(ctx->Color.BlendColor[0]);
10818+ params[1] = FLOAT_TO_INT(ctx->Color.BlendColor[1]);
10819+ params[2] = FLOAT_TO_INT(ctx->Color.BlendColor[2]);
10820+ params[3] = FLOAT_TO_INT(ctx->Color.BlendColor[3]);
10821+ break;
10822+ case GL_BLUE_BIAS:
10823+ params[0] = IROUND(ctx->Pixel.BlueBias);
10824+ break;
10825+ case GL_BLUE_BITS:
10826+ params[0] = ctx->DrawBuffer->Visual.blueBits;
10827+ break;
10828+ case GL_BLUE_SCALE:
10829+ params[0] = IROUND(ctx->Pixel.BlueScale);
10830+ break;
10831+ case GL_CLIENT_ATTRIB_STACK_DEPTH:
10832+ params[0] = ctx->ClientAttribStackDepth;
10833+ break;
10834+ case GL_CLIP_PLANE0:
10835+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 0) & 1);
10836+ break;
10837+ case GL_CLIP_PLANE1:
10838+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 1) & 1);
10839+ break;
10840+ case GL_CLIP_PLANE2:
10841+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 2) & 1);
10842+ break;
10843+ case GL_CLIP_PLANE3:
10844+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 3) & 1);
10845+ break;
10846+ case GL_CLIP_PLANE4:
10847+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 4) & 1);
10848+ break;
10849+ case GL_CLIP_PLANE5:
10850+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 5) & 1);
10851+ break;
10852+ case GL_COLOR_CLEAR_VALUE:
10853+ params[0] = FLOAT_TO_INT(ctx->Color.ClearColor[0]);
10854+ params[1] = FLOAT_TO_INT(ctx->Color.ClearColor[1]);
10855+ params[2] = FLOAT_TO_INT(ctx->Color.ClearColor[2]);
10856+ params[3] = FLOAT_TO_INT(ctx->Color.ClearColor[3]);
10857+ break;
10858+ case GL_COLOR_MATERIAL:
10859+ params[0] = BOOLEAN_TO_INT(ctx->Light.ColorMaterialEnabled);
10860+ break;
10861+ case GL_COLOR_MATERIAL_FACE:
10862+ params[0] = ENUM_TO_INT(ctx->Light.ColorMaterialFace);
10863+ break;
10864+ case GL_COLOR_MATERIAL_PARAMETER:
10865+ params[0] = ENUM_TO_INT(ctx->Light.ColorMaterialMode);
10866+ break;
10867+ case GL_COLOR_WRITEMASK:
10868+ params[0] = ctx->Color.ColorMask[RCOMP] ? 1 : 0;
10869+ params[1] = ctx->Color.ColorMask[GCOMP] ? 1 : 0;
10870+ params[2] = ctx->Color.ColorMask[BCOMP] ? 1 : 0;
10871+ params[3] = ctx->Color.ColorMask[ACOMP] ? 1 : 0;
10872+ break;
10873+ case GL_CULL_FACE:
10874+ params[0] = BOOLEAN_TO_INT(ctx->Polygon.CullFlag);
10875+ break;
10876+ case GL_CULL_FACE_MODE:
10877+ params[0] = ENUM_TO_INT(ctx->Polygon.CullFaceMode);
10878+ break;
10879+ case GL_CURRENT_COLOR:
10880+ {
10881+ FLUSH_CURRENT(ctx, 0);
10882+ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]);
10883+ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]);
10884+ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]);
10885+ params[3] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]);
10886+ }
10887+ break;
10888+ case GL_CURRENT_INDEX:
10889+ {
10890+ FLUSH_CURRENT(ctx, 0);
10891+ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]);
10892+ }
10893+ break;
10894+ case GL_CURRENT_NORMAL:
10895+ {
10896+ FLUSH_CURRENT(ctx, 0);
10897+ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]);
10898+ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]);
10899+ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]);
10900+ }
10901+ break;
10902+ case GL_CURRENT_RASTER_COLOR:
10903+ params[0] = FLOAT_TO_INT(ctx->Current.RasterColor[0]);
10904+ params[1] = FLOAT_TO_INT(ctx->Current.RasterColor[1]);
10905+ params[2] = FLOAT_TO_INT(ctx->Current.RasterColor[2]);
10906+ params[3] = FLOAT_TO_INT(ctx->Current.RasterColor[3]);
10907+ break;
10908+ case GL_CURRENT_RASTER_DISTANCE:
10909+ params[0] = IROUND(ctx->Current.RasterDistance);
10910+ break;
10911+ case GL_CURRENT_RASTER_INDEX:
10912+ params[0] = IROUND(ctx->Current.RasterIndex);
10913+ break;
10914+ case GL_CURRENT_RASTER_POSITION:
10915+ params[0] = IROUND(ctx->Current.RasterPos[0]);
10916+ params[1] = IROUND(ctx->Current.RasterPos[1]);
10917+ params[2] = IROUND(ctx->Current.RasterPos[2]);
10918+ params[3] = IROUND(ctx->Current.RasterPos[3]);
10919+ break;
10920+ case GL_CURRENT_RASTER_SECONDARY_COLOR:
10921+ params[0] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[0]);
10922+ params[1] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[1]);
10923+ params[2] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[2]);
10924+ params[3] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[3]);
10925+ break;
10926+ case GL_CURRENT_RASTER_TEXTURE_COORDS:
10927+ {
10928+ const GLuint texUnit = ctx->Texture.CurrentUnit;
10929+ params[0] = IROUND(ctx->Current.RasterTexCoords[texUnit][0]);
10930+ params[1] = IROUND(ctx->Current.RasterTexCoords[texUnit][1]);
10931+ params[2] = IROUND(ctx->Current.RasterTexCoords[texUnit][2]);
10932+ params[3] = IROUND(ctx->Current.RasterTexCoords[texUnit][3]);
10933+ }
10934+ break;
10935+ case GL_CURRENT_RASTER_POSITION_VALID:
10936+ params[0] = BOOLEAN_TO_INT(ctx->Current.RasterPosValid);
10937+ break;
10938+ case GL_CURRENT_TEXTURE_COORDS:
10939+ {
10940+ const GLuint texUnit = ctx->Texture.CurrentUnit;
10941+ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]);
10942+ params[1] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]);
10943+ params[2] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]);
10944+ params[3] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]);
10945+ }
10946+ break;
10947+ case GL_DEPTH_BIAS:
10948+ params[0] = IROUND(ctx->Pixel.DepthBias);
10949+ break;
10950+ case GL_DEPTH_BITS:
10951+ params[0] = ctx->DrawBuffer->Visual.depthBits;
10952+ break;
10953+ case GL_DEPTH_CLEAR_VALUE:
10954+ params[0] = IROUND(ctx->Depth.Clear);
10955+ break;
10956+ case GL_DEPTH_FUNC:
10957+ params[0] = ENUM_TO_INT(ctx->Depth.Func);
10958+ break;
10959+ case GL_DEPTH_RANGE:
10960+ params[0] = FLOAT_TO_INT(ctx->Viewport.Near);
10961+ params[1] = FLOAT_TO_INT(ctx->Viewport.Far);
10962+ break;
10963+ case GL_DEPTH_SCALE:
10964+ params[0] = IROUND(ctx->Pixel.DepthScale);
10965+ break;
10966+ case GL_DEPTH_TEST:
10967+ params[0] = BOOLEAN_TO_INT(ctx->Depth.Test);
10968+ break;
10969+ case GL_DEPTH_WRITEMASK:
10970+ params[0] = BOOLEAN_TO_INT(ctx->Depth.Mask);
10971+ break;
10972+ case GL_DITHER:
10973+ params[0] = BOOLEAN_TO_INT(ctx->Color.DitherFlag);
10974+ break;
10975+ case GL_DOUBLEBUFFER:
10976+ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.doubleBufferMode);
10977+ break;
10978+ case GL_DRAW_BUFFER:
10979+ params[0] = ENUM_TO_INT(ctx->DrawBuffer->ColorDrawBuffer[0]);
10980+ break;
10981+ case GL_EDGE_FLAG:
10982+ {
10983+ FLUSH_CURRENT(ctx, 0);
10984+ params[0] = BOOLEAN_TO_INT(ctx->Current.EdgeFlag);
10985+ }
10986+ break;
10987+ case GL_FEEDBACK_BUFFER_SIZE:
10988+ params[0] = ctx->Feedback.BufferSize;
10989+ break;
10990+ case GL_FEEDBACK_BUFFER_TYPE:
10991+ params[0] = ENUM_TO_INT(ctx->Feedback.Type);
10992+ break;
10993+ case GL_FOG:
10994+ params[0] = BOOLEAN_TO_INT(ctx->Fog.Enabled);
10995+ break;
10996+ case GL_FOG_COLOR:
10997+ params[0] = FLOAT_TO_INT(ctx->Fog.Color[0]);
10998+ params[1] = FLOAT_TO_INT(ctx->Fog.Color[1]);
10999+ params[2] = FLOAT_TO_INT(ctx->Fog.Color[2]);
11000+ params[3] = FLOAT_TO_INT(ctx->Fog.Color[3]);
11001+ break;
11002+ case GL_FOG_DENSITY:
11003+ params[0] = IROUND(ctx->Fog.Density);
11004+ break;
11005+ case GL_FOG_END:
11006+ params[0] = IROUND(ctx->Fog.End);
11007+ break;
11008+ case GL_FOG_HINT:
11009+ params[0] = ENUM_TO_INT(ctx->Hint.Fog);
11010+ break;
11011+ case GL_FOG_INDEX:
11012+ params[0] = IROUND(ctx->Fog.Index);
11013+ break;
11014+ case GL_FOG_MODE:
11015+ params[0] = ENUM_TO_INT(ctx->Fog.Mode);
11016+ break;
11017+ case GL_FOG_START:
11018+ params[0] = IROUND(ctx->Fog.Start);
11019+ break;
11020+ case GL_FRONT_FACE:
11021+ params[0] = ENUM_TO_INT(ctx->Polygon.FrontFace);
11022+ break;
11023+ case GL_GREEN_BIAS:
11024+ params[0] = IROUND(ctx->Pixel.GreenBias);
11025+ break;
11026+ case GL_GREEN_BITS:
11027+ params[0] = ctx->DrawBuffer->Visual.greenBits;
11028+ break;
11029+ case GL_GREEN_SCALE:
11030+ params[0] = IROUND(ctx->Pixel.GreenScale);
11031+ break;
11032+ case GL_INDEX_BITS:
11033+ params[0] = ctx->DrawBuffer->Visual.indexBits;
11034+ break;
11035+ case GL_INDEX_CLEAR_VALUE:
11036+ params[0] = ctx->Color.ClearIndex;
11037+ break;
11038+ case GL_INDEX_MODE:
11039+ params[0] = BOOLEAN_TO_INT(!ctx->DrawBuffer->Visual.rgbMode);
11040+ break;
11041+ case GL_INDEX_OFFSET:
11042+ params[0] = ctx->Pixel.IndexOffset;
11043+ break;
11044+ case GL_INDEX_SHIFT:
11045+ params[0] = ctx->Pixel.IndexShift;
11046+ break;
11047+ case GL_INDEX_WRITEMASK:
11048+ params[0] = ctx->Color.IndexMask;
11049+ break;
11050+ case GL_LIGHT0:
11051+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[0].Enabled);
11052+ break;
11053+ case GL_LIGHT1:
11054+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[1].Enabled);
11055+ break;
11056+ case GL_LIGHT2:
11057+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[2].Enabled);
11058+ break;
11059+ case GL_LIGHT3:
11060+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[3].Enabled);
11061+ break;
11062+ case GL_LIGHT4:
11063+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[4].Enabled);
11064+ break;
11065+ case GL_LIGHT5:
11066+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[5].Enabled);
11067+ break;
11068+ case GL_LIGHT6:
11069+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[6].Enabled);
11070+ break;
11071+ case GL_LIGHT7:
11072+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[7].Enabled);
11073+ break;
11074+ case GL_LIGHTING:
11075+ params[0] = BOOLEAN_TO_INT(ctx->Light.Enabled);
11076+ break;
11077+ case GL_LIGHT_MODEL_AMBIENT:
11078+ params[0] = FLOAT_TO_INT(ctx->Light.Model.Ambient[0]);
11079+ params[1] = FLOAT_TO_INT(ctx->Light.Model.Ambient[1]);
11080+ params[2] = FLOAT_TO_INT(ctx->Light.Model.Ambient[2]);
11081+ params[3] = FLOAT_TO_INT(ctx->Light.Model.Ambient[3]);
11082+ break;
11083+ case GL_LIGHT_MODEL_COLOR_CONTROL:
11084+ params[0] = ENUM_TO_INT(ctx->Light.Model.ColorControl);
11085+ break;
11086+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
11087+ params[0] = BOOLEAN_TO_INT(ctx->Light.Model.LocalViewer);
11088+ break;
11089+ case GL_LIGHT_MODEL_TWO_SIDE:
11090+ params[0] = BOOLEAN_TO_INT(ctx->Light.Model.TwoSide);
11091+ break;
11092+ case GL_LINE_SMOOTH:
11093+ params[0] = BOOLEAN_TO_INT(ctx->Line.SmoothFlag);
11094+ break;
11095+ case GL_LINE_SMOOTH_HINT:
11096+ params[0] = ENUM_TO_INT(ctx->Hint.LineSmooth);
11097+ break;
11098+ case GL_LINE_STIPPLE:
11099+ params[0] = BOOLEAN_TO_INT(ctx->Line.StippleFlag);
11100+ break;
11101+ case GL_LINE_STIPPLE_PATTERN:
11102+ params[0] = ctx->Line.StipplePattern;
11103+ break;
11104+ case GL_LINE_STIPPLE_REPEAT:
11105+ params[0] = ctx->Line.StippleFactor;
11106+ break;
11107+ case GL_LINE_WIDTH:
11108+ params[0] = IROUND(ctx->Line.Width);
11109+ break;
11110+ case GL_LINE_WIDTH_GRANULARITY:
11111+ params[0] = IROUND(ctx->Const.LineWidthGranularity);
11112+ break;
11113+ case GL_LINE_WIDTH_RANGE:
11114+ params[0] = IROUND(ctx->Const.MinLineWidthAA);
11115+ params[1] = IROUND(ctx->Const.MaxLineWidthAA);
11116+ break;
11117+ case GL_ALIASED_LINE_WIDTH_RANGE:
11118+ params[0] = IROUND(ctx->Const.MinLineWidth);
11119+ params[1] = IROUND(ctx->Const.MaxLineWidth);
11120+ break;
11121+ case GL_LIST_BASE:
11122+ params[0] = ctx->List.ListBase;
11123+ break;
11124+ case GL_LIST_INDEX:
11125+ params[0] = ctx->ListState.CurrentListNum;
11126+ break;
11127+ case GL_LIST_MODE:
11128+ {
11129+ GLenum mode;
11130+ if (!ctx->CompileFlag)
11131+ mode = 0;
11132+ else if (ctx->ExecuteFlag)
11133+ mode = GL_COMPILE_AND_EXECUTE;
11134+ else
11135+ mode = GL_COMPILE;
11136+ params[0] = ENUM_TO_INT(mode);
11137+ }
11138+ break;
11139+ case GL_INDEX_LOGIC_OP:
11140+ params[0] = BOOLEAN_TO_INT(ctx->Color.IndexLogicOpEnabled);
11141+ break;
11142+ case GL_COLOR_LOGIC_OP:
11143+ params[0] = BOOLEAN_TO_INT(ctx->Color.ColorLogicOpEnabled);
11144+ break;
11145+ case GL_LOGIC_OP_MODE:
11146+ params[0] = ENUM_TO_INT(ctx->Color.LogicOp);
11147+ break;
11148+ case GL_MAP1_COLOR_4:
11149+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Color4);
11150+ break;
11151+ case GL_MAP1_GRID_DOMAIN:
11152+ params[0] = IROUND(ctx->Eval.MapGrid1u1);
11153+ params[1] = IROUND(ctx->Eval.MapGrid1u2);
11154+ break;
11155+ case GL_MAP1_GRID_SEGMENTS:
11156+ params[0] = ctx->Eval.MapGrid1un;
11157+ break;
11158+ case GL_MAP1_INDEX:
11159+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Index);
11160+ break;
11161+ case GL_MAP1_NORMAL:
11162+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Normal);
11163+ break;
11164+ case GL_MAP1_TEXTURE_COORD_1:
11165+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord1);
11166+ break;
11167+ case GL_MAP1_TEXTURE_COORD_2:
11168+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord2);
11169+ break;
11170+ case GL_MAP1_TEXTURE_COORD_3:
11171+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord3);
11172+ break;
11173+ case GL_MAP1_TEXTURE_COORD_4:
11174+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord4);
11175+ break;
11176+ case GL_MAP1_VERTEX_3:
11177+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Vertex3);
11178+ break;
11179+ case GL_MAP1_VERTEX_4:
11180+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Vertex4);
11181+ break;
11182+ case GL_MAP2_COLOR_4:
11183+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Color4);
11184+ break;
11185+ case GL_MAP2_GRID_DOMAIN:
11186+ params[0] = IROUND(ctx->Eval.MapGrid2u1);
11187+ params[1] = IROUND(ctx->Eval.MapGrid2u2);
11188+ params[2] = IROUND(ctx->Eval.MapGrid2v1);
11189+ params[3] = IROUND(ctx->Eval.MapGrid2v2);
11190+ break;
11191+ case GL_MAP2_GRID_SEGMENTS:
11192+ params[0] = ctx->Eval.MapGrid2un;
11193+ params[1] = ctx->Eval.MapGrid2vn;
11194+ break;
11195+ case GL_MAP2_INDEX:
11196+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Index);
11197+ break;
11198+ case GL_MAP2_NORMAL:
11199+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Normal);
11200+ break;
11201+ case GL_MAP2_TEXTURE_COORD_1:
11202+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord1);
11203+ break;
11204+ case GL_MAP2_TEXTURE_COORD_2:
11205+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord2);
11206+ break;
11207+ case GL_MAP2_TEXTURE_COORD_3:
11208+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord3);
11209+ break;
11210+ case GL_MAP2_TEXTURE_COORD_4:
11211+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord4);
11212+ break;
11213+ case GL_MAP2_VERTEX_3:
11214+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Vertex3);
11215+ break;
11216+ case GL_MAP2_VERTEX_4:
11217+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Vertex4);
11218+ break;
11219+ case GL_MAP_COLOR:
11220+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MapColorFlag);
11221+ break;
11222+ case GL_MAP_STENCIL:
11223+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MapStencilFlag);
11224+ break;
11225+ case GL_MATRIX_MODE:
11226+ params[0] = ENUM_TO_INT(ctx->Transform.MatrixMode);
11227+ break;
11228+ case GL_MAX_ATTRIB_STACK_DEPTH:
11229+ params[0] = MAX_ATTRIB_STACK_DEPTH;
11230+ break;
11231+ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
11232+ params[0] = MAX_CLIENT_ATTRIB_STACK_DEPTH;
11233+ break;
11234+ case GL_MAX_CLIP_PLANES:
11235+ params[0] = ctx->Const.MaxClipPlanes;
11236+ break;
11237+ case GL_MAX_ELEMENTS_VERTICES:
11238+ params[0] = ctx->Const.MaxArrayLockSize;
11239+ break;
11240+ case GL_MAX_ELEMENTS_INDICES:
11241+ params[0] = ctx->Const.MaxArrayLockSize;
11242+ break;
11243+ case GL_MAX_EVAL_ORDER:
11244+ params[0] = MAX_EVAL_ORDER;
11245+ break;
11246+ case GL_MAX_LIGHTS:
11247+ params[0] = ctx->Const.MaxLights;
11248+ break;
11249+ case GL_MAX_LIST_NESTING:
11250+ params[0] = MAX_LIST_NESTING;
11251+ break;
11252+ case GL_MAX_MODELVIEW_STACK_DEPTH:
11253+ params[0] = MAX_MODELVIEW_STACK_DEPTH;
11254+ break;
11255+ case GL_MAX_NAME_STACK_DEPTH:
11256+ params[0] = MAX_NAME_STACK_DEPTH;
11257+ break;
11258+ case GL_MAX_PIXEL_MAP_TABLE:
11259+ params[0] = MAX_PIXEL_MAP_TABLE;
11260+ break;
11261+ case GL_MAX_PROJECTION_STACK_DEPTH:
11262+ params[0] = MAX_PROJECTION_STACK_DEPTH;
11263+ break;
11264+ case GL_MAX_TEXTURE_SIZE:
11265+ params[0] = 1 << (ctx->Const.MaxTextureLevels - 1);
11266+ break;
11267+ case GL_MAX_3D_TEXTURE_SIZE:
11268+ params[0] = 1 << (ctx->Const.Max3DTextureLevels - 1);
11269+ break;
11270+ case GL_MAX_TEXTURE_STACK_DEPTH:
11271+ params[0] = MAX_TEXTURE_STACK_DEPTH;
11272+ break;
11273+ case GL_MAX_VIEWPORT_DIMS:
11274+ params[0] = ctx->Const.MaxViewportWidth;
11275+ params[1] = ctx->Const.MaxViewportHeight;
11276+ break;
11277+ case GL_MODELVIEW_MATRIX:
11278+ {
11279+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
11280+ params[0] = IROUND(matrix[0]);
11281+ params[1] = IROUND(matrix[1]);
11282+ params[2] = IROUND(matrix[2]);
11283+ params[3] = IROUND(matrix[3]);
11284+ params[4] = IROUND(matrix[4]);
11285+ params[5] = IROUND(matrix[5]);
11286+ params[6] = IROUND(matrix[6]);
11287+ params[7] = IROUND(matrix[7]);
11288+ params[8] = IROUND(matrix[8]);
11289+ params[9] = IROUND(matrix[9]);
11290+ params[10] = IROUND(matrix[10]);
11291+ params[11] = IROUND(matrix[11]);
11292+ params[12] = IROUND(matrix[12]);
11293+ params[13] = IROUND(matrix[13]);
11294+ params[14] = IROUND(matrix[14]);
11295+ params[15] = IROUND(matrix[15]);
11296+ }
11297+ break;
11298+ case GL_MODELVIEW_STACK_DEPTH:
11299+ params[0] = ctx->ModelviewMatrixStack.Depth + 1;
11300+ break;
11301+ case GL_NAME_STACK_DEPTH:
11302+ params[0] = ctx->Select.NameStackDepth;
11303+ break;
11304+ case GL_NORMALIZE:
11305+ params[0] = BOOLEAN_TO_INT(ctx->Transform.Normalize);
11306+ break;
11307+ case GL_PACK_ALIGNMENT:
11308+ params[0] = ctx->Pack.Alignment;
11309+ break;
11310+ case GL_PACK_LSB_FIRST:
11311+ params[0] = BOOLEAN_TO_INT(ctx->Pack.LsbFirst);
11312+ break;
11313+ case GL_PACK_ROW_LENGTH:
11314+ params[0] = ctx->Pack.RowLength;
11315+ break;
11316+ case GL_PACK_SKIP_PIXELS:
11317+ params[0] = ctx->Pack.SkipPixels;
11318+ break;
11319+ case GL_PACK_SKIP_ROWS:
11320+ params[0] = ctx->Pack.SkipRows;
11321+ break;
11322+ case GL_PACK_SWAP_BYTES:
11323+ params[0] = BOOLEAN_TO_INT(ctx->Pack.SwapBytes);
11324+ break;
11325+ case GL_PACK_SKIP_IMAGES_EXT:
11326+ params[0] = ctx->Pack.SkipImages;
11327+ break;
11328+ case GL_PACK_IMAGE_HEIGHT_EXT:
11329+ params[0] = ctx->Pack.ImageHeight;
11330+ break;
11331+ case GL_PACK_INVERT_MESA:
11332+ params[0] = BOOLEAN_TO_INT(ctx->Pack.Invert);
11333+ break;
11334+ case GL_PERSPECTIVE_CORRECTION_HINT:
11335+ params[0] = ENUM_TO_INT(ctx->Hint.PerspectiveCorrection);
11336+ break;
11337+ case GL_PIXEL_MAP_A_TO_A_SIZE:
11338+ params[0] = ctx->Pixel.MapAtoAsize;
11339+ break;
11340+ case GL_PIXEL_MAP_B_TO_B_SIZE:
11341+ params[0] = ctx->Pixel.MapBtoBsize;
11342+ break;
11343+ case GL_PIXEL_MAP_G_TO_G_SIZE:
11344+ params[0] = ctx->Pixel.MapGtoGsize;
11345+ break;
11346+ case GL_PIXEL_MAP_I_TO_A_SIZE:
11347+ params[0] = ctx->Pixel.MapItoAsize;
11348+ break;
11349+ case GL_PIXEL_MAP_I_TO_B_SIZE:
11350+ params[0] = ctx->Pixel.MapItoBsize;
11351+ break;
11352+ case GL_PIXEL_MAP_I_TO_G_SIZE:
11353+ params[0] = ctx->Pixel.MapItoGsize;
11354+ break;
11355+ case GL_PIXEL_MAP_I_TO_I_SIZE:
11356+ params[0] = ctx->Pixel.MapItoIsize;
11357+ break;
11358+ case GL_PIXEL_MAP_I_TO_R_SIZE:
11359+ params[0] = ctx->Pixel.MapItoRsize;
11360+ break;
11361+ case GL_PIXEL_MAP_R_TO_R_SIZE:
11362+ params[0] = ctx->Pixel.MapRtoRsize;
11363+ break;
11364+ case GL_PIXEL_MAP_S_TO_S_SIZE:
11365+ params[0] = ctx->Pixel.MapStoSsize;
11366+ break;
11367+ case GL_POINT_SIZE:
11368+ params[0] = IROUND(ctx->Point.Size);
11369+ break;
11370+ case GL_POINT_SIZE_GRANULARITY:
11371+ params[0] = IROUND(ctx->Const.PointSizeGranularity);
11372+ break;
11373+ case GL_POINT_SIZE_RANGE:
11374+ params[0] = IROUND(ctx->Const.MinPointSizeAA);
11375+ params[1] = IROUND(ctx->Const.MaxPointSizeAA);
11376+ break;
11377+ case GL_ALIASED_POINT_SIZE_RANGE:
11378+ params[0] = IROUND(ctx->Const.MinPointSize);
11379+ params[1] = IROUND(ctx->Const.MaxPointSize);
11380+ break;
11381+ case GL_POINT_SMOOTH:
11382+ params[0] = BOOLEAN_TO_INT(ctx->Point.SmoothFlag);
11383+ break;
11384+ case GL_POINT_SMOOTH_HINT:
11385+ params[0] = ENUM_TO_INT(ctx->Hint.PointSmooth);
11386+ break;
11387+ case GL_POINT_SIZE_MIN_EXT:
11388+ params[0] = IROUND(ctx->Point.MinSize);
11389+ break;
11390+ case GL_POINT_SIZE_MAX_EXT:
11391+ params[0] = IROUND(ctx->Point.MaxSize);
11392+ break;
11393+ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
11394+ params[0] = IROUND(ctx->Point.Threshold);
11395+ break;
11396+ case GL_DISTANCE_ATTENUATION_EXT:
11397+ params[0] = IROUND(ctx->Point.Params[0]);
11398+ params[1] = IROUND(ctx->Point.Params[1]);
11399+ params[2] = IROUND(ctx->Point.Params[2]);
11400+ break;
11401+ case GL_POLYGON_MODE:
11402+ params[0] = ENUM_TO_INT(ctx->Polygon.FrontMode);
11403+ params[1] = ENUM_TO_INT(ctx->Polygon.BackMode);
11404+ break;
11405+ case GL_POLYGON_OFFSET_BIAS_EXT:
11406+ params[0] = IROUND(ctx->Polygon.OffsetUnits);
11407+ break;
11408+ case GL_POLYGON_OFFSET_FACTOR:
11409+ params[0] = IROUND(ctx->Polygon.OffsetFactor );
11410+ break;
11411+ case GL_POLYGON_OFFSET_UNITS:
11412+ params[0] = IROUND(ctx->Polygon.OffsetUnits );
11413+ break;
11414+ case GL_POLYGON_SMOOTH:
11415+ params[0] = BOOLEAN_TO_INT(ctx->Polygon.SmoothFlag);
11416+ break;
11417+ case GL_POLYGON_SMOOTH_HINT:
11418+ params[0] = ENUM_TO_INT(ctx->Hint.PolygonSmooth);
11419+ break;
11420+ case GL_POLYGON_STIPPLE:
11421+ params[0] = BOOLEAN_TO_INT(ctx->Polygon.StippleFlag);
11422+ break;
11423+ case GL_PROJECTION_MATRIX:
11424+ {
11425+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
11426+ params[0] = IROUND(matrix[0]);
11427+ params[1] = IROUND(matrix[1]);
11428+ params[2] = IROUND(matrix[2]);
11429+ params[3] = IROUND(matrix[3]);
11430+ params[4] = IROUND(matrix[4]);
11431+ params[5] = IROUND(matrix[5]);
11432+ params[6] = IROUND(matrix[6]);
11433+ params[7] = IROUND(matrix[7]);
11434+ params[8] = IROUND(matrix[8]);
11435+ params[9] = IROUND(matrix[9]);
11436+ params[10] = IROUND(matrix[10]);
11437+ params[11] = IROUND(matrix[11]);
11438+ params[12] = IROUND(matrix[12]);
11439+ params[13] = IROUND(matrix[13]);
11440+ params[14] = IROUND(matrix[14]);
11441+ params[15] = IROUND(matrix[15]);
11442+ }
11443+ break;
11444+ case GL_PROJECTION_STACK_DEPTH:
11445+ params[0] = ctx->ProjectionMatrixStack.Depth + 1;
11446+ break;
11447+ case GL_READ_BUFFER:
11448+ params[0] = ENUM_TO_INT(ctx->ReadBuffer->ColorReadBuffer);
11449+ break;
11450+ case GL_RED_BIAS:
11451+ params[0] = IROUND(ctx->Pixel.RedBias);
11452+ break;
11453+ case GL_RED_BITS:
11454+ params[0] = ctx->DrawBuffer->Visual.redBits ;
11455+ break;
11456+ case GL_RED_SCALE:
11457+ params[0] = IROUND(ctx->Pixel.RedScale);
11458+ break;
11459+ case GL_RENDER_MODE:
11460+ params[0] = ENUM_TO_INT(ctx->RenderMode);
11461+ break;
11462+ case GL_RESCALE_NORMAL:
11463+ params[0] = BOOLEAN_TO_INT(ctx->Transform.RescaleNormals);
11464+ break;
11465+ case GL_RGBA_MODE:
11466+ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.rgbMode);
11467+ break;
11468+ case GL_SCISSOR_BOX:
11469+ params[0] = ctx->Scissor.X;
11470+ params[1] = ctx->Scissor.Y;
11471+ params[2] = ctx->Scissor.Width;
11472+ params[3] = ctx->Scissor.Height;
11473+ break;
11474+ case GL_SCISSOR_TEST:
11475+ params[0] = BOOLEAN_TO_INT(ctx->Scissor.Enabled);
11476+ break;
11477+ case GL_SELECTION_BUFFER_SIZE:
11478+ params[0] = ctx->Select.BufferSize;
11479+ break;
11480+ case GL_SHADE_MODEL:
11481+ params[0] = ENUM_TO_INT(ctx->Light.ShadeModel);
11482+ break;
11483+ case GL_SHARED_TEXTURE_PALETTE_EXT:
11484+ params[0] = BOOLEAN_TO_INT(ctx->Texture.SharedPalette);
11485+ break;
11486+ case GL_STENCIL_BITS:
11487+ params[0] = ctx->DrawBuffer->Visual.stencilBits;
11488+ break;
11489+ case GL_STENCIL_CLEAR_VALUE:
11490+ params[0] = ctx->Stencil.Clear;
11491+ break;
11492+ case GL_STENCIL_FAIL:
11493+ params[0] = ENUM_TO_INT(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
11494+ break;
11495+ case GL_STENCIL_FUNC:
11496+ params[0] = ENUM_TO_INT(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
11497+ break;
11498+ case GL_STENCIL_PASS_DEPTH_FAIL:
11499+ params[0] = ENUM_TO_INT(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
11500+ break;
11501+ case GL_STENCIL_PASS_DEPTH_PASS:
11502+ params[0] = ENUM_TO_INT(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
11503+ break;
11504+ case GL_STENCIL_REF:
11505+ params[0] = ctx->Stencil.Ref[ctx->Stencil.ActiveFace];
11506+ break;
11507+ case GL_STENCIL_TEST:
11508+ params[0] = BOOLEAN_TO_INT(ctx->Stencil.Enabled);
11509+ break;
11510+ case GL_STENCIL_VALUE_MASK:
11511+ params[0] = ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace];
11512+ break;
11513+ case GL_STENCIL_WRITEMASK:
11514+ params[0] = ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace];
11515+ break;
11516+ case GL_STEREO:
11517+ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.stereoMode);
11518+ break;
11519+ case GL_SUBPIXEL_BITS:
11520+ params[0] = ctx->Const.SubPixelBits;
11521+ break;
11522+ case GL_TEXTURE_1D:
11523+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_1D));
11524+ break;
11525+ case GL_TEXTURE_2D:
11526+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_2D));
11527+ break;
11528+ case GL_TEXTURE_3D:
11529+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_3D));
11530+ break;
11531+ case GL_TEXTURE_BINDING_1D:
11532+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name;
11533+ break;
11534+ case GL_TEXTURE_BINDING_2D:
11535+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name;
11536+ break;
11537+ case GL_TEXTURE_BINDING_3D:
11538+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name;
11539+ break;
11540+ case GL_TEXTURE_ENV_COLOR:
11541+ {
11542+ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
11543+ params[0] = FLOAT_TO_INT(color[0]);
11544+ params[1] = FLOAT_TO_INT(color[1]);
11545+ params[2] = FLOAT_TO_INT(color[2]);
11546+ params[3] = FLOAT_TO_INT(color[3]);
11547+ }
11548+ break;
11549+ case GL_TEXTURE_ENV_MODE:
11550+ params[0] = ENUM_TO_INT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
11551+ break;
11552+ case GL_TEXTURE_GEN_S:
11553+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
11554+ break;
11555+ case GL_TEXTURE_GEN_T:
11556+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0));
11557+ break;
11558+ case GL_TEXTURE_GEN_R:
11559+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0));
11560+ break;
11561+ case GL_TEXTURE_GEN_Q:
11562+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0));
11563+ break;
11564+ case GL_TEXTURE_MATRIX:
11565+ {
11566+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
11567+ params[0] = IROUND(matrix[0]);
11568+ params[1] = IROUND(matrix[1]);
11569+ params[2] = IROUND(matrix[2]);
11570+ params[3] = IROUND(matrix[3]);
11571+ params[4] = IROUND(matrix[4]);
11572+ params[5] = IROUND(matrix[5]);
11573+ params[6] = IROUND(matrix[6]);
11574+ params[7] = IROUND(matrix[7]);
11575+ params[8] = IROUND(matrix[8]);
11576+ params[9] = IROUND(matrix[9]);
11577+ params[10] = IROUND(matrix[10]);
11578+ params[11] = IROUND(matrix[11]);
11579+ params[12] = IROUND(matrix[12]);
11580+ params[13] = IROUND(matrix[13]);
11581+ params[14] = IROUND(matrix[14]);
11582+ params[15] = IROUND(matrix[15]);
11583+ }
11584+ break;
11585+ case GL_TEXTURE_STACK_DEPTH:
11586+ params[0] = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1;
11587+ break;
11588+ case GL_UNPACK_ALIGNMENT:
11589+ params[0] = ctx->Unpack.Alignment;
11590+ break;
11591+ case GL_UNPACK_LSB_FIRST:
11592+ params[0] = BOOLEAN_TO_INT(ctx->Unpack.LsbFirst);
11593+ break;
11594+ case GL_UNPACK_ROW_LENGTH:
11595+ params[0] = ctx->Unpack.RowLength;
11596+ break;
11597+ case GL_UNPACK_SKIP_PIXELS:
11598+ params[0] = ctx->Unpack.SkipPixels;
11599+ break;
11600+ case GL_UNPACK_SKIP_ROWS:
11601+ params[0] = ctx->Unpack.SkipRows;
11602+ break;
11603+ case GL_UNPACK_SWAP_BYTES:
11604+ params[0] = BOOLEAN_TO_INT(ctx->Unpack.SwapBytes);
11605+ break;
11606+ case GL_UNPACK_SKIP_IMAGES_EXT:
11607+ params[0] = ctx->Unpack.SkipImages;
11608+ break;
11609+ case GL_UNPACK_IMAGE_HEIGHT_EXT:
11610+ params[0] = ctx->Unpack.ImageHeight;
11611+ break;
11612+ case GL_UNPACK_CLIENT_STORAGE_APPLE:
11613+ params[0] = BOOLEAN_TO_INT(ctx->Unpack.ClientStorage);
11614+ break;
11615+ case GL_VIEWPORT:
11616+ params[0] = ctx->Viewport.X;
11617+ params[1] = ctx->Viewport.Y;
11618+ params[2] = ctx->Viewport.Width;
11619+ params[3] = ctx->Viewport.Height;
11620+ break;
11621+ case GL_ZOOM_X:
11622+ params[0] = IROUND(ctx->Pixel.ZoomX);
11623+ break;
11624+ case GL_ZOOM_Y:
11625+ params[0] = IROUND(ctx->Pixel.ZoomY);
11626+ break;
11627+ case GL_VERTEX_ARRAY:
11628+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Vertex.Enabled);
11629+ break;
11630+ case GL_VERTEX_ARRAY_SIZE:
11631+ params[0] = ctx->Array.ArrayObj->Vertex.Size;
11632+ break;
11633+ case GL_VERTEX_ARRAY_TYPE:
11634+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Vertex.Type);
11635+ break;
11636+ case GL_VERTEX_ARRAY_STRIDE:
11637+ params[0] = ctx->Array.ArrayObj->Vertex.Stride;
11638+ break;
11639+ case GL_VERTEX_ARRAY_COUNT_EXT:
11640+ params[0] = 0;
11641+ break;
11642+ case GL_NORMAL_ARRAY:
11643+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Normal.Enabled);
11644+ break;
11645+ case GL_NORMAL_ARRAY_TYPE:
11646+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Normal.Type);
11647+ break;
11648+ case GL_NORMAL_ARRAY_STRIDE:
11649+ params[0] = ctx->Array.ArrayObj->Normal.Stride;
11650+ break;
11651+ case GL_NORMAL_ARRAY_COUNT_EXT:
11652+ params[0] = 0;
11653+ break;
11654+ case GL_COLOR_ARRAY:
11655+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Color.Enabled);
11656+ break;
11657+ case GL_COLOR_ARRAY_SIZE:
11658+ params[0] = ctx->Array.ArrayObj->Color.Size;
11659+ break;
11660+ case GL_COLOR_ARRAY_TYPE:
11661+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Color.Type);
11662+ break;
11663+ case GL_COLOR_ARRAY_STRIDE:
11664+ params[0] = ctx->Array.ArrayObj->Color.Stride;
11665+ break;
11666+ case GL_COLOR_ARRAY_COUNT_EXT:
11667+ params[0] = 0;
11668+ break;
11669+ case GL_INDEX_ARRAY:
11670+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Index.Enabled);
11671+ break;
11672+ case GL_INDEX_ARRAY_TYPE:
11673+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Index.Type);
11674+ break;
11675+ case GL_INDEX_ARRAY_STRIDE:
11676+ params[0] = ctx->Array.ArrayObj->Index.Stride;
11677+ break;
11678+ case GL_INDEX_ARRAY_COUNT_EXT:
11679+ params[0] = 0;
11680+ break;
11681+ case GL_TEXTURE_COORD_ARRAY:
11682+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
11683+ break;
11684+ case GL_TEXTURE_COORD_ARRAY_SIZE:
11685+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size;
11686+ break;
11687+ case GL_TEXTURE_COORD_ARRAY_TYPE:
11688+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
11689+ break;
11690+ case GL_TEXTURE_COORD_ARRAY_STRIDE:
11691+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride;
11692+ break;
11693+ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
11694+ params[0] = 0;
11695+ break;
11696+ case GL_EDGE_FLAG_ARRAY:
11697+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->EdgeFlag.Enabled);
11698+ break;
11699+ case GL_EDGE_FLAG_ARRAY_STRIDE:
11700+ params[0] = ctx->Array.ArrayObj->EdgeFlag.Stride;
11701+ break;
11702+ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
11703+ params[0] = 0;
11704+ break;
11705+ case GL_MAX_TEXTURE_UNITS_ARB:
11706+ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
11707+ params[0] = ctx->Const.MaxTextureUnits;
11708+ break;
11709+ case GL_ACTIVE_TEXTURE_ARB:
11710+ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
11711+ params[0] = GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit;
11712+ break;
11713+ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
11714+ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
11715+ params[0] = GL_TEXTURE0_ARB + ctx->Array.ActiveTexture;
11716+ break;
11717+ case GL_TEXTURE_CUBE_MAP_ARB:
11718+ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
11719+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB));
11720+ break;
11721+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
11722+ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
11723+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name;
11724+ break;
11725+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
11726+ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
11727+ params[0] = (1 << (ctx->Const.MaxCubeTextureLevels - 1));
11728+ break;
11729+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
11730+ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
11731+ params[0] = ctx->Hint.TextureCompression;
11732+ break;
11733+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
11734+ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
11735+ params[0] = _mesa_get_compressed_formats(ctx, NULL, GL_FALSE);
11736+ break;
11737+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
11738+ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
11739+ {
11740+ GLint formats[100];
11741+ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
11742+ ASSERT(n <= 100);
11743+ for (i = 0; i < n; i++)
11744+ params[i] = ENUM_TO_INT(formats[i]);
11745+ }
11746+ break;
11747+ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
11748+ CHECK_EXT1(EXT_compiled_vertex_array, "GetIntegerv");
11749+ params[0] = ctx->Array.LockFirst;
11750+ break;
11751+ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
11752+ CHECK_EXT1(EXT_compiled_vertex_array, "GetIntegerv");
11753+ params[0] = ctx->Array.LockCount;
11754+ break;
11755+ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
11756+ {
11757+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
11758+ params[0] = IROUND(matrix[0]);
11759+ params[1] = IROUND(matrix[4]);
11760+ params[2] = IROUND(matrix[8]);
11761+ params[3] = IROUND(matrix[12]);
11762+ params[4] = IROUND(matrix[1]);
11763+ params[5] = IROUND(matrix[5]);
11764+ params[6] = IROUND(matrix[9]);
11765+ params[7] = IROUND(matrix[13]);
11766+ params[8] = IROUND(matrix[2]);
11767+ params[9] = IROUND(matrix[6]);
11768+ params[10] = IROUND(matrix[10]);
11769+ params[11] = IROUND(matrix[14]);
11770+ params[12] = IROUND(matrix[3]);
11771+ params[13] = IROUND(matrix[7]);
11772+ params[14] = IROUND(matrix[11]);
11773+ params[15] = IROUND(matrix[15]);
11774+ }
11775+ break;
11776+ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
11777+ {
11778+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
11779+ params[0] = IROUND(matrix[0]);
11780+ params[1] = IROUND(matrix[4]);
11781+ params[2] = IROUND(matrix[8]);
11782+ params[3] = IROUND(matrix[12]);
11783+ params[4] = IROUND(matrix[1]);
11784+ params[5] = IROUND(matrix[5]);
11785+ params[6] = IROUND(matrix[9]);
11786+ params[7] = IROUND(matrix[13]);
11787+ params[8] = IROUND(matrix[2]);
11788+ params[9] = IROUND(matrix[6]);
11789+ params[10] = IROUND(matrix[10]);
11790+ params[11] = IROUND(matrix[14]);
11791+ params[12] = IROUND(matrix[3]);
11792+ params[13] = IROUND(matrix[7]);
11793+ params[14] = IROUND(matrix[11]);
11794+ params[15] = IROUND(matrix[15]);
11795+ }
11796+ break;
11797+ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
11798+ {
11799+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
11800+ params[0] = IROUND(matrix[0]);
11801+ params[1] = IROUND(matrix[4]);
11802+ params[2] = IROUND(matrix[8]);
11803+ params[3] = IROUND(matrix[12]);
11804+ params[4] = IROUND(matrix[1]);
11805+ params[5] = IROUND(matrix[5]);
11806+ params[6] = IROUND(matrix[9]);
11807+ params[7] = IROUND(matrix[13]);
11808+ params[8] = IROUND(matrix[2]);
11809+ params[9] = IROUND(matrix[6]);
11810+ params[10] = IROUND(matrix[10]);
11811+ params[11] = IROUND(matrix[14]);
11812+ params[12] = IROUND(matrix[3]);
11813+ params[13] = IROUND(matrix[7]);
11814+ params[14] = IROUND(matrix[11]);
11815+ params[15] = IROUND(matrix[15]);
11816+ }
11817+ break;
11818+ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
11819+ {
11820+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
11821+ params[0] = IROUND(matrix[0]);
11822+ params[1] = IROUND(matrix[4]);
11823+ params[2] = IROUND(matrix[8]);
11824+ params[3] = IROUND(matrix[12]);
11825+ params[4] = IROUND(matrix[1]);
11826+ params[5] = IROUND(matrix[5]);
11827+ params[6] = IROUND(matrix[9]);
11828+ params[7] = IROUND(matrix[13]);
11829+ params[8] = IROUND(matrix[2]);
11830+ params[9] = IROUND(matrix[6]);
11831+ params[10] = IROUND(matrix[10]);
11832+ params[11] = IROUND(matrix[14]);
11833+ params[12] = IROUND(matrix[3]);
11834+ params[13] = IROUND(matrix[7]);
11835+ params[14] = IROUND(matrix[11]);
11836+ params[15] = IROUND(matrix[15]);
11837+ }
11838+ break;
11839+ case GL_COLOR_MATRIX_SGI:
11840+ {
11841+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
11842+ params[0] = IROUND(matrix[0]);
11843+ params[1] = IROUND(matrix[1]);
11844+ params[2] = IROUND(matrix[2]);
11845+ params[3] = IROUND(matrix[3]);
11846+ params[4] = IROUND(matrix[4]);
11847+ params[5] = IROUND(matrix[5]);
11848+ params[6] = IROUND(matrix[6]);
11849+ params[7] = IROUND(matrix[7]);
11850+ params[8] = IROUND(matrix[8]);
11851+ params[9] = IROUND(matrix[9]);
11852+ params[10] = IROUND(matrix[10]);
11853+ params[11] = IROUND(matrix[11]);
11854+ params[12] = IROUND(matrix[12]);
11855+ params[13] = IROUND(matrix[13]);
11856+ params[14] = IROUND(matrix[14]);
11857+ params[15] = IROUND(matrix[15]);
11858+ }
11859+ break;
11860+ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
11861+ params[0] = ctx->ColorMatrixStack.Depth + 1;
11862+ break;
11863+ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
11864+ params[0] = MAX_COLOR_STACK_DEPTH;
11865+ break;
11866+ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
11867+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[0]);
11868+ break;
11869+ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
11870+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[1]);
11871+ break;
11872+ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
11873+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[2]);
11874+ break;
11875+ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
11876+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[3]);
11877+ break;
11878+ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
11879+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[0]);
11880+ break;
11881+ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
11882+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[1]);
11883+ break;
11884+ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
11885+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[2]);
11886+ break;
11887+ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
11888+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[3]);
11889+ break;
11890+ case GL_CONVOLUTION_1D_EXT:
11891+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11892+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Convolution1DEnabled);
11893+ break;
11894+ case GL_CONVOLUTION_2D_EXT:
11895+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11896+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Convolution2DEnabled);
11897+ break;
11898+ case GL_SEPARABLE_2D_EXT:
11899+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11900+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Separable2DEnabled);
11901+ break;
11902+ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
11903+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11904+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[0]);
11905+ break;
11906+ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
11907+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11908+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[1]);
11909+ break;
11910+ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
11911+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11912+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[2]);
11913+ break;
11914+ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
11915+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11916+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[3]);
11917+ break;
11918+ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
11919+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11920+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[0]);
11921+ break;
11922+ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
11923+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11924+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[1]);
11925+ break;
11926+ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
11927+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11928+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[2]);
11929+ break;
11930+ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
11931+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11932+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[3]);
11933+ break;
11934+ case GL_HISTOGRAM:
11935+ CHECK_EXT1(EXT_histogram, "GetIntegerv");
11936+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.HistogramEnabled);
11937+ break;
11938+ case GL_MINMAX:
11939+ CHECK_EXT1(EXT_histogram, "GetIntegerv");
11940+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MinMaxEnabled);
11941+ break;
11942+ case GL_COLOR_TABLE_SGI:
11943+ CHECK_EXT1(SGI_color_table, "GetIntegerv");
11944+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.ColorTableEnabled);
11945+ break;
11946+ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
11947+ CHECK_EXT1(SGI_color_table, "GetIntegerv");
11948+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.PostConvolutionColorTableEnabled);
11949+ break;
11950+ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
11951+ CHECK_EXT1(SGI_color_table, "GetIntegerv");
11952+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.PostColorMatrixColorTableEnabled);
11953+ break;
11954+ case GL_TEXTURE_COLOR_TABLE_SGI:
11955+ CHECK_EXT1(SGI_texture_color_table, "GetIntegerv");
11956+ params[0] = BOOLEAN_TO_INT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled);
11957+ break;
11958+ case GL_COLOR_SUM_EXT:
11959+ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetIntegerv");
11960+ params[0] = BOOLEAN_TO_INT(ctx->Fog.ColorSumEnabled);
11961+ break;
11962+ case GL_CURRENT_SECONDARY_COLOR_EXT:
11963+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
11964+ {
11965+ FLUSH_CURRENT(ctx, 0);
11966+ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]);
11967+ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]);
11968+ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]);
11969+ params[3] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]);
11970+ }
11971+ break;
11972+ case GL_SECONDARY_COLOR_ARRAY_EXT:
11973+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
11974+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->SecondaryColor.Enabled);
11975+ break;
11976+ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
11977+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
11978+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->SecondaryColor.Type);
11979+ break;
11980+ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
11981+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
11982+ params[0] = ctx->Array.ArrayObj->SecondaryColor.Stride;
11983+ break;
11984+ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
11985+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
11986+ params[0] = ctx->Array.ArrayObj->SecondaryColor.Size;
11987+ break;
11988+ case GL_CURRENT_FOG_COORDINATE_EXT:
11989+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
11990+ {
11991+ FLUSH_CURRENT(ctx, 0);
11992+ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_FOG][0]);
11993+ }
11994+ break;
11995+ case GL_FOG_COORDINATE_ARRAY_EXT:
11996+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
11997+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->FogCoord.Enabled);
11998+ break;
11999+ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
12000+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
12001+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->FogCoord.Type);
12002+ break;
12003+ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
12004+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
12005+ params[0] = ctx->Array.ArrayObj->FogCoord.Stride;
12006+ break;
12007+ case GL_FOG_COORDINATE_SOURCE_EXT:
12008+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
12009+ params[0] = ENUM_TO_INT(ctx->Fog.FogCoordinateSource);
12010+ break;
12011+ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
12012+ CHECK_EXT1(EXT_texture_lod_bias, "GetIntegerv");
12013+ params[0] = IROUND(ctx->Const.MaxTextureLodBias);
12014+ break;
12015+ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
12016+ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetIntegerv");
12017+ params[0] = IROUND(ctx->Const.MaxTextureMaxAnisotropy);
12018+ break;
12019+ case GL_MULTISAMPLE_ARB:
12020+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12021+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.Enabled);
12022+ break;
12023+ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
12024+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12025+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleAlphaToCoverage);
12026+ break;
12027+ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
12028+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12029+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleAlphaToOne);
12030+ break;
12031+ case GL_SAMPLE_COVERAGE_ARB:
12032+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12033+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleCoverage);
12034+ break;
12035+ case GL_SAMPLE_COVERAGE_VALUE_ARB:
12036+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12037+ params[0] = IROUND(ctx->Multisample.SampleCoverageValue);
12038+ break;
12039+ case GL_SAMPLE_COVERAGE_INVERT_ARB:
12040+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12041+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleCoverageInvert);
12042+ break;
12043+ case GL_SAMPLE_BUFFERS_ARB:
12044+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12045+ params[0] = ctx->DrawBuffer->Visual.sampleBuffers;
12046+ break;
12047+ case GL_SAMPLES_ARB:
12048+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12049+ params[0] = ctx->DrawBuffer->Visual.samples;
12050+ break;
12051+ case GL_RASTER_POSITION_UNCLIPPED_IBM:
12052+ CHECK_EXT1(IBM_rasterpos_clip, "GetIntegerv");
12053+ params[0] = BOOLEAN_TO_INT(ctx->Transform.RasterPositionUnclipped);
12054+ break;
12055+ case GL_POINT_SPRITE_NV:
12056+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetIntegerv");
12057+ params[0] = BOOLEAN_TO_INT(ctx->Point.PointSprite);
12058+ break;
12059+ case GL_POINT_SPRITE_R_MODE_NV:
12060+ CHECK_EXT1(NV_point_sprite, "GetIntegerv");
12061+ params[0] = ENUM_TO_INT(ctx->Point.SpriteRMode);
12062+ break;
12063+ case GL_POINT_SPRITE_COORD_ORIGIN:
12064+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetIntegerv");
12065+ params[0] = ENUM_TO_INT(ctx->Point.SpriteOrigin);
12066+ break;
12067+ case GL_GENERATE_MIPMAP_HINT_SGIS:
12068+ CHECK_EXT1(SGIS_generate_mipmap, "GetIntegerv");
12069+ params[0] = ENUM_TO_INT(ctx->Hint.GenerateMipmap);
12070+ break;
12071+ case GL_VERTEX_PROGRAM_BINDING_NV:
12072+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12073+ params[0] = (ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0);
12074+ break;
12075+ case GL_VERTEX_ATTRIB_ARRAY0_NV:
12076+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12077+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[0].Enabled);
12078+ break;
12079+ case GL_VERTEX_ATTRIB_ARRAY1_NV:
12080+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12081+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[1].Enabled);
12082+ break;
12083+ case GL_VERTEX_ATTRIB_ARRAY2_NV:
12084+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12085+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[2].Enabled);
12086+ break;
12087+ case GL_VERTEX_ATTRIB_ARRAY3_NV:
12088+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12089+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[3].Enabled);
12090+ break;
12091+ case GL_VERTEX_ATTRIB_ARRAY4_NV:
12092+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12093+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[4].Enabled);
12094+ break;
12095+ case GL_VERTEX_ATTRIB_ARRAY5_NV:
12096+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12097+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[5].Enabled);
12098+ break;
12099+ case GL_VERTEX_ATTRIB_ARRAY6_NV:
12100+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12101+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[6].Enabled);
12102+ break;
12103+ case GL_VERTEX_ATTRIB_ARRAY7_NV:
12104+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12105+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[7].Enabled);
12106+ break;
12107+ case GL_VERTEX_ATTRIB_ARRAY8_NV:
12108+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12109+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[8].Enabled);
12110+ break;
12111+ case GL_VERTEX_ATTRIB_ARRAY9_NV:
12112+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12113+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[9].Enabled);
12114+ break;
12115+ case GL_VERTEX_ATTRIB_ARRAY10_NV:
12116+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12117+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[10].Enabled);
12118+ break;
12119+ case GL_VERTEX_ATTRIB_ARRAY11_NV:
12120+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12121+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[11].Enabled);
12122+ break;
12123+ case GL_VERTEX_ATTRIB_ARRAY12_NV:
12124+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12125+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[12].Enabled);
12126+ break;
12127+ case GL_VERTEX_ATTRIB_ARRAY13_NV:
12128+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12129+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[13].Enabled);
12130+ break;
12131+ case GL_VERTEX_ATTRIB_ARRAY14_NV:
12132+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12133+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[14].Enabled);
12134+ break;
12135+ case GL_VERTEX_ATTRIB_ARRAY15_NV:
12136+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12137+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[15].Enabled);
12138+ break;
12139+ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
12140+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12141+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[0]);
12142+ break;
12143+ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
12144+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12145+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[1]);
12146+ break;
12147+ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
12148+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12149+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[2]);
12150+ break;
12151+ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
12152+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12153+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[3]);
12154+ break;
12155+ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
12156+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12157+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[4]);
12158+ break;
12159+ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
12160+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12161+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[5]);
12162+ break;
12163+ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
12164+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12165+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[6]);
12166+ break;
12167+ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
12168+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12169+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[7]);
12170+ break;
12171+ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
12172+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12173+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[8]);
12174+ break;
12175+ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
12176+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12177+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[9]);
12178+ break;
12179+ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
12180+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12181+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[10]);
12182+ break;
12183+ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
12184+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12185+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[11]);
12186+ break;
12187+ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
12188+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12189+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[12]);
12190+ break;
12191+ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
12192+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12193+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[13]);
12194+ break;
12195+ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
12196+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12197+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[14]);
12198+ break;
12199+ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
12200+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12201+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[15]);
12202+ break;
12203+ case GL_FRAGMENT_PROGRAM_NV:
12204+ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
12205+ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.Enabled);
12206+ break;
12207+ case GL_FRAGMENT_PROGRAM_BINDING_NV:
12208+ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
12209+ params[0] = ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0;
12210+ break;
12211+ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
12212+ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
12213+ params[0] = MAX_NV_FRAGMENT_PROGRAM_PARAMS;
12214+ break;
12215+ case GL_TEXTURE_RECTANGLE_NV:
12216+ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
12217+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV));
12218+ break;
12219+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
12220+ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
12221+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name;
12222+ break;
12223+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
12224+ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
12225+ params[0] = ctx->Const.MaxTextureRectSize;
12226+ break;
12227+ case GL_STENCIL_TEST_TWO_SIDE_EXT:
12228+ CHECK_EXT1(EXT_stencil_two_side, "GetIntegerv");
12229+ params[0] = BOOLEAN_TO_INT(ctx->Stencil.TestTwoSide);
12230+ break;
12231+ case GL_ACTIVE_STENCIL_FACE_EXT:
12232+ CHECK_EXT1(EXT_stencil_two_side, "GetIntegerv");
12233+ params[0] = ENUM_TO_INT(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
12234+ break;
12235+ case GL_MAX_SHININESS_NV:
12236+ CHECK_EXT1(NV_light_max_exponent, "GetIntegerv");
12237+ params[0] = IROUND(ctx->Const.MaxShininess);
12238+ break;
12239+ case GL_MAX_SPOT_EXPONENT_NV:
12240+ CHECK_EXT1(NV_light_max_exponent, "GetIntegerv");
12241+ params[0] = IROUND(ctx->Const.MaxSpotExponent);
12242+ break;
12243+ case GL_ARRAY_BUFFER_BINDING_ARB:
12244+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12245+ params[0] = ctx->Array.ArrayBufferObj->Name;
12246+ break;
12247+ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
12248+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12249+ params[0] = ctx->Array.ArrayObj->Vertex.BufferObj->Name;
12250+ break;
12251+ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
12252+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12253+ params[0] = ctx->Array.ArrayObj->Normal.BufferObj->Name;
12254+ break;
12255+ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
12256+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12257+ params[0] = ctx->Array.ArrayObj->Color.BufferObj->Name;
12258+ break;
12259+ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
12260+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12261+ params[0] = ctx->Array.ArrayObj->Index.BufferObj->Name;
12262+ break;
12263+ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
12264+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12265+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name;
12266+ break;
12267+ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
12268+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12269+ params[0] = ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name;
12270+ break;
12271+ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
12272+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12273+ params[0] = ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name;
12274+ break;
12275+ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
12276+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12277+ params[0] = ctx->Array.ArrayObj->FogCoord.BufferObj->Name;
12278+ break;
12279+ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
12280+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12281+ params[0] = ctx->Array.ElementArrayBufferObj->Name;
12282+ break;
12283+ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
12284+ CHECK_EXT1(EXT_pixel_buffer_object, "GetIntegerv");
12285+ params[0] = ctx->Pack.BufferObj->Name;
12286+ break;
12287+ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
12288+ CHECK_EXT1(EXT_pixel_buffer_object, "GetIntegerv");
12289+ params[0] = ctx->Unpack.BufferObj->Name;
12290+ break;
12291+ case GL_VERTEX_PROGRAM_ARB:
12292+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
12293+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.Enabled);
12294+ break;
12295+ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
12296+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
12297+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.PointSizeEnabled);
12298+ break;
12299+ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
12300+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
12301+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.TwoSideEnabled);
12302+ break;
12303+ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
12304+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
12305+ params[0] = ctx->Const.MaxProgramMatrixStackDepth;
12306+ break;
12307+ case GL_MAX_PROGRAM_MATRICES_ARB:
12308+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
12309+ params[0] = ctx->Const.MaxProgramMatrices;
12310+ break;
12311+ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
12312+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
12313+ params[0] = BOOLEAN_TO_INT(ctx->CurrentStack->Depth + 1);
12314+ break;
12315+ case GL_CURRENT_MATRIX_ARB:
12316+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetIntegerv");
12317+ {
12318+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
12319+ params[0] = IROUND(matrix[0]);
12320+ params[1] = IROUND(matrix[1]);
12321+ params[2] = IROUND(matrix[2]);
12322+ params[3] = IROUND(matrix[3]);
12323+ params[4] = IROUND(matrix[4]);
12324+ params[5] = IROUND(matrix[5]);
12325+ params[6] = IROUND(matrix[6]);
12326+ params[7] = IROUND(matrix[7]);
12327+ params[8] = IROUND(matrix[8]);
12328+ params[9] = IROUND(matrix[9]);
12329+ params[10] = IROUND(matrix[10]);
12330+ params[11] = IROUND(matrix[11]);
12331+ params[12] = IROUND(matrix[12]);
12332+ params[13] = IROUND(matrix[13]);
12333+ params[14] = IROUND(matrix[14]);
12334+ params[15] = IROUND(matrix[15]);
12335+ }
12336+ break;
12337+ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
12338+ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetIntegerv");
12339+ {
12340+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
12341+ params[0] = IROUND(matrix[0]);
12342+ params[1] = IROUND(matrix[4]);
12343+ params[2] = IROUND(matrix[8]);
12344+ params[3] = IROUND(matrix[12]);
12345+ params[4] = IROUND(matrix[1]);
12346+ params[5] = IROUND(matrix[5]);
12347+ params[6] = IROUND(matrix[9]);
12348+ params[7] = IROUND(matrix[13]);
12349+ params[8] = IROUND(matrix[2]);
12350+ params[9] = IROUND(matrix[6]);
12351+ params[10] = IROUND(matrix[10]);
12352+ params[11] = IROUND(matrix[14]);
12353+ params[12] = IROUND(matrix[3]);
12354+ params[13] = IROUND(matrix[7]);
12355+ params[14] = IROUND(matrix[11]);
12356+ params[15] = IROUND(matrix[15]);
12357+ }
12358+ break;
12359+ case GL_MAX_VERTEX_ATTRIBS_ARB:
12360+ CHECK_EXT1(ARB_vertex_program, "GetIntegerv");
12361+ params[0] = ctx->Const.VertexProgram.MaxAttribs;
12362+ break;
12363+ case GL_PROGRAM_ERROR_POSITION_ARB:
12364+ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetIntegerv");
12365+ params[0] = ctx->Program.ErrorPos;
12366+ break;
12367+ case GL_FRAGMENT_PROGRAM_ARB:
12368+ CHECK_EXT1(ARB_fragment_program, "GetIntegerv");
12369+ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.Enabled);
12370+ break;
12371+ case GL_MAX_TEXTURE_COORDS_ARB:
12372+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetIntegerv");
12373+ params[0] = ctx->Const.MaxTextureCoordUnits;
12374+ break;
12375+ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
12376+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetIntegerv");
12377+ params[0] = ctx->Const.MaxTextureImageUnits;
12378+ break;
12379+ case GL_DEPTH_BOUNDS_TEST_EXT:
12380+ CHECK_EXT1(EXT_depth_bounds_test, "GetIntegerv");
12381+ params[0] = BOOLEAN_TO_INT(ctx->Depth.BoundsTest);
12382+ break;
12383+ case GL_DEPTH_BOUNDS_EXT:
12384+ CHECK_EXT1(EXT_depth_bounds_test, "GetIntegerv");
12385+ params[0] = IROUND(ctx->Depth.BoundsMin);
12386+ params[1] = IROUND(ctx->Depth.BoundsMax);
12387+ break;
12388+ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
12389+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12390+ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.CallbackEnabled);
12391+ break;
12392+ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
12393+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12394+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.CallbackEnabled);
12395+ break;
12396+ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
12397+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12398+ params[0] = ctx->FragmentProgram.CurrentPosition;
12399+ break;
12400+ case GL_VERTEX_PROGRAM_POSITION_MESA:
12401+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12402+ params[0] = ctx->VertexProgram.CurrentPosition;
12403+ break;
12404+ case GL_MAX_DRAW_BUFFERS_ARB:
12405+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12406+ params[0] = ctx->Const.MaxDrawBuffers;
12407+ break;
12408+ case GL_DRAW_BUFFER0_ARB:
12409+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12410+ params[0] = ENUM_TO_INT(ctx->DrawBuffer->ColorDrawBuffer[0]);
12411+ break;
12412+ case GL_DRAW_BUFFER1_ARB:
12413+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12414+ {
12415+ GLenum buffer;
12416+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
12417+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
12418+ return;
12419+ }
12420+ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
12421+ params[0] = ENUM_TO_INT(buffer);
12422+ }
12423+ break;
12424+ case GL_DRAW_BUFFER2_ARB:
12425+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12426+ {
12427+ GLenum buffer;
12428+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
12429+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
12430+ return;
12431+ }
12432+ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
12433+ params[0] = ENUM_TO_INT(buffer);
12434+ }
12435+ break;
12436+ case GL_DRAW_BUFFER3_ARB:
12437+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12438+ {
12439+ GLenum buffer;
12440+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
12441+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
12442+ return;
12443+ }
12444+ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
12445+ params[0] = ENUM_TO_INT(buffer);
12446+ }
12447+ break;
12448+ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
12449+ CHECK_EXT1(OES_read_format, "GetIntegerv");
12450+ params[0] = ctx->Const.ColorReadType;
12451+ break;
12452+ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
12453+ CHECK_EXT1(OES_read_format, "GetIntegerv");
12454+ params[0] = ctx->Const.ColorReadFormat;
12455+ break;
12456+ case GL_NUM_FRAGMENT_REGISTERS_ATI:
12457+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12458+ params[0] = 6;
12459+ break;
12460+ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
12461+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12462+ params[0] = 8;
12463+ break;
12464+ case GL_NUM_PASSES_ATI:
12465+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12466+ params[0] = 2;
12467+ break;
12468+ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
12469+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12470+ params[0] = 8;
12471+ break;
12472+ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
12473+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12474+ params[0] = 16;
12475+ break;
12476+ case GL_COLOR_ALPHA_PAIRING_ATI:
12477+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12478+ params[0] = BOOLEAN_TO_INT(GL_TRUE);
12479+ break;
12480+ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
12481+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12482+ params[0] = 3;
12483+ break;
12484+ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
12485+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12486+ params[0] = 3;
12487+ break;
12488+ case GL_STENCIL_BACK_FUNC:
12489+ params[0] = ENUM_TO_INT(ctx->Stencil.Function[1]);
12490+ break;
12491+ case GL_STENCIL_BACK_VALUE_MASK:
12492+ params[0] = ctx->Stencil.ValueMask[1];
12493+ break;
12494+ case GL_STENCIL_BACK_REF:
12495+ params[0] = ctx->Stencil.Ref[1];
12496+ break;
12497+ case GL_STENCIL_BACK_FAIL:
12498+ params[0] = ENUM_TO_INT(ctx->Stencil.FailFunc[1]);
12499+ break;
12500+ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
12501+ params[0] = ENUM_TO_INT(ctx->Stencil.ZFailFunc[1]);
12502+ break;
12503+ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
12504+ params[0] = ENUM_TO_INT(ctx->Stencil.ZPassFunc[1]);
12505+ break;
12506+ case GL_FRAMEBUFFER_BINDING_EXT:
12507+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12508+ params[0] = ctx->DrawBuffer->Name;
12509+ break;
12510+ case GL_RENDERBUFFER_BINDING_EXT:
12511+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12512+ params[0] = ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0;
12513+ break;
12514+ case GL_MAX_COLOR_ATTACHMENTS_EXT:
12515+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12516+ params[0] = ctx->Const.MaxColorAttachments;
12517+ break;
12518+ case GL_MAX_RENDERBUFFER_SIZE_EXT:
12519+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12520+ params[0] = ctx->Const.MaxRenderbufferSize;
12521+ break;
12522+ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
12523+ CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
12524+ params[0] = MAX_FRAGMENT_UNIFORM_COMPONENTS;
12525+ break;
12526+ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
12527+ CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
12528+ params[0] = ENUM_TO_INT(ctx->Hint.FragmentShaderDerivative);
12529+ break;
12530+ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
12531+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12532+ params[0] = MAX_VERTEX_UNIFORM_COMPONENTS;
12533+ break;
12534+ case GL_MAX_VARYING_FLOATS_ARB:
12535+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12536+ params[0] = MAX_VARYING_FLOATS;
12537+ break;
12538+ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
12539+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12540+ params[0] = MAX_VERTEX_TEXTURE_IMAGE_UNITS;
12541+ break;
12542+ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
12543+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12544+ params[0] = MAX_COMBINED_TEXTURE_IMAGE_UNITS;
12545+ break;
12546+ default:
12547+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv(pname=0x%x)", pname);
12548+ }
12549+}
12550+
12551+
12552+void GLAPIENTRY
12553+_mesa_GetDoublev( GLenum pname, GLdouble *params )
12554+{
12555+ const GLfloat magic = -1234.5F;
12556+ GLfloat values[16];
12557+ GLuint i;
12558+
12559+ if (!params)
12560+ return;
12561+
12562+ /* Init temp array to magic numbers so we can figure out how many values
12563+ * are returned by the GetFloatv() call.
12564+ */
12565+ for (i = 0; i < 16; i++)
12566+ values[i] = magic;
12567+
12568+ _mesa_GetFloatv(pname, values);
12569+
12570+ for (i = 0; i < 16 && values[i] != magic; i++)
12571+ params[i] = (GLdouble) values[i];
12572+}
12573+
12574Index: qemu-0.14.0/target-i386/mesa_gl.h
12575===================================================================
12576--- /dev/null
12577+++ qemu-0.14.0/target-i386/mesa_gl.h
12578@@ -0,0 +1,2251 @@
12579+/*
12580+ * Mesa 3-D graphics library
12581+ * Version: 6.5.1
12582+ *
12583+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
12584+ *
12585+ * Permission is hereby granted, free of charge, to any person obtaining a
12586+ * copy of this software and associated documentation files (the "Software"),
12587+ * to deal in the Software without restriction, including without limitation
12588+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12589+ * and/or sell copies of the Software, and to permit persons to whom the
12590+ * Software is furnished to do so, subject to the following conditions:
12591+ *
12592+ * The above copyright notice and this permission notice shall be included
12593+ * in all copies or substantial portions of the Software.
12594+ *
12595+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
12596+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12597+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
12598+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
12599+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
12600+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12601+ */
12602+
12603+
12604+#ifndef __gl_h_
12605+#define __gl_h_
12606+
12607+#if defined(USE_MGL_NAMESPACE)
12608+#include "gl_mangle.h"
12609+#endif
12610+
12611+
12612+/**********************************************************************
12613+ * Begin system-specific stuff. Do not do any of this when building
12614+ * for SciTech SNAP, as this is all done before this header file is
12615+ * included.
12616+ */
12617+#if !defined(__SCITECH_SNAP__)
12618+
12619+#if defined(__BEOS__)
12620+#include <stdlib.h> /* to get some BeOS-isms */
12621+#endif
12622+
12623+#if !defined(OPENSTEP) && (defined(NeXT) || defined(NeXT_PDO))
12624+#define OPENSTEP
12625+#endif
12626+
12627+#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__)
12628+#define __WIN32__
12629+#endif
12630+
12631+#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__))
12632+# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
12633+# define GLAPI __declspec(dllexport)
12634+# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
12635+# define GLAPI __declspec(dllimport)
12636+# else /* for use with static link lib build of Win32 edition only */
12637+# define GLAPI extern
12638+# endif /* _STATIC_MESA support */
12639+# define GLAPIENTRY __stdcall
12640+#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
12641+# define GLAPI extern
12642+# define GLAPIENTRY __stdcall
12643+#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
12644+# define GLAPI __attribute__((visibility("default")))
12645+# define GLAPIENTRY
12646+#endif /* WIN32 && !CYGWIN */
12647+
12648+#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__)
12649+# define PRAGMA_EXPORT_SUPPORTED 1
12650+#endif
12651+
12652+/*
12653+ * WINDOWS: Include windows.h here to define APIENTRY.
12654+ * It is also useful when applications include this file by
12655+ * including only glut.h, since glut.h depends on windows.h.
12656+ * Applications needing to include windows.h with parms other
12657+ * than "WIN32_LEAN_AND_MEAN" may include windows.h before
12658+ * glut.h or gl.h.
12659+ */
12660+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
12661+#define WIN32_LEAN_AND_MEAN 1
12662+#include <windows.h>
12663+#endif
12664+
12665+#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP) && !defined(__CYGWIN__)
12666+#include <GL/mesa_wgl.h>
12667+#endif
12668+
12669+#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
12670+#pragma import on
12671+#endif
12672+
12673+#ifndef GLAPI
12674+#define GLAPI extern
12675+#endif
12676+
12677+#ifndef GLAPIENTRY
12678+#define GLAPIENTRY
12679+#endif
12680+
12681+#ifndef APIENTRY
12682+#define APIENTRY GLAPIENTRY
12683+#endif
12684+
12685+/* "P" suffix to be used for a pointer to a function */
12686+#ifndef APIENTRYP
12687+#define APIENTRYP APIENTRY *
12688+#endif
12689+
12690+#ifndef GLAPIENTRYP
12691+#define GLAPIENTRYP GLAPIENTRY *
12692+#endif
12693+
12694+#ifdef CENTERLINE_CLPP
12695+#define signed
12696+#endif
12697+
12698+#if defined(PRAGMA_EXPORT_SUPPORTED)
12699+#pragma export on
12700+#endif
12701+
12702+#endif /* !__SCITECH_SNAP__ */
12703+/*
12704+ * End system-specific stuff.
12705+ **********************************************************************/
12706+
12707+
12708+
12709+#ifdef __cplusplus
12710+extern "C" {
12711+#endif
12712+
12713+
12714+
12715+#define GL_VERSION_1_1 1
12716+#define GL_VERSION_1_2 1
12717+#define GL_VERSION_1_3 1
12718+#define GL_ARB_imaging 1
12719+
12720+
12721+/*
12722+ * Datatypes
12723+ */
12724+typedef unsigned int GLenum;
12725+typedef unsigned char GLboolean;
12726+typedef unsigned int GLbitfield;
12727+typedef void GLvoid;
12728+typedef signed char GLbyte; /* 1-byte signed */
12729+typedef short GLshort; /* 2-byte signed */
12730+typedef int GLint; /* 4-byte signed */
12731+typedef unsigned char GLubyte; /* 1-byte unsigned */
12732+typedef unsigned short GLushort; /* 2-byte unsigned */
12733+typedef unsigned int GLuint; /* 4-byte unsigned */
12734+typedef int GLsizei; /* 4-byte signed */
12735+typedef float GLfloat; /* single precision float */
12736+typedef float GLclampf; /* single precision float in [0,1] */
12737+typedef double GLdouble; /* double precision float */
12738+typedef double GLclampd; /* double precision float in [0,1] */
12739+
12740+
12741+
12742+/*
12743+ * Constants
12744+ */
12745+
12746+/* Boolean values */
12747+#define GL_FALSE 0x0
12748+#define GL_TRUE 0x1
12749+
12750+/* Data types */
12751+#define GL_BYTE 0x1400
12752+#define GL_UNSIGNED_BYTE 0x1401
12753+#define GL_SHORT 0x1402
12754+#define GL_UNSIGNED_SHORT 0x1403
12755+#define GL_INT 0x1404
12756+#define GL_UNSIGNED_INT 0x1405
12757+#define GL_FLOAT 0x1406
12758+#define GL_2_BYTES 0x1407
12759+#define GL_3_BYTES 0x1408
12760+#define GL_4_BYTES 0x1409
12761+#define GL_DOUBLE 0x140A
12762+
12763+/* Primitives */
12764+#define GL_POINTS 0x0000
12765+#define GL_LINES 0x0001
12766+#define GL_LINE_LOOP 0x0002
12767+#define GL_LINE_STRIP 0x0003
12768+#define GL_TRIANGLES 0x0004
12769+#define GL_TRIANGLE_STRIP 0x0005
12770+#define GL_TRIANGLE_FAN 0x0006
12771+#define GL_QUADS 0x0007
12772+#define GL_QUAD_STRIP 0x0008
12773+#define GL_POLYGON 0x0009
12774+
12775+/* Vertex Arrays */
12776+#define GL_VERTEX_ARRAY 0x8074
12777+#define GL_NORMAL_ARRAY 0x8075
12778+#define GL_COLOR_ARRAY 0x8076
12779+#define GL_INDEX_ARRAY 0x8077
12780+#define GL_TEXTURE_COORD_ARRAY 0x8078
12781+#define GL_EDGE_FLAG_ARRAY 0x8079
12782+#define GL_VERTEX_ARRAY_SIZE 0x807A
12783+#define GL_VERTEX_ARRAY_TYPE 0x807B
12784+#define GL_VERTEX_ARRAY_STRIDE 0x807C
12785+#define GL_NORMAL_ARRAY_TYPE 0x807E
12786+#define GL_NORMAL_ARRAY_STRIDE 0x807F
12787+#define GL_COLOR_ARRAY_SIZE 0x8081
12788+#define GL_COLOR_ARRAY_TYPE 0x8082
12789+#define GL_COLOR_ARRAY_STRIDE 0x8083
12790+#define GL_INDEX_ARRAY_TYPE 0x8085
12791+#define GL_INDEX_ARRAY_STRIDE 0x8086
12792+#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
12793+#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
12794+#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
12795+#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
12796+#define GL_VERTEX_ARRAY_POINTER 0x808E
12797+#define GL_NORMAL_ARRAY_POINTER 0x808F
12798+#define GL_COLOR_ARRAY_POINTER 0x8090
12799+#define GL_INDEX_ARRAY_POINTER 0x8091
12800+#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
12801+#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
12802+#define GL_V2F 0x2A20
12803+#define GL_V3F 0x2A21
12804+#define GL_C4UB_V2F 0x2A22
12805+#define GL_C4UB_V3F 0x2A23
12806+#define GL_C3F_V3F 0x2A24
12807+#define GL_N3F_V3F 0x2A25
12808+#define GL_C4F_N3F_V3F 0x2A26
12809+#define GL_T2F_V3F 0x2A27
12810+#define GL_T4F_V4F 0x2A28
12811+#define GL_T2F_C4UB_V3F 0x2A29
12812+#define GL_T2F_C3F_V3F 0x2A2A
12813+#define GL_T2F_N3F_V3F 0x2A2B
12814+#define GL_T2F_C4F_N3F_V3F 0x2A2C
12815+#define GL_T4F_C4F_N3F_V4F 0x2A2D
12816+
12817+/* Matrix Mode */
12818+#define GL_MATRIX_MODE 0x0BA0
12819+#define GL_MODELVIEW 0x1700
12820+#define GL_PROJECTION 0x1701
12821+#define GL_TEXTURE 0x1702
12822+
12823+/* Points */
12824+#define GL_POINT_SMOOTH 0x0B10
12825+#define GL_POINT_SIZE 0x0B11
12826+#define GL_POINT_SIZE_GRANULARITY 0x0B13
12827+#define GL_POINT_SIZE_RANGE 0x0B12
12828+
12829+/* Lines */
12830+#define GL_LINE_SMOOTH 0x0B20
12831+#define GL_LINE_STIPPLE 0x0B24
12832+#define GL_LINE_STIPPLE_PATTERN 0x0B25
12833+#define GL_LINE_STIPPLE_REPEAT 0x0B26
12834+#define GL_LINE_WIDTH 0x0B21
12835+#define GL_LINE_WIDTH_GRANULARITY 0x0B23
12836+#define GL_LINE_WIDTH_RANGE 0x0B22
12837+
12838+/* Polygons */
12839+#define GL_POINT 0x1B00
12840+#define GL_LINE 0x1B01
12841+#define GL_FILL 0x1B02
12842+#define GL_CW 0x0900
12843+#define GL_CCW 0x0901
12844+#define GL_FRONT 0x0404
12845+#define GL_BACK 0x0405
12846+#define GL_POLYGON_MODE 0x0B40
12847+#define GL_POLYGON_SMOOTH 0x0B41
12848+#define GL_POLYGON_STIPPLE 0x0B42
12849+#define GL_EDGE_FLAG 0x0B43
12850+#define GL_CULL_FACE 0x0B44
12851+#define GL_CULL_FACE_MODE 0x0B45
12852+#define GL_FRONT_FACE 0x0B46
12853+#define GL_POLYGON_OFFSET_FACTOR 0x8038
12854+#define GL_POLYGON_OFFSET_UNITS 0x2A00
12855+#define GL_POLYGON_OFFSET_POINT 0x2A01
12856+#define GL_POLYGON_OFFSET_LINE 0x2A02
12857+#define GL_POLYGON_OFFSET_FILL 0x8037
12858+
12859+/* Display Lists */
12860+#define GL_COMPILE 0x1300
12861+#define GL_COMPILE_AND_EXECUTE 0x1301
12862+#define GL_LIST_BASE 0x0B32
12863+#define GL_LIST_INDEX 0x0B33
12864+#define GL_LIST_MODE 0x0B30
12865+
12866+/* Depth buffer */
12867+#define GL_NEVER 0x0200
12868+#define GL_LESS 0x0201
12869+#define GL_EQUAL 0x0202
12870+#define GL_LEQUAL 0x0203
12871+#define GL_GREATER 0x0204
12872+#define GL_NOTEQUAL 0x0205
12873+#define GL_GEQUAL 0x0206
12874+#define GL_ALWAYS 0x0207
12875+#define GL_DEPTH_TEST 0x0B71
12876+#define GL_DEPTH_BITS 0x0D56
12877+#define GL_DEPTH_CLEAR_VALUE 0x0B73
12878+#define GL_DEPTH_FUNC 0x0B74
12879+#define GL_DEPTH_RANGE 0x0B70
12880+#define GL_DEPTH_WRITEMASK 0x0B72
12881+#define GL_DEPTH_COMPONENT 0x1902
12882+
12883+/* Lighting */
12884+#define GL_LIGHTING 0x0B50
12885+#define GL_LIGHT0 0x4000
12886+#define GL_LIGHT1 0x4001
12887+#define GL_LIGHT2 0x4002
12888+#define GL_LIGHT3 0x4003
12889+#define GL_LIGHT4 0x4004
12890+#define GL_LIGHT5 0x4005
12891+#define GL_LIGHT6 0x4006
12892+#define GL_LIGHT7 0x4007
12893+#define GL_SPOT_EXPONENT 0x1205
12894+#define GL_SPOT_CUTOFF 0x1206
12895+#define GL_CONSTANT_ATTENUATION 0x1207
12896+#define GL_LINEAR_ATTENUATION 0x1208
12897+#define GL_QUADRATIC_ATTENUATION 0x1209
12898+#define GL_AMBIENT 0x1200
12899+#define GL_DIFFUSE 0x1201
12900+#define GL_SPECULAR 0x1202
12901+#define GL_SHININESS 0x1601
12902+#define GL_EMISSION 0x1600
12903+#define GL_POSITION 0x1203
12904+#define GL_SPOT_DIRECTION 0x1204
12905+#define GL_AMBIENT_AND_DIFFUSE 0x1602
12906+#define GL_COLOR_INDEXES 0x1603
12907+#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
12908+#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
12909+#define GL_LIGHT_MODEL_AMBIENT 0x0B53
12910+#define GL_FRONT_AND_BACK 0x0408
12911+#define GL_SHADE_MODEL 0x0B54
12912+#define GL_FLAT 0x1D00
12913+#define GL_SMOOTH 0x1D01
12914+#define GL_COLOR_MATERIAL 0x0B57
12915+#define GL_COLOR_MATERIAL_FACE 0x0B55
12916+#define GL_COLOR_MATERIAL_PARAMETER 0x0B56
12917+#define GL_NORMALIZE 0x0BA1
12918+
12919+/* User clipping planes */
12920+#define GL_CLIP_PLANE0 0x3000
12921+#define GL_CLIP_PLANE1 0x3001
12922+#define GL_CLIP_PLANE2 0x3002
12923+#define GL_CLIP_PLANE3 0x3003
12924+#define GL_CLIP_PLANE4 0x3004
12925+#define GL_CLIP_PLANE5 0x3005
12926+
12927+/* Accumulation buffer */
12928+#define GL_ACCUM_RED_BITS 0x0D58
12929+#define GL_ACCUM_GREEN_BITS 0x0D59
12930+#define GL_ACCUM_BLUE_BITS 0x0D5A
12931+#define GL_ACCUM_ALPHA_BITS 0x0D5B
12932+#define GL_ACCUM_CLEAR_VALUE 0x0B80
12933+#define GL_ACCUM 0x0100
12934+#define GL_ADD 0x0104
12935+#define GL_LOAD 0x0101
12936+#define GL_MULT 0x0103
12937+#define GL_RETURN 0x0102
12938+
12939+/* Alpha testing */
12940+#define GL_ALPHA_TEST 0x0BC0
12941+#define GL_ALPHA_TEST_REF 0x0BC2
12942+#define GL_ALPHA_TEST_FUNC 0x0BC1
12943+
12944+/* Blending */
12945+#define GL_BLEND 0x0BE2
12946+#define GL_BLEND_SRC 0x0BE1
12947+#define GL_BLEND_DST 0x0BE0
12948+#define GL_ZERO 0x0
12949+#define GL_ONE 0x1
12950+#define GL_SRC_COLOR 0x0300
12951+#define GL_ONE_MINUS_SRC_COLOR 0x0301
12952+#define GL_SRC_ALPHA 0x0302
12953+#define GL_ONE_MINUS_SRC_ALPHA 0x0303
12954+#define GL_DST_ALPHA 0x0304
12955+#define GL_ONE_MINUS_DST_ALPHA 0x0305
12956+#define GL_DST_COLOR 0x0306
12957+#define GL_ONE_MINUS_DST_COLOR 0x0307
12958+#define GL_SRC_ALPHA_SATURATE 0x0308
12959+
12960+/* Render Mode */
12961+#define GL_FEEDBACK 0x1C01
12962+#define GL_RENDER 0x1C00
12963+#define GL_SELECT 0x1C02
12964+
12965+/* Feedback */
12966+#define GL_2D 0x0600
12967+#define GL_3D 0x0601
12968+#define GL_3D_COLOR 0x0602
12969+#define GL_3D_COLOR_TEXTURE 0x0603
12970+#define GL_4D_COLOR_TEXTURE 0x0604
12971+#define GL_POINT_TOKEN 0x0701
12972+#define GL_LINE_TOKEN 0x0702
12973+#define GL_LINE_RESET_TOKEN 0x0707
12974+#define GL_POLYGON_TOKEN 0x0703
12975+#define GL_BITMAP_TOKEN 0x0704
12976+#define GL_DRAW_PIXEL_TOKEN 0x0705
12977+#define GL_COPY_PIXEL_TOKEN 0x0706
12978+#define GL_PASS_THROUGH_TOKEN 0x0700
12979+#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0
12980+#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1
12981+#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
12982+
12983+/* Selection */
12984+#define GL_SELECTION_BUFFER_POINTER 0x0DF3
12985+#define GL_SELECTION_BUFFER_SIZE 0x0DF4
12986+
12987+/* Fog */
12988+#define GL_FOG 0x0B60
12989+#define GL_FOG_MODE 0x0B65
12990+#define GL_FOG_DENSITY 0x0B62
12991+#define GL_FOG_COLOR 0x0B66
12992+#define GL_FOG_INDEX 0x0B61
12993+#define GL_FOG_START 0x0B63
12994+#define GL_FOG_END 0x0B64
12995+#define GL_LINEAR 0x2601
12996+#define GL_EXP 0x0800
12997+#define GL_EXP2 0x0801
12998+
12999+/* Logic Ops */
13000+#define GL_LOGIC_OP 0x0BF1
13001+#define GL_INDEX_LOGIC_OP 0x0BF1
13002+#define GL_COLOR_LOGIC_OP 0x0BF2
13003+#define GL_LOGIC_OP_MODE 0x0BF0
13004+#define GL_CLEAR 0x1500
13005+#define GL_SET 0x150F
13006+#define GL_COPY 0x1503
13007+#define GL_COPY_INVERTED 0x150C
13008+#define GL_NOOP 0x1505
13009+#define GL_INVERT 0x150A
13010+#define GL_AND 0x1501
13011+#define GL_NAND 0x150E
13012+#define GL_OR 0x1507
13013+#define GL_NOR 0x1508
13014+#define GL_XOR 0x1506
13015+#define GL_EQUIV 0x1509
13016+#define GL_AND_REVERSE 0x1502
13017+#define GL_AND_INVERTED 0x1504
13018+#define GL_OR_REVERSE 0x150B
13019+#define GL_OR_INVERTED 0x150D
13020+
13021+/* Stencil */
13022+#define GL_STENCIL_BITS 0x0D57
13023+#define GL_STENCIL_TEST 0x0B90
13024+#define GL_STENCIL_CLEAR_VALUE 0x0B91
13025+#define GL_STENCIL_FUNC 0x0B92
13026+#define GL_STENCIL_VALUE_MASK 0x0B93
13027+#define GL_STENCIL_FAIL 0x0B94
13028+#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
13029+#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
13030+#define GL_STENCIL_REF 0x0B97
13031+#define GL_STENCIL_WRITEMASK 0x0B98
13032+#define GL_STENCIL_INDEX 0x1901
13033+#define GL_KEEP 0x1E00
13034+#define GL_REPLACE 0x1E01
13035+#define GL_INCR 0x1E02
13036+#define GL_DECR 0x1E03
13037+
13038+/* Buffers, Pixel Drawing/Reading */
13039+#define GL_NONE 0x0
13040+#define GL_LEFT 0x0406
13041+#define GL_RIGHT 0x0407
13042+/*GL_FRONT 0x0404 */
13043+/*GL_BACK 0x0405 */
13044+/*GL_FRONT_AND_BACK 0x0408 */
13045+#define GL_FRONT_LEFT 0x0400
13046+#define GL_FRONT_RIGHT 0x0401
13047+#define GL_BACK_LEFT 0x0402
13048+#define GL_BACK_RIGHT 0x0403
13049+#define GL_AUX0 0x0409
13050+#define GL_AUX1 0x040A
13051+#define GL_AUX2 0x040B
13052+#define GL_AUX3 0x040C
13053+#define GL_COLOR_INDEX 0x1900
13054+#define GL_RED 0x1903
13055+#define GL_GREEN 0x1904
13056+#define GL_BLUE 0x1905
13057+#define GL_ALPHA 0x1906
13058+#define GL_LUMINANCE 0x1909
13059+#define GL_LUMINANCE_ALPHA 0x190A
13060+#define GL_ALPHA_BITS 0x0D55
13061+#define GL_RED_BITS 0x0D52
13062+#define GL_GREEN_BITS 0x0D53
13063+#define GL_BLUE_BITS 0x0D54
13064+#define GL_INDEX_BITS 0x0D51
13065+#define GL_SUBPIXEL_BITS 0x0D50
13066+#define GL_AUX_BUFFERS 0x0C00
13067+#define GL_READ_BUFFER 0x0C02
13068+#define GL_DRAW_BUFFER 0x0C01
13069+#define GL_DOUBLEBUFFER 0x0C32
13070+#define GL_STEREO 0x0C33
13071+#define GL_BITMAP 0x1A00
13072+#define GL_COLOR 0x1800
13073+#define GL_DEPTH 0x1801
13074+#define GL_STENCIL 0x1802
13075+#define GL_DITHER 0x0BD0
13076+#define GL_RGB 0x1907
13077+#define GL_RGBA 0x1908
13078+
13079+/* Implementation limits */
13080+#define GL_MAX_LIST_NESTING 0x0B31
13081+#define GL_MAX_EVAL_ORDER 0x0D30
13082+#define GL_MAX_LIGHTS 0x0D31
13083+#define GL_MAX_CLIP_PLANES 0x0D32
13084+#define GL_MAX_TEXTURE_SIZE 0x0D33
13085+#define GL_MAX_PIXEL_MAP_TABLE 0x0D34
13086+#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
13087+#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
13088+#define GL_MAX_NAME_STACK_DEPTH 0x0D37
13089+#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
13090+#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
13091+#define GL_MAX_VIEWPORT_DIMS 0x0D3A
13092+#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
13093+
13094+/* Gets */
13095+#define GL_ATTRIB_STACK_DEPTH 0x0BB0
13096+#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
13097+#define GL_COLOR_CLEAR_VALUE 0x0C22
13098+#define GL_COLOR_WRITEMASK 0x0C23
13099+#define GL_CURRENT_INDEX 0x0B01
13100+#define GL_CURRENT_COLOR 0x0B00
13101+#define GL_CURRENT_NORMAL 0x0B02
13102+#define GL_CURRENT_RASTER_COLOR 0x0B04
13103+#define GL_CURRENT_RASTER_DISTANCE 0x0B09
13104+#define GL_CURRENT_RASTER_INDEX 0x0B05
13105+#define GL_CURRENT_RASTER_POSITION 0x0B07
13106+#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
13107+#define GL_CURRENT_RASTER_POSITION_VALID 0x0B08
13108+#define GL_CURRENT_TEXTURE_COORDS 0x0B03
13109+#define GL_INDEX_CLEAR_VALUE 0x0C20
13110+#define GL_INDEX_MODE 0x0C30
13111+#define GL_INDEX_WRITEMASK 0x0C21
13112+#define GL_MODELVIEW_MATRIX 0x0BA6
13113+#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
13114+#define GL_NAME_STACK_DEPTH 0x0D70
13115+#define GL_PROJECTION_MATRIX 0x0BA7
13116+#define GL_PROJECTION_STACK_DEPTH 0x0BA4
13117+#define GL_RENDER_MODE 0x0C40
13118+#define GL_RGBA_MODE 0x0C31
13119+#define GL_TEXTURE_MATRIX 0x0BA8
13120+#define GL_TEXTURE_STACK_DEPTH 0x0BA5
13121+#define GL_VIEWPORT 0x0BA2
13122+
13123+/* Evaluators */
13124+#define GL_AUTO_NORMAL 0x0D80
13125+#define GL_MAP1_COLOR_4 0x0D90
13126+#define GL_MAP1_INDEX 0x0D91
13127+#define GL_MAP1_NORMAL 0x0D92
13128+#define GL_MAP1_TEXTURE_COORD_1 0x0D93
13129+#define GL_MAP1_TEXTURE_COORD_2 0x0D94
13130+#define GL_MAP1_TEXTURE_COORD_3 0x0D95
13131+#define GL_MAP1_TEXTURE_COORD_4 0x0D96
13132+#define GL_MAP1_VERTEX_3 0x0D97
13133+#define GL_MAP1_VERTEX_4 0x0D98
13134+#define GL_MAP2_COLOR_4 0x0DB0
13135+#define GL_MAP2_INDEX 0x0DB1
13136+#define GL_MAP2_NORMAL 0x0DB2
13137+#define GL_MAP2_TEXTURE_COORD_1 0x0DB3
13138+#define GL_MAP2_TEXTURE_COORD_2 0x0DB4
13139+#define GL_MAP2_TEXTURE_COORD_3 0x0DB5
13140+#define GL_MAP2_TEXTURE_COORD_4 0x0DB6
13141+#define GL_MAP2_VERTEX_3 0x0DB7
13142+#define GL_MAP2_VERTEX_4 0x0DB8
13143+#define GL_MAP1_GRID_DOMAIN 0x0DD0
13144+#define GL_MAP1_GRID_SEGMENTS 0x0DD1
13145+#define GL_MAP2_GRID_DOMAIN 0x0DD2
13146+#define GL_MAP2_GRID_SEGMENTS 0x0DD3
13147+#define GL_COEFF 0x0A00
13148+#define GL_ORDER 0x0A01
13149+#define GL_DOMAIN 0x0A02
13150+
13151+/* Hints */
13152+#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
13153+#define GL_POINT_SMOOTH_HINT 0x0C51
13154+#define GL_LINE_SMOOTH_HINT 0x0C52
13155+#define GL_POLYGON_SMOOTH_HINT 0x0C53
13156+#define GL_FOG_HINT 0x0C54
13157+#define GL_DONT_CARE 0x1100
13158+#define GL_FASTEST 0x1101
13159+#define GL_NICEST 0x1102
13160+
13161+/* Scissor box */
13162+#define GL_SCISSOR_BOX 0x0C10
13163+#define GL_SCISSOR_TEST 0x0C11
13164+
13165+/* Pixel Mode / Transfer */
13166+#define GL_MAP_COLOR 0x0D10
13167+#define GL_MAP_STENCIL 0x0D11
13168+#define GL_INDEX_SHIFT 0x0D12
13169+#define GL_INDEX_OFFSET 0x0D13
13170+#define GL_RED_SCALE 0x0D14
13171+#define GL_RED_BIAS 0x0D15
13172+#define GL_GREEN_SCALE 0x0D18
13173+#define GL_GREEN_BIAS 0x0D19
13174+#define GL_BLUE_SCALE 0x0D1A
13175+#define GL_BLUE_BIAS 0x0D1B
13176+#define GL_ALPHA_SCALE 0x0D1C
13177+#define GL_ALPHA_BIAS 0x0D1D
13178+#define GL_DEPTH_SCALE 0x0D1E
13179+#define GL_DEPTH_BIAS 0x0D1F
13180+#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
13181+#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
13182+#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
13183+#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
13184+#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
13185+#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
13186+#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
13187+#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
13188+#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
13189+#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
13190+#define GL_PIXEL_MAP_S_TO_S 0x0C71
13191+#define GL_PIXEL_MAP_I_TO_I 0x0C70
13192+#define GL_PIXEL_MAP_I_TO_R 0x0C72
13193+#define GL_PIXEL_MAP_I_TO_G 0x0C73
13194+#define GL_PIXEL_MAP_I_TO_B 0x0C74
13195+#define GL_PIXEL_MAP_I_TO_A 0x0C75
13196+#define GL_PIXEL_MAP_R_TO_R 0x0C76
13197+#define GL_PIXEL_MAP_G_TO_G 0x0C77
13198+#define GL_PIXEL_MAP_B_TO_B 0x0C78
13199+#define GL_PIXEL_MAP_A_TO_A 0x0C79
13200+#define GL_PACK_ALIGNMENT 0x0D05
13201+#define GL_PACK_LSB_FIRST 0x0D01
13202+#define GL_PACK_ROW_LENGTH 0x0D02
13203+#define GL_PACK_SKIP_PIXELS 0x0D04
13204+#define GL_PACK_SKIP_ROWS 0x0D03
13205+#define GL_PACK_SWAP_BYTES 0x0D00
13206+#define GL_UNPACK_ALIGNMENT 0x0CF5
13207+#define GL_UNPACK_LSB_FIRST 0x0CF1
13208+#define GL_UNPACK_ROW_LENGTH 0x0CF2
13209+#define GL_UNPACK_SKIP_PIXELS 0x0CF4
13210+#define GL_UNPACK_SKIP_ROWS 0x0CF3
13211+#define GL_UNPACK_SWAP_BYTES 0x0CF0
13212+#define GL_ZOOM_X 0x0D16
13213+#define GL_ZOOM_Y 0x0D17
13214+
13215+/* Texture mapping */
13216+#define GL_TEXTURE_ENV 0x2300
13217+#define GL_TEXTURE_ENV_MODE 0x2200
13218+#define GL_TEXTURE_1D 0x0DE0
13219+#define GL_TEXTURE_2D 0x0DE1
13220+#define GL_TEXTURE_WRAP_S 0x2802
13221+#define GL_TEXTURE_WRAP_T 0x2803
13222+#define GL_TEXTURE_MAG_FILTER 0x2800
13223+#define GL_TEXTURE_MIN_FILTER 0x2801
13224+#define GL_TEXTURE_ENV_COLOR 0x2201
13225+#define GL_TEXTURE_GEN_S 0x0C60
13226+#define GL_TEXTURE_GEN_T 0x0C61
13227+#define GL_TEXTURE_GEN_MODE 0x2500
13228+#define GL_TEXTURE_BORDER_COLOR 0x1004
13229+#define GL_TEXTURE_WIDTH 0x1000
13230+#define GL_TEXTURE_HEIGHT 0x1001
13231+#define GL_TEXTURE_BORDER 0x1005
13232+#define GL_TEXTURE_COMPONENTS 0x1003
13233+#define GL_TEXTURE_RED_SIZE 0x805C
13234+#define GL_TEXTURE_GREEN_SIZE 0x805D
13235+#define GL_TEXTURE_BLUE_SIZE 0x805E
13236+#define GL_TEXTURE_ALPHA_SIZE 0x805F
13237+#define GL_TEXTURE_LUMINANCE_SIZE 0x8060
13238+#define GL_TEXTURE_INTENSITY_SIZE 0x8061
13239+#define GL_NEAREST_MIPMAP_NEAREST 0x2700
13240+#define GL_NEAREST_MIPMAP_LINEAR 0x2702
13241+#define GL_LINEAR_MIPMAP_NEAREST 0x2701
13242+#define GL_LINEAR_MIPMAP_LINEAR 0x2703
13243+#define GL_OBJECT_LINEAR 0x2401
13244+#define GL_OBJECT_PLANE 0x2501
13245+#define GL_EYE_LINEAR 0x2400
13246+#define GL_EYE_PLANE 0x2502
13247+#define GL_SPHERE_MAP 0x2402
13248+#define GL_DECAL 0x2101
13249+#define GL_MODULATE 0x2100
13250+#define GL_NEAREST 0x2600
13251+#define GL_REPEAT 0x2901
13252+#define GL_CLAMP 0x2900
13253+#define GL_S 0x2000
13254+#define GL_T 0x2001
13255+#define GL_R 0x2002
13256+#define GL_Q 0x2003
13257+#define GL_TEXTURE_GEN_R 0x0C62
13258+#define GL_TEXTURE_GEN_Q 0x0C63
13259+
13260+/* Utility */
13261+#define GL_VENDOR 0x1F00
13262+#define GL_RENDERER 0x1F01
13263+#define GL_VERSION 0x1F02
13264+#define GL_EXTENSIONS 0x1F03
13265+
13266+/* Errors */
13267+#define GL_NO_ERROR 0x0
13268+#define GL_INVALID_ENUM 0x0500
13269+#define GL_INVALID_VALUE 0x0501
13270+#define GL_INVALID_OPERATION 0x0502
13271+#define GL_STACK_OVERFLOW 0x0503
13272+#define GL_STACK_UNDERFLOW 0x0504
13273+#define GL_OUT_OF_MEMORY 0x0505
13274+
13275+/* glPush/PopAttrib bits */
13276+#define GL_CURRENT_BIT 0x00000001
13277+#define GL_POINT_BIT 0x00000002
13278+#define GL_LINE_BIT 0x00000004
13279+#define GL_POLYGON_BIT 0x00000008
13280+#define GL_POLYGON_STIPPLE_BIT 0x00000010
13281+#define GL_PIXEL_MODE_BIT 0x00000020
13282+#define GL_LIGHTING_BIT 0x00000040
13283+#define GL_FOG_BIT 0x00000080
13284+#define GL_DEPTH_BUFFER_BIT 0x00000100
13285+#define GL_ACCUM_BUFFER_BIT 0x00000200
13286+#define GL_STENCIL_BUFFER_BIT 0x00000400
13287+#define GL_VIEWPORT_BIT 0x00000800
13288+#define GL_TRANSFORM_BIT 0x00001000
13289+#define GL_ENABLE_BIT 0x00002000
13290+#define GL_COLOR_BUFFER_BIT 0x00004000
13291+#define GL_HINT_BIT 0x00008000
13292+#define GL_EVAL_BIT 0x00010000
13293+#define GL_LIST_BIT 0x00020000
13294+#define GL_TEXTURE_BIT 0x00040000
13295+#define GL_SCISSOR_BIT 0x00080000
13296+#define GL_ALL_ATTRIB_BITS 0x000FFFFF
13297+
13298+
13299+/* OpenGL 1.1 */
13300+#define GL_PROXY_TEXTURE_1D 0x8063
13301+#define GL_PROXY_TEXTURE_2D 0x8064
13302+#define GL_TEXTURE_PRIORITY 0x8066
13303+#define GL_TEXTURE_RESIDENT 0x8067
13304+#define GL_TEXTURE_BINDING_1D 0x8068
13305+#define GL_TEXTURE_BINDING_2D 0x8069
13306+#define GL_TEXTURE_INTERNAL_FORMAT 0x1003
13307+#define GL_ALPHA4 0x803B
13308+#define GL_ALPHA8 0x803C
13309+#define GL_ALPHA12 0x803D
13310+#define GL_ALPHA16 0x803E
13311+#define GL_LUMINANCE4 0x803F
13312+#define GL_LUMINANCE8 0x8040
13313+#define GL_LUMINANCE12 0x8041
13314+#define GL_LUMINANCE16 0x8042
13315+#define GL_LUMINANCE4_ALPHA4 0x8043
13316+#define GL_LUMINANCE6_ALPHA2 0x8044
13317+#define GL_LUMINANCE8_ALPHA8 0x8045
13318+#define GL_LUMINANCE12_ALPHA4 0x8046
13319+#define GL_LUMINANCE12_ALPHA12 0x8047
13320+#define GL_LUMINANCE16_ALPHA16 0x8048
13321+#define GL_INTENSITY 0x8049
13322+#define GL_INTENSITY4 0x804A
13323+#define GL_INTENSITY8 0x804B
13324+#define GL_INTENSITY12 0x804C
13325+#define GL_INTENSITY16 0x804D
13326+#define GL_R3_G3_B2 0x2A10
13327+#define GL_RGB4 0x804F
13328+#define GL_RGB5 0x8050
13329+#define GL_RGB8 0x8051
13330+#define GL_RGB10 0x8052
13331+#define GL_RGB12 0x8053
13332+#define GL_RGB16 0x8054
13333+#define GL_RGBA2 0x8055
13334+#define GL_RGBA4 0x8056
13335+#define GL_RGB5_A1 0x8057
13336+#define GL_RGBA8 0x8058
13337+#define GL_RGB10_A2 0x8059
13338+#define GL_RGBA12 0x805A
13339+#define GL_RGBA16 0x805B
13340+#define GL_CLIENT_PIXEL_STORE_BIT 0x00000001
13341+#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
13342+#define GL_ALL_CLIENT_ATTRIB_BITS 0xFFFFFFFF
13343+#define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF
13344+
13345+
13346+
13347+/*
13348+ * Miscellaneous
13349+ */
13350+
13351+GLAPI void GLAPIENTRY glClearIndex( GLfloat c );
13352+
13353+GLAPI void GLAPIENTRY glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
13354+
13355+GLAPI void GLAPIENTRY glClear( GLbitfield mask );
13356+
13357+GLAPI void GLAPIENTRY glIndexMask( GLuint mask );
13358+
13359+GLAPI void GLAPIENTRY glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );
13360+
13361+GLAPI void GLAPIENTRY glAlphaFunc( GLenum func, GLclampf ref );
13362+
13363+GLAPI void GLAPIENTRY glBlendFunc( GLenum sfactor, GLenum dfactor );
13364+
13365+GLAPI void GLAPIENTRY glLogicOp( GLenum opcode );
13366+
13367+GLAPI void GLAPIENTRY glCullFace( GLenum mode );
13368+
13369+GLAPI void GLAPIENTRY glFrontFace( GLenum mode );
13370+
13371+GLAPI void GLAPIENTRY glPointSize( GLfloat size );
13372+
13373+GLAPI void GLAPIENTRY glLineWidth( GLfloat width );
13374+
13375+GLAPI void GLAPIENTRY glLineStipple( GLint factor, GLushort pattern );
13376+
13377+GLAPI void GLAPIENTRY glPolygonMode( GLenum face, GLenum mode );
13378+
13379+GLAPI void GLAPIENTRY glPolygonOffset( GLfloat factor, GLfloat units );
13380+
13381+GLAPI void GLAPIENTRY glPolygonStipple( const GLubyte *mask );
13382+
13383+GLAPI void GLAPIENTRY glGetPolygonStipple( GLubyte *mask );
13384+
13385+GLAPI void GLAPIENTRY glEdgeFlag( GLboolean flag );
13386+
13387+GLAPI void GLAPIENTRY glEdgeFlagv( const GLboolean *flag );
13388+
13389+GLAPI void GLAPIENTRY glScissor( GLint x, GLint y, GLsizei width, GLsizei height);
13390+
13391+GLAPI void GLAPIENTRY glClipPlane( GLenum plane, const GLdouble *equation );
13392+
13393+GLAPI void GLAPIENTRY glGetClipPlane( GLenum plane, GLdouble *equation );
13394+
13395+GLAPI void GLAPIENTRY glDrawBuffer( GLenum mode );
13396+
13397+GLAPI void GLAPIENTRY glReadBuffer( GLenum mode );
13398+
13399+GLAPI void GLAPIENTRY glEnable( GLenum cap );
13400+
13401+GLAPI void GLAPIENTRY glDisable( GLenum cap );
13402+
13403+GLAPI GLboolean GLAPIENTRY glIsEnabled( GLenum cap );
13404+
13405+
13406+GLAPI void GLAPIENTRY glEnableClientState( GLenum cap ); /* 1.1 */
13407+
13408+GLAPI void GLAPIENTRY glDisableClientState( GLenum cap ); /* 1.1 */
13409+
13410+
13411+GLAPI void GLAPIENTRY glGetBooleanv( GLenum pname, GLboolean *params );
13412+
13413+GLAPI void GLAPIENTRY glGetDoublev( GLenum pname, GLdouble *params );
13414+
13415+GLAPI void GLAPIENTRY glGetFloatv( GLenum pname, GLfloat *params );
13416+
13417+GLAPI void GLAPIENTRY glGetIntegerv( GLenum pname, GLint *params );
13418+
13419+
13420+GLAPI void GLAPIENTRY glPushAttrib( GLbitfield mask );
13421+
13422+GLAPI void GLAPIENTRY glPopAttrib( void );
13423+
13424+
13425+GLAPI void GLAPIENTRY glPushClientAttrib( GLbitfield mask ); /* 1.1 */
13426+
13427+GLAPI void GLAPIENTRY glPopClientAttrib( void ); /* 1.1 */
13428+
13429+
13430+GLAPI GLint GLAPIENTRY glRenderMode( GLenum mode );
13431+
13432+GLAPI GLenum GLAPIENTRY glGetError( void );
13433+
13434+GLAPI const GLubyte * GLAPIENTRY glGetString( GLenum name );
13435+
13436+GLAPI void GLAPIENTRY glFinish( void );
13437+
13438+GLAPI void GLAPIENTRY glFlush( void );
13439+
13440+GLAPI void GLAPIENTRY glHint( GLenum target, GLenum mode );
13441+
13442+
13443+/*
13444+ * Depth Buffer
13445+ */
13446+
13447+GLAPI void GLAPIENTRY glClearDepth( GLclampd depth );
13448+
13449+GLAPI void GLAPIENTRY glDepthFunc( GLenum func );
13450+
13451+GLAPI void GLAPIENTRY glDepthMask( GLboolean flag );
13452+
13453+GLAPI void GLAPIENTRY glDepthRange( GLclampd near_val, GLclampd far_val );
13454+
13455+
13456+/*
13457+ * Accumulation Buffer
13458+ */
13459+
13460+GLAPI void GLAPIENTRY glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
13461+
13462+GLAPI void GLAPIENTRY glAccum( GLenum op, GLfloat value );
13463+
13464+
13465+/*
13466+ * Transformation
13467+ */
13468+
13469+GLAPI void GLAPIENTRY glMatrixMode( GLenum mode );
13470+
13471+GLAPI void GLAPIENTRY glOrtho( GLdouble left, GLdouble right,
13472+ GLdouble bottom, GLdouble top,
13473+ GLdouble near_val, GLdouble far_val );
13474+
13475+GLAPI void GLAPIENTRY glFrustum( GLdouble left, GLdouble right,
13476+ GLdouble bottom, GLdouble top,
13477+ GLdouble near_val, GLdouble far_val );
13478+
13479+GLAPI void GLAPIENTRY glViewport( GLint x, GLint y,
13480+ GLsizei width, GLsizei height );
13481+
13482+GLAPI void GLAPIENTRY glPushMatrix( void );
13483+
13484+GLAPI void GLAPIENTRY glPopMatrix( void );
13485+
13486+GLAPI void GLAPIENTRY glLoadIdentity( void );
13487+
13488+GLAPI void GLAPIENTRY glLoadMatrixd( const GLdouble *m );
13489+GLAPI void GLAPIENTRY glLoadMatrixf( const GLfloat *m );
13490+
13491+GLAPI void GLAPIENTRY glMultMatrixd( const GLdouble *m );
13492+GLAPI void GLAPIENTRY glMultMatrixf( const GLfloat *m );
13493+
13494+GLAPI void GLAPIENTRY glRotated( GLdouble angle,
13495+ GLdouble x, GLdouble y, GLdouble z );
13496+GLAPI void GLAPIENTRY glRotatef( GLfloat angle,
13497+ GLfloat x, GLfloat y, GLfloat z );
13498+
13499+GLAPI void GLAPIENTRY glScaled( GLdouble x, GLdouble y, GLdouble z );
13500+GLAPI void GLAPIENTRY glScalef( GLfloat x, GLfloat y, GLfloat z );
13501+
13502+GLAPI void GLAPIENTRY glTranslated( GLdouble x, GLdouble y, GLdouble z );
13503+GLAPI void GLAPIENTRY glTranslatef( GLfloat x, GLfloat y, GLfloat z );
13504+
13505+
13506+/*
13507+ * Display Lists
13508+ */
13509+
13510+GLAPI GLboolean GLAPIENTRY glIsList( GLuint list );
13511+
13512+GLAPI void GLAPIENTRY glDeleteLists( GLuint list, GLsizei range );
13513+
13514+GLAPI GLuint GLAPIENTRY glGenLists( GLsizei range );
13515+
13516+GLAPI void GLAPIENTRY glNewList( GLuint list, GLenum mode );
13517+
13518+GLAPI void GLAPIENTRY glEndList( void );
13519+
13520+GLAPI void GLAPIENTRY glCallList( GLuint list );
13521+
13522+GLAPI void GLAPIENTRY glCallLists( GLsizei n, GLenum type,
13523+ const GLvoid *lists );
13524+
13525+GLAPI void GLAPIENTRY glListBase( GLuint base );
13526+
13527+
13528+/*
13529+ * Drawing Functions
13530+ */
13531+
13532+GLAPI void GLAPIENTRY glBegin( GLenum mode );
13533+
13534+GLAPI void GLAPIENTRY glEnd( void );
13535+
13536+
13537+GLAPI void GLAPIENTRY glVertex2d( GLdouble x, GLdouble y );
13538+GLAPI void GLAPIENTRY glVertex2f( GLfloat x, GLfloat y );
13539+GLAPI void GLAPIENTRY glVertex2i( GLint x, GLint y );
13540+GLAPI void GLAPIENTRY glVertex2s( GLshort x, GLshort y );
13541+
13542+GLAPI void GLAPIENTRY glVertex3d( GLdouble x, GLdouble y, GLdouble z );
13543+GLAPI void GLAPIENTRY glVertex3f( GLfloat x, GLfloat y, GLfloat z );
13544+GLAPI void GLAPIENTRY glVertex3i( GLint x, GLint y, GLint z );
13545+GLAPI void GLAPIENTRY glVertex3s( GLshort x, GLshort y, GLshort z );
13546+
13547+GLAPI void GLAPIENTRY glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
13548+GLAPI void GLAPIENTRY glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
13549+GLAPI void GLAPIENTRY glVertex4i( GLint x, GLint y, GLint z, GLint w );
13550+GLAPI void GLAPIENTRY glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w );
13551+
13552+GLAPI void GLAPIENTRY glVertex2dv( const GLdouble *v );
13553+GLAPI void GLAPIENTRY glVertex2fv( const GLfloat *v );
13554+GLAPI void GLAPIENTRY glVertex2iv( const GLint *v );
13555+GLAPI void GLAPIENTRY glVertex2sv( const GLshort *v );
13556+
13557+GLAPI void GLAPIENTRY glVertex3dv( const GLdouble *v );
13558+GLAPI void GLAPIENTRY glVertex3fv( const GLfloat *v );
13559+GLAPI void GLAPIENTRY glVertex3iv( const GLint *v );
13560+GLAPI void GLAPIENTRY glVertex3sv( const GLshort *v );
13561+
13562+GLAPI void GLAPIENTRY glVertex4dv( const GLdouble *v );
13563+GLAPI void GLAPIENTRY glVertex4fv( const GLfloat *v );
13564+GLAPI void GLAPIENTRY glVertex4iv( const GLint *v );
13565+GLAPI void GLAPIENTRY glVertex4sv( const GLshort *v );
13566+
13567+
13568+GLAPI void GLAPIENTRY glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz );
13569+GLAPI void GLAPIENTRY glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz );
13570+GLAPI void GLAPIENTRY glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz );
13571+GLAPI void GLAPIENTRY glNormal3i( GLint nx, GLint ny, GLint nz );
13572+GLAPI void GLAPIENTRY glNormal3s( GLshort nx, GLshort ny, GLshort nz );
13573+
13574+GLAPI void GLAPIENTRY glNormal3bv( const GLbyte *v );
13575+GLAPI void GLAPIENTRY glNormal3dv( const GLdouble *v );
13576+GLAPI void GLAPIENTRY glNormal3fv( const GLfloat *v );
13577+GLAPI void GLAPIENTRY glNormal3iv( const GLint *v );
13578+GLAPI void GLAPIENTRY glNormal3sv( const GLshort *v );
13579+
13580+
13581+GLAPI void GLAPIENTRY glIndexd( GLdouble c );
13582+GLAPI void GLAPIENTRY glIndexf( GLfloat c );
13583+GLAPI void GLAPIENTRY glIndexi( GLint c );
13584+GLAPI void GLAPIENTRY glIndexs( GLshort c );
13585+GLAPI void GLAPIENTRY glIndexub( GLubyte c ); /* 1.1 */
13586+
13587+GLAPI void GLAPIENTRY glIndexdv( const GLdouble *c );
13588+GLAPI void GLAPIENTRY glIndexfv( const GLfloat *c );
13589+GLAPI void GLAPIENTRY glIndexiv( const GLint *c );
13590+GLAPI void GLAPIENTRY glIndexsv( const GLshort *c );
13591+GLAPI void GLAPIENTRY glIndexubv( const GLubyte *c ); /* 1.1 */
13592+
13593+GLAPI void GLAPIENTRY glColor3b( GLbyte red, GLbyte green, GLbyte blue );
13594+GLAPI void GLAPIENTRY glColor3d( GLdouble red, GLdouble green, GLdouble blue );
13595+GLAPI void GLAPIENTRY glColor3f( GLfloat red, GLfloat green, GLfloat blue );
13596+GLAPI void GLAPIENTRY glColor3i( GLint red, GLint green, GLint blue );
13597+GLAPI void GLAPIENTRY glColor3s( GLshort red, GLshort green, GLshort blue );
13598+GLAPI void GLAPIENTRY glColor3ub( GLubyte red, GLubyte green, GLubyte blue );
13599+GLAPI void GLAPIENTRY glColor3ui( GLuint red, GLuint green, GLuint blue );
13600+GLAPI void GLAPIENTRY glColor3us( GLushort red, GLushort green, GLushort blue );
13601+
13602+GLAPI void GLAPIENTRY glColor4b( GLbyte red, GLbyte green,
13603+ GLbyte blue, GLbyte alpha );
13604+GLAPI void GLAPIENTRY glColor4d( GLdouble red, GLdouble green,
13605+ GLdouble blue, GLdouble alpha );
13606+GLAPI void GLAPIENTRY glColor4f( GLfloat red, GLfloat green,
13607+ GLfloat blue, GLfloat alpha );
13608+GLAPI void GLAPIENTRY glColor4i( GLint red, GLint green,
13609+ GLint blue, GLint alpha );
13610+GLAPI void GLAPIENTRY glColor4s( GLshort red, GLshort green,
13611+ GLshort blue, GLshort alpha );
13612+GLAPI void GLAPIENTRY glColor4ub( GLubyte red, GLubyte green,
13613+ GLubyte blue, GLubyte alpha );
13614+GLAPI void GLAPIENTRY glColor4ui( GLuint red, GLuint green,
13615+ GLuint blue, GLuint alpha );
13616+GLAPI void GLAPIENTRY glColor4us( GLushort red, GLushort green,
13617+ GLushort blue, GLushort alpha );
13618+
13619+
13620+GLAPI void GLAPIENTRY glColor3bv( const GLbyte *v );
13621+GLAPI void GLAPIENTRY glColor3dv( const GLdouble *v );
13622+GLAPI void GLAPIENTRY glColor3fv( const GLfloat *v );
13623+GLAPI void GLAPIENTRY glColor3iv( const GLint *v );
13624+GLAPI void GLAPIENTRY glColor3sv( const GLshort *v );
13625+GLAPI void GLAPIENTRY glColor3ubv( const GLubyte *v );
13626+GLAPI void GLAPIENTRY glColor3uiv( const GLuint *v );
13627+GLAPI void GLAPIENTRY glColor3usv( const GLushort *v );
13628+
13629+GLAPI void GLAPIENTRY glColor4bv( const GLbyte *v );
13630+GLAPI void GLAPIENTRY glColor4dv( const GLdouble *v );
13631+GLAPI void GLAPIENTRY glColor4fv( const GLfloat *v );
13632+GLAPI void GLAPIENTRY glColor4iv( const GLint *v );
13633+GLAPI void GLAPIENTRY glColor4sv( const GLshort *v );
13634+GLAPI void GLAPIENTRY glColor4ubv( const GLubyte *v );
13635+GLAPI void GLAPIENTRY glColor4uiv( const GLuint *v );
13636+GLAPI void GLAPIENTRY glColor4usv( const GLushort *v );
13637+
13638+
13639+GLAPI void GLAPIENTRY glTexCoord1d( GLdouble s );
13640+GLAPI void GLAPIENTRY glTexCoord1f( GLfloat s );
13641+GLAPI void GLAPIENTRY glTexCoord1i( GLint s );
13642+GLAPI void GLAPIENTRY glTexCoord1s( GLshort s );
13643+
13644+GLAPI void GLAPIENTRY glTexCoord2d( GLdouble s, GLdouble t );
13645+GLAPI void GLAPIENTRY glTexCoord2f( GLfloat s, GLfloat t );
13646+GLAPI void GLAPIENTRY glTexCoord2i( GLint s, GLint t );
13647+GLAPI void GLAPIENTRY glTexCoord2s( GLshort s, GLshort t );
13648+
13649+GLAPI void GLAPIENTRY glTexCoord3d( GLdouble s, GLdouble t, GLdouble r );
13650+GLAPI void GLAPIENTRY glTexCoord3f( GLfloat s, GLfloat t, GLfloat r );
13651+GLAPI void GLAPIENTRY glTexCoord3i( GLint s, GLint t, GLint r );
13652+GLAPI void GLAPIENTRY glTexCoord3s( GLshort s, GLshort t, GLshort r );
13653+
13654+GLAPI void GLAPIENTRY glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q );
13655+GLAPI void GLAPIENTRY glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q );
13656+GLAPI void GLAPIENTRY glTexCoord4i( GLint s, GLint t, GLint r, GLint q );
13657+GLAPI void GLAPIENTRY glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q );
13658+
13659+GLAPI void GLAPIENTRY glTexCoord1dv( const GLdouble *v );
13660+GLAPI void GLAPIENTRY glTexCoord1fv( const GLfloat *v );
13661+GLAPI void GLAPIENTRY glTexCoord1iv( const GLint *v );
13662+GLAPI void GLAPIENTRY glTexCoord1sv( const GLshort *v );
13663+
13664+GLAPI void GLAPIENTRY glTexCoord2dv( const GLdouble *v );
13665+GLAPI void GLAPIENTRY glTexCoord2fv( const GLfloat *v );
13666+GLAPI void GLAPIENTRY glTexCoord2iv( const GLint *v );
13667+GLAPI void GLAPIENTRY glTexCoord2sv( const GLshort *v );
13668+
13669+GLAPI void GLAPIENTRY glTexCoord3dv( const GLdouble *v );
13670+GLAPI void GLAPIENTRY glTexCoord3fv( const GLfloat *v );
13671+GLAPI void GLAPIENTRY glTexCoord3iv( const GLint *v );
13672+GLAPI void GLAPIENTRY glTexCoord3sv( const GLshort *v );
13673+
13674+GLAPI void GLAPIENTRY glTexCoord4dv( const GLdouble *v );
13675+GLAPI void GLAPIENTRY glTexCoord4fv( const GLfloat *v );
13676+GLAPI void GLAPIENTRY glTexCoord4iv( const GLint *v );
13677+GLAPI void GLAPIENTRY glTexCoord4sv( const GLshort *v );
13678+
13679+
13680+GLAPI void GLAPIENTRY glRasterPos2d( GLdouble x, GLdouble y );
13681+GLAPI void GLAPIENTRY glRasterPos2f( GLfloat x, GLfloat y );
13682+GLAPI void GLAPIENTRY glRasterPos2i( GLint x, GLint y );
13683+GLAPI void GLAPIENTRY glRasterPos2s( GLshort x, GLshort y );
13684+
13685+GLAPI void GLAPIENTRY glRasterPos3d( GLdouble x, GLdouble y, GLdouble z );
13686+GLAPI void GLAPIENTRY glRasterPos3f( GLfloat x, GLfloat y, GLfloat z );
13687+GLAPI void GLAPIENTRY glRasterPos3i( GLint x, GLint y, GLint z );
13688+GLAPI void GLAPIENTRY glRasterPos3s( GLshort x, GLshort y, GLshort z );
13689+
13690+GLAPI void GLAPIENTRY glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
13691+GLAPI void GLAPIENTRY glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
13692+GLAPI void GLAPIENTRY glRasterPos4i( GLint x, GLint y, GLint z, GLint w );
13693+GLAPI void GLAPIENTRY glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w );
13694+
13695+GLAPI void GLAPIENTRY glRasterPos2dv( const GLdouble *v );
13696+GLAPI void GLAPIENTRY glRasterPos2fv( const GLfloat *v );
13697+GLAPI void GLAPIENTRY glRasterPos2iv( const GLint *v );
13698+GLAPI void GLAPIENTRY glRasterPos2sv( const GLshort *v );
13699+
13700+GLAPI void GLAPIENTRY glRasterPos3dv( const GLdouble *v );
13701+GLAPI void GLAPIENTRY glRasterPos3fv( const GLfloat *v );
13702+GLAPI void GLAPIENTRY glRasterPos3iv( const GLint *v );
13703+GLAPI void GLAPIENTRY glRasterPos3sv( const GLshort *v );
13704+
13705+GLAPI void GLAPIENTRY glRasterPos4dv( const GLdouble *v );
13706+GLAPI void GLAPIENTRY glRasterPos4fv( const GLfloat *v );
13707+GLAPI void GLAPIENTRY glRasterPos4iv( const GLint *v );
13708+GLAPI void GLAPIENTRY glRasterPos4sv( const GLshort *v );
13709+
13710+
13711+GLAPI void GLAPIENTRY glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 );
13712+GLAPI void GLAPIENTRY glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 );
13713+GLAPI void GLAPIENTRY glRecti( GLint x1, GLint y1, GLint x2, GLint y2 );
13714+GLAPI void GLAPIENTRY glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 );
13715+
13716+
13717+GLAPI void GLAPIENTRY glRectdv( const GLdouble *v1, const GLdouble *v2 );
13718+GLAPI void GLAPIENTRY glRectfv( const GLfloat *v1, const GLfloat *v2 );
13719+GLAPI void GLAPIENTRY glRectiv( const GLint *v1, const GLint *v2 );
13720+GLAPI void GLAPIENTRY glRectsv( const GLshort *v1, const GLshort *v2 );
13721+
13722+
13723+/*
13724+ * Vertex Arrays (1.1)
13725+ */
13726+
13727+GLAPI void GLAPIENTRY glVertexPointer( GLint size, GLenum type,
13728+ GLsizei stride, const GLvoid *ptr );
13729+
13730+GLAPI void GLAPIENTRY glNormalPointer( GLenum type, GLsizei stride,
13731+ const GLvoid *ptr );
13732+
13733+GLAPI void GLAPIENTRY glColorPointer( GLint size, GLenum type,
13734+ GLsizei stride, const GLvoid *ptr );
13735+
13736+GLAPI void GLAPIENTRY glIndexPointer( GLenum type, GLsizei stride,
13737+ const GLvoid *ptr );
13738+
13739+GLAPI void GLAPIENTRY glTexCoordPointer( GLint size, GLenum type,
13740+ GLsizei stride, const GLvoid *ptr );
13741+
13742+GLAPI void GLAPIENTRY glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr );
13743+
13744+GLAPI void GLAPIENTRY glGetPointerv( GLenum pname, GLvoid **params );
13745+
13746+GLAPI void GLAPIENTRY glArrayElement( GLint i );
13747+
13748+GLAPI void GLAPIENTRY glDrawArrays( GLenum mode, GLint first, GLsizei count );
13749+
13750+GLAPI void GLAPIENTRY glDrawElements( GLenum mode, GLsizei count,
13751+ GLenum type, const GLvoid *indices );
13752+
13753+GLAPI void GLAPIENTRY glInterleavedArrays( GLenum format, GLsizei stride,
13754+ const GLvoid *pointer );
13755+
13756+/*
13757+ * Lighting
13758+ */
13759+
13760+GLAPI void GLAPIENTRY glShadeModel( GLenum mode );
13761+
13762+GLAPI void GLAPIENTRY glLightf( GLenum light, GLenum pname, GLfloat param );
13763+GLAPI void GLAPIENTRY glLighti( GLenum light, GLenum pname, GLint param );
13764+GLAPI void GLAPIENTRY glLightfv( GLenum light, GLenum pname,
13765+ const GLfloat *params );
13766+GLAPI void GLAPIENTRY glLightiv( GLenum light, GLenum pname,
13767+ const GLint *params );
13768+
13769+GLAPI void GLAPIENTRY glGetLightfv( GLenum light, GLenum pname,
13770+ GLfloat *params );
13771+GLAPI void GLAPIENTRY glGetLightiv( GLenum light, GLenum pname,
13772+ GLint *params );
13773+
13774+GLAPI void GLAPIENTRY glLightModelf( GLenum pname, GLfloat param );
13775+GLAPI void GLAPIENTRY glLightModeli( GLenum pname, GLint param );
13776+GLAPI void GLAPIENTRY glLightModelfv( GLenum pname, const GLfloat *params );
13777+GLAPI void GLAPIENTRY glLightModeliv( GLenum pname, const GLint *params );
13778+
13779+GLAPI void GLAPIENTRY glMaterialf( GLenum face, GLenum pname, GLfloat param );
13780+GLAPI void GLAPIENTRY glMateriali( GLenum face, GLenum pname, GLint param );
13781+GLAPI void GLAPIENTRY glMaterialfv( GLenum face, GLenum pname, const GLfloat *params );
13782+GLAPI void GLAPIENTRY glMaterialiv( GLenum face, GLenum pname, const GLint *params );
13783+
13784+GLAPI void GLAPIENTRY glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params );
13785+GLAPI void GLAPIENTRY glGetMaterialiv( GLenum face, GLenum pname, GLint *params );
13786+
13787+GLAPI void GLAPIENTRY glColorMaterial( GLenum face, GLenum mode );
13788+
13789+
13790+/*
13791+ * Raster functions
13792+ */
13793+
13794+GLAPI void GLAPIENTRY glPixelZoom( GLfloat xfactor, GLfloat yfactor );
13795+
13796+GLAPI void GLAPIENTRY glPixelStoref( GLenum pname, GLfloat param );
13797+GLAPI void GLAPIENTRY glPixelStorei( GLenum pname, GLint param );
13798+
13799+GLAPI void GLAPIENTRY glPixelTransferf( GLenum pname, GLfloat param );
13800+GLAPI void GLAPIENTRY glPixelTransferi( GLenum pname, GLint param );
13801+
13802+GLAPI void GLAPIENTRY glPixelMapfv( GLenum map, GLsizei mapsize,
13803+ const GLfloat *values );
13804+GLAPI void GLAPIENTRY glPixelMapuiv( GLenum map, GLsizei mapsize,
13805+ const GLuint *values );
13806+GLAPI void GLAPIENTRY glPixelMapusv( GLenum map, GLsizei mapsize,
13807+ const GLushort *values );
13808+
13809+GLAPI void GLAPIENTRY glGetPixelMapfv( GLenum map, GLfloat *values );
13810+GLAPI void GLAPIENTRY glGetPixelMapuiv( GLenum map, GLuint *values );
13811+GLAPI void GLAPIENTRY glGetPixelMapusv( GLenum map, GLushort *values );
13812+
13813+GLAPI void GLAPIENTRY glBitmap( GLsizei width, GLsizei height,
13814+ GLfloat xorig, GLfloat yorig,
13815+ GLfloat xmove, GLfloat ymove,
13816+ const GLubyte *bitmap );
13817+
13818+GLAPI void GLAPIENTRY glReadPixels( GLint x, GLint y,
13819+ GLsizei width, GLsizei height,
13820+ GLenum format, GLenum type,
13821+ GLvoid *pixels );
13822+
13823+GLAPI void GLAPIENTRY glDrawPixels( GLsizei width, GLsizei height,
13824+ GLenum format, GLenum type,
13825+ const GLvoid *pixels );
13826+
13827+GLAPI void GLAPIENTRY glCopyPixels( GLint x, GLint y,
13828+ GLsizei width, GLsizei height,
13829+ GLenum type );
13830+
13831+/*
13832+ * Stenciling
13833+ */
13834+
13835+GLAPI void GLAPIENTRY glStencilFunc( GLenum func, GLint ref, GLuint mask );
13836+
13837+GLAPI void GLAPIENTRY glStencilMask( GLuint mask );
13838+
13839+GLAPI void GLAPIENTRY glStencilOp( GLenum fail, GLenum zfail, GLenum zpass );
13840+
13841+GLAPI void GLAPIENTRY glClearStencil( GLint s );
13842+
13843+
13844+
13845+/*
13846+ * Texture mapping
13847+ */
13848+
13849+GLAPI void GLAPIENTRY glTexGend( GLenum coord, GLenum pname, GLdouble param );
13850+GLAPI void GLAPIENTRY glTexGenf( GLenum coord, GLenum pname, GLfloat param );
13851+GLAPI void GLAPIENTRY glTexGeni( GLenum coord, GLenum pname, GLint param );
13852+
13853+GLAPI void GLAPIENTRY glTexGendv( GLenum coord, GLenum pname, const GLdouble *params );
13854+GLAPI void GLAPIENTRY glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params );
13855+GLAPI void GLAPIENTRY glTexGeniv( GLenum coord, GLenum pname, const GLint *params );
13856+
13857+GLAPI void GLAPIENTRY glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params );
13858+GLAPI void GLAPIENTRY glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params );
13859+GLAPI void GLAPIENTRY glGetTexGeniv( GLenum coord, GLenum pname, GLint *params );
13860+
13861+
13862+GLAPI void GLAPIENTRY glTexEnvf( GLenum target, GLenum pname, GLfloat param );
13863+GLAPI void GLAPIENTRY glTexEnvi( GLenum target, GLenum pname, GLint param );
13864+
13865+GLAPI void GLAPIENTRY glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params );
13866+GLAPI void GLAPIENTRY glTexEnviv( GLenum target, GLenum pname, const GLint *params );
13867+
13868+GLAPI void GLAPIENTRY glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params );
13869+GLAPI void GLAPIENTRY glGetTexEnviv( GLenum target, GLenum pname, GLint *params );
13870+
13871+
13872+GLAPI void GLAPIENTRY glTexParameterf( GLenum target, GLenum pname, GLfloat param );
13873+GLAPI void GLAPIENTRY glTexParameteri( GLenum target, GLenum pname, GLint param );
13874+
13875+GLAPI void GLAPIENTRY glTexParameterfv( GLenum target, GLenum pname,
13876+ const GLfloat *params );
13877+GLAPI void GLAPIENTRY glTexParameteriv( GLenum target, GLenum pname,
13878+ const GLint *params );
13879+
13880+GLAPI void GLAPIENTRY glGetTexParameterfv( GLenum target,
13881+ GLenum pname, GLfloat *params);
13882+GLAPI void GLAPIENTRY glGetTexParameteriv( GLenum target,
13883+ GLenum pname, GLint *params );
13884+
13885+GLAPI void GLAPIENTRY glGetTexLevelParameterfv( GLenum target, GLint level,
13886+ GLenum pname, GLfloat *params );
13887+GLAPI void GLAPIENTRY glGetTexLevelParameteriv( GLenum target, GLint level,
13888+ GLenum pname, GLint *params );
13889+
13890+
13891+GLAPI void GLAPIENTRY glTexImage1D( GLenum target, GLint level,
13892+ GLint internalFormat,
13893+ GLsizei width, GLint border,
13894+ GLenum format, GLenum type,
13895+ const GLvoid *pixels );
13896+
13897+GLAPI void GLAPIENTRY glTexImage2D( GLenum target, GLint level,
13898+ GLint internalFormat,
13899+ GLsizei width, GLsizei height,
13900+ GLint border, GLenum format, GLenum type,
13901+ const GLvoid *pixels );
13902+
13903+GLAPI void GLAPIENTRY glGetTexImage( GLenum target, GLint level,
13904+ GLenum format, GLenum type,
13905+ GLvoid *pixels );
13906+
13907+
13908+/* 1.1 functions */
13909+
13910+GLAPI void GLAPIENTRY glGenTextures( GLsizei n, GLuint *textures );
13911+
13912+GLAPI void GLAPIENTRY glDeleteTextures( GLsizei n, const GLuint *textures);
13913+
13914+GLAPI void GLAPIENTRY glBindTexture( GLenum target, GLuint texture );
13915+
13916+GLAPI void GLAPIENTRY glPrioritizeTextures( GLsizei n,
13917+ const GLuint *textures,
13918+ const GLclampf *priorities );
13919+
13920+GLAPI GLboolean GLAPIENTRY glAreTexturesResident( GLsizei n,
13921+ const GLuint *textures,
13922+ GLboolean *residences );
13923+
13924+GLAPI GLboolean GLAPIENTRY glIsTexture( GLuint texture );
13925+
13926+
13927+GLAPI void GLAPIENTRY glTexSubImage1D( GLenum target, GLint level,
13928+ GLint xoffset,
13929+ GLsizei width, GLenum format,
13930+ GLenum type, const GLvoid *pixels );
13931+
13932+
13933+GLAPI void GLAPIENTRY glTexSubImage2D( GLenum target, GLint level,
13934+ GLint xoffset, GLint yoffset,
13935+ GLsizei width, GLsizei height,
13936+ GLenum format, GLenum type,
13937+ const GLvoid *pixels );
13938+
13939+
13940+GLAPI void GLAPIENTRY glCopyTexImage1D( GLenum target, GLint level,
13941+ GLenum internalformat,
13942+ GLint x, GLint y,
13943+ GLsizei width, GLint border );
13944+
13945+
13946+GLAPI void GLAPIENTRY glCopyTexImage2D( GLenum target, GLint level,
13947+ GLenum internalformat,
13948+ GLint x, GLint y,
13949+ GLsizei width, GLsizei height,
13950+ GLint border );
13951+
13952+
13953+GLAPI void GLAPIENTRY glCopyTexSubImage1D( GLenum target, GLint level,
13954+ GLint xoffset, GLint x, GLint y,
13955+ GLsizei width );
13956+
13957+
13958+GLAPI void GLAPIENTRY glCopyTexSubImage2D( GLenum target, GLint level,
13959+ GLint xoffset, GLint yoffset,
13960+ GLint x, GLint y,
13961+ GLsizei width, GLsizei height );
13962+
13963+
13964+/*
13965+ * Evaluators
13966+ */
13967+
13968+GLAPI void GLAPIENTRY glMap1d( GLenum target, GLdouble u1, GLdouble u2,
13969+ GLint stride,
13970+ GLint order, const GLdouble *points );
13971+GLAPI void GLAPIENTRY glMap1f( GLenum target, GLfloat u1, GLfloat u2,
13972+ GLint stride,
13973+ GLint order, const GLfloat *points );
13974+
13975+GLAPI void GLAPIENTRY glMap2d( GLenum target,
13976+ GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
13977+ GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
13978+ const GLdouble *points );
13979+GLAPI void GLAPIENTRY glMap2f( GLenum target,
13980+ GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
13981+ GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
13982+ const GLfloat *points );
13983+
13984+GLAPI void GLAPIENTRY glGetMapdv( GLenum target, GLenum query, GLdouble *v );
13985+GLAPI void GLAPIENTRY glGetMapfv( GLenum target, GLenum query, GLfloat *v );
13986+GLAPI void GLAPIENTRY glGetMapiv( GLenum target, GLenum query, GLint *v );
13987+
13988+GLAPI void GLAPIENTRY glEvalCoord1d( GLdouble u );
13989+GLAPI void GLAPIENTRY glEvalCoord1f( GLfloat u );
13990+
13991+GLAPI void GLAPIENTRY glEvalCoord1dv( const GLdouble *u );
13992+GLAPI void GLAPIENTRY glEvalCoord1fv( const GLfloat *u );
13993+
13994+GLAPI void GLAPIENTRY glEvalCoord2d( GLdouble u, GLdouble v );
13995+GLAPI void GLAPIENTRY glEvalCoord2f( GLfloat u, GLfloat v );
13996+
13997+GLAPI void GLAPIENTRY glEvalCoord2dv( const GLdouble *u );
13998+GLAPI void GLAPIENTRY glEvalCoord2fv( const GLfloat *u );
13999+
14000+GLAPI void GLAPIENTRY glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 );
14001+GLAPI void GLAPIENTRY glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 );
14002+
14003+GLAPI void GLAPIENTRY glMapGrid2d( GLint un, GLdouble u1, GLdouble u2,
14004+ GLint vn, GLdouble v1, GLdouble v2 );
14005+GLAPI void GLAPIENTRY glMapGrid2f( GLint un, GLfloat u1, GLfloat u2,
14006+ GLint vn, GLfloat v1, GLfloat v2 );
14007+
14008+GLAPI void GLAPIENTRY glEvalPoint1( GLint i );
14009+
14010+GLAPI void GLAPIENTRY glEvalPoint2( GLint i, GLint j );
14011+
14012+GLAPI void GLAPIENTRY glEvalMesh1( GLenum mode, GLint i1, GLint i2 );
14013+
14014+GLAPI void GLAPIENTRY glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
14015+
14016+
14017+/*
14018+ * Fog
14019+ */
14020+
14021+GLAPI void GLAPIENTRY glFogf( GLenum pname, GLfloat param );
14022+
14023+GLAPI void GLAPIENTRY glFogi( GLenum pname, GLint param );
14024+
14025+GLAPI void GLAPIENTRY glFogfv( GLenum pname, const GLfloat *params );
14026+
14027+GLAPI void GLAPIENTRY glFogiv( GLenum pname, const GLint *params );
14028+
14029+
14030+/*
14031+ * Selection and Feedback
14032+ */
14033+
14034+GLAPI void GLAPIENTRY glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer );
14035+
14036+GLAPI void GLAPIENTRY glPassThrough( GLfloat token );
14037+
14038+GLAPI void GLAPIENTRY glSelectBuffer( GLsizei size, GLuint *buffer );
14039+
14040+GLAPI void GLAPIENTRY glInitNames( void );
14041+
14042+GLAPI void GLAPIENTRY glLoadName( GLuint name );
14043+
14044+GLAPI void GLAPIENTRY glPushName( GLuint name );
14045+
14046+GLAPI void GLAPIENTRY glPopName( void );
14047+
14048+
14049+
14050+/*
14051+ * OpenGL 1.2
14052+ */
14053+
14054+#define GL_RESCALE_NORMAL 0x803A
14055+#define GL_CLAMP_TO_EDGE 0x812F
14056+#define GL_MAX_ELEMENTS_VERTICES 0x80E8
14057+#define GL_MAX_ELEMENTS_INDICES 0x80E9
14058+#define GL_BGR 0x80E0
14059+#define GL_BGRA 0x80E1
14060+#define GL_UNSIGNED_BYTE_3_3_2 0x8032
14061+#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
14062+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
14063+#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
14064+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
14065+#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
14066+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
14067+#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
14068+#define GL_UNSIGNED_INT_8_8_8_8 0x8035
14069+#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
14070+#define GL_UNSIGNED_INT_10_10_10_2 0x8036
14071+#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
14072+#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
14073+#define GL_SINGLE_COLOR 0x81F9
14074+#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
14075+#define GL_TEXTURE_MIN_LOD 0x813A
14076+#define GL_TEXTURE_MAX_LOD 0x813B
14077+#define GL_TEXTURE_BASE_LEVEL 0x813C
14078+#define GL_TEXTURE_MAX_LEVEL 0x813D
14079+#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
14080+#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
14081+#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
14082+#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
14083+#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
14084+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
14085+#define GL_PACK_SKIP_IMAGES 0x806B
14086+#define GL_PACK_IMAGE_HEIGHT 0x806C
14087+#define GL_UNPACK_SKIP_IMAGES 0x806D
14088+#define GL_UNPACK_IMAGE_HEIGHT 0x806E
14089+#define GL_TEXTURE_3D 0x806F
14090+#define GL_PROXY_TEXTURE_3D 0x8070
14091+#define GL_TEXTURE_DEPTH 0x8071
14092+#define GL_TEXTURE_WRAP_R 0x8072
14093+#define GL_MAX_3D_TEXTURE_SIZE 0x8073
14094+#define GL_TEXTURE_BINDING_3D 0x806A
14095+
14096+GLAPI void GLAPIENTRY glDrawRangeElements( GLenum mode, GLuint start,
14097+ GLuint end, GLsizei count, GLenum type, const GLvoid *indices );
14098+
14099+GLAPI void GLAPIENTRY glTexImage3D( GLenum target, GLint level,
14100+ GLint internalFormat,
14101+ GLsizei width, GLsizei height,
14102+ GLsizei depth, GLint border,
14103+ GLenum format, GLenum type,
14104+ const GLvoid *pixels );
14105+
14106+GLAPI void GLAPIENTRY glTexSubImage3D( GLenum target, GLint level,
14107+ GLint xoffset, GLint yoffset,
14108+ GLint zoffset, GLsizei width,
14109+ GLsizei height, GLsizei depth,
14110+ GLenum format,
14111+ GLenum type, const GLvoid *pixels);
14112+
14113+GLAPI void GLAPIENTRY glCopyTexSubImage3D( GLenum target, GLint level,
14114+ GLint xoffset, GLint yoffset,
14115+ GLint zoffset, GLint x,
14116+ GLint y, GLsizei width,
14117+ GLsizei height );
14118+
14119+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
14120+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);
14121+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);
14122+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
14123+
14124+
14125+/*
14126+ * GL_ARB_imaging
14127+ */
14128+
14129+#define GL_CONSTANT_COLOR 0x8001
14130+#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
14131+#define GL_CONSTANT_ALPHA 0x8003
14132+#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
14133+#define GL_COLOR_TABLE 0x80D0
14134+#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
14135+#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
14136+#define GL_PROXY_COLOR_TABLE 0x80D3
14137+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
14138+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
14139+#define GL_COLOR_TABLE_SCALE 0x80D6
14140+#define GL_COLOR_TABLE_BIAS 0x80D7
14141+#define GL_COLOR_TABLE_FORMAT 0x80D8
14142+#define GL_COLOR_TABLE_WIDTH 0x80D9
14143+#define GL_COLOR_TABLE_RED_SIZE 0x80DA
14144+#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
14145+#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
14146+#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
14147+#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
14148+#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
14149+#define GL_CONVOLUTION_1D 0x8010
14150+#define GL_CONVOLUTION_2D 0x8011
14151+#define GL_SEPARABLE_2D 0x8012
14152+#define GL_CONVOLUTION_BORDER_MODE 0x8013
14153+#define GL_CONVOLUTION_FILTER_SCALE 0x8014
14154+#define GL_CONVOLUTION_FILTER_BIAS 0x8015
14155+#define GL_REDUCE 0x8016
14156+#define GL_CONVOLUTION_FORMAT 0x8017
14157+#define GL_CONVOLUTION_WIDTH 0x8018
14158+#define GL_CONVOLUTION_HEIGHT 0x8019
14159+#define GL_MAX_CONVOLUTION_WIDTH 0x801A
14160+#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
14161+#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
14162+#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
14163+#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
14164+#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
14165+#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
14166+#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
14167+#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
14168+#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
14169+#define GL_CONSTANT_BORDER 0x8151
14170+#define GL_REPLICATE_BORDER 0x8153
14171+#define GL_CONVOLUTION_BORDER_COLOR 0x8154
14172+#define GL_COLOR_MATRIX 0x80B1
14173+#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
14174+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
14175+#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
14176+#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
14177+#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
14178+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
14179+#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
14180+#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
14181+#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
14182+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
14183+#define GL_HISTOGRAM 0x8024
14184+#define GL_PROXY_HISTOGRAM 0x8025
14185+#define GL_HISTOGRAM_WIDTH 0x8026
14186+#define GL_HISTOGRAM_FORMAT 0x8027
14187+#define GL_HISTOGRAM_RED_SIZE 0x8028
14188+#define GL_HISTOGRAM_GREEN_SIZE 0x8029
14189+#define GL_HISTOGRAM_BLUE_SIZE 0x802A
14190+#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
14191+#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
14192+#define GL_HISTOGRAM_SINK 0x802D
14193+#define GL_MINMAX 0x802E
14194+#define GL_MINMAX_FORMAT 0x802F
14195+#define GL_MINMAX_SINK 0x8030
14196+#define GL_TABLE_TOO_LARGE 0x8031
14197+#define GL_BLEND_EQUATION 0x8009
14198+#define GL_MIN 0x8007
14199+#define GL_MAX 0x8008
14200+#define GL_FUNC_ADD 0x8006
14201+#define GL_FUNC_SUBTRACT 0x800A
14202+#define GL_FUNC_REVERSE_SUBTRACT 0x800B
14203+#define GL_BLEND_COLOR 0x8005
14204+
14205+
14206+GLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat,
14207+ GLsizei width, GLenum format,
14208+ GLenum type, const GLvoid *table );
14209+
14210+GLAPI void GLAPIENTRY glColorSubTable( GLenum target,
14211+ GLsizei start, GLsizei count,
14212+ GLenum format, GLenum type,
14213+ const GLvoid *data );
14214+
14215+GLAPI void GLAPIENTRY glColorTableParameteriv(GLenum target, GLenum pname,
14216+ const GLint *params);
14217+
14218+GLAPI void GLAPIENTRY glColorTableParameterfv(GLenum target, GLenum pname,
14219+ const GLfloat *params);
14220+
14221+GLAPI void GLAPIENTRY glCopyColorSubTable( GLenum target, GLsizei start,
14222+ GLint x, GLint y, GLsizei width );
14223+
14224+GLAPI void GLAPIENTRY glCopyColorTable( GLenum target, GLenum internalformat,
14225+ GLint x, GLint y, GLsizei width );
14226+
14227+GLAPI void GLAPIENTRY glGetColorTable( GLenum target, GLenum format,
14228+ GLenum type, GLvoid *table );
14229+
14230+GLAPI void GLAPIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname,
14231+ GLfloat *params );
14232+
14233+GLAPI void GLAPIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname,
14234+ GLint *params );
14235+
14236+GLAPI void GLAPIENTRY glBlendEquation( GLenum mode );
14237+
14238+GLAPI void GLAPIENTRY glBlendColor( GLclampf red, GLclampf green,
14239+ GLclampf blue, GLclampf alpha );
14240+
14241+GLAPI void GLAPIENTRY glHistogram( GLenum target, GLsizei width,
14242+ GLenum internalformat, GLboolean sink );
14243+
14244+GLAPI void GLAPIENTRY glResetHistogram( GLenum target );
14245+
14246+GLAPI void GLAPIENTRY glGetHistogram( GLenum target, GLboolean reset,
14247+ GLenum format, GLenum type,
14248+ GLvoid *values );
14249+
14250+GLAPI void GLAPIENTRY glGetHistogramParameterfv( GLenum target, GLenum pname,
14251+ GLfloat *params );
14252+
14253+GLAPI void GLAPIENTRY glGetHistogramParameteriv( GLenum target, GLenum pname,
14254+ GLint *params );
14255+
14256+GLAPI void GLAPIENTRY glMinmax( GLenum target, GLenum internalformat,
14257+ GLboolean sink );
14258+
14259+GLAPI void GLAPIENTRY glResetMinmax( GLenum target );
14260+
14261+GLAPI void GLAPIENTRY glGetMinmax( GLenum target, GLboolean reset,
14262+ GLenum format, GLenum types,
14263+ GLvoid *values );
14264+
14265+GLAPI void GLAPIENTRY glGetMinmaxParameterfv( GLenum target, GLenum pname,
14266+ GLfloat *params );
14267+
14268+GLAPI void GLAPIENTRY glGetMinmaxParameteriv( GLenum target, GLenum pname,
14269+ GLint *params );
14270+
14271+GLAPI void GLAPIENTRY glConvolutionFilter1D( GLenum target,
14272+ GLenum internalformat, GLsizei width, GLenum format, GLenum type,
14273+ const GLvoid *image );
14274+
14275+GLAPI void GLAPIENTRY glConvolutionFilter2D( GLenum target,
14276+ GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
14277+ GLenum type, const GLvoid *image );
14278+
14279+GLAPI void GLAPIENTRY glConvolutionParameterf( GLenum target, GLenum pname,
14280+ GLfloat params );
14281+
14282+GLAPI void GLAPIENTRY glConvolutionParameterfv( GLenum target, GLenum pname,
14283+ const GLfloat *params );
14284+
14285+GLAPI void GLAPIENTRY glConvolutionParameteri( GLenum target, GLenum pname,
14286+ GLint params );
14287+
14288+GLAPI void GLAPIENTRY glConvolutionParameteriv( GLenum target, GLenum pname,
14289+ const GLint *params );
14290+
14291+GLAPI void GLAPIENTRY glCopyConvolutionFilter1D( GLenum target,
14292+ GLenum internalformat, GLint x, GLint y, GLsizei width );
14293+
14294+GLAPI void GLAPIENTRY glCopyConvolutionFilter2D( GLenum target,
14295+ GLenum internalformat, GLint x, GLint y, GLsizei width,
14296+ GLsizei height);
14297+
14298+GLAPI void GLAPIENTRY glGetConvolutionFilter( GLenum target, GLenum format,
14299+ GLenum type, GLvoid *image );
14300+
14301+GLAPI void GLAPIENTRY glGetConvolutionParameterfv( GLenum target, GLenum pname,
14302+ GLfloat *params );
14303+
14304+GLAPI void GLAPIENTRY glGetConvolutionParameteriv( GLenum target, GLenum pname,
14305+ GLint *params );
14306+
14307+GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target,
14308+ GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
14309+ GLenum type, const GLvoid *row, const GLvoid *column );
14310+
14311+GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
14312+ GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
14313+
14314+typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
14315+typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
14316+typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
14317+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
14318+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
14319+typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
14320+typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
14321+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
14322+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
14323+typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
14324+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
14325+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
14326+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
14327+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
14328+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
14329+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
14330+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
14331+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
14332+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
14333+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
14334+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
14335+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
14336+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
14337+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
14338+typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
14339+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
14340+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
14341+typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
14342+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
14343+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
14344+typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
14345+typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
14346+typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
14347+typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
14348+
14349+
14350+
14351+/*
14352+ * OpenGL 1.3
14353+ */
14354+
14355+/* multitexture */
14356+#define GL_TEXTURE0 0x84C0
14357+#define GL_TEXTURE1 0x84C1
14358+#define GL_TEXTURE2 0x84C2
14359+#define GL_TEXTURE3 0x84C3
14360+#define GL_TEXTURE4 0x84C4
14361+#define GL_TEXTURE5 0x84C5
14362+#define GL_TEXTURE6 0x84C6
14363+#define GL_TEXTURE7 0x84C7
14364+#define GL_TEXTURE8 0x84C8
14365+#define GL_TEXTURE9 0x84C9
14366+#define GL_TEXTURE10 0x84CA
14367+#define GL_TEXTURE11 0x84CB
14368+#define GL_TEXTURE12 0x84CC
14369+#define GL_TEXTURE13 0x84CD
14370+#define GL_TEXTURE14 0x84CE
14371+#define GL_TEXTURE15 0x84CF
14372+#define GL_TEXTURE16 0x84D0
14373+#define GL_TEXTURE17 0x84D1
14374+#define GL_TEXTURE18 0x84D2
14375+#define GL_TEXTURE19 0x84D3
14376+#define GL_TEXTURE20 0x84D4
14377+#define GL_TEXTURE21 0x84D5
14378+#define GL_TEXTURE22 0x84D6
14379+#define GL_TEXTURE23 0x84D7
14380+#define GL_TEXTURE24 0x84D8
14381+#define GL_TEXTURE25 0x84D9
14382+#define GL_TEXTURE26 0x84DA
14383+#define GL_TEXTURE27 0x84DB
14384+#define GL_TEXTURE28 0x84DC
14385+#define GL_TEXTURE29 0x84DD
14386+#define GL_TEXTURE30 0x84DE
14387+#define GL_TEXTURE31 0x84DF
14388+#define GL_ACTIVE_TEXTURE 0x84E0
14389+#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
14390+#define GL_MAX_TEXTURE_UNITS 0x84E2
14391+/* texture_cube_map */
14392+#define GL_NORMAL_MAP 0x8511
14393+#define GL_REFLECTION_MAP 0x8512
14394+#define GL_TEXTURE_CUBE_MAP 0x8513
14395+#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
14396+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
14397+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
14398+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
14399+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
14400+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
14401+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
14402+#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
14403+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
14404+/* texture_compression */
14405+#define GL_COMPRESSED_ALPHA 0x84E9
14406+#define GL_COMPRESSED_LUMINANCE 0x84EA
14407+#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
14408+#define GL_COMPRESSED_INTENSITY 0x84EC
14409+#define GL_COMPRESSED_RGB 0x84ED
14410+#define GL_COMPRESSED_RGBA 0x84EE
14411+#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
14412+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
14413+#define GL_TEXTURE_COMPRESSED 0x86A1
14414+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
14415+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
14416+/* multisample */
14417+#define GL_MULTISAMPLE 0x809D
14418+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
14419+#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
14420+#define GL_SAMPLE_COVERAGE 0x80A0
14421+#define GL_SAMPLE_BUFFERS 0x80A8
14422+#define GL_SAMPLES 0x80A9
14423+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
14424+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
14425+#define GL_MULTISAMPLE_BIT 0x20000000
14426+/* transpose_matrix */
14427+#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
14428+#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
14429+#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
14430+#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
14431+/* texture_env_combine */
14432+#define GL_COMBINE 0x8570
14433+#define GL_COMBINE_RGB 0x8571
14434+#define GL_COMBINE_ALPHA 0x8572
14435+#define GL_SOURCE0_RGB 0x8580
14436+#define GL_SOURCE1_RGB 0x8581
14437+#define GL_SOURCE2_RGB 0x8582
14438+#define GL_SOURCE0_ALPHA 0x8588
14439+#define GL_SOURCE1_ALPHA 0x8589
14440+#define GL_SOURCE2_ALPHA 0x858A
14441+#define GL_OPERAND0_RGB 0x8590
14442+#define GL_OPERAND1_RGB 0x8591
14443+#define GL_OPERAND2_RGB 0x8592
14444+#define GL_OPERAND0_ALPHA 0x8598
14445+#define GL_OPERAND1_ALPHA 0x8599
14446+#define GL_OPERAND2_ALPHA 0x859A
14447+#define GL_RGB_SCALE 0x8573
14448+#define GL_ADD_SIGNED 0x8574
14449+#define GL_INTERPOLATE 0x8575
14450+#define GL_SUBTRACT 0x84E7
14451+#define GL_CONSTANT 0x8576
14452+#define GL_PRIMARY_COLOR 0x8577
14453+#define GL_PREVIOUS 0x8578
14454+/* texture_env_dot3 */
14455+#define GL_DOT3_RGB 0x86AE
14456+#define GL_DOT3_RGBA 0x86AF
14457+/* texture_border_clamp */
14458+#define GL_CLAMP_TO_BORDER 0x812D
14459+
14460+GLAPI void GLAPIENTRY glActiveTexture( GLenum texture );
14461+
14462+GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture );
14463+
14464+GLAPI void GLAPIENTRY glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data );
14465+
14466+GLAPI void GLAPIENTRY glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data );
14467+
14468+GLAPI void GLAPIENTRY glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data );
14469+
14470+GLAPI void GLAPIENTRY glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data );
14471+
14472+GLAPI void GLAPIENTRY glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data );
14473+
14474+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 );
14475+
14476+GLAPI void GLAPIENTRY glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img );
14477+
14478+GLAPI void GLAPIENTRY glMultiTexCoord1d( GLenum target, GLdouble s );
14479+
14480+GLAPI void GLAPIENTRY glMultiTexCoord1dv( GLenum target, const GLdouble *v );
14481+
14482+GLAPI void GLAPIENTRY glMultiTexCoord1f( GLenum target, GLfloat s );
14483+
14484+GLAPI void GLAPIENTRY glMultiTexCoord1fv( GLenum target, const GLfloat *v );
14485+
14486+GLAPI void GLAPIENTRY glMultiTexCoord1i( GLenum target, GLint s );
14487+
14488+GLAPI void GLAPIENTRY glMultiTexCoord1iv( GLenum target, const GLint *v );
14489+
14490+GLAPI void GLAPIENTRY glMultiTexCoord1s( GLenum target, GLshort s );
14491+
14492+GLAPI void GLAPIENTRY glMultiTexCoord1sv( GLenum target, const GLshort *v );
14493+
14494+GLAPI void GLAPIENTRY glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t );
14495+
14496+GLAPI void GLAPIENTRY glMultiTexCoord2dv( GLenum target, const GLdouble *v );
14497+
14498+GLAPI void GLAPIENTRY glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t );
14499+
14500+GLAPI void GLAPIENTRY glMultiTexCoord2fv( GLenum target, const GLfloat *v );
14501+
14502+GLAPI void GLAPIENTRY glMultiTexCoord2i( GLenum target, GLint s, GLint t );
14503+
14504+GLAPI void GLAPIENTRY glMultiTexCoord2iv( GLenum target, const GLint *v );
14505+
14506+GLAPI void GLAPIENTRY glMultiTexCoord2s( GLenum target, GLshort s, GLshort t );
14507+
14508+GLAPI void GLAPIENTRY glMultiTexCoord2sv( GLenum target, const GLshort *v );
14509+
14510+GLAPI void GLAPIENTRY glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r );
14511+
14512+GLAPI void GLAPIENTRY glMultiTexCoord3dv( GLenum target, const GLdouble *v );
14513+
14514+GLAPI void GLAPIENTRY glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r );
14515+
14516+GLAPI void GLAPIENTRY glMultiTexCoord3fv( GLenum target, const GLfloat *v );
14517+
14518+GLAPI void GLAPIENTRY glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r );
14519+
14520+GLAPI void GLAPIENTRY glMultiTexCoord3iv( GLenum target, const GLint *v );
14521+
14522+GLAPI void GLAPIENTRY glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r );
14523+
14524+GLAPI void GLAPIENTRY glMultiTexCoord3sv( GLenum target, const GLshort *v );
14525+
14526+GLAPI void GLAPIENTRY glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q );
14527+
14528+GLAPI void GLAPIENTRY glMultiTexCoord4dv( GLenum target, const GLdouble *v );
14529+
14530+GLAPI void GLAPIENTRY glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q );
14531+
14532+GLAPI void GLAPIENTRY glMultiTexCoord4fv( GLenum target, const GLfloat *v );
14533+
14534+GLAPI void GLAPIENTRY glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q );
14535+
14536+GLAPI void GLAPIENTRY glMultiTexCoord4iv( GLenum target, const GLint *v );
14537+
14538+GLAPI void GLAPIENTRY glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q );
14539+
14540+GLAPI void GLAPIENTRY glMultiTexCoord4sv( GLenum target, const GLshort *v );
14541+
14542+
14543+GLAPI void GLAPIENTRY glLoadTransposeMatrixd( const GLdouble m[16] );
14544+
14545+GLAPI void GLAPIENTRY glLoadTransposeMatrixf( const GLfloat m[16] );
14546+
14547+GLAPI void GLAPIENTRY glMultTransposeMatrixd( const GLdouble m[16] );
14548+
14549+GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] );
14550+
14551+GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert );
14552+
14553+typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
14554+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
14555+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
14556+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
14557+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
14558+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
14559+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
14560+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
14561+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
14562+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
14563+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
14564+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
14565+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
14566+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
14567+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
14568+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
14569+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
14570+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
14571+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
14572+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
14573+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
14574+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
14575+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
14576+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
14577+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
14578+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
14579+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
14580+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
14581+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
14582+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
14583+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
14584+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
14585+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
14586+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
14587+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
14588+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
14589+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
14590+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
14591+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
14592+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
14593+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
14594+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
14595+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);
14596+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
14597+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
14598+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img);
14599+
14600+
14601+/*
14602+ * GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1)
14603+ */
14604+#ifndef GL_ARB_multitexture
14605+#define GL_ARB_multitexture 1
14606+
14607+#define GL_TEXTURE0_ARB 0x84C0
14608+#define GL_TEXTURE1_ARB 0x84C1
14609+#define GL_TEXTURE2_ARB 0x84C2
14610+#define GL_TEXTURE3_ARB 0x84C3
14611+#define GL_TEXTURE4_ARB 0x84C4
14612+#define GL_TEXTURE5_ARB 0x84C5
14613+#define GL_TEXTURE6_ARB 0x84C6
14614+#define GL_TEXTURE7_ARB 0x84C7
14615+#define GL_TEXTURE8_ARB 0x84C8
14616+#define GL_TEXTURE9_ARB 0x84C9
14617+#define GL_TEXTURE10_ARB 0x84CA
14618+#define GL_TEXTURE11_ARB 0x84CB
14619+#define GL_TEXTURE12_ARB 0x84CC
14620+#define GL_TEXTURE13_ARB 0x84CD
14621+#define GL_TEXTURE14_ARB 0x84CE
14622+#define GL_TEXTURE15_ARB 0x84CF
14623+#define GL_TEXTURE16_ARB 0x84D0
14624+#define GL_TEXTURE17_ARB 0x84D1
14625+#define GL_TEXTURE18_ARB 0x84D2
14626+#define GL_TEXTURE19_ARB 0x84D3
14627+#define GL_TEXTURE20_ARB 0x84D4
14628+#define GL_TEXTURE21_ARB 0x84D5
14629+#define GL_TEXTURE22_ARB 0x84D6
14630+#define GL_TEXTURE23_ARB 0x84D7
14631+#define GL_TEXTURE24_ARB 0x84D8
14632+#define GL_TEXTURE25_ARB 0x84D9
14633+#define GL_TEXTURE26_ARB 0x84DA
14634+#define GL_TEXTURE27_ARB 0x84DB
14635+#define GL_TEXTURE28_ARB 0x84DC
14636+#define GL_TEXTURE29_ARB 0x84DD
14637+#define GL_TEXTURE30_ARB 0x84DE
14638+#define GL_TEXTURE31_ARB 0x84DF
14639+#define GL_ACTIVE_TEXTURE_ARB 0x84E0
14640+#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
14641+#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
14642+
14643+GLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture);
14644+GLAPI void GLAPIENTRY glClientActiveTextureARB(GLenum texture);
14645+GLAPI void GLAPIENTRY glMultiTexCoord1dARB(GLenum target, GLdouble s);
14646+GLAPI void GLAPIENTRY glMultiTexCoord1dvARB(GLenum target, const GLdouble *v);
14647+GLAPI void GLAPIENTRY glMultiTexCoord1fARB(GLenum target, GLfloat s);
14648+GLAPI void GLAPIENTRY glMultiTexCoord1fvARB(GLenum target, const GLfloat *v);
14649+GLAPI void GLAPIENTRY glMultiTexCoord1iARB(GLenum target, GLint s);
14650+GLAPI void GLAPIENTRY glMultiTexCoord1ivARB(GLenum target, const GLint *v);
14651+GLAPI void GLAPIENTRY glMultiTexCoord1sARB(GLenum target, GLshort s);
14652+GLAPI void GLAPIENTRY glMultiTexCoord1svARB(GLenum target, const GLshort *v);
14653+GLAPI void GLAPIENTRY glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t);
14654+GLAPI void GLAPIENTRY glMultiTexCoord2dvARB(GLenum target, const GLdouble *v);
14655+GLAPI void GLAPIENTRY glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t);
14656+GLAPI void GLAPIENTRY glMultiTexCoord2fvARB(GLenum target, const GLfloat *v);
14657+GLAPI void GLAPIENTRY glMultiTexCoord2iARB(GLenum target, GLint s, GLint t);
14658+GLAPI void GLAPIENTRY glMultiTexCoord2ivARB(GLenum target, const GLint *v);
14659+GLAPI void GLAPIENTRY glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t);
14660+GLAPI void GLAPIENTRY glMultiTexCoord2svARB(GLenum target, const GLshort *v);
14661+GLAPI void GLAPIENTRY glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r);
14662+GLAPI void GLAPIENTRY glMultiTexCoord3dvARB(GLenum target, const GLdouble *v);
14663+GLAPI void GLAPIENTRY glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r);
14664+GLAPI void GLAPIENTRY glMultiTexCoord3fvARB(GLenum target, const GLfloat *v);
14665+GLAPI void GLAPIENTRY glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r);
14666+GLAPI void GLAPIENTRY glMultiTexCoord3ivARB(GLenum target, const GLint *v);
14667+GLAPI void GLAPIENTRY glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r);
14668+GLAPI void GLAPIENTRY glMultiTexCoord3svARB(GLenum target, const GLshort *v);
14669+GLAPI void GLAPIENTRY glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
14670+GLAPI void GLAPIENTRY glMultiTexCoord4dvARB(GLenum target, const GLdouble *v);
14671+GLAPI void GLAPIENTRY glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
14672+GLAPI void GLAPIENTRY glMultiTexCoord4fvARB(GLenum target, const GLfloat *v);
14673+GLAPI void GLAPIENTRY glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q);
14674+GLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v);
14675+GLAPI void GLAPIENTRY glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
14676+GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v);
14677+
14678+typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
14679+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
14680+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
14681+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
14682+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
14683+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
14684+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
14685+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
14686+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
14687+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
14688+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
14689+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
14690+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
14691+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
14692+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
14693+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
14694+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
14695+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
14696+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
14697+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
14698+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
14699+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
14700+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
14701+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
14702+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
14703+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
14704+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
14705+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
14706+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
14707+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
14708+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
14709+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
14710+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
14711+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
14712+
14713+#endif /* GL_ARB_multitexture */
14714+
14715+
14716+
14717+/*
14718+ * Define this token if you want "old-style" header file behaviour (extensions
14719+ * defined in gl.h). Otherwise, extensions will be included from glext.h.
14720+ */
14721+#if defined(GL_GLEXT_LEGACY)
14722+
14723+/* All extensions that used to be here are now found in glext.h */
14724+
14725+#else /* GL_GLEXT_LEGACY */
14726+
14727+#include <mesa_glext.h>
14728+
14729+#endif /* GL_GLEXT_LEGACY */
14730+
14731+
14732+
14733+#if GL_ARB_shader_objects
14734+
14735+#ifndef GL_MESA_shader_debug
14736+#define GL_MESA_shader_debug 1
14737+
14738+#define GL_DEBUG_OBJECT_MESA 0x8759
14739+#define GL_DEBUG_PRINT_MESA 0x875A
14740+#define GL_DEBUG_ASSERT_MESA 0x875B
14741+
14742+GLAPI GLhandleARB APIENTRY glCreateDebugObjectMESA (void);
14743+GLAPI void APIENTRY glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
14744+GLAPI void APIENTRY glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength,
14745+ GLsizei *length, GLcharARB *debugLog);
14746+GLAPI GLsizei APIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
14747+
14748+#endif /* GL_MESA_shader_debug */
14749+
14750+#endif /* GL_ARB_shader_objects */
14751+
14752+
14753+/*
14754+ * ???. GL_MESA_packed_depth_stencil
14755+ * XXX obsolete
14756+ */
14757+#ifndef GL_MESA_packed_depth_stencil
14758+#define GL_MESA_packed_depth_stencil 1
14759+
14760+#define GL_DEPTH_STENCIL_MESA 0x8750
14761+#define GL_UNSIGNED_INT_24_8_MESA 0x8751
14762+#define GL_UNSIGNED_INT_8_24_REV_MESA 0x8752
14763+#define GL_UNSIGNED_SHORT_15_1_MESA 0x8753
14764+#define GL_UNSIGNED_SHORT_1_15_REV_MESA 0x8754
14765+
14766+#endif /* GL_MESA_packed_depth_stencil */
14767+
14768+
14769+#ifndef GL_MESA_program_debug
14770+#define GL_MESA_program_debug 1
14771+
14772+#define GL_FRAGMENT_PROGRAM_POSITION_MESA 0x8bb0
14773+#define GL_FRAGMENT_PROGRAM_CALLBACK_MESA 0x8bb1
14774+#define GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA 0x8bb2
14775+#define GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA 0x8bb3
14776+#define GL_VERTEX_PROGRAM_POSITION_MESA 0x8bb4
14777+#define GL_VERTEX_PROGRAM_CALLBACK_MESA 0x8bb5
14778+#define GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA 0x8bb6
14779+#define GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA 0x8bb7
14780+
14781+typedef void (*GLprogramcallbackMESA)(GLenum target, GLvoid *data);
14782+
14783+GLAPI void GLAPIENTRY glProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, GLvoid *data);
14784+
14785+GLAPI void GLAPIENTRY glGetProgramRegisterfvMESA(GLenum target, GLsizei len, const GLubyte *name, GLfloat *v);
14786+
14787+#endif /* GL_MESA_program_debug */
14788+
14789+
14790+#ifndef GL_ATI_blend_equation_separate
14791+#define GL_ATI_blend_equation_separate 1
14792+
14793+#define GL_ALPHA_BLEND_EQUATION_ATI 0x883D
14794+
14795+GLAPI void GLAPIENTRY glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA );
14796+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA);
14797+
14798+#endif /* GL_ATI_blend_equation_separate */
14799+
14800+
14801+
14802+/**
14803+ ** NOTE!!!!! If you add new functions to this file, or update
14804+ ** glext.h be sure to regenerate the gl_mangle.h file. See comments
14805+ ** in that file for details.
14806+ **/
14807+
14808+
14809+
14810+/**********************************************************************
14811+ * Begin system-specific stuff
14812+ */
14813+#if defined(PRAGMA_EXPORT_SUPPORTED)
14814+#pragma export off
14815+#endif
14816+
14817+#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
14818+#pragma import off
14819+#endif
14820+/*
14821+ * End system-specific stuff
14822+ **********************************************************************/
14823+
14824+
14825+#ifdef __cplusplus
14826+}
14827+#endif
14828+
14829+#endif /* __gl_h_ */
14830Index: qemu-0.14.0/target-i386/mesa_glext.h
14831===================================================================
14832--- /dev/null
14833+++ qemu-0.14.0/target-i386/mesa_glext.h
14834@@ -0,0 +1,7279 @@
14835+#ifndef __glext_h_
14836+#define __glext_h_
14837+
14838+#ifdef __cplusplus
14839+extern "C" {
14840+#endif
14841+
14842+/*
14843+** Copyright (c) 2007 The Khronos Group Inc.
14844+**
14845+** Permission is hereby granted, free of charge, to any person obtaining a
14846+** copy of this software and/or associated documentation files (the
14847+** "Materials"), to deal in the Materials without restriction, including
14848+** without limitation the rights to use, copy, modify, merge, publish,
14849+** distribute, sublicense, and/or sell copies of the Materials, and to
14850+** permit persons to whom the Materials are furnished to do so, subject to
14851+** the following conditions:
14852+**
14853+** The above copyright notice and this permission notice shall be included
14854+** in all copies or substantial portions of the Materials.
14855+**
14856+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
14857+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14858+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
14859+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
14860+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
14861+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
14862+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
14863+*/
14864+
14865+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
14866+#define WIN32_LEAN_AND_MEAN 1
14867+#include <windows.h>
14868+#endif
14869+
14870+#ifndef APIENTRY
14871+#define APIENTRY
14872+#endif
14873+#ifndef APIENTRYP
14874+#define APIENTRYP APIENTRY *
14875+#endif
14876+#ifndef GLAPI
14877+#define GLAPI extern
14878+#endif
14879+
14880+/*************************************************************/
14881+
14882+/* Header file version number, required by OpenGL ABI for Linux */
14883+/* glext.h last updated 2007/02/12 */
14884+/* Current version at http://www.opengl.org/registry/ */
14885+#define GL_GLEXT_VERSION 39
14886+
14887+#ifndef GL_VERSION_1_2
14888+#define GL_UNSIGNED_BYTE_3_3_2 0x8032
14889+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
14890+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
14891+#define GL_UNSIGNED_INT_8_8_8_8 0x8035
14892+#define GL_UNSIGNED_INT_10_10_10_2 0x8036
14893+#define GL_RESCALE_NORMAL 0x803A
14894+#define GL_TEXTURE_BINDING_3D 0x806A
14895+#define GL_PACK_SKIP_IMAGES 0x806B
14896+#define GL_PACK_IMAGE_HEIGHT 0x806C
14897+#define GL_UNPACK_SKIP_IMAGES 0x806D
14898+#define GL_UNPACK_IMAGE_HEIGHT 0x806E
14899+#define GL_TEXTURE_3D 0x806F
14900+#define GL_PROXY_TEXTURE_3D 0x8070
14901+#define GL_TEXTURE_DEPTH 0x8071
14902+#define GL_TEXTURE_WRAP_R 0x8072
14903+#define GL_MAX_3D_TEXTURE_SIZE 0x8073
14904+#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
14905+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
14906+#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
14907+#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
14908+#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
14909+#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
14910+#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
14911+#define GL_BGR 0x80E0
14912+#define GL_BGRA 0x80E1
14913+#define GL_MAX_ELEMENTS_VERTICES 0x80E8
14914+#define GL_MAX_ELEMENTS_INDICES 0x80E9
14915+#define GL_CLAMP_TO_EDGE 0x812F
14916+#define GL_TEXTURE_MIN_LOD 0x813A
14917+#define GL_TEXTURE_MAX_LOD 0x813B
14918+#define GL_TEXTURE_BASE_LEVEL 0x813C
14919+#define GL_TEXTURE_MAX_LEVEL 0x813D
14920+#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
14921+#define GL_SINGLE_COLOR 0x81F9
14922+#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
14923+#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
14924+#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
14925+#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
14926+#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
14927+#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
14928+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
14929+#endif
14930+
14931+#ifndef GL_ARB_imaging
14932+#define GL_CONSTANT_COLOR 0x8001
14933+#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
14934+#define GL_CONSTANT_ALPHA 0x8003
14935+#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
14936+#define GL_BLEND_COLOR 0x8005
14937+#define GL_FUNC_ADD 0x8006
14938+#define GL_MIN 0x8007
14939+#define GL_MAX 0x8008
14940+#define GL_BLEND_EQUATION 0x8009
14941+#define GL_FUNC_SUBTRACT 0x800A
14942+#define GL_FUNC_REVERSE_SUBTRACT 0x800B
14943+#define GL_CONVOLUTION_1D 0x8010
14944+#define GL_CONVOLUTION_2D 0x8011
14945+#define GL_SEPARABLE_2D 0x8012
14946+#define GL_CONVOLUTION_BORDER_MODE 0x8013
14947+#define GL_CONVOLUTION_FILTER_SCALE 0x8014
14948+#define GL_CONVOLUTION_FILTER_BIAS 0x8015
14949+#define GL_REDUCE 0x8016
14950+#define GL_CONVOLUTION_FORMAT 0x8017
14951+#define GL_CONVOLUTION_WIDTH 0x8018
14952+#define GL_CONVOLUTION_HEIGHT 0x8019
14953+#define GL_MAX_CONVOLUTION_WIDTH 0x801A
14954+#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
14955+#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
14956+#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
14957+#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
14958+#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
14959+#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
14960+#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
14961+#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
14962+#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
14963+#define GL_HISTOGRAM 0x8024
14964+#define GL_PROXY_HISTOGRAM 0x8025
14965+#define GL_HISTOGRAM_WIDTH 0x8026
14966+#define GL_HISTOGRAM_FORMAT 0x8027
14967+#define GL_HISTOGRAM_RED_SIZE 0x8028
14968+#define GL_HISTOGRAM_GREEN_SIZE 0x8029
14969+#define GL_HISTOGRAM_BLUE_SIZE 0x802A
14970+#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
14971+#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
14972+#define GL_HISTOGRAM_SINK 0x802D
14973+#define GL_MINMAX 0x802E
14974+#define GL_MINMAX_FORMAT 0x802F
14975+#define GL_MINMAX_SINK 0x8030
14976+#define GL_TABLE_TOO_LARGE 0x8031
14977+#define GL_COLOR_MATRIX 0x80B1
14978+#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
14979+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
14980+#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
14981+#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
14982+#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
14983+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
14984+#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
14985+#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
14986+#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
14987+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
14988+#define GL_COLOR_TABLE 0x80D0
14989+#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
14990+#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
14991+#define GL_PROXY_COLOR_TABLE 0x80D3
14992+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
14993+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
14994+#define GL_COLOR_TABLE_SCALE 0x80D6
14995+#define GL_COLOR_TABLE_BIAS 0x80D7
14996+#define GL_COLOR_TABLE_FORMAT 0x80D8
14997+#define GL_COLOR_TABLE_WIDTH 0x80D9
14998+#define GL_COLOR_TABLE_RED_SIZE 0x80DA
14999+#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
15000+#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
15001+#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
15002+#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
15003+#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
15004+#define GL_CONSTANT_BORDER 0x8151
15005+#define GL_REPLICATE_BORDER 0x8153
15006+#define GL_CONVOLUTION_BORDER_COLOR 0x8154
15007+#endif
15008+
15009+#ifndef GL_VERSION_1_3
15010+#define GL_TEXTURE0 0x84C0
15011+#define GL_TEXTURE1 0x84C1
15012+#define GL_TEXTURE2 0x84C2
15013+#define GL_TEXTURE3 0x84C3
15014+#define GL_TEXTURE4 0x84C4
15015+#define GL_TEXTURE5 0x84C5
15016+#define GL_TEXTURE6 0x84C6
15017+#define GL_TEXTURE7 0x84C7
15018+#define GL_TEXTURE8 0x84C8
15019+#define GL_TEXTURE9 0x84C9
15020+#define GL_TEXTURE10 0x84CA
15021+#define GL_TEXTURE11 0x84CB
15022+#define GL_TEXTURE12 0x84CC
15023+#define GL_TEXTURE13 0x84CD
15024+#define GL_TEXTURE14 0x84CE
15025+#define GL_TEXTURE15 0x84CF
15026+#define GL_TEXTURE16 0x84D0
15027+#define GL_TEXTURE17 0x84D1
15028+#define GL_TEXTURE18 0x84D2
15029+#define GL_TEXTURE19 0x84D3
15030+#define GL_TEXTURE20 0x84D4
15031+#define GL_TEXTURE21 0x84D5
15032+#define GL_TEXTURE22 0x84D6
15033+#define GL_TEXTURE23 0x84D7
15034+#define GL_TEXTURE24 0x84D8
15035+#define GL_TEXTURE25 0x84D9
15036+#define GL_TEXTURE26 0x84DA
15037+#define GL_TEXTURE27 0x84DB
15038+#define GL_TEXTURE28 0x84DC
15039+#define GL_TEXTURE29 0x84DD
15040+#define GL_TEXTURE30 0x84DE
15041+#define GL_TEXTURE31 0x84DF
15042+#define GL_ACTIVE_TEXTURE 0x84E0
15043+#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
15044+#define GL_MAX_TEXTURE_UNITS 0x84E2
15045+#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
15046+#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
15047+#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
15048+#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
15049+#define GL_MULTISAMPLE 0x809D
15050+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
15051+#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
15052+#define GL_SAMPLE_COVERAGE 0x80A0
15053+#define GL_SAMPLE_BUFFERS 0x80A8
15054+#define GL_SAMPLES 0x80A9
15055+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
15056+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
15057+#define GL_MULTISAMPLE_BIT 0x20000000
15058+#define GL_NORMAL_MAP 0x8511
15059+#define GL_REFLECTION_MAP 0x8512
15060+#define GL_TEXTURE_CUBE_MAP 0x8513
15061+#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
15062+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
15063+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
15064+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
15065+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
15066+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
15067+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
15068+#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
15069+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
15070+#define GL_COMPRESSED_ALPHA 0x84E9
15071+#define GL_COMPRESSED_LUMINANCE 0x84EA
15072+#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
15073+#define GL_COMPRESSED_INTENSITY 0x84EC
15074+#define GL_COMPRESSED_RGB 0x84ED
15075+#define GL_COMPRESSED_RGBA 0x84EE
15076+#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
15077+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
15078+#define GL_TEXTURE_COMPRESSED 0x86A1
15079+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
15080+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
15081+#define GL_CLAMP_TO_BORDER 0x812D
15082+#define GL_COMBINE 0x8570
15083+#define GL_COMBINE_RGB 0x8571
15084+#define GL_COMBINE_ALPHA 0x8572
15085+#define GL_SOURCE0_RGB 0x8580
15086+#define GL_SOURCE1_RGB 0x8581
15087+#define GL_SOURCE2_RGB 0x8582
15088+#define GL_SOURCE0_ALPHA 0x8588
15089+#define GL_SOURCE1_ALPHA 0x8589
15090+#define GL_SOURCE2_ALPHA 0x858A
15091+#define GL_OPERAND0_RGB 0x8590
15092+#define GL_OPERAND1_RGB 0x8591
15093+#define GL_OPERAND2_RGB 0x8592
15094+#define GL_OPERAND0_ALPHA 0x8598
15095+#define GL_OPERAND1_ALPHA 0x8599
15096+#define GL_OPERAND2_ALPHA 0x859A
15097+#define GL_RGB_SCALE 0x8573
15098+#define GL_ADD_SIGNED 0x8574
15099+#define GL_INTERPOLATE 0x8575
15100+#define GL_SUBTRACT 0x84E7
15101+#define GL_CONSTANT 0x8576
15102+#define GL_PRIMARY_COLOR 0x8577
15103+#define GL_PREVIOUS 0x8578
15104+#define GL_DOT3_RGB 0x86AE
15105+#define GL_DOT3_RGBA 0x86AF
15106+#endif
15107+
15108+#ifndef GL_VERSION_1_4
15109+#define GL_BLEND_DST_RGB 0x80C8
15110+#define GL_BLEND_SRC_RGB 0x80C9
15111+#define GL_BLEND_DST_ALPHA 0x80CA
15112+#define GL_BLEND_SRC_ALPHA 0x80CB
15113+#define GL_POINT_SIZE_MIN 0x8126
15114+#define GL_POINT_SIZE_MAX 0x8127
15115+#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
15116+#define GL_POINT_DISTANCE_ATTENUATION 0x8129
15117+#define GL_GENERATE_MIPMAP 0x8191
15118+#define GL_GENERATE_MIPMAP_HINT 0x8192
15119+#define GL_DEPTH_COMPONENT16 0x81A5
15120+#define GL_DEPTH_COMPONENT24 0x81A6
15121+#define GL_DEPTH_COMPONENT32 0x81A7
15122+#define GL_MIRRORED_REPEAT 0x8370
15123+#define GL_FOG_COORDINATE_SOURCE 0x8450
15124+#define GL_FOG_COORDINATE 0x8451
15125+#define GL_FRAGMENT_DEPTH 0x8452
15126+#define GL_CURRENT_FOG_COORDINATE 0x8453
15127+#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454
15128+#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455
15129+#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456
15130+#define GL_FOG_COORDINATE_ARRAY 0x8457
15131+#define GL_COLOR_SUM 0x8458
15132+#define GL_CURRENT_SECONDARY_COLOR 0x8459
15133+#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A
15134+#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B
15135+#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C
15136+#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D
15137+#define GL_SECONDARY_COLOR_ARRAY 0x845E
15138+#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
15139+#define GL_TEXTURE_FILTER_CONTROL 0x8500
15140+#define GL_TEXTURE_LOD_BIAS 0x8501
15141+#define GL_INCR_WRAP 0x8507
15142+#define GL_DECR_WRAP 0x8508
15143+#define GL_TEXTURE_DEPTH_SIZE 0x884A
15144+#define GL_DEPTH_TEXTURE_MODE 0x884B
15145+#define GL_TEXTURE_COMPARE_MODE 0x884C
15146+#define GL_TEXTURE_COMPARE_FUNC 0x884D
15147+#define GL_COMPARE_R_TO_TEXTURE 0x884E
15148+#endif
15149+
15150+#ifndef GL_VERSION_1_5
15151+#define GL_BUFFER_SIZE 0x8764
15152+#define GL_BUFFER_USAGE 0x8765
15153+#define GL_QUERY_COUNTER_BITS 0x8864
15154+#define GL_CURRENT_QUERY 0x8865
15155+#define GL_QUERY_RESULT 0x8866
15156+#define GL_QUERY_RESULT_AVAILABLE 0x8867
15157+#define GL_ARRAY_BUFFER 0x8892
15158+#define GL_ELEMENT_ARRAY_BUFFER 0x8893
15159+#define GL_ARRAY_BUFFER_BINDING 0x8894
15160+#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
15161+#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
15162+#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
15163+#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
15164+#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899
15165+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
15166+#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B
15167+#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C
15168+#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D
15169+#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E
15170+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
15171+#define GL_READ_ONLY 0x88B8
15172+#define GL_WRITE_ONLY 0x88B9
15173+#define GL_READ_WRITE 0x88BA
15174+#define GL_BUFFER_ACCESS 0x88BB
15175+#define GL_BUFFER_MAPPED 0x88BC
15176+#define GL_BUFFER_MAP_POINTER 0x88BD
15177+#define GL_STREAM_DRAW 0x88E0
15178+#define GL_STREAM_READ 0x88E1
15179+#define GL_STREAM_COPY 0x88E2
15180+#define GL_STATIC_DRAW 0x88E4
15181+#define GL_STATIC_READ 0x88E5
15182+#define GL_STATIC_COPY 0x88E6
15183+#define GL_DYNAMIC_DRAW 0x88E8
15184+#define GL_DYNAMIC_READ 0x88E9
15185+#define GL_DYNAMIC_COPY 0x88EA
15186+#define GL_SAMPLES_PASSED 0x8914
15187+#define GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE
15188+#define GL_FOG_COORD GL_FOG_COORDINATE
15189+#define GL_CURRENT_FOG_COORD GL_CURRENT_FOG_COORDINATE
15190+#define GL_FOG_COORD_ARRAY_TYPE GL_FOG_COORDINATE_ARRAY_TYPE
15191+#define GL_FOG_COORD_ARRAY_STRIDE GL_FOG_COORDINATE_ARRAY_STRIDE
15192+#define GL_FOG_COORD_ARRAY_POINTER GL_FOG_COORDINATE_ARRAY_POINTER
15193+#define GL_FOG_COORD_ARRAY GL_FOG_COORDINATE_ARRAY
15194+#define GL_FOG_COORD_ARRAY_BUFFER_BINDING GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING
15195+#define GL_SRC0_RGB GL_SOURCE0_RGB
15196+#define GL_SRC1_RGB GL_SOURCE1_RGB
15197+#define GL_SRC2_RGB GL_SOURCE2_RGB
15198+#define GL_SRC0_ALPHA GL_SOURCE0_ALPHA
15199+#define GL_SRC1_ALPHA GL_SOURCE1_ALPHA
15200+#define GL_SRC2_ALPHA GL_SOURCE2_ALPHA
15201+#endif
15202+
15203+#ifndef GL_VERSION_2_0
15204+#define GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION
15205+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
15206+#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
15207+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
15208+#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
15209+#define GL_CURRENT_VERTEX_ATTRIB 0x8626
15210+#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
15211+#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643
15212+#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
15213+#define GL_STENCIL_BACK_FUNC 0x8800
15214+#define GL_STENCIL_BACK_FAIL 0x8801
15215+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
15216+#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
15217+#define GL_MAX_DRAW_BUFFERS 0x8824
15218+#define GL_DRAW_BUFFER0 0x8825
15219+#define GL_DRAW_BUFFER1 0x8826
15220+#define GL_DRAW_BUFFER2 0x8827
15221+#define GL_DRAW_BUFFER3 0x8828
15222+#define GL_DRAW_BUFFER4 0x8829
15223+#define GL_DRAW_BUFFER5 0x882A
15224+#define GL_DRAW_BUFFER6 0x882B
15225+#define GL_DRAW_BUFFER7 0x882C
15226+#define GL_DRAW_BUFFER8 0x882D
15227+#define GL_DRAW_BUFFER9 0x882E
15228+#define GL_DRAW_BUFFER10 0x882F
15229+#define GL_DRAW_BUFFER11 0x8830
15230+#define GL_DRAW_BUFFER12 0x8831
15231+#define GL_DRAW_BUFFER13 0x8832
15232+#define GL_DRAW_BUFFER14 0x8833
15233+#define GL_DRAW_BUFFER15 0x8834
15234+#define GL_BLEND_EQUATION_ALPHA 0x883D
15235+#define GL_POINT_SPRITE 0x8861
15236+#define GL_COORD_REPLACE 0x8862
15237+#define GL_MAX_VERTEX_ATTRIBS 0x8869
15238+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
15239+#define GL_MAX_TEXTURE_COORDS 0x8871
15240+#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
15241+#define GL_FRAGMENT_SHADER 0x8B30
15242+#define GL_VERTEX_SHADER 0x8B31
15243+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
15244+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
15245+#define GL_MAX_VARYING_FLOATS 0x8B4B
15246+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
15247+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
15248+#define GL_SHADER_TYPE 0x8B4F
15249+#define GL_FLOAT_VEC2 0x8B50
15250+#define GL_FLOAT_VEC3 0x8B51
15251+#define GL_FLOAT_VEC4 0x8B52
15252+#define GL_INT_VEC2 0x8B53
15253+#define GL_INT_VEC3 0x8B54
15254+#define GL_INT_VEC4 0x8B55
15255+#define GL_BOOL 0x8B56
15256+#define GL_BOOL_VEC2 0x8B57
15257+#define GL_BOOL_VEC3 0x8B58
15258+#define GL_BOOL_VEC4 0x8B59
15259+#define GL_FLOAT_MAT2 0x8B5A
15260+#define GL_FLOAT_MAT3 0x8B5B
15261+#define GL_FLOAT_MAT4 0x8B5C
15262+#define GL_SAMPLER_1D 0x8B5D
15263+#define GL_SAMPLER_2D 0x8B5E
15264+#define GL_SAMPLER_3D 0x8B5F
15265+#define GL_SAMPLER_CUBE 0x8B60
15266+#define GL_SAMPLER_1D_SHADOW 0x8B61
15267+#define GL_SAMPLER_2D_SHADOW 0x8B62
15268+#define GL_DELETE_STATUS 0x8B80
15269+#define GL_COMPILE_STATUS 0x8B81
15270+#define GL_LINK_STATUS 0x8B82
15271+#define GL_VALIDATE_STATUS 0x8B83
15272+#define GL_INFO_LOG_LENGTH 0x8B84
15273+#define GL_ATTACHED_SHADERS 0x8B85
15274+#define GL_ACTIVE_UNIFORMS 0x8B86
15275+#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
15276+#define GL_SHADER_SOURCE_LENGTH 0x8B88
15277+#define GL_ACTIVE_ATTRIBUTES 0x8B89
15278+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
15279+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
15280+#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
15281+#define GL_CURRENT_PROGRAM 0x8B8D
15282+#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
15283+#define GL_LOWER_LEFT 0x8CA1
15284+#define GL_UPPER_LEFT 0x8CA2
15285+#define GL_STENCIL_BACK_REF 0x8CA3
15286+#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
15287+#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
15288+#endif
15289+
15290+#ifndef GL_VERSION_2_1
15291+#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F
15292+#define GL_PIXEL_PACK_BUFFER 0x88EB
15293+#define GL_PIXEL_UNPACK_BUFFER 0x88EC
15294+#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
15295+#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
15296+#define GL_FLOAT_MAT2x3 0x8B65
15297+#define GL_FLOAT_MAT2x4 0x8B66
15298+#define GL_FLOAT_MAT3x2 0x8B67
15299+#define GL_FLOAT_MAT3x4 0x8B68
15300+#define GL_FLOAT_MAT4x2 0x8B69
15301+#define GL_FLOAT_MAT4x3 0x8B6A
15302+#define GL_SRGB 0x8C40
15303+#define GL_SRGB8 0x8C41
15304+#define GL_SRGB_ALPHA 0x8C42
15305+#define GL_SRGB8_ALPHA8 0x8C43
15306+#define GL_SLUMINANCE_ALPHA 0x8C44
15307+#define GL_SLUMINANCE8_ALPHA8 0x8C45
15308+#define GL_SLUMINANCE 0x8C46
15309+#define GL_SLUMINANCE8 0x8C47
15310+#define GL_COMPRESSED_SRGB 0x8C48
15311+#define GL_COMPRESSED_SRGB_ALPHA 0x8C49
15312+#define GL_COMPRESSED_SLUMINANCE 0x8C4A
15313+#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B
15314+#endif
15315+
15316+#ifndef GL_ARB_multitexture
15317+#define GL_TEXTURE0_ARB 0x84C0
15318+#define GL_TEXTURE1_ARB 0x84C1
15319+#define GL_TEXTURE2_ARB 0x84C2
15320+#define GL_TEXTURE3_ARB 0x84C3
15321+#define GL_TEXTURE4_ARB 0x84C4
15322+#define GL_TEXTURE5_ARB 0x84C5
15323+#define GL_TEXTURE6_ARB 0x84C6
15324+#define GL_TEXTURE7_ARB 0x84C7
15325+#define GL_TEXTURE8_ARB 0x84C8
15326+#define GL_TEXTURE9_ARB 0x84C9
15327+#define GL_TEXTURE10_ARB 0x84CA
15328+#define GL_TEXTURE11_ARB 0x84CB
15329+#define GL_TEXTURE12_ARB 0x84CC
15330+#define GL_TEXTURE13_ARB 0x84CD
15331+#define GL_TEXTURE14_ARB 0x84CE
15332+#define GL_TEXTURE15_ARB 0x84CF
15333+#define GL_TEXTURE16_ARB 0x84D0
15334+#define GL_TEXTURE17_ARB 0x84D1
15335+#define GL_TEXTURE18_ARB 0x84D2
15336+#define GL_TEXTURE19_ARB 0x84D3
15337+#define GL_TEXTURE20_ARB 0x84D4
15338+#define GL_TEXTURE21_ARB 0x84D5
15339+#define GL_TEXTURE22_ARB 0x84D6
15340+#define GL_TEXTURE23_ARB 0x84D7
15341+#define GL_TEXTURE24_ARB 0x84D8
15342+#define GL_TEXTURE25_ARB 0x84D9
15343+#define GL_TEXTURE26_ARB 0x84DA
15344+#define GL_TEXTURE27_ARB 0x84DB
15345+#define GL_TEXTURE28_ARB 0x84DC
15346+#define GL_TEXTURE29_ARB 0x84DD
15347+#define GL_TEXTURE30_ARB 0x84DE
15348+#define GL_TEXTURE31_ARB 0x84DF
15349+#define GL_ACTIVE_TEXTURE_ARB 0x84E0
15350+#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
15351+#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
15352+#endif
15353+
15354+#ifndef GL_ARB_transpose_matrix
15355+#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3
15356+#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4
15357+#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5
15358+#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6
15359+#endif
15360+
15361+#ifndef GL_ARB_multisample
15362+#define GL_MULTISAMPLE_ARB 0x809D
15363+#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E
15364+#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F
15365+#define GL_SAMPLE_COVERAGE_ARB 0x80A0
15366+#define GL_SAMPLE_BUFFERS_ARB 0x80A8
15367+#define GL_SAMPLES_ARB 0x80A9
15368+#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA
15369+#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB
15370+#define GL_MULTISAMPLE_BIT_ARB 0x20000000
15371+#endif
15372+
15373+#ifndef GL_ARB_texture_env_add
15374+#endif
15375+
15376+#ifndef GL_ARB_texture_cube_map
15377+#define GL_NORMAL_MAP_ARB 0x8511
15378+#define GL_REFLECTION_MAP_ARB 0x8512
15379+#define GL_TEXTURE_CUBE_MAP_ARB 0x8513
15380+#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514
15381+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515
15382+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516
15383+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517
15384+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518
15385+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519
15386+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A
15387+#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B
15388+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C
15389+#endif
15390+
15391+#ifndef GL_ARB_texture_compression
15392+#define GL_COMPRESSED_ALPHA_ARB 0x84E9
15393+#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA
15394+#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB
15395+#define GL_COMPRESSED_INTENSITY_ARB 0x84EC
15396+#define GL_COMPRESSED_RGB_ARB 0x84ED
15397+#define GL_COMPRESSED_RGBA_ARB 0x84EE
15398+#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF
15399+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
15400+#define GL_TEXTURE_COMPRESSED_ARB 0x86A1
15401+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
15402+#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
15403+#endif
15404+
15405+#ifndef GL_ARB_texture_border_clamp
15406+#define GL_CLAMP_TO_BORDER_ARB 0x812D
15407+#endif
15408+
15409+#ifndef GL_ARB_point_parameters
15410+#define GL_POINT_SIZE_MIN_ARB 0x8126
15411+#define GL_POINT_SIZE_MAX_ARB 0x8127
15412+#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128
15413+#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129
15414+#endif
15415+
15416+#ifndef GL_ARB_vertex_blend
15417+#define GL_MAX_VERTEX_UNITS_ARB 0x86A4
15418+#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5
15419+#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6
15420+#define GL_VERTEX_BLEND_ARB 0x86A7
15421+#define GL_CURRENT_WEIGHT_ARB 0x86A8
15422+#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9
15423+#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA
15424+#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB
15425+#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC
15426+#define GL_WEIGHT_ARRAY_ARB 0x86AD
15427+#define GL_MODELVIEW0_ARB 0x1700
15428+#define GL_MODELVIEW1_ARB 0x850A
15429+#define GL_MODELVIEW2_ARB 0x8722
15430+#define GL_MODELVIEW3_ARB 0x8723
15431+#define GL_MODELVIEW4_ARB 0x8724
15432+#define GL_MODELVIEW5_ARB 0x8725
15433+#define GL_MODELVIEW6_ARB 0x8726
15434+#define GL_MODELVIEW7_ARB 0x8727
15435+#define GL_MODELVIEW8_ARB 0x8728
15436+#define GL_MODELVIEW9_ARB 0x8729
15437+#define GL_MODELVIEW10_ARB 0x872A
15438+#define GL_MODELVIEW11_ARB 0x872B
15439+#define GL_MODELVIEW12_ARB 0x872C
15440+#define GL_MODELVIEW13_ARB 0x872D
15441+#define GL_MODELVIEW14_ARB 0x872E
15442+#define GL_MODELVIEW15_ARB 0x872F
15443+#define GL_MODELVIEW16_ARB 0x8730
15444+#define GL_MODELVIEW17_ARB 0x8731
15445+#define GL_MODELVIEW18_ARB 0x8732
15446+#define GL_MODELVIEW19_ARB 0x8733
15447+#define GL_MODELVIEW20_ARB 0x8734
15448+#define GL_MODELVIEW21_ARB 0x8735
15449+#define GL_MODELVIEW22_ARB 0x8736
15450+#define GL_MODELVIEW23_ARB 0x8737
15451+#define GL_MODELVIEW24_ARB 0x8738
15452+#define GL_MODELVIEW25_ARB 0x8739
15453+#define GL_MODELVIEW26_ARB 0x873A
15454+#define GL_MODELVIEW27_ARB 0x873B
15455+#define GL_MODELVIEW28_ARB 0x873C
15456+#define GL_MODELVIEW29_ARB 0x873D
15457+#define GL_MODELVIEW30_ARB 0x873E
15458+#define GL_MODELVIEW31_ARB 0x873F
15459+#endif
15460+
15461+#ifndef GL_ARB_matrix_palette
15462+#define GL_MATRIX_PALETTE_ARB 0x8840
15463+#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841
15464+#define GL_MAX_PALETTE_MATRICES_ARB 0x8842
15465+#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843
15466+#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844
15467+#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845
15468+#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846
15469+#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847
15470+#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848
15471+#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849
15472+#endif
15473+
15474+#ifndef GL_ARB_texture_env_combine
15475+#define GL_COMBINE_ARB 0x8570
15476+#define GL_COMBINE_RGB_ARB 0x8571
15477+#define GL_COMBINE_ALPHA_ARB 0x8572
15478+#define GL_SOURCE0_RGB_ARB 0x8580
15479+#define GL_SOURCE1_RGB_ARB 0x8581
15480+#define GL_SOURCE2_RGB_ARB 0x8582
15481+#define GL_SOURCE0_ALPHA_ARB 0x8588
15482+#define GL_SOURCE1_ALPHA_ARB 0x8589
15483+#define GL_SOURCE2_ALPHA_ARB 0x858A
15484+#define GL_OPERAND0_RGB_ARB 0x8590
15485+#define GL_OPERAND1_RGB_ARB 0x8591
15486+#define GL_OPERAND2_RGB_ARB 0x8592
15487+#define GL_OPERAND0_ALPHA_ARB 0x8598
15488+#define GL_OPERAND1_ALPHA_ARB 0x8599
15489+#define GL_OPERAND2_ALPHA_ARB 0x859A
15490+#define GL_RGB_SCALE_ARB 0x8573
15491+#define GL_ADD_SIGNED_ARB 0x8574
15492+#define GL_INTERPOLATE_ARB 0x8575
15493+#define GL_SUBTRACT_ARB 0x84E7
15494+#define GL_CONSTANT_ARB 0x8576
15495+#define GL_PRIMARY_COLOR_ARB 0x8577
15496+#define GL_PREVIOUS_ARB 0x8578
15497+#endif
15498+
15499+#ifndef GL_ARB_texture_env_crossbar
15500+#endif
15501+
15502+#ifndef GL_ARB_texture_env_dot3
15503+#define GL_DOT3_RGB_ARB 0x86AE
15504+#define GL_DOT3_RGBA_ARB 0x86AF
15505+#endif
15506+
15507+#ifndef GL_ARB_texture_mirrored_repeat
15508+#define GL_MIRRORED_REPEAT_ARB 0x8370
15509+#endif
15510+
15511+#ifndef GL_ARB_depth_texture
15512+#define GL_DEPTH_COMPONENT16_ARB 0x81A5
15513+#define GL_DEPTH_COMPONENT24_ARB 0x81A6
15514+#define GL_DEPTH_COMPONENT32_ARB 0x81A7
15515+#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A
15516+#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B
15517+#endif
15518+
15519+#ifndef GL_ARB_shadow
15520+#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C
15521+#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D
15522+#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E
15523+#endif
15524+
15525+#ifndef GL_ARB_shadow_ambient
15526+#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF
15527+#endif
15528+
15529+#ifndef GL_ARB_window_pos
15530+#endif
15531+
15532+#ifndef GL_ARB_vertex_program
15533+#define GL_COLOR_SUM_ARB 0x8458
15534+#define GL_VERTEX_PROGRAM_ARB 0x8620
15535+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622
15536+#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623
15537+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624
15538+#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625
15539+#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626
15540+#define GL_PROGRAM_LENGTH_ARB 0x8627
15541+#define GL_PROGRAM_STRING_ARB 0x8628
15542+#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E
15543+#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F
15544+#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640
15545+#define GL_CURRENT_MATRIX_ARB 0x8641
15546+#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642
15547+#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643
15548+#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645
15549+#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B
15550+#define GL_PROGRAM_BINDING_ARB 0x8677
15551+#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869
15552+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A
15553+#define GL_PROGRAM_ERROR_STRING_ARB 0x8874
15554+#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875
15555+#define GL_PROGRAM_FORMAT_ARB 0x8876
15556+#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0
15557+#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1
15558+#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2
15559+#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3
15560+#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4
15561+#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5
15562+#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6
15563+#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7
15564+#define GL_PROGRAM_PARAMETERS_ARB 0x88A8
15565+#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9
15566+#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA
15567+#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB
15568+#define GL_PROGRAM_ATTRIBS_ARB 0x88AC
15569+#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD
15570+#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE
15571+#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF
15572+#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0
15573+#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1
15574+#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2
15575+#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3
15576+#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4
15577+#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5
15578+#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6
15579+#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7
15580+#define GL_MATRIX0_ARB 0x88C0
15581+#define GL_MATRIX1_ARB 0x88C1
15582+#define GL_MATRIX2_ARB 0x88C2
15583+#define GL_MATRIX3_ARB 0x88C3
15584+#define GL_MATRIX4_ARB 0x88C4
15585+#define GL_MATRIX5_ARB 0x88C5
15586+#define GL_MATRIX6_ARB 0x88C6
15587+#define GL_MATRIX7_ARB 0x88C7
15588+#define GL_MATRIX8_ARB 0x88C8
15589+#define GL_MATRIX9_ARB 0x88C9
15590+#define GL_MATRIX10_ARB 0x88CA
15591+#define GL_MATRIX11_ARB 0x88CB
15592+#define GL_MATRIX12_ARB 0x88CC
15593+#define GL_MATRIX13_ARB 0x88CD
15594+#define GL_MATRIX14_ARB 0x88CE
15595+#define GL_MATRIX15_ARB 0x88CF
15596+#define GL_MATRIX16_ARB 0x88D0
15597+#define GL_MATRIX17_ARB 0x88D1
15598+#define GL_MATRIX18_ARB 0x88D2
15599+#define GL_MATRIX19_ARB 0x88D3
15600+#define GL_MATRIX20_ARB 0x88D4
15601+#define GL_MATRIX21_ARB 0x88D5
15602+#define GL_MATRIX22_ARB 0x88D6
15603+#define GL_MATRIX23_ARB 0x88D7
15604+#define GL_MATRIX24_ARB 0x88D8
15605+#define GL_MATRIX25_ARB 0x88D9
15606+#define GL_MATRIX26_ARB 0x88DA
15607+#define GL_MATRIX27_ARB 0x88DB
15608+#define GL_MATRIX28_ARB 0x88DC
15609+#define GL_MATRIX29_ARB 0x88DD
15610+#define GL_MATRIX30_ARB 0x88DE
15611+#define GL_MATRIX31_ARB 0x88DF
15612+#endif
15613+
15614+#ifndef GL_ARB_fragment_program
15615+#define GL_FRAGMENT_PROGRAM_ARB 0x8804
15616+#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805
15617+#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806
15618+#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807
15619+#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808
15620+#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809
15621+#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A
15622+#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B
15623+#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C
15624+#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D
15625+#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E
15626+#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F
15627+#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810
15628+#define GL_MAX_TEXTURE_COORDS_ARB 0x8871
15629+#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872
15630+#endif
15631+
15632+#ifndef GL_ARB_vertex_buffer_object
15633+#define GL_BUFFER_SIZE_ARB 0x8764
15634+#define GL_BUFFER_USAGE_ARB 0x8765
15635+#define GL_ARRAY_BUFFER_ARB 0x8892
15636+#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893
15637+#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894
15638+#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895
15639+#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896
15640+#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897
15641+#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898
15642+#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899
15643+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A
15644+#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B
15645+#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C
15646+#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D
15647+#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E
15648+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F
15649+#define GL_READ_ONLY_ARB 0x88B8
15650+#define GL_WRITE_ONLY_ARB 0x88B9
15651+#define GL_READ_WRITE_ARB 0x88BA
15652+#define GL_BUFFER_ACCESS_ARB 0x88BB
15653+#define GL_BUFFER_MAPPED_ARB 0x88BC
15654+#define GL_BUFFER_MAP_POINTER_ARB 0x88BD
15655+#define GL_STREAM_DRAW_ARB 0x88E0
15656+#define GL_STREAM_READ_ARB 0x88E1
15657+#define GL_STREAM_COPY_ARB 0x88E2
15658+#define GL_STATIC_DRAW_ARB 0x88E4
15659+#define GL_STATIC_READ_ARB 0x88E5
15660+#define GL_STATIC_COPY_ARB 0x88E6
15661+#define GL_DYNAMIC_DRAW_ARB 0x88E8
15662+#define GL_DYNAMIC_READ_ARB 0x88E9
15663+#define GL_DYNAMIC_COPY_ARB 0x88EA
15664+#endif
15665+
15666+#ifndef GL_ARB_occlusion_query
15667+#define GL_QUERY_COUNTER_BITS_ARB 0x8864
15668+#define GL_CURRENT_QUERY_ARB 0x8865
15669+#define GL_QUERY_RESULT_ARB 0x8866
15670+#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867
15671+#define GL_SAMPLES_PASSED_ARB 0x8914
15672+#endif
15673+
15674+#ifndef GL_ARB_shader_objects
15675+#define GL_PROGRAM_OBJECT_ARB 0x8B40
15676+#define GL_SHADER_OBJECT_ARB 0x8B48
15677+#define GL_OBJECT_TYPE_ARB 0x8B4E
15678+#define GL_OBJECT_SUBTYPE_ARB 0x8B4F
15679+#define GL_FLOAT_VEC2_ARB 0x8B50
15680+#define GL_FLOAT_VEC3_ARB 0x8B51
15681+#define GL_FLOAT_VEC4_ARB 0x8B52
15682+#define GL_INT_VEC2_ARB 0x8B53
15683+#define GL_INT_VEC3_ARB 0x8B54
15684+#define GL_INT_VEC4_ARB 0x8B55
15685+#define GL_BOOL_ARB 0x8B56
15686+#define GL_BOOL_VEC2_ARB 0x8B57
15687+#define GL_BOOL_VEC3_ARB 0x8B58
15688+#define GL_BOOL_VEC4_ARB 0x8B59
15689+#define GL_FLOAT_MAT2_ARB 0x8B5A
15690+#define GL_FLOAT_MAT3_ARB 0x8B5B
15691+#define GL_FLOAT_MAT4_ARB 0x8B5C
15692+#define GL_SAMPLER_1D_ARB 0x8B5D
15693+#define GL_SAMPLER_2D_ARB 0x8B5E
15694+#define GL_SAMPLER_3D_ARB 0x8B5F
15695+#define GL_SAMPLER_CUBE_ARB 0x8B60
15696+#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61
15697+#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62
15698+#define GL_SAMPLER_2D_RECT_ARB 0x8B63
15699+#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64
15700+#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80
15701+#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81
15702+#define GL_OBJECT_LINK_STATUS_ARB 0x8B82
15703+#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83
15704+#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84
15705+#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85
15706+#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86
15707+#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87
15708+#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88
15709+#endif
15710+
15711+#ifndef GL_ARB_vertex_shader
15712+#define GL_VERTEX_SHADER_ARB 0x8B31
15713+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A
15714+#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B
15715+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C
15716+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D
15717+#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89
15718+#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A
15719+#endif
15720+
15721+#ifndef GL_ARB_fragment_shader
15722+#define GL_FRAGMENT_SHADER_ARB 0x8B30
15723+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49
15724+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B
15725+#endif
15726+
15727+#ifndef GL_ARB_shading_language_100
15728+#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C
15729+#endif
15730+
15731+#ifndef GL_ARB_texture_non_power_of_two
15732+#endif
15733+
15734+#ifndef GL_ARB_point_sprite
15735+#define GL_POINT_SPRITE_ARB 0x8861
15736+#define GL_COORD_REPLACE_ARB 0x8862
15737+#endif
15738+
15739+#ifndef GL_ARB_fragment_program_shadow
15740+#endif
15741+
15742+#ifndef GL_ARB_draw_buffers
15743+#define GL_MAX_DRAW_BUFFERS_ARB 0x8824
15744+#define GL_DRAW_BUFFER0_ARB 0x8825
15745+#define GL_DRAW_BUFFER1_ARB 0x8826
15746+#define GL_DRAW_BUFFER2_ARB 0x8827
15747+#define GL_DRAW_BUFFER3_ARB 0x8828
15748+#define GL_DRAW_BUFFER4_ARB 0x8829
15749+#define GL_DRAW_BUFFER5_ARB 0x882A
15750+#define GL_DRAW_BUFFER6_ARB 0x882B
15751+#define GL_DRAW_BUFFER7_ARB 0x882C
15752+#define GL_DRAW_BUFFER8_ARB 0x882D
15753+#define GL_DRAW_BUFFER9_ARB 0x882E
15754+#define GL_DRAW_BUFFER10_ARB 0x882F
15755+#define GL_DRAW_BUFFER11_ARB 0x8830
15756+#define GL_DRAW_BUFFER12_ARB 0x8831
15757+#define GL_DRAW_BUFFER13_ARB 0x8832
15758+#define GL_DRAW_BUFFER14_ARB 0x8833
15759+#define GL_DRAW_BUFFER15_ARB 0x8834
15760+#endif
15761+
15762+#ifndef GL_ARB_texture_rectangle
15763+#define GL_TEXTURE_RECTANGLE_ARB 0x84F5
15764+#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6
15765+#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7
15766+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
15767+#endif
15768+
15769+#ifndef GL_ARB_color_buffer_float
15770+#define GL_RGBA_FLOAT_MODE_ARB 0x8820
15771+#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A
15772+#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B
15773+#define GL_CLAMP_READ_COLOR_ARB 0x891C
15774+#define GL_FIXED_ONLY_ARB 0x891D
15775+#endif
15776+
15777+#ifndef GL_ARB_half_float_pixel
15778+#define GL_HALF_FLOAT_ARB 0x140B
15779+#endif
15780+
15781+#ifndef GL_ARB_texture_float
15782+#define GL_TEXTURE_RED_TYPE_ARB 0x8C10
15783+#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11
15784+#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12
15785+#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13
15786+#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14
15787+#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15
15788+#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16
15789+#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17
15790+#define GL_RGBA32F_ARB 0x8814
15791+#define GL_RGB32F_ARB 0x8815
15792+#define GL_ALPHA32F_ARB 0x8816
15793+#define GL_INTENSITY32F_ARB 0x8817
15794+#define GL_LUMINANCE32F_ARB 0x8818
15795+#define GL_LUMINANCE_ALPHA32F_ARB 0x8819
15796+#define GL_RGBA16F_ARB 0x881A
15797+#define GL_RGB16F_ARB 0x881B
15798+#define GL_ALPHA16F_ARB 0x881C
15799+#define GL_INTENSITY16F_ARB 0x881D
15800+#define GL_LUMINANCE16F_ARB 0x881E
15801+#define GL_LUMINANCE_ALPHA16F_ARB 0x881F
15802+#endif
15803+
15804+#ifndef GL_ARB_pixel_buffer_object
15805+#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB
15806+#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC
15807+#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED
15808+#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
15809+#endif
15810+
15811+#ifndef GL_EXT_abgr
15812+#define GL_ABGR_EXT 0x8000
15813+#endif
15814+
15815+#ifndef GL_EXT_blend_color
15816+#define GL_CONSTANT_COLOR_EXT 0x8001
15817+#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002
15818+#define GL_CONSTANT_ALPHA_EXT 0x8003
15819+#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004
15820+#define GL_BLEND_COLOR_EXT 0x8005
15821+#endif
15822+
15823+#ifndef GL_EXT_polygon_offset
15824+#define GL_POLYGON_OFFSET_EXT 0x8037
15825+#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038
15826+#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039
15827+#endif
15828+
15829+#ifndef GL_EXT_texture
15830+#define GL_ALPHA4_EXT 0x803B
15831+#define GL_ALPHA8_EXT 0x803C
15832+#define GL_ALPHA12_EXT 0x803D
15833+#define GL_ALPHA16_EXT 0x803E
15834+#define GL_LUMINANCE4_EXT 0x803F
15835+#define GL_LUMINANCE8_EXT 0x8040
15836+#define GL_LUMINANCE12_EXT 0x8041
15837+#define GL_LUMINANCE16_EXT 0x8042
15838+#define GL_LUMINANCE4_ALPHA4_EXT 0x8043
15839+#define GL_LUMINANCE6_ALPHA2_EXT 0x8044
15840+#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
15841+#define GL_LUMINANCE12_ALPHA4_EXT 0x8046
15842+#define GL_LUMINANCE12_ALPHA12_EXT 0x8047
15843+#define GL_LUMINANCE16_ALPHA16_EXT 0x8048
15844+#define GL_INTENSITY_EXT 0x8049
15845+#define GL_INTENSITY4_EXT 0x804A
15846+#define GL_INTENSITY8_EXT 0x804B
15847+#define GL_INTENSITY12_EXT 0x804C
15848+#define GL_INTENSITY16_EXT 0x804D
15849+#define GL_RGB2_EXT 0x804E
15850+#define GL_RGB4_EXT 0x804F
15851+#define GL_RGB5_EXT 0x8050
15852+#define GL_RGB8_EXT 0x8051
15853+#define GL_RGB10_EXT 0x8052
15854+#define GL_RGB12_EXT 0x8053
15855+#define GL_RGB16_EXT 0x8054
15856+#define GL_RGBA2_EXT 0x8055
15857+#define GL_RGBA4_EXT 0x8056
15858+#define GL_RGB5_A1_EXT 0x8057
15859+#define GL_RGBA8_EXT 0x8058
15860+#define GL_RGB10_A2_EXT 0x8059
15861+#define GL_RGBA12_EXT 0x805A
15862+#define GL_RGBA16_EXT 0x805B
15863+#define GL_TEXTURE_RED_SIZE_EXT 0x805C
15864+#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D
15865+#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E
15866+#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F
15867+#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060
15868+#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061
15869+#define GL_REPLACE_EXT 0x8062
15870+#define GL_PROXY_TEXTURE_1D_EXT 0x8063
15871+#define GL_PROXY_TEXTURE_2D_EXT 0x8064
15872+#define GL_TEXTURE_TOO_LARGE_EXT 0x8065
15873+#endif
15874+
15875+#ifndef GL_EXT_texture3D
15876+#define GL_PACK_SKIP_IMAGES_EXT 0x806B
15877+#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C
15878+#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D
15879+#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E
15880+#define GL_TEXTURE_3D_EXT 0x806F
15881+#define GL_PROXY_TEXTURE_3D_EXT 0x8070
15882+#define GL_TEXTURE_DEPTH_EXT 0x8071
15883+#define GL_TEXTURE_WRAP_R_EXT 0x8072
15884+#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073
15885+#endif
15886+
15887+#ifndef GL_SGIS_texture_filter4
15888+#define GL_FILTER4_SGIS 0x8146
15889+#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147
15890+#endif
15891+
15892+#ifndef GL_EXT_subtexture
15893+#endif
15894+
15895+#ifndef GL_EXT_copy_texture
15896+#endif
15897+
15898+#ifndef GL_EXT_histogram
15899+#define GL_HISTOGRAM_EXT 0x8024
15900+#define GL_PROXY_HISTOGRAM_EXT 0x8025
15901+#define GL_HISTOGRAM_WIDTH_EXT 0x8026
15902+#define GL_HISTOGRAM_FORMAT_EXT 0x8027
15903+#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028
15904+#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029
15905+#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A
15906+#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B
15907+#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C
15908+#define GL_HISTOGRAM_SINK_EXT 0x802D
15909+#define GL_MINMAX_EXT 0x802E
15910+#define GL_MINMAX_FORMAT_EXT 0x802F
15911+#define GL_MINMAX_SINK_EXT 0x8030
15912+#define GL_TABLE_TOO_LARGE_EXT 0x8031
15913+#endif
15914+
15915+#ifndef GL_EXT_convolution
15916+#define GL_CONVOLUTION_1D_EXT 0x8010
15917+#define GL_CONVOLUTION_2D_EXT 0x8011
15918+#define GL_SEPARABLE_2D_EXT 0x8012
15919+#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013
15920+#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014
15921+#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015
15922+#define GL_REDUCE_EXT 0x8016
15923+#define GL_CONVOLUTION_FORMAT_EXT 0x8017
15924+#define GL_CONVOLUTION_WIDTH_EXT 0x8018
15925+#define GL_CONVOLUTION_HEIGHT_EXT 0x8019
15926+#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A
15927+#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B
15928+#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C
15929+#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D
15930+#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E
15931+#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F
15932+#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020
15933+#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021
15934+#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022
15935+#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023
15936+#endif
15937+
15938+#ifndef GL_SGI_color_matrix
15939+#define GL_COLOR_MATRIX_SGI 0x80B1
15940+#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2
15941+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3
15942+#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4
15943+#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5
15944+#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6
15945+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7
15946+#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8
15947+#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9
15948+#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA
15949+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB
15950+#endif
15951+
15952+#ifndef GL_SGI_color_table
15953+#define GL_COLOR_TABLE_SGI 0x80D0
15954+#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1
15955+#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2
15956+#define GL_PROXY_COLOR_TABLE_SGI 0x80D3
15957+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4
15958+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5
15959+#define GL_COLOR_TABLE_SCALE_SGI 0x80D6
15960+#define GL_COLOR_TABLE_BIAS_SGI 0x80D7
15961+#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8
15962+#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9
15963+#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA
15964+#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB
15965+#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC
15966+#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD
15967+#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE
15968+#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF
15969+#endif
15970+
15971+#ifndef GL_SGIS_pixel_texture
15972+#define GL_PIXEL_TEXTURE_SGIS 0x8353
15973+#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354
15974+#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355
15975+#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356
15976+#endif
15977+
15978+#ifndef GL_SGIX_pixel_texture
15979+#define GL_PIXEL_TEX_GEN_SGIX 0x8139
15980+#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B
15981+#endif
15982+
15983+#ifndef GL_SGIS_texture4D
15984+#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130
15985+#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131
15986+#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132
15987+#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133
15988+#define GL_TEXTURE_4D_SGIS 0x8134
15989+#define GL_PROXY_TEXTURE_4D_SGIS 0x8135
15990+#define GL_TEXTURE_4DSIZE_SGIS 0x8136
15991+#define GL_TEXTURE_WRAP_Q_SGIS 0x8137
15992+#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138
15993+#define GL_TEXTURE_4D_BINDING_SGIS 0x814F
15994+#endif
15995+
15996+#ifndef GL_SGI_texture_color_table
15997+#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC
15998+#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD
15999+#endif
16000+
16001+#ifndef GL_EXT_cmyka
16002+#define GL_CMYK_EXT 0x800C
16003+#define GL_CMYKA_EXT 0x800D
16004+#define GL_PACK_CMYK_HINT_EXT 0x800E
16005+#define GL_UNPACK_CMYK_HINT_EXT 0x800F
16006+#endif
16007+
16008+#ifndef GL_EXT_texture_object
16009+#define GL_TEXTURE_PRIORITY_EXT 0x8066
16010+#define GL_TEXTURE_RESIDENT_EXT 0x8067
16011+#define GL_TEXTURE_1D_BINDING_EXT 0x8068
16012+#define GL_TEXTURE_2D_BINDING_EXT 0x8069
16013+#define GL_TEXTURE_3D_BINDING_EXT 0x806A
16014+#endif
16015+
16016+#ifndef GL_SGIS_detail_texture
16017+#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095
16018+#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096
16019+#define GL_LINEAR_DETAIL_SGIS 0x8097
16020+#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098
16021+#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099
16022+#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A
16023+#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B
16024+#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C
16025+#endif
16026+
16027+#ifndef GL_SGIS_sharpen_texture
16028+#define GL_LINEAR_SHARPEN_SGIS 0x80AD
16029+#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE
16030+#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF
16031+#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0
16032+#endif
16033+
16034+#ifndef GL_EXT_packed_pixels
16035+#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032
16036+#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033
16037+#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034
16038+#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035
16039+#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036
16040+#endif
16041+
16042+#ifndef GL_SGIS_texture_lod
16043+#define GL_TEXTURE_MIN_LOD_SGIS 0x813A
16044+#define GL_TEXTURE_MAX_LOD_SGIS 0x813B
16045+#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C
16046+#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D
16047+#endif
16048+
16049+#ifndef GL_SGIS_multisample
16050+#define GL_MULTISAMPLE_SGIS 0x809D
16051+#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E
16052+#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F
16053+#define GL_SAMPLE_MASK_SGIS 0x80A0
16054+#define GL_1PASS_SGIS 0x80A1
16055+#define GL_2PASS_0_SGIS 0x80A2
16056+#define GL_2PASS_1_SGIS 0x80A3
16057+#define GL_4PASS_0_SGIS 0x80A4
16058+#define GL_4PASS_1_SGIS 0x80A5
16059+#define GL_4PASS_2_SGIS 0x80A6
16060+#define GL_4PASS_3_SGIS 0x80A7
16061+#define GL_SAMPLE_BUFFERS_SGIS 0x80A8
16062+#define GL_SAMPLES_SGIS 0x80A9
16063+#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA
16064+#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB
16065+#define GL_SAMPLE_PATTERN_SGIS 0x80AC
16066+#endif
16067+
16068+#ifndef GL_EXT_rescale_normal
16069+#define GL_RESCALE_NORMAL_EXT 0x803A
16070+#endif
16071+
16072+#ifndef GL_EXT_vertex_array
16073+#define GL_VERTEX_ARRAY_EXT 0x8074
16074+#define GL_NORMAL_ARRAY_EXT 0x8075
16075+#define GL_COLOR_ARRAY_EXT 0x8076
16076+#define GL_INDEX_ARRAY_EXT 0x8077
16077+#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078
16078+#define GL_EDGE_FLAG_ARRAY_EXT 0x8079
16079+#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A
16080+#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B
16081+#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C
16082+#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D
16083+#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E
16084+#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F
16085+#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080
16086+#define GL_COLOR_ARRAY_SIZE_EXT 0x8081
16087+#define GL_COLOR_ARRAY_TYPE_EXT 0x8082
16088+#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083
16089+#define GL_COLOR_ARRAY_COUNT_EXT 0x8084
16090+#define GL_INDEX_ARRAY_TYPE_EXT 0x8085
16091+#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086
16092+#define GL_INDEX_ARRAY_COUNT_EXT 0x8087
16093+#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088
16094+#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089
16095+#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A
16096+#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B
16097+#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C
16098+#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D
16099+#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E
16100+#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F
16101+#define GL_COLOR_ARRAY_POINTER_EXT 0x8090
16102+#define GL_INDEX_ARRAY_POINTER_EXT 0x8091
16103+#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092
16104+#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093
16105+#endif
16106+
16107+#ifndef GL_EXT_misc_attribute
16108+#endif
16109+
16110+#ifndef GL_SGIS_generate_mipmap
16111+#define GL_GENERATE_MIPMAP_SGIS 0x8191
16112+#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192
16113+#endif
16114+
16115+#ifndef GL_SGIX_clipmap
16116+#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170
16117+#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171
16118+#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172
16119+#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173
16120+#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174
16121+#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175
16122+#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176
16123+#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177
16124+#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178
16125+#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D
16126+#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E
16127+#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F
16128+#endif
16129+
16130+#ifndef GL_SGIX_shadow
16131+#define GL_TEXTURE_COMPARE_SGIX 0x819A
16132+#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B
16133+#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C
16134+#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D
16135+#endif
16136+
16137+#ifndef GL_SGIS_texture_edge_clamp
16138+#define GL_CLAMP_TO_EDGE_SGIS 0x812F
16139+#endif
16140+
16141+#ifndef GL_SGIS_texture_border_clamp
16142+#define GL_CLAMP_TO_BORDER_SGIS 0x812D
16143+#endif
16144+
16145+#ifndef GL_EXT_blend_minmax
16146+#define GL_FUNC_ADD_EXT 0x8006
16147+#define GL_MIN_EXT 0x8007
16148+#define GL_MAX_EXT 0x8008
16149+#define GL_BLEND_EQUATION_EXT 0x8009
16150+#endif
16151+
16152+#ifndef GL_EXT_blend_subtract
16153+#define GL_FUNC_SUBTRACT_EXT 0x800A
16154+#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B
16155+#endif
16156+
16157+#ifndef GL_EXT_blend_logic_op
16158+#endif
16159+
16160+#ifndef GL_SGIX_interlace
16161+#define GL_INTERLACE_SGIX 0x8094
16162+#endif
16163+
16164+#ifndef GL_SGIX_pixel_tiles
16165+#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E
16166+#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F
16167+#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140
16168+#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141
16169+#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142
16170+#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143
16171+#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144
16172+#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145
16173+#endif
16174+
16175+#ifndef GL_SGIS_texture_select
16176+#define GL_DUAL_ALPHA4_SGIS 0x8110
16177+#define GL_DUAL_ALPHA8_SGIS 0x8111
16178+#define GL_DUAL_ALPHA12_SGIS 0x8112
16179+#define GL_DUAL_ALPHA16_SGIS 0x8113
16180+#define GL_DUAL_LUMINANCE4_SGIS 0x8114
16181+#define GL_DUAL_LUMINANCE8_SGIS 0x8115
16182+#define GL_DUAL_LUMINANCE12_SGIS 0x8116
16183+#define GL_DUAL_LUMINANCE16_SGIS 0x8117
16184+#define GL_DUAL_INTENSITY4_SGIS 0x8118
16185+#define GL_DUAL_INTENSITY8_SGIS 0x8119
16186+#define GL_DUAL_INTENSITY12_SGIS 0x811A
16187+#define GL_DUAL_INTENSITY16_SGIS 0x811B
16188+#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C
16189+#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D
16190+#define GL_QUAD_ALPHA4_SGIS 0x811E
16191+#define GL_QUAD_ALPHA8_SGIS 0x811F
16192+#define GL_QUAD_LUMINANCE4_SGIS 0x8120
16193+#define GL_QUAD_LUMINANCE8_SGIS 0x8121
16194+#define GL_QUAD_INTENSITY4_SGIS 0x8122
16195+#define GL_QUAD_INTENSITY8_SGIS 0x8123
16196+#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124
16197+#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125
16198+#endif
16199+
16200+#ifndef GL_SGIX_sprite
16201+#define GL_SPRITE_SGIX 0x8148
16202+#define GL_SPRITE_MODE_SGIX 0x8149
16203+#define GL_SPRITE_AXIS_SGIX 0x814A
16204+#define GL_SPRITE_TRANSLATION_SGIX 0x814B
16205+#define GL_SPRITE_AXIAL_SGIX 0x814C
16206+#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D
16207+#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E
16208+#endif
16209+
16210+#ifndef GL_SGIX_texture_multi_buffer
16211+#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E
16212+#endif
16213+
16214+#ifndef GL_EXT_point_parameters
16215+#define GL_POINT_SIZE_MIN_EXT 0x8126
16216+#define GL_POINT_SIZE_MAX_EXT 0x8127
16217+#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128
16218+#define GL_DISTANCE_ATTENUATION_EXT 0x8129
16219+#endif
16220+
16221+#ifndef GL_SGIS_point_parameters
16222+#define GL_POINT_SIZE_MIN_SGIS 0x8126
16223+#define GL_POINT_SIZE_MAX_SGIS 0x8127
16224+#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128
16225+#define GL_DISTANCE_ATTENUATION_SGIS 0x8129
16226+#endif
16227+
16228+#ifndef GL_SGIX_instruments
16229+#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180
16230+#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181
16231+#endif
16232+
16233+#ifndef GL_SGIX_texture_scale_bias
16234+#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179
16235+#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A
16236+#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B
16237+#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C
16238+#endif
16239+
16240+#ifndef GL_SGIX_framezoom
16241+#define GL_FRAMEZOOM_SGIX 0x818B
16242+#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C
16243+#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D
16244+#endif
16245+
16246+#ifndef GL_SGIX_tag_sample_buffer
16247+#endif
16248+
16249+#ifndef GL_FfdMaskSGIX
16250+#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001
16251+#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002
16252+#endif
16253+
16254+#ifndef GL_SGIX_polynomial_ffd
16255+#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194
16256+#define GL_TEXTURE_DEFORMATION_SGIX 0x8195
16257+#define GL_DEFORMATIONS_MASK_SGIX 0x8196
16258+#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197
16259+#endif
16260+
16261+#ifndef GL_SGIX_reference_plane
16262+#define GL_REFERENCE_PLANE_SGIX 0x817D
16263+#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E
16264+#endif
16265+
16266+#ifndef GL_SGIX_flush_raster
16267+#endif
16268+
16269+#ifndef GL_SGIX_depth_texture
16270+#define GL_DEPTH_COMPONENT16_SGIX 0x81A5
16271+#define GL_DEPTH_COMPONENT24_SGIX 0x81A6
16272+#define GL_DEPTH_COMPONENT32_SGIX 0x81A7
16273+#endif
16274+
16275+#ifndef GL_SGIS_fog_function
16276+#define GL_FOG_FUNC_SGIS 0x812A
16277+#define GL_FOG_FUNC_POINTS_SGIS 0x812B
16278+#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C
16279+#endif
16280+
16281+#ifndef GL_SGIX_fog_offset
16282+#define GL_FOG_OFFSET_SGIX 0x8198
16283+#define GL_FOG_OFFSET_VALUE_SGIX 0x8199
16284+#endif
16285+
16286+#ifndef GL_HP_image_transform
16287+#define GL_IMAGE_SCALE_X_HP 0x8155
16288+#define GL_IMAGE_SCALE_Y_HP 0x8156
16289+#define GL_IMAGE_TRANSLATE_X_HP 0x8157
16290+#define GL_IMAGE_TRANSLATE_Y_HP 0x8158
16291+#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159
16292+#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A
16293+#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B
16294+#define GL_IMAGE_MAG_FILTER_HP 0x815C
16295+#define GL_IMAGE_MIN_FILTER_HP 0x815D
16296+#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E
16297+#define GL_CUBIC_HP 0x815F
16298+#define GL_AVERAGE_HP 0x8160
16299+#define GL_IMAGE_TRANSFORM_2D_HP 0x8161
16300+#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162
16301+#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163
16302+#endif
16303+
16304+#ifndef GL_HP_convolution_border_modes
16305+#define GL_IGNORE_BORDER_HP 0x8150
16306+#define GL_CONSTANT_BORDER_HP 0x8151
16307+#define GL_REPLICATE_BORDER_HP 0x8153
16308+#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154
16309+#endif
16310+
16311+#ifndef GL_INGR_palette_buffer
16312+#endif
16313+
16314+#ifndef GL_SGIX_texture_add_env
16315+#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE
16316+#endif
16317+
16318+#ifndef GL_EXT_color_subtable
16319+#endif
16320+
16321+#ifndef GL_PGI_vertex_hints
16322+#define GL_VERTEX_DATA_HINT_PGI 0x1A22A
16323+#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B
16324+#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C
16325+#define GL_MAX_VERTEX_HINT_PGI 0x1A22D
16326+#define GL_COLOR3_BIT_PGI 0x00010000
16327+#define GL_COLOR4_BIT_PGI 0x00020000
16328+#define GL_EDGEFLAG_BIT_PGI 0x00040000
16329+#define GL_INDEX_BIT_PGI 0x00080000
16330+#define GL_MAT_AMBIENT_BIT_PGI 0x00100000
16331+#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000
16332+#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000
16333+#define GL_MAT_EMISSION_BIT_PGI 0x00800000
16334+#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000
16335+#define GL_MAT_SHININESS_BIT_PGI 0x02000000
16336+#define GL_MAT_SPECULAR_BIT_PGI 0x04000000
16337+#define GL_NORMAL_BIT_PGI 0x08000000
16338+#define GL_TEXCOORD1_BIT_PGI 0x10000000
16339+#define GL_TEXCOORD2_BIT_PGI 0x20000000
16340+#define GL_TEXCOORD3_BIT_PGI 0x40000000
16341+#define GL_TEXCOORD4_BIT_PGI 0x80000000
16342+#define GL_VERTEX23_BIT_PGI 0x00000004
16343+#define GL_VERTEX4_BIT_PGI 0x00000008
16344+#endif
16345+
16346+#ifndef GL_PGI_misc_hints
16347+#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8
16348+#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD
16349+#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE
16350+#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202
16351+#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203
16352+#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204
16353+#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C
16354+#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D
16355+#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E
16356+#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F
16357+#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210
16358+#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211
16359+#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216
16360+#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217
16361+#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218
16362+#define GL_FULL_STIPPLE_HINT_PGI 0x1A219
16363+#define GL_CLIP_NEAR_HINT_PGI 0x1A220
16364+#define GL_CLIP_FAR_HINT_PGI 0x1A221
16365+#define GL_WIDE_LINE_HINT_PGI 0x1A222
16366+#define GL_BACK_NORMALS_HINT_PGI 0x1A223
16367+#endif
16368+
16369+#ifndef GL_EXT_paletted_texture
16370+#define GL_COLOR_INDEX1_EXT 0x80E2
16371+#define GL_COLOR_INDEX2_EXT 0x80E3
16372+#define GL_COLOR_INDEX4_EXT 0x80E4
16373+#define GL_COLOR_INDEX8_EXT 0x80E5
16374+#define GL_COLOR_INDEX12_EXT 0x80E6
16375+#define GL_COLOR_INDEX16_EXT 0x80E7
16376+#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED
16377+#endif
16378+
16379+#ifndef GL_EXT_clip_volume_hint
16380+#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0
16381+#endif
16382+
16383+#ifndef GL_SGIX_list_priority
16384+#define GL_LIST_PRIORITY_SGIX 0x8182
16385+#endif
16386+
16387+#ifndef GL_SGIX_ir_instrument1
16388+#define GL_IR_INSTRUMENT1_SGIX 0x817F
16389+#endif
16390+
16391+#ifndef GL_SGIX_calligraphic_fragment
16392+#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183
16393+#endif
16394+
16395+#ifndef GL_SGIX_texture_lod_bias
16396+#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E
16397+#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F
16398+#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190
16399+#endif
16400+
16401+#ifndef GL_SGIX_shadow_ambient
16402+#define GL_SHADOW_AMBIENT_SGIX 0x80BF
16403+#endif
16404+
16405+#ifndef GL_EXT_index_texture
16406+#endif
16407+
16408+#ifndef GL_EXT_index_material
16409+#define GL_INDEX_MATERIAL_EXT 0x81B8
16410+#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9
16411+#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA
16412+#endif
16413+
16414+#ifndef GL_EXT_index_func
16415+#define GL_INDEX_TEST_EXT 0x81B5
16416+#define GL_INDEX_TEST_FUNC_EXT 0x81B6
16417+#define GL_INDEX_TEST_REF_EXT 0x81B7
16418+#endif
16419+
16420+#ifndef GL_EXT_index_array_formats
16421+#define GL_IUI_V2F_EXT 0x81AD
16422+#define GL_IUI_V3F_EXT 0x81AE
16423+#define GL_IUI_N3F_V2F_EXT 0x81AF
16424+#define GL_IUI_N3F_V3F_EXT 0x81B0
16425+#define GL_T2F_IUI_V2F_EXT 0x81B1
16426+#define GL_T2F_IUI_V3F_EXT 0x81B2
16427+#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3
16428+#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4
16429+#endif
16430+
16431+#ifndef GL_EXT_compiled_vertex_array
16432+#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8
16433+#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9
16434+#endif
16435+
16436+#ifndef GL_EXT_cull_vertex
16437+#define GL_CULL_VERTEX_EXT 0x81AA
16438+#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB
16439+#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC
16440+#endif
16441+
16442+#ifndef GL_SGIX_ycrcb
16443+#define GL_YCRCB_422_SGIX 0x81BB
16444+#define GL_YCRCB_444_SGIX 0x81BC
16445+#endif
16446+
16447+#ifndef GL_SGIX_fragment_lighting
16448+#define GL_FRAGMENT_LIGHTING_SGIX 0x8400
16449+#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401
16450+#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402
16451+#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403
16452+#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404
16453+#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405
16454+#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406
16455+#define GL_LIGHT_ENV_MODE_SGIX 0x8407
16456+#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408
16457+#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409
16458+#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A
16459+#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B
16460+#define GL_FRAGMENT_LIGHT0_SGIX 0x840C
16461+#define GL_FRAGMENT_LIGHT1_SGIX 0x840D
16462+#define GL_FRAGMENT_LIGHT2_SGIX 0x840E
16463+#define GL_FRAGMENT_LIGHT3_SGIX 0x840F
16464+#define GL_FRAGMENT_LIGHT4_SGIX 0x8410
16465+#define GL_FRAGMENT_LIGHT5_SGIX 0x8411
16466+#define GL_FRAGMENT_LIGHT6_SGIX 0x8412
16467+#define GL_FRAGMENT_LIGHT7_SGIX 0x8413
16468+#endif
16469+
16470+#ifndef GL_IBM_rasterpos_clip
16471+#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262
16472+#endif
16473+
16474+#ifndef GL_HP_texture_lighting
16475+#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167
16476+#define GL_TEXTURE_POST_SPECULAR_HP 0x8168
16477+#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169
16478+#endif
16479+
16480+#ifndef GL_EXT_draw_range_elements
16481+#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8
16482+#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9
16483+#endif
16484+
16485+#ifndef GL_WIN_phong_shading
16486+#define GL_PHONG_WIN 0x80EA
16487+#define GL_PHONG_HINT_WIN 0x80EB
16488+#endif
16489+
16490+#ifndef GL_WIN_specular_fog
16491+#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC
16492+#endif
16493+
16494+#ifndef GL_EXT_light_texture
16495+#define GL_FRAGMENT_MATERIAL_EXT 0x8349
16496+#define GL_FRAGMENT_NORMAL_EXT 0x834A
16497+#define GL_FRAGMENT_COLOR_EXT 0x834C
16498+#define GL_ATTENUATION_EXT 0x834D
16499+#define GL_SHADOW_ATTENUATION_EXT 0x834E
16500+#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F
16501+#define GL_TEXTURE_LIGHT_EXT 0x8350
16502+#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351
16503+#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352
16504+/* reuse GL_FRAGMENT_DEPTH_EXT */
16505+#endif
16506+
16507+#ifndef GL_SGIX_blend_alpha_minmax
16508+#define GL_ALPHA_MIN_SGIX 0x8320
16509+#define GL_ALPHA_MAX_SGIX 0x8321
16510+#endif
16511+
16512+#ifndef GL_SGIX_impact_pixel_texture
16513+#define GL_PIXEL_TEX_GEN_Q_CEILING_SGIX 0x8184
16514+#define GL_PIXEL_TEX_GEN_Q_ROUND_SGIX 0x8185
16515+#define GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX 0x8186
16516+#define GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX 0x8187
16517+#define GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX 0x8188
16518+#define GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX 0x8189
16519+#define GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX 0x818A
16520+#endif
16521+
16522+#ifndef GL_EXT_bgra
16523+#define GL_BGR_EXT 0x80E0
16524+#define GL_BGRA_EXT 0x80E1
16525+#endif
16526+
16527+#ifndef GL_SGIX_async
16528+#define GL_ASYNC_MARKER_SGIX 0x8329
16529+#endif
16530+
16531+#ifndef GL_SGIX_async_pixel
16532+#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C
16533+#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D
16534+#define GL_ASYNC_READ_PIXELS_SGIX 0x835E
16535+#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F
16536+#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360
16537+#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361
16538+#endif
16539+
16540+#ifndef GL_SGIX_async_histogram
16541+#define GL_ASYNC_HISTOGRAM_SGIX 0x832C
16542+#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D
16543+#endif
16544+
16545+#ifndef GL_INTEL_texture_scissor
16546+#endif
16547+
16548+#ifndef GL_INTEL_parallel_arrays
16549+#define GL_PARALLEL_ARRAYS_INTEL 0x83F4
16550+#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5
16551+#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6
16552+#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7
16553+#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8
16554+#endif
16555+
16556+#ifndef GL_HP_occlusion_test
16557+#define GL_OCCLUSION_TEST_HP 0x8165
16558+#define GL_OCCLUSION_TEST_RESULT_HP 0x8166
16559+#endif
16560+
16561+#ifndef GL_EXT_pixel_transform
16562+#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330
16563+#define GL_PIXEL_MAG_FILTER_EXT 0x8331
16564+#define GL_PIXEL_MIN_FILTER_EXT 0x8332
16565+#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333
16566+#define GL_CUBIC_EXT 0x8334
16567+#define GL_AVERAGE_EXT 0x8335
16568+#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336
16569+#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337
16570+#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338
16571+#endif
16572+
16573+#ifndef GL_EXT_pixel_transform_color_table
16574+#endif
16575+
16576+#ifndef GL_EXT_shared_texture_palette
16577+#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB
16578+#endif
16579+
16580+#ifndef GL_EXT_separate_specular_color
16581+#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8
16582+#define GL_SINGLE_COLOR_EXT 0x81F9
16583+#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA
16584+#endif
16585+
16586+#ifndef GL_EXT_secondary_color
16587+#define GL_COLOR_SUM_EXT 0x8458
16588+#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459
16589+#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A
16590+#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B
16591+#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C
16592+#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D
16593+#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E
16594+#endif
16595+
16596+#ifndef GL_EXT_texture_perturb_normal
16597+#define GL_PERTURB_EXT 0x85AE
16598+#define GL_TEXTURE_NORMAL_EXT 0x85AF
16599+#endif
16600+
16601+#ifndef GL_EXT_multi_draw_arrays
16602+#endif
16603+
16604+#ifndef GL_EXT_fog_coord
16605+#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450
16606+#define GL_FOG_COORDINATE_EXT 0x8451
16607+#define GL_FRAGMENT_DEPTH_EXT 0x8452
16608+#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453
16609+#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454
16610+#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455
16611+#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456
16612+#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457
16613+#endif
16614+
16615+#ifndef GL_REND_screen_coordinates
16616+#define GL_SCREEN_COORDINATES_REND 0x8490
16617+#define GL_INVERTED_SCREEN_W_REND 0x8491
16618+#endif
16619+
16620+#ifndef GL_EXT_coordinate_frame
16621+#define GL_TANGENT_ARRAY_EXT 0x8439
16622+#define GL_BINORMAL_ARRAY_EXT 0x843A
16623+#define GL_CURRENT_TANGENT_EXT 0x843B
16624+#define GL_CURRENT_BINORMAL_EXT 0x843C
16625+#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E
16626+#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F
16627+#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440
16628+#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441
16629+#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442
16630+#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443
16631+#define GL_MAP1_TANGENT_EXT 0x8444
16632+#define GL_MAP2_TANGENT_EXT 0x8445
16633+#define GL_MAP1_BINORMAL_EXT 0x8446
16634+#define GL_MAP2_BINORMAL_EXT 0x8447
16635+#endif
16636+
16637+#ifndef GL_EXT_texture_env_combine
16638+#define GL_COMBINE_EXT 0x8570
16639+#define GL_COMBINE_RGB_EXT 0x8571
16640+#define GL_COMBINE_ALPHA_EXT 0x8572
16641+#define GL_RGB_SCALE_EXT 0x8573
16642+#define GL_ADD_SIGNED_EXT 0x8574
16643+#define GL_INTERPOLATE_EXT 0x8575
16644+#define GL_CONSTANT_EXT 0x8576
16645+#define GL_PRIMARY_COLOR_EXT 0x8577
16646+#define GL_PREVIOUS_EXT 0x8578
16647+#define GL_SOURCE0_RGB_EXT 0x8580
16648+#define GL_SOURCE1_RGB_EXT 0x8581
16649+#define GL_SOURCE2_RGB_EXT 0x8582
16650+#define GL_SOURCE0_ALPHA_EXT 0x8588
16651+#define GL_SOURCE1_ALPHA_EXT 0x8589
16652+#define GL_SOURCE2_ALPHA_EXT 0x858A
16653+#define GL_OPERAND0_RGB_EXT 0x8590
16654+#define GL_OPERAND1_RGB_EXT 0x8591
16655+#define GL_OPERAND2_RGB_EXT 0x8592
16656+#define GL_OPERAND0_ALPHA_EXT 0x8598
16657+#define GL_OPERAND1_ALPHA_EXT 0x8599
16658+#define GL_OPERAND2_ALPHA_EXT 0x859A
16659+#endif
16660+
16661+#ifndef GL_APPLE_specular_vector
16662+#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0
16663+#endif
16664+
16665+#ifndef GL_APPLE_transform_hint
16666+#define GL_TRANSFORM_HINT_APPLE 0x85B1
16667+#endif
16668+
16669+#ifndef GL_SGIX_fog_scale
16670+#define GL_FOG_SCALE_SGIX 0x81FC
16671+#define GL_FOG_SCALE_VALUE_SGIX 0x81FD
16672+#endif
16673+
16674+#ifndef GL_SUNX_constant_data
16675+#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5
16676+#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6
16677+#endif
16678+
16679+#ifndef GL_SUN_global_alpha
16680+#define GL_GLOBAL_ALPHA_SUN 0x81D9
16681+#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA
16682+#endif
16683+
16684+#ifndef GL_SUN_triangle_list
16685+#define GL_RESTART_SUN 0x0001
16686+#define GL_REPLACE_MIDDLE_SUN 0x0002
16687+#define GL_REPLACE_OLDEST_SUN 0x0003
16688+#define GL_TRIANGLE_LIST_SUN 0x81D7
16689+#define GL_REPLACEMENT_CODE_SUN 0x81D8
16690+#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0
16691+#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1
16692+#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2
16693+#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3
16694+#define GL_R1UI_V3F_SUN 0x85C4
16695+#define GL_R1UI_C4UB_V3F_SUN 0x85C5
16696+#define GL_R1UI_C3F_V3F_SUN 0x85C6
16697+#define GL_R1UI_N3F_V3F_SUN 0x85C7
16698+#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8
16699+#define GL_R1UI_T2F_V3F_SUN 0x85C9
16700+#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA
16701+#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB
16702+#endif
16703+
16704+#ifndef GL_SUN_vertex
16705+#endif
16706+
16707+#ifndef GL_EXT_blend_func_separate
16708+#define GL_BLEND_DST_RGB_EXT 0x80C8
16709+#define GL_BLEND_SRC_RGB_EXT 0x80C9
16710+#define GL_BLEND_DST_ALPHA_EXT 0x80CA
16711+#define GL_BLEND_SRC_ALPHA_EXT 0x80CB
16712+#endif
16713+
16714+#ifndef GL_INGR_color_clamp
16715+#define GL_RED_MIN_CLAMP_INGR 0x8560
16716+#define GL_GREEN_MIN_CLAMP_INGR 0x8561
16717+#define GL_BLUE_MIN_CLAMP_INGR 0x8562
16718+#define GL_ALPHA_MIN_CLAMP_INGR 0x8563
16719+#define GL_RED_MAX_CLAMP_INGR 0x8564
16720+#define GL_GREEN_MAX_CLAMP_INGR 0x8565
16721+#define GL_BLUE_MAX_CLAMP_INGR 0x8566
16722+#define GL_ALPHA_MAX_CLAMP_INGR 0x8567
16723+#endif
16724+
16725+#ifndef GL_INGR_interlace_read
16726+#define GL_INTERLACE_READ_INGR 0x8568
16727+#endif
16728+
16729+#ifndef GL_EXT_stencil_wrap
16730+#define GL_INCR_WRAP_EXT 0x8507
16731+#define GL_DECR_WRAP_EXT 0x8508
16732+#endif
16733+
16734+#ifndef GL_EXT_422_pixels
16735+#define GL_422_EXT 0x80CC
16736+#define GL_422_REV_EXT 0x80CD
16737+#define GL_422_AVERAGE_EXT 0x80CE
16738+#define GL_422_REV_AVERAGE_EXT 0x80CF
16739+#endif
16740+
16741+#ifndef GL_NV_texgen_reflection
16742+#define GL_NORMAL_MAP_NV 0x8511
16743+#define GL_REFLECTION_MAP_NV 0x8512
16744+#endif
16745+
16746+#ifndef GL_EXT_texture_cube_map
16747+#define GL_NORMAL_MAP_EXT 0x8511
16748+#define GL_REFLECTION_MAP_EXT 0x8512
16749+#define GL_TEXTURE_CUBE_MAP_EXT 0x8513
16750+#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514
16751+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515
16752+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516
16753+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517
16754+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518
16755+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519
16756+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A
16757+#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B
16758+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C
16759+#endif
16760+
16761+#ifndef GL_SUN_convolution_border_modes
16762+#define GL_WRAP_BORDER_SUN 0x81D4
16763+#endif
16764+
16765+#ifndef GL_EXT_texture_env_add
16766+#endif
16767+
16768+#ifndef GL_EXT_texture_lod_bias
16769+#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD
16770+#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500
16771+#define GL_TEXTURE_LOD_BIAS_EXT 0x8501
16772+#endif
16773+
16774+#ifndef GL_EXT_texture_filter_anisotropic
16775+#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
16776+#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
16777+#endif
16778+
16779+#ifndef GL_EXT_vertex_weighting
16780+#define GL_MODELVIEW0_STACK_DEPTH_EXT GL_MODELVIEW_STACK_DEPTH
16781+#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502
16782+#define GL_MODELVIEW0_MATRIX_EXT GL_MODELVIEW_MATRIX
16783+#define GL_MODELVIEW1_MATRIX_EXT 0x8506
16784+#define GL_VERTEX_WEIGHTING_EXT 0x8509
16785+#define GL_MODELVIEW0_EXT GL_MODELVIEW
16786+#define GL_MODELVIEW1_EXT 0x850A
16787+#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B
16788+#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C
16789+#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D
16790+#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E
16791+#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F
16792+#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510
16793+#endif
16794+
16795+#ifndef GL_NV_light_max_exponent
16796+#define GL_MAX_SHININESS_NV 0x8504
16797+#define GL_MAX_SPOT_EXPONENT_NV 0x8505
16798+#endif
16799+
16800+#ifndef GL_NV_vertex_array_range
16801+#define GL_VERTEX_ARRAY_RANGE_NV 0x851D
16802+#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E
16803+#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F
16804+#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520
16805+#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521
16806+#endif
16807+
16808+#ifndef GL_NV_register_combiners
16809+#define GL_REGISTER_COMBINERS_NV 0x8522
16810+#define GL_VARIABLE_A_NV 0x8523
16811+#define GL_VARIABLE_B_NV 0x8524
16812+#define GL_VARIABLE_C_NV 0x8525
16813+#define GL_VARIABLE_D_NV 0x8526
16814+#define GL_VARIABLE_E_NV 0x8527
16815+#define GL_VARIABLE_F_NV 0x8528
16816+#define GL_VARIABLE_G_NV 0x8529
16817+#define GL_CONSTANT_COLOR0_NV 0x852A
16818+#define GL_CONSTANT_COLOR1_NV 0x852B
16819+#define GL_PRIMARY_COLOR_NV 0x852C
16820+#define GL_SECONDARY_COLOR_NV 0x852D
16821+#define GL_SPARE0_NV 0x852E
16822+#define GL_SPARE1_NV 0x852F
16823+#define GL_DISCARD_NV 0x8530
16824+#define GL_E_TIMES_F_NV 0x8531
16825+#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532
16826+#define GL_UNSIGNED_IDENTITY_NV 0x8536
16827+#define GL_UNSIGNED_INVERT_NV 0x8537
16828+#define GL_EXPAND_NORMAL_NV 0x8538
16829+#define GL_EXPAND_NEGATE_NV 0x8539
16830+#define GL_HALF_BIAS_NORMAL_NV 0x853A
16831+#define GL_HALF_BIAS_NEGATE_NV 0x853B
16832+#define GL_SIGNED_IDENTITY_NV 0x853C
16833+#define GL_SIGNED_NEGATE_NV 0x853D
16834+#define GL_SCALE_BY_TWO_NV 0x853E
16835+#define GL_SCALE_BY_FOUR_NV 0x853F
16836+#define GL_SCALE_BY_ONE_HALF_NV 0x8540
16837+#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541
16838+#define GL_COMBINER_INPUT_NV 0x8542
16839+#define GL_COMBINER_MAPPING_NV 0x8543
16840+#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544
16841+#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545
16842+#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546
16843+#define GL_COMBINER_MUX_SUM_NV 0x8547
16844+#define GL_COMBINER_SCALE_NV 0x8548
16845+#define GL_COMBINER_BIAS_NV 0x8549
16846+#define GL_COMBINER_AB_OUTPUT_NV 0x854A
16847+#define GL_COMBINER_CD_OUTPUT_NV 0x854B
16848+#define GL_COMBINER_SUM_OUTPUT_NV 0x854C
16849+#define GL_MAX_GENERAL_COMBINERS_NV 0x854D
16850+#define GL_NUM_GENERAL_COMBINERS_NV 0x854E
16851+#define GL_COLOR_SUM_CLAMP_NV 0x854F
16852+#define GL_COMBINER0_NV 0x8550
16853+#define GL_COMBINER1_NV 0x8551
16854+#define GL_COMBINER2_NV 0x8552
16855+#define GL_COMBINER3_NV 0x8553
16856+#define GL_COMBINER4_NV 0x8554
16857+#define GL_COMBINER5_NV 0x8555
16858+#define GL_COMBINER6_NV 0x8556
16859+#define GL_COMBINER7_NV 0x8557
16860+/* reuse GL_TEXTURE0_ARB */
16861+/* reuse GL_TEXTURE1_ARB */
16862+/* reuse GL_ZERO */
16863+/* reuse GL_NONE */
16864+/* reuse GL_FOG */
16865+#endif
16866+
16867+#ifndef GL_NV_fog_distance
16868+#define GL_FOG_DISTANCE_MODE_NV 0x855A
16869+#define GL_EYE_RADIAL_NV 0x855B
16870+#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C
16871+/* reuse GL_EYE_PLANE */
16872+#endif
16873+
16874+#ifndef GL_NV_texgen_emboss
16875+#define GL_EMBOSS_LIGHT_NV 0x855D
16876+#define GL_EMBOSS_CONSTANT_NV 0x855E
16877+#define GL_EMBOSS_MAP_NV 0x855F
16878+#endif
16879+
16880+#ifndef GL_NV_blend_square
16881+#endif
16882+
16883+#ifndef GL_NV_texture_env_combine4
16884+#define GL_COMBINE4_NV 0x8503
16885+#define GL_SOURCE3_RGB_NV 0x8583
16886+#define GL_SOURCE3_ALPHA_NV 0x858B
16887+#define GL_OPERAND3_RGB_NV 0x8593
16888+#define GL_OPERAND3_ALPHA_NV 0x859B
16889+#endif
16890+
16891+#ifndef GL_MESA_resize_buffers
16892+#endif
16893+
16894+#ifndef GL_MESA_window_pos
16895+#endif
16896+
16897+#ifndef GL_EXT_texture_compression_s3tc
16898+#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
16899+#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
16900+#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
16901+#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
16902+#endif
16903+
16904+#ifndef GL_IBM_cull_vertex
16905+#define GL_CULL_VERTEX_IBM 103050
16906+#endif
16907+
16908+#ifndef GL_IBM_multimode_draw_arrays
16909+#endif
16910+
16911+#ifndef GL_IBM_vertex_array_lists
16912+#define GL_VERTEX_ARRAY_LIST_IBM 103070
16913+#define GL_NORMAL_ARRAY_LIST_IBM 103071
16914+#define GL_COLOR_ARRAY_LIST_IBM 103072
16915+#define GL_INDEX_ARRAY_LIST_IBM 103073
16916+#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074
16917+#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075
16918+#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076
16919+#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077
16920+#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080
16921+#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081
16922+#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082
16923+#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083
16924+#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084
16925+#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085
16926+#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086
16927+#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087
16928+#endif
16929+
16930+#ifndef GL_SGIX_subsample
16931+#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0
16932+#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1
16933+#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2
16934+#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3
16935+#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4
16936+#endif
16937+
16938+#ifndef GL_SGIX_ycrcb_subsample
16939+#endif
16940+
16941+#ifndef GL_SGIX_ycrcba
16942+#define GL_YCRCB_SGIX 0x8318
16943+#define GL_YCRCBA_SGIX 0x8319
16944+#endif
16945+
16946+#ifndef GL_SGI_depth_pass_instrument
16947+#define GL_DEPTH_PASS_INSTRUMENT_SGIX 0x8310
16948+#define GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX 0x8311
16949+#define GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX 0x8312
16950+#endif
16951+
16952+#ifndef GL_3DFX_texture_compression_FXT1
16953+#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0
16954+#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1
16955+#endif
16956+
16957+#ifndef GL_3DFX_multisample
16958+#define GL_MULTISAMPLE_3DFX 0x86B2
16959+#define GL_SAMPLE_BUFFERS_3DFX 0x86B3
16960+#define GL_SAMPLES_3DFX 0x86B4
16961+#define GL_MULTISAMPLE_BIT_3DFX 0x20000000
16962+#endif
16963+
16964+#ifndef GL_3DFX_tbuffer
16965+#endif
16966+
16967+#ifndef GL_EXT_multisample
16968+#define GL_MULTISAMPLE_EXT 0x809D
16969+#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E
16970+#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F
16971+#define GL_SAMPLE_MASK_EXT 0x80A0
16972+#define GL_1PASS_EXT 0x80A1
16973+#define GL_2PASS_0_EXT 0x80A2
16974+#define GL_2PASS_1_EXT 0x80A3
16975+#define GL_4PASS_0_EXT 0x80A4
16976+#define GL_4PASS_1_EXT 0x80A5
16977+#define GL_4PASS_2_EXT 0x80A6
16978+#define GL_4PASS_3_EXT 0x80A7
16979+#define GL_SAMPLE_BUFFERS_EXT 0x80A8
16980+#define GL_SAMPLES_EXT 0x80A9
16981+#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA
16982+#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB
16983+#define GL_SAMPLE_PATTERN_EXT 0x80AC
16984+#define GL_MULTISAMPLE_BIT_EXT 0x20000000
16985+#endif
16986+
16987+#ifndef GL_SGIX_vertex_preclip
16988+#define GL_VERTEX_PRECLIP_SGIX 0x83EE
16989+#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF
16990+#endif
16991+
16992+#ifndef GL_SGIX_convolution_accuracy
16993+#define GL_CONVOLUTION_HINT_SGIX 0x8316
16994+#endif
16995+
16996+#ifndef GL_SGIX_resample
16997+#define GL_PACK_RESAMPLE_SGIX 0x842C
16998+#define GL_UNPACK_RESAMPLE_SGIX 0x842D
16999+#define GL_RESAMPLE_REPLICATE_SGIX 0x842E
17000+#define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F
17001+#define GL_RESAMPLE_DECIMATE_SGIX 0x8430
17002+#endif
17003+
17004+#ifndef GL_SGIS_point_line_texgen
17005+#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0
17006+#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1
17007+#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2
17008+#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3
17009+#define GL_EYE_POINT_SGIS 0x81F4
17010+#define GL_OBJECT_POINT_SGIS 0x81F5
17011+#define GL_EYE_LINE_SGIS 0x81F6
17012+#define GL_OBJECT_LINE_SGIS 0x81F7
17013+#endif
17014+
17015+#ifndef GL_SGIS_texture_color_mask
17016+#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF
17017+#endif
17018+
17019+#ifndef GL_EXT_texture_env_dot3
17020+#define GL_DOT3_RGB_EXT 0x8740
17021+#define GL_DOT3_RGBA_EXT 0x8741
17022+#endif
17023+
17024+#ifndef GL_ATI_texture_mirror_once
17025+#define GL_MIRROR_CLAMP_ATI 0x8742
17026+#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743
17027+#endif
17028+
17029+#ifndef GL_NV_fence
17030+#define GL_ALL_COMPLETED_NV 0x84F2
17031+#define GL_FENCE_STATUS_NV 0x84F3
17032+#define GL_FENCE_CONDITION_NV 0x84F4
17033+#endif
17034+
17035+#ifndef GL_IBM_texture_mirrored_repeat
17036+#define GL_MIRRORED_REPEAT_IBM 0x8370
17037+#endif
17038+
17039+#ifndef GL_NV_evaluators
17040+#define GL_EVAL_2D_NV 0x86C0
17041+#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1
17042+#define GL_MAP_TESSELLATION_NV 0x86C2
17043+#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3
17044+#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4
17045+#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5
17046+#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6
17047+#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7
17048+#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8
17049+#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9
17050+#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA
17051+#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB
17052+#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC
17053+#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD
17054+#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE
17055+#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF
17056+#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0
17057+#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1
17058+#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2
17059+#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3
17060+#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4
17061+#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5
17062+#define GL_MAX_MAP_TESSELLATION_NV 0x86D6
17063+#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7
17064+#endif
17065+
17066+#ifndef GL_NV_packed_depth_stencil
17067+#define GL_DEPTH_STENCIL_NV 0x84F9
17068+#define GL_UNSIGNED_INT_24_8_NV 0x84FA
17069+#endif
17070+
17071+#ifndef GL_NV_register_combiners2
17072+#define GL_PER_STAGE_CONSTANTS_NV 0x8535
17073+#endif
17074+
17075+#ifndef GL_NV_texture_compression_vtc
17076+#endif
17077+
17078+#ifndef GL_NV_texture_rectangle
17079+#define GL_TEXTURE_RECTANGLE_NV 0x84F5
17080+#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6
17081+#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7
17082+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8
17083+#endif
17084+
17085+#ifndef GL_NV_texture_shader
17086+#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C
17087+#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D
17088+#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E
17089+#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9
17090+#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA
17091+#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB
17092+#define GL_DSDT_MAG_INTENSITY_NV 0x86DC
17093+#define GL_SHADER_CONSISTENT_NV 0x86DD
17094+#define GL_TEXTURE_SHADER_NV 0x86DE
17095+#define GL_SHADER_OPERATION_NV 0x86DF
17096+#define GL_CULL_MODES_NV 0x86E0
17097+#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1
17098+#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2
17099+#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3
17100+#define GL_OFFSET_TEXTURE_2D_MATRIX_NV GL_OFFSET_TEXTURE_MATRIX_NV
17101+#define GL_OFFSET_TEXTURE_2D_SCALE_NV GL_OFFSET_TEXTURE_SCALE_NV
17102+#define GL_OFFSET_TEXTURE_2D_BIAS_NV GL_OFFSET_TEXTURE_BIAS_NV
17103+#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4
17104+#define GL_CONST_EYE_NV 0x86E5
17105+#define GL_PASS_THROUGH_NV 0x86E6
17106+#define GL_CULL_FRAGMENT_NV 0x86E7
17107+#define GL_OFFSET_TEXTURE_2D_NV 0x86E8
17108+#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9
17109+#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA
17110+#define GL_DOT_PRODUCT_NV 0x86EC
17111+#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED
17112+#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE
17113+#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0
17114+#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1
17115+#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2
17116+#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3
17117+#define GL_HILO_NV 0x86F4
17118+#define GL_DSDT_NV 0x86F5
17119+#define GL_DSDT_MAG_NV 0x86F6
17120+#define GL_DSDT_MAG_VIB_NV 0x86F7
17121+#define GL_HILO16_NV 0x86F8
17122+#define GL_SIGNED_HILO_NV 0x86F9
17123+#define GL_SIGNED_HILO16_NV 0x86FA
17124+#define GL_SIGNED_RGBA_NV 0x86FB
17125+#define GL_SIGNED_RGBA8_NV 0x86FC
17126+#define GL_SIGNED_RGB_NV 0x86FE
17127+#define GL_SIGNED_RGB8_NV 0x86FF
17128+#define GL_SIGNED_LUMINANCE_NV 0x8701
17129+#define GL_SIGNED_LUMINANCE8_NV 0x8702
17130+#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703
17131+#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704
17132+#define GL_SIGNED_ALPHA_NV 0x8705
17133+#define GL_SIGNED_ALPHA8_NV 0x8706
17134+#define GL_SIGNED_INTENSITY_NV 0x8707
17135+#define GL_SIGNED_INTENSITY8_NV 0x8708
17136+#define GL_DSDT8_NV 0x8709
17137+#define GL_DSDT8_MAG8_NV 0x870A
17138+#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B
17139+#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C
17140+#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D
17141+#define GL_HI_SCALE_NV 0x870E
17142+#define GL_LO_SCALE_NV 0x870F
17143+#define GL_DS_SCALE_NV 0x8710
17144+#define GL_DT_SCALE_NV 0x8711
17145+#define GL_MAGNITUDE_SCALE_NV 0x8712
17146+#define GL_VIBRANCE_SCALE_NV 0x8713
17147+#define GL_HI_BIAS_NV 0x8714
17148+#define GL_LO_BIAS_NV 0x8715
17149+#define GL_DS_BIAS_NV 0x8716
17150+#define GL_DT_BIAS_NV 0x8717
17151+#define GL_MAGNITUDE_BIAS_NV 0x8718
17152+#define GL_VIBRANCE_BIAS_NV 0x8719
17153+#define GL_TEXTURE_BORDER_VALUES_NV 0x871A
17154+#define GL_TEXTURE_HI_SIZE_NV 0x871B
17155+#define GL_TEXTURE_LO_SIZE_NV 0x871C
17156+#define GL_TEXTURE_DS_SIZE_NV 0x871D
17157+#define GL_TEXTURE_DT_SIZE_NV 0x871E
17158+#define GL_TEXTURE_MAG_SIZE_NV 0x871F
17159+#endif
17160+
17161+#ifndef GL_NV_texture_shader2
17162+#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF
17163+#endif
17164+
17165+#ifndef GL_NV_vertex_array_range2
17166+#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533
17167+#endif
17168+
17169+#ifndef GL_NV_vertex_program
17170+#define GL_VERTEX_PROGRAM_NV 0x8620
17171+#define GL_VERTEX_STATE_PROGRAM_NV 0x8621
17172+#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623
17173+#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624
17174+#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625
17175+#define GL_CURRENT_ATTRIB_NV 0x8626
17176+#define GL_PROGRAM_LENGTH_NV 0x8627
17177+#define GL_PROGRAM_STRING_NV 0x8628
17178+#define GL_MODELVIEW_PROJECTION_NV 0x8629
17179+#define GL_IDENTITY_NV 0x862A
17180+#define GL_INVERSE_NV 0x862B
17181+#define GL_TRANSPOSE_NV 0x862C
17182+#define GL_INVERSE_TRANSPOSE_NV 0x862D
17183+#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E
17184+#define GL_MAX_TRACK_MATRICES_NV 0x862F
17185+#define GL_MATRIX0_NV 0x8630
17186+#define GL_MATRIX1_NV 0x8631
17187+#define GL_MATRIX2_NV 0x8632
17188+#define GL_MATRIX3_NV 0x8633
17189+#define GL_MATRIX4_NV 0x8634
17190+#define GL_MATRIX5_NV 0x8635
17191+#define GL_MATRIX6_NV 0x8636
17192+#define GL_MATRIX7_NV 0x8637
17193+#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640
17194+#define GL_CURRENT_MATRIX_NV 0x8641
17195+#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642
17196+#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643
17197+#define GL_PROGRAM_PARAMETER_NV 0x8644
17198+#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645
17199+#define GL_PROGRAM_TARGET_NV 0x8646
17200+#define GL_PROGRAM_RESIDENT_NV 0x8647
17201+#define GL_TRACK_MATRIX_NV 0x8648
17202+#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649
17203+#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A
17204+#define GL_PROGRAM_ERROR_POSITION_NV 0x864B
17205+#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650
17206+#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651
17207+#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652
17208+#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653
17209+#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654
17210+#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655
17211+#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656
17212+#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657
17213+#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658
17214+#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659
17215+#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A
17216+#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B
17217+#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C
17218+#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D
17219+#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E
17220+#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F
17221+#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660
17222+#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661
17223+#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662
17224+#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663
17225+#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664
17226+#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665
17227+#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666
17228+#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667
17229+#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668
17230+#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669
17231+#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A
17232+#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B
17233+#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C
17234+#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D
17235+#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E
17236+#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F
17237+#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670
17238+#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671
17239+#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672
17240+#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673
17241+#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674
17242+#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675
17243+#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676
17244+#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677
17245+#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678
17246+#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679
17247+#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A
17248+#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B
17249+#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C
17250+#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D
17251+#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E
17252+#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F
17253+#endif
17254+
17255+#ifndef GL_SGIX_texture_coordinate_clamp
17256+#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369
17257+#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A
17258+#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B
17259+#endif
17260+
17261+#ifndef GL_SGIX_scalebias_hint
17262+#define GL_SCALEBIAS_HINT_SGIX 0x8322
17263+#endif
17264+
17265+#ifndef GL_OML_interlace
17266+#define GL_INTERLACE_OML 0x8980
17267+#define GL_INTERLACE_READ_OML 0x8981
17268+#endif
17269+
17270+#ifndef GL_OML_subsample
17271+#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982
17272+#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983
17273+#endif
17274+
17275+#ifndef GL_OML_resample
17276+#define GL_PACK_RESAMPLE_OML 0x8984
17277+#define GL_UNPACK_RESAMPLE_OML 0x8985
17278+#define GL_RESAMPLE_REPLICATE_OML 0x8986
17279+#define GL_RESAMPLE_ZERO_FILL_OML 0x8987
17280+#define GL_RESAMPLE_AVERAGE_OML 0x8988
17281+#define GL_RESAMPLE_DECIMATE_OML 0x8989
17282+#endif
17283+
17284+#ifndef GL_NV_copy_depth_to_color
17285+#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E
17286+#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F
17287+#endif
17288+
17289+#ifndef GL_ATI_envmap_bumpmap
17290+#define GL_BUMP_ROT_MATRIX_ATI 0x8775
17291+#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776
17292+#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777
17293+#define GL_BUMP_TEX_UNITS_ATI 0x8778
17294+#define GL_DUDV_ATI 0x8779
17295+#define GL_DU8DV8_ATI 0x877A
17296+#define GL_BUMP_ENVMAP_ATI 0x877B
17297+#define GL_BUMP_TARGET_ATI 0x877C
17298+#endif
17299+
17300+#ifndef GL_ATI_fragment_shader
17301+#define GL_FRAGMENT_SHADER_ATI 0x8920
17302+#define GL_REG_0_ATI 0x8921
17303+#define GL_REG_1_ATI 0x8922
17304+#define GL_REG_2_ATI 0x8923
17305+#define GL_REG_3_ATI 0x8924
17306+#define GL_REG_4_ATI 0x8925
17307+#define GL_REG_5_ATI 0x8926
17308+#define GL_REG_6_ATI 0x8927
17309+#define GL_REG_7_ATI 0x8928
17310+#define GL_REG_8_ATI 0x8929
17311+#define GL_REG_9_ATI 0x892A
17312+#define GL_REG_10_ATI 0x892B
17313+#define GL_REG_11_ATI 0x892C
17314+#define GL_REG_12_ATI 0x892D
17315+#define GL_REG_13_ATI 0x892E
17316+#define GL_REG_14_ATI 0x892F
17317+#define GL_REG_15_ATI 0x8930
17318+#define GL_REG_16_ATI 0x8931
17319+#define GL_REG_17_ATI 0x8932
17320+#define GL_REG_18_ATI 0x8933
17321+#define GL_REG_19_ATI 0x8934
17322+#define GL_REG_20_ATI 0x8935
17323+#define GL_REG_21_ATI 0x8936
17324+#define GL_REG_22_ATI 0x8937
17325+#define GL_REG_23_ATI 0x8938
17326+#define GL_REG_24_ATI 0x8939
17327+#define GL_REG_25_ATI 0x893A
17328+#define GL_REG_26_ATI 0x893B
17329+#define GL_REG_27_ATI 0x893C
17330+#define GL_REG_28_ATI 0x893D
17331+#define GL_REG_29_ATI 0x893E
17332+#define GL_REG_30_ATI 0x893F
17333+#define GL_REG_31_ATI 0x8940
17334+#define GL_CON_0_ATI 0x8941
17335+#define GL_CON_1_ATI 0x8942
17336+#define GL_CON_2_ATI 0x8943
17337+#define GL_CON_3_ATI 0x8944
17338+#define GL_CON_4_ATI 0x8945
17339+#define GL_CON_5_ATI 0x8946
17340+#define GL_CON_6_ATI 0x8947
17341+#define GL_CON_7_ATI 0x8948
17342+#define GL_CON_8_ATI 0x8949
17343+#define GL_CON_9_ATI 0x894A
17344+#define GL_CON_10_ATI 0x894B
17345+#define GL_CON_11_ATI 0x894C
17346+#define GL_CON_12_ATI 0x894D
17347+#define GL_CON_13_ATI 0x894E
17348+#define GL_CON_14_ATI 0x894F
17349+#define GL_CON_15_ATI 0x8950
17350+#define GL_CON_16_ATI 0x8951
17351+#define GL_CON_17_ATI 0x8952
17352+#define GL_CON_18_ATI 0x8953
17353+#define GL_CON_19_ATI 0x8954
17354+#define GL_CON_20_ATI 0x8955
17355+#define GL_CON_21_ATI 0x8956
17356+#define GL_CON_22_ATI 0x8957
17357+#define GL_CON_23_ATI 0x8958
17358+#define GL_CON_24_ATI 0x8959
17359+#define GL_CON_25_ATI 0x895A
17360+#define GL_CON_26_ATI 0x895B
17361+#define GL_CON_27_ATI 0x895C
17362+#define GL_CON_28_ATI 0x895D
17363+#define GL_CON_29_ATI 0x895E
17364+#define GL_CON_30_ATI 0x895F
17365+#define GL_CON_31_ATI 0x8960
17366+#define GL_MOV_ATI 0x8961
17367+#define GL_ADD_ATI 0x8963
17368+#define GL_MUL_ATI 0x8964
17369+#define GL_SUB_ATI 0x8965
17370+#define GL_DOT3_ATI 0x8966
17371+#define GL_DOT4_ATI 0x8967
17372+#define GL_MAD_ATI 0x8968
17373+#define GL_LERP_ATI 0x8969
17374+#define GL_CND_ATI 0x896A
17375+#define GL_CND0_ATI 0x896B
17376+#define GL_DOT2_ADD_ATI 0x896C
17377+#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D
17378+#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E
17379+#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F
17380+#define GL_NUM_PASSES_ATI 0x8970
17381+#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971
17382+#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972
17383+#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973
17384+#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974
17385+#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975
17386+#define GL_SWIZZLE_STR_ATI 0x8976
17387+#define GL_SWIZZLE_STQ_ATI 0x8977
17388+#define GL_SWIZZLE_STR_DR_ATI 0x8978
17389+#define GL_SWIZZLE_STQ_DQ_ATI 0x8979
17390+#define GL_SWIZZLE_STRQ_ATI 0x897A
17391+#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B
17392+#define GL_RED_BIT_ATI 0x00000001
17393+#define GL_GREEN_BIT_ATI 0x00000002
17394+#define GL_BLUE_BIT_ATI 0x00000004
17395+#define GL_2X_BIT_ATI 0x00000001
17396+#define GL_4X_BIT_ATI 0x00000002
17397+#define GL_8X_BIT_ATI 0x00000004
17398+#define GL_HALF_BIT_ATI 0x00000008
17399+#define GL_QUARTER_BIT_ATI 0x00000010
17400+#define GL_EIGHTH_BIT_ATI 0x00000020
17401+#define GL_SATURATE_BIT_ATI 0x00000040
17402+#define GL_COMP_BIT_ATI 0x00000002
17403+#define GL_NEGATE_BIT_ATI 0x00000004
17404+#define GL_BIAS_BIT_ATI 0x00000008
17405+#endif
17406+
17407+#ifndef GL_ATI_pn_triangles
17408+#define GL_PN_TRIANGLES_ATI 0x87F0
17409+#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1
17410+#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2
17411+#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3
17412+#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4
17413+#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5
17414+#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6
17415+#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7
17416+#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8
17417+#endif
17418+
17419+#ifndef GL_ATI_vertex_array_object
17420+#define GL_STATIC_ATI 0x8760
17421+#define GL_DYNAMIC_ATI 0x8761
17422+#define GL_PRESERVE_ATI 0x8762
17423+#define GL_DISCARD_ATI 0x8763
17424+#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764
17425+#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765
17426+#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766
17427+#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767
17428+#endif
17429+
17430+#ifndef GL_EXT_vertex_shader
17431+#define GL_VERTEX_SHADER_EXT 0x8780
17432+#define GL_VERTEX_SHADER_BINDING_EXT 0x8781
17433+#define GL_OP_INDEX_EXT 0x8782
17434+#define GL_OP_NEGATE_EXT 0x8783
17435+#define GL_OP_DOT3_EXT 0x8784
17436+#define GL_OP_DOT4_EXT 0x8785
17437+#define GL_OP_MUL_EXT 0x8786
17438+#define GL_OP_ADD_EXT 0x8787
17439+#define GL_OP_MADD_EXT 0x8788
17440+#define GL_OP_FRAC_EXT 0x8789
17441+#define GL_OP_MAX_EXT 0x878A
17442+#define GL_OP_MIN_EXT 0x878B
17443+#define GL_OP_SET_GE_EXT 0x878C
17444+#define GL_OP_SET_LT_EXT 0x878D
17445+#define GL_OP_CLAMP_EXT 0x878E
17446+#define GL_OP_FLOOR_EXT 0x878F
17447+#define GL_OP_ROUND_EXT 0x8790
17448+#define GL_OP_EXP_BASE_2_EXT 0x8791
17449+#define GL_OP_LOG_BASE_2_EXT 0x8792
17450+#define GL_OP_POWER_EXT 0x8793
17451+#define GL_OP_RECIP_EXT 0x8794
17452+#define GL_OP_RECIP_SQRT_EXT 0x8795
17453+#define GL_OP_SUB_EXT 0x8796
17454+#define GL_OP_CROSS_PRODUCT_EXT 0x8797
17455+#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798
17456+#define GL_OP_MOV_EXT 0x8799
17457+#define GL_OUTPUT_VERTEX_EXT 0x879A
17458+#define GL_OUTPUT_COLOR0_EXT 0x879B
17459+#define GL_OUTPUT_COLOR1_EXT 0x879C
17460+#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D
17461+#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E
17462+#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F
17463+#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0
17464+#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1
17465+#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2
17466+#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3
17467+#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4
17468+#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5
17469+#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6
17470+#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7
17471+#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8
17472+#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9
17473+#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA
17474+#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB
17475+#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC
17476+#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD
17477+#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE
17478+#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF
17479+#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0
17480+#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1
17481+#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2
17482+#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3
17483+#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4
17484+#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5
17485+#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6
17486+#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7
17487+#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8
17488+#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9
17489+#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA
17490+#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB
17491+#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC
17492+#define GL_OUTPUT_FOG_EXT 0x87BD
17493+#define GL_SCALAR_EXT 0x87BE
17494+#define GL_VECTOR_EXT 0x87BF
17495+#define GL_MATRIX_EXT 0x87C0
17496+#define GL_VARIANT_EXT 0x87C1
17497+#define GL_INVARIANT_EXT 0x87C2
17498+#define GL_LOCAL_CONSTANT_EXT 0x87C3
17499+#define GL_LOCAL_EXT 0x87C4
17500+#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5
17501+#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6
17502+#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7
17503+#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8
17504+#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9
17505+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA
17506+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB
17507+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC
17508+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD
17509+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE
17510+#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF
17511+#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0
17512+#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1
17513+#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2
17514+#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3
17515+#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4
17516+#define GL_X_EXT 0x87D5
17517+#define GL_Y_EXT 0x87D6
17518+#define GL_Z_EXT 0x87D7
17519+#define GL_W_EXT 0x87D8
17520+#define GL_NEGATIVE_X_EXT 0x87D9
17521+#define GL_NEGATIVE_Y_EXT 0x87DA
17522+#define GL_NEGATIVE_Z_EXT 0x87DB
17523+#define GL_NEGATIVE_W_EXT 0x87DC
17524+#define GL_ZERO_EXT 0x87DD
17525+#define GL_ONE_EXT 0x87DE
17526+#define GL_NEGATIVE_ONE_EXT 0x87DF
17527+#define GL_NORMALIZED_RANGE_EXT 0x87E0
17528+#define GL_FULL_RANGE_EXT 0x87E1
17529+#define GL_CURRENT_VERTEX_EXT 0x87E2
17530+#define GL_MVP_MATRIX_EXT 0x87E3
17531+#define GL_VARIANT_VALUE_EXT 0x87E4
17532+#define GL_VARIANT_DATATYPE_EXT 0x87E5
17533+#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6
17534+#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7
17535+#define GL_VARIANT_ARRAY_EXT 0x87E8
17536+#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9
17537+#define GL_INVARIANT_VALUE_EXT 0x87EA
17538+#define GL_INVARIANT_DATATYPE_EXT 0x87EB
17539+#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC
17540+#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED
17541+#endif
17542+
17543+#ifndef GL_ATI_vertex_streams
17544+#define GL_MAX_VERTEX_STREAMS_ATI 0x876B
17545+#define GL_VERTEX_STREAM0_ATI 0x876C
17546+#define GL_VERTEX_STREAM1_ATI 0x876D
17547+#define GL_VERTEX_STREAM2_ATI 0x876E
17548+#define GL_VERTEX_STREAM3_ATI 0x876F
17549+#define GL_VERTEX_STREAM4_ATI 0x8770
17550+#define GL_VERTEX_STREAM5_ATI 0x8771
17551+#define GL_VERTEX_STREAM6_ATI 0x8772
17552+#define GL_VERTEX_STREAM7_ATI 0x8773
17553+#define GL_VERTEX_SOURCE_ATI 0x8774
17554+#endif
17555+
17556+#ifndef GL_ATI_element_array
17557+#define GL_ELEMENT_ARRAY_ATI 0x8768
17558+#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769
17559+#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A
17560+#endif
17561+
17562+#ifndef GL_SUN_mesh_array
17563+#define GL_QUAD_MESH_SUN 0x8614
17564+#define GL_TRIANGLE_MESH_SUN 0x8615
17565+#endif
17566+
17567+#ifndef GL_SUN_slice_accum
17568+#define GL_SLICE_ACCUM_SUN 0x85CC
17569+#endif
17570+
17571+#ifndef GL_NV_multisample_filter_hint
17572+#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534
17573+#endif
17574+
17575+#ifndef GL_NV_depth_clamp
17576+#define GL_DEPTH_CLAMP_NV 0x864F
17577+#endif
17578+
17579+#ifndef GL_NV_occlusion_query
17580+#define GL_PIXEL_COUNTER_BITS_NV 0x8864
17581+#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865
17582+#define GL_PIXEL_COUNT_NV 0x8866
17583+#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867
17584+#endif
17585+
17586+#ifndef GL_NV_point_sprite
17587+#define GL_POINT_SPRITE_NV 0x8861
17588+#define GL_COORD_REPLACE_NV 0x8862
17589+#define GL_POINT_SPRITE_R_MODE_NV 0x8863
17590+#endif
17591+
17592+#ifndef GL_NV_texture_shader3
17593+#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850
17594+#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851
17595+#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852
17596+#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853
17597+#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854
17598+#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855
17599+#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856
17600+#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857
17601+#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858
17602+#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859
17603+#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A
17604+#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B
17605+#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C
17606+#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D
17607+#define GL_HILO8_NV 0x885E
17608+#define GL_SIGNED_HILO8_NV 0x885F
17609+#define GL_FORCE_BLUE_TO_ONE_NV 0x8860
17610+#endif
17611+
17612+#ifndef GL_NV_vertex_program1_1
17613+#endif
17614+
17615+#ifndef GL_EXT_shadow_funcs
17616+#endif
17617+
17618+#ifndef GL_EXT_stencil_two_side
17619+#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910
17620+#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911
17621+#endif
17622+
17623+#ifndef GL_ATI_text_fragment_shader
17624+#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200
17625+#endif
17626+
17627+#ifndef GL_APPLE_client_storage
17628+#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2
17629+#endif
17630+
17631+#ifndef GL_APPLE_element_array
17632+#define GL_ELEMENT_ARRAY_APPLE 0x8768
17633+#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8769
17634+#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x876A
17635+#endif
17636+
17637+#ifndef GL_APPLE_fence
17638+#define GL_DRAW_PIXELS_APPLE 0x8A0A
17639+#define GL_FENCE_APPLE 0x8A0B
17640+#endif
17641+
17642+#ifndef GL_APPLE_vertex_array_object
17643+#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5
17644+#endif
17645+
17646+#ifndef GL_APPLE_vertex_array_range
17647+#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D
17648+#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E
17649+#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F
17650+#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521
17651+#define GL_STORAGE_CACHED_APPLE 0x85BE
17652+#define GL_STORAGE_SHARED_APPLE 0x85BF
17653+#endif
17654+
17655+#ifndef GL_APPLE_ycbcr_422
17656+#define GL_YCBCR_422_APPLE 0x85B9
17657+#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
17658+#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
17659+#endif
17660+
17661+#ifndef GL_S3_s3tc
17662+#define GL_RGB_S3TC 0x83A0
17663+#define GL_RGB4_S3TC 0x83A1
17664+#define GL_RGBA_S3TC 0x83A2
17665+#define GL_RGBA4_S3TC 0x83A3
17666+#endif
17667+
17668+#ifndef GL_ATI_draw_buffers
17669+#define GL_MAX_DRAW_BUFFERS_ATI 0x8824
17670+#define GL_DRAW_BUFFER0_ATI 0x8825
17671+#define GL_DRAW_BUFFER1_ATI 0x8826
17672+#define GL_DRAW_BUFFER2_ATI 0x8827
17673+#define GL_DRAW_BUFFER3_ATI 0x8828
17674+#define GL_DRAW_BUFFER4_ATI 0x8829
17675+#define GL_DRAW_BUFFER5_ATI 0x882A
17676+#define GL_DRAW_BUFFER6_ATI 0x882B
17677+#define GL_DRAW_BUFFER7_ATI 0x882C
17678+#define GL_DRAW_BUFFER8_ATI 0x882D
17679+#define GL_DRAW_BUFFER9_ATI 0x882E
17680+#define GL_DRAW_BUFFER10_ATI 0x882F
17681+#define GL_DRAW_BUFFER11_ATI 0x8830
17682+#define GL_DRAW_BUFFER12_ATI 0x8831
17683+#define GL_DRAW_BUFFER13_ATI 0x8832
17684+#define GL_DRAW_BUFFER14_ATI 0x8833
17685+#define GL_DRAW_BUFFER15_ATI 0x8834
17686+#endif
17687+
17688+#ifndef GL_ATI_pixel_format_float
17689+#define GL_TYPE_RGBA_FLOAT_ATI 0x8820
17690+#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
17691+#endif
17692+
17693+#ifndef GL_ATI_texture_env_combine3
17694+#define GL_MODULATE_ADD_ATI 0x8744
17695+#define GL_MODULATE_SIGNED_ADD_ATI 0x8745
17696+#define GL_MODULATE_SUBTRACT_ATI 0x8746
17697+#endif
17698+
17699+#ifndef GL_ATI_texture_float
17700+#define GL_RGBA_FLOAT32_ATI 0x8814
17701+#define GL_RGB_FLOAT32_ATI 0x8815
17702+#define GL_ALPHA_FLOAT32_ATI 0x8816
17703+#define GL_INTENSITY_FLOAT32_ATI 0x8817
17704+#define GL_LUMINANCE_FLOAT32_ATI 0x8818
17705+#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819
17706+#define GL_RGBA_FLOAT16_ATI 0x881A
17707+#define GL_RGB_FLOAT16_ATI 0x881B
17708+#define GL_ALPHA_FLOAT16_ATI 0x881C
17709+#define GL_INTENSITY_FLOAT16_ATI 0x881D
17710+#define GL_LUMINANCE_FLOAT16_ATI 0x881E
17711+#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F
17712+#endif
17713+
17714+#ifndef GL_NV_float_buffer
17715+#define GL_FLOAT_R_NV 0x8880
17716+#define GL_FLOAT_RG_NV 0x8881
17717+#define GL_FLOAT_RGB_NV 0x8882
17718+#define GL_FLOAT_RGBA_NV 0x8883
17719+#define GL_FLOAT_R16_NV 0x8884
17720+#define GL_FLOAT_R32_NV 0x8885
17721+#define GL_FLOAT_RG16_NV 0x8886
17722+#define GL_FLOAT_RG32_NV 0x8887
17723+#define GL_FLOAT_RGB16_NV 0x8888
17724+#define GL_FLOAT_RGB32_NV 0x8889
17725+#define GL_FLOAT_RGBA16_NV 0x888A
17726+#define GL_FLOAT_RGBA32_NV 0x888B
17727+#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C
17728+#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D
17729+#define GL_FLOAT_RGBA_MODE_NV 0x888E
17730+#endif
17731+
17732+#ifndef GL_NV_fragment_program
17733+#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868
17734+#define GL_FRAGMENT_PROGRAM_NV 0x8870
17735+#define GL_MAX_TEXTURE_COORDS_NV 0x8871
17736+#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872
17737+#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873
17738+#define GL_PROGRAM_ERROR_STRING_NV 0x8874
17739+#endif
17740+
17741+#ifndef GL_NV_half_float
17742+#define GL_HALF_FLOAT_NV 0x140B
17743+#endif
17744+
17745+#ifndef GL_NV_pixel_data_range
17746+#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878
17747+#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879
17748+#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A
17749+#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B
17750+#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C
17751+#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D
17752+#endif
17753+
17754+#ifndef GL_NV_primitive_restart
17755+#define GL_PRIMITIVE_RESTART_NV 0x8558
17756+#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559
17757+#endif
17758+
17759+#ifndef GL_NV_texture_expand_normal
17760+#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F
17761+#endif
17762+
17763+#ifndef GL_NV_vertex_program2
17764+#endif
17765+
17766+#ifndef GL_ATI_map_object_buffer
17767+#endif
17768+
17769+#ifndef GL_ATI_separate_stencil
17770+#define GL_STENCIL_BACK_FUNC_ATI 0x8800
17771+#define GL_STENCIL_BACK_FAIL_ATI 0x8801
17772+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802
17773+#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803
17774+#endif
17775+
17776+#ifndef GL_ATI_vertex_attrib_array_object
17777+#endif
17778+
17779+#ifndef GL_OES_read_format
17780+#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
17781+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
17782+#endif
17783+
17784+#ifndef GL_EXT_depth_bounds_test
17785+#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890
17786+#define GL_DEPTH_BOUNDS_EXT 0x8891
17787+#endif
17788+
17789+#ifndef GL_EXT_texture_mirror_clamp
17790+#define GL_MIRROR_CLAMP_EXT 0x8742
17791+#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743
17792+#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912
17793+#endif
17794+
17795+#ifndef GL_EXT_blend_equation_separate
17796+#define GL_BLEND_EQUATION_RGB_EXT GL_BLEND_EQUATION
17797+#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D
17798+#endif
17799+
17800+#ifndef GL_MESA_pack_invert
17801+#define GL_PACK_INVERT_MESA 0x8758
17802+#endif
17803+
17804+#ifndef GL_MESA_ycbcr_texture
17805+#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA
17806+#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB
17807+#define GL_YCBCR_MESA 0x8757
17808+#endif
17809+
17810+#ifndef GL_EXT_pixel_buffer_object
17811+#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB
17812+#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC
17813+#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED
17814+#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF
17815+#endif
17816+
17817+#ifndef GL_NV_fragment_program_option
17818+#endif
17819+
17820+#ifndef GL_NV_fragment_program2
17821+#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4
17822+#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5
17823+#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6
17824+#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7
17825+#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8
17826+#endif
17827+
17828+#ifndef GL_NV_vertex_program2_option
17829+/* reuse GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
17830+/* reuse GL_MAX_PROGRAM_CALL_DEPTH_NV */
17831+#endif
17832+
17833+#ifndef GL_NV_vertex_program3
17834+/* reuse GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
17835+#endif
17836+
17837+#ifndef GL_EXT_framebuffer_object
17838+#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
17839+#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8
17840+#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6
17841+#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7
17842+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
17843+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
17844+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
17845+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
17846+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
17847+#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
17848+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
17849+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
17850+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
17851+#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
17852+#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
17853+#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
17854+#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD
17855+#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
17856+#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
17857+#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
17858+#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
17859+#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
17860+#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
17861+#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
17862+#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
17863+#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
17864+#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
17865+#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
17866+#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
17867+#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
17868+#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
17869+#define GL_COLOR_ATTACHMENT13_EXT 0x8CED
17870+#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
17871+#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
17872+#define GL_DEPTH_ATTACHMENT_EXT 0x8D00
17873+#define GL_STENCIL_ATTACHMENT_EXT 0x8D20
17874+#define GL_FRAMEBUFFER_EXT 0x8D40
17875+#define GL_RENDERBUFFER_EXT 0x8D41
17876+#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42
17877+#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43
17878+#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
17879+#define GL_STENCIL_INDEX1_EXT 0x8D46
17880+#define GL_STENCIL_INDEX4_EXT 0x8D47
17881+#define GL_STENCIL_INDEX8_EXT 0x8D48
17882+#define GL_STENCIL_INDEX16_EXT 0x8D49
17883+#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50
17884+#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51
17885+#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52
17886+#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53
17887+#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54
17888+#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55
17889+#endif
17890+
17891+#ifndef GL_GREMEDY_string_marker
17892+#endif
17893+
17894+#ifndef GL_EXT_packed_depth_stencil
17895+#define GL_DEPTH_STENCIL_EXT 0x84F9
17896+#define GL_UNSIGNED_INT_24_8_EXT 0x84FA
17897+#define GL_DEPTH24_STENCIL8_EXT 0x88F0
17898+#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1
17899+#endif
17900+
17901+#ifndef GL_EXT_stencil_clear_tag
17902+#define GL_STENCIL_TAG_BITS_EXT 0x88F2
17903+#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3
17904+#endif
17905+
17906+#ifndef GL_EXT_texture_sRGB
17907+#define GL_SRGB_EXT 0x8C40
17908+#define GL_SRGB8_EXT 0x8C41
17909+#define GL_SRGB_ALPHA_EXT 0x8C42
17910+#define GL_SRGB8_ALPHA8_EXT 0x8C43
17911+#define GL_SLUMINANCE_ALPHA_EXT 0x8C44
17912+#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45
17913+#define GL_SLUMINANCE_EXT 0x8C46
17914+#define GL_SLUMINANCE8_EXT 0x8C47
17915+#define GL_COMPRESSED_SRGB_EXT 0x8C48
17916+#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49
17917+#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A
17918+#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B
17919+#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
17920+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
17921+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
17922+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
17923+#endif
17924+
17925+#ifndef GL_EXT_framebuffer_blit
17926+#define GL_READ_FRAMEBUFFER_EXT 0x8CA8
17927+#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
17928+#define GL_READ_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT
17929+#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CAA
17930+#endif
17931+
17932+#ifndef GL_EXT_framebuffer_multisample
17933+#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
17934+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
17935+#define GL_MAX_SAMPLES_EXT 0x8D57
17936+#endif
17937+
17938+#ifndef GL_MESAX_texture_stack
17939+#define GL_TEXTURE_1D_STACK_MESAX 0x8759
17940+#define GL_TEXTURE_2D_STACK_MESAX 0x875A
17941+#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B
17942+#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C
17943+#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D
17944+#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E
17945+#endif
17946+
17947+#ifndef GL_EXT_timer_query
17948+#define GL_TIME_ELAPSED_EXT 0x88BF
17949+#endif
17950+
17951+#ifndef GL_EXT_gpu_program_parameters
17952+#endif
17953+
17954+#ifndef GL_APPLE_flush_buffer_range
17955+#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12
17956+#define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13
17957+#endif
17958+
17959+#ifndef GL_NV_gpu_program4
17960+#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904
17961+#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905
17962+#define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906
17963+#define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907
17964+#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908
17965+#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909
17966+#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5
17967+#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6
17968+#endif
17969+
17970+#ifndef GL_NV_geometry_program4
17971+#define GL_LINES_ADJACENCY_EXT 0x000A
17972+#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B
17973+#define GL_TRIANGLES_ADJACENCY_EXT 0x000C
17974+#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D
17975+#define GL_GEOMETRY_PROGRAM_NV 0x8C26
17976+#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27
17977+#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28
17978+#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA
17979+#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB
17980+#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC
17981+#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
17982+#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
17983+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
17984+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9
17985+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
17986+#define GL_PROGRAM_POINT_SIZE_EXT 0x8642
17987+#endif
17988+
17989+#ifndef GL_EXT_geometry_shader4
17990+#define GL_GEOMETRY_SHADER_EXT 0x8DD9
17991+/* reuse GL_GEOMETRY_VERTICES_OUT_EXT */
17992+/* reuse GL_GEOMETRY_INPUT_TYPE_EXT */
17993+/* reuse GL_GEOMETRY_OUTPUT_TYPE_EXT */
17994+/* reuse GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT */
17995+#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD
17996+#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE
17997+#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B
17998+#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
17999+#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
18000+#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
18001+/* reuse GL_LINES_ADJACENCY_EXT */
18002+/* reuse GL_LINE_STRIP_ADJACENCY_EXT */
18003+/* reuse GL_TRIANGLES_ADJACENCY_EXT */
18004+/* reuse GL_TRIANGLE_STRIP_ADJACENCY_EXT */
18005+/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT */
18006+/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT */
18007+/* reuse GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT */
18008+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
18009+/* reuse GL_PROGRAM_POINT_SIZE_EXT */
18010+#endif
18011+
18012+#ifndef GL_NV_vertex_program4
18013+#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD
18014+#endif
18015+
18016+#ifndef GL_EXT_gpu_shader4
18017+#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0
18018+#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1
18019+#define GL_SAMPLER_BUFFER_EXT 0x8DC2
18020+#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3
18021+#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4
18022+#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5
18023+#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6
18024+#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7
18025+#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8
18026+#define GL_INT_SAMPLER_1D_EXT 0x8DC9
18027+#define GL_INT_SAMPLER_2D_EXT 0x8DCA
18028+#define GL_INT_SAMPLER_3D_EXT 0x8DCB
18029+#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC
18030+#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD
18031+#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE
18032+#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF
18033+#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0
18034+#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1
18035+#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2
18036+#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3
18037+#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4
18038+#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5
18039+#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6
18040+#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7
18041+#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8
18042+#endif
18043+
18044+#ifndef GL_EXT_draw_instanced
18045+#endif
18046+
18047+#ifndef GL_EXT_packed_float
18048+#define GL_R11F_G11F_B10F_EXT 0x8C3A
18049+#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B
18050+#define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C
18051+#endif
18052+
18053+#ifndef GL_EXT_texture_array
18054+#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18
18055+#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19
18056+#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A
18057+#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B
18058+#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C
18059+#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D
18060+#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF
18061+#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E
18062+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
18063+#endif
18064+
18065+#ifndef GL_EXT_texture_buffer_object
18066+#define GL_TEXTURE_BUFFER_EXT 0x8C2A
18067+#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B
18068+#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C
18069+#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D
18070+#define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E
18071+#endif
18072+
18073+#ifndef GL_EXT_texture_compression_latc
18074+#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70
18075+#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71
18076+#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72
18077+#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73
18078+#endif
18079+
18080+#ifndef GL_EXT_texture_compression_rgtc
18081+#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB
18082+#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC
18083+#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD
18084+#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE
18085+#endif
18086+
18087+#ifndef GL_EXT_texture_shared_exponent
18088+#define GL_RGB9_E5_EXT 0x8C3D
18089+#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E
18090+#define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F
18091+#endif
18092+
18093+#ifndef GL_NV_depth_buffer_float
18094+#define GL_DEPTH_COMPONENT32F_NV 0x8DAB
18095+#define GL_DEPTH32F_STENCIL8_NV 0x8DAC
18096+#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD
18097+#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF
18098+#endif
18099+
18100+#ifndef GL_NV_fragment_program4
18101+#endif
18102+
18103+#ifndef GL_NV_framebuffer_multisample_coverage
18104+#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB
18105+#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10
18106+#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11
18107+#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12
18108+#endif
18109+
18110+#ifndef GL_EXT_framebuffer_sRGB
18111+#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9
18112+#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA
18113+#endif
18114+
18115+#ifndef GL_NV_geometry_shader4
18116+#endif
18117+
18118+#ifndef GL_NV_parameter_buffer_object
18119+#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0
18120+#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1
18121+#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2
18122+#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3
18123+#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4
18124+#endif
18125+
18126+#ifndef GL_EXT_draw_buffers2
18127+#endif
18128+
18129+#ifndef GL_NV_transform_feedback
18130+#define GL_BACK_PRIMARY_COLOR_NV 0x8C77
18131+#define GL_BACK_SECONDARY_COLOR_NV 0x8C78
18132+#define GL_TEXTURE_COORD_NV 0x8C79
18133+#define GL_CLIP_DISTANCE_NV 0x8C7A
18134+#define GL_VERTEX_ID_NV 0x8C7B
18135+#define GL_PRIMITIVE_ID_NV 0x8C7C
18136+#define GL_GENERIC_ATTRIB_NV 0x8C7D
18137+#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E
18138+#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F
18139+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80
18140+#define GL_ACTIVE_VARYINGS_NV 0x8C81
18141+#define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82
18142+#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83
18143+#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84
18144+#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85
18145+#define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86
18146+#define GL_PRIMITIVES_GENERATED_NV 0x8C87
18147+#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88
18148+#define GL_RASTERIZER_DISCARD_NV 0x8C89
18149+#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_ATTRIBS_NV 0x8C8A
18150+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B
18151+#define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C
18152+#define GL_SEPARATE_ATTRIBS_NV 0x8C8D
18153+#define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E
18154+#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F
18155+#endif
18156+
18157+#ifndef GL_EXT_bindable_uniform
18158+#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2
18159+#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3
18160+#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4
18161+#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED
18162+#define GL_UNIFORM_BUFFER_EXT 0x8DEE
18163+#define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF
18164+#endif
18165+
18166+#ifndef GL_EXT_texture_integer
18167+#define GL_RGBA32UI_EXT 0x8D70
18168+#define GL_RGB32UI_EXT 0x8D71
18169+#define GL_ALPHA32UI_EXT 0x8D72
18170+#define GL_INTENSITY32UI_EXT 0x8D73
18171+#define GL_LUMINANCE32UI_EXT 0x8D74
18172+#define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75
18173+#define GL_RGBA16UI_EXT 0x8D76
18174+#define GL_RGB16UI_EXT 0x8D77
18175+#define GL_ALPHA16UI_EXT 0x8D78
18176+#define GL_INTENSITY16UI_EXT 0x8D79
18177+#define GL_LUMINANCE16UI_EXT 0x8D7A
18178+#define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B
18179+#define GL_RGBA8UI_EXT 0x8D7C
18180+#define GL_RGB8UI_EXT 0x8D7D
18181+#define GL_ALPHA8UI_EXT 0x8D7E
18182+#define GL_INTENSITY8UI_EXT 0x8D7F
18183+#define GL_LUMINANCE8UI_EXT 0x8D80
18184+#define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81
18185+#define GL_RGBA32I_EXT 0x8D82
18186+#define GL_RGB32I_EXT 0x8D83
18187+#define GL_ALPHA32I_EXT 0x8D84
18188+#define GL_INTENSITY32I_EXT 0x8D85
18189+#define GL_LUMINANCE32I_EXT 0x8D86
18190+#define GL_LUMINANCE_ALPHA32I_EXT 0x8D87
18191+#define GL_RGBA16I_EXT 0x8D88
18192+#define GL_RGB16I_EXT 0x8D89
18193+#define GL_ALPHA16I_EXT 0x8D8A
18194+#define GL_INTENSITY16I_EXT 0x8D8B
18195+#define GL_LUMINANCE16I_EXT 0x8D8C
18196+#define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D
18197+#define GL_RGBA8I_EXT 0x8D8E
18198+#define GL_RGB8I_EXT 0x8D8F
18199+#define GL_ALPHA8I_EXT 0x8D90
18200+#define GL_INTENSITY8I_EXT 0x8D91
18201+#define GL_LUMINANCE8I_EXT 0x8D92
18202+#define GL_LUMINANCE_ALPHA8I_EXT 0x8D93
18203+#define GL_RED_INTEGER_EXT 0x8D94
18204+#define GL_GREEN_INTEGER_EXT 0x8D95
18205+#define GL_BLUE_INTEGER_EXT 0x8D96
18206+#define GL_ALPHA_INTEGER_EXT 0x8D97
18207+#define GL_RGB_INTEGER_EXT 0x8D98
18208+#define GL_RGBA_INTEGER_EXT 0x8D99
18209+#define GL_BGR_INTEGER_EXT 0x8D9A
18210+#define GL_BGRA_INTEGER_EXT 0x8D9B
18211+#define GL_LUMINANCE_INTEGER_EXT 0x8D9C
18212+#define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D
18213+#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E
18214+#endif
18215+
18216+
18217+/*************************************************************/
18218+
18219+#include <stddef.h>
18220+#ifndef GL_VERSION_2_0
18221+/* GL type for program/shader text */
18222+typedef char GLchar; /* native character */
18223+#endif
18224+
18225+#ifndef GL_VERSION_1_5
18226+/* GL types for handling large vertex buffer objects */
18227+typedef ptrdiff_t GLintptr;
18228+typedef ptrdiff_t GLsizeiptr;
18229+#endif
18230+
18231+#ifndef GL_ARB_vertex_buffer_object
18232+/* GL types for handling large vertex buffer objects */
18233+typedef ptrdiff_t GLintptrARB;
18234+typedef ptrdiff_t GLsizeiptrARB;
18235+#endif
18236+
18237+#ifndef GL_ARB_shader_objects
18238+/* GL types for handling shader object handles and program/shader text */
18239+typedef char GLcharARB; /* native character */
18240+typedef unsigned int GLhandleARB; /* shader object handle */
18241+#endif
18242+
18243+/* GL types for "half" precision (s10e5) float data in host memory */
18244+#ifndef GL_ARB_half_float_pixel
18245+typedef unsigned short GLhalfARB;
18246+#endif
18247+
18248+#ifndef GL_NV_half_float
18249+typedef unsigned short GLhalfNV;
18250+#endif
18251+
18252+#ifndef GLEXT_64_TYPES_DEFINED
18253+/* This code block is duplicated in glext.h, so must be protected */
18254+#define GLEXT_64_TYPES_DEFINED
18255+/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
18256+/* (as used in the GL_EXT_timer_query extension). */
18257+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
18258+#include <inttypes.h>
18259+#elif defined(__sun__)
18260+#include <inttypes.h>
18261+#if defined(__STDC__)
18262+#if defined(__arch64__)
18263+typedef long int int64_t;
18264+typedef unsigned long int uint64_t;
18265+#else
18266+typedef long long int int64_t;
18267+typedef unsigned long long int uint64_t;
18268+#endif /* __arch64__ */
18269+#endif /* __STDC__ */
18270+#elif defined( __VMS )
18271+#include <inttypes.h>
18272+#elif defined(__SCO__) || defined(__USLC__)
18273+#include <stdint.h>
18274+#elif defined(__UNIXOS2__) || defined(__SOL64__)
18275+typedef long int int32_t;
18276+typedef long long int int64_t;
18277+typedef unsigned long long int uint64_t;
18278+#elif defined(_WIN32) && defined(__GNUC__)
18279+#include <stdint.h>
18280+#elif defined(_WIN32)
18281+typedef __int32 int32_t;
18282+typedef __int64 int64_t;
18283+typedef unsigned __int64 uint64_t;
18284+#else
18285+#include <inttypes.h> /* Fallback option */
18286+#endif
18287+#endif
18288+
18289+#ifndef GL_EXT_timer_query
18290+typedef int64_t GLint64EXT;
18291+typedef uint64_t GLuint64EXT;
18292+#endif
18293+
18294+#ifndef GL_VERSION_1_2
18295+#define GL_VERSION_1_2 1
18296+#ifdef GL_GLEXT_PROTOTYPES
18297+GLAPI void APIENTRY glBlendColor (GLclampf, GLclampf, GLclampf, GLclampf);
18298+GLAPI void APIENTRY glBlendEquation (GLenum);
18299+GLAPI void APIENTRY glDrawRangeElements (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
18300+GLAPI void APIENTRY glColorTable (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
18301+GLAPI void APIENTRY glColorTableParameterfv (GLenum, GLenum, const GLfloat *);
18302+GLAPI void APIENTRY glColorTableParameteriv (GLenum, GLenum, const GLint *);
18303+GLAPI void APIENTRY glCopyColorTable (GLenum, GLenum, GLint, GLint, GLsizei);
18304+GLAPI void APIENTRY glGetColorTable (GLenum, GLenum, GLenum, GLvoid *);
18305+GLAPI void APIENTRY glGetColorTableParameterfv (GLenum, GLenum, GLfloat *);
18306+GLAPI void APIENTRY glGetColorTableParameteriv (GLenum, GLenum, GLint *);
18307+GLAPI void APIENTRY glColorSubTable (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
18308+GLAPI void APIENTRY glCopyColorSubTable (GLenum, GLsizei, GLint, GLint, GLsizei);
18309+GLAPI void APIENTRY glConvolutionFilter1D (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
18310+GLAPI void APIENTRY glConvolutionFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
18311+GLAPI void APIENTRY glConvolutionParameterf (GLenum, GLenum, GLfloat);
18312+GLAPI void APIENTRY glConvolutionParameterfv (GLenum, GLenum, const GLfloat *);
18313+GLAPI void APIENTRY glConvolutionParameteri (GLenum, GLenum, GLint);
18314+GLAPI void APIENTRY glConvolutionParameteriv (GLenum, GLenum, const GLint *);
18315+GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum, GLenum, GLint, GLint, GLsizei);
18316+GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
18317+GLAPI void APIENTRY glGetConvolutionFilter (GLenum, GLenum, GLenum, GLvoid *);
18318+GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum, GLenum, GLfloat *);
18319+GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum, GLenum, GLint *);
18320+GLAPI void APIENTRY glGetSeparableFilter (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
18321+GLAPI void APIENTRY glSeparableFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
18322+GLAPI void APIENTRY glGetHistogram (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
18323+GLAPI void APIENTRY glGetHistogramParameterfv (GLenum, GLenum, GLfloat *);
18324+GLAPI void APIENTRY glGetHistogramParameteriv (GLenum, GLenum, GLint *);
18325+GLAPI void APIENTRY glGetMinmax (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
18326+GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum, GLenum, GLfloat *);
18327+GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum, GLenum, GLint *);
18328+GLAPI void APIENTRY glHistogram (GLenum, GLsizei, GLenum, GLboolean);
18329+GLAPI void APIENTRY glMinmax (GLenum, GLenum, GLboolean);
18330+GLAPI void APIENTRY glResetHistogram (GLenum);
18331+GLAPI void APIENTRY glResetMinmax (GLenum);
18332+GLAPI void APIENTRY glTexImage3D (GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
18333+GLAPI void APIENTRY glTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
18334+GLAPI void APIENTRY glCopyTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
18335+#endif /* GL_GLEXT_PROTOTYPES */
18336+typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
18337+typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
18338+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
18339+typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
18340+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
18341+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
18342+typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
18343+typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
18344+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
18345+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18346+typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
18347+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
18348+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
18349+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
18350+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
18351+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
18352+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
18353+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
18354+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
18355+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
18356+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
18357+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
18358+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18359+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
18360+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
18361+typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
18362+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
18363+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18364+typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
18365+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
18366+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18367+typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
18368+typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
18369+typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
18370+typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
18371+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);
18372+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);
18373+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
18374+#endif
18375+
18376+#ifndef GL_VERSION_1_3
18377+#define GL_VERSION_1_3 1
18378+#ifdef GL_GLEXT_PROTOTYPES
18379+GLAPI void APIENTRY glActiveTexture (GLenum);
18380+GLAPI void APIENTRY glClientActiveTexture (GLenum);
18381+GLAPI void APIENTRY glMultiTexCoord1d (GLenum, GLdouble);
18382+GLAPI void APIENTRY glMultiTexCoord1dv (GLenum, const GLdouble *);
18383+GLAPI void APIENTRY glMultiTexCoord1f (GLenum, GLfloat);
18384+GLAPI void APIENTRY glMultiTexCoord1fv (GLenum, const GLfloat *);
18385+GLAPI void APIENTRY glMultiTexCoord1i (GLenum, GLint);
18386+GLAPI void APIENTRY glMultiTexCoord1iv (GLenum, const GLint *);
18387+GLAPI void APIENTRY glMultiTexCoord1s (GLenum, GLshort);
18388+GLAPI void APIENTRY glMultiTexCoord1sv (GLenum, const GLshort *);
18389+GLAPI void APIENTRY glMultiTexCoord2d (GLenum, GLdouble, GLdouble);
18390+GLAPI void APIENTRY glMultiTexCoord2dv (GLenum, const GLdouble *);
18391+GLAPI void APIENTRY glMultiTexCoord2f (GLenum, GLfloat, GLfloat);
18392+GLAPI void APIENTRY glMultiTexCoord2fv (GLenum, const GLfloat *);
18393+GLAPI void APIENTRY glMultiTexCoord2i (GLenum, GLint, GLint);
18394+GLAPI void APIENTRY glMultiTexCoord2iv (GLenum, const GLint *);
18395+GLAPI void APIENTRY glMultiTexCoord2s (GLenum, GLshort, GLshort);
18396+GLAPI void APIENTRY glMultiTexCoord2sv (GLenum, const GLshort *);
18397+GLAPI void APIENTRY glMultiTexCoord3d (GLenum, GLdouble, GLdouble, GLdouble);
18398+GLAPI void APIENTRY glMultiTexCoord3dv (GLenum, const GLdouble *);
18399+GLAPI void APIENTRY glMultiTexCoord3f (GLenum, GLfloat, GLfloat, GLfloat);
18400+GLAPI void APIENTRY glMultiTexCoord3fv (GLenum, const GLfloat *);
18401+GLAPI void APIENTRY glMultiTexCoord3i (GLenum, GLint, GLint, GLint);
18402+GLAPI void APIENTRY glMultiTexCoord3iv (GLenum, const GLint *);
18403+GLAPI void APIENTRY glMultiTexCoord3s (GLenum, GLshort, GLshort, GLshort);
18404+GLAPI void APIENTRY glMultiTexCoord3sv (GLenum, const GLshort *);
18405+GLAPI void APIENTRY glMultiTexCoord4d (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
18406+GLAPI void APIENTRY glMultiTexCoord4dv (GLenum, const GLdouble *);
18407+GLAPI void APIENTRY glMultiTexCoord4f (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
18408+GLAPI void APIENTRY glMultiTexCoord4fv (GLenum, const GLfloat *);
18409+GLAPI void APIENTRY glMultiTexCoord4i (GLenum, GLint, GLint, GLint, GLint);
18410+GLAPI void APIENTRY glMultiTexCoord4iv (GLenum, const GLint *);
18411+GLAPI void APIENTRY glMultiTexCoord4s (GLenum, GLshort, GLshort, GLshort, GLshort);
18412+GLAPI void APIENTRY glMultiTexCoord4sv (GLenum, const GLshort *);
18413+GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *);
18414+GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *);
18415+GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *);
18416+GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *);
18417+GLAPI void APIENTRY glSampleCoverage (GLclampf, GLboolean);
18418+GLAPI void APIENTRY glCompressedTexImage3D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
18419+GLAPI void APIENTRY glCompressedTexImage2D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
18420+GLAPI void APIENTRY glCompressedTexImage1D (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
18421+GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
18422+GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
18423+GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
18424+GLAPI void APIENTRY glGetCompressedTexImage (GLenum, GLint, GLvoid *);
18425+#endif /* GL_GLEXT_PROTOTYPES */
18426+typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
18427+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
18428+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
18429+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
18430+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
18431+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
18432+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
18433+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
18434+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
18435+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
18436+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
18437+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
18438+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
18439+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
18440+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
18441+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
18442+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
18443+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
18444+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
18445+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
18446+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
18447+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
18448+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
18449+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
18450+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
18451+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
18452+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
18453+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
18454+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
18455+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
18456+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
18457+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
18458+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
18459+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
18460+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
18461+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
18462+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
18463+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
18464+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
18465+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
18466+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
18467+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
18468+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);
18469+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
18470+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
18471+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img);
18472+#endif
18473+
18474+#ifndef GL_VERSION_1_4
18475+#define GL_VERSION_1_4 1
18476+#ifdef GL_GLEXT_PROTOTYPES
18477+GLAPI void APIENTRY glBlendFuncSeparate (GLenum, GLenum, GLenum, GLenum);
18478+GLAPI void APIENTRY glFogCoordf (GLfloat);
18479+GLAPI void APIENTRY glFogCoordfv (const GLfloat *);
18480+GLAPI void APIENTRY glFogCoordd (GLdouble);
18481+GLAPI void APIENTRY glFogCoorddv (const GLdouble *);
18482+GLAPI void APIENTRY glFogCoordPointer (GLenum, GLsizei, const GLvoid *);
18483+GLAPI void APIENTRY glMultiDrawArrays (GLenum, GLint *, GLsizei *, GLsizei);
18484+GLAPI void APIENTRY glMultiDrawElements (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
18485+GLAPI void APIENTRY glPointParameterf (GLenum, GLfloat);
18486+GLAPI void APIENTRY glPointParameterfv (GLenum, const GLfloat *);
18487+GLAPI void APIENTRY glPointParameteri (GLenum, GLint);
18488+GLAPI void APIENTRY glPointParameteriv (GLenum, const GLint *);
18489+GLAPI void APIENTRY glSecondaryColor3b (GLbyte, GLbyte, GLbyte);
18490+GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *);
18491+GLAPI void APIENTRY glSecondaryColor3d (GLdouble, GLdouble, GLdouble);
18492+GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *);
18493+GLAPI void APIENTRY glSecondaryColor3f (GLfloat, GLfloat, GLfloat);
18494+GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *);
18495+GLAPI void APIENTRY glSecondaryColor3i (GLint, GLint, GLint);
18496+GLAPI void APIENTRY glSecondaryColor3iv (const GLint *);
18497+GLAPI void APIENTRY glSecondaryColor3s (GLshort, GLshort, GLshort);
18498+GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *);
18499+GLAPI void APIENTRY glSecondaryColor3ub (GLubyte, GLubyte, GLubyte);
18500+GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *);
18501+GLAPI void APIENTRY glSecondaryColor3ui (GLuint, GLuint, GLuint);
18502+GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *);
18503+GLAPI void APIENTRY glSecondaryColor3us (GLushort, GLushort, GLushort);
18504+GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *);
18505+GLAPI void APIENTRY glSecondaryColorPointer (GLint, GLenum, GLsizei, const GLvoid *);
18506+GLAPI void APIENTRY glWindowPos2d (GLdouble, GLdouble);
18507+GLAPI void APIENTRY glWindowPos2dv (const GLdouble *);
18508+GLAPI void APIENTRY glWindowPos2f (GLfloat, GLfloat);
18509+GLAPI void APIENTRY glWindowPos2fv (const GLfloat *);
18510+GLAPI void APIENTRY glWindowPos2i (GLint, GLint);
18511+GLAPI void APIENTRY glWindowPos2iv (const GLint *);
18512+GLAPI void APIENTRY glWindowPos2s (GLshort, GLshort);
18513+GLAPI void APIENTRY glWindowPos2sv (const GLshort *);
18514+GLAPI void APIENTRY glWindowPos3d (GLdouble, GLdouble, GLdouble);
18515+GLAPI void APIENTRY glWindowPos3dv (const GLdouble *);
18516+GLAPI void APIENTRY glWindowPos3f (GLfloat, GLfloat, GLfloat);
18517+GLAPI void APIENTRY glWindowPos3fv (const GLfloat *);
18518+GLAPI void APIENTRY glWindowPos3i (GLint, GLint, GLint);
18519+GLAPI void APIENTRY glWindowPos3iv (const GLint *);
18520+GLAPI void APIENTRY glWindowPos3s (GLshort, GLshort, GLshort);
18521+GLAPI void APIENTRY glWindowPos3sv (const GLshort *);
18522+#endif /* GL_GLEXT_PROTOTYPES */
18523+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
18524+typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord);
18525+typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord);
18526+typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord);
18527+typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord);
18528+typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
18529+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
18530+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
18531+typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);
18532+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params);
18533+typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param);
18534+typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params);
18535+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue);
18536+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v);
18537+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue);
18538+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v);
18539+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue);
18540+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v);
18541+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue);
18542+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v);
18543+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue);
18544+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v);
18545+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue);
18546+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v);
18547+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue);
18548+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v);
18549+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue);
18550+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v);
18551+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
18552+typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y);
18553+typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v);
18554+typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y);
18555+typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v);
18556+typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y);
18557+typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v);
18558+typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y);
18559+typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v);
18560+typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z);
18561+typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v);
18562+typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z);
18563+typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v);
18564+typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z);
18565+typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v);
18566+typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z);
18567+typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v);
18568+#endif
18569+
18570+#ifndef GL_VERSION_1_5
18571+#define GL_VERSION_1_5 1
18572+#ifdef GL_GLEXT_PROTOTYPES
18573+GLAPI void APIENTRY glGenQueries (GLsizei, GLuint *);
18574+GLAPI void APIENTRY glDeleteQueries (GLsizei, const GLuint *);
18575+GLAPI GLboolean APIENTRY glIsQuery (GLuint);
18576+GLAPI void APIENTRY glBeginQuery (GLenum, GLuint);
18577+GLAPI void APIENTRY glEndQuery (GLenum);
18578+GLAPI void APIENTRY glGetQueryiv (GLenum, GLenum, GLint *);
18579+GLAPI void APIENTRY glGetQueryObjectiv (GLuint, GLenum, GLint *);
18580+GLAPI void APIENTRY glGetQueryObjectuiv (GLuint, GLenum, GLuint *);
18581+GLAPI void APIENTRY glBindBuffer (GLenum, GLuint);
18582+GLAPI void APIENTRY glDeleteBuffers (GLsizei, const GLuint *);
18583+GLAPI void APIENTRY glGenBuffers (GLsizei, GLuint *);
18584+GLAPI GLboolean APIENTRY glIsBuffer (GLuint);
18585+GLAPI void APIENTRY glBufferData (GLenum, GLsizeiptr, const GLvoid *, GLenum);
18586+GLAPI void APIENTRY glBufferSubData (GLenum, GLintptr, GLsizeiptr, const GLvoid *);
18587+GLAPI void APIENTRY glGetBufferSubData (GLenum, GLintptr, GLsizeiptr, GLvoid *);
18588+GLAPI GLvoid* APIENTRY glMapBuffer (GLenum, GLenum);
18589+GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum);
18590+GLAPI void APIENTRY glGetBufferParameteriv (GLenum, GLenum, GLint *);
18591+GLAPI void APIENTRY glGetBufferPointerv (GLenum, GLenum, GLvoid* *);
18592+#endif /* GL_GLEXT_PROTOTYPES */
18593+typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids);
18594+typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids);
18595+typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id);
18596+typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);
18597+typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target);
18598+typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params);
18599+typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params);
18600+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params);
18601+typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
18602+typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
18603+typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
18604+typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);
18605+typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
18606+typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
18607+typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data);
18608+typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
18609+typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target);
18610+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18611+typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params);
18612+#endif
18613+
18614+#ifndef GL_VERSION_2_0
18615+#define GL_VERSION_2_0 1
18616+#ifdef GL_GLEXT_PROTOTYPES
18617+GLAPI void APIENTRY glBlendEquationSeparate (GLenum, GLenum);
18618+GLAPI void APIENTRY glDrawBuffers (GLsizei, const GLenum *);
18619+GLAPI void APIENTRY glStencilOpSeparate (GLenum, GLenum, GLenum, GLenum);
18620+GLAPI void APIENTRY glStencilFuncSeparate (GLenum, GLenum, GLint, GLuint);
18621+GLAPI void APIENTRY glStencilMaskSeparate (GLenum, GLuint);
18622+GLAPI void APIENTRY glAttachShader (GLuint, GLuint);
18623+GLAPI void APIENTRY glBindAttribLocation (GLuint, GLuint, const GLchar *);
18624+GLAPI void APIENTRY glCompileShader (GLuint);
18625+GLAPI GLuint APIENTRY glCreateProgram (void);
18626+GLAPI GLuint APIENTRY glCreateShader (GLenum);
18627+GLAPI void APIENTRY glDeleteProgram (GLuint);
18628+GLAPI void APIENTRY glDeleteShader (GLuint);
18629+GLAPI void APIENTRY glDetachShader (GLuint, GLuint);
18630+GLAPI void APIENTRY glDisableVertexAttribArray (GLuint);
18631+GLAPI void APIENTRY glEnableVertexAttribArray (GLuint);
18632+GLAPI void APIENTRY glGetActiveAttrib (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
18633+GLAPI void APIENTRY glGetActiveUniform (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
18634+GLAPI void APIENTRY glGetAttachedShaders (GLuint, GLsizei, GLsizei *, GLuint *);
18635+GLAPI GLint APIENTRY glGetAttribLocation (GLuint, const GLchar *);
18636+GLAPI void APIENTRY glGetProgramiv (GLuint, GLenum, GLint *);
18637+GLAPI void APIENTRY glGetProgramInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
18638+GLAPI void APIENTRY glGetShaderiv (GLuint, GLenum, GLint *);
18639+GLAPI void APIENTRY glGetShaderInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
18640+GLAPI void APIENTRY glGetShaderSource (GLuint, GLsizei, GLsizei *, GLchar *);
18641+GLAPI GLint APIENTRY glGetUniformLocation (GLuint, const GLchar *);
18642+GLAPI void APIENTRY glGetUniformfv (GLuint, GLint, GLfloat *);
18643+GLAPI void APIENTRY glGetUniformiv (GLuint, GLint, GLint *);
18644+GLAPI void APIENTRY glGetVertexAttribdv (GLuint, GLenum, GLdouble *);
18645+GLAPI void APIENTRY glGetVertexAttribfv (GLuint, GLenum, GLfloat *);
18646+GLAPI void APIENTRY glGetVertexAttribiv (GLuint, GLenum, GLint *);
18647+GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint, GLenum, GLvoid* *);
18648+GLAPI GLboolean APIENTRY glIsProgram (GLuint);
18649+GLAPI GLboolean APIENTRY glIsShader (GLuint);
18650+GLAPI void APIENTRY glLinkProgram (GLuint);
18651+GLAPI void APIENTRY glShaderSource (GLuint, GLsizei, const GLchar* *, const GLint *);
18652+GLAPI void APIENTRY glUseProgram (GLuint);
18653+GLAPI void APIENTRY glUniform1f (GLint, GLfloat);
18654+GLAPI void APIENTRY glUniform2f (GLint, GLfloat, GLfloat);
18655+GLAPI void APIENTRY glUniform3f (GLint, GLfloat, GLfloat, GLfloat);
18656+GLAPI void APIENTRY glUniform4f (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
18657+GLAPI void APIENTRY glUniform1i (GLint, GLint);
18658+GLAPI void APIENTRY glUniform2i (GLint, GLint, GLint);
18659+GLAPI void APIENTRY glUniform3i (GLint, GLint, GLint, GLint);
18660+GLAPI void APIENTRY glUniform4i (GLint, GLint, GLint, GLint, GLint);
18661+GLAPI void APIENTRY glUniform1fv (GLint, GLsizei, const GLfloat *);
18662+GLAPI void APIENTRY glUniform2fv (GLint, GLsizei, const GLfloat *);
18663+GLAPI void APIENTRY glUniform3fv (GLint, GLsizei, const GLfloat *);
18664+GLAPI void APIENTRY glUniform4fv (GLint, GLsizei, const GLfloat *);
18665+GLAPI void APIENTRY glUniform1iv (GLint, GLsizei, const GLint *);
18666+GLAPI void APIENTRY glUniform2iv (GLint, GLsizei, const GLint *);
18667+GLAPI void APIENTRY glUniform3iv (GLint, GLsizei, const GLint *);
18668+GLAPI void APIENTRY glUniform4iv (GLint, GLsizei, const GLint *);
18669+GLAPI void APIENTRY glUniformMatrix2fv (GLint, GLsizei, GLboolean, const GLfloat *);
18670+GLAPI void APIENTRY glUniformMatrix3fv (GLint, GLsizei, GLboolean, const GLfloat *);
18671+GLAPI void APIENTRY glUniformMatrix4fv (GLint, GLsizei, GLboolean, const GLfloat *);
18672+GLAPI void APIENTRY glValidateProgram (GLuint);
18673+GLAPI void APIENTRY glVertexAttrib1d (GLuint, GLdouble);
18674+GLAPI void APIENTRY glVertexAttrib1dv (GLuint, const GLdouble *);
18675+GLAPI void APIENTRY glVertexAttrib1f (GLuint, GLfloat);
18676+GLAPI void APIENTRY glVertexAttrib1fv (GLuint, const GLfloat *);
18677+GLAPI void APIENTRY glVertexAttrib1s (GLuint, GLshort);
18678+GLAPI void APIENTRY glVertexAttrib1sv (GLuint, const GLshort *);
18679+GLAPI void APIENTRY glVertexAttrib2d (GLuint, GLdouble, GLdouble);
18680+GLAPI void APIENTRY glVertexAttrib2dv (GLuint, const GLdouble *);
18681+GLAPI void APIENTRY glVertexAttrib2f (GLuint, GLfloat, GLfloat);
18682+GLAPI void APIENTRY glVertexAttrib2fv (GLuint, const GLfloat *);
18683+GLAPI void APIENTRY glVertexAttrib2s (GLuint, GLshort, GLshort);
18684+GLAPI void APIENTRY glVertexAttrib2sv (GLuint, const GLshort *);
18685+GLAPI void APIENTRY glVertexAttrib3d (GLuint, GLdouble, GLdouble, GLdouble);
18686+GLAPI void APIENTRY glVertexAttrib3dv (GLuint, const GLdouble *);
18687+GLAPI void APIENTRY glVertexAttrib3f (GLuint, GLfloat, GLfloat, GLfloat);
18688+GLAPI void APIENTRY glVertexAttrib3fv (GLuint, const GLfloat *);
18689+GLAPI void APIENTRY glVertexAttrib3s (GLuint, GLshort, GLshort, GLshort);
18690+GLAPI void APIENTRY glVertexAttrib3sv (GLuint, const GLshort *);
18691+GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint, const GLbyte *);
18692+GLAPI void APIENTRY glVertexAttrib4Niv (GLuint, const GLint *);
18693+GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint, const GLshort *);
18694+GLAPI void APIENTRY glVertexAttrib4Nub (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
18695+GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint, const GLubyte *);
18696+GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint, const GLuint *);
18697+GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint, const GLushort *);
18698+GLAPI void APIENTRY glVertexAttrib4bv (GLuint, const GLbyte *);
18699+GLAPI void APIENTRY glVertexAttrib4d (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
18700+GLAPI void APIENTRY glVertexAttrib4dv (GLuint, const GLdouble *);
18701+GLAPI void APIENTRY glVertexAttrib4f (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
18702+GLAPI void APIENTRY glVertexAttrib4fv (GLuint, const GLfloat *);
18703+GLAPI void APIENTRY glVertexAttrib4iv (GLuint, const GLint *);
18704+GLAPI void APIENTRY glVertexAttrib4s (GLuint, GLshort, GLshort, GLshort, GLshort);
18705+GLAPI void APIENTRY glVertexAttrib4sv (GLuint, const GLshort *);
18706+GLAPI void APIENTRY glVertexAttrib4ubv (GLuint, const GLubyte *);
18707+GLAPI void APIENTRY glVertexAttrib4uiv (GLuint, const GLuint *);
18708+GLAPI void APIENTRY glVertexAttrib4usv (GLuint, const GLushort *);
18709+GLAPI void APIENTRY glVertexAttribPointer (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
18710+#endif /* GL_GLEXT_PROTOTYPES */
18711+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
18712+typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs);
18713+typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
18714+typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
18715+typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
18716+typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
18717+typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
18718+typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
18719+typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
18720+typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
18721+typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
18722+typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
18723+typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
18724+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
18725+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
18726+typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
18727+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
18728+typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj);
18729+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
18730+typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
18731+typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
18732+typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
18733+typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
18734+typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
18735+typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
18736+typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
18737+typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
18738+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params);
18739+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
18740+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
18741+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
18742+typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
18743+typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
18744+typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
18745+typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length);
18746+typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
18747+typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
18748+typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
18749+typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
18750+typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
18751+typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
18752+typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
18753+typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
18754+typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
18755+typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18756+typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18757+typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18758+typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18759+typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
18760+typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
18761+typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
18762+typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
18763+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18764+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18765+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18766+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
18767+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);
18768+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v);
18769+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
18770+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
18771+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);
18772+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v);
18773+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);
18774+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v);
18775+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
18776+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
18777+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);
18778+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v);
18779+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
18780+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v);
18781+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
18782+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
18783+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
18784+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v);
18785+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v);
18786+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v);
18787+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v);
18788+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
18789+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v);
18790+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v);
18791+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v);
18792+typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v);
18793+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
18794+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v);
18795+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
18796+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
18797+typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v);
18798+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
18799+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v);
18800+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v);
18801+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v);
18802+typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v);
18803+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
18804+#endif
18805+
18806+#ifndef GL_VERSION_2_1
18807+#define GL_VERSION_2_1 1
18808+#ifdef GL_GLEXT_PROTOTYPES
18809+GLAPI void APIENTRY glUniformMatrix2x3fv (GLint, GLsizei, GLboolean, const GLfloat *);
18810+GLAPI void APIENTRY glUniformMatrix3x2fv (GLint, GLsizei, GLboolean, const GLfloat *);
18811+GLAPI void APIENTRY glUniformMatrix2x4fv (GLint, GLsizei, GLboolean, const GLfloat *);
18812+GLAPI void APIENTRY glUniformMatrix4x2fv (GLint, GLsizei, GLboolean, const GLfloat *);
18813+GLAPI void APIENTRY glUniformMatrix3x4fv (GLint, GLsizei, GLboolean, const GLfloat *);
18814+GLAPI void APIENTRY glUniformMatrix4x3fv (GLint, GLsizei, GLboolean, const GLfloat *);
18815+#endif /* GL_GLEXT_PROTOTYPES */
18816+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18817+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18818+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18819+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18820+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18821+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18822+#endif
18823+
18824+#ifndef GL_ARB_multitexture
18825+#define GL_ARB_multitexture 1
18826+#ifdef GL_GLEXT_PROTOTYPES
18827+GLAPI void APIENTRY glActiveTextureARB (GLenum);
18828+GLAPI void APIENTRY glClientActiveTextureARB (GLenum);
18829+GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum, GLdouble);
18830+GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum, const GLdouble *);
18831+GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum, GLfloat);
18832+GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum, const GLfloat *);
18833+GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum, GLint);
18834+GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum, const GLint *);
18835+GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum, GLshort);
18836+GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum, const GLshort *);
18837+GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum, GLdouble, GLdouble);
18838+GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum, const GLdouble *);
18839+GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum, GLfloat, GLfloat);
18840+GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum, const GLfloat *);
18841+GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum, GLint, GLint);
18842+GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum, const GLint *);
18843+GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum, GLshort, GLshort);
18844+GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum, const GLshort *);
18845+GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum, GLdouble, GLdouble, GLdouble);
18846+GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum, const GLdouble *);
18847+GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum, GLfloat, GLfloat, GLfloat);
18848+GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum, const GLfloat *);
18849+GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum, GLint, GLint, GLint);
18850+GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum, const GLint *);
18851+GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum, GLshort, GLshort, GLshort);
18852+GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum, const GLshort *);
18853+GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
18854+GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum, const GLdouble *);
18855+GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
18856+GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum, const GLfloat *);
18857+GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum, GLint, GLint, GLint, GLint);
18858+GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum, const GLint *);
18859+GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum, GLshort, GLshort, GLshort, GLshort);
18860+GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum, const GLshort *);
18861+#endif /* GL_GLEXT_PROTOTYPES */
18862+typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
18863+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
18864+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
18865+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
18866+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
18867+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
18868+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
18869+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
18870+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
18871+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
18872+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
18873+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
18874+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
18875+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
18876+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
18877+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
18878+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
18879+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
18880+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
18881+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
18882+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
18883+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
18884+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
18885+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
18886+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
18887+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
18888+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
18889+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
18890+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
18891+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
18892+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
18893+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
18894+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
18895+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
18896+#endif
18897+
18898+#ifndef GL_ARB_transpose_matrix
18899+#define GL_ARB_transpose_matrix 1
18900+#ifdef GL_GLEXT_PROTOTYPES
18901+GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *);
18902+GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *);
18903+GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *);
18904+GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *);
18905+#endif /* GL_GLEXT_PROTOTYPES */
18906+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
18907+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
18908+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
18909+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
18910+#endif
18911+
18912+#ifndef GL_ARB_multisample
18913+#define GL_ARB_multisample 1
18914+#ifdef GL_GLEXT_PROTOTYPES
18915+GLAPI void APIENTRY glSampleCoverageARB (GLclampf, GLboolean);
18916+#endif /* GL_GLEXT_PROTOTYPES */
18917+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert);
18918+#endif
18919+
18920+#ifndef GL_ARB_texture_env_add
18921+#define GL_ARB_texture_env_add 1
18922+#endif
18923+
18924+#ifndef GL_ARB_texture_cube_map
18925+#define GL_ARB_texture_cube_map 1
18926+#endif
18927+
18928+#ifndef GL_ARB_texture_compression
18929+#define GL_ARB_texture_compression 1
18930+#ifdef GL_GLEXT_PROTOTYPES
18931+GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
18932+GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
18933+GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
18934+GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
18935+GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
18936+GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
18937+GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum, GLint, GLvoid *);
18938+#endif /* GL_GLEXT_PROTOTYPES */
18939+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
18940+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
18941+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
18942+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);
18943+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
18944+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
18945+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid *img);
18946+#endif
18947+
18948+#ifndef GL_ARB_texture_border_clamp
18949+#define GL_ARB_texture_border_clamp 1
18950+#endif
18951+
18952+#ifndef GL_ARB_point_parameters
18953+#define GL_ARB_point_parameters 1
18954+#ifdef GL_GLEXT_PROTOTYPES
18955+GLAPI void APIENTRY glPointParameterfARB (GLenum, GLfloat);
18956+GLAPI void APIENTRY glPointParameterfvARB (GLenum, const GLfloat *);
18957+#endif /* GL_GLEXT_PROTOTYPES */
18958+typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param);
18959+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params);
18960+#endif
18961+
18962+#ifndef GL_ARB_vertex_blend
18963+#define GL_ARB_vertex_blend 1
18964+#ifdef GL_GLEXT_PROTOTYPES
18965+GLAPI void APIENTRY glWeightbvARB (GLint, const GLbyte *);
18966+GLAPI void APIENTRY glWeightsvARB (GLint, const GLshort *);
18967+GLAPI void APIENTRY glWeightivARB (GLint, const GLint *);
18968+GLAPI void APIENTRY glWeightfvARB (GLint, const GLfloat *);
18969+GLAPI void APIENTRY glWeightdvARB (GLint, const GLdouble *);
18970+GLAPI void APIENTRY glWeightubvARB (GLint, const GLubyte *);
18971+GLAPI void APIENTRY glWeightusvARB (GLint, const GLushort *);
18972+GLAPI void APIENTRY glWeightuivARB (GLint, const GLuint *);
18973+GLAPI void APIENTRY glWeightPointerARB (GLint, GLenum, GLsizei, const GLvoid *);
18974+GLAPI void APIENTRY glVertexBlendARB (GLint);
18975+#endif /* GL_GLEXT_PROTOTYPES */
18976+typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights);
18977+typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights);
18978+typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights);
18979+typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights);
18980+typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights);
18981+typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights);
18982+typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights);
18983+typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights);
18984+typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
18985+typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count);
18986+#endif
18987+
18988+#ifndef GL_ARB_matrix_palette
18989+#define GL_ARB_matrix_palette 1
18990+#ifdef GL_GLEXT_PROTOTYPES
18991+GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint);
18992+GLAPI void APIENTRY glMatrixIndexubvARB (GLint, const GLubyte *);
18993+GLAPI void APIENTRY glMatrixIndexusvARB (GLint, const GLushort *);
18994+GLAPI void APIENTRY glMatrixIndexuivARB (GLint, const GLuint *);
18995+GLAPI void APIENTRY glMatrixIndexPointerARB (GLint, GLenum, GLsizei, const GLvoid *);
18996+#endif /* GL_GLEXT_PROTOTYPES */
18997+typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index);
18998+typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices);
18999+typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices);
19000+typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices);
19001+typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
19002+#endif
19003+
19004+#ifndef GL_ARB_texture_env_combine
19005+#define GL_ARB_texture_env_combine 1
19006+#endif
19007+
19008+#ifndef GL_ARB_texture_env_crossbar
19009+#define GL_ARB_texture_env_crossbar 1
19010+#endif
19011+
19012+#ifndef GL_ARB_texture_env_dot3
19013+#define GL_ARB_texture_env_dot3 1
19014+#endif
19015+
19016+#ifndef GL_ARB_texture_mirrored_repeat
19017+#define GL_ARB_texture_mirrored_repeat 1
19018+#endif
19019+
19020+#ifndef GL_ARB_depth_texture
19021+#define GL_ARB_depth_texture 1
19022+#endif
19023+
19024+#ifndef GL_ARB_shadow
19025+#define GL_ARB_shadow 1
19026+#endif
19027+
19028+#ifndef GL_ARB_shadow_ambient
19029+#define GL_ARB_shadow_ambient 1
19030+#endif
19031+
19032+#ifndef GL_ARB_window_pos
19033+#define GL_ARB_window_pos 1
19034+#ifdef GL_GLEXT_PROTOTYPES
19035+GLAPI void APIENTRY glWindowPos2dARB (GLdouble, GLdouble);
19036+GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *);
19037+GLAPI void APIENTRY glWindowPos2fARB (GLfloat, GLfloat);
19038+GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *);
19039+GLAPI void APIENTRY glWindowPos2iARB (GLint, GLint);
19040+GLAPI void APIENTRY glWindowPos2ivARB (const GLint *);
19041+GLAPI void APIENTRY glWindowPos2sARB (GLshort, GLshort);
19042+GLAPI void APIENTRY glWindowPos2svARB (const GLshort *);
19043+GLAPI void APIENTRY glWindowPos3dARB (GLdouble, GLdouble, GLdouble);
19044+GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *);
19045+GLAPI void APIENTRY glWindowPos3fARB (GLfloat, GLfloat, GLfloat);
19046+GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *);
19047+GLAPI void APIENTRY glWindowPos3iARB (GLint, GLint, GLint);
19048+GLAPI void APIENTRY glWindowPos3ivARB (const GLint *);
19049+GLAPI void APIENTRY glWindowPos3sARB (GLshort, GLshort, GLshort);
19050+GLAPI void APIENTRY glWindowPos3svARB (const GLshort *);
19051+#endif /* GL_GLEXT_PROTOTYPES */
19052+typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y);
19053+typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v);
19054+typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y);
19055+typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v);
19056+typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y);
19057+typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v);
19058+typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y);
19059+typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v);
19060+typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z);
19061+typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v);
19062+typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z);
19063+typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v);
19064+typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z);
19065+typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v);
19066+typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z);
19067+typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v);
19068+#endif
19069+
19070+#ifndef GL_ARB_vertex_program
19071+#define GL_ARB_vertex_program 1
19072+#ifdef GL_GLEXT_PROTOTYPES
19073+GLAPI void APIENTRY glVertexAttrib1dARB (GLuint, GLdouble);
19074+GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint, const GLdouble *);
19075+GLAPI void APIENTRY glVertexAttrib1fARB (GLuint, GLfloat);
19076+GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint, const GLfloat *);
19077+GLAPI void APIENTRY glVertexAttrib1sARB (GLuint, GLshort);
19078+GLAPI void APIENTRY glVertexAttrib1svARB (GLuint, const GLshort *);
19079+GLAPI void APIENTRY glVertexAttrib2dARB (GLuint, GLdouble, GLdouble);
19080+GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint, const GLdouble *);
19081+GLAPI void APIENTRY glVertexAttrib2fARB (GLuint, GLfloat, GLfloat);
19082+GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint, const GLfloat *);
19083+GLAPI void APIENTRY glVertexAttrib2sARB (GLuint, GLshort, GLshort);
19084+GLAPI void APIENTRY glVertexAttrib2svARB (GLuint, const GLshort *);
19085+GLAPI void APIENTRY glVertexAttrib3dARB (GLuint, GLdouble, GLdouble, GLdouble);
19086+GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint, const GLdouble *);
19087+GLAPI void APIENTRY glVertexAttrib3fARB (GLuint, GLfloat, GLfloat, GLfloat);
19088+GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint, const GLfloat *);
19089+GLAPI void APIENTRY glVertexAttrib3sARB (GLuint, GLshort, GLshort, GLshort);
19090+GLAPI void APIENTRY glVertexAttrib3svARB (GLuint, const GLshort *);
19091+GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint, const GLbyte *);
19092+GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint, const GLint *);
19093+GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint, const GLshort *);
19094+GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
19095+GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint, const GLubyte *);
19096+GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint, const GLuint *);
19097+GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint, const GLushort *);
19098+GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint, const GLbyte *);
19099+GLAPI void APIENTRY glVertexAttrib4dARB (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
19100+GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint, const GLdouble *);
19101+GLAPI void APIENTRY glVertexAttrib4fARB (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
19102+GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint, const GLfloat *);
19103+GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint, const GLint *);
19104+GLAPI void APIENTRY glVertexAttrib4sARB (GLuint, GLshort, GLshort, GLshort, GLshort);
19105+GLAPI void APIENTRY glVertexAttrib4svARB (GLuint, const GLshort *);
19106+GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint, const GLubyte *);
19107+GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint, const GLuint *);
19108+GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint, const GLushort *);
19109+GLAPI void APIENTRY glVertexAttribPointerARB (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
19110+GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint);
19111+GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint);
19112+GLAPI void APIENTRY glProgramStringARB (GLenum, GLenum, GLsizei, const GLvoid *);
19113+GLAPI void APIENTRY glBindProgramARB (GLenum, GLuint);
19114+GLAPI void APIENTRY glDeleteProgramsARB (GLsizei, const GLuint *);
19115+GLAPI void APIENTRY glGenProgramsARB (GLsizei, GLuint *);
19116+GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
19117+GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum, GLuint, const GLdouble *);
19118+GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
19119+GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum, GLuint, const GLfloat *);
19120+GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
19121+GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum, GLuint, const GLdouble *);
19122+GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
19123+GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum, GLuint, const GLfloat *);
19124+GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum, GLuint, GLdouble *);
19125+GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum, GLuint, GLfloat *);
19126+GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum, GLuint, GLdouble *);
19127+GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum, GLuint, GLfloat *);
19128+GLAPI void APIENTRY glGetProgramivARB (GLenum, GLenum, GLint *);
19129+GLAPI void APIENTRY glGetProgramStringARB (GLenum, GLenum, GLvoid *);
19130+GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint, GLenum, GLdouble *);
19131+GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint, GLenum, GLfloat *);
19132+GLAPI void APIENTRY glGetVertexAttribivARB (GLuint, GLenum, GLint *);
19133+GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint, GLenum, GLvoid* *);
19134+GLAPI GLboolean APIENTRY glIsProgramARB (GLuint);
19135+#endif /* GL_GLEXT_PROTOTYPES */
19136+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x);
19137+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v);
19138+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);
19139+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v);
19140+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x);
19141+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v);
19142+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y);
19143+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v);
19144+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);
19145+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v);
19146+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y);
19147+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v);
19148+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
19149+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v);
19150+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
19151+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v);
19152+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
19153+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v);
19154+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v);
19155+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v);
19156+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v);
19157+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
19158+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v);
19159+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v);
19160+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v);
19161+typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v);
19162+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
19163+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v);
19164+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
19165+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v);
19166+typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v);
19167+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
19168+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v);
19169+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v);
19170+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v);
19171+typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v);
19172+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
19173+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
19174+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
19175+typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string);
19176+typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program);
19177+typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs);
19178+typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs);
19179+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
19180+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
19181+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
19182+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
19183+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
19184+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
19185+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
19186+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
19187+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
19188+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
19189+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
19190+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
19191+typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);
19192+typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string);
19193+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params);
19194+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params);
19195+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params);
19196+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
19197+typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program);
19198+#endif
19199+
19200+#ifndef GL_ARB_fragment_program
19201+#define GL_ARB_fragment_program 1
19202+/* All ARB_fragment_program entry points are shared with ARB_vertex_program. */
19203+#endif
19204+
19205+#ifndef GL_ARB_vertex_buffer_object
19206+#define GL_ARB_vertex_buffer_object 1
19207+#ifdef GL_GLEXT_PROTOTYPES
19208+GLAPI void APIENTRY glBindBufferARB (GLenum, GLuint);
19209+GLAPI void APIENTRY glDeleteBuffersARB (GLsizei, const GLuint *);
19210+GLAPI void APIENTRY glGenBuffersARB (GLsizei, GLuint *);
19211+GLAPI GLboolean APIENTRY glIsBufferARB (GLuint);
19212+GLAPI void APIENTRY glBufferDataARB (GLenum, GLsizeiptrARB, const GLvoid *, GLenum);
19213+GLAPI void APIENTRY glBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *);
19214+GLAPI void APIENTRY glGetBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *);
19215+GLAPI GLvoid* APIENTRY glMapBufferARB (GLenum, GLenum);
19216+GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum);
19217+GLAPI void APIENTRY glGetBufferParameterivARB (GLenum, GLenum, GLint *);
19218+GLAPI void APIENTRY glGetBufferPointervARB (GLenum, GLenum, GLvoid* *);
19219+#endif /* GL_GLEXT_PROTOTYPES */
19220+typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
19221+typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers);
19222+typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers);
19223+typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer);
19224+typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage);
19225+typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data);
19226+typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data);
19227+typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);
19228+typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target);
19229+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params);
19230+typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params);
19231+#endif
19232+
19233+#ifndef GL_ARB_occlusion_query
19234+#define GL_ARB_occlusion_query 1
19235+#ifdef GL_GLEXT_PROTOTYPES
19236+GLAPI void APIENTRY glGenQueriesARB (GLsizei, GLuint *);
19237+GLAPI void APIENTRY glDeleteQueriesARB (GLsizei, const GLuint *);
19238+GLAPI GLboolean APIENTRY glIsQueryARB (GLuint);
19239+GLAPI void APIENTRY glBeginQueryARB (GLenum, GLuint);
19240+GLAPI void APIENTRY glEndQueryARB (GLenum);
19241+GLAPI void APIENTRY glGetQueryivARB (GLenum, GLenum, GLint *);
19242+GLAPI void APIENTRY glGetQueryObjectivARB (GLuint, GLenum, GLint *);
19243+GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint, GLenum, GLuint *);
19244+#endif /* GL_GLEXT_PROTOTYPES */
19245+typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids);
19246+typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids);
19247+typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id);
19248+typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id);
19249+typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target);
19250+typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params);
19251+typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params);
19252+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params);
19253+#endif
19254+
19255+#ifndef GL_ARB_shader_objects
19256+#define GL_ARB_shader_objects 1
19257+#ifdef GL_GLEXT_PROTOTYPES
19258+GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB);
19259+GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum);
19260+GLAPI void APIENTRY glDetachObjectARB (GLhandleARB, GLhandleARB);
19261+GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum);
19262+GLAPI void APIENTRY glShaderSourceARB (GLhandleARB, GLsizei, const GLcharARB* *, const GLint *);
19263+GLAPI void APIENTRY glCompileShaderARB (GLhandleARB);
19264+GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void);
19265+GLAPI void APIENTRY glAttachObjectARB (GLhandleARB, GLhandleARB);
19266+GLAPI void APIENTRY glLinkProgramARB (GLhandleARB);
19267+GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB);
19268+GLAPI void APIENTRY glValidateProgramARB (GLhandleARB);
19269+GLAPI void APIENTRY glUniform1fARB (GLint, GLfloat);
19270+GLAPI void APIENTRY glUniform2fARB (GLint, GLfloat, GLfloat);
19271+GLAPI void APIENTRY glUniform3fARB (GLint, GLfloat, GLfloat, GLfloat);
19272+GLAPI void APIENTRY glUniform4fARB (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
19273+GLAPI void APIENTRY glUniform1iARB (GLint, GLint);
19274+GLAPI void APIENTRY glUniform2iARB (GLint, GLint, GLint);
19275+GLAPI void APIENTRY glUniform3iARB (GLint, GLint, GLint, GLint);
19276+GLAPI void APIENTRY glUniform4iARB (GLint, GLint, GLint, GLint, GLint);
19277+GLAPI void APIENTRY glUniform1fvARB (GLint, GLsizei, const GLfloat *);
19278+GLAPI void APIENTRY glUniform2fvARB (GLint, GLsizei, const GLfloat *);
19279+GLAPI void APIENTRY glUniform3fvARB (GLint, GLsizei, const GLfloat *);
19280+GLAPI void APIENTRY glUniform4fvARB (GLint, GLsizei, const GLfloat *);
19281+GLAPI void APIENTRY glUniform1ivARB (GLint, GLsizei, const GLint *);
19282+GLAPI void APIENTRY glUniform2ivARB (GLint, GLsizei, const GLint *);
19283+GLAPI void APIENTRY glUniform3ivARB (GLint, GLsizei, const GLint *);
19284+GLAPI void APIENTRY glUniform4ivARB (GLint, GLsizei, const GLint *);
19285+GLAPI void APIENTRY glUniformMatrix2fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
19286+GLAPI void APIENTRY glUniformMatrix3fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
19287+GLAPI void APIENTRY glUniformMatrix4fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
19288+GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB, GLenum, GLfloat *);
19289+GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB, GLenum, GLint *);
19290+GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
19291+GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB, GLsizei, GLsizei *, GLhandleARB *);
19292+GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB, const GLcharARB *);
19293+GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
19294+GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB, GLint, GLfloat *);
19295+GLAPI void APIENTRY glGetUniformivARB (GLhandleARB, GLint, GLint *);
19296+GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
19297+#endif /* GL_GLEXT_PROTOTYPES */
19298+typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj);
19299+typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname);
19300+typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj);
19301+typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType);
19302+typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length);
19303+typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj);
19304+typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void);
19305+typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj);
19306+typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj);
19307+typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj);
19308+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj);
19309+typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0);
19310+typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1);
19311+typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
19312+typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
19313+typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0);
19314+typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1);
19315+typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2);
19316+typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
19317+typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
19318+typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
19319+typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
19320+typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
19321+typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value);
19322+typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value);
19323+typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value);
19324+typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value);
19325+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
19326+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
19327+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
19328+typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params);
19329+typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params);
19330+typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
19331+typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
19332+typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
19333+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
19334+typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params);
19335+typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params);
19336+typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
19337+#endif
19338+
19339+#ifndef GL_ARB_vertex_shader
19340+#define GL_ARB_vertex_shader 1
19341+#ifdef GL_GLEXT_PROTOTYPES
19342+GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB, GLuint, const GLcharARB *);
19343+GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
19344+GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB, const GLcharARB *);
19345+#endif /* GL_GLEXT_PROTOTYPES */
19346+typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name);
19347+typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
19348+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
19349+#endif
19350+
19351+#ifndef GL_ARB_fragment_shader
19352+#define GL_ARB_fragment_shader 1
19353+#endif
19354+
19355+#ifndef GL_ARB_shading_language_100
19356+#define GL_ARB_shading_language_100 1
19357+#endif
19358+
19359+#ifndef GL_ARB_texture_non_power_of_two
19360+#define GL_ARB_texture_non_power_of_two 1
19361+#endif
19362+
19363+#ifndef GL_ARB_point_sprite
19364+#define GL_ARB_point_sprite 1
19365+#endif
19366+
19367+#ifndef GL_ARB_fragment_program_shadow
19368+#define GL_ARB_fragment_program_shadow 1
19369+#endif
19370+
19371+#ifndef GL_ARB_draw_buffers
19372+#define GL_ARB_draw_buffers 1
19373+#ifdef GL_GLEXT_PROTOTYPES
19374+GLAPI void APIENTRY glDrawBuffersARB (GLsizei, const GLenum *);
19375+#endif /* GL_GLEXT_PROTOTYPES */
19376+typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs);
19377+#endif
19378+
19379+#ifndef GL_ARB_texture_rectangle
19380+#define GL_ARB_texture_rectangle 1
19381+#endif
19382+
19383+#ifndef GL_ARB_color_buffer_float
19384+#define GL_ARB_color_buffer_float 1
19385+#ifdef GL_GLEXT_PROTOTYPES
19386+GLAPI void APIENTRY glClampColorARB (GLenum, GLenum);
19387+#endif /* GL_GLEXT_PROTOTYPES */
19388+typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);
19389+#endif
19390+
19391+#ifndef GL_ARB_half_float_pixel
19392+#define GL_ARB_half_float_pixel 1
19393+#endif
19394+
19395+#ifndef GL_ARB_texture_float
19396+#define GL_ARB_texture_float 1
19397+#endif
19398+
19399+#ifndef GL_ARB_pixel_buffer_object
19400+#define GL_ARB_pixel_buffer_object 1
19401+#endif
19402+
19403+#ifndef GL_EXT_abgr
19404+#define GL_EXT_abgr 1
19405+#endif
19406+
19407+#ifndef GL_EXT_blend_color
19408+#define GL_EXT_blend_color 1
19409+#ifdef GL_GLEXT_PROTOTYPES
19410+GLAPI void APIENTRY glBlendColorEXT (GLclampf, GLclampf, GLclampf, GLclampf);
19411+#endif /* GL_GLEXT_PROTOTYPES */
19412+typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
19413+#endif
19414+
19415+#ifndef GL_EXT_polygon_offset
19416+#define GL_EXT_polygon_offset 1
19417+#ifdef GL_GLEXT_PROTOTYPES
19418+GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat, GLfloat);
19419+#endif /* GL_GLEXT_PROTOTYPES */
19420+typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias);
19421+#endif
19422+
19423+#ifndef GL_EXT_texture
19424+#define GL_EXT_texture 1
19425+#endif
19426+
19427+#ifndef GL_EXT_texture3D
19428+#define GL_EXT_texture3D 1
19429+#ifdef GL_GLEXT_PROTOTYPES
19430+GLAPI void APIENTRY glTexImage3DEXT (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
19431+GLAPI void APIENTRY glTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19432+#endif /* GL_GLEXT_PROTOTYPES */
19433+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);
19434+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);
19435+#endif
19436+
19437+#ifndef GL_SGIS_texture_filter4
19438+#define GL_SGIS_texture_filter4 1
19439+#ifdef GL_GLEXT_PROTOTYPES
19440+GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum, GLenum, GLfloat *);
19441+GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum, GLenum, GLsizei, const GLfloat *);
19442+#endif /* GL_GLEXT_PROTOTYPES */
19443+typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights);
19444+typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);
19445+#endif
19446+
19447+#ifndef GL_EXT_subtexture
19448+#define GL_EXT_subtexture 1
19449+#ifdef GL_GLEXT_PROTOTYPES
19450+GLAPI void APIENTRY glTexSubImage1DEXT (GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *);
19451+GLAPI void APIENTRY glTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19452+#endif /* GL_GLEXT_PROTOTYPES */
19453+typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
19454+typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
19455+#endif
19456+
19457+#ifndef GL_EXT_copy_texture
19458+#define GL_EXT_copy_texture 1
19459+#ifdef GL_GLEXT_PROTOTYPES
19460+GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint);
19461+GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint);
19462+GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei);
19463+GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
19464+GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
19465+#endif /* GL_GLEXT_PROTOTYPES */
19466+typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
19467+typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
19468+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
19469+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
19470+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
19471+#endif
19472+
19473+#ifndef GL_EXT_histogram
19474+#define GL_EXT_histogram 1
19475+#ifdef GL_GLEXT_PROTOTYPES
19476+GLAPI void APIENTRY glGetHistogramEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
19477+GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum, GLenum, GLfloat *);
19478+GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum, GLenum, GLint *);
19479+GLAPI void APIENTRY glGetMinmaxEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
19480+GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum, GLenum, GLfloat *);
19481+GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum, GLenum, GLint *);
19482+GLAPI void APIENTRY glHistogramEXT (GLenum, GLsizei, GLenum, GLboolean);
19483+GLAPI void APIENTRY glMinmaxEXT (GLenum, GLenum, GLboolean);
19484+GLAPI void APIENTRY glResetHistogramEXT (GLenum);
19485+GLAPI void APIENTRY glResetMinmaxEXT (GLenum);
19486+#endif /* GL_GLEXT_PROTOTYPES */
19487+typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
19488+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19489+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19490+typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
19491+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19492+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19493+typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
19494+typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink);
19495+typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target);
19496+typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target);
19497+#endif
19498+
19499+#ifndef GL_EXT_convolution
19500+#define GL_EXT_convolution 1
19501+#ifdef GL_GLEXT_PROTOTYPES
19502+GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
19503+GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19504+GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum, GLenum, GLfloat);
19505+GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum, GLenum, const GLfloat *);
19506+GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum, GLenum, GLint);
19507+GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum, GLenum, const GLint *);
19508+GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum, GLenum, GLint, GLint, GLsizei);
19509+GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
19510+GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum, GLenum, GLenum, GLvoid *);
19511+GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum, GLenum, GLfloat *);
19512+GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum, GLenum, GLint *);
19513+GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
19514+GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
19515+#endif /* GL_GLEXT_PROTOTYPES */
19516+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
19517+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
19518+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params);
19519+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
19520+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params);
19521+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
19522+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
19523+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
19524+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
19525+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19526+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19527+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
19528+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
19529+#endif
19530+
19531+#ifndef GL_SGI_color_matrix
19532+#define GL_SGI_color_matrix 1
19533+#endif
19534+
19535+#ifndef GL_SGI_color_table
19536+#define GL_SGI_color_table 1
19537+#ifdef GL_GLEXT_PROTOTYPES
19538+GLAPI void APIENTRY glColorTableSGI (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
19539+GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum, GLenum, const GLfloat *);
19540+GLAPI void APIENTRY glColorTableParameterivSGI (GLenum, GLenum, const GLint *);
19541+GLAPI void APIENTRY glCopyColorTableSGI (GLenum, GLenum, GLint, GLint, GLsizei);
19542+GLAPI void APIENTRY glGetColorTableSGI (GLenum, GLenum, GLenum, GLvoid *);
19543+GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum, GLenum, GLfloat *);
19544+GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum, GLenum, GLint *);
19545+#endif /* GL_GLEXT_PROTOTYPES */
19546+typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
19547+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params);
19548+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params);
19549+typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
19550+typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
19551+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params);
19552+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params);
19553+#endif
19554+
19555+#ifndef GL_SGIX_pixel_texture
19556+#define GL_SGIX_pixel_texture 1
19557+#ifdef GL_GLEXT_PROTOTYPES
19558+GLAPI void APIENTRY glPixelTexGenSGIX (GLenum);
19559+#endif /* GL_GLEXT_PROTOTYPES */
19560+typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode);
19561+#endif
19562+
19563+#ifndef GL_SGIS_pixel_texture
19564+#define GL_SGIS_pixel_texture 1
19565+#ifdef GL_GLEXT_PROTOTYPES
19566+GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum, GLint);
19567+GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum, const GLint *);
19568+GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum, GLfloat);
19569+GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum, const GLfloat *);
19570+GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum, GLint *);
19571+GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum, GLfloat *);
19572+#endif /* GL_GLEXT_PROTOTYPES */
19573+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param);
19574+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params);
19575+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
19576+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
19577+typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params);
19578+typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params);
19579+#endif
19580+
19581+#ifndef GL_SGIS_texture4D
19582+#define GL_SGIS_texture4D 1
19583+#ifdef GL_GLEXT_PROTOTYPES
19584+GLAPI void APIENTRY glTexImage4DSGIS (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
19585+GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19586+#endif /* GL_GLEXT_PROTOTYPES */
19587+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);
19588+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);
19589+#endif
19590+
19591+#ifndef GL_SGI_texture_color_table
19592+#define GL_SGI_texture_color_table 1
19593+#endif
19594+
19595+#ifndef GL_EXT_cmyka
19596+#define GL_EXT_cmyka 1
19597+#endif
19598+
19599+#ifndef GL_EXT_texture_object
19600+#define GL_EXT_texture_object 1
19601+#ifdef GL_GLEXT_PROTOTYPES
19602+GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei, const GLuint *, GLboolean *);
19603+GLAPI void APIENTRY glBindTextureEXT (GLenum, GLuint);
19604+GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei, const GLuint *);
19605+GLAPI void APIENTRY glGenTexturesEXT (GLsizei, GLuint *);
19606+GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint);
19607+GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei, const GLuint *, const GLclampf *);
19608+#endif /* GL_GLEXT_PROTOTYPES */
19609+typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences);
19610+typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture);
19611+typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures);
19612+typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures);
19613+typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture);
19614+typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities);
19615+#endif
19616+
19617+#ifndef GL_SGIS_detail_texture
19618+#define GL_SGIS_detail_texture 1
19619+#ifdef GL_GLEXT_PROTOTYPES
19620+GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum, GLsizei, const GLfloat *);
19621+GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum, GLfloat *);
19622+#endif /* GL_GLEXT_PROTOTYPES */
19623+typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
19624+typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
19625+#endif
19626+
19627+#ifndef GL_SGIS_sharpen_texture
19628+#define GL_SGIS_sharpen_texture 1
19629+#ifdef GL_GLEXT_PROTOTYPES
19630+GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum, GLsizei, const GLfloat *);
19631+GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum, GLfloat *);
19632+#endif /* GL_GLEXT_PROTOTYPES */
19633+typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
19634+typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
19635+#endif
19636+
19637+#ifndef GL_EXT_packed_pixels
19638+#define GL_EXT_packed_pixels 1
19639+#endif
19640+
19641+#ifndef GL_SGIS_texture_lod
19642+#define GL_SGIS_texture_lod 1
19643+#endif
19644+
19645+#ifndef GL_SGIS_multisample
19646+#define GL_SGIS_multisample 1
19647+#ifdef GL_GLEXT_PROTOTYPES
19648+GLAPI void APIENTRY glSampleMaskSGIS (GLclampf, GLboolean);
19649+GLAPI void APIENTRY glSamplePatternSGIS (GLenum);
19650+#endif /* GL_GLEXT_PROTOTYPES */
19651+typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert);
19652+typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern);
19653+#endif
19654+
19655+#ifndef GL_EXT_rescale_normal
19656+#define GL_EXT_rescale_normal 1
19657+#endif
19658+
19659+#ifndef GL_EXT_vertex_array
19660+#define GL_EXT_vertex_array 1
19661+#ifdef GL_GLEXT_PROTOTYPES
19662+GLAPI void APIENTRY glArrayElementEXT (GLint);
19663+GLAPI void APIENTRY glColorPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
19664+GLAPI void APIENTRY glDrawArraysEXT (GLenum, GLint, GLsizei);
19665+GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei, GLsizei, const GLboolean *);
19666+GLAPI void APIENTRY glGetPointervEXT (GLenum, GLvoid* *);
19667+GLAPI void APIENTRY glIndexPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *);
19668+GLAPI void APIENTRY glNormalPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *);
19669+GLAPI void APIENTRY glTexCoordPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
19670+GLAPI void APIENTRY glVertexPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
19671+#endif /* GL_GLEXT_PROTOTYPES */
19672+typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i);
19673+typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19674+typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);
19675+typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer);
19676+typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params);
19677+typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19678+typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19679+typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19680+typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19681+#endif
19682+
19683+#ifndef GL_EXT_misc_attribute
19684+#define GL_EXT_misc_attribute 1
19685+#endif
19686+
19687+#ifndef GL_SGIS_generate_mipmap
19688+#define GL_SGIS_generate_mipmap 1
19689+#endif
19690+
19691+#ifndef GL_SGIX_clipmap
19692+#define GL_SGIX_clipmap 1
19693+#endif
19694+
19695+#ifndef GL_SGIX_shadow
19696+#define GL_SGIX_shadow 1
19697+#endif
19698+
19699+#ifndef GL_SGIS_texture_edge_clamp
19700+#define GL_SGIS_texture_edge_clamp 1
19701+#endif
19702+
19703+#ifndef GL_SGIS_texture_border_clamp
19704+#define GL_SGIS_texture_border_clamp 1
19705+#endif
19706+
19707+#ifndef GL_EXT_blend_minmax
19708+#define GL_EXT_blend_minmax 1
19709+#ifdef GL_GLEXT_PROTOTYPES
19710+GLAPI void APIENTRY glBlendEquationEXT (GLenum);
19711+#endif /* GL_GLEXT_PROTOTYPES */
19712+typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode);
19713+#endif
19714+
19715+#ifndef GL_EXT_blend_subtract
19716+#define GL_EXT_blend_subtract 1
19717+#endif
19718+
19719+#ifndef GL_EXT_blend_logic_op
19720+#define GL_EXT_blend_logic_op 1
19721+#endif
19722+
19723+#ifndef GL_SGIX_interlace
19724+#define GL_SGIX_interlace 1
19725+#endif
19726+
19727+#ifndef GL_SGIX_pixel_tiles
19728+#define GL_SGIX_pixel_tiles 1
19729+#endif
19730+
19731+#ifndef GL_SGIX_texture_select
19732+#define GL_SGIX_texture_select 1
19733+#endif
19734+
19735+#ifndef GL_SGIX_sprite
19736+#define GL_SGIX_sprite 1
19737+#ifdef GL_GLEXT_PROTOTYPES
19738+GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum, GLfloat);
19739+GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum, const GLfloat *);
19740+GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum, GLint);
19741+GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum, const GLint *);
19742+#endif /* GL_GLEXT_PROTOTYPES */
19743+typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param);
19744+typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params);
19745+typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param);
19746+typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params);
19747+#endif
19748+
19749+#ifndef GL_SGIX_texture_multi_buffer
19750+#define GL_SGIX_texture_multi_buffer 1
19751+#endif
19752+
19753+#ifndef GL_EXT_point_parameters
19754+#define GL_EXT_point_parameters 1
19755+#ifdef GL_GLEXT_PROTOTYPES
19756+GLAPI void APIENTRY glPointParameterfEXT (GLenum, GLfloat);
19757+GLAPI void APIENTRY glPointParameterfvEXT (GLenum, const GLfloat *);
19758+/* ERO Begin */
19759+GLAPI void APIENTRY glPointParameteriEXT (GLenum, GLint);
19760+GLAPI void APIENTRY glPointParameterivEXT (GLenum, const GLint *);
19761+/* ERO end */
19762+#endif /* GL_GLEXT_PROTOTYPES */
19763+typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);
19764+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params);
19765+#endif
19766+
19767+#ifndef GL_SGIS_point_parameters
19768+#define GL_SGIS_point_parameters 1
19769+#ifdef GL_GLEXT_PROTOTYPES
19770+GLAPI void APIENTRY glPointParameterfSGIS (GLenum, GLfloat);
19771+GLAPI void APIENTRY glPointParameterfvSGIS (GLenum, const GLfloat *);
19772+#endif /* GL_GLEXT_PROTOTYPES */
19773+typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
19774+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
19775+#endif
19776+
19777+#ifndef GL_SGIX_instruments
19778+#define GL_SGIX_instruments 1
19779+#ifdef GL_GLEXT_PROTOTYPES
19780+GLAPI GLint APIENTRY glGetInstrumentsSGIX (void);
19781+GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei, GLint *);
19782+GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *);
19783+GLAPI void APIENTRY glReadInstrumentsSGIX (GLint);
19784+GLAPI void APIENTRY glStartInstrumentsSGIX (void);
19785+GLAPI void APIENTRY glStopInstrumentsSGIX (GLint);
19786+#endif /* GL_GLEXT_PROTOTYPES */
19787+typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void);
19788+typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer);
19789+typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p);
19790+typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker);
19791+typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void);
19792+typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker);
19793+#endif
19794+
19795+#ifndef GL_SGIX_texture_scale_bias
19796+#define GL_SGIX_texture_scale_bias 1
19797+#endif
19798+
19799+#ifndef GL_SGIX_framezoom
19800+#define GL_SGIX_framezoom 1
19801+#ifdef GL_GLEXT_PROTOTYPES
19802+GLAPI void APIENTRY glFrameZoomSGIX (GLint);
19803+#endif /* GL_GLEXT_PROTOTYPES */
19804+typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor);
19805+#endif
19806+
19807+#ifndef GL_SGIX_tag_sample_buffer
19808+#define GL_SGIX_tag_sample_buffer 1
19809+#ifdef GL_GLEXT_PROTOTYPES
19810+GLAPI void APIENTRY glTagSampleBufferSGIX (void);
19811+#endif /* GL_GLEXT_PROTOTYPES */
19812+typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void);
19813+#endif
19814+
19815+#ifndef GL_SGIX_polynomial_ffd
19816+#define GL_SGIX_polynomial_ffd 1
19817+#ifdef GL_GLEXT_PROTOTYPES
19818+GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *);
19819+GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *);
19820+GLAPI void APIENTRY glDeformSGIX (GLbitfield);
19821+GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield);
19822+#endif /* GL_GLEXT_PROTOTYPES */
19823+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);
19824+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);
19825+typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask);
19826+typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask);
19827+#endif
19828+
19829+#ifndef GL_SGIX_reference_plane
19830+#define GL_SGIX_reference_plane 1
19831+#ifdef GL_GLEXT_PROTOTYPES
19832+GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *);
19833+#endif /* GL_GLEXT_PROTOTYPES */
19834+typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation);
19835+#endif
19836+
19837+#ifndef GL_SGIX_flush_raster
19838+#define GL_SGIX_flush_raster 1
19839+#ifdef GL_GLEXT_PROTOTYPES
19840+GLAPI void APIENTRY glFlushRasterSGIX (void);
19841+#endif /* GL_GLEXT_PROTOTYPES */
19842+typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void);
19843+#endif
19844+
19845+#ifndef GL_SGIX_depth_texture
19846+#define GL_SGIX_depth_texture 1
19847+#endif
19848+
19849+#ifndef GL_SGIS_fog_function
19850+#define GL_SGIS_fog_function 1
19851+#ifdef GL_GLEXT_PROTOTYPES
19852+GLAPI void APIENTRY glFogFuncSGIS (GLsizei, const GLfloat *);
19853+GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *);
19854+#endif /* GL_GLEXT_PROTOTYPES */
19855+typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points);
19856+typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points);
19857+#endif
19858+
19859+#ifndef GL_SGIX_fog_offset
19860+#define GL_SGIX_fog_offset 1
19861+#endif
19862+
19863+#ifndef GL_HP_image_transform
19864+#define GL_HP_image_transform 1
19865+#ifdef GL_GLEXT_PROTOTYPES
19866+GLAPI void APIENTRY glImageTransformParameteriHP (GLenum, GLenum, GLint);
19867+GLAPI void APIENTRY glImageTransformParameterfHP (GLenum, GLenum, GLfloat);
19868+GLAPI void APIENTRY glImageTransformParameterivHP (GLenum, GLenum, const GLint *);
19869+GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum, GLenum, const GLfloat *);
19870+GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum, GLenum, GLint *);
19871+GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum, GLenum, GLfloat *);
19872+#endif /* GL_GLEXT_PROTOTYPES */
19873+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param);
19874+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param);
19875+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params);
19876+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params);
19877+typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params);
19878+typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params);
19879+#endif
19880+
19881+#ifndef GL_HP_convolution_border_modes
19882+#define GL_HP_convolution_border_modes 1
19883+#endif
19884+
19885+#ifndef GL_SGIX_texture_add_env
19886+#define GL_SGIX_texture_add_env 1
19887+#endif
19888+
19889+#ifndef GL_EXT_color_subtable
19890+#define GL_EXT_color_subtable 1
19891+#ifdef GL_GLEXT_PROTOTYPES
19892+GLAPI void APIENTRY glColorSubTableEXT (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19893+GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum, GLsizei, GLint, GLint, GLsizei);
19894+#endif /* GL_GLEXT_PROTOTYPES */
19895+typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
19896+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
19897+#endif
19898+
19899+#ifndef GL_PGI_vertex_hints
19900+#define GL_PGI_vertex_hints 1
19901+#endif
19902+
19903+#ifndef GL_PGI_misc_hints
19904+#define GL_PGI_misc_hints 1
19905+#ifdef GL_GLEXT_PROTOTYPES
19906+GLAPI void APIENTRY glHintPGI (GLenum, GLint);
19907+#endif /* GL_GLEXT_PROTOTYPES */
19908+typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode);
19909+#endif
19910+
19911+#ifndef GL_EXT_paletted_texture
19912+#define GL_EXT_paletted_texture 1
19913+#ifdef GL_GLEXT_PROTOTYPES
19914+GLAPI void APIENTRY glColorTableEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
19915+GLAPI void APIENTRY glGetColorTableEXT (GLenum, GLenum, GLenum, GLvoid *);
19916+GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum, GLenum, GLint *);
19917+GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum, GLenum, GLfloat *);
19918+#endif /* GL_GLEXT_PROTOTYPES */
19919+typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
19920+typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data);
19921+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19922+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19923+#endif
19924+
19925+#ifndef GL_EXT_clip_volume_hint
19926+#define GL_EXT_clip_volume_hint 1
19927+#endif
19928+
19929+#ifndef GL_SGIX_list_priority
19930+#define GL_SGIX_list_priority 1
19931+#ifdef GL_GLEXT_PROTOTYPES
19932+GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint, GLenum, GLfloat *);
19933+GLAPI void APIENTRY glGetListParameterivSGIX (GLuint, GLenum, GLint *);
19934+GLAPI void APIENTRY glListParameterfSGIX (GLuint, GLenum, GLfloat);
19935+GLAPI void APIENTRY glListParameterfvSGIX (GLuint, GLenum, const GLfloat *);
19936+GLAPI void APIENTRY glListParameteriSGIX (GLuint, GLenum, GLint);
19937+GLAPI void APIENTRY glListParameterivSGIX (GLuint, GLenum, const GLint *);
19938+#endif /* GL_GLEXT_PROTOTYPES */
19939+typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params);
19940+typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params);
19941+typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param);
19942+typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params);
19943+typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param);
19944+typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params);
19945+#endif
19946+
19947+#ifndef GL_SGIX_ir_instrument1
19948+#define GL_SGIX_ir_instrument1 1
19949+#endif
19950+
19951+#ifndef GL_SGIX_calligraphic_fragment
19952+#define GL_SGIX_calligraphic_fragment 1
19953+#endif
19954+
19955+#ifndef GL_SGIX_texture_lod_bias
19956+#define GL_SGIX_texture_lod_bias 1
19957+#endif
19958+
19959+#ifndef GL_SGIX_shadow_ambient
19960+#define GL_SGIX_shadow_ambient 1
19961+#endif
19962+
19963+#ifndef GL_EXT_index_texture
19964+#define GL_EXT_index_texture 1
19965+#endif
19966+
19967+#ifndef GL_EXT_index_material
19968+#define GL_EXT_index_material 1
19969+#ifdef GL_GLEXT_PROTOTYPES
19970+GLAPI void APIENTRY glIndexMaterialEXT (GLenum, GLenum);
19971+#endif /* GL_GLEXT_PROTOTYPES */
19972+typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode);
19973+#endif
19974+
19975+#ifndef GL_EXT_index_func
19976+#define GL_EXT_index_func 1
19977+#ifdef GL_GLEXT_PROTOTYPES
19978+GLAPI void APIENTRY glIndexFuncEXT (GLenum, GLclampf);
19979+#endif /* GL_GLEXT_PROTOTYPES */
19980+typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref);
19981+#endif
19982+
19983+#ifndef GL_EXT_index_array_formats
19984+#define GL_EXT_index_array_formats 1
19985+#endif
19986+
19987+#ifndef GL_EXT_compiled_vertex_array
19988+#define GL_EXT_compiled_vertex_array 1
19989+#ifdef GL_GLEXT_PROTOTYPES
19990+GLAPI void APIENTRY glLockArraysEXT (GLint, GLsizei);
19991+GLAPI void APIENTRY glUnlockArraysEXT (void);
19992+#endif /* GL_GLEXT_PROTOTYPES */
19993+typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);
19994+typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void);
19995+#endif
19996+
19997+#ifndef GL_EXT_cull_vertex
19998+#define GL_EXT_cull_vertex 1
19999+#ifdef GL_GLEXT_PROTOTYPES
20000+GLAPI void APIENTRY glCullParameterdvEXT (GLenum, GLdouble *);
20001+GLAPI void APIENTRY glCullParameterfvEXT (GLenum, GLfloat *);
20002+#endif /* GL_GLEXT_PROTOTYPES */
20003+typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params);
20004+typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params);
20005+#endif
20006+
20007+#ifndef GL_SGIX_ycrcb
20008+#define GL_SGIX_ycrcb 1
20009+#endif
20010+
20011+#ifndef GL_SGIX_fragment_lighting
20012+#define GL_SGIX_fragment_lighting 1
20013+#ifdef GL_GLEXT_PROTOTYPES
20014+GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum, GLenum);
20015+GLAPI void APIENTRY glFragmentLightfSGIX (GLenum, GLenum, GLfloat);
20016+GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum, GLenum, const GLfloat *);
20017+GLAPI void APIENTRY glFragmentLightiSGIX (GLenum, GLenum, GLint);
20018+GLAPI void APIENTRY glFragmentLightivSGIX (GLenum, GLenum, const GLint *);
20019+GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum, GLfloat);
20020+GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum, const GLfloat *);
20021+GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum, GLint);
20022+GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum, const GLint *);
20023+GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum, GLenum, GLfloat);
20024+GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum, GLenum, const GLfloat *);
20025+GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum, GLenum, GLint);
20026+GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum, GLenum, const GLint *);
20027+GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum, GLenum, GLfloat *);
20028+GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum, GLenum, GLint *);
20029+GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum, GLenum, GLfloat *);
20030+GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum, GLenum, GLint *);
20031+GLAPI void APIENTRY glLightEnviSGIX (GLenum, GLint);
20032+#endif /* GL_GLEXT_PROTOTYPES */
20033+typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode);
20034+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param);
20035+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);
20036+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param);
20037+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params);
20038+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param);
20039+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params);
20040+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param);
20041+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params);
20042+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param);
20043+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params);
20044+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param);
20045+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params);
20046+typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params);
20047+typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params);
20048+typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params);
20049+typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params);
20050+typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param);
20051+#endif
20052+
20053+#ifndef GL_IBM_rasterpos_clip
20054+#define GL_IBM_rasterpos_clip 1
20055+#endif
20056+
20057+#ifndef GL_HP_texture_lighting
20058+#define GL_HP_texture_lighting 1
20059+#endif
20060+
20061+#ifndef GL_EXT_draw_range_elements
20062+#define GL_EXT_draw_range_elements 1
20063+#ifdef GL_GLEXT_PROTOTYPES
20064+GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
20065+#endif /* GL_GLEXT_PROTOTYPES */
20066+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
20067+#endif
20068+
20069+#ifndef GL_WIN_phong_shading
20070+#define GL_WIN_phong_shading 1
20071+#endif
20072+
20073+#ifndef GL_WIN_specular_fog
20074+#define GL_WIN_specular_fog 1
20075+#endif
20076+
20077+#ifndef GL_EXT_light_texture
20078+#define GL_EXT_light_texture 1
20079+#ifdef GL_GLEXT_PROTOTYPES
20080+GLAPI void APIENTRY glApplyTextureEXT (GLenum);
20081+GLAPI void APIENTRY glTextureLightEXT (GLenum);
20082+GLAPI void APIENTRY glTextureMaterialEXT (GLenum, GLenum);
20083+#endif /* GL_GLEXT_PROTOTYPES */
20084+typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode);
20085+typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname);
20086+typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode);
20087+#endif
20088+
20089+#ifndef GL_SGIX_blend_alpha_minmax
20090+#define GL_SGIX_blend_alpha_minmax 1
20091+#endif
20092+
20093+#ifndef GL_EXT_bgra
20094+#define GL_EXT_bgra 1
20095+#endif
20096+
20097+#ifndef GL_SGIX_async
20098+#define GL_SGIX_async 1
20099+#ifdef GL_GLEXT_PROTOTYPES
20100+GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint);
20101+GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *);
20102+GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *);
20103+GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei);
20104+GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint, GLsizei);
20105+GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint);
20106+#endif /* GL_GLEXT_PROTOTYPES */
20107+typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker);
20108+typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp);
20109+typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp);
20110+typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range);
20111+typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range);
20112+typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker);
20113+#endif
20114+
20115+#ifndef GL_SGIX_async_pixel
20116+#define GL_SGIX_async_pixel 1
20117+#endif
20118+
20119+#ifndef GL_SGIX_async_histogram
20120+#define GL_SGIX_async_histogram 1
20121+#endif
20122+
20123+#ifndef GL_INTEL_parallel_arrays
20124+#define GL_INTEL_parallel_arrays 1
20125+#ifdef GL_GLEXT_PROTOTYPES
20126+GLAPI void APIENTRY glVertexPointervINTEL (GLint, GLenum, const GLvoid* *);
20127+GLAPI void APIENTRY glNormalPointervINTEL (GLenum, const GLvoid* *);
20128+GLAPI void APIENTRY glColorPointervINTEL (GLint, GLenum, const GLvoid* *);
20129+GLAPI void APIENTRY glTexCoordPointervINTEL (GLint, GLenum, const GLvoid* *);
20130+#endif /* GL_GLEXT_PROTOTYPES */
20131+typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
20132+typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer);
20133+typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
20134+typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
20135+#endif
20136+
20137+#ifndef GL_HP_occlusion_test
20138+#define GL_HP_occlusion_test 1
20139+#endif
20140+
20141+#ifndef GL_EXT_pixel_transform
20142+#define GL_EXT_pixel_transform 1
20143+#ifdef GL_GLEXT_PROTOTYPES
20144+GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum, GLenum, GLint);
20145+GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum, GLenum, GLfloat);
20146+GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum, GLenum, const GLint *);
20147+GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum, GLenum, const GLfloat *);
20148+/* ERO Begin */
20149+GLAPI void APIENTRY glGetPixelTransformParameterivEXT (GLenum, GLenum, GLint *);
20150+GLAPI void APIENTRY glGetPixelTransformParameterfvEXT (GLenum, GLenum, GLfloat *);
20151+/* ERO End */
20152+#endif /* GL_GLEXT_PROTOTYPES */
20153+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param);
20154+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param);
20155+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
20156+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
20157+/* ERO Begin */
20158+typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
20159+typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
20160+/* ERO End */
20161+#endif
20162+
20163+#ifndef GL_EXT_pixel_transform_color_table
20164+#define GL_EXT_pixel_transform_color_table 1
20165+#endif
20166+
20167+#ifndef GL_EXT_shared_texture_palette
20168+#define GL_EXT_shared_texture_palette 1
20169+#endif
20170+
20171+#ifndef GL_EXT_separate_specular_color
20172+#define GL_EXT_separate_specular_color 1
20173+#endif
20174+
20175+#ifndef GL_EXT_secondary_color
20176+#define GL_EXT_secondary_color 1
20177+#ifdef GL_GLEXT_PROTOTYPES
20178+GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte, GLbyte, GLbyte);
20179+GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *);
20180+GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble, GLdouble, GLdouble);
20181+GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *);
20182+GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat, GLfloat, GLfloat);
20183+GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *);
20184+GLAPI void APIENTRY glSecondaryColor3iEXT (GLint, GLint, GLint);
20185+GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *);
20186+GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort, GLshort, GLshort);
20187+GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *);
20188+GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte, GLubyte, GLubyte);
20189+GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *);
20190+GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint, GLuint, GLuint);
20191+GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *);
20192+GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort, GLushort, GLushort);
20193+GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *);
20194+GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint, GLenum, GLsizei, const GLvoid *);
20195+#endif /* GL_GLEXT_PROTOTYPES */
20196+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue);
20197+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v);
20198+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue);
20199+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v);
20200+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);
20201+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);
20202+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue);
20203+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v);
20204+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue);
20205+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v);
20206+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);
20207+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v);
20208+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue);
20209+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);
20210+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);
20211+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);
20212+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
20213+#endif
20214+
20215+#ifndef GL_EXT_texture_perturb_normal
20216+#define GL_EXT_texture_perturb_normal 1
20217+#ifdef GL_GLEXT_PROTOTYPES
20218+GLAPI void APIENTRY glTextureNormalEXT (GLenum);
20219+#endif /* GL_GLEXT_PROTOTYPES */
20220+typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode);
20221+#endif
20222+
20223+#ifndef GL_EXT_multi_draw_arrays
20224+#define GL_EXT_multi_draw_arrays 1
20225+#ifdef GL_GLEXT_PROTOTYPES
20226+GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei);
20227+GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
20228+#endif /* GL_GLEXT_PROTOTYPES */
20229+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
20230+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
20231+#endif
20232+
20233+#ifndef GL_EXT_fog_coord
20234+#define GL_EXT_fog_coord 1
20235+#ifdef GL_GLEXT_PROTOTYPES
20236+GLAPI void APIENTRY glFogCoordfEXT (GLfloat);
20237+GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *);
20238+GLAPI void APIENTRY glFogCoorddEXT (GLdouble);
20239+GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *);
20240+GLAPI void APIENTRY glFogCoordPointerEXT (GLenum, GLsizei, const GLvoid *);
20241+#endif /* GL_GLEXT_PROTOTYPES */
20242+typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord);
20243+typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord);
20244+typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord);
20245+typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord);
20246+typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
20247+#endif
20248+
20249+#ifndef GL_REND_screen_coordinates
20250+#define GL_REND_screen_coordinates 1
20251+#endif
20252+
20253+#ifndef GL_EXT_coordinate_frame
20254+#define GL_EXT_coordinate_frame 1
20255+#ifdef GL_GLEXT_PROTOTYPES
20256+GLAPI void APIENTRY glTangent3bEXT (GLbyte, GLbyte, GLbyte);
20257+GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *);
20258+GLAPI void APIENTRY glTangent3dEXT (GLdouble, GLdouble, GLdouble);
20259+GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *);
20260+GLAPI void APIENTRY glTangent3fEXT (GLfloat, GLfloat, GLfloat);
20261+GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *);
20262+GLAPI void APIENTRY glTangent3iEXT (GLint, GLint, GLint);
20263+GLAPI void APIENTRY glTangent3ivEXT (const GLint *);
20264+GLAPI void APIENTRY glTangent3sEXT (GLshort, GLshort, GLshort);
20265+GLAPI void APIENTRY glTangent3svEXT (const GLshort *);
20266+GLAPI void APIENTRY glBinormal3bEXT (GLbyte, GLbyte, GLbyte);
20267+GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *);
20268+GLAPI void APIENTRY glBinormal3dEXT (GLdouble, GLdouble, GLdouble);
20269+GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *);
20270+GLAPI void APIENTRY glBinormal3fEXT (GLfloat, GLfloat, GLfloat);
20271+GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *);
20272+GLAPI void APIENTRY glBinormal3iEXT (GLint, GLint, GLint);
20273+GLAPI void APIENTRY glBinormal3ivEXT (const GLint *);
20274+GLAPI void APIENTRY glBinormal3sEXT (GLshort, GLshort, GLshort);
20275+GLAPI void APIENTRY glBinormal3svEXT (const GLshort *);
20276+GLAPI void APIENTRY glTangentPointerEXT (GLenum, GLsizei, const GLvoid *);
20277+GLAPI void APIENTRY glBinormalPointerEXT (GLenum, GLsizei, const GLvoid *);
20278+#endif /* GL_GLEXT_PROTOTYPES */
20279+typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz);
20280+typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v);
20281+typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz);
20282+typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v);
20283+typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz);
20284+typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v);
20285+typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz);
20286+typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v);
20287+typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz);
20288+typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v);
20289+typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz);
20290+typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v);
20291+typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz);
20292+typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v);
20293+typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz);
20294+typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v);
20295+typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz);
20296+typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v);
20297+typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz);
20298+typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v);
20299+typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
20300+typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
20301+#endif
20302+
20303+#ifndef GL_EXT_texture_env_combine
20304+#define GL_EXT_texture_env_combine 1
20305+#endif
20306+
20307+#ifndef GL_APPLE_specular_vector
20308+#define GL_APPLE_specular_vector 1
20309+#endif
20310+
20311+#ifndef GL_APPLE_transform_hint
20312+#define GL_APPLE_transform_hint 1
20313+#endif
20314+
20315+#ifndef GL_SGIX_fog_scale
20316+#define GL_SGIX_fog_scale 1
20317+#endif
20318+
20319+#ifndef GL_SUNX_constant_data
20320+#define GL_SUNX_constant_data 1
20321+#ifdef GL_GLEXT_PROTOTYPES
20322+GLAPI void APIENTRY glFinishTextureSUNX (void);
20323+#endif /* GL_GLEXT_PROTOTYPES */
20324+typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void);
20325+#endif
20326+
20327+#ifndef GL_SUN_global_alpha
20328+#define GL_SUN_global_alpha 1
20329+#ifdef GL_GLEXT_PROTOTYPES
20330+GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte);
20331+GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort);
20332+GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint);
20333+GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat);
20334+GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble);
20335+GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte);
20336+GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort);
20337+GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint);
20338+#endif /* GL_GLEXT_PROTOTYPES */
20339+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor);
20340+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor);
20341+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor);
20342+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor);
20343+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor);
20344+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor);
20345+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor);
20346+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor);
20347+#endif
20348+
20349+#ifndef GL_SUN_triangle_list
20350+#define GL_SUN_triangle_list 1
20351+#ifdef GL_GLEXT_PROTOTYPES
20352+GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint);
20353+GLAPI void APIENTRY glReplacementCodeusSUN (GLushort);
20354+GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte);
20355+GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *);
20356+GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *);
20357+GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *);
20358+GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum, GLsizei, const GLvoid* *);
20359+#endif /* GL_GLEXT_PROTOTYPES */
20360+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code);
20361+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code);
20362+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code);
20363+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code);
20364+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code);
20365+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code);
20366+typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer);
20367+#endif
20368+
20369+#ifndef GL_SUN_vertex
20370+#define GL_SUN_vertex 1
20371+#ifdef GL_GLEXT_PROTOTYPES
20372+GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat);
20373+GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *, const GLfloat *);
20374+GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
20375+GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *, const GLfloat *);
20376+GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20377+GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *, const GLfloat *);
20378+GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20379+GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *);
20380+GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20381+GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
20382+GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20383+GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *, const GLfloat *);
20384+GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20385+GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *, const GLfloat *);
20386+GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat, GLfloat, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
20387+GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *, const GLubyte *, const GLfloat *);
20388+GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20389+GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
20390+GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20391+GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
20392+GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20393+GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
20394+GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20395+GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
20396+GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat);
20397+GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *, const GLfloat *);
20398+GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
20399+GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *, const GLubyte *, const GLfloat *);
20400+GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20401+GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
20402+GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20403+GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
20404+GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20405+GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *);
20406+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20407+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
20408+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20409+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *);
20410+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20411+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
20412+#endif /* GL_GLEXT_PROTOTYPES */
20413+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
20414+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v);
20415+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
20416+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v);
20417+typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
20418+typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v);
20419+typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20420+typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v);
20421+typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20422+typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v);
20423+typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
20424+typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
20425+typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20426+typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
20427+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
20428+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v);
20429+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
20430+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v);
20431+typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20432+typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v);
20433+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);
20434+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20435+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);
20436+typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20437+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
20438+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v);
20439+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
20440+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v);
20441+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
20442+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v);
20443+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20444+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v);
20445+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);
20446+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20447+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
20448+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v);
20449+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20450+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
20451+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);
20452+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20453+#endif
20454+
20455+#ifndef GL_EXT_blend_func_separate
20456+#define GL_EXT_blend_func_separate 1
20457+#ifdef GL_GLEXT_PROTOTYPES
20458+GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum, GLenum, GLenum, GLenum);
20459+#endif /* GL_GLEXT_PROTOTYPES */
20460+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
20461+#endif
20462+
20463+#ifndef GL_INGR_blend_func_separate
20464+#define GL_INGR_blend_func_separate 1
20465+#ifdef GL_GLEXT_PROTOTYPES
20466+GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum, GLenum, GLenum, GLenum);
20467+#endif /* GL_GLEXT_PROTOTYPES */
20468+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
20469+#endif
20470+
20471+#ifndef GL_INGR_color_clamp
20472+#define GL_INGR_color_clamp 1
20473+#endif
20474+
20475+#ifndef GL_INGR_interlace_read
20476+#define GL_INGR_interlace_read 1
20477+#endif
20478+
20479+#ifndef GL_EXT_stencil_wrap
20480+#define GL_EXT_stencil_wrap 1
20481+#endif
20482+
20483+#ifndef GL_EXT_422_pixels
20484+#define GL_EXT_422_pixels 1
20485+#endif
20486+
20487+#ifndef GL_NV_texgen_reflection
20488+#define GL_NV_texgen_reflection 1
20489+#endif
20490+
20491+#ifndef GL_SUN_convolution_border_modes
20492+#define GL_SUN_convolution_border_modes 1
20493+#endif
20494+
20495+#ifndef GL_EXT_texture_env_add
20496+#define GL_EXT_texture_env_add 1
20497+#endif
20498+
20499+#ifndef GL_EXT_texture_lod_bias
20500+#define GL_EXT_texture_lod_bias 1
20501+#endif
20502+
20503+#ifndef GL_EXT_texture_filter_anisotropic
20504+#define GL_EXT_texture_filter_anisotropic 1
20505+#endif
20506+
20507+#ifndef GL_EXT_vertex_weighting
20508+#define GL_EXT_vertex_weighting 1
20509+#ifdef GL_GLEXT_PROTOTYPES
20510+GLAPI void APIENTRY glVertexWeightfEXT (GLfloat);
20511+GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *);
20512+GLAPI void APIENTRY glVertexWeightPointerEXT (GLsizei, GLenum, GLsizei, const GLvoid *);
20513+#endif /* GL_GLEXT_PROTOTYPES */
20514+typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight);
20515+typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight);
20516+typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer);
20517+#endif
20518+
20519+#ifndef GL_NV_light_max_exponent
20520+#define GL_NV_light_max_exponent 1
20521+#endif
20522+
20523+#ifndef GL_NV_vertex_array_range
20524+#define GL_NV_vertex_array_range 1
20525+#ifdef GL_GLEXT_PROTOTYPES
20526+GLAPI void APIENTRY glFlushVertexArrayRangeNV (void);
20527+GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei, const GLvoid *);
20528+#endif /* GL_GLEXT_PROTOTYPES */
20529+typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void);
20530+typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer);
20531+#endif
20532+
20533+#ifndef GL_NV_register_combiners
20534+#define GL_NV_register_combiners 1
20535+#ifdef GL_GLEXT_PROTOTYPES
20536+GLAPI void APIENTRY glCombinerParameterfvNV (GLenum, const GLfloat *);
20537+GLAPI void APIENTRY glCombinerParameterfNV (GLenum, GLfloat);
20538+GLAPI void APIENTRY glCombinerParameterivNV (GLenum, const GLint *);
20539+GLAPI void APIENTRY glCombinerParameteriNV (GLenum, GLint);
20540+GLAPI void APIENTRY glCombinerInputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum);
20541+GLAPI void APIENTRY glCombinerOutputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean);
20542+GLAPI void APIENTRY glFinalCombinerInputNV (GLenum, GLenum, GLenum, GLenum);
20543+GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum, GLenum, GLenum, GLenum, GLfloat *);
20544+GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum, GLenum, GLenum, GLenum, GLint *);
20545+GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum, GLenum, GLenum, GLfloat *);
20546+GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum, GLenum, GLenum, GLint *);
20547+GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum, GLenum, GLfloat *);
20548+GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum, GLenum, GLint *);
20549+#endif /* GL_GLEXT_PROTOTYPES */
20550+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);
20551+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);
20552+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
20553+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);
20554+typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
20555+typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
20556+typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
20557+typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
20558+typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
20559+typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
20560+typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params);
20561+typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params);
20562+typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params);
20563+#endif
20564+
20565+#ifndef GL_NV_fog_distance
20566+#define GL_NV_fog_distance 1
20567+#endif
20568+
20569+#ifndef GL_NV_texgen_emboss
20570+#define GL_NV_texgen_emboss 1
20571+#endif
20572+
20573+#ifndef GL_NV_blend_square
20574+#define GL_NV_blend_square 1
20575+#endif
20576+
20577+#ifndef GL_NV_texture_env_combine4
20578+#define GL_NV_texture_env_combine4 1
20579+#endif
20580+
20581+#ifndef GL_MESA_resize_buffers
20582+#define GL_MESA_resize_buffers 1
20583+#ifdef GL_GLEXT_PROTOTYPES
20584+GLAPI void APIENTRY glResizeBuffersMESA (void);
20585+#endif /* GL_GLEXT_PROTOTYPES */
20586+typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void);
20587+#endif
20588+
20589+#ifndef GL_MESA_window_pos
20590+#define GL_MESA_window_pos 1
20591+#ifdef GL_GLEXT_PROTOTYPES
20592+GLAPI void APIENTRY glWindowPos2dMESA (GLdouble, GLdouble);
20593+GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *);
20594+GLAPI void APIENTRY glWindowPos2fMESA (GLfloat, GLfloat);
20595+GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *);
20596+GLAPI void APIENTRY glWindowPos2iMESA (GLint, GLint);
20597+GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *);
20598+GLAPI void APIENTRY glWindowPos2sMESA (GLshort, GLshort);
20599+GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *);
20600+GLAPI void APIENTRY glWindowPos3dMESA (GLdouble, GLdouble, GLdouble);
20601+GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *);
20602+GLAPI void APIENTRY glWindowPos3fMESA (GLfloat, GLfloat, GLfloat);
20603+GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *);
20604+GLAPI void APIENTRY glWindowPos3iMESA (GLint, GLint, GLint);
20605+GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *);
20606+GLAPI void APIENTRY glWindowPos3sMESA (GLshort, GLshort, GLshort);
20607+GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *);
20608+GLAPI void APIENTRY glWindowPos4dMESA (GLdouble, GLdouble, GLdouble, GLdouble);
20609+GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *);
20610+GLAPI void APIENTRY glWindowPos4fMESA (GLfloat, GLfloat, GLfloat, GLfloat);
20611+GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *);
20612+GLAPI void APIENTRY glWindowPos4iMESA (GLint, GLint, GLint, GLint);
20613+GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *);
20614+GLAPI void APIENTRY glWindowPos4sMESA (GLshort, GLshort, GLshort, GLshort);
20615+GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *);
20616+#endif /* GL_GLEXT_PROTOTYPES */
20617+typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y);
20618+typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v);
20619+typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y);
20620+typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v);
20621+typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y);
20622+typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v);
20623+typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y);
20624+typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v);
20625+typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z);
20626+typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v);
20627+typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z);
20628+typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v);
20629+typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z);
20630+typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v);
20631+typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z);
20632+typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v);
20633+typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
20634+typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v);
20635+typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20636+typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v);
20637+typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w);
20638+typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v);
20639+typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w);
20640+typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v);
20641+#endif
20642+
20643+#ifndef GL_IBM_cull_vertex
20644+#define GL_IBM_cull_vertex 1
20645+#endif
20646+
20647+#ifndef GL_IBM_multimode_draw_arrays
20648+#define GL_IBM_multimode_draw_arrays 1
20649+#ifdef GL_GLEXT_PROTOTYPES
20650+GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *, const GLint *, const GLsizei *, GLsizei, GLint);
20651+GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *, const GLsizei *, GLenum, const GLvoid* const *, GLsizei, GLint);
20652+#endif /* GL_GLEXT_PROTOTYPES */
20653+typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
20654+typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride);
20655+#endif
20656+
20657+#ifndef GL_IBM_vertex_array_lists
20658+#define GL_IBM_vertex_array_lists 1
20659+#ifdef GL_GLEXT_PROTOTYPES
20660+GLAPI void APIENTRY glColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20661+GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20662+GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint, const GLboolean* *, GLint);
20663+GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
20664+GLAPI void APIENTRY glIndexPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
20665+GLAPI void APIENTRY glNormalPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
20666+GLAPI void APIENTRY glTexCoordPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20667+GLAPI void APIENTRY glVertexPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20668+#endif /* GL_GLEXT_PROTOTYPES */
20669+typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20670+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20671+typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride);
20672+typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20673+typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20674+typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20675+typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20676+typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20677+#endif
20678+
20679+#ifndef GL_SGIX_subsample
20680+#define GL_SGIX_subsample 1
20681+#endif
20682+
20683+#ifndef GL_SGIX_ycrcba
20684+#define GL_SGIX_ycrcba 1
20685+#endif
20686+
20687+#ifndef GL_SGIX_ycrcb_subsample
20688+#define GL_SGIX_ycrcb_subsample 1
20689+#endif
20690+
20691+#ifndef GL_SGIX_depth_pass_instrument
20692+#define GL_SGIX_depth_pass_instrument 1
20693+#endif
20694+
20695+#ifndef GL_3DFX_texture_compression_FXT1
20696+#define GL_3DFX_texture_compression_FXT1 1
20697+#endif
20698+
20699+#ifndef GL_3DFX_multisample
20700+#define GL_3DFX_multisample 1
20701+#endif
20702+
20703+#ifndef GL_3DFX_tbuffer
20704+#define GL_3DFX_tbuffer 1
20705+#ifdef GL_GLEXT_PROTOTYPES
20706+GLAPI void APIENTRY glTbufferMask3DFX (GLuint);
20707+#endif /* GL_GLEXT_PROTOTYPES */
20708+typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask);
20709+#endif
20710+
20711+#ifndef GL_EXT_multisample
20712+#define GL_EXT_multisample 1
20713+#ifdef GL_GLEXT_PROTOTYPES
20714+GLAPI void APIENTRY glSampleMaskEXT (GLclampf, GLboolean);
20715+GLAPI void APIENTRY glSamplePatternEXT (GLenum);
20716+#endif /* GL_GLEXT_PROTOTYPES */
20717+typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert);
20718+typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern);
20719+#endif
20720+
20721+#ifndef GL_SGIX_vertex_preclip
20722+#define GL_SGIX_vertex_preclip 1
20723+#endif
20724+
20725+#ifndef GL_SGIX_convolution_accuracy
20726+#define GL_SGIX_convolution_accuracy 1
20727+#endif
20728+
20729+#ifndef GL_SGIX_resample
20730+#define GL_SGIX_resample 1
20731+#endif
20732+
20733+#ifndef GL_SGIS_point_line_texgen
20734+#define GL_SGIS_point_line_texgen 1
20735+#endif
20736+
20737+#ifndef GL_SGIS_texture_color_mask
20738+#define GL_SGIS_texture_color_mask 1
20739+#ifdef GL_GLEXT_PROTOTYPES
20740+GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean, GLboolean, GLboolean, GLboolean);
20741+#endif /* GL_GLEXT_PROTOTYPES */
20742+typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
20743+#endif
20744+
20745+#ifndef GL_SGIX_igloo_interface
20746+#define GL_SGIX_igloo_interface 1
20747+#ifdef GL_GLEXT_PROTOTYPES
20748+GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum, const GLvoid *);
20749+#endif /* GL_GLEXT_PROTOTYPES */
20750+typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params);
20751+#endif
20752+
20753+#ifndef GL_EXT_texture_env_dot3
20754+#define GL_EXT_texture_env_dot3 1
20755+#endif
20756+
20757+#ifndef GL_ATI_texture_mirror_once
20758+#define GL_ATI_texture_mirror_once 1
20759+#endif
20760+
20761+#ifndef GL_NV_fence
20762+#define GL_NV_fence 1
20763+#ifdef GL_GLEXT_PROTOTYPES
20764+GLAPI void APIENTRY glDeleteFencesNV (GLsizei, const GLuint *);
20765+GLAPI void APIENTRY glGenFencesNV (GLsizei, GLuint *);
20766+GLAPI GLboolean APIENTRY glIsFenceNV (GLuint);
20767+GLAPI GLboolean APIENTRY glTestFenceNV (GLuint);
20768+GLAPI void APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *);
20769+GLAPI void APIENTRY glFinishFenceNV (GLuint);
20770+GLAPI void APIENTRY glSetFenceNV (GLuint, GLenum);
20771+#endif /* GL_GLEXT_PROTOTYPES */
20772+typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
20773+typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
20774+typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
20775+typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
20776+typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
20777+typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
20778+typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
20779+#endif
20780+
20781+#ifndef GL_NV_evaluators
20782+#define GL_NV_evaluators 1
20783+#ifdef GL_GLEXT_PROTOTYPES
20784+GLAPI void APIENTRY glMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLint, GLint, GLboolean, const GLvoid *);
20785+GLAPI void APIENTRY glMapParameterivNV (GLenum, GLenum, const GLint *);
20786+GLAPI void APIENTRY glMapParameterfvNV (GLenum, GLenum, const GLfloat *);
20787+GLAPI void APIENTRY glGetMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLboolean, GLvoid *);
20788+GLAPI void APIENTRY glGetMapParameterivNV (GLenum, GLenum, GLint *);
20789+GLAPI void APIENTRY glGetMapParameterfvNV (GLenum, GLenum, GLfloat *);
20790+GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum, GLuint, GLenum, GLint *);
20791+GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum, GLuint, GLenum, GLfloat *);
20792+GLAPI void APIENTRY glEvalMapsNV (GLenum, GLenum);
20793+#endif /* GL_GLEXT_PROTOTYPES */
20794+typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points);
20795+typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params);
20796+typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params);
20797+typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points);
20798+typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params);
20799+typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params);
20800+typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
20801+typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
20802+typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode);
20803+#endif
20804+
20805+#ifndef GL_NV_packed_depth_stencil
20806+#define GL_NV_packed_depth_stencil 1
20807+#endif
20808+
20809+#ifndef GL_NV_register_combiners2
20810+#define GL_NV_register_combiners2 1
20811+#ifdef GL_GLEXT_PROTOTYPES
20812+GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum, GLenum, const GLfloat *);
20813+GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum, GLenum, GLfloat *);
20814+#endif /* GL_GLEXT_PROTOTYPES */
20815+typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params);
20816+typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params);
20817+#endif
20818+
20819+#ifndef GL_NV_texture_compression_vtc
20820+#define GL_NV_texture_compression_vtc 1
20821+#endif
20822+
20823+#ifndef GL_NV_texture_rectangle
20824+#define GL_NV_texture_rectangle 1
20825+#endif
20826+
20827+#ifndef GL_NV_texture_shader
20828+#define GL_NV_texture_shader 1
20829+#endif
20830+
20831+#ifndef GL_NV_texture_shader2
20832+#define GL_NV_texture_shader2 1
20833+#endif
20834+
20835+#ifndef GL_NV_vertex_array_range2
20836+#define GL_NV_vertex_array_range2 1
20837+#endif
20838+
20839+#ifndef GL_NV_vertex_program
20840+#define GL_NV_vertex_program 1
20841+#ifdef GL_GLEXT_PROTOTYPES
20842+GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei, const GLuint *, GLboolean *);
20843+GLAPI void APIENTRY glBindProgramNV (GLenum, GLuint);
20844+GLAPI void APIENTRY glDeleteProgramsNV (GLsizei, const GLuint *);
20845+GLAPI void APIENTRY glExecuteProgramNV (GLenum, GLuint, const GLfloat *);
20846+GLAPI void APIENTRY glGenProgramsNV (GLsizei, GLuint *);
20847+GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum, GLuint, GLenum, GLdouble *);
20848+GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum, GLuint, GLenum, GLfloat *);
20849+GLAPI void APIENTRY glGetProgramivNV (GLuint, GLenum, GLint *);
20850+GLAPI void APIENTRY glGetProgramStringNV (GLuint, GLenum, GLubyte *);
20851+GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum, GLuint, GLenum, GLint *);
20852+GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint, GLenum, GLdouble *);
20853+GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint, GLenum, GLfloat *);
20854+GLAPI void APIENTRY glGetVertexAttribivNV (GLuint, GLenum, GLint *);
20855+GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint, GLenum, GLvoid* *);
20856+GLAPI GLboolean APIENTRY glIsProgramNV (GLuint);
20857+GLAPI void APIENTRY glLoadProgramNV (GLenum, GLuint, GLsizei, const GLubyte *);
20858+GLAPI void APIENTRY glProgramParameter4dNV (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
20859+GLAPI void APIENTRY glProgramParameter4dvNV (GLenum, GLuint, const GLdouble *);
20860+GLAPI void APIENTRY glProgramParameter4fNV (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
20861+GLAPI void APIENTRY glProgramParameter4fvNV (GLenum, GLuint, const GLfloat *);
20862+GLAPI void APIENTRY glProgramParameters4dvNV (GLenum, GLuint, GLuint, const GLdouble *);
20863+GLAPI void APIENTRY glProgramParameters4fvNV (GLenum, GLuint, GLuint, const GLfloat *);
20864+GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei, const GLuint *);
20865+GLAPI void APIENTRY glTrackMatrixNV (GLenum, GLuint, GLenum, GLenum);
20866+GLAPI void APIENTRY glVertexAttribPointerNV (GLuint, GLint, GLenum, GLsizei, const GLvoid *);
20867+GLAPI void APIENTRY glVertexAttrib1dNV (GLuint, GLdouble);
20868+GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint, const GLdouble *);
20869+GLAPI void APIENTRY glVertexAttrib1fNV (GLuint, GLfloat);
20870+GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint, const GLfloat *);
20871+GLAPI void APIENTRY glVertexAttrib1sNV (GLuint, GLshort);
20872+GLAPI void APIENTRY glVertexAttrib1svNV (GLuint, const GLshort *);
20873+GLAPI void APIENTRY glVertexAttrib2dNV (GLuint, GLdouble, GLdouble);
20874+GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint, const GLdouble *);
20875+GLAPI void APIENTRY glVertexAttrib2fNV (GLuint, GLfloat, GLfloat);
20876+GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint, const GLfloat *);
20877+GLAPI void APIENTRY glVertexAttrib2sNV (GLuint, GLshort, GLshort);
20878+GLAPI void APIENTRY glVertexAttrib2svNV (GLuint, const GLshort *);
20879+GLAPI void APIENTRY glVertexAttrib3dNV (GLuint, GLdouble, GLdouble, GLdouble);
20880+GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint, const GLdouble *);
20881+GLAPI void APIENTRY glVertexAttrib3fNV (GLuint, GLfloat, GLfloat, GLfloat);
20882+GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint, const GLfloat *);
20883+GLAPI void APIENTRY glVertexAttrib3sNV (GLuint, GLshort, GLshort, GLshort);
20884+GLAPI void APIENTRY glVertexAttrib3svNV (GLuint, const GLshort *);
20885+GLAPI void APIENTRY glVertexAttrib4dNV (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
20886+GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint, const GLdouble *);
20887+GLAPI void APIENTRY glVertexAttrib4fNV (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
20888+GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint, const GLfloat *);
20889+GLAPI void APIENTRY glVertexAttrib4sNV (GLuint, GLshort, GLshort, GLshort, GLshort);
20890+GLAPI void APIENTRY glVertexAttrib4svNV (GLuint, const GLshort *);
20891+GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
20892+GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint, const GLubyte *);
20893+GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint, GLsizei, const GLdouble *);
20894+GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint, GLsizei, const GLfloat *);
20895+GLAPI void APIENTRY glVertexAttribs1svNV (GLuint, GLsizei, const GLshort *);
20896+GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint, GLsizei, const GLdouble *);
20897+GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint, GLsizei, const GLfloat *);
20898+GLAPI void APIENTRY glVertexAttribs2svNV (GLuint, GLsizei, const GLshort *);
20899+GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint, GLsizei, const GLdouble *);
20900+GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint, GLsizei, const GLfloat *);
20901+GLAPI void APIENTRY glVertexAttribs3svNV (GLuint, GLsizei, const GLshort *);
20902+GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint, GLsizei, const GLdouble *);
20903+GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint, GLsizei, const GLfloat *);
20904+GLAPI void APIENTRY glVertexAttribs4svNV (GLuint, GLsizei, const GLshort *);
20905+GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint, GLsizei, const GLubyte *);
20906+#endif /* GL_GLEXT_PROTOTYPES */
20907+typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences);
20908+typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id);
20909+typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
20910+typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params);
20911+typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs);
20912+typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params);
20913+typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
20914+typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params);
20915+typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program);
20916+typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params);
20917+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params);
20918+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params);
20919+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params);
20920+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
20921+typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id);
20922+typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
20923+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
20924+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v);
20925+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20926+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v);
20927+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint count, const GLdouble *v);
20928+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint count, const GLfloat *v);
20929+typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
20930+typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform);
20931+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer);
20932+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x);
20933+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v);
20934+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x);
20935+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v);
20936+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x);
20937+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v);
20938+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y);
20939+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v);
20940+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y);
20941+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v);
20942+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y);
20943+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v);
20944+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
20945+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v);
20946+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
20947+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v);
20948+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
20949+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v);
20950+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
20951+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v);
20952+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20953+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v);
20954+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
20955+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v);
20956+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
20957+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v);
20958+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
20959+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
20960+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
20961+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
20962+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
20963+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
20964+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
20965+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
20966+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
20967+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
20968+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
20969+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
20970+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v);
20971+#endif
20972+
20973+#ifndef GL_SGIX_texture_coordinate_clamp
20974+#define GL_SGIX_texture_coordinate_clamp 1
20975+#endif
20976+
20977+#ifndef GL_SGIX_scalebias_hint
20978+#define GL_SGIX_scalebias_hint 1
20979+#endif
20980+
20981+#ifndef GL_OML_interlace
20982+#define GL_OML_interlace 1
20983+#endif
20984+
20985+#ifndef GL_OML_subsample
20986+#define GL_OML_subsample 1
20987+#endif
20988+
20989+#ifndef GL_OML_resample
20990+#define GL_OML_resample 1
20991+#endif
20992+
20993+#ifndef GL_NV_copy_depth_to_color
20994+#define GL_NV_copy_depth_to_color 1
20995+#endif
20996+
20997+#ifndef GL_ATI_envmap_bumpmap
20998+#define GL_ATI_envmap_bumpmap 1
20999+#ifdef GL_GLEXT_PROTOTYPES
21000+GLAPI void APIENTRY glTexBumpParameterivATI (GLenum, const GLint *);
21001+GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum, const GLfloat *);
21002+GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum, GLint *);
21003+GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum, GLfloat *);
21004+#endif /* GL_GLEXT_PROTOTYPES */
21005+typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param);
21006+typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param);
21007+typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param);
21008+typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param);
21009+#endif
21010+
21011+#ifndef GL_ATI_fragment_shader
21012+#define GL_ATI_fragment_shader 1
21013+#ifdef GL_GLEXT_PROTOTYPES
21014+GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint);
21015+GLAPI void APIENTRY glBindFragmentShaderATI (GLuint);
21016+GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint);
21017+GLAPI void APIENTRY glBeginFragmentShaderATI (void);
21018+GLAPI void APIENTRY glEndFragmentShaderATI (void);
21019+GLAPI void APIENTRY glPassTexCoordATI (GLuint, GLuint, GLenum);
21020+GLAPI void APIENTRY glSampleMapATI (GLuint, GLuint, GLenum);
21021+GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21022+GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21023+GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21024+GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
21025+GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21026+GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21027+GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint, const GLfloat *);
21028+#endif /* GL_GLEXT_PROTOTYPES */
21029+typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range);
21030+typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id);
21031+typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id);
21032+typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void);
21033+typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void);
21034+typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle);
21035+typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle);
21036+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
21037+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
21038+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);
21039+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
21040+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
21041+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);
21042+typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value);
21043+#endif
21044+
21045+#ifndef GL_ATI_pn_triangles
21046+#define GL_ATI_pn_triangles 1
21047+#ifdef GL_GLEXT_PROTOTYPES
21048+GLAPI void APIENTRY glPNTrianglesiATI (GLenum, GLint);
21049+GLAPI void APIENTRY glPNTrianglesfATI (GLenum, GLfloat);
21050+#endif /* GL_GLEXT_PROTOTYPES */
21051+typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param);
21052+typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param);
21053+#endif
21054+
21055+#ifndef GL_ATI_vertex_array_object
21056+#define GL_ATI_vertex_array_object 1
21057+#ifdef GL_GLEXT_PROTOTYPES
21058+GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei, const GLvoid *, GLenum);
21059+GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint);
21060+GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint, GLuint, GLsizei, const GLvoid *, GLenum);
21061+GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint, GLenum, GLfloat *);
21062+GLAPI void APIENTRY glGetObjectBufferivATI (GLuint, GLenum, GLint *);
21063+GLAPI void APIENTRY glFreeObjectBufferATI (GLuint);
21064+/* ERO Begin */
21065+GLAPI void APIENTRY glDeleteObjectBufferATI (GLuint);
21066+/* ERO End */
21067+GLAPI void APIENTRY glArrayObjectATI (GLenum, GLint, GLenum, GLsizei, GLuint, GLuint);
21068+GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum, GLenum, GLfloat *);
21069+GLAPI void APIENTRY glGetArrayObjectivATI (GLenum, GLenum, GLint *);
21070+GLAPI void APIENTRY glVariantArrayObjectATI (GLuint, GLenum, GLsizei, GLuint, GLuint);
21071+GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint, GLenum, GLfloat *);
21072+GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint, GLenum, GLint *);
21073+#endif /* GL_GLEXT_PROTOTYPES */
21074+typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage);
21075+typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer);
21076+typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve);
21077+typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params);
21078+typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params);
21079+typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer);
21080+typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
21081+typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params);
21082+typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params);
21083+typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
21084+typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params);
21085+typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params);
21086+#endif
21087+
21088+#ifndef GL_EXT_vertex_shader
21089+#define GL_EXT_vertex_shader 1
21090+#ifdef GL_GLEXT_PROTOTYPES
21091+GLAPI void APIENTRY glBeginVertexShaderEXT (void);
21092+GLAPI void APIENTRY glEndVertexShaderEXT (void);
21093+GLAPI void APIENTRY glBindVertexShaderEXT (GLuint);
21094+GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint);
21095+GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint);
21096+GLAPI void APIENTRY glShaderOp1EXT (GLenum, GLuint, GLuint);
21097+GLAPI void APIENTRY glShaderOp2EXT (GLenum, GLuint, GLuint, GLuint);
21098+GLAPI void APIENTRY glShaderOp3EXT (GLenum, GLuint, GLuint, GLuint, GLuint);
21099+GLAPI void APIENTRY glSwizzleEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum);
21100+GLAPI void APIENTRY glWriteMaskEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum);
21101+GLAPI void APIENTRY glInsertComponentEXT (GLuint, GLuint, GLuint);
21102+GLAPI void APIENTRY glExtractComponentEXT (GLuint, GLuint, GLuint);
21103+GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum, GLenum, GLenum, GLuint);
21104+GLAPI void APIENTRY glSetInvariantEXT (GLuint, GLenum, const GLvoid *);
21105+GLAPI void APIENTRY glSetLocalConstantEXT (GLuint, GLenum, const GLvoid *);
21106+GLAPI void APIENTRY glVariantbvEXT (GLuint, const GLbyte *);
21107+GLAPI void APIENTRY glVariantsvEXT (GLuint, const GLshort *);
21108+GLAPI void APIENTRY glVariantivEXT (GLuint, const GLint *);
21109+GLAPI void APIENTRY glVariantfvEXT (GLuint, const GLfloat *);
21110+GLAPI void APIENTRY glVariantdvEXT (GLuint, const GLdouble *);
21111+GLAPI void APIENTRY glVariantubvEXT (GLuint, const GLubyte *);
21112+GLAPI void APIENTRY glVariantusvEXT (GLuint, const GLushort *);
21113+GLAPI void APIENTRY glVariantuivEXT (GLuint, const GLuint *);
21114+GLAPI void APIENTRY glVariantPointerEXT (GLuint, GLenum, GLuint, const GLvoid *);
21115+GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint);
21116+GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint);
21117+GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum, GLenum);
21118+GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum, GLenum);
21119+GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum, GLenum, GLenum);
21120+GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum, GLenum);
21121+GLAPI GLuint APIENTRY glBindParameterEXT (GLenum);
21122+GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint, GLenum);
21123+GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint, GLenum, GLboolean *);
21124+GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint, GLenum, GLint *);
21125+GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint, GLenum, GLfloat *);
21126+GLAPI void APIENTRY glGetVariantPointervEXT (GLuint, GLenum, GLvoid* *);
21127+GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint, GLenum, GLboolean *);
21128+GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint, GLenum, GLint *);
21129+GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint, GLenum, GLfloat *);
21130+GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint, GLenum, GLboolean *);
21131+GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint, GLenum, GLint *);
21132+GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint, GLenum, GLfloat *);
21133+#endif /* GL_GLEXT_PROTOTYPES */
21134+typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void);
21135+typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void);
21136+typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id);
21137+typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range);
21138+typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id);
21139+typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1);
21140+typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
21141+typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
21142+typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
21143+typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
21144+typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
21145+typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
21146+typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);
21147+typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);
21148+typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);
21149+typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr);
21150+typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr);
21151+typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr);
21152+typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr);
21153+typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr);
21154+typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr);
21155+typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr);
21156+typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr);
21157+typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr);
21158+typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
21159+typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
21160+typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value);
21161+typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value);
21162+typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value);
21163+typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value);
21164+typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value);
21165+typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap);
21166+typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
21167+typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
21168+typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
21169+typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data);
21170+typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
21171+typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
21172+typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
21173+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
21174+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
21175+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
21176+#endif
21177+
21178+#ifndef GL_ATI_vertex_streams
21179+#define GL_ATI_vertex_streams 1
21180+#ifdef GL_GLEXT_PROTOTYPES
21181+GLAPI void APIENTRY glVertexStream1sATI (GLenum, GLshort);
21182+GLAPI void APIENTRY glVertexStream1svATI (GLenum, const GLshort *);
21183+GLAPI void APIENTRY glVertexStream1iATI (GLenum, GLint);
21184+GLAPI void APIENTRY glVertexStream1ivATI (GLenum, const GLint *);
21185+GLAPI void APIENTRY glVertexStream1fATI (GLenum, GLfloat);
21186+GLAPI void APIENTRY glVertexStream1fvATI (GLenum, const GLfloat *);
21187+GLAPI void APIENTRY glVertexStream1dATI (GLenum, GLdouble);
21188+GLAPI void APIENTRY glVertexStream1dvATI (GLenum, const GLdouble *);
21189+GLAPI void APIENTRY glVertexStream2sATI (GLenum, GLshort, GLshort);
21190+GLAPI void APIENTRY glVertexStream2svATI (GLenum, const GLshort *);
21191+GLAPI void APIENTRY glVertexStream2iATI (GLenum, GLint, GLint);
21192+GLAPI void APIENTRY glVertexStream2ivATI (GLenum, const GLint *);
21193+GLAPI void APIENTRY glVertexStream2fATI (GLenum, GLfloat, GLfloat);
21194+GLAPI void APIENTRY glVertexStream2fvATI (GLenum, const GLfloat *);
21195+GLAPI void APIENTRY glVertexStream2dATI (GLenum, GLdouble, GLdouble);
21196+GLAPI void APIENTRY glVertexStream2dvATI (GLenum, const GLdouble *);
21197+GLAPI void APIENTRY glVertexStream3sATI (GLenum, GLshort, GLshort, GLshort);
21198+GLAPI void APIENTRY glVertexStream3svATI (GLenum, const GLshort *);
21199+GLAPI void APIENTRY glVertexStream3iATI (GLenum, GLint, GLint, GLint);
21200+GLAPI void APIENTRY glVertexStream3ivATI (GLenum, const GLint *);
21201+GLAPI void APIENTRY glVertexStream3fATI (GLenum, GLfloat, GLfloat, GLfloat);
21202+GLAPI void APIENTRY glVertexStream3fvATI (GLenum, const GLfloat *);
21203+GLAPI void APIENTRY glVertexStream3dATI (GLenum, GLdouble, GLdouble, GLdouble);
21204+GLAPI void APIENTRY glVertexStream3dvATI (GLenum, const GLdouble *);
21205+GLAPI void APIENTRY glVertexStream4sATI (GLenum, GLshort, GLshort, GLshort, GLshort);
21206+GLAPI void APIENTRY glVertexStream4svATI (GLenum, const GLshort *);
21207+GLAPI void APIENTRY glVertexStream4iATI (GLenum, GLint, GLint, GLint, GLint);
21208+GLAPI void APIENTRY glVertexStream4ivATI (GLenum, const GLint *);
21209+GLAPI void APIENTRY glVertexStream4fATI (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
21210+GLAPI void APIENTRY glVertexStream4fvATI (GLenum, const GLfloat *);
21211+GLAPI void APIENTRY glVertexStream4dATI (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
21212+GLAPI void APIENTRY glVertexStream4dvATI (GLenum, const GLdouble *);
21213+GLAPI void APIENTRY glNormalStream3bATI (GLenum, GLbyte, GLbyte, GLbyte);
21214+GLAPI void APIENTRY glNormalStream3bvATI (GLenum, const GLbyte *);
21215+GLAPI void APIENTRY glNormalStream3sATI (GLenum, GLshort, GLshort, GLshort);
21216+GLAPI void APIENTRY glNormalStream3svATI (GLenum, const GLshort *);
21217+GLAPI void APIENTRY glNormalStream3iATI (GLenum, GLint, GLint, GLint);
21218+GLAPI void APIENTRY glNormalStream3ivATI (GLenum, const GLint *);
21219+GLAPI void APIENTRY glNormalStream3fATI (GLenum, GLfloat, GLfloat, GLfloat);
21220+GLAPI void APIENTRY glNormalStream3fvATI (GLenum, const GLfloat *);
21221+GLAPI void APIENTRY glNormalStream3dATI (GLenum, GLdouble, GLdouble, GLdouble);
21222+GLAPI void APIENTRY glNormalStream3dvATI (GLenum, const GLdouble *);
21223+GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum);
21224+GLAPI void APIENTRY glVertexBlendEnviATI (GLenum, GLint);
21225+GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum, GLfloat);
21226+#endif /* GL_GLEXT_PROTOTYPES */
21227+typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x);
21228+typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords);
21229+typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x);
21230+typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords);
21231+typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x);
21232+typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords);
21233+typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x);
21234+typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords);
21235+typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y);
21236+typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords);
21237+typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y);
21238+typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords);
21239+typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y);
21240+typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords);
21241+typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y);
21242+typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords);
21243+typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z);
21244+typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
21245+typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z);
21246+typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
21247+typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
21248+typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
21249+typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
21250+typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
21251+typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
21252+typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords);
21253+typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w);
21254+typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords);
21255+typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
21256+typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords);
21257+typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
21258+typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords);
21259+typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);
21260+typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords);
21261+typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz);
21262+typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
21263+typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz);
21264+typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
21265+typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);
21266+typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
21267+typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);
21268+typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
21269+typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream);
21270+typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param);
21271+typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param);
21272+#endif
21273+
21274+#ifndef GL_ATI_element_array
21275+#define GL_ATI_element_array 1
21276+#ifdef GL_GLEXT_PROTOTYPES
21277+GLAPI void APIENTRY glElementPointerATI (GLenum, const GLvoid *);
21278+GLAPI void APIENTRY glDrawElementArrayATI (GLenum, GLsizei);
21279+GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum, GLuint, GLuint, GLsizei);
21280+#endif /* GL_GLEXT_PROTOTYPES */
21281+typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer);
21282+typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count);
21283+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count);
21284+#endif
21285+
21286+#ifndef GL_SUN_mesh_array
21287+#define GL_SUN_mesh_array 1
21288+#ifdef GL_GLEXT_PROTOTYPES
21289+GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum, GLint, GLsizei, GLsizei);
21290+#endif /* GL_GLEXT_PROTOTYPES */
21291+typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width);
21292+#endif
21293+
21294+#ifndef GL_SUN_slice_accum
21295+#define GL_SUN_slice_accum 1
21296+#endif
21297+
21298+#ifndef GL_NV_multisample_filter_hint
21299+#define GL_NV_multisample_filter_hint 1
21300+#endif
21301+
21302+#ifndef GL_NV_depth_clamp
21303+#define GL_NV_depth_clamp 1
21304+#endif
21305+
21306+#ifndef GL_NV_occlusion_query
21307+#define GL_NV_occlusion_query 1
21308+#ifdef GL_GLEXT_PROTOTYPES
21309+GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei, GLuint *);
21310+GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei, const GLuint *);
21311+GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint);
21312+GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint);
21313+GLAPI void APIENTRY glEndOcclusionQueryNV (void);
21314+GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint, GLenum, GLint *);
21315+GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint, GLenum, GLuint *);
21316+#endif /* GL_GLEXT_PROTOTYPES */
21317+typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids);
21318+typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids);
21319+typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id);
21320+typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id);
21321+typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void);
21322+typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params);
21323+typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params);
21324+#endif
21325+
21326+#ifndef GL_NV_point_sprite
21327+#define GL_NV_point_sprite 1
21328+#ifdef GL_GLEXT_PROTOTYPES
21329+GLAPI void APIENTRY glPointParameteriNV (GLenum, GLint);
21330+GLAPI void APIENTRY glPointParameterivNV (GLenum, const GLint *);
21331+#endif /* GL_GLEXT_PROTOTYPES */
21332+typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param);
21333+typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
21334+#endif
21335+
21336+#ifndef GL_NV_texture_shader3
21337+#define GL_NV_texture_shader3 1
21338+#endif
21339+
21340+#ifndef GL_NV_vertex_program1_1
21341+#define GL_NV_vertex_program1_1 1
21342+#endif
21343+
21344+#ifndef GL_EXT_shadow_funcs
21345+#define GL_EXT_shadow_funcs 1
21346+#endif
21347+
21348+#ifndef GL_EXT_stencil_two_side
21349+#define GL_EXT_stencil_two_side 1
21350+#ifdef GL_GLEXT_PROTOTYPES
21351+GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum);
21352+#endif /* GL_GLEXT_PROTOTYPES */
21353+typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face);
21354+#endif
21355+
21356+#ifndef GL_ATI_text_fragment_shader
21357+#define GL_ATI_text_fragment_shader 1
21358+#endif
21359+
21360+#ifndef GL_APPLE_client_storage
21361+#define GL_APPLE_client_storage 1
21362+#endif
21363+
21364+#ifndef GL_APPLE_element_array
21365+#define GL_APPLE_element_array 1
21366+#ifdef GL_GLEXT_PROTOTYPES
21367+GLAPI void APIENTRY glElementPointerAPPLE (GLenum, const GLvoid *);
21368+GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum, GLint, GLsizei);
21369+GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, GLint, GLsizei);
21370+GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum, const GLint *, const GLsizei *, GLsizei);
21371+GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, const GLint *, const GLsizei *, GLsizei);
21372+#endif /* GL_GLEXT_PROTOTYPES */
21373+typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid *pointer);
21374+typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count);
21375+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
21376+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
21377+typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);
21378+#endif
21379+
21380+#ifndef GL_APPLE_fence
21381+#define GL_APPLE_fence 1
21382+#ifdef GL_GLEXT_PROTOTYPES
21383+GLAPI void APIENTRY glGenFencesAPPLE (GLsizei, GLuint *);
21384+GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei, const GLuint *);
21385+GLAPI void APIENTRY glSetFenceAPPLE (GLuint);
21386+GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint);
21387+GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint);
21388+GLAPI void APIENTRY glFinishFenceAPPLE (GLuint);
21389+GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum, GLuint);
21390+GLAPI void APIENTRY glFinishObjectAPPLE (GLenum, GLint);
21391+#endif /* GL_GLEXT_PROTOTYPES */
21392+typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences);
21393+typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences);
21394+typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence);
21395+typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence);
21396+typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence);
21397+typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence);
21398+typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name);
21399+typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);
21400+#endif
21401+
21402+#ifndef GL_APPLE_vertex_array_object
21403+#define GL_APPLE_vertex_array_object 1
21404+#ifdef GL_GLEXT_PROTOTYPES
21405+GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint);
21406+GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei, const GLuint *);
21407+GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, GLuint *);
21408+GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint);
21409+#endif /* GL_GLEXT_PROTOTYPES */
21410+typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
21411+typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
21412+typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);
21413+typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
21414+#endif
21415+
21416+#ifndef GL_APPLE_vertex_array_range
21417+#define GL_APPLE_vertex_array_range 1
21418+#ifdef GL_GLEXT_PROTOTYPES
21419+GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei, GLvoid *);
21420+GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei, GLvoid *);
21421+GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum, GLint);
21422+#endif /* GL_GLEXT_PROTOTYPES */
21423+typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);
21424+typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);
21425+typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param);
21426+#endif
21427+
21428+#ifndef GL_APPLE_ycbcr_422
21429+#define GL_APPLE_ycbcr_422 1
21430+#endif
21431+
21432+#ifndef GL_S3_s3tc
21433+#define GL_S3_s3tc 1
21434+#endif
21435+
21436+#ifndef GL_ATI_draw_buffers
21437+#define GL_ATI_draw_buffers 1
21438+#ifdef GL_GLEXT_PROTOTYPES
21439+GLAPI void APIENTRY glDrawBuffersATI (GLsizei, const GLenum *);
21440+#endif /* GL_GLEXT_PROTOTYPES */
21441+typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs);
21442+#endif
21443+
21444+#ifndef GL_ATI_pixel_format_float
21445+#define GL_ATI_pixel_format_float 1
21446+/* This is really a WGL extension, but defines some associated GL enums.
21447+ * ATI does not export "GL_ATI_pixel_format_float" in the GL_EXTENSIONS string.
21448+ */
21449+#endif
21450+
21451+#ifndef GL_ATI_texture_env_combine3
21452+#define GL_ATI_texture_env_combine3 1
21453+#endif
21454+
21455+#ifndef GL_ATI_texture_float
21456+#define GL_ATI_texture_float 1
21457+#endif
21458+
21459+#ifndef GL_NV_float_buffer
21460+#define GL_NV_float_buffer 1
21461+#endif
21462+
21463+#ifndef GL_NV_fragment_program
21464+#define GL_NV_fragment_program 1
21465+/* Some NV_fragment_program entry points are shared with ARB_vertex_program. */
21466+#ifdef GL_GLEXT_PROTOTYPES
21467+GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat);
21468+GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble);
21469+GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint, GLsizei, const GLubyte *, const GLfloat *);
21470+GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint, GLsizei, const GLubyte *, const GLdouble *);
21471+GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint, GLsizei, const GLubyte *, GLfloat *);
21472+GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint, GLsizei, const GLubyte *, GLdouble *);
21473+#endif /* GL_GLEXT_PROTOTYPES */
21474+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
21475+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
21476+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
21477+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
21478+typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
21479+typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
21480+#endif
21481+
21482+#ifndef GL_NV_half_float
21483+#define GL_NV_half_float 1
21484+#ifdef GL_GLEXT_PROTOTYPES
21485+GLAPI void APIENTRY glVertex2hNV (GLhalfNV, GLhalfNV);
21486+GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *);
21487+GLAPI void APIENTRY glVertex3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21488+GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *);
21489+GLAPI void APIENTRY glVertex4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21490+GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *);
21491+GLAPI void APIENTRY glNormal3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21492+GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *);
21493+GLAPI void APIENTRY glColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21494+GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *);
21495+GLAPI void APIENTRY glColor4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21496+GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *);
21497+GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV);
21498+GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *);
21499+GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV, GLhalfNV);
21500+GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *);
21501+GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21502+GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *);
21503+GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21504+GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *);
21505+GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum, GLhalfNV);
21506+GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum, const GLhalfNV *);
21507+GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum, GLhalfNV, GLhalfNV);
21508+GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum, const GLhalfNV *);
21509+GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV);
21510+GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum, const GLhalfNV *);
21511+GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21512+GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum, const GLhalfNV *);
21513+GLAPI void APIENTRY glFogCoordhNV (GLhalfNV);
21514+GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *);
21515+GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21516+GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *);
21517+GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV);
21518+GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *);
21519+GLAPI void APIENTRY glVertexAttrib1hNV (GLuint, GLhalfNV);
21520+GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint, const GLhalfNV *);
21521+GLAPI void APIENTRY glVertexAttrib2hNV (GLuint, GLhalfNV, GLhalfNV);
21522+GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint, const GLhalfNV *);
21523+GLAPI void APIENTRY glVertexAttrib3hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV);
21524+GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint, const GLhalfNV *);
21525+GLAPI void APIENTRY glVertexAttrib4hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21526+GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint, const GLhalfNV *);
21527+GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint, GLsizei, const GLhalfNV *);
21528+GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint, GLsizei, const GLhalfNV *);
21529+GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint, GLsizei, const GLhalfNV *);
21530+GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint, GLsizei, const GLhalfNV *);
21531+#endif /* GL_GLEXT_PROTOTYPES */
21532+typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y);
21533+typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v);
21534+typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z);
21535+typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v);
21536+typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
21537+typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v);
21538+typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);
21539+typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v);
21540+typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
21541+typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v);
21542+typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);
21543+typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v);
21544+typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s);
21545+typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v);
21546+typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t);
21547+typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v);
21548+typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r);
21549+typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v);
21550+typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
21551+typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v);
21552+typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s);
21553+typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v);
21554+typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t);
21555+typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v);
21556+typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);
21557+typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v);
21558+typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
21559+typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v);
21560+typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog);
21561+typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog);
21562+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
21563+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v);
21564+typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight);
21565+typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight);
21566+typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x);
21567+typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v);
21568+typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y);
21569+typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v);
21570+typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);
21571+typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v);
21572+typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
21573+typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v);
21574+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21575+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21576+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21577+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21578+#endif
21579+
21580+#ifndef GL_NV_pixel_data_range
21581+#define GL_NV_pixel_data_range 1
21582+#ifdef GL_GLEXT_PROTOTYPES
21583+GLAPI void APIENTRY glPixelDataRangeNV (GLenum, GLsizei, GLvoid *);
21584+GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum);
21585+#endif /* GL_GLEXT_PROTOTYPES */
21586+typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, GLvoid *pointer);
21587+typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target);
21588+#endif
21589+
21590+#ifndef GL_NV_primitive_restart
21591+#define GL_NV_primitive_restart 1
21592+#ifdef GL_GLEXT_PROTOTYPES
21593+GLAPI void APIENTRY glPrimitiveRestartNV (void);
21594+GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint);
21595+#endif /* GL_GLEXT_PROTOTYPES */
21596+typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void);
21597+typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index);
21598+#endif
21599+
21600+#ifndef GL_NV_texture_expand_normal
21601+#define GL_NV_texture_expand_normal 1
21602+#endif
21603+
21604+#ifndef GL_NV_vertex_program2
21605+#define GL_NV_vertex_program2 1
21606+#endif
21607+
21608+#ifndef GL_ATI_map_object_buffer
21609+#define GL_ATI_map_object_buffer 1
21610+#ifdef GL_GLEXT_PROTOTYPES
21611+GLAPI GLvoid* APIENTRY glMapObjectBufferATI (GLuint);
21612+GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint);
21613+#endif /* GL_GLEXT_PROTOTYPES */
21614+typedef GLvoid* (APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer);
21615+typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer);
21616+#endif
21617+
21618+#ifndef GL_ATI_separate_stencil
21619+#define GL_ATI_separate_stencil 1
21620+#ifdef GL_GLEXT_PROTOTYPES
21621+GLAPI void APIENTRY glStencilOpSeparateATI (GLenum, GLenum, GLenum, GLenum);
21622+GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum, GLenum, GLint, GLuint);
21623+#endif /* GL_GLEXT_PROTOTYPES */
21624+typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
21625+typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
21626+#endif
21627+
21628+#ifndef GL_ATI_vertex_attrib_array_object
21629+#define GL_ATI_vertex_attrib_array_object 1
21630+#ifdef GL_GLEXT_PROTOTYPES
21631+GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint, GLint, GLenum, GLboolean, GLsizei, GLuint, GLuint);
21632+GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint, GLenum, GLfloat *);
21633+GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint, GLenum, GLint *);
21634+#endif /* GL_GLEXT_PROTOTYPES */
21635+typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
21636+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params);
21637+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params);
21638+#endif
21639+
21640+#ifndef GL_OES_read_format
21641+#define GL_OES_read_format 1
21642+#endif
21643+
21644+#ifndef GL_EXT_depth_bounds_test
21645+#define GL_EXT_depth_bounds_test 1
21646+#ifdef GL_GLEXT_PROTOTYPES
21647+GLAPI void APIENTRY glDepthBoundsEXT (GLclampd, GLclampd);
21648+#endif /* GL_GLEXT_PROTOTYPES */
21649+typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax);
21650+#endif
21651+
21652+#ifndef GL_EXT_texture_mirror_clamp
21653+#define GL_EXT_texture_mirror_clamp 1
21654+#endif
21655+
21656+#ifndef GL_EXT_blend_equation_separate
21657+#define GL_EXT_blend_equation_separate 1
21658+#ifdef GL_GLEXT_PROTOTYPES
21659+GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum, GLenum);
21660+#endif /* GL_GLEXT_PROTOTYPES */
21661+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha);
21662+#endif
21663+
21664+#ifndef GL_MESA_pack_invert
21665+#define GL_MESA_pack_invert 1
21666+#endif
21667+
21668+#ifndef GL_MESA_ycbcr_texture
21669+#define GL_MESA_ycbcr_texture 1
21670+#endif
21671+
21672+#ifndef GL_EXT_pixel_buffer_object
21673+#define GL_EXT_pixel_buffer_object 1
21674+#endif
21675+
21676+#ifndef GL_NV_fragment_program_option
21677+#define GL_NV_fragment_program_option 1
21678+#endif
21679+
21680+#ifndef GL_NV_fragment_program2
21681+#define GL_NV_fragment_program2 1
21682+#endif
21683+
21684+#ifndef GL_NV_vertex_program2_option
21685+#define GL_NV_vertex_program2_option 1
21686+#endif
21687+
21688+#ifndef GL_NV_vertex_program3
21689+#define GL_NV_vertex_program3 1
21690+#endif
21691+
21692+#ifndef GL_EXT_framebuffer_object
21693+#define GL_EXT_framebuffer_object 1
21694+#ifdef GL_GLEXT_PROTOTYPES
21695+GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint);
21696+GLAPI void APIENTRY glBindRenderbufferEXT (GLenum, GLuint);
21697+GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei, const GLuint *);
21698+GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei, GLuint *);
21699+GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum, GLenum, GLsizei, GLsizei);
21700+GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum, GLenum, GLint *);
21701+GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint);
21702+GLAPI void APIENTRY glBindFramebufferEXT (GLenum, GLuint);
21703+GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei, const GLuint *);
21704+GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei, GLuint *);
21705+GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum);
21706+GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
21707+GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
21708+GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLint);
21709+GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum, GLenum, GLenum, GLuint);
21710+GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum, GLenum, GLenum, GLint *);
21711+GLAPI void APIENTRY glGenerateMipmapEXT (GLenum);
21712+#endif /* GL_GLEXT_PROTOTYPES */
21713+typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);
21714+typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);
21715+typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);
21716+typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);
21717+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
21718+typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
21719+typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);
21720+typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
21721+typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);
21722+typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);
21723+typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);
21724+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
21725+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
21726+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
21727+typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
21728+typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
21729+typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);
21730+#endif
21731+
21732+#ifndef GL_GREMEDY_string_marker
21733+#define GL_GREMEDY_string_marker 1
21734+#ifdef GL_GLEXT_PROTOTYPES
21735+GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei, const GLvoid *);
21736+#endif /* GL_GLEXT_PROTOTYPES */
21737+typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string);
21738+#endif
21739+
21740+#ifndef GL_EXT_packed_depth_stencil
21741+#define GL_EXT_packed_depth_stencil 1
21742+#endif
21743+
21744+#ifndef GL_EXT_stencil_clear_tag
21745+#define GL_EXT_stencil_clear_tag 1
21746+#ifdef GL_GLEXT_PROTOTYPES
21747+GLAPI void APIENTRY glStencilClearTagEXT (GLsizei, GLuint);
21748+#endif /* GL_GLEXT_PROTOTYPES */
21749+typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag);
21750+#endif
21751+
21752+#ifndef GL_EXT_texture_sRGB
21753+#define GL_EXT_texture_sRGB 1
21754+#endif
21755+
21756+#ifndef GL_EXT_framebuffer_blit
21757+#define GL_EXT_framebuffer_blit 1
21758+#ifdef GL_GLEXT_PROTOTYPES
21759+GLAPI void APIENTRY glBlitFramebufferEXT (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum);
21760+#endif /* GL_GLEXT_PROTOTYPES */
21761+typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
21762+#endif
21763+
21764+#ifndef GL_EXT_framebuffer_multisample
21765+#define GL_EXT_framebuffer_multisample 1
21766+#ifdef GL_GLEXT_PROTOTYPES
21767+GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
21768+#endif /* GL_GLEXT_PROTOTYPES */
21769+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
21770+#endif
21771+
21772+#ifndef GL_MESAX_texture_stack
21773+#define GL_MESAX_texture_stack 1
21774+#endif
21775+
21776+#ifndef GL_EXT_timer_query
21777+#define GL_EXT_timer_query 1
21778+#ifdef GL_GLEXT_PROTOTYPES
21779+GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint, GLenum, GLint64EXT *);
21780+GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint, GLenum, GLuint64EXT *);
21781+#endif /* GL_GLEXT_PROTOTYPES */
21782+typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params);
21783+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params);
21784+#endif
21785+
21786+#ifndef GL_EXT_gpu_program_parameters
21787+#define GL_EXT_gpu_program_parameters 1
21788+#ifdef GL_GLEXT_PROTOTYPES
21789+GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *);
21790+GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *);
21791+#endif /* GL_GLEXT_PROTOTYPES */
21792+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
21793+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
21794+#endif
21795+
21796+#ifndef GL_APPLE_flush_buffer_range
21797+#define GL_APPLE_flush_buffer_range 1
21798+#ifdef GL_GLEXT_PROTOTYPES
21799+GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum, GLenum, GLint);
21800+GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum, GLintptr, GLsizeiptr);
21801+#endif /* GL_GLEXT_PROTOTYPES */
21802+typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param);
21803+typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size);
21804+#endif
21805+
21806+#ifndef GL_NV_gpu_program4
21807+#define GL_NV_gpu_program4 1
21808+#ifdef GL_GLEXT_PROTOTYPES
21809+GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint);
21810+GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum, GLuint, const GLint *);
21811+GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *);
21812+GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
21813+GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum, GLuint, const GLuint *);
21814+GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *);
21815+GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint);
21816+GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum, GLuint, const GLint *);
21817+GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *);
21818+GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
21819+GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum, GLuint, const GLuint *);
21820+GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *);
21821+GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum, GLuint, GLint *);
21822+GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum, GLuint, GLuint *);
21823+GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum, GLuint, GLint *);
21824+GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum, GLuint, GLuint *);
21825+#endif /* GL_GLEXT_PROTOTYPES */
21826+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
21827+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
21828+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
21829+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
21830+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
21831+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
21832+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
21833+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
21834+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
21835+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
21836+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
21837+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
21838+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
21839+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
21840+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
21841+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
21842+#endif
21843+
21844+#ifndef GL_NV_geometry_program4
21845+#define GL_NV_geometry_program4 1
21846+#ifdef GL_GLEXT_PROTOTYPES
21847+GLAPI void APIENTRY glProgramVertexLimitNV (GLenum, GLint);
21848+GLAPI void APIENTRY glFramebufferTextureEXT (GLenum, GLenum, GLuint, GLint);
21849+GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum, GLenum, GLuint, GLint, GLint);
21850+GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum, GLenum, GLuint, GLint, GLenum);
21851+#endif /* GL_GLEXT_PROTOTYPES */
21852+typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit);
21853+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
21854+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
21855+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
21856+#endif
21857+
21858+#ifndef GL_EXT_geometry_shader4
21859+#define GL_EXT_geometry_shader4 1
21860+#ifdef GL_GLEXT_PROTOTYPES
21861+GLAPI void APIENTRY glProgramParameteriEXT (GLuint, GLenum, GLint);
21862+#endif /* GL_GLEXT_PROTOTYPES */
21863+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
21864+#endif
21865+
21866+#ifndef GL_NV_vertex_program4
21867+#define GL_NV_vertex_program4 1
21868+#ifdef GL_GLEXT_PROTOTYPES
21869+GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint, GLint);
21870+GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint, GLint, GLint);
21871+GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint, GLint, GLint, GLint);
21872+GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint, GLint, GLint, GLint, GLint);
21873+GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint, GLuint);
21874+GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint, GLuint, GLuint);
21875+GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint, GLuint, GLuint, GLuint);
21876+GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint, GLuint, GLuint, GLuint, GLuint);
21877+GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint, const GLint *);
21878+GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint, const GLint *);
21879+GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint, const GLint *);
21880+GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint, const GLint *);
21881+GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint, const GLuint *);
21882+GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint, const GLuint *);
21883+GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint, const GLuint *);
21884+GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint, const GLuint *);
21885+GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint, const GLbyte *);
21886+GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint, const GLshort *);
21887+GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint, const GLubyte *);
21888+GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint, const GLushort *);
21889+GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint, GLint, GLenum, GLsizei, const GLvoid *);
21890+GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint, GLenum, GLint *);
21891+GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint, GLenum, GLuint *);
21892+#endif /* GL_GLEXT_PROTOTYPES */
21893+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x);
21894+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y);
21895+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z);
21896+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
21897+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x);
21898+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y);
21899+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
21900+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
21901+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v);
21902+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v);
21903+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v);
21904+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v);
21905+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v);
21906+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v);
21907+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v);
21908+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v);
21909+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v);
21910+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v);
21911+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v);
21912+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v);
21913+typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
21914+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params);
21915+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params);
21916+#endif
21917+
21918+#ifndef GL_EXT_gpu_shader4
21919+#define GL_EXT_gpu_shader4 1
21920+#ifdef GL_GLEXT_PROTOTYPES
21921+GLAPI void APIENTRY glGetUniformuivEXT (GLuint, GLint, GLuint *);
21922+GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint, GLuint, const GLchar *);
21923+GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint, const GLchar *);
21924+GLAPI void APIENTRY glUniform1uiEXT (GLint, GLuint);
21925+GLAPI void APIENTRY glUniform2uiEXT (GLint, GLuint, GLuint);
21926+GLAPI void APIENTRY glUniform3uiEXT (GLint, GLuint, GLuint, GLuint);
21927+GLAPI void APIENTRY glUniform4uiEXT (GLint, GLuint, GLuint, GLuint, GLuint);
21928+GLAPI void APIENTRY glUniform1uivEXT (GLint, GLsizei, const GLuint *);
21929+GLAPI void APIENTRY glUniform2uivEXT (GLint, GLsizei, const GLuint *);
21930+GLAPI void APIENTRY glUniform3uivEXT (GLint, GLsizei, const GLuint *);
21931+GLAPI void APIENTRY glUniform4uivEXT (GLint, GLsizei, const GLuint *);
21932+#endif /* GL_GLEXT_PROTOTYPES */
21933+typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params);
21934+typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name);
21935+typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name);
21936+typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0);
21937+typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1);
21938+typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
21939+typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
21940+typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
21941+typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
21942+typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
21943+typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
21944+#endif
21945+
21946+#ifndef GL_EXT_draw_instanced
21947+#define GL_EXT_draw_instanced 1
21948+#ifdef GL_GLEXT_PROTOTYPES
21949+GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum, GLint, GLsizei, GLsizei);
21950+GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum, GLsizei, GLenum, const GLvoid *, GLsizei);
21951+#endif /* GL_GLEXT_PROTOTYPES */
21952+typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
21953+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
21954+#endif
21955+
21956+#ifndef GL_EXT_packed_float
21957+#define GL_EXT_packed_float 1
21958+#endif
21959+
21960+#ifndef GL_EXT_texture_array
21961+#define GL_EXT_texture_array 1
21962+#endif
21963+
21964+#ifndef GL_EXT_texture_buffer_object
21965+#define GL_EXT_texture_buffer_object 1
21966+#ifdef GL_GLEXT_PROTOTYPES
21967+GLAPI void APIENTRY glTexBufferEXT (GLenum, GLenum, GLuint);
21968+#endif /* GL_GLEXT_PROTOTYPES */
21969+typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
21970+#endif
21971+
21972+#ifndef GL_EXT_texture_compression_latc
21973+#define GL_EXT_texture_compression_latc 1
21974+#endif
21975+
21976+#ifndef GL_EXT_texture_compression_rgtc
21977+#define GL_EXT_texture_compression_rgtc 1
21978+#endif
21979+
21980+#ifndef GL_EXT_texture_shared_exponent
21981+#define GL_EXT_texture_shared_exponent 1
21982+#endif
21983+
21984+#ifndef GL_NV_depth_buffer_float
21985+#define GL_NV_depth_buffer_float 1
21986+#ifdef GL_GLEXT_PROTOTYPES
21987+GLAPI void APIENTRY glDepthRangedNV (GLdouble, GLdouble);
21988+GLAPI void APIENTRY glClearDepthdNV (GLdouble);
21989+GLAPI void APIENTRY glDepthBoundsdNV (GLdouble, GLdouble);
21990+#endif /* GL_GLEXT_PROTOTYPES */
21991+typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar);
21992+typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth);
21993+typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax);
21994+#endif
21995+
21996+#ifndef GL_NV_fragment_program4
21997+#define GL_NV_fragment_program4 1
21998+#endif
21999+
22000+#ifndef GL_NV_framebuffer_multisample_coverage
22001+#define GL_NV_framebuffer_multisample_coverage 1
22002+#ifdef GL_GLEXT_PROTOTYPES
22003+GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum, GLsizei, GLsizei, GLenum, GLsizei, GLsizei);
22004+#endif /* GL_GLEXT_PROTOTYPES */
22005+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
22006+#endif
22007+
22008+#ifndef GL_EXT_framebuffer_sRGB
22009+#define GL_EXT_framebuffer_sRGB 1
22010+#endif
22011+
22012+#ifndef GL_NV_geometry_shader4
22013+#define GL_NV_geometry_shader4 1
22014+#endif
22015+
22016+#ifndef GL_NV_parameter_buffer_object
22017+#define GL_NV_parameter_buffer_object 1
22018+#ifdef GL_GLEXT_PROTOTYPES
22019+GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum, GLuint, GLuint, GLsizei, const GLfloat *);
22020+GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum, GLuint, GLuint, GLsizei, const GLint *);
22021+GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum, GLuint, GLuint, GLsizei, const GLuint *);
22022+#endif /* GL_GLEXT_PROTOTYPES */
22023+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params);
22024+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params);
22025+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params);
22026+#endif
22027+
22028+#ifndef GL_EXT_draw_buffers2
22029+#define GL_EXT_draw_buffers2 1
22030+#ifdef GL_GLEXT_PROTOTYPES
22031+GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint, GLboolean, GLboolean, GLboolean, GLboolean);
22032+GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum, GLuint, GLboolean *);
22033+GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum, GLuint, GLint *);
22034+GLAPI void APIENTRY glEnableIndexedEXT (GLenum, GLuint);
22035+GLAPI void APIENTRY glDisableIndexedEXT (GLenum, GLuint);
22036+GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum, GLuint);
22037+#endif /* GL_GLEXT_PROTOTYPES */
22038+typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
22039+typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data);
22040+typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data);
22041+typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
22042+typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
22043+typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index);
22044+#endif
22045+
22046+#ifndef GL_NV_transform_feedback
22047+#define GL_NV_transform_feedback 1
22048+#ifdef GL_GLEXT_PROTOTYPES
22049+GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum);
22050+GLAPI void APIENTRY glEndTransformFeedbackNV (void);
22051+GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint, const GLint *, GLenum);
22052+GLAPI void APIENTRY glBindBufferRangeNV (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr);
22053+GLAPI void APIENTRY glBindBufferOffsetNV (GLenum, GLuint, GLuint, GLintptr);
22054+GLAPI void APIENTRY glBindBufferBaseNV (GLenum, GLuint, GLuint);
22055+GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint, GLsizei, const GLint *, GLenum);
22056+GLAPI void APIENTRY glActiveVaryingNV (GLuint, const GLchar *);
22057+GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint, const GLchar *);
22058+GLAPI void APIENTRY glGetActiveVaryingNV (GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *);
22059+GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint, GLuint, GLint *);
22060+#endif /* GL_GLEXT_PROTOTYPES */
22061+typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode);
22062+typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void);
22063+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode);
22064+typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
22065+typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
22066+typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer);
22067+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
22068+typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name);
22069+typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name);
22070+typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
22071+typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location);
22072+#endif
22073+
22074+#ifndef GL_EXT_bindable_uniform
22075+#define GL_EXT_bindable_uniform 1
22076+#ifdef GL_GLEXT_PROTOTYPES
22077+GLAPI void APIENTRY glUniformBufferEXT (GLuint, GLint, GLuint);
22078+GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint, GLint);
22079+GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint, GLint);
22080+#endif /* GL_GLEXT_PROTOTYPES */
22081+typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer);
22082+typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location);
22083+typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location);
22084+#endif
22085+
22086+#ifndef GL_EXT_texture_integer
22087+#define GL_EXT_texture_integer 1
22088+#ifdef GL_GLEXT_PROTOTYPES
22089+GLAPI void APIENTRY glTexParameterIivEXT (GLenum, GLenum, const GLint *);
22090+GLAPI void APIENTRY glTexParameterIuivEXT (GLenum, GLenum, const GLuint *);
22091+GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum, GLenum, GLint *);
22092+GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum, GLenum, GLuint *);
22093+GLAPI void APIENTRY glClearColorIiEXT (GLint, GLint, GLint, GLint);
22094+GLAPI void APIENTRY glClearColorIuiEXT (GLuint, GLuint, GLuint, GLuint);
22095+#endif /* GL_GLEXT_PROTOTYPES */
22096+typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
22097+typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
22098+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
22099+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
22100+typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha);
22101+typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);
22102+#endif
22103+
22104+
22105+#ifdef __cplusplus
22106+}
22107+#endif
22108+
22109+#endif
22110+
22111+
22112+/* ERO */
22113+GLAPI void GLAPIENTRY fake_gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *data);
22114Index: qemu-0.14.0/target-i386/mesa_glu.h
22115===================================================================
22116--- /dev/null
22117+++ qemu-0.14.0/target-i386/mesa_glu.h
22118@@ -0,0 +1,354 @@
22119+/*
22120+** License Applicability. Except to the extent portions of this file are
22121+** made subject to an alternative license as permitted in the SGI Free
22122+** Software License B, Version 1.1 (the "License"), the contents of this
22123+** file are subject only to the provisions of the License. You may not use
22124+** this file except in compliance with the License. You may obtain a copy
22125+** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
22126+** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
22127+**
22128+** http://oss.sgi.com/projects/FreeB
22129+**
22130+** Note that, as provided in the License, the Software is distributed on an
22131+** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
22132+** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
22133+** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
22134+** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
22135+**
22136+** Original Code. The Original Code is: OpenGL Sample Implementation,
22137+** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
22138+** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
22139+** Copyright in any portions created by third parties is as indicated
22140+** elsewhere herein. All Rights Reserved.
22141+**
22142+** Additional Notice Provisions: This software was created using the
22143+** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
22144+** not been independently verified as being compliant with the OpenGL(R)
22145+** version 1.2.1 Specification.
22146+*/
22147+
22148+#ifndef __glu_h__
22149+#define __glu_h__
22150+
22151+#if defined(USE_MGL_NAMESPACE)
22152+#include "glu_mangle.h"
22153+#endif
22154+
22155+//#include <GL/gl.h>
22156+#include "mesa_gl.h"
22157+
22158+#ifndef GLAPIENTRY
22159+#define GLAPIENTRY
22160+#endif
22161+
22162+#ifndef GLAPIENTRYP
22163+#define GLAPIENTRYP GLAPIENTRY *
22164+#endif
22165+
22166+#ifdef GLAPI
22167+#undef GLAPI
22168+#endif
22169+
22170+# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GLU32)
22171+# define GLAPI __declspec(dllexport)
22172+# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
22173+# define GLAPI __declspec(dllimport)
22174+# else /* for use with static link lib build of Win32 edition only */
22175+# define GLAPI extern
22176+# endif /* _STATIC_MESA support */
22177+
22178+
22179+#ifndef GLAPI
22180+#define GLAPI
22181+#endif
22182+
22183+#ifdef __cplusplus
22184+extern "C" {
22185+#endif
22186+
22187+/*************************************************************/
22188+
22189+/* Extensions */
22190+#define GLU_EXT_object_space_tess 1
22191+#define GLU_EXT_nurbs_tessellator 1
22192+
22193+/* Boolean */
22194+#define GLU_FALSE 0
22195+#define GLU_TRUE 1
22196+
22197+/* Version */
22198+#define GLU_VERSION_1_1 1
22199+#define GLU_VERSION_1_2 1
22200+#define GLU_VERSION_1_3 1
22201+
22202+/* StringName */
22203+#define GLU_VERSION 100800
22204+#define GLU_EXTENSIONS 100801
22205+
22206+/* ErrorCode */
22207+#define GLU_INVALID_ENUM 100900
22208+#define GLU_INVALID_VALUE 100901
22209+#define GLU_OUT_OF_MEMORY 100902
22210+#define GLU_INCOMPATIBLE_GL_VERSION 100903
22211+#define GLU_INVALID_OPERATION 100904
22212+
22213+/* NurbsDisplay */
22214+/* GLU_FILL */
22215+#define GLU_OUTLINE_POLYGON 100240
22216+#define GLU_OUTLINE_PATCH 100241
22217+
22218+/* NurbsCallback */
22219+#define GLU_NURBS_ERROR 100103
22220+#define GLU_ERROR 100103
22221+#define GLU_NURBS_BEGIN 100164
22222+#define GLU_NURBS_BEGIN_EXT 100164
22223+#define GLU_NURBS_VERTEX 100165
22224+#define GLU_NURBS_VERTEX_EXT 100165
22225+#define GLU_NURBS_NORMAL 100166
22226+#define GLU_NURBS_NORMAL_EXT 100166
22227+#define GLU_NURBS_COLOR 100167
22228+#define GLU_NURBS_COLOR_EXT 100167
22229+#define GLU_NURBS_TEXTURE_COORD 100168
22230+#define GLU_NURBS_TEX_COORD_EXT 100168
22231+#define GLU_NURBS_END 100169
22232+#define GLU_NURBS_END_EXT 100169
22233+#define GLU_NURBS_BEGIN_DATA 100170
22234+#define GLU_NURBS_BEGIN_DATA_EXT 100170
22235+#define GLU_NURBS_VERTEX_DATA 100171
22236+#define GLU_NURBS_VERTEX_DATA_EXT 100171
22237+#define GLU_NURBS_NORMAL_DATA 100172
22238+#define GLU_NURBS_NORMAL_DATA_EXT 100172
22239+#define GLU_NURBS_COLOR_DATA 100173
22240+#define GLU_NURBS_COLOR_DATA_EXT 100173
22241+#define GLU_NURBS_TEXTURE_COORD_DATA 100174
22242+#define GLU_NURBS_TEX_COORD_DATA_EXT 100174
22243+#define GLU_NURBS_END_DATA 100175
22244+#define GLU_NURBS_END_DATA_EXT 100175
22245+
22246+/* NurbsError */
22247+#define GLU_NURBS_ERROR1 100251
22248+#define GLU_NURBS_ERROR2 100252
22249+#define GLU_NURBS_ERROR3 100253
22250+#define GLU_NURBS_ERROR4 100254
22251+#define GLU_NURBS_ERROR5 100255
22252+#define GLU_NURBS_ERROR6 100256
22253+#define GLU_NURBS_ERROR7 100257
22254+#define GLU_NURBS_ERROR8 100258
22255+#define GLU_NURBS_ERROR9 100259
22256+#define GLU_NURBS_ERROR10 100260
22257+#define GLU_NURBS_ERROR11 100261
22258+#define GLU_NURBS_ERROR12 100262
22259+#define GLU_NURBS_ERROR13 100263
22260+#define GLU_NURBS_ERROR14 100264
22261+#define GLU_NURBS_ERROR15 100265
22262+#define GLU_NURBS_ERROR16 100266
22263+#define GLU_NURBS_ERROR17 100267
22264+#define GLU_NURBS_ERROR18 100268
22265+#define GLU_NURBS_ERROR19 100269
22266+#define GLU_NURBS_ERROR20 100270
22267+#define GLU_NURBS_ERROR21 100271
22268+#define GLU_NURBS_ERROR22 100272
22269+#define GLU_NURBS_ERROR23 100273
22270+#define GLU_NURBS_ERROR24 100274
22271+#define GLU_NURBS_ERROR25 100275
22272+#define GLU_NURBS_ERROR26 100276
22273+#define GLU_NURBS_ERROR27 100277
22274+#define GLU_NURBS_ERROR28 100278
22275+#define GLU_NURBS_ERROR29 100279
22276+#define GLU_NURBS_ERROR30 100280
22277+#define GLU_NURBS_ERROR31 100281
22278+#define GLU_NURBS_ERROR32 100282
22279+#define GLU_NURBS_ERROR33 100283
22280+#define GLU_NURBS_ERROR34 100284
22281+#define GLU_NURBS_ERROR35 100285
22282+#define GLU_NURBS_ERROR36 100286
22283+#define GLU_NURBS_ERROR37 100287
22284+
22285+/* NurbsProperty */
22286+#define GLU_AUTO_LOAD_MATRIX 100200
22287+#define GLU_CULLING 100201
22288+#define GLU_SAMPLING_TOLERANCE 100203
22289+#define GLU_DISPLAY_MODE 100204
22290+#define GLU_PARAMETRIC_TOLERANCE 100202
22291+#define GLU_SAMPLING_METHOD 100205
22292+#define GLU_U_STEP 100206
22293+#define GLU_V_STEP 100207
22294+#define GLU_NURBS_MODE 100160
22295+#define GLU_NURBS_MODE_EXT 100160
22296+#define GLU_NURBS_TESSELLATOR 100161
22297+#define GLU_NURBS_TESSELLATOR_EXT 100161
22298+#define GLU_NURBS_RENDERER 100162
22299+#define GLU_NURBS_RENDERER_EXT 100162
22300+
22301+/* NurbsSampling */
22302+#define GLU_OBJECT_PARAMETRIC_ERROR 100208
22303+#define GLU_OBJECT_PARAMETRIC_ERROR_EXT 100208
22304+#define GLU_OBJECT_PATH_LENGTH 100209
22305+#define GLU_OBJECT_PATH_LENGTH_EXT 100209
22306+#define GLU_PATH_LENGTH 100215
22307+#define GLU_PARAMETRIC_ERROR 100216
22308+#define GLU_DOMAIN_DISTANCE 100217
22309+
22310+/* NurbsTrim */
22311+#define GLU_MAP1_TRIM_2 100210
22312+#define GLU_MAP1_TRIM_3 100211
22313+
22314+/* QuadricDrawStyle */
22315+#define GLU_POINT 100010
22316+#define GLU_LINE 100011
22317+#define GLU_FILL 100012
22318+#define GLU_SILHOUETTE 100013
22319+
22320+/* QuadricCallback */
22321+/* GLU_ERROR */
22322+
22323+/* QuadricNormal */
22324+#define GLU_SMOOTH 100000
22325+#define GLU_FLAT 100001
22326+#define GLU_NONE 100002
22327+
22328+/* QuadricOrientation */
22329+#define GLU_OUTSIDE 100020
22330+#define GLU_INSIDE 100021
22331+
22332+/* TessCallback */
22333+#define GLU_TESS_BEGIN 100100
22334+#define GLU_BEGIN 100100
22335+#define GLU_TESS_VERTEX 100101
22336+#define GLU_VERTEX 100101
22337+#define GLU_TESS_END 100102
22338+#define GLU_END 100102
22339+#define GLU_TESS_ERROR 100103
22340+#define GLU_TESS_EDGE_FLAG 100104
22341+#define GLU_EDGE_FLAG 100104
22342+#define GLU_TESS_COMBINE 100105
22343+#define GLU_TESS_BEGIN_DATA 100106
22344+#define GLU_TESS_VERTEX_DATA 100107
22345+#define GLU_TESS_END_DATA 100108
22346+#define GLU_TESS_ERROR_DATA 100109
22347+#define GLU_TESS_EDGE_FLAG_DATA 100110
22348+#define GLU_TESS_COMBINE_DATA 100111
22349+
22350+/* TessContour */
22351+#define GLU_CW 100120
22352+#define GLU_CCW 100121
22353+#define GLU_INTERIOR 100122
22354+#define GLU_EXTERIOR 100123
22355+#define GLU_UNKNOWN 100124
22356+
22357+/* TessProperty */
22358+#define GLU_TESS_WINDING_RULE 100140
22359+#define GLU_TESS_BOUNDARY_ONLY 100141
22360+#define GLU_TESS_TOLERANCE 100142
22361+
22362+/* TessError */
22363+#define GLU_TESS_ERROR1 100151
22364+#define GLU_TESS_ERROR2 100152
22365+#define GLU_TESS_ERROR3 100153
22366+#define GLU_TESS_ERROR4 100154
22367+#define GLU_TESS_ERROR5 100155
22368+#define GLU_TESS_ERROR6 100156
22369+#define GLU_TESS_ERROR7 100157
22370+#define GLU_TESS_ERROR8 100158
22371+#define GLU_TESS_MISSING_BEGIN_POLYGON 100151
22372+#define GLU_TESS_MISSING_BEGIN_CONTOUR 100152
22373+#define GLU_TESS_MISSING_END_POLYGON 100153
22374+#define GLU_TESS_MISSING_END_CONTOUR 100154
22375+#define GLU_TESS_COORD_TOO_LARGE 100155
22376+#define GLU_TESS_NEED_COMBINE_CALLBACK 100156
22377+
22378+/* TessWinding */
22379+#define GLU_TESS_WINDING_ODD 100130
22380+#define GLU_TESS_WINDING_NONZERO 100131
22381+#define GLU_TESS_WINDING_POSITIVE 100132
22382+#define GLU_TESS_WINDING_NEGATIVE 100133
22383+#define GLU_TESS_WINDING_ABS_GEQ_TWO 100134
22384+
22385+/*************************************************************/
22386+
22387+
22388+#ifdef __cplusplus
22389+class GLUnurbs;
22390+class GLUquadric;
22391+class GLUtesselator;
22392+#else
22393+typedef struct GLUnurbs GLUnurbs;
22394+typedef struct GLUquadric GLUquadric;
22395+typedef struct GLUtesselator GLUtesselator;
22396+#endif
22397+
22398+typedef GLUnurbs GLUnurbsObj;
22399+typedef GLUquadric GLUquadricObj;
22400+typedef GLUtesselator GLUtesselatorObj;
22401+typedef GLUtesselator GLUtriangulatorObj;
22402+
22403+#define GLU_TESS_MAX_COORD 1.0e150
22404+
22405+/* Internal convenience typedefs */
22406+typedef void (GLAPIENTRYP _GLUfuncptr)();
22407+
22408+GLAPI void GLAPIENTRY gluBeginCurve (GLUnurbs* nurb);
22409+GLAPI void GLAPIENTRY gluBeginPolygon (GLUtesselator* tess);
22410+GLAPI void GLAPIENTRY gluBeginSurface (GLUnurbs* nurb);
22411+GLAPI void GLAPIENTRY gluBeginTrim (GLUnurbs* nurb);
22412+GLAPI GLint GLAPIENTRY gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
22413+GLAPI GLint GLAPIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
22414+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);
22415+GLAPI GLint GLAPIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data);
22416+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);
22417+GLAPI GLint GLAPIENTRY gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
22418+GLAPI GLboolean GLAPIENTRY gluCheckExtension (const GLubyte *extName, const GLubyte *extString);
22419+GLAPI void GLAPIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
22420+GLAPI void GLAPIENTRY gluDeleteNurbsRenderer (GLUnurbs* nurb);
22421+GLAPI void GLAPIENTRY gluDeleteQuadric (GLUquadric* quad);
22422+GLAPI void GLAPIENTRY gluDeleteTess (GLUtesselator* tess);
22423+GLAPI void GLAPIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
22424+GLAPI void GLAPIENTRY gluEndCurve (GLUnurbs* nurb);
22425+GLAPI void GLAPIENTRY gluEndPolygon (GLUtesselator* tess);
22426+GLAPI void GLAPIENTRY gluEndSurface (GLUnurbs* nurb);
22427+GLAPI void GLAPIENTRY gluEndTrim (GLUnurbs* nurb);
22428+GLAPI const GLubyte * GLAPIENTRY gluErrorString (GLenum error);
22429+GLAPI void GLAPIENTRY gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
22430+GLAPI const GLubyte * GLAPIENTRY gluGetString (GLenum name);
22431+GLAPI void GLAPIENTRY gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
22432+GLAPI void GLAPIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
22433+GLAPI void GLAPIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
22434+GLAPI GLUnurbs* GLAPIENTRY gluNewNurbsRenderer (void);
22435+GLAPI GLUquadric* GLAPIENTRY gluNewQuadric (void);
22436+GLAPI GLUtesselator* GLAPIENTRY gluNewTess (void);
22437+GLAPI void GLAPIENTRY gluNextContour (GLUtesselator* tess, GLenum type);
22438+GLAPI void GLAPIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
22439+GLAPI void GLAPIENTRY gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData);
22440+GLAPI void GLAPIENTRY gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData);
22441+GLAPI void GLAPIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
22442+GLAPI void GLAPIENTRY gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
22443+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);
22444+GLAPI void GLAPIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
22445+GLAPI void GLAPIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
22446+GLAPI void GLAPIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
22447+GLAPI void GLAPIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
22448+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);
22449+GLAPI void GLAPIENTRY gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
22450+GLAPI void GLAPIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
22451+GLAPI void GLAPIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
22452+GLAPI void GLAPIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal);
22453+GLAPI void GLAPIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
22454+GLAPI void GLAPIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture);
22455+GLAPI GLint GLAPIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
22456+GLAPI void GLAPIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
22457+GLAPI void GLAPIENTRY gluTessBeginContour (GLUtesselator* tess);
22458+GLAPI void GLAPIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
22459+GLAPI void GLAPIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
22460+GLAPI void GLAPIENTRY gluTessEndContour (GLUtesselator* tess);
22461+GLAPI void GLAPIENTRY gluTessEndPolygon (GLUtesselator* tess);
22462+GLAPI void GLAPIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
22463+GLAPI void GLAPIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
22464+GLAPI void GLAPIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
22465+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);
22466+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);
22467+
22468+#ifdef __cplusplus
22469+}
22470+#endif
22471+
22472+#endif /* __glu_h__ */
22473Index: qemu-0.14.0/target-i386/mesa_glx.h
22474===================================================================
22475--- /dev/null
22476+++ qemu-0.14.0/target-i386/mesa_glx.h
22477@@ -0,0 +1,510 @@
22478+/*
22479+ * Mesa 3-D graphics library
22480+ * Version: 6.5
22481+ *
22482+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
22483+ *
22484+ * Permission is hereby granted, free of charge, to any person obtaining a
22485+ * copy of this software and associated documentation files (the "Software"),
22486+ * to deal in the Software without restriction, including without limitation
22487+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
22488+ * and/or sell copies of the Software, and to permit persons to whom the
22489+ * Software is furnished to do so, subject to the following conditions:
22490+ *
22491+ * The above copyright notice and this permission notice shall be included
22492+ * in all copies or substantial portions of the Software.
22493+ *
22494+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22495+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22496+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22497+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
22498+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22499+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22500+ */
22501+
22502+
22503+#ifndef GLX_H
22504+#define GLX_H
22505+
22506+
22507+#ifdef __VMS
22508+#include <GL/vms_x_fix.h>
22509+# ifdef __cplusplus
22510+/* VMS Xlib.h gives problems with C++.
22511+ * this avoids a bunch of trivial warnings */
22512+#pragma message disable nosimpint
22513+#endif
22514+#endif
22515+#include <X11/Xlib.h>
22516+#include <X11/Xutil.h>
22517+#ifdef __VMS
22518+# ifdef __cplusplus
22519+#pragma message enable nosimpint
22520+#endif
22521+#endif
22522+#include <mesa_gl.h>
22523+
22524+
22525+#if defined(USE_MGL_NAMESPACE)
22526+#include "glx_mangle.h"
22527+#endif
22528+
22529+
22530+#ifdef __cplusplus
22531+extern "C" {
22532+#endif
22533+
22534+
22535+#define GLX_VERSION_1_1 1
22536+#define GLX_VERSION_1_2 1
22537+#define GLX_VERSION_1_3 1
22538+#define GLX_VERSION_1_4 1
22539+
22540+#define GLX_EXTENSION_NAME "GLX"
22541+
22542+
22543+
22544+/*
22545+ * Tokens for glXChooseVisual and glXGetConfig:
22546+ */
22547+#define GLX_USE_GL 1
22548+#define GLX_BUFFER_SIZE 2
22549+#define GLX_LEVEL 3
22550+#define GLX_RGBA 4
22551+#define GLX_DOUBLEBUFFER 5
22552+#define GLX_STEREO 6
22553+#define GLX_AUX_BUFFERS 7
22554+#define GLX_RED_SIZE 8
22555+#define GLX_GREEN_SIZE 9
22556+#define GLX_BLUE_SIZE 10
22557+#define GLX_ALPHA_SIZE 11
22558+#define GLX_DEPTH_SIZE 12
22559+#define GLX_STENCIL_SIZE 13
22560+#define GLX_ACCUM_RED_SIZE 14
22561+#define GLX_ACCUM_GREEN_SIZE 15
22562+#define GLX_ACCUM_BLUE_SIZE 16
22563+#define GLX_ACCUM_ALPHA_SIZE 17
22564+
22565+
22566+/*
22567+ * Error codes returned by glXGetConfig:
22568+ */
22569+#define GLX_BAD_SCREEN 1
22570+#define GLX_BAD_ATTRIBUTE 2
22571+#define GLX_NO_EXTENSION 3
22572+#define GLX_BAD_VISUAL 4
22573+#define GLX_BAD_CONTEXT 5
22574+#define GLX_BAD_VALUE 6
22575+#define GLX_BAD_ENUM 7
22576+
22577+
22578+/*
22579+ * GLX 1.1 and later:
22580+ */
22581+#define GLX_VENDOR 1
22582+#define GLX_VERSION 2
22583+#define GLX_EXTENSIONS 3
22584+
22585+
22586+/*
22587+ * GLX 1.3 and later:
22588+ */
22589+#define GLX_CONFIG_CAVEAT 0x20
22590+#define GLX_DONT_CARE 0xFFFFFFFF
22591+#define GLX_X_VISUAL_TYPE 0x22
22592+#define GLX_TRANSPARENT_TYPE 0x23
22593+#define GLX_TRANSPARENT_INDEX_VALUE 0x24
22594+#define GLX_TRANSPARENT_RED_VALUE 0x25
22595+#define GLX_TRANSPARENT_GREEN_VALUE 0x26
22596+#define GLX_TRANSPARENT_BLUE_VALUE 0x27
22597+#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
22598+#define GLX_WINDOW_BIT 0x00000001
22599+#define GLX_PIXMAP_BIT 0x00000002
22600+#define GLX_PBUFFER_BIT 0x00000004
22601+#define GLX_AUX_BUFFERS_BIT 0x00000010
22602+#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
22603+#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
22604+#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
22605+#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
22606+#define GLX_DEPTH_BUFFER_BIT 0x00000020
22607+#define GLX_STENCIL_BUFFER_BIT 0x00000040
22608+#define GLX_ACCUM_BUFFER_BIT 0x00000080
22609+#define GLX_NONE 0x8000
22610+#define GLX_SLOW_CONFIG 0x8001
22611+#define GLX_TRUE_COLOR 0x8002
22612+#define GLX_DIRECT_COLOR 0x8003
22613+#define GLX_PSEUDO_COLOR 0x8004
22614+#define GLX_STATIC_COLOR 0x8005
22615+#define GLX_GRAY_SCALE 0x8006
22616+#define GLX_STATIC_GRAY 0x8007
22617+#define GLX_TRANSPARENT_RGB 0x8008
22618+#define GLX_TRANSPARENT_INDEX 0x8009
22619+#define GLX_VISUAL_ID 0x800B
22620+#define GLX_SCREEN 0x800C
22621+#define GLX_NON_CONFORMANT_CONFIG 0x800D
22622+#define GLX_DRAWABLE_TYPE 0x8010
22623+#define GLX_RENDER_TYPE 0x8011
22624+#define GLX_X_RENDERABLE 0x8012
22625+#define GLX_FBCONFIG_ID 0x8013
22626+#define GLX_RGBA_TYPE 0x8014
22627+#define GLX_COLOR_INDEX_TYPE 0x8015
22628+#define GLX_MAX_PBUFFER_WIDTH 0x8016
22629+#define GLX_MAX_PBUFFER_HEIGHT 0x8017
22630+#define GLX_MAX_PBUFFER_PIXELS 0x8018
22631+#define GLX_PRESERVED_CONTENTS 0x801B
22632+#define GLX_LARGEST_PBUFFER 0x801C
22633+#define GLX_WIDTH 0x801D
22634+#define GLX_HEIGHT 0x801E
22635+#define GLX_EVENT_MASK 0x801F
22636+#define GLX_DAMAGED 0x8020
22637+#define GLX_SAVED 0x8021
22638+#define GLX_WINDOW 0x8022
22639+#define GLX_PBUFFER 0x8023
22640+#define GLX_PBUFFER_HEIGHT 0x8040
22641+#define GLX_PBUFFER_WIDTH 0x8041
22642+#define GLX_RGBA_BIT 0x00000001
22643+#define GLX_COLOR_INDEX_BIT 0x00000002
22644+#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
22645+
22646+
22647+/*
22648+ * GLX 1.4 and later:
22649+ */
22650+#define GLX_SAMPLE_BUFFERS 0x186a0 /*100000*/
22651+#define GLX_SAMPLES 0x186a1 /*100001*/
22652+
22653+
22654+
22655+typedef struct __GLXcontextRec *GLXContext;
22656+typedef XID GLXPixmap;
22657+typedef XID GLXDrawable;
22658+/* GLX 1.3 and later */
22659+typedef struct __GLXFBConfigRec *GLXFBConfig;
22660+typedef XID GLXFBConfigID;
22661+typedef XID GLXContextID;
22662+typedef XID GLXWindow;
22663+typedef XID GLXPbuffer;
22664+
22665+
22666+
22667+extern XVisualInfo* glXChooseVisual( Display *dpy, int screen,
22668+ int *attribList );
22669+
22670+extern GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis,
22671+ GLXContext shareList, Bool direct );
22672+
22673+extern void glXDestroyContext( Display *dpy, GLXContext ctx );
22674+
22675+extern Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable,
22676+ GLXContext ctx);
22677+
22678+extern void glXCopyContext( Display *dpy, GLXContext src, GLXContext dst,
22679+ unsigned long mask );
22680+
22681+extern void glXSwapBuffers( Display *dpy, GLXDrawable drawable );
22682+
22683+extern GLXPixmap glXCreateGLXPixmap( Display *dpy, XVisualInfo *visual,
22684+ Pixmap pixmap );
22685+
22686+extern void glXDestroyGLXPixmap( Display *dpy, GLXPixmap pixmap );
22687+
22688+extern Bool glXQueryExtension( Display *dpy, int *errorb, int *event );
22689+
22690+extern Bool glXQueryVersion( Display *dpy, int *maj, int *min );
22691+
22692+extern Bool glXIsDirect( Display *dpy, GLXContext ctx );
22693+
22694+extern int glXGetConfig( Display *dpy, XVisualInfo *visual,
22695+ int attrib, int *value );
22696+
22697+extern GLXContext glXGetCurrentContext( void );
22698+
22699+extern GLXDrawable glXGetCurrentDrawable( void );
22700+
22701+extern void glXWaitGL( void );
22702+
22703+extern void glXWaitX( void );
22704+
22705+extern void glXUseXFont( Font font, int first, int count, int list );
22706+
22707+
22708+
22709+/* GLX 1.1 and later */
22710+extern const char *glXQueryExtensionsString( Display *dpy, int screen );
22711+
22712+extern const char *glXQueryServerString( Display *dpy, int screen, int name );
22713+
22714+extern const char *glXGetClientString( Display *dpy, int name );
22715+
22716+
22717+/* GLX 1.2 and later */
22718+extern Display *glXGetCurrentDisplay( void );
22719+
22720+
22721+/* GLX 1.3 and later */
22722+extern GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
22723+ const int *attribList, int *nitems );
22724+
22725+extern int glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config,
22726+ int attribute, int *value );
22727+
22728+extern GLXFBConfig *glXGetFBConfigs( Display *dpy, int screen,
22729+ int *nelements );
22730+
22731+extern XVisualInfo *glXGetVisualFromFBConfig( Display *dpy,
22732+ GLXFBConfig config );
22733+
22734+extern GLXWindow glXCreateWindow( Display *dpy, GLXFBConfig config,
22735+ Window win, const int *attribList );
22736+
22737+extern void glXDestroyWindow( Display *dpy, GLXWindow window );
22738+
22739+extern GLXPixmap glXCreatePixmap( Display *dpy, GLXFBConfig config,
22740+ Pixmap pixmap, const int *attribList );
22741+
22742+extern void glXDestroyPixmap( Display *dpy, GLXPixmap pixmap );
22743+
22744+extern GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config,
22745+ const int *attribList );
22746+
22747+extern void glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf );
22748+
22749+extern void glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute,
22750+ unsigned int *value );
22751+
22752+extern GLXContext glXCreateNewContext( Display *dpy, GLXFBConfig config,
22753+ int renderType, GLXContext shareList,
22754+ Bool direct );
22755+
22756+extern Bool glXMakeContextCurrent( Display *dpy, GLXDrawable draw,
22757+ GLXDrawable read, GLXContext ctx );
22758+
22759+extern GLXDrawable glXGetCurrentReadDrawable( void );
22760+
22761+extern int glXQueryContext( Display *dpy, GLXContext ctx, int attribute,
22762+ int *value );
22763+
22764+extern void glXSelectEvent( Display *dpy, GLXDrawable drawable,
22765+ unsigned long mask );
22766+
22767+extern void glXGetSelectedEvent( Display *dpy, GLXDrawable drawable,
22768+ unsigned long *mask );
22769+
22770+
22771+/* GLX 1.4 and later */
22772+extern void (*glXGetProcAddress(const GLubyte *procname))( void );
22773+
22774+
22775+#ifndef GLX_GLXEXT_LEGACY
22776+
22777+#include <mesa_glxext.h>
22778+
22779+#else
22780+
22781+
22782+
22783+/*
22784+ * ARB 2. GLX_ARB_get_proc_address
22785+ */
22786+#ifndef GLX_ARB_get_proc_address
22787+#define GLX_ARB_get_proc_address 1
22788+
22789+typedef void (*__GLXextFuncPtr)(void);
22790+extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
22791+
22792+#endif /* GLX_ARB_get_proc_address */
22793+
22794+
22795+
22796+#endif /* GLX_GLXEXT_LEGACY */
22797+
22798+
22799+/**
22800+ ** The following aren't in glxext.h yet.
22801+ **/
22802+
22803+
22804+/*
22805+ * ???. GLX_NV_vertex_array_range
22806+ */
22807+#ifndef GLX_NV_vertex_array_range
22808+#define GLX_NV_vertex_array_range
22809+
22810+extern void *glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
22811+extern void glXFreeMemoryNV(GLvoid *pointer);
22812+typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
22813+typedef void ( * PFNGLXFREEMEMORYNVPROC) (GLvoid *pointer);
22814+
22815+#endif /* GLX_NV_vertex_array_range */
22816+
22817+
22818+/*
22819+ * ???. GLX_MESA_allocate_memory
22820+ */
22821+#ifndef GLX_MESA_allocate_memory
22822+#define GLX_MESA_allocate_memory 1
22823+
22824+extern void *glXAllocateMemoryMESA(Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
22825+extern void glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer);
22826+extern GLuint glXGetMemoryOffsetMESA(Display *dpy, int scrn, const void *pointer);
22827+typedef void * ( * PFNGLXALLOCATEMEMORYMESAPROC) (Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
22828+typedef void ( * PFNGLXFREEMEMORYMESAPROC) (Display *dpy, int scrn, void *pointer);
22829+typedef GLuint (* PFNGLXGETMEMORYOFFSETMESAPROC) (Display *dpy, int scrn, const void *pointer);
22830+
22831+#endif /* GLX_MESA_allocate_memory */
22832+
22833+
22834+/*
22835+ * ARB ?. GLX_ARB_render_texture
22836+ * XXX This was never finalized!
22837+ */
22838+#ifndef GLX_ARB_render_texture
22839+#define GLX_ARB_render_texture 1
22840+
22841+extern Bool glXBindTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
22842+extern Bool glXReleaseTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
22843+extern Bool glXDrawableAttribARB(Display *dpy, GLXDrawable draw, const int *attribList);
22844+
22845+#endif /* GLX_ARB_render_texture */
22846+
22847+
22848+#ifndef GLX_ATI_render_texture
22849+#define GLX_ATI_render_texture 1
22850+
22851+extern void glXBindTexImageATI(Display *dpy, GLXPbuffer pbuffer, int buffer);
22852+extern void glXReleaseTexImageATI(Display *dpy, GLXPbuffer pbuffer, int buffer);
22853+extern void glXDrawableAttribATI(Display *dpy, GLXDrawable draw, const int *attribList);
22854+
22855+#endif /* GLX_ATI_render_texture */
22856+
22857+
22858+/*
22859+ * Remove this when glxext.h is updated.
22860+ */
22861+#ifndef GLX_NV_float_buffer
22862+#define GLX_NV_float_buffer 1
22863+
22864+#define GLX_FLOAT_COMPONENTS_NV 0x20B0
22865+
22866+#endif /* GLX_NV_float_buffer */
22867+
22868+
22869+
22870+/*
22871+ * #?. GLX_MESA_swap_frame_usage
22872+ */
22873+#ifndef GLX_MESA_swap_frame_usage
22874+#define GLX_MESA_swap_frame_usage 1
22875+
22876+extern int glXGetFrameUsageMESA(Display *dpy, GLXDrawable drawable, float *usage);
22877+extern int glXBeginFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
22878+extern int glXEndFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
22879+extern int glXQueryFrameTrackingMESA(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
22880+
22881+typedef int (*PFNGLXGETFRAMEUSAGEMESAPROC) (Display *dpy, GLXDrawable drawable, float *usage);
22882+typedef int (*PFNGLXBEGINFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
22883+typedef int (*PFNGLXENDFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
22884+typedef int (*PFNGLXQUERYFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
22885+
22886+#endif /* GLX_MESA_swap_frame_usage */
22887+
22888+
22889+
22890+/*
22891+ * #?. GLX_MESA_swap_control
22892+ */
22893+#ifndef GLX_MESA_swap_control
22894+#define GLX_MESA_swap_control 1
22895+
22896+extern int glXSwapIntervalMESA(unsigned int interval);
22897+extern int glXGetSwapIntervalMESA(void);
22898+
22899+typedef int (*PFNGLXSWAPINTERVALMESAPROC)(unsigned int interval);
22900+typedef int (*PFNGLXGETSWAPINTERVALMESAPROC)(void);
22901+
22902+#endif /* GLX_MESA_swap_control */
22903+
22904+
22905+
22906+/*
22907+ * #?. GLX_EXT_texture_from_pixmap
22908+ * XXX not finished?
22909+ */
22910+#ifndef GLX_EXT_texture_from_pixmap
22911+#define GLX_EXT_texture_from_pixmap 1
22912+
22913+#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
22914+#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
22915+#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
22916+#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
22917+#define GLX_Y_INVERTED_EXT 0x20D4
22918+
22919+#define GLX_TEXTURE_FORMAT_EXT 0x20D5
22920+#define GLX_TEXTURE_TARGET_EXT 0x20D6
22921+#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
22922+
22923+#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
22924+#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
22925+#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
22926+
22927+#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
22928+#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
22929+#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
22930+
22931+#define GLX_TEXTURE_1D_EXT 0x20DB
22932+#define GLX_TEXTURE_2D_EXT 0x20DC
22933+#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
22934+
22935+#define GLX_FRONT_LEFT_EXT 0x20DE
22936+#define GLX_FRONT_RIGHT_EXT 0x20DF
22937+#define GLX_BACK_LEFT_EXT 0x20E0
22938+#define GLX_BACK_RIGHT_EXT 0x20E1
22939+#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
22940+#define GLX_BACK_EXT GLX_BACK_LEFT_EXT
22941+#define GLX_AUX0_EXT 0x20E2
22942+#define GLX_AUX1_EXT 0x20E3
22943+#define GLX_AUX2_EXT 0x20E4
22944+#define GLX_AUX3_EXT 0x20E5
22945+#define GLX_AUX4_EXT 0x20E6
22946+#define GLX_AUX5_EXT 0x20E7
22947+#define GLX_AUX6_EXT 0x20E8
22948+#define GLX_AUX7_EXT 0x20E9
22949+#define GLX_AUX8_EXT 0x20EA
22950+#define GLX_AUX9_EXT 0x20EB
22951+
22952+extern void glXBindTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
22953+extern void glXReleaseTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer);
22954+
22955+#endif /* GLX_EXT_texture_from_pixmap */
22956+
22957+
22958+
22959+
22960+/*** Should these go here, or in another header? */
22961+/*
22962+** GLX Events
22963+*/
22964+typedef struct {
22965+ int event_type; /* GLX_DAMAGED or GLX_SAVED */
22966+ int draw_type; /* GLX_WINDOW or GLX_PBUFFER */
22967+ unsigned long serial; /* # of last request processed by server */
22968+ Bool send_event; /* true if this came for SendEvent request */
22969+ Display *display; /* display the event was read from */
22970+ GLXDrawable drawable; /* XID of Drawable */
22971+ unsigned int buffer_mask; /* mask indicating which buffers are affected */
22972+ unsigned int aux_buffer; /* which aux buffer was affected */
22973+ int x, y;
22974+ int width, height;
22975+ int count; /* if nonzero, at least this many more */
22976+} GLXPbufferClobberEvent;
22977+
22978+typedef union __GLXEvent {
22979+ GLXPbufferClobberEvent glxpbufferclobber;
22980+ long pad[24];
22981+} GLXEvent;
22982+
22983+#ifdef __cplusplus
22984+}
22985+#endif
22986+
22987+#endif
22988Index: qemu-0.14.0/target-i386/mesa_glxext.h
22989===================================================================
22990--- /dev/null
22991+++ qemu-0.14.0/target-i386/mesa_glxext.h
22992@@ -0,0 +1,785 @@
22993+#ifndef __glxext_h_
22994+#define __glxext_h_
22995+
22996+#ifdef __cplusplus
22997+extern "C" {
22998+#endif
22999+
23000+/*
23001+** Copyright (c) 2007 The Khronos Group Inc.
23002+**
23003+** Permission is hereby granted, free of charge, to any person obtaining a
23004+** copy of this software and/or associated documentation files (the
23005+** "Materials"), to deal in the Materials without restriction, including
23006+** without limitation the rights to use, copy, modify, merge, publish,
23007+** distribute, sublicense, and/or sell copies of the Materials, and to
23008+** permit persons to whom the Materials are furnished to do so, subject to
23009+** the following conditions:
23010+**
23011+** The above copyright notice and this permission notice shall be included
23012+** in all copies or substantial portions of the Materials.
23013+**
23014+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23015+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23016+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23017+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
23018+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23019+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23020+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
23021+*/
23022+
23023+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
23024+#define WIN32_LEAN_AND_MEAN 1
23025+#include <windows.h>
23026+#endif
23027+
23028+#ifndef APIENTRY
23029+#define APIENTRY
23030+#endif
23031+#ifndef APIENTRYP
23032+#define APIENTRYP APIENTRY *
23033+#endif
23034+#ifndef GLAPI
23035+#define GLAPI extern
23036+#endif
23037+
23038+/*************************************************************/
23039+
23040+/* Header file version number, required by OpenGL ABI for Linux */
23041+/* glxext.h last updated 2007/04/21 */
23042+/* Current version at http://www.opengl.org/registry/ */
23043+#define GLX_GLXEXT_VERSION 19
23044+
23045+#ifndef GLX_VERSION_1_3
23046+#define GLX_WINDOW_BIT 0x00000001
23047+#define GLX_PIXMAP_BIT 0x00000002
23048+#define GLX_PBUFFER_BIT 0x00000004
23049+#define GLX_RGBA_BIT 0x00000001
23050+#define GLX_COLOR_INDEX_BIT 0x00000002
23051+#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
23052+#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
23053+#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
23054+#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
23055+#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
23056+#define GLX_AUX_BUFFERS_BIT 0x00000010
23057+#define GLX_DEPTH_BUFFER_BIT 0x00000020
23058+#define GLX_STENCIL_BUFFER_BIT 0x00000040
23059+#define GLX_ACCUM_BUFFER_BIT 0x00000080
23060+#define GLX_CONFIG_CAVEAT 0x20
23061+#define GLX_X_VISUAL_TYPE 0x22
23062+#define GLX_TRANSPARENT_TYPE 0x23
23063+#define GLX_TRANSPARENT_INDEX_VALUE 0x24
23064+#define GLX_TRANSPARENT_RED_VALUE 0x25
23065+#define GLX_TRANSPARENT_GREEN_VALUE 0x26
23066+#define GLX_TRANSPARENT_BLUE_VALUE 0x27
23067+#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
23068+#define GLX_DONT_CARE 0xFFFFFFFF
23069+#define GLX_NONE 0x8000
23070+#define GLX_SLOW_CONFIG 0x8001
23071+#define GLX_TRUE_COLOR 0x8002
23072+#define GLX_DIRECT_COLOR 0x8003
23073+#define GLX_PSEUDO_COLOR 0x8004
23074+#define GLX_STATIC_COLOR 0x8005
23075+#define GLX_GRAY_SCALE 0x8006
23076+#define GLX_STATIC_GRAY 0x8007
23077+#define GLX_TRANSPARENT_RGB 0x8008
23078+#define GLX_TRANSPARENT_INDEX 0x8009
23079+#define GLX_VISUAL_ID 0x800B
23080+#define GLX_SCREEN 0x800C
23081+#define GLX_NON_CONFORMANT_CONFIG 0x800D
23082+#define GLX_DRAWABLE_TYPE 0x8010
23083+#define GLX_RENDER_TYPE 0x8011
23084+#define GLX_X_RENDERABLE 0x8012
23085+#define GLX_FBCONFIG_ID 0x8013
23086+#define GLX_RGBA_TYPE 0x8014
23087+#define GLX_COLOR_INDEX_TYPE 0x8015
23088+#define GLX_MAX_PBUFFER_WIDTH 0x8016
23089+#define GLX_MAX_PBUFFER_HEIGHT 0x8017
23090+#define GLX_MAX_PBUFFER_PIXELS 0x8018
23091+#define GLX_PRESERVED_CONTENTS 0x801B
23092+#define GLX_LARGEST_PBUFFER 0x801C
23093+#define GLX_WIDTH 0x801D
23094+#define GLX_HEIGHT 0x801E
23095+#define GLX_EVENT_MASK 0x801F
23096+#define GLX_DAMAGED 0x8020
23097+#define GLX_SAVED 0x8021
23098+#define GLX_WINDOW 0x8022
23099+#define GLX_PBUFFER 0x8023
23100+#define GLX_PBUFFER_HEIGHT 0x8040
23101+#define GLX_PBUFFER_WIDTH 0x8041
23102+#endif
23103+
23104+#ifndef GLX_VERSION_1_4
23105+#define GLX_SAMPLE_BUFFERS 100000
23106+#define GLX_SAMPLES 100001
23107+#endif
23108+
23109+#ifndef GLX_ARB_get_proc_address
23110+#endif
23111+
23112+#ifndef GLX_ARB_multisample
23113+#define GLX_SAMPLE_BUFFERS_ARB 100000
23114+#define GLX_SAMPLES_ARB 100001
23115+#endif
23116+
23117+#ifndef GLX_ARB_fbconfig_float
23118+#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9
23119+#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
23120+#endif
23121+
23122+#ifndef GLX_SGIS_multisample
23123+#define GLX_SAMPLE_BUFFERS_SGIS 100000
23124+#define GLX_SAMPLES_SGIS 100001
23125+#endif
23126+
23127+#ifndef GLX_EXT_visual_info
23128+#define GLX_X_VISUAL_TYPE_EXT 0x22
23129+#define GLX_TRANSPARENT_TYPE_EXT 0x23
23130+#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
23131+#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
23132+#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
23133+#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
23134+#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
23135+#define GLX_NONE_EXT 0x8000
23136+#define GLX_TRUE_COLOR_EXT 0x8002
23137+#define GLX_DIRECT_COLOR_EXT 0x8003
23138+#define GLX_PSEUDO_COLOR_EXT 0x8004
23139+#define GLX_STATIC_COLOR_EXT 0x8005
23140+#define GLX_GRAY_SCALE_EXT 0x8006
23141+#define GLX_STATIC_GRAY_EXT 0x8007
23142+#define GLX_TRANSPARENT_RGB_EXT 0x8008
23143+#define GLX_TRANSPARENT_INDEX_EXT 0x8009
23144+#endif
23145+
23146+#ifndef GLX_SGI_swap_control
23147+#endif
23148+
23149+#ifndef GLX_SGI_video_sync
23150+#endif
23151+
23152+#ifndef GLX_SGI_make_current_read
23153+#endif
23154+
23155+#ifndef GLX_SGIX_video_source
23156+#endif
23157+
23158+#ifndef GLX_EXT_visual_rating
23159+#define GLX_VISUAL_CAVEAT_EXT 0x20
23160+#define GLX_SLOW_VISUAL_EXT 0x8001
23161+#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
23162+/* reuse GLX_NONE_EXT */
23163+#endif
23164+
23165+#ifndef GLX_EXT_import_context
23166+#define GLX_SHARE_CONTEXT_EXT 0x800A
23167+#define GLX_VISUAL_ID_EXT 0x800B
23168+#define GLX_SCREEN_EXT 0x800C
23169+#endif
23170+
23171+#ifndef GLX_SGIX_fbconfig
23172+#define GLX_WINDOW_BIT_SGIX 0x00000001
23173+#define GLX_PIXMAP_BIT_SGIX 0x00000002
23174+#define GLX_RGBA_BIT_SGIX 0x00000001
23175+#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
23176+#define GLX_DRAWABLE_TYPE_SGIX 0x8010
23177+#define GLX_RENDER_TYPE_SGIX 0x8011
23178+#define GLX_X_RENDERABLE_SGIX 0x8012
23179+#define GLX_FBCONFIG_ID_SGIX 0x8013
23180+#define GLX_RGBA_TYPE_SGIX 0x8014
23181+#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
23182+/* reuse GLX_SCREEN_EXT */
23183+#endif
23184+
23185+#ifndef GLX_SGIX_pbuffer
23186+#define GLX_PBUFFER_BIT_SGIX 0x00000004
23187+#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
23188+#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
23189+#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
23190+#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
23191+#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
23192+#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
23193+#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
23194+#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
23195+#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
23196+#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
23197+#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
23198+#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
23199+#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
23200+#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
23201+#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
23202+#define GLX_PRESERVED_CONTENTS_SGIX 0x801B
23203+#define GLX_LARGEST_PBUFFER_SGIX 0x801C
23204+#define GLX_WIDTH_SGIX 0x801D
23205+#define GLX_HEIGHT_SGIX 0x801E
23206+#define GLX_EVENT_MASK_SGIX 0x801F
23207+#define GLX_DAMAGED_SGIX 0x8020
23208+#define GLX_SAVED_SGIX 0x8021
23209+#define GLX_WINDOW_SGIX 0x8022
23210+#define GLX_PBUFFER_SGIX 0x8023
23211+#endif
23212+
23213+#ifndef GLX_SGI_cushion
23214+#endif
23215+
23216+#ifndef GLX_SGIX_video_resize
23217+#define GLX_SYNC_FRAME_SGIX 0x00000000
23218+#define GLX_SYNC_SWAP_SGIX 0x00000001
23219+#endif
23220+
23221+#ifndef GLX_SGIX_dmbuffer
23222+#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024
23223+#endif
23224+
23225+#ifndef GLX_SGIX_swap_group
23226+#endif
23227+
23228+#ifndef GLX_SGIX_swap_barrier
23229+#endif
23230+
23231+#ifndef GLX_SGIS_blended_overlay
23232+#define GLX_BLENDED_RGBA_SGIS 0x8025
23233+#endif
23234+
23235+#ifndef GLX_SGIS_shared_multisample
23236+#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
23237+#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
23238+#endif
23239+
23240+#ifndef GLX_SUN_get_transparent_index
23241+#endif
23242+
23243+#ifndef GLX_3DFX_multisample
23244+#define GLX_SAMPLE_BUFFERS_3DFX 0x8050
23245+#define GLX_SAMPLES_3DFX 0x8051
23246+#endif
23247+
23248+#ifndef GLX_MESA_copy_sub_buffer
23249+#endif
23250+
23251+#ifndef GLX_MESA_pixmap_colormap
23252+#endif
23253+
23254+#ifndef GLX_MESA_release_buffers
23255+#endif
23256+
23257+#ifndef GLX_MESA_set_3dfx_mode
23258+#define GLX_3DFX_WINDOW_MODE_MESA 0x1
23259+#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
23260+#endif
23261+
23262+#ifndef GLX_SGIX_visual_select_group
23263+#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
23264+#endif
23265+
23266+#ifndef GLX_OML_swap_method
23267+#define GLX_SWAP_METHOD_OML 0x8060
23268+#define GLX_SWAP_EXCHANGE_OML 0x8061
23269+#define GLX_SWAP_COPY_OML 0x8062
23270+#define GLX_SWAP_UNDEFINED_OML 0x8063
23271+#endif
23272+
23273+#ifndef GLX_OML_sync_control
23274+#endif
23275+
23276+#ifndef GLX_NV_float_buffer
23277+#define GLX_FLOAT_COMPONENTS_NV 0x20B0
23278+#endif
23279+
23280+#ifndef GLX_SGIX_hyperpipe
23281+#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
23282+#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
23283+#define GLX_BAD_HYPERPIPE_SGIX 92
23284+#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001
23285+#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002
23286+#define GLX_PIPE_RECT_SGIX 0x00000001
23287+#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002
23288+#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003
23289+#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004
23290+#define GLX_HYPERPIPE_ID_SGIX 0x8030
23291+#endif
23292+
23293+#ifndef GLX_MESA_agp_offset
23294+#endif
23295+
23296+#ifndef GLX_EXT_fbconfig_packed_float
23297+#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
23298+#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008
23299+#endif
23300+
23301+#ifndef GLX_EXT_framebuffer_sRGB
23302+#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
23303+#endif
23304+
23305+#ifndef GLX_EXT_texture_from_pixmap
23306+#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
23307+#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
23308+#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
23309+#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
23310+#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
23311+#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
23312+#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
23313+#define GLX_Y_INVERTED_EXT 0x20D4
23314+#define GLX_TEXTURE_FORMAT_EXT 0x20D5
23315+#define GLX_TEXTURE_TARGET_EXT 0x20D6
23316+#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
23317+#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
23318+#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
23319+#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
23320+#define GLX_TEXTURE_1D_EXT 0x20DB
23321+#define GLX_TEXTURE_2D_EXT 0x20DC
23322+#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
23323+#define GLX_FRONT_LEFT_EXT 0x20DE
23324+#define GLX_FRONT_RIGHT_EXT 0x20DF
23325+#define GLX_BACK_LEFT_EXT 0x20E0
23326+#define GLX_BACK_RIGHT_EXT 0x20E1
23327+#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
23328+#define GLX_BACK_EXT GLX_BACK_LEFT_EXT
23329+#define GLX_AUX0_EXT 0x20E2
23330+#define GLX_AUX1_EXT 0x20E3
23331+#define GLX_AUX2_EXT 0x20E4
23332+#define GLX_AUX3_EXT 0x20E5
23333+#define GLX_AUX4_EXT 0x20E6
23334+#define GLX_AUX5_EXT 0x20E7
23335+#define GLX_AUX6_EXT 0x20E8
23336+#define GLX_AUX7_EXT 0x20E9
23337+#define GLX_AUX8_EXT 0x20EA
23338+#define GLX_AUX9_EXT 0x20EB
23339+#endif
23340+
23341+
23342+/*************************************************************/
23343+
23344+#ifndef GLX_ARB_get_proc_address
23345+typedef void (*__GLXextFuncPtr)(void);
23346+#endif
23347+
23348+#ifndef GLX_SGIX_video_source
23349+typedef XID GLXVideoSourceSGIX;
23350+#endif
23351+
23352+#ifndef GLX_SGIX_fbconfig
23353+typedef XID GLXFBConfigIDSGIX;
23354+typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
23355+#endif
23356+
23357+#ifndef GLX_SGIX_pbuffer
23358+typedef XID GLXPbufferSGIX;
23359+typedef struct {
23360+ int type;
23361+ unsigned long serial; /* # of last request processed by server */
23362+ Bool send_event; /* true if this came for SendEvent request */
23363+ Display *display; /* display the event was read from */
23364+ GLXDrawable drawable; /* i.d. of Drawable */
23365+ int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */
23366+ int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */
23367+ unsigned int mask; /* mask indicating which buffers are affected*/
23368+ int x, y;
23369+ int width, height;
23370+ int count; /* if nonzero, at least this many more */
23371+} GLXBufferClobberEventSGIX;
23372+#endif
23373+
23374+#ifndef GLEXT_64_TYPES_DEFINED
23375+/* This code block is duplicated in glxext.h, so must be protected */
23376+#define GLEXT_64_TYPES_DEFINED
23377+/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
23378+/* (as used in the GLX_OML_sync_control extension). */
23379+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
23380+#include <inttypes.h>
23381+#elif defined(__sun__) || defined(__digital__)
23382+#include <inttypes.h>
23383+#if defined(__STDC__)
23384+#if defined(__arch64__)
23385+typedef long int int64_t;
23386+typedef unsigned long int uint64_t;
23387+#else
23388+typedef long long int int64_t;
23389+typedef unsigned long long int uint64_t;
23390+#endif /* __arch64__ */
23391+#endif /* __STDC__ */
23392+#elif defined( __VMS )
23393+#include <inttypes.h>
23394+#elif defined(__SCO__) || defined(__USLC__)
23395+#include <stdint.h>
23396+#elif defined(__UNIXOS2__) || defined(__SOL64__)
23397+typedef long int int32_t;
23398+typedef long long int int64_t;
23399+typedef unsigned long long int uint64_t;
23400+#elif defined(_WIN32) && defined(__GNUC__)
23401+#include <stdint.h>
23402+#elif defined(_WIN32)
23403+typedef __int32 int32_t;
23404+typedef __int64 int64_t;
23405+typedef unsigned __int64 uint64_t;
23406+#else
23407+#include <inttypes.h> /* Fallback option */
23408+#endif
23409+#endif
23410+
23411+#ifndef GLX_VERSION_1_3
23412+#define GLX_VERSION_1_3 1
23413+#ifdef GLX_GLXEXT_PROTOTYPES
23414+extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *);
23415+extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *);
23416+extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *);
23417+extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig);
23418+extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *);
23419+extern void glXDestroyWindow (Display *, GLXWindow);
23420+extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *);
23421+extern void glXDestroyPixmap (Display *, GLXPixmap);
23422+extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *);
23423+extern void glXDestroyPbuffer (Display *, GLXPbuffer);
23424+extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *);
23425+extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool);
23426+extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext);
23427+extern GLXDrawable glXGetCurrentReadDrawable (void);
23428+extern Display * glXGetCurrentDisplay (void);
23429+extern int glXQueryContext (Display *, GLXContext, int, int *);
23430+extern void glXSelectEvent (Display *, GLXDrawable, unsigned long);
23431+extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *);
23432+#endif /* GLX_GLXEXT_PROTOTYPES */
23433+typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
23434+typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
23435+typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
23436+typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
23437+typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
23438+typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
23439+typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
23440+typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
23441+typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
23442+typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
23443+typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
23444+typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
23445+typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
23446+typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
23447+typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
23448+typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
23449+typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
23450+typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
23451+#endif
23452+
23453+#ifndef GLX_VERSION_1_4
23454+#define GLX_VERSION_1_4 1
23455+#ifdef GLX_GLXEXT_PROTOTYPES
23456+extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *);
23457+#endif /* GLX_GLXEXT_PROTOTYPES */
23458+typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
23459+#endif
23460+
23461+#ifndef GLX_ARB_get_proc_address
23462+#define GLX_ARB_get_proc_address 1
23463+#ifdef GLX_GLXEXT_PROTOTYPES
23464+extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
23465+#endif /* GLX_GLXEXT_PROTOTYPES */
23466+typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
23467+#endif
23468+
23469+#ifndef GLX_ARB_multisample
23470+#define GLX_ARB_multisample 1
23471+#endif
23472+
23473+#ifndef GLX_ARB_fbconfig_float
23474+#define GLX_ARB_fbconfig_float 1
23475+#endif
23476+
23477+#ifndef GLX_SGIS_multisample
23478+#define GLX_SGIS_multisample 1
23479+#endif
23480+
23481+#ifndef GLX_EXT_visual_info
23482+#define GLX_EXT_visual_info 1
23483+#endif
23484+
23485+#ifndef GLX_SGI_swap_control
23486+#define GLX_SGI_swap_control 1
23487+#ifdef GLX_GLXEXT_PROTOTYPES
23488+extern int glXSwapIntervalSGI (int);
23489+#endif /* GLX_GLXEXT_PROTOTYPES */
23490+typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
23491+#endif
23492+
23493+#ifndef GLX_SGI_video_sync
23494+#define GLX_SGI_video_sync 1
23495+#ifdef GLX_GLXEXT_PROTOTYPES
23496+extern int glXGetVideoSyncSGI (unsigned int *);
23497+extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
23498+#endif /* GLX_GLXEXT_PROTOTYPES */
23499+typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
23500+typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
23501+#endif
23502+
23503+#ifndef GLX_SGI_make_current_read
23504+#define GLX_SGI_make_current_read 1
23505+#ifdef GLX_GLXEXT_PROTOTYPES
23506+extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext);
23507+extern GLXDrawable glXGetCurrentReadDrawableSGI (void);
23508+#endif /* GLX_GLXEXT_PROTOTYPES */
23509+typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
23510+typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
23511+#endif
23512+
23513+#ifndef GLX_SGIX_video_source
23514+#define GLX_SGIX_video_source 1
23515+#ifdef _VL_H
23516+#ifdef GLX_GLXEXT_PROTOTYPES
23517+extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode);
23518+extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX);
23519+#endif /* GLX_GLXEXT_PROTOTYPES */
23520+typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
23521+typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
23522+#endif /* _VL_H */
23523+#endif
23524+
23525+#ifndef GLX_EXT_visual_rating
23526+#define GLX_EXT_visual_rating 1
23527+#endif
23528+
23529+#ifndef GLX_EXT_import_context
23530+#define GLX_EXT_import_context 1
23531+#ifdef GLX_GLXEXT_PROTOTYPES
23532+extern Display * glXGetCurrentDisplayEXT (void);
23533+extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *);
23534+extern GLXContextID glXGetContextIDEXT (const GLXContext);
23535+extern GLXContext glXImportContextEXT (Display *, GLXContextID);
23536+extern void glXFreeContextEXT (Display *, GLXContext);
23537+#endif /* GLX_GLXEXT_PROTOTYPES */
23538+typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
23539+typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
23540+typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
23541+typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
23542+typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
23543+#endif
23544+
23545+#ifndef GLX_SGIX_fbconfig
23546+#define GLX_SGIX_fbconfig 1
23547+#ifdef GLX_GLXEXT_PROTOTYPES
23548+extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *);
23549+extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *);
23550+extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap);
23551+extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool);
23552+extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX);
23553+extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *);
23554+#endif /* GLX_GLXEXT_PROTOTYPES */
23555+typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
23556+typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
23557+typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
23558+typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
23559+typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
23560+typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
23561+#endif
23562+
23563+#ifndef GLX_SGIX_pbuffer
23564+#define GLX_SGIX_pbuffer 1
23565+#ifdef GLX_GLXEXT_PROTOTYPES
23566+extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *);
23567+extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX);
23568+extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *);
23569+extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long);
23570+extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *);
23571+#endif /* GLX_GLXEXT_PROTOTYPES */
23572+typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
23573+typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
23574+typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
23575+typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
23576+typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
23577+#endif
23578+
23579+#ifndef GLX_SGI_cushion
23580+#define GLX_SGI_cushion 1
23581+#ifdef GLX_GLXEXT_PROTOTYPES
23582+extern void glXCushionSGI (Display *, Window, float);
23583+#endif /* GLX_GLXEXT_PROTOTYPES */
23584+typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
23585+#endif
23586+
23587+#ifndef GLX_SGIX_video_resize
23588+#define GLX_SGIX_video_resize 1
23589+#ifdef GLX_GLXEXT_PROTOTYPES
23590+extern int glXBindChannelToWindowSGIX (Display *, int, int, Window);
23591+extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int);
23592+extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *);
23593+extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *);
23594+extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum);
23595+#endif /* GLX_GLXEXT_PROTOTYPES */
23596+typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
23597+typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
23598+typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
23599+typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
23600+typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype);
23601+#endif
23602+
23603+#ifndef GLX_SGIX_dmbuffer
23604+#define GLX_SGIX_dmbuffer 1
23605+#ifdef _DM_BUFFER_H_
23606+#ifdef GLX_GLXEXT_PROTOTYPES
23607+extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer);
23608+#endif /* GLX_GLXEXT_PROTOTYPES */
23609+typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
23610+#endif /* _DM_BUFFER_H_ */
23611+#endif
23612+
23613+#ifndef GLX_SGIX_swap_group
23614+#define GLX_SGIX_swap_group 1
23615+#ifdef GLX_GLXEXT_PROTOTYPES
23616+extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable);
23617+#endif /* GLX_GLXEXT_PROTOTYPES */
23618+typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
23619+#endif
23620+
23621+#ifndef GLX_SGIX_swap_barrier
23622+#define GLX_SGIX_swap_barrier 1
23623+#ifdef GLX_GLXEXT_PROTOTYPES
23624+extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int);
23625+extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *);
23626+#endif /* GLX_GLXEXT_PROTOTYPES */
23627+typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
23628+typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
23629+#endif
23630+
23631+#ifndef GLX_SUN_get_transparent_index
23632+#define GLX_SUN_get_transparent_index 1
23633+#ifdef GLX_GLXEXT_PROTOTYPES
23634+extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *);
23635+#endif /* GLX_GLXEXT_PROTOTYPES */
23636+typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
23637+#endif
23638+
23639+#ifndef GLX_MESA_copy_sub_buffer
23640+#define GLX_MESA_copy_sub_buffer 1
23641+#ifdef GLX_GLXEXT_PROTOTYPES
23642+extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int);
23643+#endif /* GLX_GLXEXT_PROTOTYPES */
23644+typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
23645+#endif
23646+
23647+#ifndef GLX_MESA_pixmap_colormap
23648+#define GLX_MESA_pixmap_colormap 1
23649+#ifdef GLX_GLXEXT_PROTOTYPES
23650+extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap);
23651+#endif /* GLX_GLXEXT_PROTOTYPES */
23652+typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
23653+#endif
23654+
23655+#ifndef GLX_MESA_release_buffers
23656+#define GLX_MESA_release_buffers 1
23657+#ifdef GLX_GLXEXT_PROTOTYPES
23658+extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable);
23659+#endif /* GLX_GLXEXT_PROTOTYPES */
23660+typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
23661+#endif
23662+
23663+#ifndef GLX_MESA_set_3dfx_mode
23664+#define GLX_MESA_set_3dfx_mode 1
23665+#ifdef GLX_GLXEXT_PROTOTYPES
23666+extern Bool glXSet3DfxModeMESA (int);
23667+#endif /* GLX_GLXEXT_PROTOTYPES */
23668+typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
23669+#endif
23670+
23671+#ifndef GLX_SGIX_visual_select_group
23672+#define GLX_SGIX_visual_select_group 1
23673+#endif
23674+
23675+#ifndef GLX_OML_swap_method
23676+#define GLX_OML_swap_method 1
23677+#endif
23678+
23679+#ifndef GLX_OML_sync_control
23680+#define GLX_OML_sync_control 1
23681+#ifdef GLX_GLXEXT_PROTOTYPES
23682+extern Bool glXGetSyncValuesOML (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *);
23683+extern Bool glXGetMscRateOML (Display *, GLXDrawable, int32_t *, int32_t *);
23684+extern int64_t glXSwapBuffersMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t);
23685+extern Bool glXWaitForMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *);
23686+extern Bool glXWaitForSbcOML (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *);
23687+#endif /* GLX_GLXEXT_PROTOTYPES */
23688+typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
23689+typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
23690+typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
23691+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);
23692+typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
23693+#endif
23694+
23695+#ifndef GLX_NV_float_buffer
23696+#define GLX_NV_float_buffer 1
23697+#endif
23698+
23699+#ifndef GLX_SGIX_hyperpipe
23700+#define GLX_SGIX_hyperpipe 1
23701+
23702+typedef struct {
23703+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23704+ int networkId;
23705+} GLXHyperpipeNetworkSGIX;
23706+
23707+typedef struct {
23708+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23709+ int channel;
23710+ unsigned int
23711+ participationType;
23712+ int timeSlice;
23713+} GLXHyperpipeConfigSGIX;
23714+
23715+typedef struct {
23716+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23717+ int srcXOrigin, srcYOrigin, srcWidth, srcHeight;
23718+ int destXOrigin, destYOrigin, destWidth, destHeight;
23719+} GLXPipeRect;
23720+
23721+typedef struct {
23722+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23723+ int XOrigin, YOrigin, maxHeight, maxWidth;
23724+} GLXPipeRectLimits;
23725+
23726+#ifdef GLX_GLXEXT_PROTOTYPES
23727+extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *, int *);
23728+extern int glXHyperpipeConfigSGIX (Display *, int, int, GLXHyperpipeConfigSGIX *, int *);
23729+extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *, int, int *);
23730+extern int glXDestroyHyperpipeConfigSGIX (Display *, int);
23731+extern int glXBindHyperpipeSGIX (Display *, int);
23732+extern int glXQueryHyperpipeBestAttribSGIX (Display *, int, int, int, void *, void *);
23733+extern int glXHyperpipeAttribSGIX (Display *, int, int, int, void *);
23734+extern int glXQueryHyperpipeAttribSGIX (Display *, int, int, int, void *);
23735+#endif /* GLX_GLXEXT_PROTOTYPES */
23736+typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);
23737+typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
23738+typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes);
23739+typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId);
23740+typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId);
23741+typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
23742+typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
23743+typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
23744+#endif
23745+
23746+#ifndef GLX_MESA_agp_offset
23747+#define GLX_MESA_agp_offset 1
23748+#ifdef GLX_GLXEXT_PROTOTYPES
23749+extern unsigned int glXGetAGPOffsetMESA (const void *);
23750+#endif /* GLX_GLXEXT_PROTOTYPES */
23751+typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
23752+#endif
23753+
23754+#ifndef GLX_EXT_fbconfig_packed_float
23755+#define GLX_EXT_fbconfig_packed_float 1
23756+#endif
23757+
23758+#ifndef GLX_EXT_framebuffer_sRGB
23759+#define GLX_EXT_framebuffer_sRGB 1
23760+#endif
23761+
23762+#ifndef GLX_EXT_texture_from_pixmap
23763+#define GLX_EXT_texture_from_pixmap 1
23764+#ifdef GLX_GLXEXT_PROTOTYPES
23765+extern void glXBindTexImageEXT (Display *, GLXDrawable, int, const int *);
23766+extern void glXReleaseTexImageEXT (Display *, GLXDrawable, int);
23767+#endif /* GLX_GLXEXT_PROTOTYPES */
23768+typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
23769+typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer);
23770+#endif
23771+
23772+
23773+#ifdef __cplusplus
23774+}
23775+#endif
23776+
23777+#endif
23778Index: qemu-0.14.0/target-i386/mesa_mipmap.c
23779===================================================================
23780--- /dev/null
23781+++ qemu-0.14.0/target-i386/mesa_mipmap.c
23782@@ -0,0 +1,824 @@
23783+
23784+/*
23785+ * Mesa 3-D graphics library
23786+ * Version: 3.4
23787+ * Copyright (C) 1995-2000 Brian Paul
23788+ *
23789+ * This library is free software; you can redistribute it and/or
23790+ * modify it under the terms of the GNU Library General Public
23791+ * License as published by the Free Software Foundation; either
23792+ * version 2 of the License, or (at your option) any later version.
23793+ *
23794+ * This library is distributed in the hope that it will be useful,
23795+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
23796+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23797+ * Library General Public License for more details.
23798+ *
23799+ * You should have received a copy of the GNU Library General Public
23800+ * License along with this library; if not, write to the Free
23801+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23802+ */
23803+
23804+
23805+#ifdef PC_HEADER
23806+#include "all.h"
23807+#else
23808+#include <assert.h>
23809+#include <math.h>
23810+#include <stdio.h>
23811+#include <stdlib.h>
23812+//#include "gluP.h"
23813+#endif
23814+
23815+
23816+/*
23817+ * Compute ceiling of integer quotient of A divided by B:
23818+ */
23819+#define CEILING( A, B ) ( (A) % (B) == 0 ? (A)/(B) : (A)/(B)+1 )
23820+
23821+
23822+
23823+#ifdef EPSILON
23824+#undef EPSILON
23825+#endif
23826+#define EPSILON 0.001
23827+
23828+
23829+/* To work around optimizer bug in MSVC4.1 */
23830+#if defined(__WIN32__) && !defined(OPENSTEP)
23831+void
23832+dummy(GLuint j, GLuint k)
23833+{
23834+}
23835+#else
23836+#define dummy(J, K)
23837+#endif
23838+
23839+
23840+static GLint GLAPIENTRY
23841+mesa_gluScaleImage(GLenum format,
23842+ GLsizei widthin, GLsizei heightin,
23843+ GLenum typein, const void *datain,
23844+ GLsizei widthout, GLsizei heightout,
23845+ GLenum typeout, void *dataout)
23846+{
23847+ GLint components, i, j, k;
23848+ GLfloat *tempin, *tempout;
23849+ GLfloat sx, sy;
23850+ GLint unpackrowlength, unpackalignment, unpackskiprows, unpackskippixels;
23851+ GLint packrowlength, packalignment, packskiprows, packskippixels;
23852+ GLint sizein, sizeout;
23853+ GLint rowstride, rowlen;
23854+
23855+
23856+ /* Determine number of components per pixel */
23857+ switch (format) {
23858+ case GL_COLOR_INDEX:
23859+ case GL_STENCIL_INDEX:
23860+ case GL_DEPTH_COMPONENT:
23861+ case GL_RED:
23862+ case GL_GREEN:
23863+ case GL_BLUE:
23864+ case GL_ALPHA:
23865+ case GL_LUMINANCE:
23866+ components = 1;
23867+ break;
23868+ case GL_LUMINANCE_ALPHA:
23869+ components = 2;
23870+ break;
23871+ case GL_RGB:
23872+ case GL_BGR:
23873+ components = 3;
23874+ break;
23875+ case GL_RGBA:
23876+ case GL_BGRA:
23877+#ifdef GL_EXT_abgr
23878+ case GL_ABGR_EXT:
23879+#endif
23880+ components = 4;
23881+ break;
23882+ default:
23883+ return GLU_INVALID_ENUM;
23884+ }
23885+
23886+ /* Determine bytes per input datum */
23887+ switch (typein) {
23888+ case GL_UNSIGNED_BYTE:
23889+ sizein = sizeof(GLubyte);
23890+ break;
23891+ case GL_BYTE:
23892+ sizein = sizeof(GLbyte);
23893+ break;
23894+ case GL_UNSIGNED_SHORT:
23895+ sizein = sizeof(GLushort);
23896+ break;
23897+ case GL_SHORT:
23898+ sizein = sizeof(GLshort);
23899+ break;
23900+ case GL_UNSIGNED_INT:
23901+ sizein = sizeof(GLuint);
23902+ break;
23903+ case GL_INT:
23904+ sizein = sizeof(GLint);
23905+ break;
23906+ case GL_FLOAT:
23907+ sizein = sizeof(GLfloat);
23908+ break;
23909+ case GL_BITMAP:
23910+ /* not implemented yet */
23911+ default:
23912+ return GL_INVALID_ENUM;
23913+ }
23914+
23915+ /* Determine bytes per output datum */
23916+ switch (typeout) {
23917+ case GL_UNSIGNED_BYTE:
23918+ sizeout = sizeof(GLubyte);
23919+ break;
23920+ case GL_BYTE:
23921+ sizeout = sizeof(GLbyte);
23922+ break;
23923+ case GL_UNSIGNED_SHORT:
23924+ sizeout = sizeof(GLushort);
23925+ break;
23926+ case GL_SHORT:
23927+ sizeout = sizeof(GLshort);
23928+ break;
23929+ case GL_UNSIGNED_INT:
23930+ sizeout = sizeof(GLuint);
23931+ break;
23932+ case GL_INT:
23933+ sizeout = sizeof(GLint);
23934+ break;
23935+ case GL_FLOAT:
23936+ sizeout = sizeof(GLfloat);
23937+ break;
23938+ case GL_BITMAP:
23939+ /* not implemented yet */
23940+ default:
23941+ return GL_INVALID_ENUM;
23942+ }
23943+
23944+ /* Get glPixelStore state */
23945+ glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpackrowlength);
23946+ glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpackalignment);
23947+ glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unpackskiprows);
23948+ glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unpackskippixels);
23949+ glGetIntegerv(GL_PACK_ROW_LENGTH, &packrowlength);
23950+ glGetIntegerv(GL_PACK_ALIGNMENT, &packalignment);
23951+ glGetIntegerv(GL_PACK_SKIP_ROWS, &packskiprows);
23952+ glGetIntegerv(GL_PACK_SKIP_PIXELS, &packskippixels);
23953+
23954+ /* Allocate storage for intermediate images */
23955+ tempin = (GLfloat *) malloc(widthin * heightin
23956+ * components * sizeof(GLfloat));
23957+ if (!tempin) {
23958+ return GLU_OUT_OF_MEMORY;
23959+ }
23960+ tempout = (GLfloat *) malloc(widthout * heightout
23961+ * components * sizeof(GLfloat));
23962+ if (!tempout) {
23963+ free(tempin);
23964+ return GLU_OUT_OF_MEMORY;
23965+ }
23966+
23967+
23968+ /*
23969+ * Unpack the pixel data and convert to floating point
23970+ */
23971+
23972+ if (unpackrowlength > 0) {
23973+ rowlen = unpackrowlength;
23974+ }
23975+ else {
23976+ rowlen = widthin;
23977+ }
23978+ if (sizein >= unpackalignment) {
23979+ rowstride = components * rowlen;
23980+ }
23981+ else {
23982+ rowstride = unpackalignment / sizein
23983+ * CEILING(components * rowlen * sizein, unpackalignment);
23984+ }
23985+
23986+ switch (typein) {
23987+ case GL_UNSIGNED_BYTE:
23988+ k = 0;
23989+ for (i = 0; i < heightin; i++) {
23990+ GLubyte *ubptr = (GLubyte *) datain
23991+ + i * rowstride
23992+ + unpackskiprows * rowstride + unpackskippixels * components;
23993+ for (j = 0; j < widthin * components; j++) {
23994+ dummy(j, k);
23995+ tempin[k++] = (GLfloat) * ubptr++;
23996+ }
23997+ }
23998+ break;
23999+ case GL_BYTE:
24000+ k = 0;
24001+ for (i = 0; i < heightin; i++) {
24002+ GLbyte *bptr = (GLbyte *) datain
24003+ + i * rowstride
24004+ + unpackskiprows * rowstride + unpackskippixels * components;
24005+ for (j = 0; j < widthin * components; j++) {
24006+ dummy(j, k);
24007+ tempin[k++] = (GLfloat) * bptr++;
24008+ }
24009+ }
24010+ break;
24011+ case GL_UNSIGNED_SHORT:
24012+ k = 0;
24013+ for (i = 0; i < heightin; i++) {
24014+ GLushort *usptr = (GLushort *) datain
24015+ + i * rowstride
24016+ + unpackskiprows * rowstride + unpackskippixels * components;
24017+ for (j = 0; j < widthin * components; j++) {
24018+ dummy(j, k);
24019+ tempin[k++] = (GLfloat) * usptr++;
24020+ }
24021+ }
24022+ break;
24023+ case GL_SHORT:
24024+ k = 0;
24025+ for (i = 0; i < heightin; i++) {
24026+ GLshort *sptr = (GLshort *) datain
24027+ + i * rowstride
24028+ + unpackskiprows * rowstride + unpackskippixels * components;
24029+ for (j = 0; j < widthin * components; j++) {
24030+ dummy(j, k);
24031+ tempin[k++] = (GLfloat) * sptr++;
24032+ }
24033+ }
24034+ break;
24035+ case GL_UNSIGNED_INT:
24036+ k = 0;
24037+ for (i = 0; i < heightin; i++) {
24038+ GLuint *uiptr = (GLuint *) datain
24039+ + i * rowstride
24040+ + unpackskiprows * rowstride + unpackskippixels * components;
24041+ for (j = 0; j < widthin * components; j++) {
24042+ dummy(j, k);
24043+ tempin[k++] = (GLfloat) * uiptr++;
24044+ }
24045+ }
24046+ break;
24047+ case GL_INT:
24048+ k = 0;
24049+ for (i = 0; i < heightin; i++) {
24050+ GLint *iptr = (GLint *) datain
24051+ + i * rowstride
24052+ + unpackskiprows * rowstride + unpackskippixels * components;
24053+ for (j = 0; j < widthin * components; j++) {
24054+ dummy(j, k);
24055+ tempin[k++] = (GLfloat) * iptr++;
24056+ }
24057+ }
24058+ break;
24059+ case GL_FLOAT:
24060+ k = 0;
24061+ for (i = 0; i < heightin; i++) {
24062+ GLfloat *fptr = (GLfloat *) datain
24063+ + i * rowstride
24064+ + unpackskiprows * rowstride + unpackskippixels * components;
24065+ for (j = 0; j < widthin * components; j++) {
24066+ dummy(j, k);
24067+ tempin[k++] = *fptr++;
24068+ }
24069+ }
24070+ break;
24071+ default:
24072+ return GLU_INVALID_ENUM;
24073+ }
24074+
24075+
24076+ /*
24077+ * Scale the image!
24078+ */
24079+
24080+ if (widthout > 1)
24081+ sx = (GLfloat) (widthin - 1) / (GLfloat) (widthout - 1);
24082+ else
24083+ sx = (GLfloat) (widthin - 1);
24084+ if (heightout > 1)
24085+ sy = (GLfloat) (heightin - 1) / (GLfloat) (heightout - 1);
24086+ else
24087+ sy = (GLfloat) (heightin - 1);
24088+
24089+/*#define POINT_SAMPLE*/
24090+#ifdef POINT_SAMPLE
24091+ for (i = 0; i < heightout; i++) {
24092+ GLint ii = i * sy;
24093+ for (j = 0; j < widthout; j++) {
24094+ GLint jj = j * sx;
24095+
24096+ GLfloat *src = tempin + (ii * widthin + jj) * components;
24097+ GLfloat *dst = tempout + (i * widthout + j) * components;
24098+
24099+ for (k = 0; k < components; k++) {
24100+ *dst++ = *src++;
24101+ }
24102+ }
24103+ }
24104+#else
24105+ if (sx < 1.0 && sy < 1.0) {
24106+ /* magnify both width and height: use weighted sample of 4 pixels */
24107+ GLint i0, i1, j0, j1;
24108+ GLfloat alpha, beta;
24109+ GLfloat *src00, *src01, *src10, *src11;
24110+ GLfloat s1, s2;
24111+ GLfloat *dst;
24112+
24113+ for (i = 0; i < heightout; i++) {
24114+ i0 = i * sy;
24115+ i1 = i0 + 1;
24116+ if (i1 >= heightin)
24117+ i1 = heightin - 1;
24118+/* i1 = (i+1) * sy - EPSILON;*/
24119+ alpha = i * sy - i0;
24120+ for (j = 0; j < widthout; j++) {
24121+ j0 = j * sx;
24122+ j1 = j0 + 1;
24123+ if (j1 >= widthin)
24124+ j1 = widthin - 1;
24125+/* j1 = (j+1) * sx - EPSILON; */
24126+ beta = j * sx - j0;
24127+
24128+ /* compute weighted average of pixels in rect (i0,j0)-(i1,j1) */
24129+ src00 = tempin + (i0 * widthin + j0) * components;
24130+ src01 = tempin + (i0 * widthin + j1) * components;
24131+ src10 = tempin + (i1 * widthin + j0) * components;
24132+ src11 = tempin + (i1 * widthin + j1) * components;
24133+
24134+ dst = tempout + (i * widthout + j) * components;
24135+
24136+ for (k = 0; k < components; k++) {
24137+ s1 = *src00++ * (1.0 - beta) + *src01++ * beta;
24138+ s2 = *src10++ * (1.0 - beta) + *src11++ * beta;
24139+ *dst++ = s1 * (1.0 - alpha) + s2 * alpha;
24140+ }
24141+ }
24142+ }
24143+ }
24144+ else {
24145+ /* shrink width and/or height: use an unweighted box filter */
24146+ GLint i0, i1;
24147+ GLint j0, j1;
24148+ GLint ii, jj;
24149+ GLfloat sum, *dst;
24150+
24151+ for (i = 0; i < heightout; i++) {
24152+ i0 = i * sy;
24153+ i1 = i0 + 1;
24154+ if (i1 >= heightin)
24155+ i1 = heightin - 1;
24156+/* i1 = (i+1) * sy - EPSILON; */
24157+ for (j = 0; j < widthout; j++) {
24158+ j0 = j * sx;
24159+ j1 = j0 + 1;
24160+ if (j1 >= widthin)
24161+ j1 = widthin - 1;
24162+/* j1 = (j+1) * sx - EPSILON; */
24163+
24164+ dst = tempout + (i * widthout + j) * components;
24165+
24166+ /* compute average of pixels in the rectangle (i0,j0)-(i1,j1) */
24167+ for (k = 0; k < components; k++) {
24168+ sum = 0.0;
24169+ for (ii = i0; ii <= i1; ii++) {
24170+ for (jj = j0; jj <= j1; jj++) {
24171+ sum += *(tempin + (ii * widthin + jj) * components + k);
24172+ }
24173+ }
24174+ sum /= (j1 - j0 + 1) * (i1 - i0 + 1);
24175+ *dst++ = sum;
24176+ }
24177+ }
24178+ }
24179+ }
24180+#endif
24181+
24182+
24183+ /*
24184+ * Return output image
24185+ */
24186+
24187+ if (packrowlength > 0) {
24188+ rowlen = packrowlength;
24189+ }
24190+ else {
24191+ rowlen = widthout;
24192+ }
24193+ if (sizeout >= packalignment) {
24194+ rowstride = components * rowlen;
24195+ }
24196+ else {
24197+ rowstride = packalignment / sizeout
24198+ * CEILING(components * rowlen * sizeout, packalignment);
24199+ }
24200+
24201+ switch (typeout) {
24202+ case GL_UNSIGNED_BYTE:
24203+ k = 0;
24204+ for (i = 0; i < heightout; i++) {
24205+ GLubyte *ubptr = (GLubyte *) dataout
24206+ + i * rowstride
24207+ + packskiprows * rowstride + packskippixels * components;
24208+ for (j = 0; j < widthout * components; j++) {
24209+ dummy(j, k + i);
24210+ *ubptr++ = (GLubyte) tempout[k++];
24211+ }
24212+ }
24213+ break;
24214+ case GL_BYTE:
24215+ k = 0;
24216+ for (i = 0; i < heightout; i++) {
24217+ GLbyte *bptr = (GLbyte *) dataout
24218+ + i * rowstride
24219+ + packskiprows * rowstride + packskippixels * components;
24220+ for (j = 0; j < widthout * components; j++) {
24221+ dummy(j, k + i);
24222+ *bptr++ = (GLbyte) tempout[k++];
24223+ }
24224+ }
24225+ break;
24226+ case GL_UNSIGNED_SHORT:
24227+ k = 0;
24228+ for (i = 0; i < heightout; i++) {
24229+ GLushort *usptr = (GLushort *) dataout
24230+ + i * rowstride
24231+ + packskiprows * rowstride + packskippixels * components;
24232+ for (j = 0; j < widthout * components; j++) {
24233+ dummy(j, k + i);
24234+ *usptr++ = (GLushort) tempout[k++];
24235+ }
24236+ }
24237+ break;
24238+ case GL_SHORT:
24239+ k = 0;
24240+ for (i = 0; i < heightout; i++) {
24241+ GLshort *sptr = (GLshort *) dataout
24242+ + i * rowstride
24243+ + packskiprows * rowstride + packskippixels * components;
24244+ for (j = 0; j < widthout * components; j++) {
24245+ dummy(j, k + i);
24246+ *sptr++ = (GLshort) tempout[k++];
24247+ }
24248+ }
24249+ break;
24250+ case GL_UNSIGNED_INT:
24251+ k = 0;
24252+ for (i = 0; i < heightout; i++) {
24253+ GLuint *uiptr = (GLuint *) dataout
24254+ + i * rowstride
24255+ + packskiprows * rowstride + packskippixels * components;
24256+ for (j = 0; j < widthout * components; j++) {
24257+ dummy(j, k + i);
24258+ *uiptr++ = (GLuint) tempout[k++];
24259+ }
24260+ }
24261+ break;
24262+ case GL_INT:
24263+ k = 0;
24264+ for (i = 0; i < heightout; i++) {
24265+ GLint *iptr = (GLint *) dataout
24266+ + i * rowstride
24267+ + packskiprows * rowstride + packskippixels * components;
24268+ for (j = 0; j < widthout * components; j++) {
24269+ dummy(j, k + i);
24270+ *iptr++ = (GLint) tempout[k++];
24271+ }
24272+ }
24273+ break;
24274+ case GL_FLOAT:
24275+ k = 0;
24276+ for (i = 0; i < heightout; i++) {
24277+ GLfloat *fptr = (GLfloat *) dataout
24278+ + i * rowstride
24279+ + packskiprows * rowstride + packskippixels * components;
24280+ for (j = 0; j < widthout * components; j++) {
24281+ dummy(j, k + i);
24282+ *fptr++ = tempout[k++];
24283+ }
24284+ }
24285+ break;
24286+ default:
24287+ return GLU_INVALID_ENUM;
24288+ }
24289+
24290+
24291+ /* free temporary image storage */
24292+ free(tempin);
24293+ free(tempout);
24294+
24295+ return 0;
24296+}
24297+
24298+
24299+
24300+/*
24301+ * Return the largest k such that 2^k <= n.
24302+ */
24303+static GLint
24304+ilog2(GLint n)
24305+{
24306+ GLint k;
24307+
24308+ if (n <= 0)
24309+ return 0;
24310+ for (k = 0; n >>= 1; k++);
24311+ return k;
24312+}
24313+
24314+
24315+
24316+/*
24317+ * Find the value nearest to n which is also a power of two.
24318+ */
24319+static GLint
24320+round2(GLint n)
24321+{
24322+ GLint m;
24323+
24324+ for (m = 1; m < n; m *= 2);
24325+
24326+ /* m>=n */
24327+ if (m - n <= n - m / 2) {
24328+ return m;
24329+ }
24330+ else {
24331+ return m / 2;
24332+ }
24333+}
24334+
24335+
24336+/*
24337+ * Given an pixel format and datatype, return the number of bytes to
24338+ * store one pixel.
24339+ */
24340+static GLint
24341+bytes_per_pixel(GLenum format, GLenum type)
24342+{
24343+ GLint n, m;
24344+
24345+ switch (format) {
24346+ case GL_COLOR_INDEX:
24347+ case GL_STENCIL_INDEX:
24348+ case GL_DEPTH_COMPONENT:
24349+ case GL_RED:
24350+ case GL_GREEN:
24351+ case GL_BLUE:
24352+ case GL_ALPHA:
24353+ case GL_LUMINANCE:
24354+ n = 1;
24355+ break;
24356+ case GL_LUMINANCE_ALPHA:
24357+ n = 2;
24358+ break;
24359+ case GL_RGB:
24360+ case GL_BGR:
24361+ n = 3;
24362+ break;
24363+ case GL_RGBA:
24364+ case GL_BGRA:
24365+#ifdef GL_EXT_abgr
24366+ case GL_ABGR_EXT:
24367+#endif
24368+ n = 4;
24369+ break;
24370+ default:
24371+ n = 0;
24372+ }
24373+
24374+ switch (type) {
24375+ case GL_UNSIGNED_BYTE:
24376+ m = sizeof(GLubyte);
24377+ break;
24378+ case GL_BYTE:
24379+ m = sizeof(GLbyte);
24380+ break;
24381+ case GL_BITMAP:
24382+ m = 1;
24383+ break;
24384+ case GL_UNSIGNED_SHORT:
24385+ m = sizeof(GLushort);
24386+ break;
24387+ case GL_SHORT:
24388+ m = sizeof(GLshort);
24389+ break;
24390+ case GL_UNSIGNED_INT:
24391+ m = sizeof(GLuint);
24392+ break;
24393+ case GL_INT:
24394+ m = sizeof(GLint);
24395+ break;
24396+ case GL_FLOAT:
24397+ m = sizeof(GLfloat);
24398+ break;
24399+ default:
24400+ m = 0;
24401+ }
24402+
24403+ return n * m;
24404+}
24405+
24406+
24407+
24408+/*
24409+ * WARNING: This function isn't finished and has never been tested!!!!
24410+ */
24411+GLint GLAPIENTRY
24412+mesa_gluBuild1DMipmaps(GLenum target, GLint components,
24413+ GLsizei width, GLenum format, GLenum type, const void *data)
24414+{
24415+ GLubyte *texture;
24416+ GLint levels, max_levels;
24417+ GLint new_width, max_width;
24418+ GLint i, j, k, l;
24419+
24420+ if (width < 1)
24421+ return GLU_INVALID_VALUE;
24422+
24423+ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_width);
24424+ max_levels = ilog2(max_width) + 1;
24425+
24426+ /* Compute how many mipmap images to make */
24427+ levels = ilog2(width) + 1;
24428+ if (levels > max_levels) {
24429+ levels = max_levels;
24430+ }
24431+
24432+ new_width = 1 << (levels - 1);
24433+
24434+ texture = (GLubyte *) malloc(new_width * components);
24435+ if (!texture) {
24436+ return GLU_OUT_OF_MEMORY;
24437+ }
24438+
24439+ if (width != new_width) {
24440+ /* initial rescaling */
24441+ switch (type) {
24442+ case GL_UNSIGNED_BYTE:
24443+ {
24444+ GLubyte *ub_data = (GLubyte *) data;
24445+ for (i = 0; i < new_width; i++) {
24446+ j = i * width / new_width;
24447+ for (k = 0; k < components; k++) {
24448+ texture[i * components + k] = ub_data[j * components + k];
24449+ }
24450+ }
24451+ }
24452+ break;
24453+ default:
24454+ /* Not implemented */
24455+ return GLU_ERROR;
24456+ }
24457+ }
24458+
24459+ /* generate and load mipmap images */
24460+ for (l = 0; l < levels; l++) {
24461+ glTexImage1D(GL_TEXTURE_1D, l, components, new_width, 0,
24462+ format, GL_UNSIGNED_BYTE, texture);
24463+
24464+ /* Scale image down to 1/2 size */
24465+ new_width = new_width / 2;
24466+ for (i = 0; i < new_width; i++) {
24467+ for (k = 0; k < components; k++) {
24468+ GLint sample1, sample2;
24469+ sample1 = (GLint) texture[i * 2 * components + k];
24470+ sample2 = (GLint) texture[(i * 2 + 1) * components + k];
24471+ texture[i * components + k] = (GLubyte) ((sample1 + sample2) / 2);
24472+ }
24473+ }
24474+ }
24475+
24476+ free(texture);
24477+
24478+ return 0;
24479+}
24480+
24481+
24482+
24483+GLint GLAPIENTRY
24484+mesa_gluBuild2DMipmaps(GLenum target, GLint components,
24485+ GLsizei width, GLsizei height, GLenum format,
24486+ GLenum type, const void *data)
24487+{
24488+ GLint w, h, maxsize;
24489+ void *image, *newimage;
24490+ GLint neww, newh, level, bpp;
24491+ int error;
24492+ GLboolean done;
24493+ GLint retval = 0;
24494+ GLint unpackrowlength, unpackalignment, unpackskiprows, unpackskippixels;
24495+ GLint packrowlength, packalignment, packskiprows, packskippixels;
24496+
24497+ if (width < 1 || height < 1)
24498+ return GLU_INVALID_VALUE;
24499+
24500+ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxsize);
24501+
24502+ w = round2(width);
24503+ if (w > maxsize) {
24504+ w = maxsize;
24505+ }
24506+ h = round2(height);
24507+ if (h > maxsize) {
24508+ h = maxsize;
24509+ }
24510+
24511+ bpp = bytes_per_pixel(format, type);
24512+ if (bpp == 0) {
24513+ /* probably a bad format or type enum */
24514+ return GLU_INVALID_ENUM;
24515+ }
24516+
24517+ /* Get current glPixelStore values */
24518+ glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpackrowlength);
24519+ glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpackalignment);
24520+ glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unpackskiprows);
24521+ glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unpackskippixels);
24522+ glGetIntegerv(GL_PACK_ROW_LENGTH, &packrowlength);
24523+ glGetIntegerv(GL_PACK_ALIGNMENT, &packalignment);
24524+ glGetIntegerv(GL_PACK_SKIP_ROWS, &packskiprows);
24525+ glGetIntegerv(GL_PACK_SKIP_PIXELS, &packskippixels);
24526+
24527+ /* set pixel packing */
24528+ glPixelStorei(GL_PACK_ROW_LENGTH, 0);
24529+ glPixelStorei(GL_PACK_ALIGNMENT, 1);
24530+ glPixelStorei(GL_PACK_SKIP_ROWS, 0);
24531+ glPixelStorei(GL_PACK_SKIP_PIXELS, 0);
24532+
24533+ done = GL_FALSE;
24534+
24535+ if (w != width || h != height) {
24536+ /* must rescale image to get "top" mipmap texture image */
24537+ image = malloc((w + 4) * h * bpp);
24538+ if (!image) {
24539+ return GLU_OUT_OF_MEMORY;
24540+ }
24541+ error = mesa_gluScaleImage(format, width, height, type, data,
24542+ w, h, type, image);
24543+ if (error) {
24544+ retval = error;
24545+ done = GL_TRUE;
24546+ }
24547+ }
24548+ else {
24549+ image = (void *) data;
24550+ }
24551+
24552+ level = 0;
24553+ while (!done) {
24554+ if (image != data) {
24555+ /* set pixel unpacking */
24556+ glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
24557+ glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
24558+ glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
24559+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
24560+ }
24561+
24562+ glTexImage2D(target, level, components, w, h, 0, format, type, image);
24563+
24564+ if (w == 1 && h == 1)
24565+ break;
24566+
24567+ neww = (w < 2) ? 1 : w / 2;
24568+ newh = (h < 2) ? 1 : h / 2;
24569+ newimage = malloc((neww + 4) * newh * bpp);
24570+ if (!newimage) {
24571+ return GLU_OUT_OF_MEMORY;
24572+ }
24573+
24574+ error = mesa_gluScaleImage(format, w, h, type, image,
24575+ neww, newh, type, newimage);
24576+ if (error) {
24577+ retval = error;
24578+ done = GL_TRUE;
24579+ }
24580+
24581+ if (image != data) {
24582+ free(image);
24583+ }
24584+ image = newimage;
24585+
24586+ w = neww;
24587+ h = newh;
24588+ level++;
24589+ }
24590+
24591+ if (image != data) {
24592+ free(image);
24593+ }
24594+
24595+ /* Restore original glPixelStore state */
24596+ glPixelStorei(GL_UNPACK_ROW_LENGTH, unpackrowlength);
24597+ glPixelStorei(GL_UNPACK_ALIGNMENT, unpackalignment);
24598+ glPixelStorei(GL_UNPACK_SKIP_ROWS, unpackskiprows);
24599+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, unpackskippixels);
24600+ glPixelStorei(GL_PACK_ROW_LENGTH, packrowlength);
24601+ glPixelStorei(GL_PACK_ALIGNMENT, packalignment);
24602+ glPixelStorei(GL_PACK_SKIP_ROWS, packskiprows);
24603+ glPixelStorei(GL_PACK_SKIP_PIXELS, packskippixels);
24604+
24605+ return retval;
24606+}
24607Index: qemu-0.14.0/target-i386/opengl_exec.c
24608===================================================================
24609--- /dev/null
24610+++ qemu-0.14.0/target-i386/opengl_exec.c
24611@@ -0,0 +1,3931 @@
24612+/*
24613+ * Host-side implementation of GL/GLX API
24614+ *
24615+ * Copyright (c) 2006,2007 Even Rouault
24616+ *
24617+ * Permission is hereby granted, free of charge, to any person obtaining a copy
24618+ * of this software and associated documentation files (the "Software"), to deal
24619+ * in the Software without restriction, including without limitation the rights
24620+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
24621+ * copies of the Software, and to permit persons to whom the Software is
24622+ * furnished to do so, subject to the following conditions:
24623+ *
24624+ * The above copyright notice and this permission notice shall be included in
24625+ * all copies or substantial portions of the Software.
24626+ *
24627+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24628+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24629+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24630+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24631+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24632+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24633+ * THE SOFTWARE.
24634+ */
24635+
24636+
24637+#include <stdio.h>
24638+#include <stdlib.h>
24639+#include <assert.h>
24640+#include <string.h>
24641+
24642+#include <X11/Xlib.h>
24643+#include <X11/Xutil.h>
24644+
24645+#define GL_GLEXT_PROTOTYPES
24646+#define GLX_GLXEXT_PROTOTYPES
24647+
24648+#include <mesa_gl.h>
24649+#include <mesa_glx.h>
24650+
24651+// TODO
24652+typedef long unsigned int target_phys_addr_t;
24653+
24654+#include "opengl_func.h"
24655+
24656+#include "mesa_glu.h"
24657+#include "mesa_mipmap.c"
24658+
24659+#include "../qemu-common.h"
24660+
24661+//#define SYSTEMATIC_ERROR_CHECK
24662+#define BUFFER_BEGINEND
24663+#define glGetError() 0
24664+
24665+#define GET_EXT_PTR(type, funcname, args_decl) \
24666+ static int detect_##funcname = 0; \
24667+ static type(*ptr_func_##funcname)args_decl = NULL; \
24668+ if (detect_##funcname == 0) \
24669+ { \
24670+ detect_##funcname = 1; \
24671+ ptr_func_##funcname = (type(*)args_decl)glXGetProcAddressARB((const GLubyte*)#funcname); \
24672+ assert (ptr_func_##funcname); \
24673+ }
24674+
24675+#define GET_EXT_PTR_NO_FAIL(type, funcname, args_decl) \
24676+ static int detect_##funcname = 0; \
24677+ static type(*ptr_func_##funcname)args_decl = NULL; \
24678+ if (detect_##funcname == 0) \
24679+ { \
24680+ detect_##funcname = 1; \
24681+ ptr_func_##funcname = (type(*)args_decl)glXGetProcAddressARB((const GLubyte*)#funcname); \
24682+ }
24683+
24684+#ifndef WIN32
24685+#include <dlfcn.h>
24686+#endif
24687+
24688+static void *get_glu_ptr(const char *name)
24689+{
24690+ static void *handle = (void *) -1;
24691+
24692+ if (handle == (void *) -1) {
24693+#ifndef WIN32
24694+ handle = dlopen("libGLU.so", RTLD_LAZY);
24695+ if (!handle)
24696+ fprintf(stderr, "can't load libGLU.so : %s\n", dlerror());
24697+#else
24698+ handle = (void *) LoadLibrary("glu32.dll");
24699+ if (!handle)
24700+ fprintf(stderr, "can't load glu32.dll\n");
24701+#endif
24702+ }
24703+ if (handle) {
24704+#ifndef WIN32
24705+ return dlsym(handle, name);
24706+#else
24707+ return GetProcAddress(handle, name);
24708+#endif
24709+ }
24710+ return NULL;
24711+}
24712+
24713+#define GET_GLU_PTR(type, funcname, args_decl) \
24714+ static int detect_##funcname = 0; \
24715+ static type(*ptr_func_##funcname)args_decl = NULL; \
24716+ if (detect_##funcname == 0) \
24717+ { \
24718+ detect_##funcname = 1; \
24719+ ptr_func_##funcname = (type(*)args_decl)get_glu_ptr(#funcname); \
24720+ }
24721+
24722+int display_function_call = 0;
24723+
24724+static const int defaultAttribList[] = {
24725+ GLX_RGBA,
24726+ GLX_RED_SIZE, 1,
24727+ GLX_GREEN_SIZE, 1,
24728+ GLX_BLUE_SIZE, 1,
24729+ GLX_DOUBLEBUFFER,
24730+ None
24731+};
24732+
24733+static XVisualInfo *get_default_visual(Display *dpy)
24734+{
24735+ static XVisualInfo *vis = NULL;
24736+ XVisualInfo theTemplate;
24737+ int numVisuals;
24738+
24739+ if (vis)
24740+ return vis;
24741+ fprintf(stderr, "get_default_visual\n");
24742+ /* if (vis == NULL) vis = glXChooseVisual(dpy, 0,
24743+ * (int*)defaultAttribList); */
24744+ theTemplate.screen = 0;
24745+ vis = XGetVisualInfo(dpy, VisualScreenMask, &theTemplate, &numVisuals);
24746+
24747+ return vis;
24748+}
24749+
24750+
24751+static Display *parent_dpy = NULL;
24752+static Window qemu_parent_window = 0;
24753+
24754+static Window active_win = 0; /* FIXME */
24755+static int active_win_x = 0;
24756+static int active_win_y = 0;
24757+
24758+void opengl_exec_set_parent_window(Display *_dpy, Window _parent_window)
24759+{
24760+ parent_dpy = _dpy;
24761+ qemu_parent_window = _parent_window;
24762+ if (active_win)
24763+ XReparentWindow(_dpy, active_win, _parent_window, active_win_x,
24764+ active_win_y);
24765+}
24766+
24767+static int local_connection = 0;
24768+void opengl_exec_set_local_connection()
24769+{
24770+ local_connection = 1;
24771+}
24772+
24773+static GLXDrawable create_window(Display *dpy, Window local_parent_window,
24774+ XVisualInfo *vis, const char *name,
24775+ int x, int y, int width, int height)
24776+{
24777+ int scrnum;
24778+ XSetWindowAttributes attr = { 0 };
24779+ unsigned long mask;
24780+ Window root;
24781+ Window win;
24782+
24783+ scrnum = DefaultScreen(dpy);
24784+ root = RootWindow(dpy, scrnum);
24785+
24786+ /* window attributes */
24787+ attr.background_pixel = 0xff000000;
24788+ attr.border_pixel = 0;
24789+ attr.colormap = XCreateColormap(dpy, root, vis->visual, AllocNone);
24790+ attr.event_mask = 0; /* StructureNotifyMask | ExposureMask | KeyPressMask */
24791+ attr.save_under = True;
24792+ // if (local_parent_window == NULL && qemu_parent_window == NULL)
24793+ attr.override_redirect = True;
24794+ // else
24795+ // attr.override_redirect = True;
24796+ attr.cursor = None;
24797+ mask =
24798+ CWBackPixel | CWBorderPixel | CWColormap | CWEventMask |
24799+ CWOverrideRedirect | CWSaveUnder;
24800+
24801+ if (local_parent_window)
24802+ win = XCreateWindow(dpy, local_parent_window, 0, 0, width, height, 0,
24803+ vis->depth, InputOutput, vis->visual, mask, &attr);
24804+ else if (qemu_parent_window)
24805+ win = XCreateWindow(dpy, qemu_parent_window, 0, 0, width, height, 0,
24806+ vis->depth, InputOutput, vis->visual, mask, &attr);
24807+ else
24808+ win = XCreateWindow(dpy, root, 0, 0, width, height, 0, vis->depth,
24809+ InputOutput, vis->visual, mask, &attr);
24810+
24811+ /* set hints and properties */
24812+ {
24813+ XSizeHints sizehints;
24814+
24815+ sizehints.x = x;
24816+ sizehints.y = y;
24817+ sizehints.width = width;
24818+ sizehints.height = height;
24819+ sizehints.flags = USSize | USPosition;
24820+ XSetWMNormalHints(dpy, win, &sizehints);
24821+ XSetStandardProperties(dpy, win, name, name, None,
24822+ (char **) NULL, 0, &sizehints);
24823+ }
24824+
24825+ XSync(dpy, 0);
24826+
24827+ /*
24828+ * int loop = 1; while (loop) { while (XPending(dpy) > 0) { XEvent event;
24829+ * XNextEvent(dpy, &event); switch (event.type) { case CreateNotify: { if
24830+ * (((XCreateWindowEvent*)&event)->window == win) { loop = 0; } break; } }
24831+ * } } */
24832+
24833+ /* TODO */
24834+ if (!active_win)
24835+ active_win = win;
24836+
24837+ return win;
24838+}
24839+
24840+typedef struct {
24841+ void *key;
24842+ void *value;
24843+} Assoc;
24844+
24845+#define MAX_HANDLED_PROCESS 100
24846+#define MAX_ASSOC_SIZE 100
24847+
24848+#define MAX_FBCONFIG 10
24849+
24850+#include "opengl_utils.h"
24851+
24852+#define MAX(a, b) (((a) > (b)) ? (a) : (b))
24853+
24854+
24855+typedef struct {
24856+ int x;
24857+ int y;
24858+ int width;
24859+ int height;
24860+ int map_state;
24861+} WindowPosStruct;
24862+
24863+typedef struct {
24864+ GLbitfield mask;
24865+ int activeTextureIndex;
24866+} ClientState;
24867+
24868+#define MAX_CLIENT_STATE_STACK_SIZE 16
24869+
24870+typedef struct {
24871+ int ref;
24872+ int fake_ctxt;
24873+ int fake_shareList;
24874+ GLXContext context;
24875+ GLXDrawable drawable;
24876+
24877+ void *vertexPointer;
24878+ void *normalPointer;
24879+ void *colorPointer;
24880+ void *secondaryColorPointer;
24881+ void *indexPointer;
24882+ void *texCoordPointer[NB_MAX_TEXTURES];
24883+ void *edgeFlagPointer;
24884+ void *vertexAttribPointer[MY_GL_MAX_VERTEX_ATTRIBS_ARB];
24885+ void *vertexAttribPointerNV[MY_GL_MAX_VERTEX_ATTRIBS_NV];
24886+ void *weightPointer;
24887+ void *matrixIndexPointer;
24888+ void *fogCoordPointer;
24889+ void *variantPointerEXT[MY_GL_MAX_VARIANT_POINTER_EXT];
24890+ void *interleavedArrays;
24891+ void *elementPointerATI;
24892+
24893+ int vertexPointerSize;
24894+ int normalPointerSize;
24895+ int colorPointerSize;
24896+ int secondaryColorPointerSize;
24897+ int indexPointerSize;
24898+ int texCoordPointerSize[NB_MAX_TEXTURES];
24899+ int edgeFlagPointerSize;
24900+ int vertexAttribPointerSize[MY_GL_MAX_VERTEX_ATTRIBS_ARB];
24901+ int vertexAttribPointerNVSize[MY_GL_MAX_VERTEX_ATTRIBS_NV];
24902+ int weightPointerSize;
24903+ int matrixIndexPointerSize;
24904+ int fogCoordPointerSize;
24905+ int variantPointerEXTSize[MY_GL_MAX_VARIANT_POINTER_EXT];
24906+ int interleavedArraysSize;
24907+ int elementPointerATISize;
24908+
24909+ int selectBufferSize;
24910+ void *selectBufferPtr;
24911+ int feedbackBufferSize;
24912+ void *feedbackBufferPtr;
24913+
24914+ ClientState clientStateStack[MAX_CLIENT_STATE_STACK_SIZE];
24915+ int clientStateSp;
24916+ int activeTextureIndex;
24917+
24918+ unsigned int ownTabTextures[32768];
24919+ unsigned int *tabTextures;
24920+ RangeAllocator ownTextureAllocator;
24921+ RangeAllocator *textureAllocator;
24922+
24923+ unsigned int ownTabBuffers[32768];
24924+ unsigned int *tabBuffers;
24925+ RangeAllocator ownBufferAllocator;
24926+ RangeAllocator *bufferAllocator;
24927+
24928+ unsigned int ownTabLists[32768];
24929+ unsigned int *tabLists;
24930+ RangeAllocator ownListAllocator;
24931+ RangeAllocator *listAllocator;
24932+
24933+#ifdef SYSTEMATIC_ERROR_CHECK
24934+ int last_error;
24935+#endif
24936+} GLState;
24937+
24938+typedef struct {
24939+ int process_id;
24940+ int instr_counter;
24941+
24942+ int x, y, width, height;
24943+ WindowPosStruct currentDrawablePos;
24944+
24945+ int next_available_context_number;
24946+ int next_available_pbuffer_number;
24947+
24948+ int nb_states;
24949+ GLState default_state;
24950+ GLState **glstates;
24951+ GLState *current_state;
24952+
24953+ int nfbconfig;
24954+ GLXFBConfig *fbconfigs[MAX_FBCONFIG];
24955+ int fbconfigs_max[MAX_FBCONFIG];
24956+ int nfbconfig_total;
24957+
24958+ Assoc association_fakecontext_glxcontext[MAX_ASSOC_SIZE];
24959+ Assoc association_fakepbuffer_pbuffer[MAX_ASSOC_SIZE];
24960+ Assoc association_clientdrawable_serverdrawable[MAX_ASSOC_SIZE];
24961+ Assoc association_fakecontext_visual[MAX_ASSOC_SIZE];
24962+
24963+ Display *dpy;
24964+
24965+ int began;
24966+ int primitive;
24967+ int bufsize;
24968+ int bufstart;
24969+ arg_t *cmdbuf;
24970+} ProcessStruct;
24971+
24972+static ProcessStruct processes[MAX_HANDLED_PROCESS];
24973+
24974+void init_process_tab()
24975+{
24976+ memset(processes, 0, sizeof(processes));
24977+}
24978+
24979+#define ARG_TO_CHAR(x) (char)(x)
24980+#define ARG_TO_UNSIGNED_CHAR(x) (unsigned char)(x)
24981+#define ARG_TO_SHORT(x) (short)(x)
24982+#define ARG_TO_UNSIGNED_SHORT(x) (unsigned short)(x)
24983+#define ARG_TO_INT(x) (int)(x)
24984+#define ARG_TO_UNSIGNED_INT(x) (unsigned int)(x)
24985+#define ARG_TO_FLOAT(x) (*(float*)&(x))
24986+#define ARG_TO_DOUBLE(x) (*(double*)(x))
24987+
24988+#include "server_stub.c"
24989+
24990+/* ---- */
24991+
24992+#ifdef BUFFER_BEGINEND
24993+/* A user of the following two functions must not buffer any calls that
24994+ * may throw an error (i.e. errors conditions must be checked before
24995+ * storing in the buffer) or return values. */
24996+static inline arg_t *cmd_buffer_alloc(ProcessStruct *process, size_t elems)
24997+{
24998+ arg_t *ret;
24999+
25000+ if (unlikely(process->bufstart + elems > process->bufsize)) {
25001+ process->bufsize = (process->bufsize ?: 0x100) << 1;
25002+ process->cmdbuf = qemu_realloc(process->cmdbuf,
25003+ process->bufsize * sizeof(arg_t));
25004+ }
25005+
25006+ ret = process->cmdbuf + process->bufstart;
25007+ process->bufstart += elems;
25008+ return ret;
25009+}
25010+
25011+static inline void cmd_buffer_replay(ProcessStruct *process)
25012+{
25013+ Signature *sig;
25014+ int func_number;
25015+ int ret_int;
25016+ char ret_char;
25017+ arg_t *call = process->cmdbuf;
25018+
25019+ while (process->bufstart) {
25020+ func_number = *call ++;
25021+ sig = (Signature *) tab_opengl_calls[func_number];
25022+
25023+ execute_func(func_number, call, &ret_int, &ret_char);
25024+
25025+ call += sig->nb_args;
25026+ process->bufstart -= sig->nb_args + 1;
25027+ }
25028+}
25029+#endif
25030+
25031+/* ---- */
25032+
25033+typedef void *ClientGLXDrawable;
25034+static inline ClientGLXDrawable to_drawable(arg_t arg)
25035+{
25036+#ifdef TARGET_X86_64
25037+ if (arg > (unsigned long) -1) {
25038+ fprintf(stderr, "GLXDrawable too big for this implementation\n");
25039+ exit(-1);
25040+ }
25041+#endif
25042+ return (void *) (unsigned long) arg;
25043+}
25044+
25045+GLXContext get_association_fakecontext_glxcontext(
25046+ ProcessStruct *process, int fakecontext)
25047+{
25048+ int i;
25049+
25050+ for (i = 0;
25051+ i < MAX_ASSOC_SIZE &&
25052+ process->association_fakecontext_glxcontext[i].key; i++)
25053+ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
25054+ fakecontext)
25055+ return (GLXContext)
25056+ process->association_fakecontext_glxcontext[i].value;
25057+
25058+ return NULL;
25059+}
25060+
25061+void set_association_fakecontext_glxcontext(
25062+ ProcessStruct *process, int fakecontext, GLXContext glxcontext)
25063+{
25064+ int i;
25065+
25066+ for (i = 0;
25067+ i < MAX_ASSOC_SIZE &&
25068+ process->association_fakecontext_glxcontext[i].key; i++)
25069+ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
25070+ fakecontext)
25071+ break;
25072+
25073+ if (i < MAX_ASSOC_SIZE) {
25074+ process->association_fakecontext_glxcontext[i].key =
25075+ (void *) (long) fakecontext;
25076+ process->association_fakecontext_glxcontext[i].value =
25077+ (void *) glxcontext;
25078+ } else
25079+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
25080+}
25081+
25082+void unset_association_fakecontext_glxcontext(
25083+ ProcessStruct *process, int fakecontext)
25084+{
25085+ int i;
25086+
25087+ for (i = 0;
25088+ i < MAX_ASSOC_SIZE &&
25089+ process->association_fakecontext_glxcontext[i].key; i++)
25090+ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
25091+ fakecontext) {
25092+ memmove(&process->association_fakecontext_glxcontext[i],
25093+ &process->association_fakecontext_glxcontext[i + 1],
25094+ sizeof(Assoc) * (MAX_ASSOC_SIZE - 1 - i));
25095+ return;
25096+ }
25097+}
25098+
25099+/* ---- */
25100+
25101+XVisualInfo *get_association_fakecontext_visual(
25102+ ProcessStruct *process, int fakecontext)
25103+{
25104+ int i;
25105+
25106+ for (i = 0;
25107+ i < MAX_ASSOC_SIZE && process->association_fakecontext_visual[i].key;
25108+ i++)
25109+ if ((int) (long) process->association_fakecontext_visual[i].key ==
25110+ fakecontext)
25111+ return process->association_fakecontext_visual[i].value;
25112+
25113+ return NULL;
25114+}
25115+
25116+void set_association_fakecontext_visual(ProcessStruct *process,
25117+ int fakecontext, XVisualInfo *visual)
25118+{
25119+ int i;
25120+
25121+ for (i = 0;
25122+ i < MAX_ASSOC_SIZE && process->association_fakecontext_visual[i].key;
25123+ i++)
25124+ if ((int) (long) process->association_fakecontext_visual[i].key ==
25125+ fakecontext)
25126+ break;
25127+
25128+ if (i < MAX_ASSOC_SIZE) {
25129+ process->association_fakecontext_visual[i].key =
25130+ (void *) (long) fakecontext;
25131+ process->association_fakecontext_visual[i].value = (void *) visual;
25132+ } else
25133+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
25134+}
25135+
25136+/* ---- */
25137+
25138+GLXPbuffer get_association_fakepbuffer_pbuffer(
25139+ ProcessStruct *process, ClientGLXDrawable fakepbuffer)
25140+{
25141+ int i;
25142+
25143+ for (i = 0; i < MAX_ASSOC_SIZE &&
25144+ process->association_fakepbuffer_pbuffer[i].key; i ++)
25145+ if ((ClientGLXDrawable)
25146+ process->association_fakepbuffer_pbuffer[i].key ==
25147+ fakepbuffer)
25148+ return (GLXPbuffer)
25149+ process->association_fakepbuffer_pbuffer[i].value;
25150+
25151+ return 0;
25152+}
25153+
25154+void set_association_fakepbuffer_pbuffer(ProcessStruct *process,
25155+ ClientGLXDrawable fakepbuffer, GLXPbuffer pbuffer)
25156+{
25157+ int i;
25158+
25159+ for (i = 0;
25160+ i < MAX_ASSOC_SIZE &&
25161+ process->association_fakepbuffer_pbuffer[i].key; i++)
25162+ if ((ClientGLXDrawable)
25163+ process->association_fakepbuffer_pbuffer[i].key ==
25164+ fakepbuffer)
25165+ break;
25166+
25167+ if (i < MAX_ASSOC_SIZE) {
25168+ process->association_fakepbuffer_pbuffer[i].key = (void *) fakepbuffer;
25169+ process->association_fakepbuffer_pbuffer[i].value = (void *) pbuffer;
25170+ } else
25171+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
25172+}
25173+
25174+void unset_association_fakepbuffer_pbuffer(ProcessStruct *process,
25175+ ClientGLXDrawable fakepbuffer)
25176+{
25177+ int i;
25178+
25179+ for (i = 0; i < MAX_ASSOC_SIZE &&
25180+ process->association_fakepbuffer_pbuffer[i].key; i++)
25181+ if ((ClientGLXDrawable)
25182+ process->association_fakepbuffer_pbuffer[i].key ==
25183+ fakepbuffer) {
25184+ memmove(&process->association_fakepbuffer_pbuffer[i],
25185+ &process->association_fakepbuffer_pbuffer[i + 1],
25186+ sizeof(Assoc) * (MAX_ASSOC_SIZE - 1 - i));
25187+ return;
25188+ }
25189+}
25190+
25191+/* ---- */
25192+
25193+GLXDrawable get_association_clientdrawable_serverdrawable(
25194+ ProcessStruct *process, ClientGLXDrawable clientdrawable)
25195+{
25196+ int i;
25197+
25198+ for (i = 0; i < MAX_ASSOC_SIZE &&
25199+ process->association_clientdrawable_serverdrawable[i].key;
25200+ i++)
25201+ if ((ClientGLXDrawable) process->
25202+ association_clientdrawable_serverdrawable[i].key ==
25203+ clientdrawable)
25204+ return (GLXDrawable) process->
25205+ association_clientdrawable_serverdrawable[i].value;
25206+
25207+ return (GLXDrawable) 0;
25208+}
25209+
25210+ClientGLXDrawable get_association_serverdrawable_clientdrawable(
25211+ ProcessStruct *process, GLXDrawable serverdrawable)
25212+{
25213+ int i;
25214+
25215+ for (i = 0; i < MAX_ASSOC_SIZE &&
25216+ process->association_clientdrawable_serverdrawable[i].key;
25217+ i ++)
25218+ if ((GLXDrawable) process->
25219+ association_clientdrawable_serverdrawable[i].value ==
25220+ serverdrawable)
25221+ return (ClientGLXDrawable)
25222+ process->association_clientdrawable_serverdrawable[i].key;
25223+
25224+ return NULL;
25225+}
25226+
25227+void set_association_clientdrawable_serverdrawable(
25228+ ProcessStruct *process, ClientGLXDrawable clientdrawable,
25229+ GLXDrawable serverdrawable)
25230+{
25231+ int i;
25232+
25233+ for (i = 0; process->association_clientdrawable_serverdrawable[i].key;
25234+ i ++)
25235+ if ((ClientGLXDrawable) process->
25236+ association_clientdrawable_serverdrawable[i].key ==
25237+ clientdrawable)
25238+ break;
25239+
25240+ if (i < MAX_ASSOC_SIZE) {
25241+ process->association_clientdrawable_serverdrawable[i].key =
25242+ (void *) clientdrawable;
25243+ process->association_clientdrawable_serverdrawable[i].value =
25244+ (void *) serverdrawable;
25245+ } else
25246+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
25247+}
25248+
25249+static void _get_window_pos(Display *dpy, Window win, WindowPosStruct *pos)
25250+{
25251+ XWindowAttributes window_attributes_return;
25252+ Window child;
25253+ int x, y;
25254+ Window root = DefaultRootWindow(dpy);
25255+
25256+ XGetWindowAttributes(dpy, win, &window_attributes_return);
25257+ XTranslateCoordinates(dpy, win, root, 0, 0, &x, &y, &child);
25258+ /* printf("%d %d %d %d\n", x, y, window_attributes_return.width,
25259+ * window_attributes_return.height); */
25260+ pos->x = x;
25261+ pos->y = y;
25262+ pos->width = window_attributes_return.width;
25263+ pos->height = window_attributes_return.height;
25264+ pos->map_state = window_attributes_return.map_state;
25265+}
25266+
25267+static int is_gl_vendor_ati(Display *dpy)
25268+{
25269+ static int is_gl_vendor_ati_flag = 0;
25270+ static int has_init = 0;
25271+
25272+ if (has_init == 0) {
25273+ has_init = 1;
25274+ is_gl_vendor_ati_flag =
25275+ (strncmp(glXGetClientString(dpy, GLX_VENDOR), "ATI", 3) == 0);
25276+ }
25277+ return is_gl_vendor_ati_flag;
25278+}
25279+
25280+static int get_server_texture(ProcessStruct *process,
25281+ unsigned int client_texture)
25282+{
25283+ unsigned int server_texture = 0;
25284+
25285+ if (client_texture < 32768) {
25286+ server_texture = process->current_state->tabTextures[client_texture];
25287+ } else {
25288+ fprintf(stderr, "invalid texture name %d\n", client_texture);
25289+ }
25290+ return server_texture;
25291+}
25292+
25293+static int get_server_buffer(ProcessStruct *process,
25294+ unsigned int client_buffer)
25295+{
25296+ unsigned int server_buffer = 0;
25297+
25298+ if (client_buffer < 32768) {
25299+ server_buffer = process->current_state->tabBuffers[client_buffer];
25300+ } else {
25301+ fprintf(stderr, "invalid buffer name %d\n", client_buffer);
25302+ }
25303+ return server_buffer;
25304+}
25305+
25306+
25307+static int get_server_list(ProcessStruct *process, unsigned int client_list)
25308+{
25309+ unsigned int server_list = 0;
25310+
25311+ if (client_list < 32768) {
25312+ server_list = process->current_state->tabLists[client_list];
25313+ } else {
25314+ fprintf(stderr, "invalid list name %d\n", client_list);
25315+ }
25316+ return server_list;
25317+}
25318+
25319+GLXFBConfig get_fbconfig(ProcessStruct *process, int client_fbconfig)
25320+{
25321+ int i;
25322+ int nbtotal = 0;
25323+
25324+ for (i = 0; i < process->nfbconfig; i++) {
25325+ assert(client_fbconfig >= 1 + nbtotal);
25326+ if (client_fbconfig <= nbtotal + process->fbconfigs_max[i]) {
25327+ return process->fbconfigs[i][client_fbconfig - 1 - nbtotal];
25328+ }
25329+ nbtotal += process->fbconfigs_max[i];
25330+ }
25331+ return 0;
25332+}
25333+
25334+typedef struct {
25335+ int attribListLength;
25336+ int *attribList;
25337+ XVisualInfo *visInfo;
25338+} AssocAttribListVisual;
25339+
25340+static int nTabAssocAttribListVisual = 0;
25341+static AssocAttribListVisual *tabAssocAttribListVisual = NULL;
25342+
25343+static int _compute_length_of_attrib_list_including_zero(const int *attribList,
25344+ int
25345+ booleanMustHaveValue)
25346+{
25347+ int i = 0;
25348+
25349+ while (attribList[i]) {
25350+ if (booleanMustHaveValue ||
25351+ !(attribList[i] == GLX_USE_GL || attribList[i] == GLX_RGBA ||
25352+ attribList[i] == GLX_DOUBLEBUFFER ||
25353+ attribList[i] == GLX_STEREO)) {
25354+ i += 2;
25355+ } else {
25356+ i++;
25357+ }
25358+ }
25359+ return i + 1;
25360+}
25361+
25362+static int glXChooseVisualFunc(Display *dpy, const int *_attribList)
25363+{
25364+ if (_attribList == NULL)
25365+ return 0;
25366+ int attribListLength =
25367+ _compute_length_of_attrib_list_including_zero(_attribList, 0);
25368+ int i;
25369+
25370+ int *attribList = malloc(sizeof(int) * attribListLength);
25371+ memcpy(attribList, _attribList, sizeof(int) * attribListLength);
25372+
25373+ i = 0;
25374+ while (attribList[i]) {
25375+ if (!
25376+ (attribList[i] == GLX_USE_GL || attribList[i] == GLX_RGBA ||
25377+ attribList[i] == GLX_DOUBLEBUFFER ||
25378+ attribList[i] == GLX_STEREO)) {
25379+ if (attribList[i] == GLX_SAMPLE_BUFFERS && attribList[i + 1] != 0
25380+ && getenv("DISABLE_SAMPLE_BUFFERS")) {
25381+ fprintf(stderr, "Disabling GLX_SAMPLE_BUFFERS\n");
25382+ attribList[i + 1] = 0;
25383+ }
25384+ i += 2;
25385+ } else {
25386+ i++;
25387+ }
25388+ }
25389+
25390+ for (i = 0; i < nTabAssocAttribListVisual; i++) {
25391+ if (tabAssocAttribListVisual[i].attribListLength == attribListLength
25392+ && memcmp(tabAssocAttribListVisual[i].attribList, attribList,
25393+ attribListLength * sizeof(int)) == 0) {
25394+ free(attribList);
25395+ return (tabAssocAttribListVisual[i].
25396+ visInfo) ? tabAssocAttribListVisual[i].visInfo->
25397+ visualid : 0;
25398+ }
25399+ }
25400+ XVisualInfo *visInfo = glXChooseVisual(dpy, 0, attribList);
25401+
25402+ tabAssocAttribListVisual = realloc(
25403+ tabAssocAttribListVisual, sizeof(AssocAttribListVisual) *
25404+ (nTabAssocAttribListVisual + 1));
25405+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribListLength =
25406+ attribListLength;
25407+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList =
25408+ (int *) malloc(sizeof(int) * attribListLength);
25409+ memcpy(tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList,
25410+ attribList, sizeof(int) * attribListLength);
25411+ tabAssocAttribListVisual[nTabAssocAttribListVisual].visInfo = visInfo;
25412+ nTabAssocAttribListVisual++;
25413+ free(attribList);
25414+ return (visInfo) ? visInfo->visualid : 0;
25415+}
25416+
25417+static XVisualInfo *get_visual_info_from_visual_id(Display *dpy,
25418+ int visualid)
25419+{
25420+ int i, n;
25421+ XVisualInfo template;
25422+ XVisualInfo *visInfo;
25423+
25424+ for (i = 0; i < nTabAssocAttribListVisual; i++) {
25425+ if (tabAssocAttribListVisual[i].visInfo &&
25426+ tabAssocAttribListVisual[i].visInfo->visualid == visualid) {
25427+ return tabAssocAttribListVisual[i].visInfo;
25428+ }
25429+ }
25430+ template.visualid = visualid;
25431+ visInfo = XGetVisualInfo(dpy, VisualIDMask, &template, &n);
25432+ tabAssocAttribListVisual =
25433+ realloc(tabAssocAttribListVisual,
25434+ sizeof(AssocAttribListVisual) * (nTabAssocAttribListVisual +
25435+ 1));
25436+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribListLength = 0;
25437+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList = NULL;
25438+ tabAssocAttribListVisual[nTabAssocAttribListVisual].visInfo = visInfo;
25439+ nTabAssocAttribListVisual++;
25440+ return visInfo;
25441+}
25442+
25443+typedef struct {
25444+ int x;
25445+ int y;
25446+ int width;
25447+ int height;
25448+ int xhot;
25449+ int yhot;
25450+ int *pixels;
25451+} ClientCursor;
25452+
25453+#if 0
25454+static ClientCursor client_cursor = { 0 };
25455+#endif
25456+
25457+static void do_glClientActiveTextureARB(int texture)
25458+{
25459+ GET_EXT_PTR_NO_FAIL(void, glClientActiveTextureARB, (int));
25460+
25461+ if (ptr_func_glClientActiveTextureARB) {
25462+ ptr_func_glClientActiveTextureARB(texture);
25463+ }
25464+}
25465+
25466+#ifdef CURSOR_TRICK
25467+static void do_glActiveTextureARB(int texture)
25468+{
25469+ GET_EXT_PTR_NO_FAIL(void, glActiveTextureARB, (int));
25470+
25471+ if (ptr_func_glActiveTextureARB) {
25472+ ptr_func_glActiveTextureARB(texture);
25473+ }
25474+}
25475+
25476+static void do_glUseProgramObjectARB(GLhandleARB programObj)
25477+{
25478+ GET_EXT_PTR_NO_FAIL(void, glUseProgramObjectARB, (GLhandleARB));
25479+
25480+ if (ptr_func_glUseProgramObjectARB) {
25481+ ptr_func_glUseProgramObjectARB(programObj);
25482+ }
25483+}
25484+#endif
25485+
25486+static void destroy_gl_state(GLState *state)
25487+{
25488+ int i;
25489+
25490+ if (state->vertexPointer)
25491+ free(state->vertexPointer);
25492+ if (state->normalPointer)
25493+ free(state->normalPointer);
25494+ if (state->indexPointer)
25495+ free(state->indexPointer);
25496+ if (state->colorPointer)
25497+ free(state->colorPointer);
25498+ if (state->secondaryColorPointer)
25499+ free(state->secondaryColorPointer);
25500+ for (i = 0; i < NB_MAX_TEXTURES; i++) {
25501+ if (state->texCoordPointer[i])
25502+ free(state->texCoordPointer[i]);
25503+ }
25504+ for (i = 0; i < MY_GL_MAX_VERTEX_ATTRIBS_ARB; i++) {
25505+ if (state->vertexAttribPointer[i])
25506+ free(state->vertexAttribPointer[i]);
25507+ }
25508+ for (i = 0; i < MY_GL_MAX_VERTEX_ATTRIBS_NV; i++) {
25509+ if (state->vertexAttribPointerNV[i])
25510+ free(state->vertexAttribPointerNV[i]);
25511+ }
25512+ if (state->weightPointer)
25513+ free(state->weightPointer);
25514+ if (state->matrixIndexPointer)
25515+ free(state->matrixIndexPointer);
25516+ if (state->fogCoordPointer)
25517+ free(state->fogCoordPointer);
25518+ for (i = 0; i < MY_GL_MAX_VARIANT_POINTER_EXT; i++) {
25519+ if (state->variantPointerEXT[i])
25520+ free(state->variantPointerEXT[i]);
25521+ }
25522+ if (state->interleavedArrays)
25523+ free(state->interleavedArrays);
25524+ if (state->elementPointerATI)
25525+ free(state->elementPointerATI);
25526+}
25527+
25528+static void init_gl_state(GLState *state)
25529+{
25530+ state->textureAllocator = &state->ownTextureAllocator;
25531+ state->tabTextures = state->ownTabTextures;
25532+ state->bufferAllocator = &state->ownBufferAllocator;
25533+ state->tabBuffers = state->ownTabBuffers;
25534+ state->listAllocator = &state->ownListAllocator;
25535+ state->tabLists = state->ownTabLists;
25536+}
25537+
25538+/*
25539+ * Translate the nth element of list from type to GLuint.
25540+ */
25541+static GLuint translate_id(GLsizei n, GLenum type, const GLvoid *list)
25542+{
25543+ GLbyte *bptr;
25544+ GLubyte *ubptr;
25545+ GLshort *sptr;
25546+ GLushort *usptr;
25547+ GLint *iptr;
25548+ GLuint *uiptr;
25549+ GLfloat *fptr;
25550+
25551+ switch (type) {
25552+ case GL_BYTE:
25553+ bptr = (GLbyte *) list;
25554+ return (GLuint) *(bptr + n);
25555+ case GL_UNSIGNED_BYTE:
25556+ ubptr = (GLubyte *) list;
25557+ return (GLuint) *(ubptr + n);
25558+ case GL_SHORT:
25559+ sptr = (GLshort *) list;
25560+ return (GLuint) *(sptr + n);
25561+ case GL_UNSIGNED_SHORT:
25562+ usptr = (GLushort *) list;
25563+ return (GLuint) *(usptr + n);
25564+ case GL_INT:
25565+ iptr = (GLint *) list;
25566+ return (GLuint) *(iptr + n);
25567+ case GL_UNSIGNED_INT:
25568+ uiptr = (GLuint *) list;
25569+ return (GLuint) *(uiptr + n);
25570+ case GL_FLOAT:
25571+ fptr = (GLfloat *) list;
25572+ return (GLuint) *(fptr + n);
25573+ case GL_2_BYTES:
25574+ ubptr = ((GLubyte *) list) + 2 * n;
25575+ return (GLuint) *ubptr * 256 + (GLuint) *(ubptr + 1);
25576+ case GL_3_BYTES:
25577+ ubptr = ((GLubyte *) list) + 3 * n;
25578+ return (GLuint) *ubptr * 65536 + (GLuint) *(ubptr + 1) * 256 +
25579+ (GLuint) *(ubptr + 2);
25580+ case GL_4_BYTES:
25581+ ubptr = ((GLubyte *) list) + 4 * n;
25582+ return (GLuint) *ubptr * 16777216 + (GLuint) *(ubptr + 1) * 65536 +
25583+ (GLuint) *(ubptr + 2) * 256 + (GLuint) *(ubptr + 3);
25584+ default:
25585+ return 0;
25586+ }
25587+}
25588+
25589+void _create_context(ProcessStruct *process, GLXContext ctxt, int fake_ctxt,
25590+ GLXContext shareList, int fake_shareList)
25591+{
25592+ process->glstates =
25593+ realloc(process->glstates,
25594+ (process->nb_states + 1) * sizeof(GLState *));
25595+ process->glstates[process->nb_states] = malloc(sizeof(GLState));
25596+ memset(process->glstates[process->nb_states], 0, sizeof(GLState));
25597+ process->glstates[process->nb_states]->ref = 1;
25598+ process->glstates[process->nb_states]->context = ctxt;
25599+ process->glstates[process->nb_states]->fake_ctxt = fake_ctxt;
25600+ process->glstates[process->nb_states]->fake_shareList = fake_shareList;
25601+ init_gl_state(process->glstates[process->nb_states]);
25602+ if (shareList && fake_shareList) {
25603+ int i;
25604+
25605+ for (i = 0; i < process->nb_states; i++) {
25606+ if (process->glstates[i]->fake_ctxt == fake_shareList) {
25607+ process->glstates[i]->ref++;
25608+ process->glstates[process->nb_states]->textureAllocator =
25609+ process->glstates[i]->textureAllocator;
25610+ process->glstates[process->nb_states]->tabTextures =
25611+ process->glstates[i]->tabTextures;
25612+ process->glstates[process->nb_states]->bufferAllocator =
25613+ process->glstates[i]->bufferAllocator;
25614+ process->glstates[process->nb_states]->tabBuffers =
25615+ process->glstates[i]->tabBuffers;
25616+ process->glstates[process->nb_states]->listAllocator =
25617+ process->glstates[i]->listAllocator;
25618+ process->glstates[process->nb_states]->tabLists =
25619+ process->glstates[i]->tabLists;
25620+ break;
25621+ }
25622+ }
25623+ }
25624+ process->nb_states++;
25625+}
25626+
25627+static ProcessStruct *process;
25628+
25629+void do_disconnect_current(void)
25630+{
25631+ int i;
25632+ Display *dpy = process->dpy;
25633+
25634+ glXMakeCurrent(dpy, 0, NULL);
25635+
25636+ for (i = 0; i < MAX_ASSOC_SIZE &&
25637+ process->association_fakecontext_glxcontext[i].key; i ++) {
25638+ GLXContext ctxt = process->association_fakecontext_glxcontext[i].value;
25639+
25640+ fprintf(stderr, "Destroy context corresponding to fake_context"
25641+ " = %ld\n", (long) process->
25642+ association_fakecontext_glxcontext[i].key);
25643+ glXDestroyContext(dpy, ctxt);
25644+ }
25645+
25646+ GET_EXT_PTR(void, glXDestroyPbuffer, (Display *, GLXPbuffer));
25647+
25648+ for (i = 0; i < MAX_ASSOC_SIZE &&
25649+ process->association_fakepbuffer_pbuffer[i].key; i ++) {
25650+ GLXPbuffer pbuffer = (GLXPbuffer)
25651+ process->association_fakepbuffer_pbuffer[i].value;
25652+
25653+ fprintf(stderr, "Destroy pbuffer corresponding to fake_pbuffer"
25654+ " = %ld\n", (long) process->
25655+ association_fakepbuffer_pbuffer[i].key);
25656+ if (!is_gl_vendor_ati(dpy))
25657+ ptr_func_glXDestroyPbuffer(dpy, pbuffer);
25658+ }
25659+
25660+ for (i = 0; i < MAX_ASSOC_SIZE && process->
25661+ association_clientdrawable_serverdrawable[i].key; i ++) {
25662+ Window win = (Window) process->
25663+ association_clientdrawable_serverdrawable[i].value;
25664+
25665+ fprintf(stderr, "Destroy window %x corresponding to client_drawable "
25666+ "= %p\n", (int) win, process->
25667+ association_clientdrawable_serverdrawable[i].key);
25668+
25669+ XDestroyWindow(dpy, win);
25670+ if (active_win == win)
25671+ active_win = 0;
25672+
25673+ int loop = 1; // 1;
25674+ while (loop) {
25675+ while (XPending(dpy) > 0) {
25676+ XEvent event;
25677+
25678+ XNextEvent(dpy, &event);
25679+ switch (event.type) {
25680+ case DestroyNotify:
25681+ {
25682+ if (((XDestroyWindowEvent *) &event)->window == win)
25683+ loop = 0;
25684+ break;
25685+ }
25686+ }
25687+ }
25688+ break; /* TODO */
25689+ }
25690+ }
25691+
25692+ for (i = 0; i < process->nb_states; i++) {
25693+ destroy_gl_state(process->glstates[i]);
25694+ free(process->glstates[i]);
25695+ }
25696+ destroy_gl_state(&process->default_state);
25697+ free(process->glstates);
25698+
25699+ if (process->cmdbuf)
25700+ qemu_free(process->cmdbuf);
25701+
25702+ for (i = 0; &processes[i] != process; i ++);
25703+ memmove(&processes[i], &processes[i + 1],
25704+ (MAX_HANDLED_PROCESS - 1 - i) * sizeof(ProcessStruct));
25705+}
25706+
25707+static const int beginend_allowed[GL_N_CALLS] = {
25708+#undef MAGIC_MACRO
25709+#define MAGIC_MACRO(name) [name ## _func] = 1,
25710+#include "gl_beginend.h"
25711+};
25712+
25713+void do_context_switch(Display *dpy, pid_t pid, int call)
25714+{
25715+ int i;
25716+
25717+ for (i = 0; i < MAX_HANDLED_PROCESS; i ++)
25718+ if (processes[i].process_id == pid) {
25719+ process = &processes[i];
25720+ break;
25721+ } else if (processes[i].process_id == 0) {
25722+ process = &processes[i];
25723+ memset(process, 0, sizeof(ProcessStruct));
25724+ process->process_id = pid;
25725+ init_gl_state(&process->default_state);
25726+ process->current_state = &process->default_state;
25727+ process->dpy = dpy;
25728+ break;
25729+ }
25730+ if (process == NULL) {
25731+ fprintf(stderr, "Too many processes !\n");
25732+ exit(-1);
25733+ }
25734+
25735+ switch (call) {
25736+ case _init32_func:
25737+ case _init64_func:
25738+ case _exit_process_func:
25739+ case glXMakeCurrent_func:
25740+ /* Do nothing */
25741+ break;
25742+
25743+ default:
25744+#if 0
25745+ glFlush();
25746+ glFinish();
25747+ glXSwapBuffers(dpy, drawable);
25748+ if (process->current_state == &process->default_state)
25749+ /* Where do commands like glViewport go when no drawable or
25750+ * context are current - i.e. after a call to
25751+ * glXMakeCurrent(dpy, 0, 0) ? */;
25752+ else
25753+#endif
25754+ glXMakeCurrent(dpy, process->current_state->drawable,
25755+ process->current_state->context);
25756+ }
25757+}
25758+
25759+int do_function_call(int func_number, arg_t *args, char *ret_string)
25760+{
25761+ char ret_char = 0;
25762+ int ret_int = 0;
25763+ const char *ret_str = NULL;
25764+ Display *dpy = process->dpy;
25765+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
25766+ int ret_type = signature->ret_type;
25767+
25768+ if (parent_dpy)
25769+ dpy = parent_dpy;
25770+
25771+ process->instr_counter++;
25772+ if (display_function_call)
25773+ fprintf(stderr, "[%d]> %s\n", process->instr_counter,
25774+ tab_opengl_calls_name[func_number]);
25775+
25776+#ifdef BUFFER_BEGINEND
25777+ if (process->began) {
25778+ /* Need to check for any errors now because later we won't have
25779+ * a chance to report them. */
25780+ if (beginend_allowed[func_number]) {
25781+ arg_t *buf = cmd_buffer_alloc(process, signature->nb_args + 1);
25782+
25783+ /* TODO: pointer arguments */
25784+ buf[0] = func_number;
25785+ memcpy(buf + 1, args, signature->nb_args * sizeof(arg_t));
25786+ } else if (likely(func_number == glEnd_func)) {
25787+ process->began = 0;
25788+
25789+ glBegin(process->primitive);
25790+ cmd_buffer_replay(process);
25791+ glEnd();
25792+ } else {
25793+ /* TODO: properly report */
25794+#ifdef SYSTEMATIC_ERROR_CHECK
25795+ process->current_state->last_error = INVALID_OPERATION;
25796+#endif
25797+ }
25798+
25799+ func_number = -1;
25800+ }
25801+#endif
25802+
25803+ switch (func_number) {
25804+ case -1:
25805+ break;
25806+
25807+ case _init_func:
25808+ *(int *) args[1] = 1;
25809+ break;
25810+
25811+ case _synchronize_func:
25812+ ret_int = 1;
25813+ break;
25814+
25815+ case _exit_process_func:
25816+ do_disconnect_current();
25817+ break;
25818+
25819+ case _changeWindowState_func:
25820+ {
25821+ ClientGLXDrawable client_drawable = to_drawable(args[0]);
25822+
25823+ if (display_function_call)
25824+ fprintf(stderr, "client_drawable=%p\n",
25825+ (void *) client_drawable);
25826+
25827+ GLXDrawable drawable =
25828+ get_association_clientdrawable_serverdrawable(
25829+ process, client_drawable);
25830+ if (drawable) {
25831+ if (args[1] == IsViewable) {
25832+ WindowPosStruct pos;
25833+
25834+ _get_window_pos(dpy, drawable, &pos);
25835+ if (pos.map_state != args[1]) {
25836+ XMapWindow(dpy, drawable);
25837+
25838+ int loop = 1; // 1;
25839+
25840+ while (loop) {
25841+ while (XPending(dpy) > 0) {
25842+ XEvent event;
25843+
25844+ XNextEvent(dpy, &event);
25845+ switch (event.type) {
25846+ case ConfigureNotify:
25847+ {
25848+ if (((XConfigureEvent *) &event)->
25849+ window == drawable) {
25850+ loop = 0;
25851+ }
25852+ break;
25853+ }
25854+ }
25855+ }
25856+ break; /* TODO */
25857+ }
25858+ }
25859+ }
25860+ }
25861+
25862+ break;
25863+ }
25864+
25865+ case _moveResizeWindow_func:
25866+ {
25867+ int *params = (int *) args[1];
25868+ ClientGLXDrawable client_drawable = to_drawable(args[0]);
25869+
25870+ if (display_function_call)
25871+ fprintf(stderr, "client_drawable=%p\n",
25872+ (void *) client_drawable);
25873+
25874+ GLXDrawable drawable =
25875+ get_association_clientdrawable_serverdrawable(
25876+ process, client_drawable);
25877+ if (drawable) {
25878+ WindowPosStruct pos;
25879+
25880+ _get_window_pos(dpy, drawable, &pos);
25881+ if (!
25882+ (params[0] == pos.x && params[1] == pos.y &&
25883+ params[2] == pos.width && params[3] == pos.height)) {
25884+ int redim = !(params[2] == pos.width &&
25885+ params[3] == pos.height);
25886+ active_win_x = params[0];
25887+ active_win_y = params[1];
25888+
25889+ fprintf(stderr, "old x=%d y=%d width=%d height=%d\n",
25890+ pos.x, pos.y, pos.width, pos.height);
25891+ fprintf(stderr, "new x=%d y=%d width=%d height=%d\n",
25892+ params[0], params[1], params[2], params[3]);
25893+ XMoveResizeWindow(dpy, drawable, params[0], params[1],
25894+ params[2], params[3]);
25895+ int loop = 0; // = 1
25896+
25897+ while (loop) {
25898+ while (XPending(dpy) > 0) {
25899+ XEvent event;
25900+
25901+ XNextEvent(dpy, &event);
25902+ switch (event.type) {
25903+ case ConfigureNotify:
25904+ {
25905+ if (((XConfigureEvent *) &event)->
25906+ window == drawable) {
25907+ loop = 0;
25908+ }
25909+ break;
25910+ }
25911+ }
25912+ }
25913+ }
25914+ /* The window should have resized by now, but force the
25915+ * new size anyway. */
25916+ _get_window_pos(dpy, drawable, &pos);
25917+ pos.width = params[2];
25918+ pos.height = params[3];
25919+ process->currentDrawablePos = pos;
25920+ // if (getenv("FORCE_GL_VIEWPORT"))
25921+ if (redim)
25922+ glViewport(0, 0, pos.width, pos.height);
25923+ }
25924+ }
25925+ break;
25926+ }
25927+
25928+ case _send_cursor_func:
25929+ {
25930+#if 0
25931+ int x = args[0];
25932+ int y = args[1];
25933+ int width = args[2];
25934+ int height = args[3];
25935+ int xhot = args[4];
25936+ int yhot = args[5];
25937+ int *pixels = (int *) args[6];
25938+
25939+ client_cursor.x = x;
25940+ client_cursor.y = y;
25941+ client_cursor.width = width;
25942+ client_cursor.height = height;
25943+ client_cursor.xhot = xhot;
25944+ client_cursor.yhot = yhot;
25945+ if (pixels) {
25946+ client_cursor.pixels =
25947+ realloc(client_cursor.pixels,
25948+ client_cursor.width * client_cursor.height *
25949+ sizeof(int));
25950+ memcpy(client_cursor.pixels, pixels,
25951+ client_cursor.width * client_cursor.height *
25952+ sizeof(int));
25953+ }
25954+ int in_window = (x >= 0 && y >= 0 &&
25955+ x < process->currentDrawablePos.width &&
25956+ y < process->currentDrawablePos.height);
25957+ // fprintf(stderr, "cursor at %d %d (%s)\n", x, y, (in_window) ?
25958+ // "in window" : "not in window");
25959+#endif
25960+ break;
25961+ }
25962+
25963+#ifdef BUFFER_BEGINEND
25964+ case glBegin_func:
25965+ process->began = 1;
25966+ process->primitive = args[0];
25967+ break;
25968+#endif
25969+
25970+ case glXWaitGL_func:
25971+ {
25972+ glXWaitGL();
25973+ ret_int = 0;
25974+ break;
25975+ }
25976+
25977+ case glXWaitX_func:
25978+ {
25979+ glXWaitX();
25980+ ret_int = 0;
25981+ break;
25982+ }
25983+
25984+ case glXChooseVisual_func:
25985+ {
25986+ ret_int = glXChooseVisualFunc(dpy, (int *) args[2]);
25987+ break;
25988+ }
25989+
25990+ case glXQueryExtensionsString_func:
25991+ {
25992+ ret_str = glXQueryExtensionsString(dpy, 0);
25993+ break;
25994+ }
25995+
25996+ case glXQueryServerString_func:
25997+ {
25998+ ret_str = glXQueryServerString(dpy, 0, args[2]);
25999+ break;
26000+ }
26001+
26002+ case glXGetClientString_func:
26003+ {
26004+ ret_str = glXGetClientString(dpy, args[1]);
26005+ break;
26006+ }
26007+
26008+ case glXGetScreenDriver_func:
26009+ {
26010+ GET_EXT_PTR(const char *, glXGetScreenDriver, (Display *, int));
26011+
26012+ ret_str = ptr_func_glXGetScreenDriver(dpy, 0);
26013+ break;
26014+ }
26015+
26016+ case glXGetDriverConfig_func:
26017+ {
26018+ GET_EXT_PTR(const char *, glXGetDriverConfig, (const char *));
26019+
26020+ ret_str = ptr_func_glXGetDriverConfig((const char *) args[0]);
26021+ break;
26022+ }
26023+
26024+ case glXCreateContext_func:
26025+ {
26026+ int visualid = (int) args[1];
26027+ int fake_shareList = (int) args[2];
26028+
26029+ if (1 || display_function_call)
26030+ fprintf(stderr, "visualid=%d, fake_shareList=%d\n", visualid,
26031+ fake_shareList);
26032+
26033+ GLXContext shareList = get_association_fakecontext_glxcontext(
26034+ process, fake_shareList);
26035+ XVisualInfo *vis = get_visual_info_from_visual_id(dpy, visualid);
26036+ GLXContext ctxt;
26037+
26038+ if (vis) {
26039+ ctxt = glXCreateContext(dpy, vis, shareList, args[3]);
26040+ } else {
26041+ vis = get_default_visual(dpy);
26042+ int saved_visualid = vis->visualid;
26043+
26044+ vis->visualid = visualid ?: saved_visualid;
26045+ ctxt = glXCreateContext(dpy, vis, shareList, args[3]);
26046+ vis->visualid = saved_visualid;
26047+ }
26048+
26049+ if (ctxt) {
26050+ int fake_ctxt =++ process->next_available_context_number;
26051+
26052+ set_association_fakecontext_visual(process, fake_ctxt, vis);
26053+ set_association_fakecontext_glxcontext(process,
26054+ fake_ctxt, ctxt);
26055+ ret_int = fake_ctxt;
26056+
26057+ _create_context(process, ctxt, fake_ctxt, shareList,
26058+ fake_shareList);
26059+ } else {
26060+ ret_int = 0;
26061+ }
26062+
26063+ break;
26064+ }
26065+
26066+
26067+ case glXCreateNewContext_func:
26068+ {
26069+ GET_EXT_PTR(GLXContext, glXCreateNewContext,
26070+ (Display *, GLXFBConfig, int, GLXContext, int));
26071+ int client_fbconfig = args[1];
26072+
26073+ ret_int = 0;
26074+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26075+
26076+ if (fbconfig) {
26077+ int fake_shareList = args[3];
26078+ GLXContext shareList = get_association_fakecontext_glxcontext(
26079+ process, fake_shareList);
26080+ process->next_available_context_number++;
26081+ int fake_ctxt = process->next_available_context_number;
26082+ GLXContext ctxt = ptr_func_glXCreateNewContext(
26083+ dpy, fbconfig, args[2], shareList, args[4]);
26084+ set_association_fakecontext_glxcontext(
26085+ process, fake_ctxt, ctxt);
26086+ ret_int = fake_ctxt;
26087+
26088+ _create_context(process, ctxt, fake_ctxt, shareList,
26089+ fake_shareList);
26090+ }
26091+ break;
26092+ }
26093+
26094+ case glXCopyContext_func:
26095+ {
26096+ int fake_src_ctxt = (int) args[1];
26097+ int fake_dst_ctxt = (int) args[2];
26098+ GLXContext src_ctxt;
26099+ GLXContext dst_ctxt;
26100+
26101+ if (display_function_call)
26102+ fprintf(stderr, "fake_src_ctxt=%i, fake_dst_ctxt=%i\n",
26103+ fake_src_ctxt, fake_dst_ctxt);
26104+
26105+ if (!(src_ctxt = get_association_fakecontext_glxcontext(
26106+ process, fake_src_ctxt)))
26107+ fprintf(stderr, "invalid fake_src_ctxt (%i) !\n",
26108+ fake_src_ctxt);
26109+ else
26110+ if (!(dst_ctxt = get_association_fakecontext_glxcontext(
26111+ process, fake_dst_ctxt))) {
26112+ fprintf(stderr, "invalid fake_dst_ctxt (%i) !\n",
26113+ fake_dst_ctxt);
26114+ } else
26115+ glXCopyContext(dpy, src_ctxt, dst_ctxt, args[3]);
26116+
26117+ break;
26118+ }
26119+
26120+ case glXDestroyContext_func:
26121+ {
26122+ int fake_ctxt = (int) args[1];
26123+
26124+ if (display_function_call)
26125+ fprintf(stderr, "fake_ctxt=%d\n", fake_ctxt);
26126+
26127+ GLXContext ctxt = get_association_fakecontext_glxcontext(
26128+ process, fake_ctxt);
26129+ if (ctxt == NULL) {
26130+ fprintf(stderr, "invalid fake_ctxt (%p) !\n",
26131+ (void *) (long) fake_ctxt);
26132+ } else {
26133+ int i;
26134+
26135+ for (i = 0; i < process->nb_states; i ++) {
26136+ if (process->glstates[i]->fake_ctxt == fake_ctxt) {
26137+ if (ctxt == process->current_state->context)
26138+ process->current_state = &process->default_state;
26139+
26140+ int fake_shareList =
26141+ process->glstates[i]->fake_shareList;
26142+ process->glstates[i]->ref--;
26143+ if (process->glstates[i]->ref == 0) {
26144+ fprintf(stderr,
26145+ "destroy_gl_state fake_ctxt = %d\n",
26146+ process->glstates[i]->fake_ctxt);
26147+ destroy_gl_state(process->glstates[i]);
26148+ free(process->glstates[i]);
26149+ memmove(&process->glstates[i],
26150+ &process->glstates[i + 1],
26151+ (process->nb_states - i - 1) *
26152+ sizeof(GLState *));
26153+ process->nb_states --;
26154+ }
26155+
26156+ if (fake_shareList) {
26157+ for (i = 0; i < process->nb_states; i++) {
26158+ if (process->glstates[i]->fake_ctxt ==
26159+ fake_shareList) {
26160+ process->glstates[i]->ref--;
26161+ if (process->glstates[i]->ref == 0) {
26162+ fprintf(stderr,
26163+ "destroy_gl_state fake_ctxt = %d\n",
26164+ process->glstates[i]->
26165+ fake_ctxt);
26166+ destroy_gl_state(process->
26167+ glstates[i]);
26168+ free(process->glstates[i]);
26169+ memmove(&process->glstates[i],
26170+ &process->glstates[i + 1],
26171+ (process->nb_states - i - 1) *
26172+ sizeof(GLState *));
26173+ process->nb_states --;
26174+ }
26175+ break;
26176+ }
26177+ }
26178+ }
26179+
26180+ glXDestroyContext(dpy, ctxt);
26181+ unset_association_fakecontext_glxcontext(
26182+ process, fake_ctxt);
26183+
26184+ break;
26185+ }
26186+ }
26187+ }
26188+ break;
26189+ }
26190+
26191+ case glXQueryVersion_func:
26192+ {
26193+ ret_int = glXQueryVersion(dpy, (int *) args[1], (int *) args[2]);
26194+ break;
26195+ }
26196+
26197+ case glGetString_func:
26198+ {
26199+ ret_str = (char *) glGetString(args[0]);
26200+ break;
26201+ }
26202+
26203+ case glXMakeCurrent_func:
26204+ {
26205+ int i;
26206+ ClientGLXDrawable client_drawable = to_drawable(args[1]);
26207+ GLXDrawable drawable = 0;
26208+ int fake_ctxt = (int) args[2];
26209+
26210+ if (display_function_call)
26211+ fprintf(stderr, "client_drawable=%p fake_ctx=%d\n",
26212+ (void *) client_drawable, fake_ctxt);
26213+
26214+ if (client_drawable == 0 && fake_ctxt == 0) {
26215+ ret_int = glXMakeCurrent(dpy, 0, NULL);
26216+ process->current_state = &process->default_state;
26217+ } else if ((drawable = (GLXDrawable)
26218+ get_association_fakepbuffer_pbuffer(
26219+ process, client_drawable))) {
26220+ GLXContext ctxt = get_association_fakecontext_glxcontext(
26221+ process, fake_ctxt);
26222+ if (ctxt == NULL) {
26223+ fprintf(stderr, "invalid fake_ctxt (%d) (*)!\n",
26224+ fake_ctxt);
26225+ ret_int = 0;
26226+ } else
26227+ ret_int = glXMakeCurrent(dpy, drawable, ctxt);
26228+ } else {
26229+ GLXContext ctxt = get_association_fakecontext_glxcontext(
26230+ process, fake_ctxt);
26231+ if (ctxt == NULL) {
26232+ fprintf(stderr, "invalid fake_ctxt (%d)!\n", fake_ctxt);
26233+ ret_int = 0;
26234+ } else {
26235+ drawable = get_association_clientdrawable_serverdrawable(
26236+ process, client_drawable);
26237+ if (drawable == 0) {
26238+ XVisualInfo *vis = get_association_fakecontext_visual(
26239+ process, fake_ctxt);
26240+ if (vis == NULL)
26241+ vis = get_default_visual(dpy);
26242+ /* if (local_connection) drawable = client_drawable;
26243+ * else */
26244+ {
26245+ if ((int) (long) client_drawable ==
26246+ RootWindow(dpy, 0) &&
26247+ local_connection) {
26248+ drawable = (GLXDrawable) client_drawable;
26249+ } else {
26250+ drawable = create_window(
26251+ dpy, local_connection ?
26252+ (Window) client_drawable :
26253+ 0, vis, "", 0, 0, 16, 16);
26254+ }
26255+ }
26256+ set_association_clientdrawable_serverdrawable(process,
26257+ client_drawable, drawable);
26258+ }
26259+
26260+ ret_int = glXMakeCurrent(dpy, drawable, ctxt);
26261+ }
26262+ }
26263+
26264+ if (ret_int) {
26265+ for (i = 0; i < process->nb_states; i ++) {
26266+ if (process->glstates[i]->fake_ctxt == fake_ctxt) {
26267+ /* HACK !!! REMOVE */
26268+ process->current_state = process->glstates[i];
26269+ process->current_state->drawable = drawable;
26270+ break;
26271+ }
26272+ }
26273+
26274+ if (i == process->nb_states) {
26275+ fprintf(stderr, "error remembering the new context\n");
26276+ exit(-1);
26277+ }
26278+ }
26279+ break;
26280+ }
26281+
26282+ case glXSwapBuffers_func:
26283+ {
26284+ ClientGLXDrawable client_drawable = to_drawable(args[1]);
26285+
26286+ if (display_function_call)
26287+ fprintf(stderr, "client_drawable=%p\n", client_drawable);
26288+
26289+ GLXDrawable drawable =
26290+ get_association_clientdrawable_serverdrawable(
26291+ process, client_drawable);
26292+ if (!drawable) {
26293+ fprintf(stderr, "unknown client_drawable (%p) !\n",
26294+ (void *) client_drawable);
26295+ } else {
26296+#ifdef CURSOR_TRICK
26297+ if (client_cursor.pixels && local_connection == 0) {
26298+ glPushAttrib(GL_ALL_ATTRIB_BITS);
26299+ glPushClientAttrib(GL_ALL_ATTRIB_BITS);
26300+
26301+ glMatrixMode(GL_PROJECTION);
26302+ glPushMatrix();
26303+ glLoadIdentity();
26304+ glOrtho(0, process->currentDrawablePos.width,
26305+ process->currentDrawablePos.height, 0, -1, 1);
26306+ glMatrixMode(GL_MODELVIEW);
26307+ glPushMatrix();
26308+ glLoadIdentity();
26309+ glPixelZoom(1, -1);
26310+
26311+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
26312+ glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
26313+ glPixelStorei(GL_UNPACK_SWAP_BYTES, 0);
26314+ glPixelStorei(GL_UNPACK_LSB_FIRST, 0);
26315+ glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
26316+ glShadeModel(GL_SMOOTH);
26317+
26318+ glEnable(GL_BLEND);
26319+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
26320+ glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
26321+
26322+ int i, numUnits;
26323+
26324+ glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &numUnits);
26325+ for (i = 0; i < numUnits; i++) {
26326+ do_glActiveTextureARB(GL_TEXTURE0_ARB + i);
26327+ glDisable(GL_TEXTURE_1D);
26328+ glDisable(GL_TEXTURE_2D);
26329+ glDisable(GL_TEXTURE_3D);
26330+ }
26331+ glDisable(GL_ALPHA_TEST);
26332+ glDisable(GL_DEPTH_TEST);
26333+ glDisable(GL_STENCIL_TEST);
26334+ glDisable(GL_SCISSOR_TEST);
26335+ glDisable(GL_FRAGMENT_PROGRAM_ARB);
26336+ glDisable(GL_VERTEX_PROGRAM_ARB);
26337+ do_glUseProgramObjectARB(0);
26338+
26339+ // memset(client_cursor.pixels, 255, client_cursor.width
26340+ // * client_cursor.height * sizeof(int));
26341+
26342+ glRasterPos2d(client_cursor.x - client_cursor.xhot,
26343+ client_cursor.y - client_cursor.yhot);
26344+ glDrawPixels(client_cursor.width, client_cursor.height,
26345+ GL_BGRA, GL_UNSIGNED_BYTE,
26346+ client_cursor.pixels);
26347+
26348+ glMatrixMode(GL_MODELVIEW);
26349+ glPopMatrix();
26350+
26351+ glMatrixMode(GL_PROJECTION);
26352+ glPopMatrix();
26353+
26354+ glPopClientAttrib();
26355+ glPopAttrib();
26356+ }
26357+#endif
26358+
26359+ ////////// HORRIBLE HORRIBLE HACK
26360+ if (drawable != active_win && active_win) {
26361+ glXMakeCurrent(dpy, active_win,
26362+ processes[0].current_state->context);
26363+ glXSwapBuffers(dpy, active_win);
26364+ glXMakeCurrent(dpy, process->current_state->drawable,
26365+ process->current_state->context);
26366+ }
26367+ glXSwapBuffers(dpy, drawable);
26368+ }
26369+ break;
26370+ }
26371+
26372+ case glXIsDirect_func:
26373+ {
26374+ int fake_ctxt = (int) args[1];
26375+
26376+ if (display_function_call)
26377+ fprintf(stderr, "fake_ctx=%x\n", fake_ctxt);
26378+ GLXContext ctxt =
26379+ get_association_fakecontext_glxcontext(process, fake_ctxt);
26380+ if (ctxt == NULL) {
26381+ fprintf(stderr, "invalid fake_ctxt (%x) !\n", fake_ctxt);
26382+ ret_char = False;
26383+ } else {
26384+ ret_char = glXIsDirect(dpy, ctxt);
26385+ }
26386+ break;
26387+ }
26388+
26389+ case glXGetConfig_func:
26390+ {
26391+ int visualid = args[1];
26392+ XVisualInfo *vis = NULL;
26393+
26394+ if (visualid)
26395+ vis = get_visual_info_from_visual_id(dpy, visualid);
26396+ if (vis == NULL)
26397+ vis = get_default_visual(dpy);
26398+ ret_int = glXGetConfig(dpy, vis, args[2], (int *) args[3]);
26399+ break;
26400+ }
26401+
26402+ case glXGetConfig_extended_func:
26403+ {
26404+ int visualid = args[1];
26405+ int n = args[2];
26406+ int i;
26407+ XVisualInfo *vis = NULL;
26408+ int *attribs = (int *) args[3];
26409+ int *values = (int *) args[4];
26410+ int *res = (int *) args[5];
26411+
26412+ if (visualid)
26413+ vis = get_visual_info_from_visual_id(dpy, visualid);
26414+ if (vis == NULL)
26415+ vis = get_default_visual(dpy);
26416+
26417+ for (i = 0; i < n; i++) {
26418+ res[i] = glXGetConfig(dpy, vis, attribs[i], &values[i]);
26419+ }
26420+ break;
26421+ }
26422+
26423+ case glXUseXFont_func:
26424+ {
26425+ /* implementation is client-side only :-) */
26426+ break;
26427+ }
26428+
26429+ case glXQueryExtension_func:
26430+ {
26431+ ret_int =
26432+ glXQueryExtension(dpy, (int *) args[1], (int *) args[2]);
26433+ break;
26434+ }
26435+
26436+ case glXChooseFBConfig_func:
26437+ {
26438+ GET_EXT_PTR(GLXFBConfig *, glXChooseFBConfig,
26439+ (Display *, int, int *, int *));
26440+ if (process->nfbconfig == MAX_FBCONFIG) {
26441+ *(int *) args[3] = 0;
26442+ ret_int = 0;
26443+ } else {
26444+ GLXFBConfig *fbconfigs =
26445+ ptr_func_glXChooseFBConfig(dpy, args[1], (int *) args[2],
26446+ (int *) args[3]);
26447+ if (fbconfigs) {
26448+ process->fbconfigs[process->nfbconfig] = fbconfigs;
26449+ process->fbconfigs_max[process->nfbconfig] =
26450+ *(int *) args[3];
26451+ process->nfbconfig++;
26452+ ret_int = 1 + process->nfbconfig_total;
26453+ process->nfbconfig_total +=
26454+ process->fbconfigs_max[process->nfbconfig];
26455+ } else {
26456+ ret_int = 0;
26457+ }
26458+ }
26459+ break;
26460+ }
26461+
26462+ case glXChooseFBConfigSGIX_func:
26463+ {
26464+ GET_EXT_PTR(GLXFBConfigSGIX *, glXChooseFBConfigSGIX,
26465+ (Display *, int, int *, int *));
26466+ if (process->nfbconfig == MAX_FBCONFIG) {
26467+ *(int *) args[3] = 0;
26468+ ret_int = 0;
26469+ } else {
26470+ GLXFBConfigSGIX *fbconfigs =
26471+ ptr_func_glXChooseFBConfigSGIX(dpy, args[1],
26472+ (int *) args[2],
26473+ (int *) args[3]);
26474+ if (fbconfigs) {
26475+ process->fbconfigs[process->nfbconfig] = fbconfigs;
26476+ process->fbconfigs_max[process->nfbconfig] =
26477+ *(int *) args[3];
26478+ process->nfbconfig++;
26479+ ret_int = 1 + process->nfbconfig_total;
26480+ process->nfbconfig_total +=
26481+ process->fbconfigs_max[process->nfbconfig];
26482+ } else {
26483+ ret_int = 0;
26484+ }
26485+ }
26486+ break;
26487+ }
26488+
26489+ case glXGetFBConfigs_func:
26490+ {
26491+ GET_EXT_PTR(GLXFBConfig *, glXGetFBConfigs,
26492+ (Display *, int, int *));
26493+ if (process->nfbconfig == MAX_FBCONFIG) {
26494+ *(int *) args[2] = 0;
26495+ ret_int = 0;
26496+ } else {
26497+ GLXFBConfig *fbconfigs =
26498+ ptr_func_glXGetFBConfigs(dpy, args[1], (int *) args[2]);
26499+ if (fbconfigs) {
26500+ process->fbconfigs[process->nfbconfig] = fbconfigs;
26501+ process->fbconfigs_max[process->nfbconfig] =
26502+ *(int *) args[2];
26503+ process->nfbconfig++;
26504+ ret_int = 1 + process->nfbconfig_total;
26505+ process->nfbconfig_total +=
26506+ process->fbconfigs_max[process->nfbconfig];
26507+ } else {
26508+ ret_int = 0;
26509+ }
26510+ }
26511+ break;
26512+ }
26513+
26514+ case glXCreatePbuffer_func:
26515+ {
26516+ GET_EXT_PTR(GLXPbuffer, glXCreatePbuffer,
26517+ (Display *, GLXFBConfig, int *));
26518+ int client_fbconfig = args[1];
26519+
26520+ ret_int = 0;
26521+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26522+
26523+ if (fbconfig) {
26524+ GLXPbuffer pbuffer =
26525+ ptr_func_glXCreatePbuffer(dpy, fbconfig, (int *) args[2]);
26526+ fprintf(stderr, "glXCreatePbuffer --> %x\n", (int) pbuffer);
26527+ if (pbuffer) {
26528+ ClientGLXDrawable fake_pbuffer = to_drawable(
26529+ ++ process->next_available_pbuffer_number);
26530+
26531+ set_association_fakepbuffer_pbuffer(
26532+ process, fake_pbuffer, pbuffer);
26533+ fprintf(stderr,
26534+ "set_association_fakepbuffer_pbuffer(%p, %x)\n",
26535+ fake_pbuffer, (int) (long) pbuffer);
26536+ ret_int = (int) (long) fake_pbuffer;
26537+ }
26538+ }
26539+ break;
26540+ }
26541+
26542+ case glXCreateGLXPbufferSGIX_func:
26543+ {
26544+ GET_EXT_PTR(GLXPbufferSGIX, glXCreateGLXPbufferSGIX,
26545+ (Display *, GLXFBConfig, int, int, int *));
26546+ int client_fbconfig = args[1];
26547+
26548+ ret_int = 0;
26549+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26550+
26551+ if (fbconfig) {
26552+ GLXPbufferSGIX pbuffer = ptr_func_glXCreateGLXPbufferSGIX(
26553+ dpy, fbconfig,
26554+ args[2], args[3], (int *) args[4]);
26555+ if (pbuffer) {
26556+ ClientGLXDrawable fake_pbuffer = to_drawable(
26557+ ++ process->next_available_pbuffer_number);
26558+
26559+ set_association_fakepbuffer_pbuffer(
26560+ process, fake_pbuffer, pbuffer);
26561+ ret_int = (int) (long) fake_pbuffer;
26562+ }
26563+ }
26564+ break;
26565+ }
26566+
26567+ case glXDestroyPbuffer_func:
26568+ {
26569+ GET_EXT_PTR(void, glXDestroyPbuffer, (Display *, GLXPbuffer));
26570+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26571+
26572+ if (display_function_call)
26573+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26574+
26575+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26576+ process, fake_pbuffer);
26577+ if (pbuffer == 0) {
26578+ fprintf(stderr, "invalid fake_pbuffer (%p) !\n",
26579+ fake_pbuffer);
26580+ } else {
26581+ if (!is_gl_vendor_ati(dpy))
26582+ ptr_func_glXDestroyPbuffer(dpy, pbuffer);
26583+ unset_association_fakepbuffer_pbuffer(process, fake_pbuffer);
26584+ }
26585+ break;
26586+ }
26587+
26588+ case glXDestroyGLXPbufferSGIX_func:
26589+ {
26590+ GET_EXT_PTR(void, glXDestroyGLXPbufferSGIX,
26591+ (Display *, GLXPbuffer));
26592+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26593+
26594+ if (display_function_call)
26595+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26596+
26597+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26598+ process, fake_pbuffer);
26599+ if (pbuffer == 0) {
26600+ fprintf(stderr, "invalid fake_pbuffer (%p) !\n",
26601+ fake_pbuffer);
26602+ } else {
26603+ if (!is_gl_vendor_ati(dpy))
26604+ ptr_func_glXDestroyGLXPbufferSGIX(dpy, pbuffer);
26605+ unset_association_fakepbuffer_pbuffer(process, fake_pbuffer);
26606+ }
26607+ break;
26608+ }
26609+
26610+ case glXBindTexImageATI_func:
26611+ {
26612+ GET_EXT_PTR(void, glXBindTexImageATI,
26613+ (Display *, GLXPbuffer, int));
26614+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26615+
26616+ if (display_function_call)
26617+ fprintf(stderr, "fake_pbuffer=%p\n",
26618+ fake_pbuffer);
26619+
26620+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26621+ process, fake_pbuffer);
26622+ if (pbuffer == 0) {
26623+ fprintf(stderr,
26624+ "glXBindTexImageATI : invalid fake_pbuffer (%p) !\n",
26625+ fake_pbuffer);
26626+ } else {
26627+ ptr_func_glXBindTexImageATI(dpy, pbuffer, args[2]);
26628+ }
26629+ break;
26630+ }
26631+
26632+ case glXReleaseTexImageATI_func:
26633+ {
26634+ GET_EXT_PTR(void, glXReleaseTexImageATI,
26635+ (Display *, GLXPbuffer, int));
26636+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26637+
26638+ if (display_function_call)
26639+ fprintf(stderr, "fake_pbuffer=%d\n",
26640+ (int) (long) fake_pbuffer);
26641+
26642+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26643+ process, fake_pbuffer);
26644+ if (pbuffer == 0) {
26645+ fprintf(stderr,
26646+ "glXReleaseTexImageATI : invalid fake_pbuffer (%d) !\n",
26647+ (int) (long) fake_pbuffer);
26648+ } else {
26649+ ptr_func_glXReleaseTexImageATI(dpy, pbuffer, args[2]);
26650+ }
26651+ break;
26652+ }
26653+
26654+ case glXBindTexImageARB_func:
26655+ {
26656+ GET_EXT_PTR(Bool, glXBindTexImageARB,
26657+ (Display *, GLXPbuffer, int));
26658+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26659+
26660+ if (display_function_call)
26661+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26662+
26663+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26664+ process, fake_pbuffer);
26665+ if (pbuffer == 0) {
26666+ fprintf(stderr,
26667+ "glXBindTexImageARB : invalid fake_pbuffer (%p) !\n",
26668+ fake_pbuffer);
26669+ ret_int = 0;
26670+ } else {
26671+ ret_int = ptr_func_glXBindTexImageARB(dpy, pbuffer, args[2]);
26672+ }
26673+ break;
26674+ }
26675+
26676+ case glXReleaseTexImageARB_func:
26677+ {
26678+ GET_EXT_PTR(Bool, glXReleaseTexImageARB,
26679+ (Display *, GLXPbuffer, int));
26680+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26681+
26682+ if (display_function_call)
26683+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26684+
26685+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26686+ process, fake_pbuffer);
26687+ if (pbuffer == 0) {
26688+ fprintf(stderr,
26689+ "glXReleaseTexImageARB : invalid fake_pbuffer (%p) !\n",
26690+ fake_pbuffer);
26691+ ret_int = 0;
26692+ } else {
26693+ ret_int =
26694+ ptr_func_glXReleaseTexImageARB(dpy, pbuffer, args[2]);
26695+ }
26696+ break;
26697+ }
26698+
26699+ case glXGetFBConfigAttrib_func:
26700+ {
26701+ GET_EXT_PTR(int, glXGetFBConfigAttrib,
26702+ (Display *, GLXFBConfig, int, int *));
26703+ int client_fbconfig = args[1];
26704+
26705+ ret_int = 0;
26706+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26707+
26708+ if (fbconfig)
26709+ ret_int =
26710+ ptr_func_glXGetFBConfigAttrib(dpy, fbconfig, args[2],
26711+ (int *) args[3]);
26712+ break;
26713+ }
26714+
26715+ case glXGetFBConfigAttrib_extended_func:
26716+ {
26717+ GET_EXT_PTR(int, glXGetFBConfigAttrib,
26718+ (Display *, GLXFBConfig, int, int *));
26719+ int client_fbconfig = args[1];
26720+ int n = args[2];
26721+ int i;
26722+ int *attribs = (int *) args[3];
26723+ int *values = (int *) args[4];
26724+ int *res = (int *) args[5];
26725+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26726+
26727+ for (i = 0; i < n; i++) {
26728+ if (fbconfig) {
26729+ res[i] =
26730+ ptr_func_glXGetFBConfigAttrib(dpy, fbconfig,
26731+ attribs[i], &values[i]);
26732+ } else {
26733+ res[i] = 0;
26734+ }
26735+ }
26736+ break;
26737+ }
26738+
26739+ case glXGetFBConfigAttribSGIX_func:
26740+ {
26741+ GET_EXT_PTR(int, glXGetFBConfigAttribSGIX,
26742+ (Display *, GLXFBConfigSGIX, int, int *));
26743+ int client_fbconfig = args[1];
26744+
26745+ ret_int = 0;
26746+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26747+
26748+ if (fbconfig)
26749+ ret_int =
26750+ ptr_func_glXGetFBConfigAttribSGIX(dpy,
26751+ (GLXFBConfigSGIX)
26752+ fbconfig, args[2],
26753+ (int *) args[3]);
26754+ break;
26755+ }
26756+
26757+ case glXQueryContext_func:
26758+ {
26759+ GET_EXT_PTR(int, glXQueryContext,
26760+ (Display *, GLXContext, int, int *));
26761+ int fake_ctxt = (int) args[1];
26762+
26763+ if (display_function_call)
26764+ fprintf(stderr, "fake_ctx=%i\n", fake_ctxt);
26765+ GLXContext ctxt =
26766+ get_association_fakecontext_glxcontext(process, fake_ctxt);
26767+ if (ctxt == NULL) {
26768+ fprintf(stderr, "invalid fake_ctxt (%i) !\n", fake_ctxt);
26769+ ret_int = 0;
26770+ } else {
26771+ ret_int =
26772+ ptr_func_glXQueryContext(dpy, ctxt, args[2],
26773+ (int *) args[3]);
26774+ }
26775+ break;
26776+ }
26777+
26778+ case glXQueryDrawable_func:
26779+ {
26780+ GET_EXT_PTR(void, glXQueryDrawable,
26781+ (Display *, GLXDrawable, int, int *));
26782+ ClientGLXDrawable client_drawable = to_drawable(args[1]);
26783+ GLXDrawable drawable =
26784+ get_association_clientdrawable_serverdrawable(
26785+ process, client_drawable);
26786+
26787+ if (display_function_call)
26788+ fprintf(stderr, "client_drawable=%p\n",
26789+ client_drawable);
26790+
26791+ if (!drawable)
26792+ fprintf(stderr, "invalid client_drawable (%p) !\n",
26793+ client_drawable);
26794+ else
26795+ ptr_func_glXQueryDrawable(dpy, drawable,
26796+ args[2], (int *) args[3]);
26797+
26798+ break;
26799+ }
26800+
26801+ case glXQueryGLXPbufferSGIX_func:
26802+ {
26803+ GET_EXT_PTR(int, glXQueryGLXPbufferSGIX,
26804+ (Display *, GLXFBConfigSGIX, int, int *));
26805+ int client_fbconfig = args[1];
26806+
26807+ ret_int = 0;
26808+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26809+
26810+ if (fbconfig)
26811+ ret_int = ptr_func_glXQueryGLXPbufferSGIX(dpy,
26812+ (GLXFBConfigSGIX) fbconfig,
26813+ args[2], (int *) args[3]);
26814+ break;
26815+ }
26816+
26817+ case glXCreateContextWithConfigSGIX_func:
26818+ {
26819+ GET_EXT_PTR(GLXContext, glXCreateContextWithConfigSGIX,
26820+ (Display *, GLXFBConfigSGIX, int, GLXContext, int));
26821+ int client_fbconfig = args[1];
26822+
26823+ ret_int = 0;
26824+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26825+
26826+ if (fbconfig) {
26827+ GLXContext shareList = get_association_fakecontext_glxcontext(
26828+ process, (int) args[3]);
26829+ process->next_available_context_number++;
26830+ int fake_ctxt = process->next_available_context_number;
26831+ GLXContext ctxt = ptr_func_glXCreateContextWithConfigSGIX(
26832+ dpy, (GLXFBConfigSGIX) fbconfig, args[2],
26833+ shareList, args[4]);
26834+ set_association_fakecontext_glxcontext(
26835+ process, fake_ctxt, ctxt);
26836+ ret_int = fake_ctxt;
26837+ }
26838+ break;
26839+ }
26840+
26841+ case glXGetVisualFromFBConfig_func:
26842+ {
26843+ GET_EXT_PTR(XVisualInfo *, glXGetVisualFromFBConfig,
26844+ (Display *, GLXFBConfig));
26845+ int client_fbconfig = args[1];
26846+
26847+ ret_int = 0;
26848+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26849+
26850+ if (fbconfig) {
26851+ XVisualInfo *vis =
26852+ ptr_func_glXGetVisualFromFBConfig(dpy, fbconfig);
26853+ ret_int = (vis) ? vis->visualid : 0;
26854+ if (vis) {
26855+ tabAssocAttribListVisual =
26856+ realloc(tabAssocAttribListVisual,
26857+ sizeof(AssocAttribListVisual) *
26858+ (nTabAssocAttribListVisual + 1));
26859+ tabAssocAttribListVisual[nTabAssocAttribListVisual].
26860+ attribListLength = 0;
26861+ tabAssocAttribListVisual[nTabAssocAttribListVisual].
26862+ attribList = NULL;
26863+ tabAssocAttribListVisual[nTabAssocAttribListVisual].
26864+ visInfo = vis;
26865+ nTabAssocAttribListVisual++;
26866+ }
26867+ if (display_function_call)
26868+ fprintf(stderr, "visualid = %d\n", ret_int);
26869+ }
26870+ break;
26871+ }
26872+
26873+ case glXSwapIntervalSGI_func:
26874+ {
26875+ GET_EXT_PTR(int, glXSwapIntervalSGI, (int));
26876+
26877+ ret_int = ptr_func_glXSwapIntervalSGI(args[0]);
26878+ break;
26879+ }
26880+
26881+ case glXGetProcAddress_fake_func:
26882+ {
26883+ if (display_function_call)
26884+ fprintf(stderr, "%s\n", (char *) args[0]);
26885+ ret_int = glXGetProcAddressARB((const GLubyte *) args[0]) != NULL;
26886+ break;
26887+ }
26888+
26889+ case glXGetProcAddress_global_fake_func:
26890+ {
26891+ int nbElts = args[0];
26892+ char *huge_buffer = (char *) args[1];
26893+ char *result = (char *) args[2];
26894+ int i;
26895+
26896+ for (i = 0; i < nbElts; i++) {
26897+ int len = strlen(huge_buffer);
26898+
26899+ result[i] =
26900+ glXGetProcAddressARB((const GLubyte *) huge_buffer) !=
26901+ NULL;
26902+ huge_buffer += len + 1;
26903+ }
26904+ break;
26905+ }
26906+
26907+/* Begin of texture stuff */
26908+ case glBindTexture_func:
26909+ case glBindTextureEXT_func:
26910+ {
26911+ int target = args[0];
26912+ unsigned int client_texture = args[1];
26913+ unsigned int server_texture;
26914+
26915+ if (client_texture == 0) {
26916+ glBindTexture(target, 0);
26917+ } else {
26918+ alloc_value(process->current_state->textureAllocator,
26919+ client_texture);
26920+ server_texture =
26921+ process->current_state->tabTextures[client_texture];
26922+ if (server_texture == 0) {
26923+ glGenTextures(1, &server_texture);
26924+ process->current_state->tabTextures[client_texture] =
26925+ server_texture;
26926+ }
26927+ glBindTexture(target, server_texture);
26928+ }
26929+ break;
26930+ }
26931+
26932+ case glGenTextures_fake_func:
26933+ {
26934+ GET_EXT_PTR(void, glGenTextures, (GLsizei n, GLuint *textures));
26935+ int i;
26936+ int n = args[0];
26937+ unsigned int *clientTabTextures = malloc(n * sizeof(int));
26938+ unsigned int *serverTabTextures = malloc(n * sizeof(int));
26939+
26940+ alloc_range(process->current_state->textureAllocator, n,
26941+ clientTabTextures);
26942+
26943+ ptr_func_glGenTextures(n, serverTabTextures);
26944+ for (i = 0; i < n; i++) {
26945+ process->current_state->tabTextures[clientTabTextures[i]] =
26946+ serverTabTextures[i];
26947+ }
26948+
26949+ free(clientTabTextures);
26950+ free(serverTabTextures);
26951+ break;
26952+ }
26953+
26954+
26955+ case glDeleteTextures_func:
26956+ {
26957+ GET_EXT_PTR(void, glDeleteTextures,
26958+ (GLsizei n, const GLuint *textures));
26959+ int i;
26960+ int n = args[0];
26961+ unsigned int *clientTabTextures = (unsigned int *) args[1];
26962+
26963+ delete_range(process->current_state->textureAllocator, n,
26964+ clientTabTextures);
26965+
26966+ unsigned int *serverTabTextures = malloc(n * sizeof(int));
26967+
26968+ for (i = 0; i < n; i++) {
26969+ serverTabTextures[i] =
26970+ get_server_texture(process, clientTabTextures[i]);
26971+ }
26972+ ptr_func_glDeleteTextures(n, serverTabTextures);
26973+ for (i = 0; i < n; i++) {
26974+ process->current_state->tabTextures[clientTabTextures[i]] = 0;
26975+ }
26976+ free(serverTabTextures);
26977+ break;
26978+ }
26979+
26980+ case glPrioritizeTextures_func:
26981+ {
26982+ GET_EXT_PTR(void, glPrioritizeTextures,
26983+ (GLsizei n, const GLuint *textures,
26984+ const GLclampf *priorities));
26985+
26986+ int i;
26987+ int n = args[0];
26988+ unsigned int *textures = (unsigned int *) args[1];
26989+
26990+ for (i = 0; i < n; i++) {
26991+ textures[i] = get_server_texture(process, textures[i]);
26992+ }
26993+ ptr_func_glPrioritizeTextures(n, textures,
26994+ (const GLclampf *) args[2]);
26995+ break;
26996+ }
26997+
26998+ case glAreTexturesResident_func:
26999+ {
27000+ GET_EXT_PTR(void, glAreTexturesResident,
27001+ (GLsizei n, const GLuint *textures,
27002+ GLboolean *residences));
27003+ int i;
27004+ int n = args[0];
27005+ unsigned int *textures = (unsigned int *) args[1];
27006+
27007+ for (i = 0; i < n; i++) {
27008+ textures[i] = get_server_texture(process, textures[i]);
27009+ }
27010+ ptr_func_glAreTexturesResident(n, textures,
27011+ (GLboolean *) args[2]);
27012+ break;
27013+ }
27014+
27015+ case glIsTexture_func:
27016+ case glIsTextureEXT_func:
27017+ {
27018+ GET_EXT_PTR(GLboolean, glIsTexture, (GLuint texture));
27019+ unsigned int client_texture = args[0];
27020+ unsigned int server_texture =
27021+ get_server_texture(process, client_texture);
27022+ if (server_texture)
27023+ ret_char = ptr_func_glIsTexture(server_texture);
27024+ else
27025+ ret_char = 0;
27026+ break;
27027+ }
27028+
27029+ case glFramebufferTexture1DEXT_func:
27030+ {
27031+ GET_EXT_PTR(void, glFramebufferTexture1DEXT,
27032+ (int, int, int, int, int));
27033+ unsigned int client_texture = args[3];
27034+ unsigned int server_texture =
27035+ get_server_texture(process, client_texture);
27036+ if (server_texture)
27037+ ptr_func_glFramebufferTexture1DEXT(args[0], args[1], args[2],
27038+ server_texture, args[4]);
27039+ break;
27040+ }
27041+
27042+ case glFramebufferTexture2DEXT_func:
27043+ {
27044+ GET_EXT_PTR(void, glFramebufferTexture2DEXT,
27045+ (int, int, int, int, int));
27046+ unsigned int client_texture = args[3];
27047+ unsigned int server_texture =
27048+ get_server_texture(process, client_texture);
27049+ if (server_texture)
27050+ ptr_func_glFramebufferTexture2DEXT(args[0], args[1], args[2],
27051+ server_texture, args[4]);
27052+ break;
27053+ }
27054+
27055+ case glFramebufferTexture3DEXT_func:
27056+ {
27057+ GET_EXT_PTR(void, glFramebufferTexture3DEXT,
27058+ (int, int, int, int, int, int));
27059+ unsigned int client_texture = args[3];
27060+ unsigned int server_texture =
27061+ get_server_texture(process, client_texture);
27062+ if (server_texture)
27063+ ptr_func_glFramebufferTexture3DEXT(args[0], args[1], args[2],
27064+ server_texture, args[4],
27065+ args[5]);
27066+ break;
27067+ }
27068+/* End of texture stuff */
27069+
27070+/* Begin of list stuff */
27071+ case glIsList_func:
27072+ {
27073+ unsigned int client_list = args[0];
27074+ unsigned int server_list = get_server_list(process, client_list);
27075+
27076+ if (server_list)
27077+ ret_char = glIsList(server_list);
27078+ else
27079+ ret_char = 0;
27080+ break;
27081+ }
27082+
27083+ case glDeleteLists_func:
27084+ {
27085+ int i;
27086+ unsigned int first_client = args[0];
27087+ int n = args[1];
27088+
27089+ unsigned int first_server =
27090+ get_server_list(process, first_client);
27091+ for (i = 0; i < n; i++) {
27092+ if (get_server_list(process, first_client + i) !=
27093+ first_server + i)
27094+ break;
27095+ }
27096+ if (i == n) {
27097+ glDeleteLists(first_server, n);
27098+ } else {
27099+ for (i = 0; i < n; i++) {
27100+ glDeleteLists(get_server_list(process, first_client + i),
27101+ 1);
27102+ }
27103+ }
27104+
27105+ for (i = 0; i < n; i++) {
27106+ process->current_state->tabLists[first_client + i] = 0;
27107+ }
27108+ delete_consecutive_values(process->current_state->listAllocator,
27109+ first_client, n);
27110+ break;
27111+ }
27112+
27113+ case glGenLists_fake_func:
27114+ {
27115+ int i;
27116+ int n = args[0];
27117+ unsigned int server_first = glGenLists(n);
27118+
27119+ if (server_first) {
27120+ unsigned int client_first =
27121+ alloc_range(process->current_state->listAllocator, n,
27122+ NULL);
27123+ for (i = 0; i < n; i++) {
27124+ process->current_state->tabLists[client_first + i] =
27125+ server_first + i;
27126+ }
27127+ }
27128+ break;
27129+ }
27130+
27131+ case glNewList_func:
27132+ {
27133+ unsigned int client_list = args[0];
27134+ int mode = args[1];
27135+
27136+ alloc_value(process->current_state->listAllocator, client_list);
27137+ unsigned int server_list = get_server_list(process, client_list);
27138+
27139+ if (server_list == 0) {
27140+ server_list = glGenLists(1);
27141+ process->current_state->tabLists[client_list] = server_list;
27142+ }
27143+ glNewList(server_list, mode);
27144+ break;
27145+ }
27146+
27147+ case glCallList_func:
27148+ {
27149+ unsigned int client_list = args[0];
27150+ unsigned int server_list = get_server_list(process, client_list);
27151+
27152+ glCallList(server_list);
27153+ break;
27154+ }
27155+
27156+ case glCallLists_func:
27157+ {
27158+ int i;
27159+ int n = args[0];
27160+ int type = args[1];
27161+ const GLvoid *lists = (const GLvoid *) args[2];
27162+ int *new_lists = malloc(sizeof(int) * n);
27163+
27164+ for (i = 0; i < n; i++) {
27165+ new_lists[i] =
27166+ get_server_list(process, translate_id(i, type, lists));
27167+ }
27168+ glCallLists(n, GL_UNSIGNED_INT, new_lists);
27169+ free(new_lists);
27170+ break;
27171+ }
27172+
27173+
27174+/* End of list stuff */
27175+
27176+/* Begin of buffer stuff */
27177+ case glBindBufferARB_func:
27178+ {
27179+ GET_EXT_PTR(void, glBindBufferARB, (int, int));
27180+ int target = args[0];
27181+ unsigned int client_buffer = args[1];
27182+ unsigned int server_buffer;
27183+
27184+ if (client_buffer == 0) {
27185+ ptr_func_glBindBufferARB(target, 0);
27186+ } else {
27187+ server_buffer = get_server_buffer(process, client_buffer);
27188+ ptr_func_glBindBufferARB(target, server_buffer);
27189+ }
27190+ break;
27191+ }
27192+
27193+ case glGenBuffersARB_fake_func:
27194+ {
27195+ GET_EXT_PTR(void, glGenBuffersARB, (int, unsigned int *));
27196+ int i;
27197+ int n = args[0];
27198+ unsigned int *clientTabBuffers = malloc(n * sizeof(int));
27199+ unsigned int *serverTabBuffers = malloc(n * sizeof(int));
27200+
27201+ alloc_range(process->current_state->bufferAllocator, n,
27202+ clientTabBuffers);
27203+
27204+ ptr_func_glGenBuffersARB(n, serverTabBuffers);
27205+ for (i = 0; i < n; i++) {
27206+ process->current_state->tabBuffers[clientTabBuffers[i]] =
27207+ serverTabBuffers[i];
27208+ }
27209+
27210+ free(clientTabBuffers);
27211+ free(serverTabBuffers);
27212+ break;
27213+ }
27214+
27215+
27216+ case glDeleteBuffersARB_func:
27217+ {
27218+ GET_EXT_PTR(void, glDeleteBuffersARB, (int, int *));
27219+ int i;
27220+ int n = args[0];
27221+ unsigned int *clientTabBuffers = (unsigned int *) args[1];
27222+
27223+ delete_range(process->current_state->bufferAllocator, n,
27224+ clientTabBuffers);
27225+
27226+ int *serverTabBuffers = malloc(n * sizeof(int));
27227+
27228+ for (i = 0; i < n; i++) {
27229+ serverTabBuffers[i] =
27230+ get_server_buffer(process, clientTabBuffers[i]);
27231+ }
27232+ ptr_func_glDeleteBuffersARB(n, serverTabBuffers);
27233+ for (i = 0; i < n; i++) {
27234+ process->current_state->tabBuffers[clientTabBuffers[i]] = 0;
27235+ }
27236+ free(serverTabBuffers);
27237+ break;
27238+ }
27239+
27240+ case glIsBufferARB_func:
27241+ {
27242+ GET_EXT_PTR(int, glIsBufferARB, (int));
27243+ unsigned int client_buffer = args[0];
27244+ unsigned int server_buffer =
27245+ get_server_buffer(process, client_buffer);
27246+ if (server_buffer)
27247+ ret_int = ptr_func_glIsBufferARB(server_buffer);
27248+ else
27249+ ret_int = 0;
27250+ break;
27251+ }
27252+
27253+/* End of buffer stuff */
27254+
27255+ case glShaderSourceARB_fake_func:
27256+ {
27257+ GET_EXT_PTR(void, glShaderSourceARB, (int, int, char **, void *));
27258+ int size = args[1];
27259+ int i;
27260+ int acc_length = 0;
27261+ GLcharARB **tab_prog = malloc(size * sizeof(GLcharARB *));
27262+ int *tab_length = (int *) args[3];
27263+
27264+ for (i = 0; i < size; i++) {
27265+ tab_prog[i] = ((GLcharARB *) args[2]) + acc_length;
27266+ acc_length += tab_length[i];
27267+ }
27268+ ptr_func_glShaderSourceARB(args[0], args[1], tab_prog,
27269+ tab_length);
27270+ free(tab_prog);
27271+ break;
27272+ }
27273+
27274+ case glShaderSource_fake_func:
27275+ {
27276+ GET_EXT_PTR(void, glShaderSource, (int, int, char **, void *));
27277+ int size = args[1];
27278+ int i;
27279+ int acc_length = 0;
27280+ GLcharARB **tab_prog = malloc(size * sizeof(GLcharARB *));
27281+ int *tab_length = (int *) args[3];
27282+
27283+ for (i = 0; i < size; i++) {
27284+ tab_prog[i] = ((GLcharARB *) args[2]) + acc_length;
27285+ acc_length += tab_length[i];
27286+ }
27287+ ptr_func_glShaderSource(args[0], args[1], tab_prog, tab_length);
27288+ free(tab_prog);
27289+ break;
27290+ }
27291+
27292+ case glVertexPointer_fake_func:
27293+ {
27294+ int offset = args[0];
27295+ int size = args[1];
27296+ int type = args[2];
27297+ int stride = args[3];
27298+ int bytes_size = args[4];
27299+
27300+ process->current_state->vertexPointerSize =
27301+ MAX(process->current_state->vertexPointerSize,
27302+ offset + bytes_size);
27303+ process->current_state->vertexPointer =
27304+ realloc(process->current_state->vertexPointer,
27305+ process->current_state->vertexPointerSize);
27306+ memcpy(process->current_state->vertexPointer + offset,
27307+ (void *) args[5], bytes_size);
27308+ /* fprintf(stderr, "glVertexPointer_fake_func size=%d, type=%d,
27309+ * stride=%d, byte_size=%d\n", size, type, stride, bytes_size); */
27310+ glVertexPointer(size, type, stride,
27311+ process->current_state->vertexPointer);
27312+ break;
27313+ }
27314+
27315+ case glNormalPointer_fake_func:
27316+ {
27317+ int offset = args[0];
27318+ int type = args[1];
27319+ int stride = args[2];
27320+ int bytes_size = args[3];
27321+
27322+ process->current_state->normalPointerSize =
27323+ MAX(process->current_state->normalPointerSize,
27324+ offset + bytes_size);
27325+ process->current_state->normalPointer =
27326+ realloc(process->current_state->normalPointer,
27327+ process->current_state->normalPointerSize);
27328+ memcpy(process->current_state->normalPointer + offset,
27329+ (void *) args[4], bytes_size);
27330+ // fprintf(stderr, "glNormalPointer_fake_func type=%d, stride=%d,
27331+ // byte_size=%d\n", type, stride, bytes_size);
27332+ glNormalPointer(type, stride,
27333+ process->current_state->normalPointer);
27334+ break;
27335+ }
27336+
27337+ case glIndexPointer_fake_func:
27338+ {
27339+ int offset = args[0];
27340+ int type = args[1];
27341+ int stride = args[2];
27342+ int bytes_size = args[3];
27343+
27344+ process->current_state->indexPointerSize =
27345+ MAX(process->current_state->indexPointerSize,
27346+ offset + bytes_size);
27347+ process->current_state->indexPointer =
27348+ realloc(process->current_state->indexPointer,
27349+ process->current_state->indexPointerSize);
27350+ memcpy(process->current_state->indexPointer + offset,
27351+ (void *) args[4], bytes_size);
27352+ // fprintf(stderr, "glIndexPointer_fake_func type=%d, stride=%d,
27353+ // byte_size=%d\n", type, stride, bytes_size);
27354+ glIndexPointer(type, stride,
27355+ process->current_state->indexPointer);
27356+ break;
27357+ }
27358+
27359+ case glEdgeFlagPointer_fake_func:
27360+ {
27361+ int offset = args[0];
27362+ int stride = args[1];
27363+ int bytes_size = args[2];
27364+
27365+ process->current_state->edgeFlagPointerSize =
27366+ MAX(process->current_state->edgeFlagPointerSize,
27367+ offset + bytes_size);
27368+ process->current_state->edgeFlagPointer =
27369+ realloc(process->current_state->edgeFlagPointer,
27370+ process->current_state->edgeFlagPointerSize);
27371+ memcpy(process->current_state->edgeFlagPointer + offset,
27372+ (void *) args[3], bytes_size);
27373+ // fprintf(stderr, "glEdgeFlagPointer_fake_func stride = %d,
27374+ // bytes_size=%d\n", stride, bytes_size);
27375+ glEdgeFlagPointer(stride,
27376+ process->current_state->edgeFlagPointer);
27377+ break;
27378+ }
27379+
27380+ case glVertexAttribPointerARB_fake_func:
27381+ {
27382+ GET_EXT_PTR(void, glVertexAttribPointerARB,
27383+ (int, int, int, int, int, void *));
27384+ int offset = args[0];
27385+ int index = args[1];
27386+ int size = args[2];
27387+ int type = args[3];
27388+ int normalized = args[4];
27389+ int stride = args[5];
27390+ int bytes_size = args[6];
27391+
27392+ process->current_state->vertexAttribPointerSize[index] =
27393+ MAX(process->current_state->vertexAttribPointerSize[index],
27394+ offset + bytes_size);
27395+ process->current_state->vertexAttribPointer[index] =
27396+ realloc(process->current_state->vertexAttribPointer[index],
27397+ process->current_state->
27398+ vertexAttribPointerSize[index]);
27399+ memcpy(process->current_state->vertexAttribPointer[index] +
27400+ offset, (void *) args[7], bytes_size);
27401+ ptr_func_glVertexAttribPointerARB(index, size, type, normalized,
27402+ stride,
27403+ process->current_state->
27404+ vertexAttribPointer[index]);
27405+ break;
27406+ }
27407+
27408+ case glVertexAttribPointerNV_fake_func:
27409+ {
27410+ GET_EXT_PTR(void, glVertexAttribPointerNV,
27411+ (int, int, int, int, void *));
27412+ int offset = args[0];
27413+ int index = args[1];
27414+ int size = args[2];
27415+ int type = args[3];
27416+ int stride = args[4];
27417+ int bytes_size = args[5];
27418+
27419+ process->current_state->vertexAttribPointerNVSize[index] =
27420+ MAX(process->current_state->vertexAttribPointerNVSize[index],
27421+ offset + bytes_size);
27422+ process->current_state->vertexAttribPointerNV[index] =
27423+ realloc(process->current_state->vertexAttribPointerNV[index],
27424+ process->current_state->
27425+ vertexAttribPointerNVSize[index]);
27426+ memcpy(process->current_state->vertexAttribPointerNV[index] +
27427+ offset, (void *) args[6], bytes_size);
27428+ ptr_func_glVertexAttribPointerNV(index, size, type, stride,
27429+ process->current_state->
27430+ vertexAttribPointerNV[index]);
27431+ break;
27432+ }
27433+
27434+ case glColorPointer_fake_func:
27435+ {
27436+ int offset = args[0];
27437+ int size = args[1];
27438+ int type = args[2];
27439+ int stride = args[3];
27440+ int bytes_size = args[4];
27441+
27442+ process->current_state->colorPointerSize =
27443+ MAX(process->current_state->colorPointerSize,
27444+ offset + bytes_size);
27445+ process->current_state->colorPointer =
27446+ realloc(process->current_state->colorPointer,
27447+ process->current_state->colorPointerSize);
27448+ memcpy(process->current_state->colorPointer + offset,
27449+ (void *) args[5], bytes_size);
27450+ // fprintf(stderr, "glColorPointer_fake_func bytes_size = %d\n",
27451+ // bytes_size);
27452+ glColorPointer(size, type, stride,
27453+ process->current_state->colorPointer);
27454+
27455+ break;
27456+ }
27457+
27458+ case glSecondaryColorPointer_fake_func:
27459+ {
27460+ GET_EXT_PTR(void, glSecondaryColorPointer,
27461+ (int, int, int, void *));
27462+ int offset = args[0];
27463+ int size = args[1];
27464+ int type = args[2];
27465+ int stride = args[3];
27466+ int bytes_size = args[4];
27467+
27468+ process->current_state->secondaryColorPointerSize =
27469+ MAX(process->current_state->secondaryColorPointerSize,
27470+ offset + bytes_size);
27471+ process->current_state->secondaryColorPointer =
27472+ realloc(process->current_state->secondaryColorPointer,
27473+ process->current_state->secondaryColorPointerSize);
27474+ memcpy(process->current_state->secondaryColorPointer + offset,
27475+ (void *) args[5], bytes_size);
27476+ // fprintf(stderr, "glSecondaryColorPointer_fake_func bytes_size
27477+ // = %d\n", bytes_size);
27478+ ptr_func_glSecondaryColorPointer(size, type, stride,
27479+ process->current_state->
27480+ secondaryColorPointer);
27481+
27482+ break;
27483+ }
27484+
27485+ case glPushClientAttrib_func:
27486+ {
27487+ int mask = args[0];
27488+
27489+ if (process->current_state->clientStateSp <
27490+ MAX_CLIENT_STATE_STACK_SIZE) {
27491+ process->current_state->clientStateStack[process->
27492+ current_state->
27493+ clientStateSp].mask =
27494+ mask;
27495+ if (mask & GL_CLIENT_VERTEX_ARRAY_BIT) {
27496+ process->current_state->clientStateStack[process->
27497+ current_state->
27498+ clientStateSp].
27499+ activeTextureIndex =
27500+ process->current_state->activeTextureIndex;
27501+ }
27502+ process->current_state->clientStateSp++;
27503+ }
27504+ glPushClientAttrib(mask);
27505+ break;
27506+ }
27507+
27508+ case glPopClientAttrib_func:
27509+ {
27510+ if (process->current_state->clientStateSp > 0) {
27511+ process->current_state->clientStateSp--;
27512+ if (process->current_state->
27513+ clientStateStack[process->current_state->clientStateSp].
27514+ mask & GL_CLIENT_VERTEX_ARRAY_BIT) {
27515+ process->current_state->activeTextureIndex =
27516+ process->current_state->clientStateStack[process->
27517+ current_state->
27518+ clientStateSp].
27519+ activeTextureIndex;
27520+ }
27521+ }
27522+ glPopClientAttrib();
27523+ break;
27524+ }
27525+
27526+ case glClientActiveTexture_func:
27527+ case glClientActiveTextureARB_func:
27528+ {
27529+ int activeTexture = args[0];
27530+
27531+ process->current_state->activeTextureIndex =
27532+ activeTexture - GL_TEXTURE0_ARB;
27533+ do_glClientActiveTextureARB(activeTexture);
27534+ break;
27535+ }
27536+
27537+ case glTexCoordPointer_fake_func:
27538+ {
27539+ int offset = args[0];
27540+ int index = args[1];
27541+ int size = args[2];
27542+ int type = args[3];
27543+ int stride = args[4];
27544+ int bytes_size = args[5];
27545+
27546+ process->current_state->texCoordPointerSize[index] =
27547+ MAX(process->current_state->texCoordPointerSize[index],
27548+ offset + bytes_size);
27549+ process->current_state->texCoordPointer[index] =
27550+ realloc(process->current_state->texCoordPointer[index],
27551+ process->current_state->texCoordPointerSize[index]);
27552+ memcpy(process->current_state->texCoordPointer[index] + offset,
27553+ (void *) args[6], bytes_size);
27554+ /* fprintf(stderr, "glTexCoordPointer_fake_func size=%d, type=%d,
27555+ * stride=%d, byte_size=%d\n", size, type, stride, bytes_size); */
27556+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + index);
27557+ glTexCoordPointer(size, type, stride,
27558+ process->current_state->texCoordPointer[index]);
27559+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27560+ process->current_state->
27561+ activeTextureIndex);
27562+ break;
27563+ }
27564+
27565+ case glWeightPointerARB_fake_func:
27566+ {
27567+ GET_EXT_PTR(void, glWeightPointerARB, (int, int, int, void *));
27568+ int offset = args[0];
27569+ int size = args[1];
27570+ int type = args[2];
27571+ int stride = args[3];
27572+ int bytes_size = args[4];
27573+
27574+ process->current_state->weightPointerSize =
27575+ MAX(process->current_state->weightPointerSize,
27576+ offset + bytes_size);
27577+ process->current_state->weightPointer =
27578+ realloc(process->current_state->weightPointer,
27579+ process->current_state->weightPointerSize);
27580+ memcpy(process->current_state->weightPointer + offset,
27581+ (void *) args[5], bytes_size);
27582+ /* fprintf(stderr, "glWeightPointerARB_fake_func size=%d,
27583+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27584+ * bytes_size); */
27585+ ptr_func_glWeightPointerARB(size, type, stride,
27586+ process->current_state->
27587+ weightPointer);
27588+ break;
27589+ }
27590+
27591+ case glMatrixIndexPointerARB_fake_func:
27592+ {
27593+ GET_EXT_PTR(void, glMatrixIndexPointerARB,
27594+ (int, int, int, void *));
27595+ int offset = args[0];
27596+ int size = args[1];
27597+ int type = args[2];
27598+ int stride = args[3];
27599+ int bytes_size = args[4];
27600+
27601+ process->current_state->matrixIndexPointerSize =
27602+ MAX(process->current_state->matrixIndexPointerSize,
27603+ offset + bytes_size);
27604+ process->current_state->matrixIndexPointer =
27605+ realloc(process->current_state->matrixIndexPointer,
27606+ process->current_state->matrixIndexPointerSize);
27607+ memcpy(process->current_state->matrixIndexPointer + offset,
27608+ (void *) args[5], bytes_size);
27609+ /* fprintf(stderr, "glMatrixIndexPointerARB_fake_func size=%d,
27610+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27611+ * bytes_size); */
27612+ ptr_func_glMatrixIndexPointerARB(size, type, stride,
27613+ process->current_state->
27614+ matrixIndexPointer);
27615+ break;
27616+ }
27617+
27618+ case glFogCoordPointer_fake_func:
27619+ {
27620+ GET_EXT_PTR(void, glFogCoordPointer, (int, int, void *));
27621+ int offset = args[0];
27622+ int type = args[1];
27623+ int stride = args[2];
27624+ int bytes_size = args[3];
27625+
27626+ process->current_state->fogCoordPointerSize =
27627+ MAX(process->current_state->fogCoordPointerSize,
27628+ offset + bytes_size);
27629+ process->current_state->fogCoordPointer =
27630+ realloc(process->current_state->fogCoordPointer,
27631+ process->current_state->fogCoordPointerSize);
27632+ memcpy(process->current_state->fogCoordPointer + offset,
27633+ (void *) args[4], bytes_size);
27634+ // fprintf(stderr, "glFogCoordPointer_fake_func type=%d,
27635+ // stride=%d, byte_size=%d\n", type, stride, bytes_size);
27636+ ptr_func_glFogCoordPointer(type, stride,
27637+ process->current_state->
27638+ fogCoordPointer);
27639+ break;
27640+ }
27641+
27642+ case glVariantPointerEXT_fake_func:
27643+ {
27644+ GET_EXT_PTR(void, glVariantPointerEXT, (int, int, int, void *));
27645+ int offset = args[0];
27646+ int id = args[1];
27647+ int type = args[2];
27648+ int stride = args[3];
27649+ int bytes_size = args[4];
27650+
27651+ process->current_state->variantPointerEXTSize[id] =
27652+ MAX(process->current_state->variantPointerEXTSize[id],
27653+ offset + bytes_size);
27654+ process->current_state->variantPointerEXT[id] =
27655+ realloc(process->current_state->variantPointerEXT[id],
27656+ process->current_state->variantPointerEXTSize[id]);
27657+ memcpy(process->current_state->variantPointerEXT[id] + offset,
27658+ (void *) args[5], bytes_size);
27659+ // fprintf(stderr, "glVariantPointerEXT_fake_func[%d] type=%d,
27660+ // stride=%d, byte_size=%d\n", id, type, stride, bytes_size);
27661+ ptr_func_glVariantPointerEXT(id, type, stride,
27662+ process->current_state->
27663+ variantPointerEXT[id]);
27664+ break;
27665+ }
27666+
27667+ case glInterleavedArrays_fake_func:
27668+ {
27669+ GET_EXT_PTR(void, glInterleavedArrays, (int, int, void *));
27670+ int offset = args[0];
27671+ int format = args[1];
27672+ int stride = args[2];
27673+ int bytes_size = args[3];
27674+
27675+ process->current_state->interleavedArraysSize =
27676+ MAX(process->current_state->interleavedArraysSize,
27677+ offset + bytes_size);
27678+ process->current_state->interleavedArrays =
27679+ realloc(process->current_state->interleavedArrays,
27680+ process->current_state->interleavedArraysSize);
27681+ memcpy(process->current_state->interleavedArrays + offset,
27682+ (void *) args[4], bytes_size);
27683+ // fprintf(stderr, "glInterleavedArrays_fake_func format=%d,
27684+ // stride=%d, byte_size=%d\n", format, stride, bytes_size);
27685+ ptr_func_glInterleavedArrays(format, stride,
27686+ process->current_state->
27687+ interleavedArrays);
27688+ break;
27689+ }
27690+
27691+ case glElementPointerATI_fake_func:
27692+ {
27693+ GET_EXT_PTR(void, glElementPointerATI, (int, void *));
27694+ int type = args[0];
27695+ int bytes_size = args[1];
27696+
27697+ process->current_state->elementPointerATISize = bytes_size;
27698+ process->current_state->elementPointerATI =
27699+ realloc(process->current_state->elementPointerATI,
27700+ process->current_state->elementPointerATISize);
27701+ memcpy(process->current_state->elementPointerATI,
27702+ (void *) args[2], bytes_size);
27703+ // fprintf(stderr, "glElementPointerATI_fake_func type=%d,
27704+ // byte_size=%d\n", type, bytes_size);
27705+ ptr_func_glElementPointerATI(type,
27706+ process->current_state->
27707+ elementPointerATI);
27708+ break;
27709+ }
27710+
27711+ case glTexCoordPointer01_fake_func:
27712+ {
27713+ int size = args[0];
27714+ int type = args[1];
27715+ int stride = args[2];
27716+ int bytes_size = args[3];
27717+
27718+ process->current_state->texCoordPointerSize[0] = bytes_size;
27719+ process->current_state->texCoordPointer[0] =
27720+ realloc(process->current_state->texCoordPointer[0],
27721+ bytes_size);
27722+ memcpy(process->current_state->texCoordPointer[0],
27723+ (void *) args[4], bytes_size);
27724+ /* fprintf(stderr, "glTexCoordPointer01_fake_func size=%d,
27725+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27726+ * bytes_size); */
27727+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27728+ glTexCoordPointer(size, type, stride,
27729+ process->current_state->texCoordPointer[0]);
27730+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
27731+ glTexCoordPointer(size, type, stride,
27732+ process->current_state->texCoordPointer[0]);
27733+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27734+ process->current_state->
27735+ activeTextureIndex);
27736+ break;
27737+ }
27738+
27739+ case glTexCoordPointer012_fake_func:
27740+ {
27741+ int size = args[0];
27742+ int type = args[1];
27743+ int stride = args[2];
27744+ int bytes_size = args[3];
27745+
27746+ process->current_state->texCoordPointerSize[0] = bytes_size;
27747+ process->current_state->texCoordPointer[0] =
27748+ realloc(process->current_state->texCoordPointer[0],
27749+ bytes_size);
27750+ memcpy(process->current_state->texCoordPointer[0],
27751+ (void *) args[4], bytes_size);
27752+ /* fprintf(stderr, "glTexCoordPointer012_fake_func size=%d,
27753+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27754+ * bytes_size); */
27755+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27756+ glTexCoordPointer(size, type, stride,
27757+ process->current_state->texCoordPointer[0]);
27758+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
27759+ glTexCoordPointer(size, type, stride,
27760+ process->current_state->texCoordPointer[0]);
27761+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
27762+ glTexCoordPointer(size, type, stride,
27763+ process->current_state->texCoordPointer[0]);
27764+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27765+ process->current_state->
27766+ activeTextureIndex);
27767+ break;
27768+ }
27769+
27770+ case glVertexAndNormalPointer_fake_func:
27771+ {
27772+ int vertexPointerSize = args[0];
27773+ int vertexPointerType = args[1];
27774+ int vertexPointerStride = args[2];
27775+ int normalPointerType = args[3];
27776+ int normalPointerStride = args[4];
27777+ int bytes_size = args[5];
27778+ void *ptr = (void *) args[6];
27779+
27780+ process->current_state->vertexPointerSize = bytes_size;
27781+ process->current_state->vertexPointer =
27782+ realloc(process->current_state->vertexPointer, bytes_size);
27783+ memcpy(process->current_state->vertexPointer, ptr, bytes_size);
27784+ glVertexPointer(vertexPointerSize, vertexPointerType,
27785+ vertexPointerStride,
27786+ process->current_state->vertexPointer);
27787+ glNormalPointer(normalPointerType, normalPointerStride,
27788+ process->current_state->vertexPointer);
27789+ break;
27790+ }
27791+
27792+ case glVertexNormalPointerInterlaced_fake_func:
27793+ {
27794+ int i = 0;
27795+ int offset = args[i++];
27796+ int vertexPointerSize = args[i++];
27797+ int vertexPointerType = args[i++];
27798+ int stride = args[i++];
27799+ int normalPointerOffset = args[i++];
27800+ int normalPointerType = args[i++];
27801+ int bytes_size = args[i++];
27802+ void *ptr = (void *) args[i++];
27803+
27804+ process->current_state->vertexPointerSize =
27805+ MAX(process->current_state->vertexPointerSize,
27806+ offset + bytes_size);
27807+ process->current_state->vertexPointer =
27808+ realloc(process->current_state->vertexPointer,
27809+ process->current_state->vertexPointerSize);
27810+ memcpy(process->current_state->vertexPointer + offset, ptr,
27811+ bytes_size);
27812+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27813+ process->current_state->vertexPointer);
27814+ glNormalPointer(normalPointerType, stride,
27815+ process->current_state->vertexPointer +
27816+ normalPointerOffset);
27817+ break;
27818+ }
27819+
27820+ case glTuxRacerDrawElements_fake_func:
27821+ {
27822+ int mode = args[0];
27823+ int count = args[1];
27824+ int isColorEnabled = args[2];
27825+ void *ptr = (void *) args[3];
27826+ int stride =
27827+ 6 * sizeof(float) +
27828+ ((isColorEnabled) ? 4 * sizeof(unsigned char) : 0);
27829+ glVertexPointer(3, GL_FLOAT, stride, ptr);
27830+ glNormalPointer(GL_FLOAT, stride, ptr + 3 * sizeof(float));
27831+ if (isColorEnabled)
27832+ glColorPointer(4, GL_UNSIGNED_BYTE, stride,
27833+ ptr + 6 * sizeof(float));
27834+ glDrawArrays(mode, 0, count);
27835+ break;
27836+ }
27837+
27838+ case glVertexNormalColorPointerInterlaced_fake_func:
27839+ {
27840+ int i = 0;
27841+ int offset = args[i++];
27842+ int vertexPointerSize = args[i++];
27843+ int vertexPointerType = args[i++];
27844+ int stride = args[i++];
27845+ int normalPointerOffset = args[i++];
27846+ int normalPointerType = args[i++];
27847+ int colorPointerOffset = args[i++];
27848+ int colorPointerSize = args[i++];
27849+ int colorPointerType = args[i++];
27850+ int bytes_size = args[i++];
27851+ void *ptr = (void *) args[i++];
27852+
27853+ process->current_state->vertexPointerSize =
27854+ MAX(process->current_state->vertexPointerSize,
27855+ offset + bytes_size);
27856+ process->current_state->vertexPointer =
27857+ realloc(process->current_state->vertexPointer,
27858+ process->current_state->vertexPointerSize);
27859+ memcpy(process->current_state->vertexPointer + offset, ptr,
27860+ bytes_size);
27861+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27862+ process->current_state->vertexPointer);
27863+ glNormalPointer(normalPointerType, stride,
27864+ process->current_state->vertexPointer +
27865+ normalPointerOffset);
27866+ glColorPointer(colorPointerSize, colorPointerType, stride,
27867+ process->current_state->vertexPointer +
27868+ colorPointerOffset);
27869+ break;
27870+ }
27871+
27872+ case glVertexColorTexCoord0PointerInterlaced_fake_func:
27873+ {
27874+ int i = 0;
27875+ int offset = args[i++];
27876+ int vertexPointerSize = args[i++];
27877+ int vertexPointerType = args[i++];
27878+ int stride = args[i++];
27879+ int colorPointerOffset = args[i++];
27880+ int colorPointerSize = args[i++];
27881+ int colorPointerType = args[i++];
27882+ int texCoord0PointerOffset = args[i++];
27883+ int texCoord0PointerSize = args[i++];
27884+ int texCoord0PointerType = args[i++];
27885+ int bytes_size = args[i++];
27886+ void *ptr = (void *) args[i++];
27887+
27888+ process->current_state->vertexPointerSize =
27889+ MAX(process->current_state->vertexPointerSize,
27890+ offset + bytes_size);
27891+ process->current_state->vertexPointer =
27892+ realloc(process->current_state->vertexPointer,
27893+ process->current_state->vertexPointerSize);
27894+ memcpy(process->current_state->vertexPointer + offset, ptr,
27895+ bytes_size);
27896+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27897+ process->current_state->vertexPointer);
27898+ glColorPointer(colorPointerSize, colorPointerType, stride,
27899+ process->current_state->vertexPointer +
27900+ colorPointerOffset);
27901+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27902+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
27903+ stride,
27904+ process->current_state->vertexPointer +
27905+ texCoord0PointerOffset);
27906+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27907+ process->current_state->
27908+ activeTextureIndex);
27909+ break;
27910+ }
27911+
27912+ case glVertexNormalTexCoord0PointerInterlaced_fake_func:
27913+ {
27914+ int i = 0;
27915+ int offset = args[i++];
27916+ int vertexPointerSize = args[i++];
27917+ int vertexPointerType = args[i++];
27918+ int stride = args[i++];
27919+ int normalPointerOffset = args[i++];
27920+ int normalPointerType = args[i++];
27921+ int texCoord0PointerOffset = args[i++];
27922+ int texCoord0PointerSize = args[i++];
27923+ int texCoord0PointerType = args[i++];
27924+ int bytes_size = args[i++];
27925+ void *ptr = (void *) args[i++];
27926+
27927+ process->current_state->vertexPointerSize =
27928+ MAX(process->current_state->vertexPointerSize,
27929+ offset + bytes_size);
27930+ process->current_state->vertexPointer =
27931+ realloc(process->current_state->vertexPointer,
27932+ process->current_state->vertexPointerSize);
27933+ memcpy(process->current_state->vertexPointer + offset, ptr,
27934+ bytes_size);
27935+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27936+ process->current_state->vertexPointer);
27937+ glNormalPointer(normalPointerType, stride,
27938+ process->current_state->vertexPointer +
27939+ normalPointerOffset);
27940+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27941+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
27942+ stride,
27943+ process->current_state->vertexPointer +
27944+ texCoord0PointerOffset);
27945+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27946+ process->current_state->
27947+ activeTextureIndex);
27948+ break;
27949+ }
27950+
27951+ case glVertexNormalTexCoord01PointerInterlaced_fake_func:
27952+ {
27953+ int i = 0;
27954+ int offset = args[i++];
27955+ int vertexPointerSize = args[i++];
27956+ int vertexPointerType = args[i++];
27957+ int stride = args[i++];
27958+ int normalPointerOffset = args[i++];
27959+ int normalPointerType = args[i++];
27960+ int texCoord0PointerOffset = args[i++];
27961+ int texCoord0PointerSize = args[i++];
27962+ int texCoord0PointerType = args[i++];
27963+ int texCoord1PointerOffset = args[i++];
27964+ int texCoord1PointerSize = args[i++];
27965+ int texCoord1PointerType = args[i++];
27966+ int bytes_size = args[i++];
27967+ void *ptr = (void *) args[i++];
27968+
27969+ process->current_state->vertexPointerSize =
27970+ MAX(process->current_state->vertexPointerSize,
27971+ offset + bytes_size);
27972+ process->current_state->vertexPointer =
27973+ realloc(process->current_state->vertexPointer,
27974+ process->current_state->vertexPointerSize);
27975+ memcpy(process->current_state->vertexPointer + offset, ptr,
27976+ bytes_size);
27977+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27978+ process->current_state->vertexPointer);
27979+ glNormalPointer(normalPointerType, stride,
27980+ process->current_state->vertexPointer +
27981+ normalPointerOffset);
27982+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27983+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
27984+ stride,
27985+ process->current_state->vertexPointer +
27986+ texCoord0PointerOffset);
27987+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
27988+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
27989+ stride,
27990+ process->current_state->vertexPointer +
27991+ texCoord1PointerOffset);
27992+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27993+ process->current_state->
27994+ activeTextureIndex);
27995+ break;
27996+ }
27997+
27998+ case glVertexNormalTexCoord012PointerInterlaced_fake_func:
27999+ {
28000+ int i = 0;
28001+ int offset = args[i++];
28002+ int vertexPointerSize = args[i++];
28003+ int vertexPointerType = args[i++];
28004+ int stride = args[i++];
28005+ int normalPointerOffset = args[i++];
28006+ int normalPointerType = args[i++];
28007+ int texCoord0PointerOffset = args[i++];
28008+ int texCoord0PointerSize = args[i++];
28009+ int texCoord0PointerType = args[i++];
28010+ int texCoord1PointerOffset = args[i++];
28011+ int texCoord1PointerSize = args[i++];
28012+ int texCoord1PointerType = args[i++];
28013+ int texCoord2PointerOffset = args[i++];
28014+ int texCoord2PointerSize = args[i++];
28015+ int texCoord2PointerType = args[i++];
28016+ int bytes_size = args[i++];
28017+ void *ptr = (void *) args[i++];
28018+
28019+ process->current_state->vertexPointerSize =
28020+ MAX(process->current_state->vertexPointerSize,
28021+ offset + bytes_size);
28022+ process->current_state->vertexPointer =
28023+ realloc(process->current_state->vertexPointer,
28024+ process->current_state->vertexPointerSize);
28025+ memcpy(process->current_state->vertexPointer + offset, ptr,
28026+ bytes_size);
28027+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28028+ process->current_state->vertexPointer);
28029+ glNormalPointer(normalPointerType, stride,
28030+ process->current_state->vertexPointer +
28031+ normalPointerOffset);
28032+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28033+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28034+ stride,
28035+ process->current_state->vertexPointer +
28036+ texCoord0PointerOffset);
28037+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
28038+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
28039+ stride,
28040+ process->current_state->vertexPointer +
28041+ texCoord1PointerOffset);
28042+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
28043+ glTexCoordPointer(texCoord2PointerSize, texCoord2PointerType,
28044+ stride,
28045+ process->current_state->vertexPointer +
28046+ texCoord2PointerOffset);
28047+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28048+ process->current_state->
28049+ activeTextureIndex);
28050+ break;
28051+ }
28052+
28053+ case glVertexNormalColorTexCoord0PointerInterlaced_fake_func:
28054+ {
28055+ int i = 0;
28056+ int offset = args[i++];
28057+ int vertexPointerSize = args[i++];
28058+ int vertexPointerType = args[i++];
28059+ int stride = args[i++];
28060+ int normalPointerOffset = args[i++];
28061+ int normalPointerType = args[i++];
28062+ int colorPointerOffset = args[i++];
28063+ int colorPointerSize = args[i++];
28064+ int colorPointerType = args[i++];
28065+ int texCoord0PointerOffset = args[i++];
28066+ int texCoord0PointerSize = args[i++];
28067+ int texCoord0PointerType = args[i++];
28068+ int bytes_size = args[i++];
28069+ void *ptr = (void *) args[i++];
28070+
28071+ process->current_state->vertexPointerSize =
28072+ MAX(process->current_state->vertexPointerSize,
28073+ offset + bytes_size);
28074+ process->current_state->vertexPointer =
28075+ realloc(process->current_state->vertexPointer,
28076+ process->current_state->vertexPointerSize);
28077+ memcpy(process->current_state->vertexPointer + offset, ptr,
28078+ bytes_size);
28079+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28080+ process->current_state->vertexPointer);
28081+ glNormalPointer(normalPointerType, stride,
28082+ process->current_state->vertexPointer +
28083+ normalPointerOffset);
28084+ glColorPointer(colorPointerSize, colorPointerType, stride,
28085+ process->current_state->vertexPointer +
28086+ colorPointerOffset);
28087+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28088+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28089+ stride,
28090+ process->current_state->vertexPointer +
28091+ texCoord0PointerOffset);
28092+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28093+ process->current_state->
28094+ activeTextureIndex);
28095+ break;
28096+ }
28097+
28098+ case glVertexNormalColorTexCoord01PointerInterlaced_fake_func:
28099+ {
28100+ int i = 0;
28101+ int offset = args[i++];
28102+ int vertexPointerSize = args[i++];
28103+ int vertexPointerType = args[i++];
28104+ int stride = args[i++];
28105+ int normalPointerOffset = args[i++];
28106+ int normalPointerType = args[i++];
28107+ int colorPointerOffset = args[i++];
28108+ int colorPointerSize = args[i++];
28109+ int colorPointerType = args[i++];
28110+ int texCoord0PointerOffset = args[i++];
28111+ int texCoord0PointerSize = args[i++];
28112+ int texCoord0PointerType = args[i++];
28113+ int texCoord1PointerOffset = args[i++];
28114+ int texCoord1PointerSize = args[i++];
28115+ int texCoord1PointerType = args[i++];
28116+ int bytes_size = args[i++];
28117+ void *ptr = (void *) args[i++];
28118+
28119+ process->current_state->vertexPointerSize =
28120+ MAX(process->current_state->vertexPointerSize,
28121+ offset + bytes_size);
28122+ process->current_state->vertexPointer =
28123+ realloc(process->current_state->vertexPointer,
28124+ process->current_state->vertexPointerSize);
28125+ memcpy(process->current_state->vertexPointer + offset, ptr,
28126+ bytes_size);
28127+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28128+ process->current_state->vertexPointer);
28129+ glNormalPointer(normalPointerType, stride,
28130+ process->current_state->vertexPointer +
28131+ normalPointerOffset);
28132+ glColorPointer(colorPointerSize, colorPointerType, stride,
28133+ process->current_state->vertexPointer +
28134+ colorPointerOffset);
28135+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28136+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28137+ stride,
28138+ process->current_state->vertexPointer +
28139+ texCoord0PointerOffset);
28140+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
28141+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
28142+ stride,
28143+ process->current_state->vertexPointer +
28144+ texCoord1PointerOffset);
28145+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28146+ process->current_state->
28147+ activeTextureIndex);
28148+ break;
28149+ }
28150+
28151+ case glVertexNormalColorTexCoord012PointerInterlaced_fake_func:
28152+ {
28153+ int i = 0;
28154+ int offset = args[i++];
28155+ int vertexPointerSize = args[i++];
28156+ int vertexPointerType = args[i++];
28157+ int stride = args[i++];
28158+ int normalPointerOffset = args[i++];
28159+ int normalPointerType = args[i++];
28160+ int colorPointerOffset = args[i++];
28161+ int colorPointerSize = args[i++];
28162+ int colorPointerType = args[i++];
28163+ int texCoord0PointerOffset = args[i++];
28164+ int texCoord0PointerSize = args[i++];
28165+ int texCoord0PointerType = args[i++];
28166+ int texCoord1PointerOffset = args[i++];
28167+ int texCoord1PointerSize = args[i++];
28168+ int texCoord1PointerType = args[i++];
28169+ int texCoord2PointerOffset = args[i++];
28170+ int texCoord2PointerSize = args[i++];
28171+ int texCoord2PointerType = args[i++];
28172+ int bytes_size = args[i++];
28173+ void *ptr = (void *) args[i++];
28174+
28175+ process->current_state->vertexPointerSize =
28176+ MAX(process->current_state->vertexPointerSize,
28177+ offset + bytes_size);
28178+ process->current_state->vertexPointer =
28179+ realloc(process->current_state->vertexPointer,
28180+ process->current_state->vertexPointerSize);
28181+ memcpy(process->current_state->vertexPointer + offset, ptr,
28182+ bytes_size);
28183+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28184+ process->current_state->vertexPointer);
28185+ glNormalPointer(normalPointerType, stride,
28186+ process->current_state->vertexPointer +
28187+ normalPointerOffset);
28188+ glColorPointer(colorPointerSize, colorPointerType, stride,
28189+ process->current_state->vertexPointer +
28190+ colorPointerOffset);
28191+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28192+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28193+ stride,
28194+ process->current_state->vertexPointer +
28195+ texCoord0PointerOffset);
28196+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
28197+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
28198+ stride,
28199+ process->current_state->vertexPointer +
28200+ texCoord1PointerOffset);
28201+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
28202+ glTexCoordPointer(texCoord2PointerSize, texCoord2PointerType,
28203+ stride,
28204+ process->current_state->vertexPointer +
28205+ texCoord2PointerOffset);
28206+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28207+ process->current_state->
28208+ activeTextureIndex);
28209+ break;
28210+ }
28211+
28212+ case _glVertexPointer_buffer_func:
28213+ {
28214+ glVertexPointer(args[0], args[1], args[2], (void *) args[3]);
28215+ break;
28216+ }
28217+
28218+ case _glNormalPointer_buffer_func:
28219+ {
28220+ glNormalPointer(args[0], args[1], (void *) args[2]);
28221+ break;
28222+ }
28223+
28224+ case _glColorPointer_buffer_func:
28225+ {
28226+ glColorPointer(args[0], args[1], args[2], (void *) args[3]);
28227+ break;
28228+ }
28229+
28230+ case _glSecondaryColorPointer_buffer_func:
28231+ {
28232+ GET_EXT_PTR(void, glSecondaryColorPointer,
28233+ (int, int, int, void *));
28234+ ptr_func_glSecondaryColorPointer(args[0], args[1], args[2],
28235+ (void *) args[3]);
28236+ break;
28237+ }
28238+
28239+ case _glIndexPointer_buffer_func:
28240+ {
28241+ glIndexPointer(args[0], args[1], (void *) args[2]);
28242+ break;
28243+ }
28244+
28245+ case _glTexCoordPointer_buffer_func:
28246+ {
28247+ glTexCoordPointer(args[0], args[1], args[2], (void *) args[3]);
28248+ break;
28249+ }
28250+
28251+ case _glEdgeFlagPointer_buffer_func:
28252+ {
28253+ glEdgeFlagPointer(args[0], (void *) args[1]);
28254+ break;
28255+ }
28256+
28257+ case _glVertexAttribPointerARB_buffer_func:
28258+ {
28259+ GET_EXT_PTR(void, glVertexAttribPointerARB,
28260+ (int, int, int, int, int, void *));
28261+ ptr_func_glVertexAttribPointerARB(args[0], args[1], args[2],
28262+ args[3], args[4],
28263+ (void *) args[5]);
28264+ break;
28265+ }
28266+
28267+ case _glWeightPointerARB_buffer_func:
28268+ {
28269+ GET_EXT_PTR(void, glWeightPointerARB, (int, int, int, void *));
28270+
28271+ ptr_func_glWeightPointerARB(args[0], args[1], args[2],
28272+ (void *) args[3]);
28273+ break;
28274+ }
28275+
28276+ case _glMatrixIndexPointerARB_buffer_func:
28277+ {
28278+ GET_EXT_PTR(void, glMatrixIndexPointerARB,
28279+ (int, int, int, void *));
28280+ ptr_func_glMatrixIndexPointerARB(args[0], args[1], args[2],
28281+ (void *) args[3]);
28282+ break;
28283+ }
28284+
28285+ case _glFogCoordPointer_buffer_func:
28286+ {
28287+ GET_EXT_PTR(void, glFogCoordPointer, (int, int, void *));
28288+
28289+ ptr_func_glFogCoordPointer(args[0], args[1], (void *) args[2]);
28290+ break;
28291+ }
28292+
28293+ case _glVariantPointerEXT_buffer_func:
28294+ {
28295+ GET_EXT_PTR(void, glVariantPointerEXT, (int, int, int, void *));
28296+
28297+ ptr_func_glVariantPointerEXT(args[0], args[1], args[2],
28298+ (void *) args[3]);
28299+ break;
28300+ }
28301+
28302+ case _glDrawElements_buffer_func:
28303+ {
28304+ glDrawElements(args[0], args[1], args[2], (void *) args[3]);
28305+ break;
28306+ }
28307+
28308+ case _glDrawRangeElements_buffer_func:
28309+ {
28310+ glDrawRangeElements(args[0], args[1], args[2], args[3], args[4],
28311+ (void *) args[5]);
28312+ break;
28313+ }
28314+
28315+ case _glMultiDrawElements_buffer_func:
28316+ {
28317+ GET_EXT_PTR(void, glMultiDrawElements,
28318+ (int, int *, int, void **, int));
28319+ ptr_func_glMultiDrawElements(args[0], (int *) args[1], args[2],
28320+ (void **) args[3], args[4]);
28321+ break;
28322+ }
28323+
28324+ case _glGetError_fake_func:
28325+ {
28326+ break;
28327+ }
28328+
28329+ case glGetIntegerv_func:
28330+ {
28331+ glGetIntegerv(args[0], (int *) args[1]);
28332+ fprintf(stderr, "glGetIntegerv(%x)=%d\n", (int) args[0],
28333+ *(int *) args[1]);
28334+ break;
28335+ }
28336+
28337+ case _glReadPixels_pbo_func:
28338+ {
28339+ glReadPixels(ARG_TO_INT(args[0]), ARG_TO_INT(args[1]),
28340+ ARG_TO_INT(args[2]), ARG_TO_INT(args[3]),
28341+ ARG_TO_UNSIGNED_INT(args[4]),
28342+ ARG_TO_UNSIGNED_INT(args[5]), (void *) (args[6]));
28343+ break;
28344+ }
28345+
28346+ case _glDrawPixels_pbo_func:
28347+ {
28348+ glDrawPixels(ARG_TO_INT(args[0]), ARG_TO_INT(args[1]),
28349+ ARG_TO_UNSIGNED_INT(args[2]),
28350+ ARG_TO_UNSIGNED_INT(args[3]),
28351+ (const void *) (args[4]));
28352+ break;
28353+ }
28354+
28355+ case _glMapBufferARB_fake_func:
28356+ {
28357+ GET_EXT_PTR(GLvoid *, glMapBufferARB, (GLenum, GLenum));
28358+ GET_EXT_PTR(GLboolean, glUnmapBufferARB, (GLenum));
28359+ int target = args[0];
28360+ int size = args[1];
28361+ void *dst_ptr = (void *) args[2];
28362+ void *src_ptr = ptr_func_glMapBufferARB(target, GL_READ_ONLY);
28363+
28364+ if (src_ptr) {
28365+ memcpy(dst_ptr, src_ptr, size);
28366+ ret_int = ptr_func_glUnmapBufferARB(target);
28367+ } else {
28368+ ret_int = 0;
28369+ }
28370+ break;
28371+ }
28372+
28373+ case fake_gluBuild2DMipmaps_func:
28374+ {
28375+ GET_GLU_PTR(GLint, gluBuild2DMipmaps,
28376+ (GLenum arg_0, GLint arg_1, GLsizei arg_2,
28377+ GLsizei arg_3, GLenum arg_4, GLenum arg_5,
28378+ const GLvoid *arg_6));
28379+ if (ptr_func_gluBuild2DMipmaps == NULL)
28380+ ptr_func_gluBuild2DMipmaps = mesa_gluBuild2DMipmaps;
28381+ ptr_func_gluBuild2DMipmaps(ARG_TO_UNSIGNED_INT(args[0]),
28382+ ARG_TO_INT(args[1]),
28383+ ARG_TO_INT(args[2]),
28384+ ARG_TO_INT(args[3]),
28385+ ARG_TO_UNSIGNED_INT(args[4]),
28386+ ARG_TO_UNSIGNED_INT(args[5]),
28387+ (const void *) (args[6]));
28388+ break;
28389+ }
28390+
28391+ case _glSelectBuffer_fake_func:
28392+ {
28393+ process->current_state->selectBufferSize = args[0] * 4;
28394+ process->current_state->selectBufferPtr =
28395+ realloc(process->current_state->selectBufferPtr,
28396+ process->current_state->selectBufferSize);
28397+ glSelectBuffer(args[0], process->current_state->selectBufferPtr);
28398+ break;
28399+ }
28400+
28401+ case _glGetSelectBuffer_fake_func:
28402+ {
28403+ void *ptr = (void *) args[0];
28404+
28405+ memcpy(ptr, process->current_state->selectBufferPtr,
28406+ process->current_state->selectBufferSize);
28407+ break;
28408+ }
28409+
28410+ case _glFeedbackBuffer_fake_func:
28411+ {
28412+ process->current_state->feedbackBufferSize = args[0] * 4;
28413+ process->current_state->feedbackBufferPtr =
28414+ realloc(process->current_state->feedbackBufferPtr,
28415+ process->current_state->feedbackBufferSize);
28416+ glFeedbackBuffer(args[0], args[1],
28417+ process->current_state->feedbackBufferPtr);
28418+ break;
28419+ }
28420+
28421+ case _glGetFeedbackBuffer_fake_func:
28422+ {
28423+ void *ptr = (void *) args[0];
28424+
28425+ memcpy(ptr, process->current_state->feedbackBufferPtr,
28426+ process->current_state->feedbackBufferSize);
28427+ break;
28428+ }
28429+
28430+ /*
28431+ * case glEnableClientState_func: { if (display_function_call)
28432+ * fprintf(stderr, "cap : %s\n", nameArrays[args[0] -
28433+ * GL_VERTEX_ARRAY]); glEnableClientState(args[0]); break; }
28434+ *
28435+ * case glDisableClientState_func: { if (display_function_call)
28436+ * fprintf(stderr, "cap : %s\n", nameArrays[args[0] -
28437+ * GL_VERTEX_ARRAY]); glDisableClientState(args[0]); break; }
28438+ *
28439+ * case glClientActiveTexture_func: case
28440+ * glClientActiveTextureARB_func: { if (display_function_call)
28441+ * fprintf(stderr, "client activeTexture %d\n", args[0] -
28442+ * GL_TEXTURE0_ARB); glClientActiveTextureARB(args[0]); break; }
28443+ *
28444+ * case glActiveTextureARB_func: { if (display_function_call)
28445+ * fprintf(stderr, "server activeTexture %d\n", args[0] -
28446+ * GL_TEXTURE0_ARB); glActiveTextureARB(args[0]); break; }
28447+ *
28448+ * case glLockArraysEXT_func: break;
28449+ *
28450+ * case glUnlockArraysEXT_func: break;
28451+ *
28452+ * case glArrayElement_func: { glArrayElement(args[0]); break; }
28453+ *
28454+ * case glDrawArrays_func: { glDrawArrays(args[0],args[1],args[2]);
28455+ * break; }
28456+ *
28457+ * case glDrawElements_func: {
28458+ * glDrawElements(args[0],args[1],args[2],(void*)args[3]); break; }
28459+ *
28460+ * case glDrawRangeElements_func: {
28461+ * glDrawRangeElements(args[0],args[1],args[2],args[3],args[4],(void*)args[5]);
28462+ * break; } */
28463+
28464+ case glGetError_func:
28465+ {
28466+#ifdef SYSTEMATIC_ERROR_CHECK
28467+ ret_int = process->current_state->last_error;
28468+#else
28469+ ret_int = glGetError();
28470+#endif
28471+ break;
28472+ }
28473+
28474+ case glNewObjectBufferATI_func:
28475+ {
28476+ GET_EXT_PTR(int, glNewObjectBufferATI, (int, void *, int));
28477+
28478+ ret_int = ptr_func_glNewObjectBufferATI(args[0],
28479+ (void *) args[1], args[2]);
28480+ break;
28481+ }
28482+
28483+ case glClear_func:
28484+ /* HACK workaround for an unexplainable issue */
28485+ if (args[0] & GL_COLOR_BUFFER_BIT)
28486+ glClear(GL_COLOR_BUFFER_BIT);
28487+ if (args[0] & GL_STENCIL_BUFFER_BIT)
28488+ glClear(GL_STENCIL_BUFFER_BIT);
28489+ if (args[0] & GL_DEPTH_BUFFER_BIT)
28490+ glClear(GL_DEPTH_BUFFER_BIT);
28491+ if (args[0] & GL_ACCUM_BUFFER_BIT)
28492+ glClear(GL_ACCUM_BUFFER_BIT);
28493+ break;
28494+
28495+ default:
28496+ execute_func(func_number, args, &ret_int, &ret_char);
28497+ break;
28498+ }
28499+
28500+#ifdef SYSTEMATIC_ERROR_CHECK
28501+ if (func_number == glGetError_func) {
28502+ process->current_state->last_error = 0;
28503+ } else {
28504+ process->current_state->last_error = glGetError();
28505+ if (process->current_state->last_error != 0) {
28506+ printf("error %s 0x%x\n", tab_opengl_calls_name[func_number],
28507+ process->current_state->last_error);
28508+ }
28509+ }
28510+#endif
28511+
28512+ switch (ret_type) {
28513+ case TYPE_NONE:
28514+ break;
28515+
28516+ case TYPE_CHAR:
28517+ case TYPE_UNSIGNED_CHAR:
28518+ ret_int = ret_char;
28519+ break;
28520+
28521+ case TYPE_INT:
28522+ case TYPE_UNSIGNED_INT:
28523+ break;
28524+
28525+ case TYPE_CONST_CHAR:
28526+ {
28527+ strncpy(ret_string, (ret_str) ? ret_str : "", 32768);
28528+ break;
28529+ }
28530+
28531+ default:
28532+ fprintf(stderr, "unexpected ret type : %d\n", ret_type);
28533+ exit(-1);
28534+ break;
28535+ }
28536+
28537+ if (display_function_call)
28538+ fprintf(stderr, "[%d]< %s\n", process->instr_counter,
28539+ tab_opengl_calls_name[func_number]);
28540+
28541+ return ret_int;
28542+}
28543Index: qemu-0.14.0/target-i386/opengl_func.h
28544===================================================================
28545--- /dev/null
28546+++ qemu-0.14.0/target-i386/opengl_func.h
28547@@ -0,0 +1,1108 @@
28548+/*
28549+ * Main header for both host and guest sides
28550+ *
28551+ * Copyright (c) 2006,2007 Even Rouault
28552+ *
28553+ * Permission is hereby granted, free of charge, to any person obtaining a copy
28554+ * of this software and associated documentation files (the "Software"), to deal
28555+ * in the Software without restriction, including without limitation the rights
28556+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
28557+ * copies of the Software, and to permit persons to whom the Software is
28558+ * furnished to do so, subject to the following conditions:
28559+ *
28560+ * The above copyright notice and this permission notice shall be included in
28561+ * all copies or substantial portions of the Software.
28562+ *
28563+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28564+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28565+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
28566+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28567+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28568+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28569+ * THE SOFTWARE.
28570+ */
28571+
28572+#include "mesa_gl.h"
28573+#include "mesa_glext.h"
28574+
28575+/* Argument list are internally of a type that can hold a target pointer
28576+ * or a host pointer. */
28577+typedef target_phys_addr_t arg_t;
28578+
28579+enum {
28580+ TYPE_NONE,
28581+ TYPE_CHAR,
28582+ TYPE_UNSIGNED_CHAR,
28583+ TYPE_SHORT,
28584+ TYPE_UNSIGNED_SHORT,
28585+ TYPE_INT,
28586+ TYPE_UNSIGNED_INT,
28587+ TYPE_FLOAT,
28588+ TYPE_DOUBLE,
28589+ TYPE_1CHAR,
28590+ TYPE_2CHAR,
28591+ TYPE_3CHAR,
28592+ TYPE_4CHAR,
28593+ TYPE_128UCHAR,
28594+ TYPE_1SHORT,
28595+ TYPE_2SHORT,
28596+ TYPE_3SHORT,
28597+ TYPE_4SHORT,
28598+ TYPE_1INT,
28599+ TYPE_2INT,
28600+ TYPE_3INT,
28601+ TYPE_4INT,
28602+ TYPE_1FLOAT,
28603+ TYPE_2FLOAT,
28604+ TYPE_3FLOAT,
28605+ TYPE_4FLOAT,
28606+ TYPE_16FLOAT,
28607+ TYPE_1DOUBLE,
28608+ TYPE_2DOUBLE,
28609+ TYPE_3DOUBLE,
28610+ TYPE_4DOUBLE,
28611+ TYPE_16DOUBLE,
28612+ TYPE_OUT_1INT,
28613+ TYPE_OUT_1FLOAT,
28614+ TYPE_OUT_4CHAR,
28615+ TYPE_OUT_4INT,
28616+ TYPE_OUT_4FLOAT,
28617+ TYPE_OUT_4DOUBLE,
28618+ TYPE_OUT_128UCHAR,
28619+ TYPE_CONST_CHAR,
28620+ TYPE_ARRAY_CHAR,
28621+ TYPE_ARRAY_SHORT,
28622+ TYPE_ARRAY_INT,
28623+ TYPE_ARRAY_FLOAT,
28624+ TYPE_ARRAY_DOUBLE,
28625+ TYPE_IN_IGNORED_POINTER,
28626+ TYPE_OUT_ARRAY_CHAR,
28627+ TYPE_OUT_ARRAY_SHORT,
28628+ TYPE_OUT_ARRAY_INT,
28629+ TYPE_OUT_ARRAY_FLOAT,
28630+ TYPE_OUT_ARRAY_DOUBLE,
28631+ TYPE_NULL_TERMINATED_STRING,
28632+
28633+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28634+ TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28635+ TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28636+ TYPE_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28637+ TYPE_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28638+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28639+ TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28640+ TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28641+ TYPE_OUT_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28642+ TYPE_OUT_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28643+ /* .... */
28644+ TYPE_LAST,
28645+ /* .... */
28646+ TYPE_1UCHAR = TYPE_CHAR,
28647+ TYPE_1USHORT = TYPE_1SHORT,
28648+ TYPE_1UINT = TYPE_1INT,
28649+ TYPE_OUT_1UINT = TYPE_OUT_1INT,
28650+ TYPE_OUT_4UCHAR = TYPE_OUT_4CHAR,
28651+ TYPE_ARRAY_VOID = TYPE_ARRAY_CHAR,
28652+ TYPE_ARRAY_SIGNED_CHAR = TYPE_ARRAY_CHAR,
28653+ TYPE_ARRAY_UNSIGNED_CHAR = TYPE_ARRAY_CHAR,
28654+ TYPE_ARRAY_UNSIGNED_SHORT = TYPE_ARRAY_SHORT,
28655+ TYPE_ARRAY_UNSIGNED_INT = TYPE_ARRAY_INT,
28656+ TYPE_OUT_ARRAY_VOID = TYPE_OUT_ARRAY_CHAR,
28657+ TYPE_OUT_ARRAY_SIGNED_CHAR = TYPE_OUT_ARRAY_CHAR,
28658+ TYPE_OUT_ARRAY_UNSIGNED_CHAR = TYPE_OUT_ARRAY_CHAR,
28659+ TYPE_OUT_ARRAY_UNSIGNED_SHORT = TYPE_OUT_ARRAY_SHORT,
28660+ TYPE_OUT_ARRAY_UNSIGNED_INT = TYPE_OUT_ARRAY_INT,
28661+ TYPE_ARRAY_VOID_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28662+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28663+ TYPE_ARRAY_SIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28664+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28665+ TYPE_ARRAY_UNSIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28666+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28667+ TYPE_ARRAY_UNSIGNED_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28668+ TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28669+ TYPE_ARRAY_UNSIGNED_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28670+ TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28671+ TYPE_OUT_ARRAY_VOID_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28672+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28673+ TYPE_OUT_ARRAY_SIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28674+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28675+ TYPE_OUT_ARRAY_UNSIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28676+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28677+ TYPE_OUT_ARRAY_UNSIGNED_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28678+ TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28679+ TYPE_OUT_ARRAY_UNSIGNED_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28680+ TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28681+};
28682+
28683+#define CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS \
28684+ case TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28685+ case TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28686+ case TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28687+ case TYPE_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28688+ case TYPE_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28689+
28690+#define CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS \
28691+ case TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28692+ case TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28693+ case TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28694+ case TYPE_OUT_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28695+ case TYPE_OUT_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28696+
28697+#define CASE_IN_UNKNOWN_SIZE_POINTERS \
28698+ case TYPE_ARRAY_CHAR: \
28699+ case TYPE_ARRAY_SHORT: \
28700+ case TYPE_ARRAY_INT: \
28701+ case TYPE_ARRAY_FLOAT: \
28702+ case TYPE_ARRAY_DOUBLE
28703+
28704+#define CASE_IN_KNOWN_SIZE_POINTERS \
28705+ case TYPE_1CHAR:\
28706+ case TYPE_2CHAR:\
28707+ case TYPE_3CHAR:\
28708+ case TYPE_4CHAR:\
28709+ case TYPE_128UCHAR:\
28710+ case TYPE_1SHORT:\
28711+ case TYPE_2SHORT:\
28712+ case TYPE_3SHORT:\
28713+ case TYPE_4SHORT:\
28714+ case TYPE_1INT:\
28715+ case TYPE_2INT:\
28716+ case TYPE_3INT:\
28717+ case TYPE_4INT:\
28718+ case TYPE_1FLOAT:\
28719+ case TYPE_2FLOAT:\
28720+ case TYPE_3FLOAT:\
28721+ case TYPE_4FLOAT:\
28722+ case TYPE_16FLOAT:\
28723+ case TYPE_1DOUBLE:\
28724+ case TYPE_2DOUBLE:\
28725+ case TYPE_3DOUBLE:\
28726+ case TYPE_4DOUBLE:\
28727+ case TYPE_16DOUBLE
28728+
28729+#define CASE_OUT_UNKNOWN_SIZE_POINTERS \
28730+ case TYPE_OUT_ARRAY_CHAR: \
28731+ case TYPE_OUT_ARRAY_SHORT: \
28732+ case TYPE_OUT_ARRAY_INT: \
28733+ case TYPE_OUT_ARRAY_FLOAT: \
28734+ case TYPE_OUT_ARRAY_DOUBLE
28735+
28736+#define CASE_OUT_KNOWN_SIZE_POINTERS \
28737+ case TYPE_OUT_1INT: \
28738+ case TYPE_OUT_1FLOAT: \
28739+ case TYPE_OUT_4CHAR: \
28740+ case TYPE_OUT_4INT: \
28741+ case TYPE_OUT_4FLOAT: \
28742+ case TYPE_OUT_4DOUBLE: \
28743+ case TYPE_OUT_128UCHAR \
28744+
28745+#define CASE_IN_POINTERS CASE_IN_UNKNOWN_SIZE_POINTERS: CASE_IN_KNOWN_SIZE_POINTERS: CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28746+#define CASE_OUT_POINTERS CASE_OUT_UNKNOWN_SIZE_POINTERS: CASE_OUT_KNOWN_SIZE_POINTERS: CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28747+
28748+#define CASE_POINTERS CASE_IN_POINTERS: CASE_OUT_POINTERS
28749+#define CASE_KNOWN_SIZE_POINTERS CASE_IN_KNOWN_SIZE_POINTERS: CASE_OUT_KNOWN_SIZE_POINTERS
28750+
28751+
28752+#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)
28753+#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)
28754+#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)
28755+#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)
28756+#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)
28757+
28758+#define NB_MAX_TEXTURES 16
28759+#define MY_GL_MAX_VERTEX_ATTRIBS_ARB 16
28760+#define MY_GL_MAX_VERTEX_ATTRIBS_NV 16
28761+#define MY_GL_MAX_VARIANT_POINTER_EXT 16
28762+
28763+static int tab_args_type_length[] = {
28764+ 0,
28765+ sizeof(char),
28766+ sizeof(unsigned char),
28767+ sizeof(short),
28768+ sizeof(unsigned short),
28769+ sizeof(int),
28770+ sizeof(unsigned int),
28771+ sizeof(float),
28772+ sizeof(double),
28773+ 1 * sizeof(char),
28774+ 2 * sizeof(char),
28775+ 3 * sizeof(char),
28776+ 4 * sizeof(char),
28777+ 128 * sizeof(char),
28778+ 1 * sizeof(short),
28779+ 2 * sizeof(short),
28780+ 3 * sizeof(short),
28781+ 4 * sizeof(short),
28782+ 1 * sizeof(int),
28783+ 2 * sizeof(int),
28784+ 3 * sizeof(int),
28785+ 4 * sizeof(int),
28786+ 1 * sizeof(float),
28787+ 2 * sizeof(float),
28788+ 3 * sizeof(float),
28789+ 4 * sizeof(float),
28790+ 16 * sizeof(float),
28791+ 1 * sizeof(double),
28792+ 2 * sizeof(double),
28793+ 3 * sizeof(double),
28794+ 4 * sizeof(double),
28795+ 16 * sizeof(double),
28796+ sizeof(int),
28797+ sizeof(float),
28798+ 4 * sizeof(char),
28799+ 4 * sizeof(int),
28800+ 4 * sizeof(float),
28801+ 4 * sizeof(double),
28802+ 128 * sizeof(char),
28803+ 0,
28804+ 0,
28805+ 0,
28806+ 0,
28807+ 0,
28808+ 0,
28809+ 0,
28810+ 0,
28811+ 0,
28812+ 0,
28813+ 0,
28814+ 0,
28815+ 0,
28816+
28817+ /* the following sizes are the size of 1 element of the array */
28818+ sizeof(char),
28819+ sizeof(short),
28820+ sizeof(int),
28821+ sizeof(float),
28822+ sizeof(double),
28823+ sizeof(char),
28824+ sizeof(short),
28825+ sizeof(int),
28826+ sizeof(float),
28827+ sizeof(double),
28828+};
28829+
28830+typedef struct {
28831+ int ret_type;
28832+ int has_out_parameters;
28833+ int nb_args;
28834+ int args_type[0];
28835+} Signature;
28836+
28837+static const int _init32_signature[] =
28838+ { TYPE_NONE, 1, 2, TYPE_INT, TYPE_OUT_1INT };
28839+static const int _init64_signature[] =
28840+ { TYPE_NONE, 1, 2, TYPE_INT, TYPE_OUT_1INT };
28841+
28842+static const int _synchronize_signature[] = { TYPE_INT, 0, 0 };
28843+
28844+static const int _serialized_calls_signature[] =
28845+ { TYPE_NONE, 0, 1, TYPE_ARRAY_CHAR };
28846+
28847+static const int _exit_process_signature[] = { TYPE_NONE, 0, 0 };
28848+
28849+static const int _changeWindowState_signature[] =
28850+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
28851+
28852+static const int _moveResizeWindow_signature[] =
28853+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_4INT };
28854+
28855+static const int _send_cursor_signature[] =
28856+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT,
28857+ TYPE_INT, TYPE_INT,
28858+ TYPE_INT, TYPE_INT,
28859+ TYPE_ARRAY_INT
28860+};
28861+
28862+/* XVisualInfo* glXChooseVisual( Display *dpy, int screen, int *attribList ) */
28863+static const int glXChooseVisual_signature[] =
28864+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT };
28865+
28866+/*GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis,
28867+ GLXContext shareList, Bool direct )*/
28868+static const int glXCreateContext_signature[] =
28869+ { TYPE_INT, 0, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT };
28870+
28871+static const int glXCopyContext_signature[] =
28872+ { TYPE_NONE, 0, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28873+TYPE_INT };
28874+
28875+/* void glXDestroyContext( Display *dpy, GLXContext ctx ) */
28876+static const int glXDestroyContext_signature[] =
28877+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28878+
28879+/* Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable, GLXContext ctx) */
28880+//static const int glXMakeCurrent_signature[] = {TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT};
28881+/* making it asynchronous */
28882+static const int glXMakeCurrent_signature[] =
28883+ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
28884+
28885+/*int glXGetConfig( Display *dpy, XVisualInfo *visual,
28886+ int attrib, int *value )*/
28887+static const int glXGetConfig_signature[] =
28888+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28889+TYPE_OUT_1INT };
28890+
28891+/* "glXGetConfig_extended"(dpy, visual_id, int n, int* attribs, int* values, int* rets) */
28892+static const int glXGetConfig_extended_signature[] =
28893+ { TYPE_NONE, 1, 6, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28894+TYPE_ARRAY_INT, TYPE_OUT_ARRAY_INT, TYPE_OUT_ARRAY_INT };
28895+
28896+/* void glXSwapBuffers( Display *dpy, GLXDrawable drawable ); */
28897+static const int glXSwapBuffers_signature[] =
28898+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28899+
28900+/* Bool glXQueryVersion( Display *dpy, int *maj, int *min ) */
28901+static const int glXQueryVersion_signature[] =
28902+ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_OUT_1INT, TYPE_OUT_1INT };
28903+
28904+/* Bool glXQueryExtension( Display *dpy, int *errorBase, int *eventBase ) */
28905+static const int glXQueryExtension_signature[] =
28906+ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_OUT_1INT, TYPE_OUT_1INT };
28907+
28908+static const int glXWaitGL_signature[] = { TYPE_INT, 0, 0 };
28909+static const int glXWaitX_signature[] = { TYPE_INT, 0, 0 };
28910+
28911+/* GLX 1.1 and later */
28912+
28913+/* const char *glXGetClientString( Display *dpy, int name ) */
28914+static const int glXGetClientString_signature[] =
28915+ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28916+
28917+/*const char *glXQueryExtensionsString( Display *dpy, int screen ) */
28918+static const int glXQueryExtensionsString_signature[] =
28919+ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28920+
28921+/* const char *glXQueryServerString( Display *dpy, int screen, int name ) */
28922+static const int glXQueryServerString_signature[] =
28923+ { TYPE_CONST_CHAR, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
28924+
28925+
28926+static const int glXGetProcAddress_fake_signature[] =
28927+ { TYPE_INT, 0, 1, TYPE_NULL_TERMINATED_STRING };
28928+
28929+static const int glXGetProcAddress_global_fake_signature[] =
28930+ { TYPE_NONE, 1, 3, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_OUT_ARRAY_CHAR };
28931+
28932+
28933+/* GLX 1.3 and later */
28934+
28935+/*
28936+GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
28937+ const int *attribList, int *nitems ); */
28938+static const int glXChooseFBConfig_signature[] =
28939+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT,
28940+TYPE_OUT_1INT };
28941+
28942+static const int glXChooseFBConfigSGIX_signature[] =
28943+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT,
28944+TYPE_OUT_1INT };
28945+
28946+static const int glXGetFBConfigs_signature[] =
28947+ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_OUT_1INT };
28948+
28949+/* "glXGetFBConfigAttrib_extended"(dpy, fbconfig, int n, int* attribs, int* values, int* rets) */
28950+static const int glXGetFBConfigAttrib_extended_signature[] =
28951+ { TYPE_NONE, 1, 6, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28952+TYPE_ARRAY_INT, TYPE_OUT_ARRAY_INT, TYPE_OUT_ARRAY_INT };
28953+
28954+
28955+/* GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config,
28956+ const int *attribList ) */
28957+static const int glXCreatePbuffer_signature[] =
28958+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT };
28959+
28960+static const int glXCreateGLXPbufferSGIX_signature[] =
28961+ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
28962+TYPE_ARRAY_INT };
28963+
28964+static const int glXDestroyPbuffer_signature[] =
28965+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28966+
28967+static const int glXDestroyGLXPbufferSGIX_signature[] =
28968+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28969+
28970+/* GLXContext glXCreateNewContext(Display * dpy
28971+ GLXFBConfig config
28972+ int renderType
28973+ GLXContext ShareList
28974+ Bool Direct) */
28975+static const int glXCreateNewContext_signature[] =
28976+ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
28977+TYPE_INT };
28978+
28979+static const int glXCreateContextWithConfigSGIX_signature[] =
28980+ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
28981+TYPE_INT };
28982+
28983+/*XVisualInfo *glXGetVisualFromFBConfig( Display *dpy, GLXFBConfig config ) */
28984+static const int glXGetVisualFromFBConfig_signature[] =
28985+ { TYPE_INT, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28986+
28987+/*int glXGetFBConfigAttrib(Display *dpy, GLXFBConfig config, int attribute, int *value)*/
28988+static const int glXGetFBConfigAttrib_signature[] =
28989+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28990+TYPE_OUT_1INT };
28991+
28992+static const int glXGetFBConfigAttribSGIX_signature[] =
28993+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28994+TYPE_OUT_1INT };
28995+
28996+static const int glXQueryContext_signature[] =
28997+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28998+TYPE_OUT_1INT };
28999+
29000+static const int glXQueryGLXPbufferSGIX_signature[] =
29001+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29002+TYPE_OUT_1INT };
29003+
29004+static const int glXQueryDrawable_signature[] =
29005+ { TYPE_NONE, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29006+TYPE_OUT_1INT };
29007+
29008+/* void glXUseXFont( Font font, int first, int count, int list ) */
29009+static const int glXUseXFont_signature[] =
29010+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29011+
29012+/* Bool glXIsDirect( Display *dpy, GLXContext ctx ) */
29013+static const int glXIsDirect_signature[] =
29014+ { TYPE_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29015+
29016+static const int glXGetScreenDriver_signature[] =
29017+ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29018+
29019+static const int glXGetDriverConfig_signature[] =
29020+ { TYPE_CONST_CHAR, 0, 1, TYPE_NULL_TERMINATED_STRING };
29021+
29022+
29023+static const int glXWaitVideoSyncSGI_signature[] =
29024+ { TYPE_INT, 1, 3, TYPE_INT, TYPE_INT, TYPE_OUT_1INT };
29025+
29026+static const int glXGetVideoSyncSGI_signature[] =
29027+ { TYPE_INT, 1, 1, TYPE_OUT_1INT };
29028+
29029+static const int glXSwapIntervalSGI_signature[] =
29030+ { TYPE_INT, 0, 1, TYPE_INT };
29031+
29032+static const int glXBindTexImageATI_signature[] =
29033+ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
29034+static const int glXReleaseTexImageATI_signature[] =
29035+ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
29036+static const int glXBindTexImageARB_signature[] =
29037+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
29038+static const int glXReleaseTexImageARB_signature[] =
29039+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
29040+
29041+/* const GLubyte * glGetString( GLenum name ) */
29042+static const int glGetString_signature[] =
29043+ { TYPE_CONST_CHAR, 0, 1, TYPE_INT };
29044+
29045+/* void glShaderSourceARB (GLhandleARB handle , GLsizei size, const GLcharARB* *p_tab_prog, const GLint * tab_length) */
29046+/* --> void glShaderSourceARB (GLhandleARB handle , GLsizei size, const GLcharARB* all_progs, const GLint * tab_length) */
29047+static const int glShaderSourceARB_fake_signature[] =
29048+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_ARRAY_INT };
29049+static const int glShaderSource_fake_signature[] =
29050+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_ARRAY_INT };
29051+
29052+static const int glVertexPointer_fake_signature[] =
29053+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29054+TYPE_ARRAY_CHAR };
29055+static const int glNormalPointer_fake_signature[] =
29056+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29057+TYPE_ARRAY_CHAR };
29058+static const int glColorPointer_fake_signature[] =
29059+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29060+TYPE_ARRAY_CHAR };
29061+static const int glSecondaryColorPointer_fake_signature[] =
29062+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29063+TYPE_ARRAY_CHAR };
29064+static const int glIndexPointer_fake_signature[] =
29065+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29066+TYPE_ARRAY_CHAR };
29067+static const int glTexCoordPointer_fake_signature[] =
29068+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29069+TYPE_INT, TYPE_ARRAY_CHAR };
29070+static const int glEdgeFlagPointer_fake_signature[] =
29071+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29072+static const int glVertexAttribPointerARB_fake_signature[] =
29073+ { TYPE_NONE, 0, 8, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29074+TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29075+static const int glVertexAttribPointerNV_fake_signature[] =
29076+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29077+TYPE_INT, TYPE_ARRAY_CHAR };
29078+static const int glWeightPointerARB_fake_signature[] =
29079+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29080+TYPE_ARRAY_CHAR };
29081+static const int glMatrixIndexPointerARB_fake_signature[] =
29082+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29083+TYPE_ARRAY_CHAR };
29084+static const int glFogCoordPointer_fake_signature[] =
29085+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29086+TYPE_ARRAY_CHAR };
29087+static const int glInterleavedArrays_fake_signature[] =
29088+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29089+TYPE_ARRAY_CHAR };
29090+static const int glElementPointerATI_fake_signature[] =
29091+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29092+static const int glVariantPointerEXT_fake_signature[] =
29093+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29094+TYPE_ARRAY_CHAR };
29095+static const int glTuxRacerDrawElements_fake_signature[] =
29096+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29097+static const int glVertexAndNormalPointer_fake_signature[] =
29098+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29099+TYPE_INT, TYPE_ARRAY_CHAR };
29100+static const int glTexCoordPointer01_fake_signature[] =
29101+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29102+TYPE_ARRAY_CHAR };
29103+static const int glTexCoordPointer012_fake_signature[] =
29104+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29105+TYPE_ARRAY_CHAR };
29106+static const int glVertexNormalPointerInterlaced_fake_signature[] =
29107+ { TYPE_NONE, 0, 8, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29108+TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29109+static const int glVertexNormalColorPointerInterlaced_fake_signature[] =
29110+ { TYPE_NONE, 0, 11, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29111+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29112+static const int glVertexColorTexCoord0PointerInterlaced_fake_signature[] =
29113+ { TYPE_NONE, 0, 12, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29114+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29115+static const int glVertexNormalTexCoord0PointerInterlaced_fake_signature[] =
29116+ { TYPE_NONE, 0, 11, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29117+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29118+static const int glVertexNormalTexCoord01PointerInterlaced_fake_signature[] =
29119+ { TYPE_NONE, 0, 14, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29120+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29121+static const int glVertexNormalTexCoord012PointerInterlaced_fake_signature[] =
29122+ { TYPE_NONE, 0, 17, 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, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29124+static const int
29125+ glVertexNormalColorTexCoord0PointerInterlaced_fake_signature[] =
29126+ { TYPE_NONE, 0, 14, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29127+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29128+TYPE_ARRAY_CHAR };
29129+static const int
29130+ glVertexNormalColorTexCoord01PointerInterlaced_fake_signature[] =
29131+ { TYPE_NONE, 0, 17, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29132+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29133+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29134+static const int
29135+ glVertexNormalColorTexCoord012PointerInterlaced_fake_signature[] =
29136+ { TYPE_NONE, 0, 20, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29137+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29138+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29139+
29140+static const int glGenTextures_fake_signature[] =
29141+ { TYPE_NONE, 0, 1, TYPE_INT };
29142+static const int glGenBuffersARB_fake_signature[] =
29143+ { TYPE_NONE, 0, 1, TYPE_INT };
29144+static const int glGenLists_fake_signature[] = { TYPE_NONE, 0, 1, TYPE_INT };
29145+
29146+static const int _glDrawElements_buffer_signature[] =
29147+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29148+static const int _glDrawRangeElements_buffer_signature[] =
29149+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29150+TYPE_INT };
29151+static const int _glMultiDrawElements_buffer_signature[] =
29152+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_ARRAY_INT, TYPE_INT, TYPE_ARRAY_INT,
29153+TYPE_INT };
29154+
29155+static const int _glVertexPointer_buffer_signature[] =
29156+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29157+static const int _glNormalPointer_buffer_signature[] =
29158+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
29159+static const int _glColorPointer_buffer_signature[] =
29160+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29161+static const int _glSecondaryColorPointer_buffer_signature[] =
29162+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29163+static const int _glIndexPointer_buffer_signature[] =
29164+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
29165+static const int _glTexCoordPointer_buffer_signature[] =
29166+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29167+static const int _glEdgeFlagPointer_buffer_signature[] =
29168+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
29169+static const int _glVertexAttribPointerARB_buffer_signature[] =
29170+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29171+TYPE_INT };
29172+static const int _glWeightPointerARB_buffer_signature[] =
29173+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29174+static const int _glMatrixIndexPointerARB_buffer_signature[] =
29175+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29176+static const int _glFogCoordPointer_buffer_signature[] =
29177+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
29178+static const int _glVariantPointerEXT_buffer_signature[] =
29179+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29180+
29181+static const int _glReadPixels_pbo_signature[] =
29182+ { TYPE_INT, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29183+TYPE_INT, TYPE_INT };
29184+static const int _glDrawPixels_pbo_signature[] =
29185+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29186+static const int _glMapBufferARB_fake_signature[] =
29187+ { TYPE_INT, 1, 3, TYPE_INT, TYPE_INT, TYPE_OUT_ARRAY_CHAR };
29188+
29189+static const int _glSelectBuffer_fake_signature[] =
29190+ { TYPE_NONE, 0, 1, TYPE_INT };
29191+static const int _glGetSelectBuffer_fake_signature[] =
29192+ { TYPE_NONE, 1, 1, TYPE_ARRAY_CHAR };
29193+static const int _glFeedbackBuffer_fake_signature[] =
29194+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
29195+static const int _glGetFeedbackBuffer_fake_signature[] =
29196+ { TYPE_NONE, 1, 1, TYPE_ARRAY_CHAR };
29197+
29198+static const int _glGetError_fake_signature[] = { TYPE_NONE, 0, 0 };
29199+
29200+#define timesynchro_func -1
29201+#define memorize_array_func -2
29202+#define reuse_array_func -3
29203+
29204+#include "gl_func.h"
29205+
29206+static GLint __glTexParameter_size(FILE *err_file, GLenum pname)
29207+{
29208+ switch (pname) {
29209+ case GL_TEXTURE_MAG_FILTER:
29210+ case GL_TEXTURE_MIN_FILTER:
29211+ case GL_TEXTURE_WRAP_S:
29212+ case GL_TEXTURE_WRAP_T:
29213+ case GL_TEXTURE_PRIORITY:
29214+ case GL_TEXTURE_WRAP_R:
29215+ case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
29216+/* case GL_SHADOW_AMBIENT_SGIX:*/
29217+ case GL_TEXTURE_MIN_LOD:
29218+ case GL_TEXTURE_MAX_LOD:
29219+ case GL_TEXTURE_BASE_LEVEL:
29220+ case GL_TEXTURE_MAX_LEVEL:
29221+ case GL_TEXTURE_CLIPMAP_FRAME_SGIX:
29222+ case GL_TEXTURE_LOD_BIAS_S_SGIX:
29223+ case GL_TEXTURE_LOD_BIAS_T_SGIX:
29224+ case GL_TEXTURE_LOD_BIAS_R_SGIX:
29225+ case GL_GENERATE_MIPMAP:
29226+/* case GL_GENERATE_MIPMAP_SGIS:*/
29227+ case GL_TEXTURE_COMPARE_SGIX:
29228+ case GL_TEXTURE_COMPARE_OPERATOR_SGIX:
29229+ case GL_TEXTURE_MAX_CLAMP_S_SGIX:
29230+ case GL_TEXTURE_MAX_CLAMP_T_SGIX:
29231+ case GL_TEXTURE_MAX_CLAMP_R_SGIX:
29232+ case GL_TEXTURE_MAX_ANISOTROPY_EXT:
29233+ case GL_TEXTURE_LOD_BIAS:
29234+/* case GL_TEXTURE_LOD_BIAS_EXT:*/
29235+ case GL_DEPTH_TEXTURE_MODE:
29236+/* case GL_DEPTH_TEXTURE_MODE_ARB:*/
29237+ case GL_TEXTURE_COMPARE_MODE:
29238+/* case GL_TEXTURE_COMPARE_MODE_ARB:*/
29239+ case GL_TEXTURE_COMPARE_FUNC:
29240+/* case GL_TEXTURE_COMPARE_FUNC_ARB:*/
29241+ case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV:
29242+ return 1;
29243+ case GL_TEXTURE_CLIPMAP_CENTER_SGIX:
29244+ case GL_TEXTURE_CLIPMAP_OFFSET_SGIX:
29245+ return 2;
29246+ case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX:
29247+ return 3;
29248+ case GL_TEXTURE_BORDER_COLOR:
29249+ case GL_POST_TEXTURE_FILTER_BIAS_SGIX:
29250+ case GL_POST_TEXTURE_FILTER_SCALE_SGIX:
29251+ return 4;
29252+ default:
29253+ fprintf(err_file, "unhandled pname = %d\n", pname);
29254+ return 0;
29255+ }
29256+}
29257+
29258+static int __glLight_size(FILE *err_file, GLenum pname)
29259+{
29260+ switch (pname) {
29261+ case GL_AMBIENT:
29262+ case GL_DIFFUSE:
29263+ case GL_SPECULAR:
29264+ case GL_POSITION:
29265+ return 4;
29266+ break;
29267+
29268+ case GL_SPOT_DIRECTION:
29269+ return 3;
29270+ break;
29271+
29272+ case GL_SPOT_EXPONENT:
29273+ case GL_SPOT_CUTOFF:
29274+ case GL_CONSTANT_ATTENUATION:
29275+ case GL_LINEAR_ATTENUATION:
29276+ case GL_QUADRATIC_ATTENUATION:
29277+ return 1;
29278+ break;
29279+
29280+ default:
29281+ fprintf(err_file, "unhandled pname = %d\n", pname);
29282+ return 0;
29283+ }
29284+}
29285+
29286+static int __glMaterial_size(FILE *err_file, GLenum pname)
29287+{
29288+ switch (pname) {
29289+ case GL_AMBIENT:
29290+ case GL_DIFFUSE:
29291+ case GL_SPECULAR:
29292+ case GL_EMISSION:
29293+ case GL_AMBIENT_AND_DIFFUSE:
29294+ return 4;
29295+ break;
29296+
29297+ case GL_SHININESS:
29298+ return 1;
29299+ break;
29300+
29301+ case GL_COLOR_INDEXES:
29302+ return 3;
29303+ break;
29304+
29305+ default:
29306+ fprintf(err_file, "unhandled pname = %d\n", pname);
29307+ return 0;
29308+ }
29309+}
29310+
29311+static inline int compute_arg_length(FILE *err_file, int func_number,
29312+ int arg_i, arg_t *args)
29313+{
29314+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
29315+ int *args_type = signature->args_type;
29316+
29317+ switch (func_number) {
29318+ case glProgramNamedParameter4fNV_func:
29319+ case glProgramNamedParameter4dNV_func:
29320+ case glProgramNamedParameter4fvNV_func:
29321+ case glProgramNamedParameter4dvNV_func:
29322+ case glGetProgramNamedParameterfvNV_func:
29323+ case glGetProgramNamedParameterdvNV_func:
29324+ if (arg_i == 2)
29325+ return 1 * args[arg_i - 1] *
29326+ tab_args_type_length[args_type[arg_i]];
29327+ break;
29328+
29329+ case glProgramStringARB_func:
29330+ case glLoadProgramNV_func:
29331+ case glGenProgramsNV_func:
29332+ case glDeleteProgramsNV_func:
29333+ case glGenProgramsARB_func:
29334+ case glDeleteProgramsARB_func:
29335+ case glRequestResidentProgramsNV_func:
29336+ case glDrawBuffers_func:
29337+ case glDrawBuffersARB_func:
29338+ case glDrawBuffersATI_func:
29339+ case glDeleteBuffers_func:
29340+ case glDeleteBuffersARB_func:
29341+ case glDeleteTextures_func:
29342+ case glDeleteTexturesEXT_func:
29343+ case glGenFramebuffersEXT_func:
29344+ case glDeleteFramebuffersEXT_func:
29345+ case glGenRenderbuffersEXT_func:
29346+ case glDeleteRenderbuffersEXT_func:
29347+ case glGenQueries_func:
29348+ case glGenQueriesARB_func:
29349+ case glDeleteQueries_func:
29350+ case glDeleteQueriesARB_func:
29351+ case glGenOcclusionQueriesNV_func:
29352+ case glDeleteOcclusionQueriesNV_func:
29353+ case glGenFencesNV_func:
29354+ case glDeleteFencesNV_func:
29355+ case glUniform1fv_func:
29356+ case glUniform1iv_func:
29357+ case glUniform1fvARB_func:
29358+ case glUniform1ivARB_func:
29359+ case glUniform1uivEXT_func:
29360+ case glVertexAttribs1dvNV_func:
29361+ case glVertexAttribs1fvNV_func:
29362+ case glVertexAttribs1svNV_func:
29363+ case glVertexAttribs1hvNV_func:
29364+ case glWeightbvARB_func:
29365+ case glWeightsvARB_func:
29366+ case glWeightivARB_func:
29367+ case glWeightfvARB_func:
29368+ case glWeightdvARB_func:
29369+ case glWeightubvARB_func:
29370+ case glWeightusvARB_func:
29371+ case glWeightuivARB_func:
29372+ case glPixelMapfv_func:
29373+ case glPixelMapuiv_func:
29374+ case glPixelMapusv_func:
29375+ case glProgramBufferParametersfvNV_func:
29376+ case glProgramBufferParametersIivNV_func:
29377+ case glProgramBufferParametersIuivNV_func:
29378+ case glTransformFeedbackAttribsNV_func:
29379+ case glTransformFeedbackVaryingsNV_func:
29380+ if (arg_i == signature->nb_args - 1)
29381+ return 1 * args[arg_i - 1] *
29382+ tab_args_type_length[args_type[arg_i]];
29383+ break;
29384+
29385+ case glUniform2fv_func:
29386+ case glUniform2iv_func:
29387+ case glUniform2fvARB_func:
29388+ case glUniform2ivARB_func:
29389+ case glUniform2uivEXT_func:
29390+ case glVertexAttribs2dvNV_func:
29391+ case glVertexAttribs2fvNV_func:
29392+ case glVertexAttribs2svNV_func:
29393+ case glVertexAttribs2hvNV_func:
29394+ case glDetailTexFuncSGIS_func:
29395+ case glSharpenTexFuncSGIS_func:
29396+ if (arg_i == signature->nb_args - 1)
29397+ return 2 * args[arg_i - 1] *
29398+ tab_args_type_length[args_type[arg_i]];
29399+ break;
29400+
29401+ case glUniform3fv_func:
29402+ case glUniform3iv_func:
29403+ case glUniform3fvARB_func:
29404+ case glUniform3ivARB_func:
29405+ case glUniform3uivEXT_func:
29406+ case glVertexAttribs3dvNV_func:
29407+ case glVertexAttribs3fvNV_func:
29408+ case glVertexAttribs3svNV_func:
29409+ case glVertexAttribs3hvNV_func:
29410+ if (arg_i == signature->nb_args - 1)
29411+ return 3 * args[arg_i - 1] *
29412+ tab_args_type_length[args_type[arg_i]];
29413+ break;
29414+
29415+ case glUniform4fv_func:
29416+ case glUniform4iv_func:
29417+ case glUniform4fvARB_func:
29418+ case glUniform4ivARB_func:
29419+ case glUniform4uivEXT_func:
29420+ case glVertexAttribs4dvNV_func:
29421+ case glVertexAttribs4fvNV_func:
29422+ case glVertexAttribs4svNV_func:
29423+ case glVertexAttribs4hvNV_func:
29424+ case glVertexAttribs4ubvNV_func:
29425+ case glProgramParameters4fvNV_func:
29426+ case glProgramParameters4dvNV_func:
29427+ case glProgramLocalParameters4fvEXT_func:
29428+ case glProgramEnvParameters4fvEXT_func:
29429+ case glProgramLocalParametersI4ivNV_func:
29430+ case glProgramLocalParametersI4uivNV_func:
29431+ case glProgramEnvParametersI4ivNV_func:
29432+ case glProgramEnvParametersI4uivNV_func:
29433+ if (arg_i == signature->nb_args - 1)
29434+ return 4 * args[arg_i - 1] *
29435+ tab_args_type_length[args_type[arg_i]];
29436+ break;
29437+
29438+ case glPrioritizeTextures_func:
29439+ case glPrioritizeTexturesEXT_func:
29440+ case glAreProgramsResidentNV_func:
29441+ case glAreTexturesResident_func:
29442+ case glAreTexturesResidentEXT_func:
29443+ if (arg_i == 1 || arg_i == 2)
29444+ return args[0] * tab_args_type_length[args_type[arg_i]];
29445+ break;
29446+
29447+ case glLightfv_func:
29448+ case glLightiv_func:
29449+ case glGetLightfv_func:
29450+ case glGetLightiv_func:
29451+ case glFragmentLightfvSGIX_func:
29452+ case glFragmentLightivSGIX_func:
29453+ case glGetFragmentLightfvSGIX_func:
29454+ case glGetFragmentLightivSGIX_func:
29455+ if (arg_i == signature->nb_args - 1)
29456+ return __glLight_size(err_file,
29457+ args[arg_i -
29458+ 1]) *
29459+ tab_args_type_length[args_type[arg_i]];
29460+ break;
29461+
29462+ case glLightModelfv_func:
29463+ case glLightModeliv_func:
29464+ if (arg_i == signature->nb_args - 1)
29465+ return ((args[arg_i - 1] ==
29466+ GL_LIGHT_MODEL_AMBIENT) ? 4 : 1) *
29467+ tab_args_type_length[args_type[arg_i]];
29468+ break;
29469+
29470+ case glFragmentLightModelfvSGIX_func:
29471+ case glFragmentLightModelivSGIX_func:
29472+ if (arg_i == signature->nb_args - 1)
29473+ return ((args[arg_i - 1] ==
29474+ GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX) ? 4 : 1) *
29475+ tab_args_type_length[args_type[arg_i]];
29476+ break;
29477+
29478+ case glMaterialfv_func:
29479+ case glMaterialiv_func:
29480+ case glGetMaterialfv_func:
29481+ case glGetMaterialiv_func:
29482+ case glFragmentMaterialfvSGIX_func:
29483+ case glFragmentMaterialivSGIX_func:
29484+ case glGetFragmentMaterialfvSGIX_func:
29485+ case glGetFragmentMaterialivSGIX_func:
29486+ if (arg_i == signature->nb_args - 1)
29487+ return __glMaterial_size(err_file,
29488+ args[arg_i -
29489+ 1]) *
29490+ tab_args_type_length[args_type[arg_i]];
29491+ break;
29492+
29493+ case glTexParameterfv_func:
29494+ case glTexParameteriv_func:
29495+ case glGetTexParameterfv_func:
29496+ case glGetTexParameteriv_func:
29497+ case glTexParameterIivEXT_func:
29498+ case glTexParameterIuivEXT_func:
29499+ case glGetTexParameterIivEXT_func:
29500+ case glGetTexParameterIuivEXT_func:
29501+ if (arg_i == signature->nb_args - 1)
29502+ return __glTexParameter_size(err_file,
29503+ args[arg_i -
29504+ 1]) *
29505+ tab_args_type_length[args_type[arg_i]];
29506+ break;
29507+
29508+ case glFogiv_func:
29509+ case glFogfv_func:
29510+ if (arg_i == signature->nb_args - 1)
29511+ return ((args[arg_i - 1] ==
29512+ GL_FOG_COLOR) ? 4 : 1) *
29513+ tab_args_type_length[args_type[arg_i]];
29514+ break;
29515+
29516+ case glTexGendv_func:
29517+ case glTexGenfv_func:
29518+ case glTexGeniv_func:
29519+ case glGetTexGendv_func:
29520+ case glGetTexGenfv_func:
29521+ case glGetTexGeniv_func:
29522+ if (arg_i == signature->nb_args - 1)
29523+ return ((args[arg_i - 1] ==
29524+ GL_TEXTURE_GEN_MODE) ? 1 : 4) *
29525+ tab_args_type_length[args_type[arg_i]];
29526+ break;
29527+
29528+ case glTexEnvfv_func:
29529+ case glTexEnviv_func:
29530+ case glGetTexEnvfv_func:
29531+ case glGetTexEnviv_func:
29532+ if (arg_i == signature->nb_args - 1)
29533+ return ((args[arg_i - 1] ==
29534+ GL_TEXTURE_ENV_MODE) ? 1 : 4) *
29535+ tab_args_type_length[args_type[arg_i]];
29536+ break;
29537+
29538+ case glConvolutionParameterfv_func:
29539+ case glConvolutionParameteriv_func:
29540+ case glGetConvolutionParameterfv_func:
29541+ case glGetConvolutionParameteriv_func:
29542+ case glConvolutionParameterfvEXT_func:
29543+ case glConvolutionParameterivEXT_func:
29544+ case glGetConvolutionParameterfvEXT_func:
29545+ case glGetConvolutionParameterivEXT_func:
29546+ if (arg_i == signature->nb_args - 1)
29547+ return ((args[arg_i - 1] == GL_CONVOLUTION_BORDER_COLOR ||
29548+ args[arg_i - 1] == GL_CONVOLUTION_FILTER_SCALE ||
29549+ args[arg_i - 1] ==
29550+ GL_CONVOLUTION_FILTER_BIAS) ? 4 : 1) *
29551+ tab_args_type_length[args_type[arg_i]];
29552+ break;
29553+
29554+ case glGetVertexAttribfvARB_func:
29555+ case glGetVertexAttribfvNV_func:
29556+ case glGetVertexAttribfv_func:
29557+ case glGetVertexAttribdvARB_func:
29558+ case glGetVertexAttribdvNV_func:
29559+ case glGetVertexAttribdv_func:
29560+ case glGetVertexAttribivARB_func:
29561+ case glGetVertexAttribivNV_func:
29562+ case glGetVertexAttribiv_func:
29563+ case glGetVertexAttribIivEXT_func:
29564+ case glGetVertexAttribIuivEXT_func:
29565+ if (arg_i == signature->nb_args - 1)
29566+ return ((args[arg_i - 1] ==
29567+ GL_CURRENT_VERTEX_ATTRIB_ARB) ? 4 : 1) *
29568+ tab_args_type_length[args_type[arg_i]];
29569+ break;
29570+
29571+
29572+ case glPointParameterfv_func:
29573+ case glPointParameterfvEXT_func:
29574+ case glPointParameterfvARB_func:
29575+ case glPointParameterfvSGIS_func:
29576+ case glPointParameteriv_func:
29577+ case glPointParameterivEXT_func:
29578+ if (arg_i == signature->nb_args - 1)
29579+ return ((args[arg_i - 1] ==
29580+ GL_POINT_DISTANCE_ATTENUATION) ? 3 : 1) *
29581+ tab_args_type_length[args_type[arg_i]];
29582+ break;
29583+
29584+ case glUniformMatrix2fv_func:
29585+ case glUniformMatrix2fvARB_func:
29586+ if (arg_i == signature->nb_args - 1)
29587+ return 2 * 2 * args[1] * tab_args_type_length[args_type[arg_i]];
29588+ break;
29589+
29590+ case glUniformMatrix3fv_func:
29591+ case glUniformMatrix3fvARB_func:
29592+ if (arg_i == signature->nb_args - 1)
29593+ return 3 * 3 * args[1] * tab_args_type_length[args_type[arg_i]];
29594+ break;
29595+
29596+ case glUniformMatrix4fv_func:
29597+ case glUniformMatrix4fvARB_func:
29598+ if (arg_i == signature->nb_args - 1)
29599+ return 4 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
29600+ break;
29601+
29602+ case glUniformMatrix2x3fv_func:
29603+ case glUniformMatrix3x2fv_func:
29604+ if (arg_i == signature->nb_args - 1)
29605+ return 2 * 3 * args[1] * tab_args_type_length[args_type[arg_i]];
29606+ break;
29607+
29608+ case glUniformMatrix2x4fv_func:
29609+ case glUniformMatrix4x2fv_func:
29610+ if (arg_i == signature->nb_args - 1)
29611+ return 2 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
29612+ break;
29613+
29614+ case glUniformMatrix3x4fv_func:
29615+ case glUniformMatrix4x3fv_func:
29616+ if (arg_i == signature->nb_args - 1)
29617+ return 3 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
29618+ break;
29619+
29620+ case glSpriteParameterivSGIX_func:
29621+ case glSpriteParameterfvSGIX_func:
29622+ if (arg_i == signature->nb_args - 1)
29623+ return ((args[arg_i - 1] ==
29624+ GL_SPRITE_MODE_SGIX) ? 1 : 3) *
29625+ tab_args_type_length[args_type[arg_i]];
29626+ break;
29627+
29628+ default:
29629+ break;
29630+ }
29631+
29632+ fprintf(err_file,
29633+ "invalid combination for compute_arg_length : func_number=%d, arg_i=%d\n",
29634+ func_number, arg_i);
29635+ return 0;
29636+}
29637+
29638+#define IS_NULL_POINTER_OK_FOR_FUNC(func_number) \
29639+ (func_number == glBitmap_func || \
29640+ func_number == _send_cursor_func || \
29641+ func_number == glTexImage1D_func || \
29642+ func_number == glTexImage2D_func || \
29643+ func_number == glTexImage3D_func || \
29644+ func_number == glBufferDataARB_func || \
29645+ func_number == glNewObjectBufferATI_func)
29646+
29647+#ifdef __amd64__
29648+#define _init_func _init64_func
29649+#else
29650+#ifdef __i386__
29651+#define _init_func _init32_func
29652+#else
29653+#error Unsupported ABI
29654+#endif
29655+#endif
29656Index: qemu-0.14.0/target-i386/opengl_player.c
29657===================================================================
29658--- /dev/null
29659+++ qemu-0.14.0/target-i386/opengl_player.c
29660@@ -0,0 +1,1461 @@
29661+/*
29662+ * Plays a sequence of OpenGL calls recorded either under qemu or with opengl_server
29663+ *
29664+ * Copyright (c) 2007 Even Rouault
29665+ *
29666+ * Permission is hereby granted, free of charge, to any person obtaining a copy
29667+ * of this software and associated documentation files (the "Software"), to deal
29668+ * in the Software without restriction, including without limitation the rights
29669+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
29670+ * copies of the Software, and to permit persons to whom the Software is
29671+ * furnished to do so, subject to the following conditions:
29672+ *
29673+ * The above copyright notice and this permission notice shall be included in
29674+ * all copies or substantial portions of the Software.
29675+ *
29676+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
29677+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29678+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
29679+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29680+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29681+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
29682+ * THE SOFTWARE.
29683+ */
29684+
29685+/* gcc -O2 -g -Wall opengl_player.c opengl_exec.c -o opengl_player -I../i386-softmmu -I. -I.. -lGL */
29686+
29687+#include <stdlib.h>
29688+#include <stdio.h>
29689+#include <string.h>
29690+#include <assert.h>
29691+#include <unistd.h>
29692+#include <sys/time.h>
29693+#include <math.h>
29694+
29695+#include <GL/gl.h>
29696+#include <X11/Xlib.h>
29697+
29698+// TODO
29699+typedef long unsigned int target_phys_addr_t;
29700+
29701+#include "opengl_func.h"
29702+#include "opengl_utils.h"
29703+
29704+//#include "ffmpeg/avcodec.h"
29705+
29706+extern void init_process_tab(void);
29707+extern int do_function_call(int, arg_t *, char *);
29708+
29709+void do_disconnect_current(void);
29710+void do_context_switch(Display *dpy, pid_t pid, int call);
29711+
29712+typedef struct {
29713+ int n_used;
29714+ unsigned int crc;
29715+ int size;
29716+ long long last_use;
29717+} RecordBufferedArray;
29718+
29719+typedef struct {
29720+ int size;
29721+ long file_offset;
29722+} ReplayBufferedArray;
29723+
29724+#define N_BUFFERED_ARRAYS 1024
29725+RecordBufferedArray recordBufferedArrays[N_BUFFERED_ARRAYS];
29726+
29727+#define INSTR_WINDOW_SIZE 65536
29728+short instrWindow[INSTR_WINDOW_SIZE];
29729+int instrWindowCount = 0;
29730+int instrWindowPtr = 0;
29731+int instrWindowBeginPtr = 0;
29732+
29733+#include "ghash.c"
29734+
29735+#define PRIME 131
29736+
29737+typedef struct {
29738+ int iFirstOccur;
29739+ int nbOccur;
29740+ int hash;
29741+} SeqDesc;
29742+
29743+typedef struct {
29744+ int hash;
29745+ int offset;
29746+} HashElt;
29747+
29748+int sort_hash_N;
29749+short *sort_hash_tab;
29750+int count_compar;
29751+int collision_detected;
29752+
29753+static int sort_hash(const void *ptrA, const void *ptrB)
29754+{
29755+ const HashElt *a = (const HashElt *) ptrA;
29756+ const HashElt *b = (const HashElt *) ptrB;
29757+
29758+ count_compar++;
29759+ if (a->hash == b->hash) {
29760+ int j;
29761+
29762+ for (j = 0; j < sort_hash_N; j++) {
29763+ if (sort_hash_tab[a->offset + j] != sort_hash_tab[b->offset + j]) {
29764+ collision_detected = 1;
29765+ // fprintf(stderr, "collision de hash !\n");
29766+ return sort_hash_tab[a->offset + j] <
29767+ sort_hash_tab[b->offset + j] ? -1 : 1;
29768+ }
29769+ }
29770+ return a->offset - b->offset;
29771+ } else if (a->hash < b->hash)
29772+ return -1;
29773+ else
29774+ return 1;
29775+}
29776+
29777+static int sort_seq_desc_by_occur(const void *ptrA, const void *ptrB)
29778+{
29779+ const SeqDesc *a = (const SeqDesc *) ptrA;
29780+ const SeqDesc *b = (const SeqDesc *) ptrB;
29781+
29782+ return b->nbOccur - a->nbOccur;
29783+}
29784+
29785+static int sort_seq_desc_by_offset(const void *ptrA, const void *ptrB)
29786+{
29787+ const SeqDesc *a = (const SeqDesc *) ptrA;
29788+ const SeqDesc *b = (const SeqDesc *) ptrB;
29789+
29790+ return a->iFirstOccur - b->iFirstOccur;
29791+}
29792+
29793+void find_repeated_seq(short *tab, int iStart, int length)
29794+{
29795+ // SimpleHashTable* tableHash = simple_hash_table_new(free);
29796+ int N = 10;
29797+ int i;
29798+ int hash = 0;
29799+ int primeN = 1;
29800+ HashElt *tabHash = malloc(sizeof(HashElt) * (length - N + 1));
29801+
29802+ short *new_tab = malloc(sizeof(short) * length);
29803+ memcpy(&new_tab[0], &tab[iStart], sizeof(short) * (length - iStart));
29804+ memcpy(&new_tab[length - iStart], &tab[0], sizeof(short) * iStart);
29805+ tab = new_tab;
29806+
29807+ sort_hash_N = N;
29808+ sort_hash_tab = tab;
29809+
29810+ fprintf(stderr, "(start) iStart = %d\n", iStart);
29811+ for (i = 0; i < N; i++) {
29812+ primeN *= PRIME;
29813+ }
29814+ for (i = 0; i < length; i++) {
29815+ hash = hash * PRIME + tab[i];
29816+ if (i >= N) {
29817+ hash -= tab[i - N] * primeN;
29818+ }
29819+ if (i >= N - 1) {
29820+ tabHash[i - (N - 1)].offset = i - (N - 1);
29821+ tabHash[i - (N - 1)].hash =
29822+ /* (i == 100) ? tabHash[0].hash : */ hash;
29823+#if 0
29824+ void **p_n_occurences =
29825+ simple_hash_table_lookup_pointer(tableHash, hash);
29826+ if (p_n_occurences == NULL) {
29827+ SeqDesc *seqDesc = malloc(sizeof(SeqDesc));
29828+
29829+ seqDesc->iFirstOccur = i - (N - 1);
29830+ seqDesc->nbOccur = 1;
29831+ simple_hash_table_insert(tableHash, hash, seqDesc);
29832+ } else {
29833+ SeqDesc *seqDesc = (SeqDesc *) (*p_n_occurences);
29834+ int j;
29835+
29836+ for (j = 0; j < N; j++) {
29837+ if (tab[(iStart + seqDesc->iFirstOccur + j) % length] !=
29838+ tab[(iStart + i - (N - 1) + j) % length])
29839+ break;
29840+ }
29841+ if (j != N)
29842+ fprintf(stderr, "arg\n");
29843+ seqDesc->nbOccur++;
29844+ // fprintf(stderr, "iStart = %d, i = %d, iFirstOccur = %d,
29845+ // nbOccur = %d\n", iStart, i, seqDesc->iFirstOccur,
29846+ // seqDesc->nbOccur);
29847+ }
29848+#endif
29849+ }
29850+ }
29851+ collision_detected = 0;
29852+ count_compar = 0;
29853+ qsort(tabHash, length - N + 1, sizeof(HashElt), sort_hash);
29854+ if (!collision_detected) {
29855+ SeqDesc *tabSeqDesc = (SeqDesc *) malloc(sizeof(SeqDesc) * length);
29856+ int nbSeqDesc = 0;
29857+ int lastI = 0;
29858+ int prevHash = tabHash[0].hash;
29859+
29860+ for (i = 1; i < length - N + 1; i++) {
29861+ if (tabHash[i].hash != prevHash) {
29862+ tabSeqDesc[nbSeqDesc].iFirstOccur = tabHash[lastI].offset;
29863+ tabSeqDesc[nbSeqDesc].nbOccur = i - lastI;
29864+ tabSeqDesc[nbSeqDesc].hash = prevHash;
29865+ nbSeqDesc++;
29866+ lastI = i;
29867+ prevHash = tabHash[i].hash;
29868+ }
29869+ }
29870+ tabSeqDesc[nbSeqDesc].iFirstOccur = tabHash[lastI].offset;
29871+ tabSeqDesc[nbSeqDesc].nbOccur = i - lastI;
29872+ nbSeqDesc++;
29873+ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc), sort_seq_desc_by_occur);
29874+ for (i = 0; i < nbSeqDesc; i++) {
29875+ if (tabSeqDesc[i].nbOccur < 10)
29876+ break;
29877+ // fprintf(stderr, "%d %d\n", tabSeqDesc[i].iFirstOccur,
29878+ // tabSeqDesc[i].nbOccur);
29879+ }
29880+ nbSeqDesc = i;
29881+ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc),
29882+ sort_seq_desc_by_offset);
29883+ lastI = tabSeqDesc[0].iFirstOccur;
29884+ int maxI = 0;
29885+ int j = 0;
29886+
29887+ for (i = 1; i < nbSeqDesc; i++) {
29888+ if (tabSeqDesc[i].iFirstOccur - lastI <= N) {
29889+ if (tabSeqDesc[i].nbOccur > tabSeqDesc[maxI].nbOccur) {
29890+ maxI = i;
29891+ }
29892+ } else {
29893+ tabSeqDesc[j].iFirstOccur = tabSeqDesc[maxI].iFirstOccur;
29894+ tabSeqDesc[j].nbOccur = tabSeqDesc[maxI].nbOccur;
29895+ j++;
29896+#define MAX(a,b) (((a)>(b)) ? (a) : (b))
29897+ lastI = tabSeqDesc[maxI].iFirstOccur;
29898+ while (i < nbSeqDesc &&
29899+ tabSeqDesc[i].iFirstOccur - lastI <= N)
29900+ i++;
29901+ if (i == nbSeqDesc)
29902+ break;
29903+ maxI = i;
29904+ }
29905+ }
29906+ nbSeqDesc = j;
29907+ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc), sort_seq_desc_by_occur);
29908+ for (i = 0; i < nbSeqDesc; i++) {
29909+ fprintf(stderr, "offset=%d occurNb=%d hash=%d:",
29910+ tabSeqDesc[i].iFirstOccur, tabSeqDesc[i].nbOccur,
29911+ tabSeqDesc[i].hash);
29912+ for (j = 0; j < N; j++)
29913+ fprintf(stderr, "%d ", tab[tabSeqDesc[i].iFirstOccur + j]);
29914+ fprintf(stderr, "\n");
29915+ }
29916+ free(tabSeqDesc);
29917+ } else {
29918+ fprintf(stderr, "collision de hash !\n");
29919+ }
29920+
29921+ fprintf(stderr, "(end) iStart = %d (count_compar = %d)\n", iStart,
29922+ count_compar);
29923+ // simple_hash_table_foreach(tableHash,
29924+ free(tabHash);
29925+ free(tab);
29926+#if 0
29927+ simple_hash_table_destroy(tableHash);
29928+#endif
29929+#if 0
29930+ int i, j, k;
29931+
29932+ for (i = 0; i < length; i++) {
29933+ int nMaxContiguous = 0;
29934+ int jMax = 0;
29935+
29936+ for (j = 0; j < length; j++) {
29937+ int nContiguous = 0;
29938+
29939+ for (k = 0; k < j - i; k++) {
29940+ if (tab[(iStart + i + k) % length] ==
29941+ tab[(iStart + i + j + k) % length]) {
29942+ nContiguous++;
29943+ } else
29944+ break;
29945+ }
29946+ if (nContiguous >= nMaxContiguous) {
29947+ nMaxContiguous = nContiguous;
29948+ jMax = j;
29949+ }
29950+ }
29951+ fprintf(stderr, "iStart = %d, i = %d, j = %d, nContiguous = %d\n",
29952+ iStart, i, i + jMax, nMaxContiguous);
29953+ }
29954+#endif
29955+}
29956+
29957+#define MAX_SERVER_STATE_STACK_SIZE 16
29958+
29959+typedef struct {
29960+ GLbitfield mask;
29961+ int matrixMode;
29962+ int lastMatrixOp;
29963+} ServerState;
29964+
29965+typedef struct {
29966+ ServerState stackAttrib[MAX_SERVER_STATE_STACK_SIZE];
29967+ int stackAttribPtr;
29968+ int matrixMode;
29969+ int lastMatrixOp;
29970+} GLState;
29971+
29972+#define NB_STATES 100
29973+GLState states[NB_STATES];
29974+
29975+void usage()
29976+{
29977+ printf("Usage : opengl_player [OPTION] filename\n\n");
29978+ printf
29979+ ("filename is the file where to read the OpenGL flow ('/tmp/debug_gl.bin' by default)\n");
29980+ printf("'-' is supported and stands for standard input\n\n");
29981+ printf("The following options are available :\n");
29982+ printf
29983+ ("--debug : output debugging trace on stderr\n");
29984+ printf("--disable-real-time-play-back : play as fast as possible\n");
29985+ printf
29986+ ("--show-hard-disk-bandwidth : displays regularly the data bandwidth\n");
29987+ printf("--h or --help : display this help\n");
29988+}
29989+
29990+int main(int argc, char *argv[])
29991+{
29992+ static int args_size[50];
29993+ int i;
29994+ int visualid_fbconfig_read = -1;
29995+ int visualid_fbconfig_real = 0;
29996+ char *filename = "/tmp/debug_gl.bin";
29997+ int slowdown = 0;
29998+ int debug = 0;
29999+ char *ret_string;
30000+ arg_t args[50];
30001+ struct timeval start_time, last_time, current_time;
30002+ int noplay = 0;
30003+ int count_last_time = 0, count_current = 0;
30004+ int refresh_rate = 500;
30005+ int disable_real_time_play_back = 0;
30006+ int show_hard_disk_bandwith = 0;
30007+ int last_offset = 0;
30008+ int resize = 0;
30009+ int window_width = 0, window_height = 0;
30010+ int orig_window_width = 0;
30011+ int show_offset = 0;
30012+ int show_diff_offset = 0;
30013+ int last_cmd_offset = 0;
30014+ FILE *compressed_file = NULL;
30015+ int sizeBufferedArraysPlay = 0;
30016+ ReplayBufferedArray *replayBufferedArrays = NULL;
30017+ int currentState = 0;
30018+
30019+ memset(recordBufferedArrays, 0, sizeof(recordBufferedArrays));
30020+ memset(states, 0, sizeof(states));
30021+ for (i = 0; i < NB_STATES; i++) {
30022+ states[i].matrixMode = GL_MODELVIEW;
30023+ states[i].lastMatrixOp = -1;
30024+ }
30025+
30026+ /* avcodec_init(); AVCodec* avCodec =
30027+ * avcodec_find_encoder(CODEC_ID_MPEG2VIDEO); AVCodecContext*
30028+ * avCodecContext = avcodec_alloc_context(); */
30029+
30030+ for (i = 1; i < argc; i++) {
30031+ if (argv[i][0] == '-' && argv[i][1] == '-')
30032+ argv[i] = argv[i] + 1;
30033+
30034+ if (strncmp(argv[i], "-slowdown=", strlen("-slowdown=")) == 0) {
30035+ slowdown = atoi(argv[i] + strlen("-slowdown="));
30036+ } else if (strcmp(argv[i], "-noplay") == 0) {
30037+ noplay = 1;
30038+ } else if (strcmp(argv[i], "-debug") == 0) {
30039+ debug = 1;
30040+ } else if (strcmp(argv[i], "-disable-real-time-play-back") == 0) {
30041+ disable_real_time_play_back = 1;
30042+ } else if (strcmp(argv[i], "-show-hard-disk-bandwidth") == 0) {
30043+ show_hard_disk_bandwith = 1;
30044+ } else if (strcmp(argv[i], "-show-offset") == 0) {
30045+ show_offset = 1;
30046+ } else
30047+ if (strncmp
30048+ (argv[i], "-show-diff-offset",
30049+ strlen("-show-diff-offset")) == 0) {
30050+ show_diff_offset = atoi(argv[i] + strlen("-show-diff-offset="));
30051+ } else if (strncmp(argv[i], "-width=", strlen("-width=")) == 0) {
30052+ window_width = atoi(argv[i] + strlen("-width="));
30053+ resize = 1;
30054+ } else if (strncmp(argv[i], "-refreshrate=", strlen("-refreshrate="))
30055+ == 0) {
30056+ refresh_rate = atoi(argv[i] + strlen("-refreshrate="));
30057+ } else
30058+ if (strncmp
30059+ (argv[i], "-output-compressed-filename=",
30060+ strlen("-output-compressed-filename=")) == 0) {
30061+ char *compressed_filename =
30062+ argv[i] + strlen("-output-compressed-filename=");
30063+ compressed_file = fopen(compressed_filename, "wb");
30064+ } else if (strcmp(argv[i], "-") == 0) {
30065+ filename = NULL;
30066+ } else if (strcmp(argv[i], "-h") == 0 ||
30067+ strcmp(argv[i], "-help") == 0) {
30068+ usage();
30069+ return 0;
30070+ } else
30071+ filename = argv[i];
30072+ }
30073+ FILE *f = (filename) ? fopen(filename, "rb") : stdin;
30074+
30075+ if (f == NULL) {
30076+ fprintf(stderr, "cannot open %s\n", filename);
30077+ return 0;
30078+ }
30079+ // FILE* fout = fopen("/tmp/raw", "wb");
30080+
30081+ init_process_tab();
30082+ ret_string = malloc(32768);
30083+
30084+ gettimeofday(&start_time, NULL);
30085+ gettimeofday(&last_time, NULL);
30086+
30087+// void* buffer= NULL;
30088+#define WRITE_UNSIGNED_CHAR(x) do { unsigned char myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30089+#define WRITE_SHORT(x) do { short myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30090+#define WRITE_INT(x) do { int myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30091+#define WRITE_LONGLONG(x) do { long long myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30092+#define WRITE_FLOAT(x) do { float myvar = (float)x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30093+#define WRITE_3DOUBLE_AS_3FLOAT(x) do { float myfloats[] = { x[0], x[1], x[2] }; fwrite(myfloats, sizeof(myvar), 1, compressed_file); } while(0)
30094+
30095+ // FILE* fopcodes = fopen("/tmp/opcodes.bin", "wb");
30096+ do_context_switch(XOpenDisplay(NULL), 1, _init32_func);
30097+
30098+ long long instr_count = 0;
30099+
30100+ while (1) {
30101+ short func_number;
30102+ short memorize_array_play = -1;
30103+ short reuse_array_play = -1;
30104+
30105+ begin:
30106+ if (fread(&func_number, sizeof(short), 1, f) == 0)
30107+ break;
30108+ if (func_number == _exit_process_func)
30109+ break;
30110+
30111+ if (func_number == _serialized_calls_func) {
30112+ continue;
30113+ }
30114+ // fwrite(&func_number, sizeof(short), 1, fopcodes);
30115+
30116+ /*
30117+ * instrWindow[instrWindowPtr] = func_number; instrWindowPtr++; if
30118+ * (instrWindowPtr == INSTR_WINDOW_SIZE) instrWindowPtr = 0;
30119+ * instrWindowCount++; if (instrWindowCount >= INSTR_WINDOW_SIZE) {
30120+ * if ((instrWindowCount % (INSTR_WINDOW_SIZE / 2)) == 0)
30121+ * find_repeated_seq(instrWindow, instrWindowBeginPtr,
30122+ * INSTR_WINDOW_SIZE); instrWindowBeginPtr++; if (instrWindowBeginPtr
30123+ * == INSTR_WINDOW_SIZE) instrWindowBeginPtr = 0; } */
30124+
30125+ /* -1 is special code that indicates time synchro */
30126+ if (func_number == timesynchro_func) {
30127+ long long ts_file;
30128+ fread(&ts_file, sizeof(long long), 1, f);
30129+
30130+ if (compressed_file) {
30131+ WRITE_SHORT(timesynchro_func);
30132+ WRITE_LONGLONG(ts_file);
30133+ }
30134+
30135+ if (!disable_real_time_play_back) {
30136+ gettimeofday(&current_time, NULL);
30137+ long long ts_real =
30138+ (current_time.tv_sec -
30139+ start_time.tv_sec) * (long long) 1000000 +
30140+ current_time.tv_usec - start_time.tv_usec;
30141+ // fprintf(stderr, "%d %d\n", (int)ts_real, (int)ts_file);
30142+ if (ts_real < ts_file/* && ts_file - ts_real > 100 * 1000 */) {
30143+ /* we're playing too fast */
30144+ // fprintf(stderr, "waiting %d usec\n", (int)(ts_file -
30145+ // ts_real));
30146+ usleep((int) (ts_file - ts_real));
30147+ }
30148+ }
30149+ continue;
30150+ } else if (func_number == memorize_array_func) {
30151+ fread(&memorize_array_play, sizeof(short), 1, f);
30152+ goto begin;
30153+ } else if (func_number == reuse_array_func) {
30154+ fread(&reuse_array_play, sizeof(short), 1, f);
30155+ goto begin;
30156+ }
30157+
30158+ assert(func_number >= 0);
30159+
30160+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
30161+ int nb_args = signature->nb_args;
30162+ int *args_type = signature->args_type;
30163+
30164+ for (i = 0; i < nb_args; i++) {
30165+ switch (args_type[i]) {
30166+#if 0
30167+ case TYPE_UNSIGNED_CHAR:
30168+ case TYPE_CHAR:
30169+ {
30170+ char c;
30171+
30172+ fread(&c, sizeof(c), 1, f);
30173+ args[i] = c;
30174+ break;
30175+ }
30176+
30177+ case TYPE_UNSIGNED_SHORT:
30178+ case TYPE_SHORT:
30179+ {
30180+ short s;
30181+
30182+ fread(&s, sizeof(s), 1, f);
30183+ args[i] = s;
30184+ break;
30185+ }
30186+
30187+ case TYPE_FLOAT:
30188+ fread(&args[i], sizeof(int), 1, f);
30189+ break;
30190+
30191+#endif
30192+ case TYPE_UNSIGNED_CHAR:
30193+ case TYPE_CHAR:
30194+ case TYPE_UNSIGNED_INT:
30195+ case TYPE_INT:
30196+ case TYPE_UNSIGNED_SHORT:
30197+ case TYPE_SHORT:
30198+ case TYPE_FLOAT:
30199+ {
30200+ int n;
30201+ fread(&n, sizeof(int), 1, f);
30202+ args[i] = n;
30203+ break;
30204+ }
30205+
30206+ case TYPE_NULL_TERMINATED_STRING:
30207+ CASE_IN_UNKNOWN_SIZE_POINTERS:
30208+ fread(&args_size[i], sizeof(int), 1, f);
30209+ if (args_size[i]) {
30210+ args[i] = (long) malloc(args_size[i]);
30211+ fread((void *) args[i], args_size[i], 1, f);
30212+ } else {
30213+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
30214+ fprintf(stderr, "call %s arg %d\n",
30215+ tab_opengl_calls_name[func_number], i);
30216+ }
30217+ args[i] = 0;
30218+ }
30219+ if (reuse_array_play >= 0) {
30220+ long current_pos = ftell(f);
30221+
30222+ args_size[i] =
30223+ replayBufferedArrays[reuse_array_play].size;
30224+ args[i] = (long) malloc(args_size[i]);
30225+ fseek(f,
30226+ replayBufferedArrays[reuse_array_play].file_offset,
30227+ SEEK_SET);
30228+ fread((void *) args[i], args_size[i], 1, f);
30229+ fseek(f, current_pos, SEEK_SET);
30230+ }
30231+ if (memorize_array_play >= 0) {
30232+ assert(memorize_array_play <= sizeBufferedArraysPlay);
30233+ if (memorize_array_play == sizeBufferedArraysPlay) {
30234+ sizeBufferedArraysPlay++;
30235+ replayBufferedArrays =
30236+ realloc(replayBufferedArrays,
30237+ sizeBufferedArraysPlay *
30238+ sizeof(ReplayBufferedArray));
30239+ replayBufferedArrays[sizeBufferedArraysPlay -
30240+ 1].file_offset = 0;
30241+ }
30242+ replayBufferedArrays[memorize_array_play].file_offset =
30243+ ftell(f) - args_size[i];
30244+ replayBufferedArrays[memorize_array_play].size =
30245+ args_size[i];
30246+ }
30247+ break;
30248+
30249+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
30250+ {
30251+ args_size[i] =
30252+ compute_arg_length(stderr, func_number, i, args);
30253+ args[i] =
30254+ (args_size[i]) ? (long) malloc(args_size[i]) : 0;
30255+ fread((void *) args[i], args_size[i], 1, f);
30256+ break;
30257+ }
30258+
30259+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
30260+ {
30261+ args_size[i] =
30262+ compute_arg_length(stderr, func_number, i, args);
30263+ args[i] = (long) malloc(args_size[i]);
30264+ break;
30265+ }
30266+
30267+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
30268+ {
30269+ fread(&args_size[i], sizeof(int), 1, f);
30270+ if (args_size[i]) {
30271+ args[i] = (long) malloc(args_size[i]);
30272+ } else {
30273+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
30274+ fprintf(stderr, "call %s arg %d\n",
30275+ tab_opengl_calls_name[func_number], i);
30276+ }
30277+ args[i] = 0;
30278+ }
30279+ break;
30280+ }
30281+
30282+ CASE_OUT_KNOWN_SIZE_POINTERS:
30283+ {
30284+ args_size[i] = tab_args_type_length[args_type[i]];
30285+ assert(args_size[i]);
30286+ args[i] = (long) malloc(args_size[i]);
30287+ break;
30288+ }
30289+
30290+ case TYPE_DOUBLE:
30291+ CASE_IN_KNOWN_SIZE_POINTERS:
30292+ args_size[i] = tab_args_type_length[args_type[i]];
30293+ args[i] = (long) malloc(args_size[i]);
30294+ fread((void *) args[i], args_size[i], 1, f);
30295+ break;
30296+
30297+ case TYPE_IN_IGNORED_POINTER:
30298+ args[i] = 0;
30299+ break;
30300+
30301+ default:
30302+ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
30303+ tab_opengl_calls_name[func_number], i);
30304+ do_disconnect_current();
30305+ return 0;
30306+ }
30307+ }
30308+ if (debug)
30309+ display_gl_call(stderr, func_number, args, args_size);
30310+
30311+ if (debug && reuse_array_play != -1)
30312+ fprintf(stderr, "reuse_array_play %d\n", reuse_array_play);
30313+ if (debug && memorize_array_play != -1)
30314+ fprintf(stderr, "memorize_array_play %d\n", memorize_array_play);
30315+
30316+ if (compressed_file) {
30317+ int reuse_array = -1;
30318+ int memorize_array = -1;
30319+ void *ptr = NULL;
30320+ int bytes_size = 0;
30321+ int do_default = 1;
30322+
30323+ switch (func_number) {
30324+ case glXMakeCurrent_func:
30325+ {
30326+ currentState = args[2];
30327+ assert(currentState >= 0 && currentState < NB_STATES);
30328+ break;
30329+ }
30330+
30331+ case glMatrixMode_func:
30332+ {
30333+ if (states[currentState].matrixMode == args[0]) {
30334+ do_default = 0;
30335+ } else {
30336+ states[currentState].matrixMode = args[0];
30337+ }
30338+ break;
30339+ }
30340+
30341+ case glLoadIdentity_func:
30342+ case glLoadMatrixd_func:
30343+ case glLoadMatrixf_func:
30344+ case glMultMatrixd_func:
30345+ case glMultMatrixf_func:
30346+ case glOrtho_func:
30347+ case glFrustum_func:
30348+ case glRotated_func:
30349+ case glRotatef_func:
30350+ case glScaled_func:
30351+ case glScalef_func:
30352+ case glTranslated_func:
30353+ case glTranslatef_func:
30354+ case glPushMatrix_func:
30355+ case glPopMatrix_func:
30356+ {
30357+ if (states[currentState].matrixMode == 5890) {
30358+ if (states[currentState].lastMatrixOp ==
30359+ glLoadIdentity_func &&
30360+ func_number == glLoadIdentity_func) {
30361+ do_default = 0;
30362+ }
30363+ states[currentState].lastMatrixOp = func_number;
30364+ }
30365+ break;
30366+ }
30367+
30368+ case glPushAttrib_func:
30369+ {
30370+ if (states[currentState].stackAttribPtr <
30371+ MAX_SERVER_STATE_STACK_SIZE) {
30372+ int mask = args[0];
30373+
30374+ states[currentState].stackAttrib[states[currentState].
30375+ stackAttribPtr].
30376+ mask = mask;
30377+ if (mask & GL_TRANSFORM_BIT) {
30378+ states[currentState].
30379+ stackAttrib[states[currentState].
30380+ stackAttribPtr].matrixMode =
30381+ states[currentState].matrixMode;
30382+ states[currentState].
30383+ stackAttrib[states[currentState].
30384+ stackAttribPtr].lastMatrixOp =
30385+ states[currentState].lastMatrixOp;
30386+ }
30387+ states[currentState].stackAttribPtr++;
30388+ }
30389+ break;
30390+ }
30391+
30392+ case glPopAttrib_func:
30393+ {
30394+ if (states[currentState].stackAttribPtr > 0) {
30395+ --states[currentState].stackAttribPtr;
30396+ if (states[currentState].
30397+ stackAttrib[states[currentState].stackAttribPtr].
30398+ mask & GL_TRANSFORM_BIT) {
30399+ states[currentState].matrixMode =
30400+ states[currentState].
30401+ stackAttrib[states[currentState].
30402+ stackAttribPtr].matrixMode;
30403+ states[currentState].lastMatrixOp =
30404+ states[currentState].
30405+ stackAttrib[states[currentState].
30406+ stackAttribPtr].lastMatrixOp;
30407+ }
30408+ }
30409+ break;
30410+ }
30411+
30412+ case glBufferDataARB_func:
30413+ {
30414+ ptr = (void *) args[2];
30415+ bytes_size = args_size[2];
30416+ break;
30417+ }
30418+
30419+ case glVertexPointer_fake_func:
30420+ case glTexCoordPointer_fake_func:
30421+ case glTexCoordPointer01_fake_func:
30422+ case glDrawElements_func:
30423+ {
30424+ ptr = (void *) args[nb_args - 1];
30425+ bytes_size = args_size[nb_args - 1];
30426+ break;
30427+ }
30428+
30429+ default:
30430+ break;
30431+ }
30432+
30433+ if (ptr) {
30434+ unsigned int crc = calc_checksum(ptr, bytes_size, 0xFFFFFFFF);
30435+ long long minInterest = 0x7FFFFFFFFFFFFFFFLL;
30436+ int iMinUsed = -1;
30437+
30438+ instr_count++;
30439+
30440+ for (i = 0; i < N_BUFFERED_ARRAYS; i++) {
30441+ if (recordBufferedArrays[i].crc == crc) {
30442+ // fprintf(stderr, "reusing %d for crc %d\n", i,
30443+ // crc);
30444+ reuse_array = i;
30445+ // fprintf(stderr, "reuse_array %d\n", i);
30446+ recordBufferedArrays[i].n_used++;
30447+ recordBufferedArrays[i].last_use = instr_count;
30448+ break;
30449+ } else if (recordBufferedArrays[i].n_used == 0) {
30450+ // fprintf(stderr, "memorize_array %d\n", i);
30451+ memorize_array = i;
30452+ recordBufferedArrays[i].n_used = 1;
30453+ recordBufferedArrays[i].crc = crc;
30454+ recordBufferedArrays[i].size = bytes_size;
30455+ recordBufferedArrays[i].last_use = instr_count;
30456+ break;
30457+ } else {
30458+ long long interest =
30459+ N_BUFFERED_ARRAYS *
30460+ recordBufferedArrays[i].n_used / (instr_count -
30461+ recordBufferedArrays
30462+ [i].
30463+ last_use)
30464+ /** recordBufferedArrays[i].size*/ ;
30465+ if (interest < minInterest) {
30466+ iMinUsed = i;
30467+ minInterest = interest;
30468+ }
30469+ }
30470+ }
30471+ static unsigned int *discardedCrcs = NULL;
30472+ static int nDiscardedCrcs = 0;
30473+
30474+ if (i == N_BUFFERED_ARRAYS) {
30475+ int j;
30476+
30477+ for (j = 0; j < nDiscardedCrcs; j++) {
30478+ if (discardedCrcs[j] == crc) {
30479+ fprintf(stderr,
30480+ "%x was discarded before and is asked now...\n",
30481+ crc);
30482+ discardedCrcs[j] =
30483+ recordBufferedArrays[iMinUsed].crc;
30484+ break;
30485+ }
30486+ }
30487+ if (j == nDiscardedCrcs) {
30488+ discardedCrcs =
30489+ realloc(discardedCrcs,
30490+ sizeof(int) * (nDiscardedCrcs + 1));
30491+ discardedCrcs[nDiscardedCrcs++] =
30492+ recordBufferedArrays[iMinUsed].crc;
30493+ }
30494+ fprintf(stderr, "discarding %x\n",
30495+ recordBufferedArrays[iMinUsed].crc);
30496+
30497+ memorize_array = iMinUsed;
30498+ recordBufferedArrays[iMinUsed].n_used = 1;
30499+ recordBufferedArrays[iMinUsed].crc = crc;
30500+ recordBufferedArrays[iMinUsed].size = bytes_size;
30501+ recordBufferedArrays[iMinUsed].last_use = instr_count;
30502+ }
30503+
30504+ if (reuse_array != -1) {
30505+ WRITE_SHORT(reuse_array_func);
30506+ WRITE_SHORT(reuse_array);
30507+ } else if (memorize_array != -1) {
30508+ WRITE_SHORT(memorize_array_func);
30509+ WRITE_SHORT(memorize_array);
30510+ }
30511+ }
30512+
30513+ switch (func_number) {
30514+ case glXChooseVisual_func:
30515+ case glXQueryVersion_func:
30516+ case glXQueryExtension_func:
30517+ case glXGetClientString_func:
30518+ case glXQueryExtensionsString_func:
30519+ case glXQueryServerString_func:
30520+ case glXGetProcAddress_fake_func:
30521+ case glXGetProcAddress_global_fake_func:
30522+ case glXGetConfig_func:
30523+ case glXGetConfig_extended_func:
30524+ case glGetIntegerv_func:
30525+ case glGetFloatv_func:
30526+ case glGetBooleanv_func:
30527+ case glGetDoublev_func:
30528+ case glIsEnabled_func:
30529+ case _glGetError_fake_func:
30530+ case glGetString_func:
30531+ {
30532+ do_default = 0;
30533+ break;
30534+ }
30535+
30536+ case glLoadMatrixd_func:
30537+ {
30538+ int j;
30539+
30540+ WRITE_SHORT(glLoadMatrixf_func);
30541+ double *ptr = (double *) args[0];
30542+
30543+ for (j = 0; j < 16; j++) {
30544+ WRITE_FLOAT(ptr[j]);
30545+ }
30546+ do_default = 0;
30547+ break;
30548+ }
30549+
30550+ case glMultMatrixd_func:
30551+ {
30552+ int j;
30553+
30554+ WRITE_SHORT(glMultMatrixf_func);
30555+ double *ptr = (double *) args[0];
30556+
30557+ for (j = 0; j < 16; j++) {
30558+ WRITE_FLOAT(ptr[j]);
30559+ }
30560+ do_default = 0;
30561+ break;
30562+ }
30563+
30564+ case glTranslated_func:
30565+ {
30566+ WRITE_SHORT(glTranslatef_func);
30567+ WRITE_FLOAT(*(double *) args[0]);
30568+ WRITE_FLOAT(*(double *) args[1]);
30569+ WRITE_FLOAT(*(double *) args[2]);
30570+ do_default = 0;
30571+ break;
30572+ }
30573+
30574+ case glScalef_func:
30575+ {
30576+ if (*(float *) &args[0] == 1 && *(float *) &args[1] == 1
30577+ && *(float *) &args[2] == 1)
30578+ do_default = 0;
30579+ break;
30580+ }
30581+
30582+ case glScaled_func:
30583+ {
30584+ if (!
30585+ (*(double *) args[0] == 1 && *(double *) args[1] == 1
30586+ && *(double *) args[2] == 1)) {
30587+ WRITE_SHORT(glScalef_func);
30588+ WRITE_FLOAT(*(double *) args[0]);
30589+ WRITE_FLOAT(*(double *) args[1]);
30590+ WRITE_FLOAT(*(double *) args[2]);
30591+ }
30592+ do_default = 0;
30593+ break;
30594+ }
30595+
30596+ case glRotated_func:
30597+ {
30598+ WRITE_SHORT(glRotatef_func);
30599+ WRITE_FLOAT(*(double *) args[0]);
30600+ WRITE_FLOAT(*(double *) args[1]);
30601+ WRITE_FLOAT(*(double *) args[2]);
30602+ WRITE_FLOAT(*(double *) args[3]);
30603+ do_default = 0;
30604+ break;
30605+ }
30606+#define IS_SHORT(x) ((x) >= -32768 && (x) < 32768)
30607+
30608+ case glRasterPos2i_func:
30609+ {
30610+ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
30611+ WRITE_SHORT(glRasterPos2s_func);
30612+ WRITE_SHORT(args[0]);
30613+ WRITE_SHORT(args[1]);
30614+ do_default = 0;
30615+ }
30616+ break;
30617+ }
30618+
30619+ case glVertex2i_func:
30620+ {
30621+ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
30622+ WRITE_SHORT(glVertex2s_func);
30623+ WRITE_SHORT(args[0]);
30624+ WRITE_SHORT(args[1]);
30625+ do_default = 0;
30626+ }
30627+ break;
30628+ }
30629+
30630+ case glTexCoord2i_func:
30631+ {
30632+ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
30633+ WRITE_SHORT(glTexCoord2s_func);
30634+ WRITE_SHORT(args[0]);
30635+ WRITE_SHORT(args[1]);
30636+ do_default = 0;
30637+ }
30638+ break;
30639+ }
30640+
30641+ case glTexCoord2fv_func:
30642+ {
30643+ float *ptr = (float *) args[0];
30644+ float u = ptr[0];
30645+ float v = ptr[1];
30646+
30647+ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7) {
30648+ int ui = (int) u;
30649+ int vi = (int) v;
30650+
30651+ if (IS_SHORT(ui) && IS_SHORT(vi)) {
30652+ WRITE_SHORT(glTexCoord2s_func);
30653+ WRITE_SHORT(ui);
30654+ WRITE_SHORT(vi);
30655+ do_default = 0;
30656+ }
30657+ }
30658+ break;
30659+ }
30660+
30661+ case glTexCoord2f_func:
30662+ {
30663+ float u = *(float *) &args[0];
30664+ float v = *(float *) &args[1];
30665+
30666+ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7) {
30667+ int ui = (int) u;
30668+ int vi = (int) v;
30669+
30670+ if (IS_SHORT(ui) && IS_SHORT(vi)) {
30671+ WRITE_SHORT(glTexCoord2s_func);
30672+ WRITE_SHORT(ui);
30673+ WRITE_SHORT(vi);
30674+ do_default = 0;
30675+ }
30676+ }
30677+ break;
30678+ }
30679+
30680+ case glColor3f_func:
30681+ {
30682+ WRITE_SHORT(glColor3ub_func);
30683+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
30684+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
30685+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
30686+ do_default = 0;
30687+ break;
30688+ }
30689+
30690+ case glColor4f_func:
30691+ {
30692+ if (*(float *) &args[3] == 1) {
30693+ WRITE_SHORT(glColor3ub_func);
30694+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
30695+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
30696+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
30697+ } else {
30698+ WRITE_SHORT(glColor4ub_func);
30699+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
30700+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
30701+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
30702+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[3]);
30703+ }
30704+ do_default = 0;
30705+ break;
30706+ }
30707+
30708+ case glColor4fv_func:
30709+ {
30710+ float *ptr = (float *) args[0];
30711+
30712+ if (ptr[3] == 1) {
30713+ WRITE_SHORT(glColor3ub_func);
30714+ WRITE_UNSIGNED_CHAR(255 * ptr[0]);
30715+ WRITE_UNSIGNED_CHAR(255 * ptr[1]);
30716+ WRITE_UNSIGNED_CHAR(255 * ptr[2]);
30717+ } else {
30718+ WRITE_SHORT(glColor4ub_func);
30719+ WRITE_UNSIGNED_CHAR(255 * ptr[0]);
30720+ WRITE_UNSIGNED_CHAR(255 * ptr[1]);
30721+ WRITE_UNSIGNED_CHAR(255 * ptr[2]);
30722+ WRITE_UNSIGNED_CHAR(255 * ptr[3]);
30723+ }
30724+ do_default = 0;
30725+ break;
30726+ }
30727+
30728+ case glColor3d_func:
30729+ {
30730+ WRITE_SHORT(glColor3ub_func);
30731+ WRITE_UNSIGNED_CHAR(255 * *(double *) args[0]);
30732+ WRITE_UNSIGNED_CHAR(255 * *(double *) args[1]);
30733+ WRITE_UNSIGNED_CHAR(255 * *(double *) args[2]);
30734+ do_default = 0;
30735+ break;
30736+ }
30737+
30738+ case glVertex3f_func:
30739+ {
30740+ if (*(float *) &args[2] == 0) {
30741+ WRITE_SHORT(glVertex2f_func);
30742+ WRITE_FLOAT(*(float *) &args[0]);
30743+ WRITE_FLOAT(*(float *) &args[1]);
30744+ do_default = 0;
30745+ }
30746+ break;
30747+ }
30748+
30749+ case glVertex3d_func:
30750+ {
30751+ WRITE_SHORT(glVertex3f_func);
30752+ WRITE_FLOAT(*(double *) args[0]);
30753+ WRITE_FLOAT(*(double *) args[1]);
30754+ WRITE_FLOAT(*(double *) args[2]);
30755+ do_default = 0;
30756+ break;
30757+ }
30758+
30759+ case glNormal3fv_func:
30760+ {
30761+ float *ptr = (float *) args[0];
30762+ float u = ptr[0];
30763+ float v = ptr[1];
30764+ float w = ptr[2];
30765+
30766+ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7
30767+ && fabs(w - (int) w) < 1e-7) {
30768+ int ui = (int) u;
30769+ int vi = (int) v;
30770+ int wi = (int) w;
30771+
30772+ if (IS_SHORT(ui) && IS_SHORT(vi) && IS_SHORT(wi)) {
30773+ WRITE_SHORT(glNormal3sv_func);
30774+ WRITE_SHORT(ui);
30775+ WRITE_SHORT(vi);
30776+ WRITE_SHORT(wi);
30777+ do_default = 0;
30778+ }
30779+ }
30780+ break;
30781+ }
30782+
30783+ case glNormal3d_func:
30784+ {
30785+ WRITE_SHORT(glNormal3f_func);
30786+ WRITE_FLOAT(*(double *) args[0]);
30787+ WRITE_FLOAT(*(double *) args[1]);
30788+ WRITE_FLOAT(*(double *) args[2]);
30789+ do_default = 0;
30790+ break;
30791+ }
30792+
30793+ case glDrawElements_func:
30794+ {
30795+ int mode = args[0];
30796+ int count = args[1];
30797+ int type = args[2];
30798+
30799+ if (type == GL_UNSIGNED_INT) {
30800+ int j;
30801+ unsigned int *ptr = (unsigned int *) args[3];
30802+
30803+ for (j = 0; j < count; j++) {
30804+ if ((ptr[j] >> 16) != 0)
30805+ break;
30806+ }
30807+ if (j == count) {
30808+ WRITE_SHORT(func_number);
30809+ WRITE_INT(mode);
30810+ WRITE_INT(count);
30811+ WRITE_INT(GL_UNSIGNED_SHORT);
30812+ if (reuse_array != -1) {
30813+ WRITE_INT(0);
30814+ } else {
30815+ WRITE_INT(count * sizeof(short));
30816+ for (j = 0; j < count; j++) {
30817+ WRITE_SHORT(ptr[j]);
30818+ }
30819+ }
30820+ do_default = 0;
30821+ } else
30822+ do_default = 1;
30823+ } else if (reuse_array != -1) {
30824+ WRITE_SHORT(func_number);
30825+ WRITE_INT(mode);
30826+ WRITE_INT(count);
30827+ WRITE_INT(type);
30828+ WRITE_INT(0);
30829+ do_default = 0;
30830+ } else
30831+ do_default = 1;
30832+ break;
30833+ }
30834+
30835+ case glBufferDataARB_func:
30836+ {
30837+ if (reuse_array != -1) {
30838+ WRITE_SHORT(glBufferDataARB_func);
30839+ WRITE_INT(args[0]);
30840+ WRITE_INT(args[1]);
30841+ WRITE_INT(0);
30842+ WRITE_INT(args[3]);
30843+ do_default = 0;
30844+ }
30845+ break;
30846+ }
30847+
30848+ case glVertexPointer_fake_func:
30849+ case glTexCoordPointer_fake_func:
30850+ case glTexCoordPointer01_fake_func:
30851+ {
30852+ int offset = 0, index = 0, size, type, stride, bytes_size;
30853+ void *ptr;
30854+ int countarg = 0;
30855+
30856+ if (func_number == glVertexPointer_fake_func ||
30857+ func_number == glTexCoordPointer_fake_func)
30858+ offset = args[countarg++];
30859+ if (func_number == glTexCoordPointer_fake_func)
30860+ index = args[countarg++];
30861+ size = args[countarg++];
30862+ type = args[countarg++];
30863+ stride = args[countarg++];
30864+ bytes_size = args[countarg++];
30865+ ptr = (void *) args[countarg++];
30866+ if (type == GL_DOUBLE) {
30867+ int count;
30868+ int j, k;
30869+
30870+ if (stride == 0)
30871+ stride = size * sizeof(double);
30872+ assert((bytes_size % stride) == 0);
30873+ assert((offset % stride) == 0);
30874+ offset = (offset / stride) * size * sizeof(float);
30875+ count = bytes_size / stride;
30876+ WRITE_SHORT(func_number);
30877+ if (func_number == glVertexPointer_fake_func ||
30878+ func_number == glTexCoordPointer_fake_func)
30879+ WRITE_INT(offset);
30880+ if (func_number == glTexCoordPointer_fake_func)
30881+ WRITE_INT(index);
30882+ WRITE_INT(size);
30883+ WRITE_INT(GL_FLOAT);
30884+ WRITE_INT(0);
30885+ WRITE_INT(count * size * sizeof(float));
30886+ if (reuse_array != -1) {
30887+ WRITE_INT(0);
30888+ } else {
30889+ WRITE_INT(count * size * sizeof(float));
30890+ for (j = 0; j < count; j++) {
30891+ for (k = 0; k < size; k++) {
30892+ WRITE_FLOAT(*(double *)
30893+ (ptr + j * stride +
30894+ k * sizeof(double)));
30895+ }
30896+ }
30897+ }
30898+ do_default = 0;
30899+ } else if (reuse_array != -1) {
30900+ WRITE_SHORT(func_number);
30901+ if (func_number == glVertexPointer_fake_func ||
30902+ func_number == glTexCoordPointer_fake_func)
30903+ WRITE_INT(offset);
30904+ if (func_number == glTexCoordPointer_fake_func)
30905+ WRITE_INT(index);
30906+ WRITE_INT(size);
30907+ WRITE_INT(type);
30908+ WRITE_INT(stride);
30909+ WRITE_INT(bytes_size);
30910+ WRITE_INT(0);
30911+ do_default = 0;
30912+ } else
30913+ do_default = 1;
30914+ break;
30915+ }
30916+
30917+ default:
30918+ break;
30919+ }
30920+
30921+ if (do_default) {
30922+ fwrite(&func_number, sizeof(short), 1, compressed_file);
30923+ for (i = 0; i < nb_args; i++) {
30924+ switch (args_type[i]) {
30925+ case TYPE_UNSIGNED_CHAR:
30926+ case TYPE_CHAR:
30927+ {
30928+ char c = args[i];
30929+
30930+ fwrite(&c, sizeof(c), 1, compressed_file);
30931+ break;
30932+ }
30933+
30934+ case TYPE_UNSIGNED_SHORT:
30935+ case TYPE_SHORT:
30936+ {
30937+ short s = args[i];
30938+
30939+ fwrite(&s, sizeof(s), 1, compressed_file);
30940+ break;
30941+ }
30942+
30943+ case TYPE_UNSIGNED_INT:
30944+ case TYPE_INT:
30945+ case TYPE_FLOAT:{
30946+ int n = args[i];
30947+ fwrite(&n, sizeof(int), 1, compressed_file);
30948+ break;
30949+ }
30950+
30951+ case TYPE_NULL_TERMINATED_STRING:
30952+ CASE_IN_UNKNOWN_SIZE_POINTERS:
30953+ fwrite(&args_size[i], sizeof(int), 1,
30954+ compressed_file);
30955+ if (args_size[i]) {
30956+ fwrite((void *) args[i], args_size[i], 1,
30957+ compressed_file);
30958+ }
30959+ break;
30960+
30961+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
30962+ {
30963+ fwrite(&args_size[i], sizeof(int), 1,
30964+ compressed_file);
30965+ break;
30966+ }
30967+
30968+ CASE_OUT_KNOWN_SIZE_POINTERS:
30969+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
30970+ {
30971+ break;
30972+ }
30973+
30974+ case TYPE_DOUBLE:
30975+ CASE_IN_KNOWN_SIZE_POINTERS:
30976+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
30977+ fwrite((void *) args[i], args_size[i], 1,
30978+ compressed_file);
30979+ break;
30980+
30981+ case TYPE_IN_IGNORED_POINTER:
30982+ break;
30983+
30984+ default:
30985+ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
30986+ tab_opengl_calls_name[func_number], i);
30987+ do_disconnect_current();
30988+ return 0;
30989+ }
30990+ }
30991+ }
30992+ }
30993+
30994+ int new_offset = ftell(f);
30995+
30996+ if (show_offset ||
30997+ (show_diff_offset &&
30998+ new_offset - last_cmd_offset >= show_diff_offset)) {
30999+ fprintf(stderr, "offset = %d, diff=%d\n", new_offset,
31000+ new_offset - last_cmd_offset);
31001+ }
31002+ last_cmd_offset = new_offset;
31003+
31004+ if (func_number == glXCreateContext_func &&
31005+ args[1] == visualid_fbconfig_read) {
31006+ args[1] = visualid_fbconfig_real;
31007+ }
31008+ if (debug) {
31009+ if (func_number == glBindProgramARB_func) {
31010+ fprintf(stderr, "glBindProgramARB_func(y, x) : x = %d\n",
31011+ (int) args[1]);
31012+ } else if (func_number == glXGetProcAddress_fake_func) {
31013+ fprintf(stderr, "glXGetProcAddress_fake(%s)\n",
31014+ (char *) args[0]);
31015+ }
31016+ }
31017+
31018+ if (debug && func_number == glEnable_func) {
31019+ fprintf(stderr, "enable(0x%x)\n", (int) args[0]);
31020+ } else if (debug && func_number == glDisable_func) {
31021+ fprintf(stderr, "disable(0x%x)\n", (int) args[0]);
31022+ }
31023+
31024+ if (resize) {
31025+ if (func_number == _moveResizeWindow_func) {
31026+ int *params = (int *) args[1];
31027+
31028+ orig_window_width = params[2];
31029+ window_height = params[3] =
31030+ params[3] * window_width / params[2];
31031+ params[2] = window_width;
31032+ // buffer = malloc(4 * window_width * window_height);
31033+ } else if (func_number == glViewport_func ||
31034+ func_number == glScissor_func) {
31035+ args[0] = args[0] * window_width / orig_window_width;
31036+ args[1] = args[1] * window_width / orig_window_width;
31037+ args[2] = args[2] * window_width / orig_window_width;
31038+ args[3] = args[3] * window_width / orig_window_width;
31039+ }
31040+ } else if (func_number == _moveResizeWindow_func) {
31041+ int *params = (int *) args[1];
31042+
31043+ window_width = params[2];
31044+ window_height = params[3];
31045+ // buffer = malloc(4 * window_width * window_height);
31046+ }
31047+
31048+ int ret =
31049+ (noplay) ? 0 : do_function_call(func_number, args, ret_string);
31050+
31051+ if (func_number == glXSwapBuffers_func) {
31052+ /* glReadPixels(0, 0, window_width, window_height, GL_RGBA,
31053+ * GL_UNSIGNED_BYTE, buffer); fwrite(buffer, 4 * window_width *
31054+ * window_height, 1, fout); */
31055+
31056+ int diff_time;
31057+
31058+ count_current++;
31059+ gettimeofday(&current_time, NULL);
31060+ diff_time =
31061+ (current_time.tv_sec - last_time.tv_sec) * 1000 +
31062+ (current_time.tv_usec - last_time.tv_usec) / 1000;
31063+ if (diff_time > refresh_rate) {
31064+ printf("%d frames in %.1f seconds = %.3f FPS\n",
31065+ count_current - count_last_time, diff_time / 1000.,
31066+ (count_current - count_last_time) * 1000. / diff_time);
31067+ if (show_hard_disk_bandwith) {
31068+ int current_offset = ftell(f);
31069+
31070+ printf("bandwidth : %.1f MB/s\n",
31071+ (current_offset - last_offset) * 1e-6);
31072+ last_offset = current_offset;
31073+ }
31074+ last_time.tv_sec = current_time.tv_sec;
31075+ last_time.tv_usec = current_time.tv_usec;
31076+ count_last_time = count_current;
31077+ }
31078+ usleep(slowdown * 50000);
31079+ }
31080+ if (debug && func_number == glGenProgramsARB_func && args[0] == 1) {
31081+ fprintf(stderr, "glGenProgramsARB_func(1, &x) : x = %d\n",
31082+ *(int *) args[1]);
31083+ }
31084+
31085+ if (func_number == glXGetVisualFromFBConfig_func) {
31086+ fread(&visualid_fbconfig_read, sizeof(int), 1, f);
31087+ visualid_fbconfig_real = ret;
31088+ }
31089+
31090+ for (i = 0; i < nb_args; i++) {
31091+ switch (args_type[i]) {
31092+ case TYPE_UNSIGNED_INT:
31093+ case TYPE_INT:
31094+ case TYPE_UNSIGNED_CHAR:
31095+ case TYPE_CHAR:
31096+ case TYPE_UNSIGNED_SHORT:
31097+ case TYPE_SHORT:
31098+ case TYPE_FLOAT:
31099+ break;
31100+
31101+ case TYPE_NULL_TERMINATED_STRING:
31102+ CASE_POINTERS:
31103+ case TYPE_DOUBLE:
31104+ if (args[i])
31105+ free((void *) args[i]);
31106+ break;
31107+
31108+ case TYPE_IN_IGNORED_POINTER:
31109+ args[i] = 0;
31110+ break;
31111+
31112+ default:
31113+ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
31114+ tab_opengl_calls_name[func_number], i);
31115+ do_disconnect_current();
31116+ return 0;
31117+ }
31118+ }
31119+ }
31120+ return 0;
31121+}
31122Index: qemu-0.14.0/target-i386/opengl_server.c
31123===================================================================
31124--- /dev/null
31125+++ qemu-0.14.0/target-i386/opengl_server.c
31126@@ -0,0 +1,826 @@
31127+/*
31128+ * TCP/IP OpenGL server
31129+ *
31130+ * Copyright (c) 2007 Even Rouault
31131+ *
31132+ * Permission is hereby granted, free of charge, to any person obtaining a copy
31133+ * of this software and associated documentation files (the "Software"), to deal
31134+ * in the Software without restriction, including without limitation the rights
31135+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
31136+ * copies of the Software, and to permit persons to whom the Software is
31137+ * furnished to do so, subject to the following conditions:
31138+ *
31139+ * The above copyright notice and this permission notice shall be included in
31140+ * all copies or substantial portions of the Software.
31141+ *
31142+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31143+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31144+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
31145+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31146+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31147+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
31148+ * THE SOFTWARE.
31149+ */
31150+
31151+/* gcc -Wall -O2 -g opengl_server.c opengl_exec.c -o opengl_server -I../i386-softmmu -I. -I.. -lGL */
31152+
31153+#include <stdio.h>
31154+#include <errno.h>
31155+#include <stdlib.h>
31156+#include <unistd.h>
31157+#include <string.h>
31158+#include <assert.h>
31159+#include <sys/types.h>
31160+#include <sys/socket.h>
31161+#include <netinet/in.h>
31162+#include <netinet/tcp.h>
31163+#include <netdb.h>
31164+#include <arpa/inet.h>
31165+#include <sys/time.h>
31166+#include <signal.h>
31167+
31168+#include <X11/Xlib.h>
31169+#include <X11/Xutil.h>
31170+
31171+#define PORT 5555
31172+
31173+#define ENABLE_GL_LOG
31174+
31175+#include "opengl_func.h"
31176+#include "opengl_utils.h"
31177+
31178+static int refresh_rate = 1000;
31179+static int must_save = 0;
31180+static int timestamp = 1; /* only valid if must_save == 1. include timestamps in the save file to enable real-time playback */
31181+
31182+extern int display_function_call;
31183+extern void init_process_tab(void);
31184+extern int do_function_call(Display *, int, int, arg_t *, char *);
31185+extern void opengl_exec_set_local_connection(void);
31186+extern void opengl_exec_set_parent_window(Display *_dpy, Window _parent_window);
31187+
31188+#ifdef ENABLE_GL_LOG
31189+static FILE* f = NULL;
31190+
31191+static char* filename = "/tmp/debug_gl.bin";
31192+
31193+#define write_gl_debug_init() do { if (f == NULL) f = fopen(filename, "wb"); } while(0)
31194+
31195+static void inline write_gl_debug_cmd_char(char my_int)
31196+{
31197+ write_gl_debug_init();
31198+ fwrite(&my_int, sizeof(my_int), 1, f);
31199+}
31200+
31201+static void inline write_gl_debug_cmd_short(short my_int)
31202+{
31203+ write_gl_debug_init();
31204+ fwrite(&my_int, sizeof(my_int), 1, f);
31205+}
31206+
31207+static void inline write_gl_debug_cmd_int(int my_int)
31208+{
31209+ write_gl_debug_init();
31210+ fwrite(&my_int, sizeof(my_int), 1, f);
31211+}
31212+
31213+static void inline write_gl_debug_cmd_longlong(long long my_longlong)
31214+{
31215+ write_gl_debug_init();
31216+ fwrite(&my_longlong, sizeof(my_longlong), 1, f);
31217+}
31218+
31219+static void inline write_gl_debug_cmd_buffer_with_size(int size, void* buffer)
31220+{
31221+ write_gl_debug_init();
31222+ fwrite(&size, sizeof(int), 1, f);
31223+ if (size)
31224+ fwrite(buffer, size, 1, f);
31225+}
31226+
31227+static void inline write_gl_debug_cmd_buffer_without_size(int size, void* buffer)
31228+{
31229+ write_gl_debug_init();
31230+ if (size)
31231+ fwrite(buffer, size, 1, f);
31232+}
31233+
31234+static void inline write_gl_debug_end()
31235+{
31236+ write_gl_debug_init();
31237+ fclose(f);
31238+ f = NULL;
31239+}
31240+
31241+#endif
31242+
31243+static void write_sock_data(int sock, void* data, int len)
31244+{
31245+ if (len && data)
31246+ {
31247+ int offset = 0;
31248+ while(offset < len)
31249+ {
31250+ int nwritten = write(sock, data + offset, len - offset);
31251+ if (nwritten == -1)
31252+ {
31253+ if (errno == EINTR)
31254+ continue;
31255+ perror("write");
31256+ assert(nwritten != -1);
31257+ }
31258+ offset += nwritten;
31259+ }
31260+ }
31261+}
31262+
31263+static void inline write_sock_int(int sock, int my_int)
31264+{
31265+ write_sock_data(sock, &my_int, sizeof(int));
31266+}
31267+
31268+static int total_read = 0;
31269+static void read_sock_data(int sock, void* data, int len)
31270+{
31271+ if (len)
31272+ {
31273+ int offset = 0;
31274+ while(offset < len)
31275+ {
31276+ int nread = read(sock, data + offset, len - offset);
31277+ if (nread == -1)
31278+ {
31279+ if (errno == EINTR)
31280+ continue;
31281+ perror("read");
31282+ assert(nread != -1);
31283+ }
31284+ if (nread == 0)
31285+ {
31286+ fprintf(stderr, "nread = 0\n");
31287+ }
31288+ assert(nread > 0);
31289+ offset += nread;
31290+ total_read += nread;
31291+ }
31292+ }
31293+}
31294+
31295+static int inline read_sock_int(int sock)
31296+{
31297+ int ret;
31298+ read_sock_data(sock, &ret, sizeof(int));
31299+ return ret;
31300+}
31301+
31302+static short inline read_sock_short(int sock)
31303+{
31304+ short ret;
31305+ read_sock_data(sock, &ret, sizeof(short));
31306+ return ret;
31307+}
31308+
31309+
31310+static Display* dpy = NULL;
31311+static int parent_xid = -1;
31312+
31313+
31314+static struct timeval last_time, current_time, time_stamp_start;
31315+static int count_last_time = 0, count_current = 0;
31316+
31317+static struct timeval last_read_time, current_read_time;
31318+
31319+int has_x_error = 0;
31320+
31321+int
31322+read_from_client (int sock)
31323+{
31324+ arg_t args[50];
31325+ int args_size[50];
31326+ char ret_string[32768];
31327+ char command_buffer[65536*16];
31328+
31329+ if (dpy == NULL)
31330+ {
31331+ init_process_tab();
31332+ dpy = XOpenDisplay(NULL);
31333+ if (parent_xid != -1)
31334+ {
31335+ opengl_exec_set_parent_window(dpy, parent_xid);
31336+ }
31337+ }
31338+
31339+ int i;
31340+ int func_number = read_sock_short(sock);
31341+
31342+ Signature* signature = (Signature*)tab_opengl_calls[func_number];
31343+ int ret_type = signature->ret_type;
31344+ int nb_args = signature->nb_args;
31345+ int* args_type = signature->args_type;
31346+ int pid = 0;
31347+
31348+ if (func_number == _serialized_calls_func)
31349+ {
31350+ int command_buffer_size = read_sock_int(sock);
31351+ int commmand_buffer_offset = 0;
31352+ read_sock_data(sock, command_buffer, command_buffer_size);
31353+ /* TODO: must convert if client is different word size */
31354+
31355+#ifdef ENABLE_GL_LOG
31356+ if (must_save) write_gl_debug_cmd_short(_serialized_calls_func);
31357+#endif
31358+
31359+ while(commmand_buffer_offset < command_buffer_size)
31360+ {
31361+ func_number = *(short*)(command_buffer + commmand_buffer_offset);
31362+ if( ! (func_number >= 0 && func_number < GL_N_CALLS) )
31363+ {
31364+ fprintf(stderr, "func_number >= 0 && func_number < GL_N_CALLS failed at "
31365+ "commmand_buffer_offset=%d (command_buffer_size=%d)\n",
31366+ commmand_buffer_offset, command_buffer_size);
31367+ exit(-1);
31368+ }
31369+
31370+#ifdef ENABLE_GL_LOG
31371+ if (must_save) write_gl_debug_cmd_short(func_number);
31372+#endif
31373+ commmand_buffer_offset += sizeof(short);
31374+
31375+
31376+ signature = (Signature*)tab_opengl_calls[func_number];
31377+ ret_type = signature->ret_type;
31378+ assert(ret_type == TYPE_NONE);
31379+ nb_args = signature->nb_args;
31380+ args_type = signature->args_type;
31381+
31382+ for(i=0;i<nb_args;i++)
31383+ {
31384+ switch(args_type[i])
31385+ {
31386+ case TYPE_UNSIGNED_CHAR:
31387+ case TYPE_CHAR:
31388+ {
31389+ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
31390+#ifdef ENABLE_GL_LOG
31391+ if (must_save) write_gl_debug_cmd_char(args[i]);
31392+#endif
31393+ commmand_buffer_offset += sizeof(int);
31394+ break;
31395+ }
31396+
31397+ case TYPE_UNSIGNED_SHORT:
31398+ case TYPE_SHORT:
31399+ {
31400+ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
31401+#ifdef ENABLE_GL_LOG
31402+ if (must_save) write_gl_debug_cmd_short(args[i]);
31403+#endif
31404+ commmand_buffer_offset += sizeof(int);
31405+ break;
31406+ }
31407+
31408+ case TYPE_UNSIGNED_INT:
31409+ case TYPE_INT:
31410+ case TYPE_FLOAT:
31411+ {
31412+ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
31413+#ifdef ENABLE_GL_LOG
31414+ if (must_save) write_gl_debug_cmd_int(args[i]);
31415+#endif
31416+ commmand_buffer_offset += sizeof(int);
31417+ break;
31418+ }
31419+
31420+ case TYPE_NULL_TERMINATED_STRING:
31421+ CASE_IN_UNKNOWN_SIZE_POINTERS:
31422+ {
31423+ args_size[i] = *(int*)(command_buffer + commmand_buffer_offset);
31424+ commmand_buffer_offset += sizeof(int);
31425+
31426+ if (args_size[i] == 0)
31427+ {
31428+ args[i] = 0;
31429+ }
31430+ else
31431+ {
31432+ args[i] = (long)(command_buffer + commmand_buffer_offset);
31433+ }
31434+
31435+ if (args[i] == 0)
31436+ {
31437+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
31438+ {
31439+ fprintf(stderr, "call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31440+ return 0;
31441+ }
31442+ }
31443+#ifdef ENABLE_GL_LOG
31444+ if (must_save) write_gl_debug_cmd_buffer_with_size(args_size[i], (void*)args[i]);
31445+#endif
31446+ commmand_buffer_offset += args_size[i];
31447+
31448+ break;
31449+ }
31450+
31451+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31452+ {
31453+ args_size[i] = compute_arg_length(stderr, func_number, i, args);
31454+ args[i] = (args_size[i]) ? (long)(command_buffer + commmand_buffer_offset) : 0;
31455+#ifdef ENABLE_GL_LOG
31456+ if (must_save) write_gl_debug_cmd_buffer_without_size(args_size[i], (void*)args[i]);
31457+#endif
31458+ commmand_buffer_offset += args_size[i];
31459+ break;
31460+ }
31461+
31462+ CASE_OUT_POINTERS:
31463+ {
31464+ fprintf(stderr, "shouldn't happen TYPE_OUT_xxxx : call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31465+ return 0;
31466+ break;
31467+ }
31468+
31469+ case TYPE_DOUBLE:
31470+ CASE_IN_KNOWN_SIZE_POINTERS:
31471+ args[i] = (long)(command_buffer + commmand_buffer_offset);
31472+ args_size[i] = tab_args_type_length[args_type[i]];
31473+#ifdef ENABLE_GL_LOG
31474+ if (must_save) write_gl_debug_cmd_buffer_without_size(tab_args_type_length[args_type[i]], (void*)args[i]);
31475+#endif
31476+ commmand_buffer_offset += tab_args_type_length[args_type[i]];
31477+ break;
31478+
31479+ case TYPE_IN_IGNORED_POINTER:
31480+ args[i] = 0;
31481+ break;
31482+
31483+ default:
31484+ fprintf(stderr, "shouldn't happen : call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31485+ return 0;
31486+ break;
31487+ }
31488+ }
31489+
31490+ if (display_function_call) display_gl_call(stderr, func_number, args, args_size);
31491+
31492+ do_function_call(dpy, func_number, 1, args, ret_string);
31493+ }
31494+ }
31495+ else
31496+ {
31497+#ifdef ENABLE_GL_LOG
31498+ if (must_save && func_number != _synchronize_func) write_gl_debug_cmd_short(func_number);
31499+#endif
31500+
31501+ for(i=0;i<nb_args;i++)
31502+ {
31503+ switch(args_type[i])
31504+ {
31505+ case TYPE_UNSIGNED_CHAR:
31506+ case TYPE_CHAR:
31507+ args[i] = read_sock_int(sock);
31508+#ifdef ENABLE_GL_LOG
31509+ if (must_save) write_gl_debug_cmd_char(args[i]);
31510+#endif
31511+ break;
31512+
31513+ case TYPE_UNSIGNED_SHORT:
31514+ case TYPE_SHORT:
31515+ args[i] = read_sock_int(sock);
31516+#ifdef ENABLE_GL_LOG
31517+ if (must_save) write_gl_debug_cmd_short(args[i]);
31518+#endif
31519+ break;
31520+
31521+ case TYPE_UNSIGNED_INT:
31522+ case TYPE_INT:
31523+ case TYPE_FLOAT:
31524+ args[i] = read_sock_int(sock);
31525+#ifdef ENABLE_GL_LOG
31526+ if (must_save) write_gl_debug_cmd_int(args[i]);
31527+#endif
31528+ break;
31529+
31530+ case TYPE_NULL_TERMINATED_STRING:
31531+ CASE_IN_UNKNOWN_SIZE_POINTERS:
31532+ {
31533+ args_size[i] = read_sock_int(sock);
31534+ if (args_size[i])
31535+ {
31536+ args[i] = (long)malloc(args_size[i]);
31537+ read_sock_data(sock, (void*)args[i], args_size[i]);
31538+ }
31539+ else
31540+ {
31541+ args[i] = 0;
31542+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
31543+ {
31544+ fprintf(stderr, "call %s arg %d\n", tab_opengl_calls_name[func_number], i);
31545+ return 0;
31546+ }
31547+ }
31548+#ifdef ENABLE_GL_LOG
31549+ if (must_save) write_gl_debug_cmd_buffer_with_size(args_size[i], (void*)args[i]);
31550+#endif
31551+ break;
31552+ }
31553+
31554+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31555+ {
31556+ args_size[i] = compute_arg_length(stderr, func_number, i, args);
31557+ args[i] = (args_size[i]) ? (long)malloc(args_size[i]) : 0;
31558+ read_sock_data(sock, (void*)args[i], args_size[i]);
31559+#ifdef ENABLE_GL_LOG
31560+ if (must_save) write_gl_debug_cmd_buffer_without_size(args_size[i], (void*)args[i]);
31561+#endif
31562+ break;
31563+ }
31564+
31565+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31566+ {
31567+ args_size[i] = compute_arg_length(stderr, func_number, i, args);
31568+ args[i] = (long)malloc(args_size[i]);
31569+ break;
31570+ }
31571+
31572+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
31573+ {
31574+ args_size[i] = read_sock_int(sock);
31575+ if (func_number == glGetProgramLocalParameterdvARB_func)
31576+ {
31577+ fprintf(stderr, "size = %d\n", args_size[i]);
31578+ }
31579+ if (args_size[i])
31580+ {
31581+ args[i] = (long)malloc(args_size[i]);
31582+ }
31583+ else
31584+ {
31585+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
31586+ {
31587+ fprintf(stderr, "call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31588+ return 0;
31589+ };
31590+ args[i] = 0;
31591+ }
31592+ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
31593+#ifdef ENABLE_GL_LOG
31594+ if (must_save) write_gl_debug_cmd_int(args_size[i]);
31595+#endif
31596+ break;
31597+ }
31598+
31599+ CASE_OUT_KNOWN_SIZE_POINTERS:
31600+ {
31601+ args_size[i] = tab_args_type_length[args_type[i]];
31602+ assert(args_size[i]);
31603+ args[i] = (long)malloc(args_size[i]);
31604+ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
31605+ break;
31606+ }
31607+
31608+ case TYPE_DOUBLE:
31609+ CASE_IN_KNOWN_SIZE_POINTERS:
31610+ args_size[i] = tab_args_type_length[args_type[i]];
31611+ args[i] = (long)malloc(args_size[i]);
31612+ read_sock_data(sock, (void*)args[i], args_size[i]);
31613+#ifdef ENABLE_GL_LOG
31614+ if (must_save) write_gl_debug_cmd_buffer_without_size(tab_args_type_length[args_type[i]], (void*)args[i]);
31615+#endif
31616+ break;
31617+
31618+ case TYPE_IN_IGNORED_POINTER:
31619+ args[i] = 0;
31620+ break;
31621+
31622+ default:
31623+ fprintf(stderr, "shouldn't happen : call %s arg %d\n", tab_opengl_calls_name[func_number], i);
31624+ return 0;
31625+ break;
31626+ }
31627+ }
31628+
31629+ if (display_function_call) display_gl_call(stderr, func_number, args, args_size);
31630+
31631+ if (getenv("ALWAYS_FLUSH")) fflush(f);
31632+
31633+ int ret = do_function_call(dpy, func_number, 1, args, ret_string);
31634+#ifdef ENABLE_GL_LOG
31635+ if (must_save && func_number == glXGetVisualFromFBConfig_func)
31636+ {
31637+ write_gl_debug_cmd_int(ret);
31638+ }
31639+#endif
31640+
31641+ for(i=0;i<nb_args;i++)
31642+ {
31643+ switch(args_type[i])
31644+ {
31645+ case TYPE_UNSIGNED_INT:
31646+ case TYPE_INT:
31647+ case TYPE_UNSIGNED_CHAR:
31648+ case TYPE_CHAR:
31649+ case TYPE_UNSIGNED_SHORT:
31650+ case TYPE_SHORT:
31651+ case TYPE_FLOAT:
31652+ break;
31653+
31654+ case TYPE_NULL_TERMINATED_STRING:
31655+ case TYPE_DOUBLE:
31656+ CASE_IN_POINTERS:
31657+ if (args[i]) free((void*)args[i]);
31658+ break;
31659+
31660+ CASE_OUT_POINTERS:
31661+ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
31662+ write_sock_data(sock, (void*)args[i], args_size[i]);
31663+ if (display_function_call)
31664+ {
31665+ if (args_type[i] == TYPE_OUT_1INT)
31666+ {
31667+ fprintf(stderr, "out[%d] : %d\n", i, *(int*)args[i]);
31668+ }
31669+ else if (args_type[i] == TYPE_OUT_1FLOAT)
31670+ {
31671+ fprintf(stderr, "out[%d] : %f\n", i, *(float*)args[i]);
31672+ }
31673+ }
31674+ if (args[i]) free((void*)args[i]);
31675+ break;
31676+
31677+ case TYPE_IN_IGNORED_POINTER:
31678+ args[i] = 0;
31679+ break;
31680+
31681+ default:
31682+ fprintf(stderr, "shouldn't happen : call %s arg %d\n", tab_opengl_calls_name[func_number], i);
31683+ return 0;
31684+ break;
31685+ }
31686+ }
31687+
31688+ if (signature->ret_type == TYPE_CONST_CHAR)
31689+ {
31690+ write_sock_int(sock, strlen(ret_string) + 1);
31691+ write_sock_data(sock, ret_string, strlen(ret_string) + 1);
31692+ }
31693+ else if (signature->ret_type != TYPE_NONE)
31694+ {
31695+ write_sock_int(sock, ret);
31696+ }
31697+
31698+#ifdef ENABLE_GL_LOG
31699+ if (must_save && func_number == _exit_process_func)
31700+ {
31701+ write_gl_debug_end();
31702+ }
31703+#endif
31704+ if (func_number == _exit_process_func)
31705+ {
31706+ return -1;
31707+ }
31708+ else if (func_number == glXSwapBuffers_func)
31709+ {
31710+ int diff_time;
31711+ count_current++;
31712+ gettimeofday(&current_time, NULL);
31713+#ifdef ENABLE_GL_LOG
31714+ if (must_save && timestamp)
31715+ {
31716+ long long ts = (current_time.tv_sec - time_stamp_start.tv_sec) * (long long)1000000 + current_time.tv_usec - time_stamp_start.tv_usec;
31717+ /* -1 is special code that indicates time synchro */
31718+ write_gl_debug_cmd_short(timesynchro_func);
31719+ write_gl_debug_cmd_longlong(ts);
31720+ }
31721+#endif
31722+ diff_time = (current_time.tv_sec - last_time.tv_sec) * 1000 + (current_time.tv_usec - last_time.tv_usec) / 1000;
31723+ if (diff_time > refresh_rate)
31724+ {
31725+#ifdef ENABLE_GL_LOG
31726+ fflush(f);
31727+#endif
31728+ printf("%d frames in %.1f seconds = %.3f FPS\n",
31729+ count_current - count_last_time,
31730+ diff_time / 1000.,
31731+ (count_current - count_last_time) * 1000. / diff_time);
31732+ last_time.tv_sec = current_time.tv_sec;
31733+ last_time.tv_usec = current_time.tv_usec;
31734+ count_last_time = count_current;
31735+ }
31736+ }
31737+ }
31738+ return 0;
31739+}
31740+
31741+int
31742+make_socket (uint16_t port)
31743+{
31744+ int sock;
31745+ struct sockaddr_in name;
31746+
31747+ /* Create the socket. */
31748+ sock = socket (PF_INET, SOCK_STREAM, 0);
31749+ if (sock < 0)
31750+ {
31751+ perror ("socket");
31752+ exit (EXIT_FAILURE);
31753+ }
31754+
31755+ /* Give the socket a name. */
31756+ name.sin_family = AF_INET;
31757+ name.sin_port = htons (port);
31758+ name.sin_addr.s_addr = htonl (INADDR_ANY);
31759+ if (bind (sock, (struct sockaddr *) &name, sizeof (name)) < 0)
31760+ {
31761+ perror ("bind");
31762+ exit (EXIT_FAILURE);
31763+ }
31764+
31765+ return sock;
31766+}
31767+
31768+static int x_error_handler(Display *display,
31769+ XErrorEvent *error)
31770+{
31771+ char buf[64];
31772+ XGetErrorText(display, error->error_code, buf, 63);
31773+ fprintf (stderr, "The program received an X Window System error.\n"
31774+ "This probably reflects a bug in the program.\n"
31775+ "The error was '%s'.\n"
31776+ " (Details: serial %ld error_code %d request_code %d minor_code %d)\n",
31777+ buf,
31778+ error->serial,
31779+ error->error_code,
31780+ error->request_code,
31781+ error->minor_code);
31782+ has_x_error = 1;
31783+ return 0;
31784+}
31785+
31786+void usage()
31787+{
31788+ printf("Usage : opengl_server [OPTION]\n\n");
31789+ printf("The following options are available :\n");
31790+ printf("--port=XXXX : set XXX as the port number for the TCP/IP server (default : 5555)\n");
31791+ printf("--debug : output debugging trace on stderr\n");
31792+ printf("--save : dump the serialialized OpenGL flow in a file (default : /tmp/debug_gl.bin)\n");
31793+ printf("--filename=X : the file where to write the serailized OpenGL flow\n");
31794+ printf("--different-windows : even if the client is on 127.0.0.1, display OpenGL on a new X window\n");
31795+ printf("--parent-xid=XXX : use XXX as the XID of the parent X window where to display the OpenGL flow\n");
31796+ printf(" This is useful if you want to run accelerated OpenGL inside a non-patched QEMU\n");
31797+ printf(" or from another emulator, through TCP/IP\n");
31798+ printf("--h or --help : display this help\n");
31799+}
31800+
31801+int
31802+main (int argc, char* argv[])
31803+{
31804+ int sock;
31805+ fd_set active_fd_set, read_fd_set;
31806+ int i;
31807+ struct sockaddr_in clientname;
31808+ socklen_t size;
31809+ int port = PORT;
31810+ int different_windows = 0;
31811+
31812+ for(i=1;i<argc;i++)
31813+ {
31814+ if (argv[i][0] == '-' && argv[i][1] == '-')
31815+ argv[i] = argv[i]+1;
31816+
31817+ if (strcmp(argv[i], "-debug") == 0)
31818+ {
31819+ display_function_call = 1;
31820+ }
31821+ else if (strcmp(argv[i], "-save") == 0)
31822+ {
31823+ must_save = 1;
31824+ }
31825+ else if (strncmp(argv[i], "-port=",6) == 0)
31826+ {
31827+ port = atoi(argv[i] + 6);
31828+ }
31829+ else if (strncmp(argv[i], "-filename=",strlen("-filename=")) == 0)
31830+ {
31831+ filename = argv[i] + strlen("-filename=");
31832+ }
31833+ else if (strncmp(argv[i], "-parent-xid=",strlen("-parent-xid=")) == 0)
31834+ {
31835+ char* c = argv[i] + strlen("-parent-xid=");
31836+ parent_xid = strtol(c, NULL, 0);
31837+ different_windows = 1;
31838+ }
31839+ else if (strcmp(argv[i], "-different-windows") == 0)
31840+ {
31841+ different_windows = 1;
31842+ }
31843+ else if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "-help") == 0)
31844+ {
31845+ usage();
31846+ return 0;
31847+ }
31848+ else
31849+ {
31850+ fprintf(stderr, "unknown parameter : %s\n", argv[i]);
31851+ usage();
31852+ return -1;
31853+ }
31854+ }
31855+
31856+ /* Create the socket and set it up to accept connections. */
31857+ sock = make_socket (port);
31858+
31859+ int flag = 1;
31860+ if (setsockopt(sock, IPPROTO_IP, SO_REUSEADDR,(char *)&flag, sizeof(int)) != 0)
31861+ {
31862+ perror("setsockopt SO_REUSEADDR");
31863+ }
31864+ if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,(char *)&flag, sizeof(int)) != 0)
31865+ {
31866+ perror("setsockopt TCP_NODELAY");
31867+ }
31868+
31869+ if (listen (sock, 1) < 0)
31870+ {
31871+ perror ("listen");
31872+ exit (EXIT_FAILURE);
31873+ }
31874+
31875+ struct sigaction action;
31876+ action.sa_handler = SIG_IGN;
31877+ action.sa_flags = SA_NOCLDWAIT;
31878+ sigaction(SIGCHLD,&action,NULL);
31879+
31880+ FD_ZERO (&active_fd_set);
31881+ FD_SET (sock, &active_fd_set);
31882+
31883+ while(1)
31884+ {
31885+ int new, pid;
31886+
31887+ read_fd_set = active_fd_set;
31888+ if (select (FD_SETSIZE, &read_fd_set, NULL, NULL, NULL) < 0)
31889+ {
31890+ perror ("select");
31891+ exit (EXIT_FAILURE);
31892+ }
31893+
31894+ size = sizeof (clientname);
31895+ new = accept (sock, (struct sockaddr *) &clientname, &size);
31896+ if (new < 0)
31897+ {
31898+ perror ("accept");
31899+ exit (EXIT_FAILURE);
31900+ }
31901+ pid = fork();
31902+ if (pid == -1)
31903+ {
31904+ perror ("fork");
31905+ exit(EXIT_FAILURE);
31906+ }
31907+ if (pid == 0)
31908+ {
31909+ close(sock);
31910+
31911+ fprintf (stderr, "Server: connect from host %s, port %hd.\n",
31912+ inet_ntoa (clientname.sin_addr),
31913+ ntohs (clientname.sin_port));
31914+
31915+ gettimeofday(&last_time, NULL);
31916+ gettimeofday(&last_read_time, NULL);
31917+
31918+ if (strcmp(inet_ntoa(clientname.sin_addr), "127.0.0.1") == 0 &&
31919+ different_windows == 0)
31920+ {
31921+ opengl_exec_set_local_connection();
31922+ }
31923+
31924+ if (timestamp)
31925+ {
31926+ gettimeofday(&time_stamp_start, NULL);
31927+ }
31928+
31929+ XSetErrorHandler(x_error_handler);
31930+
31931+ while(1)
31932+ {
31933+ if (read_from_client (new) < 0)
31934+ {
31935+ do_function_call(dpy, _exit_process_func, 1, NULL, NULL);
31936+
31937+ fprintf (stderr, "Server: disconnect from host %s, port %hd.\n",
31938+ inet_ntoa (clientname.sin_addr),
31939+ ntohs (clientname.sin_port));
31940+
31941+ return 0;
31942+ }
31943+ }
31944+ }
31945+ else
31946+ {
31947+ close(new);
31948+ }
31949+ }
31950+
31951+ return 0;
31952+}
31953Index: qemu-0.14.0/target-i386/opengl_utils.h
31954===================================================================
31955--- /dev/null
31956+++ qemu-0.14.0/target-i386/opengl_utils.h
31957@@ -0,0 +1,453 @@
31958+/*
31959+ * Functions used by host & client sides
31960+ *
31961+ * Copyright (c) 2007 Even Rouault
31962+ *
31963+ * Permission is hereby granted, free of charge, to any person obtaining a copy
31964+ * of this software and associated documentation files (the "Software"), to deal
31965+ * in the Software without restriction, including without limitation the rights
31966+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
31967+ * copies of the Software, and to permit persons to whom the Software is
31968+ * furnished to do so, subject to the following conditions:
31969+ *
31970+ * The above copyright notice and this permission notice shall be included in
31971+ * all copies or substantial portions of the Software.
31972+ *
31973+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31974+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31975+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
31976+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31977+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31978+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
31979+ * THE SOFTWARE.
31980+ */
31981+
31982+
31983+#ifndef _OPENGL_UTILS
31984+#define _OPENGL_UTILS
31985+
31986+typedef struct {
31987+ unsigned int *values;
31988+ int nbValues;
31989+} RangeAllocator;
31990+
31991+/*
31992+static void print_range(RangeAllocator* range)
31993+{
31994+ int i;
31995+ printf("%s", "table : ");
31996+ for(i=0;i<range->nbValues;i++)
31997+ {
31998+ printf("%d ", range->values[i]);
31999+ }
32000+ printf("\n");
32001+}
32002+*/
32003+
32004+static inline void alloc_value(RangeAllocator *range, unsigned int value)
32005+{
32006+ if (value == 0)
32007+ return;
32008+ if (range->nbValues >= 1) {
32009+ int lower = 0;
32010+ int upper = range->nbValues - 1;
32011+
32012+ while (1) {
32013+ int mid = (lower + upper) / 2;
32014+
32015+ if (range->values[mid] > value)
32016+ upper = mid;
32017+ else if (range->values[mid] < value)
32018+ lower = mid;
32019+ else
32020+ break;
32021+ if (upper - lower <= 1) {
32022+ if (value < range->values[lower]) {
32023+ range->values =
32024+ realloc(range->values,
32025+ (range->nbValues + 1) * sizeof(int));
32026+ memmove(&range->values[lower + 1], &range->values[lower],
32027+ (range->nbValues - lower) * sizeof(int));
32028+ range->values[lower] = value;
32029+ range->nbValues++;
32030+ } else if (value == range->values[lower]) {
32031+ } else if (value < range->values[upper]) {
32032+ range->values =
32033+ realloc(range->values,
32034+ (range->nbValues + 1) * sizeof(int));
32035+ memmove(&range->values[upper + 1], &range->values[upper],
32036+ (range->nbValues - upper) * sizeof(int));
32037+ range->values[upper] = value;
32038+ range->nbValues++;
32039+ } else if (value == range->values[upper]) {
32040+ } else {
32041+ upper++;
32042+
32043+ range->values =
32044+ realloc(range->values,
32045+ (range->nbValues + 1) * sizeof(int));
32046+ memmove(&range->values[upper + 1], &range->values[upper],
32047+ (range->nbValues - upper) * sizeof(int));
32048+ range->values[upper] = value;
32049+ range->nbValues++;
32050+ }
32051+ break;
32052+ }
32053+ }
32054+ } else {
32055+ range->values = malloc(sizeof(int));
32056+ range->values[0] = value;
32057+ range->nbValues = 1;
32058+ }
32059+}
32060+
32061+/* return first value */
32062+static inline unsigned int alloc_range(RangeAllocator *range, int n,
32063+ unsigned int *values)
32064+{
32065+ int i, j;
32066+
32067+ if (range->nbValues == 0) {
32068+ range->nbValues = n;
32069+ range->values = malloc(n * sizeof(int));
32070+ for (i = 0; i < n; i++) {
32071+ range->values[i] = i + 1;
32072+ if (values)
32073+ values[i] = range->values[i];
32074+ }
32075+ return 1;
32076+ } else {
32077+ int lastValue = 1;
32078+
32079+ for (i = 0; i < range->nbValues; i++) {
32080+ if ((int) range->values[i] - (int) lastValue - 1 >= n) {
32081+ range->values =
32082+ realloc(range->values,
32083+ (range->nbValues + n) * sizeof(int));
32084+ memmove(&range->values[i + n], &range->values[i],
32085+ (range->nbValues - i) * sizeof(int));
32086+ for (j = 0; j < n; j++) {
32087+ range->values[i + j] = lastValue + 1 + j;
32088+ if (values)
32089+ values[j] = range->values[i + j];
32090+ }
32091+ range->nbValues += n;
32092+ break;
32093+ } else
32094+ lastValue = range->values[i];
32095+ }
32096+ if (i == range->nbValues) {
32097+ range->values =
32098+ realloc(range->values, (range->nbValues + n) * sizeof(int));
32099+ for (j = 0; j < n; j++) {
32100+ range->values[i + j] = lastValue + 1 + j;
32101+ if (values)
32102+ values[j] = range->values[i + j];
32103+ }
32104+ range->nbValues += n;
32105+ }
32106+ return lastValue + 1;
32107+ }
32108+}
32109+
32110+static inline void delete_value(RangeAllocator *range, unsigned int value)
32111+{
32112+ if (value == 0)
32113+ return;
32114+ if (range->nbValues >= 1) {
32115+ int lower = 0;
32116+ int upper = range->nbValues - 1;
32117+
32118+ while (1) {
32119+ int mid = (lower + upper) / 2;
32120+
32121+ if (range->values[mid] > value)
32122+ upper = mid;
32123+ else if (range->values[mid] < value)
32124+ lower = mid;
32125+ else {
32126+ lower = upper = mid;
32127+ }
32128+ if (upper - lower <= 1) {
32129+ if (value == range->values[lower]) {
32130+ memmove(&range->values[lower], &range->values[lower + 1],
32131+ (range->nbValues - lower - 1) * sizeof(int));
32132+ range->nbValues--;
32133+ } else if (value == range->values[upper]) {
32134+ memmove(&range->values[upper], &range->values[upper + 1],
32135+ (range->nbValues - upper - 1) * sizeof(int));
32136+ range->nbValues--;
32137+ }
32138+ break;
32139+ }
32140+ }
32141+ }
32142+}
32143+
32144+static inline void delete_range(RangeAllocator *range, int n,
32145+ const unsigned int *values)
32146+{
32147+ int i;
32148+
32149+ for (i = 0; i < n; i++) {
32150+ delete_value(range, values[i]);
32151+ }
32152+}
32153+
32154+static inline void delete_consecutive_values(RangeAllocator *range,
32155+ unsigned int first, int n)
32156+{
32157+ int i;
32158+
32159+ for (i = 0; i < n; i++) {
32160+ delete_value(range, first + i);
32161+ }
32162+}
32163+
32164+
32165+/*****************************************************************/
32166+/* */
32167+/* CRC LOOKUP TABLE */
32168+/* ================ */
32169+/* The following CRC lookup table was generated automagically */
32170+/* by the Rocksoft^tm Model CRC Algorithm Table Generation */
32171+/* Program V1.0 using the following model parameters: */
32172+/* */
32173+/* Width : 4 bytes. */
32174+/* Poly : 0x04C11DB7L */
32175+/* Reverse : TRUE. */
32176+/* */
32177+/* For more information on the Rocksoft^tm Model CRC Algorithm, */
32178+/* see the document titled "A Painless Guide to CRC Error */
32179+/* Detection Algorithms" by Ross Williams */
32180+/* (ross@guest.adelaide.edu.au.). This document is likely to be */
32181+/* in the FTP archive "ftp.adelaide.edu.au/pub/rocksoft". */
32182+/* */
32183+/*****************************************************************/
32184+
32185+static const unsigned int crctable[256] = {
32186+ 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,
32187+ 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
32188+ 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,
32189+ 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
32190+ 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,
32191+ 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
32192+ 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,
32193+ 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,
32194+ 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,
32195+ 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
32196+ 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,
32197+ 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
32198+ 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,
32199+ 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,
32200+ 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,
32201+ 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,
32202+ 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,
32203+ 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
32204+ 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,
32205+ 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
32206+ 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,
32207+ 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,
32208+ 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,
32209+ 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
32210+ 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,
32211+ 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,
32212+ 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,
32213+ 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,
32214+ 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,
32215+ 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
32216+ 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,
32217+ 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,
32218+ 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,
32219+ 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,
32220+ 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,
32221+ 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
32222+ 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,
32223+ 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,
32224+ 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,
32225+ 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
32226+ 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,
32227+ 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
32228+ 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,
32229+ 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,
32230+ 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,
32231+ 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,
32232+ 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,
32233+ 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
32234+ 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,
32235+ 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
32236+ 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,
32237+ 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,
32238+ 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,
32239+ 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
32240+ 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,
32241+ 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,
32242+ 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,
32243+ 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,
32244+ 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,
32245+ 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
32246+ 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,
32247+ 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,
32248+ 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,
32249+ 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
32250+};
32251+
32252+static unsigned int calc_checksum(const void *_ptr, int length,
32253+ unsigned int seed)
32254+{
32255+ int i;
32256+ unsigned int crc = seed;
32257+ unsigned char *ptr = (unsigned char *) _ptr;
32258+
32259+ if (ptr == NULL)
32260+ return -1;
32261+ for (i = 0; i < length; i++) {
32262+ crc = crctable[(crc ^ *ptr++) & 0xFF] ^ (crc >> 8);
32263+ }
32264+ return crc;
32265+}
32266+
32267+
32268+static inline void display_gl_call(FILE *f,
32269+ int func_number, arg_t *args, int *args_size)
32270+{
32271+ int i;
32272+
32273+ if (func_number < 0) {
32274+ fprintf(f, "unknown call : %d\n", func_number);
32275+ return;
32276+ }
32277+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
32278+ int nb_args = signature->nb_args;
32279+ int *args_type = signature->args_type;
32280+
32281+ fprintf(f, "%s(", tab_opengl_calls_name[func_number]);
32282+
32283+ for (i = 0; i < nb_args; i++) {
32284+ switch (args_type[i]) {
32285+ case TYPE_UNSIGNED_CHAR:
32286+ case TYPE_CHAR:
32287+ {
32288+ fprintf(f, "%d", (char) args[i]);
32289+ break;
32290+ }
32291+
32292+ case TYPE_UNSIGNED_SHORT:
32293+ case TYPE_SHORT:
32294+ {
32295+ fprintf(f, "%d", (short) args[i]);
32296+ break;
32297+ }
32298+
32299+ case TYPE_UNSIGNED_INT:
32300+ case TYPE_INT:
32301+ {
32302+ fprintf(f, "%d", (int) args[i]);
32303+ break;
32304+ }
32305+
32306+ case TYPE_FLOAT:
32307+ fprintf(f, "%f", *(float *) &args[i]);
32308+ break;
32309+
32310+ case TYPE_DOUBLE:
32311+ CASE_IN_KNOWN_SIZE_POINTERS:
32312+ case TYPE_NULL_TERMINATED_STRING:
32313+ CASE_IN_UNKNOWN_SIZE_POINTERS:
32314+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
32315+ if (args_type[i] == TYPE_NULL_TERMINATED_STRING) {
32316+ fprintf(f, "\"%s\"", (char *) args[i]);
32317+ } else if (args_type[i] == TYPE_DOUBLE)
32318+ fprintf(f, "%f", *(double *) args[i]);
32319+ else if (IS_ARRAY_CHAR(args_type[i]) &&
32320+ args_size[i] <= 4 * sizeof(char)) {
32321+ int j;
32322+ int n = args_size[i] / sizeof(char);
32323+
32324+ fprintf(f, "(");
32325+ for (j = 0; j < n; j++) {
32326+ fprintf(f, "%d", ((unsigned char *) args[i])[j]);
32327+ if (j != n - 1)
32328+ fprintf(f, ", ");
32329+ }
32330+ fprintf(f, ")");
32331+ } else if (IS_ARRAY_SHORT(args_type[i]) &&
32332+ args_size[i] <= 4 * sizeof(short)) {
32333+ int j;
32334+ int n = args_size[i] / sizeof(short);
32335+
32336+ fprintf(f, "(");
32337+ for (j = 0; j < n; j++) {
32338+ fprintf(f, "%d", ((short *) args[i])[j]);
32339+ if (j != n - 1)
32340+ fprintf(f, ", ");
32341+ }
32342+ fprintf(f, ")");
32343+ } else if (IS_ARRAY_INT(args_type[i]) &&
32344+ args_size[i] <= 4 * sizeof(int)) {
32345+ int j;
32346+ int n = args_size[i] / sizeof(int);
32347+
32348+ fprintf(f, "(");
32349+ for (j = 0; j < n; j++) {
32350+ fprintf(f, "%d", ((int *) args[i])[j]);
32351+ if (j != n - 1)
32352+ fprintf(f, ", ");
32353+ }
32354+ fprintf(f, ")");
32355+ } else if (IS_ARRAY_FLOAT(args_type[i]) &&
32356+ args_size[i] <= 4 * sizeof(float)) {
32357+ int j;
32358+ int n = args_size[i] / sizeof(float);
32359+
32360+ fprintf(f, "(");
32361+ for (j = 0; j < n; j++) {
32362+ fprintf(f, "%f", ((float *) args[i])[j]);
32363+ if (j != n - 1)
32364+ fprintf(f, ", ");
32365+ }
32366+ fprintf(f, ")");
32367+ } else if (IS_ARRAY_DOUBLE(args_type[i]) &&
32368+ args_size[i] <= 4 * sizeof(double)) {
32369+ int j;
32370+ int n = args_size[i] / sizeof(double);
32371+
32372+ fprintf(f, "(");
32373+ for (j = 0; j < n; j++) {
32374+ fprintf(f, "%f", ((double *) args[i])[j]);
32375+ if (j != n - 1)
32376+ fprintf(f, ", ");
32377+ }
32378+ fprintf(f, ")");
32379+ } else {
32380+ fprintf(f, "%d bytes", args_size[i]);
32381+ fprintf(f, "(crc = 0x%x)",
32382+ calc_checksum((void *) args[i], args_size[i],
32383+ 0xFFFFFFFF));
32384+ }
32385+ break;
32386+
32387+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
32388+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
32389+ CASE_OUT_KNOWN_SIZE_POINTERS:
32390+ {
32391+ fprintf(f, "%d bytes (OUT)", args_size[i]);
32392+ break;
32393+ }
32394+
32395+ case TYPE_IN_IGNORED_POINTER:
32396+ break;
32397+
32398+ default:
32399+ fprintf(f, "shouldn't happen : call %s arg %d\n",
32400+ tab_opengl_calls_name[func_number], i);
32401+ return;
32402+ break;
32403+ }
32404+ if (i < nb_args - 1)
32405+ fprintf(f, ", ");
32406+ }
32407+ fprintf(f, ")\n");
32408+}
32409+
32410+#endif
32411Index: qemu-0.14.0/target-i386/parse_gl_h.c
32412===================================================================
32413--- /dev/null
32414+++ qemu-0.14.0/target-i386/parse_gl_h.c
32415@@ -0,0 +1,1496 @@
32416+/*
32417+ * Parse gl.h et glx.h to auto-generate source code
32418+ *
32419+ * Copyright (c) 2006,2007 Even Rouault
32420+ *
32421+ * Permission is hereby granted, free of charge, to any person obtaining a copy
32422+ * of this software and associated documentation files (the "Software"), to deal
32423+ * in the Software without restriction, including without limitation the rights
32424+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
32425+ * copies of the Software, and to permit persons to whom the Software is
32426+ * furnished to do so, subject to the following conditions:
32427+ *
32428+ * The above copyright notice and this permission notice shall be included in
32429+ * all copies or substantial portions of the Software.
32430+ *
32431+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32432+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32433+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
32434+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
32435+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32436+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
32437+ * THE SOFTWARE.
32438+ */
32439+
32440+/* gcc -g parse_gl_h.c -o parse_gl_h && ./parse_gl_h */
32441+#include <stdio.h>
32442+#include <stdlib.h>
32443+#include <string.h>
32444+#include <assert.h>
32445+
32446+int isExtByName(const char* name)
32447+{
32448+ return (strstr(name, "ARB") != NULL) ||
32449+ (strstr(name, "IBM") != NULL) ||
32450+ (strstr(name, "EXT") != NULL) ||
32451+ (strstr(name, "ATI") != NULL) ||
32452+ (strstr(name, "NV") != NULL) ||
32453+ (strstr(name, "MESA") != NULL) ||
32454+ (strstr(name, "APPLE") != NULL) ||
32455+ (strstr(name, "SUN") != NULL) ||
32456+ (strstr(name, "SGI") != NULL);
32457+}
32458+
32459+char* get_arg_type(char* s)
32460+{
32461+ while(*s == ' ' || *s == '\t') s++;
32462+ char* n = s;
32463+ char* c = strstr(n, "const");
32464+ if (c)
32465+ n += 6;
32466+
32467+ char* t = strstr(n, " ");
32468+ if (t)
32469+ {
32470+ if (t[1] == '*')
32471+ t += 2;
32472+ t[0] = 0;
32473+ char* ori = t;
32474+ t = strstr(t+1, "[");
32475+ if (t)
32476+ {
32477+ memmove(ori, t, strlen(t));
32478+ strstr(ori, "]")[1] = 0;
32479+ }
32480+ }
32481+ return strdup(s);
32482+}
32483+
32484+typedef struct
32485+{
32486+ char* type;
32487+ char* name;
32488+ int nargs;
32489+ char** args;
32490+ int ok;
32491+ int just_for_server_side;
32492+ int has_out_parameters;
32493+ int isExt;
32494+} FuncDesc;
32495+
32496+int isExt(FuncDesc* func)
32497+{
32498+ return func->isExt;
32499+}
32500+
32501+char* get_type_string(char* type)
32502+{
32503+ if (strstr(type, "[16]"))
32504+ {
32505+ if (strstr(type, "float"))
32506+ return ("TYPE_16FLOAT");
32507+ else if (strstr(type, "double"))
32508+ return ("TYPE_16DOUBLE");
32509+ else
32510+ {
32511+ printf("inconnu %s\n", type);
32512+ exit(-1);
32513+ }
32514+ }
32515+ else if (strstr(type, "[128]") && strstr(type, "GLubyte"))
32516+ return strstr(type, "const") ? "TYPE_128UCHAR" : "TYPE_OUT_128UCHAR";
32517+ else if (strstr(type, "const GLvoid *"))
32518+ return "TYPE_ARRAY_VOID";
32519+ else if (strstr(type, "const GLchar *") ||
32520+ strstr(type, "const GLcharARB *"))
32521+ return "TYPE_NULL_TERMINATED_STRING";
32522+ else if (strstr(type, "const GLbyte *"))
32523+ return "TYPE_ARRAY_SIGNED_CHAR";
32524+ else if (strstr(type, "const GLubyte *"))
32525+ return "TYPE_ARRAY_UNSIGNED_CHAR";
32526+ else if (strstr(type, "const GLshort *"))
32527+ return "TYPE_ARRAY_SHORT";
32528+ else if (strstr(type, "const GLushort *") ||
32529+ strstr(type, "const GLhalfNV *"))
32530+ return "TYPE_ARRAY_UNSIGNED_SHORT";
32531+ else if (strstr(type, "const GLint *"))
32532+ return "TYPE_ARRAY_INT";
32533+ else if (strstr(type, "const GLuint *") ||
32534+ strstr(type, "const GLenum *"))
32535+ return "TYPE_ARRAY_UNSIGNED_INT";
32536+ else if (strstr(type, "const GLfloat *") ||
32537+ strstr(type, "const GLclampf *"))
32538+ return "TYPE_ARRAY_FLOAT";
32539+ else if (strstr(type, "const GLdouble *"))
32540+ return "TYPE_ARRAY_DOUBLE";
32541+ else if (strstr(type, "GLvoid *"))
32542+ return "TYPE_OUT_ARRAY_VOID";
32543+ else if (strstr(type, "GLboolean *") ||
32544+ strstr(type, "GLubyte *"))
32545+ return "TYPE_OUT_ARRAY_UNSIGNED_CHAR";
32546+ else if (strstr(type, "GLcharARB *") ||
32547+ strstr(type, "GLchar *"))
32548+ return "TYPE_OUT_ARRAY_CHAR";
32549+ else if (strstr(type, "GLshort *"))
32550+ return "TYPE_OUT_ARRAY_SHORT";
32551+ else if (strstr(type, "GLushort *"))
32552+ return "TYPE_OUT_ARRAY_UNSIGNED_SHORT";
32553+ else if (strstr(type, "GLint *")||
32554+ strstr(type, "GLsizei *"))
32555+ return "TYPE_OUT_ARRAY_INT";
32556+ else if (strstr(type, "GLuint *") ||
32557+ strstr(type, "GLenum *") ||
32558+ strstr(type, "GLhandleARB *"))
32559+ return "TYPE_OUT_ARRAY_UNSIGNED_INT";
32560+ else if (strstr(type, "GLfloat *"))
32561+ return "TYPE_OUT_ARRAY_FLOAT";
32562+ else if (strstr(type, "GLdouble *"))
32563+ return "TYPE_OUT_ARRAY_DOUBLE";
32564+ else if (strcmp(type, "void") == 0)
32565+ return("TYPE_NONE");
32566+ else if (strcmp(type, "GLbyte") == 0)
32567+ return("TYPE_CHAR");
32568+ else if (strcmp(type, "GLubyte") == 0 ||
32569+ strcmp(type, "GLboolean") == 0)
32570+ return("TYPE_UNSIGNED_CHAR");
32571+ else if (strcmp(type, "GLshort") == 0)
32572+ return("TYPE_SHORT");
32573+ else if (strcmp(type, "GLushort") == 0 ||
32574+ strcmp(type, "GLhalfNV") == 0)
32575+ return("TYPE_UNSIGNED_SHORT");
32576+ else if (strcmp(type, "GLint") == 0 ||
32577+ strcmp(type, "GLsizei") == 0 ||
32578+ strcmp(type, "GLintptr") == 0 ||
32579+ strcmp(type, "GLsizeiptr") == 0 ||
32580+ strcmp(type, "GLintptrARB") == 0 ||
32581+ strcmp(type, "GLsizeiptrARB") == 0)
32582+ return("TYPE_INT");
32583+ else if (strcmp(type, "GLenum") == 0 ||
32584+ strcmp(type, "GLuint") == 0 ||
32585+ strcmp(type, "GLhandleARB") == 0 ||
32586+ strcmp(type, "GLbitfield") == 0)
32587+ return("TYPE_UNSIGNED_INT");
32588+ else if (strcmp(type, "GLfloat") == 0 ||
32589+ strcmp(type, "GLclampf") == 0)
32590+ return("TYPE_FLOAT");
32591+ else if (strcmp(type, "GLdouble") == 0 ||
32592+ strcmp(type, "GLclampd") == 0)
32593+ return("TYPE_DOUBLE");
32594+ else
32595+ {
32596+ printf("inconnu %s\n", type);
32597+ exit(-1);
32598+ }
32599+}
32600+
32601+typedef struct
32602+{
32603+ char* letter;
32604+ char* signature_type_name;
32605+ char* gl_c_type_name;
32606+ char* c_type_name;
32607+} ForIsKnownArgVector;
32608+
32609+#define N_ELEMENTS(x) (sizeof(x)/sizeof(x[0]))
32610+#define N_FIELDS_IN_ARG_VECTOR 4
32611+
32612+
32613+typedef struct
32614+{
32615+ char* func_name;
32616+ char* signature_type_name;
32617+} KnownLastArgFunc;
32618+
32619+static KnownLastArgFunc knownLastArgFuncs[] =
32620+{
32621+{"glFogCoordfv", "TYPE_1FLOAT"},
32622+{"glFogCoorddv", "TYPE_1DOUBLE"},
32623+{"glFogCoordfvEXT", "TYPE_1FLOAT"},
32624+{"glFogCoorddvEXT", "TYPE_1DOUBLE"},
32625+{"glFogCoordhvNV", "TYPE_1USHORT"},
32626+
32627+{"glGetFenceivNV", "TYPE_OUT_1INT"},
32628+
32629+{"glGetTexLevelParameteriv", "TYPE_OUT_1INT" },
32630+{"glGetTexLevelParameterfv", "TYPE_OUT_1FLOAT" },
32631+
32632+{"glGetRenderbufferParameterivEXT", "TYPE_OUT_1INT"},
32633+{"glGetFramebufferAttachmentParameterivEXT", "TYPE_OUT_1INT"},
32634+{"glGetFinalCombinerInputParameterivNV", "TYPE_OUT_1INT"},
32635+{"glGetCombinerOutputParameterivNV", "TYPE_OUT_1INT"},
32636+{"glGetCombinerInputParameterivNV", "TYPE_OUT_1INT"},
32637+{"glGetOcclusionQueryivNV", "TYPE_OUT_1INT"},
32638+{"glGetOcclusionQueryuivNV", "TYPE_OUT_1UINT"},
32639+{"glGetObjectParameterivARB", "TYPE_OUT_1INT"},
32640+{"glGetQueryivARB", "TYPE_OUT_1INT"},
32641+{"glGetQueryiv", "TYPE_OUT_1INT"},
32642+{"glGetQueryObjectivARB", "TYPE_OUT_1INT"},
32643+{"glGetQueryObjectiv", "TYPE_OUT_1INT"},
32644+{"glGetQueryObjectuivARB", "TYPE_OUT_1UINT"},
32645+{"glGetQueryObjectuiv", "TYPE_OUT_1UINT"},
32646+{"glGetProgramivARB", "TYPE_OUT_1INT"},
32647+{"glGetProgramiv", "TYPE_OUT_1INT"},
32648+{"glGetProgramivNV", "TYPE_OUT_1INT"},
32649+{"glGetShaderiv", "TYPE_OUT_1INT"},
32650+
32651+{"glCombinerParameterfvNV", "TYPE_1FLOAT"},
32652+{"glCombinerParameterivNV", "TYPE_1INT"},
32653+
32654+{"glGetFinalCombinerInputParameterfvNV", "TYPE_OUT_1FLOAT"},
32655+{"glGetCombinerOutputParameterfvNV", "TYPE_OUT_1FLOAT"},
32656+{"glGetCombinerInputParameterfvNV", "TYPE_OUT_1FLOAT"},
32657+{"glGetObjectParameterfvARB", "TYPE_OUT_1FLOAT"},
32658+
32659+{"glCombinerStageParameterfvNV", "TYPE_4FLOAT"},
32660+{"glGetCombinerStageParameterfvNV", "TYPE_OUT_4FLOAT"},
32661+
32662+{"glTexBumpParameterivATI", "TYPE_1INT"},
32663+{"glTexBumpParameterfvATI", "TYPE_1FLOAT"},
32664+{"glGetTexBumpParameterivATI", "TYPE_OUT_1INT"},
32665+{"glGetTexBumpParameterfvATI", "TYPE_OUT_1FLOAT"},
32666+
32667+{"glGetProgramLocalParameterfvARB", "TYPE_OUT_4FLOAT"},
32668+{"glGetProgramLocalParameterdvARB", "TYPE_OUT_4DOUBLE"},
32669+{"glGetProgramEnvParameterfvARB", "TYPE_OUT_4FLOAT"},
32670+{"glGetProgramEnvParameterdvARB", "TYPE_OUT_4DOUBLE"},
32671+{"glGetProgramLocalParameterIivNV", "TYPE_OUT_1INT"},
32672+{"glGetProgramLocalParameterIuivNV", "TYPE_OUT_1UINT"},
32673+{"glGetProgramEnvParameterIivNV", "TYPE_OUT_1INT"},
32674+{"glGetProgramEnvParameterIuivNV", "TYPE_OUT_1UINT"},
32675+
32676+{"glGetProgramParameterfvNV", "TYPE_OUT_4FLOAT"},
32677+{"glGetProgramParameterdvNV", "TYPE_OUT_4DOUBLE"},
32678+{"glGetProgramNamedParameterfvNV", "TYPE_OUT_4FLOAT"},
32679+{"glGetProgramNamedParameterdvNV", "TYPE_OUT_4DOUBLE"},
32680+
32681+{"glCullParameterfvEXT", "TYPE_4FLOAT"},
32682+{"glCullParameterdvEXT", "TYPE_4DOUBLE"},
32683+
32684+{"glGetTrackMatrixivNV", "TYPE_OUT_1INT"},
32685+{"glExecuteProgramNV", "TYPE_4FLOAT"},
32686+
32687+{"glEdgeFlagv", "TYPE_1UCHAR"},
32688+
32689+{"glClipPlane", "TYPE_4DOUBLE"},
32690+{"glGetClipPlane", "TYPE_OUT_4DOUBLE"},
32691+
32692+{"glSetFragmentShaderConstantATI", "TYPE_4FLOAT"},
32693+
32694+{"glGetObjectBufferfvATI", "TYPE_OUT_1FLOAT"},
32695+{"glGetObjectBufferivATI", "TYPE_OUT_1INT"},
32696+{"glGetArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
32697+{"glGetArrayObjectivATI", "TYPE_OUT_1INT"},
32698+{"glGetVariantArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
32699+{"glGetVariantArrayObjectivATI", "TYPE_OUT_1INT"},
32700+{"glGetVertexAttribArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
32701+{"glGetVertexAttribArrayObjectivATI", "TYPE_OUT_1INT"},
32702+
32703+{"glPixelTransformParameterivEXT", "TYPE_1INT"},
32704+{"glPixelTransformParameterfvEXT", "TYPE_1FLOAT"},
32705+{"glGetPixelTransformParameterivEXT", "TYPE_OUT_1INT"},
32706+{"glGetPixelTransformParameterfvEXT", "TYPE_OUT_1FLOAT"},
32707+
32708+{"glColorTableParameterfv", "TYPE_4FLOAT"},
32709+{"glColorTableParameteriv", "TYPE_4INT"},
32710+{"glGetColorTableParameterfv", "TYPE_OUT_4FLOAT"},
32711+{"glGetColorTableParameteriv", "TYPE_OUT_4INT"},
32712+{"glColorTableParameterfvEXT", "TYPE_4FLOAT"},
32713+{"glColorTableParameterivEXT", "TYPE_4INT"},
32714+{"glGetColorTableParameterfvEXT", "TYPE_OUT_4FLOAT"},
32715+{"glGetColorTableParameterivEXT", "TYPE_OUT_4INT"},
32716+
32717+{"glGetMinmaxParameterfv", "TYPE_OUT_1FLOAT"},
32718+{"glGetMinmaxParameteriv", "TYPE_OUT_1INT"},
32719+{"glGetHistogramParameterfv", "TYPE_OUT_1FLOAT"},
32720+{"glGetHistogramParameteriv", "TYPE_OUT_1INT"},
32721+{"glGetMinmaxParameterfvEXT", "TYPE_OUT_1FLOAT"},
32722+{"glGetMinmaxParameterivEXT", "TYPE_OUT_1INT"},
32723+{"glGetHistogramParameterfvEXT", "TYPE_OUT_1FLOAT"},
32724+{"glGetHistogramParameterivEXT", "TYPE_OUT_1INT"},
32725+
32726+/* Not sure at all for the 2 followingo ones ! */
32727+{"glGetBooleanIndexedvEXT", "TYPE_OUT_4UCHAR"},
32728+{"glGetIntegerIndexedvEXT", "TYPE_OUT_4INT"},
32729+
32730+{"glReferencePlaneSGIX", "TYPE_4DOUBLE"},
32731+
32732+{"glGetTransformFeedbackVaryingNV", "TYPE_OUT_1INT"},
32733+
32734+};
32735+
32736+int is_known_arg_vector(FuncDesc* desc, char** p_signature_type_name, char** p_c_type_name)
32737+{
32738+ static ForIsKnownArgVector my_tab[] =
32739+ {
32740+ { "b", "CHAR", "GLbyte", "signed char" },
32741+ { "Boolean", "CHAR", "GLboolean", "unsigned char" },
32742+ { "s", "SHORT", "GLshort", "short" },
32743+ { "i", "INT", "GLint", "int" },
32744+ { "Integer", "INT", "GLint", "int" },
32745+ { "ub", "CHAR", "GLubyte", "unsigned char" },
32746+ { "h", "SHORT", "GLhalf", "unsigned short" },
32747+ { "us", "SHORT", "GLushort", "unsigned short" },
32748+ { "ui", "INT", "GLuint", "unsigned int" },
32749+ { "Nb", "CHAR", "GLbyte", "signed char" },
32750+ { "Ns", "SHORT", "GLshort", "short" },
32751+ { "Ni", "INT", "GLint", "int" },
32752+ { "Nub", "CHAR", "GLubyte", "unsigned char" },
32753+ { "Nus", "SHORT", "GLushort", "unsigned short" },
32754+ { "Nui", "INT", "GLuint", "unsigned int" },
32755+
32756+ { "f", "FLOAT", "GLfloat", "float" },
32757+ { "Float", "FLOAT", "GLfloat", "float" },
32758+ { "d", "DOUBLE", "GLdouble", "double" },
32759+ };
32760+
32761+ if (desc->nargs == 0)
32762+ return 0;
32763+
32764+ int i , j;
32765+
32766+ if (strstr(desc->name, "glVertexAttribs") ||
32767+ strstr(desc->name, "glProgramParameters") ||
32768+ strstr(desc->name, "glProgramEnvParameters") ||
32769+ strstr(desc->name, "glProgramLocalParameters") ||
32770+ (strstr(desc->name, "glUniform") && (strstr(desc->name, "iv") || strstr(desc->name, "fv"))))
32771+ return 0;
32772+
32773+ static char signatures[N_ELEMENTS(my_tab)][N_FIELDS_IN_ARG_VECTOR][20] = {0};
32774+ char signature[10];
32775+
32776+ for(i=0;i<N_ELEMENTS(knownLastArgFuncs);i++)
32777+ {
32778+ if (strcmp(desc->name, knownLastArgFuncs[i].func_name) == 0)
32779+ {
32780+ if (p_signature_type_name)
32781+ {
32782+ *p_signature_type_name = knownLastArgFuncs[i].signature_type_name;
32783+ }
32784+ if (p_c_type_name)
32785+ {
32786+ if (strstr(knownLastArgFuncs[i].signature_type_name, "FLOAT"))
32787+ *p_c_type_name = "float";
32788+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "DOUBLE"))
32789+ *p_c_type_name = "double";
32790+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "UINT"))
32791+ *p_c_type_name = "unsigned int";
32792+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "INT"))
32793+ *p_c_type_name = "int";
32794+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "USHORT"))
32795+ *p_c_type_name = "unsigned short";
32796+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "SHORT"))
32797+ *p_c_type_name = "short";
32798+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "UCHAR"))
32799+ *p_c_type_name = "unsigned char";
32800+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "CHAR"))
32801+ *p_c_type_name = "char";
32802+ else
32803+ assert(0);
32804+ }
32805+ return 1;
32806+ }
32807+ }
32808+
32809+ for(i=0;i<N_ELEMENTS(my_tab);i++)
32810+ {
32811+ for(j=1;j<=N_FIELDS_IN_ARG_VECTOR;j++)
32812+ {
32813+ if (strstr(desc->name, "glIndex") && strstr(desc->name, "v"))
32814+ sprintf(signature, "%sv", my_tab[i].letter);
32815+ else
32816+ sprintf(signature, "%d%sv", j, my_tab[i].letter);
32817+ if (strstr(desc->name, signature) &&
32818+ strstr(desc->args[desc->nargs - 1], my_tab[i].gl_c_type_name) &&
32819+ strstr(desc->args[desc->nargs - 1], "*"))
32820+ {
32821+ if (p_signature_type_name)
32822+ {
32823+ if (signatures[i][j-1][0] == 0)
32824+ sprintf(signatures[i][j-1], "TYPE_%d%s", j, my_tab[i].signature_type_name);
32825+ *p_signature_type_name = signatures[i][j-1];
32826+ }
32827+ if (p_c_type_name) *p_c_type_name = my_tab[i].c_type_name;
32828+ return 1;
32829+ }
32830+ }
32831+ }
32832+ return 0;
32833+}
32834+
32835+static void print_server_side_argument(FILE* server_stub, int j, char* glType)
32836+{
32837+ const char* symbolic_type = get_type_string(glType);
32838+ if (strcmp(symbolic_type, "TYPE_CHAR") == 0)
32839+ fprintf(server_stub, "ARG_TO_CHAR(args[%d])", j);
32840+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_CHAR") == 0)
32841+ fprintf(server_stub, "ARG_TO_UNSIGNED_CHAR(args[%d])", j);
32842+ else if (strcmp(symbolic_type, "TYPE_SHORT") == 0)
32843+ fprintf(server_stub, "ARG_TO_SHORT(args[%d])", j);
32844+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_SHORT") == 0)
32845+ fprintf(server_stub, "ARG_TO_UNSIGNED_SHORT(args[%d])", j);
32846+ else if (strcmp(symbolic_type, "TYPE_INT") == 0)
32847+ fprintf(server_stub, "ARG_TO_INT(args[%d])", j);
32848+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_INT") == 0)
32849+ fprintf(server_stub, "ARG_TO_UNSIGNED_INT(args[%d])", j);
32850+ else if (strcmp(symbolic_type, "TYPE_FLOAT") == 0)
32851+ fprintf(server_stub, "ARG_TO_FLOAT(args[%d])", j);
32852+ else if (strcmp(symbolic_type, "TYPE_16FLOAT") == 0)
32853+ fprintf(server_stub, "(const float*)(args[%d])", j);
32854+ else if (strcmp(symbolic_type, "TYPE_DOUBLE") == 0)
32855+ fprintf(server_stub, "ARG_TO_DOUBLE(args[%d])", j);
32856+ else if ( strcmp(symbolic_type, "TYPE_16DOUBLE") == 0)
32857+ fprintf(server_stub, "(const double*)(args[%d])", j);
32858+ else if ( strcmp(symbolic_type, "TYPE_OUT_128UCHAR") == 0)
32859+ fprintf(server_stub, "(unsigned char*)(args[%d])", j);
32860+ else if ( strcmp(symbolic_type, "TYPE_128UCHAR") == 0)
32861+ fprintf(server_stub, "(const unsigned char*)(args[%d])", j);
32862+ else if ( strcmp(symbolic_type, "TYPE_NULL_TERMINATED_STRING") == 0)
32863+ fprintf(server_stub, "(const char*)(args[%d])", j);
32864+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_SHORT") == 0)
32865+ fprintf(server_stub, "(const short*)(args[%d])", j);
32866+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_SHORT") == 0)
32867+ fprintf(server_stub, "(const unsigned short*)(args[%d])", j);
32868+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_INT") == 0)
32869+ fprintf(server_stub, "(const int*)(args[%d])", j);
32870+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_INT") == 0)
32871+ fprintf(server_stub, "(const unsigned int*)(args[%d])", j);
32872+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_FLOAT") == 0)
32873+ fprintf(server_stub, "(const float*)(args[%d])", j);
32874+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_DOUBLE") == 0)
32875+ fprintf(server_stub, "(const double*)(args[%d])", j);
32876+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_CHAR") == 0)
32877+ fprintf(server_stub, "(const char*)(args[%d])", j);
32878+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_SIGNED_CHAR") == 0)
32879+ fprintf(server_stub, "(const signed char*)(args[%d])", j);
32880+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_VOID") == 0)
32881+ fprintf(server_stub, "(const void*)(args[%d])", j);
32882+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_CHAR") == 0)
32883+ fprintf(server_stub, "(const unsigned char*)(args[%d])", j);
32884+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_SHORT") == 0)
32885+ fprintf(server_stub, "(short*)(args[%d])", j);
32886+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_SHORT") == 0)
32887+ fprintf(server_stub, "(unsigned short*)(args[%d])", j);
32888+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_INT") == 0)
32889+ fprintf(server_stub, "(int*)(args[%d])", j);
32890+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_INT") == 0)
32891+ fprintf(server_stub, "(unsigned int*)(args[%d])", j);
32892+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_FLOAT") == 0)
32893+ fprintf(server_stub, "(float*)(args[%d])", j);
32894+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_DOUBLE") == 0)
32895+ fprintf(server_stub, "(double*)(args[%d])", j);
32896+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_VOID") == 0)
32897+ fprintf(server_stub, "(void*)(args[%d])", j);
32898+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_CHAR") == 0)
32899+ fprintf(server_stub, "(char*)(args[%d])", j);
32900+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_CHAR") == 0)
32901+ fprintf(server_stub, "(unsigned char*)(args[%d])", j);
32902+
32903+ else
32904+ {
32905+ fprintf(stderr, "Unknown : %s\n", symbolic_type);
32906+ assert(0);
32907+ }
32908+}
32909+
32910+static const char* func_dealt_by_hand[500] = { NULL };
32911+
32912+
32913+static const char* ignore_func[] =
32914+{
32915+ "glGetPointerv",
32916+ "glRectdv",
32917+ "glRectfv",
32918+ "glRectiv",
32919+ "glRectsv",
32920+ "glMultiDrawArrays",
32921+ "glMultiDrawArraysEXT",
32922+ "glMultiDrawElements",
32923+ "glMultiDrawElementsEXT",
32924+ "glUnmapBuffer",
32925+ "glUnmapBufferARB",
32926+ "glLoadTransposeMatrixf",
32927+ "glLoadTransposeMatrixd",
32928+ "glMultTransposeMatrixf",
32929+ "glMultTransposeMatrixd",
32930+ "glLoadTransposeMatrixfARB",
32931+ "glLoadTransposeMatrixdARB",
32932+ "glMultTransposeMatrixfARB",
32933+ "glMultTransposeMatrixdARB",
32934+
32935+ "glPixelDataRangeNV",
32936+ "glFlushPixelDataRangeNV",
32937+ "glVertexArrayRangeNV",
32938+ "glFlushVertexArrayRangeNV",
32939+ "glVertexWeightfEXT",
32940+
32941+ "glGetBufferPointerv",
32942+ "glGetBufferPointervARB",
32943+ "glGetVertexAttribPointerv",
32944+ "glGetVertexAttribPointervARB",
32945+ "glVertexAttribPointer",
32946+ "glVertexAttribPointerARB",
32947+ "glGetVariantPointervEXT",
32948+ NULL,
32949+};
32950+
32951+void get_func_dealt_by_hand()
32952+{
32953+ FILE* f = fopen("../target-i386/gl_func_perso.h", "r");
32954+ char buffer[256];
32955+ int i = 0;
32956+ char* c;
32957+ while(fgets(buffer, 256, f))
32958+ {
32959+ if (strstr(buffer, "MAGIC_MACRO("))
32960+ {
32961+ func_dealt_by_hand[i] = strdup(strstr(buffer, "MAGIC_MACRO(") + strlen("MAGIC_MACRO("));
32962+ * strstr(func_dealt_by_hand[i], ")") = 0;
32963+ c = strstr(func_dealt_by_hand[i], "_");
32964+ if (c && c != func_dealt_by_hand[i]) *c = 0;
32965+ i ++;
32966+ }
32967+ }
32968+ fclose(f);
32969+
32970+ int j = 0;
32971+ while(ignore_func[j])
32972+ {
32973+ func_dealt_by_hand[i] = ignore_func[j];
32974+ i++;
32975+ j++;
32976+ }
32977+}
32978+
32979+static const char* just_for_server_side_list[] =
32980+{
32981+ "glEnableClientState",
32982+ "glDisableClientState",
32983+ "glPushClientAttrib",
32984+ "glPopClientAttrib",
32985+ "glPixelStorei",
32986+ "glPixelStoref",
32987+ "glClientActiveTexture",
32988+ "glClientActiveTextureARB",
32989+ "glEnableVertexAttribArray",
32990+ "glEnableVertexAttribArrayARB",
32991+ "glDisableVertexAttribArray",
32992+ "glDisableVertexAttribArrayARB",
32993+ "glDrawElementArrayATI",
32994+ "glDrawRangeElementArrayATI",
32995+ "glGenSymbolsEXT",
32996+ "glFreeObjectBufferATI",
32997+ "glUnmapObjectBufferATI",
32998+ "glLockArraysEXT",
32999+ "glUnlockArraysEXT",
33000+ "glDepthFunc",
33001+ "glFogf",
33002+ "glFogi",
33003+ "glClipPlane",
33004+ "glGetClipPlane",
33005+
33006+/* begin of openquartz optimization */
33007+#if 1
33008+ "glMatrixMode",
33009+ "glOrtho",
33010+ "glFrustum",
33011+ "glPushMatrix",
33012+ "glPopMatrix",
33013+ "glLoadIdentity",
33014+ "glLoadMatrixd",
33015+ "glLoadMatrixf",
33016+ "glMultMatrixd",
33017+ "glMultMatrixf",
33018+ "glRotated",
33019+ "glRotatef",
33020+ "glScaled",
33021+ "glScalef",
33022+ "glTranslated",
33023+ "glTranslatef",
33024+#endif
33025+/* end of openquartz optimization */
33026+
33027+ "glGetError",
33028+ "glActiveTextureARB",
33029+
33030+ "glViewport",
33031+ "glScissor",
33032+
33033+ "glBindBufferARB",
33034+ "glDeleteBuffersARB",
33035+ "glGenBuffersARB",
33036+ "glBufferDataARB",
33037+ "glBufferSubDataARB",
33038+ "glGetBufferSubDataARB",
33039+ "glGetBufferParameterivARB",
33040+ "glBindBuffer",
33041+ "glDeleteBuffers",
33042+ "glGenBuffers",
33043+ "glBufferData",
33044+ "glBufferSubData",
33045+ "glGetBufferSubData",
33046+ "glGetBufferParameteriv",
33047+
33048+ "glPushAttrib",
33049+ "glPopAttrib",
33050+ "glEnable",
33051+ "glDisable",
33052+ "glIsEnabled",
33053+ "glBindTexture",
33054+ "glBindTextureEXT",
33055+ "glFogfv",
33056+ "glFogiv",
33057+ "glBitmap",
33058+ "glGetTexImage",
33059+ "glReadPixels",
33060+ "glDrawPixels",
33061+ "glSelectBuffer",
33062+ "glFeedbackBuffer",
33063+
33064+ "glTexImage1D",
33065+ "glTexImage2D",
33066+ "glTexImage3D",
33067+ "glTexSubImage1D",
33068+ "glTexSubImage2D",
33069+ "glTexSubImage3D",
33070+
33071+ "glTexImage3DEXT",
33072+ "glTexSubImage1DEXT",
33073+ "glTexSubImage2DEXT",
33074+ "glTexSubImage3DEXT",
33075+
33076+ "glGetCompressedTexImage",
33077+ "glCompressedTexImage1D",
33078+ "glCompressedTexImage2D",
33079+ "glCompressedTexImage3D",
33080+ "glCompressedTexSubImage1D",
33081+ "glCompressedTexSubImage2D",
33082+ "glCompressedTexSubImage3D",
33083+
33084+ "glGetCompressedTexImageARB",
33085+ "glCompressedTexImage1DARB",
33086+ "glCompressedTexImage2DARB",
33087+ "glCompressedTexImage3DARB",
33088+ "glCompressedTexSubImage1DARB",
33089+ "glCompressedTexSubImage2DARB",
33090+ "glCompressedTexSubImage3DARB",
33091+
33092+ "glCallLists",
33093+ "glNewList",
33094+ "glDeleteLists",
33095+ "glGenLists",
33096+
33097+ "glGenTextures",
33098+ "glDeleteTextures",
33099+ "glDeleteTexturesEXT",
33100+ "glMap1f",
33101+ "glMap1d",
33102+ "glMap2f",
33103+ "glMap2d",
33104+ "glGetMapdv",
33105+ "glGetMapfv",
33106+ "glGetMapiv",
33107+ "glGetBooleanv",
33108+ "glGetIntegerv",
33109+ "glGetFloatv",
33110+ "glGetDoublev",
33111+
33112+ "glGetPixelMapfv",
33113+ "glGetPixelMapuiv",
33114+ "glGetPixelMapusv",
33115+ "glGetProgramStringARB",
33116+ "glGetProgramStringNV",
33117+ "glArrayElement",
33118+ "glDrawArrays",
33119+ "glDrawElements",
33120+ "glDrawRangeElements",
33121+ "glDrawRangeElementsEXT",
33122+ "glGetProgramInfoLog",
33123+ "glGetTexLevelParameteriv",
33124+ "glGetInfoLogARB",
33125+ "glGetShaderInfoLog",
33126+ "glGetAttachedObjectsARB",
33127+ "glGetAttachedShaders",
33128+ "glGetActiveUniformARB",
33129+ "glGetActiveUniform",
33130+ "glGetUniformLocationARB",
33131+ "glGetUniformLocation",
33132+ "glGetUniformfvARB",
33133+ "glGetUniformfv",
33134+ "glGetUniformivARB",
33135+ "glGetUniformiv",
33136+ "glGetUniformuivEXT",
33137+ "glGetShaderSourceARB",
33138+ "glGetShaderSource",
33139+ "glGetActiveAttribARB",
33140+ "glGetActiveAttrib",
33141+ "glGetAttribLocationARB",
33142+ "glGetAttribLocation",
33143+
33144+ "glNewObjectBufferATI",
33145+ "glUpdateObjectBufferATI",
33146+
33147+ "glSetLocalConstantEXT",
33148+ "glSetInvariantEXT",
33149+ "glVariantbvEXT",
33150+ "glVariantsvEXT",
33151+ "glVariantivEXT",
33152+ "glVariantfvEXT",
33153+ "glVariantdvEXT",
33154+ "glVariantubvEXT",
33155+ "glVariantusvEXT",
33156+ "glVariantuivEXT",
33157+ "glGetVariantBooleanvEXT",
33158+ "glGetVariantIntegervEXT",
33159+ "glGetVariantFloatvEXT",
33160+ "glGetInvariantBooleanvEXT",
33161+ "glGetInvariantIntegervEXT",
33162+ "glGetInvariantFloatvEXT",
33163+ "glGetLocalConstantBooleanvEXT",
33164+ "glGetLocalConstantIntegervEXT",
33165+ "glGetLocalConstantFloatvEXT",
33166+
33167+ "glMatrixIndexubvARB",
33168+ "glMatrixIndexusvARB",
33169+ "glMatrixIndexuivARB",
33170+
33171+ "glColorTable",
33172+ "glColorSubTable",
33173+ "glGetColorTable",
33174+ "glConvolutionFilter1D",
33175+ "glConvolutionFilter2D",
33176+ "glGetConvolutionFilter",
33177+ "glSeparableFilter2D",
33178+ "glGetSeparableFilter",
33179+ "glGetHistogram",
33180+ "glGetMinmax",
33181+ "glColorTableEXT",
33182+ "glColorSubTableEXT",
33183+ "glGetColorTableEXT",
33184+ "glConvolutionFilter1DEXT",
33185+ "glConvolutionFilter2DEXT",
33186+ "glGetConvolutionFilterEXT",
33187+ "glSeparableFilter2DEXT",
33188+ "glGetSeparableFilterEXT",
33189+ "glGetHistogramEXT",
33190+ "glGetMinmaxEXT",
33191+
33192+ "glGetTexParameterfv",
33193+
33194+ "glGetVertexAttribivARB",
33195+ "glGetVertexAttribfvARB",
33196+ "glGetVertexAttribdvARB",
33197+ "glGetVertexAttribiv",
33198+ "glGetVertexAttribfv",
33199+ "glGetVertexAttribdv",
33200+
33201+ "glGetDetailTexFuncSGIS",
33202+ "glGetSharpenTexFuncSGIS",
33203+
33204+ "fake_gluBuild2DMipmaps",
33205+
33206+ "glRenderMode",
33207+
33208+ "glEnableVariantClientStateEXT",
33209+ "glDisableVariantClientStateEXT",
33210+
33211+ "glGetActiveVaryingNV",
33212+
33213+ NULL,
33214+};
33215+
33216+static int just_for_server_side_func(char* funcname)
33217+{
33218+ int i;
33219+ for(i=0;just_for_server_side_list[i];i++)
33220+ {
33221+ if (strcmp(just_for_server_side_list[i], funcname) == 0)
33222+ return 1;
33223+ }
33224+ return 0;
33225+}
33226+
33227+int parse(FILE* f, FuncDesc* funcDesc, int funcDescCount, int ignoreEXT)
33228+{
33229+ char buffer[256];
33230+ while(fgets(buffer, 256, f))
33231+ {
33232+
33233+ if (strncmp(buffer, "GLAPI", 5) == 0 && strstr(buffer, "APIENTRY") && strstr(buffer, "("))
33234+ {
33235+ int i = 0;
33236+ int skip = 0;
33237+ if (func_dealt_by_hand[0] == 0)
33238+ {
33239+ get_func_dealt_by_hand();
33240+ }
33241+ while (func_dealt_by_hand[i])
33242+ {
33243+ if (strstr(buffer, func_dealt_by_hand[i]))
33244+ {
33245+ skip = 1;
33246+ break;
33247+ }
33248+ i++;
33249+ }
33250+ if (skip)
33251+ continue;
33252+
33253+ char** args = malloc(15 * sizeof(char*));
33254+ int narg = 0;
33255+ char* type = buffer + 6;
33256+ char* n = strstr(type, "GLAPIENTRY") ? strstr(type, "GLAPIENTRY") : strstr(type, "APIENTRY");
33257+ int skip_length = strstr(type, "GLAPIENTRY") ? 11 : 9;
33258+ n[-1] = 0;
33259+ type = strdup(type);
33260+ n += skip_length;
33261+ char* fonc = n;
33262+ n = strstr(n, "(");
33263+ if (n[-1] == ' ') n[-1] = 0;
33264+ n[0] = 0;
33265+ fonc = strdup(fonc);
33266+ /*if (strstr(fonc, "glLockArraysEXT") || strstr(fonc, "glUnlockArraysEXT"))
33267+ {
33268+ }
33269+ else*/
33270+
33271+
33272+ if (ignoreEXT == 1 && isExtByName(fonc))
33273+ {
33274+ free(type);
33275+ free(fonc);
33276+ continue;
33277+ }
33278+ n++;
33279+ while(1)
33280+ {
33281+ char* virg = strstr(n, ",");
33282+ if (virg)
33283+ {
33284+ args[narg] = n;
33285+ virg[0] = 0;
33286+ args[narg] = get_arg_type(args[narg]);
33287+ narg++;
33288+ n = virg+1;
33289+ }
33290+ else
33291+ break;
33292+ }
33293+ while (strstr(n, ")") == 0)
33294+ {
33295+ fgets(buffer, 256, f);
33296+ n = buffer;
33297+ while(1)
33298+ {
33299+ char* virg = strstr(n, ",");
33300+ if (virg)
33301+ {
33302+ args[narg] = n;
33303+ virg[0] = 0;
33304+ args[narg] = get_arg_type(args[narg]);
33305+ narg++;
33306+ n = virg+1;
33307+ }
33308+ else
33309+ break;
33310+ }
33311+ }
33312+ char* par = strstr(n, ")");
33313+ args[narg] = n;
33314+ par[0] = 0;
33315+ args[narg] = get_arg_type(args[narg]);
33316+ narg++;
33317+
33318+
33319+ /*printf("%s %s (", type, fonc);
33320+ for(i=0;i<narg;i++)
33321+ {
33322+ printf("%s,", args[i]);
33323+ }
33324+ printf(")\n");*/
33325+
33326+ for(i=0;i<funcDescCount;i++)
33327+ {
33328+ if (strcmp(funcDesc[i].name, fonc) == 0)
33329+ {
33330+ if (ignoreEXT == 0)
33331+ funcDesc[i].isExt = 1;
33332+ break;
33333+ }
33334+ }
33335+ if (i == funcDescCount)
33336+ {
33337+ funcDesc[funcDescCount].type = type;
33338+ funcDesc[funcDescCount].name = fonc;
33339+ funcDesc[funcDescCount].nargs = narg;
33340+ funcDesc[funcDescCount].args = args;
33341+ funcDesc[funcDescCount].isExt = ignoreEXT == 0;
33342+ funcDescCount++;
33343+ }
33344+ else
33345+ {
33346+ free(fonc);
33347+ free(args);
33348+ free(type);
33349+ }
33350+ /*
33351+ for(i=0;i<narg;i++)
33352+ {
33353+ free(args[i]);
33354+ }
33355+ free(fonc);
33356+ free(type);*/
33357+ }
33358+ }
33359+ return funcDescCount;
33360+}
33361+
33362+typedef struct
33363+{
33364+ char* str;
33365+ int i;
33366+} StringIntStruct;
33367+
33368+StringIntStruct argDependingOnPreviousArgTab[] =
33369+{
33370+ { "glLoadProgramNV", 3},
33371+ { "ProgramNamedParameter", 2},
33372+ { "glDeleteBuffers", 1},
33373+ { "glDrawBuffers", 1},
33374+ { "glGenPrograms", 1},
33375+ { "glDeletePrograms", 1},
33376+ { "glGenQueries", 1},
33377+ { "glDeleteQueries", 1},
33378+ { "glGenFencesNV", 1},
33379+ { "glDeleteFencesNV", 1},
33380+ { "glGenOcclusionQueriesNV", 1},
33381+ { "glDeleteOcclusionQueriesNV", 1},
33382+ { "glRequestResidentProgramsNV", 1},
33383+ { "glDeleteTextures", 1},
33384+ { "glGenFramebuffersEXT", 1},
33385+ { "glDeleteFramebuffersEXT", 1},
33386+ { "glGenRenderbuffersEXT", 1},
33387+ { "glDeleteRenderbuffersEXT", 1},
33388+ { "glUniform1fv", 2},
33389+ { "glUniform2fv", 2},
33390+ { "glUniform3fv", 2},
33391+ { "glUniform4fv", 2},
33392+ { "glUniform1iv", 2},
33393+ { "glUniform2iv", 2},
33394+ { "glUniform3iv", 2},
33395+ { "glUniform4iv", 2},
33396+ { "glUniform1uivEXT", 2},
33397+ { "glUniform2uivEXT", 2},
33398+ { "glUniform3uivEXT", 2},
33399+ { "glUniform4uivEXT", 2},
33400+ { "glProgramParameters4fvNV", 3},
33401+ { "glProgramParameters4dvNV", 3},
33402+ { "glProgramLocalParameters4fvEXT", 3},
33403+ { "glProgramLocalParametersI4ivNV", 3},
33404+ { "glProgramLocalParametersI4uivNV", 3},
33405+ { "glProgramEnvParameters4fvEXT", 3},
33406+ { "glProgramEnvParametersI4ivNV", 3},
33407+ { "glProgramEnvParametersI4uivNV", 3},
33408+ { "glAreProgramsResidentNV", 1} ,
33409+ { "glAreProgramsResidentNV", 2} ,
33410+ { "glAreTexturesResident", 1} ,
33411+ { "glAreTexturesResident", 2} ,
33412+ { "glPrioritizeTextures", 1} ,
33413+ { "glPrioritizeTextures", 2} ,
33414+ { "glProgramStringARB", 3} ,
33415+
33416+ { "glVertexAttribs", 2},
33417+
33418+ { "glUniformMatrix", 3 },
33419+
33420+ { "glGetVertexAttribfv", 2},
33421+ { "glGetVertexAttribiv", 2},
33422+ { "glGetVertexAttribdv", 2},
33423+ { "glGetVertexAttribIivEXT", 2},
33424+ { "glGetVertexAttribIuivEXT", 2},
33425+
33426+ { "glPointParameterfv", 1},
33427+ { "glPointParameteriv", 1},
33428+
33429+ { "glWeightbvARB", 1},
33430+ { "glWeightsvARB", 1},
33431+ { "glWeightivARB", 1},
33432+ { "glWeightfvARB", 1},
33433+ { "glWeightdvARB", 1},
33434+ { "glWeightubvARB", 1},
33435+ { "glWeightusvARB", 1},
33436+ { "glWeightuivARB", 1},
33437+
33438+ { "glTexEnvfv", 2},
33439+ { "glTexEnviv", 2},
33440+ { "glGetTexEnvfv", 2},
33441+ { "glGetTexEnviv", 2},
33442+ { "glTexGendv", 2},
33443+ { "glTexGenfv", 2},
33444+ { "glTexGeniv", 2},
33445+ { "glGetTexGendv", 2},
33446+ { "glGetTexGenfv", 2},
33447+ { "glGetTexGeniv", 2},
33448+
33449+ { "glLightfv", 2},
33450+ { "glLightiv", 2},
33451+ { "glGetLightfv", 2},
33452+ { "glGetLightiv", 2},
33453+ { "glFragmentLightfvSGIX", 2},
33454+ { "glFragmentLightivSGIX", 2},
33455+ { "glGetFragmentLightfvSGIX", 2},
33456+ { "glGetFragmentLightivSGIX", 2},
33457+
33458+
33459+ { "glLightModelfv", 1},
33460+ { "glLightModeliv", 1},
33461+ { "glFragmentLightModelfvSGIX", 1},
33462+ { "glFragmentLightModelivSGIX", 1},
33463+
33464+ { "glMaterialfv", 2},
33465+ { "glMaterialiv", 2},
33466+ { "glGetMaterialfv", 2},
33467+ { "glGetMaterialiv", 2},
33468+ { "glFragmentMaterialfvSGIX", 2},
33469+ { "glFragmentMaterialivSGIX", 2},
33470+ { "glGetFragmentMaterialfvSGIX", 2},
33471+ { "glGetFragmentMaterialivSGIX", 2},
33472+
33473+ { "glFogiv", 1},
33474+ { "glFogfv", 1},
33475+
33476+ { "glTexParameterfv", 2},
33477+ { "glTexParameteriv", 2},
33478+ { "glGetTexParameterfv", 2},
33479+ { "glGetTexParameteriv", 2},
33480+
33481+ { "glTexParameterIivEXT", 2},
33482+ { "glTexParameterIuivEXT", 2},
33483+ { "glGetTexParameterIivEXT", 2},
33484+ { "glGetTexParameterIuivEXT", 2},
33485+
33486+ { "glPixelMapfv", 2},
33487+ { "glPixelMapuiv", 2},
33488+ { "glPixelMapusv", 2},
33489+
33490+ { "glDetailTexFuncSGIS", 2 },
33491+ { "glSharpenTexFuncSGIS", 2 },
33492+
33493+ { "glSpriteParameterfvSGIX", 1 },
33494+ { "glSpriteParameterivSGIX", 1 },
33495+
33496+ { "ConvolutionParameter", 2},
33497+
33498+ { "glProgramBufferParametersfvNV", 4},
33499+ { "glProgramBufferParametersIivNV", 4},
33500+ { "glProgramBufferParametersIuivNV", 4},
33501+
33502+ { "glTransformFeedbackAttribsNV", 1},
33503+ { "glTransformFeedbackVaryingsNV", 2},
33504+};
33505+
33506+int is_arg_of_length_depending_on_previous_args(FuncDesc* funcDesc, int j)
33507+{
33508+ int i;
33509+ if (strstr(funcDesc->args[j], "*") == NULL)
33510+ return 0;
33511+ for(i=0;i< N_ELEMENTS(argDependingOnPreviousArgTab); i++)
33512+ {
33513+ if (strstr(funcDesc->name, argDependingOnPreviousArgTab[i].str) && j == argDependingOnPreviousArgTab[i].i)
33514+ return 1;
33515+ }
33516+ return 0;
33517+}
33518+
33519+static void fprintf_prototype_args(FILE* f, FuncDesc* funcDesc)
33520+{
33521+ int j;
33522+ for(j=0;j<funcDesc->nargs;j++)
33523+ {
33524+ if (j != 0) fprintf(f,", ");
33525+ if (strstr(funcDesc->args[j], "[16]"))
33526+ {
33527+ if (strstr(funcDesc->args[j], "float"))
33528+ {
33529+ fprintf(f, "const GLfloat arg_%d[16]", j);
33530+ }
33531+ else if (strstr(funcDesc->args[j], "double"))
33532+ {
33533+ fprintf(f, "const GLdouble arg_%d[16]", j);
33534+ }
33535+ else
33536+ {
33537+ exit(-1);
33538+ }
33539+ }
33540+ else if (strstr(funcDesc->args[j], "[128]") && strstr(funcDesc->args[j], "GLubyte"))
33541+ fprintf(f, (strstr(funcDesc->args[j], "const")) ? "const GLubyte* arg_%d" : "GLubyte* arg_%d", j);
33542+ else
33543+ fprintf(f, "%s arg_%d", funcDesc->args[j], j);
33544+ }
33545+}
33546+
33547+int main(int argc, char* argv[])
33548+{
33549+ FuncDesc funcDesc[3000];
33550+ int funcDescCount = 0;
33551+ FILE* f;
33552+
33553+ f = fopen("../target-i386/mesa_gl.h", "r");
33554+ assert(f);
33555+ /*if (!f)
33556+ f = fopen("/usr/include/GL/gl.h", "r");*/
33557+ funcDescCount = parse(f, funcDesc, 0, 1);
33558+ fclose(f);
33559+
33560+ f = fopen("../target-i386/mesa_glext.h", "r");
33561+ assert(f);
33562+ /*if (!f)
33563+ f = fopen("/usr/include/GL/glext.h", "r");*/
33564+ funcDescCount = parse(f, funcDesc, funcDescCount, 0);
33565+ fclose(f);
33566+
33567+ FILE* header = fopen("gl_func.h", "w");
33568+ FILE* client_stub = fopen("client_stub.c", "w");
33569+ FILE* server_stub = fopen("server_stub.c", "w");
33570+
33571+ fprintf(header, "/* This is a generated file. DO NOT EDIT ! */\n\n");
33572+ fprintf(header, "#define COMPOSE(x,y) x##y\n");
33573+ fprintf(header, "#define MAGIC_MACRO(x) COMPOSE(x,_func)\n");
33574+ fprintf(header, "enum {\n"
33575+ "#include \"gl_func_perso.h\"\n");
33576+
33577+ fprintf(client_stub, "/* This is a generated file. DO NOT EDIT ! */\n\n");
33578+
33579+ fprintf(server_stub, "/* This is a generated file. DO NOT EDIT ! */\n\n");
33580+
33581+ int i;
33582+ for(i=0;i<funcDescCount;i++)
33583+ {
33584+ funcDesc[i].ok = 0;
33585+ char* name = funcDesc[i].name;
33586+ char* type = funcDesc[i].type;
33587+ if ((strcmp(type, "void") == 0 || strcmp(type, "GLboolean") == 0 ||
33588+ strcmp(type, "GLuint") == 0 || strcmp(type, "GLint") == 0 ||
33589+ strcmp(type, "GLenum") == 0) || strcmp(type, "GLhandleARB") == 0 ||
33590+ strcmp(type, "GLhalf") == 0 || strcmp(type, "GLhalfNV") == 0)
33591+ {
33592+ int pointer_of_unknown_size = 0;
33593+ int j;
33594+
33595+ if (funcDesc[i].nargs == 1 && strcmp(funcDesc[i].args[0], "void") == 0)
33596+ {
33597+ funcDesc[i].nargs = 0;
33598+ }
33599+ for(j=0;j<funcDesc[i].nargs-1;j++)
33600+ {
33601+ if (!is_arg_of_length_depending_on_previous_args(&funcDesc[i], j) &&
33602+ strstr(funcDesc[i].args[j], "const GLchar") == NULL &&
33603+ strstr(funcDesc[i].args[j], "[16]") == NULL)
33604+ {
33605+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "*") != NULL;
33606+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "[") != NULL;
33607+ }
33608+ }
33609+
33610+ if (pointer_of_unknown_size == 0)
33611+ {
33612+ char* signature_type_name;
33613+ if (is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL))
33614+ {
33615+ if (strstr(signature_type_name, "TYPE_OUT"))
33616+ funcDesc[i].has_out_parameters = 1;
33617+ }
33618+ else
33619+ {
33620+ if (funcDesc[i].nargs-1 >= 0)
33621+ {
33622+ j = funcDesc[i].nargs-1;
33623+ if (!is_arg_of_length_depending_on_previous_args(&funcDesc[i], j) &&
33624+ strstr(funcDesc[i].args[j], "const GLchar") == NULL &&
33625+ strstr(funcDesc[i].args[j], "[16]") == NULL)
33626+ {
33627+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "*") != NULL;
33628+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "[") != NULL;
33629+ }
33630+ }
33631+ }
33632+ }
33633+ if (pointer_of_unknown_size && funcDesc[i].nargs == 1)
33634+ {
33635+ if (strstr(funcDesc[i].name, "Matrixf") || strstr(funcDesc[i].name, "Matrixd"))
33636+ {
33637+ free(funcDesc[i].args[0]);
33638+ if (strstr(funcDesc[i].name, "Matrixf"))
33639+ funcDesc[i].args[0] = strdup("GLfloat m[16]");
33640+ else
33641+ funcDesc[i].args[0] = strdup("GLdouble m[16]");
33642+ pointer_of_unknown_size = 0;
33643+ }
33644+ else if (strcmp(funcDesc[i].name, "glPolygonStipple") == 0)
33645+ {
33646+ free(funcDesc[i].args[0]);
33647+ funcDesc[i].args[0] = strdup("const GLubyte mask[128]");
33648+ pointer_of_unknown_size = 0;
33649+ }
33650+ else if (strcmp(funcDesc[i].name, "glGetPolygonStipple") == 0)
33651+ {
33652+ free(funcDesc[i].args[0]);
33653+ funcDesc[i].args[0] = strdup("GLubyte mask[128]");
33654+ funcDesc[i].has_out_parameters = 1;
33655+ pointer_of_unknown_size = 0;
33656+ }
33657+ }
33658+ if (just_for_server_side_func(name) || pointer_of_unknown_size == 0)
33659+ {
33660+ fprintf(header, " %s_func,\n", funcDesc[i].name);
33661+ funcDesc[i].ok = 1;
33662+ if (just_for_server_side_func(name))
33663+ funcDesc[i].just_for_server_side = 1;
33664+ for(j=0;j<funcDesc[i].nargs;j++)
33665+ {
33666+ if (strstr(get_type_string(funcDesc[i].args[j]), "OUT"))
33667+ funcDesc[i].has_out_parameters = 1;
33668+ }
33669+ }
33670+ else
33671+ {
33672+ fprintf(stderr, "not handled either manually or automatically : %s\n", funcDesc[i].name);
33673+ }
33674+ }
33675+ }
33676+
33677+ fprintf(header, " GL_N_CALLS\n};\n");
33678+
33679+
33680+ fprintf(server_stub, "void execute_func(int func_number, arg_t *args, int *pret_int, char *pret_char)\n");
33681+ fprintf(server_stub, "{\n");
33682+ fprintf(server_stub, " switch(func_number)\n");
33683+ fprintf(server_stub, " {\n");
33684+
33685+
33686+ for(i=0;i<funcDescCount;i++)
33687+ {
33688+ if (funcDesc[i].ok)
33689+ {
33690+ fprintf(header, "static const int %s_signature[] = { %s, %d, ",
33691+ funcDesc[i].name,
33692+ get_type_string(funcDesc[i].type),
33693+ funcDesc[i].has_out_parameters);
33694+ fprintf(header, "%d", funcDesc[i].nargs);
33695+ int j;
33696+ char* signature_type_name;
33697+ int n_args_to_check = is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL) ? funcDesc[i].nargs - 1 : funcDesc[i].nargs;
33698+
33699+ for(j=0;j<n_args_to_check;j++)
33700+ {
33701+ if (is_arg_of_length_depending_on_previous_args(&funcDesc[i], j))
33702+ {
33703+ fprintf(header, ", %s_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS", get_type_string(funcDesc[i].args[j]));
33704+ }
33705+ else
33706+ fprintf(header, ", %s", get_type_string(funcDesc[i].args[j]));
33707+ }
33708+
33709+ if (is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL))
33710+ {
33711+ fprintf(header, ", %s", signature_type_name);
33712+ }
33713+ fprintf(header, "};\n");
33714+
33715+
33716+ if (funcDesc[i].just_for_server_side == 0)
33717+ {
33718+ if (isExt(&funcDesc[i]))
33719+ fprintf(client_stub, "GLAPI %s APIENTRY EXT_FUNC(%s) (", funcDesc[i].type, funcDesc[i].name);
33720+ else
33721+ fprintf(client_stub, "GLAPI %s APIENTRY %s(", funcDesc[i].type, funcDesc[i].name);
33722+ fprintf_prototype_args(client_stub, &funcDesc[i]);
33723+ fprintf(client_stub, ")\n");
33724+ fprintf(client_stub, "{\n");
33725+ if (strcmp(funcDesc[i].type, "void") != 0)
33726+ {
33727+ fprintf(client_stub, " %s ret;\n", funcDesc[i].type);
33728+ if (isExt(&funcDesc[i]))
33729+ fprintf(client_stub, " CHECK_PROC_WITH_RET(%s);\n", funcDesc[i].name);
33730+ }
33731+ else
33732+ {
33733+ if (isExt(&funcDesc[i]))
33734+ fprintf(client_stub, " CHECK_PROC(%s);\n", funcDesc[i].name);
33735+ }
33736+
33737+ /*
33738+ fprintf(client_stub, " do_opengl_call(%s_func, %s",
33739+ funcDesc[i].name, (strcmp(funcDesc[i].type, "void") == 0) ? "NULL" : "&ret");
33740+ for(j=0;j<funcDesc[i].nargs;j++)
33741+ {
33742+ fprintf(client_stub, ", arg_%d", j);
33743+ }
33744+ fprintf(client_stub, ");\n");
33745+ */
33746+
33747+ if (funcDesc[i].nargs)
33748+ {
33749+ fprintf(client_stub, " long args[] = { ");
33750+ for(j=0;j<funcDesc[i].nargs;j++)
33751+ {
33752+ if (j > 0) fprintf(client_stub, ", ");
33753+ if (strstr(funcDesc[i].args[j], "*"))
33754+ {
33755+ fprintf(client_stub, "POINTER_TO_ARG(arg_%d)", j);
33756+ }
33757+ else
33758+ {
33759+ const char* symbolic_type = get_type_string(funcDesc[i].args[j]);
33760+ if (strcmp(symbolic_type, "TYPE_CHAR") == 0)
33761+ fprintf(client_stub, "CHAR_TO_ARG");
33762+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_CHAR") == 0)
33763+ fprintf(client_stub, "UNSIGNED_CHAR_TO_ARG");
33764+ else if (strcmp(symbolic_type, "TYPE_SHORT") == 0)
33765+ fprintf(client_stub, "SHORT_TO_ARG");
33766+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_SHORT") == 0)
33767+ fprintf(client_stub, "UNSIGNED_SHORT_TO_ARG");
33768+ else if (strcmp(symbolic_type, "TYPE_INT") == 0)
33769+ fprintf(client_stub, "INT_TO_ARG");
33770+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_INT") == 0)
33771+ fprintf(client_stub, "UNSIGNED_INT_TO_ARG");
33772+ else if (strcmp(symbolic_type, "TYPE_FLOAT") == 0)
33773+ fprintf(client_stub, "FLOAT_TO_ARG");
33774+ else if (strcmp(symbolic_type, "TYPE_16FLOAT") == 0)
33775+ fprintf(client_stub, "POINTER_TO_ARG");
33776+ else if (strcmp(symbolic_type, "TYPE_DOUBLE") == 0)
33777+ fprintf(client_stub, "DOUBLE_TO_ARG");
33778+ else if ( strcmp(symbolic_type, "TYPE_16DOUBLE") == 0)
33779+ fprintf(client_stub, "POINTER_TO_ARG");
33780+ else if ( strcmp(symbolic_type, "TYPE_128UCHAR") == 0 || strcmp(symbolic_type, "TYPE_OUT_128UCHAR") == 0)
33781+ fprintf(client_stub, "POINTER_TO_ARG");
33782+ else
33783+ {
33784+ fprintf(stderr, "Unknown : %s\n", symbolic_type);
33785+ assert(0);
33786+ }
33787+ fprintf(client_stub, "(arg_%d)", j);
33788+ }
33789+ }
33790+ fprintf(client_stub, "};\n");
33791+ }
33792+
33793+ fprintf(client_stub, " do_opengl_call(%s_func, %s, %s, NULL);\n",
33794+ funcDesc[i].name, (strcmp(funcDesc[i].type, "void") == 0) ? "NULL" : "&ret",
33795+ (funcDesc[i].nargs) ? "args" : "NULL");
33796+
33797+ if (strcmp(funcDesc[i].type, "void") != 0)
33798+ {
33799+ fprintf(client_stub, " return ret;\n");
33800+ }
33801+ fprintf(client_stub, "}\n\n");
33802+ }
33803+
33804+ fprintf(server_stub, " case %s_func:\n", funcDesc[i].name);
33805+ fprintf(server_stub, " {\n");
33806+
33807+ if (isExt(&funcDesc[i]))
33808+ {
33809+ fprintf(server_stub, " GET_EXT_PTR(%s, %s, (", funcDesc[i].type, funcDesc[i].name);
33810+ fprintf_prototype_args(server_stub, &funcDesc[i]);
33811+ fprintf(server_stub, "));\n");
33812+ }
33813+
33814+ fprintf(server_stub, " ");
33815+
33816+ if (strcmp(funcDesc[i].type, "void") == 0)
33817+ ;
33818+ else if (strcmp(get_type_string(funcDesc[i].type), "TYPE_INT") == 0 ||
33819+ strcmp(get_type_string(funcDesc[i].type), "TYPE_UNSIGNED_INT") == 0)
33820+ fprintf(server_stub, "*pret_int = ");
33821+ else if (strcmp(get_type_string(funcDesc[i].type), "TYPE_CHAR") == 0 ||
33822+ strcmp(get_type_string(funcDesc[i].type), "TYPE_UNSIGNED_CHAR") == 0)
33823+ fprintf(server_stub, "*pret_char = ");
33824+ else
33825+ {
33826+ fprintf(stderr, "unknown ret type = %s\n", get_type_string(funcDesc[i].type));
33827+ exit(-1);
33828+ }
33829+ /*if (strstr(funcDesc[i].name, "EXT"))
33830+ {
33831+ char* dup = strdup(funcDesc[i].name);
33832+ *strstr(dup, "EXT") = 0;
33833+ fprintf(server_stub, "%s(", dup);
33834+ free(dup);
33835+ }
33836+ else*/
33837+ {
33838+ if (isExt(&funcDesc[i]))
33839+ fprintf(server_stub, "ptr_func_%s(", funcDesc[i].name);
33840+ else
33841+ fprintf(server_stub, "%s(", funcDesc[i].name);
33842+ }
33843+ char* c_type_name;
33844+ if (is_known_arg_vector(&funcDesc[i], NULL, &c_type_name))
33845+ {
33846+ for(j=0;j<funcDesc[i].nargs - 1;j++)
33847+ {
33848+ if (j != 0) fprintf(server_stub,", ");
33849+ print_server_side_argument(server_stub, j, funcDesc[i].args[j]);
33850+ }
33851+ if (j != 0) fprintf(server_stub,", ");
33852+ if (strstr(funcDesc[i].args[funcDesc[i].nargs - 1], "const"))
33853+ fprintf(server_stub, "(const %s*)args[%d]", c_type_name, j);
33854+ else
33855+ fprintf(server_stub, "(%s*)args[%d]", c_type_name, j);
33856+ }
33857+ else
33858+ {
33859+ for(j=0;j<funcDesc[i].nargs;j++)
33860+ {
33861+ if (j != 0) fprintf(server_stub,", ");
33862+ print_server_side_argument(server_stub, j, funcDesc[i].args[j]);
33863+ }
33864+ }
33865+ fprintf(server_stub, ");\n");
33866+
33867+ fprintf(server_stub, " break;\n");
33868+ fprintf(server_stub, " }\n");
33869+ }
33870+ }
33871+
33872+ fprintf(server_stub, " default:\n");
33873+ fprintf(server_stub, " fprintf(stderr, \"unknown=%%d\", func_number);\n");
33874+ fprintf(server_stub, " break;\n");
33875+ fprintf(server_stub, " }\n");
33876+ fprintf(server_stub, "}\n");
33877+
33878+ fprintf(header, "#undef MAGIC_MACRO\n");
33879+ fprintf(header, "#define MAGIC_MACRO(x) COMPOSE(x,_signature)\n");
33880+ fprintf(header, "static const int* tab_opengl_calls[GL_N_CALLS] =\n");
33881+ fprintf(header, "{\n");
33882+ fprintf(header, "#include \"gl_func_perso.h\"\n");
33883+ for(i=0;i<funcDescCount;i++)
33884+ {
33885+ if (funcDesc[i].ok)
33886+ {
33887+ fprintf(header, " %s_signature,\n", funcDesc[i].name);
33888+ }
33889+ }
33890+ fprintf(header, "};\n\n");
33891+
33892+ fprintf(header, "#undef MAGIC_MACRO\n");
33893+ fprintf(header, "#define MAGIC_MACRO(x) #x\n");
33894+ fprintf(header, "static const char* tab_opengl_calls_name[GL_N_CALLS] =\n");
33895+ fprintf(header, "{\n");
33896+ fprintf(header, "#include \"gl_func_perso.h\"\n");
33897+ for(i=0;i<funcDescCount;i++)
33898+ {
33899+ if (funcDesc[i].ok)
33900+ {
33901+ fprintf(header, " \"%s\",\n", funcDesc[i].name);
33902+ }
33903+ }
33904+ fprintf(header, "};\n\n");
33905+
33906+ fclose(header);
33907+ fclose(server_stub);
33908+ fclose(client_stub);
33909+
33910+ return 0;
33911+}
33912Index: qemu-0.14.0/target-i386/parse_mesa_get_c.c
33913===================================================================
33914--- /dev/null
33915+++ qemu-0.14.0/target-i386/parse_mesa_get_c.c
33916@@ -0,0 +1,225 @@
33917+/*
33918+ * Parse the "get.c" from mesa source tree to generate "glgetv_cst.h"
33919+ *
33920+ * Copyright (c) 2007 Even Rouault
33921+ *
33922+ * Permission is hereby granted, free of charge, to any person obtaining a copy
33923+ * of this software and associated documentation files (the "Software"), to deal
33924+ * in the Software without restriction, including without limitation the rights
33925+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
33926+ * copies of the Software, and to permit persons to whom the Software is
33927+ * furnished to do so, subject to the following conditions:
33928+ *
33929+ * The above copyright notice and this permission notice shall be included in
33930+ * all copies or substantial portions of the Software.
33931+ *
33932+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
33933+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
33934+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
33935+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33936+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
33937+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
33938+ * THE SOFTWARE.
33939+ */
33940+
33941+// gcc -Wall parse_mesa_get_c.c -o parse_mesa_get_c -I. && ./parse_mesa_get_c
33942+
33943+#include <stdlib.h>
33944+#include <stdio.h>
33945+#include <string.h>
33946+#include <assert.h>
33947+
33948+#include "mesa_gl.h"
33949+#include "mesa_glext.h"
33950+
33951+/* #include "mesa_enums.c" */
33952+
33953+int gl_lookup_enum_by_name(const char* name)
33954+{
33955+ FILE* f;
33956+ char buffer[256];
33957+ char template1[256];
33958+ char template2[256];
33959+ int i;
33960+ sprintf(template1, "#define %s\t", name);
33961+ sprintf(template2, "#define %s ", name);
33962+ for(i=0;i<2;i++)
33963+ {
33964+ if (i == 0)
33965+ f = fopen("mesa_gl.h", "r");
33966+ else
33967+ f = fopen("mesa_glext.h", "r");
33968+ while(fgets(buffer, 256, f))
33969+ {
33970+ if (strstr(buffer, template1) || strstr(buffer, template2))
33971+ {
33972+ char* c = strstr(buffer, "0x");
33973+ assert(c);
33974+ int ret;
33975+ ret = strtol(c, NULL, 16);
33976+ return ret;
33977+ }
33978+ }
33979+ fclose(f);
33980+ }
33981+
33982+ return -1;
33983+}
33984+
33985+typedef struct
33986+{
33987+ int value;
33988+ char* name;
33989+ int nb_elts;
33990+} Token;
33991+
33992+int compare_func(Token* a, Token* b)
33993+{
33994+ return a->value - b->value;
33995+}
33996+
33997+typedef struct
33998+{
33999+ int i;
34000+ char* str;
34001+} Cpl;
34002+#define CPL(x) {x, #x}
34003+
34004+Cpl constantsOneVal[] =
34005+{
34006+ CPL(GL_MAX_GENERAL_COMBINERS_NV),
34007+ CPL(GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT),
34008+ CPL(GL_MAX_VERTEX_SHADER_VARIANTS_EXT),
34009+ CPL(GL_MAX_VERTEX_SHADER_INVARIANTS_EXT),
34010+ CPL(GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
34011+ CPL(GL_MAX_VERTEX_SHADER_LOCALS_EXT),
34012+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT),
34013+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT),
34014+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT),
34015+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
34016+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
34017+};
34018+#define NB_CONSTANTS_ONE_VAL 11
34019+
34020+int main(int argc, char* argv[])
34021+{
34022+ FILE* f = fopen("mesa_get.c", "r");
34023+ char buffer[256];
34024+ int state = 0;
34025+ char name[256];
34026+ int count = 0;
34027+ char template[256];
34028+ Token tokens[1000];
34029+ int ntoken = 0;
34030+ int i;
34031+ FILE* outf = fopen("glgetv_cst.h", "w");
34032+
34033+ fprintf(outf, "/* This is a generated file. Do not edit !*/\n");
34034+ fprintf(outf, "typedef struct {\n");
34035+ fprintf(outf, " GLuint count;\n");
34036+ fprintf(outf, " GLenum token;\n");
34037+ fprintf(outf, " const char *name;\n");
34038+ fprintf(outf, "} GlGetConstant ;\n");
34039+ fprintf(outf, "static const GlGetConstant gl_get_constants[] = {\n");
34040+
34041+ while(fgets(buffer, 256, f))
34042+ {
34043+ if (strstr(buffer, "_mesa_GetBooleanv"))
34044+ {
34045+ state = 1;
34046+ }
34047+ else if (state == 1)
34048+ {
34049+ if (strstr(buffer, "_mesa_GetFloatv"))
34050+ {
34051+ break;
34052+ }
34053+ else if (strstr(buffer, "case GL_"))
34054+ {
34055+ strcpy(name, strstr(buffer, "case GL_") + 5);
34056+ *strstr(name, ":") = 0;
34057+ count = 0;
34058+ strcpy(template, "params[0]");
34059+ }
34060+ else if (strstr(buffer, template))
34061+ {
34062+ count ++;
34063+ sprintf(template, "params[%d]", count);
34064+ }
34065+ else if (strstr(buffer, "break"))
34066+ {
34067+ if (count > 0)
34068+ {
34069+ int gl_lookup = gl_lookup_enum_by_name(name);
34070+ /*
34071+ int mesa_lookup = _mesa_lookup_enum_by_name(name);
34072+ if (mesa_lookup != -1)
34073+ {
34074+ if(mesa_lookup != gl_lookup)
34075+ {
34076+ fprintf(stderr, "wrong : %s %d %d !\n", name, mesa_lookup, gl_lookup);
34077+ exit(-1);
34078+ }
34079+ }*/
34080+ if (gl_lookup == -1)
34081+ {
34082+ fprintf(stderr, "not found in includes : %s\n", name);
34083+ //fprintf(outf, "/* { %d, unknown value, \"%s\" },*/\n", count, name);
34084+ }
34085+ else
34086+ {
34087+ //fprintf(outf, " { %d, 0x%04x, \"%s\" },\n", count, gl_lookup, name);
34088+ tokens[ntoken].value = gl_lookup;
34089+ tokens[ntoken].nb_elts = count;
34090+ tokens[ntoken].name = strdup(name);
34091+ ntoken++;
34092+ }
34093+ /*fprintf(outf, "#ifdef %s\n", name);
34094+ fprintf(outf, " { %d, MAKE_TOKEN_NAME(%s) },\n", count, name);
34095+ fprintf(outf, "#endif\n");*/
34096+ }
34097+ else
34098+ fprintf(stderr, "not recognized : %s\n", name);
34099+ }
34100+ }
34101+ }
34102+
34103+ for(i=0;i<NB_CONSTANTS_ONE_VAL;i++)
34104+ {
34105+ tokens[ntoken].value = constantsOneVal[i].i;
34106+ tokens[ntoken].nb_elts = 1;
34107+ tokens[ntoken].name = strdup(constantsOneVal[i].str);
34108+ ntoken++;
34109+ }
34110+
34111+ tokens[ntoken].value = GL_SPRITE_MODE_SGIX;
34112+ tokens[ntoken].nb_elts = 1;
34113+ tokens[ntoken].name = strdup("GL_SPRITE_MODE_SGIX");
34114+ ntoken++;
34115+
34116+ tokens[ntoken].value = GL_SPRITE_AXIS_SGIX ;
34117+ tokens[ntoken].nb_elts = 3;
34118+ tokens[ntoken].name = strdup("GL_SPRITE_AXIS_SGIX ");
34119+ ntoken++;
34120+
34121+ tokens[ntoken].value = GL_SPRITE_TRANSLATION_SGIX;
34122+ tokens[ntoken].nb_elts = 3;
34123+ tokens[ntoken].name = strdup("GL_SPRITE_TRANSLATION_SGIX");
34124+ ntoken++;
34125+
34126+ tokens[ntoken].value = GL_REFERENCE_PLANE_EQUATION_SGIX;
34127+ tokens[ntoken].nb_elts = 4;
34128+ tokens[ntoken].name = strdup("GL_REFERENCE_PLANE_EQUATION_SGIX");
34129+ ntoken++;
34130+
34131+
34132+ qsort(tokens, ntoken, sizeof(Token), compare_func);
34133+ for(i=0;i<ntoken;i++)
34134+ {
34135+ fprintf(outf, " { %d, 0x%04x, \"%s\" },\n", tokens[i].nb_elts, tokens[i].value, tokens[i].name);
34136+ }
34137+ fprintf(outf, "};\n");
34138+ fclose(f);
34139+ fclose(outf);
34140+ return 0;
34141+}
34142Index: qemu-0.14.0/target-i386/translate.c
34143===================================================================
34144--- qemu-0.14.0.orig/target-i386/translate.c
34145+++ qemu-0.14.0/target-i386/translate.c
34146@@ -723,6 +723,8 @@ static void gen_check_io(DisasContext *s
34147 int state_saved;
34148 target_ulong next_eip;
34149
34150+ return;
34151+
34152 state_saved = 0;
34153 if (s->pe && (s->cpl > s->iopl || s->vm86)) {
34154 if (s->cc_op != CC_OP_DYNAMIC)
34155@@ -2650,11 +2652,18 @@ static void gen_exception(DisasContext *
34156 s->is_jmp = DISAS_TB_JUMP;
34157 }
34158
34159+int enable_gl = 0;
34160+
34161 /* an interrupt is different from an exception because of the
34162 privilege checks */
34163 static void gen_interrupt(DisasContext *s, int intno,
34164 target_ulong cur_eip, target_ulong next_eip)
34165 {
34166+ if (enable_gl && intno == 0x99) {
34167+ gen_helper_opengl();
34168+ return;
34169+ }
34170+
34171 if (s->cc_op != CC_OP_DYNAMIC)
34172 gen_op_set_cc_op(s->cc_op);
34173 gen_jmp_im(cur_eip);
34174Index: qemu-0.14.0/vl.c
34175===================================================================
34176--- qemu-0.14.0.orig/vl.c
34177+++ qemu-0.14.0/vl.c
34178@@ -222,12 +222,14 @@ QEMUOptionRom option_rom[MAX_OPTION_ROMS
34179 int nb_option_roms;
34180 int semihosting_enabled = 0;
34181 int old_param = 0;
34182+int force_pointer = 0;
34183 const char *qemu_name;
34184 int alt_grab = 0;
34185 int ctrl_grab = 0;
34186 unsigned int nb_prom_envs = 0;
34187 const char *prom_envs[MAX_PROM_ENVS];
34188 int boot_menu;
34189+extern int enable_gl;
34190
34191 typedef struct FWBootEntry FWBootEntry;
34192
34193@@ -1525,6 +1527,8 @@ static void select_vgahw (const char *p)
34194 } else if (strstart(p, "qxl", &opts)) {
34195 vga_interface_type = VGA_QXL;
34196 } else if (!strstart(p, "none", &opts)) {
34197+ }
34198+ else {
34199 invalid_vga:
34200 fprintf(stderr, "Unknown vga type: %s\n", p);
34201 exit(1);
34202@@ -2648,6 +2652,9 @@ int main(int argc, char **argv, char **e
34203 case QEMU_OPTION_old_param:
34204 old_param = 1;
34205 break;
34206+ case QEMU_OPTION_force_pointer:
34207+ force_pointer = 1;
34208+ break;
34209 case QEMU_OPTION_clock:
34210 configure_alarms(optarg);
34211 break;
34212@@ -2661,6 +2668,12 @@ int main(int argc, char **argv, char **e
34213 }
34214 configure_rtc(opts);
34215 break;
34216+#ifdef TARGET_OPENGL_OK
34217+ case QEMU_OPTION_enable_gl:
34218+ fprintf(stderr, "Enabling opengl\n");
34219+ enable_gl = 1;
34220+ break;
34221+#endif
34222 case QEMU_OPTION_tb_size:
34223 tb_size = strtol(optarg, NULL, 0);
34224 if (tb_size < 0)
34225@@ -3018,6 +3031,14 @@ int main(int argc, char **argv, char **e
34226 if (foreach_device_config(DEV_USB, usb_parse) < 0)
34227 exit(1);
34228 }
34229+#ifdef TARGET_OPENGL_OK
34230+ if (enable_gl) {
34231+ /* Use second serial port */
34232+ int opengl_serial = 1;
34233+
34234+ add_device_config(DEV_SERIAL, "opengl");
34235+ }
34236+#endif
34237
34238 /* init generic devices */
34239 if (qemu_opts_foreach(qemu_find_opts("device"), device_init_func, NULL, 1) != 0)
34240Index: qemu-0.14.0/qemu-options.hx
34241===================================================================
34242--- qemu-0.14.0.orig/qemu-options.hx
34243+++ qemu-0.14.0/qemu-options.hx
34244@@ -2118,6 +2118,18 @@ many timer interrupts were not processed
34245 re-inject them.
34246 ETEXI
34247
34248+DEF("enable-gl", 0, QEMU_OPTION_enable_gl, \
34249+ "-enable-gl\n", QEMU_ARCH_I386)
34250+STEXI
34251+@item -enable-gl
34252+ETEXI
34253+
34254+DEF("force-pointer", 0, QEMU_OPTION_force_pointer, \
34255+ "-force-pointer\n", QEMU_ARCH_ALL)
34256+STEXI
34257+@item -force-pointer
34258+ETEXI
34259+
34260 DEF("icount", HAS_ARG, QEMU_OPTION_icount, \
34261 "-icount [N|auto]\n" \
34262 " enable virtual instruction counter with 2^N clock ticks per\n" \
34263Index: qemu-0.14.0/ui/sdl.c
34264===================================================================
34265--- qemu-0.14.0.orig/ui/sdl.c
34266+++ qemu-0.14.0/ui/sdl.c
34267@@ -63,6 +63,8 @@ static SDL_PixelFormat host_format;
34268 static int scaling_active = 0;
34269 static Notifier mouse_mode_notifier;
34270
34271+extern void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window);
34272+
34273 static void sdl_update(DisplayState *ds, int x, int y, int w, int h)
34274 {
34275 // printf("updating x=%d y=%d w=%d h=%d\n", x, y, w, h);
34276@@ -119,12 +121,22 @@ static void do_sdl_resize(int new_width,
34277
34278 static void sdl_resize(DisplayState *ds)
34279 {
34280- if (!allocator) {
34281+ SDL_SysWMinfo info;
34282+ static Display *dpy;
34283+
34284+ if (!allocator) {
34285 if (!scaling_active)
34286 do_sdl_resize(ds_get_width(ds), ds_get_height(ds), 0);
34287 else if (real_screen->format->BitsPerPixel != ds_get_bits_per_pixel(ds))
34288 do_sdl_resize(real_screen->w, real_screen->h, ds_get_bits_per_pixel(ds));
34289 sdl_setdata(ds);
34290+
34291+ SDL_GetWMInfo(&info);
34292+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display &&
34293+ (!dpy || dpy == info.info.x11.display)) {
34294+ dpy = info.info.x11.display;
34295+ opengl_exec_set_parent_window(dpy, info.info.x11.window);
34296+ }
34297 } else {
34298 if (guest_screen != NULL) {
34299 SDL_FreeSurface(guest_screen);
34300@@ -457,7 +469,7 @@ static void sdl_show_cursor(void)
34301
34302 if (!kbd_mouse_is_absolute()) {
34303 SDL_ShowCursor(1);
34304- if (guest_cursor &&
34305+ if (guest_cursor && !force_pointer &&
34306 (gui_grab || kbd_mouse_is_absolute() || absolute_enabled))
34307 SDL_SetCursor(guest_sprite);
34308 else
34309@@ -468,7 +480,8 @@ static void sdl_show_cursor(void)
34310 static void sdl_grab_start(void)
34311 {
34312 if (guest_cursor) {
34313- SDL_SetCursor(guest_sprite);
34314+ if (!force_pointer)
34315+ SDL_SetCursor(guest_sprite);
34316 if (!kbd_mouse_is_absolute() && !absolute_enabled)
34317 SDL_WarpMouse(guest_x, guest_y);
34318 } else
34319@@ -770,7 +783,8 @@ static void sdl_mouse_warp(int x, int y,
34320 if (!guest_cursor)
34321 sdl_show_cursor();
34322 if (gui_grab || kbd_mouse_is_absolute() || absolute_enabled) {
34323- SDL_SetCursor(guest_sprite);
34324+ if (!force_pointer)
34325+ SDL_SetCursor(guest_sprite);
34326 if (!kbd_mouse_is_absolute() && !absolute_enabled)
34327 SDL_WarpMouse(x, y);
34328 }
34329@@ -798,7 +812,7 @@ static void sdl_mouse_define(QEMUCursor
34330 qemu_free(image);
34331 qemu_free(mask);
34332
34333- if (guest_cursor &&
34334+ if (guest_cursor && !force_pointer &&
34335 (gui_grab || kbd_mouse_is_absolute() || absolute_enabled))
34336 SDL_SetCursor(guest_sprite);
34337 }
34338@@ -815,6 +829,7 @@ void sdl_display_init(DisplayState *ds,
34339 int flags;
34340 uint8_t data = 0;
34341 DisplayAllocator *da;
34342+ SDL_SysWMinfo info;
34343 const SDL_VideoInfo *vi;
34344
34345 #if defined(__APPLE__)
34346@@ -848,6 +863,12 @@ void sdl_display_init(DisplayState *ds,
34347 vi = SDL_GetVideoInfo();
34348 host_format = *(vi->vfmt);
34349
34350+ SDL_GetWMInfo(&info);
34351+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display)
34352+ opengl_exec_set_parent_window(info.info.x11.display,
34353+ RootWindow(info.info.x11.display,
34354+ DefaultScreen(info.info.x11.display)));
34355+
34356 dcl = qemu_mallocz(sizeof(DisplayChangeListener));
34357 dcl->dpy_update = sdl_update;
34358 dcl->dpy_resize = sdl_resize;
34359@@ -882,4 +903,9 @@ void sdl_display_init(DisplayState *ds,
34360 gui_fullscreen_initial_grab = 1;
34361 sdl_grab_start();
34362 }
34363+
34364+ SDL_GetWMInfo(&info);
34365+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display)
34366+ opengl_exec_set_parent_window(info.info.x11.display,
34367+ info.info.x11.window);
34368 }
diff --git a/meta/recipes-devtools/qemu/qemu-0.14.0/qemu-vmware-vga-depth.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/qemu-vmware-vga-depth.patch
deleted file mode 100644
index c4c5424e16..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.14.0/qemu-vmware-vga-depth.patch
+++ /dev/null
@@ -1,118 +0,0 @@
1# fix VMware VGA driver depth calculation error, which may cause segmentation fault
2#
3# ktian1, 06/29/2010
4
5Upstream-Status: Pending
6
7Index: qemu-0.14.0/console.h
8===================================================================
9--- qemu-0.14.0.orig/console.h
10+++ qemu-0.14.0/console.h
11@@ -171,6 +171,12 @@ struct DisplayAllocator {
12 void (*free_displaysurface)(DisplaySurface *surface);
13 };
14
15+struct DisplayPostCallback {
16+ void (*postcall) (void *);
17+ void *parm;
18+ struct DisplayPostCallback *next;
19+};
20+
21 struct DisplayState {
22 struct DisplaySurface *surface;
23 void *opaque;
24@@ -178,6 +184,7 @@ struct DisplayState {
25
26 struct DisplayAllocator* allocator;
27 struct DisplayChangeListener* listeners;
28+ struct DisplayPostCallback* postcalls;
29
30 void (*mouse_set)(int x, int y, int on);
31 void (*cursor_define)(QEMUCursor *cursor);
32@@ -229,6 +236,12 @@ static inline void register_displaychang
33 ds->listeners = dcl;
34 }
35
36+static inline void register_displaypostcallback(DisplayState *ds, DisplayPostCallback *dpc)
37+{
38+ dpc->next = ds->postcalls;
39+ ds->postcalls = dpc;
40+}
41+
42 static inline void dpy_update(DisplayState *s, int x, int y, int w, int h)
43 {
44 struct DisplayChangeListener *dcl = s->listeners;
45Index: qemu-0.14.0/hw/vmware_vga.c
46===================================================================
47--- qemu-0.14.0.orig/hw/vmware_vga.c
48+++ qemu-0.14.0/hw/vmware_vga.c
49@@ -1001,8 +1001,9 @@ static void vmsvga_update_display(void *
50 }
51 }
52
53-static void vmsvga_reset(struct vmsvga_state_s *s)
54+static void vmsvga_reset(void *parm)
55 {
56+ struct vmsvga_state_s *s = (struct vmsvga_state_s *)parm;
57 s->index = 0;
58 s->enable = 0;
59 s->config = 0;
60@@ -1207,6 +1208,8 @@ static const VMStateDescription vmstate_
61
62 static void vmsvga_init(struct vmsvga_state_s *s, int vga_ram_size)
63 {
64+ DisplayPostCallback *dpc;
65+
66 s->scratch_size = SVGA_SCRATCH_SIZE;
67 s->scratch = qemu_malloc(s->scratch_size * 4);
68
69@@ -1224,7 +1227,10 @@ static void vmsvga_init(struct vmsvga_st
70 vga_init(&s->vga);
71 vmstate_register(NULL, 0, &vmstate_vga_common, &s->vga);
72
73- vmsvga_reset(s);
74+ dpc = qemu_mallocz(sizeof(DisplayPostCallback));
75+ dpc->postcall = vmsvga_reset;
76+ dpc->parm = s;
77+ register_displaypostcallback(s->vga.ds, dpc);
78 }
79
80 static void pci_vmsvga_map_ioport(PCIDevice *pci_dev, int region_num,
81Index: qemu-0.14.0/qemu-common.h
82===================================================================
83--- qemu-0.14.0.orig/qemu-common.h
84+++ qemu-0.14.0/qemu-common.h
85@@ -241,6 +241,7 @@ typedef struct DisplayState DisplayState
86 typedef struct DisplayChangeListener DisplayChangeListener;
87 typedef struct DisplaySurface DisplaySurface;
88 typedef struct DisplayAllocator DisplayAllocator;
89+typedef struct DisplayPostCallback DisplayPostCallback;
90 typedef struct PixelFormat PixelFormat;
91 typedef struct TextConsole TextConsole;
92 typedef TextConsole QEMUConsole;
93Index: qemu-0.14.0/vl.c
94===================================================================
95--- qemu-0.14.0.orig/vl.c
96+++ qemu-0.14.0/vl.c
97@@ -1920,6 +1920,7 @@ int main(int argc, char **argv, char **e
98 char boot_devices[33] = "cad"; /* default to HD->floppy->CD-ROM */
99 DisplayState *ds;
100 DisplayChangeListener *dcl;
101+ DisplayPostCallback *dpc;
102 int cyls, heads, secs, translation;
103 QemuOpts *hda_opts = NULL, *opts;
104 QemuOptsList *olist;
105@@ -3101,6 +3102,13 @@ int main(int argc, char **argv, char **e
106
107 /* display setup */
108 dpy_resize(ds);
109+ dpc = ds->postcalls;
110+ while (dpc != NULL) {
111+ if (dpc->postcall != NULL)
112+ dpc->postcall(dpc->parm);
113+ dpc = dpc->next;
114+ }
115+
116 dcl = ds->listeners;
117 while (dcl != NULL) {
118 if (dcl->dpy_refresh != NULL) {
diff --git a/meta/recipes-devtools/qemu/qemu-0.14.0/qemugl-allow-glxcontext-release.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/qemugl-allow-glxcontext-release.patch
deleted file mode 100644
index d808eaa539..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.14.0/qemugl-allow-glxcontext-release.patch
+++ /dev/null
@@ -1,65 +0,0 @@
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
13Upstream-Status: Inappropriate [configuration]
14
15Index: qemu-0.14.0/target-i386/opengl_exec.c
16===================================================================
17--- qemu-0.14.0.orig/target-i386/opengl_exec.c
18+++ qemu-0.14.0/target-i386/opengl_exec.c
19@@ -1600,10 +1600,9 @@ int do_function_call(int func_number, ar
20 fprintf(stderr, "client_drawable=%p fake_ctx=%d\n",
21 (void *) client_drawable, fake_ctxt);
22
23- if (client_drawable == 0 && fake_ctxt == 0) {
24+ if (client_drawable == 0 && fake_ctxt == 0)
25 ret_int = glXMakeCurrent(dpy, 0, NULL);
26- process->current_state = &process->default_state;
27- } else if ((drawable = (GLXDrawable)
28+ else if ((drawable = (GLXDrawable)
29 get_association_fakepbuffer_pbuffer(
30 process, client_drawable))) {
31 GLXContext ctxt = get_association_fakecontext_glxcontext(
32@@ -1651,19 +1650,21 @@ int do_function_call(int func_number, ar
33 }
34
35 if (ret_int) {
36- for (i = 0; i < process->nb_states; i ++) {
37- if (process->glstates[i]->fake_ctxt == fake_ctxt) {
38- /* HACK !!! REMOVE */
39- process->current_state = process->glstates[i];
40- process->current_state->drawable = drawable;
41- break;
42- }
43- }
44+ if (fake_ctxt) {
45+ for (i = 0; i < process->nb_states; i ++)
46+ if (process->glstates[i]->fake_ctxt == fake_ctxt) {
47+ /* HACK !!! REMOVE */
48+ process->current_state = process->glstates[i];
49+ process->current_state->drawable = drawable;
50+ break;
51+ }
52
53- if (i == process->nb_states) {
54- fprintf(stderr, "error remembering the new context\n");
55- exit(-1);
56- }
57+ if (i == process->nb_states) {
58+ fprintf(stderr, "error remembering the new context\n");
59+ exit(-1);
60+ }
61+ } else
62+ process->current_state = &process->default_state;
63 }
64 break;
65 }
diff --git a/meta/recipes-devtools/qemu/qemu-0.14.0/qemugl-fix.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/qemugl-fix.patch
deleted file mode 100644
index 0858f76b52..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.14.0/qemugl-fix.patch
+++ /dev/null
@@ -1,74 +0,0 @@
1This patch fix GL application start failure on qemu 0.14.0.
2
3Some turn-on macro/variable are re-arranged, buffer pointer is extended to
4support 32/64b combination of target/host.
5
6This is not perfect fix, and we need consider other GL alternatives in future.
7
8Upstream-Status: Inappropriate [other] - depends on qemu gl patch
9
10Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
11
12
13Index: qemu-0.14.0/target-i386/opengl_func.h
14===================================================================
15--- qemu-0.14.0.orig/target-i386/opengl_func.h 2011-04-08 16:43:46.000000000 +0800
16+++ qemu-0.14.0/target-i386/opengl_func.h 2011-04-08 16:45:55.000000000 +0800
17@@ -26,8 +26,9 @@
18 #include "mesa_glext.h"
19
20 /* Argument list are internally of a type that can hold a target pointer
21- * or a host pointer. */
22-typedef target_phys_addr_t arg_t;
23+ * or a host pointer. If 32b target runs on 64b host, it should be big enough
24+ * to hold host pointer */
25+typedef long unsigned int arg_t;
26
27 enum {
28 TYPE_NONE,
29Index: qemu-0.14.0/target-i386/translate.c
30===================================================================
31--- qemu-0.14.0.orig/target-i386/translate.c 2011-04-08 16:19:15.000000000 +0800
32+++ qemu-0.14.0/target-i386/translate.c 2011-04-08 16:22:03.000000000 +0800
33@@ -2652,17 +2652,19 @@
34 s->is_jmp = DISAS_TB_JUMP;
35 }
36
37-int enable_gl = 0;
38+extern int enable_gl;
39
40 /* an interrupt is different from an exception because of the
41 privilege checks */
42 static void gen_interrupt(DisasContext *s, int intno,
43 target_ulong cur_eip, target_ulong next_eip)
44 {
45+#if !defined(CONFIG_USER_ONLY)
46 if (enable_gl && intno == 0x99) {
47 gen_helper_opengl();
48 return;
49 }
50+#endif
51
52 if (s->cc_op != CC_OP_DYNAMIC)
53 gen_op_set_cc_op(s->cc_op);
54Index: qemu-0.14.0/vl.c
55===================================================================
56--- qemu-0.14.0.orig/vl.c 2011-04-08 16:11:43.000000000 +0800
57+++ qemu-0.14.0/vl.c 2011-04-08 16:20:05.000000000 +0800
58@@ -229,7 +229,7 @@
59 unsigned int nb_prom_envs = 0;
60 const char *prom_envs[MAX_PROM_ENVS];
61 int boot_menu;
62-extern int enable_gl;
63+int enable_gl = 0;
64
65 typedef struct FWBootEntry FWBootEntry;
66
67@@ -1909,6 +1909,7 @@
68 return popt;
69 }
70
71+#define TARGET_OPENGL_OK
72 int main(int argc, char **argv, char **envp)
73 {
74 const char *gdbstub_dev = NULL;
diff --git a/meta/recipes-devtools/qemu/qemu-0.14.0/spice-qxl-locking-fix-for-qemu-kvm.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/spice-qxl-locking-fix-for-qemu-kvm.patch
deleted file mode 100644
index 4113fc2ad6..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.14.0/spice-qxl-locking-fix-for-qemu-kvm.patch
+++ /dev/null
@@ -1,152 +0,0 @@
1Description: spice/qxl: locking fix for qemu-kvm
2Author: Gerd Hoffmann <kraxel@redhat.com>
3Source: upstream, http://patchwork.ozlabs.org/patch/84704/
4Forwarding: not-needed
5
6Upstream-Status: Pending
7
8Index: qemu-0.14.0/hw/qxl.c
9===================================================================
10--- qemu-0.14.0.orig/hw/qxl.c
11+++ qemu-0.14.0/hw/qxl.c
12@@ -125,6 +125,27 @@ static void qxl_reset_memslots(PCIQXLDev
13 static void qxl_reset_surfaces(PCIQXLDevice *d);
14 static void qxl_ring_set_dirty(PCIQXLDevice *qxl);
15
16+/* qemu-kvm locking ... */
17+void qxl_unlock_iothread(SimpleSpiceDisplay *ssd)
18+{
19+ if (cpu_single_env) {
20+ assert(ssd->env == NULL);
21+ ssd->env = cpu_single_env;
22+ cpu_single_env = NULL;
23+ }
24+ qemu_mutex_unlock_iothread();
25+}
26+
27+void qxl_lock_iothread(SimpleSpiceDisplay *ssd)
28+{
29+ qemu_mutex_lock_iothread();
30+ if (ssd->env) {
31+ assert(cpu_single_env == NULL);
32+ cpu_single_env = ssd->env;
33+ ssd->env = NULL;
34+ }
35+}
36+
37 static inline uint32_t msb_mask(uint32_t val)
38 {
39 uint32_t mask;
40@@ -662,10 +683,10 @@ static void qxl_hard_reset(PCIQXLDevice
41 dprint(d, 1, "%s: start%s\n", __FUNCTION__,
42 loadvm ? " (loadvm)" : "");
43
44- qemu_mutex_unlock_iothread();
45+ qxl_unlock_iothread(&d->ssd);
46 d->ssd.worker->reset_cursor(d->ssd.worker);
47 d->ssd.worker->reset_image_cache(d->ssd.worker);
48- qemu_mutex_lock_iothread();
49+ qxl_lock_iothread(&d->ssd);
50 qxl_reset_surfaces(d);
51 qxl_reset_memslots(d);
52
53@@ -795,9 +816,9 @@ static void qxl_reset_surfaces(PCIQXLDev
54 {
55 dprint(d, 1, "%s:\n", __FUNCTION__);
56 d->mode = QXL_MODE_UNDEFINED;
57- qemu_mutex_unlock_iothread();
58+ qxl_unlock_iothread(&d->ssd);
59 d->ssd.worker->destroy_surfaces(d->ssd.worker);
60- qemu_mutex_lock_iothread();
61+ qxl_lock_iothread(&d->ssd);
62 memset(&d->guest_surfaces.cmds, 0, sizeof(d->guest_surfaces.cmds));
63 }
64
65@@ -866,9 +887,9 @@ static void qxl_destroy_primary(PCIQXLDe
66 dprint(d, 1, "%s\n", __FUNCTION__);
67
68 d->mode = QXL_MODE_UNDEFINED;
69- qemu_mutex_unlock_iothread();
70+ qxl_unlock_iothread(&d->ssd);
71 d->ssd.worker->destroy_primary_surface(d->ssd.worker, 0);
72- qemu_mutex_lock_iothread();
73+ qxl_lock_iothread(&d->ssd);
74 }
75
76 static void qxl_set_mode(PCIQXLDevice *d, int modenr, int loadvm)
77@@ -938,10 +959,10 @@ static void ioport_write(void *opaque, u
78 case QXL_IO_UPDATE_AREA:
79 {
80 QXLRect update = d->ram->update_area;
81- qemu_mutex_unlock_iothread();
82+ qxl_unlock_iothread(&d->ssd);
83 d->ssd.worker->update_area(d->ssd.worker, d->ram->update_surface,
84 &update, NULL, 0, 0);
85- qemu_mutex_lock_iothread();
86+ qxl_lock_iothread(&d->ssd);
87 break;
88 }
89 case QXL_IO_NOTIFY_CMD:
90Index: qemu-0.14.0/ui/spice-display.c
91===================================================================
92--- qemu-0.14.0.orig/ui/spice-display.c
93+++ qemu-0.14.0/ui/spice-display.c
94@@ -186,18 +186,18 @@ void qemu_spice_create_host_primary(Simp
95 surface.mem = (intptr_t)ssd->buf;
96 surface.group_id = MEMSLOT_GROUP_HOST;
97
98- qemu_mutex_unlock_iothread();
99+ qxl_unlock_iothread(ssd);
100 ssd->worker->create_primary_surface(ssd->worker, 0, &surface);
101- qemu_mutex_lock_iothread();
102+ qxl_lock_iothread(ssd);
103 }
104
105 void qemu_spice_destroy_host_primary(SimpleSpiceDisplay *ssd)
106 {
107 dprint(1, "%s:\n", __FUNCTION__);
108
109- qemu_mutex_unlock_iothread();
110+ qxl_unlock_iothread(ssd);
111 ssd->worker->destroy_primary_surface(ssd->worker, 0);
112- qemu_mutex_lock_iothread();
113+ qxl_lock_iothread(ssd);
114 }
115
116 void qemu_spice_vm_change_state_handler(void *opaque, int running, int reason)
117@@ -207,9 +207,9 @@ void qemu_spice_vm_change_state_handler(
118 if (running) {
119 ssd->worker->start(ssd->worker);
120 } else {
121- qemu_mutex_unlock_iothread();
122+ qxl_unlock_iothread(ssd);
123 ssd->worker->stop(ssd->worker);
124- qemu_mutex_lock_iothread();
125+ qxl_lock_iothread(ssd);
126 }
127 ssd->running = running;
128 }
129Index: qemu-0.14.0/ui/spice-display.h
130===================================================================
131--- qemu-0.14.0.orig/ui/spice-display.h
132+++ qemu-0.14.0/ui/spice-display.h
133@@ -43,6 +43,9 @@ typedef struct SimpleSpiceDisplay {
134 QXLRect dirty;
135 int notify;
136 int running;
137+
138+ /* qemu-kvm locking ... */
139+ void *env;
140 } SimpleSpiceDisplay;
141
142 typedef struct SimpleSpiceUpdate {
143@@ -52,6 +55,9 @@ typedef struct SimpleSpiceUpdate {
144 uint8_t *bitmap;
145 } SimpleSpiceUpdate;
146
147+void qxl_unlock_iothread(SimpleSpiceDisplay *ssd);
148+void qxl_lock_iothread(SimpleSpiceDisplay *ssd);
149+
150 int qemu_spice_rect_is_empty(const QXLRect* r);
151 void qemu_spice_rect_union(QXLRect *dest, const QXLRect *r);
152
diff --git a/meta/recipes-devtools/qemu/qemu_0.14.0.bb b/meta/recipes-devtools/qemu/qemu_0.14.0.bb
deleted file mode 100644
index a3005450a1..0000000000
--- a/meta/recipes-devtools/qemu/qemu_0.14.0.bb
+++ /dev/null
@@ -1,48 +0,0 @@
1require qemu.inc
2
3LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
4 file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
5
6PR = "r6"
7
8FILESPATH = "${FILE_DIRNAME}/qemu-${PV}"
9FILESDIR = "${WORKDIR}"
10
11SRC_URI = "\
12 http://download.savannah.gnu.org/releases/qemu/qemu-${PV}.tar.gz \
13 file://powerpc_rom.bin \
14 file://no-strip.patch \
15 file://linker-flags.patch \
16 file://qemu-vmware-vga-depth.patch \
17 file://fix-configure-checks.patch \
18 file://fallback-to-safe-mmap_min_addr.patch \
19 file://spice-qxl-locking-fix-for-qemu-kvm.patch \
20 file://Detect-and-use-GCC-atomic-builtins-for-locking.patch \
21 file://larger_default_ram_size.patch \
22 file://arm-bgr.patch \
23 "
24
25# Only use the GL passthrough patches for native/nativesdk versions
26QEMUGLPATCHES = "\
27 file://qemu-git-qemugl-host.patch \
28 file://fix-nogl.patch \
29 file://qemugl-allow-glxcontext-release.patch \
30 file://init-info.patch \
31 file://enable-i386-linux-user.patch \
32 file://qemugl-fix.patch \
33 file://opengl-sdl-fix.patch \
34 "
35
36SRC_URI_append_virtclass-native = "\
37 ${QEMUGLPATCHES} \
38 "
39
40SRC_URI_append_virtclass-nativesdk = "\
41 ${QEMUGLPATCHES} \
42 file://glflags.patch \
43 "
44
45SRC_URI[md5sum] = "f9d145d5c09de9f0984ffe9bd1229970"
46SRC_URI[sha256sum] = "ba21e84d7853217830e167dae9999cdbff481189c6a0bb600ac7fb7201453108"
47
48S = "${WORKDIR}/qemu-${PV}"