summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorZhai Edwin <edwin.zhai@intel.com>2011-05-10 14:02:35 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-11 16:48:21 +0100
commita2e232e2313ee267076bb8de32a1a604dbebc33b (patch)
tree0bd71628aa88c9975d1fe031609558e26ca9164b /meta
parent7f7de31e9caa1594f2175f90f8faa96a88627329 (diff)
downloadpoky-a2e232e2313ee267076bb8de32a1a604dbebc33b.tar.gz
qemu: Upgrade qemu git to the latest 0.14 branch
Also add missing patch to build qemu-git [YOCTO #1013] got fixed (From OE-Core rev: 9b80846152931bed018f33baaaf1ba253e756867) Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/qemu/qemu-git/enable-i386-linux-user.patch53
-rw-r--r--meta/recipes-devtools/qemu/qemu-git/fix-nogl.patch125
-rw-r--r--meta/recipes-devtools/qemu/qemu-git/linker-flags.patch22
-rw-r--r--meta/recipes-devtools/qemu/qemu-git/no-strip.patch13
-rw-r--r--meta/recipes-devtools/qemu/qemu-git/qemu-git-qemugl-host.patch34366
-rw-r--r--meta/recipes-devtools/qemu/qemu-git/qemu-vmware-vga-depth.patch115
-rw-r--r--meta/recipes-devtools/qemu/qemu-git/qemugl-allow-glxcontext-release.patch63
-rw-r--r--meta/recipes-devtools/qemu/qemu-git/qemugl-fix.patch73
-rw-r--r--meta/recipes-devtools/qemu/qemu_git.bb13
9 files changed, 34837 insertions, 6 deletions
diff --git a/meta/recipes-devtools/qemu/qemu-git/enable-i386-linux-user.patch b/meta/recipes-devtools/qemu/qemu-git/enable-i386-linux-user.patch
new file mode 100644
index 0000000000..3cf0953f10
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-git/enable-i386-linux-user.patch
@@ -0,0 +1,53 @@
1Enable i386-linux-user
2
3Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
4
5Index: qemu-0.14.0/Makefile.target
6===================================================================
7--- qemu-0.14.0.orig/Makefile.target
8+++ qemu-0.14.0/Makefile.target
9@@ -78,8 +78,13 @@ ifeq ($(TARGET_BASE_ARCH), i386)
10 libobj-y += cpuid.o
11 endif
12 libobj-$(CONFIG_NEED_MMU) += mmu.o
13+ifndef CONFIG_LINUX_USER
14 libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o
15 libobj-$(TARGET_X86_64) += helper_opengl.o opengl_exec.o
16+else
17+libobj-$(TARGET_I386) += dummygl.o
18+libobj-$(TARGET_X86_64) += dummygl.o
19+endif #CONFIG_LINUX_USER
20 libobj-$(TARGET_ARM) += dummygl.o
21 libobj-$(TARGET_MIPS) += dummygl.o
22 libobj-$(TARGET_PPC) += dummygl.o
23Index: qemu-0.14.0/target-i386/dummygl.c
24===================================================================
25--- /dev/null
26+++ qemu-0.14.0/target-i386/dummygl.c
27@@ -0,0 +1,26 @@
28+#include <string.h>
29+#include <stdlib.h>
30+#include <assert.h>
31+#include <stdint.h>
32+#include <X11/Xlib.h>
33+#include <X11/Xutil.h>
34+
35+void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window)
36+{
37+
38+}
39+
40+void opengl_process_enable(void)
41+{
42+
43+}
44+
45+
46+void mem_opengl(uint64_t ptr)
47+{
48+
49+}
50+
51+void helper_opengl(void)
52+{
53+}
diff --git a/meta/recipes-devtools/qemu/qemu-git/fix-nogl.patch b/meta/recipes-devtools/qemu/qemu-git/fix-nogl.patch
new file mode 100644
index 0000000000..0219cc8121
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-git/fix-nogl.patch
@@ -0,0 +1,125 @@
1Index: qemu-0.14.0/Makefile.target
2===================================================================
3--- qemu-0.14.0.orig/Makefile.target
4+++ qemu-0.14.0/Makefile.target
5@@ -79,6 +79,12 @@ libobj-y += cpuid.o
6 endif
7 libobj-$(CONFIG_NEED_MMU) += mmu.o
8 libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o
9+libobj-$(TARGET_X86_64) += helper_opengl.o opengl_exec.o
10+libobj-$(TARGET_ARM) += dummygl.o
11+libobj-$(TARGET_MIPS) += dummygl.o
12+libobj-$(TARGET_MIPS64) += dummygl.o
13+libobj-$(TARGET_PPC) += dummygl.o
14+libobj-$(TARGET_SH4) += dummygl.o
15 libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
16
17 libobj-y += disas.o
18Index: qemu-0.14.0/target-arm/dummygl.c
19===================================================================
20--- /dev/null
21+++ qemu-0.14.0/target-arm/dummygl.c
22@@ -0,0 +1,22 @@
23+#include <string.h>
24+#include <stdlib.h>
25+#include <assert.h>
26+#include <stdint.h>
27+#include <X11/Xlib.h>
28+#include <X11/Xutil.h>
29+
30+void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window)
31+{
32+
33+}
34+
35+void opengl_process_enable(void)
36+{
37+
38+}
39+
40+
41+void mem_opengl(uint64_t ptr)
42+{
43+
44+}
45Index: qemu-0.14.0/target-mips/dummygl.c
46===================================================================
47--- /dev/null
48+++ qemu-0.14.0/target-mips/dummygl.c
49@@ -0,0 +1,22 @@
50+#include <string.h>
51+#include <stdlib.h>
52+#include <assert.h>
53+#include <stdint.h>
54+#include <X11/Xlib.h>
55+#include <X11/Xutil.h>
56+
57+void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window)
58+{
59+
60+}
61+
62+void opengl_process_enable(void)
63+{
64+
65+}
66+
67+
68+void mem_opengl(uint64_t ptr)
69+{
70+
71+}
72Index: qemu-0.14.0/target-ppc/dummygl.c
73===================================================================
74--- /dev/null
75+++ qemu-0.14.0/target-ppc/dummygl.c
76@@ -0,0 +1,22 @@
77+#include <string.h>
78+#include <stdlib.h>
79+#include <assert.h>
80+#include <stdint.h>
81+#include <X11/Xlib.h>
82+#include <X11/Xutil.h>
83+
84+void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window)
85+{
86+
87+}
88+
89+void opengl_process_enable(void)
90+{
91+
92+}
93+
94+
95+void mem_opengl(uint64_t ptr)
96+{
97+
98+}
99Index: qemu-0.14.0/target-sh4/dummygl.c
100===================================================================
101--- /dev/null
102+++ qemu-0.14.0/target-sh4/dummygl.c
103@@ -0,0 +1,22 @@
104+#include <string.h>
105+#include <stdlib.h>
106+#include <assert.h>
107+#include <stdint.h>
108+#include <X11/Xlib.h>
109+#include <X11/Xutil.h>
110+
111+void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window)
112+{
113+
114+}
115+
116+void opengl_process_enable(void)
117+{
118+
119+}
120+
121+
122+void mem_opengl(uint64_t ptr)
123+{
124+
125+}
diff --git a/meta/recipes-devtools/qemu/qemu-git/linker-flags.patch b/meta/recipes-devtools/qemu/qemu-git/linker-flags.patch
new file mode 100644
index 0000000000..470cf80cde
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-git/linker-flags.patch
@@ -0,0 +1,22 @@
1Fedora 13 switched the default behaviour of the linker to no longer
2indirectly link to required libraries (i.e. dependencies of a library
3already linked to). Therefore we need to explicitly pass the depended on
4libraries into the linker for building to work on Fedora 13.
5
6More information is available on the Fedora Wiki:
7https://fedoraproject.org/wiki/UnderstandingDSOLinkChange
8
9JL - 15/06/10
10Index: qemu-0.14.0/Makefile.target
11===================================================================
12--- qemu-0.14.0.orig/Makefile.target
13+++ qemu-0.14.0/Makefile.target
14@@ -218,7 +218,7 @@ obj-$(CONFIG_REALLY_VIRTFS) += virtio-9p
15 obj-y += rwhandler.o
16 obj-$(CONFIG_KVM) += kvm.o kvm-all.o
17 obj-$(CONFIG_NO_KVM) += kvm-stub.o
18-LIBS+=-lz
19+LIBS+=-lz -lX11 -ldl
20
21 QEMU_CFLAGS += $(VNC_TLS_CFLAGS)
22 QEMU_CFLAGS += $(VNC_SASL_CFLAGS)
diff --git a/meta/recipes-devtools/qemu/qemu-git/no-strip.patch b/meta/recipes-devtools/qemu/qemu-git/no-strip.patch
new file mode 100644
index 0000000000..cf0d659724
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-git/no-strip.patch
@@ -0,0 +1,13 @@
1Index: qemu-0.14.0/Makefile
2===================================================================
3--- qemu-0.14.0.orig/Makefile
4+++ qemu-0.14.0/Makefile
5@@ -235,7 +235,7 @@ install-sysconfig:
6 install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig
7 $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
8 ifneq ($(TOOLS),)
9- $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
10+ $(INSTALL_PROG) $(TOOLS) "$(DESTDIR)$(bindir)"
11 endif
12 ifneq ($(BLOBS),)
13 $(INSTALL_DIR) "$(DESTDIR)$(datadir)"
diff --git a/meta/recipes-devtools/qemu/qemu-git/qemu-git-qemugl-host.patch b/meta/recipes-devtools/qemu/qemu-git/qemu-git-qemugl-host.patch
new file mode 100644
index 0000000000..92467a7651
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-git/qemu-git-qemugl-host.patch
@@ -0,0 +1,34366 @@
1Index: qemu-0.14.0/Makefile.target
2===================================================================
3--- qemu-0.14.0.orig/Makefile.target
4+++ qemu-0.14.0/Makefile.target
5@@ -78,6 +78,7 @@ ifeq ($(TARGET_BASE_ARCH), i386)
6 libobj-y += cpuid.o
7 endif
8 libobj-$(CONFIG_NEED_MMU) += mmu.o
9+libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o
10 libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
11
12 libobj-y += disas.o
13@@ -100,6 +101,21 @@ op_helper.o cpu-exec.o: QEMU_CFLAGS += $
14 # cpu_signal_handler() in cpu-exec.c.
15 signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
16
17+parse_gl_h: parse_gl_h.c
18+ $(HOST_CC) -g -o $@ $<
19+server_stub.c: parse_gl_h
20+ ./parse_gl_h
21+gl_func.h: parse_gl_h
22+ ./parse_gl_h
23+GL_CFLAGS := -Wall -g -O2 -fno-strict-aliasing
24+opengl_func.h: gl_func.h
25+helper_opengl.o: helper_opengl.c opengl_func.h server_stub.c
26+ $(CC) $(GL_CFLAGS) $(DEFINES) -c -o $@ $< -I.. -I. -I../fpu -I../target-i386 -DNEED_CPU_H
27+gl_beginend.h: ../target-i386/beginend_funcs.sh
28+ $< > $@
29+opengl_exec.o : opengl_exec.c server_stub.c gl_func.h opengl_func.h gl_beginend.h
30+ $(CC) $(GL_CFLAGS) $(DEFINES) -c -o $@ $< -I. -I../target-i386
31+
32 #########################################################
33 # Linux user emulator target
34
35@@ -221,6 +237,10 @@ obj-i386-y += debugcon.o multiboot.o
36 obj-i386-y += pc_piix.o
37 obj-i386-$(CONFIG_SPICE) += qxl.o qxl-logger.o qxl-render.o
38
39+ifeq ($(TARGET_BASE_ARCH), i386)
40+QEMU_CFLAGS += -DTARGET_OPENGL_OK
41+endif
42+
43 # shared objects
44 obj-ppc-y = ppc.o
45 obj-ppc-y += vga.o
46@@ -331,6 +351,8 @@ main.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
47
48 monitor.o: hmp-commands.h qmp-commands.h
49
50+LIBS += -lGL -lGLU
51+
52 $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
53
54 obj-y += $(addprefix ../, $(common-obj-y))
55Index: qemu-0.14.0/hw/pixel_ops.h
56===================================================================
57--- qemu-0.14.0.orig/hw/pixel_ops.h
58+++ qemu-0.14.0/hw/pixel_ops.h
59@@ -4,6 +4,12 @@ static inline unsigned int rgb_to_pixel8
60 return ((r >> 5) << 5) | ((g >> 5) << 2) | (b >> 6);
61 }
62
63+static inline unsigned int rgb_to_pixel8bgr(unsigned int r, unsigned int g,
64+ unsigned int b)
65+{
66+ return ((b >> 5) << 5) | ((g >> 5) << 2) | (r >> 6);
67+}
68+
69 static inline unsigned int rgb_to_pixel15(unsigned int r, unsigned int g,
70 unsigned int b)
71 {
72Index: qemu-0.14.0/hw/vmware_vga.c
73===================================================================
74--- qemu-0.14.0.orig/hw/vmware_vga.c
75+++ qemu-0.14.0/hw/vmware_vga.c
76@@ -517,6 +517,8 @@ static inline void vmsvga_cursor_define(
77
78 #define CMD(f) le32_to_cpu(s->cmd->f)
79
80+static uint32_t last_cmd;
81+
82 static inline int vmsvga_fifo_length(struct vmsvga_state_s *s)
83 {
84 int num;
85@@ -530,11 +532,18 @@ static inline int vmsvga_fifo_length(str
86
87 static inline uint32_t vmsvga_fifo_read_raw(struct vmsvga_state_s *s)
88 {
89- uint32_t cmd = s->fifo[CMD(stop) >> 2];
90- s->cmd->stop = cpu_to_le32(CMD(stop) + 4);
91- if (CMD(stop) >= CMD(max))
92+ int offset = CMD(stop);
93+
94+ if (unlikely(s->cmd->next_cmd == s->cmd->stop)) {
95+ fprintf(stderr, "%s: FIFO empty during CMD %i\n",
96+ __FUNCTION__, last_cmd);
97+ return 0x00000000;
98+ }
99+
100+ s->cmd->stop = cpu_to_le32(offset + 4);
101+ if (offset + 4 >= CMD(max))
102 s->cmd->stop = s->cmd->min;
103- return cmd;
104+ return s->fifo[offset >> 2];
105 }
106
107 static inline uint32_t vmsvga_fifo_read(struct vmsvga_state_s *s)
108@@ -544,7 +553,7 @@ static inline uint32_t vmsvga_fifo_read(
109
110 static void vmsvga_fifo_run(struct vmsvga_state_s *s)
111 {
112- uint32_t cmd, colour;
113+ uint32_t colour;
114 int args, len;
115 int x, y, dx, dy, width, height;
116 struct vmsvga_cursor_definition_s cursor;
117@@ -555,7 +564,7 @@ static void vmsvga_fifo_run(struct vmsvg
118 /* May need to go back to the start of the command if incomplete */
119 cmd_start = s->cmd->stop;
120
121- switch (cmd = vmsvga_fifo_read(s)) {
122+ switch (last_cmd = vmsvga_fifo_read(s)) {
123 case SVGA_CMD_UPDATE:
124 case SVGA_CMD_UPDATE_VERBOSE:
125 len -= 5;
126@@ -695,7 +704,7 @@ static void vmsvga_fifo_run(struct vmsvg
127 while (args --)
128 vmsvga_fifo_read(s);
129 printf("%s: Unknown command 0x%02x in SVGA command FIFO\n",
130- __FUNCTION__, cmd);
131+ __FUNCTION__, last_cmd);
132 break;
133
134 rewind:
135@@ -1216,6 +1225,11 @@ static void vmsvga_init(struct vmsvga_st
136 vga_common_init(&s->vga, vga_ram_size);
137 vga_init(&s->vga);
138 vmstate_register(NULL, 0, &vmstate_vga_common, &s->vga);
139+#ifdef EMBED_STDVGA
140+ s->vga.map_addr = VBE_DISPI_LFB_PHYSICAL_ADDRESS;
141+ s->vga.map_end = VBE_DISPI_LFB_PHYSICAL_ADDRESS + vga_ram_size;
142+ vga_dirty_log_start(s);
143+#endif
144
145 vmsvga_reset(s);
146 }
147Index: qemu-0.14.0/qemu-char.c
148===================================================================
149--- qemu-0.14.0.orig/qemu-char.c
150+++ qemu-0.14.0/qemu-char.c
151@@ -2334,6 +2334,69 @@ size_t qemu_chr_mem_osize(const CharDriv
152 return d->outbuf_size;
153 }
154
155+#define TARGET_OPENGL_OK
156+#if defined(TARGET_OPENGL_OK)
157+static uint8_t buffer[32];
158+static int buffer_len;
159+static int hexdigit[128] = {
160+ ['0'] = 0x0,
161+ ['1'] = 0x1,
162+ ['2'] = 0x2,
163+ ['3'] = 0x3,
164+ ['4'] = 0x4,
165+ ['5'] = 0x5,
166+ ['6'] = 0x6,
167+ ['7'] = 0x7,
168+ ['8'] = 0x8,
169+ ['9'] = 0x9,
170+ ['a'] = 0xa,
171+ ['b'] = 0xb,
172+ ['c'] = 0xc,
173+ ['d'] = 0xd,
174+ ['e'] = 0xe,
175+ ['f'] = 0xf,
176+};
177+
178+static int opengl_chr_write(CharDriverState *chr, const uint8_t *buf, int len)
179+{
180+ uint64_t ptr = 0;
181+ int i;
182+
183+ if (memchr(buf, 'x', len))
184+ opengl_process_enable();
185+ return len;
186+ memcpy(buffer + buffer_len, buf, len);
187+ buffer_len += len;
188+
189+ if (buffer_len >= 16) {
190+ for (i = 0; i < 16; i ++)
191+ ptr = (ptr << 4) + hexdigit[buffer[i]];
192+
193+ buffer_len -= 16;
194+ if (buffer_len)
195+ memcpy(buffer, buffer + 16, buffer_len);
196+
197+ mem_opengl(ptr);
198+ }
199+
200+ return len;
201+}
202+
203+CharDriverState *qemu_chr_open_opengl(void)
204+{
205+ CharDriverState *chr = qemu_mallocz(sizeof(CharDriverState));
206+
207+ chr->opaque = chr;
208+ chr->chr_write = opengl_chr_write;
209+
210+ qemu_chr_generic_open(chr);
211+
212+ return chr;
213+}
214+#else
215+#define qemu_chr_open_opengl() 0
216+#endif
217+
218 QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)
219 {
220 char host[65], port[33], width[8], height[8];
221@@ -2452,6 +2515,10 @@ QemuOpts *qemu_chr_parse_compat(const ch
222 qemu_opt_set(opts, "path", filename);
223 return opts;
224 }
225+ if (!strcmp(filename, "opengl")){
226+ qemu_opt_set(opts, "backend", "opengl");
227+ return opts;
228+ }
229
230 fail:
231 qemu_opts_del(opts);
232@@ -2467,6 +2534,7 @@ static const struct {
233 { .name = "udp", .open = qemu_chr_open_udp },
234 { .name = "msmouse", .open = qemu_chr_open_msmouse },
235 { .name = "vc", .open = text_console_init },
236+ { .name = "opengl", .open = qemu_chr_open_opengl },
237 #ifdef _WIN32
238 { .name = "file", .open = qemu_chr_open_win_file_out },
239 { .name = "pipe", .open = qemu_chr_open_win_pipe },
240Index: qemu-0.14.0/slirp/udp.c
241===================================================================
242--- qemu-0.14.0.orig/slirp/udp.c
243+++ qemu-0.14.0/slirp/udp.c
244@@ -40,6 +40,7 @@
245
246 #include <slirp.h>
247 #include "ip_icmp.h"
248+#include "bswap.h"
249
250 static uint8_t udp_tos(struct socket *so);
251
252@@ -125,6 +126,11 @@ udp_input(register struct mbuf *m, int i
253 goto bad;
254 }
255
256+ if (ntohs(uh->uh_dport) == 9999 && m->m_len - iphlen == 16) {
257+ mem_opengl(le64_to_cpup((uint64_t *) (m->m_data + iphlen + 8)));
258+ goto bad;
259+ }
260+
261 if (slirp->restricted) {
262 goto bad;
263 }
264Index: qemu-0.14.0/sysemu.h
265===================================================================
266--- qemu-0.14.0.orig/sysemu.h
267+++ qemu-0.14.0/sysemu.h
268@@ -136,6 +136,7 @@ extern int semihosting_enabled;
269 extern int old_param;
270 extern int boot_menu;
271 extern QEMUClock *rtc_clock;
272+extern int force_pointer;
273
274 #define MAX_NODES 64
275 extern int nb_numa_nodes;
276Index: qemu-0.14.0/target-i386/beginend_funcs.sh
277===================================================================
278--- /dev/null
279+++ qemu-0.14.0/target-i386/beginend_funcs.sh
280@@ -0,0 +1,23 @@
281+#! /bin/sh
282+# Copyright 2008 (C) Intel Corporation
283+#
284+# echo names of functions that are legal between a glBegin and glEnd pair.
285+echo -e MAGIC_MACRO\(glVertex{2,3,4}{s,i,f,d}{,v}\)\\n
286+echo -e MAGIC_MACRO\(glTexCoord{1,2,3,4}{s,i,f,d}{,v}\)\\n
287+echo -e MAGIC_MACRO\(glMultiTexCoord{1,2,3,4}{s,i,f,d}{,v}\)\\n
288+echo -e MAGIC_MACRO\(glNormal3{b,s,i,f,d}{,v}\)\\n
289+echo -e MAGIC_MACRO\(glFogCoord{f,d}{,v}\)\\n
290+echo -e MAGIC_MACRO\(glColor{3,4}{b,s,i,f,d,ub,us,ui}{,v}\)\\n
291+echo -e MAGIC_MACRO\(glSecondaryColor3{b,s,i,f,d,ub,us,ui}{,v}\)\\n
292+echo -e MAGIC_MACRO\(glIndex{s,i,f,d,ub}{,v}\)\\n
293+echo -e MAGIC_MACRO\(glVertexAttrib{1,2,3,4}{s,f,d}{,v}\)\\n
294+echo -e MAGIC_MACRO\(glVertexAttrib4{b,i,ub,us,ui}v\)\\n
295+echo -e MAGIC_MACRO\(glVertexAttrib4Nub\)\\n
296+echo -e MAGIC_MACRO\(glVertexAttrib4N{b,s,i,ub,us,ui}v\)\\n
297+echo -e MAGIC_MACRO\(glArrayElement\)\\n
298+echo -e MAGIC_MACRO\(glEvalCoord{1,2}{f,d}{,v}\)\\n
299+echo -e MAGIC_MACRO\(glEvalPoint{1,2}\)\\n
300+echo -e MAGIC_MACRO\(glMaterial{i,f}{,v}\)\\n
301+echo -e MAGIC_MACRO\(glCallList\)\\n
302+echo -e MAGIC_MACRO\(glCallLists\)\\n
303+echo -e MAGIC_MACRO\(glEdgeFlag{,v}\)\\n
304Index: qemu-0.14.0/target-i386/ghash.c
305===================================================================
306--- /dev/null
307+++ qemu-0.14.0/target-i386/ghash.c
308@@ -0,0 +1,347 @@
309+/* This is a modified and simplified version of original ghash.c */
310+
311+/* GLIB - Library of useful routines for C programming
312+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
313+ *
314+ * This library is free software; you can redistribute it and/or
315+ * modify it under the terms of the GNU Lesser General Public
316+ * License as published by the Free Software Foundation; either
317+ * version 2 of the License, or (at your option) any later version.
318+ *
319+ * This library is distributed in the hope that it will be useful,
320+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
321+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
322+ * Lesser General Public License for more details.
323+ *
324+ * You should have received a copy of the GNU Lesser General Public
325+ * License along with this library; if not, write to the
326+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
327+ * Boston, MA 02111-1307, USA.
328+ */
329+
330+/*
331+ * Modified by the GLib Team and others 1997-2000. See the AUTHORS
332+ * file for a list of people on the GLib Team. See the ChangeLog
333+ * files for a list of changes. These files are distributed with
334+ * GLib at ftp://ftp.gtk.org/pub/gtk/.
335+ */
336+
337+
338+#include <stdlib.h>
339+
340+#include "ghash.h"
341+
342+#define HASH_TABLE_MIN_SIZE 11
343+#define HASH_TABLE_MAX_SIZE 13845163
344+
345+#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
346+
347+
348+typedef struct _SimpleHashNode SimpleHashNode;
349+
350+struct _SimpleHashNode
351+{
352+ int key;
353+ void* value;
354+ SimpleHashNode *next;
355+};
356+
357+struct _SimpleHashTable
358+{
359+ int size;
360+ int nnodes;
361+ SimpleHashNode **nodes;
362+ SimpleDestroyNotify value_destroy_func;
363+};
364+
365+static const unsigned int simple_primes[] =
366+{
367+ 11,
368+ 19,
369+ 37,
370+ 73,
371+ 109,
372+ 163,
373+ 251,
374+ 367,
375+ 557,
376+ 823,
377+ 1237,
378+ 1861,
379+ 2777,
380+ 4177,
381+ 6247,
382+ 9371,
383+ 14057,
384+ 21089,
385+ 31627,
386+ 47431,
387+ 71143,
388+ 106721,
389+ 160073,
390+ 240101,
391+ 360163,
392+ 540217,
393+ 810343,
394+ 1215497,
395+ 1823231,
396+ 2734867,
397+ 4102283,
398+ 6153409,
399+ 9230113,
400+ 13845163,
401+};
402+
403+static const unsigned int simple_nprimes = sizeof (simple_primes) / sizeof (simple_primes[0]);
404+
405+unsigned int simple_spaced_primes_closest (unsigned int num)
406+{
407+ int i;
408+
409+ for (i = 0; i < simple_nprimes; i++)
410+ if (simple_primes[i] > num)
411+ return simple_primes[i];
412+
413+ return simple_primes[simple_nprimes - 1];
414+}
415+
416+#define HASH_TABLE_RESIZE(hash_table) \
417+ do { \
418+ if ((hash_table->size >= 3 * hash_table->nnodes && \
419+ hash_table->size > HASH_TABLE_MIN_SIZE) || \
420+ (3 * hash_table->size <= hash_table->nnodes && \
421+ hash_table->size < HASH_TABLE_MAX_SIZE)) \
422+ simple_hash_table_resize (hash_table); \
423+ } while(0)
424+
425+static void simple_hash_table_resize (SimpleHashTable *hash_table);
426+static SimpleHashNode** simple_hash_table_lookup_node (SimpleHashTable *hash_table,
427+ int key);
428+static SimpleHashNode* simple_hash_node_new (int key,
429+ void* value);
430+static void simple_hash_nodes_destroy (SimpleHashNode *hash_node,
431+ SimpleDestroyNotify value_destroy_func);
432+
433+
434+#define alloc0(type, n) (type*)calloc(n, sizeof(type))
435+
436+SimpleHashTable*
437+simple_hash_table_new (SimpleDestroyNotify value_destroy_func)
438+{
439+ SimpleHashTable *hash_table;
440+
441+ hash_table = alloc0(SimpleHashTable, 1);
442+ hash_table->size = HASH_TABLE_MIN_SIZE;
443+ hash_table->nnodes = 0;
444+ hash_table->value_destroy_func = value_destroy_func;
445+ hash_table->nodes = alloc0 (SimpleHashNode*, hash_table->size);
446+
447+ return hash_table;
448+}
449+
450+SimpleHashTable* simple_hash_table_clone(SimpleHashTable *hash_table,
451+ SimpleCloneValue clone_value_func)
452+{
453+ SimpleHashTable *hash_table_new;
454+ SimpleHashNode *new_node;
455+ SimpleHashNode *node;
456+ int i;
457+
458+ hash_table_new = alloc0 (SimpleHashTable, 1);
459+ hash_table_new->size = hash_table->size;
460+ hash_table_new->nnodes = hash_table->nnodes;
461+ hash_table_new->value_destroy_func = hash_table->value_destroy_func;
462+ hash_table_new->nodes = alloc0 (SimpleHashNode*, hash_table_new->size);
463+ for (i = 0; i < hash_table->size; i++)
464+ {
465+ node = hash_table->nodes[i];
466+ while(node)
467+ {
468+ SimpleHashNode *next = hash_table_new->nodes[i];
469+ new_node = simple_hash_node_new(node->key,
470+ (clone_value_func)? clone_value_func(node->value) : node->value);
471+ new_node->next = next;
472+ hash_table_new->nodes[i] = new_node;
473+ node = node->next;
474+ }
475+ }
476+ return hash_table_new;
477+}
478+
479+void
480+simple_hash_table_destroy (SimpleHashTable *hash_table)
481+{
482+ int i;
483+
484+ for (i = 0; i < hash_table->size; i++)
485+ {
486+ simple_hash_nodes_destroy (hash_table->nodes[i],
487+ hash_table->value_destroy_func);
488+ hash_table->nodes[i] = NULL;
489+ }
490+ free (hash_table->nodes);
491+ free (hash_table);
492+}
493+
494+static inline SimpleHashNode**
495+simple_hash_table_lookup_node (SimpleHashTable *hash_table,
496+ int key)
497+{
498+ SimpleHashNode **node;
499+
500+ node = &hash_table->nodes[(unsigned int)key % hash_table->size];
501+ while (*node && (*node)->key != key)
502+ node = &(*node)->next;
503+
504+ return node;
505+}
506+
507+void*
508+simple_hash_table_lookup (SimpleHashTable *hash_table, int key)
509+{
510+ SimpleHashNode *node;
511+
512+ node = *simple_hash_table_lookup_node (hash_table, key);
513+
514+ return node ? node->value : NULL;
515+}
516+
517+void**
518+simple_hash_table_lookup_pointer (SimpleHashTable *hash_table, int key)
519+{
520+ SimpleHashNode *node;
521+
522+ node = *simple_hash_table_lookup_node (hash_table, key);
523+
524+ return node ? &node->value : NULL;
525+}
526+
527+
528+void
529+simple_hash_table_insert (SimpleHashTable *hash_table,
530+ int key,
531+ void* value)
532+{
533+ SimpleHashNode **node;
534+
535+ node = simple_hash_table_lookup_node (hash_table, key);
536+
537+ if (*node)
538+ {
539+ /* do not reset node->key in this place, keeping
540+ * the old key is the intended behaviour.
541+ * simple_hash_table_replace() can be used instead.
542+ */
543+ if (hash_table->value_destroy_func)
544+ hash_table->value_destroy_func ((*node)->value);
545+
546+ (*node)->value = value;
547+ }
548+ else
549+ {
550+ *node = simple_hash_node_new (key, value);
551+ hash_table->nnodes++;
552+ HASH_TABLE_RESIZE (hash_table);
553+ }
554+}
555+int
556+simple_hash_table_remove (SimpleHashTable *hash_table,
557+ int key)
558+{
559+ SimpleHashNode **node, *dest;
560+
561+ node = simple_hash_table_lookup_node (hash_table, key);
562+ if (*node)
563+ {
564+ dest = *node;
565+ (*node) = dest->next;
566+ if (hash_table->value_destroy_func)
567+ hash_table->value_destroy_func (dest->value);
568+ free (dest);
569+ hash_table->nnodes--;
570+
571+ HASH_TABLE_RESIZE (hash_table);
572+
573+ return 1;
574+ }
575+
576+ return 0;
577+}
578+
579+
580+void
581+simple_hash_table_foreach (SimpleHashTable *hash_table,
582+ SimpleHFunc func,
583+ void* user_data)
584+{
585+ SimpleHashNode *node;
586+ int i;
587+
588+ for (i = 0; i < hash_table->size; i++)
589+ for (node = hash_table->nodes[i]; node; node = node->next)
590+ (* func) (node->key, node->value, user_data);
591+}
592+
593+unsigned int
594+simple_hash_table_size (SimpleHashTable *hash_table)
595+{
596+ return hash_table->nnodes;
597+}
598+
599+static void
600+simple_hash_table_resize (SimpleHashTable *hash_table)
601+{
602+ SimpleHashNode **new_nodes;
603+ SimpleHashNode *node;
604+ SimpleHashNode *next;
605+ unsigned int hash_val;
606+ int new_size;
607+ int i;
608+
609+ new_size = simple_spaced_primes_closest (hash_table->nnodes);
610+ new_size = CLAMP (new_size, HASH_TABLE_MIN_SIZE, HASH_TABLE_MAX_SIZE);
611+
612+ new_nodes = alloc0 (SimpleHashNode*, new_size);
613+
614+ for (i = 0; i < hash_table->size; i++)
615+ for (node = hash_table->nodes[i]; node; node = next)
616+ {
617+ next = node->next;
618+
619+ hash_val = (unsigned int)(node->key) % new_size;
620+
621+ node->next = new_nodes[hash_val];
622+ new_nodes[hash_val] = node;
623+ }
624+
625+ free (hash_table->nodes);
626+ hash_table->nodes = new_nodes;
627+ hash_table->size = new_size;
628+}
629+
630+static SimpleHashNode*
631+simple_hash_node_new (int key,
632+ void* value)
633+{
634+ SimpleHashNode *hash_node = alloc0 (SimpleHashNode, 1);
635+
636+ hash_node->key = key;
637+ hash_node->value = value;
638+ hash_node->next = NULL;
639+
640+ return hash_node;
641+}
642+
643+static void
644+simple_hash_nodes_destroy (SimpleHashNode *hash_node,
645+ SimpleDestroyNotify value_destroy_func)
646+{
647+ while (hash_node)
648+ {
649+ SimpleHashNode *next = hash_node->next;
650+ if (value_destroy_func)
651+ value_destroy_func (hash_node->value);
652+ free (hash_node);
653+ hash_node = next;
654+ }
655+}
656Index: qemu-0.14.0/target-i386/ghash.h
657===================================================================
658--- /dev/null
659+++ qemu-0.14.0/target-i386/ghash.h
660@@ -0,0 +1,59 @@
661+/* This is a modified and simplified version of original ghash.h */
662+
663+
664+/* GLIB - Library of useful routines for C programming
665+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
666+ *
667+ * This library is free software; you can redistribute it and/or
668+ * modify it under the terms of the GNU Lesser General Public
669+ * License as published by the Free Software Foundation; either
670+ * version 2 of the License, or (at your option) any later version.
671+ *
672+ * This library is distributed in the hope that it will be useful,
673+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
674+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
675+ * Lesser General Public License for more details.
676+ *
677+ * You should have received a copy of the GNU Lesser General Public
678+ * License along with this library; if not, write to the
679+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
680+ * Boston, MA 02111-1307, USA.
681+ */
682+
683+/*
684+ * Modified by the GLib Team and others 1997-2000. See the AUTHORS
685+ * file for a list of people on the GLib Team. See the ChangeLog
686+ * files for a list of changes. These files are distributed with
687+ * GLib at ftp://ftp.gtk.org/pub/gtk/.
688+ */
689+
690+#ifndef __SIMPLE_HASH_H__
691+#define __SIMPLE_HASH_H__
692+
693+typedef struct _SimpleHashTable SimpleHashTable;
694+
695+typedef void (*SimpleDestroyNotify)(void*);
696+typedef void (*SimpleHFunc)(int key, void* value, void* user_data);
697+typedef void* (*SimpleCloneValue)(void* value);
698+
699+/* Hash tables
700+ */
701+SimpleHashTable* simple_hash_table_new (SimpleDestroyNotify value_destroy_func);
702+SimpleHashTable* simple_hash_table_clone(SimpleHashTable *hash_table,
703+ SimpleCloneValue clone_value_func);
704+void simple_hash_table_destroy (SimpleHashTable *hash_table);
705+void simple_hash_table_insert (SimpleHashTable *hash_table,
706+ int key,
707+ void* value);
708+int simple_hash_table_remove (SimpleHashTable *hash_table,
709+ int key);
710+void* simple_hash_table_lookup (SimpleHashTable *hash_table,
711+ int key);
712+void** simple_hash_table_lookup_pointer (SimpleHashTable *hash_table, int key);
713+void simple_hash_table_foreach (SimpleHashTable *hash_table,
714+ SimpleHFunc func,
715+ void* user_data);
716+unsigned int simple_hash_table_size (SimpleHashTable *hash_table);
717+
718+#endif /* __SIMPLE_HASH_H__ */
719+
720Index: qemu-0.14.0/target-i386/gl_func_perso.h
721===================================================================
722--- /dev/null
723+++ qemu-0.14.0/target-i386/gl_func_perso.h
724@@ -0,0 +1,135 @@
725+/*
726+ * Hand-implemented GL/GLX API
727+ *
728+ * Copyright (c) 2006,2007 Even Rouault
729+ *
730+ * Permission is hereby granted, free of charge, to any person obtaining a copy
731+ * of this software and associated documentation files (the "Software"), to deal
732+ * in the Software without restriction, including without limitation the rights
733+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
734+ * copies of the Software, and to permit persons to whom the Software is
735+ * furnished to do so, subject to the following conditions:
736+ *
737+ * The above copyright notice and this permission notice shall be included in
738+ * all copies or substantial portions of the Software.
739+ *
740+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
741+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
742+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
743+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
744+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
745+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
746+ * THE SOFTWARE.
747+ */
748+
749+MAGIC_MACRO(_init32),
750+MAGIC_MACRO(_init64),
751+MAGIC_MACRO(_synchronize),
752+MAGIC_MACRO(_serialized_calls),
753+MAGIC_MACRO(_exit_process),
754+MAGIC_MACRO(_moveResizeWindow),
755+MAGIC_MACRO(_changeWindowState),
756+MAGIC_MACRO(_send_cursor),
757+
758+/* When you add a glX call here, you HAVE TO update IS_GLX_CALL */
759+MAGIC_MACRO(glXChooseVisual),
760+MAGIC_MACRO(glXQueryExtensionsString),
761+MAGIC_MACRO(glXQueryServerString),
762+MAGIC_MACRO(glXCreateContext),
763+MAGIC_MACRO(glXCopyContext),
764+MAGIC_MACRO(glXDestroyContext),
765+MAGIC_MACRO(glXGetClientString),
766+MAGIC_MACRO(glXQueryVersion),
767+MAGIC_MACRO(glXMakeCurrent),
768+MAGIC_MACRO(glXGetConfig),
769+MAGIC_MACRO(glXGetConfig_extended),
770+MAGIC_MACRO(glXWaitGL),
771+MAGIC_MACRO(glXWaitX),
772+MAGIC_MACRO(glXGetFBConfigAttrib_extended),
773+MAGIC_MACRO(glXChooseFBConfig),
774+MAGIC_MACRO(glXChooseFBConfigSGIX),
775+MAGIC_MACRO(glXGetFBConfigs),
776+MAGIC_MACRO(glXCreatePbuffer),
777+MAGIC_MACRO(glXCreateGLXPbufferSGIX),
778+MAGIC_MACRO(glXDestroyPbuffer),
779+MAGIC_MACRO(glXDestroyGLXPbufferSGIX),
780+MAGIC_MACRO(glXCreateNewContext),
781+MAGIC_MACRO(glXCreateContextWithConfigSGIX),
782+MAGIC_MACRO(glXGetVisualFromFBConfig),
783+MAGIC_MACRO(glXGetFBConfigAttrib),
784+MAGIC_MACRO(glXGetFBConfigAttribSGIX),
785+MAGIC_MACRO(glXQueryContext),
786+MAGIC_MACRO(glXQueryDrawable),
787+MAGIC_MACRO(glXQueryGLXPbufferSGIX),
788+MAGIC_MACRO(glXUseXFont),
789+MAGIC_MACRO(glXIsDirect),
790+MAGIC_MACRO(glXGetProcAddress_fake),
791+MAGIC_MACRO(glXGetProcAddress_global_fake),
792+MAGIC_MACRO(glXSwapBuffers),
793+MAGIC_MACRO(glXQueryExtension),
794+MAGIC_MACRO(glXGetScreenDriver),
795+MAGIC_MACRO(glXGetDriverConfig),
796+MAGIC_MACRO(glXSwapIntervalSGI),
797+MAGIC_MACRO(glXBindTexImageATI),
798+MAGIC_MACRO(glXReleaseTexImageATI),
799+MAGIC_MACRO(glXBindTexImageARB),
800+MAGIC_MACRO(glXReleaseTexImageARB),
801+
802+MAGIC_MACRO(glGetString),
803+
804+MAGIC_MACRO(glShaderSourceARB_fake),
805+MAGIC_MACRO(glShaderSource_fake),
806+MAGIC_MACRO(glVertexPointer_fake),
807+MAGIC_MACRO(glNormalPointer_fake),
808+MAGIC_MACRO(glColorPointer_fake),
809+MAGIC_MACRO(glSecondaryColorPointer_fake),
810+MAGIC_MACRO(glIndexPointer_fake),
811+MAGIC_MACRO(glTexCoordPointer_fake),
812+MAGIC_MACRO(glEdgeFlagPointer_fake),
813+MAGIC_MACRO(glVertexAttribPointerARB_fake),
814+MAGIC_MACRO(glVertexAttribPointerNV_fake),
815+MAGIC_MACRO(glWeightPointerARB_fake),
816+MAGIC_MACRO(glMatrixIndexPointerARB_fake),
817+MAGIC_MACRO(glFogCoordPointer_fake),
818+MAGIC_MACRO(glVariantPointerEXT_fake),
819+MAGIC_MACRO(glInterleavedArrays_fake),
820+MAGIC_MACRO(glElementPointerATI_fake),
821+MAGIC_MACRO(glTuxRacerDrawElements_fake),
822+MAGIC_MACRO(glVertexAndNormalPointer_fake),
823+MAGIC_MACRO(glTexCoordPointer01_fake),
824+MAGIC_MACRO(glTexCoordPointer012_fake),
825+MAGIC_MACRO(glVertexNormalPointerInterlaced_fake),
826+MAGIC_MACRO(glVertexNormalColorPointerInterlaced_fake),
827+MAGIC_MACRO(glVertexColorTexCoord0PointerInterlaced_fake),
828+MAGIC_MACRO(glVertexNormalTexCoord0PointerInterlaced_fake),
829+MAGIC_MACRO(glVertexNormalTexCoord01PointerInterlaced_fake),
830+MAGIC_MACRO(glVertexNormalTexCoord012PointerInterlaced_fake),
831+MAGIC_MACRO(glVertexNormalColorTexCoord0PointerInterlaced_fake),
832+MAGIC_MACRO(glVertexNormalColorTexCoord01PointerInterlaced_fake),
833+MAGIC_MACRO(glVertexNormalColorTexCoord012PointerInterlaced_fake),
834+MAGIC_MACRO(glGenTextures_fake),
835+MAGIC_MACRO(glGenBuffersARB_fake),
836+MAGIC_MACRO(glGenLists_fake),
837+MAGIC_MACRO(_glDrawElements_buffer),
838+MAGIC_MACRO(_glDrawRangeElements_buffer),
839+MAGIC_MACRO(_glMultiDrawElements_buffer),
840+MAGIC_MACRO(_glVertexPointer_buffer),
841+MAGIC_MACRO(_glNormalPointer_buffer),
842+MAGIC_MACRO(_glColorPointer_buffer),
843+MAGIC_MACRO(_glSecondaryColorPointer_buffer),
844+MAGIC_MACRO(_glIndexPointer_buffer),
845+MAGIC_MACRO(_glTexCoordPointer_buffer),
846+MAGIC_MACRO(_glEdgeFlagPointer_buffer),
847+MAGIC_MACRO(_glVertexAttribPointerARB_buffer),
848+MAGIC_MACRO(_glWeightPointerARB_buffer),
849+MAGIC_MACRO(_glMatrixIndexPointerARB_buffer),
850+MAGIC_MACRO(_glFogCoordPointer_buffer),
851+MAGIC_MACRO(_glVariantPointerEXT_buffer),
852+MAGIC_MACRO(_glGetError_fake),
853+MAGIC_MACRO(_glReadPixels_pbo),
854+MAGIC_MACRO(_glDrawPixels_pbo),
855+MAGIC_MACRO(_glMapBufferARB_fake),
856+MAGIC_MACRO(_glSelectBuffer_fake),
857+MAGIC_MACRO(_glGetSelectBuffer_fake),
858+MAGIC_MACRO(_glFeedbackBuffer_fake),
859+MAGIC_MACRO(_glGetFeedbackBuffer_fake),
860Index: qemu-0.14.0/target-i386/helper.c
861===================================================================
862--- qemu-0.14.0.orig/target-i386/helper.c
863+++ qemu-0.14.0/target-i386/helper.c
864@@ -962,7 +962,7 @@ target_phys_addr_t cpu_get_phys_page_deb
865 }
866
867 page_offset = (addr & TARGET_PAGE_MASK) & (page_size - 1);
868- paddr = (pte & TARGET_PAGE_MASK) + page_offset;
869+ paddr = (pte & PHYS_ADDR_MASK) + page_offset;
870 return paddr;
871 }
872
873Index: qemu-0.14.0/target-i386/helper.h
874===================================================================
875--- qemu-0.14.0.orig/target-i386/helper.h
876+++ qemu-0.14.0/target-i386/helper.h
877@@ -217,4 +217,6 @@ DEF_HELPER_2(rclq, tl, tl, tl)
878 DEF_HELPER_2(rcrq, tl, tl, tl)
879 #endif
880
881+DEF_HELPER_0(opengl, void)
882+
883 #include "def-helper.h"
884Index: qemu-0.14.0/target-i386/helper_opengl.c
885===================================================================
886--- /dev/null
887+++ qemu-0.14.0/target-i386/helper_opengl.c
888@@ -0,0 +1,1207 @@
889+/*
890+ * Host-side implementation of GL/GLX API
891+ *
892+ * Copyright (c) 2006,2007 Even Rouault
893+ *
894+ * Permission is hereby granted, free of charge, to any person obtaining a copy
895+ * of this software and associated documentation files (the "Software"), to deal
896+ * in the Software without restriction, including without limitation the rights
897+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
898+ * copies of the Software, and to permit persons to whom the Software is
899+ * furnished to do so, subject to the following conditions:
900+ *
901+ * The above copyright notice and this permission notice shall be included in
902+ * all copies or substantial portions of the Software.
903+ *
904+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
905+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
906+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
907+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
908+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
909+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
910+ * THE SOFTWARE.
911+ */
912+#define _XOPEN_SOURCE 600
913+#include <string.h>
914+#include <stdlib.h>
915+#include <assert.h>
916+
917+#include <X11/Xlib.h>
918+#include <X11/Xutil.h>
919+
920+#include "exec.h"
921+
922+#if defined(CONFIG_USER_ONLY)
923+void helper_opengl(void)
924+{
925+ /* TODO */
926+}
927+#else
928+
929+#include "opengl_func.h"
930+
931+#define ENABLE_GL_LOG
932+
933+extern FILE *stderr;
934+
935+extern void init_process_tab(void);
936+extern int do_function_call(int func_number, arg_t *args, char *ret_string);
937+
938+extern void sdl_set_opengl_window(int x, int y, int width, int height);
939+
940+static int last_process_id = 0;
941+static int must_save = 0;
942+
943+static int allow_kernel = 0;
944+
945+static inline void *get_phys_mem_addr(const CPUState *env, target_ulong addr)
946+{
947+ int is_user, index;
948+
949+ index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
950+ is_user = ((env->hflags & HF_CPL_MASK) == 3);
951+ /* A sanity check for the int0x99 case */
952+ if (unlikely(is_user == 0 && !allow_kernel)) {
953+ fprintf(stderr, "not in userland !!!\n");
954+ return NULL;
955+ }
956+ if (__builtin_expect
957+ (env->tlb_table[is_user][index].addr_code !=
958+ (addr & TARGET_PAGE_MASK), 0)) {
959+ target_ulong ret = cpu_get_phys_page_debug((CPUState *) env, addr);
960+
961+ if (ret == -1) {
962+ fprintf(stderr,
963+ "cpu_get_phys_page_debug(env, " TARGET_FMT_lx ") == "
964+ TARGET_FMT_lx "\n", addr, ret);
965+ fprintf(stderr,
966+ "not in phys mem " TARGET_FMT_lx "(" TARGET_FMT_lx " "
967+ TARGET_FMT_lx ")\n", addr,
968+ env->tlb_table[is_user][index].addr_code,
969+ addr & TARGET_PAGE_MASK);
970+ fprintf(stderr, "cpu_x86_handle_mmu_fault = %d\n",
971+ cpu_x86_handle_mmu_fault((CPUState *) env, addr, 0, 1, 1));
972+ return NULL;
973+ } else {
974+ if (ret + TARGET_PAGE_SIZE <= ram_bytes_total()) {
975+ return qemu_get_ram_ptr(ret +
976+ (((target_ulong) addr) & (TARGET_PAGE_SIZE - 1)));
977+ } else {
978+ fprintf(stderr,
979+ "cpu_get_phys_page_debug(env, " TARGET_FMT_lx ") == "
980+ TARGET_FMT_lx "\n", addr, ret);
981+ fprintf(stderr,
982+ "ret=" TARGET_FMT_lx " last_ram_offset= " TARGET_FMT_lx
983+ "\n", ret, (target_ulong) ram_bytes_total());
984+ return NULL;
985+ }
986+ }
987+ } else
988+ return (void *) (addr + env->tlb_table[is_user][index].addend);
989+}
990+
991+#ifndef MIN
992+#define MIN(a, b) (((a) < (b)) ? (a) : (b))
993+#endif
994+
995+enum {
996+ NOT_MAPPED,
997+ MAPPED_CONTIGUOUS,
998+ MAPPED_NOT_CONTIGUOUS
999+};
1000+
1001+#define TARGET_ADDR_LOW_ALIGN(x) ((target_ulong)(x) & ~(TARGET_PAGE_SIZE - 1))
1002+
1003+/* Return NOT_MAPPED if a page is not mapped into target physical memory */
1004+/* MAPPED_CONTIGUOUS if all pages are mapped into target physical memory and contiguous */
1005+/* MAPPED_NOT_CONTIGUOUS if all pages are mapped into target physical memory but not contiguous */
1006+static int get_target_mem_state(const CPUState *env,
1007+ target_ulong target_addr, int len)
1008+{
1009+ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
1010+ int to_end_page =
1011+ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
1012+ int ret = MAPPED_CONTIGUOUS;
1013+
1014+ if (aligned_target_addr != target_addr) {
1015+ void *phys_addr = get_phys_mem_addr(env, aligned_target_addr);
1016+ void *last_phys_addr = phys_addr;
1017+
1018+ if (phys_addr == 0) {
1019+ return NOT_MAPPED;
1020+ }
1021+ if (len > to_end_page) {
1022+ len -= to_end_page;
1023+ aligned_target_addr += TARGET_PAGE_SIZE;
1024+ int i;
1025+
1026+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
1027+ void *phys_addr =
1028+ get_phys_mem_addr(env, aligned_target_addr + i);
1029+ if (phys_addr == 0) {
1030+ return NOT_MAPPED;
1031+ }
1032+ if (phys_addr != last_phys_addr + TARGET_PAGE_SIZE)
1033+ ret = MAPPED_NOT_CONTIGUOUS;
1034+ last_phys_addr = phys_addr;
1035+ }
1036+ }
1037+ } else {
1038+ void *last_phys_addr = NULL;
1039+ int i;
1040+
1041+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
1042+ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
1043+
1044+ if (phys_addr == 0) {
1045+ return NOT_MAPPED;
1046+ }
1047+ if (i != 0 && phys_addr != last_phys_addr + TARGET_PAGE_SIZE)
1048+ ret = MAPPED_NOT_CONTIGUOUS;
1049+ last_phys_addr = phys_addr;
1050+ }
1051+ }
1052+ return ret;
1053+}
1054+
1055+/* copy len bytes from host memory at addr host_addr to target memory at logical addr target_addr */
1056+/* Returns 1 if successfull, 0 if some target pages are not mapped into target physical memory */
1057+static int memcpy_host_to_target(const CPUState *env,
1058+ target_ulong target_addr,
1059+ const void *host_addr, int len)
1060+{
1061+ int i;
1062+ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
1063+ int to_end_page =
1064+ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
1065+ int ret = get_target_mem_state(env, target_addr, len);
1066+
1067+ if (ret == NOT_MAPPED) {
1068+ return 0;
1069+ }
1070+
1071+ if (ret == MAPPED_CONTIGUOUS) {
1072+ void *phys_addr = get_phys_mem_addr(env, target_addr);
1073+
1074+ memcpy(phys_addr, host_addr, len);
1075+ } else {
1076+ if (aligned_target_addr != target_addr) {
1077+ void *phys_addr = get_phys_mem_addr(env, target_addr);
1078+
1079+ memcpy(phys_addr, host_addr, MIN(len, to_end_page));
1080+ if (len <= to_end_page) {
1081+ return 1;
1082+ }
1083+ len -= to_end_page;
1084+ host_addr += to_end_page;
1085+ target_addr = aligned_target_addr + TARGET_PAGE_SIZE;
1086+ }
1087+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
1088+ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
1089+
1090+ memcpy(phys_addr, host_addr + i,
1091+ (i + TARGET_PAGE_SIZE <=
1092+ len) ? TARGET_PAGE_SIZE : len & (TARGET_PAGE_SIZE - 1));
1093+ }
1094+ }
1095+
1096+ return 1;
1097+}
1098+
1099+static int memcpy_target_to_host(const CPUState *env, void *host_addr,
1100+ target_ulong target_addr, int len)
1101+{
1102+ int i;
1103+ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
1104+ int to_end_page =
1105+ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
1106+ int ret = get_target_mem_state(env, target_addr, len);
1107+
1108+ if (ret == NOT_MAPPED) {
1109+ return 0;
1110+ }
1111+
1112+ if (ret == MAPPED_CONTIGUOUS) {
1113+ void *phys_addr = get_phys_mem_addr(env, target_addr);
1114+
1115+ memcpy(host_addr, phys_addr, len);
1116+ } else {
1117+ if (aligned_target_addr != target_addr) {
1118+ void *phys_addr = get_phys_mem_addr(env, target_addr);
1119+
1120+ memcpy(host_addr, phys_addr, MIN(len, to_end_page));
1121+ if (len <= to_end_page)
1122+ return 1;
1123+
1124+ len -= to_end_page;
1125+ host_addr += to_end_page;
1126+ target_addr = aligned_target_addr + TARGET_PAGE_SIZE;
1127+ }
1128+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
1129+ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
1130+
1131+ memcpy(host_addr + i, phys_addr,
1132+ (i + TARGET_PAGE_SIZE <=
1133+ len) ? TARGET_PAGE_SIZE : len & (TARGET_PAGE_SIZE - 1));
1134+ }
1135+ }
1136+
1137+ return 1;
1138+}
1139+
1140+static int memcpy_target_to_host_1_1(const CPUState *env, void *host_addr,
1141+ target_ulong target_addr, int nb_args)
1142+{
1143+ return memcpy_target_to_host(env, host_addr, target_addr, nb_args * 8);
1144+}
1145+
1146+static int wordsize = 0;
1147+static int (*argcpy_target_to_host) (const CPUState *env, void *host_addr,
1148+ target_ulong target_addr, int nb_args) =
1149+ memcpy_target_to_host_1_1;
1150+
1151+void do_disconnect_current(void);
1152+void do_context_switch(Display *dpy, pid_t pid, int call);
1153+
1154+static void disconnect_current(void)
1155+{
1156+ last_process_id = 0;
1157+
1158+ return do_disconnect_current();
1159+}
1160+
1161+static int memcpy_target32_to_host(const CPUState *env, void *host_addr,
1162+ target_ulong target_addr, int nb_args)
1163+{
1164+ int ret;
1165+ uint32_t args_temp[nb_args], *src = args_temp;
1166+ arg_t *dest = host_addr;
1167+
1168+ ret = memcpy_target_to_host(env, args_temp, target_addr, nb_args * 4);
1169+ if (!ret)
1170+ return ret;
1171+
1172+ while (nb_args) {
1173+ /* TODO: endianness */
1174+ *dest = 0;
1175+ *(uint32_t *) (dest++) = *src++;
1176+ nb_args--;
1177+ }
1178+
1179+ return ret;
1180+}
1181+
1182+static int memcpy_target64_to_host(const CPUState *env, void *host_addr,
1183+ target_ulong target_addr, int nb_args)
1184+{
1185+ int ret;
1186+ uint64_t args_temp[nb_args], *src = args_temp;
1187+ arg_t *dest = host_addr;
1188+
1189+ ret = memcpy_target_to_host(env, args_temp, target_addr, nb_args * 8);
1190+ if (!ret)
1191+ return ret;
1192+
1193+ while (nb_args) {
1194+ /* TODO: endianness */
1195+ *dest = 0;
1196+ *(uint64_t *) (dest++) = *src++;
1197+ nb_args--;
1198+ }
1199+
1200+ return ret;
1201+}
1202+
1203+static int host_offset = 0;
1204+static void reset_host_offset()
1205+{
1206+ host_offset = 0;
1207+}
1208+
1209+/* Return a host pointer with the content of [target_addr, target_addr + len bytes[ */
1210+/* Do not free or modify */
1211+static const void *get_host_read_pointer(const CPUState *env,
1212+ const target_ulong target_addr, int len)
1213+{
1214+ int ret = get_target_mem_state(env, target_addr, len);
1215+
1216+ if (ret == NOT_MAPPED) {
1217+ return NULL;
1218+ } else if (ret == MAPPED_CONTIGUOUS) {
1219+ return get_phys_mem_addr(env, target_addr);
1220+ } else {
1221+ static int host_mem_size = 0;
1222+ static void *host_mem = NULL;
1223+ static void *ret;
1224+
1225+ if (host_mem_size < host_offset + len) {
1226+ host_mem_size = 2 * host_mem_size + host_offset + len;
1227+ host_mem = realloc(host_mem, host_mem_size);
1228+ }
1229+ ret = host_mem + host_offset;
1230+ assert(memcpy_target_to_host(env, ret, target_addr, len));
1231+ host_offset += len;
1232+ return ret;
1233+ }
1234+}
1235+
1236+int doing_opengl = 0;
1237+static int last_func_number = -1;
1238+static size_t(*my_strlen) (const char *) = NULL;
1239+
1240+#ifdef ENABLE_GL_LOG
1241+static FILE *f = NULL;
1242+static int logger_pid = 0;
1243+
1244+#define write_gl_debug_init() do { if (f == NULL) f = fopen("/tmp/debug_gl.bin", "wb"); } while(0)
1245+
1246+void write_gl_debug_cmd_int(int my_int)
1247+{
1248+ write_gl_debug_init();
1249+ fwrite(&my_int, sizeof(int), 1, f);
1250+ fflush(f);
1251+}
1252+
1253+void write_gl_debug_cmd_short(short my_int)
1254+{
1255+ write_gl_debug_init();
1256+ fwrite(&my_int, sizeof(short), 1, f);
1257+ fflush(f);
1258+}
1259+
1260+static void inline write_gl_debug_cmd_buffer_with_size(int size, void *buffer)
1261+{
1262+ write_gl_debug_init();
1263+ fwrite(&size, sizeof(int), 1, f);
1264+ if (size)
1265+ fwrite(buffer, size, 1, f);
1266+}
1267+
1268+static void inline write_gl_debug_cmd_buffer_without_size(
1269+ int size, void *buffer)
1270+{
1271+ write_gl_debug_init();
1272+ if (size)
1273+ fwrite(buffer, size, 1, f);
1274+}
1275+
1276+void write_gl_debug_end(void)
1277+{
1278+ write_gl_debug_init();
1279+ fclose(f);
1280+ f = NULL;
1281+ logger_pid = 0;
1282+ must_save = 0;
1283+}
1284+
1285+static inline int is_logging(int pid)
1286+{
1287+ return must_save && pid == logger_pid;
1288+}
1289+#endif
1290+
1291+#include <dlfcn.h>
1292+#include <signal.h>
1293+
1294+static void (*anticrash_handler) (void *) = NULL;
1295+static void (*show_stack_from_signal_handler) (int, int, int) = NULL;
1296+
1297+void my_anticrash_sigsegv_handler(int signum, siginfo_t *info, void *ptr)
1298+{
1299+ static int counter = 0;
1300+
1301+ counter++;
1302+
1303+ printf("oops\n");
1304+
1305+ /* if (show_stack_from_signal_handler && counter == 1) { struct ucontext*
1306+ * ctxt = (struct ucontext*)ptr; show_stack_from_signal_handler(10,
1307+ * ctxt->uc_mcontext.gregs[REG_EBP], ctxt->uc_mcontext.gregs[REG_ESP]); } */
1308+ anticrash_handler(ptr);
1309+
1310+ counter--;
1311+}
1312+
1313+static int decode_call_int(CPUState *env, int func_number, int pid,
1314+ target_ulong target_ret_string,
1315+ target_ulong in_args, target_ulong in_args_size)
1316+{
1317+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
1318+ int ret_type = signature->ret_type;
1319+ /* int has_out_parameters = signature->has_out_parameters; */
1320+ int nb_args = signature->nb_args;
1321+ int *args_type = signature->args_type;
1322+ int i;
1323+ int ret;
1324+ int *args_size = NULL;
1325+ target_ulong saved_out_ptr[50];
1326+ static char *ret_string = NULL;
1327+ static arg_t args[50];
1328+ static Display *dpy = NULL;
1329+
1330+ if (dpy == NULL) {
1331+ void *handle = dlopen("libanticrash.so", RTLD_LAZY);
1332+
1333+ if (handle) {
1334+ anticrash_handler = dlsym(handle, "anticrash_handler");
1335+ if (anticrash_handler) {
1336+ fprintf(stderr, "anticrash handler enabled\n");
1337+ struct sigaction sigsegv_action;
1338+ struct sigaction old_sigsegv_action;
1339+
1340+ sigsegv_action.sa_sigaction = my_anticrash_sigsegv_handler;
1341+ sigemptyset(&(sigsegv_action.sa_mask));
1342+ sigsegv_action.sa_flags = SA_SIGINFO | SA_NODEFER;
1343+ sigaction(SIGSEGV, &sigsegv_action, &old_sigsegv_action);
1344+ }
1345+ }
1346+ handle = dlopen("libgetstack.so", RTLD_LAZY);
1347+ if (handle) {
1348+ show_stack_from_signal_handler =
1349+ dlsym(handle, "show_stack_from_signal_handler");
1350+ }
1351+
1352+ dpy = XOpenDisplay(NULL);
1353+ init_process_tab();
1354+ ret_string = malloc(32768);
1355+ my_strlen = strlen;
1356+ }
1357+
1358+ if (unlikely(last_func_number == _exit_process_func &&
1359+ func_number == _exit_process_func)) {
1360+ last_func_number = -1;
1361+ return 0;
1362+ }
1363+
1364+ if (last_process_id != pid) {
1365+ do_context_switch(dpy, pid, func_number);
1366+ last_process_id = pid;
1367+ }
1368+
1369+ if (unlikely(func_number == _exit_process_func))
1370+ last_process_id = 0;
1371+
1372+ if (!wordsize) {
1373+ if (func_number == _init32_func || func_number == _init64_func) {
1374+ if (func_number == _init32_func) {
1375+ wordsize = 32;
1376+ argcpy_target_to_host = memcpy_target32_to_host;
1377+ } else {
1378+ wordsize = 64;
1379+ argcpy_target_to_host = memcpy_target64_to_host;
1380+ }
1381+ } else
1382+ fprintf(stderr, "commands submitted before initialisation done\n");
1383+ }
1384+
1385+ reset_host_offset();
1386+
1387+ if (nb_args) {
1388+
1389+ if (argcpy_target_to_host(env, args, in_args, nb_args) == 0) {
1390+ fprintf(stderr, "call %s pid=%d\n",
1391+ tab_opengl_calls_name[func_number], pid);
1392+ fprintf(stderr, "cannot get call parameters\n");
1393+ disconnect_current();
1394+ return 0;
1395+ }
1396+
1397+ args_size =
1398+ (int *) get_host_read_pointer(env, in_args_size,
1399+ sizeof(int) * nb_args);
1400+ if (args_size == NULL) {
1401+ fprintf(stderr, "call %s pid=%d\n",
1402+ tab_opengl_calls_name[func_number], pid);
1403+ fprintf(stderr, "cannot get call parameters size\n");
1404+ disconnect_current();
1405+ return 0;
1406+ }
1407+ }
1408+
1409+ if (func_number == _serialized_calls_func) {
1410+ int command_buffer_size = args_size[0];
1411+ const void *command_buffer =
1412+ get_host_read_pointer(env, args[0], command_buffer_size);
1413+ int commmand_buffer_offset = 0;
1414+
1415+ args_size = NULL;
1416+#ifdef ENABLE_GL_LOG
1417+ if (is_logging(pid))
1418+ write_gl_debug_cmd_short(_serialized_calls_func);
1419+#endif
1420+
1421+ while (commmand_buffer_offset < command_buffer_size) {
1422+ func_number =
1423+ *(short *) (command_buffer + commmand_buffer_offset);
1424+ if (!(func_number >= 0 && func_number < GL_N_CALLS)) {
1425+ fprintf(stderr,
1426+ "func_number >= 0 && func_number < GL_N_CALLS failed at "
1427+ "commmand_buffer_offset=%d (command_buffer_size=%d)\n",
1428+ commmand_buffer_offset, command_buffer_size);
1429+ return 0;
1430+ }
1431+ commmand_buffer_offset += sizeof(short);
1432+#ifdef ENABLE_GL_LOG
1433+ if (is_logging(pid))
1434+ write_gl_debug_cmd_short(func_number);
1435+#endif
1436+
1437+ signature = (Signature *) tab_opengl_calls[func_number];
1438+ ret_type = signature->ret_type;
1439+ assert(ret_type == TYPE_NONE);
1440+ nb_args = signature->nb_args;
1441+ args_type = signature->args_type;
1442+
1443+ for (i = 0; i < nb_args; i++) {
1444+ switch (args_type[i]) {
1445+ case TYPE_UNSIGNED_INT:
1446+ case TYPE_INT:
1447+ case TYPE_UNSIGNED_CHAR:
1448+ case TYPE_CHAR:
1449+ case TYPE_UNSIGNED_SHORT:
1450+ case TYPE_SHORT:
1451+ case TYPE_FLOAT:
1452+ {
1453+ args[i] =
1454+ *(int *) (command_buffer +
1455+ commmand_buffer_offset);
1456+#ifdef ENABLE_GL_LOG
1457+ if (is_logging(pid))
1458+ write_gl_debug_cmd_int(args[i]);
1459+#endif
1460+ commmand_buffer_offset += sizeof(int);
1461+ break;
1462+ }
1463+
1464+ case TYPE_NULL_TERMINATED_STRING:
1465+ CASE_IN_UNKNOWN_SIZE_POINTERS:
1466+ {
1467+ int arg_size =
1468+ *(int *) (command_buffer +
1469+ commmand_buffer_offset);
1470+ commmand_buffer_offset += sizeof(int);
1471+
1472+ if (arg_size == 0) {
1473+ args[i] = 0;
1474+ } else {
1475+ args[i] =
1476+ (long) (command_buffer +
1477+ commmand_buffer_offset);
1478+ }
1479+
1480+ if (args[i] == 0) {
1481+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
1482+ fprintf(stderr, "call %s arg %d pid=%d\n",
1483+ tab_opengl_calls_name[func_number], i,
1484+ pid);
1485+ disconnect_current();
1486+ return 0;
1487+ }
1488+ } else {
1489+ if (arg_size == 0) {
1490+ fprintf(stderr, "call %s arg %d pid=%d\n",
1491+ tab_opengl_calls_name[func_number], i,
1492+ pid);
1493+ fprintf(stderr, "args_size[i] == 0 !!\n");
1494+ disconnect_current();
1495+ return 0;
1496+ }
1497+ }
1498+#ifdef ENABLE_GL_LOG
1499+ if (is_logging(pid))
1500+ write_gl_debug_cmd_buffer_with_size(arg_size,
1501+ (void *)
1502+ args[i]);
1503+#endif
1504+ commmand_buffer_offset += arg_size;
1505+
1506+ break;
1507+ }
1508+
1509+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
1510+ {
1511+ int arg_size =
1512+ compute_arg_length(stderr, func_number, i, args);
1513+ args[i] =
1514+ (arg_size) ? (long) (command_buffer +
1515+ commmand_buffer_offset) : 0;
1516+#ifdef ENABLE_GL_LOG
1517+ if (is_logging(pid))
1518+ write_gl_debug_cmd_buffer_without_size(arg_size,
1519+ (void *)
1520+ args[i]);
1521+#endif
1522+ commmand_buffer_offset += arg_size;
1523+ break;
1524+ }
1525+
1526+ CASE_OUT_POINTERS:
1527+ {
1528+ fprintf(stderr,
1529+ "shouldn't happen TYPE_OUT_xxxx : call %s arg %d pid=%d\n",
1530+ tab_opengl_calls_name[func_number], i, pid);
1531+ disconnect_current();
1532+ return 0;
1533+ }
1534+
1535+ case TYPE_DOUBLE:
1536+ CASE_IN_KNOWN_SIZE_POINTERS:
1537+ args[i] =
1538+ (long) (command_buffer + commmand_buffer_offset);
1539+#ifdef ENABLE_GL_LOG
1540+ if (is_logging(pid))
1541+ write_gl_debug_cmd_buffer_without_size(
1542+ tab_args_type_length[args_type[i]],
1543+ (void *) args[i]);
1544+#endif
1545+ commmand_buffer_offset +=
1546+ tab_args_type_length[args_type[i]];
1547+ break;
1548+
1549+ case TYPE_IN_IGNORED_POINTER:
1550+ args[i] = 0;
1551+ break;
1552+
1553+ default:
1554+ fprintf(stderr,
1555+ "shouldn't happen : call %s arg %d pid=%d\n",
1556+ tab_opengl_calls_name[func_number], i, pid);
1557+ disconnect_current();
1558+ return 0;
1559+ }
1560+ }
1561+ do_function_call(func_number, args, ret_string);
1562+ }
1563+
1564+ ret = 0;
1565+ } else {
1566+#ifdef ENABLE_GL_LOG
1567+ if (is_logging(pid))
1568+ write_gl_debug_cmd_short(func_number);
1569+#endif
1570+
1571+ for (i = 0; i < nb_args; i++) {
1572+ switch (args_type[i]) {
1573+ case TYPE_UNSIGNED_INT:
1574+ case TYPE_INT:
1575+ case TYPE_UNSIGNED_CHAR:
1576+ case TYPE_CHAR:
1577+ case TYPE_UNSIGNED_SHORT:
1578+ case TYPE_SHORT:
1579+ case TYPE_FLOAT:
1580+#ifdef ENABLE_GL_LOG
1581+ if (is_logging(pid))
1582+ write_gl_debug_cmd_int(args[i]);
1583+#endif
1584+ break;
1585+
1586+ case TYPE_NULL_TERMINATED_STRING:
1587+ CASE_IN_UNKNOWN_SIZE_POINTERS:
1588+ if (args[i] == 0 && args_size[i] == 0) {
1589+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
1590+ fprintf(stderr, "call %s arg %d pid=%d\n",
1591+ tab_opengl_calls_name[func_number], i, pid);
1592+ disconnect_current();
1593+ return 0;
1594+ }
1595+ } else if (args[i] == 0 && args_size[i] != 0) {
1596+ fprintf(stderr, "call %s arg %d pid=%d\n",
1597+ tab_opengl_calls_name[func_number], i, pid);
1598+ fprintf(stderr, "args[i] == 0 && args_size[i] != 0 !!\n");
1599+ disconnect_current();
1600+ return 0;
1601+ } else if (args[i] != 0 && args_size[i] == 0) {
1602+ fprintf(stderr, "call %s arg %d pid=%d\n",
1603+ tab_opengl_calls_name[func_number], i, pid);
1604+ fprintf(stderr, "args[i] != 0 && args_size[i] == 0 !!\n");
1605+ disconnect_current();
1606+ return 0;
1607+ }
1608+ if (args[i]) {
1609+ args[i] =
1610+ (arg_t) get_host_read_pointer(env, args[i],
1611+ args_size[i]);
1612+ if (args[i] == 0) {
1613+ fprintf(stderr, "call %s arg %d pid=%d\n",
1614+ tab_opengl_calls_name[func_number], i, pid);
1615+ fprintf(stderr, "can not get %d bytes\n",
1616+ args_size[i]);
1617+ disconnect_current();
1618+ return 0;
1619+ }
1620+ }
1621+#ifdef ENABLE_GL_LOG
1622+ if (is_logging(pid))
1623+ write_gl_debug_cmd_buffer_with_size(args_size[i],
1624+ (void *) args[i]);
1625+#endif
1626+ break;
1627+
1628+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
1629+ {
1630+ args_size[i] =
1631+ compute_arg_length(stderr, func_number, i, args);
1632+ args[i] = (args_size[i]) ? (arg_t)
1633+ get_host_read_pointer(env,
1634+ args[i], args_size [i]) : 0;
1635+ if (args[i] == 0 && args_size[i] != 0) {
1636+ fprintf(stderr, "call %s arg %d pid=%d\n",
1637+ tab_opengl_calls_name[func_number], i, pid);
1638+ fprintf(stderr, "can not get %d bytes\n",
1639+ args_size[i]);
1640+ disconnect_current();
1641+ return 0;
1642+ }
1643+#ifdef ENABLE_GL_LOG
1644+ if (is_logging(pid))
1645+ write_gl_debug_cmd_buffer_without_size(args_size[i],
1646+ (void *) args[i]);
1647+#endif
1648+ break;
1649+ }
1650+
1651+ CASE_OUT_POINTERS:
1652+ {
1653+ int mem_state;
1654+
1655+#ifdef ENABLE_GL_LOG
1656+ if (is_logging(pid))
1657+ switch (args_type[i]) {
1658+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
1659+ write_gl_debug_cmd_int(args_size[i]);
1660+ break;
1661+
1662+ default:
1663+ break;
1664+ }
1665+#endif
1666+
1667+ if (func_number == glXQueryExtension_func && args[i] == 0) {
1668+ saved_out_ptr[i] = 0;
1669+ continue;
1670+ }
1671+ if (args[i] == 0 && args_size[i] == 0) {
1672+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
1673+ fprintf(stderr, "call %s arg %d pid=%d\n",
1674+ tab_opengl_calls_name[func_number], i,
1675+ pid);
1676+ disconnect_current();
1677+ return 0;
1678+ }
1679+ fprintf(stderr, "call %s arg %d pid=%d\n",
1680+ tab_opengl_calls_name[func_number], i, pid);
1681+ disconnect_current();
1682+ return 0;
1683+ } else if (args[i] == 0 && args_size[i] != 0) {
1684+ fprintf(stderr, "call %s arg %d pid=%d\n",
1685+ tab_opengl_calls_name[func_number], i, pid);
1686+ fprintf(stderr,
1687+ "args[i] == 0 && args_size[i] != 0 !!\n");
1688+ disconnect_current();
1689+ return 0;
1690+ } else if (args[i] != 0 && args_size[i] == 0) {
1691+ fprintf(stderr, "call %s arg %d pid=%d\n",
1692+ tab_opengl_calls_name[func_number], i, pid);
1693+ fprintf(stderr,
1694+ "args[i] != 0 && args_size[i] == 0 !!\n");
1695+ disconnect_current();
1696+ return 0;
1697+ }
1698+ if (args[i]) {
1699+ mem_state =
1700+ get_target_mem_state(env, args[i], args_size[i]);
1701+ if (mem_state == NOT_MAPPED) {
1702+ fprintf(stderr,
1703+ "call %s arg %d pid=%d addr="
1704+ TARGET_FMT_lx " size=%d NOT_MAPPED\n",
1705+ tab_opengl_calls_name[func_number], i,
1706+ pid, args[i], args_size[i]);
1707+ disconnect_current();
1708+ return 0;
1709+ } else if (mem_state == MAPPED_CONTIGUOUS) {
1710+ saved_out_ptr[i] = 0;
1711+ args[i] = (arg_t) get_phys_mem_addr(env, args[i]);
1712+ } else {
1713+ saved_out_ptr[i] = args[i];
1714+ args[i] = (arg_t) malloc(args_size[i]);
1715+ }
1716+ } else {
1717+ saved_out_ptr[i] = 0;
1718+ }
1719+ break;
1720+ }
1721+
1722+ case TYPE_DOUBLE:
1723+ CASE_IN_KNOWN_SIZE_POINTERS:
1724+ if (args[i] == 0) {
1725+ fprintf(stderr, "call %s arg %d pid=%d\n",
1726+ tab_opengl_calls_name[func_number], i, pid);
1727+ fprintf(stderr, "can not get %d bytes\n",
1728+ tab_args_type_length[args_type[i]]);
1729+ disconnect_current();
1730+ return 0;
1731+ }
1732+ args[i] = (arg_t) get_host_read_pointer(env,
1733+ args[i], tab_args_type_length[args_type[i]]);
1734+ if (args[i] == 0) {
1735+ fprintf(stderr, "call %s arg %d pid=%d\n",
1736+ tab_opengl_calls_name[func_number], i, pid);
1737+ fprintf(stderr, "can not get %d bytes\n",
1738+ tab_args_type_length[args_type[i]]);
1739+ disconnect_current();
1740+ return 0;
1741+ }
1742+#ifdef ENABLE_GL_LOG
1743+ if (is_logging(pid))
1744+ write_gl_debug_cmd_buffer_without_size
1745+ (tab_args_type_length[args_type[i]],
1746+ (void *) args[i]);
1747+#endif
1748+ break;
1749+
1750+ case TYPE_IN_IGNORED_POINTER:
1751+ args[i] = 0;
1752+ break;
1753+
1754+ default:
1755+ fprintf(stderr, "shouldn't happen : call %s arg %d pid=%d\n",
1756+ tab_opengl_calls_name[func_number], i, pid);
1757+ disconnect_current();
1758+ return 0;
1759+ }
1760+ }
1761+
1762+ if (ret_type == TYPE_CONST_CHAR) {
1763+ ret_string[0] = 0;
1764+ }
1765+
1766+ if (func_number == _init32_func || func_number == _init64_func) {
1767+ if (func_number == _init32_func) {
1768+ if (wordsize != 32) {
1769+ fprintf(stderr,
1770+ "clients with different ABIs not supported\n");
1771+ exit(-1);
1772+ }
1773+ } else {
1774+ if (wordsize != 64) {
1775+ fprintf(stderr,
1776+ "clients with different ABIs not supported\n");
1777+ exit(-1);
1778+ }
1779+ }
1780+
1781+ if (must_save && args[0])
1782+ fprintf(stderr, "error: pid %i is already recording\n",
1783+ logger_pid);
1784+ else if (args[0]) {
1785+ logger_pid = pid;
1786+ must_save = 1;
1787+ }
1788+#ifdef USE_KQEMU
1789+ if (env->kqemu_enabled)
1790+ *(int *) args[1] = 2;
1791+ else
1792+#endif
1793+ *(int *) args[1] = 1;
1794+ ret = 0;
1795+ } else {
1796+ ret = do_function_call(func_number, args, ret_string);
1797+ }
1798+#ifdef ENABLE_GL_LOG
1799+ if (is_logging(pid) && func_number == glXGetVisualFromFBConfig_func)
1800+ write_gl_debug_cmd_int(ret);
1801+#endif
1802+ for (i = 0; i < nb_args; i++) {
1803+ switch (args_type[i]) {
1804+ CASE_OUT_POINTERS:
1805+ {
1806+ if (saved_out_ptr[i]) {
1807+ if (memcpy_host_to_target(env, saved_out_ptr[i],
1808+ (void *) args[i],
1809+ args_size[i]) == 0) {
1810+ fprintf(stderr, "could not copy out parameters "
1811+ "back to user space\n");
1812+ disconnect_current();
1813+ return 0;
1814+ }
1815+ free((void *) args[i]);
1816+ }
1817+ break;
1818+ }
1819+
1820+ default:
1821+ break;
1822+ }
1823+ }
1824+
1825+ if (ret_type == TYPE_CONST_CHAR)
1826+ if (target_ret_string) {
1827+ /* the my_strlen stuff is a hack to workaround a GCC bug if
1828+ * using directly strlen... */
1829+ if (memcpy_host_to_target(env, target_ret_string, ret_string,
1830+ my_strlen(ret_string) + 1) == 0) {
1831+ fprintf(stderr, "cannot copy out parameters "
1832+ "back to user space\n");
1833+ disconnect_current();
1834+ return 0;
1835+ }
1836+ }
1837+ }
1838+
1839+#ifdef ENABLE_GL_LOG
1840+ if (is_logging(pid) && func_number == _exit_process_func) {
1841+ write_gl_debug_end();
1842+ }
1843+#endif
1844+
1845+ return ret;
1846+}
1847+
1848+static int decode_call(CPUState *env, int func_number, int pid,
1849+ target_ulong target_ret_string, target_ulong in_args,
1850+ target_ulong in_args_size)
1851+{
1852+ if (!(func_number >= 0 && func_number < GL_N_CALLS)) {
1853+ fprintf(stderr,
1854+ "func_number >= 0 && func_number < GL_N_CALLS failed\n");
1855+ return 0;
1856+ }
1857+
1858+ return decode_call_int(env, func_number, pid,
1859+ target_ret_string, in_args, in_args_size);
1860+}
1861+
1862+#define env first_cpu
1863+
1864+void helper_opengl(void)
1865+{
1866+ doing_opengl = 1;
1867+ env->regs[R_EAX] =
1868+ decode_call(env, env->regs[R_EAX], env->regs[R_EBX], env->regs[R_ECX],
1869+ env->regs[R_EDX], env->regs[R_ESI]);
1870+ doing_opengl = 0;
1871+}
1872+
1873+void mem_opengl(uint64_t ptr)
1874+{
1875+ uint64_t *params = get_phys_mem_addr(env, ptr);
1876+ int ret;
1877+
1878+ /* Execute */
1879+ doing_opengl = 1;
1880+ ret = decode_call(env, le64_to_cpu(params[0]),
1881+ le64_to_cpu(params[1]), le64_to_cpu(params[2]),
1882+ le64_to_cpu(params[3]), le64_to_cpu(params[4]));
1883+ doing_opengl = 0;
1884+
1885+ params[0] = cpu_to_le64(ret);
1886+ params[5] = 0;
1887+}
1888+
1889+#define THREADINFO_TASK_OFFSET 0x0 //// 0x0
1890+#define THREADSTRUCT_IOPL_OFFSET 0x78 //// 0x80
1891+#define TASKSTRUCT_NEXT_OFFSET 0x1a0 //// 0x1e8
1892+#define TASKSTRUCT_PREV_OFFSET 0x1a4 //// 0x1ec
1893+#define TASKSTRUCT_RCRED_OFFSET 0x29c //// 0x2b4
1894+#define TASKSTRUCT_CRED_OFFSET 0x2a0 //// 0x2b8
1895+#define TASKSTRUCT_COMM_OFFSET 0x2c0 //// 0x2fc
1896+#define TASKSTRUCT_THREAD_OFFSET 0x2e4 //// 0x318
1897+#define TASKSTRUCT_IO_CTX_OFFSET 0x40c //// 0x428
1898+#define CRED_CAPINH_OFFSET 0x28
1899+#define CRED_CAPPER_OFFSET 0x30
1900+#define CRED_CAPEFF_OFFSET 0x38
1901+#define CRED_CAPBST_OFFSET 0x40
1902+/* How to obtain the numbers:
1903+ * $ gbd vmlinux
1904+ * ...
1905+ * (gdb) print &((struct task_struct *) 0)->real_cred
1906+ * $22 = (const struct cred **) 0x29c
1907+ * (gdb) print &((struct task_struct *) 0)->cred
1908+ * $23 = (const struct cred **) 0x2a0
1909+ * (gbd) ...
1910+ * ...
1911+ * (gdb) ^D
1912+ * $ vim target-i386/helper_opengl.c
1913+ * ...
1914+ * :wq
1915+ * $ make
1916+ * ...
1917+ *
1918+ * Testing:
1919+ * $ x86_64-softmmu/qemu-system-x86_64 -s -hda ...
1920+ * ^Z
1921+ * [1]+ Stopped x86_64-softmmu/qemu-system-x86_64 -s -hda ...
1922+ * $ bg
1923+ * [1]+ x86_64-softmmu/qemu-system-x86_64 -s -hda ...
1924+ * $ gdb
1925+ * ...
1926+ * (gdb) target remote localhost:1234
1927+ * ...
1928+ * (gdb) print ((char *) *(unsigned int *) ((unsigned int) $rsp & ~8191)) +
1929+ * 0x2c0
1930+ * $9 = 0xc094062c "swapper"
1931+ * (gdb) print (char *) (*(unsigned int *) (((char *) *(unsigned int *)
1932+ * ((unsigned int) $rsp & ~8191)) + 0x1a0) - 0x1a0) + 0x2c0
1933+ * $10 = 0xdf87cee0 "init"
1934+ * ...
1935+ */
1936+
1937+#define CAP_SYS_RAWIO 17
1938+
1939+#define THREAD_SIZE (TARGET_PAGE_SIZE << 1)
1940+static ram_addr_t x86_current_thread(void)
1941+{
1942+ return env->regs[R_ESP] & ~(THREAD_SIZE - 1);
1943+}
1944+
1945+static ram_addr_t x86_current_task(void)
1946+{
1947+ return *(uint32_t *) get_phys_mem_addr(env,
1948+ x86_current_thread() + THREADINFO_TASK_OFFSET);
1949+}
1950+
1951+static ram_addr_t x86_current_io_ctx(void)
1952+{
1953+ return *(uint32_t *) get_phys_mem_addr(env,
1954+ x86_current_task() + TASKSTRUCT_IO_CTX_OFFSET);
1955+}
1956+
1957+static ram_addr_t x86_task_name(ram_addr_t proc)
1958+{
1959+ return x86_current_task() + TASKSTRUCT_COMM_OFFSET;
1960+}
1961+
1962+static ram_addr_t x86_task_next(ram_addr_t proc)
1963+{
1964+ return *(uint32_t *) get_phys_mem_addr(env,
1965+ x86_current_task() + TASKSTRUCT_NEXT_OFFSET) -
1966+ TASKSTRUCT_NEXT_OFFSET;
1967+}
1968+
1969+static void x86_cap_set(ram_addr_t caps, int cap)
1970+{
1971+ int offset = cap >> 5;
1972+ int mask = 1 << (cap & 31);
1973+
1974+ *(uint32_t *) get_phys_mem_addr(env, caps + offset) |= mask;
1975+}
1976+
1977+static void x86_cred_cap_set(ram_addr_t creds, int cap)
1978+{
1979+ x86_cap_set(creds + CRED_CAPINH_OFFSET, cap);
1980+ x86_cap_set(creds + CRED_CAPPER_OFFSET, cap);
1981+ x86_cap_set(creds + CRED_CAPEFF_OFFSET, cap);
1982+ x86_cap_set(creds + CRED_CAPBST_OFFSET, cap);
1983+}
1984+
1985+static void x86_task_cap_set(ram_addr_t proc, int cap)
1986+{
1987+ x86_cred_cap_set(*(uint32_t *) get_phys_mem_addr(env,
1988+ proc + TASKSTRUCT_RCRED_OFFSET), cap);
1989+ x86_cred_cap_set(*(uint32_t *) get_phys_mem_addr(env,
1990+ proc + TASKSTRUCT_CRED_OFFSET), cap);
1991+}
1992+
1993+#include "kvm.h"
1994+
1995+/* The putting and getting of the register set seems to incure a too
1996+ * high overhead. It's at least 4 ioctl's each. */
1997+#if 0
1998+static void opengl_ioport_write(void *data, uint32_t addr, uint32_t val)
1999+{
2000+ /* Ignore the first outb after iopl which is emulated by the kernel. */
2001+ if (val == (uint8_t) -1)
2002+ return;
2003+
2004+ if (kvm_enabled())
2005+ kvm_arch_get_registers(env);
2006+ doing_opengl = 1;
2007+ env->regs[R_EAX] =
2008+ decode_call(env, env->regs[R_EAX], env->regs[R_EBX], env->regs[R_ECX],
2009+ env->regs[R_ESI], env->regs[R_EDI]);
2010+ doing_opengl = 0;
2011+ if (kvm_enabled())
2012+ kvm_arch_put_registers(env);
2013+}
2014+#else
2015+static void get_regs(void)
2016+{
2017+ /* We only really need the eflags and cr[0..4] */
2018+ if (kvm_enabled())
2019+ kvm_get_sregs(env);
2020+}
2021+
2022+static void opengl_ioport_write(void *data, uint32_t addr, uint32_t val)
2023+{
2024+ uint64_t *params;
2025+ int ret;
2026+
2027+ /* Only need to fetch the registers after a guest's context switch...
2028+ * the problem is, to find out about context switches we already need
2029+ * to fetch rsp
2030+ * TODO: pass the pid in val. the params pointer doesn't need to be
2031+ * passed on all calls because it can be a global and be constant.
2032+ */
2033+ get_regs();
2034+
2035+ params = get_phys_mem_addr(env, (target_ulong) val);
2036+
2037+ /* Execute */
2038+ doing_opengl = 1;
2039+ ret = decode_call(env, le64_to_cpu(params[0]),
2040+ le64_to_cpu(params[1]), le64_to_cpu(params[2]),
2041+ le64_to_cpu(params[3]), le64_to_cpu(params[4]));
2042+ doing_opengl = 0;
2043+
2044+ params[0] = cpu_to_le64(ret);
2045+ params[5] = 0;
2046+}
2047+#endif
2048+
2049+static void opengl_ioport_write_first(void *data, uint32_t addr, uint32_t val)
2050+{
2051+ if (val != (uint32_t) -1)
2052+ return;
2053+
2054+ /* Ignore the first outb after iopl which is emulated by the kernel. */
2055+
2056+ register_ioport_write(9996, 4, 4, opengl_ioport_write, (void *) 1);
2057+}
2058+
2059+void io_register(void)
2060+{
2061+ register_ioport_write(9996, 4, 4, opengl_ioport_write_first, (void *) 1);
2062+}
2063+
2064+void opengl_process_enable(void)
2065+{
2066+ ram_addr_t task;
2067+ char *name;
2068+ int newlevel = 3;
2069+ uint32_t iopl = newlevel << 12;
2070+ void *ioplptr;
2071+
2072+ if (kvm_enabled())
2073+ kvm_arch_get_registers(env);
2074+ allow_kernel = 1;
2075+
2076+ task = x86_current_task();
2077+ x86_task_cap_set(task, CAP_SYS_RAWIO);
2078+ name = get_phys_mem_addr(env, x86_task_name(task));
2079+
2080+ ioplptr = get_phys_mem_addr(env, task +
2081+ TASKSTRUCT_THREAD_OFFSET + THREADSTRUCT_IOPL_OFFSET);
2082+ ((uint32_t *) ioplptr)[0] = cpu_to_le32(iopl);
2083+
2084+ env->eflags &= ~0x3000;
2085+ env->eflags |= newlevel << 12;
2086+
2087+ allow_kernel = 0;
2088+ if (kvm_enabled())
2089+ kvm_arch_put_registers(env, KVM_PUT_RUNTIME_STATE);
2090+
2091+ printf("Granted OpenGL access to process '%s'\n", name);
2092+
2093+ io_register();
2094+}
2095+#endif
2096Index: qemu-0.14.0/target-i386/kvm.c
2097===================================================================
2098--- qemu-0.14.0.orig/target-i386/kvm.c
2099+++ qemu-0.14.0/target-i386/kvm.c
2100@@ -957,7 +957,7 @@ static int kvm_get_xcrs(CPUState *env)
2101 #endif
2102 }
2103
2104-static int kvm_get_sregs(CPUState *env)
2105+int kvm_get_sregs(CPUState *env)
2106 {
2107 struct kvm_sregs sregs;
2108 uint32_t hflags;
2109Index: qemu-0.14.0/target-i386/mesa_enums.c
2110===================================================================
2111--- /dev/null
2112+++ qemu-0.14.0/target-i386/mesa_enums.c
2113@@ -0,0 +1,4890 @@
2114+/* DO NOT EDIT - This file generated automatically by gl_enums.py (from Mesa) script */
2115+
2116+/*
2117+ * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
2118+ * All Rights Reserved.
2119+ *
2120+ * Permission is hereby granted, free of charge, to any person obtaining a
2121+ * copy of this software and associated documentation files (the "Software"),
2122+ * to deal in the Software without restriction, including without limitation
2123+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
2124+ * and/or sell copies of the Software, and to permit persons to whom the
2125+ * Software is furnished to do so, subject to the following conditions:
2126+ *
2127+ * The above copyright notice and this permission notice (including the next
2128+ * paragraph) shall be included in all copies or substantial portions of the
2129+ * Software.
2130+ *
2131+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2132+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2133+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
2134+ * BRIAN PAUL,
2135+ * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
2136+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
2137+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2138+ * SOFTWARE.
2139+ */
2140+
2141+#include "glheader.h"
2142+#include "enums.h"
2143+#include "imports.h"
2144+
2145+typedef struct {
2146+ size_t offset;
2147+ int n;
2148+} enum_elt;
2149+
2150+LONGSTRING static const char enum_string_table[] =
2151+ "GL_2D\0"
2152+ "GL_2_BYTES\0"
2153+ "GL_3D\0"
2154+ "GL_3D_COLOR\0"
2155+ "GL_3D_COLOR_TEXTURE\0"
2156+ "GL_3_BYTES\0"
2157+ "GL_4D_COLOR_TEXTURE\0"
2158+ "GL_4_BYTES\0"
2159+ "GL_ACCUM\0"
2160+ "GL_ACCUM_ALPHA_BITS\0"
2161+ "GL_ACCUM_BLUE_BITS\0"
2162+ "GL_ACCUM_BUFFER_BIT\0"
2163+ "GL_ACCUM_CLEAR_VALUE\0"
2164+ "GL_ACCUM_GREEN_BITS\0"
2165+ "GL_ACCUM_RED_BITS\0"
2166+ "GL_ACTIVE_ATTRIBUTES\0"
2167+ "GL_ACTIVE_ATTRIBUTE_MAX_LENGTH\0"
2168+ "GL_ACTIVE_STENCIL_FACE_EXT\0"
2169+ "GL_ACTIVE_TEXTURE\0"
2170+ "GL_ACTIVE_TEXTURE_ARB\0"
2171+ "GL_ACTIVE_UNIFORMS\0"
2172+ "GL_ACTIVE_UNIFORM_MAX_LENGTH\0"
2173+ "GL_ACTIVE_VERTEX_UNITS_ARB\0"
2174+ "GL_ADD\0"
2175+ "GL_ADD_SIGNED\0"
2176+ "GL_ADD_SIGNED_ARB\0"
2177+ "GL_ADD_SIGNED_EXT\0"
2178+ "GL_ALIASED_LINE_WIDTH_RANGE\0"
2179+ "GL_ALIASED_POINT_SIZE_RANGE\0"
2180+ "GL_ALL_ATTRIB_BITS\0"
2181+ "GL_ALL_CLIENT_ATTRIB_BITS\0"
2182+ "GL_ALPHA\0"
2183+ "GL_ALPHA12\0"
2184+ "GL_ALPHA12_EXT\0"
2185+ "GL_ALPHA16\0"
2186+ "GL_ALPHA16_EXT\0"
2187+ "GL_ALPHA4\0"
2188+ "GL_ALPHA4_EXT\0"
2189+ "GL_ALPHA8\0"
2190+ "GL_ALPHA8_EXT\0"
2191+ "GL_ALPHA_BIAS\0"
2192+ "GL_ALPHA_BITS\0"
2193+ "GL_ALPHA_SCALE\0"
2194+ "GL_ALPHA_TEST\0"
2195+ "GL_ALPHA_TEST_FUNC\0"
2196+ "GL_ALPHA_TEST_REF\0"
2197+ "GL_ALWAYS\0"
2198+ "GL_AMBIENT\0"
2199+ "GL_AMBIENT_AND_DIFFUSE\0"
2200+ "GL_AND\0"
2201+ "GL_AND_INVERTED\0"
2202+ "GL_AND_REVERSE\0"
2203+ "GL_ARRAY_BUFFER\0"
2204+ "GL_ARRAY_BUFFER_ARB\0"
2205+ "GL_ARRAY_BUFFER_BINDING\0"
2206+ "GL_ARRAY_BUFFER_BINDING_ARB\0"
2207+ "GL_ATTACHED_SHADERS\0"
2208+ "GL_ATTRIB_ARRAY_POINTER_NV\0"
2209+ "GL_ATTRIB_ARRAY_SIZE_NV\0"
2210+ "GL_ATTRIB_ARRAY_STRIDE_NV\0"
2211+ "GL_ATTRIB_ARRAY_TYPE_NV\0"
2212+ "GL_ATTRIB_STACK_DEPTH\0"
2213+ "GL_AUTO_NORMAL\0"
2214+ "GL_AUX0\0"
2215+ "GL_AUX1\0"
2216+ "GL_AUX2\0"
2217+ "GL_AUX3\0"
2218+ "GL_AUX_BUFFERS\0"
2219+ "GL_BACK\0"
2220+ "GL_BACK_LEFT\0"
2221+ "GL_BACK_RIGHT\0"
2222+ "GL_BGR\0"
2223+ "GL_BGRA\0"
2224+ "GL_BITMAP\0"
2225+ "GL_BITMAP_TOKEN\0"
2226+ "GL_BLEND\0"
2227+ "GL_BLEND_COLOR\0"
2228+ "GL_BLEND_COLOR_EXT\0"
2229+ "GL_BLEND_DST\0"
2230+ "GL_BLEND_DST_ALPHA\0"
2231+ "GL_BLEND_DST_RGB\0"
2232+ "GL_BLEND_EQUATION\0"
2233+ "GL_BLEND_EQUATION_ALPHA\0"
2234+ "GL_BLEND_EQUATION_ALPHA_EXT\0"
2235+ "GL_BLEND_EQUATION_EXT\0"
2236+ "GL_BLEND_EQUATION_RGB_EXT\0"
2237+ "GL_BLEND_SRC\0"
2238+ "GL_BLEND_SRC_ALPHA\0"
2239+ "GL_BLEND_SRC_RGB\0"
2240+ "GL_BLUE\0"
2241+ "GL_BLUE_BIAS\0"
2242+ "GL_BLUE_BITS\0"
2243+ "GL_BLUE_SCALE\0"
2244+ "GL_BOOL\0"
2245+ "GL_BOOL_ARB\0"
2246+ "GL_BOOL_VEC2\0"
2247+ "GL_BOOL_VEC2_ARB\0"
2248+ "GL_BOOL_VEC3\0"
2249+ "GL_BOOL_VEC3_ARB\0"
2250+ "GL_BOOL_VEC4\0"
2251+ "GL_BOOL_VEC4_ARB\0"
2252+ "GL_BUFFER_ACCESS\0"
2253+ "GL_BUFFER_ACCESS_ARB\0"
2254+ "GL_BUFFER_MAPPED\0"
2255+ "GL_BUFFER_MAPPED_ARB\0"
2256+ "GL_BUFFER_MAP_POINTER\0"
2257+ "GL_BUFFER_MAP_POINTER_ARB\0"
2258+ "GL_BUFFER_SIZE\0"
2259+ "GL_BUFFER_SIZE_ARB\0"
2260+ "GL_BUFFER_USAGE\0"
2261+ "GL_BUFFER_USAGE_ARB\0"
2262+ "GL_BYTE\0"
2263+ "GL_C3F_V3F\0"
2264+ "GL_C4F_N3F_V3F\0"
2265+ "GL_C4UB_V2F\0"
2266+ "GL_C4UB_V3F\0"
2267+ "GL_CCW\0"
2268+ "GL_CLAMP\0"
2269+ "GL_CLAMP_TO_BORDER\0"
2270+ "GL_CLAMP_TO_BORDER_ARB\0"
2271+ "GL_CLAMP_TO_BORDER_SGIS\0"
2272+ "GL_CLAMP_TO_EDGE\0"
2273+ "GL_CLAMP_TO_EDGE_SGIS\0"
2274+ "GL_CLEAR\0"
2275+ "GL_CLIENT_ACTIVE_TEXTURE\0"
2276+ "GL_CLIENT_ACTIVE_TEXTURE_ARB\0"
2277+ "GL_CLIENT_ALL_ATTRIB_BITS\0"
2278+ "GL_CLIENT_ATTRIB_STACK_DEPTH\0"
2279+ "GL_CLIENT_PIXEL_STORE_BIT\0"
2280+ "GL_CLIENT_VERTEX_ARRAY_BIT\0"
2281+ "GL_CLIP_PLANE0\0"
2282+ "GL_CLIP_PLANE1\0"
2283+ "GL_CLIP_PLANE2\0"
2284+ "GL_CLIP_PLANE3\0"
2285+ "GL_CLIP_PLANE4\0"
2286+ "GL_CLIP_PLANE5\0"
2287+ "GL_CLIP_VOLUME_CLIPPING_HINT_EXT\0"
2288+ "GL_COEFF\0"
2289+ "GL_COLOR\0"
2290+ "GL_COLOR_ARRAY\0"
2291+ "GL_COLOR_ARRAY_BUFFER_BINDING\0"
2292+ "GL_COLOR_ARRAY_BUFFER_BINDING_ARB\0"
2293+ "GL_COLOR_ARRAY_POINTER\0"
2294+ "GL_COLOR_ARRAY_SIZE\0"
2295+ "GL_COLOR_ARRAY_STRIDE\0"
2296+ "GL_COLOR_ARRAY_TYPE\0"
2297+ "GL_COLOR_ATTACHMENT0_EXT\0"
2298+ "GL_COLOR_ATTACHMENT10_EXT\0"
2299+ "GL_COLOR_ATTACHMENT11_EXT\0"
2300+ "GL_COLOR_ATTACHMENT12_EXT\0"
2301+ "GL_COLOR_ATTACHMENT13_EXT\0"
2302+ "GL_COLOR_ATTACHMENT14_EXT\0"
2303+ "GL_COLOR_ATTACHMENT15_EXT\0"
2304+ "GL_COLOR_ATTACHMENT1_EXT\0"
2305+ "GL_COLOR_ATTACHMENT2_EXT\0"
2306+ "GL_COLOR_ATTACHMENT3_EXT\0"
2307+ "GL_COLOR_ATTACHMENT4_EXT\0"
2308+ "GL_COLOR_ATTACHMENT5_EXT\0"
2309+ "GL_COLOR_ATTACHMENT6_EXT\0"
2310+ "GL_COLOR_ATTACHMENT7_EXT\0"
2311+ "GL_COLOR_ATTACHMENT8_EXT\0"
2312+ "GL_COLOR_ATTACHMENT9_EXT\0"
2313+ "GL_COLOR_BUFFER_BIT\0"
2314+ "GL_COLOR_CLEAR_VALUE\0"
2315+ "GL_COLOR_INDEX\0"
2316+ "GL_COLOR_INDEXES\0"
2317+ "GL_COLOR_LOGIC_OP\0"
2318+ "GL_COLOR_MATERIAL\0"
2319+ "GL_COLOR_MATERIAL_FACE\0"
2320+ "GL_COLOR_MATERIAL_PARAMETER\0"
2321+ "GL_COLOR_MATRIX\0"
2322+ "GL_COLOR_MATRIX_SGI\0"
2323+ "GL_COLOR_MATRIX_STACK_DEPTH\0"
2324+ "GL_COLOR_MATRIX_STACK_DEPTH_SGI\0"
2325+ "GL_COLOR_SUM\0"
2326+ "GL_COLOR_SUM_ARB\0"
2327+ "GL_COLOR_TABLE\0"
2328+ "GL_COLOR_TABLE_ALPHA_SIZE\0"
2329+ "GL_COLOR_TABLE_ALPHA_SIZE_EXT\0"
2330+ "GL_COLOR_TABLE_ALPHA_SIZE_SGI\0"
2331+ "GL_COLOR_TABLE_BIAS\0"
2332+ "GL_COLOR_TABLE_BIAS_SGI\0"
2333+ "GL_COLOR_TABLE_BLUE_SIZE\0"
2334+ "GL_COLOR_TABLE_BLUE_SIZE_EXT\0"
2335+ "GL_COLOR_TABLE_BLUE_SIZE_SGI\0"
2336+ "GL_COLOR_TABLE_FORMAT\0"
2337+ "GL_COLOR_TABLE_FORMAT_EXT\0"
2338+ "GL_COLOR_TABLE_FORMAT_SGI\0"
2339+ "GL_COLOR_TABLE_GREEN_SIZE\0"
2340+ "GL_COLOR_TABLE_GREEN_SIZE_EXT\0"
2341+ "GL_COLOR_TABLE_GREEN_SIZE_SGI\0"
2342+ "GL_COLOR_TABLE_INTENSITY_SIZE\0"
2343+ "GL_COLOR_TABLE_INTENSITY_SIZE_EXT\0"
2344+ "GL_COLOR_TABLE_INTENSITY_SIZE_SGI\0"
2345+ "GL_COLOR_TABLE_LUMINANCE_SIZE\0"
2346+ "GL_COLOR_TABLE_LUMINANCE_SIZE_EXT\0"
2347+ "GL_COLOR_TABLE_LUMINANCE_SIZE_SGI\0"
2348+ "GL_COLOR_TABLE_RED_SIZE\0"
2349+ "GL_COLOR_TABLE_RED_SIZE_EXT\0"
2350+ "GL_COLOR_TABLE_RED_SIZE_SGI\0"
2351+ "GL_COLOR_TABLE_SCALE\0"
2352+ "GL_COLOR_TABLE_SCALE_SGI\0"
2353+ "GL_COLOR_TABLE_WIDTH\0"
2354+ "GL_COLOR_TABLE_WIDTH_EXT\0"
2355+ "GL_COLOR_TABLE_WIDTH_SGI\0"
2356+ "GL_COLOR_WRITEMASK\0"
2357+ "GL_COMBINE\0"
2358+ "GL_COMBINE4\0"
2359+ "GL_COMBINE_ALPHA\0"
2360+ "GL_COMBINE_ALPHA_ARB\0"
2361+ "GL_COMBINE_ALPHA_EXT\0"
2362+ "GL_COMBINE_ARB\0"
2363+ "GL_COMBINE_EXT\0"
2364+ "GL_COMBINE_RGB\0"
2365+ "GL_COMBINE_RGB_ARB\0"
2366+ "GL_COMBINE_RGB_EXT\0"
2367+ "GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT\0"
2368+ "GL_COMPARE_R_TO_TEXTURE\0"
2369+ "GL_COMPARE_R_TO_TEXTURE_ARB\0"
2370+ "GL_COMPILE\0"
2371+ "GL_COMPILE_AND_EXECUTE\0"
2372+ "GL_COMPILE_STATUS\0"
2373+ "GL_COMPRESSED_ALPHA\0"
2374+ "GL_COMPRESSED_ALPHA_ARB\0"
2375+ "GL_COMPRESSED_INTENSITY\0"
2376+ "GL_COMPRESSED_INTENSITY_ARB\0"
2377+ "GL_COMPRESSED_LUMINANCE\0"
2378+ "GL_COMPRESSED_LUMINANCE_ALPHA\0"
2379+ "GL_COMPRESSED_LUMINANCE_ALPHA_ARB\0"
2380+ "GL_COMPRESSED_LUMINANCE_ARB\0"
2381+ "GL_COMPRESSED_RGB\0"
2382+ "GL_COMPRESSED_RGBA\0"
2383+ "GL_COMPRESSED_RGBA_ARB\0"
2384+ "GL_COMPRESSED_RGBA_FXT1_3DFX\0"
2385+ "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT\0"
2386+ "GL_COMPRESSED_RGBA_S3TC_DXT3_EXT\0"
2387+ "GL_COMPRESSED_RGBA_S3TC_DXT5_EXT\0"
2388+ "GL_COMPRESSED_RGB_ARB\0"
2389+ "GL_COMPRESSED_RGB_FXT1_3DFX\0"
2390+ "GL_COMPRESSED_RGB_S3TC_DXT1_EXT\0"
2391+ "GL_COMPRESSED_TEXTURE_FORMATS\0"
2392+ "GL_CONSTANT\0"
2393+ "GL_CONSTANT_ALPHA\0"
2394+ "GL_CONSTANT_ALPHA_EXT\0"
2395+ "GL_CONSTANT_ARB\0"
2396+ "GL_CONSTANT_ATTENUATION\0"
2397+ "GL_CONSTANT_BORDER_HP\0"
2398+ "GL_CONSTANT_COLOR\0"
2399+ "GL_CONSTANT_COLOR_EXT\0"
2400+ "GL_CONSTANT_EXT\0"
2401+ "GL_CONVOLUTION_1D\0"
2402+ "GL_CONVOLUTION_2D\0"
2403+ "GL_CONVOLUTION_BORDER_COLOR\0"
2404+ "GL_CONVOLUTION_BORDER_COLOR_HP\0"
2405+ "GL_CONVOLUTION_BORDER_MODE\0"
2406+ "GL_CONVOLUTION_BORDER_MODE_EXT\0"
2407+ "GL_CONVOLUTION_FILTER_BIAS\0"
2408+ "GL_CONVOLUTION_FILTER_BIAS_EXT\0"
2409+ "GL_CONVOLUTION_FILTER_SCALE\0"
2410+ "GL_CONVOLUTION_FILTER_SCALE_EXT\0"
2411+ "GL_CONVOLUTION_FORMAT\0"
2412+ "GL_CONVOLUTION_FORMAT_EXT\0"
2413+ "GL_CONVOLUTION_HEIGHT\0"
2414+ "GL_CONVOLUTION_HEIGHT_EXT\0"
2415+ "GL_CONVOLUTION_WIDTH\0"
2416+ "GL_CONVOLUTION_WIDTH_EXT\0"
2417+ "GL_COORD_REPLACE\0"
2418+ "GL_COORD_REPLACE_ARB\0"
2419+ "GL_COORD_REPLACE_NV\0"
2420+ "GL_COPY\0"
2421+ "GL_COPY_INVERTED\0"
2422+ "GL_COPY_PIXEL_TOKEN\0"
2423+ "GL_CULL_FACE\0"
2424+ "GL_CULL_FACE_MODE\0"
2425+ "GL_CULL_VERTEX_EXT\0"
2426+ "GL_CULL_VERTEX_EYE_POSITION_EXT\0"
2427+ "GL_CULL_VERTEX_OBJECT_POSITION_EXT\0"
2428+ "GL_CURRENT_ATTRIB_NV\0"
2429+ "GL_CURRENT_BIT\0"
2430+ "GL_CURRENT_COLOR\0"
2431+ "GL_CURRENT_FOG_COORD\0"
2432+ "GL_CURRENT_FOG_COORDINATE\0"
2433+ "GL_CURRENT_INDEX\0"
2434+ "GL_CURRENT_MATRIX_ARB\0"
2435+ "GL_CURRENT_MATRIX_INDEX_ARB\0"
2436+ "GL_CURRENT_MATRIX_NV\0"
2437+ "GL_CURRENT_MATRIX_STACK_DEPTH_ARB\0"
2438+ "GL_CURRENT_MATRIX_STACK_DEPTH_NV\0"
2439+ "GL_CURRENT_NORMAL\0"
2440+ "GL_CURRENT_PALETTE_MATRIX_ARB\0"
2441+ "GL_CURRENT_PROGRAM\0"
2442+ "GL_CURRENT_QUERY\0"
2443+ "GL_CURRENT_QUERY_ARB\0"
2444+ "GL_CURRENT_RASTER_COLOR\0"
2445+ "GL_CURRENT_RASTER_DISTANCE\0"
2446+ "GL_CURRENT_RASTER_INDEX\0"
2447+ "GL_CURRENT_RASTER_POSITION\0"
2448+ "GL_CURRENT_RASTER_POSITION_VALID\0"
2449+ "GL_CURRENT_RASTER_TEXTURE_COORDS\0"
2450+ "GL_CURRENT_SECONDARY_COLOR\0"
2451+ "GL_CURRENT_TEXTURE_COORDS\0"
2452+ "GL_CURRENT_VERTEX_ATTRIB\0"
2453+ "GL_CURRENT_VERTEX_ATTRIB_ARB\0"
2454+ "GL_CURRENT_WEIGHT_ARB\0"
2455+ "GL_CW\0"
2456+ "GL_DEBUG_ASSERT_MESA\0"
2457+ "GL_DEBUG_OBJECT_MESA\0"
2458+ "GL_DEBUG_PRINT_MESA\0"
2459+ "GL_DECAL\0"
2460+ "GL_DECR\0"
2461+ "GL_DECR_WRAP\0"
2462+ "GL_DECR_WRAP_EXT\0"
2463+ "GL_DELETE_STATUS\0"
2464+ "GL_DEPTH\0"
2465+ "GL_DEPTH_ATTACHMENT_EXT\0"
2466+ "GL_DEPTH_BIAS\0"
2467+ "GL_DEPTH_BITS\0"
2468+ "GL_DEPTH_BOUNDS_EXT\0"
2469+ "GL_DEPTH_BOUNDS_TEST_EXT\0"
2470+ "GL_DEPTH_BUFFER_BIT\0"
2471+ "GL_DEPTH_CLAMP_NV\0"
2472+ "GL_DEPTH_CLEAR_VALUE\0"
2473+ "GL_DEPTH_COMPONENT\0"
2474+ "GL_DEPTH_COMPONENT16\0"
2475+ "GL_DEPTH_COMPONENT16_ARB\0"
2476+ "GL_DEPTH_COMPONENT16_SGIX\0"
2477+ "GL_DEPTH_COMPONENT24\0"
2478+ "GL_DEPTH_COMPONENT24_ARB\0"
2479+ "GL_DEPTH_COMPONENT24_SGIX\0"
2480+ "GL_DEPTH_COMPONENT32\0"
2481+ "GL_DEPTH_COMPONENT32_ARB\0"
2482+ "GL_DEPTH_COMPONENT32_SGIX\0"
2483+ "GL_DEPTH_FUNC\0"
2484+ "GL_DEPTH_RANGE\0"
2485+ "GL_DEPTH_SCALE\0"
2486+ "GL_DEPTH_STENCIL_NV\0"
2487+ "GL_DEPTH_STENCIL_TO_BGRA_NV\0"
2488+ "GL_DEPTH_STENCIL_TO_RGBA_NV\0"
2489+ "GL_DEPTH_TEST\0"
2490+ "GL_DEPTH_TEXTURE_MODE\0"
2491+ "GL_DEPTH_TEXTURE_MODE_ARB\0"
2492+ "GL_DEPTH_WRITEMASK\0"
2493+ "GL_DIFFUSE\0"
2494+ "GL_DITHER\0"
2495+ "GL_DOMAIN\0"
2496+ "GL_DONT_CARE\0"
2497+ "GL_DOT3_RGB\0"
2498+ "GL_DOT3_RGBA\0"
2499+ "GL_DOT3_RGBA_ARB\0"
2500+ "GL_DOT3_RGBA_EXT\0"
2501+ "GL_DOT3_RGB_ARB\0"
2502+ "GL_DOT3_RGB_EXT\0"
2503+ "GL_DOUBLE\0"
2504+ "GL_DOUBLEBUFFER\0"
2505+ "GL_DRAW_BUFFER\0"
2506+ "GL_DRAW_BUFFER0\0"
2507+ "GL_DRAW_BUFFER0_ARB\0"
2508+ "GL_DRAW_BUFFER0_ATI\0"
2509+ "GL_DRAW_BUFFER1\0"
2510+ "GL_DRAW_BUFFER10\0"
2511+ "GL_DRAW_BUFFER10_ARB\0"
2512+ "GL_DRAW_BUFFER10_ATI\0"
2513+ "GL_DRAW_BUFFER11\0"
2514+ "GL_DRAW_BUFFER11_ARB\0"
2515+ "GL_DRAW_BUFFER11_ATI\0"
2516+ "GL_DRAW_BUFFER12\0"
2517+ "GL_DRAW_BUFFER12_ARB\0"
2518+ "GL_DRAW_BUFFER12_ATI\0"
2519+ "GL_DRAW_BUFFER13\0"
2520+ "GL_DRAW_BUFFER13_ARB\0"
2521+ "GL_DRAW_BUFFER13_ATI\0"
2522+ "GL_DRAW_BUFFER14\0"
2523+ "GL_DRAW_BUFFER14_ARB\0"
2524+ "GL_DRAW_BUFFER14_ATI\0"
2525+ "GL_DRAW_BUFFER15\0"
2526+ "GL_DRAW_BUFFER15_ARB\0"
2527+ "GL_DRAW_BUFFER15_ATI\0"
2528+ "GL_DRAW_BUFFER1_ARB\0"
2529+ "GL_DRAW_BUFFER1_ATI\0"
2530+ "GL_DRAW_BUFFER2\0"
2531+ "GL_DRAW_BUFFER2_ARB\0"
2532+ "GL_DRAW_BUFFER2_ATI\0"
2533+ "GL_DRAW_BUFFER3\0"
2534+ "GL_DRAW_BUFFER3_ARB\0"
2535+ "GL_DRAW_BUFFER3_ATI\0"
2536+ "GL_DRAW_BUFFER4\0"
2537+ "GL_DRAW_BUFFER4_ARB\0"
2538+ "GL_DRAW_BUFFER4_ATI\0"
2539+ "GL_DRAW_BUFFER5\0"
2540+ "GL_DRAW_BUFFER5_ARB\0"
2541+ "GL_DRAW_BUFFER5_ATI\0"
2542+ "GL_DRAW_BUFFER6\0"
2543+ "GL_DRAW_BUFFER6_ARB\0"
2544+ "GL_DRAW_BUFFER6_ATI\0"
2545+ "GL_DRAW_BUFFER7\0"
2546+ "GL_DRAW_BUFFER7_ARB\0"
2547+ "GL_DRAW_BUFFER7_ATI\0"
2548+ "GL_DRAW_BUFFER8\0"
2549+ "GL_DRAW_BUFFER8_ARB\0"
2550+ "GL_DRAW_BUFFER8_ATI\0"
2551+ "GL_DRAW_BUFFER9\0"
2552+ "GL_DRAW_BUFFER9_ARB\0"
2553+ "GL_DRAW_BUFFER9_ATI\0"
2554+ "GL_DRAW_FRAMEBUFFER_BINDING_EXT\0"
2555+ "GL_DRAW_FRAMEBUFFER_EXT\0"
2556+ "GL_DRAW_PIXEL_TOKEN\0"
2557+ "GL_DST_ALPHA\0"
2558+ "GL_DST_COLOR\0"
2559+ "GL_DYNAMIC_COPY\0"
2560+ "GL_DYNAMIC_COPY_ARB\0"
2561+ "GL_DYNAMIC_DRAW\0"
2562+ "GL_DYNAMIC_DRAW_ARB\0"
2563+ "GL_DYNAMIC_READ\0"
2564+ "GL_DYNAMIC_READ_ARB\0"
2565+ "GL_EDGE_FLAG\0"
2566+ "GL_EDGE_FLAG_ARRAY\0"
2567+ "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING\0"
2568+ "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB\0"
2569+ "GL_EDGE_FLAG_ARRAY_POINTER\0"
2570+ "GL_EDGE_FLAG_ARRAY_STRIDE\0"
2571+ "GL_ELEMENT_ARRAY_BUFFER\0"
2572+ "GL_ELEMENT_ARRAY_BUFFER_ARB\0"
2573+ "GL_ELEMENT_ARRAY_BUFFER_BINDING\0"
2574+ "GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB\0"
2575+ "GL_EMISSION\0"
2576+ "GL_ENABLE_BIT\0"
2577+ "GL_EQUAL\0"
2578+ "GL_EQUIV\0"
2579+ "GL_EVAL_BIT\0"
2580+ "GL_EXP\0"
2581+ "GL_EXP2\0"
2582+ "GL_EXTENSIONS\0"
2583+ "GL_EYE_LINEAR\0"
2584+ "GL_EYE_PLANE\0"
2585+ "GL_EYE_PLANE_ABSOLUTE_NV\0"
2586+ "GL_EYE_RADIAL_NV\0"
2587+ "GL_FALSE\0"
2588+ "GL_FASTEST\0"
2589+ "GL_FEEDBACK\0"
2590+ "GL_FEEDBACK_BUFFER_POINTER\0"
2591+ "GL_FEEDBACK_BUFFER_SIZE\0"
2592+ "GL_FEEDBACK_BUFFER_TYPE\0"
2593+ "GL_FILL\0"
2594+ "GL_FLAT\0"
2595+ "GL_FLOAT\0"
2596+ "GL_FLOAT_MAT2\0"
2597+ "GL_FLOAT_MAT2_ARB\0"
2598+ "GL_FLOAT_MAT3\0"
2599+ "GL_FLOAT_MAT3_ARB\0"
2600+ "GL_FLOAT_MAT4\0"
2601+ "GL_FLOAT_MAT4_ARB\0"
2602+ "GL_FLOAT_VEC2\0"
2603+ "GL_FLOAT_VEC2_ARB\0"
2604+ "GL_FLOAT_VEC3\0"
2605+ "GL_FLOAT_VEC3_ARB\0"
2606+ "GL_FLOAT_VEC4\0"
2607+ "GL_FLOAT_VEC4_ARB\0"
2608+ "GL_FOG\0"
2609+ "GL_FOG_BIT\0"
2610+ "GL_FOG_COLOR\0"
2611+ "GL_FOG_COORD\0"
2612+ "GL_FOG_COORDINATE\0"
2613+ "GL_FOG_COORDINATE_ARRAY\0"
2614+ "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING\0"
2615+ "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB\0"
2616+ "GL_FOG_COORDINATE_ARRAY_POINTER\0"
2617+ "GL_FOG_COORDINATE_ARRAY_STRIDE\0"
2618+ "GL_FOG_COORDINATE_ARRAY_TYPE\0"
2619+ "GL_FOG_COORDINATE_SOURCE\0"
2620+ "GL_FOG_COORD_ARRAY\0"
2621+ "GL_FOG_COORD_ARRAY_BUFFER_BINDING\0"
2622+ "GL_FOG_COORD_ARRAY_POINTER\0"
2623+ "GL_FOG_COORD_ARRAY_STRIDE\0"
2624+ "GL_FOG_COORD_ARRAY_TYPE\0"
2625+ "GL_FOG_COORD_SRC\0"
2626+ "GL_FOG_DENSITY\0"
2627+ "GL_FOG_DISTANCE_MODE_NV\0"
2628+ "GL_FOG_END\0"
2629+ "GL_FOG_HINT\0"
2630+ "GL_FOG_INDEX\0"
2631+ "GL_FOG_MODE\0"
2632+ "GL_FOG_OFFSET_SGIX\0"
2633+ "GL_FOG_OFFSET_VALUE_SGIX\0"
2634+ "GL_FOG_START\0"
2635+ "GL_FRAGMENT_DEPTH\0"
2636+ "GL_FRAGMENT_PROGRAM_ARB\0"
2637+ "GL_FRAGMENT_SHADER\0"
2638+ "GL_FRAGMENT_SHADER_ARB\0"
2639+ "GL_FRAGMENT_SHADER_DERIVATIVE_HINT\0"
2640+ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT\0"
2641+ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT\0"
2642+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT\0"
2643+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT\0"
2644+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT\0"
2645+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT\0"
2646+ "GL_FRAMEBUFFER_BINDING_EXT\0"
2647+ "GL_FRAMEBUFFER_COMPLETE_EXT\0"
2648+ "GL_FRAMEBUFFER_EXT\0"
2649+ "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT\0"
2650+ "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT\0"
2651+ "GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT\0"
2652+ "GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT\0"
2653+ "GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT\0"
2654+ "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT\0"
2655+ "GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT\0"
2656+ "GL_FRAMEBUFFER_STATUS_ERROR_EXT\0"
2657+ "GL_FRAMEBUFFER_UNSUPPORTED_EXT\0"
2658+ "GL_FRONT\0"
2659+ "GL_FRONT_AND_BACK\0"
2660+ "GL_FRONT_FACE\0"
2661+ "GL_FRONT_LEFT\0"
2662+ "GL_FRONT_RIGHT\0"
2663+ "GL_FUNC_ADD\0"
2664+ "GL_FUNC_ADD_EXT\0"
2665+ "GL_FUNC_REVERSE_SUBTRACT\0"
2666+ "GL_FUNC_REVERSE_SUBTRACT_EXT\0"
2667+ "GL_FUNC_SUBTRACT\0"
2668+ "GL_FUNC_SUBTRACT_EXT\0"
2669+ "GL_GENERATE_MIPMAP\0"
2670+ "GL_GENERATE_MIPMAP_HINT\0"
2671+ "GL_GENERATE_MIPMAP_HINT_SGIS\0"
2672+ "GL_GENERATE_MIPMAP_SGIS\0"
2673+ "GL_GEQUAL\0"
2674+ "GL_GL_BLEND_EQUATION_RGB\0"
2675+ "GL_GL_COMPRESSED_SLUMINANCE\0"
2676+ "GL_GL_COMPRESSED_SLUMINANCE_ALPHA\0"
2677+ "GL_GL_COMPRESSED_SRGB\0"
2678+ "GL_GL_COMPRESSED_SRGB_ALPHA\0"
2679+ "GL_GL_CURRENT_RASTER_SECONDARY_COLOR\0"
2680+ "GL_GL_FLOAT_MAT2x3\0"
2681+ "GL_GL_FLOAT_MAT2x4\0"
2682+ "GL_GL_FLOAT_MAT3x2\0"
2683+ "GL_GL_FLOAT_MAT3x4\0"
2684+ "GL_GL_FLOAT_MAT4x2\0"
2685+ "GL_GL_FLOAT_MAT4x3\0"
2686+ "GL_GL_PIXEL_PACK_BUFFER\0"
2687+ "GL_GL_PIXEL_PACK_BUFFER_BINDING\0"
2688+ "GL_GL_PIXEL_UNPACK_BUFFER\0"
2689+ "GL_GL_PIXEL_UNPACK_BUFFER_BINDING\0"
2690+ "GL_GL_SLUMINANCE\0"
2691+ "GL_GL_SLUMINANCE8\0"
2692+ "GL_GL_SLUMINANCE8_ALPHA8\0"
2693+ "GL_GL_SLUMINANCE_ALPHA\0"
2694+ "GL_GL_SRGB\0"
2695+ "GL_GL_SRGB8\0"
2696+ "GL_GL_SRGB8_ALPHA8\0"
2697+ "GL_GL_SRGB_ALPHA\0"
2698+ "GL_GREATER\0"
2699+ "GL_GREEN\0"
2700+ "GL_GREEN_BIAS\0"
2701+ "GL_GREEN_BITS\0"
2702+ "GL_GREEN_SCALE\0"
2703+ "GL_HINT_BIT\0"
2704+ "GL_HISTOGRAM\0"
2705+ "GL_HISTOGRAM_ALPHA_SIZE\0"
2706+ "GL_HISTOGRAM_ALPHA_SIZE_EXT\0"
2707+ "GL_HISTOGRAM_BLUE_SIZE\0"
2708+ "GL_HISTOGRAM_BLUE_SIZE_EXT\0"
2709+ "GL_HISTOGRAM_EXT\0"
2710+ "GL_HISTOGRAM_FORMAT\0"
2711+ "GL_HISTOGRAM_FORMAT_EXT\0"
2712+ "GL_HISTOGRAM_GREEN_SIZE\0"
2713+ "GL_HISTOGRAM_GREEN_SIZE_EXT\0"
2714+ "GL_HISTOGRAM_LUMINANCE_SIZE\0"
2715+ "GL_HISTOGRAM_LUMINANCE_SIZE_EXT\0"
2716+ "GL_HISTOGRAM_RED_SIZE\0"
2717+ "GL_HISTOGRAM_RED_SIZE_EXT\0"
2718+ "GL_HISTOGRAM_SINK\0"
2719+ "GL_HISTOGRAM_SINK_EXT\0"
2720+ "GL_HISTOGRAM_WIDTH\0"
2721+ "GL_HISTOGRAM_WIDTH_EXT\0"
2722+ "GL_IDENTITY_NV\0"
2723+ "GL_IGNORE_BORDER_HP\0"
2724+ "GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES\0"
2725+ "GL_IMPLEMENTATION_COLOR_READ_TYPE_OES\0"
2726+ "GL_INCR\0"
2727+ "GL_INCR_WRAP\0"
2728+ "GL_INCR_WRAP_EXT\0"
2729+ "GL_INDEX_ARRAY\0"
2730+ "GL_INDEX_ARRAY_BUFFER_BINDING\0"
2731+ "GL_INDEX_ARRAY_BUFFER_BINDING_ARB\0"
2732+ "GL_INDEX_ARRAY_POINTER\0"
2733+ "GL_INDEX_ARRAY_STRIDE\0"
2734+ "GL_INDEX_ARRAY_TYPE\0"
2735+ "GL_INDEX_BITS\0"
2736+ "GL_INDEX_CLEAR_VALUE\0"
2737+ "GL_INDEX_LOGIC_OP\0"
2738+ "GL_INDEX_MODE\0"
2739+ "GL_INDEX_OFFSET\0"
2740+ "GL_INDEX_SHIFT\0"
2741+ "GL_INDEX_WRITEMASK\0"
2742+ "GL_INFO_LOG_LENGTH\0"
2743+ "GL_INT\0"
2744+ "GL_INTENSITY\0"
2745+ "GL_INTENSITY12\0"
2746+ "GL_INTENSITY12_EXT\0"
2747+ "GL_INTENSITY16\0"
2748+ "GL_INTENSITY16_EXT\0"
2749+ "GL_INTENSITY4\0"
2750+ "GL_INTENSITY4_EXT\0"
2751+ "GL_INTENSITY8\0"
2752+ "GL_INTENSITY8_EXT\0"
2753+ "GL_INTENSITY_EXT\0"
2754+ "GL_INTERPOLATE\0"
2755+ "GL_INTERPOLATE_ARB\0"
2756+ "GL_INTERPOLATE_EXT\0"
2757+ "GL_INT_VEC2\0"
2758+ "GL_INT_VEC2_ARB\0"
2759+ "GL_INT_VEC3\0"
2760+ "GL_INT_VEC3_ARB\0"
2761+ "GL_INT_VEC4\0"
2762+ "GL_INT_VEC4_ARB\0"
2763+ "GL_INVALID_ENUM\0"
2764+ "GL_INVALID_FRAMEBUFFER_OPERATION_EXT\0"
2765+ "GL_INVALID_OPERATION\0"
2766+ "GL_INVALID_VALUE\0"
2767+ "GL_INVERSE_NV\0"
2768+ "GL_INVERSE_TRANSPOSE_NV\0"
2769+ "GL_INVERT\0"
2770+ "GL_KEEP\0"
2771+ "GL_LEFT\0"
2772+ "GL_LEQUAL\0"
2773+ "GL_LESS\0"
2774+ "GL_LIGHT0\0"
2775+ "GL_LIGHT1\0"
2776+ "GL_LIGHT2\0"
2777+ "GL_LIGHT3\0"
2778+ "GL_LIGHT4\0"
2779+ "GL_LIGHT5\0"
2780+ "GL_LIGHT6\0"
2781+ "GL_LIGHT7\0"
2782+ "GL_LIGHTING\0"
2783+ "GL_LIGHTING_BIT\0"
2784+ "GL_LIGHT_MODEL_AMBIENT\0"
2785+ "GL_LIGHT_MODEL_COLOR_CONTROL\0"
2786+ "GL_LIGHT_MODEL_COLOR_CONTROL_EXT\0"
2787+ "GL_LIGHT_MODEL_LOCAL_VIEWER\0"
2788+ "GL_LIGHT_MODEL_TWO_SIDE\0"
2789+ "GL_LINE\0"
2790+ "GL_LINEAR\0"
2791+ "GL_LINEAR_ATTENUATION\0"
2792+ "GL_LINEAR_CLIPMAP_LINEAR_SGIX\0"
2793+ "GL_LINEAR_CLIPMAP_NEAREST_SGIX\0"
2794+ "GL_LINEAR_MIPMAP_LINEAR\0"
2795+ "GL_LINEAR_MIPMAP_NEAREST\0"
2796+ "GL_LINES\0"
2797+ "GL_LINE_BIT\0"
2798+ "GL_LINE_LOOP\0"
2799+ "GL_LINE_RESET_TOKEN\0"
2800+ "GL_LINE_SMOOTH\0"
2801+ "GL_LINE_SMOOTH_HINT\0"
2802+ "GL_LINE_STIPPLE\0"
2803+ "GL_LINE_STIPPLE_PATTERN\0"
2804+ "GL_LINE_STIPPLE_REPEAT\0"
2805+ "GL_LINE_STRIP\0"
2806+ "GL_LINE_TOKEN\0"
2807+ "GL_LINE_WIDTH\0"
2808+ "GL_LINE_WIDTH_GRANULARITY\0"
2809+ "GL_LINE_WIDTH_RANGE\0"
2810+ "GL_LINK_STATUS\0"
2811+ "GL_LIST_BASE\0"
2812+ "GL_LIST_BIT\0"
2813+ "GL_LIST_INDEX\0"
2814+ "GL_LIST_MODE\0"
2815+ "GL_LOAD\0"
2816+ "GL_LOGIC_OP\0"
2817+ "GL_LOGIC_OP_MODE\0"
2818+ "GL_LOWER_LEFT\0"
2819+ "GL_LUMINANCE\0"
2820+ "GL_LUMINANCE12\0"
2821+ "GL_LUMINANCE12_ALPHA12\0"
2822+ "GL_LUMINANCE12_ALPHA12_EXT\0"
2823+ "GL_LUMINANCE12_ALPHA4\0"
2824+ "GL_LUMINANCE12_ALPHA4_EXT\0"
2825+ "GL_LUMINANCE12_EXT\0"
2826+ "GL_LUMINANCE16\0"
2827+ "GL_LUMINANCE16_ALPHA16\0"
2828+ "GL_LUMINANCE16_ALPHA16_EXT\0"
2829+ "GL_LUMINANCE16_EXT\0"
2830+ "GL_LUMINANCE4\0"
2831+ "GL_LUMINANCE4_ALPHA4\0"
2832+ "GL_LUMINANCE4_ALPHA4_EXT\0"
2833+ "GL_LUMINANCE4_EXT\0"
2834+ "GL_LUMINANCE6_ALPHA2\0"
2835+ "GL_LUMINANCE6_ALPHA2_EXT\0"
2836+ "GL_LUMINANCE8\0"
2837+ "GL_LUMINANCE8_ALPHA8\0"
2838+ "GL_LUMINANCE8_ALPHA8_EXT\0"
2839+ "GL_LUMINANCE8_EXT\0"
2840+ "GL_LUMINANCE_ALPHA\0"
2841+ "GL_MAP1_COLOR_4\0"
2842+ "GL_MAP1_GRID_DOMAIN\0"
2843+ "GL_MAP1_GRID_SEGMENTS\0"
2844+ "GL_MAP1_INDEX\0"
2845+ "GL_MAP1_NORMAL\0"
2846+ "GL_MAP1_TEXTURE_COORD_1\0"
2847+ "GL_MAP1_TEXTURE_COORD_2\0"
2848+ "GL_MAP1_TEXTURE_COORD_3\0"
2849+ "GL_MAP1_TEXTURE_COORD_4\0"
2850+ "GL_MAP1_VERTEX_3\0"
2851+ "GL_MAP1_VERTEX_4\0"
2852+ "GL_MAP1_VERTEX_ATTRIB0_4_NV\0"
2853+ "GL_MAP1_VERTEX_ATTRIB10_4_NV\0"
2854+ "GL_MAP1_VERTEX_ATTRIB11_4_NV\0"
2855+ "GL_MAP1_VERTEX_ATTRIB12_4_NV\0"
2856+ "GL_MAP1_VERTEX_ATTRIB13_4_NV\0"
2857+ "GL_MAP1_VERTEX_ATTRIB14_4_NV\0"
2858+ "GL_MAP1_VERTEX_ATTRIB15_4_NV\0"
2859+ "GL_MAP1_VERTEX_ATTRIB1_4_NV\0"
2860+ "GL_MAP1_VERTEX_ATTRIB2_4_NV\0"
2861+ "GL_MAP1_VERTEX_ATTRIB3_4_NV\0"
2862+ "GL_MAP1_VERTEX_ATTRIB4_4_NV\0"
2863+ "GL_MAP1_VERTEX_ATTRIB5_4_NV\0"
2864+ "GL_MAP1_VERTEX_ATTRIB6_4_NV\0"
2865+ "GL_MAP1_VERTEX_ATTRIB7_4_NV\0"
2866+ "GL_MAP1_VERTEX_ATTRIB8_4_NV\0"
2867+ "GL_MAP1_VERTEX_ATTRIB9_4_NV\0"
2868+ "GL_MAP2_COLOR_4\0"
2869+ "GL_MAP2_GRID_DOMAIN\0"
2870+ "GL_MAP2_GRID_SEGMENTS\0"
2871+ "GL_MAP2_INDEX\0"
2872+ "GL_MAP2_NORMAL\0"
2873+ "GL_MAP2_TEXTURE_COORD_1\0"
2874+ "GL_MAP2_TEXTURE_COORD_2\0"
2875+ "GL_MAP2_TEXTURE_COORD_3\0"
2876+ "GL_MAP2_TEXTURE_COORD_4\0"
2877+ "GL_MAP2_VERTEX_3\0"
2878+ "GL_MAP2_VERTEX_4\0"
2879+ "GL_MAP2_VERTEX_ATTRIB0_4_NV\0"
2880+ "GL_MAP2_VERTEX_ATTRIB10_4_NV\0"
2881+ "GL_MAP2_VERTEX_ATTRIB11_4_NV\0"
2882+ "GL_MAP2_VERTEX_ATTRIB12_4_NV\0"
2883+ "GL_MAP2_VERTEX_ATTRIB13_4_NV\0"
2884+ "GL_MAP2_VERTEX_ATTRIB14_4_NV\0"
2885+ "GL_MAP2_VERTEX_ATTRIB15_4_NV\0"
2886+ "GL_MAP2_VERTEX_ATTRIB1_4_NV\0"
2887+ "GL_MAP2_VERTEX_ATTRIB2_4_NV\0"
2888+ "GL_MAP2_VERTEX_ATTRIB3_4_NV\0"
2889+ "GL_MAP2_VERTEX_ATTRIB4_4_NV\0"
2890+ "GL_MAP2_VERTEX_ATTRIB5_4_NV\0"
2891+ "GL_MAP2_VERTEX_ATTRIB6_4_NV\0"
2892+ "GL_MAP2_VERTEX_ATTRIB7_4_NV\0"
2893+ "GL_MAP2_VERTEX_ATTRIB8_4_NV\0"
2894+ "GL_MAP2_VERTEX_ATTRIB9_4_NV\0"
2895+ "GL_MAP_COLOR\0"
2896+ "GL_MAP_STENCIL\0"
2897+ "GL_MATRIX0_ARB\0"
2898+ "GL_MATRIX0_NV\0"
2899+ "GL_MATRIX10_ARB\0"
2900+ "GL_MATRIX11_ARB\0"
2901+ "GL_MATRIX12_ARB\0"
2902+ "GL_MATRIX13_ARB\0"
2903+ "GL_MATRIX14_ARB\0"
2904+ "GL_MATRIX15_ARB\0"
2905+ "GL_MATRIX16_ARB\0"
2906+ "GL_MATRIX17_ARB\0"
2907+ "GL_MATRIX18_ARB\0"
2908+ "GL_MATRIX19_ARB\0"
2909+ "GL_MATRIX1_ARB\0"
2910+ "GL_MATRIX1_NV\0"
2911+ "GL_MATRIX20_ARB\0"
2912+ "GL_MATRIX21_ARB\0"
2913+ "GL_MATRIX22_ARB\0"
2914+ "GL_MATRIX23_ARB\0"
2915+ "GL_MATRIX24_ARB\0"
2916+ "GL_MATRIX25_ARB\0"
2917+ "GL_MATRIX26_ARB\0"
2918+ "GL_MATRIX27_ARB\0"
2919+ "GL_MATRIX28_ARB\0"
2920+ "GL_MATRIX29_ARB\0"
2921+ "GL_MATRIX2_ARB\0"
2922+ "GL_MATRIX2_NV\0"
2923+ "GL_MATRIX30_ARB\0"
2924+ "GL_MATRIX31_ARB\0"
2925+ "GL_MATRIX3_ARB\0"
2926+ "GL_MATRIX3_NV\0"
2927+ "GL_MATRIX4_ARB\0"
2928+ "GL_MATRIX4_NV\0"
2929+ "GL_MATRIX5_ARB\0"
2930+ "GL_MATRIX5_NV\0"
2931+ "GL_MATRIX6_ARB\0"
2932+ "GL_MATRIX6_NV\0"
2933+ "GL_MATRIX7_ARB\0"
2934+ "GL_MATRIX7_NV\0"
2935+ "GL_MATRIX8_ARB\0"
2936+ "GL_MATRIX9_ARB\0"
2937+ "GL_MATRIX_INDEX_ARRAY_ARB\0"
2938+ "GL_MATRIX_INDEX_ARRAY_POINTER_ARB\0"
2939+ "GL_MATRIX_INDEX_ARRAY_SIZE_ARB\0"
2940+ "GL_MATRIX_INDEX_ARRAY_STRIDE_ARB\0"
2941+ "GL_MATRIX_INDEX_ARRAY_TYPE_ARB\0"
2942+ "GL_MATRIX_MODE\0"
2943+ "GL_MATRIX_PALETTE_ARB\0"
2944+ "GL_MAX\0"
2945+ "GL_MAX_3D_TEXTURE_SIZE\0"
2946+ "GL_MAX_ARRAY_TEXTURE_LAYERS_EXT\0"
2947+ "GL_MAX_ATTRIB_STACK_DEPTH\0"
2948+ "GL_MAX_CLIENT_ATTRIB_STACK_DEPTH\0"
2949+ "GL_MAX_CLIPMAP_DEPTH_SGIX\0"
2950+ "GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX\0"
2951+ "GL_MAX_CLIP_PLANES\0"
2952+ "GL_MAX_COLOR_ATTACHMENTS_EXT\0"
2953+ "GL_MAX_COLOR_MATRIX_STACK_DEPTH\0"
2954+ "GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI\0"
2955+ "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS\0"
2956+ "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB\0"
2957+ "GL_MAX_CONVOLUTION_HEIGHT\0"
2958+ "GL_MAX_CONVOLUTION_HEIGHT_EXT\0"
2959+ "GL_MAX_CONVOLUTION_WIDTH\0"
2960+ "GL_MAX_CONVOLUTION_WIDTH_EXT\0"
2961+ "GL_MAX_CUBE_MAP_TEXTURE_SIZE\0"
2962+ "GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB\0"
2963+ "GL_MAX_DRAW_BUFFERS\0"
2964+ "GL_MAX_DRAW_BUFFERS_ARB\0"
2965+ "GL_MAX_DRAW_BUFFERS_ATI\0"
2966+ "GL_MAX_ELEMENTS_INDICES\0"
2967+ "GL_MAX_ELEMENTS_VERTICES\0"
2968+ "GL_MAX_EVAL_ORDER\0"
2969+ "GL_MAX_EXT\0"
2970+ "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS\0"
2971+ "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB\0"
2972+ "GL_MAX_LIGHTS\0"
2973+ "GL_MAX_LIST_NESTING\0"
2974+ "GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB\0"
2975+ "GL_MAX_MODELVIEW_STACK_DEPTH\0"
2976+ "GL_MAX_NAME_STACK_DEPTH\0"
2977+ "GL_MAX_PALETTE_MATRICES_ARB\0"
2978+ "GL_MAX_PIXEL_MAP_TABLE\0"
2979+ "GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB\0"
2980+ "GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB\0"
2981+ "GL_MAX_PROGRAM_ATTRIBS_ARB\0"
2982+ "GL_MAX_PROGRAM_CALL_DEPTH_NV\0"
2983+ "GL_MAX_PROGRAM_ENV_PARAMETERS_ARB\0"
2984+ "GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV\0"
2985+ "GL_MAX_PROGRAM_IF_DEPTH_NV\0"
2986+ "GL_MAX_PROGRAM_INSTRUCTIONS_ARB\0"
2987+ "GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB\0"
2988+ "GL_MAX_PROGRAM_LOOP_COUNT_NV\0"
2989+ "GL_MAX_PROGRAM_LOOP_DEPTH_NV\0"
2990+ "GL_MAX_PROGRAM_MATRICES_ARB\0"
2991+ "GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB\0"
2992+ "GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB\0"
2993+ "GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB\0"
2994+ "GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB\0"
2995+ "GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB\0"
2996+ "GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB\0"
2997+ "GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB\0"
2998+ "GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB\0"
2999+ "GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB\0"
3000+ "GL_MAX_PROGRAM_PARAMETERS_ARB\0"
3001+ "GL_MAX_PROGRAM_TEMPORARIES_ARB\0"
3002+ "GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB\0"
3003+ "GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB\0"
3004+ "GL_MAX_PROJECTION_STACK_DEPTH\0"
3005+ "GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB\0"
3006+ "GL_MAX_RECTANGLE_TEXTURE_SIZE_NV\0"
3007+ "GL_MAX_RENDERBUFFER_SIZE_EXT\0"
3008+ "GL_MAX_SHININESS_NV\0"
3009+ "GL_MAX_SPOT_EXPONENT_NV\0"
3010+ "GL_MAX_TEXTURE_COORDS\0"
3011+ "GL_MAX_TEXTURE_COORDS_ARB\0"
3012+ "GL_MAX_TEXTURE_IMAGE_UNITS\0"
3013+ "GL_MAX_TEXTURE_IMAGE_UNITS_ARB\0"
3014+ "GL_MAX_TEXTURE_LOD_BIAS\0"
3015+ "GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT\0"
3016+ "GL_MAX_TEXTURE_SIZE\0"
3017+ "GL_MAX_TEXTURE_STACK_DEPTH\0"
3018+ "GL_MAX_TEXTURE_UNITS\0"
3019+ "GL_MAX_TEXTURE_UNITS_ARB\0"
3020+ "GL_MAX_TRACK_MATRICES_NV\0"
3021+ "GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV\0"
3022+ "GL_MAX_VARYING_FLOATS\0"
3023+ "GL_MAX_VARYING_FLOATS_ARB\0"
3024+ "GL_MAX_VERTEX_ATTRIBS\0"
3025+ "GL_MAX_VERTEX_ATTRIBS_ARB\0"
3026+ "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS\0"
3027+ "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB\0"
3028+ "GL_MAX_VERTEX_UNIFORM_COMPONENTS\0"
3029+ "GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB\0"
3030+ "GL_MAX_VERTEX_UNITS_ARB\0"
3031+ "GL_MAX_VIEWPORT_DIMS\0"
3032+ "GL_MIN\0"
3033+ "GL_MINMAX\0"
3034+ "GL_MINMAX_EXT\0"
3035+ "GL_MINMAX_FORMAT\0"
3036+ "GL_MINMAX_FORMAT_EXT\0"
3037+ "GL_MINMAX_SINK\0"
3038+ "GL_MINMAX_SINK_EXT\0"
3039+ "GL_MIN_EXT\0"
3040+ "GL_MIRRORED_REPEAT\0"
3041+ "GL_MIRRORED_REPEAT_ARB\0"
3042+ "GL_MIRRORED_REPEAT_IBM\0"
3043+ "GL_MIRROR_CLAMP_ATI\0"
3044+ "GL_MIRROR_CLAMP_EXT\0"
3045+ "GL_MIRROR_CLAMP_TO_BORDER_EXT\0"
3046+ "GL_MIRROR_CLAMP_TO_EDGE_ATI\0"
3047+ "GL_MIRROR_CLAMP_TO_EDGE_EXT\0"
3048+ "GL_MODELVIEW\0"
3049+ "GL_MODELVIEW0_ARB\0"
3050+ "GL_MODELVIEW10_ARB\0"
3051+ "GL_MODELVIEW11_ARB\0"
3052+ "GL_MODELVIEW12_ARB\0"
3053+ "GL_MODELVIEW13_ARB\0"
3054+ "GL_MODELVIEW14_ARB\0"
3055+ "GL_MODELVIEW15_ARB\0"
3056+ "GL_MODELVIEW16_ARB\0"
3057+ "GL_MODELVIEW17_ARB\0"
3058+ "GL_MODELVIEW18_ARB\0"
3059+ "GL_MODELVIEW19_ARB\0"
3060+ "GL_MODELVIEW1_ARB\0"
3061+ "GL_MODELVIEW20_ARB\0"
3062+ "GL_MODELVIEW21_ARB\0"
3063+ "GL_MODELVIEW22_ARB\0"
3064+ "GL_MODELVIEW23_ARB\0"
3065+ "GL_MODELVIEW24_ARB\0"
3066+ "GL_MODELVIEW25_ARB\0"
3067+ "GL_MODELVIEW26_ARB\0"
3068+ "GL_MODELVIEW27_ARB\0"
3069+ "GL_MODELVIEW28_ARB\0"
3070+ "GL_MODELVIEW29_ARB\0"
3071+ "GL_MODELVIEW2_ARB\0"
3072+ "GL_MODELVIEW30_ARB\0"
3073+ "GL_MODELVIEW31_ARB\0"
3074+ "GL_MODELVIEW3_ARB\0"
3075+ "GL_MODELVIEW4_ARB\0"
3076+ "GL_MODELVIEW5_ARB\0"
3077+ "GL_MODELVIEW6_ARB\0"
3078+ "GL_MODELVIEW7_ARB\0"
3079+ "GL_MODELVIEW8_ARB\0"
3080+ "GL_MODELVIEW9_ARB\0"
3081+ "GL_MODELVIEW_MATRIX\0"
3082+ "GL_MODELVIEW_PROJECTION_NV\0"
3083+ "GL_MODELVIEW_STACK_DEPTH\0"
3084+ "GL_MODULATE\0"
3085+ "GL_MODULATE_ADD_ATI\0"
3086+ "GL_MODULATE_SIGNED_ADD_ATI\0"
3087+ "GL_MODULATE_SUBTRACT_ATI\0"
3088+ "GL_MULT\0"
3089+ "GL_MULTISAMPLE\0"
3090+ "GL_MULTISAMPLE_3DFX\0"
3091+ "GL_MULTISAMPLE_ARB\0"
3092+ "GL_MULTISAMPLE_BIT\0"
3093+ "GL_MULTISAMPLE_BIT_3DFX\0"
3094+ "GL_MULTISAMPLE_BIT_ARB\0"
3095+ "GL_MULTISAMPLE_FILTER_HINT_NV\0"
3096+ "GL_N3F_V3F\0"
3097+ "GL_NAME_STACK_DEPTH\0"
3098+ "GL_NAND\0"
3099+ "GL_NEAREST\0"
3100+ "GL_NEAREST_CLIPMAP_LINEAR_SGIX\0"
3101+ "GL_NEAREST_CLIPMAP_NEAREST_SGIX\0"
3102+ "GL_NEAREST_MIPMAP_LINEAR\0"
3103+ "GL_NEAREST_MIPMAP_NEAREST\0"
3104+ "GL_NEVER\0"
3105+ "GL_NICEST\0"
3106+ "GL_NONE\0"
3107+ "GL_NOOP\0"
3108+ "GL_NOR\0"
3109+ "GL_NORMALIZE\0"
3110+ "GL_NORMAL_ARRAY\0"
3111+ "GL_NORMAL_ARRAY_BUFFER_BINDING\0"
3112+ "GL_NORMAL_ARRAY_BUFFER_BINDING_ARB\0"
3113+ "GL_NORMAL_ARRAY_POINTER\0"
3114+ "GL_NORMAL_ARRAY_STRIDE\0"
3115+ "GL_NORMAL_ARRAY_TYPE\0"
3116+ "GL_NORMAL_MAP\0"
3117+ "GL_NORMAL_MAP_ARB\0"
3118+ "GL_NORMAL_MAP_NV\0"
3119+ "GL_NOTEQUAL\0"
3120+ "GL_NO_ERROR\0"
3121+ "GL_NUM_COMPRESSED_TEXTURE_FORMATS\0"
3122+ "GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB\0"
3123+ "GL_OBJECT_ACTIVE_ATTRIBUTES_ARB\0"
3124+ "GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB\0"
3125+ "GL_OBJECT_ACTIVE_UNIFORMS_ARB\0"
3126+ "GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB\0"
3127+ "GL_OBJECT_ATTACHED_OBJECTS_ARB\0"
3128+ "GL_OBJECT_COMPILE_STATUS_ARB\0"
3129+ "GL_OBJECT_DELETE_STATUS_ARB\0"
3130+ "GL_OBJECT_INFO_LOG_LENGTH_ARB\0"
3131+ "GL_OBJECT_LINEAR\0"
3132+ "GL_OBJECT_LINK_STATUS_ARB\0"
3133+ "GL_OBJECT_PLANE\0"
3134+ "GL_OBJECT_SHADER_SOURCE_LENGTH_ARB\0"
3135+ "GL_OBJECT_SUBTYPE_ARB\0"
3136+ "GL_OBJECT_TYPE_ARB\0"
3137+ "GL_OBJECT_VALIDATE_STATUS_ARB\0"
3138+ "GL_OCCLUSION_TEST_HP\0"
3139+ "GL_OCCLUSION_TEST_RESULT_HP\0"
3140+ "GL_ONE\0"
3141+ "GL_ONE_MINUS_CONSTANT_ALPHA\0"
3142+ "GL_ONE_MINUS_CONSTANT_ALPHA_EXT\0"
3143+ "GL_ONE_MINUS_CONSTANT_COLOR\0"
3144+ "GL_ONE_MINUS_CONSTANT_COLOR_EXT\0"
3145+ "GL_ONE_MINUS_DST_ALPHA\0"
3146+ "GL_ONE_MINUS_DST_COLOR\0"
3147+ "GL_ONE_MINUS_SRC_ALPHA\0"
3148+ "GL_ONE_MINUS_SRC_COLOR\0"
3149+ "GL_OPERAND0_ALPHA\0"
3150+ "GL_OPERAND0_ALPHA_ARB\0"
3151+ "GL_OPERAND0_ALPHA_EXT\0"
3152+ "GL_OPERAND0_RGB\0"
3153+ "GL_OPERAND0_RGB_ARB\0"
3154+ "GL_OPERAND0_RGB_EXT\0"
3155+ "GL_OPERAND1_ALPHA\0"
3156+ "GL_OPERAND1_ALPHA_ARB\0"
3157+ "GL_OPERAND1_ALPHA_EXT\0"
3158+ "GL_OPERAND1_RGB\0"
3159+ "GL_OPERAND1_RGB_ARB\0"
3160+ "GL_OPERAND1_RGB_EXT\0"
3161+ "GL_OPERAND2_ALPHA\0"
3162+ "GL_OPERAND2_ALPHA_ARB\0"
3163+ "GL_OPERAND2_ALPHA_EXT\0"
3164+ "GL_OPERAND2_RGB\0"
3165+ "GL_OPERAND2_RGB_ARB\0"
3166+ "GL_OPERAND2_RGB_EXT\0"
3167+ "GL_OPERAND3_ALPHA_NV\0"
3168+ "GL_OPERAND3_RGB_NV\0"
3169+ "GL_OR\0"
3170+ "GL_ORDER\0"
3171+ "GL_OR_INVERTED\0"
3172+ "GL_OR_REVERSE\0"
3173+ "GL_OUT_OF_MEMORY\0"
3174+ "GL_PACK_ALIGNMENT\0"
3175+ "GL_PACK_IMAGE_HEIGHT\0"
3176+ "GL_PACK_INVERT_MESA\0"
3177+ "GL_PACK_LSB_FIRST\0"
3178+ "GL_PACK_ROW_LENGTH\0"
3179+ "GL_PACK_SKIP_IMAGES\0"
3180+ "GL_PACK_SKIP_PIXELS\0"
3181+ "GL_PACK_SKIP_ROWS\0"
3182+ "GL_PACK_SWAP_BYTES\0"
3183+ "GL_PALETTE4_R5_G6_B5_OES\0"
3184+ "GL_PALETTE4_RGB5_A1_OES\0"
3185+ "GL_PALETTE4_RGB8_OES\0"
3186+ "GL_PALETTE4_RGBA4_OES\0"
3187+ "GL_PALETTE4_RGBA8_OES\0"
3188+ "GL_PALETTE8_R5_G6_B5_OES\0"
3189+ "GL_PALETTE8_RGB5_A1_OES\0"
3190+ "GL_PALETTE8_RGB8_OES\0"
3191+ "GL_PALETTE8_RGBA4_OES\0"
3192+ "GL_PALETTE8_RGBA8_OES\0"
3193+ "GL_PASS_THROUGH_TOKEN\0"
3194+ "GL_PERSPECTIVE_CORRECTION_HINT\0"
3195+ "GL_PIXEL_MAP_A_TO_A\0"
3196+ "GL_PIXEL_MAP_A_TO_A_SIZE\0"
3197+ "GL_PIXEL_MAP_B_TO_B\0"
3198+ "GL_PIXEL_MAP_B_TO_B_SIZE\0"
3199+ "GL_PIXEL_MAP_G_TO_G\0"
3200+ "GL_PIXEL_MAP_G_TO_G_SIZE\0"
3201+ "GL_PIXEL_MAP_I_TO_A\0"
3202+ "GL_PIXEL_MAP_I_TO_A_SIZE\0"
3203+ "GL_PIXEL_MAP_I_TO_B\0"
3204+ "GL_PIXEL_MAP_I_TO_B_SIZE\0"
3205+ "GL_PIXEL_MAP_I_TO_G\0"
3206+ "GL_PIXEL_MAP_I_TO_G_SIZE\0"
3207+ "GL_PIXEL_MAP_I_TO_I\0"
3208+ "GL_PIXEL_MAP_I_TO_I_SIZE\0"
3209+ "GL_PIXEL_MAP_I_TO_R\0"
3210+ "GL_PIXEL_MAP_I_TO_R_SIZE\0"
3211+ "GL_PIXEL_MAP_R_TO_R\0"
3212+ "GL_PIXEL_MAP_R_TO_R_SIZE\0"
3213+ "GL_PIXEL_MAP_S_TO_S\0"
3214+ "GL_PIXEL_MAP_S_TO_S_SIZE\0"
3215+ "GL_PIXEL_MODE_BIT\0"
3216+ "GL_PIXEL_PACK_BUFFER_BINDING_EXT\0"
3217+ "GL_PIXEL_PACK_BUFFER_EXT\0"
3218+ "GL_PIXEL_UNPACK_BUFFER_BINDING_EXT\0"
3219+ "GL_PIXEL_UNPACK_BUFFER_EXT\0"
3220+ "GL_POINT\0"
3221+ "GL_POINTS\0"
3222+ "GL_POINT_BIT\0"
3223+ "GL_POINT_DISTANCE_ATTENUATION\0"
3224+ "GL_POINT_DISTANCE_ATTENUATION_ARB\0"
3225+ "GL_POINT_DISTANCE_ATTENUATION_EXT\0"
3226+ "GL_POINT_DISTANCE_ATTENUATION_SGIS\0"
3227+ "GL_POINT_FADE_THRESHOLD_SIZE\0"
3228+ "GL_POINT_FADE_THRESHOLD_SIZE_ARB\0"
3229+ "GL_POINT_FADE_THRESHOLD_SIZE_EXT\0"
3230+ "GL_POINT_FADE_THRESHOLD_SIZE_SGIS\0"
3231+ "GL_POINT_SIZE\0"
3232+ "GL_POINT_SIZE_GRANULARITY\0"
3233+ "GL_POINT_SIZE_MAX\0"
3234+ "GL_POINT_SIZE_MAX_ARB\0"
3235+ "GL_POINT_SIZE_MAX_EXT\0"
3236+ "GL_POINT_SIZE_MAX_SGIS\0"
3237+ "GL_POINT_SIZE_MIN\0"
3238+ "GL_POINT_SIZE_MIN_ARB\0"
3239+ "GL_POINT_SIZE_MIN_EXT\0"
3240+ "GL_POINT_SIZE_MIN_SGIS\0"
3241+ "GL_POINT_SIZE_RANGE\0"
3242+ "GL_POINT_SMOOTH\0"
3243+ "GL_POINT_SMOOTH_HINT\0"
3244+ "GL_POINT_SPRITE\0"
3245+ "GL_POINT_SPRITE_ARB\0"
3246+ "GL_POINT_SPRITE_COORD_ORIGIN\0"
3247+ "GL_POINT_SPRITE_NV\0"
3248+ "GL_POINT_SPRITE_R_MODE_NV\0"
3249+ "GL_POINT_TOKEN\0"
3250+ "GL_POLYGON\0"
3251+ "GL_POLYGON_BIT\0"
3252+ "GL_POLYGON_MODE\0"
3253+ "GL_POLYGON_OFFSET_BIAS\0"
3254+ "GL_POLYGON_OFFSET_FACTOR\0"
3255+ "GL_POLYGON_OFFSET_FILL\0"
3256+ "GL_POLYGON_OFFSET_LINE\0"
3257+ "GL_POLYGON_OFFSET_POINT\0"
3258+ "GL_POLYGON_OFFSET_UNITS\0"
3259+ "GL_POLYGON_SMOOTH\0"
3260+ "GL_POLYGON_SMOOTH_HINT\0"
3261+ "GL_POLYGON_STIPPLE\0"
3262+ "GL_POLYGON_STIPPLE_BIT\0"
3263+ "GL_POLYGON_TOKEN\0"
3264+ "GL_POSITION\0"
3265+ "GL_POST_COLOR_MATRIX_ALPHA_BIAS\0"
3266+ "GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI\0"
3267+ "GL_POST_COLOR_MATRIX_ALPHA_SCALE\0"
3268+ "GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI\0"
3269+ "GL_POST_COLOR_MATRIX_BLUE_BIAS\0"
3270+ "GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI\0"
3271+ "GL_POST_COLOR_MATRIX_BLUE_SCALE\0"
3272+ "GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI\0"
3273+ "GL_POST_COLOR_MATRIX_COLOR_TABLE\0"
3274+ "GL_POST_COLOR_MATRIX_GREEN_BIAS\0"
3275+ "GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI\0"
3276+ "GL_POST_COLOR_MATRIX_GREEN_SCALE\0"
3277+ "GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI\0"
3278+ "GL_POST_COLOR_MATRIX_RED_BIAS\0"
3279+ "GL_POST_COLOR_MATRIX_RED_BIAS_SGI\0"
3280+ "GL_POST_COLOR_MATRIX_RED_SCALE\0"
3281+ "GL_POST_COLOR_MATRIX_RED_SCALE_SGI\0"
3282+ "GL_POST_CONVOLUTION_ALPHA_BIAS\0"
3283+ "GL_POST_CONVOLUTION_ALPHA_BIAS_EXT\0"
3284+ "GL_POST_CONVOLUTION_ALPHA_SCALE\0"
3285+ "GL_POST_CONVOLUTION_ALPHA_SCALE_EXT\0"
3286+ "GL_POST_CONVOLUTION_BLUE_BIAS\0"
3287+ "GL_POST_CONVOLUTION_BLUE_BIAS_EXT\0"
3288+ "GL_POST_CONVOLUTION_BLUE_SCALE\0"
3289+ "GL_POST_CONVOLUTION_BLUE_SCALE_EXT\0"
3290+ "GL_POST_CONVOLUTION_COLOR_TABLE\0"
3291+ "GL_POST_CONVOLUTION_GREEN_BIAS\0"
3292+ "GL_POST_CONVOLUTION_GREEN_BIAS_EXT\0"
3293+ "GL_POST_CONVOLUTION_GREEN_SCALE\0"
3294+ "GL_POST_CONVOLUTION_GREEN_SCALE_EXT\0"
3295+ "GL_POST_CONVOLUTION_RED_BIAS\0"
3296+ "GL_POST_CONVOLUTION_RED_BIAS_EXT\0"
3297+ "GL_POST_CONVOLUTION_RED_SCALE\0"
3298+ "GL_POST_CONVOLUTION_RED_SCALE_EXT\0"
3299+ "GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX\0"
3300+ "GL_POST_TEXTURE_FILTER_BIAS_SGIX\0"
3301+ "GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX\0"
3302+ "GL_POST_TEXTURE_FILTER_SCALE_SGIX\0"
3303+ "GL_PREVIOUS\0"
3304+ "GL_PREVIOUS_ARB\0"
3305+ "GL_PREVIOUS_EXT\0"
3306+ "GL_PRIMARY_COLOR\0"
3307+ "GL_PRIMARY_COLOR_ARB\0"
3308+ "GL_PRIMARY_COLOR_EXT\0"
3309+ "GL_PROGRAM_ADDRESS_REGISTERS_ARB\0"
3310+ "GL_PROGRAM_ALU_INSTRUCTIONS_ARB\0"
3311+ "GL_PROGRAM_ATTRIBS_ARB\0"
3312+ "GL_PROGRAM_BINDING_ARB\0"
3313+ "GL_PROGRAM_ERROR_POSITION_ARB\0"
3314+ "GL_PROGRAM_ERROR_POSITION_NV\0"
3315+ "GL_PROGRAM_ERROR_STRING_ARB\0"
3316+ "GL_PROGRAM_FORMAT_ARB\0"
3317+ "GL_PROGRAM_FORMAT_ASCII_ARB\0"
3318+ "GL_PROGRAM_INSTRUCTIONS_ARB\0"
3319+ "GL_PROGRAM_LENGTH_ARB\0"
3320+ "GL_PROGRAM_LENGTH_NV\0"
3321+ "GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB\0"
3322+ "GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB\0"
3323+ "GL_PROGRAM_NATIVE_ATTRIBS_ARB\0"
3324+ "GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB\0"
3325+ "GL_PROGRAM_NATIVE_PARAMETERS_ARB\0"
3326+ "GL_PROGRAM_NATIVE_TEMPORARIES_ARB\0"
3327+ "GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB\0"
3328+ "GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB\0"
3329+ "GL_PROGRAM_OBJECT_ARB\0"
3330+ "GL_PROGRAM_PARAMETERS_ARB\0"
3331+ "GL_PROGRAM_PARAMETER_NV\0"
3332+ "GL_PROGRAM_RESIDENT_NV\0"
3333+ "GL_PROGRAM_STRING_ARB\0"
3334+ "GL_PROGRAM_STRING_NV\0"
3335+ "GL_PROGRAM_TARGET_NV\0"
3336+ "GL_PROGRAM_TEMPORARIES_ARB\0"
3337+ "GL_PROGRAM_TEX_INDIRECTIONS_ARB\0"
3338+ "GL_PROGRAM_TEX_INSTRUCTIONS_ARB\0"
3339+ "GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB\0"
3340+ "GL_PROJECTION\0"
3341+ "GL_PROJECTION_MATRIX\0"
3342+ "GL_PROJECTION_STACK_DEPTH\0"
3343+ "GL_PROXY_COLOR_TABLE\0"
3344+ "GL_PROXY_HISTOGRAM\0"
3345+ "GL_PROXY_HISTOGRAM_EXT\0"
3346+ "GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE\0"
3347+ "GL_PROXY_POST_CONVOLUTION_COLOR_TABLE\0"
3348+ "GL_PROXY_TEXTURE_1D\0"
3349+ "GL_PROXY_TEXTURE_1D_ARRAY_EXT\0"
3350+ "GL_PROXY_TEXTURE_1D_EXT\0"
3351+ "GL_PROXY_TEXTURE_2D\0"
3352+ "GL_PROXY_TEXTURE_2D_ARRAY_EXT\0"
3353+ "GL_PROXY_TEXTURE_2D_EXT\0"
3354+ "GL_PROXY_TEXTURE_3D\0"
3355+ "GL_PROXY_TEXTURE_COLOR_TABLE_SGI\0"
3356+ "GL_PROXY_TEXTURE_CUBE_MAP\0"
3357+ "GL_PROXY_TEXTURE_CUBE_MAP_ARB\0"
3358+ "GL_PROXY_TEXTURE_RECTANGLE_ARB\0"
3359+ "GL_PROXY_TEXTURE_RECTANGLE_NV\0"
3360+ "GL_Q\0"
3361+ "GL_QUADRATIC_ATTENUATION\0"
3362+ "GL_QUADS\0"
3363+ "GL_QUAD_MESH_SUN\0"
3364+ "GL_QUAD_STRIP\0"
3365+ "GL_QUERY_COUNTER_BITS\0"
3366+ "GL_QUERY_COUNTER_BITS_ARB\0"
3367+ "GL_QUERY_RESULT\0"
3368+ "GL_QUERY_RESULT_ARB\0"
3369+ "GL_QUERY_RESULT_AVAILABLE\0"
3370+ "GL_QUERY_RESULT_AVAILABLE_ARB\0"
3371+ "GL_R\0"
3372+ "GL_R3_G3_B2\0"
3373+ "GL_RASTER_POSITION_UNCLIPPED_IBM\0"
3374+ "GL_READ_BUFFER\0"
3375+ "GL_READ_FRAMEBUFFER_BINDING_EXT\0"
3376+ "GL_READ_FRAMEBUFFER_EXT\0"
3377+ "GL_READ_ONLY\0"
3378+ "GL_READ_ONLY_ARB\0"
3379+ "GL_READ_WRITE\0"
3380+ "GL_READ_WRITE_ARB\0"
3381+ "GL_RED\0"
3382+ "GL_REDUCE\0"
3383+ "GL_REDUCE_EXT\0"
3384+ "GL_RED_BIAS\0"
3385+ "GL_RED_BITS\0"
3386+ "GL_RED_SCALE\0"
3387+ "GL_REFLECTION_MAP\0"
3388+ "GL_REFLECTION_MAP_ARB\0"
3389+ "GL_REFLECTION_MAP_NV\0"
3390+ "GL_RENDER\0"
3391+ "GL_RENDERBUFFER_BINDING_EXT\0"
3392+ "GL_RENDERBUFFER_EXT\0"
3393+ "GL_RENDERBUFFER_HEIGHT_EXT\0"
3394+ "GL_RENDERBUFFER_INTERNAL_FORMAT_EXT\0"
3395+ "GL_RENDERBUFFER_WIDTH_EXT\0"
3396+ "GL_RENDERER\0"
3397+ "GL_RENDER_MODE\0"
3398+ "GL_REPEAT\0"
3399+ "GL_REPLACE\0"
3400+ "GL_REPLACE_EXT\0"
3401+ "GL_REPLICATE_BORDER_HP\0"
3402+ "GL_RESCALE_NORMAL\0"
3403+ "GL_RESCALE_NORMAL_EXT\0"
3404+ "GL_RETURN\0"
3405+ "GL_RGB\0"
3406+ "GL_RGB10\0"
3407+ "GL_RGB10_A2\0"
3408+ "GL_RGB10_A2_EXT\0"
3409+ "GL_RGB10_EXT\0"
3410+ "GL_RGB12\0"
3411+ "GL_RGB12_EXT\0"
3412+ "GL_RGB16\0"
3413+ "GL_RGB16_EXT\0"
3414+ "GL_RGB2_EXT\0"
3415+ "GL_RGB4\0"
3416+ "GL_RGB4_EXT\0"
3417+ "GL_RGB4_S3TC\0"
3418+ "GL_RGB5\0"
3419+ "GL_RGB5_A1\0"
3420+ "GL_RGB5_A1_EXT\0"
3421+ "GL_RGB5_EXT\0"
3422+ "GL_RGB8\0"
3423+ "GL_RGB8_EXT\0"
3424+ "GL_RGBA\0"
3425+ "GL_RGBA12\0"
3426+ "GL_RGBA12_EXT\0"
3427+ "GL_RGBA16\0"
3428+ "GL_RGBA16_EXT\0"
3429+ "GL_RGBA2\0"
3430+ "GL_RGBA2_EXT\0"
3431+ "GL_RGBA4\0"
3432+ "GL_RGBA4_DXT5_S3TC\0"
3433+ "GL_RGBA4_EXT\0"
3434+ "GL_RGBA4_S3TC\0"
3435+ "GL_RGBA8\0"
3436+ "GL_RGBA8_EXT\0"
3437+ "GL_RGBA_DXT5_S3TC\0"
3438+ "GL_RGBA_MODE\0"
3439+ "GL_RGBA_S3TC\0"
3440+ "GL_RGB_S3TC\0"
3441+ "GL_RGB_SCALE\0"
3442+ "GL_RGB_SCALE_ARB\0"
3443+ "GL_RGB_SCALE_EXT\0"
3444+ "GL_RIGHT\0"
3445+ "GL_S\0"
3446+ "GL_SAMPLER_1D\0"
3447+ "GL_SAMPLER_1D_SHADOW\0"
3448+ "GL_SAMPLER_2D\0"
3449+ "GL_SAMPLER_2D_SHADOW\0"
3450+ "GL_SAMPLER_3D\0"
3451+ "GL_SAMPLER_CUBE\0"
3452+ "GL_SAMPLES\0"
3453+ "GL_SAMPLES_3DFX\0"
3454+ "GL_SAMPLES_ARB\0"
3455+ "GL_SAMPLES_PASSED\0"
3456+ "GL_SAMPLES_PASSED_ARB\0"
3457+ "GL_SAMPLE_ALPHA_TO_COVERAGE\0"
3458+ "GL_SAMPLE_ALPHA_TO_COVERAGE_ARB\0"
3459+ "GL_SAMPLE_ALPHA_TO_ONE\0"
3460+ "GL_SAMPLE_ALPHA_TO_ONE_ARB\0"
3461+ "GL_SAMPLE_BUFFERS\0"
3462+ "GL_SAMPLE_BUFFERS_3DFX\0"
3463+ "GL_SAMPLE_BUFFERS_ARB\0"
3464+ "GL_SAMPLE_COVERAGE\0"
3465+ "GL_SAMPLE_COVERAGE_ARB\0"
3466+ "GL_SAMPLE_COVERAGE_INVERT\0"
3467+ "GL_SAMPLE_COVERAGE_INVERT_ARB\0"
3468+ "GL_SAMPLE_COVERAGE_VALUE\0"
3469+ "GL_SAMPLE_COVERAGE_VALUE_ARB\0"
3470+ "GL_SCISSOR_BIT\0"
3471+ "GL_SCISSOR_BOX\0"
3472+ "GL_SCISSOR_TEST\0"
3473+ "GL_SECONDARY_COLOR_ARRAY\0"
3474+ "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING\0"
3475+ "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB\0"
3476+ "GL_SECONDARY_COLOR_ARRAY_POINTER\0"
3477+ "GL_SECONDARY_COLOR_ARRAY_SIZE\0"
3478+ "GL_SECONDARY_COLOR_ARRAY_STRIDE\0"
3479+ "GL_SECONDARY_COLOR_ARRAY_TYPE\0"
3480+ "GL_SELECT\0"
3481+ "GL_SELECTION_BUFFER_POINTER\0"
3482+ "GL_SELECTION_BUFFER_SIZE\0"
3483+ "GL_SEPARABLE_2D\0"
3484+ "GL_SEPARATE_SPECULAR_COLOR\0"
3485+ "GL_SEPARATE_SPECULAR_COLOR_EXT\0"
3486+ "GL_SET\0"
3487+ "GL_SHADER_OBJECT_ARB\0"
3488+ "GL_SHADER_SOURCE_LENGTH\0"
3489+ "GL_SHADER_TYPE\0"
3490+ "GL_SHADE_MODEL\0"
3491+ "GL_SHADING_LANGUAGE_VERSION\0"
3492+ "GL_SHADOW_AMBIENT_SGIX\0"
3493+ "GL_SHARED_TEXTURE_PALETTE_EXT\0"
3494+ "GL_SHININESS\0"
3495+ "GL_SHORT\0"
3496+ "GL_SINGLE_COLOR\0"
3497+ "GL_SINGLE_COLOR_EXT\0"
3498+ "GL_SLICE_ACCUM_SUN\0"
3499+ "GL_SMOOTH\0"
3500+ "GL_SMOOTH_LINE_WIDTH_GRANULARITY\0"
3501+ "GL_SMOOTH_LINE_WIDTH_RANGE\0"
3502+ "GL_SMOOTH_POINT_SIZE_GRANULARITY\0"
3503+ "GL_SMOOTH_POINT_SIZE_RANGE\0"
3504+ "GL_SOURCE0_ALPHA\0"
3505+ "GL_SOURCE0_ALPHA_ARB\0"
3506+ "GL_SOURCE0_ALPHA_EXT\0"
3507+ "GL_SOURCE0_RGB\0"
3508+ "GL_SOURCE0_RGB_ARB\0"
3509+ "GL_SOURCE0_RGB_EXT\0"
3510+ "GL_SOURCE1_ALPHA\0"
3511+ "GL_SOURCE1_ALPHA_ARB\0"
3512+ "GL_SOURCE1_ALPHA_EXT\0"
3513+ "GL_SOURCE1_RGB\0"
3514+ "GL_SOURCE1_RGB_ARB\0"
3515+ "GL_SOURCE1_RGB_EXT\0"
3516+ "GL_SOURCE2_ALPHA\0"
3517+ "GL_SOURCE2_ALPHA_ARB\0"
3518+ "GL_SOURCE2_ALPHA_EXT\0"
3519+ "GL_SOURCE2_RGB\0"
3520+ "GL_SOURCE2_RGB_ARB\0"
3521+ "GL_SOURCE2_RGB_EXT\0"
3522+ "GL_SOURCE3_ALPHA_NV\0"
3523+ "GL_SOURCE3_RGB_NV\0"
3524+ "GL_SPECULAR\0"
3525+ "GL_SPHERE_MAP\0"
3526+ "GL_SPOT_CUTOFF\0"
3527+ "GL_SPOT_DIRECTION\0"
3528+ "GL_SPOT_EXPONENT\0"
3529+ "GL_SRC0_ALPHA\0"
3530+ "GL_SRC0_RGB\0"
3531+ "GL_SRC1_ALPHA\0"
3532+ "GL_SRC1_RGB\0"
3533+ "GL_SRC2_ALPHA\0"
3534+ "GL_SRC2_RGB\0"
3535+ "GL_SRC_ALPHA\0"
3536+ "GL_SRC_ALPHA_SATURATE\0"
3537+ "GL_SRC_COLOR\0"
3538+ "GL_STACK_OVERFLOW\0"
3539+ "GL_STACK_UNDERFLOW\0"
3540+ "GL_STATIC_COPY\0"
3541+ "GL_STATIC_COPY_ARB\0"
3542+ "GL_STATIC_DRAW\0"
3543+ "GL_STATIC_DRAW_ARB\0"
3544+ "GL_STATIC_READ\0"
3545+ "GL_STATIC_READ_ARB\0"
3546+ "GL_STENCIL\0"
3547+ "GL_STENCIL_ATTACHMENT_EXT\0"
3548+ "GL_STENCIL_BACK_FAIL\0"
3549+ "GL_STENCIL_BACK_FUNC\0"
3550+ "GL_STENCIL_BACK_PASS_DEPTH_FAIL\0"
3551+ "GL_STENCIL_BACK_PASS_DEPTH_PASS\0"
3552+ "GL_STENCIL_BACK_REF\0"
3553+ "GL_STENCIL_BACK_VALUE_MASK\0"
3554+ "GL_STENCIL_BACK_WRITEMASK\0"
3555+ "GL_STENCIL_BITS\0"
3556+ "GL_STENCIL_BUFFER_BIT\0"
3557+ "GL_STENCIL_CLEAR_VALUE\0"
3558+ "GL_STENCIL_FAIL\0"
3559+ "GL_STENCIL_FUNC\0"
3560+ "GL_STENCIL_INDEX\0"
3561+ "GL_STENCIL_INDEX16_EXT\0"
3562+ "GL_STENCIL_INDEX1_EXT\0"
3563+ "GL_STENCIL_INDEX4_EXT\0"
3564+ "GL_STENCIL_INDEX8_EXT\0"
3565+ "GL_STENCIL_INDEX_EXT\0"
3566+ "GL_STENCIL_PASS_DEPTH_FAIL\0"
3567+ "GL_STENCIL_PASS_DEPTH_PASS\0"
3568+ "GL_STENCIL_REF\0"
3569+ "GL_STENCIL_TEST\0"
3570+ "GL_STENCIL_TEST_TWO_SIDE_EXT\0"
3571+ "GL_STENCIL_VALUE_MASK\0"
3572+ "GL_STENCIL_WRITEMASK\0"
3573+ "GL_STEREO\0"
3574+ "GL_STREAM_COPY\0"
3575+ "GL_STREAM_COPY_ARB\0"
3576+ "GL_STREAM_DRAW\0"
3577+ "GL_STREAM_DRAW_ARB\0"
3578+ "GL_STREAM_READ\0"
3579+ "GL_STREAM_READ_ARB\0"
3580+ "GL_SUBPIXEL_BITS\0"
3581+ "GL_SUBTRACT\0"
3582+ "GL_SUBTRACT_ARB\0"
3583+ "GL_T\0"
3584+ "GL_T2F_C3F_V3F\0"
3585+ "GL_T2F_C4F_N3F_V3F\0"
3586+ "GL_T2F_C4UB_V3F\0"
3587+ "GL_T2F_N3F_V3F\0"
3588+ "GL_T2F_V3F\0"
3589+ "GL_T4F_C4F_N3F_V4F\0"
3590+ "GL_T4F_V4F\0"
3591+ "GL_TABLE_TOO_LARGE_EXT\0"
3592+ "GL_TEXTURE\0"
3593+ "GL_TEXTURE0\0"
3594+ "GL_TEXTURE0_ARB\0"
3595+ "GL_TEXTURE1\0"
3596+ "GL_TEXTURE10\0"
3597+ "GL_TEXTURE10_ARB\0"
3598+ "GL_TEXTURE11\0"
3599+ "GL_TEXTURE11_ARB\0"
3600+ "GL_TEXTURE12\0"
3601+ "GL_TEXTURE12_ARB\0"
3602+ "GL_TEXTURE13\0"
3603+ "GL_TEXTURE13_ARB\0"
3604+ "GL_TEXTURE14\0"
3605+ "GL_TEXTURE14_ARB\0"
3606+ "GL_TEXTURE15\0"
3607+ "GL_TEXTURE15_ARB\0"
3608+ "GL_TEXTURE16\0"
3609+ "GL_TEXTURE16_ARB\0"
3610+ "GL_TEXTURE17\0"
3611+ "GL_TEXTURE17_ARB\0"
3612+ "GL_TEXTURE18\0"
3613+ "GL_TEXTURE18_ARB\0"
3614+ "GL_TEXTURE19\0"
3615+ "GL_TEXTURE19_ARB\0"
3616+ "GL_TEXTURE1_ARB\0"
3617+ "GL_TEXTURE2\0"
3618+ "GL_TEXTURE20\0"
3619+ "GL_TEXTURE20_ARB\0"
3620+ "GL_TEXTURE21\0"
3621+ "GL_TEXTURE21_ARB\0"
3622+ "GL_TEXTURE22\0"
3623+ "GL_TEXTURE22_ARB\0"
3624+ "GL_TEXTURE23\0"
3625+ "GL_TEXTURE23_ARB\0"
3626+ "GL_TEXTURE24\0"
3627+ "GL_TEXTURE24_ARB\0"
3628+ "GL_TEXTURE25\0"
3629+ "GL_TEXTURE25_ARB\0"
3630+ "GL_TEXTURE26\0"
3631+ "GL_TEXTURE26_ARB\0"
3632+ "GL_TEXTURE27\0"
3633+ "GL_TEXTURE27_ARB\0"
3634+ "GL_TEXTURE28\0"
3635+ "GL_TEXTURE28_ARB\0"
3636+ "GL_TEXTURE29\0"
3637+ "GL_TEXTURE29_ARB\0"
3638+ "GL_TEXTURE2_ARB\0"
3639+ "GL_TEXTURE3\0"
3640+ "GL_TEXTURE30\0"
3641+ "GL_TEXTURE30_ARB\0"
3642+ "GL_TEXTURE31\0"
3643+ "GL_TEXTURE31_ARB\0"
3644+ "GL_TEXTURE3_ARB\0"
3645+ "GL_TEXTURE4\0"
3646+ "GL_TEXTURE4_ARB\0"
3647+ "GL_TEXTURE5\0"
3648+ "GL_TEXTURE5_ARB\0"
3649+ "GL_TEXTURE6\0"
3650+ "GL_TEXTURE6_ARB\0"
3651+ "GL_TEXTURE7\0"
3652+ "GL_TEXTURE7_ARB\0"
3653+ "GL_TEXTURE8\0"
3654+ "GL_TEXTURE8_ARB\0"
3655+ "GL_TEXTURE9\0"
3656+ "GL_TEXTURE9_ARB\0"
3657+ "GL_TEXTURE_1D\0"
3658+ "GL_TEXTURE_1D_ARRAY_EXT\0"
3659+ "GL_TEXTURE_2D\0"
3660+ "GL_TEXTURE_2D_ARRAY_EXT\0"
3661+ "GL_TEXTURE_3D\0"
3662+ "GL_TEXTURE_ALPHA_SIZE\0"
3663+ "GL_TEXTURE_ALPHA_SIZE_EXT\0"
3664+ "GL_TEXTURE_BASE_LEVEL\0"
3665+ "GL_TEXTURE_BINDING_1D\0"
3666+ "GL_TEXTURE_BINDING_1D_ARRAY_EXT\0"
3667+ "GL_TEXTURE_BINDING_2D\0"
3668+ "GL_TEXTURE_BINDING_2D_ARRAY_EXT\0"
3669+ "GL_TEXTURE_BINDING_3D\0"
3670+ "GL_TEXTURE_BINDING_CUBE_MAP\0"
3671+ "GL_TEXTURE_BINDING_CUBE_MAP_ARB\0"
3672+ "GL_TEXTURE_BINDING_RECTANGLE_ARB\0"
3673+ "GL_TEXTURE_BINDING_RECTANGLE_NV\0"
3674+ "GL_TEXTURE_BIT\0"
3675+ "GL_TEXTURE_BLUE_SIZE\0"
3676+ "GL_TEXTURE_BLUE_SIZE_EXT\0"
3677+ "GL_TEXTURE_BORDER\0"
3678+ "GL_TEXTURE_BORDER_COLOR\0"
3679+ "GL_TEXTURE_CLIPMAP_CENTER_SGIX\0"
3680+ "GL_TEXTURE_CLIPMAP_DEPTH_SGIX\0"
3681+ "GL_TEXTURE_CLIPMAP_FRAME_SGIX\0"
3682+ "GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX\0"
3683+ "GL_TEXTURE_CLIPMAP_OFFSET_SGIX\0"
3684+ "GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX\0"
3685+ "GL_TEXTURE_COLOR_TABLE_SGI\0"
3686+ "GL_TEXTURE_COLOR_WRITEMASK_SGIS\0"
3687+ "GL_TEXTURE_COMPARE_FAIL_VALUE_ARB\0"
3688+ "GL_TEXTURE_COMPARE_FUNC\0"
3689+ "GL_TEXTURE_COMPARE_FUNC_ARB\0"
3690+ "GL_TEXTURE_COMPARE_MODE\0"
3691+ "GL_TEXTURE_COMPARE_MODE_ARB\0"
3692+ "GL_TEXTURE_COMPARE_OPERATOR_SGIX\0"
3693+ "GL_TEXTURE_COMPARE_SGIX\0"
3694+ "GL_TEXTURE_COMPONENTS\0"
3695+ "GL_TEXTURE_COMPRESSED\0"
3696+ "GL_TEXTURE_COMPRESSED_ARB\0"
3697+ "GL_TEXTURE_COMPRESSED_FORMATS_ARB\0"
3698+ "GL_TEXTURE_COMPRESSED_IMAGE_SIZE\0"
3699+ "GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB\0"
3700+ "GL_TEXTURE_COMPRESSION_HINT\0"
3701+ "GL_TEXTURE_COMPRESSION_HINT_ARB\0"
3702+ "GL_TEXTURE_COORD_ARRAY\0"
3703+ "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING\0"
3704+ "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB\0"
3705+ "GL_TEXTURE_COORD_ARRAY_POINTER\0"
3706+ "GL_TEXTURE_COORD_ARRAY_SIZE\0"
3707+ "GL_TEXTURE_COORD_ARRAY_STRIDE\0"
3708+ "GL_TEXTURE_COORD_ARRAY_TYPE\0"
3709+ "GL_TEXTURE_CUBE_MAP\0"
3710+ "GL_TEXTURE_CUBE_MAP_ARB\0"
3711+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_X\0"
3712+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB\0"
3713+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y\0"
3714+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB\0"
3715+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z\0"
3716+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB\0"
3717+ "GL_TEXTURE_CUBE_MAP_POSITIVE_X\0"
3718+ "GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB\0"
3719+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Y\0"
3720+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB\0"
3721+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Z\0"
3722+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB\0"
3723+ "GL_TEXTURE_DEPTH\0"
3724+ "GL_TEXTURE_DEPTH_SIZE\0"
3725+ "GL_TEXTURE_DEPTH_SIZE_ARB\0"
3726+ "GL_TEXTURE_ENV\0"
3727+ "GL_TEXTURE_ENV_COLOR\0"
3728+ "GL_TEXTURE_ENV_MODE\0"
3729+ "GL_TEXTURE_FILTER_CONTROL\0"
3730+ "GL_TEXTURE_GEN_MODE\0"
3731+ "GL_TEXTURE_GEN_Q\0"
3732+ "GL_TEXTURE_GEN_R\0"
3733+ "GL_TEXTURE_GEN_S\0"
3734+ "GL_TEXTURE_GEN_T\0"
3735+ "GL_TEXTURE_GEQUAL_R_SGIX\0"
3736+ "GL_TEXTURE_GREEN_SIZE\0"
3737+ "GL_TEXTURE_GREEN_SIZE_EXT\0"
3738+ "GL_TEXTURE_HEIGHT\0"
3739+ "GL_TEXTURE_INDEX_SIZE_EXT\0"
3740+ "GL_TEXTURE_INTENSITY_SIZE\0"
3741+ "GL_TEXTURE_INTENSITY_SIZE_EXT\0"
3742+ "GL_TEXTURE_INTERNAL_FORMAT\0"
3743+ "GL_TEXTURE_LEQUAL_R_SGIX\0"
3744+ "GL_TEXTURE_LOD_BIAS\0"
3745+ "GL_TEXTURE_LOD_BIAS_EXT\0"
3746+ "GL_TEXTURE_LOD_BIAS_R_SGIX\0"
3747+ "GL_TEXTURE_LOD_BIAS_S_SGIX\0"
3748+ "GL_TEXTURE_LOD_BIAS_T_SGIX\0"
3749+ "GL_TEXTURE_LUMINANCE_SIZE\0"
3750+ "GL_TEXTURE_LUMINANCE_SIZE_EXT\0"
3751+ "GL_TEXTURE_MAG_FILTER\0"
3752+ "GL_TEXTURE_MATRIX\0"
3753+ "GL_TEXTURE_MAX_ANISOTROPY_EXT\0"
3754+ "GL_TEXTURE_MAX_CLAMP_R_SGIX\0"
3755+ "GL_TEXTURE_MAX_CLAMP_S_SGIX\0"
3756+ "GL_TEXTURE_MAX_CLAMP_T_SGIX\0"
3757+ "GL_TEXTURE_MAX_LEVEL\0"
3758+ "GL_TEXTURE_MAX_LOD\0"
3759+ "GL_TEXTURE_MIN_FILTER\0"
3760+ "GL_TEXTURE_MIN_LOD\0"
3761+ "GL_TEXTURE_PRIORITY\0"
3762+ "GL_TEXTURE_RECTANGLE_ARB\0"
3763+ "GL_TEXTURE_RECTANGLE_NV\0"
3764+ "GL_TEXTURE_RED_SIZE\0"
3765+ "GL_TEXTURE_RED_SIZE_EXT\0"
3766+ "GL_TEXTURE_RESIDENT\0"
3767+ "GL_TEXTURE_STACK_DEPTH\0"
3768+ "GL_TEXTURE_TOO_LARGE_EXT\0"
3769+ "GL_TEXTURE_UNSIGNED_REMAP_MODE_NV\0"
3770+ "GL_TEXTURE_WIDTH\0"
3771+ "GL_TEXTURE_WRAP_R\0"
3772+ "GL_TEXTURE_WRAP_S\0"
3773+ "GL_TEXTURE_WRAP_T\0"
3774+ "GL_TIME_ELAPSED_EXT\0"
3775+ "GL_TRACK_MATRIX_NV\0"
3776+ "GL_TRACK_MATRIX_TRANSFORM_NV\0"
3777+ "GL_TRANSFORM_BIT\0"
3778+ "GL_TRANSPOSE_COLOR_MATRIX\0"
3779+ "GL_TRANSPOSE_COLOR_MATRIX_ARB\0"
3780+ "GL_TRANSPOSE_CURRENT_MATRIX_ARB\0"
3781+ "GL_TRANSPOSE_MODELVIEW_MATRIX\0"
3782+ "GL_TRANSPOSE_MODELVIEW_MATRIX_ARB\0"
3783+ "GL_TRANSPOSE_NV\0"
3784+ "GL_TRANSPOSE_PROJECTION_MATRIX\0"
3785+ "GL_TRANSPOSE_PROJECTION_MATRIX_ARB\0"
3786+ "GL_TRANSPOSE_TEXTURE_MATRIX\0"
3787+ "GL_TRANSPOSE_TEXTURE_MATRIX_ARB\0"
3788+ "GL_TRIANGLES\0"
3789+ "GL_TRIANGLE_FAN\0"
3790+ "GL_TRIANGLE_MESH_SUN\0"
3791+ "GL_TRIANGLE_STRIP\0"
3792+ "GL_TRUE\0"
3793+ "GL_UNPACK_ALIGNMENT\0"
3794+ "GL_UNPACK_IMAGE_HEIGHT\0"
3795+ "GL_UNPACK_LSB_FIRST\0"
3796+ "GL_UNPACK_ROW_LENGTH\0"
3797+ "GL_UNPACK_SKIP_IMAGES\0"
3798+ "GL_UNPACK_SKIP_PIXELS\0"
3799+ "GL_UNPACK_SKIP_ROWS\0"
3800+ "GL_UNPACK_SWAP_BYTES\0"
3801+ "GL_UNSIGNED_BYTE\0"
3802+ "GL_UNSIGNED_BYTE_2_3_3_REV\0"
3803+ "GL_UNSIGNED_BYTE_3_3_2\0"
3804+ "GL_UNSIGNED_INT\0"
3805+ "GL_UNSIGNED_INT_10_10_10_2\0"
3806+ "GL_UNSIGNED_INT_24_8_NV\0"
3807+ "GL_UNSIGNED_INT_2_10_10_10_REV\0"
3808+ "GL_UNSIGNED_INT_8_8_8_8\0"
3809+ "GL_UNSIGNED_INT_8_8_8_8_REV\0"
3810+ "GL_UNSIGNED_SHORT\0"
3811+ "GL_UNSIGNED_SHORT_1_5_5_5_REV\0"
3812+ "GL_UNSIGNED_SHORT_4_4_4_4\0"
3813+ "GL_UNSIGNED_SHORT_4_4_4_4_REV\0"
3814+ "GL_UNSIGNED_SHORT_5_5_5_1\0"
3815+ "GL_UNSIGNED_SHORT_5_6_5\0"
3816+ "GL_UNSIGNED_SHORT_5_6_5_REV\0"
3817+ "GL_UNSIGNED_SHORT_8_8_APPLE\0"
3818+ "GL_UNSIGNED_SHORT_8_8_MESA\0"
3819+ "GL_UNSIGNED_SHORT_8_8_REV_APPLE\0"
3820+ "GL_UNSIGNED_SHORT_8_8_REV_MESA\0"
3821+ "GL_UPPER_LEFT\0"
3822+ "GL_V2F\0"
3823+ "GL_V3F\0"
3824+ "GL_VALIDATE_STATUS\0"
3825+ "GL_VENDOR\0"
3826+ "GL_VERSION\0"
3827+ "GL_VERTEX_ARRAY\0"
3828+ "GL_VERTEX_ARRAY_BINDING_APPLE\0"
3829+ "GL_VERTEX_ARRAY_BUFFER_BINDING\0"
3830+ "GL_VERTEX_ARRAY_BUFFER_BINDING_ARB\0"
3831+ "GL_VERTEX_ARRAY_POINTER\0"
3832+ "GL_VERTEX_ARRAY_SIZE\0"
3833+ "GL_VERTEX_ARRAY_STRIDE\0"
3834+ "GL_VERTEX_ARRAY_TYPE\0"
3835+ "GL_VERTEX_ATTRIB_ARRAY0_NV\0"
3836+ "GL_VERTEX_ATTRIB_ARRAY10_NV\0"
3837+ "GL_VERTEX_ATTRIB_ARRAY11_NV\0"
3838+ "GL_VERTEX_ATTRIB_ARRAY12_NV\0"
3839+ "GL_VERTEX_ATTRIB_ARRAY13_NV\0"
3840+ "GL_VERTEX_ATTRIB_ARRAY14_NV\0"
3841+ "GL_VERTEX_ATTRIB_ARRAY15_NV\0"
3842+ "GL_VERTEX_ATTRIB_ARRAY1_NV\0"
3843+ "GL_VERTEX_ATTRIB_ARRAY2_NV\0"
3844+ "GL_VERTEX_ATTRIB_ARRAY3_NV\0"
3845+ "GL_VERTEX_ATTRIB_ARRAY4_NV\0"
3846+ "GL_VERTEX_ATTRIB_ARRAY5_NV\0"
3847+ "GL_VERTEX_ATTRIB_ARRAY6_NV\0"
3848+ "GL_VERTEX_ATTRIB_ARRAY7_NV\0"
3849+ "GL_VERTEX_ATTRIB_ARRAY8_NV\0"
3850+ "GL_VERTEX_ATTRIB_ARRAY9_NV\0"
3851+ "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\0"
3852+ "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB\0"
3853+ "GL_VERTEX_ATTRIB_ARRAY_ENABLED\0"
3854+ "GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB\0"
3855+ "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED\0"
3856+ "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB\0"
3857+ "GL_VERTEX_ATTRIB_ARRAY_POINTER\0"
3858+ "GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB\0"
3859+ "GL_VERTEX_ATTRIB_ARRAY_SIZE\0"
3860+ "GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB\0"
3861+ "GL_VERTEX_ATTRIB_ARRAY_STRIDE\0"
3862+ "GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB\0"
3863+ "GL_VERTEX_ATTRIB_ARRAY_TYPE\0"
3864+ "GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB\0"
3865+ "GL_VERTEX_BLEND_ARB\0"
3866+ "GL_VERTEX_PROGRAM_ARB\0"
3867+ "GL_VERTEX_PROGRAM_BINDING_NV\0"
3868+ "GL_VERTEX_PROGRAM_NV\0"
3869+ "GL_VERTEX_PROGRAM_POINT_SIZE\0"
3870+ "GL_VERTEX_PROGRAM_POINT_SIZE_ARB\0"
3871+ "GL_VERTEX_PROGRAM_POINT_SIZE_NV\0"
3872+ "GL_VERTEX_PROGRAM_TWO_SIDE\0"
3873+ "GL_VERTEX_PROGRAM_TWO_SIDE_ARB\0"
3874+ "GL_VERTEX_PROGRAM_TWO_SIDE_NV\0"
3875+ "GL_VERTEX_SHADER\0"
3876+ "GL_VERTEX_SHADER_ARB\0"
3877+ "GL_VERTEX_STATE_PROGRAM_NV\0"
3878+ "GL_VIEWPORT\0"
3879+ "GL_VIEWPORT_BIT\0"
3880+ "GL_WEIGHT_ARRAY_ARB\0"
3881+ "GL_WEIGHT_ARRAY_BUFFER_BINDING\0"
3882+ "GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB\0"
3883+ "GL_WEIGHT_ARRAY_POINTER_ARB\0"
3884+ "GL_WEIGHT_ARRAY_SIZE_ARB\0"
3885+ "GL_WEIGHT_ARRAY_STRIDE_ARB\0"
3886+ "GL_WEIGHT_ARRAY_TYPE_ARB\0"
3887+ "GL_WEIGHT_SUM_UNITY_ARB\0"
3888+ "GL_WRAP_BORDER_SUN\0"
3889+ "GL_WRITE_ONLY\0"
3890+ "GL_WRITE_ONLY_ARB\0"
3891+ "GL_XOR\0"
3892+ "GL_YCBCR_422_APPLE\0"
3893+ "GL_YCBCR_MESA\0"
3894+ "GL_ZERO\0"
3895+ "GL_ZOOM_X\0"
3896+ "GL_ZOOM_Y\0"
3897+ ;
3898+
3899+static const enum_elt all_enums[1746] =
3900+{
3901+ { 0, 0x00000600 }, /* GL_2D */
3902+ { 6, 0x00001407 }, /* GL_2_BYTES */
3903+ { 17, 0x00000601 }, /* GL_3D */
3904+ { 23, 0x00000602 }, /* GL_3D_COLOR */
3905+ { 35, 0x00000603 }, /* GL_3D_COLOR_TEXTURE */
3906+ { 55, 0x00001408 }, /* GL_3_BYTES */
3907+ { 66, 0x00000604 }, /* GL_4D_COLOR_TEXTURE */
3908+ { 86, 0x00001409 }, /* GL_4_BYTES */
3909+ { 97, 0x00000100 }, /* GL_ACCUM */
3910+ { 106, 0x00000D5B }, /* GL_ACCUM_ALPHA_BITS */
3911+ { 126, 0x00000D5A }, /* GL_ACCUM_BLUE_BITS */
3912+ { 145, 0x00000200 }, /* GL_ACCUM_BUFFER_BIT */
3913+ { 165, 0x00000B80 }, /* GL_ACCUM_CLEAR_VALUE */
3914+ { 186, 0x00000D59 }, /* GL_ACCUM_GREEN_BITS */
3915+ { 206, 0x00000D58 }, /* GL_ACCUM_RED_BITS */
3916+ { 224, 0x00008B89 }, /* GL_ACTIVE_ATTRIBUTES */
3917+ { 245, 0x00008B8A }, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
3918+ { 276, 0x00008911 }, /* GL_ACTIVE_STENCIL_FACE_EXT */
3919+ { 303, 0x000084E0 }, /* GL_ACTIVE_TEXTURE */
3920+ { 321, 0x000084E0 }, /* GL_ACTIVE_TEXTURE_ARB */
3921+ { 343, 0x00008B86 }, /* GL_ACTIVE_UNIFORMS */
3922+ { 362, 0x00008B87 }, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
3923+ { 391, 0x000086A5 }, /* GL_ACTIVE_VERTEX_UNITS_ARB */
3924+ { 418, 0x00000104 }, /* GL_ADD */
3925+ { 425, 0x00008574 }, /* GL_ADD_SIGNED */
3926+ { 439, 0x00008574 }, /* GL_ADD_SIGNED_ARB */
3927+ { 457, 0x00008574 }, /* GL_ADD_SIGNED_EXT */
3928+ { 475, 0x0000846E }, /* GL_ALIASED_LINE_WIDTH_RANGE */
3929+ { 503, 0x0000846D }, /* GL_ALIASED_POINT_SIZE_RANGE */
3930+ { 531, 0x000FFFFF }, /* GL_ALL_ATTRIB_BITS */
3931+ { 550, 0xFFFFFFFF }, /* GL_ALL_CLIENT_ATTRIB_BITS */
3932+ { 576, 0x00001906 }, /* GL_ALPHA */
3933+ { 585, 0x0000803D }, /* GL_ALPHA12 */
3934+ { 596, 0x0000803D }, /* GL_ALPHA12_EXT */
3935+ { 611, 0x0000803E }, /* GL_ALPHA16 */
3936+ { 622, 0x0000803E }, /* GL_ALPHA16_EXT */
3937+ { 637, 0x0000803B }, /* GL_ALPHA4 */
3938+ { 647, 0x0000803B }, /* GL_ALPHA4_EXT */
3939+ { 661, 0x0000803C }, /* GL_ALPHA8 */
3940+ { 671, 0x0000803C }, /* GL_ALPHA8_EXT */
3941+ { 685, 0x00000D1D }, /* GL_ALPHA_BIAS */
3942+ { 699, 0x00000D55 }, /* GL_ALPHA_BITS */
3943+ { 713, 0x00000D1C }, /* GL_ALPHA_SCALE */
3944+ { 728, 0x00000BC0 }, /* GL_ALPHA_TEST */
3945+ { 742, 0x00000BC1 }, /* GL_ALPHA_TEST_FUNC */
3946+ { 761, 0x00000BC2 }, /* GL_ALPHA_TEST_REF */
3947+ { 779, 0x00000207 }, /* GL_ALWAYS */
3948+ { 789, 0x00001200 }, /* GL_AMBIENT */
3949+ { 800, 0x00001602 }, /* GL_AMBIENT_AND_DIFFUSE */
3950+ { 823, 0x00001501 }, /* GL_AND */
3951+ { 830, 0x00001504 }, /* GL_AND_INVERTED */
3952+ { 846, 0x00001502 }, /* GL_AND_REVERSE */
3953+ { 861, 0x00008892 }, /* GL_ARRAY_BUFFER */
3954+ { 877, 0x00008892 }, /* GL_ARRAY_BUFFER_ARB */
3955+ { 897, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING */
3956+ { 921, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING_ARB */
3957+ { 949, 0x00008B85 }, /* GL_ATTACHED_SHADERS */
3958+ { 969, 0x00008645 }, /* GL_ATTRIB_ARRAY_POINTER_NV */
3959+ { 996, 0x00008623 }, /* GL_ATTRIB_ARRAY_SIZE_NV */
3960+ { 1020, 0x00008624 }, /* GL_ATTRIB_ARRAY_STRIDE_NV */
3961+ { 1046, 0x00008625 }, /* GL_ATTRIB_ARRAY_TYPE_NV */
3962+ { 1070, 0x00000BB0 }, /* GL_ATTRIB_STACK_DEPTH */
3963+ { 1092, 0x00000D80 }, /* GL_AUTO_NORMAL */
3964+ { 1107, 0x00000409 }, /* GL_AUX0 */
3965+ { 1115, 0x0000040A }, /* GL_AUX1 */
3966+ { 1123, 0x0000040B }, /* GL_AUX2 */
3967+ { 1131, 0x0000040C }, /* GL_AUX3 */
3968+ { 1139, 0x00000C00 }, /* GL_AUX_BUFFERS */
3969+ { 1154, 0x00000405 }, /* GL_BACK */
3970+ { 1162, 0x00000402 }, /* GL_BACK_LEFT */
3971+ { 1175, 0x00000403 }, /* GL_BACK_RIGHT */
3972+ { 1189, 0x000080E0 }, /* GL_BGR */
3973+ { 1196, 0x000080E1 }, /* GL_BGRA */
3974+ { 1204, 0x00001A00 }, /* GL_BITMAP */
3975+ { 1214, 0x00000704 }, /* GL_BITMAP_TOKEN */
3976+ { 1230, 0x00000BE2 }, /* GL_BLEND */
3977+ { 1239, 0x00008005 }, /* GL_BLEND_COLOR */
3978+ { 1254, 0x00008005 }, /* GL_BLEND_COLOR_EXT */
3979+ { 1273, 0x00000BE0 }, /* GL_BLEND_DST */
3980+ { 1286, 0x000080CA }, /* GL_BLEND_DST_ALPHA */
3981+ { 1305, 0x000080C8 }, /* GL_BLEND_DST_RGB */
3982+ { 1322, 0x00008009 }, /* GL_BLEND_EQUATION */
3983+ { 1340, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA */
3984+ { 1364, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_EXT */
3985+ { 1392, 0x00008009 }, /* GL_BLEND_EQUATION_EXT */
3986+ { 1414, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_EXT */
3987+ { 1440, 0x00000BE1 }, /* GL_BLEND_SRC */
3988+ { 1453, 0x000080CB }, /* GL_BLEND_SRC_ALPHA */
3989+ { 1472, 0x000080C9 }, /* GL_BLEND_SRC_RGB */
3990+ { 1489, 0x00001905 }, /* GL_BLUE */
3991+ { 1497, 0x00000D1B }, /* GL_BLUE_BIAS */
3992+ { 1510, 0x00000D54 }, /* GL_BLUE_BITS */
3993+ { 1523, 0x00000D1A }, /* GL_BLUE_SCALE */
3994+ { 1537, 0x00008B56 }, /* GL_BOOL */
3995+ { 1545, 0x00008B56 }, /* GL_BOOL_ARB */
3996+ { 1557, 0x00008B57 }, /* GL_BOOL_VEC2 */
3997+ { 1570, 0x00008B57 }, /* GL_BOOL_VEC2_ARB */
3998+ { 1587, 0x00008B58 }, /* GL_BOOL_VEC3 */
3999+ { 1600, 0x00008B58 }, /* GL_BOOL_VEC3_ARB */
4000+ { 1617, 0x00008B59 }, /* GL_BOOL_VEC4 */
4001+ { 1630, 0x00008B59 }, /* GL_BOOL_VEC4_ARB */
4002+ { 1647, 0x000088BB }, /* GL_BUFFER_ACCESS */
4003+ { 1664, 0x000088BB }, /* GL_BUFFER_ACCESS_ARB */
4004+ { 1685, 0x000088BC }, /* GL_BUFFER_MAPPED */
4005+ { 1702, 0x000088BC }, /* GL_BUFFER_MAPPED_ARB */
4006+ { 1723, 0x000088BD }, /* GL_BUFFER_MAP_POINTER */
4007+ { 1745, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_ARB */
4008+ { 1771, 0x00008764 }, /* GL_BUFFER_SIZE */
4009+ { 1786, 0x00008764 }, /* GL_BUFFER_SIZE_ARB */
4010+ { 1805, 0x00008765 }, /* GL_BUFFER_USAGE */
4011+ { 1821, 0x00008765 }, /* GL_BUFFER_USAGE_ARB */
4012+ { 1841, 0x00001400 }, /* GL_BYTE */
4013+ { 1849, 0x00002A24 }, /* GL_C3F_V3F */
4014+ { 1860, 0x00002A26 }, /* GL_C4F_N3F_V3F */
4015+ { 1875, 0x00002A22 }, /* GL_C4UB_V2F */
4016+ { 1887, 0x00002A23 }, /* GL_C4UB_V3F */
4017+ { 1899, 0x00000901 }, /* GL_CCW */
4018+ { 1906, 0x00002900 }, /* GL_CLAMP */
4019+ { 1915, 0x0000812D }, /* GL_CLAMP_TO_BORDER */
4020+ { 1934, 0x0000812D }, /* GL_CLAMP_TO_BORDER_ARB */
4021+ { 1957, 0x0000812D }, /* GL_CLAMP_TO_BORDER_SGIS */
4022+ { 1981, 0x0000812F }, /* GL_CLAMP_TO_EDGE */
4023+ { 1998, 0x0000812F }, /* GL_CLAMP_TO_EDGE_SGIS */
4024+ { 2020, 0x00001500 }, /* GL_CLEAR */
4025+ { 2029, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE */
4026+ { 2054, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE_ARB */
4027+ { 2083, 0xFFFFFFFF }, /* GL_CLIENT_ALL_ATTRIB_BITS */
4028+ { 2109, 0x00000BB1 }, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
4029+ { 2138, 0x00000001 }, /* GL_CLIENT_PIXEL_STORE_BIT */
4030+ { 2164, 0x00000002 }, /* GL_CLIENT_VERTEX_ARRAY_BIT */
4031+ { 2191, 0x00003000 }, /* GL_CLIP_PLANE0 */
4032+ { 2206, 0x00003001 }, /* GL_CLIP_PLANE1 */
4033+ { 2221, 0x00003002 }, /* GL_CLIP_PLANE2 */
4034+ { 2236, 0x00003003 }, /* GL_CLIP_PLANE3 */
4035+ { 2251, 0x00003004 }, /* GL_CLIP_PLANE4 */
4036+ { 2266, 0x00003005 }, /* GL_CLIP_PLANE5 */
4037+ { 2281, 0x000080F0 }, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
4038+ { 2314, 0x00000A00 }, /* GL_COEFF */
4039+ { 2323, 0x00001800 }, /* GL_COLOR */
4040+ { 2332, 0x00008076 }, /* GL_COLOR_ARRAY */
4041+ { 2347, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING */
4042+ { 2377, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING_ARB */
4043+ { 2411, 0x00008090 }, /* GL_COLOR_ARRAY_POINTER */
4044+ { 2434, 0x00008081 }, /* GL_COLOR_ARRAY_SIZE */
4045+ { 2454, 0x00008083 }, /* GL_COLOR_ARRAY_STRIDE */
4046+ { 2476, 0x00008082 }, /* GL_COLOR_ARRAY_TYPE */
4047+ { 2496, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_EXT */
4048+ { 2521, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10_EXT */
4049+ { 2547, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11_EXT */
4050+ { 2573, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12_EXT */
4051+ { 2599, 0x00008CED }, /* GL_COLOR_ATTACHMENT13_EXT */
4052+ { 2625, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14_EXT */
4053+ { 2651, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15_EXT */
4054+ { 2677, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1_EXT */
4055+ { 2702, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2_EXT */
4056+ { 2727, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3_EXT */
4057+ { 2752, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4_EXT */
4058+ { 2777, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5_EXT */
4059+ { 2802, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6_EXT */
4060+ { 2827, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7_EXT */
4061+ { 2852, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8_EXT */
4062+ { 2877, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9_EXT */
4063+ { 2902, 0x00004000 }, /* GL_COLOR_BUFFER_BIT */
4064+ { 2922, 0x00000C22 }, /* GL_COLOR_CLEAR_VALUE */
4065+ { 2943, 0x00001900 }, /* GL_COLOR_INDEX */
4066+ { 2958, 0x00001603 }, /* GL_COLOR_INDEXES */
4067+ { 2975, 0x00000BF2 }, /* GL_COLOR_LOGIC_OP */
4068+ { 2993, 0x00000B57 }, /* GL_COLOR_MATERIAL */
4069+ { 3011, 0x00000B55 }, /* GL_COLOR_MATERIAL_FACE */
4070+ { 3034, 0x00000B56 }, /* GL_COLOR_MATERIAL_PARAMETER */
4071+ { 3062, 0x000080B1 }, /* GL_COLOR_MATRIX */
4072+ { 3078, 0x000080B1 }, /* GL_COLOR_MATRIX_SGI */
4073+ { 3098, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH */
4074+ { 3126, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH_SGI */
4075+ { 3158, 0x00008458 }, /* GL_COLOR_SUM */
4076+ { 3171, 0x00008458 }, /* GL_COLOR_SUM_ARB */
4077+ { 3188, 0x000080D0 }, /* GL_COLOR_TABLE */
4078+ { 3203, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE */
4079+ { 3229, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_EXT */
4080+ { 3259, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_SGI */
4081+ { 3289, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS */
4082+ { 3309, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS_SGI */
4083+ { 3333, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE */
4084+ { 3358, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_EXT */
4085+ { 3387, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_SGI */
4086+ { 3416, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT */
4087+ { 3438, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_EXT */
4088+ { 3464, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_SGI */
4089+ { 3490, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE */
4090+ { 3516, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_EXT */
4091+ { 3546, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_SGI */
4092+ { 3576, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE */
4093+ { 3606, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_EXT */
4094+ { 3640, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_SGI */
4095+ { 3674, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
4096+ { 3704, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_EXT */
4097+ { 3738, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_SGI */
4098+ { 3772, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE */
4099+ { 3796, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_EXT */
4100+ { 3824, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_SGI */
4101+ { 3852, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE */
4102+ { 3873, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE_SGI */
4103+ { 3898, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH */
4104+ { 3919, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_EXT */
4105+ { 3944, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_SGI */
4106+ { 3969, 0x00000C23 }, /* GL_COLOR_WRITEMASK */
4107+ { 3988, 0x00008570 }, /* GL_COMBINE */
4108+ { 3999, 0x00008503 }, /* GL_COMBINE4 */
4109+ { 4011, 0x00008572 }, /* GL_COMBINE_ALPHA */
4110+ { 4028, 0x00008572 }, /* GL_COMBINE_ALPHA_ARB */
4111+ { 4049, 0x00008572 }, /* GL_COMBINE_ALPHA_EXT */
4112+ { 4070, 0x00008570 }, /* GL_COMBINE_ARB */
4113+ { 4085, 0x00008570 }, /* GL_COMBINE_EXT */
4114+ { 4100, 0x00008571 }, /* GL_COMBINE_RGB */
4115+ { 4115, 0x00008571 }, /* GL_COMBINE_RGB_ARB */
4116+ { 4134, 0x00008571 }, /* GL_COMBINE_RGB_EXT */
4117+ { 4153, 0x0000884E }, /* GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT */
4118+ { 4189, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE */
4119+ { 4213, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE_ARB */
4120+ { 4241, 0x00001300 }, /* GL_COMPILE */
4121+ { 4252, 0x00001301 }, /* GL_COMPILE_AND_EXECUTE */
4122+ { 4275, 0x00008B81 }, /* GL_COMPILE_STATUS */
4123+ { 4293, 0x000084E9 }, /* GL_COMPRESSED_ALPHA */
4124+ { 4313, 0x000084E9 }, /* GL_COMPRESSED_ALPHA_ARB */
4125+ { 4337, 0x000084EC }, /* GL_COMPRESSED_INTENSITY */
4126+ { 4361, 0x000084EC }, /* GL_COMPRESSED_INTENSITY_ARB */
4127+ { 4389, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE */
4128+ { 4413, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA */
4129+ { 4443, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA_ARB */
4130+ { 4477, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE_ARB */
4131+ { 4505, 0x000084ED }, /* GL_COMPRESSED_RGB */
4132+ { 4523, 0x000084EE }, /* GL_COMPRESSED_RGBA */
4133+ { 4542, 0x000084EE }, /* GL_COMPRESSED_RGBA_ARB */
4134+ { 4565, 0x000086B1 }, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
4135+ { 4594, 0x000083F1 }, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
4136+ { 4627, 0x000083F2 }, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
4137+ { 4660, 0x000083F3 }, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
4138+ { 4693, 0x000084ED }, /* GL_COMPRESSED_RGB_ARB */
4139+ { 4715, 0x000086B0 }, /* GL_COMPRESSED_RGB_FXT1_3DFX */
4140+ { 4743, 0x000083F0 }, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
4141+ { 4775, 0x000086A3 }, /* GL_COMPRESSED_TEXTURE_FORMATS */
4142+ { 4805, 0x00008576 }, /* GL_CONSTANT */
4143+ { 4817, 0x00008003 }, /* GL_CONSTANT_ALPHA */
4144+ { 4835, 0x00008003 }, /* GL_CONSTANT_ALPHA_EXT */
4145+ { 4857, 0x00008576 }, /* GL_CONSTANT_ARB */
4146+ { 4873, 0x00001207 }, /* GL_CONSTANT_ATTENUATION */
4147+ { 4897, 0x00008151 }, /* GL_CONSTANT_BORDER_HP */
4148+ { 4919, 0x00008001 }, /* GL_CONSTANT_COLOR */
4149+ { 4937, 0x00008001 }, /* GL_CONSTANT_COLOR_EXT */
4150+ { 4959, 0x00008576 }, /* GL_CONSTANT_EXT */
4151+ { 4975, 0x00008010 }, /* GL_CONVOLUTION_1D */
4152+ { 4993, 0x00008011 }, /* GL_CONVOLUTION_2D */
4153+ { 5011, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR */
4154+ { 5039, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR_HP */
4155+ { 5070, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE */
4156+ { 5097, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE_EXT */
4157+ { 5128, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS */
4158+ { 5155, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS_EXT */
4159+ { 5186, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE */
4160+ { 5214, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE_EXT */
4161+ { 5246, 0x00008017 }, /* GL_CONVOLUTION_FORMAT */
4162+ { 5268, 0x00008017 }, /* GL_CONVOLUTION_FORMAT_EXT */
4163+ { 5294, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT */
4164+ { 5316, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT_EXT */
4165+ { 5342, 0x00008018 }, /* GL_CONVOLUTION_WIDTH */
4166+ { 5363, 0x00008018 }, /* GL_CONVOLUTION_WIDTH_EXT */
4167+ { 5388, 0x00008862 }, /* GL_COORD_REPLACE */
4168+ { 5405, 0x00008862 }, /* GL_COORD_REPLACE_ARB */
4169+ { 5426, 0x00008862 }, /* GL_COORD_REPLACE_NV */
4170+ { 5446, 0x00001503 }, /* GL_COPY */
4171+ { 5454, 0x0000150C }, /* GL_COPY_INVERTED */
4172+ { 5471, 0x00000706 }, /* GL_COPY_PIXEL_TOKEN */
4173+ { 5491, 0x00000B44 }, /* GL_CULL_FACE */
4174+ { 5504, 0x00000B45 }, /* GL_CULL_FACE_MODE */
4175+ { 5522, 0x000081AA }, /* GL_CULL_VERTEX_EXT */
4176+ { 5541, 0x000081AC }, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
4177+ { 5573, 0x000081AB }, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
4178+ { 5608, 0x00008626 }, /* GL_CURRENT_ATTRIB_NV */
4179+ { 5629, 0x00000001 }, /* GL_CURRENT_BIT */
4180+ { 5644, 0x00000B00 }, /* GL_CURRENT_COLOR */
4181+ { 5661, 0x00008453 }, /* GL_CURRENT_FOG_COORD */
4182+ { 5682, 0x00008453 }, /* GL_CURRENT_FOG_COORDINATE */
4183+ { 5708, 0x00000B01 }, /* GL_CURRENT_INDEX */
4184+ { 5725, 0x00008641 }, /* GL_CURRENT_MATRIX_ARB */
4185+ { 5747, 0x00008845 }, /* GL_CURRENT_MATRIX_INDEX_ARB */
4186+ { 5775, 0x00008641 }, /* GL_CURRENT_MATRIX_NV */
4187+ { 5796, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
4188+ { 5830, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_NV */
4189+ { 5863, 0x00000B02 }, /* GL_CURRENT_NORMAL */
4190+ { 5881, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_ARB */
4191+ { 5911, 0x00008B8D }, /* GL_CURRENT_PROGRAM */
4192+ { 5930, 0x00008865 }, /* GL_CURRENT_QUERY */
4193+ { 5947, 0x00008865 }, /* GL_CURRENT_QUERY_ARB */
4194+ { 5968, 0x00000B04 }, /* GL_CURRENT_RASTER_COLOR */
4195+ { 5992, 0x00000B09 }, /* GL_CURRENT_RASTER_DISTANCE */
4196+ { 6019, 0x00000B05 }, /* GL_CURRENT_RASTER_INDEX */
4197+ { 6043, 0x00000B07 }, /* GL_CURRENT_RASTER_POSITION */
4198+ { 6070, 0x00000B08 }, /* GL_CURRENT_RASTER_POSITION_VALID */
4199+ { 6103, 0x00000B06 }, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
4200+ { 6136, 0x00008459 }, /* GL_CURRENT_SECONDARY_COLOR */
4201+ { 6163, 0x00000B03 }, /* GL_CURRENT_TEXTURE_COORDS */
4202+ { 6189, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB */
4203+ { 6214, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB_ARB */
4204+ { 6243, 0x000086A8 }, /* GL_CURRENT_WEIGHT_ARB */
4205+ { 6265, 0x00000900 }, /* GL_CW */
4206+ { 6271, 0x0000875B }, /* GL_DEBUG_ASSERT_MESA */
4207+ { 6292, 0x00008759 }, /* GL_DEBUG_OBJECT_MESA */
4208+ { 6313, 0x0000875A }, /* GL_DEBUG_PRINT_MESA */
4209+ { 6333, 0x00002101 }, /* GL_DECAL */
4210+ { 6342, 0x00001E03 }, /* GL_DECR */
4211+ { 6350, 0x00008508 }, /* GL_DECR_WRAP */
4212+ { 6363, 0x00008508 }, /* GL_DECR_WRAP_EXT */
4213+ { 6380, 0x00008B80 }, /* GL_DELETE_STATUS */
4214+ { 6397, 0x00001801 }, /* GL_DEPTH */
4215+ { 6406, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */
4216+ { 6430, 0x00000D1F }, /* GL_DEPTH_BIAS */
4217+ { 6444, 0x00000D56 }, /* GL_DEPTH_BITS */
4218+ { 6458, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */
4219+ { 6478, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */
4220+ { 6503, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */
4221+ { 6523, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */
4222+ { 6541, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */
4223+ { 6562, 0x00001902 }, /* GL_DEPTH_COMPONENT */
4224+ { 6581, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */
4225+ { 6602, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */
4226+ { 6627, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */
4227+ { 6653, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */
4228+ { 6674, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */
4229+ { 6699, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */
4230+ { 6725, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */
4231+ { 6746, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */
4232+ { 6771, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */
4233+ { 6797, 0x00000B74 }, /* GL_DEPTH_FUNC */
4234+ { 6811, 0x00000B70 }, /* GL_DEPTH_RANGE */
4235+ { 6826, 0x00000D1E }, /* GL_DEPTH_SCALE */
4236+ { 6841, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */
4237+ { 6861, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
4238+ { 6889, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
4239+ { 6917, 0x00000B71 }, /* GL_DEPTH_TEST */
4240+ { 6931, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */
4241+ { 6953, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */
4242+ { 6979, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */
4243+ { 6998, 0x00001201 }, /* GL_DIFFUSE */
4244+ { 7009, 0x00000BD0 }, /* GL_DITHER */
4245+ { 7019, 0x00000A02 }, /* GL_DOMAIN */
4246+ { 7029, 0x00001100 }, /* GL_DONT_CARE */
4247+ { 7042, 0x000086AE }, /* GL_DOT3_RGB */
4248+ { 7054, 0x000086AF }, /* GL_DOT3_RGBA */
4249+ { 7067, 0x000086AF }, /* GL_DOT3_RGBA_ARB */
4250+ { 7084, 0x00008741 }, /* GL_DOT3_RGBA_EXT */
4251+ { 7101, 0x000086AE }, /* GL_DOT3_RGB_ARB */
4252+ { 7117, 0x00008740 }, /* GL_DOT3_RGB_EXT */
4253+ { 7133, 0x0000140A }, /* GL_DOUBLE */
4254+ { 7143, 0x00000C32 }, /* GL_DOUBLEBUFFER */
4255+ { 7159, 0x00000C01 }, /* GL_DRAW_BUFFER */
4256+ { 7174, 0x00008825 }, /* GL_DRAW_BUFFER0 */
4257+ { 7190, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */
4258+ { 7210, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */
4259+ { 7230, 0x00008826 }, /* GL_DRAW_BUFFER1 */
4260+ { 7246, 0x0000882F }, /* GL_DRAW_BUFFER10 */
4261+ { 7263, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */
4262+ { 7284, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */
4263+ { 7305, 0x00008830 }, /* GL_DRAW_BUFFER11 */
4264+ { 7322, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */
4265+ { 7343, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */
4266+ { 7364, 0x00008831 }, /* GL_DRAW_BUFFER12 */
4267+ { 7381, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */
4268+ { 7402, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */
4269+ { 7423, 0x00008832 }, /* GL_DRAW_BUFFER13 */
4270+ { 7440, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */
4271+ { 7461, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */
4272+ { 7482, 0x00008833 }, /* GL_DRAW_BUFFER14 */
4273+ { 7499, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */
4274+ { 7520, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */
4275+ { 7541, 0x00008834 }, /* GL_DRAW_BUFFER15 */
4276+ { 7558, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */
4277+ { 7579, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */
4278+ { 7600, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */
4279+ { 7620, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */
4280+ { 7640, 0x00008827 }, /* GL_DRAW_BUFFER2 */
4281+ { 7656, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */
4282+ { 7676, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */
4283+ { 7696, 0x00008828 }, /* GL_DRAW_BUFFER3 */
4284+ { 7712, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */
4285+ { 7732, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */
4286+ { 7752, 0x00008829 }, /* GL_DRAW_BUFFER4 */
4287+ { 7768, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */
4288+ { 7788, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */
4289+ { 7808, 0x0000882A }, /* GL_DRAW_BUFFER5 */
4290+ { 7824, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */
4291+ { 7844, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */
4292+ { 7864, 0x0000882B }, /* GL_DRAW_BUFFER6 */
4293+ { 7880, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */
4294+ { 7900, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */
4295+ { 7920, 0x0000882C }, /* GL_DRAW_BUFFER7 */
4296+ { 7936, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */
4297+ { 7956, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */
4298+ { 7976, 0x0000882D }, /* GL_DRAW_BUFFER8 */
4299+ { 7992, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */
4300+ { 8012, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */
4301+ { 8032, 0x0000882E }, /* GL_DRAW_BUFFER9 */
4302+ { 8048, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */
4303+ { 8068, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */
4304+ { 8088, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
4305+ { 8120, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */
4306+ { 8144, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */
4307+ { 8164, 0x00000304 }, /* GL_DST_ALPHA */
4308+ { 8177, 0x00000306 }, /* GL_DST_COLOR */
4309+ { 8190, 0x000088EA }, /* GL_DYNAMIC_COPY */
4310+ { 8206, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */
4311+ { 8226, 0x000088E8 }, /* GL_DYNAMIC_DRAW */
4312+ { 8242, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */
4313+ { 8262, 0x000088E9 }, /* GL_DYNAMIC_READ */
4314+ { 8278, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */
4315+ { 8298, 0x00000B43 }, /* GL_EDGE_FLAG */
4316+ { 8311, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */
4317+ { 8330, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
4318+ { 8364, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */
4319+ { 8402, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */
4320+ { 8429, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */
4321+ { 8455, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */
4322+ { 8479, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER_ARB */
4323+ { 8507, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
4324+ { 8539, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */
4325+ { 8575, 0x00001600 }, /* GL_EMISSION */
4326+ { 8587, 0x00002000 }, /* GL_ENABLE_BIT */
4327+ { 8601, 0x00000202 }, /* GL_EQUAL */
4328+ { 8610, 0x00001509 }, /* GL_EQUIV */
4329+ { 8619, 0x00010000 }, /* GL_EVAL_BIT */
4330+ { 8631, 0x00000800 }, /* GL_EXP */
4331+ { 8638, 0x00000801 }, /* GL_EXP2 */
4332+ { 8646, 0x00001F03 }, /* GL_EXTENSIONS */
4333+ { 8660, 0x00002400 }, /* GL_EYE_LINEAR */
4334+ { 8674, 0x00002502 }, /* GL_EYE_PLANE */
4335+ { 8687, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */
4336+ { 8712, 0x0000855B }, /* GL_EYE_RADIAL_NV */
4337+ { 8729, 0x00000000 }, /* GL_FALSE */
4338+ { 8738, 0x00001101 }, /* GL_FASTEST */
4339+ { 8749, 0x00001C01 }, /* GL_FEEDBACK */
4340+ { 8761, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */
4341+ { 8788, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */
4342+ { 8812, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */
4343+ { 8836, 0x00001B02 }, /* GL_FILL */
4344+ { 8844, 0x00001D00 }, /* GL_FLAT */
4345+ { 8852, 0x00001406 }, /* GL_FLOAT */
4346+ { 8861, 0x00008B5A }, /* GL_FLOAT_MAT2 */
4347+ { 8875, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */
4348+ { 8893, 0x00008B5B }, /* GL_FLOAT_MAT3 */
4349+ { 8907, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */
4350+ { 8925, 0x00008B5C }, /* GL_FLOAT_MAT4 */
4351+ { 8939, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */
4352+ { 8957, 0x00008B50 }, /* GL_FLOAT_VEC2 */
4353+ { 8971, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */
4354+ { 8989, 0x00008B51 }, /* GL_FLOAT_VEC3 */
4355+ { 9003, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */
4356+ { 9021, 0x00008B52 }, /* GL_FLOAT_VEC4 */
4357+ { 9035, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */
4358+ { 9053, 0x00000B60 }, /* GL_FOG */
4359+ { 9060, 0x00000080 }, /* GL_FOG_BIT */
4360+ { 9071, 0x00000B66 }, /* GL_FOG_COLOR */
4361+ { 9084, 0x00008451 }, /* GL_FOG_COORD */
4362+ { 9097, 0x00008451 }, /* GL_FOG_COORDINATE */
4363+ { 9115, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */
4364+ { 9139, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
4365+ { 9178, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */
4366+ { 9221, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */
4367+ { 9253, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
4368+ { 9284, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */
4369+ { 9313, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */
4370+ { 9338, 0x00008457 }, /* GL_FOG_COORD_ARRAY */
4371+ { 9357, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */
4372+ { 9391, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */
4373+ { 9418, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */
4374+ { 9444, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */
4375+ { 9468, 0x00008450 }, /* GL_FOG_COORD_SRC */
4376+ { 9485, 0x00000B62 }, /* GL_FOG_DENSITY */
4377+ { 9500, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */
4378+ { 9524, 0x00000B64 }, /* GL_FOG_END */
4379+ { 9535, 0x00000C54 }, /* GL_FOG_HINT */
4380+ { 9547, 0x00000B61 }, /* GL_FOG_INDEX */
4381+ { 9560, 0x00000B65 }, /* GL_FOG_MODE */
4382+ { 9572, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */
4383+ { 9591, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */
4384+ { 9616, 0x00000B63 }, /* GL_FOG_START */
4385+ { 9629, 0x00008452 }, /* GL_FRAGMENT_DEPTH */
4386+ { 9647, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */
4387+ { 9671, 0x00008B30 }, /* GL_FRAGMENT_SHADER */
4388+ { 9690, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */
4389+ { 9713, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
4390+ { 9748, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
4391+ { 9790, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
4392+ { 9832, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
4393+ { 9881, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
4394+ { 9933, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
4395+ { 9977, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
4396+ { 10021, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */
4397+ { 10048, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */
4398+ { 10076, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */
4399+ { 10095, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
4400+ { 10136, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
4401+ { 10177, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
4402+ { 10219, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
4403+ { 10270, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
4404+ { 10308, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
4405+ { 10357, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
4406+ { 10399, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
4407+ { 10431, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
4408+ { 10462, 0x00000404 }, /* GL_FRONT */
4409+ { 10471, 0x00000408 }, /* GL_FRONT_AND_BACK */
4410+ { 10489, 0x00000B46 }, /* GL_FRONT_FACE */
4411+ { 10503, 0x00000400 }, /* GL_FRONT_LEFT */
4412+ { 10517, 0x00000401 }, /* GL_FRONT_RIGHT */
4413+ { 10532, 0x00008006 }, /* GL_FUNC_ADD */
4414+ { 10544, 0x00008006 }, /* GL_FUNC_ADD_EXT */
4415+ { 10560, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */
4416+ { 10585, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */
4417+ { 10614, 0x0000800A }, /* GL_FUNC_SUBTRACT */
4418+ { 10631, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */
4419+ { 10652, 0x00008191 }, /* GL_GENERATE_MIPMAP */
4420+ { 10671, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */
4421+ { 10695, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */
4422+ { 10724, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */
4423+ { 10748, 0x00000206 }, /* GL_GEQUAL */
4424+ { 10758, 0x00008009 }, /* GL_GL_BLEND_EQUATION_RGB */
4425+ { 10783, 0x00008C4A }, /* GL_GL_COMPRESSED_SLUMINANCE */
4426+ { 10811, 0x00008C4B }, /* GL_GL_COMPRESSED_SLUMINANCE_ALPHA */
4427+ { 10845, 0x00008C48 }, /* GL_GL_COMPRESSED_SRGB */
4428+ { 10867, 0x00008C49 }, /* GL_GL_COMPRESSED_SRGB_ALPHA */
4429+ { 10895, 0x0000845F }, /* GL_GL_CURRENT_RASTER_SECONDARY_COLOR */
4430+ { 10932, 0x00008B65 }, /* GL_GL_FLOAT_MAT2x3 */
4431+ { 10951, 0x00008B66 }, /* GL_GL_FLOAT_MAT2x4 */
4432+ { 10970, 0x00008B67 }, /* GL_GL_FLOAT_MAT3x2 */
4433+ { 10989, 0x00008B68 }, /* GL_GL_FLOAT_MAT3x4 */
4434+ { 11008, 0x00008B69 }, /* GL_GL_FLOAT_MAT4x2 */
4435+ { 11027, 0x00008B6A }, /* GL_GL_FLOAT_MAT4x3 */
4436+ { 11046, 0x000088EB }, /* GL_GL_PIXEL_PACK_BUFFER */
4437+ { 11070, 0x000088ED }, /* GL_GL_PIXEL_PACK_BUFFER_BINDING */
4438+ { 11102, 0x000088EC }, /* GL_GL_PIXEL_UNPACK_BUFFER */
4439+ { 11128, 0x000088EF }, /* GL_GL_PIXEL_UNPACK_BUFFER_BINDING */
4440+ { 11162, 0x00008C46 }, /* GL_GL_SLUMINANCE */
4441+ { 11179, 0x00008C47 }, /* GL_GL_SLUMINANCE8 */
4442+ { 11197, 0x00008C45 }, /* GL_GL_SLUMINANCE8_ALPHA8 */
4443+ { 11222, 0x00008C44 }, /* GL_GL_SLUMINANCE_ALPHA */
4444+ { 11245, 0x00008C40 }, /* GL_GL_SRGB */
4445+ { 11256, 0x00008C41 }, /* GL_GL_SRGB8 */
4446+ { 11268, 0x00008C43 }, /* GL_GL_SRGB8_ALPHA8 */
4447+ { 11287, 0x00008C42 }, /* GL_GL_SRGB_ALPHA */
4448+ { 11304, 0x00000204 }, /* GL_GREATER */
4449+ { 11315, 0x00001904 }, /* GL_GREEN */
4450+ { 11324, 0x00000D19 }, /* GL_GREEN_BIAS */
4451+ { 11338, 0x00000D53 }, /* GL_GREEN_BITS */
4452+ { 11352, 0x00000D18 }, /* GL_GREEN_SCALE */
4453+ { 11367, 0x00008000 }, /* GL_HINT_BIT */
4454+ { 11379, 0x00008024 }, /* GL_HISTOGRAM */
4455+ { 11392, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */
4456+ { 11416, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */
4457+ { 11444, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */
4458+ { 11467, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */
4459+ { 11494, 0x00008024 }, /* GL_HISTOGRAM_EXT */
4460+ { 11511, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */
4461+ { 11531, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */
4462+ { 11555, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */
4463+ { 11579, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */
4464+ { 11607, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */
4465+ { 11635, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */
4466+ { 11667, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */
4467+ { 11689, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */
4468+ { 11715, 0x0000802D }, /* GL_HISTOGRAM_SINK */
4469+ { 11733, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */
4470+ { 11755, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */
4471+ { 11774, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */
4472+ { 11797, 0x0000862A }, /* GL_IDENTITY_NV */
4473+ { 11812, 0x00008150 }, /* GL_IGNORE_BORDER_HP */
4474+ { 11832, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
4475+ { 11872, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
4476+ { 11910, 0x00001E02 }, /* GL_INCR */
4477+ { 11918, 0x00008507 }, /* GL_INCR_WRAP */
4478+ { 11931, 0x00008507 }, /* GL_INCR_WRAP_EXT */
4479+ { 11948, 0x00008077 }, /* GL_INDEX_ARRAY */
4480+ { 11963, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */
4481+ { 11993, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */
4482+ { 12027, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */
4483+ { 12050, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */
4484+ { 12072, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */
4485+ { 12092, 0x00000D51 }, /* GL_INDEX_BITS */
4486+ { 12106, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */
4487+ { 12127, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */
4488+ { 12145, 0x00000C30 }, /* GL_INDEX_MODE */
4489+ { 12159, 0x00000D13 }, /* GL_INDEX_OFFSET */
4490+ { 12175, 0x00000D12 }, /* GL_INDEX_SHIFT */
4491+ { 12190, 0x00000C21 }, /* GL_INDEX_WRITEMASK */
4492+ { 12209, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */
4493+ { 12228, 0x00001404 }, /* GL_INT */
4494+ { 12235, 0x00008049 }, /* GL_INTENSITY */
4495+ { 12248, 0x0000804C }, /* GL_INTENSITY12 */
4496+ { 12263, 0x0000804C }, /* GL_INTENSITY12_EXT */
4497+ { 12282, 0x0000804D }, /* GL_INTENSITY16 */
4498+ { 12297, 0x0000804D }, /* GL_INTENSITY16_EXT */
4499+ { 12316, 0x0000804A }, /* GL_INTENSITY4 */
4500+ { 12330, 0x0000804A }, /* GL_INTENSITY4_EXT */
4501+ { 12348, 0x0000804B }, /* GL_INTENSITY8 */
4502+ { 12362, 0x0000804B }, /* GL_INTENSITY8_EXT */
4503+ { 12380, 0x00008049 }, /* GL_INTENSITY_EXT */
4504+ { 12397, 0x00008575 }, /* GL_INTERPOLATE */
4505+ { 12412, 0x00008575 }, /* GL_INTERPOLATE_ARB */
4506+ { 12431, 0x00008575 }, /* GL_INTERPOLATE_EXT */
4507+ { 12450, 0x00008B53 }, /* GL_INT_VEC2 */
4508+ { 12462, 0x00008B53 }, /* GL_INT_VEC2_ARB */
4509+ { 12478, 0x00008B54 }, /* GL_INT_VEC3 */
4510+ { 12490, 0x00008B54 }, /* GL_INT_VEC3_ARB */
4511+ { 12506, 0x00008B55 }, /* GL_INT_VEC4 */
4512+ { 12518, 0x00008B55 }, /* GL_INT_VEC4_ARB */
4513+ { 12534, 0x00000500 }, /* GL_INVALID_ENUM */
4514+ { 12550, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
4515+ { 12587, 0x00000502 }, /* GL_INVALID_OPERATION */
4516+ { 12608, 0x00000501 }, /* GL_INVALID_VALUE */
4517+ { 12625, 0x0000862B }, /* GL_INVERSE_NV */
4518+ { 12639, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */
4519+ { 12663, 0x0000150A }, /* GL_INVERT */
4520+ { 12673, 0x00001E00 }, /* GL_KEEP */
4521+ { 12681, 0x00000406 }, /* GL_LEFT */
4522+ { 12689, 0x00000203 }, /* GL_LEQUAL */
4523+ { 12699, 0x00000201 }, /* GL_LESS */
4524+ { 12707, 0x00004000 }, /* GL_LIGHT0 */
4525+ { 12717, 0x00004001 }, /* GL_LIGHT1 */
4526+ { 12727, 0x00004002 }, /* GL_LIGHT2 */
4527+ { 12737, 0x00004003 }, /* GL_LIGHT3 */
4528+ { 12747, 0x00004004 }, /* GL_LIGHT4 */
4529+ { 12757, 0x00004005 }, /* GL_LIGHT5 */
4530+ { 12767, 0x00004006 }, /* GL_LIGHT6 */
4531+ { 12777, 0x00004007 }, /* GL_LIGHT7 */
4532+ { 12787, 0x00000B50 }, /* GL_LIGHTING */
4533+ { 12799, 0x00000040 }, /* GL_LIGHTING_BIT */
4534+ { 12815, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */
4535+ { 12838, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */
4536+ { 12867, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */
4537+ { 12900, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
4538+ { 12928, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */
4539+ { 12952, 0x00001B01 }, /* GL_LINE */
4540+ { 12960, 0x00002601 }, /* GL_LINEAR */
4541+ { 12970, 0x00001208 }, /* GL_LINEAR_ATTENUATION */
4542+ { 12992, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
4543+ { 13022, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
4544+ { 13053, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */
4545+ { 13077, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */
4546+ { 13102, 0x00000001 }, /* GL_LINES */
4547+ { 13111, 0x00000004 }, /* GL_LINE_BIT */
4548+ { 13123, 0x00000002 }, /* GL_LINE_LOOP */
4549+ { 13136, 0x00000707 }, /* GL_LINE_RESET_TOKEN */
4550+ { 13156, 0x00000B20 }, /* GL_LINE_SMOOTH */
4551+ { 13171, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */
4552+ { 13191, 0x00000B24 }, /* GL_LINE_STIPPLE */
4553+ { 13207, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */
4554+ { 13231, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */
4555+ { 13254, 0x00000003 }, /* GL_LINE_STRIP */
4556+ { 13268, 0x00000702 }, /* GL_LINE_TOKEN */
4557+ { 13282, 0x00000B21 }, /* GL_LINE_WIDTH */
4558+ { 13296, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */
4559+ { 13322, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */
4560+ { 13342, 0x00008B82 }, /* GL_LINK_STATUS */
4561+ { 13357, 0x00000B32 }, /* GL_LIST_BASE */
4562+ { 13370, 0x00020000 }, /* GL_LIST_BIT */
4563+ { 13382, 0x00000B33 }, /* GL_LIST_INDEX */
4564+ { 13396, 0x00000B30 }, /* GL_LIST_MODE */
4565+ { 13409, 0x00000101 }, /* GL_LOAD */
4566+ { 13417, 0x00000BF1 }, /* GL_LOGIC_OP */
4567+ { 13429, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */
4568+ { 13446, 0x00008CA1 }, /* GL_LOWER_LEFT */
4569+ { 13460, 0x00001909 }, /* GL_LUMINANCE */
4570+ { 13473, 0x00008041 }, /* GL_LUMINANCE12 */
4571+ { 13488, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */
4572+ { 13511, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */
4573+ { 13538, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */
4574+ { 13560, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */
4575+ { 13586, 0x00008041 }, /* GL_LUMINANCE12_EXT */
4576+ { 13605, 0x00008042 }, /* GL_LUMINANCE16 */
4577+ { 13620, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */
4578+ { 13643, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */
4579+ { 13670, 0x00008042 }, /* GL_LUMINANCE16_EXT */
4580+ { 13689, 0x0000803F }, /* GL_LUMINANCE4 */
4581+ { 13703, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */
4582+ { 13724, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */
4583+ { 13749, 0x0000803F }, /* GL_LUMINANCE4_EXT */
4584+ { 13767, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */
4585+ { 13788, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */
4586+ { 13813, 0x00008040 }, /* GL_LUMINANCE8 */
4587+ { 13827, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */
4588+ { 13848, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */
4589+ { 13873, 0x00008040 }, /* GL_LUMINANCE8_EXT */
4590+ { 13891, 0x0000190A }, /* GL_LUMINANCE_ALPHA */
4591+ { 13910, 0x00000D90 }, /* GL_MAP1_COLOR_4 */
4592+ { 13926, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */
4593+ { 13946, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */
4594+ { 13968, 0x00000D91 }, /* GL_MAP1_INDEX */
4595+ { 13982, 0x00000D92 }, /* GL_MAP1_NORMAL */
4596+ { 13997, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */
4597+ { 14021, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */
4598+ { 14045, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */
4599+ { 14069, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */
4600+ { 14093, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */
4601+ { 14110, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */
4602+ { 14127, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
4603+ { 14155, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
4604+ { 14184, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
4605+ { 14213, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
4606+ { 14242, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
4607+ { 14271, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
4608+ { 14300, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
4609+ { 14329, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
4610+ { 14357, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
4611+ { 14385, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
4612+ { 14413, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
4613+ { 14441, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
4614+ { 14469, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
4615+ { 14497, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
4616+ { 14525, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
4617+ { 14553, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
4618+ { 14581, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */
4619+ { 14597, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */
4620+ { 14617, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */
4621+ { 14639, 0x00000DB1 }, /* GL_MAP2_INDEX */
4622+ { 14653, 0x00000DB2 }, /* GL_MAP2_NORMAL */
4623+ { 14668, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */
4624+ { 14692, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */
4625+ { 14716, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */
4626+ { 14740, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */
4627+ { 14764, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */
4628+ { 14781, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */
4629+ { 14798, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
4630+ { 14826, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
4631+ { 14855, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
4632+ { 14884, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
4633+ { 14913, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
4634+ { 14942, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
4635+ { 14971, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
4636+ { 15000, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
4637+ { 15028, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
4638+ { 15056, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
4639+ { 15084, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
4640+ { 15112, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
4641+ { 15140, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
4642+ { 15168, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */
4643+ { 15196, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
4644+ { 15224, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
4645+ { 15252, 0x00000D10 }, /* GL_MAP_COLOR */
4646+ { 15265, 0x00000D11 }, /* GL_MAP_STENCIL */
4647+ { 15280, 0x000088C0 }, /* GL_MATRIX0_ARB */
4648+ { 15295, 0x00008630 }, /* GL_MATRIX0_NV */
4649+ { 15309, 0x000088CA }, /* GL_MATRIX10_ARB */
4650+ { 15325, 0x000088CB }, /* GL_MATRIX11_ARB */
4651+ { 15341, 0x000088CC }, /* GL_MATRIX12_ARB */
4652+ { 15357, 0x000088CD }, /* GL_MATRIX13_ARB */
4653+ { 15373, 0x000088CE }, /* GL_MATRIX14_ARB */
4654+ { 15389, 0x000088CF }, /* GL_MATRIX15_ARB */
4655+ { 15405, 0x000088D0 }, /* GL_MATRIX16_ARB */
4656+ { 15421, 0x000088D1 }, /* GL_MATRIX17_ARB */
4657+ { 15437, 0x000088D2 }, /* GL_MATRIX18_ARB */
4658+ { 15453, 0x000088D3 }, /* GL_MATRIX19_ARB */
4659+ { 15469, 0x000088C1 }, /* GL_MATRIX1_ARB */
4660+ { 15484, 0x00008631 }, /* GL_MATRIX1_NV */
4661+ { 15498, 0x000088D4 }, /* GL_MATRIX20_ARB */
4662+ { 15514, 0x000088D5 }, /* GL_MATRIX21_ARB */
4663+ { 15530, 0x000088D6 }, /* GL_MATRIX22_ARB */
4664+ { 15546, 0x000088D7 }, /* GL_MATRIX23_ARB */
4665+ { 15562, 0x000088D8 }, /* GL_MATRIX24_ARB */
4666+ { 15578, 0x000088D9 }, /* GL_MATRIX25_ARB */
4667+ { 15594, 0x000088DA }, /* GL_MATRIX26_ARB */
4668+ { 15610, 0x000088DB }, /* GL_MATRIX27_ARB */
4669+ { 15626, 0x000088DC }, /* GL_MATRIX28_ARB */
4670+ { 15642, 0x000088DD }, /* GL_MATRIX29_ARB */
4671+ { 15658, 0x000088C2 }, /* GL_MATRIX2_ARB */
4672+ { 15673, 0x00008632 }, /* GL_MATRIX2_NV */
4673+ { 15687, 0x000088DE }, /* GL_MATRIX30_ARB */
4674+ { 15703, 0x000088DF }, /* GL_MATRIX31_ARB */
4675+ { 15719, 0x000088C3 }, /* GL_MATRIX3_ARB */
4676+ { 15734, 0x00008633 }, /* GL_MATRIX3_NV */
4677+ { 15748, 0x000088C4 }, /* GL_MATRIX4_ARB */
4678+ { 15763, 0x00008634 }, /* GL_MATRIX4_NV */
4679+ { 15777, 0x000088C5 }, /* GL_MATRIX5_ARB */
4680+ { 15792, 0x00008635 }, /* GL_MATRIX5_NV */
4681+ { 15806, 0x000088C6 }, /* GL_MATRIX6_ARB */
4682+ { 15821, 0x00008636 }, /* GL_MATRIX6_NV */
4683+ { 15835, 0x000088C7 }, /* GL_MATRIX7_ARB */
4684+ { 15850, 0x00008637 }, /* GL_MATRIX7_NV */
4685+ { 15864, 0x000088C8 }, /* GL_MATRIX8_ARB */
4686+ { 15879, 0x000088C9 }, /* GL_MATRIX9_ARB */
4687+ { 15894, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */
4688+ { 15920, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
4689+ { 15954, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
4690+ { 15985, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
4691+ { 16018, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
4692+ { 16049, 0x00000BA0 }, /* GL_MATRIX_MODE */
4693+ { 16064, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */
4694+ { 16086, 0x00008008 }, /* GL_MAX */
4695+ { 16093, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */
4696+ { 16116, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
4697+ { 16148, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */
4698+ { 16174, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
4699+ { 16207, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
4700+ { 16233, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
4701+ { 16267, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */
4702+ { 16286, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
4703+ { 16315, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
4704+ { 16347, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */
4705+ { 16383, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
4706+ { 16419, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
4707+ { 16459, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */
4708+ { 16485, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */
4709+ { 16515, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */
4710+ { 16540, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */
4711+ { 16569, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
4712+ { 16598, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */
4713+ { 16631, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */
4714+ { 16651, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */
4715+ { 16675, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */
4716+ { 16699, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */
4717+ { 16723, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */
4718+ { 16748, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */
4719+ { 16766, 0x00008008 }, /* GL_MAX_EXT */
4720+ { 16777, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
4721+ { 16812, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
4722+ { 16851, 0x00000D31 }, /* GL_MAX_LIGHTS */
4723+ { 16865, 0x00000B31 }, /* GL_MAX_LIST_NESTING */
4724+ { 16885, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
4725+ { 16923, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */
4726+ { 16952, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */
4727+ { 16976, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */
4728+ { 17004, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */
4729+ { 17027, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
4730+ { 17064, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
4731+ { 17100, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
4732+ { 17127, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
4733+ { 17156, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
4734+ { 17190, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
4735+ { 17226, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
4736+ { 17253, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
4737+ { 17285, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
4738+ { 17321, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
4739+ { 17350, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
4740+ { 17379, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */
4741+ { 17407, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
4742+ { 17445, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
4743+ { 17489, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
4744+ { 17532, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
4745+ { 17566, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
4746+ { 17605, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
4747+ { 17642, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
4748+ { 17680, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
4749+ { 17723, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
4750+ { 17766, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
4751+ { 17796, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
4752+ { 17827, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
4753+ { 17863, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
4754+ { 17899, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */
4755+ { 17929, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
4756+ { 17963, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */
4757+ { 17996, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
4758+ { 18025, 0x00008504 }, /* GL_MAX_SHININESS_NV */
4759+ { 18045, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */
4760+ { 18069, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */
4761+ { 18091, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */
4762+ { 18117, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */
4763+ { 18144, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
4764+ { 18175, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */
4765+ { 18199, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
4766+ { 18233, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */
4767+ { 18253, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */
4768+ { 18280, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */
4769+ { 18301, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */
4770+ { 18326, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */
4771+ { 18351, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
4772+ { 18386, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */
4773+ { 18408, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */
4774+ { 18434, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */
4775+ { 18456, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */
4776+ { 18482, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
4777+ { 18516, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
4778+ { 18554, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
4779+ { 18587, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
4780+ { 18624, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */
4781+ { 18648, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */
4782+ { 18669, 0x00008007 }, /* GL_MIN */
4783+ { 18676, 0x0000802E }, /* GL_MINMAX */
4784+ { 18686, 0x0000802E }, /* GL_MINMAX_EXT */
4785+ { 18700, 0x0000802F }, /* GL_MINMAX_FORMAT */
4786+ { 18717, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */
4787+ { 18738, 0x00008030 }, /* GL_MINMAX_SINK */
4788+ { 18753, 0x00008030 }, /* GL_MINMAX_SINK_EXT */
4789+ { 18772, 0x00008007 }, /* GL_MIN_EXT */
4790+ { 18783, 0x00008370 }, /* GL_MIRRORED_REPEAT */
4791+ { 18802, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */
4792+ { 18825, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */
4793+ { 18848, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */
4794+ { 18868, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */
4795+ { 18888, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
4796+ { 18918, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */
4797+ { 18946, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
4798+ { 18974, 0x00001700 }, /* GL_MODELVIEW */
4799+ { 18987, 0x00001700 }, /* GL_MODELVIEW0_ARB */
4800+ { 19005, 0x0000872A }, /* GL_MODELVIEW10_ARB */
4801+ { 19024, 0x0000872B }, /* GL_MODELVIEW11_ARB */
4802+ { 19043, 0x0000872C }, /* GL_MODELVIEW12_ARB */
4803+ { 19062, 0x0000872D }, /* GL_MODELVIEW13_ARB */
4804+ { 19081, 0x0000872E }, /* GL_MODELVIEW14_ARB */
4805+ { 19100, 0x0000872F }, /* GL_MODELVIEW15_ARB */
4806+ { 19119, 0x00008730 }, /* GL_MODELVIEW16_ARB */
4807+ { 19138, 0x00008731 }, /* GL_MODELVIEW17_ARB */
4808+ { 19157, 0x00008732 }, /* GL_MODELVIEW18_ARB */
4809+ { 19176, 0x00008733 }, /* GL_MODELVIEW19_ARB */
4810+ { 19195, 0x0000850A }, /* GL_MODELVIEW1_ARB */
4811+ { 19213, 0x00008734 }, /* GL_MODELVIEW20_ARB */
4812+ { 19232, 0x00008735 }, /* GL_MODELVIEW21_ARB */
4813+ { 19251, 0x00008736 }, /* GL_MODELVIEW22_ARB */
4814+ { 19270, 0x00008737 }, /* GL_MODELVIEW23_ARB */
4815+ { 19289, 0x00008738 }, /* GL_MODELVIEW24_ARB */
4816+ { 19308, 0x00008739 }, /* GL_MODELVIEW25_ARB */
4817+ { 19327, 0x0000873A }, /* GL_MODELVIEW26_ARB */
4818+ { 19346, 0x0000873B }, /* GL_MODELVIEW27_ARB */
4819+ { 19365, 0x0000873C }, /* GL_MODELVIEW28_ARB */
4820+ { 19384, 0x0000873D }, /* GL_MODELVIEW29_ARB */
4821+ { 19403, 0x00008722 }, /* GL_MODELVIEW2_ARB */
4822+ { 19421, 0x0000873E }, /* GL_MODELVIEW30_ARB */
4823+ { 19440, 0x0000873F }, /* GL_MODELVIEW31_ARB */
4824+ { 19459, 0x00008723 }, /* GL_MODELVIEW3_ARB */
4825+ { 19477, 0x00008724 }, /* GL_MODELVIEW4_ARB */
4826+ { 19495, 0x00008725 }, /* GL_MODELVIEW5_ARB */
4827+ { 19513, 0x00008726 }, /* GL_MODELVIEW6_ARB */
4828+ { 19531, 0x00008727 }, /* GL_MODELVIEW7_ARB */
4829+ { 19549, 0x00008728 }, /* GL_MODELVIEW8_ARB */
4830+ { 19567, 0x00008729 }, /* GL_MODELVIEW9_ARB */
4831+ { 19585, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */
4832+ { 19605, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */
4833+ { 19632, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */
4834+ { 19657, 0x00002100 }, /* GL_MODULATE */
4835+ { 19669, 0x00008744 }, /* GL_MODULATE_ADD_ATI */
4836+ { 19689, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */
4837+ { 19716, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */
4838+ { 19741, 0x00000103 }, /* GL_MULT */
4839+ { 19749, 0x0000809D }, /* GL_MULTISAMPLE */
4840+ { 19764, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */
4841+ { 19784, 0x0000809D }, /* GL_MULTISAMPLE_ARB */
4842+ { 19803, 0x20000000 }, /* GL_MULTISAMPLE_BIT */
4843+ { 19822, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */
4844+ { 19846, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */
4845+ { 19869, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */
4846+ { 19899, 0x00002A25 }, /* GL_N3F_V3F */
4847+ { 19910, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */
4848+ { 19930, 0x0000150E }, /* GL_NAND */
4849+ { 19938, 0x00002600 }, /* GL_NEAREST */
4850+ { 19949, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
4851+ { 19980, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
4852+ { 20012, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */
4853+ { 20037, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */
4854+ { 20063, 0x00000200 }, /* GL_NEVER */
4855+ { 20072, 0x00001102 }, /* GL_NICEST */
4856+ { 20082, 0x00000000 }, /* GL_NONE */
4857+ { 20090, 0x00001505 }, /* GL_NOOP */
4858+ { 20098, 0x00001508 }, /* GL_NOR */
4859+ { 20105, 0x00000BA1 }, /* GL_NORMALIZE */
4860+ { 20118, 0x00008075 }, /* GL_NORMAL_ARRAY */
4861+ { 20134, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
4862+ { 20165, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */
4863+ { 20200, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */
4864+ { 20224, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */
4865+ { 20247, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */
4866+ { 20268, 0x00008511 }, /* GL_NORMAL_MAP */
4867+ { 20282, 0x00008511 }, /* GL_NORMAL_MAP_ARB */
4868+ { 20300, 0x00008511 }, /* GL_NORMAL_MAP_NV */
4869+ { 20317, 0x00000205 }, /* GL_NOTEQUAL */
4870+ { 20329, 0x00000000 }, /* GL_NO_ERROR */
4871+ { 20341, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
4872+ { 20375, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */
4873+ { 20413, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
4874+ { 20445, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
4875+ { 20487, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
4876+ { 20517, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
4877+ { 20557, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
4878+ { 20588, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */
4879+ { 20617, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */
4880+ { 20645, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
4881+ { 20675, 0x00002401 }, /* GL_OBJECT_LINEAR */
4882+ { 20692, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */
4883+ { 20718, 0x00002501 }, /* GL_OBJECT_PLANE */
4884+ { 20734, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
4885+ { 20769, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */
4886+ { 20791, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */
4887+ { 20810, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */
4888+ { 20840, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */
4889+ { 20861, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */
4890+ { 20889, 0x00000001 }, /* GL_ONE */
4891+ { 20896, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */
4892+ { 20924, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */
4893+ { 20956, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */
4894+ { 20984, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */
4895+ { 21016, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */
4896+ { 21039, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */
4897+ { 21062, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */
4898+ { 21085, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */
4899+ { 21108, 0x00008598 }, /* GL_OPERAND0_ALPHA */
4900+ { 21126, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */
4901+ { 21148, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */
4902+ { 21170, 0x00008590 }, /* GL_OPERAND0_RGB */
4903+ { 21186, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */
4904+ { 21206, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */
4905+ { 21226, 0x00008599 }, /* GL_OPERAND1_ALPHA */
4906+ { 21244, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */
4907+ { 21266, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */
4908+ { 21288, 0x00008591 }, /* GL_OPERAND1_RGB */
4909+ { 21304, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */
4910+ { 21324, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */
4911+ { 21344, 0x0000859A }, /* GL_OPERAND2_ALPHA */
4912+ { 21362, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */
4913+ { 21384, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */
4914+ { 21406, 0x00008592 }, /* GL_OPERAND2_RGB */
4915+ { 21422, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */
4916+ { 21442, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */
4917+ { 21462, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */
4918+ { 21483, 0x00008593 }, /* GL_OPERAND3_RGB_NV */
4919+ { 21502, 0x00001507 }, /* GL_OR */
4920+ { 21508, 0x00000A01 }, /* GL_ORDER */
4921+ { 21517, 0x0000150D }, /* GL_OR_INVERTED */
4922+ { 21532, 0x0000150B }, /* GL_OR_REVERSE */
4923+ { 21546, 0x00000505 }, /* GL_OUT_OF_MEMORY */
4924+ { 21563, 0x00000D05 }, /* GL_PACK_ALIGNMENT */
4925+ { 21581, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */
4926+ { 21602, 0x00008758 }, /* GL_PACK_INVERT_MESA */
4927+ { 21622, 0x00000D01 }, /* GL_PACK_LSB_FIRST */
4928+ { 21640, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */
4929+ { 21659, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */
4930+ { 21679, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */
4931+ { 21699, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */
4932+ { 21717, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */
4933+ { 21736, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */
4934+ { 21761, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */
4935+ { 21785, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */
4936+ { 21806, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */
4937+ { 21828, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */
4938+ { 21850, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */
4939+ { 21875, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */
4940+ { 21899, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */
4941+ { 21920, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */
4942+ { 21942, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */
4943+ { 21964, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */
4944+ { 21986, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */
4945+ { 22017, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */
4946+ { 22037, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */
4947+ { 22062, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */
4948+ { 22082, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */
4949+ { 22107, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */
4950+ { 22127, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */
4951+ { 22152, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */
4952+ { 22172, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */
4953+ { 22197, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */
4954+ { 22217, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */
4955+ { 22242, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */
4956+ { 22262, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */
4957+ { 22287, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */
4958+ { 22307, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */
4959+ { 22332, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */
4960+ { 22352, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */
4961+ { 22377, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */
4962+ { 22397, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */
4963+ { 22422, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */
4964+ { 22442, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */
4965+ { 22467, 0x00000020 }, /* GL_PIXEL_MODE_BIT */
4966+ { 22485, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
4967+ { 22518, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */
4968+ { 22543, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
4969+ { 22578, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */
4970+ { 22605, 0x00001B00 }, /* GL_POINT */
4971+ { 22614, 0x00000000 }, /* GL_POINTS */
4972+ { 22624, 0x00000002 }, /* GL_POINT_BIT */
4973+ { 22637, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */
4974+ { 22667, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */
4975+ { 22701, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */
4976+ { 22735, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */
4977+ { 22770, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */
4978+ { 22799, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */
4979+ { 22832, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */
4980+ { 22865, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */
4981+ { 22899, 0x00000B11 }, /* GL_POINT_SIZE */
4982+ { 22913, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */
4983+ { 22939, 0x00008127 }, /* GL_POINT_SIZE_MAX */
4984+ { 22957, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */
4985+ { 22979, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */
4986+ { 23001, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */
4987+ { 23024, 0x00008126 }, /* GL_POINT_SIZE_MIN */
4988+ { 23042, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */
4989+ { 23064, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */
4990+ { 23086, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */
4991+ { 23109, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */
4992+ { 23129, 0x00000B10 }, /* GL_POINT_SMOOTH */
4993+ { 23145, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */
4994+ { 23166, 0x00008861 }, /* GL_POINT_SPRITE */
4995+ { 23182, 0x00008861 }, /* GL_POINT_SPRITE_ARB */
4996+ { 23202, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */
4997+ { 23231, 0x00008861 }, /* GL_POINT_SPRITE_NV */
4998+ { 23250, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */
4999+ { 23276, 0x00000701 }, /* GL_POINT_TOKEN */
5000+ { 23291, 0x00000009 }, /* GL_POLYGON */
5001+ { 23302, 0x00000008 }, /* GL_POLYGON_BIT */
5002+ { 23317, 0x00000B40 }, /* GL_POLYGON_MODE */
5003+ { 23333, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */
5004+ { 23356, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */
5005+ { 23381, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */
5006+ { 23404, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */
5007+ { 23427, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */
5008+ { 23451, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */
5009+ { 23475, 0x00000B41 }, /* GL_POLYGON_SMOOTH */
5010+ { 23493, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */
5011+ { 23516, 0x00000B42 }, /* GL_POLYGON_STIPPLE */
5012+ { 23535, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */
5013+ { 23558, 0x00000703 }, /* GL_POLYGON_TOKEN */
5014+ { 23575, 0x00001203 }, /* GL_POSITION */
5015+ { 23587, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
5016+ { 23619, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */
5017+ { 23655, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
5018+ { 23688, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */
5019+ { 23725, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
5020+ { 23756, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */
5021+ { 23791, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
5022+ { 23823, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */
5023+ { 23859, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
5024+ { 23892, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
5025+ { 23924, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */
5026+ { 23960, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
5027+ { 23993, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */
5028+ { 24030, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */
5029+ { 24060, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */
5030+ { 24094, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */
5031+ { 24125, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */
5032+ { 24160, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
5033+ { 24191, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */
5034+ { 24226, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
5035+ { 24258, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */
5036+ { 24294, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */
5037+ { 24324, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */
5038+ { 24358, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */
5039+ { 24389, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */
5040+ { 24424, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */
5041+ { 24456, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */
5042+ { 24487, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */
5043+ { 24522, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */
5044+ { 24554, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */
5045+ { 24590, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */
5046+ { 24619, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */
5047+ { 24652, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */
5048+ { 24682, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */
5049+ { 24716, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
5050+ { 24755, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
5051+ { 24788, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
5052+ { 24828, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
5053+ { 24862, 0x00008578 }, /* GL_PREVIOUS */
5054+ { 24874, 0x00008578 }, /* GL_PREVIOUS_ARB */
5055+ { 24890, 0x00008578 }, /* GL_PREVIOUS_EXT */
5056+ { 24906, 0x00008577 }, /* GL_PRIMARY_COLOR */
5057+ { 24923, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */
5058+ { 24944, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */
5059+ { 24965, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
5060+ { 24998, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
5061+ { 25030, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */
5062+ { 25053, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */
5063+ { 25076, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */
5064+ { 25106, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */
5065+ { 25135, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */
5066+ { 25163, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */
5067+ { 25185, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */
5068+ { 25213, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */
5069+ { 25241, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */
5070+ { 25263, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */
5071+ { 25284, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
5072+ { 25324, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
5073+ { 25363, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
5074+ { 25393, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
5075+ { 25428, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
5076+ { 25461, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
5077+ { 25495, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
5078+ { 25534, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
5079+ { 25573, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */
5080+ { 25595, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */
5081+ { 25621, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */
5082+ { 25645, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */
5083+ { 25668, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */
5084+ { 25690, 0x00008628 }, /* GL_PROGRAM_STRING_NV */
5085+ { 25711, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */
5086+ { 25732, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */
5087+ { 25759, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
5088+ { 25791, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
5089+ { 25823, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
5090+ { 25858, 0x00001701 }, /* GL_PROJECTION */
5091+ { 25872, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */
5092+ { 25893, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */
5093+ { 25919, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */
5094+ { 25940, 0x00008025 }, /* GL_PROXY_HISTOGRAM */
5095+ { 25959, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */
5096+ { 25982, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
5097+ { 26021, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
5098+ { 26059, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */
5099+ { 26079, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
5100+ { 26109, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */
5101+ { 26133, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */
5102+ { 26153, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
5103+ { 26183, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */
5104+ { 26207, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */
5105+ { 26227, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
5106+ { 26260, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */
5107+ { 26286, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */
5108+ { 26316, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
5109+ { 26347, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */
5110+ { 26377, 0x00002003 }, /* GL_Q */
5111+ { 26382, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */
5112+ { 26407, 0x00000007 }, /* GL_QUADS */
5113+ { 26416, 0x00008614 }, /* GL_QUAD_MESH_SUN */
5114+ { 26433, 0x00000008 }, /* GL_QUAD_STRIP */
5115+ { 26447, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */
5116+ { 26469, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */
5117+ { 26495, 0x00008866 }, /* GL_QUERY_RESULT */
5118+ { 26511, 0x00008866 }, /* GL_QUERY_RESULT_ARB */
5119+ { 26531, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */
5120+ { 26557, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */
5121+ { 26587, 0x00002002 }, /* GL_R */
5122+ { 26592, 0x00002A10 }, /* GL_R3_G3_B2 */
5123+ { 26604, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
5124+ { 26637, 0x00000C02 }, /* GL_READ_BUFFER */
5125+ { 26652, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
5126+ { 26684, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */
5127+ { 26708, 0x000088B8 }, /* GL_READ_ONLY */
5128+ { 26721, 0x000088B8 }, /* GL_READ_ONLY_ARB */
5129+ { 26738, 0x000088BA }, /* GL_READ_WRITE */
5130+ { 26752, 0x000088BA }, /* GL_READ_WRITE_ARB */
5131+ { 26770, 0x00001903 }, /* GL_RED */
5132+ { 26777, 0x00008016 }, /* GL_REDUCE */
5133+ { 26787, 0x00008016 }, /* GL_REDUCE_EXT */
5134+ { 26801, 0x00000D15 }, /* GL_RED_BIAS */
5135+ { 26813, 0x00000D52 }, /* GL_RED_BITS */
5136+ { 26825, 0x00000D14 }, /* GL_RED_SCALE */
5137+ { 26838, 0x00008512 }, /* GL_REFLECTION_MAP */
5138+ { 26856, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */
5139+ { 26878, 0x00008512 }, /* GL_REFLECTION_MAP_NV */
5140+ { 26899, 0x00001C00 }, /* GL_RENDER */
5141+ { 26909, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */
5142+ { 26937, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */
5143+ { 26957, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */
5144+ { 26984, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
5145+ { 27020, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */
5146+ { 27046, 0x00001F01 }, /* GL_RENDERER */
5147+ { 27058, 0x00000C40 }, /* GL_RENDER_MODE */
5148+ { 27073, 0x00002901 }, /* GL_REPEAT */
5149+ { 27083, 0x00001E01 }, /* GL_REPLACE */
5150+ { 27094, 0x00008062 }, /* GL_REPLACE_EXT */
5151+ { 27109, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */
5152+ { 27132, 0x0000803A }, /* GL_RESCALE_NORMAL */
5153+ { 27150, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */
5154+ { 27172, 0x00000102 }, /* GL_RETURN */
5155+ { 27182, 0x00001907 }, /* GL_RGB */
5156+ { 27189, 0x00008052 }, /* GL_RGB10 */
5157+ { 27198, 0x00008059 }, /* GL_RGB10_A2 */
5158+ { 27210, 0x00008059 }, /* GL_RGB10_A2_EXT */
5159+ { 27226, 0x00008052 }, /* GL_RGB10_EXT */
5160+ { 27239, 0x00008053 }, /* GL_RGB12 */
5161+ { 27248, 0x00008053 }, /* GL_RGB12_EXT */
5162+ { 27261, 0x00008054 }, /* GL_RGB16 */
5163+ { 27270, 0x00008054 }, /* GL_RGB16_EXT */
5164+ { 27283, 0x0000804E }, /* GL_RGB2_EXT */
5165+ { 27295, 0x0000804F }, /* GL_RGB4 */
5166+ { 27303, 0x0000804F }, /* GL_RGB4_EXT */
5167+ { 27315, 0x000083A1 }, /* GL_RGB4_S3TC */
5168+ { 27328, 0x00008050 }, /* GL_RGB5 */
5169+ { 27336, 0x00008057 }, /* GL_RGB5_A1 */
5170+ { 27347, 0x00008057 }, /* GL_RGB5_A1_EXT */
5171+ { 27362, 0x00008050 }, /* GL_RGB5_EXT */
5172+ { 27374, 0x00008051 }, /* GL_RGB8 */
5173+ { 27382, 0x00008051 }, /* GL_RGB8_EXT */
5174+ { 27394, 0x00001908 }, /* GL_RGBA */
5175+ { 27402, 0x0000805A }, /* GL_RGBA12 */
5176+ { 27412, 0x0000805A }, /* GL_RGBA12_EXT */
5177+ { 27426, 0x0000805B }, /* GL_RGBA16 */
5178+ { 27436, 0x0000805B }, /* GL_RGBA16_EXT */
5179+ { 27450, 0x00008055 }, /* GL_RGBA2 */
5180+ { 27459, 0x00008055 }, /* GL_RGBA2_EXT */
5181+ { 27472, 0x00008056 }, /* GL_RGBA4 */
5182+ { 27481, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */
5183+ { 27500, 0x00008056 }, /* GL_RGBA4_EXT */
5184+ { 27513, 0x000083A3 }, /* GL_RGBA4_S3TC */
5185+ { 27527, 0x00008058 }, /* GL_RGBA8 */
5186+ { 27536, 0x00008058 }, /* GL_RGBA8_EXT */
5187+ { 27549, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */
5188+ { 27567, 0x00000C31 }, /* GL_RGBA_MODE */
5189+ { 27580, 0x000083A2 }, /* GL_RGBA_S3TC */
5190+ { 27593, 0x000083A0 }, /* GL_RGB_S3TC */
5191+ { 27605, 0x00008573 }, /* GL_RGB_SCALE */
5192+ { 27618, 0x00008573 }, /* GL_RGB_SCALE_ARB */
5193+ { 27635, 0x00008573 }, /* GL_RGB_SCALE_EXT */
5194+ { 27652, 0x00000407 }, /* GL_RIGHT */
5195+ { 27661, 0x00002000 }, /* GL_S */
5196+ { 27666, 0x00008B5D }, /* GL_SAMPLER_1D */
5197+ { 27680, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */
5198+ { 27701, 0x00008B5E }, /* GL_SAMPLER_2D */
5199+ { 27715, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */
5200+ { 27736, 0x00008B5F }, /* GL_SAMPLER_3D */
5201+ { 27750, 0x00008B60 }, /* GL_SAMPLER_CUBE */
5202+ { 27766, 0x000080A9 }, /* GL_SAMPLES */
5203+ { 27777, 0x000086B4 }, /* GL_SAMPLES_3DFX */
5204+ { 27793, 0x000080A9 }, /* GL_SAMPLES_ARB */
5205+ { 27808, 0x00008914 }, /* GL_SAMPLES_PASSED */
5206+ { 27826, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */
5207+ { 27848, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
5208+ { 27876, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */
5209+ { 27908, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */
5210+ { 27931, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */
5211+ { 27958, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */
5212+ { 27976, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */
5213+ { 27999, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */
5214+ { 28021, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */
5215+ { 28040, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */
5216+ { 28063, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */
5217+ { 28089, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */
5218+ { 28119, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */
5219+ { 28144, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */
5220+ { 28173, 0x00080000 }, /* GL_SCISSOR_BIT */
5221+ { 28188, 0x00000C10 }, /* GL_SCISSOR_BOX */
5222+ { 28203, 0x00000C11 }, /* GL_SCISSOR_TEST */
5223+ { 28219, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */
5224+ { 28244, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
5225+ { 28284, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */
5226+ { 28328, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
5227+ { 28361, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
5228+ { 28391, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
5229+ { 28423, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
5230+ { 28453, 0x00001C02 }, /* GL_SELECT */
5231+ { 28463, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */
5232+ { 28491, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */
5233+ { 28516, 0x00008012 }, /* GL_SEPARABLE_2D */
5234+ { 28532, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */
5235+ { 28559, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */
5236+ { 28590, 0x0000150F }, /* GL_SET */
5237+ { 28597, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */
5238+ { 28618, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */
5239+ { 28642, 0x00008B4F }, /* GL_SHADER_TYPE */
5240+ { 28657, 0x00000B54 }, /* GL_SHADE_MODEL */
5241+ { 28672, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */
5242+ { 28700, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */
5243+ { 28723, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */
5244+ { 28753, 0x00001601 }, /* GL_SHININESS */
5245+ { 28766, 0x00001402 }, /* GL_SHORT */
5246+ { 28775, 0x000081F9 }, /* GL_SINGLE_COLOR */
5247+ { 28791, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */
5248+ { 28811, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */
5249+ { 28830, 0x00001D01 }, /* GL_SMOOTH */
5250+ { 28840, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */
5251+ { 28873, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */
5252+ { 28900, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */
5253+ { 28933, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */
5254+ { 28960, 0x00008588 }, /* GL_SOURCE0_ALPHA */
5255+ { 28977, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */
5256+ { 28998, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */
5257+ { 29019, 0x00008580 }, /* GL_SOURCE0_RGB */
5258+ { 29034, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */
5259+ { 29053, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */
5260+ { 29072, 0x00008589 }, /* GL_SOURCE1_ALPHA */
5261+ { 29089, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */
5262+ { 29110, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */
5263+ { 29131, 0x00008581 }, /* GL_SOURCE1_RGB */
5264+ { 29146, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */
5265+ { 29165, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */
5266+ { 29184, 0x0000858A }, /* GL_SOURCE2_ALPHA */
5267+ { 29201, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */
5268+ { 29222, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */
5269+ { 29243, 0x00008582 }, /* GL_SOURCE2_RGB */
5270+ { 29258, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */
5271+ { 29277, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */
5272+ { 29296, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */
5273+ { 29316, 0x00008583 }, /* GL_SOURCE3_RGB_NV */
5274+ { 29334, 0x00001202 }, /* GL_SPECULAR */
5275+ { 29346, 0x00002402 }, /* GL_SPHERE_MAP */
5276+ { 29360, 0x00001206 }, /* GL_SPOT_CUTOFF */
5277+ { 29375, 0x00001204 }, /* GL_SPOT_DIRECTION */
5278+ { 29393, 0x00001205 }, /* GL_SPOT_EXPONENT */
5279+ { 29410, 0x00008588 }, /* GL_SRC0_ALPHA */
5280+ { 29424, 0x00008580 }, /* GL_SRC0_RGB */
5281+ { 29436, 0x00008589 }, /* GL_SRC1_ALPHA */
5282+ { 29450, 0x00008581 }, /* GL_SRC1_RGB */
5283+ { 29462, 0x0000858A }, /* GL_SRC2_ALPHA */
5284+ { 29476, 0x00008582 }, /* GL_SRC2_RGB */
5285+ { 29488, 0x00000302 }, /* GL_SRC_ALPHA */
5286+ { 29501, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */
5287+ { 29523, 0x00000300 }, /* GL_SRC_COLOR */
5288+ { 29536, 0x00000503 }, /* GL_STACK_OVERFLOW */
5289+ { 29554, 0x00000504 }, /* GL_STACK_UNDERFLOW */
5290+ { 29573, 0x000088E6 }, /* GL_STATIC_COPY */
5291+ { 29588, 0x000088E6 }, /* GL_STATIC_COPY_ARB */
5292+ { 29607, 0x000088E4 }, /* GL_STATIC_DRAW */
5293+ { 29622, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */
5294+ { 29641, 0x000088E5 }, /* GL_STATIC_READ */
5295+ { 29656, 0x000088E5 }, /* GL_STATIC_READ_ARB */
5296+ { 29675, 0x00001802 }, /* GL_STENCIL */
5297+ { 29686, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */
5298+ { 29712, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */
5299+ { 29733, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */
5300+ { 29754, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
5301+ { 29786, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
5302+ { 29818, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */
5303+ { 29838, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */
5304+ { 29865, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */
5305+ { 29891, 0x00000D57 }, /* GL_STENCIL_BITS */
5306+ { 29907, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */
5307+ { 29929, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */
5308+ { 29952, 0x00000B94 }, /* GL_STENCIL_FAIL */
5309+ { 29968, 0x00000B92 }, /* GL_STENCIL_FUNC */
5310+ { 29984, 0x00001901 }, /* GL_STENCIL_INDEX */
5311+ { 30001, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */
5312+ { 30024, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */
5313+ { 30046, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */
5314+ { 30068, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */
5315+ { 30090, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */
5316+ { 30111, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */
5317+ { 30138, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */
5318+ { 30165, 0x00000B97 }, /* GL_STENCIL_REF */
5319+ { 30180, 0x00000B90 }, /* GL_STENCIL_TEST */
5320+ { 30196, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
5321+ { 30225, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */
5322+ { 30247, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */
5323+ { 30268, 0x00000C33 }, /* GL_STEREO */
5324+ { 30278, 0x000088E2 }, /* GL_STREAM_COPY */
5325+ { 30293, 0x000088E2 }, /* GL_STREAM_COPY_ARB */
5326+ { 30312, 0x000088E0 }, /* GL_STREAM_DRAW */
5327+ { 30327, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */
5328+ { 30346, 0x000088E1 }, /* GL_STREAM_READ */
5329+ { 30361, 0x000088E1 }, /* GL_STREAM_READ_ARB */
5330+ { 30380, 0x00000D50 }, /* GL_SUBPIXEL_BITS */
5331+ { 30397, 0x000084E7 }, /* GL_SUBTRACT */
5332+ { 30409, 0x000084E7 }, /* GL_SUBTRACT_ARB */
5333+ { 30425, 0x00002001 }, /* GL_T */
5334+ { 30430, 0x00002A2A }, /* GL_T2F_C3F_V3F */
5335+ { 30445, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */
5336+ { 30464, 0x00002A29 }, /* GL_T2F_C4UB_V3F */
5337+ { 30480, 0x00002A2B }, /* GL_T2F_N3F_V3F */
5338+ { 30495, 0x00002A27 }, /* GL_T2F_V3F */
5339+ { 30506, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */
5340+ { 30525, 0x00002A28 }, /* GL_T4F_V4F */
5341+ { 30536, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */
5342+ { 30559, 0x00001702 }, /* GL_TEXTURE */
5343+ { 30570, 0x000084C0 }, /* GL_TEXTURE0 */
5344+ { 30582, 0x000084C0 }, /* GL_TEXTURE0_ARB */
5345+ { 30598, 0x000084C1 }, /* GL_TEXTURE1 */
5346+ { 30610, 0x000084CA }, /* GL_TEXTURE10 */
5347+ { 30623, 0x000084CA }, /* GL_TEXTURE10_ARB */
5348+ { 30640, 0x000084CB }, /* GL_TEXTURE11 */
5349+ { 30653, 0x000084CB }, /* GL_TEXTURE11_ARB */
5350+ { 30670, 0x000084CC }, /* GL_TEXTURE12 */
5351+ { 30683, 0x000084CC }, /* GL_TEXTURE12_ARB */
5352+ { 30700, 0x000084CD }, /* GL_TEXTURE13 */
5353+ { 30713, 0x000084CD }, /* GL_TEXTURE13_ARB */
5354+ { 30730, 0x000084CE }, /* GL_TEXTURE14 */
5355+ { 30743, 0x000084CE }, /* GL_TEXTURE14_ARB */
5356+ { 30760, 0x000084CF }, /* GL_TEXTURE15 */
5357+ { 30773, 0x000084CF }, /* GL_TEXTURE15_ARB */
5358+ { 30790, 0x000084D0 }, /* GL_TEXTURE16 */
5359+ { 30803, 0x000084D0 }, /* GL_TEXTURE16_ARB */
5360+ { 30820, 0x000084D1 }, /* GL_TEXTURE17 */
5361+ { 30833, 0x000084D1 }, /* GL_TEXTURE17_ARB */
5362+ { 30850, 0x000084D2 }, /* GL_TEXTURE18 */
5363+ { 30863, 0x000084D2 }, /* GL_TEXTURE18_ARB */
5364+ { 30880, 0x000084D3 }, /* GL_TEXTURE19 */
5365+ { 30893, 0x000084D3 }, /* GL_TEXTURE19_ARB */
5366+ { 30910, 0x000084C1 }, /* GL_TEXTURE1_ARB */
5367+ { 30926, 0x000084C2 }, /* GL_TEXTURE2 */
5368+ { 30938, 0x000084D4 }, /* GL_TEXTURE20 */
5369+ { 30951, 0x000084D4 }, /* GL_TEXTURE20_ARB */
5370+ { 30968, 0x000084D5 }, /* GL_TEXTURE21 */
5371+ { 30981, 0x000084D5 }, /* GL_TEXTURE21_ARB */
5372+ { 30998, 0x000084D6 }, /* GL_TEXTURE22 */
5373+ { 31011, 0x000084D6 }, /* GL_TEXTURE22_ARB */
5374+ { 31028, 0x000084D7 }, /* GL_TEXTURE23 */
5375+ { 31041, 0x000084D7 }, /* GL_TEXTURE23_ARB */
5376+ { 31058, 0x000084D8 }, /* GL_TEXTURE24 */
5377+ { 31071, 0x000084D8 }, /* GL_TEXTURE24_ARB */
5378+ { 31088, 0x000084D9 }, /* GL_TEXTURE25 */
5379+ { 31101, 0x000084D9 }, /* GL_TEXTURE25_ARB */
5380+ { 31118, 0x000084DA }, /* GL_TEXTURE26 */
5381+ { 31131, 0x000084DA }, /* GL_TEXTURE26_ARB */
5382+ { 31148, 0x000084DB }, /* GL_TEXTURE27 */
5383+ { 31161, 0x000084DB }, /* GL_TEXTURE27_ARB */
5384+ { 31178, 0x000084DC }, /* GL_TEXTURE28 */
5385+ { 31191, 0x000084DC }, /* GL_TEXTURE28_ARB */
5386+ { 31208, 0x000084DD }, /* GL_TEXTURE29 */
5387+ { 31221, 0x000084DD }, /* GL_TEXTURE29_ARB */
5388+ { 31238, 0x000084C2 }, /* GL_TEXTURE2_ARB */
5389+ { 31254, 0x000084C3 }, /* GL_TEXTURE3 */
5390+ { 31266, 0x000084DE }, /* GL_TEXTURE30 */
5391+ { 31279, 0x000084DE }, /* GL_TEXTURE30_ARB */
5392+ { 31296, 0x000084DF }, /* GL_TEXTURE31 */
5393+ { 31309, 0x000084DF }, /* GL_TEXTURE31_ARB */
5394+ { 31326, 0x000084C3 }, /* GL_TEXTURE3_ARB */
5395+ { 31342, 0x000084C4 }, /* GL_TEXTURE4 */
5396+ { 31354, 0x000084C4 }, /* GL_TEXTURE4_ARB */
5397+ { 31370, 0x000084C5 }, /* GL_TEXTURE5 */
5398+ { 31382, 0x000084C5 }, /* GL_TEXTURE5_ARB */
5399+ { 31398, 0x000084C6 }, /* GL_TEXTURE6 */
5400+ { 31410, 0x000084C6 }, /* GL_TEXTURE6_ARB */
5401+ { 31426, 0x000084C7 }, /* GL_TEXTURE7 */
5402+ { 31438, 0x000084C7 }, /* GL_TEXTURE7_ARB */
5403+ { 31454, 0x000084C8 }, /* GL_TEXTURE8 */
5404+ { 31466, 0x000084C8 }, /* GL_TEXTURE8_ARB */
5405+ { 31482, 0x000084C9 }, /* GL_TEXTURE9 */
5406+ { 31494, 0x000084C9 }, /* GL_TEXTURE9_ARB */
5407+ { 31510, 0x00000DE0 }, /* GL_TEXTURE_1D */
5408+ { 31524, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */
5409+ { 31548, 0x00000DE1 }, /* GL_TEXTURE_2D */
5410+ { 31562, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */
5411+ { 31586, 0x0000806F }, /* GL_TEXTURE_3D */
5412+ { 31600, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */
5413+ { 31622, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */
5414+ { 31648, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */
5415+ { 31670, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */
5416+ { 31692, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
5417+ { 31724, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */
5418+ { 31746, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
5419+ { 31778, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */
5420+ { 31800, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */
5421+ { 31828, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */
5422+ { 31860, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
5423+ { 31893, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */
5424+ { 31925, 0x00040000 }, /* GL_TEXTURE_BIT */
5425+ { 31940, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */
5426+ { 31961, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */
5427+ { 31986, 0x00001005 }, /* GL_TEXTURE_BORDER */
5428+ { 32004, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */
5429+ { 32028, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
5430+ { 32059, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
5431+ { 32089, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
5432+ { 32119, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
5433+ { 32154, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
5434+ { 32185, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
5435+ { 32223, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */
5436+ { 32250, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
5437+ { 32282, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
5438+ { 32316, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */
5439+ { 32340, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */
5440+ { 32368, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */
5441+ { 32392, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */
5442+ { 32420, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
5443+ { 32453, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */
5444+ { 32477, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */
5445+ { 32499, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */
5446+ { 32521, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */
5447+ { 32547, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */
5448+ { 32581, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
5449+ { 32614, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */
5450+ { 32651, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */
5451+ { 32679, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */
5452+ { 32711, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */
5453+ { 32734, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
5454+ { 32772, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */
5455+ { 32814, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */
5456+ { 32845, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */
5457+ { 32873, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
5458+ { 32903, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */
5459+ { 32931, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */
5460+ { 32951, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */
5461+ { 32975, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
5462+ { 33006, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */
5463+ { 33041, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
5464+ { 33072, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */
5465+ { 33107, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
5466+ { 33138, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */
5467+ { 33173, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
5468+ { 33204, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */
5469+ { 33239, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
5470+ { 33270, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */
5471+ { 33305, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
5472+ { 33336, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */
5473+ { 33371, 0x00008071 }, /* GL_TEXTURE_DEPTH */
5474+ { 33388, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */
5475+ { 33410, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */
5476+ { 33436, 0x00002300 }, /* GL_TEXTURE_ENV */
5477+ { 33451, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */
5478+ { 33472, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */
5479+ { 33492, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */
5480+ { 33518, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */
5481+ { 33538, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */
5482+ { 33555, 0x00000C62 }, /* GL_TEXTURE_GEN_R */
5483+ { 33572, 0x00000C60 }, /* GL_TEXTURE_GEN_S */
5484+ { 33589, 0x00000C61 }, /* GL_TEXTURE_GEN_T */
5485+ { 33606, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */
5486+ { 33631, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */
5487+ { 33653, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */
5488+ { 33679, 0x00001001 }, /* GL_TEXTURE_HEIGHT */
5489+ { 33697, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */
5490+ { 33723, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */
5491+ { 33749, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */
5492+ { 33779, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */
5493+ { 33806, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */
5494+ { 33831, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */
5495+ { 33851, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */
5496+ { 33875, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
5497+ { 33902, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
5498+ { 33929, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
5499+ { 33956, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */
5500+ { 33982, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */
5501+ { 34012, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */
5502+ { 34034, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */
5503+ { 34052, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
5504+ { 34082, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
5505+ { 34110, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
5506+ { 34138, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
5507+ { 34166, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */
5508+ { 34187, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */
5509+ { 34206, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */
5510+ { 34228, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */
5511+ { 34247, 0x00008066 }, /* GL_TEXTURE_PRIORITY */
5512+ { 34267, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */
5513+ { 34292, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */
5514+ { 34316, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */
5515+ { 34336, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */
5516+ { 34360, 0x00008067 }, /* GL_TEXTURE_RESIDENT */
5517+ { 34380, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */
5518+ { 34403, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */
5519+ { 34428, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
5520+ { 34462, 0x00001000 }, /* GL_TEXTURE_WIDTH */
5521+ { 34479, 0x00008072 }, /* GL_TEXTURE_WRAP_R */
5522+ { 34497, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
5523+ { 34515, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
5524+ { 34533, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
5525+ { 34553, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
5526+ { 34572, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
5527+ { 34601, 0x00001000 }, /* GL_TRANSFORM_BIT */
5528+ { 34618, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
5529+ { 34644, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
5530+ { 34674, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
5531+ { 34706, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
5532+ { 34736, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
5533+ { 34770, 0x0000862C }, /* GL_TRANSPOSE_NV */
5534+ { 34786, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
5535+ { 34817, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
5536+ { 34852, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
5537+ { 34880, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
5538+ { 34912, 0x00000004 }, /* GL_TRIANGLES */
5539+ { 34925, 0x00000006 }, /* GL_TRIANGLE_FAN */
5540+ { 34941, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
5541+ { 34962, 0x00000005 }, /* GL_TRIANGLE_STRIP */
5542+ { 34980, 0x00000001 }, /* GL_TRUE */
5543+ { 34988, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
5544+ { 35008, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
5545+ { 35031, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
5546+ { 35051, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
5547+ { 35072, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
5548+ { 35094, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
5549+ { 35116, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
5550+ { 35136, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
5551+ { 35157, 0x00001401 }, /* GL_UNSIGNED_BYTE */
5552+ { 35174, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
5553+ { 35201, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
5554+ { 35224, 0x00001405 }, /* GL_UNSIGNED_INT */
5555+ { 35240, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
5556+ { 35267, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
5557+ { 35291, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
5558+ { 35322, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
5559+ { 35346, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
5560+ { 35374, 0x00001403 }, /* GL_UNSIGNED_SHORT */
5561+ { 35392, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
5562+ { 35422, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
5563+ { 35448, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
5564+ { 35478, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
5565+ { 35504, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
5566+ { 35528, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
5567+ { 35556, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
5568+ { 35584, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
5569+ { 35611, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
5570+ { 35643, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
5571+ { 35674, 0x00008CA2 }, /* GL_UPPER_LEFT */
5572+ { 35688, 0x00002A20 }, /* GL_V2F */
5573+ { 35695, 0x00002A21 }, /* GL_V3F */
5574+ { 35702, 0x00008B83 }, /* GL_VALIDATE_STATUS */
5575+ { 35721, 0x00001F00 }, /* GL_VENDOR */
5576+ { 35731, 0x00001F02 }, /* GL_VERSION */
5577+ { 35742, 0x00008074 }, /* GL_VERTEX_ARRAY */
5578+ { 35758, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
5579+ { 35788, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
5580+ { 35819, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
5581+ { 35854, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
5582+ { 35878, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
5583+ { 35899, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
5584+ { 35922, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
5585+ { 35943, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
5586+ { 35970, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
5587+ { 35998, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
5588+ { 36026, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
5589+ { 36054, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
5590+ { 36082, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
5591+ { 36110, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
5592+ { 36138, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
5593+ { 36165, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
5594+ { 36192, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
5595+ { 36219, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
5596+ { 36246, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
5597+ { 36273, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
5598+ { 36300, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
5599+ { 36327, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
5600+ { 36354, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
5601+ { 36381, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
5602+ { 36419, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
5603+ { 36461, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
5604+ { 36492, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
5605+ { 36527, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
5606+ { 36561, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
5607+ { 36599, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
5608+ { 36630, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
5609+ { 36665, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
5610+ { 36693, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
5611+ { 36725, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
5612+ { 36755, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
5613+ { 36789, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
5614+ { 36817, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
5615+ { 36849, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
5616+ { 36869, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
5617+ { 36891, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
5618+ { 36920, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
5619+ { 36941, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
5620+ { 36970, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
5621+ { 37003, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
5622+ { 37035, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
5623+ { 37062, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
5624+ { 37093, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
5625+ { 37123, 0x00008B31 }, /* GL_VERTEX_SHADER */
5626+ { 37140, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
5627+ { 37161, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
5628+ { 37188, 0x00000BA2 }, /* GL_VIEWPORT */
5629+ { 37200, 0x00000800 }, /* GL_VIEWPORT_BIT */
5630+ { 37216, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
5631+ { 37236, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
5632+ { 37267, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
5633+ { 37302, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
5634+ { 37330, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
5635+ { 37355, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
5636+ { 37382, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
5637+ { 37407, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
5638+ { 37431, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
5639+ { 37450, 0x000088B9 }, /* GL_WRITE_ONLY */
5640+ { 37464, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
5641+ { 37482, 0x00001506 }, /* GL_XOR */
5642+ { 37489, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
5643+ { 37508, 0x00008757 }, /* GL_YCBCR_MESA */
5644+ { 37522, 0x00000000 }, /* GL_ZERO */
5645+ { 37530, 0x00000D16 }, /* GL_ZOOM_X */
5646+ { 37540, 0x00000D17 }, /* GL_ZOOM_Y */
5647+};
5648+
5649+static const unsigned reduced_enums[1284] =
5650+{
5651+ 436, /* GL_FALSE */
5652+ 645, /* GL_LINES */
5653+ 647, /* GL_LINE_LOOP */
5654+ 654, /* GL_LINE_STRIP */
5655+ 1637, /* GL_TRIANGLES */
5656+ 1640, /* GL_TRIANGLE_STRIP */
5657+ 1638, /* GL_TRIANGLE_FAN */
5658+ 1211, /* GL_QUADS */
5659+ 1213, /* GL_QUAD_STRIP */
5660+ 1099, /* GL_POLYGON */
5661+ 1111, /* GL_POLYGON_STIPPLE_BIT */
5662+ 1064, /* GL_PIXEL_MODE_BIT */
5663+ 632, /* GL_LIGHTING_BIT */
5664+ 458, /* GL_FOG_BIT */
5665+ 8, /* GL_ACCUM */
5666+ 664, /* GL_LOAD */
5667+ 1253, /* GL_RETURN */
5668+ 937, /* GL_MULT */
5669+ 23, /* GL_ADD */
5670+ 953, /* GL_NEVER */
5671+ 622, /* GL_LESS */
5672+ 426, /* GL_EQUAL */
5673+ 621, /* GL_LEQUAL */
5674+ 547, /* GL_GREATER */
5675+ 968, /* GL_NOTEQUAL */
5676+ 522, /* GL_GEQUAL */
5677+ 46, /* GL_ALWAYS */
5678+ 1386, /* GL_SRC_COLOR */
5679+ 997, /* GL_ONE_MINUS_SRC_COLOR */
5680+ 1384, /* GL_SRC_ALPHA */
5681+ 996, /* GL_ONE_MINUS_SRC_ALPHA */
5682+ 406, /* GL_DST_ALPHA */
5683+ 994, /* GL_ONE_MINUS_DST_ALPHA */
5684+ 407, /* GL_DST_COLOR */
5685+ 995, /* GL_ONE_MINUS_DST_COLOR */
5686+ 1385, /* GL_SRC_ALPHA_SATURATE */
5687+ 510, /* GL_FRONT_LEFT */
5688+ 511, /* GL_FRONT_RIGHT */
5689+ 69, /* GL_BACK_LEFT */
5690+ 70, /* GL_BACK_RIGHT */
5691+ 507, /* GL_FRONT */
5692+ 68, /* GL_BACK */
5693+ 620, /* GL_LEFT */
5694+ 1293, /* GL_RIGHT */
5695+ 508, /* GL_FRONT_AND_BACK */
5696+ 63, /* GL_AUX0 */
5697+ 64, /* GL_AUX1 */
5698+ 65, /* GL_AUX2 */
5699+ 66, /* GL_AUX3 */
5700+ 612, /* GL_INVALID_ENUM */
5701+ 615, /* GL_INVALID_VALUE */
5702+ 614, /* GL_INVALID_OPERATION */
5703+ 1387, /* GL_STACK_OVERFLOW */
5704+ 1388, /* GL_STACK_UNDERFLOW */
5705+ 1022, /* GL_OUT_OF_MEMORY */
5706+ 613, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
5707+ 0, /* GL_2D */
5708+ 2, /* GL_3D */
5709+ 3, /* GL_3D_COLOR */
5710+ 4, /* GL_3D_COLOR_TEXTURE */
5711+ 6, /* GL_4D_COLOR_TEXTURE */
5712+ 1042, /* GL_PASS_THROUGH_TOKEN */
5713+ 1098, /* GL_POINT_TOKEN */
5714+ 655, /* GL_LINE_TOKEN */
5715+ 1112, /* GL_POLYGON_TOKEN */
5716+ 74, /* GL_BITMAP_TOKEN */
5717+ 405, /* GL_DRAW_PIXEL_TOKEN */
5718+ 271, /* GL_COPY_PIXEL_TOKEN */
5719+ 648, /* GL_LINE_RESET_TOKEN */
5720+ 429, /* GL_EXP */
5721+ 430, /* GL_EXP2 */
5722+ 304, /* GL_CW */
5723+ 116, /* GL_CCW */
5724+ 137, /* GL_COEFF */
5725+ 1019, /* GL_ORDER */
5726+ 344, /* GL_DOMAIN */
5727+ 279, /* GL_CURRENT_COLOR */
5728+ 282, /* GL_CURRENT_INDEX */
5729+ 288, /* GL_CURRENT_NORMAL */
5730+ 300, /* GL_CURRENT_TEXTURE_COORDS */
5731+ 293, /* GL_CURRENT_RASTER_COLOR */
5732+ 295, /* GL_CURRENT_RASTER_INDEX */
5733+ 298, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
5734+ 296, /* GL_CURRENT_RASTER_POSITION */
5735+ 297, /* GL_CURRENT_RASTER_POSITION_VALID */
5736+ 294, /* GL_CURRENT_RASTER_DISTANCE */
5737+ 1091, /* GL_POINT_SMOOTH */
5738+ 1080, /* GL_POINT_SIZE */
5739+ 1090, /* GL_POINT_SIZE_RANGE */
5740+ 1081, /* GL_POINT_SIZE_GRANULARITY */
5741+ 649, /* GL_LINE_SMOOTH */
5742+ 656, /* GL_LINE_WIDTH */
5743+ 658, /* GL_LINE_WIDTH_RANGE */
5744+ 657, /* GL_LINE_WIDTH_GRANULARITY */
5745+ 651, /* GL_LINE_STIPPLE */
5746+ 652, /* GL_LINE_STIPPLE_PATTERN */
5747+ 653, /* GL_LINE_STIPPLE_REPEAT */
5748+ 663, /* GL_LIST_MODE */
5749+ 822, /* GL_MAX_LIST_NESTING */
5750+ 660, /* GL_LIST_BASE */
5751+ 662, /* GL_LIST_INDEX */
5752+ 1101, /* GL_POLYGON_MODE */
5753+ 1108, /* GL_POLYGON_SMOOTH */
5754+ 1110, /* GL_POLYGON_STIPPLE */
5755+ 414, /* GL_EDGE_FLAG */
5756+ 272, /* GL_CULL_FACE */
5757+ 273, /* GL_CULL_FACE_MODE */
5758+ 509, /* GL_FRONT_FACE */
5759+ 631, /* GL_LIGHTING */
5760+ 636, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
5761+ 637, /* GL_LIGHT_MODEL_TWO_SIDE */
5762+ 633, /* GL_LIGHT_MODEL_AMBIENT */
5763+ 1339, /* GL_SHADE_MODEL */
5764+ 168, /* GL_COLOR_MATERIAL_FACE */
5765+ 169, /* GL_COLOR_MATERIAL_PARAMETER */
5766+ 167, /* GL_COLOR_MATERIAL */
5767+ 457, /* GL_FOG */
5768+ 479, /* GL_FOG_INDEX */
5769+ 475, /* GL_FOG_DENSITY */
5770+ 483, /* GL_FOG_START */
5771+ 477, /* GL_FOG_END */
5772+ 480, /* GL_FOG_MODE */
5773+ 459, /* GL_FOG_COLOR */
5774+ 333, /* GL_DEPTH_RANGE */
5775+ 338, /* GL_DEPTH_TEST */
5776+ 341, /* GL_DEPTH_WRITEMASK */
5777+ 321, /* GL_DEPTH_CLEAR_VALUE */
5778+ 332, /* GL_DEPTH_FUNC */
5779+ 12, /* GL_ACCUM_CLEAR_VALUE */
5780+ 1418, /* GL_STENCIL_TEST */
5781+ 1406, /* GL_STENCIL_CLEAR_VALUE */
5782+ 1408, /* GL_STENCIL_FUNC */
5783+ 1420, /* GL_STENCIL_VALUE_MASK */
5784+ 1407, /* GL_STENCIL_FAIL */
5785+ 1415, /* GL_STENCIL_PASS_DEPTH_FAIL */
5786+ 1416, /* GL_STENCIL_PASS_DEPTH_PASS */
5787+ 1417, /* GL_STENCIL_REF */
5788+ 1421, /* GL_STENCIL_WRITEMASK */
5789+ 791, /* GL_MATRIX_MODE */
5790+ 958, /* GL_NORMALIZE */
5791+ 1727, /* GL_VIEWPORT */
5792+ 932, /* GL_MODELVIEW_STACK_DEPTH */
5793+ 1191, /* GL_PROJECTION_STACK_DEPTH */
5794+ 1616, /* GL_TEXTURE_STACK_DEPTH */
5795+ 930, /* GL_MODELVIEW_MATRIX */
5796+ 1190, /* GL_PROJECTION_MATRIX */
5797+ 1601, /* GL_TEXTURE_MATRIX */
5798+ 61, /* GL_ATTRIB_STACK_DEPTH */
5799+ 127, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
5800+ 43, /* GL_ALPHA_TEST */
5801+ 44, /* GL_ALPHA_TEST_FUNC */
5802+ 45, /* GL_ALPHA_TEST_REF */
5803+ 343, /* GL_DITHER */
5804+ 78, /* GL_BLEND_DST */
5805+ 86, /* GL_BLEND_SRC */
5806+ 75, /* GL_BLEND */
5807+ 666, /* GL_LOGIC_OP_MODE */
5808+ 586, /* GL_INDEX_LOGIC_OP */
5809+ 166, /* GL_COLOR_LOGIC_OP */
5810+ 67, /* GL_AUX_BUFFERS */
5811+ 354, /* GL_DRAW_BUFFER */
5812+ 1223, /* GL_READ_BUFFER */
5813+ 1320, /* GL_SCISSOR_BOX */
5814+ 1321, /* GL_SCISSOR_TEST */
5815+ 585, /* GL_INDEX_CLEAR_VALUE */
5816+ 590, /* GL_INDEX_WRITEMASK */
5817+ 163, /* GL_COLOR_CLEAR_VALUE */
5818+ 205, /* GL_COLOR_WRITEMASK */
5819+ 587, /* GL_INDEX_MODE */
5820+ 1287, /* GL_RGBA_MODE */
5821+ 353, /* GL_DOUBLEBUFFER */
5822+ 1422, /* GL_STEREO */
5823+ 1246, /* GL_RENDER_MODE */
5824+ 1043, /* GL_PERSPECTIVE_CORRECTION_HINT */
5825+ 1092, /* GL_POINT_SMOOTH_HINT */
5826+ 650, /* GL_LINE_SMOOTH_HINT */
5827+ 1109, /* GL_POLYGON_SMOOTH_HINT */
5828+ 478, /* GL_FOG_HINT */
5829+ 1582, /* GL_TEXTURE_GEN_S */
5830+ 1583, /* GL_TEXTURE_GEN_T */
5831+ 1581, /* GL_TEXTURE_GEN_R */
5832+ 1580, /* GL_TEXTURE_GEN_Q */
5833+ 1056, /* GL_PIXEL_MAP_I_TO_I */
5834+ 1062, /* GL_PIXEL_MAP_S_TO_S */
5835+ 1058, /* GL_PIXEL_MAP_I_TO_R */
5836+ 1054, /* GL_PIXEL_MAP_I_TO_G */
5837+ 1052, /* GL_PIXEL_MAP_I_TO_B */
5838+ 1050, /* GL_PIXEL_MAP_I_TO_A */
5839+ 1060, /* GL_PIXEL_MAP_R_TO_R */
5840+ 1048, /* GL_PIXEL_MAP_G_TO_G */
5841+ 1046, /* GL_PIXEL_MAP_B_TO_B */
5842+ 1044, /* GL_PIXEL_MAP_A_TO_A */
5843+ 1057, /* GL_PIXEL_MAP_I_TO_I_SIZE */
5844+ 1063, /* GL_PIXEL_MAP_S_TO_S_SIZE */
5845+ 1059, /* GL_PIXEL_MAP_I_TO_R_SIZE */
5846+ 1055, /* GL_PIXEL_MAP_I_TO_G_SIZE */
5847+ 1053, /* GL_PIXEL_MAP_I_TO_B_SIZE */
5848+ 1051, /* GL_PIXEL_MAP_I_TO_A_SIZE */
5849+ 1061, /* GL_PIXEL_MAP_R_TO_R_SIZE */
5850+ 1049, /* GL_PIXEL_MAP_G_TO_G_SIZE */
5851+ 1047, /* GL_PIXEL_MAP_B_TO_B_SIZE */
5852+ 1045, /* GL_PIXEL_MAP_A_TO_A_SIZE */
5853+ 1649, /* GL_UNPACK_SWAP_BYTES */
5854+ 1644, /* GL_UNPACK_LSB_FIRST */
5855+ 1645, /* GL_UNPACK_ROW_LENGTH */
5856+ 1648, /* GL_UNPACK_SKIP_ROWS */
5857+ 1647, /* GL_UNPACK_SKIP_PIXELS */
5858+ 1642, /* GL_UNPACK_ALIGNMENT */
5859+ 1031, /* GL_PACK_SWAP_BYTES */
5860+ 1026, /* GL_PACK_LSB_FIRST */
5861+ 1027, /* GL_PACK_ROW_LENGTH */
5862+ 1030, /* GL_PACK_SKIP_ROWS */
5863+ 1029, /* GL_PACK_SKIP_PIXELS */
5864+ 1023, /* GL_PACK_ALIGNMENT */
5865+ 744, /* GL_MAP_COLOR */
5866+ 745, /* GL_MAP_STENCIL */
5867+ 589, /* GL_INDEX_SHIFT */
5868+ 588, /* GL_INDEX_OFFSET */
5869+ 1235, /* GL_RED_SCALE */
5870+ 1233, /* GL_RED_BIAS */
5871+ 1744, /* GL_ZOOM_X */
5872+ 1745, /* GL_ZOOM_Y */
5873+ 551, /* GL_GREEN_SCALE */
5874+ 549, /* GL_GREEN_BIAS */
5875+ 92, /* GL_BLUE_SCALE */
5876+ 90, /* GL_BLUE_BIAS */
5877+ 42, /* GL_ALPHA_SCALE */
5878+ 40, /* GL_ALPHA_BIAS */
5879+ 334, /* GL_DEPTH_SCALE */
5880+ 315, /* GL_DEPTH_BIAS */
5881+ 817, /* GL_MAX_EVAL_ORDER */
5882+ 821, /* GL_MAX_LIGHTS */
5883+ 800, /* GL_MAX_CLIP_PLANES */
5884+ 865, /* GL_MAX_TEXTURE_SIZE */
5885+ 827, /* GL_MAX_PIXEL_MAP_TABLE */
5886+ 796, /* GL_MAX_ATTRIB_STACK_DEPTH */
5887+ 824, /* GL_MAX_MODELVIEW_STACK_DEPTH */
5888+ 825, /* GL_MAX_NAME_STACK_DEPTH */
5889+ 853, /* GL_MAX_PROJECTION_STACK_DEPTH */
5890+ 866, /* GL_MAX_TEXTURE_STACK_DEPTH */
5891+ 880, /* GL_MAX_VIEWPORT_DIMS */
5892+ 797, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
5893+ 1429, /* GL_SUBPIXEL_BITS */
5894+ 584, /* GL_INDEX_BITS */
5895+ 1234, /* GL_RED_BITS */
5896+ 550, /* GL_GREEN_BITS */
5897+ 91, /* GL_BLUE_BITS */
5898+ 41, /* GL_ALPHA_BITS */
5899+ 316, /* GL_DEPTH_BITS */
5900+ 1404, /* GL_STENCIL_BITS */
5901+ 14, /* GL_ACCUM_RED_BITS */
5902+ 13, /* GL_ACCUM_GREEN_BITS */
5903+ 10, /* GL_ACCUM_BLUE_BITS */
5904+ 9, /* GL_ACCUM_ALPHA_BITS */
5905+ 946, /* GL_NAME_STACK_DEPTH */
5906+ 62, /* GL_AUTO_NORMAL */
5907+ 690, /* GL_MAP1_COLOR_4 */
5908+ 693, /* GL_MAP1_INDEX */
5909+ 694, /* GL_MAP1_NORMAL */
5910+ 695, /* GL_MAP1_TEXTURE_COORD_1 */
5911+ 696, /* GL_MAP1_TEXTURE_COORD_2 */
5912+ 697, /* GL_MAP1_TEXTURE_COORD_3 */
5913+ 698, /* GL_MAP1_TEXTURE_COORD_4 */
5914+ 699, /* GL_MAP1_VERTEX_3 */
5915+ 700, /* GL_MAP1_VERTEX_4 */
5916+ 717, /* GL_MAP2_COLOR_4 */
5917+ 720, /* GL_MAP2_INDEX */
5918+ 721, /* GL_MAP2_NORMAL */
5919+ 722, /* GL_MAP2_TEXTURE_COORD_1 */
5920+ 723, /* GL_MAP2_TEXTURE_COORD_2 */
5921+ 724, /* GL_MAP2_TEXTURE_COORD_3 */
5922+ 725, /* GL_MAP2_TEXTURE_COORD_4 */
5923+ 726, /* GL_MAP2_VERTEX_3 */
5924+ 727, /* GL_MAP2_VERTEX_4 */
5925+ 691, /* GL_MAP1_GRID_DOMAIN */
5926+ 692, /* GL_MAP1_GRID_SEGMENTS */
5927+ 718, /* GL_MAP2_GRID_DOMAIN */
5928+ 719, /* GL_MAP2_GRID_SEGMENTS */
5929+ 1506, /* GL_TEXTURE_1D */
5930+ 1508, /* GL_TEXTURE_2D */
5931+ 439, /* GL_FEEDBACK_BUFFER_POINTER */
5932+ 440, /* GL_FEEDBACK_BUFFER_SIZE */
5933+ 441, /* GL_FEEDBACK_BUFFER_TYPE */
5934+ 1330, /* GL_SELECTION_BUFFER_POINTER */
5935+ 1331, /* GL_SELECTION_BUFFER_SIZE */
5936+ 1619, /* GL_TEXTURE_WIDTH */
5937+ 1587, /* GL_TEXTURE_HEIGHT */
5938+ 1543, /* GL_TEXTURE_COMPONENTS */
5939+ 1527, /* GL_TEXTURE_BORDER_COLOR */
5940+ 1526, /* GL_TEXTURE_BORDER */
5941+ 345, /* GL_DONT_CARE */
5942+ 437, /* GL_FASTEST */
5943+ 954, /* GL_NICEST */
5944+ 47, /* GL_AMBIENT */
5945+ 342, /* GL_DIFFUSE */
5946+ 1373, /* GL_SPECULAR */
5947+ 1113, /* GL_POSITION */
5948+ 1376, /* GL_SPOT_DIRECTION */
5949+ 1377, /* GL_SPOT_EXPONENT */
5950+ 1375, /* GL_SPOT_CUTOFF */
5951+ 245, /* GL_CONSTANT_ATTENUATION */
5952+ 640, /* GL_LINEAR_ATTENUATION */
5953+ 1210, /* GL_QUADRATIC_ATTENUATION */
5954+ 219, /* GL_COMPILE */
5955+ 220, /* GL_COMPILE_AND_EXECUTE */
5956+ 111, /* GL_BYTE */
5957+ 1650, /* GL_UNSIGNED_BYTE */
5958+ 1344, /* GL_SHORT */
5959+ 1659, /* GL_UNSIGNED_SHORT */
5960+ 592, /* GL_INT */
5961+ 1653, /* GL_UNSIGNED_INT */
5962+ 444, /* GL_FLOAT */
5963+ 1, /* GL_2_BYTES */
5964+ 5, /* GL_3_BYTES */
5965+ 7, /* GL_4_BYTES */
5966+ 352, /* GL_DOUBLE */
5967+ 123, /* GL_CLEAR */
5968+ 49, /* GL_AND */
5969+ 51, /* GL_AND_REVERSE */
5970+ 269, /* GL_COPY */
5971+ 50, /* GL_AND_INVERTED */
5972+ 956, /* GL_NOOP */
5973+ 1740, /* GL_XOR */
5974+ 1018, /* GL_OR */
5975+ 957, /* GL_NOR */
5976+ 427, /* GL_EQUIV */
5977+ 618, /* GL_INVERT */
5978+ 1021, /* GL_OR_REVERSE */
5979+ 270, /* GL_COPY_INVERTED */
5980+ 1020, /* GL_OR_INVERTED */
5981+ 947, /* GL_NAND */
5982+ 1335, /* GL_SET */
5983+ 424, /* GL_EMISSION */
5984+ 1343, /* GL_SHININESS */
5985+ 48, /* GL_AMBIENT_AND_DIFFUSE */
5986+ 165, /* GL_COLOR_INDEXES */
5987+ 897, /* GL_MODELVIEW */
5988+ 1189, /* GL_PROJECTION */
5989+ 1441, /* GL_TEXTURE */
5990+ 138, /* GL_COLOR */
5991+ 313, /* GL_DEPTH */
5992+ 1395, /* GL_STENCIL */
5993+ 164, /* GL_COLOR_INDEX */
5994+ 1409, /* GL_STENCIL_INDEX */
5995+ 322, /* GL_DEPTH_COMPONENT */
5996+ 1230, /* GL_RED */
5997+ 548, /* GL_GREEN */
5998+ 89, /* GL_BLUE */
5999+ 31, /* GL_ALPHA */
6000+ 1254, /* GL_RGB */
6001+ 1273, /* GL_RGBA */
6002+ 668, /* GL_LUMINANCE */
6003+ 689, /* GL_LUMINANCE_ALPHA */
6004+ 73, /* GL_BITMAP */
6005+ 1069, /* GL_POINT */
6006+ 638, /* GL_LINE */
6007+ 442, /* GL_FILL */
6008+ 1239, /* GL_RENDER */
6009+ 438, /* GL_FEEDBACK */
6010+ 1329, /* GL_SELECT */
6011+ 443, /* GL_FLAT */
6012+ 1348, /* GL_SMOOTH */
6013+ 619, /* GL_KEEP */
6014+ 1248, /* GL_REPLACE */
6015+ 575, /* GL_INCR */
6016+ 309, /* GL_DECR */
6017+ 1674, /* GL_VENDOR */
6018+ 1245, /* GL_RENDERER */
6019+ 1675, /* GL_VERSION */
6020+ 431, /* GL_EXTENSIONS */
6021+ 1294, /* GL_S */
6022+ 1432, /* GL_T */
6023+ 1220, /* GL_R */
6024+ 1209, /* GL_Q */
6025+ 933, /* GL_MODULATE */
6026+ 308, /* GL_DECAL */
6027+ 1577, /* GL_TEXTURE_ENV_MODE */
6028+ 1576, /* GL_TEXTURE_ENV_COLOR */
6029+ 1575, /* GL_TEXTURE_ENV */
6030+ 432, /* GL_EYE_LINEAR */
6031+ 980, /* GL_OBJECT_LINEAR */
6032+ 1374, /* GL_SPHERE_MAP */
6033+ 1579, /* GL_TEXTURE_GEN_MODE */
6034+ 982, /* GL_OBJECT_PLANE */
6035+ 433, /* GL_EYE_PLANE */
6036+ 948, /* GL_NEAREST */
6037+ 639, /* GL_LINEAR */
6038+ 952, /* GL_NEAREST_MIPMAP_NEAREST */
6039+ 644, /* GL_LINEAR_MIPMAP_NEAREST */
6040+ 951, /* GL_NEAREST_MIPMAP_LINEAR */
6041+ 643, /* GL_LINEAR_MIPMAP_LINEAR */
6042+ 1600, /* GL_TEXTURE_MAG_FILTER */
6043+ 1608, /* GL_TEXTURE_MIN_FILTER */
6044+ 1621, /* GL_TEXTURE_WRAP_S */
6045+ 1622, /* GL_TEXTURE_WRAP_T */
6046+ 117, /* GL_CLAMP */
6047+ 1247, /* GL_REPEAT */
6048+ 1107, /* GL_POLYGON_OFFSET_UNITS */
6049+ 1106, /* GL_POLYGON_OFFSET_POINT */
6050+ 1105, /* GL_POLYGON_OFFSET_LINE */
6051+ 1221, /* GL_R3_G3_B2 */
6052+ 1671, /* GL_V2F */
6053+ 1672, /* GL_V3F */
6054+ 114, /* GL_C4UB_V2F */
6055+ 115, /* GL_C4UB_V3F */
6056+ 112, /* GL_C3F_V3F */
6057+ 945, /* GL_N3F_V3F */
6058+ 113, /* GL_C4F_N3F_V3F */
6059+ 1437, /* GL_T2F_V3F */
6060+ 1439, /* GL_T4F_V4F */
6061+ 1435, /* GL_T2F_C4UB_V3F */
6062+ 1433, /* GL_T2F_C3F_V3F */
6063+ 1436, /* GL_T2F_N3F_V3F */
6064+ 1434, /* GL_T2F_C4F_N3F_V3F */
6065+ 1438, /* GL_T4F_C4F_N3F_V4F */
6066+ 130, /* GL_CLIP_PLANE0 */
6067+ 131, /* GL_CLIP_PLANE1 */
6068+ 132, /* GL_CLIP_PLANE2 */
6069+ 133, /* GL_CLIP_PLANE3 */
6070+ 134, /* GL_CLIP_PLANE4 */
6071+ 135, /* GL_CLIP_PLANE5 */
6072+ 623, /* GL_LIGHT0 */
6073+ 624, /* GL_LIGHT1 */
6074+ 625, /* GL_LIGHT2 */
6075+ 626, /* GL_LIGHT3 */
6076+ 627, /* GL_LIGHT4 */
6077+ 628, /* GL_LIGHT5 */
6078+ 629, /* GL_LIGHT6 */
6079+ 630, /* GL_LIGHT7 */
6080+ 552, /* GL_HINT_BIT */
6081+ 247, /* GL_CONSTANT_COLOR */
6082+ 992, /* GL_ONE_MINUS_CONSTANT_COLOR */
6083+ 242, /* GL_CONSTANT_ALPHA */
6084+ 990, /* GL_ONE_MINUS_CONSTANT_ALPHA */
6085+ 76, /* GL_BLEND_COLOR */
6086+ 512, /* GL_FUNC_ADD */
6087+ 881, /* GL_MIN */
6088+ 793, /* GL_MAX */
6089+ 81, /* GL_BLEND_EQUATION */
6090+ 516, /* GL_FUNC_SUBTRACT */
6091+ 514, /* GL_FUNC_REVERSE_SUBTRACT */
6092+ 250, /* GL_CONVOLUTION_1D */
6093+ 251, /* GL_CONVOLUTION_2D */
6094+ 1332, /* GL_SEPARABLE_2D */
6095+ 254, /* GL_CONVOLUTION_BORDER_MODE */
6096+ 258, /* GL_CONVOLUTION_FILTER_SCALE */
6097+ 256, /* GL_CONVOLUTION_FILTER_BIAS */
6098+ 1231, /* GL_REDUCE */
6099+ 260, /* GL_CONVOLUTION_FORMAT */
6100+ 264, /* GL_CONVOLUTION_WIDTH */
6101+ 262, /* GL_CONVOLUTION_HEIGHT */
6102+ 808, /* GL_MAX_CONVOLUTION_WIDTH */
6103+ 806, /* GL_MAX_CONVOLUTION_HEIGHT */
6104+ 1146, /* GL_POST_CONVOLUTION_RED_SCALE */
6105+ 1142, /* GL_POST_CONVOLUTION_GREEN_SCALE */
6106+ 1137, /* GL_POST_CONVOLUTION_BLUE_SCALE */
6107+ 1133, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
6108+ 1144, /* GL_POST_CONVOLUTION_RED_BIAS */
6109+ 1140, /* GL_POST_CONVOLUTION_GREEN_BIAS */
6110+ 1135, /* GL_POST_CONVOLUTION_BLUE_BIAS */
6111+ 1131, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
6112+ 553, /* GL_HISTOGRAM */
6113+ 1193, /* GL_PROXY_HISTOGRAM */
6114+ 569, /* GL_HISTOGRAM_WIDTH */
6115+ 559, /* GL_HISTOGRAM_FORMAT */
6116+ 565, /* GL_HISTOGRAM_RED_SIZE */
6117+ 561, /* GL_HISTOGRAM_GREEN_SIZE */
6118+ 556, /* GL_HISTOGRAM_BLUE_SIZE */
6119+ 554, /* GL_HISTOGRAM_ALPHA_SIZE */
6120+ 563, /* GL_HISTOGRAM_LUMINANCE_SIZE */
6121+ 567, /* GL_HISTOGRAM_SINK */
6122+ 882, /* GL_MINMAX */
6123+ 884, /* GL_MINMAX_FORMAT */
6124+ 886, /* GL_MINMAX_SINK */
6125+ 1440, /* GL_TABLE_TOO_LARGE_EXT */
6126+ 1652, /* GL_UNSIGNED_BYTE_3_3_2 */
6127+ 1661, /* GL_UNSIGNED_SHORT_4_4_4_4 */
6128+ 1663, /* GL_UNSIGNED_SHORT_5_5_5_1 */
6129+ 1657, /* GL_UNSIGNED_INT_8_8_8_8 */
6130+ 1654, /* GL_UNSIGNED_INT_10_10_10_2 */
6131+ 1104, /* GL_POLYGON_OFFSET_FILL */
6132+ 1103, /* GL_POLYGON_OFFSET_FACTOR */
6133+ 1102, /* GL_POLYGON_OFFSET_BIAS */
6134+ 1251, /* GL_RESCALE_NORMAL */
6135+ 36, /* GL_ALPHA4 */
6136+ 38, /* GL_ALPHA8 */
6137+ 32, /* GL_ALPHA12 */
6138+ 34, /* GL_ALPHA16 */
6139+ 679, /* GL_LUMINANCE4 */
6140+ 685, /* GL_LUMINANCE8 */
6141+ 669, /* GL_LUMINANCE12 */
6142+ 675, /* GL_LUMINANCE16 */
6143+ 680, /* GL_LUMINANCE4_ALPHA4 */
6144+ 683, /* GL_LUMINANCE6_ALPHA2 */
6145+ 686, /* GL_LUMINANCE8_ALPHA8 */
6146+ 672, /* GL_LUMINANCE12_ALPHA4 */
6147+ 670, /* GL_LUMINANCE12_ALPHA12 */
6148+ 676, /* GL_LUMINANCE16_ALPHA16 */
6149+ 593, /* GL_INTENSITY */
6150+ 598, /* GL_INTENSITY4 */
6151+ 600, /* GL_INTENSITY8 */
6152+ 594, /* GL_INTENSITY12 */
6153+ 596, /* GL_INTENSITY16 */
6154+ 1263, /* GL_RGB2_EXT */
6155+ 1264, /* GL_RGB4 */
6156+ 1267, /* GL_RGB5 */
6157+ 1271, /* GL_RGB8 */
6158+ 1255, /* GL_RGB10 */
6159+ 1259, /* GL_RGB12 */
6160+ 1261, /* GL_RGB16 */
6161+ 1278, /* GL_RGBA2 */
6162+ 1280, /* GL_RGBA4 */
6163+ 1268, /* GL_RGB5_A1 */
6164+ 1284, /* GL_RGBA8 */
6165+ 1256, /* GL_RGB10_A2 */
6166+ 1274, /* GL_RGBA12 */
6167+ 1276, /* GL_RGBA16 */
6168+ 1613, /* GL_TEXTURE_RED_SIZE */
6169+ 1585, /* GL_TEXTURE_GREEN_SIZE */
6170+ 1524, /* GL_TEXTURE_BLUE_SIZE */
6171+ 1511, /* GL_TEXTURE_ALPHA_SIZE */
6172+ 1598, /* GL_TEXTURE_LUMINANCE_SIZE */
6173+ 1589, /* GL_TEXTURE_INTENSITY_SIZE */
6174+ 1249, /* GL_REPLACE_EXT */
6175+ 1197, /* GL_PROXY_TEXTURE_1D */
6176+ 1200, /* GL_PROXY_TEXTURE_2D */
6177+ 1617, /* GL_TEXTURE_TOO_LARGE_EXT */
6178+ 1610, /* GL_TEXTURE_PRIORITY */
6179+ 1615, /* GL_TEXTURE_RESIDENT */
6180+ 1514, /* GL_TEXTURE_BINDING_1D */
6181+ 1516, /* GL_TEXTURE_BINDING_2D */
6182+ 1518, /* GL_TEXTURE_BINDING_3D */
6183+ 1028, /* GL_PACK_SKIP_IMAGES */
6184+ 1024, /* GL_PACK_IMAGE_HEIGHT */
6185+ 1646, /* GL_UNPACK_SKIP_IMAGES */
6186+ 1643, /* GL_UNPACK_IMAGE_HEIGHT */
6187+ 1510, /* GL_TEXTURE_3D */
6188+ 1203, /* GL_PROXY_TEXTURE_3D */
6189+ 1572, /* GL_TEXTURE_DEPTH */
6190+ 1620, /* GL_TEXTURE_WRAP_R */
6191+ 794, /* GL_MAX_3D_TEXTURE_SIZE */
6192+ 1676, /* GL_VERTEX_ARRAY */
6193+ 959, /* GL_NORMAL_ARRAY */
6194+ 139, /* GL_COLOR_ARRAY */
6195+ 578, /* GL_INDEX_ARRAY */
6196+ 1551, /* GL_TEXTURE_COORD_ARRAY */
6197+ 415, /* GL_EDGE_FLAG_ARRAY */
6198+ 1681, /* GL_VERTEX_ARRAY_SIZE */
6199+ 1683, /* GL_VERTEX_ARRAY_TYPE */
6200+ 1682, /* GL_VERTEX_ARRAY_STRIDE */
6201+ 964, /* GL_NORMAL_ARRAY_TYPE */
6202+ 963, /* GL_NORMAL_ARRAY_STRIDE */
6203+ 143, /* GL_COLOR_ARRAY_SIZE */
6204+ 145, /* GL_COLOR_ARRAY_TYPE */
6205+ 144, /* GL_COLOR_ARRAY_STRIDE */
6206+ 583, /* GL_INDEX_ARRAY_TYPE */
6207+ 582, /* GL_INDEX_ARRAY_STRIDE */
6208+ 1555, /* GL_TEXTURE_COORD_ARRAY_SIZE */
6209+ 1557, /* GL_TEXTURE_COORD_ARRAY_TYPE */
6210+ 1556, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
6211+ 419, /* GL_EDGE_FLAG_ARRAY_STRIDE */
6212+ 1680, /* GL_VERTEX_ARRAY_POINTER */
6213+ 962, /* GL_NORMAL_ARRAY_POINTER */
6214+ 142, /* GL_COLOR_ARRAY_POINTER */
6215+ 581, /* GL_INDEX_ARRAY_POINTER */
6216+ 1554, /* GL_TEXTURE_COORD_ARRAY_POINTER */
6217+ 418, /* GL_EDGE_FLAG_ARRAY_POINTER */
6218+ 938, /* GL_MULTISAMPLE */
6219+ 1306, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
6220+ 1308, /* GL_SAMPLE_ALPHA_TO_ONE */
6221+ 1313, /* GL_SAMPLE_COVERAGE */
6222+ 1310, /* GL_SAMPLE_BUFFERS */
6223+ 1301, /* GL_SAMPLES */
6224+ 1317, /* GL_SAMPLE_COVERAGE_VALUE */
6225+ 1315, /* GL_SAMPLE_COVERAGE_INVERT */
6226+ 170, /* GL_COLOR_MATRIX */
6227+ 172, /* GL_COLOR_MATRIX_STACK_DEPTH */
6228+ 802, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
6229+ 1129, /* GL_POST_COLOR_MATRIX_RED_SCALE */
6230+ 1125, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
6231+ 1120, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
6232+ 1116, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
6233+ 1127, /* GL_POST_COLOR_MATRIX_RED_BIAS */
6234+ 1123, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
6235+ 1118, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
6236+ 1114, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
6237+ 1534, /* GL_TEXTURE_COLOR_TABLE_SGI */
6238+ 1204, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
6239+ 1536, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
6240+ 80, /* GL_BLEND_DST_RGB */
6241+ 88, /* GL_BLEND_SRC_RGB */
6242+ 79, /* GL_BLEND_DST_ALPHA */
6243+ 87, /* GL_BLEND_SRC_ALPHA */
6244+ 176, /* GL_COLOR_TABLE */
6245+ 1139, /* GL_POST_CONVOLUTION_COLOR_TABLE */
6246+ 1122, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
6247+ 1192, /* GL_PROXY_COLOR_TABLE */
6248+ 1196, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
6249+ 1195, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
6250+ 200, /* GL_COLOR_TABLE_SCALE */
6251+ 180, /* GL_COLOR_TABLE_BIAS */
6252+ 185, /* GL_COLOR_TABLE_FORMAT */
6253+ 202, /* GL_COLOR_TABLE_WIDTH */
6254+ 197, /* GL_COLOR_TABLE_RED_SIZE */
6255+ 188, /* GL_COLOR_TABLE_GREEN_SIZE */
6256+ 182, /* GL_COLOR_TABLE_BLUE_SIZE */
6257+ 177, /* GL_COLOR_TABLE_ALPHA_SIZE */
6258+ 194, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
6259+ 191, /* GL_COLOR_TABLE_INTENSITY_SIZE */
6260+ 71, /* GL_BGR */
6261+ 72, /* GL_BGRA */
6262+ 816, /* GL_MAX_ELEMENTS_VERTICES */
6263+ 815, /* GL_MAX_ELEMENTS_INDICES */
6264+ 1588, /* GL_TEXTURE_INDEX_SIZE_EXT */
6265+ 136, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
6266+ 1086, /* GL_POINT_SIZE_MIN */
6267+ 1082, /* GL_POINT_SIZE_MAX */
6268+ 1076, /* GL_POINT_FADE_THRESHOLD_SIZE */
6269+ 1072, /* GL_POINT_DISTANCE_ATTENUATION */
6270+ 118, /* GL_CLAMP_TO_BORDER */
6271+ 121, /* GL_CLAMP_TO_EDGE */
6272+ 1609, /* GL_TEXTURE_MIN_LOD */
6273+ 1607, /* GL_TEXTURE_MAX_LOD */
6274+ 1513, /* GL_TEXTURE_BASE_LEVEL */
6275+ 1606, /* GL_TEXTURE_MAX_LEVEL */
6276+ 572, /* GL_IGNORE_BORDER_HP */
6277+ 246, /* GL_CONSTANT_BORDER_HP */
6278+ 1250, /* GL_REPLICATE_BORDER_HP */
6279+ 252, /* GL_CONVOLUTION_BORDER_COLOR */
6280+ 987, /* GL_OCCLUSION_TEST_HP */
6281+ 988, /* GL_OCCLUSION_TEST_RESULT_HP */
6282+ 641, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
6283+ 1528, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
6284+ 1530, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
6285+ 1532, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
6286+ 1533, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
6287+ 1531, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
6288+ 1529, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
6289+ 798, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
6290+ 799, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
6291+ 1149, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
6292+ 1151, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
6293+ 1148, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
6294+ 1150, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
6295+ 1596, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
6296+ 1597, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
6297+ 1595, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
6298+ 518, /* GL_GENERATE_MIPMAP */
6299+ 519, /* GL_GENERATE_MIPMAP_HINT */
6300+ 481, /* GL_FOG_OFFSET_SGIX */
6301+ 482, /* GL_FOG_OFFSET_VALUE_SGIX */
6302+ 1542, /* GL_TEXTURE_COMPARE_SGIX */
6303+ 1541, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
6304+ 1592, /* GL_TEXTURE_LEQUAL_R_SGIX */
6305+ 1584, /* GL_TEXTURE_GEQUAL_R_SGIX */
6306+ 323, /* GL_DEPTH_COMPONENT16 */
6307+ 326, /* GL_DEPTH_COMPONENT24 */
6308+ 329, /* GL_DEPTH_COMPONENT32 */
6309+ 274, /* GL_CULL_VERTEX_EXT */
6310+ 276, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
6311+ 275, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
6312+ 1737, /* GL_WRAP_BORDER_SUN */
6313+ 1535, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
6314+ 634, /* GL_LIGHT_MODEL_COLOR_CONTROL */
6315+ 1345, /* GL_SINGLE_COLOR */
6316+ 1333, /* GL_SEPARATE_SPECULAR_COLOR */
6317+ 1342, /* GL_SHARED_TEXTURE_PALETTE_EXT */
6318+ 1651, /* GL_UNSIGNED_BYTE_2_3_3_REV */
6319+ 1664, /* GL_UNSIGNED_SHORT_5_6_5 */
6320+ 1665, /* GL_UNSIGNED_SHORT_5_6_5_REV */
6321+ 1662, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
6322+ 1660, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
6323+ 1658, /* GL_UNSIGNED_INT_8_8_8_8_REV */
6324+ 1656, /* GL_UNSIGNED_INT_2_10_10_10_REV */
6325+ 1604, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
6326+ 1605, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
6327+ 1603, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
6328+ 889, /* GL_MIRRORED_REPEAT */
6329+ 1289, /* GL_RGB_S3TC */
6330+ 1266, /* GL_RGB4_S3TC */
6331+ 1288, /* GL_RGBA_S3TC */
6332+ 1283, /* GL_RGBA4_S3TC */
6333+ 1286, /* GL_RGBA_DXT5_S3TC */
6334+ 1281, /* GL_RGBA4_DXT5_S3TC */
6335+ 239, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
6336+ 234, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
6337+ 235, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
6338+ 236, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
6339+ 950, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
6340+ 949, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
6341+ 642, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
6342+ 468, /* GL_FOG_COORDINATE_SOURCE */
6343+ 460, /* GL_FOG_COORD */
6344+ 484, /* GL_FRAGMENT_DEPTH */
6345+ 280, /* GL_CURRENT_FOG_COORD */
6346+ 467, /* GL_FOG_COORDINATE_ARRAY_TYPE */
6347+ 466, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
6348+ 465, /* GL_FOG_COORDINATE_ARRAY_POINTER */
6349+ 462, /* GL_FOG_COORDINATE_ARRAY */
6350+ 174, /* GL_COLOR_SUM */
6351+ 299, /* GL_CURRENT_SECONDARY_COLOR */
6352+ 1326, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
6353+ 1328, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
6354+ 1327, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
6355+ 1325, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
6356+ 1322, /* GL_SECONDARY_COLOR_ARRAY */
6357+ 528, /* GL_GL_CURRENT_RASTER_SECONDARY_COLOR */
6358+ 28, /* GL_ALIASED_POINT_SIZE_RANGE */
6359+ 27, /* GL_ALIASED_LINE_WIDTH_RANGE */
6360+ 1442, /* GL_TEXTURE0 */
6361+ 1444, /* GL_TEXTURE1 */
6362+ 1466, /* GL_TEXTURE2 */
6363+ 1488, /* GL_TEXTURE3 */
6364+ 1494, /* GL_TEXTURE4 */
6365+ 1496, /* GL_TEXTURE5 */
6366+ 1498, /* GL_TEXTURE6 */
6367+ 1500, /* GL_TEXTURE7 */
6368+ 1502, /* GL_TEXTURE8 */
6369+ 1504, /* GL_TEXTURE9 */
6370+ 1445, /* GL_TEXTURE10 */
6371+ 1447, /* GL_TEXTURE11 */
6372+ 1449, /* GL_TEXTURE12 */
6373+ 1451, /* GL_TEXTURE13 */
6374+ 1453, /* GL_TEXTURE14 */
6375+ 1455, /* GL_TEXTURE15 */
6376+ 1457, /* GL_TEXTURE16 */
6377+ 1459, /* GL_TEXTURE17 */
6378+ 1461, /* GL_TEXTURE18 */
6379+ 1463, /* GL_TEXTURE19 */
6380+ 1467, /* GL_TEXTURE20 */
6381+ 1469, /* GL_TEXTURE21 */
6382+ 1471, /* GL_TEXTURE22 */
6383+ 1473, /* GL_TEXTURE23 */
6384+ 1475, /* GL_TEXTURE24 */
6385+ 1477, /* GL_TEXTURE25 */
6386+ 1479, /* GL_TEXTURE26 */
6387+ 1481, /* GL_TEXTURE27 */
6388+ 1483, /* GL_TEXTURE28 */
6389+ 1485, /* GL_TEXTURE29 */
6390+ 1489, /* GL_TEXTURE30 */
6391+ 1491, /* GL_TEXTURE31 */
6392+ 18, /* GL_ACTIVE_TEXTURE */
6393+ 124, /* GL_CLIENT_ACTIVE_TEXTURE */
6394+ 867, /* GL_MAX_TEXTURE_UNITS */
6395+ 1630, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
6396+ 1633, /* GL_TRANSPOSE_PROJECTION_MATRIX */
6397+ 1635, /* GL_TRANSPOSE_TEXTURE_MATRIX */
6398+ 1627, /* GL_TRANSPOSE_COLOR_MATRIX */
6399+ 1430, /* GL_SUBTRACT */
6400+ 856, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
6401+ 222, /* GL_COMPRESSED_ALPHA */
6402+ 226, /* GL_COMPRESSED_LUMINANCE */
6403+ 227, /* GL_COMPRESSED_LUMINANCE_ALPHA */
6404+ 224, /* GL_COMPRESSED_INTENSITY */
6405+ 230, /* GL_COMPRESSED_RGB */
6406+ 231, /* GL_COMPRESSED_RGBA */
6407+ 1549, /* GL_TEXTURE_COMPRESSION_HINT */
6408+ 1611, /* GL_TEXTURE_RECTANGLE_ARB */
6409+ 1521, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
6410+ 1207, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
6411+ 854, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
6412+ 335, /* GL_DEPTH_STENCIL_NV */
6413+ 1655, /* GL_UNSIGNED_INT_24_8_NV */
6414+ 863, /* GL_MAX_TEXTURE_LOD_BIAS */
6415+ 1602, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
6416+ 864, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
6417+ 1578, /* GL_TEXTURE_FILTER_CONTROL */
6418+ 1593, /* GL_TEXTURE_LOD_BIAS */
6419+ 207, /* GL_COMBINE4 */
6420+ 857, /* GL_MAX_SHININESS_NV */
6421+ 858, /* GL_MAX_SPOT_EXPONENT_NV */
6422+ 576, /* GL_INCR_WRAP */
6423+ 310, /* GL_DECR_WRAP */
6424+ 909, /* GL_MODELVIEW1_ARB */
6425+ 965, /* GL_NORMAL_MAP */
6426+ 1236, /* GL_REFLECTION_MAP */
6427+ 1558, /* GL_TEXTURE_CUBE_MAP */
6428+ 1519, /* GL_TEXTURE_BINDING_CUBE_MAP */
6429+ 1566, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
6430+ 1560, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
6431+ 1568, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
6432+ 1562, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
6433+ 1570, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
6434+ 1564, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
6435+ 1205, /* GL_PROXY_TEXTURE_CUBE_MAP */
6436+ 810, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
6437+ 944, /* GL_MULTISAMPLE_FILTER_HINT_NV */
6438+ 476, /* GL_FOG_DISTANCE_MODE_NV */
6439+ 435, /* GL_EYE_RADIAL_NV */
6440+ 434, /* GL_EYE_PLANE_ABSOLUTE_NV */
6441+ 206, /* GL_COMBINE */
6442+ 213, /* GL_COMBINE_RGB */
6443+ 208, /* GL_COMBINE_ALPHA */
6444+ 1290, /* GL_RGB_SCALE */
6445+ 24, /* GL_ADD_SIGNED */
6446+ 603, /* GL_INTERPOLATE */
6447+ 241, /* GL_CONSTANT */
6448+ 1155, /* GL_PRIMARY_COLOR */
6449+ 1152, /* GL_PREVIOUS */
6450+ 1356, /* GL_SOURCE0_RGB */
6451+ 1362, /* GL_SOURCE1_RGB */
6452+ 1368, /* GL_SOURCE2_RGB */
6453+ 1372, /* GL_SOURCE3_RGB_NV */
6454+ 1353, /* GL_SOURCE0_ALPHA */
6455+ 1359, /* GL_SOURCE1_ALPHA */
6456+ 1365, /* GL_SOURCE2_ALPHA */
6457+ 1371, /* GL_SOURCE3_ALPHA_NV */
6458+ 1001, /* GL_OPERAND0_RGB */
6459+ 1007, /* GL_OPERAND1_RGB */
6460+ 1013, /* GL_OPERAND2_RGB */
6461+ 1017, /* GL_OPERAND3_RGB_NV */
6462+ 998, /* GL_OPERAND0_ALPHA */
6463+ 1004, /* GL_OPERAND1_ALPHA */
6464+ 1010, /* GL_OPERAND2_ALPHA */
6465+ 1016, /* GL_OPERAND3_ALPHA_NV */
6466+ 1677, /* GL_VERTEX_ARRAY_BINDING_APPLE */
6467+ 1741, /* GL_YCBCR_422_APPLE */
6468+ 1666, /* GL_UNSIGNED_SHORT_8_8_APPLE */
6469+ 1668, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
6470+ 1347, /* GL_SLICE_ACCUM_SUN */
6471+ 1212, /* GL_QUAD_MESH_SUN */
6472+ 1639, /* GL_TRIANGLE_MESH_SUN */
6473+ 1715, /* GL_VERTEX_PROGRAM_ARB */
6474+ 1726, /* GL_VERTEX_STATE_PROGRAM_NV */
6475+ 1702, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
6476+ 1708, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
6477+ 1710, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
6478+ 1712, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
6479+ 301, /* GL_CURRENT_VERTEX_ATTRIB */
6480+ 1168, /* GL_PROGRAM_LENGTH_ARB */
6481+ 1182, /* GL_PROGRAM_STRING_ARB */
6482+ 931, /* GL_MODELVIEW_PROJECTION_NV */
6483+ 571, /* GL_IDENTITY_NV */
6484+ 616, /* GL_INVERSE_NV */
6485+ 1632, /* GL_TRANSPOSE_NV */
6486+ 617, /* GL_INVERSE_TRANSPOSE_NV */
6487+ 840, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
6488+ 839, /* GL_MAX_PROGRAM_MATRICES_ARB */
6489+ 747, /* GL_MATRIX0_NV */
6490+ 759, /* GL_MATRIX1_NV */
6491+ 771, /* GL_MATRIX2_NV */
6492+ 775, /* GL_MATRIX3_NV */
6493+ 777, /* GL_MATRIX4_NV */
6494+ 779, /* GL_MATRIX5_NV */
6495+ 781, /* GL_MATRIX6_NV */
6496+ 783, /* GL_MATRIX7_NV */
6497+ 286, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
6498+ 283, /* GL_CURRENT_MATRIX_ARB */
6499+ 1718, /* GL_VERTEX_PROGRAM_POINT_SIZE */
6500+ 1721, /* GL_VERTEX_PROGRAM_TWO_SIDE */
6501+ 1180, /* GL_PROGRAM_PARAMETER_NV */
6502+ 1706, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
6503+ 1184, /* GL_PROGRAM_TARGET_NV */
6504+ 1181, /* GL_PROGRAM_RESIDENT_NV */
6505+ 1624, /* GL_TRACK_MATRIX_NV */
6506+ 1625, /* GL_TRACK_MATRIX_TRANSFORM_NV */
6507+ 1716, /* GL_VERTEX_PROGRAM_BINDING_NV */
6508+ 1162, /* GL_PROGRAM_ERROR_POSITION_ARB */
6509+ 320, /* GL_DEPTH_CLAMP_NV */
6510+ 1684, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
6511+ 1691, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
6512+ 1692, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
6513+ 1693, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
6514+ 1694, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
6515+ 1695, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
6516+ 1696, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
6517+ 1697, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
6518+ 1698, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
6519+ 1699, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
6520+ 1685, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
6521+ 1686, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
6522+ 1687, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
6523+ 1688, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
6524+ 1689, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
6525+ 1690, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
6526+ 701, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
6527+ 708, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
6528+ 709, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
6529+ 710, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
6530+ 711, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
6531+ 712, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
6532+ 713, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
6533+ 714, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
6534+ 715, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
6535+ 716, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
6536+ 702, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
6537+ 703, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
6538+ 704, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
6539+ 705, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
6540+ 706, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
6541+ 707, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
6542+ 728, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
6543+ 735, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
6544+ 736, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
6545+ 737, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
6546+ 738, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
6547+ 739, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
6548+ 740, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
6549+ 1161, /* GL_PROGRAM_BINDING_ARB */
6550+ 742, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
6551+ 743, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
6552+ 729, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
6553+ 730, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
6554+ 731, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
6555+ 732, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
6556+ 733, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
6557+ 734, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
6558+ 1547, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
6559+ 1544, /* GL_TEXTURE_COMPRESSED */
6560+ 970, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
6561+ 240, /* GL_COMPRESSED_TEXTURE_FORMATS */
6562+ 879, /* GL_MAX_VERTEX_UNITS_ARB */
6563+ 22, /* GL_ACTIVE_VERTEX_UNITS_ARB */
6564+ 1736, /* GL_WEIGHT_SUM_UNITY_ARB */
6565+ 1714, /* GL_VERTEX_BLEND_ARB */
6566+ 303, /* GL_CURRENT_WEIGHT_ARB */
6567+ 1735, /* GL_WEIGHT_ARRAY_TYPE_ARB */
6568+ 1734, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
6569+ 1733, /* GL_WEIGHT_ARRAY_SIZE_ARB */
6570+ 1732, /* GL_WEIGHT_ARRAY_POINTER_ARB */
6571+ 1729, /* GL_WEIGHT_ARRAY_ARB */
6572+ 346, /* GL_DOT3_RGB */
6573+ 347, /* GL_DOT3_RGBA */
6574+ 238, /* GL_COMPRESSED_RGB_FXT1_3DFX */
6575+ 233, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
6576+ 939, /* GL_MULTISAMPLE_3DFX */
6577+ 1311, /* GL_SAMPLE_BUFFERS_3DFX */
6578+ 1302, /* GL_SAMPLES_3DFX */
6579+ 920, /* GL_MODELVIEW2_ARB */
6580+ 923, /* GL_MODELVIEW3_ARB */
6581+ 924, /* GL_MODELVIEW4_ARB */
6582+ 925, /* GL_MODELVIEW5_ARB */
6583+ 926, /* GL_MODELVIEW6_ARB */
6584+ 927, /* GL_MODELVIEW7_ARB */
6585+ 928, /* GL_MODELVIEW8_ARB */
6586+ 929, /* GL_MODELVIEW9_ARB */
6587+ 899, /* GL_MODELVIEW10_ARB */
6588+ 900, /* GL_MODELVIEW11_ARB */
6589+ 901, /* GL_MODELVIEW12_ARB */
6590+ 902, /* GL_MODELVIEW13_ARB */
6591+ 903, /* GL_MODELVIEW14_ARB */
6592+ 904, /* GL_MODELVIEW15_ARB */
6593+ 905, /* GL_MODELVIEW16_ARB */
6594+ 906, /* GL_MODELVIEW17_ARB */
6595+ 907, /* GL_MODELVIEW18_ARB */
6596+ 908, /* GL_MODELVIEW19_ARB */
6597+ 910, /* GL_MODELVIEW20_ARB */
6598+ 911, /* GL_MODELVIEW21_ARB */
6599+ 912, /* GL_MODELVIEW22_ARB */
6600+ 913, /* GL_MODELVIEW23_ARB */
6601+ 914, /* GL_MODELVIEW24_ARB */
6602+ 915, /* GL_MODELVIEW25_ARB */
6603+ 916, /* GL_MODELVIEW26_ARB */
6604+ 917, /* GL_MODELVIEW27_ARB */
6605+ 918, /* GL_MODELVIEW28_ARB */
6606+ 919, /* GL_MODELVIEW29_ARB */
6607+ 921, /* GL_MODELVIEW30_ARB */
6608+ 922, /* GL_MODELVIEW31_ARB */
6609+ 351, /* GL_DOT3_RGB_EXT */
6610+ 349, /* GL_DOT3_RGBA_EXT */
6611+ 893, /* GL_MIRROR_CLAMP_EXT */
6612+ 896, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
6613+ 934, /* GL_MODULATE_ADD_ATI */
6614+ 935, /* GL_MODULATE_SIGNED_ADD_ATI */
6615+ 936, /* GL_MODULATE_SUBTRACT_ATI */
6616+ 1742, /* GL_YCBCR_MESA */
6617+ 1025, /* GL_PACK_INVERT_MESA */
6618+ 306, /* GL_DEBUG_OBJECT_MESA */
6619+ 307, /* GL_DEBUG_PRINT_MESA */
6620+ 305, /* GL_DEBUG_ASSERT_MESA */
6621+ 107, /* GL_BUFFER_SIZE */
6622+ 109, /* GL_BUFFER_USAGE */
6623+ 1398, /* GL_STENCIL_BACK_FUNC */
6624+ 1397, /* GL_STENCIL_BACK_FAIL */
6625+ 1399, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
6626+ 1400, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
6627+ 485, /* GL_FRAGMENT_PROGRAM_ARB */
6628+ 1159, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
6629+ 1187, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
6630+ 1186, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
6631+ 1171, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
6632+ 1177, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
6633+ 1176, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
6634+ 829, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
6635+ 852, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
6636+ 851, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
6637+ 842, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
6638+ 848, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
6639+ 847, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
6640+ 812, /* GL_MAX_DRAW_BUFFERS */
6641+ 355, /* GL_DRAW_BUFFER0 */
6642+ 358, /* GL_DRAW_BUFFER1 */
6643+ 379, /* GL_DRAW_BUFFER2 */
6644+ 382, /* GL_DRAW_BUFFER3 */
6645+ 385, /* GL_DRAW_BUFFER4 */
6646+ 388, /* GL_DRAW_BUFFER5 */
6647+ 391, /* GL_DRAW_BUFFER6 */
6648+ 394, /* GL_DRAW_BUFFER7 */
6649+ 397, /* GL_DRAW_BUFFER8 */
6650+ 400, /* GL_DRAW_BUFFER9 */
6651+ 359, /* GL_DRAW_BUFFER10 */
6652+ 362, /* GL_DRAW_BUFFER11 */
6653+ 365, /* GL_DRAW_BUFFER12 */
6654+ 368, /* GL_DRAW_BUFFER13 */
6655+ 371, /* GL_DRAW_BUFFER14 */
6656+ 374, /* GL_DRAW_BUFFER15 */
6657+ 82, /* GL_BLEND_EQUATION_ALPHA */
6658+ 792, /* GL_MATRIX_PALETTE_ARB */
6659+ 823, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
6660+ 826, /* GL_MAX_PALETTE_MATRICES_ARB */
6661+ 289, /* GL_CURRENT_PALETTE_MATRIX_ARB */
6662+ 786, /* GL_MATRIX_INDEX_ARRAY_ARB */
6663+ 284, /* GL_CURRENT_MATRIX_INDEX_ARB */
6664+ 788, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
6665+ 790, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
6666+ 789, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
6667+ 787, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
6668+ 1573, /* GL_TEXTURE_DEPTH_SIZE */
6669+ 339, /* GL_DEPTH_TEXTURE_MODE */
6670+ 1539, /* GL_TEXTURE_COMPARE_MODE */
6671+ 1537, /* GL_TEXTURE_COMPARE_FUNC */
6672+ 217, /* GL_COMPARE_R_TO_TEXTURE */
6673+ 1093, /* GL_POINT_SPRITE */
6674+ 266, /* GL_COORD_REPLACE */
6675+ 1097, /* GL_POINT_SPRITE_R_MODE_NV */
6676+ 1214, /* GL_QUERY_COUNTER_BITS */
6677+ 291, /* GL_CURRENT_QUERY */
6678+ 1216, /* GL_QUERY_RESULT */
6679+ 1218, /* GL_QUERY_RESULT_AVAILABLE */
6680+ 873, /* GL_MAX_VERTEX_ATTRIBS */
6681+ 1704, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
6682+ 337, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
6683+ 336, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
6684+ 859, /* GL_MAX_TEXTURE_COORDS */
6685+ 861, /* GL_MAX_TEXTURE_IMAGE_UNITS */
6686+ 1164, /* GL_PROGRAM_ERROR_STRING_ARB */
6687+ 1166, /* GL_PROGRAM_FORMAT_ASCII_ARB */
6688+ 1165, /* GL_PROGRAM_FORMAT_ARB */
6689+ 1618, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
6690+ 318, /* GL_DEPTH_BOUNDS_TEST_EXT */
6691+ 317, /* GL_DEPTH_BOUNDS_EXT */
6692+ 52, /* GL_ARRAY_BUFFER */
6693+ 420, /* GL_ELEMENT_ARRAY_BUFFER */
6694+ 54, /* GL_ARRAY_BUFFER_BINDING */
6695+ 422, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
6696+ 1678, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
6697+ 960, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
6698+ 140, /* GL_COLOR_ARRAY_BUFFER_BINDING */
6699+ 579, /* GL_INDEX_ARRAY_BUFFER_BINDING */
6700+ 1552, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
6701+ 416, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
6702+ 1323, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
6703+ 463, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
6704+ 1730, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
6705+ 1700, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
6706+ 1167, /* GL_PROGRAM_INSTRUCTIONS_ARB */
6707+ 835, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
6708+ 1173, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
6709+ 844, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
6710+ 1185, /* GL_PROGRAM_TEMPORARIES_ARB */
6711+ 850, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
6712+ 1175, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
6713+ 846, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
6714+ 1179, /* GL_PROGRAM_PARAMETERS_ARB */
6715+ 849, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
6716+ 1174, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
6717+ 845, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
6718+ 1160, /* GL_PROGRAM_ATTRIBS_ARB */
6719+ 830, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
6720+ 1172, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
6721+ 843, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
6722+ 1158, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
6723+ 828, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
6724+ 1170, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
6725+ 841, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
6726+ 836, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
6727+ 832, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
6728+ 1188, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
6729+ 1629, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
6730+ 1226, /* GL_READ_ONLY */
6731+ 1738, /* GL_WRITE_ONLY */
6732+ 1228, /* GL_READ_WRITE */
6733+ 101, /* GL_BUFFER_ACCESS */
6734+ 103, /* GL_BUFFER_MAPPED */
6735+ 105, /* GL_BUFFER_MAP_POINTER */
6736+ 1623, /* GL_TIME_ELAPSED_EXT */
6737+ 746, /* GL_MATRIX0_ARB */
6738+ 758, /* GL_MATRIX1_ARB */
6739+ 770, /* GL_MATRIX2_ARB */
6740+ 774, /* GL_MATRIX3_ARB */
6741+ 776, /* GL_MATRIX4_ARB */
6742+ 778, /* GL_MATRIX5_ARB */
6743+ 780, /* GL_MATRIX6_ARB */
6744+ 782, /* GL_MATRIX7_ARB */
6745+ 784, /* GL_MATRIX8_ARB */
6746+ 785, /* GL_MATRIX9_ARB */
6747+ 748, /* GL_MATRIX10_ARB */
6748+ 749, /* GL_MATRIX11_ARB */
6749+ 750, /* GL_MATRIX12_ARB */
6750+ 751, /* GL_MATRIX13_ARB */
6751+ 752, /* GL_MATRIX14_ARB */
6752+ 753, /* GL_MATRIX15_ARB */
6753+ 754, /* GL_MATRIX16_ARB */
6754+ 755, /* GL_MATRIX17_ARB */
6755+ 756, /* GL_MATRIX18_ARB */
6756+ 757, /* GL_MATRIX19_ARB */
6757+ 760, /* GL_MATRIX20_ARB */
6758+ 761, /* GL_MATRIX21_ARB */
6759+ 762, /* GL_MATRIX22_ARB */
6760+ 763, /* GL_MATRIX23_ARB */
6761+ 764, /* GL_MATRIX24_ARB */
6762+ 765, /* GL_MATRIX25_ARB */
6763+ 766, /* GL_MATRIX26_ARB */
6764+ 767, /* GL_MATRIX27_ARB */
6765+ 768, /* GL_MATRIX28_ARB */
6766+ 769, /* GL_MATRIX29_ARB */
6767+ 772, /* GL_MATRIX30_ARB */
6768+ 773, /* GL_MATRIX31_ARB */
6769+ 1425, /* GL_STREAM_DRAW */
6770+ 1427, /* GL_STREAM_READ */
6771+ 1423, /* GL_STREAM_COPY */
6772+ 1391, /* GL_STATIC_DRAW */
6773+ 1393, /* GL_STATIC_READ */
6774+ 1389, /* GL_STATIC_COPY */
6775+ 410, /* GL_DYNAMIC_DRAW */
6776+ 412, /* GL_DYNAMIC_READ */
6777+ 408, /* GL_DYNAMIC_COPY */
6778+ 535, /* GL_GL_PIXEL_PACK_BUFFER */
6779+ 537, /* GL_GL_PIXEL_UNPACK_BUFFER */
6780+ 536, /* GL_GL_PIXEL_PACK_BUFFER_BINDING */
6781+ 538, /* GL_GL_PIXEL_UNPACK_BUFFER_BINDING */
6782+ 833, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
6783+ 831, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
6784+ 834, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
6785+ 838, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
6786+ 837, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
6787+ 795, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
6788+ 1419, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
6789+ 17, /* GL_ACTIVE_STENCIL_FACE_EXT */
6790+ 894, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
6791+ 1304, /* GL_SAMPLES_PASSED */
6792+ 486, /* GL_FRAGMENT_SHADER */
6793+ 1724, /* GL_VERTEX_SHADER */
6794+ 1178, /* GL_PROGRAM_OBJECT_ARB */
6795+ 1336, /* GL_SHADER_OBJECT_ARB */
6796+ 819, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
6797+ 877, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
6798+ 871, /* GL_MAX_VARYING_FLOATS */
6799+ 875, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
6800+ 804, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
6801+ 985, /* GL_OBJECT_TYPE_ARB */
6802+ 1338, /* GL_SHADER_TYPE */
6803+ 451, /* GL_FLOAT_VEC2 */
6804+ 453, /* GL_FLOAT_VEC3 */
6805+ 455, /* GL_FLOAT_VEC4 */
6806+ 606, /* GL_INT_VEC2 */
6807+ 608, /* GL_INT_VEC3 */
6808+ 610, /* GL_INT_VEC4 */
6809+ 93, /* GL_BOOL */
6810+ 95, /* GL_BOOL_VEC2 */
6811+ 97, /* GL_BOOL_VEC3 */
6812+ 99, /* GL_BOOL_VEC4 */
6813+ 445, /* GL_FLOAT_MAT2 */
6814+ 447, /* GL_FLOAT_MAT3 */
6815+ 449, /* GL_FLOAT_MAT4 */
6816+ 1295, /* GL_SAMPLER_1D */
6817+ 1297, /* GL_SAMPLER_2D */
6818+ 1299, /* GL_SAMPLER_3D */
6819+ 1300, /* GL_SAMPLER_CUBE */
6820+ 1296, /* GL_SAMPLER_1D_SHADOW */
6821+ 1298, /* GL_SAMPLER_2D_SHADOW */
6822+ 529, /* GL_GL_FLOAT_MAT2x3 */
6823+ 530, /* GL_GL_FLOAT_MAT2x4 */
6824+ 531, /* GL_GL_FLOAT_MAT3x2 */
6825+ 532, /* GL_GL_FLOAT_MAT3x4 */
6826+ 533, /* GL_GL_FLOAT_MAT4x2 */
6827+ 534, /* GL_GL_FLOAT_MAT4x3 */
6828+ 312, /* GL_DELETE_STATUS */
6829+ 221, /* GL_COMPILE_STATUS */
6830+ 659, /* GL_LINK_STATUS */
6831+ 1673, /* GL_VALIDATE_STATUS */
6832+ 591, /* GL_INFO_LOG_LENGTH */
6833+ 56, /* GL_ATTACHED_SHADERS */
6834+ 20, /* GL_ACTIVE_UNIFORMS */
6835+ 21, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
6836+ 1337, /* GL_SHADER_SOURCE_LENGTH */
6837+ 15, /* GL_ACTIVE_ATTRIBUTES */
6838+ 16, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
6839+ 488, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
6840+ 1340, /* GL_SHADING_LANGUAGE_VERSION */
6841+ 290, /* GL_CURRENT_PROGRAM */
6842+ 1034, /* GL_PALETTE4_RGB8_OES */
6843+ 1036, /* GL_PALETTE4_RGBA8_OES */
6844+ 1032, /* GL_PALETTE4_R5_G6_B5_OES */
6845+ 1035, /* GL_PALETTE4_RGBA4_OES */
6846+ 1033, /* GL_PALETTE4_RGB5_A1_OES */
6847+ 1039, /* GL_PALETTE8_RGB8_OES */
6848+ 1041, /* GL_PALETTE8_RGBA8_OES */
6849+ 1037, /* GL_PALETTE8_R5_G6_B5_OES */
6850+ 1040, /* GL_PALETTE8_RGBA4_OES */
6851+ 1038, /* GL_PALETTE8_RGB5_A1_OES */
6852+ 574, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
6853+ 573, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
6854+ 1507, /* GL_TEXTURE_1D_ARRAY_EXT */
6855+ 1198, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
6856+ 1509, /* GL_TEXTURE_2D_ARRAY_EXT */
6857+ 1201, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
6858+ 1515, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
6859+ 1517, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
6860+ 543, /* GL_GL_SRGB */
6861+ 544, /* GL_GL_SRGB8 */
6862+ 546, /* GL_GL_SRGB_ALPHA */
6863+ 545, /* GL_GL_SRGB8_ALPHA8 */
6864+ 542, /* GL_GL_SLUMINANCE_ALPHA */
6865+ 541, /* GL_GL_SLUMINANCE8_ALPHA8 */
6866+ 539, /* GL_GL_SLUMINANCE */
6867+ 540, /* GL_GL_SLUMINANCE8 */
6868+ 526, /* GL_GL_COMPRESSED_SRGB */
6869+ 527, /* GL_GL_COMPRESSED_SRGB_ALPHA */
6870+ 524, /* GL_GL_COMPRESSED_SLUMINANCE */
6871+ 525, /* GL_GL_COMPRESSED_SLUMINANCE_ALPHA */
6872+ 1095, /* GL_POINT_SPRITE_COORD_ORIGIN */
6873+ 667, /* GL_LOWER_LEFT */
6874+ 1670, /* GL_UPPER_LEFT */
6875+ 1401, /* GL_STENCIL_BACK_REF */
6876+ 1402, /* GL_STENCIL_BACK_VALUE_MASK */
6877+ 1403, /* GL_STENCIL_BACK_WRITEMASK */
6878+ 403, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
6879+ 1240, /* GL_RENDERBUFFER_BINDING_EXT */
6880+ 1225, /* GL_READ_FRAMEBUFFER_EXT */
6881+ 404, /* GL_DRAW_FRAMEBUFFER_EXT */
6882+ 1224, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
6883+ 490, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
6884+ 489, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
6885+ 494, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
6886+ 492, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
6887+ 491, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
6888+ 496, /* GL_FRAMEBUFFER_COMPLETE_EXT */
6889+ 498, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
6890+ 503, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
6891+ 501, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
6892+ 499, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
6893+ 502, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
6894+ 500, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
6895+ 504, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
6896+ 506, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
6897+ 505, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
6898+ 801, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
6899+ 146, /* GL_COLOR_ATTACHMENT0_EXT */
6900+ 153, /* GL_COLOR_ATTACHMENT1_EXT */
6901+ 154, /* GL_COLOR_ATTACHMENT2_EXT */
6902+ 155, /* GL_COLOR_ATTACHMENT3_EXT */
6903+ 156, /* GL_COLOR_ATTACHMENT4_EXT */
6904+ 157, /* GL_COLOR_ATTACHMENT5_EXT */
6905+ 158, /* GL_COLOR_ATTACHMENT6_EXT */
6906+ 159, /* GL_COLOR_ATTACHMENT7_EXT */
6907+ 160, /* GL_COLOR_ATTACHMENT8_EXT */
6908+ 161, /* GL_COLOR_ATTACHMENT9_EXT */
6909+ 147, /* GL_COLOR_ATTACHMENT10_EXT */
6910+ 148, /* GL_COLOR_ATTACHMENT11_EXT */
6911+ 149, /* GL_COLOR_ATTACHMENT12_EXT */
6912+ 150, /* GL_COLOR_ATTACHMENT13_EXT */
6913+ 151, /* GL_COLOR_ATTACHMENT14_EXT */
6914+ 152, /* GL_COLOR_ATTACHMENT15_EXT */
6915+ 314, /* GL_DEPTH_ATTACHMENT_EXT */
6916+ 1396, /* GL_STENCIL_ATTACHMENT_EXT */
6917+ 497, /* GL_FRAMEBUFFER_EXT */
6918+ 1241, /* GL_RENDERBUFFER_EXT */
6919+ 1244, /* GL_RENDERBUFFER_WIDTH_EXT */
6920+ 1242, /* GL_RENDERBUFFER_HEIGHT_EXT */
6921+ 1243, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
6922+ 1414, /* GL_STENCIL_INDEX_EXT */
6923+ 1411, /* GL_STENCIL_INDEX1_EXT */
6924+ 1412, /* GL_STENCIL_INDEX4_EXT */
6925+ 1413, /* GL_STENCIL_INDEX8_EXT */
6926+ 1410, /* GL_STENCIL_INDEX16_EXT */
6927+ 428, /* GL_EVAL_BIT */
6928+ 1222, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
6929+ 661, /* GL_LIST_BIT */
6930+ 1523, /* GL_TEXTURE_BIT */
6931+ 1319, /* GL_SCISSOR_BIT */
6932+ 29, /* GL_ALL_ATTRIB_BITS */
6933+ 941, /* GL_MULTISAMPLE_BIT */
6934+ 30, /* GL_ALL_CLIENT_ATTRIB_BITS */
6935+};
6936+
6937+#define Elements(x) sizeof(x)/sizeof(*x)
6938+
6939+typedef int (*cfunc)(const void *, const void *);
6940+
6941+/**
6942+ * Compare a key name to an element in the \c all_enums array.
6943+ *
6944+ * \c bsearch always passes the key as the first parameter and the pointer
6945+ * to the array element as the second parameter. We can elimiate some
6946+ * extra work by taking advantage of that fact.
6947+ *
6948+ * \param a Pointer to the desired enum name.
6949+ * \param b Pointer to an element of the \c all_enums array.
6950+ */
6951+static int compar_name( const char *a, const enum_elt *b )
6952+{
6953+ return _mesa_strcmp( a, & enum_string_table[ b->offset ] );
6954+}
6955+
6956+/**
6957+ * Compare a key enum value to an element in the \c all_enums array.
6958+ *
6959+ * \c bsearch always passes the key as the first parameter and the pointer
6960+ * to the array element as the second parameter. We can elimiate some
6961+ * extra work by taking advantage of that fact.
6962+ *
6963+ * \param a Pointer to the desired enum name.
6964+ * \param b Pointer to an index into the \c all_enums array.
6965+ */
6966+static int compar_nr( const int *a, const unsigned *b )
6967+{
6968+ return a[0] - all_enums[*b].n;
6969+}
6970+
6971+
6972+static char token_tmp[20];
6973+
6974+const char *_mesa_lookup_enum_by_nr( int nr )
6975+{
6976+ unsigned * i;
6977+
6978+ i = (unsigned *)bsearch( & nr, reduced_enums, Elements(reduced_enums),
6979+ sizeof(reduced_enums[0]), (cfunc) compar_nr );
6980+
6981+ if ( i != NULL ) {
6982+ return & enum_string_table[ all_enums[ *i ].offset ];
6983+ }
6984+ else {
6985+ /* this is not re-entrant safe, no big deal here */
6986+ _mesa_sprintf(token_tmp, "0x%x", nr);
6987+ return token_tmp;
6988+ }
6989+}
6990+
6991+int _mesa_lookup_enum_by_name( const char *symbol )
6992+{
6993+ enum_elt * f = NULL;
6994+
6995+ if ( symbol != NULL ) {
6996+ f = (enum_elt *)bsearch( symbol, all_enums, Elements(all_enums),
6997+ sizeof( enum_elt ), (cfunc) compar_name );
6998+ }
6999+
7000+ return (f != NULL) ? f->n : -1;
7001+}
7002+
7003+
7004Index: qemu-0.14.0/target-i386/mesa_get.c
7005===================================================================
7006--- /dev/null
7007+++ qemu-0.14.0/target-i386/mesa_get.c
7008@@ -0,0 +1,5563 @@
7009+
7010+/***
7011+ *** NOTE!!! DO NOT EDIT THIS FILE!!! IT IS GENERATED BY get_gen.py
7012+ ***/
7013+
7014+#include "glheader.h"
7015+#include "context.h"
7016+#include "enable.h"
7017+#include "extensions.h"
7018+#include "fbobject.h"
7019+#include "get.h"
7020+#include "macros.h"
7021+#include "mtypes.h"
7022+#include "state.h"
7023+#include "texcompress.h"
7024+
7025+
7026+#define FLOAT_TO_BOOLEAN(X) ( (X) ? GL_TRUE : GL_FALSE )
7027+
7028+#define INT_TO_BOOLEAN(I) ( (I) ? GL_TRUE : GL_FALSE )
7029+
7030+#define ENUM_TO_BOOLEAN(E) ( (E) ? GL_TRUE : GL_FALSE )
7031+#define ENUM_TO_INT(E) ( (GLint) (E) )
7032+#define ENUM_TO_FLOAT(E) ( (GLfloat) (E) )
7033+
7034+#define BOOLEAN_TO_INT(B) ( (GLint) (B) )
7035+#define BOOLEAN_TO_FLOAT(B) ( (B) ? 1.0F : 0.0F )
7036+
7037+
7038+/*
7039+ * Check if named extension is enabled, if not generate error and return.
7040+ */
7041+#define CHECK_EXT1(EXT1, FUNC) \
7042+ if (!ctx->Extensions.EXT1) { \
7043+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
7044+ return; \
7045+ }
7046+
7047+/*
7048+ * Check if either of two extensions is enabled.
7049+ */
7050+#define CHECK_EXT2(EXT1, EXT2, FUNC) \
7051+ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2) { \
7052+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
7053+ return; \
7054+ }
7055+
7056+/*
7057+ * Check if either of three extensions is enabled.
7058+ */
7059+#define CHECK_EXT3(EXT1, EXT2, EXT3, FUNC) \
7060+ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2 && \
7061+ !ctx->Extensions.EXT3) { \
7062+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
7063+ return; \
7064+ }
7065+
7066+/*
7067+ * Check if either of four extensions is enabled.
7068+ */
7069+#define CHECK_EXT4(EXT1, EXT2, EXT3, EXT4, FUNC) \
7070+ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2 && \
7071+ !ctx->Extensions.EXT3 && !ctx->Extensions.EXT4) { \
7072+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
7073+ return; \
7074+ }
7075+
7076+
7077+void GLAPIENTRY
7078+_mesa_GetBooleanv( GLenum pname, GLboolean *params )
7079+{
7080+ GET_CURRENT_CONTEXT(ctx);
7081+ ASSERT_OUTSIDE_BEGIN_END(ctx);
7082+
7083+ if (!params)
7084+ return;
7085+
7086+ if (ctx->NewState)
7087+ _mesa_update_state(ctx);
7088+
7089+ if (ctx->Driver.GetBooleanv &&
7090+ ctx->Driver.GetBooleanv(ctx, pname, params))
7091+ return;
7092+
7093+ switch (pname) {
7094+ case GL_ACCUM_RED_BITS:
7095+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumRedBits);
7096+ break;
7097+ case GL_ACCUM_GREEN_BITS:
7098+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumGreenBits);
7099+ break;
7100+ case GL_ACCUM_BLUE_BITS:
7101+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumBlueBits);
7102+ break;
7103+ case GL_ACCUM_ALPHA_BITS:
7104+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumAlphaBits);
7105+ break;
7106+ case GL_ACCUM_CLEAR_VALUE:
7107+ params[0] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[0]);
7108+ params[1] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[1]);
7109+ params[2] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[2]);
7110+ params[3] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[3]);
7111+ break;
7112+ case GL_ALPHA_BIAS:
7113+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.AlphaBias);
7114+ break;
7115+ case GL_ALPHA_BITS:
7116+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.alphaBits);
7117+ break;
7118+ case GL_ALPHA_SCALE:
7119+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.AlphaScale);
7120+ break;
7121+ case GL_ALPHA_TEST:
7122+ params[0] = ctx->Color.AlphaEnabled;
7123+ break;
7124+ case GL_ALPHA_TEST_FUNC:
7125+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.AlphaFunc);
7126+ break;
7127+ case GL_ALPHA_TEST_REF:
7128+ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.AlphaRef);
7129+ break;
7130+ case GL_ATTRIB_STACK_DEPTH:
7131+ params[0] = INT_TO_BOOLEAN(ctx->AttribStackDepth);
7132+ break;
7133+ case GL_AUTO_NORMAL:
7134+ params[0] = ctx->Eval.AutoNormal;
7135+ break;
7136+ case GL_AUX_BUFFERS:
7137+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.numAuxBuffers);
7138+ break;
7139+ case GL_BLEND:
7140+ params[0] = ctx->Color.BlendEnabled;
7141+ break;
7142+ case GL_BLEND_DST:
7143+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstRGB);
7144+ break;
7145+ case GL_BLEND_SRC:
7146+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcRGB);
7147+ break;
7148+ case GL_BLEND_SRC_RGB_EXT:
7149+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcRGB);
7150+ break;
7151+ case GL_BLEND_DST_RGB_EXT:
7152+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstRGB);
7153+ break;
7154+ case GL_BLEND_SRC_ALPHA_EXT:
7155+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcA);
7156+ break;
7157+ case GL_BLEND_DST_ALPHA_EXT:
7158+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstA);
7159+ break;
7160+ case GL_BLEND_EQUATION:
7161+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendEquationRGB );
7162+ break;
7163+ case GL_BLEND_EQUATION_ALPHA_EXT:
7164+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendEquationA );
7165+ break;
7166+ case GL_BLEND_COLOR_EXT:
7167+ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[0]);
7168+ params[1] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[1]);
7169+ params[2] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[2]);
7170+ params[3] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[3]);
7171+ break;
7172+ case GL_BLUE_BIAS:
7173+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.BlueBias);
7174+ break;
7175+ case GL_BLUE_BITS:
7176+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.blueBits);
7177+ break;
7178+ case GL_BLUE_SCALE:
7179+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.BlueScale);
7180+ break;
7181+ case GL_CLIENT_ATTRIB_STACK_DEPTH:
7182+ params[0] = INT_TO_BOOLEAN(ctx->ClientAttribStackDepth);
7183+ break;
7184+ case GL_CLIP_PLANE0:
7185+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 0) & 1;
7186+ break;
7187+ case GL_CLIP_PLANE1:
7188+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 1) & 1;
7189+ break;
7190+ case GL_CLIP_PLANE2:
7191+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 2) & 1;
7192+ break;
7193+ case GL_CLIP_PLANE3:
7194+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 3) & 1;
7195+ break;
7196+ case GL_CLIP_PLANE4:
7197+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 4) & 1;
7198+ break;
7199+ case GL_CLIP_PLANE5:
7200+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 5) & 1;
7201+ break;
7202+ case GL_COLOR_CLEAR_VALUE:
7203+ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[0]);
7204+ params[1] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[1]);
7205+ params[2] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[2]);
7206+ params[3] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[3]);
7207+ break;
7208+ case GL_COLOR_MATERIAL:
7209+ params[0] = ctx->Light.ColorMaterialEnabled;
7210+ break;
7211+ case GL_COLOR_MATERIAL_FACE:
7212+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ColorMaterialFace);
7213+ break;
7214+ case GL_COLOR_MATERIAL_PARAMETER:
7215+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ColorMaterialMode);
7216+ break;
7217+ case GL_COLOR_WRITEMASK:
7218+ params[0] = INT_TO_BOOLEAN(ctx->Color.ColorMask[RCOMP] ? 1 : 0);
7219+ params[1] = INT_TO_BOOLEAN(ctx->Color.ColorMask[GCOMP] ? 1 : 0);
7220+ params[2] = INT_TO_BOOLEAN(ctx->Color.ColorMask[BCOMP] ? 1 : 0);
7221+ params[3] = INT_TO_BOOLEAN(ctx->Color.ColorMask[ACOMP] ? 1 : 0);
7222+ break;
7223+ case GL_CULL_FACE:
7224+ params[0] = ctx->Polygon.CullFlag;
7225+ break;
7226+ case GL_CULL_FACE_MODE:
7227+ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.CullFaceMode);
7228+ break;
7229+ case GL_CURRENT_COLOR:
7230+ {
7231+ FLUSH_CURRENT(ctx, 0);
7232+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]);
7233+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]);
7234+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]);
7235+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]);
7236+ }
7237+ break;
7238+ case GL_CURRENT_INDEX:
7239+ {
7240+ FLUSH_CURRENT(ctx, 0);
7241+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]);
7242+ }
7243+ break;
7244+ case GL_CURRENT_NORMAL:
7245+ {
7246+ FLUSH_CURRENT(ctx, 0);
7247+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]);
7248+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]);
7249+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]);
7250+ }
7251+ break;
7252+ case GL_CURRENT_RASTER_COLOR:
7253+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[0]);
7254+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[1]);
7255+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[2]);
7256+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[3]);
7257+ break;
7258+ case GL_CURRENT_RASTER_DISTANCE:
7259+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterDistance);
7260+ break;
7261+ case GL_CURRENT_RASTER_INDEX:
7262+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterIndex);
7263+ break;
7264+ case GL_CURRENT_RASTER_POSITION:
7265+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[0]);
7266+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[1]);
7267+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[2]);
7268+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[3]);
7269+ break;
7270+ case GL_CURRENT_RASTER_SECONDARY_COLOR:
7271+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[0]);
7272+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[1]);
7273+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[2]);
7274+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[3]);
7275+ break;
7276+ case GL_CURRENT_RASTER_TEXTURE_COORDS:
7277+ {
7278+ const GLuint texUnit = ctx->Texture.CurrentUnit;
7279+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][0]);
7280+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][1]);
7281+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][2]);
7282+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][3]);
7283+ }
7284+ break;
7285+ case GL_CURRENT_RASTER_POSITION_VALID:
7286+ params[0] = ctx->Current.RasterPosValid;
7287+ break;
7288+ case GL_CURRENT_TEXTURE_COORDS:
7289+ {
7290+ const GLuint texUnit = ctx->Texture.CurrentUnit;
7291+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]);
7292+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]);
7293+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]);
7294+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]);
7295+ }
7296+ break;
7297+ case GL_DEPTH_BIAS:
7298+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.DepthBias);
7299+ break;
7300+ case GL_DEPTH_BITS:
7301+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.depthBits);
7302+ break;
7303+ case GL_DEPTH_CLEAR_VALUE:
7304+ params[0] = FLOAT_TO_BOOLEAN(ctx->Depth.Clear);
7305+ break;
7306+ case GL_DEPTH_FUNC:
7307+ params[0] = ENUM_TO_BOOLEAN(ctx->Depth.Func);
7308+ break;
7309+ case GL_DEPTH_RANGE:
7310+ params[0] = FLOAT_TO_BOOLEAN(ctx->Viewport.Near);
7311+ params[1] = FLOAT_TO_BOOLEAN(ctx->Viewport.Far);
7312+ break;
7313+ case GL_DEPTH_SCALE:
7314+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.DepthScale);
7315+ break;
7316+ case GL_DEPTH_TEST:
7317+ params[0] = ctx->Depth.Test;
7318+ break;
7319+ case GL_DEPTH_WRITEMASK:
7320+ params[0] = ctx->Depth.Mask;
7321+ break;
7322+ case GL_DITHER:
7323+ params[0] = ctx->Color.DitherFlag;
7324+ break;
7325+ case GL_DOUBLEBUFFER:
7326+ params[0] = ctx->DrawBuffer->Visual.doubleBufferMode;
7327+ break;
7328+ case GL_DRAW_BUFFER:
7329+ params[0] = ENUM_TO_BOOLEAN(ctx->DrawBuffer->ColorDrawBuffer[0]);
7330+ break;
7331+ case GL_EDGE_FLAG:
7332+ {
7333+ FLUSH_CURRENT(ctx, 0);
7334+ params[0] = ctx->Current.EdgeFlag;
7335+ }
7336+ break;
7337+ case GL_FEEDBACK_BUFFER_SIZE:
7338+ params[0] = INT_TO_BOOLEAN(ctx->Feedback.BufferSize);
7339+ break;
7340+ case GL_FEEDBACK_BUFFER_TYPE:
7341+ params[0] = ENUM_TO_BOOLEAN(ctx->Feedback.Type);
7342+ break;
7343+ case GL_FOG:
7344+ params[0] = ctx->Fog.Enabled;
7345+ break;
7346+ case GL_FOG_COLOR:
7347+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[0]);
7348+ params[1] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[1]);
7349+ params[2] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[2]);
7350+ params[3] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[3]);
7351+ break;
7352+ case GL_FOG_DENSITY:
7353+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Density);
7354+ break;
7355+ case GL_FOG_END:
7356+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.End);
7357+ break;
7358+ case GL_FOG_HINT:
7359+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.Fog);
7360+ break;
7361+ case GL_FOG_INDEX:
7362+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Index);
7363+ break;
7364+ case GL_FOG_MODE:
7365+ params[0] = ENUM_TO_BOOLEAN(ctx->Fog.Mode);
7366+ break;
7367+ case GL_FOG_START:
7368+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Start);
7369+ break;
7370+ case GL_FRONT_FACE:
7371+ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.FrontFace);
7372+ break;
7373+ case GL_GREEN_BIAS:
7374+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.GreenBias);
7375+ break;
7376+ case GL_GREEN_BITS:
7377+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.greenBits);
7378+ break;
7379+ case GL_GREEN_SCALE:
7380+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.GreenScale);
7381+ break;
7382+ case GL_INDEX_BITS:
7383+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.indexBits);
7384+ break;
7385+ case GL_INDEX_CLEAR_VALUE:
7386+ params[0] = INT_TO_BOOLEAN(ctx->Color.ClearIndex);
7387+ break;
7388+ case GL_INDEX_MODE:
7389+ params[0] = !ctx->DrawBuffer->Visual.rgbMode;
7390+ break;
7391+ case GL_INDEX_OFFSET:
7392+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.IndexOffset);
7393+ break;
7394+ case GL_INDEX_SHIFT:
7395+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.IndexShift);
7396+ break;
7397+ case GL_INDEX_WRITEMASK:
7398+ params[0] = INT_TO_BOOLEAN(ctx->Color.IndexMask);
7399+ break;
7400+ case GL_LIGHT0:
7401+ params[0] = ctx->Light.Light[0].Enabled;
7402+ break;
7403+ case GL_LIGHT1:
7404+ params[0] = ctx->Light.Light[1].Enabled;
7405+ break;
7406+ case GL_LIGHT2:
7407+ params[0] = ctx->Light.Light[2].Enabled;
7408+ break;
7409+ case GL_LIGHT3:
7410+ params[0] = ctx->Light.Light[3].Enabled;
7411+ break;
7412+ case GL_LIGHT4:
7413+ params[0] = ctx->Light.Light[4].Enabled;
7414+ break;
7415+ case GL_LIGHT5:
7416+ params[0] = ctx->Light.Light[5].Enabled;
7417+ break;
7418+ case GL_LIGHT6:
7419+ params[0] = ctx->Light.Light[6].Enabled;
7420+ break;
7421+ case GL_LIGHT7:
7422+ params[0] = ctx->Light.Light[7].Enabled;
7423+ break;
7424+ case GL_LIGHTING:
7425+ params[0] = ctx->Light.Enabled;
7426+ break;
7427+ case GL_LIGHT_MODEL_AMBIENT:
7428+ params[0] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[0]);
7429+ params[1] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[1]);
7430+ params[2] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[2]);
7431+ params[3] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[3]);
7432+ break;
7433+ case GL_LIGHT_MODEL_COLOR_CONTROL:
7434+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.Model.ColorControl);
7435+ break;
7436+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
7437+ params[0] = ctx->Light.Model.LocalViewer;
7438+ break;
7439+ case GL_LIGHT_MODEL_TWO_SIDE:
7440+ params[0] = ctx->Light.Model.TwoSide;
7441+ break;
7442+ case GL_LINE_SMOOTH:
7443+ params[0] = ctx->Line.SmoothFlag;
7444+ break;
7445+ case GL_LINE_SMOOTH_HINT:
7446+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.LineSmooth);
7447+ break;
7448+ case GL_LINE_STIPPLE:
7449+ params[0] = ctx->Line.StippleFlag;
7450+ break;
7451+ case GL_LINE_STIPPLE_PATTERN:
7452+ params[0] = INT_TO_BOOLEAN(ctx->Line.StipplePattern);
7453+ break;
7454+ case GL_LINE_STIPPLE_REPEAT:
7455+ params[0] = INT_TO_BOOLEAN(ctx->Line.StippleFactor);
7456+ break;
7457+ case GL_LINE_WIDTH:
7458+ params[0] = FLOAT_TO_BOOLEAN(ctx->Line.Width);
7459+ break;
7460+ case GL_LINE_WIDTH_GRANULARITY:
7461+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.LineWidthGranularity);
7462+ break;
7463+ case GL_LINE_WIDTH_RANGE:
7464+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinLineWidthAA);
7465+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxLineWidthAA);
7466+ break;
7467+ case GL_ALIASED_LINE_WIDTH_RANGE:
7468+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinLineWidth);
7469+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxLineWidth);
7470+ break;
7471+ case GL_LIST_BASE:
7472+ params[0] = INT_TO_BOOLEAN(ctx->List.ListBase);
7473+ break;
7474+ case GL_LIST_INDEX:
7475+ params[0] = INT_TO_BOOLEAN(ctx->ListState.CurrentListNum);
7476+ break;
7477+ case GL_LIST_MODE:
7478+ {
7479+ GLenum mode;
7480+ if (!ctx->CompileFlag)
7481+ mode = 0;
7482+ else if (ctx->ExecuteFlag)
7483+ mode = GL_COMPILE_AND_EXECUTE;
7484+ else
7485+ mode = GL_COMPILE;
7486+ params[0] = ENUM_TO_BOOLEAN(mode);
7487+ }
7488+ break;
7489+ case GL_INDEX_LOGIC_OP:
7490+ params[0] = ctx->Color.IndexLogicOpEnabled;
7491+ break;
7492+ case GL_COLOR_LOGIC_OP:
7493+ params[0] = ctx->Color.ColorLogicOpEnabled;
7494+ break;
7495+ case GL_LOGIC_OP_MODE:
7496+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.LogicOp);
7497+ break;
7498+ case GL_MAP1_COLOR_4:
7499+ params[0] = ctx->Eval.Map1Color4;
7500+ break;
7501+ case GL_MAP1_GRID_DOMAIN:
7502+ params[0] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid1u1);
7503+ params[1] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid1u2);
7504+ break;
7505+ case GL_MAP1_GRID_SEGMENTS:
7506+ params[0] = INT_TO_BOOLEAN(ctx->Eval.MapGrid1un);
7507+ break;
7508+ case GL_MAP1_INDEX:
7509+ params[0] = ctx->Eval.Map1Index;
7510+ break;
7511+ case GL_MAP1_NORMAL:
7512+ params[0] = ctx->Eval.Map1Normal;
7513+ break;
7514+ case GL_MAP1_TEXTURE_COORD_1:
7515+ params[0] = ctx->Eval.Map1TextureCoord1;
7516+ break;
7517+ case GL_MAP1_TEXTURE_COORD_2:
7518+ params[0] = ctx->Eval.Map1TextureCoord2;
7519+ break;
7520+ case GL_MAP1_TEXTURE_COORD_3:
7521+ params[0] = ctx->Eval.Map1TextureCoord3;
7522+ break;
7523+ case GL_MAP1_TEXTURE_COORD_4:
7524+ params[0] = ctx->Eval.Map1TextureCoord4;
7525+ break;
7526+ case GL_MAP1_VERTEX_3:
7527+ params[0] = ctx->Eval.Map1Vertex3;
7528+ break;
7529+ case GL_MAP1_VERTEX_4:
7530+ params[0] = ctx->Eval.Map1Vertex4;
7531+ break;
7532+ case GL_MAP2_COLOR_4:
7533+ params[0] = ctx->Eval.Map2Color4;
7534+ break;
7535+ case GL_MAP2_GRID_DOMAIN:
7536+ params[0] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2u1);
7537+ params[1] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2u2);
7538+ params[2] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2v1);
7539+ params[3] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2v2);
7540+ break;
7541+ case GL_MAP2_GRID_SEGMENTS:
7542+ params[0] = INT_TO_BOOLEAN(ctx->Eval.MapGrid2un);
7543+ params[1] = INT_TO_BOOLEAN(ctx->Eval.MapGrid2vn);
7544+ break;
7545+ case GL_MAP2_INDEX:
7546+ params[0] = ctx->Eval.Map2Index;
7547+ break;
7548+ case GL_MAP2_NORMAL:
7549+ params[0] = ctx->Eval.Map2Normal;
7550+ break;
7551+ case GL_MAP2_TEXTURE_COORD_1:
7552+ params[0] = ctx->Eval.Map2TextureCoord1;
7553+ break;
7554+ case GL_MAP2_TEXTURE_COORD_2:
7555+ params[0] = ctx->Eval.Map2TextureCoord2;
7556+ break;
7557+ case GL_MAP2_TEXTURE_COORD_3:
7558+ params[0] = ctx->Eval.Map2TextureCoord3;
7559+ break;
7560+ case GL_MAP2_TEXTURE_COORD_4:
7561+ params[0] = ctx->Eval.Map2TextureCoord4;
7562+ break;
7563+ case GL_MAP2_VERTEX_3:
7564+ params[0] = ctx->Eval.Map2Vertex3;
7565+ break;
7566+ case GL_MAP2_VERTEX_4:
7567+ params[0] = ctx->Eval.Map2Vertex4;
7568+ break;
7569+ case GL_MAP_COLOR:
7570+ params[0] = ctx->Pixel.MapColorFlag;
7571+ break;
7572+ case GL_MAP_STENCIL:
7573+ params[0] = ctx->Pixel.MapStencilFlag;
7574+ break;
7575+ case GL_MATRIX_MODE:
7576+ params[0] = ENUM_TO_BOOLEAN(ctx->Transform.MatrixMode);
7577+ break;
7578+ case GL_MAX_ATTRIB_STACK_DEPTH:
7579+ params[0] = INT_TO_BOOLEAN(MAX_ATTRIB_STACK_DEPTH);
7580+ break;
7581+ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
7582+ params[0] = INT_TO_BOOLEAN(MAX_CLIENT_ATTRIB_STACK_DEPTH);
7583+ break;
7584+ case GL_MAX_CLIP_PLANES:
7585+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxClipPlanes);
7586+ break;
7587+ case GL_MAX_ELEMENTS_VERTICES:
7588+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxArrayLockSize);
7589+ break;
7590+ case GL_MAX_ELEMENTS_INDICES:
7591+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxArrayLockSize);
7592+ break;
7593+ case GL_MAX_EVAL_ORDER:
7594+ params[0] = INT_TO_BOOLEAN(MAX_EVAL_ORDER);
7595+ break;
7596+ case GL_MAX_LIGHTS:
7597+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxLights);
7598+ break;
7599+ case GL_MAX_LIST_NESTING:
7600+ params[0] = INT_TO_BOOLEAN(MAX_LIST_NESTING);
7601+ break;
7602+ case GL_MAX_MODELVIEW_STACK_DEPTH:
7603+ params[0] = INT_TO_BOOLEAN(MAX_MODELVIEW_STACK_DEPTH);
7604+ break;
7605+ case GL_MAX_NAME_STACK_DEPTH:
7606+ params[0] = INT_TO_BOOLEAN(MAX_NAME_STACK_DEPTH);
7607+ break;
7608+ case GL_MAX_PIXEL_MAP_TABLE:
7609+ params[0] = INT_TO_BOOLEAN(MAX_PIXEL_MAP_TABLE);
7610+ break;
7611+ case GL_MAX_PROJECTION_STACK_DEPTH:
7612+ params[0] = INT_TO_BOOLEAN(MAX_PROJECTION_STACK_DEPTH);
7613+ break;
7614+ case GL_MAX_TEXTURE_SIZE:
7615+ params[0] = INT_TO_BOOLEAN(1 << (ctx->Const.MaxTextureLevels - 1));
7616+ break;
7617+ case GL_MAX_3D_TEXTURE_SIZE:
7618+ params[0] = INT_TO_BOOLEAN(1 << (ctx->Const.Max3DTextureLevels - 1));
7619+ break;
7620+ case GL_MAX_TEXTURE_STACK_DEPTH:
7621+ params[0] = INT_TO_BOOLEAN(MAX_TEXTURE_STACK_DEPTH);
7622+ break;
7623+ case GL_MAX_VIEWPORT_DIMS:
7624+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxViewportWidth);
7625+ params[1] = INT_TO_BOOLEAN(ctx->Const.MaxViewportHeight);
7626+ break;
7627+ case GL_MODELVIEW_MATRIX:
7628+ {
7629+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
7630+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7631+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
7632+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
7633+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
7634+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
7635+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7636+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
7637+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
7638+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
7639+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
7640+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7641+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
7642+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
7643+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
7644+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
7645+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7646+ }
7647+ break;
7648+ case GL_MODELVIEW_STACK_DEPTH:
7649+ params[0] = INT_TO_BOOLEAN(ctx->ModelviewMatrixStack.Depth + 1);
7650+ break;
7651+ case GL_NAME_STACK_DEPTH:
7652+ params[0] = INT_TO_BOOLEAN(ctx->Select.NameStackDepth);
7653+ break;
7654+ case GL_NORMALIZE:
7655+ params[0] = ctx->Transform.Normalize;
7656+ break;
7657+ case GL_PACK_ALIGNMENT:
7658+ params[0] = INT_TO_BOOLEAN(ctx->Pack.Alignment);
7659+ break;
7660+ case GL_PACK_LSB_FIRST:
7661+ params[0] = ctx->Pack.LsbFirst;
7662+ break;
7663+ case GL_PACK_ROW_LENGTH:
7664+ params[0] = INT_TO_BOOLEAN(ctx->Pack.RowLength);
7665+ break;
7666+ case GL_PACK_SKIP_PIXELS:
7667+ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipPixels);
7668+ break;
7669+ case GL_PACK_SKIP_ROWS:
7670+ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipRows);
7671+ break;
7672+ case GL_PACK_SWAP_BYTES:
7673+ params[0] = ctx->Pack.SwapBytes;
7674+ break;
7675+ case GL_PACK_SKIP_IMAGES_EXT:
7676+ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipImages);
7677+ break;
7678+ case GL_PACK_IMAGE_HEIGHT_EXT:
7679+ params[0] = INT_TO_BOOLEAN(ctx->Pack.ImageHeight);
7680+ break;
7681+ case GL_PACK_INVERT_MESA:
7682+ params[0] = ctx->Pack.Invert;
7683+ break;
7684+ case GL_PERSPECTIVE_CORRECTION_HINT:
7685+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PerspectiveCorrection);
7686+ break;
7687+ case GL_PIXEL_MAP_A_TO_A_SIZE:
7688+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapAtoAsize);
7689+ break;
7690+ case GL_PIXEL_MAP_B_TO_B_SIZE:
7691+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapBtoBsize);
7692+ break;
7693+ case GL_PIXEL_MAP_G_TO_G_SIZE:
7694+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapGtoGsize);
7695+ break;
7696+ case GL_PIXEL_MAP_I_TO_A_SIZE:
7697+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoAsize);
7698+ break;
7699+ case GL_PIXEL_MAP_I_TO_B_SIZE:
7700+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoBsize);
7701+ break;
7702+ case GL_PIXEL_MAP_I_TO_G_SIZE:
7703+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoGsize);
7704+ break;
7705+ case GL_PIXEL_MAP_I_TO_I_SIZE:
7706+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoIsize);
7707+ break;
7708+ case GL_PIXEL_MAP_I_TO_R_SIZE:
7709+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoRsize);
7710+ break;
7711+ case GL_PIXEL_MAP_R_TO_R_SIZE:
7712+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapRtoRsize);
7713+ break;
7714+ case GL_PIXEL_MAP_S_TO_S_SIZE:
7715+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapStoSsize);
7716+ break;
7717+ case GL_POINT_SIZE:
7718+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Size);
7719+ break;
7720+ case GL_POINT_SIZE_GRANULARITY:
7721+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.PointSizeGranularity);
7722+ break;
7723+ case GL_POINT_SIZE_RANGE:
7724+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinPointSizeAA);
7725+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxPointSizeAA);
7726+ break;
7727+ case GL_ALIASED_POINT_SIZE_RANGE:
7728+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinPointSize);
7729+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxPointSize);
7730+ break;
7731+ case GL_POINT_SMOOTH:
7732+ params[0] = ctx->Point.SmoothFlag;
7733+ break;
7734+ case GL_POINT_SMOOTH_HINT:
7735+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PointSmooth);
7736+ break;
7737+ case GL_POINT_SIZE_MIN_EXT:
7738+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.MinSize);
7739+ break;
7740+ case GL_POINT_SIZE_MAX_EXT:
7741+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.MaxSize);
7742+ break;
7743+ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
7744+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Threshold);
7745+ break;
7746+ case GL_DISTANCE_ATTENUATION_EXT:
7747+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Params[0]);
7748+ params[1] = FLOAT_TO_BOOLEAN(ctx->Point.Params[1]);
7749+ params[2] = FLOAT_TO_BOOLEAN(ctx->Point.Params[2]);
7750+ break;
7751+ case GL_POLYGON_MODE:
7752+ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.FrontMode);
7753+ params[1] = ENUM_TO_BOOLEAN(ctx->Polygon.BackMode);
7754+ break;
7755+ case GL_POLYGON_OFFSET_BIAS_EXT:
7756+ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetUnits);
7757+ break;
7758+ case GL_POLYGON_OFFSET_FACTOR:
7759+ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetFactor );
7760+ break;
7761+ case GL_POLYGON_OFFSET_UNITS:
7762+ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetUnits );
7763+ break;
7764+ case GL_POLYGON_SMOOTH:
7765+ params[0] = ctx->Polygon.SmoothFlag;
7766+ break;
7767+ case GL_POLYGON_SMOOTH_HINT:
7768+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PolygonSmooth);
7769+ break;
7770+ case GL_POLYGON_STIPPLE:
7771+ params[0] = ctx->Polygon.StippleFlag;
7772+ break;
7773+ case GL_PROJECTION_MATRIX:
7774+ {
7775+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
7776+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7777+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
7778+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
7779+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
7780+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
7781+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7782+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
7783+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
7784+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
7785+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
7786+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7787+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
7788+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
7789+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
7790+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
7791+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7792+ }
7793+ break;
7794+ case GL_PROJECTION_STACK_DEPTH:
7795+ params[0] = INT_TO_BOOLEAN(ctx->ProjectionMatrixStack.Depth + 1);
7796+ break;
7797+ case GL_READ_BUFFER:
7798+ params[0] = ENUM_TO_BOOLEAN(ctx->ReadBuffer->ColorReadBuffer);
7799+ break;
7800+ case GL_RED_BIAS:
7801+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.RedBias);
7802+ break;
7803+ case GL_RED_BITS:
7804+ params[0] = INT_TO_BOOLEAN( ctx->DrawBuffer->Visual.redBits );
7805+ break;
7806+ case GL_RED_SCALE:
7807+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.RedScale);
7808+ break;
7809+ case GL_RENDER_MODE:
7810+ params[0] = ENUM_TO_BOOLEAN(ctx->RenderMode);
7811+ break;
7812+ case GL_RESCALE_NORMAL:
7813+ params[0] = ctx->Transform.RescaleNormals;
7814+ break;
7815+ case GL_RGBA_MODE:
7816+ params[0] = ctx->DrawBuffer->Visual.rgbMode;
7817+ break;
7818+ case GL_SCISSOR_BOX:
7819+ params[0] = INT_TO_BOOLEAN(ctx->Scissor.X);
7820+ params[1] = INT_TO_BOOLEAN(ctx->Scissor.Y);
7821+ params[2] = INT_TO_BOOLEAN(ctx->Scissor.Width);
7822+ params[3] = INT_TO_BOOLEAN(ctx->Scissor.Height);
7823+ break;
7824+ case GL_SCISSOR_TEST:
7825+ params[0] = ctx->Scissor.Enabled;
7826+ break;
7827+ case GL_SELECTION_BUFFER_SIZE:
7828+ params[0] = INT_TO_BOOLEAN(ctx->Select.BufferSize);
7829+ break;
7830+ case GL_SHADE_MODEL:
7831+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ShadeModel);
7832+ break;
7833+ case GL_SHARED_TEXTURE_PALETTE_EXT:
7834+ params[0] = ctx->Texture.SharedPalette;
7835+ break;
7836+ case GL_STENCIL_BITS:
7837+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.stencilBits);
7838+ break;
7839+ case GL_STENCIL_CLEAR_VALUE:
7840+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Clear);
7841+ break;
7842+ case GL_STENCIL_FAIL:
7843+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
7844+ break;
7845+ case GL_STENCIL_FUNC:
7846+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
7847+ break;
7848+ case GL_STENCIL_PASS_DEPTH_FAIL:
7849+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
7850+ break;
7851+ case GL_STENCIL_PASS_DEPTH_PASS:
7852+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
7853+ break;
7854+ case GL_STENCIL_REF:
7855+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Ref[ctx->Stencil.ActiveFace]);
7856+ break;
7857+ case GL_STENCIL_TEST:
7858+ params[0] = ctx->Stencil.Enabled;
7859+ break;
7860+ case GL_STENCIL_VALUE_MASK:
7861+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]);
7862+ break;
7863+ case GL_STENCIL_WRITEMASK:
7864+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]);
7865+ break;
7866+ case GL_STEREO:
7867+ params[0] = ctx->DrawBuffer->Visual.stereoMode;
7868+ break;
7869+ case GL_SUBPIXEL_BITS:
7870+ params[0] = INT_TO_BOOLEAN(ctx->Const.SubPixelBits);
7871+ break;
7872+ case GL_TEXTURE_1D:
7873+ params[0] = _mesa_IsEnabled(GL_TEXTURE_1D);
7874+ break;
7875+ case GL_TEXTURE_2D:
7876+ params[0] = _mesa_IsEnabled(GL_TEXTURE_2D);
7877+ break;
7878+ case GL_TEXTURE_3D:
7879+ params[0] = _mesa_IsEnabled(GL_TEXTURE_3D);
7880+ break;
7881+ case GL_TEXTURE_BINDING_1D:
7882+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name);
7883+ break;
7884+ case GL_TEXTURE_BINDING_2D:
7885+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name);
7886+ break;
7887+ case GL_TEXTURE_BINDING_3D:
7888+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name);
7889+ break;
7890+ case GL_TEXTURE_ENV_COLOR:
7891+ {
7892+ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
7893+ params[0] = FLOAT_TO_BOOLEAN(color[0]);
7894+ params[1] = FLOAT_TO_BOOLEAN(color[1]);
7895+ params[2] = FLOAT_TO_BOOLEAN(color[2]);
7896+ params[3] = FLOAT_TO_BOOLEAN(color[3]);
7897+ }
7898+ break;
7899+ case GL_TEXTURE_ENV_MODE:
7900+ params[0] = ENUM_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
7901+ break;
7902+ case GL_TEXTURE_GEN_S:
7903+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0);
7904+ break;
7905+ case GL_TEXTURE_GEN_T:
7906+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0);
7907+ break;
7908+ case GL_TEXTURE_GEN_R:
7909+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0);
7910+ break;
7911+ case GL_TEXTURE_GEN_Q:
7912+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0);
7913+ break;
7914+ case GL_TEXTURE_MATRIX:
7915+ {
7916+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
7917+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7918+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
7919+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
7920+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
7921+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
7922+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7923+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
7924+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
7925+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
7926+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
7927+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7928+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
7929+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
7930+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
7931+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
7932+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7933+ }
7934+ break;
7935+ case GL_TEXTURE_STACK_DEPTH:
7936+ params[0] = INT_TO_BOOLEAN(ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1);
7937+ break;
7938+ case GL_UNPACK_ALIGNMENT:
7939+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.Alignment);
7940+ break;
7941+ case GL_UNPACK_LSB_FIRST:
7942+ params[0] = ctx->Unpack.LsbFirst;
7943+ break;
7944+ case GL_UNPACK_ROW_LENGTH:
7945+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.RowLength);
7946+ break;
7947+ case GL_UNPACK_SKIP_PIXELS:
7948+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipPixels);
7949+ break;
7950+ case GL_UNPACK_SKIP_ROWS:
7951+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipRows);
7952+ break;
7953+ case GL_UNPACK_SWAP_BYTES:
7954+ params[0] = ctx->Unpack.SwapBytes;
7955+ break;
7956+ case GL_UNPACK_SKIP_IMAGES_EXT:
7957+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipImages);
7958+ break;
7959+ case GL_UNPACK_IMAGE_HEIGHT_EXT:
7960+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.ImageHeight);
7961+ break;
7962+ case GL_UNPACK_CLIENT_STORAGE_APPLE:
7963+ params[0] = ctx->Unpack.ClientStorage;
7964+ break;
7965+ case GL_VIEWPORT:
7966+ params[0] = INT_TO_BOOLEAN(ctx->Viewport.X);
7967+ params[1] = INT_TO_BOOLEAN(ctx->Viewport.Y);
7968+ params[2] = INT_TO_BOOLEAN(ctx->Viewport.Width);
7969+ params[3] = INT_TO_BOOLEAN(ctx->Viewport.Height);
7970+ break;
7971+ case GL_ZOOM_X:
7972+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.ZoomX);
7973+ break;
7974+ case GL_ZOOM_Y:
7975+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.ZoomY);
7976+ break;
7977+ case GL_VERTEX_ARRAY:
7978+ params[0] = ctx->Array.ArrayObj->Vertex.Enabled;
7979+ break;
7980+ case GL_VERTEX_ARRAY_SIZE:
7981+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Size);
7982+ break;
7983+ case GL_VERTEX_ARRAY_TYPE:
7984+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Type);
7985+ break;
7986+ case GL_VERTEX_ARRAY_STRIDE:
7987+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Stride);
7988+ break;
7989+ case GL_VERTEX_ARRAY_COUNT_EXT:
7990+ params[0] = INT_TO_BOOLEAN(0);
7991+ break;
7992+ case GL_NORMAL_ARRAY:
7993+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Enabled);
7994+ break;
7995+ case GL_NORMAL_ARRAY_TYPE:
7996+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Type);
7997+ break;
7998+ case GL_NORMAL_ARRAY_STRIDE:
7999+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Stride);
8000+ break;
8001+ case GL_NORMAL_ARRAY_COUNT_EXT:
8002+ params[0] = INT_TO_BOOLEAN(0);
8003+ break;
8004+ case GL_COLOR_ARRAY:
8005+ params[0] = ctx->Array.ArrayObj->Color.Enabled;
8006+ break;
8007+ case GL_COLOR_ARRAY_SIZE:
8008+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Size);
8009+ break;
8010+ case GL_COLOR_ARRAY_TYPE:
8011+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Type);
8012+ break;
8013+ case GL_COLOR_ARRAY_STRIDE:
8014+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Stride);
8015+ break;
8016+ case GL_COLOR_ARRAY_COUNT_EXT:
8017+ params[0] = INT_TO_BOOLEAN(0);
8018+ break;
8019+ case GL_INDEX_ARRAY:
8020+ params[0] = ctx->Array.ArrayObj->Index.Enabled;
8021+ break;
8022+ case GL_INDEX_ARRAY_TYPE:
8023+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Index.Type);
8024+ break;
8025+ case GL_INDEX_ARRAY_STRIDE:
8026+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Index.Stride);
8027+ break;
8028+ case GL_INDEX_ARRAY_COUNT_EXT:
8029+ params[0] = INT_TO_BOOLEAN(0);
8030+ break;
8031+ case GL_TEXTURE_COORD_ARRAY:
8032+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled;
8033+ break;
8034+ case GL_TEXTURE_COORD_ARRAY_SIZE:
8035+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
8036+ break;
8037+ case GL_TEXTURE_COORD_ARRAY_TYPE:
8038+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
8039+ break;
8040+ case GL_TEXTURE_COORD_ARRAY_STRIDE:
8041+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
8042+ break;
8043+ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
8044+ params[0] = INT_TO_BOOLEAN(0);
8045+ break;
8046+ case GL_EDGE_FLAG_ARRAY:
8047+ params[0] = ctx->Array.ArrayObj->EdgeFlag.Enabled;
8048+ break;
8049+ case GL_EDGE_FLAG_ARRAY_STRIDE:
8050+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->EdgeFlag.Stride);
8051+ break;
8052+ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
8053+ params[0] = INT_TO_BOOLEAN(0);
8054+ break;
8055+ case GL_MAX_TEXTURE_UNITS_ARB:
8056+ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
8057+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureUnits);
8058+ break;
8059+ case GL_ACTIVE_TEXTURE_ARB:
8060+ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
8061+ params[0] = INT_TO_BOOLEAN(GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit);
8062+ break;
8063+ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
8064+ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
8065+ params[0] = INT_TO_BOOLEAN(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
8066+ break;
8067+ case GL_TEXTURE_CUBE_MAP_ARB:
8068+ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
8069+ params[0] = _mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB);
8070+ break;
8071+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
8072+ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
8073+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name);
8074+ break;
8075+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
8076+ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
8077+ params[0] = INT_TO_BOOLEAN((1 << (ctx->Const.MaxCubeTextureLevels - 1)));
8078+ break;
8079+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
8080+ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
8081+ params[0] = INT_TO_BOOLEAN(ctx->Hint.TextureCompression);
8082+ break;
8083+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
8084+ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
8085+ params[0] = INT_TO_BOOLEAN(_mesa_get_compressed_formats(ctx, NULL, GL_FALSE));
8086+ break;
8087+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
8088+ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
8089+ {
8090+ GLint formats[100];
8091+ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
8092+ ASSERT(n <= 100);
8093+ for (i = 0; i < n; i++)
8094+ params[i] = ENUM_TO_INT(formats[i]);
8095+ }
8096+ break;
8097+ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
8098+ CHECK_EXT1(EXT_compiled_vertex_array, "GetBooleanv");
8099+ params[0] = INT_TO_BOOLEAN(ctx->Array.LockFirst);
8100+ break;
8101+ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
8102+ CHECK_EXT1(EXT_compiled_vertex_array, "GetBooleanv");
8103+ params[0] = INT_TO_BOOLEAN(ctx->Array.LockCount);
8104+ break;
8105+ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
8106+ {
8107+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
8108+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8109+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8110+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8111+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8112+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8113+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8114+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8115+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8116+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8117+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8118+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8119+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8120+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8121+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8122+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8123+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8124+ }
8125+ break;
8126+ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
8127+ {
8128+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
8129+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8130+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8131+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8132+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8133+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8134+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8135+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8136+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8137+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8138+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8139+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8140+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8141+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8142+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8143+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8144+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8145+ }
8146+ break;
8147+ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
8148+ {
8149+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
8150+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8151+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8152+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8153+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8154+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8155+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8156+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8157+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8158+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8159+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8160+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8161+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8162+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8163+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8164+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8165+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8166+ }
8167+ break;
8168+ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
8169+ {
8170+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
8171+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8172+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8173+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8174+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8175+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8176+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8177+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8178+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8179+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8180+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8181+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8182+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8183+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8184+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8185+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8186+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8187+ }
8188+ break;
8189+ case GL_COLOR_MATRIX_SGI:
8190+ {
8191+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
8192+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8193+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
8194+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
8195+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
8196+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
8197+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8198+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
8199+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
8200+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
8201+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
8202+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8203+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
8204+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
8205+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
8206+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
8207+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8208+ }
8209+ break;
8210+ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
8211+ params[0] = INT_TO_BOOLEAN(ctx->ColorMatrixStack.Depth + 1);
8212+ break;
8213+ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
8214+ params[0] = INT_TO_BOOLEAN(MAX_COLOR_STACK_DEPTH);
8215+ break;
8216+ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
8217+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[0]);
8218+ break;
8219+ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
8220+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[1]);
8221+ break;
8222+ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
8223+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[2]);
8224+ break;
8225+ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
8226+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[3]);
8227+ break;
8228+ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
8229+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[0]);
8230+ break;
8231+ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
8232+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[1]);
8233+ break;
8234+ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
8235+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[2]);
8236+ break;
8237+ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
8238+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[3]);
8239+ break;
8240+ case GL_CONVOLUTION_1D_EXT:
8241+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8242+ params[0] = ctx->Pixel.Convolution1DEnabled;
8243+ break;
8244+ case GL_CONVOLUTION_2D_EXT:
8245+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8246+ params[0] = ctx->Pixel.Convolution2DEnabled;
8247+ break;
8248+ case GL_SEPARABLE_2D_EXT:
8249+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8250+ params[0] = ctx->Pixel.Separable2DEnabled;
8251+ break;
8252+ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
8253+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8254+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[0]);
8255+ break;
8256+ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
8257+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8258+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[1]);
8259+ break;
8260+ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
8261+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8262+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[2]);
8263+ break;
8264+ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
8265+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8266+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[3]);
8267+ break;
8268+ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
8269+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8270+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[0]);
8271+ break;
8272+ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
8273+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8274+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[1]);
8275+ break;
8276+ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
8277+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8278+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[2]);
8279+ break;
8280+ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
8281+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8282+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[3]);
8283+ break;
8284+ case GL_HISTOGRAM:
8285+ CHECK_EXT1(EXT_histogram, "GetBooleanv");
8286+ params[0] = ctx->Pixel.HistogramEnabled;
8287+ break;
8288+ case GL_MINMAX:
8289+ CHECK_EXT1(EXT_histogram, "GetBooleanv");
8290+ params[0] = ctx->Pixel.MinMaxEnabled;
8291+ break;
8292+ case GL_COLOR_TABLE_SGI:
8293+ CHECK_EXT1(SGI_color_table, "GetBooleanv");
8294+ params[0] = ctx->Pixel.ColorTableEnabled;
8295+ break;
8296+ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
8297+ CHECK_EXT1(SGI_color_table, "GetBooleanv");
8298+ params[0] = ctx->Pixel.PostConvolutionColorTableEnabled;
8299+ break;
8300+ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
8301+ CHECK_EXT1(SGI_color_table, "GetBooleanv");
8302+ params[0] = ctx->Pixel.PostColorMatrixColorTableEnabled;
8303+ break;
8304+ case GL_TEXTURE_COLOR_TABLE_SGI:
8305+ CHECK_EXT1(SGI_texture_color_table, "GetBooleanv");
8306+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled;
8307+ break;
8308+ case GL_COLOR_SUM_EXT:
8309+ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetBooleanv");
8310+ params[0] = ctx->Fog.ColorSumEnabled;
8311+ break;
8312+ case GL_CURRENT_SECONDARY_COLOR_EXT:
8313+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8314+ {
8315+ FLUSH_CURRENT(ctx, 0);
8316+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]);
8317+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]);
8318+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]);
8319+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]);
8320+ }
8321+ break;
8322+ case GL_SECONDARY_COLOR_ARRAY_EXT:
8323+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8324+ params[0] = ctx->Array.ArrayObj->SecondaryColor.Enabled;
8325+ break;
8326+ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
8327+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8328+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Type);
8329+ break;
8330+ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
8331+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8332+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Stride);
8333+ break;
8334+ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
8335+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8336+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Size);
8337+ break;
8338+ case GL_CURRENT_FOG_COORDINATE_EXT:
8339+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8340+ {
8341+ FLUSH_CURRENT(ctx, 0);
8342+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_FOG][0]);
8343+ }
8344+ break;
8345+ case GL_FOG_COORDINATE_ARRAY_EXT:
8346+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8347+ params[0] = ctx->Array.ArrayObj->FogCoord.Enabled;
8348+ break;
8349+ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
8350+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8351+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.Type);
8352+ break;
8353+ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
8354+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8355+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.Stride);
8356+ break;
8357+ case GL_FOG_COORDINATE_SOURCE_EXT:
8358+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8359+ params[0] = ENUM_TO_BOOLEAN(ctx->Fog.FogCoordinateSource);
8360+ break;
8361+ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
8362+ CHECK_EXT1(EXT_texture_lod_bias, "GetBooleanv");
8363+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxTextureLodBias);
8364+ break;
8365+ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
8366+ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetBooleanv");
8367+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxTextureMaxAnisotropy);
8368+ break;
8369+ case GL_MULTISAMPLE_ARB:
8370+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8371+ params[0] = ctx->Multisample.Enabled;
8372+ break;
8373+ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
8374+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8375+ params[0] = ctx->Multisample.SampleAlphaToCoverage;
8376+ break;
8377+ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
8378+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8379+ params[0] = ctx->Multisample.SampleAlphaToOne;
8380+ break;
8381+ case GL_SAMPLE_COVERAGE_ARB:
8382+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8383+ params[0] = ctx->Multisample.SampleCoverage;
8384+ break;
8385+ case GL_SAMPLE_COVERAGE_VALUE_ARB:
8386+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8387+ params[0] = FLOAT_TO_BOOLEAN(ctx->Multisample.SampleCoverageValue);
8388+ break;
8389+ case GL_SAMPLE_COVERAGE_INVERT_ARB:
8390+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8391+ params[0] = ctx->Multisample.SampleCoverageInvert;
8392+ break;
8393+ case GL_SAMPLE_BUFFERS_ARB:
8394+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8395+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.sampleBuffers);
8396+ break;
8397+ case GL_SAMPLES_ARB:
8398+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8399+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.samples);
8400+ break;
8401+ case GL_RASTER_POSITION_UNCLIPPED_IBM:
8402+ CHECK_EXT1(IBM_rasterpos_clip, "GetBooleanv");
8403+ params[0] = ctx->Transform.RasterPositionUnclipped;
8404+ break;
8405+ case GL_POINT_SPRITE_NV:
8406+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetBooleanv");
8407+ params[0] = ctx->Point.PointSprite;
8408+ break;
8409+ case GL_POINT_SPRITE_R_MODE_NV:
8410+ CHECK_EXT1(NV_point_sprite, "GetBooleanv");
8411+ params[0] = ENUM_TO_BOOLEAN(ctx->Point.SpriteRMode);
8412+ break;
8413+ case GL_POINT_SPRITE_COORD_ORIGIN:
8414+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetBooleanv");
8415+ params[0] = ENUM_TO_BOOLEAN(ctx->Point.SpriteOrigin);
8416+ break;
8417+ case GL_GENERATE_MIPMAP_HINT_SGIS:
8418+ CHECK_EXT1(SGIS_generate_mipmap, "GetBooleanv");
8419+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.GenerateMipmap);
8420+ break;
8421+ case GL_VERTEX_PROGRAM_BINDING_NV:
8422+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8423+ params[0] = INT_TO_BOOLEAN((ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0));
8424+ break;
8425+ case GL_VERTEX_ATTRIB_ARRAY0_NV:
8426+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8427+ params[0] = ctx->Array.ArrayObj->VertexAttrib[0].Enabled;
8428+ break;
8429+ case GL_VERTEX_ATTRIB_ARRAY1_NV:
8430+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8431+ params[0] = ctx->Array.ArrayObj->VertexAttrib[1].Enabled;
8432+ break;
8433+ case GL_VERTEX_ATTRIB_ARRAY2_NV:
8434+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8435+ params[0] = ctx->Array.ArrayObj->VertexAttrib[2].Enabled;
8436+ break;
8437+ case GL_VERTEX_ATTRIB_ARRAY3_NV:
8438+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8439+ params[0] = ctx->Array.ArrayObj->VertexAttrib[3].Enabled;
8440+ break;
8441+ case GL_VERTEX_ATTRIB_ARRAY4_NV:
8442+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8443+ params[0] = ctx->Array.ArrayObj->VertexAttrib[4].Enabled;
8444+ break;
8445+ case GL_VERTEX_ATTRIB_ARRAY5_NV:
8446+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8447+ params[0] = ctx->Array.ArrayObj->VertexAttrib[5].Enabled;
8448+ break;
8449+ case GL_VERTEX_ATTRIB_ARRAY6_NV:
8450+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8451+ params[0] = ctx->Array.ArrayObj->VertexAttrib[6].Enabled;
8452+ break;
8453+ case GL_VERTEX_ATTRIB_ARRAY7_NV:
8454+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8455+ params[0] = ctx->Array.ArrayObj->VertexAttrib[7].Enabled;
8456+ break;
8457+ case GL_VERTEX_ATTRIB_ARRAY8_NV:
8458+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8459+ params[0] = ctx->Array.ArrayObj->VertexAttrib[8].Enabled;
8460+ break;
8461+ case GL_VERTEX_ATTRIB_ARRAY9_NV:
8462+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8463+ params[0] = ctx->Array.ArrayObj->VertexAttrib[9].Enabled;
8464+ break;
8465+ case GL_VERTEX_ATTRIB_ARRAY10_NV:
8466+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8467+ params[0] = ctx->Array.ArrayObj->VertexAttrib[10].Enabled;
8468+ break;
8469+ case GL_VERTEX_ATTRIB_ARRAY11_NV:
8470+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8471+ params[0] = ctx->Array.ArrayObj->VertexAttrib[11].Enabled;
8472+ break;
8473+ case GL_VERTEX_ATTRIB_ARRAY12_NV:
8474+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8475+ params[0] = ctx->Array.ArrayObj->VertexAttrib[12].Enabled;
8476+ break;
8477+ case GL_VERTEX_ATTRIB_ARRAY13_NV:
8478+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8479+ params[0] = ctx->Array.ArrayObj->VertexAttrib[13].Enabled;
8480+ break;
8481+ case GL_VERTEX_ATTRIB_ARRAY14_NV:
8482+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8483+ params[0] = ctx->Array.ArrayObj->VertexAttrib[14].Enabled;
8484+ break;
8485+ case GL_VERTEX_ATTRIB_ARRAY15_NV:
8486+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8487+ params[0] = ctx->Array.ArrayObj->VertexAttrib[15].Enabled;
8488+ break;
8489+ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
8490+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8491+ params[0] = ctx->Eval.Map1Attrib[0];
8492+ break;
8493+ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
8494+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8495+ params[0] = ctx->Eval.Map1Attrib[1];
8496+ break;
8497+ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
8498+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8499+ params[0] = ctx->Eval.Map1Attrib[2];
8500+ break;
8501+ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
8502+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8503+ params[0] = ctx->Eval.Map1Attrib[3];
8504+ break;
8505+ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
8506+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8507+ params[0] = ctx->Eval.Map1Attrib[4];
8508+ break;
8509+ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
8510+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8511+ params[0] = ctx->Eval.Map1Attrib[5];
8512+ break;
8513+ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
8514+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8515+ params[0] = ctx->Eval.Map1Attrib[6];
8516+ break;
8517+ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
8518+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8519+ params[0] = ctx->Eval.Map1Attrib[7];
8520+ break;
8521+ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
8522+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8523+ params[0] = ctx->Eval.Map1Attrib[8];
8524+ break;
8525+ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
8526+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8527+ params[0] = ctx->Eval.Map1Attrib[9];
8528+ break;
8529+ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
8530+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8531+ params[0] = ctx->Eval.Map1Attrib[10];
8532+ break;
8533+ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
8534+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8535+ params[0] = ctx->Eval.Map1Attrib[11];
8536+ break;
8537+ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
8538+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8539+ params[0] = ctx->Eval.Map1Attrib[12];
8540+ break;
8541+ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
8542+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8543+ params[0] = ctx->Eval.Map1Attrib[13];
8544+ break;
8545+ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
8546+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8547+ params[0] = ctx->Eval.Map1Attrib[14];
8548+ break;
8549+ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
8550+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8551+ params[0] = ctx->Eval.Map1Attrib[15];
8552+ break;
8553+ case GL_FRAGMENT_PROGRAM_NV:
8554+ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
8555+ params[0] = ctx->FragmentProgram.Enabled;
8556+ break;
8557+ case GL_FRAGMENT_PROGRAM_BINDING_NV:
8558+ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
8559+ params[0] = INT_TO_BOOLEAN(ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0);
8560+ break;
8561+ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
8562+ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
8563+ params[0] = INT_TO_BOOLEAN(MAX_NV_FRAGMENT_PROGRAM_PARAMS);
8564+ break;
8565+ case GL_TEXTURE_RECTANGLE_NV:
8566+ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
8567+ params[0] = _mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV);
8568+ break;
8569+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
8570+ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
8571+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name);
8572+ break;
8573+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
8574+ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
8575+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureRectSize);
8576+ break;
8577+ case GL_STENCIL_TEST_TWO_SIDE_EXT:
8578+ CHECK_EXT1(EXT_stencil_two_side, "GetBooleanv");
8579+ params[0] = ctx->Stencil.TestTwoSide;
8580+ break;
8581+ case GL_ACTIVE_STENCIL_FACE_EXT:
8582+ CHECK_EXT1(EXT_stencil_two_side, "GetBooleanv");
8583+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
8584+ break;
8585+ case GL_MAX_SHININESS_NV:
8586+ CHECK_EXT1(NV_light_max_exponent, "GetBooleanv");
8587+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxShininess);
8588+ break;
8589+ case GL_MAX_SPOT_EXPONENT_NV:
8590+ CHECK_EXT1(NV_light_max_exponent, "GetBooleanv");
8591+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxSpotExponent);
8592+ break;
8593+ case GL_ARRAY_BUFFER_BINDING_ARB:
8594+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8595+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayBufferObj->Name);
8596+ break;
8597+ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
8598+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8599+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
8600+ break;
8601+ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
8602+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8603+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.BufferObj->Name);
8604+ break;
8605+ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
8606+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8607+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.BufferObj->Name);
8608+ break;
8609+ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
8610+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8611+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Index.BufferObj->Name);
8612+ break;
8613+ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
8614+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8615+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
8616+ break;
8617+ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
8618+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8619+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
8620+ break;
8621+ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
8622+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8623+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
8624+ break;
8625+ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
8626+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8627+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
8628+ break;
8629+ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
8630+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8631+ params[0] = INT_TO_BOOLEAN(ctx->Array.ElementArrayBufferObj->Name);
8632+ break;
8633+ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
8634+ CHECK_EXT1(EXT_pixel_buffer_object, "GetBooleanv");
8635+ params[0] = INT_TO_BOOLEAN(ctx->Pack.BufferObj->Name);
8636+ break;
8637+ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
8638+ CHECK_EXT1(EXT_pixel_buffer_object, "GetBooleanv");
8639+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.BufferObj->Name);
8640+ break;
8641+ case GL_VERTEX_PROGRAM_ARB:
8642+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
8643+ params[0] = ctx->VertexProgram.Enabled;
8644+ break;
8645+ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
8646+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
8647+ params[0] = ctx->VertexProgram.PointSizeEnabled;
8648+ break;
8649+ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
8650+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
8651+ params[0] = ctx->VertexProgram.TwoSideEnabled;
8652+ break;
8653+ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
8654+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
8655+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxProgramMatrixStackDepth);
8656+ break;
8657+ case GL_MAX_PROGRAM_MATRICES_ARB:
8658+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
8659+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxProgramMatrices);
8660+ break;
8661+ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
8662+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
8663+ params[0] = ctx->CurrentStack->Depth + 1;
8664+ break;
8665+ case GL_CURRENT_MATRIX_ARB:
8666+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetBooleanv");
8667+ {
8668+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
8669+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8670+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
8671+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
8672+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
8673+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
8674+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8675+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
8676+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
8677+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
8678+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
8679+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8680+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
8681+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
8682+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
8683+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
8684+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8685+ }
8686+ break;
8687+ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
8688+ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetBooleanv");
8689+ {
8690+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
8691+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8692+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8693+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8694+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8695+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8696+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8697+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8698+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8699+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8700+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8701+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8702+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8703+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8704+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8705+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8706+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8707+ }
8708+ break;
8709+ case GL_MAX_VERTEX_ATTRIBS_ARB:
8710+ CHECK_EXT1(ARB_vertex_program, "GetBooleanv");
8711+ params[0] = INT_TO_BOOLEAN(ctx->Const.VertexProgram.MaxAttribs);
8712+ break;
8713+ case GL_PROGRAM_ERROR_POSITION_ARB:
8714+ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetBooleanv");
8715+ params[0] = INT_TO_BOOLEAN(ctx->Program.ErrorPos);
8716+ break;
8717+ case GL_FRAGMENT_PROGRAM_ARB:
8718+ CHECK_EXT1(ARB_fragment_program, "GetBooleanv");
8719+ params[0] = ctx->FragmentProgram.Enabled;
8720+ break;
8721+ case GL_MAX_TEXTURE_COORDS_ARB:
8722+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetBooleanv");
8723+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureCoordUnits);
8724+ break;
8725+ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
8726+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetBooleanv");
8727+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureImageUnits);
8728+ break;
8729+ case GL_DEPTH_BOUNDS_TEST_EXT:
8730+ CHECK_EXT1(EXT_depth_bounds_test, "GetBooleanv");
8731+ params[0] = ctx->Depth.BoundsTest;
8732+ break;
8733+ case GL_DEPTH_BOUNDS_EXT:
8734+ CHECK_EXT1(EXT_depth_bounds_test, "GetBooleanv");
8735+ params[0] = FLOAT_TO_BOOLEAN(ctx->Depth.BoundsMin);
8736+ params[1] = FLOAT_TO_BOOLEAN(ctx->Depth.BoundsMax);
8737+ break;
8738+ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
8739+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8740+ params[0] = ctx->FragmentProgram.CallbackEnabled;
8741+ break;
8742+ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
8743+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8744+ params[0] = ctx->VertexProgram.CallbackEnabled;
8745+ break;
8746+ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
8747+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8748+ params[0] = INT_TO_BOOLEAN(ctx->FragmentProgram.CurrentPosition);
8749+ break;
8750+ case GL_VERTEX_PROGRAM_POSITION_MESA:
8751+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8752+ params[0] = INT_TO_BOOLEAN(ctx->VertexProgram.CurrentPosition);
8753+ break;
8754+ case GL_MAX_DRAW_BUFFERS_ARB:
8755+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8756+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxDrawBuffers);
8757+ break;
8758+ case GL_DRAW_BUFFER0_ARB:
8759+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8760+ params[0] = ENUM_TO_BOOLEAN(ctx->DrawBuffer->ColorDrawBuffer[0]);
8761+ break;
8762+ case GL_DRAW_BUFFER1_ARB:
8763+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8764+ {
8765+ GLenum buffer;
8766+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
8767+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
8768+ return;
8769+ }
8770+ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
8771+ params[0] = ENUM_TO_BOOLEAN(buffer);
8772+ }
8773+ break;
8774+ case GL_DRAW_BUFFER2_ARB:
8775+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8776+ {
8777+ GLenum buffer;
8778+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
8779+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
8780+ return;
8781+ }
8782+ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
8783+ params[0] = ENUM_TO_BOOLEAN(buffer);
8784+ }
8785+ break;
8786+ case GL_DRAW_BUFFER3_ARB:
8787+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8788+ {
8789+ GLenum buffer;
8790+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
8791+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
8792+ return;
8793+ }
8794+ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
8795+ params[0] = ENUM_TO_BOOLEAN(buffer);
8796+ }
8797+ break;
8798+ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
8799+ CHECK_EXT1(OES_read_format, "GetBooleanv");
8800+ params[0] = INT_TO_BOOLEAN(ctx->Const.ColorReadType);
8801+ break;
8802+ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
8803+ CHECK_EXT1(OES_read_format, "GetBooleanv");
8804+ params[0] = INT_TO_BOOLEAN(ctx->Const.ColorReadFormat);
8805+ break;
8806+ case GL_NUM_FRAGMENT_REGISTERS_ATI:
8807+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8808+ params[0] = INT_TO_BOOLEAN(6);
8809+ break;
8810+ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
8811+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8812+ params[0] = INT_TO_BOOLEAN(8);
8813+ break;
8814+ case GL_NUM_PASSES_ATI:
8815+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8816+ params[0] = INT_TO_BOOLEAN(2);
8817+ break;
8818+ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
8819+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8820+ params[0] = INT_TO_BOOLEAN(8);
8821+ break;
8822+ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
8823+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8824+ params[0] = INT_TO_BOOLEAN(16);
8825+ break;
8826+ case GL_COLOR_ALPHA_PAIRING_ATI:
8827+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8828+ params[0] = GL_TRUE;
8829+ break;
8830+ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
8831+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8832+ params[0] = INT_TO_BOOLEAN(3);
8833+ break;
8834+ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
8835+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8836+ params[0] = INT_TO_BOOLEAN(3);
8837+ break;
8838+ case GL_STENCIL_BACK_FUNC:
8839+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.Function[1]);
8840+ break;
8841+ case GL_STENCIL_BACK_VALUE_MASK:
8842+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.ValueMask[1]);
8843+ break;
8844+ case GL_STENCIL_BACK_REF:
8845+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Ref[1]);
8846+ break;
8847+ case GL_STENCIL_BACK_FAIL:
8848+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.FailFunc[1]);
8849+ break;
8850+ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
8851+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZFailFunc[1]);
8852+ break;
8853+ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
8854+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZPassFunc[1]);
8855+ break;
8856+ case GL_FRAMEBUFFER_BINDING_EXT:
8857+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
8858+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Name);
8859+ break;
8860+ case GL_RENDERBUFFER_BINDING_EXT:
8861+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
8862+ params[0] = INT_TO_BOOLEAN(ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0);
8863+ break;
8864+ case GL_MAX_COLOR_ATTACHMENTS_EXT:
8865+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
8866+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxColorAttachments);
8867+ break;
8868+ case GL_MAX_RENDERBUFFER_SIZE_EXT:
8869+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
8870+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxRenderbufferSize);
8871+ break;
8872+ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
8873+ CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
8874+ params[0] = INT_TO_BOOLEAN(MAX_FRAGMENT_UNIFORM_COMPONENTS);
8875+ break;
8876+ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
8877+ CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
8878+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.FragmentShaderDerivative);
8879+ break;
8880+ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
8881+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
8882+ params[0] = INT_TO_BOOLEAN(MAX_VERTEX_UNIFORM_COMPONENTS);
8883+ break;
8884+ case GL_MAX_VARYING_FLOATS_ARB:
8885+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
8886+ params[0] = INT_TO_BOOLEAN(MAX_VARYING_FLOATS);
8887+ break;
8888+ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
8889+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
8890+ params[0] = INT_TO_BOOLEAN(MAX_VERTEX_TEXTURE_IMAGE_UNITS);
8891+ break;
8892+ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
8893+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
8894+ params[0] = INT_TO_BOOLEAN(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
8895+ break;
8896+ default:
8897+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv(pname=0x%x)", pname);
8898+ }
8899+}
8900+
8901+void GLAPIENTRY
8902+_mesa_GetFloatv( GLenum pname, GLfloat *params )
8903+{
8904+ GET_CURRENT_CONTEXT(ctx);
8905+ ASSERT_OUTSIDE_BEGIN_END(ctx);
8906+
8907+ if (!params)
8908+ return;
8909+
8910+ if (ctx->NewState)
8911+ _mesa_update_state(ctx);
8912+
8913+ if (ctx->Driver.GetFloatv &&
8914+ ctx->Driver.GetFloatv(ctx, pname, params))
8915+ return;
8916+
8917+ switch (pname) {
8918+ case GL_ACCUM_RED_BITS:
8919+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumRedBits);
8920+ break;
8921+ case GL_ACCUM_GREEN_BITS:
8922+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumGreenBits);
8923+ break;
8924+ case GL_ACCUM_BLUE_BITS:
8925+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumBlueBits);
8926+ break;
8927+ case GL_ACCUM_ALPHA_BITS:
8928+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumAlphaBits);
8929+ break;
8930+ case GL_ACCUM_CLEAR_VALUE:
8931+ params[0] = ctx->Accum.ClearColor[0];
8932+ params[1] = ctx->Accum.ClearColor[1];
8933+ params[2] = ctx->Accum.ClearColor[2];
8934+ params[3] = ctx->Accum.ClearColor[3];
8935+ break;
8936+ case GL_ALPHA_BIAS:
8937+ params[0] = ctx->Pixel.AlphaBias;
8938+ break;
8939+ case GL_ALPHA_BITS:
8940+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.alphaBits);
8941+ break;
8942+ case GL_ALPHA_SCALE:
8943+ params[0] = ctx->Pixel.AlphaScale;
8944+ break;
8945+ case GL_ALPHA_TEST:
8946+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.AlphaEnabled);
8947+ break;
8948+ case GL_ALPHA_TEST_FUNC:
8949+ params[0] = ENUM_TO_FLOAT(ctx->Color.AlphaFunc);
8950+ break;
8951+ case GL_ALPHA_TEST_REF:
8952+ params[0] = ctx->Color.AlphaRef;
8953+ break;
8954+ case GL_ATTRIB_STACK_DEPTH:
8955+ params[0] = (GLfloat)(ctx->AttribStackDepth);
8956+ break;
8957+ case GL_AUTO_NORMAL:
8958+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.AutoNormal);
8959+ break;
8960+ case GL_AUX_BUFFERS:
8961+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.numAuxBuffers);
8962+ break;
8963+ case GL_BLEND:
8964+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.BlendEnabled);
8965+ break;
8966+ case GL_BLEND_DST:
8967+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstRGB);
8968+ break;
8969+ case GL_BLEND_SRC:
8970+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcRGB);
8971+ break;
8972+ case GL_BLEND_SRC_RGB_EXT:
8973+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcRGB);
8974+ break;
8975+ case GL_BLEND_DST_RGB_EXT:
8976+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstRGB);
8977+ break;
8978+ case GL_BLEND_SRC_ALPHA_EXT:
8979+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcA);
8980+ break;
8981+ case GL_BLEND_DST_ALPHA_EXT:
8982+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstA);
8983+ break;
8984+ case GL_BLEND_EQUATION:
8985+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendEquationRGB );
8986+ break;
8987+ case GL_BLEND_EQUATION_ALPHA_EXT:
8988+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendEquationA );
8989+ break;
8990+ case GL_BLEND_COLOR_EXT:
8991+ params[0] = ctx->Color.BlendColor[0];
8992+ params[1] = ctx->Color.BlendColor[1];
8993+ params[2] = ctx->Color.BlendColor[2];
8994+ params[3] = ctx->Color.BlendColor[3];
8995+ break;
8996+ case GL_BLUE_BIAS:
8997+ params[0] = ctx->Pixel.BlueBias;
8998+ break;
8999+ case GL_BLUE_BITS:
9000+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.blueBits);
9001+ break;
9002+ case GL_BLUE_SCALE:
9003+ params[0] = ctx->Pixel.BlueScale;
9004+ break;
9005+ case GL_CLIENT_ATTRIB_STACK_DEPTH:
9006+ params[0] = (GLfloat)(ctx->ClientAttribStackDepth);
9007+ break;
9008+ case GL_CLIP_PLANE0:
9009+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 0) & 1);
9010+ break;
9011+ case GL_CLIP_PLANE1:
9012+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 1) & 1);
9013+ break;
9014+ case GL_CLIP_PLANE2:
9015+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 2) & 1);
9016+ break;
9017+ case GL_CLIP_PLANE3:
9018+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 3) & 1);
9019+ break;
9020+ case GL_CLIP_PLANE4:
9021+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 4) & 1);
9022+ break;
9023+ case GL_CLIP_PLANE5:
9024+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 5) & 1);
9025+ break;
9026+ case GL_COLOR_CLEAR_VALUE:
9027+ params[0] = ctx->Color.ClearColor[0];
9028+ params[1] = ctx->Color.ClearColor[1];
9029+ params[2] = ctx->Color.ClearColor[2];
9030+ params[3] = ctx->Color.ClearColor[3];
9031+ break;
9032+ case GL_COLOR_MATERIAL:
9033+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.ColorMaterialEnabled);
9034+ break;
9035+ case GL_COLOR_MATERIAL_FACE:
9036+ params[0] = ENUM_TO_FLOAT(ctx->Light.ColorMaterialFace);
9037+ break;
9038+ case GL_COLOR_MATERIAL_PARAMETER:
9039+ params[0] = ENUM_TO_FLOAT(ctx->Light.ColorMaterialMode);
9040+ break;
9041+ case GL_COLOR_WRITEMASK:
9042+ params[0] = (GLfloat)(ctx->Color.ColorMask[RCOMP] ? 1 : 0);
9043+ params[1] = (GLfloat)(ctx->Color.ColorMask[GCOMP] ? 1 : 0);
9044+ params[2] = (GLfloat)(ctx->Color.ColorMask[BCOMP] ? 1 : 0);
9045+ params[3] = (GLfloat)(ctx->Color.ColorMask[ACOMP] ? 1 : 0);
9046+ break;
9047+ case GL_CULL_FACE:
9048+ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.CullFlag);
9049+ break;
9050+ case GL_CULL_FACE_MODE:
9051+ params[0] = ENUM_TO_FLOAT(ctx->Polygon.CullFaceMode);
9052+ break;
9053+ case GL_CURRENT_COLOR:
9054+ {
9055+ FLUSH_CURRENT(ctx, 0);
9056+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0];
9057+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1];
9058+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2];
9059+ params[3] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3];
9060+ }
9061+ break;
9062+ case GL_CURRENT_INDEX:
9063+ {
9064+ FLUSH_CURRENT(ctx, 0);
9065+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0];
9066+ }
9067+ break;
9068+ case GL_CURRENT_NORMAL:
9069+ {
9070+ FLUSH_CURRENT(ctx, 0);
9071+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0];
9072+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1];
9073+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2];
9074+ }
9075+ break;
9076+ case GL_CURRENT_RASTER_COLOR:
9077+ params[0] = ctx->Current.RasterColor[0];
9078+ params[1] = ctx->Current.RasterColor[1];
9079+ params[2] = ctx->Current.RasterColor[2];
9080+ params[3] = ctx->Current.RasterColor[3];
9081+ break;
9082+ case GL_CURRENT_RASTER_DISTANCE:
9083+ params[0] = ctx->Current.RasterDistance;
9084+ break;
9085+ case GL_CURRENT_RASTER_INDEX:
9086+ params[0] = ctx->Current.RasterIndex;
9087+ break;
9088+ case GL_CURRENT_RASTER_POSITION:
9089+ params[0] = ctx->Current.RasterPos[0];
9090+ params[1] = ctx->Current.RasterPos[1];
9091+ params[2] = ctx->Current.RasterPos[2];
9092+ params[3] = ctx->Current.RasterPos[3];
9093+ break;
9094+ case GL_CURRENT_RASTER_SECONDARY_COLOR:
9095+ params[0] = ctx->Current.RasterSecondaryColor[0];
9096+ params[1] = ctx->Current.RasterSecondaryColor[1];
9097+ params[2] = ctx->Current.RasterSecondaryColor[2];
9098+ params[3] = ctx->Current.RasterSecondaryColor[3];
9099+ break;
9100+ case GL_CURRENT_RASTER_TEXTURE_COORDS:
9101+ {
9102+ const GLuint texUnit = ctx->Texture.CurrentUnit;
9103+ params[0] = ctx->Current.RasterTexCoords[texUnit][0];
9104+ params[1] = ctx->Current.RasterTexCoords[texUnit][1];
9105+ params[2] = ctx->Current.RasterTexCoords[texUnit][2];
9106+ params[3] = ctx->Current.RasterTexCoords[texUnit][3];
9107+ }
9108+ break;
9109+ case GL_CURRENT_RASTER_POSITION_VALID:
9110+ params[0] = BOOLEAN_TO_FLOAT(ctx->Current.RasterPosValid);
9111+ break;
9112+ case GL_CURRENT_TEXTURE_COORDS:
9113+ {
9114+ const GLuint texUnit = ctx->Texture.CurrentUnit;
9115+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0];
9116+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1];
9117+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2];
9118+ params[3] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3];
9119+ }
9120+ break;
9121+ case GL_DEPTH_BIAS:
9122+ params[0] = ctx->Pixel.DepthBias;
9123+ break;
9124+ case GL_DEPTH_BITS:
9125+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.depthBits);
9126+ break;
9127+ case GL_DEPTH_CLEAR_VALUE:
9128+ params[0] = ctx->Depth.Clear;
9129+ break;
9130+ case GL_DEPTH_FUNC:
9131+ params[0] = ENUM_TO_FLOAT(ctx->Depth.Func);
9132+ break;
9133+ case GL_DEPTH_RANGE:
9134+ params[0] = ctx->Viewport.Near;
9135+ params[1] = ctx->Viewport.Far;
9136+ break;
9137+ case GL_DEPTH_SCALE:
9138+ params[0] = ctx->Pixel.DepthScale;
9139+ break;
9140+ case GL_DEPTH_TEST:
9141+ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.Test);
9142+ break;
9143+ case GL_DEPTH_WRITEMASK:
9144+ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.Mask);
9145+ break;
9146+ case GL_DITHER:
9147+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.DitherFlag);
9148+ break;
9149+ case GL_DOUBLEBUFFER:
9150+ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.doubleBufferMode);
9151+ break;
9152+ case GL_DRAW_BUFFER:
9153+ params[0] = ENUM_TO_FLOAT(ctx->DrawBuffer->ColorDrawBuffer[0]);
9154+ break;
9155+ case GL_EDGE_FLAG:
9156+ {
9157+ FLUSH_CURRENT(ctx, 0);
9158+ params[0] = BOOLEAN_TO_FLOAT(ctx->Current.EdgeFlag);
9159+ }
9160+ break;
9161+ case GL_FEEDBACK_BUFFER_SIZE:
9162+ params[0] = (GLfloat)(ctx->Feedback.BufferSize);
9163+ break;
9164+ case GL_FEEDBACK_BUFFER_TYPE:
9165+ params[0] = ENUM_TO_FLOAT(ctx->Feedback.Type);
9166+ break;
9167+ case GL_FOG:
9168+ params[0] = BOOLEAN_TO_FLOAT(ctx->Fog.Enabled);
9169+ break;
9170+ case GL_FOG_COLOR:
9171+ params[0] = ctx->Fog.Color[0];
9172+ params[1] = ctx->Fog.Color[1];
9173+ params[2] = ctx->Fog.Color[2];
9174+ params[3] = ctx->Fog.Color[3];
9175+ break;
9176+ case GL_FOG_DENSITY:
9177+ params[0] = ctx->Fog.Density;
9178+ break;
9179+ case GL_FOG_END:
9180+ params[0] = ctx->Fog.End;
9181+ break;
9182+ case GL_FOG_HINT:
9183+ params[0] = ENUM_TO_FLOAT(ctx->Hint.Fog);
9184+ break;
9185+ case GL_FOG_INDEX:
9186+ params[0] = ctx->Fog.Index;
9187+ break;
9188+ case GL_FOG_MODE:
9189+ params[0] = ENUM_TO_FLOAT(ctx->Fog.Mode);
9190+ break;
9191+ case GL_FOG_START:
9192+ params[0] = ctx->Fog.Start;
9193+ break;
9194+ case GL_FRONT_FACE:
9195+ params[0] = ENUM_TO_FLOAT(ctx->Polygon.FrontFace);
9196+ break;
9197+ case GL_GREEN_BIAS:
9198+ params[0] = ctx->Pixel.GreenBias;
9199+ break;
9200+ case GL_GREEN_BITS:
9201+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.greenBits);
9202+ break;
9203+ case GL_GREEN_SCALE:
9204+ params[0] = ctx->Pixel.GreenScale;
9205+ break;
9206+ case GL_INDEX_BITS:
9207+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.indexBits);
9208+ break;
9209+ case GL_INDEX_CLEAR_VALUE:
9210+ params[0] = (GLfloat)(ctx->Color.ClearIndex);
9211+ break;
9212+ case GL_INDEX_MODE:
9213+ params[0] = BOOLEAN_TO_FLOAT(!ctx->DrawBuffer->Visual.rgbMode);
9214+ break;
9215+ case GL_INDEX_OFFSET:
9216+ params[0] = (GLfloat)(ctx->Pixel.IndexOffset);
9217+ break;
9218+ case GL_INDEX_SHIFT:
9219+ params[0] = (GLfloat)(ctx->Pixel.IndexShift);
9220+ break;
9221+ case GL_INDEX_WRITEMASK:
9222+ params[0] = (GLfloat)(ctx->Color.IndexMask);
9223+ break;
9224+ case GL_LIGHT0:
9225+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[0].Enabled);
9226+ break;
9227+ case GL_LIGHT1:
9228+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[1].Enabled);
9229+ break;
9230+ case GL_LIGHT2:
9231+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[2].Enabled);
9232+ break;
9233+ case GL_LIGHT3:
9234+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[3].Enabled);
9235+ break;
9236+ case GL_LIGHT4:
9237+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[4].Enabled);
9238+ break;
9239+ case GL_LIGHT5:
9240+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[5].Enabled);
9241+ break;
9242+ case GL_LIGHT6:
9243+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[6].Enabled);
9244+ break;
9245+ case GL_LIGHT7:
9246+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[7].Enabled);
9247+ break;
9248+ case GL_LIGHTING:
9249+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Enabled);
9250+ break;
9251+ case GL_LIGHT_MODEL_AMBIENT:
9252+ params[0] = ctx->Light.Model.Ambient[0];
9253+ params[1] = ctx->Light.Model.Ambient[1];
9254+ params[2] = ctx->Light.Model.Ambient[2];
9255+ params[3] = ctx->Light.Model.Ambient[3];
9256+ break;
9257+ case GL_LIGHT_MODEL_COLOR_CONTROL:
9258+ params[0] = ENUM_TO_FLOAT(ctx->Light.Model.ColorControl);
9259+ break;
9260+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
9261+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Model.LocalViewer);
9262+ break;
9263+ case GL_LIGHT_MODEL_TWO_SIDE:
9264+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Model.TwoSide);
9265+ break;
9266+ case GL_LINE_SMOOTH:
9267+ params[0] = BOOLEAN_TO_FLOAT(ctx->Line.SmoothFlag);
9268+ break;
9269+ case GL_LINE_SMOOTH_HINT:
9270+ params[0] = ENUM_TO_FLOAT(ctx->Hint.LineSmooth);
9271+ break;
9272+ case GL_LINE_STIPPLE:
9273+ params[0] = BOOLEAN_TO_FLOAT(ctx->Line.StippleFlag);
9274+ break;
9275+ case GL_LINE_STIPPLE_PATTERN:
9276+ params[0] = (GLfloat)(ctx->Line.StipplePattern);
9277+ break;
9278+ case GL_LINE_STIPPLE_REPEAT:
9279+ params[0] = (GLfloat)(ctx->Line.StippleFactor);
9280+ break;
9281+ case GL_LINE_WIDTH:
9282+ params[0] = ctx->Line.Width;
9283+ break;
9284+ case GL_LINE_WIDTH_GRANULARITY:
9285+ params[0] = ctx->Const.LineWidthGranularity;
9286+ break;
9287+ case GL_LINE_WIDTH_RANGE:
9288+ params[0] = ctx->Const.MinLineWidthAA;
9289+ params[1] = ctx->Const.MaxLineWidthAA;
9290+ break;
9291+ case GL_ALIASED_LINE_WIDTH_RANGE:
9292+ params[0] = ctx->Const.MinLineWidth;
9293+ params[1] = ctx->Const.MaxLineWidth;
9294+ break;
9295+ case GL_LIST_BASE:
9296+ params[0] = (GLfloat)(ctx->List.ListBase);
9297+ break;
9298+ case GL_LIST_INDEX:
9299+ params[0] = (GLfloat)(ctx->ListState.CurrentListNum);
9300+ break;
9301+ case GL_LIST_MODE:
9302+ {
9303+ GLenum mode;
9304+ if (!ctx->CompileFlag)
9305+ mode = 0;
9306+ else if (ctx->ExecuteFlag)
9307+ mode = GL_COMPILE_AND_EXECUTE;
9308+ else
9309+ mode = GL_COMPILE;
9310+ params[0] = ENUM_TO_FLOAT(mode);
9311+ }
9312+ break;
9313+ case GL_INDEX_LOGIC_OP:
9314+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.IndexLogicOpEnabled);
9315+ break;
9316+ case GL_COLOR_LOGIC_OP:
9317+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.ColorLogicOpEnabled);
9318+ break;
9319+ case GL_LOGIC_OP_MODE:
9320+ params[0] = ENUM_TO_FLOAT(ctx->Color.LogicOp);
9321+ break;
9322+ case GL_MAP1_COLOR_4:
9323+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Color4);
9324+ break;
9325+ case GL_MAP1_GRID_DOMAIN:
9326+ params[0] = ctx->Eval.MapGrid1u1;
9327+ params[1] = ctx->Eval.MapGrid1u2;
9328+ break;
9329+ case GL_MAP1_GRID_SEGMENTS:
9330+ params[0] = (GLfloat)(ctx->Eval.MapGrid1un);
9331+ break;
9332+ case GL_MAP1_INDEX:
9333+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Index);
9334+ break;
9335+ case GL_MAP1_NORMAL:
9336+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Normal);
9337+ break;
9338+ case GL_MAP1_TEXTURE_COORD_1:
9339+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord1);
9340+ break;
9341+ case GL_MAP1_TEXTURE_COORD_2:
9342+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord2);
9343+ break;
9344+ case GL_MAP1_TEXTURE_COORD_3:
9345+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord3);
9346+ break;
9347+ case GL_MAP1_TEXTURE_COORD_4:
9348+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord4);
9349+ break;
9350+ case GL_MAP1_VERTEX_3:
9351+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Vertex3);
9352+ break;
9353+ case GL_MAP1_VERTEX_4:
9354+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Vertex4);
9355+ break;
9356+ case GL_MAP2_COLOR_4:
9357+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Color4);
9358+ break;
9359+ case GL_MAP2_GRID_DOMAIN:
9360+ params[0] = ctx->Eval.MapGrid2u1;
9361+ params[1] = ctx->Eval.MapGrid2u2;
9362+ params[2] = ctx->Eval.MapGrid2v1;
9363+ params[3] = ctx->Eval.MapGrid2v2;
9364+ break;
9365+ case GL_MAP2_GRID_SEGMENTS:
9366+ params[0] = (GLfloat)(ctx->Eval.MapGrid2un);
9367+ params[1] = (GLfloat)(ctx->Eval.MapGrid2vn);
9368+ break;
9369+ case GL_MAP2_INDEX:
9370+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Index);
9371+ break;
9372+ case GL_MAP2_NORMAL:
9373+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Normal);
9374+ break;
9375+ case GL_MAP2_TEXTURE_COORD_1:
9376+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord1);
9377+ break;
9378+ case GL_MAP2_TEXTURE_COORD_2:
9379+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord2);
9380+ break;
9381+ case GL_MAP2_TEXTURE_COORD_3:
9382+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord3);
9383+ break;
9384+ case GL_MAP2_TEXTURE_COORD_4:
9385+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord4);
9386+ break;
9387+ case GL_MAP2_VERTEX_3:
9388+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Vertex3);
9389+ break;
9390+ case GL_MAP2_VERTEX_4:
9391+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Vertex4);
9392+ break;
9393+ case GL_MAP_COLOR:
9394+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MapColorFlag);
9395+ break;
9396+ case GL_MAP_STENCIL:
9397+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MapStencilFlag);
9398+ break;
9399+ case GL_MATRIX_MODE:
9400+ params[0] = ENUM_TO_FLOAT(ctx->Transform.MatrixMode);
9401+ break;
9402+ case GL_MAX_ATTRIB_STACK_DEPTH:
9403+ params[0] = (GLfloat)(MAX_ATTRIB_STACK_DEPTH);
9404+ break;
9405+ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
9406+ params[0] = (GLfloat)(MAX_CLIENT_ATTRIB_STACK_DEPTH);
9407+ break;
9408+ case GL_MAX_CLIP_PLANES:
9409+ params[0] = (GLfloat)(ctx->Const.MaxClipPlanes);
9410+ break;
9411+ case GL_MAX_ELEMENTS_VERTICES:
9412+ params[0] = (GLfloat)(ctx->Const.MaxArrayLockSize);
9413+ break;
9414+ case GL_MAX_ELEMENTS_INDICES:
9415+ params[0] = (GLfloat)(ctx->Const.MaxArrayLockSize);
9416+ break;
9417+ case GL_MAX_EVAL_ORDER:
9418+ params[0] = (GLfloat)(MAX_EVAL_ORDER);
9419+ break;
9420+ case GL_MAX_LIGHTS:
9421+ params[0] = (GLfloat)(ctx->Const.MaxLights);
9422+ break;
9423+ case GL_MAX_LIST_NESTING:
9424+ params[0] = (GLfloat)(MAX_LIST_NESTING);
9425+ break;
9426+ case GL_MAX_MODELVIEW_STACK_DEPTH:
9427+ params[0] = (GLfloat)(MAX_MODELVIEW_STACK_DEPTH);
9428+ break;
9429+ case GL_MAX_NAME_STACK_DEPTH:
9430+ params[0] = (GLfloat)(MAX_NAME_STACK_DEPTH);
9431+ break;
9432+ case GL_MAX_PIXEL_MAP_TABLE:
9433+ params[0] = (GLfloat)(MAX_PIXEL_MAP_TABLE);
9434+ break;
9435+ case GL_MAX_PROJECTION_STACK_DEPTH:
9436+ params[0] = (GLfloat)(MAX_PROJECTION_STACK_DEPTH);
9437+ break;
9438+ case GL_MAX_TEXTURE_SIZE:
9439+ params[0] = (GLfloat)(1 << (ctx->Const.MaxTextureLevels - 1));
9440+ break;
9441+ case GL_MAX_3D_TEXTURE_SIZE:
9442+ params[0] = (GLfloat)(1 << (ctx->Const.Max3DTextureLevels - 1));
9443+ break;
9444+ case GL_MAX_TEXTURE_STACK_DEPTH:
9445+ params[0] = (GLfloat)(MAX_TEXTURE_STACK_DEPTH);
9446+ break;
9447+ case GL_MAX_VIEWPORT_DIMS:
9448+ params[0] = (GLfloat)(ctx->Const.MaxViewportWidth);
9449+ params[1] = (GLfloat)(ctx->Const.MaxViewportHeight);
9450+ break;
9451+ case GL_MODELVIEW_MATRIX:
9452+ {
9453+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
9454+ params[0] = matrix[0];
9455+ params[1] = matrix[1];
9456+ params[2] = matrix[2];
9457+ params[3] = matrix[3];
9458+ params[4] = matrix[4];
9459+ params[5] = matrix[5];
9460+ params[6] = matrix[6];
9461+ params[7] = matrix[7];
9462+ params[8] = matrix[8];
9463+ params[9] = matrix[9];
9464+ params[10] = matrix[10];
9465+ params[11] = matrix[11];
9466+ params[12] = matrix[12];
9467+ params[13] = matrix[13];
9468+ params[14] = matrix[14];
9469+ params[15] = matrix[15];
9470+ }
9471+ break;
9472+ case GL_MODELVIEW_STACK_DEPTH:
9473+ params[0] = (GLfloat)(ctx->ModelviewMatrixStack.Depth + 1);
9474+ break;
9475+ case GL_NAME_STACK_DEPTH:
9476+ params[0] = (GLfloat)(ctx->Select.NameStackDepth);
9477+ break;
9478+ case GL_NORMALIZE:
9479+ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.Normalize);
9480+ break;
9481+ case GL_PACK_ALIGNMENT:
9482+ params[0] = (GLfloat)(ctx->Pack.Alignment);
9483+ break;
9484+ case GL_PACK_LSB_FIRST:
9485+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.LsbFirst);
9486+ break;
9487+ case GL_PACK_ROW_LENGTH:
9488+ params[0] = (GLfloat)(ctx->Pack.RowLength);
9489+ break;
9490+ case GL_PACK_SKIP_PIXELS:
9491+ params[0] = (GLfloat)(ctx->Pack.SkipPixels);
9492+ break;
9493+ case GL_PACK_SKIP_ROWS:
9494+ params[0] = (GLfloat)(ctx->Pack.SkipRows);
9495+ break;
9496+ case GL_PACK_SWAP_BYTES:
9497+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.SwapBytes);
9498+ break;
9499+ case GL_PACK_SKIP_IMAGES_EXT:
9500+ params[0] = (GLfloat)(ctx->Pack.SkipImages);
9501+ break;
9502+ case GL_PACK_IMAGE_HEIGHT_EXT:
9503+ params[0] = (GLfloat)(ctx->Pack.ImageHeight);
9504+ break;
9505+ case GL_PACK_INVERT_MESA:
9506+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.Invert);
9507+ break;
9508+ case GL_PERSPECTIVE_CORRECTION_HINT:
9509+ params[0] = ENUM_TO_FLOAT(ctx->Hint.PerspectiveCorrection);
9510+ break;
9511+ case GL_PIXEL_MAP_A_TO_A_SIZE:
9512+ params[0] = (GLfloat)(ctx->Pixel.MapAtoAsize);
9513+ break;
9514+ case GL_PIXEL_MAP_B_TO_B_SIZE:
9515+ params[0] = (GLfloat)(ctx->Pixel.MapBtoBsize);
9516+ break;
9517+ case GL_PIXEL_MAP_G_TO_G_SIZE:
9518+ params[0] = (GLfloat)(ctx->Pixel.MapGtoGsize);
9519+ break;
9520+ case GL_PIXEL_MAP_I_TO_A_SIZE:
9521+ params[0] = (GLfloat)(ctx->Pixel.MapItoAsize);
9522+ break;
9523+ case GL_PIXEL_MAP_I_TO_B_SIZE:
9524+ params[0] = (GLfloat)(ctx->Pixel.MapItoBsize);
9525+ break;
9526+ case GL_PIXEL_MAP_I_TO_G_SIZE:
9527+ params[0] = (GLfloat)(ctx->Pixel.MapItoGsize);
9528+ break;
9529+ case GL_PIXEL_MAP_I_TO_I_SIZE:
9530+ params[0] = (GLfloat)(ctx->Pixel.MapItoIsize);
9531+ break;
9532+ case GL_PIXEL_MAP_I_TO_R_SIZE:
9533+ params[0] = (GLfloat)(ctx->Pixel.MapItoRsize);
9534+ break;
9535+ case GL_PIXEL_MAP_R_TO_R_SIZE:
9536+ params[0] = (GLfloat)(ctx->Pixel.MapRtoRsize);
9537+ break;
9538+ case GL_PIXEL_MAP_S_TO_S_SIZE:
9539+ params[0] = (GLfloat)(ctx->Pixel.MapStoSsize);
9540+ break;
9541+ case GL_POINT_SIZE:
9542+ params[0] = ctx->Point.Size;
9543+ break;
9544+ case GL_POINT_SIZE_GRANULARITY:
9545+ params[0] = ctx->Const.PointSizeGranularity;
9546+ break;
9547+ case GL_POINT_SIZE_RANGE:
9548+ params[0] = ctx->Const.MinPointSizeAA;
9549+ params[1] = ctx->Const.MaxPointSizeAA;
9550+ break;
9551+ case GL_ALIASED_POINT_SIZE_RANGE:
9552+ params[0] = ctx->Const.MinPointSize;
9553+ params[1] = ctx->Const.MaxPointSize;
9554+ break;
9555+ case GL_POINT_SMOOTH:
9556+ params[0] = BOOLEAN_TO_FLOAT(ctx->Point.SmoothFlag);
9557+ break;
9558+ case GL_POINT_SMOOTH_HINT:
9559+ params[0] = ENUM_TO_FLOAT(ctx->Hint.PointSmooth);
9560+ break;
9561+ case GL_POINT_SIZE_MIN_EXT:
9562+ params[0] = ctx->Point.MinSize;
9563+ break;
9564+ case GL_POINT_SIZE_MAX_EXT:
9565+ params[0] = ctx->Point.MaxSize;
9566+ break;
9567+ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
9568+ params[0] = ctx->Point.Threshold;
9569+ break;
9570+ case GL_DISTANCE_ATTENUATION_EXT:
9571+ params[0] = ctx->Point.Params[0];
9572+ params[1] = ctx->Point.Params[1];
9573+ params[2] = ctx->Point.Params[2];
9574+ break;
9575+ case GL_POLYGON_MODE:
9576+ params[0] = ENUM_TO_FLOAT(ctx->Polygon.FrontMode);
9577+ params[1] = ENUM_TO_FLOAT(ctx->Polygon.BackMode);
9578+ break;
9579+ case GL_POLYGON_OFFSET_BIAS_EXT:
9580+ params[0] = ctx->Polygon.OffsetUnits;
9581+ break;
9582+ case GL_POLYGON_OFFSET_FACTOR:
9583+ params[0] = ctx->Polygon.OffsetFactor ;
9584+ break;
9585+ case GL_POLYGON_OFFSET_UNITS:
9586+ params[0] = ctx->Polygon.OffsetUnits ;
9587+ break;
9588+ case GL_POLYGON_SMOOTH:
9589+ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.SmoothFlag);
9590+ break;
9591+ case GL_POLYGON_SMOOTH_HINT:
9592+ params[0] = ENUM_TO_FLOAT(ctx->Hint.PolygonSmooth);
9593+ break;
9594+ case GL_POLYGON_STIPPLE:
9595+ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.StippleFlag);
9596+ break;
9597+ case GL_PROJECTION_MATRIX:
9598+ {
9599+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
9600+ params[0] = matrix[0];
9601+ params[1] = matrix[1];
9602+ params[2] = matrix[2];
9603+ params[3] = matrix[3];
9604+ params[4] = matrix[4];
9605+ params[5] = matrix[5];
9606+ params[6] = matrix[6];
9607+ params[7] = matrix[7];
9608+ params[8] = matrix[8];
9609+ params[9] = matrix[9];
9610+ params[10] = matrix[10];
9611+ params[11] = matrix[11];
9612+ params[12] = matrix[12];
9613+ params[13] = matrix[13];
9614+ params[14] = matrix[14];
9615+ params[15] = matrix[15];
9616+ }
9617+ break;
9618+ case GL_PROJECTION_STACK_DEPTH:
9619+ params[0] = (GLfloat)(ctx->ProjectionMatrixStack.Depth + 1);
9620+ break;
9621+ case GL_READ_BUFFER:
9622+ params[0] = ENUM_TO_FLOAT(ctx->ReadBuffer->ColorReadBuffer);
9623+ break;
9624+ case GL_RED_BIAS:
9625+ params[0] = ctx->Pixel.RedBias;
9626+ break;
9627+ case GL_RED_BITS:
9628+ params[0] = (GLfloat)( ctx->DrawBuffer->Visual.redBits );
9629+ break;
9630+ case GL_RED_SCALE:
9631+ params[0] = ctx->Pixel.RedScale;
9632+ break;
9633+ case GL_RENDER_MODE:
9634+ params[0] = ENUM_TO_FLOAT(ctx->RenderMode);
9635+ break;
9636+ case GL_RESCALE_NORMAL:
9637+ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.RescaleNormals);
9638+ break;
9639+ case GL_RGBA_MODE:
9640+ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.rgbMode);
9641+ break;
9642+ case GL_SCISSOR_BOX:
9643+ params[0] = (GLfloat)(ctx->Scissor.X);
9644+ params[1] = (GLfloat)(ctx->Scissor.Y);
9645+ params[2] = (GLfloat)(ctx->Scissor.Width);
9646+ params[3] = (GLfloat)(ctx->Scissor.Height);
9647+ break;
9648+ case GL_SCISSOR_TEST:
9649+ params[0] = BOOLEAN_TO_FLOAT(ctx->Scissor.Enabled);
9650+ break;
9651+ case GL_SELECTION_BUFFER_SIZE:
9652+ params[0] = (GLfloat)(ctx->Select.BufferSize);
9653+ break;
9654+ case GL_SHADE_MODEL:
9655+ params[0] = ENUM_TO_FLOAT(ctx->Light.ShadeModel);
9656+ break;
9657+ case GL_SHARED_TEXTURE_PALETTE_EXT:
9658+ params[0] = BOOLEAN_TO_FLOAT(ctx->Texture.SharedPalette);
9659+ break;
9660+ case GL_STENCIL_BITS:
9661+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.stencilBits);
9662+ break;
9663+ case GL_STENCIL_CLEAR_VALUE:
9664+ params[0] = (GLfloat)(ctx->Stencil.Clear);
9665+ break;
9666+ case GL_STENCIL_FAIL:
9667+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
9668+ break;
9669+ case GL_STENCIL_FUNC:
9670+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
9671+ break;
9672+ case GL_STENCIL_PASS_DEPTH_FAIL:
9673+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
9674+ break;
9675+ case GL_STENCIL_PASS_DEPTH_PASS:
9676+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
9677+ break;
9678+ case GL_STENCIL_REF:
9679+ params[0] = (GLfloat)(ctx->Stencil.Ref[ctx->Stencil.ActiveFace]);
9680+ break;
9681+ case GL_STENCIL_TEST:
9682+ params[0] = BOOLEAN_TO_FLOAT(ctx->Stencil.Enabled);
9683+ break;
9684+ case GL_STENCIL_VALUE_MASK:
9685+ params[0] = (GLfloat)(ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]);
9686+ break;
9687+ case GL_STENCIL_WRITEMASK:
9688+ params[0] = (GLfloat)(ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]);
9689+ break;
9690+ case GL_STEREO:
9691+ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.stereoMode);
9692+ break;
9693+ case GL_SUBPIXEL_BITS:
9694+ params[0] = (GLfloat)(ctx->Const.SubPixelBits);
9695+ break;
9696+ case GL_TEXTURE_1D:
9697+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_1D));
9698+ break;
9699+ case GL_TEXTURE_2D:
9700+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_2D));
9701+ break;
9702+ case GL_TEXTURE_3D:
9703+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_3D));
9704+ break;
9705+ case GL_TEXTURE_BINDING_1D:
9706+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name);
9707+ break;
9708+ case GL_TEXTURE_BINDING_2D:
9709+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name);
9710+ break;
9711+ case GL_TEXTURE_BINDING_3D:
9712+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name);
9713+ break;
9714+ case GL_TEXTURE_ENV_COLOR:
9715+ {
9716+ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
9717+ params[0] = color[0];
9718+ params[1] = color[1];
9719+ params[2] = color[2];
9720+ params[3] = color[3];
9721+ }
9722+ break;
9723+ case GL_TEXTURE_ENV_MODE:
9724+ params[0] = ENUM_TO_FLOAT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
9725+ break;
9726+ case GL_TEXTURE_GEN_S:
9727+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
9728+ break;
9729+ case GL_TEXTURE_GEN_T:
9730+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0));
9731+ break;
9732+ case GL_TEXTURE_GEN_R:
9733+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0));
9734+ break;
9735+ case GL_TEXTURE_GEN_Q:
9736+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0));
9737+ break;
9738+ case GL_TEXTURE_MATRIX:
9739+ {
9740+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
9741+ params[0] = matrix[0];
9742+ params[1] = matrix[1];
9743+ params[2] = matrix[2];
9744+ params[3] = matrix[3];
9745+ params[4] = matrix[4];
9746+ params[5] = matrix[5];
9747+ params[6] = matrix[6];
9748+ params[7] = matrix[7];
9749+ params[8] = matrix[8];
9750+ params[9] = matrix[9];
9751+ params[10] = matrix[10];
9752+ params[11] = matrix[11];
9753+ params[12] = matrix[12];
9754+ params[13] = matrix[13];
9755+ params[14] = matrix[14];
9756+ params[15] = matrix[15];
9757+ }
9758+ break;
9759+ case GL_TEXTURE_STACK_DEPTH:
9760+ params[0] = (GLfloat)(ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1);
9761+ break;
9762+ case GL_UNPACK_ALIGNMENT:
9763+ params[0] = (GLfloat)(ctx->Unpack.Alignment);
9764+ break;
9765+ case GL_UNPACK_LSB_FIRST:
9766+ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.LsbFirst);
9767+ break;
9768+ case GL_UNPACK_ROW_LENGTH:
9769+ params[0] = (GLfloat)(ctx->Unpack.RowLength);
9770+ break;
9771+ case GL_UNPACK_SKIP_PIXELS:
9772+ params[0] = (GLfloat)(ctx->Unpack.SkipPixels);
9773+ break;
9774+ case GL_UNPACK_SKIP_ROWS:
9775+ params[0] = (GLfloat)(ctx->Unpack.SkipRows);
9776+ break;
9777+ case GL_UNPACK_SWAP_BYTES:
9778+ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.SwapBytes);
9779+ break;
9780+ case GL_UNPACK_SKIP_IMAGES_EXT:
9781+ params[0] = (GLfloat)(ctx->Unpack.SkipImages);
9782+ break;
9783+ case GL_UNPACK_IMAGE_HEIGHT_EXT:
9784+ params[0] = (GLfloat)(ctx->Unpack.ImageHeight);
9785+ break;
9786+ case GL_UNPACK_CLIENT_STORAGE_APPLE:
9787+ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.ClientStorage);
9788+ break;
9789+ case GL_VIEWPORT:
9790+ params[0] = (GLfloat)(ctx->Viewport.X);
9791+ params[1] = (GLfloat)(ctx->Viewport.Y);
9792+ params[2] = (GLfloat)(ctx->Viewport.Width);
9793+ params[3] = (GLfloat)(ctx->Viewport.Height);
9794+ break;
9795+ case GL_ZOOM_X:
9796+ params[0] = ctx->Pixel.ZoomX;
9797+ break;
9798+ case GL_ZOOM_Y:
9799+ params[0] = ctx->Pixel.ZoomY;
9800+ break;
9801+ case GL_VERTEX_ARRAY:
9802+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Vertex.Enabled);
9803+ break;
9804+ case GL_VERTEX_ARRAY_SIZE:
9805+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.Size);
9806+ break;
9807+ case GL_VERTEX_ARRAY_TYPE:
9808+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Vertex.Type);
9809+ break;
9810+ case GL_VERTEX_ARRAY_STRIDE:
9811+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.Stride);
9812+ break;
9813+ case GL_VERTEX_ARRAY_COUNT_EXT:
9814+ params[0] = (GLfloat)(0);
9815+ break;
9816+ case GL_NORMAL_ARRAY:
9817+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Normal.Enabled);
9818+ break;
9819+ case GL_NORMAL_ARRAY_TYPE:
9820+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Normal.Type);
9821+ break;
9822+ case GL_NORMAL_ARRAY_STRIDE:
9823+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Normal.Stride);
9824+ break;
9825+ case GL_NORMAL_ARRAY_COUNT_EXT:
9826+ params[0] = (GLfloat)(0);
9827+ break;
9828+ case GL_COLOR_ARRAY:
9829+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Color.Enabled);
9830+ break;
9831+ case GL_COLOR_ARRAY_SIZE:
9832+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.Size);
9833+ break;
9834+ case GL_COLOR_ARRAY_TYPE:
9835+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Color.Type);
9836+ break;
9837+ case GL_COLOR_ARRAY_STRIDE:
9838+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.Stride);
9839+ break;
9840+ case GL_COLOR_ARRAY_COUNT_EXT:
9841+ params[0] = (GLfloat)(0);
9842+ break;
9843+ case GL_INDEX_ARRAY:
9844+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Index.Enabled);
9845+ break;
9846+ case GL_INDEX_ARRAY_TYPE:
9847+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Index.Type);
9848+ break;
9849+ case GL_INDEX_ARRAY_STRIDE:
9850+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Index.Stride);
9851+ break;
9852+ case GL_INDEX_ARRAY_COUNT_EXT:
9853+ params[0] = (GLfloat)(0);
9854+ break;
9855+ case GL_TEXTURE_COORD_ARRAY:
9856+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
9857+ break;
9858+ case GL_TEXTURE_COORD_ARRAY_SIZE:
9859+ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
9860+ break;
9861+ case GL_TEXTURE_COORD_ARRAY_TYPE:
9862+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
9863+ break;
9864+ case GL_TEXTURE_COORD_ARRAY_STRIDE:
9865+ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
9866+ break;
9867+ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
9868+ params[0] = (GLfloat)(0);
9869+ break;
9870+ case GL_EDGE_FLAG_ARRAY:
9871+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->EdgeFlag.Enabled);
9872+ break;
9873+ case GL_EDGE_FLAG_ARRAY_STRIDE:
9874+ params[0] = (GLfloat)(ctx->Array.ArrayObj->EdgeFlag.Stride);
9875+ break;
9876+ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
9877+ params[0] = (GLfloat)(0);
9878+ break;
9879+ case GL_MAX_TEXTURE_UNITS_ARB:
9880+ CHECK_EXT1(ARB_multitexture, "GetFloatv");
9881+ params[0] = (GLfloat)(ctx->Const.MaxTextureUnits);
9882+ break;
9883+ case GL_ACTIVE_TEXTURE_ARB:
9884+ CHECK_EXT1(ARB_multitexture, "GetFloatv");
9885+ params[0] = (GLfloat)(GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit);
9886+ break;
9887+ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
9888+ CHECK_EXT1(ARB_multitexture, "GetFloatv");
9889+ params[0] = (GLfloat)(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
9890+ break;
9891+ case GL_TEXTURE_CUBE_MAP_ARB:
9892+ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
9893+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB));
9894+ break;
9895+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
9896+ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
9897+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name);
9898+ break;
9899+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
9900+ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
9901+ params[0] = (GLfloat)((1 << (ctx->Const.MaxCubeTextureLevels - 1)));
9902+ break;
9903+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
9904+ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
9905+ params[0] = (GLfloat)(ctx->Hint.TextureCompression);
9906+ break;
9907+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
9908+ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
9909+ params[0] = (GLfloat)(_mesa_get_compressed_formats(ctx, NULL, GL_FALSE));
9910+ break;
9911+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
9912+ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
9913+ {
9914+ GLint formats[100];
9915+ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
9916+ ASSERT(n <= 100);
9917+ for (i = 0; i < n; i++)
9918+ params[i] = ENUM_TO_INT(formats[i]);
9919+ }
9920+ break;
9921+ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
9922+ CHECK_EXT1(EXT_compiled_vertex_array, "GetFloatv");
9923+ params[0] = (GLfloat)(ctx->Array.LockFirst);
9924+ break;
9925+ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
9926+ CHECK_EXT1(EXT_compiled_vertex_array, "GetFloatv");
9927+ params[0] = (GLfloat)(ctx->Array.LockCount);
9928+ break;
9929+ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
9930+ {
9931+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
9932+ params[0] = matrix[0];
9933+ params[1] = matrix[4];
9934+ params[2] = matrix[8];
9935+ params[3] = matrix[12];
9936+ params[4] = matrix[1];
9937+ params[5] = matrix[5];
9938+ params[6] = matrix[9];
9939+ params[7] = matrix[13];
9940+ params[8] = matrix[2];
9941+ params[9] = matrix[6];
9942+ params[10] = matrix[10];
9943+ params[11] = matrix[14];
9944+ params[12] = matrix[3];
9945+ params[13] = matrix[7];
9946+ params[14] = matrix[11];
9947+ params[15] = matrix[15];
9948+ }
9949+ break;
9950+ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
9951+ {
9952+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
9953+ params[0] = matrix[0];
9954+ params[1] = matrix[4];
9955+ params[2] = matrix[8];
9956+ params[3] = matrix[12];
9957+ params[4] = matrix[1];
9958+ params[5] = matrix[5];
9959+ params[6] = matrix[9];
9960+ params[7] = matrix[13];
9961+ params[8] = matrix[2];
9962+ params[9] = matrix[6];
9963+ params[10] = matrix[10];
9964+ params[11] = matrix[14];
9965+ params[12] = matrix[3];
9966+ params[13] = matrix[7];
9967+ params[14] = matrix[11];
9968+ params[15] = matrix[15];
9969+ }
9970+ break;
9971+ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
9972+ {
9973+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
9974+ params[0] = matrix[0];
9975+ params[1] = matrix[4];
9976+ params[2] = matrix[8];
9977+ params[3] = matrix[12];
9978+ params[4] = matrix[1];
9979+ params[5] = matrix[5];
9980+ params[6] = matrix[9];
9981+ params[7] = matrix[13];
9982+ params[8] = matrix[2];
9983+ params[9] = matrix[6];
9984+ params[10] = matrix[10];
9985+ params[11] = matrix[14];
9986+ params[12] = matrix[3];
9987+ params[13] = matrix[7];
9988+ params[14] = matrix[11];
9989+ params[15] = matrix[15];
9990+ }
9991+ break;
9992+ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
9993+ {
9994+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
9995+ params[0] = matrix[0];
9996+ params[1] = matrix[4];
9997+ params[2] = matrix[8];
9998+ params[3] = matrix[12];
9999+ params[4] = matrix[1];
10000+ params[5] = matrix[5];
10001+ params[6] = matrix[9];
10002+ params[7] = matrix[13];
10003+ params[8] = matrix[2];
10004+ params[9] = matrix[6];
10005+ params[10] = matrix[10];
10006+ params[11] = matrix[14];
10007+ params[12] = matrix[3];
10008+ params[13] = matrix[7];
10009+ params[14] = matrix[11];
10010+ params[15] = matrix[15];
10011+ }
10012+ break;
10013+ case GL_COLOR_MATRIX_SGI:
10014+ {
10015+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
10016+ params[0] = matrix[0];
10017+ params[1] = matrix[1];
10018+ params[2] = matrix[2];
10019+ params[3] = matrix[3];
10020+ params[4] = matrix[4];
10021+ params[5] = matrix[5];
10022+ params[6] = matrix[6];
10023+ params[7] = matrix[7];
10024+ params[8] = matrix[8];
10025+ params[9] = matrix[9];
10026+ params[10] = matrix[10];
10027+ params[11] = matrix[11];
10028+ params[12] = matrix[12];
10029+ params[13] = matrix[13];
10030+ params[14] = matrix[14];
10031+ params[15] = matrix[15];
10032+ }
10033+ break;
10034+ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
10035+ params[0] = (GLfloat)(ctx->ColorMatrixStack.Depth + 1);
10036+ break;
10037+ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
10038+ params[0] = (GLfloat)(MAX_COLOR_STACK_DEPTH);
10039+ break;
10040+ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
10041+ params[0] = ctx->Pixel.PostColorMatrixScale[0];
10042+ break;
10043+ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
10044+ params[0] = ctx->Pixel.PostColorMatrixScale[1];
10045+ break;
10046+ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
10047+ params[0] = ctx->Pixel.PostColorMatrixScale[2];
10048+ break;
10049+ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
10050+ params[0] = ctx->Pixel.PostColorMatrixScale[3];
10051+ break;
10052+ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
10053+ params[0] = ctx->Pixel.PostColorMatrixBias[0];
10054+ break;
10055+ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
10056+ params[0] = ctx->Pixel.PostColorMatrixBias[1];
10057+ break;
10058+ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
10059+ params[0] = ctx->Pixel.PostColorMatrixBias[2];
10060+ break;
10061+ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
10062+ params[0] = ctx->Pixel.PostColorMatrixBias[3];
10063+ break;
10064+ case GL_CONVOLUTION_1D_EXT:
10065+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10066+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Convolution1DEnabled);
10067+ break;
10068+ case GL_CONVOLUTION_2D_EXT:
10069+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10070+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Convolution2DEnabled);
10071+ break;
10072+ case GL_SEPARABLE_2D_EXT:
10073+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10074+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Separable2DEnabled);
10075+ break;
10076+ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
10077+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10078+ params[0] = ctx->Pixel.PostConvolutionScale[0];
10079+ break;
10080+ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
10081+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10082+ params[0] = ctx->Pixel.PostConvolutionScale[1];
10083+ break;
10084+ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
10085+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10086+ params[0] = ctx->Pixel.PostConvolutionScale[2];
10087+ break;
10088+ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
10089+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10090+ params[0] = ctx->Pixel.PostConvolutionScale[3];
10091+ break;
10092+ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
10093+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10094+ params[0] = ctx->Pixel.PostConvolutionBias[0];
10095+ break;
10096+ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
10097+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10098+ params[0] = ctx->Pixel.PostConvolutionBias[1];
10099+ break;
10100+ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
10101+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10102+ params[0] = ctx->Pixel.PostConvolutionBias[2];
10103+ break;
10104+ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
10105+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10106+ params[0] = ctx->Pixel.PostConvolutionBias[3];
10107+ break;
10108+ case GL_HISTOGRAM:
10109+ CHECK_EXT1(EXT_histogram, "GetFloatv");
10110+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.HistogramEnabled);
10111+ break;
10112+ case GL_MINMAX:
10113+ CHECK_EXT1(EXT_histogram, "GetFloatv");
10114+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MinMaxEnabled);
10115+ break;
10116+ case GL_COLOR_TABLE_SGI:
10117+ CHECK_EXT1(SGI_color_table, "GetFloatv");
10118+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.ColorTableEnabled);
10119+ break;
10120+ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
10121+ CHECK_EXT1(SGI_color_table, "GetFloatv");
10122+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.PostConvolutionColorTableEnabled);
10123+ break;
10124+ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
10125+ CHECK_EXT1(SGI_color_table, "GetFloatv");
10126+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.PostColorMatrixColorTableEnabled);
10127+ break;
10128+ case GL_TEXTURE_COLOR_TABLE_SGI:
10129+ CHECK_EXT1(SGI_texture_color_table, "GetFloatv");
10130+ params[0] = BOOLEAN_TO_FLOAT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled);
10131+ break;
10132+ case GL_COLOR_SUM_EXT:
10133+ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetFloatv");
10134+ params[0] = BOOLEAN_TO_FLOAT(ctx->Fog.ColorSumEnabled);
10135+ break;
10136+ case GL_CURRENT_SECONDARY_COLOR_EXT:
10137+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10138+ {
10139+ FLUSH_CURRENT(ctx, 0);
10140+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0];
10141+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1];
10142+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2];
10143+ params[3] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3];
10144+ }
10145+ break;
10146+ case GL_SECONDARY_COLOR_ARRAY_EXT:
10147+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10148+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->SecondaryColor.Enabled);
10149+ break;
10150+ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
10151+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10152+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->SecondaryColor.Type);
10153+ break;
10154+ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
10155+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10156+ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.Stride);
10157+ break;
10158+ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
10159+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10160+ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.Size);
10161+ break;
10162+ case GL_CURRENT_FOG_COORDINATE_EXT:
10163+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10164+ {
10165+ FLUSH_CURRENT(ctx, 0);
10166+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_FOG][0];
10167+ }
10168+ break;
10169+ case GL_FOG_COORDINATE_ARRAY_EXT:
10170+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10171+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->FogCoord.Enabled);
10172+ break;
10173+ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
10174+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10175+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->FogCoord.Type);
10176+ break;
10177+ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
10178+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10179+ params[0] = (GLfloat)(ctx->Array.ArrayObj->FogCoord.Stride);
10180+ break;
10181+ case GL_FOG_COORDINATE_SOURCE_EXT:
10182+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10183+ params[0] = ENUM_TO_FLOAT(ctx->Fog.FogCoordinateSource);
10184+ break;
10185+ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
10186+ CHECK_EXT1(EXT_texture_lod_bias, "GetFloatv");
10187+ params[0] = ctx->Const.MaxTextureLodBias;
10188+ break;
10189+ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
10190+ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetFloatv");
10191+ params[0] = ctx->Const.MaxTextureMaxAnisotropy;
10192+ break;
10193+ case GL_MULTISAMPLE_ARB:
10194+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10195+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.Enabled);
10196+ break;
10197+ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
10198+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10199+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleAlphaToCoverage);
10200+ break;
10201+ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
10202+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10203+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleAlphaToOne);
10204+ break;
10205+ case GL_SAMPLE_COVERAGE_ARB:
10206+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10207+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleCoverage);
10208+ break;
10209+ case GL_SAMPLE_COVERAGE_VALUE_ARB:
10210+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10211+ params[0] = ctx->Multisample.SampleCoverageValue;
10212+ break;
10213+ case GL_SAMPLE_COVERAGE_INVERT_ARB:
10214+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10215+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleCoverageInvert);
10216+ break;
10217+ case GL_SAMPLE_BUFFERS_ARB:
10218+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10219+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.sampleBuffers);
10220+ break;
10221+ case GL_SAMPLES_ARB:
10222+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10223+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.samples);
10224+ break;
10225+ case GL_RASTER_POSITION_UNCLIPPED_IBM:
10226+ CHECK_EXT1(IBM_rasterpos_clip, "GetFloatv");
10227+ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.RasterPositionUnclipped);
10228+ break;
10229+ case GL_POINT_SPRITE_NV:
10230+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetFloatv");
10231+ params[0] = BOOLEAN_TO_FLOAT(ctx->Point.PointSprite);
10232+ break;
10233+ case GL_POINT_SPRITE_R_MODE_NV:
10234+ CHECK_EXT1(NV_point_sprite, "GetFloatv");
10235+ params[0] = ENUM_TO_FLOAT(ctx->Point.SpriteRMode);
10236+ break;
10237+ case GL_POINT_SPRITE_COORD_ORIGIN:
10238+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetFloatv");
10239+ params[0] = ENUM_TO_FLOAT(ctx->Point.SpriteOrigin);
10240+ break;
10241+ case GL_GENERATE_MIPMAP_HINT_SGIS:
10242+ CHECK_EXT1(SGIS_generate_mipmap, "GetFloatv");
10243+ params[0] = ENUM_TO_FLOAT(ctx->Hint.GenerateMipmap);
10244+ break;
10245+ case GL_VERTEX_PROGRAM_BINDING_NV:
10246+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10247+ params[0] = (GLfloat)((ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0));
10248+ break;
10249+ case GL_VERTEX_ATTRIB_ARRAY0_NV:
10250+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10251+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[0].Enabled);
10252+ break;
10253+ case GL_VERTEX_ATTRIB_ARRAY1_NV:
10254+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10255+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[1].Enabled);
10256+ break;
10257+ case GL_VERTEX_ATTRIB_ARRAY2_NV:
10258+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10259+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[2].Enabled);
10260+ break;
10261+ case GL_VERTEX_ATTRIB_ARRAY3_NV:
10262+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10263+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[3].Enabled);
10264+ break;
10265+ case GL_VERTEX_ATTRIB_ARRAY4_NV:
10266+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10267+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[4].Enabled);
10268+ break;
10269+ case GL_VERTEX_ATTRIB_ARRAY5_NV:
10270+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10271+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[5].Enabled);
10272+ break;
10273+ case GL_VERTEX_ATTRIB_ARRAY6_NV:
10274+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10275+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[6].Enabled);
10276+ break;
10277+ case GL_VERTEX_ATTRIB_ARRAY7_NV:
10278+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10279+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[7].Enabled);
10280+ break;
10281+ case GL_VERTEX_ATTRIB_ARRAY8_NV:
10282+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10283+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[8].Enabled);
10284+ break;
10285+ case GL_VERTEX_ATTRIB_ARRAY9_NV:
10286+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10287+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[9].Enabled);
10288+ break;
10289+ case GL_VERTEX_ATTRIB_ARRAY10_NV:
10290+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10291+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[10].Enabled);
10292+ break;
10293+ case GL_VERTEX_ATTRIB_ARRAY11_NV:
10294+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10295+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[11].Enabled);
10296+ break;
10297+ case GL_VERTEX_ATTRIB_ARRAY12_NV:
10298+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10299+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[12].Enabled);
10300+ break;
10301+ case GL_VERTEX_ATTRIB_ARRAY13_NV:
10302+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10303+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[13].Enabled);
10304+ break;
10305+ case GL_VERTEX_ATTRIB_ARRAY14_NV:
10306+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10307+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[14].Enabled);
10308+ break;
10309+ case GL_VERTEX_ATTRIB_ARRAY15_NV:
10310+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10311+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[15].Enabled);
10312+ break;
10313+ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
10314+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10315+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[0]);
10316+ break;
10317+ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
10318+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10319+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[1]);
10320+ break;
10321+ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
10322+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10323+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[2]);
10324+ break;
10325+ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
10326+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10327+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[3]);
10328+ break;
10329+ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
10330+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10331+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[4]);
10332+ break;
10333+ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
10334+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10335+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[5]);
10336+ break;
10337+ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
10338+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10339+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[6]);
10340+ break;
10341+ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
10342+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10343+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[7]);
10344+ break;
10345+ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
10346+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10347+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[8]);
10348+ break;
10349+ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
10350+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10351+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[9]);
10352+ break;
10353+ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
10354+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10355+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[10]);
10356+ break;
10357+ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
10358+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10359+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[11]);
10360+ break;
10361+ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
10362+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10363+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[12]);
10364+ break;
10365+ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
10366+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10367+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[13]);
10368+ break;
10369+ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
10370+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10371+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[14]);
10372+ break;
10373+ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
10374+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10375+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[15]);
10376+ break;
10377+ case GL_FRAGMENT_PROGRAM_NV:
10378+ CHECK_EXT1(NV_fragment_program, "GetFloatv");
10379+ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.Enabled);
10380+ break;
10381+ case GL_FRAGMENT_PROGRAM_BINDING_NV:
10382+ CHECK_EXT1(NV_fragment_program, "GetFloatv");
10383+ params[0] = (GLfloat)(ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0);
10384+ break;
10385+ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
10386+ CHECK_EXT1(NV_fragment_program, "GetFloatv");
10387+ params[0] = (GLfloat)(MAX_NV_FRAGMENT_PROGRAM_PARAMS);
10388+ break;
10389+ case GL_TEXTURE_RECTANGLE_NV:
10390+ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
10391+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV));
10392+ break;
10393+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
10394+ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
10395+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name);
10396+ break;
10397+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
10398+ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
10399+ params[0] = (GLfloat)(ctx->Const.MaxTextureRectSize);
10400+ break;
10401+ case GL_STENCIL_TEST_TWO_SIDE_EXT:
10402+ CHECK_EXT1(EXT_stencil_two_side, "GetFloatv");
10403+ params[0] = BOOLEAN_TO_FLOAT(ctx->Stencil.TestTwoSide);
10404+ break;
10405+ case GL_ACTIVE_STENCIL_FACE_EXT:
10406+ CHECK_EXT1(EXT_stencil_two_side, "GetFloatv");
10407+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
10408+ break;
10409+ case GL_MAX_SHININESS_NV:
10410+ CHECK_EXT1(NV_light_max_exponent, "GetFloatv");
10411+ params[0] = ctx->Const.MaxShininess;
10412+ break;
10413+ case GL_MAX_SPOT_EXPONENT_NV:
10414+ CHECK_EXT1(NV_light_max_exponent, "GetFloatv");
10415+ params[0] = ctx->Const.MaxSpotExponent;
10416+ break;
10417+ case GL_ARRAY_BUFFER_BINDING_ARB:
10418+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10419+ params[0] = (GLfloat)(ctx->Array.ArrayBufferObj->Name);
10420+ break;
10421+ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
10422+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10423+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
10424+ break;
10425+ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
10426+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10427+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Normal.BufferObj->Name);
10428+ break;
10429+ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
10430+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10431+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.BufferObj->Name);
10432+ break;
10433+ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
10434+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10435+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Index.BufferObj->Name);
10436+ break;
10437+ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
10438+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10439+ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
10440+ break;
10441+ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
10442+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10443+ params[0] = (GLfloat)(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
10444+ break;
10445+ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
10446+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10447+ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
10448+ break;
10449+ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
10450+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10451+ params[0] = (GLfloat)(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
10452+ break;
10453+ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
10454+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10455+ params[0] = (GLfloat)(ctx->Array.ElementArrayBufferObj->Name);
10456+ break;
10457+ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
10458+ CHECK_EXT1(EXT_pixel_buffer_object, "GetFloatv");
10459+ params[0] = (GLfloat)(ctx->Pack.BufferObj->Name);
10460+ break;
10461+ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
10462+ CHECK_EXT1(EXT_pixel_buffer_object, "GetFloatv");
10463+ params[0] = (GLfloat)(ctx->Unpack.BufferObj->Name);
10464+ break;
10465+ case GL_VERTEX_PROGRAM_ARB:
10466+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
10467+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.Enabled);
10468+ break;
10469+ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
10470+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
10471+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.PointSizeEnabled);
10472+ break;
10473+ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
10474+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
10475+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.TwoSideEnabled);
10476+ break;
10477+ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
10478+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
10479+ params[0] = (GLfloat)(ctx->Const.MaxProgramMatrixStackDepth);
10480+ break;
10481+ case GL_MAX_PROGRAM_MATRICES_ARB:
10482+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
10483+ params[0] = (GLfloat)(ctx->Const.MaxProgramMatrices);
10484+ break;
10485+ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
10486+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
10487+ params[0] = BOOLEAN_TO_FLOAT(ctx->CurrentStack->Depth + 1);
10488+ break;
10489+ case GL_CURRENT_MATRIX_ARB:
10490+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetFloatv");
10491+ {
10492+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
10493+ params[0] = matrix[0];
10494+ params[1] = matrix[1];
10495+ params[2] = matrix[2];
10496+ params[3] = matrix[3];
10497+ params[4] = matrix[4];
10498+ params[5] = matrix[5];
10499+ params[6] = matrix[6];
10500+ params[7] = matrix[7];
10501+ params[8] = matrix[8];
10502+ params[9] = matrix[9];
10503+ params[10] = matrix[10];
10504+ params[11] = matrix[11];
10505+ params[12] = matrix[12];
10506+ params[13] = matrix[13];
10507+ params[14] = matrix[14];
10508+ params[15] = matrix[15];
10509+ }
10510+ break;
10511+ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
10512+ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetFloatv");
10513+ {
10514+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
10515+ params[0] = matrix[0];
10516+ params[1] = matrix[4];
10517+ params[2] = matrix[8];
10518+ params[3] = matrix[12];
10519+ params[4] = matrix[1];
10520+ params[5] = matrix[5];
10521+ params[6] = matrix[9];
10522+ params[7] = matrix[13];
10523+ params[8] = matrix[2];
10524+ params[9] = matrix[6];
10525+ params[10] = matrix[10];
10526+ params[11] = matrix[14];
10527+ params[12] = matrix[3];
10528+ params[13] = matrix[7];
10529+ params[14] = matrix[11];
10530+ params[15] = matrix[15];
10531+ }
10532+ break;
10533+ case GL_MAX_VERTEX_ATTRIBS_ARB:
10534+ CHECK_EXT1(ARB_vertex_program, "GetFloatv");
10535+ params[0] = (GLfloat)(ctx->Const.VertexProgram.MaxAttribs);
10536+ break;
10537+ case GL_PROGRAM_ERROR_POSITION_ARB:
10538+ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetFloatv");
10539+ params[0] = (GLfloat)(ctx->Program.ErrorPos);
10540+ break;
10541+ case GL_FRAGMENT_PROGRAM_ARB:
10542+ CHECK_EXT1(ARB_fragment_program, "GetFloatv");
10543+ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.Enabled);
10544+ break;
10545+ case GL_MAX_TEXTURE_COORDS_ARB:
10546+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetFloatv");
10547+ params[0] = (GLfloat)(ctx->Const.MaxTextureCoordUnits);
10548+ break;
10549+ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
10550+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetFloatv");
10551+ params[0] = (GLfloat)(ctx->Const.MaxTextureImageUnits);
10552+ break;
10553+ case GL_DEPTH_BOUNDS_TEST_EXT:
10554+ CHECK_EXT1(EXT_depth_bounds_test, "GetFloatv");
10555+ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.BoundsTest);
10556+ break;
10557+ case GL_DEPTH_BOUNDS_EXT:
10558+ CHECK_EXT1(EXT_depth_bounds_test, "GetFloatv");
10559+ params[0] = ctx->Depth.BoundsMin;
10560+ params[1] = ctx->Depth.BoundsMax;
10561+ break;
10562+ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
10563+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10564+ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.CallbackEnabled);
10565+ break;
10566+ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
10567+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10568+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.CallbackEnabled);
10569+ break;
10570+ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
10571+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10572+ params[0] = (GLfloat)(ctx->FragmentProgram.CurrentPosition);
10573+ break;
10574+ case GL_VERTEX_PROGRAM_POSITION_MESA:
10575+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10576+ params[0] = (GLfloat)(ctx->VertexProgram.CurrentPosition);
10577+ break;
10578+ case GL_MAX_DRAW_BUFFERS_ARB:
10579+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10580+ params[0] = (GLfloat)(ctx->Const.MaxDrawBuffers);
10581+ break;
10582+ case GL_DRAW_BUFFER0_ARB:
10583+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10584+ params[0] = ENUM_TO_FLOAT(ctx->DrawBuffer->ColorDrawBuffer[0]);
10585+ break;
10586+ case GL_DRAW_BUFFER1_ARB:
10587+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10588+ {
10589+ GLenum buffer;
10590+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
10591+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
10592+ return;
10593+ }
10594+ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
10595+ params[0] = ENUM_TO_FLOAT(buffer);
10596+ }
10597+ break;
10598+ case GL_DRAW_BUFFER2_ARB:
10599+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10600+ {
10601+ GLenum buffer;
10602+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
10603+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
10604+ return;
10605+ }
10606+ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
10607+ params[0] = ENUM_TO_FLOAT(buffer);
10608+ }
10609+ break;
10610+ case GL_DRAW_BUFFER3_ARB:
10611+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10612+ {
10613+ GLenum buffer;
10614+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
10615+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
10616+ return;
10617+ }
10618+ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
10619+ params[0] = ENUM_TO_FLOAT(buffer);
10620+ }
10621+ break;
10622+ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
10623+ CHECK_EXT1(OES_read_format, "GetFloatv");
10624+ params[0] = (GLfloat)(ctx->Const.ColorReadType);
10625+ break;
10626+ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
10627+ CHECK_EXT1(OES_read_format, "GetFloatv");
10628+ params[0] = (GLfloat)(ctx->Const.ColorReadFormat);
10629+ break;
10630+ case GL_NUM_FRAGMENT_REGISTERS_ATI:
10631+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10632+ params[0] = (GLfloat)(6);
10633+ break;
10634+ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
10635+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10636+ params[0] = (GLfloat)(8);
10637+ break;
10638+ case GL_NUM_PASSES_ATI:
10639+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10640+ params[0] = (GLfloat)(2);
10641+ break;
10642+ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
10643+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10644+ params[0] = (GLfloat)(8);
10645+ break;
10646+ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
10647+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10648+ params[0] = (GLfloat)(16);
10649+ break;
10650+ case GL_COLOR_ALPHA_PAIRING_ATI:
10651+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10652+ params[0] = BOOLEAN_TO_FLOAT(GL_TRUE);
10653+ break;
10654+ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
10655+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10656+ params[0] = (GLfloat)(3);
10657+ break;
10658+ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
10659+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10660+ params[0] = (GLfloat)(3);
10661+ break;
10662+ case GL_STENCIL_BACK_FUNC:
10663+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.Function[1]);
10664+ break;
10665+ case GL_STENCIL_BACK_VALUE_MASK:
10666+ params[0] = (GLfloat)(ctx->Stencil.ValueMask[1]);
10667+ break;
10668+ case GL_STENCIL_BACK_REF:
10669+ params[0] = (GLfloat)(ctx->Stencil.Ref[1]);
10670+ break;
10671+ case GL_STENCIL_BACK_FAIL:
10672+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.FailFunc[1]);
10673+ break;
10674+ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
10675+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZFailFunc[1]);
10676+ break;
10677+ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
10678+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZPassFunc[1]);
10679+ break;
10680+ case GL_FRAMEBUFFER_BINDING_EXT:
10681+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10682+ params[0] = (GLfloat)(ctx->DrawBuffer->Name);
10683+ break;
10684+ case GL_RENDERBUFFER_BINDING_EXT:
10685+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10686+ params[0] = (GLfloat)(ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0);
10687+ break;
10688+ case GL_MAX_COLOR_ATTACHMENTS_EXT:
10689+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10690+ params[0] = (GLfloat)(ctx->Const.MaxColorAttachments);
10691+ break;
10692+ case GL_MAX_RENDERBUFFER_SIZE_EXT:
10693+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10694+ params[0] = (GLfloat)(ctx->Const.MaxRenderbufferSize);
10695+ break;
10696+ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
10697+ CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
10698+ params[0] = (GLfloat)(MAX_FRAGMENT_UNIFORM_COMPONENTS);
10699+ break;
10700+ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
10701+ CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
10702+ params[0] = ENUM_TO_FLOAT(ctx->Hint.FragmentShaderDerivative);
10703+ break;
10704+ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
10705+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10706+ params[0] = (GLfloat)(MAX_VERTEX_UNIFORM_COMPONENTS);
10707+ break;
10708+ case GL_MAX_VARYING_FLOATS_ARB:
10709+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10710+ params[0] = (GLfloat)(MAX_VARYING_FLOATS);
10711+ break;
10712+ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
10713+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10714+ params[0] = (GLfloat)(MAX_VERTEX_TEXTURE_IMAGE_UNITS);
10715+ break;
10716+ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
10717+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10718+ params[0] = (GLfloat)(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
10719+ break;
10720+ default:
10721+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv(pname=0x%x)", pname);
10722+ }
10723+}
10724+
10725+void GLAPIENTRY
10726+_mesa_GetIntegerv( GLenum pname, GLint *params )
10727+{
10728+ GET_CURRENT_CONTEXT(ctx);
10729+ ASSERT_OUTSIDE_BEGIN_END(ctx);
10730+
10731+ if (!params)
10732+ return;
10733+
10734+ if (ctx->NewState)
10735+ _mesa_update_state(ctx);
10736+
10737+ if (ctx->Driver.GetIntegerv &&
10738+ ctx->Driver.GetIntegerv(ctx, pname, params))
10739+ return;
10740+
10741+ switch (pname) {
10742+ case GL_ACCUM_RED_BITS:
10743+ params[0] = ctx->DrawBuffer->Visual.accumRedBits;
10744+ break;
10745+ case GL_ACCUM_GREEN_BITS:
10746+ params[0] = ctx->DrawBuffer->Visual.accumGreenBits;
10747+ break;
10748+ case GL_ACCUM_BLUE_BITS:
10749+ params[0] = ctx->DrawBuffer->Visual.accumBlueBits;
10750+ break;
10751+ case GL_ACCUM_ALPHA_BITS:
10752+ params[0] = ctx->DrawBuffer->Visual.accumAlphaBits;
10753+ break;
10754+ case GL_ACCUM_CLEAR_VALUE:
10755+ params[0] = FLOAT_TO_INT(ctx->Accum.ClearColor[0]);
10756+ params[1] = FLOAT_TO_INT(ctx->Accum.ClearColor[1]);
10757+ params[2] = FLOAT_TO_INT(ctx->Accum.ClearColor[2]);
10758+ params[3] = FLOAT_TO_INT(ctx->Accum.ClearColor[3]);
10759+ break;
10760+ case GL_ALPHA_BIAS:
10761+ params[0] = IROUND(ctx->Pixel.AlphaBias);
10762+ break;
10763+ case GL_ALPHA_BITS:
10764+ params[0] = ctx->DrawBuffer->Visual.alphaBits;
10765+ break;
10766+ case GL_ALPHA_SCALE:
10767+ params[0] = IROUND(ctx->Pixel.AlphaScale);
10768+ break;
10769+ case GL_ALPHA_TEST:
10770+ params[0] = BOOLEAN_TO_INT(ctx->Color.AlphaEnabled);
10771+ break;
10772+ case GL_ALPHA_TEST_FUNC:
10773+ params[0] = ENUM_TO_INT(ctx->Color.AlphaFunc);
10774+ break;
10775+ case GL_ALPHA_TEST_REF:
10776+ params[0] = FLOAT_TO_INT(ctx->Color.AlphaRef);
10777+ break;
10778+ case GL_ATTRIB_STACK_DEPTH:
10779+ params[0] = ctx->AttribStackDepth;
10780+ break;
10781+ case GL_AUTO_NORMAL:
10782+ params[0] = BOOLEAN_TO_INT(ctx->Eval.AutoNormal);
10783+ break;
10784+ case GL_AUX_BUFFERS:
10785+ params[0] = ctx->DrawBuffer->Visual.numAuxBuffers;
10786+ break;
10787+ case GL_BLEND:
10788+ params[0] = BOOLEAN_TO_INT(ctx->Color.BlendEnabled);
10789+ break;
10790+ case GL_BLEND_DST:
10791+ params[0] = ENUM_TO_INT(ctx->Color.BlendDstRGB);
10792+ break;
10793+ case GL_BLEND_SRC:
10794+ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcRGB);
10795+ break;
10796+ case GL_BLEND_SRC_RGB_EXT:
10797+ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcRGB);
10798+ break;
10799+ case GL_BLEND_DST_RGB_EXT:
10800+ params[0] = ENUM_TO_INT(ctx->Color.BlendDstRGB);
10801+ break;
10802+ case GL_BLEND_SRC_ALPHA_EXT:
10803+ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcA);
10804+ break;
10805+ case GL_BLEND_DST_ALPHA_EXT:
10806+ params[0] = ENUM_TO_INT(ctx->Color.BlendDstA);
10807+ break;
10808+ case GL_BLEND_EQUATION:
10809+ params[0] = ENUM_TO_INT(ctx->Color.BlendEquationRGB );
10810+ break;
10811+ case GL_BLEND_EQUATION_ALPHA_EXT:
10812+ params[0] = ENUM_TO_INT(ctx->Color.BlendEquationA );
10813+ break;
10814+ case GL_BLEND_COLOR_EXT:
10815+ params[0] = FLOAT_TO_INT(ctx->Color.BlendColor[0]);
10816+ params[1] = FLOAT_TO_INT(ctx->Color.BlendColor[1]);
10817+ params[2] = FLOAT_TO_INT(ctx->Color.BlendColor[2]);
10818+ params[3] = FLOAT_TO_INT(ctx->Color.BlendColor[3]);
10819+ break;
10820+ case GL_BLUE_BIAS:
10821+ params[0] = IROUND(ctx->Pixel.BlueBias);
10822+ break;
10823+ case GL_BLUE_BITS:
10824+ params[0] = ctx->DrawBuffer->Visual.blueBits;
10825+ break;
10826+ case GL_BLUE_SCALE:
10827+ params[0] = IROUND(ctx->Pixel.BlueScale);
10828+ break;
10829+ case GL_CLIENT_ATTRIB_STACK_DEPTH:
10830+ params[0] = ctx->ClientAttribStackDepth;
10831+ break;
10832+ case GL_CLIP_PLANE0:
10833+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 0) & 1);
10834+ break;
10835+ case GL_CLIP_PLANE1:
10836+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 1) & 1);
10837+ break;
10838+ case GL_CLIP_PLANE2:
10839+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 2) & 1);
10840+ break;
10841+ case GL_CLIP_PLANE3:
10842+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 3) & 1);
10843+ break;
10844+ case GL_CLIP_PLANE4:
10845+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 4) & 1);
10846+ break;
10847+ case GL_CLIP_PLANE5:
10848+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 5) & 1);
10849+ break;
10850+ case GL_COLOR_CLEAR_VALUE:
10851+ params[0] = FLOAT_TO_INT(ctx->Color.ClearColor[0]);
10852+ params[1] = FLOAT_TO_INT(ctx->Color.ClearColor[1]);
10853+ params[2] = FLOAT_TO_INT(ctx->Color.ClearColor[2]);
10854+ params[3] = FLOAT_TO_INT(ctx->Color.ClearColor[3]);
10855+ break;
10856+ case GL_COLOR_MATERIAL:
10857+ params[0] = BOOLEAN_TO_INT(ctx->Light.ColorMaterialEnabled);
10858+ break;
10859+ case GL_COLOR_MATERIAL_FACE:
10860+ params[0] = ENUM_TO_INT(ctx->Light.ColorMaterialFace);
10861+ break;
10862+ case GL_COLOR_MATERIAL_PARAMETER:
10863+ params[0] = ENUM_TO_INT(ctx->Light.ColorMaterialMode);
10864+ break;
10865+ case GL_COLOR_WRITEMASK:
10866+ params[0] = ctx->Color.ColorMask[RCOMP] ? 1 : 0;
10867+ params[1] = ctx->Color.ColorMask[GCOMP] ? 1 : 0;
10868+ params[2] = ctx->Color.ColorMask[BCOMP] ? 1 : 0;
10869+ params[3] = ctx->Color.ColorMask[ACOMP] ? 1 : 0;
10870+ break;
10871+ case GL_CULL_FACE:
10872+ params[0] = BOOLEAN_TO_INT(ctx->Polygon.CullFlag);
10873+ break;
10874+ case GL_CULL_FACE_MODE:
10875+ params[0] = ENUM_TO_INT(ctx->Polygon.CullFaceMode);
10876+ break;
10877+ case GL_CURRENT_COLOR:
10878+ {
10879+ FLUSH_CURRENT(ctx, 0);
10880+ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]);
10881+ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]);
10882+ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]);
10883+ params[3] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]);
10884+ }
10885+ break;
10886+ case GL_CURRENT_INDEX:
10887+ {
10888+ FLUSH_CURRENT(ctx, 0);
10889+ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]);
10890+ }
10891+ break;
10892+ case GL_CURRENT_NORMAL:
10893+ {
10894+ FLUSH_CURRENT(ctx, 0);
10895+ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]);
10896+ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]);
10897+ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]);
10898+ }
10899+ break;
10900+ case GL_CURRENT_RASTER_COLOR:
10901+ params[0] = FLOAT_TO_INT(ctx->Current.RasterColor[0]);
10902+ params[1] = FLOAT_TO_INT(ctx->Current.RasterColor[1]);
10903+ params[2] = FLOAT_TO_INT(ctx->Current.RasterColor[2]);
10904+ params[3] = FLOAT_TO_INT(ctx->Current.RasterColor[3]);
10905+ break;
10906+ case GL_CURRENT_RASTER_DISTANCE:
10907+ params[0] = IROUND(ctx->Current.RasterDistance);
10908+ break;
10909+ case GL_CURRENT_RASTER_INDEX:
10910+ params[0] = IROUND(ctx->Current.RasterIndex);
10911+ break;
10912+ case GL_CURRENT_RASTER_POSITION:
10913+ params[0] = IROUND(ctx->Current.RasterPos[0]);
10914+ params[1] = IROUND(ctx->Current.RasterPos[1]);
10915+ params[2] = IROUND(ctx->Current.RasterPos[2]);
10916+ params[3] = IROUND(ctx->Current.RasterPos[3]);
10917+ break;
10918+ case GL_CURRENT_RASTER_SECONDARY_COLOR:
10919+ params[0] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[0]);
10920+ params[1] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[1]);
10921+ params[2] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[2]);
10922+ params[3] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[3]);
10923+ break;
10924+ case GL_CURRENT_RASTER_TEXTURE_COORDS:
10925+ {
10926+ const GLuint texUnit = ctx->Texture.CurrentUnit;
10927+ params[0] = IROUND(ctx->Current.RasterTexCoords[texUnit][0]);
10928+ params[1] = IROUND(ctx->Current.RasterTexCoords[texUnit][1]);
10929+ params[2] = IROUND(ctx->Current.RasterTexCoords[texUnit][2]);
10930+ params[3] = IROUND(ctx->Current.RasterTexCoords[texUnit][3]);
10931+ }
10932+ break;
10933+ case GL_CURRENT_RASTER_POSITION_VALID:
10934+ params[0] = BOOLEAN_TO_INT(ctx->Current.RasterPosValid);
10935+ break;
10936+ case GL_CURRENT_TEXTURE_COORDS:
10937+ {
10938+ const GLuint texUnit = ctx->Texture.CurrentUnit;
10939+ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]);
10940+ params[1] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]);
10941+ params[2] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]);
10942+ params[3] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]);
10943+ }
10944+ break;
10945+ case GL_DEPTH_BIAS:
10946+ params[0] = IROUND(ctx->Pixel.DepthBias);
10947+ break;
10948+ case GL_DEPTH_BITS:
10949+ params[0] = ctx->DrawBuffer->Visual.depthBits;
10950+ break;
10951+ case GL_DEPTH_CLEAR_VALUE:
10952+ params[0] = IROUND(ctx->Depth.Clear);
10953+ break;
10954+ case GL_DEPTH_FUNC:
10955+ params[0] = ENUM_TO_INT(ctx->Depth.Func);
10956+ break;
10957+ case GL_DEPTH_RANGE:
10958+ params[0] = FLOAT_TO_INT(ctx->Viewport.Near);
10959+ params[1] = FLOAT_TO_INT(ctx->Viewport.Far);
10960+ break;
10961+ case GL_DEPTH_SCALE:
10962+ params[0] = IROUND(ctx->Pixel.DepthScale);
10963+ break;
10964+ case GL_DEPTH_TEST:
10965+ params[0] = BOOLEAN_TO_INT(ctx->Depth.Test);
10966+ break;
10967+ case GL_DEPTH_WRITEMASK:
10968+ params[0] = BOOLEAN_TO_INT(ctx->Depth.Mask);
10969+ break;
10970+ case GL_DITHER:
10971+ params[0] = BOOLEAN_TO_INT(ctx->Color.DitherFlag);
10972+ break;
10973+ case GL_DOUBLEBUFFER:
10974+ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.doubleBufferMode);
10975+ break;
10976+ case GL_DRAW_BUFFER:
10977+ params[0] = ENUM_TO_INT(ctx->DrawBuffer->ColorDrawBuffer[0]);
10978+ break;
10979+ case GL_EDGE_FLAG:
10980+ {
10981+ FLUSH_CURRENT(ctx, 0);
10982+ params[0] = BOOLEAN_TO_INT(ctx->Current.EdgeFlag);
10983+ }
10984+ break;
10985+ case GL_FEEDBACK_BUFFER_SIZE:
10986+ params[0] = ctx->Feedback.BufferSize;
10987+ break;
10988+ case GL_FEEDBACK_BUFFER_TYPE:
10989+ params[0] = ENUM_TO_INT(ctx->Feedback.Type);
10990+ break;
10991+ case GL_FOG:
10992+ params[0] = BOOLEAN_TO_INT(ctx->Fog.Enabled);
10993+ break;
10994+ case GL_FOG_COLOR:
10995+ params[0] = FLOAT_TO_INT(ctx->Fog.Color[0]);
10996+ params[1] = FLOAT_TO_INT(ctx->Fog.Color[1]);
10997+ params[2] = FLOAT_TO_INT(ctx->Fog.Color[2]);
10998+ params[3] = FLOAT_TO_INT(ctx->Fog.Color[3]);
10999+ break;
11000+ case GL_FOG_DENSITY:
11001+ params[0] = IROUND(ctx->Fog.Density);
11002+ break;
11003+ case GL_FOG_END:
11004+ params[0] = IROUND(ctx->Fog.End);
11005+ break;
11006+ case GL_FOG_HINT:
11007+ params[0] = ENUM_TO_INT(ctx->Hint.Fog);
11008+ break;
11009+ case GL_FOG_INDEX:
11010+ params[0] = IROUND(ctx->Fog.Index);
11011+ break;
11012+ case GL_FOG_MODE:
11013+ params[0] = ENUM_TO_INT(ctx->Fog.Mode);
11014+ break;
11015+ case GL_FOG_START:
11016+ params[0] = IROUND(ctx->Fog.Start);
11017+ break;
11018+ case GL_FRONT_FACE:
11019+ params[0] = ENUM_TO_INT(ctx->Polygon.FrontFace);
11020+ break;
11021+ case GL_GREEN_BIAS:
11022+ params[0] = IROUND(ctx->Pixel.GreenBias);
11023+ break;
11024+ case GL_GREEN_BITS:
11025+ params[0] = ctx->DrawBuffer->Visual.greenBits;
11026+ break;
11027+ case GL_GREEN_SCALE:
11028+ params[0] = IROUND(ctx->Pixel.GreenScale);
11029+ break;
11030+ case GL_INDEX_BITS:
11031+ params[0] = ctx->DrawBuffer->Visual.indexBits;
11032+ break;
11033+ case GL_INDEX_CLEAR_VALUE:
11034+ params[0] = ctx->Color.ClearIndex;
11035+ break;
11036+ case GL_INDEX_MODE:
11037+ params[0] = BOOLEAN_TO_INT(!ctx->DrawBuffer->Visual.rgbMode);
11038+ break;
11039+ case GL_INDEX_OFFSET:
11040+ params[0] = ctx->Pixel.IndexOffset;
11041+ break;
11042+ case GL_INDEX_SHIFT:
11043+ params[0] = ctx->Pixel.IndexShift;
11044+ break;
11045+ case GL_INDEX_WRITEMASK:
11046+ params[0] = ctx->Color.IndexMask;
11047+ break;
11048+ case GL_LIGHT0:
11049+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[0].Enabled);
11050+ break;
11051+ case GL_LIGHT1:
11052+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[1].Enabled);
11053+ break;
11054+ case GL_LIGHT2:
11055+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[2].Enabled);
11056+ break;
11057+ case GL_LIGHT3:
11058+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[3].Enabled);
11059+ break;
11060+ case GL_LIGHT4:
11061+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[4].Enabled);
11062+ break;
11063+ case GL_LIGHT5:
11064+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[5].Enabled);
11065+ break;
11066+ case GL_LIGHT6:
11067+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[6].Enabled);
11068+ break;
11069+ case GL_LIGHT7:
11070+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[7].Enabled);
11071+ break;
11072+ case GL_LIGHTING:
11073+ params[0] = BOOLEAN_TO_INT(ctx->Light.Enabled);
11074+ break;
11075+ case GL_LIGHT_MODEL_AMBIENT:
11076+ params[0] = FLOAT_TO_INT(ctx->Light.Model.Ambient[0]);
11077+ params[1] = FLOAT_TO_INT(ctx->Light.Model.Ambient[1]);
11078+ params[2] = FLOAT_TO_INT(ctx->Light.Model.Ambient[2]);
11079+ params[3] = FLOAT_TO_INT(ctx->Light.Model.Ambient[3]);
11080+ break;
11081+ case GL_LIGHT_MODEL_COLOR_CONTROL:
11082+ params[0] = ENUM_TO_INT(ctx->Light.Model.ColorControl);
11083+ break;
11084+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
11085+ params[0] = BOOLEAN_TO_INT(ctx->Light.Model.LocalViewer);
11086+ break;
11087+ case GL_LIGHT_MODEL_TWO_SIDE:
11088+ params[0] = BOOLEAN_TO_INT(ctx->Light.Model.TwoSide);
11089+ break;
11090+ case GL_LINE_SMOOTH:
11091+ params[0] = BOOLEAN_TO_INT(ctx->Line.SmoothFlag);
11092+ break;
11093+ case GL_LINE_SMOOTH_HINT:
11094+ params[0] = ENUM_TO_INT(ctx->Hint.LineSmooth);
11095+ break;
11096+ case GL_LINE_STIPPLE:
11097+ params[0] = BOOLEAN_TO_INT(ctx->Line.StippleFlag);
11098+ break;
11099+ case GL_LINE_STIPPLE_PATTERN:
11100+ params[0] = ctx->Line.StipplePattern;
11101+ break;
11102+ case GL_LINE_STIPPLE_REPEAT:
11103+ params[0] = ctx->Line.StippleFactor;
11104+ break;
11105+ case GL_LINE_WIDTH:
11106+ params[0] = IROUND(ctx->Line.Width);
11107+ break;
11108+ case GL_LINE_WIDTH_GRANULARITY:
11109+ params[0] = IROUND(ctx->Const.LineWidthGranularity);
11110+ break;
11111+ case GL_LINE_WIDTH_RANGE:
11112+ params[0] = IROUND(ctx->Const.MinLineWidthAA);
11113+ params[1] = IROUND(ctx->Const.MaxLineWidthAA);
11114+ break;
11115+ case GL_ALIASED_LINE_WIDTH_RANGE:
11116+ params[0] = IROUND(ctx->Const.MinLineWidth);
11117+ params[1] = IROUND(ctx->Const.MaxLineWidth);
11118+ break;
11119+ case GL_LIST_BASE:
11120+ params[0] = ctx->List.ListBase;
11121+ break;
11122+ case GL_LIST_INDEX:
11123+ params[0] = ctx->ListState.CurrentListNum;
11124+ break;
11125+ case GL_LIST_MODE:
11126+ {
11127+ GLenum mode;
11128+ if (!ctx->CompileFlag)
11129+ mode = 0;
11130+ else if (ctx->ExecuteFlag)
11131+ mode = GL_COMPILE_AND_EXECUTE;
11132+ else
11133+ mode = GL_COMPILE;
11134+ params[0] = ENUM_TO_INT(mode);
11135+ }
11136+ break;
11137+ case GL_INDEX_LOGIC_OP:
11138+ params[0] = BOOLEAN_TO_INT(ctx->Color.IndexLogicOpEnabled);
11139+ break;
11140+ case GL_COLOR_LOGIC_OP:
11141+ params[0] = BOOLEAN_TO_INT(ctx->Color.ColorLogicOpEnabled);
11142+ break;
11143+ case GL_LOGIC_OP_MODE:
11144+ params[0] = ENUM_TO_INT(ctx->Color.LogicOp);
11145+ break;
11146+ case GL_MAP1_COLOR_4:
11147+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Color4);
11148+ break;
11149+ case GL_MAP1_GRID_DOMAIN:
11150+ params[0] = IROUND(ctx->Eval.MapGrid1u1);
11151+ params[1] = IROUND(ctx->Eval.MapGrid1u2);
11152+ break;
11153+ case GL_MAP1_GRID_SEGMENTS:
11154+ params[0] = ctx->Eval.MapGrid1un;
11155+ break;
11156+ case GL_MAP1_INDEX:
11157+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Index);
11158+ break;
11159+ case GL_MAP1_NORMAL:
11160+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Normal);
11161+ break;
11162+ case GL_MAP1_TEXTURE_COORD_1:
11163+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord1);
11164+ break;
11165+ case GL_MAP1_TEXTURE_COORD_2:
11166+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord2);
11167+ break;
11168+ case GL_MAP1_TEXTURE_COORD_3:
11169+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord3);
11170+ break;
11171+ case GL_MAP1_TEXTURE_COORD_4:
11172+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord4);
11173+ break;
11174+ case GL_MAP1_VERTEX_3:
11175+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Vertex3);
11176+ break;
11177+ case GL_MAP1_VERTEX_4:
11178+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Vertex4);
11179+ break;
11180+ case GL_MAP2_COLOR_4:
11181+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Color4);
11182+ break;
11183+ case GL_MAP2_GRID_DOMAIN:
11184+ params[0] = IROUND(ctx->Eval.MapGrid2u1);
11185+ params[1] = IROUND(ctx->Eval.MapGrid2u2);
11186+ params[2] = IROUND(ctx->Eval.MapGrid2v1);
11187+ params[3] = IROUND(ctx->Eval.MapGrid2v2);
11188+ break;
11189+ case GL_MAP2_GRID_SEGMENTS:
11190+ params[0] = ctx->Eval.MapGrid2un;
11191+ params[1] = ctx->Eval.MapGrid2vn;
11192+ break;
11193+ case GL_MAP2_INDEX:
11194+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Index);
11195+ break;
11196+ case GL_MAP2_NORMAL:
11197+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Normal);
11198+ break;
11199+ case GL_MAP2_TEXTURE_COORD_1:
11200+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord1);
11201+ break;
11202+ case GL_MAP2_TEXTURE_COORD_2:
11203+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord2);
11204+ break;
11205+ case GL_MAP2_TEXTURE_COORD_3:
11206+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord3);
11207+ break;
11208+ case GL_MAP2_TEXTURE_COORD_4:
11209+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord4);
11210+ break;
11211+ case GL_MAP2_VERTEX_3:
11212+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Vertex3);
11213+ break;
11214+ case GL_MAP2_VERTEX_4:
11215+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Vertex4);
11216+ break;
11217+ case GL_MAP_COLOR:
11218+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MapColorFlag);
11219+ break;
11220+ case GL_MAP_STENCIL:
11221+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MapStencilFlag);
11222+ break;
11223+ case GL_MATRIX_MODE:
11224+ params[0] = ENUM_TO_INT(ctx->Transform.MatrixMode);
11225+ break;
11226+ case GL_MAX_ATTRIB_STACK_DEPTH:
11227+ params[0] = MAX_ATTRIB_STACK_DEPTH;
11228+ break;
11229+ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
11230+ params[0] = MAX_CLIENT_ATTRIB_STACK_DEPTH;
11231+ break;
11232+ case GL_MAX_CLIP_PLANES:
11233+ params[0] = ctx->Const.MaxClipPlanes;
11234+ break;
11235+ case GL_MAX_ELEMENTS_VERTICES:
11236+ params[0] = ctx->Const.MaxArrayLockSize;
11237+ break;
11238+ case GL_MAX_ELEMENTS_INDICES:
11239+ params[0] = ctx->Const.MaxArrayLockSize;
11240+ break;
11241+ case GL_MAX_EVAL_ORDER:
11242+ params[0] = MAX_EVAL_ORDER;
11243+ break;
11244+ case GL_MAX_LIGHTS:
11245+ params[0] = ctx->Const.MaxLights;
11246+ break;
11247+ case GL_MAX_LIST_NESTING:
11248+ params[0] = MAX_LIST_NESTING;
11249+ break;
11250+ case GL_MAX_MODELVIEW_STACK_DEPTH:
11251+ params[0] = MAX_MODELVIEW_STACK_DEPTH;
11252+ break;
11253+ case GL_MAX_NAME_STACK_DEPTH:
11254+ params[0] = MAX_NAME_STACK_DEPTH;
11255+ break;
11256+ case GL_MAX_PIXEL_MAP_TABLE:
11257+ params[0] = MAX_PIXEL_MAP_TABLE;
11258+ break;
11259+ case GL_MAX_PROJECTION_STACK_DEPTH:
11260+ params[0] = MAX_PROJECTION_STACK_DEPTH;
11261+ break;
11262+ case GL_MAX_TEXTURE_SIZE:
11263+ params[0] = 1 << (ctx->Const.MaxTextureLevels - 1);
11264+ break;
11265+ case GL_MAX_3D_TEXTURE_SIZE:
11266+ params[0] = 1 << (ctx->Const.Max3DTextureLevels - 1);
11267+ break;
11268+ case GL_MAX_TEXTURE_STACK_DEPTH:
11269+ params[0] = MAX_TEXTURE_STACK_DEPTH;
11270+ break;
11271+ case GL_MAX_VIEWPORT_DIMS:
11272+ params[0] = ctx->Const.MaxViewportWidth;
11273+ params[1] = ctx->Const.MaxViewportHeight;
11274+ break;
11275+ case GL_MODELVIEW_MATRIX:
11276+ {
11277+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
11278+ params[0] = IROUND(matrix[0]);
11279+ params[1] = IROUND(matrix[1]);
11280+ params[2] = IROUND(matrix[2]);
11281+ params[3] = IROUND(matrix[3]);
11282+ params[4] = IROUND(matrix[4]);
11283+ params[5] = IROUND(matrix[5]);
11284+ params[6] = IROUND(matrix[6]);
11285+ params[7] = IROUND(matrix[7]);
11286+ params[8] = IROUND(matrix[8]);
11287+ params[9] = IROUND(matrix[9]);
11288+ params[10] = IROUND(matrix[10]);
11289+ params[11] = IROUND(matrix[11]);
11290+ params[12] = IROUND(matrix[12]);
11291+ params[13] = IROUND(matrix[13]);
11292+ params[14] = IROUND(matrix[14]);
11293+ params[15] = IROUND(matrix[15]);
11294+ }
11295+ break;
11296+ case GL_MODELVIEW_STACK_DEPTH:
11297+ params[0] = ctx->ModelviewMatrixStack.Depth + 1;
11298+ break;
11299+ case GL_NAME_STACK_DEPTH:
11300+ params[0] = ctx->Select.NameStackDepth;
11301+ break;
11302+ case GL_NORMALIZE:
11303+ params[0] = BOOLEAN_TO_INT(ctx->Transform.Normalize);
11304+ break;
11305+ case GL_PACK_ALIGNMENT:
11306+ params[0] = ctx->Pack.Alignment;
11307+ break;
11308+ case GL_PACK_LSB_FIRST:
11309+ params[0] = BOOLEAN_TO_INT(ctx->Pack.LsbFirst);
11310+ break;
11311+ case GL_PACK_ROW_LENGTH:
11312+ params[0] = ctx->Pack.RowLength;
11313+ break;
11314+ case GL_PACK_SKIP_PIXELS:
11315+ params[0] = ctx->Pack.SkipPixels;
11316+ break;
11317+ case GL_PACK_SKIP_ROWS:
11318+ params[0] = ctx->Pack.SkipRows;
11319+ break;
11320+ case GL_PACK_SWAP_BYTES:
11321+ params[0] = BOOLEAN_TO_INT(ctx->Pack.SwapBytes);
11322+ break;
11323+ case GL_PACK_SKIP_IMAGES_EXT:
11324+ params[0] = ctx->Pack.SkipImages;
11325+ break;
11326+ case GL_PACK_IMAGE_HEIGHT_EXT:
11327+ params[0] = ctx->Pack.ImageHeight;
11328+ break;
11329+ case GL_PACK_INVERT_MESA:
11330+ params[0] = BOOLEAN_TO_INT(ctx->Pack.Invert);
11331+ break;
11332+ case GL_PERSPECTIVE_CORRECTION_HINT:
11333+ params[0] = ENUM_TO_INT(ctx->Hint.PerspectiveCorrection);
11334+ break;
11335+ case GL_PIXEL_MAP_A_TO_A_SIZE:
11336+ params[0] = ctx->Pixel.MapAtoAsize;
11337+ break;
11338+ case GL_PIXEL_MAP_B_TO_B_SIZE:
11339+ params[0] = ctx->Pixel.MapBtoBsize;
11340+ break;
11341+ case GL_PIXEL_MAP_G_TO_G_SIZE:
11342+ params[0] = ctx->Pixel.MapGtoGsize;
11343+ break;
11344+ case GL_PIXEL_MAP_I_TO_A_SIZE:
11345+ params[0] = ctx->Pixel.MapItoAsize;
11346+ break;
11347+ case GL_PIXEL_MAP_I_TO_B_SIZE:
11348+ params[0] = ctx->Pixel.MapItoBsize;
11349+ break;
11350+ case GL_PIXEL_MAP_I_TO_G_SIZE:
11351+ params[0] = ctx->Pixel.MapItoGsize;
11352+ break;
11353+ case GL_PIXEL_MAP_I_TO_I_SIZE:
11354+ params[0] = ctx->Pixel.MapItoIsize;
11355+ break;
11356+ case GL_PIXEL_MAP_I_TO_R_SIZE:
11357+ params[0] = ctx->Pixel.MapItoRsize;
11358+ break;
11359+ case GL_PIXEL_MAP_R_TO_R_SIZE:
11360+ params[0] = ctx->Pixel.MapRtoRsize;
11361+ break;
11362+ case GL_PIXEL_MAP_S_TO_S_SIZE:
11363+ params[0] = ctx->Pixel.MapStoSsize;
11364+ break;
11365+ case GL_POINT_SIZE:
11366+ params[0] = IROUND(ctx->Point.Size);
11367+ break;
11368+ case GL_POINT_SIZE_GRANULARITY:
11369+ params[0] = IROUND(ctx->Const.PointSizeGranularity);
11370+ break;
11371+ case GL_POINT_SIZE_RANGE:
11372+ params[0] = IROUND(ctx->Const.MinPointSizeAA);
11373+ params[1] = IROUND(ctx->Const.MaxPointSizeAA);
11374+ break;
11375+ case GL_ALIASED_POINT_SIZE_RANGE:
11376+ params[0] = IROUND(ctx->Const.MinPointSize);
11377+ params[1] = IROUND(ctx->Const.MaxPointSize);
11378+ break;
11379+ case GL_POINT_SMOOTH:
11380+ params[0] = BOOLEAN_TO_INT(ctx->Point.SmoothFlag);
11381+ break;
11382+ case GL_POINT_SMOOTH_HINT:
11383+ params[0] = ENUM_TO_INT(ctx->Hint.PointSmooth);
11384+ break;
11385+ case GL_POINT_SIZE_MIN_EXT:
11386+ params[0] = IROUND(ctx->Point.MinSize);
11387+ break;
11388+ case GL_POINT_SIZE_MAX_EXT:
11389+ params[0] = IROUND(ctx->Point.MaxSize);
11390+ break;
11391+ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
11392+ params[0] = IROUND(ctx->Point.Threshold);
11393+ break;
11394+ case GL_DISTANCE_ATTENUATION_EXT:
11395+ params[0] = IROUND(ctx->Point.Params[0]);
11396+ params[1] = IROUND(ctx->Point.Params[1]);
11397+ params[2] = IROUND(ctx->Point.Params[2]);
11398+ break;
11399+ case GL_POLYGON_MODE:
11400+ params[0] = ENUM_TO_INT(ctx->Polygon.FrontMode);
11401+ params[1] = ENUM_TO_INT(ctx->Polygon.BackMode);
11402+ break;
11403+ case GL_POLYGON_OFFSET_BIAS_EXT:
11404+ params[0] = IROUND(ctx->Polygon.OffsetUnits);
11405+ break;
11406+ case GL_POLYGON_OFFSET_FACTOR:
11407+ params[0] = IROUND(ctx->Polygon.OffsetFactor );
11408+ break;
11409+ case GL_POLYGON_OFFSET_UNITS:
11410+ params[0] = IROUND(ctx->Polygon.OffsetUnits );
11411+ break;
11412+ case GL_POLYGON_SMOOTH:
11413+ params[0] = BOOLEAN_TO_INT(ctx->Polygon.SmoothFlag);
11414+ break;
11415+ case GL_POLYGON_SMOOTH_HINT:
11416+ params[0] = ENUM_TO_INT(ctx->Hint.PolygonSmooth);
11417+ break;
11418+ case GL_POLYGON_STIPPLE:
11419+ params[0] = BOOLEAN_TO_INT(ctx->Polygon.StippleFlag);
11420+ break;
11421+ case GL_PROJECTION_MATRIX:
11422+ {
11423+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
11424+ params[0] = IROUND(matrix[0]);
11425+ params[1] = IROUND(matrix[1]);
11426+ params[2] = IROUND(matrix[2]);
11427+ params[3] = IROUND(matrix[3]);
11428+ params[4] = IROUND(matrix[4]);
11429+ params[5] = IROUND(matrix[5]);
11430+ params[6] = IROUND(matrix[6]);
11431+ params[7] = IROUND(matrix[7]);
11432+ params[8] = IROUND(matrix[8]);
11433+ params[9] = IROUND(matrix[9]);
11434+ params[10] = IROUND(matrix[10]);
11435+ params[11] = IROUND(matrix[11]);
11436+ params[12] = IROUND(matrix[12]);
11437+ params[13] = IROUND(matrix[13]);
11438+ params[14] = IROUND(matrix[14]);
11439+ params[15] = IROUND(matrix[15]);
11440+ }
11441+ break;
11442+ case GL_PROJECTION_STACK_DEPTH:
11443+ params[0] = ctx->ProjectionMatrixStack.Depth + 1;
11444+ break;
11445+ case GL_READ_BUFFER:
11446+ params[0] = ENUM_TO_INT(ctx->ReadBuffer->ColorReadBuffer);
11447+ break;
11448+ case GL_RED_BIAS:
11449+ params[0] = IROUND(ctx->Pixel.RedBias);
11450+ break;
11451+ case GL_RED_BITS:
11452+ params[0] = ctx->DrawBuffer->Visual.redBits ;
11453+ break;
11454+ case GL_RED_SCALE:
11455+ params[0] = IROUND(ctx->Pixel.RedScale);
11456+ break;
11457+ case GL_RENDER_MODE:
11458+ params[0] = ENUM_TO_INT(ctx->RenderMode);
11459+ break;
11460+ case GL_RESCALE_NORMAL:
11461+ params[0] = BOOLEAN_TO_INT(ctx->Transform.RescaleNormals);
11462+ break;
11463+ case GL_RGBA_MODE:
11464+ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.rgbMode);
11465+ break;
11466+ case GL_SCISSOR_BOX:
11467+ params[0] = ctx->Scissor.X;
11468+ params[1] = ctx->Scissor.Y;
11469+ params[2] = ctx->Scissor.Width;
11470+ params[3] = ctx->Scissor.Height;
11471+ break;
11472+ case GL_SCISSOR_TEST:
11473+ params[0] = BOOLEAN_TO_INT(ctx->Scissor.Enabled);
11474+ break;
11475+ case GL_SELECTION_BUFFER_SIZE:
11476+ params[0] = ctx->Select.BufferSize;
11477+ break;
11478+ case GL_SHADE_MODEL:
11479+ params[0] = ENUM_TO_INT(ctx->Light.ShadeModel);
11480+ break;
11481+ case GL_SHARED_TEXTURE_PALETTE_EXT:
11482+ params[0] = BOOLEAN_TO_INT(ctx->Texture.SharedPalette);
11483+ break;
11484+ case GL_STENCIL_BITS:
11485+ params[0] = ctx->DrawBuffer->Visual.stencilBits;
11486+ break;
11487+ case GL_STENCIL_CLEAR_VALUE:
11488+ params[0] = ctx->Stencil.Clear;
11489+ break;
11490+ case GL_STENCIL_FAIL:
11491+ params[0] = ENUM_TO_INT(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
11492+ break;
11493+ case GL_STENCIL_FUNC:
11494+ params[0] = ENUM_TO_INT(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
11495+ break;
11496+ case GL_STENCIL_PASS_DEPTH_FAIL:
11497+ params[0] = ENUM_TO_INT(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
11498+ break;
11499+ case GL_STENCIL_PASS_DEPTH_PASS:
11500+ params[0] = ENUM_TO_INT(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
11501+ break;
11502+ case GL_STENCIL_REF:
11503+ params[0] = ctx->Stencil.Ref[ctx->Stencil.ActiveFace];
11504+ break;
11505+ case GL_STENCIL_TEST:
11506+ params[0] = BOOLEAN_TO_INT(ctx->Stencil.Enabled);
11507+ break;
11508+ case GL_STENCIL_VALUE_MASK:
11509+ params[0] = ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace];
11510+ break;
11511+ case GL_STENCIL_WRITEMASK:
11512+ params[0] = ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace];
11513+ break;
11514+ case GL_STEREO:
11515+ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.stereoMode);
11516+ break;
11517+ case GL_SUBPIXEL_BITS:
11518+ params[0] = ctx->Const.SubPixelBits;
11519+ break;
11520+ case GL_TEXTURE_1D:
11521+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_1D));
11522+ break;
11523+ case GL_TEXTURE_2D:
11524+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_2D));
11525+ break;
11526+ case GL_TEXTURE_3D:
11527+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_3D));
11528+ break;
11529+ case GL_TEXTURE_BINDING_1D:
11530+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name;
11531+ break;
11532+ case GL_TEXTURE_BINDING_2D:
11533+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name;
11534+ break;
11535+ case GL_TEXTURE_BINDING_3D:
11536+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name;
11537+ break;
11538+ case GL_TEXTURE_ENV_COLOR:
11539+ {
11540+ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
11541+ params[0] = FLOAT_TO_INT(color[0]);
11542+ params[1] = FLOAT_TO_INT(color[1]);
11543+ params[2] = FLOAT_TO_INT(color[2]);
11544+ params[3] = FLOAT_TO_INT(color[3]);
11545+ }
11546+ break;
11547+ case GL_TEXTURE_ENV_MODE:
11548+ params[0] = ENUM_TO_INT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
11549+ break;
11550+ case GL_TEXTURE_GEN_S:
11551+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
11552+ break;
11553+ case GL_TEXTURE_GEN_T:
11554+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0));
11555+ break;
11556+ case GL_TEXTURE_GEN_R:
11557+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0));
11558+ break;
11559+ case GL_TEXTURE_GEN_Q:
11560+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0));
11561+ break;
11562+ case GL_TEXTURE_MATRIX:
11563+ {
11564+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
11565+ params[0] = IROUND(matrix[0]);
11566+ params[1] = IROUND(matrix[1]);
11567+ params[2] = IROUND(matrix[2]);
11568+ params[3] = IROUND(matrix[3]);
11569+ params[4] = IROUND(matrix[4]);
11570+ params[5] = IROUND(matrix[5]);
11571+ params[6] = IROUND(matrix[6]);
11572+ params[7] = IROUND(matrix[7]);
11573+ params[8] = IROUND(matrix[8]);
11574+ params[9] = IROUND(matrix[9]);
11575+ params[10] = IROUND(matrix[10]);
11576+ params[11] = IROUND(matrix[11]);
11577+ params[12] = IROUND(matrix[12]);
11578+ params[13] = IROUND(matrix[13]);
11579+ params[14] = IROUND(matrix[14]);
11580+ params[15] = IROUND(matrix[15]);
11581+ }
11582+ break;
11583+ case GL_TEXTURE_STACK_DEPTH:
11584+ params[0] = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1;
11585+ break;
11586+ case GL_UNPACK_ALIGNMENT:
11587+ params[0] = ctx->Unpack.Alignment;
11588+ break;
11589+ case GL_UNPACK_LSB_FIRST:
11590+ params[0] = BOOLEAN_TO_INT(ctx->Unpack.LsbFirst);
11591+ break;
11592+ case GL_UNPACK_ROW_LENGTH:
11593+ params[0] = ctx->Unpack.RowLength;
11594+ break;
11595+ case GL_UNPACK_SKIP_PIXELS:
11596+ params[0] = ctx->Unpack.SkipPixels;
11597+ break;
11598+ case GL_UNPACK_SKIP_ROWS:
11599+ params[0] = ctx->Unpack.SkipRows;
11600+ break;
11601+ case GL_UNPACK_SWAP_BYTES:
11602+ params[0] = BOOLEAN_TO_INT(ctx->Unpack.SwapBytes);
11603+ break;
11604+ case GL_UNPACK_SKIP_IMAGES_EXT:
11605+ params[0] = ctx->Unpack.SkipImages;
11606+ break;
11607+ case GL_UNPACK_IMAGE_HEIGHT_EXT:
11608+ params[0] = ctx->Unpack.ImageHeight;
11609+ break;
11610+ case GL_UNPACK_CLIENT_STORAGE_APPLE:
11611+ params[0] = BOOLEAN_TO_INT(ctx->Unpack.ClientStorage);
11612+ break;
11613+ case GL_VIEWPORT:
11614+ params[0] = ctx->Viewport.X;
11615+ params[1] = ctx->Viewport.Y;
11616+ params[2] = ctx->Viewport.Width;
11617+ params[3] = ctx->Viewport.Height;
11618+ break;
11619+ case GL_ZOOM_X:
11620+ params[0] = IROUND(ctx->Pixel.ZoomX);
11621+ break;
11622+ case GL_ZOOM_Y:
11623+ params[0] = IROUND(ctx->Pixel.ZoomY);
11624+ break;
11625+ case GL_VERTEX_ARRAY:
11626+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Vertex.Enabled);
11627+ break;
11628+ case GL_VERTEX_ARRAY_SIZE:
11629+ params[0] = ctx->Array.ArrayObj->Vertex.Size;
11630+ break;
11631+ case GL_VERTEX_ARRAY_TYPE:
11632+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Vertex.Type);
11633+ break;
11634+ case GL_VERTEX_ARRAY_STRIDE:
11635+ params[0] = ctx->Array.ArrayObj->Vertex.Stride;
11636+ break;
11637+ case GL_VERTEX_ARRAY_COUNT_EXT:
11638+ params[0] = 0;
11639+ break;
11640+ case GL_NORMAL_ARRAY:
11641+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Normal.Enabled);
11642+ break;
11643+ case GL_NORMAL_ARRAY_TYPE:
11644+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Normal.Type);
11645+ break;
11646+ case GL_NORMAL_ARRAY_STRIDE:
11647+ params[0] = ctx->Array.ArrayObj->Normal.Stride;
11648+ break;
11649+ case GL_NORMAL_ARRAY_COUNT_EXT:
11650+ params[0] = 0;
11651+ break;
11652+ case GL_COLOR_ARRAY:
11653+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Color.Enabled);
11654+ break;
11655+ case GL_COLOR_ARRAY_SIZE:
11656+ params[0] = ctx->Array.ArrayObj->Color.Size;
11657+ break;
11658+ case GL_COLOR_ARRAY_TYPE:
11659+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Color.Type);
11660+ break;
11661+ case GL_COLOR_ARRAY_STRIDE:
11662+ params[0] = ctx->Array.ArrayObj->Color.Stride;
11663+ break;
11664+ case GL_COLOR_ARRAY_COUNT_EXT:
11665+ params[0] = 0;
11666+ break;
11667+ case GL_INDEX_ARRAY:
11668+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Index.Enabled);
11669+ break;
11670+ case GL_INDEX_ARRAY_TYPE:
11671+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Index.Type);
11672+ break;
11673+ case GL_INDEX_ARRAY_STRIDE:
11674+ params[0] = ctx->Array.ArrayObj->Index.Stride;
11675+ break;
11676+ case GL_INDEX_ARRAY_COUNT_EXT:
11677+ params[0] = 0;
11678+ break;
11679+ case GL_TEXTURE_COORD_ARRAY:
11680+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
11681+ break;
11682+ case GL_TEXTURE_COORD_ARRAY_SIZE:
11683+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size;
11684+ break;
11685+ case GL_TEXTURE_COORD_ARRAY_TYPE:
11686+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
11687+ break;
11688+ case GL_TEXTURE_COORD_ARRAY_STRIDE:
11689+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride;
11690+ break;
11691+ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
11692+ params[0] = 0;
11693+ break;
11694+ case GL_EDGE_FLAG_ARRAY:
11695+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->EdgeFlag.Enabled);
11696+ break;
11697+ case GL_EDGE_FLAG_ARRAY_STRIDE:
11698+ params[0] = ctx->Array.ArrayObj->EdgeFlag.Stride;
11699+ break;
11700+ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
11701+ params[0] = 0;
11702+ break;
11703+ case GL_MAX_TEXTURE_UNITS_ARB:
11704+ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
11705+ params[0] = ctx->Const.MaxTextureUnits;
11706+ break;
11707+ case GL_ACTIVE_TEXTURE_ARB:
11708+ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
11709+ params[0] = GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit;
11710+ break;
11711+ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
11712+ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
11713+ params[0] = GL_TEXTURE0_ARB + ctx->Array.ActiveTexture;
11714+ break;
11715+ case GL_TEXTURE_CUBE_MAP_ARB:
11716+ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
11717+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB));
11718+ break;
11719+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
11720+ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
11721+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name;
11722+ break;
11723+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
11724+ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
11725+ params[0] = (1 << (ctx->Const.MaxCubeTextureLevels - 1));
11726+ break;
11727+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
11728+ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
11729+ params[0] = ctx->Hint.TextureCompression;
11730+ break;
11731+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
11732+ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
11733+ params[0] = _mesa_get_compressed_formats(ctx, NULL, GL_FALSE);
11734+ break;
11735+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
11736+ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
11737+ {
11738+ GLint formats[100];
11739+ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
11740+ ASSERT(n <= 100);
11741+ for (i = 0; i < n; i++)
11742+ params[i] = ENUM_TO_INT(formats[i]);
11743+ }
11744+ break;
11745+ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
11746+ CHECK_EXT1(EXT_compiled_vertex_array, "GetIntegerv");
11747+ params[0] = ctx->Array.LockFirst;
11748+ break;
11749+ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
11750+ CHECK_EXT1(EXT_compiled_vertex_array, "GetIntegerv");
11751+ params[0] = ctx->Array.LockCount;
11752+ break;
11753+ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
11754+ {
11755+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
11756+ params[0] = IROUND(matrix[0]);
11757+ params[1] = IROUND(matrix[4]);
11758+ params[2] = IROUND(matrix[8]);
11759+ params[3] = IROUND(matrix[12]);
11760+ params[4] = IROUND(matrix[1]);
11761+ params[5] = IROUND(matrix[5]);
11762+ params[6] = IROUND(matrix[9]);
11763+ params[7] = IROUND(matrix[13]);
11764+ params[8] = IROUND(matrix[2]);
11765+ params[9] = IROUND(matrix[6]);
11766+ params[10] = IROUND(matrix[10]);
11767+ params[11] = IROUND(matrix[14]);
11768+ params[12] = IROUND(matrix[3]);
11769+ params[13] = IROUND(matrix[7]);
11770+ params[14] = IROUND(matrix[11]);
11771+ params[15] = IROUND(matrix[15]);
11772+ }
11773+ break;
11774+ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
11775+ {
11776+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
11777+ params[0] = IROUND(matrix[0]);
11778+ params[1] = IROUND(matrix[4]);
11779+ params[2] = IROUND(matrix[8]);
11780+ params[3] = IROUND(matrix[12]);
11781+ params[4] = IROUND(matrix[1]);
11782+ params[5] = IROUND(matrix[5]);
11783+ params[6] = IROUND(matrix[9]);
11784+ params[7] = IROUND(matrix[13]);
11785+ params[8] = IROUND(matrix[2]);
11786+ params[9] = IROUND(matrix[6]);
11787+ params[10] = IROUND(matrix[10]);
11788+ params[11] = IROUND(matrix[14]);
11789+ params[12] = IROUND(matrix[3]);
11790+ params[13] = IROUND(matrix[7]);
11791+ params[14] = IROUND(matrix[11]);
11792+ params[15] = IROUND(matrix[15]);
11793+ }
11794+ break;
11795+ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
11796+ {
11797+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
11798+ params[0] = IROUND(matrix[0]);
11799+ params[1] = IROUND(matrix[4]);
11800+ params[2] = IROUND(matrix[8]);
11801+ params[3] = IROUND(matrix[12]);
11802+ params[4] = IROUND(matrix[1]);
11803+ params[5] = IROUND(matrix[5]);
11804+ params[6] = IROUND(matrix[9]);
11805+ params[7] = IROUND(matrix[13]);
11806+ params[8] = IROUND(matrix[2]);
11807+ params[9] = IROUND(matrix[6]);
11808+ params[10] = IROUND(matrix[10]);
11809+ params[11] = IROUND(matrix[14]);
11810+ params[12] = IROUND(matrix[3]);
11811+ params[13] = IROUND(matrix[7]);
11812+ params[14] = IROUND(matrix[11]);
11813+ params[15] = IROUND(matrix[15]);
11814+ }
11815+ break;
11816+ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
11817+ {
11818+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
11819+ params[0] = IROUND(matrix[0]);
11820+ params[1] = IROUND(matrix[4]);
11821+ params[2] = IROUND(matrix[8]);
11822+ params[3] = IROUND(matrix[12]);
11823+ params[4] = IROUND(matrix[1]);
11824+ params[5] = IROUND(matrix[5]);
11825+ params[6] = IROUND(matrix[9]);
11826+ params[7] = IROUND(matrix[13]);
11827+ params[8] = IROUND(matrix[2]);
11828+ params[9] = IROUND(matrix[6]);
11829+ params[10] = IROUND(matrix[10]);
11830+ params[11] = IROUND(matrix[14]);
11831+ params[12] = IROUND(matrix[3]);
11832+ params[13] = IROUND(matrix[7]);
11833+ params[14] = IROUND(matrix[11]);
11834+ params[15] = IROUND(matrix[15]);
11835+ }
11836+ break;
11837+ case GL_COLOR_MATRIX_SGI:
11838+ {
11839+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
11840+ params[0] = IROUND(matrix[0]);
11841+ params[1] = IROUND(matrix[1]);
11842+ params[2] = IROUND(matrix[2]);
11843+ params[3] = IROUND(matrix[3]);
11844+ params[4] = IROUND(matrix[4]);
11845+ params[5] = IROUND(matrix[5]);
11846+ params[6] = IROUND(matrix[6]);
11847+ params[7] = IROUND(matrix[7]);
11848+ params[8] = IROUND(matrix[8]);
11849+ params[9] = IROUND(matrix[9]);
11850+ params[10] = IROUND(matrix[10]);
11851+ params[11] = IROUND(matrix[11]);
11852+ params[12] = IROUND(matrix[12]);
11853+ params[13] = IROUND(matrix[13]);
11854+ params[14] = IROUND(matrix[14]);
11855+ params[15] = IROUND(matrix[15]);
11856+ }
11857+ break;
11858+ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
11859+ params[0] = ctx->ColorMatrixStack.Depth + 1;
11860+ break;
11861+ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
11862+ params[0] = MAX_COLOR_STACK_DEPTH;
11863+ break;
11864+ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
11865+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[0]);
11866+ break;
11867+ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
11868+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[1]);
11869+ break;
11870+ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
11871+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[2]);
11872+ break;
11873+ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
11874+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[3]);
11875+ break;
11876+ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
11877+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[0]);
11878+ break;
11879+ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
11880+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[1]);
11881+ break;
11882+ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
11883+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[2]);
11884+ break;
11885+ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
11886+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[3]);
11887+ break;
11888+ case GL_CONVOLUTION_1D_EXT:
11889+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11890+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Convolution1DEnabled);
11891+ break;
11892+ case GL_CONVOLUTION_2D_EXT:
11893+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11894+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Convolution2DEnabled);
11895+ break;
11896+ case GL_SEPARABLE_2D_EXT:
11897+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11898+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Separable2DEnabled);
11899+ break;
11900+ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
11901+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11902+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[0]);
11903+ break;
11904+ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
11905+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11906+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[1]);
11907+ break;
11908+ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
11909+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11910+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[2]);
11911+ break;
11912+ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
11913+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11914+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[3]);
11915+ break;
11916+ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
11917+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11918+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[0]);
11919+ break;
11920+ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
11921+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11922+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[1]);
11923+ break;
11924+ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
11925+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11926+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[2]);
11927+ break;
11928+ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
11929+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
11930+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[3]);
11931+ break;
11932+ case GL_HISTOGRAM:
11933+ CHECK_EXT1(EXT_histogram, "GetIntegerv");
11934+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.HistogramEnabled);
11935+ break;
11936+ case GL_MINMAX:
11937+ CHECK_EXT1(EXT_histogram, "GetIntegerv");
11938+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MinMaxEnabled);
11939+ break;
11940+ case GL_COLOR_TABLE_SGI:
11941+ CHECK_EXT1(SGI_color_table, "GetIntegerv");
11942+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.ColorTableEnabled);
11943+ break;
11944+ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
11945+ CHECK_EXT1(SGI_color_table, "GetIntegerv");
11946+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.PostConvolutionColorTableEnabled);
11947+ break;
11948+ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
11949+ CHECK_EXT1(SGI_color_table, "GetIntegerv");
11950+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.PostColorMatrixColorTableEnabled);
11951+ break;
11952+ case GL_TEXTURE_COLOR_TABLE_SGI:
11953+ CHECK_EXT1(SGI_texture_color_table, "GetIntegerv");
11954+ params[0] = BOOLEAN_TO_INT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled);
11955+ break;
11956+ case GL_COLOR_SUM_EXT:
11957+ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetIntegerv");
11958+ params[0] = BOOLEAN_TO_INT(ctx->Fog.ColorSumEnabled);
11959+ break;
11960+ case GL_CURRENT_SECONDARY_COLOR_EXT:
11961+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
11962+ {
11963+ FLUSH_CURRENT(ctx, 0);
11964+ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]);
11965+ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]);
11966+ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]);
11967+ params[3] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]);
11968+ }
11969+ break;
11970+ case GL_SECONDARY_COLOR_ARRAY_EXT:
11971+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
11972+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->SecondaryColor.Enabled);
11973+ break;
11974+ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
11975+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
11976+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->SecondaryColor.Type);
11977+ break;
11978+ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
11979+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
11980+ params[0] = ctx->Array.ArrayObj->SecondaryColor.Stride;
11981+ break;
11982+ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
11983+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
11984+ params[0] = ctx->Array.ArrayObj->SecondaryColor.Size;
11985+ break;
11986+ case GL_CURRENT_FOG_COORDINATE_EXT:
11987+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
11988+ {
11989+ FLUSH_CURRENT(ctx, 0);
11990+ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_FOG][0]);
11991+ }
11992+ break;
11993+ case GL_FOG_COORDINATE_ARRAY_EXT:
11994+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
11995+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->FogCoord.Enabled);
11996+ break;
11997+ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
11998+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
11999+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->FogCoord.Type);
12000+ break;
12001+ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
12002+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
12003+ params[0] = ctx->Array.ArrayObj->FogCoord.Stride;
12004+ break;
12005+ case GL_FOG_COORDINATE_SOURCE_EXT:
12006+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
12007+ params[0] = ENUM_TO_INT(ctx->Fog.FogCoordinateSource);
12008+ break;
12009+ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
12010+ CHECK_EXT1(EXT_texture_lod_bias, "GetIntegerv");
12011+ params[0] = IROUND(ctx->Const.MaxTextureLodBias);
12012+ break;
12013+ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
12014+ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetIntegerv");
12015+ params[0] = IROUND(ctx->Const.MaxTextureMaxAnisotropy);
12016+ break;
12017+ case GL_MULTISAMPLE_ARB:
12018+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12019+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.Enabled);
12020+ break;
12021+ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
12022+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12023+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleAlphaToCoverage);
12024+ break;
12025+ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
12026+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12027+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleAlphaToOne);
12028+ break;
12029+ case GL_SAMPLE_COVERAGE_ARB:
12030+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12031+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleCoverage);
12032+ break;
12033+ case GL_SAMPLE_COVERAGE_VALUE_ARB:
12034+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12035+ params[0] = IROUND(ctx->Multisample.SampleCoverageValue);
12036+ break;
12037+ case GL_SAMPLE_COVERAGE_INVERT_ARB:
12038+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12039+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleCoverageInvert);
12040+ break;
12041+ case GL_SAMPLE_BUFFERS_ARB:
12042+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12043+ params[0] = ctx->DrawBuffer->Visual.sampleBuffers;
12044+ break;
12045+ case GL_SAMPLES_ARB:
12046+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12047+ params[0] = ctx->DrawBuffer->Visual.samples;
12048+ break;
12049+ case GL_RASTER_POSITION_UNCLIPPED_IBM:
12050+ CHECK_EXT1(IBM_rasterpos_clip, "GetIntegerv");
12051+ params[0] = BOOLEAN_TO_INT(ctx->Transform.RasterPositionUnclipped);
12052+ break;
12053+ case GL_POINT_SPRITE_NV:
12054+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetIntegerv");
12055+ params[0] = BOOLEAN_TO_INT(ctx->Point.PointSprite);
12056+ break;
12057+ case GL_POINT_SPRITE_R_MODE_NV:
12058+ CHECK_EXT1(NV_point_sprite, "GetIntegerv");
12059+ params[0] = ENUM_TO_INT(ctx->Point.SpriteRMode);
12060+ break;
12061+ case GL_POINT_SPRITE_COORD_ORIGIN:
12062+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetIntegerv");
12063+ params[0] = ENUM_TO_INT(ctx->Point.SpriteOrigin);
12064+ break;
12065+ case GL_GENERATE_MIPMAP_HINT_SGIS:
12066+ CHECK_EXT1(SGIS_generate_mipmap, "GetIntegerv");
12067+ params[0] = ENUM_TO_INT(ctx->Hint.GenerateMipmap);
12068+ break;
12069+ case GL_VERTEX_PROGRAM_BINDING_NV:
12070+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12071+ params[0] = (ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0);
12072+ break;
12073+ case GL_VERTEX_ATTRIB_ARRAY0_NV:
12074+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12075+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[0].Enabled);
12076+ break;
12077+ case GL_VERTEX_ATTRIB_ARRAY1_NV:
12078+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12079+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[1].Enabled);
12080+ break;
12081+ case GL_VERTEX_ATTRIB_ARRAY2_NV:
12082+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12083+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[2].Enabled);
12084+ break;
12085+ case GL_VERTEX_ATTRIB_ARRAY3_NV:
12086+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12087+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[3].Enabled);
12088+ break;
12089+ case GL_VERTEX_ATTRIB_ARRAY4_NV:
12090+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12091+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[4].Enabled);
12092+ break;
12093+ case GL_VERTEX_ATTRIB_ARRAY5_NV:
12094+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12095+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[5].Enabled);
12096+ break;
12097+ case GL_VERTEX_ATTRIB_ARRAY6_NV:
12098+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12099+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[6].Enabled);
12100+ break;
12101+ case GL_VERTEX_ATTRIB_ARRAY7_NV:
12102+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12103+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[7].Enabled);
12104+ break;
12105+ case GL_VERTEX_ATTRIB_ARRAY8_NV:
12106+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12107+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[8].Enabled);
12108+ break;
12109+ case GL_VERTEX_ATTRIB_ARRAY9_NV:
12110+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12111+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[9].Enabled);
12112+ break;
12113+ case GL_VERTEX_ATTRIB_ARRAY10_NV:
12114+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12115+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[10].Enabled);
12116+ break;
12117+ case GL_VERTEX_ATTRIB_ARRAY11_NV:
12118+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12119+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[11].Enabled);
12120+ break;
12121+ case GL_VERTEX_ATTRIB_ARRAY12_NV:
12122+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12123+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[12].Enabled);
12124+ break;
12125+ case GL_VERTEX_ATTRIB_ARRAY13_NV:
12126+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12127+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[13].Enabled);
12128+ break;
12129+ case GL_VERTEX_ATTRIB_ARRAY14_NV:
12130+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12131+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[14].Enabled);
12132+ break;
12133+ case GL_VERTEX_ATTRIB_ARRAY15_NV:
12134+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12135+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[15].Enabled);
12136+ break;
12137+ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
12138+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12139+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[0]);
12140+ break;
12141+ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
12142+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12143+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[1]);
12144+ break;
12145+ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
12146+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12147+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[2]);
12148+ break;
12149+ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
12150+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12151+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[3]);
12152+ break;
12153+ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
12154+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12155+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[4]);
12156+ break;
12157+ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
12158+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12159+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[5]);
12160+ break;
12161+ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
12162+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12163+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[6]);
12164+ break;
12165+ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
12166+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12167+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[7]);
12168+ break;
12169+ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
12170+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12171+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[8]);
12172+ break;
12173+ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
12174+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12175+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[9]);
12176+ break;
12177+ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
12178+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12179+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[10]);
12180+ break;
12181+ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
12182+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12183+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[11]);
12184+ break;
12185+ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
12186+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12187+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[12]);
12188+ break;
12189+ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
12190+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12191+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[13]);
12192+ break;
12193+ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
12194+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12195+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[14]);
12196+ break;
12197+ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
12198+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12199+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[15]);
12200+ break;
12201+ case GL_FRAGMENT_PROGRAM_NV:
12202+ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
12203+ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.Enabled);
12204+ break;
12205+ case GL_FRAGMENT_PROGRAM_BINDING_NV:
12206+ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
12207+ params[0] = ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0;
12208+ break;
12209+ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
12210+ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
12211+ params[0] = MAX_NV_FRAGMENT_PROGRAM_PARAMS;
12212+ break;
12213+ case GL_TEXTURE_RECTANGLE_NV:
12214+ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
12215+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV));
12216+ break;
12217+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
12218+ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
12219+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name;
12220+ break;
12221+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
12222+ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
12223+ params[0] = ctx->Const.MaxTextureRectSize;
12224+ break;
12225+ case GL_STENCIL_TEST_TWO_SIDE_EXT:
12226+ CHECK_EXT1(EXT_stencil_two_side, "GetIntegerv");
12227+ params[0] = BOOLEAN_TO_INT(ctx->Stencil.TestTwoSide);
12228+ break;
12229+ case GL_ACTIVE_STENCIL_FACE_EXT:
12230+ CHECK_EXT1(EXT_stencil_two_side, "GetIntegerv");
12231+ params[0] = ENUM_TO_INT(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
12232+ break;
12233+ case GL_MAX_SHININESS_NV:
12234+ CHECK_EXT1(NV_light_max_exponent, "GetIntegerv");
12235+ params[0] = IROUND(ctx->Const.MaxShininess);
12236+ break;
12237+ case GL_MAX_SPOT_EXPONENT_NV:
12238+ CHECK_EXT1(NV_light_max_exponent, "GetIntegerv");
12239+ params[0] = IROUND(ctx->Const.MaxSpotExponent);
12240+ break;
12241+ case GL_ARRAY_BUFFER_BINDING_ARB:
12242+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12243+ params[0] = ctx->Array.ArrayBufferObj->Name;
12244+ break;
12245+ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
12246+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12247+ params[0] = ctx->Array.ArrayObj->Vertex.BufferObj->Name;
12248+ break;
12249+ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
12250+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12251+ params[0] = ctx->Array.ArrayObj->Normal.BufferObj->Name;
12252+ break;
12253+ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
12254+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12255+ params[0] = ctx->Array.ArrayObj->Color.BufferObj->Name;
12256+ break;
12257+ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
12258+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12259+ params[0] = ctx->Array.ArrayObj->Index.BufferObj->Name;
12260+ break;
12261+ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
12262+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12263+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name;
12264+ break;
12265+ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
12266+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12267+ params[0] = ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name;
12268+ break;
12269+ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
12270+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12271+ params[0] = ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name;
12272+ break;
12273+ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
12274+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12275+ params[0] = ctx->Array.ArrayObj->FogCoord.BufferObj->Name;
12276+ break;
12277+ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
12278+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12279+ params[0] = ctx->Array.ElementArrayBufferObj->Name;
12280+ break;
12281+ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
12282+ CHECK_EXT1(EXT_pixel_buffer_object, "GetIntegerv");
12283+ params[0] = ctx->Pack.BufferObj->Name;
12284+ break;
12285+ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
12286+ CHECK_EXT1(EXT_pixel_buffer_object, "GetIntegerv");
12287+ params[0] = ctx->Unpack.BufferObj->Name;
12288+ break;
12289+ case GL_VERTEX_PROGRAM_ARB:
12290+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
12291+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.Enabled);
12292+ break;
12293+ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
12294+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
12295+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.PointSizeEnabled);
12296+ break;
12297+ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
12298+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
12299+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.TwoSideEnabled);
12300+ break;
12301+ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
12302+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
12303+ params[0] = ctx->Const.MaxProgramMatrixStackDepth;
12304+ break;
12305+ case GL_MAX_PROGRAM_MATRICES_ARB:
12306+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
12307+ params[0] = ctx->Const.MaxProgramMatrices;
12308+ break;
12309+ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
12310+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
12311+ params[0] = BOOLEAN_TO_INT(ctx->CurrentStack->Depth + 1);
12312+ break;
12313+ case GL_CURRENT_MATRIX_ARB:
12314+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetIntegerv");
12315+ {
12316+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
12317+ params[0] = IROUND(matrix[0]);
12318+ params[1] = IROUND(matrix[1]);
12319+ params[2] = IROUND(matrix[2]);
12320+ params[3] = IROUND(matrix[3]);
12321+ params[4] = IROUND(matrix[4]);
12322+ params[5] = IROUND(matrix[5]);
12323+ params[6] = IROUND(matrix[6]);
12324+ params[7] = IROUND(matrix[7]);
12325+ params[8] = IROUND(matrix[8]);
12326+ params[9] = IROUND(matrix[9]);
12327+ params[10] = IROUND(matrix[10]);
12328+ params[11] = IROUND(matrix[11]);
12329+ params[12] = IROUND(matrix[12]);
12330+ params[13] = IROUND(matrix[13]);
12331+ params[14] = IROUND(matrix[14]);
12332+ params[15] = IROUND(matrix[15]);
12333+ }
12334+ break;
12335+ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
12336+ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetIntegerv");
12337+ {
12338+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
12339+ params[0] = IROUND(matrix[0]);
12340+ params[1] = IROUND(matrix[4]);
12341+ params[2] = IROUND(matrix[8]);
12342+ params[3] = IROUND(matrix[12]);
12343+ params[4] = IROUND(matrix[1]);
12344+ params[5] = IROUND(matrix[5]);
12345+ params[6] = IROUND(matrix[9]);
12346+ params[7] = IROUND(matrix[13]);
12347+ params[8] = IROUND(matrix[2]);
12348+ params[9] = IROUND(matrix[6]);
12349+ params[10] = IROUND(matrix[10]);
12350+ params[11] = IROUND(matrix[14]);
12351+ params[12] = IROUND(matrix[3]);
12352+ params[13] = IROUND(matrix[7]);
12353+ params[14] = IROUND(matrix[11]);
12354+ params[15] = IROUND(matrix[15]);
12355+ }
12356+ break;
12357+ case GL_MAX_VERTEX_ATTRIBS_ARB:
12358+ CHECK_EXT1(ARB_vertex_program, "GetIntegerv");
12359+ params[0] = ctx->Const.VertexProgram.MaxAttribs;
12360+ break;
12361+ case GL_PROGRAM_ERROR_POSITION_ARB:
12362+ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetIntegerv");
12363+ params[0] = ctx->Program.ErrorPos;
12364+ break;
12365+ case GL_FRAGMENT_PROGRAM_ARB:
12366+ CHECK_EXT1(ARB_fragment_program, "GetIntegerv");
12367+ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.Enabled);
12368+ break;
12369+ case GL_MAX_TEXTURE_COORDS_ARB:
12370+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetIntegerv");
12371+ params[0] = ctx->Const.MaxTextureCoordUnits;
12372+ break;
12373+ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
12374+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetIntegerv");
12375+ params[0] = ctx->Const.MaxTextureImageUnits;
12376+ break;
12377+ case GL_DEPTH_BOUNDS_TEST_EXT:
12378+ CHECK_EXT1(EXT_depth_bounds_test, "GetIntegerv");
12379+ params[0] = BOOLEAN_TO_INT(ctx->Depth.BoundsTest);
12380+ break;
12381+ case GL_DEPTH_BOUNDS_EXT:
12382+ CHECK_EXT1(EXT_depth_bounds_test, "GetIntegerv");
12383+ params[0] = IROUND(ctx->Depth.BoundsMin);
12384+ params[1] = IROUND(ctx->Depth.BoundsMax);
12385+ break;
12386+ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
12387+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12388+ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.CallbackEnabled);
12389+ break;
12390+ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
12391+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12392+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.CallbackEnabled);
12393+ break;
12394+ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
12395+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12396+ params[0] = ctx->FragmentProgram.CurrentPosition;
12397+ break;
12398+ case GL_VERTEX_PROGRAM_POSITION_MESA:
12399+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12400+ params[0] = ctx->VertexProgram.CurrentPosition;
12401+ break;
12402+ case GL_MAX_DRAW_BUFFERS_ARB:
12403+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12404+ params[0] = ctx->Const.MaxDrawBuffers;
12405+ break;
12406+ case GL_DRAW_BUFFER0_ARB:
12407+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12408+ params[0] = ENUM_TO_INT(ctx->DrawBuffer->ColorDrawBuffer[0]);
12409+ break;
12410+ case GL_DRAW_BUFFER1_ARB:
12411+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12412+ {
12413+ GLenum buffer;
12414+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
12415+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
12416+ return;
12417+ }
12418+ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
12419+ params[0] = ENUM_TO_INT(buffer);
12420+ }
12421+ break;
12422+ case GL_DRAW_BUFFER2_ARB:
12423+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12424+ {
12425+ GLenum buffer;
12426+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
12427+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
12428+ return;
12429+ }
12430+ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
12431+ params[0] = ENUM_TO_INT(buffer);
12432+ }
12433+ break;
12434+ case GL_DRAW_BUFFER3_ARB:
12435+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12436+ {
12437+ GLenum buffer;
12438+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
12439+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
12440+ return;
12441+ }
12442+ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
12443+ params[0] = ENUM_TO_INT(buffer);
12444+ }
12445+ break;
12446+ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
12447+ CHECK_EXT1(OES_read_format, "GetIntegerv");
12448+ params[0] = ctx->Const.ColorReadType;
12449+ break;
12450+ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
12451+ CHECK_EXT1(OES_read_format, "GetIntegerv");
12452+ params[0] = ctx->Const.ColorReadFormat;
12453+ break;
12454+ case GL_NUM_FRAGMENT_REGISTERS_ATI:
12455+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12456+ params[0] = 6;
12457+ break;
12458+ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
12459+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12460+ params[0] = 8;
12461+ break;
12462+ case GL_NUM_PASSES_ATI:
12463+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12464+ params[0] = 2;
12465+ break;
12466+ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
12467+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12468+ params[0] = 8;
12469+ break;
12470+ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
12471+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12472+ params[0] = 16;
12473+ break;
12474+ case GL_COLOR_ALPHA_PAIRING_ATI:
12475+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12476+ params[0] = BOOLEAN_TO_INT(GL_TRUE);
12477+ break;
12478+ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
12479+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12480+ params[0] = 3;
12481+ break;
12482+ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
12483+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12484+ params[0] = 3;
12485+ break;
12486+ case GL_STENCIL_BACK_FUNC:
12487+ params[0] = ENUM_TO_INT(ctx->Stencil.Function[1]);
12488+ break;
12489+ case GL_STENCIL_BACK_VALUE_MASK:
12490+ params[0] = ctx->Stencil.ValueMask[1];
12491+ break;
12492+ case GL_STENCIL_BACK_REF:
12493+ params[0] = ctx->Stencil.Ref[1];
12494+ break;
12495+ case GL_STENCIL_BACK_FAIL:
12496+ params[0] = ENUM_TO_INT(ctx->Stencil.FailFunc[1]);
12497+ break;
12498+ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
12499+ params[0] = ENUM_TO_INT(ctx->Stencil.ZFailFunc[1]);
12500+ break;
12501+ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
12502+ params[0] = ENUM_TO_INT(ctx->Stencil.ZPassFunc[1]);
12503+ break;
12504+ case GL_FRAMEBUFFER_BINDING_EXT:
12505+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12506+ params[0] = ctx->DrawBuffer->Name;
12507+ break;
12508+ case GL_RENDERBUFFER_BINDING_EXT:
12509+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12510+ params[0] = ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0;
12511+ break;
12512+ case GL_MAX_COLOR_ATTACHMENTS_EXT:
12513+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12514+ params[0] = ctx->Const.MaxColorAttachments;
12515+ break;
12516+ case GL_MAX_RENDERBUFFER_SIZE_EXT:
12517+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12518+ params[0] = ctx->Const.MaxRenderbufferSize;
12519+ break;
12520+ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
12521+ CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
12522+ params[0] = MAX_FRAGMENT_UNIFORM_COMPONENTS;
12523+ break;
12524+ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
12525+ CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
12526+ params[0] = ENUM_TO_INT(ctx->Hint.FragmentShaderDerivative);
12527+ break;
12528+ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
12529+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12530+ params[0] = MAX_VERTEX_UNIFORM_COMPONENTS;
12531+ break;
12532+ case GL_MAX_VARYING_FLOATS_ARB:
12533+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12534+ params[0] = MAX_VARYING_FLOATS;
12535+ break;
12536+ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
12537+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12538+ params[0] = MAX_VERTEX_TEXTURE_IMAGE_UNITS;
12539+ break;
12540+ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
12541+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12542+ params[0] = MAX_COMBINED_TEXTURE_IMAGE_UNITS;
12543+ break;
12544+ default:
12545+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv(pname=0x%x)", pname);
12546+ }
12547+}
12548+
12549+
12550+void GLAPIENTRY
12551+_mesa_GetDoublev( GLenum pname, GLdouble *params )
12552+{
12553+ const GLfloat magic = -1234.5F;
12554+ GLfloat values[16];
12555+ GLuint i;
12556+
12557+ if (!params)
12558+ return;
12559+
12560+ /* Init temp array to magic numbers so we can figure out how many values
12561+ * are returned by the GetFloatv() call.
12562+ */
12563+ for (i = 0; i < 16; i++)
12564+ values[i] = magic;
12565+
12566+ _mesa_GetFloatv(pname, values);
12567+
12568+ for (i = 0; i < 16 && values[i] != magic; i++)
12569+ params[i] = (GLdouble) values[i];
12570+}
12571+
12572Index: qemu-0.14.0/target-i386/mesa_gl.h
12573===================================================================
12574--- /dev/null
12575+++ qemu-0.14.0/target-i386/mesa_gl.h
12576@@ -0,0 +1,2251 @@
12577+/*
12578+ * Mesa 3-D graphics library
12579+ * Version: 6.5.1
12580+ *
12581+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
12582+ *
12583+ * Permission is hereby granted, free of charge, to any person obtaining a
12584+ * copy of this software and associated documentation files (the "Software"),
12585+ * to deal in the Software without restriction, including without limitation
12586+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12587+ * and/or sell copies of the Software, and to permit persons to whom the
12588+ * Software is furnished to do so, subject to the following conditions:
12589+ *
12590+ * The above copyright notice and this permission notice shall be included
12591+ * in all copies or substantial portions of the Software.
12592+ *
12593+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
12594+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12595+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
12596+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
12597+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
12598+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12599+ */
12600+
12601+
12602+#ifndef __gl_h_
12603+#define __gl_h_
12604+
12605+#if defined(USE_MGL_NAMESPACE)
12606+#include "gl_mangle.h"
12607+#endif
12608+
12609+
12610+/**********************************************************************
12611+ * Begin system-specific stuff. Do not do any of this when building
12612+ * for SciTech SNAP, as this is all done before this header file is
12613+ * included.
12614+ */
12615+#if !defined(__SCITECH_SNAP__)
12616+
12617+#if defined(__BEOS__)
12618+#include <stdlib.h> /* to get some BeOS-isms */
12619+#endif
12620+
12621+#if !defined(OPENSTEP) && (defined(NeXT) || defined(NeXT_PDO))
12622+#define OPENSTEP
12623+#endif
12624+
12625+#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__)
12626+#define __WIN32__
12627+#endif
12628+
12629+#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__))
12630+# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
12631+# define GLAPI __declspec(dllexport)
12632+# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
12633+# define GLAPI __declspec(dllimport)
12634+# else /* for use with static link lib build of Win32 edition only */
12635+# define GLAPI extern
12636+# endif /* _STATIC_MESA support */
12637+# define GLAPIENTRY __stdcall
12638+#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
12639+# define GLAPI extern
12640+# define GLAPIENTRY __stdcall
12641+#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
12642+# define GLAPI __attribute__((visibility("default")))
12643+# define GLAPIENTRY
12644+#endif /* WIN32 && !CYGWIN */
12645+
12646+#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__)
12647+# define PRAGMA_EXPORT_SUPPORTED 1
12648+#endif
12649+
12650+/*
12651+ * WINDOWS: Include windows.h here to define APIENTRY.
12652+ * It is also useful when applications include this file by
12653+ * including only glut.h, since glut.h depends on windows.h.
12654+ * Applications needing to include windows.h with parms other
12655+ * than "WIN32_LEAN_AND_MEAN" may include windows.h before
12656+ * glut.h or gl.h.
12657+ */
12658+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
12659+#define WIN32_LEAN_AND_MEAN 1
12660+#include <windows.h>
12661+#endif
12662+
12663+#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP) && !defined(__CYGWIN__)
12664+#include <GL/mesa_wgl.h>
12665+#endif
12666+
12667+#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
12668+#pragma import on
12669+#endif
12670+
12671+#ifndef GLAPI
12672+#define GLAPI extern
12673+#endif
12674+
12675+#ifndef GLAPIENTRY
12676+#define GLAPIENTRY
12677+#endif
12678+
12679+#ifndef APIENTRY
12680+#define APIENTRY GLAPIENTRY
12681+#endif
12682+
12683+/* "P" suffix to be used for a pointer to a function */
12684+#ifndef APIENTRYP
12685+#define APIENTRYP APIENTRY *
12686+#endif
12687+
12688+#ifndef GLAPIENTRYP
12689+#define GLAPIENTRYP GLAPIENTRY *
12690+#endif
12691+
12692+#ifdef CENTERLINE_CLPP
12693+#define signed
12694+#endif
12695+
12696+#if defined(PRAGMA_EXPORT_SUPPORTED)
12697+#pragma export on
12698+#endif
12699+
12700+#endif /* !__SCITECH_SNAP__ */
12701+/*
12702+ * End system-specific stuff.
12703+ **********************************************************************/
12704+
12705+
12706+
12707+#ifdef __cplusplus
12708+extern "C" {
12709+#endif
12710+
12711+
12712+
12713+#define GL_VERSION_1_1 1
12714+#define GL_VERSION_1_2 1
12715+#define GL_VERSION_1_3 1
12716+#define GL_ARB_imaging 1
12717+
12718+
12719+/*
12720+ * Datatypes
12721+ */
12722+typedef unsigned int GLenum;
12723+typedef unsigned char GLboolean;
12724+typedef unsigned int GLbitfield;
12725+typedef void GLvoid;
12726+typedef signed char GLbyte; /* 1-byte signed */
12727+typedef short GLshort; /* 2-byte signed */
12728+typedef int GLint; /* 4-byte signed */
12729+typedef unsigned char GLubyte; /* 1-byte unsigned */
12730+typedef unsigned short GLushort; /* 2-byte unsigned */
12731+typedef unsigned int GLuint; /* 4-byte unsigned */
12732+typedef int GLsizei; /* 4-byte signed */
12733+typedef float GLfloat; /* single precision float */
12734+typedef float GLclampf; /* single precision float in [0,1] */
12735+typedef double GLdouble; /* double precision float */
12736+typedef double GLclampd; /* double precision float in [0,1] */
12737+
12738+
12739+
12740+/*
12741+ * Constants
12742+ */
12743+
12744+/* Boolean values */
12745+#define GL_FALSE 0x0
12746+#define GL_TRUE 0x1
12747+
12748+/* Data types */
12749+#define GL_BYTE 0x1400
12750+#define GL_UNSIGNED_BYTE 0x1401
12751+#define GL_SHORT 0x1402
12752+#define GL_UNSIGNED_SHORT 0x1403
12753+#define GL_INT 0x1404
12754+#define GL_UNSIGNED_INT 0x1405
12755+#define GL_FLOAT 0x1406
12756+#define GL_2_BYTES 0x1407
12757+#define GL_3_BYTES 0x1408
12758+#define GL_4_BYTES 0x1409
12759+#define GL_DOUBLE 0x140A
12760+
12761+/* Primitives */
12762+#define GL_POINTS 0x0000
12763+#define GL_LINES 0x0001
12764+#define GL_LINE_LOOP 0x0002
12765+#define GL_LINE_STRIP 0x0003
12766+#define GL_TRIANGLES 0x0004
12767+#define GL_TRIANGLE_STRIP 0x0005
12768+#define GL_TRIANGLE_FAN 0x0006
12769+#define GL_QUADS 0x0007
12770+#define GL_QUAD_STRIP 0x0008
12771+#define GL_POLYGON 0x0009
12772+
12773+/* Vertex Arrays */
12774+#define GL_VERTEX_ARRAY 0x8074
12775+#define GL_NORMAL_ARRAY 0x8075
12776+#define GL_COLOR_ARRAY 0x8076
12777+#define GL_INDEX_ARRAY 0x8077
12778+#define GL_TEXTURE_COORD_ARRAY 0x8078
12779+#define GL_EDGE_FLAG_ARRAY 0x8079
12780+#define GL_VERTEX_ARRAY_SIZE 0x807A
12781+#define GL_VERTEX_ARRAY_TYPE 0x807B
12782+#define GL_VERTEX_ARRAY_STRIDE 0x807C
12783+#define GL_NORMAL_ARRAY_TYPE 0x807E
12784+#define GL_NORMAL_ARRAY_STRIDE 0x807F
12785+#define GL_COLOR_ARRAY_SIZE 0x8081
12786+#define GL_COLOR_ARRAY_TYPE 0x8082
12787+#define GL_COLOR_ARRAY_STRIDE 0x8083
12788+#define GL_INDEX_ARRAY_TYPE 0x8085
12789+#define GL_INDEX_ARRAY_STRIDE 0x8086
12790+#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
12791+#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
12792+#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
12793+#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
12794+#define GL_VERTEX_ARRAY_POINTER 0x808E
12795+#define GL_NORMAL_ARRAY_POINTER 0x808F
12796+#define GL_COLOR_ARRAY_POINTER 0x8090
12797+#define GL_INDEX_ARRAY_POINTER 0x8091
12798+#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
12799+#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
12800+#define GL_V2F 0x2A20
12801+#define GL_V3F 0x2A21
12802+#define GL_C4UB_V2F 0x2A22
12803+#define GL_C4UB_V3F 0x2A23
12804+#define GL_C3F_V3F 0x2A24
12805+#define GL_N3F_V3F 0x2A25
12806+#define GL_C4F_N3F_V3F 0x2A26
12807+#define GL_T2F_V3F 0x2A27
12808+#define GL_T4F_V4F 0x2A28
12809+#define GL_T2F_C4UB_V3F 0x2A29
12810+#define GL_T2F_C3F_V3F 0x2A2A
12811+#define GL_T2F_N3F_V3F 0x2A2B
12812+#define GL_T2F_C4F_N3F_V3F 0x2A2C
12813+#define GL_T4F_C4F_N3F_V4F 0x2A2D
12814+
12815+/* Matrix Mode */
12816+#define GL_MATRIX_MODE 0x0BA0
12817+#define GL_MODELVIEW 0x1700
12818+#define GL_PROJECTION 0x1701
12819+#define GL_TEXTURE 0x1702
12820+
12821+/* Points */
12822+#define GL_POINT_SMOOTH 0x0B10
12823+#define GL_POINT_SIZE 0x0B11
12824+#define GL_POINT_SIZE_GRANULARITY 0x0B13
12825+#define GL_POINT_SIZE_RANGE 0x0B12
12826+
12827+/* Lines */
12828+#define GL_LINE_SMOOTH 0x0B20
12829+#define GL_LINE_STIPPLE 0x0B24
12830+#define GL_LINE_STIPPLE_PATTERN 0x0B25
12831+#define GL_LINE_STIPPLE_REPEAT 0x0B26
12832+#define GL_LINE_WIDTH 0x0B21
12833+#define GL_LINE_WIDTH_GRANULARITY 0x0B23
12834+#define GL_LINE_WIDTH_RANGE 0x0B22
12835+
12836+/* Polygons */
12837+#define GL_POINT 0x1B00
12838+#define GL_LINE 0x1B01
12839+#define GL_FILL 0x1B02
12840+#define GL_CW 0x0900
12841+#define GL_CCW 0x0901
12842+#define GL_FRONT 0x0404
12843+#define GL_BACK 0x0405
12844+#define GL_POLYGON_MODE 0x0B40
12845+#define GL_POLYGON_SMOOTH 0x0B41
12846+#define GL_POLYGON_STIPPLE 0x0B42
12847+#define GL_EDGE_FLAG 0x0B43
12848+#define GL_CULL_FACE 0x0B44
12849+#define GL_CULL_FACE_MODE 0x0B45
12850+#define GL_FRONT_FACE 0x0B46
12851+#define GL_POLYGON_OFFSET_FACTOR 0x8038
12852+#define GL_POLYGON_OFFSET_UNITS 0x2A00
12853+#define GL_POLYGON_OFFSET_POINT 0x2A01
12854+#define GL_POLYGON_OFFSET_LINE 0x2A02
12855+#define GL_POLYGON_OFFSET_FILL 0x8037
12856+
12857+/* Display Lists */
12858+#define GL_COMPILE 0x1300
12859+#define GL_COMPILE_AND_EXECUTE 0x1301
12860+#define GL_LIST_BASE 0x0B32
12861+#define GL_LIST_INDEX 0x0B33
12862+#define GL_LIST_MODE 0x0B30
12863+
12864+/* Depth buffer */
12865+#define GL_NEVER 0x0200
12866+#define GL_LESS 0x0201
12867+#define GL_EQUAL 0x0202
12868+#define GL_LEQUAL 0x0203
12869+#define GL_GREATER 0x0204
12870+#define GL_NOTEQUAL 0x0205
12871+#define GL_GEQUAL 0x0206
12872+#define GL_ALWAYS 0x0207
12873+#define GL_DEPTH_TEST 0x0B71
12874+#define GL_DEPTH_BITS 0x0D56
12875+#define GL_DEPTH_CLEAR_VALUE 0x0B73
12876+#define GL_DEPTH_FUNC 0x0B74
12877+#define GL_DEPTH_RANGE 0x0B70
12878+#define GL_DEPTH_WRITEMASK 0x0B72
12879+#define GL_DEPTH_COMPONENT 0x1902
12880+
12881+/* Lighting */
12882+#define GL_LIGHTING 0x0B50
12883+#define GL_LIGHT0 0x4000
12884+#define GL_LIGHT1 0x4001
12885+#define GL_LIGHT2 0x4002
12886+#define GL_LIGHT3 0x4003
12887+#define GL_LIGHT4 0x4004
12888+#define GL_LIGHT5 0x4005
12889+#define GL_LIGHT6 0x4006
12890+#define GL_LIGHT7 0x4007
12891+#define GL_SPOT_EXPONENT 0x1205
12892+#define GL_SPOT_CUTOFF 0x1206
12893+#define GL_CONSTANT_ATTENUATION 0x1207
12894+#define GL_LINEAR_ATTENUATION 0x1208
12895+#define GL_QUADRATIC_ATTENUATION 0x1209
12896+#define GL_AMBIENT 0x1200
12897+#define GL_DIFFUSE 0x1201
12898+#define GL_SPECULAR 0x1202
12899+#define GL_SHININESS 0x1601
12900+#define GL_EMISSION 0x1600
12901+#define GL_POSITION 0x1203
12902+#define GL_SPOT_DIRECTION 0x1204
12903+#define GL_AMBIENT_AND_DIFFUSE 0x1602
12904+#define GL_COLOR_INDEXES 0x1603
12905+#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
12906+#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
12907+#define GL_LIGHT_MODEL_AMBIENT 0x0B53
12908+#define GL_FRONT_AND_BACK 0x0408
12909+#define GL_SHADE_MODEL 0x0B54
12910+#define GL_FLAT 0x1D00
12911+#define GL_SMOOTH 0x1D01
12912+#define GL_COLOR_MATERIAL 0x0B57
12913+#define GL_COLOR_MATERIAL_FACE 0x0B55
12914+#define GL_COLOR_MATERIAL_PARAMETER 0x0B56
12915+#define GL_NORMALIZE 0x0BA1
12916+
12917+/* User clipping planes */
12918+#define GL_CLIP_PLANE0 0x3000
12919+#define GL_CLIP_PLANE1 0x3001
12920+#define GL_CLIP_PLANE2 0x3002
12921+#define GL_CLIP_PLANE3 0x3003
12922+#define GL_CLIP_PLANE4 0x3004
12923+#define GL_CLIP_PLANE5 0x3005
12924+
12925+/* Accumulation buffer */
12926+#define GL_ACCUM_RED_BITS 0x0D58
12927+#define GL_ACCUM_GREEN_BITS 0x0D59
12928+#define GL_ACCUM_BLUE_BITS 0x0D5A
12929+#define GL_ACCUM_ALPHA_BITS 0x0D5B
12930+#define GL_ACCUM_CLEAR_VALUE 0x0B80
12931+#define GL_ACCUM 0x0100
12932+#define GL_ADD 0x0104
12933+#define GL_LOAD 0x0101
12934+#define GL_MULT 0x0103
12935+#define GL_RETURN 0x0102
12936+
12937+/* Alpha testing */
12938+#define GL_ALPHA_TEST 0x0BC0
12939+#define GL_ALPHA_TEST_REF 0x0BC2
12940+#define GL_ALPHA_TEST_FUNC 0x0BC1
12941+
12942+/* Blending */
12943+#define GL_BLEND 0x0BE2
12944+#define GL_BLEND_SRC 0x0BE1
12945+#define GL_BLEND_DST 0x0BE0
12946+#define GL_ZERO 0x0
12947+#define GL_ONE 0x1
12948+#define GL_SRC_COLOR 0x0300
12949+#define GL_ONE_MINUS_SRC_COLOR 0x0301
12950+#define GL_SRC_ALPHA 0x0302
12951+#define GL_ONE_MINUS_SRC_ALPHA 0x0303
12952+#define GL_DST_ALPHA 0x0304
12953+#define GL_ONE_MINUS_DST_ALPHA 0x0305
12954+#define GL_DST_COLOR 0x0306
12955+#define GL_ONE_MINUS_DST_COLOR 0x0307
12956+#define GL_SRC_ALPHA_SATURATE 0x0308
12957+
12958+/* Render Mode */
12959+#define GL_FEEDBACK 0x1C01
12960+#define GL_RENDER 0x1C00
12961+#define GL_SELECT 0x1C02
12962+
12963+/* Feedback */
12964+#define GL_2D 0x0600
12965+#define GL_3D 0x0601
12966+#define GL_3D_COLOR 0x0602
12967+#define GL_3D_COLOR_TEXTURE 0x0603
12968+#define GL_4D_COLOR_TEXTURE 0x0604
12969+#define GL_POINT_TOKEN 0x0701
12970+#define GL_LINE_TOKEN 0x0702
12971+#define GL_LINE_RESET_TOKEN 0x0707
12972+#define GL_POLYGON_TOKEN 0x0703
12973+#define GL_BITMAP_TOKEN 0x0704
12974+#define GL_DRAW_PIXEL_TOKEN 0x0705
12975+#define GL_COPY_PIXEL_TOKEN 0x0706
12976+#define GL_PASS_THROUGH_TOKEN 0x0700
12977+#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0
12978+#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1
12979+#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
12980+
12981+/* Selection */
12982+#define GL_SELECTION_BUFFER_POINTER 0x0DF3
12983+#define GL_SELECTION_BUFFER_SIZE 0x0DF4
12984+
12985+/* Fog */
12986+#define GL_FOG 0x0B60
12987+#define GL_FOG_MODE 0x0B65
12988+#define GL_FOG_DENSITY 0x0B62
12989+#define GL_FOG_COLOR 0x0B66
12990+#define GL_FOG_INDEX 0x0B61
12991+#define GL_FOG_START 0x0B63
12992+#define GL_FOG_END 0x0B64
12993+#define GL_LINEAR 0x2601
12994+#define GL_EXP 0x0800
12995+#define GL_EXP2 0x0801
12996+
12997+/* Logic Ops */
12998+#define GL_LOGIC_OP 0x0BF1
12999+#define GL_INDEX_LOGIC_OP 0x0BF1
13000+#define GL_COLOR_LOGIC_OP 0x0BF2
13001+#define GL_LOGIC_OP_MODE 0x0BF0
13002+#define GL_CLEAR 0x1500
13003+#define GL_SET 0x150F
13004+#define GL_COPY 0x1503
13005+#define GL_COPY_INVERTED 0x150C
13006+#define GL_NOOP 0x1505
13007+#define GL_INVERT 0x150A
13008+#define GL_AND 0x1501
13009+#define GL_NAND 0x150E
13010+#define GL_OR 0x1507
13011+#define GL_NOR 0x1508
13012+#define GL_XOR 0x1506
13013+#define GL_EQUIV 0x1509
13014+#define GL_AND_REVERSE 0x1502
13015+#define GL_AND_INVERTED 0x1504
13016+#define GL_OR_REVERSE 0x150B
13017+#define GL_OR_INVERTED 0x150D
13018+
13019+/* Stencil */
13020+#define GL_STENCIL_BITS 0x0D57
13021+#define GL_STENCIL_TEST 0x0B90
13022+#define GL_STENCIL_CLEAR_VALUE 0x0B91
13023+#define GL_STENCIL_FUNC 0x0B92
13024+#define GL_STENCIL_VALUE_MASK 0x0B93
13025+#define GL_STENCIL_FAIL 0x0B94
13026+#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
13027+#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
13028+#define GL_STENCIL_REF 0x0B97
13029+#define GL_STENCIL_WRITEMASK 0x0B98
13030+#define GL_STENCIL_INDEX 0x1901
13031+#define GL_KEEP 0x1E00
13032+#define GL_REPLACE 0x1E01
13033+#define GL_INCR 0x1E02
13034+#define GL_DECR 0x1E03
13035+
13036+/* Buffers, Pixel Drawing/Reading */
13037+#define GL_NONE 0x0
13038+#define GL_LEFT 0x0406
13039+#define GL_RIGHT 0x0407
13040+/*GL_FRONT 0x0404 */
13041+/*GL_BACK 0x0405 */
13042+/*GL_FRONT_AND_BACK 0x0408 */
13043+#define GL_FRONT_LEFT 0x0400
13044+#define GL_FRONT_RIGHT 0x0401
13045+#define GL_BACK_LEFT 0x0402
13046+#define GL_BACK_RIGHT 0x0403
13047+#define GL_AUX0 0x0409
13048+#define GL_AUX1 0x040A
13049+#define GL_AUX2 0x040B
13050+#define GL_AUX3 0x040C
13051+#define GL_COLOR_INDEX 0x1900
13052+#define GL_RED 0x1903
13053+#define GL_GREEN 0x1904
13054+#define GL_BLUE 0x1905
13055+#define GL_ALPHA 0x1906
13056+#define GL_LUMINANCE 0x1909
13057+#define GL_LUMINANCE_ALPHA 0x190A
13058+#define GL_ALPHA_BITS 0x0D55
13059+#define GL_RED_BITS 0x0D52
13060+#define GL_GREEN_BITS 0x0D53
13061+#define GL_BLUE_BITS 0x0D54
13062+#define GL_INDEX_BITS 0x0D51
13063+#define GL_SUBPIXEL_BITS 0x0D50
13064+#define GL_AUX_BUFFERS 0x0C00
13065+#define GL_READ_BUFFER 0x0C02
13066+#define GL_DRAW_BUFFER 0x0C01
13067+#define GL_DOUBLEBUFFER 0x0C32
13068+#define GL_STEREO 0x0C33
13069+#define GL_BITMAP 0x1A00
13070+#define GL_COLOR 0x1800
13071+#define GL_DEPTH 0x1801
13072+#define GL_STENCIL 0x1802
13073+#define GL_DITHER 0x0BD0
13074+#define GL_RGB 0x1907
13075+#define GL_RGBA 0x1908
13076+
13077+/* Implementation limits */
13078+#define GL_MAX_LIST_NESTING 0x0B31
13079+#define GL_MAX_EVAL_ORDER 0x0D30
13080+#define GL_MAX_LIGHTS 0x0D31
13081+#define GL_MAX_CLIP_PLANES 0x0D32
13082+#define GL_MAX_TEXTURE_SIZE 0x0D33
13083+#define GL_MAX_PIXEL_MAP_TABLE 0x0D34
13084+#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
13085+#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
13086+#define GL_MAX_NAME_STACK_DEPTH 0x0D37
13087+#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
13088+#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
13089+#define GL_MAX_VIEWPORT_DIMS 0x0D3A
13090+#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
13091+
13092+/* Gets */
13093+#define GL_ATTRIB_STACK_DEPTH 0x0BB0
13094+#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
13095+#define GL_COLOR_CLEAR_VALUE 0x0C22
13096+#define GL_COLOR_WRITEMASK 0x0C23
13097+#define GL_CURRENT_INDEX 0x0B01
13098+#define GL_CURRENT_COLOR 0x0B00
13099+#define GL_CURRENT_NORMAL 0x0B02
13100+#define GL_CURRENT_RASTER_COLOR 0x0B04
13101+#define GL_CURRENT_RASTER_DISTANCE 0x0B09
13102+#define GL_CURRENT_RASTER_INDEX 0x0B05
13103+#define GL_CURRENT_RASTER_POSITION 0x0B07
13104+#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
13105+#define GL_CURRENT_RASTER_POSITION_VALID 0x0B08
13106+#define GL_CURRENT_TEXTURE_COORDS 0x0B03
13107+#define GL_INDEX_CLEAR_VALUE 0x0C20
13108+#define GL_INDEX_MODE 0x0C30
13109+#define GL_INDEX_WRITEMASK 0x0C21
13110+#define GL_MODELVIEW_MATRIX 0x0BA6
13111+#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
13112+#define GL_NAME_STACK_DEPTH 0x0D70
13113+#define GL_PROJECTION_MATRIX 0x0BA7
13114+#define GL_PROJECTION_STACK_DEPTH 0x0BA4
13115+#define GL_RENDER_MODE 0x0C40
13116+#define GL_RGBA_MODE 0x0C31
13117+#define GL_TEXTURE_MATRIX 0x0BA8
13118+#define GL_TEXTURE_STACK_DEPTH 0x0BA5
13119+#define GL_VIEWPORT 0x0BA2
13120+
13121+/* Evaluators */
13122+#define GL_AUTO_NORMAL 0x0D80
13123+#define GL_MAP1_COLOR_4 0x0D90
13124+#define GL_MAP1_INDEX 0x0D91
13125+#define GL_MAP1_NORMAL 0x0D92
13126+#define GL_MAP1_TEXTURE_COORD_1 0x0D93
13127+#define GL_MAP1_TEXTURE_COORD_2 0x0D94
13128+#define GL_MAP1_TEXTURE_COORD_3 0x0D95
13129+#define GL_MAP1_TEXTURE_COORD_4 0x0D96
13130+#define GL_MAP1_VERTEX_3 0x0D97
13131+#define GL_MAP1_VERTEX_4 0x0D98
13132+#define GL_MAP2_COLOR_4 0x0DB0
13133+#define GL_MAP2_INDEX 0x0DB1
13134+#define GL_MAP2_NORMAL 0x0DB2
13135+#define GL_MAP2_TEXTURE_COORD_1 0x0DB3
13136+#define GL_MAP2_TEXTURE_COORD_2 0x0DB4
13137+#define GL_MAP2_TEXTURE_COORD_3 0x0DB5
13138+#define GL_MAP2_TEXTURE_COORD_4 0x0DB6
13139+#define GL_MAP2_VERTEX_3 0x0DB7
13140+#define GL_MAP2_VERTEX_4 0x0DB8
13141+#define GL_MAP1_GRID_DOMAIN 0x0DD0
13142+#define GL_MAP1_GRID_SEGMENTS 0x0DD1
13143+#define GL_MAP2_GRID_DOMAIN 0x0DD2
13144+#define GL_MAP2_GRID_SEGMENTS 0x0DD3
13145+#define GL_COEFF 0x0A00
13146+#define GL_ORDER 0x0A01
13147+#define GL_DOMAIN 0x0A02
13148+
13149+/* Hints */
13150+#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
13151+#define GL_POINT_SMOOTH_HINT 0x0C51
13152+#define GL_LINE_SMOOTH_HINT 0x0C52
13153+#define GL_POLYGON_SMOOTH_HINT 0x0C53
13154+#define GL_FOG_HINT 0x0C54
13155+#define GL_DONT_CARE 0x1100
13156+#define GL_FASTEST 0x1101
13157+#define GL_NICEST 0x1102
13158+
13159+/* Scissor box */
13160+#define GL_SCISSOR_BOX 0x0C10
13161+#define GL_SCISSOR_TEST 0x0C11
13162+
13163+/* Pixel Mode / Transfer */
13164+#define GL_MAP_COLOR 0x0D10
13165+#define GL_MAP_STENCIL 0x0D11
13166+#define GL_INDEX_SHIFT 0x0D12
13167+#define GL_INDEX_OFFSET 0x0D13
13168+#define GL_RED_SCALE 0x0D14
13169+#define GL_RED_BIAS 0x0D15
13170+#define GL_GREEN_SCALE 0x0D18
13171+#define GL_GREEN_BIAS 0x0D19
13172+#define GL_BLUE_SCALE 0x0D1A
13173+#define GL_BLUE_BIAS 0x0D1B
13174+#define GL_ALPHA_SCALE 0x0D1C
13175+#define GL_ALPHA_BIAS 0x0D1D
13176+#define GL_DEPTH_SCALE 0x0D1E
13177+#define GL_DEPTH_BIAS 0x0D1F
13178+#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
13179+#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
13180+#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
13181+#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
13182+#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
13183+#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
13184+#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
13185+#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
13186+#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
13187+#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
13188+#define GL_PIXEL_MAP_S_TO_S 0x0C71
13189+#define GL_PIXEL_MAP_I_TO_I 0x0C70
13190+#define GL_PIXEL_MAP_I_TO_R 0x0C72
13191+#define GL_PIXEL_MAP_I_TO_G 0x0C73
13192+#define GL_PIXEL_MAP_I_TO_B 0x0C74
13193+#define GL_PIXEL_MAP_I_TO_A 0x0C75
13194+#define GL_PIXEL_MAP_R_TO_R 0x0C76
13195+#define GL_PIXEL_MAP_G_TO_G 0x0C77
13196+#define GL_PIXEL_MAP_B_TO_B 0x0C78
13197+#define GL_PIXEL_MAP_A_TO_A 0x0C79
13198+#define GL_PACK_ALIGNMENT 0x0D05
13199+#define GL_PACK_LSB_FIRST 0x0D01
13200+#define GL_PACK_ROW_LENGTH 0x0D02
13201+#define GL_PACK_SKIP_PIXELS 0x0D04
13202+#define GL_PACK_SKIP_ROWS 0x0D03
13203+#define GL_PACK_SWAP_BYTES 0x0D00
13204+#define GL_UNPACK_ALIGNMENT 0x0CF5
13205+#define GL_UNPACK_LSB_FIRST 0x0CF1
13206+#define GL_UNPACK_ROW_LENGTH 0x0CF2
13207+#define GL_UNPACK_SKIP_PIXELS 0x0CF4
13208+#define GL_UNPACK_SKIP_ROWS 0x0CF3
13209+#define GL_UNPACK_SWAP_BYTES 0x0CF0
13210+#define GL_ZOOM_X 0x0D16
13211+#define GL_ZOOM_Y 0x0D17
13212+
13213+/* Texture mapping */
13214+#define GL_TEXTURE_ENV 0x2300
13215+#define GL_TEXTURE_ENV_MODE 0x2200
13216+#define GL_TEXTURE_1D 0x0DE0
13217+#define GL_TEXTURE_2D 0x0DE1
13218+#define GL_TEXTURE_WRAP_S 0x2802
13219+#define GL_TEXTURE_WRAP_T 0x2803
13220+#define GL_TEXTURE_MAG_FILTER 0x2800
13221+#define GL_TEXTURE_MIN_FILTER 0x2801
13222+#define GL_TEXTURE_ENV_COLOR 0x2201
13223+#define GL_TEXTURE_GEN_S 0x0C60
13224+#define GL_TEXTURE_GEN_T 0x0C61
13225+#define GL_TEXTURE_GEN_MODE 0x2500
13226+#define GL_TEXTURE_BORDER_COLOR 0x1004
13227+#define GL_TEXTURE_WIDTH 0x1000
13228+#define GL_TEXTURE_HEIGHT 0x1001
13229+#define GL_TEXTURE_BORDER 0x1005
13230+#define GL_TEXTURE_COMPONENTS 0x1003
13231+#define GL_TEXTURE_RED_SIZE 0x805C
13232+#define GL_TEXTURE_GREEN_SIZE 0x805D
13233+#define GL_TEXTURE_BLUE_SIZE 0x805E
13234+#define GL_TEXTURE_ALPHA_SIZE 0x805F
13235+#define GL_TEXTURE_LUMINANCE_SIZE 0x8060
13236+#define GL_TEXTURE_INTENSITY_SIZE 0x8061
13237+#define GL_NEAREST_MIPMAP_NEAREST 0x2700
13238+#define GL_NEAREST_MIPMAP_LINEAR 0x2702
13239+#define GL_LINEAR_MIPMAP_NEAREST 0x2701
13240+#define GL_LINEAR_MIPMAP_LINEAR 0x2703
13241+#define GL_OBJECT_LINEAR 0x2401
13242+#define GL_OBJECT_PLANE 0x2501
13243+#define GL_EYE_LINEAR 0x2400
13244+#define GL_EYE_PLANE 0x2502
13245+#define GL_SPHERE_MAP 0x2402
13246+#define GL_DECAL 0x2101
13247+#define GL_MODULATE 0x2100
13248+#define GL_NEAREST 0x2600
13249+#define GL_REPEAT 0x2901
13250+#define GL_CLAMP 0x2900
13251+#define GL_S 0x2000
13252+#define GL_T 0x2001
13253+#define GL_R 0x2002
13254+#define GL_Q 0x2003
13255+#define GL_TEXTURE_GEN_R 0x0C62
13256+#define GL_TEXTURE_GEN_Q 0x0C63
13257+
13258+/* Utility */
13259+#define GL_VENDOR 0x1F00
13260+#define GL_RENDERER 0x1F01
13261+#define GL_VERSION 0x1F02
13262+#define GL_EXTENSIONS 0x1F03
13263+
13264+/* Errors */
13265+#define GL_NO_ERROR 0x0
13266+#define GL_INVALID_ENUM 0x0500
13267+#define GL_INVALID_VALUE 0x0501
13268+#define GL_INVALID_OPERATION 0x0502
13269+#define GL_STACK_OVERFLOW 0x0503
13270+#define GL_STACK_UNDERFLOW 0x0504
13271+#define GL_OUT_OF_MEMORY 0x0505
13272+
13273+/* glPush/PopAttrib bits */
13274+#define GL_CURRENT_BIT 0x00000001
13275+#define GL_POINT_BIT 0x00000002
13276+#define GL_LINE_BIT 0x00000004
13277+#define GL_POLYGON_BIT 0x00000008
13278+#define GL_POLYGON_STIPPLE_BIT 0x00000010
13279+#define GL_PIXEL_MODE_BIT 0x00000020
13280+#define GL_LIGHTING_BIT 0x00000040
13281+#define GL_FOG_BIT 0x00000080
13282+#define GL_DEPTH_BUFFER_BIT 0x00000100
13283+#define GL_ACCUM_BUFFER_BIT 0x00000200
13284+#define GL_STENCIL_BUFFER_BIT 0x00000400
13285+#define GL_VIEWPORT_BIT 0x00000800
13286+#define GL_TRANSFORM_BIT 0x00001000
13287+#define GL_ENABLE_BIT 0x00002000
13288+#define GL_COLOR_BUFFER_BIT 0x00004000
13289+#define GL_HINT_BIT 0x00008000
13290+#define GL_EVAL_BIT 0x00010000
13291+#define GL_LIST_BIT 0x00020000
13292+#define GL_TEXTURE_BIT 0x00040000
13293+#define GL_SCISSOR_BIT 0x00080000
13294+#define GL_ALL_ATTRIB_BITS 0x000FFFFF
13295+
13296+
13297+/* OpenGL 1.1 */
13298+#define GL_PROXY_TEXTURE_1D 0x8063
13299+#define GL_PROXY_TEXTURE_2D 0x8064
13300+#define GL_TEXTURE_PRIORITY 0x8066
13301+#define GL_TEXTURE_RESIDENT 0x8067
13302+#define GL_TEXTURE_BINDING_1D 0x8068
13303+#define GL_TEXTURE_BINDING_2D 0x8069
13304+#define GL_TEXTURE_INTERNAL_FORMAT 0x1003
13305+#define GL_ALPHA4 0x803B
13306+#define GL_ALPHA8 0x803C
13307+#define GL_ALPHA12 0x803D
13308+#define GL_ALPHA16 0x803E
13309+#define GL_LUMINANCE4 0x803F
13310+#define GL_LUMINANCE8 0x8040
13311+#define GL_LUMINANCE12 0x8041
13312+#define GL_LUMINANCE16 0x8042
13313+#define GL_LUMINANCE4_ALPHA4 0x8043
13314+#define GL_LUMINANCE6_ALPHA2 0x8044
13315+#define GL_LUMINANCE8_ALPHA8 0x8045
13316+#define GL_LUMINANCE12_ALPHA4 0x8046
13317+#define GL_LUMINANCE12_ALPHA12 0x8047
13318+#define GL_LUMINANCE16_ALPHA16 0x8048
13319+#define GL_INTENSITY 0x8049
13320+#define GL_INTENSITY4 0x804A
13321+#define GL_INTENSITY8 0x804B
13322+#define GL_INTENSITY12 0x804C
13323+#define GL_INTENSITY16 0x804D
13324+#define GL_R3_G3_B2 0x2A10
13325+#define GL_RGB4 0x804F
13326+#define GL_RGB5 0x8050
13327+#define GL_RGB8 0x8051
13328+#define GL_RGB10 0x8052
13329+#define GL_RGB12 0x8053
13330+#define GL_RGB16 0x8054
13331+#define GL_RGBA2 0x8055
13332+#define GL_RGBA4 0x8056
13333+#define GL_RGB5_A1 0x8057
13334+#define GL_RGBA8 0x8058
13335+#define GL_RGB10_A2 0x8059
13336+#define GL_RGBA12 0x805A
13337+#define GL_RGBA16 0x805B
13338+#define GL_CLIENT_PIXEL_STORE_BIT 0x00000001
13339+#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
13340+#define GL_ALL_CLIENT_ATTRIB_BITS 0xFFFFFFFF
13341+#define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF
13342+
13343+
13344+
13345+/*
13346+ * Miscellaneous
13347+ */
13348+
13349+GLAPI void GLAPIENTRY glClearIndex( GLfloat c );
13350+
13351+GLAPI void GLAPIENTRY glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
13352+
13353+GLAPI void GLAPIENTRY glClear( GLbitfield mask );
13354+
13355+GLAPI void GLAPIENTRY glIndexMask( GLuint mask );
13356+
13357+GLAPI void GLAPIENTRY glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );
13358+
13359+GLAPI void GLAPIENTRY glAlphaFunc( GLenum func, GLclampf ref );
13360+
13361+GLAPI void GLAPIENTRY glBlendFunc( GLenum sfactor, GLenum dfactor );
13362+
13363+GLAPI void GLAPIENTRY glLogicOp( GLenum opcode );
13364+
13365+GLAPI void GLAPIENTRY glCullFace( GLenum mode );
13366+
13367+GLAPI void GLAPIENTRY glFrontFace( GLenum mode );
13368+
13369+GLAPI void GLAPIENTRY glPointSize( GLfloat size );
13370+
13371+GLAPI void GLAPIENTRY glLineWidth( GLfloat width );
13372+
13373+GLAPI void GLAPIENTRY glLineStipple( GLint factor, GLushort pattern );
13374+
13375+GLAPI void GLAPIENTRY glPolygonMode( GLenum face, GLenum mode );
13376+
13377+GLAPI void GLAPIENTRY glPolygonOffset( GLfloat factor, GLfloat units );
13378+
13379+GLAPI void GLAPIENTRY glPolygonStipple( const GLubyte *mask );
13380+
13381+GLAPI void GLAPIENTRY glGetPolygonStipple( GLubyte *mask );
13382+
13383+GLAPI void GLAPIENTRY glEdgeFlag( GLboolean flag );
13384+
13385+GLAPI void GLAPIENTRY glEdgeFlagv( const GLboolean *flag );
13386+
13387+GLAPI void GLAPIENTRY glScissor( GLint x, GLint y, GLsizei width, GLsizei height);
13388+
13389+GLAPI void GLAPIENTRY glClipPlane( GLenum plane, const GLdouble *equation );
13390+
13391+GLAPI void GLAPIENTRY glGetClipPlane( GLenum plane, GLdouble *equation );
13392+
13393+GLAPI void GLAPIENTRY glDrawBuffer( GLenum mode );
13394+
13395+GLAPI void GLAPIENTRY glReadBuffer( GLenum mode );
13396+
13397+GLAPI void GLAPIENTRY glEnable( GLenum cap );
13398+
13399+GLAPI void GLAPIENTRY glDisable( GLenum cap );
13400+
13401+GLAPI GLboolean GLAPIENTRY glIsEnabled( GLenum cap );
13402+
13403+
13404+GLAPI void GLAPIENTRY glEnableClientState( GLenum cap ); /* 1.1 */
13405+
13406+GLAPI void GLAPIENTRY glDisableClientState( GLenum cap ); /* 1.1 */
13407+
13408+
13409+GLAPI void GLAPIENTRY glGetBooleanv( GLenum pname, GLboolean *params );
13410+
13411+GLAPI void GLAPIENTRY glGetDoublev( GLenum pname, GLdouble *params );
13412+
13413+GLAPI void GLAPIENTRY glGetFloatv( GLenum pname, GLfloat *params );
13414+
13415+GLAPI void GLAPIENTRY glGetIntegerv( GLenum pname, GLint *params );
13416+
13417+
13418+GLAPI void GLAPIENTRY glPushAttrib( GLbitfield mask );
13419+
13420+GLAPI void GLAPIENTRY glPopAttrib( void );
13421+
13422+
13423+GLAPI void GLAPIENTRY glPushClientAttrib( GLbitfield mask ); /* 1.1 */
13424+
13425+GLAPI void GLAPIENTRY glPopClientAttrib( void ); /* 1.1 */
13426+
13427+
13428+GLAPI GLint GLAPIENTRY glRenderMode( GLenum mode );
13429+
13430+GLAPI GLenum GLAPIENTRY glGetError( void );
13431+
13432+GLAPI const GLubyte * GLAPIENTRY glGetString( GLenum name );
13433+
13434+GLAPI void GLAPIENTRY glFinish( void );
13435+
13436+GLAPI void GLAPIENTRY glFlush( void );
13437+
13438+GLAPI void GLAPIENTRY glHint( GLenum target, GLenum mode );
13439+
13440+
13441+/*
13442+ * Depth Buffer
13443+ */
13444+
13445+GLAPI void GLAPIENTRY glClearDepth( GLclampd depth );
13446+
13447+GLAPI void GLAPIENTRY glDepthFunc( GLenum func );
13448+
13449+GLAPI void GLAPIENTRY glDepthMask( GLboolean flag );
13450+
13451+GLAPI void GLAPIENTRY glDepthRange( GLclampd near_val, GLclampd far_val );
13452+
13453+
13454+/*
13455+ * Accumulation Buffer
13456+ */
13457+
13458+GLAPI void GLAPIENTRY glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
13459+
13460+GLAPI void GLAPIENTRY glAccum( GLenum op, GLfloat value );
13461+
13462+
13463+/*
13464+ * Transformation
13465+ */
13466+
13467+GLAPI void GLAPIENTRY glMatrixMode( GLenum mode );
13468+
13469+GLAPI void GLAPIENTRY glOrtho( GLdouble left, GLdouble right,
13470+ GLdouble bottom, GLdouble top,
13471+ GLdouble near_val, GLdouble far_val );
13472+
13473+GLAPI void GLAPIENTRY glFrustum( GLdouble left, GLdouble right,
13474+ GLdouble bottom, GLdouble top,
13475+ GLdouble near_val, GLdouble far_val );
13476+
13477+GLAPI void GLAPIENTRY glViewport( GLint x, GLint y,
13478+ GLsizei width, GLsizei height );
13479+
13480+GLAPI void GLAPIENTRY glPushMatrix( void );
13481+
13482+GLAPI void GLAPIENTRY glPopMatrix( void );
13483+
13484+GLAPI void GLAPIENTRY glLoadIdentity( void );
13485+
13486+GLAPI void GLAPIENTRY glLoadMatrixd( const GLdouble *m );
13487+GLAPI void GLAPIENTRY glLoadMatrixf( const GLfloat *m );
13488+
13489+GLAPI void GLAPIENTRY glMultMatrixd( const GLdouble *m );
13490+GLAPI void GLAPIENTRY glMultMatrixf( const GLfloat *m );
13491+
13492+GLAPI void GLAPIENTRY glRotated( GLdouble angle,
13493+ GLdouble x, GLdouble y, GLdouble z );
13494+GLAPI void GLAPIENTRY glRotatef( GLfloat angle,
13495+ GLfloat x, GLfloat y, GLfloat z );
13496+
13497+GLAPI void GLAPIENTRY glScaled( GLdouble x, GLdouble y, GLdouble z );
13498+GLAPI void GLAPIENTRY glScalef( GLfloat x, GLfloat y, GLfloat z );
13499+
13500+GLAPI void GLAPIENTRY glTranslated( GLdouble x, GLdouble y, GLdouble z );
13501+GLAPI void GLAPIENTRY glTranslatef( GLfloat x, GLfloat y, GLfloat z );
13502+
13503+
13504+/*
13505+ * Display Lists
13506+ */
13507+
13508+GLAPI GLboolean GLAPIENTRY glIsList( GLuint list );
13509+
13510+GLAPI void GLAPIENTRY glDeleteLists( GLuint list, GLsizei range );
13511+
13512+GLAPI GLuint GLAPIENTRY glGenLists( GLsizei range );
13513+
13514+GLAPI void GLAPIENTRY glNewList( GLuint list, GLenum mode );
13515+
13516+GLAPI void GLAPIENTRY glEndList( void );
13517+
13518+GLAPI void GLAPIENTRY glCallList( GLuint list );
13519+
13520+GLAPI void GLAPIENTRY glCallLists( GLsizei n, GLenum type,
13521+ const GLvoid *lists );
13522+
13523+GLAPI void GLAPIENTRY glListBase( GLuint base );
13524+
13525+
13526+/*
13527+ * Drawing Functions
13528+ */
13529+
13530+GLAPI void GLAPIENTRY glBegin( GLenum mode );
13531+
13532+GLAPI void GLAPIENTRY glEnd( void );
13533+
13534+
13535+GLAPI void GLAPIENTRY glVertex2d( GLdouble x, GLdouble y );
13536+GLAPI void GLAPIENTRY glVertex2f( GLfloat x, GLfloat y );
13537+GLAPI void GLAPIENTRY glVertex2i( GLint x, GLint y );
13538+GLAPI void GLAPIENTRY glVertex2s( GLshort x, GLshort y );
13539+
13540+GLAPI void GLAPIENTRY glVertex3d( GLdouble x, GLdouble y, GLdouble z );
13541+GLAPI void GLAPIENTRY glVertex3f( GLfloat x, GLfloat y, GLfloat z );
13542+GLAPI void GLAPIENTRY glVertex3i( GLint x, GLint y, GLint z );
13543+GLAPI void GLAPIENTRY glVertex3s( GLshort x, GLshort y, GLshort z );
13544+
13545+GLAPI void GLAPIENTRY glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
13546+GLAPI void GLAPIENTRY glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
13547+GLAPI void GLAPIENTRY glVertex4i( GLint x, GLint y, GLint z, GLint w );
13548+GLAPI void GLAPIENTRY glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w );
13549+
13550+GLAPI void GLAPIENTRY glVertex2dv( const GLdouble *v );
13551+GLAPI void GLAPIENTRY glVertex2fv( const GLfloat *v );
13552+GLAPI void GLAPIENTRY glVertex2iv( const GLint *v );
13553+GLAPI void GLAPIENTRY glVertex2sv( const GLshort *v );
13554+
13555+GLAPI void GLAPIENTRY glVertex3dv( const GLdouble *v );
13556+GLAPI void GLAPIENTRY glVertex3fv( const GLfloat *v );
13557+GLAPI void GLAPIENTRY glVertex3iv( const GLint *v );
13558+GLAPI void GLAPIENTRY glVertex3sv( const GLshort *v );
13559+
13560+GLAPI void GLAPIENTRY glVertex4dv( const GLdouble *v );
13561+GLAPI void GLAPIENTRY glVertex4fv( const GLfloat *v );
13562+GLAPI void GLAPIENTRY glVertex4iv( const GLint *v );
13563+GLAPI void GLAPIENTRY glVertex4sv( const GLshort *v );
13564+
13565+
13566+GLAPI void GLAPIENTRY glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz );
13567+GLAPI void GLAPIENTRY glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz );
13568+GLAPI void GLAPIENTRY glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz );
13569+GLAPI void GLAPIENTRY glNormal3i( GLint nx, GLint ny, GLint nz );
13570+GLAPI void GLAPIENTRY glNormal3s( GLshort nx, GLshort ny, GLshort nz );
13571+
13572+GLAPI void GLAPIENTRY glNormal3bv( const GLbyte *v );
13573+GLAPI void GLAPIENTRY glNormal3dv( const GLdouble *v );
13574+GLAPI void GLAPIENTRY glNormal3fv( const GLfloat *v );
13575+GLAPI void GLAPIENTRY glNormal3iv( const GLint *v );
13576+GLAPI void GLAPIENTRY glNormal3sv( const GLshort *v );
13577+
13578+
13579+GLAPI void GLAPIENTRY glIndexd( GLdouble c );
13580+GLAPI void GLAPIENTRY glIndexf( GLfloat c );
13581+GLAPI void GLAPIENTRY glIndexi( GLint c );
13582+GLAPI void GLAPIENTRY glIndexs( GLshort c );
13583+GLAPI void GLAPIENTRY glIndexub( GLubyte c ); /* 1.1 */
13584+
13585+GLAPI void GLAPIENTRY glIndexdv( const GLdouble *c );
13586+GLAPI void GLAPIENTRY glIndexfv( const GLfloat *c );
13587+GLAPI void GLAPIENTRY glIndexiv( const GLint *c );
13588+GLAPI void GLAPIENTRY glIndexsv( const GLshort *c );
13589+GLAPI void GLAPIENTRY glIndexubv( const GLubyte *c ); /* 1.1 */
13590+
13591+GLAPI void GLAPIENTRY glColor3b( GLbyte red, GLbyte green, GLbyte blue );
13592+GLAPI void GLAPIENTRY glColor3d( GLdouble red, GLdouble green, GLdouble blue );
13593+GLAPI void GLAPIENTRY glColor3f( GLfloat red, GLfloat green, GLfloat blue );
13594+GLAPI void GLAPIENTRY glColor3i( GLint red, GLint green, GLint blue );
13595+GLAPI void GLAPIENTRY glColor3s( GLshort red, GLshort green, GLshort blue );
13596+GLAPI void GLAPIENTRY glColor3ub( GLubyte red, GLubyte green, GLubyte blue );
13597+GLAPI void GLAPIENTRY glColor3ui( GLuint red, GLuint green, GLuint blue );
13598+GLAPI void GLAPIENTRY glColor3us( GLushort red, GLushort green, GLushort blue );
13599+
13600+GLAPI void GLAPIENTRY glColor4b( GLbyte red, GLbyte green,
13601+ GLbyte blue, GLbyte alpha );
13602+GLAPI void GLAPIENTRY glColor4d( GLdouble red, GLdouble green,
13603+ GLdouble blue, GLdouble alpha );
13604+GLAPI void GLAPIENTRY glColor4f( GLfloat red, GLfloat green,
13605+ GLfloat blue, GLfloat alpha );
13606+GLAPI void GLAPIENTRY glColor4i( GLint red, GLint green,
13607+ GLint blue, GLint alpha );
13608+GLAPI void GLAPIENTRY glColor4s( GLshort red, GLshort green,
13609+ GLshort blue, GLshort alpha );
13610+GLAPI void GLAPIENTRY glColor4ub( GLubyte red, GLubyte green,
13611+ GLubyte blue, GLubyte alpha );
13612+GLAPI void GLAPIENTRY glColor4ui( GLuint red, GLuint green,
13613+ GLuint blue, GLuint alpha );
13614+GLAPI void GLAPIENTRY glColor4us( GLushort red, GLushort green,
13615+ GLushort blue, GLushort alpha );
13616+
13617+
13618+GLAPI void GLAPIENTRY glColor3bv( const GLbyte *v );
13619+GLAPI void GLAPIENTRY glColor3dv( const GLdouble *v );
13620+GLAPI void GLAPIENTRY glColor3fv( const GLfloat *v );
13621+GLAPI void GLAPIENTRY glColor3iv( const GLint *v );
13622+GLAPI void GLAPIENTRY glColor3sv( const GLshort *v );
13623+GLAPI void GLAPIENTRY glColor3ubv( const GLubyte *v );
13624+GLAPI void GLAPIENTRY glColor3uiv( const GLuint *v );
13625+GLAPI void GLAPIENTRY glColor3usv( const GLushort *v );
13626+
13627+GLAPI void GLAPIENTRY glColor4bv( const GLbyte *v );
13628+GLAPI void GLAPIENTRY glColor4dv( const GLdouble *v );
13629+GLAPI void GLAPIENTRY glColor4fv( const GLfloat *v );
13630+GLAPI void GLAPIENTRY glColor4iv( const GLint *v );
13631+GLAPI void GLAPIENTRY glColor4sv( const GLshort *v );
13632+GLAPI void GLAPIENTRY glColor4ubv( const GLubyte *v );
13633+GLAPI void GLAPIENTRY glColor4uiv( const GLuint *v );
13634+GLAPI void GLAPIENTRY glColor4usv( const GLushort *v );
13635+
13636+
13637+GLAPI void GLAPIENTRY glTexCoord1d( GLdouble s );
13638+GLAPI void GLAPIENTRY glTexCoord1f( GLfloat s );
13639+GLAPI void GLAPIENTRY glTexCoord1i( GLint s );
13640+GLAPI void GLAPIENTRY glTexCoord1s( GLshort s );
13641+
13642+GLAPI void GLAPIENTRY glTexCoord2d( GLdouble s, GLdouble t );
13643+GLAPI void GLAPIENTRY glTexCoord2f( GLfloat s, GLfloat t );
13644+GLAPI void GLAPIENTRY glTexCoord2i( GLint s, GLint t );
13645+GLAPI void GLAPIENTRY glTexCoord2s( GLshort s, GLshort t );
13646+
13647+GLAPI void GLAPIENTRY glTexCoord3d( GLdouble s, GLdouble t, GLdouble r );
13648+GLAPI void GLAPIENTRY glTexCoord3f( GLfloat s, GLfloat t, GLfloat r );
13649+GLAPI void GLAPIENTRY glTexCoord3i( GLint s, GLint t, GLint r );
13650+GLAPI void GLAPIENTRY glTexCoord3s( GLshort s, GLshort t, GLshort r );
13651+
13652+GLAPI void GLAPIENTRY glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q );
13653+GLAPI void GLAPIENTRY glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q );
13654+GLAPI void GLAPIENTRY glTexCoord4i( GLint s, GLint t, GLint r, GLint q );
13655+GLAPI void GLAPIENTRY glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q );
13656+
13657+GLAPI void GLAPIENTRY glTexCoord1dv( const GLdouble *v );
13658+GLAPI void GLAPIENTRY glTexCoord1fv( const GLfloat *v );
13659+GLAPI void GLAPIENTRY glTexCoord1iv( const GLint *v );
13660+GLAPI void GLAPIENTRY glTexCoord1sv( const GLshort *v );
13661+
13662+GLAPI void GLAPIENTRY glTexCoord2dv( const GLdouble *v );
13663+GLAPI void GLAPIENTRY glTexCoord2fv( const GLfloat *v );
13664+GLAPI void GLAPIENTRY glTexCoord2iv( const GLint *v );
13665+GLAPI void GLAPIENTRY glTexCoord2sv( const GLshort *v );
13666+
13667+GLAPI void GLAPIENTRY glTexCoord3dv( const GLdouble *v );
13668+GLAPI void GLAPIENTRY glTexCoord3fv( const GLfloat *v );
13669+GLAPI void GLAPIENTRY glTexCoord3iv( const GLint *v );
13670+GLAPI void GLAPIENTRY glTexCoord3sv( const GLshort *v );
13671+
13672+GLAPI void GLAPIENTRY glTexCoord4dv( const GLdouble *v );
13673+GLAPI void GLAPIENTRY glTexCoord4fv( const GLfloat *v );
13674+GLAPI void GLAPIENTRY glTexCoord4iv( const GLint *v );
13675+GLAPI void GLAPIENTRY glTexCoord4sv( const GLshort *v );
13676+
13677+
13678+GLAPI void GLAPIENTRY glRasterPos2d( GLdouble x, GLdouble y );
13679+GLAPI void GLAPIENTRY glRasterPos2f( GLfloat x, GLfloat y );
13680+GLAPI void GLAPIENTRY glRasterPos2i( GLint x, GLint y );
13681+GLAPI void GLAPIENTRY glRasterPos2s( GLshort x, GLshort y );
13682+
13683+GLAPI void GLAPIENTRY glRasterPos3d( GLdouble x, GLdouble y, GLdouble z );
13684+GLAPI void GLAPIENTRY glRasterPos3f( GLfloat x, GLfloat y, GLfloat z );
13685+GLAPI void GLAPIENTRY glRasterPos3i( GLint x, GLint y, GLint z );
13686+GLAPI void GLAPIENTRY glRasterPos3s( GLshort x, GLshort y, GLshort z );
13687+
13688+GLAPI void GLAPIENTRY glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
13689+GLAPI void GLAPIENTRY glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
13690+GLAPI void GLAPIENTRY glRasterPos4i( GLint x, GLint y, GLint z, GLint w );
13691+GLAPI void GLAPIENTRY glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w );
13692+
13693+GLAPI void GLAPIENTRY glRasterPos2dv( const GLdouble *v );
13694+GLAPI void GLAPIENTRY glRasterPos2fv( const GLfloat *v );
13695+GLAPI void GLAPIENTRY glRasterPos2iv( const GLint *v );
13696+GLAPI void GLAPIENTRY glRasterPos2sv( const GLshort *v );
13697+
13698+GLAPI void GLAPIENTRY glRasterPos3dv( const GLdouble *v );
13699+GLAPI void GLAPIENTRY glRasterPos3fv( const GLfloat *v );
13700+GLAPI void GLAPIENTRY glRasterPos3iv( const GLint *v );
13701+GLAPI void GLAPIENTRY glRasterPos3sv( const GLshort *v );
13702+
13703+GLAPI void GLAPIENTRY glRasterPos4dv( const GLdouble *v );
13704+GLAPI void GLAPIENTRY glRasterPos4fv( const GLfloat *v );
13705+GLAPI void GLAPIENTRY glRasterPos4iv( const GLint *v );
13706+GLAPI void GLAPIENTRY glRasterPos4sv( const GLshort *v );
13707+
13708+
13709+GLAPI void GLAPIENTRY glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 );
13710+GLAPI void GLAPIENTRY glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 );
13711+GLAPI void GLAPIENTRY glRecti( GLint x1, GLint y1, GLint x2, GLint y2 );
13712+GLAPI void GLAPIENTRY glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 );
13713+
13714+
13715+GLAPI void GLAPIENTRY glRectdv( const GLdouble *v1, const GLdouble *v2 );
13716+GLAPI void GLAPIENTRY glRectfv( const GLfloat *v1, const GLfloat *v2 );
13717+GLAPI void GLAPIENTRY glRectiv( const GLint *v1, const GLint *v2 );
13718+GLAPI void GLAPIENTRY glRectsv( const GLshort *v1, const GLshort *v2 );
13719+
13720+
13721+/*
13722+ * Vertex Arrays (1.1)
13723+ */
13724+
13725+GLAPI void GLAPIENTRY glVertexPointer( GLint size, GLenum type,
13726+ GLsizei stride, const GLvoid *ptr );
13727+
13728+GLAPI void GLAPIENTRY glNormalPointer( GLenum type, GLsizei stride,
13729+ const GLvoid *ptr );
13730+
13731+GLAPI void GLAPIENTRY glColorPointer( GLint size, GLenum type,
13732+ GLsizei stride, const GLvoid *ptr );
13733+
13734+GLAPI void GLAPIENTRY glIndexPointer( GLenum type, GLsizei stride,
13735+ const GLvoid *ptr );
13736+
13737+GLAPI void GLAPIENTRY glTexCoordPointer( GLint size, GLenum type,
13738+ GLsizei stride, const GLvoid *ptr );
13739+
13740+GLAPI void GLAPIENTRY glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr );
13741+
13742+GLAPI void GLAPIENTRY glGetPointerv( GLenum pname, GLvoid **params );
13743+
13744+GLAPI void GLAPIENTRY glArrayElement( GLint i );
13745+
13746+GLAPI void GLAPIENTRY glDrawArrays( GLenum mode, GLint first, GLsizei count );
13747+
13748+GLAPI void GLAPIENTRY glDrawElements( GLenum mode, GLsizei count,
13749+ GLenum type, const GLvoid *indices );
13750+
13751+GLAPI void GLAPIENTRY glInterleavedArrays( GLenum format, GLsizei stride,
13752+ const GLvoid *pointer );
13753+
13754+/*
13755+ * Lighting
13756+ */
13757+
13758+GLAPI void GLAPIENTRY glShadeModel( GLenum mode );
13759+
13760+GLAPI void GLAPIENTRY glLightf( GLenum light, GLenum pname, GLfloat param );
13761+GLAPI void GLAPIENTRY glLighti( GLenum light, GLenum pname, GLint param );
13762+GLAPI void GLAPIENTRY glLightfv( GLenum light, GLenum pname,
13763+ const GLfloat *params );
13764+GLAPI void GLAPIENTRY glLightiv( GLenum light, GLenum pname,
13765+ const GLint *params );
13766+
13767+GLAPI void GLAPIENTRY glGetLightfv( GLenum light, GLenum pname,
13768+ GLfloat *params );
13769+GLAPI void GLAPIENTRY glGetLightiv( GLenum light, GLenum pname,
13770+ GLint *params );
13771+
13772+GLAPI void GLAPIENTRY glLightModelf( GLenum pname, GLfloat param );
13773+GLAPI void GLAPIENTRY glLightModeli( GLenum pname, GLint param );
13774+GLAPI void GLAPIENTRY glLightModelfv( GLenum pname, const GLfloat *params );
13775+GLAPI void GLAPIENTRY glLightModeliv( GLenum pname, const GLint *params );
13776+
13777+GLAPI void GLAPIENTRY glMaterialf( GLenum face, GLenum pname, GLfloat param );
13778+GLAPI void GLAPIENTRY glMateriali( GLenum face, GLenum pname, GLint param );
13779+GLAPI void GLAPIENTRY glMaterialfv( GLenum face, GLenum pname, const GLfloat *params );
13780+GLAPI void GLAPIENTRY glMaterialiv( GLenum face, GLenum pname, const GLint *params );
13781+
13782+GLAPI void GLAPIENTRY glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params );
13783+GLAPI void GLAPIENTRY glGetMaterialiv( GLenum face, GLenum pname, GLint *params );
13784+
13785+GLAPI void GLAPIENTRY glColorMaterial( GLenum face, GLenum mode );
13786+
13787+
13788+/*
13789+ * Raster functions
13790+ */
13791+
13792+GLAPI void GLAPIENTRY glPixelZoom( GLfloat xfactor, GLfloat yfactor );
13793+
13794+GLAPI void GLAPIENTRY glPixelStoref( GLenum pname, GLfloat param );
13795+GLAPI void GLAPIENTRY glPixelStorei( GLenum pname, GLint param );
13796+
13797+GLAPI void GLAPIENTRY glPixelTransferf( GLenum pname, GLfloat param );
13798+GLAPI void GLAPIENTRY glPixelTransferi( GLenum pname, GLint param );
13799+
13800+GLAPI void GLAPIENTRY glPixelMapfv( GLenum map, GLsizei mapsize,
13801+ const GLfloat *values );
13802+GLAPI void GLAPIENTRY glPixelMapuiv( GLenum map, GLsizei mapsize,
13803+ const GLuint *values );
13804+GLAPI void GLAPIENTRY glPixelMapusv( GLenum map, GLsizei mapsize,
13805+ const GLushort *values );
13806+
13807+GLAPI void GLAPIENTRY glGetPixelMapfv( GLenum map, GLfloat *values );
13808+GLAPI void GLAPIENTRY glGetPixelMapuiv( GLenum map, GLuint *values );
13809+GLAPI void GLAPIENTRY glGetPixelMapusv( GLenum map, GLushort *values );
13810+
13811+GLAPI void GLAPIENTRY glBitmap( GLsizei width, GLsizei height,
13812+ GLfloat xorig, GLfloat yorig,
13813+ GLfloat xmove, GLfloat ymove,
13814+ const GLubyte *bitmap );
13815+
13816+GLAPI void GLAPIENTRY glReadPixels( GLint x, GLint y,
13817+ GLsizei width, GLsizei height,
13818+ GLenum format, GLenum type,
13819+ GLvoid *pixels );
13820+
13821+GLAPI void GLAPIENTRY glDrawPixels( GLsizei width, GLsizei height,
13822+ GLenum format, GLenum type,
13823+ const GLvoid *pixels );
13824+
13825+GLAPI void GLAPIENTRY glCopyPixels( GLint x, GLint y,
13826+ GLsizei width, GLsizei height,
13827+ GLenum type );
13828+
13829+/*
13830+ * Stenciling
13831+ */
13832+
13833+GLAPI void GLAPIENTRY glStencilFunc( GLenum func, GLint ref, GLuint mask );
13834+
13835+GLAPI void GLAPIENTRY glStencilMask( GLuint mask );
13836+
13837+GLAPI void GLAPIENTRY glStencilOp( GLenum fail, GLenum zfail, GLenum zpass );
13838+
13839+GLAPI void GLAPIENTRY glClearStencil( GLint s );
13840+
13841+
13842+
13843+/*
13844+ * Texture mapping
13845+ */
13846+
13847+GLAPI void GLAPIENTRY glTexGend( GLenum coord, GLenum pname, GLdouble param );
13848+GLAPI void GLAPIENTRY glTexGenf( GLenum coord, GLenum pname, GLfloat param );
13849+GLAPI void GLAPIENTRY glTexGeni( GLenum coord, GLenum pname, GLint param );
13850+
13851+GLAPI void GLAPIENTRY glTexGendv( GLenum coord, GLenum pname, const GLdouble *params );
13852+GLAPI void GLAPIENTRY glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params );
13853+GLAPI void GLAPIENTRY glTexGeniv( GLenum coord, GLenum pname, const GLint *params );
13854+
13855+GLAPI void GLAPIENTRY glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params );
13856+GLAPI void GLAPIENTRY glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params );
13857+GLAPI void GLAPIENTRY glGetTexGeniv( GLenum coord, GLenum pname, GLint *params );
13858+
13859+
13860+GLAPI void GLAPIENTRY glTexEnvf( GLenum target, GLenum pname, GLfloat param );
13861+GLAPI void GLAPIENTRY glTexEnvi( GLenum target, GLenum pname, GLint param );
13862+
13863+GLAPI void GLAPIENTRY glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params );
13864+GLAPI void GLAPIENTRY glTexEnviv( GLenum target, GLenum pname, const GLint *params );
13865+
13866+GLAPI void GLAPIENTRY glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params );
13867+GLAPI void GLAPIENTRY glGetTexEnviv( GLenum target, GLenum pname, GLint *params );
13868+
13869+
13870+GLAPI void GLAPIENTRY glTexParameterf( GLenum target, GLenum pname, GLfloat param );
13871+GLAPI void GLAPIENTRY glTexParameteri( GLenum target, GLenum pname, GLint param );
13872+
13873+GLAPI void GLAPIENTRY glTexParameterfv( GLenum target, GLenum pname,
13874+ const GLfloat *params );
13875+GLAPI void GLAPIENTRY glTexParameteriv( GLenum target, GLenum pname,
13876+ const GLint *params );
13877+
13878+GLAPI void GLAPIENTRY glGetTexParameterfv( GLenum target,
13879+ GLenum pname, GLfloat *params);
13880+GLAPI void GLAPIENTRY glGetTexParameteriv( GLenum target,
13881+ GLenum pname, GLint *params );
13882+
13883+GLAPI void GLAPIENTRY glGetTexLevelParameterfv( GLenum target, GLint level,
13884+ GLenum pname, GLfloat *params );
13885+GLAPI void GLAPIENTRY glGetTexLevelParameteriv( GLenum target, GLint level,
13886+ GLenum pname, GLint *params );
13887+
13888+
13889+GLAPI void GLAPIENTRY glTexImage1D( GLenum target, GLint level,
13890+ GLint internalFormat,
13891+ GLsizei width, GLint border,
13892+ GLenum format, GLenum type,
13893+ const GLvoid *pixels );
13894+
13895+GLAPI void GLAPIENTRY glTexImage2D( GLenum target, GLint level,
13896+ GLint internalFormat,
13897+ GLsizei width, GLsizei height,
13898+ GLint border, GLenum format, GLenum type,
13899+ const GLvoid *pixels );
13900+
13901+GLAPI void GLAPIENTRY glGetTexImage( GLenum target, GLint level,
13902+ GLenum format, GLenum type,
13903+ GLvoid *pixels );
13904+
13905+
13906+/* 1.1 functions */
13907+
13908+GLAPI void GLAPIENTRY glGenTextures( GLsizei n, GLuint *textures );
13909+
13910+GLAPI void GLAPIENTRY glDeleteTextures( GLsizei n, const GLuint *textures);
13911+
13912+GLAPI void GLAPIENTRY glBindTexture( GLenum target, GLuint texture );
13913+
13914+GLAPI void GLAPIENTRY glPrioritizeTextures( GLsizei n,
13915+ const GLuint *textures,
13916+ const GLclampf *priorities );
13917+
13918+GLAPI GLboolean GLAPIENTRY glAreTexturesResident( GLsizei n,
13919+ const GLuint *textures,
13920+ GLboolean *residences );
13921+
13922+GLAPI GLboolean GLAPIENTRY glIsTexture( GLuint texture );
13923+
13924+
13925+GLAPI void GLAPIENTRY glTexSubImage1D( GLenum target, GLint level,
13926+ GLint xoffset,
13927+ GLsizei width, GLenum format,
13928+ GLenum type, const GLvoid *pixels );
13929+
13930+
13931+GLAPI void GLAPIENTRY glTexSubImage2D( GLenum target, GLint level,
13932+ GLint xoffset, GLint yoffset,
13933+ GLsizei width, GLsizei height,
13934+ GLenum format, GLenum type,
13935+ const GLvoid *pixels );
13936+
13937+
13938+GLAPI void GLAPIENTRY glCopyTexImage1D( GLenum target, GLint level,
13939+ GLenum internalformat,
13940+ GLint x, GLint y,
13941+ GLsizei width, GLint border );
13942+
13943+
13944+GLAPI void GLAPIENTRY glCopyTexImage2D( GLenum target, GLint level,
13945+ GLenum internalformat,
13946+ GLint x, GLint y,
13947+ GLsizei width, GLsizei height,
13948+ GLint border );
13949+
13950+
13951+GLAPI void GLAPIENTRY glCopyTexSubImage1D( GLenum target, GLint level,
13952+ GLint xoffset, GLint x, GLint y,
13953+ GLsizei width );
13954+
13955+
13956+GLAPI void GLAPIENTRY glCopyTexSubImage2D( GLenum target, GLint level,
13957+ GLint xoffset, GLint yoffset,
13958+ GLint x, GLint y,
13959+ GLsizei width, GLsizei height );
13960+
13961+
13962+/*
13963+ * Evaluators
13964+ */
13965+
13966+GLAPI void GLAPIENTRY glMap1d( GLenum target, GLdouble u1, GLdouble u2,
13967+ GLint stride,
13968+ GLint order, const GLdouble *points );
13969+GLAPI void GLAPIENTRY glMap1f( GLenum target, GLfloat u1, GLfloat u2,
13970+ GLint stride,
13971+ GLint order, const GLfloat *points );
13972+
13973+GLAPI void GLAPIENTRY glMap2d( GLenum target,
13974+ GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
13975+ GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
13976+ const GLdouble *points );
13977+GLAPI void GLAPIENTRY glMap2f( GLenum target,
13978+ GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
13979+ GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
13980+ const GLfloat *points );
13981+
13982+GLAPI void GLAPIENTRY glGetMapdv( GLenum target, GLenum query, GLdouble *v );
13983+GLAPI void GLAPIENTRY glGetMapfv( GLenum target, GLenum query, GLfloat *v );
13984+GLAPI void GLAPIENTRY glGetMapiv( GLenum target, GLenum query, GLint *v );
13985+
13986+GLAPI void GLAPIENTRY glEvalCoord1d( GLdouble u );
13987+GLAPI void GLAPIENTRY glEvalCoord1f( GLfloat u );
13988+
13989+GLAPI void GLAPIENTRY glEvalCoord1dv( const GLdouble *u );
13990+GLAPI void GLAPIENTRY glEvalCoord1fv( const GLfloat *u );
13991+
13992+GLAPI void GLAPIENTRY glEvalCoord2d( GLdouble u, GLdouble v );
13993+GLAPI void GLAPIENTRY glEvalCoord2f( GLfloat u, GLfloat v );
13994+
13995+GLAPI void GLAPIENTRY glEvalCoord2dv( const GLdouble *u );
13996+GLAPI void GLAPIENTRY glEvalCoord2fv( const GLfloat *u );
13997+
13998+GLAPI void GLAPIENTRY glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 );
13999+GLAPI void GLAPIENTRY glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 );
14000+
14001+GLAPI void GLAPIENTRY glMapGrid2d( GLint un, GLdouble u1, GLdouble u2,
14002+ GLint vn, GLdouble v1, GLdouble v2 );
14003+GLAPI void GLAPIENTRY glMapGrid2f( GLint un, GLfloat u1, GLfloat u2,
14004+ GLint vn, GLfloat v1, GLfloat v2 );
14005+
14006+GLAPI void GLAPIENTRY glEvalPoint1( GLint i );
14007+
14008+GLAPI void GLAPIENTRY glEvalPoint2( GLint i, GLint j );
14009+
14010+GLAPI void GLAPIENTRY glEvalMesh1( GLenum mode, GLint i1, GLint i2 );
14011+
14012+GLAPI void GLAPIENTRY glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
14013+
14014+
14015+/*
14016+ * Fog
14017+ */
14018+
14019+GLAPI void GLAPIENTRY glFogf( GLenum pname, GLfloat param );
14020+
14021+GLAPI void GLAPIENTRY glFogi( GLenum pname, GLint param );
14022+
14023+GLAPI void GLAPIENTRY glFogfv( GLenum pname, const GLfloat *params );
14024+
14025+GLAPI void GLAPIENTRY glFogiv( GLenum pname, const GLint *params );
14026+
14027+
14028+/*
14029+ * Selection and Feedback
14030+ */
14031+
14032+GLAPI void GLAPIENTRY glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer );
14033+
14034+GLAPI void GLAPIENTRY glPassThrough( GLfloat token );
14035+
14036+GLAPI void GLAPIENTRY glSelectBuffer( GLsizei size, GLuint *buffer );
14037+
14038+GLAPI void GLAPIENTRY glInitNames( void );
14039+
14040+GLAPI void GLAPIENTRY glLoadName( GLuint name );
14041+
14042+GLAPI void GLAPIENTRY glPushName( GLuint name );
14043+
14044+GLAPI void GLAPIENTRY glPopName( void );
14045+
14046+
14047+
14048+/*
14049+ * OpenGL 1.2
14050+ */
14051+
14052+#define GL_RESCALE_NORMAL 0x803A
14053+#define GL_CLAMP_TO_EDGE 0x812F
14054+#define GL_MAX_ELEMENTS_VERTICES 0x80E8
14055+#define GL_MAX_ELEMENTS_INDICES 0x80E9
14056+#define GL_BGR 0x80E0
14057+#define GL_BGRA 0x80E1
14058+#define GL_UNSIGNED_BYTE_3_3_2 0x8032
14059+#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
14060+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
14061+#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
14062+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
14063+#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
14064+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
14065+#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
14066+#define GL_UNSIGNED_INT_8_8_8_8 0x8035
14067+#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
14068+#define GL_UNSIGNED_INT_10_10_10_2 0x8036
14069+#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
14070+#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
14071+#define GL_SINGLE_COLOR 0x81F9
14072+#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
14073+#define GL_TEXTURE_MIN_LOD 0x813A
14074+#define GL_TEXTURE_MAX_LOD 0x813B
14075+#define GL_TEXTURE_BASE_LEVEL 0x813C
14076+#define GL_TEXTURE_MAX_LEVEL 0x813D
14077+#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
14078+#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
14079+#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
14080+#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
14081+#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
14082+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
14083+#define GL_PACK_SKIP_IMAGES 0x806B
14084+#define GL_PACK_IMAGE_HEIGHT 0x806C
14085+#define GL_UNPACK_SKIP_IMAGES 0x806D
14086+#define GL_UNPACK_IMAGE_HEIGHT 0x806E
14087+#define GL_TEXTURE_3D 0x806F
14088+#define GL_PROXY_TEXTURE_3D 0x8070
14089+#define GL_TEXTURE_DEPTH 0x8071
14090+#define GL_TEXTURE_WRAP_R 0x8072
14091+#define GL_MAX_3D_TEXTURE_SIZE 0x8073
14092+#define GL_TEXTURE_BINDING_3D 0x806A
14093+
14094+GLAPI void GLAPIENTRY glDrawRangeElements( GLenum mode, GLuint start,
14095+ GLuint end, GLsizei count, GLenum type, const GLvoid *indices );
14096+
14097+GLAPI void GLAPIENTRY glTexImage3D( GLenum target, GLint level,
14098+ GLint internalFormat,
14099+ GLsizei width, GLsizei height,
14100+ GLsizei depth, GLint border,
14101+ GLenum format, GLenum type,
14102+ const GLvoid *pixels );
14103+
14104+GLAPI void GLAPIENTRY glTexSubImage3D( GLenum target, GLint level,
14105+ GLint xoffset, GLint yoffset,
14106+ GLint zoffset, GLsizei width,
14107+ GLsizei height, GLsizei depth,
14108+ GLenum format,
14109+ GLenum type, const GLvoid *pixels);
14110+
14111+GLAPI void GLAPIENTRY glCopyTexSubImage3D( GLenum target, GLint level,
14112+ GLint xoffset, GLint yoffset,
14113+ GLint zoffset, GLint x,
14114+ GLint y, GLsizei width,
14115+ GLsizei height );
14116+
14117+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
14118+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);
14119+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);
14120+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
14121+
14122+
14123+/*
14124+ * GL_ARB_imaging
14125+ */
14126+
14127+#define GL_CONSTANT_COLOR 0x8001
14128+#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
14129+#define GL_CONSTANT_ALPHA 0x8003
14130+#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
14131+#define GL_COLOR_TABLE 0x80D0
14132+#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
14133+#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
14134+#define GL_PROXY_COLOR_TABLE 0x80D3
14135+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
14136+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
14137+#define GL_COLOR_TABLE_SCALE 0x80D6
14138+#define GL_COLOR_TABLE_BIAS 0x80D7
14139+#define GL_COLOR_TABLE_FORMAT 0x80D8
14140+#define GL_COLOR_TABLE_WIDTH 0x80D9
14141+#define GL_COLOR_TABLE_RED_SIZE 0x80DA
14142+#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
14143+#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
14144+#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
14145+#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
14146+#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
14147+#define GL_CONVOLUTION_1D 0x8010
14148+#define GL_CONVOLUTION_2D 0x8011
14149+#define GL_SEPARABLE_2D 0x8012
14150+#define GL_CONVOLUTION_BORDER_MODE 0x8013
14151+#define GL_CONVOLUTION_FILTER_SCALE 0x8014
14152+#define GL_CONVOLUTION_FILTER_BIAS 0x8015
14153+#define GL_REDUCE 0x8016
14154+#define GL_CONVOLUTION_FORMAT 0x8017
14155+#define GL_CONVOLUTION_WIDTH 0x8018
14156+#define GL_CONVOLUTION_HEIGHT 0x8019
14157+#define GL_MAX_CONVOLUTION_WIDTH 0x801A
14158+#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
14159+#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
14160+#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
14161+#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
14162+#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
14163+#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
14164+#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
14165+#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
14166+#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
14167+#define GL_CONSTANT_BORDER 0x8151
14168+#define GL_REPLICATE_BORDER 0x8153
14169+#define GL_CONVOLUTION_BORDER_COLOR 0x8154
14170+#define GL_COLOR_MATRIX 0x80B1
14171+#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
14172+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
14173+#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
14174+#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
14175+#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
14176+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
14177+#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
14178+#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
14179+#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
14180+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
14181+#define GL_HISTOGRAM 0x8024
14182+#define GL_PROXY_HISTOGRAM 0x8025
14183+#define GL_HISTOGRAM_WIDTH 0x8026
14184+#define GL_HISTOGRAM_FORMAT 0x8027
14185+#define GL_HISTOGRAM_RED_SIZE 0x8028
14186+#define GL_HISTOGRAM_GREEN_SIZE 0x8029
14187+#define GL_HISTOGRAM_BLUE_SIZE 0x802A
14188+#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
14189+#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
14190+#define GL_HISTOGRAM_SINK 0x802D
14191+#define GL_MINMAX 0x802E
14192+#define GL_MINMAX_FORMAT 0x802F
14193+#define GL_MINMAX_SINK 0x8030
14194+#define GL_TABLE_TOO_LARGE 0x8031
14195+#define GL_BLEND_EQUATION 0x8009
14196+#define GL_MIN 0x8007
14197+#define GL_MAX 0x8008
14198+#define GL_FUNC_ADD 0x8006
14199+#define GL_FUNC_SUBTRACT 0x800A
14200+#define GL_FUNC_REVERSE_SUBTRACT 0x800B
14201+#define GL_BLEND_COLOR 0x8005
14202+
14203+
14204+GLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat,
14205+ GLsizei width, GLenum format,
14206+ GLenum type, const GLvoid *table );
14207+
14208+GLAPI void GLAPIENTRY glColorSubTable( GLenum target,
14209+ GLsizei start, GLsizei count,
14210+ GLenum format, GLenum type,
14211+ const GLvoid *data );
14212+
14213+GLAPI void GLAPIENTRY glColorTableParameteriv(GLenum target, GLenum pname,
14214+ const GLint *params);
14215+
14216+GLAPI void GLAPIENTRY glColorTableParameterfv(GLenum target, GLenum pname,
14217+ const GLfloat *params);
14218+
14219+GLAPI void GLAPIENTRY glCopyColorSubTable( GLenum target, GLsizei start,
14220+ GLint x, GLint y, GLsizei width );
14221+
14222+GLAPI void GLAPIENTRY glCopyColorTable( GLenum target, GLenum internalformat,
14223+ GLint x, GLint y, GLsizei width );
14224+
14225+GLAPI void GLAPIENTRY glGetColorTable( GLenum target, GLenum format,
14226+ GLenum type, GLvoid *table );
14227+
14228+GLAPI void GLAPIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname,
14229+ GLfloat *params );
14230+
14231+GLAPI void GLAPIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname,
14232+ GLint *params );
14233+
14234+GLAPI void GLAPIENTRY glBlendEquation( GLenum mode );
14235+
14236+GLAPI void GLAPIENTRY glBlendColor( GLclampf red, GLclampf green,
14237+ GLclampf blue, GLclampf alpha );
14238+
14239+GLAPI void GLAPIENTRY glHistogram( GLenum target, GLsizei width,
14240+ GLenum internalformat, GLboolean sink );
14241+
14242+GLAPI void GLAPIENTRY glResetHistogram( GLenum target );
14243+
14244+GLAPI void GLAPIENTRY glGetHistogram( GLenum target, GLboolean reset,
14245+ GLenum format, GLenum type,
14246+ GLvoid *values );
14247+
14248+GLAPI void GLAPIENTRY glGetHistogramParameterfv( GLenum target, GLenum pname,
14249+ GLfloat *params );
14250+
14251+GLAPI void GLAPIENTRY glGetHistogramParameteriv( GLenum target, GLenum pname,
14252+ GLint *params );
14253+
14254+GLAPI void GLAPIENTRY glMinmax( GLenum target, GLenum internalformat,
14255+ GLboolean sink );
14256+
14257+GLAPI void GLAPIENTRY glResetMinmax( GLenum target );
14258+
14259+GLAPI void GLAPIENTRY glGetMinmax( GLenum target, GLboolean reset,
14260+ GLenum format, GLenum types,
14261+ GLvoid *values );
14262+
14263+GLAPI void GLAPIENTRY glGetMinmaxParameterfv( GLenum target, GLenum pname,
14264+ GLfloat *params );
14265+
14266+GLAPI void GLAPIENTRY glGetMinmaxParameteriv( GLenum target, GLenum pname,
14267+ GLint *params );
14268+
14269+GLAPI void GLAPIENTRY glConvolutionFilter1D( GLenum target,
14270+ GLenum internalformat, GLsizei width, GLenum format, GLenum type,
14271+ const GLvoid *image );
14272+
14273+GLAPI void GLAPIENTRY glConvolutionFilter2D( GLenum target,
14274+ GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
14275+ GLenum type, const GLvoid *image );
14276+
14277+GLAPI void GLAPIENTRY glConvolutionParameterf( GLenum target, GLenum pname,
14278+ GLfloat params );
14279+
14280+GLAPI void GLAPIENTRY glConvolutionParameterfv( GLenum target, GLenum pname,
14281+ const GLfloat *params );
14282+
14283+GLAPI void GLAPIENTRY glConvolutionParameteri( GLenum target, GLenum pname,
14284+ GLint params );
14285+
14286+GLAPI void GLAPIENTRY glConvolutionParameteriv( GLenum target, GLenum pname,
14287+ const GLint *params );
14288+
14289+GLAPI void GLAPIENTRY glCopyConvolutionFilter1D( GLenum target,
14290+ GLenum internalformat, GLint x, GLint y, GLsizei width );
14291+
14292+GLAPI void GLAPIENTRY glCopyConvolutionFilter2D( GLenum target,
14293+ GLenum internalformat, GLint x, GLint y, GLsizei width,
14294+ GLsizei height);
14295+
14296+GLAPI void GLAPIENTRY glGetConvolutionFilter( GLenum target, GLenum format,
14297+ GLenum type, GLvoid *image );
14298+
14299+GLAPI void GLAPIENTRY glGetConvolutionParameterfv( GLenum target, GLenum pname,
14300+ GLfloat *params );
14301+
14302+GLAPI void GLAPIENTRY glGetConvolutionParameteriv( GLenum target, GLenum pname,
14303+ GLint *params );
14304+
14305+GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target,
14306+ GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
14307+ GLenum type, const GLvoid *row, const GLvoid *column );
14308+
14309+GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
14310+ GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
14311+
14312+typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
14313+typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
14314+typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
14315+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
14316+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
14317+typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
14318+typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
14319+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
14320+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
14321+typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
14322+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
14323+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
14324+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
14325+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
14326+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
14327+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
14328+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
14329+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
14330+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
14331+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
14332+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
14333+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
14334+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
14335+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
14336+typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
14337+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
14338+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
14339+typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
14340+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
14341+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
14342+typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
14343+typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
14344+typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
14345+typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
14346+
14347+
14348+
14349+/*
14350+ * OpenGL 1.3
14351+ */
14352+
14353+/* multitexture */
14354+#define GL_TEXTURE0 0x84C0
14355+#define GL_TEXTURE1 0x84C1
14356+#define GL_TEXTURE2 0x84C2
14357+#define GL_TEXTURE3 0x84C3
14358+#define GL_TEXTURE4 0x84C4
14359+#define GL_TEXTURE5 0x84C5
14360+#define GL_TEXTURE6 0x84C6
14361+#define GL_TEXTURE7 0x84C7
14362+#define GL_TEXTURE8 0x84C8
14363+#define GL_TEXTURE9 0x84C9
14364+#define GL_TEXTURE10 0x84CA
14365+#define GL_TEXTURE11 0x84CB
14366+#define GL_TEXTURE12 0x84CC
14367+#define GL_TEXTURE13 0x84CD
14368+#define GL_TEXTURE14 0x84CE
14369+#define GL_TEXTURE15 0x84CF
14370+#define GL_TEXTURE16 0x84D0
14371+#define GL_TEXTURE17 0x84D1
14372+#define GL_TEXTURE18 0x84D2
14373+#define GL_TEXTURE19 0x84D3
14374+#define GL_TEXTURE20 0x84D4
14375+#define GL_TEXTURE21 0x84D5
14376+#define GL_TEXTURE22 0x84D6
14377+#define GL_TEXTURE23 0x84D7
14378+#define GL_TEXTURE24 0x84D8
14379+#define GL_TEXTURE25 0x84D9
14380+#define GL_TEXTURE26 0x84DA
14381+#define GL_TEXTURE27 0x84DB
14382+#define GL_TEXTURE28 0x84DC
14383+#define GL_TEXTURE29 0x84DD
14384+#define GL_TEXTURE30 0x84DE
14385+#define GL_TEXTURE31 0x84DF
14386+#define GL_ACTIVE_TEXTURE 0x84E0
14387+#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
14388+#define GL_MAX_TEXTURE_UNITS 0x84E2
14389+/* texture_cube_map */
14390+#define GL_NORMAL_MAP 0x8511
14391+#define GL_REFLECTION_MAP 0x8512
14392+#define GL_TEXTURE_CUBE_MAP 0x8513
14393+#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
14394+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
14395+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
14396+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
14397+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
14398+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
14399+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
14400+#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
14401+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
14402+/* texture_compression */
14403+#define GL_COMPRESSED_ALPHA 0x84E9
14404+#define GL_COMPRESSED_LUMINANCE 0x84EA
14405+#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
14406+#define GL_COMPRESSED_INTENSITY 0x84EC
14407+#define GL_COMPRESSED_RGB 0x84ED
14408+#define GL_COMPRESSED_RGBA 0x84EE
14409+#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
14410+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
14411+#define GL_TEXTURE_COMPRESSED 0x86A1
14412+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
14413+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
14414+/* multisample */
14415+#define GL_MULTISAMPLE 0x809D
14416+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
14417+#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
14418+#define GL_SAMPLE_COVERAGE 0x80A0
14419+#define GL_SAMPLE_BUFFERS 0x80A8
14420+#define GL_SAMPLES 0x80A9
14421+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
14422+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
14423+#define GL_MULTISAMPLE_BIT 0x20000000
14424+/* transpose_matrix */
14425+#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
14426+#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
14427+#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
14428+#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
14429+/* texture_env_combine */
14430+#define GL_COMBINE 0x8570
14431+#define GL_COMBINE_RGB 0x8571
14432+#define GL_COMBINE_ALPHA 0x8572
14433+#define GL_SOURCE0_RGB 0x8580
14434+#define GL_SOURCE1_RGB 0x8581
14435+#define GL_SOURCE2_RGB 0x8582
14436+#define GL_SOURCE0_ALPHA 0x8588
14437+#define GL_SOURCE1_ALPHA 0x8589
14438+#define GL_SOURCE2_ALPHA 0x858A
14439+#define GL_OPERAND0_RGB 0x8590
14440+#define GL_OPERAND1_RGB 0x8591
14441+#define GL_OPERAND2_RGB 0x8592
14442+#define GL_OPERAND0_ALPHA 0x8598
14443+#define GL_OPERAND1_ALPHA 0x8599
14444+#define GL_OPERAND2_ALPHA 0x859A
14445+#define GL_RGB_SCALE 0x8573
14446+#define GL_ADD_SIGNED 0x8574
14447+#define GL_INTERPOLATE 0x8575
14448+#define GL_SUBTRACT 0x84E7
14449+#define GL_CONSTANT 0x8576
14450+#define GL_PRIMARY_COLOR 0x8577
14451+#define GL_PREVIOUS 0x8578
14452+/* texture_env_dot3 */
14453+#define GL_DOT3_RGB 0x86AE
14454+#define GL_DOT3_RGBA 0x86AF
14455+/* texture_border_clamp */
14456+#define GL_CLAMP_TO_BORDER 0x812D
14457+
14458+GLAPI void GLAPIENTRY glActiveTexture( GLenum texture );
14459+
14460+GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture );
14461+
14462+GLAPI void GLAPIENTRY glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data );
14463+
14464+GLAPI void GLAPIENTRY glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data );
14465+
14466+GLAPI void GLAPIENTRY glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data );
14467+
14468+GLAPI void GLAPIENTRY glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data );
14469+
14470+GLAPI void GLAPIENTRY glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data );
14471+
14472+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 );
14473+
14474+GLAPI void GLAPIENTRY glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img );
14475+
14476+GLAPI void GLAPIENTRY glMultiTexCoord1d( GLenum target, GLdouble s );
14477+
14478+GLAPI void GLAPIENTRY glMultiTexCoord1dv( GLenum target, const GLdouble *v );
14479+
14480+GLAPI void GLAPIENTRY glMultiTexCoord1f( GLenum target, GLfloat s );
14481+
14482+GLAPI void GLAPIENTRY glMultiTexCoord1fv( GLenum target, const GLfloat *v );
14483+
14484+GLAPI void GLAPIENTRY glMultiTexCoord1i( GLenum target, GLint s );
14485+
14486+GLAPI void GLAPIENTRY glMultiTexCoord1iv( GLenum target, const GLint *v );
14487+
14488+GLAPI void GLAPIENTRY glMultiTexCoord1s( GLenum target, GLshort s );
14489+
14490+GLAPI void GLAPIENTRY glMultiTexCoord1sv( GLenum target, const GLshort *v );
14491+
14492+GLAPI void GLAPIENTRY glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t );
14493+
14494+GLAPI void GLAPIENTRY glMultiTexCoord2dv( GLenum target, const GLdouble *v );
14495+
14496+GLAPI void GLAPIENTRY glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t );
14497+
14498+GLAPI void GLAPIENTRY glMultiTexCoord2fv( GLenum target, const GLfloat *v );
14499+
14500+GLAPI void GLAPIENTRY glMultiTexCoord2i( GLenum target, GLint s, GLint t );
14501+
14502+GLAPI void GLAPIENTRY glMultiTexCoord2iv( GLenum target, const GLint *v );
14503+
14504+GLAPI void GLAPIENTRY glMultiTexCoord2s( GLenum target, GLshort s, GLshort t );
14505+
14506+GLAPI void GLAPIENTRY glMultiTexCoord2sv( GLenum target, const GLshort *v );
14507+
14508+GLAPI void GLAPIENTRY glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r );
14509+
14510+GLAPI void GLAPIENTRY glMultiTexCoord3dv( GLenum target, const GLdouble *v );
14511+
14512+GLAPI void GLAPIENTRY glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r );
14513+
14514+GLAPI void GLAPIENTRY glMultiTexCoord3fv( GLenum target, const GLfloat *v );
14515+
14516+GLAPI void GLAPIENTRY glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r );
14517+
14518+GLAPI void GLAPIENTRY glMultiTexCoord3iv( GLenum target, const GLint *v );
14519+
14520+GLAPI void GLAPIENTRY glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r );
14521+
14522+GLAPI void GLAPIENTRY glMultiTexCoord3sv( GLenum target, const GLshort *v );
14523+
14524+GLAPI void GLAPIENTRY glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q );
14525+
14526+GLAPI void GLAPIENTRY glMultiTexCoord4dv( GLenum target, const GLdouble *v );
14527+
14528+GLAPI void GLAPIENTRY glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q );
14529+
14530+GLAPI void GLAPIENTRY glMultiTexCoord4fv( GLenum target, const GLfloat *v );
14531+
14532+GLAPI void GLAPIENTRY glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q );
14533+
14534+GLAPI void GLAPIENTRY glMultiTexCoord4iv( GLenum target, const GLint *v );
14535+
14536+GLAPI void GLAPIENTRY glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q );
14537+
14538+GLAPI void GLAPIENTRY glMultiTexCoord4sv( GLenum target, const GLshort *v );
14539+
14540+
14541+GLAPI void GLAPIENTRY glLoadTransposeMatrixd( const GLdouble m[16] );
14542+
14543+GLAPI void GLAPIENTRY glLoadTransposeMatrixf( const GLfloat m[16] );
14544+
14545+GLAPI void GLAPIENTRY glMultTransposeMatrixd( const GLdouble m[16] );
14546+
14547+GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] );
14548+
14549+GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert );
14550+
14551+typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
14552+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
14553+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
14554+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
14555+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
14556+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
14557+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
14558+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
14559+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
14560+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
14561+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
14562+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
14563+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
14564+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
14565+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
14566+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
14567+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
14568+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
14569+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
14570+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
14571+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
14572+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
14573+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
14574+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
14575+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
14576+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
14577+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
14578+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
14579+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
14580+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
14581+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
14582+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
14583+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
14584+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
14585+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
14586+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
14587+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
14588+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
14589+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
14590+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
14591+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
14592+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
14593+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);
14594+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
14595+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
14596+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img);
14597+
14598+
14599+/*
14600+ * GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1)
14601+ */
14602+#ifndef GL_ARB_multitexture
14603+#define GL_ARB_multitexture 1
14604+
14605+#define GL_TEXTURE0_ARB 0x84C0
14606+#define GL_TEXTURE1_ARB 0x84C1
14607+#define GL_TEXTURE2_ARB 0x84C2
14608+#define GL_TEXTURE3_ARB 0x84C3
14609+#define GL_TEXTURE4_ARB 0x84C4
14610+#define GL_TEXTURE5_ARB 0x84C5
14611+#define GL_TEXTURE6_ARB 0x84C6
14612+#define GL_TEXTURE7_ARB 0x84C7
14613+#define GL_TEXTURE8_ARB 0x84C8
14614+#define GL_TEXTURE9_ARB 0x84C9
14615+#define GL_TEXTURE10_ARB 0x84CA
14616+#define GL_TEXTURE11_ARB 0x84CB
14617+#define GL_TEXTURE12_ARB 0x84CC
14618+#define GL_TEXTURE13_ARB 0x84CD
14619+#define GL_TEXTURE14_ARB 0x84CE
14620+#define GL_TEXTURE15_ARB 0x84CF
14621+#define GL_TEXTURE16_ARB 0x84D0
14622+#define GL_TEXTURE17_ARB 0x84D1
14623+#define GL_TEXTURE18_ARB 0x84D2
14624+#define GL_TEXTURE19_ARB 0x84D3
14625+#define GL_TEXTURE20_ARB 0x84D4
14626+#define GL_TEXTURE21_ARB 0x84D5
14627+#define GL_TEXTURE22_ARB 0x84D6
14628+#define GL_TEXTURE23_ARB 0x84D7
14629+#define GL_TEXTURE24_ARB 0x84D8
14630+#define GL_TEXTURE25_ARB 0x84D9
14631+#define GL_TEXTURE26_ARB 0x84DA
14632+#define GL_TEXTURE27_ARB 0x84DB
14633+#define GL_TEXTURE28_ARB 0x84DC
14634+#define GL_TEXTURE29_ARB 0x84DD
14635+#define GL_TEXTURE30_ARB 0x84DE
14636+#define GL_TEXTURE31_ARB 0x84DF
14637+#define GL_ACTIVE_TEXTURE_ARB 0x84E0
14638+#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
14639+#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
14640+
14641+GLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture);
14642+GLAPI void GLAPIENTRY glClientActiveTextureARB(GLenum texture);
14643+GLAPI void GLAPIENTRY glMultiTexCoord1dARB(GLenum target, GLdouble s);
14644+GLAPI void GLAPIENTRY glMultiTexCoord1dvARB(GLenum target, const GLdouble *v);
14645+GLAPI void GLAPIENTRY glMultiTexCoord1fARB(GLenum target, GLfloat s);
14646+GLAPI void GLAPIENTRY glMultiTexCoord1fvARB(GLenum target, const GLfloat *v);
14647+GLAPI void GLAPIENTRY glMultiTexCoord1iARB(GLenum target, GLint s);
14648+GLAPI void GLAPIENTRY glMultiTexCoord1ivARB(GLenum target, const GLint *v);
14649+GLAPI void GLAPIENTRY glMultiTexCoord1sARB(GLenum target, GLshort s);
14650+GLAPI void GLAPIENTRY glMultiTexCoord1svARB(GLenum target, const GLshort *v);
14651+GLAPI void GLAPIENTRY glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t);
14652+GLAPI void GLAPIENTRY glMultiTexCoord2dvARB(GLenum target, const GLdouble *v);
14653+GLAPI void GLAPIENTRY glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t);
14654+GLAPI void GLAPIENTRY glMultiTexCoord2fvARB(GLenum target, const GLfloat *v);
14655+GLAPI void GLAPIENTRY glMultiTexCoord2iARB(GLenum target, GLint s, GLint t);
14656+GLAPI void GLAPIENTRY glMultiTexCoord2ivARB(GLenum target, const GLint *v);
14657+GLAPI void GLAPIENTRY glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t);
14658+GLAPI void GLAPIENTRY glMultiTexCoord2svARB(GLenum target, const GLshort *v);
14659+GLAPI void GLAPIENTRY glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r);
14660+GLAPI void GLAPIENTRY glMultiTexCoord3dvARB(GLenum target, const GLdouble *v);
14661+GLAPI void GLAPIENTRY glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r);
14662+GLAPI void GLAPIENTRY glMultiTexCoord3fvARB(GLenum target, const GLfloat *v);
14663+GLAPI void GLAPIENTRY glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r);
14664+GLAPI void GLAPIENTRY glMultiTexCoord3ivARB(GLenum target, const GLint *v);
14665+GLAPI void GLAPIENTRY glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r);
14666+GLAPI void GLAPIENTRY glMultiTexCoord3svARB(GLenum target, const GLshort *v);
14667+GLAPI void GLAPIENTRY glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
14668+GLAPI void GLAPIENTRY glMultiTexCoord4dvARB(GLenum target, const GLdouble *v);
14669+GLAPI void GLAPIENTRY glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
14670+GLAPI void GLAPIENTRY glMultiTexCoord4fvARB(GLenum target, const GLfloat *v);
14671+GLAPI void GLAPIENTRY glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q);
14672+GLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v);
14673+GLAPI void GLAPIENTRY glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
14674+GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v);
14675+
14676+typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
14677+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
14678+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
14679+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
14680+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
14681+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
14682+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
14683+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
14684+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
14685+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
14686+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
14687+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
14688+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
14689+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
14690+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
14691+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
14692+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
14693+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
14694+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
14695+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
14696+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
14697+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
14698+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
14699+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
14700+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
14701+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
14702+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
14703+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
14704+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
14705+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
14706+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
14707+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
14708+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
14709+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
14710+
14711+#endif /* GL_ARB_multitexture */
14712+
14713+
14714+
14715+/*
14716+ * Define this token if you want "old-style" header file behaviour (extensions
14717+ * defined in gl.h). Otherwise, extensions will be included from glext.h.
14718+ */
14719+#if defined(GL_GLEXT_LEGACY)
14720+
14721+/* All extensions that used to be here are now found in glext.h */
14722+
14723+#else /* GL_GLEXT_LEGACY */
14724+
14725+#include <mesa_glext.h>
14726+
14727+#endif /* GL_GLEXT_LEGACY */
14728+
14729+
14730+
14731+#if GL_ARB_shader_objects
14732+
14733+#ifndef GL_MESA_shader_debug
14734+#define GL_MESA_shader_debug 1
14735+
14736+#define GL_DEBUG_OBJECT_MESA 0x8759
14737+#define GL_DEBUG_PRINT_MESA 0x875A
14738+#define GL_DEBUG_ASSERT_MESA 0x875B
14739+
14740+GLAPI GLhandleARB APIENTRY glCreateDebugObjectMESA (void);
14741+GLAPI void APIENTRY glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
14742+GLAPI void APIENTRY glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength,
14743+ GLsizei *length, GLcharARB *debugLog);
14744+GLAPI GLsizei APIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
14745+
14746+#endif /* GL_MESA_shader_debug */
14747+
14748+#endif /* GL_ARB_shader_objects */
14749+
14750+
14751+/*
14752+ * ???. GL_MESA_packed_depth_stencil
14753+ * XXX obsolete
14754+ */
14755+#ifndef GL_MESA_packed_depth_stencil
14756+#define GL_MESA_packed_depth_stencil 1
14757+
14758+#define GL_DEPTH_STENCIL_MESA 0x8750
14759+#define GL_UNSIGNED_INT_24_8_MESA 0x8751
14760+#define GL_UNSIGNED_INT_8_24_REV_MESA 0x8752
14761+#define GL_UNSIGNED_SHORT_15_1_MESA 0x8753
14762+#define GL_UNSIGNED_SHORT_1_15_REV_MESA 0x8754
14763+
14764+#endif /* GL_MESA_packed_depth_stencil */
14765+
14766+
14767+#ifndef GL_MESA_program_debug
14768+#define GL_MESA_program_debug 1
14769+
14770+#define GL_FRAGMENT_PROGRAM_POSITION_MESA 0x8bb0
14771+#define GL_FRAGMENT_PROGRAM_CALLBACK_MESA 0x8bb1
14772+#define GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA 0x8bb2
14773+#define GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA 0x8bb3
14774+#define GL_VERTEX_PROGRAM_POSITION_MESA 0x8bb4
14775+#define GL_VERTEX_PROGRAM_CALLBACK_MESA 0x8bb5
14776+#define GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA 0x8bb6
14777+#define GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA 0x8bb7
14778+
14779+typedef void (*GLprogramcallbackMESA)(GLenum target, GLvoid *data);
14780+
14781+GLAPI void GLAPIENTRY glProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, GLvoid *data);
14782+
14783+GLAPI void GLAPIENTRY glGetProgramRegisterfvMESA(GLenum target, GLsizei len, const GLubyte *name, GLfloat *v);
14784+
14785+#endif /* GL_MESA_program_debug */
14786+
14787+
14788+#ifndef GL_ATI_blend_equation_separate
14789+#define GL_ATI_blend_equation_separate 1
14790+
14791+#define GL_ALPHA_BLEND_EQUATION_ATI 0x883D
14792+
14793+GLAPI void GLAPIENTRY glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA );
14794+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA);
14795+
14796+#endif /* GL_ATI_blend_equation_separate */
14797+
14798+
14799+
14800+/**
14801+ ** NOTE!!!!! If you add new functions to this file, or update
14802+ ** glext.h be sure to regenerate the gl_mangle.h file. See comments
14803+ ** in that file for details.
14804+ **/
14805+
14806+
14807+
14808+/**********************************************************************
14809+ * Begin system-specific stuff
14810+ */
14811+#if defined(PRAGMA_EXPORT_SUPPORTED)
14812+#pragma export off
14813+#endif
14814+
14815+#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
14816+#pragma import off
14817+#endif
14818+/*
14819+ * End system-specific stuff
14820+ **********************************************************************/
14821+
14822+
14823+#ifdef __cplusplus
14824+}
14825+#endif
14826+
14827+#endif /* __gl_h_ */
14828Index: qemu-0.14.0/target-i386/mesa_glext.h
14829===================================================================
14830--- /dev/null
14831+++ qemu-0.14.0/target-i386/mesa_glext.h
14832@@ -0,0 +1,7279 @@
14833+#ifndef __glext_h_
14834+#define __glext_h_
14835+
14836+#ifdef __cplusplus
14837+extern "C" {
14838+#endif
14839+
14840+/*
14841+** Copyright (c) 2007 The Khronos Group Inc.
14842+**
14843+** Permission is hereby granted, free of charge, to any person obtaining a
14844+** copy of this software and/or associated documentation files (the
14845+** "Materials"), to deal in the Materials without restriction, including
14846+** without limitation the rights to use, copy, modify, merge, publish,
14847+** distribute, sublicense, and/or sell copies of the Materials, and to
14848+** permit persons to whom the Materials are furnished to do so, subject to
14849+** the following conditions:
14850+**
14851+** The above copyright notice and this permission notice shall be included
14852+** in all copies or substantial portions of the Materials.
14853+**
14854+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
14855+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14856+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
14857+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
14858+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
14859+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
14860+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
14861+*/
14862+
14863+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
14864+#define WIN32_LEAN_AND_MEAN 1
14865+#include <windows.h>
14866+#endif
14867+
14868+#ifndef APIENTRY
14869+#define APIENTRY
14870+#endif
14871+#ifndef APIENTRYP
14872+#define APIENTRYP APIENTRY *
14873+#endif
14874+#ifndef GLAPI
14875+#define GLAPI extern
14876+#endif
14877+
14878+/*************************************************************/
14879+
14880+/* Header file version number, required by OpenGL ABI for Linux */
14881+/* glext.h last updated 2007/02/12 */
14882+/* Current version at http://www.opengl.org/registry/ */
14883+#define GL_GLEXT_VERSION 39
14884+
14885+#ifndef GL_VERSION_1_2
14886+#define GL_UNSIGNED_BYTE_3_3_2 0x8032
14887+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
14888+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
14889+#define GL_UNSIGNED_INT_8_8_8_8 0x8035
14890+#define GL_UNSIGNED_INT_10_10_10_2 0x8036
14891+#define GL_RESCALE_NORMAL 0x803A
14892+#define GL_TEXTURE_BINDING_3D 0x806A
14893+#define GL_PACK_SKIP_IMAGES 0x806B
14894+#define GL_PACK_IMAGE_HEIGHT 0x806C
14895+#define GL_UNPACK_SKIP_IMAGES 0x806D
14896+#define GL_UNPACK_IMAGE_HEIGHT 0x806E
14897+#define GL_TEXTURE_3D 0x806F
14898+#define GL_PROXY_TEXTURE_3D 0x8070
14899+#define GL_TEXTURE_DEPTH 0x8071
14900+#define GL_TEXTURE_WRAP_R 0x8072
14901+#define GL_MAX_3D_TEXTURE_SIZE 0x8073
14902+#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
14903+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
14904+#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
14905+#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
14906+#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
14907+#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
14908+#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
14909+#define GL_BGR 0x80E0
14910+#define GL_BGRA 0x80E1
14911+#define GL_MAX_ELEMENTS_VERTICES 0x80E8
14912+#define GL_MAX_ELEMENTS_INDICES 0x80E9
14913+#define GL_CLAMP_TO_EDGE 0x812F
14914+#define GL_TEXTURE_MIN_LOD 0x813A
14915+#define GL_TEXTURE_MAX_LOD 0x813B
14916+#define GL_TEXTURE_BASE_LEVEL 0x813C
14917+#define GL_TEXTURE_MAX_LEVEL 0x813D
14918+#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
14919+#define GL_SINGLE_COLOR 0x81F9
14920+#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
14921+#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
14922+#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
14923+#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
14924+#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
14925+#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
14926+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
14927+#endif
14928+
14929+#ifndef GL_ARB_imaging
14930+#define GL_CONSTANT_COLOR 0x8001
14931+#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
14932+#define GL_CONSTANT_ALPHA 0x8003
14933+#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
14934+#define GL_BLEND_COLOR 0x8005
14935+#define GL_FUNC_ADD 0x8006
14936+#define GL_MIN 0x8007
14937+#define GL_MAX 0x8008
14938+#define GL_BLEND_EQUATION 0x8009
14939+#define GL_FUNC_SUBTRACT 0x800A
14940+#define GL_FUNC_REVERSE_SUBTRACT 0x800B
14941+#define GL_CONVOLUTION_1D 0x8010
14942+#define GL_CONVOLUTION_2D 0x8011
14943+#define GL_SEPARABLE_2D 0x8012
14944+#define GL_CONVOLUTION_BORDER_MODE 0x8013
14945+#define GL_CONVOLUTION_FILTER_SCALE 0x8014
14946+#define GL_CONVOLUTION_FILTER_BIAS 0x8015
14947+#define GL_REDUCE 0x8016
14948+#define GL_CONVOLUTION_FORMAT 0x8017
14949+#define GL_CONVOLUTION_WIDTH 0x8018
14950+#define GL_CONVOLUTION_HEIGHT 0x8019
14951+#define GL_MAX_CONVOLUTION_WIDTH 0x801A
14952+#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
14953+#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
14954+#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
14955+#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
14956+#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
14957+#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
14958+#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
14959+#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
14960+#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
14961+#define GL_HISTOGRAM 0x8024
14962+#define GL_PROXY_HISTOGRAM 0x8025
14963+#define GL_HISTOGRAM_WIDTH 0x8026
14964+#define GL_HISTOGRAM_FORMAT 0x8027
14965+#define GL_HISTOGRAM_RED_SIZE 0x8028
14966+#define GL_HISTOGRAM_GREEN_SIZE 0x8029
14967+#define GL_HISTOGRAM_BLUE_SIZE 0x802A
14968+#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
14969+#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
14970+#define GL_HISTOGRAM_SINK 0x802D
14971+#define GL_MINMAX 0x802E
14972+#define GL_MINMAX_FORMAT 0x802F
14973+#define GL_MINMAX_SINK 0x8030
14974+#define GL_TABLE_TOO_LARGE 0x8031
14975+#define GL_COLOR_MATRIX 0x80B1
14976+#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
14977+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
14978+#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
14979+#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
14980+#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
14981+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
14982+#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
14983+#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
14984+#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
14985+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
14986+#define GL_COLOR_TABLE 0x80D0
14987+#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
14988+#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
14989+#define GL_PROXY_COLOR_TABLE 0x80D3
14990+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
14991+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
14992+#define GL_COLOR_TABLE_SCALE 0x80D6
14993+#define GL_COLOR_TABLE_BIAS 0x80D7
14994+#define GL_COLOR_TABLE_FORMAT 0x80D8
14995+#define GL_COLOR_TABLE_WIDTH 0x80D9
14996+#define GL_COLOR_TABLE_RED_SIZE 0x80DA
14997+#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
14998+#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
14999+#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
15000+#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
15001+#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
15002+#define GL_CONSTANT_BORDER 0x8151
15003+#define GL_REPLICATE_BORDER 0x8153
15004+#define GL_CONVOLUTION_BORDER_COLOR 0x8154
15005+#endif
15006+
15007+#ifndef GL_VERSION_1_3
15008+#define GL_TEXTURE0 0x84C0
15009+#define GL_TEXTURE1 0x84C1
15010+#define GL_TEXTURE2 0x84C2
15011+#define GL_TEXTURE3 0x84C3
15012+#define GL_TEXTURE4 0x84C4
15013+#define GL_TEXTURE5 0x84C5
15014+#define GL_TEXTURE6 0x84C6
15015+#define GL_TEXTURE7 0x84C7
15016+#define GL_TEXTURE8 0x84C8
15017+#define GL_TEXTURE9 0x84C9
15018+#define GL_TEXTURE10 0x84CA
15019+#define GL_TEXTURE11 0x84CB
15020+#define GL_TEXTURE12 0x84CC
15021+#define GL_TEXTURE13 0x84CD
15022+#define GL_TEXTURE14 0x84CE
15023+#define GL_TEXTURE15 0x84CF
15024+#define GL_TEXTURE16 0x84D0
15025+#define GL_TEXTURE17 0x84D1
15026+#define GL_TEXTURE18 0x84D2
15027+#define GL_TEXTURE19 0x84D3
15028+#define GL_TEXTURE20 0x84D4
15029+#define GL_TEXTURE21 0x84D5
15030+#define GL_TEXTURE22 0x84D6
15031+#define GL_TEXTURE23 0x84D7
15032+#define GL_TEXTURE24 0x84D8
15033+#define GL_TEXTURE25 0x84D9
15034+#define GL_TEXTURE26 0x84DA
15035+#define GL_TEXTURE27 0x84DB
15036+#define GL_TEXTURE28 0x84DC
15037+#define GL_TEXTURE29 0x84DD
15038+#define GL_TEXTURE30 0x84DE
15039+#define GL_TEXTURE31 0x84DF
15040+#define GL_ACTIVE_TEXTURE 0x84E0
15041+#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
15042+#define GL_MAX_TEXTURE_UNITS 0x84E2
15043+#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
15044+#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
15045+#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
15046+#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
15047+#define GL_MULTISAMPLE 0x809D
15048+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
15049+#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
15050+#define GL_SAMPLE_COVERAGE 0x80A0
15051+#define GL_SAMPLE_BUFFERS 0x80A8
15052+#define GL_SAMPLES 0x80A9
15053+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
15054+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
15055+#define GL_MULTISAMPLE_BIT 0x20000000
15056+#define GL_NORMAL_MAP 0x8511
15057+#define GL_REFLECTION_MAP 0x8512
15058+#define GL_TEXTURE_CUBE_MAP 0x8513
15059+#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
15060+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
15061+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
15062+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
15063+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
15064+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
15065+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
15066+#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
15067+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
15068+#define GL_COMPRESSED_ALPHA 0x84E9
15069+#define GL_COMPRESSED_LUMINANCE 0x84EA
15070+#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
15071+#define GL_COMPRESSED_INTENSITY 0x84EC
15072+#define GL_COMPRESSED_RGB 0x84ED
15073+#define GL_COMPRESSED_RGBA 0x84EE
15074+#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
15075+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
15076+#define GL_TEXTURE_COMPRESSED 0x86A1
15077+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
15078+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
15079+#define GL_CLAMP_TO_BORDER 0x812D
15080+#define GL_COMBINE 0x8570
15081+#define GL_COMBINE_RGB 0x8571
15082+#define GL_COMBINE_ALPHA 0x8572
15083+#define GL_SOURCE0_RGB 0x8580
15084+#define GL_SOURCE1_RGB 0x8581
15085+#define GL_SOURCE2_RGB 0x8582
15086+#define GL_SOURCE0_ALPHA 0x8588
15087+#define GL_SOURCE1_ALPHA 0x8589
15088+#define GL_SOURCE2_ALPHA 0x858A
15089+#define GL_OPERAND0_RGB 0x8590
15090+#define GL_OPERAND1_RGB 0x8591
15091+#define GL_OPERAND2_RGB 0x8592
15092+#define GL_OPERAND0_ALPHA 0x8598
15093+#define GL_OPERAND1_ALPHA 0x8599
15094+#define GL_OPERAND2_ALPHA 0x859A
15095+#define GL_RGB_SCALE 0x8573
15096+#define GL_ADD_SIGNED 0x8574
15097+#define GL_INTERPOLATE 0x8575
15098+#define GL_SUBTRACT 0x84E7
15099+#define GL_CONSTANT 0x8576
15100+#define GL_PRIMARY_COLOR 0x8577
15101+#define GL_PREVIOUS 0x8578
15102+#define GL_DOT3_RGB 0x86AE
15103+#define GL_DOT3_RGBA 0x86AF
15104+#endif
15105+
15106+#ifndef GL_VERSION_1_4
15107+#define GL_BLEND_DST_RGB 0x80C8
15108+#define GL_BLEND_SRC_RGB 0x80C9
15109+#define GL_BLEND_DST_ALPHA 0x80CA
15110+#define GL_BLEND_SRC_ALPHA 0x80CB
15111+#define GL_POINT_SIZE_MIN 0x8126
15112+#define GL_POINT_SIZE_MAX 0x8127
15113+#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
15114+#define GL_POINT_DISTANCE_ATTENUATION 0x8129
15115+#define GL_GENERATE_MIPMAP 0x8191
15116+#define GL_GENERATE_MIPMAP_HINT 0x8192
15117+#define GL_DEPTH_COMPONENT16 0x81A5
15118+#define GL_DEPTH_COMPONENT24 0x81A6
15119+#define GL_DEPTH_COMPONENT32 0x81A7
15120+#define GL_MIRRORED_REPEAT 0x8370
15121+#define GL_FOG_COORDINATE_SOURCE 0x8450
15122+#define GL_FOG_COORDINATE 0x8451
15123+#define GL_FRAGMENT_DEPTH 0x8452
15124+#define GL_CURRENT_FOG_COORDINATE 0x8453
15125+#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454
15126+#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455
15127+#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456
15128+#define GL_FOG_COORDINATE_ARRAY 0x8457
15129+#define GL_COLOR_SUM 0x8458
15130+#define GL_CURRENT_SECONDARY_COLOR 0x8459
15131+#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A
15132+#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B
15133+#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C
15134+#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D
15135+#define GL_SECONDARY_COLOR_ARRAY 0x845E
15136+#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
15137+#define GL_TEXTURE_FILTER_CONTROL 0x8500
15138+#define GL_TEXTURE_LOD_BIAS 0x8501
15139+#define GL_INCR_WRAP 0x8507
15140+#define GL_DECR_WRAP 0x8508
15141+#define GL_TEXTURE_DEPTH_SIZE 0x884A
15142+#define GL_DEPTH_TEXTURE_MODE 0x884B
15143+#define GL_TEXTURE_COMPARE_MODE 0x884C
15144+#define GL_TEXTURE_COMPARE_FUNC 0x884D
15145+#define GL_COMPARE_R_TO_TEXTURE 0x884E
15146+#endif
15147+
15148+#ifndef GL_VERSION_1_5
15149+#define GL_BUFFER_SIZE 0x8764
15150+#define GL_BUFFER_USAGE 0x8765
15151+#define GL_QUERY_COUNTER_BITS 0x8864
15152+#define GL_CURRENT_QUERY 0x8865
15153+#define GL_QUERY_RESULT 0x8866
15154+#define GL_QUERY_RESULT_AVAILABLE 0x8867
15155+#define GL_ARRAY_BUFFER 0x8892
15156+#define GL_ELEMENT_ARRAY_BUFFER 0x8893
15157+#define GL_ARRAY_BUFFER_BINDING 0x8894
15158+#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
15159+#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
15160+#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
15161+#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
15162+#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899
15163+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
15164+#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B
15165+#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C
15166+#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D
15167+#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E
15168+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
15169+#define GL_READ_ONLY 0x88B8
15170+#define GL_WRITE_ONLY 0x88B9
15171+#define GL_READ_WRITE 0x88BA
15172+#define GL_BUFFER_ACCESS 0x88BB
15173+#define GL_BUFFER_MAPPED 0x88BC
15174+#define GL_BUFFER_MAP_POINTER 0x88BD
15175+#define GL_STREAM_DRAW 0x88E0
15176+#define GL_STREAM_READ 0x88E1
15177+#define GL_STREAM_COPY 0x88E2
15178+#define GL_STATIC_DRAW 0x88E4
15179+#define GL_STATIC_READ 0x88E5
15180+#define GL_STATIC_COPY 0x88E6
15181+#define GL_DYNAMIC_DRAW 0x88E8
15182+#define GL_DYNAMIC_READ 0x88E9
15183+#define GL_DYNAMIC_COPY 0x88EA
15184+#define GL_SAMPLES_PASSED 0x8914
15185+#define GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE
15186+#define GL_FOG_COORD GL_FOG_COORDINATE
15187+#define GL_CURRENT_FOG_COORD GL_CURRENT_FOG_COORDINATE
15188+#define GL_FOG_COORD_ARRAY_TYPE GL_FOG_COORDINATE_ARRAY_TYPE
15189+#define GL_FOG_COORD_ARRAY_STRIDE GL_FOG_COORDINATE_ARRAY_STRIDE
15190+#define GL_FOG_COORD_ARRAY_POINTER GL_FOG_COORDINATE_ARRAY_POINTER
15191+#define GL_FOG_COORD_ARRAY GL_FOG_COORDINATE_ARRAY
15192+#define GL_FOG_COORD_ARRAY_BUFFER_BINDING GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING
15193+#define GL_SRC0_RGB GL_SOURCE0_RGB
15194+#define GL_SRC1_RGB GL_SOURCE1_RGB
15195+#define GL_SRC2_RGB GL_SOURCE2_RGB
15196+#define GL_SRC0_ALPHA GL_SOURCE0_ALPHA
15197+#define GL_SRC1_ALPHA GL_SOURCE1_ALPHA
15198+#define GL_SRC2_ALPHA GL_SOURCE2_ALPHA
15199+#endif
15200+
15201+#ifndef GL_VERSION_2_0
15202+#define GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION
15203+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
15204+#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
15205+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
15206+#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
15207+#define GL_CURRENT_VERTEX_ATTRIB 0x8626
15208+#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
15209+#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643
15210+#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
15211+#define GL_STENCIL_BACK_FUNC 0x8800
15212+#define GL_STENCIL_BACK_FAIL 0x8801
15213+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
15214+#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
15215+#define GL_MAX_DRAW_BUFFERS 0x8824
15216+#define GL_DRAW_BUFFER0 0x8825
15217+#define GL_DRAW_BUFFER1 0x8826
15218+#define GL_DRAW_BUFFER2 0x8827
15219+#define GL_DRAW_BUFFER3 0x8828
15220+#define GL_DRAW_BUFFER4 0x8829
15221+#define GL_DRAW_BUFFER5 0x882A
15222+#define GL_DRAW_BUFFER6 0x882B
15223+#define GL_DRAW_BUFFER7 0x882C
15224+#define GL_DRAW_BUFFER8 0x882D
15225+#define GL_DRAW_BUFFER9 0x882E
15226+#define GL_DRAW_BUFFER10 0x882F
15227+#define GL_DRAW_BUFFER11 0x8830
15228+#define GL_DRAW_BUFFER12 0x8831
15229+#define GL_DRAW_BUFFER13 0x8832
15230+#define GL_DRAW_BUFFER14 0x8833
15231+#define GL_DRAW_BUFFER15 0x8834
15232+#define GL_BLEND_EQUATION_ALPHA 0x883D
15233+#define GL_POINT_SPRITE 0x8861
15234+#define GL_COORD_REPLACE 0x8862
15235+#define GL_MAX_VERTEX_ATTRIBS 0x8869
15236+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
15237+#define GL_MAX_TEXTURE_COORDS 0x8871
15238+#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
15239+#define GL_FRAGMENT_SHADER 0x8B30
15240+#define GL_VERTEX_SHADER 0x8B31
15241+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
15242+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
15243+#define GL_MAX_VARYING_FLOATS 0x8B4B
15244+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
15245+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
15246+#define GL_SHADER_TYPE 0x8B4F
15247+#define GL_FLOAT_VEC2 0x8B50
15248+#define GL_FLOAT_VEC3 0x8B51
15249+#define GL_FLOAT_VEC4 0x8B52
15250+#define GL_INT_VEC2 0x8B53
15251+#define GL_INT_VEC3 0x8B54
15252+#define GL_INT_VEC4 0x8B55
15253+#define GL_BOOL 0x8B56
15254+#define GL_BOOL_VEC2 0x8B57
15255+#define GL_BOOL_VEC3 0x8B58
15256+#define GL_BOOL_VEC4 0x8B59
15257+#define GL_FLOAT_MAT2 0x8B5A
15258+#define GL_FLOAT_MAT3 0x8B5B
15259+#define GL_FLOAT_MAT4 0x8B5C
15260+#define GL_SAMPLER_1D 0x8B5D
15261+#define GL_SAMPLER_2D 0x8B5E
15262+#define GL_SAMPLER_3D 0x8B5F
15263+#define GL_SAMPLER_CUBE 0x8B60
15264+#define GL_SAMPLER_1D_SHADOW 0x8B61
15265+#define GL_SAMPLER_2D_SHADOW 0x8B62
15266+#define GL_DELETE_STATUS 0x8B80
15267+#define GL_COMPILE_STATUS 0x8B81
15268+#define GL_LINK_STATUS 0x8B82
15269+#define GL_VALIDATE_STATUS 0x8B83
15270+#define GL_INFO_LOG_LENGTH 0x8B84
15271+#define GL_ATTACHED_SHADERS 0x8B85
15272+#define GL_ACTIVE_UNIFORMS 0x8B86
15273+#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
15274+#define GL_SHADER_SOURCE_LENGTH 0x8B88
15275+#define GL_ACTIVE_ATTRIBUTES 0x8B89
15276+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
15277+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
15278+#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
15279+#define GL_CURRENT_PROGRAM 0x8B8D
15280+#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
15281+#define GL_LOWER_LEFT 0x8CA1
15282+#define GL_UPPER_LEFT 0x8CA2
15283+#define GL_STENCIL_BACK_REF 0x8CA3
15284+#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
15285+#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
15286+#endif
15287+
15288+#ifndef GL_VERSION_2_1
15289+#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F
15290+#define GL_PIXEL_PACK_BUFFER 0x88EB
15291+#define GL_PIXEL_UNPACK_BUFFER 0x88EC
15292+#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
15293+#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
15294+#define GL_FLOAT_MAT2x3 0x8B65
15295+#define GL_FLOAT_MAT2x4 0x8B66
15296+#define GL_FLOAT_MAT3x2 0x8B67
15297+#define GL_FLOAT_MAT3x4 0x8B68
15298+#define GL_FLOAT_MAT4x2 0x8B69
15299+#define GL_FLOAT_MAT4x3 0x8B6A
15300+#define GL_SRGB 0x8C40
15301+#define GL_SRGB8 0x8C41
15302+#define GL_SRGB_ALPHA 0x8C42
15303+#define GL_SRGB8_ALPHA8 0x8C43
15304+#define GL_SLUMINANCE_ALPHA 0x8C44
15305+#define GL_SLUMINANCE8_ALPHA8 0x8C45
15306+#define GL_SLUMINANCE 0x8C46
15307+#define GL_SLUMINANCE8 0x8C47
15308+#define GL_COMPRESSED_SRGB 0x8C48
15309+#define GL_COMPRESSED_SRGB_ALPHA 0x8C49
15310+#define GL_COMPRESSED_SLUMINANCE 0x8C4A
15311+#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B
15312+#endif
15313+
15314+#ifndef GL_ARB_multitexture
15315+#define GL_TEXTURE0_ARB 0x84C0
15316+#define GL_TEXTURE1_ARB 0x84C1
15317+#define GL_TEXTURE2_ARB 0x84C2
15318+#define GL_TEXTURE3_ARB 0x84C3
15319+#define GL_TEXTURE4_ARB 0x84C4
15320+#define GL_TEXTURE5_ARB 0x84C5
15321+#define GL_TEXTURE6_ARB 0x84C6
15322+#define GL_TEXTURE7_ARB 0x84C7
15323+#define GL_TEXTURE8_ARB 0x84C8
15324+#define GL_TEXTURE9_ARB 0x84C9
15325+#define GL_TEXTURE10_ARB 0x84CA
15326+#define GL_TEXTURE11_ARB 0x84CB
15327+#define GL_TEXTURE12_ARB 0x84CC
15328+#define GL_TEXTURE13_ARB 0x84CD
15329+#define GL_TEXTURE14_ARB 0x84CE
15330+#define GL_TEXTURE15_ARB 0x84CF
15331+#define GL_TEXTURE16_ARB 0x84D0
15332+#define GL_TEXTURE17_ARB 0x84D1
15333+#define GL_TEXTURE18_ARB 0x84D2
15334+#define GL_TEXTURE19_ARB 0x84D3
15335+#define GL_TEXTURE20_ARB 0x84D4
15336+#define GL_TEXTURE21_ARB 0x84D5
15337+#define GL_TEXTURE22_ARB 0x84D6
15338+#define GL_TEXTURE23_ARB 0x84D7
15339+#define GL_TEXTURE24_ARB 0x84D8
15340+#define GL_TEXTURE25_ARB 0x84D9
15341+#define GL_TEXTURE26_ARB 0x84DA
15342+#define GL_TEXTURE27_ARB 0x84DB
15343+#define GL_TEXTURE28_ARB 0x84DC
15344+#define GL_TEXTURE29_ARB 0x84DD
15345+#define GL_TEXTURE30_ARB 0x84DE
15346+#define GL_TEXTURE31_ARB 0x84DF
15347+#define GL_ACTIVE_TEXTURE_ARB 0x84E0
15348+#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
15349+#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
15350+#endif
15351+
15352+#ifndef GL_ARB_transpose_matrix
15353+#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3
15354+#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4
15355+#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5
15356+#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6
15357+#endif
15358+
15359+#ifndef GL_ARB_multisample
15360+#define GL_MULTISAMPLE_ARB 0x809D
15361+#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E
15362+#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F
15363+#define GL_SAMPLE_COVERAGE_ARB 0x80A0
15364+#define GL_SAMPLE_BUFFERS_ARB 0x80A8
15365+#define GL_SAMPLES_ARB 0x80A9
15366+#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA
15367+#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB
15368+#define GL_MULTISAMPLE_BIT_ARB 0x20000000
15369+#endif
15370+
15371+#ifndef GL_ARB_texture_env_add
15372+#endif
15373+
15374+#ifndef GL_ARB_texture_cube_map
15375+#define GL_NORMAL_MAP_ARB 0x8511
15376+#define GL_REFLECTION_MAP_ARB 0x8512
15377+#define GL_TEXTURE_CUBE_MAP_ARB 0x8513
15378+#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514
15379+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515
15380+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516
15381+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517
15382+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518
15383+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519
15384+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A
15385+#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B
15386+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C
15387+#endif
15388+
15389+#ifndef GL_ARB_texture_compression
15390+#define GL_COMPRESSED_ALPHA_ARB 0x84E9
15391+#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA
15392+#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB
15393+#define GL_COMPRESSED_INTENSITY_ARB 0x84EC
15394+#define GL_COMPRESSED_RGB_ARB 0x84ED
15395+#define GL_COMPRESSED_RGBA_ARB 0x84EE
15396+#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF
15397+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
15398+#define GL_TEXTURE_COMPRESSED_ARB 0x86A1
15399+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
15400+#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
15401+#endif
15402+
15403+#ifndef GL_ARB_texture_border_clamp
15404+#define GL_CLAMP_TO_BORDER_ARB 0x812D
15405+#endif
15406+
15407+#ifndef GL_ARB_point_parameters
15408+#define GL_POINT_SIZE_MIN_ARB 0x8126
15409+#define GL_POINT_SIZE_MAX_ARB 0x8127
15410+#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128
15411+#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129
15412+#endif
15413+
15414+#ifndef GL_ARB_vertex_blend
15415+#define GL_MAX_VERTEX_UNITS_ARB 0x86A4
15416+#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5
15417+#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6
15418+#define GL_VERTEX_BLEND_ARB 0x86A7
15419+#define GL_CURRENT_WEIGHT_ARB 0x86A8
15420+#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9
15421+#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA
15422+#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB
15423+#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC
15424+#define GL_WEIGHT_ARRAY_ARB 0x86AD
15425+#define GL_MODELVIEW0_ARB 0x1700
15426+#define GL_MODELVIEW1_ARB 0x850A
15427+#define GL_MODELVIEW2_ARB 0x8722
15428+#define GL_MODELVIEW3_ARB 0x8723
15429+#define GL_MODELVIEW4_ARB 0x8724
15430+#define GL_MODELVIEW5_ARB 0x8725
15431+#define GL_MODELVIEW6_ARB 0x8726
15432+#define GL_MODELVIEW7_ARB 0x8727
15433+#define GL_MODELVIEW8_ARB 0x8728
15434+#define GL_MODELVIEW9_ARB 0x8729
15435+#define GL_MODELVIEW10_ARB 0x872A
15436+#define GL_MODELVIEW11_ARB 0x872B
15437+#define GL_MODELVIEW12_ARB 0x872C
15438+#define GL_MODELVIEW13_ARB 0x872D
15439+#define GL_MODELVIEW14_ARB 0x872E
15440+#define GL_MODELVIEW15_ARB 0x872F
15441+#define GL_MODELVIEW16_ARB 0x8730
15442+#define GL_MODELVIEW17_ARB 0x8731
15443+#define GL_MODELVIEW18_ARB 0x8732
15444+#define GL_MODELVIEW19_ARB 0x8733
15445+#define GL_MODELVIEW20_ARB 0x8734
15446+#define GL_MODELVIEW21_ARB 0x8735
15447+#define GL_MODELVIEW22_ARB 0x8736
15448+#define GL_MODELVIEW23_ARB 0x8737
15449+#define GL_MODELVIEW24_ARB 0x8738
15450+#define GL_MODELVIEW25_ARB 0x8739
15451+#define GL_MODELVIEW26_ARB 0x873A
15452+#define GL_MODELVIEW27_ARB 0x873B
15453+#define GL_MODELVIEW28_ARB 0x873C
15454+#define GL_MODELVIEW29_ARB 0x873D
15455+#define GL_MODELVIEW30_ARB 0x873E
15456+#define GL_MODELVIEW31_ARB 0x873F
15457+#endif
15458+
15459+#ifndef GL_ARB_matrix_palette
15460+#define GL_MATRIX_PALETTE_ARB 0x8840
15461+#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841
15462+#define GL_MAX_PALETTE_MATRICES_ARB 0x8842
15463+#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843
15464+#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844
15465+#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845
15466+#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846
15467+#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847
15468+#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848
15469+#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849
15470+#endif
15471+
15472+#ifndef GL_ARB_texture_env_combine
15473+#define GL_COMBINE_ARB 0x8570
15474+#define GL_COMBINE_RGB_ARB 0x8571
15475+#define GL_COMBINE_ALPHA_ARB 0x8572
15476+#define GL_SOURCE0_RGB_ARB 0x8580
15477+#define GL_SOURCE1_RGB_ARB 0x8581
15478+#define GL_SOURCE2_RGB_ARB 0x8582
15479+#define GL_SOURCE0_ALPHA_ARB 0x8588
15480+#define GL_SOURCE1_ALPHA_ARB 0x8589
15481+#define GL_SOURCE2_ALPHA_ARB 0x858A
15482+#define GL_OPERAND0_RGB_ARB 0x8590
15483+#define GL_OPERAND1_RGB_ARB 0x8591
15484+#define GL_OPERAND2_RGB_ARB 0x8592
15485+#define GL_OPERAND0_ALPHA_ARB 0x8598
15486+#define GL_OPERAND1_ALPHA_ARB 0x8599
15487+#define GL_OPERAND2_ALPHA_ARB 0x859A
15488+#define GL_RGB_SCALE_ARB 0x8573
15489+#define GL_ADD_SIGNED_ARB 0x8574
15490+#define GL_INTERPOLATE_ARB 0x8575
15491+#define GL_SUBTRACT_ARB 0x84E7
15492+#define GL_CONSTANT_ARB 0x8576
15493+#define GL_PRIMARY_COLOR_ARB 0x8577
15494+#define GL_PREVIOUS_ARB 0x8578
15495+#endif
15496+
15497+#ifndef GL_ARB_texture_env_crossbar
15498+#endif
15499+
15500+#ifndef GL_ARB_texture_env_dot3
15501+#define GL_DOT3_RGB_ARB 0x86AE
15502+#define GL_DOT3_RGBA_ARB 0x86AF
15503+#endif
15504+
15505+#ifndef GL_ARB_texture_mirrored_repeat
15506+#define GL_MIRRORED_REPEAT_ARB 0x8370
15507+#endif
15508+
15509+#ifndef GL_ARB_depth_texture
15510+#define GL_DEPTH_COMPONENT16_ARB 0x81A5
15511+#define GL_DEPTH_COMPONENT24_ARB 0x81A6
15512+#define GL_DEPTH_COMPONENT32_ARB 0x81A7
15513+#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A
15514+#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B
15515+#endif
15516+
15517+#ifndef GL_ARB_shadow
15518+#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C
15519+#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D
15520+#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E
15521+#endif
15522+
15523+#ifndef GL_ARB_shadow_ambient
15524+#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF
15525+#endif
15526+
15527+#ifndef GL_ARB_window_pos
15528+#endif
15529+
15530+#ifndef GL_ARB_vertex_program
15531+#define GL_COLOR_SUM_ARB 0x8458
15532+#define GL_VERTEX_PROGRAM_ARB 0x8620
15533+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622
15534+#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623
15535+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624
15536+#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625
15537+#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626
15538+#define GL_PROGRAM_LENGTH_ARB 0x8627
15539+#define GL_PROGRAM_STRING_ARB 0x8628
15540+#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E
15541+#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F
15542+#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640
15543+#define GL_CURRENT_MATRIX_ARB 0x8641
15544+#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642
15545+#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643
15546+#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645
15547+#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B
15548+#define GL_PROGRAM_BINDING_ARB 0x8677
15549+#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869
15550+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A
15551+#define GL_PROGRAM_ERROR_STRING_ARB 0x8874
15552+#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875
15553+#define GL_PROGRAM_FORMAT_ARB 0x8876
15554+#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0
15555+#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1
15556+#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2
15557+#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3
15558+#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4
15559+#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5
15560+#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6
15561+#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7
15562+#define GL_PROGRAM_PARAMETERS_ARB 0x88A8
15563+#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9
15564+#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA
15565+#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB
15566+#define GL_PROGRAM_ATTRIBS_ARB 0x88AC
15567+#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD
15568+#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE
15569+#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF
15570+#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0
15571+#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1
15572+#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2
15573+#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3
15574+#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4
15575+#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5
15576+#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6
15577+#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7
15578+#define GL_MATRIX0_ARB 0x88C0
15579+#define GL_MATRIX1_ARB 0x88C1
15580+#define GL_MATRIX2_ARB 0x88C2
15581+#define GL_MATRIX3_ARB 0x88C3
15582+#define GL_MATRIX4_ARB 0x88C4
15583+#define GL_MATRIX5_ARB 0x88C5
15584+#define GL_MATRIX6_ARB 0x88C6
15585+#define GL_MATRIX7_ARB 0x88C7
15586+#define GL_MATRIX8_ARB 0x88C8
15587+#define GL_MATRIX9_ARB 0x88C9
15588+#define GL_MATRIX10_ARB 0x88CA
15589+#define GL_MATRIX11_ARB 0x88CB
15590+#define GL_MATRIX12_ARB 0x88CC
15591+#define GL_MATRIX13_ARB 0x88CD
15592+#define GL_MATRIX14_ARB 0x88CE
15593+#define GL_MATRIX15_ARB 0x88CF
15594+#define GL_MATRIX16_ARB 0x88D0
15595+#define GL_MATRIX17_ARB 0x88D1
15596+#define GL_MATRIX18_ARB 0x88D2
15597+#define GL_MATRIX19_ARB 0x88D3
15598+#define GL_MATRIX20_ARB 0x88D4
15599+#define GL_MATRIX21_ARB 0x88D5
15600+#define GL_MATRIX22_ARB 0x88D6
15601+#define GL_MATRIX23_ARB 0x88D7
15602+#define GL_MATRIX24_ARB 0x88D8
15603+#define GL_MATRIX25_ARB 0x88D9
15604+#define GL_MATRIX26_ARB 0x88DA
15605+#define GL_MATRIX27_ARB 0x88DB
15606+#define GL_MATRIX28_ARB 0x88DC
15607+#define GL_MATRIX29_ARB 0x88DD
15608+#define GL_MATRIX30_ARB 0x88DE
15609+#define GL_MATRIX31_ARB 0x88DF
15610+#endif
15611+
15612+#ifndef GL_ARB_fragment_program
15613+#define GL_FRAGMENT_PROGRAM_ARB 0x8804
15614+#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805
15615+#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806
15616+#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807
15617+#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808
15618+#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809
15619+#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A
15620+#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B
15621+#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C
15622+#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D
15623+#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E
15624+#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F
15625+#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810
15626+#define GL_MAX_TEXTURE_COORDS_ARB 0x8871
15627+#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872
15628+#endif
15629+
15630+#ifndef GL_ARB_vertex_buffer_object
15631+#define GL_BUFFER_SIZE_ARB 0x8764
15632+#define GL_BUFFER_USAGE_ARB 0x8765
15633+#define GL_ARRAY_BUFFER_ARB 0x8892
15634+#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893
15635+#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894
15636+#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895
15637+#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896
15638+#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897
15639+#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898
15640+#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899
15641+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A
15642+#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B
15643+#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C
15644+#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D
15645+#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E
15646+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F
15647+#define GL_READ_ONLY_ARB 0x88B8
15648+#define GL_WRITE_ONLY_ARB 0x88B9
15649+#define GL_READ_WRITE_ARB 0x88BA
15650+#define GL_BUFFER_ACCESS_ARB 0x88BB
15651+#define GL_BUFFER_MAPPED_ARB 0x88BC
15652+#define GL_BUFFER_MAP_POINTER_ARB 0x88BD
15653+#define GL_STREAM_DRAW_ARB 0x88E0
15654+#define GL_STREAM_READ_ARB 0x88E1
15655+#define GL_STREAM_COPY_ARB 0x88E2
15656+#define GL_STATIC_DRAW_ARB 0x88E4
15657+#define GL_STATIC_READ_ARB 0x88E5
15658+#define GL_STATIC_COPY_ARB 0x88E6
15659+#define GL_DYNAMIC_DRAW_ARB 0x88E8
15660+#define GL_DYNAMIC_READ_ARB 0x88E9
15661+#define GL_DYNAMIC_COPY_ARB 0x88EA
15662+#endif
15663+
15664+#ifndef GL_ARB_occlusion_query
15665+#define GL_QUERY_COUNTER_BITS_ARB 0x8864
15666+#define GL_CURRENT_QUERY_ARB 0x8865
15667+#define GL_QUERY_RESULT_ARB 0x8866
15668+#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867
15669+#define GL_SAMPLES_PASSED_ARB 0x8914
15670+#endif
15671+
15672+#ifndef GL_ARB_shader_objects
15673+#define GL_PROGRAM_OBJECT_ARB 0x8B40
15674+#define GL_SHADER_OBJECT_ARB 0x8B48
15675+#define GL_OBJECT_TYPE_ARB 0x8B4E
15676+#define GL_OBJECT_SUBTYPE_ARB 0x8B4F
15677+#define GL_FLOAT_VEC2_ARB 0x8B50
15678+#define GL_FLOAT_VEC3_ARB 0x8B51
15679+#define GL_FLOAT_VEC4_ARB 0x8B52
15680+#define GL_INT_VEC2_ARB 0x8B53
15681+#define GL_INT_VEC3_ARB 0x8B54
15682+#define GL_INT_VEC4_ARB 0x8B55
15683+#define GL_BOOL_ARB 0x8B56
15684+#define GL_BOOL_VEC2_ARB 0x8B57
15685+#define GL_BOOL_VEC3_ARB 0x8B58
15686+#define GL_BOOL_VEC4_ARB 0x8B59
15687+#define GL_FLOAT_MAT2_ARB 0x8B5A
15688+#define GL_FLOAT_MAT3_ARB 0x8B5B
15689+#define GL_FLOAT_MAT4_ARB 0x8B5C
15690+#define GL_SAMPLER_1D_ARB 0x8B5D
15691+#define GL_SAMPLER_2D_ARB 0x8B5E
15692+#define GL_SAMPLER_3D_ARB 0x8B5F
15693+#define GL_SAMPLER_CUBE_ARB 0x8B60
15694+#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61
15695+#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62
15696+#define GL_SAMPLER_2D_RECT_ARB 0x8B63
15697+#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64
15698+#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80
15699+#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81
15700+#define GL_OBJECT_LINK_STATUS_ARB 0x8B82
15701+#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83
15702+#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84
15703+#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85
15704+#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86
15705+#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87
15706+#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88
15707+#endif
15708+
15709+#ifndef GL_ARB_vertex_shader
15710+#define GL_VERTEX_SHADER_ARB 0x8B31
15711+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A
15712+#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B
15713+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C
15714+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D
15715+#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89
15716+#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A
15717+#endif
15718+
15719+#ifndef GL_ARB_fragment_shader
15720+#define GL_FRAGMENT_SHADER_ARB 0x8B30
15721+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49
15722+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B
15723+#endif
15724+
15725+#ifndef GL_ARB_shading_language_100
15726+#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C
15727+#endif
15728+
15729+#ifndef GL_ARB_texture_non_power_of_two
15730+#endif
15731+
15732+#ifndef GL_ARB_point_sprite
15733+#define GL_POINT_SPRITE_ARB 0x8861
15734+#define GL_COORD_REPLACE_ARB 0x8862
15735+#endif
15736+
15737+#ifndef GL_ARB_fragment_program_shadow
15738+#endif
15739+
15740+#ifndef GL_ARB_draw_buffers
15741+#define GL_MAX_DRAW_BUFFERS_ARB 0x8824
15742+#define GL_DRAW_BUFFER0_ARB 0x8825
15743+#define GL_DRAW_BUFFER1_ARB 0x8826
15744+#define GL_DRAW_BUFFER2_ARB 0x8827
15745+#define GL_DRAW_BUFFER3_ARB 0x8828
15746+#define GL_DRAW_BUFFER4_ARB 0x8829
15747+#define GL_DRAW_BUFFER5_ARB 0x882A
15748+#define GL_DRAW_BUFFER6_ARB 0x882B
15749+#define GL_DRAW_BUFFER7_ARB 0x882C
15750+#define GL_DRAW_BUFFER8_ARB 0x882D
15751+#define GL_DRAW_BUFFER9_ARB 0x882E
15752+#define GL_DRAW_BUFFER10_ARB 0x882F
15753+#define GL_DRAW_BUFFER11_ARB 0x8830
15754+#define GL_DRAW_BUFFER12_ARB 0x8831
15755+#define GL_DRAW_BUFFER13_ARB 0x8832
15756+#define GL_DRAW_BUFFER14_ARB 0x8833
15757+#define GL_DRAW_BUFFER15_ARB 0x8834
15758+#endif
15759+
15760+#ifndef GL_ARB_texture_rectangle
15761+#define GL_TEXTURE_RECTANGLE_ARB 0x84F5
15762+#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6
15763+#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7
15764+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
15765+#endif
15766+
15767+#ifndef GL_ARB_color_buffer_float
15768+#define GL_RGBA_FLOAT_MODE_ARB 0x8820
15769+#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A
15770+#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B
15771+#define GL_CLAMP_READ_COLOR_ARB 0x891C
15772+#define GL_FIXED_ONLY_ARB 0x891D
15773+#endif
15774+
15775+#ifndef GL_ARB_half_float_pixel
15776+#define GL_HALF_FLOAT_ARB 0x140B
15777+#endif
15778+
15779+#ifndef GL_ARB_texture_float
15780+#define GL_TEXTURE_RED_TYPE_ARB 0x8C10
15781+#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11
15782+#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12
15783+#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13
15784+#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14
15785+#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15
15786+#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16
15787+#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17
15788+#define GL_RGBA32F_ARB 0x8814
15789+#define GL_RGB32F_ARB 0x8815
15790+#define GL_ALPHA32F_ARB 0x8816
15791+#define GL_INTENSITY32F_ARB 0x8817
15792+#define GL_LUMINANCE32F_ARB 0x8818
15793+#define GL_LUMINANCE_ALPHA32F_ARB 0x8819
15794+#define GL_RGBA16F_ARB 0x881A
15795+#define GL_RGB16F_ARB 0x881B
15796+#define GL_ALPHA16F_ARB 0x881C
15797+#define GL_INTENSITY16F_ARB 0x881D
15798+#define GL_LUMINANCE16F_ARB 0x881E
15799+#define GL_LUMINANCE_ALPHA16F_ARB 0x881F
15800+#endif
15801+
15802+#ifndef GL_ARB_pixel_buffer_object
15803+#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB
15804+#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC
15805+#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED
15806+#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
15807+#endif
15808+
15809+#ifndef GL_EXT_abgr
15810+#define GL_ABGR_EXT 0x8000
15811+#endif
15812+
15813+#ifndef GL_EXT_blend_color
15814+#define GL_CONSTANT_COLOR_EXT 0x8001
15815+#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002
15816+#define GL_CONSTANT_ALPHA_EXT 0x8003
15817+#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004
15818+#define GL_BLEND_COLOR_EXT 0x8005
15819+#endif
15820+
15821+#ifndef GL_EXT_polygon_offset
15822+#define GL_POLYGON_OFFSET_EXT 0x8037
15823+#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038
15824+#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039
15825+#endif
15826+
15827+#ifndef GL_EXT_texture
15828+#define GL_ALPHA4_EXT 0x803B
15829+#define GL_ALPHA8_EXT 0x803C
15830+#define GL_ALPHA12_EXT 0x803D
15831+#define GL_ALPHA16_EXT 0x803E
15832+#define GL_LUMINANCE4_EXT 0x803F
15833+#define GL_LUMINANCE8_EXT 0x8040
15834+#define GL_LUMINANCE12_EXT 0x8041
15835+#define GL_LUMINANCE16_EXT 0x8042
15836+#define GL_LUMINANCE4_ALPHA4_EXT 0x8043
15837+#define GL_LUMINANCE6_ALPHA2_EXT 0x8044
15838+#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
15839+#define GL_LUMINANCE12_ALPHA4_EXT 0x8046
15840+#define GL_LUMINANCE12_ALPHA12_EXT 0x8047
15841+#define GL_LUMINANCE16_ALPHA16_EXT 0x8048
15842+#define GL_INTENSITY_EXT 0x8049
15843+#define GL_INTENSITY4_EXT 0x804A
15844+#define GL_INTENSITY8_EXT 0x804B
15845+#define GL_INTENSITY12_EXT 0x804C
15846+#define GL_INTENSITY16_EXT 0x804D
15847+#define GL_RGB2_EXT 0x804E
15848+#define GL_RGB4_EXT 0x804F
15849+#define GL_RGB5_EXT 0x8050
15850+#define GL_RGB8_EXT 0x8051
15851+#define GL_RGB10_EXT 0x8052
15852+#define GL_RGB12_EXT 0x8053
15853+#define GL_RGB16_EXT 0x8054
15854+#define GL_RGBA2_EXT 0x8055
15855+#define GL_RGBA4_EXT 0x8056
15856+#define GL_RGB5_A1_EXT 0x8057
15857+#define GL_RGBA8_EXT 0x8058
15858+#define GL_RGB10_A2_EXT 0x8059
15859+#define GL_RGBA12_EXT 0x805A
15860+#define GL_RGBA16_EXT 0x805B
15861+#define GL_TEXTURE_RED_SIZE_EXT 0x805C
15862+#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D
15863+#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E
15864+#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F
15865+#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060
15866+#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061
15867+#define GL_REPLACE_EXT 0x8062
15868+#define GL_PROXY_TEXTURE_1D_EXT 0x8063
15869+#define GL_PROXY_TEXTURE_2D_EXT 0x8064
15870+#define GL_TEXTURE_TOO_LARGE_EXT 0x8065
15871+#endif
15872+
15873+#ifndef GL_EXT_texture3D
15874+#define GL_PACK_SKIP_IMAGES_EXT 0x806B
15875+#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C
15876+#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D
15877+#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E
15878+#define GL_TEXTURE_3D_EXT 0x806F
15879+#define GL_PROXY_TEXTURE_3D_EXT 0x8070
15880+#define GL_TEXTURE_DEPTH_EXT 0x8071
15881+#define GL_TEXTURE_WRAP_R_EXT 0x8072
15882+#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073
15883+#endif
15884+
15885+#ifndef GL_SGIS_texture_filter4
15886+#define GL_FILTER4_SGIS 0x8146
15887+#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147
15888+#endif
15889+
15890+#ifndef GL_EXT_subtexture
15891+#endif
15892+
15893+#ifndef GL_EXT_copy_texture
15894+#endif
15895+
15896+#ifndef GL_EXT_histogram
15897+#define GL_HISTOGRAM_EXT 0x8024
15898+#define GL_PROXY_HISTOGRAM_EXT 0x8025
15899+#define GL_HISTOGRAM_WIDTH_EXT 0x8026
15900+#define GL_HISTOGRAM_FORMAT_EXT 0x8027
15901+#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028
15902+#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029
15903+#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A
15904+#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B
15905+#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C
15906+#define GL_HISTOGRAM_SINK_EXT 0x802D
15907+#define GL_MINMAX_EXT 0x802E
15908+#define GL_MINMAX_FORMAT_EXT 0x802F
15909+#define GL_MINMAX_SINK_EXT 0x8030
15910+#define GL_TABLE_TOO_LARGE_EXT 0x8031
15911+#endif
15912+
15913+#ifndef GL_EXT_convolution
15914+#define GL_CONVOLUTION_1D_EXT 0x8010
15915+#define GL_CONVOLUTION_2D_EXT 0x8011
15916+#define GL_SEPARABLE_2D_EXT 0x8012
15917+#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013
15918+#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014
15919+#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015
15920+#define GL_REDUCE_EXT 0x8016
15921+#define GL_CONVOLUTION_FORMAT_EXT 0x8017
15922+#define GL_CONVOLUTION_WIDTH_EXT 0x8018
15923+#define GL_CONVOLUTION_HEIGHT_EXT 0x8019
15924+#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A
15925+#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B
15926+#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C
15927+#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D
15928+#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E
15929+#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F
15930+#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020
15931+#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021
15932+#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022
15933+#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023
15934+#endif
15935+
15936+#ifndef GL_SGI_color_matrix
15937+#define GL_COLOR_MATRIX_SGI 0x80B1
15938+#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2
15939+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3
15940+#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4
15941+#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5
15942+#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6
15943+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7
15944+#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8
15945+#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9
15946+#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA
15947+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB
15948+#endif
15949+
15950+#ifndef GL_SGI_color_table
15951+#define GL_COLOR_TABLE_SGI 0x80D0
15952+#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1
15953+#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2
15954+#define GL_PROXY_COLOR_TABLE_SGI 0x80D3
15955+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4
15956+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5
15957+#define GL_COLOR_TABLE_SCALE_SGI 0x80D6
15958+#define GL_COLOR_TABLE_BIAS_SGI 0x80D7
15959+#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8
15960+#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9
15961+#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA
15962+#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB
15963+#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC
15964+#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD
15965+#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE
15966+#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF
15967+#endif
15968+
15969+#ifndef GL_SGIS_pixel_texture
15970+#define GL_PIXEL_TEXTURE_SGIS 0x8353
15971+#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354
15972+#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355
15973+#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356
15974+#endif
15975+
15976+#ifndef GL_SGIX_pixel_texture
15977+#define GL_PIXEL_TEX_GEN_SGIX 0x8139
15978+#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B
15979+#endif
15980+
15981+#ifndef GL_SGIS_texture4D
15982+#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130
15983+#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131
15984+#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132
15985+#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133
15986+#define GL_TEXTURE_4D_SGIS 0x8134
15987+#define GL_PROXY_TEXTURE_4D_SGIS 0x8135
15988+#define GL_TEXTURE_4DSIZE_SGIS 0x8136
15989+#define GL_TEXTURE_WRAP_Q_SGIS 0x8137
15990+#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138
15991+#define GL_TEXTURE_4D_BINDING_SGIS 0x814F
15992+#endif
15993+
15994+#ifndef GL_SGI_texture_color_table
15995+#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC
15996+#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD
15997+#endif
15998+
15999+#ifndef GL_EXT_cmyka
16000+#define GL_CMYK_EXT 0x800C
16001+#define GL_CMYKA_EXT 0x800D
16002+#define GL_PACK_CMYK_HINT_EXT 0x800E
16003+#define GL_UNPACK_CMYK_HINT_EXT 0x800F
16004+#endif
16005+
16006+#ifndef GL_EXT_texture_object
16007+#define GL_TEXTURE_PRIORITY_EXT 0x8066
16008+#define GL_TEXTURE_RESIDENT_EXT 0x8067
16009+#define GL_TEXTURE_1D_BINDING_EXT 0x8068
16010+#define GL_TEXTURE_2D_BINDING_EXT 0x8069
16011+#define GL_TEXTURE_3D_BINDING_EXT 0x806A
16012+#endif
16013+
16014+#ifndef GL_SGIS_detail_texture
16015+#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095
16016+#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096
16017+#define GL_LINEAR_DETAIL_SGIS 0x8097
16018+#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098
16019+#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099
16020+#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A
16021+#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B
16022+#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C
16023+#endif
16024+
16025+#ifndef GL_SGIS_sharpen_texture
16026+#define GL_LINEAR_SHARPEN_SGIS 0x80AD
16027+#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE
16028+#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF
16029+#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0
16030+#endif
16031+
16032+#ifndef GL_EXT_packed_pixels
16033+#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032
16034+#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033
16035+#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034
16036+#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035
16037+#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036
16038+#endif
16039+
16040+#ifndef GL_SGIS_texture_lod
16041+#define GL_TEXTURE_MIN_LOD_SGIS 0x813A
16042+#define GL_TEXTURE_MAX_LOD_SGIS 0x813B
16043+#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C
16044+#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D
16045+#endif
16046+
16047+#ifndef GL_SGIS_multisample
16048+#define GL_MULTISAMPLE_SGIS 0x809D
16049+#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E
16050+#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F
16051+#define GL_SAMPLE_MASK_SGIS 0x80A0
16052+#define GL_1PASS_SGIS 0x80A1
16053+#define GL_2PASS_0_SGIS 0x80A2
16054+#define GL_2PASS_1_SGIS 0x80A3
16055+#define GL_4PASS_0_SGIS 0x80A4
16056+#define GL_4PASS_1_SGIS 0x80A5
16057+#define GL_4PASS_2_SGIS 0x80A6
16058+#define GL_4PASS_3_SGIS 0x80A7
16059+#define GL_SAMPLE_BUFFERS_SGIS 0x80A8
16060+#define GL_SAMPLES_SGIS 0x80A9
16061+#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA
16062+#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB
16063+#define GL_SAMPLE_PATTERN_SGIS 0x80AC
16064+#endif
16065+
16066+#ifndef GL_EXT_rescale_normal
16067+#define GL_RESCALE_NORMAL_EXT 0x803A
16068+#endif
16069+
16070+#ifndef GL_EXT_vertex_array
16071+#define GL_VERTEX_ARRAY_EXT 0x8074
16072+#define GL_NORMAL_ARRAY_EXT 0x8075
16073+#define GL_COLOR_ARRAY_EXT 0x8076
16074+#define GL_INDEX_ARRAY_EXT 0x8077
16075+#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078
16076+#define GL_EDGE_FLAG_ARRAY_EXT 0x8079
16077+#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A
16078+#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B
16079+#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C
16080+#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D
16081+#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E
16082+#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F
16083+#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080
16084+#define GL_COLOR_ARRAY_SIZE_EXT 0x8081
16085+#define GL_COLOR_ARRAY_TYPE_EXT 0x8082
16086+#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083
16087+#define GL_COLOR_ARRAY_COUNT_EXT 0x8084
16088+#define GL_INDEX_ARRAY_TYPE_EXT 0x8085
16089+#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086
16090+#define GL_INDEX_ARRAY_COUNT_EXT 0x8087
16091+#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088
16092+#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089
16093+#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A
16094+#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B
16095+#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C
16096+#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D
16097+#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E
16098+#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F
16099+#define GL_COLOR_ARRAY_POINTER_EXT 0x8090
16100+#define GL_INDEX_ARRAY_POINTER_EXT 0x8091
16101+#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092
16102+#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093
16103+#endif
16104+
16105+#ifndef GL_EXT_misc_attribute
16106+#endif
16107+
16108+#ifndef GL_SGIS_generate_mipmap
16109+#define GL_GENERATE_MIPMAP_SGIS 0x8191
16110+#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192
16111+#endif
16112+
16113+#ifndef GL_SGIX_clipmap
16114+#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170
16115+#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171
16116+#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172
16117+#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173
16118+#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174
16119+#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175
16120+#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176
16121+#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177
16122+#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178
16123+#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D
16124+#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E
16125+#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F
16126+#endif
16127+
16128+#ifndef GL_SGIX_shadow
16129+#define GL_TEXTURE_COMPARE_SGIX 0x819A
16130+#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B
16131+#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C
16132+#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D
16133+#endif
16134+
16135+#ifndef GL_SGIS_texture_edge_clamp
16136+#define GL_CLAMP_TO_EDGE_SGIS 0x812F
16137+#endif
16138+
16139+#ifndef GL_SGIS_texture_border_clamp
16140+#define GL_CLAMP_TO_BORDER_SGIS 0x812D
16141+#endif
16142+
16143+#ifndef GL_EXT_blend_minmax
16144+#define GL_FUNC_ADD_EXT 0x8006
16145+#define GL_MIN_EXT 0x8007
16146+#define GL_MAX_EXT 0x8008
16147+#define GL_BLEND_EQUATION_EXT 0x8009
16148+#endif
16149+
16150+#ifndef GL_EXT_blend_subtract
16151+#define GL_FUNC_SUBTRACT_EXT 0x800A
16152+#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B
16153+#endif
16154+
16155+#ifndef GL_EXT_blend_logic_op
16156+#endif
16157+
16158+#ifndef GL_SGIX_interlace
16159+#define GL_INTERLACE_SGIX 0x8094
16160+#endif
16161+
16162+#ifndef GL_SGIX_pixel_tiles
16163+#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E
16164+#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F
16165+#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140
16166+#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141
16167+#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142
16168+#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143
16169+#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144
16170+#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145
16171+#endif
16172+
16173+#ifndef GL_SGIS_texture_select
16174+#define GL_DUAL_ALPHA4_SGIS 0x8110
16175+#define GL_DUAL_ALPHA8_SGIS 0x8111
16176+#define GL_DUAL_ALPHA12_SGIS 0x8112
16177+#define GL_DUAL_ALPHA16_SGIS 0x8113
16178+#define GL_DUAL_LUMINANCE4_SGIS 0x8114
16179+#define GL_DUAL_LUMINANCE8_SGIS 0x8115
16180+#define GL_DUAL_LUMINANCE12_SGIS 0x8116
16181+#define GL_DUAL_LUMINANCE16_SGIS 0x8117
16182+#define GL_DUAL_INTENSITY4_SGIS 0x8118
16183+#define GL_DUAL_INTENSITY8_SGIS 0x8119
16184+#define GL_DUAL_INTENSITY12_SGIS 0x811A
16185+#define GL_DUAL_INTENSITY16_SGIS 0x811B
16186+#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C
16187+#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D
16188+#define GL_QUAD_ALPHA4_SGIS 0x811E
16189+#define GL_QUAD_ALPHA8_SGIS 0x811F
16190+#define GL_QUAD_LUMINANCE4_SGIS 0x8120
16191+#define GL_QUAD_LUMINANCE8_SGIS 0x8121
16192+#define GL_QUAD_INTENSITY4_SGIS 0x8122
16193+#define GL_QUAD_INTENSITY8_SGIS 0x8123
16194+#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124
16195+#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125
16196+#endif
16197+
16198+#ifndef GL_SGIX_sprite
16199+#define GL_SPRITE_SGIX 0x8148
16200+#define GL_SPRITE_MODE_SGIX 0x8149
16201+#define GL_SPRITE_AXIS_SGIX 0x814A
16202+#define GL_SPRITE_TRANSLATION_SGIX 0x814B
16203+#define GL_SPRITE_AXIAL_SGIX 0x814C
16204+#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D
16205+#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E
16206+#endif
16207+
16208+#ifndef GL_SGIX_texture_multi_buffer
16209+#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E
16210+#endif
16211+
16212+#ifndef GL_EXT_point_parameters
16213+#define GL_POINT_SIZE_MIN_EXT 0x8126
16214+#define GL_POINT_SIZE_MAX_EXT 0x8127
16215+#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128
16216+#define GL_DISTANCE_ATTENUATION_EXT 0x8129
16217+#endif
16218+
16219+#ifndef GL_SGIS_point_parameters
16220+#define GL_POINT_SIZE_MIN_SGIS 0x8126
16221+#define GL_POINT_SIZE_MAX_SGIS 0x8127
16222+#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128
16223+#define GL_DISTANCE_ATTENUATION_SGIS 0x8129
16224+#endif
16225+
16226+#ifndef GL_SGIX_instruments
16227+#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180
16228+#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181
16229+#endif
16230+
16231+#ifndef GL_SGIX_texture_scale_bias
16232+#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179
16233+#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A
16234+#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B
16235+#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C
16236+#endif
16237+
16238+#ifndef GL_SGIX_framezoom
16239+#define GL_FRAMEZOOM_SGIX 0x818B
16240+#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C
16241+#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D
16242+#endif
16243+
16244+#ifndef GL_SGIX_tag_sample_buffer
16245+#endif
16246+
16247+#ifndef GL_FfdMaskSGIX
16248+#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001
16249+#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002
16250+#endif
16251+
16252+#ifndef GL_SGIX_polynomial_ffd
16253+#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194
16254+#define GL_TEXTURE_DEFORMATION_SGIX 0x8195
16255+#define GL_DEFORMATIONS_MASK_SGIX 0x8196
16256+#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197
16257+#endif
16258+
16259+#ifndef GL_SGIX_reference_plane
16260+#define GL_REFERENCE_PLANE_SGIX 0x817D
16261+#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E
16262+#endif
16263+
16264+#ifndef GL_SGIX_flush_raster
16265+#endif
16266+
16267+#ifndef GL_SGIX_depth_texture
16268+#define GL_DEPTH_COMPONENT16_SGIX 0x81A5
16269+#define GL_DEPTH_COMPONENT24_SGIX 0x81A6
16270+#define GL_DEPTH_COMPONENT32_SGIX 0x81A7
16271+#endif
16272+
16273+#ifndef GL_SGIS_fog_function
16274+#define GL_FOG_FUNC_SGIS 0x812A
16275+#define GL_FOG_FUNC_POINTS_SGIS 0x812B
16276+#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C
16277+#endif
16278+
16279+#ifndef GL_SGIX_fog_offset
16280+#define GL_FOG_OFFSET_SGIX 0x8198
16281+#define GL_FOG_OFFSET_VALUE_SGIX 0x8199
16282+#endif
16283+
16284+#ifndef GL_HP_image_transform
16285+#define GL_IMAGE_SCALE_X_HP 0x8155
16286+#define GL_IMAGE_SCALE_Y_HP 0x8156
16287+#define GL_IMAGE_TRANSLATE_X_HP 0x8157
16288+#define GL_IMAGE_TRANSLATE_Y_HP 0x8158
16289+#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159
16290+#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A
16291+#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B
16292+#define GL_IMAGE_MAG_FILTER_HP 0x815C
16293+#define GL_IMAGE_MIN_FILTER_HP 0x815D
16294+#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E
16295+#define GL_CUBIC_HP 0x815F
16296+#define GL_AVERAGE_HP 0x8160
16297+#define GL_IMAGE_TRANSFORM_2D_HP 0x8161
16298+#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162
16299+#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163
16300+#endif
16301+
16302+#ifndef GL_HP_convolution_border_modes
16303+#define GL_IGNORE_BORDER_HP 0x8150
16304+#define GL_CONSTANT_BORDER_HP 0x8151
16305+#define GL_REPLICATE_BORDER_HP 0x8153
16306+#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154
16307+#endif
16308+
16309+#ifndef GL_INGR_palette_buffer
16310+#endif
16311+
16312+#ifndef GL_SGIX_texture_add_env
16313+#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE
16314+#endif
16315+
16316+#ifndef GL_EXT_color_subtable
16317+#endif
16318+
16319+#ifndef GL_PGI_vertex_hints
16320+#define GL_VERTEX_DATA_HINT_PGI 0x1A22A
16321+#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B
16322+#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C
16323+#define GL_MAX_VERTEX_HINT_PGI 0x1A22D
16324+#define GL_COLOR3_BIT_PGI 0x00010000
16325+#define GL_COLOR4_BIT_PGI 0x00020000
16326+#define GL_EDGEFLAG_BIT_PGI 0x00040000
16327+#define GL_INDEX_BIT_PGI 0x00080000
16328+#define GL_MAT_AMBIENT_BIT_PGI 0x00100000
16329+#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000
16330+#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000
16331+#define GL_MAT_EMISSION_BIT_PGI 0x00800000
16332+#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000
16333+#define GL_MAT_SHININESS_BIT_PGI 0x02000000
16334+#define GL_MAT_SPECULAR_BIT_PGI 0x04000000
16335+#define GL_NORMAL_BIT_PGI 0x08000000
16336+#define GL_TEXCOORD1_BIT_PGI 0x10000000
16337+#define GL_TEXCOORD2_BIT_PGI 0x20000000
16338+#define GL_TEXCOORD3_BIT_PGI 0x40000000
16339+#define GL_TEXCOORD4_BIT_PGI 0x80000000
16340+#define GL_VERTEX23_BIT_PGI 0x00000004
16341+#define GL_VERTEX4_BIT_PGI 0x00000008
16342+#endif
16343+
16344+#ifndef GL_PGI_misc_hints
16345+#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8
16346+#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD
16347+#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE
16348+#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202
16349+#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203
16350+#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204
16351+#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C
16352+#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D
16353+#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E
16354+#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F
16355+#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210
16356+#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211
16357+#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216
16358+#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217
16359+#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218
16360+#define GL_FULL_STIPPLE_HINT_PGI 0x1A219
16361+#define GL_CLIP_NEAR_HINT_PGI 0x1A220
16362+#define GL_CLIP_FAR_HINT_PGI 0x1A221
16363+#define GL_WIDE_LINE_HINT_PGI 0x1A222
16364+#define GL_BACK_NORMALS_HINT_PGI 0x1A223
16365+#endif
16366+
16367+#ifndef GL_EXT_paletted_texture
16368+#define GL_COLOR_INDEX1_EXT 0x80E2
16369+#define GL_COLOR_INDEX2_EXT 0x80E3
16370+#define GL_COLOR_INDEX4_EXT 0x80E4
16371+#define GL_COLOR_INDEX8_EXT 0x80E5
16372+#define GL_COLOR_INDEX12_EXT 0x80E6
16373+#define GL_COLOR_INDEX16_EXT 0x80E7
16374+#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED
16375+#endif
16376+
16377+#ifndef GL_EXT_clip_volume_hint
16378+#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0
16379+#endif
16380+
16381+#ifndef GL_SGIX_list_priority
16382+#define GL_LIST_PRIORITY_SGIX 0x8182
16383+#endif
16384+
16385+#ifndef GL_SGIX_ir_instrument1
16386+#define GL_IR_INSTRUMENT1_SGIX 0x817F
16387+#endif
16388+
16389+#ifndef GL_SGIX_calligraphic_fragment
16390+#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183
16391+#endif
16392+
16393+#ifndef GL_SGIX_texture_lod_bias
16394+#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E
16395+#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F
16396+#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190
16397+#endif
16398+
16399+#ifndef GL_SGIX_shadow_ambient
16400+#define GL_SHADOW_AMBIENT_SGIX 0x80BF
16401+#endif
16402+
16403+#ifndef GL_EXT_index_texture
16404+#endif
16405+
16406+#ifndef GL_EXT_index_material
16407+#define GL_INDEX_MATERIAL_EXT 0x81B8
16408+#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9
16409+#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA
16410+#endif
16411+
16412+#ifndef GL_EXT_index_func
16413+#define GL_INDEX_TEST_EXT 0x81B5
16414+#define GL_INDEX_TEST_FUNC_EXT 0x81B6
16415+#define GL_INDEX_TEST_REF_EXT 0x81B7
16416+#endif
16417+
16418+#ifndef GL_EXT_index_array_formats
16419+#define GL_IUI_V2F_EXT 0x81AD
16420+#define GL_IUI_V3F_EXT 0x81AE
16421+#define GL_IUI_N3F_V2F_EXT 0x81AF
16422+#define GL_IUI_N3F_V3F_EXT 0x81B0
16423+#define GL_T2F_IUI_V2F_EXT 0x81B1
16424+#define GL_T2F_IUI_V3F_EXT 0x81B2
16425+#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3
16426+#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4
16427+#endif
16428+
16429+#ifndef GL_EXT_compiled_vertex_array
16430+#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8
16431+#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9
16432+#endif
16433+
16434+#ifndef GL_EXT_cull_vertex
16435+#define GL_CULL_VERTEX_EXT 0x81AA
16436+#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB
16437+#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC
16438+#endif
16439+
16440+#ifndef GL_SGIX_ycrcb
16441+#define GL_YCRCB_422_SGIX 0x81BB
16442+#define GL_YCRCB_444_SGIX 0x81BC
16443+#endif
16444+
16445+#ifndef GL_SGIX_fragment_lighting
16446+#define GL_FRAGMENT_LIGHTING_SGIX 0x8400
16447+#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401
16448+#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402
16449+#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403
16450+#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404
16451+#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405
16452+#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406
16453+#define GL_LIGHT_ENV_MODE_SGIX 0x8407
16454+#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408
16455+#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409
16456+#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A
16457+#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B
16458+#define GL_FRAGMENT_LIGHT0_SGIX 0x840C
16459+#define GL_FRAGMENT_LIGHT1_SGIX 0x840D
16460+#define GL_FRAGMENT_LIGHT2_SGIX 0x840E
16461+#define GL_FRAGMENT_LIGHT3_SGIX 0x840F
16462+#define GL_FRAGMENT_LIGHT4_SGIX 0x8410
16463+#define GL_FRAGMENT_LIGHT5_SGIX 0x8411
16464+#define GL_FRAGMENT_LIGHT6_SGIX 0x8412
16465+#define GL_FRAGMENT_LIGHT7_SGIX 0x8413
16466+#endif
16467+
16468+#ifndef GL_IBM_rasterpos_clip
16469+#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262
16470+#endif
16471+
16472+#ifndef GL_HP_texture_lighting
16473+#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167
16474+#define GL_TEXTURE_POST_SPECULAR_HP 0x8168
16475+#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169
16476+#endif
16477+
16478+#ifndef GL_EXT_draw_range_elements
16479+#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8
16480+#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9
16481+#endif
16482+
16483+#ifndef GL_WIN_phong_shading
16484+#define GL_PHONG_WIN 0x80EA
16485+#define GL_PHONG_HINT_WIN 0x80EB
16486+#endif
16487+
16488+#ifndef GL_WIN_specular_fog
16489+#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC
16490+#endif
16491+
16492+#ifndef GL_EXT_light_texture
16493+#define GL_FRAGMENT_MATERIAL_EXT 0x8349
16494+#define GL_FRAGMENT_NORMAL_EXT 0x834A
16495+#define GL_FRAGMENT_COLOR_EXT 0x834C
16496+#define GL_ATTENUATION_EXT 0x834D
16497+#define GL_SHADOW_ATTENUATION_EXT 0x834E
16498+#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F
16499+#define GL_TEXTURE_LIGHT_EXT 0x8350
16500+#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351
16501+#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352
16502+/* reuse GL_FRAGMENT_DEPTH_EXT */
16503+#endif
16504+
16505+#ifndef GL_SGIX_blend_alpha_minmax
16506+#define GL_ALPHA_MIN_SGIX 0x8320
16507+#define GL_ALPHA_MAX_SGIX 0x8321
16508+#endif
16509+
16510+#ifndef GL_SGIX_impact_pixel_texture
16511+#define GL_PIXEL_TEX_GEN_Q_CEILING_SGIX 0x8184
16512+#define GL_PIXEL_TEX_GEN_Q_ROUND_SGIX 0x8185
16513+#define GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX 0x8186
16514+#define GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX 0x8187
16515+#define GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX 0x8188
16516+#define GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX 0x8189
16517+#define GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX 0x818A
16518+#endif
16519+
16520+#ifndef GL_EXT_bgra
16521+#define GL_BGR_EXT 0x80E0
16522+#define GL_BGRA_EXT 0x80E1
16523+#endif
16524+
16525+#ifndef GL_SGIX_async
16526+#define GL_ASYNC_MARKER_SGIX 0x8329
16527+#endif
16528+
16529+#ifndef GL_SGIX_async_pixel
16530+#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C
16531+#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D
16532+#define GL_ASYNC_READ_PIXELS_SGIX 0x835E
16533+#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F
16534+#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360
16535+#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361
16536+#endif
16537+
16538+#ifndef GL_SGIX_async_histogram
16539+#define GL_ASYNC_HISTOGRAM_SGIX 0x832C
16540+#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D
16541+#endif
16542+
16543+#ifndef GL_INTEL_texture_scissor
16544+#endif
16545+
16546+#ifndef GL_INTEL_parallel_arrays
16547+#define GL_PARALLEL_ARRAYS_INTEL 0x83F4
16548+#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5
16549+#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6
16550+#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7
16551+#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8
16552+#endif
16553+
16554+#ifndef GL_HP_occlusion_test
16555+#define GL_OCCLUSION_TEST_HP 0x8165
16556+#define GL_OCCLUSION_TEST_RESULT_HP 0x8166
16557+#endif
16558+
16559+#ifndef GL_EXT_pixel_transform
16560+#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330
16561+#define GL_PIXEL_MAG_FILTER_EXT 0x8331
16562+#define GL_PIXEL_MIN_FILTER_EXT 0x8332
16563+#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333
16564+#define GL_CUBIC_EXT 0x8334
16565+#define GL_AVERAGE_EXT 0x8335
16566+#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336
16567+#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337
16568+#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338
16569+#endif
16570+
16571+#ifndef GL_EXT_pixel_transform_color_table
16572+#endif
16573+
16574+#ifndef GL_EXT_shared_texture_palette
16575+#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB
16576+#endif
16577+
16578+#ifndef GL_EXT_separate_specular_color
16579+#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8
16580+#define GL_SINGLE_COLOR_EXT 0x81F9
16581+#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA
16582+#endif
16583+
16584+#ifndef GL_EXT_secondary_color
16585+#define GL_COLOR_SUM_EXT 0x8458
16586+#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459
16587+#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A
16588+#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B
16589+#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C
16590+#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D
16591+#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E
16592+#endif
16593+
16594+#ifndef GL_EXT_texture_perturb_normal
16595+#define GL_PERTURB_EXT 0x85AE
16596+#define GL_TEXTURE_NORMAL_EXT 0x85AF
16597+#endif
16598+
16599+#ifndef GL_EXT_multi_draw_arrays
16600+#endif
16601+
16602+#ifndef GL_EXT_fog_coord
16603+#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450
16604+#define GL_FOG_COORDINATE_EXT 0x8451
16605+#define GL_FRAGMENT_DEPTH_EXT 0x8452
16606+#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453
16607+#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454
16608+#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455
16609+#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456
16610+#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457
16611+#endif
16612+
16613+#ifndef GL_REND_screen_coordinates
16614+#define GL_SCREEN_COORDINATES_REND 0x8490
16615+#define GL_INVERTED_SCREEN_W_REND 0x8491
16616+#endif
16617+
16618+#ifndef GL_EXT_coordinate_frame
16619+#define GL_TANGENT_ARRAY_EXT 0x8439
16620+#define GL_BINORMAL_ARRAY_EXT 0x843A
16621+#define GL_CURRENT_TANGENT_EXT 0x843B
16622+#define GL_CURRENT_BINORMAL_EXT 0x843C
16623+#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E
16624+#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F
16625+#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440
16626+#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441
16627+#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442
16628+#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443
16629+#define GL_MAP1_TANGENT_EXT 0x8444
16630+#define GL_MAP2_TANGENT_EXT 0x8445
16631+#define GL_MAP1_BINORMAL_EXT 0x8446
16632+#define GL_MAP2_BINORMAL_EXT 0x8447
16633+#endif
16634+
16635+#ifndef GL_EXT_texture_env_combine
16636+#define GL_COMBINE_EXT 0x8570
16637+#define GL_COMBINE_RGB_EXT 0x8571
16638+#define GL_COMBINE_ALPHA_EXT 0x8572
16639+#define GL_RGB_SCALE_EXT 0x8573
16640+#define GL_ADD_SIGNED_EXT 0x8574
16641+#define GL_INTERPOLATE_EXT 0x8575
16642+#define GL_CONSTANT_EXT 0x8576
16643+#define GL_PRIMARY_COLOR_EXT 0x8577
16644+#define GL_PREVIOUS_EXT 0x8578
16645+#define GL_SOURCE0_RGB_EXT 0x8580
16646+#define GL_SOURCE1_RGB_EXT 0x8581
16647+#define GL_SOURCE2_RGB_EXT 0x8582
16648+#define GL_SOURCE0_ALPHA_EXT 0x8588
16649+#define GL_SOURCE1_ALPHA_EXT 0x8589
16650+#define GL_SOURCE2_ALPHA_EXT 0x858A
16651+#define GL_OPERAND0_RGB_EXT 0x8590
16652+#define GL_OPERAND1_RGB_EXT 0x8591
16653+#define GL_OPERAND2_RGB_EXT 0x8592
16654+#define GL_OPERAND0_ALPHA_EXT 0x8598
16655+#define GL_OPERAND1_ALPHA_EXT 0x8599
16656+#define GL_OPERAND2_ALPHA_EXT 0x859A
16657+#endif
16658+
16659+#ifndef GL_APPLE_specular_vector
16660+#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0
16661+#endif
16662+
16663+#ifndef GL_APPLE_transform_hint
16664+#define GL_TRANSFORM_HINT_APPLE 0x85B1
16665+#endif
16666+
16667+#ifndef GL_SGIX_fog_scale
16668+#define GL_FOG_SCALE_SGIX 0x81FC
16669+#define GL_FOG_SCALE_VALUE_SGIX 0x81FD
16670+#endif
16671+
16672+#ifndef GL_SUNX_constant_data
16673+#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5
16674+#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6
16675+#endif
16676+
16677+#ifndef GL_SUN_global_alpha
16678+#define GL_GLOBAL_ALPHA_SUN 0x81D9
16679+#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA
16680+#endif
16681+
16682+#ifndef GL_SUN_triangle_list
16683+#define GL_RESTART_SUN 0x0001
16684+#define GL_REPLACE_MIDDLE_SUN 0x0002
16685+#define GL_REPLACE_OLDEST_SUN 0x0003
16686+#define GL_TRIANGLE_LIST_SUN 0x81D7
16687+#define GL_REPLACEMENT_CODE_SUN 0x81D8
16688+#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0
16689+#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1
16690+#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2
16691+#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3
16692+#define GL_R1UI_V3F_SUN 0x85C4
16693+#define GL_R1UI_C4UB_V3F_SUN 0x85C5
16694+#define GL_R1UI_C3F_V3F_SUN 0x85C6
16695+#define GL_R1UI_N3F_V3F_SUN 0x85C7
16696+#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8
16697+#define GL_R1UI_T2F_V3F_SUN 0x85C9
16698+#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA
16699+#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB
16700+#endif
16701+
16702+#ifndef GL_SUN_vertex
16703+#endif
16704+
16705+#ifndef GL_EXT_blend_func_separate
16706+#define GL_BLEND_DST_RGB_EXT 0x80C8
16707+#define GL_BLEND_SRC_RGB_EXT 0x80C9
16708+#define GL_BLEND_DST_ALPHA_EXT 0x80CA
16709+#define GL_BLEND_SRC_ALPHA_EXT 0x80CB
16710+#endif
16711+
16712+#ifndef GL_INGR_color_clamp
16713+#define GL_RED_MIN_CLAMP_INGR 0x8560
16714+#define GL_GREEN_MIN_CLAMP_INGR 0x8561
16715+#define GL_BLUE_MIN_CLAMP_INGR 0x8562
16716+#define GL_ALPHA_MIN_CLAMP_INGR 0x8563
16717+#define GL_RED_MAX_CLAMP_INGR 0x8564
16718+#define GL_GREEN_MAX_CLAMP_INGR 0x8565
16719+#define GL_BLUE_MAX_CLAMP_INGR 0x8566
16720+#define GL_ALPHA_MAX_CLAMP_INGR 0x8567
16721+#endif
16722+
16723+#ifndef GL_INGR_interlace_read
16724+#define GL_INTERLACE_READ_INGR 0x8568
16725+#endif
16726+
16727+#ifndef GL_EXT_stencil_wrap
16728+#define GL_INCR_WRAP_EXT 0x8507
16729+#define GL_DECR_WRAP_EXT 0x8508
16730+#endif
16731+
16732+#ifndef GL_EXT_422_pixels
16733+#define GL_422_EXT 0x80CC
16734+#define GL_422_REV_EXT 0x80CD
16735+#define GL_422_AVERAGE_EXT 0x80CE
16736+#define GL_422_REV_AVERAGE_EXT 0x80CF
16737+#endif
16738+
16739+#ifndef GL_NV_texgen_reflection
16740+#define GL_NORMAL_MAP_NV 0x8511
16741+#define GL_REFLECTION_MAP_NV 0x8512
16742+#endif
16743+
16744+#ifndef GL_EXT_texture_cube_map
16745+#define GL_NORMAL_MAP_EXT 0x8511
16746+#define GL_REFLECTION_MAP_EXT 0x8512
16747+#define GL_TEXTURE_CUBE_MAP_EXT 0x8513
16748+#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514
16749+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515
16750+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516
16751+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517
16752+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518
16753+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519
16754+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A
16755+#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B
16756+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C
16757+#endif
16758+
16759+#ifndef GL_SUN_convolution_border_modes
16760+#define GL_WRAP_BORDER_SUN 0x81D4
16761+#endif
16762+
16763+#ifndef GL_EXT_texture_env_add
16764+#endif
16765+
16766+#ifndef GL_EXT_texture_lod_bias
16767+#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD
16768+#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500
16769+#define GL_TEXTURE_LOD_BIAS_EXT 0x8501
16770+#endif
16771+
16772+#ifndef GL_EXT_texture_filter_anisotropic
16773+#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
16774+#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
16775+#endif
16776+
16777+#ifndef GL_EXT_vertex_weighting
16778+#define GL_MODELVIEW0_STACK_DEPTH_EXT GL_MODELVIEW_STACK_DEPTH
16779+#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502
16780+#define GL_MODELVIEW0_MATRIX_EXT GL_MODELVIEW_MATRIX
16781+#define GL_MODELVIEW1_MATRIX_EXT 0x8506
16782+#define GL_VERTEX_WEIGHTING_EXT 0x8509
16783+#define GL_MODELVIEW0_EXT GL_MODELVIEW
16784+#define GL_MODELVIEW1_EXT 0x850A
16785+#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B
16786+#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C
16787+#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D
16788+#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E
16789+#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F
16790+#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510
16791+#endif
16792+
16793+#ifndef GL_NV_light_max_exponent
16794+#define GL_MAX_SHININESS_NV 0x8504
16795+#define GL_MAX_SPOT_EXPONENT_NV 0x8505
16796+#endif
16797+
16798+#ifndef GL_NV_vertex_array_range
16799+#define GL_VERTEX_ARRAY_RANGE_NV 0x851D
16800+#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E
16801+#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F
16802+#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520
16803+#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521
16804+#endif
16805+
16806+#ifndef GL_NV_register_combiners
16807+#define GL_REGISTER_COMBINERS_NV 0x8522
16808+#define GL_VARIABLE_A_NV 0x8523
16809+#define GL_VARIABLE_B_NV 0x8524
16810+#define GL_VARIABLE_C_NV 0x8525
16811+#define GL_VARIABLE_D_NV 0x8526
16812+#define GL_VARIABLE_E_NV 0x8527
16813+#define GL_VARIABLE_F_NV 0x8528
16814+#define GL_VARIABLE_G_NV 0x8529
16815+#define GL_CONSTANT_COLOR0_NV 0x852A
16816+#define GL_CONSTANT_COLOR1_NV 0x852B
16817+#define GL_PRIMARY_COLOR_NV 0x852C
16818+#define GL_SECONDARY_COLOR_NV 0x852D
16819+#define GL_SPARE0_NV 0x852E
16820+#define GL_SPARE1_NV 0x852F
16821+#define GL_DISCARD_NV 0x8530
16822+#define GL_E_TIMES_F_NV 0x8531
16823+#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532
16824+#define GL_UNSIGNED_IDENTITY_NV 0x8536
16825+#define GL_UNSIGNED_INVERT_NV 0x8537
16826+#define GL_EXPAND_NORMAL_NV 0x8538
16827+#define GL_EXPAND_NEGATE_NV 0x8539
16828+#define GL_HALF_BIAS_NORMAL_NV 0x853A
16829+#define GL_HALF_BIAS_NEGATE_NV 0x853B
16830+#define GL_SIGNED_IDENTITY_NV 0x853C
16831+#define GL_SIGNED_NEGATE_NV 0x853D
16832+#define GL_SCALE_BY_TWO_NV 0x853E
16833+#define GL_SCALE_BY_FOUR_NV 0x853F
16834+#define GL_SCALE_BY_ONE_HALF_NV 0x8540
16835+#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541
16836+#define GL_COMBINER_INPUT_NV 0x8542
16837+#define GL_COMBINER_MAPPING_NV 0x8543
16838+#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544
16839+#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545
16840+#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546
16841+#define GL_COMBINER_MUX_SUM_NV 0x8547
16842+#define GL_COMBINER_SCALE_NV 0x8548
16843+#define GL_COMBINER_BIAS_NV 0x8549
16844+#define GL_COMBINER_AB_OUTPUT_NV 0x854A
16845+#define GL_COMBINER_CD_OUTPUT_NV 0x854B
16846+#define GL_COMBINER_SUM_OUTPUT_NV 0x854C
16847+#define GL_MAX_GENERAL_COMBINERS_NV 0x854D
16848+#define GL_NUM_GENERAL_COMBINERS_NV 0x854E
16849+#define GL_COLOR_SUM_CLAMP_NV 0x854F
16850+#define GL_COMBINER0_NV 0x8550
16851+#define GL_COMBINER1_NV 0x8551
16852+#define GL_COMBINER2_NV 0x8552
16853+#define GL_COMBINER3_NV 0x8553
16854+#define GL_COMBINER4_NV 0x8554
16855+#define GL_COMBINER5_NV 0x8555
16856+#define GL_COMBINER6_NV 0x8556
16857+#define GL_COMBINER7_NV 0x8557
16858+/* reuse GL_TEXTURE0_ARB */
16859+/* reuse GL_TEXTURE1_ARB */
16860+/* reuse GL_ZERO */
16861+/* reuse GL_NONE */
16862+/* reuse GL_FOG */
16863+#endif
16864+
16865+#ifndef GL_NV_fog_distance
16866+#define GL_FOG_DISTANCE_MODE_NV 0x855A
16867+#define GL_EYE_RADIAL_NV 0x855B
16868+#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C
16869+/* reuse GL_EYE_PLANE */
16870+#endif
16871+
16872+#ifndef GL_NV_texgen_emboss
16873+#define GL_EMBOSS_LIGHT_NV 0x855D
16874+#define GL_EMBOSS_CONSTANT_NV 0x855E
16875+#define GL_EMBOSS_MAP_NV 0x855F
16876+#endif
16877+
16878+#ifndef GL_NV_blend_square
16879+#endif
16880+
16881+#ifndef GL_NV_texture_env_combine4
16882+#define GL_COMBINE4_NV 0x8503
16883+#define GL_SOURCE3_RGB_NV 0x8583
16884+#define GL_SOURCE3_ALPHA_NV 0x858B
16885+#define GL_OPERAND3_RGB_NV 0x8593
16886+#define GL_OPERAND3_ALPHA_NV 0x859B
16887+#endif
16888+
16889+#ifndef GL_MESA_resize_buffers
16890+#endif
16891+
16892+#ifndef GL_MESA_window_pos
16893+#endif
16894+
16895+#ifndef GL_EXT_texture_compression_s3tc
16896+#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
16897+#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
16898+#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
16899+#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
16900+#endif
16901+
16902+#ifndef GL_IBM_cull_vertex
16903+#define GL_CULL_VERTEX_IBM 103050
16904+#endif
16905+
16906+#ifndef GL_IBM_multimode_draw_arrays
16907+#endif
16908+
16909+#ifndef GL_IBM_vertex_array_lists
16910+#define GL_VERTEX_ARRAY_LIST_IBM 103070
16911+#define GL_NORMAL_ARRAY_LIST_IBM 103071
16912+#define GL_COLOR_ARRAY_LIST_IBM 103072
16913+#define GL_INDEX_ARRAY_LIST_IBM 103073
16914+#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074
16915+#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075
16916+#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076
16917+#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077
16918+#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080
16919+#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081
16920+#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082
16921+#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083
16922+#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084
16923+#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085
16924+#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086
16925+#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087
16926+#endif
16927+
16928+#ifndef GL_SGIX_subsample
16929+#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0
16930+#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1
16931+#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2
16932+#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3
16933+#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4
16934+#endif
16935+
16936+#ifndef GL_SGIX_ycrcb_subsample
16937+#endif
16938+
16939+#ifndef GL_SGIX_ycrcba
16940+#define GL_YCRCB_SGIX 0x8318
16941+#define GL_YCRCBA_SGIX 0x8319
16942+#endif
16943+
16944+#ifndef GL_SGI_depth_pass_instrument
16945+#define GL_DEPTH_PASS_INSTRUMENT_SGIX 0x8310
16946+#define GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX 0x8311
16947+#define GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX 0x8312
16948+#endif
16949+
16950+#ifndef GL_3DFX_texture_compression_FXT1
16951+#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0
16952+#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1
16953+#endif
16954+
16955+#ifndef GL_3DFX_multisample
16956+#define GL_MULTISAMPLE_3DFX 0x86B2
16957+#define GL_SAMPLE_BUFFERS_3DFX 0x86B3
16958+#define GL_SAMPLES_3DFX 0x86B4
16959+#define GL_MULTISAMPLE_BIT_3DFX 0x20000000
16960+#endif
16961+
16962+#ifndef GL_3DFX_tbuffer
16963+#endif
16964+
16965+#ifndef GL_EXT_multisample
16966+#define GL_MULTISAMPLE_EXT 0x809D
16967+#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E
16968+#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F
16969+#define GL_SAMPLE_MASK_EXT 0x80A0
16970+#define GL_1PASS_EXT 0x80A1
16971+#define GL_2PASS_0_EXT 0x80A2
16972+#define GL_2PASS_1_EXT 0x80A3
16973+#define GL_4PASS_0_EXT 0x80A4
16974+#define GL_4PASS_1_EXT 0x80A5
16975+#define GL_4PASS_2_EXT 0x80A6
16976+#define GL_4PASS_3_EXT 0x80A7
16977+#define GL_SAMPLE_BUFFERS_EXT 0x80A8
16978+#define GL_SAMPLES_EXT 0x80A9
16979+#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA
16980+#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB
16981+#define GL_SAMPLE_PATTERN_EXT 0x80AC
16982+#define GL_MULTISAMPLE_BIT_EXT 0x20000000
16983+#endif
16984+
16985+#ifndef GL_SGIX_vertex_preclip
16986+#define GL_VERTEX_PRECLIP_SGIX 0x83EE
16987+#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF
16988+#endif
16989+
16990+#ifndef GL_SGIX_convolution_accuracy
16991+#define GL_CONVOLUTION_HINT_SGIX 0x8316
16992+#endif
16993+
16994+#ifndef GL_SGIX_resample
16995+#define GL_PACK_RESAMPLE_SGIX 0x842C
16996+#define GL_UNPACK_RESAMPLE_SGIX 0x842D
16997+#define GL_RESAMPLE_REPLICATE_SGIX 0x842E
16998+#define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F
16999+#define GL_RESAMPLE_DECIMATE_SGIX 0x8430
17000+#endif
17001+
17002+#ifndef GL_SGIS_point_line_texgen
17003+#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0
17004+#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1
17005+#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2
17006+#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3
17007+#define GL_EYE_POINT_SGIS 0x81F4
17008+#define GL_OBJECT_POINT_SGIS 0x81F5
17009+#define GL_EYE_LINE_SGIS 0x81F6
17010+#define GL_OBJECT_LINE_SGIS 0x81F7
17011+#endif
17012+
17013+#ifndef GL_SGIS_texture_color_mask
17014+#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF
17015+#endif
17016+
17017+#ifndef GL_EXT_texture_env_dot3
17018+#define GL_DOT3_RGB_EXT 0x8740
17019+#define GL_DOT3_RGBA_EXT 0x8741
17020+#endif
17021+
17022+#ifndef GL_ATI_texture_mirror_once
17023+#define GL_MIRROR_CLAMP_ATI 0x8742
17024+#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743
17025+#endif
17026+
17027+#ifndef GL_NV_fence
17028+#define GL_ALL_COMPLETED_NV 0x84F2
17029+#define GL_FENCE_STATUS_NV 0x84F3
17030+#define GL_FENCE_CONDITION_NV 0x84F4
17031+#endif
17032+
17033+#ifndef GL_IBM_texture_mirrored_repeat
17034+#define GL_MIRRORED_REPEAT_IBM 0x8370
17035+#endif
17036+
17037+#ifndef GL_NV_evaluators
17038+#define GL_EVAL_2D_NV 0x86C0
17039+#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1
17040+#define GL_MAP_TESSELLATION_NV 0x86C2
17041+#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3
17042+#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4
17043+#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5
17044+#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6
17045+#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7
17046+#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8
17047+#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9
17048+#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA
17049+#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB
17050+#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC
17051+#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD
17052+#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE
17053+#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF
17054+#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0
17055+#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1
17056+#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2
17057+#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3
17058+#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4
17059+#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5
17060+#define GL_MAX_MAP_TESSELLATION_NV 0x86D6
17061+#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7
17062+#endif
17063+
17064+#ifndef GL_NV_packed_depth_stencil
17065+#define GL_DEPTH_STENCIL_NV 0x84F9
17066+#define GL_UNSIGNED_INT_24_8_NV 0x84FA
17067+#endif
17068+
17069+#ifndef GL_NV_register_combiners2
17070+#define GL_PER_STAGE_CONSTANTS_NV 0x8535
17071+#endif
17072+
17073+#ifndef GL_NV_texture_compression_vtc
17074+#endif
17075+
17076+#ifndef GL_NV_texture_rectangle
17077+#define GL_TEXTURE_RECTANGLE_NV 0x84F5
17078+#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6
17079+#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7
17080+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8
17081+#endif
17082+
17083+#ifndef GL_NV_texture_shader
17084+#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C
17085+#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D
17086+#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E
17087+#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9
17088+#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA
17089+#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB
17090+#define GL_DSDT_MAG_INTENSITY_NV 0x86DC
17091+#define GL_SHADER_CONSISTENT_NV 0x86DD
17092+#define GL_TEXTURE_SHADER_NV 0x86DE
17093+#define GL_SHADER_OPERATION_NV 0x86DF
17094+#define GL_CULL_MODES_NV 0x86E0
17095+#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1
17096+#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2
17097+#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3
17098+#define GL_OFFSET_TEXTURE_2D_MATRIX_NV GL_OFFSET_TEXTURE_MATRIX_NV
17099+#define GL_OFFSET_TEXTURE_2D_SCALE_NV GL_OFFSET_TEXTURE_SCALE_NV
17100+#define GL_OFFSET_TEXTURE_2D_BIAS_NV GL_OFFSET_TEXTURE_BIAS_NV
17101+#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4
17102+#define GL_CONST_EYE_NV 0x86E5
17103+#define GL_PASS_THROUGH_NV 0x86E6
17104+#define GL_CULL_FRAGMENT_NV 0x86E7
17105+#define GL_OFFSET_TEXTURE_2D_NV 0x86E8
17106+#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9
17107+#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA
17108+#define GL_DOT_PRODUCT_NV 0x86EC
17109+#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED
17110+#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE
17111+#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0
17112+#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1
17113+#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2
17114+#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3
17115+#define GL_HILO_NV 0x86F4
17116+#define GL_DSDT_NV 0x86F5
17117+#define GL_DSDT_MAG_NV 0x86F6
17118+#define GL_DSDT_MAG_VIB_NV 0x86F7
17119+#define GL_HILO16_NV 0x86F8
17120+#define GL_SIGNED_HILO_NV 0x86F9
17121+#define GL_SIGNED_HILO16_NV 0x86FA
17122+#define GL_SIGNED_RGBA_NV 0x86FB
17123+#define GL_SIGNED_RGBA8_NV 0x86FC
17124+#define GL_SIGNED_RGB_NV 0x86FE
17125+#define GL_SIGNED_RGB8_NV 0x86FF
17126+#define GL_SIGNED_LUMINANCE_NV 0x8701
17127+#define GL_SIGNED_LUMINANCE8_NV 0x8702
17128+#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703
17129+#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704
17130+#define GL_SIGNED_ALPHA_NV 0x8705
17131+#define GL_SIGNED_ALPHA8_NV 0x8706
17132+#define GL_SIGNED_INTENSITY_NV 0x8707
17133+#define GL_SIGNED_INTENSITY8_NV 0x8708
17134+#define GL_DSDT8_NV 0x8709
17135+#define GL_DSDT8_MAG8_NV 0x870A
17136+#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B
17137+#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C
17138+#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D
17139+#define GL_HI_SCALE_NV 0x870E
17140+#define GL_LO_SCALE_NV 0x870F
17141+#define GL_DS_SCALE_NV 0x8710
17142+#define GL_DT_SCALE_NV 0x8711
17143+#define GL_MAGNITUDE_SCALE_NV 0x8712
17144+#define GL_VIBRANCE_SCALE_NV 0x8713
17145+#define GL_HI_BIAS_NV 0x8714
17146+#define GL_LO_BIAS_NV 0x8715
17147+#define GL_DS_BIAS_NV 0x8716
17148+#define GL_DT_BIAS_NV 0x8717
17149+#define GL_MAGNITUDE_BIAS_NV 0x8718
17150+#define GL_VIBRANCE_BIAS_NV 0x8719
17151+#define GL_TEXTURE_BORDER_VALUES_NV 0x871A
17152+#define GL_TEXTURE_HI_SIZE_NV 0x871B
17153+#define GL_TEXTURE_LO_SIZE_NV 0x871C
17154+#define GL_TEXTURE_DS_SIZE_NV 0x871D
17155+#define GL_TEXTURE_DT_SIZE_NV 0x871E
17156+#define GL_TEXTURE_MAG_SIZE_NV 0x871F
17157+#endif
17158+
17159+#ifndef GL_NV_texture_shader2
17160+#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF
17161+#endif
17162+
17163+#ifndef GL_NV_vertex_array_range2
17164+#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533
17165+#endif
17166+
17167+#ifndef GL_NV_vertex_program
17168+#define GL_VERTEX_PROGRAM_NV 0x8620
17169+#define GL_VERTEX_STATE_PROGRAM_NV 0x8621
17170+#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623
17171+#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624
17172+#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625
17173+#define GL_CURRENT_ATTRIB_NV 0x8626
17174+#define GL_PROGRAM_LENGTH_NV 0x8627
17175+#define GL_PROGRAM_STRING_NV 0x8628
17176+#define GL_MODELVIEW_PROJECTION_NV 0x8629
17177+#define GL_IDENTITY_NV 0x862A
17178+#define GL_INVERSE_NV 0x862B
17179+#define GL_TRANSPOSE_NV 0x862C
17180+#define GL_INVERSE_TRANSPOSE_NV 0x862D
17181+#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E
17182+#define GL_MAX_TRACK_MATRICES_NV 0x862F
17183+#define GL_MATRIX0_NV 0x8630
17184+#define GL_MATRIX1_NV 0x8631
17185+#define GL_MATRIX2_NV 0x8632
17186+#define GL_MATRIX3_NV 0x8633
17187+#define GL_MATRIX4_NV 0x8634
17188+#define GL_MATRIX5_NV 0x8635
17189+#define GL_MATRIX6_NV 0x8636
17190+#define GL_MATRIX7_NV 0x8637
17191+#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640
17192+#define GL_CURRENT_MATRIX_NV 0x8641
17193+#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642
17194+#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643
17195+#define GL_PROGRAM_PARAMETER_NV 0x8644
17196+#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645
17197+#define GL_PROGRAM_TARGET_NV 0x8646
17198+#define GL_PROGRAM_RESIDENT_NV 0x8647
17199+#define GL_TRACK_MATRIX_NV 0x8648
17200+#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649
17201+#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A
17202+#define GL_PROGRAM_ERROR_POSITION_NV 0x864B
17203+#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650
17204+#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651
17205+#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652
17206+#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653
17207+#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654
17208+#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655
17209+#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656
17210+#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657
17211+#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658
17212+#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659
17213+#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A
17214+#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B
17215+#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C
17216+#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D
17217+#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E
17218+#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F
17219+#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660
17220+#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661
17221+#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662
17222+#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663
17223+#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664
17224+#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665
17225+#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666
17226+#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667
17227+#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668
17228+#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669
17229+#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A
17230+#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B
17231+#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C
17232+#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D
17233+#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E
17234+#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F
17235+#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670
17236+#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671
17237+#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672
17238+#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673
17239+#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674
17240+#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675
17241+#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676
17242+#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677
17243+#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678
17244+#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679
17245+#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A
17246+#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B
17247+#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C
17248+#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D
17249+#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E
17250+#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F
17251+#endif
17252+
17253+#ifndef GL_SGIX_texture_coordinate_clamp
17254+#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369
17255+#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A
17256+#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B
17257+#endif
17258+
17259+#ifndef GL_SGIX_scalebias_hint
17260+#define GL_SCALEBIAS_HINT_SGIX 0x8322
17261+#endif
17262+
17263+#ifndef GL_OML_interlace
17264+#define GL_INTERLACE_OML 0x8980
17265+#define GL_INTERLACE_READ_OML 0x8981
17266+#endif
17267+
17268+#ifndef GL_OML_subsample
17269+#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982
17270+#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983
17271+#endif
17272+
17273+#ifndef GL_OML_resample
17274+#define GL_PACK_RESAMPLE_OML 0x8984
17275+#define GL_UNPACK_RESAMPLE_OML 0x8985
17276+#define GL_RESAMPLE_REPLICATE_OML 0x8986
17277+#define GL_RESAMPLE_ZERO_FILL_OML 0x8987
17278+#define GL_RESAMPLE_AVERAGE_OML 0x8988
17279+#define GL_RESAMPLE_DECIMATE_OML 0x8989
17280+#endif
17281+
17282+#ifndef GL_NV_copy_depth_to_color
17283+#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E
17284+#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F
17285+#endif
17286+
17287+#ifndef GL_ATI_envmap_bumpmap
17288+#define GL_BUMP_ROT_MATRIX_ATI 0x8775
17289+#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776
17290+#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777
17291+#define GL_BUMP_TEX_UNITS_ATI 0x8778
17292+#define GL_DUDV_ATI 0x8779
17293+#define GL_DU8DV8_ATI 0x877A
17294+#define GL_BUMP_ENVMAP_ATI 0x877B
17295+#define GL_BUMP_TARGET_ATI 0x877C
17296+#endif
17297+
17298+#ifndef GL_ATI_fragment_shader
17299+#define GL_FRAGMENT_SHADER_ATI 0x8920
17300+#define GL_REG_0_ATI 0x8921
17301+#define GL_REG_1_ATI 0x8922
17302+#define GL_REG_2_ATI 0x8923
17303+#define GL_REG_3_ATI 0x8924
17304+#define GL_REG_4_ATI 0x8925
17305+#define GL_REG_5_ATI 0x8926
17306+#define GL_REG_6_ATI 0x8927
17307+#define GL_REG_7_ATI 0x8928
17308+#define GL_REG_8_ATI 0x8929
17309+#define GL_REG_9_ATI 0x892A
17310+#define GL_REG_10_ATI 0x892B
17311+#define GL_REG_11_ATI 0x892C
17312+#define GL_REG_12_ATI 0x892D
17313+#define GL_REG_13_ATI 0x892E
17314+#define GL_REG_14_ATI 0x892F
17315+#define GL_REG_15_ATI 0x8930
17316+#define GL_REG_16_ATI 0x8931
17317+#define GL_REG_17_ATI 0x8932
17318+#define GL_REG_18_ATI 0x8933
17319+#define GL_REG_19_ATI 0x8934
17320+#define GL_REG_20_ATI 0x8935
17321+#define GL_REG_21_ATI 0x8936
17322+#define GL_REG_22_ATI 0x8937
17323+#define GL_REG_23_ATI 0x8938
17324+#define GL_REG_24_ATI 0x8939
17325+#define GL_REG_25_ATI 0x893A
17326+#define GL_REG_26_ATI 0x893B
17327+#define GL_REG_27_ATI 0x893C
17328+#define GL_REG_28_ATI 0x893D
17329+#define GL_REG_29_ATI 0x893E
17330+#define GL_REG_30_ATI 0x893F
17331+#define GL_REG_31_ATI 0x8940
17332+#define GL_CON_0_ATI 0x8941
17333+#define GL_CON_1_ATI 0x8942
17334+#define GL_CON_2_ATI 0x8943
17335+#define GL_CON_3_ATI 0x8944
17336+#define GL_CON_4_ATI 0x8945
17337+#define GL_CON_5_ATI 0x8946
17338+#define GL_CON_6_ATI 0x8947
17339+#define GL_CON_7_ATI 0x8948
17340+#define GL_CON_8_ATI 0x8949
17341+#define GL_CON_9_ATI 0x894A
17342+#define GL_CON_10_ATI 0x894B
17343+#define GL_CON_11_ATI 0x894C
17344+#define GL_CON_12_ATI 0x894D
17345+#define GL_CON_13_ATI 0x894E
17346+#define GL_CON_14_ATI 0x894F
17347+#define GL_CON_15_ATI 0x8950
17348+#define GL_CON_16_ATI 0x8951
17349+#define GL_CON_17_ATI 0x8952
17350+#define GL_CON_18_ATI 0x8953
17351+#define GL_CON_19_ATI 0x8954
17352+#define GL_CON_20_ATI 0x8955
17353+#define GL_CON_21_ATI 0x8956
17354+#define GL_CON_22_ATI 0x8957
17355+#define GL_CON_23_ATI 0x8958
17356+#define GL_CON_24_ATI 0x8959
17357+#define GL_CON_25_ATI 0x895A
17358+#define GL_CON_26_ATI 0x895B
17359+#define GL_CON_27_ATI 0x895C
17360+#define GL_CON_28_ATI 0x895D
17361+#define GL_CON_29_ATI 0x895E
17362+#define GL_CON_30_ATI 0x895F
17363+#define GL_CON_31_ATI 0x8960
17364+#define GL_MOV_ATI 0x8961
17365+#define GL_ADD_ATI 0x8963
17366+#define GL_MUL_ATI 0x8964
17367+#define GL_SUB_ATI 0x8965
17368+#define GL_DOT3_ATI 0x8966
17369+#define GL_DOT4_ATI 0x8967
17370+#define GL_MAD_ATI 0x8968
17371+#define GL_LERP_ATI 0x8969
17372+#define GL_CND_ATI 0x896A
17373+#define GL_CND0_ATI 0x896B
17374+#define GL_DOT2_ADD_ATI 0x896C
17375+#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D
17376+#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E
17377+#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F
17378+#define GL_NUM_PASSES_ATI 0x8970
17379+#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971
17380+#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972
17381+#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973
17382+#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974
17383+#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975
17384+#define GL_SWIZZLE_STR_ATI 0x8976
17385+#define GL_SWIZZLE_STQ_ATI 0x8977
17386+#define GL_SWIZZLE_STR_DR_ATI 0x8978
17387+#define GL_SWIZZLE_STQ_DQ_ATI 0x8979
17388+#define GL_SWIZZLE_STRQ_ATI 0x897A
17389+#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B
17390+#define GL_RED_BIT_ATI 0x00000001
17391+#define GL_GREEN_BIT_ATI 0x00000002
17392+#define GL_BLUE_BIT_ATI 0x00000004
17393+#define GL_2X_BIT_ATI 0x00000001
17394+#define GL_4X_BIT_ATI 0x00000002
17395+#define GL_8X_BIT_ATI 0x00000004
17396+#define GL_HALF_BIT_ATI 0x00000008
17397+#define GL_QUARTER_BIT_ATI 0x00000010
17398+#define GL_EIGHTH_BIT_ATI 0x00000020
17399+#define GL_SATURATE_BIT_ATI 0x00000040
17400+#define GL_COMP_BIT_ATI 0x00000002
17401+#define GL_NEGATE_BIT_ATI 0x00000004
17402+#define GL_BIAS_BIT_ATI 0x00000008
17403+#endif
17404+
17405+#ifndef GL_ATI_pn_triangles
17406+#define GL_PN_TRIANGLES_ATI 0x87F0
17407+#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1
17408+#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2
17409+#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3
17410+#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4
17411+#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5
17412+#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6
17413+#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7
17414+#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8
17415+#endif
17416+
17417+#ifndef GL_ATI_vertex_array_object
17418+#define GL_STATIC_ATI 0x8760
17419+#define GL_DYNAMIC_ATI 0x8761
17420+#define GL_PRESERVE_ATI 0x8762
17421+#define GL_DISCARD_ATI 0x8763
17422+#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764
17423+#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765
17424+#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766
17425+#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767
17426+#endif
17427+
17428+#ifndef GL_EXT_vertex_shader
17429+#define GL_VERTEX_SHADER_EXT 0x8780
17430+#define GL_VERTEX_SHADER_BINDING_EXT 0x8781
17431+#define GL_OP_INDEX_EXT 0x8782
17432+#define GL_OP_NEGATE_EXT 0x8783
17433+#define GL_OP_DOT3_EXT 0x8784
17434+#define GL_OP_DOT4_EXT 0x8785
17435+#define GL_OP_MUL_EXT 0x8786
17436+#define GL_OP_ADD_EXT 0x8787
17437+#define GL_OP_MADD_EXT 0x8788
17438+#define GL_OP_FRAC_EXT 0x8789
17439+#define GL_OP_MAX_EXT 0x878A
17440+#define GL_OP_MIN_EXT 0x878B
17441+#define GL_OP_SET_GE_EXT 0x878C
17442+#define GL_OP_SET_LT_EXT 0x878D
17443+#define GL_OP_CLAMP_EXT 0x878E
17444+#define GL_OP_FLOOR_EXT 0x878F
17445+#define GL_OP_ROUND_EXT 0x8790
17446+#define GL_OP_EXP_BASE_2_EXT 0x8791
17447+#define GL_OP_LOG_BASE_2_EXT 0x8792
17448+#define GL_OP_POWER_EXT 0x8793
17449+#define GL_OP_RECIP_EXT 0x8794
17450+#define GL_OP_RECIP_SQRT_EXT 0x8795
17451+#define GL_OP_SUB_EXT 0x8796
17452+#define GL_OP_CROSS_PRODUCT_EXT 0x8797
17453+#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798
17454+#define GL_OP_MOV_EXT 0x8799
17455+#define GL_OUTPUT_VERTEX_EXT 0x879A
17456+#define GL_OUTPUT_COLOR0_EXT 0x879B
17457+#define GL_OUTPUT_COLOR1_EXT 0x879C
17458+#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D
17459+#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E
17460+#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F
17461+#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0
17462+#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1
17463+#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2
17464+#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3
17465+#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4
17466+#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5
17467+#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6
17468+#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7
17469+#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8
17470+#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9
17471+#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA
17472+#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB
17473+#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC
17474+#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD
17475+#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE
17476+#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF
17477+#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0
17478+#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1
17479+#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2
17480+#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3
17481+#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4
17482+#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5
17483+#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6
17484+#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7
17485+#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8
17486+#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9
17487+#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA
17488+#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB
17489+#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC
17490+#define GL_OUTPUT_FOG_EXT 0x87BD
17491+#define GL_SCALAR_EXT 0x87BE
17492+#define GL_VECTOR_EXT 0x87BF
17493+#define GL_MATRIX_EXT 0x87C0
17494+#define GL_VARIANT_EXT 0x87C1
17495+#define GL_INVARIANT_EXT 0x87C2
17496+#define GL_LOCAL_CONSTANT_EXT 0x87C3
17497+#define GL_LOCAL_EXT 0x87C4
17498+#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5
17499+#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6
17500+#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7
17501+#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8
17502+#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9
17503+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA
17504+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB
17505+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC
17506+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD
17507+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE
17508+#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF
17509+#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0
17510+#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1
17511+#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2
17512+#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3
17513+#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4
17514+#define GL_X_EXT 0x87D5
17515+#define GL_Y_EXT 0x87D6
17516+#define GL_Z_EXT 0x87D7
17517+#define GL_W_EXT 0x87D8
17518+#define GL_NEGATIVE_X_EXT 0x87D9
17519+#define GL_NEGATIVE_Y_EXT 0x87DA
17520+#define GL_NEGATIVE_Z_EXT 0x87DB
17521+#define GL_NEGATIVE_W_EXT 0x87DC
17522+#define GL_ZERO_EXT 0x87DD
17523+#define GL_ONE_EXT 0x87DE
17524+#define GL_NEGATIVE_ONE_EXT 0x87DF
17525+#define GL_NORMALIZED_RANGE_EXT 0x87E0
17526+#define GL_FULL_RANGE_EXT 0x87E1
17527+#define GL_CURRENT_VERTEX_EXT 0x87E2
17528+#define GL_MVP_MATRIX_EXT 0x87E3
17529+#define GL_VARIANT_VALUE_EXT 0x87E4
17530+#define GL_VARIANT_DATATYPE_EXT 0x87E5
17531+#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6
17532+#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7
17533+#define GL_VARIANT_ARRAY_EXT 0x87E8
17534+#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9
17535+#define GL_INVARIANT_VALUE_EXT 0x87EA
17536+#define GL_INVARIANT_DATATYPE_EXT 0x87EB
17537+#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC
17538+#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED
17539+#endif
17540+
17541+#ifndef GL_ATI_vertex_streams
17542+#define GL_MAX_VERTEX_STREAMS_ATI 0x876B
17543+#define GL_VERTEX_STREAM0_ATI 0x876C
17544+#define GL_VERTEX_STREAM1_ATI 0x876D
17545+#define GL_VERTEX_STREAM2_ATI 0x876E
17546+#define GL_VERTEX_STREAM3_ATI 0x876F
17547+#define GL_VERTEX_STREAM4_ATI 0x8770
17548+#define GL_VERTEX_STREAM5_ATI 0x8771
17549+#define GL_VERTEX_STREAM6_ATI 0x8772
17550+#define GL_VERTEX_STREAM7_ATI 0x8773
17551+#define GL_VERTEX_SOURCE_ATI 0x8774
17552+#endif
17553+
17554+#ifndef GL_ATI_element_array
17555+#define GL_ELEMENT_ARRAY_ATI 0x8768
17556+#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769
17557+#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A
17558+#endif
17559+
17560+#ifndef GL_SUN_mesh_array
17561+#define GL_QUAD_MESH_SUN 0x8614
17562+#define GL_TRIANGLE_MESH_SUN 0x8615
17563+#endif
17564+
17565+#ifndef GL_SUN_slice_accum
17566+#define GL_SLICE_ACCUM_SUN 0x85CC
17567+#endif
17568+
17569+#ifndef GL_NV_multisample_filter_hint
17570+#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534
17571+#endif
17572+
17573+#ifndef GL_NV_depth_clamp
17574+#define GL_DEPTH_CLAMP_NV 0x864F
17575+#endif
17576+
17577+#ifndef GL_NV_occlusion_query
17578+#define GL_PIXEL_COUNTER_BITS_NV 0x8864
17579+#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865
17580+#define GL_PIXEL_COUNT_NV 0x8866
17581+#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867
17582+#endif
17583+
17584+#ifndef GL_NV_point_sprite
17585+#define GL_POINT_SPRITE_NV 0x8861
17586+#define GL_COORD_REPLACE_NV 0x8862
17587+#define GL_POINT_SPRITE_R_MODE_NV 0x8863
17588+#endif
17589+
17590+#ifndef GL_NV_texture_shader3
17591+#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850
17592+#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851
17593+#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852
17594+#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853
17595+#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854
17596+#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855
17597+#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856
17598+#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857
17599+#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858
17600+#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859
17601+#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A
17602+#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B
17603+#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C
17604+#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D
17605+#define GL_HILO8_NV 0x885E
17606+#define GL_SIGNED_HILO8_NV 0x885F
17607+#define GL_FORCE_BLUE_TO_ONE_NV 0x8860
17608+#endif
17609+
17610+#ifndef GL_NV_vertex_program1_1
17611+#endif
17612+
17613+#ifndef GL_EXT_shadow_funcs
17614+#endif
17615+
17616+#ifndef GL_EXT_stencil_two_side
17617+#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910
17618+#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911
17619+#endif
17620+
17621+#ifndef GL_ATI_text_fragment_shader
17622+#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200
17623+#endif
17624+
17625+#ifndef GL_APPLE_client_storage
17626+#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2
17627+#endif
17628+
17629+#ifndef GL_APPLE_element_array
17630+#define GL_ELEMENT_ARRAY_APPLE 0x8768
17631+#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8769
17632+#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x876A
17633+#endif
17634+
17635+#ifndef GL_APPLE_fence
17636+#define GL_DRAW_PIXELS_APPLE 0x8A0A
17637+#define GL_FENCE_APPLE 0x8A0B
17638+#endif
17639+
17640+#ifndef GL_APPLE_vertex_array_object
17641+#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5
17642+#endif
17643+
17644+#ifndef GL_APPLE_vertex_array_range
17645+#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D
17646+#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E
17647+#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F
17648+#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521
17649+#define GL_STORAGE_CACHED_APPLE 0x85BE
17650+#define GL_STORAGE_SHARED_APPLE 0x85BF
17651+#endif
17652+
17653+#ifndef GL_APPLE_ycbcr_422
17654+#define GL_YCBCR_422_APPLE 0x85B9
17655+#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
17656+#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
17657+#endif
17658+
17659+#ifndef GL_S3_s3tc
17660+#define GL_RGB_S3TC 0x83A0
17661+#define GL_RGB4_S3TC 0x83A1
17662+#define GL_RGBA_S3TC 0x83A2
17663+#define GL_RGBA4_S3TC 0x83A3
17664+#endif
17665+
17666+#ifndef GL_ATI_draw_buffers
17667+#define GL_MAX_DRAW_BUFFERS_ATI 0x8824
17668+#define GL_DRAW_BUFFER0_ATI 0x8825
17669+#define GL_DRAW_BUFFER1_ATI 0x8826
17670+#define GL_DRAW_BUFFER2_ATI 0x8827
17671+#define GL_DRAW_BUFFER3_ATI 0x8828
17672+#define GL_DRAW_BUFFER4_ATI 0x8829
17673+#define GL_DRAW_BUFFER5_ATI 0x882A
17674+#define GL_DRAW_BUFFER6_ATI 0x882B
17675+#define GL_DRAW_BUFFER7_ATI 0x882C
17676+#define GL_DRAW_BUFFER8_ATI 0x882D
17677+#define GL_DRAW_BUFFER9_ATI 0x882E
17678+#define GL_DRAW_BUFFER10_ATI 0x882F
17679+#define GL_DRAW_BUFFER11_ATI 0x8830
17680+#define GL_DRAW_BUFFER12_ATI 0x8831
17681+#define GL_DRAW_BUFFER13_ATI 0x8832
17682+#define GL_DRAW_BUFFER14_ATI 0x8833
17683+#define GL_DRAW_BUFFER15_ATI 0x8834
17684+#endif
17685+
17686+#ifndef GL_ATI_pixel_format_float
17687+#define GL_TYPE_RGBA_FLOAT_ATI 0x8820
17688+#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
17689+#endif
17690+
17691+#ifndef GL_ATI_texture_env_combine3
17692+#define GL_MODULATE_ADD_ATI 0x8744
17693+#define GL_MODULATE_SIGNED_ADD_ATI 0x8745
17694+#define GL_MODULATE_SUBTRACT_ATI 0x8746
17695+#endif
17696+
17697+#ifndef GL_ATI_texture_float
17698+#define GL_RGBA_FLOAT32_ATI 0x8814
17699+#define GL_RGB_FLOAT32_ATI 0x8815
17700+#define GL_ALPHA_FLOAT32_ATI 0x8816
17701+#define GL_INTENSITY_FLOAT32_ATI 0x8817
17702+#define GL_LUMINANCE_FLOAT32_ATI 0x8818
17703+#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819
17704+#define GL_RGBA_FLOAT16_ATI 0x881A
17705+#define GL_RGB_FLOAT16_ATI 0x881B
17706+#define GL_ALPHA_FLOAT16_ATI 0x881C
17707+#define GL_INTENSITY_FLOAT16_ATI 0x881D
17708+#define GL_LUMINANCE_FLOAT16_ATI 0x881E
17709+#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F
17710+#endif
17711+
17712+#ifndef GL_NV_float_buffer
17713+#define GL_FLOAT_R_NV 0x8880
17714+#define GL_FLOAT_RG_NV 0x8881
17715+#define GL_FLOAT_RGB_NV 0x8882
17716+#define GL_FLOAT_RGBA_NV 0x8883
17717+#define GL_FLOAT_R16_NV 0x8884
17718+#define GL_FLOAT_R32_NV 0x8885
17719+#define GL_FLOAT_RG16_NV 0x8886
17720+#define GL_FLOAT_RG32_NV 0x8887
17721+#define GL_FLOAT_RGB16_NV 0x8888
17722+#define GL_FLOAT_RGB32_NV 0x8889
17723+#define GL_FLOAT_RGBA16_NV 0x888A
17724+#define GL_FLOAT_RGBA32_NV 0x888B
17725+#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C
17726+#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D
17727+#define GL_FLOAT_RGBA_MODE_NV 0x888E
17728+#endif
17729+
17730+#ifndef GL_NV_fragment_program
17731+#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868
17732+#define GL_FRAGMENT_PROGRAM_NV 0x8870
17733+#define GL_MAX_TEXTURE_COORDS_NV 0x8871
17734+#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872
17735+#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873
17736+#define GL_PROGRAM_ERROR_STRING_NV 0x8874
17737+#endif
17738+
17739+#ifndef GL_NV_half_float
17740+#define GL_HALF_FLOAT_NV 0x140B
17741+#endif
17742+
17743+#ifndef GL_NV_pixel_data_range
17744+#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878
17745+#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879
17746+#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A
17747+#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B
17748+#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C
17749+#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D
17750+#endif
17751+
17752+#ifndef GL_NV_primitive_restart
17753+#define GL_PRIMITIVE_RESTART_NV 0x8558
17754+#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559
17755+#endif
17756+
17757+#ifndef GL_NV_texture_expand_normal
17758+#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F
17759+#endif
17760+
17761+#ifndef GL_NV_vertex_program2
17762+#endif
17763+
17764+#ifndef GL_ATI_map_object_buffer
17765+#endif
17766+
17767+#ifndef GL_ATI_separate_stencil
17768+#define GL_STENCIL_BACK_FUNC_ATI 0x8800
17769+#define GL_STENCIL_BACK_FAIL_ATI 0x8801
17770+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802
17771+#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803
17772+#endif
17773+
17774+#ifndef GL_ATI_vertex_attrib_array_object
17775+#endif
17776+
17777+#ifndef GL_OES_read_format
17778+#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
17779+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
17780+#endif
17781+
17782+#ifndef GL_EXT_depth_bounds_test
17783+#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890
17784+#define GL_DEPTH_BOUNDS_EXT 0x8891
17785+#endif
17786+
17787+#ifndef GL_EXT_texture_mirror_clamp
17788+#define GL_MIRROR_CLAMP_EXT 0x8742
17789+#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743
17790+#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912
17791+#endif
17792+
17793+#ifndef GL_EXT_blend_equation_separate
17794+#define GL_BLEND_EQUATION_RGB_EXT GL_BLEND_EQUATION
17795+#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D
17796+#endif
17797+
17798+#ifndef GL_MESA_pack_invert
17799+#define GL_PACK_INVERT_MESA 0x8758
17800+#endif
17801+
17802+#ifndef GL_MESA_ycbcr_texture
17803+#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA
17804+#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB
17805+#define GL_YCBCR_MESA 0x8757
17806+#endif
17807+
17808+#ifndef GL_EXT_pixel_buffer_object
17809+#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB
17810+#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC
17811+#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED
17812+#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF
17813+#endif
17814+
17815+#ifndef GL_NV_fragment_program_option
17816+#endif
17817+
17818+#ifndef GL_NV_fragment_program2
17819+#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4
17820+#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5
17821+#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6
17822+#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7
17823+#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8
17824+#endif
17825+
17826+#ifndef GL_NV_vertex_program2_option
17827+/* reuse GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
17828+/* reuse GL_MAX_PROGRAM_CALL_DEPTH_NV */
17829+#endif
17830+
17831+#ifndef GL_NV_vertex_program3
17832+/* reuse GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
17833+#endif
17834+
17835+#ifndef GL_EXT_framebuffer_object
17836+#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
17837+#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8
17838+#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6
17839+#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7
17840+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
17841+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
17842+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
17843+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
17844+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
17845+#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
17846+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
17847+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
17848+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
17849+#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
17850+#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
17851+#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
17852+#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD
17853+#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
17854+#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
17855+#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
17856+#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
17857+#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
17858+#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
17859+#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
17860+#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
17861+#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
17862+#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
17863+#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
17864+#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
17865+#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
17866+#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
17867+#define GL_COLOR_ATTACHMENT13_EXT 0x8CED
17868+#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
17869+#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
17870+#define GL_DEPTH_ATTACHMENT_EXT 0x8D00
17871+#define GL_STENCIL_ATTACHMENT_EXT 0x8D20
17872+#define GL_FRAMEBUFFER_EXT 0x8D40
17873+#define GL_RENDERBUFFER_EXT 0x8D41
17874+#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42
17875+#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43
17876+#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
17877+#define GL_STENCIL_INDEX1_EXT 0x8D46
17878+#define GL_STENCIL_INDEX4_EXT 0x8D47
17879+#define GL_STENCIL_INDEX8_EXT 0x8D48
17880+#define GL_STENCIL_INDEX16_EXT 0x8D49
17881+#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50
17882+#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51
17883+#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52
17884+#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53
17885+#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54
17886+#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55
17887+#endif
17888+
17889+#ifndef GL_GREMEDY_string_marker
17890+#endif
17891+
17892+#ifndef GL_EXT_packed_depth_stencil
17893+#define GL_DEPTH_STENCIL_EXT 0x84F9
17894+#define GL_UNSIGNED_INT_24_8_EXT 0x84FA
17895+#define GL_DEPTH24_STENCIL8_EXT 0x88F0
17896+#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1
17897+#endif
17898+
17899+#ifndef GL_EXT_stencil_clear_tag
17900+#define GL_STENCIL_TAG_BITS_EXT 0x88F2
17901+#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3
17902+#endif
17903+
17904+#ifndef GL_EXT_texture_sRGB
17905+#define GL_SRGB_EXT 0x8C40
17906+#define GL_SRGB8_EXT 0x8C41
17907+#define GL_SRGB_ALPHA_EXT 0x8C42
17908+#define GL_SRGB8_ALPHA8_EXT 0x8C43
17909+#define GL_SLUMINANCE_ALPHA_EXT 0x8C44
17910+#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45
17911+#define GL_SLUMINANCE_EXT 0x8C46
17912+#define GL_SLUMINANCE8_EXT 0x8C47
17913+#define GL_COMPRESSED_SRGB_EXT 0x8C48
17914+#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49
17915+#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A
17916+#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B
17917+#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
17918+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
17919+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
17920+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
17921+#endif
17922+
17923+#ifndef GL_EXT_framebuffer_blit
17924+#define GL_READ_FRAMEBUFFER_EXT 0x8CA8
17925+#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
17926+#define GL_READ_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT
17927+#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CAA
17928+#endif
17929+
17930+#ifndef GL_EXT_framebuffer_multisample
17931+#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
17932+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
17933+#define GL_MAX_SAMPLES_EXT 0x8D57
17934+#endif
17935+
17936+#ifndef GL_MESAX_texture_stack
17937+#define GL_TEXTURE_1D_STACK_MESAX 0x8759
17938+#define GL_TEXTURE_2D_STACK_MESAX 0x875A
17939+#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B
17940+#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C
17941+#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D
17942+#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E
17943+#endif
17944+
17945+#ifndef GL_EXT_timer_query
17946+#define GL_TIME_ELAPSED_EXT 0x88BF
17947+#endif
17948+
17949+#ifndef GL_EXT_gpu_program_parameters
17950+#endif
17951+
17952+#ifndef GL_APPLE_flush_buffer_range
17953+#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12
17954+#define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13
17955+#endif
17956+
17957+#ifndef GL_NV_gpu_program4
17958+#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904
17959+#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905
17960+#define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906
17961+#define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907
17962+#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908
17963+#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909
17964+#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5
17965+#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6
17966+#endif
17967+
17968+#ifndef GL_NV_geometry_program4
17969+#define GL_LINES_ADJACENCY_EXT 0x000A
17970+#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B
17971+#define GL_TRIANGLES_ADJACENCY_EXT 0x000C
17972+#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D
17973+#define GL_GEOMETRY_PROGRAM_NV 0x8C26
17974+#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27
17975+#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28
17976+#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA
17977+#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB
17978+#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC
17979+#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
17980+#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
17981+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
17982+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9
17983+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
17984+#define GL_PROGRAM_POINT_SIZE_EXT 0x8642
17985+#endif
17986+
17987+#ifndef GL_EXT_geometry_shader4
17988+#define GL_GEOMETRY_SHADER_EXT 0x8DD9
17989+/* reuse GL_GEOMETRY_VERTICES_OUT_EXT */
17990+/* reuse GL_GEOMETRY_INPUT_TYPE_EXT */
17991+/* reuse GL_GEOMETRY_OUTPUT_TYPE_EXT */
17992+/* reuse GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT */
17993+#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD
17994+#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE
17995+#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B
17996+#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
17997+#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
17998+#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
17999+/* reuse GL_LINES_ADJACENCY_EXT */
18000+/* reuse GL_LINE_STRIP_ADJACENCY_EXT */
18001+/* reuse GL_TRIANGLES_ADJACENCY_EXT */
18002+/* reuse GL_TRIANGLE_STRIP_ADJACENCY_EXT */
18003+/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT */
18004+/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT */
18005+/* reuse GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT */
18006+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
18007+/* reuse GL_PROGRAM_POINT_SIZE_EXT */
18008+#endif
18009+
18010+#ifndef GL_NV_vertex_program4
18011+#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD
18012+#endif
18013+
18014+#ifndef GL_EXT_gpu_shader4
18015+#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0
18016+#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1
18017+#define GL_SAMPLER_BUFFER_EXT 0x8DC2
18018+#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3
18019+#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4
18020+#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5
18021+#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6
18022+#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7
18023+#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8
18024+#define GL_INT_SAMPLER_1D_EXT 0x8DC9
18025+#define GL_INT_SAMPLER_2D_EXT 0x8DCA
18026+#define GL_INT_SAMPLER_3D_EXT 0x8DCB
18027+#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC
18028+#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD
18029+#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE
18030+#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF
18031+#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0
18032+#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1
18033+#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2
18034+#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3
18035+#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4
18036+#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5
18037+#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6
18038+#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7
18039+#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8
18040+#endif
18041+
18042+#ifndef GL_EXT_draw_instanced
18043+#endif
18044+
18045+#ifndef GL_EXT_packed_float
18046+#define GL_R11F_G11F_B10F_EXT 0x8C3A
18047+#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B
18048+#define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C
18049+#endif
18050+
18051+#ifndef GL_EXT_texture_array
18052+#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18
18053+#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19
18054+#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A
18055+#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B
18056+#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C
18057+#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D
18058+#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF
18059+#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E
18060+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
18061+#endif
18062+
18063+#ifndef GL_EXT_texture_buffer_object
18064+#define GL_TEXTURE_BUFFER_EXT 0x8C2A
18065+#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B
18066+#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C
18067+#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D
18068+#define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E
18069+#endif
18070+
18071+#ifndef GL_EXT_texture_compression_latc
18072+#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70
18073+#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71
18074+#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72
18075+#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73
18076+#endif
18077+
18078+#ifndef GL_EXT_texture_compression_rgtc
18079+#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB
18080+#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC
18081+#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD
18082+#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE
18083+#endif
18084+
18085+#ifndef GL_EXT_texture_shared_exponent
18086+#define GL_RGB9_E5_EXT 0x8C3D
18087+#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E
18088+#define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F
18089+#endif
18090+
18091+#ifndef GL_NV_depth_buffer_float
18092+#define GL_DEPTH_COMPONENT32F_NV 0x8DAB
18093+#define GL_DEPTH32F_STENCIL8_NV 0x8DAC
18094+#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD
18095+#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF
18096+#endif
18097+
18098+#ifndef GL_NV_fragment_program4
18099+#endif
18100+
18101+#ifndef GL_NV_framebuffer_multisample_coverage
18102+#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB
18103+#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10
18104+#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11
18105+#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12
18106+#endif
18107+
18108+#ifndef GL_EXT_framebuffer_sRGB
18109+#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9
18110+#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA
18111+#endif
18112+
18113+#ifndef GL_NV_geometry_shader4
18114+#endif
18115+
18116+#ifndef GL_NV_parameter_buffer_object
18117+#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0
18118+#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1
18119+#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2
18120+#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3
18121+#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4
18122+#endif
18123+
18124+#ifndef GL_EXT_draw_buffers2
18125+#endif
18126+
18127+#ifndef GL_NV_transform_feedback
18128+#define GL_BACK_PRIMARY_COLOR_NV 0x8C77
18129+#define GL_BACK_SECONDARY_COLOR_NV 0x8C78
18130+#define GL_TEXTURE_COORD_NV 0x8C79
18131+#define GL_CLIP_DISTANCE_NV 0x8C7A
18132+#define GL_VERTEX_ID_NV 0x8C7B
18133+#define GL_PRIMITIVE_ID_NV 0x8C7C
18134+#define GL_GENERIC_ATTRIB_NV 0x8C7D
18135+#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E
18136+#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F
18137+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80
18138+#define GL_ACTIVE_VARYINGS_NV 0x8C81
18139+#define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82
18140+#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83
18141+#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84
18142+#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85
18143+#define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86
18144+#define GL_PRIMITIVES_GENERATED_NV 0x8C87
18145+#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88
18146+#define GL_RASTERIZER_DISCARD_NV 0x8C89
18147+#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_ATTRIBS_NV 0x8C8A
18148+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B
18149+#define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C
18150+#define GL_SEPARATE_ATTRIBS_NV 0x8C8D
18151+#define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E
18152+#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F
18153+#endif
18154+
18155+#ifndef GL_EXT_bindable_uniform
18156+#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2
18157+#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3
18158+#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4
18159+#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED
18160+#define GL_UNIFORM_BUFFER_EXT 0x8DEE
18161+#define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF
18162+#endif
18163+
18164+#ifndef GL_EXT_texture_integer
18165+#define GL_RGBA32UI_EXT 0x8D70
18166+#define GL_RGB32UI_EXT 0x8D71
18167+#define GL_ALPHA32UI_EXT 0x8D72
18168+#define GL_INTENSITY32UI_EXT 0x8D73
18169+#define GL_LUMINANCE32UI_EXT 0x8D74
18170+#define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75
18171+#define GL_RGBA16UI_EXT 0x8D76
18172+#define GL_RGB16UI_EXT 0x8D77
18173+#define GL_ALPHA16UI_EXT 0x8D78
18174+#define GL_INTENSITY16UI_EXT 0x8D79
18175+#define GL_LUMINANCE16UI_EXT 0x8D7A
18176+#define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B
18177+#define GL_RGBA8UI_EXT 0x8D7C
18178+#define GL_RGB8UI_EXT 0x8D7D
18179+#define GL_ALPHA8UI_EXT 0x8D7E
18180+#define GL_INTENSITY8UI_EXT 0x8D7F
18181+#define GL_LUMINANCE8UI_EXT 0x8D80
18182+#define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81
18183+#define GL_RGBA32I_EXT 0x8D82
18184+#define GL_RGB32I_EXT 0x8D83
18185+#define GL_ALPHA32I_EXT 0x8D84
18186+#define GL_INTENSITY32I_EXT 0x8D85
18187+#define GL_LUMINANCE32I_EXT 0x8D86
18188+#define GL_LUMINANCE_ALPHA32I_EXT 0x8D87
18189+#define GL_RGBA16I_EXT 0x8D88
18190+#define GL_RGB16I_EXT 0x8D89
18191+#define GL_ALPHA16I_EXT 0x8D8A
18192+#define GL_INTENSITY16I_EXT 0x8D8B
18193+#define GL_LUMINANCE16I_EXT 0x8D8C
18194+#define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D
18195+#define GL_RGBA8I_EXT 0x8D8E
18196+#define GL_RGB8I_EXT 0x8D8F
18197+#define GL_ALPHA8I_EXT 0x8D90
18198+#define GL_INTENSITY8I_EXT 0x8D91
18199+#define GL_LUMINANCE8I_EXT 0x8D92
18200+#define GL_LUMINANCE_ALPHA8I_EXT 0x8D93
18201+#define GL_RED_INTEGER_EXT 0x8D94
18202+#define GL_GREEN_INTEGER_EXT 0x8D95
18203+#define GL_BLUE_INTEGER_EXT 0x8D96
18204+#define GL_ALPHA_INTEGER_EXT 0x8D97
18205+#define GL_RGB_INTEGER_EXT 0x8D98
18206+#define GL_RGBA_INTEGER_EXT 0x8D99
18207+#define GL_BGR_INTEGER_EXT 0x8D9A
18208+#define GL_BGRA_INTEGER_EXT 0x8D9B
18209+#define GL_LUMINANCE_INTEGER_EXT 0x8D9C
18210+#define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D
18211+#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E
18212+#endif
18213+
18214+
18215+/*************************************************************/
18216+
18217+#include <stddef.h>
18218+#ifndef GL_VERSION_2_0
18219+/* GL type for program/shader text */
18220+typedef char GLchar; /* native character */
18221+#endif
18222+
18223+#ifndef GL_VERSION_1_5
18224+/* GL types for handling large vertex buffer objects */
18225+typedef ptrdiff_t GLintptr;
18226+typedef ptrdiff_t GLsizeiptr;
18227+#endif
18228+
18229+#ifndef GL_ARB_vertex_buffer_object
18230+/* GL types for handling large vertex buffer objects */
18231+typedef ptrdiff_t GLintptrARB;
18232+typedef ptrdiff_t GLsizeiptrARB;
18233+#endif
18234+
18235+#ifndef GL_ARB_shader_objects
18236+/* GL types for handling shader object handles and program/shader text */
18237+typedef char GLcharARB; /* native character */
18238+typedef unsigned int GLhandleARB; /* shader object handle */
18239+#endif
18240+
18241+/* GL types for "half" precision (s10e5) float data in host memory */
18242+#ifndef GL_ARB_half_float_pixel
18243+typedef unsigned short GLhalfARB;
18244+#endif
18245+
18246+#ifndef GL_NV_half_float
18247+typedef unsigned short GLhalfNV;
18248+#endif
18249+
18250+#ifndef GLEXT_64_TYPES_DEFINED
18251+/* This code block is duplicated in glext.h, so must be protected */
18252+#define GLEXT_64_TYPES_DEFINED
18253+/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
18254+/* (as used in the GL_EXT_timer_query extension). */
18255+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
18256+#include <inttypes.h>
18257+#elif defined(__sun__)
18258+#include <inttypes.h>
18259+#if defined(__STDC__)
18260+#if defined(__arch64__)
18261+typedef long int int64_t;
18262+typedef unsigned long int uint64_t;
18263+#else
18264+typedef long long int int64_t;
18265+typedef unsigned long long int uint64_t;
18266+#endif /* __arch64__ */
18267+#endif /* __STDC__ */
18268+#elif defined( __VMS )
18269+#include <inttypes.h>
18270+#elif defined(__SCO__) || defined(__USLC__)
18271+#include <stdint.h>
18272+#elif defined(__UNIXOS2__) || defined(__SOL64__)
18273+typedef long int int32_t;
18274+typedef long long int int64_t;
18275+typedef unsigned long long int uint64_t;
18276+#elif defined(_WIN32) && defined(__GNUC__)
18277+#include <stdint.h>
18278+#elif defined(_WIN32)
18279+typedef __int32 int32_t;
18280+typedef __int64 int64_t;
18281+typedef unsigned __int64 uint64_t;
18282+#else
18283+#include <inttypes.h> /* Fallback option */
18284+#endif
18285+#endif
18286+
18287+#ifndef GL_EXT_timer_query
18288+typedef int64_t GLint64EXT;
18289+typedef uint64_t GLuint64EXT;
18290+#endif
18291+
18292+#ifndef GL_VERSION_1_2
18293+#define GL_VERSION_1_2 1
18294+#ifdef GL_GLEXT_PROTOTYPES
18295+GLAPI void APIENTRY glBlendColor (GLclampf, GLclampf, GLclampf, GLclampf);
18296+GLAPI void APIENTRY glBlendEquation (GLenum);
18297+GLAPI void APIENTRY glDrawRangeElements (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
18298+GLAPI void APIENTRY glColorTable (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
18299+GLAPI void APIENTRY glColorTableParameterfv (GLenum, GLenum, const GLfloat *);
18300+GLAPI void APIENTRY glColorTableParameteriv (GLenum, GLenum, const GLint *);
18301+GLAPI void APIENTRY glCopyColorTable (GLenum, GLenum, GLint, GLint, GLsizei);
18302+GLAPI void APIENTRY glGetColorTable (GLenum, GLenum, GLenum, GLvoid *);
18303+GLAPI void APIENTRY glGetColorTableParameterfv (GLenum, GLenum, GLfloat *);
18304+GLAPI void APIENTRY glGetColorTableParameteriv (GLenum, GLenum, GLint *);
18305+GLAPI void APIENTRY glColorSubTable (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
18306+GLAPI void APIENTRY glCopyColorSubTable (GLenum, GLsizei, GLint, GLint, GLsizei);
18307+GLAPI void APIENTRY glConvolutionFilter1D (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
18308+GLAPI void APIENTRY glConvolutionFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
18309+GLAPI void APIENTRY glConvolutionParameterf (GLenum, GLenum, GLfloat);
18310+GLAPI void APIENTRY glConvolutionParameterfv (GLenum, GLenum, const GLfloat *);
18311+GLAPI void APIENTRY glConvolutionParameteri (GLenum, GLenum, GLint);
18312+GLAPI void APIENTRY glConvolutionParameteriv (GLenum, GLenum, const GLint *);
18313+GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum, GLenum, GLint, GLint, GLsizei);
18314+GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
18315+GLAPI void APIENTRY glGetConvolutionFilter (GLenum, GLenum, GLenum, GLvoid *);
18316+GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum, GLenum, GLfloat *);
18317+GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum, GLenum, GLint *);
18318+GLAPI void APIENTRY glGetSeparableFilter (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
18319+GLAPI void APIENTRY glSeparableFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
18320+GLAPI void APIENTRY glGetHistogram (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
18321+GLAPI void APIENTRY glGetHistogramParameterfv (GLenum, GLenum, GLfloat *);
18322+GLAPI void APIENTRY glGetHistogramParameteriv (GLenum, GLenum, GLint *);
18323+GLAPI void APIENTRY glGetMinmax (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
18324+GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum, GLenum, GLfloat *);
18325+GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum, GLenum, GLint *);
18326+GLAPI void APIENTRY glHistogram (GLenum, GLsizei, GLenum, GLboolean);
18327+GLAPI void APIENTRY glMinmax (GLenum, GLenum, GLboolean);
18328+GLAPI void APIENTRY glResetHistogram (GLenum);
18329+GLAPI void APIENTRY glResetMinmax (GLenum);
18330+GLAPI void APIENTRY glTexImage3D (GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
18331+GLAPI void APIENTRY glTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
18332+GLAPI void APIENTRY glCopyTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
18333+#endif /* GL_GLEXT_PROTOTYPES */
18334+typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
18335+typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
18336+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
18337+typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
18338+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
18339+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
18340+typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
18341+typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
18342+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
18343+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18344+typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
18345+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
18346+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
18347+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
18348+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
18349+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
18350+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
18351+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
18352+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
18353+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
18354+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
18355+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
18356+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18357+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
18358+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
18359+typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
18360+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
18361+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18362+typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
18363+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
18364+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18365+typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
18366+typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
18367+typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
18368+typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
18369+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);
18370+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);
18371+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
18372+#endif
18373+
18374+#ifndef GL_VERSION_1_3
18375+#define GL_VERSION_1_3 1
18376+#ifdef GL_GLEXT_PROTOTYPES
18377+GLAPI void APIENTRY glActiveTexture (GLenum);
18378+GLAPI void APIENTRY glClientActiveTexture (GLenum);
18379+GLAPI void APIENTRY glMultiTexCoord1d (GLenum, GLdouble);
18380+GLAPI void APIENTRY glMultiTexCoord1dv (GLenum, const GLdouble *);
18381+GLAPI void APIENTRY glMultiTexCoord1f (GLenum, GLfloat);
18382+GLAPI void APIENTRY glMultiTexCoord1fv (GLenum, const GLfloat *);
18383+GLAPI void APIENTRY glMultiTexCoord1i (GLenum, GLint);
18384+GLAPI void APIENTRY glMultiTexCoord1iv (GLenum, const GLint *);
18385+GLAPI void APIENTRY glMultiTexCoord1s (GLenum, GLshort);
18386+GLAPI void APIENTRY glMultiTexCoord1sv (GLenum, const GLshort *);
18387+GLAPI void APIENTRY glMultiTexCoord2d (GLenum, GLdouble, GLdouble);
18388+GLAPI void APIENTRY glMultiTexCoord2dv (GLenum, const GLdouble *);
18389+GLAPI void APIENTRY glMultiTexCoord2f (GLenum, GLfloat, GLfloat);
18390+GLAPI void APIENTRY glMultiTexCoord2fv (GLenum, const GLfloat *);
18391+GLAPI void APIENTRY glMultiTexCoord2i (GLenum, GLint, GLint);
18392+GLAPI void APIENTRY glMultiTexCoord2iv (GLenum, const GLint *);
18393+GLAPI void APIENTRY glMultiTexCoord2s (GLenum, GLshort, GLshort);
18394+GLAPI void APIENTRY glMultiTexCoord2sv (GLenum, const GLshort *);
18395+GLAPI void APIENTRY glMultiTexCoord3d (GLenum, GLdouble, GLdouble, GLdouble);
18396+GLAPI void APIENTRY glMultiTexCoord3dv (GLenum, const GLdouble *);
18397+GLAPI void APIENTRY glMultiTexCoord3f (GLenum, GLfloat, GLfloat, GLfloat);
18398+GLAPI void APIENTRY glMultiTexCoord3fv (GLenum, const GLfloat *);
18399+GLAPI void APIENTRY glMultiTexCoord3i (GLenum, GLint, GLint, GLint);
18400+GLAPI void APIENTRY glMultiTexCoord3iv (GLenum, const GLint *);
18401+GLAPI void APIENTRY glMultiTexCoord3s (GLenum, GLshort, GLshort, GLshort);
18402+GLAPI void APIENTRY glMultiTexCoord3sv (GLenum, const GLshort *);
18403+GLAPI void APIENTRY glMultiTexCoord4d (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
18404+GLAPI void APIENTRY glMultiTexCoord4dv (GLenum, const GLdouble *);
18405+GLAPI void APIENTRY glMultiTexCoord4f (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
18406+GLAPI void APIENTRY glMultiTexCoord4fv (GLenum, const GLfloat *);
18407+GLAPI void APIENTRY glMultiTexCoord4i (GLenum, GLint, GLint, GLint, GLint);
18408+GLAPI void APIENTRY glMultiTexCoord4iv (GLenum, const GLint *);
18409+GLAPI void APIENTRY glMultiTexCoord4s (GLenum, GLshort, GLshort, GLshort, GLshort);
18410+GLAPI void APIENTRY glMultiTexCoord4sv (GLenum, const GLshort *);
18411+GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *);
18412+GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *);
18413+GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *);
18414+GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *);
18415+GLAPI void APIENTRY glSampleCoverage (GLclampf, GLboolean);
18416+GLAPI void APIENTRY glCompressedTexImage3D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
18417+GLAPI void APIENTRY glCompressedTexImage2D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
18418+GLAPI void APIENTRY glCompressedTexImage1D (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
18419+GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
18420+GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
18421+GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
18422+GLAPI void APIENTRY glGetCompressedTexImage (GLenum, GLint, GLvoid *);
18423+#endif /* GL_GLEXT_PROTOTYPES */
18424+typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
18425+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
18426+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
18427+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
18428+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
18429+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
18430+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
18431+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
18432+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
18433+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
18434+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
18435+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
18436+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
18437+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
18438+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
18439+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
18440+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
18441+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
18442+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
18443+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
18444+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
18445+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
18446+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
18447+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
18448+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
18449+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
18450+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
18451+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
18452+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
18453+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
18454+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
18455+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
18456+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
18457+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
18458+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
18459+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
18460+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
18461+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
18462+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
18463+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
18464+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
18465+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
18466+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);
18467+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
18468+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
18469+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img);
18470+#endif
18471+
18472+#ifndef GL_VERSION_1_4
18473+#define GL_VERSION_1_4 1
18474+#ifdef GL_GLEXT_PROTOTYPES
18475+GLAPI void APIENTRY glBlendFuncSeparate (GLenum, GLenum, GLenum, GLenum);
18476+GLAPI void APIENTRY glFogCoordf (GLfloat);
18477+GLAPI void APIENTRY glFogCoordfv (const GLfloat *);
18478+GLAPI void APIENTRY glFogCoordd (GLdouble);
18479+GLAPI void APIENTRY glFogCoorddv (const GLdouble *);
18480+GLAPI void APIENTRY glFogCoordPointer (GLenum, GLsizei, const GLvoid *);
18481+GLAPI void APIENTRY glMultiDrawArrays (GLenum, GLint *, GLsizei *, GLsizei);
18482+GLAPI void APIENTRY glMultiDrawElements (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
18483+GLAPI void APIENTRY glPointParameterf (GLenum, GLfloat);
18484+GLAPI void APIENTRY glPointParameterfv (GLenum, const GLfloat *);
18485+GLAPI void APIENTRY glPointParameteri (GLenum, GLint);
18486+GLAPI void APIENTRY glPointParameteriv (GLenum, const GLint *);
18487+GLAPI void APIENTRY glSecondaryColor3b (GLbyte, GLbyte, GLbyte);
18488+GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *);
18489+GLAPI void APIENTRY glSecondaryColor3d (GLdouble, GLdouble, GLdouble);
18490+GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *);
18491+GLAPI void APIENTRY glSecondaryColor3f (GLfloat, GLfloat, GLfloat);
18492+GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *);
18493+GLAPI void APIENTRY glSecondaryColor3i (GLint, GLint, GLint);
18494+GLAPI void APIENTRY glSecondaryColor3iv (const GLint *);
18495+GLAPI void APIENTRY glSecondaryColor3s (GLshort, GLshort, GLshort);
18496+GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *);
18497+GLAPI void APIENTRY glSecondaryColor3ub (GLubyte, GLubyte, GLubyte);
18498+GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *);
18499+GLAPI void APIENTRY glSecondaryColor3ui (GLuint, GLuint, GLuint);
18500+GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *);
18501+GLAPI void APIENTRY glSecondaryColor3us (GLushort, GLushort, GLushort);
18502+GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *);
18503+GLAPI void APIENTRY glSecondaryColorPointer (GLint, GLenum, GLsizei, const GLvoid *);
18504+GLAPI void APIENTRY glWindowPos2d (GLdouble, GLdouble);
18505+GLAPI void APIENTRY glWindowPos2dv (const GLdouble *);
18506+GLAPI void APIENTRY glWindowPos2f (GLfloat, GLfloat);
18507+GLAPI void APIENTRY glWindowPos2fv (const GLfloat *);
18508+GLAPI void APIENTRY glWindowPos2i (GLint, GLint);
18509+GLAPI void APIENTRY glWindowPos2iv (const GLint *);
18510+GLAPI void APIENTRY glWindowPos2s (GLshort, GLshort);
18511+GLAPI void APIENTRY glWindowPos2sv (const GLshort *);
18512+GLAPI void APIENTRY glWindowPos3d (GLdouble, GLdouble, GLdouble);
18513+GLAPI void APIENTRY glWindowPos3dv (const GLdouble *);
18514+GLAPI void APIENTRY glWindowPos3f (GLfloat, GLfloat, GLfloat);
18515+GLAPI void APIENTRY glWindowPos3fv (const GLfloat *);
18516+GLAPI void APIENTRY glWindowPos3i (GLint, GLint, GLint);
18517+GLAPI void APIENTRY glWindowPos3iv (const GLint *);
18518+GLAPI void APIENTRY glWindowPos3s (GLshort, GLshort, GLshort);
18519+GLAPI void APIENTRY glWindowPos3sv (const GLshort *);
18520+#endif /* GL_GLEXT_PROTOTYPES */
18521+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
18522+typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord);
18523+typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord);
18524+typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord);
18525+typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord);
18526+typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
18527+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
18528+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
18529+typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);
18530+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params);
18531+typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param);
18532+typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params);
18533+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue);
18534+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v);
18535+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue);
18536+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v);
18537+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue);
18538+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v);
18539+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue);
18540+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v);
18541+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue);
18542+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v);
18543+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue);
18544+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v);
18545+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue);
18546+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v);
18547+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue);
18548+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v);
18549+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
18550+typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y);
18551+typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v);
18552+typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y);
18553+typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v);
18554+typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y);
18555+typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v);
18556+typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y);
18557+typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v);
18558+typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z);
18559+typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v);
18560+typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z);
18561+typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v);
18562+typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z);
18563+typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v);
18564+typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z);
18565+typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v);
18566+#endif
18567+
18568+#ifndef GL_VERSION_1_5
18569+#define GL_VERSION_1_5 1
18570+#ifdef GL_GLEXT_PROTOTYPES
18571+GLAPI void APIENTRY glGenQueries (GLsizei, GLuint *);
18572+GLAPI void APIENTRY glDeleteQueries (GLsizei, const GLuint *);
18573+GLAPI GLboolean APIENTRY glIsQuery (GLuint);
18574+GLAPI void APIENTRY glBeginQuery (GLenum, GLuint);
18575+GLAPI void APIENTRY glEndQuery (GLenum);
18576+GLAPI void APIENTRY glGetQueryiv (GLenum, GLenum, GLint *);
18577+GLAPI void APIENTRY glGetQueryObjectiv (GLuint, GLenum, GLint *);
18578+GLAPI void APIENTRY glGetQueryObjectuiv (GLuint, GLenum, GLuint *);
18579+GLAPI void APIENTRY glBindBuffer (GLenum, GLuint);
18580+GLAPI void APIENTRY glDeleteBuffers (GLsizei, const GLuint *);
18581+GLAPI void APIENTRY glGenBuffers (GLsizei, GLuint *);
18582+GLAPI GLboolean APIENTRY glIsBuffer (GLuint);
18583+GLAPI void APIENTRY glBufferData (GLenum, GLsizeiptr, const GLvoid *, GLenum);
18584+GLAPI void APIENTRY glBufferSubData (GLenum, GLintptr, GLsizeiptr, const GLvoid *);
18585+GLAPI void APIENTRY glGetBufferSubData (GLenum, GLintptr, GLsizeiptr, GLvoid *);
18586+GLAPI GLvoid* APIENTRY glMapBuffer (GLenum, GLenum);
18587+GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum);
18588+GLAPI void APIENTRY glGetBufferParameteriv (GLenum, GLenum, GLint *);
18589+GLAPI void APIENTRY glGetBufferPointerv (GLenum, GLenum, GLvoid* *);
18590+#endif /* GL_GLEXT_PROTOTYPES */
18591+typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids);
18592+typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids);
18593+typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id);
18594+typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);
18595+typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target);
18596+typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params);
18597+typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params);
18598+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params);
18599+typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
18600+typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
18601+typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
18602+typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);
18603+typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
18604+typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
18605+typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data);
18606+typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
18607+typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target);
18608+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18609+typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params);
18610+#endif
18611+
18612+#ifndef GL_VERSION_2_0
18613+#define GL_VERSION_2_0 1
18614+#ifdef GL_GLEXT_PROTOTYPES
18615+GLAPI void APIENTRY glBlendEquationSeparate (GLenum, GLenum);
18616+GLAPI void APIENTRY glDrawBuffers (GLsizei, const GLenum *);
18617+GLAPI void APIENTRY glStencilOpSeparate (GLenum, GLenum, GLenum, GLenum);
18618+GLAPI void APIENTRY glStencilFuncSeparate (GLenum, GLenum, GLint, GLuint);
18619+GLAPI void APIENTRY glStencilMaskSeparate (GLenum, GLuint);
18620+GLAPI void APIENTRY glAttachShader (GLuint, GLuint);
18621+GLAPI void APIENTRY glBindAttribLocation (GLuint, GLuint, const GLchar *);
18622+GLAPI void APIENTRY glCompileShader (GLuint);
18623+GLAPI GLuint APIENTRY glCreateProgram (void);
18624+GLAPI GLuint APIENTRY glCreateShader (GLenum);
18625+GLAPI void APIENTRY glDeleteProgram (GLuint);
18626+GLAPI void APIENTRY glDeleteShader (GLuint);
18627+GLAPI void APIENTRY glDetachShader (GLuint, GLuint);
18628+GLAPI void APIENTRY glDisableVertexAttribArray (GLuint);
18629+GLAPI void APIENTRY glEnableVertexAttribArray (GLuint);
18630+GLAPI void APIENTRY glGetActiveAttrib (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
18631+GLAPI void APIENTRY glGetActiveUniform (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
18632+GLAPI void APIENTRY glGetAttachedShaders (GLuint, GLsizei, GLsizei *, GLuint *);
18633+GLAPI GLint APIENTRY glGetAttribLocation (GLuint, const GLchar *);
18634+GLAPI void APIENTRY glGetProgramiv (GLuint, GLenum, GLint *);
18635+GLAPI void APIENTRY glGetProgramInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
18636+GLAPI void APIENTRY glGetShaderiv (GLuint, GLenum, GLint *);
18637+GLAPI void APIENTRY glGetShaderInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
18638+GLAPI void APIENTRY glGetShaderSource (GLuint, GLsizei, GLsizei *, GLchar *);
18639+GLAPI GLint APIENTRY glGetUniformLocation (GLuint, const GLchar *);
18640+GLAPI void APIENTRY glGetUniformfv (GLuint, GLint, GLfloat *);
18641+GLAPI void APIENTRY glGetUniformiv (GLuint, GLint, GLint *);
18642+GLAPI void APIENTRY glGetVertexAttribdv (GLuint, GLenum, GLdouble *);
18643+GLAPI void APIENTRY glGetVertexAttribfv (GLuint, GLenum, GLfloat *);
18644+GLAPI void APIENTRY glGetVertexAttribiv (GLuint, GLenum, GLint *);
18645+GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint, GLenum, GLvoid* *);
18646+GLAPI GLboolean APIENTRY glIsProgram (GLuint);
18647+GLAPI GLboolean APIENTRY glIsShader (GLuint);
18648+GLAPI void APIENTRY glLinkProgram (GLuint);
18649+GLAPI void APIENTRY glShaderSource (GLuint, GLsizei, const GLchar* *, const GLint *);
18650+GLAPI void APIENTRY glUseProgram (GLuint);
18651+GLAPI void APIENTRY glUniform1f (GLint, GLfloat);
18652+GLAPI void APIENTRY glUniform2f (GLint, GLfloat, GLfloat);
18653+GLAPI void APIENTRY glUniform3f (GLint, GLfloat, GLfloat, GLfloat);
18654+GLAPI void APIENTRY glUniform4f (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
18655+GLAPI void APIENTRY glUniform1i (GLint, GLint);
18656+GLAPI void APIENTRY glUniform2i (GLint, GLint, GLint);
18657+GLAPI void APIENTRY glUniform3i (GLint, GLint, GLint, GLint);
18658+GLAPI void APIENTRY glUniform4i (GLint, GLint, GLint, GLint, GLint);
18659+GLAPI void APIENTRY glUniform1fv (GLint, GLsizei, const GLfloat *);
18660+GLAPI void APIENTRY glUniform2fv (GLint, GLsizei, const GLfloat *);
18661+GLAPI void APIENTRY glUniform3fv (GLint, GLsizei, const GLfloat *);
18662+GLAPI void APIENTRY glUniform4fv (GLint, GLsizei, const GLfloat *);
18663+GLAPI void APIENTRY glUniform1iv (GLint, GLsizei, const GLint *);
18664+GLAPI void APIENTRY glUniform2iv (GLint, GLsizei, const GLint *);
18665+GLAPI void APIENTRY glUniform3iv (GLint, GLsizei, const GLint *);
18666+GLAPI void APIENTRY glUniform4iv (GLint, GLsizei, const GLint *);
18667+GLAPI void APIENTRY glUniformMatrix2fv (GLint, GLsizei, GLboolean, const GLfloat *);
18668+GLAPI void APIENTRY glUniformMatrix3fv (GLint, GLsizei, GLboolean, const GLfloat *);
18669+GLAPI void APIENTRY glUniformMatrix4fv (GLint, GLsizei, GLboolean, const GLfloat *);
18670+GLAPI void APIENTRY glValidateProgram (GLuint);
18671+GLAPI void APIENTRY glVertexAttrib1d (GLuint, GLdouble);
18672+GLAPI void APIENTRY glVertexAttrib1dv (GLuint, const GLdouble *);
18673+GLAPI void APIENTRY glVertexAttrib1f (GLuint, GLfloat);
18674+GLAPI void APIENTRY glVertexAttrib1fv (GLuint, const GLfloat *);
18675+GLAPI void APIENTRY glVertexAttrib1s (GLuint, GLshort);
18676+GLAPI void APIENTRY glVertexAttrib1sv (GLuint, const GLshort *);
18677+GLAPI void APIENTRY glVertexAttrib2d (GLuint, GLdouble, GLdouble);
18678+GLAPI void APIENTRY glVertexAttrib2dv (GLuint, const GLdouble *);
18679+GLAPI void APIENTRY glVertexAttrib2f (GLuint, GLfloat, GLfloat);
18680+GLAPI void APIENTRY glVertexAttrib2fv (GLuint, const GLfloat *);
18681+GLAPI void APIENTRY glVertexAttrib2s (GLuint, GLshort, GLshort);
18682+GLAPI void APIENTRY glVertexAttrib2sv (GLuint, const GLshort *);
18683+GLAPI void APIENTRY glVertexAttrib3d (GLuint, GLdouble, GLdouble, GLdouble);
18684+GLAPI void APIENTRY glVertexAttrib3dv (GLuint, const GLdouble *);
18685+GLAPI void APIENTRY glVertexAttrib3f (GLuint, GLfloat, GLfloat, GLfloat);
18686+GLAPI void APIENTRY glVertexAttrib3fv (GLuint, const GLfloat *);
18687+GLAPI void APIENTRY glVertexAttrib3s (GLuint, GLshort, GLshort, GLshort);
18688+GLAPI void APIENTRY glVertexAttrib3sv (GLuint, const GLshort *);
18689+GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint, const GLbyte *);
18690+GLAPI void APIENTRY glVertexAttrib4Niv (GLuint, const GLint *);
18691+GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint, const GLshort *);
18692+GLAPI void APIENTRY glVertexAttrib4Nub (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
18693+GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint, const GLubyte *);
18694+GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint, const GLuint *);
18695+GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint, const GLushort *);
18696+GLAPI void APIENTRY glVertexAttrib4bv (GLuint, const GLbyte *);
18697+GLAPI void APIENTRY glVertexAttrib4d (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
18698+GLAPI void APIENTRY glVertexAttrib4dv (GLuint, const GLdouble *);
18699+GLAPI void APIENTRY glVertexAttrib4f (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
18700+GLAPI void APIENTRY glVertexAttrib4fv (GLuint, const GLfloat *);
18701+GLAPI void APIENTRY glVertexAttrib4iv (GLuint, const GLint *);
18702+GLAPI void APIENTRY glVertexAttrib4s (GLuint, GLshort, GLshort, GLshort, GLshort);
18703+GLAPI void APIENTRY glVertexAttrib4sv (GLuint, const GLshort *);
18704+GLAPI void APIENTRY glVertexAttrib4ubv (GLuint, const GLubyte *);
18705+GLAPI void APIENTRY glVertexAttrib4uiv (GLuint, const GLuint *);
18706+GLAPI void APIENTRY glVertexAttrib4usv (GLuint, const GLushort *);
18707+GLAPI void APIENTRY glVertexAttribPointer (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
18708+#endif /* GL_GLEXT_PROTOTYPES */
18709+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
18710+typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs);
18711+typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
18712+typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
18713+typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
18714+typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
18715+typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
18716+typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
18717+typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
18718+typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
18719+typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
18720+typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
18721+typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
18722+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
18723+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
18724+typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
18725+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
18726+typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj);
18727+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
18728+typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
18729+typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
18730+typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
18731+typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
18732+typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
18733+typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
18734+typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
18735+typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
18736+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params);
18737+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
18738+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
18739+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
18740+typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
18741+typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
18742+typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
18743+typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length);
18744+typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
18745+typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
18746+typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
18747+typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
18748+typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
18749+typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
18750+typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
18751+typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
18752+typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
18753+typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18754+typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18755+typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18756+typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18757+typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
18758+typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
18759+typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
18760+typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
18761+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18762+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18763+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18764+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
18765+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);
18766+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v);
18767+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
18768+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
18769+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);
18770+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v);
18771+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);
18772+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v);
18773+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
18774+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
18775+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);
18776+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v);
18777+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
18778+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v);
18779+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
18780+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
18781+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
18782+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v);
18783+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v);
18784+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v);
18785+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v);
18786+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
18787+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v);
18788+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v);
18789+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v);
18790+typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v);
18791+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
18792+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v);
18793+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
18794+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
18795+typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v);
18796+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
18797+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v);
18798+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v);
18799+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v);
18800+typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v);
18801+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
18802+#endif
18803+
18804+#ifndef GL_VERSION_2_1
18805+#define GL_VERSION_2_1 1
18806+#ifdef GL_GLEXT_PROTOTYPES
18807+GLAPI void APIENTRY glUniformMatrix2x3fv (GLint, GLsizei, GLboolean, const GLfloat *);
18808+GLAPI void APIENTRY glUniformMatrix3x2fv (GLint, GLsizei, GLboolean, const GLfloat *);
18809+GLAPI void APIENTRY glUniformMatrix2x4fv (GLint, GLsizei, GLboolean, const GLfloat *);
18810+GLAPI void APIENTRY glUniformMatrix4x2fv (GLint, GLsizei, GLboolean, const GLfloat *);
18811+GLAPI void APIENTRY glUniformMatrix3x4fv (GLint, GLsizei, GLboolean, const GLfloat *);
18812+GLAPI void APIENTRY glUniformMatrix4x3fv (GLint, GLsizei, GLboolean, const GLfloat *);
18813+#endif /* GL_GLEXT_PROTOTYPES */
18814+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18815+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18816+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18817+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18818+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18819+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18820+#endif
18821+
18822+#ifndef GL_ARB_multitexture
18823+#define GL_ARB_multitexture 1
18824+#ifdef GL_GLEXT_PROTOTYPES
18825+GLAPI void APIENTRY glActiveTextureARB (GLenum);
18826+GLAPI void APIENTRY glClientActiveTextureARB (GLenum);
18827+GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum, GLdouble);
18828+GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum, const GLdouble *);
18829+GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum, GLfloat);
18830+GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum, const GLfloat *);
18831+GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum, GLint);
18832+GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum, const GLint *);
18833+GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum, GLshort);
18834+GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum, const GLshort *);
18835+GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum, GLdouble, GLdouble);
18836+GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum, const GLdouble *);
18837+GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum, GLfloat, GLfloat);
18838+GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum, const GLfloat *);
18839+GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum, GLint, GLint);
18840+GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum, const GLint *);
18841+GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum, GLshort, GLshort);
18842+GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum, const GLshort *);
18843+GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum, GLdouble, GLdouble, GLdouble);
18844+GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum, const GLdouble *);
18845+GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum, GLfloat, GLfloat, GLfloat);
18846+GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum, const GLfloat *);
18847+GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum, GLint, GLint, GLint);
18848+GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum, const GLint *);
18849+GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum, GLshort, GLshort, GLshort);
18850+GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum, const GLshort *);
18851+GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
18852+GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum, const GLdouble *);
18853+GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
18854+GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum, const GLfloat *);
18855+GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum, GLint, GLint, GLint, GLint);
18856+GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum, const GLint *);
18857+GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum, GLshort, GLshort, GLshort, GLshort);
18858+GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum, const GLshort *);
18859+#endif /* GL_GLEXT_PROTOTYPES */
18860+typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
18861+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
18862+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
18863+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
18864+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
18865+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
18866+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
18867+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
18868+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
18869+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
18870+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
18871+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
18872+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
18873+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
18874+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
18875+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
18876+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
18877+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
18878+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
18879+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
18880+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
18881+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
18882+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
18883+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
18884+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
18885+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
18886+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
18887+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
18888+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
18889+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
18890+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
18891+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
18892+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
18893+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
18894+#endif
18895+
18896+#ifndef GL_ARB_transpose_matrix
18897+#define GL_ARB_transpose_matrix 1
18898+#ifdef GL_GLEXT_PROTOTYPES
18899+GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *);
18900+GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *);
18901+GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *);
18902+GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *);
18903+#endif /* GL_GLEXT_PROTOTYPES */
18904+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
18905+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
18906+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
18907+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
18908+#endif
18909+
18910+#ifndef GL_ARB_multisample
18911+#define GL_ARB_multisample 1
18912+#ifdef GL_GLEXT_PROTOTYPES
18913+GLAPI void APIENTRY glSampleCoverageARB (GLclampf, GLboolean);
18914+#endif /* GL_GLEXT_PROTOTYPES */
18915+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert);
18916+#endif
18917+
18918+#ifndef GL_ARB_texture_env_add
18919+#define GL_ARB_texture_env_add 1
18920+#endif
18921+
18922+#ifndef GL_ARB_texture_cube_map
18923+#define GL_ARB_texture_cube_map 1
18924+#endif
18925+
18926+#ifndef GL_ARB_texture_compression
18927+#define GL_ARB_texture_compression 1
18928+#ifdef GL_GLEXT_PROTOTYPES
18929+GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
18930+GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
18931+GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
18932+GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
18933+GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
18934+GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
18935+GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum, GLint, GLvoid *);
18936+#endif /* GL_GLEXT_PROTOTYPES */
18937+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
18938+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
18939+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
18940+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);
18941+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
18942+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
18943+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid *img);
18944+#endif
18945+
18946+#ifndef GL_ARB_texture_border_clamp
18947+#define GL_ARB_texture_border_clamp 1
18948+#endif
18949+
18950+#ifndef GL_ARB_point_parameters
18951+#define GL_ARB_point_parameters 1
18952+#ifdef GL_GLEXT_PROTOTYPES
18953+GLAPI void APIENTRY glPointParameterfARB (GLenum, GLfloat);
18954+GLAPI void APIENTRY glPointParameterfvARB (GLenum, const GLfloat *);
18955+#endif /* GL_GLEXT_PROTOTYPES */
18956+typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param);
18957+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params);
18958+#endif
18959+
18960+#ifndef GL_ARB_vertex_blend
18961+#define GL_ARB_vertex_blend 1
18962+#ifdef GL_GLEXT_PROTOTYPES
18963+GLAPI void APIENTRY glWeightbvARB (GLint, const GLbyte *);
18964+GLAPI void APIENTRY glWeightsvARB (GLint, const GLshort *);
18965+GLAPI void APIENTRY glWeightivARB (GLint, const GLint *);
18966+GLAPI void APIENTRY glWeightfvARB (GLint, const GLfloat *);
18967+GLAPI void APIENTRY glWeightdvARB (GLint, const GLdouble *);
18968+GLAPI void APIENTRY glWeightubvARB (GLint, const GLubyte *);
18969+GLAPI void APIENTRY glWeightusvARB (GLint, const GLushort *);
18970+GLAPI void APIENTRY glWeightuivARB (GLint, const GLuint *);
18971+GLAPI void APIENTRY glWeightPointerARB (GLint, GLenum, GLsizei, const GLvoid *);
18972+GLAPI void APIENTRY glVertexBlendARB (GLint);
18973+#endif /* GL_GLEXT_PROTOTYPES */
18974+typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights);
18975+typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights);
18976+typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights);
18977+typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights);
18978+typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights);
18979+typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights);
18980+typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights);
18981+typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights);
18982+typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
18983+typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count);
18984+#endif
18985+
18986+#ifndef GL_ARB_matrix_palette
18987+#define GL_ARB_matrix_palette 1
18988+#ifdef GL_GLEXT_PROTOTYPES
18989+GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint);
18990+GLAPI void APIENTRY glMatrixIndexubvARB (GLint, const GLubyte *);
18991+GLAPI void APIENTRY glMatrixIndexusvARB (GLint, const GLushort *);
18992+GLAPI void APIENTRY glMatrixIndexuivARB (GLint, const GLuint *);
18993+GLAPI void APIENTRY glMatrixIndexPointerARB (GLint, GLenum, GLsizei, const GLvoid *);
18994+#endif /* GL_GLEXT_PROTOTYPES */
18995+typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index);
18996+typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices);
18997+typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices);
18998+typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices);
18999+typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
19000+#endif
19001+
19002+#ifndef GL_ARB_texture_env_combine
19003+#define GL_ARB_texture_env_combine 1
19004+#endif
19005+
19006+#ifndef GL_ARB_texture_env_crossbar
19007+#define GL_ARB_texture_env_crossbar 1
19008+#endif
19009+
19010+#ifndef GL_ARB_texture_env_dot3
19011+#define GL_ARB_texture_env_dot3 1
19012+#endif
19013+
19014+#ifndef GL_ARB_texture_mirrored_repeat
19015+#define GL_ARB_texture_mirrored_repeat 1
19016+#endif
19017+
19018+#ifndef GL_ARB_depth_texture
19019+#define GL_ARB_depth_texture 1
19020+#endif
19021+
19022+#ifndef GL_ARB_shadow
19023+#define GL_ARB_shadow 1
19024+#endif
19025+
19026+#ifndef GL_ARB_shadow_ambient
19027+#define GL_ARB_shadow_ambient 1
19028+#endif
19029+
19030+#ifndef GL_ARB_window_pos
19031+#define GL_ARB_window_pos 1
19032+#ifdef GL_GLEXT_PROTOTYPES
19033+GLAPI void APIENTRY glWindowPos2dARB (GLdouble, GLdouble);
19034+GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *);
19035+GLAPI void APIENTRY glWindowPos2fARB (GLfloat, GLfloat);
19036+GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *);
19037+GLAPI void APIENTRY glWindowPos2iARB (GLint, GLint);
19038+GLAPI void APIENTRY glWindowPos2ivARB (const GLint *);
19039+GLAPI void APIENTRY glWindowPos2sARB (GLshort, GLshort);
19040+GLAPI void APIENTRY glWindowPos2svARB (const GLshort *);
19041+GLAPI void APIENTRY glWindowPos3dARB (GLdouble, GLdouble, GLdouble);
19042+GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *);
19043+GLAPI void APIENTRY glWindowPos3fARB (GLfloat, GLfloat, GLfloat);
19044+GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *);
19045+GLAPI void APIENTRY glWindowPos3iARB (GLint, GLint, GLint);
19046+GLAPI void APIENTRY glWindowPos3ivARB (const GLint *);
19047+GLAPI void APIENTRY glWindowPos3sARB (GLshort, GLshort, GLshort);
19048+GLAPI void APIENTRY glWindowPos3svARB (const GLshort *);
19049+#endif /* GL_GLEXT_PROTOTYPES */
19050+typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y);
19051+typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v);
19052+typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y);
19053+typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v);
19054+typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y);
19055+typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v);
19056+typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y);
19057+typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v);
19058+typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z);
19059+typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v);
19060+typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z);
19061+typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v);
19062+typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z);
19063+typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v);
19064+typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z);
19065+typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v);
19066+#endif
19067+
19068+#ifndef GL_ARB_vertex_program
19069+#define GL_ARB_vertex_program 1
19070+#ifdef GL_GLEXT_PROTOTYPES
19071+GLAPI void APIENTRY glVertexAttrib1dARB (GLuint, GLdouble);
19072+GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint, const GLdouble *);
19073+GLAPI void APIENTRY glVertexAttrib1fARB (GLuint, GLfloat);
19074+GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint, const GLfloat *);
19075+GLAPI void APIENTRY glVertexAttrib1sARB (GLuint, GLshort);
19076+GLAPI void APIENTRY glVertexAttrib1svARB (GLuint, const GLshort *);
19077+GLAPI void APIENTRY glVertexAttrib2dARB (GLuint, GLdouble, GLdouble);
19078+GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint, const GLdouble *);
19079+GLAPI void APIENTRY glVertexAttrib2fARB (GLuint, GLfloat, GLfloat);
19080+GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint, const GLfloat *);
19081+GLAPI void APIENTRY glVertexAttrib2sARB (GLuint, GLshort, GLshort);
19082+GLAPI void APIENTRY glVertexAttrib2svARB (GLuint, const GLshort *);
19083+GLAPI void APIENTRY glVertexAttrib3dARB (GLuint, GLdouble, GLdouble, GLdouble);
19084+GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint, const GLdouble *);
19085+GLAPI void APIENTRY glVertexAttrib3fARB (GLuint, GLfloat, GLfloat, GLfloat);
19086+GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint, const GLfloat *);
19087+GLAPI void APIENTRY glVertexAttrib3sARB (GLuint, GLshort, GLshort, GLshort);
19088+GLAPI void APIENTRY glVertexAttrib3svARB (GLuint, const GLshort *);
19089+GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint, const GLbyte *);
19090+GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint, const GLint *);
19091+GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint, const GLshort *);
19092+GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
19093+GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint, const GLubyte *);
19094+GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint, const GLuint *);
19095+GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint, const GLushort *);
19096+GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint, const GLbyte *);
19097+GLAPI void APIENTRY glVertexAttrib4dARB (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
19098+GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint, const GLdouble *);
19099+GLAPI void APIENTRY glVertexAttrib4fARB (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
19100+GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint, const GLfloat *);
19101+GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint, const GLint *);
19102+GLAPI void APIENTRY glVertexAttrib4sARB (GLuint, GLshort, GLshort, GLshort, GLshort);
19103+GLAPI void APIENTRY glVertexAttrib4svARB (GLuint, const GLshort *);
19104+GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint, const GLubyte *);
19105+GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint, const GLuint *);
19106+GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint, const GLushort *);
19107+GLAPI void APIENTRY glVertexAttribPointerARB (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
19108+GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint);
19109+GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint);
19110+GLAPI void APIENTRY glProgramStringARB (GLenum, GLenum, GLsizei, const GLvoid *);
19111+GLAPI void APIENTRY glBindProgramARB (GLenum, GLuint);
19112+GLAPI void APIENTRY glDeleteProgramsARB (GLsizei, const GLuint *);
19113+GLAPI void APIENTRY glGenProgramsARB (GLsizei, GLuint *);
19114+GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
19115+GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum, GLuint, const GLdouble *);
19116+GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
19117+GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum, GLuint, const GLfloat *);
19118+GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
19119+GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum, GLuint, const GLdouble *);
19120+GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
19121+GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum, GLuint, const GLfloat *);
19122+GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum, GLuint, GLdouble *);
19123+GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum, GLuint, GLfloat *);
19124+GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum, GLuint, GLdouble *);
19125+GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum, GLuint, GLfloat *);
19126+GLAPI void APIENTRY glGetProgramivARB (GLenum, GLenum, GLint *);
19127+GLAPI void APIENTRY glGetProgramStringARB (GLenum, GLenum, GLvoid *);
19128+GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint, GLenum, GLdouble *);
19129+GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint, GLenum, GLfloat *);
19130+GLAPI void APIENTRY glGetVertexAttribivARB (GLuint, GLenum, GLint *);
19131+GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint, GLenum, GLvoid* *);
19132+GLAPI GLboolean APIENTRY glIsProgramARB (GLuint);
19133+#endif /* GL_GLEXT_PROTOTYPES */
19134+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x);
19135+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v);
19136+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);
19137+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v);
19138+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x);
19139+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v);
19140+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y);
19141+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v);
19142+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);
19143+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v);
19144+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y);
19145+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v);
19146+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
19147+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v);
19148+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
19149+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v);
19150+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
19151+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v);
19152+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v);
19153+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v);
19154+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v);
19155+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
19156+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v);
19157+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v);
19158+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v);
19159+typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v);
19160+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
19161+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v);
19162+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
19163+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v);
19164+typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v);
19165+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
19166+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v);
19167+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v);
19168+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v);
19169+typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v);
19170+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
19171+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
19172+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
19173+typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string);
19174+typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program);
19175+typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs);
19176+typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs);
19177+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
19178+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
19179+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
19180+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
19181+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
19182+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
19183+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
19184+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
19185+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
19186+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
19187+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
19188+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
19189+typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);
19190+typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string);
19191+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params);
19192+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params);
19193+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params);
19194+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
19195+typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program);
19196+#endif
19197+
19198+#ifndef GL_ARB_fragment_program
19199+#define GL_ARB_fragment_program 1
19200+/* All ARB_fragment_program entry points are shared with ARB_vertex_program. */
19201+#endif
19202+
19203+#ifndef GL_ARB_vertex_buffer_object
19204+#define GL_ARB_vertex_buffer_object 1
19205+#ifdef GL_GLEXT_PROTOTYPES
19206+GLAPI void APIENTRY glBindBufferARB (GLenum, GLuint);
19207+GLAPI void APIENTRY glDeleteBuffersARB (GLsizei, const GLuint *);
19208+GLAPI void APIENTRY glGenBuffersARB (GLsizei, GLuint *);
19209+GLAPI GLboolean APIENTRY glIsBufferARB (GLuint);
19210+GLAPI void APIENTRY glBufferDataARB (GLenum, GLsizeiptrARB, const GLvoid *, GLenum);
19211+GLAPI void APIENTRY glBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *);
19212+GLAPI void APIENTRY glGetBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *);
19213+GLAPI GLvoid* APIENTRY glMapBufferARB (GLenum, GLenum);
19214+GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum);
19215+GLAPI void APIENTRY glGetBufferParameterivARB (GLenum, GLenum, GLint *);
19216+GLAPI void APIENTRY glGetBufferPointervARB (GLenum, GLenum, GLvoid* *);
19217+#endif /* GL_GLEXT_PROTOTYPES */
19218+typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
19219+typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers);
19220+typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers);
19221+typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer);
19222+typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage);
19223+typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data);
19224+typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data);
19225+typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);
19226+typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target);
19227+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params);
19228+typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params);
19229+#endif
19230+
19231+#ifndef GL_ARB_occlusion_query
19232+#define GL_ARB_occlusion_query 1
19233+#ifdef GL_GLEXT_PROTOTYPES
19234+GLAPI void APIENTRY glGenQueriesARB (GLsizei, GLuint *);
19235+GLAPI void APIENTRY glDeleteQueriesARB (GLsizei, const GLuint *);
19236+GLAPI GLboolean APIENTRY glIsQueryARB (GLuint);
19237+GLAPI void APIENTRY glBeginQueryARB (GLenum, GLuint);
19238+GLAPI void APIENTRY glEndQueryARB (GLenum);
19239+GLAPI void APIENTRY glGetQueryivARB (GLenum, GLenum, GLint *);
19240+GLAPI void APIENTRY glGetQueryObjectivARB (GLuint, GLenum, GLint *);
19241+GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint, GLenum, GLuint *);
19242+#endif /* GL_GLEXT_PROTOTYPES */
19243+typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids);
19244+typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids);
19245+typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id);
19246+typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id);
19247+typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target);
19248+typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params);
19249+typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params);
19250+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params);
19251+#endif
19252+
19253+#ifndef GL_ARB_shader_objects
19254+#define GL_ARB_shader_objects 1
19255+#ifdef GL_GLEXT_PROTOTYPES
19256+GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB);
19257+GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum);
19258+GLAPI void APIENTRY glDetachObjectARB (GLhandleARB, GLhandleARB);
19259+GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum);
19260+GLAPI void APIENTRY glShaderSourceARB (GLhandleARB, GLsizei, const GLcharARB* *, const GLint *);
19261+GLAPI void APIENTRY glCompileShaderARB (GLhandleARB);
19262+GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void);
19263+GLAPI void APIENTRY glAttachObjectARB (GLhandleARB, GLhandleARB);
19264+GLAPI void APIENTRY glLinkProgramARB (GLhandleARB);
19265+GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB);
19266+GLAPI void APIENTRY glValidateProgramARB (GLhandleARB);
19267+GLAPI void APIENTRY glUniform1fARB (GLint, GLfloat);
19268+GLAPI void APIENTRY glUniform2fARB (GLint, GLfloat, GLfloat);
19269+GLAPI void APIENTRY glUniform3fARB (GLint, GLfloat, GLfloat, GLfloat);
19270+GLAPI void APIENTRY glUniform4fARB (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
19271+GLAPI void APIENTRY glUniform1iARB (GLint, GLint);
19272+GLAPI void APIENTRY glUniform2iARB (GLint, GLint, GLint);
19273+GLAPI void APIENTRY glUniform3iARB (GLint, GLint, GLint, GLint);
19274+GLAPI void APIENTRY glUniform4iARB (GLint, GLint, GLint, GLint, GLint);
19275+GLAPI void APIENTRY glUniform1fvARB (GLint, GLsizei, const GLfloat *);
19276+GLAPI void APIENTRY glUniform2fvARB (GLint, GLsizei, const GLfloat *);
19277+GLAPI void APIENTRY glUniform3fvARB (GLint, GLsizei, const GLfloat *);
19278+GLAPI void APIENTRY glUniform4fvARB (GLint, GLsizei, const GLfloat *);
19279+GLAPI void APIENTRY glUniform1ivARB (GLint, GLsizei, const GLint *);
19280+GLAPI void APIENTRY glUniform2ivARB (GLint, GLsizei, const GLint *);
19281+GLAPI void APIENTRY glUniform3ivARB (GLint, GLsizei, const GLint *);
19282+GLAPI void APIENTRY glUniform4ivARB (GLint, GLsizei, const GLint *);
19283+GLAPI void APIENTRY glUniformMatrix2fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
19284+GLAPI void APIENTRY glUniformMatrix3fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
19285+GLAPI void APIENTRY glUniformMatrix4fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
19286+GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB, GLenum, GLfloat *);
19287+GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB, GLenum, GLint *);
19288+GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
19289+GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB, GLsizei, GLsizei *, GLhandleARB *);
19290+GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB, const GLcharARB *);
19291+GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
19292+GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB, GLint, GLfloat *);
19293+GLAPI void APIENTRY glGetUniformivARB (GLhandleARB, GLint, GLint *);
19294+GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
19295+#endif /* GL_GLEXT_PROTOTYPES */
19296+typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj);
19297+typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname);
19298+typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj);
19299+typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType);
19300+typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length);
19301+typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj);
19302+typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void);
19303+typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj);
19304+typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj);
19305+typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj);
19306+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj);
19307+typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0);
19308+typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1);
19309+typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
19310+typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
19311+typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0);
19312+typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1);
19313+typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2);
19314+typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
19315+typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
19316+typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
19317+typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
19318+typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
19319+typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value);
19320+typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value);
19321+typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value);
19322+typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value);
19323+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
19324+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
19325+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
19326+typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params);
19327+typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params);
19328+typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
19329+typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
19330+typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
19331+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
19332+typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params);
19333+typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params);
19334+typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
19335+#endif
19336+
19337+#ifndef GL_ARB_vertex_shader
19338+#define GL_ARB_vertex_shader 1
19339+#ifdef GL_GLEXT_PROTOTYPES
19340+GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB, GLuint, const GLcharARB *);
19341+GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
19342+GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB, const GLcharARB *);
19343+#endif /* GL_GLEXT_PROTOTYPES */
19344+typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name);
19345+typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
19346+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
19347+#endif
19348+
19349+#ifndef GL_ARB_fragment_shader
19350+#define GL_ARB_fragment_shader 1
19351+#endif
19352+
19353+#ifndef GL_ARB_shading_language_100
19354+#define GL_ARB_shading_language_100 1
19355+#endif
19356+
19357+#ifndef GL_ARB_texture_non_power_of_two
19358+#define GL_ARB_texture_non_power_of_two 1
19359+#endif
19360+
19361+#ifndef GL_ARB_point_sprite
19362+#define GL_ARB_point_sprite 1
19363+#endif
19364+
19365+#ifndef GL_ARB_fragment_program_shadow
19366+#define GL_ARB_fragment_program_shadow 1
19367+#endif
19368+
19369+#ifndef GL_ARB_draw_buffers
19370+#define GL_ARB_draw_buffers 1
19371+#ifdef GL_GLEXT_PROTOTYPES
19372+GLAPI void APIENTRY glDrawBuffersARB (GLsizei, const GLenum *);
19373+#endif /* GL_GLEXT_PROTOTYPES */
19374+typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs);
19375+#endif
19376+
19377+#ifndef GL_ARB_texture_rectangle
19378+#define GL_ARB_texture_rectangle 1
19379+#endif
19380+
19381+#ifndef GL_ARB_color_buffer_float
19382+#define GL_ARB_color_buffer_float 1
19383+#ifdef GL_GLEXT_PROTOTYPES
19384+GLAPI void APIENTRY glClampColorARB (GLenum, GLenum);
19385+#endif /* GL_GLEXT_PROTOTYPES */
19386+typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);
19387+#endif
19388+
19389+#ifndef GL_ARB_half_float_pixel
19390+#define GL_ARB_half_float_pixel 1
19391+#endif
19392+
19393+#ifndef GL_ARB_texture_float
19394+#define GL_ARB_texture_float 1
19395+#endif
19396+
19397+#ifndef GL_ARB_pixel_buffer_object
19398+#define GL_ARB_pixel_buffer_object 1
19399+#endif
19400+
19401+#ifndef GL_EXT_abgr
19402+#define GL_EXT_abgr 1
19403+#endif
19404+
19405+#ifndef GL_EXT_blend_color
19406+#define GL_EXT_blend_color 1
19407+#ifdef GL_GLEXT_PROTOTYPES
19408+GLAPI void APIENTRY glBlendColorEXT (GLclampf, GLclampf, GLclampf, GLclampf);
19409+#endif /* GL_GLEXT_PROTOTYPES */
19410+typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
19411+#endif
19412+
19413+#ifndef GL_EXT_polygon_offset
19414+#define GL_EXT_polygon_offset 1
19415+#ifdef GL_GLEXT_PROTOTYPES
19416+GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat, GLfloat);
19417+#endif /* GL_GLEXT_PROTOTYPES */
19418+typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias);
19419+#endif
19420+
19421+#ifndef GL_EXT_texture
19422+#define GL_EXT_texture 1
19423+#endif
19424+
19425+#ifndef GL_EXT_texture3D
19426+#define GL_EXT_texture3D 1
19427+#ifdef GL_GLEXT_PROTOTYPES
19428+GLAPI void APIENTRY glTexImage3DEXT (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
19429+GLAPI void APIENTRY glTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19430+#endif /* GL_GLEXT_PROTOTYPES */
19431+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);
19432+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);
19433+#endif
19434+
19435+#ifndef GL_SGIS_texture_filter4
19436+#define GL_SGIS_texture_filter4 1
19437+#ifdef GL_GLEXT_PROTOTYPES
19438+GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum, GLenum, GLfloat *);
19439+GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum, GLenum, GLsizei, const GLfloat *);
19440+#endif /* GL_GLEXT_PROTOTYPES */
19441+typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights);
19442+typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);
19443+#endif
19444+
19445+#ifndef GL_EXT_subtexture
19446+#define GL_EXT_subtexture 1
19447+#ifdef GL_GLEXT_PROTOTYPES
19448+GLAPI void APIENTRY glTexSubImage1DEXT (GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *);
19449+GLAPI void APIENTRY glTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19450+#endif /* GL_GLEXT_PROTOTYPES */
19451+typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
19452+typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
19453+#endif
19454+
19455+#ifndef GL_EXT_copy_texture
19456+#define GL_EXT_copy_texture 1
19457+#ifdef GL_GLEXT_PROTOTYPES
19458+GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint);
19459+GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint);
19460+GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei);
19461+GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
19462+GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
19463+#endif /* GL_GLEXT_PROTOTYPES */
19464+typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
19465+typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
19466+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
19467+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
19468+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
19469+#endif
19470+
19471+#ifndef GL_EXT_histogram
19472+#define GL_EXT_histogram 1
19473+#ifdef GL_GLEXT_PROTOTYPES
19474+GLAPI void APIENTRY glGetHistogramEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
19475+GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum, GLenum, GLfloat *);
19476+GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum, GLenum, GLint *);
19477+GLAPI void APIENTRY glGetMinmaxEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
19478+GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum, GLenum, GLfloat *);
19479+GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum, GLenum, GLint *);
19480+GLAPI void APIENTRY glHistogramEXT (GLenum, GLsizei, GLenum, GLboolean);
19481+GLAPI void APIENTRY glMinmaxEXT (GLenum, GLenum, GLboolean);
19482+GLAPI void APIENTRY glResetHistogramEXT (GLenum);
19483+GLAPI void APIENTRY glResetMinmaxEXT (GLenum);
19484+#endif /* GL_GLEXT_PROTOTYPES */
19485+typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
19486+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19487+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19488+typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
19489+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19490+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19491+typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
19492+typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink);
19493+typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target);
19494+typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target);
19495+#endif
19496+
19497+#ifndef GL_EXT_convolution
19498+#define GL_EXT_convolution 1
19499+#ifdef GL_GLEXT_PROTOTYPES
19500+GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
19501+GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19502+GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum, GLenum, GLfloat);
19503+GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum, GLenum, const GLfloat *);
19504+GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum, GLenum, GLint);
19505+GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum, GLenum, const GLint *);
19506+GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum, GLenum, GLint, GLint, GLsizei);
19507+GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
19508+GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum, GLenum, GLenum, GLvoid *);
19509+GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum, GLenum, GLfloat *);
19510+GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum, GLenum, GLint *);
19511+GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
19512+GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
19513+#endif /* GL_GLEXT_PROTOTYPES */
19514+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
19515+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
19516+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params);
19517+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
19518+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params);
19519+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
19520+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
19521+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
19522+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
19523+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19524+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19525+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
19526+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
19527+#endif
19528+
19529+#ifndef GL_SGI_color_matrix
19530+#define GL_SGI_color_matrix 1
19531+#endif
19532+
19533+#ifndef GL_SGI_color_table
19534+#define GL_SGI_color_table 1
19535+#ifdef GL_GLEXT_PROTOTYPES
19536+GLAPI void APIENTRY glColorTableSGI (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
19537+GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum, GLenum, const GLfloat *);
19538+GLAPI void APIENTRY glColorTableParameterivSGI (GLenum, GLenum, const GLint *);
19539+GLAPI void APIENTRY glCopyColorTableSGI (GLenum, GLenum, GLint, GLint, GLsizei);
19540+GLAPI void APIENTRY glGetColorTableSGI (GLenum, GLenum, GLenum, GLvoid *);
19541+GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum, GLenum, GLfloat *);
19542+GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum, GLenum, GLint *);
19543+#endif /* GL_GLEXT_PROTOTYPES */
19544+typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
19545+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params);
19546+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params);
19547+typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
19548+typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
19549+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params);
19550+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params);
19551+#endif
19552+
19553+#ifndef GL_SGIX_pixel_texture
19554+#define GL_SGIX_pixel_texture 1
19555+#ifdef GL_GLEXT_PROTOTYPES
19556+GLAPI void APIENTRY glPixelTexGenSGIX (GLenum);
19557+#endif /* GL_GLEXT_PROTOTYPES */
19558+typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode);
19559+#endif
19560+
19561+#ifndef GL_SGIS_pixel_texture
19562+#define GL_SGIS_pixel_texture 1
19563+#ifdef GL_GLEXT_PROTOTYPES
19564+GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum, GLint);
19565+GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum, const GLint *);
19566+GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum, GLfloat);
19567+GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum, const GLfloat *);
19568+GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum, GLint *);
19569+GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum, GLfloat *);
19570+#endif /* GL_GLEXT_PROTOTYPES */
19571+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param);
19572+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params);
19573+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
19574+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
19575+typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params);
19576+typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params);
19577+#endif
19578+
19579+#ifndef GL_SGIS_texture4D
19580+#define GL_SGIS_texture4D 1
19581+#ifdef GL_GLEXT_PROTOTYPES
19582+GLAPI void APIENTRY glTexImage4DSGIS (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
19583+GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19584+#endif /* GL_GLEXT_PROTOTYPES */
19585+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);
19586+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);
19587+#endif
19588+
19589+#ifndef GL_SGI_texture_color_table
19590+#define GL_SGI_texture_color_table 1
19591+#endif
19592+
19593+#ifndef GL_EXT_cmyka
19594+#define GL_EXT_cmyka 1
19595+#endif
19596+
19597+#ifndef GL_EXT_texture_object
19598+#define GL_EXT_texture_object 1
19599+#ifdef GL_GLEXT_PROTOTYPES
19600+GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei, const GLuint *, GLboolean *);
19601+GLAPI void APIENTRY glBindTextureEXT (GLenum, GLuint);
19602+GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei, const GLuint *);
19603+GLAPI void APIENTRY glGenTexturesEXT (GLsizei, GLuint *);
19604+GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint);
19605+GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei, const GLuint *, const GLclampf *);
19606+#endif /* GL_GLEXT_PROTOTYPES */
19607+typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences);
19608+typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture);
19609+typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures);
19610+typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures);
19611+typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture);
19612+typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities);
19613+#endif
19614+
19615+#ifndef GL_SGIS_detail_texture
19616+#define GL_SGIS_detail_texture 1
19617+#ifdef GL_GLEXT_PROTOTYPES
19618+GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum, GLsizei, const GLfloat *);
19619+GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum, GLfloat *);
19620+#endif /* GL_GLEXT_PROTOTYPES */
19621+typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
19622+typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
19623+#endif
19624+
19625+#ifndef GL_SGIS_sharpen_texture
19626+#define GL_SGIS_sharpen_texture 1
19627+#ifdef GL_GLEXT_PROTOTYPES
19628+GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum, GLsizei, const GLfloat *);
19629+GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum, GLfloat *);
19630+#endif /* GL_GLEXT_PROTOTYPES */
19631+typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
19632+typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
19633+#endif
19634+
19635+#ifndef GL_EXT_packed_pixels
19636+#define GL_EXT_packed_pixels 1
19637+#endif
19638+
19639+#ifndef GL_SGIS_texture_lod
19640+#define GL_SGIS_texture_lod 1
19641+#endif
19642+
19643+#ifndef GL_SGIS_multisample
19644+#define GL_SGIS_multisample 1
19645+#ifdef GL_GLEXT_PROTOTYPES
19646+GLAPI void APIENTRY glSampleMaskSGIS (GLclampf, GLboolean);
19647+GLAPI void APIENTRY glSamplePatternSGIS (GLenum);
19648+#endif /* GL_GLEXT_PROTOTYPES */
19649+typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert);
19650+typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern);
19651+#endif
19652+
19653+#ifndef GL_EXT_rescale_normal
19654+#define GL_EXT_rescale_normal 1
19655+#endif
19656+
19657+#ifndef GL_EXT_vertex_array
19658+#define GL_EXT_vertex_array 1
19659+#ifdef GL_GLEXT_PROTOTYPES
19660+GLAPI void APIENTRY glArrayElementEXT (GLint);
19661+GLAPI void APIENTRY glColorPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
19662+GLAPI void APIENTRY glDrawArraysEXT (GLenum, GLint, GLsizei);
19663+GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei, GLsizei, const GLboolean *);
19664+GLAPI void APIENTRY glGetPointervEXT (GLenum, GLvoid* *);
19665+GLAPI void APIENTRY glIndexPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *);
19666+GLAPI void APIENTRY glNormalPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *);
19667+GLAPI void APIENTRY glTexCoordPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
19668+GLAPI void APIENTRY glVertexPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
19669+#endif /* GL_GLEXT_PROTOTYPES */
19670+typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i);
19671+typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19672+typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);
19673+typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer);
19674+typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params);
19675+typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19676+typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19677+typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19678+typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19679+#endif
19680+
19681+#ifndef GL_EXT_misc_attribute
19682+#define GL_EXT_misc_attribute 1
19683+#endif
19684+
19685+#ifndef GL_SGIS_generate_mipmap
19686+#define GL_SGIS_generate_mipmap 1
19687+#endif
19688+
19689+#ifndef GL_SGIX_clipmap
19690+#define GL_SGIX_clipmap 1
19691+#endif
19692+
19693+#ifndef GL_SGIX_shadow
19694+#define GL_SGIX_shadow 1
19695+#endif
19696+
19697+#ifndef GL_SGIS_texture_edge_clamp
19698+#define GL_SGIS_texture_edge_clamp 1
19699+#endif
19700+
19701+#ifndef GL_SGIS_texture_border_clamp
19702+#define GL_SGIS_texture_border_clamp 1
19703+#endif
19704+
19705+#ifndef GL_EXT_blend_minmax
19706+#define GL_EXT_blend_minmax 1
19707+#ifdef GL_GLEXT_PROTOTYPES
19708+GLAPI void APIENTRY glBlendEquationEXT (GLenum);
19709+#endif /* GL_GLEXT_PROTOTYPES */
19710+typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode);
19711+#endif
19712+
19713+#ifndef GL_EXT_blend_subtract
19714+#define GL_EXT_blend_subtract 1
19715+#endif
19716+
19717+#ifndef GL_EXT_blend_logic_op
19718+#define GL_EXT_blend_logic_op 1
19719+#endif
19720+
19721+#ifndef GL_SGIX_interlace
19722+#define GL_SGIX_interlace 1
19723+#endif
19724+
19725+#ifndef GL_SGIX_pixel_tiles
19726+#define GL_SGIX_pixel_tiles 1
19727+#endif
19728+
19729+#ifndef GL_SGIX_texture_select
19730+#define GL_SGIX_texture_select 1
19731+#endif
19732+
19733+#ifndef GL_SGIX_sprite
19734+#define GL_SGIX_sprite 1
19735+#ifdef GL_GLEXT_PROTOTYPES
19736+GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum, GLfloat);
19737+GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum, const GLfloat *);
19738+GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum, GLint);
19739+GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum, const GLint *);
19740+#endif /* GL_GLEXT_PROTOTYPES */
19741+typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param);
19742+typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params);
19743+typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param);
19744+typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params);
19745+#endif
19746+
19747+#ifndef GL_SGIX_texture_multi_buffer
19748+#define GL_SGIX_texture_multi_buffer 1
19749+#endif
19750+
19751+#ifndef GL_EXT_point_parameters
19752+#define GL_EXT_point_parameters 1
19753+#ifdef GL_GLEXT_PROTOTYPES
19754+GLAPI void APIENTRY glPointParameterfEXT (GLenum, GLfloat);
19755+GLAPI void APIENTRY glPointParameterfvEXT (GLenum, const GLfloat *);
19756+/* ERO Begin */
19757+GLAPI void APIENTRY glPointParameteriEXT (GLenum, GLint);
19758+GLAPI void APIENTRY glPointParameterivEXT (GLenum, const GLint *);
19759+/* ERO end */
19760+#endif /* GL_GLEXT_PROTOTYPES */
19761+typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);
19762+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params);
19763+#endif
19764+
19765+#ifndef GL_SGIS_point_parameters
19766+#define GL_SGIS_point_parameters 1
19767+#ifdef GL_GLEXT_PROTOTYPES
19768+GLAPI void APIENTRY glPointParameterfSGIS (GLenum, GLfloat);
19769+GLAPI void APIENTRY glPointParameterfvSGIS (GLenum, const GLfloat *);
19770+#endif /* GL_GLEXT_PROTOTYPES */
19771+typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
19772+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
19773+#endif
19774+
19775+#ifndef GL_SGIX_instruments
19776+#define GL_SGIX_instruments 1
19777+#ifdef GL_GLEXT_PROTOTYPES
19778+GLAPI GLint APIENTRY glGetInstrumentsSGIX (void);
19779+GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei, GLint *);
19780+GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *);
19781+GLAPI void APIENTRY glReadInstrumentsSGIX (GLint);
19782+GLAPI void APIENTRY glStartInstrumentsSGIX (void);
19783+GLAPI void APIENTRY glStopInstrumentsSGIX (GLint);
19784+#endif /* GL_GLEXT_PROTOTYPES */
19785+typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void);
19786+typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer);
19787+typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p);
19788+typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker);
19789+typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void);
19790+typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker);
19791+#endif
19792+
19793+#ifndef GL_SGIX_texture_scale_bias
19794+#define GL_SGIX_texture_scale_bias 1
19795+#endif
19796+
19797+#ifndef GL_SGIX_framezoom
19798+#define GL_SGIX_framezoom 1
19799+#ifdef GL_GLEXT_PROTOTYPES
19800+GLAPI void APIENTRY glFrameZoomSGIX (GLint);
19801+#endif /* GL_GLEXT_PROTOTYPES */
19802+typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor);
19803+#endif
19804+
19805+#ifndef GL_SGIX_tag_sample_buffer
19806+#define GL_SGIX_tag_sample_buffer 1
19807+#ifdef GL_GLEXT_PROTOTYPES
19808+GLAPI void APIENTRY glTagSampleBufferSGIX (void);
19809+#endif /* GL_GLEXT_PROTOTYPES */
19810+typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void);
19811+#endif
19812+
19813+#ifndef GL_SGIX_polynomial_ffd
19814+#define GL_SGIX_polynomial_ffd 1
19815+#ifdef GL_GLEXT_PROTOTYPES
19816+GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *);
19817+GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *);
19818+GLAPI void APIENTRY glDeformSGIX (GLbitfield);
19819+GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield);
19820+#endif /* GL_GLEXT_PROTOTYPES */
19821+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);
19822+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);
19823+typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask);
19824+typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask);
19825+#endif
19826+
19827+#ifndef GL_SGIX_reference_plane
19828+#define GL_SGIX_reference_plane 1
19829+#ifdef GL_GLEXT_PROTOTYPES
19830+GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *);
19831+#endif /* GL_GLEXT_PROTOTYPES */
19832+typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation);
19833+#endif
19834+
19835+#ifndef GL_SGIX_flush_raster
19836+#define GL_SGIX_flush_raster 1
19837+#ifdef GL_GLEXT_PROTOTYPES
19838+GLAPI void APIENTRY glFlushRasterSGIX (void);
19839+#endif /* GL_GLEXT_PROTOTYPES */
19840+typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void);
19841+#endif
19842+
19843+#ifndef GL_SGIX_depth_texture
19844+#define GL_SGIX_depth_texture 1
19845+#endif
19846+
19847+#ifndef GL_SGIS_fog_function
19848+#define GL_SGIS_fog_function 1
19849+#ifdef GL_GLEXT_PROTOTYPES
19850+GLAPI void APIENTRY glFogFuncSGIS (GLsizei, const GLfloat *);
19851+GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *);
19852+#endif /* GL_GLEXT_PROTOTYPES */
19853+typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points);
19854+typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points);
19855+#endif
19856+
19857+#ifndef GL_SGIX_fog_offset
19858+#define GL_SGIX_fog_offset 1
19859+#endif
19860+
19861+#ifndef GL_HP_image_transform
19862+#define GL_HP_image_transform 1
19863+#ifdef GL_GLEXT_PROTOTYPES
19864+GLAPI void APIENTRY glImageTransformParameteriHP (GLenum, GLenum, GLint);
19865+GLAPI void APIENTRY glImageTransformParameterfHP (GLenum, GLenum, GLfloat);
19866+GLAPI void APIENTRY glImageTransformParameterivHP (GLenum, GLenum, const GLint *);
19867+GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum, GLenum, const GLfloat *);
19868+GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum, GLenum, GLint *);
19869+GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum, GLenum, GLfloat *);
19870+#endif /* GL_GLEXT_PROTOTYPES */
19871+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param);
19872+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param);
19873+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params);
19874+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params);
19875+typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params);
19876+typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params);
19877+#endif
19878+
19879+#ifndef GL_HP_convolution_border_modes
19880+#define GL_HP_convolution_border_modes 1
19881+#endif
19882+
19883+#ifndef GL_SGIX_texture_add_env
19884+#define GL_SGIX_texture_add_env 1
19885+#endif
19886+
19887+#ifndef GL_EXT_color_subtable
19888+#define GL_EXT_color_subtable 1
19889+#ifdef GL_GLEXT_PROTOTYPES
19890+GLAPI void APIENTRY glColorSubTableEXT (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19891+GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum, GLsizei, GLint, GLint, GLsizei);
19892+#endif /* GL_GLEXT_PROTOTYPES */
19893+typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
19894+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
19895+#endif
19896+
19897+#ifndef GL_PGI_vertex_hints
19898+#define GL_PGI_vertex_hints 1
19899+#endif
19900+
19901+#ifndef GL_PGI_misc_hints
19902+#define GL_PGI_misc_hints 1
19903+#ifdef GL_GLEXT_PROTOTYPES
19904+GLAPI void APIENTRY glHintPGI (GLenum, GLint);
19905+#endif /* GL_GLEXT_PROTOTYPES */
19906+typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode);
19907+#endif
19908+
19909+#ifndef GL_EXT_paletted_texture
19910+#define GL_EXT_paletted_texture 1
19911+#ifdef GL_GLEXT_PROTOTYPES
19912+GLAPI void APIENTRY glColorTableEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
19913+GLAPI void APIENTRY glGetColorTableEXT (GLenum, GLenum, GLenum, GLvoid *);
19914+GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum, GLenum, GLint *);
19915+GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum, GLenum, GLfloat *);
19916+#endif /* GL_GLEXT_PROTOTYPES */
19917+typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
19918+typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data);
19919+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19920+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19921+#endif
19922+
19923+#ifndef GL_EXT_clip_volume_hint
19924+#define GL_EXT_clip_volume_hint 1
19925+#endif
19926+
19927+#ifndef GL_SGIX_list_priority
19928+#define GL_SGIX_list_priority 1
19929+#ifdef GL_GLEXT_PROTOTYPES
19930+GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint, GLenum, GLfloat *);
19931+GLAPI void APIENTRY glGetListParameterivSGIX (GLuint, GLenum, GLint *);
19932+GLAPI void APIENTRY glListParameterfSGIX (GLuint, GLenum, GLfloat);
19933+GLAPI void APIENTRY glListParameterfvSGIX (GLuint, GLenum, const GLfloat *);
19934+GLAPI void APIENTRY glListParameteriSGIX (GLuint, GLenum, GLint);
19935+GLAPI void APIENTRY glListParameterivSGIX (GLuint, GLenum, const GLint *);
19936+#endif /* GL_GLEXT_PROTOTYPES */
19937+typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params);
19938+typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params);
19939+typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param);
19940+typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params);
19941+typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param);
19942+typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params);
19943+#endif
19944+
19945+#ifndef GL_SGIX_ir_instrument1
19946+#define GL_SGIX_ir_instrument1 1
19947+#endif
19948+
19949+#ifndef GL_SGIX_calligraphic_fragment
19950+#define GL_SGIX_calligraphic_fragment 1
19951+#endif
19952+
19953+#ifndef GL_SGIX_texture_lod_bias
19954+#define GL_SGIX_texture_lod_bias 1
19955+#endif
19956+
19957+#ifndef GL_SGIX_shadow_ambient
19958+#define GL_SGIX_shadow_ambient 1
19959+#endif
19960+
19961+#ifndef GL_EXT_index_texture
19962+#define GL_EXT_index_texture 1
19963+#endif
19964+
19965+#ifndef GL_EXT_index_material
19966+#define GL_EXT_index_material 1
19967+#ifdef GL_GLEXT_PROTOTYPES
19968+GLAPI void APIENTRY glIndexMaterialEXT (GLenum, GLenum);
19969+#endif /* GL_GLEXT_PROTOTYPES */
19970+typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode);
19971+#endif
19972+
19973+#ifndef GL_EXT_index_func
19974+#define GL_EXT_index_func 1
19975+#ifdef GL_GLEXT_PROTOTYPES
19976+GLAPI void APIENTRY glIndexFuncEXT (GLenum, GLclampf);
19977+#endif /* GL_GLEXT_PROTOTYPES */
19978+typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref);
19979+#endif
19980+
19981+#ifndef GL_EXT_index_array_formats
19982+#define GL_EXT_index_array_formats 1
19983+#endif
19984+
19985+#ifndef GL_EXT_compiled_vertex_array
19986+#define GL_EXT_compiled_vertex_array 1
19987+#ifdef GL_GLEXT_PROTOTYPES
19988+GLAPI void APIENTRY glLockArraysEXT (GLint, GLsizei);
19989+GLAPI void APIENTRY glUnlockArraysEXT (void);
19990+#endif /* GL_GLEXT_PROTOTYPES */
19991+typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);
19992+typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void);
19993+#endif
19994+
19995+#ifndef GL_EXT_cull_vertex
19996+#define GL_EXT_cull_vertex 1
19997+#ifdef GL_GLEXT_PROTOTYPES
19998+GLAPI void APIENTRY glCullParameterdvEXT (GLenum, GLdouble *);
19999+GLAPI void APIENTRY glCullParameterfvEXT (GLenum, GLfloat *);
20000+#endif /* GL_GLEXT_PROTOTYPES */
20001+typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params);
20002+typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params);
20003+#endif
20004+
20005+#ifndef GL_SGIX_ycrcb
20006+#define GL_SGIX_ycrcb 1
20007+#endif
20008+
20009+#ifndef GL_SGIX_fragment_lighting
20010+#define GL_SGIX_fragment_lighting 1
20011+#ifdef GL_GLEXT_PROTOTYPES
20012+GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum, GLenum);
20013+GLAPI void APIENTRY glFragmentLightfSGIX (GLenum, GLenum, GLfloat);
20014+GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum, GLenum, const GLfloat *);
20015+GLAPI void APIENTRY glFragmentLightiSGIX (GLenum, GLenum, GLint);
20016+GLAPI void APIENTRY glFragmentLightivSGIX (GLenum, GLenum, const GLint *);
20017+GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum, GLfloat);
20018+GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum, const GLfloat *);
20019+GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum, GLint);
20020+GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum, const GLint *);
20021+GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum, GLenum, GLfloat);
20022+GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum, GLenum, const GLfloat *);
20023+GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum, GLenum, GLint);
20024+GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum, GLenum, const GLint *);
20025+GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum, GLenum, GLfloat *);
20026+GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum, GLenum, GLint *);
20027+GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum, GLenum, GLfloat *);
20028+GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum, GLenum, GLint *);
20029+GLAPI void APIENTRY glLightEnviSGIX (GLenum, GLint);
20030+#endif /* GL_GLEXT_PROTOTYPES */
20031+typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode);
20032+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param);
20033+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);
20034+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param);
20035+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params);
20036+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param);
20037+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params);
20038+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param);
20039+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params);
20040+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param);
20041+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params);
20042+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param);
20043+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params);
20044+typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params);
20045+typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params);
20046+typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params);
20047+typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params);
20048+typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param);
20049+#endif
20050+
20051+#ifndef GL_IBM_rasterpos_clip
20052+#define GL_IBM_rasterpos_clip 1
20053+#endif
20054+
20055+#ifndef GL_HP_texture_lighting
20056+#define GL_HP_texture_lighting 1
20057+#endif
20058+
20059+#ifndef GL_EXT_draw_range_elements
20060+#define GL_EXT_draw_range_elements 1
20061+#ifdef GL_GLEXT_PROTOTYPES
20062+GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
20063+#endif /* GL_GLEXT_PROTOTYPES */
20064+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
20065+#endif
20066+
20067+#ifndef GL_WIN_phong_shading
20068+#define GL_WIN_phong_shading 1
20069+#endif
20070+
20071+#ifndef GL_WIN_specular_fog
20072+#define GL_WIN_specular_fog 1
20073+#endif
20074+
20075+#ifndef GL_EXT_light_texture
20076+#define GL_EXT_light_texture 1
20077+#ifdef GL_GLEXT_PROTOTYPES
20078+GLAPI void APIENTRY glApplyTextureEXT (GLenum);
20079+GLAPI void APIENTRY glTextureLightEXT (GLenum);
20080+GLAPI void APIENTRY glTextureMaterialEXT (GLenum, GLenum);
20081+#endif /* GL_GLEXT_PROTOTYPES */
20082+typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode);
20083+typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname);
20084+typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode);
20085+#endif
20086+
20087+#ifndef GL_SGIX_blend_alpha_minmax
20088+#define GL_SGIX_blend_alpha_minmax 1
20089+#endif
20090+
20091+#ifndef GL_EXT_bgra
20092+#define GL_EXT_bgra 1
20093+#endif
20094+
20095+#ifndef GL_SGIX_async
20096+#define GL_SGIX_async 1
20097+#ifdef GL_GLEXT_PROTOTYPES
20098+GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint);
20099+GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *);
20100+GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *);
20101+GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei);
20102+GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint, GLsizei);
20103+GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint);
20104+#endif /* GL_GLEXT_PROTOTYPES */
20105+typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker);
20106+typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp);
20107+typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp);
20108+typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range);
20109+typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range);
20110+typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker);
20111+#endif
20112+
20113+#ifndef GL_SGIX_async_pixel
20114+#define GL_SGIX_async_pixel 1
20115+#endif
20116+
20117+#ifndef GL_SGIX_async_histogram
20118+#define GL_SGIX_async_histogram 1
20119+#endif
20120+
20121+#ifndef GL_INTEL_parallel_arrays
20122+#define GL_INTEL_parallel_arrays 1
20123+#ifdef GL_GLEXT_PROTOTYPES
20124+GLAPI void APIENTRY glVertexPointervINTEL (GLint, GLenum, const GLvoid* *);
20125+GLAPI void APIENTRY glNormalPointervINTEL (GLenum, const GLvoid* *);
20126+GLAPI void APIENTRY glColorPointervINTEL (GLint, GLenum, const GLvoid* *);
20127+GLAPI void APIENTRY glTexCoordPointervINTEL (GLint, GLenum, const GLvoid* *);
20128+#endif /* GL_GLEXT_PROTOTYPES */
20129+typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
20130+typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer);
20131+typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
20132+typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
20133+#endif
20134+
20135+#ifndef GL_HP_occlusion_test
20136+#define GL_HP_occlusion_test 1
20137+#endif
20138+
20139+#ifndef GL_EXT_pixel_transform
20140+#define GL_EXT_pixel_transform 1
20141+#ifdef GL_GLEXT_PROTOTYPES
20142+GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum, GLenum, GLint);
20143+GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum, GLenum, GLfloat);
20144+GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum, GLenum, const GLint *);
20145+GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum, GLenum, const GLfloat *);
20146+/* ERO Begin */
20147+GLAPI void APIENTRY glGetPixelTransformParameterivEXT (GLenum, GLenum, GLint *);
20148+GLAPI void APIENTRY glGetPixelTransformParameterfvEXT (GLenum, GLenum, GLfloat *);
20149+/* ERO End */
20150+#endif /* GL_GLEXT_PROTOTYPES */
20151+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param);
20152+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param);
20153+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
20154+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
20155+/* ERO Begin */
20156+typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
20157+typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
20158+/* ERO End */
20159+#endif
20160+
20161+#ifndef GL_EXT_pixel_transform_color_table
20162+#define GL_EXT_pixel_transform_color_table 1
20163+#endif
20164+
20165+#ifndef GL_EXT_shared_texture_palette
20166+#define GL_EXT_shared_texture_palette 1
20167+#endif
20168+
20169+#ifndef GL_EXT_separate_specular_color
20170+#define GL_EXT_separate_specular_color 1
20171+#endif
20172+
20173+#ifndef GL_EXT_secondary_color
20174+#define GL_EXT_secondary_color 1
20175+#ifdef GL_GLEXT_PROTOTYPES
20176+GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte, GLbyte, GLbyte);
20177+GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *);
20178+GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble, GLdouble, GLdouble);
20179+GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *);
20180+GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat, GLfloat, GLfloat);
20181+GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *);
20182+GLAPI void APIENTRY glSecondaryColor3iEXT (GLint, GLint, GLint);
20183+GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *);
20184+GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort, GLshort, GLshort);
20185+GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *);
20186+GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte, GLubyte, GLubyte);
20187+GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *);
20188+GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint, GLuint, GLuint);
20189+GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *);
20190+GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort, GLushort, GLushort);
20191+GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *);
20192+GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint, GLenum, GLsizei, const GLvoid *);
20193+#endif /* GL_GLEXT_PROTOTYPES */
20194+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue);
20195+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v);
20196+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue);
20197+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v);
20198+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);
20199+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);
20200+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue);
20201+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v);
20202+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue);
20203+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v);
20204+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);
20205+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v);
20206+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue);
20207+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);
20208+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);
20209+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);
20210+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
20211+#endif
20212+
20213+#ifndef GL_EXT_texture_perturb_normal
20214+#define GL_EXT_texture_perturb_normal 1
20215+#ifdef GL_GLEXT_PROTOTYPES
20216+GLAPI void APIENTRY glTextureNormalEXT (GLenum);
20217+#endif /* GL_GLEXT_PROTOTYPES */
20218+typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode);
20219+#endif
20220+
20221+#ifndef GL_EXT_multi_draw_arrays
20222+#define GL_EXT_multi_draw_arrays 1
20223+#ifdef GL_GLEXT_PROTOTYPES
20224+GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei);
20225+GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
20226+#endif /* GL_GLEXT_PROTOTYPES */
20227+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
20228+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
20229+#endif
20230+
20231+#ifndef GL_EXT_fog_coord
20232+#define GL_EXT_fog_coord 1
20233+#ifdef GL_GLEXT_PROTOTYPES
20234+GLAPI void APIENTRY glFogCoordfEXT (GLfloat);
20235+GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *);
20236+GLAPI void APIENTRY glFogCoorddEXT (GLdouble);
20237+GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *);
20238+GLAPI void APIENTRY glFogCoordPointerEXT (GLenum, GLsizei, const GLvoid *);
20239+#endif /* GL_GLEXT_PROTOTYPES */
20240+typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord);
20241+typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord);
20242+typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord);
20243+typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord);
20244+typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
20245+#endif
20246+
20247+#ifndef GL_REND_screen_coordinates
20248+#define GL_REND_screen_coordinates 1
20249+#endif
20250+
20251+#ifndef GL_EXT_coordinate_frame
20252+#define GL_EXT_coordinate_frame 1
20253+#ifdef GL_GLEXT_PROTOTYPES
20254+GLAPI void APIENTRY glTangent3bEXT (GLbyte, GLbyte, GLbyte);
20255+GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *);
20256+GLAPI void APIENTRY glTangent3dEXT (GLdouble, GLdouble, GLdouble);
20257+GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *);
20258+GLAPI void APIENTRY glTangent3fEXT (GLfloat, GLfloat, GLfloat);
20259+GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *);
20260+GLAPI void APIENTRY glTangent3iEXT (GLint, GLint, GLint);
20261+GLAPI void APIENTRY glTangent3ivEXT (const GLint *);
20262+GLAPI void APIENTRY glTangent3sEXT (GLshort, GLshort, GLshort);
20263+GLAPI void APIENTRY glTangent3svEXT (const GLshort *);
20264+GLAPI void APIENTRY glBinormal3bEXT (GLbyte, GLbyte, GLbyte);
20265+GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *);
20266+GLAPI void APIENTRY glBinormal3dEXT (GLdouble, GLdouble, GLdouble);
20267+GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *);
20268+GLAPI void APIENTRY glBinormal3fEXT (GLfloat, GLfloat, GLfloat);
20269+GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *);
20270+GLAPI void APIENTRY glBinormal3iEXT (GLint, GLint, GLint);
20271+GLAPI void APIENTRY glBinormal3ivEXT (const GLint *);
20272+GLAPI void APIENTRY glBinormal3sEXT (GLshort, GLshort, GLshort);
20273+GLAPI void APIENTRY glBinormal3svEXT (const GLshort *);
20274+GLAPI void APIENTRY glTangentPointerEXT (GLenum, GLsizei, const GLvoid *);
20275+GLAPI void APIENTRY glBinormalPointerEXT (GLenum, GLsizei, const GLvoid *);
20276+#endif /* GL_GLEXT_PROTOTYPES */
20277+typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz);
20278+typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v);
20279+typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz);
20280+typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v);
20281+typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz);
20282+typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v);
20283+typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz);
20284+typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v);
20285+typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz);
20286+typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v);
20287+typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz);
20288+typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v);
20289+typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz);
20290+typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v);
20291+typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz);
20292+typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v);
20293+typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz);
20294+typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v);
20295+typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz);
20296+typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v);
20297+typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
20298+typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
20299+#endif
20300+
20301+#ifndef GL_EXT_texture_env_combine
20302+#define GL_EXT_texture_env_combine 1
20303+#endif
20304+
20305+#ifndef GL_APPLE_specular_vector
20306+#define GL_APPLE_specular_vector 1
20307+#endif
20308+
20309+#ifndef GL_APPLE_transform_hint
20310+#define GL_APPLE_transform_hint 1
20311+#endif
20312+
20313+#ifndef GL_SGIX_fog_scale
20314+#define GL_SGIX_fog_scale 1
20315+#endif
20316+
20317+#ifndef GL_SUNX_constant_data
20318+#define GL_SUNX_constant_data 1
20319+#ifdef GL_GLEXT_PROTOTYPES
20320+GLAPI void APIENTRY glFinishTextureSUNX (void);
20321+#endif /* GL_GLEXT_PROTOTYPES */
20322+typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void);
20323+#endif
20324+
20325+#ifndef GL_SUN_global_alpha
20326+#define GL_SUN_global_alpha 1
20327+#ifdef GL_GLEXT_PROTOTYPES
20328+GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte);
20329+GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort);
20330+GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint);
20331+GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat);
20332+GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble);
20333+GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte);
20334+GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort);
20335+GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint);
20336+#endif /* GL_GLEXT_PROTOTYPES */
20337+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor);
20338+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor);
20339+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor);
20340+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor);
20341+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor);
20342+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor);
20343+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor);
20344+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor);
20345+#endif
20346+
20347+#ifndef GL_SUN_triangle_list
20348+#define GL_SUN_triangle_list 1
20349+#ifdef GL_GLEXT_PROTOTYPES
20350+GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint);
20351+GLAPI void APIENTRY glReplacementCodeusSUN (GLushort);
20352+GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte);
20353+GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *);
20354+GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *);
20355+GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *);
20356+GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum, GLsizei, const GLvoid* *);
20357+#endif /* GL_GLEXT_PROTOTYPES */
20358+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code);
20359+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code);
20360+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code);
20361+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code);
20362+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code);
20363+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code);
20364+typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer);
20365+#endif
20366+
20367+#ifndef GL_SUN_vertex
20368+#define GL_SUN_vertex 1
20369+#ifdef GL_GLEXT_PROTOTYPES
20370+GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat);
20371+GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *, const GLfloat *);
20372+GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
20373+GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *, const GLfloat *);
20374+GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20375+GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *, const GLfloat *);
20376+GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20377+GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *);
20378+GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20379+GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
20380+GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20381+GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *, const GLfloat *);
20382+GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20383+GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *, const GLfloat *);
20384+GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat, GLfloat, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
20385+GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *, const GLubyte *, const GLfloat *);
20386+GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20387+GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
20388+GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20389+GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
20390+GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20391+GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
20392+GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20393+GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
20394+GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat);
20395+GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *, const GLfloat *);
20396+GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
20397+GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *, const GLubyte *, const GLfloat *);
20398+GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20399+GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
20400+GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20401+GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
20402+GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20403+GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *);
20404+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20405+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
20406+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20407+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *);
20408+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20409+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
20410+#endif /* GL_GLEXT_PROTOTYPES */
20411+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
20412+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v);
20413+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
20414+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v);
20415+typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
20416+typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v);
20417+typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20418+typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v);
20419+typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20420+typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v);
20421+typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
20422+typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
20423+typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20424+typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
20425+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
20426+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v);
20427+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
20428+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v);
20429+typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20430+typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v);
20431+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);
20432+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20433+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);
20434+typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20435+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
20436+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v);
20437+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
20438+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v);
20439+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
20440+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v);
20441+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20442+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v);
20443+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);
20444+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20445+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
20446+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v);
20447+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20448+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
20449+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);
20450+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20451+#endif
20452+
20453+#ifndef GL_EXT_blend_func_separate
20454+#define GL_EXT_blend_func_separate 1
20455+#ifdef GL_GLEXT_PROTOTYPES
20456+GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum, GLenum, GLenum, GLenum);
20457+#endif /* GL_GLEXT_PROTOTYPES */
20458+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
20459+#endif
20460+
20461+#ifndef GL_INGR_blend_func_separate
20462+#define GL_INGR_blend_func_separate 1
20463+#ifdef GL_GLEXT_PROTOTYPES
20464+GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum, GLenum, GLenum, GLenum);
20465+#endif /* GL_GLEXT_PROTOTYPES */
20466+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
20467+#endif
20468+
20469+#ifndef GL_INGR_color_clamp
20470+#define GL_INGR_color_clamp 1
20471+#endif
20472+
20473+#ifndef GL_INGR_interlace_read
20474+#define GL_INGR_interlace_read 1
20475+#endif
20476+
20477+#ifndef GL_EXT_stencil_wrap
20478+#define GL_EXT_stencil_wrap 1
20479+#endif
20480+
20481+#ifndef GL_EXT_422_pixels
20482+#define GL_EXT_422_pixels 1
20483+#endif
20484+
20485+#ifndef GL_NV_texgen_reflection
20486+#define GL_NV_texgen_reflection 1
20487+#endif
20488+
20489+#ifndef GL_SUN_convolution_border_modes
20490+#define GL_SUN_convolution_border_modes 1
20491+#endif
20492+
20493+#ifndef GL_EXT_texture_env_add
20494+#define GL_EXT_texture_env_add 1
20495+#endif
20496+
20497+#ifndef GL_EXT_texture_lod_bias
20498+#define GL_EXT_texture_lod_bias 1
20499+#endif
20500+
20501+#ifndef GL_EXT_texture_filter_anisotropic
20502+#define GL_EXT_texture_filter_anisotropic 1
20503+#endif
20504+
20505+#ifndef GL_EXT_vertex_weighting
20506+#define GL_EXT_vertex_weighting 1
20507+#ifdef GL_GLEXT_PROTOTYPES
20508+GLAPI void APIENTRY glVertexWeightfEXT (GLfloat);
20509+GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *);
20510+GLAPI void APIENTRY glVertexWeightPointerEXT (GLsizei, GLenum, GLsizei, const GLvoid *);
20511+#endif /* GL_GLEXT_PROTOTYPES */
20512+typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight);
20513+typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight);
20514+typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer);
20515+#endif
20516+
20517+#ifndef GL_NV_light_max_exponent
20518+#define GL_NV_light_max_exponent 1
20519+#endif
20520+
20521+#ifndef GL_NV_vertex_array_range
20522+#define GL_NV_vertex_array_range 1
20523+#ifdef GL_GLEXT_PROTOTYPES
20524+GLAPI void APIENTRY glFlushVertexArrayRangeNV (void);
20525+GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei, const GLvoid *);
20526+#endif /* GL_GLEXT_PROTOTYPES */
20527+typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void);
20528+typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer);
20529+#endif
20530+
20531+#ifndef GL_NV_register_combiners
20532+#define GL_NV_register_combiners 1
20533+#ifdef GL_GLEXT_PROTOTYPES
20534+GLAPI void APIENTRY glCombinerParameterfvNV (GLenum, const GLfloat *);
20535+GLAPI void APIENTRY glCombinerParameterfNV (GLenum, GLfloat);
20536+GLAPI void APIENTRY glCombinerParameterivNV (GLenum, const GLint *);
20537+GLAPI void APIENTRY glCombinerParameteriNV (GLenum, GLint);
20538+GLAPI void APIENTRY glCombinerInputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum);
20539+GLAPI void APIENTRY glCombinerOutputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean);
20540+GLAPI void APIENTRY glFinalCombinerInputNV (GLenum, GLenum, GLenum, GLenum);
20541+GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum, GLenum, GLenum, GLenum, GLfloat *);
20542+GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum, GLenum, GLenum, GLenum, GLint *);
20543+GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum, GLenum, GLenum, GLfloat *);
20544+GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum, GLenum, GLenum, GLint *);
20545+GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum, GLenum, GLfloat *);
20546+GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum, GLenum, GLint *);
20547+#endif /* GL_GLEXT_PROTOTYPES */
20548+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);
20549+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);
20550+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
20551+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);
20552+typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
20553+typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
20554+typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
20555+typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
20556+typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
20557+typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
20558+typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params);
20559+typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params);
20560+typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params);
20561+#endif
20562+
20563+#ifndef GL_NV_fog_distance
20564+#define GL_NV_fog_distance 1
20565+#endif
20566+
20567+#ifndef GL_NV_texgen_emboss
20568+#define GL_NV_texgen_emboss 1
20569+#endif
20570+
20571+#ifndef GL_NV_blend_square
20572+#define GL_NV_blend_square 1
20573+#endif
20574+
20575+#ifndef GL_NV_texture_env_combine4
20576+#define GL_NV_texture_env_combine4 1
20577+#endif
20578+
20579+#ifndef GL_MESA_resize_buffers
20580+#define GL_MESA_resize_buffers 1
20581+#ifdef GL_GLEXT_PROTOTYPES
20582+GLAPI void APIENTRY glResizeBuffersMESA (void);
20583+#endif /* GL_GLEXT_PROTOTYPES */
20584+typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void);
20585+#endif
20586+
20587+#ifndef GL_MESA_window_pos
20588+#define GL_MESA_window_pos 1
20589+#ifdef GL_GLEXT_PROTOTYPES
20590+GLAPI void APIENTRY glWindowPos2dMESA (GLdouble, GLdouble);
20591+GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *);
20592+GLAPI void APIENTRY glWindowPos2fMESA (GLfloat, GLfloat);
20593+GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *);
20594+GLAPI void APIENTRY glWindowPos2iMESA (GLint, GLint);
20595+GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *);
20596+GLAPI void APIENTRY glWindowPos2sMESA (GLshort, GLshort);
20597+GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *);
20598+GLAPI void APIENTRY glWindowPos3dMESA (GLdouble, GLdouble, GLdouble);
20599+GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *);
20600+GLAPI void APIENTRY glWindowPos3fMESA (GLfloat, GLfloat, GLfloat);
20601+GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *);
20602+GLAPI void APIENTRY glWindowPos3iMESA (GLint, GLint, GLint);
20603+GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *);
20604+GLAPI void APIENTRY glWindowPos3sMESA (GLshort, GLshort, GLshort);
20605+GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *);
20606+GLAPI void APIENTRY glWindowPos4dMESA (GLdouble, GLdouble, GLdouble, GLdouble);
20607+GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *);
20608+GLAPI void APIENTRY glWindowPos4fMESA (GLfloat, GLfloat, GLfloat, GLfloat);
20609+GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *);
20610+GLAPI void APIENTRY glWindowPos4iMESA (GLint, GLint, GLint, GLint);
20611+GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *);
20612+GLAPI void APIENTRY glWindowPos4sMESA (GLshort, GLshort, GLshort, GLshort);
20613+GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *);
20614+#endif /* GL_GLEXT_PROTOTYPES */
20615+typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y);
20616+typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v);
20617+typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y);
20618+typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v);
20619+typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y);
20620+typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v);
20621+typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y);
20622+typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v);
20623+typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z);
20624+typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v);
20625+typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z);
20626+typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v);
20627+typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z);
20628+typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v);
20629+typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z);
20630+typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v);
20631+typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
20632+typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v);
20633+typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20634+typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v);
20635+typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w);
20636+typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v);
20637+typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w);
20638+typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v);
20639+#endif
20640+
20641+#ifndef GL_IBM_cull_vertex
20642+#define GL_IBM_cull_vertex 1
20643+#endif
20644+
20645+#ifndef GL_IBM_multimode_draw_arrays
20646+#define GL_IBM_multimode_draw_arrays 1
20647+#ifdef GL_GLEXT_PROTOTYPES
20648+GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *, const GLint *, const GLsizei *, GLsizei, GLint);
20649+GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *, const GLsizei *, GLenum, const GLvoid* const *, GLsizei, GLint);
20650+#endif /* GL_GLEXT_PROTOTYPES */
20651+typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
20652+typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride);
20653+#endif
20654+
20655+#ifndef GL_IBM_vertex_array_lists
20656+#define GL_IBM_vertex_array_lists 1
20657+#ifdef GL_GLEXT_PROTOTYPES
20658+GLAPI void APIENTRY glColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20659+GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20660+GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint, const GLboolean* *, GLint);
20661+GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
20662+GLAPI void APIENTRY glIndexPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
20663+GLAPI void APIENTRY glNormalPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
20664+GLAPI void APIENTRY glTexCoordPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20665+GLAPI void APIENTRY glVertexPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20666+#endif /* GL_GLEXT_PROTOTYPES */
20667+typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20668+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20669+typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride);
20670+typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20671+typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20672+typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20673+typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20674+typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20675+#endif
20676+
20677+#ifndef GL_SGIX_subsample
20678+#define GL_SGIX_subsample 1
20679+#endif
20680+
20681+#ifndef GL_SGIX_ycrcba
20682+#define GL_SGIX_ycrcba 1
20683+#endif
20684+
20685+#ifndef GL_SGIX_ycrcb_subsample
20686+#define GL_SGIX_ycrcb_subsample 1
20687+#endif
20688+
20689+#ifndef GL_SGIX_depth_pass_instrument
20690+#define GL_SGIX_depth_pass_instrument 1
20691+#endif
20692+
20693+#ifndef GL_3DFX_texture_compression_FXT1
20694+#define GL_3DFX_texture_compression_FXT1 1
20695+#endif
20696+
20697+#ifndef GL_3DFX_multisample
20698+#define GL_3DFX_multisample 1
20699+#endif
20700+
20701+#ifndef GL_3DFX_tbuffer
20702+#define GL_3DFX_tbuffer 1
20703+#ifdef GL_GLEXT_PROTOTYPES
20704+GLAPI void APIENTRY glTbufferMask3DFX (GLuint);
20705+#endif /* GL_GLEXT_PROTOTYPES */
20706+typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask);
20707+#endif
20708+
20709+#ifndef GL_EXT_multisample
20710+#define GL_EXT_multisample 1
20711+#ifdef GL_GLEXT_PROTOTYPES
20712+GLAPI void APIENTRY glSampleMaskEXT (GLclampf, GLboolean);
20713+GLAPI void APIENTRY glSamplePatternEXT (GLenum);
20714+#endif /* GL_GLEXT_PROTOTYPES */
20715+typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert);
20716+typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern);
20717+#endif
20718+
20719+#ifndef GL_SGIX_vertex_preclip
20720+#define GL_SGIX_vertex_preclip 1
20721+#endif
20722+
20723+#ifndef GL_SGIX_convolution_accuracy
20724+#define GL_SGIX_convolution_accuracy 1
20725+#endif
20726+
20727+#ifndef GL_SGIX_resample
20728+#define GL_SGIX_resample 1
20729+#endif
20730+
20731+#ifndef GL_SGIS_point_line_texgen
20732+#define GL_SGIS_point_line_texgen 1
20733+#endif
20734+
20735+#ifndef GL_SGIS_texture_color_mask
20736+#define GL_SGIS_texture_color_mask 1
20737+#ifdef GL_GLEXT_PROTOTYPES
20738+GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean, GLboolean, GLboolean, GLboolean);
20739+#endif /* GL_GLEXT_PROTOTYPES */
20740+typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
20741+#endif
20742+
20743+#ifndef GL_SGIX_igloo_interface
20744+#define GL_SGIX_igloo_interface 1
20745+#ifdef GL_GLEXT_PROTOTYPES
20746+GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum, const GLvoid *);
20747+#endif /* GL_GLEXT_PROTOTYPES */
20748+typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params);
20749+#endif
20750+
20751+#ifndef GL_EXT_texture_env_dot3
20752+#define GL_EXT_texture_env_dot3 1
20753+#endif
20754+
20755+#ifndef GL_ATI_texture_mirror_once
20756+#define GL_ATI_texture_mirror_once 1
20757+#endif
20758+
20759+#ifndef GL_NV_fence
20760+#define GL_NV_fence 1
20761+#ifdef GL_GLEXT_PROTOTYPES
20762+GLAPI void APIENTRY glDeleteFencesNV (GLsizei, const GLuint *);
20763+GLAPI void APIENTRY glGenFencesNV (GLsizei, GLuint *);
20764+GLAPI GLboolean APIENTRY glIsFenceNV (GLuint);
20765+GLAPI GLboolean APIENTRY glTestFenceNV (GLuint);
20766+GLAPI void APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *);
20767+GLAPI void APIENTRY glFinishFenceNV (GLuint);
20768+GLAPI void APIENTRY glSetFenceNV (GLuint, GLenum);
20769+#endif /* GL_GLEXT_PROTOTYPES */
20770+typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
20771+typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
20772+typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
20773+typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
20774+typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
20775+typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
20776+typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
20777+#endif
20778+
20779+#ifndef GL_NV_evaluators
20780+#define GL_NV_evaluators 1
20781+#ifdef GL_GLEXT_PROTOTYPES
20782+GLAPI void APIENTRY glMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLint, GLint, GLboolean, const GLvoid *);
20783+GLAPI void APIENTRY glMapParameterivNV (GLenum, GLenum, const GLint *);
20784+GLAPI void APIENTRY glMapParameterfvNV (GLenum, GLenum, const GLfloat *);
20785+GLAPI void APIENTRY glGetMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLboolean, GLvoid *);
20786+GLAPI void APIENTRY glGetMapParameterivNV (GLenum, GLenum, GLint *);
20787+GLAPI void APIENTRY glGetMapParameterfvNV (GLenum, GLenum, GLfloat *);
20788+GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum, GLuint, GLenum, GLint *);
20789+GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum, GLuint, GLenum, GLfloat *);
20790+GLAPI void APIENTRY glEvalMapsNV (GLenum, GLenum);
20791+#endif /* GL_GLEXT_PROTOTYPES */
20792+typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points);
20793+typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params);
20794+typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params);
20795+typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points);
20796+typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params);
20797+typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params);
20798+typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
20799+typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
20800+typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode);
20801+#endif
20802+
20803+#ifndef GL_NV_packed_depth_stencil
20804+#define GL_NV_packed_depth_stencil 1
20805+#endif
20806+
20807+#ifndef GL_NV_register_combiners2
20808+#define GL_NV_register_combiners2 1
20809+#ifdef GL_GLEXT_PROTOTYPES
20810+GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum, GLenum, const GLfloat *);
20811+GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum, GLenum, GLfloat *);
20812+#endif /* GL_GLEXT_PROTOTYPES */
20813+typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params);
20814+typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params);
20815+#endif
20816+
20817+#ifndef GL_NV_texture_compression_vtc
20818+#define GL_NV_texture_compression_vtc 1
20819+#endif
20820+
20821+#ifndef GL_NV_texture_rectangle
20822+#define GL_NV_texture_rectangle 1
20823+#endif
20824+
20825+#ifndef GL_NV_texture_shader
20826+#define GL_NV_texture_shader 1
20827+#endif
20828+
20829+#ifndef GL_NV_texture_shader2
20830+#define GL_NV_texture_shader2 1
20831+#endif
20832+
20833+#ifndef GL_NV_vertex_array_range2
20834+#define GL_NV_vertex_array_range2 1
20835+#endif
20836+
20837+#ifndef GL_NV_vertex_program
20838+#define GL_NV_vertex_program 1
20839+#ifdef GL_GLEXT_PROTOTYPES
20840+GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei, const GLuint *, GLboolean *);
20841+GLAPI void APIENTRY glBindProgramNV (GLenum, GLuint);
20842+GLAPI void APIENTRY glDeleteProgramsNV (GLsizei, const GLuint *);
20843+GLAPI void APIENTRY glExecuteProgramNV (GLenum, GLuint, const GLfloat *);
20844+GLAPI void APIENTRY glGenProgramsNV (GLsizei, GLuint *);
20845+GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum, GLuint, GLenum, GLdouble *);
20846+GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum, GLuint, GLenum, GLfloat *);
20847+GLAPI void APIENTRY glGetProgramivNV (GLuint, GLenum, GLint *);
20848+GLAPI void APIENTRY glGetProgramStringNV (GLuint, GLenum, GLubyte *);
20849+GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum, GLuint, GLenum, GLint *);
20850+GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint, GLenum, GLdouble *);
20851+GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint, GLenum, GLfloat *);
20852+GLAPI void APIENTRY glGetVertexAttribivNV (GLuint, GLenum, GLint *);
20853+GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint, GLenum, GLvoid* *);
20854+GLAPI GLboolean APIENTRY glIsProgramNV (GLuint);
20855+GLAPI void APIENTRY glLoadProgramNV (GLenum, GLuint, GLsizei, const GLubyte *);
20856+GLAPI void APIENTRY glProgramParameter4dNV (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
20857+GLAPI void APIENTRY glProgramParameter4dvNV (GLenum, GLuint, const GLdouble *);
20858+GLAPI void APIENTRY glProgramParameter4fNV (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
20859+GLAPI void APIENTRY glProgramParameter4fvNV (GLenum, GLuint, const GLfloat *);
20860+GLAPI void APIENTRY glProgramParameters4dvNV (GLenum, GLuint, GLuint, const GLdouble *);
20861+GLAPI void APIENTRY glProgramParameters4fvNV (GLenum, GLuint, GLuint, const GLfloat *);
20862+GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei, const GLuint *);
20863+GLAPI void APIENTRY glTrackMatrixNV (GLenum, GLuint, GLenum, GLenum);
20864+GLAPI void APIENTRY glVertexAttribPointerNV (GLuint, GLint, GLenum, GLsizei, const GLvoid *);
20865+GLAPI void APIENTRY glVertexAttrib1dNV (GLuint, GLdouble);
20866+GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint, const GLdouble *);
20867+GLAPI void APIENTRY glVertexAttrib1fNV (GLuint, GLfloat);
20868+GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint, const GLfloat *);
20869+GLAPI void APIENTRY glVertexAttrib1sNV (GLuint, GLshort);
20870+GLAPI void APIENTRY glVertexAttrib1svNV (GLuint, const GLshort *);
20871+GLAPI void APIENTRY glVertexAttrib2dNV (GLuint, GLdouble, GLdouble);
20872+GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint, const GLdouble *);
20873+GLAPI void APIENTRY glVertexAttrib2fNV (GLuint, GLfloat, GLfloat);
20874+GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint, const GLfloat *);
20875+GLAPI void APIENTRY glVertexAttrib2sNV (GLuint, GLshort, GLshort);
20876+GLAPI void APIENTRY glVertexAttrib2svNV (GLuint, const GLshort *);
20877+GLAPI void APIENTRY glVertexAttrib3dNV (GLuint, GLdouble, GLdouble, GLdouble);
20878+GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint, const GLdouble *);
20879+GLAPI void APIENTRY glVertexAttrib3fNV (GLuint, GLfloat, GLfloat, GLfloat);
20880+GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint, const GLfloat *);
20881+GLAPI void APIENTRY glVertexAttrib3sNV (GLuint, GLshort, GLshort, GLshort);
20882+GLAPI void APIENTRY glVertexAttrib3svNV (GLuint, const GLshort *);
20883+GLAPI void APIENTRY glVertexAttrib4dNV (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
20884+GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint, const GLdouble *);
20885+GLAPI void APIENTRY glVertexAttrib4fNV (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
20886+GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint, const GLfloat *);
20887+GLAPI void APIENTRY glVertexAttrib4sNV (GLuint, GLshort, GLshort, GLshort, GLshort);
20888+GLAPI void APIENTRY glVertexAttrib4svNV (GLuint, const GLshort *);
20889+GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
20890+GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint, const GLubyte *);
20891+GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint, GLsizei, const GLdouble *);
20892+GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint, GLsizei, const GLfloat *);
20893+GLAPI void APIENTRY glVertexAttribs1svNV (GLuint, GLsizei, const GLshort *);
20894+GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint, GLsizei, const GLdouble *);
20895+GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint, GLsizei, const GLfloat *);
20896+GLAPI void APIENTRY glVertexAttribs2svNV (GLuint, GLsizei, const GLshort *);
20897+GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint, GLsizei, const GLdouble *);
20898+GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint, GLsizei, const GLfloat *);
20899+GLAPI void APIENTRY glVertexAttribs3svNV (GLuint, GLsizei, const GLshort *);
20900+GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint, GLsizei, const GLdouble *);
20901+GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint, GLsizei, const GLfloat *);
20902+GLAPI void APIENTRY glVertexAttribs4svNV (GLuint, GLsizei, const GLshort *);
20903+GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint, GLsizei, const GLubyte *);
20904+#endif /* GL_GLEXT_PROTOTYPES */
20905+typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences);
20906+typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id);
20907+typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
20908+typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params);
20909+typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs);
20910+typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params);
20911+typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
20912+typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params);
20913+typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program);
20914+typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params);
20915+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params);
20916+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params);
20917+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params);
20918+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
20919+typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id);
20920+typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
20921+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
20922+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v);
20923+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20924+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v);
20925+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint count, const GLdouble *v);
20926+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint count, const GLfloat *v);
20927+typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
20928+typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform);
20929+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer);
20930+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x);
20931+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v);
20932+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x);
20933+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v);
20934+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x);
20935+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v);
20936+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y);
20937+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v);
20938+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y);
20939+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v);
20940+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y);
20941+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v);
20942+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
20943+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v);
20944+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
20945+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v);
20946+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
20947+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v);
20948+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
20949+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v);
20950+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20951+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v);
20952+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
20953+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v);
20954+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
20955+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v);
20956+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
20957+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
20958+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
20959+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
20960+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
20961+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
20962+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
20963+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
20964+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
20965+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
20966+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
20967+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
20968+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v);
20969+#endif
20970+
20971+#ifndef GL_SGIX_texture_coordinate_clamp
20972+#define GL_SGIX_texture_coordinate_clamp 1
20973+#endif
20974+
20975+#ifndef GL_SGIX_scalebias_hint
20976+#define GL_SGIX_scalebias_hint 1
20977+#endif
20978+
20979+#ifndef GL_OML_interlace
20980+#define GL_OML_interlace 1
20981+#endif
20982+
20983+#ifndef GL_OML_subsample
20984+#define GL_OML_subsample 1
20985+#endif
20986+
20987+#ifndef GL_OML_resample
20988+#define GL_OML_resample 1
20989+#endif
20990+
20991+#ifndef GL_NV_copy_depth_to_color
20992+#define GL_NV_copy_depth_to_color 1
20993+#endif
20994+
20995+#ifndef GL_ATI_envmap_bumpmap
20996+#define GL_ATI_envmap_bumpmap 1
20997+#ifdef GL_GLEXT_PROTOTYPES
20998+GLAPI void APIENTRY glTexBumpParameterivATI (GLenum, const GLint *);
20999+GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum, const GLfloat *);
21000+GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum, GLint *);
21001+GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum, GLfloat *);
21002+#endif /* GL_GLEXT_PROTOTYPES */
21003+typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param);
21004+typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param);
21005+typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param);
21006+typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param);
21007+#endif
21008+
21009+#ifndef GL_ATI_fragment_shader
21010+#define GL_ATI_fragment_shader 1
21011+#ifdef GL_GLEXT_PROTOTYPES
21012+GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint);
21013+GLAPI void APIENTRY glBindFragmentShaderATI (GLuint);
21014+GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint);
21015+GLAPI void APIENTRY glBeginFragmentShaderATI (void);
21016+GLAPI void APIENTRY glEndFragmentShaderATI (void);
21017+GLAPI void APIENTRY glPassTexCoordATI (GLuint, GLuint, GLenum);
21018+GLAPI void APIENTRY glSampleMapATI (GLuint, GLuint, GLenum);
21019+GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21020+GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21021+GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21022+GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
21023+GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21024+GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21025+GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint, const GLfloat *);
21026+#endif /* GL_GLEXT_PROTOTYPES */
21027+typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range);
21028+typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id);
21029+typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id);
21030+typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void);
21031+typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void);
21032+typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle);
21033+typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle);
21034+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
21035+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
21036+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);
21037+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
21038+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
21039+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);
21040+typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value);
21041+#endif
21042+
21043+#ifndef GL_ATI_pn_triangles
21044+#define GL_ATI_pn_triangles 1
21045+#ifdef GL_GLEXT_PROTOTYPES
21046+GLAPI void APIENTRY glPNTrianglesiATI (GLenum, GLint);
21047+GLAPI void APIENTRY glPNTrianglesfATI (GLenum, GLfloat);
21048+#endif /* GL_GLEXT_PROTOTYPES */
21049+typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param);
21050+typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param);
21051+#endif
21052+
21053+#ifndef GL_ATI_vertex_array_object
21054+#define GL_ATI_vertex_array_object 1
21055+#ifdef GL_GLEXT_PROTOTYPES
21056+GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei, const GLvoid *, GLenum);
21057+GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint);
21058+GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint, GLuint, GLsizei, const GLvoid *, GLenum);
21059+GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint, GLenum, GLfloat *);
21060+GLAPI void APIENTRY glGetObjectBufferivATI (GLuint, GLenum, GLint *);
21061+GLAPI void APIENTRY glFreeObjectBufferATI (GLuint);
21062+/* ERO Begin */
21063+GLAPI void APIENTRY glDeleteObjectBufferATI (GLuint);
21064+/* ERO End */
21065+GLAPI void APIENTRY glArrayObjectATI (GLenum, GLint, GLenum, GLsizei, GLuint, GLuint);
21066+GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum, GLenum, GLfloat *);
21067+GLAPI void APIENTRY glGetArrayObjectivATI (GLenum, GLenum, GLint *);
21068+GLAPI void APIENTRY glVariantArrayObjectATI (GLuint, GLenum, GLsizei, GLuint, GLuint);
21069+GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint, GLenum, GLfloat *);
21070+GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint, GLenum, GLint *);
21071+#endif /* GL_GLEXT_PROTOTYPES */
21072+typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage);
21073+typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer);
21074+typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve);
21075+typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params);
21076+typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params);
21077+typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer);
21078+typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
21079+typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params);
21080+typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params);
21081+typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
21082+typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params);
21083+typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params);
21084+#endif
21085+
21086+#ifndef GL_EXT_vertex_shader
21087+#define GL_EXT_vertex_shader 1
21088+#ifdef GL_GLEXT_PROTOTYPES
21089+GLAPI void APIENTRY glBeginVertexShaderEXT (void);
21090+GLAPI void APIENTRY glEndVertexShaderEXT (void);
21091+GLAPI void APIENTRY glBindVertexShaderEXT (GLuint);
21092+GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint);
21093+GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint);
21094+GLAPI void APIENTRY glShaderOp1EXT (GLenum, GLuint, GLuint);
21095+GLAPI void APIENTRY glShaderOp2EXT (GLenum, GLuint, GLuint, GLuint);
21096+GLAPI void APIENTRY glShaderOp3EXT (GLenum, GLuint, GLuint, GLuint, GLuint);
21097+GLAPI void APIENTRY glSwizzleEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum);
21098+GLAPI void APIENTRY glWriteMaskEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum);
21099+GLAPI void APIENTRY glInsertComponentEXT (GLuint, GLuint, GLuint);
21100+GLAPI void APIENTRY glExtractComponentEXT (GLuint, GLuint, GLuint);
21101+GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum, GLenum, GLenum, GLuint);
21102+GLAPI void APIENTRY glSetInvariantEXT (GLuint, GLenum, const GLvoid *);
21103+GLAPI void APIENTRY glSetLocalConstantEXT (GLuint, GLenum, const GLvoid *);
21104+GLAPI void APIENTRY glVariantbvEXT (GLuint, const GLbyte *);
21105+GLAPI void APIENTRY glVariantsvEXT (GLuint, const GLshort *);
21106+GLAPI void APIENTRY glVariantivEXT (GLuint, const GLint *);
21107+GLAPI void APIENTRY glVariantfvEXT (GLuint, const GLfloat *);
21108+GLAPI void APIENTRY glVariantdvEXT (GLuint, const GLdouble *);
21109+GLAPI void APIENTRY glVariantubvEXT (GLuint, const GLubyte *);
21110+GLAPI void APIENTRY glVariantusvEXT (GLuint, const GLushort *);
21111+GLAPI void APIENTRY glVariantuivEXT (GLuint, const GLuint *);
21112+GLAPI void APIENTRY glVariantPointerEXT (GLuint, GLenum, GLuint, const GLvoid *);
21113+GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint);
21114+GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint);
21115+GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum, GLenum);
21116+GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum, GLenum);
21117+GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum, GLenum, GLenum);
21118+GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum, GLenum);
21119+GLAPI GLuint APIENTRY glBindParameterEXT (GLenum);
21120+GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint, GLenum);
21121+GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint, GLenum, GLboolean *);
21122+GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint, GLenum, GLint *);
21123+GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint, GLenum, GLfloat *);
21124+GLAPI void APIENTRY glGetVariantPointervEXT (GLuint, GLenum, GLvoid* *);
21125+GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint, GLenum, GLboolean *);
21126+GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint, GLenum, GLint *);
21127+GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint, GLenum, GLfloat *);
21128+GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint, GLenum, GLboolean *);
21129+GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint, GLenum, GLint *);
21130+GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint, GLenum, GLfloat *);
21131+#endif /* GL_GLEXT_PROTOTYPES */
21132+typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void);
21133+typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void);
21134+typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id);
21135+typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range);
21136+typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id);
21137+typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1);
21138+typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
21139+typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
21140+typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
21141+typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
21142+typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
21143+typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
21144+typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);
21145+typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);
21146+typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);
21147+typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr);
21148+typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr);
21149+typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr);
21150+typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr);
21151+typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr);
21152+typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr);
21153+typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr);
21154+typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr);
21155+typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr);
21156+typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
21157+typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
21158+typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value);
21159+typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value);
21160+typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value);
21161+typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value);
21162+typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value);
21163+typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap);
21164+typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
21165+typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
21166+typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
21167+typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data);
21168+typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
21169+typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
21170+typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
21171+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
21172+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
21173+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
21174+#endif
21175+
21176+#ifndef GL_ATI_vertex_streams
21177+#define GL_ATI_vertex_streams 1
21178+#ifdef GL_GLEXT_PROTOTYPES
21179+GLAPI void APIENTRY glVertexStream1sATI (GLenum, GLshort);
21180+GLAPI void APIENTRY glVertexStream1svATI (GLenum, const GLshort *);
21181+GLAPI void APIENTRY glVertexStream1iATI (GLenum, GLint);
21182+GLAPI void APIENTRY glVertexStream1ivATI (GLenum, const GLint *);
21183+GLAPI void APIENTRY glVertexStream1fATI (GLenum, GLfloat);
21184+GLAPI void APIENTRY glVertexStream1fvATI (GLenum, const GLfloat *);
21185+GLAPI void APIENTRY glVertexStream1dATI (GLenum, GLdouble);
21186+GLAPI void APIENTRY glVertexStream1dvATI (GLenum, const GLdouble *);
21187+GLAPI void APIENTRY glVertexStream2sATI (GLenum, GLshort, GLshort);
21188+GLAPI void APIENTRY glVertexStream2svATI (GLenum, const GLshort *);
21189+GLAPI void APIENTRY glVertexStream2iATI (GLenum, GLint, GLint);
21190+GLAPI void APIENTRY glVertexStream2ivATI (GLenum, const GLint *);
21191+GLAPI void APIENTRY glVertexStream2fATI (GLenum, GLfloat, GLfloat);
21192+GLAPI void APIENTRY glVertexStream2fvATI (GLenum, const GLfloat *);
21193+GLAPI void APIENTRY glVertexStream2dATI (GLenum, GLdouble, GLdouble);
21194+GLAPI void APIENTRY glVertexStream2dvATI (GLenum, const GLdouble *);
21195+GLAPI void APIENTRY glVertexStream3sATI (GLenum, GLshort, GLshort, GLshort);
21196+GLAPI void APIENTRY glVertexStream3svATI (GLenum, const GLshort *);
21197+GLAPI void APIENTRY glVertexStream3iATI (GLenum, GLint, GLint, GLint);
21198+GLAPI void APIENTRY glVertexStream3ivATI (GLenum, const GLint *);
21199+GLAPI void APIENTRY glVertexStream3fATI (GLenum, GLfloat, GLfloat, GLfloat);
21200+GLAPI void APIENTRY glVertexStream3fvATI (GLenum, const GLfloat *);
21201+GLAPI void APIENTRY glVertexStream3dATI (GLenum, GLdouble, GLdouble, GLdouble);
21202+GLAPI void APIENTRY glVertexStream3dvATI (GLenum, const GLdouble *);
21203+GLAPI void APIENTRY glVertexStream4sATI (GLenum, GLshort, GLshort, GLshort, GLshort);
21204+GLAPI void APIENTRY glVertexStream4svATI (GLenum, const GLshort *);
21205+GLAPI void APIENTRY glVertexStream4iATI (GLenum, GLint, GLint, GLint, GLint);
21206+GLAPI void APIENTRY glVertexStream4ivATI (GLenum, const GLint *);
21207+GLAPI void APIENTRY glVertexStream4fATI (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
21208+GLAPI void APIENTRY glVertexStream4fvATI (GLenum, const GLfloat *);
21209+GLAPI void APIENTRY glVertexStream4dATI (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
21210+GLAPI void APIENTRY glVertexStream4dvATI (GLenum, const GLdouble *);
21211+GLAPI void APIENTRY glNormalStream3bATI (GLenum, GLbyte, GLbyte, GLbyte);
21212+GLAPI void APIENTRY glNormalStream3bvATI (GLenum, const GLbyte *);
21213+GLAPI void APIENTRY glNormalStream3sATI (GLenum, GLshort, GLshort, GLshort);
21214+GLAPI void APIENTRY glNormalStream3svATI (GLenum, const GLshort *);
21215+GLAPI void APIENTRY glNormalStream3iATI (GLenum, GLint, GLint, GLint);
21216+GLAPI void APIENTRY glNormalStream3ivATI (GLenum, const GLint *);
21217+GLAPI void APIENTRY glNormalStream3fATI (GLenum, GLfloat, GLfloat, GLfloat);
21218+GLAPI void APIENTRY glNormalStream3fvATI (GLenum, const GLfloat *);
21219+GLAPI void APIENTRY glNormalStream3dATI (GLenum, GLdouble, GLdouble, GLdouble);
21220+GLAPI void APIENTRY glNormalStream3dvATI (GLenum, const GLdouble *);
21221+GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum);
21222+GLAPI void APIENTRY glVertexBlendEnviATI (GLenum, GLint);
21223+GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum, GLfloat);
21224+#endif /* GL_GLEXT_PROTOTYPES */
21225+typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x);
21226+typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords);
21227+typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x);
21228+typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords);
21229+typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x);
21230+typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords);
21231+typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x);
21232+typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords);
21233+typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y);
21234+typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords);
21235+typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y);
21236+typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords);
21237+typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y);
21238+typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords);
21239+typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y);
21240+typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords);
21241+typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z);
21242+typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
21243+typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z);
21244+typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
21245+typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
21246+typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
21247+typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
21248+typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
21249+typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
21250+typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords);
21251+typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w);
21252+typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords);
21253+typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
21254+typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords);
21255+typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
21256+typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords);
21257+typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);
21258+typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords);
21259+typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz);
21260+typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
21261+typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz);
21262+typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
21263+typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);
21264+typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
21265+typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);
21266+typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
21267+typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream);
21268+typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param);
21269+typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param);
21270+#endif
21271+
21272+#ifndef GL_ATI_element_array
21273+#define GL_ATI_element_array 1
21274+#ifdef GL_GLEXT_PROTOTYPES
21275+GLAPI void APIENTRY glElementPointerATI (GLenum, const GLvoid *);
21276+GLAPI void APIENTRY glDrawElementArrayATI (GLenum, GLsizei);
21277+GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum, GLuint, GLuint, GLsizei);
21278+#endif /* GL_GLEXT_PROTOTYPES */
21279+typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer);
21280+typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count);
21281+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count);
21282+#endif
21283+
21284+#ifndef GL_SUN_mesh_array
21285+#define GL_SUN_mesh_array 1
21286+#ifdef GL_GLEXT_PROTOTYPES
21287+GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum, GLint, GLsizei, GLsizei);
21288+#endif /* GL_GLEXT_PROTOTYPES */
21289+typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width);
21290+#endif
21291+
21292+#ifndef GL_SUN_slice_accum
21293+#define GL_SUN_slice_accum 1
21294+#endif
21295+
21296+#ifndef GL_NV_multisample_filter_hint
21297+#define GL_NV_multisample_filter_hint 1
21298+#endif
21299+
21300+#ifndef GL_NV_depth_clamp
21301+#define GL_NV_depth_clamp 1
21302+#endif
21303+
21304+#ifndef GL_NV_occlusion_query
21305+#define GL_NV_occlusion_query 1
21306+#ifdef GL_GLEXT_PROTOTYPES
21307+GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei, GLuint *);
21308+GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei, const GLuint *);
21309+GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint);
21310+GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint);
21311+GLAPI void APIENTRY glEndOcclusionQueryNV (void);
21312+GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint, GLenum, GLint *);
21313+GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint, GLenum, GLuint *);
21314+#endif /* GL_GLEXT_PROTOTYPES */
21315+typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids);
21316+typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids);
21317+typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id);
21318+typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id);
21319+typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void);
21320+typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params);
21321+typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params);
21322+#endif
21323+
21324+#ifndef GL_NV_point_sprite
21325+#define GL_NV_point_sprite 1
21326+#ifdef GL_GLEXT_PROTOTYPES
21327+GLAPI void APIENTRY glPointParameteriNV (GLenum, GLint);
21328+GLAPI void APIENTRY glPointParameterivNV (GLenum, const GLint *);
21329+#endif /* GL_GLEXT_PROTOTYPES */
21330+typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param);
21331+typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
21332+#endif
21333+
21334+#ifndef GL_NV_texture_shader3
21335+#define GL_NV_texture_shader3 1
21336+#endif
21337+
21338+#ifndef GL_NV_vertex_program1_1
21339+#define GL_NV_vertex_program1_1 1
21340+#endif
21341+
21342+#ifndef GL_EXT_shadow_funcs
21343+#define GL_EXT_shadow_funcs 1
21344+#endif
21345+
21346+#ifndef GL_EXT_stencil_two_side
21347+#define GL_EXT_stencil_two_side 1
21348+#ifdef GL_GLEXT_PROTOTYPES
21349+GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum);
21350+#endif /* GL_GLEXT_PROTOTYPES */
21351+typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face);
21352+#endif
21353+
21354+#ifndef GL_ATI_text_fragment_shader
21355+#define GL_ATI_text_fragment_shader 1
21356+#endif
21357+
21358+#ifndef GL_APPLE_client_storage
21359+#define GL_APPLE_client_storage 1
21360+#endif
21361+
21362+#ifndef GL_APPLE_element_array
21363+#define GL_APPLE_element_array 1
21364+#ifdef GL_GLEXT_PROTOTYPES
21365+GLAPI void APIENTRY glElementPointerAPPLE (GLenum, const GLvoid *);
21366+GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum, GLint, GLsizei);
21367+GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, GLint, GLsizei);
21368+GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum, const GLint *, const GLsizei *, GLsizei);
21369+GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, const GLint *, const GLsizei *, GLsizei);
21370+#endif /* GL_GLEXT_PROTOTYPES */
21371+typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid *pointer);
21372+typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count);
21373+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
21374+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
21375+typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);
21376+#endif
21377+
21378+#ifndef GL_APPLE_fence
21379+#define GL_APPLE_fence 1
21380+#ifdef GL_GLEXT_PROTOTYPES
21381+GLAPI void APIENTRY glGenFencesAPPLE (GLsizei, GLuint *);
21382+GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei, const GLuint *);
21383+GLAPI void APIENTRY glSetFenceAPPLE (GLuint);
21384+GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint);
21385+GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint);
21386+GLAPI void APIENTRY glFinishFenceAPPLE (GLuint);
21387+GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum, GLuint);
21388+GLAPI void APIENTRY glFinishObjectAPPLE (GLenum, GLint);
21389+#endif /* GL_GLEXT_PROTOTYPES */
21390+typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences);
21391+typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences);
21392+typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence);
21393+typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence);
21394+typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence);
21395+typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence);
21396+typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name);
21397+typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);
21398+#endif
21399+
21400+#ifndef GL_APPLE_vertex_array_object
21401+#define GL_APPLE_vertex_array_object 1
21402+#ifdef GL_GLEXT_PROTOTYPES
21403+GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint);
21404+GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei, const GLuint *);
21405+GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, GLuint *);
21406+GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint);
21407+#endif /* GL_GLEXT_PROTOTYPES */
21408+typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
21409+typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
21410+typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);
21411+typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
21412+#endif
21413+
21414+#ifndef GL_APPLE_vertex_array_range
21415+#define GL_APPLE_vertex_array_range 1
21416+#ifdef GL_GLEXT_PROTOTYPES
21417+GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei, GLvoid *);
21418+GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei, GLvoid *);
21419+GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum, GLint);
21420+#endif /* GL_GLEXT_PROTOTYPES */
21421+typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);
21422+typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);
21423+typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param);
21424+#endif
21425+
21426+#ifndef GL_APPLE_ycbcr_422
21427+#define GL_APPLE_ycbcr_422 1
21428+#endif
21429+
21430+#ifndef GL_S3_s3tc
21431+#define GL_S3_s3tc 1
21432+#endif
21433+
21434+#ifndef GL_ATI_draw_buffers
21435+#define GL_ATI_draw_buffers 1
21436+#ifdef GL_GLEXT_PROTOTYPES
21437+GLAPI void APIENTRY glDrawBuffersATI (GLsizei, const GLenum *);
21438+#endif /* GL_GLEXT_PROTOTYPES */
21439+typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs);
21440+#endif
21441+
21442+#ifndef GL_ATI_pixel_format_float
21443+#define GL_ATI_pixel_format_float 1
21444+/* This is really a WGL extension, but defines some associated GL enums.
21445+ * ATI does not export "GL_ATI_pixel_format_float" in the GL_EXTENSIONS string.
21446+ */
21447+#endif
21448+
21449+#ifndef GL_ATI_texture_env_combine3
21450+#define GL_ATI_texture_env_combine3 1
21451+#endif
21452+
21453+#ifndef GL_ATI_texture_float
21454+#define GL_ATI_texture_float 1
21455+#endif
21456+
21457+#ifndef GL_NV_float_buffer
21458+#define GL_NV_float_buffer 1
21459+#endif
21460+
21461+#ifndef GL_NV_fragment_program
21462+#define GL_NV_fragment_program 1
21463+/* Some NV_fragment_program entry points are shared with ARB_vertex_program. */
21464+#ifdef GL_GLEXT_PROTOTYPES
21465+GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat);
21466+GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble);
21467+GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint, GLsizei, const GLubyte *, const GLfloat *);
21468+GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint, GLsizei, const GLubyte *, const GLdouble *);
21469+GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint, GLsizei, const GLubyte *, GLfloat *);
21470+GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint, GLsizei, const GLubyte *, GLdouble *);
21471+#endif /* GL_GLEXT_PROTOTYPES */
21472+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
21473+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
21474+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
21475+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
21476+typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
21477+typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
21478+#endif
21479+
21480+#ifndef GL_NV_half_float
21481+#define GL_NV_half_float 1
21482+#ifdef GL_GLEXT_PROTOTYPES
21483+GLAPI void APIENTRY glVertex2hNV (GLhalfNV, GLhalfNV);
21484+GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *);
21485+GLAPI void APIENTRY glVertex3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21486+GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *);
21487+GLAPI void APIENTRY glVertex4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21488+GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *);
21489+GLAPI void APIENTRY glNormal3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21490+GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *);
21491+GLAPI void APIENTRY glColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21492+GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *);
21493+GLAPI void APIENTRY glColor4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21494+GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *);
21495+GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV);
21496+GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *);
21497+GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV, GLhalfNV);
21498+GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *);
21499+GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21500+GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *);
21501+GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21502+GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *);
21503+GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum, GLhalfNV);
21504+GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum, const GLhalfNV *);
21505+GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum, GLhalfNV, GLhalfNV);
21506+GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum, const GLhalfNV *);
21507+GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV);
21508+GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum, const GLhalfNV *);
21509+GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21510+GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum, const GLhalfNV *);
21511+GLAPI void APIENTRY glFogCoordhNV (GLhalfNV);
21512+GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *);
21513+GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21514+GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *);
21515+GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV);
21516+GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *);
21517+GLAPI void APIENTRY glVertexAttrib1hNV (GLuint, GLhalfNV);
21518+GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint, const GLhalfNV *);
21519+GLAPI void APIENTRY glVertexAttrib2hNV (GLuint, GLhalfNV, GLhalfNV);
21520+GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint, const GLhalfNV *);
21521+GLAPI void APIENTRY glVertexAttrib3hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV);
21522+GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint, const GLhalfNV *);
21523+GLAPI void APIENTRY glVertexAttrib4hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21524+GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint, const GLhalfNV *);
21525+GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint, GLsizei, const GLhalfNV *);
21526+GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint, GLsizei, const GLhalfNV *);
21527+GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint, GLsizei, const GLhalfNV *);
21528+GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint, GLsizei, const GLhalfNV *);
21529+#endif /* GL_GLEXT_PROTOTYPES */
21530+typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y);
21531+typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v);
21532+typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z);
21533+typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v);
21534+typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
21535+typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v);
21536+typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);
21537+typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v);
21538+typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
21539+typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v);
21540+typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);
21541+typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v);
21542+typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s);
21543+typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v);
21544+typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t);
21545+typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v);
21546+typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r);
21547+typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v);
21548+typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
21549+typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v);
21550+typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s);
21551+typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v);
21552+typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t);
21553+typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v);
21554+typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);
21555+typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v);
21556+typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
21557+typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v);
21558+typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog);
21559+typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog);
21560+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
21561+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v);
21562+typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight);
21563+typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight);
21564+typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x);
21565+typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v);
21566+typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y);
21567+typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v);
21568+typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);
21569+typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v);
21570+typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
21571+typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v);
21572+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21573+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21574+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21575+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21576+#endif
21577+
21578+#ifndef GL_NV_pixel_data_range
21579+#define GL_NV_pixel_data_range 1
21580+#ifdef GL_GLEXT_PROTOTYPES
21581+GLAPI void APIENTRY glPixelDataRangeNV (GLenum, GLsizei, GLvoid *);
21582+GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum);
21583+#endif /* GL_GLEXT_PROTOTYPES */
21584+typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, GLvoid *pointer);
21585+typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target);
21586+#endif
21587+
21588+#ifndef GL_NV_primitive_restart
21589+#define GL_NV_primitive_restart 1
21590+#ifdef GL_GLEXT_PROTOTYPES
21591+GLAPI void APIENTRY glPrimitiveRestartNV (void);
21592+GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint);
21593+#endif /* GL_GLEXT_PROTOTYPES */
21594+typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void);
21595+typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index);
21596+#endif
21597+
21598+#ifndef GL_NV_texture_expand_normal
21599+#define GL_NV_texture_expand_normal 1
21600+#endif
21601+
21602+#ifndef GL_NV_vertex_program2
21603+#define GL_NV_vertex_program2 1
21604+#endif
21605+
21606+#ifndef GL_ATI_map_object_buffer
21607+#define GL_ATI_map_object_buffer 1
21608+#ifdef GL_GLEXT_PROTOTYPES
21609+GLAPI GLvoid* APIENTRY glMapObjectBufferATI (GLuint);
21610+GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint);
21611+#endif /* GL_GLEXT_PROTOTYPES */
21612+typedef GLvoid* (APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer);
21613+typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer);
21614+#endif
21615+
21616+#ifndef GL_ATI_separate_stencil
21617+#define GL_ATI_separate_stencil 1
21618+#ifdef GL_GLEXT_PROTOTYPES
21619+GLAPI void APIENTRY glStencilOpSeparateATI (GLenum, GLenum, GLenum, GLenum);
21620+GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum, GLenum, GLint, GLuint);
21621+#endif /* GL_GLEXT_PROTOTYPES */
21622+typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
21623+typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
21624+#endif
21625+
21626+#ifndef GL_ATI_vertex_attrib_array_object
21627+#define GL_ATI_vertex_attrib_array_object 1
21628+#ifdef GL_GLEXT_PROTOTYPES
21629+GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint, GLint, GLenum, GLboolean, GLsizei, GLuint, GLuint);
21630+GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint, GLenum, GLfloat *);
21631+GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint, GLenum, GLint *);
21632+#endif /* GL_GLEXT_PROTOTYPES */
21633+typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
21634+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params);
21635+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params);
21636+#endif
21637+
21638+#ifndef GL_OES_read_format
21639+#define GL_OES_read_format 1
21640+#endif
21641+
21642+#ifndef GL_EXT_depth_bounds_test
21643+#define GL_EXT_depth_bounds_test 1
21644+#ifdef GL_GLEXT_PROTOTYPES
21645+GLAPI void APIENTRY glDepthBoundsEXT (GLclampd, GLclampd);
21646+#endif /* GL_GLEXT_PROTOTYPES */
21647+typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax);
21648+#endif
21649+
21650+#ifndef GL_EXT_texture_mirror_clamp
21651+#define GL_EXT_texture_mirror_clamp 1
21652+#endif
21653+
21654+#ifndef GL_EXT_blend_equation_separate
21655+#define GL_EXT_blend_equation_separate 1
21656+#ifdef GL_GLEXT_PROTOTYPES
21657+GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum, GLenum);
21658+#endif /* GL_GLEXT_PROTOTYPES */
21659+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha);
21660+#endif
21661+
21662+#ifndef GL_MESA_pack_invert
21663+#define GL_MESA_pack_invert 1
21664+#endif
21665+
21666+#ifndef GL_MESA_ycbcr_texture
21667+#define GL_MESA_ycbcr_texture 1
21668+#endif
21669+
21670+#ifndef GL_EXT_pixel_buffer_object
21671+#define GL_EXT_pixel_buffer_object 1
21672+#endif
21673+
21674+#ifndef GL_NV_fragment_program_option
21675+#define GL_NV_fragment_program_option 1
21676+#endif
21677+
21678+#ifndef GL_NV_fragment_program2
21679+#define GL_NV_fragment_program2 1
21680+#endif
21681+
21682+#ifndef GL_NV_vertex_program2_option
21683+#define GL_NV_vertex_program2_option 1
21684+#endif
21685+
21686+#ifndef GL_NV_vertex_program3
21687+#define GL_NV_vertex_program3 1
21688+#endif
21689+
21690+#ifndef GL_EXT_framebuffer_object
21691+#define GL_EXT_framebuffer_object 1
21692+#ifdef GL_GLEXT_PROTOTYPES
21693+GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint);
21694+GLAPI void APIENTRY glBindRenderbufferEXT (GLenum, GLuint);
21695+GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei, const GLuint *);
21696+GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei, GLuint *);
21697+GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum, GLenum, GLsizei, GLsizei);
21698+GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum, GLenum, GLint *);
21699+GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint);
21700+GLAPI void APIENTRY glBindFramebufferEXT (GLenum, GLuint);
21701+GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei, const GLuint *);
21702+GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei, GLuint *);
21703+GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum);
21704+GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
21705+GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
21706+GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLint);
21707+GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum, GLenum, GLenum, GLuint);
21708+GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum, GLenum, GLenum, GLint *);
21709+GLAPI void APIENTRY glGenerateMipmapEXT (GLenum);
21710+#endif /* GL_GLEXT_PROTOTYPES */
21711+typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);
21712+typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);
21713+typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);
21714+typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);
21715+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
21716+typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
21717+typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);
21718+typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
21719+typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);
21720+typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);
21721+typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);
21722+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
21723+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
21724+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
21725+typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
21726+typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
21727+typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);
21728+#endif
21729+
21730+#ifndef GL_GREMEDY_string_marker
21731+#define GL_GREMEDY_string_marker 1
21732+#ifdef GL_GLEXT_PROTOTYPES
21733+GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei, const GLvoid *);
21734+#endif /* GL_GLEXT_PROTOTYPES */
21735+typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string);
21736+#endif
21737+
21738+#ifndef GL_EXT_packed_depth_stencil
21739+#define GL_EXT_packed_depth_stencil 1
21740+#endif
21741+
21742+#ifndef GL_EXT_stencil_clear_tag
21743+#define GL_EXT_stencil_clear_tag 1
21744+#ifdef GL_GLEXT_PROTOTYPES
21745+GLAPI void APIENTRY glStencilClearTagEXT (GLsizei, GLuint);
21746+#endif /* GL_GLEXT_PROTOTYPES */
21747+typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag);
21748+#endif
21749+
21750+#ifndef GL_EXT_texture_sRGB
21751+#define GL_EXT_texture_sRGB 1
21752+#endif
21753+
21754+#ifndef GL_EXT_framebuffer_blit
21755+#define GL_EXT_framebuffer_blit 1
21756+#ifdef GL_GLEXT_PROTOTYPES
21757+GLAPI void APIENTRY glBlitFramebufferEXT (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum);
21758+#endif /* GL_GLEXT_PROTOTYPES */
21759+typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
21760+#endif
21761+
21762+#ifndef GL_EXT_framebuffer_multisample
21763+#define GL_EXT_framebuffer_multisample 1
21764+#ifdef GL_GLEXT_PROTOTYPES
21765+GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
21766+#endif /* GL_GLEXT_PROTOTYPES */
21767+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
21768+#endif
21769+
21770+#ifndef GL_MESAX_texture_stack
21771+#define GL_MESAX_texture_stack 1
21772+#endif
21773+
21774+#ifndef GL_EXT_timer_query
21775+#define GL_EXT_timer_query 1
21776+#ifdef GL_GLEXT_PROTOTYPES
21777+GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint, GLenum, GLint64EXT *);
21778+GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint, GLenum, GLuint64EXT *);
21779+#endif /* GL_GLEXT_PROTOTYPES */
21780+typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params);
21781+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params);
21782+#endif
21783+
21784+#ifndef GL_EXT_gpu_program_parameters
21785+#define GL_EXT_gpu_program_parameters 1
21786+#ifdef GL_GLEXT_PROTOTYPES
21787+GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *);
21788+GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *);
21789+#endif /* GL_GLEXT_PROTOTYPES */
21790+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
21791+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
21792+#endif
21793+
21794+#ifndef GL_APPLE_flush_buffer_range
21795+#define GL_APPLE_flush_buffer_range 1
21796+#ifdef GL_GLEXT_PROTOTYPES
21797+GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum, GLenum, GLint);
21798+GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum, GLintptr, GLsizeiptr);
21799+#endif /* GL_GLEXT_PROTOTYPES */
21800+typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param);
21801+typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size);
21802+#endif
21803+
21804+#ifndef GL_NV_gpu_program4
21805+#define GL_NV_gpu_program4 1
21806+#ifdef GL_GLEXT_PROTOTYPES
21807+GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint);
21808+GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum, GLuint, const GLint *);
21809+GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *);
21810+GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
21811+GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum, GLuint, const GLuint *);
21812+GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *);
21813+GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint);
21814+GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum, GLuint, const GLint *);
21815+GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *);
21816+GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
21817+GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum, GLuint, const GLuint *);
21818+GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *);
21819+GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum, GLuint, GLint *);
21820+GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum, GLuint, GLuint *);
21821+GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum, GLuint, GLint *);
21822+GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum, GLuint, GLuint *);
21823+#endif /* GL_GLEXT_PROTOTYPES */
21824+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
21825+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
21826+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
21827+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
21828+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
21829+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
21830+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
21831+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
21832+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
21833+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
21834+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
21835+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
21836+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
21837+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
21838+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
21839+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
21840+#endif
21841+
21842+#ifndef GL_NV_geometry_program4
21843+#define GL_NV_geometry_program4 1
21844+#ifdef GL_GLEXT_PROTOTYPES
21845+GLAPI void APIENTRY glProgramVertexLimitNV (GLenum, GLint);
21846+GLAPI void APIENTRY glFramebufferTextureEXT (GLenum, GLenum, GLuint, GLint);
21847+GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum, GLenum, GLuint, GLint, GLint);
21848+GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum, GLenum, GLuint, GLint, GLenum);
21849+#endif /* GL_GLEXT_PROTOTYPES */
21850+typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit);
21851+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
21852+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
21853+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
21854+#endif
21855+
21856+#ifndef GL_EXT_geometry_shader4
21857+#define GL_EXT_geometry_shader4 1
21858+#ifdef GL_GLEXT_PROTOTYPES
21859+GLAPI void APIENTRY glProgramParameteriEXT (GLuint, GLenum, GLint);
21860+#endif /* GL_GLEXT_PROTOTYPES */
21861+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
21862+#endif
21863+
21864+#ifndef GL_NV_vertex_program4
21865+#define GL_NV_vertex_program4 1
21866+#ifdef GL_GLEXT_PROTOTYPES
21867+GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint, GLint);
21868+GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint, GLint, GLint);
21869+GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint, GLint, GLint, GLint);
21870+GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint, GLint, GLint, GLint, GLint);
21871+GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint, GLuint);
21872+GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint, GLuint, GLuint);
21873+GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint, GLuint, GLuint, GLuint);
21874+GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint, GLuint, GLuint, GLuint, GLuint);
21875+GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint, const GLint *);
21876+GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint, const GLint *);
21877+GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint, const GLint *);
21878+GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint, const GLint *);
21879+GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint, const GLuint *);
21880+GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint, const GLuint *);
21881+GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint, const GLuint *);
21882+GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint, const GLuint *);
21883+GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint, const GLbyte *);
21884+GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint, const GLshort *);
21885+GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint, const GLubyte *);
21886+GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint, const GLushort *);
21887+GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint, GLint, GLenum, GLsizei, const GLvoid *);
21888+GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint, GLenum, GLint *);
21889+GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint, GLenum, GLuint *);
21890+#endif /* GL_GLEXT_PROTOTYPES */
21891+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x);
21892+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y);
21893+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z);
21894+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
21895+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x);
21896+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y);
21897+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
21898+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
21899+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v);
21900+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v);
21901+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v);
21902+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v);
21903+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v);
21904+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v);
21905+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v);
21906+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v);
21907+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v);
21908+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v);
21909+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v);
21910+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v);
21911+typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
21912+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params);
21913+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params);
21914+#endif
21915+
21916+#ifndef GL_EXT_gpu_shader4
21917+#define GL_EXT_gpu_shader4 1
21918+#ifdef GL_GLEXT_PROTOTYPES
21919+GLAPI void APIENTRY glGetUniformuivEXT (GLuint, GLint, GLuint *);
21920+GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint, GLuint, const GLchar *);
21921+GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint, const GLchar *);
21922+GLAPI void APIENTRY glUniform1uiEXT (GLint, GLuint);
21923+GLAPI void APIENTRY glUniform2uiEXT (GLint, GLuint, GLuint);
21924+GLAPI void APIENTRY glUniform3uiEXT (GLint, GLuint, GLuint, GLuint);
21925+GLAPI void APIENTRY glUniform4uiEXT (GLint, GLuint, GLuint, GLuint, GLuint);
21926+GLAPI void APIENTRY glUniform1uivEXT (GLint, GLsizei, const GLuint *);
21927+GLAPI void APIENTRY glUniform2uivEXT (GLint, GLsizei, const GLuint *);
21928+GLAPI void APIENTRY glUniform3uivEXT (GLint, GLsizei, const GLuint *);
21929+GLAPI void APIENTRY glUniform4uivEXT (GLint, GLsizei, const GLuint *);
21930+#endif /* GL_GLEXT_PROTOTYPES */
21931+typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params);
21932+typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name);
21933+typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name);
21934+typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0);
21935+typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1);
21936+typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
21937+typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
21938+typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
21939+typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
21940+typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
21941+typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
21942+#endif
21943+
21944+#ifndef GL_EXT_draw_instanced
21945+#define GL_EXT_draw_instanced 1
21946+#ifdef GL_GLEXT_PROTOTYPES
21947+GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum, GLint, GLsizei, GLsizei);
21948+GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum, GLsizei, GLenum, const GLvoid *, GLsizei);
21949+#endif /* GL_GLEXT_PROTOTYPES */
21950+typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
21951+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
21952+#endif
21953+
21954+#ifndef GL_EXT_packed_float
21955+#define GL_EXT_packed_float 1
21956+#endif
21957+
21958+#ifndef GL_EXT_texture_array
21959+#define GL_EXT_texture_array 1
21960+#endif
21961+
21962+#ifndef GL_EXT_texture_buffer_object
21963+#define GL_EXT_texture_buffer_object 1
21964+#ifdef GL_GLEXT_PROTOTYPES
21965+GLAPI void APIENTRY glTexBufferEXT (GLenum, GLenum, GLuint);
21966+#endif /* GL_GLEXT_PROTOTYPES */
21967+typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
21968+#endif
21969+
21970+#ifndef GL_EXT_texture_compression_latc
21971+#define GL_EXT_texture_compression_latc 1
21972+#endif
21973+
21974+#ifndef GL_EXT_texture_compression_rgtc
21975+#define GL_EXT_texture_compression_rgtc 1
21976+#endif
21977+
21978+#ifndef GL_EXT_texture_shared_exponent
21979+#define GL_EXT_texture_shared_exponent 1
21980+#endif
21981+
21982+#ifndef GL_NV_depth_buffer_float
21983+#define GL_NV_depth_buffer_float 1
21984+#ifdef GL_GLEXT_PROTOTYPES
21985+GLAPI void APIENTRY glDepthRangedNV (GLdouble, GLdouble);
21986+GLAPI void APIENTRY glClearDepthdNV (GLdouble);
21987+GLAPI void APIENTRY glDepthBoundsdNV (GLdouble, GLdouble);
21988+#endif /* GL_GLEXT_PROTOTYPES */
21989+typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar);
21990+typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth);
21991+typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax);
21992+#endif
21993+
21994+#ifndef GL_NV_fragment_program4
21995+#define GL_NV_fragment_program4 1
21996+#endif
21997+
21998+#ifndef GL_NV_framebuffer_multisample_coverage
21999+#define GL_NV_framebuffer_multisample_coverage 1
22000+#ifdef GL_GLEXT_PROTOTYPES
22001+GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum, GLsizei, GLsizei, GLenum, GLsizei, GLsizei);
22002+#endif /* GL_GLEXT_PROTOTYPES */
22003+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
22004+#endif
22005+
22006+#ifndef GL_EXT_framebuffer_sRGB
22007+#define GL_EXT_framebuffer_sRGB 1
22008+#endif
22009+
22010+#ifndef GL_NV_geometry_shader4
22011+#define GL_NV_geometry_shader4 1
22012+#endif
22013+
22014+#ifndef GL_NV_parameter_buffer_object
22015+#define GL_NV_parameter_buffer_object 1
22016+#ifdef GL_GLEXT_PROTOTYPES
22017+GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum, GLuint, GLuint, GLsizei, const GLfloat *);
22018+GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum, GLuint, GLuint, GLsizei, const GLint *);
22019+GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum, GLuint, GLuint, GLsizei, const GLuint *);
22020+#endif /* GL_GLEXT_PROTOTYPES */
22021+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params);
22022+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params);
22023+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params);
22024+#endif
22025+
22026+#ifndef GL_EXT_draw_buffers2
22027+#define GL_EXT_draw_buffers2 1
22028+#ifdef GL_GLEXT_PROTOTYPES
22029+GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint, GLboolean, GLboolean, GLboolean, GLboolean);
22030+GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum, GLuint, GLboolean *);
22031+GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum, GLuint, GLint *);
22032+GLAPI void APIENTRY glEnableIndexedEXT (GLenum, GLuint);
22033+GLAPI void APIENTRY glDisableIndexedEXT (GLenum, GLuint);
22034+GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum, GLuint);
22035+#endif /* GL_GLEXT_PROTOTYPES */
22036+typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
22037+typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data);
22038+typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data);
22039+typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
22040+typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
22041+typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index);
22042+#endif
22043+
22044+#ifndef GL_NV_transform_feedback
22045+#define GL_NV_transform_feedback 1
22046+#ifdef GL_GLEXT_PROTOTYPES
22047+GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum);
22048+GLAPI void APIENTRY glEndTransformFeedbackNV (void);
22049+GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint, const GLint *, GLenum);
22050+GLAPI void APIENTRY glBindBufferRangeNV (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr);
22051+GLAPI void APIENTRY glBindBufferOffsetNV (GLenum, GLuint, GLuint, GLintptr);
22052+GLAPI void APIENTRY glBindBufferBaseNV (GLenum, GLuint, GLuint);
22053+GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint, GLsizei, const GLint *, GLenum);
22054+GLAPI void APIENTRY glActiveVaryingNV (GLuint, const GLchar *);
22055+GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint, const GLchar *);
22056+GLAPI void APIENTRY glGetActiveVaryingNV (GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *);
22057+GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint, GLuint, GLint *);
22058+#endif /* GL_GLEXT_PROTOTYPES */
22059+typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode);
22060+typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void);
22061+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode);
22062+typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
22063+typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
22064+typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer);
22065+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
22066+typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name);
22067+typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name);
22068+typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
22069+typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location);
22070+#endif
22071+
22072+#ifndef GL_EXT_bindable_uniform
22073+#define GL_EXT_bindable_uniform 1
22074+#ifdef GL_GLEXT_PROTOTYPES
22075+GLAPI void APIENTRY glUniformBufferEXT (GLuint, GLint, GLuint);
22076+GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint, GLint);
22077+GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint, GLint);
22078+#endif /* GL_GLEXT_PROTOTYPES */
22079+typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer);
22080+typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location);
22081+typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location);
22082+#endif
22083+
22084+#ifndef GL_EXT_texture_integer
22085+#define GL_EXT_texture_integer 1
22086+#ifdef GL_GLEXT_PROTOTYPES
22087+GLAPI void APIENTRY glTexParameterIivEXT (GLenum, GLenum, const GLint *);
22088+GLAPI void APIENTRY glTexParameterIuivEXT (GLenum, GLenum, const GLuint *);
22089+GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum, GLenum, GLint *);
22090+GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum, GLenum, GLuint *);
22091+GLAPI void APIENTRY glClearColorIiEXT (GLint, GLint, GLint, GLint);
22092+GLAPI void APIENTRY glClearColorIuiEXT (GLuint, GLuint, GLuint, GLuint);
22093+#endif /* GL_GLEXT_PROTOTYPES */
22094+typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
22095+typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
22096+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
22097+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
22098+typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha);
22099+typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);
22100+#endif
22101+
22102+
22103+#ifdef __cplusplus
22104+}
22105+#endif
22106+
22107+#endif
22108+
22109+
22110+/* ERO */
22111+GLAPI void GLAPIENTRY fake_gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *data);
22112Index: qemu-0.14.0/target-i386/mesa_glu.h
22113===================================================================
22114--- /dev/null
22115+++ qemu-0.14.0/target-i386/mesa_glu.h
22116@@ -0,0 +1,354 @@
22117+/*
22118+** License Applicability. Except to the extent portions of this file are
22119+** made subject to an alternative license as permitted in the SGI Free
22120+** Software License B, Version 1.1 (the "License"), the contents of this
22121+** file are subject only to the provisions of the License. You may not use
22122+** this file except in compliance with the License. You may obtain a copy
22123+** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
22124+** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
22125+**
22126+** http://oss.sgi.com/projects/FreeB
22127+**
22128+** Note that, as provided in the License, the Software is distributed on an
22129+** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
22130+** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
22131+** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
22132+** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
22133+**
22134+** Original Code. The Original Code is: OpenGL Sample Implementation,
22135+** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
22136+** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
22137+** Copyright in any portions created by third parties is as indicated
22138+** elsewhere herein. All Rights Reserved.
22139+**
22140+** Additional Notice Provisions: This software was created using the
22141+** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
22142+** not been independently verified as being compliant with the OpenGL(R)
22143+** version 1.2.1 Specification.
22144+*/
22145+
22146+#ifndef __glu_h__
22147+#define __glu_h__
22148+
22149+#if defined(USE_MGL_NAMESPACE)
22150+#include "glu_mangle.h"
22151+#endif
22152+
22153+//#include <GL/gl.h>
22154+#include "mesa_gl.h"
22155+
22156+#ifndef GLAPIENTRY
22157+#define GLAPIENTRY
22158+#endif
22159+
22160+#ifndef GLAPIENTRYP
22161+#define GLAPIENTRYP GLAPIENTRY *
22162+#endif
22163+
22164+#ifdef GLAPI
22165+#undef GLAPI
22166+#endif
22167+
22168+# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GLU32)
22169+# define GLAPI __declspec(dllexport)
22170+# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
22171+# define GLAPI __declspec(dllimport)
22172+# else /* for use with static link lib build of Win32 edition only */
22173+# define GLAPI extern
22174+# endif /* _STATIC_MESA support */
22175+
22176+
22177+#ifndef GLAPI
22178+#define GLAPI
22179+#endif
22180+
22181+#ifdef __cplusplus
22182+extern "C" {
22183+#endif
22184+
22185+/*************************************************************/
22186+
22187+/* Extensions */
22188+#define GLU_EXT_object_space_tess 1
22189+#define GLU_EXT_nurbs_tessellator 1
22190+
22191+/* Boolean */
22192+#define GLU_FALSE 0
22193+#define GLU_TRUE 1
22194+
22195+/* Version */
22196+#define GLU_VERSION_1_1 1
22197+#define GLU_VERSION_1_2 1
22198+#define GLU_VERSION_1_3 1
22199+
22200+/* StringName */
22201+#define GLU_VERSION 100800
22202+#define GLU_EXTENSIONS 100801
22203+
22204+/* ErrorCode */
22205+#define GLU_INVALID_ENUM 100900
22206+#define GLU_INVALID_VALUE 100901
22207+#define GLU_OUT_OF_MEMORY 100902
22208+#define GLU_INCOMPATIBLE_GL_VERSION 100903
22209+#define GLU_INVALID_OPERATION 100904
22210+
22211+/* NurbsDisplay */
22212+/* GLU_FILL */
22213+#define GLU_OUTLINE_POLYGON 100240
22214+#define GLU_OUTLINE_PATCH 100241
22215+
22216+/* NurbsCallback */
22217+#define GLU_NURBS_ERROR 100103
22218+#define GLU_ERROR 100103
22219+#define GLU_NURBS_BEGIN 100164
22220+#define GLU_NURBS_BEGIN_EXT 100164
22221+#define GLU_NURBS_VERTEX 100165
22222+#define GLU_NURBS_VERTEX_EXT 100165
22223+#define GLU_NURBS_NORMAL 100166
22224+#define GLU_NURBS_NORMAL_EXT 100166
22225+#define GLU_NURBS_COLOR 100167
22226+#define GLU_NURBS_COLOR_EXT 100167
22227+#define GLU_NURBS_TEXTURE_COORD 100168
22228+#define GLU_NURBS_TEX_COORD_EXT 100168
22229+#define GLU_NURBS_END 100169
22230+#define GLU_NURBS_END_EXT 100169
22231+#define GLU_NURBS_BEGIN_DATA 100170
22232+#define GLU_NURBS_BEGIN_DATA_EXT 100170
22233+#define GLU_NURBS_VERTEX_DATA 100171
22234+#define GLU_NURBS_VERTEX_DATA_EXT 100171
22235+#define GLU_NURBS_NORMAL_DATA 100172
22236+#define GLU_NURBS_NORMAL_DATA_EXT 100172
22237+#define GLU_NURBS_COLOR_DATA 100173
22238+#define GLU_NURBS_COLOR_DATA_EXT 100173
22239+#define GLU_NURBS_TEXTURE_COORD_DATA 100174
22240+#define GLU_NURBS_TEX_COORD_DATA_EXT 100174
22241+#define GLU_NURBS_END_DATA 100175
22242+#define GLU_NURBS_END_DATA_EXT 100175
22243+
22244+/* NurbsError */
22245+#define GLU_NURBS_ERROR1 100251
22246+#define GLU_NURBS_ERROR2 100252
22247+#define GLU_NURBS_ERROR3 100253
22248+#define GLU_NURBS_ERROR4 100254
22249+#define GLU_NURBS_ERROR5 100255
22250+#define GLU_NURBS_ERROR6 100256
22251+#define GLU_NURBS_ERROR7 100257
22252+#define GLU_NURBS_ERROR8 100258
22253+#define GLU_NURBS_ERROR9 100259
22254+#define GLU_NURBS_ERROR10 100260
22255+#define GLU_NURBS_ERROR11 100261
22256+#define GLU_NURBS_ERROR12 100262
22257+#define GLU_NURBS_ERROR13 100263
22258+#define GLU_NURBS_ERROR14 100264
22259+#define GLU_NURBS_ERROR15 100265
22260+#define GLU_NURBS_ERROR16 100266
22261+#define GLU_NURBS_ERROR17 100267
22262+#define GLU_NURBS_ERROR18 100268
22263+#define GLU_NURBS_ERROR19 100269
22264+#define GLU_NURBS_ERROR20 100270
22265+#define GLU_NURBS_ERROR21 100271
22266+#define GLU_NURBS_ERROR22 100272
22267+#define GLU_NURBS_ERROR23 100273
22268+#define GLU_NURBS_ERROR24 100274
22269+#define GLU_NURBS_ERROR25 100275
22270+#define GLU_NURBS_ERROR26 100276
22271+#define GLU_NURBS_ERROR27 100277
22272+#define GLU_NURBS_ERROR28 100278
22273+#define GLU_NURBS_ERROR29 100279
22274+#define GLU_NURBS_ERROR30 100280
22275+#define GLU_NURBS_ERROR31 100281
22276+#define GLU_NURBS_ERROR32 100282
22277+#define GLU_NURBS_ERROR33 100283
22278+#define GLU_NURBS_ERROR34 100284
22279+#define GLU_NURBS_ERROR35 100285
22280+#define GLU_NURBS_ERROR36 100286
22281+#define GLU_NURBS_ERROR37 100287
22282+
22283+/* NurbsProperty */
22284+#define GLU_AUTO_LOAD_MATRIX 100200
22285+#define GLU_CULLING 100201
22286+#define GLU_SAMPLING_TOLERANCE 100203
22287+#define GLU_DISPLAY_MODE 100204
22288+#define GLU_PARAMETRIC_TOLERANCE 100202
22289+#define GLU_SAMPLING_METHOD 100205
22290+#define GLU_U_STEP 100206
22291+#define GLU_V_STEP 100207
22292+#define GLU_NURBS_MODE 100160
22293+#define GLU_NURBS_MODE_EXT 100160
22294+#define GLU_NURBS_TESSELLATOR 100161
22295+#define GLU_NURBS_TESSELLATOR_EXT 100161
22296+#define GLU_NURBS_RENDERER 100162
22297+#define GLU_NURBS_RENDERER_EXT 100162
22298+
22299+/* NurbsSampling */
22300+#define GLU_OBJECT_PARAMETRIC_ERROR 100208
22301+#define GLU_OBJECT_PARAMETRIC_ERROR_EXT 100208
22302+#define GLU_OBJECT_PATH_LENGTH 100209
22303+#define GLU_OBJECT_PATH_LENGTH_EXT 100209
22304+#define GLU_PATH_LENGTH 100215
22305+#define GLU_PARAMETRIC_ERROR 100216
22306+#define GLU_DOMAIN_DISTANCE 100217
22307+
22308+/* NurbsTrim */
22309+#define GLU_MAP1_TRIM_2 100210
22310+#define GLU_MAP1_TRIM_3 100211
22311+
22312+/* QuadricDrawStyle */
22313+#define GLU_POINT 100010
22314+#define GLU_LINE 100011
22315+#define GLU_FILL 100012
22316+#define GLU_SILHOUETTE 100013
22317+
22318+/* QuadricCallback */
22319+/* GLU_ERROR */
22320+
22321+/* QuadricNormal */
22322+#define GLU_SMOOTH 100000
22323+#define GLU_FLAT 100001
22324+#define GLU_NONE 100002
22325+
22326+/* QuadricOrientation */
22327+#define GLU_OUTSIDE 100020
22328+#define GLU_INSIDE 100021
22329+
22330+/* TessCallback */
22331+#define GLU_TESS_BEGIN 100100
22332+#define GLU_BEGIN 100100
22333+#define GLU_TESS_VERTEX 100101
22334+#define GLU_VERTEX 100101
22335+#define GLU_TESS_END 100102
22336+#define GLU_END 100102
22337+#define GLU_TESS_ERROR 100103
22338+#define GLU_TESS_EDGE_FLAG 100104
22339+#define GLU_EDGE_FLAG 100104
22340+#define GLU_TESS_COMBINE 100105
22341+#define GLU_TESS_BEGIN_DATA 100106
22342+#define GLU_TESS_VERTEX_DATA 100107
22343+#define GLU_TESS_END_DATA 100108
22344+#define GLU_TESS_ERROR_DATA 100109
22345+#define GLU_TESS_EDGE_FLAG_DATA 100110
22346+#define GLU_TESS_COMBINE_DATA 100111
22347+
22348+/* TessContour */
22349+#define GLU_CW 100120
22350+#define GLU_CCW 100121
22351+#define GLU_INTERIOR 100122
22352+#define GLU_EXTERIOR 100123
22353+#define GLU_UNKNOWN 100124
22354+
22355+/* TessProperty */
22356+#define GLU_TESS_WINDING_RULE 100140
22357+#define GLU_TESS_BOUNDARY_ONLY 100141
22358+#define GLU_TESS_TOLERANCE 100142
22359+
22360+/* TessError */
22361+#define GLU_TESS_ERROR1 100151
22362+#define GLU_TESS_ERROR2 100152
22363+#define GLU_TESS_ERROR3 100153
22364+#define GLU_TESS_ERROR4 100154
22365+#define GLU_TESS_ERROR5 100155
22366+#define GLU_TESS_ERROR6 100156
22367+#define GLU_TESS_ERROR7 100157
22368+#define GLU_TESS_ERROR8 100158
22369+#define GLU_TESS_MISSING_BEGIN_POLYGON 100151
22370+#define GLU_TESS_MISSING_BEGIN_CONTOUR 100152
22371+#define GLU_TESS_MISSING_END_POLYGON 100153
22372+#define GLU_TESS_MISSING_END_CONTOUR 100154
22373+#define GLU_TESS_COORD_TOO_LARGE 100155
22374+#define GLU_TESS_NEED_COMBINE_CALLBACK 100156
22375+
22376+/* TessWinding */
22377+#define GLU_TESS_WINDING_ODD 100130
22378+#define GLU_TESS_WINDING_NONZERO 100131
22379+#define GLU_TESS_WINDING_POSITIVE 100132
22380+#define GLU_TESS_WINDING_NEGATIVE 100133
22381+#define GLU_TESS_WINDING_ABS_GEQ_TWO 100134
22382+
22383+/*************************************************************/
22384+
22385+
22386+#ifdef __cplusplus
22387+class GLUnurbs;
22388+class GLUquadric;
22389+class GLUtesselator;
22390+#else
22391+typedef struct GLUnurbs GLUnurbs;
22392+typedef struct GLUquadric GLUquadric;
22393+typedef struct GLUtesselator GLUtesselator;
22394+#endif
22395+
22396+typedef GLUnurbs GLUnurbsObj;
22397+typedef GLUquadric GLUquadricObj;
22398+typedef GLUtesselator GLUtesselatorObj;
22399+typedef GLUtesselator GLUtriangulatorObj;
22400+
22401+#define GLU_TESS_MAX_COORD 1.0e150
22402+
22403+/* Internal convenience typedefs */
22404+typedef void (GLAPIENTRYP _GLUfuncptr)();
22405+
22406+GLAPI void GLAPIENTRY gluBeginCurve (GLUnurbs* nurb);
22407+GLAPI void GLAPIENTRY gluBeginPolygon (GLUtesselator* tess);
22408+GLAPI void GLAPIENTRY gluBeginSurface (GLUnurbs* nurb);
22409+GLAPI void GLAPIENTRY gluBeginTrim (GLUnurbs* nurb);
22410+GLAPI GLint GLAPIENTRY gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
22411+GLAPI GLint GLAPIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
22412+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);
22413+GLAPI GLint GLAPIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data);
22414+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);
22415+GLAPI GLint GLAPIENTRY gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
22416+GLAPI GLboolean GLAPIENTRY gluCheckExtension (const GLubyte *extName, const GLubyte *extString);
22417+GLAPI void GLAPIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
22418+GLAPI void GLAPIENTRY gluDeleteNurbsRenderer (GLUnurbs* nurb);
22419+GLAPI void GLAPIENTRY gluDeleteQuadric (GLUquadric* quad);
22420+GLAPI void GLAPIENTRY gluDeleteTess (GLUtesselator* tess);
22421+GLAPI void GLAPIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
22422+GLAPI void GLAPIENTRY gluEndCurve (GLUnurbs* nurb);
22423+GLAPI void GLAPIENTRY gluEndPolygon (GLUtesselator* tess);
22424+GLAPI void GLAPIENTRY gluEndSurface (GLUnurbs* nurb);
22425+GLAPI void GLAPIENTRY gluEndTrim (GLUnurbs* nurb);
22426+GLAPI const GLubyte * GLAPIENTRY gluErrorString (GLenum error);
22427+GLAPI void GLAPIENTRY gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
22428+GLAPI const GLubyte * GLAPIENTRY gluGetString (GLenum name);
22429+GLAPI void GLAPIENTRY gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
22430+GLAPI void GLAPIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
22431+GLAPI void GLAPIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
22432+GLAPI GLUnurbs* GLAPIENTRY gluNewNurbsRenderer (void);
22433+GLAPI GLUquadric* GLAPIENTRY gluNewQuadric (void);
22434+GLAPI GLUtesselator* GLAPIENTRY gluNewTess (void);
22435+GLAPI void GLAPIENTRY gluNextContour (GLUtesselator* tess, GLenum type);
22436+GLAPI void GLAPIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
22437+GLAPI void GLAPIENTRY gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData);
22438+GLAPI void GLAPIENTRY gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData);
22439+GLAPI void GLAPIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
22440+GLAPI void GLAPIENTRY gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
22441+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);
22442+GLAPI void GLAPIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
22443+GLAPI void GLAPIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
22444+GLAPI void GLAPIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
22445+GLAPI void GLAPIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
22446+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);
22447+GLAPI void GLAPIENTRY gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
22448+GLAPI void GLAPIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
22449+GLAPI void GLAPIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
22450+GLAPI void GLAPIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal);
22451+GLAPI void GLAPIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
22452+GLAPI void GLAPIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture);
22453+GLAPI GLint GLAPIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
22454+GLAPI void GLAPIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
22455+GLAPI void GLAPIENTRY gluTessBeginContour (GLUtesselator* tess);
22456+GLAPI void GLAPIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
22457+GLAPI void GLAPIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
22458+GLAPI void GLAPIENTRY gluTessEndContour (GLUtesselator* tess);
22459+GLAPI void GLAPIENTRY gluTessEndPolygon (GLUtesselator* tess);
22460+GLAPI void GLAPIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
22461+GLAPI void GLAPIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
22462+GLAPI void GLAPIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
22463+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);
22464+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);
22465+
22466+#ifdef __cplusplus
22467+}
22468+#endif
22469+
22470+#endif /* __glu_h__ */
22471Index: qemu-0.14.0/target-i386/mesa_glx.h
22472===================================================================
22473--- /dev/null
22474+++ qemu-0.14.0/target-i386/mesa_glx.h
22475@@ -0,0 +1,510 @@
22476+/*
22477+ * Mesa 3-D graphics library
22478+ * Version: 6.5
22479+ *
22480+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
22481+ *
22482+ * Permission is hereby granted, free of charge, to any person obtaining a
22483+ * copy of this software and associated documentation files (the "Software"),
22484+ * to deal in the Software without restriction, including without limitation
22485+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
22486+ * and/or sell copies of the Software, and to permit persons to whom the
22487+ * Software is furnished to do so, subject to the following conditions:
22488+ *
22489+ * The above copyright notice and this permission notice shall be included
22490+ * in all copies or substantial portions of the Software.
22491+ *
22492+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22493+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22494+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22495+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
22496+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22497+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22498+ */
22499+
22500+
22501+#ifndef GLX_H
22502+#define GLX_H
22503+
22504+
22505+#ifdef __VMS
22506+#include <GL/vms_x_fix.h>
22507+# ifdef __cplusplus
22508+/* VMS Xlib.h gives problems with C++.
22509+ * this avoids a bunch of trivial warnings */
22510+#pragma message disable nosimpint
22511+#endif
22512+#endif
22513+#include <X11/Xlib.h>
22514+#include <X11/Xutil.h>
22515+#ifdef __VMS
22516+# ifdef __cplusplus
22517+#pragma message enable nosimpint
22518+#endif
22519+#endif
22520+#include <mesa_gl.h>
22521+
22522+
22523+#if defined(USE_MGL_NAMESPACE)
22524+#include "glx_mangle.h"
22525+#endif
22526+
22527+
22528+#ifdef __cplusplus
22529+extern "C" {
22530+#endif
22531+
22532+
22533+#define GLX_VERSION_1_1 1
22534+#define GLX_VERSION_1_2 1
22535+#define GLX_VERSION_1_3 1
22536+#define GLX_VERSION_1_4 1
22537+
22538+#define GLX_EXTENSION_NAME "GLX"
22539+
22540+
22541+
22542+/*
22543+ * Tokens for glXChooseVisual and glXGetConfig:
22544+ */
22545+#define GLX_USE_GL 1
22546+#define GLX_BUFFER_SIZE 2
22547+#define GLX_LEVEL 3
22548+#define GLX_RGBA 4
22549+#define GLX_DOUBLEBUFFER 5
22550+#define GLX_STEREO 6
22551+#define GLX_AUX_BUFFERS 7
22552+#define GLX_RED_SIZE 8
22553+#define GLX_GREEN_SIZE 9
22554+#define GLX_BLUE_SIZE 10
22555+#define GLX_ALPHA_SIZE 11
22556+#define GLX_DEPTH_SIZE 12
22557+#define GLX_STENCIL_SIZE 13
22558+#define GLX_ACCUM_RED_SIZE 14
22559+#define GLX_ACCUM_GREEN_SIZE 15
22560+#define GLX_ACCUM_BLUE_SIZE 16
22561+#define GLX_ACCUM_ALPHA_SIZE 17
22562+
22563+
22564+/*
22565+ * Error codes returned by glXGetConfig:
22566+ */
22567+#define GLX_BAD_SCREEN 1
22568+#define GLX_BAD_ATTRIBUTE 2
22569+#define GLX_NO_EXTENSION 3
22570+#define GLX_BAD_VISUAL 4
22571+#define GLX_BAD_CONTEXT 5
22572+#define GLX_BAD_VALUE 6
22573+#define GLX_BAD_ENUM 7
22574+
22575+
22576+/*
22577+ * GLX 1.1 and later:
22578+ */
22579+#define GLX_VENDOR 1
22580+#define GLX_VERSION 2
22581+#define GLX_EXTENSIONS 3
22582+
22583+
22584+/*
22585+ * GLX 1.3 and later:
22586+ */
22587+#define GLX_CONFIG_CAVEAT 0x20
22588+#define GLX_DONT_CARE 0xFFFFFFFF
22589+#define GLX_X_VISUAL_TYPE 0x22
22590+#define GLX_TRANSPARENT_TYPE 0x23
22591+#define GLX_TRANSPARENT_INDEX_VALUE 0x24
22592+#define GLX_TRANSPARENT_RED_VALUE 0x25
22593+#define GLX_TRANSPARENT_GREEN_VALUE 0x26
22594+#define GLX_TRANSPARENT_BLUE_VALUE 0x27
22595+#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
22596+#define GLX_WINDOW_BIT 0x00000001
22597+#define GLX_PIXMAP_BIT 0x00000002
22598+#define GLX_PBUFFER_BIT 0x00000004
22599+#define GLX_AUX_BUFFERS_BIT 0x00000010
22600+#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
22601+#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
22602+#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
22603+#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
22604+#define GLX_DEPTH_BUFFER_BIT 0x00000020
22605+#define GLX_STENCIL_BUFFER_BIT 0x00000040
22606+#define GLX_ACCUM_BUFFER_BIT 0x00000080
22607+#define GLX_NONE 0x8000
22608+#define GLX_SLOW_CONFIG 0x8001
22609+#define GLX_TRUE_COLOR 0x8002
22610+#define GLX_DIRECT_COLOR 0x8003
22611+#define GLX_PSEUDO_COLOR 0x8004
22612+#define GLX_STATIC_COLOR 0x8005
22613+#define GLX_GRAY_SCALE 0x8006
22614+#define GLX_STATIC_GRAY 0x8007
22615+#define GLX_TRANSPARENT_RGB 0x8008
22616+#define GLX_TRANSPARENT_INDEX 0x8009
22617+#define GLX_VISUAL_ID 0x800B
22618+#define GLX_SCREEN 0x800C
22619+#define GLX_NON_CONFORMANT_CONFIG 0x800D
22620+#define GLX_DRAWABLE_TYPE 0x8010
22621+#define GLX_RENDER_TYPE 0x8011
22622+#define GLX_X_RENDERABLE 0x8012
22623+#define GLX_FBCONFIG_ID 0x8013
22624+#define GLX_RGBA_TYPE 0x8014
22625+#define GLX_COLOR_INDEX_TYPE 0x8015
22626+#define GLX_MAX_PBUFFER_WIDTH 0x8016
22627+#define GLX_MAX_PBUFFER_HEIGHT 0x8017
22628+#define GLX_MAX_PBUFFER_PIXELS 0x8018
22629+#define GLX_PRESERVED_CONTENTS 0x801B
22630+#define GLX_LARGEST_PBUFFER 0x801C
22631+#define GLX_WIDTH 0x801D
22632+#define GLX_HEIGHT 0x801E
22633+#define GLX_EVENT_MASK 0x801F
22634+#define GLX_DAMAGED 0x8020
22635+#define GLX_SAVED 0x8021
22636+#define GLX_WINDOW 0x8022
22637+#define GLX_PBUFFER 0x8023
22638+#define GLX_PBUFFER_HEIGHT 0x8040
22639+#define GLX_PBUFFER_WIDTH 0x8041
22640+#define GLX_RGBA_BIT 0x00000001
22641+#define GLX_COLOR_INDEX_BIT 0x00000002
22642+#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
22643+
22644+
22645+/*
22646+ * GLX 1.4 and later:
22647+ */
22648+#define GLX_SAMPLE_BUFFERS 0x186a0 /*100000*/
22649+#define GLX_SAMPLES 0x186a1 /*100001*/
22650+
22651+
22652+
22653+typedef struct __GLXcontextRec *GLXContext;
22654+typedef XID GLXPixmap;
22655+typedef XID GLXDrawable;
22656+/* GLX 1.3 and later */
22657+typedef struct __GLXFBConfigRec *GLXFBConfig;
22658+typedef XID GLXFBConfigID;
22659+typedef XID GLXContextID;
22660+typedef XID GLXWindow;
22661+typedef XID GLXPbuffer;
22662+
22663+
22664+
22665+extern XVisualInfo* glXChooseVisual( Display *dpy, int screen,
22666+ int *attribList );
22667+
22668+extern GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis,
22669+ GLXContext shareList, Bool direct );
22670+
22671+extern void glXDestroyContext( Display *dpy, GLXContext ctx );
22672+
22673+extern Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable,
22674+ GLXContext ctx);
22675+
22676+extern void glXCopyContext( Display *dpy, GLXContext src, GLXContext dst,
22677+ unsigned long mask );
22678+
22679+extern void glXSwapBuffers( Display *dpy, GLXDrawable drawable );
22680+
22681+extern GLXPixmap glXCreateGLXPixmap( Display *dpy, XVisualInfo *visual,
22682+ Pixmap pixmap );
22683+
22684+extern void glXDestroyGLXPixmap( Display *dpy, GLXPixmap pixmap );
22685+
22686+extern Bool glXQueryExtension( Display *dpy, int *errorb, int *event );
22687+
22688+extern Bool glXQueryVersion( Display *dpy, int *maj, int *min );
22689+
22690+extern Bool glXIsDirect( Display *dpy, GLXContext ctx );
22691+
22692+extern int glXGetConfig( Display *dpy, XVisualInfo *visual,
22693+ int attrib, int *value );
22694+
22695+extern GLXContext glXGetCurrentContext( void );
22696+
22697+extern GLXDrawable glXGetCurrentDrawable( void );
22698+
22699+extern void glXWaitGL( void );
22700+
22701+extern void glXWaitX( void );
22702+
22703+extern void glXUseXFont( Font font, int first, int count, int list );
22704+
22705+
22706+
22707+/* GLX 1.1 and later */
22708+extern const char *glXQueryExtensionsString( Display *dpy, int screen );
22709+
22710+extern const char *glXQueryServerString( Display *dpy, int screen, int name );
22711+
22712+extern const char *glXGetClientString( Display *dpy, int name );
22713+
22714+
22715+/* GLX 1.2 and later */
22716+extern Display *glXGetCurrentDisplay( void );
22717+
22718+
22719+/* GLX 1.3 and later */
22720+extern GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
22721+ const int *attribList, int *nitems );
22722+
22723+extern int glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config,
22724+ int attribute, int *value );
22725+
22726+extern GLXFBConfig *glXGetFBConfigs( Display *dpy, int screen,
22727+ int *nelements );
22728+
22729+extern XVisualInfo *glXGetVisualFromFBConfig( Display *dpy,
22730+ GLXFBConfig config );
22731+
22732+extern GLXWindow glXCreateWindow( Display *dpy, GLXFBConfig config,
22733+ Window win, const int *attribList );
22734+
22735+extern void glXDestroyWindow( Display *dpy, GLXWindow window );
22736+
22737+extern GLXPixmap glXCreatePixmap( Display *dpy, GLXFBConfig config,
22738+ Pixmap pixmap, const int *attribList );
22739+
22740+extern void glXDestroyPixmap( Display *dpy, GLXPixmap pixmap );
22741+
22742+extern GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config,
22743+ const int *attribList );
22744+
22745+extern void glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf );
22746+
22747+extern void glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute,
22748+ unsigned int *value );
22749+
22750+extern GLXContext glXCreateNewContext( Display *dpy, GLXFBConfig config,
22751+ int renderType, GLXContext shareList,
22752+ Bool direct );
22753+
22754+extern Bool glXMakeContextCurrent( Display *dpy, GLXDrawable draw,
22755+ GLXDrawable read, GLXContext ctx );
22756+
22757+extern GLXDrawable glXGetCurrentReadDrawable( void );
22758+
22759+extern int glXQueryContext( Display *dpy, GLXContext ctx, int attribute,
22760+ int *value );
22761+
22762+extern void glXSelectEvent( Display *dpy, GLXDrawable drawable,
22763+ unsigned long mask );
22764+
22765+extern void glXGetSelectedEvent( Display *dpy, GLXDrawable drawable,
22766+ unsigned long *mask );
22767+
22768+
22769+/* GLX 1.4 and later */
22770+extern void (*glXGetProcAddress(const GLubyte *procname))( void );
22771+
22772+
22773+#ifndef GLX_GLXEXT_LEGACY
22774+
22775+#include <mesa_glxext.h>
22776+
22777+#else
22778+
22779+
22780+
22781+/*
22782+ * ARB 2. GLX_ARB_get_proc_address
22783+ */
22784+#ifndef GLX_ARB_get_proc_address
22785+#define GLX_ARB_get_proc_address 1
22786+
22787+typedef void (*__GLXextFuncPtr)(void);
22788+extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
22789+
22790+#endif /* GLX_ARB_get_proc_address */
22791+
22792+
22793+
22794+#endif /* GLX_GLXEXT_LEGACY */
22795+
22796+
22797+/**
22798+ ** The following aren't in glxext.h yet.
22799+ **/
22800+
22801+
22802+/*
22803+ * ???. GLX_NV_vertex_array_range
22804+ */
22805+#ifndef GLX_NV_vertex_array_range
22806+#define GLX_NV_vertex_array_range
22807+
22808+extern void *glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
22809+extern void glXFreeMemoryNV(GLvoid *pointer);
22810+typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
22811+typedef void ( * PFNGLXFREEMEMORYNVPROC) (GLvoid *pointer);
22812+
22813+#endif /* GLX_NV_vertex_array_range */
22814+
22815+
22816+/*
22817+ * ???. GLX_MESA_allocate_memory
22818+ */
22819+#ifndef GLX_MESA_allocate_memory
22820+#define GLX_MESA_allocate_memory 1
22821+
22822+extern void *glXAllocateMemoryMESA(Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
22823+extern void glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer);
22824+extern GLuint glXGetMemoryOffsetMESA(Display *dpy, int scrn, const void *pointer);
22825+typedef void * ( * PFNGLXALLOCATEMEMORYMESAPROC) (Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
22826+typedef void ( * PFNGLXFREEMEMORYMESAPROC) (Display *dpy, int scrn, void *pointer);
22827+typedef GLuint (* PFNGLXGETMEMORYOFFSETMESAPROC) (Display *dpy, int scrn, const void *pointer);
22828+
22829+#endif /* GLX_MESA_allocate_memory */
22830+
22831+
22832+/*
22833+ * ARB ?. GLX_ARB_render_texture
22834+ * XXX This was never finalized!
22835+ */
22836+#ifndef GLX_ARB_render_texture
22837+#define GLX_ARB_render_texture 1
22838+
22839+extern Bool glXBindTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
22840+extern Bool glXReleaseTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
22841+extern Bool glXDrawableAttribARB(Display *dpy, GLXDrawable draw, const int *attribList);
22842+
22843+#endif /* GLX_ARB_render_texture */
22844+
22845+
22846+#ifndef GLX_ATI_render_texture
22847+#define GLX_ATI_render_texture 1
22848+
22849+extern void glXBindTexImageATI(Display *dpy, GLXPbuffer pbuffer, int buffer);
22850+extern void glXReleaseTexImageATI(Display *dpy, GLXPbuffer pbuffer, int buffer);
22851+extern void glXDrawableAttribATI(Display *dpy, GLXDrawable draw, const int *attribList);
22852+
22853+#endif /* GLX_ATI_render_texture */
22854+
22855+
22856+/*
22857+ * Remove this when glxext.h is updated.
22858+ */
22859+#ifndef GLX_NV_float_buffer
22860+#define GLX_NV_float_buffer 1
22861+
22862+#define GLX_FLOAT_COMPONENTS_NV 0x20B0
22863+
22864+#endif /* GLX_NV_float_buffer */
22865+
22866+
22867+
22868+/*
22869+ * #?. GLX_MESA_swap_frame_usage
22870+ */
22871+#ifndef GLX_MESA_swap_frame_usage
22872+#define GLX_MESA_swap_frame_usage 1
22873+
22874+extern int glXGetFrameUsageMESA(Display *dpy, GLXDrawable drawable, float *usage);
22875+extern int glXBeginFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
22876+extern int glXEndFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
22877+extern int glXQueryFrameTrackingMESA(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
22878+
22879+typedef int (*PFNGLXGETFRAMEUSAGEMESAPROC) (Display *dpy, GLXDrawable drawable, float *usage);
22880+typedef int (*PFNGLXBEGINFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
22881+typedef int (*PFNGLXENDFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
22882+typedef int (*PFNGLXQUERYFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
22883+
22884+#endif /* GLX_MESA_swap_frame_usage */
22885+
22886+
22887+
22888+/*
22889+ * #?. GLX_MESA_swap_control
22890+ */
22891+#ifndef GLX_MESA_swap_control
22892+#define GLX_MESA_swap_control 1
22893+
22894+extern int glXSwapIntervalMESA(unsigned int interval);
22895+extern int glXGetSwapIntervalMESA(void);
22896+
22897+typedef int (*PFNGLXSWAPINTERVALMESAPROC)(unsigned int interval);
22898+typedef int (*PFNGLXGETSWAPINTERVALMESAPROC)(void);
22899+
22900+#endif /* GLX_MESA_swap_control */
22901+
22902+
22903+
22904+/*
22905+ * #?. GLX_EXT_texture_from_pixmap
22906+ * XXX not finished?
22907+ */
22908+#ifndef GLX_EXT_texture_from_pixmap
22909+#define GLX_EXT_texture_from_pixmap 1
22910+
22911+#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
22912+#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
22913+#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
22914+#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
22915+#define GLX_Y_INVERTED_EXT 0x20D4
22916+
22917+#define GLX_TEXTURE_FORMAT_EXT 0x20D5
22918+#define GLX_TEXTURE_TARGET_EXT 0x20D6
22919+#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
22920+
22921+#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
22922+#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
22923+#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
22924+
22925+#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
22926+#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
22927+#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
22928+
22929+#define GLX_TEXTURE_1D_EXT 0x20DB
22930+#define GLX_TEXTURE_2D_EXT 0x20DC
22931+#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
22932+
22933+#define GLX_FRONT_LEFT_EXT 0x20DE
22934+#define GLX_FRONT_RIGHT_EXT 0x20DF
22935+#define GLX_BACK_LEFT_EXT 0x20E0
22936+#define GLX_BACK_RIGHT_EXT 0x20E1
22937+#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
22938+#define GLX_BACK_EXT GLX_BACK_LEFT_EXT
22939+#define GLX_AUX0_EXT 0x20E2
22940+#define GLX_AUX1_EXT 0x20E3
22941+#define GLX_AUX2_EXT 0x20E4
22942+#define GLX_AUX3_EXT 0x20E5
22943+#define GLX_AUX4_EXT 0x20E6
22944+#define GLX_AUX5_EXT 0x20E7
22945+#define GLX_AUX6_EXT 0x20E8
22946+#define GLX_AUX7_EXT 0x20E9
22947+#define GLX_AUX8_EXT 0x20EA
22948+#define GLX_AUX9_EXT 0x20EB
22949+
22950+extern void glXBindTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
22951+extern void glXReleaseTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer);
22952+
22953+#endif /* GLX_EXT_texture_from_pixmap */
22954+
22955+
22956+
22957+
22958+/*** Should these go here, or in another header? */
22959+/*
22960+** GLX Events
22961+*/
22962+typedef struct {
22963+ int event_type; /* GLX_DAMAGED or GLX_SAVED */
22964+ int draw_type; /* GLX_WINDOW or GLX_PBUFFER */
22965+ unsigned long serial; /* # of last request processed by server */
22966+ Bool send_event; /* true if this came for SendEvent request */
22967+ Display *display; /* display the event was read from */
22968+ GLXDrawable drawable; /* XID of Drawable */
22969+ unsigned int buffer_mask; /* mask indicating which buffers are affected */
22970+ unsigned int aux_buffer; /* which aux buffer was affected */
22971+ int x, y;
22972+ int width, height;
22973+ int count; /* if nonzero, at least this many more */
22974+} GLXPbufferClobberEvent;
22975+
22976+typedef union __GLXEvent {
22977+ GLXPbufferClobberEvent glxpbufferclobber;
22978+ long pad[24];
22979+} GLXEvent;
22980+
22981+#ifdef __cplusplus
22982+}
22983+#endif
22984+
22985+#endif
22986Index: qemu-0.14.0/target-i386/mesa_glxext.h
22987===================================================================
22988--- /dev/null
22989+++ qemu-0.14.0/target-i386/mesa_glxext.h
22990@@ -0,0 +1,785 @@
22991+#ifndef __glxext_h_
22992+#define __glxext_h_
22993+
22994+#ifdef __cplusplus
22995+extern "C" {
22996+#endif
22997+
22998+/*
22999+** Copyright (c) 2007 The Khronos Group Inc.
23000+**
23001+** Permission is hereby granted, free of charge, to any person obtaining a
23002+** copy of this software and/or associated documentation files (the
23003+** "Materials"), to deal in the Materials without restriction, including
23004+** without limitation the rights to use, copy, modify, merge, publish,
23005+** distribute, sublicense, and/or sell copies of the Materials, and to
23006+** permit persons to whom the Materials are furnished to do so, subject to
23007+** the following conditions:
23008+**
23009+** The above copyright notice and this permission notice shall be included
23010+** in all copies or substantial portions of the Materials.
23011+**
23012+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23013+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23014+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23015+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
23016+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23017+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23018+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
23019+*/
23020+
23021+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
23022+#define WIN32_LEAN_AND_MEAN 1
23023+#include <windows.h>
23024+#endif
23025+
23026+#ifndef APIENTRY
23027+#define APIENTRY
23028+#endif
23029+#ifndef APIENTRYP
23030+#define APIENTRYP APIENTRY *
23031+#endif
23032+#ifndef GLAPI
23033+#define GLAPI extern
23034+#endif
23035+
23036+/*************************************************************/
23037+
23038+/* Header file version number, required by OpenGL ABI for Linux */
23039+/* glxext.h last updated 2007/04/21 */
23040+/* Current version at http://www.opengl.org/registry/ */
23041+#define GLX_GLXEXT_VERSION 19
23042+
23043+#ifndef GLX_VERSION_1_3
23044+#define GLX_WINDOW_BIT 0x00000001
23045+#define GLX_PIXMAP_BIT 0x00000002
23046+#define GLX_PBUFFER_BIT 0x00000004
23047+#define GLX_RGBA_BIT 0x00000001
23048+#define GLX_COLOR_INDEX_BIT 0x00000002
23049+#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
23050+#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
23051+#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
23052+#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
23053+#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
23054+#define GLX_AUX_BUFFERS_BIT 0x00000010
23055+#define GLX_DEPTH_BUFFER_BIT 0x00000020
23056+#define GLX_STENCIL_BUFFER_BIT 0x00000040
23057+#define GLX_ACCUM_BUFFER_BIT 0x00000080
23058+#define GLX_CONFIG_CAVEAT 0x20
23059+#define GLX_X_VISUAL_TYPE 0x22
23060+#define GLX_TRANSPARENT_TYPE 0x23
23061+#define GLX_TRANSPARENT_INDEX_VALUE 0x24
23062+#define GLX_TRANSPARENT_RED_VALUE 0x25
23063+#define GLX_TRANSPARENT_GREEN_VALUE 0x26
23064+#define GLX_TRANSPARENT_BLUE_VALUE 0x27
23065+#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
23066+#define GLX_DONT_CARE 0xFFFFFFFF
23067+#define GLX_NONE 0x8000
23068+#define GLX_SLOW_CONFIG 0x8001
23069+#define GLX_TRUE_COLOR 0x8002
23070+#define GLX_DIRECT_COLOR 0x8003
23071+#define GLX_PSEUDO_COLOR 0x8004
23072+#define GLX_STATIC_COLOR 0x8005
23073+#define GLX_GRAY_SCALE 0x8006
23074+#define GLX_STATIC_GRAY 0x8007
23075+#define GLX_TRANSPARENT_RGB 0x8008
23076+#define GLX_TRANSPARENT_INDEX 0x8009
23077+#define GLX_VISUAL_ID 0x800B
23078+#define GLX_SCREEN 0x800C
23079+#define GLX_NON_CONFORMANT_CONFIG 0x800D
23080+#define GLX_DRAWABLE_TYPE 0x8010
23081+#define GLX_RENDER_TYPE 0x8011
23082+#define GLX_X_RENDERABLE 0x8012
23083+#define GLX_FBCONFIG_ID 0x8013
23084+#define GLX_RGBA_TYPE 0x8014
23085+#define GLX_COLOR_INDEX_TYPE 0x8015
23086+#define GLX_MAX_PBUFFER_WIDTH 0x8016
23087+#define GLX_MAX_PBUFFER_HEIGHT 0x8017
23088+#define GLX_MAX_PBUFFER_PIXELS 0x8018
23089+#define GLX_PRESERVED_CONTENTS 0x801B
23090+#define GLX_LARGEST_PBUFFER 0x801C
23091+#define GLX_WIDTH 0x801D
23092+#define GLX_HEIGHT 0x801E
23093+#define GLX_EVENT_MASK 0x801F
23094+#define GLX_DAMAGED 0x8020
23095+#define GLX_SAVED 0x8021
23096+#define GLX_WINDOW 0x8022
23097+#define GLX_PBUFFER 0x8023
23098+#define GLX_PBUFFER_HEIGHT 0x8040
23099+#define GLX_PBUFFER_WIDTH 0x8041
23100+#endif
23101+
23102+#ifndef GLX_VERSION_1_4
23103+#define GLX_SAMPLE_BUFFERS 100000
23104+#define GLX_SAMPLES 100001
23105+#endif
23106+
23107+#ifndef GLX_ARB_get_proc_address
23108+#endif
23109+
23110+#ifndef GLX_ARB_multisample
23111+#define GLX_SAMPLE_BUFFERS_ARB 100000
23112+#define GLX_SAMPLES_ARB 100001
23113+#endif
23114+
23115+#ifndef GLX_ARB_fbconfig_float
23116+#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9
23117+#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
23118+#endif
23119+
23120+#ifndef GLX_SGIS_multisample
23121+#define GLX_SAMPLE_BUFFERS_SGIS 100000
23122+#define GLX_SAMPLES_SGIS 100001
23123+#endif
23124+
23125+#ifndef GLX_EXT_visual_info
23126+#define GLX_X_VISUAL_TYPE_EXT 0x22
23127+#define GLX_TRANSPARENT_TYPE_EXT 0x23
23128+#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
23129+#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
23130+#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
23131+#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
23132+#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
23133+#define GLX_NONE_EXT 0x8000
23134+#define GLX_TRUE_COLOR_EXT 0x8002
23135+#define GLX_DIRECT_COLOR_EXT 0x8003
23136+#define GLX_PSEUDO_COLOR_EXT 0x8004
23137+#define GLX_STATIC_COLOR_EXT 0x8005
23138+#define GLX_GRAY_SCALE_EXT 0x8006
23139+#define GLX_STATIC_GRAY_EXT 0x8007
23140+#define GLX_TRANSPARENT_RGB_EXT 0x8008
23141+#define GLX_TRANSPARENT_INDEX_EXT 0x8009
23142+#endif
23143+
23144+#ifndef GLX_SGI_swap_control
23145+#endif
23146+
23147+#ifndef GLX_SGI_video_sync
23148+#endif
23149+
23150+#ifndef GLX_SGI_make_current_read
23151+#endif
23152+
23153+#ifndef GLX_SGIX_video_source
23154+#endif
23155+
23156+#ifndef GLX_EXT_visual_rating
23157+#define GLX_VISUAL_CAVEAT_EXT 0x20
23158+#define GLX_SLOW_VISUAL_EXT 0x8001
23159+#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
23160+/* reuse GLX_NONE_EXT */
23161+#endif
23162+
23163+#ifndef GLX_EXT_import_context
23164+#define GLX_SHARE_CONTEXT_EXT 0x800A
23165+#define GLX_VISUAL_ID_EXT 0x800B
23166+#define GLX_SCREEN_EXT 0x800C
23167+#endif
23168+
23169+#ifndef GLX_SGIX_fbconfig
23170+#define GLX_WINDOW_BIT_SGIX 0x00000001
23171+#define GLX_PIXMAP_BIT_SGIX 0x00000002
23172+#define GLX_RGBA_BIT_SGIX 0x00000001
23173+#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
23174+#define GLX_DRAWABLE_TYPE_SGIX 0x8010
23175+#define GLX_RENDER_TYPE_SGIX 0x8011
23176+#define GLX_X_RENDERABLE_SGIX 0x8012
23177+#define GLX_FBCONFIG_ID_SGIX 0x8013
23178+#define GLX_RGBA_TYPE_SGIX 0x8014
23179+#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
23180+/* reuse GLX_SCREEN_EXT */
23181+#endif
23182+
23183+#ifndef GLX_SGIX_pbuffer
23184+#define GLX_PBUFFER_BIT_SGIX 0x00000004
23185+#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
23186+#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
23187+#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
23188+#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
23189+#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
23190+#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
23191+#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
23192+#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
23193+#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
23194+#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
23195+#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
23196+#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
23197+#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
23198+#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
23199+#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
23200+#define GLX_PRESERVED_CONTENTS_SGIX 0x801B
23201+#define GLX_LARGEST_PBUFFER_SGIX 0x801C
23202+#define GLX_WIDTH_SGIX 0x801D
23203+#define GLX_HEIGHT_SGIX 0x801E
23204+#define GLX_EVENT_MASK_SGIX 0x801F
23205+#define GLX_DAMAGED_SGIX 0x8020
23206+#define GLX_SAVED_SGIX 0x8021
23207+#define GLX_WINDOW_SGIX 0x8022
23208+#define GLX_PBUFFER_SGIX 0x8023
23209+#endif
23210+
23211+#ifndef GLX_SGI_cushion
23212+#endif
23213+
23214+#ifndef GLX_SGIX_video_resize
23215+#define GLX_SYNC_FRAME_SGIX 0x00000000
23216+#define GLX_SYNC_SWAP_SGIX 0x00000001
23217+#endif
23218+
23219+#ifndef GLX_SGIX_dmbuffer
23220+#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024
23221+#endif
23222+
23223+#ifndef GLX_SGIX_swap_group
23224+#endif
23225+
23226+#ifndef GLX_SGIX_swap_barrier
23227+#endif
23228+
23229+#ifndef GLX_SGIS_blended_overlay
23230+#define GLX_BLENDED_RGBA_SGIS 0x8025
23231+#endif
23232+
23233+#ifndef GLX_SGIS_shared_multisample
23234+#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
23235+#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
23236+#endif
23237+
23238+#ifndef GLX_SUN_get_transparent_index
23239+#endif
23240+
23241+#ifndef GLX_3DFX_multisample
23242+#define GLX_SAMPLE_BUFFERS_3DFX 0x8050
23243+#define GLX_SAMPLES_3DFX 0x8051
23244+#endif
23245+
23246+#ifndef GLX_MESA_copy_sub_buffer
23247+#endif
23248+
23249+#ifndef GLX_MESA_pixmap_colormap
23250+#endif
23251+
23252+#ifndef GLX_MESA_release_buffers
23253+#endif
23254+
23255+#ifndef GLX_MESA_set_3dfx_mode
23256+#define GLX_3DFX_WINDOW_MODE_MESA 0x1
23257+#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
23258+#endif
23259+
23260+#ifndef GLX_SGIX_visual_select_group
23261+#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
23262+#endif
23263+
23264+#ifndef GLX_OML_swap_method
23265+#define GLX_SWAP_METHOD_OML 0x8060
23266+#define GLX_SWAP_EXCHANGE_OML 0x8061
23267+#define GLX_SWAP_COPY_OML 0x8062
23268+#define GLX_SWAP_UNDEFINED_OML 0x8063
23269+#endif
23270+
23271+#ifndef GLX_OML_sync_control
23272+#endif
23273+
23274+#ifndef GLX_NV_float_buffer
23275+#define GLX_FLOAT_COMPONENTS_NV 0x20B0
23276+#endif
23277+
23278+#ifndef GLX_SGIX_hyperpipe
23279+#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
23280+#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
23281+#define GLX_BAD_HYPERPIPE_SGIX 92
23282+#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001
23283+#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002
23284+#define GLX_PIPE_RECT_SGIX 0x00000001
23285+#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002
23286+#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003
23287+#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004
23288+#define GLX_HYPERPIPE_ID_SGIX 0x8030
23289+#endif
23290+
23291+#ifndef GLX_MESA_agp_offset
23292+#endif
23293+
23294+#ifndef GLX_EXT_fbconfig_packed_float
23295+#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
23296+#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008
23297+#endif
23298+
23299+#ifndef GLX_EXT_framebuffer_sRGB
23300+#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
23301+#endif
23302+
23303+#ifndef GLX_EXT_texture_from_pixmap
23304+#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
23305+#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
23306+#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
23307+#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
23308+#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
23309+#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
23310+#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
23311+#define GLX_Y_INVERTED_EXT 0x20D4
23312+#define GLX_TEXTURE_FORMAT_EXT 0x20D5
23313+#define GLX_TEXTURE_TARGET_EXT 0x20D6
23314+#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
23315+#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
23316+#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
23317+#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
23318+#define GLX_TEXTURE_1D_EXT 0x20DB
23319+#define GLX_TEXTURE_2D_EXT 0x20DC
23320+#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
23321+#define GLX_FRONT_LEFT_EXT 0x20DE
23322+#define GLX_FRONT_RIGHT_EXT 0x20DF
23323+#define GLX_BACK_LEFT_EXT 0x20E0
23324+#define GLX_BACK_RIGHT_EXT 0x20E1
23325+#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
23326+#define GLX_BACK_EXT GLX_BACK_LEFT_EXT
23327+#define GLX_AUX0_EXT 0x20E2
23328+#define GLX_AUX1_EXT 0x20E3
23329+#define GLX_AUX2_EXT 0x20E4
23330+#define GLX_AUX3_EXT 0x20E5
23331+#define GLX_AUX4_EXT 0x20E6
23332+#define GLX_AUX5_EXT 0x20E7
23333+#define GLX_AUX6_EXT 0x20E8
23334+#define GLX_AUX7_EXT 0x20E9
23335+#define GLX_AUX8_EXT 0x20EA
23336+#define GLX_AUX9_EXT 0x20EB
23337+#endif
23338+
23339+
23340+/*************************************************************/
23341+
23342+#ifndef GLX_ARB_get_proc_address
23343+typedef void (*__GLXextFuncPtr)(void);
23344+#endif
23345+
23346+#ifndef GLX_SGIX_video_source
23347+typedef XID GLXVideoSourceSGIX;
23348+#endif
23349+
23350+#ifndef GLX_SGIX_fbconfig
23351+typedef XID GLXFBConfigIDSGIX;
23352+typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
23353+#endif
23354+
23355+#ifndef GLX_SGIX_pbuffer
23356+typedef XID GLXPbufferSGIX;
23357+typedef struct {
23358+ int type;
23359+ unsigned long serial; /* # of last request processed by server */
23360+ Bool send_event; /* true if this came for SendEvent request */
23361+ Display *display; /* display the event was read from */
23362+ GLXDrawable drawable; /* i.d. of Drawable */
23363+ int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */
23364+ int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */
23365+ unsigned int mask; /* mask indicating which buffers are affected*/
23366+ int x, y;
23367+ int width, height;
23368+ int count; /* if nonzero, at least this many more */
23369+} GLXBufferClobberEventSGIX;
23370+#endif
23371+
23372+#ifndef GLEXT_64_TYPES_DEFINED
23373+/* This code block is duplicated in glxext.h, so must be protected */
23374+#define GLEXT_64_TYPES_DEFINED
23375+/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
23376+/* (as used in the GLX_OML_sync_control extension). */
23377+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
23378+#include <inttypes.h>
23379+#elif defined(__sun__) || defined(__digital__)
23380+#include <inttypes.h>
23381+#if defined(__STDC__)
23382+#if defined(__arch64__)
23383+typedef long int int64_t;
23384+typedef unsigned long int uint64_t;
23385+#else
23386+typedef long long int int64_t;
23387+typedef unsigned long long int uint64_t;
23388+#endif /* __arch64__ */
23389+#endif /* __STDC__ */
23390+#elif defined( __VMS )
23391+#include <inttypes.h>
23392+#elif defined(__SCO__) || defined(__USLC__)
23393+#include <stdint.h>
23394+#elif defined(__UNIXOS2__) || defined(__SOL64__)
23395+typedef long int int32_t;
23396+typedef long long int int64_t;
23397+typedef unsigned long long int uint64_t;
23398+#elif defined(_WIN32) && defined(__GNUC__)
23399+#include <stdint.h>
23400+#elif defined(_WIN32)
23401+typedef __int32 int32_t;
23402+typedef __int64 int64_t;
23403+typedef unsigned __int64 uint64_t;
23404+#else
23405+#include <inttypes.h> /* Fallback option */
23406+#endif
23407+#endif
23408+
23409+#ifndef GLX_VERSION_1_3
23410+#define GLX_VERSION_1_3 1
23411+#ifdef GLX_GLXEXT_PROTOTYPES
23412+extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *);
23413+extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *);
23414+extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *);
23415+extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig);
23416+extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *);
23417+extern void glXDestroyWindow (Display *, GLXWindow);
23418+extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *);
23419+extern void glXDestroyPixmap (Display *, GLXPixmap);
23420+extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *);
23421+extern void glXDestroyPbuffer (Display *, GLXPbuffer);
23422+extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *);
23423+extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool);
23424+extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext);
23425+extern GLXDrawable glXGetCurrentReadDrawable (void);
23426+extern Display * glXGetCurrentDisplay (void);
23427+extern int glXQueryContext (Display *, GLXContext, int, int *);
23428+extern void glXSelectEvent (Display *, GLXDrawable, unsigned long);
23429+extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *);
23430+#endif /* GLX_GLXEXT_PROTOTYPES */
23431+typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
23432+typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
23433+typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
23434+typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
23435+typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
23436+typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
23437+typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
23438+typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
23439+typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
23440+typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
23441+typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
23442+typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
23443+typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
23444+typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
23445+typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
23446+typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
23447+typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
23448+typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
23449+#endif
23450+
23451+#ifndef GLX_VERSION_1_4
23452+#define GLX_VERSION_1_4 1
23453+#ifdef GLX_GLXEXT_PROTOTYPES
23454+extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *);
23455+#endif /* GLX_GLXEXT_PROTOTYPES */
23456+typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
23457+#endif
23458+
23459+#ifndef GLX_ARB_get_proc_address
23460+#define GLX_ARB_get_proc_address 1
23461+#ifdef GLX_GLXEXT_PROTOTYPES
23462+extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
23463+#endif /* GLX_GLXEXT_PROTOTYPES */
23464+typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
23465+#endif
23466+
23467+#ifndef GLX_ARB_multisample
23468+#define GLX_ARB_multisample 1
23469+#endif
23470+
23471+#ifndef GLX_ARB_fbconfig_float
23472+#define GLX_ARB_fbconfig_float 1
23473+#endif
23474+
23475+#ifndef GLX_SGIS_multisample
23476+#define GLX_SGIS_multisample 1
23477+#endif
23478+
23479+#ifndef GLX_EXT_visual_info
23480+#define GLX_EXT_visual_info 1
23481+#endif
23482+
23483+#ifndef GLX_SGI_swap_control
23484+#define GLX_SGI_swap_control 1
23485+#ifdef GLX_GLXEXT_PROTOTYPES
23486+extern int glXSwapIntervalSGI (int);
23487+#endif /* GLX_GLXEXT_PROTOTYPES */
23488+typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
23489+#endif
23490+
23491+#ifndef GLX_SGI_video_sync
23492+#define GLX_SGI_video_sync 1
23493+#ifdef GLX_GLXEXT_PROTOTYPES
23494+extern int glXGetVideoSyncSGI (unsigned int *);
23495+extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
23496+#endif /* GLX_GLXEXT_PROTOTYPES */
23497+typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
23498+typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
23499+#endif
23500+
23501+#ifndef GLX_SGI_make_current_read
23502+#define GLX_SGI_make_current_read 1
23503+#ifdef GLX_GLXEXT_PROTOTYPES
23504+extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext);
23505+extern GLXDrawable glXGetCurrentReadDrawableSGI (void);
23506+#endif /* GLX_GLXEXT_PROTOTYPES */
23507+typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
23508+typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
23509+#endif
23510+
23511+#ifndef GLX_SGIX_video_source
23512+#define GLX_SGIX_video_source 1
23513+#ifdef _VL_H
23514+#ifdef GLX_GLXEXT_PROTOTYPES
23515+extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode);
23516+extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX);
23517+#endif /* GLX_GLXEXT_PROTOTYPES */
23518+typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
23519+typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
23520+#endif /* _VL_H */
23521+#endif
23522+
23523+#ifndef GLX_EXT_visual_rating
23524+#define GLX_EXT_visual_rating 1
23525+#endif
23526+
23527+#ifndef GLX_EXT_import_context
23528+#define GLX_EXT_import_context 1
23529+#ifdef GLX_GLXEXT_PROTOTYPES
23530+extern Display * glXGetCurrentDisplayEXT (void);
23531+extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *);
23532+extern GLXContextID glXGetContextIDEXT (const GLXContext);
23533+extern GLXContext glXImportContextEXT (Display *, GLXContextID);
23534+extern void glXFreeContextEXT (Display *, GLXContext);
23535+#endif /* GLX_GLXEXT_PROTOTYPES */
23536+typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
23537+typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
23538+typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
23539+typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
23540+typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
23541+#endif
23542+
23543+#ifndef GLX_SGIX_fbconfig
23544+#define GLX_SGIX_fbconfig 1
23545+#ifdef GLX_GLXEXT_PROTOTYPES
23546+extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *);
23547+extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *);
23548+extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap);
23549+extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool);
23550+extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX);
23551+extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *);
23552+#endif /* GLX_GLXEXT_PROTOTYPES */
23553+typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
23554+typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
23555+typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
23556+typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
23557+typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
23558+typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
23559+#endif
23560+
23561+#ifndef GLX_SGIX_pbuffer
23562+#define GLX_SGIX_pbuffer 1
23563+#ifdef GLX_GLXEXT_PROTOTYPES
23564+extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *);
23565+extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX);
23566+extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *);
23567+extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long);
23568+extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *);
23569+#endif /* GLX_GLXEXT_PROTOTYPES */
23570+typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
23571+typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
23572+typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
23573+typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
23574+typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
23575+#endif
23576+
23577+#ifndef GLX_SGI_cushion
23578+#define GLX_SGI_cushion 1
23579+#ifdef GLX_GLXEXT_PROTOTYPES
23580+extern void glXCushionSGI (Display *, Window, float);
23581+#endif /* GLX_GLXEXT_PROTOTYPES */
23582+typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
23583+#endif
23584+
23585+#ifndef GLX_SGIX_video_resize
23586+#define GLX_SGIX_video_resize 1
23587+#ifdef GLX_GLXEXT_PROTOTYPES
23588+extern int glXBindChannelToWindowSGIX (Display *, int, int, Window);
23589+extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int);
23590+extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *);
23591+extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *);
23592+extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum);
23593+#endif /* GLX_GLXEXT_PROTOTYPES */
23594+typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
23595+typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
23596+typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
23597+typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
23598+typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype);
23599+#endif
23600+
23601+#ifndef GLX_SGIX_dmbuffer
23602+#define GLX_SGIX_dmbuffer 1
23603+#ifdef _DM_BUFFER_H_
23604+#ifdef GLX_GLXEXT_PROTOTYPES
23605+extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer);
23606+#endif /* GLX_GLXEXT_PROTOTYPES */
23607+typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
23608+#endif /* _DM_BUFFER_H_ */
23609+#endif
23610+
23611+#ifndef GLX_SGIX_swap_group
23612+#define GLX_SGIX_swap_group 1
23613+#ifdef GLX_GLXEXT_PROTOTYPES
23614+extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable);
23615+#endif /* GLX_GLXEXT_PROTOTYPES */
23616+typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
23617+#endif
23618+
23619+#ifndef GLX_SGIX_swap_barrier
23620+#define GLX_SGIX_swap_barrier 1
23621+#ifdef GLX_GLXEXT_PROTOTYPES
23622+extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int);
23623+extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *);
23624+#endif /* GLX_GLXEXT_PROTOTYPES */
23625+typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
23626+typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
23627+#endif
23628+
23629+#ifndef GLX_SUN_get_transparent_index
23630+#define GLX_SUN_get_transparent_index 1
23631+#ifdef GLX_GLXEXT_PROTOTYPES
23632+extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *);
23633+#endif /* GLX_GLXEXT_PROTOTYPES */
23634+typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
23635+#endif
23636+
23637+#ifndef GLX_MESA_copy_sub_buffer
23638+#define GLX_MESA_copy_sub_buffer 1
23639+#ifdef GLX_GLXEXT_PROTOTYPES
23640+extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int);
23641+#endif /* GLX_GLXEXT_PROTOTYPES */
23642+typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
23643+#endif
23644+
23645+#ifndef GLX_MESA_pixmap_colormap
23646+#define GLX_MESA_pixmap_colormap 1
23647+#ifdef GLX_GLXEXT_PROTOTYPES
23648+extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap);
23649+#endif /* GLX_GLXEXT_PROTOTYPES */
23650+typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
23651+#endif
23652+
23653+#ifndef GLX_MESA_release_buffers
23654+#define GLX_MESA_release_buffers 1
23655+#ifdef GLX_GLXEXT_PROTOTYPES
23656+extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable);
23657+#endif /* GLX_GLXEXT_PROTOTYPES */
23658+typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
23659+#endif
23660+
23661+#ifndef GLX_MESA_set_3dfx_mode
23662+#define GLX_MESA_set_3dfx_mode 1
23663+#ifdef GLX_GLXEXT_PROTOTYPES
23664+extern Bool glXSet3DfxModeMESA (int);
23665+#endif /* GLX_GLXEXT_PROTOTYPES */
23666+typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
23667+#endif
23668+
23669+#ifndef GLX_SGIX_visual_select_group
23670+#define GLX_SGIX_visual_select_group 1
23671+#endif
23672+
23673+#ifndef GLX_OML_swap_method
23674+#define GLX_OML_swap_method 1
23675+#endif
23676+
23677+#ifndef GLX_OML_sync_control
23678+#define GLX_OML_sync_control 1
23679+#ifdef GLX_GLXEXT_PROTOTYPES
23680+extern Bool glXGetSyncValuesOML (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *);
23681+extern Bool glXGetMscRateOML (Display *, GLXDrawable, int32_t *, int32_t *);
23682+extern int64_t glXSwapBuffersMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t);
23683+extern Bool glXWaitForMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *);
23684+extern Bool glXWaitForSbcOML (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *);
23685+#endif /* GLX_GLXEXT_PROTOTYPES */
23686+typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
23687+typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
23688+typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
23689+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);
23690+typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
23691+#endif
23692+
23693+#ifndef GLX_NV_float_buffer
23694+#define GLX_NV_float_buffer 1
23695+#endif
23696+
23697+#ifndef GLX_SGIX_hyperpipe
23698+#define GLX_SGIX_hyperpipe 1
23699+
23700+typedef struct {
23701+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23702+ int networkId;
23703+} GLXHyperpipeNetworkSGIX;
23704+
23705+typedef struct {
23706+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23707+ int channel;
23708+ unsigned int
23709+ participationType;
23710+ int timeSlice;
23711+} GLXHyperpipeConfigSGIX;
23712+
23713+typedef struct {
23714+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23715+ int srcXOrigin, srcYOrigin, srcWidth, srcHeight;
23716+ int destXOrigin, destYOrigin, destWidth, destHeight;
23717+} GLXPipeRect;
23718+
23719+typedef struct {
23720+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23721+ int XOrigin, YOrigin, maxHeight, maxWidth;
23722+} GLXPipeRectLimits;
23723+
23724+#ifdef GLX_GLXEXT_PROTOTYPES
23725+extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *, int *);
23726+extern int glXHyperpipeConfigSGIX (Display *, int, int, GLXHyperpipeConfigSGIX *, int *);
23727+extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *, int, int *);
23728+extern int glXDestroyHyperpipeConfigSGIX (Display *, int);
23729+extern int glXBindHyperpipeSGIX (Display *, int);
23730+extern int glXQueryHyperpipeBestAttribSGIX (Display *, int, int, int, void *, void *);
23731+extern int glXHyperpipeAttribSGIX (Display *, int, int, int, void *);
23732+extern int glXQueryHyperpipeAttribSGIX (Display *, int, int, int, void *);
23733+#endif /* GLX_GLXEXT_PROTOTYPES */
23734+typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);
23735+typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
23736+typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes);
23737+typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId);
23738+typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId);
23739+typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
23740+typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
23741+typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
23742+#endif
23743+
23744+#ifndef GLX_MESA_agp_offset
23745+#define GLX_MESA_agp_offset 1
23746+#ifdef GLX_GLXEXT_PROTOTYPES
23747+extern unsigned int glXGetAGPOffsetMESA (const void *);
23748+#endif /* GLX_GLXEXT_PROTOTYPES */
23749+typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
23750+#endif
23751+
23752+#ifndef GLX_EXT_fbconfig_packed_float
23753+#define GLX_EXT_fbconfig_packed_float 1
23754+#endif
23755+
23756+#ifndef GLX_EXT_framebuffer_sRGB
23757+#define GLX_EXT_framebuffer_sRGB 1
23758+#endif
23759+
23760+#ifndef GLX_EXT_texture_from_pixmap
23761+#define GLX_EXT_texture_from_pixmap 1
23762+#ifdef GLX_GLXEXT_PROTOTYPES
23763+extern void glXBindTexImageEXT (Display *, GLXDrawable, int, const int *);
23764+extern void glXReleaseTexImageEXT (Display *, GLXDrawable, int);
23765+#endif /* GLX_GLXEXT_PROTOTYPES */
23766+typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
23767+typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer);
23768+#endif
23769+
23770+
23771+#ifdef __cplusplus
23772+}
23773+#endif
23774+
23775+#endif
23776Index: qemu-0.14.0/target-i386/mesa_mipmap.c
23777===================================================================
23778--- /dev/null
23779+++ qemu-0.14.0/target-i386/mesa_mipmap.c
23780@@ -0,0 +1,824 @@
23781+
23782+/*
23783+ * Mesa 3-D graphics library
23784+ * Version: 3.4
23785+ * Copyright (C) 1995-2000 Brian Paul
23786+ *
23787+ * This library is free software; you can redistribute it and/or
23788+ * modify it under the terms of the GNU Library General Public
23789+ * License as published by the Free Software Foundation; either
23790+ * version 2 of the License, or (at your option) any later version.
23791+ *
23792+ * This library is distributed in the hope that it will be useful,
23793+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
23794+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23795+ * Library General Public License for more details.
23796+ *
23797+ * You should have received a copy of the GNU Library General Public
23798+ * License along with this library; if not, write to the Free
23799+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23800+ */
23801+
23802+
23803+#ifdef PC_HEADER
23804+#include "all.h"
23805+#else
23806+#include <assert.h>
23807+#include <math.h>
23808+#include <stdio.h>
23809+#include <stdlib.h>
23810+//#include "gluP.h"
23811+#endif
23812+
23813+
23814+/*
23815+ * Compute ceiling of integer quotient of A divided by B:
23816+ */
23817+#define CEILING( A, B ) ( (A) % (B) == 0 ? (A)/(B) : (A)/(B)+1 )
23818+
23819+
23820+
23821+#ifdef EPSILON
23822+#undef EPSILON
23823+#endif
23824+#define EPSILON 0.001
23825+
23826+
23827+/* To work around optimizer bug in MSVC4.1 */
23828+#if defined(__WIN32__) && !defined(OPENSTEP)
23829+void
23830+dummy(GLuint j, GLuint k)
23831+{
23832+}
23833+#else
23834+#define dummy(J, K)
23835+#endif
23836+
23837+
23838+static GLint GLAPIENTRY
23839+mesa_gluScaleImage(GLenum format,
23840+ GLsizei widthin, GLsizei heightin,
23841+ GLenum typein, const void *datain,
23842+ GLsizei widthout, GLsizei heightout,
23843+ GLenum typeout, void *dataout)
23844+{
23845+ GLint components, i, j, k;
23846+ GLfloat *tempin, *tempout;
23847+ GLfloat sx, sy;
23848+ GLint unpackrowlength, unpackalignment, unpackskiprows, unpackskippixels;
23849+ GLint packrowlength, packalignment, packskiprows, packskippixels;
23850+ GLint sizein, sizeout;
23851+ GLint rowstride, rowlen;
23852+
23853+
23854+ /* Determine number of components per pixel */
23855+ switch (format) {
23856+ case GL_COLOR_INDEX:
23857+ case GL_STENCIL_INDEX:
23858+ case GL_DEPTH_COMPONENT:
23859+ case GL_RED:
23860+ case GL_GREEN:
23861+ case GL_BLUE:
23862+ case GL_ALPHA:
23863+ case GL_LUMINANCE:
23864+ components = 1;
23865+ break;
23866+ case GL_LUMINANCE_ALPHA:
23867+ components = 2;
23868+ break;
23869+ case GL_RGB:
23870+ case GL_BGR:
23871+ components = 3;
23872+ break;
23873+ case GL_RGBA:
23874+ case GL_BGRA:
23875+#ifdef GL_EXT_abgr
23876+ case GL_ABGR_EXT:
23877+#endif
23878+ components = 4;
23879+ break;
23880+ default:
23881+ return GLU_INVALID_ENUM;
23882+ }
23883+
23884+ /* Determine bytes per input datum */
23885+ switch (typein) {
23886+ case GL_UNSIGNED_BYTE:
23887+ sizein = sizeof(GLubyte);
23888+ break;
23889+ case GL_BYTE:
23890+ sizein = sizeof(GLbyte);
23891+ break;
23892+ case GL_UNSIGNED_SHORT:
23893+ sizein = sizeof(GLushort);
23894+ break;
23895+ case GL_SHORT:
23896+ sizein = sizeof(GLshort);
23897+ break;
23898+ case GL_UNSIGNED_INT:
23899+ sizein = sizeof(GLuint);
23900+ break;
23901+ case GL_INT:
23902+ sizein = sizeof(GLint);
23903+ break;
23904+ case GL_FLOAT:
23905+ sizein = sizeof(GLfloat);
23906+ break;
23907+ case GL_BITMAP:
23908+ /* not implemented yet */
23909+ default:
23910+ return GL_INVALID_ENUM;
23911+ }
23912+
23913+ /* Determine bytes per output datum */
23914+ switch (typeout) {
23915+ case GL_UNSIGNED_BYTE:
23916+ sizeout = sizeof(GLubyte);
23917+ break;
23918+ case GL_BYTE:
23919+ sizeout = sizeof(GLbyte);
23920+ break;
23921+ case GL_UNSIGNED_SHORT:
23922+ sizeout = sizeof(GLushort);
23923+ break;
23924+ case GL_SHORT:
23925+ sizeout = sizeof(GLshort);
23926+ break;
23927+ case GL_UNSIGNED_INT:
23928+ sizeout = sizeof(GLuint);
23929+ break;
23930+ case GL_INT:
23931+ sizeout = sizeof(GLint);
23932+ break;
23933+ case GL_FLOAT:
23934+ sizeout = sizeof(GLfloat);
23935+ break;
23936+ case GL_BITMAP:
23937+ /* not implemented yet */
23938+ default:
23939+ return GL_INVALID_ENUM;
23940+ }
23941+
23942+ /* Get glPixelStore state */
23943+ glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpackrowlength);
23944+ glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpackalignment);
23945+ glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unpackskiprows);
23946+ glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unpackskippixels);
23947+ glGetIntegerv(GL_PACK_ROW_LENGTH, &packrowlength);
23948+ glGetIntegerv(GL_PACK_ALIGNMENT, &packalignment);
23949+ glGetIntegerv(GL_PACK_SKIP_ROWS, &packskiprows);
23950+ glGetIntegerv(GL_PACK_SKIP_PIXELS, &packskippixels);
23951+
23952+ /* Allocate storage for intermediate images */
23953+ tempin = (GLfloat *) malloc(widthin * heightin
23954+ * components * sizeof(GLfloat));
23955+ if (!tempin) {
23956+ return GLU_OUT_OF_MEMORY;
23957+ }
23958+ tempout = (GLfloat *) malloc(widthout * heightout
23959+ * components * sizeof(GLfloat));
23960+ if (!tempout) {
23961+ free(tempin);
23962+ return GLU_OUT_OF_MEMORY;
23963+ }
23964+
23965+
23966+ /*
23967+ * Unpack the pixel data and convert to floating point
23968+ */
23969+
23970+ if (unpackrowlength > 0) {
23971+ rowlen = unpackrowlength;
23972+ }
23973+ else {
23974+ rowlen = widthin;
23975+ }
23976+ if (sizein >= unpackalignment) {
23977+ rowstride = components * rowlen;
23978+ }
23979+ else {
23980+ rowstride = unpackalignment / sizein
23981+ * CEILING(components * rowlen * sizein, unpackalignment);
23982+ }
23983+
23984+ switch (typein) {
23985+ case GL_UNSIGNED_BYTE:
23986+ k = 0;
23987+ for (i = 0; i < heightin; i++) {
23988+ GLubyte *ubptr = (GLubyte *) datain
23989+ + i * rowstride
23990+ + unpackskiprows * rowstride + unpackskippixels * components;
23991+ for (j = 0; j < widthin * components; j++) {
23992+ dummy(j, k);
23993+ tempin[k++] = (GLfloat) * ubptr++;
23994+ }
23995+ }
23996+ break;
23997+ case GL_BYTE:
23998+ k = 0;
23999+ for (i = 0; i < heightin; i++) {
24000+ GLbyte *bptr = (GLbyte *) datain
24001+ + i * rowstride
24002+ + unpackskiprows * rowstride + unpackskippixels * components;
24003+ for (j = 0; j < widthin * components; j++) {
24004+ dummy(j, k);
24005+ tempin[k++] = (GLfloat) * bptr++;
24006+ }
24007+ }
24008+ break;
24009+ case GL_UNSIGNED_SHORT:
24010+ k = 0;
24011+ for (i = 0; i < heightin; i++) {
24012+ GLushort *usptr = (GLushort *) datain
24013+ + i * rowstride
24014+ + unpackskiprows * rowstride + unpackskippixels * components;
24015+ for (j = 0; j < widthin * components; j++) {
24016+ dummy(j, k);
24017+ tempin[k++] = (GLfloat) * usptr++;
24018+ }
24019+ }
24020+ break;
24021+ case GL_SHORT:
24022+ k = 0;
24023+ for (i = 0; i < heightin; i++) {
24024+ GLshort *sptr = (GLshort *) datain
24025+ + i * rowstride
24026+ + unpackskiprows * rowstride + unpackskippixels * components;
24027+ for (j = 0; j < widthin * components; j++) {
24028+ dummy(j, k);
24029+ tempin[k++] = (GLfloat) * sptr++;
24030+ }
24031+ }
24032+ break;
24033+ case GL_UNSIGNED_INT:
24034+ k = 0;
24035+ for (i = 0; i < heightin; i++) {
24036+ GLuint *uiptr = (GLuint *) datain
24037+ + i * rowstride
24038+ + unpackskiprows * rowstride + unpackskippixels * components;
24039+ for (j = 0; j < widthin * components; j++) {
24040+ dummy(j, k);
24041+ tempin[k++] = (GLfloat) * uiptr++;
24042+ }
24043+ }
24044+ break;
24045+ case GL_INT:
24046+ k = 0;
24047+ for (i = 0; i < heightin; i++) {
24048+ GLint *iptr = (GLint *) datain
24049+ + i * rowstride
24050+ + unpackskiprows * rowstride + unpackskippixels * components;
24051+ for (j = 0; j < widthin * components; j++) {
24052+ dummy(j, k);
24053+ tempin[k++] = (GLfloat) * iptr++;
24054+ }
24055+ }
24056+ break;
24057+ case GL_FLOAT:
24058+ k = 0;
24059+ for (i = 0; i < heightin; i++) {
24060+ GLfloat *fptr = (GLfloat *) datain
24061+ + i * rowstride
24062+ + unpackskiprows * rowstride + unpackskippixels * components;
24063+ for (j = 0; j < widthin * components; j++) {
24064+ dummy(j, k);
24065+ tempin[k++] = *fptr++;
24066+ }
24067+ }
24068+ break;
24069+ default:
24070+ return GLU_INVALID_ENUM;
24071+ }
24072+
24073+
24074+ /*
24075+ * Scale the image!
24076+ */
24077+
24078+ if (widthout > 1)
24079+ sx = (GLfloat) (widthin - 1) / (GLfloat) (widthout - 1);
24080+ else
24081+ sx = (GLfloat) (widthin - 1);
24082+ if (heightout > 1)
24083+ sy = (GLfloat) (heightin - 1) / (GLfloat) (heightout - 1);
24084+ else
24085+ sy = (GLfloat) (heightin - 1);
24086+
24087+/*#define POINT_SAMPLE*/
24088+#ifdef POINT_SAMPLE
24089+ for (i = 0; i < heightout; i++) {
24090+ GLint ii = i * sy;
24091+ for (j = 0; j < widthout; j++) {
24092+ GLint jj = j * sx;
24093+
24094+ GLfloat *src = tempin + (ii * widthin + jj) * components;
24095+ GLfloat *dst = tempout + (i * widthout + j) * components;
24096+
24097+ for (k = 0; k < components; k++) {
24098+ *dst++ = *src++;
24099+ }
24100+ }
24101+ }
24102+#else
24103+ if (sx < 1.0 && sy < 1.0) {
24104+ /* magnify both width and height: use weighted sample of 4 pixels */
24105+ GLint i0, i1, j0, j1;
24106+ GLfloat alpha, beta;
24107+ GLfloat *src00, *src01, *src10, *src11;
24108+ GLfloat s1, s2;
24109+ GLfloat *dst;
24110+
24111+ for (i = 0; i < heightout; i++) {
24112+ i0 = i * sy;
24113+ i1 = i0 + 1;
24114+ if (i1 >= heightin)
24115+ i1 = heightin - 1;
24116+/* i1 = (i+1) * sy - EPSILON;*/
24117+ alpha = i * sy - i0;
24118+ for (j = 0; j < widthout; j++) {
24119+ j0 = j * sx;
24120+ j1 = j0 + 1;
24121+ if (j1 >= widthin)
24122+ j1 = widthin - 1;
24123+/* j1 = (j+1) * sx - EPSILON; */
24124+ beta = j * sx - j0;
24125+
24126+ /* compute weighted average of pixels in rect (i0,j0)-(i1,j1) */
24127+ src00 = tempin + (i0 * widthin + j0) * components;
24128+ src01 = tempin + (i0 * widthin + j1) * components;
24129+ src10 = tempin + (i1 * widthin + j0) * components;
24130+ src11 = tempin + (i1 * widthin + j1) * components;
24131+
24132+ dst = tempout + (i * widthout + j) * components;
24133+
24134+ for (k = 0; k < components; k++) {
24135+ s1 = *src00++ * (1.0 - beta) + *src01++ * beta;
24136+ s2 = *src10++ * (1.0 - beta) + *src11++ * beta;
24137+ *dst++ = s1 * (1.0 - alpha) + s2 * alpha;
24138+ }
24139+ }
24140+ }
24141+ }
24142+ else {
24143+ /* shrink width and/or height: use an unweighted box filter */
24144+ GLint i0, i1;
24145+ GLint j0, j1;
24146+ GLint ii, jj;
24147+ GLfloat sum, *dst;
24148+
24149+ for (i = 0; i < heightout; i++) {
24150+ i0 = i * sy;
24151+ i1 = i0 + 1;
24152+ if (i1 >= heightin)
24153+ i1 = heightin - 1;
24154+/* i1 = (i+1) * sy - EPSILON; */
24155+ for (j = 0; j < widthout; j++) {
24156+ j0 = j * sx;
24157+ j1 = j0 + 1;
24158+ if (j1 >= widthin)
24159+ j1 = widthin - 1;
24160+/* j1 = (j+1) * sx - EPSILON; */
24161+
24162+ dst = tempout + (i * widthout + j) * components;
24163+
24164+ /* compute average of pixels in the rectangle (i0,j0)-(i1,j1) */
24165+ for (k = 0; k < components; k++) {
24166+ sum = 0.0;
24167+ for (ii = i0; ii <= i1; ii++) {
24168+ for (jj = j0; jj <= j1; jj++) {
24169+ sum += *(tempin + (ii * widthin + jj) * components + k);
24170+ }
24171+ }
24172+ sum /= (j1 - j0 + 1) * (i1 - i0 + 1);
24173+ *dst++ = sum;
24174+ }
24175+ }
24176+ }
24177+ }
24178+#endif
24179+
24180+
24181+ /*
24182+ * Return output image
24183+ */
24184+
24185+ if (packrowlength > 0) {
24186+ rowlen = packrowlength;
24187+ }
24188+ else {
24189+ rowlen = widthout;
24190+ }
24191+ if (sizeout >= packalignment) {
24192+ rowstride = components * rowlen;
24193+ }
24194+ else {
24195+ rowstride = packalignment / sizeout
24196+ * CEILING(components * rowlen * sizeout, packalignment);
24197+ }
24198+
24199+ switch (typeout) {
24200+ case GL_UNSIGNED_BYTE:
24201+ k = 0;
24202+ for (i = 0; i < heightout; i++) {
24203+ GLubyte *ubptr = (GLubyte *) dataout
24204+ + i * rowstride
24205+ + packskiprows * rowstride + packskippixels * components;
24206+ for (j = 0; j < widthout * components; j++) {
24207+ dummy(j, k + i);
24208+ *ubptr++ = (GLubyte) tempout[k++];
24209+ }
24210+ }
24211+ break;
24212+ case GL_BYTE:
24213+ k = 0;
24214+ for (i = 0; i < heightout; i++) {
24215+ GLbyte *bptr = (GLbyte *) dataout
24216+ + i * rowstride
24217+ + packskiprows * rowstride + packskippixels * components;
24218+ for (j = 0; j < widthout * components; j++) {
24219+ dummy(j, k + i);
24220+ *bptr++ = (GLbyte) tempout[k++];
24221+ }
24222+ }
24223+ break;
24224+ case GL_UNSIGNED_SHORT:
24225+ k = 0;
24226+ for (i = 0; i < heightout; i++) {
24227+ GLushort *usptr = (GLushort *) dataout
24228+ + i * rowstride
24229+ + packskiprows * rowstride + packskippixels * components;
24230+ for (j = 0; j < widthout * components; j++) {
24231+ dummy(j, k + i);
24232+ *usptr++ = (GLushort) tempout[k++];
24233+ }
24234+ }
24235+ break;
24236+ case GL_SHORT:
24237+ k = 0;
24238+ for (i = 0; i < heightout; i++) {
24239+ GLshort *sptr = (GLshort *) dataout
24240+ + i * rowstride
24241+ + packskiprows * rowstride + packskippixels * components;
24242+ for (j = 0; j < widthout * components; j++) {
24243+ dummy(j, k + i);
24244+ *sptr++ = (GLshort) tempout[k++];
24245+ }
24246+ }
24247+ break;
24248+ case GL_UNSIGNED_INT:
24249+ k = 0;
24250+ for (i = 0; i < heightout; i++) {
24251+ GLuint *uiptr = (GLuint *) dataout
24252+ + i * rowstride
24253+ + packskiprows * rowstride + packskippixels * components;
24254+ for (j = 0; j < widthout * components; j++) {
24255+ dummy(j, k + i);
24256+ *uiptr++ = (GLuint) tempout[k++];
24257+ }
24258+ }
24259+ break;
24260+ case GL_INT:
24261+ k = 0;
24262+ for (i = 0; i < heightout; i++) {
24263+ GLint *iptr = (GLint *) dataout
24264+ + i * rowstride
24265+ + packskiprows * rowstride + packskippixels * components;
24266+ for (j = 0; j < widthout * components; j++) {
24267+ dummy(j, k + i);
24268+ *iptr++ = (GLint) tempout[k++];
24269+ }
24270+ }
24271+ break;
24272+ case GL_FLOAT:
24273+ k = 0;
24274+ for (i = 0; i < heightout; i++) {
24275+ GLfloat *fptr = (GLfloat *) dataout
24276+ + i * rowstride
24277+ + packskiprows * rowstride + packskippixels * components;
24278+ for (j = 0; j < widthout * components; j++) {
24279+ dummy(j, k + i);
24280+ *fptr++ = tempout[k++];
24281+ }
24282+ }
24283+ break;
24284+ default:
24285+ return GLU_INVALID_ENUM;
24286+ }
24287+
24288+
24289+ /* free temporary image storage */
24290+ free(tempin);
24291+ free(tempout);
24292+
24293+ return 0;
24294+}
24295+
24296+
24297+
24298+/*
24299+ * Return the largest k such that 2^k <= n.
24300+ */
24301+static GLint
24302+ilog2(GLint n)
24303+{
24304+ GLint k;
24305+
24306+ if (n <= 0)
24307+ return 0;
24308+ for (k = 0; n >>= 1; k++);
24309+ return k;
24310+}
24311+
24312+
24313+
24314+/*
24315+ * Find the value nearest to n which is also a power of two.
24316+ */
24317+static GLint
24318+round2(GLint n)
24319+{
24320+ GLint m;
24321+
24322+ for (m = 1; m < n; m *= 2);
24323+
24324+ /* m>=n */
24325+ if (m - n <= n - m / 2) {
24326+ return m;
24327+ }
24328+ else {
24329+ return m / 2;
24330+ }
24331+}
24332+
24333+
24334+/*
24335+ * Given an pixel format and datatype, return the number of bytes to
24336+ * store one pixel.
24337+ */
24338+static GLint
24339+bytes_per_pixel(GLenum format, GLenum type)
24340+{
24341+ GLint n, m;
24342+
24343+ switch (format) {
24344+ case GL_COLOR_INDEX:
24345+ case GL_STENCIL_INDEX:
24346+ case GL_DEPTH_COMPONENT:
24347+ case GL_RED:
24348+ case GL_GREEN:
24349+ case GL_BLUE:
24350+ case GL_ALPHA:
24351+ case GL_LUMINANCE:
24352+ n = 1;
24353+ break;
24354+ case GL_LUMINANCE_ALPHA:
24355+ n = 2;
24356+ break;
24357+ case GL_RGB:
24358+ case GL_BGR:
24359+ n = 3;
24360+ break;
24361+ case GL_RGBA:
24362+ case GL_BGRA:
24363+#ifdef GL_EXT_abgr
24364+ case GL_ABGR_EXT:
24365+#endif
24366+ n = 4;
24367+ break;
24368+ default:
24369+ n = 0;
24370+ }
24371+
24372+ switch (type) {
24373+ case GL_UNSIGNED_BYTE:
24374+ m = sizeof(GLubyte);
24375+ break;
24376+ case GL_BYTE:
24377+ m = sizeof(GLbyte);
24378+ break;
24379+ case GL_BITMAP:
24380+ m = 1;
24381+ break;
24382+ case GL_UNSIGNED_SHORT:
24383+ m = sizeof(GLushort);
24384+ break;
24385+ case GL_SHORT:
24386+ m = sizeof(GLshort);
24387+ break;
24388+ case GL_UNSIGNED_INT:
24389+ m = sizeof(GLuint);
24390+ break;
24391+ case GL_INT:
24392+ m = sizeof(GLint);
24393+ break;
24394+ case GL_FLOAT:
24395+ m = sizeof(GLfloat);
24396+ break;
24397+ default:
24398+ m = 0;
24399+ }
24400+
24401+ return n * m;
24402+}
24403+
24404+
24405+
24406+/*
24407+ * WARNING: This function isn't finished and has never been tested!!!!
24408+ */
24409+GLint GLAPIENTRY
24410+mesa_gluBuild1DMipmaps(GLenum target, GLint components,
24411+ GLsizei width, GLenum format, GLenum type, const void *data)
24412+{
24413+ GLubyte *texture;
24414+ GLint levels, max_levels;
24415+ GLint new_width, max_width;
24416+ GLint i, j, k, l;
24417+
24418+ if (width < 1)
24419+ return GLU_INVALID_VALUE;
24420+
24421+ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_width);
24422+ max_levels = ilog2(max_width) + 1;
24423+
24424+ /* Compute how many mipmap images to make */
24425+ levels = ilog2(width) + 1;
24426+ if (levels > max_levels) {
24427+ levels = max_levels;
24428+ }
24429+
24430+ new_width = 1 << (levels - 1);
24431+
24432+ texture = (GLubyte *) malloc(new_width * components);
24433+ if (!texture) {
24434+ return GLU_OUT_OF_MEMORY;
24435+ }
24436+
24437+ if (width != new_width) {
24438+ /* initial rescaling */
24439+ switch (type) {
24440+ case GL_UNSIGNED_BYTE:
24441+ {
24442+ GLubyte *ub_data = (GLubyte *) data;
24443+ for (i = 0; i < new_width; i++) {
24444+ j = i * width / new_width;
24445+ for (k = 0; k < components; k++) {
24446+ texture[i * components + k] = ub_data[j * components + k];
24447+ }
24448+ }
24449+ }
24450+ break;
24451+ default:
24452+ /* Not implemented */
24453+ return GLU_ERROR;
24454+ }
24455+ }
24456+
24457+ /* generate and load mipmap images */
24458+ for (l = 0; l < levels; l++) {
24459+ glTexImage1D(GL_TEXTURE_1D, l, components, new_width, 0,
24460+ format, GL_UNSIGNED_BYTE, texture);
24461+
24462+ /* Scale image down to 1/2 size */
24463+ new_width = new_width / 2;
24464+ for (i = 0; i < new_width; i++) {
24465+ for (k = 0; k < components; k++) {
24466+ GLint sample1, sample2;
24467+ sample1 = (GLint) texture[i * 2 * components + k];
24468+ sample2 = (GLint) texture[(i * 2 + 1) * components + k];
24469+ texture[i * components + k] = (GLubyte) ((sample1 + sample2) / 2);
24470+ }
24471+ }
24472+ }
24473+
24474+ free(texture);
24475+
24476+ return 0;
24477+}
24478+
24479+
24480+
24481+GLint GLAPIENTRY
24482+mesa_gluBuild2DMipmaps(GLenum target, GLint components,
24483+ GLsizei width, GLsizei height, GLenum format,
24484+ GLenum type, const void *data)
24485+{
24486+ GLint w, h, maxsize;
24487+ void *image, *newimage;
24488+ GLint neww, newh, level, bpp;
24489+ int error;
24490+ GLboolean done;
24491+ GLint retval = 0;
24492+ GLint unpackrowlength, unpackalignment, unpackskiprows, unpackskippixels;
24493+ GLint packrowlength, packalignment, packskiprows, packskippixels;
24494+
24495+ if (width < 1 || height < 1)
24496+ return GLU_INVALID_VALUE;
24497+
24498+ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxsize);
24499+
24500+ w = round2(width);
24501+ if (w > maxsize) {
24502+ w = maxsize;
24503+ }
24504+ h = round2(height);
24505+ if (h > maxsize) {
24506+ h = maxsize;
24507+ }
24508+
24509+ bpp = bytes_per_pixel(format, type);
24510+ if (bpp == 0) {
24511+ /* probably a bad format or type enum */
24512+ return GLU_INVALID_ENUM;
24513+ }
24514+
24515+ /* Get current glPixelStore values */
24516+ glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpackrowlength);
24517+ glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpackalignment);
24518+ glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unpackskiprows);
24519+ glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unpackskippixels);
24520+ glGetIntegerv(GL_PACK_ROW_LENGTH, &packrowlength);
24521+ glGetIntegerv(GL_PACK_ALIGNMENT, &packalignment);
24522+ glGetIntegerv(GL_PACK_SKIP_ROWS, &packskiprows);
24523+ glGetIntegerv(GL_PACK_SKIP_PIXELS, &packskippixels);
24524+
24525+ /* set pixel packing */
24526+ glPixelStorei(GL_PACK_ROW_LENGTH, 0);
24527+ glPixelStorei(GL_PACK_ALIGNMENT, 1);
24528+ glPixelStorei(GL_PACK_SKIP_ROWS, 0);
24529+ glPixelStorei(GL_PACK_SKIP_PIXELS, 0);
24530+
24531+ done = GL_FALSE;
24532+
24533+ if (w != width || h != height) {
24534+ /* must rescale image to get "top" mipmap texture image */
24535+ image = malloc((w + 4) * h * bpp);
24536+ if (!image) {
24537+ return GLU_OUT_OF_MEMORY;
24538+ }
24539+ error = mesa_gluScaleImage(format, width, height, type, data,
24540+ w, h, type, image);
24541+ if (error) {
24542+ retval = error;
24543+ done = GL_TRUE;
24544+ }
24545+ }
24546+ else {
24547+ image = (void *) data;
24548+ }
24549+
24550+ level = 0;
24551+ while (!done) {
24552+ if (image != data) {
24553+ /* set pixel unpacking */
24554+ glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
24555+ glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
24556+ glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
24557+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
24558+ }
24559+
24560+ glTexImage2D(target, level, components, w, h, 0, format, type, image);
24561+
24562+ if (w == 1 && h == 1)
24563+ break;
24564+
24565+ neww = (w < 2) ? 1 : w / 2;
24566+ newh = (h < 2) ? 1 : h / 2;
24567+ newimage = malloc((neww + 4) * newh * bpp);
24568+ if (!newimage) {
24569+ return GLU_OUT_OF_MEMORY;
24570+ }
24571+
24572+ error = mesa_gluScaleImage(format, w, h, type, image,
24573+ neww, newh, type, newimage);
24574+ if (error) {
24575+ retval = error;
24576+ done = GL_TRUE;
24577+ }
24578+
24579+ if (image != data) {
24580+ free(image);
24581+ }
24582+ image = newimage;
24583+
24584+ w = neww;
24585+ h = newh;
24586+ level++;
24587+ }
24588+
24589+ if (image != data) {
24590+ free(image);
24591+ }
24592+
24593+ /* Restore original glPixelStore state */
24594+ glPixelStorei(GL_UNPACK_ROW_LENGTH, unpackrowlength);
24595+ glPixelStorei(GL_UNPACK_ALIGNMENT, unpackalignment);
24596+ glPixelStorei(GL_UNPACK_SKIP_ROWS, unpackskiprows);
24597+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, unpackskippixels);
24598+ glPixelStorei(GL_PACK_ROW_LENGTH, packrowlength);
24599+ glPixelStorei(GL_PACK_ALIGNMENT, packalignment);
24600+ glPixelStorei(GL_PACK_SKIP_ROWS, packskiprows);
24601+ glPixelStorei(GL_PACK_SKIP_PIXELS, packskippixels);
24602+
24603+ return retval;
24604+}
24605Index: qemu-0.14.0/target-i386/opengl_exec.c
24606===================================================================
24607--- /dev/null
24608+++ qemu-0.14.0/target-i386/opengl_exec.c
24609@@ -0,0 +1,3931 @@
24610+/*
24611+ * Host-side implementation of GL/GLX API
24612+ *
24613+ * Copyright (c) 2006,2007 Even Rouault
24614+ *
24615+ * Permission is hereby granted, free of charge, to any person obtaining a copy
24616+ * of this software and associated documentation files (the "Software"), to deal
24617+ * in the Software without restriction, including without limitation the rights
24618+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
24619+ * copies of the Software, and to permit persons to whom the Software is
24620+ * furnished to do so, subject to the following conditions:
24621+ *
24622+ * The above copyright notice and this permission notice shall be included in
24623+ * all copies or substantial portions of the Software.
24624+ *
24625+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24626+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24627+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24628+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24629+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24630+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24631+ * THE SOFTWARE.
24632+ */
24633+
24634+
24635+#include <stdio.h>
24636+#include <stdlib.h>
24637+#include <assert.h>
24638+#include <string.h>
24639+
24640+#include <X11/Xlib.h>
24641+#include <X11/Xutil.h>
24642+
24643+#define GL_GLEXT_PROTOTYPES
24644+#define GLX_GLXEXT_PROTOTYPES
24645+
24646+#include <mesa_gl.h>
24647+#include <mesa_glx.h>
24648+
24649+// TODO
24650+typedef long unsigned int target_phys_addr_t;
24651+
24652+#include "opengl_func.h"
24653+
24654+#include "mesa_glu.h"
24655+#include "mesa_mipmap.c"
24656+
24657+#include "../qemu-common.h"
24658+
24659+//#define SYSTEMATIC_ERROR_CHECK
24660+#define BUFFER_BEGINEND
24661+#define glGetError() 0
24662+
24663+#define GET_EXT_PTR(type, funcname, args_decl) \
24664+ static int detect_##funcname = 0; \
24665+ static type(*ptr_func_##funcname)args_decl = NULL; \
24666+ if (detect_##funcname == 0) \
24667+ { \
24668+ detect_##funcname = 1; \
24669+ ptr_func_##funcname = (type(*)args_decl)glXGetProcAddressARB((const GLubyte*)#funcname); \
24670+ assert (ptr_func_##funcname); \
24671+ }
24672+
24673+#define GET_EXT_PTR_NO_FAIL(type, funcname, args_decl) \
24674+ static int detect_##funcname = 0; \
24675+ static type(*ptr_func_##funcname)args_decl = NULL; \
24676+ if (detect_##funcname == 0) \
24677+ { \
24678+ detect_##funcname = 1; \
24679+ ptr_func_##funcname = (type(*)args_decl)glXGetProcAddressARB((const GLubyte*)#funcname); \
24680+ }
24681+
24682+#ifndef WIN32
24683+#include <dlfcn.h>
24684+#endif
24685+
24686+static void *get_glu_ptr(const char *name)
24687+{
24688+ static void *handle = (void *) -1;
24689+
24690+ if (handle == (void *) -1) {
24691+#ifndef WIN32
24692+ handle = dlopen("libGLU.so", RTLD_LAZY);
24693+ if (!handle)
24694+ fprintf(stderr, "can't load libGLU.so : %s\n", dlerror());
24695+#else
24696+ handle = (void *) LoadLibrary("glu32.dll");
24697+ if (!handle)
24698+ fprintf(stderr, "can't load glu32.dll\n");
24699+#endif
24700+ }
24701+ if (handle) {
24702+#ifndef WIN32
24703+ return dlsym(handle, name);
24704+#else
24705+ return GetProcAddress(handle, name);
24706+#endif
24707+ }
24708+ return NULL;
24709+}
24710+
24711+#define GET_GLU_PTR(type, funcname, args_decl) \
24712+ static int detect_##funcname = 0; \
24713+ static type(*ptr_func_##funcname)args_decl = NULL; \
24714+ if (detect_##funcname == 0) \
24715+ { \
24716+ detect_##funcname = 1; \
24717+ ptr_func_##funcname = (type(*)args_decl)get_glu_ptr(#funcname); \
24718+ }
24719+
24720+int display_function_call = 0;
24721+
24722+static const int defaultAttribList[] = {
24723+ GLX_RGBA,
24724+ GLX_RED_SIZE, 1,
24725+ GLX_GREEN_SIZE, 1,
24726+ GLX_BLUE_SIZE, 1,
24727+ GLX_DOUBLEBUFFER,
24728+ None
24729+};
24730+
24731+static XVisualInfo *get_default_visual(Display *dpy)
24732+{
24733+ static XVisualInfo *vis = NULL;
24734+ XVisualInfo theTemplate;
24735+ int numVisuals;
24736+
24737+ if (vis)
24738+ return vis;
24739+ fprintf(stderr, "get_default_visual\n");
24740+ /* if (vis == NULL) vis = glXChooseVisual(dpy, 0,
24741+ * (int*)defaultAttribList); */
24742+ theTemplate.screen = 0;
24743+ vis = XGetVisualInfo(dpy, VisualScreenMask, &theTemplate, &numVisuals);
24744+
24745+ return vis;
24746+}
24747+
24748+
24749+static Display *parent_dpy = NULL;
24750+static Window qemu_parent_window = 0;
24751+
24752+static Window active_win = 0; /* FIXME */
24753+static int active_win_x = 0;
24754+static int active_win_y = 0;
24755+
24756+void opengl_exec_set_parent_window(Display *_dpy, Window _parent_window)
24757+{
24758+ parent_dpy = _dpy;
24759+ qemu_parent_window = _parent_window;
24760+ if (active_win)
24761+ XReparentWindow(_dpy, active_win, _parent_window, active_win_x,
24762+ active_win_y);
24763+}
24764+
24765+static int local_connection = 0;
24766+void opengl_exec_set_local_connection()
24767+{
24768+ local_connection = 1;
24769+}
24770+
24771+static GLXDrawable create_window(Display *dpy, Window local_parent_window,
24772+ XVisualInfo *vis, const char *name,
24773+ int x, int y, int width, int height)
24774+{
24775+ int scrnum;
24776+ XSetWindowAttributes attr = { 0 };
24777+ unsigned long mask;
24778+ Window root;
24779+ Window win;
24780+
24781+ scrnum = DefaultScreen(dpy);
24782+ root = RootWindow(dpy, scrnum);
24783+
24784+ /* window attributes */
24785+ attr.background_pixel = 0xff000000;
24786+ attr.border_pixel = 0;
24787+ attr.colormap = XCreateColormap(dpy, root, vis->visual, AllocNone);
24788+ attr.event_mask = 0; /* StructureNotifyMask | ExposureMask | KeyPressMask */
24789+ attr.save_under = True;
24790+ // if (local_parent_window == NULL && qemu_parent_window == NULL)
24791+ attr.override_redirect = True;
24792+ // else
24793+ // attr.override_redirect = True;
24794+ attr.cursor = None;
24795+ mask =
24796+ CWBackPixel | CWBorderPixel | CWColormap | CWEventMask |
24797+ CWOverrideRedirect | CWSaveUnder;
24798+
24799+ if (local_parent_window)
24800+ win = XCreateWindow(dpy, local_parent_window, 0, 0, width, height, 0,
24801+ vis->depth, InputOutput, vis->visual, mask, &attr);
24802+ else if (qemu_parent_window)
24803+ win = XCreateWindow(dpy, qemu_parent_window, 0, 0, width, height, 0,
24804+ vis->depth, InputOutput, vis->visual, mask, &attr);
24805+ else
24806+ win = XCreateWindow(dpy, root, 0, 0, width, height, 0, vis->depth,
24807+ InputOutput, vis->visual, mask, &attr);
24808+
24809+ /* set hints and properties */
24810+ {
24811+ XSizeHints sizehints;
24812+
24813+ sizehints.x = x;
24814+ sizehints.y = y;
24815+ sizehints.width = width;
24816+ sizehints.height = height;
24817+ sizehints.flags = USSize | USPosition;
24818+ XSetWMNormalHints(dpy, win, &sizehints);
24819+ XSetStandardProperties(dpy, win, name, name, None,
24820+ (char **) NULL, 0, &sizehints);
24821+ }
24822+
24823+ XSync(dpy, 0);
24824+
24825+ /*
24826+ * int loop = 1; while (loop) { while (XPending(dpy) > 0) { XEvent event;
24827+ * XNextEvent(dpy, &event); switch (event.type) { case CreateNotify: { if
24828+ * (((XCreateWindowEvent*)&event)->window == win) { loop = 0; } break; } }
24829+ * } } */
24830+
24831+ /* TODO */
24832+ if (!active_win)
24833+ active_win = win;
24834+
24835+ return win;
24836+}
24837+
24838+typedef struct {
24839+ void *key;
24840+ void *value;
24841+} Assoc;
24842+
24843+#define MAX_HANDLED_PROCESS 100
24844+#define MAX_ASSOC_SIZE 100
24845+
24846+#define MAX_FBCONFIG 10
24847+
24848+#include "opengl_utils.h"
24849+
24850+#define MAX(a, b) (((a) > (b)) ? (a) : (b))
24851+
24852+
24853+typedef struct {
24854+ int x;
24855+ int y;
24856+ int width;
24857+ int height;
24858+ int map_state;
24859+} WindowPosStruct;
24860+
24861+typedef struct {
24862+ GLbitfield mask;
24863+ int activeTextureIndex;
24864+} ClientState;
24865+
24866+#define MAX_CLIENT_STATE_STACK_SIZE 16
24867+
24868+typedef struct {
24869+ int ref;
24870+ int fake_ctxt;
24871+ int fake_shareList;
24872+ GLXContext context;
24873+ GLXDrawable drawable;
24874+
24875+ void *vertexPointer;
24876+ void *normalPointer;
24877+ void *colorPointer;
24878+ void *secondaryColorPointer;
24879+ void *indexPointer;
24880+ void *texCoordPointer[NB_MAX_TEXTURES];
24881+ void *edgeFlagPointer;
24882+ void *vertexAttribPointer[MY_GL_MAX_VERTEX_ATTRIBS_ARB];
24883+ void *vertexAttribPointerNV[MY_GL_MAX_VERTEX_ATTRIBS_NV];
24884+ void *weightPointer;
24885+ void *matrixIndexPointer;
24886+ void *fogCoordPointer;
24887+ void *variantPointerEXT[MY_GL_MAX_VARIANT_POINTER_EXT];
24888+ void *interleavedArrays;
24889+ void *elementPointerATI;
24890+
24891+ int vertexPointerSize;
24892+ int normalPointerSize;
24893+ int colorPointerSize;
24894+ int secondaryColorPointerSize;
24895+ int indexPointerSize;
24896+ int texCoordPointerSize[NB_MAX_TEXTURES];
24897+ int edgeFlagPointerSize;
24898+ int vertexAttribPointerSize[MY_GL_MAX_VERTEX_ATTRIBS_ARB];
24899+ int vertexAttribPointerNVSize[MY_GL_MAX_VERTEX_ATTRIBS_NV];
24900+ int weightPointerSize;
24901+ int matrixIndexPointerSize;
24902+ int fogCoordPointerSize;
24903+ int variantPointerEXTSize[MY_GL_MAX_VARIANT_POINTER_EXT];
24904+ int interleavedArraysSize;
24905+ int elementPointerATISize;
24906+
24907+ int selectBufferSize;
24908+ void *selectBufferPtr;
24909+ int feedbackBufferSize;
24910+ void *feedbackBufferPtr;
24911+
24912+ ClientState clientStateStack[MAX_CLIENT_STATE_STACK_SIZE];
24913+ int clientStateSp;
24914+ int activeTextureIndex;
24915+
24916+ unsigned int ownTabTextures[32768];
24917+ unsigned int *tabTextures;
24918+ RangeAllocator ownTextureAllocator;
24919+ RangeAllocator *textureAllocator;
24920+
24921+ unsigned int ownTabBuffers[32768];
24922+ unsigned int *tabBuffers;
24923+ RangeAllocator ownBufferAllocator;
24924+ RangeAllocator *bufferAllocator;
24925+
24926+ unsigned int ownTabLists[32768];
24927+ unsigned int *tabLists;
24928+ RangeAllocator ownListAllocator;
24929+ RangeAllocator *listAllocator;
24930+
24931+#ifdef SYSTEMATIC_ERROR_CHECK
24932+ int last_error;
24933+#endif
24934+} GLState;
24935+
24936+typedef struct {
24937+ int process_id;
24938+ int instr_counter;
24939+
24940+ int x, y, width, height;
24941+ WindowPosStruct currentDrawablePos;
24942+
24943+ int next_available_context_number;
24944+ int next_available_pbuffer_number;
24945+
24946+ int nb_states;
24947+ GLState default_state;
24948+ GLState **glstates;
24949+ GLState *current_state;
24950+
24951+ int nfbconfig;
24952+ GLXFBConfig *fbconfigs[MAX_FBCONFIG];
24953+ int fbconfigs_max[MAX_FBCONFIG];
24954+ int nfbconfig_total;
24955+
24956+ Assoc association_fakecontext_glxcontext[MAX_ASSOC_SIZE];
24957+ Assoc association_fakepbuffer_pbuffer[MAX_ASSOC_SIZE];
24958+ Assoc association_clientdrawable_serverdrawable[MAX_ASSOC_SIZE];
24959+ Assoc association_fakecontext_visual[MAX_ASSOC_SIZE];
24960+
24961+ Display *dpy;
24962+
24963+ int began;
24964+ int primitive;
24965+ int bufsize;
24966+ int bufstart;
24967+ arg_t *cmdbuf;
24968+} ProcessStruct;
24969+
24970+static ProcessStruct processes[MAX_HANDLED_PROCESS];
24971+
24972+void init_process_tab()
24973+{
24974+ memset(processes, 0, sizeof(processes));
24975+}
24976+
24977+#define ARG_TO_CHAR(x) (char)(x)
24978+#define ARG_TO_UNSIGNED_CHAR(x) (unsigned char)(x)
24979+#define ARG_TO_SHORT(x) (short)(x)
24980+#define ARG_TO_UNSIGNED_SHORT(x) (unsigned short)(x)
24981+#define ARG_TO_INT(x) (int)(x)
24982+#define ARG_TO_UNSIGNED_INT(x) (unsigned int)(x)
24983+#define ARG_TO_FLOAT(x) (*(float*)&(x))
24984+#define ARG_TO_DOUBLE(x) (*(double*)(x))
24985+
24986+#include "server_stub.c"
24987+
24988+/* ---- */
24989+
24990+#ifdef BUFFER_BEGINEND
24991+/* A user of the following two functions must not buffer any calls that
24992+ * may throw an error (i.e. errors conditions must be checked before
24993+ * storing in the buffer) or return values. */
24994+static inline arg_t *cmd_buffer_alloc(ProcessStruct *process, size_t elems)
24995+{
24996+ arg_t *ret;
24997+
24998+ if (unlikely(process->bufstart + elems > process->bufsize)) {
24999+ process->bufsize = (process->bufsize ?: 0x100) << 1;
25000+ process->cmdbuf = qemu_realloc(process->cmdbuf,
25001+ process->bufsize * sizeof(arg_t));
25002+ }
25003+
25004+ ret = process->cmdbuf + process->bufstart;
25005+ process->bufstart += elems;
25006+ return ret;
25007+}
25008+
25009+static inline void cmd_buffer_replay(ProcessStruct *process)
25010+{
25011+ Signature *sig;
25012+ int func_number;
25013+ int ret_int;
25014+ char ret_char;
25015+ arg_t *call = process->cmdbuf;
25016+
25017+ while (process->bufstart) {
25018+ func_number = *call ++;
25019+ sig = (Signature *) tab_opengl_calls[func_number];
25020+
25021+ execute_func(func_number, call, &ret_int, &ret_char);
25022+
25023+ call += sig->nb_args;
25024+ process->bufstart -= sig->nb_args + 1;
25025+ }
25026+}
25027+#endif
25028+
25029+/* ---- */
25030+
25031+typedef void *ClientGLXDrawable;
25032+static inline ClientGLXDrawable to_drawable(arg_t arg)
25033+{
25034+#ifdef TARGET_X86_64
25035+ if (arg > (unsigned long) -1) {
25036+ fprintf(stderr, "GLXDrawable too big for this implementation\n");
25037+ exit(-1);
25038+ }
25039+#endif
25040+ return (void *) (unsigned long) arg;
25041+}
25042+
25043+GLXContext get_association_fakecontext_glxcontext(
25044+ ProcessStruct *process, int fakecontext)
25045+{
25046+ int i;
25047+
25048+ for (i = 0;
25049+ i < MAX_ASSOC_SIZE &&
25050+ process->association_fakecontext_glxcontext[i].key; i++)
25051+ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
25052+ fakecontext)
25053+ return (GLXContext)
25054+ process->association_fakecontext_glxcontext[i].value;
25055+
25056+ return NULL;
25057+}
25058+
25059+void set_association_fakecontext_glxcontext(
25060+ ProcessStruct *process, int fakecontext, GLXContext glxcontext)
25061+{
25062+ int i;
25063+
25064+ for (i = 0;
25065+ i < MAX_ASSOC_SIZE &&
25066+ process->association_fakecontext_glxcontext[i].key; i++)
25067+ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
25068+ fakecontext)
25069+ break;
25070+
25071+ if (i < MAX_ASSOC_SIZE) {
25072+ process->association_fakecontext_glxcontext[i].key =
25073+ (void *) (long) fakecontext;
25074+ process->association_fakecontext_glxcontext[i].value =
25075+ (void *) glxcontext;
25076+ } else
25077+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
25078+}
25079+
25080+void unset_association_fakecontext_glxcontext(
25081+ ProcessStruct *process, int fakecontext)
25082+{
25083+ int i;
25084+
25085+ for (i = 0;
25086+ i < MAX_ASSOC_SIZE &&
25087+ process->association_fakecontext_glxcontext[i].key; i++)
25088+ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
25089+ fakecontext) {
25090+ memmove(&process->association_fakecontext_glxcontext[i],
25091+ &process->association_fakecontext_glxcontext[i + 1],
25092+ sizeof(Assoc) * (MAX_ASSOC_SIZE - 1 - i));
25093+ return;
25094+ }
25095+}
25096+
25097+/* ---- */
25098+
25099+XVisualInfo *get_association_fakecontext_visual(
25100+ ProcessStruct *process, int fakecontext)
25101+{
25102+ int i;
25103+
25104+ for (i = 0;
25105+ i < MAX_ASSOC_SIZE && process->association_fakecontext_visual[i].key;
25106+ i++)
25107+ if ((int) (long) process->association_fakecontext_visual[i].key ==
25108+ fakecontext)
25109+ return process->association_fakecontext_visual[i].value;
25110+
25111+ return NULL;
25112+}
25113+
25114+void set_association_fakecontext_visual(ProcessStruct *process,
25115+ int fakecontext, XVisualInfo *visual)
25116+{
25117+ int i;
25118+
25119+ for (i = 0;
25120+ i < MAX_ASSOC_SIZE && process->association_fakecontext_visual[i].key;
25121+ i++)
25122+ if ((int) (long) process->association_fakecontext_visual[i].key ==
25123+ fakecontext)
25124+ break;
25125+
25126+ if (i < MAX_ASSOC_SIZE) {
25127+ process->association_fakecontext_visual[i].key =
25128+ (void *) (long) fakecontext;
25129+ process->association_fakecontext_visual[i].value = (void *) visual;
25130+ } else
25131+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
25132+}
25133+
25134+/* ---- */
25135+
25136+GLXPbuffer get_association_fakepbuffer_pbuffer(
25137+ ProcessStruct *process, ClientGLXDrawable fakepbuffer)
25138+{
25139+ int i;
25140+
25141+ for (i = 0; i < MAX_ASSOC_SIZE &&
25142+ process->association_fakepbuffer_pbuffer[i].key; i ++)
25143+ if ((ClientGLXDrawable)
25144+ process->association_fakepbuffer_pbuffer[i].key ==
25145+ fakepbuffer)
25146+ return (GLXPbuffer)
25147+ process->association_fakepbuffer_pbuffer[i].value;
25148+
25149+ return 0;
25150+}
25151+
25152+void set_association_fakepbuffer_pbuffer(ProcessStruct *process,
25153+ ClientGLXDrawable fakepbuffer, GLXPbuffer pbuffer)
25154+{
25155+ int i;
25156+
25157+ for (i = 0;
25158+ i < MAX_ASSOC_SIZE &&
25159+ process->association_fakepbuffer_pbuffer[i].key; i++)
25160+ if ((ClientGLXDrawable)
25161+ process->association_fakepbuffer_pbuffer[i].key ==
25162+ fakepbuffer)
25163+ break;
25164+
25165+ if (i < MAX_ASSOC_SIZE) {
25166+ process->association_fakepbuffer_pbuffer[i].key = (void *) fakepbuffer;
25167+ process->association_fakepbuffer_pbuffer[i].value = (void *) pbuffer;
25168+ } else
25169+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
25170+}
25171+
25172+void unset_association_fakepbuffer_pbuffer(ProcessStruct *process,
25173+ ClientGLXDrawable fakepbuffer)
25174+{
25175+ int i;
25176+
25177+ for (i = 0; i < MAX_ASSOC_SIZE &&
25178+ process->association_fakepbuffer_pbuffer[i].key; i++)
25179+ if ((ClientGLXDrawable)
25180+ process->association_fakepbuffer_pbuffer[i].key ==
25181+ fakepbuffer) {
25182+ memmove(&process->association_fakepbuffer_pbuffer[i],
25183+ &process->association_fakepbuffer_pbuffer[i + 1],
25184+ sizeof(Assoc) * (MAX_ASSOC_SIZE - 1 - i));
25185+ return;
25186+ }
25187+}
25188+
25189+/* ---- */
25190+
25191+GLXDrawable get_association_clientdrawable_serverdrawable(
25192+ ProcessStruct *process, ClientGLXDrawable clientdrawable)
25193+{
25194+ int i;
25195+
25196+ for (i = 0; i < MAX_ASSOC_SIZE &&
25197+ process->association_clientdrawable_serverdrawable[i].key;
25198+ i++)
25199+ if ((ClientGLXDrawable) process->
25200+ association_clientdrawable_serverdrawable[i].key ==
25201+ clientdrawable)
25202+ return (GLXDrawable) process->
25203+ association_clientdrawable_serverdrawable[i].value;
25204+
25205+ return (GLXDrawable) 0;
25206+}
25207+
25208+ClientGLXDrawable get_association_serverdrawable_clientdrawable(
25209+ ProcessStruct *process, GLXDrawable serverdrawable)
25210+{
25211+ int i;
25212+
25213+ for (i = 0; i < MAX_ASSOC_SIZE &&
25214+ process->association_clientdrawable_serverdrawable[i].key;
25215+ i ++)
25216+ if ((GLXDrawable) process->
25217+ association_clientdrawable_serverdrawable[i].value ==
25218+ serverdrawable)
25219+ return (ClientGLXDrawable)
25220+ process->association_clientdrawable_serverdrawable[i].key;
25221+
25222+ return NULL;
25223+}
25224+
25225+void set_association_clientdrawable_serverdrawable(
25226+ ProcessStruct *process, ClientGLXDrawable clientdrawable,
25227+ GLXDrawable serverdrawable)
25228+{
25229+ int i;
25230+
25231+ for (i = 0; process->association_clientdrawable_serverdrawable[i].key;
25232+ i ++)
25233+ if ((ClientGLXDrawable) process->
25234+ association_clientdrawable_serverdrawable[i].key ==
25235+ clientdrawable)
25236+ break;
25237+
25238+ if (i < MAX_ASSOC_SIZE) {
25239+ process->association_clientdrawable_serverdrawable[i].key =
25240+ (void *) clientdrawable;
25241+ process->association_clientdrawable_serverdrawable[i].value =
25242+ (void *) serverdrawable;
25243+ } else
25244+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
25245+}
25246+
25247+static void _get_window_pos(Display *dpy, Window win, WindowPosStruct *pos)
25248+{
25249+ XWindowAttributes window_attributes_return;
25250+ Window child;
25251+ int x, y;
25252+ Window root = DefaultRootWindow(dpy);
25253+
25254+ XGetWindowAttributes(dpy, win, &window_attributes_return);
25255+ XTranslateCoordinates(dpy, win, root, 0, 0, &x, &y, &child);
25256+ /* printf("%d %d %d %d\n", x, y, window_attributes_return.width,
25257+ * window_attributes_return.height); */
25258+ pos->x = x;
25259+ pos->y = y;
25260+ pos->width = window_attributes_return.width;
25261+ pos->height = window_attributes_return.height;
25262+ pos->map_state = window_attributes_return.map_state;
25263+}
25264+
25265+static int is_gl_vendor_ati(Display *dpy)
25266+{
25267+ static int is_gl_vendor_ati_flag = 0;
25268+ static int has_init = 0;
25269+
25270+ if (has_init == 0) {
25271+ has_init = 1;
25272+ is_gl_vendor_ati_flag =
25273+ (strncmp(glXGetClientString(dpy, GLX_VENDOR), "ATI", 3) == 0);
25274+ }
25275+ return is_gl_vendor_ati_flag;
25276+}
25277+
25278+static int get_server_texture(ProcessStruct *process,
25279+ unsigned int client_texture)
25280+{
25281+ unsigned int server_texture = 0;
25282+
25283+ if (client_texture < 32768) {
25284+ server_texture = process->current_state->tabTextures[client_texture];
25285+ } else {
25286+ fprintf(stderr, "invalid texture name %d\n", client_texture);
25287+ }
25288+ return server_texture;
25289+}
25290+
25291+static int get_server_buffer(ProcessStruct *process,
25292+ unsigned int client_buffer)
25293+{
25294+ unsigned int server_buffer = 0;
25295+
25296+ if (client_buffer < 32768) {
25297+ server_buffer = process->current_state->tabBuffers[client_buffer];
25298+ } else {
25299+ fprintf(stderr, "invalid buffer name %d\n", client_buffer);
25300+ }
25301+ return server_buffer;
25302+}
25303+
25304+
25305+static int get_server_list(ProcessStruct *process, unsigned int client_list)
25306+{
25307+ unsigned int server_list = 0;
25308+
25309+ if (client_list < 32768) {
25310+ server_list = process->current_state->tabLists[client_list];
25311+ } else {
25312+ fprintf(stderr, "invalid list name %d\n", client_list);
25313+ }
25314+ return server_list;
25315+}
25316+
25317+GLXFBConfig get_fbconfig(ProcessStruct *process, int client_fbconfig)
25318+{
25319+ int i;
25320+ int nbtotal = 0;
25321+
25322+ for (i = 0; i < process->nfbconfig; i++) {
25323+ assert(client_fbconfig >= 1 + nbtotal);
25324+ if (client_fbconfig <= nbtotal + process->fbconfigs_max[i]) {
25325+ return process->fbconfigs[i][client_fbconfig - 1 - nbtotal];
25326+ }
25327+ nbtotal += process->fbconfigs_max[i];
25328+ }
25329+ return 0;
25330+}
25331+
25332+typedef struct {
25333+ int attribListLength;
25334+ int *attribList;
25335+ XVisualInfo *visInfo;
25336+} AssocAttribListVisual;
25337+
25338+static int nTabAssocAttribListVisual = 0;
25339+static AssocAttribListVisual *tabAssocAttribListVisual = NULL;
25340+
25341+static int _compute_length_of_attrib_list_including_zero(const int *attribList,
25342+ int
25343+ booleanMustHaveValue)
25344+{
25345+ int i = 0;
25346+
25347+ while (attribList[i]) {
25348+ if (booleanMustHaveValue ||
25349+ !(attribList[i] == GLX_USE_GL || attribList[i] == GLX_RGBA ||
25350+ attribList[i] == GLX_DOUBLEBUFFER ||
25351+ attribList[i] == GLX_STEREO)) {
25352+ i += 2;
25353+ } else {
25354+ i++;
25355+ }
25356+ }
25357+ return i + 1;
25358+}
25359+
25360+static int glXChooseVisualFunc(Display *dpy, const int *_attribList)
25361+{
25362+ if (_attribList == NULL)
25363+ return 0;
25364+ int attribListLength =
25365+ _compute_length_of_attrib_list_including_zero(_attribList, 0);
25366+ int i;
25367+
25368+ int *attribList = malloc(sizeof(int) * attribListLength);
25369+ memcpy(attribList, _attribList, sizeof(int) * attribListLength);
25370+
25371+ i = 0;
25372+ while (attribList[i]) {
25373+ if (!
25374+ (attribList[i] == GLX_USE_GL || attribList[i] == GLX_RGBA ||
25375+ attribList[i] == GLX_DOUBLEBUFFER ||
25376+ attribList[i] == GLX_STEREO)) {
25377+ if (attribList[i] == GLX_SAMPLE_BUFFERS && attribList[i + 1] != 0
25378+ && getenv("DISABLE_SAMPLE_BUFFERS")) {
25379+ fprintf(stderr, "Disabling GLX_SAMPLE_BUFFERS\n");
25380+ attribList[i + 1] = 0;
25381+ }
25382+ i += 2;
25383+ } else {
25384+ i++;
25385+ }
25386+ }
25387+
25388+ for (i = 0; i < nTabAssocAttribListVisual; i++) {
25389+ if (tabAssocAttribListVisual[i].attribListLength == attribListLength
25390+ && memcmp(tabAssocAttribListVisual[i].attribList, attribList,
25391+ attribListLength * sizeof(int)) == 0) {
25392+ free(attribList);
25393+ return (tabAssocAttribListVisual[i].
25394+ visInfo) ? tabAssocAttribListVisual[i].visInfo->
25395+ visualid : 0;
25396+ }
25397+ }
25398+ XVisualInfo *visInfo = glXChooseVisual(dpy, 0, attribList);
25399+
25400+ tabAssocAttribListVisual = realloc(
25401+ tabAssocAttribListVisual, sizeof(AssocAttribListVisual) *
25402+ (nTabAssocAttribListVisual + 1));
25403+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribListLength =
25404+ attribListLength;
25405+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList =
25406+ (int *) malloc(sizeof(int) * attribListLength);
25407+ memcpy(tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList,
25408+ attribList, sizeof(int) * attribListLength);
25409+ tabAssocAttribListVisual[nTabAssocAttribListVisual].visInfo = visInfo;
25410+ nTabAssocAttribListVisual++;
25411+ free(attribList);
25412+ return (visInfo) ? visInfo->visualid : 0;
25413+}
25414+
25415+static XVisualInfo *get_visual_info_from_visual_id(Display *dpy,
25416+ int visualid)
25417+{
25418+ int i, n;
25419+ XVisualInfo template;
25420+ XVisualInfo *visInfo;
25421+
25422+ for (i = 0; i < nTabAssocAttribListVisual; i++) {
25423+ if (tabAssocAttribListVisual[i].visInfo &&
25424+ tabAssocAttribListVisual[i].visInfo->visualid == visualid) {
25425+ return tabAssocAttribListVisual[i].visInfo;
25426+ }
25427+ }
25428+ template.visualid = visualid;
25429+ visInfo = XGetVisualInfo(dpy, VisualIDMask, &template, &n);
25430+ tabAssocAttribListVisual =
25431+ realloc(tabAssocAttribListVisual,
25432+ sizeof(AssocAttribListVisual) * (nTabAssocAttribListVisual +
25433+ 1));
25434+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribListLength = 0;
25435+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList = NULL;
25436+ tabAssocAttribListVisual[nTabAssocAttribListVisual].visInfo = visInfo;
25437+ nTabAssocAttribListVisual++;
25438+ return visInfo;
25439+}
25440+
25441+typedef struct {
25442+ int x;
25443+ int y;
25444+ int width;
25445+ int height;
25446+ int xhot;
25447+ int yhot;
25448+ int *pixels;
25449+} ClientCursor;
25450+
25451+#if 0
25452+static ClientCursor client_cursor = { 0 };
25453+#endif
25454+
25455+static void do_glClientActiveTextureARB(int texture)
25456+{
25457+ GET_EXT_PTR_NO_FAIL(void, glClientActiveTextureARB, (int));
25458+
25459+ if (ptr_func_glClientActiveTextureARB) {
25460+ ptr_func_glClientActiveTextureARB(texture);
25461+ }
25462+}
25463+
25464+#ifdef CURSOR_TRICK
25465+static void do_glActiveTextureARB(int texture)
25466+{
25467+ GET_EXT_PTR_NO_FAIL(void, glActiveTextureARB, (int));
25468+
25469+ if (ptr_func_glActiveTextureARB) {
25470+ ptr_func_glActiveTextureARB(texture);
25471+ }
25472+}
25473+
25474+static void do_glUseProgramObjectARB(GLhandleARB programObj)
25475+{
25476+ GET_EXT_PTR_NO_FAIL(void, glUseProgramObjectARB, (GLhandleARB));
25477+
25478+ if (ptr_func_glUseProgramObjectARB) {
25479+ ptr_func_glUseProgramObjectARB(programObj);
25480+ }
25481+}
25482+#endif
25483+
25484+static void destroy_gl_state(GLState *state)
25485+{
25486+ int i;
25487+
25488+ if (state->vertexPointer)
25489+ free(state->vertexPointer);
25490+ if (state->normalPointer)
25491+ free(state->normalPointer);
25492+ if (state->indexPointer)
25493+ free(state->indexPointer);
25494+ if (state->colorPointer)
25495+ free(state->colorPointer);
25496+ if (state->secondaryColorPointer)
25497+ free(state->secondaryColorPointer);
25498+ for (i = 0; i < NB_MAX_TEXTURES; i++) {
25499+ if (state->texCoordPointer[i])
25500+ free(state->texCoordPointer[i]);
25501+ }
25502+ for (i = 0; i < MY_GL_MAX_VERTEX_ATTRIBS_ARB; i++) {
25503+ if (state->vertexAttribPointer[i])
25504+ free(state->vertexAttribPointer[i]);
25505+ }
25506+ for (i = 0; i < MY_GL_MAX_VERTEX_ATTRIBS_NV; i++) {
25507+ if (state->vertexAttribPointerNV[i])
25508+ free(state->vertexAttribPointerNV[i]);
25509+ }
25510+ if (state->weightPointer)
25511+ free(state->weightPointer);
25512+ if (state->matrixIndexPointer)
25513+ free(state->matrixIndexPointer);
25514+ if (state->fogCoordPointer)
25515+ free(state->fogCoordPointer);
25516+ for (i = 0; i < MY_GL_MAX_VARIANT_POINTER_EXT; i++) {
25517+ if (state->variantPointerEXT[i])
25518+ free(state->variantPointerEXT[i]);
25519+ }
25520+ if (state->interleavedArrays)
25521+ free(state->interleavedArrays);
25522+ if (state->elementPointerATI)
25523+ free(state->elementPointerATI);
25524+}
25525+
25526+static void init_gl_state(GLState *state)
25527+{
25528+ state->textureAllocator = &state->ownTextureAllocator;
25529+ state->tabTextures = state->ownTabTextures;
25530+ state->bufferAllocator = &state->ownBufferAllocator;
25531+ state->tabBuffers = state->ownTabBuffers;
25532+ state->listAllocator = &state->ownListAllocator;
25533+ state->tabLists = state->ownTabLists;
25534+}
25535+
25536+/*
25537+ * Translate the nth element of list from type to GLuint.
25538+ */
25539+static GLuint translate_id(GLsizei n, GLenum type, const GLvoid *list)
25540+{
25541+ GLbyte *bptr;
25542+ GLubyte *ubptr;
25543+ GLshort *sptr;
25544+ GLushort *usptr;
25545+ GLint *iptr;
25546+ GLuint *uiptr;
25547+ GLfloat *fptr;
25548+
25549+ switch (type) {
25550+ case GL_BYTE:
25551+ bptr = (GLbyte *) list;
25552+ return (GLuint) *(bptr + n);
25553+ case GL_UNSIGNED_BYTE:
25554+ ubptr = (GLubyte *) list;
25555+ return (GLuint) *(ubptr + n);
25556+ case GL_SHORT:
25557+ sptr = (GLshort *) list;
25558+ return (GLuint) *(sptr + n);
25559+ case GL_UNSIGNED_SHORT:
25560+ usptr = (GLushort *) list;
25561+ return (GLuint) *(usptr + n);
25562+ case GL_INT:
25563+ iptr = (GLint *) list;
25564+ return (GLuint) *(iptr + n);
25565+ case GL_UNSIGNED_INT:
25566+ uiptr = (GLuint *) list;
25567+ return (GLuint) *(uiptr + n);
25568+ case GL_FLOAT:
25569+ fptr = (GLfloat *) list;
25570+ return (GLuint) *(fptr + n);
25571+ case GL_2_BYTES:
25572+ ubptr = ((GLubyte *) list) + 2 * n;
25573+ return (GLuint) *ubptr * 256 + (GLuint) *(ubptr + 1);
25574+ case GL_3_BYTES:
25575+ ubptr = ((GLubyte *) list) + 3 * n;
25576+ return (GLuint) *ubptr * 65536 + (GLuint) *(ubptr + 1) * 256 +
25577+ (GLuint) *(ubptr + 2);
25578+ case GL_4_BYTES:
25579+ ubptr = ((GLubyte *) list) + 4 * n;
25580+ return (GLuint) *ubptr * 16777216 + (GLuint) *(ubptr + 1) * 65536 +
25581+ (GLuint) *(ubptr + 2) * 256 + (GLuint) *(ubptr + 3);
25582+ default:
25583+ return 0;
25584+ }
25585+}
25586+
25587+void _create_context(ProcessStruct *process, GLXContext ctxt, int fake_ctxt,
25588+ GLXContext shareList, int fake_shareList)
25589+{
25590+ process->glstates =
25591+ realloc(process->glstates,
25592+ (process->nb_states + 1) * sizeof(GLState *));
25593+ process->glstates[process->nb_states] = malloc(sizeof(GLState));
25594+ memset(process->glstates[process->nb_states], 0, sizeof(GLState));
25595+ process->glstates[process->nb_states]->ref = 1;
25596+ process->glstates[process->nb_states]->context = ctxt;
25597+ process->glstates[process->nb_states]->fake_ctxt = fake_ctxt;
25598+ process->glstates[process->nb_states]->fake_shareList = fake_shareList;
25599+ init_gl_state(process->glstates[process->nb_states]);
25600+ if (shareList && fake_shareList) {
25601+ int i;
25602+
25603+ for (i = 0; i < process->nb_states; i++) {
25604+ if (process->glstates[i]->fake_ctxt == fake_shareList) {
25605+ process->glstates[i]->ref++;
25606+ process->glstates[process->nb_states]->textureAllocator =
25607+ process->glstates[i]->textureAllocator;
25608+ process->glstates[process->nb_states]->tabTextures =
25609+ process->glstates[i]->tabTextures;
25610+ process->glstates[process->nb_states]->bufferAllocator =
25611+ process->glstates[i]->bufferAllocator;
25612+ process->glstates[process->nb_states]->tabBuffers =
25613+ process->glstates[i]->tabBuffers;
25614+ process->glstates[process->nb_states]->listAllocator =
25615+ process->glstates[i]->listAllocator;
25616+ process->glstates[process->nb_states]->tabLists =
25617+ process->glstates[i]->tabLists;
25618+ break;
25619+ }
25620+ }
25621+ }
25622+ process->nb_states++;
25623+}
25624+
25625+static ProcessStruct *process;
25626+
25627+void do_disconnect_current(void)
25628+{
25629+ int i;
25630+ Display *dpy = process->dpy;
25631+
25632+ glXMakeCurrent(dpy, 0, NULL);
25633+
25634+ for (i = 0; i < MAX_ASSOC_SIZE &&
25635+ process->association_fakecontext_glxcontext[i].key; i ++) {
25636+ GLXContext ctxt = process->association_fakecontext_glxcontext[i].value;
25637+
25638+ fprintf(stderr, "Destroy context corresponding to fake_context"
25639+ " = %ld\n", (long) process->
25640+ association_fakecontext_glxcontext[i].key);
25641+ glXDestroyContext(dpy, ctxt);
25642+ }
25643+
25644+ GET_EXT_PTR(void, glXDestroyPbuffer, (Display *, GLXPbuffer));
25645+
25646+ for (i = 0; i < MAX_ASSOC_SIZE &&
25647+ process->association_fakepbuffer_pbuffer[i].key; i ++) {
25648+ GLXPbuffer pbuffer = (GLXPbuffer)
25649+ process->association_fakepbuffer_pbuffer[i].value;
25650+
25651+ fprintf(stderr, "Destroy pbuffer corresponding to fake_pbuffer"
25652+ " = %ld\n", (long) process->
25653+ association_fakepbuffer_pbuffer[i].key);
25654+ if (!is_gl_vendor_ati(dpy))
25655+ ptr_func_glXDestroyPbuffer(dpy, pbuffer);
25656+ }
25657+
25658+ for (i = 0; i < MAX_ASSOC_SIZE && process->
25659+ association_clientdrawable_serverdrawable[i].key; i ++) {
25660+ Window win = (Window) process->
25661+ association_clientdrawable_serverdrawable[i].value;
25662+
25663+ fprintf(stderr, "Destroy window %x corresponding to client_drawable "
25664+ "= %p\n", (int) win, process->
25665+ association_clientdrawable_serverdrawable[i].key);
25666+
25667+ XDestroyWindow(dpy, win);
25668+ if (active_win == win)
25669+ active_win = 0;
25670+
25671+ int loop = 1; // 1;
25672+ while (loop) {
25673+ while (XPending(dpy) > 0) {
25674+ XEvent event;
25675+
25676+ XNextEvent(dpy, &event);
25677+ switch (event.type) {
25678+ case DestroyNotify:
25679+ {
25680+ if (((XDestroyWindowEvent *) &event)->window == win)
25681+ loop = 0;
25682+ break;
25683+ }
25684+ }
25685+ }
25686+ break; /* TODO */
25687+ }
25688+ }
25689+
25690+ for (i = 0; i < process->nb_states; i++) {
25691+ destroy_gl_state(process->glstates[i]);
25692+ free(process->glstates[i]);
25693+ }
25694+ destroy_gl_state(&process->default_state);
25695+ free(process->glstates);
25696+
25697+ if (process->cmdbuf)
25698+ qemu_free(process->cmdbuf);
25699+
25700+ for (i = 0; &processes[i] != process; i ++);
25701+ memmove(&processes[i], &processes[i + 1],
25702+ (MAX_HANDLED_PROCESS - 1 - i) * sizeof(ProcessStruct));
25703+}
25704+
25705+static const int beginend_allowed[GL_N_CALLS] = {
25706+#undef MAGIC_MACRO
25707+#define MAGIC_MACRO(name) [name ## _func] = 1,
25708+#include "gl_beginend.h"
25709+};
25710+
25711+void do_context_switch(Display *dpy, pid_t pid, int call)
25712+{
25713+ int i;
25714+
25715+ for (i = 0; i < MAX_HANDLED_PROCESS; i ++)
25716+ if (processes[i].process_id == pid) {
25717+ process = &processes[i];
25718+ break;
25719+ } else if (processes[i].process_id == 0) {
25720+ process = &processes[i];
25721+ memset(process, 0, sizeof(ProcessStruct));
25722+ process->process_id = pid;
25723+ init_gl_state(&process->default_state);
25724+ process->current_state = &process->default_state;
25725+ process->dpy = dpy;
25726+ break;
25727+ }
25728+ if (process == NULL) {
25729+ fprintf(stderr, "Too many processes !\n");
25730+ exit(-1);
25731+ }
25732+
25733+ switch (call) {
25734+ case _init32_func:
25735+ case _init64_func:
25736+ case _exit_process_func:
25737+ case glXMakeCurrent_func:
25738+ /* Do nothing */
25739+ break;
25740+
25741+ default:
25742+#if 0
25743+ glFlush();
25744+ glFinish();
25745+ glXSwapBuffers(dpy, drawable);
25746+ if (process->current_state == &process->default_state)
25747+ /* Where do commands like glViewport go when no drawable or
25748+ * context are current - i.e. after a call to
25749+ * glXMakeCurrent(dpy, 0, 0) ? */;
25750+ else
25751+#endif
25752+ glXMakeCurrent(dpy, process->current_state->drawable,
25753+ process->current_state->context);
25754+ }
25755+}
25756+
25757+int do_function_call(int func_number, arg_t *args, char *ret_string)
25758+{
25759+ char ret_char = 0;
25760+ int ret_int = 0;
25761+ const char *ret_str = NULL;
25762+ Display *dpy = process->dpy;
25763+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
25764+ int ret_type = signature->ret_type;
25765+
25766+ if (parent_dpy)
25767+ dpy = parent_dpy;
25768+
25769+ process->instr_counter++;
25770+ if (display_function_call)
25771+ fprintf(stderr, "[%d]> %s\n", process->instr_counter,
25772+ tab_opengl_calls_name[func_number]);
25773+
25774+#ifdef BUFFER_BEGINEND
25775+ if (process->began) {
25776+ /* Need to check for any errors now because later we won't have
25777+ * a chance to report them. */
25778+ if (beginend_allowed[func_number]) {
25779+ arg_t *buf = cmd_buffer_alloc(process, signature->nb_args + 1);
25780+
25781+ /* TODO: pointer arguments */
25782+ buf[0] = func_number;
25783+ memcpy(buf + 1, args, signature->nb_args * sizeof(arg_t));
25784+ } else if (likely(func_number == glEnd_func)) {
25785+ process->began = 0;
25786+
25787+ glBegin(process->primitive);
25788+ cmd_buffer_replay(process);
25789+ glEnd();
25790+ } else {
25791+ /* TODO: properly report */
25792+#ifdef SYSTEMATIC_ERROR_CHECK
25793+ process->current_state->last_error = INVALID_OPERATION;
25794+#endif
25795+ }
25796+
25797+ func_number = -1;
25798+ }
25799+#endif
25800+
25801+ switch (func_number) {
25802+ case -1:
25803+ break;
25804+
25805+ case _init_func:
25806+ *(int *) args[1] = 1;
25807+ break;
25808+
25809+ case _synchronize_func:
25810+ ret_int = 1;
25811+ break;
25812+
25813+ case _exit_process_func:
25814+ do_disconnect_current();
25815+ break;
25816+
25817+ case _changeWindowState_func:
25818+ {
25819+ ClientGLXDrawable client_drawable = to_drawable(args[0]);
25820+
25821+ if (display_function_call)
25822+ fprintf(stderr, "client_drawable=%p\n",
25823+ (void *) client_drawable);
25824+
25825+ GLXDrawable drawable =
25826+ get_association_clientdrawable_serverdrawable(
25827+ process, client_drawable);
25828+ if (drawable) {
25829+ if (args[1] == IsViewable) {
25830+ WindowPosStruct pos;
25831+
25832+ _get_window_pos(dpy, drawable, &pos);
25833+ if (pos.map_state != args[1]) {
25834+ XMapWindow(dpy, drawable);
25835+
25836+ int loop = 1; // 1;
25837+
25838+ while (loop) {
25839+ while (XPending(dpy) > 0) {
25840+ XEvent event;
25841+
25842+ XNextEvent(dpy, &event);
25843+ switch (event.type) {
25844+ case ConfigureNotify:
25845+ {
25846+ if (((XConfigureEvent *) &event)->
25847+ window == drawable) {
25848+ loop = 0;
25849+ }
25850+ break;
25851+ }
25852+ }
25853+ }
25854+ break; /* TODO */
25855+ }
25856+ }
25857+ }
25858+ }
25859+
25860+ break;
25861+ }
25862+
25863+ case _moveResizeWindow_func:
25864+ {
25865+ int *params = (int *) args[1];
25866+ ClientGLXDrawable client_drawable = to_drawable(args[0]);
25867+
25868+ if (display_function_call)
25869+ fprintf(stderr, "client_drawable=%p\n",
25870+ (void *) client_drawable);
25871+
25872+ GLXDrawable drawable =
25873+ get_association_clientdrawable_serverdrawable(
25874+ process, client_drawable);
25875+ if (drawable) {
25876+ WindowPosStruct pos;
25877+
25878+ _get_window_pos(dpy, drawable, &pos);
25879+ if (!
25880+ (params[0] == pos.x && params[1] == pos.y &&
25881+ params[2] == pos.width && params[3] == pos.height)) {
25882+ int redim = !(params[2] == pos.width &&
25883+ params[3] == pos.height);
25884+ active_win_x = params[0];
25885+ active_win_y = params[1];
25886+
25887+ fprintf(stderr, "old x=%d y=%d width=%d height=%d\n",
25888+ pos.x, pos.y, pos.width, pos.height);
25889+ fprintf(stderr, "new x=%d y=%d width=%d height=%d\n",
25890+ params[0], params[1], params[2], params[3]);
25891+ XMoveResizeWindow(dpy, drawable, params[0], params[1],
25892+ params[2], params[3]);
25893+ int loop = 0; // = 1
25894+
25895+ while (loop) {
25896+ while (XPending(dpy) > 0) {
25897+ XEvent event;
25898+
25899+ XNextEvent(dpy, &event);
25900+ switch (event.type) {
25901+ case ConfigureNotify:
25902+ {
25903+ if (((XConfigureEvent *) &event)->
25904+ window == drawable) {
25905+ loop = 0;
25906+ }
25907+ break;
25908+ }
25909+ }
25910+ }
25911+ }
25912+ /* The window should have resized by now, but force the
25913+ * new size anyway. */
25914+ _get_window_pos(dpy, drawable, &pos);
25915+ pos.width = params[2];
25916+ pos.height = params[3];
25917+ process->currentDrawablePos = pos;
25918+ // if (getenv("FORCE_GL_VIEWPORT"))
25919+ if (redim)
25920+ glViewport(0, 0, pos.width, pos.height);
25921+ }
25922+ }
25923+ break;
25924+ }
25925+
25926+ case _send_cursor_func:
25927+ {
25928+#if 0
25929+ int x = args[0];
25930+ int y = args[1];
25931+ int width = args[2];
25932+ int height = args[3];
25933+ int xhot = args[4];
25934+ int yhot = args[5];
25935+ int *pixels = (int *) args[6];
25936+
25937+ client_cursor.x = x;
25938+ client_cursor.y = y;
25939+ client_cursor.width = width;
25940+ client_cursor.height = height;
25941+ client_cursor.xhot = xhot;
25942+ client_cursor.yhot = yhot;
25943+ if (pixels) {
25944+ client_cursor.pixels =
25945+ realloc(client_cursor.pixels,
25946+ client_cursor.width * client_cursor.height *
25947+ sizeof(int));
25948+ memcpy(client_cursor.pixels, pixels,
25949+ client_cursor.width * client_cursor.height *
25950+ sizeof(int));
25951+ }
25952+ int in_window = (x >= 0 && y >= 0 &&
25953+ x < process->currentDrawablePos.width &&
25954+ y < process->currentDrawablePos.height);
25955+ // fprintf(stderr, "cursor at %d %d (%s)\n", x, y, (in_window) ?
25956+ // "in window" : "not in window");
25957+#endif
25958+ break;
25959+ }
25960+
25961+#ifdef BUFFER_BEGINEND
25962+ case glBegin_func:
25963+ process->began = 1;
25964+ process->primitive = args[0];
25965+ break;
25966+#endif
25967+
25968+ case glXWaitGL_func:
25969+ {
25970+ glXWaitGL();
25971+ ret_int = 0;
25972+ break;
25973+ }
25974+
25975+ case glXWaitX_func:
25976+ {
25977+ glXWaitX();
25978+ ret_int = 0;
25979+ break;
25980+ }
25981+
25982+ case glXChooseVisual_func:
25983+ {
25984+ ret_int = glXChooseVisualFunc(dpy, (int *) args[2]);
25985+ break;
25986+ }
25987+
25988+ case glXQueryExtensionsString_func:
25989+ {
25990+ ret_str = glXQueryExtensionsString(dpy, 0);
25991+ break;
25992+ }
25993+
25994+ case glXQueryServerString_func:
25995+ {
25996+ ret_str = glXQueryServerString(dpy, 0, args[2]);
25997+ break;
25998+ }
25999+
26000+ case glXGetClientString_func:
26001+ {
26002+ ret_str = glXGetClientString(dpy, args[1]);
26003+ break;
26004+ }
26005+
26006+ case glXGetScreenDriver_func:
26007+ {
26008+ GET_EXT_PTR(const char *, glXGetScreenDriver, (Display *, int));
26009+
26010+ ret_str = ptr_func_glXGetScreenDriver(dpy, 0);
26011+ break;
26012+ }
26013+
26014+ case glXGetDriverConfig_func:
26015+ {
26016+ GET_EXT_PTR(const char *, glXGetDriverConfig, (const char *));
26017+
26018+ ret_str = ptr_func_glXGetDriverConfig((const char *) args[0]);
26019+ break;
26020+ }
26021+
26022+ case glXCreateContext_func:
26023+ {
26024+ int visualid = (int) args[1];
26025+ int fake_shareList = (int) args[2];
26026+
26027+ if (1 || display_function_call)
26028+ fprintf(stderr, "visualid=%d, fake_shareList=%d\n", visualid,
26029+ fake_shareList);
26030+
26031+ GLXContext shareList = get_association_fakecontext_glxcontext(
26032+ process, fake_shareList);
26033+ XVisualInfo *vis = get_visual_info_from_visual_id(dpy, visualid);
26034+ GLXContext ctxt;
26035+
26036+ if (vis) {
26037+ ctxt = glXCreateContext(dpy, vis, shareList, args[3]);
26038+ } else {
26039+ vis = get_default_visual(dpy);
26040+ int saved_visualid = vis->visualid;
26041+
26042+ vis->visualid = visualid ?: saved_visualid;
26043+ ctxt = glXCreateContext(dpy, vis, shareList, args[3]);
26044+ vis->visualid = saved_visualid;
26045+ }
26046+
26047+ if (ctxt) {
26048+ int fake_ctxt =++ process->next_available_context_number;
26049+
26050+ set_association_fakecontext_visual(process, fake_ctxt, vis);
26051+ set_association_fakecontext_glxcontext(process,
26052+ fake_ctxt, ctxt);
26053+ ret_int = fake_ctxt;
26054+
26055+ _create_context(process, ctxt, fake_ctxt, shareList,
26056+ fake_shareList);
26057+ } else {
26058+ ret_int = 0;
26059+ }
26060+
26061+ break;
26062+ }
26063+
26064+
26065+ case glXCreateNewContext_func:
26066+ {
26067+ GET_EXT_PTR(GLXContext, glXCreateNewContext,
26068+ (Display *, GLXFBConfig, int, GLXContext, int));
26069+ int client_fbconfig = args[1];
26070+
26071+ ret_int = 0;
26072+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26073+
26074+ if (fbconfig) {
26075+ int fake_shareList = args[3];
26076+ GLXContext shareList = get_association_fakecontext_glxcontext(
26077+ process, fake_shareList);
26078+ process->next_available_context_number++;
26079+ int fake_ctxt = process->next_available_context_number;
26080+ GLXContext ctxt = ptr_func_glXCreateNewContext(
26081+ dpy, fbconfig, args[2], shareList, args[4]);
26082+ set_association_fakecontext_glxcontext(
26083+ process, fake_ctxt, ctxt);
26084+ ret_int = fake_ctxt;
26085+
26086+ _create_context(process, ctxt, fake_ctxt, shareList,
26087+ fake_shareList);
26088+ }
26089+ break;
26090+ }
26091+
26092+ case glXCopyContext_func:
26093+ {
26094+ int fake_src_ctxt = (int) args[1];
26095+ int fake_dst_ctxt = (int) args[2];
26096+ GLXContext src_ctxt;
26097+ GLXContext dst_ctxt;
26098+
26099+ if (display_function_call)
26100+ fprintf(stderr, "fake_src_ctxt=%i, fake_dst_ctxt=%i\n",
26101+ fake_src_ctxt, fake_dst_ctxt);
26102+
26103+ if (!(src_ctxt = get_association_fakecontext_glxcontext(
26104+ process, fake_src_ctxt)))
26105+ fprintf(stderr, "invalid fake_src_ctxt (%i) !\n",
26106+ fake_src_ctxt);
26107+ else
26108+ if (!(dst_ctxt = get_association_fakecontext_glxcontext(
26109+ process, fake_dst_ctxt))) {
26110+ fprintf(stderr, "invalid fake_dst_ctxt (%i) !\n",
26111+ fake_dst_ctxt);
26112+ } else
26113+ glXCopyContext(dpy, src_ctxt, dst_ctxt, args[3]);
26114+
26115+ break;
26116+ }
26117+
26118+ case glXDestroyContext_func:
26119+ {
26120+ int fake_ctxt = (int) args[1];
26121+
26122+ if (display_function_call)
26123+ fprintf(stderr, "fake_ctxt=%d\n", fake_ctxt);
26124+
26125+ GLXContext ctxt = get_association_fakecontext_glxcontext(
26126+ process, fake_ctxt);
26127+ if (ctxt == NULL) {
26128+ fprintf(stderr, "invalid fake_ctxt (%p) !\n",
26129+ (void *) (long) fake_ctxt);
26130+ } else {
26131+ int i;
26132+
26133+ for (i = 0; i < process->nb_states; i ++) {
26134+ if (process->glstates[i]->fake_ctxt == fake_ctxt) {
26135+ if (ctxt == process->current_state->context)
26136+ process->current_state = &process->default_state;
26137+
26138+ int fake_shareList =
26139+ process->glstates[i]->fake_shareList;
26140+ process->glstates[i]->ref--;
26141+ if (process->glstates[i]->ref == 0) {
26142+ fprintf(stderr,
26143+ "destroy_gl_state fake_ctxt = %d\n",
26144+ process->glstates[i]->fake_ctxt);
26145+ destroy_gl_state(process->glstates[i]);
26146+ free(process->glstates[i]);
26147+ memmove(&process->glstates[i],
26148+ &process->glstates[i + 1],
26149+ (process->nb_states - i - 1) *
26150+ sizeof(GLState *));
26151+ process->nb_states --;
26152+ }
26153+
26154+ if (fake_shareList) {
26155+ for (i = 0; i < process->nb_states; i++) {
26156+ if (process->glstates[i]->fake_ctxt ==
26157+ fake_shareList) {
26158+ process->glstates[i]->ref--;
26159+ if (process->glstates[i]->ref == 0) {
26160+ fprintf(stderr,
26161+ "destroy_gl_state fake_ctxt = %d\n",
26162+ process->glstates[i]->
26163+ fake_ctxt);
26164+ destroy_gl_state(process->
26165+ glstates[i]);
26166+ free(process->glstates[i]);
26167+ memmove(&process->glstates[i],
26168+ &process->glstates[i + 1],
26169+ (process->nb_states - i - 1) *
26170+ sizeof(GLState *));
26171+ process->nb_states --;
26172+ }
26173+ break;
26174+ }
26175+ }
26176+ }
26177+
26178+ glXDestroyContext(dpy, ctxt);
26179+ unset_association_fakecontext_glxcontext(
26180+ process, fake_ctxt);
26181+
26182+ break;
26183+ }
26184+ }
26185+ }
26186+ break;
26187+ }
26188+
26189+ case glXQueryVersion_func:
26190+ {
26191+ ret_int = glXQueryVersion(dpy, (int *) args[1], (int *) args[2]);
26192+ break;
26193+ }
26194+
26195+ case glGetString_func:
26196+ {
26197+ ret_str = (char *) glGetString(args[0]);
26198+ break;
26199+ }
26200+
26201+ case glXMakeCurrent_func:
26202+ {
26203+ int i;
26204+ ClientGLXDrawable client_drawable = to_drawable(args[1]);
26205+ GLXDrawable drawable = 0;
26206+ int fake_ctxt = (int) args[2];
26207+
26208+ if (display_function_call)
26209+ fprintf(stderr, "client_drawable=%p fake_ctx=%d\n",
26210+ (void *) client_drawable, fake_ctxt);
26211+
26212+ if (client_drawable == 0 && fake_ctxt == 0) {
26213+ ret_int = glXMakeCurrent(dpy, 0, NULL);
26214+ process->current_state = &process->default_state;
26215+ } else if ((drawable = (GLXDrawable)
26216+ get_association_fakepbuffer_pbuffer(
26217+ process, client_drawable))) {
26218+ GLXContext ctxt = get_association_fakecontext_glxcontext(
26219+ process, fake_ctxt);
26220+ if (ctxt == NULL) {
26221+ fprintf(stderr, "invalid fake_ctxt (%d) (*)!\n",
26222+ fake_ctxt);
26223+ ret_int = 0;
26224+ } else
26225+ ret_int = glXMakeCurrent(dpy, drawable, ctxt);
26226+ } else {
26227+ GLXContext ctxt = get_association_fakecontext_glxcontext(
26228+ process, fake_ctxt);
26229+ if (ctxt == NULL) {
26230+ fprintf(stderr, "invalid fake_ctxt (%d)!\n", fake_ctxt);
26231+ ret_int = 0;
26232+ } else {
26233+ drawable = get_association_clientdrawable_serverdrawable(
26234+ process, client_drawable);
26235+ if (drawable == 0) {
26236+ XVisualInfo *vis = get_association_fakecontext_visual(
26237+ process, fake_ctxt);
26238+ if (vis == NULL)
26239+ vis = get_default_visual(dpy);
26240+ /* if (local_connection) drawable = client_drawable;
26241+ * else */
26242+ {
26243+ if ((int) (long) client_drawable ==
26244+ RootWindow(dpy, 0) &&
26245+ local_connection) {
26246+ drawable = (GLXDrawable) client_drawable;
26247+ } else {
26248+ drawable = create_window(
26249+ dpy, local_connection ?
26250+ (Window) client_drawable :
26251+ 0, vis, "", 0, 0, 16, 16);
26252+ }
26253+ }
26254+ set_association_clientdrawable_serverdrawable(process,
26255+ client_drawable, drawable);
26256+ }
26257+
26258+ ret_int = glXMakeCurrent(dpy, drawable, ctxt);
26259+ }
26260+ }
26261+
26262+ if (ret_int) {
26263+ for (i = 0; i < process->nb_states; i ++) {
26264+ if (process->glstates[i]->fake_ctxt == fake_ctxt) {
26265+ /* HACK !!! REMOVE */
26266+ process->current_state = process->glstates[i];
26267+ process->current_state->drawable = drawable;
26268+ break;
26269+ }
26270+ }
26271+
26272+ if (i == process->nb_states) {
26273+ fprintf(stderr, "error remembering the new context\n");
26274+ exit(-1);
26275+ }
26276+ }
26277+ break;
26278+ }
26279+
26280+ case glXSwapBuffers_func:
26281+ {
26282+ ClientGLXDrawable client_drawable = to_drawable(args[1]);
26283+
26284+ if (display_function_call)
26285+ fprintf(stderr, "client_drawable=%p\n", client_drawable);
26286+
26287+ GLXDrawable drawable =
26288+ get_association_clientdrawable_serverdrawable(
26289+ process, client_drawable);
26290+ if (!drawable) {
26291+ fprintf(stderr, "unknown client_drawable (%p) !\n",
26292+ (void *) client_drawable);
26293+ } else {
26294+#ifdef CURSOR_TRICK
26295+ if (client_cursor.pixels && local_connection == 0) {
26296+ glPushAttrib(GL_ALL_ATTRIB_BITS);
26297+ glPushClientAttrib(GL_ALL_ATTRIB_BITS);
26298+
26299+ glMatrixMode(GL_PROJECTION);
26300+ glPushMatrix();
26301+ glLoadIdentity();
26302+ glOrtho(0, process->currentDrawablePos.width,
26303+ process->currentDrawablePos.height, 0, -1, 1);
26304+ glMatrixMode(GL_MODELVIEW);
26305+ glPushMatrix();
26306+ glLoadIdentity();
26307+ glPixelZoom(1, -1);
26308+
26309+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
26310+ glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
26311+ glPixelStorei(GL_UNPACK_SWAP_BYTES, 0);
26312+ glPixelStorei(GL_UNPACK_LSB_FIRST, 0);
26313+ glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
26314+ glShadeModel(GL_SMOOTH);
26315+
26316+ glEnable(GL_BLEND);
26317+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
26318+ glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
26319+
26320+ int i, numUnits;
26321+
26322+ glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &numUnits);
26323+ for (i = 0; i < numUnits; i++) {
26324+ do_glActiveTextureARB(GL_TEXTURE0_ARB + i);
26325+ glDisable(GL_TEXTURE_1D);
26326+ glDisable(GL_TEXTURE_2D);
26327+ glDisable(GL_TEXTURE_3D);
26328+ }
26329+ glDisable(GL_ALPHA_TEST);
26330+ glDisable(GL_DEPTH_TEST);
26331+ glDisable(GL_STENCIL_TEST);
26332+ glDisable(GL_SCISSOR_TEST);
26333+ glDisable(GL_FRAGMENT_PROGRAM_ARB);
26334+ glDisable(GL_VERTEX_PROGRAM_ARB);
26335+ do_glUseProgramObjectARB(0);
26336+
26337+ // memset(client_cursor.pixels, 255, client_cursor.width
26338+ // * client_cursor.height * sizeof(int));
26339+
26340+ glRasterPos2d(client_cursor.x - client_cursor.xhot,
26341+ client_cursor.y - client_cursor.yhot);
26342+ glDrawPixels(client_cursor.width, client_cursor.height,
26343+ GL_BGRA, GL_UNSIGNED_BYTE,
26344+ client_cursor.pixels);
26345+
26346+ glMatrixMode(GL_MODELVIEW);
26347+ glPopMatrix();
26348+
26349+ glMatrixMode(GL_PROJECTION);
26350+ glPopMatrix();
26351+
26352+ glPopClientAttrib();
26353+ glPopAttrib();
26354+ }
26355+#endif
26356+
26357+ ////////// HORRIBLE HORRIBLE HACK
26358+ if (drawable != active_win && active_win) {
26359+ glXMakeCurrent(dpy, active_win,
26360+ processes[0].current_state->context);
26361+ glXSwapBuffers(dpy, active_win);
26362+ glXMakeCurrent(dpy, process->current_state->drawable,
26363+ process->current_state->context);
26364+ }
26365+ glXSwapBuffers(dpy, drawable);
26366+ }
26367+ break;
26368+ }
26369+
26370+ case glXIsDirect_func:
26371+ {
26372+ int fake_ctxt = (int) args[1];
26373+
26374+ if (display_function_call)
26375+ fprintf(stderr, "fake_ctx=%x\n", fake_ctxt);
26376+ GLXContext ctxt =
26377+ get_association_fakecontext_glxcontext(process, fake_ctxt);
26378+ if (ctxt == NULL) {
26379+ fprintf(stderr, "invalid fake_ctxt (%x) !\n", fake_ctxt);
26380+ ret_char = False;
26381+ } else {
26382+ ret_char = glXIsDirect(dpy, ctxt);
26383+ }
26384+ break;
26385+ }
26386+
26387+ case glXGetConfig_func:
26388+ {
26389+ int visualid = args[1];
26390+ XVisualInfo *vis = NULL;
26391+
26392+ if (visualid)
26393+ vis = get_visual_info_from_visual_id(dpy, visualid);
26394+ if (vis == NULL)
26395+ vis = get_default_visual(dpy);
26396+ ret_int = glXGetConfig(dpy, vis, args[2], (int *) args[3]);
26397+ break;
26398+ }
26399+
26400+ case glXGetConfig_extended_func:
26401+ {
26402+ int visualid = args[1];
26403+ int n = args[2];
26404+ int i;
26405+ XVisualInfo *vis = NULL;
26406+ int *attribs = (int *) args[3];
26407+ int *values = (int *) args[4];
26408+ int *res = (int *) args[5];
26409+
26410+ if (visualid)
26411+ vis = get_visual_info_from_visual_id(dpy, visualid);
26412+ if (vis == NULL)
26413+ vis = get_default_visual(dpy);
26414+
26415+ for (i = 0; i < n; i++) {
26416+ res[i] = glXGetConfig(dpy, vis, attribs[i], &values[i]);
26417+ }
26418+ break;
26419+ }
26420+
26421+ case glXUseXFont_func:
26422+ {
26423+ /* implementation is client-side only :-) */
26424+ break;
26425+ }
26426+
26427+ case glXQueryExtension_func:
26428+ {
26429+ ret_int =
26430+ glXQueryExtension(dpy, (int *) args[1], (int *) args[2]);
26431+ break;
26432+ }
26433+
26434+ case glXChooseFBConfig_func:
26435+ {
26436+ GET_EXT_PTR(GLXFBConfig *, glXChooseFBConfig,
26437+ (Display *, int, int *, int *));
26438+ if (process->nfbconfig == MAX_FBCONFIG) {
26439+ *(int *) args[3] = 0;
26440+ ret_int = 0;
26441+ } else {
26442+ GLXFBConfig *fbconfigs =
26443+ ptr_func_glXChooseFBConfig(dpy, args[1], (int *) args[2],
26444+ (int *) args[3]);
26445+ if (fbconfigs) {
26446+ process->fbconfigs[process->nfbconfig] = fbconfigs;
26447+ process->fbconfigs_max[process->nfbconfig] =
26448+ *(int *) args[3];
26449+ process->nfbconfig++;
26450+ ret_int = 1 + process->nfbconfig_total;
26451+ process->nfbconfig_total +=
26452+ process->fbconfigs_max[process->nfbconfig];
26453+ } else {
26454+ ret_int = 0;
26455+ }
26456+ }
26457+ break;
26458+ }
26459+
26460+ case glXChooseFBConfigSGIX_func:
26461+ {
26462+ GET_EXT_PTR(GLXFBConfigSGIX *, glXChooseFBConfigSGIX,
26463+ (Display *, int, int *, int *));
26464+ if (process->nfbconfig == MAX_FBCONFIG) {
26465+ *(int *) args[3] = 0;
26466+ ret_int = 0;
26467+ } else {
26468+ GLXFBConfigSGIX *fbconfigs =
26469+ ptr_func_glXChooseFBConfigSGIX(dpy, args[1],
26470+ (int *) args[2],
26471+ (int *) args[3]);
26472+ if (fbconfigs) {
26473+ process->fbconfigs[process->nfbconfig] = fbconfigs;
26474+ process->fbconfigs_max[process->nfbconfig] =
26475+ *(int *) args[3];
26476+ process->nfbconfig++;
26477+ ret_int = 1 + process->nfbconfig_total;
26478+ process->nfbconfig_total +=
26479+ process->fbconfigs_max[process->nfbconfig];
26480+ } else {
26481+ ret_int = 0;
26482+ }
26483+ }
26484+ break;
26485+ }
26486+
26487+ case glXGetFBConfigs_func:
26488+ {
26489+ GET_EXT_PTR(GLXFBConfig *, glXGetFBConfigs,
26490+ (Display *, int, int *));
26491+ if (process->nfbconfig == MAX_FBCONFIG) {
26492+ *(int *) args[2] = 0;
26493+ ret_int = 0;
26494+ } else {
26495+ GLXFBConfig *fbconfigs =
26496+ ptr_func_glXGetFBConfigs(dpy, args[1], (int *) args[2]);
26497+ if (fbconfigs) {
26498+ process->fbconfigs[process->nfbconfig] = fbconfigs;
26499+ process->fbconfigs_max[process->nfbconfig] =
26500+ *(int *) args[2];
26501+ process->nfbconfig++;
26502+ ret_int = 1 + process->nfbconfig_total;
26503+ process->nfbconfig_total +=
26504+ process->fbconfigs_max[process->nfbconfig];
26505+ } else {
26506+ ret_int = 0;
26507+ }
26508+ }
26509+ break;
26510+ }
26511+
26512+ case glXCreatePbuffer_func:
26513+ {
26514+ GET_EXT_PTR(GLXPbuffer, glXCreatePbuffer,
26515+ (Display *, GLXFBConfig, int *));
26516+ int client_fbconfig = args[1];
26517+
26518+ ret_int = 0;
26519+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26520+
26521+ if (fbconfig) {
26522+ GLXPbuffer pbuffer =
26523+ ptr_func_glXCreatePbuffer(dpy, fbconfig, (int *) args[2]);
26524+ fprintf(stderr, "glXCreatePbuffer --> %x\n", (int) pbuffer);
26525+ if (pbuffer) {
26526+ ClientGLXDrawable fake_pbuffer = to_drawable(
26527+ ++ process->next_available_pbuffer_number);
26528+
26529+ set_association_fakepbuffer_pbuffer(
26530+ process, fake_pbuffer, pbuffer);
26531+ fprintf(stderr,
26532+ "set_association_fakepbuffer_pbuffer(%p, %x)\n",
26533+ fake_pbuffer, (int) (long) pbuffer);
26534+ ret_int = (int) (long) fake_pbuffer;
26535+ }
26536+ }
26537+ break;
26538+ }
26539+
26540+ case glXCreateGLXPbufferSGIX_func:
26541+ {
26542+ GET_EXT_PTR(GLXPbufferSGIX, glXCreateGLXPbufferSGIX,
26543+ (Display *, GLXFBConfig, int, int, int *));
26544+ int client_fbconfig = args[1];
26545+
26546+ ret_int = 0;
26547+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26548+
26549+ if (fbconfig) {
26550+ GLXPbufferSGIX pbuffer = ptr_func_glXCreateGLXPbufferSGIX(
26551+ dpy, fbconfig,
26552+ args[2], args[3], (int *) args[4]);
26553+ if (pbuffer) {
26554+ ClientGLXDrawable fake_pbuffer = to_drawable(
26555+ ++ process->next_available_pbuffer_number);
26556+
26557+ set_association_fakepbuffer_pbuffer(
26558+ process, fake_pbuffer, pbuffer);
26559+ ret_int = (int) (long) fake_pbuffer;
26560+ }
26561+ }
26562+ break;
26563+ }
26564+
26565+ case glXDestroyPbuffer_func:
26566+ {
26567+ GET_EXT_PTR(void, glXDestroyPbuffer, (Display *, GLXPbuffer));
26568+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26569+
26570+ if (display_function_call)
26571+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26572+
26573+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26574+ process, fake_pbuffer);
26575+ if (pbuffer == 0) {
26576+ fprintf(stderr, "invalid fake_pbuffer (%p) !\n",
26577+ fake_pbuffer);
26578+ } else {
26579+ if (!is_gl_vendor_ati(dpy))
26580+ ptr_func_glXDestroyPbuffer(dpy, pbuffer);
26581+ unset_association_fakepbuffer_pbuffer(process, fake_pbuffer);
26582+ }
26583+ break;
26584+ }
26585+
26586+ case glXDestroyGLXPbufferSGIX_func:
26587+ {
26588+ GET_EXT_PTR(void, glXDestroyGLXPbufferSGIX,
26589+ (Display *, GLXPbuffer));
26590+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26591+
26592+ if (display_function_call)
26593+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26594+
26595+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26596+ process, fake_pbuffer);
26597+ if (pbuffer == 0) {
26598+ fprintf(stderr, "invalid fake_pbuffer (%p) !\n",
26599+ fake_pbuffer);
26600+ } else {
26601+ if (!is_gl_vendor_ati(dpy))
26602+ ptr_func_glXDestroyGLXPbufferSGIX(dpy, pbuffer);
26603+ unset_association_fakepbuffer_pbuffer(process, fake_pbuffer);
26604+ }
26605+ break;
26606+ }
26607+
26608+ case glXBindTexImageATI_func:
26609+ {
26610+ GET_EXT_PTR(void, glXBindTexImageATI,
26611+ (Display *, GLXPbuffer, int));
26612+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26613+
26614+ if (display_function_call)
26615+ fprintf(stderr, "fake_pbuffer=%p\n",
26616+ fake_pbuffer);
26617+
26618+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26619+ process, fake_pbuffer);
26620+ if (pbuffer == 0) {
26621+ fprintf(stderr,
26622+ "glXBindTexImageATI : invalid fake_pbuffer (%p) !\n",
26623+ fake_pbuffer);
26624+ } else {
26625+ ptr_func_glXBindTexImageATI(dpy, pbuffer, args[2]);
26626+ }
26627+ break;
26628+ }
26629+
26630+ case glXReleaseTexImageATI_func:
26631+ {
26632+ GET_EXT_PTR(void, glXReleaseTexImageATI,
26633+ (Display *, GLXPbuffer, int));
26634+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26635+
26636+ if (display_function_call)
26637+ fprintf(stderr, "fake_pbuffer=%d\n",
26638+ (int) (long) fake_pbuffer);
26639+
26640+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26641+ process, fake_pbuffer);
26642+ if (pbuffer == 0) {
26643+ fprintf(stderr,
26644+ "glXReleaseTexImageATI : invalid fake_pbuffer (%d) !\n",
26645+ (int) (long) fake_pbuffer);
26646+ } else {
26647+ ptr_func_glXReleaseTexImageATI(dpy, pbuffer, args[2]);
26648+ }
26649+ break;
26650+ }
26651+
26652+ case glXBindTexImageARB_func:
26653+ {
26654+ GET_EXT_PTR(Bool, glXBindTexImageARB,
26655+ (Display *, GLXPbuffer, int));
26656+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26657+
26658+ if (display_function_call)
26659+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26660+
26661+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26662+ process, fake_pbuffer);
26663+ if (pbuffer == 0) {
26664+ fprintf(stderr,
26665+ "glXBindTexImageARB : invalid fake_pbuffer (%p) !\n",
26666+ fake_pbuffer);
26667+ ret_int = 0;
26668+ } else {
26669+ ret_int = ptr_func_glXBindTexImageARB(dpy, pbuffer, args[2]);
26670+ }
26671+ break;
26672+ }
26673+
26674+ case glXReleaseTexImageARB_func:
26675+ {
26676+ GET_EXT_PTR(Bool, glXReleaseTexImageARB,
26677+ (Display *, GLXPbuffer, int));
26678+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26679+
26680+ if (display_function_call)
26681+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26682+
26683+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26684+ process, fake_pbuffer);
26685+ if (pbuffer == 0) {
26686+ fprintf(stderr,
26687+ "glXReleaseTexImageARB : invalid fake_pbuffer (%p) !\n",
26688+ fake_pbuffer);
26689+ ret_int = 0;
26690+ } else {
26691+ ret_int =
26692+ ptr_func_glXReleaseTexImageARB(dpy, pbuffer, args[2]);
26693+ }
26694+ break;
26695+ }
26696+
26697+ case glXGetFBConfigAttrib_func:
26698+ {
26699+ GET_EXT_PTR(int, glXGetFBConfigAttrib,
26700+ (Display *, GLXFBConfig, int, int *));
26701+ int client_fbconfig = args[1];
26702+
26703+ ret_int = 0;
26704+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26705+
26706+ if (fbconfig)
26707+ ret_int =
26708+ ptr_func_glXGetFBConfigAttrib(dpy, fbconfig, args[2],
26709+ (int *) args[3]);
26710+ break;
26711+ }
26712+
26713+ case glXGetFBConfigAttrib_extended_func:
26714+ {
26715+ GET_EXT_PTR(int, glXGetFBConfigAttrib,
26716+ (Display *, GLXFBConfig, int, int *));
26717+ int client_fbconfig = args[1];
26718+ int n = args[2];
26719+ int i;
26720+ int *attribs = (int *) args[3];
26721+ int *values = (int *) args[4];
26722+ int *res = (int *) args[5];
26723+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26724+
26725+ for (i = 0; i < n; i++) {
26726+ if (fbconfig) {
26727+ res[i] =
26728+ ptr_func_glXGetFBConfigAttrib(dpy, fbconfig,
26729+ attribs[i], &values[i]);
26730+ } else {
26731+ res[i] = 0;
26732+ }
26733+ }
26734+ break;
26735+ }
26736+
26737+ case glXGetFBConfigAttribSGIX_func:
26738+ {
26739+ GET_EXT_PTR(int, glXGetFBConfigAttribSGIX,
26740+ (Display *, GLXFBConfigSGIX, int, int *));
26741+ int client_fbconfig = args[1];
26742+
26743+ ret_int = 0;
26744+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26745+
26746+ if (fbconfig)
26747+ ret_int =
26748+ ptr_func_glXGetFBConfigAttribSGIX(dpy,
26749+ (GLXFBConfigSGIX)
26750+ fbconfig, args[2],
26751+ (int *) args[3]);
26752+ break;
26753+ }
26754+
26755+ case glXQueryContext_func:
26756+ {
26757+ GET_EXT_PTR(int, glXQueryContext,
26758+ (Display *, GLXContext, int, int *));
26759+ int fake_ctxt = (int) args[1];
26760+
26761+ if (display_function_call)
26762+ fprintf(stderr, "fake_ctx=%i\n", fake_ctxt);
26763+ GLXContext ctxt =
26764+ get_association_fakecontext_glxcontext(process, fake_ctxt);
26765+ if (ctxt == NULL) {
26766+ fprintf(stderr, "invalid fake_ctxt (%i) !\n", fake_ctxt);
26767+ ret_int = 0;
26768+ } else {
26769+ ret_int =
26770+ ptr_func_glXQueryContext(dpy, ctxt, args[2],
26771+ (int *) args[3]);
26772+ }
26773+ break;
26774+ }
26775+
26776+ case glXQueryDrawable_func:
26777+ {
26778+ GET_EXT_PTR(void, glXQueryDrawable,
26779+ (Display *, GLXDrawable, int, int *));
26780+ ClientGLXDrawable client_drawable = to_drawable(args[1]);
26781+ GLXDrawable drawable =
26782+ get_association_clientdrawable_serverdrawable(
26783+ process, client_drawable);
26784+
26785+ if (display_function_call)
26786+ fprintf(stderr, "client_drawable=%p\n",
26787+ client_drawable);
26788+
26789+ if (!drawable)
26790+ fprintf(stderr, "invalid client_drawable (%p) !\n",
26791+ client_drawable);
26792+ else
26793+ ptr_func_glXQueryDrawable(dpy, drawable,
26794+ args[2], (int *) args[3]);
26795+
26796+ break;
26797+ }
26798+
26799+ case glXQueryGLXPbufferSGIX_func:
26800+ {
26801+ GET_EXT_PTR(int, glXQueryGLXPbufferSGIX,
26802+ (Display *, GLXFBConfigSGIX, int, int *));
26803+ int client_fbconfig = args[1];
26804+
26805+ ret_int = 0;
26806+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26807+
26808+ if (fbconfig)
26809+ ret_int = ptr_func_glXQueryGLXPbufferSGIX(dpy,
26810+ (GLXFBConfigSGIX) fbconfig,
26811+ args[2], (int *) args[3]);
26812+ break;
26813+ }
26814+
26815+ case glXCreateContextWithConfigSGIX_func:
26816+ {
26817+ GET_EXT_PTR(GLXContext, glXCreateContextWithConfigSGIX,
26818+ (Display *, GLXFBConfigSGIX, int, GLXContext, int));
26819+ int client_fbconfig = args[1];
26820+
26821+ ret_int = 0;
26822+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26823+
26824+ if (fbconfig) {
26825+ GLXContext shareList = get_association_fakecontext_glxcontext(
26826+ process, (int) args[3]);
26827+ process->next_available_context_number++;
26828+ int fake_ctxt = process->next_available_context_number;
26829+ GLXContext ctxt = ptr_func_glXCreateContextWithConfigSGIX(
26830+ dpy, (GLXFBConfigSGIX) fbconfig, args[2],
26831+ shareList, args[4]);
26832+ set_association_fakecontext_glxcontext(
26833+ process, fake_ctxt, ctxt);
26834+ ret_int = fake_ctxt;
26835+ }
26836+ break;
26837+ }
26838+
26839+ case glXGetVisualFromFBConfig_func:
26840+ {
26841+ GET_EXT_PTR(XVisualInfo *, glXGetVisualFromFBConfig,
26842+ (Display *, GLXFBConfig));
26843+ int client_fbconfig = args[1];
26844+
26845+ ret_int = 0;
26846+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26847+
26848+ if (fbconfig) {
26849+ XVisualInfo *vis =
26850+ ptr_func_glXGetVisualFromFBConfig(dpy, fbconfig);
26851+ ret_int = (vis) ? vis->visualid : 0;
26852+ if (vis) {
26853+ tabAssocAttribListVisual =
26854+ realloc(tabAssocAttribListVisual,
26855+ sizeof(AssocAttribListVisual) *
26856+ (nTabAssocAttribListVisual + 1));
26857+ tabAssocAttribListVisual[nTabAssocAttribListVisual].
26858+ attribListLength = 0;
26859+ tabAssocAttribListVisual[nTabAssocAttribListVisual].
26860+ attribList = NULL;
26861+ tabAssocAttribListVisual[nTabAssocAttribListVisual].
26862+ visInfo = vis;
26863+ nTabAssocAttribListVisual++;
26864+ }
26865+ if (display_function_call)
26866+ fprintf(stderr, "visualid = %d\n", ret_int);
26867+ }
26868+ break;
26869+ }
26870+
26871+ case glXSwapIntervalSGI_func:
26872+ {
26873+ GET_EXT_PTR(int, glXSwapIntervalSGI, (int));
26874+
26875+ ret_int = ptr_func_glXSwapIntervalSGI(args[0]);
26876+ break;
26877+ }
26878+
26879+ case glXGetProcAddress_fake_func:
26880+ {
26881+ if (display_function_call)
26882+ fprintf(stderr, "%s\n", (char *) args[0]);
26883+ ret_int = glXGetProcAddressARB((const GLubyte *) args[0]) != NULL;
26884+ break;
26885+ }
26886+
26887+ case glXGetProcAddress_global_fake_func:
26888+ {
26889+ int nbElts = args[0];
26890+ char *huge_buffer = (char *) args[1];
26891+ char *result = (char *) args[2];
26892+ int i;
26893+
26894+ for (i = 0; i < nbElts; i++) {
26895+ int len = strlen(huge_buffer);
26896+
26897+ result[i] =
26898+ glXGetProcAddressARB((const GLubyte *) huge_buffer) !=
26899+ NULL;
26900+ huge_buffer += len + 1;
26901+ }
26902+ break;
26903+ }
26904+
26905+/* Begin of texture stuff */
26906+ case glBindTexture_func:
26907+ case glBindTextureEXT_func:
26908+ {
26909+ int target = args[0];
26910+ unsigned int client_texture = args[1];
26911+ unsigned int server_texture;
26912+
26913+ if (client_texture == 0) {
26914+ glBindTexture(target, 0);
26915+ } else {
26916+ alloc_value(process->current_state->textureAllocator,
26917+ client_texture);
26918+ server_texture =
26919+ process->current_state->tabTextures[client_texture];
26920+ if (server_texture == 0) {
26921+ glGenTextures(1, &server_texture);
26922+ process->current_state->tabTextures[client_texture] =
26923+ server_texture;
26924+ }
26925+ glBindTexture(target, server_texture);
26926+ }
26927+ break;
26928+ }
26929+
26930+ case glGenTextures_fake_func:
26931+ {
26932+ GET_EXT_PTR(void, glGenTextures, (GLsizei n, GLuint *textures));
26933+ int i;
26934+ int n = args[0];
26935+ unsigned int *clientTabTextures = malloc(n * sizeof(int));
26936+ unsigned int *serverTabTextures = malloc(n * sizeof(int));
26937+
26938+ alloc_range(process->current_state->textureAllocator, n,
26939+ clientTabTextures);
26940+
26941+ ptr_func_glGenTextures(n, serverTabTextures);
26942+ for (i = 0; i < n; i++) {
26943+ process->current_state->tabTextures[clientTabTextures[i]] =
26944+ serverTabTextures[i];
26945+ }
26946+
26947+ free(clientTabTextures);
26948+ free(serverTabTextures);
26949+ break;
26950+ }
26951+
26952+
26953+ case glDeleteTextures_func:
26954+ {
26955+ GET_EXT_PTR(void, glDeleteTextures,
26956+ (GLsizei n, const GLuint *textures));
26957+ int i;
26958+ int n = args[0];
26959+ unsigned int *clientTabTextures = (unsigned int *) args[1];
26960+
26961+ delete_range(process->current_state->textureAllocator, n,
26962+ clientTabTextures);
26963+
26964+ unsigned int *serverTabTextures = malloc(n * sizeof(int));
26965+
26966+ for (i = 0; i < n; i++) {
26967+ serverTabTextures[i] =
26968+ get_server_texture(process, clientTabTextures[i]);
26969+ }
26970+ ptr_func_glDeleteTextures(n, serverTabTextures);
26971+ for (i = 0; i < n; i++) {
26972+ process->current_state->tabTextures[clientTabTextures[i]] = 0;
26973+ }
26974+ free(serverTabTextures);
26975+ break;
26976+ }
26977+
26978+ case glPrioritizeTextures_func:
26979+ {
26980+ GET_EXT_PTR(void, glPrioritizeTextures,
26981+ (GLsizei n, const GLuint *textures,
26982+ const GLclampf *priorities));
26983+
26984+ int i;
26985+ int n = args[0];
26986+ unsigned int *textures = (unsigned int *) args[1];
26987+
26988+ for (i = 0; i < n; i++) {
26989+ textures[i] = get_server_texture(process, textures[i]);
26990+ }
26991+ ptr_func_glPrioritizeTextures(n, textures,
26992+ (const GLclampf *) args[2]);
26993+ break;
26994+ }
26995+
26996+ case glAreTexturesResident_func:
26997+ {
26998+ GET_EXT_PTR(void, glAreTexturesResident,
26999+ (GLsizei n, const GLuint *textures,
27000+ GLboolean *residences));
27001+ int i;
27002+ int n = args[0];
27003+ unsigned int *textures = (unsigned int *) args[1];
27004+
27005+ for (i = 0; i < n; i++) {
27006+ textures[i] = get_server_texture(process, textures[i]);
27007+ }
27008+ ptr_func_glAreTexturesResident(n, textures,
27009+ (GLboolean *) args[2]);
27010+ break;
27011+ }
27012+
27013+ case glIsTexture_func:
27014+ case glIsTextureEXT_func:
27015+ {
27016+ GET_EXT_PTR(GLboolean, glIsTexture, (GLuint texture));
27017+ unsigned int client_texture = args[0];
27018+ unsigned int server_texture =
27019+ get_server_texture(process, client_texture);
27020+ if (server_texture)
27021+ ret_char = ptr_func_glIsTexture(server_texture);
27022+ else
27023+ ret_char = 0;
27024+ break;
27025+ }
27026+
27027+ case glFramebufferTexture1DEXT_func:
27028+ {
27029+ GET_EXT_PTR(void, glFramebufferTexture1DEXT,
27030+ (int, int, int, int, int));
27031+ unsigned int client_texture = args[3];
27032+ unsigned int server_texture =
27033+ get_server_texture(process, client_texture);
27034+ if (server_texture)
27035+ ptr_func_glFramebufferTexture1DEXT(args[0], args[1], args[2],
27036+ server_texture, args[4]);
27037+ break;
27038+ }
27039+
27040+ case glFramebufferTexture2DEXT_func:
27041+ {
27042+ GET_EXT_PTR(void, glFramebufferTexture2DEXT,
27043+ (int, int, int, int, int));
27044+ unsigned int client_texture = args[3];
27045+ unsigned int server_texture =
27046+ get_server_texture(process, client_texture);
27047+ if (server_texture)
27048+ ptr_func_glFramebufferTexture2DEXT(args[0], args[1], args[2],
27049+ server_texture, args[4]);
27050+ break;
27051+ }
27052+
27053+ case glFramebufferTexture3DEXT_func:
27054+ {
27055+ GET_EXT_PTR(void, glFramebufferTexture3DEXT,
27056+ (int, int, int, int, int, int));
27057+ unsigned int client_texture = args[3];
27058+ unsigned int server_texture =
27059+ get_server_texture(process, client_texture);
27060+ if (server_texture)
27061+ ptr_func_glFramebufferTexture3DEXT(args[0], args[1], args[2],
27062+ server_texture, args[4],
27063+ args[5]);
27064+ break;
27065+ }
27066+/* End of texture stuff */
27067+
27068+/* Begin of list stuff */
27069+ case glIsList_func:
27070+ {
27071+ unsigned int client_list = args[0];
27072+ unsigned int server_list = get_server_list(process, client_list);
27073+
27074+ if (server_list)
27075+ ret_char = glIsList(server_list);
27076+ else
27077+ ret_char = 0;
27078+ break;
27079+ }
27080+
27081+ case glDeleteLists_func:
27082+ {
27083+ int i;
27084+ unsigned int first_client = args[0];
27085+ int n = args[1];
27086+
27087+ unsigned int first_server =
27088+ get_server_list(process, first_client);
27089+ for (i = 0; i < n; i++) {
27090+ if (get_server_list(process, first_client + i) !=
27091+ first_server + i)
27092+ break;
27093+ }
27094+ if (i == n) {
27095+ glDeleteLists(first_server, n);
27096+ } else {
27097+ for (i = 0; i < n; i++) {
27098+ glDeleteLists(get_server_list(process, first_client + i),
27099+ 1);
27100+ }
27101+ }
27102+
27103+ for (i = 0; i < n; i++) {
27104+ process->current_state->tabLists[first_client + i] = 0;
27105+ }
27106+ delete_consecutive_values(process->current_state->listAllocator,
27107+ first_client, n);
27108+ break;
27109+ }
27110+
27111+ case glGenLists_fake_func:
27112+ {
27113+ int i;
27114+ int n = args[0];
27115+ unsigned int server_first = glGenLists(n);
27116+
27117+ if (server_first) {
27118+ unsigned int client_first =
27119+ alloc_range(process->current_state->listAllocator, n,
27120+ NULL);
27121+ for (i = 0; i < n; i++) {
27122+ process->current_state->tabLists[client_first + i] =
27123+ server_first + i;
27124+ }
27125+ }
27126+ break;
27127+ }
27128+
27129+ case glNewList_func:
27130+ {
27131+ unsigned int client_list = args[0];
27132+ int mode = args[1];
27133+
27134+ alloc_value(process->current_state->listAllocator, client_list);
27135+ unsigned int server_list = get_server_list(process, client_list);
27136+
27137+ if (server_list == 0) {
27138+ server_list = glGenLists(1);
27139+ process->current_state->tabLists[client_list] = server_list;
27140+ }
27141+ glNewList(server_list, mode);
27142+ break;
27143+ }
27144+
27145+ case glCallList_func:
27146+ {
27147+ unsigned int client_list = args[0];
27148+ unsigned int server_list = get_server_list(process, client_list);
27149+
27150+ glCallList(server_list);
27151+ break;
27152+ }
27153+
27154+ case glCallLists_func:
27155+ {
27156+ int i;
27157+ int n = args[0];
27158+ int type = args[1];
27159+ const GLvoid *lists = (const GLvoid *) args[2];
27160+ int *new_lists = malloc(sizeof(int) * n);
27161+
27162+ for (i = 0; i < n; i++) {
27163+ new_lists[i] =
27164+ get_server_list(process, translate_id(i, type, lists));
27165+ }
27166+ glCallLists(n, GL_UNSIGNED_INT, new_lists);
27167+ free(new_lists);
27168+ break;
27169+ }
27170+
27171+
27172+/* End of list stuff */
27173+
27174+/* Begin of buffer stuff */
27175+ case glBindBufferARB_func:
27176+ {
27177+ GET_EXT_PTR(void, glBindBufferARB, (int, int));
27178+ int target = args[0];
27179+ unsigned int client_buffer = args[1];
27180+ unsigned int server_buffer;
27181+
27182+ if (client_buffer == 0) {
27183+ ptr_func_glBindBufferARB(target, 0);
27184+ } else {
27185+ server_buffer = get_server_buffer(process, client_buffer);
27186+ ptr_func_glBindBufferARB(target, server_buffer);
27187+ }
27188+ break;
27189+ }
27190+
27191+ case glGenBuffersARB_fake_func:
27192+ {
27193+ GET_EXT_PTR(void, glGenBuffersARB, (int, unsigned int *));
27194+ int i;
27195+ int n = args[0];
27196+ unsigned int *clientTabBuffers = malloc(n * sizeof(int));
27197+ unsigned int *serverTabBuffers = malloc(n * sizeof(int));
27198+
27199+ alloc_range(process->current_state->bufferAllocator, n,
27200+ clientTabBuffers);
27201+
27202+ ptr_func_glGenBuffersARB(n, serverTabBuffers);
27203+ for (i = 0; i < n; i++) {
27204+ process->current_state->tabBuffers[clientTabBuffers[i]] =
27205+ serverTabBuffers[i];
27206+ }
27207+
27208+ free(clientTabBuffers);
27209+ free(serverTabBuffers);
27210+ break;
27211+ }
27212+
27213+
27214+ case glDeleteBuffersARB_func:
27215+ {
27216+ GET_EXT_PTR(void, glDeleteBuffersARB, (int, int *));
27217+ int i;
27218+ int n = args[0];
27219+ unsigned int *clientTabBuffers = (unsigned int *) args[1];
27220+
27221+ delete_range(process->current_state->bufferAllocator, n,
27222+ clientTabBuffers);
27223+
27224+ int *serverTabBuffers = malloc(n * sizeof(int));
27225+
27226+ for (i = 0; i < n; i++) {
27227+ serverTabBuffers[i] =
27228+ get_server_buffer(process, clientTabBuffers[i]);
27229+ }
27230+ ptr_func_glDeleteBuffersARB(n, serverTabBuffers);
27231+ for (i = 0; i < n; i++) {
27232+ process->current_state->tabBuffers[clientTabBuffers[i]] = 0;
27233+ }
27234+ free(serverTabBuffers);
27235+ break;
27236+ }
27237+
27238+ case glIsBufferARB_func:
27239+ {
27240+ GET_EXT_PTR(int, glIsBufferARB, (int));
27241+ unsigned int client_buffer = args[0];
27242+ unsigned int server_buffer =
27243+ get_server_buffer(process, client_buffer);
27244+ if (server_buffer)
27245+ ret_int = ptr_func_glIsBufferARB(server_buffer);
27246+ else
27247+ ret_int = 0;
27248+ break;
27249+ }
27250+
27251+/* End of buffer stuff */
27252+
27253+ case glShaderSourceARB_fake_func:
27254+ {
27255+ GET_EXT_PTR(void, glShaderSourceARB, (int, int, char **, void *));
27256+ int size = args[1];
27257+ int i;
27258+ int acc_length = 0;
27259+ GLcharARB **tab_prog = malloc(size * sizeof(GLcharARB *));
27260+ int *tab_length = (int *) args[3];
27261+
27262+ for (i = 0; i < size; i++) {
27263+ tab_prog[i] = ((GLcharARB *) args[2]) + acc_length;
27264+ acc_length += tab_length[i];
27265+ }
27266+ ptr_func_glShaderSourceARB(args[0], args[1], tab_prog,
27267+ tab_length);
27268+ free(tab_prog);
27269+ break;
27270+ }
27271+
27272+ case glShaderSource_fake_func:
27273+ {
27274+ GET_EXT_PTR(void, glShaderSource, (int, int, char **, void *));
27275+ int size = args[1];
27276+ int i;
27277+ int acc_length = 0;
27278+ GLcharARB **tab_prog = malloc(size * sizeof(GLcharARB *));
27279+ int *tab_length = (int *) args[3];
27280+
27281+ for (i = 0; i < size; i++) {
27282+ tab_prog[i] = ((GLcharARB *) args[2]) + acc_length;
27283+ acc_length += tab_length[i];
27284+ }
27285+ ptr_func_glShaderSource(args[0], args[1], tab_prog, tab_length);
27286+ free(tab_prog);
27287+ break;
27288+ }
27289+
27290+ case glVertexPointer_fake_func:
27291+ {
27292+ int offset = args[0];
27293+ int size = args[1];
27294+ int type = args[2];
27295+ int stride = args[3];
27296+ int bytes_size = args[4];
27297+
27298+ process->current_state->vertexPointerSize =
27299+ MAX(process->current_state->vertexPointerSize,
27300+ offset + bytes_size);
27301+ process->current_state->vertexPointer =
27302+ realloc(process->current_state->vertexPointer,
27303+ process->current_state->vertexPointerSize);
27304+ memcpy(process->current_state->vertexPointer + offset,
27305+ (void *) args[5], bytes_size);
27306+ /* fprintf(stderr, "glVertexPointer_fake_func size=%d, type=%d,
27307+ * stride=%d, byte_size=%d\n", size, type, stride, bytes_size); */
27308+ glVertexPointer(size, type, stride,
27309+ process->current_state->vertexPointer);
27310+ break;
27311+ }
27312+
27313+ case glNormalPointer_fake_func:
27314+ {
27315+ int offset = args[0];
27316+ int type = args[1];
27317+ int stride = args[2];
27318+ int bytes_size = args[3];
27319+
27320+ process->current_state->normalPointerSize =
27321+ MAX(process->current_state->normalPointerSize,
27322+ offset + bytes_size);
27323+ process->current_state->normalPointer =
27324+ realloc(process->current_state->normalPointer,
27325+ process->current_state->normalPointerSize);
27326+ memcpy(process->current_state->normalPointer + offset,
27327+ (void *) args[4], bytes_size);
27328+ // fprintf(stderr, "glNormalPointer_fake_func type=%d, stride=%d,
27329+ // byte_size=%d\n", type, stride, bytes_size);
27330+ glNormalPointer(type, stride,
27331+ process->current_state->normalPointer);
27332+ break;
27333+ }
27334+
27335+ case glIndexPointer_fake_func:
27336+ {
27337+ int offset = args[0];
27338+ int type = args[1];
27339+ int stride = args[2];
27340+ int bytes_size = args[3];
27341+
27342+ process->current_state->indexPointerSize =
27343+ MAX(process->current_state->indexPointerSize,
27344+ offset + bytes_size);
27345+ process->current_state->indexPointer =
27346+ realloc(process->current_state->indexPointer,
27347+ process->current_state->indexPointerSize);
27348+ memcpy(process->current_state->indexPointer + offset,
27349+ (void *) args[4], bytes_size);
27350+ // fprintf(stderr, "glIndexPointer_fake_func type=%d, stride=%d,
27351+ // byte_size=%d\n", type, stride, bytes_size);
27352+ glIndexPointer(type, stride,
27353+ process->current_state->indexPointer);
27354+ break;
27355+ }
27356+
27357+ case glEdgeFlagPointer_fake_func:
27358+ {
27359+ int offset = args[0];
27360+ int stride = args[1];
27361+ int bytes_size = args[2];
27362+
27363+ process->current_state->edgeFlagPointerSize =
27364+ MAX(process->current_state->edgeFlagPointerSize,
27365+ offset + bytes_size);
27366+ process->current_state->edgeFlagPointer =
27367+ realloc(process->current_state->edgeFlagPointer,
27368+ process->current_state->edgeFlagPointerSize);
27369+ memcpy(process->current_state->edgeFlagPointer + offset,
27370+ (void *) args[3], bytes_size);
27371+ // fprintf(stderr, "glEdgeFlagPointer_fake_func stride = %d,
27372+ // bytes_size=%d\n", stride, bytes_size);
27373+ glEdgeFlagPointer(stride,
27374+ process->current_state->edgeFlagPointer);
27375+ break;
27376+ }
27377+
27378+ case glVertexAttribPointerARB_fake_func:
27379+ {
27380+ GET_EXT_PTR(void, glVertexAttribPointerARB,
27381+ (int, int, int, int, int, void *));
27382+ int offset = args[0];
27383+ int index = args[1];
27384+ int size = args[2];
27385+ int type = args[3];
27386+ int normalized = args[4];
27387+ int stride = args[5];
27388+ int bytes_size = args[6];
27389+
27390+ process->current_state->vertexAttribPointerSize[index] =
27391+ MAX(process->current_state->vertexAttribPointerSize[index],
27392+ offset + bytes_size);
27393+ process->current_state->vertexAttribPointer[index] =
27394+ realloc(process->current_state->vertexAttribPointer[index],
27395+ process->current_state->
27396+ vertexAttribPointerSize[index]);
27397+ memcpy(process->current_state->vertexAttribPointer[index] +
27398+ offset, (void *) args[7], bytes_size);
27399+ ptr_func_glVertexAttribPointerARB(index, size, type, normalized,
27400+ stride,
27401+ process->current_state->
27402+ vertexAttribPointer[index]);
27403+ break;
27404+ }
27405+
27406+ case glVertexAttribPointerNV_fake_func:
27407+ {
27408+ GET_EXT_PTR(void, glVertexAttribPointerNV,
27409+ (int, int, int, int, void *));
27410+ int offset = args[0];
27411+ int index = args[1];
27412+ int size = args[2];
27413+ int type = args[3];
27414+ int stride = args[4];
27415+ int bytes_size = args[5];
27416+
27417+ process->current_state->vertexAttribPointerNVSize[index] =
27418+ MAX(process->current_state->vertexAttribPointerNVSize[index],
27419+ offset + bytes_size);
27420+ process->current_state->vertexAttribPointerNV[index] =
27421+ realloc(process->current_state->vertexAttribPointerNV[index],
27422+ process->current_state->
27423+ vertexAttribPointerNVSize[index]);
27424+ memcpy(process->current_state->vertexAttribPointerNV[index] +
27425+ offset, (void *) args[6], bytes_size);
27426+ ptr_func_glVertexAttribPointerNV(index, size, type, stride,
27427+ process->current_state->
27428+ vertexAttribPointerNV[index]);
27429+ break;
27430+ }
27431+
27432+ case glColorPointer_fake_func:
27433+ {
27434+ int offset = args[0];
27435+ int size = args[1];
27436+ int type = args[2];
27437+ int stride = args[3];
27438+ int bytes_size = args[4];
27439+
27440+ process->current_state->colorPointerSize =
27441+ MAX(process->current_state->colorPointerSize,
27442+ offset + bytes_size);
27443+ process->current_state->colorPointer =
27444+ realloc(process->current_state->colorPointer,
27445+ process->current_state->colorPointerSize);
27446+ memcpy(process->current_state->colorPointer + offset,
27447+ (void *) args[5], bytes_size);
27448+ // fprintf(stderr, "glColorPointer_fake_func bytes_size = %d\n",
27449+ // bytes_size);
27450+ glColorPointer(size, type, stride,
27451+ process->current_state->colorPointer);
27452+
27453+ break;
27454+ }
27455+
27456+ case glSecondaryColorPointer_fake_func:
27457+ {
27458+ GET_EXT_PTR(void, glSecondaryColorPointer,
27459+ (int, int, int, void *));
27460+ int offset = args[0];
27461+ int size = args[1];
27462+ int type = args[2];
27463+ int stride = args[3];
27464+ int bytes_size = args[4];
27465+
27466+ process->current_state->secondaryColorPointerSize =
27467+ MAX(process->current_state->secondaryColorPointerSize,
27468+ offset + bytes_size);
27469+ process->current_state->secondaryColorPointer =
27470+ realloc(process->current_state->secondaryColorPointer,
27471+ process->current_state->secondaryColorPointerSize);
27472+ memcpy(process->current_state->secondaryColorPointer + offset,
27473+ (void *) args[5], bytes_size);
27474+ // fprintf(stderr, "glSecondaryColorPointer_fake_func bytes_size
27475+ // = %d\n", bytes_size);
27476+ ptr_func_glSecondaryColorPointer(size, type, stride,
27477+ process->current_state->
27478+ secondaryColorPointer);
27479+
27480+ break;
27481+ }
27482+
27483+ case glPushClientAttrib_func:
27484+ {
27485+ int mask = args[0];
27486+
27487+ if (process->current_state->clientStateSp <
27488+ MAX_CLIENT_STATE_STACK_SIZE) {
27489+ process->current_state->clientStateStack[process->
27490+ current_state->
27491+ clientStateSp].mask =
27492+ mask;
27493+ if (mask & GL_CLIENT_VERTEX_ARRAY_BIT) {
27494+ process->current_state->clientStateStack[process->
27495+ current_state->
27496+ clientStateSp].
27497+ activeTextureIndex =
27498+ process->current_state->activeTextureIndex;
27499+ }
27500+ process->current_state->clientStateSp++;
27501+ }
27502+ glPushClientAttrib(mask);
27503+ break;
27504+ }
27505+
27506+ case glPopClientAttrib_func:
27507+ {
27508+ if (process->current_state->clientStateSp > 0) {
27509+ process->current_state->clientStateSp--;
27510+ if (process->current_state->
27511+ clientStateStack[process->current_state->clientStateSp].
27512+ mask & GL_CLIENT_VERTEX_ARRAY_BIT) {
27513+ process->current_state->activeTextureIndex =
27514+ process->current_state->clientStateStack[process->
27515+ current_state->
27516+ clientStateSp].
27517+ activeTextureIndex;
27518+ }
27519+ }
27520+ glPopClientAttrib();
27521+ break;
27522+ }
27523+
27524+ case glClientActiveTexture_func:
27525+ case glClientActiveTextureARB_func:
27526+ {
27527+ int activeTexture = args[0];
27528+
27529+ process->current_state->activeTextureIndex =
27530+ activeTexture - GL_TEXTURE0_ARB;
27531+ do_glClientActiveTextureARB(activeTexture);
27532+ break;
27533+ }
27534+
27535+ case glTexCoordPointer_fake_func:
27536+ {
27537+ int offset = args[0];
27538+ int index = args[1];
27539+ int size = args[2];
27540+ int type = args[3];
27541+ int stride = args[4];
27542+ int bytes_size = args[5];
27543+
27544+ process->current_state->texCoordPointerSize[index] =
27545+ MAX(process->current_state->texCoordPointerSize[index],
27546+ offset + bytes_size);
27547+ process->current_state->texCoordPointer[index] =
27548+ realloc(process->current_state->texCoordPointer[index],
27549+ process->current_state->texCoordPointerSize[index]);
27550+ memcpy(process->current_state->texCoordPointer[index] + offset,
27551+ (void *) args[6], bytes_size);
27552+ /* fprintf(stderr, "glTexCoordPointer_fake_func size=%d, type=%d,
27553+ * stride=%d, byte_size=%d\n", size, type, stride, bytes_size); */
27554+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + index);
27555+ glTexCoordPointer(size, type, stride,
27556+ process->current_state->texCoordPointer[index]);
27557+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27558+ process->current_state->
27559+ activeTextureIndex);
27560+ break;
27561+ }
27562+
27563+ case glWeightPointerARB_fake_func:
27564+ {
27565+ GET_EXT_PTR(void, glWeightPointerARB, (int, int, int, void *));
27566+ int offset = args[0];
27567+ int size = args[1];
27568+ int type = args[2];
27569+ int stride = args[3];
27570+ int bytes_size = args[4];
27571+
27572+ process->current_state->weightPointerSize =
27573+ MAX(process->current_state->weightPointerSize,
27574+ offset + bytes_size);
27575+ process->current_state->weightPointer =
27576+ realloc(process->current_state->weightPointer,
27577+ process->current_state->weightPointerSize);
27578+ memcpy(process->current_state->weightPointer + offset,
27579+ (void *) args[5], bytes_size);
27580+ /* fprintf(stderr, "glWeightPointerARB_fake_func size=%d,
27581+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27582+ * bytes_size); */
27583+ ptr_func_glWeightPointerARB(size, type, stride,
27584+ process->current_state->
27585+ weightPointer);
27586+ break;
27587+ }
27588+
27589+ case glMatrixIndexPointerARB_fake_func:
27590+ {
27591+ GET_EXT_PTR(void, glMatrixIndexPointerARB,
27592+ (int, int, int, void *));
27593+ int offset = args[0];
27594+ int size = args[1];
27595+ int type = args[2];
27596+ int stride = args[3];
27597+ int bytes_size = args[4];
27598+
27599+ process->current_state->matrixIndexPointerSize =
27600+ MAX(process->current_state->matrixIndexPointerSize,
27601+ offset + bytes_size);
27602+ process->current_state->matrixIndexPointer =
27603+ realloc(process->current_state->matrixIndexPointer,
27604+ process->current_state->matrixIndexPointerSize);
27605+ memcpy(process->current_state->matrixIndexPointer + offset,
27606+ (void *) args[5], bytes_size);
27607+ /* fprintf(stderr, "glMatrixIndexPointerARB_fake_func size=%d,
27608+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27609+ * bytes_size); */
27610+ ptr_func_glMatrixIndexPointerARB(size, type, stride,
27611+ process->current_state->
27612+ matrixIndexPointer);
27613+ break;
27614+ }
27615+
27616+ case glFogCoordPointer_fake_func:
27617+ {
27618+ GET_EXT_PTR(void, glFogCoordPointer, (int, int, void *));
27619+ int offset = args[0];
27620+ int type = args[1];
27621+ int stride = args[2];
27622+ int bytes_size = args[3];
27623+
27624+ process->current_state->fogCoordPointerSize =
27625+ MAX(process->current_state->fogCoordPointerSize,
27626+ offset + bytes_size);
27627+ process->current_state->fogCoordPointer =
27628+ realloc(process->current_state->fogCoordPointer,
27629+ process->current_state->fogCoordPointerSize);
27630+ memcpy(process->current_state->fogCoordPointer + offset,
27631+ (void *) args[4], bytes_size);
27632+ // fprintf(stderr, "glFogCoordPointer_fake_func type=%d,
27633+ // stride=%d, byte_size=%d\n", type, stride, bytes_size);
27634+ ptr_func_glFogCoordPointer(type, stride,
27635+ process->current_state->
27636+ fogCoordPointer);
27637+ break;
27638+ }
27639+
27640+ case glVariantPointerEXT_fake_func:
27641+ {
27642+ GET_EXT_PTR(void, glVariantPointerEXT, (int, int, int, void *));
27643+ int offset = args[0];
27644+ int id = args[1];
27645+ int type = args[2];
27646+ int stride = args[3];
27647+ int bytes_size = args[4];
27648+
27649+ process->current_state->variantPointerEXTSize[id] =
27650+ MAX(process->current_state->variantPointerEXTSize[id],
27651+ offset + bytes_size);
27652+ process->current_state->variantPointerEXT[id] =
27653+ realloc(process->current_state->variantPointerEXT[id],
27654+ process->current_state->variantPointerEXTSize[id]);
27655+ memcpy(process->current_state->variantPointerEXT[id] + offset,
27656+ (void *) args[5], bytes_size);
27657+ // fprintf(stderr, "glVariantPointerEXT_fake_func[%d] type=%d,
27658+ // stride=%d, byte_size=%d\n", id, type, stride, bytes_size);
27659+ ptr_func_glVariantPointerEXT(id, type, stride,
27660+ process->current_state->
27661+ variantPointerEXT[id]);
27662+ break;
27663+ }
27664+
27665+ case glInterleavedArrays_fake_func:
27666+ {
27667+ GET_EXT_PTR(void, glInterleavedArrays, (int, int, void *));
27668+ int offset = args[0];
27669+ int format = args[1];
27670+ int stride = args[2];
27671+ int bytes_size = args[3];
27672+
27673+ process->current_state->interleavedArraysSize =
27674+ MAX(process->current_state->interleavedArraysSize,
27675+ offset + bytes_size);
27676+ process->current_state->interleavedArrays =
27677+ realloc(process->current_state->interleavedArrays,
27678+ process->current_state->interleavedArraysSize);
27679+ memcpy(process->current_state->interleavedArrays + offset,
27680+ (void *) args[4], bytes_size);
27681+ // fprintf(stderr, "glInterleavedArrays_fake_func format=%d,
27682+ // stride=%d, byte_size=%d\n", format, stride, bytes_size);
27683+ ptr_func_glInterleavedArrays(format, stride,
27684+ process->current_state->
27685+ interleavedArrays);
27686+ break;
27687+ }
27688+
27689+ case glElementPointerATI_fake_func:
27690+ {
27691+ GET_EXT_PTR(void, glElementPointerATI, (int, void *));
27692+ int type = args[0];
27693+ int bytes_size = args[1];
27694+
27695+ process->current_state->elementPointerATISize = bytes_size;
27696+ process->current_state->elementPointerATI =
27697+ realloc(process->current_state->elementPointerATI,
27698+ process->current_state->elementPointerATISize);
27699+ memcpy(process->current_state->elementPointerATI,
27700+ (void *) args[2], bytes_size);
27701+ // fprintf(stderr, "glElementPointerATI_fake_func type=%d,
27702+ // byte_size=%d\n", type, bytes_size);
27703+ ptr_func_glElementPointerATI(type,
27704+ process->current_state->
27705+ elementPointerATI);
27706+ break;
27707+ }
27708+
27709+ case glTexCoordPointer01_fake_func:
27710+ {
27711+ int size = args[0];
27712+ int type = args[1];
27713+ int stride = args[2];
27714+ int bytes_size = args[3];
27715+
27716+ process->current_state->texCoordPointerSize[0] = bytes_size;
27717+ process->current_state->texCoordPointer[0] =
27718+ realloc(process->current_state->texCoordPointer[0],
27719+ bytes_size);
27720+ memcpy(process->current_state->texCoordPointer[0],
27721+ (void *) args[4], bytes_size);
27722+ /* fprintf(stderr, "glTexCoordPointer01_fake_func size=%d,
27723+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27724+ * bytes_size); */
27725+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27726+ glTexCoordPointer(size, type, stride,
27727+ process->current_state->texCoordPointer[0]);
27728+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
27729+ glTexCoordPointer(size, type, stride,
27730+ process->current_state->texCoordPointer[0]);
27731+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27732+ process->current_state->
27733+ activeTextureIndex);
27734+ break;
27735+ }
27736+
27737+ case glTexCoordPointer012_fake_func:
27738+ {
27739+ int size = args[0];
27740+ int type = args[1];
27741+ int stride = args[2];
27742+ int bytes_size = args[3];
27743+
27744+ process->current_state->texCoordPointerSize[0] = bytes_size;
27745+ process->current_state->texCoordPointer[0] =
27746+ realloc(process->current_state->texCoordPointer[0],
27747+ bytes_size);
27748+ memcpy(process->current_state->texCoordPointer[0],
27749+ (void *) args[4], bytes_size);
27750+ /* fprintf(stderr, "glTexCoordPointer012_fake_func size=%d,
27751+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27752+ * bytes_size); */
27753+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27754+ glTexCoordPointer(size, type, stride,
27755+ process->current_state->texCoordPointer[0]);
27756+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
27757+ glTexCoordPointer(size, type, stride,
27758+ process->current_state->texCoordPointer[0]);
27759+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
27760+ glTexCoordPointer(size, type, stride,
27761+ process->current_state->texCoordPointer[0]);
27762+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27763+ process->current_state->
27764+ activeTextureIndex);
27765+ break;
27766+ }
27767+
27768+ case glVertexAndNormalPointer_fake_func:
27769+ {
27770+ int vertexPointerSize = args[0];
27771+ int vertexPointerType = args[1];
27772+ int vertexPointerStride = args[2];
27773+ int normalPointerType = args[3];
27774+ int normalPointerStride = args[4];
27775+ int bytes_size = args[5];
27776+ void *ptr = (void *) args[6];
27777+
27778+ process->current_state->vertexPointerSize = bytes_size;
27779+ process->current_state->vertexPointer =
27780+ realloc(process->current_state->vertexPointer, bytes_size);
27781+ memcpy(process->current_state->vertexPointer, ptr, bytes_size);
27782+ glVertexPointer(vertexPointerSize, vertexPointerType,
27783+ vertexPointerStride,
27784+ process->current_state->vertexPointer);
27785+ glNormalPointer(normalPointerType, normalPointerStride,
27786+ process->current_state->vertexPointer);
27787+ break;
27788+ }
27789+
27790+ case glVertexNormalPointerInterlaced_fake_func:
27791+ {
27792+ int i = 0;
27793+ int offset = args[i++];
27794+ int vertexPointerSize = args[i++];
27795+ int vertexPointerType = args[i++];
27796+ int stride = args[i++];
27797+ int normalPointerOffset = args[i++];
27798+ int normalPointerType = args[i++];
27799+ int bytes_size = args[i++];
27800+ void *ptr = (void *) args[i++];
27801+
27802+ process->current_state->vertexPointerSize =
27803+ MAX(process->current_state->vertexPointerSize,
27804+ offset + bytes_size);
27805+ process->current_state->vertexPointer =
27806+ realloc(process->current_state->vertexPointer,
27807+ process->current_state->vertexPointerSize);
27808+ memcpy(process->current_state->vertexPointer + offset, ptr,
27809+ bytes_size);
27810+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27811+ process->current_state->vertexPointer);
27812+ glNormalPointer(normalPointerType, stride,
27813+ process->current_state->vertexPointer +
27814+ normalPointerOffset);
27815+ break;
27816+ }
27817+
27818+ case glTuxRacerDrawElements_fake_func:
27819+ {
27820+ int mode = args[0];
27821+ int count = args[1];
27822+ int isColorEnabled = args[2];
27823+ void *ptr = (void *) args[3];
27824+ int stride =
27825+ 6 * sizeof(float) +
27826+ ((isColorEnabled) ? 4 * sizeof(unsigned char) : 0);
27827+ glVertexPointer(3, GL_FLOAT, stride, ptr);
27828+ glNormalPointer(GL_FLOAT, stride, ptr + 3 * sizeof(float));
27829+ if (isColorEnabled)
27830+ glColorPointer(4, GL_UNSIGNED_BYTE, stride,
27831+ ptr + 6 * sizeof(float));
27832+ glDrawArrays(mode, 0, count);
27833+ break;
27834+ }
27835+
27836+ case glVertexNormalColorPointerInterlaced_fake_func:
27837+ {
27838+ int i = 0;
27839+ int offset = args[i++];
27840+ int vertexPointerSize = args[i++];
27841+ int vertexPointerType = args[i++];
27842+ int stride = args[i++];
27843+ int normalPointerOffset = args[i++];
27844+ int normalPointerType = args[i++];
27845+ int colorPointerOffset = args[i++];
27846+ int colorPointerSize = args[i++];
27847+ int colorPointerType = args[i++];
27848+ int bytes_size = args[i++];
27849+ void *ptr = (void *) args[i++];
27850+
27851+ process->current_state->vertexPointerSize =
27852+ MAX(process->current_state->vertexPointerSize,
27853+ offset + bytes_size);
27854+ process->current_state->vertexPointer =
27855+ realloc(process->current_state->vertexPointer,
27856+ process->current_state->vertexPointerSize);
27857+ memcpy(process->current_state->vertexPointer + offset, ptr,
27858+ bytes_size);
27859+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27860+ process->current_state->vertexPointer);
27861+ glNormalPointer(normalPointerType, stride,
27862+ process->current_state->vertexPointer +
27863+ normalPointerOffset);
27864+ glColorPointer(colorPointerSize, colorPointerType, stride,
27865+ process->current_state->vertexPointer +
27866+ colorPointerOffset);
27867+ break;
27868+ }
27869+
27870+ case glVertexColorTexCoord0PointerInterlaced_fake_func:
27871+ {
27872+ int i = 0;
27873+ int offset = args[i++];
27874+ int vertexPointerSize = args[i++];
27875+ int vertexPointerType = args[i++];
27876+ int stride = args[i++];
27877+ int colorPointerOffset = args[i++];
27878+ int colorPointerSize = args[i++];
27879+ int colorPointerType = args[i++];
27880+ int texCoord0PointerOffset = args[i++];
27881+ int texCoord0PointerSize = args[i++];
27882+ int texCoord0PointerType = args[i++];
27883+ int bytes_size = args[i++];
27884+ void *ptr = (void *) args[i++];
27885+
27886+ process->current_state->vertexPointerSize =
27887+ MAX(process->current_state->vertexPointerSize,
27888+ offset + bytes_size);
27889+ process->current_state->vertexPointer =
27890+ realloc(process->current_state->vertexPointer,
27891+ process->current_state->vertexPointerSize);
27892+ memcpy(process->current_state->vertexPointer + offset, ptr,
27893+ bytes_size);
27894+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27895+ process->current_state->vertexPointer);
27896+ glColorPointer(colorPointerSize, colorPointerType, stride,
27897+ process->current_state->vertexPointer +
27898+ colorPointerOffset);
27899+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27900+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
27901+ stride,
27902+ process->current_state->vertexPointer +
27903+ texCoord0PointerOffset);
27904+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27905+ process->current_state->
27906+ activeTextureIndex);
27907+ break;
27908+ }
27909+
27910+ case glVertexNormalTexCoord0PointerInterlaced_fake_func:
27911+ {
27912+ int i = 0;
27913+ int offset = args[i++];
27914+ int vertexPointerSize = args[i++];
27915+ int vertexPointerType = args[i++];
27916+ int stride = args[i++];
27917+ int normalPointerOffset = args[i++];
27918+ int normalPointerType = args[i++];
27919+ int texCoord0PointerOffset = args[i++];
27920+ int texCoord0PointerSize = args[i++];
27921+ int texCoord0PointerType = args[i++];
27922+ int bytes_size = args[i++];
27923+ void *ptr = (void *) args[i++];
27924+
27925+ process->current_state->vertexPointerSize =
27926+ MAX(process->current_state->vertexPointerSize,
27927+ offset + bytes_size);
27928+ process->current_state->vertexPointer =
27929+ realloc(process->current_state->vertexPointer,
27930+ process->current_state->vertexPointerSize);
27931+ memcpy(process->current_state->vertexPointer + offset, ptr,
27932+ bytes_size);
27933+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27934+ process->current_state->vertexPointer);
27935+ glNormalPointer(normalPointerType, stride,
27936+ process->current_state->vertexPointer +
27937+ normalPointerOffset);
27938+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27939+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
27940+ stride,
27941+ process->current_state->vertexPointer +
27942+ texCoord0PointerOffset);
27943+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27944+ process->current_state->
27945+ activeTextureIndex);
27946+ break;
27947+ }
27948+
27949+ case glVertexNormalTexCoord01PointerInterlaced_fake_func:
27950+ {
27951+ int i = 0;
27952+ int offset = args[i++];
27953+ int vertexPointerSize = args[i++];
27954+ int vertexPointerType = args[i++];
27955+ int stride = args[i++];
27956+ int normalPointerOffset = args[i++];
27957+ int normalPointerType = args[i++];
27958+ int texCoord0PointerOffset = args[i++];
27959+ int texCoord0PointerSize = args[i++];
27960+ int texCoord0PointerType = args[i++];
27961+ int texCoord1PointerOffset = args[i++];
27962+ int texCoord1PointerSize = args[i++];
27963+ int texCoord1PointerType = args[i++];
27964+ int bytes_size = args[i++];
27965+ void *ptr = (void *) args[i++];
27966+
27967+ process->current_state->vertexPointerSize =
27968+ MAX(process->current_state->vertexPointerSize,
27969+ offset + bytes_size);
27970+ process->current_state->vertexPointer =
27971+ realloc(process->current_state->vertexPointer,
27972+ process->current_state->vertexPointerSize);
27973+ memcpy(process->current_state->vertexPointer + offset, ptr,
27974+ bytes_size);
27975+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27976+ process->current_state->vertexPointer);
27977+ glNormalPointer(normalPointerType, stride,
27978+ process->current_state->vertexPointer +
27979+ normalPointerOffset);
27980+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27981+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
27982+ stride,
27983+ process->current_state->vertexPointer +
27984+ texCoord0PointerOffset);
27985+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
27986+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
27987+ stride,
27988+ process->current_state->vertexPointer +
27989+ texCoord1PointerOffset);
27990+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27991+ process->current_state->
27992+ activeTextureIndex);
27993+ break;
27994+ }
27995+
27996+ case glVertexNormalTexCoord012PointerInterlaced_fake_func:
27997+ {
27998+ int i = 0;
27999+ int offset = args[i++];
28000+ int vertexPointerSize = args[i++];
28001+ int vertexPointerType = args[i++];
28002+ int stride = args[i++];
28003+ int normalPointerOffset = args[i++];
28004+ int normalPointerType = args[i++];
28005+ int texCoord0PointerOffset = args[i++];
28006+ int texCoord0PointerSize = args[i++];
28007+ int texCoord0PointerType = args[i++];
28008+ int texCoord1PointerOffset = args[i++];
28009+ int texCoord1PointerSize = args[i++];
28010+ int texCoord1PointerType = args[i++];
28011+ int texCoord2PointerOffset = args[i++];
28012+ int texCoord2PointerSize = args[i++];
28013+ int texCoord2PointerType = args[i++];
28014+ int bytes_size = args[i++];
28015+ void *ptr = (void *) args[i++];
28016+
28017+ process->current_state->vertexPointerSize =
28018+ MAX(process->current_state->vertexPointerSize,
28019+ offset + bytes_size);
28020+ process->current_state->vertexPointer =
28021+ realloc(process->current_state->vertexPointer,
28022+ process->current_state->vertexPointerSize);
28023+ memcpy(process->current_state->vertexPointer + offset, ptr,
28024+ bytes_size);
28025+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28026+ process->current_state->vertexPointer);
28027+ glNormalPointer(normalPointerType, stride,
28028+ process->current_state->vertexPointer +
28029+ normalPointerOffset);
28030+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28031+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28032+ stride,
28033+ process->current_state->vertexPointer +
28034+ texCoord0PointerOffset);
28035+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
28036+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
28037+ stride,
28038+ process->current_state->vertexPointer +
28039+ texCoord1PointerOffset);
28040+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
28041+ glTexCoordPointer(texCoord2PointerSize, texCoord2PointerType,
28042+ stride,
28043+ process->current_state->vertexPointer +
28044+ texCoord2PointerOffset);
28045+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28046+ process->current_state->
28047+ activeTextureIndex);
28048+ break;
28049+ }
28050+
28051+ case glVertexNormalColorTexCoord0PointerInterlaced_fake_func:
28052+ {
28053+ int i = 0;
28054+ int offset = args[i++];
28055+ int vertexPointerSize = args[i++];
28056+ int vertexPointerType = args[i++];
28057+ int stride = args[i++];
28058+ int normalPointerOffset = args[i++];
28059+ int normalPointerType = args[i++];
28060+ int colorPointerOffset = args[i++];
28061+ int colorPointerSize = args[i++];
28062+ int colorPointerType = args[i++];
28063+ int texCoord0PointerOffset = args[i++];
28064+ int texCoord0PointerSize = args[i++];
28065+ int texCoord0PointerType = args[i++];
28066+ int bytes_size = args[i++];
28067+ void *ptr = (void *) args[i++];
28068+
28069+ process->current_state->vertexPointerSize =
28070+ MAX(process->current_state->vertexPointerSize,
28071+ offset + bytes_size);
28072+ process->current_state->vertexPointer =
28073+ realloc(process->current_state->vertexPointer,
28074+ process->current_state->vertexPointerSize);
28075+ memcpy(process->current_state->vertexPointer + offset, ptr,
28076+ bytes_size);
28077+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28078+ process->current_state->vertexPointer);
28079+ glNormalPointer(normalPointerType, stride,
28080+ process->current_state->vertexPointer +
28081+ normalPointerOffset);
28082+ glColorPointer(colorPointerSize, colorPointerType, stride,
28083+ process->current_state->vertexPointer +
28084+ colorPointerOffset);
28085+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28086+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28087+ stride,
28088+ process->current_state->vertexPointer +
28089+ texCoord0PointerOffset);
28090+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28091+ process->current_state->
28092+ activeTextureIndex);
28093+ break;
28094+ }
28095+
28096+ case glVertexNormalColorTexCoord01PointerInterlaced_fake_func:
28097+ {
28098+ int i = 0;
28099+ int offset = args[i++];
28100+ int vertexPointerSize = args[i++];
28101+ int vertexPointerType = args[i++];
28102+ int stride = args[i++];
28103+ int normalPointerOffset = args[i++];
28104+ int normalPointerType = args[i++];
28105+ int colorPointerOffset = args[i++];
28106+ int colorPointerSize = args[i++];
28107+ int colorPointerType = args[i++];
28108+ int texCoord0PointerOffset = args[i++];
28109+ int texCoord0PointerSize = args[i++];
28110+ int texCoord0PointerType = args[i++];
28111+ int texCoord1PointerOffset = args[i++];
28112+ int texCoord1PointerSize = args[i++];
28113+ int texCoord1PointerType = args[i++];
28114+ int bytes_size = args[i++];
28115+ void *ptr = (void *) args[i++];
28116+
28117+ process->current_state->vertexPointerSize =
28118+ MAX(process->current_state->vertexPointerSize,
28119+ offset + bytes_size);
28120+ process->current_state->vertexPointer =
28121+ realloc(process->current_state->vertexPointer,
28122+ process->current_state->vertexPointerSize);
28123+ memcpy(process->current_state->vertexPointer + offset, ptr,
28124+ bytes_size);
28125+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28126+ process->current_state->vertexPointer);
28127+ glNormalPointer(normalPointerType, stride,
28128+ process->current_state->vertexPointer +
28129+ normalPointerOffset);
28130+ glColorPointer(colorPointerSize, colorPointerType, stride,
28131+ process->current_state->vertexPointer +
28132+ colorPointerOffset);
28133+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28134+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28135+ stride,
28136+ process->current_state->vertexPointer +
28137+ texCoord0PointerOffset);
28138+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
28139+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
28140+ stride,
28141+ process->current_state->vertexPointer +
28142+ texCoord1PointerOffset);
28143+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28144+ process->current_state->
28145+ activeTextureIndex);
28146+ break;
28147+ }
28148+
28149+ case glVertexNormalColorTexCoord012PointerInterlaced_fake_func:
28150+ {
28151+ int i = 0;
28152+ int offset = args[i++];
28153+ int vertexPointerSize = args[i++];
28154+ int vertexPointerType = args[i++];
28155+ int stride = args[i++];
28156+ int normalPointerOffset = args[i++];
28157+ int normalPointerType = args[i++];
28158+ int colorPointerOffset = args[i++];
28159+ int colorPointerSize = args[i++];
28160+ int colorPointerType = args[i++];
28161+ int texCoord0PointerOffset = args[i++];
28162+ int texCoord0PointerSize = args[i++];
28163+ int texCoord0PointerType = args[i++];
28164+ int texCoord1PointerOffset = args[i++];
28165+ int texCoord1PointerSize = args[i++];
28166+ int texCoord1PointerType = args[i++];
28167+ int texCoord2PointerOffset = args[i++];
28168+ int texCoord2PointerSize = args[i++];
28169+ int texCoord2PointerType = args[i++];
28170+ int bytes_size = args[i++];
28171+ void *ptr = (void *) args[i++];
28172+
28173+ process->current_state->vertexPointerSize =
28174+ MAX(process->current_state->vertexPointerSize,
28175+ offset + bytes_size);
28176+ process->current_state->vertexPointer =
28177+ realloc(process->current_state->vertexPointer,
28178+ process->current_state->vertexPointerSize);
28179+ memcpy(process->current_state->vertexPointer + offset, ptr,
28180+ bytes_size);
28181+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28182+ process->current_state->vertexPointer);
28183+ glNormalPointer(normalPointerType, stride,
28184+ process->current_state->vertexPointer +
28185+ normalPointerOffset);
28186+ glColorPointer(colorPointerSize, colorPointerType, stride,
28187+ process->current_state->vertexPointer +
28188+ colorPointerOffset);
28189+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28190+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28191+ stride,
28192+ process->current_state->vertexPointer +
28193+ texCoord0PointerOffset);
28194+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
28195+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
28196+ stride,
28197+ process->current_state->vertexPointer +
28198+ texCoord1PointerOffset);
28199+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
28200+ glTexCoordPointer(texCoord2PointerSize, texCoord2PointerType,
28201+ stride,
28202+ process->current_state->vertexPointer +
28203+ texCoord2PointerOffset);
28204+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28205+ process->current_state->
28206+ activeTextureIndex);
28207+ break;
28208+ }
28209+
28210+ case _glVertexPointer_buffer_func:
28211+ {
28212+ glVertexPointer(args[0], args[1], args[2], (void *) args[3]);
28213+ break;
28214+ }
28215+
28216+ case _glNormalPointer_buffer_func:
28217+ {
28218+ glNormalPointer(args[0], args[1], (void *) args[2]);
28219+ break;
28220+ }
28221+
28222+ case _glColorPointer_buffer_func:
28223+ {
28224+ glColorPointer(args[0], args[1], args[2], (void *) args[3]);
28225+ break;
28226+ }
28227+
28228+ case _glSecondaryColorPointer_buffer_func:
28229+ {
28230+ GET_EXT_PTR(void, glSecondaryColorPointer,
28231+ (int, int, int, void *));
28232+ ptr_func_glSecondaryColorPointer(args[0], args[1], args[2],
28233+ (void *) args[3]);
28234+ break;
28235+ }
28236+
28237+ case _glIndexPointer_buffer_func:
28238+ {
28239+ glIndexPointer(args[0], args[1], (void *) args[2]);
28240+ break;
28241+ }
28242+
28243+ case _glTexCoordPointer_buffer_func:
28244+ {
28245+ glTexCoordPointer(args[0], args[1], args[2], (void *) args[3]);
28246+ break;
28247+ }
28248+
28249+ case _glEdgeFlagPointer_buffer_func:
28250+ {
28251+ glEdgeFlagPointer(args[0], (void *) args[1]);
28252+ break;
28253+ }
28254+
28255+ case _glVertexAttribPointerARB_buffer_func:
28256+ {
28257+ GET_EXT_PTR(void, glVertexAttribPointerARB,
28258+ (int, int, int, int, int, void *));
28259+ ptr_func_glVertexAttribPointerARB(args[0], args[1], args[2],
28260+ args[3], args[4],
28261+ (void *) args[5]);
28262+ break;
28263+ }
28264+
28265+ case _glWeightPointerARB_buffer_func:
28266+ {
28267+ GET_EXT_PTR(void, glWeightPointerARB, (int, int, int, void *));
28268+
28269+ ptr_func_glWeightPointerARB(args[0], args[1], args[2],
28270+ (void *) args[3]);
28271+ break;
28272+ }
28273+
28274+ case _glMatrixIndexPointerARB_buffer_func:
28275+ {
28276+ GET_EXT_PTR(void, glMatrixIndexPointerARB,
28277+ (int, int, int, void *));
28278+ ptr_func_glMatrixIndexPointerARB(args[0], args[1], args[2],
28279+ (void *) args[3]);
28280+ break;
28281+ }
28282+
28283+ case _glFogCoordPointer_buffer_func:
28284+ {
28285+ GET_EXT_PTR(void, glFogCoordPointer, (int, int, void *));
28286+
28287+ ptr_func_glFogCoordPointer(args[0], args[1], (void *) args[2]);
28288+ break;
28289+ }
28290+
28291+ case _glVariantPointerEXT_buffer_func:
28292+ {
28293+ GET_EXT_PTR(void, glVariantPointerEXT, (int, int, int, void *));
28294+
28295+ ptr_func_glVariantPointerEXT(args[0], args[1], args[2],
28296+ (void *) args[3]);
28297+ break;
28298+ }
28299+
28300+ case _glDrawElements_buffer_func:
28301+ {
28302+ glDrawElements(args[0], args[1], args[2], (void *) args[3]);
28303+ break;
28304+ }
28305+
28306+ case _glDrawRangeElements_buffer_func:
28307+ {
28308+ glDrawRangeElements(args[0], args[1], args[2], args[3], args[4],
28309+ (void *) args[5]);
28310+ break;
28311+ }
28312+
28313+ case _glMultiDrawElements_buffer_func:
28314+ {
28315+ GET_EXT_PTR(void, glMultiDrawElements,
28316+ (int, int *, int, void **, int));
28317+ ptr_func_glMultiDrawElements(args[0], (int *) args[1], args[2],
28318+ (void **) args[3], args[4]);
28319+ break;
28320+ }
28321+
28322+ case _glGetError_fake_func:
28323+ {
28324+ break;
28325+ }
28326+
28327+ case glGetIntegerv_func:
28328+ {
28329+ glGetIntegerv(args[0], (int *) args[1]);
28330+ fprintf(stderr, "glGetIntegerv(%x)=%d\n", (int) args[0],
28331+ *(int *) args[1]);
28332+ break;
28333+ }
28334+
28335+ case _glReadPixels_pbo_func:
28336+ {
28337+ glReadPixels(ARG_TO_INT(args[0]), ARG_TO_INT(args[1]),
28338+ ARG_TO_INT(args[2]), ARG_TO_INT(args[3]),
28339+ ARG_TO_UNSIGNED_INT(args[4]),
28340+ ARG_TO_UNSIGNED_INT(args[5]), (void *) (args[6]));
28341+ break;
28342+ }
28343+
28344+ case _glDrawPixels_pbo_func:
28345+ {
28346+ glDrawPixels(ARG_TO_INT(args[0]), ARG_TO_INT(args[1]),
28347+ ARG_TO_UNSIGNED_INT(args[2]),
28348+ ARG_TO_UNSIGNED_INT(args[3]),
28349+ (const void *) (args[4]));
28350+ break;
28351+ }
28352+
28353+ case _glMapBufferARB_fake_func:
28354+ {
28355+ GET_EXT_PTR(GLvoid *, glMapBufferARB, (GLenum, GLenum));
28356+ GET_EXT_PTR(GLboolean, glUnmapBufferARB, (GLenum));
28357+ int target = args[0];
28358+ int size = args[1];
28359+ void *dst_ptr = (void *) args[2];
28360+ void *src_ptr = ptr_func_glMapBufferARB(target, GL_READ_ONLY);
28361+
28362+ if (src_ptr) {
28363+ memcpy(dst_ptr, src_ptr, size);
28364+ ret_int = ptr_func_glUnmapBufferARB(target);
28365+ } else {
28366+ ret_int = 0;
28367+ }
28368+ break;
28369+ }
28370+
28371+ case fake_gluBuild2DMipmaps_func:
28372+ {
28373+ GET_GLU_PTR(GLint, gluBuild2DMipmaps,
28374+ (GLenum arg_0, GLint arg_1, GLsizei arg_2,
28375+ GLsizei arg_3, GLenum arg_4, GLenum arg_5,
28376+ const GLvoid *arg_6));
28377+ if (ptr_func_gluBuild2DMipmaps == NULL)
28378+ ptr_func_gluBuild2DMipmaps = mesa_gluBuild2DMipmaps;
28379+ ptr_func_gluBuild2DMipmaps(ARG_TO_UNSIGNED_INT(args[0]),
28380+ ARG_TO_INT(args[1]),
28381+ ARG_TO_INT(args[2]),
28382+ ARG_TO_INT(args[3]),
28383+ ARG_TO_UNSIGNED_INT(args[4]),
28384+ ARG_TO_UNSIGNED_INT(args[5]),
28385+ (const void *) (args[6]));
28386+ break;
28387+ }
28388+
28389+ case _glSelectBuffer_fake_func:
28390+ {
28391+ process->current_state->selectBufferSize = args[0] * 4;
28392+ process->current_state->selectBufferPtr =
28393+ realloc(process->current_state->selectBufferPtr,
28394+ process->current_state->selectBufferSize);
28395+ glSelectBuffer(args[0], process->current_state->selectBufferPtr);
28396+ break;
28397+ }
28398+
28399+ case _glGetSelectBuffer_fake_func:
28400+ {
28401+ void *ptr = (void *) args[0];
28402+
28403+ memcpy(ptr, process->current_state->selectBufferPtr,
28404+ process->current_state->selectBufferSize);
28405+ break;
28406+ }
28407+
28408+ case _glFeedbackBuffer_fake_func:
28409+ {
28410+ process->current_state->feedbackBufferSize = args[0] * 4;
28411+ process->current_state->feedbackBufferPtr =
28412+ realloc(process->current_state->feedbackBufferPtr,
28413+ process->current_state->feedbackBufferSize);
28414+ glFeedbackBuffer(args[0], args[1],
28415+ process->current_state->feedbackBufferPtr);
28416+ break;
28417+ }
28418+
28419+ case _glGetFeedbackBuffer_fake_func:
28420+ {
28421+ void *ptr = (void *) args[0];
28422+
28423+ memcpy(ptr, process->current_state->feedbackBufferPtr,
28424+ process->current_state->feedbackBufferSize);
28425+ break;
28426+ }
28427+
28428+ /*
28429+ * case glEnableClientState_func: { if (display_function_call)
28430+ * fprintf(stderr, "cap : %s\n", nameArrays[args[0] -
28431+ * GL_VERTEX_ARRAY]); glEnableClientState(args[0]); break; }
28432+ *
28433+ * case glDisableClientState_func: { if (display_function_call)
28434+ * fprintf(stderr, "cap : %s\n", nameArrays[args[0] -
28435+ * GL_VERTEX_ARRAY]); glDisableClientState(args[0]); break; }
28436+ *
28437+ * case glClientActiveTexture_func: case
28438+ * glClientActiveTextureARB_func: { if (display_function_call)
28439+ * fprintf(stderr, "client activeTexture %d\n", args[0] -
28440+ * GL_TEXTURE0_ARB); glClientActiveTextureARB(args[0]); break; }
28441+ *
28442+ * case glActiveTextureARB_func: { if (display_function_call)
28443+ * fprintf(stderr, "server activeTexture %d\n", args[0] -
28444+ * GL_TEXTURE0_ARB); glActiveTextureARB(args[0]); break; }
28445+ *
28446+ * case glLockArraysEXT_func: break;
28447+ *
28448+ * case glUnlockArraysEXT_func: break;
28449+ *
28450+ * case glArrayElement_func: { glArrayElement(args[0]); break; }
28451+ *
28452+ * case glDrawArrays_func: { glDrawArrays(args[0],args[1],args[2]);
28453+ * break; }
28454+ *
28455+ * case glDrawElements_func: {
28456+ * glDrawElements(args[0],args[1],args[2],(void*)args[3]); break; }
28457+ *
28458+ * case glDrawRangeElements_func: {
28459+ * glDrawRangeElements(args[0],args[1],args[2],args[3],args[4],(void*)args[5]);
28460+ * break; } */
28461+
28462+ case glGetError_func:
28463+ {
28464+#ifdef SYSTEMATIC_ERROR_CHECK
28465+ ret_int = process->current_state->last_error;
28466+#else
28467+ ret_int = glGetError();
28468+#endif
28469+ break;
28470+ }
28471+
28472+ case glNewObjectBufferATI_func:
28473+ {
28474+ GET_EXT_PTR(int, glNewObjectBufferATI, (int, void *, int));
28475+
28476+ ret_int = ptr_func_glNewObjectBufferATI(args[0],
28477+ (void *) args[1], args[2]);
28478+ break;
28479+ }
28480+
28481+ case glClear_func:
28482+ /* HACK workaround for an unexplainable issue */
28483+ if (args[0] & GL_COLOR_BUFFER_BIT)
28484+ glClear(GL_COLOR_BUFFER_BIT);
28485+ if (args[0] & GL_STENCIL_BUFFER_BIT)
28486+ glClear(GL_STENCIL_BUFFER_BIT);
28487+ if (args[0] & GL_DEPTH_BUFFER_BIT)
28488+ glClear(GL_DEPTH_BUFFER_BIT);
28489+ if (args[0] & GL_ACCUM_BUFFER_BIT)
28490+ glClear(GL_ACCUM_BUFFER_BIT);
28491+ break;
28492+
28493+ default:
28494+ execute_func(func_number, args, &ret_int, &ret_char);
28495+ break;
28496+ }
28497+
28498+#ifdef SYSTEMATIC_ERROR_CHECK
28499+ if (func_number == glGetError_func) {
28500+ process->current_state->last_error = 0;
28501+ } else {
28502+ process->current_state->last_error = glGetError();
28503+ if (process->current_state->last_error != 0) {
28504+ printf("error %s 0x%x\n", tab_opengl_calls_name[func_number],
28505+ process->current_state->last_error);
28506+ }
28507+ }
28508+#endif
28509+
28510+ switch (ret_type) {
28511+ case TYPE_NONE:
28512+ break;
28513+
28514+ case TYPE_CHAR:
28515+ case TYPE_UNSIGNED_CHAR:
28516+ ret_int = ret_char;
28517+ break;
28518+
28519+ case TYPE_INT:
28520+ case TYPE_UNSIGNED_INT:
28521+ break;
28522+
28523+ case TYPE_CONST_CHAR:
28524+ {
28525+ strncpy(ret_string, (ret_str) ? ret_str : "", 32768);
28526+ break;
28527+ }
28528+
28529+ default:
28530+ fprintf(stderr, "unexpected ret type : %d\n", ret_type);
28531+ exit(-1);
28532+ break;
28533+ }
28534+
28535+ if (display_function_call)
28536+ fprintf(stderr, "[%d]< %s\n", process->instr_counter,
28537+ tab_opengl_calls_name[func_number]);
28538+
28539+ return ret_int;
28540+}
28541Index: qemu-0.14.0/target-i386/opengl_func.h
28542===================================================================
28543--- /dev/null
28544+++ qemu-0.14.0/target-i386/opengl_func.h
28545@@ -0,0 +1,1108 @@
28546+/*
28547+ * Main header for both host and guest sides
28548+ *
28549+ * Copyright (c) 2006,2007 Even Rouault
28550+ *
28551+ * Permission is hereby granted, free of charge, to any person obtaining a copy
28552+ * of this software and associated documentation files (the "Software"), to deal
28553+ * in the Software without restriction, including without limitation the rights
28554+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
28555+ * copies of the Software, and to permit persons to whom the Software is
28556+ * furnished to do so, subject to the following conditions:
28557+ *
28558+ * The above copyright notice and this permission notice shall be included in
28559+ * all copies or substantial portions of the Software.
28560+ *
28561+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28562+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28563+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
28564+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28565+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28566+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28567+ * THE SOFTWARE.
28568+ */
28569+
28570+#include "mesa_gl.h"
28571+#include "mesa_glext.h"
28572+
28573+/* Argument list are internally of a type that can hold a target pointer
28574+ * or a host pointer. */
28575+typedef target_phys_addr_t arg_t;
28576+
28577+enum {
28578+ TYPE_NONE,
28579+ TYPE_CHAR,
28580+ TYPE_UNSIGNED_CHAR,
28581+ TYPE_SHORT,
28582+ TYPE_UNSIGNED_SHORT,
28583+ TYPE_INT,
28584+ TYPE_UNSIGNED_INT,
28585+ TYPE_FLOAT,
28586+ TYPE_DOUBLE,
28587+ TYPE_1CHAR,
28588+ TYPE_2CHAR,
28589+ TYPE_3CHAR,
28590+ TYPE_4CHAR,
28591+ TYPE_128UCHAR,
28592+ TYPE_1SHORT,
28593+ TYPE_2SHORT,
28594+ TYPE_3SHORT,
28595+ TYPE_4SHORT,
28596+ TYPE_1INT,
28597+ TYPE_2INT,
28598+ TYPE_3INT,
28599+ TYPE_4INT,
28600+ TYPE_1FLOAT,
28601+ TYPE_2FLOAT,
28602+ TYPE_3FLOAT,
28603+ TYPE_4FLOAT,
28604+ TYPE_16FLOAT,
28605+ TYPE_1DOUBLE,
28606+ TYPE_2DOUBLE,
28607+ TYPE_3DOUBLE,
28608+ TYPE_4DOUBLE,
28609+ TYPE_16DOUBLE,
28610+ TYPE_OUT_1INT,
28611+ TYPE_OUT_1FLOAT,
28612+ TYPE_OUT_4CHAR,
28613+ TYPE_OUT_4INT,
28614+ TYPE_OUT_4FLOAT,
28615+ TYPE_OUT_4DOUBLE,
28616+ TYPE_OUT_128UCHAR,
28617+ TYPE_CONST_CHAR,
28618+ TYPE_ARRAY_CHAR,
28619+ TYPE_ARRAY_SHORT,
28620+ TYPE_ARRAY_INT,
28621+ TYPE_ARRAY_FLOAT,
28622+ TYPE_ARRAY_DOUBLE,
28623+ TYPE_IN_IGNORED_POINTER,
28624+ TYPE_OUT_ARRAY_CHAR,
28625+ TYPE_OUT_ARRAY_SHORT,
28626+ TYPE_OUT_ARRAY_INT,
28627+ TYPE_OUT_ARRAY_FLOAT,
28628+ TYPE_OUT_ARRAY_DOUBLE,
28629+ TYPE_NULL_TERMINATED_STRING,
28630+
28631+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28632+ TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28633+ TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28634+ TYPE_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28635+ TYPE_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28636+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28637+ TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28638+ TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28639+ TYPE_OUT_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28640+ TYPE_OUT_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28641+ /* .... */
28642+ TYPE_LAST,
28643+ /* .... */
28644+ TYPE_1UCHAR = TYPE_CHAR,
28645+ TYPE_1USHORT = TYPE_1SHORT,
28646+ TYPE_1UINT = TYPE_1INT,
28647+ TYPE_OUT_1UINT = TYPE_OUT_1INT,
28648+ TYPE_OUT_4UCHAR = TYPE_OUT_4CHAR,
28649+ TYPE_ARRAY_VOID = TYPE_ARRAY_CHAR,
28650+ TYPE_ARRAY_SIGNED_CHAR = TYPE_ARRAY_CHAR,
28651+ TYPE_ARRAY_UNSIGNED_CHAR = TYPE_ARRAY_CHAR,
28652+ TYPE_ARRAY_UNSIGNED_SHORT = TYPE_ARRAY_SHORT,
28653+ TYPE_ARRAY_UNSIGNED_INT = TYPE_ARRAY_INT,
28654+ TYPE_OUT_ARRAY_VOID = TYPE_OUT_ARRAY_CHAR,
28655+ TYPE_OUT_ARRAY_SIGNED_CHAR = TYPE_OUT_ARRAY_CHAR,
28656+ TYPE_OUT_ARRAY_UNSIGNED_CHAR = TYPE_OUT_ARRAY_CHAR,
28657+ TYPE_OUT_ARRAY_UNSIGNED_SHORT = TYPE_OUT_ARRAY_SHORT,
28658+ TYPE_OUT_ARRAY_UNSIGNED_INT = TYPE_OUT_ARRAY_INT,
28659+ TYPE_ARRAY_VOID_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28660+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28661+ TYPE_ARRAY_SIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28662+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28663+ TYPE_ARRAY_UNSIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28664+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28665+ TYPE_ARRAY_UNSIGNED_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28666+ TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28667+ TYPE_ARRAY_UNSIGNED_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28668+ TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28669+ TYPE_OUT_ARRAY_VOID_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28670+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28671+ TYPE_OUT_ARRAY_SIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28672+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28673+ TYPE_OUT_ARRAY_UNSIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28674+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28675+ TYPE_OUT_ARRAY_UNSIGNED_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28676+ TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28677+ TYPE_OUT_ARRAY_UNSIGNED_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28678+ TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28679+};
28680+
28681+#define CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS \
28682+ case TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28683+ case TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28684+ case TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28685+ case TYPE_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28686+ case TYPE_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28687+
28688+#define CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS \
28689+ case TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28690+ case TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28691+ case TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28692+ case TYPE_OUT_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28693+ case TYPE_OUT_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28694+
28695+#define CASE_IN_UNKNOWN_SIZE_POINTERS \
28696+ case TYPE_ARRAY_CHAR: \
28697+ case TYPE_ARRAY_SHORT: \
28698+ case TYPE_ARRAY_INT: \
28699+ case TYPE_ARRAY_FLOAT: \
28700+ case TYPE_ARRAY_DOUBLE
28701+
28702+#define CASE_IN_KNOWN_SIZE_POINTERS \
28703+ case TYPE_1CHAR:\
28704+ case TYPE_2CHAR:\
28705+ case TYPE_3CHAR:\
28706+ case TYPE_4CHAR:\
28707+ case TYPE_128UCHAR:\
28708+ case TYPE_1SHORT:\
28709+ case TYPE_2SHORT:\
28710+ case TYPE_3SHORT:\
28711+ case TYPE_4SHORT:\
28712+ case TYPE_1INT:\
28713+ case TYPE_2INT:\
28714+ case TYPE_3INT:\
28715+ case TYPE_4INT:\
28716+ case TYPE_1FLOAT:\
28717+ case TYPE_2FLOAT:\
28718+ case TYPE_3FLOAT:\
28719+ case TYPE_4FLOAT:\
28720+ case TYPE_16FLOAT:\
28721+ case TYPE_1DOUBLE:\
28722+ case TYPE_2DOUBLE:\
28723+ case TYPE_3DOUBLE:\
28724+ case TYPE_4DOUBLE:\
28725+ case TYPE_16DOUBLE
28726+
28727+#define CASE_OUT_UNKNOWN_SIZE_POINTERS \
28728+ case TYPE_OUT_ARRAY_CHAR: \
28729+ case TYPE_OUT_ARRAY_SHORT: \
28730+ case TYPE_OUT_ARRAY_INT: \
28731+ case TYPE_OUT_ARRAY_FLOAT: \
28732+ case TYPE_OUT_ARRAY_DOUBLE
28733+
28734+#define CASE_OUT_KNOWN_SIZE_POINTERS \
28735+ case TYPE_OUT_1INT: \
28736+ case TYPE_OUT_1FLOAT: \
28737+ case TYPE_OUT_4CHAR: \
28738+ case TYPE_OUT_4INT: \
28739+ case TYPE_OUT_4FLOAT: \
28740+ case TYPE_OUT_4DOUBLE: \
28741+ case TYPE_OUT_128UCHAR \
28742+
28743+#define CASE_IN_POINTERS CASE_IN_UNKNOWN_SIZE_POINTERS: CASE_IN_KNOWN_SIZE_POINTERS: CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28744+#define CASE_OUT_POINTERS CASE_OUT_UNKNOWN_SIZE_POINTERS: CASE_OUT_KNOWN_SIZE_POINTERS: CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28745+
28746+#define CASE_POINTERS CASE_IN_POINTERS: CASE_OUT_POINTERS
28747+#define CASE_KNOWN_SIZE_POINTERS CASE_IN_KNOWN_SIZE_POINTERS: CASE_OUT_KNOWN_SIZE_POINTERS
28748+
28749+
28750+#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)
28751+#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)
28752+#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)
28753+#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)
28754+#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)
28755+
28756+#define NB_MAX_TEXTURES 16
28757+#define MY_GL_MAX_VERTEX_ATTRIBS_ARB 16
28758+#define MY_GL_MAX_VERTEX_ATTRIBS_NV 16
28759+#define MY_GL_MAX_VARIANT_POINTER_EXT 16
28760+
28761+static int tab_args_type_length[] = {
28762+ 0,
28763+ sizeof(char),
28764+ sizeof(unsigned char),
28765+ sizeof(short),
28766+ sizeof(unsigned short),
28767+ sizeof(int),
28768+ sizeof(unsigned int),
28769+ sizeof(float),
28770+ sizeof(double),
28771+ 1 * sizeof(char),
28772+ 2 * sizeof(char),
28773+ 3 * sizeof(char),
28774+ 4 * sizeof(char),
28775+ 128 * sizeof(char),
28776+ 1 * sizeof(short),
28777+ 2 * sizeof(short),
28778+ 3 * sizeof(short),
28779+ 4 * sizeof(short),
28780+ 1 * sizeof(int),
28781+ 2 * sizeof(int),
28782+ 3 * sizeof(int),
28783+ 4 * sizeof(int),
28784+ 1 * sizeof(float),
28785+ 2 * sizeof(float),
28786+ 3 * sizeof(float),
28787+ 4 * sizeof(float),
28788+ 16 * sizeof(float),
28789+ 1 * sizeof(double),
28790+ 2 * sizeof(double),
28791+ 3 * sizeof(double),
28792+ 4 * sizeof(double),
28793+ 16 * sizeof(double),
28794+ sizeof(int),
28795+ sizeof(float),
28796+ 4 * sizeof(char),
28797+ 4 * sizeof(int),
28798+ 4 * sizeof(float),
28799+ 4 * sizeof(double),
28800+ 128 * sizeof(char),
28801+ 0,
28802+ 0,
28803+ 0,
28804+ 0,
28805+ 0,
28806+ 0,
28807+ 0,
28808+ 0,
28809+ 0,
28810+ 0,
28811+ 0,
28812+ 0,
28813+ 0,
28814+
28815+ /* the following sizes are the size of 1 element of the array */
28816+ sizeof(char),
28817+ sizeof(short),
28818+ sizeof(int),
28819+ sizeof(float),
28820+ sizeof(double),
28821+ sizeof(char),
28822+ sizeof(short),
28823+ sizeof(int),
28824+ sizeof(float),
28825+ sizeof(double),
28826+};
28827+
28828+typedef struct {
28829+ int ret_type;
28830+ int has_out_parameters;
28831+ int nb_args;
28832+ int args_type[0];
28833+} Signature;
28834+
28835+static const int _init32_signature[] =
28836+ { TYPE_NONE, 1, 2, TYPE_INT, TYPE_OUT_1INT };
28837+static const int _init64_signature[] =
28838+ { TYPE_NONE, 1, 2, TYPE_INT, TYPE_OUT_1INT };
28839+
28840+static const int _synchronize_signature[] = { TYPE_INT, 0, 0 };
28841+
28842+static const int _serialized_calls_signature[] =
28843+ { TYPE_NONE, 0, 1, TYPE_ARRAY_CHAR };
28844+
28845+static const int _exit_process_signature[] = { TYPE_NONE, 0, 0 };
28846+
28847+static const int _changeWindowState_signature[] =
28848+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
28849+
28850+static const int _moveResizeWindow_signature[] =
28851+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_4INT };
28852+
28853+static const int _send_cursor_signature[] =
28854+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT,
28855+ TYPE_INT, TYPE_INT,
28856+ TYPE_INT, TYPE_INT,
28857+ TYPE_ARRAY_INT
28858+};
28859+
28860+/* XVisualInfo* glXChooseVisual( Display *dpy, int screen, int *attribList ) */
28861+static const int glXChooseVisual_signature[] =
28862+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT };
28863+
28864+/*GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis,
28865+ GLXContext shareList, Bool direct )*/
28866+static const int glXCreateContext_signature[] =
28867+ { TYPE_INT, 0, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT };
28868+
28869+static const int glXCopyContext_signature[] =
28870+ { TYPE_NONE, 0, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28871+TYPE_INT };
28872+
28873+/* void glXDestroyContext( Display *dpy, GLXContext ctx ) */
28874+static const int glXDestroyContext_signature[] =
28875+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28876+
28877+/* Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable, GLXContext ctx) */
28878+//static const int glXMakeCurrent_signature[] = {TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT};
28879+/* making it asynchronous */
28880+static const int glXMakeCurrent_signature[] =
28881+ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
28882+
28883+/*int glXGetConfig( Display *dpy, XVisualInfo *visual,
28884+ int attrib, int *value )*/
28885+static const int glXGetConfig_signature[] =
28886+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28887+TYPE_OUT_1INT };
28888+
28889+/* "glXGetConfig_extended"(dpy, visual_id, int n, int* attribs, int* values, int* rets) */
28890+static const int glXGetConfig_extended_signature[] =
28891+ { TYPE_NONE, 1, 6, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28892+TYPE_ARRAY_INT, TYPE_OUT_ARRAY_INT, TYPE_OUT_ARRAY_INT };
28893+
28894+/* void glXSwapBuffers( Display *dpy, GLXDrawable drawable ); */
28895+static const int glXSwapBuffers_signature[] =
28896+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28897+
28898+/* Bool glXQueryVersion( Display *dpy, int *maj, int *min ) */
28899+static const int glXQueryVersion_signature[] =
28900+ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_OUT_1INT, TYPE_OUT_1INT };
28901+
28902+/* Bool glXQueryExtension( Display *dpy, int *errorBase, int *eventBase ) */
28903+static const int glXQueryExtension_signature[] =
28904+ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_OUT_1INT, TYPE_OUT_1INT };
28905+
28906+static const int glXWaitGL_signature[] = { TYPE_INT, 0, 0 };
28907+static const int glXWaitX_signature[] = { TYPE_INT, 0, 0 };
28908+
28909+/* GLX 1.1 and later */
28910+
28911+/* const char *glXGetClientString( Display *dpy, int name ) */
28912+static const int glXGetClientString_signature[] =
28913+ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28914+
28915+/*const char *glXQueryExtensionsString( Display *dpy, int screen ) */
28916+static const int glXQueryExtensionsString_signature[] =
28917+ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28918+
28919+/* const char *glXQueryServerString( Display *dpy, int screen, int name ) */
28920+static const int glXQueryServerString_signature[] =
28921+ { TYPE_CONST_CHAR, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
28922+
28923+
28924+static const int glXGetProcAddress_fake_signature[] =
28925+ { TYPE_INT, 0, 1, TYPE_NULL_TERMINATED_STRING };
28926+
28927+static const int glXGetProcAddress_global_fake_signature[] =
28928+ { TYPE_NONE, 1, 3, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_OUT_ARRAY_CHAR };
28929+
28930+
28931+/* GLX 1.3 and later */
28932+
28933+/*
28934+GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
28935+ const int *attribList, int *nitems ); */
28936+static const int glXChooseFBConfig_signature[] =
28937+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT,
28938+TYPE_OUT_1INT };
28939+
28940+static const int glXChooseFBConfigSGIX_signature[] =
28941+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT,
28942+TYPE_OUT_1INT };
28943+
28944+static const int glXGetFBConfigs_signature[] =
28945+ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_OUT_1INT };
28946+
28947+/* "glXGetFBConfigAttrib_extended"(dpy, fbconfig, int n, int* attribs, int* values, int* rets) */
28948+static const int glXGetFBConfigAttrib_extended_signature[] =
28949+ { TYPE_NONE, 1, 6, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28950+TYPE_ARRAY_INT, TYPE_OUT_ARRAY_INT, TYPE_OUT_ARRAY_INT };
28951+
28952+
28953+/* GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config,
28954+ const int *attribList ) */
28955+static const int glXCreatePbuffer_signature[] =
28956+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT };
28957+
28958+static const int glXCreateGLXPbufferSGIX_signature[] =
28959+ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
28960+TYPE_ARRAY_INT };
28961+
28962+static const int glXDestroyPbuffer_signature[] =
28963+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28964+
28965+static const int glXDestroyGLXPbufferSGIX_signature[] =
28966+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28967+
28968+/* GLXContext glXCreateNewContext(Display * dpy
28969+ GLXFBConfig config
28970+ int renderType
28971+ GLXContext ShareList
28972+ Bool Direct) */
28973+static const int glXCreateNewContext_signature[] =
28974+ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
28975+TYPE_INT };
28976+
28977+static const int glXCreateContextWithConfigSGIX_signature[] =
28978+ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
28979+TYPE_INT };
28980+
28981+/*XVisualInfo *glXGetVisualFromFBConfig( Display *dpy, GLXFBConfig config ) */
28982+static const int glXGetVisualFromFBConfig_signature[] =
28983+ { TYPE_INT, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28984+
28985+/*int glXGetFBConfigAttrib(Display *dpy, GLXFBConfig config, int attribute, int *value)*/
28986+static const int glXGetFBConfigAttrib_signature[] =
28987+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28988+TYPE_OUT_1INT };
28989+
28990+static const int glXGetFBConfigAttribSGIX_signature[] =
28991+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28992+TYPE_OUT_1INT };
28993+
28994+static const int glXQueryContext_signature[] =
28995+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28996+TYPE_OUT_1INT };
28997+
28998+static const int glXQueryGLXPbufferSGIX_signature[] =
28999+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29000+TYPE_OUT_1INT };
29001+
29002+static const int glXQueryDrawable_signature[] =
29003+ { TYPE_NONE, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29004+TYPE_OUT_1INT };
29005+
29006+/* void glXUseXFont( Font font, int first, int count, int list ) */
29007+static const int glXUseXFont_signature[] =
29008+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29009+
29010+/* Bool glXIsDirect( Display *dpy, GLXContext ctx ) */
29011+static const int glXIsDirect_signature[] =
29012+ { TYPE_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29013+
29014+static const int glXGetScreenDriver_signature[] =
29015+ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29016+
29017+static const int glXGetDriverConfig_signature[] =
29018+ { TYPE_CONST_CHAR, 0, 1, TYPE_NULL_TERMINATED_STRING };
29019+
29020+
29021+static const int glXWaitVideoSyncSGI_signature[] =
29022+ { TYPE_INT, 1, 3, TYPE_INT, TYPE_INT, TYPE_OUT_1INT };
29023+
29024+static const int glXGetVideoSyncSGI_signature[] =
29025+ { TYPE_INT, 1, 1, TYPE_OUT_1INT };
29026+
29027+static const int glXSwapIntervalSGI_signature[] =
29028+ { TYPE_INT, 0, 1, TYPE_INT };
29029+
29030+static const int glXBindTexImageATI_signature[] =
29031+ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
29032+static const int glXReleaseTexImageATI_signature[] =
29033+ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
29034+static const int glXBindTexImageARB_signature[] =
29035+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
29036+static const int glXReleaseTexImageARB_signature[] =
29037+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
29038+
29039+/* const GLubyte * glGetString( GLenum name ) */
29040+static const int glGetString_signature[] =
29041+ { TYPE_CONST_CHAR, 0, 1, TYPE_INT };
29042+
29043+/* void glShaderSourceARB (GLhandleARB handle , GLsizei size, const GLcharARB* *p_tab_prog, const GLint * tab_length) */
29044+/* --> void glShaderSourceARB (GLhandleARB handle , GLsizei size, const GLcharARB* all_progs, const GLint * tab_length) */
29045+static const int glShaderSourceARB_fake_signature[] =
29046+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_ARRAY_INT };
29047+static const int glShaderSource_fake_signature[] =
29048+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_ARRAY_INT };
29049+
29050+static const int glVertexPointer_fake_signature[] =
29051+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29052+TYPE_ARRAY_CHAR };
29053+static const int glNormalPointer_fake_signature[] =
29054+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29055+TYPE_ARRAY_CHAR };
29056+static const int glColorPointer_fake_signature[] =
29057+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29058+TYPE_ARRAY_CHAR };
29059+static const int glSecondaryColorPointer_fake_signature[] =
29060+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29061+TYPE_ARRAY_CHAR };
29062+static const int glIndexPointer_fake_signature[] =
29063+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29064+TYPE_ARRAY_CHAR };
29065+static const int glTexCoordPointer_fake_signature[] =
29066+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29067+TYPE_INT, TYPE_ARRAY_CHAR };
29068+static const int glEdgeFlagPointer_fake_signature[] =
29069+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29070+static const int glVertexAttribPointerARB_fake_signature[] =
29071+ { TYPE_NONE, 0, 8, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29072+TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29073+static const int glVertexAttribPointerNV_fake_signature[] =
29074+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29075+TYPE_INT, TYPE_ARRAY_CHAR };
29076+static const int glWeightPointerARB_fake_signature[] =
29077+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29078+TYPE_ARRAY_CHAR };
29079+static const int glMatrixIndexPointerARB_fake_signature[] =
29080+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29081+TYPE_ARRAY_CHAR };
29082+static const int glFogCoordPointer_fake_signature[] =
29083+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29084+TYPE_ARRAY_CHAR };
29085+static const int glInterleavedArrays_fake_signature[] =
29086+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29087+TYPE_ARRAY_CHAR };
29088+static const int glElementPointerATI_fake_signature[] =
29089+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29090+static const int glVariantPointerEXT_fake_signature[] =
29091+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29092+TYPE_ARRAY_CHAR };
29093+static const int glTuxRacerDrawElements_fake_signature[] =
29094+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29095+static const int glVertexAndNormalPointer_fake_signature[] =
29096+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29097+TYPE_INT, TYPE_ARRAY_CHAR };
29098+static const int glTexCoordPointer01_fake_signature[] =
29099+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29100+TYPE_ARRAY_CHAR };
29101+static const int glTexCoordPointer012_fake_signature[] =
29102+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29103+TYPE_ARRAY_CHAR };
29104+static const int glVertexNormalPointerInterlaced_fake_signature[] =
29105+ { TYPE_NONE, 0, 8, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29106+TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29107+static const int glVertexNormalColorPointerInterlaced_fake_signature[] =
29108+ { TYPE_NONE, 0, 11, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29109+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29110+static const int glVertexColorTexCoord0PointerInterlaced_fake_signature[] =
29111+ { TYPE_NONE, 0, 12, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29112+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29113+static const int glVertexNormalTexCoord0PointerInterlaced_fake_signature[] =
29114+ { TYPE_NONE, 0, 11, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29115+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29116+static const int glVertexNormalTexCoord01PointerInterlaced_fake_signature[] =
29117+ { TYPE_NONE, 0, 14, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29118+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29119+static const int glVertexNormalTexCoord012PointerInterlaced_fake_signature[] =
29120+ { TYPE_NONE, 0, 17, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29121+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 };
29122+static const int
29123+ glVertexNormalColorTexCoord0PointerInterlaced_fake_signature[] =
29124+ { TYPE_NONE, 0, 14, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29125+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29126+TYPE_ARRAY_CHAR };
29127+static const int
29128+ glVertexNormalColorTexCoord01PointerInterlaced_fake_signature[] =
29129+ { TYPE_NONE, 0, 17, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29130+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29131+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29132+static const int
29133+ glVertexNormalColorTexCoord012PointerInterlaced_fake_signature[] =
29134+ { TYPE_NONE, 0, 20, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29135+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29136+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29137+
29138+static const int glGenTextures_fake_signature[] =
29139+ { TYPE_NONE, 0, 1, TYPE_INT };
29140+static const int glGenBuffersARB_fake_signature[] =
29141+ { TYPE_NONE, 0, 1, TYPE_INT };
29142+static const int glGenLists_fake_signature[] = { TYPE_NONE, 0, 1, TYPE_INT };
29143+
29144+static const int _glDrawElements_buffer_signature[] =
29145+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29146+static const int _glDrawRangeElements_buffer_signature[] =
29147+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29148+TYPE_INT };
29149+static const int _glMultiDrawElements_buffer_signature[] =
29150+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_ARRAY_INT, TYPE_INT, TYPE_ARRAY_INT,
29151+TYPE_INT };
29152+
29153+static const int _glVertexPointer_buffer_signature[] =
29154+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29155+static const int _glNormalPointer_buffer_signature[] =
29156+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
29157+static const int _glColorPointer_buffer_signature[] =
29158+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29159+static const int _glSecondaryColorPointer_buffer_signature[] =
29160+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29161+static const int _glIndexPointer_buffer_signature[] =
29162+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
29163+static const int _glTexCoordPointer_buffer_signature[] =
29164+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29165+static const int _glEdgeFlagPointer_buffer_signature[] =
29166+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
29167+static const int _glVertexAttribPointerARB_buffer_signature[] =
29168+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29169+TYPE_INT };
29170+static const int _glWeightPointerARB_buffer_signature[] =
29171+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29172+static const int _glMatrixIndexPointerARB_buffer_signature[] =
29173+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29174+static const int _glFogCoordPointer_buffer_signature[] =
29175+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
29176+static const int _glVariantPointerEXT_buffer_signature[] =
29177+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29178+
29179+static const int _glReadPixels_pbo_signature[] =
29180+ { TYPE_INT, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29181+TYPE_INT, TYPE_INT };
29182+static const int _glDrawPixels_pbo_signature[] =
29183+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29184+static const int _glMapBufferARB_fake_signature[] =
29185+ { TYPE_INT, 1, 3, TYPE_INT, TYPE_INT, TYPE_OUT_ARRAY_CHAR };
29186+
29187+static const int _glSelectBuffer_fake_signature[] =
29188+ { TYPE_NONE, 0, 1, TYPE_INT };
29189+static const int _glGetSelectBuffer_fake_signature[] =
29190+ { TYPE_NONE, 1, 1, TYPE_ARRAY_CHAR };
29191+static const int _glFeedbackBuffer_fake_signature[] =
29192+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
29193+static const int _glGetFeedbackBuffer_fake_signature[] =
29194+ { TYPE_NONE, 1, 1, TYPE_ARRAY_CHAR };
29195+
29196+static const int _glGetError_fake_signature[] = { TYPE_NONE, 0, 0 };
29197+
29198+#define timesynchro_func -1
29199+#define memorize_array_func -2
29200+#define reuse_array_func -3
29201+
29202+#include "gl_func.h"
29203+
29204+static GLint __glTexParameter_size(FILE *err_file, GLenum pname)
29205+{
29206+ switch (pname) {
29207+ case GL_TEXTURE_MAG_FILTER:
29208+ case GL_TEXTURE_MIN_FILTER:
29209+ case GL_TEXTURE_WRAP_S:
29210+ case GL_TEXTURE_WRAP_T:
29211+ case GL_TEXTURE_PRIORITY:
29212+ case GL_TEXTURE_WRAP_R:
29213+ case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
29214+/* case GL_SHADOW_AMBIENT_SGIX:*/
29215+ case GL_TEXTURE_MIN_LOD:
29216+ case GL_TEXTURE_MAX_LOD:
29217+ case GL_TEXTURE_BASE_LEVEL:
29218+ case GL_TEXTURE_MAX_LEVEL:
29219+ case GL_TEXTURE_CLIPMAP_FRAME_SGIX:
29220+ case GL_TEXTURE_LOD_BIAS_S_SGIX:
29221+ case GL_TEXTURE_LOD_BIAS_T_SGIX:
29222+ case GL_TEXTURE_LOD_BIAS_R_SGIX:
29223+ case GL_GENERATE_MIPMAP:
29224+/* case GL_GENERATE_MIPMAP_SGIS:*/
29225+ case GL_TEXTURE_COMPARE_SGIX:
29226+ case GL_TEXTURE_COMPARE_OPERATOR_SGIX:
29227+ case GL_TEXTURE_MAX_CLAMP_S_SGIX:
29228+ case GL_TEXTURE_MAX_CLAMP_T_SGIX:
29229+ case GL_TEXTURE_MAX_CLAMP_R_SGIX:
29230+ case GL_TEXTURE_MAX_ANISOTROPY_EXT:
29231+ case GL_TEXTURE_LOD_BIAS:
29232+/* case GL_TEXTURE_LOD_BIAS_EXT:*/
29233+ case GL_DEPTH_TEXTURE_MODE:
29234+/* case GL_DEPTH_TEXTURE_MODE_ARB:*/
29235+ case GL_TEXTURE_COMPARE_MODE:
29236+/* case GL_TEXTURE_COMPARE_MODE_ARB:*/
29237+ case GL_TEXTURE_COMPARE_FUNC:
29238+/* case GL_TEXTURE_COMPARE_FUNC_ARB:*/
29239+ case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV:
29240+ return 1;
29241+ case GL_TEXTURE_CLIPMAP_CENTER_SGIX:
29242+ case GL_TEXTURE_CLIPMAP_OFFSET_SGIX:
29243+ return 2;
29244+ case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX:
29245+ return 3;
29246+ case GL_TEXTURE_BORDER_COLOR:
29247+ case GL_POST_TEXTURE_FILTER_BIAS_SGIX:
29248+ case GL_POST_TEXTURE_FILTER_SCALE_SGIX:
29249+ return 4;
29250+ default:
29251+ fprintf(err_file, "unhandled pname = %d\n", pname);
29252+ return 0;
29253+ }
29254+}
29255+
29256+static int __glLight_size(FILE *err_file, GLenum pname)
29257+{
29258+ switch (pname) {
29259+ case GL_AMBIENT:
29260+ case GL_DIFFUSE:
29261+ case GL_SPECULAR:
29262+ case GL_POSITION:
29263+ return 4;
29264+ break;
29265+
29266+ case GL_SPOT_DIRECTION:
29267+ return 3;
29268+ break;
29269+
29270+ case GL_SPOT_EXPONENT:
29271+ case GL_SPOT_CUTOFF:
29272+ case GL_CONSTANT_ATTENUATION:
29273+ case GL_LINEAR_ATTENUATION:
29274+ case GL_QUADRATIC_ATTENUATION:
29275+ return 1;
29276+ break;
29277+
29278+ default:
29279+ fprintf(err_file, "unhandled pname = %d\n", pname);
29280+ return 0;
29281+ }
29282+}
29283+
29284+static int __glMaterial_size(FILE *err_file, GLenum pname)
29285+{
29286+ switch (pname) {
29287+ case GL_AMBIENT:
29288+ case GL_DIFFUSE:
29289+ case GL_SPECULAR:
29290+ case GL_EMISSION:
29291+ case GL_AMBIENT_AND_DIFFUSE:
29292+ return 4;
29293+ break;
29294+
29295+ case GL_SHININESS:
29296+ return 1;
29297+ break;
29298+
29299+ case GL_COLOR_INDEXES:
29300+ return 3;
29301+ break;
29302+
29303+ default:
29304+ fprintf(err_file, "unhandled pname = %d\n", pname);
29305+ return 0;
29306+ }
29307+}
29308+
29309+static inline int compute_arg_length(FILE *err_file, int func_number,
29310+ int arg_i, arg_t *args)
29311+{
29312+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
29313+ int *args_type = signature->args_type;
29314+
29315+ switch (func_number) {
29316+ case glProgramNamedParameter4fNV_func:
29317+ case glProgramNamedParameter4dNV_func:
29318+ case glProgramNamedParameter4fvNV_func:
29319+ case glProgramNamedParameter4dvNV_func:
29320+ case glGetProgramNamedParameterfvNV_func:
29321+ case glGetProgramNamedParameterdvNV_func:
29322+ if (arg_i == 2)
29323+ return 1 * args[arg_i - 1] *
29324+ tab_args_type_length[args_type[arg_i]];
29325+ break;
29326+
29327+ case glProgramStringARB_func:
29328+ case glLoadProgramNV_func:
29329+ case glGenProgramsNV_func:
29330+ case glDeleteProgramsNV_func:
29331+ case glGenProgramsARB_func:
29332+ case glDeleteProgramsARB_func:
29333+ case glRequestResidentProgramsNV_func:
29334+ case glDrawBuffers_func:
29335+ case glDrawBuffersARB_func:
29336+ case glDrawBuffersATI_func:
29337+ case glDeleteBuffers_func:
29338+ case glDeleteBuffersARB_func:
29339+ case glDeleteTextures_func:
29340+ case glDeleteTexturesEXT_func:
29341+ case glGenFramebuffersEXT_func:
29342+ case glDeleteFramebuffersEXT_func:
29343+ case glGenRenderbuffersEXT_func:
29344+ case glDeleteRenderbuffersEXT_func:
29345+ case glGenQueries_func:
29346+ case glGenQueriesARB_func:
29347+ case glDeleteQueries_func:
29348+ case glDeleteQueriesARB_func:
29349+ case glGenOcclusionQueriesNV_func:
29350+ case glDeleteOcclusionQueriesNV_func:
29351+ case glGenFencesNV_func:
29352+ case glDeleteFencesNV_func:
29353+ case glUniform1fv_func:
29354+ case glUniform1iv_func:
29355+ case glUniform1fvARB_func:
29356+ case glUniform1ivARB_func:
29357+ case glUniform1uivEXT_func:
29358+ case glVertexAttribs1dvNV_func:
29359+ case glVertexAttribs1fvNV_func:
29360+ case glVertexAttribs1svNV_func:
29361+ case glVertexAttribs1hvNV_func:
29362+ case glWeightbvARB_func:
29363+ case glWeightsvARB_func:
29364+ case glWeightivARB_func:
29365+ case glWeightfvARB_func:
29366+ case glWeightdvARB_func:
29367+ case glWeightubvARB_func:
29368+ case glWeightusvARB_func:
29369+ case glWeightuivARB_func:
29370+ case glPixelMapfv_func:
29371+ case glPixelMapuiv_func:
29372+ case glPixelMapusv_func:
29373+ case glProgramBufferParametersfvNV_func:
29374+ case glProgramBufferParametersIivNV_func:
29375+ case glProgramBufferParametersIuivNV_func:
29376+ case glTransformFeedbackAttribsNV_func:
29377+ case glTransformFeedbackVaryingsNV_func:
29378+ if (arg_i == signature->nb_args - 1)
29379+ return 1 * args[arg_i - 1] *
29380+ tab_args_type_length[args_type[arg_i]];
29381+ break;
29382+
29383+ case glUniform2fv_func:
29384+ case glUniform2iv_func:
29385+ case glUniform2fvARB_func:
29386+ case glUniform2ivARB_func:
29387+ case glUniform2uivEXT_func:
29388+ case glVertexAttribs2dvNV_func:
29389+ case glVertexAttribs2fvNV_func:
29390+ case glVertexAttribs2svNV_func:
29391+ case glVertexAttribs2hvNV_func:
29392+ case glDetailTexFuncSGIS_func:
29393+ case glSharpenTexFuncSGIS_func:
29394+ if (arg_i == signature->nb_args - 1)
29395+ return 2 * args[arg_i - 1] *
29396+ tab_args_type_length[args_type[arg_i]];
29397+ break;
29398+
29399+ case glUniform3fv_func:
29400+ case glUniform3iv_func:
29401+ case glUniform3fvARB_func:
29402+ case glUniform3ivARB_func:
29403+ case glUniform3uivEXT_func:
29404+ case glVertexAttribs3dvNV_func:
29405+ case glVertexAttribs3fvNV_func:
29406+ case glVertexAttribs3svNV_func:
29407+ case glVertexAttribs3hvNV_func:
29408+ if (arg_i == signature->nb_args - 1)
29409+ return 3 * args[arg_i - 1] *
29410+ tab_args_type_length[args_type[arg_i]];
29411+ break;
29412+
29413+ case glUniform4fv_func:
29414+ case glUniform4iv_func:
29415+ case glUniform4fvARB_func:
29416+ case glUniform4ivARB_func:
29417+ case glUniform4uivEXT_func:
29418+ case glVertexAttribs4dvNV_func:
29419+ case glVertexAttribs4fvNV_func:
29420+ case glVertexAttribs4svNV_func:
29421+ case glVertexAttribs4hvNV_func:
29422+ case glVertexAttribs4ubvNV_func:
29423+ case glProgramParameters4fvNV_func:
29424+ case glProgramParameters4dvNV_func:
29425+ case glProgramLocalParameters4fvEXT_func:
29426+ case glProgramEnvParameters4fvEXT_func:
29427+ case glProgramLocalParametersI4ivNV_func:
29428+ case glProgramLocalParametersI4uivNV_func:
29429+ case glProgramEnvParametersI4ivNV_func:
29430+ case glProgramEnvParametersI4uivNV_func:
29431+ if (arg_i == signature->nb_args - 1)
29432+ return 4 * args[arg_i - 1] *
29433+ tab_args_type_length[args_type[arg_i]];
29434+ break;
29435+
29436+ case glPrioritizeTextures_func:
29437+ case glPrioritizeTexturesEXT_func:
29438+ case glAreProgramsResidentNV_func:
29439+ case glAreTexturesResident_func:
29440+ case glAreTexturesResidentEXT_func:
29441+ if (arg_i == 1 || arg_i == 2)
29442+ return args[0] * tab_args_type_length[args_type[arg_i]];
29443+ break;
29444+
29445+ case glLightfv_func:
29446+ case glLightiv_func:
29447+ case glGetLightfv_func:
29448+ case glGetLightiv_func:
29449+ case glFragmentLightfvSGIX_func:
29450+ case glFragmentLightivSGIX_func:
29451+ case glGetFragmentLightfvSGIX_func:
29452+ case glGetFragmentLightivSGIX_func:
29453+ if (arg_i == signature->nb_args - 1)
29454+ return __glLight_size(err_file,
29455+ args[arg_i -
29456+ 1]) *
29457+ tab_args_type_length[args_type[arg_i]];
29458+ break;
29459+
29460+ case glLightModelfv_func:
29461+ case glLightModeliv_func:
29462+ if (arg_i == signature->nb_args - 1)
29463+ return ((args[arg_i - 1] ==
29464+ GL_LIGHT_MODEL_AMBIENT) ? 4 : 1) *
29465+ tab_args_type_length[args_type[arg_i]];
29466+ break;
29467+
29468+ case glFragmentLightModelfvSGIX_func:
29469+ case glFragmentLightModelivSGIX_func:
29470+ if (arg_i == signature->nb_args - 1)
29471+ return ((args[arg_i - 1] ==
29472+ GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX) ? 4 : 1) *
29473+ tab_args_type_length[args_type[arg_i]];
29474+ break;
29475+
29476+ case glMaterialfv_func:
29477+ case glMaterialiv_func:
29478+ case glGetMaterialfv_func:
29479+ case glGetMaterialiv_func:
29480+ case glFragmentMaterialfvSGIX_func:
29481+ case glFragmentMaterialivSGIX_func:
29482+ case glGetFragmentMaterialfvSGIX_func:
29483+ case glGetFragmentMaterialivSGIX_func:
29484+ if (arg_i == signature->nb_args - 1)
29485+ return __glMaterial_size(err_file,
29486+ args[arg_i -
29487+ 1]) *
29488+ tab_args_type_length[args_type[arg_i]];
29489+ break;
29490+
29491+ case glTexParameterfv_func:
29492+ case glTexParameteriv_func:
29493+ case glGetTexParameterfv_func:
29494+ case glGetTexParameteriv_func:
29495+ case glTexParameterIivEXT_func:
29496+ case glTexParameterIuivEXT_func:
29497+ case glGetTexParameterIivEXT_func:
29498+ case glGetTexParameterIuivEXT_func:
29499+ if (arg_i == signature->nb_args - 1)
29500+ return __glTexParameter_size(err_file,
29501+ args[arg_i -
29502+ 1]) *
29503+ tab_args_type_length[args_type[arg_i]];
29504+ break;
29505+
29506+ case glFogiv_func:
29507+ case glFogfv_func:
29508+ if (arg_i == signature->nb_args - 1)
29509+ return ((args[arg_i - 1] ==
29510+ GL_FOG_COLOR) ? 4 : 1) *
29511+ tab_args_type_length[args_type[arg_i]];
29512+ break;
29513+
29514+ case glTexGendv_func:
29515+ case glTexGenfv_func:
29516+ case glTexGeniv_func:
29517+ case glGetTexGendv_func:
29518+ case glGetTexGenfv_func:
29519+ case glGetTexGeniv_func:
29520+ if (arg_i == signature->nb_args - 1)
29521+ return ((args[arg_i - 1] ==
29522+ GL_TEXTURE_GEN_MODE) ? 1 : 4) *
29523+ tab_args_type_length[args_type[arg_i]];
29524+ break;
29525+
29526+ case glTexEnvfv_func:
29527+ case glTexEnviv_func:
29528+ case glGetTexEnvfv_func:
29529+ case glGetTexEnviv_func:
29530+ if (arg_i == signature->nb_args - 1)
29531+ return ((args[arg_i - 1] ==
29532+ GL_TEXTURE_ENV_MODE) ? 1 : 4) *
29533+ tab_args_type_length[args_type[arg_i]];
29534+ break;
29535+
29536+ case glConvolutionParameterfv_func:
29537+ case glConvolutionParameteriv_func:
29538+ case glGetConvolutionParameterfv_func:
29539+ case glGetConvolutionParameteriv_func:
29540+ case glConvolutionParameterfvEXT_func:
29541+ case glConvolutionParameterivEXT_func:
29542+ case glGetConvolutionParameterfvEXT_func:
29543+ case glGetConvolutionParameterivEXT_func:
29544+ if (arg_i == signature->nb_args - 1)
29545+ return ((args[arg_i - 1] == GL_CONVOLUTION_BORDER_COLOR ||
29546+ args[arg_i - 1] == GL_CONVOLUTION_FILTER_SCALE ||
29547+ args[arg_i - 1] ==
29548+ GL_CONVOLUTION_FILTER_BIAS) ? 4 : 1) *
29549+ tab_args_type_length[args_type[arg_i]];
29550+ break;
29551+
29552+ case glGetVertexAttribfvARB_func:
29553+ case glGetVertexAttribfvNV_func:
29554+ case glGetVertexAttribfv_func:
29555+ case glGetVertexAttribdvARB_func:
29556+ case glGetVertexAttribdvNV_func:
29557+ case glGetVertexAttribdv_func:
29558+ case glGetVertexAttribivARB_func:
29559+ case glGetVertexAttribivNV_func:
29560+ case glGetVertexAttribiv_func:
29561+ case glGetVertexAttribIivEXT_func:
29562+ case glGetVertexAttribIuivEXT_func:
29563+ if (arg_i == signature->nb_args - 1)
29564+ return ((args[arg_i - 1] ==
29565+ GL_CURRENT_VERTEX_ATTRIB_ARB) ? 4 : 1) *
29566+ tab_args_type_length[args_type[arg_i]];
29567+ break;
29568+
29569+
29570+ case glPointParameterfv_func:
29571+ case glPointParameterfvEXT_func:
29572+ case glPointParameterfvARB_func:
29573+ case glPointParameterfvSGIS_func:
29574+ case glPointParameteriv_func:
29575+ case glPointParameterivEXT_func:
29576+ if (arg_i == signature->nb_args - 1)
29577+ return ((args[arg_i - 1] ==
29578+ GL_POINT_DISTANCE_ATTENUATION) ? 3 : 1) *
29579+ tab_args_type_length[args_type[arg_i]];
29580+ break;
29581+
29582+ case glUniformMatrix2fv_func:
29583+ case glUniformMatrix2fvARB_func:
29584+ if (arg_i == signature->nb_args - 1)
29585+ return 2 * 2 * args[1] * tab_args_type_length[args_type[arg_i]];
29586+ break;
29587+
29588+ case glUniformMatrix3fv_func:
29589+ case glUniformMatrix3fvARB_func:
29590+ if (arg_i == signature->nb_args - 1)
29591+ return 3 * 3 * args[1] * tab_args_type_length[args_type[arg_i]];
29592+ break;
29593+
29594+ case glUniformMatrix4fv_func:
29595+ case glUniformMatrix4fvARB_func:
29596+ if (arg_i == signature->nb_args - 1)
29597+ return 4 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
29598+ break;
29599+
29600+ case glUniformMatrix2x3fv_func:
29601+ case glUniformMatrix3x2fv_func:
29602+ if (arg_i == signature->nb_args - 1)
29603+ return 2 * 3 * args[1] * tab_args_type_length[args_type[arg_i]];
29604+ break;
29605+
29606+ case glUniformMatrix2x4fv_func:
29607+ case glUniformMatrix4x2fv_func:
29608+ if (arg_i == signature->nb_args - 1)
29609+ return 2 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
29610+ break;
29611+
29612+ case glUniformMatrix3x4fv_func:
29613+ case glUniformMatrix4x3fv_func:
29614+ if (arg_i == signature->nb_args - 1)
29615+ return 3 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
29616+ break;
29617+
29618+ case glSpriteParameterivSGIX_func:
29619+ case glSpriteParameterfvSGIX_func:
29620+ if (arg_i == signature->nb_args - 1)
29621+ return ((args[arg_i - 1] ==
29622+ GL_SPRITE_MODE_SGIX) ? 1 : 3) *
29623+ tab_args_type_length[args_type[arg_i]];
29624+ break;
29625+
29626+ default:
29627+ break;
29628+ }
29629+
29630+ fprintf(err_file,
29631+ "invalid combination for compute_arg_length : func_number=%d, arg_i=%d\n",
29632+ func_number, arg_i);
29633+ return 0;
29634+}
29635+
29636+#define IS_NULL_POINTER_OK_FOR_FUNC(func_number) \
29637+ (func_number == glBitmap_func || \
29638+ func_number == _send_cursor_func || \
29639+ func_number == glTexImage1D_func || \
29640+ func_number == glTexImage2D_func || \
29641+ func_number == glTexImage3D_func || \
29642+ func_number == glBufferDataARB_func || \
29643+ func_number == glNewObjectBufferATI_func)
29644+
29645+#ifdef __amd64__
29646+#define _init_func _init64_func
29647+#else
29648+#ifdef __i386__
29649+#define _init_func _init32_func
29650+#else
29651+#error Unsupported ABI
29652+#endif
29653+#endif
29654Index: qemu-0.14.0/target-i386/opengl_player.c
29655===================================================================
29656--- /dev/null
29657+++ qemu-0.14.0/target-i386/opengl_player.c
29658@@ -0,0 +1,1461 @@
29659+/*
29660+ * Plays a sequence of OpenGL calls recorded either under qemu or with opengl_server
29661+ *
29662+ * Copyright (c) 2007 Even Rouault
29663+ *
29664+ * Permission is hereby granted, free of charge, to any person obtaining a copy
29665+ * of this software and associated documentation files (the "Software"), to deal
29666+ * in the Software without restriction, including without limitation the rights
29667+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
29668+ * copies of the Software, and to permit persons to whom the Software is
29669+ * furnished to do so, subject to the following conditions:
29670+ *
29671+ * The above copyright notice and this permission notice shall be included in
29672+ * all copies or substantial portions of the Software.
29673+ *
29674+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
29675+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29676+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
29677+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29678+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29679+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
29680+ * THE SOFTWARE.
29681+ */
29682+
29683+/* gcc -O2 -g -Wall opengl_player.c opengl_exec.c -o opengl_player -I../i386-softmmu -I. -I.. -lGL */
29684+
29685+#include <stdlib.h>
29686+#include <stdio.h>
29687+#include <string.h>
29688+#include <assert.h>
29689+#include <unistd.h>
29690+#include <sys/time.h>
29691+#include <math.h>
29692+
29693+#include <GL/gl.h>
29694+#include <X11/Xlib.h>
29695+
29696+// TODO
29697+typedef long unsigned int target_phys_addr_t;
29698+
29699+#include "opengl_func.h"
29700+#include "opengl_utils.h"
29701+
29702+//#include "ffmpeg/avcodec.h"
29703+
29704+extern void init_process_tab(void);
29705+extern int do_function_call(int, arg_t *, char *);
29706+
29707+void do_disconnect_current(void);
29708+void do_context_switch(Display *dpy, pid_t pid, int call);
29709+
29710+typedef struct {
29711+ int n_used;
29712+ unsigned int crc;
29713+ int size;
29714+ long long last_use;
29715+} RecordBufferedArray;
29716+
29717+typedef struct {
29718+ int size;
29719+ long file_offset;
29720+} ReplayBufferedArray;
29721+
29722+#define N_BUFFERED_ARRAYS 1024
29723+RecordBufferedArray recordBufferedArrays[N_BUFFERED_ARRAYS];
29724+
29725+#define INSTR_WINDOW_SIZE 65536
29726+short instrWindow[INSTR_WINDOW_SIZE];
29727+int instrWindowCount = 0;
29728+int instrWindowPtr = 0;
29729+int instrWindowBeginPtr = 0;
29730+
29731+#include "ghash.c"
29732+
29733+#define PRIME 131
29734+
29735+typedef struct {
29736+ int iFirstOccur;
29737+ int nbOccur;
29738+ int hash;
29739+} SeqDesc;
29740+
29741+typedef struct {
29742+ int hash;
29743+ int offset;
29744+} HashElt;
29745+
29746+int sort_hash_N;
29747+short *sort_hash_tab;
29748+int count_compar;
29749+int collision_detected;
29750+
29751+static int sort_hash(const void *ptrA, const void *ptrB)
29752+{
29753+ const HashElt *a = (const HashElt *) ptrA;
29754+ const HashElt *b = (const HashElt *) ptrB;
29755+
29756+ count_compar++;
29757+ if (a->hash == b->hash) {
29758+ int j;
29759+
29760+ for (j = 0; j < sort_hash_N; j++) {
29761+ if (sort_hash_tab[a->offset + j] != sort_hash_tab[b->offset + j]) {
29762+ collision_detected = 1;
29763+ // fprintf(stderr, "collision de hash !\n");
29764+ return sort_hash_tab[a->offset + j] <
29765+ sort_hash_tab[b->offset + j] ? -1 : 1;
29766+ }
29767+ }
29768+ return a->offset - b->offset;
29769+ } else if (a->hash < b->hash)
29770+ return -1;
29771+ else
29772+ return 1;
29773+}
29774+
29775+static int sort_seq_desc_by_occur(const void *ptrA, const void *ptrB)
29776+{
29777+ const SeqDesc *a = (const SeqDesc *) ptrA;
29778+ const SeqDesc *b = (const SeqDesc *) ptrB;
29779+
29780+ return b->nbOccur - a->nbOccur;
29781+}
29782+
29783+static int sort_seq_desc_by_offset(const void *ptrA, const void *ptrB)
29784+{
29785+ const SeqDesc *a = (const SeqDesc *) ptrA;
29786+ const SeqDesc *b = (const SeqDesc *) ptrB;
29787+
29788+ return a->iFirstOccur - b->iFirstOccur;
29789+}
29790+
29791+void find_repeated_seq(short *tab, int iStart, int length)
29792+{
29793+ // SimpleHashTable* tableHash = simple_hash_table_new(free);
29794+ int N = 10;
29795+ int i;
29796+ int hash = 0;
29797+ int primeN = 1;
29798+ HashElt *tabHash = malloc(sizeof(HashElt) * (length - N + 1));
29799+
29800+ short *new_tab = malloc(sizeof(short) * length);
29801+ memcpy(&new_tab[0], &tab[iStart], sizeof(short) * (length - iStart));
29802+ memcpy(&new_tab[length - iStart], &tab[0], sizeof(short) * iStart);
29803+ tab = new_tab;
29804+
29805+ sort_hash_N = N;
29806+ sort_hash_tab = tab;
29807+
29808+ fprintf(stderr, "(start) iStart = %d\n", iStart);
29809+ for (i = 0; i < N; i++) {
29810+ primeN *= PRIME;
29811+ }
29812+ for (i = 0; i < length; i++) {
29813+ hash = hash * PRIME + tab[i];
29814+ if (i >= N) {
29815+ hash -= tab[i - N] * primeN;
29816+ }
29817+ if (i >= N - 1) {
29818+ tabHash[i - (N - 1)].offset = i - (N - 1);
29819+ tabHash[i - (N - 1)].hash =
29820+ /* (i == 100) ? tabHash[0].hash : */ hash;
29821+#if 0
29822+ void **p_n_occurences =
29823+ simple_hash_table_lookup_pointer(tableHash, hash);
29824+ if (p_n_occurences == NULL) {
29825+ SeqDesc *seqDesc = malloc(sizeof(SeqDesc));
29826+
29827+ seqDesc->iFirstOccur = i - (N - 1);
29828+ seqDesc->nbOccur = 1;
29829+ simple_hash_table_insert(tableHash, hash, seqDesc);
29830+ } else {
29831+ SeqDesc *seqDesc = (SeqDesc *) (*p_n_occurences);
29832+ int j;
29833+
29834+ for (j = 0; j < N; j++) {
29835+ if (tab[(iStart + seqDesc->iFirstOccur + j) % length] !=
29836+ tab[(iStart + i - (N - 1) + j) % length])
29837+ break;
29838+ }
29839+ if (j != N)
29840+ fprintf(stderr, "arg\n");
29841+ seqDesc->nbOccur++;
29842+ // fprintf(stderr, "iStart = %d, i = %d, iFirstOccur = %d,
29843+ // nbOccur = %d\n", iStart, i, seqDesc->iFirstOccur,
29844+ // seqDesc->nbOccur);
29845+ }
29846+#endif
29847+ }
29848+ }
29849+ collision_detected = 0;
29850+ count_compar = 0;
29851+ qsort(tabHash, length - N + 1, sizeof(HashElt), sort_hash);
29852+ if (!collision_detected) {
29853+ SeqDesc *tabSeqDesc = (SeqDesc *) malloc(sizeof(SeqDesc) * length);
29854+ int nbSeqDesc = 0;
29855+ int lastI = 0;
29856+ int prevHash = tabHash[0].hash;
29857+
29858+ for (i = 1; i < length - N + 1; i++) {
29859+ if (tabHash[i].hash != prevHash) {
29860+ tabSeqDesc[nbSeqDesc].iFirstOccur = tabHash[lastI].offset;
29861+ tabSeqDesc[nbSeqDesc].nbOccur = i - lastI;
29862+ tabSeqDesc[nbSeqDesc].hash = prevHash;
29863+ nbSeqDesc++;
29864+ lastI = i;
29865+ prevHash = tabHash[i].hash;
29866+ }
29867+ }
29868+ tabSeqDesc[nbSeqDesc].iFirstOccur = tabHash[lastI].offset;
29869+ tabSeqDesc[nbSeqDesc].nbOccur = i - lastI;
29870+ nbSeqDesc++;
29871+ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc), sort_seq_desc_by_occur);
29872+ for (i = 0; i < nbSeqDesc; i++) {
29873+ if (tabSeqDesc[i].nbOccur < 10)
29874+ break;
29875+ // fprintf(stderr, "%d %d\n", tabSeqDesc[i].iFirstOccur,
29876+ // tabSeqDesc[i].nbOccur);
29877+ }
29878+ nbSeqDesc = i;
29879+ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc),
29880+ sort_seq_desc_by_offset);
29881+ lastI = tabSeqDesc[0].iFirstOccur;
29882+ int maxI = 0;
29883+ int j = 0;
29884+
29885+ for (i = 1; i < nbSeqDesc; i++) {
29886+ if (tabSeqDesc[i].iFirstOccur - lastI <= N) {
29887+ if (tabSeqDesc[i].nbOccur > tabSeqDesc[maxI].nbOccur) {
29888+ maxI = i;
29889+ }
29890+ } else {
29891+ tabSeqDesc[j].iFirstOccur = tabSeqDesc[maxI].iFirstOccur;
29892+ tabSeqDesc[j].nbOccur = tabSeqDesc[maxI].nbOccur;
29893+ j++;
29894+#define MAX(a,b) (((a)>(b)) ? (a) : (b))
29895+ lastI = tabSeqDesc[maxI].iFirstOccur;
29896+ while (i < nbSeqDesc &&
29897+ tabSeqDesc[i].iFirstOccur - lastI <= N)
29898+ i++;
29899+ if (i == nbSeqDesc)
29900+ break;
29901+ maxI = i;
29902+ }
29903+ }
29904+ nbSeqDesc = j;
29905+ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc), sort_seq_desc_by_occur);
29906+ for (i = 0; i < nbSeqDesc; i++) {
29907+ fprintf(stderr, "offset=%d occurNb=%d hash=%d:",
29908+ tabSeqDesc[i].iFirstOccur, tabSeqDesc[i].nbOccur,
29909+ tabSeqDesc[i].hash);
29910+ for (j = 0; j < N; j++)
29911+ fprintf(stderr, "%d ", tab[tabSeqDesc[i].iFirstOccur + j]);
29912+ fprintf(stderr, "\n");
29913+ }
29914+ free(tabSeqDesc);
29915+ } else {
29916+ fprintf(stderr, "collision de hash !\n");
29917+ }
29918+
29919+ fprintf(stderr, "(end) iStart = %d (count_compar = %d)\n", iStart,
29920+ count_compar);
29921+ // simple_hash_table_foreach(tableHash,
29922+ free(tabHash);
29923+ free(tab);
29924+#if 0
29925+ simple_hash_table_destroy(tableHash);
29926+#endif
29927+#if 0
29928+ int i, j, k;
29929+
29930+ for (i = 0; i < length; i++) {
29931+ int nMaxContiguous = 0;
29932+ int jMax = 0;
29933+
29934+ for (j = 0; j < length; j++) {
29935+ int nContiguous = 0;
29936+
29937+ for (k = 0; k < j - i; k++) {
29938+ if (tab[(iStart + i + k) % length] ==
29939+ tab[(iStart + i + j + k) % length]) {
29940+ nContiguous++;
29941+ } else
29942+ break;
29943+ }
29944+ if (nContiguous >= nMaxContiguous) {
29945+ nMaxContiguous = nContiguous;
29946+ jMax = j;
29947+ }
29948+ }
29949+ fprintf(stderr, "iStart = %d, i = %d, j = %d, nContiguous = %d\n",
29950+ iStart, i, i + jMax, nMaxContiguous);
29951+ }
29952+#endif
29953+}
29954+
29955+#define MAX_SERVER_STATE_STACK_SIZE 16
29956+
29957+typedef struct {
29958+ GLbitfield mask;
29959+ int matrixMode;
29960+ int lastMatrixOp;
29961+} ServerState;
29962+
29963+typedef struct {
29964+ ServerState stackAttrib[MAX_SERVER_STATE_STACK_SIZE];
29965+ int stackAttribPtr;
29966+ int matrixMode;
29967+ int lastMatrixOp;
29968+} GLState;
29969+
29970+#define NB_STATES 100
29971+GLState states[NB_STATES];
29972+
29973+void usage()
29974+{
29975+ printf("Usage : opengl_player [OPTION] filename\n\n");
29976+ printf
29977+ ("filename is the file where to read the OpenGL flow ('/tmp/debug_gl.bin' by default)\n");
29978+ printf("'-' is supported and stands for standard input\n\n");
29979+ printf("The following options are available :\n");
29980+ printf
29981+ ("--debug : output debugging trace on stderr\n");
29982+ printf("--disable-real-time-play-back : play as fast as possible\n");
29983+ printf
29984+ ("--show-hard-disk-bandwidth : displays regularly the data bandwidth\n");
29985+ printf("--h or --help : display this help\n");
29986+}
29987+
29988+int main(int argc, char *argv[])
29989+{
29990+ static int args_size[50];
29991+ int i;
29992+ int visualid_fbconfig_read = -1;
29993+ int visualid_fbconfig_real = 0;
29994+ char *filename = "/tmp/debug_gl.bin";
29995+ int slowdown = 0;
29996+ int debug = 0;
29997+ char *ret_string;
29998+ arg_t args[50];
29999+ struct timeval start_time, last_time, current_time;
30000+ int noplay = 0;
30001+ int count_last_time = 0, count_current = 0;
30002+ int refresh_rate = 500;
30003+ int disable_real_time_play_back = 0;
30004+ int show_hard_disk_bandwith = 0;
30005+ int last_offset = 0;
30006+ int resize = 0;
30007+ int window_width = 0, window_height = 0;
30008+ int orig_window_width = 0;
30009+ int show_offset = 0;
30010+ int show_diff_offset = 0;
30011+ int last_cmd_offset = 0;
30012+ FILE *compressed_file = NULL;
30013+ int sizeBufferedArraysPlay = 0;
30014+ ReplayBufferedArray *replayBufferedArrays = NULL;
30015+ int currentState = 0;
30016+
30017+ memset(recordBufferedArrays, 0, sizeof(recordBufferedArrays));
30018+ memset(states, 0, sizeof(states));
30019+ for (i = 0; i < NB_STATES; i++) {
30020+ states[i].matrixMode = GL_MODELVIEW;
30021+ states[i].lastMatrixOp = -1;
30022+ }
30023+
30024+ /* avcodec_init(); AVCodec* avCodec =
30025+ * avcodec_find_encoder(CODEC_ID_MPEG2VIDEO); AVCodecContext*
30026+ * avCodecContext = avcodec_alloc_context(); */
30027+
30028+ for (i = 1; i < argc; i++) {
30029+ if (argv[i][0] == '-' && argv[i][1] == '-')
30030+ argv[i] = argv[i] + 1;
30031+
30032+ if (strncmp(argv[i], "-slowdown=", strlen("-slowdown=")) == 0) {
30033+ slowdown = atoi(argv[i] + strlen("-slowdown="));
30034+ } else if (strcmp(argv[i], "-noplay") == 0) {
30035+ noplay = 1;
30036+ } else if (strcmp(argv[i], "-debug") == 0) {
30037+ debug = 1;
30038+ } else if (strcmp(argv[i], "-disable-real-time-play-back") == 0) {
30039+ disable_real_time_play_back = 1;
30040+ } else if (strcmp(argv[i], "-show-hard-disk-bandwidth") == 0) {
30041+ show_hard_disk_bandwith = 1;
30042+ } else if (strcmp(argv[i], "-show-offset") == 0) {
30043+ show_offset = 1;
30044+ } else
30045+ if (strncmp
30046+ (argv[i], "-show-diff-offset",
30047+ strlen("-show-diff-offset")) == 0) {
30048+ show_diff_offset = atoi(argv[i] + strlen("-show-diff-offset="));
30049+ } else if (strncmp(argv[i], "-width=", strlen("-width=")) == 0) {
30050+ window_width = atoi(argv[i] + strlen("-width="));
30051+ resize = 1;
30052+ } else if (strncmp(argv[i], "-refreshrate=", strlen("-refreshrate="))
30053+ == 0) {
30054+ refresh_rate = atoi(argv[i] + strlen("-refreshrate="));
30055+ } else
30056+ if (strncmp
30057+ (argv[i], "-output-compressed-filename=",
30058+ strlen("-output-compressed-filename=")) == 0) {
30059+ char *compressed_filename =
30060+ argv[i] + strlen("-output-compressed-filename=");
30061+ compressed_file = fopen(compressed_filename, "wb");
30062+ } else if (strcmp(argv[i], "-") == 0) {
30063+ filename = NULL;
30064+ } else if (strcmp(argv[i], "-h") == 0 ||
30065+ strcmp(argv[i], "-help") == 0) {
30066+ usage();
30067+ return 0;
30068+ } else
30069+ filename = argv[i];
30070+ }
30071+ FILE *f = (filename) ? fopen(filename, "rb") : stdin;
30072+
30073+ if (f == NULL) {
30074+ fprintf(stderr, "cannot open %s\n", filename);
30075+ return 0;
30076+ }
30077+ // FILE* fout = fopen("/tmp/raw", "wb");
30078+
30079+ init_process_tab();
30080+ ret_string = malloc(32768);
30081+
30082+ gettimeofday(&start_time, NULL);
30083+ gettimeofday(&last_time, NULL);
30084+
30085+// void* buffer= NULL;
30086+#define WRITE_UNSIGNED_CHAR(x) do { unsigned char myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30087+#define WRITE_SHORT(x) do { short myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30088+#define WRITE_INT(x) do { int myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30089+#define WRITE_LONGLONG(x) do { long long myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30090+#define WRITE_FLOAT(x) do { float myvar = (float)x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30091+#define WRITE_3DOUBLE_AS_3FLOAT(x) do { float myfloats[] = { x[0], x[1], x[2] }; fwrite(myfloats, sizeof(myvar), 1, compressed_file); } while(0)
30092+
30093+ // FILE* fopcodes = fopen("/tmp/opcodes.bin", "wb");
30094+ do_context_switch(XOpenDisplay(NULL), 1, _init32_func);
30095+
30096+ long long instr_count = 0;
30097+
30098+ while (1) {
30099+ short func_number;
30100+ short memorize_array_play = -1;
30101+ short reuse_array_play = -1;
30102+
30103+ begin:
30104+ if (fread(&func_number, sizeof(short), 1, f) == 0)
30105+ break;
30106+ if (func_number == _exit_process_func)
30107+ break;
30108+
30109+ if (func_number == _serialized_calls_func) {
30110+ continue;
30111+ }
30112+ // fwrite(&func_number, sizeof(short), 1, fopcodes);
30113+
30114+ /*
30115+ * instrWindow[instrWindowPtr] = func_number; instrWindowPtr++; if
30116+ * (instrWindowPtr == INSTR_WINDOW_SIZE) instrWindowPtr = 0;
30117+ * instrWindowCount++; if (instrWindowCount >= INSTR_WINDOW_SIZE) {
30118+ * if ((instrWindowCount % (INSTR_WINDOW_SIZE / 2)) == 0)
30119+ * find_repeated_seq(instrWindow, instrWindowBeginPtr,
30120+ * INSTR_WINDOW_SIZE); instrWindowBeginPtr++; if (instrWindowBeginPtr
30121+ * == INSTR_WINDOW_SIZE) instrWindowBeginPtr = 0; } */
30122+
30123+ /* -1 is special code that indicates time synchro */
30124+ if (func_number == timesynchro_func) {
30125+ long long ts_file;
30126+ fread(&ts_file, sizeof(long long), 1, f);
30127+
30128+ if (compressed_file) {
30129+ WRITE_SHORT(timesynchro_func);
30130+ WRITE_LONGLONG(ts_file);
30131+ }
30132+
30133+ if (!disable_real_time_play_back) {
30134+ gettimeofday(&current_time, NULL);
30135+ long long ts_real =
30136+ (current_time.tv_sec -
30137+ start_time.tv_sec) * (long long) 1000000 +
30138+ current_time.tv_usec - start_time.tv_usec;
30139+ // fprintf(stderr, "%d %d\n", (int)ts_real, (int)ts_file);
30140+ if (ts_real < ts_file/* && ts_file - ts_real > 100 * 1000 */) {
30141+ /* we're playing too fast */
30142+ // fprintf(stderr, "waiting %d usec\n", (int)(ts_file -
30143+ // ts_real));
30144+ usleep((int) (ts_file - ts_real));
30145+ }
30146+ }
30147+ continue;
30148+ } else if (func_number == memorize_array_func) {
30149+ fread(&memorize_array_play, sizeof(short), 1, f);
30150+ goto begin;
30151+ } else if (func_number == reuse_array_func) {
30152+ fread(&reuse_array_play, sizeof(short), 1, f);
30153+ goto begin;
30154+ }
30155+
30156+ assert(func_number >= 0);
30157+
30158+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
30159+ int nb_args = signature->nb_args;
30160+ int *args_type = signature->args_type;
30161+
30162+ for (i = 0; i < nb_args; i++) {
30163+ switch (args_type[i]) {
30164+#if 0
30165+ case TYPE_UNSIGNED_CHAR:
30166+ case TYPE_CHAR:
30167+ {
30168+ char c;
30169+
30170+ fread(&c, sizeof(c), 1, f);
30171+ args[i] = c;
30172+ break;
30173+ }
30174+
30175+ case TYPE_UNSIGNED_SHORT:
30176+ case TYPE_SHORT:
30177+ {
30178+ short s;
30179+
30180+ fread(&s, sizeof(s), 1, f);
30181+ args[i] = s;
30182+ break;
30183+ }
30184+
30185+ case TYPE_FLOAT:
30186+ fread(&args[i], sizeof(int), 1, f);
30187+ break;
30188+
30189+#endif
30190+ case TYPE_UNSIGNED_CHAR:
30191+ case TYPE_CHAR:
30192+ case TYPE_UNSIGNED_INT:
30193+ case TYPE_INT:
30194+ case TYPE_UNSIGNED_SHORT:
30195+ case TYPE_SHORT:
30196+ case TYPE_FLOAT:
30197+ {
30198+ int n;
30199+ fread(&n, sizeof(int), 1, f);
30200+ args[i] = n;
30201+ break;
30202+ }
30203+
30204+ case TYPE_NULL_TERMINATED_STRING:
30205+ CASE_IN_UNKNOWN_SIZE_POINTERS:
30206+ fread(&args_size[i], sizeof(int), 1, f);
30207+ if (args_size[i]) {
30208+ args[i] = (long) malloc(args_size[i]);
30209+ fread((void *) args[i], args_size[i], 1, f);
30210+ } else {
30211+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
30212+ fprintf(stderr, "call %s arg %d\n",
30213+ tab_opengl_calls_name[func_number], i);
30214+ }
30215+ args[i] = 0;
30216+ }
30217+ if (reuse_array_play >= 0) {
30218+ long current_pos = ftell(f);
30219+
30220+ args_size[i] =
30221+ replayBufferedArrays[reuse_array_play].size;
30222+ args[i] = (long) malloc(args_size[i]);
30223+ fseek(f,
30224+ replayBufferedArrays[reuse_array_play].file_offset,
30225+ SEEK_SET);
30226+ fread((void *) args[i], args_size[i], 1, f);
30227+ fseek(f, current_pos, SEEK_SET);
30228+ }
30229+ if (memorize_array_play >= 0) {
30230+ assert(memorize_array_play <= sizeBufferedArraysPlay);
30231+ if (memorize_array_play == sizeBufferedArraysPlay) {
30232+ sizeBufferedArraysPlay++;
30233+ replayBufferedArrays =
30234+ realloc(replayBufferedArrays,
30235+ sizeBufferedArraysPlay *
30236+ sizeof(ReplayBufferedArray));
30237+ replayBufferedArrays[sizeBufferedArraysPlay -
30238+ 1].file_offset = 0;
30239+ }
30240+ replayBufferedArrays[memorize_array_play].file_offset =
30241+ ftell(f) - args_size[i];
30242+ replayBufferedArrays[memorize_array_play].size =
30243+ args_size[i];
30244+ }
30245+ break;
30246+
30247+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
30248+ {
30249+ args_size[i] =
30250+ compute_arg_length(stderr, func_number, i, args);
30251+ args[i] =
30252+ (args_size[i]) ? (long) malloc(args_size[i]) : 0;
30253+ fread((void *) args[i], args_size[i], 1, f);
30254+ break;
30255+ }
30256+
30257+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
30258+ {
30259+ args_size[i] =
30260+ compute_arg_length(stderr, func_number, i, args);
30261+ args[i] = (long) malloc(args_size[i]);
30262+ break;
30263+ }
30264+
30265+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
30266+ {
30267+ fread(&args_size[i], sizeof(int), 1, f);
30268+ if (args_size[i]) {
30269+ args[i] = (long) malloc(args_size[i]);
30270+ } else {
30271+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
30272+ fprintf(stderr, "call %s arg %d\n",
30273+ tab_opengl_calls_name[func_number], i);
30274+ }
30275+ args[i] = 0;
30276+ }
30277+ break;
30278+ }
30279+
30280+ CASE_OUT_KNOWN_SIZE_POINTERS:
30281+ {
30282+ args_size[i] = tab_args_type_length[args_type[i]];
30283+ assert(args_size[i]);
30284+ args[i] = (long) malloc(args_size[i]);
30285+ break;
30286+ }
30287+
30288+ case TYPE_DOUBLE:
30289+ CASE_IN_KNOWN_SIZE_POINTERS:
30290+ args_size[i] = tab_args_type_length[args_type[i]];
30291+ args[i] = (long) malloc(args_size[i]);
30292+ fread((void *) args[i], args_size[i], 1, f);
30293+ break;
30294+
30295+ case TYPE_IN_IGNORED_POINTER:
30296+ args[i] = 0;
30297+ break;
30298+
30299+ default:
30300+ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
30301+ tab_opengl_calls_name[func_number], i);
30302+ do_disconnect_current();
30303+ return 0;
30304+ }
30305+ }
30306+ if (debug)
30307+ display_gl_call(stderr, func_number, args, args_size);
30308+
30309+ if (debug && reuse_array_play != -1)
30310+ fprintf(stderr, "reuse_array_play %d\n", reuse_array_play);
30311+ if (debug && memorize_array_play != -1)
30312+ fprintf(stderr, "memorize_array_play %d\n", memorize_array_play);
30313+
30314+ if (compressed_file) {
30315+ int reuse_array = -1;
30316+ int memorize_array = -1;
30317+ void *ptr = NULL;
30318+ int bytes_size = 0;
30319+ int do_default = 1;
30320+
30321+ switch (func_number) {
30322+ case glXMakeCurrent_func:
30323+ {
30324+ currentState = args[2];
30325+ assert(currentState >= 0 && currentState < NB_STATES);
30326+ break;
30327+ }
30328+
30329+ case glMatrixMode_func:
30330+ {
30331+ if (states[currentState].matrixMode == args[0]) {
30332+ do_default = 0;
30333+ } else {
30334+ states[currentState].matrixMode = args[0];
30335+ }
30336+ break;
30337+ }
30338+
30339+ case glLoadIdentity_func:
30340+ case glLoadMatrixd_func:
30341+ case glLoadMatrixf_func:
30342+ case glMultMatrixd_func:
30343+ case glMultMatrixf_func:
30344+ case glOrtho_func:
30345+ case glFrustum_func:
30346+ case glRotated_func:
30347+ case glRotatef_func:
30348+ case glScaled_func:
30349+ case glScalef_func:
30350+ case glTranslated_func:
30351+ case glTranslatef_func:
30352+ case glPushMatrix_func:
30353+ case glPopMatrix_func:
30354+ {
30355+ if (states[currentState].matrixMode == 5890) {
30356+ if (states[currentState].lastMatrixOp ==
30357+ glLoadIdentity_func &&
30358+ func_number == glLoadIdentity_func) {
30359+ do_default = 0;
30360+ }
30361+ states[currentState].lastMatrixOp = func_number;
30362+ }
30363+ break;
30364+ }
30365+
30366+ case glPushAttrib_func:
30367+ {
30368+ if (states[currentState].stackAttribPtr <
30369+ MAX_SERVER_STATE_STACK_SIZE) {
30370+ int mask = args[0];
30371+
30372+ states[currentState].stackAttrib[states[currentState].
30373+ stackAttribPtr].
30374+ mask = mask;
30375+ if (mask & GL_TRANSFORM_BIT) {
30376+ states[currentState].
30377+ stackAttrib[states[currentState].
30378+ stackAttribPtr].matrixMode =
30379+ states[currentState].matrixMode;
30380+ states[currentState].
30381+ stackAttrib[states[currentState].
30382+ stackAttribPtr].lastMatrixOp =
30383+ states[currentState].lastMatrixOp;
30384+ }
30385+ states[currentState].stackAttribPtr++;
30386+ }
30387+ break;
30388+ }
30389+
30390+ case glPopAttrib_func:
30391+ {
30392+ if (states[currentState].stackAttribPtr > 0) {
30393+ --states[currentState].stackAttribPtr;
30394+ if (states[currentState].
30395+ stackAttrib[states[currentState].stackAttribPtr].
30396+ mask & GL_TRANSFORM_BIT) {
30397+ states[currentState].matrixMode =
30398+ states[currentState].
30399+ stackAttrib[states[currentState].
30400+ stackAttribPtr].matrixMode;
30401+ states[currentState].lastMatrixOp =
30402+ states[currentState].
30403+ stackAttrib[states[currentState].
30404+ stackAttribPtr].lastMatrixOp;
30405+ }
30406+ }
30407+ break;
30408+ }
30409+
30410+ case glBufferDataARB_func:
30411+ {
30412+ ptr = (void *) args[2];
30413+ bytes_size = args_size[2];
30414+ break;
30415+ }
30416+
30417+ case glVertexPointer_fake_func:
30418+ case glTexCoordPointer_fake_func:
30419+ case glTexCoordPointer01_fake_func:
30420+ case glDrawElements_func:
30421+ {
30422+ ptr = (void *) args[nb_args - 1];
30423+ bytes_size = args_size[nb_args - 1];
30424+ break;
30425+ }
30426+
30427+ default:
30428+ break;
30429+ }
30430+
30431+ if (ptr) {
30432+ unsigned int crc = calc_checksum(ptr, bytes_size, 0xFFFFFFFF);
30433+ long long minInterest = 0x7FFFFFFFFFFFFFFFLL;
30434+ int iMinUsed = -1;
30435+
30436+ instr_count++;
30437+
30438+ for (i = 0; i < N_BUFFERED_ARRAYS; i++) {
30439+ if (recordBufferedArrays[i].crc == crc) {
30440+ // fprintf(stderr, "reusing %d for crc %d\n", i,
30441+ // crc);
30442+ reuse_array = i;
30443+ // fprintf(stderr, "reuse_array %d\n", i);
30444+ recordBufferedArrays[i].n_used++;
30445+ recordBufferedArrays[i].last_use = instr_count;
30446+ break;
30447+ } else if (recordBufferedArrays[i].n_used == 0) {
30448+ // fprintf(stderr, "memorize_array %d\n", i);
30449+ memorize_array = i;
30450+ recordBufferedArrays[i].n_used = 1;
30451+ recordBufferedArrays[i].crc = crc;
30452+ recordBufferedArrays[i].size = bytes_size;
30453+ recordBufferedArrays[i].last_use = instr_count;
30454+ break;
30455+ } else {
30456+ long long interest =
30457+ N_BUFFERED_ARRAYS *
30458+ recordBufferedArrays[i].n_used / (instr_count -
30459+ recordBufferedArrays
30460+ [i].
30461+ last_use)
30462+ /** recordBufferedArrays[i].size*/ ;
30463+ if (interest < minInterest) {
30464+ iMinUsed = i;
30465+ minInterest = interest;
30466+ }
30467+ }
30468+ }
30469+ static unsigned int *discardedCrcs = NULL;
30470+ static int nDiscardedCrcs = 0;
30471+
30472+ if (i == N_BUFFERED_ARRAYS) {
30473+ int j;
30474+
30475+ for (j = 0; j < nDiscardedCrcs; j++) {
30476+ if (discardedCrcs[j] == crc) {
30477+ fprintf(stderr,
30478+ "%x was discarded before and is asked now...\n",
30479+ crc);
30480+ discardedCrcs[j] =
30481+ recordBufferedArrays[iMinUsed].crc;
30482+ break;
30483+ }
30484+ }
30485+ if (j == nDiscardedCrcs) {
30486+ discardedCrcs =
30487+ realloc(discardedCrcs,
30488+ sizeof(int) * (nDiscardedCrcs + 1));
30489+ discardedCrcs[nDiscardedCrcs++] =
30490+ recordBufferedArrays[iMinUsed].crc;
30491+ }
30492+ fprintf(stderr, "discarding %x\n",
30493+ recordBufferedArrays[iMinUsed].crc);
30494+
30495+ memorize_array = iMinUsed;
30496+ recordBufferedArrays[iMinUsed].n_used = 1;
30497+ recordBufferedArrays[iMinUsed].crc = crc;
30498+ recordBufferedArrays[iMinUsed].size = bytes_size;
30499+ recordBufferedArrays[iMinUsed].last_use = instr_count;
30500+ }
30501+
30502+ if (reuse_array != -1) {
30503+ WRITE_SHORT(reuse_array_func);
30504+ WRITE_SHORT(reuse_array);
30505+ } else if (memorize_array != -1) {
30506+ WRITE_SHORT(memorize_array_func);
30507+ WRITE_SHORT(memorize_array);
30508+ }
30509+ }
30510+
30511+ switch (func_number) {
30512+ case glXChooseVisual_func:
30513+ case glXQueryVersion_func:
30514+ case glXQueryExtension_func:
30515+ case glXGetClientString_func:
30516+ case glXQueryExtensionsString_func:
30517+ case glXQueryServerString_func:
30518+ case glXGetProcAddress_fake_func:
30519+ case glXGetProcAddress_global_fake_func:
30520+ case glXGetConfig_func:
30521+ case glXGetConfig_extended_func:
30522+ case glGetIntegerv_func:
30523+ case glGetFloatv_func:
30524+ case glGetBooleanv_func:
30525+ case glGetDoublev_func:
30526+ case glIsEnabled_func:
30527+ case _glGetError_fake_func:
30528+ case glGetString_func:
30529+ {
30530+ do_default = 0;
30531+ break;
30532+ }
30533+
30534+ case glLoadMatrixd_func:
30535+ {
30536+ int j;
30537+
30538+ WRITE_SHORT(glLoadMatrixf_func);
30539+ double *ptr = (double *) args[0];
30540+
30541+ for (j = 0; j < 16; j++) {
30542+ WRITE_FLOAT(ptr[j]);
30543+ }
30544+ do_default = 0;
30545+ break;
30546+ }
30547+
30548+ case glMultMatrixd_func:
30549+ {
30550+ int j;
30551+
30552+ WRITE_SHORT(glMultMatrixf_func);
30553+ double *ptr = (double *) args[0];
30554+
30555+ for (j = 0; j < 16; j++) {
30556+ WRITE_FLOAT(ptr[j]);
30557+ }
30558+ do_default = 0;
30559+ break;
30560+ }
30561+
30562+ case glTranslated_func:
30563+ {
30564+ WRITE_SHORT(glTranslatef_func);
30565+ WRITE_FLOAT(*(double *) args[0]);
30566+ WRITE_FLOAT(*(double *) args[1]);
30567+ WRITE_FLOAT(*(double *) args[2]);
30568+ do_default = 0;
30569+ break;
30570+ }
30571+
30572+ case glScalef_func:
30573+ {
30574+ if (*(float *) &args[0] == 1 && *(float *) &args[1] == 1
30575+ && *(float *) &args[2] == 1)
30576+ do_default = 0;
30577+ break;
30578+ }
30579+
30580+ case glScaled_func:
30581+ {
30582+ if (!
30583+ (*(double *) args[0] == 1 && *(double *) args[1] == 1
30584+ && *(double *) args[2] == 1)) {
30585+ WRITE_SHORT(glScalef_func);
30586+ WRITE_FLOAT(*(double *) args[0]);
30587+ WRITE_FLOAT(*(double *) args[1]);
30588+ WRITE_FLOAT(*(double *) args[2]);
30589+ }
30590+ do_default = 0;
30591+ break;
30592+ }
30593+
30594+ case glRotated_func:
30595+ {
30596+ WRITE_SHORT(glRotatef_func);
30597+ WRITE_FLOAT(*(double *) args[0]);
30598+ WRITE_FLOAT(*(double *) args[1]);
30599+ WRITE_FLOAT(*(double *) args[2]);
30600+ WRITE_FLOAT(*(double *) args[3]);
30601+ do_default = 0;
30602+ break;
30603+ }
30604+#define IS_SHORT(x) ((x) >= -32768 && (x) < 32768)
30605+
30606+ case glRasterPos2i_func:
30607+ {
30608+ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
30609+ WRITE_SHORT(glRasterPos2s_func);
30610+ WRITE_SHORT(args[0]);
30611+ WRITE_SHORT(args[1]);
30612+ do_default = 0;
30613+ }
30614+ break;
30615+ }
30616+
30617+ case glVertex2i_func:
30618+ {
30619+ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
30620+ WRITE_SHORT(glVertex2s_func);
30621+ WRITE_SHORT(args[0]);
30622+ WRITE_SHORT(args[1]);
30623+ do_default = 0;
30624+ }
30625+ break;
30626+ }
30627+
30628+ case glTexCoord2i_func:
30629+ {
30630+ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
30631+ WRITE_SHORT(glTexCoord2s_func);
30632+ WRITE_SHORT(args[0]);
30633+ WRITE_SHORT(args[1]);
30634+ do_default = 0;
30635+ }
30636+ break;
30637+ }
30638+
30639+ case glTexCoord2fv_func:
30640+ {
30641+ float *ptr = (float *) args[0];
30642+ float u = ptr[0];
30643+ float v = ptr[1];
30644+
30645+ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7) {
30646+ int ui = (int) u;
30647+ int vi = (int) v;
30648+
30649+ if (IS_SHORT(ui) && IS_SHORT(vi)) {
30650+ WRITE_SHORT(glTexCoord2s_func);
30651+ WRITE_SHORT(ui);
30652+ WRITE_SHORT(vi);
30653+ do_default = 0;
30654+ }
30655+ }
30656+ break;
30657+ }
30658+
30659+ case glTexCoord2f_func:
30660+ {
30661+ float u = *(float *) &args[0];
30662+ float v = *(float *) &args[1];
30663+
30664+ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7) {
30665+ int ui = (int) u;
30666+ int vi = (int) v;
30667+
30668+ if (IS_SHORT(ui) && IS_SHORT(vi)) {
30669+ WRITE_SHORT(glTexCoord2s_func);
30670+ WRITE_SHORT(ui);
30671+ WRITE_SHORT(vi);
30672+ do_default = 0;
30673+ }
30674+ }
30675+ break;
30676+ }
30677+
30678+ case glColor3f_func:
30679+ {
30680+ WRITE_SHORT(glColor3ub_func);
30681+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
30682+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
30683+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
30684+ do_default = 0;
30685+ break;
30686+ }
30687+
30688+ case glColor4f_func:
30689+ {
30690+ if (*(float *) &args[3] == 1) {
30691+ WRITE_SHORT(glColor3ub_func);
30692+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
30693+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
30694+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
30695+ } else {
30696+ WRITE_SHORT(glColor4ub_func);
30697+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
30698+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
30699+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
30700+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[3]);
30701+ }
30702+ do_default = 0;
30703+ break;
30704+ }
30705+
30706+ case glColor4fv_func:
30707+ {
30708+ float *ptr = (float *) args[0];
30709+
30710+ if (ptr[3] == 1) {
30711+ WRITE_SHORT(glColor3ub_func);
30712+ WRITE_UNSIGNED_CHAR(255 * ptr[0]);
30713+ WRITE_UNSIGNED_CHAR(255 * ptr[1]);
30714+ WRITE_UNSIGNED_CHAR(255 * ptr[2]);
30715+ } else {
30716+ WRITE_SHORT(glColor4ub_func);
30717+ WRITE_UNSIGNED_CHAR(255 * ptr[0]);
30718+ WRITE_UNSIGNED_CHAR(255 * ptr[1]);
30719+ WRITE_UNSIGNED_CHAR(255 * ptr[2]);
30720+ WRITE_UNSIGNED_CHAR(255 * ptr[3]);
30721+ }
30722+ do_default = 0;
30723+ break;
30724+ }
30725+
30726+ case glColor3d_func:
30727+ {
30728+ WRITE_SHORT(glColor3ub_func);
30729+ WRITE_UNSIGNED_CHAR(255 * *(double *) args[0]);
30730+ WRITE_UNSIGNED_CHAR(255 * *(double *) args[1]);
30731+ WRITE_UNSIGNED_CHAR(255 * *(double *) args[2]);
30732+ do_default = 0;
30733+ break;
30734+ }
30735+
30736+ case glVertex3f_func:
30737+ {
30738+ if (*(float *) &args[2] == 0) {
30739+ WRITE_SHORT(glVertex2f_func);
30740+ WRITE_FLOAT(*(float *) &args[0]);
30741+ WRITE_FLOAT(*(float *) &args[1]);
30742+ do_default = 0;
30743+ }
30744+ break;
30745+ }
30746+
30747+ case glVertex3d_func:
30748+ {
30749+ WRITE_SHORT(glVertex3f_func);
30750+ WRITE_FLOAT(*(double *) args[0]);
30751+ WRITE_FLOAT(*(double *) args[1]);
30752+ WRITE_FLOAT(*(double *) args[2]);
30753+ do_default = 0;
30754+ break;
30755+ }
30756+
30757+ case glNormal3fv_func:
30758+ {
30759+ float *ptr = (float *) args[0];
30760+ float u = ptr[0];
30761+ float v = ptr[1];
30762+ float w = ptr[2];
30763+
30764+ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7
30765+ && fabs(w - (int) w) < 1e-7) {
30766+ int ui = (int) u;
30767+ int vi = (int) v;
30768+ int wi = (int) w;
30769+
30770+ if (IS_SHORT(ui) && IS_SHORT(vi) && IS_SHORT(wi)) {
30771+ WRITE_SHORT(glNormal3sv_func);
30772+ WRITE_SHORT(ui);
30773+ WRITE_SHORT(vi);
30774+ WRITE_SHORT(wi);
30775+ do_default = 0;
30776+ }
30777+ }
30778+ break;
30779+ }
30780+
30781+ case glNormal3d_func:
30782+ {
30783+ WRITE_SHORT(glNormal3f_func);
30784+ WRITE_FLOAT(*(double *) args[0]);
30785+ WRITE_FLOAT(*(double *) args[1]);
30786+ WRITE_FLOAT(*(double *) args[2]);
30787+ do_default = 0;
30788+ break;
30789+ }
30790+
30791+ case glDrawElements_func:
30792+ {
30793+ int mode = args[0];
30794+ int count = args[1];
30795+ int type = args[2];
30796+
30797+ if (type == GL_UNSIGNED_INT) {
30798+ int j;
30799+ unsigned int *ptr = (unsigned int *) args[3];
30800+
30801+ for (j = 0; j < count; j++) {
30802+ if ((ptr[j] >> 16) != 0)
30803+ break;
30804+ }
30805+ if (j == count) {
30806+ WRITE_SHORT(func_number);
30807+ WRITE_INT(mode);
30808+ WRITE_INT(count);
30809+ WRITE_INT(GL_UNSIGNED_SHORT);
30810+ if (reuse_array != -1) {
30811+ WRITE_INT(0);
30812+ } else {
30813+ WRITE_INT(count * sizeof(short));
30814+ for (j = 0; j < count; j++) {
30815+ WRITE_SHORT(ptr[j]);
30816+ }
30817+ }
30818+ do_default = 0;
30819+ } else
30820+ do_default = 1;
30821+ } else if (reuse_array != -1) {
30822+ WRITE_SHORT(func_number);
30823+ WRITE_INT(mode);
30824+ WRITE_INT(count);
30825+ WRITE_INT(type);
30826+ WRITE_INT(0);
30827+ do_default = 0;
30828+ } else
30829+ do_default = 1;
30830+ break;
30831+ }
30832+
30833+ case glBufferDataARB_func:
30834+ {
30835+ if (reuse_array != -1) {
30836+ WRITE_SHORT(glBufferDataARB_func);
30837+ WRITE_INT(args[0]);
30838+ WRITE_INT(args[1]);
30839+ WRITE_INT(0);
30840+ WRITE_INT(args[3]);
30841+ do_default = 0;
30842+ }
30843+ break;
30844+ }
30845+
30846+ case glVertexPointer_fake_func:
30847+ case glTexCoordPointer_fake_func:
30848+ case glTexCoordPointer01_fake_func:
30849+ {
30850+ int offset = 0, index = 0, size, type, stride, bytes_size;
30851+ void *ptr;
30852+ int countarg = 0;
30853+
30854+ if (func_number == glVertexPointer_fake_func ||
30855+ func_number == glTexCoordPointer_fake_func)
30856+ offset = args[countarg++];
30857+ if (func_number == glTexCoordPointer_fake_func)
30858+ index = args[countarg++];
30859+ size = args[countarg++];
30860+ type = args[countarg++];
30861+ stride = args[countarg++];
30862+ bytes_size = args[countarg++];
30863+ ptr = (void *) args[countarg++];
30864+ if (type == GL_DOUBLE) {
30865+ int count;
30866+ int j, k;
30867+
30868+ if (stride == 0)
30869+ stride = size * sizeof(double);
30870+ assert((bytes_size % stride) == 0);
30871+ assert((offset % stride) == 0);
30872+ offset = (offset / stride) * size * sizeof(float);
30873+ count = bytes_size / stride;
30874+ WRITE_SHORT(func_number);
30875+ if (func_number == glVertexPointer_fake_func ||
30876+ func_number == glTexCoordPointer_fake_func)
30877+ WRITE_INT(offset);
30878+ if (func_number == glTexCoordPointer_fake_func)
30879+ WRITE_INT(index);
30880+ WRITE_INT(size);
30881+ WRITE_INT(GL_FLOAT);
30882+ WRITE_INT(0);
30883+ WRITE_INT(count * size * sizeof(float));
30884+ if (reuse_array != -1) {
30885+ WRITE_INT(0);
30886+ } else {
30887+ WRITE_INT(count * size * sizeof(float));
30888+ for (j = 0; j < count; j++) {
30889+ for (k = 0; k < size; k++) {
30890+ WRITE_FLOAT(*(double *)
30891+ (ptr + j * stride +
30892+ k * sizeof(double)));
30893+ }
30894+ }
30895+ }
30896+ do_default = 0;
30897+ } else if (reuse_array != -1) {
30898+ WRITE_SHORT(func_number);
30899+ if (func_number == glVertexPointer_fake_func ||
30900+ func_number == glTexCoordPointer_fake_func)
30901+ WRITE_INT(offset);
30902+ if (func_number == glTexCoordPointer_fake_func)
30903+ WRITE_INT(index);
30904+ WRITE_INT(size);
30905+ WRITE_INT(type);
30906+ WRITE_INT(stride);
30907+ WRITE_INT(bytes_size);
30908+ WRITE_INT(0);
30909+ do_default = 0;
30910+ } else
30911+ do_default = 1;
30912+ break;
30913+ }
30914+
30915+ default:
30916+ break;
30917+ }
30918+
30919+ if (do_default) {
30920+ fwrite(&func_number, sizeof(short), 1, compressed_file);
30921+ for (i = 0; i < nb_args; i++) {
30922+ switch (args_type[i]) {
30923+ case TYPE_UNSIGNED_CHAR:
30924+ case TYPE_CHAR:
30925+ {
30926+ char c = args[i];
30927+
30928+ fwrite(&c, sizeof(c), 1, compressed_file);
30929+ break;
30930+ }
30931+
30932+ case TYPE_UNSIGNED_SHORT:
30933+ case TYPE_SHORT:
30934+ {
30935+ short s = args[i];
30936+
30937+ fwrite(&s, sizeof(s), 1, compressed_file);
30938+ break;
30939+ }
30940+
30941+ case TYPE_UNSIGNED_INT:
30942+ case TYPE_INT:
30943+ case TYPE_FLOAT:{
30944+ int n = args[i];
30945+ fwrite(&n, sizeof(int), 1, compressed_file);
30946+ break;
30947+ }
30948+
30949+ case TYPE_NULL_TERMINATED_STRING:
30950+ CASE_IN_UNKNOWN_SIZE_POINTERS:
30951+ fwrite(&args_size[i], sizeof(int), 1,
30952+ compressed_file);
30953+ if (args_size[i]) {
30954+ fwrite((void *) args[i], args_size[i], 1,
30955+ compressed_file);
30956+ }
30957+ break;
30958+
30959+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
30960+ {
30961+ fwrite(&args_size[i], sizeof(int), 1,
30962+ compressed_file);
30963+ break;
30964+ }
30965+
30966+ CASE_OUT_KNOWN_SIZE_POINTERS:
30967+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
30968+ {
30969+ break;
30970+ }
30971+
30972+ case TYPE_DOUBLE:
30973+ CASE_IN_KNOWN_SIZE_POINTERS:
30974+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
30975+ fwrite((void *) args[i], args_size[i], 1,
30976+ compressed_file);
30977+ break;
30978+
30979+ case TYPE_IN_IGNORED_POINTER:
30980+ break;
30981+
30982+ default:
30983+ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
30984+ tab_opengl_calls_name[func_number], i);
30985+ do_disconnect_current();
30986+ return 0;
30987+ }
30988+ }
30989+ }
30990+ }
30991+
30992+ int new_offset = ftell(f);
30993+
30994+ if (show_offset ||
30995+ (show_diff_offset &&
30996+ new_offset - last_cmd_offset >= show_diff_offset)) {
30997+ fprintf(stderr, "offset = %d, diff=%d\n", new_offset,
30998+ new_offset - last_cmd_offset);
30999+ }
31000+ last_cmd_offset = new_offset;
31001+
31002+ if (func_number == glXCreateContext_func &&
31003+ args[1] == visualid_fbconfig_read) {
31004+ args[1] = visualid_fbconfig_real;
31005+ }
31006+ if (debug) {
31007+ if (func_number == glBindProgramARB_func) {
31008+ fprintf(stderr, "glBindProgramARB_func(y, x) : x = %d\n",
31009+ (int) args[1]);
31010+ } else if (func_number == glXGetProcAddress_fake_func) {
31011+ fprintf(stderr, "glXGetProcAddress_fake(%s)\n",
31012+ (char *) args[0]);
31013+ }
31014+ }
31015+
31016+ if (debug && func_number == glEnable_func) {
31017+ fprintf(stderr, "enable(0x%x)\n", (int) args[0]);
31018+ } else if (debug && func_number == glDisable_func) {
31019+ fprintf(stderr, "disable(0x%x)\n", (int) args[0]);
31020+ }
31021+
31022+ if (resize) {
31023+ if (func_number == _moveResizeWindow_func) {
31024+ int *params = (int *) args[1];
31025+
31026+ orig_window_width = params[2];
31027+ window_height = params[3] =
31028+ params[3] * window_width / params[2];
31029+ params[2] = window_width;
31030+ // buffer = malloc(4 * window_width * window_height);
31031+ } else if (func_number == glViewport_func ||
31032+ func_number == glScissor_func) {
31033+ args[0] = args[0] * window_width / orig_window_width;
31034+ args[1] = args[1] * window_width / orig_window_width;
31035+ args[2] = args[2] * window_width / orig_window_width;
31036+ args[3] = args[3] * window_width / orig_window_width;
31037+ }
31038+ } else if (func_number == _moveResizeWindow_func) {
31039+ int *params = (int *) args[1];
31040+
31041+ window_width = params[2];
31042+ window_height = params[3];
31043+ // buffer = malloc(4 * window_width * window_height);
31044+ }
31045+
31046+ int ret =
31047+ (noplay) ? 0 : do_function_call(func_number, args, ret_string);
31048+
31049+ if (func_number == glXSwapBuffers_func) {
31050+ /* glReadPixels(0, 0, window_width, window_height, GL_RGBA,
31051+ * GL_UNSIGNED_BYTE, buffer); fwrite(buffer, 4 * window_width *
31052+ * window_height, 1, fout); */
31053+
31054+ int diff_time;
31055+
31056+ count_current++;
31057+ gettimeofday(&current_time, NULL);
31058+ diff_time =
31059+ (current_time.tv_sec - last_time.tv_sec) * 1000 +
31060+ (current_time.tv_usec - last_time.tv_usec) / 1000;
31061+ if (diff_time > refresh_rate) {
31062+ printf("%d frames in %.1f seconds = %.3f FPS\n",
31063+ count_current - count_last_time, diff_time / 1000.,
31064+ (count_current - count_last_time) * 1000. / diff_time);
31065+ if (show_hard_disk_bandwith) {
31066+ int current_offset = ftell(f);
31067+
31068+ printf("bandwidth : %.1f MB/s\n",
31069+ (current_offset - last_offset) * 1e-6);
31070+ last_offset = current_offset;
31071+ }
31072+ last_time.tv_sec = current_time.tv_sec;
31073+ last_time.tv_usec = current_time.tv_usec;
31074+ count_last_time = count_current;
31075+ }
31076+ usleep(slowdown * 50000);
31077+ }
31078+ if (debug && func_number == glGenProgramsARB_func && args[0] == 1) {
31079+ fprintf(stderr, "glGenProgramsARB_func(1, &x) : x = %d\n",
31080+ *(int *) args[1]);
31081+ }
31082+
31083+ if (func_number == glXGetVisualFromFBConfig_func) {
31084+ fread(&visualid_fbconfig_read, sizeof(int), 1, f);
31085+ visualid_fbconfig_real = ret;
31086+ }
31087+
31088+ for (i = 0; i < nb_args; i++) {
31089+ switch (args_type[i]) {
31090+ case TYPE_UNSIGNED_INT:
31091+ case TYPE_INT:
31092+ case TYPE_UNSIGNED_CHAR:
31093+ case TYPE_CHAR:
31094+ case TYPE_UNSIGNED_SHORT:
31095+ case TYPE_SHORT:
31096+ case TYPE_FLOAT:
31097+ break;
31098+
31099+ case TYPE_NULL_TERMINATED_STRING:
31100+ CASE_POINTERS:
31101+ case TYPE_DOUBLE:
31102+ if (args[i])
31103+ free((void *) args[i]);
31104+ break;
31105+
31106+ case TYPE_IN_IGNORED_POINTER:
31107+ args[i] = 0;
31108+ break;
31109+
31110+ default:
31111+ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
31112+ tab_opengl_calls_name[func_number], i);
31113+ do_disconnect_current();
31114+ return 0;
31115+ }
31116+ }
31117+ }
31118+ return 0;
31119+}
31120Index: qemu-0.14.0/target-i386/opengl_server.c
31121===================================================================
31122--- /dev/null
31123+++ qemu-0.14.0/target-i386/opengl_server.c
31124@@ -0,0 +1,826 @@
31125+/*
31126+ * TCP/IP OpenGL server
31127+ *
31128+ * Copyright (c) 2007 Even Rouault
31129+ *
31130+ * Permission is hereby granted, free of charge, to any person obtaining a copy
31131+ * of this software and associated documentation files (the "Software"), to deal
31132+ * in the Software without restriction, including without limitation the rights
31133+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
31134+ * copies of the Software, and to permit persons to whom the Software is
31135+ * furnished to do so, subject to the following conditions:
31136+ *
31137+ * The above copyright notice and this permission notice shall be included in
31138+ * all copies or substantial portions of the Software.
31139+ *
31140+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31141+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31142+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
31143+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31144+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31145+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
31146+ * THE SOFTWARE.
31147+ */
31148+
31149+/* gcc -Wall -O2 -g opengl_server.c opengl_exec.c -o opengl_server -I../i386-softmmu -I. -I.. -lGL */
31150+
31151+#include <stdio.h>
31152+#include <errno.h>
31153+#include <stdlib.h>
31154+#include <unistd.h>
31155+#include <string.h>
31156+#include <assert.h>
31157+#include <sys/types.h>
31158+#include <sys/socket.h>
31159+#include <netinet/in.h>
31160+#include <netinet/tcp.h>
31161+#include <netdb.h>
31162+#include <arpa/inet.h>
31163+#include <sys/time.h>
31164+#include <signal.h>
31165+
31166+#include <X11/Xlib.h>
31167+#include <X11/Xutil.h>
31168+
31169+#define PORT 5555
31170+
31171+#define ENABLE_GL_LOG
31172+
31173+#include "opengl_func.h"
31174+#include "opengl_utils.h"
31175+
31176+static int refresh_rate = 1000;
31177+static int must_save = 0;
31178+static int timestamp = 1; /* only valid if must_save == 1. include timestamps in the save file to enable real-time playback */
31179+
31180+extern int display_function_call;
31181+extern void init_process_tab(void);
31182+extern int do_function_call(Display *, int, int, arg_t *, char *);
31183+extern void opengl_exec_set_local_connection(void);
31184+extern void opengl_exec_set_parent_window(Display *_dpy, Window _parent_window);
31185+
31186+#ifdef ENABLE_GL_LOG
31187+static FILE* f = NULL;
31188+
31189+static char* filename = "/tmp/debug_gl.bin";
31190+
31191+#define write_gl_debug_init() do { if (f == NULL) f = fopen(filename, "wb"); } while(0)
31192+
31193+static void inline write_gl_debug_cmd_char(char my_int)
31194+{
31195+ write_gl_debug_init();
31196+ fwrite(&my_int, sizeof(my_int), 1, f);
31197+}
31198+
31199+static void inline write_gl_debug_cmd_short(short my_int)
31200+{
31201+ write_gl_debug_init();
31202+ fwrite(&my_int, sizeof(my_int), 1, f);
31203+}
31204+
31205+static void inline write_gl_debug_cmd_int(int my_int)
31206+{
31207+ write_gl_debug_init();
31208+ fwrite(&my_int, sizeof(my_int), 1, f);
31209+}
31210+
31211+static void inline write_gl_debug_cmd_longlong(long long my_longlong)
31212+{
31213+ write_gl_debug_init();
31214+ fwrite(&my_longlong, sizeof(my_longlong), 1, f);
31215+}
31216+
31217+static void inline write_gl_debug_cmd_buffer_with_size(int size, void* buffer)
31218+{
31219+ write_gl_debug_init();
31220+ fwrite(&size, sizeof(int), 1, f);
31221+ if (size)
31222+ fwrite(buffer, size, 1, f);
31223+}
31224+
31225+static void inline write_gl_debug_cmd_buffer_without_size(int size, void* buffer)
31226+{
31227+ write_gl_debug_init();
31228+ if (size)
31229+ fwrite(buffer, size, 1, f);
31230+}
31231+
31232+static void inline write_gl_debug_end()
31233+{
31234+ write_gl_debug_init();
31235+ fclose(f);
31236+ f = NULL;
31237+}
31238+
31239+#endif
31240+
31241+static void write_sock_data(int sock, void* data, int len)
31242+{
31243+ if (len && data)
31244+ {
31245+ int offset = 0;
31246+ while(offset < len)
31247+ {
31248+ int nwritten = write(sock, data + offset, len - offset);
31249+ if (nwritten == -1)
31250+ {
31251+ if (errno == EINTR)
31252+ continue;
31253+ perror("write");
31254+ assert(nwritten != -1);
31255+ }
31256+ offset += nwritten;
31257+ }
31258+ }
31259+}
31260+
31261+static void inline write_sock_int(int sock, int my_int)
31262+{
31263+ write_sock_data(sock, &my_int, sizeof(int));
31264+}
31265+
31266+static int total_read = 0;
31267+static void read_sock_data(int sock, void* data, int len)
31268+{
31269+ if (len)
31270+ {
31271+ int offset = 0;
31272+ while(offset < len)
31273+ {
31274+ int nread = read(sock, data + offset, len - offset);
31275+ if (nread == -1)
31276+ {
31277+ if (errno == EINTR)
31278+ continue;
31279+ perror("read");
31280+ assert(nread != -1);
31281+ }
31282+ if (nread == 0)
31283+ {
31284+ fprintf(stderr, "nread = 0\n");
31285+ }
31286+ assert(nread > 0);
31287+ offset += nread;
31288+ total_read += nread;
31289+ }
31290+ }
31291+}
31292+
31293+static int inline read_sock_int(int sock)
31294+{
31295+ int ret;
31296+ read_sock_data(sock, &ret, sizeof(int));
31297+ return ret;
31298+}
31299+
31300+static short inline read_sock_short(int sock)
31301+{
31302+ short ret;
31303+ read_sock_data(sock, &ret, sizeof(short));
31304+ return ret;
31305+}
31306+
31307+
31308+static Display* dpy = NULL;
31309+static int parent_xid = -1;
31310+
31311+
31312+static struct timeval last_time, current_time, time_stamp_start;
31313+static int count_last_time = 0, count_current = 0;
31314+
31315+static struct timeval last_read_time, current_read_time;
31316+
31317+int has_x_error = 0;
31318+
31319+int
31320+read_from_client (int sock)
31321+{
31322+ arg_t args[50];
31323+ int args_size[50];
31324+ char ret_string[32768];
31325+ char command_buffer[65536*16];
31326+
31327+ if (dpy == NULL)
31328+ {
31329+ init_process_tab();
31330+ dpy = XOpenDisplay(NULL);
31331+ if (parent_xid != -1)
31332+ {
31333+ opengl_exec_set_parent_window(dpy, parent_xid);
31334+ }
31335+ }
31336+
31337+ int i;
31338+ int func_number = read_sock_short(sock);
31339+
31340+ Signature* signature = (Signature*)tab_opengl_calls[func_number];
31341+ int ret_type = signature->ret_type;
31342+ int nb_args = signature->nb_args;
31343+ int* args_type = signature->args_type;
31344+ int pid = 0;
31345+
31346+ if (func_number == _serialized_calls_func)
31347+ {
31348+ int command_buffer_size = read_sock_int(sock);
31349+ int commmand_buffer_offset = 0;
31350+ read_sock_data(sock, command_buffer, command_buffer_size);
31351+ /* TODO: must convert if client is different word size */
31352+
31353+#ifdef ENABLE_GL_LOG
31354+ if (must_save) write_gl_debug_cmd_short(_serialized_calls_func);
31355+#endif
31356+
31357+ while(commmand_buffer_offset < command_buffer_size)
31358+ {
31359+ func_number = *(short*)(command_buffer + commmand_buffer_offset);
31360+ if( ! (func_number >= 0 && func_number < GL_N_CALLS) )
31361+ {
31362+ fprintf(stderr, "func_number >= 0 && func_number < GL_N_CALLS failed at "
31363+ "commmand_buffer_offset=%d (command_buffer_size=%d)\n",
31364+ commmand_buffer_offset, command_buffer_size);
31365+ exit(-1);
31366+ }
31367+
31368+#ifdef ENABLE_GL_LOG
31369+ if (must_save) write_gl_debug_cmd_short(func_number);
31370+#endif
31371+ commmand_buffer_offset += sizeof(short);
31372+
31373+
31374+ signature = (Signature*)tab_opengl_calls[func_number];
31375+ ret_type = signature->ret_type;
31376+ assert(ret_type == TYPE_NONE);
31377+ nb_args = signature->nb_args;
31378+ args_type = signature->args_type;
31379+
31380+ for(i=0;i<nb_args;i++)
31381+ {
31382+ switch(args_type[i])
31383+ {
31384+ case TYPE_UNSIGNED_CHAR:
31385+ case TYPE_CHAR:
31386+ {
31387+ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
31388+#ifdef ENABLE_GL_LOG
31389+ if (must_save) write_gl_debug_cmd_char(args[i]);
31390+#endif
31391+ commmand_buffer_offset += sizeof(int);
31392+ break;
31393+ }
31394+
31395+ case TYPE_UNSIGNED_SHORT:
31396+ case TYPE_SHORT:
31397+ {
31398+ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
31399+#ifdef ENABLE_GL_LOG
31400+ if (must_save) write_gl_debug_cmd_short(args[i]);
31401+#endif
31402+ commmand_buffer_offset += sizeof(int);
31403+ break;
31404+ }
31405+
31406+ case TYPE_UNSIGNED_INT:
31407+ case TYPE_INT:
31408+ case TYPE_FLOAT:
31409+ {
31410+ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
31411+#ifdef ENABLE_GL_LOG
31412+ if (must_save) write_gl_debug_cmd_int(args[i]);
31413+#endif
31414+ commmand_buffer_offset += sizeof(int);
31415+ break;
31416+ }
31417+
31418+ case TYPE_NULL_TERMINATED_STRING:
31419+ CASE_IN_UNKNOWN_SIZE_POINTERS:
31420+ {
31421+ args_size[i] = *(int*)(command_buffer + commmand_buffer_offset);
31422+ commmand_buffer_offset += sizeof(int);
31423+
31424+ if (args_size[i] == 0)
31425+ {
31426+ args[i] = 0;
31427+ }
31428+ else
31429+ {
31430+ args[i] = (long)(command_buffer + commmand_buffer_offset);
31431+ }
31432+
31433+ if (args[i] == 0)
31434+ {
31435+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
31436+ {
31437+ fprintf(stderr, "call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31438+ return 0;
31439+ }
31440+ }
31441+#ifdef ENABLE_GL_LOG
31442+ if (must_save) write_gl_debug_cmd_buffer_with_size(args_size[i], (void*)args[i]);
31443+#endif
31444+ commmand_buffer_offset += args_size[i];
31445+
31446+ break;
31447+ }
31448+
31449+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31450+ {
31451+ args_size[i] = compute_arg_length(stderr, func_number, i, args);
31452+ args[i] = (args_size[i]) ? (long)(command_buffer + commmand_buffer_offset) : 0;
31453+#ifdef ENABLE_GL_LOG
31454+ if (must_save) write_gl_debug_cmd_buffer_without_size(args_size[i], (void*)args[i]);
31455+#endif
31456+ commmand_buffer_offset += args_size[i];
31457+ break;
31458+ }
31459+
31460+ CASE_OUT_POINTERS:
31461+ {
31462+ fprintf(stderr, "shouldn't happen TYPE_OUT_xxxx : call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31463+ return 0;
31464+ break;
31465+ }
31466+
31467+ case TYPE_DOUBLE:
31468+ CASE_IN_KNOWN_SIZE_POINTERS:
31469+ args[i] = (long)(command_buffer + commmand_buffer_offset);
31470+ args_size[i] = tab_args_type_length[args_type[i]];
31471+#ifdef ENABLE_GL_LOG
31472+ if (must_save) write_gl_debug_cmd_buffer_without_size(tab_args_type_length[args_type[i]], (void*)args[i]);
31473+#endif
31474+ commmand_buffer_offset += tab_args_type_length[args_type[i]];
31475+ break;
31476+
31477+ case TYPE_IN_IGNORED_POINTER:
31478+ args[i] = 0;
31479+ break;
31480+
31481+ default:
31482+ fprintf(stderr, "shouldn't happen : call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31483+ return 0;
31484+ break;
31485+ }
31486+ }
31487+
31488+ if (display_function_call) display_gl_call(stderr, func_number, args, args_size);
31489+
31490+ do_function_call(dpy, func_number, 1, args, ret_string);
31491+ }
31492+ }
31493+ else
31494+ {
31495+#ifdef ENABLE_GL_LOG
31496+ if (must_save && func_number != _synchronize_func) write_gl_debug_cmd_short(func_number);
31497+#endif
31498+
31499+ for(i=0;i<nb_args;i++)
31500+ {
31501+ switch(args_type[i])
31502+ {
31503+ case TYPE_UNSIGNED_CHAR:
31504+ case TYPE_CHAR:
31505+ args[i] = read_sock_int(sock);
31506+#ifdef ENABLE_GL_LOG
31507+ if (must_save) write_gl_debug_cmd_char(args[i]);
31508+#endif
31509+ break;
31510+
31511+ case TYPE_UNSIGNED_SHORT:
31512+ case TYPE_SHORT:
31513+ args[i] = read_sock_int(sock);
31514+#ifdef ENABLE_GL_LOG
31515+ if (must_save) write_gl_debug_cmd_short(args[i]);
31516+#endif
31517+ break;
31518+
31519+ case TYPE_UNSIGNED_INT:
31520+ case TYPE_INT:
31521+ case TYPE_FLOAT:
31522+ args[i] = read_sock_int(sock);
31523+#ifdef ENABLE_GL_LOG
31524+ if (must_save) write_gl_debug_cmd_int(args[i]);
31525+#endif
31526+ break;
31527+
31528+ case TYPE_NULL_TERMINATED_STRING:
31529+ CASE_IN_UNKNOWN_SIZE_POINTERS:
31530+ {
31531+ args_size[i] = read_sock_int(sock);
31532+ if (args_size[i])
31533+ {
31534+ args[i] = (long)malloc(args_size[i]);
31535+ read_sock_data(sock, (void*)args[i], args_size[i]);
31536+ }
31537+ else
31538+ {
31539+ args[i] = 0;
31540+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
31541+ {
31542+ fprintf(stderr, "call %s arg %d\n", tab_opengl_calls_name[func_number], i);
31543+ return 0;
31544+ }
31545+ }
31546+#ifdef ENABLE_GL_LOG
31547+ if (must_save) write_gl_debug_cmd_buffer_with_size(args_size[i], (void*)args[i]);
31548+#endif
31549+ break;
31550+ }
31551+
31552+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31553+ {
31554+ args_size[i] = compute_arg_length(stderr, func_number, i, args);
31555+ args[i] = (args_size[i]) ? (long)malloc(args_size[i]) : 0;
31556+ read_sock_data(sock, (void*)args[i], args_size[i]);
31557+#ifdef ENABLE_GL_LOG
31558+ if (must_save) write_gl_debug_cmd_buffer_without_size(args_size[i], (void*)args[i]);
31559+#endif
31560+ break;
31561+ }
31562+
31563+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31564+ {
31565+ args_size[i] = compute_arg_length(stderr, func_number, i, args);
31566+ args[i] = (long)malloc(args_size[i]);
31567+ break;
31568+ }
31569+
31570+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
31571+ {
31572+ args_size[i] = read_sock_int(sock);
31573+ if (func_number == glGetProgramLocalParameterdvARB_func)
31574+ {
31575+ fprintf(stderr, "size = %d\n", args_size[i]);
31576+ }
31577+ if (args_size[i])
31578+ {
31579+ args[i] = (long)malloc(args_size[i]);
31580+ }
31581+ else
31582+ {
31583+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
31584+ {
31585+ fprintf(stderr, "call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31586+ return 0;
31587+ };
31588+ args[i] = 0;
31589+ }
31590+ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
31591+#ifdef ENABLE_GL_LOG
31592+ if (must_save) write_gl_debug_cmd_int(args_size[i]);
31593+#endif
31594+ break;
31595+ }
31596+
31597+ CASE_OUT_KNOWN_SIZE_POINTERS:
31598+ {
31599+ args_size[i] = tab_args_type_length[args_type[i]];
31600+ assert(args_size[i]);
31601+ args[i] = (long)malloc(args_size[i]);
31602+ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
31603+ break;
31604+ }
31605+
31606+ case TYPE_DOUBLE:
31607+ CASE_IN_KNOWN_SIZE_POINTERS:
31608+ args_size[i] = tab_args_type_length[args_type[i]];
31609+ args[i] = (long)malloc(args_size[i]);
31610+ read_sock_data(sock, (void*)args[i], args_size[i]);
31611+#ifdef ENABLE_GL_LOG
31612+ if (must_save) write_gl_debug_cmd_buffer_without_size(tab_args_type_length[args_type[i]], (void*)args[i]);
31613+#endif
31614+ break;
31615+
31616+ case TYPE_IN_IGNORED_POINTER:
31617+ args[i] = 0;
31618+ break;
31619+
31620+ default:
31621+ fprintf(stderr, "shouldn't happen : call %s arg %d\n", tab_opengl_calls_name[func_number], i);
31622+ return 0;
31623+ break;
31624+ }
31625+ }
31626+
31627+ if (display_function_call) display_gl_call(stderr, func_number, args, args_size);
31628+
31629+ if (getenv("ALWAYS_FLUSH")) fflush(f);
31630+
31631+ int ret = do_function_call(dpy, func_number, 1, args, ret_string);
31632+#ifdef ENABLE_GL_LOG
31633+ if (must_save && func_number == glXGetVisualFromFBConfig_func)
31634+ {
31635+ write_gl_debug_cmd_int(ret);
31636+ }
31637+#endif
31638+
31639+ for(i=0;i<nb_args;i++)
31640+ {
31641+ switch(args_type[i])
31642+ {
31643+ case TYPE_UNSIGNED_INT:
31644+ case TYPE_INT:
31645+ case TYPE_UNSIGNED_CHAR:
31646+ case TYPE_CHAR:
31647+ case TYPE_UNSIGNED_SHORT:
31648+ case TYPE_SHORT:
31649+ case TYPE_FLOAT:
31650+ break;
31651+
31652+ case TYPE_NULL_TERMINATED_STRING:
31653+ case TYPE_DOUBLE:
31654+ CASE_IN_POINTERS:
31655+ if (args[i]) free((void*)args[i]);
31656+ break;
31657+
31658+ CASE_OUT_POINTERS:
31659+ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
31660+ write_sock_data(sock, (void*)args[i], args_size[i]);
31661+ if (display_function_call)
31662+ {
31663+ if (args_type[i] == TYPE_OUT_1INT)
31664+ {
31665+ fprintf(stderr, "out[%d] : %d\n", i, *(int*)args[i]);
31666+ }
31667+ else if (args_type[i] == TYPE_OUT_1FLOAT)
31668+ {
31669+ fprintf(stderr, "out[%d] : %f\n", i, *(float*)args[i]);
31670+ }
31671+ }
31672+ if (args[i]) free((void*)args[i]);
31673+ break;
31674+
31675+ case TYPE_IN_IGNORED_POINTER:
31676+ args[i] = 0;
31677+ break;
31678+
31679+ default:
31680+ fprintf(stderr, "shouldn't happen : call %s arg %d\n", tab_opengl_calls_name[func_number], i);
31681+ return 0;
31682+ break;
31683+ }
31684+ }
31685+
31686+ if (signature->ret_type == TYPE_CONST_CHAR)
31687+ {
31688+ write_sock_int(sock, strlen(ret_string) + 1);
31689+ write_sock_data(sock, ret_string, strlen(ret_string) + 1);
31690+ }
31691+ else if (signature->ret_type != TYPE_NONE)
31692+ {
31693+ write_sock_int(sock, ret);
31694+ }
31695+
31696+#ifdef ENABLE_GL_LOG
31697+ if (must_save && func_number == _exit_process_func)
31698+ {
31699+ write_gl_debug_end();
31700+ }
31701+#endif
31702+ if (func_number == _exit_process_func)
31703+ {
31704+ return -1;
31705+ }
31706+ else if (func_number == glXSwapBuffers_func)
31707+ {
31708+ int diff_time;
31709+ count_current++;
31710+ gettimeofday(&current_time, NULL);
31711+#ifdef ENABLE_GL_LOG
31712+ if (must_save && timestamp)
31713+ {
31714+ long long ts = (current_time.tv_sec - time_stamp_start.tv_sec) * (long long)1000000 + current_time.tv_usec - time_stamp_start.tv_usec;
31715+ /* -1 is special code that indicates time synchro */
31716+ write_gl_debug_cmd_short(timesynchro_func);
31717+ write_gl_debug_cmd_longlong(ts);
31718+ }
31719+#endif
31720+ diff_time = (current_time.tv_sec - last_time.tv_sec) * 1000 + (current_time.tv_usec - last_time.tv_usec) / 1000;
31721+ if (diff_time > refresh_rate)
31722+ {
31723+#ifdef ENABLE_GL_LOG
31724+ fflush(f);
31725+#endif
31726+ printf("%d frames in %.1f seconds = %.3f FPS\n",
31727+ count_current - count_last_time,
31728+ diff_time / 1000.,
31729+ (count_current - count_last_time) * 1000. / diff_time);
31730+ last_time.tv_sec = current_time.tv_sec;
31731+ last_time.tv_usec = current_time.tv_usec;
31732+ count_last_time = count_current;
31733+ }
31734+ }
31735+ }
31736+ return 0;
31737+}
31738+
31739+int
31740+make_socket (uint16_t port)
31741+{
31742+ int sock;
31743+ struct sockaddr_in name;
31744+
31745+ /* Create the socket. */
31746+ sock = socket (PF_INET, SOCK_STREAM, 0);
31747+ if (sock < 0)
31748+ {
31749+ perror ("socket");
31750+ exit (EXIT_FAILURE);
31751+ }
31752+
31753+ /* Give the socket a name. */
31754+ name.sin_family = AF_INET;
31755+ name.sin_port = htons (port);
31756+ name.sin_addr.s_addr = htonl (INADDR_ANY);
31757+ if (bind (sock, (struct sockaddr *) &name, sizeof (name)) < 0)
31758+ {
31759+ perror ("bind");
31760+ exit (EXIT_FAILURE);
31761+ }
31762+
31763+ return sock;
31764+}
31765+
31766+static int x_error_handler(Display *display,
31767+ XErrorEvent *error)
31768+{
31769+ char buf[64];
31770+ XGetErrorText(display, error->error_code, buf, 63);
31771+ fprintf (stderr, "The program received an X Window System error.\n"
31772+ "This probably reflects a bug in the program.\n"
31773+ "The error was '%s'.\n"
31774+ " (Details: serial %ld error_code %d request_code %d minor_code %d)\n",
31775+ buf,
31776+ error->serial,
31777+ error->error_code,
31778+ error->request_code,
31779+ error->minor_code);
31780+ has_x_error = 1;
31781+ return 0;
31782+}
31783+
31784+void usage()
31785+{
31786+ printf("Usage : opengl_server [OPTION]\n\n");
31787+ printf("The following options are available :\n");
31788+ printf("--port=XXXX : set XXX as the port number for the TCP/IP server (default : 5555)\n");
31789+ printf("--debug : output debugging trace on stderr\n");
31790+ printf("--save : dump the serialialized OpenGL flow in a file (default : /tmp/debug_gl.bin)\n");
31791+ printf("--filename=X : the file where to write the serailized OpenGL flow\n");
31792+ printf("--different-windows : even if the client is on 127.0.0.1, display OpenGL on a new X window\n");
31793+ printf("--parent-xid=XXX : use XXX as the XID of the parent X window where to display the OpenGL flow\n");
31794+ printf(" This is useful if you want to run accelerated OpenGL inside a non-patched QEMU\n");
31795+ printf(" or from another emulator, through TCP/IP\n");
31796+ printf("--h or --help : display this help\n");
31797+}
31798+
31799+int
31800+main (int argc, char* argv[])
31801+{
31802+ int sock;
31803+ fd_set active_fd_set, read_fd_set;
31804+ int i;
31805+ struct sockaddr_in clientname;
31806+ socklen_t size;
31807+ int port = PORT;
31808+ int different_windows = 0;
31809+
31810+ for(i=1;i<argc;i++)
31811+ {
31812+ if (argv[i][0] == '-' && argv[i][1] == '-')
31813+ argv[i] = argv[i]+1;
31814+
31815+ if (strcmp(argv[i], "-debug") == 0)
31816+ {
31817+ display_function_call = 1;
31818+ }
31819+ else if (strcmp(argv[i], "-save") == 0)
31820+ {
31821+ must_save = 1;
31822+ }
31823+ else if (strncmp(argv[i], "-port=",6) == 0)
31824+ {
31825+ port = atoi(argv[i] + 6);
31826+ }
31827+ else if (strncmp(argv[i], "-filename=",strlen("-filename=")) == 0)
31828+ {
31829+ filename = argv[i] + strlen("-filename=");
31830+ }
31831+ else if (strncmp(argv[i], "-parent-xid=",strlen("-parent-xid=")) == 0)
31832+ {
31833+ char* c = argv[i] + strlen("-parent-xid=");
31834+ parent_xid = strtol(c, NULL, 0);
31835+ different_windows = 1;
31836+ }
31837+ else if (strcmp(argv[i], "-different-windows") == 0)
31838+ {
31839+ different_windows = 1;
31840+ }
31841+ else if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "-help") == 0)
31842+ {
31843+ usage();
31844+ return 0;
31845+ }
31846+ else
31847+ {
31848+ fprintf(stderr, "unknown parameter : %s\n", argv[i]);
31849+ usage();
31850+ return -1;
31851+ }
31852+ }
31853+
31854+ /* Create the socket and set it up to accept connections. */
31855+ sock = make_socket (port);
31856+
31857+ int flag = 1;
31858+ if (setsockopt(sock, IPPROTO_IP, SO_REUSEADDR,(char *)&flag, sizeof(int)) != 0)
31859+ {
31860+ perror("setsockopt SO_REUSEADDR");
31861+ }
31862+ if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,(char *)&flag, sizeof(int)) != 0)
31863+ {
31864+ perror("setsockopt TCP_NODELAY");
31865+ }
31866+
31867+ if (listen (sock, 1) < 0)
31868+ {
31869+ perror ("listen");
31870+ exit (EXIT_FAILURE);
31871+ }
31872+
31873+ struct sigaction action;
31874+ action.sa_handler = SIG_IGN;
31875+ action.sa_flags = SA_NOCLDWAIT;
31876+ sigaction(SIGCHLD,&action,NULL);
31877+
31878+ FD_ZERO (&active_fd_set);
31879+ FD_SET (sock, &active_fd_set);
31880+
31881+ while(1)
31882+ {
31883+ int new, pid;
31884+
31885+ read_fd_set = active_fd_set;
31886+ if (select (FD_SETSIZE, &read_fd_set, NULL, NULL, NULL) < 0)
31887+ {
31888+ perror ("select");
31889+ exit (EXIT_FAILURE);
31890+ }
31891+
31892+ size = sizeof (clientname);
31893+ new = accept (sock, (struct sockaddr *) &clientname, &size);
31894+ if (new < 0)
31895+ {
31896+ perror ("accept");
31897+ exit (EXIT_FAILURE);
31898+ }
31899+ pid = fork();
31900+ if (pid == -1)
31901+ {
31902+ perror ("fork");
31903+ exit(EXIT_FAILURE);
31904+ }
31905+ if (pid == 0)
31906+ {
31907+ close(sock);
31908+
31909+ fprintf (stderr, "Server: connect from host %s, port %hd.\n",
31910+ inet_ntoa (clientname.sin_addr),
31911+ ntohs (clientname.sin_port));
31912+
31913+ gettimeofday(&last_time, NULL);
31914+ gettimeofday(&last_read_time, NULL);
31915+
31916+ if (strcmp(inet_ntoa(clientname.sin_addr), "127.0.0.1") == 0 &&
31917+ different_windows == 0)
31918+ {
31919+ opengl_exec_set_local_connection();
31920+ }
31921+
31922+ if (timestamp)
31923+ {
31924+ gettimeofday(&time_stamp_start, NULL);
31925+ }
31926+
31927+ XSetErrorHandler(x_error_handler);
31928+
31929+ while(1)
31930+ {
31931+ if (read_from_client (new) < 0)
31932+ {
31933+ do_function_call(dpy, _exit_process_func, 1, NULL, NULL);
31934+
31935+ fprintf (stderr, "Server: disconnect from host %s, port %hd.\n",
31936+ inet_ntoa (clientname.sin_addr),
31937+ ntohs (clientname.sin_port));
31938+
31939+ return 0;
31940+ }
31941+ }
31942+ }
31943+ else
31944+ {
31945+ close(new);
31946+ }
31947+ }
31948+
31949+ return 0;
31950+}
31951Index: qemu-0.14.0/target-i386/opengl_utils.h
31952===================================================================
31953--- /dev/null
31954+++ qemu-0.14.0/target-i386/opengl_utils.h
31955@@ -0,0 +1,453 @@
31956+/*
31957+ * Functions used by host & client sides
31958+ *
31959+ * Copyright (c) 2007 Even Rouault
31960+ *
31961+ * Permission is hereby granted, free of charge, to any person obtaining a copy
31962+ * of this software and associated documentation files (the "Software"), to deal
31963+ * in the Software without restriction, including without limitation the rights
31964+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
31965+ * copies of the Software, and to permit persons to whom the Software is
31966+ * furnished to do so, subject to the following conditions:
31967+ *
31968+ * The above copyright notice and this permission notice shall be included in
31969+ * all copies or substantial portions of the Software.
31970+ *
31971+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31972+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31973+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
31974+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31975+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31976+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
31977+ * THE SOFTWARE.
31978+ */
31979+
31980+
31981+#ifndef _OPENGL_UTILS
31982+#define _OPENGL_UTILS
31983+
31984+typedef struct {
31985+ unsigned int *values;
31986+ int nbValues;
31987+} RangeAllocator;
31988+
31989+/*
31990+static void print_range(RangeAllocator* range)
31991+{
31992+ int i;
31993+ printf("%s", "table : ");
31994+ for(i=0;i<range->nbValues;i++)
31995+ {
31996+ printf("%d ", range->values[i]);
31997+ }
31998+ printf("\n");
31999+}
32000+*/
32001+
32002+static inline void alloc_value(RangeAllocator *range, unsigned int value)
32003+{
32004+ if (value == 0)
32005+ return;
32006+ if (range->nbValues >= 1) {
32007+ int lower = 0;
32008+ int upper = range->nbValues - 1;
32009+
32010+ while (1) {
32011+ int mid = (lower + upper) / 2;
32012+
32013+ if (range->values[mid] > value)
32014+ upper = mid;
32015+ else if (range->values[mid] < value)
32016+ lower = mid;
32017+ else
32018+ break;
32019+ if (upper - lower <= 1) {
32020+ if (value < range->values[lower]) {
32021+ range->values =
32022+ realloc(range->values,
32023+ (range->nbValues + 1) * sizeof(int));
32024+ memmove(&range->values[lower + 1], &range->values[lower],
32025+ (range->nbValues - lower) * sizeof(int));
32026+ range->values[lower] = value;
32027+ range->nbValues++;
32028+ } else if (value == range->values[lower]) {
32029+ } else if (value < range->values[upper]) {
32030+ range->values =
32031+ realloc(range->values,
32032+ (range->nbValues + 1) * sizeof(int));
32033+ memmove(&range->values[upper + 1], &range->values[upper],
32034+ (range->nbValues - upper) * sizeof(int));
32035+ range->values[upper] = value;
32036+ range->nbValues++;
32037+ } else if (value == range->values[upper]) {
32038+ } else {
32039+ upper++;
32040+
32041+ range->values =
32042+ realloc(range->values,
32043+ (range->nbValues + 1) * sizeof(int));
32044+ memmove(&range->values[upper + 1], &range->values[upper],
32045+ (range->nbValues - upper) * sizeof(int));
32046+ range->values[upper] = value;
32047+ range->nbValues++;
32048+ }
32049+ break;
32050+ }
32051+ }
32052+ } else {
32053+ range->values = malloc(sizeof(int));
32054+ range->values[0] = value;
32055+ range->nbValues = 1;
32056+ }
32057+}
32058+
32059+/* return first value */
32060+static inline unsigned int alloc_range(RangeAllocator *range, int n,
32061+ unsigned int *values)
32062+{
32063+ int i, j;
32064+
32065+ if (range->nbValues == 0) {
32066+ range->nbValues = n;
32067+ range->values = malloc(n * sizeof(int));
32068+ for (i = 0; i < n; i++) {
32069+ range->values[i] = i + 1;
32070+ if (values)
32071+ values[i] = range->values[i];
32072+ }
32073+ return 1;
32074+ } else {
32075+ int lastValue = 1;
32076+
32077+ for (i = 0; i < range->nbValues; i++) {
32078+ if ((int) range->values[i] - (int) lastValue - 1 >= n) {
32079+ range->values =
32080+ realloc(range->values,
32081+ (range->nbValues + n) * sizeof(int));
32082+ memmove(&range->values[i + n], &range->values[i],
32083+ (range->nbValues - i) * sizeof(int));
32084+ for (j = 0; j < n; j++) {
32085+ range->values[i + j] = lastValue + 1 + j;
32086+ if (values)
32087+ values[j] = range->values[i + j];
32088+ }
32089+ range->nbValues += n;
32090+ break;
32091+ } else
32092+ lastValue = range->values[i];
32093+ }
32094+ if (i == range->nbValues) {
32095+ range->values =
32096+ realloc(range->values, (range->nbValues + n) * sizeof(int));
32097+ for (j = 0; j < n; j++) {
32098+ range->values[i + j] = lastValue + 1 + j;
32099+ if (values)
32100+ values[j] = range->values[i + j];
32101+ }
32102+ range->nbValues += n;
32103+ }
32104+ return lastValue + 1;
32105+ }
32106+}
32107+
32108+static inline void delete_value(RangeAllocator *range, unsigned int value)
32109+{
32110+ if (value == 0)
32111+ return;
32112+ if (range->nbValues >= 1) {
32113+ int lower = 0;
32114+ int upper = range->nbValues - 1;
32115+
32116+ while (1) {
32117+ int mid = (lower + upper) / 2;
32118+
32119+ if (range->values[mid] > value)
32120+ upper = mid;
32121+ else if (range->values[mid] < value)
32122+ lower = mid;
32123+ else {
32124+ lower = upper = mid;
32125+ }
32126+ if (upper - lower <= 1) {
32127+ if (value == range->values[lower]) {
32128+ memmove(&range->values[lower], &range->values[lower + 1],
32129+ (range->nbValues - lower - 1) * sizeof(int));
32130+ range->nbValues--;
32131+ } else if (value == range->values[upper]) {
32132+ memmove(&range->values[upper], &range->values[upper + 1],
32133+ (range->nbValues - upper - 1) * sizeof(int));
32134+ range->nbValues--;
32135+ }
32136+ break;
32137+ }
32138+ }
32139+ }
32140+}
32141+
32142+static inline void delete_range(RangeAllocator *range, int n,
32143+ const unsigned int *values)
32144+{
32145+ int i;
32146+
32147+ for (i = 0; i < n; i++) {
32148+ delete_value(range, values[i]);
32149+ }
32150+}
32151+
32152+static inline void delete_consecutive_values(RangeAllocator *range,
32153+ unsigned int first, int n)
32154+{
32155+ int i;
32156+
32157+ for (i = 0; i < n; i++) {
32158+ delete_value(range, first + i);
32159+ }
32160+}
32161+
32162+
32163+/*****************************************************************/
32164+/* */
32165+/* CRC LOOKUP TABLE */
32166+/* ================ */
32167+/* The following CRC lookup table was generated automagically */
32168+/* by the Rocksoft^tm Model CRC Algorithm Table Generation */
32169+/* Program V1.0 using the following model parameters: */
32170+/* */
32171+/* Width : 4 bytes. */
32172+/* Poly : 0x04C11DB7L */
32173+/* Reverse : TRUE. */
32174+/* */
32175+/* For more information on the Rocksoft^tm Model CRC Algorithm, */
32176+/* see the document titled "A Painless Guide to CRC Error */
32177+/* Detection Algorithms" by Ross Williams */
32178+/* (ross@guest.adelaide.edu.au.). This document is likely to be */
32179+/* in the FTP archive "ftp.adelaide.edu.au/pub/rocksoft". */
32180+/* */
32181+/*****************************************************************/
32182+
32183+static const unsigned int crctable[256] = {
32184+ 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,
32185+ 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
32186+ 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,
32187+ 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
32188+ 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,
32189+ 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
32190+ 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,
32191+ 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,
32192+ 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,
32193+ 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
32194+ 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,
32195+ 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
32196+ 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,
32197+ 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,
32198+ 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,
32199+ 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,
32200+ 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,
32201+ 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
32202+ 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,
32203+ 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
32204+ 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,
32205+ 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,
32206+ 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,
32207+ 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
32208+ 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,
32209+ 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,
32210+ 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,
32211+ 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,
32212+ 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,
32213+ 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
32214+ 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,
32215+ 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,
32216+ 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,
32217+ 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,
32218+ 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,
32219+ 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
32220+ 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,
32221+ 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,
32222+ 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,
32223+ 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
32224+ 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,
32225+ 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
32226+ 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,
32227+ 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,
32228+ 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,
32229+ 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,
32230+ 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,
32231+ 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
32232+ 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,
32233+ 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
32234+ 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,
32235+ 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,
32236+ 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,
32237+ 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
32238+ 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,
32239+ 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,
32240+ 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,
32241+ 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,
32242+ 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,
32243+ 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
32244+ 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,
32245+ 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,
32246+ 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,
32247+ 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
32248+};
32249+
32250+static unsigned int calc_checksum(const void *_ptr, int length,
32251+ unsigned int seed)
32252+{
32253+ int i;
32254+ unsigned int crc = seed;
32255+ unsigned char *ptr = (unsigned char *) _ptr;
32256+
32257+ if (ptr == NULL)
32258+ return -1;
32259+ for (i = 0; i < length; i++) {
32260+ crc = crctable[(crc ^ *ptr++) & 0xFF] ^ (crc >> 8);
32261+ }
32262+ return crc;
32263+}
32264+
32265+
32266+static inline void display_gl_call(FILE *f,
32267+ int func_number, arg_t *args, int *args_size)
32268+{
32269+ int i;
32270+
32271+ if (func_number < 0) {
32272+ fprintf(f, "unknown call : %d\n", func_number);
32273+ return;
32274+ }
32275+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
32276+ int nb_args = signature->nb_args;
32277+ int *args_type = signature->args_type;
32278+
32279+ fprintf(f, "%s(", tab_opengl_calls_name[func_number]);
32280+
32281+ for (i = 0; i < nb_args; i++) {
32282+ switch (args_type[i]) {
32283+ case TYPE_UNSIGNED_CHAR:
32284+ case TYPE_CHAR:
32285+ {
32286+ fprintf(f, "%d", (char) args[i]);
32287+ break;
32288+ }
32289+
32290+ case TYPE_UNSIGNED_SHORT:
32291+ case TYPE_SHORT:
32292+ {
32293+ fprintf(f, "%d", (short) args[i]);
32294+ break;
32295+ }
32296+
32297+ case TYPE_UNSIGNED_INT:
32298+ case TYPE_INT:
32299+ {
32300+ fprintf(f, "%d", (int) args[i]);
32301+ break;
32302+ }
32303+
32304+ case TYPE_FLOAT:
32305+ fprintf(f, "%f", *(float *) &args[i]);
32306+ break;
32307+
32308+ case TYPE_DOUBLE:
32309+ CASE_IN_KNOWN_SIZE_POINTERS:
32310+ case TYPE_NULL_TERMINATED_STRING:
32311+ CASE_IN_UNKNOWN_SIZE_POINTERS:
32312+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
32313+ if (args_type[i] == TYPE_NULL_TERMINATED_STRING) {
32314+ fprintf(f, "\"%s\"", (char *) args[i]);
32315+ } else if (args_type[i] == TYPE_DOUBLE)
32316+ fprintf(f, "%f", *(double *) args[i]);
32317+ else if (IS_ARRAY_CHAR(args_type[i]) &&
32318+ args_size[i] <= 4 * sizeof(char)) {
32319+ int j;
32320+ int n = args_size[i] / sizeof(char);
32321+
32322+ fprintf(f, "(");
32323+ for (j = 0; j < n; j++) {
32324+ fprintf(f, "%d", ((unsigned char *) args[i])[j]);
32325+ if (j != n - 1)
32326+ fprintf(f, ", ");
32327+ }
32328+ fprintf(f, ")");
32329+ } else if (IS_ARRAY_SHORT(args_type[i]) &&
32330+ args_size[i] <= 4 * sizeof(short)) {
32331+ int j;
32332+ int n = args_size[i] / sizeof(short);
32333+
32334+ fprintf(f, "(");
32335+ for (j = 0; j < n; j++) {
32336+ fprintf(f, "%d", ((short *) args[i])[j]);
32337+ if (j != n - 1)
32338+ fprintf(f, ", ");
32339+ }
32340+ fprintf(f, ")");
32341+ } else if (IS_ARRAY_INT(args_type[i]) &&
32342+ args_size[i] <= 4 * sizeof(int)) {
32343+ int j;
32344+ int n = args_size[i] / sizeof(int);
32345+
32346+ fprintf(f, "(");
32347+ for (j = 0; j < n; j++) {
32348+ fprintf(f, "%d", ((int *) args[i])[j]);
32349+ if (j != n - 1)
32350+ fprintf(f, ", ");
32351+ }
32352+ fprintf(f, ")");
32353+ } else if (IS_ARRAY_FLOAT(args_type[i]) &&
32354+ args_size[i] <= 4 * sizeof(float)) {
32355+ int j;
32356+ int n = args_size[i] / sizeof(float);
32357+
32358+ fprintf(f, "(");
32359+ for (j = 0; j < n; j++) {
32360+ fprintf(f, "%f", ((float *) args[i])[j]);
32361+ if (j != n - 1)
32362+ fprintf(f, ", ");
32363+ }
32364+ fprintf(f, ")");
32365+ } else if (IS_ARRAY_DOUBLE(args_type[i]) &&
32366+ args_size[i] <= 4 * sizeof(double)) {
32367+ int j;
32368+ int n = args_size[i] / sizeof(double);
32369+
32370+ fprintf(f, "(");
32371+ for (j = 0; j < n; j++) {
32372+ fprintf(f, "%f", ((double *) args[i])[j]);
32373+ if (j != n - 1)
32374+ fprintf(f, ", ");
32375+ }
32376+ fprintf(f, ")");
32377+ } else {
32378+ fprintf(f, "%d bytes", args_size[i]);
32379+ fprintf(f, "(crc = 0x%x)",
32380+ calc_checksum((void *) args[i], args_size[i],
32381+ 0xFFFFFFFF));
32382+ }
32383+ break;
32384+
32385+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
32386+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
32387+ CASE_OUT_KNOWN_SIZE_POINTERS:
32388+ {
32389+ fprintf(f, "%d bytes (OUT)", args_size[i]);
32390+ break;
32391+ }
32392+
32393+ case TYPE_IN_IGNORED_POINTER:
32394+ break;
32395+
32396+ default:
32397+ fprintf(f, "shouldn't happen : call %s arg %d\n",
32398+ tab_opengl_calls_name[func_number], i);
32399+ return;
32400+ break;
32401+ }
32402+ if (i < nb_args - 1)
32403+ fprintf(f, ", ");
32404+ }
32405+ fprintf(f, ")\n");
32406+}
32407+
32408+#endif
32409Index: qemu-0.14.0/target-i386/parse_gl_h.c
32410===================================================================
32411--- /dev/null
32412+++ qemu-0.14.0/target-i386/parse_gl_h.c
32413@@ -0,0 +1,1496 @@
32414+/*
32415+ * Parse gl.h et glx.h to auto-generate source code
32416+ *
32417+ * Copyright (c) 2006,2007 Even Rouault
32418+ *
32419+ * Permission is hereby granted, free of charge, to any person obtaining a copy
32420+ * of this software and associated documentation files (the "Software"), to deal
32421+ * in the Software without restriction, including without limitation the rights
32422+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
32423+ * copies of the Software, and to permit persons to whom the Software is
32424+ * furnished to do so, subject to the following conditions:
32425+ *
32426+ * The above copyright notice and this permission notice shall be included in
32427+ * all copies or substantial portions of the Software.
32428+ *
32429+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32430+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32431+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
32432+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
32433+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32434+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
32435+ * THE SOFTWARE.
32436+ */
32437+
32438+/* gcc -g parse_gl_h.c -o parse_gl_h && ./parse_gl_h */
32439+#include <stdio.h>
32440+#include <stdlib.h>
32441+#include <string.h>
32442+#include <assert.h>
32443+
32444+int isExtByName(const char* name)
32445+{
32446+ return (strstr(name, "ARB") != NULL) ||
32447+ (strstr(name, "IBM") != NULL) ||
32448+ (strstr(name, "EXT") != NULL) ||
32449+ (strstr(name, "ATI") != NULL) ||
32450+ (strstr(name, "NV") != NULL) ||
32451+ (strstr(name, "MESA") != NULL) ||
32452+ (strstr(name, "APPLE") != NULL) ||
32453+ (strstr(name, "SUN") != NULL) ||
32454+ (strstr(name, "SGI") != NULL);
32455+}
32456+
32457+char* get_arg_type(char* s)
32458+{
32459+ while(*s == ' ' || *s == '\t') s++;
32460+ char* n = s;
32461+ char* c = strstr(n, "const");
32462+ if (c)
32463+ n += 6;
32464+
32465+ char* t = strstr(n, " ");
32466+ if (t)
32467+ {
32468+ if (t[1] == '*')
32469+ t += 2;
32470+ t[0] = 0;
32471+ char* ori = t;
32472+ t = strstr(t+1, "[");
32473+ if (t)
32474+ {
32475+ memmove(ori, t, strlen(t));
32476+ strstr(ori, "]")[1] = 0;
32477+ }
32478+ }
32479+ return strdup(s);
32480+}
32481+
32482+typedef struct
32483+{
32484+ char* type;
32485+ char* name;
32486+ int nargs;
32487+ char** args;
32488+ int ok;
32489+ int just_for_server_side;
32490+ int has_out_parameters;
32491+ int isExt;
32492+} FuncDesc;
32493+
32494+int isExt(FuncDesc* func)
32495+{
32496+ return func->isExt;
32497+}
32498+
32499+char* get_type_string(char* type)
32500+{
32501+ if (strstr(type, "[16]"))
32502+ {
32503+ if (strstr(type, "float"))
32504+ return ("TYPE_16FLOAT");
32505+ else if (strstr(type, "double"))
32506+ return ("TYPE_16DOUBLE");
32507+ else
32508+ {
32509+ printf("inconnu %s\n", type);
32510+ exit(-1);
32511+ }
32512+ }
32513+ else if (strstr(type, "[128]") && strstr(type, "GLubyte"))
32514+ return strstr(type, "const") ? "TYPE_128UCHAR" : "TYPE_OUT_128UCHAR";
32515+ else if (strstr(type, "const GLvoid *"))
32516+ return "TYPE_ARRAY_VOID";
32517+ else if (strstr(type, "const GLchar *") ||
32518+ strstr(type, "const GLcharARB *"))
32519+ return "TYPE_NULL_TERMINATED_STRING";
32520+ else if (strstr(type, "const GLbyte *"))
32521+ return "TYPE_ARRAY_SIGNED_CHAR";
32522+ else if (strstr(type, "const GLubyte *"))
32523+ return "TYPE_ARRAY_UNSIGNED_CHAR";
32524+ else if (strstr(type, "const GLshort *"))
32525+ return "TYPE_ARRAY_SHORT";
32526+ else if (strstr(type, "const GLushort *") ||
32527+ strstr(type, "const GLhalfNV *"))
32528+ return "TYPE_ARRAY_UNSIGNED_SHORT";
32529+ else if (strstr(type, "const GLint *"))
32530+ return "TYPE_ARRAY_INT";
32531+ else if (strstr(type, "const GLuint *") ||
32532+ strstr(type, "const GLenum *"))
32533+ return "TYPE_ARRAY_UNSIGNED_INT";
32534+ else if (strstr(type, "const GLfloat *") ||
32535+ strstr(type, "const GLclampf *"))
32536+ return "TYPE_ARRAY_FLOAT";
32537+ else if (strstr(type, "const GLdouble *"))
32538+ return "TYPE_ARRAY_DOUBLE";
32539+ else if (strstr(type, "GLvoid *"))
32540+ return "TYPE_OUT_ARRAY_VOID";
32541+ else if (strstr(type, "GLboolean *") ||
32542+ strstr(type, "GLubyte *"))
32543+ return "TYPE_OUT_ARRAY_UNSIGNED_CHAR";
32544+ else if (strstr(type, "GLcharARB *") ||
32545+ strstr(type, "GLchar *"))
32546+ return "TYPE_OUT_ARRAY_CHAR";
32547+ else if (strstr(type, "GLshort *"))
32548+ return "TYPE_OUT_ARRAY_SHORT";
32549+ else if (strstr(type, "GLushort *"))
32550+ return "TYPE_OUT_ARRAY_UNSIGNED_SHORT";
32551+ else if (strstr(type, "GLint *")||
32552+ strstr(type, "GLsizei *"))
32553+ return "TYPE_OUT_ARRAY_INT";
32554+ else if (strstr(type, "GLuint *") ||
32555+ strstr(type, "GLenum *") ||
32556+ strstr(type, "GLhandleARB *"))
32557+ return "TYPE_OUT_ARRAY_UNSIGNED_INT";
32558+ else if (strstr(type, "GLfloat *"))
32559+ return "TYPE_OUT_ARRAY_FLOAT";
32560+ else if (strstr(type, "GLdouble *"))
32561+ return "TYPE_OUT_ARRAY_DOUBLE";
32562+ else if (strcmp(type, "void") == 0)
32563+ return("TYPE_NONE");
32564+ else if (strcmp(type, "GLbyte") == 0)
32565+ return("TYPE_CHAR");
32566+ else if (strcmp(type, "GLubyte") == 0 ||
32567+ strcmp(type, "GLboolean") == 0)
32568+ return("TYPE_UNSIGNED_CHAR");
32569+ else if (strcmp(type, "GLshort") == 0)
32570+ return("TYPE_SHORT");
32571+ else if (strcmp(type, "GLushort") == 0 ||
32572+ strcmp(type, "GLhalfNV") == 0)
32573+ return("TYPE_UNSIGNED_SHORT");
32574+ else if (strcmp(type, "GLint") == 0 ||
32575+ strcmp(type, "GLsizei") == 0 ||
32576+ strcmp(type, "GLintptr") == 0 ||
32577+ strcmp(type, "GLsizeiptr") == 0 ||
32578+ strcmp(type, "GLintptrARB") == 0 ||
32579+ strcmp(type, "GLsizeiptrARB") == 0)
32580+ return("TYPE_INT");
32581+ else if (strcmp(type, "GLenum") == 0 ||
32582+ strcmp(type, "GLuint") == 0 ||
32583+ strcmp(type, "GLhandleARB") == 0 ||
32584+ strcmp(type, "GLbitfield") == 0)
32585+ return("TYPE_UNSIGNED_INT");
32586+ else if (strcmp(type, "GLfloat") == 0 ||
32587+ strcmp(type, "GLclampf") == 0)
32588+ return("TYPE_FLOAT");
32589+ else if (strcmp(type, "GLdouble") == 0 ||
32590+ strcmp(type, "GLclampd") == 0)
32591+ return("TYPE_DOUBLE");
32592+ else
32593+ {
32594+ printf("inconnu %s\n", type);
32595+ exit(-1);
32596+ }
32597+}
32598+
32599+typedef struct
32600+{
32601+ char* letter;
32602+ char* signature_type_name;
32603+ char* gl_c_type_name;
32604+ char* c_type_name;
32605+} ForIsKnownArgVector;
32606+
32607+#define N_ELEMENTS(x) (sizeof(x)/sizeof(x[0]))
32608+#define N_FIELDS_IN_ARG_VECTOR 4
32609+
32610+
32611+typedef struct
32612+{
32613+ char* func_name;
32614+ char* signature_type_name;
32615+} KnownLastArgFunc;
32616+
32617+static KnownLastArgFunc knownLastArgFuncs[] =
32618+{
32619+{"glFogCoordfv", "TYPE_1FLOAT"},
32620+{"glFogCoorddv", "TYPE_1DOUBLE"},
32621+{"glFogCoordfvEXT", "TYPE_1FLOAT"},
32622+{"glFogCoorddvEXT", "TYPE_1DOUBLE"},
32623+{"glFogCoordhvNV", "TYPE_1USHORT"},
32624+
32625+{"glGetFenceivNV", "TYPE_OUT_1INT"},
32626+
32627+{"glGetTexLevelParameteriv", "TYPE_OUT_1INT" },
32628+{"glGetTexLevelParameterfv", "TYPE_OUT_1FLOAT" },
32629+
32630+{"glGetRenderbufferParameterivEXT", "TYPE_OUT_1INT"},
32631+{"glGetFramebufferAttachmentParameterivEXT", "TYPE_OUT_1INT"},
32632+{"glGetFinalCombinerInputParameterivNV", "TYPE_OUT_1INT"},
32633+{"glGetCombinerOutputParameterivNV", "TYPE_OUT_1INT"},
32634+{"glGetCombinerInputParameterivNV", "TYPE_OUT_1INT"},
32635+{"glGetOcclusionQueryivNV", "TYPE_OUT_1INT"},
32636+{"glGetOcclusionQueryuivNV", "TYPE_OUT_1UINT"},
32637+{"glGetObjectParameterivARB", "TYPE_OUT_1INT"},
32638+{"glGetQueryivARB", "TYPE_OUT_1INT"},
32639+{"glGetQueryiv", "TYPE_OUT_1INT"},
32640+{"glGetQueryObjectivARB", "TYPE_OUT_1INT"},
32641+{"glGetQueryObjectiv", "TYPE_OUT_1INT"},
32642+{"glGetQueryObjectuivARB", "TYPE_OUT_1UINT"},
32643+{"glGetQueryObjectuiv", "TYPE_OUT_1UINT"},
32644+{"glGetProgramivARB", "TYPE_OUT_1INT"},
32645+{"glGetProgramiv", "TYPE_OUT_1INT"},
32646+{"glGetProgramivNV", "TYPE_OUT_1INT"},
32647+{"glGetShaderiv", "TYPE_OUT_1INT"},
32648+
32649+{"glCombinerParameterfvNV", "TYPE_1FLOAT"},
32650+{"glCombinerParameterivNV", "TYPE_1INT"},
32651+
32652+{"glGetFinalCombinerInputParameterfvNV", "TYPE_OUT_1FLOAT"},
32653+{"glGetCombinerOutputParameterfvNV", "TYPE_OUT_1FLOAT"},
32654+{"glGetCombinerInputParameterfvNV", "TYPE_OUT_1FLOAT"},
32655+{"glGetObjectParameterfvARB", "TYPE_OUT_1FLOAT"},
32656+
32657+{"glCombinerStageParameterfvNV", "TYPE_4FLOAT"},
32658+{"glGetCombinerStageParameterfvNV", "TYPE_OUT_4FLOAT"},
32659+
32660+{"glTexBumpParameterivATI", "TYPE_1INT"},
32661+{"glTexBumpParameterfvATI", "TYPE_1FLOAT"},
32662+{"glGetTexBumpParameterivATI", "TYPE_OUT_1INT"},
32663+{"glGetTexBumpParameterfvATI", "TYPE_OUT_1FLOAT"},
32664+
32665+{"glGetProgramLocalParameterfvARB", "TYPE_OUT_4FLOAT"},
32666+{"glGetProgramLocalParameterdvARB", "TYPE_OUT_4DOUBLE"},
32667+{"glGetProgramEnvParameterfvARB", "TYPE_OUT_4FLOAT"},
32668+{"glGetProgramEnvParameterdvARB", "TYPE_OUT_4DOUBLE"},
32669+{"glGetProgramLocalParameterIivNV", "TYPE_OUT_1INT"},
32670+{"glGetProgramLocalParameterIuivNV", "TYPE_OUT_1UINT"},
32671+{"glGetProgramEnvParameterIivNV", "TYPE_OUT_1INT"},
32672+{"glGetProgramEnvParameterIuivNV", "TYPE_OUT_1UINT"},
32673+
32674+{"glGetProgramParameterfvNV", "TYPE_OUT_4FLOAT"},
32675+{"glGetProgramParameterdvNV", "TYPE_OUT_4DOUBLE"},
32676+{"glGetProgramNamedParameterfvNV", "TYPE_OUT_4FLOAT"},
32677+{"glGetProgramNamedParameterdvNV", "TYPE_OUT_4DOUBLE"},
32678+
32679+{"glCullParameterfvEXT", "TYPE_4FLOAT"},
32680+{"glCullParameterdvEXT", "TYPE_4DOUBLE"},
32681+
32682+{"glGetTrackMatrixivNV", "TYPE_OUT_1INT"},
32683+{"glExecuteProgramNV", "TYPE_4FLOAT"},
32684+
32685+{"glEdgeFlagv", "TYPE_1UCHAR"},
32686+
32687+{"glClipPlane", "TYPE_4DOUBLE"},
32688+{"glGetClipPlane", "TYPE_OUT_4DOUBLE"},
32689+
32690+{"glSetFragmentShaderConstantATI", "TYPE_4FLOAT"},
32691+
32692+{"glGetObjectBufferfvATI", "TYPE_OUT_1FLOAT"},
32693+{"glGetObjectBufferivATI", "TYPE_OUT_1INT"},
32694+{"glGetArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
32695+{"glGetArrayObjectivATI", "TYPE_OUT_1INT"},
32696+{"glGetVariantArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
32697+{"glGetVariantArrayObjectivATI", "TYPE_OUT_1INT"},
32698+{"glGetVertexAttribArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
32699+{"glGetVertexAttribArrayObjectivATI", "TYPE_OUT_1INT"},
32700+
32701+{"glPixelTransformParameterivEXT", "TYPE_1INT"},
32702+{"glPixelTransformParameterfvEXT", "TYPE_1FLOAT"},
32703+{"glGetPixelTransformParameterivEXT", "TYPE_OUT_1INT"},
32704+{"glGetPixelTransformParameterfvEXT", "TYPE_OUT_1FLOAT"},
32705+
32706+{"glColorTableParameterfv", "TYPE_4FLOAT"},
32707+{"glColorTableParameteriv", "TYPE_4INT"},
32708+{"glGetColorTableParameterfv", "TYPE_OUT_4FLOAT"},
32709+{"glGetColorTableParameteriv", "TYPE_OUT_4INT"},
32710+{"glColorTableParameterfvEXT", "TYPE_4FLOAT"},
32711+{"glColorTableParameterivEXT", "TYPE_4INT"},
32712+{"glGetColorTableParameterfvEXT", "TYPE_OUT_4FLOAT"},
32713+{"glGetColorTableParameterivEXT", "TYPE_OUT_4INT"},
32714+
32715+{"glGetMinmaxParameterfv", "TYPE_OUT_1FLOAT"},
32716+{"glGetMinmaxParameteriv", "TYPE_OUT_1INT"},
32717+{"glGetHistogramParameterfv", "TYPE_OUT_1FLOAT"},
32718+{"glGetHistogramParameteriv", "TYPE_OUT_1INT"},
32719+{"glGetMinmaxParameterfvEXT", "TYPE_OUT_1FLOAT"},
32720+{"glGetMinmaxParameterivEXT", "TYPE_OUT_1INT"},
32721+{"glGetHistogramParameterfvEXT", "TYPE_OUT_1FLOAT"},
32722+{"glGetHistogramParameterivEXT", "TYPE_OUT_1INT"},
32723+
32724+/* Not sure at all for the 2 followingo ones ! */
32725+{"glGetBooleanIndexedvEXT", "TYPE_OUT_4UCHAR"},
32726+{"glGetIntegerIndexedvEXT", "TYPE_OUT_4INT"},
32727+
32728+{"glReferencePlaneSGIX", "TYPE_4DOUBLE"},
32729+
32730+{"glGetTransformFeedbackVaryingNV", "TYPE_OUT_1INT"},
32731+
32732+};
32733+
32734+int is_known_arg_vector(FuncDesc* desc, char** p_signature_type_name, char** p_c_type_name)
32735+{
32736+ static ForIsKnownArgVector my_tab[] =
32737+ {
32738+ { "b", "CHAR", "GLbyte", "signed char" },
32739+ { "Boolean", "CHAR", "GLboolean", "unsigned char" },
32740+ { "s", "SHORT", "GLshort", "short" },
32741+ { "i", "INT", "GLint", "int" },
32742+ { "Integer", "INT", "GLint", "int" },
32743+ { "ub", "CHAR", "GLubyte", "unsigned char" },
32744+ { "h", "SHORT", "GLhalf", "unsigned short" },
32745+ { "us", "SHORT", "GLushort", "unsigned short" },
32746+ { "ui", "INT", "GLuint", "unsigned int" },
32747+ { "Nb", "CHAR", "GLbyte", "signed char" },
32748+ { "Ns", "SHORT", "GLshort", "short" },
32749+ { "Ni", "INT", "GLint", "int" },
32750+ { "Nub", "CHAR", "GLubyte", "unsigned char" },
32751+ { "Nus", "SHORT", "GLushort", "unsigned short" },
32752+ { "Nui", "INT", "GLuint", "unsigned int" },
32753+
32754+ { "f", "FLOAT", "GLfloat", "float" },
32755+ { "Float", "FLOAT", "GLfloat", "float" },
32756+ { "d", "DOUBLE", "GLdouble", "double" },
32757+ };
32758+
32759+ if (desc->nargs == 0)
32760+ return 0;
32761+
32762+ int i , j;
32763+
32764+ if (strstr(desc->name, "glVertexAttribs") ||
32765+ strstr(desc->name, "glProgramParameters") ||
32766+ strstr(desc->name, "glProgramEnvParameters") ||
32767+ strstr(desc->name, "glProgramLocalParameters") ||
32768+ (strstr(desc->name, "glUniform") && (strstr(desc->name, "iv") || strstr(desc->name, "fv"))))
32769+ return 0;
32770+
32771+ static char signatures[N_ELEMENTS(my_tab)][N_FIELDS_IN_ARG_VECTOR][20] = {0};
32772+ char signature[10];
32773+
32774+ for(i=0;i<N_ELEMENTS(knownLastArgFuncs);i++)
32775+ {
32776+ if (strcmp(desc->name, knownLastArgFuncs[i].func_name) == 0)
32777+ {
32778+ if (p_signature_type_name)
32779+ {
32780+ *p_signature_type_name = knownLastArgFuncs[i].signature_type_name;
32781+ }
32782+ if (p_c_type_name)
32783+ {
32784+ if (strstr(knownLastArgFuncs[i].signature_type_name, "FLOAT"))
32785+ *p_c_type_name = "float";
32786+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "DOUBLE"))
32787+ *p_c_type_name = "double";
32788+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "UINT"))
32789+ *p_c_type_name = "unsigned int";
32790+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "INT"))
32791+ *p_c_type_name = "int";
32792+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "USHORT"))
32793+ *p_c_type_name = "unsigned short";
32794+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "SHORT"))
32795+ *p_c_type_name = "short";
32796+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "UCHAR"))
32797+ *p_c_type_name = "unsigned char";
32798+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "CHAR"))
32799+ *p_c_type_name = "char";
32800+ else
32801+ assert(0);
32802+ }
32803+ return 1;
32804+ }
32805+ }
32806+
32807+ for(i=0;i<N_ELEMENTS(my_tab);i++)
32808+ {
32809+ for(j=1;j<=N_FIELDS_IN_ARG_VECTOR;j++)
32810+ {
32811+ if (strstr(desc->name, "glIndex") && strstr(desc->name, "v"))
32812+ sprintf(signature, "%sv", my_tab[i].letter);
32813+ else
32814+ sprintf(signature, "%d%sv", j, my_tab[i].letter);
32815+ if (strstr(desc->name, signature) &&
32816+ strstr(desc->args[desc->nargs - 1], my_tab[i].gl_c_type_name) &&
32817+ strstr(desc->args[desc->nargs - 1], "*"))
32818+ {
32819+ if (p_signature_type_name)
32820+ {
32821+ if (signatures[i][j-1][0] == 0)
32822+ sprintf(signatures[i][j-1], "TYPE_%d%s", j, my_tab[i].signature_type_name);
32823+ *p_signature_type_name = signatures[i][j-1];
32824+ }
32825+ if (p_c_type_name) *p_c_type_name = my_tab[i].c_type_name;
32826+ return 1;
32827+ }
32828+ }
32829+ }
32830+ return 0;
32831+}
32832+
32833+static void print_server_side_argument(FILE* server_stub, int j, char* glType)
32834+{
32835+ const char* symbolic_type = get_type_string(glType);
32836+ if (strcmp(symbolic_type, "TYPE_CHAR") == 0)
32837+ fprintf(server_stub, "ARG_TO_CHAR(args[%d])", j);
32838+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_CHAR") == 0)
32839+ fprintf(server_stub, "ARG_TO_UNSIGNED_CHAR(args[%d])", j);
32840+ else if (strcmp(symbolic_type, "TYPE_SHORT") == 0)
32841+ fprintf(server_stub, "ARG_TO_SHORT(args[%d])", j);
32842+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_SHORT") == 0)
32843+ fprintf(server_stub, "ARG_TO_UNSIGNED_SHORT(args[%d])", j);
32844+ else if (strcmp(symbolic_type, "TYPE_INT") == 0)
32845+ fprintf(server_stub, "ARG_TO_INT(args[%d])", j);
32846+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_INT") == 0)
32847+ fprintf(server_stub, "ARG_TO_UNSIGNED_INT(args[%d])", j);
32848+ else if (strcmp(symbolic_type, "TYPE_FLOAT") == 0)
32849+ fprintf(server_stub, "ARG_TO_FLOAT(args[%d])", j);
32850+ else if (strcmp(symbolic_type, "TYPE_16FLOAT") == 0)
32851+ fprintf(server_stub, "(const float*)(args[%d])", j);
32852+ else if (strcmp(symbolic_type, "TYPE_DOUBLE") == 0)
32853+ fprintf(server_stub, "ARG_TO_DOUBLE(args[%d])", j);
32854+ else if ( strcmp(symbolic_type, "TYPE_16DOUBLE") == 0)
32855+ fprintf(server_stub, "(const double*)(args[%d])", j);
32856+ else if ( strcmp(symbolic_type, "TYPE_OUT_128UCHAR") == 0)
32857+ fprintf(server_stub, "(unsigned char*)(args[%d])", j);
32858+ else if ( strcmp(symbolic_type, "TYPE_128UCHAR") == 0)
32859+ fprintf(server_stub, "(const unsigned char*)(args[%d])", j);
32860+ else if ( strcmp(symbolic_type, "TYPE_NULL_TERMINATED_STRING") == 0)
32861+ fprintf(server_stub, "(const char*)(args[%d])", j);
32862+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_SHORT") == 0)
32863+ fprintf(server_stub, "(const short*)(args[%d])", j);
32864+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_SHORT") == 0)
32865+ fprintf(server_stub, "(const unsigned short*)(args[%d])", j);
32866+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_INT") == 0)
32867+ fprintf(server_stub, "(const int*)(args[%d])", j);
32868+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_INT") == 0)
32869+ fprintf(server_stub, "(const unsigned int*)(args[%d])", j);
32870+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_FLOAT") == 0)
32871+ fprintf(server_stub, "(const float*)(args[%d])", j);
32872+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_DOUBLE") == 0)
32873+ fprintf(server_stub, "(const double*)(args[%d])", j);
32874+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_CHAR") == 0)
32875+ fprintf(server_stub, "(const char*)(args[%d])", j);
32876+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_SIGNED_CHAR") == 0)
32877+ fprintf(server_stub, "(const signed char*)(args[%d])", j);
32878+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_VOID") == 0)
32879+ fprintf(server_stub, "(const void*)(args[%d])", j);
32880+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_CHAR") == 0)
32881+ fprintf(server_stub, "(const unsigned char*)(args[%d])", j);
32882+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_SHORT") == 0)
32883+ fprintf(server_stub, "(short*)(args[%d])", j);
32884+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_SHORT") == 0)
32885+ fprintf(server_stub, "(unsigned short*)(args[%d])", j);
32886+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_INT") == 0)
32887+ fprintf(server_stub, "(int*)(args[%d])", j);
32888+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_INT") == 0)
32889+ fprintf(server_stub, "(unsigned int*)(args[%d])", j);
32890+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_FLOAT") == 0)
32891+ fprintf(server_stub, "(float*)(args[%d])", j);
32892+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_DOUBLE") == 0)
32893+ fprintf(server_stub, "(double*)(args[%d])", j);
32894+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_VOID") == 0)
32895+ fprintf(server_stub, "(void*)(args[%d])", j);
32896+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_CHAR") == 0)
32897+ fprintf(server_stub, "(char*)(args[%d])", j);
32898+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_CHAR") == 0)
32899+ fprintf(server_stub, "(unsigned char*)(args[%d])", j);
32900+
32901+ else
32902+ {
32903+ fprintf(stderr, "Unknown : %s\n", symbolic_type);
32904+ assert(0);
32905+ }
32906+}
32907+
32908+static const char* func_dealt_by_hand[500] = { NULL };
32909+
32910+
32911+static const char* ignore_func[] =
32912+{
32913+ "glGetPointerv",
32914+ "glRectdv",
32915+ "glRectfv",
32916+ "glRectiv",
32917+ "glRectsv",
32918+ "glMultiDrawArrays",
32919+ "glMultiDrawArraysEXT",
32920+ "glMultiDrawElements",
32921+ "glMultiDrawElementsEXT",
32922+ "glUnmapBuffer",
32923+ "glUnmapBufferARB",
32924+ "glLoadTransposeMatrixf",
32925+ "glLoadTransposeMatrixd",
32926+ "glMultTransposeMatrixf",
32927+ "glMultTransposeMatrixd",
32928+ "glLoadTransposeMatrixfARB",
32929+ "glLoadTransposeMatrixdARB",
32930+ "glMultTransposeMatrixfARB",
32931+ "glMultTransposeMatrixdARB",
32932+
32933+ "glPixelDataRangeNV",
32934+ "glFlushPixelDataRangeNV",
32935+ "glVertexArrayRangeNV",
32936+ "glFlushVertexArrayRangeNV",
32937+ "glVertexWeightfEXT",
32938+
32939+ "glGetBufferPointerv",
32940+ "glGetBufferPointervARB",
32941+ "glGetVertexAttribPointerv",
32942+ "glGetVertexAttribPointervARB",
32943+ "glVertexAttribPointer",
32944+ "glVertexAttribPointerARB",
32945+ "glGetVariantPointervEXT",
32946+ NULL,
32947+};
32948+
32949+void get_func_dealt_by_hand()
32950+{
32951+ FILE* f = fopen("../target-i386/gl_func_perso.h", "r");
32952+ char buffer[256];
32953+ int i = 0;
32954+ char* c;
32955+ while(fgets(buffer, 256, f))
32956+ {
32957+ if (strstr(buffer, "MAGIC_MACRO("))
32958+ {
32959+ func_dealt_by_hand[i] = strdup(strstr(buffer, "MAGIC_MACRO(") + strlen("MAGIC_MACRO("));
32960+ * strstr(func_dealt_by_hand[i], ")") = 0;
32961+ c = strstr(func_dealt_by_hand[i], "_");
32962+ if (c && c != func_dealt_by_hand[i]) *c = 0;
32963+ i ++;
32964+ }
32965+ }
32966+ fclose(f);
32967+
32968+ int j = 0;
32969+ while(ignore_func[j])
32970+ {
32971+ func_dealt_by_hand[i] = ignore_func[j];
32972+ i++;
32973+ j++;
32974+ }
32975+}
32976+
32977+static const char* just_for_server_side_list[] =
32978+{
32979+ "glEnableClientState",
32980+ "glDisableClientState",
32981+ "glPushClientAttrib",
32982+ "glPopClientAttrib",
32983+ "glPixelStorei",
32984+ "glPixelStoref",
32985+ "glClientActiveTexture",
32986+ "glClientActiveTextureARB",
32987+ "glEnableVertexAttribArray",
32988+ "glEnableVertexAttribArrayARB",
32989+ "glDisableVertexAttribArray",
32990+ "glDisableVertexAttribArrayARB",
32991+ "glDrawElementArrayATI",
32992+ "glDrawRangeElementArrayATI",
32993+ "glGenSymbolsEXT",
32994+ "glFreeObjectBufferATI",
32995+ "glUnmapObjectBufferATI",
32996+ "glLockArraysEXT",
32997+ "glUnlockArraysEXT",
32998+ "glDepthFunc",
32999+ "glFogf",
33000+ "glFogi",
33001+ "glClipPlane",
33002+ "glGetClipPlane",
33003+
33004+/* begin of openquartz optimization */
33005+#if 1
33006+ "glMatrixMode",
33007+ "glOrtho",
33008+ "glFrustum",
33009+ "glPushMatrix",
33010+ "glPopMatrix",
33011+ "glLoadIdentity",
33012+ "glLoadMatrixd",
33013+ "glLoadMatrixf",
33014+ "glMultMatrixd",
33015+ "glMultMatrixf",
33016+ "glRotated",
33017+ "glRotatef",
33018+ "glScaled",
33019+ "glScalef",
33020+ "glTranslated",
33021+ "glTranslatef",
33022+#endif
33023+/* end of openquartz optimization */
33024+
33025+ "glGetError",
33026+ "glActiveTextureARB",
33027+
33028+ "glViewport",
33029+ "glScissor",
33030+
33031+ "glBindBufferARB",
33032+ "glDeleteBuffersARB",
33033+ "glGenBuffersARB",
33034+ "glBufferDataARB",
33035+ "glBufferSubDataARB",
33036+ "glGetBufferSubDataARB",
33037+ "glGetBufferParameterivARB",
33038+ "glBindBuffer",
33039+ "glDeleteBuffers",
33040+ "glGenBuffers",
33041+ "glBufferData",
33042+ "glBufferSubData",
33043+ "glGetBufferSubData",
33044+ "glGetBufferParameteriv",
33045+
33046+ "glPushAttrib",
33047+ "glPopAttrib",
33048+ "glEnable",
33049+ "glDisable",
33050+ "glIsEnabled",
33051+ "glBindTexture",
33052+ "glBindTextureEXT",
33053+ "glFogfv",
33054+ "glFogiv",
33055+ "glBitmap",
33056+ "glGetTexImage",
33057+ "glReadPixels",
33058+ "glDrawPixels",
33059+ "glSelectBuffer",
33060+ "glFeedbackBuffer",
33061+
33062+ "glTexImage1D",
33063+ "glTexImage2D",
33064+ "glTexImage3D",
33065+ "glTexSubImage1D",
33066+ "glTexSubImage2D",
33067+ "glTexSubImage3D",
33068+
33069+ "glTexImage3DEXT",
33070+ "glTexSubImage1DEXT",
33071+ "glTexSubImage2DEXT",
33072+ "glTexSubImage3DEXT",
33073+
33074+ "glGetCompressedTexImage",
33075+ "glCompressedTexImage1D",
33076+ "glCompressedTexImage2D",
33077+ "glCompressedTexImage3D",
33078+ "glCompressedTexSubImage1D",
33079+ "glCompressedTexSubImage2D",
33080+ "glCompressedTexSubImage3D",
33081+
33082+ "glGetCompressedTexImageARB",
33083+ "glCompressedTexImage1DARB",
33084+ "glCompressedTexImage2DARB",
33085+ "glCompressedTexImage3DARB",
33086+ "glCompressedTexSubImage1DARB",
33087+ "glCompressedTexSubImage2DARB",
33088+ "glCompressedTexSubImage3DARB",
33089+
33090+ "glCallLists",
33091+ "glNewList",
33092+ "glDeleteLists",
33093+ "glGenLists",
33094+
33095+ "glGenTextures",
33096+ "glDeleteTextures",
33097+ "glDeleteTexturesEXT",
33098+ "glMap1f",
33099+ "glMap1d",
33100+ "glMap2f",
33101+ "glMap2d",
33102+ "glGetMapdv",
33103+ "glGetMapfv",
33104+ "glGetMapiv",
33105+ "glGetBooleanv",
33106+ "glGetIntegerv",
33107+ "glGetFloatv",
33108+ "glGetDoublev",
33109+
33110+ "glGetPixelMapfv",
33111+ "glGetPixelMapuiv",
33112+ "glGetPixelMapusv",
33113+ "glGetProgramStringARB",
33114+ "glGetProgramStringNV",
33115+ "glArrayElement",
33116+ "glDrawArrays",
33117+ "glDrawElements",
33118+ "glDrawRangeElements",
33119+ "glDrawRangeElementsEXT",
33120+ "glGetProgramInfoLog",
33121+ "glGetTexLevelParameteriv",
33122+ "glGetInfoLogARB",
33123+ "glGetShaderInfoLog",
33124+ "glGetAttachedObjectsARB",
33125+ "glGetAttachedShaders",
33126+ "glGetActiveUniformARB",
33127+ "glGetActiveUniform",
33128+ "glGetUniformLocationARB",
33129+ "glGetUniformLocation",
33130+ "glGetUniformfvARB",
33131+ "glGetUniformfv",
33132+ "glGetUniformivARB",
33133+ "glGetUniformiv",
33134+ "glGetUniformuivEXT",
33135+ "glGetShaderSourceARB",
33136+ "glGetShaderSource",
33137+ "glGetActiveAttribARB",
33138+ "glGetActiveAttrib",
33139+ "glGetAttribLocationARB",
33140+ "glGetAttribLocation",
33141+
33142+ "glNewObjectBufferATI",
33143+ "glUpdateObjectBufferATI",
33144+
33145+ "glSetLocalConstantEXT",
33146+ "glSetInvariantEXT",
33147+ "glVariantbvEXT",
33148+ "glVariantsvEXT",
33149+ "glVariantivEXT",
33150+ "glVariantfvEXT",
33151+ "glVariantdvEXT",
33152+ "glVariantubvEXT",
33153+ "glVariantusvEXT",
33154+ "glVariantuivEXT",
33155+ "glGetVariantBooleanvEXT",
33156+ "glGetVariantIntegervEXT",
33157+ "glGetVariantFloatvEXT",
33158+ "glGetInvariantBooleanvEXT",
33159+ "glGetInvariantIntegervEXT",
33160+ "glGetInvariantFloatvEXT",
33161+ "glGetLocalConstantBooleanvEXT",
33162+ "glGetLocalConstantIntegervEXT",
33163+ "glGetLocalConstantFloatvEXT",
33164+
33165+ "glMatrixIndexubvARB",
33166+ "glMatrixIndexusvARB",
33167+ "glMatrixIndexuivARB",
33168+
33169+ "glColorTable",
33170+ "glColorSubTable",
33171+ "glGetColorTable",
33172+ "glConvolutionFilter1D",
33173+ "glConvolutionFilter2D",
33174+ "glGetConvolutionFilter",
33175+ "glSeparableFilter2D",
33176+ "glGetSeparableFilter",
33177+ "glGetHistogram",
33178+ "glGetMinmax",
33179+ "glColorTableEXT",
33180+ "glColorSubTableEXT",
33181+ "glGetColorTableEXT",
33182+ "glConvolutionFilter1DEXT",
33183+ "glConvolutionFilter2DEXT",
33184+ "glGetConvolutionFilterEXT",
33185+ "glSeparableFilter2DEXT",
33186+ "glGetSeparableFilterEXT",
33187+ "glGetHistogramEXT",
33188+ "glGetMinmaxEXT",
33189+
33190+ "glGetTexParameterfv",
33191+
33192+ "glGetVertexAttribivARB",
33193+ "glGetVertexAttribfvARB",
33194+ "glGetVertexAttribdvARB",
33195+ "glGetVertexAttribiv",
33196+ "glGetVertexAttribfv",
33197+ "glGetVertexAttribdv",
33198+
33199+ "glGetDetailTexFuncSGIS",
33200+ "glGetSharpenTexFuncSGIS",
33201+
33202+ "fake_gluBuild2DMipmaps",
33203+
33204+ "glRenderMode",
33205+
33206+ "glEnableVariantClientStateEXT",
33207+ "glDisableVariantClientStateEXT",
33208+
33209+ "glGetActiveVaryingNV",
33210+
33211+ NULL,
33212+};
33213+
33214+static int just_for_server_side_func(char* funcname)
33215+{
33216+ int i;
33217+ for(i=0;just_for_server_side_list[i];i++)
33218+ {
33219+ if (strcmp(just_for_server_side_list[i], funcname) == 0)
33220+ return 1;
33221+ }
33222+ return 0;
33223+}
33224+
33225+int parse(FILE* f, FuncDesc* funcDesc, int funcDescCount, int ignoreEXT)
33226+{
33227+ char buffer[256];
33228+ while(fgets(buffer, 256, f))
33229+ {
33230+
33231+ if (strncmp(buffer, "GLAPI", 5) == 0 && strstr(buffer, "APIENTRY") && strstr(buffer, "("))
33232+ {
33233+ int i = 0;
33234+ int skip = 0;
33235+ if (func_dealt_by_hand[0] == 0)
33236+ {
33237+ get_func_dealt_by_hand();
33238+ }
33239+ while (func_dealt_by_hand[i])
33240+ {
33241+ if (strstr(buffer, func_dealt_by_hand[i]))
33242+ {
33243+ skip = 1;
33244+ break;
33245+ }
33246+ i++;
33247+ }
33248+ if (skip)
33249+ continue;
33250+
33251+ char** args = malloc(15 * sizeof(char*));
33252+ int narg = 0;
33253+ char* type = buffer + 6;
33254+ char* n = strstr(type, "GLAPIENTRY") ? strstr(type, "GLAPIENTRY") : strstr(type, "APIENTRY");
33255+ int skip_length = strstr(type, "GLAPIENTRY") ? 11 : 9;
33256+ n[-1] = 0;
33257+ type = strdup(type);
33258+ n += skip_length;
33259+ char* fonc = n;
33260+ n = strstr(n, "(");
33261+ if (n[-1] == ' ') n[-1] = 0;
33262+ n[0] = 0;
33263+ fonc = strdup(fonc);
33264+ /*if (strstr(fonc, "glLockArraysEXT") || strstr(fonc, "glUnlockArraysEXT"))
33265+ {
33266+ }
33267+ else*/
33268+
33269+
33270+ if (ignoreEXT == 1 && isExtByName(fonc))
33271+ {
33272+ free(type);
33273+ free(fonc);
33274+ continue;
33275+ }
33276+ n++;
33277+ while(1)
33278+ {
33279+ char* virg = strstr(n, ",");
33280+ if (virg)
33281+ {
33282+ args[narg] = n;
33283+ virg[0] = 0;
33284+ args[narg] = get_arg_type(args[narg]);
33285+ narg++;
33286+ n = virg+1;
33287+ }
33288+ else
33289+ break;
33290+ }
33291+ while (strstr(n, ")") == 0)
33292+ {
33293+ fgets(buffer, 256, f);
33294+ n = buffer;
33295+ while(1)
33296+ {
33297+ char* virg = strstr(n, ",");
33298+ if (virg)
33299+ {
33300+ args[narg] = n;
33301+ virg[0] = 0;
33302+ args[narg] = get_arg_type(args[narg]);
33303+ narg++;
33304+ n = virg+1;
33305+ }
33306+ else
33307+ break;
33308+ }
33309+ }
33310+ char* par = strstr(n, ")");
33311+ args[narg] = n;
33312+ par[0] = 0;
33313+ args[narg] = get_arg_type(args[narg]);
33314+ narg++;
33315+
33316+
33317+ /*printf("%s %s (", type, fonc);
33318+ for(i=0;i<narg;i++)
33319+ {
33320+ printf("%s,", args[i]);
33321+ }
33322+ printf(")\n");*/
33323+
33324+ for(i=0;i<funcDescCount;i++)
33325+ {
33326+ if (strcmp(funcDesc[i].name, fonc) == 0)
33327+ {
33328+ if (ignoreEXT == 0)
33329+ funcDesc[i].isExt = 1;
33330+ break;
33331+ }
33332+ }
33333+ if (i == funcDescCount)
33334+ {
33335+ funcDesc[funcDescCount].type = type;
33336+ funcDesc[funcDescCount].name = fonc;
33337+ funcDesc[funcDescCount].nargs = narg;
33338+ funcDesc[funcDescCount].args = args;
33339+ funcDesc[funcDescCount].isExt = ignoreEXT == 0;
33340+ funcDescCount++;
33341+ }
33342+ else
33343+ {
33344+ free(fonc);
33345+ free(args);
33346+ free(type);
33347+ }
33348+ /*
33349+ for(i=0;i<narg;i++)
33350+ {
33351+ free(args[i]);
33352+ }
33353+ free(fonc);
33354+ free(type);*/
33355+ }
33356+ }
33357+ return funcDescCount;
33358+}
33359+
33360+typedef struct
33361+{
33362+ char* str;
33363+ int i;
33364+} StringIntStruct;
33365+
33366+StringIntStruct argDependingOnPreviousArgTab[] =
33367+{
33368+ { "glLoadProgramNV", 3},
33369+ { "ProgramNamedParameter", 2},
33370+ { "glDeleteBuffers", 1},
33371+ { "glDrawBuffers", 1},
33372+ { "glGenPrograms", 1},
33373+ { "glDeletePrograms", 1},
33374+ { "glGenQueries", 1},
33375+ { "glDeleteQueries", 1},
33376+ { "glGenFencesNV", 1},
33377+ { "glDeleteFencesNV", 1},
33378+ { "glGenOcclusionQueriesNV", 1},
33379+ { "glDeleteOcclusionQueriesNV", 1},
33380+ { "glRequestResidentProgramsNV", 1},
33381+ { "glDeleteTextures", 1},
33382+ { "glGenFramebuffersEXT", 1},
33383+ { "glDeleteFramebuffersEXT", 1},
33384+ { "glGenRenderbuffersEXT", 1},
33385+ { "glDeleteRenderbuffersEXT", 1},
33386+ { "glUniform1fv", 2},
33387+ { "glUniform2fv", 2},
33388+ { "glUniform3fv", 2},
33389+ { "glUniform4fv", 2},
33390+ { "glUniform1iv", 2},
33391+ { "glUniform2iv", 2},
33392+ { "glUniform3iv", 2},
33393+ { "glUniform4iv", 2},
33394+ { "glUniform1uivEXT", 2},
33395+ { "glUniform2uivEXT", 2},
33396+ { "glUniform3uivEXT", 2},
33397+ { "glUniform4uivEXT", 2},
33398+ { "glProgramParameters4fvNV", 3},
33399+ { "glProgramParameters4dvNV", 3},
33400+ { "glProgramLocalParameters4fvEXT", 3},
33401+ { "glProgramLocalParametersI4ivNV", 3},
33402+ { "glProgramLocalParametersI4uivNV", 3},
33403+ { "glProgramEnvParameters4fvEXT", 3},
33404+ { "glProgramEnvParametersI4ivNV", 3},
33405+ { "glProgramEnvParametersI4uivNV", 3},
33406+ { "glAreProgramsResidentNV", 1} ,
33407+ { "glAreProgramsResidentNV", 2} ,
33408+ { "glAreTexturesResident", 1} ,
33409+ { "glAreTexturesResident", 2} ,
33410+ { "glPrioritizeTextures", 1} ,
33411+ { "glPrioritizeTextures", 2} ,
33412+ { "glProgramStringARB", 3} ,
33413+
33414+ { "glVertexAttribs", 2},
33415+
33416+ { "glUniformMatrix", 3 },
33417+
33418+ { "glGetVertexAttribfv", 2},
33419+ { "glGetVertexAttribiv", 2},
33420+ { "glGetVertexAttribdv", 2},
33421+ { "glGetVertexAttribIivEXT", 2},
33422+ { "glGetVertexAttribIuivEXT", 2},
33423+
33424+ { "glPointParameterfv", 1},
33425+ { "glPointParameteriv", 1},
33426+
33427+ { "glWeightbvARB", 1},
33428+ { "glWeightsvARB", 1},
33429+ { "glWeightivARB", 1},
33430+ { "glWeightfvARB", 1},
33431+ { "glWeightdvARB", 1},
33432+ { "glWeightubvARB", 1},
33433+ { "glWeightusvARB", 1},
33434+ { "glWeightuivARB", 1},
33435+
33436+ { "glTexEnvfv", 2},
33437+ { "glTexEnviv", 2},
33438+ { "glGetTexEnvfv", 2},
33439+ { "glGetTexEnviv", 2},
33440+ { "glTexGendv", 2},
33441+ { "glTexGenfv", 2},
33442+ { "glTexGeniv", 2},
33443+ { "glGetTexGendv", 2},
33444+ { "glGetTexGenfv", 2},
33445+ { "glGetTexGeniv", 2},
33446+
33447+ { "glLightfv", 2},
33448+ { "glLightiv", 2},
33449+ { "glGetLightfv", 2},
33450+ { "glGetLightiv", 2},
33451+ { "glFragmentLightfvSGIX", 2},
33452+ { "glFragmentLightivSGIX", 2},
33453+ { "glGetFragmentLightfvSGIX", 2},
33454+ { "glGetFragmentLightivSGIX", 2},
33455+
33456+
33457+ { "glLightModelfv", 1},
33458+ { "glLightModeliv", 1},
33459+ { "glFragmentLightModelfvSGIX", 1},
33460+ { "glFragmentLightModelivSGIX", 1},
33461+
33462+ { "glMaterialfv", 2},
33463+ { "glMaterialiv", 2},
33464+ { "glGetMaterialfv", 2},
33465+ { "glGetMaterialiv", 2},
33466+ { "glFragmentMaterialfvSGIX", 2},
33467+ { "glFragmentMaterialivSGIX", 2},
33468+ { "glGetFragmentMaterialfvSGIX", 2},
33469+ { "glGetFragmentMaterialivSGIX", 2},
33470+
33471+ { "glFogiv", 1},
33472+ { "glFogfv", 1},
33473+
33474+ { "glTexParameterfv", 2},
33475+ { "glTexParameteriv", 2},
33476+ { "glGetTexParameterfv", 2},
33477+ { "glGetTexParameteriv", 2},
33478+
33479+ { "glTexParameterIivEXT", 2},
33480+ { "glTexParameterIuivEXT", 2},
33481+ { "glGetTexParameterIivEXT", 2},
33482+ { "glGetTexParameterIuivEXT", 2},
33483+
33484+ { "glPixelMapfv", 2},
33485+ { "glPixelMapuiv", 2},
33486+ { "glPixelMapusv", 2},
33487+
33488+ { "glDetailTexFuncSGIS", 2 },
33489+ { "glSharpenTexFuncSGIS", 2 },
33490+
33491+ { "glSpriteParameterfvSGIX", 1 },
33492+ { "glSpriteParameterivSGIX", 1 },
33493+
33494+ { "ConvolutionParameter", 2},
33495+
33496+ { "glProgramBufferParametersfvNV", 4},
33497+ { "glProgramBufferParametersIivNV", 4},
33498+ { "glProgramBufferParametersIuivNV", 4},
33499+
33500+ { "glTransformFeedbackAttribsNV", 1},
33501+ { "glTransformFeedbackVaryingsNV", 2},
33502+};
33503+
33504+int is_arg_of_length_depending_on_previous_args(FuncDesc* funcDesc, int j)
33505+{
33506+ int i;
33507+ if (strstr(funcDesc->args[j], "*") == NULL)
33508+ return 0;
33509+ for(i=0;i< N_ELEMENTS(argDependingOnPreviousArgTab); i++)
33510+ {
33511+ if (strstr(funcDesc->name, argDependingOnPreviousArgTab[i].str) && j == argDependingOnPreviousArgTab[i].i)
33512+ return 1;
33513+ }
33514+ return 0;
33515+}
33516+
33517+static void fprintf_prototype_args(FILE* f, FuncDesc* funcDesc)
33518+{
33519+ int j;
33520+ for(j=0;j<funcDesc->nargs;j++)
33521+ {
33522+ if (j != 0) fprintf(f,", ");
33523+ if (strstr(funcDesc->args[j], "[16]"))
33524+ {
33525+ if (strstr(funcDesc->args[j], "float"))
33526+ {
33527+ fprintf(f, "const GLfloat arg_%d[16]", j);
33528+ }
33529+ else if (strstr(funcDesc->args[j], "double"))
33530+ {
33531+ fprintf(f, "const GLdouble arg_%d[16]", j);
33532+ }
33533+ else
33534+ {
33535+ exit(-1);
33536+ }
33537+ }
33538+ else if (strstr(funcDesc->args[j], "[128]") && strstr(funcDesc->args[j], "GLubyte"))
33539+ fprintf(f, (strstr(funcDesc->args[j], "const")) ? "const GLubyte* arg_%d" : "GLubyte* arg_%d", j);
33540+ else
33541+ fprintf(f, "%s arg_%d", funcDesc->args[j], j);
33542+ }
33543+}
33544+
33545+int main(int argc, char* argv[])
33546+{
33547+ FuncDesc funcDesc[3000];
33548+ int funcDescCount = 0;
33549+ FILE* f;
33550+
33551+ f = fopen("../target-i386/mesa_gl.h", "r");
33552+ assert(f);
33553+ /*if (!f)
33554+ f = fopen("/usr/include/GL/gl.h", "r");*/
33555+ funcDescCount = parse(f, funcDesc, 0, 1);
33556+ fclose(f);
33557+
33558+ f = fopen("../target-i386/mesa_glext.h", "r");
33559+ assert(f);
33560+ /*if (!f)
33561+ f = fopen("/usr/include/GL/glext.h", "r");*/
33562+ funcDescCount = parse(f, funcDesc, funcDescCount, 0);
33563+ fclose(f);
33564+
33565+ FILE* header = fopen("gl_func.h", "w");
33566+ FILE* client_stub = fopen("client_stub.c", "w");
33567+ FILE* server_stub = fopen("server_stub.c", "w");
33568+
33569+ fprintf(header, "/* This is a generated file. DO NOT EDIT ! */\n\n");
33570+ fprintf(header, "#define COMPOSE(x,y) x##y\n");
33571+ fprintf(header, "#define MAGIC_MACRO(x) COMPOSE(x,_func)\n");
33572+ fprintf(header, "enum {\n"
33573+ "#include \"gl_func_perso.h\"\n");
33574+
33575+ fprintf(client_stub, "/* This is a generated file. DO NOT EDIT ! */\n\n");
33576+
33577+ fprintf(server_stub, "/* This is a generated file. DO NOT EDIT ! */\n\n");
33578+
33579+ int i;
33580+ for(i=0;i<funcDescCount;i++)
33581+ {
33582+ funcDesc[i].ok = 0;
33583+ char* name = funcDesc[i].name;
33584+ char* type = funcDesc[i].type;
33585+ if ((strcmp(type, "void") == 0 || strcmp(type, "GLboolean") == 0 ||
33586+ strcmp(type, "GLuint") == 0 || strcmp(type, "GLint") == 0 ||
33587+ strcmp(type, "GLenum") == 0) || strcmp(type, "GLhandleARB") == 0 ||
33588+ strcmp(type, "GLhalf") == 0 || strcmp(type, "GLhalfNV") == 0)
33589+ {
33590+ int pointer_of_unknown_size = 0;
33591+ int j;
33592+
33593+ if (funcDesc[i].nargs == 1 && strcmp(funcDesc[i].args[0], "void") == 0)
33594+ {
33595+ funcDesc[i].nargs = 0;
33596+ }
33597+ for(j=0;j<funcDesc[i].nargs-1;j++)
33598+ {
33599+ if (!is_arg_of_length_depending_on_previous_args(&funcDesc[i], j) &&
33600+ strstr(funcDesc[i].args[j], "const GLchar") == NULL &&
33601+ strstr(funcDesc[i].args[j], "[16]") == NULL)
33602+ {
33603+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "*") != NULL;
33604+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "[") != NULL;
33605+ }
33606+ }
33607+
33608+ if (pointer_of_unknown_size == 0)
33609+ {
33610+ char* signature_type_name;
33611+ if (is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL))
33612+ {
33613+ if (strstr(signature_type_name, "TYPE_OUT"))
33614+ funcDesc[i].has_out_parameters = 1;
33615+ }
33616+ else
33617+ {
33618+ if (funcDesc[i].nargs-1 >= 0)
33619+ {
33620+ j = funcDesc[i].nargs-1;
33621+ if (!is_arg_of_length_depending_on_previous_args(&funcDesc[i], j) &&
33622+ strstr(funcDesc[i].args[j], "const GLchar") == NULL &&
33623+ strstr(funcDesc[i].args[j], "[16]") == NULL)
33624+ {
33625+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "*") != NULL;
33626+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "[") != NULL;
33627+ }
33628+ }
33629+ }
33630+ }
33631+ if (pointer_of_unknown_size && funcDesc[i].nargs == 1)
33632+ {
33633+ if (strstr(funcDesc[i].name, "Matrixf") || strstr(funcDesc[i].name, "Matrixd"))
33634+ {
33635+ free(funcDesc[i].args[0]);
33636+ if (strstr(funcDesc[i].name, "Matrixf"))
33637+ funcDesc[i].args[0] = strdup("GLfloat m[16]");
33638+ else
33639+ funcDesc[i].args[0] = strdup("GLdouble m[16]");
33640+ pointer_of_unknown_size = 0;
33641+ }
33642+ else if (strcmp(funcDesc[i].name, "glPolygonStipple") == 0)
33643+ {
33644+ free(funcDesc[i].args[0]);
33645+ funcDesc[i].args[0] = strdup("const GLubyte mask[128]");
33646+ pointer_of_unknown_size = 0;
33647+ }
33648+ else if (strcmp(funcDesc[i].name, "glGetPolygonStipple") == 0)
33649+ {
33650+ free(funcDesc[i].args[0]);
33651+ funcDesc[i].args[0] = strdup("GLubyte mask[128]");
33652+ funcDesc[i].has_out_parameters = 1;
33653+ pointer_of_unknown_size = 0;
33654+ }
33655+ }
33656+ if (just_for_server_side_func(name) || pointer_of_unknown_size == 0)
33657+ {
33658+ fprintf(header, " %s_func,\n", funcDesc[i].name);
33659+ funcDesc[i].ok = 1;
33660+ if (just_for_server_side_func(name))
33661+ funcDesc[i].just_for_server_side = 1;
33662+ for(j=0;j<funcDesc[i].nargs;j++)
33663+ {
33664+ if (strstr(get_type_string(funcDesc[i].args[j]), "OUT"))
33665+ funcDesc[i].has_out_parameters = 1;
33666+ }
33667+ }
33668+ else
33669+ {
33670+ fprintf(stderr, "not handled either manually or automatically : %s\n", funcDesc[i].name);
33671+ }
33672+ }
33673+ }
33674+
33675+ fprintf(header, " GL_N_CALLS\n};\n");
33676+
33677+
33678+ fprintf(server_stub, "void execute_func(int func_number, arg_t *args, int *pret_int, char *pret_char)\n");
33679+ fprintf(server_stub, "{\n");
33680+ fprintf(server_stub, " switch(func_number)\n");
33681+ fprintf(server_stub, " {\n");
33682+
33683+
33684+ for(i=0;i<funcDescCount;i++)
33685+ {
33686+ if (funcDesc[i].ok)
33687+ {
33688+ fprintf(header, "static const int %s_signature[] = { %s, %d, ",
33689+ funcDesc[i].name,
33690+ get_type_string(funcDesc[i].type),
33691+ funcDesc[i].has_out_parameters);
33692+ fprintf(header, "%d", funcDesc[i].nargs);
33693+ int j;
33694+ char* signature_type_name;
33695+ int n_args_to_check = is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL) ? funcDesc[i].nargs - 1 : funcDesc[i].nargs;
33696+
33697+ for(j=0;j<n_args_to_check;j++)
33698+ {
33699+ if (is_arg_of_length_depending_on_previous_args(&funcDesc[i], j))
33700+ {
33701+ fprintf(header, ", %s_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS", get_type_string(funcDesc[i].args[j]));
33702+ }
33703+ else
33704+ fprintf(header, ", %s", get_type_string(funcDesc[i].args[j]));
33705+ }
33706+
33707+ if (is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL))
33708+ {
33709+ fprintf(header, ", %s", signature_type_name);
33710+ }
33711+ fprintf(header, "};\n");
33712+
33713+
33714+ if (funcDesc[i].just_for_server_side == 0)
33715+ {
33716+ if (isExt(&funcDesc[i]))
33717+ fprintf(client_stub, "GLAPI %s APIENTRY EXT_FUNC(%s) (", funcDesc[i].type, funcDesc[i].name);
33718+ else
33719+ fprintf(client_stub, "GLAPI %s APIENTRY %s(", funcDesc[i].type, funcDesc[i].name);
33720+ fprintf_prototype_args(client_stub, &funcDesc[i]);
33721+ fprintf(client_stub, ")\n");
33722+ fprintf(client_stub, "{\n");
33723+ if (strcmp(funcDesc[i].type, "void") != 0)
33724+ {
33725+ fprintf(client_stub, " %s ret;\n", funcDesc[i].type);
33726+ if (isExt(&funcDesc[i]))
33727+ fprintf(client_stub, " CHECK_PROC_WITH_RET(%s);\n", funcDesc[i].name);
33728+ }
33729+ else
33730+ {
33731+ if (isExt(&funcDesc[i]))
33732+ fprintf(client_stub, " CHECK_PROC(%s);\n", funcDesc[i].name);
33733+ }
33734+
33735+ /*
33736+ fprintf(client_stub, " do_opengl_call(%s_func, %s",
33737+ funcDesc[i].name, (strcmp(funcDesc[i].type, "void") == 0) ? "NULL" : "&ret");
33738+ for(j=0;j<funcDesc[i].nargs;j++)
33739+ {
33740+ fprintf(client_stub, ", arg_%d", j);
33741+ }
33742+ fprintf(client_stub, ");\n");
33743+ */
33744+
33745+ if (funcDesc[i].nargs)
33746+ {
33747+ fprintf(client_stub, " long args[] = { ");
33748+ for(j=0;j<funcDesc[i].nargs;j++)
33749+ {
33750+ if (j > 0) fprintf(client_stub, ", ");
33751+ if (strstr(funcDesc[i].args[j], "*"))
33752+ {
33753+ fprintf(client_stub, "POINTER_TO_ARG(arg_%d)", j);
33754+ }
33755+ else
33756+ {
33757+ const char* symbolic_type = get_type_string(funcDesc[i].args[j]);
33758+ if (strcmp(symbolic_type, "TYPE_CHAR") == 0)
33759+ fprintf(client_stub, "CHAR_TO_ARG");
33760+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_CHAR") == 0)
33761+ fprintf(client_stub, "UNSIGNED_CHAR_TO_ARG");
33762+ else if (strcmp(symbolic_type, "TYPE_SHORT") == 0)
33763+ fprintf(client_stub, "SHORT_TO_ARG");
33764+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_SHORT") == 0)
33765+ fprintf(client_stub, "UNSIGNED_SHORT_TO_ARG");
33766+ else if (strcmp(symbolic_type, "TYPE_INT") == 0)
33767+ fprintf(client_stub, "INT_TO_ARG");
33768+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_INT") == 0)
33769+ fprintf(client_stub, "UNSIGNED_INT_TO_ARG");
33770+ else if (strcmp(symbolic_type, "TYPE_FLOAT") == 0)
33771+ fprintf(client_stub, "FLOAT_TO_ARG");
33772+ else if (strcmp(symbolic_type, "TYPE_16FLOAT") == 0)
33773+ fprintf(client_stub, "POINTER_TO_ARG");
33774+ else if (strcmp(symbolic_type, "TYPE_DOUBLE") == 0)
33775+ fprintf(client_stub, "DOUBLE_TO_ARG");
33776+ else if ( strcmp(symbolic_type, "TYPE_16DOUBLE") == 0)
33777+ fprintf(client_stub, "POINTER_TO_ARG");
33778+ else if ( strcmp(symbolic_type, "TYPE_128UCHAR") == 0 || strcmp(symbolic_type, "TYPE_OUT_128UCHAR") == 0)
33779+ fprintf(client_stub, "POINTER_TO_ARG");
33780+ else
33781+ {
33782+ fprintf(stderr, "Unknown : %s\n", symbolic_type);
33783+ assert(0);
33784+ }
33785+ fprintf(client_stub, "(arg_%d)", j);
33786+ }
33787+ }
33788+ fprintf(client_stub, "};\n");
33789+ }
33790+
33791+ fprintf(client_stub, " do_opengl_call(%s_func, %s, %s, NULL);\n",
33792+ funcDesc[i].name, (strcmp(funcDesc[i].type, "void") == 0) ? "NULL" : "&ret",
33793+ (funcDesc[i].nargs) ? "args" : "NULL");
33794+
33795+ if (strcmp(funcDesc[i].type, "void") != 0)
33796+ {
33797+ fprintf(client_stub, " return ret;\n");
33798+ }
33799+ fprintf(client_stub, "}\n\n");
33800+ }
33801+
33802+ fprintf(server_stub, " case %s_func:\n", funcDesc[i].name);
33803+ fprintf(server_stub, " {\n");
33804+
33805+ if (isExt(&funcDesc[i]))
33806+ {
33807+ fprintf(server_stub, " GET_EXT_PTR(%s, %s, (", funcDesc[i].type, funcDesc[i].name);
33808+ fprintf_prototype_args(server_stub, &funcDesc[i]);
33809+ fprintf(server_stub, "));\n");
33810+ }
33811+
33812+ fprintf(server_stub, " ");
33813+
33814+ if (strcmp(funcDesc[i].type, "void") == 0)
33815+ ;
33816+ else if (strcmp(get_type_string(funcDesc[i].type), "TYPE_INT") == 0 ||
33817+ strcmp(get_type_string(funcDesc[i].type), "TYPE_UNSIGNED_INT") == 0)
33818+ fprintf(server_stub, "*pret_int = ");
33819+ else if (strcmp(get_type_string(funcDesc[i].type), "TYPE_CHAR") == 0 ||
33820+ strcmp(get_type_string(funcDesc[i].type), "TYPE_UNSIGNED_CHAR") == 0)
33821+ fprintf(server_stub, "*pret_char = ");
33822+ else
33823+ {
33824+ fprintf(stderr, "unknown ret type = %s\n", get_type_string(funcDesc[i].type));
33825+ exit(-1);
33826+ }
33827+ /*if (strstr(funcDesc[i].name, "EXT"))
33828+ {
33829+ char* dup = strdup(funcDesc[i].name);
33830+ *strstr(dup, "EXT") = 0;
33831+ fprintf(server_stub, "%s(", dup);
33832+ free(dup);
33833+ }
33834+ else*/
33835+ {
33836+ if (isExt(&funcDesc[i]))
33837+ fprintf(server_stub, "ptr_func_%s(", funcDesc[i].name);
33838+ else
33839+ fprintf(server_stub, "%s(", funcDesc[i].name);
33840+ }
33841+ char* c_type_name;
33842+ if (is_known_arg_vector(&funcDesc[i], NULL, &c_type_name))
33843+ {
33844+ for(j=0;j<funcDesc[i].nargs - 1;j++)
33845+ {
33846+ if (j != 0) fprintf(server_stub,", ");
33847+ print_server_side_argument(server_stub, j, funcDesc[i].args[j]);
33848+ }
33849+ if (j != 0) fprintf(server_stub,", ");
33850+ if (strstr(funcDesc[i].args[funcDesc[i].nargs - 1], "const"))
33851+ fprintf(server_stub, "(const %s*)args[%d]", c_type_name, j);
33852+ else
33853+ fprintf(server_stub, "(%s*)args[%d]", c_type_name, j);
33854+ }
33855+ else
33856+ {
33857+ for(j=0;j<funcDesc[i].nargs;j++)
33858+ {
33859+ if (j != 0) fprintf(server_stub,", ");
33860+ print_server_side_argument(server_stub, j, funcDesc[i].args[j]);
33861+ }
33862+ }
33863+ fprintf(server_stub, ");\n");
33864+
33865+ fprintf(server_stub, " break;\n");
33866+ fprintf(server_stub, " }\n");
33867+ }
33868+ }
33869+
33870+ fprintf(server_stub, " default:\n");
33871+ fprintf(server_stub, " fprintf(stderr, \"unknown=%%d\", func_number);\n");
33872+ fprintf(server_stub, " break;\n");
33873+ fprintf(server_stub, " }\n");
33874+ fprintf(server_stub, "}\n");
33875+
33876+ fprintf(header, "#undef MAGIC_MACRO\n");
33877+ fprintf(header, "#define MAGIC_MACRO(x) COMPOSE(x,_signature)\n");
33878+ fprintf(header, "static const int* tab_opengl_calls[GL_N_CALLS] =\n");
33879+ fprintf(header, "{\n");
33880+ fprintf(header, "#include \"gl_func_perso.h\"\n");
33881+ for(i=0;i<funcDescCount;i++)
33882+ {
33883+ if (funcDesc[i].ok)
33884+ {
33885+ fprintf(header, " %s_signature,\n", funcDesc[i].name);
33886+ }
33887+ }
33888+ fprintf(header, "};\n\n");
33889+
33890+ fprintf(header, "#undef MAGIC_MACRO\n");
33891+ fprintf(header, "#define MAGIC_MACRO(x) #x\n");
33892+ fprintf(header, "static const char* tab_opengl_calls_name[GL_N_CALLS] =\n");
33893+ fprintf(header, "{\n");
33894+ fprintf(header, "#include \"gl_func_perso.h\"\n");
33895+ for(i=0;i<funcDescCount;i++)
33896+ {
33897+ if (funcDesc[i].ok)
33898+ {
33899+ fprintf(header, " \"%s\",\n", funcDesc[i].name);
33900+ }
33901+ }
33902+ fprintf(header, "};\n\n");
33903+
33904+ fclose(header);
33905+ fclose(server_stub);
33906+ fclose(client_stub);
33907+
33908+ return 0;
33909+}
33910Index: qemu-0.14.0/target-i386/parse_mesa_get_c.c
33911===================================================================
33912--- /dev/null
33913+++ qemu-0.14.0/target-i386/parse_mesa_get_c.c
33914@@ -0,0 +1,225 @@
33915+/*
33916+ * Parse the "get.c" from mesa source tree to generate "glgetv_cst.h"
33917+ *
33918+ * Copyright (c) 2007 Even Rouault
33919+ *
33920+ * Permission is hereby granted, free of charge, to any person obtaining a copy
33921+ * of this software and associated documentation files (the "Software"), to deal
33922+ * in the Software without restriction, including without limitation the rights
33923+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
33924+ * copies of the Software, and to permit persons to whom the Software is
33925+ * furnished to do so, subject to the following conditions:
33926+ *
33927+ * The above copyright notice and this permission notice shall be included in
33928+ * all copies or substantial portions of the Software.
33929+ *
33930+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
33931+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
33932+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
33933+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33934+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
33935+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
33936+ * THE SOFTWARE.
33937+ */
33938+
33939+// gcc -Wall parse_mesa_get_c.c -o parse_mesa_get_c -I. && ./parse_mesa_get_c
33940+
33941+#include <stdlib.h>
33942+#include <stdio.h>
33943+#include <string.h>
33944+#include <assert.h>
33945+
33946+#include "mesa_gl.h"
33947+#include "mesa_glext.h"
33948+
33949+/* #include "mesa_enums.c" */
33950+
33951+int gl_lookup_enum_by_name(const char* name)
33952+{
33953+ FILE* f;
33954+ char buffer[256];
33955+ char template1[256];
33956+ char template2[256];
33957+ int i;
33958+ sprintf(template1, "#define %s\t", name);
33959+ sprintf(template2, "#define %s ", name);
33960+ for(i=0;i<2;i++)
33961+ {
33962+ if (i == 0)
33963+ f = fopen("mesa_gl.h", "r");
33964+ else
33965+ f = fopen("mesa_glext.h", "r");
33966+ while(fgets(buffer, 256, f))
33967+ {
33968+ if (strstr(buffer, template1) || strstr(buffer, template2))
33969+ {
33970+ char* c = strstr(buffer, "0x");
33971+ assert(c);
33972+ int ret;
33973+ ret = strtol(c, NULL, 16);
33974+ return ret;
33975+ }
33976+ }
33977+ fclose(f);
33978+ }
33979+
33980+ return -1;
33981+}
33982+
33983+typedef struct
33984+{
33985+ int value;
33986+ char* name;
33987+ int nb_elts;
33988+} Token;
33989+
33990+int compare_func(Token* a, Token* b)
33991+{
33992+ return a->value - b->value;
33993+}
33994+
33995+typedef struct
33996+{
33997+ int i;
33998+ char* str;
33999+} Cpl;
34000+#define CPL(x) {x, #x}
34001+
34002+Cpl constantsOneVal[] =
34003+{
34004+ CPL(GL_MAX_GENERAL_COMBINERS_NV),
34005+ CPL(GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT),
34006+ CPL(GL_MAX_VERTEX_SHADER_VARIANTS_EXT),
34007+ CPL(GL_MAX_VERTEX_SHADER_INVARIANTS_EXT),
34008+ CPL(GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
34009+ CPL(GL_MAX_VERTEX_SHADER_LOCALS_EXT),
34010+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT),
34011+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT),
34012+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT),
34013+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
34014+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
34015+};
34016+#define NB_CONSTANTS_ONE_VAL 11
34017+
34018+int main(int argc, char* argv[])
34019+{
34020+ FILE* f = fopen("mesa_get.c", "r");
34021+ char buffer[256];
34022+ int state = 0;
34023+ char name[256];
34024+ int count = 0;
34025+ char template[256];
34026+ Token tokens[1000];
34027+ int ntoken = 0;
34028+ int i;
34029+ FILE* outf = fopen("glgetv_cst.h", "w");
34030+
34031+ fprintf(outf, "/* This is a generated file. Do not edit !*/\n");
34032+ fprintf(outf, "typedef struct {\n");
34033+ fprintf(outf, " GLuint count;\n");
34034+ fprintf(outf, " GLenum token;\n");
34035+ fprintf(outf, " const char *name;\n");
34036+ fprintf(outf, "} GlGetConstant ;\n");
34037+ fprintf(outf, "static const GlGetConstant gl_get_constants[] = {\n");
34038+
34039+ while(fgets(buffer, 256, f))
34040+ {
34041+ if (strstr(buffer, "_mesa_GetBooleanv"))
34042+ {
34043+ state = 1;
34044+ }
34045+ else if (state == 1)
34046+ {
34047+ if (strstr(buffer, "_mesa_GetFloatv"))
34048+ {
34049+ break;
34050+ }
34051+ else if (strstr(buffer, "case GL_"))
34052+ {
34053+ strcpy(name, strstr(buffer, "case GL_") + 5);
34054+ *strstr(name, ":") = 0;
34055+ count = 0;
34056+ strcpy(template, "params[0]");
34057+ }
34058+ else if (strstr(buffer, template))
34059+ {
34060+ count ++;
34061+ sprintf(template, "params[%d]", count);
34062+ }
34063+ else if (strstr(buffer, "break"))
34064+ {
34065+ if (count > 0)
34066+ {
34067+ int gl_lookup = gl_lookup_enum_by_name(name);
34068+ /*
34069+ int mesa_lookup = _mesa_lookup_enum_by_name(name);
34070+ if (mesa_lookup != -1)
34071+ {
34072+ if(mesa_lookup != gl_lookup)
34073+ {
34074+ fprintf(stderr, "wrong : %s %d %d !\n", name, mesa_lookup, gl_lookup);
34075+ exit(-1);
34076+ }
34077+ }*/
34078+ if (gl_lookup == -1)
34079+ {
34080+ fprintf(stderr, "not found in includes : %s\n", name);
34081+ //fprintf(outf, "/* { %d, unknown value, \"%s\" },*/\n", count, name);
34082+ }
34083+ else
34084+ {
34085+ //fprintf(outf, " { %d, 0x%04x, \"%s\" },\n", count, gl_lookup, name);
34086+ tokens[ntoken].value = gl_lookup;
34087+ tokens[ntoken].nb_elts = count;
34088+ tokens[ntoken].name = strdup(name);
34089+ ntoken++;
34090+ }
34091+ /*fprintf(outf, "#ifdef %s\n", name);
34092+ fprintf(outf, " { %d, MAKE_TOKEN_NAME(%s) },\n", count, name);
34093+ fprintf(outf, "#endif\n");*/
34094+ }
34095+ else
34096+ fprintf(stderr, "not recognized : %s\n", name);
34097+ }
34098+ }
34099+ }
34100+
34101+ for(i=0;i<NB_CONSTANTS_ONE_VAL;i++)
34102+ {
34103+ tokens[ntoken].value = constantsOneVal[i].i;
34104+ tokens[ntoken].nb_elts = 1;
34105+ tokens[ntoken].name = strdup(constantsOneVal[i].str);
34106+ ntoken++;
34107+ }
34108+
34109+ tokens[ntoken].value = GL_SPRITE_MODE_SGIX;
34110+ tokens[ntoken].nb_elts = 1;
34111+ tokens[ntoken].name = strdup("GL_SPRITE_MODE_SGIX");
34112+ ntoken++;
34113+
34114+ tokens[ntoken].value = GL_SPRITE_AXIS_SGIX ;
34115+ tokens[ntoken].nb_elts = 3;
34116+ tokens[ntoken].name = strdup("GL_SPRITE_AXIS_SGIX ");
34117+ ntoken++;
34118+
34119+ tokens[ntoken].value = GL_SPRITE_TRANSLATION_SGIX;
34120+ tokens[ntoken].nb_elts = 3;
34121+ tokens[ntoken].name = strdup("GL_SPRITE_TRANSLATION_SGIX");
34122+ ntoken++;
34123+
34124+ tokens[ntoken].value = GL_REFERENCE_PLANE_EQUATION_SGIX;
34125+ tokens[ntoken].nb_elts = 4;
34126+ tokens[ntoken].name = strdup("GL_REFERENCE_PLANE_EQUATION_SGIX");
34127+ ntoken++;
34128+
34129+
34130+ qsort(tokens, ntoken, sizeof(Token), compare_func);
34131+ for(i=0;i<ntoken;i++)
34132+ {
34133+ fprintf(outf, " { %d, 0x%04x, \"%s\" },\n", tokens[i].nb_elts, tokens[i].value, tokens[i].name);
34134+ }
34135+ fprintf(outf, "};\n");
34136+ fclose(f);
34137+ fclose(outf);
34138+ return 0;
34139+}
34140Index: qemu-0.14.0/target-i386/translate.c
34141===================================================================
34142--- qemu-0.14.0.orig/target-i386/translate.c
34143+++ qemu-0.14.0/target-i386/translate.c
34144@@ -723,6 +723,8 @@ static void gen_check_io(DisasContext *s
34145 int state_saved;
34146 target_ulong next_eip;
34147
34148+ return;
34149+
34150 state_saved = 0;
34151 if (s->pe && (s->cpl > s->iopl || s->vm86)) {
34152 if (s->cc_op != CC_OP_DYNAMIC)
34153@@ -2650,11 +2652,18 @@ static void gen_exception(DisasContext *
34154 s->is_jmp = DISAS_TB_JUMP;
34155 }
34156
34157+int enable_gl = 0;
34158+
34159 /* an interrupt is different from an exception because of the
34160 privilege checks */
34161 static void gen_interrupt(DisasContext *s, int intno,
34162 target_ulong cur_eip, target_ulong next_eip)
34163 {
34164+ if (enable_gl && intno == 0x99) {
34165+ gen_helper_opengl();
34166+ return;
34167+ }
34168+
34169 if (s->cc_op != CC_OP_DYNAMIC)
34170 gen_op_set_cc_op(s->cc_op);
34171 gen_jmp_im(cur_eip);
34172Index: qemu-0.14.0/vl.c
34173===================================================================
34174--- qemu-0.14.0.orig/vl.c
34175+++ qemu-0.14.0/vl.c
34176@@ -222,12 +222,14 @@ QEMUOptionRom option_rom[MAX_OPTION_ROMS
34177 int nb_option_roms;
34178 int semihosting_enabled = 0;
34179 int old_param = 0;
34180+int force_pointer = 0;
34181 const char *qemu_name;
34182 int alt_grab = 0;
34183 int ctrl_grab = 0;
34184 unsigned int nb_prom_envs = 0;
34185 const char *prom_envs[MAX_PROM_ENVS];
34186 int boot_menu;
34187+extern int enable_gl;
34188
34189 typedef struct FWBootEntry FWBootEntry;
34190
34191@@ -1525,6 +1527,8 @@ static void select_vgahw (const char *p)
34192 } else if (strstart(p, "qxl", &opts)) {
34193 vga_interface_type = VGA_QXL;
34194 } else if (!strstart(p, "none", &opts)) {
34195+ }
34196+ else {
34197 invalid_vga:
34198 fprintf(stderr, "Unknown vga type: %s\n", p);
34199 exit(1);
34200@@ -2648,6 +2652,9 @@ int main(int argc, char **argv, char **e
34201 case QEMU_OPTION_old_param:
34202 old_param = 1;
34203 break;
34204+ case QEMU_OPTION_force_pointer:
34205+ force_pointer = 1;
34206+ break;
34207 case QEMU_OPTION_clock:
34208 configure_alarms(optarg);
34209 break;
34210@@ -2661,6 +2668,12 @@ int main(int argc, char **argv, char **e
34211 }
34212 configure_rtc(opts);
34213 break;
34214+#ifdef TARGET_OPENGL_OK
34215+ case QEMU_OPTION_enable_gl:
34216+ fprintf(stderr, "Enabling opengl\n");
34217+ enable_gl = 1;
34218+ break;
34219+#endif
34220 case QEMU_OPTION_tb_size:
34221 tb_size = strtol(optarg, NULL, 0);
34222 if (tb_size < 0)
34223@@ -3018,6 +3031,14 @@ int main(int argc, char **argv, char **e
34224 if (foreach_device_config(DEV_USB, usb_parse) < 0)
34225 exit(1);
34226 }
34227+#ifdef TARGET_OPENGL_OK
34228+ if (enable_gl) {
34229+ /* Use second serial port */
34230+ int opengl_serial = 1;
34231+
34232+ add_device_config(DEV_SERIAL, "opengl");
34233+ }
34234+#endif
34235
34236 /* init generic devices */
34237 if (qemu_opts_foreach(qemu_find_opts("device"), device_init_func, NULL, 1) != 0)
34238Index: qemu-0.14.0/qemu-options.hx
34239===================================================================
34240--- qemu-0.14.0.orig/qemu-options.hx
34241+++ qemu-0.14.0/qemu-options.hx
34242@@ -2118,6 +2118,18 @@ many timer interrupts were not processed
34243 re-inject them.
34244 ETEXI
34245
34246+DEF("enable-gl", 0, QEMU_OPTION_enable_gl, \
34247+ "-enable-gl\n", QEMU_ARCH_I386)
34248+STEXI
34249+@item -enable-gl
34250+ETEXI
34251+
34252+DEF("force-pointer", 0, QEMU_OPTION_force_pointer, \
34253+ "-force-pointer\n", QEMU_ARCH_ALL)
34254+STEXI
34255+@item -force-pointer
34256+ETEXI
34257+
34258 DEF("icount", HAS_ARG, QEMU_OPTION_icount, \
34259 "-icount [N|auto]\n" \
34260 " enable virtual instruction counter with 2^N clock ticks per\n" \
34261Index: qemu-0.14.0/ui/sdl.c
34262===================================================================
34263--- qemu-0.14.0.orig/ui/sdl.c
34264+++ qemu-0.14.0/ui/sdl.c
34265@@ -63,6 +63,8 @@ static SDL_PixelFormat host_format;
34266 static int scaling_active = 0;
34267 static Notifier mouse_mode_notifier;
34268
34269+extern void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window);
34270+
34271 static void sdl_update(DisplayState *ds, int x, int y, int w, int h)
34272 {
34273 // printf("updating x=%d y=%d w=%d h=%d\n", x, y, w, h);
34274@@ -119,12 +121,22 @@ static void do_sdl_resize(int new_width,
34275
34276 static void sdl_resize(DisplayState *ds)
34277 {
34278- if (!allocator) {
34279+ SDL_SysWMinfo info;
34280+ static Display *dpy;
34281+
34282+ if (!allocator) {
34283 if (!scaling_active)
34284 do_sdl_resize(ds_get_width(ds), ds_get_height(ds), 0);
34285 else if (real_screen->format->BitsPerPixel != ds_get_bits_per_pixel(ds))
34286 do_sdl_resize(real_screen->w, real_screen->h, ds_get_bits_per_pixel(ds));
34287 sdl_setdata(ds);
34288+
34289+ SDL_GetWMInfo(&info);
34290+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display &&
34291+ (!dpy || dpy == info.info.x11.display)) {
34292+ dpy = info.info.x11.display;
34293+ opengl_exec_set_parent_window(dpy, info.info.x11.window);
34294+ }
34295 } else {
34296 if (guest_screen != NULL) {
34297 SDL_FreeSurface(guest_screen);
34298@@ -457,7 +469,7 @@ static void sdl_show_cursor(void)
34299
34300 if (!kbd_mouse_is_absolute()) {
34301 SDL_ShowCursor(1);
34302- if (guest_cursor &&
34303+ if (guest_cursor && !force_pointer &&
34304 (gui_grab || kbd_mouse_is_absolute() || absolute_enabled))
34305 SDL_SetCursor(guest_sprite);
34306 else
34307@@ -468,7 +480,8 @@ static void sdl_show_cursor(void)
34308 static void sdl_grab_start(void)
34309 {
34310 if (guest_cursor) {
34311- SDL_SetCursor(guest_sprite);
34312+ if (!force_pointer)
34313+ SDL_SetCursor(guest_sprite);
34314 if (!kbd_mouse_is_absolute() && !absolute_enabled)
34315 SDL_WarpMouse(guest_x, guest_y);
34316 } else
34317@@ -770,7 +783,8 @@ static void sdl_mouse_warp(int x, int y,
34318 if (!guest_cursor)
34319 sdl_show_cursor();
34320 if (gui_grab || kbd_mouse_is_absolute() || absolute_enabled) {
34321- SDL_SetCursor(guest_sprite);
34322+ if (!force_pointer)
34323+ SDL_SetCursor(guest_sprite);
34324 if (!kbd_mouse_is_absolute() && !absolute_enabled)
34325 SDL_WarpMouse(x, y);
34326 }
34327@@ -798,7 +812,7 @@ static void sdl_mouse_define(QEMUCursor
34328 qemu_free(image);
34329 qemu_free(mask);
34330
34331- if (guest_cursor &&
34332+ if (guest_cursor && !force_pointer &&
34333 (gui_grab || kbd_mouse_is_absolute() || absolute_enabled))
34334 SDL_SetCursor(guest_sprite);
34335 }
34336@@ -815,6 +829,7 @@ void sdl_display_init(DisplayState *ds,
34337 int flags;
34338 uint8_t data = 0;
34339 DisplayAllocator *da;
34340+ SDL_SysWMinfo info;
34341 const SDL_VideoInfo *vi;
34342
34343 #if defined(__APPLE__)
34344@@ -848,6 +863,12 @@ void sdl_display_init(DisplayState *ds,
34345 vi = SDL_GetVideoInfo();
34346 host_format = *(vi->vfmt);
34347
34348+ SDL_GetWMInfo(&info);
34349+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display)
34350+ opengl_exec_set_parent_window(info.info.x11.display,
34351+ RootWindow(info.info.x11.display,
34352+ DefaultScreen(info.info.x11.display)));
34353+
34354 dcl = qemu_mallocz(sizeof(DisplayChangeListener));
34355 dcl->dpy_update = sdl_update;
34356 dcl->dpy_resize = sdl_resize;
34357@@ -882,4 +903,9 @@ void sdl_display_init(DisplayState *ds,
34358 gui_fullscreen_initial_grab = 1;
34359 sdl_grab_start();
34360 }
34361+
34362+ SDL_GetWMInfo(&info);
34363+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display)
34364+ opengl_exec_set_parent_window(info.info.x11.display,
34365+ info.info.x11.window);
34366 }
diff --git a/meta/recipes-devtools/qemu/qemu-git/qemu-vmware-vga-depth.patch b/meta/recipes-devtools/qemu/qemu-git/qemu-vmware-vga-depth.patch
new file mode 100644
index 0000000000..42ec98fee5
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-git/qemu-vmware-vga-depth.patch
@@ -0,0 +1,115 @@
1# fix VMware VGA driver depth calculation error, which may cause segmentation fault
2#
3# ktian1, 06/29/2010
4Index: qemu-0.14.0/console.h
5===================================================================
6--- qemu-0.14.0.orig/console.h
7+++ qemu-0.14.0/console.h
8@@ -171,6 +171,12 @@ struct DisplayAllocator {
9 void (*free_displaysurface)(DisplaySurface *surface);
10 };
11
12+struct DisplayPostCallback {
13+ void (*postcall) (void *);
14+ void *parm;
15+ struct DisplayPostCallback *next;
16+};
17+
18 struct DisplayState {
19 struct DisplaySurface *surface;
20 void *opaque;
21@@ -178,6 +184,7 @@ struct DisplayState {
22
23 struct DisplayAllocator* allocator;
24 struct DisplayChangeListener* listeners;
25+ struct DisplayPostCallback* postcalls;
26
27 void (*mouse_set)(int x, int y, int on);
28 void (*cursor_define)(QEMUCursor *cursor);
29@@ -229,6 +236,12 @@ static inline void register_displaychang
30 ds->listeners = dcl;
31 }
32
33+static inline void register_displaypostcallback(DisplayState *ds, DisplayPostCallback *dpc)
34+{
35+ dpc->next = ds->postcalls;
36+ ds->postcalls = dpc;
37+}
38+
39 static inline void dpy_update(DisplayState *s, int x, int y, int w, int h)
40 {
41 struct DisplayChangeListener *dcl = s->listeners;
42Index: qemu-0.14.0/hw/vmware_vga.c
43===================================================================
44--- qemu-0.14.0.orig/hw/vmware_vga.c
45+++ qemu-0.14.0/hw/vmware_vga.c
46@@ -1001,8 +1001,9 @@ static void vmsvga_update_display(void *
47 }
48 }
49
50-static void vmsvga_reset(struct vmsvga_state_s *s)
51+static void vmsvga_reset(void *parm)
52 {
53+ struct vmsvga_state_s *s = (struct vmsvga_state_s *)parm;
54 s->index = 0;
55 s->enable = 0;
56 s->config = 0;
57@@ -1207,6 +1208,8 @@ static const VMStateDescription vmstate_
58
59 static void vmsvga_init(struct vmsvga_state_s *s, int vga_ram_size)
60 {
61+ DisplayPostCallback *dpc;
62+
63 s->scratch_size = SVGA_SCRATCH_SIZE;
64 s->scratch = qemu_malloc(s->scratch_size * 4);
65
66@@ -1224,7 +1227,10 @@ static void vmsvga_init(struct vmsvga_st
67 vga_init(&s->vga);
68 vmstate_register(NULL, 0, &vmstate_vga_common, &s->vga);
69
70- vmsvga_reset(s);
71+ dpc = qemu_mallocz(sizeof(DisplayPostCallback));
72+ dpc->postcall = vmsvga_reset;
73+ dpc->parm = s;
74+ register_displaypostcallback(s->vga.ds, dpc);
75 }
76
77 static void pci_vmsvga_map_ioport(PCIDevice *pci_dev, int region_num,
78Index: qemu-0.14.0/qemu-common.h
79===================================================================
80--- qemu-0.14.0.orig/qemu-common.h
81+++ qemu-0.14.0/qemu-common.h
82@@ -241,6 +241,7 @@ typedef struct DisplayState DisplayState
83 typedef struct DisplayChangeListener DisplayChangeListener;
84 typedef struct DisplaySurface DisplaySurface;
85 typedef struct DisplayAllocator DisplayAllocator;
86+typedef struct DisplayPostCallback DisplayPostCallback;
87 typedef struct PixelFormat PixelFormat;
88 typedef struct TextConsole TextConsole;
89 typedef TextConsole QEMUConsole;
90Index: qemu-0.14.0/vl.c
91===================================================================
92--- qemu-0.14.0.orig/vl.c
93+++ qemu-0.14.0/vl.c
94@@ -1920,6 +1920,7 @@ int main(int argc, char **argv, char **e
95 char boot_devices[33] = "cad"; /* default to HD->floppy->CD-ROM */
96 DisplayState *ds;
97 DisplayChangeListener *dcl;
98+ DisplayPostCallback *dpc;
99 int cyls, heads, secs, translation;
100 QemuOpts *hda_opts = NULL, *opts;
101 QemuOptsList *olist;
102@@ -3101,6 +3102,13 @@ int main(int argc, char **argv, char **e
103
104 /* display setup */
105 dpy_resize(ds);
106+ dpc = ds->postcalls;
107+ while (dpc != NULL) {
108+ if (dpc->postcall != NULL)
109+ dpc->postcall(dpc->parm);
110+ dpc = dpc->next;
111+ }
112+
113 dcl = ds->listeners;
114 while (dcl != NULL) {
115 if (dcl->dpy_refresh != NULL) {
diff --git a/meta/recipes-devtools/qemu/qemu-git/qemugl-allow-glxcontext-release.patch b/meta/recipes-devtools/qemu/qemu-git/qemugl-allow-glxcontext-release.patch
new file mode 100644
index 0000000000..478b204274
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-git/qemugl-allow-glxcontext-release.patch
@@ -0,0 +1,63 @@
1Allow releasing the GLXContext/Drawable with glXMakeCurrent.
2
3---
4commit d942ed4e853e08d2298f3e11e9a952c1d952bff5
5tree f0a934efd8a8ff48e2d96f0d6fc7d70bef106bfe
6parent 93619e6be184f8de08759d347825ee0d678a6f9c
7author Andrzej Zaborowski <andrew.zaborowski@intel.com> Tue, 16 Jun 2009 22:22:05 +0200
8committer Andrzej Zaborowski <andrew.zaborowski@intel.com> Tue, 16 Jun 2009 22:22:05 +0200
9
10 target-i386/opengl_exec.c | 31 ++++++++++++++++---------------
11 1 files changed, 16 insertions(+), 15 deletions(-)
12
13Index: qemu-0.14.0/target-i386/opengl_exec.c
14===================================================================
15--- qemu-0.14.0.orig/target-i386/opengl_exec.c
16+++ qemu-0.14.0/target-i386/opengl_exec.c
17@@ -1600,10 +1600,9 @@ int do_function_call(int func_number, ar
18 fprintf(stderr, "client_drawable=%p fake_ctx=%d\n",
19 (void *) client_drawable, fake_ctxt);
20
21- if (client_drawable == 0 && fake_ctxt == 0) {
22+ if (client_drawable == 0 && fake_ctxt == 0)
23 ret_int = glXMakeCurrent(dpy, 0, NULL);
24- process->current_state = &process->default_state;
25- } else if ((drawable = (GLXDrawable)
26+ else if ((drawable = (GLXDrawable)
27 get_association_fakepbuffer_pbuffer(
28 process, client_drawable))) {
29 GLXContext ctxt = get_association_fakecontext_glxcontext(
30@@ -1651,19 +1650,21 @@ int do_function_call(int func_number, ar
31 }
32
33 if (ret_int) {
34- for (i = 0; i < process->nb_states; i ++) {
35- if (process->glstates[i]->fake_ctxt == fake_ctxt) {
36- /* HACK !!! REMOVE */
37- process->current_state = process->glstates[i];
38- process->current_state->drawable = drawable;
39- break;
40- }
41- }
42+ if (fake_ctxt) {
43+ for (i = 0; i < process->nb_states; i ++)
44+ if (process->glstates[i]->fake_ctxt == fake_ctxt) {
45+ /* HACK !!! REMOVE */
46+ process->current_state = process->glstates[i];
47+ process->current_state->drawable = drawable;
48+ break;
49+ }
50
51- if (i == process->nb_states) {
52- fprintf(stderr, "error remembering the new context\n");
53- exit(-1);
54- }
55+ if (i == process->nb_states) {
56+ fprintf(stderr, "error remembering the new context\n");
57+ exit(-1);
58+ }
59+ } else
60+ process->current_state = &process->default_state;
61 }
62 break;
63 }
diff --git a/meta/recipes-devtools/qemu/qemu-git/qemugl-fix.patch b/meta/recipes-devtools/qemu/qemu-git/qemugl-fix.patch
new file mode 100644
index 0000000000..029aacf2a9
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-git/qemugl-fix.patch
@@ -0,0 +1,73 @@
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: other (logical part of qemu-git-qemugl-host.patch)
9
10Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
11
12Index: qemu-0.14.0/target-i386/opengl_func.h
13===================================================================
14--- qemu-0.14.0.orig/target-i386/opengl_func.h 2011-04-08 16:43:46.000000000 +0800
15+++ qemu-0.14.0/target-i386/opengl_func.h 2011-04-08 16:45:55.000000000 +0800
16@@ -26,8 +26,9 @@
17 #include "mesa_glext.h"
18
19 /* Argument list are internally of a type that can hold a target pointer
20- * or a host pointer. */
21-typedef target_phys_addr_t arg_t;
22+ * or a host pointer. If 32b target runs on 64b host, it should be big enough
23+ * to hold host pointer */
24+typedef long unsigned int arg_t;
25
26 enum {
27 TYPE_NONE,
28Index: qemu-0.14.0/target-i386/translate.c
29===================================================================
30--- qemu-0.14.0.orig/target-i386/translate.c 2011-04-08 16:19:15.000000000 +0800
31+++ qemu-0.14.0/target-i386/translate.c 2011-04-08 16:22:03.000000000 +0800
32@@ -2652,17 +2652,19 @@
33 s->is_jmp = DISAS_TB_JUMP;
34 }
35
36-int enable_gl = 0;
37+extern int enable_gl;
38
39 /* an interrupt is different from an exception because of the
40 privilege checks */
41 static void gen_interrupt(DisasContext *s, int intno,
42 target_ulong cur_eip, target_ulong next_eip)
43 {
44+#if !defined(CONFIG_USER_ONLY)
45 if (enable_gl && intno == 0x99) {
46 gen_helper_opengl();
47 return;
48 }
49+#endif
50
51 if (s->cc_op != CC_OP_DYNAMIC)
52 gen_op_set_cc_op(s->cc_op);
53Index: qemu-0.14.0/vl.c
54===================================================================
55--- qemu-0.14.0.orig/vl.c 2011-04-08 16:11:43.000000000 +0800
56+++ qemu-0.14.0/vl.c 2011-04-08 16:20:05.000000000 +0800
57@@ -229,7 +229,7 @@
58 unsigned int nb_prom_envs = 0;
59 const char *prom_envs[MAX_PROM_ENVS];
60 int boot_menu;
61-extern int enable_gl;
62+int enable_gl = 0;
63
64 typedef struct FWBootEntry FWBootEntry;
65
66@@ -1909,6 +1909,7 @@
67 return popt;
68 }
69
70+#define TARGET_OPENGL_OK
71 int main(int argc, char **argv, char **envp)
72 {
73 const char *gdbstub_dev = NULL;
diff --git a/meta/recipes-devtools/qemu/qemu_git.bb b/meta/recipes-devtools/qemu/qemu_git.bb
index 47d5f88420..2d6a8bdd65 100644
--- a/meta/recipes-devtools/qemu/qemu_git.bb
+++ b/meta/recipes-devtools/qemu/qemu_git.bb
@@ -1,19 +1,20 @@
1require qemu.inc 1require qemu.inc
2 2
3SRCREV = "72bb3c7571226af13cfe9eec020a56add3d30a70" 3SRCREV = "56a60dd6d619877e9957ba06b92d2f276e3c229d"
4 4
5PV = "0.12.4" 5LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
6PR = "r12" 6 file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
7
8PV = "0.14"
9PR = "r0"
7 10
8FILESPATH = "${FILE_DIRNAME}/qemu-${PV}/:${FILE_DIRNAME}/qemu-git/" 11FILESPATH = "${FILE_DIRNAME}/qemu-${PV}/:${FILE_DIRNAME}/qemu-git/"
9FILESDIR = "${WORKDIR}" 12FILESDIR = "${WORKDIR}"
10 13
11SRC_URI = "\ 14SRC_URI = "\
12 git://git.sv.gnu.org/qemu.git;protocol=git \ 15 git://git.qemu.org/qemu.git;protocol=git \
13 file://workaround_bad_futex_headers.patch \
14 file://qemu-git-qemugl-host.patch \ 16 file://qemu-git-qemugl-host.patch \
15 file://no-strip.patch \ 17 file://no-strip.patch \
16 file://fix-dirent.patch \
17 file://fix-nogl.patch \ 18 file://fix-nogl.patch \
18 file://qemugl-allow-glxcontext-release.patch \ 19 file://qemugl-allow-glxcontext-release.patch \
19 file://linker-flags.patch \ 20 file://linker-flags.patch \