summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/qemu')
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.12.4/fix-dirent.patch12
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.12.4/fix-nogl.patch96
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.12.4/glflags.patch13
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.12.4/init-info.patch16
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.12.4/linker-flags.patch22
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.12.4/no-strip.patch26
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.12.4/powerpc_rom.binbin0 -> 4096 bytes
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.12.4/qemu-git-qemugl-host.patch34376
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.12.4/qemu-ppc-hack.patch136
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.12.4/qemu-vmware-vga-depth.patch115
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.12.4/qemugl-allow-glxcontext-release.patch63
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.12.4/workaround_bad_futex_headers.patch24
-rw-r--r--meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb21
-rw-r--r--meta/recipes-devtools/qemu/qemu-helper-nativesdk_1.0.bb44
-rw-r--r--meta/recipes-devtools/qemu/qemu-helper/raw2flash.c370
-rw-r--r--meta/recipes-devtools/qemu/qemu-helper/tunctl.c156
-rw-r--r--meta/recipes-devtools/qemu/qemu.inc39
-rw-r--r--meta/recipes-devtools/qemu/qemu_0.12.4.bb27
-rw-r--r--meta/recipes-devtools/qemu/qemu_git.bb21
19 files changed, 35577 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu-0.12.4/fix-dirent.patch b/meta/recipes-devtools/qemu/qemu-0.12.4/fix-dirent.patch
new file mode 100644
index 0000000000..8bbfa0e88e
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/fix-dirent.patch
@@ -0,0 +1,12 @@
1Index: qemu/linux-user/syscall.c
2===================================================================
3--- qemu.orig/linux-user/syscall.c 2010-05-11 13:16:22.421783949 -0400
4+++ qemu/linux-user/syscall.c 2010-05-11 13:16:31.759805849 -0400
5@@ -26,6 +26,7 @@
6 #include <errno.h>
7 #include <unistd.h>
8 #include <fcntl.h>
9+#include <dirent.h>
10 #include <time.h>
11 #include <limits.h>
12 #include <sys/types.h>
diff --git a/meta/recipes-devtools/qemu/qemu-0.12.4/fix-nogl.patch b/meta/recipes-devtools/qemu/qemu-0.12.4/fix-nogl.patch
new file mode 100644
index 0000000000..528b6f0d18
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/fix-nogl.patch
@@ -0,0 +1,96 @@
1Index: qemu-0.12.4/Makefile.target
2===================================================================
3--- qemu-0.12.4.orig/Makefile.target 2010-06-24 07:59:15.669394205 +0100
4+++ qemu-0.12.4/Makefile.target 2010-06-24 08:07:38.739399512 +0100
5@@ -47,6 +47,10 @@
6 libobj-y += op_helper.o helper.o
7 libobj-$(CONFIG_NEED_MMU) += mmu.o
8 libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o
9+libobj-$(TARGET_X86_64) += helper_opengl.o opengl_exec.o
10+libobj-$(TARGET_ARM) += dummygl.o
11+libobj-$(TARGET_MIPS) += dummygl.o
12+libobj-$(TARGET_PPC) += dummygl.o
13 libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
14 libobj-$(TARGET_ALPHA) += alpha_palcode.o
15
16Index: qemu-0.12.4/target-arm/dummygl.c
17===================================================================
18--- /dev/null 1970-01-01 00:00:00.000000000 +0000
19+++ qemu-0.12.4/target-arm/dummygl.c 2010-06-24 07:59:15.899401748 +0100
20@@ -0,0 +1,22 @@
21+#include <string.h>
22+#include <stdlib.h>
23+#include <assert.h>
24+#include <stdint.h>
25+#include <X11/Xlib.h>
26+#include <X11/Xutil.h>
27+
28+void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window)
29+{
30+
31+}
32+
33+void opengl_process_enable(void)
34+{
35+
36+}
37+
38+
39+void mem_opengl(uint64_t ptr)
40+{
41+
42+}
43Index: qemu-0.12.4/target-mips/dummygl.c
44===================================================================
45--- /dev/null 1970-01-01 00:00:00.000000000 +0000
46+++ qemu-0.12.4/target-mips/dummygl.c 2010-06-24 07:59:15.899401748 +0100
47@@ -0,0 +1,22 @@
48+#include <string.h>
49+#include <stdlib.h>
50+#include <assert.h>
51+#include <stdint.h>
52+#include <X11/Xlib.h>
53+#include <X11/Xutil.h>
54+
55+void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window)
56+{
57+
58+}
59+
60+void opengl_process_enable(void)
61+{
62+
63+}
64+
65+
66+void mem_opengl(uint64_t ptr)
67+{
68+
69+}
70Index: qemu-0.12.4/target-ppc/dummygl.c
71===================================================================
72--- /dev/null 1970-01-01 00:00:00.000000000 +0000
73+++ qemu-0.12.4/target-ppc/dummygl.c 2010-06-24 08:07:59.070712946 +0100
74@@ -0,0 +1,22 @@
75+#include <string.h>
76+#include <stdlib.h>
77+#include <assert.h>
78+#include <stdint.h>
79+#include <X11/Xlib.h>
80+#include <X11/Xutil.h>
81+
82+void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window)
83+{
84+
85+}
86+
87+void opengl_process_enable(void)
88+{
89+
90+}
91+
92+
93+void mem_opengl(uint64_t ptr)
94+{
95+
96+}
diff --git a/meta/recipes-devtools/qemu/qemu-0.12.4/glflags.patch b/meta/recipes-devtools/qemu/qemu-0.12.4/glflags.patch
new file mode 100644
index 0000000000..0a27c2dee1
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/glflags.patch
@@ -0,0 +1,13 @@
1Index: git/Makefile.target
2===================================================================
3--- git.orig/Makefile.target 2010-05-27 12:35:26.000000000 -0400
4+++ git/Makefile.target 2010-05-27 12:59:53.520415731 -0400
5@@ -326,7 +326,7 @@ vl.o: qemu-options.h
6
7 monitor.o: qemu-monitor.h
8
9-LIBS += -lGL -lGLU
10+LIBS += -lGL
11
12 ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)
13
diff --git a/meta/recipes-devtools/qemu/qemu-0.12.4/init-info.patch b/meta/recipes-devtools/qemu/qemu-0.12.4/init-info.patch
new file mode 100644
index 0000000000..8ba7d8ff4c
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/init-info.patch
@@ -0,0 +1,16 @@
1# This is a workaround to the crashes seen on Ubuntu. Setting info to zero
2# makes info.info.x11.display zero and avoids the calls to
3# opengl_exec_set_parent_window, one of which is crashing.
4
5Index: qemu-0.12.4/sdl.c
6===================================================================
7--- qemu-0.12.4.orig/sdl.c
8+++ qemu-0.12.4/sdl.c
9@@ -871,6 +871,7 @@ void sdl_display_init(DisplayState *ds,
10 vi = SDL_GetVideoInfo();
11 host_format = *(vi->vfmt);
12
13+ bzero(&info, sizeof(info));
14 SDL_GetWMInfo(&info);
15 if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display)
16 opengl_exec_set_parent_window(info.info.x11.display,
diff --git a/meta/recipes-devtools/qemu/qemu-0.12.4/linker-flags.patch b/meta/recipes-devtools/qemu/qemu-0.12.4/linker-flags.patch
new file mode 100644
index 0000000000..7b33aa4840
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/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.12.4/Makefile.target
11===================================================================
12--- qemu-0.12.4.orig/Makefile.target 2010-06-15 11:21:52.000000000 +0100
13+++ qemu-0.12.4/Makefile.target 2010-06-15 11:25:27.212852910 +0100
14@@ -178,7 +178,7 @@
15 obj-y += virtio-blk.o virtio-balloon.o virtio-net.o virtio-console.o virtio-pci.o
16 obj-$(CONFIG_KVM) += kvm.o kvm-all.o
17 obj-$(CONFIG_ISA_MMIO) += isa_mmio.o
18-LIBS+=-lz
19+LIBS+=-lz -lX11 -ldl
20
21 sound-obj-y =
22 sound-obj-$(CONFIG_SB16) += sb16.o
diff --git a/meta/recipes-devtools/qemu/qemu-0.12.4/no-strip.patch b/meta/recipes-devtools/qemu/qemu-0.12.4/no-strip.patch
new file mode 100644
index 0000000000..8a95a688b3
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/no-strip.patch
@@ -0,0 +1,26 @@
1Index: qemu/Makefile
2===================================================================
3--- qemu.orig/Makefile 2010-05-11 17:17:06.416912704 -0400
4+++ qemu/Makefile 2010-05-11 17:17:17.051812402 -0400
5@@ -300,7 +300,7 @@ endif
6 install: all $(if $(BUILD_DOCS),install-doc)
7 $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
8 ifneq ($(TOOLS),)
9- $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
10+ $(INSTALL_PROG) $(TOOLS) "$(DESTDIR)$(bindir)"
11 endif
12 ifneq ($(BLOBS),)
13 $(INSTALL_DIR) "$(DESTDIR)$(datadir)"
14Index: qemu/Makefile.target
15===================================================================
16--- qemu.orig/Makefile.target 2010-05-11 17:17:12.188784092 -0400
17+++ qemu/Makefile.target 2010-05-11 17:17:17.052808122 -0400
18@@ -351,7 +351,7 @@ clean:
19
20 install: all
21 ifneq ($(PROGS),)
22- $(INSTALL) -m 755 $(STRIP_OPT) $(PROGS) "$(DESTDIR)$(bindir)"
23+ $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)"
24 endif
25
26 # Include automatically generated dependency files
diff --git a/meta/recipes-devtools/qemu/qemu-0.12.4/powerpc_rom.bin b/meta/recipes-devtools/qemu/qemu-0.12.4/powerpc_rom.bin
new file mode 100644
index 0000000000..c4044296c5
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/powerpc_rom.bin
Binary files differ
diff --git a/meta/recipes-devtools/qemu/qemu-0.12.4/qemu-git-qemugl-host.patch b/meta/recipes-devtools/qemu/qemu-0.12.4/qemu-git-qemugl-host.patch
new file mode 100644
index 0000000000..ab31476218
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/qemu-git-qemugl-host.patch
@@ -0,0 +1,34376 @@
1Index: qemu-0.12.4/Makefile.target
2===================================================================
3--- qemu-0.12.4.orig/Makefile.target
4+++ qemu-0.12.4/Makefile.target
5@@ -46,6 +46,7 @@ libobj-$(CONFIG_SOFTFLOAT) += fpu/softfl
6 libobj-$(CONFIG_NOSOFTFLOAT) += fpu/softfloat-native.o
7 libobj-y += op_helper.o helper.o
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 libobj-$(TARGET_ALPHA) += alpha_palcode.o
12
13@@ -82,6 +83,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@@ -196,6 +212,10 @@ obj-i386-y += usb-uhci.o vmmouse.o vmpor
36 obj-i386-y += device-hotplug.o pci-hotplug.o smbios.o wdt_ib700.o
37 obj-i386-y += ne2000-isa.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 ide/core.o ide/qdev.o ide/isa.o ide/pci.o ide/macio.o
45 obj-ppc-y += ide/cmd646.o
46@@ -303,6 +323,8 @@ vl.o: qemu-options.h
47
48 monitor.o: qemu-monitor.h
49
50+LIBS += -lGL -lGLU
51+
52 ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)
53
54 endif # CONFIG_SOFTMMU
55Index: qemu-0.12.4/hw/pixel_ops.h
56===================================================================
57--- qemu-0.12.4.orig/hw/pixel_ops.h
58+++ qemu-0.12.4/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.12.4/hw/vmware_vga.c
73===================================================================
74--- qemu-0.12.4.orig/hw/vmware_vga.c
75+++ qemu-0.12.4/hw/vmware_vga.c
76@@ -489,6 +489,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_empty(struct vmsvga_state_s *s)
83 {
84 if (!s->config || !s->enable)
85@@ -498,11 +500,18 @@ static inline int vmsvga_fifo_empty(stru
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@@ -512,12 +521,12 @@ 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 = 0;
115 int x, y, dx, dy, width, height;
116 struct vmsvga_cursor_definition_s cursor;
117 while (!vmsvga_fifo_empty(s))
118- switch (cmd = vmsvga_fifo_read(s)) {
119+ switch (last_cmd = vmsvga_fifo_read(s)) {
120 case SVGA_CMD_UPDATE:
121 case SVGA_CMD_UPDATE_VERBOSE:
122 x = vmsvga_fifo_read(s);
123@@ -624,7 +633,7 @@ static void vmsvga_fifo_run(struct vmsvg
124 while (args --)
125 vmsvga_fifo_read(s);
126 printf("%s: Unknown command 0x%02x in SVGA command FIFO\n",
127- __FUNCTION__, cmd);
128+ __FUNCTION__, last_cmd);
129 break;
130 }
131
132@@ -1143,6 +1152,12 @@ static void vmsvga_init(struct vmsvga_st
133
134 vga_init_vbe(&s->vga);
135
136+#ifdef EMBED_STDVGA
137+ s->vga.map_addr = VBE_DISPI_LFB_PHYSICAL_ADDRESS;
138+ s->vga.map_end = VBE_DISPI_LFB_PHYSICAL_ADDRESS + vga_ram_size;
139+ vga_dirty_log_start(s);
140+#endif
141+
142 rom_add_vga(VGABIOS_FILENAME);
143
144 vmsvga_reset(s);
145Index: qemu-0.12.4/qemu-char.c
146===================================================================
147--- qemu-0.12.4.orig/qemu-char.c
148+++ qemu-0.12.4/qemu-char.c
149@@ -2235,6 +2235,69 @@ static CharDriverState *qemu_chr_open_so
150 return NULL;
151 }
152
153+#define TARGET_OPENGL_OK
154+#if defined(TARGET_OPENGL_OK)
155+static uint8_t buffer[32];
156+static int buffer_len;
157+static int hexdigit[128] = {
158+ ['0'] = 0x0,
159+ ['1'] = 0x1,
160+ ['2'] = 0x2,
161+ ['3'] = 0x3,
162+ ['4'] = 0x4,
163+ ['5'] = 0x5,
164+ ['6'] = 0x6,
165+ ['7'] = 0x7,
166+ ['8'] = 0x8,
167+ ['9'] = 0x9,
168+ ['a'] = 0xa,
169+ ['b'] = 0xb,
170+ ['c'] = 0xc,
171+ ['d'] = 0xd,
172+ ['e'] = 0xe,
173+ ['f'] = 0xf,
174+};
175+
176+static int opengl_chr_write(CharDriverState *chr, const uint8_t *buf, int len)
177+{
178+ uint64_t ptr = 0;
179+ int i;
180+
181+ if (memchr(buf, 'x', len))
182+ opengl_process_enable();
183+ return len;
184+ memcpy(buffer + buffer_len, buf, len);
185+ buffer_len += len;
186+
187+ if (buffer_len >= 16) {
188+ for (i = 0; i < 16; i ++)
189+ ptr = (ptr << 4) + hexdigit[buffer[i]];
190+
191+ buffer_len -= 16;
192+ if (buffer_len)
193+ memcpy(buffer, buffer + 16, buffer_len);
194+
195+ mem_opengl(ptr);
196+ }
197+
198+ return len;
199+}
200+
201+CharDriverState *qemu_chr_open_opengl(void)
202+{
203+ CharDriverState *chr = qemu_mallocz(sizeof(CharDriverState));
204+
205+ chr->opaque = chr;
206+ chr->chr_write = opengl_chr_write;
207+
208+ qemu_chr_generic_open(chr);
209+
210+ return chr;
211+}
212+#else
213+#define qemu_chr_open_opengl() 0
214+#endif
215+
216 QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)
217 {
218 char host[65], port[33], width[8], height[8];
219@@ -2353,6 +2416,10 @@ QemuOpts *qemu_chr_parse_compat(const ch
220 qemu_opt_set(opts, "path", filename);
221 return opts;
222 }
223+ if (!strcmp(filename, "opengl")){
224+ qemu_opt_set(opts, "backend", "opengl");
225+ return opts;
226+ }
227
228 fail:
229 qemu_opts_del(opts);
230@@ -2368,6 +2435,7 @@ static const struct {
231 { .name = "udp", .open = qemu_chr_open_udp },
232 { .name = "msmouse", .open = qemu_chr_open_msmouse },
233 { .name = "vc", .open = text_console_init },
234+ { .name = "opengl", .open = qemu_chr_open_opengl },
235 #ifdef _WIN32
236 { .name = "file", .open = qemu_chr_open_win_file_out },
237 { .name = "pipe", .open = qemu_chr_open_win_pipe },
238Index: qemu-0.12.4/sdl.c
239===================================================================
240--- qemu-0.12.4.orig/sdl.c
241+++ qemu-0.12.4/sdl.c
242@@ -58,6 +58,8 @@ static uint8_t allocator;
243 static SDL_PixelFormat host_format;
244 static int scaling_active = 0;
245
246+extern void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window);
247+
248 static void sdl_update(DisplayState *ds, int x, int y, int w, int h)
249 {
250 // printf("updating x=%d y=%d w=%d h=%d\n", x, y, w, h);
251@@ -119,12 +121,22 @@ static void do_sdl_resize(int new_width,
252
253 static void sdl_resize(DisplayState *ds)
254 {
255- if (!allocator) {
256+ SDL_SysWMinfo info;
257+ static Display *dpy;
258+
259+ if (!allocator) {
260 if (!scaling_active)
261 do_sdl_resize(ds_get_width(ds), ds_get_height(ds), 0);
262 else if (real_screen->format->BitsPerPixel != ds_get_bits_per_pixel(ds))
263 do_sdl_resize(real_screen->w, real_screen->h, ds_get_bits_per_pixel(ds));
264 sdl_setdata(ds);
265+
266+ SDL_GetWMInfo(&info);
267+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display &&
268+ (!dpy || dpy == info.info.x11.display)) {
269+ dpy = info.info.x11.display;
270+ opengl_exec_set_parent_window(dpy, info.info.x11.window);
271+ }
272 } else {
273 if (guest_screen != NULL) {
274 SDL_FreeSurface(guest_screen);
275@@ -453,7 +465,7 @@ static void sdl_show_cursor(void)
276
277 if (!kbd_mouse_is_absolute()) {
278 SDL_ShowCursor(1);
279- if (guest_cursor &&
280+ if (guest_cursor && !force_pointer &&
281 (gui_grab || kbd_mouse_is_absolute() || absolute_enabled))
282 SDL_SetCursor(guest_sprite);
283 else
284@@ -464,7 +476,8 @@ static void sdl_show_cursor(void)
285 static void sdl_grab_start(void)
286 {
287 if (guest_cursor) {
288- SDL_SetCursor(guest_sprite);
289+ if (!force_pointer)
290+ SDL_SetCursor(guest_sprite);
291 if (!kbd_mouse_is_absolute() && !absolute_enabled)
292 SDL_WarpMouse(guest_x, guest_y);
293 } else
294@@ -505,8 +518,8 @@ static void sdl_send_mouse_event(int dx,
295 absolute_enabled = 1;
296 }
297
298- dx = x * 0x7FFF / (width - 1);
299- dy = y * 0x7FFF / (height - 1);
300+ dx = x * 0x7FFF / (width - 1);
301+ dy = y * 0x7FFF / (height - 1);
302 } else if (absolute_enabled) {
303 sdl_show_cursor();
304 absolute_enabled = 0;
305@@ -761,7 +774,8 @@ static void sdl_mouse_warp(int x, int y,
306 if (!guest_cursor)
307 sdl_show_cursor();
308 if (gui_grab || kbd_mouse_is_absolute() || absolute_enabled) {
309- SDL_SetCursor(guest_sprite);
310+ if (!force_pointer)
311+ SDL_SetCursor(guest_sprite);
312 if (!kbd_mouse_is_absolute() && !absolute_enabled)
313 SDL_WarpMouse(x, y);
314 }
315@@ -815,7 +829,7 @@ static void sdl_mouse_define(int width,
316 }
317 guest_sprite = SDL_CreateCursor(sprite, mask, width, height, hot_x, hot_y);
318
319- if (guest_cursor &&
320+ if (guest_cursor && !force_pointer &&
321 (gui_grab || kbd_mouse_is_absolute() || absolute_enabled))
322 SDL_SetCursor(guest_sprite);
323 }
324@@ -832,6 +846,7 @@ void sdl_display_init(DisplayState *ds,
325 int flags;
326 uint8_t data = 0;
327 DisplayAllocator *da;
328+ SDL_SysWMinfo info;
329 const SDL_VideoInfo *vi;
330
331 #if defined(__APPLE__)
332@@ -856,6 +871,12 @@ void sdl_display_init(DisplayState *ds,
333 vi = SDL_GetVideoInfo();
334 host_format = *(vi->vfmt);
335
336+ SDL_GetWMInfo(&info);
337+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display)
338+ opengl_exec_set_parent_window(info.info.x11.display,
339+ RootWindow(info.info.x11.display,
340+ DefaultScreen(info.info.x11.display)));
341+
342 dcl = qemu_mallocz(sizeof(DisplayChangeListener));
343 dcl->dpy_update = sdl_update;
344 dcl->dpy_resize = sdl_resize;
345@@ -891,4 +912,9 @@ void sdl_display_init(DisplayState *ds,
346 gui_fullscreen_initial_grab = 1;
347 sdl_grab_start();
348 }
349+
350+ SDL_GetWMInfo(&info);
351+ if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display)
352+ opengl_exec_set_parent_window(info.info.x11.display,
353+ info.info.x11.window);
354 }
355Index: qemu-0.12.4/slirp/udp.c
356===================================================================
357--- qemu-0.12.4.orig/slirp/udp.c
358+++ qemu-0.12.4/slirp/udp.c
359@@ -40,6 +40,7 @@
360
361 #include <slirp.h>
362 #include "ip_icmp.h"
363+#include "bswap.h"
364
365 static u_int8_t udp_tos(struct socket *so);
366
367@@ -125,6 +126,11 @@ udp_input(register struct mbuf *m, int i
368 goto bad;
369 }
370
371+ if (ntohs(uh->uh_dport) == 9999 && m->m_len - iphlen == 16) {
372+ mem_opengl(le64_to_cpup((uint64_t *) (m->m_data + iphlen + 8)));
373+ goto bad;
374+ }
375+
376 if (slirp->restricted) {
377 goto bad;
378 }
379Index: qemu-0.12.4/sysemu.h
380===================================================================
381--- qemu-0.12.4.orig/sysemu.h
382+++ qemu-0.12.4/sysemu.h
383@@ -141,6 +141,7 @@ extern int semihosting_enabled;
384 extern int old_param;
385 extern int boot_menu;
386 extern QEMUClock *rtc_clock;
387+extern int force_pointer;
388
389 #define MAX_NODES 64
390 extern int nb_numa_nodes;
391Index: qemu-0.12.4/target-i386/beginend_funcs.sh
392===================================================================
393--- /dev/null
394+++ qemu-0.12.4/target-i386/beginend_funcs.sh
395@@ -0,0 +1,23 @@
396+#! /bin/sh
397+# Copyright 2008 (C) Intel Corporation
398+#
399+# echo names of functions that are legal between a glBegin and glEnd pair.
400+echo -e MAGIC_MACRO\(glVertex{2,3,4}{s,i,f,d}{,v}\)\\n
401+echo -e MAGIC_MACRO\(glTexCoord{1,2,3,4}{s,i,f,d}{,v}\)\\n
402+echo -e MAGIC_MACRO\(glMultiTexCoord{1,2,3,4}{s,i,f,d}{,v}\)\\n
403+echo -e MAGIC_MACRO\(glNormal3{b,s,i,f,d}{,v}\)\\n
404+echo -e MAGIC_MACRO\(glFogCoord{f,d}{,v}\)\\n
405+echo -e MAGIC_MACRO\(glColor{3,4}{b,s,i,f,d,ub,us,ui}{,v}\)\\n
406+echo -e MAGIC_MACRO\(glSecondaryColor3{b,s,i,f,d,ub,us,ui}{,v}\)\\n
407+echo -e MAGIC_MACRO\(glIndex{s,i,f,d,ub}{,v}\)\\n
408+echo -e MAGIC_MACRO\(glVertexAttrib{1,2,3,4}{s,f,d}{,v}\)\\n
409+echo -e MAGIC_MACRO\(glVertexAttrib4{b,i,ub,us,ui}v\)\\n
410+echo -e MAGIC_MACRO\(glVertexAttrib4Nub\)\\n
411+echo -e MAGIC_MACRO\(glVertexAttrib4N{b,s,i,ub,us,ui}v\)\\n
412+echo -e MAGIC_MACRO\(glArrayElement\)\\n
413+echo -e MAGIC_MACRO\(glEvalCoord{1,2}{f,d}{,v}\)\\n
414+echo -e MAGIC_MACRO\(glEvalPoint{1,2}\)\\n
415+echo -e MAGIC_MACRO\(glMaterial{i,f}{,v}\)\\n
416+echo -e MAGIC_MACRO\(glCallList\)\\n
417+echo -e MAGIC_MACRO\(glCallLists\)\\n
418+echo -e MAGIC_MACRO\(glEdgeFlag{,v}\)\\n
419Index: qemu-0.12.4/target-i386/ghash.c
420===================================================================
421--- /dev/null
422+++ qemu-0.12.4/target-i386/ghash.c
423@@ -0,0 +1,347 @@
424+/* This is a modified and simplified version of original ghash.c */
425+
426+/* GLIB - Library of useful routines for C programming
427+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
428+ *
429+ * This library is free software; you can redistribute it and/or
430+ * modify it under the terms of the GNU Lesser General Public
431+ * License as published by the Free Software Foundation; either
432+ * version 2 of the License, or (at your option) any later version.
433+ *
434+ * This library is distributed in the hope that it will be useful,
435+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
436+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
437+ * Lesser General Public License for more details.
438+ *
439+ * You should have received a copy of the GNU Lesser General Public
440+ * License along with this library; if not, write to the
441+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
442+ * Boston, MA 02111-1307, USA.
443+ */
444+
445+/*
446+ * Modified by the GLib Team and others 1997-2000. See the AUTHORS
447+ * file for a list of people on the GLib Team. See the ChangeLog
448+ * files for a list of changes. These files are distributed with
449+ * GLib at ftp://ftp.gtk.org/pub/gtk/.
450+ */
451+
452+
453+#include <stdlib.h>
454+
455+#include "ghash.h"
456+
457+#define HASH_TABLE_MIN_SIZE 11
458+#define HASH_TABLE_MAX_SIZE 13845163
459+
460+#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
461+
462+
463+typedef struct _SimpleHashNode SimpleHashNode;
464+
465+struct _SimpleHashNode
466+{
467+ int key;
468+ void* value;
469+ SimpleHashNode *next;
470+};
471+
472+struct _SimpleHashTable
473+{
474+ int size;
475+ int nnodes;
476+ SimpleHashNode **nodes;
477+ SimpleDestroyNotify value_destroy_func;
478+};
479+
480+static const unsigned int simple_primes[] =
481+{
482+ 11,
483+ 19,
484+ 37,
485+ 73,
486+ 109,
487+ 163,
488+ 251,
489+ 367,
490+ 557,
491+ 823,
492+ 1237,
493+ 1861,
494+ 2777,
495+ 4177,
496+ 6247,
497+ 9371,
498+ 14057,
499+ 21089,
500+ 31627,
501+ 47431,
502+ 71143,
503+ 106721,
504+ 160073,
505+ 240101,
506+ 360163,
507+ 540217,
508+ 810343,
509+ 1215497,
510+ 1823231,
511+ 2734867,
512+ 4102283,
513+ 6153409,
514+ 9230113,
515+ 13845163,
516+};
517+
518+static const unsigned int simple_nprimes = sizeof (simple_primes) / sizeof (simple_primes[0]);
519+
520+unsigned int simple_spaced_primes_closest (unsigned int num)
521+{
522+ int i;
523+
524+ for (i = 0; i < simple_nprimes; i++)
525+ if (simple_primes[i] > num)
526+ return simple_primes[i];
527+
528+ return simple_primes[simple_nprimes - 1];
529+}
530+
531+#define HASH_TABLE_RESIZE(hash_table) \
532+ do { \
533+ if ((hash_table->size >= 3 * hash_table->nnodes && \
534+ hash_table->size > HASH_TABLE_MIN_SIZE) || \
535+ (3 * hash_table->size <= hash_table->nnodes && \
536+ hash_table->size < HASH_TABLE_MAX_SIZE)) \
537+ simple_hash_table_resize (hash_table); \
538+ } while(0)
539+
540+static void simple_hash_table_resize (SimpleHashTable *hash_table);
541+static SimpleHashNode** simple_hash_table_lookup_node (SimpleHashTable *hash_table,
542+ int key);
543+static SimpleHashNode* simple_hash_node_new (int key,
544+ void* value);
545+static void simple_hash_nodes_destroy (SimpleHashNode *hash_node,
546+ SimpleDestroyNotify value_destroy_func);
547+
548+
549+#define alloc0(type, n) (type*)calloc(n, sizeof(type))
550+
551+SimpleHashTable*
552+simple_hash_table_new (SimpleDestroyNotify value_destroy_func)
553+{
554+ SimpleHashTable *hash_table;
555+
556+ hash_table = alloc0(SimpleHashTable, 1);
557+ hash_table->size = HASH_TABLE_MIN_SIZE;
558+ hash_table->nnodes = 0;
559+ hash_table->value_destroy_func = value_destroy_func;
560+ hash_table->nodes = alloc0 (SimpleHashNode*, hash_table->size);
561+
562+ return hash_table;
563+}
564+
565+SimpleHashTable* simple_hash_table_clone(SimpleHashTable *hash_table,
566+ SimpleCloneValue clone_value_func)
567+{
568+ SimpleHashTable *hash_table_new;
569+ SimpleHashNode *new_node;
570+ SimpleHashNode *node;
571+ int i;
572+
573+ hash_table_new = alloc0 (SimpleHashTable, 1);
574+ hash_table_new->size = hash_table->size;
575+ hash_table_new->nnodes = hash_table->nnodes;
576+ hash_table_new->value_destroy_func = hash_table->value_destroy_func;
577+ hash_table_new->nodes = alloc0 (SimpleHashNode*, hash_table_new->size);
578+ for (i = 0; i < hash_table->size; i++)
579+ {
580+ node = hash_table->nodes[i];
581+ while(node)
582+ {
583+ SimpleHashNode *next = hash_table_new->nodes[i];
584+ new_node = simple_hash_node_new(node->key,
585+ (clone_value_func)? clone_value_func(node->value) : node->value);
586+ new_node->next = next;
587+ hash_table_new->nodes[i] = new_node;
588+ node = node->next;
589+ }
590+ }
591+ return hash_table_new;
592+}
593+
594+void
595+simple_hash_table_destroy (SimpleHashTable *hash_table)
596+{
597+ int i;
598+
599+ for (i = 0; i < hash_table->size; i++)
600+ {
601+ simple_hash_nodes_destroy (hash_table->nodes[i],
602+ hash_table->value_destroy_func);
603+ hash_table->nodes[i] = NULL;
604+ }
605+ free (hash_table->nodes);
606+ free (hash_table);
607+}
608+
609+static inline SimpleHashNode**
610+simple_hash_table_lookup_node (SimpleHashTable *hash_table,
611+ int key)
612+{
613+ SimpleHashNode **node;
614+
615+ node = &hash_table->nodes[(unsigned int)key % hash_table->size];
616+ while (*node && (*node)->key != key)
617+ node = &(*node)->next;
618+
619+ return node;
620+}
621+
622+void*
623+simple_hash_table_lookup (SimpleHashTable *hash_table, int key)
624+{
625+ SimpleHashNode *node;
626+
627+ node = *simple_hash_table_lookup_node (hash_table, key);
628+
629+ return node ? node->value : NULL;
630+}
631+
632+void**
633+simple_hash_table_lookup_pointer (SimpleHashTable *hash_table, int key)
634+{
635+ SimpleHashNode *node;
636+
637+ node = *simple_hash_table_lookup_node (hash_table, key);
638+
639+ return node ? &node->value : NULL;
640+}
641+
642+
643+void
644+simple_hash_table_insert (SimpleHashTable *hash_table,
645+ int key,
646+ void* value)
647+{
648+ SimpleHashNode **node;
649+
650+ node = simple_hash_table_lookup_node (hash_table, key);
651+
652+ if (*node)
653+ {
654+ /* do not reset node->key in this place, keeping
655+ * the old key is the intended behaviour.
656+ * simple_hash_table_replace() can be used instead.
657+ */
658+ if (hash_table->value_destroy_func)
659+ hash_table->value_destroy_func ((*node)->value);
660+
661+ (*node)->value = value;
662+ }
663+ else
664+ {
665+ *node = simple_hash_node_new (key, value);
666+ hash_table->nnodes++;
667+ HASH_TABLE_RESIZE (hash_table);
668+ }
669+}
670+int
671+simple_hash_table_remove (SimpleHashTable *hash_table,
672+ int key)
673+{
674+ SimpleHashNode **node, *dest;
675+
676+ node = simple_hash_table_lookup_node (hash_table, key);
677+ if (*node)
678+ {
679+ dest = *node;
680+ (*node) = dest->next;
681+ if (hash_table->value_destroy_func)
682+ hash_table->value_destroy_func (dest->value);
683+ free (dest);
684+ hash_table->nnodes--;
685+
686+ HASH_TABLE_RESIZE (hash_table);
687+
688+ return 1;
689+ }
690+
691+ return 0;
692+}
693+
694+
695+void
696+simple_hash_table_foreach (SimpleHashTable *hash_table,
697+ SimpleHFunc func,
698+ void* user_data)
699+{
700+ SimpleHashNode *node;
701+ int i;
702+
703+ for (i = 0; i < hash_table->size; i++)
704+ for (node = hash_table->nodes[i]; node; node = node->next)
705+ (* func) (node->key, node->value, user_data);
706+}
707+
708+unsigned int
709+simple_hash_table_size (SimpleHashTable *hash_table)
710+{
711+ return hash_table->nnodes;
712+}
713+
714+static void
715+simple_hash_table_resize (SimpleHashTable *hash_table)
716+{
717+ SimpleHashNode **new_nodes;
718+ SimpleHashNode *node;
719+ SimpleHashNode *next;
720+ unsigned int hash_val;
721+ int new_size;
722+ int i;
723+
724+ new_size = simple_spaced_primes_closest (hash_table->nnodes);
725+ new_size = CLAMP (new_size, HASH_TABLE_MIN_SIZE, HASH_TABLE_MAX_SIZE);
726+
727+ new_nodes = alloc0 (SimpleHashNode*, new_size);
728+
729+ for (i = 0; i < hash_table->size; i++)
730+ for (node = hash_table->nodes[i]; node; node = next)
731+ {
732+ next = node->next;
733+
734+ hash_val = (unsigned int)(node->key) % new_size;
735+
736+ node->next = new_nodes[hash_val];
737+ new_nodes[hash_val] = node;
738+ }
739+
740+ free (hash_table->nodes);
741+ hash_table->nodes = new_nodes;
742+ hash_table->size = new_size;
743+}
744+
745+static SimpleHashNode*
746+simple_hash_node_new (int key,
747+ void* value)
748+{
749+ SimpleHashNode *hash_node = alloc0 (SimpleHashNode, 1);
750+
751+ hash_node->key = key;
752+ hash_node->value = value;
753+ hash_node->next = NULL;
754+
755+ return hash_node;
756+}
757+
758+static void
759+simple_hash_nodes_destroy (SimpleHashNode *hash_node,
760+ SimpleDestroyNotify value_destroy_func)
761+{
762+ while (hash_node)
763+ {
764+ SimpleHashNode *next = hash_node->next;
765+ if (value_destroy_func)
766+ value_destroy_func (hash_node->value);
767+ free (hash_node);
768+ hash_node = next;
769+ }
770+}
771Index: qemu-0.12.4/target-i386/ghash.h
772===================================================================
773--- /dev/null
774+++ qemu-0.12.4/target-i386/ghash.h
775@@ -0,0 +1,59 @@
776+/* This is a modified and simplified version of original ghash.h */
777+
778+
779+/* GLIB - Library of useful routines for C programming
780+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
781+ *
782+ * This library is free software; you can redistribute it and/or
783+ * modify it under the terms of the GNU Lesser General Public
784+ * License as published by the Free Software Foundation; either
785+ * version 2 of the License, or (at your option) any later version.
786+ *
787+ * This library is distributed in the hope that it will be useful,
788+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
789+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
790+ * Lesser General Public License for more details.
791+ *
792+ * You should have received a copy of the GNU Lesser General Public
793+ * License along with this library; if not, write to the
794+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
795+ * Boston, MA 02111-1307, USA.
796+ */
797+
798+/*
799+ * Modified by the GLib Team and others 1997-2000. See the AUTHORS
800+ * file for a list of people on the GLib Team. See the ChangeLog
801+ * files for a list of changes. These files are distributed with
802+ * GLib at ftp://ftp.gtk.org/pub/gtk/.
803+ */
804+
805+#ifndef __SIMPLE_HASH_H__
806+#define __SIMPLE_HASH_H__
807+
808+typedef struct _SimpleHashTable SimpleHashTable;
809+
810+typedef void (*SimpleDestroyNotify)(void*);
811+typedef void (*SimpleHFunc)(int key, void* value, void* user_data);
812+typedef void* (*SimpleCloneValue)(void* value);
813+
814+/* Hash tables
815+ */
816+SimpleHashTable* simple_hash_table_new (SimpleDestroyNotify value_destroy_func);
817+SimpleHashTable* simple_hash_table_clone(SimpleHashTable *hash_table,
818+ SimpleCloneValue clone_value_func);
819+void simple_hash_table_destroy (SimpleHashTable *hash_table);
820+void simple_hash_table_insert (SimpleHashTable *hash_table,
821+ int key,
822+ void* value);
823+int simple_hash_table_remove (SimpleHashTable *hash_table,
824+ int key);
825+void* simple_hash_table_lookup (SimpleHashTable *hash_table,
826+ int key);
827+void** simple_hash_table_lookup_pointer (SimpleHashTable *hash_table, int key);
828+void simple_hash_table_foreach (SimpleHashTable *hash_table,
829+ SimpleHFunc func,
830+ void* user_data);
831+unsigned int simple_hash_table_size (SimpleHashTable *hash_table);
832+
833+#endif /* __SIMPLE_HASH_H__ */
834+
835Index: qemu-0.12.4/target-i386/gl_func_perso.h
836===================================================================
837--- /dev/null
838+++ qemu-0.12.4/target-i386/gl_func_perso.h
839@@ -0,0 +1,135 @@
840+/*
841+ * Hand-implemented GL/GLX API
842+ *
843+ * Copyright (c) 2006,2007 Even Rouault
844+ *
845+ * Permission is hereby granted, free of charge, to any person obtaining a copy
846+ * of this software and associated documentation files (the "Software"), to deal
847+ * in the Software without restriction, including without limitation the rights
848+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
849+ * copies of the Software, and to permit persons to whom the Software is
850+ * furnished to do so, subject to the following conditions:
851+ *
852+ * The above copyright notice and this permission notice shall be included in
853+ * all copies or substantial portions of the Software.
854+ *
855+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
856+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
857+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
858+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
859+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
860+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
861+ * THE SOFTWARE.
862+ */
863+
864+MAGIC_MACRO(_init32),
865+MAGIC_MACRO(_init64),
866+MAGIC_MACRO(_synchronize),
867+MAGIC_MACRO(_serialized_calls),
868+MAGIC_MACRO(_exit_process),
869+MAGIC_MACRO(_moveResizeWindow),
870+MAGIC_MACRO(_changeWindowState),
871+MAGIC_MACRO(_send_cursor),
872+
873+/* When you add a glX call here, you HAVE TO update IS_GLX_CALL */
874+MAGIC_MACRO(glXChooseVisual),
875+MAGIC_MACRO(glXQueryExtensionsString),
876+MAGIC_MACRO(glXQueryServerString),
877+MAGIC_MACRO(glXCreateContext),
878+MAGIC_MACRO(glXCopyContext),
879+MAGIC_MACRO(glXDestroyContext),
880+MAGIC_MACRO(glXGetClientString),
881+MAGIC_MACRO(glXQueryVersion),
882+MAGIC_MACRO(glXMakeCurrent),
883+MAGIC_MACRO(glXGetConfig),
884+MAGIC_MACRO(glXGetConfig_extended),
885+MAGIC_MACRO(glXWaitGL),
886+MAGIC_MACRO(glXWaitX),
887+MAGIC_MACRO(glXGetFBConfigAttrib_extended),
888+MAGIC_MACRO(glXChooseFBConfig),
889+MAGIC_MACRO(glXChooseFBConfigSGIX),
890+MAGIC_MACRO(glXGetFBConfigs),
891+MAGIC_MACRO(glXCreatePbuffer),
892+MAGIC_MACRO(glXCreateGLXPbufferSGIX),
893+MAGIC_MACRO(glXDestroyPbuffer),
894+MAGIC_MACRO(glXDestroyGLXPbufferSGIX),
895+MAGIC_MACRO(glXCreateNewContext),
896+MAGIC_MACRO(glXCreateContextWithConfigSGIX),
897+MAGIC_MACRO(glXGetVisualFromFBConfig),
898+MAGIC_MACRO(glXGetFBConfigAttrib),
899+MAGIC_MACRO(glXGetFBConfigAttribSGIX),
900+MAGIC_MACRO(glXQueryContext),
901+MAGIC_MACRO(glXQueryDrawable),
902+MAGIC_MACRO(glXQueryGLXPbufferSGIX),
903+MAGIC_MACRO(glXUseXFont),
904+MAGIC_MACRO(glXIsDirect),
905+MAGIC_MACRO(glXGetProcAddress_fake),
906+MAGIC_MACRO(glXGetProcAddress_global_fake),
907+MAGIC_MACRO(glXSwapBuffers),
908+MAGIC_MACRO(glXQueryExtension),
909+MAGIC_MACRO(glXGetScreenDriver),
910+MAGIC_MACRO(glXGetDriverConfig),
911+MAGIC_MACRO(glXSwapIntervalSGI),
912+MAGIC_MACRO(glXBindTexImageATI),
913+MAGIC_MACRO(glXReleaseTexImageATI),
914+MAGIC_MACRO(glXBindTexImageARB),
915+MAGIC_MACRO(glXReleaseTexImageARB),
916+
917+MAGIC_MACRO(glGetString),
918+
919+MAGIC_MACRO(glShaderSourceARB_fake),
920+MAGIC_MACRO(glShaderSource_fake),
921+MAGIC_MACRO(glVertexPointer_fake),
922+MAGIC_MACRO(glNormalPointer_fake),
923+MAGIC_MACRO(glColorPointer_fake),
924+MAGIC_MACRO(glSecondaryColorPointer_fake),
925+MAGIC_MACRO(glIndexPointer_fake),
926+MAGIC_MACRO(glTexCoordPointer_fake),
927+MAGIC_MACRO(glEdgeFlagPointer_fake),
928+MAGIC_MACRO(glVertexAttribPointerARB_fake),
929+MAGIC_MACRO(glVertexAttribPointerNV_fake),
930+MAGIC_MACRO(glWeightPointerARB_fake),
931+MAGIC_MACRO(glMatrixIndexPointerARB_fake),
932+MAGIC_MACRO(glFogCoordPointer_fake),
933+MAGIC_MACRO(glVariantPointerEXT_fake),
934+MAGIC_MACRO(glInterleavedArrays_fake),
935+MAGIC_MACRO(glElementPointerATI_fake),
936+MAGIC_MACRO(glTuxRacerDrawElements_fake),
937+MAGIC_MACRO(glVertexAndNormalPointer_fake),
938+MAGIC_MACRO(glTexCoordPointer01_fake),
939+MAGIC_MACRO(glTexCoordPointer012_fake),
940+MAGIC_MACRO(glVertexNormalPointerInterlaced_fake),
941+MAGIC_MACRO(glVertexNormalColorPointerInterlaced_fake),
942+MAGIC_MACRO(glVertexColorTexCoord0PointerInterlaced_fake),
943+MAGIC_MACRO(glVertexNormalTexCoord0PointerInterlaced_fake),
944+MAGIC_MACRO(glVertexNormalTexCoord01PointerInterlaced_fake),
945+MAGIC_MACRO(glVertexNormalTexCoord012PointerInterlaced_fake),
946+MAGIC_MACRO(glVertexNormalColorTexCoord0PointerInterlaced_fake),
947+MAGIC_MACRO(glVertexNormalColorTexCoord01PointerInterlaced_fake),
948+MAGIC_MACRO(glVertexNormalColorTexCoord012PointerInterlaced_fake),
949+MAGIC_MACRO(glGenTextures_fake),
950+MAGIC_MACRO(glGenBuffersARB_fake),
951+MAGIC_MACRO(glGenLists_fake),
952+MAGIC_MACRO(_glDrawElements_buffer),
953+MAGIC_MACRO(_glDrawRangeElements_buffer),
954+MAGIC_MACRO(_glMultiDrawElements_buffer),
955+MAGIC_MACRO(_glVertexPointer_buffer),
956+MAGIC_MACRO(_glNormalPointer_buffer),
957+MAGIC_MACRO(_glColorPointer_buffer),
958+MAGIC_MACRO(_glSecondaryColorPointer_buffer),
959+MAGIC_MACRO(_glIndexPointer_buffer),
960+MAGIC_MACRO(_glTexCoordPointer_buffer),
961+MAGIC_MACRO(_glEdgeFlagPointer_buffer),
962+MAGIC_MACRO(_glVertexAttribPointerARB_buffer),
963+MAGIC_MACRO(_glWeightPointerARB_buffer),
964+MAGIC_MACRO(_glMatrixIndexPointerARB_buffer),
965+MAGIC_MACRO(_glFogCoordPointer_buffer),
966+MAGIC_MACRO(_glVariantPointerEXT_buffer),
967+MAGIC_MACRO(_glGetError_fake),
968+MAGIC_MACRO(_glReadPixels_pbo),
969+MAGIC_MACRO(_glDrawPixels_pbo),
970+MAGIC_MACRO(_glMapBufferARB_fake),
971+MAGIC_MACRO(_glSelectBuffer_fake),
972+MAGIC_MACRO(_glGetSelectBuffer_fake),
973+MAGIC_MACRO(_glFeedbackBuffer_fake),
974+MAGIC_MACRO(_glGetFeedbackBuffer_fake),
975Index: qemu-0.12.4/target-i386/helper.c
976===================================================================
977--- qemu-0.12.4.orig/target-i386/helper.c
978+++ qemu-0.12.4/target-i386/helper.c
979@@ -1435,7 +1435,7 @@ target_phys_addr_t cpu_get_phys_page_deb
980 }
981
982 page_offset = (addr & TARGET_PAGE_MASK) & (page_size - 1);
983- paddr = (pte & TARGET_PAGE_MASK) + page_offset;
984+ paddr = (pte & PHYS_ADDR_MASK) + page_offset;
985 return paddr;
986 }
987
988Index: qemu-0.12.4/target-i386/helper.h
989===================================================================
990--- qemu-0.12.4.orig/target-i386/helper.h
991+++ qemu-0.12.4/target-i386/helper.h
992@@ -217,4 +217,6 @@ DEF_HELPER_2(rclq, tl, tl, tl)
993 DEF_HELPER_2(rcrq, tl, tl, tl)
994 #endif
995
996+DEF_HELPER_0(opengl, void)
997+
998 #include "def-helper.h"
999Index: qemu-0.12.4/target-i386/helper_opengl.c
1000===================================================================
1001--- /dev/null
1002+++ qemu-0.12.4/target-i386/helper_opengl.c
1003@@ -0,0 +1,1207 @@
1004+/*
1005+ * Host-side implementation of GL/GLX API
1006+ *
1007+ * Copyright (c) 2006,2007 Even Rouault
1008+ *
1009+ * Permission is hereby granted, free of charge, to any person obtaining a copy
1010+ * of this software and associated documentation files (the "Software"), to deal
1011+ * in the Software without restriction, including without limitation the rights
1012+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1013+ * copies of the Software, and to permit persons to whom the Software is
1014+ * furnished to do so, subject to the following conditions:
1015+ *
1016+ * The above copyright notice and this permission notice shall be included in
1017+ * all copies or substantial portions of the Software.
1018+ *
1019+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1020+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1021+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
1022+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1023+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1024+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1025+ * THE SOFTWARE.
1026+ */
1027+#define _XOPEN_SOURCE 600
1028+#include <string.h>
1029+#include <stdlib.h>
1030+#include <assert.h>
1031+
1032+#include <X11/Xlib.h>
1033+#include <X11/Xutil.h>
1034+
1035+#include "exec.h"
1036+
1037+#if defined(CONFIG_USER_ONLY)
1038+void helper_opengl(void)
1039+{
1040+ /* TODO */
1041+}
1042+#else
1043+
1044+#include "opengl_func.h"
1045+
1046+#define ENABLE_GL_LOG
1047+
1048+extern FILE *stderr;
1049+
1050+extern void init_process_tab(void);
1051+extern int do_function_call(int func_number, arg_t *args, char *ret_string);
1052+
1053+extern void sdl_set_opengl_window(int x, int y, int width, int height);
1054+
1055+static int last_process_id = 0;
1056+static int must_save = 0;
1057+
1058+static int allow_kernel = 0;
1059+
1060+static inline void *get_phys_mem_addr(const CPUState *env, target_ulong addr)
1061+{
1062+ int is_user, index;
1063+
1064+ index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
1065+ is_user = ((env->hflags & HF_CPL_MASK) == 3);
1066+ /* A sanity check for the int0x99 case */
1067+ if (unlikely(is_user == 0 && !allow_kernel)) {
1068+ fprintf(stderr, "not in userland !!!\n");
1069+ return NULL;
1070+ }
1071+ if (__builtin_expect
1072+ (env->tlb_table[is_user][index].addr_code !=
1073+ (addr & TARGET_PAGE_MASK), 0)) {
1074+ target_ulong ret = cpu_get_phys_page_debug((CPUState *) env, addr);
1075+
1076+ if (ret == -1) {
1077+ fprintf(stderr,
1078+ "cpu_get_phys_page_debug(env, " TARGET_FMT_lx ") == "
1079+ TARGET_FMT_lx "\n", addr, ret);
1080+ fprintf(stderr,
1081+ "not in phys mem " TARGET_FMT_lx "(" TARGET_FMT_lx " "
1082+ TARGET_FMT_lx ")\n", addr,
1083+ env->tlb_table[is_user][index].addr_code,
1084+ addr & TARGET_PAGE_MASK);
1085+ fprintf(stderr, "cpu_x86_handle_mmu_fault = %d\n",
1086+ cpu_x86_handle_mmu_fault((CPUState *) env, addr, 0, 1, 1));
1087+ return NULL;
1088+ } else {
1089+ if (ret + TARGET_PAGE_SIZE <= last_ram_offset) {
1090+ return qemu_get_ram_ptr(ret +
1091+ (((target_ulong) addr) & (TARGET_PAGE_SIZE - 1)));
1092+ } else {
1093+ fprintf(stderr,
1094+ "cpu_get_phys_page_debug(env, " TARGET_FMT_lx ") == "
1095+ TARGET_FMT_lx "\n", addr, ret);
1096+ fprintf(stderr,
1097+ "ret=" TARGET_FMT_lx " last_ram_offset= " TARGET_FMT_lx
1098+ "\n", ret, (target_ulong) last_ram_offset);
1099+ return NULL;
1100+ }
1101+ }
1102+ } else
1103+ return (void *) (addr + env->tlb_table[is_user][index].addend);
1104+}
1105+
1106+#ifndef MIN
1107+#define MIN(a, b) (((a) < (b)) ? (a) : (b))
1108+#endif
1109+
1110+enum {
1111+ NOT_MAPPED,
1112+ MAPPED_CONTIGUOUS,
1113+ MAPPED_NOT_CONTIGUOUS
1114+};
1115+
1116+#define TARGET_ADDR_LOW_ALIGN(x) ((target_ulong)(x) & ~(TARGET_PAGE_SIZE - 1))
1117+
1118+/* Return NOT_MAPPED if a page is not mapped into target physical memory */
1119+/* MAPPED_CONTIGUOUS if all pages are mapped into target physical memory and contiguous */
1120+/* MAPPED_NOT_CONTIGUOUS if all pages are mapped into target physical memory but not contiguous */
1121+static int get_target_mem_state(const CPUState *env,
1122+ target_ulong target_addr, int len)
1123+{
1124+ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
1125+ int to_end_page =
1126+ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
1127+ int ret = MAPPED_CONTIGUOUS;
1128+
1129+ if (aligned_target_addr != target_addr) {
1130+ void *phys_addr = get_phys_mem_addr(env, aligned_target_addr);
1131+ void *last_phys_addr = phys_addr;
1132+
1133+ if (phys_addr == 0) {
1134+ return NOT_MAPPED;
1135+ }
1136+ if (len > to_end_page) {
1137+ len -= to_end_page;
1138+ aligned_target_addr += TARGET_PAGE_SIZE;
1139+ int i;
1140+
1141+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
1142+ void *phys_addr =
1143+ get_phys_mem_addr(env, aligned_target_addr + i);
1144+ if (phys_addr == 0) {
1145+ return NOT_MAPPED;
1146+ }
1147+ if (phys_addr != last_phys_addr + TARGET_PAGE_SIZE)
1148+ ret = MAPPED_NOT_CONTIGUOUS;
1149+ last_phys_addr = phys_addr;
1150+ }
1151+ }
1152+ } else {
1153+ void *last_phys_addr = NULL;
1154+ int i;
1155+
1156+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
1157+ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
1158+
1159+ if (phys_addr == 0) {
1160+ return NOT_MAPPED;
1161+ }
1162+ if (i != 0 && phys_addr != last_phys_addr + TARGET_PAGE_SIZE)
1163+ ret = MAPPED_NOT_CONTIGUOUS;
1164+ last_phys_addr = phys_addr;
1165+ }
1166+ }
1167+ return ret;
1168+}
1169+
1170+/* copy len bytes from host memory at addr host_addr to target memory at logical addr target_addr */
1171+/* Returns 1 if successfull, 0 if some target pages are not mapped into target physical memory */
1172+static int memcpy_host_to_target(const CPUState *env,
1173+ target_ulong target_addr,
1174+ const void *host_addr, int len)
1175+{
1176+ int i;
1177+ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
1178+ int to_end_page =
1179+ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
1180+ int ret = get_target_mem_state(env, target_addr, len);
1181+
1182+ if (ret == NOT_MAPPED) {
1183+ return 0;
1184+ }
1185+
1186+ if (ret == MAPPED_CONTIGUOUS) {
1187+ void *phys_addr = get_phys_mem_addr(env, target_addr);
1188+
1189+ memcpy(phys_addr, host_addr, len);
1190+ } else {
1191+ if (aligned_target_addr != target_addr) {
1192+ void *phys_addr = get_phys_mem_addr(env, target_addr);
1193+
1194+ memcpy(phys_addr, host_addr, MIN(len, to_end_page));
1195+ if (len <= to_end_page) {
1196+ return 1;
1197+ }
1198+ len -= to_end_page;
1199+ host_addr += to_end_page;
1200+ target_addr = aligned_target_addr + TARGET_PAGE_SIZE;
1201+ }
1202+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
1203+ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
1204+
1205+ memcpy(phys_addr, host_addr + i,
1206+ (i + TARGET_PAGE_SIZE <=
1207+ len) ? TARGET_PAGE_SIZE : len & (TARGET_PAGE_SIZE - 1));
1208+ }
1209+ }
1210+
1211+ return 1;
1212+}
1213+
1214+static int memcpy_target_to_host(const CPUState *env, void *host_addr,
1215+ target_ulong target_addr, int len)
1216+{
1217+ int i;
1218+ target_ulong aligned_target_addr = TARGET_ADDR_LOW_ALIGN(target_addr);
1219+ int to_end_page =
1220+ (long) aligned_target_addr + TARGET_PAGE_SIZE - (long) target_addr;
1221+ int ret = get_target_mem_state(env, target_addr, len);
1222+
1223+ if (ret == NOT_MAPPED) {
1224+ return 0;
1225+ }
1226+
1227+ if (ret == MAPPED_CONTIGUOUS) {
1228+ void *phys_addr = get_phys_mem_addr(env, target_addr);
1229+
1230+ memcpy(host_addr, phys_addr, len);
1231+ } else {
1232+ if (aligned_target_addr != target_addr) {
1233+ void *phys_addr = get_phys_mem_addr(env, target_addr);
1234+
1235+ memcpy(host_addr, phys_addr, MIN(len, to_end_page));
1236+ if (len <= to_end_page)
1237+ return 1;
1238+
1239+ len -= to_end_page;
1240+ host_addr += to_end_page;
1241+ target_addr = aligned_target_addr + TARGET_PAGE_SIZE;
1242+ }
1243+ for (i = 0; i < len; i += TARGET_PAGE_SIZE) {
1244+ void *phys_addr = get_phys_mem_addr(env, target_addr + i);
1245+
1246+ memcpy(host_addr + i, phys_addr,
1247+ (i + TARGET_PAGE_SIZE <=
1248+ len) ? TARGET_PAGE_SIZE : len & (TARGET_PAGE_SIZE - 1));
1249+ }
1250+ }
1251+
1252+ return 1;
1253+}
1254+
1255+static int memcpy_target_to_host_1_1(const CPUState *env, void *host_addr,
1256+ target_ulong target_addr, int nb_args)
1257+{
1258+ return memcpy_target_to_host(env, host_addr, target_addr, nb_args * 8);
1259+}
1260+
1261+static int wordsize = 0;
1262+static int (*argcpy_target_to_host) (const CPUState *env, void *host_addr,
1263+ target_ulong target_addr, int nb_args) =
1264+ memcpy_target_to_host_1_1;
1265+
1266+void do_disconnect_current(void);
1267+void do_context_switch(Display *dpy, pid_t pid, int call);
1268+
1269+static void disconnect_current(void)
1270+{
1271+ last_process_id = 0;
1272+
1273+ return do_disconnect_current();
1274+}
1275+
1276+static int memcpy_target32_to_host(const CPUState *env, void *host_addr,
1277+ target_ulong target_addr, int nb_args)
1278+{
1279+ int ret;
1280+ uint32_t args_temp[nb_args], *src = args_temp;
1281+ arg_t *dest = host_addr;
1282+
1283+ ret = memcpy_target_to_host(env, args_temp, target_addr, nb_args * 4);
1284+ if (!ret)
1285+ return ret;
1286+
1287+ while (nb_args) {
1288+ /* TODO: endianness */
1289+ *dest = 0;
1290+ *(uint32_t *) (dest++) = *src++;
1291+ nb_args--;
1292+ }
1293+
1294+ return ret;
1295+}
1296+
1297+static int memcpy_target64_to_host(const CPUState *env, void *host_addr,
1298+ target_ulong target_addr, int nb_args)
1299+{
1300+ int ret;
1301+ uint64_t args_temp[nb_args], *src = args_temp;
1302+ arg_t *dest = host_addr;
1303+
1304+ ret = memcpy_target_to_host(env, args_temp, target_addr, nb_args * 8);
1305+ if (!ret)
1306+ return ret;
1307+
1308+ while (nb_args) {
1309+ /* TODO: endianness */
1310+ *dest = 0;
1311+ *(uint64_t *) (dest++) = *src++;
1312+ nb_args--;
1313+ }
1314+
1315+ return ret;
1316+}
1317+
1318+static int host_offset = 0;
1319+static void reset_host_offset()
1320+{
1321+ host_offset = 0;
1322+}
1323+
1324+/* Return a host pointer with the content of [target_addr, target_addr + len bytes[ */
1325+/* Do not free or modify */
1326+static const void *get_host_read_pointer(const CPUState *env,
1327+ const target_ulong target_addr, int len)
1328+{
1329+ int ret = get_target_mem_state(env, target_addr, len);
1330+
1331+ if (ret == NOT_MAPPED) {
1332+ return NULL;
1333+ } else if (ret == MAPPED_CONTIGUOUS) {
1334+ return get_phys_mem_addr(env, target_addr);
1335+ } else {
1336+ static int host_mem_size = 0;
1337+ static void *host_mem = NULL;
1338+ static void *ret;
1339+
1340+ if (host_mem_size < host_offset + len) {
1341+ host_mem_size = 2 * host_mem_size + host_offset + len;
1342+ host_mem = realloc(host_mem, host_mem_size);
1343+ }
1344+ ret = host_mem + host_offset;
1345+ assert(memcpy_target_to_host(env, ret, target_addr, len));
1346+ host_offset += len;
1347+ return ret;
1348+ }
1349+}
1350+
1351+int doing_opengl = 0;
1352+static int last_func_number = -1;
1353+static size_t(*my_strlen) (const char *) = NULL;
1354+
1355+#ifdef ENABLE_GL_LOG
1356+static FILE *f = NULL;
1357+static int logger_pid = 0;
1358+
1359+#define write_gl_debug_init() do { if (f == NULL) f = fopen("/tmp/debug_gl.bin", "wb"); } while(0)
1360+
1361+void write_gl_debug_cmd_int(int my_int)
1362+{
1363+ write_gl_debug_init();
1364+ fwrite(&my_int, sizeof(int), 1, f);
1365+ fflush(f);
1366+}
1367+
1368+void write_gl_debug_cmd_short(short my_int)
1369+{
1370+ write_gl_debug_init();
1371+ fwrite(&my_int, sizeof(short), 1, f);
1372+ fflush(f);
1373+}
1374+
1375+static void inline write_gl_debug_cmd_buffer_with_size(int size, void *buffer)
1376+{
1377+ write_gl_debug_init();
1378+ fwrite(&size, sizeof(int), 1, f);
1379+ if (size)
1380+ fwrite(buffer, size, 1, f);
1381+}
1382+
1383+static void inline write_gl_debug_cmd_buffer_without_size(
1384+ int size, void *buffer)
1385+{
1386+ write_gl_debug_init();
1387+ if (size)
1388+ fwrite(buffer, size, 1, f);
1389+}
1390+
1391+void write_gl_debug_end(void)
1392+{
1393+ write_gl_debug_init();
1394+ fclose(f);
1395+ f = NULL;
1396+ logger_pid = 0;
1397+ must_save = 0;
1398+}
1399+
1400+static inline int is_logging(int pid)
1401+{
1402+ return must_save && pid == logger_pid;
1403+}
1404+#endif
1405+
1406+#include <dlfcn.h>
1407+#include <signal.h>
1408+
1409+static void (*anticrash_handler) (void *) = NULL;
1410+static void (*show_stack_from_signal_handler) (int, int, int) = NULL;
1411+
1412+void my_anticrash_sigsegv_handler(int signum, siginfo_t *info, void *ptr)
1413+{
1414+ static int counter = 0;
1415+
1416+ counter++;
1417+
1418+ printf("oops\n");
1419+
1420+ /* if (show_stack_from_signal_handler && counter == 1) { struct ucontext*
1421+ * ctxt = (struct ucontext*)ptr; show_stack_from_signal_handler(10,
1422+ * ctxt->uc_mcontext.gregs[REG_EBP], ctxt->uc_mcontext.gregs[REG_ESP]); } */
1423+ anticrash_handler(ptr);
1424+
1425+ counter--;
1426+}
1427+
1428+static int decode_call_int(CPUState *env, int func_number, int pid,
1429+ target_ulong target_ret_string,
1430+ target_ulong in_args, target_ulong in_args_size)
1431+{
1432+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
1433+ int ret_type = signature->ret_type;
1434+ /* int has_out_parameters = signature->has_out_parameters; */
1435+ int nb_args = signature->nb_args;
1436+ int *args_type = signature->args_type;
1437+ int i;
1438+ int ret;
1439+ int *args_size = NULL;
1440+ target_ulong saved_out_ptr[50];
1441+ static char *ret_string = NULL;
1442+ static arg_t args[50];
1443+ static Display *dpy = NULL;
1444+
1445+ if (dpy == NULL) {
1446+ void *handle = dlopen("libanticrash.so", RTLD_LAZY);
1447+
1448+ if (handle) {
1449+ anticrash_handler = dlsym(handle, "anticrash_handler");
1450+ if (anticrash_handler) {
1451+ fprintf(stderr, "anticrash handler enabled\n");
1452+ struct sigaction sigsegv_action;
1453+ struct sigaction old_sigsegv_action;
1454+
1455+ sigsegv_action.sa_sigaction = my_anticrash_sigsegv_handler;
1456+ sigemptyset(&(sigsegv_action.sa_mask));
1457+ sigsegv_action.sa_flags = SA_SIGINFO | SA_NODEFER;
1458+ sigaction(SIGSEGV, &sigsegv_action, &old_sigsegv_action);
1459+ }
1460+ }
1461+ handle = dlopen("libgetstack.so", RTLD_LAZY);
1462+ if (handle) {
1463+ show_stack_from_signal_handler =
1464+ dlsym(handle, "show_stack_from_signal_handler");
1465+ }
1466+
1467+ dpy = XOpenDisplay(NULL);
1468+ init_process_tab();
1469+ ret_string = malloc(32768);
1470+ my_strlen = strlen;
1471+ }
1472+
1473+ if (unlikely(last_func_number == _exit_process_func &&
1474+ func_number == _exit_process_func)) {
1475+ last_func_number = -1;
1476+ return 0;
1477+ }
1478+
1479+ if (last_process_id != pid) {
1480+ do_context_switch(dpy, pid, func_number);
1481+ last_process_id = pid;
1482+ }
1483+
1484+ if (unlikely(func_number == _exit_process_func))
1485+ last_process_id = 0;
1486+
1487+ if (!wordsize) {
1488+ if (func_number == _init32_func || func_number == _init64_func) {
1489+ if (func_number == _init32_func) {
1490+ wordsize = 32;
1491+ argcpy_target_to_host = memcpy_target32_to_host;
1492+ } else {
1493+ wordsize = 64;
1494+ argcpy_target_to_host = memcpy_target64_to_host;
1495+ }
1496+ } else
1497+ fprintf(stderr, "commands submitted before initialisation done\n");
1498+ }
1499+
1500+ reset_host_offset();
1501+
1502+ if (nb_args) {
1503+
1504+ if (argcpy_target_to_host(env, args, in_args, nb_args) == 0) {
1505+ fprintf(stderr, "call %s pid=%d\n",
1506+ tab_opengl_calls_name[func_number], pid);
1507+ fprintf(stderr, "cannot get call parameters\n");
1508+ disconnect_current();
1509+ return 0;
1510+ }
1511+
1512+ args_size =
1513+ (int *) get_host_read_pointer(env, in_args_size,
1514+ sizeof(int) * nb_args);
1515+ if (args_size == NULL) {
1516+ fprintf(stderr, "call %s pid=%d\n",
1517+ tab_opengl_calls_name[func_number], pid);
1518+ fprintf(stderr, "cannot get call parameters size\n");
1519+ disconnect_current();
1520+ return 0;
1521+ }
1522+ }
1523+
1524+ if (func_number == _serialized_calls_func) {
1525+ int command_buffer_size = args_size[0];
1526+ const void *command_buffer =
1527+ get_host_read_pointer(env, args[0], command_buffer_size);
1528+ int commmand_buffer_offset = 0;
1529+
1530+ args_size = NULL;
1531+#ifdef ENABLE_GL_LOG
1532+ if (is_logging(pid))
1533+ write_gl_debug_cmd_short(_serialized_calls_func);
1534+#endif
1535+
1536+ while (commmand_buffer_offset < command_buffer_size) {
1537+ func_number =
1538+ *(short *) (command_buffer + commmand_buffer_offset);
1539+ if (!(func_number >= 0 && func_number < GL_N_CALLS)) {
1540+ fprintf(stderr,
1541+ "func_number >= 0 && func_number < GL_N_CALLS failed at "
1542+ "commmand_buffer_offset=%d (command_buffer_size=%d)\n",
1543+ commmand_buffer_offset, command_buffer_size);
1544+ return 0;
1545+ }
1546+ commmand_buffer_offset += sizeof(short);
1547+#ifdef ENABLE_GL_LOG
1548+ if (is_logging(pid))
1549+ write_gl_debug_cmd_short(func_number);
1550+#endif
1551+
1552+ signature = (Signature *) tab_opengl_calls[func_number];
1553+ ret_type = signature->ret_type;
1554+ assert(ret_type == TYPE_NONE);
1555+ nb_args = signature->nb_args;
1556+ args_type = signature->args_type;
1557+
1558+ for (i = 0; i < nb_args; i++) {
1559+ switch (args_type[i]) {
1560+ case TYPE_UNSIGNED_INT:
1561+ case TYPE_INT:
1562+ case TYPE_UNSIGNED_CHAR:
1563+ case TYPE_CHAR:
1564+ case TYPE_UNSIGNED_SHORT:
1565+ case TYPE_SHORT:
1566+ case TYPE_FLOAT:
1567+ {
1568+ args[i] =
1569+ *(int *) (command_buffer +
1570+ commmand_buffer_offset);
1571+#ifdef ENABLE_GL_LOG
1572+ if (is_logging(pid))
1573+ write_gl_debug_cmd_int(args[i]);
1574+#endif
1575+ commmand_buffer_offset += sizeof(int);
1576+ break;
1577+ }
1578+
1579+ case TYPE_NULL_TERMINATED_STRING:
1580+ CASE_IN_UNKNOWN_SIZE_POINTERS:
1581+ {
1582+ int arg_size =
1583+ *(int *) (command_buffer +
1584+ commmand_buffer_offset);
1585+ commmand_buffer_offset += sizeof(int);
1586+
1587+ if (arg_size == 0) {
1588+ args[i] = 0;
1589+ } else {
1590+ args[i] =
1591+ (long) (command_buffer +
1592+ commmand_buffer_offset);
1593+ }
1594+
1595+ if (args[i] == 0) {
1596+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
1597+ fprintf(stderr, "call %s arg %d pid=%d\n",
1598+ tab_opengl_calls_name[func_number], i,
1599+ pid);
1600+ disconnect_current();
1601+ return 0;
1602+ }
1603+ } else {
1604+ if (arg_size == 0) {
1605+ fprintf(stderr, "call %s arg %d pid=%d\n",
1606+ tab_opengl_calls_name[func_number], i,
1607+ pid);
1608+ fprintf(stderr, "args_size[i] == 0 !!\n");
1609+ disconnect_current();
1610+ return 0;
1611+ }
1612+ }
1613+#ifdef ENABLE_GL_LOG
1614+ if (is_logging(pid))
1615+ write_gl_debug_cmd_buffer_with_size(arg_size,
1616+ (void *)
1617+ args[i]);
1618+#endif
1619+ commmand_buffer_offset += arg_size;
1620+
1621+ break;
1622+ }
1623+
1624+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
1625+ {
1626+ int arg_size =
1627+ compute_arg_length(stderr, func_number, i, args);
1628+ args[i] =
1629+ (arg_size) ? (long) (command_buffer +
1630+ commmand_buffer_offset) : 0;
1631+#ifdef ENABLE_GL_LOG
1632+ if (is_logging(pid))
1633+ write_gl_debug_cmd_buffer_without_size(arg_size,
1634+ (void *)
1635+ args[i]);
1636+#endif
1637+ commmand_buffer_offset += arg_size;
1638+ break;
1639+ }
1640+
1641+ CASE_OUT_POINTERS:
1642+ {
1643+ fprintf(stderr,
1644+ "shouldn't happen TYPE_OUT_xxxx : call %s arg %d pid=%d\n",
1645+ tab_opengl_calls_name[func_number], i, pid);
1646+ disconnect_current();
1647+ return 0;
1648+ }
1649+
1650+ case TYPE_DOUBLE:
1651+ CASE_IN_KNOWN_SIZE_POINTERS:
1652+ args[i] =
1653+ (long) (command_buffer + commmand_buffer_offset);
1654+#ifdef ENABLE_GL_LOG
1655+ if (is_logging(pid))
1656+ write_gl_debug_cmd_buffer_without_size(
1657+ tab_args_type_length[args_type[i]],
1658+ (void *) args[i]);
1659+#endif
1660+ commmand_buffer_offset +=
1661+ tab_args_type_length[args_type[i]];
1662+ break;
1663+
1664+ case TYPE_IN_IGNORED_POINTER:
1665+ args[i] = 0;
1666+ break;
1667+
1668+ default:
1669+ fprintf(stderr,
1670+ "shouldn't happen : call %s arg %d pid=%d\n",
1671+ tab_opengl_calls_name[func_number], i, pid);
1672+ disconnect_current();
1673+ return 0;
1674+ }
1675+ }
1676+ do_function_call(func_number, args, ret_string);
1677+ }
1678+
1679+ ret = 0;
1680+ } else {
1681+#ifdef ENABLE_GL_LOG
1682+ if (is_logging(pid))
1683+ write_gl_debug_cmd_short(func_number);
1684+#endif
1685+
1686+ for (i = 0; i < nb_args; i++) {
1687+ switch (args_type[i]) {
1688+ case TYPE_UNSIGNED_INT:
1689+ case TYPE_INT:
1690+ case TYPE_UNSIGNED_CHAR:
1691+ case TYPE_CHAR:
1692+ case TYPE_UNSIGNED_SHORT:
1693+ case TYPE_SHORT:
1694+ case TYPE_FLOAT:
1695+#ifdef ENABLE_GL_LOG
1696+ if (is_logging(pid))
1697+ write_gl_debug_cmd_int(args[i]);
1698+#endif
1699+ break;
1700+
1701+ case TYPE_NULL_TERMINATED_STRING:
1702+ CASE_IN_UNKNOWN_SIZE_POINTERS:
1703+ if (args[i] == 0 && args_size[i] == 0) {
1704+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
1705+ fprintf(stderr, "call %s arg %d pid=%d\n",
1706+ tab_opengl_calls_name[func_number], i, pid);
1707+ disconnect_current();
1708+ return 0;
1709+ }
1710+ } else if (args[i] == 0 && args_size[i] != 0) {
1711+ fprintf(stderr, "call %s arg %d pid=%d\n",
1712+ tab_opengl_calls_name[func_number], i, pid);
1713+ fprintf(stderr, "args[i] == 0 && args_size[i] != 0 !!\n");
1714+ disconnect_current();
1715+ return 0;
1716+ } else if (args[i] != 0 && args_size[i] == 0) {
1717+ fprintf(stderr, "call %s arg %d pid=%d\n",
1718+ tab_opengl_calls_name[func_number], i, pid);
1719+ fprintf(stderr, "args[i] != 0 && args_size[i] == 0 !!\n");
1720+ disconnect_current();
1721+ return 0;
1722+ }
1723+ if (args[i]) {
1724+ args[i] =
1725+ (arg_t) get_host_read_pointer(env, args[i],
1726+ args_size[i]);
1727+ if (args[i] == 0) {
1728+ fprintf(stderr, "call %s arg %d pid=%d\n",
1729+ tab_opengl_calls_name[func_number], i, pid);
1730+ fprintf(stderr, "can not get %d bytes\n",
1731+ args_size[i]);
1732+ disconnect_current();
1733+ return 0;
1734+ }
1735+ }
1736+#ifdef ENABLE_GL_LOG
1737+ if (is_logging(pid))
1738+ write_gl_debug_cmd_buffer_with_size(args_size[i],
1739+ (void *) args[i]);
1740+#endif
1741+ break;
1742+
1743+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
1744+ {
1745+ args_size[i] =
1746+ compute_arg_length(stderr, func_number, i, args);
1747+ args[i] = (args_size[i]) ? (arg_t)
1748+ get_host_read_pointer(env,
1749+ args[i], args_size [i]) : 0;
1750+ if (args[i] == 0 && args_size[i] != 0) {
1751+ fprintf(stderr, "call %s arg %d pid=%d\n",
1752+ tab_opengl_calls_name[func_number], i, pid);
1753+ fprintf(stderr, "can not get %d bytes\n",
1754+ args_size[i]);
1755+ disconnect_current();
1756+ return 0;
1757+ }
1758+#ifdef ENABLE_GL_LOG
1759+ if (is_logging(pid))
1760+ write_gl_debug_cmd_buffer_without_size(args_size[i],
1761+ (void *) args[i]);
1762+#endif
1763+ break;
1764+ }
1765+
1766+ CASE_OUT_POINTERS:
1767+ {
1768+ int mem_state;
1769+
1770+#ifdef ENABLE_GL_LOG
1771+ if (is_logging(pid))
1772+ switch (args_type[i]) {
1773+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
1774+ write_gl_debug_cmd_int(args_size[i]);
1775+ break;
1776+
1777+ default:
1778+ break;
1779+ }
1780+#endif
1781+
1782+ if (func_number == glXQueryExtension_func && args[i] == 0) {
1783+ saved_out_ptr[i] = 0;
1784+ continue;
1785+ }
1786+ if (args[i] == 0 && args_size[i] == 0) {
1787+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
1788+ fprintf(stderr, "call %s arg %d pid=%d\n",
1789+ tab_opengl_calls_name[func_number], i,
1790+ pid);
1791+ disconnect_current();
1792+ return 0;
1793+ }
1794+ fprintf(stderr, "call %s arg %d pid=%d\n",
1795+ tab_opengl_calls_name[func_number], i, pid);
1796+ disconnect_current();
1797+ return 0;
1798+ } else if (args[i] == 0 && args_size[i] != 0) {
1799+ fprintf(stderr, "call %s arg %d pid=%d\n",
1800+ tab_opengl_calls_name[func_number], i, pid);
1801+ fprintf(stderr,
1802+ "args[i] == 0 && args_size[i] != 0 !!\n");
1803+ disconnect_current();
1804+ return 0;
1805+ } else if (args[i] != 0 && args_size[i] == 0) {
1806+ fprintf(stderr, "call %s arg %d pid=%d\n",
1807+ tab_opengl_calls_name[func_number], i, pid);
1808+ fprintf(stderr,
1809+ "args[i] != 0 && args_size[i] == 0 !!\n");
1810+ disconnect_current();
1811+ return 0;
1812+ }
1813+ if (args[i]) {
1814+ mem_state =
1815+ get_target_mem_state(env, args[i], args_size[i]);
1816+ if (mem_state == NOT_MAPPED) {
1817+ fprintf(stderr,
1818+ "call %s arg %d pid=%d addr="
1819+ TARGET_FMT_lx " size=%d NOT_MAPPED\n",
1820+ tab_opengl_calls_name[func_number], i,
1821+ pid, args[i], args_size[i]);
1822+ disconnect_current();
1823+ return 0;
1824+ } else if (mem_state == MAPPED_CONTIGUOUS) {
1825+ saved_out_ptr[i] = 0;
1826+ args[i] = (arg_t) get_phys_mem_addr(env, args[i]);
1827+ } else {
1828+ saved_out_ptr[i] = args[i];
1829+ args[i] = (arg_t) malloc(args_size[i]);
1830+ }
1831+ } else {
1832+ saved_out_ptr[i] = 0;
1833+ }
1834+ break;
1835+ }
1836+
1837+ case TYPE_DOUBLE:
1838+ CASE_IN_KNOWN_SIZE_POINTERS:
1839+ if (args[i] == 0) {
1840+ fprintf(stderr, "call %s arg %d pid=%d\n",
1841+ tab_opengl_calls_name[func_number], i, pid);
1842+ fprintf(stderr, "can not get %d bytes\n",
1843+ tab_args_type_length[args_type[i]]);
1844+ disconnect_current();
1845+ return 0;
1846+ }
1847+ args[i] = (arg_t) get_host_read_pointer(env,
1848+ args[i], tab_args_type_length[args_type[i]]);
1849+ if (args[i] == 0) {
1850+ fprintf(stderr, "call %s arg %d pid=%d\n",
1851+ tab_opengl_calls_name[func_number], i, pid);
1852+ fprintf(stderr, "can not get %d bytes\n",
1853+ tab_args_type_length[args_type[i]]);
1854+ disconnect_current();
1855+ return 0;
1856+ }
1857+#ifdef ENABLE_GL_LOG
1858+ if (is_logging(pid))
1859+ write_gl_debug_cmd_buffer_without_size
1860+ (tab_args_type_length[args_type[i]],
1861+ (void *) args[i]);
1862+#endif
1863+ break;
1864+
1865+ case TYPE_IN_IGNORED_POINTER:
1866+ args[i] = 0;
1867+ break;
1868+
1869+ default:
1870+ fprintf(stderr, "shouldn't happen : call %s arg %d pid=%d\n",
1871+ tab_opengl_calls_name[func_number], i, pid);
1872+ disconnect_current();
1873+ return 0;
1874+ }
1875+ }
1876+
1877+ if (ret_type == TYPE_CONST_CHAR) {
1878+ ret_string[0] = 0;
1879+ }
1880+
1881+ if (func_number == _init32_func || func_number == _init64_func) {
1882+ if (func_number == _init32_func) {
1883+ if (wordsize != 32) {
1884+ fprintf(stderr,
1885+ "clients with different ABIs not supported\n");
1886+ exit(-1);
1887+ }
1888+ } else {
1889+ if (wordsize != 64) {
1890+ fprintf(stderr,
1891+ "clients with different ABIs not supported\n");
1892+ exit(-1);
1893+ }
1894+ }
1895+
1896+ if (must_save && args[0])
1897+ fprintf(stderr, "error: pid %i is already recording\n",
1898+ logger_pid);
1899+ else if (args[0]) {
1900+ logger_pid = pid;
1901+ must_save = 1;
1902+ }
1903+#ifdef USE_KQEMU
1904+ if (env->kqemu_enabled)
1905+ *(int *) args[1] = 2;
1906+ else
1907+#endif
1908+ *(int *) args[1] = 1;
1909+ ret = 0;
1910+ } else {
1911+ ret = do_function_call(func_number, args, ret_string);
1912+ }
1913+#ifdef ENABLE_GL_LOG
1914+ if (is_logging(pid) && func_number == glXGetVisualFromFBConfig_func)
1915+ write_gl_debug_cmd_int(ret);
1916+#endif
1917+ for (i = 0; i < nb_args; i++) {
1918+ switch (args_type[i]) {
1919+ CASE_OUT_POINTERS:
1920+ {
1921+ if (saved_out_ptr[i]) {
1922+ if (memcpy_host_to_target(env, saved_out_ptr[i],
1923+ (void *) args[i],
1924+ args_size[i]) == 0) {
1925+ fprintf(stderr, "could not copy out parameters "
1926+ "back to user space\n");
1927+ disconnect_current();
1928+ return 0;
1929+ }
1930+ free((void *) args[i]);
1931+ }
1932+ break;
1933+ }
1934+
1935+ default:
1936+ break;
1937+ }
1938+ }
1939+
1940+ if (ret_type == TYPE_CONST_CHAR)
1941+ if (target_ret_string) {
1942+ /* the my_strlen stuff is a hack to workaround a GCC bug if
1943+ * using directly strlen... */
1944+ if (memcpy_host_to_target(env, target_ret_string, ret_string,
1945+ my_strlen(ret_string) + 1) == 0) {
1946+ fprintf(stderr, "cannot copy out parameters "
1947+ "back to user space\n");
1948+ disconnect_current();
1949+ return 0;
1950+ }
1951+ }
1952+ }
1953+
1954+#ifdef ENABLE_GL_LOG
1955+ if (is_logging(pid) && func_number == _exit_process_func) {
1956+ write_gl_debug_end();
1957+ }
1958+#endif
1959+
1960+ return ret;
1961+}
1962+
1963+static int decode_call(CPUState *env, int func_number, int pid,
1964+ target_ulong target_ret_string, target_ulong in_args,
1965+ target_ulong in_args_size)
1966+{
1967+ if (!(func_number >= 0 && func_number < GL_N_CALLS)) {
1968+ fprintf(stderr,
1969+ "func_number >= 0 && func_number < GL_N_CALLS failed\n");
1970+ return 0;
1971+ }
1972+
1973+ return decode_call_int(env, func_number, pid,
1974+ target_ret_string, in_args, in_args_size);
1975+}
1976+
1977+#define env first_cpu
1978+
1979+void helper_opengl(void)
1980+{
1981+ doing_opengl = 1;
1982+ env->regs[R_EAX] =
1983+ decode_call(env, env->regs[R_EAX], env->regs[R_EBX], env->regs[R_ECX],
1984+ env->regs[R_EDX], env->regs[R_ESI]);
1985+ doing_opengl = 0;
1986+}
1987+
1988+void mem_opengl(uint64_t ptr)
1989+{
1990+ uint64_t *params = get_phys_mem_addr(env, ptr);
1991+ int ret;
1992+
1993+ /* Execute */
1994+ doing_opengl = 1;
1995+ ret = decode_call(env, le64_to_cpu(params[0]),
1996+ le64_to_cpu(params[1]), le64_to_cpu(params[2]),
1997+ le64_to_cpu(params[3]), le64_to_cpu(params[4]));
1998+ doing_opengl = 0;
1999+
2000+ params[0] = cpu_to_le64(ret);
2001+ params[5] = 0;
2002+}
2003+
2004+#define THREADINFO_TASK_OFFSET 0x0 //// 0x0
2005+#define THREADSTRUCT_IOPL_OFFSET 0x78 //// 0x80
2006+#define TASKSTRUCT_NEXT_OFFSET 0x1a0 //// 0x1e8
2007+#define TASKSTRUCT_PREV_OFFSET 0x1a4 //// 0x1ec
2008+#define TASKSTRUCT_RCRED_OFFSET 0x29c //// 0x2b4
2009+#define TASKSTRUCT_CRED_OFFSET 0x2a0 //// 0x2b8
2010+#define TASKSTRUCT_COMM_OFFSET 0x2c0 //// 0x2fc
2011+#define TASKSTRUCT_THREAD_OFFSET 0x2e4 //// 0x318
2012+#define TASKSTRUCT_IO_CTX_OFFSET 0x40c //// 0x428
2013+#define CRED_CAPINH_OFFSET 0x28
2014+#define CRED_CAPPER_OFFSET 0x30
2015+#define CRED_CAPEFF_OFFSET 0x38
2016+#define CRED_CAPBST_OFFSET 0x40
2017+/* How to obtain the numbers:
2018+ * $ gbd vmlinux
2019+ * ...
2020+ * (gdb) print &((struct task_struct *) 0)->real_cred
2021+ * $22 = (const struct cred **) 0x29c
2022+ * (gdb) print &((struct task_struct *) 0)->cred
2023+ * $23 = (const struct cred **) 0x2a0
2024+ * (gbd) ...
2025+ * ...
2026+ * (gdb) ^D
2027+ * $ vim target-i386/helper_opengl.c
2028+ * ...
2029+ * :wq
2030+ * $ make
2031+ * ...
2032+ *
2033+ * Testing:
2034+ * $ x86_64-softmmu/qemu-system-x86_64 -s -hda ...
2035+ * ^Z
2036+ * [1]+ Stopped x86_64-softmmu/qemu-system-x86_64 -s -hda ...
2037+ * $ bg
2038+ * [1]+ x86_64-softmmu/qemu-system-x86_64 -s -hda ...
2039+ * $ gdb
2040+ * ...
2041+ * (gdb) target remote localhost:1234
2042+ * ...
2043+ * (gdb) print ((char *) *(unsigned int *) ((unsigned int) $rsp & ~8191)) +
2044+ * 0x2c0
2045+ * $9 = 0xc094062c "swapper"
2046+ * (gdb) print (char *) (*(unsigned int *) (((char *) *(unsigned int *)
2047+ * ((unsigned int) $rsp & ~8191)) + 0x1a0) - 0x1a0) + 0x2c0
2048+ * $10 = 0xdf87cee0 "init"
2049+ * ...
2050+ */
2051+
2052+#define CAP_SYS_RAWIO 17
2053+
2054+#define THREAD_SIZE (TARGET_PAGE_SIZE << 1)
2055+static ram_addr_t x86_current_thread(void)
2056+{
2057+ return env->regs[R_ESP] & ~(THREAD_SIZE - 1);
2058+}
2059+
2060+static ram_addr_t x86_current_task(void)
2061+{
2062+ return *(uint32_t *) get_phys_mem_addr(env,
2063+ x86_current_thread() + THREADINFO_TASK_OFFSET);
2064+}
2065+
2066+static ram_addr_t x86_current_io_ctx(void)
2067+{
2068+ return *(uint32_t *) get_phys_mem_addr(env,
2069+ x86_current_task() + TASKSTRUCT_IO_CTX_OFFSET);
2070+}
2071+
2072+static ram_addr_t x86_task_name(ram_addr_t proc)
2073+{
2074+ return x86_current_task() + TASKSTRUCT_COMM_OFFSET;
2075+}
2076+
2077+static ram_addr_t x86_task_next(ram_addr_t proc)
2078+{
2079+ return *(uint32_t *) get_phys_mem_addr(env,
2080+ x86_current_task() + TASKSTRUCT_NEXT_OFFSET) -
2081+ TASKSTRUCT_NEXT_OFFSET;
2082+}
2083+
2084+static void x86_cap_set(ram_addr_t caps, int cap)
2085+{
2086+ int offset = cap >> 5;
2087+ int mask = 1 << (cap & 31);
2088+
2089+ *(uint32_t *) get_phys_mem_addr(env, caps + offset) |= mask;
2090+}
2091+
2092+static void x86_cred_cap_set(ram_addr_t creds, int cap)
2093+{
2094+ x86_cap_set(creds + CRED_CAPINH_OFFSET, cap);
2095+ x86_cap_set(creds + CRED_CAPPER_OFFSET, cap);
2096+ x86_cap_set(creds + CRED_CAPEFF_OFFSET, cap);
2097+ x86_cap_set(creds + CRED_CAPBST_OFFSET, cap);
2098+}
2099+
2100+static void x86_task_cap_set(ram_addr_t proc, int cap)
2101+{
2102+ x86_cred_cap_set(*(uint32_t *) get_phys_mem_addr(env,
2103+ proc + TASKSTRUCT_RCRED_OFFSET), cap);
2104+ x86_cred_cap_set(*(uint32_t *) get_phys_mem_addr(env,
2105+ proc + TASKSTRUCT_CRED_OFFSET), cap);
2106+}
2107+
2108+#include "kvm.h"
2109+
2110+/* The putting and getting of the register set seems to incure a too
2111+ * high overhead. It's at least 4 ioctl's each. */
2112+#if 0
2113+static void opengl_ioport_write(void *data, uint32_t addr, uint32_t val)
2114+{
2115+ /* Ignore the first outb after iopl which is emulated by the kernel. */
2116+ if (val == (uint8_t) -1)
2117+ return;
2118+
2119+ if (kvm_enabled())
2120+ kvm_arch_get_registers(env);
2121+ doing_opengl = 1;
2122+ env->regs[R_EAX] =
2123+ decode_call(env, env->regs[R_EAX], env->regs[R_EBX], env->regs[R_ECX],
2124+ env->regs[R_ESI], env->regs[R_EDI]);
2125+ doing_opengl = 0;
2126+ if (kvm_enabled())
2127+ kvm_arch_put_registers(env);
2128+}
2129+#else
2130+static void get_regs(void)
2131+{
2132+ /* We only really need the eflags and cr[0..4] */
2133+ if (kvm_enabled())
2134+ kvm_get_sregs(env);
2135+}
2136+
2137+static void opengl_ioport_write(void *data, uint32_t addr, uint32_t val)
2138+{
2139+ uint64_t *params;
2140+ int ret;
2141+
2142+ /* Only need to fetch the registers after a guest's context switch...
2143+ * the problem is, to find out about context switches we already need
2144+ * to fetch rsp
2145+ * TODO: pass the pid in val. the params pointer doesn't need to be
2146+ * passed on all calls because it can be a global and be constant.
2147+ */
2148+ get_regs();
2149+
2150+ params = get_phys_mem_addr(env, (target_ulong) val);
2151+
2152+ /* Execute */
2153+ doing_opengl = 1;
2154+ ret = decode_call(env, le64_to_cpu(params[0]),
2155+ le64_to_cpu(params[1]), le64_to_cpu(params[2]),
2156+ le64_to_cpu(params[3]), le64_to_cpu(params[4]));
2157+ doing_opengl = 0;
2158+
2159+ params[0] = cpu_to_le64(ret);
2160+ params[5] = 0;
2161+}
2162+#endif
2163+
2164+static void opengl_ioport_write_first(void *data, uint32_t addr, uint32_t val)
2165+{
2166+ if (val != (uint32_t) -1)
2167+ return;
2168+
2169+ /* Ignore the first outb after iopl which is emulated by the kernel. */
2170+
2171+ register_ioport_write(9996, 4, 4, opengl_ioport_write, (void *) 1);
2172+}
2173+
2174+void io_register(void)
2175+{
2176+ register_ioport_write(9996, 4, 4, opengl_ioport_write_first, (void *) 1);
2177+}
2178+
2179+void opengl_process_enable(void)
2180+{
2181+ ram_addr_t task;
2182+ char *name;
2183+ int newlevel = 3;
2184+ uint32_t iopl = newlevel << 12;
2185+ void *ioplptr;
2186+
2187+ if (kvm_enabled())
2188+ kvm_arch_get_registers(env);
2189+ allow_kernel = 1;
2190+
2191+ task = x86_current_task();
2192+ x86_task_cap_set(task, CAP_SYS_RAWIO);
2193+ name = get_phys_mem_addr(env, x86_task_name(task));
2194+
2195+ ioplptr = get_phys_mem_addr(env, task +
2196+ TASKSTRUCT_THREAD_OFFSET + THREADSTRUCT_IOPL_OFFSET);
2197+ ((uint32_t *) ioplptr)[0] = cpu_to_le32(iopl);
2198+
2199+ env->eflags &= ~0x3000;
2200+ env->eflags |= newlevel << 12;
2201+
2202+ allow_kernel = 0;
2203+ if (kvm_enabled())
2204+ kvm_arch_put_registers(env);
2205+
2206+ printf("Granted OpenGL access to process '%s'\n", name);
2207+
2208+ io_register();
2209+}
2210+#endif
2211Index: qemu-0.12.4/target-i386/kvm.c
2212===================================================================
2213--- qemu-0.12.4.orig/target-i386/kvm.c
2214+++ qemu-0.12.4/target-i386/kvm.c
2215@@ -529,7 +529,7 @@ static int kvm_get_fpu(CPUState *env)
2216 return 0;
2217 }
2218
2219-static int kvm_get_sregs(CPUState *env)
2220+int kvm_get_sregs(CPUState *env)
2221 {
2222 struct kvm_sregs sregs;
2223 uint32_t hflags;
2224Index: qemu-0.12.4/target-i386/mesa_enums.c
2225===================================================================
2226--- /dev/null
2227+++ qemu-0.12.4/target-i386/mesa_enums.c
2228@@ -0,0 +1,4890 @@
2229+/* DO NOT EDIT - This file generated automatically by gl_enums.py (from Mesa) script */
2230+
2231+/*
2232+ * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
2233+ * All Rights Reserved.
2234+ *
2235+ * Permission is hereby granted, free of charge, to any person obtaining a
2236+ * copy of this software and associated documentation files (the "Software"),
2237+ * to deal in the Software without restriction, including without limitation
2238+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
2239+ * and/or sell copies of the Software, and to permit persons to whom the
2240+ * Software is furnished to do so, subject to the following conditions:
2241+ *
2242+ * The above copyright notice and this permission notice (including the next
2243+ * paragraph) shall be included in all copies or substantial portions of the
2244+ * Software.
2245+ *
2246+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2247+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2248+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
2249+ * BRIAN PAUL,
2250+ * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
2251+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
2252+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2253+ * SOFTWARE.
2254+ */
2255+
2256+#include "glheader.h"
2257+#include "enums.h"
2258+#include "imports.h"
2259+
2260+typedef struct {
2261+ size_t offset;
2262+ int n;
2263+} enum_elt;
2264+
2265+LONGSTRING static const char enum_string_table[] =
2266+ "GL_2D\0"
2267+ "GL_2_BYTES\0"
2268+ "GL_3D\0"
2269+ "GL_3D_COLOR\0"
2270+ "GL_3D_COLOR_TEXTURE\0"
2271+ "GL_3_BYTES\0"
2272+ "GL_4D_COLOR_TEXTURE\0"
2273+ "GL_4_BYTES\0"
2274+ "GL_ACCUM\0"
2275+ "GL_ACCUM_ALPHA_BITS\0"
2276+ "GL_ACCUM_BLUE_BITS\0"
2277+ "GL_ACCUM_BUFFER_BIT\0"
2278+ "GL_ACCUM_CLEAR_VALUE\0"
2279+ "GL_ACCUM_GREEN_BITS\0"
2280+ "GL_ACCUM_RED_BITS\0"
2281+ "GL_ACTIVE_ATTRIBUTES\0"
2282+ "GL_ACTIVE_ATTRIBUTE_MAX_LENGTH\0"
2283+ "GL_ACTIVE_STENCIL_FACE_EXT\0"
2284+ "GL_ACTIVE_TEXTURE\0"
2285+ "GL_ACTIVE_TEXTURE_ARB\0"
2286+ "GL_ACTIVE_UNIFORMS\0"
2287+ "GL_ACTIVE_UNIFORM_MAX_LENGTH\0"
2288+ "GL_ACTIVE_VERTEX_UNITS_ARB\0"
2289+ "GL_ADD\0"
2290+ "GL_ADD_SIGNED\0"
2291+ "GL_ADD_SIGNED_ARB\0"
2292+ "GL_ADD_SIGNED_EXT\0"
2293+ "GL_ALIASED_LINE_WIDTH_RANGE\0"
2294+ "GL_ALIASED_POINT_SIZE_RANGE\0"
2295+ "GL_ALL_ATTRIB_BITS\0"
2296+ "GL_ALL_CLIENT_ATTRIB_BITS\0"
2297+ "GL_ALPHA\0"
2298+ "GL_ALPHA12\0"
2299+ "GL_ALPHA12_EXT\0"
2300+ "GL_ALPHA16\0"
2301+ "GL_ALPHA16_EXT\0"
2302+ "GL_ALPHA4\0"
2303+ "GL_ALPHA4_EXT\0"
2304+ "GL_ALPHA8\0"
2305+ "GL_ALPHA8_EXT\0"
2306+ "GL_ALPHA_BIAS\0"
2307+ "GL_ALPHA_BITS\0"
2308+ "GL_ALPHA_SCALE\0"
2309+ "GL_ALPHA_TEST\0"
2310+ "GL_ALPHA_TEST_FUNC\0"
2311+ "GL_ALPHA_TEST_REF\0"
2312+ "GL_ALWAYS\0"
2313+ "GL_AMBIENT\0"
2314+ "GL_AMBIENT_AND_DIFFUSE\0"
2315+ "GL_AND\0"
2316+ "GL_AND_INVERTED\0"
2317+ "GL_AND_REVERSE\0"
2318+ "GL_ARRAY_BUFFER\0"
2319+ "GL_ARRAY_BUFFER_ARB\0"
2320+ "GL_ARRAY_BUFFER_BINDING\0"
2321+ "GL_ARRAY_BUFFER_BINDING_ARB\0"
2322+ "GL_ATTACHED_SHADERS\0"
2323+ "GL_ATTRIB_ARRAY_POINTER_NV\0"
2324+ "GL_ATTRIB_ARRAY_SIZE_NV\0"
2325+ "GL_ATTRIB_ARRAY_STRIDE_NV\0"
2326+ "GL_ATTRIB_ARRAY_TYPE_NV\0"
2327+ "GL_ATTRIB_STACK_DEPTH\0"
2328+ "GL_AUTO_NORMAL\0"
2329+ "GL_AUX0\0"
2330+ "GL_AUX1\0"
2331+ "GL_AUX2\0"
2332+ "GL_AUX3\0"
2333+ "GL_AUX_BUFFERS\0"
2334+ "GL_BACK\0"
2335+ "GL_BACK_LEFT\0"
2336+ "GL_BACK_RIGHT\0"
2337+ "GL_BGR\0"
2338+ "GL_BGRA\0"
2339+ "GL_BITMAP\0"
2340+ "GL_BITMAP_TOKEN\0"
2341+ "GL_BLEND\0"
2342+ "GL_BLEND_COLOR\0"
2343+ "GL_BLEND_COLOR_EXT\0"
2344+ "GL_BLEND_DST\0"
2345+ "GL_BLEND_DST_ALPHA\0"
2346+ "GL_BLEND_DST_RGB\0"
2347+ "GL_BLEND_EQUATION\0"
2348+ "GL_BLEND_EQUATION_ALPHA\0"
2349+ "GL_BLEND_EQUATION_ALPHA_EXT\0"
2350+ "GL_BLEND_EQUATION_EXT\0"
2351+ "GL_BLEND_EQUATION_RGB_EXT\0"
2352+ "GL_BLEND_SRC\0"
2353+ "GL_BLEND_SRC_ALPHA\0"
2354+ "GL_BLEND_SRC_RGB\0"
2355+ "GL_BLUE\0"
2356+ "GL_BLUE_BIAS\0"
2357+ "GL_BLUE_BITS\0"
2358+ "GL_BLUE_SCALE\0"
2359+ "GL_BOOL\0"
2360+ "GL_BOOL_ARB\0"
2361+ "GL_BOOL_VEC2\0"
2362+ "GL_BOOL_VEC2_ARB\0"
2363+ "GL_BOOL_VEC3\0"
2364+ "GL_BOOL_VEC3_ARB\0"
2365+ "GL_BOOL_VEC4\0"
2366+ "GL_BOOL_VEC4_ARB\0"
2367+ "GL_BUFFER_ACCESS\0"
2368+ "GL_BUFFER_ACCESS_ARB\0"
2369+ "GL_BUFFER_MAPPED\0"
2370+ "GL_BUFFER_MAPPED_ARB\0"
2371+ "GL_BUFFER_MAP_POINTER\0"
2372+ "GL_BUFFER_MAP_POINTER_ARB\0"
2373+ "GL_BUFFER_SIZE\0"
2374+ "GL_BUFFER_SIZE_ARB\0"
2375+ "GL_BUFFER_USAGE\0"
2376+ "GL_BUFFER_USAGE_ARB\0"
2377+ "GL_BYTE\0"
2378+ "GL_C3F_V3F\0"
2379+ "GL_C4F_N3F_V3F\0"
2380+ "GL_C4UB_V2F\0"
2381+ "GL_C4UB_V3F\0"
2382+ "GL_CCW\0"
2383+ "GL_CLAMP\0"
2384+ "GL_CLAMP_TO_BORDER\0"
2385+ "GL_CLAMP_TO_BORDER_ARB\0"
2386+ "GL_CLAMP_TO_BORDER_SGIS\0"
2387+ "GL_CLAMP_TO_EDGE\0"
2388+ "GL_CLAMP_TO_EDGE_SGIS\0"
2389+ "GL_CLEAR\0"
2390+ "GL_CLIENT_ACTIVE_TEXTURE\0"
2391+ "GL_CLIENT_ACTIVE_TEXTURE_ARB\0"
2392+ "GL_CLIENT_ALL_ATTRIB_BITS\0"
2393+ "GL_CLIENT_ATTRIB_STACK_DEPTH\0"
2394+ "GL_CLIENT_PIXEL_STORE_BIT\0"
2395+ "GL_CLIENT_VERTEX_ARRAY_BIT\0"
2396+ "GL_CLIP_PLANE0\0"
2397+ "GL_CLIP_PLANE1\0"
2398+ "GL_CLIP_PLANE2\0"
2399+ "GL_CLIP_PLANE3\0"
2400+ "GL_CLIP_PLANE4\0"
2401+ "GL_CLIP_PLANE5\0"
2402+ "GL_CLIP_VOLUME_CLIPPING_HINT_EXT\0"
2403+ "GL_COEFF\0"
2404+ "GL_COLOR\0"
2405+ "GL_COLOR_ARRAY\0"
2406+ "GL_COLOR_ARRAY_BUFFER_BINDING\0"
2407+ "GL_COLOR_ARRAY_BUFFER_BINDING_ARB\0"
2408+ "GL_COLOR_ARRAY_POINTER\0"
2409+ "GL_COLOR_ARRAY_SIZE\0"
2410+ "GL_COLOR_ARRAY_STRIDE\0"
2411+ "GL_COLOR_ARRAY_TYPE\0"
2412+ "GL_COLOR_ATTACHMENT0_EXT\0"
2413+ "GL_COLOR_ATTACHMENT10_EXT\0"
2414+ "GL_COLOR_ATTACHMENT11_EXT\0"
2415+ "GL_COLOR_ATTACHMENT12_EXT\0"
2416+ "GL_COLOR_ATTACHMENT13_EXT\0"
2417+ "GL_COLOR_ATTACHMENT14_EXT\0"
2418+ "GL_COLOR_ATTACHMENT15_EXT\0"
2419+ "GL_COLOR_ATTACHMENT1_EXT\0"
2420+ "GL_COLOR_ATTACHMENT2_EXT\0"
2421+ "GL_COLOR_ATTACHMENT3_EXT\0"
2422+ "GL_COLOR_ATTACHMENT4_EXT\0"
2423+ "GL_COLOR_ATTACHMENT5_EXT\0"
2424+ "GL_COLOR_ATTACHMENT6_EXT\0"
2425+ "GL_COLOR_ATTACHMENT7_EXT\0"
2426+ "GL_COLOR_ATTACHMENT8_EXT\0"
2427+ "GL_COLOR_ATTACHMENT9_EXT\0"
2428+ "GL_COLOR_BUFFER_BIT\0"
2429+ "GL_COLOR_CLEAR_VALUE\0"
2430+ "GL_COLOR_INDEX\0"
2431+ "GL_COLOR_INDEXES\0"
2432+ "GL_COLOR_LOGIC_OP\0"
2433+ "GL_COLOR_MATERIAL\0"
2434+ "GL_COLOR_MATERIAL_FACE\0"
2435+ "GL_COLOR_MATERIAL_PARAMETER\0"
2436+ "GL_COLOR_MATRIX\0"
2437+ "GL_COLOR_MATRIX_SGI\0"
2438+ "GL_COLOR_MATRIX_STACK_DEPTH\0"
2439+ "GL_COLOR_MATRIX_STACK_DEPTH_SGI\0"
2440+ "GL_COLOR_SUM\0"
2441+ "GL_COLOR_SUM_ARB\0"
2442+ "GL_COLOR_TABLE\0"
2443+ "GL_COLOR_TABLE_ALPHA_SIZE\0"
2444+ "GL_COLOR_TABLE_ALPHA_SIZE_EXT\0"
2445+ "GL_COLOR_TABLE_ALPHA_SIZE_SGI\0"
2446+ "GL_COLOR_TABLE_BIAS\0"
2447+ "GL_COLOR_TABLE_BIAS_SGI\0"
2448+ "GL_COLOR_TABLE_BLUE_SIZE\0"
2449+ "GL_COLOR_TABLE_BLUE_SIZE_EXT\0"
2450+ "GL_COLOR_TABLE_BLUE_SIZE_SGI\0"
2451+ "GL_COLOR_TABLE_FORMAT\0"
2452+ "GL_COLOR_TABLE_FORMAT_EXT\0"
2453+ "GL_COLOR_TABLE_FORMAT_SGI\0"
2454+ "GL_COLOR_TABLE_GREEN_SIZE\0"
2455+ "GL_COLOR_TABLE_GREEN_SIZE_EXT\0"
2456+ "GL_COLOR_TABLE_GREEN_SIZE_SGI\0"
2457+ "GL_COLOR_TABLE_INTENSITY_SIZE\0"
2458+ "GL_COLOR_TABLE_INTENSITY_SIZE_EXT\0"
2459+ "GL_COLOR_TABLE_INTENSITY_SIZE_SGI\0"
2460+ "GL_COLOR_TABLE_LUMINANCE_SIZE\0"
2461+ "GL_COLOR_TABLE_LUMINANCE_SIZE_EXT\0"
2462+ "GL_COLOR_TABLE_LUMINANCE_SIZE_SGI\0"
2463+ "GL_COLOR_TABLE_RED_SIZE\0"
2464+ "GL_COLOR_TABLE_RED_SIZE_EXT\0"
2465+ "GL_COLOR_TABLE_RED_SIZE_SGI\0"
2466+ "GL_COLOR_TABLE_SCALE\0"
2467+ "GL_COLOR_TABLE_SCALE_SGI\0"
2468+ "GL_COLOR_TABLE_WIDTH\0"
2469+ "GL_COLOR_TABLE_WIDTH_EXT\0"
2470+ "GL_COLOR_TABLE_WIDTH_SGI\0"
2471+ "GL_COLOR_WRITEMASK\0"
2472+ "GL_COMBINE\0"
2473+ "GL_COMBINE4\0"
2474+ "GL_COMBINE_ALPHA\0"
2475+ "GL_COMBINE_ALPHA_ARB\0"
2476+ "GL_COMBINE_ALPHA_EXT\0"
2477+ "GL_COMBINE_ARB\0"
2478+ "GL_COMBINE_EXT\0"
2479+ "GL_COMBINE_RGB\0"
2480+ "GL_COMBINE_RGB_ARB\0"
2481+ "GL_COMBINE_RGB_EXT\0"
2482+ "GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT\0"
2483+ "GL_COMPARE_R_TO_TEXTURE\0"
2484+ "GL_COMPARE_R_TO_TEXTURE_ARB\0"
2485+ "GL_COMPILE\0"
2486+ "GL_COMPILE_AND_EXECUTE\0"
2487+ "GL_COMPILE_STATUS\0"
2488+ "GL_COMPRESSED_ALPHA\0"
2489+ "GL_COMPRESSED_ALPHA_ARB\0"
2490+ "GL_COMPRESSED_INTENSITY\0"
2491+ "GL_COMPRESSED_INTENSITY_ARB\0"
2492+ "GL_COMPRESSED_LUMINANCE\0"
2493+ "GL_COMPRESSED_LUMINANCE_ALPHA\0"
2494+ "GL_COMPRESSED_LUMINANCE_ALPHA_ARB\0"
2495+ "GL_COMPRESSED_LUMINANCE_ARB\0"
2496+ "GL_COMPRESSED_RGB\0"
2497+ "GL_COMPRESSED_RGBA\0"
2498+ "GL_COMPRESSED_RGBA_ARB\0"
2499+ "GL_COMPRESSED_RGBA_FXT1_3DFX\0"
2500+ "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT\0"
2501+ "GL_COMPRESSED_RGBA_S3TC_DXT3_EXT\0"
2502+ "GL_COMPRESSED_RGBA_S3TC_DXT5_EXT\0"
2503+ "GL_COMPRESSED_RGB_ARB\0"
2504+ "GL_COMPRESSED_RGB_FXT1_3DFX\0"
2505+ "GL_COMPRESSED_RGB_S3TC_DXT1_EXT\0"
2506+ "GL_COMPRESSED_TEXTURE_FORMATS\0"
2507+ "GL_CONSTANT\0"
2508+ "GL_CONSTANT_ALPHA\0"
2509+ "GL_CONSTANT_ALPHA_EXT\0"
2510+ "GL_CONSTANT_ARB\0"
2511+ "GL_CONSTANT_ATTENUATION\0"
2512+ "GL_CONSTANT_BORDER_HP\0"
2513+ "GL_CONSTANT_COLOR\0"
2514+ "GL_CONSTANT_COLOR_EXT\0"
2515+ "GL_CONSTANT_EXT\0"
2516+ "GL_CONVOLUTION_1D\0"
2517+ "GL_CONVOLUTION_2D\0"
2518+ "GL_CONVOLUTION_BORDER_COLOR\0"
2519+ "GL_CONVOLUTION_BORDER_COLOR_HP\0"
2520+ "GL_CONVOLUTION_BORDER_MODE\0"
2521+ "GL_CONVOLUTION_BORDER_MODE_EXT\0"
2522+ "GL_CONVOLUTION_FILTER_BIAS\0"
2523+ "GL_CONVOLUTION_FILTER_BIAS_EXT\0"
2524+ "GL_CONVOLUTION_FILTER_SCALE\0"
2525+ "GL_CONVOLUTION_FILTER_SCALE_EXT\0"
2526+ "GL_CONVOLUTION_FORMAT\0"
2527+ "GL_CONVOLUTION_FORMAT_EXT\0"
2528+ "GL_CONVOLUTION_HEIGHT\0"
2529+ "GL_CONVOLUTION_HEIGHT_EXT\0"
2530+ "GL_CONVOLUTION_WIDTH\0"
2531+ "GL_CONVOLUTION_WIDTH_EXT\0"
2532+ "GL_COORD_REPLACE\0"
2533+ "GL_COORD_REPLACE_ARB\0"
2534+ "GL_COORD_REPLACE_NV\0"
2535+ "GL_COPY\0"
2536+ "GL_COPY_INVERTED\0"
2537+ "GL_COPY_PIXEL_TOKEN\0"
2538+ "GL_CULL_FACE\0"
2539+ "GL_CULL_FACE_MODE\0"
2540+ "GL_CULL_VERTEX_EXT\0"
2541+ "GL_CULL_VERTEX_EYE_POSITION_EXT\0"
2542+ "GL_CULL_VERTEX_OBJECT_POSITION_EXT\0"
2543+ "GL_CURRENT_ATTRIB_NV\0"
2544+ "GL_CURRENT_BIT\0"
2545+ "GL_CURRENT_COLOR\0"
2546+ "GL_CURRENT_FOG_COORD\0"
2547+ "GL_CURRENT_FOG_COORDINATE\0"
2548+ "GL_CURRENT_INDEX\0"
2549+ "GL_CURRENT_MATRIX_ARB\0"
2550+ "GL_CURRENT_MATRIX_INDEX_ARB\0"
2551+ "GL_CURRENT_MATRIX_NV\0"
2552+ "GL_CURRENT_MATRIX_STACK_DEPTH_ARB\0"
2553+ "GL_CURRENT_MATRIX_STACK_DEPTH_NV\0"
2554+ "GL_CURRENT_NORMAL\0"
2555+ "GL_CURRENT_PALETTE_MATRIX_ARB\0"
2556+ "GL_CURRENT_PROGRAM\0"
2557+ "GL_CURRENT_QUERY\0"
2558+ "GL_CURRENT_QUERY_ARB\0"
2559+ "GL_CURRENT_RASTER_COLOR\0"
2560+ "GL_CURRENT_RASTER_DISTANCE\0"
2561+ "GL_CURRENT_RASTER_INDEX\0"
2562+ "GL_CURRENT_RASTER_POSITION\0"
2563+ "GL_CURRENT_RASTER_POSITION_VALID\0"
2564+ "GL_CURRENT_RASTER_TEXTURE_COORDS\0"
2565+ "GL_CURRENT_SECONDARY_COLOR\0"
2566+ "GL_CURRENT_TEXTURE_COORDS\0"
2567+ "GL_CURRENT_VERTEX_ATTRIB\0"
2568+ "GL_CURRENT_VERTEX_ATTRIB_ARB\0"
2569+ "GL_CURRENT_WEIGHT_ARB\0"
2570+ "GL_CW\0"
2571+ "GL_DEBUG_ASSERT_MESA\0"
2572+ "GL_DEBUG_OBJECT_MESA\0"
2573+ "GL_DEBUG_PRINT_MESA\0"
2574+ "GL_DECAL\0"
2575+ "GL_DECR\0"
2576+ "GL_DECR_WRAP\0"
2577+ "GL_DECR_WRAP_EXT\0"
2578+ "GL_DELETE_STATUS\0"
2579+ "GL_DEPTH\0"
2580+ "GL_DEPTH_ATTACHMENT_EXT\0"
2581+ "GL_DEPTH_BIAS\0"
2582+ "GL_DEPTH_BITS\0"
2583+ "GL_DEPTH_BOUNDS_EXT\0"
2584+ "GL_DEPTH_BOUNDS_TEST_EXT\0"
2585+ "GL_DEPTH_BUFFER_BIT\0"
2586+ "GL_DEPTH_CLAMP_NV\0"
2587+ "GL_DEPTH_CLEAR_VALUE\0"
2588+ "GL_DEPTH_COMPONENT\0"
2589+ "GL_DEPTH_COMPONENT16\0"
2590+ "GL_DEPTH_COMPONENT16_ARB\0"
2591+ "GL_DEPTH_COMPONENT16_SGIX\0"
2592+ "GL_DEPTH_COMPONENT24\0"
2593+ "GL_DEPTH_COMPONENT24_ARB\0"
2594+ "GL_DEPTH_COMPONENT24_SGIX\0"
2595+ "GL_DEPTH_COMPONENT32\0"
2596+ "GL_DEPTH_COMPONENT32_ARB\0"
2597+ "GL_DEPTH_COMPONENT32_SGIX\0"
2598+ "GL_DEPTH_FUNC\0"
2599+ "GL_DEPTH_RANGE\0"
2600+ "GL_DEPTH_SCALE\0"
2601+ "GL_DEPTH_STENCIL_NV\0"
2602+ "GL_DEPTH_STENCIL_TO_BGRA_NV\0"
2603+ "GL_DEPTH_STENCIL_TO_RGBA_NV\0"
2604+ "GL_DEPTH_TEST\0"
2605+ "GL_DEPTH_TEXTURE_MODE\0"
2606+ "GL_DEPTH_TEXTURE_MODE_ARB\0"
2607+ "GL_DEPTH_WRITEMASK\0"
2608+ "GL_DIFFUSE\0"
2609+ "GL_DITHER\0"
2610+ "GL_DOMAIN\0"
2611+ "GL_DONT_CARE\0"
2612+ "GL_DOT3_RGB\0"
2613+ "GL_DOT3_RGBA\0"
2614+ "GL_DOT3_RGBA_ARB\0"
2615+ "GL_DOT3_RGBA_EXT\0"
2616+ "GL_DOT3_RGB_ARB\0"
2617+ "GL_DOT3_RGB_EXT\0"
2618+ "GL_DOUBLE\0"
2619+ "GL_DOUBLEBUFFER\0"
2620+ "GL_DRAW_BUFFER\0"
2621+ "GL_DRAW_BUFFER0\0"
2622+ "GL_DRAW_BUFFER0_ARB\0"
2623+ "GL_DRAW_BUFFER0_ATI\0"
2624+ "GL_DRAW_BUFFER1\0"
2625+ "GL_DRAW_BUFFER10\0"
2626+ "GL_DRAW_BUFFER10_ARB\0"
2627+ "GL_DRAW_BUFFER10_ATI\0"
2628+ "GL_DRAW_BUFFER11\0"
2629+ "GL_DRAW_BUFFER11_ARB\0"
2630+ "GL_DRAW_BUFFER11_ATI\0"
2631+ "GL_DRAW_BUFFER12\0"
2632+ "GL_DRAW_BUFFER12_ARB\0"
2633+ "GL_DRAW_BUFFER12_ATI\0"
2634+ "GL_DRAW_BUFFER13\0"
2635+ "GL_DRAW_BUFFER13_ARB\0"
2636+ "GL_DRAW_BUFFER13_ATI\0"
2637+ "GL_DRAW_BUFFER14\0"
2638+ "GL_DRAW_BUFFER14_ARB\0"
2639+ "GL_DRAW_BUFFER14_ATI\0"
2640+ "GL_DRAW_BUFFER15\0"
2641+ "GL_DRAW_BUFFER15_ARB\0"
2642+ "GL_DRAW_BUFFER15_ATI\0"
2643+ "GL_DRAW_BUFFER1_ARB\0"
2644+ "GL_DRAW_BUFFER1_ATI\0"
2645+ "GL_DRAW_BUFFER2\0"
2646+ "GL_DRAW_BUFFER2_ARB\0"
2647+ "GL_DRAW_BUFFER2_ATI\0"
2648+ "GL_DRAW_BUFFER3\0"
2649+ "GL_DRAW_BUFFER3_ARB\0"
2650+ "GL_DRAW_BUFFER3_ATI\0"
2651+ "GL_DRAW_BUFFER4\0"
2652+ "GL_DRAW_BUFFER4_ARB\0"
2653+ "GL_DRAW_BUFFER4_ATI\0"
2654+ "GL_DRAW_BUFFER5\0"
2655+ "GL_DRAW_BUFFER5_ARB\0"
2656+ "GL_DRAW_BUFFER5_ATI\0"
2657+ "GL_DRAW_BUFFER6\0"
2658+ "GL_DRAW_BUFFER6_ARB\0"
2659+ "GL_DRAW_BUFFER6_ATI\0"
2660+ "GL_DRAW_BUFFER7\0"
2661+ "GL_DRAW_BUFFER7_ARB\0"
2662+ "GL_DRAW_BUFFER7_ATI\0"
2663+ "GL_DRAW_BUFFER8\0"
2664+ "GL_DRAW_BUFFER8_ARB\0"
2665+ "GL_DRAW_BUFFER8_ATI\0"
2666+ "GL_DRAW_BUFFER9\0"
2667+ "GL_DRAW_BUFFER9_ARB\0"
2668+ "GL_DRAW_BUFFER9_ATI\0"
2669+ "GL_DRAW_FRAMEBUFFER_BINDING_EXT\0"
2670+ "GL_DRAW_FRAMEBUFFER_EXT\0"
2671+ "GL_DRAW_PIXEL_TOKEN\0"
2672+ "GL_DST_ALPHA\0"
2673+ "GL_DST_COLOR\0"
2674+ "GL_DYNAMIC_COPY\0"
2675+ "GL_DYNAMIC_COPY_ARB\0"
2676+ "GL_DYNAMIC_DRAW\0"
2677+ "GL_DYNAMIC_DRAW_ARB\0"
2678+ "GL_DYNAMIC_READ\0"
2679+ "GL_DYNAMIC_READ_ARB\0"
2680+ "GL_EDGE_FLAG\0"
2681+ "GL_EDGE_FLAG_ARRAY\0"
2682+ "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING\0"
2683+ "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB\0"
2684+ "GL_EDGE_FLAG_ARRAY_POINTER\0"
2685+ "GL_EDGE_FLAG_ARRAY_STRIDE\0"
2686+ "GL_ELEMENT_ARRAY_BUFFER\0"
2687+ "GL_ELEMENT_ARRAY_BUFFER_ARB\0"
2688+ "GL_ELEMENT_ARRAY_BUFFER_BINDING\0"
2689+ "GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB\0"
2690+ "GL_EMISSION\0"
2691+ "GL_ENABLE_BIT\0"
2692+ "GL_EQUAL\0"
2693+ "GL_EQUIV\0"
2694+ "GL_EVAL_BIT\0"
2695+ "GL_EXP\0"
2696+ "GL_EXP2\0"
2697+ "GL_EXTENSIONS\0"
2698+ "GL_EYE_LINEAR\0"
2699+ "GL_EYE_PLANE\0"
2700+ "GL_EYE_PLANE_ABSOLUTE_NV\0"
2701+ "GL_EYE_RADIAL_NV\0"
2702+ "GL_FALSE\0"
2703+ "GL_FASTEST\0"
2704+ "GL_FEEDBACK\0"
2705+ "GL_FEEDBACK_BUFFER_POINTER\0"
2706+ "GL_FEEDBACK_BUFFER_SIZE\0"
2707+ "GL_FEEDBACK_BUFFER_TYPE\0"
2708+ "GL_FILL\0"
2709+ "GL_FLAT\0"
2710+ "GL_FLOAT\0"
2711+ "GL_FLOAT_MAT2\0"
2712+ "GL_FLOAT_MAT2_ARB\0"
2713+ "GL_FLOAT_MAT3\0"
2714+ "GL_FLOAT_MAT3_ARB\0"
2715+ "GL_FLOAT_MAT4\0"
2716+ "GL_FLOAT_MAT4_ARB\0"
2717+ "GL_FLOAT_VEC2\0"
2718+ "GL_FLOAT_VEC2_ARB\0"
2719+ "GL_FLOAT_VEC3\0"
2720+ "GL_FLOAT_VEC3_ARB\0"
2721+ "GL_FLOAT_VEC4\0"
2722+ "GL_FLOAT_VEC4_ARB\0"
2723+ "GL_FOG\0"
2724+ "GL_FOG_BIT\0"
2725+ "GL_FOG_COLOR\0"
2726+ "GL_FOG_COORD\0"
2727+ "GL_FOG_COORDINATE\0"
2728+ "GL_FOG_COORDINATE_ARRAY\0"
2729+ "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING\0"
2730+ "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB\0"
2731+ "GL_FOG_COORDINATE_ARRAY_POINTER\0"
2732+ "GL_FOG_COORDINATE_ARRAY_STRIDE\0"
2733+ "GL_FOG_COORDINATE_ARRAY_TYPE\0"
2734+ "GL_FOG_COORDINATE_SOURCE\0"
2735+ "GL_FOG_COORD_ARRAY\0"
2736+ "GL_FOG_COORD_ARRAY_BUFFER_BINDING\0"
2737+ "GL_FOG_COORD_ARRAY_POINTER\0"
2738+ "GL_FOG_COORD_ARRAY_STRIDE\0"
2739+ "GL_FOG_COORD_ARRAY_TYPE\0"
2740+ "GL_FOG_COORD_SRC\0"
2741+ "GL_FOG_DENSITY\0"
2742+ "GL_FOG_DISTANCE_MODE_NV\0"
2743+ "GL_FOG_END\0"
2744+ "GL_FOG_HINT\0"
2745+ "GL_FOG_INDEX\0"
2746+ "GL_FOG_MODE\0"
2747+ "GL_FOG_OFFSET_SGIX\0"
2748+ "GL_FOG_OFFSET_VALUE_SGIX\0"
2749+ "GL_FOG_START\0"
2750+ "GL_FRAGMENT_DEPTH\0"
2751+ "GL_FRAGMENT_PROGRAM_ARB\0"
2752+ "GL_FRAGMENT_SHADER\0"
2753+ "GL_FRAGMENT_SHADER_ARB\0"
2754+ "GL_FRAGMENT_SHADER_DERIVATIVE_HINT\0"
2755+ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT\0"
2756+ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT\0"
2757+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT\0"
2758+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT\0"
2759+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT\0"
2760+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT\0"
2761+ "GL_FRAMEBUFFER_BINDING_EXT\0"
2762+ "GL_FRAMEBUFFER_COMPLETE_EXT\0"
2763+ "GL_FRAMEBUFFER_EXT\0"
2764+ "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT\0"
2765+ "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT\0"
2766+ "GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT\0"
2767+ "GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT\0"
2768+ "GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT\0"
2769+ "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT\0"
2770+ "GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT\0"
2771+ "GL_FRAMEBUFFER_STATUS_ERROR_EXT\0"
2772+ "GL_FRAMEBUFFER_UNSUPPORTED_EXT\0"
2773+ "GL_FRONT\0"
2774+ "GL_FRONT_AND_BACK\0"
2775+ "GL_FRONT_FACE\0"
2776+ "GL_FRONT_LEFT\0"
2777+ "GL_FRONT_RIGHT\0"
2778+ "GL_FUNC_ADD\0"
2779+ "GL_FUNC_ADD_EXT\0"
2780+ "GL_FUNC_REVERSE_SUBTRACT\0"
2781+ "GL_FUNC_REVERSE_SUBTRACT_EXT\0"
2782+ "GL_FUNC_SUBTRACT\0"
2783+ "GL_FUNC_SUBTRACT_EXT\0"
2784+ "GL_GENERATE_MIPMAP\0"
2785+ "GL_GENERATE_MIPMAP_HINT\0"
2786+ "GL_GENERATE_MIPMAP_HINT_SGIS\0"
2787+ "GL_GENERATE_MIPMAP_SGIS\0"
2788+ "GL_GEQUAL\0"
2789+ "GL_GL_BLEND_EQUATION_RGB\0"
2790+ "GL_GL_COMPRESSED_SLUMINANCE\0"
2791+ "GL_GL_COMPRESSED_SLUMINANCE_ALPHA\0"
2792+ "GL_GL_COMPRESSED_SRGB\0"
2793+ "GL_GL_COMPRESSED_SRGB_ALPHA\0"
2794+ "GL_GL_CURRENT_RASTER_SECONDARY_COLOR\0"
2795+ "GL_GL_FLOAT_MAT2x3\0"
2796+ "GL_GL_FLOAT_MAT2x4\0"
2797+ "GL_GL_FLOAT_MAT3x2\0"
2798+ "GL_GL_FLOAT_MAT3x4\0"
2799+ "GL_GL_FLOAT_MAT4x2\0"
2800+ "GL_GL_FLOAT_MAT4x3\0"
2801+ "GL_GL_PIXEL_PACK_BUFFER\0"
2802+ "GL_GL_PIXEL_PACK_BUFFER_BINDING\0"
2803+ "GL_GL_PIXEL_UNPACK_BUFFER\0"
2804+ "GL_GL_PIXEL_UNPACK_BUFFER_BINDING\0"
2805+ "GL_GL_SLUMINANCE\0"
2806+ "GL_GL_SLUMINANCE8\0"
2807+ "GL_GL_SLUMINANCE8_ALPHA8\0"
2808+ "GL_GL_SLUMINANCE_ALPHA\0"
2809+ "GL_GL_SRGB\0"
2810+ "GL_GL_SRGB8\0"
2811+ "GL_GL_SRGB8_ALPHA8\0"
2812+ "GL_GL_SRGB_ALPHA\0"
2813+ "GL_GREATER\0"
2814+ "GL_GREEN\0"
2815+ "GL_GREEN_BIAS\0"
2816+ "GL_GREEN_BITS\0"
2817+ "GL_GREEN_SCALE\0"
2818+ "GL_HINT_BIT\0"
2819+ "GL_HISTOGRAM\0"
2820+ "GL_HISTOGRAM_ALPHA_SIZE\0"
2821+ "GL_HISTOGRAM_ALPHA_SIZE_EXT\0"
2822+ "GL_HISTOGRAM_BLUE_SIZE\0"
2823+ "GL_HISTOGRAM_BLUE_SIZE_EXT\0"
2824+ "GL_HISTOGRAM_EXT\0"
2825+ "GL_HISTOGRAM_FORMAT\0"
2826+ "GL_HISTOGRAM_FORMAT_EXT\0"
2827+ "GL_HISTOGRAM_GREEN_SIZE\0"
2828+ "GL_HISTOGRAM_GREEN_SIZE_EXT\0"
2829+ "GL_HISTOGRAM_LUMINANCE_SIZE\0"
2830+ "GL_HISTOGRAM_LUMINANCE_SIZE_EXT\0"
2831+ "GL_HISTOGRAM_RED_SIZE\0"
2832+ "GL_HISTOGRAM_RED_SIZE_EXT\0"
2833+ "GL_HISTOGRAM_SINK\0"
2834+ "GL_HISTOGRAM_SINK_EXT\0"
2835+ "GL_HISTOGRAM_WIDTH\0"
2836+ "GL_HISTOGRAM_WIDTH_EXT\0"
2837+ "GL_IDENTITY_NV\0"
2838+ "GL_IGNORE_BORDER_HP\0"
2839+ "GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES\0"
2840+ "GL_IMPLEMENTATION_COLOR_READ_TYPE_OES\0"
2841+ "GL_INCR\0"
2842+ "GL_INCR_WRAP\0"
2843+ "GL_INCR_WRAP_EXT\0"
2844+ "GL_INDEX_ARRAY\0"
2845+ "GL_INDEX_ARRAY_BUFFER_BINDING\0"
2846+ "GL_INDEX_ARRAY_BUFFER_BINDING_ARB\0"
2847+ "GL_INDEX_ARRAY_POINTER\0"
2848+ "GL_INDEX_ARRAY_STRIDE\0"
2849+ "GL_INDEX_ARRAY_TYPE\0"
2850+ "GL_INDEX_BITS\0"
2851+ "GL_INDEX_CLEAR_VALUE\0"
2852+ "GL_INDEX_LOGIC_OP\0"
2853+ "GL_INDEX_MODE\0"
2854+ "GL_INDEX_OFFSET\0"
2855+ "GL_INDEX_SHIFT\0"
2856+ "GL_INDEX_WRITEMASK\0"
2857+ "GL_INFO_LOG_LENGTH\0"
2858+ "GL_INT\0"
2859+ "GL_INTENSITY\0"
2860+ "GL_INTENSITY12\0"
2861+ "GL_INTENSITY12_EXT\0"
2862+ "GL_INTENSITY16\0"
2863+ "GL_INTENSITY16_EXT\0"
2864+ "GL_INTENSITY4\0"
2865+ "GL_INTENSITY4_EXT\0"
2866+ "GL_INTENSITY8\0"
2867+ "GL_INTENSITY8_EXT\0"
2868+ "GL_INTENSITY_EXT\0"
2869+ "GL_INTERPOLATE\0"
2870+ "GL_INTERPOLATE_ARB\0"
2871+ "GL_INTERPOLATE_EXT\0"
2872+ "GL_INT_VEC2\0"
2873+ "GL_INT_VEC2_ARB\0"
2874+ "GL_INT_VEC3\0"
2875+ "GL_INT_VEC3_ARB\0"
2876+ "GL_INT_VEC4\0"
2877+ "GL_INT_VEC4_ARB\0"
2878+ "GL_INVALID_ENUM\0"
2879+ "GL_INVALID_FRAMEBUFFER_OPERATION_EXT\0"
2880+ "GL_INVALID_OPERATION\0"
2881+ "GL_INVALID_VALUE\0"
2882+ "GL_INVERSE_NV\0"
2883+ "GL_INVERSE_TRANSPOSE_NV\0"
2884+ "GL_INVERT\0"
2885+ "GL_KEEP\0"
2886+ "GL_LEFT\0"
2887+ "GL_LEQUAL\0"
2888+ "GL_LESS\0"
2889+ "GL_LIGHT0\0"
2890+ "GL_LIGHT1\0"
2891+ "GL_LIGHT2\0"
2892+ "GL_LIGHT3\0"
2893+ "GL_LIGHT4\0"
2894+ "GL_LIGHT5\0"
2895+ "GL_LIGHT6\0"
2896+ "GL_LIGHT7\0"
2897+ "GL_LIGHTING\0"
2898+ "GL_LIGHTING_BIT\0"
2899+ "GL_LIGHT_MODEL_AMBIENT\0"
2900+ "GL_LIGHT_MODEL_COLOR_CONTROL\0"
2901+ "GL_LIGHT_MODEL_COLOR_CONTROL_EXT\0"
2902+ "GL_LIGHT_MODEL_LOCAL_VIEWER\0"
2903+ "GL_LIGHT_MODEL_TWO_SIDE\0"
2904+ "GL_LINE\0"
2905+ "GL_LINEAR\0"
2906+ "GL_LINEAR_ATTENUATION\0"
2907+ "GL_LINEAR_CLIPMAP_LINEAR_SGIX\0"
2908+ "GL_LINEAR_CLIPMAP_NEAREST_SGIX\0"
2909+ "GL_LINEAR_MIPMAP_LINEAR\0"
2910+ "GL_LINEAR_MIPMAP_NEAREST\0"
2911+ "GL_LINES\0"
2912+ "GL_LINE_BIT\0"
2913+ "GL_LINE_LOOP\0"
2914+ "GL_LINE_RESET_TOKEN\0"
2915+ "GL_LINE_SMOOTH\0"
2916+ "GL_LINE_SMOOTH_HINT\0"
2917+ "GL_LINE_STIPPLE\0"
2918+ "GL_LINE_STIPPLE_PATTERN\0"
2919+ "GL_LINE_STIPPLE_REPEAT\0"
2920+ "GL_LINE_STRIP\0"
2921+ "GL_LINE_TOKEN\0"
2922+ "GL_LINE_WIDTH\0"
2923+ "GL_LINE_WIDTH_GRANULARITY\0"
2924+ "GL_LINE_WIDTH_RANGE\0"
2925+ "GL_LINK_STATUS\0"
2926+ "GL_LIST_BASE\0"
2927+ "GL_LIST_BIT\0"
2928+ "GL_LIST_INDEX\0"
2929+ "GL_LIST_MODE\0"
2930+ "GL_LOAD\0"
2931+ "GL_LOGIC_OP\0"
2932+ "GL_LOGIC_OP_MODE\0"
2933+ "GL_LOWER_LEFT\0"
2934+ "GL_LUMINANCE\0"
2935+ "GL_LUMINANCE12\0"
2936+ "GL_LUMINANCE12_ALPHA12\0"
2937+ "GL_LUMINANCE12_ALPHA12_EXT\0"
2938+ "GL_LUMINANCE12_ALPHA4\0"
2939+ "GL_LUMINANCE12_ALPHA4_EXT\0"
2940+ "GL_LUMINANCE12_EXT\0"
2941+ "GL_LUMINANCE16\0"
2942+ "GL_LUMINANCE16_ALPHA16\0"
2943+ "GL_LUMINANCE16_ALPHA16_EXT\0"
2944+ "GL_LUMINANCE16_EXT\0"
2945+ "GL_LUMINANCE4\0"
2946+ "GL_LUMINANCE4_ALPHA4\0"
2947+ "GL_LUMINANCE4_ALPHA4_EXT\0"
2948+ "GL_LUMINANCE4_EXT\0"
2949+ "GL_LUMINANCE6_ALPHA2\0"
2950+ "GL_LUMINANCE6_ALPHA2_EXT\0"
2951+ "GL_LUMINANCE8\0"
2952+ "GL_LUMINANCE8_ALPHA8\0"
2953+ "GL_LUMINANCE8_ALPHA8_EXT\0"
2954+ "GL_LUMINANCE8_EXT\0"
2955+ "GL_LUMINANCE_ALPHA\0"
2956+ "GL_MAP1_COLOR_4\0"
2957+ "GL_MAP1_GRID_DOMAIN\0"
2958+ "GL_MAP1_GRID_SEGMENTS\0"
2959+ "GL_MAP1_INDEX\0"
2960+ "GL_MAP1_NORMAL\0"
2961+ "GL_MAP1_TEXTURE_COORD_1\0"
2962+ "GL_MAP1_TEXTURE_COORD_2\0"
2963+ "GL_MAP1_TEXTURE_COORD_3\0"
2964+ "GL_MAP1_TEXTURE_COORD_4\0"
2965+ "GL_MAP1_VERTEX_3\0"
2966+ "GL_MAP1_VERTEX_4\0"
2967+ "GL_MAP1_VERTEX_ATTRIB0_4_NV\0"
2968+ "GL_MAP1_VERTEX_ATTRIB10_4_NV\0"
2969+ "GL_MAP1_VERTEX_ATTRIB11_4_NV\0"
2970+ "GL_MAP1_VERTEX_ATTRIB12_4_NV\0"
2971+ "GL_MAP1_VERTEX_ATTRIB13_4_NV\0"
2972+ "GL_MAP1_VERTEX_ATTRIB14_4_NV\0"
2973+ "GL_MAP1_VERTEX_ATTRIB15_4_NV\0"
2974+ "GL_MAP1_VERTEX_ATTRIB1_4_NV\0"
2975+ "GL_MAP1_VERTEX_ATTRIB2_4_NV\0"
2976+ "GL_MAP1_VERTEX_ATTRIB3_4_NV\0"
2977+ "GL_MAP1_VERTEX_ATTRIB4_4_NV\0"
2978+ "GL_MAP1_VERTEX_ATTRIB5_4_NV\0"
2979+ "GL_MAP1_VERTEX_ATTRIB6_4_NV\0"
2980+ "GL_MAP1_VERTEX_ATTRIB7_4_NV\0"
2981+ "GL_MAP1_VERTEX_ATTRIB8_4_NV\0"
2982+ "GL_MAP1_VERTEX_ATTRIB9_4_NV\0"
2983+ "GL_MAP2_COLOR_4\0"
2984+ "GL_MAP2_GRID_DOMAIN\0"
2985+ "GL_MAP2_GRID_SEGMENTS\0"
2986+ "GL_MAP2_INDEX\0"
2987+ "GL_MAP2_NORMAL\0"
2988+ "GL_MAP2_TEXTURE_COORD_1\0"
2989+ "GL_MAP2_TEXTURE_COORD_2\0"
2990+ "GL_MAP2_TEXTURE_COORD_3\0"
2991+ "GL_MAP2_TEXTURE_COORD_4\0"
2992+ "GL_MAP2_VERTEX_3\0"
2993+ "GL_MAP2_VERTEX_4\0"
2994+ "GL_MAP2_VERTEX_ATTRIB0_4_NV\0"
2995+ "GL_MAP2_VERTEX_ATTRIB10_4_NV\0"
2996+ "GL_MAP2_VERTEX_ATTRIB11_4_NV\0"
2997+ "GL_MAP2_VERTEX_ATTRIB12_4_NV\0"
2998+ "GL_MAP2_VERTEX_ATTRIB13_4_NV\0"
2999+ "GL_MAP2_VERTEX_ATTRIB14_4_NV\0"
3000+ "GL_MAP2_VERTEX_ATTRIB15_4_NV\0"
3001+ "GL_MAP2_VERTEX_ATTRIB1_4_NV\0"
3002+ "GL_MAP2_VERTEX_ATTRIB2_4_NV\0"
3003+ "GL_MAP2_VERTEX_ATTRIB3_4_NV\0"
3004+ "GL_MAP2_VERTEX_ATTRIB4_4_NV\0"
3005+ "GL_MAP2_VERTEX_ATTRIB5_4_NV\0"
3006+ "GL_MAP2_VERTEX_ATTRIB6_4_NV\0"
3007+ "GL_MAP2_VERTEX_ATTRIB7_4_NV\0"
3008+ "GL_MAP2_VERTEX_ATTRIB8_4_NV\0"
3009+ "GL_MAP2_VERTEX_ATTRIB9_4_NV\0"
3010+ "GL_MAP_COLOR\0"
3011+ "GL_MAP_STENCIL\0"
3012+ "GL_MATRIX0_ARB\0"
3013+ "GL_MATRIX0_NV\0"
3014+ "GL_MATRIX10_ARB\0"
3015+ "GL_MATRIX11_ARB\0"
3016+ "GL_MATRIX12_ARB\0"
3017+ "GL_MATRIX13_ARB\0"
3018+ "GL_MATRIX14_ARB\0"
3019+ "GL_MATRIX15_ARB\0"
3020+ "GL_MATRIX16_ARB\0"
3021+ "GL_MATRIX17_ARB\0"
3022+ "GL_MATRIX18_ARB\0"
3023+ "GL_MATRIX19_ARB\0"
3024+ "GL_MATRIX1_ARB\0"
3025+ "GL_MATRIX1_NV\0"
3026+ "GL_MATRIX20_ARB\0"
3027+ "GL_MATRIX21_ARB\0"
3028+ "GL_MATRIX22_ARB\0"
3029+ "GL_MATRIX23_ARB\0"
3030+ "GL_MATRIX24_ARB\0"
3031+ "GL_MATRIX25_ARB\0"
3032+ "GL_MATRIX26_ARB\0"
3033+ "GL_MATRIX27_ARB\0"
3034+ "GL_MATRIX28_ARB\0"
3035+ "GL_MATRIX29_ARB\0"
3036+ "GL_MATRIX2_ARB\0"
3037+ "GL_MATRIX2_NV\0"
3038+ "GL_MATRIX30_ARB\0"
3039+ "GL_MATRIX31_ARB\0"
3040+ "GL_MATRIX3_ARB\0"
3041+ "GL_MATRIX3_NV\0"
3042+ "GL_MATRIX4_ARB\0"
3043+ "GL_MATRIX4_NV\0"
3044+ "GL_MATRIX5_ARB\0"
3045+ "GL_MATRIX5_NV\0"
3046+ "GL_MATRIX6_ARB\0"
3047+ "GL_MATRIX6_NV\0"
3048+ "GL_MATRIX7_ARB\0"
3049+ "GL_MATRIX7_NV\0"
3050+ "GL_MATRIX8_ARB\0"
3051+ "GL_MATRIX9_ARB\0"
3052+ "GL_MATRIX_INDEX_ARRAY_ARB\0"
3053+ "GL_MATRIX_INDEX_ARRAY_POINTER_ARB\0"
3054+ "GL_MATRIX_INDEX_ARRAY_SIZE_ARB\0"
3055+ "GL_MATRIX_INDEX_ARRAY_STRIDE_ARB\0"
3056+ "GL_MATRIX_INDEX_ARRAY_TYPE_ARB\0"
3057+ "GL_MATRIX_MODE\0"
3058+ "GL_MATRIX_PALETTE_ARB\0"
3059+ "GL_MAX\0"
3060+ "GL_MAX_3D_TEXTURE_SIZE\0"
3061+ "GL_MAX_ARRAY_TEXTURE_LAYERS_EXT\0"
3062+ "GL_MAX_ATTRIB_STACK_DEPTH\0"
3063+ "GL_MAX_CLIENT_ATTRIB_STACK_DEPTH\0"
3064+ "GL_MAX_CLIPMAP_DEPTH_SGIX\0"
3065+ "GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX\0"
3066+ "GL_MAX_CLIP_PLANES\0"
3067+ "GL_MAX_COLOR_ATTACHMENTS_EXT\0"
3068+ "GL_MAX_COLOR_MATRIX_STACK_DEPTH\0"
3069+ "GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI\0"
3070+ "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS\0"
3071+ "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB\0"
3072+ "GL_MAX_CONVOLUTION_HEIGHT\0"
3073+ "GL_MAX_CONVOLUTION_HEIGHT_EXT\0"
3074+ "GL_MAX_CONVOLUTION_WIDTH\0"
3075+ "GL_MAX_CONVOLUTION_WIDTH_EXT\0"
3076+ "GL_MAX_CUBE_MAP_TEXTURE_SIZE\0"
3077+ "GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB\0"
3078+ "GL_MAX_DRAW_BUFFERS\0"
3079+ "GL_MAX_DRAW_BUFFERS_ARB\0"
3080+ "GL_MAX_DRAW_BUFFERS_ATI\0"
3081+ "GL_MAX_ELEMENTS_INDICES\0"
3082+ "GL_MAX_ELEMENTS_VERTICES\0"
3083+ "GL_MAX_EVAL_ORDER\0"
3084+ "GL_MAX_EXT\0"
3085+ "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS\0"
3086+ "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB\0"
3087+ "GL_MAX_LIGHTS\0"
3088+ "GL_MAX_LIST_NESTING\0"
3089+ "GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB\0"
3090+ "GL_MAX_MODELVIEW_STACK_DEPTH\0"
3091+ "GL_MAX_NAME_STACK_DEPTH\0"
3092+ "GL_MAX_PALETTE_MATRICES_ARB\0"
3093+ "GL_MAX_PIXEL_MAP_TABLE\0"
3094+ "GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB\0"
3095+ "GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB\0"
3096+ "GL_MAX_PROGRAM_ATTRIBS_ARB\0"
3097+ "GL_MAX_PROGRAM_CALL_DEPTH_NV\0"
3098+ "GL_MAX_PROGRAM_ENV_PARAMETERS_ARB\0"
3099+ "GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV\0"
3100+ "GL_MAX_PROGRAM_IF_DEPTH_NV\0"
3101+ "GL_MAX_PROGRAM_INSTRUCTIONS_ARB\0"
3102+ "GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB\0"
3103+ "GL_MAX_PROGRAM_LOOP_COUNT_NV\0"
3104+ "GL_MAX_PROGRAM_LOOP_DEPTH_NV\0"
3105+ "GL_MAX_PROGRAM_MATRICES_ARB\0"
3106+ "GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB\0"
3107+ "GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB\0"
3108+ "GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB\0"
3109+ "GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB\0"
3110+ "GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB\0"
3111+ "GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB\0"
3112+ "GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB\0"
3113+ "GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB\0"
3114+ "GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB\0"
3115+ "GL_MAX_PROGRAM_PARAMETERS_ARB\0"
3116+ "GL_MAX_PROGRAM_TEMPORARIES_ARB\0"
3117+ "GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB\0"
3118+ "GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB\0"
3119+ "GL_MAX_PROJECTION_STACK_DEPTH\0"
3120+ "GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB\0"
3121+ "GL_MAX_RECTANGLE_TEXTURE_SIZE_NV\0"
3122+ "GL_MAX_RENDERBUFFER_SIZE_EXT\0"
3123+ "GL_MAX_SHININESS_NV\0"
3124+ "GL_MAX_SPOT_EXPONENT_NV\0"
3125+ "GL_MAX_TEXTURE_COORDS\0"
3126+ "GL_MAX_TEXTURE_COORDS_ARB\0"
3127+ "GL_MAX_TEXTURE_IMAGE_UNITS\0"
3128+ "GL_MAX_TEXTURE_IMAGE_UNITS_ARB\0"
3129+ "GL_MAX_TEXTURE_LOD_BIAS\0"
3130+ "GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT\0"
3131+ "GL_MAX_TEXTURE_SIZE\0"
3132+ "GL_MAX_TEXTURE_STACK_DEPTH\0"
3133+ "GL_MAX_TEXTURE_UNITS\0"
3134+ "GL_MAX_TEXTURE_UNITS_ARB\0"
3135+ "GL_MAX_TRACK_MATRICES_NV\0"
3136+ "GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV\0"
3137+ "GL_MAX_VARYING_FLOATS\0"
3138+ "GL_MAX_VARYING_FLOATS_ARB\0"
3139+ "GL_MAX_VERTEX_ATTRIBS\0"
3140+ "GL_MAX_VERTEX_ATTRIBS_ARB\0"
3141+ "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS\0"
3142+ "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB\0"
3143+ "GL_MAX_VERTEX_UNIFORM_COMPONENTS\0"
3144+ "GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB\0"
3145+ "GL_MAX_VERTEX_UNITS_ARB\0"
3146+ "GL_MAX_VIEWPORT_DIMS\0"
3147+ "GL_MIN\0"
3148+ "GL_MINMAX\0"
3149+ "GL_MINMAX_EXT\0"
3150+ "GL_MINMAX_FORMAT\0"
3151+ "GL_MINMAX_FORMAT_EXT\0"
3152+ "GL_MINMAX_SINK\0"
3153+ "GL_MINMAX_SINK_EXT\0"
3154+ "GL_MIN_EXT\0"
3155+ "GL_MIRRORED_REPEAT\0"
3156+ "GL_MIRRORED_REPEAT_ARB\0"
3157+ "GL_MIRRORED_REPEAT_IBM\0"
3158+ "GL_MIRROR_CLAMP_ATI\0"
3159+ "GL_MIRROR_CLAMP_EXT\0"
3160+ "GL_MIRROR_CLAMP_TO_BORDER_EXT\0"
3161+ "GL_MIRROR_CLAMP_TO_EDGE_ATI\0"
3162+ "GL_MIRROR_CLAMP_TO_EDGE_EXT\0"
3163+ "GL_MODELVIEW\0"
3164+ "GL_MODELVIEW0_ARB\0"
3165+ "GL_MODELVIEW10_ARB\0"
3166+ "GL_MODELVIEW11_ARB\0"
3167+ "GL_MODELVIEW12_ARB\0"
3168+ "GL_MODELVIEW13_ARB\0"
3169+ "GL_MODELVIEW14_ARB\0"
3170+ "GL_MODELVIEW15_ARB\0"
3171+ "GL_MODELVIEW16_ARB\0"
3172+ "GL_MODELVIEW17_ARB\0"
3173+ "GL_MODELVIEW18_ARB\0"
3174+ "GL_MODELVIEW19_ARB\0"
3175+ "GL_MODELVIEW1_ARB\0"
3176+ "GL_MODELVIEW20_ARB\0"
3177+ "GL_MODELVIEW21_ARB\0"
3178+ "GL_MODELVIEW22_ARB\0"
3179+ "GL_MODELVIEW23_ARB\0"
3180+ "GL_MODELVIEW24_ARB\0"
3181+ "GL_MODELVIEW25_ARB\0"
3182+ "GL_MODELVIEW26_ARB\0"
3183+ "GL_MODELVIEW27_ARB\0"
3184+ "GL_MODELVIEW28_ARB\0"
3185+ "GL_MODELVIEW29_ARB\0"
3186+ "GL_MODELVIEW2_ARB\0"
3187+ "GL_MODELVIEW30_ARB\0"
3188+ "GL_MODELVIEW31_ARB\0"
3189+ "GL_MODELVIEW3_ARB\0"
3190+ "GL_MODELVIEW4_ARB\0"
3191+ "GL_MODELVIEW5_ARB\0"
3192+ "GL_MODELVIEW6_ARB\0"
3193+ "GL_MODELVIEW7_ARB\0"
3194+ "GL_MODELVIEW8_ARB\0"
3195+ "GL_MODELVIEW9_ARB\0"
3196+ "GL_MODELVIEW_MATRIX\0"
3197+ "GL_MODELVIEW_PROJECTION_NV\0"
3198+ "GL_MODELVIEW_STACK_DEPTH\0"
3199+ "GL_MODULATE\0"
3200+ "GL_MODULATE_ADD_ATI\0"
3201+ "GL_MODULATE_SIGNED_ADD_ATI\0"
3202+ "GL_MODULATE_SUBTRACT_ATI\0"
3203+ "GL_MULT\0"
3204+ "GL_MULTISAMPLE\0"
3205+ "GL_MULTISAMPLE_3DFX\0"
3206+ "GL_MULTISAMPLE_ARB\0"
3207+ "GL_MULTISAMPLE_BIT\0"
3208+ "GL_MULTISAMPLE_BIT_3DFX\0"
3209+ "GL_MULTISAMPLE_BIT_ARB\0"
3210+ "GL_MULTISAMPLE_FILTER_HINT_NV\0"
3211+ "GL_N3F_V3F\0"
3212+ "GL_NAME_STACK_DEPTH\0"
3213+ "GL_NAND\0"
3214+ "GL_NEAREST\0"
3215+ "GL_NEAREST_CLIPMAP_LINEAR_SGIX\0"
3216+ "GL_NEAREST_CLIPMAP_NEAREST_SGIX\0"
3217+ "GL_NEAREST_MIPMAP_LINEAR\0"
3218+ "GL_NEAREST_MIPMAP_NEAREST\0"
3219+ "GL_NEVER\0"
3220+ "GL_NICEST\0"
3221+ "GL_NONE\0"
3222+ "GL_NOOP\0"
3223+ "GL_NOR\0"
3224+ "GL_NORMALIZE\0"
3225+ "GL_NORMAL_ARRAY\0"
3226+ "GL_NORMAL_ARRAY_BUFFER_BINDING\0"
3227+ "GL_NORMAL_ARRAY_BUFFER_BINDING_ARB\0"
3228+ "GL_NORMAL_ARRAY_POINTER\0"
3229+ "GL_NORMAL_ARRAY_STRIDE\0"
3230+ "GL_NORMAL_ARRAY_TYPE\0"
3231+ "GL_NORMAL_MAP\0"
3232+ "GL_NORMAL_MAP_ARB\0"
3233+ "GL_NORMAL_MAP_NV\0"
3234+ "GL_NOTEQUAL\0"
3235+ "GL_NO_ERROR\0"
3236+ "GL_NUM_COMPRESSED_TEXTURE_FORMATS\0"
3237+ "GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB\0"
3238+ "GL_OBJECT_ACTIVE_ATTRIBUTES_ARB\0"
3239+ "GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB\0"
3240+ "GL_OBJECT_ACTIVE_UNIFORMS_ARB\0"
3241+ "GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB\0"
3242+ "GL_OBJECT_ATTACHED_OBJECTS_ARB\0"
3243+ "GL_OBJECT_COMPILE_STATUS_ARB\0"
3244+ "GL_OBJECT_DELETE_STATUS_ARB\0"
3245+ "GL_OBJECT_INFO_LOG_LENGTH_ARB\0"
3246+ "GL_OBJECT_LINEAR\0"
3247+ "GL_OBJECT_LINK_STATUS_ARB\0"
3248+ "GL_OBJECT_PLANE\0"
3249+ "GL_OBJECT_SHADER_SOURCE_LENGTH_ARB\0"
3250+ "GL_OBJECT_SUBTYPE_ARB\0"
3251+ "GL_OBJECT_TYPE_ARB\0"
3252+ "GL_OBJECT_VALIDATE_STATUS_ARB\0"
3253+ "GL_OCCLUSION_TEST_HP\0"
3254+ "GL_OCCLUSION_TEST_RESULT_HP\0"
3255+ "GL_ONE\0"
3256+ "GL_ONE_MINUS_CONSTANT_ALPHA\0"
3257+ "GL_ONE_MINUS_CONSTANT_ALPHA_EXT\0"
3258+ "GL_ONE_MINUS_CONSTANT_COLOR\0"
3259+ "GL_ONE_MINUS_CONSTANT_COLOR_EXT\0"
3260+ "GL_ONE_MINUS_DST_ALPHA\0"
3261+ "GL_ONE_MINUS_DST_COLOR\0"
3262+ "GL_ONE_MINUS_SRC_ALPHA\0"
3263+ "GL_ONE_MINUS_SRC_COLOR\0"
3264+ "GL_OPERAND0_ALPHA\0"
3265+ "GL_OPERAND0_ALPHA_ARB\0"
3266+ "GL_OPERAND0_ALPHA_EXT\0"
3267+ "GL_OPERAND0_RGB\0"
3268+ "GL_OPERAND0_RGB_ARB\0"
3269+ "GL_OPERAND0_RGB_EXT\0"
3270+ "GL_OPERAND1_ALPHA\0"
3271+ "GL_OPERAND1_ALPHA_ARB\0"
3272+ "GL_OPERAND1_ALPHA_EXT\0"
3273+ "GL_OPERAND1_RGB\0"
3274+ "GL_OPERAND1_RGB_ARB\0"
3275+ "GL_OPERAND1_RGB_EXT\0"
3276+ "GL_OPERAND2_ALPHA\0"
3277+ "GL_OPERAND2_ALPHA_ARB\0"
3278+ "GL_OPERAND2_ALPHA_EXT\0"
3279+ "GL_OPERAND2_RGB\0"
3280+ "GL_OPERAND2_RGB_ARB\0"
3281+ "GL_OPERAND2_RGB_EXT\0"
3282+ "GL_OPERAND3_ALPHA_NV\0"
3283+ "GL_OPERAND3_RGB_NV\0"
3284+ "GL_OR\0"
3285+ "GL_ORDER\0"
3286+ "GL_OR_INVERTED\0"
3287+ "GL_OR_REVERSE\0"
3288+ "GL_OUT_OF_MEMORY\0"
3289+ "GL_PACK_ALIGNMENT\0"
3290+ "GL_PACK_IMAGE_HEIGHT\0"
3291+ "GL_PACK_INVERT_MESA\0"
3292+ "GL_PACK_LSB_FIRST\0"
3293+ "GL_PACK_ROW_LENGTH\0"
3294+ "GL_PACK_SKIP_IMAGES\0"
3295+ "GL_PACK_SKIP_PIXELS\0"
3296+ "GL_PACK_SKIP_ROWS\0"
3297+ "GL_PACK_SWAP_BYTES\0"
3298+ "GL_PALETTE4_R5_G6_B5_OES\0"
3299+ "GL_PALETTE4_RGB5_A1_OES\0"
3300+ "GL_PALETTE4_RGB8_OES\0"
3301+ "GL_PALETTE4_RGBA4_OES\0"
3302+ "GL_PALETTE4_RGBA8_OES\0"
3303+ "GL_PALETTE8_R5_G6_B5_OES\0"
3304+ "GL_PALETTE8_RGB5_A1_OES\0"
3305+ "GL_PALETTE8_RGB8_OES\0"
3306+ "GL_PALETTE8_RGBA4_OES\0"
3307+ "GL_PALETTE8_RGBA8_OES\0"
3308+ "GL_PASS_THROUGH_TOKEN\0"
3309+ "GL_PERSPECTIVE_CORRECTION_HINT\0"
3310+ "GL_PIXEL_MAP_A_TO_A\0"
3311+ "GL_PIXEL_MAP_A_TO_A_SIZE\0"
3312+ "GL_PIXEL_MAP_B_TO_B\0"
3313+ "GL_PIXEL_MAP_B_TO_B_SIZE\0"
3314+ "GL_PIXEL_MAP_G_TO_G\0"
3315+ "GL_PIXEL_MAP_G_TO_G_SIZE\0"
3316+ "GL_PIXEL_MAP_I_TO_A\0"
3317+ "GL_PIXEL_MAP_I_TO_A_SIZE\0"
3318+ "GL_PIXEL_MAP_I_TO_B\0"
3319+ "GL_PIXEL_MAP_I_TO_B_SIZE\0"
3320+ "GL_PIXEL_MAP_I_TO_G\0"
3321+ "GL_PIXEL_MAP_I_TO_G_SIZE\0"
3322+ "GL_PIXEL_MAP_I_TO_I\0"
3323+ "GL_PIXEL_MAP_I_TO_I_SIZE\0"
3324+ "GL_PIXEL_MAP_I_TO_R\0"
3325+ "GL_PIXEL_MAP_I_TO_R_SIZE\0"
3326+ "GL_PIXEL_MAP_R_TO_R\0"
3327+ "GL_PIXEL_MAP_R_TO_R_SIZE\0"
3328+ "GL_PIXEL_MAP_S_TO_S\0"
3329+ "GL_PIXEL_MAP_S_TO_S_SIZE\0"
3330+ "GL_PIXEL_MODE_BIT\0"
3331+ "GL_PIXEL_PACK_BUFFER_BINDING_EXT\0"
3332+ "GL_PIXEL_PACK_BUFFER_EXT\0"
3333+ "GL_PIXEL_UNPACK_BUFFER_BINDING_EXT\0"
3334+ "GL_PIXEL_UNPACK_BUFFER_EXT\0"
3335+ "GL_POINT\0"
3336+ "GL_POINTS\0"
3337+ "GL_POINT_BIT\0"
3338+ "GL_POINT_DISTANCE_ATTENUATION\0"
3339+ "GL_POINT_DISTANCE_ATTENUATION_ARB\0"
3340+ "GL_POINT_DISTANCE_ATTENUATION_EXT\0"
3341+ "GL_POINT_DISTANCE_ATTENUATION_SGIS\0"
3342+ "GL_POINT_FADE_THRESHOLD_SIZE\0"
3343+ "GL_POINT_FADE_THRESHOLD_SIZE_ARB\0"
3344+ "GL_POINT_FADE_THRESHOLD_SIZE_EXT\0"
3345+ "GL_POINT_FADE_THRESHOLD_SIZE_SGIS\0"
3346+ "GL_POINT_SIZE\0"
3347+ "GL_POINT_SIZE_GRANULARITY\0"
3348+ "GL_POINT_SIZE_MAX\0"
3349+ "GL_POINT_SIZE_MAX_ARB\0"
3350+ "GL_POINT_SIZE_MAX_EXT\0"
3351+ "GL_POINT_SIZE_MAX_SGIS\0"
3352+ "GL_POINT_SIZE_MIN\0"
3353+ "GL_POINT_SIZE_MIN_ARB\0"
3354+ "GL_POINT_SIZE_MIN_EXT\0"
3355+ "GL_POINT_SIZE_MIN_SGIS\0"
3356+ "GL_POINT_SIZE_RANGE\0"
3357+ "GL_POINT_SMOOTH\0"
3358+ "GL_POINT_SMOOTH_HINT\0"
3359+ "GL_POINT_SPRITE\0"
3360+ "GL_POINT_SPRITE_ARB\0"
3361+ "GL_POINT_SPRITE_COORD_ORIGIN\0"
3362+ "GL_POINT_SPRITE_NV\0"
3363+ "GL_POINT_SPRITE_R_MODE_NV\0"
3364+ "GL_POINT_TOKEN\0"
3365+ "GL_POLYGON\0"
3366+ "GL_POLYGON_BIT\0"
3367+ "GL_POLYGON_MODE\0"
3368+ "GL_POLYGON_OFFSET_BIAS\0"
3369+ "GL_POLYGON_OFFSET_FACTOR\0"
3370+ "GL_POLYGON_OFFSET_FILL\0"
3371+ "GL_POLYGON_OFFSET_LINE\0"
3372+ "GL_POLYGON_OFFSET_POINT\0"
3373+ "GL_POLYGON_OFFSET_UNITS\0"
3374+ "GL_POLYGON_SMOOTH\0"
3375+ "GL_POLYGON_SMOOTH_HINT\0"
3376+ "GL_POLYGON_STIPPLE\0"
3377+ "GL_POLYGON_STIPPLE_BIT\0"
3378+ "GL_POLYGON_TOKEN\0"
3379+ "GL_POSITION\0"
3380+ "GL_POST_COLOR_MATRIX_ALPHA_BIAS\0"
3381+ "GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI\0"
3382+ "GL_POST_COLOR_MATRIX_ALPHA_SCALE\0"
3383+ "GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI\0"
3384+ "GL_POST_COLOR_MATRIX_BLUE_BIAS\0"
3385+ "GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI\0"
3386+ "GL_POST_COLOR_MATRIX_BLUE_SCALE\0"
3387+ "GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI\0"
3388+ "GL_POST_COLOR_MATRIX_COLOR_TABLE\0"
3389+ "GL_POST_COLOR_MATRIX_GREEN_BIAS\0"
3390+ "GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI\0"
3391+ "GL_POST_COLOR_MATRIX_GREEN_SCALE\0"
3392+ "GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI\0"
3393+ "GL_POST_COLOR_MATRIX_RED_BIAS\0"
3394+ "GL_POST_COLOR_MATRIX_RED_BIAS_SGI\0"
3395+ "GL_POST_COLOR_MATRIX_RED_SCALE\0"
3396+ "GL_POST_COLOR_MATRIX_RED_SCALE_SGI\0"
3397+ "GL_POST_CONVOLUTION_ALPHA_BIAS\0"
3398+ "GL_POST_CONVOLUTION_ALPHA_BIAS_EXT\0"
3399+ "GL_POST_CONVOLUTION_ALPHA_SCALE\0"
3400+ "GL_POST_CONVOLUTION_ALPHA_SCALE_EXT\0"
3401+ "GL_POST_CONVOLUTION_BLUE_BIAS\0"
3402+ "GL_POST_CONVOLUTION_BLUE_BIAS_EXT\0"
3403+ "GL_POST_CONVOLUTION_BLUE_SCALE\0"
3404+ "GL_POST_CONVOLUTION_BLUE_SCALE_EXT\0"
3405+ "GL_POST_CONVOLUTION_COLOR_TABLE\0"
3406+ "GL_POST_CONVOLUTION_GREEN_BIAS\0"
3407+ "GL_POST_CONVOLUTION_GREEN_BIAS_EXT\0"
3408+ "GL_POST_CONVOLUTION_GREEN_SCALE\0"
3409+ "GL_POST_CONVOLUTION_GREEN_SCALE_EXT\0"
3410+ "GL_POST_CONVOLUTION_RED_BIAS\0"
3411+ "GL_POST_CONVOLUTION_RED_BIAS_EXT\0"
3412+ "GL_POST_CONVOLUTION_RED_SCALE\0"
3413+ "GL_POST_CONVOLUTION_RED_SCALE_EXT\0"
3414+ "GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX\0"
3415+ "GL_POST_TEXTURE_FILTER_BIAS_SGIX\0"
3416+ "GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX\0"
3417+ "GL_POST_TEXTURE_FILTER_SCALE_SGIX\0"
3418+ "GL_PREVIOUS\0"
3419+ "GL_PREVIOUS_ARB\0"
3420+ "GL_PREVIOUS_EXT\0"
3421+ "GL_PRIMARY_COLOR\0"
3422+ "GL_PRIMARY_COLOR_ARB\0"
3423+ "GL_PRIMARY_COLOR_EXT\0"
3424+ "GL_PROGRAM_ADDRESS_REGISTERS_ARB\0"
3425+ "GL_PROGRAM_ALU_INSTRUCTIONS_ARB\0"
3426+ "GL_PROGRAM_ATTRIBS_ARB\0"
3427+ "GL_PROGRAM_BINDING_ARB\0"
3428+ "GL_PROGRAM_ERROR_POSITION_ARB\0"
3429+ "GL_PROGRAM_ERROR_POSITION_NV\0"
3430+ "GL_PROGRAM_ERROR_STRING_ARB\0"
3431+ "GL_PROGRAM_FORMAT_ARB\0"
3432+ "GL_PROGRAM_FORMAT_ASCII_ARB\0"
3433+ "GL_PROGRAM_INSTRUCTIONS_ARB\0"
3434+ "GL_PROGRAM_LENGTH_ARB\0"
3435+ "GL_PROGRAM_LENGTH_NV\0"
3436+ "GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB\0"
3437+ "GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB\0"
3438+ "GL_PROGRAM_NATIVE_ATTRIBS_ARB\0"
3439+ "GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB\0"
3440+ "GL_PROGRAM_NATIVE_PARAMETERS_ARB\0"
3441+ "GL_PROGRAM_NATIVE_TEMPORARIES_ARB\0"
3442+ "GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB\0"
3443+ "GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB\0"
3444+ "GL_PROGRAM_OBJECT_ARB\0"
3445+ "GL_PROGRAM_PARAMETERS_ARB\0"
3446+ "GL_PROGRAM_PARAMETER_NV\0"
3447+ "GL_PROGRAM_RESIDENT_NV\0"
3448+ "GL_PROGRAM_STRING_ARB\0"
3449+ "GL_PROGRAM_STRING_NV\0"
3450+ "GL_PROGRAM_TARGET_NV\0"
3451+ "GL_PROGRAM_TEMPORARIES_ARB\0"
3452+ "GL_PROGRAM_TEX_INDIRECTIONS_ARB\0"
3453+ "GL_PROGRAM_TEX_INSTRUCTIONS_ARB\0"
3454+ "GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB\0"
3455+ "GL_PROJECTION\0"
3456+ "GL_PROJECTION_MATRIX\0"
3457+ "GL_PROJECTION_STACK_DEPTH\0"
3458+ "GL_PROXY_COLOR_TABLE\0"
3459+ "GL_PROXY_HISTOGRAM\0"
3460+ "GL_PROXY_HISTOGRAM_EXT\0"
3461+ "GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE\0"
3462+ "GL_PROXY_POST_CONVOLUTION_COLOR_TABLE\0"
3463+ "GL_PROXY_TEXTURE_1D\0"
3464+ "GL_PROXY_TEXTURE_1D_ARRAY_EXT\0"
3465+ "GL_PROXY_TEXTURE_1D_EXT\0"
3466+ "GL_PROXY_TEXTURE_2D\0"
3467+ "GL_PROXY_TEXTURE_2D_ARRAY_EXT\0"
3468+ "GL_PROXY_TEXTURE_2D_EXT\0"
3469+ "GL_PROXY_TEXTURE_3D\0"
3470+ "GL_PROXY_TEXTURE_COLOR_TABLE_SGI\0"
3471+ "GL_PROXY_TEXTURE_CUBE_MAP\0"
3472+ "GL_PROXY_TEXTURE_CUBE_MAP_ARB\0"
3473+ "GL_PROXY_TEXTURE_RECTANGLE_ARB\0"
3474+ "GL_PROXY_TEXTURE_RECTANGLE_NV\0"
3475+ "GL_Q\0"
3476+ "GL_QUADRATIC_ATTENUATION\0"
3477+ "GL_QUADS\0"
3478+ "GL_QUAD_MESH_SUN\0"
3479+ "GL_QUAD_STRIP\0"
3480+ "GL_QUERY_COUNTER_BITS\0"
3481+ "GL_QUERY_COUNTER_BITS_ARB\0"
3482+ "GL_QUERY_RESULT\0"
3483+ "GL_QUERY_RESULT_ARB\0"
3484+ "GL_QUERY_RESULT_AVAILABLE\0"
3485+ "GL_QUERY_RESULT_AVAILABLE_ARB\0"
3486+ "GL_R\0"
3487+ "GL_R3_G3_B2\0"
3488+ "GL_RASTER_POSITION_UNCLIPPED_IBM\0"
3489+ "GL_READ_BUFFER\0"
3490+ "GL_READ_FRAMEBUFFER_BINDING_EXT\0"
3491+ "GL_READ_FRAMEBUFFER_EXT\0"
3492+ "GL_READ_ONLY\0"
3493+ "GL_READ_ONLY_ARB\0"
3494+ "GL_READ_WRITE\0"
3495+ "GL_READ_WRITE_ARB\0"
3496+ "GL_RED\0"
3497+ "GL_REDUCE\0"
3498+ "GL_REDUCE_EXT\0"
3499+ "GL_RED_BIAS\0"
3500+ "GL_RED_BITS\0"
3501+ "GL_RED_SCALE\0"
3502+ "GL_REFLECTION_MAP\0"
3503+ "GL_REFLECTION_MAP_ARB\0"
3504+ "GL_REFLECTION_MAP_NV\0"
3505+ "GL_RENDER\0"
3506+ "GL_RENDERBUFFER_BINDING_EXT\0"
3507+ "GL_RENDERBUFFER_EXT\0"
3508+ "GL_RENDERBUFFER_HEIGHT_EXT\0"
3509+ "GL_RENDERBUFFER_INTERNAL_FORMAT_EXT\0"
3510+ "GL_RENDERBUFFER_WIDTH_EXT\0"
3511+ "GL_RENDERER\0"
3512+ "GL_RENDER_MODE\0"
3513+ "GL_REPEAT\0"
3514+ "GL_REPLACE\0"
3515+ "GL_REPLACE_EXT\0"
3516+ "GL_REPLICATE_BORDER_HP\0"
3517+ "GL_RESCALE_NORMAL\0"
3518+ "GL_RESCALE_NORMAL_EXT\0"
3519+ "GL_RETURN\0"
3520+ "GL_RGB\0"
3521+ "GL_RGB10\0"
3522+ "GL_RGB10_A2\0"
3523+ "GL_RGB10_A2_EXT\0"
3524+ "GL_RGB10_EXT\0"
3525+ "GL_RGB12\0"
3526+ "GL_RGB12_EXT\0"
3527+ "GL_RGB16\0"
3528+ "GL_RGB16_EXT\0"
3529+ "GL_RGB2_EXT\0"
3530+ "GL_RGB4\0"
3531+ "GL_RGB4_EXT\0"
3532+ "GL_RGB4_S3TC\0"
3533+ "GL_RGB5\0"
3534+ "GL_RGB5_A1\0"
3535+ "GL_RGB5_A1_EXT\0"
3536+ "GL_RGB5_EXT\0"
3537+ "GL_RGB8\0"
3538+ "GL_RGB8_EXT\0"
3539+ "GL_RGBA\0"
3540+ "GL_RGBA12\0"
3541+ "GL_RGBA12_EXT\0"
3542+ "GL_RGBA16\0"
3543+ "GL_RGBA16_EXT\0"
3544+ "GL_RGBA2\0"
3545+ "GL_RGBA2_EXT\0"
3546+ "GL_RGBA4\0"
3547+ "GL_RGBA4_DXT5_S3TC\0"
3548+ "GL_RGBA4_EXT\0"
3549+ "GL_RGBA4_S3TC\0"
3550+ "GL_RGBA8\0"
3551+ "GL_RGBA8_EXT\0"
3552+ "GL_RGBA_DXT5_S3TC\0"
3553+ "GL_RGBA_MODE\0"
3554+ "GL_RGBA_S3TC\0"
3555+ "GL_RGB_S3TC\0"
3556+ "GL_RGB_SCALE\0"
3557+ "GL_RGB_SCALE_ARB\0"
3558+ "GL_RGB_SCALE_EXT\0"
3559+ "GL_RIGHT\0"
3560+ "GL_S\0"
3561+ "GL_SAMPLER_1D\0"
3562+ "GL_SAMPLER_1D_SHADOW\0"
3563+ "GL_SAMPLER_2D\0"
3564+ "GL_SAMPLER_2D_SHADOW\0"
3565+ "GL_SAMPLER_3D\0"
3566+ "GL_SAMPLER_CUBE\0"
3567+ "GL_SAMPLES\0"
3568+ "GL_SAMPLES_3DFX\0"
3569+ "GL_SAMPLES_ARB\0"
3570+ "GL_SAMPLES_PASSED\0"
3571+ "GL_SAMPLES_PASSED_ARB\0"
3572+ "GL_SAMPLE_ALPHA_TO_COVERAGE\0"
3573+ "GL_SAMPLE_ALPHA_TO_COVERAGE_ARB\0"
3574+ "GL_SAMPLE_ALPHA_TO_ONE\0"
3575+ "GL_SAMPLE_ALPHA_TO_ONE_ARB\0"
3576+ "GL_SAMPLE_BUFFERS\0"
3577+ "GL_SAMPLE_BUFFERS_3DFX\0"
3578+ "GL_SAMPLE_BUFFERS_ARB\0"
3579+ "GL_SAMPLE_COVERAGE\0"
3580+ "GL_SAMPLE_COVERAGE_ARB\0"
3581+ "GL_SAMPLE_COVERAGE_INVERT\0"
3582+ "GL_SAMPLE_COVERAGE_INVERT_ARB\0"
3583+ "GL_SAMPLE_COVERAGE_VALUE\0"
3584+ "GL_SAMPLE_COVERAGE_VALUE_ARB\0"
3585+ "GL_SCISSOR_BIT\0"
3586+ "GL_SCISSOR_BOX\0"
3587+ "GL_SCISSOR_TEST\0"
3588+ "GL_SECONDARY_COLOR_ARRAY\0"
3589+ "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING\0"
3590+ "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB\0"
3591+ "GL_SECONDARY_COLOR_ARRAY_POINTER\0"
3592+ "GL_SECONDARY_COLOR_ARRAY_SIZE\0"
3593+ "GL_SECONDARY_COLOR_ARRAY_STRIDE\0"
3594+ "GL_SECONDARY_COLOR_ARRAY_TYPE\0"
3595+ "GL_SELECT\0"
3596+ "GL_SELECTION_BUFFER_POINTER\0"
3597+ "GL_SELECTION_BUFFER_SIZE\0"
3598+ "GL_SEPARABLE_2D\0"
3599+ "GL_SEPARATE_SPECULAR_COLOR\0"
3600+ "GL_SEPARATE_SPECULAR_COLOR_EXT\0"
3601+ "GL_SET\0"
3602+ "GL_SHADER_OBJECT_ARB\0"
3603+ "GL_SHADER_SOURCE_LENGTH\0"
3604+ "GL_SHADER_TYPE\0"
3605+ "GL_SHADE_MODEL\0"
3606+ "GL_SHADING_LANGUAGE_VERSION\0"
3607+ "GL_SHADOW_AMBIENT_SGIX\0"
3608+ "GL_SHARED_TEXTURE_PALETTE_EXT\0"
3609+ "GL_SHININESS\0"
3610+ "GL_SHORT\0"
3611+ "GL_SINGLE_COLOR\0"
3612+ "GL_SINGLE_COLOR_EXT\0"
3613+ "GL_SLICE_ACCUM_SUN\0"
3614+ "GL_SMOOTH\0"
3615+ "GL_SMOOTH_LINE_WIDTH_GRANULARITY\0"
3616+ "GL_SMOOTH_LINE_WIDTH_RANGE\0"
3617+ "GL_SMOOTH_POINT_SIZE_GRANULARITY\0"
3618+ "GL_SMOOTH_POINT_SIZE_RANGE\0"
3619+ "GL_SOURCE0_ALPHA\0"
3620+ "GL_SOURCE0_ALPHA_ARB\0"
3621+ "GL_SOURCE0_ALPHA_EXT\0"
3622+ "GL_SOURCE0_RGB\0"
3623+ "GL_SOURCE0_RGB_ARB\0"
3624+ "GL_SOURCE0_RGB_EXT\0"
3625+ "GL_SOURCE1_ALPHA\0"
3626+ "GL_SOURCE1_ALPHA_ARB\0"
3627+ "GL_SOURCE1_ALPHA_EXT\0"
3628+ "GL_SOURCE1_RGB\0"
3629+ "GL_SOURCE1_RGB_ARB\0"
3630+ "GL_SOURCE1_RGB_EXT\0"
3631+ "GL_SOURCE2_ALPHA\0"
3632+ "GL_SOURCE2_ALPHA_ARB\0"
3633+ "GL_SOURCE2_ALPHA_EXT\0"
3634+ "GL_SOURCE2_RGB\0"
3635+ "GL_SOURCE2_RGB_ARB\0"
3636+ "GL_SOURCE2_RGB_EXT\0"
3637+ "GL_SOURCE3_ALPHA_NV\0"
3638+ "GL_SOURCE3_RGB_NV\0"
3639+ "GL_SPECULAR\0"
3640+ "GL_SPHERE_MAP\0"
3641+ "GL_SPOT_CUTOFF\0"
3642+ "GL_SPOT_DIRECTION\0"
3643+ "GL_SPOT_EXPONENT\0"
3644+ "GL_SRC0_ALPHA\0"
3645+ "GL_SRC0_RGB\0"
3646+ "GL_SRC1_ALPHA\0"
3647+ "GL_SRC1_RGB\0"
3648+ "GL_SRC2_ALPHA\0"
3649+ "GL_SRC2_RGB\0"
3650+ "GL_SRC_ALPHA\0"
3651+ "GL_SRC_ALPHA_SATURATE\0"
3652+ "GL_SRC_COLOR\0"
3653+ "GL_STACK_OVERFLOW\0"
3654+ "GL_STACK_UNDERFLOW\0"
3655+ "GL_STATIC_COPY\0"
3656+ "GL_STATIC_COPY_ARB\0"
3657+ "GL_STATIC_DRAW\0"
3658+ "GL_STATIC_DRAW_ARB\0"
3659+ "GL_STATIC_READ\0"
3660+ "GL_STATIC_READ_ARB\0"
3661+ "GL_STENCIL\0"
3662+ "GL_STENCIL_ATTACHMENT_EXT\0"
3663+ "GL_STENCIL_BACK_FAIL\0"
3664+ "GL_STENCIL_BACK_FUNC\0"
3665+ "GL_STENCIL_BACK_PASS_DEPTH_FAIL\0"
3666+ "GL_STENCIL_BACK_PASS_DEPTH_PASS\0"
3667+ "GL_STENCIL_BACK_REF\0"
3668+ "GL_STENCIL_BACK_VALUE_MASK\0"
3669+ "GL_STENCIL_BACK_WRITEMASK\0"
3670+ "GL_STENCIL_BITS\0"
3671+ "GL_STENCIL_BUFFER_BIT\0"
3672+ "GL_STENCIL_CLEAR_VALUE\0"
3673+ "GL_STENCIL_FAIL\0"
3674+ "GL_STENCIL_FUNC\0"
3675+ "GL_STENCIL_INDEX\0"
3676+ "GL_STENCIL_INDEX16_EXT\0"
3677+ "GL_STENCIL_INDEX1_EXT\0"
3678+ "GL_STENCIL_INDEX4_EXT\0"
3679+ "GL_STENCIL_INDEX8_EXT\0"
3680+ "GL_STENCIL_INDEX_EXT\0"
3681+ "GL_STENCIL_PASS_DEPTH_FAIL\0"
3682+ "GL_STENCIL_PASS_DEPTH_PASS\0"
3683+ "GL_STENCIL_REF\0"
3684+ "GL_STENCIL_TEST\0"
3685+ "GL_STENCIL_TEST_TWO_SIDE_EXT\0"
3686+ "GL_STENCIL_VALUE_MASK\0"
3687+ "GL_STENCIL_WRITEMASK\0"
3688+ "GL_STEREO\0"
3689+ "GL_STREAM_COPY\0"
3690+ "GL_STREAM_COPY_ARB\0"
3691+ "GL_STREAM_DRAW\0"
3692+ "GL_STREAM_DRAW_ARB\0"
3693+ "GL_STREAM_READ\0"
3694+ "GL_STREAM_READ_ARB\0"
3695+ "GL_SUBPIXEL_BITS\0"
3696+ "GL_SUBTRACT\0"
3697+ "GL_SUBTRACT_ARB\0"
3698+ "GL_T\0"
3699+ "GL_T2F_C3F_V3F\0"
3700+ "GL_T2F_C4F_N3F_V3F\0"
3701+ "GL_T2F_C4UB_V3F\0"
3702+ "GL_T2F_N3F_V3F\0"
3703+ "GL_T2F_V3F\0"
3704+ "GL_T4F_C4F_N3F_V4F\0"
3705+ "GL_T4F_V4F\0"
3706+ "GL_TABLE_TOO_LARGE_EXT\0"
3707+ "GL_TEXTURE\0"
3708+ "GL_TEXTURE0\0"
3709+ "GL_TEXTURE0_ARB\0"
3710+ "GL_TEXTURE1\0"
3711+ "GL_TEXTURE10\0"
3712+ "GL_TEXTURE10_ARB\0"
3713+ "GL_TEXTURE11\0"
3714+ "GL_TEXTURE11_ARB\0"
3715+ "GL_TEXTURE12\0"
3716+ "GL_TEXTURE12_ARB\0"
3717+ "GL_TEXTURE13\0"
3718+ "GL_TEXTURE13_ARB\0"
3719+ "GL_TEXTURE14\0"
3720+ "GL_TEXTURE14_ARB\0"
3721+ "GL_TEXTURE15\0"
3722+ "GL_TEXTURE15_ARB\0"
3723+ "GL_TEXTURE16\0"
3724+ "GL_TEXTURE16_ARB\0"
3725+ "GL_TEXTURE17\0"
3726+ "GL_TEXTURE17_ARB\0"
3727+ "GL_TEXTURE18\0"
3728+ "GL_TEXTURE18_ARB\0"
3729+ "GL_TEXTURE19\0"
3730+ "GL_TEXTURE19_ARB\0"
3731+ "GL_TEXTURE1_ARB\0"
3732+ "GL_TEXTURE2\0"
3733+ "GL_TEXTURE20\0"
3734+ "GL_TEXTURE20_ARB\0"
3735+ "GL_TEXTURE21\0"
3736+ "GL_TEXTURE21_ARB\0"
3737+ "GL_TEXTURE22\0"
3738+ "GL_TEXTURE22_ARB\0"
3739+ "GL_TEXTURE23\0"
3740+ "GL_TEXTURE23_ARB\0"
3741+ "GL_TEXTURE24\0"
3742+ "GL_TEXTURE24_ARB\0"
3743+ "GL_TEXTURE25\0"
3744+ "GL_TEXTURE25_ARB\0"
3745+ "GL_TEXTURE26\0"
3746+ "GL_TEXTURE26_ARB\0"
3747+ "GL_TEXTURE27\0"
3748+ "GL_TEXTURE27_ARB\0"
3749+ "GL_TEXTURE28\0"
3750+ "GL_TEXTURE28_ARB\0"
3751+ "GL_TEXTURE29\0"
3752+ "GL_TEXTURE29_ARB\0"
3753+ "GL_TEXTURE2_ARB\0"
3754+ "GL_TEXTURE3\0"
3755+ "GL_TEXTURE30\0"
3756+ "GL_TEXTURE30_ARB\0"
3757+ "GL_TEXTURE31\0"
3758+ "GL_TEXTURE31_ARB\0"
3759+ "GL_TEXTURE3_ARB\0"
3760+ "GL_TEXTURE4\0"
3761+ "GL_TEXTURE4_ARB\0"
3762+ "GL_TEXTURE5\0"
3763+ "GL_TEXTURE5_ARB\0"
3764+ "GL_TEXTURE6\0"
3765+ "GL_TEXTURE6_ARB\0"
3766+ "GL_TEXTURE7\0"
3767+ "GL_TEXTURE7_ARB\0"
3768+ "GL_TEXTURE8\0"
3769+ "GL_TEXTURE8_ARB\0"
3770+ "GL_TEXTURE9\0"
3771+ "GL_TEXTURE9_ARB\0"
3772+ "GL_TEXTURE_1D\0"
3773+ "GL_TEXTURE_1D_ARRAY_EXT\0"
3774+ "GL_TEXTURE_2D\0"
3775+ "GL_TEXTURE_2D_ARRAY_EXT\0"
3776+ "GL_TEXTURE_3D\0"
3777+ "GL_TEXTURE_ALPHA_SIZE\0"
3778+ "GL_TEXTURE_ALPHA_SIZE_EXT\0"
3779+ "GL_TEXTURE_BASE_LEVEL\0"
3780+ "GL_TEXTURE_BINDING_1D\0"
3781+ "GL_TEXTURE_BINDING_1D_ARRAY_EXT\0"
3782+ "GL_TEXTURE_BINDING_2D\0"
3783+ "GL_TEXTURE_BINDING_2D_ARRAY_EXT\0"
3784+ "GL_TEXTURE_BINDING_3D\0"
3785+ "GL_TEXTURE_BINDING_CUBE_MAP\0"
3786+ "GL_TEXTURE_BINDING_CUBE_MAP_ARB\0"
3787+ "GL_TEXTURE_BINDING_RECTANGLE_ARB\0"
3788+ "GL_TEXTURE_BINDING_RECTANGLE_NV\0"
3789+ "GL_TEXTURE_BIT\0"
3790+ "GL_TEXTURE_BLUE_SIZE\0"
3791+ "GL_TEXTURE_BLUE_SIZE_EXT\0"
3792+ "GL_TEXTURE_BORDER\0"
3793+ "GL_TEXTURE_BORDER_COLOR\0"
3794+ "GL_TEXTURE_CLIPMAP_CENTER_SGIX\0"
3795+ "GL_TEXTURE_CLIPMAP_DEPTH_SGIX\0"
3796+ "GL_TEXTURE_CLIPMAP_FRAME_SGIX\0"
3797+ "GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX\0"
3798+ "GL_TEXTURE_CLIPMAP_OFFSET_SGIX\0"
3799+ "GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX\0"
3800+ "GL_TEXTURE_COLOR_TABLE_SGI\0"
3801+ "GL_TEXTURE_COLOR_WRITEMASK_SGIS\0"
3802+ "GL_TEXTURE_COMPARE_FAIL_VALUE_ARB\0"
3803+ "GL_TEXTURE_COMPARE_FUNC\0"
3804+ "GL_TEXTURE_COMPARE_FUNC_ARB\0"
3805+ "GL_TEXTURE_COMPARE_MODE\0"
3806+ "GL_TEXTURE_COMPARE_MODE_ARB\0"
3807+ "GL_TEXTURE_COMPARE_OPERATOR_SGIX\0"
3808+ "GL_TEXTURE_COMPARE_SGIX\0"
3809+ "GL_TEXTURE_COMPONENTS\0"
3810+ "GL_TEXTURE_COMPRESSED\0"
3811+ "GL_TEXTURE_COMPRESSED_ARB\0"
3812+ "GL_TEXTURE_COMPRESSED_FORMATS_ARB\0"
3813+ "GL_TEXTURE_COMPRESSED_IMAGE_SIZE\0"
3814+ "GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB\0"
3815+ "GL_TEXTURE_COMPRESSION_HINT\0"
3816+ "GL_TEXTURE_COMPRESSION_HINT_ARB\0"
3817+ "GL_TEXTURE_COORD_ARRAY\0"
3818+ "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING\0"
3819+ "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB\0"
3820+ "GL_TEXTURE_COORD_ARRAY_POINTER\0"
3821+ "GL_TEXTURE_COORD_ARRAY_SIZE\0"
3822+ "GL_TEXTURE_COORD_ARRAY_STRIDE\0"
3823+ "GL_TEXTURE_COORD_ARRAY_TYPE\0"
3824+ "GL_TEXTURE_CUBE_MAP\0"
3825+ "GL_TEXTURE_CUBE_MAP_ARB\0"
3826+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_X\0"
3827+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB\0"
3828+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y\0"
3829+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB\0"
3830+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z\0"
3831+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB\0"
3832+ "GL_TEXTURE_CUBE_MAP_POSITIVE_X\0"
3833+ "GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB\0"
3834+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Y\0"
3835+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB\0"
3836+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Z\0"
3837+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB\0"
3838+ "GL_TEXTURE_DEPTH\0"
3839+ "GL_TEXTURE_DEPTH_SIZE\0"
3840+ "GL_TEXTURE_DEPTH_SIZE_ARB\0"
3841+ "GL_TEXTURE_ENV\0"
3842+ "GL_TEXTURE_ENV_COLOR\0"
3843+ "GL_TEXTURE_ENV_MODE\0"
3844+ "GL_TEXTURE_FILTER_CONTROL\0"
3845+ "GL_TEXTURE_GEN_MODE\0"
3846+ "GL_TEXTURE_GEN_Q\0"
3847+ "GL_TEXTURE_GEN_R\0"
3848+ "GL_TEXTURE_GEN_S\0"
3849+ "GL_TEXTURE_GEN_T\0"
3850+ "GL_TEXTURE_GEQUAL_R_SGIX\0"
3851+ "GL_TEXTURE_GREEN_SIZE\0"
3852+ "GL_TEXTURE_GREEN_SIZE_EXT\0"
3853+ "GL_TEXTURE_HEIGHT\0"
3854+ "GL_TEXTURE_INDEX_SIZE_EXT\0"
3855+ "GL_TEXTURE_INTENSITY_SIZE\0"
3856+ "GL_TEXTURE_INTENSITY_SIZE_EXT\0"
3857+ "GL_TEXTURE_INTERNAL_FORMAT\0"
3858+ "GL_TEXTURE_LEQUAL_R_SGIX\0"
3859+ "GL_TEXTURE_LOD_BIAS\0"
3860+ "GL_TEXTURE_LOD_BIAS_EXT\0"
3861+ "GL_TEXTURE_LOD_BIAS_R_SGIX\0"
3862+ "GL_TEXTURE_LOD_BIAS_S_SGIX\0"
3863+ "GL_TEXTURE_LOD_BIAS_T_SGIX\0"
3864+ "GL_TEXTURE_LUMINANCE_SIZE\0"
3865+ "GL_TEXTURE_LUMINANCE_SIZE_EXT\0"
3866+ "GL_TEXTURE_MAG_FILTER\0"
3867+ "GL_TEXTURE_MATRIX\0"
3868+ "GL_TEXTURE_MAX_ANISOTROPY_EXT\0"
3869+ "GL_TEXTURE_MAX_CLAMP_R_SGIX\0"
3870+ "GL_TEXTURE_MAX_CLAMP_S_SGIX\0"
3871+ "GL_TEXTURE_MAX_CLAMP_T_SGIX\0"
3872+ "GL_TEXTURE_MAX_LEVEL\0"
3873+ "GL_TEXTURE_MAX_LOD\0"
3874+ "GL_TEXTURE_MIN_FILTER\0"
3875+ "GL_TEXTURE_MIN_LOD\0"
3876+ "GL_TEXTURE_PRIORITY\0"
3877+ "GL_TEXTURE_RECTANGLE_ARB\0"
3878+ "GL_TEXTURE_RECTANGLE_NV\0"
3879+ "GL_TEXTURE_RED_SIZE\0"
3880+ "GL_TEXTURE_RED_SIZE_EXT\0"
3881+ "GL_TEXTURE_RESIDENT\0"
3882+ "GL_TEXTURE_STACK_DEPTH\0"
3883+ "GL_TEXTURE_TOO_LARGE_EXT\0"
3884+ "GL_TEXTURE_UNSIGNED_REMAP_MODE_NV\0"
3885+ "GL_TEXTURE_WIDTH\0"
3886+ "GL_TEXTURE_WRAP_R\0"
3887+ "GL_TEXTURE_WRAP_S\0"
3888+ "GL_TEXTURE_WRAP_T\0"
3889+ "GL_TIME_ELAPSED_EXT\0"
3890+ "GL_TRACK_MATRIX_NV\0"
3891+ "GL_TRACK_MATRIX_TRANSFORM_NV\0"
3892+ "GL_TRANSFORM_BIT\0"
3893+ "GL_TRANSPOSE_COLOR_MATRIX\0"
3894+ "GL_TRANSPOSE_COLOR_MATRIX_ARB\0"
3895+ "GL_TRANSPOSE_CURRENT_MATRIX_ARB\0"
3896+ "GL_TRANSPOSE_MODELVIEW_MATRIX\0"
3897+ "GL_TRANSPOSE_MODELVIEW_MATRIX_ARB\0"
3898+ "GL_TRANSPOSE_NV\0"
3899+ "GL_TRANSPOSE_PROJECTION_MATRIX\0"
3900+ "GL_TRANSPOSE_PROJECTION_MATRIX_ARB\0"
3901+ "GL_TRANSPOSE_TEXTURE_MATRIX\0"
3902+ "GL_TRANSPOSE_TEXTURE_MATRIX_ARB\0"
3903+ "GL_TRIANGLES\0"
3904+ "GL_TRIANGLE_FAN\0"
3905+ "GL_TRIANGLE_MESH_SUN\0"
3906+ "GL_TRIANGLE_STRIP\0"
3907+ "GL_TRUE\0"
3908+ "GL_UNPACK_ALIGNMENT\0"
3909+ "GL_UNPACK_IMAGE_HEIGHT\0"
3910+ "GL_UNPACK_LSB_FIRST\0"
3911+ "GL_UNPACK_ROW_LENGTH\0"
3912+ "GL_UNPACK_SKIP_IMAGES\0"
3913+ "GL_UNPACK_SKIP_PIXELS\0"
3914+ "GL_UNPACK_SKIP_ROWS\0"
3915+ "GL_UNPACK_SWAP_BYTES\0"
3916+ "GL_UNSIGNED_BYTE\0"
3917+ "GL_UNSIGNED_BYTE_2_3_3_REV\0"
3918+ "GL_UNSIGNED_BYTE_3_3_2\0"
3919+ "GL_UNSIGNED_INT\0"
3920+ "GL_UNSIGNED_INT_10_10_10_2\0"
3921+ "GL_UNSIGNED_INT_24_8_NV\0"
3922+ "GL_UNSIGNED_INT_2_10_10_10_REV\0"
3923+ "GL_UNSIGNED_INT_8_8_8_8\0"
3924+ "GL_UNSIGNED_INT_8_8_8_8_REV\0"
3925+ "GL_UNSIGNED_SHORT\0"
3926+ "GL_UNSIGNED_SHORT_1_5_5_5_REV\0"
3927+ "GL_UNSIGNED_SHORT_4_4_4_4\0"
3928+ "GL_UNSIGNED_SHORT_4_4_4_4_REV\0"
3929+ "GL_UNSIGNED_SHORT_5_5_5_1\0"
3930+ "GL_UNSIGNED_SHORT_5_6_5\0"
3931+ "GL_UNSIGNED_SHORT_5_6_5_REV\0"
3932+ "GL_UNSIGNED_SHORT_8_8_APPLE\0"
3933+ "GL_UNSIGNED_SHORT_8_8_MESA\0"
3934+ "GL_UNSIGNED_SHORT_8_8_REV_APPLE\0"
3935+ "GL_UNSIGNED_SHORT_8_8_REV_MESA\0"
3936+ "GL_UPPER_LEFT\0"
3937+ "GL_V2F\0"
3938+ "GL_V3F\0"
3939+ "GL_VALIDATE_STATUS\0"
3940+ "GL_VENDOR\0"
3941+ "GL_VERSION\0"
3942+ "GL_VERTEX_ARRAY\0"
3943+ "GL_VERTEX_ARRAY_BINDING_APPLE\0"
3944+ "GL_VERTEX_ARRAY_BUFFER_BINDING\0"
3945+ "GL_VERTEX_ARRAY_BUFFER_BINDING_ARB\0"
3946+ "GL_VERTEX_ARRAY_POINTER\0"
3947+ "GL_VERTEX_ARRAY_SIZE\0"
3948+ "GL_VERTEX_ARRAY_STRIDE\0"
3949+ "GL_VERTEX_ARRAY_TYPE\0"
3950+ "GL_VERTEX_ATTRIB_ARRAY0_NV\0"
3951+ "GL_VERTEX_ATTRIB_ARRAY10_NV\0"
3952+ "GL_VERTEX_ATTRIB_ARRAY11_NV\0"
3953+ "GL_VERTEX_ATTRIB_ARRAY12_NV\0"
3954+ "GL_VERTEX_ATTRIB_ARRAY13_NV\0"
3955+ "GL_VERTEX_ATTRIB_ARRAY14_NV\0"
3956+ "GL_VERTEX_ATTRIB_ARRAY15_NV\0"
3957+ "GL_VERTEX_ATTRIB_ARRAY1_NV\0"
3958+ "GL_VERTEX_ATTRIB_ARRAY2_NV\0"
3959+ "GL_VERTEX_ATTRIB_ARRAY3_NV\0"
3960+ "GL_VERTEX_ATTRIB_ARRAY4_NV\0"
3961+ "GL_VERTEX_ATTRIB_ARRAY5_NV\0"
3962+ "GL_VERTEX_ATTRIB_ARRAY6_NV\0"
3963+ "GL_VERTEX_ATTRIB_ARRAY7_NV\0"
3964+ "GL_VERTEX_ATTRIB_ARRAY8_NV\0"
3965+ "GL_VERTEX_ATTRIB_ARRAY9_NV\0"
3966+ "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\0"
3967+ "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB\0"
3968+ "GL_VERTEX_ATTRIB_ARRAY_ENABLED\0"
3969+ "GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB\0"
3970+ "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED\0"
3971+ "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB\0"
3972+ "GL_VERTEX_ATTRIB_ARRAY_POINTER\0"
3973+ "GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB\0"
3974+ "GL_VERTEX_ATTRIB_ARRAY_SIZE\0"
3975+ "GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB\0"
3976+ "GL_VERTEX_ATTRIB_ARRAY_STRIDE\0"
3977+ "GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB\0"
3978+ "GL_VERTEX_ATTRIB_ARRAY_TYPE\0"
3979+ "GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB\0"
3980+ "GL_VERTEX_BLEND_ARB\0"
3981+ "GL_VERTEX_PROGRAM_ARB\0"
3982+ "GL_VERTEX_PROGRAM_BINDING_NV\0"
3983+ "GL_VERTEX_PROGRAM_NV\0"
3984+ "GL_VERTEX_PROGRAM_POINT_SIZE\0"
3985+ "GL_VERTEX_PROGRAM_POINT_SIZE_ARB\0"
3986+ "GL_VERTEX_PROGRAM_POINT_SIZE_NV\0"
3987+ "GL_VERTEX_PROGRAM_TWO_SIDE\0"
3988+ "GL_VERTEX_PROGRAM_TWO_SIDE_ARB\0"
3989+ "GL_VERTEX_PROGRAM_TWO_SIDE_NV\0"
3990+ "GL_VERTEX_SHADER\0"
3991+ "GL_VERTEX_SHADER_ARB\0"
3992+ "GL_VERTEX_STATE_PROGRAM_NV\0"
3993+ "GL_VIEWPORT\0"
3994+ "GL_VIEWPORT_BIT\0"
3995+ "GL_WEIGHT_ARRAY_ARB\0"
3996+ "GL_WEIGHT_ARRAY_BUFFER_BINDING\0"
3997+ "GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB\0"
3998+ "GL_WEIGHT_ARRAY_POINTER_ARB\0"
3999+ "GL_WEIGHT_ARRAY_SIZE_ARB\0"
4000+ "GL_WEIGHT_ARRAY_STRIDE_ARB\0"
4001+ "GL_WEIGHT_ARRAY_TYPE_ARB\0"
4002+ "GL_WEIGHT_SUM_UNITY_ARB\0"
4003+ "GL_WRAP_BORDER_SUN\0"
4004+ "GL_WRITE_ONLY\0"
4005+ "GL_WRITE_ONLY_ARB\0"
4006+ "GL_XOR\0"
4007+ "GL_YCBCR_422_APPLE\0"
4008+ "GL_YCBCR_MESA\0"
4009+ "GL_ZERO\0"
4010+ "GL_ZOOM_X\0"
4011+ "GL_ZOOM_Y\0"
4012+ ;
4013+
4014+static const enum_elt all_enums[1746] =
4015+{
4016+ { 0, 0x00000600 }, /* GL_2D */
4017+ { 6, 0x00001407 }, /* GL_2_BYTES */
4018+ { 17, 0x00000601 }, /* GL_3D */
4019+ { 23, 0x00000602 }, /* GL_3D_COLOR */
4020+ { 35, 0x00000603 }, /* GL_3D_COLOR_TEXTURE */
4021+ { 55, 0x00001408 }, /* GL_3_BYTES */
4022+ { 66, 0x00000604 }, /* GL_4D_COLOR_TEXTURE */
4023+ { 86, 0x00001409 }, /* GL_4_BYTES */
4024+ { 97, 0x00000100 }, /* GL_ACCUM */
4025+ { 106, 0x00000D5B }, /* GL_ACCUM_ALPHA_BITS */
4026+ { 126, 0x00000D5A }, /* GL_ACCUM_BLUE_BITS */
4027+ { 145, 0x00000200 }, /* GL_ACCUM_BUFFER_BIT */
4028+ { 165, 0x00000B80 }, /* GL_ACCUM_CLEAR_VALUE */
4029+ { 186, 0x00000D59 }, /* GL_ACCUM_GREEN_BITS */
4030+ { 206, 0x00000D58 }, /* GL_ACCUM_RED_BITS */
4031+ { 224, 0x00008B89 }, /* GL_ACTIVE_ATTRIBUTES */
4032+ { 245, 0x00008B8A }, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
4033+ { 276, 0x00008911 }, /* GL_ACTIVE_STENCIL_FACE_EXT */
4034+ { 303, 0x000084E0 }, /* GL_ACTIVE_TEXTURE */
4035+ { 321, 0x000084E0 }, /* GL_ACTIVE_TEXTURE_ARB */
4036+ { 343, 0x00008B86 }, /* GL_ACTIVE_UNIFORMS */
4037+ { 362, 0x00008B87 }, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
4038+ { 391, 0x000086A5 }, /* GL_ACTIVE_VERTEX_UNITS_ARB */
4039+ { 418, 0x00000104 }, /* GL_ADD */
4040+ { 425, 0x00008574 }, /* GL_ADD_SIGNED */
4041+ { 439, 0x00008574 }, /* GL_ADD_SIGNED_ARB */
4042+ { 457, 0x00008574 }, /* GL_ADD_SIGNED_EXT */
4043+ { 475, 0x0000846E }, /* GL_ALIASED_LINE_WIDTH_RANGE */
4044+ { 503, 0x0000846D }, /* GL_ALIASED_POINT_SIZE_RANGE */
4045+ { 531, 0x000FFFFF }, /* GL_ALL_ATTRIB_BITS */
4046+ { 550, 0xFFFFFFFF }, /* GL_ALL_CLIENT_ATTRIB_BITS */
4047+ { 576, 0x00001906 }, /* GL_ALPHA */
4048+ { 585, 0x0000803D }, /* GL_ALPHA12 */
4049+ { 596, 0x0000803D }, /* GL_ALPHA12_EXT */
4050+ { 611, 0x0000803E }, /* GL_ALPHA16 */
4051+ { 622, 0x0000803E }, /* GL_ALPHA16_EXT */
4052+ { 637, 0x0000803B }, /* GL_ALPHA4 */
4053+ { 647, 0x0000803B }, /* GL_ALPHA4_EXT */
4054+ { 661, 0x0000803C }, /* GL_ALPHA8 */
4055+ { 671, 0x0000803C }, /* GL_ALPHA8_EXT */
4056+ { 685, 0x00000D1D }, /* GL_ALPHA_BIAS */
4057+ { 699, 0x00000D55 }, /* GL_ALPHA_BITS */
4058+ { 713, 0x00000D1C }, /* GL_ALPHA_SCALE */
4059+ { 728, 0x00000BC0 }, /* GL_ALPHA_TEST */
4060+ { 742, 0x00000BC1 }, /* GL_ALPHA_TEST_FUNC */
4061+ { 761, 0x00000BC2 }, /* GL_ALPHA_TEST_REF */
4062+ { 779, 0x00000207 }, /* GL_ALWAYS */
4063+ { 789, 0x00001200 }, /* GL_AMBIENT */
4064+ { 800, 0x00001602 }, /* GL_AMBIENT_AND_DIFFUSE */
4065+ { 823, 0x00001501 }, /* GL_AND */
4066+ { 830, 0x00001504 }, /* GL_AND_INVERTED */
4067+ { 846, 0x00001502 }, /* GL_AND_REVERSE */
4068+ { 861, 0x00008892 }, /* GL_ARRAY_BUFFER */
4069+ { 877, 0x00008892 }, /* GL_ARRAY_BUFFER_ARB */
4070+ { 897, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING */
4071+ { 921, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING_ARB */
4072+ { 949, 0x00008B85 }, /* GL_ATTACHED_SHADERS */
4073+ { 969, 0x00008645 }, /* GL_ATTRIB_ARRAY_POINTER_NV */
4074+ { 996, 0x00008623 }, /* GL_ATTRIB_ARRAY_SIZE_NV */
4075+ { 1020, 0x00008624 }, /* GL_ATTRIB_ARRAY_STRIDE_NV */
4076+ { 1046, 0x00008625 }, /* GL_ATTRIB_ARRAY_TYPE_NV */
4077+ { 1070, 0x00000BB0 }, /* GL_ATTRIB_STACK_DEPTH */
4078+ { 1092, 0x00000D80 }, /* GL_AUTO_NORMAL */
4079+ { 1107, 0x00000409 }, /* GL_AUX0 */
4080+ { 1115, 0x0000040A }, /* GL_AUX1 */
4081+ { 1123, 0x0000040B }, /* GL_AUX2 */
4082+ { 1131, 0x0000040C }, /* GL_AUX3 */
4083+ { 1139, 0x00000C00 }, /* GL_AUX_BUFFERS */
4084+ { 1154, 0x00000405 }, /* GL_BACK */
4085+ { 1162, 0x00000402 }, /* GL_BACK_LEFT */
4086+ { 1175, 0x00000403 }, /* GL_BACK_RIGHT */
4087+ { 1189, 0x000080E0 }, /* GL_BGR */
4088+ { 1196, 0x000080E1 }, /* GL_BGRA */
4089+ { 1204, 0x00001A00 }, /* GL_BITMAP */
4090+ { 1214, 0x00000704 }, /* GL_BITMAP_TOKEN */
4091+ { 1230, 0x00000BE2 }, /* GL_BLEND */
4092+ { 1239, 0x00008005 }, /* GL_BLEND_COLOR */
4093+ { 1254, 0x00008005 }, /* GL_BLEND_COLOR_EXT */
4094+ { 1273, 0x00000BE0 }, /* GL_BLEND_DST */
4095+ { 1286, 0x000080CA }, /* GL_BLEND_DST_ALPHA */
4096+ { 1305, 0x000080C8 }, /* GL_BLEND_DST_RGB */
4097+ { 1322, 0x00008009 }, /* GL_BLEND_EQUATION */
4098+ { 1340, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA */
4099+ { 1364, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_EXT */
4100+ { 1392, 0x00008009 }, /* GL_BLEND_EQUATION_EXT */
4101+ { 1414, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_EXT */
4102+ { 1440, 0x00000BE1 }, /* GL_BLEND_SRC */
4103+ { 1453, 0x000080CB }, /* GL_BLEND_SRC_ALPHA */
4104+ { 1472, 0x000080C9 }, /* GL_BLEND_SRC_RGB */
4105+ { 1489, 0x00001905 }, /* GL_BLUE */
4106+ { 1497, 0x00000D1B }, /* GL_BLUE_BIAS */
4107+ { 1510, 0x00000D54 }, /* GL_BLUE_BITS */
4108+ { 1523, 0x00000D1A }, /* GL_BLUE_SCALE */
4109+ { 1537, 0x00008B56 }, /* GL_BOOL */
4110+ { 1545, 0x00008B56 }, /* GL_BOOL_ARB */
4111+ { 1557, 0x00008B57 }, /* GL_BOOL_VEC2 */
4112+ { 1570, 0x00008B57 }, /* GL_BOOL_VEC2_ARB */
4113+ { 1587, 0x00008B58 }, /* GL_BOOL_VEC3 */
4114+ { 1600, 0x00008B58 }, /* GL_BOOL_VEC3_ARB */
4115+ { 1617, 0x00008B59 }, /* GL_BOOL_VEC4 */
4116+ { 1630, 0x00008B59 }, /* GL_BOOL_VEC4_ARB */
4117+ { 1647, 0x000088BB }, /* GL_BUFFER_ACCESS */
4118+ { 1664, 0x000088BB }, /* GL_BUFFER_ACCESS_ARB */
4119+ { 1685, 0x000088BC }, /* GL_BUFFER_MAPPED */
4120+ { 1702, 0x000088BC }, /* GL_BUFFER_MAPPED_ARB */
4121+ { 1723, 0x000088BD }, /* GL_BUFFER_MAP_POINTER */
4122+ { 1745, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_ARB */
4123+ { 1771, 0x00008764 }, /* GL_BUFFER_SIZE */
4124+ { 1786, 0x00008764 }, /* GL_BUFFER_SIZE_ARB */
4125+ { 1805, 0x00008765 }, /* GL_BUFFER_USAGE */
4126+ { 1821, 0x00008765 }, /* GL_BUFFER_USAGE_ARB */
4127+ { 1841, 0x00001400 }, /* GL_BYTE */
4128+ { 1849, 0x00002A24 }, /* GL_C3F_V3F */
4129+ { 1860, 0x00002A26 }, /* GL_C4F_N3F_V3F */
4130+ { 1875, 0x00002A22 }, /* GL_C4UB_V2F */
4131+ { 1887, 0x00002A23 }, /* GL_C4UB_V3F */
4132+ { 1899, 0x00000901 }, /* GL_CCW */
4133+ { 1906, 0x00002900 }, /* GL_CLAMP */
4134+ { 1915, 0x0000812D }, /* GL_CLAMP_TO_BORDER */
4135+ { 1934, 0x0000812D }, /* GL_CLAMP_TO_BORDER_ARB */
4136+ { 1957, 0x0000812D }, /* GL_CLAMP_TO_BORDER_SGIS */
4137+ { 1981, 0x0000812F }, /* GL_CLAMP_TO_EDGE */
4138+ { 1998, 0x0000812F }, /* GL_CLAMP_TO_EDGE_SGIS */
4139+ { 2020, 0x00001500 }, /* GL_CLEAR */
4140+ { 2029, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE */
4141+ { 2054, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE_ARB */
4142+ { 2083, 0xFFFFFFFF }, /* GL_CLIENT_ALL_ATTRIB_BITS */
4143+ { 2109, 0x00000BB1 }, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
4144+ { 2138, 0x00000001 }, /* GL_CLIENT_PIXEL_STORE_BIT */
4145+ { 2164, 0x00000002 }, /* GL_CLIENT_VERTEX_ARRAY_BIT */
4146+ { 2191, 0x00003000 }, /* GL_CLIP_PLANE0 */
4147+ { 2206, 0x00003001 }, /* GL_CLIP_PLANE1 */
4148+ { 2221, 0x00003002 }, /* GL_CLIP_PLANE2 */
4149+ { 2236, 0x00003003 }, /* GL_CLIP_PLANE3 */
4150+ { 2251, 0x00003004 }, /* GL_CLIP_PLANE4 */
4151+ { 2266, 0x00003005 }, /* GL_CLIP_PLANE5 */
4152+ { 2281, 0x000080F0 }, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
4153+ { 2314, 0x00000A00 }, /* GL_COEFF */
4154+ { 2323, 0x00001800 }, /* GL_COLOR */
4155+ { 2332, 0x00008076 }, /* GL_COLOR_ARRAY */
4156+ { 2347, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING */
4157+ { 2377, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING_ARB */
4158+ { 2411, 0x00008090 }, /* GL_COLOR_ARRAY_POINTER */
4159+ { 2434, 0x00008081 }, /* GL_COLOR_ARRAY_SIZE */
4160+ { 2454, 0x00008083 }, /* GL_COLOR_ARRAY_STRIDE */
4161+ { 2476, 0x00008082 }, /* GL_COLOR_ARRAY_TYPE */
4162+ { 2496, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_EXT */
4163+ { 2521, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10_EXT */
4164+ { 2547, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11_EXT */
4165+ { 2573, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12_EXT */
4166+ { 2599, 0x00008CED }, /* GL_COLOR_ATTACHMENT13_EXT */
4167+ { 2625, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14_EXT */
4168+ { 2651, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15_EXT */
4169+ { 2677, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1_EXT */
4170+ { 2702, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2_EXT */
4171+ { 2727, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3_EXT */
4172+ { 2752, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4_EXT */
4173+ { 2777, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5_EXT */
4174+ { 2802, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6_EXT */
4175+ { 2827, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7_EXT */
4176+ { 2852, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8_EXT */
4177+ { 2877, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9_EXT */
4178+ { 2902, 0x00004000 }, /* GL_COLOR_BUFFER_BIT */
4179+ { 2922, 0x00000C22 }, /* GL_COLOR_CLEAR_VALUE */
4180+ { 2943, 0x00001900 }, /* GL_COLOR_INDEX */
4181+ { 2958, 0x00001603 }, /* GL_COLOR_INDEXES */
4182+ { 2975, 0x00000BF2 }, /* GL_COLOR_LOGIC_OP */
4183+ { 2993, 0x00000B57 }, /* GL_COLOR_MATERIAL */
4184+ { 3011, 0x00000B55 }, /* GL_COLOR_MATERIAL_FACE */
4185+ { 3034, 0x00000B56 }, /* GL_COLOR_MATERIAL_PARAMETER */
4186+ { 3062, 0x000080B1 }, /* GL_COLOR_MATRIX */
4187+ { 3078, 0x000080B1 }, /* GL_COLOR_MATRIX_SGI */
4188+ { 3098, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH */
4189+ { 3126, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH_SGI */
4190+ { 3158, 0x00008458 }, /* GL_COLOR_SUM */
4191+ { 3171, 0x00008458 }, /* GL_COLOR_SUM_ARB */
4192+ { 3188, 0x000080D0 }, /* GL_COLOR_TABLE */
4193+ { 3203, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE */
4194+ { 3229, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_EXT */
4195+ { 3259, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_SGI */
4196+ { 3289, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS */
4197+ { 3309, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS_SGI */
4198+ { 3333, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE */
4199+ { 3358, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_EXT */
4200+ { 3387, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_SGI */
4201+ { 3416, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT */
4202+ { 3438, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_EXT */
4203+ { 3464, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_SGI */
4204+ { 3490, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE */
4205+ { 3516, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_EXT */
4206+ { 3546, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_SGI */
4207+ { 3576, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE */
4208+ { 3606, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_EXT */
4209+ { 3640, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_SGI */
4210+ { 3674, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
4211+ { 3704, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_EXT */
4212+ { 3738, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_SGI */
4213+ { 3772, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE */
4214+ { 3796, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_EXT */
4215+ { 3824, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_SGI */
4216+ { 3852, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE */
4217+ { 3873, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE_SGI */
4218+ { 3898, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH */
4219+ { 3919, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_EXT */
4220+ { 3944, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_SGI */
4221+ { 3969, 0x00000C23 }, /* GL_COLOR_WRITEMASK */
4222+ { 3988, 0x00008570 }, /* GL_COMBINE */
4223+ { 3999, 0x00008503 }, /* GL_COMBINE4 */
4224+ { 4011, 0x00008572 }, /* GL_COMBINE_ALPHA */
4225+ { 4028, 0x00008572 }, /* GL_COMBINE_ALPHA_ARB */
4226+ { 4049, 0x00008572 }, /* GL_COMBINE_ALPHA_EXT */
4227+ { 4070, 0x00008570 }, /* GL_COMBINE_ARB */
4228+ { 4085, 0x00008570 }, /* GL_COMBINE_EXT */
4229+ { 4100, 0x00008571 }, /* GL_COMBINE_RGB */
4230+ { 4115, 0x00008571 }, /* GL_COMBINE_RGB_ARB */
4231+ { 4134, 0x00008571 }, /* GL_COMBINE_RGB_EXT */
4232+ { 4153, 0x0000884E }, /* GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT */
4233+ { 4189, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE */
4234+ { 4213, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE_ARB */
4235+ { 4241, 0x00001300 }, /* GL_COMPILE */
4236+ { 4252, 0x00001301 }, /* GL_COMPILE_AND_EXECUTE */
4237+ { 4275, 0x00008B81 }, /* GL_COMPILE_STATUS */
4238+ { 4293, 0x000084E9 }, /* GL_COMPRESSED_ALPHA */
4239+ { 4313, 0x000084E9 }, /* GL_COMPRESSED_ALPHA_ARB */
4240+ { 4337, 0x000084EC }, /* GL_COMPRESSED_INTENSITY */
4241+ { 4361, 0x000084EC }, /* GL_COMPRESSED_INTENSITY_ARB */
4242+ { 4389, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE */
4243+ { 4413, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA */
4244+ { 4443, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA_ARB */
4245+ { 4477, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE_ARB */
4246+ { 4505, 0x000084ED }, /* GL_COMPRESSED_RGB */
4247+ { 4523, 0x000084EE }, /* GL_COMPRESSED_RGBA */
4248+ { 4542, 0x000084EE }, /* GL_COMPRESSED_RGBA_ARB */
4249+ { 4565, 0x000086B1 }, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
4250+ { 4594, 0x000083F1 }, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
4251+ { 4627, 0x000083F2 }, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
4252+ { 4660, 0x000083F3 }, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
4253+ { 4693, 0x000084ED }, /* GL_COMPRESSED_RGB_ARB */
4254+ { 4715, 0x000086B0 }, /* GL_COMPRESSED_RGB_FXT1_3DFX */
4255+ { 4743, 0x000083F0 }, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
4256+ { 4775, 0x000086A3 }, /* GL_COMPRESSED_TEXTURE_FORMATS */
4257+ { 4805, 0x00008576 }, /* GL_CONSTANT */
4258+ { 4817, 0x00008003 }, /* GL_CONSTANT_ALPHA */
4259+ { 4835, 0x00008003 }, /* GL_CONSTANT_ALPHA_EXT */
4260+ { 4857, 0x00008576 }, /* GL_CONSTANT_ARB */
4261+ { 4873, 0x00001207 }, /* GL_CONSTANT_ATTENUATION */
4262+ { 4897, 0x00008151 }, /* GL_CONSTANT_BORDER_HP */
4263+ { 4919, 0x00008001 }, /* GL_CONSTANT_COLOR */
4264+ { 4937, 0x00008001 }, /* GL_CONSTANT_COLOR_EXT */
4265+ { 4959, 0x00008576 }, /* GL_CONSTANT_EXT */
4266+ { 4975, 0x00008010 }, /* GL_CONVOLUTION_1D */
4267+ { 4993, 0x00008011 }, /* GL_CONVOLUTION_2D */
4268+ { 5011, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR */
4269+ { 5039, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR_HP */
4270+ { 5070, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE */
4271+ { 5097, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE_EXT */
4272+ { 5128, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS */
4273+ { 5155, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS_EXT */
4274+ { 5186, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE */
4275+ { 5214, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE_EXT */
4276+ { 5246, 0x00008017 }, /* GL_CONVOLUTION_FORMAT */
4277+ { 5268, 0x00008017 }, /* GL_CONVOLUTION_FORMAT_EXT */
4278+ { 5294, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT */
4279+ { 5316, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT_EXT */
4280+ { 5342, 0x00008018 }, /* GL_CONVOLUTION_WIDTH */
4281+ { 5363, 0x00008018 }, /* GL_CONVOLUTION_WIDTH_EXT */
4282+ { 5388, 0x00008862 }, /* GL_COORD_REPLACE */
4283+ { 5405, 0x00008862 }, /* GL_COORD_REPLACE_ARB */
4284+ { 5426, 0x00008862 }, /* GL_COORD_REPLACE_NV */
4285+ { 5446, 0x00001503 }, /* GL_COPY */
4286+ { 5454, 0x0000150C }, /* GL_COPY_INVERTED */
4287+ { 5471, 0x00000706 }, /* GL_COPY_PIXEL_TOKEN */
4288+ { 5491, 0x00000B44 }, /* GL_CULL_FACE */
4289+ { 5504, 0x00000B45 }, /* GL_CULL_FACE_MODE */
4290+ { 5522, 0x000081AA }, /* GL_CULL_VERTEX_EXT */
4291+ { 5541, 0x000081AC }, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
4292+ { 5573, 0x000081AB }, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
4293+ { 5608, 0x00008626 }, /* GL_CURRENT_ATTRIB_NV */
4294+ { 5629, 0x00000001 }, /* GL_CURRENT_BIT */
4295+ { 5644, 0x00000B00 }, /* GL_CURRENT_COLOR */
4296+ { 5661, 0x00008453 }, /* GL_CURRENT_FOG_COORD */
4297+ { 5682, 0x00008453 }, /* GL_CURRENT_FOG_COORDINATE */
4298+ { 5708, 0x00000B01 }, /* GL_CURRENT_INDEX */
4299+ { 5725, 0x00008641 }, /* GL_CURRENT_MATRIX_ARB */
4300+ { 5747, 0x00008845 }, /* GL_CURRENT_MATRIX_INDEX_ARB */
4301+ { 5775, 0x00008641 }, /* GL_CURRENT_MATRIX_NV */
4302+ { 5796, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
4303+ { 5830, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_NV */
4304+ { 5863, 0x00000B02 }, /* GL_CURRENT_NORMAL */
4305+ { 5881, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_ARB */
4306+ { 5911, 0x00008B8D }, /* GL_CURRENT_PROGRAM */
4307+ { 5930, 0x00008865 }, /* GL_CURRENT_QUERY */
4308+ { 5947, 0x00008865 }, /* GL_CURRENT_QUERY_ARB */
4309+ { 5968, 0x00000B04 }, /* GL_CURRENT_RASTER_COLOR */
4310+ { 5992, 0x00000B09 }, /* GL_CURRENT_RASTER_DISTANCE */
4311+ { 6019, 0x00000B05 }, /* GL_CURRENT_RASTER_INDEX */
4312+ { 6043, 0x00000B07 }, /* GL_CURRENT_RASTER_POSITION */
4313+ { 6070, 0x00000B08 }, /* GL_CURRENT_RASTER_POSITION_VALID */
4314+ { 6103, 0x00000B06 }, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
4315+ { 6136, 0x00008459 }, /* GL_CURRENT_SECONDARY_COLOR */
4316+ { 6163, 0x00000B03 }, /* GL_CURRENT_TEXTURE_COORDS */
4317+ { 6189, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB */
4318+ { 6214, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB_ARB */
4319+ { 6243, 0x000086A8 }, /* GL_CURRENT_WEIGHT_ARB */
4320+ { 6265, 0x00000900 }, /* GL_CW */
4321+ { 6271, 0x0000875B }, /* GL_DEBUG_ASSERT_MESA */
4322+ { 6292, 0x00008759 }, /* GL_DEBUG_OBJECT_MESA */
4323+ { 6313, 0x0000875A }, /* GL_DEBUG_PRINT_MESA */
4324+ { 6333, 0x00002101 }, /* GL_DECAL */
4325+ { 6342, 0x00001E03 }, /* GL_DECR */
4326+ { 6350, 0x00008508 }, /* GL_DECR_WRAP */
4327+ { 6363, 0x00008508 }, /* GL_DECR_WRAP_EXT */
4328+ { 6380, 0x00008B80 }, /* GL_DELETE_STATUS */
4329+ { 6397, 0x00001801 }, /* GL_DEPTH */
4330+ { 6406, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */
4331+ { 6430, 0x00000D1F }, /* GL_DEPTH_BIAS */
4332+ { 6444, 0x00000D56 }, /* GL_DEPTH_BITS */
4333+ { 6458, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */
4334+ { 6478, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */
4335+ { 6503, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */
4336+ { 6523, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */
4337+ { 6541, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */
4338+ { 6562, 0x00001902 }, /* GL_DEPTH_COMPONENT */
4339+ { 6581, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */
4340+ { 6602, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */
4341+ { 6627, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */
4342+ { 6653, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */
4343+ { 6674, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */
4344+ { 6699, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */
4345+ { 6725, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */
4346+ { 6746, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */
4347+ { 6771, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */
4348+ { 6797, 0x00000B74 }, /* GL_DEPTH_FUNC */
4349+ { 6811, 0x00000B70 }, /* GL_DEPTH_RANGE */
4350+ { 6826, 0x00000D1E }, /* GL_DEPTH_SCALE */
4351+ { 6841, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */
4352+ { 6861, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
4353+ { 6889, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
4354+ { 6917, 0x00000B71 }, /* GL_DEPTH_TEST */
4355+ { 6931, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */
4356+ { 6953, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */
4357+ { 6979, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */
4358+ { 6998, 0x00001201 }, /* GL_DIFFUSE */
4359+ { 7009, 0x00000BD0 }, /* GL_DITHER */
4360+ { 7019, 0x00000A02 }, /* GL_DOMAIN */
4361+ { 7029, 0x00001100 }, /* GL_DONT_CARE */
4362+ { 7042, 0x000086AE }, /* GL_DOT3_RGB */
4363+ { 7054, 0x000086AF }, /* GL_DOT3_RGBA */
4364+ { 7067, 0x000086AF }, /* GL_DOT3_RGBA_ARB */
4365+ { 7084, 0x00008741 }, /* GL_DOT3_RGBA_EXT */
4366+ { 7101, 0x000086AE }, /* GL_DOT3_RGB_ARB */
4367+ { 7117, 0x00008740 }, /* GL_DOT3_RGB_EXT */
4368+ { 7133, 0x0000140A }, /* GL_DOUBLE */
4369+ { 7143, 0x00000C32 }, /* GL_DOUBLEBUFFER */
4370+ { 7159, 0x00000C01 }, /* GL_DRAW_BUFFER */
4371+ { 7174, 0x00008825 }, /* GL_DRAW_BUFFER0 */
4372+ { 7190, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */
4373+ { 7210, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */
4374+ { 7230, 0x00008826 }, /* GL_DRAW_BUFFER1 */
4375+ { 7246, 0x0000882F }, /* GL_DRAW_BUFFER10 */
4376+ { 7263, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */
4377+ { 7284, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */
4378+ { 7305, 0x00008830 }, /* GL_DRAW_BUFFER11 */
4379+ { 7322, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */
4380+ { 7343, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */
4381+ { 7364, 0x00008831 }, /* GL_DRAW_BUFFER12 */
4382+ { 7381, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */
4383+ { 7402, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */
4384+ { 7423, 0x00008832 }, /* GL_DRAW_BUFFER13 */
4385+ { 7440, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */
4386+ { 7461, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */
4387+ { 7482, 0x00008833 }, /* GL_DRAW_BUFFER14 */
4388+ { 7499, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */
4389+ { 7520, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */
4390+ { 7541, 0x00008834 }, /* GL_DRAW_BUFFER15 */
4391+ { 7558, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */
4392+ { 7579, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */
4393+ { 7600, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */
4394+ { 7620, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */
4395+ { 7640, 0x00008827 }, /* GL_DRAW_BUFFER2 */
4396+ { 7656, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */
4397+ { 7676, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */
4398+ { 7696, 0x00008828 }, /* GL_DRAW_BUFFER3 */
4399+ { 7712, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */
4400+ { 7732, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */
4401+ { 7752, 0x00008829 }, /* GL_DRAW_BUFFER4 */
4402+ { 7768, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */
4403+ { 7788, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */
4404+ { 7808, 0x0000882A }, /* GL_DRAW_BUFFER5 */
4405+ { 7824, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */
4406+ { 7844, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */
4407+ { 7864, 0x0000882B }, /* GL_DRAW_BUFFER6 */
4408+ { 7880, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */
4409+ { 7900, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */
4410+ { 7920, 0x0000882C }, /* GL_DRAW_BUFFER7 */
4411+ { 7936, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */
4412+ { 7956, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */
4413+ { 7976, 0x0000882D }, /* GL_DRAW_BUFFER8 */
4414+ { 7992, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */
4415+ { 8012, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */
4416+ { 8032, 0x0000882E }, /* GL_DRAW_BUFFER9 */
4417+ { 8048, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */
4418+ { 8068, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */
4419+ { 8088, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
4420+ { 8120, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */
4421+ { 8144, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */
4422+ { 8164, 0x00000304 }, /* GL_DST_ALPHA */
4423+ { 8177, 0x00000306 }, /* GL_DST_COLOR */
4424+ { 8190, 0x000088EA }, /* GL_DYNAMIC_COPY */
4425+ { 8206, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */
4426+ { 8226, 0x000088E8 }, /* GL_DYNAMIC_DRAW */
4427+ { 8242, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */
4428+ { 8262, 0x000088E9 }, /* GL_DYNAMIC_READ */
4429+ { 8278, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */
4430+ { 8298, 0x00000B43 }, /* GL_EDGE_FLAG */
4431+ { 8311, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */
4432+ { 8330, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
4433+ { 8364, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */
4434+ { 8402, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */
4435+ { 8429, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */
4436+ { 8455, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */
4437+ { 8479, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER_ARB */
4438+ { 8507, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
4439+ { 8539, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */
4440+ { 8575, 0x00001600 }, /* GL_EMISSION */
4441+ { 8587, 0x00002000 }, /* GL_ENABLE_BIT */
4442+ { 8601, 0x00000202 }, /* GL_EQUAL */
4443+ { 8610, 0x00001509 }, /* GL_EQUIV */
4444+ { 8619, 0x00010000 }, /* GL_EVAL_BIT */
4445+ { 8631, 0x00000800 }, /* GL_EXP */
4446+ { 8638, 0x00000801 }, /* GL_EXP2 */
4447+ { 8646, 0x00001F03 }, /* GL_EXTENSIONS */
4448+ { 8660, 0x00002400 }, /* GL_EYE_LINEAR */
4449+ { 8674, 0x00002502 }, /* GL_EYE_PLANE */
4450+ { 8687, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */
4451+ { 8712, 0x0000855B }, /* GL_EYE_RADIAL_NV */
4452+ { 8729, 0x00000000 }, /* GL_FALSE */
4453+ { 8738, 0x00001101 }, /* GL_FASTEST */
4454+ { 8749, 0x00001C01 }, /* GL_FEEDBACK */
4455+ { 8761, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */
4456+ { 8788, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */
4457+ { 8812, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */
4458+ { 8836, 0x00001B02 }, /* GL_FILL */
4459+ { 8844, 0x00001D00 }, /* GL_FLAT */
4460+ { 8852, 0x00001406 }, /* GL_FLOAT */
4461+ { 8861, 0x00008B5A }, /* GL_FLOAT_MAT2 */
4462+ { 8875, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */
4463+ { 8893, 0x00008B5B }, /* GL_FLOAT_MAT3 */
4464+ { 8907, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */
4465+ { 8925, 0x00008B5C }, /* GL_FLOAT_MAT4 */
4466+ { 8939, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */
4467+ { 8957, 0x00008B50 }, /* GL_FLOAT_VEC2 */
4468+ { 8971, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */
4469+ { 8989, 0x00008B51 }, /* GL_FLOAT_VEC3 */
4470+ { 9003, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */
4471+ { 9021, 0x00008B52 }, /* GL_FLOAT_VEC4 */
4472+ { 9035, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */
4473+ { 9053, 0x00000B60 }, /* GL_FOG */
4474+ { 9060, 0x00000080 }, /* GL_FOG_BIT */
4475+ { 9071, 0x00000B66 }, /* GL_FOG_COLOR */
4476+ { 9084, 0x00008451 }, /* GL_FOG_COORD */
4477+ { 9097, 0x00008451 }, /* GL_FOG_COORDINATE */
4478+ { 9115, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */
4479+ { 9139, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
4480+ { 9178, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */
4481+ { 9221, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */
4482+ { 9253, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
4483+ { 9284, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */
4484+ { 9313, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */
4485+ { 9338, 0x00008457 }, /* GL_FOG_COORD_ARRAY */
4486+ { 9357, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */
4487+ { 9391, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */
4488+ { 9418, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */
4489+ { 9444, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */
4490+ { 9468, 0x00008450 }, /* GL_FOG_COORD_SRC */
4491+ { 9485, 0x00000B62 }, /* GL_FOG_DENSITY */
4492+ { 9500, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */
4493+ { 9524, 0x00000B64 }, /* GL_FOG_END */
4494+ { 9535, 0x00000C54 }, /* GL_FOG_HINT */
4495+ { 9547, 0x00000B61 }, /* GL_FOG_INDEX */
4496+ { 9560, 0x00000B65 }, /* GL_FOG_MODE */
4497+ { 9572, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */
4498+ { 9591, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */
4499+ { 9616, 0x00000B63 }, /* GL_FOG_START */
4500+ { 9629, 0x00008452 }, /* GL_FRAGMENT_DEPTH */
4501+ { 9647, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */
4502+ { 9671, 0x00008B30 }, /* GL_FRAGMENT_SHADER */
4503+ { 9690, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */
4504+ { 9713, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
4505+ { 9748, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
4506+ { 9790, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
4507+ { 9832, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
4508+ { 9881, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
4509+ { 9933, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
4510+ { 9977, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
4511+ { 10021, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */
4512+ { 10048, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */
4513+ { 10076, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */
4514+ { 10095, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
4515+ { 10136, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
4516+ { 10177, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
4517+ { 10219, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
4518+ { 10270, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
4519+ { 10308, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
4520+ { 10357, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
4521+ { 10399, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
4522+ { 10431, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
4523+ { 10462, 0x00000404 }, /* GL_FRONT */
4524+ { 10471, 0x00000408 }, /* GL_FRONT_AND_BACK */
4525+ { 10489, 0x00000B46 }, /* GL_FRONT_FACE */
4526+ { 10503, 0x00000400 }, /* GL_FRONT_LEFT */
4527+ { 10517, 0x00000401 }, /* GL_FRONT_RIGHT */
4528+ { 10532, 0x00008006 }, /* GL_FUNC_ADD */
4529+ { 10544, 0x00008006 }, /* GL_FUNC_ADD_EXT */
4530+ { 10560, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */
4531+ { 10585, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */
4532+ { 10614, 0x0000800A }, /* GL_FUNC_SUBTRACT */
4533+ { 10631, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */
4534+ { 10652, 0x00008191 }, /* GL_GENERATE_MIPMAP */
4535+ { 10671, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */
4536+ { 10695, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */
4537+ { 10724, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */
4538+ { 10748, 0x00000206 }, /* GL_GEQUAL */
4539+ { 10758, 0x00008009 }, /* GL_GL_BLEND_EQUATION_RGB */
4540+ { 10783, 0x00008C4A }, /* GL_GL_COMPRESSED_SLUMINANCE */
4541+ { 10811, 0x00008C4B }, /* GL_GL_COMPRESSED_SLUMINANCE_ALPHA */
4542+ { 10845, 0x00008C48 }, /* GL_GL_COMPRESSED_SRGB */
4543+ { 10867, 0x00008C49 }, /* GL_GL_COMPRESSED_SRGB_ALPHA */
4544+ { 10895, 0x0000845F }, /* GL_GL_CURRENT_RASTER_SECONDARY_COLOR */
4545+ { 10932, 0x00008B65 }, /* GL_GL_FLOAT_MAT2x3 */
4546+ { 10951, 0x00008B66 }, /* GL_GL_FLOAT_MAT2x4 */
4547+ { 10970, 0x00008B67 }, /* GL_GL_FLOAT_MAT3x2 */
4548+ { 10989, 0x00008B68 }, /* GL_GL_FLOAT_MAT3x4 */
4549+ { 11008, 0x00008B69 }, /* GL_GL_FLOAT_MAT4x2 */
4550+ { 11027, 0x00008B6A }, /* GL_GL_FLOAT_MAT4x3 */
4551+ { 11046, 0x000088EB }, /* GL_GL_PIXEL_PACK_BUFFER */
4552+ { 11070, 0x000088ED }, /* GL_GL_PIXEL_PACK_BUFFER_BINDING */
4553+ { 11102, 0x000088EC }, /* GL_GL_PIXEL_UNPACK_BUFFER */
4554+ { 11128, 0x000088EF }, /* GL_GL_PIXEL_UNPACK_BUFFER_BINDING */
4555+ { 11162, 0x00008C46 }, /* GL_GL_SLUMINANCE */
4556+ { 11179, 0x00008C47 }, /* GL_GL_SLUMINANCE8 */
4557+ { 11197, 0x00008C45 }, /* GL_GL_SLUMINANCE8_ALPHA8 */
4558+ { 11222, 0x00008C44 }, /* GL_GL_SLUMINANCE_ALPHA */
4559+ { 11245, 0x00008C40 }, /* GL_GL_SRGB */
4560+ { 11256, 0x00008C41 }, /* GL_GL_SRGB8 */
4561+ { 11268, 0x00008C43 }, /* GL_GL_SRGB8_ALPHA8 */
4562+ { 11287, 0x00008C42 }, /* GL_GL_SRGB_ALPHA */
4563+ { 11304, 0x00000204 }, /* GL_GREATER */
4564+ { 11315, 0x00001904 }, /* GL_GREEN */
4565+ { 11324, 0x00000D19 }, /* GL_GREEN_BIAS */
4566+ { 11338, 0x00000D53 }, /* GL_GREEN_BITS */
4567+ { 11352, 0x00000D18 }, /* GL_GREEN_SCALE */
4568+ { 11367, 0x00008000 }, /* GL_HINT_BIT */
4569+ { 11379, 0x00008024 }, /* GL_HISTOGRAM */
4570+ { 11392, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */
4571+ { 11416, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */
4572+ { 11444, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */
4573+ { 11467, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */
4574+ { 11494, 0x00008024 }, /* GL_HISTOGRAM_EXT */
4575+ { 11511, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */
4576+ { 11531, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */
4577+ { 11555, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */
4578+ { 11579, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */
4579+ { 11607, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */
4580+ { 11635, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */
4581+ { 11667, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */
4582+ { 11689, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */
4583+ { 11715, 0x0000802D }, /* GL_HISTOGRAM_SINK */
4584+ { 11733, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */
4585+ { 11755, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */
4586+ { 11774, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */
4587+ { 11797, 0x0000862A }, /* GL_IDENTITY_NV */
4588+ { 11812, 0x00008150 }, /* GL_IGNORE_BORDER_HP */
4589+ { 11832, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
4590+ { 11872, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
4591+ { 11910, 0x00001E02 }, /* GL_INCR */
4592+ { 11918, 0x00008507 }, /* GL_INCR_WRAP */
4593+ { 11931, 0x00008507 }, /* GL_INCR_WRAP_EXT */
4594+ { 11948, 0x00008077 }, /* GL_INDEX_ARRAY */
4595+ { 11963, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */
4596+ { 11993, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */
4597+ { 12027, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */
4598+ { 12050, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */
4599+ { 12072, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */
4600+ { 12092, 0x00000D51 }, /* GL_INDEX_BITS */
4601+ { 12106, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */
4602+ { 12127, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */
4603+ { 12145, 0x00000C30 }, /* GL_INDEX_MODE */
4604+ { 12159, 0x00000D13 }, /* GL_INDEX_OFFSET */
4605+ { 12175, 0x00000D12 }, /* GL_INDEX_SHIFT */
4606+ { 12190, 0x00000C21 }, /* GL_INDEX_WRITEMASK */
4607+ { 12209, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */
4608+ { 12228, 0x00001404 }, /* GL_INT */
4609+ { 12235, 0x00008049 }, /* GL_INTENSITY */
4610+ { 12248, 0x0000804C }, /* GL_INTENSITY12 */
4611+ { 12263, 0x0000804C }, /* GL_INTENSITY12_EXT */
4612+ { 12282, 0x0000804D }, /* GL_INTENSITY16 */
4613+ { 12297, 0x0000804D }, /* GL_INTENSITY16_EXT */
4614+ { 12316, 0x0000804A }, /* GL_INTENSITY4 */
4615+ { 12330, 0x0000804A }, /* GL_INTENSITY4_EXT */
4616+ { 12348, 0x0000804B }, /* GL_INTENSITY8 */
4617+ { 12362, 0x0000804B }, /* GL_INTENSITY8_EXT */
4618+ { 12380, 0x00008049 }, /* GL_INTENSITY_EXT */
4619+ { 12397, 0x00008575 }, /* GL_INTERPOLATE */
4620+ { 12412, 0x00008575 }, /* GL_INTERPOLATE_ARB */
4621+ { 12431, 0x00008575 }, /* GL_INTERPOLATE_EXT */
4622+ { 12450, 0x00008B53 }, /* GL_INT_VEC2 */
4623+ { 12462, 0x00008B53 }, /* GL_INT_VEC2_ARB */
4624+ { 12478, 0x00008B54 }, /* GL_INT_VEC3 */
4625+ { 12490, 0x00008B54 }, /* GL_INT_VEC3_ARB */
4626+ { 12506, 0x00008B55 }, /* GL_INT_VEC4 */
4627+ { 12518, 0x00008B55 }, /* GL_INT_VEC4_ARB */
4628+ { 12534, 0x00000500 }, /* GL_INVALID_ENUM */
4629+ { 12550, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
4630+ { 12587, 0x00000502 }, /* GL_INVALID_OPERATION */
4631+ { 12608, 0x00000501 }, /* GL_INVALID_VALUE */
4632+ { 12625, 0x0000862B }, /* GL_INVERSE_NV */
4633+ { 12639, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */
4634+ { 12663, 0x0000150A }, /* GL_INVERT */
4635+ { 12673, 0x00001E00 }, /* GL_KEEP */
4636+ { 12681, 0x00000406 }, /* GL_LEFT */
4637+ { 12689, 0x00000203 }, /* GL_LEQUAL */
4638+ { 12699, 0x00000201 }, /* GL_LESS */
4639+ { 12707, 0x00004000 }, /* GL_LIGHT0 */
4640+ { 12717, 0x00004001 }, /* GL_LIGHT1 */
4641+ { 12727, 0x00004002 }, /* GL_LIGHT2 */
4642+ { 12737, 0x00004003 }, /* GL_LIGHT3 */
4643+ { 12747, 0x00004004 }, /* GL_LIGHT4 */
4644+ { 12757, 0x00004005 }, /* GL_LIGHT5 */
4645+ { 12767, 0x00004006 }, /* GL_LIGHT6 */
4646+ { 12777, 0x00004007 }, /* GL_LIGHT7 */
4647+ { 12787, 0x00000B50 }, /* GL_LIGHTING */
4648+ { 12799, 0x00000040 }, /* GL_LIGHTING_BIT */
4649+ { 12815, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */
4650+ { 12838, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */
4651+ { 12867, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */
4652+ { 12900, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
4653+ { 12928, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */
4654+ { 12952, 0x00001B01 }, /* GL_LINE */
4655+ { 12960, 0x00002601 }, /* GL_LINEAR */
4656+ { 12970, 0x00001208 }, /* GL_LINEAR_ATTENUATION */
4657+ { 12992, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
4658+ { 13022, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
4659+ { 13053, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */
4660+ { 13077, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */
4661+ { 13102, 0x00000001 }, /* GL_LINES */
4662+ { 13111, 0x00000004 }, /* GL_LINE_BIT */
4663+ { 13123, 0x00000002 }, /* GL_LINE_LOOP */
4664+ { 13136, 0x00000707 }, /* GL_LINE_RESET_TOKEN */
4665+ { 13156, 0x00000B20 }, /* GL_LINE_SMOOTH */
4666+ { 13171, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */
4667+ { 13191, 0x00000B24 }, /* GL_LINE_STIPPLE */
4668+ { 13207, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */
4669+ { 13231, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */
4670+ { 13254, 0x00000003 }, /* GL_LINE_STRIP */
4671+ { 13268, 0x00000702 }, /* GL_LINE_TOKEN */
4672+ { 13282, 0x00000B21 }, /* GL_LINE_WIDTH */
4673+ { 13296, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */
4674+ { 13322, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */
4675+ { 13342, 0x00008B82 }, /* GL_LINK_STATUS */
4676+ { 13357, 0x00000B32 }, /* GL_LIST_BASE */
4677+ { 13370, 0x00020000 }, /* GL_LIST_BIT */
4678+ { 13382, 0x00000B33 }, /* GL_LIST_INDEX */
4679+ { 13396, 0x00000B30 }, /* GL_LIST_MODE */
4680+ { 13409, 0x00000101 }, /* GL_LOAD */
4681+ { 13417, 0x00000BF1 }, /* GL_LOGIC_OP */
4682+ { 13429, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */
4683+ { 13446, 0x00008CA1 }, /* GL_LOWER_LEFT */
4684+ { 13460, 0x00001909 }, /* GL_LUMINANCE */
4685+ { 13473, 0x00008041 }, /* GL_LUMINANCE12 */
4686+ { 13488, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */
4687+ { 13511, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */
4688+ { 13538, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */
4689+ { 13560, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */
4690+ { 13586, 0x00008041 }, /* GL_LUMINANCE12_EXT */
4691+ { 13605, 0x00008042 }, /* GL_LUMINANCE16 */
4692+ { 13620, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */
4693+ { 13643, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */
4694+ { 13670, 0x00008042 }, /* GL_LUMINANCE16_EXT */
4695+ { 13689, 0x0000803F }, /* GL_LUMINANCE4 */
4696+ { 13703, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */
4697+ { 13724, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */
4698+ { 13749, 0x0000803F }, /* GL_LUMINANCE4_EXT */
4699+ { 13767, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */
4700+ { 13788, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */
4701+ { 13813, 0x00008040 }, /* GL_LUMINANCE8 */
4702+ { 13827, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */
4703+ { 13848, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */
4704+ { 13873, 0x00008040 }, /* GL_LUMINANCE8_EXT */
4705+ { 13891, 0x0000190A }, /* GL_LUMINANCE_ALPHA */
4706+ { 13910, 0x00000D90 }, /* GL_MAP1_COLOR_4 */
4707+ { 13926, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */
4708+ { 13946, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */
4709+ { 13968, 0x00000D91 }, /* GL_MAP1_INDEX */
4710+ { 13982, 0x00000D92 }, /* GL_MAP1_NORMAL */
4711+ { 13997, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */
4712+ { 14021, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */
4713+ { 14045, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */
4714+ { 14069, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */
4715+ { 14093, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */
4716+ { 14110, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */
4717+ { 14127, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
4718+ { 14155, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
4719+ { 14184, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
4720+ { 14213, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
4721+ { 14242, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
4722+ { 14271, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
4723+ { 14300, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
4724+ { 14329, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
4725+ { 14357, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
4726+ { 14385, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
4727+ { 14413, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
4728+ { 14441, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
4729+ { 14469, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
4730+ { 14497, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
4731+ { 14525, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
4732+ { 14553, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
4733+ { 14581, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */
4734+ { 14597, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */
4735+ { 14617, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */
4736+ { 14639, 0x00000DB1 }, /* GL_MAP2_INDEX */
4737+ { 14653, 0x00000DB2 }, /* GL_MAP2_NORMAL */
4738+ { 14668, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */
4739+ { 14692, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */
4740+ { 14716, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */
4741+ { 14740, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */
4742+ { 14764, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */
4743+ { 14781, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */
4744+ { 14798, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
4745+ { 14826, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
4746+ { 14855, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
4747+ { 14884, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
4748+ { 14913, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
4749+ { 14942, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
4750+ { 14971, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
4751+ { 15000, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
4752+ { 15028, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
4753+ { 15056, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
4754+ { 15084, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
4755+ { 15112, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
4756+ { 15140, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
4757+ { 15168, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */
4758+ { 15196, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
4759+ { 15224, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
4760+ { 15252, 0x00000D10 }, /* GL_MAP_COLOR */
4761+ { 15265, 0x00000D11 }, /* GL_MAP_STENCIL */
4762+ { 15280, 0x000088C0 }, /* GL_MATRIX0_ARB */
4763+ { 15295, 0x00008630 }, /* GL_MATRIX0_NV */
4764+ { 15309, 0x000088CA }, /* GL_MATRIX10_ARB */
4765+ { 15325, 0x000088CB }, /* GL_MATRIX11_ARB */
4766+ { 15341, 0x000088CC }, /* GL_MATRIX12_ARB */
4767+ { 15357, 0x000088CD }, /* GL_MATRIX13_ARB */
4768+ { 15373, 0x000088CE }, /* GL_MATRIX14_ARB */
4769+ { 15389, 0x000088CF }, /* GL_MATRIX15_ARB */
4770+ { 15405, 0x000088D0 }, /* GL_MATRIX16_ARB */
4771+ { 15421, 0x000088D1 }, /* GL_MATRIX17_ARB */
4772+ { 15437, 0x000088D2 }, /* GL_MATRIX18_ARB */
4773+ { 15453, 0x000088D3 }, /* GL_MATRIX19_ARB */
4774+ { 15469, 0x000088C1 }, /* GL_MATRIX1_ARB */
4775+ { 15484, 0x00008631 }, /* GL_MATRIX1_NV */
4776+ { 15498, 0x000088D4 }, /* GL_MATRIX20_ARB */
4777+ { 15514, 0x000088D5 }, /* GL_MATRIX21_ARB */
4778+ { 15530, 0x000088D6 }, /* GL_MATRIX22_ARB */
4779+ { 15546, 0x000088D7 }, /* GL_MATRIX23_ARB */
4780+ { 15562, 0x000088D8 }, /* GL_MATRIX24_ARB */
4781+ { 15578, 0x000088D9 }, /* GL_MATRIX25_ARB */
4782+ { 15594, 0x000088DA }, /* GL_MATRIX26_ARB */
4783+ { 15610, 0x000088DB }, /* GL_MATRIX27_ARB */
4784+ { 15626, 0x000088DC }, /* GL_MATRIX28_ARB */
4785+ { 15642, 0x000088DD }, /* GL_MATRIX29_ARB */
4786+ { 15658, 0x000088C2 }, /* GL_MATRIX2_ARB */
4787+ { 15673, 0x00008632 }, /* GL_MATRIX2_NV */
4788+ { 15687, 0x000088DE }, /* GL_MATRIX30_ARB */
4789+ { 15703, 0x000088DF }, /* GL_MATRIX31_ARB */
4790+ { 15719, 0x000088C3 }, /* GL_MATRIX3_ARB */
4791+ { 15734, 0x00008633 }, /* GL_MATRIX3_NV */
4792+ { 15748, 0x000088C4 }, /* GL_MATRIX4_ARB */
4793+ { 15763, 0x00008634 }, /* GL_MATRIX4_NV */
4794+ { 15777, 0x000088C5 }, /* GL_MATRIX5_ARB */
4795+ { 15792, 0x00008635 }, /* GL_MATRIX5_NV */
4796+ { 15806, 0x000088C6 }, /* GL_MATRIX6_ARB */
4797+ { 15821, 0x00008636 }, /* GL_MATRIX6_NV */
4798+ { 15835, 0x000088C7 }, /* GL_MATRIX7_ARB */
4799+ { 15850, 0x00008637 }, /* GL_MATRIX7_NV */
4800+ { 15864, 0x000088C8 }, /* GL_MATRIX8_ARB */
4801+ { 15879, 0x000088C9 }, /* GL_MATRIX9_ARB */
4802+ { 15894, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */
4803+ { 15920, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
4804+ { 15954, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
4805+ { 15985, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
4806+ { 16018, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
4807+ { 16049, 0x00000BA0 }, /* GL_MATRIX_MODE */
4808+ { 16064, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */
4809+ { 16086, 0x00008008 }, /* GL_MAX */
4810+ { 16093, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */
4811+ { 16116, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
4812+ { 16148, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */
4813+ { 16174, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
4814+ { 16207, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
4815+ { 16233, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
4816+ { 16267, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */
4817+ { 16286, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
4818+ { 16315, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
4819+ { 16347, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */
4820+ { 16383, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
4821+ { 16419, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
4822+ { 16459, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */
4823+ { 16485, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */
4824+ { 16515, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */
4825+ { 16540, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */
4826+ { 16569, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
4827+ { 16598, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */
4828+ { 16631, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */
4829+ { 16651, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */
4830+ { 16675, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */
4831+ { 16699, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */
4832+ { 16723, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */
4833+ { 16748, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */
4834+ { 16766, 0x00008008 }, /* GL_MAX_EXT */
4835+ { 16777, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
4836+ { 16812, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
4837+ { 16851, 0x00000D31 }, /* GL_MAX_LIGHTS */
4838+ { 16865, 0x00000B31 }, /* GL_MAX_LIST_NESTING */
4839+ { 16885, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
4840+ { 16923, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */
4841+ { 16952, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */
4842+ { 16976, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */
4843+ { 17004, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */
4844+ { 17027, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
4845+ { 17064, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
4846+ { 17100, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
4847+ { 17127, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
4848+ { 17156, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
4849+ { 17190, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
4850+ { 17226, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
4851+ { 17253, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
4852+ { 17285, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
4853+ { 17321, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
4854+ { 17350, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
4855+ { 17379, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */
4856+ { 17407, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
4857+ { 17445, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
4858+ { 17489, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
4859+ { 17532, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
4860+ { 17566, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
4861+ { 17605, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
4862+ { 17642, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
4863+ { 17680, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
4864+ { 17723, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
4865+ { 17766, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
4866+ { 17796, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
4867+ { 17827, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
4868+ { 17863, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
4869+ { 17899, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */
4870+ { 17929, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
4871+ { 17963, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */
4872+ { 17996, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
4873+ { 18025, 0x00008504 }, /* GL_MAX_SHININESS_NV */
4874+ { 18045, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */
4875+ { 18069, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */
4876+ { 18091, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */
4877+ { 18117, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */
4878+ { 18144, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
4879+ { 18175, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */
4880+ { 18199, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
4881+ { 18233, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */
4882+ { 18253, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */
4883+ { 18280, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */
4884+ { 18301, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */
4885+ { 18326, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */
4886+ { 18351, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
4887+ { 18386, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */
4888+ { 18408, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */
4889+ { 18434, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */
4890+ { 18456, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */
4891+ { 18482, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
4892+ { 18516, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
4893+ { 18554, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
4894+ { 18587, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
4895+ { 18624, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */
4896+ { 18648, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */
4897+ { 18669, 0x00008007 }, /* GL_MIN */
4898+ { 18676, 0x0000802E }, /* GL_MINMAX */
4899+ { 18686, 0x0000802E }, /* GL_MINMAX_EXT */
4900+ { 18700, 0x0000802F }, /* GL_MINMAX_FORMAT */
4901+ { 18717, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */
4902+ { 18738, 0x00008030 }, /* GL_MINMAX_SINK */
4903+ { 18753, 0x00008030 }, /* GL_MINMAX_SINK_EXT */
4904+ { 18772, 0x00008007 }, /* GL_MIN_EXT */
4905+ { 18783, 0x00008370 }, /* GL_MIRRORED_REPEAT */
4906+ { 18802, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */
4907+ { 18825, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */
4908+ { 18848, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */
4909+ { 18868, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */
4910+ { 18888, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
4911+ { 18918, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */
4912+ { 18946, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
4913+ { 18974, 0x00001700 }, /* GL_MODELVIEW */
4914+ { 18987, 0x00001700 }, /* GL_MODELVIEW0_ARB */
4915+ { 19005, 0x0000872A }, /* GL_MODELVIEW10_ARB */
4916+ { 19024, 0x0000872B }, /* GL_MODELVIEW11_ARB */
4917+ { 19043, 0x0000872C }, /* GL_MODELVIEW12_ARB */
4918+ { 19062, 0x0000872D }, /* GL_MODELVIEW13_ARB */
4919+ { 19081, 0x0000872E }, /* GL_MODELVIEW14_ARB */
4920+ { 19100, 0x0000872F }, /* GL_MODELVIEW15_ARB */
4921+ { 19119, 0x00008730 }, /* GL_MODELVIEW16_ARB */
4922+ { 19138, 0x00008731 }, /* GL_MODELVIEW17_ARB */
4923+ { 19157, 0x00008732 }, /* GL_MODELVIEW18_ARB */
4924+ { 19176, 0x00008733 }, /* GL_MODELVIEW19_ARB */
4925+ { 19195, 0x0000850A }, /* GL_MODELVIEW1_ARB */
4926+ { 19213, 0x00008734 }, /* GL_MODELVIEW20_ARB */
4927+ { 19232, 0x00008735 }, /* GL_MODELVIEW21_ARB */
4928+ { 19251, 0x00008736 }, /* GL_MODELVIEW22_ARB */
4929+ { 19270, 0x00008737 }, /* GL_MODELVIEW23_ARB */
4930+ { 19289, 0x00008738 }, /* GL_MODELVIEW24_ARB */
4931+ { 19308, 0x00008739 }, /* GL_MODELVIEW25_ARB */
4932+ { 19327, 0x0000873A }, /* GL_MODELVIEW26_ARB */
4933+ { 19346, 0x0000873B }, /* GL_MODELVIEW27_ARB */
4934+ { 19365, 0x0000873C }, /* GL_MODELVIEW28_ARB */
4935+ { 19384, 0x0000873D }, /* GL_MODELVIEW29_ARB */
4936+ { 19403, 0x00008722 }, /* GL_MODELVIEW2_ARB */
4937+ { 19421, 0x0000873E }, /* GL_MODELVIEW30_ARB */
4938+ { 19440, 0x0000873F }, /* GL_MODELVIEW31_ARB */
4939+ { 19459, 0x00008723 }, /* GL_MODELVIEW3_ARB */
4940+ { 19477, 0x00008724 }, /* GL_MODELVIEW4_ARB */
4941+ { 19495, 0x00008725 }, /* GL_MODELVIEW5_ARB */
4942+ { 19513, 0x00008726 }, /* GL_MODELVIEW6_ARB */
4943+ { 19531, 0x00008727 }, /* GL_MODELVIEW7_ARB */
4944+ { 19549, 0x00008728 }, /* GL_MODELVIEW8_ARB */
4945+ { 19567, 0x00008729 }, /* GL_MODELVIEW9_ARB */
4946+ { 19585, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */
4947+ { 19605, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */
4948+ { 19632, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */
4949+ { 19657, 0x00002100 }, /* GL_MODULATE */
4950+ { 19669, 0x00008744 }, /* GL_MODULATE_ADD_ATI */
4951+ { 19689, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */
4952+ { 19716, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */
4953+ { 19741, 0x00000103 }, /* GL_MULT */
4954+ { 19749, 0x0000809D }, /* GL_MULTISAMPLE */
4955+ { 19764, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */
4956+ { 19784, 0x0000809D }, /* GL_MULTISAMPLE_ARB */
4957+ { 19803, 0x20000000 }, /* GL_MULTISAMPLE_BIT */
4958+ { 19822, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */
4959+ { 19846, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */
4960+ { 19869, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */
4961+ { 19899, 0x00002A25 }, /* GL_N3F_V3F */
4962+ { 19910, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */
4963+ { 19930, 0x0000150E }, /* GL_NAND */
4964+ { 19938, 0x00002600 }, /* GL_NEAREST */
4965+ { 19949, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
4966+ { 19980, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
4967+ { 20012, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */
4968+ { 20037, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */
4969+ { 20063, 0x00000200 }, /* GL_NEVER */
4970+ { 20072, 0x00001102 }, /* GL_NICEST */
4971+ { 20082, 0x00000000 }, /* GL_NONE */
4972+ { 20090, 0x00001505 }, /* GL_NOOP */
4973+ { 20098, 0x00001508 }, /* GL_NOR */
4974+ { 20105, 0x00000BA1 }, /* GL_NORMALIZE */
4975+ { 20118, 0x00008075 }, /* GL_NORMAL_ARRAY */
4976+ { 20134, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
4977+ { 20165, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */
4978+ { 20200, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */
4979+ { 20224, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */
4980+ { 20247, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */
4981+ { 20268, 0x00008511 }, /* GL_NORMAL_MAP */
4982+ { 20282, 0x00008511 }, /* GL_NORMAL_MAP_ARB */
4983+ { 20300, 0x00008511 }, /* GL_NORMAL_MAP_NV */
4984+ { 20317, 0x00000205 }, /* GL_NOTEQUAL */
4985+ { 20329, 0x00000000 }, /* GL_NO_ERROR */
4986+ { 20341, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
4987+ { 20375, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */
4988+ { 20413, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
4989+ { 20445, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
4990+ { 20487, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
4991+ { 20517, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
4992+ { 20557, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
4993+ { 20588, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */
4994+ { 20617, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */
4995+ { 20645, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
4996+ { 20675, 0x00002401 }, /* GL_OBJECT_LINEAR */
4997+ { 20692, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */
4998+ { 20718, 0x00002501 }, /* GL_OBJECT_PLANE */
4999+ { 20734, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
5000+ { 20769, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */
5001+ { 20791, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */
5002+ { 20810, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */
5003+ { 20840, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */
5004+ { 20861, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */
5005+ { 20889, 0x00000001 }, /* GL_ONE */
5006+ { 20896, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */
5007+ { 20924, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */
5008+ { 20956, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */
5009+ { 20984, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */
5010+ { 21016, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */
5011+ { 21039, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */
5012+ { 21062, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */
5013+ { 21085, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */
5014+ { 21108, 0x00008598 }, /* GL_OPERAND0_ALPHA */
5015+ { 21126, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */
5016+ { 21148, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */
5017+ { 21170, 0x00008590 }, /* GL_OPERAND0_RGB */
5018+ { 21186, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */
5019+ { 21206, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */
5020+ { 21226, 0x00008599 }, /* GL_OPERAND1_ALPHA */
5021+ { 21244, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */
5022+ { 21266, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */
5023+ { 21288, 0x00008591 }, /* GL_OPERAND1_RGB */
5024+ { 21304, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */
5025+ { 21324, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */
5026+ { 21344, 0x0000859A }, /* GL_OPERAND2_ALPHA */
5027+ { 21362, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */
5028+ { 21384, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */
5029+ { 21406, 0x00008592 }, /* GL_OPERAND2_RGB */
5030+ { 21422, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */
5031+ { 21442, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */
5032+ { 21462, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */
5033+ { 21483, 0x00008593 }, /* GL_OPERAND3_RGB_NV */
5034+ { 21502, 0x00001507 }, /* GL_OR */
5035+ { 21508, 0x00000A01 }, /* GL_ORDER */
5036+ { 21517, 0x0000150D }, /* GL_OR_INVERTED */
5037+ { 21532, 0x0000150B }, /* GL_OR_REVERSE */
5038+ { 21546, 0x00000505 }, /* GL_OUT_OF_MEMORY */
5039+ { 21563, 0x00000D05 }, /* GL_PACK_ALIGNMENT */
5040+ { 21581, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */
5041+ { 21602, 0x00008758 }, /* GL_PACK_INVERT_MESA */
5042+ { 21622, 0x00000D01 }, /* GL_PACK_LSB_FIRST */
5043+ { 21640, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */
5044+ { 21659, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */
5045+ { 21679, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */
5046+ { 21699, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */
5047+ { 21717, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */
5048+ { 21736, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */
5049+ { 21761, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */
5050+ { 21785, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */
5051+ { 21806, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */
5052+ { 21828, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */
5053+ { 21850, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */
5054+ { 21875, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */
5055+ { 21899, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */
5056+ { 21920, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */
5057+ { 21942, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */
5058+ { 21964, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */
5059+ { 21986, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */
5060+ { 22017, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */
5061+ { 22037, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */
5062+ { 22062, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */
5063+ { 22082, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */
5064+ { 22107, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */
5065+ { 22127, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */
5066+ { 22152, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */
5067+ { 22172, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */
5068+ { 22197, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */
5069+ { 22217, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */
5070+ { 22242, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */
5071+ { 22262, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */
5072+ { 22287, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */
5073+ { 22307, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */
5074+ { 22332, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */
5075+ { 22352, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */
5076+ { 22377, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */
5077+ { 22397, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */
5078+ { 22422, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */
5079+ { 22442, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */
5080+ { 22467, 0x00000020 }, /* GL_PIXEL_MODE_BIT */
5081+ { 22485, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
5082+ { 22518, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */
5083+ { 22543, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
5084+ { 22578, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */
5085+ { 22605, 0x00001B00 }, /* GL_POINT */
5086+ { 22614, 0x00000000 }, /* GL_POINTS */
5087+ { 22624, 0x00000002 }, /* GL_POINT_BIT */
5088+ { 22637, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */
5089+ { 22667, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */
5090+ { 22701, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */
5091+ { 22735, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */
5092+ { 22770, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */
5093+ { 22799, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */
5094+ { 22832, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */
5095+ { 22865, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */
5096+ { 22899, 0x00000B11 }, /* GL_POINT_SIZE */
5097+ { 22913, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */
5098+ { 22939, 0x00008127 }, /* GL_POINT_SIZE_MAX */
5099+ { 22957, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */
5100+ { 22979, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */
5101+ { 23001, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */
5102+ { 23024, 0x00008126 }, /* GL_POINT_SIZE_MIN */
5103+ { 23042, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */
5104+ { 23064, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */
5105+ { 23086, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */
5106+ { 23109, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */
5107+ { 23129, 0x00000B10 }, /* GL_POINT_SMOOTH */
5108+ { 23145, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */
5109+ { 23166, 0x00008861 }, /* GL_POINT_SPRITE */
5110+ { 23182, 0x00008861 }, /* GL_POINT_SPRITE_ARB */
5111+ { 23202, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */
5112+ { 23231, 0x00008861 }, /* GL_POINT_SPRITE_NV */
5113+ { 23250, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */
5114+ { 23276, 0x00000701 }, /* GL_POINT_TOKEN */
5115+ { 23291, 0x00000009 }, /* GL_POLYGON */
5116+ { 23302, 0x00000008 }, /* GL_POLYGON_BIT */
5117+ { 23317, 0x00000B40 }, /* GL_POLYGON_MODE */
5118+ { 23333, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */
5119+ { 23356, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */
5120+ { 23381, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */
5121+ { 23404, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */
5122+ { 23427, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */
5123+ { 23451, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */
5124+ { 23475, 0x00000B41 }, /* GL_POLYGON_SMOOTH */
5125+ { 23493, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */
5126+ { 23516, 0x00000B42 }, /* GL_POLYGON_STIPPLE */
5127+ { 23535, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */
5128+ { 23558, 0x00000703 }, /* GL_POLYGON_TOKEN */
5129+ { 23575, 0x00001203 }, /* GL_POSITION */
5130+ { 23587, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
5131+ { 23619, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */
5132+ { 23655, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
5133+ { 23688, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */
5134+ { 23725, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
5135+ { 23756, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */
5136+ { 23791, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
5137+ { 23823, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */
5138+ { 23859, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
5139+ { 23892, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
5140+ { 23924, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */
5141+ { 23960, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
5142+ { 23993, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */
5143+ { 24030, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */
5144+ { 24060, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */
5145+ { 24094, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */
5146+ { 24125, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */
5147+ { 24160, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
5148+ { 24191, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */
5149+ { 24226, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
5150+ { 24258, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */
5151+ { 24294, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */
5152+ { 24324, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */
5153+ { 24358, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */
5154+ { 24389, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */
5155+ { 24424, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */
5156+ { 24456, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */
5157+ { 24487, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */
5158+ { 24522, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */
5159+ { 24554, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */
5160+ { 24590, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */
5161+ { 24619, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */
5162+ { 24652, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */
5163+ { 24682, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */
5164+ { 24716, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
5165+ { 24755, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
5166+ { 24788, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
5167+ { 24828, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
5168+ { 24862, 0x00008578 }, /* GL_PREVIOUS */
5169+ { 24874, 0x00008578 }, /* GL_PREVIOUS_ARB */
5170+ { 24890, 0x00008578 }, /* GL_PREVIOUS_EXT */
5171+ { 24906, 0x00008577 }, /* GL_PRIMARY_COLOR */
5172+ { 24923, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */
5173+ { 24944, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */
5174+ { 24965, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
5175+ { 24998, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
5176+ { 25030, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */
5177+ { 25053, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */
5178+ { 25076, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */
5179+ { 25106, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */
5180+ { 25135, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */
5181+ { 25163, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */
5182+ { 25185, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */
5183+ { 25213, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */
5184+ { 25241, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */
5185+ { 25263, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */
5186+ { 25284, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
5187+ { 25324, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
5188+ { 25363, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
5189+ { 25393, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
5190+ { 25428, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
5191+ { 25461, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
5192+ { 25495, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
5193+ { 25534, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
5194+ { 25573, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */
5195+ { 25595, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */
5196+ { 25621, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */
5197+ { 25645, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */
5198+ { 25668, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */
5199+ { 25690, 0x00008628 }, /* GL_PROGRAM_STRING_NV */
5200+ { 25711, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */
5201+ { 25732, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */
5202+ { 25759, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
5203+ { 25791, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
5204+ { 25823, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
5205+ { 25858, 0x00001701 }, /* GL_PROJECTION */
5206+ { 25872, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */
5207+ { 25893, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */
5208+ { 25919, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */
5209+ { 25940, 0x00008025 }, /* GL_PROXY_HISTOGRAM */
5210+ { 25959, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */
5211+ { 25982, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
5212+ { 26021, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
5213+ { 26059, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */
5214+ { 26079, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
5215+ { 26109, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */
5216+ { 26133, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */
5217+ { 26153, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
5218+ { 26183, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */
5219+ { 26207, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */
5220+ { 26227, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
5221+ { 26260, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */
5222+ { 26286, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */
5223+ { 26316, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
5224+ { 26347, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */
5225+ { 26377, 0x00002003 }, /* GL_Q */
5226+ { 26382, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */
5227+ { 26407, 0x00000007 }, /* GL_QUADS */
5228+ { 26416, 0x00008614 }, /* GL_QUAD_MESH_SUN */
5229+ { 26433, 0x00000008 }, /* GL_QUAD_STRIP */
5230+ { 26447, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */
5231+ { 26469, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */
5232+ { 26495, 0x00008866 }, /* GL_QUERY_RESULT */
5233+ { 26511, 0x00008866 }, /* GL_QUERY_RESULT_ARB */
5234+ { 26531, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */
5235+ { 26557, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */
5236+ { 26587, 0x00002002 }, /* GL_R */
5237+ { 26592, 0x00002A10 }, /* GL_R3_G3_B2 */
5238+ { 26604, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
5239+ { 26637, 0x00000C02 }, /* GL_READ_BUFFER */
5240+ { 26652, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
5241+ { 26684, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */
5242+ { 26708, 0x000088B8 }, /* GL_READ_ONLY */
5243+ { 26721, 0x000088B8 }, /* GL_READ_ONLY_ARB */
5244+ { 26738, 0x000088BA }, /* GL_READ_WRITE */
5245+ { 26752, 0x000088BA }, /* GL_READ_WRITE_ARB */
5246+ { 26770, 0x00001903 }, /* GL_RED */
5247+ { 26777, 0x00008016 }, /* GL_REDUCE */
5248+ { 26787, 0x00008016 }, /* GL_REDUCE_EXT */
5249+ { 26801, 0x00000D15 }, /* GL_RED_BIAS */
5250+ { 26813, 0x00000D52 }, /* GL_RED_BITS */
5251+ { 26825, 0x00000D14 }, /* GL_RED_SCALE */
5252+ { 26838, 0x00008512 }, /* GL_REFLECTION_MAP */
5253+ { 26856, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */
5254+ { 26878, 0x00008512 }, /* GL_REFLECTION_MAP_NV */
5255+ { 26899, 0x00001C00 }, /* GL_RENDER */
5256+ { 26909, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */
5257+ { 26937, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */
5258+ { 26957, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */
5259+ { 26984, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
5260+ { 27020, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */
5261+ { 27046, 0x00001F01 }, /* GL_RENDERER */
5262+ { 27058, 0x00000C40 }, /* GL_RENDER_MODE */
5263+ { 27073, 0x00002901 }, /* GL_REPEAT */
5264+ { 27083, 0x00001E01 }, /* GL_REPLACE */
5265+ { 27094, 0x00008062 }, /* GL_REPLACE_EXT */
5266+ { 27109, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */
5267+ { 27132, 0x0000803A }, /* GL_RESCALE_NORMAL */
5268+ { 27150, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */
5269+ { 27172, 0x00000102 }, /* GL_RETURN */
5270+ { 27182, 0x00001907 }, /* GL_RGB */
5271+ { 27189, 0x00008052 }, /* GL_RGB10 */
5272+ { 27198, 0x00008059 }, /* GL_RGB10_A2 */
5273+ { 27210, 0x00008059 }, /* GL_RGB10_A2_EXT */
5274+ { 27226, 0x00008052 }, /* GL_RGB10_EXT */
5275+ { 27239, 0x00008053 }, /* GL_RGB12 */
5276+ { 27248, 0x00008053 }, /* GL_RGB12_EXT */
5277+ { 27261, 0x00008054 }, /* GL_RGB16 */
5278+ { 27270, 0x00008054 }, /* GL_RGB16_EXT */
5279+ { 27283, 0x0000804E }, /* GL_RGB2_EXT */
5280+ { 27295, 0x0000804F }, /* GL_RGB4 */
5281+ { 27303, 0x0000804F }, /* GL_RGB4_EXT */
5282+ { 27315, 0x000083A1 }, /* GL_RGB4_S3TC */
5283+ { 27328, 0x00008050 }, /* GL_RGB5 */
5284+ { 27336, 0x00008057 }, /* GL_RGB5_A1 */
5285+ { 27347, 0x00008057 }, /* GL_RGB5_A1_EXT */
5286+ { 27362, 0x00008050 }, /* GL_RGB5_EXT */
5287+ { 27374, 0x00008051 }, /* GL_RGB8 */
5288+ { 27382, 0x00008051 }, /* GL_RGB8_EXT */
5289+ { 27394, 0x00001908 }, /* GL_RGBA */
5290+ { 27402, 0x0000805A }, /* GL_RGBA12 */
5291+ { 27412, 0x0000805A }, /* GL_RGBA12_EXT */
5292+ { 27426, 0x0000805B }, /* GL_RGBA16 */
5293+ { 27436, 0x0000805B }, /* GL_RGBA16_EXT */
5294+ { 27450, 0x00008055 }, /* GL_RGBA2 */
5295+ { 27459, 0x00008055 }, /* GL_RGBA2_EXT */
5296+ { 27472, 0x00008056 }, /* GL_RGBA4 */
5297+ { 27481, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */
5298+ { 27500, 0x00008056 }, /* GL_RGBA4_EXT */
5299+ { 27513, 0x000083A3 }, /* GL_RGBA4_S3TC */
5300+ { 27527, 0x00008058 }, /* GL_RGBA8 */
5301+ { 27536, 0x00008058 }, /* GL_RGBA8_EXT */
5302+ { 27549, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */
5303+ { 27567, 0x00000C31 }, /* GL_RGBA_MODE */
5304+ { 27580, 0x000083A2 }, /* GL_RGBA_S3TC */
5305+ { 27593, 0x000083A0 }, /* GL_RGB_S3TC */
5306+ { 27605, 0x00008573 }, /* GL_RGB_SCALE */
5307+ { 27618, 0x00008573 }, /* GL_RGB_SCALE_ARB */
5308+ { 27635, 0x00008573 }, /* GL_RGB_SCALE_EXT */
5309+ { 27652, 0x00000407 }, /* GL_RIGHT */
5310+ { 27661, 0x00002000 }, /* GL_S */
5311+ { 27666, 0x00008B5D }, /* GL_SAMPLER_1D */
5312+ { 27680, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */
5313+ { 27701, 0x00008B5E }, /* GL_SAMPLER_2D */
5314+ { 27715, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */
5315+ { 27736, 0x00008B5F }, /* GL_SAMPLER_3D */
5316+ { 27750, 0x00008B60 }, /* GL_SAMPLER_CUBE */
5317+ { 27766, 0x000080A9 }, /* GL_SAMPLES */
5318+ { 27777, 0x000086B4 }, /* GL_SAMPLES_3DFX */
5319+ { 27793, 0x000080A9 }, /* GL_SAMPLES_ARB */
5320+ { 27808, 0x00008914 }, /* GL_SAMPLES_PASSED */
5321+ { 27826, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */
5322+ { 27848, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
5323+ { 27876, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */
5324+ { 27908, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */
5325+ { 27931, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */
5326+ { 27958, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */
5327+ { 27976, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */
5328+ { 27999, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */
5329+ { 28021, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */
5330+ { 28040, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */
5331+ { 28063, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */
5332+ { 28089, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */
5333+ { 28119, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */
5334+ { 28144, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */
5335+ { 28173, 0x00080000 }, /* GL_SCISSOR_BIT */
5336+ { 28188, 0x00000C10 }, /* GL_SCISSOR_BOX */
5337+ { 28203, 0x00000C11 }, /* GL_SCISSOR_TEST */
5338+ { 28219, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */
5339+ { 28244, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
5340+ { 28284, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */
5341+ { 28328, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
5342+ { 28361, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
5343+ { 28391, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
5344+ { 28423, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
5345+ { 28453, 0x00001C02 }, /* GL_SELECT */
5346+ { 28463, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */
5347+ { 28491, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */
5348+ { 28516, 0x00008012 }, /* GL_SEPARABLE_2D */
5349+ { 28532, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */
5350+ { 28559, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */
5351+ { 28590, 0x0000150F }, /* GL_SET */
5352+ { 28597, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */
5353+ { 28618, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */
5354+ { 28642, 0x00008B4F }, /* GL_SHADER_TYPE */
5355+ { 28657, 0x00000B54 }, /* GL_SHADE_MODEL */
5356+ { 28672, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */
5357+ { 28700, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */
5358+ { 28723, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */
5359+ { 28753, 0x00001601 }, /* GL_SHININESS */
5360+ { 28766, 0x00001402 }, /* GL_SHORT */
5361+ { 28775, 0x000081F9 }, /* GL_SINGLE_COLOR */
5362+ { 28791, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */
5363+ { 28811, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */
5364+ { 28830, 0x00001D01 }, /* GL_SMOOTH */
5365+ { 28840, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */
5366+ { 28873, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */
5367+ { 28900, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */
5368+ { 28933, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */
5369+ { 28960, 0x00008588 }, /* GL_SOURCE0_ALPHA */
5370+ { 28977, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */
5371+ { 28998, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */
5372+ { 29019, 0x00008580 }, /* GL_SOURCE0_RGB */
5373+ { 29034, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */
5374+ { 29053, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */
5375+ { 29072, 0x00008589 }, /* GL_SOURCE1_ALPHA */
5376+ { 29089, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */
5377+ { 29110, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */
5378+ { 29131, 0x00008581 }, /* GL_SOURCE1_RGB */
5379+ { 29146, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */
5380+ { 29165, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */
5381+ { 29184, 0x0000858A }, /* GL_SOURCE2_ALPHA */
5382+ { 29201, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */
5383+ { 29222, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */
5384+ { 29243, 0x00008582 }, /* GL_SOURCE2_RGB */
5385+ { 29258, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */
5386+ { 29277, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */
5387+ { 29296, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */
5388+ { 29316, 0x00008583 }, /* GL_SOURCE3_RGB_NV */
5389+ { 29334, 0x00001202 }, /* GL_SPECULAR */
5390+ { 29346, 0x00002402 }, /* GL_SPHERE_MAP */
5391+ { 29360, 0x00001206 }, /* GL_SPOT_CUTOFF */
5392+ { 29375, 0x00001204 }, /* GL_SPOT_DIRECTION */
5393+ { 29393, 0x00001205 }, /* GL_SPOT_EXPONENT */
5394+ { 29410, 0x00008588 }, /* GL_SRC0_ALPHA */
5395+ { 29424, 0x00008580 }, /* GL_SRC0_RGB */
5396+ { 29436, 0x00008589 }, /* GL_SRC1_ALPHA */
5397+ { 29450, 0x00008581 }, /* GL_SRC1_RGB */
5398+ { 29462, 0x0000858A }, /* GL_SRC2_ALPHA */
5399+ { 29476, 0x00008582 }, /* GL_SRC2_RGB */
5400+ { 29488, 0x00000302 }, /* GL_SRC_ALPHA */
5401+ { 29501, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */
5402+ { 29523, 0x00000300 }, /* GL_SRC_COLOR */
5403+ { 29536, 0x00000503 }, /* GL_STACK_OVERFLOW */
5404+ { 29554, 0x00000504 }, /* GL_STACK_UNDERFLOW */
5405+ { 29573, 0x000088E6 }, /* GL_STATIC_COPY */
5406+ { 29588, 0x000088E6 }, /* GL_STATIC_COPY_ARB */
5407+ { 29607, 0x000088E4 }, /* GL_STATIC_DRAW */
5408+ { 29622, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */
5409+ { 29641, 0x000088E5 }, /* GL_STATIC_READ */
5410+ { 29656, 0x000088E5 }, /* GL_STATIC_READ_ARB */
5411+ { 29675, 0x00001802 }, /* GL_STENCIL */
5412+ { 29686, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */
5413+ { 29712, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */
5414+ { 29733, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */
5415+ { 29754, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
5416+ { 29786, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
5417+ { 29818, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */
5418+ { 29838, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */
5419+ { 29865, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */
5420+ { 29891, 0x00000D57 }, /* GL_STENCIL_BITS */
5421+ { 29907, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */
5422+ { 29929, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */
5423+ { 29952, 0x00000B94 }, /* GL_STENCIL_FAIL */
5424+ { 29968, 0x00000B92 }, /* GL_STENCIL_FUNC */
5425+ { 29984, 0x00001901 }, /* GL_STENCIL_INDEX */
5426+ { 30001, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */
5427+ { 30024, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */
5428+ { 30046, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */
5429+ { 30068, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */
5430+ { 30090, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */
5431+ { 30111, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */
5432+ { 30138, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */
5433+ { 30165, 0x00000B97 }, /* GL_STENCIL_REF */
5434+ { 30180, 0x00000B90 }, /* GL_STENCIL_TEST */
5435+ { 30196, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
5436+ { 30225, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */
5437+ { 30247, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */
5438+ { 30268, 0x00000C33 }, /* GL_STEREO */
5439+ { 30278, 0x000088E2 }, /* GL_STREAM_COPY */
5440+ { 30293, 0x000088E2 }, /* GL_STREAM_COPY_ARB */
5441+ { 30312, 0x000088E0 }, /* GL_STREAM_DRAW */
5442+ { 30327, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */
5443+ { 30346, 0x000088E1 }, /* GL_STREAM_READ */
5444+ { 30361, 0x000088E1 }, /* GL_STREAM_READ_ARB */
5445+ { 30380, 0x00000D50 }, /* GL_SUBPIXEL_BITS */
5446+ { 30397, 0x000084E7 }, /* GL_SUBTRACT */
5447+ { 30409, 0x000084E7 }, /* GL_SUBTRACT_ARB */
5448+ { 30425, 0x00002001 }, /* GL_T */
5449+ { 30430, 0x00002A2A }, /* GL_T2F_C3F_V3F */
5450+ { 30445, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */
5451+ { 30464, 0x00002A29 }, /* GL_T2F_C4UB_V3F */
5452+ { 30480, 0x00002A2B }, /* GL_T2F_N3F_V3F */
5453+ { 30495, 0x00002A27 }, /* GL_T2F_V3F */
5454+ { 30506, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */
5455+ { 30525, 0x00002A28 }, /* GL_T4F_V4F */
5456+ { 30536, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */
5457+ { 30559, 0x00001702 }, /* GL_TEXTURE */
5458+ { 30570, 0x000084C0 }, /* GL_TEXTURE0 */
5459+ { 30582, 0x000084C0 }, /* GL_TEXTURE0_ARB */
5460+ { 30598, 0x000084C1 }, /* GL_TEXTURE1 */
5461+ { 30610, 0x000084CA }, /* GL_TEXTURE10 */
5462+ { 30623, 0x000084CA }, /* GL_TEXTURE10_ARB */
5463+ { 30640, 0x000084CB }, /* GL_TEXTURE11 */
5464+ { 30653, 0x000084CB }, /* GL_TEXTURE11_ARB */
5465+ { 30670, 0x000084CC }, /* GL_TEXTURE12 */
5466+ { 30683, 0x000084CC }, /* GL_TEXTURE12_ARB */
5467+ { 30700, 0x000084CD }, /* GL_TEXTURE13 */
5468+ { 30713, 0x000084CD }, /* GL_TEXTURE13_ARB */
5469+ { 30730, 0x000084CE }, /* GL_TEXTURE14 */
5470+ { 30743, 0x000084CE }, /* GL_TEXTURE14_ARB */
5471+ { 30760, 0x000084CF }, /* GL_TEXTURE15 */
5472+ { 30773, 0x000084CF }, /* GL_TEXTURE15_ARB */
5473+ { 30790, 0x000084D0 }, /* GL_TEXTURE16 */
5474+ { 30803, 0x000084D0 }, /* GL_TEXTURE16_ARB */
5475+ { 30820, 0x000084D1 }, /* GL_TEXTURE17 */
5476+ { 30833, 0x000084D1 }, /* GL_TEXTURE17_ARB */
5477+ { 30850, 0x000084D2 }, /* GL_TEXTURE18 */
5478+ { 30863, 0x000084D2 }, /* GL_TEXTURE18_ARB */
5479+ { 30880, 0x000084D3 }, /* GL_TEXTURE19 */
5480+ { 30893, 0x000084D3 }, /* GL_TEXTURE19_ARB */
5481+ { 30910, 0x000084C1 }, /* GL_TEXTURE1_ARB */
5482+ { 30926, 0x000084C2 }, /* GL_TEXTURE2 */
5483+ { 30938, 0x000084D4 }, /* GL_TEXTURE20 */
5484+ { 30951, 0x000084D4 }, /* GL_TEXTURE20_ARB */
5485+ { 30968, 0x000084D5 }, /* GL_TEXTURE21 */
5486+ { 30981, 0x000084D5 }, /* GL_TEXTURE21_ARB */
5487+ { 30998, 0x000084D6 }, /* GL_TEXTURE22 */
5488+ { 31011, 0x000084D6 }, /* GL_TEXTURE22_ARB */
5489+ { 31028, 0x000084D7 }, /* GL_TEXTURE23 */
5490+ { 31041, 0x000084D7 }, /* GL_TEXTURE23_ARB */
5491+ { 31058, 0x000084D8 }, /* GL_TEXTURE24 */
5492+ { 31071, 0x000084D8 }, /* GL_TEXTURE24_ARB */
5493+ { 31088, 0x000084D9 }, /* GL_TEXTURE25 */
5494+ { 31101, 0x000084D9 }, /* GL_TEXTURE25_ARB */
5495+ { 31118, 0x000084DA }, /* GL_TEXTURE26 */
5496+ { 31131, 0x000084DA }, /* GL_TEXTURE26_ARB */
5497+ { 31148, 0x000084DB }, /* GL_TEXTURE27 */
5498+ { 31161, 0x000084DB }, /* GL_TEXTURE27_ARB */
5499+ { 31178, 0x000084DC }, /* GL_TEXTURE28 */
5500+ { 31191, 0x000084DC }, /* GL_TEXTURE28_ARB */
5501+ { 31208, 0x000084DD }, /* GL_TEXTURE29 */
5502+ { 31221, 0x000084DD }, /* GL_TEXTURE29_ARB */
5503+ { 31238, 0x000084C2 }, /* GL_TEXTURE2_ARB */
5504+ { 31254, 0x000084C3 }, /* GL_TEXTURE3 */
5505+ { 31266, 0x000084DE }, /* GL_TEXTURE30 */
5506+ { 31279, 0x000084DE }, /* GL_TEXTURE30_ARB */
5507+ { 31296, 0x000084DF }, /* GL_TEXTURE31 */
5508+ { 31309, 0x000084DF }, /* GL_TEXTURE31_ARB */
5509+ { 31326, 0x000084C3 }, /* GL_TEXTURE3_ARB */
5510+ { 31342, 0x000084C4 }, /* GL_TEXTURE4 */
5511+ { 31354, 0x000084C4 }, /* GL_TEXTURE4_ARB */
5512+ { 31370, 0x000084C5 }, /* GL_TEXTURE5 */
5513+ { 31382, 0x000084C5 }, /* GL_TEXTURE5_ARB */
5514+ { 31398, 0x000084C6 }, /* GL_TEXTURE6 */
5515+ { 31410, 0x000084C6 }, /* GL_TEXTURE6_ARB */
5516+ { 31426, 0x000084C7 }, /* GL_TEXTURE7 */
5517+ { 31438, 0x000084C7 }, /* GL_TEXTURE7_ARB */
5518+ { 31454, 0x000084C8 }, /* GL_TEXTURE8 */
5519+ { 31466, 0x000084C8 }, /* GL_TEXTURE8_ARB */
5520+ { 31482, 0x000084C9 }, /* GL_TEXTURE9 */
5521+ { 31494, 0x000084C9 }, /* GL_TEXTURE9_ARB */
5522+ { 31510, 0x00000DE0 }, /* GL_TEXTURE_1D */
5523+ { 31524, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */
5524+ { 31548, 0x00000DE1 }, /* GL_TEXTURE_2D */
5525+ { 31562, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */
5526+ { 31586, 0x0000806F }, /* GL_TEXTURE_3D */
5527+ { 31600, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */
5528+ { 31622, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */
5529+ { 31648, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */
5530+ { 31670, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */
5531+ { 31692, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
5532+ { 31724, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */
5533+ { 31746, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
5534+ { 31778, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */
5535+ { 31800, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */
5536+ { 31828, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */
5537+ { 31860, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
5538+ { 31893, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */
5539+ { 31925, 0x00040000 }, /* GL_TEXTURE_BIT */
5540+ { 31940, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */
5541+ { 31961, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */
5542+ { 31986, 0x00001005 }, /* GL_TEXTURE_BORDER */
5543+ { 32004, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */
5544+ { 32028, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
5545+ { 32059, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
5546+ { 32089, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
5547+ { 32119, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
5548+ { 32154, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
5549+ { 32185, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
5550+ { 32223, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */
5551+ { 32250, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
5552+ { 32282, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
5553+ { 32316, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */
5554+ { 32340, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */
5555+ { 32368, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */
5556+ { 32392, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */
5557+ { 32420, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
5558+ { 32453, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */
5559+ { 32477, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */
5560+ { 32499, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */
5561+ { 32521, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */
5562+ { 32547, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */
5563+ { 32581, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
5564+ { 32614, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */
5565+ { 32651, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */
5566+ { 32679, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */
5567+ { 32711, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */
5568+ { 32734, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
5569+ { 32772, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */
5570+ { 32814, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */
5571+ { 32845, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */
5572+ { 32873, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
5573+ { 32903, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */
5574+ { 32931, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */
5575+ { 32951, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */
5576+ { 32975, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
5577+ { 33006, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */
5578+ { 33041, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
5579+ { 33072, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */
5580+ { 33107, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
5581+ { 33138, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */
5582+ { 33173, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
5583+ { 33204, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */
5584+ { 33239, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
5585+ { 33270, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */
5586+ { 33305, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
5587+ { 33336, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */
5588+ { 33371, 0x00008071 }, /* GL_TEXTURE_DEPTH */
5589+ { 33388, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */
5590+ { 33410, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */
5591+ { 33436, 0x00002300 }, /* GL_TEXTURE_ENV */
5592+ { 33451, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */
5593+ { 33472, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */
5594+ { 33492, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */
5595+ { 33518, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */
5596+ { 33538, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */
5597+ { 33555, 0x00000C62 }, /* GL_TEXTURE_GEN_R */
5598+ { 33572, 0x00000C60 }, /* GL_TEXTURE_GEN_S */
5599+ { 33589, 0x00000C61 }, /* GL_TEXTURE_GEN_T */
5600+ { 33606, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */
5601+ { 33631, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */
5602+ { 33653, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */
5603+ { 33679, 0x00001001 }, /* GL_TEXTURE_HEIGHT */
5604+ { 33697, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */
5605+ { 33723, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */
5606+ { 33749, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */
5607+ { 33779, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */
5608+ { 33806, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */
5609+ { 33831, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */
5610+ { 33851, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */
5611+ { 33875, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
5612+ { 33902, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
5613+ { 33929, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
5614+ { 33956, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */
5615+ { 33982, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */
5616+ { 34012, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */
5617+ { 34034, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */
5618+ { 34052, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
5619+ { 34082, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
5620+ { 34110, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
5621+ { 34138, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
5622+ { 34166, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */
5623+ { 34187, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */
5624+ { 34206, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */
5625+ { 34228, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */
5626+ { 34247, 0x00008066 }, /* GL_TEXTURE_PRIORITY */
5627+ { 34267, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */
5628+ { 34292, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */
5629+ { 34316, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */
5630+ { 34336, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */
5631+ { 34360, 0x00008067 }, /* GL_TEXTURE_RESIDENT */
5632+ { 34380, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */
5633+ { 34403, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */
5634+ { 34428, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
5635+ { 34462, 0x00001000 }, /* GL_TEXTURE_WIDTH */
5636+ { 34479, 0x00008072 }, /* GL_TEXTURE_WRAP_R */
5637+ { 34497, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
5638+ { 34515, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
5639+ { 34533, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
5640+ { 34553, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
5641+ { 34572, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
5642+ { 34601, 0x00001000 }, /* GL_TRANSFORM_BIT */
5643+ { 34618, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
5644+ { 34644, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
5645+ { 34674, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
5646+ { 34706, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
5647+ { 34736, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
5648+ { 34770, 0x0000862C }, /* GL_TRANSPOSE_NV */
5649+ { 34786, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
5650+ { 34817, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
5651+ { 34852, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
5652+ { 34880, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
5653+ { 34912, 0x00000004 }, /* GL_TRIANGLES */
5654+ { 34925, 0x00000006 }, /* GL_TRIANGLE_FAN */
5655+ { 34941, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
5656+ { 34962, 0x00000005 }, /* GL_TRIANGLE_STRIP */
5657+ { 34980, 0x00000001 }, /* GL_TRUE */
5658+ { 34988, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
5659+ { 35008, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
5660+ { 35031, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
5661+ { 35051, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
5662+ { 35072, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
5663+ { 35094, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
5664+ { 35116, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
5665+ { 35136, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
5666+ { 35157, 0x00001401 }, /* GL_UNSIGNED_BYTE */
5667+ { 35174, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
5668+ { 35201, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
5669+ { 35224, 0x00001405 }, /* GL_UNSIGNED_INT */
5670+ { 35240, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
5671+ { 35267, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
5672+ { 35291, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
5673+ { 35322, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
5674+ { 35346, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
5675+ { 35374, 0x00001403 }, /* GL_UNSIGNED_SHORT */
5676+ { 35392, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
5677+ { 35422, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
5678+ { 35448, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
5679+ { 35478, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
5680+ { 35504, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
5681+ { 35528, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
5682+ { 35556, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
5683+ { 35584, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
5684+ { 35611, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
5685+ { 35643, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
5686+ { 35674, 0x00008CA2 }, /* GL_UPPER_LEFT */
5687+ { 35688, 0x00002A20 }, /* GL_V2F */
5688+ { 35695, 0x00002A21 }, /* GL_V3F */
5689+ { 35702, 0x00008B83 }, /* GL_VALIDATE_STATUS */
5690+ { 35721, 0x00001F00 }, /* GL_VENDOR */
5691+ { 35731, 0x00001F02 }, /* GL_VERSION */
5692+ { 35742, 0x00008074 }, /* GL_VERTEX_ARRAY */
5693+ { 35758, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
5694+ { 35788, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
5695+ { 35819, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
5696+ { 35854, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
5697+ { 35878, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
5698+ { 35899, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
5699+ { 35922, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
5700+ { 35943, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
5701+ { 35970, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
5702+ { 35998, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
5703+ { 36026, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
5704+ { 36054, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
5705+ { 36082, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
5706+ { 36110, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
5707+ { 36138, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
5708+ { 36165, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
5709+ { 36192, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
5710+ { 36219, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
5711+ { 36246, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
5712+ { 36273, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
5713+ { 36300, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
5714+ { 36327, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
5715+ { 36354, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
5716+ { 36381, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
5717+ { 36419, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
5718+ { 36461, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
5719+ { 36492, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
5720+ { 36527, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
5721+ { 36561, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
5722+ { 36599, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
5723+ { 36630, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
5724+ { 36665, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
5725+ { 36693, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
5726+ { 36725, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
5727+ { 36755, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
5728+ { 36789, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
5729+ { 36817, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
5730+ { 36849, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
5731+ { 36869, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
5732+ { 36891, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
5733+ { 36920, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
5734+ { 36941, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
5735+ { 36970, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
5736+ { 37003, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
5737+ { 37035, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
5738+ { 37062, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
5739+ { 37093, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
5740+ { 37123, 0x00008B31 }, /* GL_VERTEX_SHADER */
5741+ { 37140, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
5742+ { 37161, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
5743+ { 37188, 0x00000BA2 }, /* GL_VIEWPORT */
5744+ { 37200, 0x00000800 }, /* GL_VIEWPORT_BIT */
5745+ { 37216, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
5746+ { 37236, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
5747+ { 37267, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
5748+ { 37302, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
5749+ { 37330, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
5750+ { 37355, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
5751+ { 37382, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
5752+ { 37407, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
5753+ { 37431, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
5754+ { 37450, 0x000088B9 }, /* GL_WRITE_ONLY */
5755+ { 37464, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
5756+ { 37482, 0x00001506 }, /* GL_XOR */
5757+ { 37489, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
5758+ { 37508, 0x00008757 }, /* GL_YCBCR_MESA */
5759+ { 37522, 0x00000000 }, /* GL_ZERO */
5760+ { 37530, 0x00000D16 }, /* GL_ZOOM_X */
5761+ { 37540, 0x00000D17 }, /* GL_ZOOM_Y */
5762+};
5763+
5764+static const unsigned reduced_enums[1284] =
5765+{
5766+ 436, /* GL_FALSE */
5767+ 645, /* GL_LINES */
5768+ 647, /* GL_LINE_LOOP */
5769+ 654, /* GL_LINE_STRIP */
5770+ 1637, /* GL_TRIANGLES */
5771+ 1640, /* GL_TRIANGLE_STRIP */
5772+ 1638, /* GL_TRIANGLE_FAN */
5773+ 1211, /* GL_QUADS */
5774+ 1213, /* GL_QUAD_STRIP */
5775+ 1099, /* GL_POLYGON */
5776+ 1111, /* GL_POLYGON_STIPPLE_BIT */
5777+ 1064, /* GL_PIXEL_MODE_BIT */
5778+ 632, /* GL_LIGHTING_BIT */
5779+ 458, /* GL_FOG_BIT */
5780+ 8, /* GL_ACCUM */
5781+ 664, /* GL_LOAD */
5782+ 1253, /* GL_RETURN */
5783+ 937, /* GL_MULT */
5784+ 23, /* GL_ADD */
5785+ 953, /* GL_NEVER */
5786+ 622, /* GL_LESS */
5787+ 426, /* GL_EQUAL */
5788+ 621, /* GL_LEQUAL */
5789+ 547, /* GL_GREATER */
5790+ 968, /* GL_NOTEQUAL */
5791+ 522, /* GL_GEQUAL */
5792+ 46, /* GL_ALWAYS */
5793+ 1386, /* GL_SRC_COLOR */
5794+ 997, /* GL_ONE_MINUS_SRC_COLOR */
5795+ 1384, /* GL_SRC_ALPHA */
5796+ 996, /* GL_ONE_MINUS_SRC_ALPHA */
5797+ 406, /* GL_DST_ALPHA */
5798+ 994, /* GL_ONE_MINUS_DST_ALPHA */
5799+ 407, /* GL_DST_COLOR */
5800+ 995, /* GL_ONE_MINUS_DST_COLOR */
5801+ 1385, /* GL_SRC_ALPHA_SATURATE */
5802+ 510, /* GL_FRONT_LEFT */
5803+ 511, /* GL_FRONT_RIGHT */
5804+ 69, /* GL_BACK_LEFT */
5805+ 70, /* GL_BACK_RIGHT */
5806+ 507, /* GL_FRONT */
5807+ 68, /* GL_BACK */
5808+ 620, /* GL_LEFT */
5809+ 1293, /* GL_RIGHT */
5810+ 508, /* GL_FRONT_AND_BACK */
5811+ 63, /* GL_AUX0 */
5812+ 64, /* GL_AUX1 */
5813+ 65, /* GL_AUX2 */
5814+ 66, /* GL_AUX3 */
5815+ 612, /* GL_INVALID_ENUM */
5816+ 615, /* GL_INVALID_VALUE */
5817+ 614, /* GL_INVALID_OPERATION */
5818+ 1387, /* GL_STACK_OVERFLOW */
5819+ 1388, /* GL_STACK_UNDERFLOW */
5820+ 1022, /* GL_OUT_OF_MEMORY */
5821+ 613, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
5822+ 0, /* GL_2D */
5823+ 2, /* GL_3D */
5824+ 3, /* GL_3D_COLOR */
5825+ 4, /* GL_3D_COLOR_TEXTURE */
5826+ 6, /* GL_4D_COLOR_TEXTURE */
5827+ 1042, /* GL_PASS_THROUGH_TOKEN */
5828+ 1098, /* GL_POINT_TOKEN */
5829+ 655, /* GL_LINE_TOKEN */
5830+ 1112, /* GL_POLYGON_TOKEN */
5831+ 74, /* GL_BITMAP_TOKEN */
5832+ 405, /* GL_DRAW_PIXEL_TOKEN */
5833+ 271, /* GL_COPY_PIXEL_TOKEN */
5834+ 648, /* GL_LINE_RESET_TOKEN */
5835+ 429, /* GL_EXP */
5836+ 430, /* GL_EXP2 */
5837+ 304, /* GL_CW */
5838+ 116, /* GL_CCW */
5839+ 137, /* GL_COEFF */
5840+ 1019, /* GL_ORDER */
5841+ 344, /* GL_DOMAIN */
5842+ 279, /* GL_CURRENT_COLOR */
5843+ 282, /* GL_CURRENT_INDEX */
5844+ 288, /* GL_CURRENT_NORMAL */
5845+ 300, /* GL_CURRENT_TEXTURE_COORDS */
5846+ 293, /* GL_CURRENT_RASTER_COLOR */
5847+ 295, /* GL_CURRENT_RASTER_INDEX */
5848+ 298, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
5849+ 296, /* GL_CURRENT_RASTER_POSITION */
5850+ 297, /* GL_CURRENT_RASTER_POSITION_VALID */
5851+ 294, /* GL_CURRENT_RASTER_DISTANCE */
5852+ 1091, /* GL_POINT_SMOOTH */
5853+ 1080, /* GL_POINT_SIZE */
5854+ 1090, /* GL_POINT_SIZE_RANGE */
5855+ 1081, /* GL_POINT_SIZE_GRANULARITY */
5856+ 649, /* GL_LINE_SMOOTH */
5857+ 656, /* GL_LINE_WIDTH */
5858+ 658, /* GL_LINE_WIDTH_RANGE */
5859+ 657, /* GL_LINE_WIDTH_GRANULARITY */
5860+ 651, /* GL_LINE_STIPPLE */
5861+ 652, /* GL_LINE_STIPPLE_PATTERN */
5862+ 653, /* GL_LINE_STIPPLE_REPEAT */
5863+ 663, /* GL_LIST_MODE */
5864+ 822, /* GL_MAX_LIST_NESTING */
5865+ 660, /* GL_LIST_BASE */
5866+ 662, /* GL_LIST_INDEX */
5867+ 1101, /* GL_POLYGON_MODE */
5868+ 1108, /* GL_POLYGON_SMOOTH */
5869+ 1110, /* GL_POLYGON_STIPPLE */
5870+ 414, /* GL_EDGE_FLAG */
5871+ 272, /* GL_CULL_FACE */
5872+ 273, /* GL_CULL_FACE_MODE */
5873+ 509, /* GL_FRONT_FACE */
5874+ 631, /* GL_LIGHTING */
5875+ 636, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
5876+ 637, /* GL_LIGHT_MODEL_TWO_SIDE */
5877+ 633, /* GL_LIGHT_MODEL_AMBIENT */
5878+ 1339, /* GL_SHADE_MODEL */
5879+ 168, /* GL_COLOR_MATERIAL_FACE */
5880+ 169, /* GL_COLOR_MATERIAL_PARAMETER */
5881+ 167, /* GL_COLOR_MATERIAL */
5882+ 457, /* GL_FOG */
5883+ 479, /* GL_FOG_INDEX */
5884+ 475, /* GL_FOG_DENSITY */
5885+ 483, /* GL_FOG_START */
5886+ 477, /* GL_FOG_END */
5887+ 480, /* GL_FOG_MODE */
5888+ 459, /* GL_FOG_COLOR */
5889+ 333, /* GL_DEPTH_RANGE */
5890+ 338, /* GL_DEPTH_TEST */
5891+ 341, /* GL_DEPTH_WRITEMASK */
5892+ 321, /* GL_DEPTH_CLEAR_VALUE */
5893+ 332, /* GL_DEPTH_FUNC */
5894+ 12, /* GL_ACCUM_CLEAR_VALUE */
5895+ 1418, /* GL_STENCIL_TEST */
5896+ 1406, /* GL_STENCIL_CLEAR_VALUE */
5897+ 1408, /* GL_STENCIL_FUNC */
5898+ 1420, /* GL_STENCIL_VALUE_MASK */
5899+ 1407, /* GL_STENCIL_FAIL */
5900+ 1415, /* GL_STENCIL_PASS_DEPTH_FAIL */
5901+ 1416, /* GL_STENCIL_PASS_DEPTH_PASS */
5902+ 1417, /* GL_STENCIL_REF */
5903+ 1421, /* GL_STENCIL_WRITEMASK */
5904+ 791, /* GL_MATRIX_MODE */
5905+ 958, /* GL_NORMALIZE */
5906+ 1727, /* GL_VIEWPORT */
5907+ 932, /* GL_MODELVIEW_STACK_DEPTH */
5908+ 1191, /* GL_PROJECTION_STACK_DEPTH */
5909+ 1616, /* GL_TEXTURE_STACK_DEPTH */
5910+ 930, /* GL_MODELVIEW_MATRIX */
5911+ 1190, /* GL_PROJECTION_MATRIX */
5912+ 1601, /* GL_TEXTURE_MATRIX */
5913+ 61, /* GL_ATTRIB_STACK_DEPTH */
5914+ 127, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
5915+ 43, /* GL_ALPHA_TEST */
5916+ 44, /* GL_ALPHA_TEST_FUNC */
5917+ 45, /* GL_ALPHA_TEST_REF */
5918+ 343, /* GL_DITHER */
5919+ 78, /* GL_BLEND_DST */
5920+ 86, /* GL_BLEND_SRC */
5921+ 75, /* GL_BLEND */
5922+ 666, /* GL_LOGIC_OP_MODE */
5923+ 586, /* GL_INDEX_LOGIC_OP */
5924+ 166, /* GL_COLOR_LOGIC_OP */
5925+ 67, /* GL_AUX_BUFFERS */
5926+ 354, /* GL_DRAW_BUFFER */
5927+ 1223, /* GL_READ_BUFFER */
5928+ 1320, /* GL_SCISSOR_BOX */
5929+ 1321, /* GL_SCISSOR_TEST */
5930+ 585, /* GL_INDEX_CLEAR_VALUE */
5931+ 590, /* GL_INDEX_WRITEMASK */
5932+ 163, /* GL_COLOR_CLEAR_VALUE */
5933+ 205, /* GL_COLOR_WRITEMASK */
5934+ 587, /* GL_INDEX_MODE */
5935+ 1287, /* GL_RGBA_MODE */
5936+ 353, /* GL_DOUBLEBUFFER */
5937+ 1422, /* GL_STEREO */
5938+ 1246, /* GL_RENDER_MODE */
5939+ 1043, /* GL_PERSPECTIVE_CORRECTION_HINT */
5940+ 1092, /* GL_POINT_SMOOTH_HINT */
5941+ 650, /* GL_LINE_SMOOTH_HINT */
5942+ 1109, /* GL_POLYGON_SMOOTH_HINT */
5943+ 478, /* GL_FOG_HINT */
5944+ 1582, /* GL_TEXTURE_GEN_S */
5945+ 1583, /* GL_TEXTURE_GEN_T */
5946+ 1581, /* GL_TEXTURE_GEN_R */
5947+ 1580, /* GL_TEXTURE_GEN_Q */
5948+ 1056, /* GL_PIXEL_MAP_I_TO_I */
5949+ 1062, /* GL_PIXEL_MAP_S_TO_S */
5950+ 1058, /* GL_PIXEL_MAP_I_TO_R */
5951+ 1054, /* GL_PIXEL_MAP_I_TO_G */
5952+ 1052, /* GL_PIXEL_MAP_I_TO_B */
5953+ 1050, /* GL_PIXEL_MAP_I_TO_A */
5954+ 1060, /* GL_PIXEL_MAP_R_TO_R */
5955+ 1048, /* GL_PIXEL_MAP_G_TO_G */
5956+ 1046, /* GL_PIXEL_MAP_B_TO_B */
5957+ 1044, /* GL_PIXEL_MAP_A_TO_A */
5958+ 1057, /* GL_PIXEL_MAP_I_TO_I_SIZE */
5959+ 1063, /* GL_PIXEL_MAP_S_TO_S_SIZE */
5960+ 1059, /* GL_PIXEL_MAP_I_TO_R_SIZE */
5961+ 1055, /* GL_PIXEL_MAP_I_TO_G_SIZE */
5962+ 1053, /* GL_PIXEL_MAP_I_TO_B_SIZE */
5963+ 1051, /* GL_PIXEL_MAP_I_TO_A_SIZE */
5964+ 1061, /* GL_PIXEL_MAP_R_TO_R_SIZE */
5965+ 1049, /* GL_PIXEL_MAP_G_TO_G_SIZE */
5966+ 1047, /* GL_PIXEL_MAP_B_TO_B_SIZE */
5967+ 1045, /* GL_PIXEL_MAP_A_TO_A_SIZE */
5968+ 1649, /* GL_UNPACK_SWAP_BYTES */
5969+ 1644, /* GL_UNPACK_LSB_FIRST */
5970+ 1645, /* GL_UNPACK_ROW_LENGTH */
5971+ 1648, /* GL_UNPACK_SKIP_ROWS */
5972+ 1647, /* GL_UNPACK_SKIP_PIXELS */
5973+ 1642, /* GL_UNPACK_ALIGNMENT */
5974+ 1031, /* GL_PACK_SWAP_BYTES */
5975+ 1026, /* GL_PACK_LSB_FIRST */
5976+ 1027, /* GL_PACK_ROW_LENGTH */
5977+ 1030, /* GL_PACK_SKIP_ROWS */
5978+ 1029, /* GL_PACK_SKIP_PIXELS */
5979+ 1023, /* GL_PACK_ALIGNMENT */
5980+ 744, /* GL_MAP_COLOR */
5981+ 745, /* GL_MAP_STENCIL */
5982+ 589, /* GL_INDEX_SHIFT */
5983+ 588, /* GL_INDEX_OFFSET */
5984+ 1235, /* GL_RED_SCALE */
5985+ 1233, /* GL_RED_BIAS */
5986+ 1744, /* GL_ZOOM_X */
5987+ 1745, /* GL_ZOOM_Y */
5988+ 551, /* GL_GREEN_SCALE */
5989+ 549, /* GL_GREEN_BIAS */
5990+ 92, /* GL_BLUE_SCALE */
5991+ 90, /* GL_BLUE_BIAS */
5992+ 42, /* GL_ALPHA_SCALE */
5993+ 40, /* GL_ALPHA_BIAS */
5994+ 334, /* GL_DEPTH_SCALE */
5995+ 315, /* GL_DEPTH_BIAS */
5996+ 817, /* GL_MAX_EVAL_ORDER */
5997+ 821, /* GL_MAX_LIGHTS */
5998+ 800, /* GL_MAX_CLIP_PLANES */
5999+ 865, /* GL_MAX_TEXTURE_SIZE */
6000+ 827, /* GL_MAX_PIXEL_MAP_TABLE */
6001+ 796, /* GL_MAX_ATTRIB_STACK_DEPTH */
6002+ 824, /* GL_MAX_MODELVIEW_STACK_DEPTH */
6003+ 825, /* GL_MAX_NAME_STACK_DEPTH */
6004+ 853, /* GL_MAX_PROJECTION_STACK_DEPTH */
6005+ 866, /* GL_MAX_TEXTURE_STACK_DEPTH */
6006+ 880, /* GL_MAX_VIEWPORT_DIMS */
6007+ 797, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
6008+ 1429, /* GL_SUBPIXEL_BITS */
6009+ 584, /* GL_INDEX_BITS */
6010+ 1234, /* GL_RED_BITS */
6011+ 550, /* GL_GREEN_BITS */
6012+ 91, /* GL_BLUE_BITS */
6013+ 41, /* GL_ALPHA_BITS */
6014+ 316, /* GL_DEPTH_BITS */
6015+ 1404, /* GL_STENCIL_BITS */
6016+ 14, /* GL_ACCUM_RED_BITS */
6017+ 13, /* GL_ACCUM_GREEN_BITS */
6018+ 10, /* GL_ACCUM_BLUE_BITS */
6019+ 9, /* GL_ACCUM_ALPHA_BITS */
6020+ 946, /* GL_NAME_STACK_DEPTH */
6021+ 62, /* GL_AUTO_NORMAL */
6022+ 690, /* GL_MAP1_COLOR_4 */
6023+ 693, /* GL_MAP1_INDEX */
6024+ 694, /* GL_MAP1_NORMAL */
6025+ 695, /* GL_MAP1_TEXTURE_COORD_1 */
6026+ 696, /* GL_MAP1_TEXTURE_COORD_2 */
6027+ 697, /* GL_MAP1_TEXTURE_COORD_3 */
6028+ 698, /* GL_MAP1_TEXTURE_COORD_4 */
6029+ 699, /* GL_MAP1_VERTEX_3 */
6030+ 700, /* GL_MAP1_VERTEX_4 */
6031+ 717, /* GL_MAP2_COLOR_4 */
6032+ 720, /* GL_MAP2_INDEX */
6033+ 721, /* GL_MAP2_NORMAL */
6034+ 722, /* GL_MAP2_TEXTURE_COORD_1 */
6035+ 723, /* GL_MAP2_TEXTURE_COORD_2 */
6036+ 724, /* GL_MAP2_TEXTURE_COORD_3 */
6037+ 725, /* GL_MAP2_TEXTURE_COORD_4 */
6038+ 726, /* GL_MAP2_VERTEX_3 */
6039+ 727, /* GL_MAP2_VERTEX_4 */
6040+ 691, /* GL_MAP1_GRID_DOMAIN */
6041+ 692, /* GL_MAP1_GRID_SEGMENTS */
6042+ 718, /* GL_MAP2_GRID_DOMAIN */
6043+ 719, /* GL_MAP2_GRID_SEGMENTS */
6044+ 1506, /* GL_TEXTURE_1D */
6045+ 1508, /* GL_TEXTURE_2D */
6046+ 439, /* GL_FEEDBACK_BUFFER_POINTER */
6047+ 440, /* GL_FEEDBACK_BUFFER_SIZE */
6048+ 441, /* GL_FEEDBACK_BUFFER_TYPE */
6049+ 1330, /* GL_SELECTION_BUFFER_POINTER */
6050+ 1331, /* GL_SELECTION_BUFFER_SIZE */
6051+ 1619, /* GL_TEXTURE_WIDTH */
6052+ 1587, /* GL_TEXTURE_HEIGHT */
6053+ 1543, /* GL_TEXTURE_COMPONENTS */
6054+ 1527, /* GL_TEXTURE_BORDER_COLOR */
6055+ 1526, /* GL_TEXTURE_BORDER */
6056+ 345, /* GL_DONT_CARE */
6057+ 437, /* GL_FASTEST */
6058+ 954, /* GL_NICEST */
6059+ 47, /* GL_AMBIENT */
6060+ 342, /* GL_DIFFUSE */
6061+ 1373, /* GL_SPECULAR */
6062+ 1113, /* GL_POSITION */
6063+ 1376, /* GL_SPOT_DIRECTION */
6064+ 1377, /* GL_SPOT_EXPONENT */
6065+ 1375, /* GL_SPOT_CUTOFF */
6066+ 245, /* GL_CONSTANT_ATTENUATION */
6067+ 640, /* GL_LINEAR_ATTENUATION */
6068+ 1210, /* GL_QUADRATIC_ATTENUATION */
6069+ 219, /* GL_COMPILE */
6070+ 220, /* GL_COMPILE_AND_EXECUTE */
6071+ 111, /* GL_BYTE */
6072+ 1650, /* GL_UNSIGNED_BYTE */
6073+ 1344, /* GL_SHORT */
6074+ 1659, /* GL_UNSIGNED_SHORT */
6075+ 592, /* GL_INT */
6076+ 1653, /* GL_UNSIGNED_INT */
6077+ 444, /* GL_FLOAT */
6078+ 1, /* GL_2_BYTES */
6079+ 5, /* GL_3_BYTES */
6080+ 7, /* GL_4_BYTES */
6081+ 352, /* GL_DOUBLE */
6082+ 123, /* GL_CLEAR */
6083+ 49, /* GL_AND */
6084+ 51, /* GL_AND_REVERSE */
6085+ 269, /* GL_COPY */
6086+ 50, /* GL_AND_INVERTED */
6087+ 956, /* GL_NOOP */
6088+ 1740, /* GL_XOR */
6089+ 1018, /* GL_OR */
6090+ 957, /* GL_NOR */
6091+ 427, /* GL_EQUIV */
6092+ 618, /* GL_INVERT */
6093+ 1021, /* GL_OR_REVERSE */
6094+ 270, /* GL_COPY_INVERTED */
6095+ 1020, /* GL_OR_INVERTED */
6096+ 947, /* GL_NAND */
6097+ 1335, /* GL_SET */
6098+ 424, /* GL_EMISSION */
6099+ 1343, /* GL_SHININESS */
6100+ 48, /* GL_AMBIENT_AND_DIFFUSE */
6101+ 165, /* GL_COLOR_INDEXES */
6102+ 897, /* GL_MODELVIEW */
6103+ 1189, /* GL_PROJECTION */
6104+ 1441, /* GL_TEXTURE */
6105+ 138, /* GL_COLOR */
6106+ 313, /* GL_DEPTH */
6107+ 1395, /* GL_STENCIL */
6108+ 164, /* GL_COLOR_INDEX */
6109+ 1409, /* GL_STENCIL_INDEX */
6110+ 322, /* GL_DEPTH_COMPONENT */
6111+ 1230, /* GL_RED */
6112+ 548, /* GL_GREEN */
6113+ 89, /* GL_BLUE */
6114+ 31, /* GL_ALPHA */
6115+ 1254, /* GL_RGB */
6116+ 1273, /* GL_RGBA */
6117+ 668, /* GL_LUMINANCE */
6118+ 689, /* GL_LUMINANCE_ALPHA */
6119+ 73, /* GL_BITMAP */
6120+ 1069, /* GL_POINT */
6121+ 638, /* GL_LINE */
6122+ 442, /* GL_FILL */
6123+ 1239, /* GL_RENDER */
6124+ 438, /* GL_FEEDBACK */
6125+ 1329, /* GL_SELECT */
6126+ 443, /* GL_FLAT */
6127+ 1348, /* GL_SMOOTH */
6128+ 619, /* GL_KEEP */
6129+ 1248, /* GL_REPLACE */
6130+ 575, /* GL_INCR */
6131+ 309, /* GL_DECR */
6132+ 1674, /* GL_VENDOR */
6133+ 1245, /* GL_RENDERER */
6134+ 1675, /* GL_VERSION */
6135+ 431, /* GL_EXTENSIONS */
6136+ 1294, /* GL_S */
6137+ 1432, /* GL_T */
6138+ 1220, /* GL_R */
6139+ 1209, /* GL_Q */
6140+ 933, /* GL_MODULATE */
6141+ 308, /* GL_DECAL */
6142+ 1577, /* GL_TEXTURE_ENV_MODE */
6143+ 1576, /* GL_TEXTURE_ENV_COLOR */
6144+ 1575, /* GL_TEXTURE_ENV */
6145+ 432, /* GL_EYE_LINEAR */
6146+ 980, /* GL_OBJECT_LINEAR */
6147+ 1374, /* GL_SPHERE_MAP */
6148+ 1579, /* GL_TEXTURE_GEN_MODE */
6149+ 982, /* GL_OBJECT_PLANE */
6150+ 433, /* GL_EYE_PLANE */
6151+ 948, /* GL_NEAREST */
6152+ 639, /* GL_LINEAR */
6153+ 952, /* GL_NEAREST_MIPMAP_NEAREST */
6154+ 644, /* GL_LINEAR_MIPMAP_NEAREST */
6155+ 951, /* GL_NEAREST_MIPMAP_LINEAR */
6156+ 643, /* GL_LINEAR_MIPMAP_LINEAR */
6157+ 1600, /* GL_TEXTURE_MAG_FILTER */
6158+ 1608, /* GL_TEXTURE_MIN_FILTER */
6159+ 1621, /* GL_TEXTURE_WRAP_S */
6160+ 1622, /* GL_TEXTURE_WRAP_T */
6161+ 117, /* GL_CLAMP */
6162+ 1247, /* GL_REPEAT */
6163+ 1107, /* GL_POLYGON_OFFSET_UNITS */
6164+ 1106, /* GL_POLYGON_OFFSET_POINT */
6165+ 1105, /* GL_POLYGON_OFFSET_LINE */
6166+ 1221, /* GL_R3_G3_B2 */
6167+ 1671, /* GL_V2F */
6168+ 1672, /* GL_V3F */
6169+ 114, /* GL_C4UB_V2F */
6170+ 115, /* GL_C4UB_V3F */
6171+ 112, /* GL_C3F_V3F */
6172+ 945, /* GL_N3F_V3F */
6173+ 113, /* GL_C4F_N3F_V3F */
6174+ 1437, /* GL_T2F_V3F */
6175+ 1439, /* GL_T4F_V4F */
6176+ 1435, /* GL_T2F_C4UB_V3F */
6177+ 1433, /* GL_T2F_C3F_V3F */
6178+ 1436, /* GL_T2F_N3F_V3F */
6179+ 1434, /* GL_T2F_C4F_N3F_V3F */
6180+ 1438, /* GL_T4F_C4F_N3F_V4F */
6181+ 130, /* GL_CLIP_PLANE0 */
6182+ 131, /* GL_CLIP_PLANE1 */
6183+ 132, /* GL_CLIP_PLANE2 */
6184+ 133, /* GL_CLIP_PLANE3 */
6185+ 134, /* GL_CLIP_PLANE4 */
6186+ 135, /* GL_CLIP_PLANE5 */
6187+ 623, /* GL_LIGHT0 */
6188+ 624, /* GL_LIGHT1 */
6189+ 625, /* GL_LIGHT2 */
6190+ 626, /* GL_LIGHT3 */
6191+ 627, /* GL_LIGHT4 */
6192+ 628, /* GL_LIGHT5 */
6193+ 629, /* GL_LIGHT6 */
6194+ 630, /* GL_LIGHT7 */
6195+ 552, /* GL_HINT_BIT */
6196+ 247, /* GL_CONSTANT_COLOR */
6197+ 992, /* GL_ONE_MINUS_CONSTANT_COLOR */
6198+ 242, /* GL_CONSTANT_ALPHA */
6199+ 990, /* GL_ONE_MINUS_CONSTANT_ALPHA */
6200+ 76, /* GL_BLEND_COLOR */
6201+ 512, /* GL_FUNC_ADD */
6202+ 881, /* GL_MIN */
6203+ 793, /* GL_MAX */
6204+ 81, /* GL_BLEND_EQUATION */
6205+ 516, /* GL_FUNC_SUBTRACT */
6206+ 514, /* GL_FUNC_REVERSE_SUBTRACT */
6207+ 250, /* GL_CONVOLUTION_1D */
6208+ 251, /* GL_CONVOLUTION_2D */
6209+ 1332, /* GL_SEPARABLE_2D */
6210+ 254, /* GL_CONVOLUTION_BORDER_MODE */
6211+ 258, /* GL_CONVOLUTION_FILTER_SCALE */
6212+ 256, /* GL_CONVOLUTION_FILTER_BIAS */
6213+ 1231, /* GL_REDUCE */
6214+ 260, /* GL_CONVOLUTION_FORMAT */
6215+ 264, /* GL_CONVOLUTION_WIDTH */
6216+ 262, /* GL_CONVOLUTION_HEIGHT */
6217+ 808, /* GL_MAX_CONVOLUTION_WIDTH */
6218+ 806, /* GL_MAX_CONVOLUTION_HEIGHT */
6219+ 1146, /* GL_POST_CONVOLUTION_RED_SCALE */
6220+ 1142, /* GL_POST_CONVOLUTION_GREEN_SCALE */
6221+ 1137, /* GL_POST_CONVOLUTION_BLUE_SCALE */
6222+ 1133, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
6223+ 1144, /* GL_POST_CONVOLUTION_RED_BIAS */
6224+ 1140, /* GL_POST_CONVOLUTION_GREEN_BIAS */
6225+ 1135, /* GL_POST_CONVOLUTION_BLUE_BIAS */
6226+ 1131, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
6227+ 553, /* GL_HISTOGRAM */
6228+ 1193, /* GL_PROXY_HISTOGRAM */
6229+ 569, /* GL_HISTOGRAM_WIDTH */
6230+ 559, /* GL_HISTOGRAM_FORMAT */
6231+ 565, /* GL_HISTOGRAM_RED_SIZE */
6232+ 561, /* GL_HISTOGRAM_GREEN_SIZE */
6233+ 556, /* GL_HISTOGRAM_BLUE_SIZE */
6234+ 554, /* GL_HISTOGRAM_ALPHA_SIZE */
6235+ 563, /* GL_HISTOGRAM_LUMINANCE_SIZE */
6236+ 567, /* GL_HISTOGRAM_SINK */
6237+ 882, /* GL_MINMAX */
6238+ 884, /* GL_MINMAX_FORMAT */
6239+ 886, /* GL_MINMAX_SINK */
6240+ 1440, /* GL_TABLE_TOO_LARGE_EXT */
6241+ 1652, /* GL_UNSIGNED_BYTE_3_3_2 */
6242+ 1661, /* GL_UNSIGNED_SHORT_4_4_4_4 */
6243+ 1663, /* GL_UNSIGNED_SHORT_5_5_5_1 */
6244+ 1657, /* GL_UNSIGNED_INT_8_8_8_8 */
6245+ 1654, /* GL_UNSIGNED_INT_10_10_10_2 */
6246+ 1104, /* GL_POLYGON_OFFSET_FILL */
6247+ 1103, /* GL_POLYGON_OFFSET_FACTOR */
6248+ 1102, /* GL_POLYGON_OFFSET_BIAS */
6249+ 1251, /* GL_RESCALE_NORMAL */
6250+ 36, /* GL_ALPHA4 */
6251+ 38, /* GL_ALPHA8 */
6252+ 32, /* GL_ALPHA12 */
6253+ 34, /* GL_ALPHA16 */
6254+ 679, /* GL_LUMINANCE4 */
6255+ 685, /* GL_LUMINANCE8 */
6256+ 669, /* GL_LUMINANCE12 */
6257+ 675, /* GL_LUMINANCE16 */
6258+ 680, /* GL_LUMINANCE4_ALPHA4 */
6259+ 683, /* GL_LUMINANCE6_ALPHA2 */
6260+ 686, /* GL_LUMINANCE8_ALPHA8 */
6261+ 672, /* GL_LUMINANCE12_ALPHA4 */
6262+ 670, /* GL_LUMINANCE12_ALPHA12 */
6263+ 676, /* GL_LUMINANCE16_ALPHA16 */
6264+ 593, /* GL_INTENSITY */
6265+ 598, /* GL_INTENSITY4 */
6266+ 600, /* GL_INTENSITY8 */
6267+ 594, /* GL_INTENSITY12 */
6268+ 596, /* GL_INTENSITY16 */
6269+ 1263, /* GL_RGB2_EXT */
6270+ 1264, /* GL_RGB4 */
6271+ 1267, /* GL_RGB5 */
6272+ 1271, /* GL_RGB8 */
6273+ 1255, /* GL_RGB10 */
6274+ 1259, /* GL_RGB12 */
6275+ 1261, /* GL_RGB16 */
6276+ 1278, /* GL_RGBA2 */
6277+ 1280, /* GL_RGBA4 */
6278+ 1268, /* GL_RGB5_A1 */
6279+ 1284, /* GL_RGBA8 */
6280+ 1256, /* GL_RGB10_A2 */
6281+ 1274, /* GL_RGBA12 */
6282+ 1276, /* GL_RGBA16 */
6283+ 1613, /* GL_TEXTURE_RED_SIZE */
6284+ 1585, /* GL_TEXTURE_GREEN_SIZE */
6285+ 1524, /* GL_TEXTURE_BLUE_SIZE */
6286+ 1511, /* GL_TEXTURE_ALPHA_SIZE */
6287+ 1598, /* GL_TEXTURE_LUMINANCE_SIZE */
6288+ 1589, /* GL_TEXTURE_INTENSITY_SIZE */
6289+ 1249, /* GL_REPLACE_EXT */
6290+ 1197, /* GL_PROXY_TEXTURE_1D */
6291+ 1200, /* GL_PROXY_TEXTURE_2D */
6292+ 1617, /* GL_TEXTURE_TOO_LARGE_EXT */
6293+ 1610, /* GL_TEXTURE_PRIORITY */
6294+ 1615, /* GL_TEXTURE_RESIDENT */
6295+ 1514, /* GL_TEXTURE_BINDING_1D */
6296+ 1516, /* GL_TEXTURE_BINDING_2D */
6297+ 1518, /* GL_TEXTURE_BINDING_3D */
6298+ 1028, /* GL_PACK_SKIP_IMAGES */
6299+ 1024, /* GL_PACK_IMAGE_HEIGHT */
6300+ 1646, /* GL_UNPACK_SKIP_IMAGES */
6301+ 1643, /* GL_UNPACK_IMAGE_HEIGHT */
6302+ 1510, /* GL_TEXTURE_3D */
6303+ 1203, /* GL_PROXY_TEXTURE_3D */
6304+ 1572, /* GL_TEXTURE_DEPTH */
6305+ 1620, /* GL_TEXTURE_WRAP_R */
6306+ 794, /* GL_MAX_3D_TEXTURE_SIZE */
6307+ 1676, /* GL_VERTEX_ARRAY */
6308+ 959, /* GL_NORMAL_ARRAY */
6309+ 139, /* GL_COLOR_ARRAY */
6310+ 578, /* GL_INDEX_ARRAY */
6311+ 1551, /* GL_TEXTURE_COORD_ARRAY */
6312+ 415, /* GL_EDGE_FLAG_ARRAY */
6313+ 1681, /* GL_VERTEX_ARRAY_SIZE */
6314+ 1683, /* GL_VERTEX_ARRAY_TYPE */
6315+ 1682, /* GL_VERTEX_ARRAY_STRIDE */
6316+ 964, /* GL_NORMAL_ARRAY_TYPE */
6317+ 963, /* GL_NORMAL_ARRAY_STRIDE */
6318+ 143, /* GL_COLOR_ARRAY_SIZE */
6319+ 145, /* GL_COLOR_ARRAY_TYPE */
6320+ 144, /* GL_COLOR_ARRAY_STRIDE */
6321+ 583, /* GL_INDEX_ARRAY_TYPE */
6322+ 582, /* GL_INDEX_ARRAY_STRIDE */
6323+ 1555, /* GL_TEXTURE_COORD_ARRAY_SIZE */
6324+ 1557, /* GL_TEXTURE_COORD_ARRAY_TYPE */
6325+ 1556, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
6326+ 419, /* GL_EDGE_FLAG_ARRAY_STRIDE */
6327+ 1680, /* GL_VERTEX_ARRAY_POINTER */
6328+ 962, /* GL_NORMAL_ARRAY_POINTER */
6329+ 142, /* GL_COLOR_ARRAY_POINTER */
6330+ 581, /* GL_INDEX_ARRAY_POINTER */
6331+ 1554, /* GL_TEXTURE_COORD_ARRAY_POINTER */
6332+ 418, /* GL_EDGE_FLAG_ARRAY_POINTER */
6333+ 938, /* GL_MULTISAMPLE */
6334+ 1306, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
6335+ 1308, /* GL_SAMPLE_ALPHA_TO_ONE */
6336+ 1313, /* GL_SAMPLE_COVERAGE */
6337+ 1310, /* GL_SAMPLE_BUFFERS */
6338+ 1301, /* GL_SAMPLES */
6339+ 1317, /* GL_SAMPLE_COVERAGE_VALUE */
6340+ 1315, /* GL_SAMPLE_COVERAGE_INVERT */
6341+ 170, /* GL_COLOR_MATRIX */
6342+ 172, /* GL_COLOR_MATRIX_STACK_DEPTH */
6343+ 802, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
6344+ 1129, /* GL_POST_COLOR_MATRIX_RED_SCALE */
6345+ 1125, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
6346+ 1120, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
6347+ 1116, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
6348+ 1127, /* GL_POST_COLOR_MATRIX_RED_BIAS */
6349+ 1123, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
6350+ 1118, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
6351+ 1114, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
6352+ 1534, /* GL_TEXTURE_COLOR_TABLE_SGI */
6353+ 1204, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
6354+ 1536, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
6355+ 80, /* GL_BLEND_DST_RGB */
6356+ 88, /* GL_BLEND_SRC_RGB */
6357+ 79, /* GL_BLEND_DST_ALPHA */
6358+ 87, /* GL_BLEND_SRC_ALPHA */
6359+ 176, /* GL_COLOR_TABLE */
6360+ 1139, /* GL_POST_CONVOLUTION_COLOR_TABLE */
6361+ 1122, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
6362+ 1192, /* GL_PROXY_COLOR_TABLE */
6363+ 1196, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
6364+ 1195, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
6365+ 200, /* GL_COLOR_TABLE_SCALE */
6366+ 180, /* GL_COLOR_TABLE_BIAS */
6367+ 185, /* GL_COLOR_TABLE_FORMAT */
6368+ 202, /* GL_COLOR_TABLE_WIDTH */
6369+ 197, /* GL_COLOR_TABLE_RED_SIZE */
6370+ 188, /* GL_COLOR_TABLE_GREEN_SIZE */
6371+ 182, /* GL_COLOR_TABLE_BLUE_SIZE */
6372+ 177, /* GL_COLOR_TABLE_ALPHA_SIZE */
6373+ 194, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
6374+ 191, /* GL_COLOR_TABLE_INTENSITY_SIZE */
6375+ 71, /* GL_BGR */
6376+ 72, /* GL_BGRA */
6377+ 816, /* GL_MAX_ELEMENTS_VERTICES */
6378+ 815, /* GL_MAX_ELEMENTS_INDICES */
6379+ 1588, /* GL_TEXTURE_INDEX_SIZE_EXT */
6380+ 136, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
6381+ 1086, /* GL_POINT_SIZE_MIN */
6382+ 1082, /* GL_POINT_SIZE_MAX */
6383+ 1076, /* GL_POINT_FADE_THRESHOLD_SIZE */
6384+ 1072, /* GL_POINT_DISTANCE_ATTENUATION */
6385+ 118, /* GL_CLAMP_TO_BORDER */
6386+ 121, /* GL_CLAMP_TO_EDGE */
6387+ 1609, /* GL_TEXTURE_MIN_LOD */
6388+ 1607, /* GL_TEXTURE_MAX_LOD */
6389+ 1513, /* GL_TEXTURE_BASE_LEVEL */
6390+ 1606, /* GL_TEXTURE_MAX_LEVEL */
6391+ 572, /* GL_IGNORE_BORDER_HP */
6392+ 246, /* GL_CONSTANT_BORDER_HP */
6393+ 1250, /* GL_REPLICATE_BORDER_HP */
6394+ 252, /* GL_CONVOLUTION_BORDER_COLOR */
6395+ 987, /* GL_OCCLUSION_TEST_HP */
6396+ 988, /* GL_OCCLUSION_TEST_RESULT_HP */
6397+ 641, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
6398+ 1528, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
6399+ 1530, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
6400+ 1532, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
6401+ 1533, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
6402+ 1531, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
6403+ 1529, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
6404+ 798, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
6405+ 799, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
6406+ 1149, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
6407+ 1151, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
6408+ 1148, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
6409+ 1150, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
6410+ 1596, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
6411+ 1597, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
6412+ 1595, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
6413+ 518, /* GL_GENERATE_MIPMAP */
6414+ 519, /* GL_GENERATE_MIPMAP_HINT */
6415+ 481, /* GL_FOG_OFFSET_SGIX */
6416+ 482, /* GL_FOG_OFFSET_VALUE_SGIX */
6417+ 1542, /* GL_TEXTURE_COMPARE_SGIX */
6418+ 1541, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
6419+ 1592, /* GL_TEXTURE_LEQUAL_R_SGIX */
6420+ 1584, /* GL_TEXTURE_GEQUAL_R_SGIX */
6421+ 323, /* GL_DEPTH_COMPONENT16 */
6422+ 326, /* GL_DEPTH_COMPONENT24 */
6423+ 329, /* GL_DEPTH_COMPONENT32 */
6424+ 274, /* GL_CULL_VERTEX_EXT */
6425+ 276, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
6426+ 275, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
6427+ 1737, /* GL_WRAP_BORDER_SUN */
6428+ 1535, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
6429+ 634, /* GL_LIGHT_MODEL_COLOR_CONTROL */
6430+ 1345, /* GL_SINGLE_COLOR */
6431+ 1333, /* GL_SEPARATE_SPECULAR_COLOR */
6432+ 1342, /* GL_SHARED_TEXTURE_PALETTE_EXT */
6433+ 1651, /* GL_UNSIGNED_BYTE_2_3_3_REV */
6434+ 1664, /* GL_UNSIGNED_SHORT_5_6_5 */
6435+ 1665, /* GL_UNSIGNED_SHORT_5_6_5_REV */
6436+ 1662, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
6437+ 1660, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
6438+ 1658, /* GL_UNSIGNED_INT_8_8_8_8_REV */
6439+ 1656, /* GL_UNSIGNED_INT_2_10_10_10_REV */
6440+ 1604, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
6441+ 1605, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
6442+ 1603, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
6443+ 889, /* GL_MIRRORED_REPEAT */
6444+ 1289, /* GL_RGB_S3TC */
6445+ 1266, /* GL_RGB4_S3TC */
6446+ 1288, /* GL_RGBA_S3TC */
6447+ 1283, /* GL_RGBA4_S3TC */
6448+ 1286, /* GL_RGBA_DXT5_S3TC */
6449+ 1281, /* GL_RGBA4_DXT5_S3TC */
6450+ 239, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
6451+ 234, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
6452+ 235, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
6453+ 236, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
6454+ 950, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
6455+ 949, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
6456+ 642, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
6457+ 468, /* GL_FOG_COORDINATE_SOURCE */
6458+ 460, /* GL_FOG_COORD */
6459+ 484, /* GL_FRAGMENT_DEPTH */
6460+ 280, /* GL_CURRENT_FOG_COORD */
6461+ 467, /* GL_FOG_COORDINATE_ARRAY_TYPE */
6462+ 466, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
6463+ 465, /* GL_FOG_COORDINATE_ARRAY_POINTER */
6464+ 462, /* GL_FOG_COORDINATE_ARRAY */
6465+ 174, /* GL_COLOR_SUM */
6466+ 299, /* GL_CURRENT_SECONDARY_COLOR */
6467+ 1326, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
6468+ 1328, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
6469+ 1327, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
6470+ 1325, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
6471+ 1322, /* GL_SECONDARY_COLOR_ARRAY */
6472+ 528, /* GL_GL_CURRENT_RASTER_SECONDARY_COLOR */
6473+ 28, /* GL_ALIASED_POINT_SIZE_RANGE */
6474+ 27, /* GL_ALIASED_LINE_WIDTH_RANGE */
6475+ 1442, /* GL_TEXTURE0 */
6476+ 1444, /* GL_TEXTURE1 */
6477+ 1466, /* GL_TEXTURE2 */
6478+ 1488, /* GL_TEXTURE3 */
6479+ 1494, /* GL_TEXTURE4 */
6480+ 1496, /* GL_TEXTURE5 */
6481+ 1498, /* GL_TEXTURE6 */
6482+ 1500, /* GL_TEXTURE7 */
6483+ 1502, /* GL_TEXTURE8 */
6484+ 1504, /* GL_TEXTURE9 */
6485+ 1445, /* GL_TEXTURE10 */
6486+ 1447, /* GL_TEXTURE11 */
6487+ 1449, /* GL_TEXTURE12 */
6488+ 1451, /* GL_TEXTURE13 */
6489+ 1453, /* GL_TEXTURE14 */
6490+ 1455, /* GL_TEXTURE15 */
6491+ 1457, /* GL_TEXTURE16 */
6492+ 1459, /* GL_TEXTURE17 */
6493+ 1461, /* GL_TEXTURE18 */
6494+ 1463, /* GL_TEXTURE19 */
6495+ 1467, /* GL_TEXTURE20 */
6496+ 1469, /* GL_TEXTURE21 */
6497+ 1471, /* GL_TEXTURE22 */
6498+ 1473, /* GL_TEXTURE23 */
6499+ 1475, /* GL_TEXTURE24 */
6500+ 1477, /* GL_TEXTURE25 */
6501+ 1479, /* GL_TEXTURE26 */
6502+ 1481, /* GL_TEXTURE27 */
6503+ 1483, /* GL_TEXTURE28 */
6504+ 1485, /* GL_TEXTURE29 */
6505+ 1489, /* GL_TEXTURE30 */
6506+ 1491, /* GL_TEXTURE31 */
6507+ 18, /* GL_ACTIVE_TEXTURE */
6508+ 124, /* GL_CLIENT_ACTIVE_TEXTURE */
6509+ 867, /* GL_MAX_TEXTURE_UNITS */
6510+ 1630, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
6511+ 1633, /* GL_TRANSPOSE_PROJECTION_MATRIX */
6512+ 1635, /* GL_TRANSPOSE_TEXTURE_MATRIX */
6513+ 1627, /* GL_TRANSPOSE_COLOR_MATRIX */
6514+ 1430, /* GL_SUBTRACT */
6515+ 856, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
6516+ 222, /* GL_COMPRESSED_ALPHA */
6517+ 226, /* GL_COMPRESSED_LUMINANCE */
6518+ 227, /* GL_COMPRESSED_LUMINANCE_ALPHA */
6519+ 224, /* GL_COMPRESSED_INTENSITY */
6520+ 230, /* GL_COMPRESSED_RGB */
6521+ 231, /* GL_COMPRESSED_RGBA */
6522+ 1549, /* GL_TEXTURE_COMPRESSION_HINT */
6523+ 1611, /* GL_TEXTURE_RECTANGLE_ARB */
6524+ 1521, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
6525+ 1207, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
6526+ 854, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
6527+ 335, /* GL_DEPTH_STENCIL_NV */
6528+ 1655, /* GL_UNSIGNED_INT_24_8_NV */
6529+ 863, /* GL_MAX_TEXTURE_LOD_BIAS */
6530+ 1602, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
6531+ 864, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
6532+ 1578, /* GL_TEXTURE_FILTER_CONTROL */
6533+ 1593, /* GL_TEXTURE_LOD_BIAS */
6534+ 207, /* GL_COMBINE4 */
6535+ 857, /* GL_MAX_SHININESS_NV */
6536+ 858, /* GL_MAX_SPOT_EXPONENT_NV */
6537+ 576, /* GL_INCR_WRAP */
6538+ 310, /* GL_DECR_WRAP */
6539+ 909, /* GL_MODELVIEW1_ARB */
6540+ 965, /* GL_NORMAL_MAP */
6541+ 1236, /* GL_REFLECTION_MAP */
6542+ 1558, /* GL_TEXTURE_CUBE_MAP */
6543+ 1519, /* GL_TEXTURE_BINDING_CUBE_MAP */
6544+ 1566, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
6545+ 1560, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
6546+ 1568, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
6547+ 1562, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
6548+ 1570, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
6549+ 1564, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
6550+ 1205, /* GL_PROXY_TEXTURE_CUBE_MAP */
6551+ 810, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
6552+ 944, /* GL_MULTISAMPLE_FILTER_HINT_NV */
6553+ 476, /* GL_FOG_DISTANCE_MODE_NV */
6554+ 435, /* GL_EYE_RADIAL_NV */
6555+ 434, /* GL_EYE_PLANE_ABSOLUTE_NV */
6556+ 206, /* GL_COMBINE */
6557+ 213, /* GL_COMBINE_RGB */
6558+ 208, /* GL_COMBINE_ALPHA */
6559+ 1290, /* GL_RGB_SCALE */
6560+ 24, /* GL_ADD_SIGNED */
6561+ 603, /* GL_INTERPOLATE */
6562+ 241, /* GL_CONSTANT */
6563+ 1155, /* GL_PRIMARY_COLOR */
6564+ 1152, /* GL_PREVIOUS */
6565+ 1356, /* GL_SOURCE0_RGB */
6566+ 1362, /* GL_SOURCE1_RGB */
6567+ 1368, /* GL_SOURCE2_RGB */
6568+ 1372, /* GL_SOURCE3_RGB_NV */
6569+ 1353, /* GL_SOURCE0_ALPHA */
6570+ 1359, /* GL_SOURCE1_ALPHA */
6571+ 1365, /* GL_SOURCE2_ALPHA */
6572+ 1371, /* GL_SOURCE3_ALPHA_NV */
6573+ 1001, /* GL_OPERAND0_RGB */
6574+ 1007, /* GL_OPERAND1_RGB */
6575+ 1013, /* GL_OPERAND2_RGB */
6576+ 1017, /* GL_OPERAND3_RGB_NV */
6577+ 998, /* GL_OPERAND0_ALPHA */
6578+ 1004, /* GL_OPERAND1_ALPHA */
6579+ 1010, /* GL_OPERAND2_ALPHA */
6580+ 1016, /* GL_OPERAND3_ALPHA_NV */
6581+ 1677, /* GL_VERTEX_ARRAY_BINDING_APPLE */
6582+ 1741, /* GL_YCBCR_422_APPLE */
6583+ 1666, /* GL_UNSIGNED_SHORT_8_8_APPLE */
6584+ 1668, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
6585+ 1347, /* GL_SLICE_ACCUM_SUN */
6586+ 1212, /* GL_QUAD_MESH_SUN */
6587+ 1639, /* GL_TRIANGLE_MESH_SUN */
6588+ 1715, /* GL_VERTEX_PROGRAM_ARB */
6589+ 1726, /* GL_VERTEX_STATE_PROGRAM_NV */
6590+ 1702, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
6591+ 1708, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
6592+ 1710, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
6593+ 1712, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
6594+ 301, /* GL_CURRENT_VERTEX_ATTRIB */
6595+ 1168, /* GL_PROGRAM_LENGTH_ARB */
6596+ 1182, /* GL_PROGRAM_STRING_ARB */
6597+ 931, /* GL_MODELVIEW_PROJECTION_NV */
6598+ 571, /* GL_IDENTITY_NV */
6599+ 616, /* GL_INVERSE_NV */
6600+ 1632, /* GL_TRANSPOSE_NV */
6601+ 617, /* GL_INVERSE_TRANSPOSE_NV */
6602+ 840, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
6603+ 839, /* GL_MAX_PROGRAM_MATRICES_ARB */
6604+ 747, /* GL_MATRIX0_NV */
6605+ 759, /* GL_MATRIX1_NV */
6606+ 771, /* GL_MATRIX2_NV */
6607+ 775, /* GL_MATRIX3_NV */
6608+ 777, /* GL_MATRIX4_NV */
6609+ 779, /* GL_MATRIX5_NV */
6610+ 781, /* GL_MATRIX6_NV */
6611+ 783, /* GL_MATRIX7_NV */
6612+ 286, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
6613+ 283, /* GL_CURRENT_MATRIX_ARB */
6614+ 1718, /* GL_VERTEX_PROGRAM_POINT_SIZE */
6615+ 1721, /* GL_VERTEX_PROGRAM_TWO_SIDE */
6616+ 1180, /* GL_PROGRAM_PARAMETER_NV */
6617+ 1706, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
6618+ 1184, /* GL_PROGRAM_TARGET_NV */
6619+ 1181, /* GL_PROGRAM_RESIDENT_NV */
6620+ 1624, /* GL_TRACK_MATRIX_NV */
6621+ 1625, /* GL_TRACK_MATRIX_TRANSFORM_NV */
6622+ 1716, /* GL_VERTEX_PROGRAM_BINDING_NV */
6623+ 1162, /* GL_PROGRAM_ERROR_POSITION_ARB */
6624+ 320, /* GL_DEPTH_CLAMP_NV */
6625+ 1684, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
6626+ 1691, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
6627+ 1692, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
6628+ 1693, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
6629+ 1694, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
6630+ 1695, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
6631+ 1696, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
6632+ 1697, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
6633+ 1698, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
6634+ 1699, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
6635+ 1685, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
6636+ 1686, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
6637+ 1687, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
6638+ 1688, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
6639+ 1689, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
6640+ 1690, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
6641+ 701, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
6642+ 708, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
6643+ 709, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
6644+ 710, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
6645+ 711, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
6646+ 712, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
6647+ 713, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
6648+ 714, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
6649+ 715, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
6650+ 716, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
6651+ 702, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
6652+ 703, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
6653+ 704, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
6654+ 705, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
6655+ 706, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
6656+ 707, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
6657+ 728, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
6658+ 735, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
6659+ 736, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
6660+ 737, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
6661+ 738, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
6662+ 739, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
6663+ 740, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
6664+ 1161, /* GL_PROGRAM_BINDING_ARB */
6665+ 742, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
6666+ 743, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
6667+ 729, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
6668+ 730, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
6669+ 731, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
6670+ 732, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
6671+ 733, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
6672+ 734, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
6673+ 1547, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
6674+ 1544, /* GL_TEXTURE_COMPRESSED */
6675+ 970, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
6676+ 240, /* GL_COMPRESSED_TEXTURE_FORMATS */
6677+ 879, /* GL_MAX_VERTEX_UNITS_ARB */
6678+ 22, /* GL_ACTIVE_VERTEX_UNITS_ARB */
6679+ 1736, /* GL_WEIGHT_SUM_UNITY_ARB */
6680+ 1714, /* GL_VERTEX_BLEND_ARB */
6681+ 303, /* GL_CURRENT_WEIGHT_ARB */
6682+ 1735, /* GL_WEIGHT_ARRAY_TYPE_ARB */
6683+ 1734, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
6684+ 1733, /* GL_WEIGHT_ARRAY_SIZE_ARB */
6685+ 1732, /* GL_WEIGHT_ARRAY_POINTER_ARB */
6686+ 1729, /* GL_WEIGHT_ARRAY_ARB */
6687+ 346, /* GL_DOT3_RGB */
6688+ 347, /* GL_DOT3_RGBA */
6689+ 238, /* GL_COMPRESSED_RGB_FXT1_3DFX */
6690+ 233, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
6691+ 939, /* GL_MULTISAMPLE_3DFX */
6692+ 1311, /* GL_SAMPLE_BUFFERS_3DFX */
6693+ 1302, /* GL_SAMPLES_3DFX */
6694+ 920, /* GL_MODELVIEW2_ARB */
6695+ 923, /* GL_MODELVIEW3_ARB */
6696+ 924, /* GL_MODELVIEW4_ARB */
6697+ 925, /* GL_MODELVIEW5_ARB */
6698+ 926, /* GL_MODELVIEW6_ARB */
6699+ 927, /* GL_MODELVIEW7_ARB */
6700+ 928, /* GL_MODELVIEW8_ARB */
6701+ 929, /* GL_MODELVIEW9_ARB */
6702+ 899, /* GL_MODELVIEW10_ARB */
6703+ 900, /* GL_MODELVIEW11_ARB */
6704+ 901, /* GL_MODELVIEW12_ARB */
6705+ 902, /* GL_MODELVIEW13_ARB */
6706+ 903, /* GL_MODELVIEW14_ARB */
6707+ 904, /* GL_MODELVIEW15_ARB */
6708+ 905, /* GL_MODELVIEW16_ARB */
6709+ 906, /* GL_MODELVIEW17_ARB */
6710+ 907, /* GL_MODELVIEW18_ARB */
6711+ 908, /* GL_MODELVIEW19_ARB */
6712+ 910, /* GL_MODELVIEW20_ARB */
6713+ 911, /* GL_MODELVIEW21_ARB */
6714+ 912, /* GL_MODELVIEW22_ARB */
6715+ 913, /* GL_MODELVIEW23_ARB */
6716+ 914, /* GL_MODELVIEW24_ARB */
6717+ 915, /* GL_MODELVIEW25_ARB */
6718+ 916, /* GL_MODELVIEW26_ARB */
6719+ 917, /* GL_MODELVIEW27_ARB */
6720+ 918, /* GL_MODELVIEW28_ARB */
6721+ 919, /* GL_MODELVIEW29_ARB */
6722+ 921, /* GL_MODELVIEW30_ARB */
6723+ 922, /* GL_MODELVIEW31_ARB */
6724+ 351, /* GL_DOT3_RGB_EXT */
6725+ 349, /* GL_DOT3_RGBA_EXT */
6726+ 893, /* GL_MIRROR_CLAMP_EXT */
6727+ 896, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
6728+ 934, /* GL_MODULATE_ADD_ATI */
6729+ 935, /* GL_MODULATE_SIGNED_ADD_ATI */
6730+ 936, /* GL_MODULATE_SUBTRACT_ATI */
6731+ 1742, /* GL_YCBCR_MESA */
6732+ 1025, /* GL_PACK_INVERT_MESA */
6733+ 306, /* GL_DEBUG_OBJECT_MESA */
6734+ 307, /* GL_DEBUG_PRINT_MESA */
6735+ 305, /* GL_DEBUG_ASSERT_MESA */
6736+ 107, /* GL_BUFFER_SIZE */
6737+ 109, /* GL_BUFFER_USAGE */
6738+ 1398, /* GL_STENCIL_BACK_FUNC */
6739+ 1397, /* GL_STENCIL_BACK_FAIL */
6740+ 1399, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
6741+ 1400, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
6742+ 485, /* GL_FRAGMENT_PROGRAM_ARB */
6743+ 1159, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
6744+ 1187, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
6745+ 1186, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
6746+ 1171, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
6747+ 1177, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
6748+ 1176, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
6749+ 829, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
6750+ 852, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
6751+ 851, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
6752+ 842, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
6753+ 848, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
6754+ 847, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
6755+ 812, /* GL_MAX_DRAW_BUFFERS */
6756+ 355, /* GL_DRAW_BUFFER0 */
6757+ 358, /* GL_DRAW_BUFFER1 */
6758+ 379, /* GL_DRAW_BUFFER2 */
6759+ 382, /* GL_DRAW_BUFFER3 */
6760+ 385, /* GL_DRAW_BUFFER4 */
6761+ 388, /* GL_DRAW_BUFFER5 */
6762+ 391, /* GL_DRAW_BUFFER6 */
6763+ 394, /* GL_DRAW_BUFFER7 */
6764+ 397, /* GL_DRAW_BUFFER8 */
6765+ 400, /* GL_DRAW_BUFFER9 */
6766+ 359, /* GL_DRAW_BUFFER10 */
6767+ 362, /* GL_DRAW_BUFFER11 */
6768+ 365, /* GL_DRAW_BUFFER12 */
6769+ 368, /* GL_DRAW_BUFFER13 */
6770+ 371, /* GL_DRAW_BUFFER14 */
6771+ 374, /* GL_DRAW_BUFFER15 */
6772+ 82, /* GL_BLEND_EQUATION_ALPHA */
6773+ 792, /* GL_MATRIX_PALETTE_ARB */
6774+ 823, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
6775+ 826, /* GL_MAX_PALETTE_MATRICES_ARB */
6776+ 289, /* GL_CURRENT_PALETTE_MATRIX_ARB */
6777+ 786, /* GL_MATRIX_INDEX_ARRAY_ARB */
6778+ 284, /* GL_CURRENT_MATRIX_INDEX_ARB */
6779+ 788, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
6780+ 790, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
6781+ 789, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
6782+ 787, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
6783+ 1573, /* GL_TEXTURE_DEPTH_SIZE */
6784+ 339, /* GL_DEPTH_TEXTURE_MODE */
6785+ 1539, /* GL_TEXTURE_COMPARE_MODE */
6786+ 1537, /* GL_TEXTURE_COMPARE_FUNC */
6787+ 217, /* GL_COMPARE_R_TO_TEXTURE */
6788+ 1093, /* GL_POINT_SPRITE */
6789+ 266, /* GL_COORD_REPLACE */
6790+ 1097, /* GL_POINT_SPRITE_R_MODE_NV */
6791+ 1214, /* GL_QUERY_COUNTER_BITS */
6792+ 291, /* GL_CURRENT_QUERY */
6793+ 1216, /* GL_QUERY_RESULT */
6794+ 1218, /* GL_QUERY_RESULT_AVAILABLE */
6795+ 873, /* GL_MAX_VERTEX_ATTRIBS */
6796+ 1704, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
6797+ 337, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
6798+ 336, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
6799+ 859, /* GL_MAX_TEXTURE_COORDS */
6800+ 861, /* GL_MAX_TEXTURE_IMAGE_UNITS */
6801+ 1164, /* GL_PROGRAM_ERROR_STRING_ARB */
6802+ 1166, /* GL_PROGRAM_FORMAT_ASCII_ARB */
6803+ 1165, /* GL_PROGRAM_FORMAT_ARB */
6804+ 1618, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
6805+ 318, /* GL_DEPTH_BOUNDS_TEST_EXT */
6806+ 317, /* GL_DEPTH_BOUNDS_EXT */
6807+ 52, /* GL_ARRAY_BUFFER */
6808+ 420, /* GL_ELEMENT_ARRAY_BUFFER */
6809+ 54, /* GL_ARRAY_BUFFER_BINDING */
6810+ 422, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
6811+ 1678, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
6812+ 960, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
6813+ 140, /* GL_COLOR_ARRAY_BUFFER_BINDING */
6814+ 579, /* GL_INDEX_ARRAY_BUFFER_BINDING */
6815+ 1552, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
6816+ 416, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
6817+ 1323, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
6818+ 463, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
6819+ 1730, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
6820+ 1700, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
6821+ 1167, /* GL_PROGRAM_INSTRUCTIONS_ARB */
6822+ 835, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
6823+ 1173, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
6824+ 844, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
6825+ 1185, /* GL_PROGRAM_TEMPORARIES_ARB */
6826+ 850, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
6827+ 1175, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
6828+ 846, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
6829+ 1179, /* GL_PROGRAM_PARAMETERS_ARB */
6830+ 849, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
6831+ 1174, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
6832+ 845, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
6833+ 1160, /* GL_PROGRAM_ATTRIBS_ARB */
6834+ 830, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
6835+ 1172, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
6836+ 843, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
6837+ 1158, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
6838+ 828, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
6839+ 1170, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
6840+ 841, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
6841+ 836, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
6842+ 832, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
6843+ 1188, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
6844+ 1629, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
6845+ 1226, /* GL_READ_ONLY */
6846+ 1738, /* GL_WRITE_ONLY */
6847+ 1228, /* GL_READ_WRITE */
6848+ 101, /* GL_BUFFER_ACCESS */
6849+ 103, /* GL_BUFFER_MAPPED */
6850+ 105, /* GL_BUFFER_MAP_POINTER */
6851+ 1623, /* GL_TIME_ELAPSED_EXT */
6852+ 746, /* GL_MATRIX0_ARB */
6853+ 758, /* GL_MATRIX1_ARB */
6854+ 770, /* GL_MATRIX2_ARB */
6855+ 774, /* GL_MATRIX3_ARB */
6856+ 776, /* GL_MATRIX4_ARB */
6857+ 778, /* GL_MATRIX5_ARB */
6858+ 780, /* GL_MATRIX6_ARB */
6859+ 782, /* GL_MATRIX7_ARB */
6860+ 784, /* GL_MATRIX8_ARB */
6861+ 785, /* GL_MATRIX9_ARB */
6862+ 748, /* GL_MATRIX10_ARB */
6863+ 749, /* GL_MATRIX11_ARB */
6864+ 750, /* GL_MATRIX12_ARB */
6865+ 751, /* GL_MATRIX13_ARB */
6866+ 752, /* GL_MATRIX14_ARB */
6867+ 753, /* GL_MATRIX15_ARB */
6868+ 754, /* GL_MATRIX16_ARB */
6869+ 755, /* GL_MATRIX17_ARB */
6870+ 756, /* GL_MATRIX18_ARB */
6871+ 757, /* GL_MATRIX19_ARB */
6872+ 760, /* GL_MATRIX20_ARB */
6873+ 761, /* GL_MATRIX21_ARB */
6874+ 762, /* GL_MATRIX22_ARB */
6875+ 763, /* GL_MATRIX23_ARB */
6876+ 764, /* GL_MATRIX24_ARB */
6877+ 765, /* GL_MATRIX25_ARB */
6878+ 766, /* GL_MATRIX26_ARB */
6879+ 767, /* GL_MATRIX27_ARB */
6880+ 768, /* GL_MATRIX28_ARB */
6881+ 769, /* GL_MATRIX29_ARB */
6882+ 772, /* GL_MATRIX30_ARB */
6883+ 773, /* GL_MATRIX31_ARB */
6884+ 1425, /* GL_STREAM_DRAW */
6885+ 1427, /* GL_STREAM_READ */
6886+ 1423, /* GL_STREAM_COPY */
6887+ 1391, /* GL_STATIC_DRAW */
6888+ 1393, /* GL_STATIC_READ */
6889+ 1389, /* GL_STATIC_COPY */
6890+ 410, /* GL_DYNAMIC_DRAW */
6891+ 412, /* GL_DYNAMIC_READ */
6892+ 408, /* GL_DYNAMIC_COPY */
6893+ 535, /* GL_GL_PIXEL_PACK_BUFFER */
6894+ 537, /* GL_GL_PIXEL_UNPACK_BUFFER */
6895+ 536, /* GL_GL_PIXEL_PACK_BUFFER_BINDING */
6896+ 538, /* GL_GL_PIXEL_UNPACK_BUFFER_BINDING */
6897+ 833, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
6898+ 831, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
6899+ 834, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
6900+ 838, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
6901+ 837, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
6902+ 795, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
6903+ 1419, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
6904+ 17, /* GL_ACTIVE_STENCIL_FACE_EXT */
6905+ 894, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
6906+ 1304, /* GL_SAMPLES_PASSED */
6907+ 486, /* GL_FRAGMENT_SHADER */
6908+ 1724, /* GL_VERTEX_SHADER */
6909+ 1178, /* GL_PROGRAM_OBJECT_ARB */
6910+ 1336, /* GL_SHADER_OBJECT_ARB */
6911+ 819, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
6912+ 877, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
6913+ 871, /* GL_MAX_VARYING_FLOATS */
6914+ 875, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
6915+ 804, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
6916+ 985, /* GL_OBJECT_TYPE_ARB */
6917+ 1338, /* GL_SHADER_TYPE */
6918+ 451, /* GL_FLOAT_VEC2 */
6919+ 453, /* GL_FLOAT_VEC3 */
6920+ 455, /* GL_FLOAT_VEC4 */
6921+ 606, /* GL_INT_VEC2 */
6922+ 608, /* GL_INT_VEC3 */
6923+ 610, /* GL_INT_VEC4 */
6924+ 93, /* GL_BOOL */
6925+ 95, /* GL_BOOL_VEC2 */
6926+ 97, /* GL_BOOL_VEC3 */
6927+ 99, /* GL_BOOL_VEC4 */
6928+ 445, /* GL_FLOAT_MAT2 */
6929+ 447, /* GL_FLOAT_MAT3 */
6930+ 449, /* GL_FLOAT_MAT4 */
6931+ 1295, /* GL_SAMPLER_1D */
6932+ 1297, /* GL_SAMPLER_2D */
6933+ 1299, /* GL_SAMPLER_3D */
6934+ 1300, /* GL_SAMPLER_CUBE */
6935+ 1296, /* GL_SAMPLER_1D_SHADOW */
6936+ 1298, /* GL_SAMPLER_2D_SHADOW */
6937+ 529, /* GL_GL_FLOAT_MAT2x3 */
6938+ 530, /* GL_GL_FLOAT_MAT2x4 */
6939+ 531, /* GL_GL_FLOAT_MAT3x2 */
6940+ 532, /* GL_GL_FLOAT_MAT3x4 */
6941+ 533, /* GL_GL_FLOAT_MAT4x2 */
6942+ 534, /* GL_GL_FLOAT_MAT4x3 */
6943+ 312, /* GL_DELETE_STATUS */
6944+ 221, /* GL_COMPILE_STATUS */
6945+ 659, /* GL_LINK_STATUS */
6946+ 1673, /* GL_VALIDATE_STATUS */
6947+ 591, /* GL_INFO_LOG_LENGTH */
6948+ 56, /* GL_ATTACHED_SHADERS */
6949+ 20, /* GL_ACTIVE_UNIFORMS */
6950+ 21, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
6951+ 1337, /* GL_SHADER_SOURCE_LENGTH */
6952+ 15, /* GL_ACTIVE_ATTRIBUTES */
6953+ 16, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
6954+ 488, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
6955+ 1340, /* GL_SHADING_LANGUAGE_VERSION */
6956+ 290, /* GL_CURRENT_PROGRAM */
6957+ 1034, /* GL_PALETTE4_RGB8_OES */
6958+ 1036, /* GL_PALETTE4_RGBA8_OES */
6959+ 1032, /* GL_PALETTE4_R5_G6_B5_OES */
6960+ 1035, /* GL_PALETTE4_RGBA4_OES */
6961+ 1033, /* GL_PALETTE4_RGB5_A1_OES */
6962+ 1039, /* GL_PALETTE8_RGB8_OES */
6963+ 1041, /* GL_PALETTE8_RGBA8_OES */
6964+ 1037, /* GL_PALETTE8_R5_G6_B5_OES */
6965+ 1040, /* GL_PALETTE8_RGBA4_OES */
6966+ 1038, /* GL_PALETTE8_RGB5_A1_OES */
6967+ 574, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
6968+ 573, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
6969+ 1507, /* GL_TEXTURE_1D_ARRAY_EXT */
6970+ 1198, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
6971+ 1509, /* GL_TEXTURE_2D_ARRAY_EXT */
6972+ 1201, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
6973+ 1515, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
6974+ 1517, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
6975+ 543, /* GL_GL_SRGB */
6976+ 544, /* GL_GL_SRGB8 */
6977+ 546, /* GL_GL_SRGB_ALPHA */
6978+ 545, /* GL_GL_SRGB8_ALPHA8 */
6979+ 542, /* GL_GL_SLUMINANCE_ALPHA */
6980+ 541, /* GL_GL_SLUMINANCE8_ALPHA8 */
6981+ 539, /* GL_GL_SLUMINANCE */
6982+ 540, /* GL_GL_SLUMINANCE8 */
6983+ 526, /* GL_GL_COMPRESSED_SRGB */
6984+ 527, /* GL_GL_COMPRESSED_SRGB_ALPHA */
6985+ 524, /* GL_GL_COMPRESSED_SLUMINANCE */
6986+ 525, /* GL_GL_COMPRESSED_SLUMINANCE_ALPHA */
6987+ 1095, /* GL_POINT_SPRITE_COORD_ORIGIN */
6988+ 667, /* GL_LOWER_LEFT */
6989+ 1670, /* GL_UPPER_LEFT */
6990+ 1401, /* GL_STENCIL_BACK_REF */
6991+ 1402, /* GL_STENCIL_BACK_VALUE_MASK */
6992+ 1403, /* GL_STENCIL_BACK_WRITEMASK */
6993+ 403, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
6994+ 1240, /* GL_RENDERBUFFER_BINDING_EXT */
6995+ 1225, /* GL_READ_FRAMEBUFFER_EXT */
6996+ 404, /* GL_DRAW_FRAMEBUFFER_EXT */
6997+ 1224, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
6998+ 490, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
6999+ 489, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
7000+ 494, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
7001+ 492, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
7002+ 491, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
7003+ 496, /* GL_FRAMEBUFFER_COMPLETE_EXT */
7004+ 498, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
7005+ 503, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
7006+ 501, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
7007+ 499, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
7008+ 502, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
7009+ 500, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
7010+ 504, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
7011+ 506, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
7012+ 505, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
7013+ 801, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
7014+ 146, /* GL_COLOR_ATTACHMENT0_EXT */
7015+ 153, /* GL_COLOR_ATTACHMENT1_EXT */
7016+ 154, /* GL_COLOR_ATTACHMENT2_EXT */
7017+ 155, /* GL_COLOR_ATTACHMENT3_EXT */
7018+ 156, /* GL_COLOR_ATTACHMENT4_EXT */
7019+ 157, /* GL_COLOR_ATTACHMENT5_EXT */
7020+ 158, /* GL_COLOR_ATTACHMENT6_EXT */
7021+ 159, /* GL_COLOR_ATTACHMENT7_EXT */
7022+ 160, /* GL_COLOR_ATTACHMENT8_EXT */
7023+ 161, /* GL_COLOR_ATTACHMENT9_EXT */
7024+ 147, /* GL_COLOR_ATTACHMENT10_EXT */
7025+ 148, /* GL_COLOR_ATTACHMENT11_EXT */
7026+ 149, /* GL_COLOR_ATTACHMENT12_EXT */
7027+ 150, /* GL_COLOR_ATTACHMENT13_EXT */
7028+ 151, /* GL_COLOR_ATTACHMENT14_EXT */
7029+ 152, /* GL_COLOR_ATTACHMENT15_EXT */
7030+ 314, /* GL_DEPTH_ATTACHMENT_EXT */
7031+ 1396, /* GL_STENCIL_ATTACHMENT_EXT */
7032+ 497, /* GL_FRAMEBUFFER_EXT */
7033+ 1241, /* GL_RENDERBUFFER_EXT */
7034+ 1244, /* GL_RENDERBUFFER_WIDTH_EXT */
7035+ 1242, /* GL_RENDERBUFFER_HEIGHT_EXT */
7036+ 1243, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
7037+ 1414, /* GL_STENCIL_INDEX_EXT */
7038+ 1411, /* GL_STENCIL_INDEX1_EXT */
7039+ 1412, /* GL_STENCIL_INDEX4_EXT */
7040+ 1413, /* GL_STENCIL_INDEX8_EXT */
7041+ 1410, /* GL_STENCIL_INDEX16_EXT */
7042+ 428, /* GL_EVAL_BIT */
7043+ 1222, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
7044+ 661, /* GL_LIST_BIT */
7045+ 1523, /* GL_TEXTURE_BIT */
7046+ 1319, /* GL_SCISSOR_BIT */
7047+ 29, /* GL_ALL_ATTRIB_BITS */
7048+ 941, /* GL_MULTISAMPLE_BIT */
7049+ 30, /* GL_ALL_CLIENT_ATTRIB_BITS */
7050+};
7051+
7052+#define Elements(x) sizeof(x)/sizeof(*x)
7053+
7054+typedef int (*cfunc)(const void *, const void *);
7055+
7056+/**
7057+ * Compare a key name to an element in the \c all_enums array.
7058+ *
7059+ * \c bsearch always passes the key as the first parameter and the pointer
7060+ * to the array element as the second parameter. We can elimiate some
7061+ * extra work by taking advantage of that fact.
7062+ *
7063+ * \param a Pointer to the desired enum name.
7064+ * \param b Pointer to an element of the \c all_enums array.
7065+ */
7066+static int compar_name( const char *a, const enum_elt *b )
7067+{
7068+ return _mesa_strcmp( a, & enum_string_table[ b->offset ] );
7069+}
7070+
7071+/**
7072+ * Compare a key enum value to an element in the \c all_enums array.
7073+ *
7074+ * \c bsearch always passes the key as the first parameter and the pointer
7075+ * to the array element as the second parameter. We can elimiate some
7076+ * extra work by taking advantage of that fact.
7077+ *
7078+ * \param a Pointer to the desired enum name.
7079+ * \param b Pointer to an index into the \c all_enums array.
7080+ */
7081+static int compar_nr( const int *a, const unsigned *b )
7082+{
7083+ return a[0] - all_enums[*b].n;
7084+}
7085+
7086+
7087+static char token_tmp[20];
7088+
7089+const char *_mesa_lookup_enum_by_nr( int nr )
7090+{
7091+ unsigned * i;
7092+
7093+ i = (unsigned *)bsearch( & nr, reduced_enums, Elements(reduced_enums),
7094+ sizeof(reduced_enums[0]), (cfunc) compar_nr );
7095+
7096+ if ( i != NULL ) {
7097+ return & enum_string_table[ all_enums[ *i ].offset ];
7098+ }
7099+ else {
7100+ /* this is not re-entrant safe, no big deal here */
7101+ _mesa_sprintf(token_tmp, "0x%x", nr);
7102+ return token_tmp;
7103+ }
7104+}
7105+
7106+int _mesa_lookup_enum_by_name( const char *symbol )
7107+{
7108+ enum_elt * f = NULL;
7109+
7110+ if ( symbol != NULL ) {
7111+ f = (enum_elt *)bsearch( symbol, all_enums, Elements(all_enums),
7112+ sizeof( enum_elt ), (cfunc) compar_name );
7113+ }
7114+
7115+ return (f != NULL) ? f->n : -1;
7116+}
7117+
7118+
7119Index: qemu-0.12.4/target-i386/mesa_get.c
7120===================================================================
7121--- /dev/null
7122+++ qemu-0.12.4/target-i386/mesa_get.c
7123@@ -0,0 +1,5563 @@
7124+
7125+/***
7126+ *** NOTE!!! DO NOT EDIT THIS FILE!!! IT IS GENERATED BY get_gen.py
7127+ ***/
7128+
7129+#include "glheader.h"
7130+#include "context.h"
7131+#include "enable.h"
7132+#include "extensions.h"
7133+#include "fbobject.h"
7134+#include "get.h"
7135+#include "macros.h"
7136+#include "mtypes.h"
7137+#include "state.h"
7138+#include "texcompress.h"
7139+
7140+
7141+#define FLOAT_TO_BOOLEAN(X) ( (X) ? GL_TRUE : GL_FALSE )
7142+
7143+#define INT_TO_BOOLEAN(I) ( (I) ? GL_TRUE : GL_FALSE )
7144+
7145+#define ENUM_TO_BOOLEAN(E) ( (E) ? GL_TRUE : GL_FALSE )
7146+#define ENUM_TO_INT(E) ( (GLint) (E) )
7147+#define ENUM_TO_FLOAT(E) ( (GLfloat) (E) )
7148+
7149+#define BOOLEAN_TO_INT(B) ( (GLint) (B) )
7150+#define BOOLEAN_TO_FLOAT(B) ( (B) ? 1.0F : 0.0F )
7151+
7152+
7153+/*
7154+ * Check if named extension is enabled, if not generate error and return.
7155+ */
7156+#define CHECK_EXT1(EXT1, FUNC) \
7157+ if (!ctx->Extensions.EXT1) { \
7158+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
7159+ return; \
7160+ }
7161+
7162+/*
7163+ * Check if either of two extensions is enabled.
7164+ */
7165+#define CHECK_EXT2(EXT1, EXT2, FUNC) \
7166+ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2) { \
7167+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
7168+ return; \
7169+ }
7170+
7171+/*
7172+ * Check if either of three extensions is enabled.
7173+ */
7174+#define CHECK_EXT3(EXT1, EXT2, EXT3, FUNC) \
7175+ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2 && \
7176+ !ctx->Extensions.EXT3) { \
7177+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
7178+ return; \
7179+ }
7180+
7181+/*
7182+ * Check if either of four extensions is enabled.
7183+ */
7184+#define CHECK_EXT4(EXT1, EXT2, EXT3, EXT4, FUNC) \
7185+ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2 && \
7186+ !ctx->Extensions.EXT3 && !ctx->Extensions.EXT4) { \
7187+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \
7188+ return; \
7189+ }
7190+
7191+
7192+void GLAPIENTRY
7193+_mesa_GetBooleanv( GLenum pname, GLboolean *params )
7194+{
7195+ GET_CURRENT_CONTEXT(ctx);
7196+ ASSERT_OUTSIDE_BEGIN_END(ctx);
7197+
7198+ if (!params)
7199+ return;
7200+
7201+ if (ctx->NewState)
7202+ _mesa_update_state(ctx);
7203+
7204+ if (ctx->Driver.GetBooleanv &&
7205+ ctx->Driver.GetBooleanv(ctx, pname, params))
7206+ return;
7207+
7208+ switch (pname) {
7209+ case GL_ACCUM_RED_BITS:
7210+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumRedBits);
7211+ break;
7212+ case GL_ACCUM_GREEN_BITS:
7213+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumGreenBits);
7214+ break;
7215+ case GL_ACCUM_BLUE_BITS:
7216+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumBlueBits);
7217+ break;
7218+ case GL_ACCUM_ALPHA_BITS:
7219+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.accumAlphaBits);
7220+ break;
7221+ case GL_ACCUM_CLEAR_VALUE:
7222+ params[0] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[0]);
7223+ params[1] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[1]);
7224+ params[2] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[2]);
7225+ params[3] = FLOAT_TO_BOOLEAN(ctx->Accum.ClearColor[3]);
7226+ break;
7227+ case GL_ALPHA_BIAS:
7228+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.AlphaBias);
7229+ break;
7230+ case GL_ALPHA_BITS:
7231+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.alphaBits);
7232+ break;
7233+ case GL_ALPHA_SCALE:
7234+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.AlphaScale);
7235+ break;
7236+ case GL_ALPHA_TEST:
7237+ params[0] = ctx->Color.AlphaEnabled;
7238+ break;
7239+ case GL_ALPHA_TEST_FUNC:
7240+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.AlphaFunc);
7241+ break;
7242+ case GL_ALPHA_TEST_REF:
7243+ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.AlphaRef);
7244+ break;
7245+ case GL_ATTRIB_STACK_DEPTH:
7246+ params[0] = INT_TO_BOOLEAN(ctx->AttribStackDepth);
7247+ break;
7248+ case GL_AUTO_NORMAL:
7249+ params[0] = ctx->Eval.AutoNormal;
7250+ break;
7251+ case GL_AUX_BUFFERS:
7252+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.numAuxBuffers);
7253+ break;
7254+ case GL_BLEND:
7255+ params[0] = ctx->Color.BlendEnabled;
7256+ break;
7257+ case GL_BLEND_DST:
7258+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstRGB);
7259+ break;
7260+ case GL_BLEND_SRC:
7261+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcRGB);
7262+ break;
7263+ case GL_BLEND_SRC_RGB_EXT:
7264+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcRGB);
7265+ break;
7266+ case GL_BLEND_DST_RGB_EXT:
7267+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstRGB);
7268+ break;
7269+ case GL_BLEND_SRC_ALPHA_EXT:
7270+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendSrcA);
7271+ break;
7272+ case GL_BLEND_DST_ALPHA_EXT:
7273+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstA);
7274+ break;
7275+ case GL_BLEND_EQUATION:
7276+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendEquationRGB );
7277+ break;
7278+ case GL_BLEND_EQUATION_ALPHA_EXT:
7279+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendEquationA );
7280+ break;
7281+ case GL_BLEND_COLOR_EXT:
7282+ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[0]);
7283+ params[1] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[1]);
7284+ params[2] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[2]);
7285+ params[3] = FLOAT_TO_BOOLEAN(ctx->Color.BlendColor[3]);
7286+ break;
7287+ case GL_BLUE_BIAS:
7288+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.BlueBias);
7289+ break;
7290+ case GL_BLUE_BITS:
7291+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.blueBits);
7292+ break;
7293+ case GL_BLUE_SCALE:
7294+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.BlueScale);
7295+ break;
7296+ case GL_CLIENT_ATTRIB_STACK_DEPTH:
7297+ params[0] = INT_TO_BOOLEAN(ctx->ClientAttribStackDepth);
7298+ break;
7299+ case GL_CLIP_PLANE0:
7300+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 0) & 1;
7301+ break;
7302+ case GL_CLIP_PLANE1:
7303+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 1) & 1;
7304+ break;
7305+ case GL_CLIP_PLANE2:
7306+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 2) & 1;
7307+ break;
7308+ case GL_CLIP_PLANE3:
7309+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 3) & 1;
7310+ break;
7311+ case GL_CLIP_PLANE4:
7312+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 4) & 1;
7313+ break;
7314+ case GL_CLIP_PLANE5:
7315+ params[0] = (ctx->Transform.ClipPlanesEnabled >> 5) & 1;
7316+ break;
7317+ case GL_COLOR_CLEAR_VALUE:
7318+ params[0] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[0]);
7319+ params[1] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[1]);
7320+ params[2] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[2]);
7321+ params[3] = FLOAT_TO_BOOLEAN(ctx->Color.ClearColor[3]);
7322+ break;
7323+ case GL_COLOR_MATERIAL:
7324+ params[0] = ctx->Light.ColorMaterialEnabled;
7325+ break;
7326+ case GL_COLOR_MATERIAL_FACE:
7327+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ColorMaterialFace);
7328+ break;
7329+ case GL_COLOR_MATERIAL_PARAMETER:
7330+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ColorMaterialMode);
7331+ break;
7332+ case GL_COLOR_WRITEMASK:
7333+ params[0] = INT_TO_BOOLEAN(ctx->Color.ColorMask[RCOMP] ? 1 : 0);
7334+ params[1] = INT_TO_BOOLEAN(ctx->Color.ColorMask[GCOMP] ? 1 : 0);
7335+ params[2] = INT_TO_BOOLEAN(ctx->Color.ColorMask[BCOMP] ? 1 : 0);
7336+ params[3] = INT_TO_BOOLEAN(ctx->Color.ColorMask[ACOMP] ? 1 : 0);
7337+ break;
7338+ case GL_CULL_FACE:
7339+ params[0] = ctx->Polygon.CullFlag;
7340+ break;
7341+ case GL_CULL_FACE_MODE:
7342+ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.CullFaceMode);
7343+ break;
7344+ case GL_CURRENT_COLOR:
7345+ {
7346+ FLUSH_CURRENT(ctx, 0);
7347+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]);
7348+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]);
7349+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]);
7350+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]);
7351+ }
7352+ break;
7353+ case GL_CURRENT_INDEX:
7354+ {
7355+ FLUSH_CURRENT(ctx, 0);
7356+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]);
7357+ }
7358+ break;
7359+ case GL_CURRENT_NORMAL:
7360+ {
7361+ FLUSH_CURRENT(ctx, 0);
7362+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]);
7363+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]);
7364+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]);
7365+ }
7366+ break;
7367+ case GL_CURRENT_RASTER_COLOR:
7368+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[0]);
7369+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[1]);
7370+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[2]);
7371+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterColor[3]);
7372+ break;
7373+ case GL_CURRENT_RASTER_DISTANCE:
7374+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterDistance);
7375+ break;
7376+ case GL_CURRENT_RASTER_INDEX:
7377+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterIndex);
7378+ break;
7379+ case GL_CURRENT_RASTER_POSITION:
7380+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[0]);
7381+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[1]);
7382+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[2]);
7383+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[3]);
7384+ break;
7385+ case GL_CURRENT_RASTER_SECONDARY_COLOR:
7386+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[0]);
7387+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[1]);
7388+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[2]);
7389+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterSecondaryColor[3]);
7390+ break;
7391+ case GL_CURRENT_RASTER_TEXTURE_COORDS:
7392+ {
7393+ const GLuint texUnit = ctx->Texture.CurrentUnit;
7394+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][0]);
7395+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][1]);
7396+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][2]);
7397+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][3]);
7398+ }
7399+ break;
7400+ case GL_CURRENT_RASTER_POSITION_VALID:
7401+ params[0] = ctx->Current.RasterPosValid;
7402+ break;
7403+ case GL_CURRENT_TEXTURE_COORDS:
7404+ {
7405+ const GLuint texUnit = ctx->Texture.CurrentUnit;
7406+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]);
7407+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]);
7408+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]);
7409+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]);
7410+ }
7411+ break;
7412+ case GL_DEPTH_BIAS:
7413+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.DepthBias);
7414+ break;
7415+ case GL_DEPTH_BITS:
7416+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.depthBits);
7417+ break;
7418+ case GL_DEPTH_CLEAR_VALUE:
7419+ params[0] = FLOAT_TO_BOOLEAN(ctx->Depth.Clear);
7420+ break;
7421+ case GL_DEPTH_FUNC:
7422+ params[0] = ENUM_TO_BOOLEAN(ctx->Depth.Func);
7423+ break;
7424+ case GL_DEPTH_RANGE:
7425+ params[0] = FLOAT_TO_BOOLEAN(ctx->Viewport.Near);
7426+ params[1] = FLOAT_TO_BOOLEAN(ctx->Viewport.Far);
7427+ break;
7428+ case GL_DEPTH_SCALE:
7429+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.DepthScale);
7430+ break;
7431+ case GL_DEPTH_TEST:
7432+ params[0] = ctx->Depth.Test;
7433+ break;
7434+ case GL_DEPTH_WRITEMASK:
7435+ params[0] = ctx->Depth.Mask;
7436+ break;
7437+ case GL_DITHER:
7438+ params[0] = ctx->Color.DitherFlag;
7439+ break;
7440+ case GL_DOUBLEBUFFER:
7441+ params[0] = ctx->DrawBuffer->Visual.doubleBufferMode;
7442+ break;
7443+ case GL_DRAW_BUFFER:
7444+ params[0] = ENUM_TO_BOOLEAN(ctx->DrawBuffer->ColorDrawBuffer[0]);
7445+ break;
7446+ case GL_EDGE_FLAG:
7447+ {
7448+ FLUSH_CURRENT(ctx, 0);
7449+ params[0] = ctx->Current.EdgeFlag;
7450+ }
7451+ break;
7452+ case GL_FEEDBACK_BUFFER_SIZE:
7453+ params[0] = INT_TO_BOOLEAN(ctx->Feedback.BufferSize);
7454+ break;
7455+ case GL_FEEDBACK_BUFFER_TYPE:
7456+ params[0] = ENUM_TO_BOOLEAN(ctx->Feedback.Type);
7457+ break;
7458+ case GL_FOG:
7459+ params[0] = ctx->Fog.Enabled;
7460+ break;
7461+ case GL_FOG_COLOR:
7462+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[0]);
7463+ params[1] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[1]);
7464+ params[2] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[2]);
7465+ params[3] = FLOAT_TO_BOOLEAN(ctx->Fog.Color[3]);
7466+ break;
7467+ case GL_FOG_DENSITY:
7468+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Density);
7469+ break;
7470+ case GL_FOG_END:
7471+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.End);
7472+ break;
7473+ case GL_FOG_HINT:
7474+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.Fog);
7475+ break;
7476+ case GL_FOG_INDEX:
7477+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Index);
7478+ break;
7479+ case GL_FOG_MODE:
7480+ params[0] = ENUM_TO_BOOLEAN(ctx->Fog.Mode);
7481+ break;
7482+ case GL_FOG_START:
7483+ params[0] = FLOAT_TO_BOOLEAN(ctx->Fog.Start);
7484+ break;
7485+ case GL_FRONT_FACE:
7486+ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.FrontFace);
7487+ break;
7488+ case GL_GREEN_BIAS:
7489+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.GreenBias);
7490+ break;
7491+ case GL_GREEN_BITS:
7492+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.greenBits);
7493+ break;
7494+ case GL_GREEN_SCALE:
7495+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.GreenScale);
7496+ break;
7497+ case GL_INDEX_BITS:
7498+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.indexBits);
7499+ break;
7500+ case GL_INDEX_CLEAR_VALUE:
7501+ params[0] = INT_TO_BOOLEAN(ctx->Color.ClearIndex);
7502+ break;
7503+ case GL_INDEX_MODE:
7504+ params[0] = !ctx->DrawBuffer->Visual.rgbMode;
7505+ break;
7506+ case GL_INDEX_OFFSET:
7507+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.IndexOffset);
7508+ break;
7509+ case GL_INDEX_SHIFT:
7510+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.IndexShift);
7511+ break;
7512+ case GL_INDEX_WRITEMASK:
7513+ params[0] = INT_TO_BOOLEAN(ctx->Color.IndexMask);
7514+ break;
7515+ case GL_LIGHT0:
7516+ params[0] = ctx->Light.Light[0].Enabled;
7517+ break;
7518+ case GL_LIGHT1:
7519+ params[0] = ctx->Light.Light[1].Enabled;
7520+ break;
7521+ case GL_LIGHT2:
7522+ params[0] = ctx->Light.Light[2].Enabled;
7523+ break;
7524+ case GL_LIGHT3:
7525+ params[0] = ctx->Light.Light[3].Enabled;
7526+ break;
7527+ case GL_LIGHT4:
7528+ params[0] = ctx->Light.Light[4].Enabled;
7529+ break;
7530+ case GL_LIGHT5:
7531+ params[0] = ctx->Light.Light[5].Enabled;
7532+ break;
7533+ case GL_LIGHT6:
7534+ params[0] = ctx->Light.Light[6].Enabled;
7535+ break;
7536+ case GL_LIGHT7:
7537+ params[0] = ctx->Light.Light[7].Enabled;
7538+ break;
7539+ case GL_LIGHTING:
7540+ params[0] = ctx->Light.Enabled;
7541+ break;
7542+ case GL_LIGHT_MODEL_AMBIENT:
7543+ params[0] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[0]);
7544+ params[1] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[1]);
7545+ params[2] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[2]);
7546+ params[3] = FLOAT_TO_BOOLEAN(ctx->Light.Model.Ambient[3]);
7547+ break;
7548+ case GL_LIGHT_MODEL_COLOR_CONTROL:
7549+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.Model.ColorControl);
7550+ break;
7551+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
7552+ params[0] = ctx->Light.Model.LocalViewer;
7553+ break;
7554+ case GL_LIGHT_MODEL_TWO_SIDE:
7555+ params[0] = ctx->Light.Model.TwoSide;
7556+ break;
7557+ case GL_LINE_SMOOTH:
7558+ params[0] = ctx->Line.SmoothFlag;
7559+ break;
7560+ case GL_LINE_SMOOTH_HINT:
7561+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.LineSmooth);
7562+ break;
7563+ case GL_LINE_STIPPLE:
7564+ params[0] = ctx->Line.StippleFlag;
7565+ break;
7566+ case GL_LINE_STIPPLE_PATTERN:
7567+ params[0] = INT_TO_BOOLEAN(ctx->Line.StipplePattern);
7568+ break;
7569+ case GL_LINE_STIPPLE_REPEAT:
7570+ params[0] = INT_TO_BOOLEAN(ctx->Line.StippleFactor);
7571+ break;
7572+ case GL_LINE_WIDTH:
7573+ params[0] = FLOAT_TO_BOOLEAN(ctx->Line.Width);
7574+ break;
7575+ case GL_LINE_WIDTH_GRANULARITY:
7576+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.LineWidthGranularity);
7577+ break;
7578+ case GL_LINE_WIDTH_RANGE:
7579+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinLineWidthAA);
7580+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxLineWidthAA);
7581+ break;
7582+ case GL_ALIASED_LINE_WIDTH_RANGE:
7583+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinLineWidth);
7584+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxLineWidth);
7585+ break;
7586+ case GL_LIST_BASE:
7587+ params[0] = INT_TO_BOOLEAN(ctx->List.ListBase);
7588+ break;
7589+ case GL_LIST_INDEX:
7590+ params[0] = INT_TO_BOOLEAN(ctx->ListState.CurrentListNum);
7591+ break;
7592+ case GL_LIST_MODE:
7593+ {
7594+ GLenum mode;
7595+ if (!ctx->CompileFlag)
7596+ mode = 0;
7597+ else if (ctx->ExecuteFlag)
7598+ mode = GL_COMPILE_AND_EXECUTE;
7599+ else
7600+ mode = GL_COMPILE;
7601+ params[0] = ENUM_TO_BOOLEAN(mode);
7602+ }
7603+ break;
7604+ case GL_INDEX_LOGIC_OP:
7605+ params[0] = ctx->Color.IndexLogicOpEnabled;
7606+ break;
7607+ case GL_COLOR_LOGIC_OP:
7608+ params[0] = ctx->Color.ColorLogicOpEnabled;
7609+ break;
7610+ case GL_LOGIC_OP_MODE:
7611+ params[0] = ENUM_TO_BOOLEAN(ctx->Color.LogicOp);
7612+ break;
7613+ case GL_MAP1_COLOR_4:
7614+ params[0] = ctx->Eval.Map1Color4;
7615+ break;
7616+ case GL_MAP1_GRID_DOMAIN:
7617+ params[0] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid1u1);
7618+ params[1] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid1u2);
7619+ break;
7620+ case GL_MAP1_GRID_SEGMENTS:
7621+ params[0] = INT_TO_BOOLEAN(ctx->Eval.MapGrid1un);
7622+ break;
7623+ case GL_MAP1_INDEX:
7624+ params[0] = ctx->Eval.Map1Index;
7625+ break;
7626+ case GL_MAP1_NORMAL:
7627+ params[0] = ctx->Eval.Map1Normal;
7628+ break;
7629+ case GL_MAP1_TEXTURE_COORD_1:
7630+ params[0] = ctx->Eval.Map1TextureCoord1;
7631+ break;
7632+ case GL_MAP1_TEXTURE_COORD_2:
7633+ params[0] = ctx->Eval.Map1TextureCoord2;
7634+ break;
7635+ case GL_MAP1_TEXTURE_COORD_3:
7636+ params[0] = ctx->Eval.Map1TextureCoord3;
7637+ break;
7638+ case GL_MAP1_TEXTURE_COORD_4:
7639+ params[0] = ctx->Eval.Map1TextureCoord4;
7640+ break;
7641+ case GL_MAP1_VERTEX_3:
7642+ params[0] = ctx->Eval.Map1Vertex3;
7643+ break;
7644+ case GL_MAP1_VERTEX_4:
7645+ params[0] = ctx->Eval.Map1Vertex4;
7646+ break;
7647+ case GL_MAP2_COLOR_4:
7648+ params[0] = ctx->Eval.Map2Color4;
7649+ break;
7650+ case GL_MAP2_GRID_DOMAIN:
7651+ params[0] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2u1);
7652+ params[1] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2u2);
7653+ params[2] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2v1);
7654+ params[3] = FLOAT_TO_BOOLEAN(ctx->Eval.MapGrid2v2);
7655+ break;
7656+ case GL_MAP2_GRID_SEGMENTS:
7657+ params[0] = INT_TO_BOOLEAN(ctx->Eval.MapGrid2un);
7658+ params[1] = INT_TO_BOOLEAN(ctx->Eval.MapGrid2vn);
7659+ break;
7660+ case GL_MAP2_INDEX:
7661+ params[0] = ctx->Eval.Map2Index;
7662+ break;
7663+ case GL_MAP2_NORMAL:
7664+ params[0] = ctx->Eval.Map2Normal;
7665+ break;
7666+ case GL_MAP2_TEXTURE_COORD_1:
7667+ params[0] = ctx->Eval.Map2TextureCoord1;
7668+ break;
7669+ case GL_MAP2_TEXTURE_COORD_2:
7670+ params[0] = ctx->Eval.Map2TextureCoord2;
7671+ break;
7672+ case GL_MAP2_TEXTURE_COORD_3:
7673+ params[0] = ctx->Eval.Map2TextureCoord3;
7674+ break;
7675+ case GL_MAP2_TEXTURE_COORD_4:
7676+ params[0] = ctx->Eval.Map2TextureCoord4;
7677+ break;
7678+ case GL_MAP2_VERTEX_3:
7679+ params[0] = ctx->Eval.Map2Vertex3;
7680+ break;
7681+ case GL_MAP2_VERTEX_4:
7682+ params[0] = ctx->Eval.Map2Vertex4;
7683+ break;
7684+ case GL_MAP_COLOR:
7685+ params[0] = ctx->Pixel.MapColorFlag;
7686+ break;
7687+ case GL_MAP_STENCIL:
7688+ params[0] = ctx->Pixel.MapStencilFlag;
7689+ break;
7690+ case GL_MATRIX_MODE:
7691+ params[0] = ENUM_TO_BOOLEAN(ctx->Transform.MatrixMode);
7692+ break;
7693+ case GL_MAX_ATTRIB_STACK_DEPTH:
7694+ params[0] = INT_TO_BOOLEAN(MAX_ATTRIB_STACK_DEPTH);
7695+ break;
7696+ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
7697+ params[0] = INT_TO_BOOLEAN(MAX_CLIENT_ATTRIB_STACK_DEPTH);
7698+ break;
7699+ case GL_MAX_CLIP_PLANES:
7700+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxClipPlanes);
7701+ break;
7702+ case GL_MAX_ELEMENTS_VERTICES:
7703+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxArrayLockSize);
7704+ break;
7705+ case GL_MAX_ELEMENTS_INDICES:
7706+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxArrayLockSize);
7707+ break;
7708+ case GL_MAX_EVAL_ORDER:
7709+ params[0] = INT_TO_BOOLEAN(MAX_EVAL_ORDER);
7710+ break;
7711+ case GL_MAX_LIGHTS:
7712+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxLights);
7713+ break;
7714+ case GL_MAX_LIST_NESTING:
7715+ params[0] = INT_TO_BOOLEAN(MAX_LIST_NESTING);
7716+ break;
7717+ case GL_MAX_MODELVIEW_STACK_DEPTH:
7718+ params[0] = INT_TO_BOOLEAN(MAX_MODELVIEW_STACK_DEPTH);
7719+ break;
7720+ case GL_MAX_NAME_STACK_DEPTH:
7721+ params[0] = INT_TO_BOOLEAN(MAX_NAME_STACK_DEPTH);
7722+ break;
7723+ case GL_MAX_PIXEL_MAP_TABLE:
7724+ params[0] = INT_TO_BOOLEAN(MAX_PIXEL_MAP_TABLE);
7725+ break;
7726+ case GL_MAX_PROJECTION_STACK_DEPTH:
7727+ params[0] = INT_TO_BOOLEAN(MAX_PROJECTION_STACK_DEPTH);
7728+ break;
7729+ case GL_MAX_TEXTURE_SIZE:
7730+ params[0] = INT_TO_BOOLEAN(1 << (ctx->Const.MaxTextureLevels - 1));
7731+ break;
7732+ case GL_MAX_3D_TEXTURE_SIZE:
7733+ params[0] = INT_TO_BOOLEAN(1 << (ctx->Const.Max3DTextureLevels - 1));
7734+ break;
7735+ case GL_MAX_TEXTURE_STACK_DEPTH:
7736+ params[0] = INT_TO_BOOLEAN(MAX_TEXTURE_STACK_DEPTH);
7737+ break;
7738+ case GL_MAX_VIEWPORT_DIMS:
7739+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxViewportWidth);
7740+ params[1] = INT_TO_BOOLEAN(ctx->Const.MaxViewportHeight);
7741+ break;
7742+ case GL_MODELVIEW_MATRIX:
7743+ {
7744+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
7745+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7746+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
7747+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
7748+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
7749+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
7750+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7751+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
7752+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
7753+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
7754+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
7755+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7756+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
7757+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
7758+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
7759+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
7760+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7761+ }
7762+ break;
7763+ case GL_MODELVIEW_STACK_DEPTH:
7764+ params[0] = INT_TO_BOOLEAN(ctx->ModelviewMatrixStack.Depth + 1);
7765+ break;
7766+ case GL_NAME_STACK_DEPTH:
7767+ params[0] = INT_TO_BOOLEAN(ctx->Select.NameStackDepth);
7768+ break;
7769+ case GL_NORMALIZE:
7770+ params[0] = ctx->Transform.Normalize;
7771+ break;
7772+ case GL_PACK_ALIGNMENT:
7773+ params[0] = INT_TO_BOOLEAN(ctx->Pack.Alignment);
7774+ break;
7775+ case GL_PACK_LSB_FIRST:
7776+ params[0] = ctx->Pack.LsbFirst;
7777+ break;
7778+ case GL_PACK_ROW_LENGTH:
7779+ params[0] = INT_TO_BOOLEAN(ctx->Pack.RowLength);
7780+ break;
7781+ case GL_PACK_SKIP_PIXELS:
7782+ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipPixels);
7783+ break;
7784+ case GL_PACK_SKIP_ROWS:
7785+ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipRows);
7786+ break;
7787+ case GL_PACK_SWAP_BYTES:
7788+ params[0] = ctx->Pack.SwapBytes;
7789+ break;
7790+ case GL_PACK_SKIP_IMAGES_EXT:
7791+ params[0] = INT_TO_BOOLEAN(ctx->Pack.SkipImages);
7792+ break;
7793+ case GL_PACK_IMAGE_HEIGHT_EXT:
7794+ params[0] = INT_TO_BOOLEAN(ctx->Pack.ImageHeight);
7795+ break;
7796+ case GL_PACK_INVERT_MESA:
7797+ params[0] = ctx->Pack.Invert;
7798+ break;
7799+ case GL_PERSPECTIVE_CORRECTION_HINT:
7800+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PerspectiveCorrection);
7801+ break;
7802+ case GL_PIXEL_MAP_A_TO_A_SIZE:
7803+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapAtoAsize);
7804+ break;
7805+ case GL_PIXEL_MAP_B_TO_B_SIZE:
7806+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapBtoBsize);
7807+ break;
7808+ case GL_PIXEL_MAP_G_TO_G_SIZE:
7809+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapGtoGsize);
7810+ break;
7811+ case GL_PIXEL_MAP_I_TO_A_SIZE:
7812+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoAsize);
7813+ break;
7814+ case GL_PIXEL_MAP_I_TO_B_SIZE:
7815+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoBsize);
7816+ break;
7817+ case GL_PIXEL_MAP_I_TO_G_SIZE:
7818+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoGsize);
7819+ break;
7820+ case GL_PIXEL_MAP_I_TO_I_SIZE:
7821+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoIsize);
7822+ break;
7823+ case GL_PIXEL_MAP_I_TO_R_SIZE:
7824+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapItoRsize);
7825+ break;
7826+ case GL_PIXEL_MAP_R_TO_R_SIZE:
7827+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapRtoRsize);
7828+ break;
7829+ case GL_PIXEL_MAP_S_TO_S_SIZE:
7830+ params[0] = INT_TO_BOOLEAN(ctx->Pixel.MapStoSsize);
7831+ break;
7832+ case GL_POINT_SIZE:
7833+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Size);
7834+ break;
7835+ case GL_POINT_SIZE_GRANULARITY:
7836+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.PointSizeGranularity);
7837+ break;
7838+ case GL_POINT_SIZE_RANGE:
7839+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinPointSizeAA);
7840+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxPointSizeAA);
7841+ break;
7842+ case GL_ALIASED_POINT_SIZE_RANGE:
7843+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MinPointSize);
7844+ params[1] = FLOAT_TO_BOOLEAN(ctx->Const.MaxPointSize);
7845+ break;
7846+ case GL_POINT_SMOOTH:
7847+ params[0] = ctx->Point.SmoothFlag;
7848+ break;
7849+ case GL_POINT_SMOOTH_HINT:
7850+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PointSmooth);
7851+ break;
7852+ case GL_POINT_SIZE_MIN_EXT:
7853+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.MinSize);
7854+ break;
7855+ case GL_POINT_SIZE_MAX_EXT:
7856+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.MaxSize);
7857+ break;
7858+ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
7859+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Threshold);
7860+ break;
7861+ case GL_DISTANCE_ATTENUATION_EXT:
7862+ params[0] = FLOAT_TO_BOOLEAN(ctx->Point.Params[0]);
7863+ params[1] = FLOAT_TO_BOOLEAN(ctx->Point.Params[1]);
7864+ params[2] = FLOAT_TO_BOOLEAN(ctx->Point.Params[2]);
7865+ break;
7866+ case GL_POLYGON_MODE:
7867+ params[0] = ENUM_TO_BOOLEAN(ctx->Polygon.FrontMode);
7868+ params[1] = ENUM_TO_BOOLEAN(ctx->Polygon.BackMode);
7869+ break;
7870+ case GL_POLYGON_OFFSET_BIAS_EXT:
7871+ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetUnits);
7872+ break;
7873+ case GL_POLYGON_OFFSET_FACTOR:
7874+ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetFactor );
7875+ break;
7876+ case GL_POLYGON_OFFSET_UNITS:
7877+ params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetUnits );
7878+ break;
7879+ case GL_POLYGON_SMOOTH:
7880+ params[0] = ctx->Polygon.SmoothFlag;
7881+ break;
7882+ case GL_POLYGON_SMOOTH_HINT:
7883+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.PolygonSmooth);
7884+ break;
7885+ case GL_POLYGON_STIPPLE:
7886+ params[0] = ctx->Polygon.StippleFlag;
7887+ break;
7888+ case GL_PROJECTION_MATRIX:
7889+ {
7890+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
7891+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
7892+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
7893+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
7894+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
7895+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
7896+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
7897+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
7898+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
7899+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
7900+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
7901+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
7902+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
7903+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
7904+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
7905+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
7906+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
7907+ }
7908+ break;
7909+ case GL_PROJECTION_STACK_DEPTH:
7910+ params[0] = INT_TO_BOOLEAN(ctx->ProjectionMatrixStack.Depth + 1);
7911+ break;
7912+ case GL_READ_BUFFER:
7913+ params[0] = ENUM_TO_BOOLEAN(ctx->ReadBuffer->ColorReadBuffer);
7914+ break;
7915+ case GL_RED_BIAS:
7916+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.RedBias);
7917+ break;
7918+ case GL_RED_BITS:
7919+ params[0] = INT_TO_BOOLEAN( ctx->DrawBuffer->Visual.redBits );
7920+ break;
7921+ case GL_RED_SCALE:
7922+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.RedScale);
7923+ break;
7924+ case GL_RENDER_MODE:
7925+ params[0] = ENUM_TO_BOOLEAN(ctx->RenderMode);
7926+ break;
7927+ case GL_RESCALE_NORMAL:
7928+ params[0] = ctx->Transform.RescaleNormals;
7929+ break;
7930+ case GL_RGBA_MODE:
7931+ params[0] = ctx->DrawBuffer->Visual.rgbMode;
7932+ break;
7933+ case GL_SCISSOR_BOX:
7934+ params[0] = INT_TO_BOOLEAN(ctx->Scissor.X);
7935+ params[1] = INT_TO_BOOLEAN(ctx->Scissor.Y);
7936+ params[2] = INT_TO_BOOLEAN(ctx->Scissor.Width);
7937+ params[3] = INT_TO_BOOLEAN(ctx->Scissor.Height);
7938+ break;
7939+ case GL_SCISSOR_TEST:
7940+ params[0] = ctx->Scissor.Enabled;
7941+ break;
7942+ case GL_SELECTION_BUFFER_SIZE:
7943+ params[0] = INT_TO_BOOLEAN(ctx->Select.BufferSize);
7944+ break;
7945+ case GL_SHADE_MODEL:
7946+ params[0] = ENUM_TO_BOOLEAN(ctx->Light.ShadeModel);
7947+ break;
7948+ case GL_SHARED_TEXTURE_PALETTE_EXT:
7949+ params[0] = ctx->Texture.SharedPalette;
7950+ break;
7951+ case GL_STENCIL_BITS:
7952+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.stencilBits);
7953+ break;
7954+ case GL_STENCIL_CLEAR_VALUE:
7955+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Clear);
7956+ break;
7957+ case GL_STENCIL_FAIL:
7958+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
7959+ break;
7960+ case GL_STENCIL_FUNC:
7961+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
7962+ break;
7963+ case GL_STENCIL_PASS_DEPTH_FAIL:
7964+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
7965+ break;
7966+ case GL_STENCIL_PASS_DEPTH_PASS:
7967+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
7968+ break;
7969+ case GL_STENCIL_REF:
7970+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Ref[ctx->Stencil.ActiveFace]);
7971+ break;
7972+ case GL_STENCIL_TEST:
7973+ params[0] = ctx->Stencil.Enabled;
7974+ break;
7975+ case GL_STENCIL_VALUE_MASK:
7976+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]);
7977+ break;
7978+ case GL_STENCIL_WRITEMASK:
7979+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]);
7980+ break;
7981+ case GL_STEREO:
7982+ params[0] = ctx->DrawBuffer->Visual.stereoMode;
7983+ break;
7984+ case GL_SUBPIXEL_BITS:
7985+ params[0] = INT_TO_BOOLEAN(ctx->Const.SubPixelBits);
7986+ break;
7987+ case GL_TEXTURE_1D:
7988+ params[0] = _mesa_IsEnabled(GL_TEXTURE_1D);
7989+ break;
7990+ case GL_TEXTURE_2D:
7991+ params[0] = _mesa_IsEnabled(GL_TEXTURE_2D);
7992+ break;
7993+ case GL_TEXTURE_3D:
7994+ params[0] = _mesa_IsEnabled(GL_TEXTURE_3D);
7995+ break;
7996+ case GL_TEXTURE_BINDING_1D:
7997+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name);
7998+ break;
7999+ case GL_TEXTURE_BINDING_2D:
8000+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name);
8001+ break;
8002+ case GL_TEXTURE_BINDING_3D:
8003+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name);
8004+ break;
8005+ case GL_TEXTURE_ENV_COLOR:
8006+ {
8007+ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
8008+ params[0] = FLOAT_TO_BOOLEAN(color[0]);
8009+ params[1] = FLOAT_TO_BOOLEAN(color[1]);
8010+ params[2] = FLOAT_TO_BOOLEAN(color[2]);
8011+ params[3] = FLOAT_TO_BOOLEAN(color[3]);
8012+ }
8013+ break;
8014+ case GL_TEXTURE_ENV_MODE:
8015+ params[0] = ENUM_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
8016+ break;
8017+ case GL_TEXTURE_GEN_S:
8018+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0);
8019+ break;
8020+ case GL_TEXTURE_GEN_T:
8021+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0);
8022+ break;
8023+ case GL_TEXTURE_GEN_R:
8024+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0);
8025+ break;
8026+ case GL_TEXTURE_GEN_Q:
8027+ params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0);
8028+ break;
8029+ case GL_TEXTURE_MATRIX:
8030+ {
8031+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
8032+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8033+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
8034+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
8035+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
8036+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
8037+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8038+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
8039+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
8040+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
8041+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
8042+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8043+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
8044+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
8045+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
8046+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
8047+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8048+ }
8049+ break;
8050+ case GL_TEXTURE_STACK_DEPTH:
8051+ params[0] = INT_TO_BOOLEAN(ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1);
8052+ break;
8053+ case GL_UNPACK_ALIGNMENT:
8054+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.Alignment);
8055+ break;
8056+ case GL_UNPACK_LSB_FIRST:
8057+ params[0] = ctx->Unpack.LsbFirst;
8058+ break;
8059+ case GL_UNPACK_ROW_LENGTH:
8060+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.RowLength);
8061+ break;
8062+ case GL_UNPACK_SKIP_PIXELS:
8063+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipPixels);
8064+ break;
8065+ case GL_UNPACK_SKIP_ROWS:
8066+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipRows);
8067+ break;
8068+ case GL_UNPACK_SWAP_BYTES:
8069+ params[0] = ctx->Unpack.SwapBytes;
8070+ break;
8071+ case GL_UNPACK_SKIP_IMAGES_EXT:
8072+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.SkipImages);
8073+ break;
8074+ case GL_UNPACK_IMAGE_HEIGHT_EXT:
8075+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.ImageHeight);
8076+ break;
8077+ case GL_UNPACK_CLIENT_STORAGE_APPLE:
8078+ params[0] = ctx->Unpack.ClientStorage;
8079+ break;
8080+ case GL_VIEWPORT:
8081+ params[0] = INT_TO_BOOLEAN(ctx->Viewport.X);
8082+ params[1] = INT_TO_BOOLEAN(ctx->Viewport.Y);
8083+ params[2] = INT_TO_BOOLEAN(ctx->Viewport.Width);
8084+ params[3] = INT_TO_BOOLEAN(ctx->Viewport.Height);
8085+ break;
8086+ case GL_ZOOM_X:
8087+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.ZoomX);
8088+ break;
8089+ case GL_ZOOM_Y:
8090+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.ZoomY);
8091+ break;
8092+ case GL_VERTEX_ARRAY:
8093+ params[0] = ctx->Array.ArrayObj->Vertex.Enabled;
8094+ break;
8095+ case GL_VERTEX_ARRAY_SIZE:
8096+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Size);
8097+ break;
8098+ case GL_VERTEX_ARRAY_TYPE:
8099+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Type);
8100+ break;
8101+ case GL_VERTEX_ARRAY_STRIDE:
8102+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.Stride);
8103+ break;
8104+ case GL_VERTEX_ARRAY_COUNT_EXT:
8105+ params[0] = INT_TO_BOOLEAN(0);
8106+ break;
8107+ case GL_NORMAL_ARRAY:
8108+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Enabled);
8109+ break;
8110+ case GL_NORMAL_ARRAY_TYPE:
8111+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Type);
8112+ break;
8113+ case GL_NORMAL_ARRAY_STRIDE:
8114+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.Stride);
8115+ break;
8116+ case GL_NORMAL_ARRAY_COUNT_EXT:
8117+ params[0] = INT_TO_BOOLEAN(0);
8118+ break;
8119+ case GL_COLOR_ARRAY:
8120+ params[0] = ctx->Array.ArrayObj->Color.Enabled;
8121+ break;
8122+ case GL_COLOR_ARRAY_SIZE:
8123+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Size);
8124+ break;
8125+ case GL_COLOR_ARRAY_TYPE:
8126+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Type);
8127+ break;
8128+ case GL_COLOR_ARRAY_STRIDE:
8129+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.Stride);
8130+ break;
8131+ case GL_COLOR_ARRAY_COUNT_EXT:
8132+ params[0] = INT_TO_BOOLEAN(0);
8133+ break;
8134+ case GL_INDEX_ARRAY:
8135+ params[0] = ctx->Array.ArrayObj->Index.Enabled;
8136+ break;
8137+ case GL_INDEX_ARRAY_TYPE:
8138+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->Index.Type);
8139+ break;
8140+ case GL_INDEX_ARRAY_STRIDE:
8141+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Index.Stride);
8142+ break;
8143+ case GL_INDEX_ARRAY_COUNT_EXT:
8144+ params[0] = INT_TO_BOOLEAN(0);
8145+ break;
8146+ case GL_TEXTURE_COORD_ARRAY:
8147+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled;
8148+ break;
8149+ case GL_TEXTURE_COORD_ARRAY_SIZE:
8150+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
8151+ break;
8152+ case GL_TEXTURE_COORD_ARRAY_TYPE:
8153+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
8154+ break;
8155+ case GL_TEXTURE_COORD_ARRAY_STRIDE:
8156+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
8157+ break;
8158+ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
8159+ params[0] = INT_TO_BOOLEAN(0);
8160+ break;
8161+ case GL_EDGE_FLAG_ARRAY:
8162+ params[0] = ctx->Array.ArrayObj->EdgeFlag.Enabled;
8163+ break;
8164+ case GL_EDGE_FLAG_ARRAY_STRIDE:
8165+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->EdgeFlag.Stride);
8166+ break;
8167+ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
8168+ params[0] = INT_TO_BOOLEAN(0);
8169+ break;
8170+ case GL_MAX_TEXTURE_UNITS_ARB:
8171+ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
8172+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureUnits);
8173+ break;
8174+ case GL_ACTIVE_TEXTURE_ARB:
8175+ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
8176+ params[0] = INT_TO_BOOLEAN(GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit);
8177+ break;
8178+ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
8179+ CHECK_EXT1(ARB_multitexture, "GetBooleanv");
8180+ params[0] = INT_TO_BOOLEAN(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
8181+ break;
8182+ case GL_TEXTURE_CUBE_MAP_ARB:
8183+ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
8184+ params[0] = _mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB);
8185+ break;
8186+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
8187+ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
8188+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name);
8189+ break;
8190+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
8191+ CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
8192+ params[0] = INT_TO_BOOLEAN((1 << (ctx->Const.MaxCubeTextureLevels - 1)));
8193+ break;
8194+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
8195+ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
8196+ params[0] = INT_TO_BOOLEAN(ctx->Hint.TextureCompression);
8197+ break;
8198+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
8199+ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
8200+ params[0] = INT_TO_BOOLEAN(_mesa_get_compressed_formats(ctx, NULL, GL_FALSE));
8201+ break;
8202+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
8203+ CHECK_EXT1(ARB_texture_compression, "GetBooleanv");
8204+ {
8205+ GLint formats[100];
8206+ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
8207+ ASSERT(n <= 100);
8208+ for (i = 0; i < n; i++)
8209+ params[i] = ENUM_TO_INT(formats[i]);
8210+ }
8211+ break;
8212+ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
8213+ CHECK_EXT1(EXT_compiled_vertex_array, "GetBooleanv");
8214+ params[0] = INT_TO_BOOLEAN(ctx->Array.LockFirst);
8215+ break;
8216+ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
8217+ CHECK_EXT1(EXT_compiled_vertex_array, "GetBooleanv");
8218+ params[0] = INT_TO_BOOLEAN(ctx->Array.LockCount);
8219+ break;
8220+ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
8221+ {
8222+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
8223+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8224+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8225+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8226+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8227+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8228+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8229+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8230+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8231+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8232+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8233+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8234+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8235+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8236+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8237+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8238+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8239+ }
8240+ break;
8241+ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
8242+ {
8243+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
8244+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8245+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8246+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8247+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8248+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8249+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8250+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8251+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8252+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8253+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8254+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8255+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8256+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8257+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8258+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8259+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8260+ }
8261+ break;
8262+ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
8263+ {
8264+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
8265+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8266+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8267+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8268+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8269+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8270+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8271+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8272+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8273+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8274+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8275+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8276+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8277+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8278+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8279+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8280+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8281+ }
8282+ break;
8283+ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
8284+ {
8285+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
8286+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8287+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8288+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8289+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8290+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8291+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8292+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8293+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8294+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8295+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8296+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8297+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8298+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8299+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8300+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8301+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8302+ }
8303+ break;
8304+ case GL_COLOR_MATRIX_SGI:
8305+ {
8306+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
8307+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8308+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
8309+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
8310+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
8311+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
8312+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8313+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
8314+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
8315+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
8316+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
8317+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8318+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
8319+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
8320+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
8321+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
8322+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8323+ }
8324+ break;
8325+ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
8326+ params[0] = INT_TO_BOOLEAN(ctx->ColorMatrixStack.Depth + 1);
8327+ break;
8328+ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
8329+ params[0] = INT_TO_BOOLEAN(MAX_COLOR_STACK_DEPTH);
8330+ break;
8331+ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
8332+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[0]);
8333+ break;
8334+ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
8335+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[1]);
8336+ break;
8337+ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
8338+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[2]);
8339+ break;
8340+ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
8341+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixScale[3]);
8342+ break;
8343+ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
8344+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[0]);
8345+ break;
8346+ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
8347+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[1]);
8348+ break;
8349+ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
8350+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[2]);
8351+ break;
8352+ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
8353+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostColorMatrixBias[3]);
8354+ break;
8355+ case GL_CONVOLUTION_1D_EXT:
8356+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8357+ params[0] = ctx->Pixel.Convolution1DEnabled;
8358+ break;
8359+ case GL_CONVOLUTION_2D_EXT:
8360+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8361+ params[0] = ctx->Pixel.Convolution2DEnabled;
8362+ break;
8363+ case GL_SEPARABLE_2D_EXT:
8364+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8365+ params[0] = ctx->Pixel.Separable2DEnabled;
8366+ break;
8367+ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
8368+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8369+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[0]);
8370+ break;
8371+ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
8372+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8373+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[1]);
8374+ break;
8375+ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
8376+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8377+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[2]);
8378+ break;
8379+ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
8380+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8381+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionScale[3]);
8382+ break;
8383+ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
8384+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8385+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[0]);
8386+ break;
8387+ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
8388+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8389+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[1]);
8390+ break;
8391+ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
8392+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8393+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[2]);
8394+ break;
8395+ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
8396+ CHECK_EXT1(EXT_convolution, "GetBooleanv");
8397+ params[0] = FLOAT_TO_BOOLEAN(ctx->Pixel.PostConvolutionBias[3]);
8398+ break;
8399+ case GL_HISTOGRAM:
8400+ CHECK_EXT1(EXT_histogram, "GetBooleanv");
8401+ params[0] = ctx->Pixel.HistogramEnabled;
8402+ break;
8403+ case GL_MINMAX:
8404+ CHECK_EXT1(EXT_histogram, "GetBooleanv");
8405+ params[0] = ctx->Pixel.MinMaxEnabled;
8406+ break;
8407+ case GL_COLOR_TABLE_SGI:
8408+ CHECK_EXT1(SGI_color_table, "GetBooleanv");
8409+ params[0] = ctx->Pixel.ColorTableEnabled;
8410+ break;
8411+ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
8412+ CHECK_EXT1(SGI_color_table, "GetBooleanv");
8413+ params[0] = ctx->Pixel.PostConvolutionColorTableEnabled;
8414+ break;
8415+ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
8416+ CHECK_EXT1(SGI_color_table, "GetBooleanv");
8417+ params[0] = ctx->Pixel.PostColorMatrixColorTableEnabled;
8418+ break;
8419+ case GL_TEXTURE_COLOR_TABLE_SGI:
8420+ CHECK_EXT1(SGI_texture_color_table, "GetBooleanv");
8421+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled;
8422+ break;
8423+ case GL_COLOR_SUM_EXT:
8424+ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetBooleanv");
8425+ params[0] = ctx->Fog.ColorSumEnabled;
8426+ break;
8427+ case GL_CURRENT_SECONDARY_COLOR_EXT:
8428+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8429+ {
8430+ FLUSH_CURRENT(ctx, 0);
8431+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]);
8432+ params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]);
8433+ params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]);
8434+ params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]);
8435+ }
8436+ break;
8437+ case GL_SECONDARY_COLOR_ARRAY_EXT:
8438+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8439+ params[0] = ctx->Array.ArrayObj->SecondaryColor.Enabled;
8440+ break;
8441+ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
8442+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8443+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Type);
8444+ break;
8445+ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
8446+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8447+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Stride);
8448+ break;
8449+ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
8450+ CHECK_EXT1(EXT_secondary_color, "GetBooleanv");
8451+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.Size);
8452+ break;
8453+ case GL_CURRENT_FOG_COORDINATE_EXT:
8454+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8455+ {
8456+ FLUSH_CURRENT(ctx, 0);
8457+ params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_FOG][0]);
8458+ }
8459+ break;
8460+ case GL_FOG_COORDINATE_ARRAY_EXT:
8461+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8462+ params[0] = ctx->Array.ArrayObj->FogCoord.Enabled;
8463+ break;
8464+ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
8465+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8466+ params[0] = ENUM_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.Type);
8467+ break;
8468+ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
8469+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8470+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.Stride);
8471+ break;
8472+ case GL_FOG_COORDINATE_SOURCE_EXT:
8473+ CHECK_EXT1(EXT_fog_coord, "GetBooleanv");
8474+ params[0] = ENUM_TO_BOOLEAN(ctx->Fog.FogCoordinateSource);
8475+ break;
8476+ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
8477+ CHECK_EXT1(EXT_texture_lod_bias, "GetBooleanv");
8478+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxTextureLodBias);
8479+ break;
8480+ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
8481+ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetBooleanv");
8482+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxTextureMaxAnisotropy);
8483+ break;
8484+ case GL_MULTISAMPLE_ARB:
8485+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8486+ params[0] = ctx->Multisample.Enabled;
8487+ break;
8488+ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
8489+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8490+ params[0] = ctx->Multisample.SampleAlphaToCoverage;
8491+ break;
8492+ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
8493+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8494+ params[0] = ctx->Multisample.SampleAlphaToOne;
8495+ break;
8496+ case GL_SAMPLE_COVERAGE_ARB:
8497+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8498+ params[0] = ctx->Multisample.SampleCoverage;
8499+ break;
8500+ case GL_SAMPLE_COVERAGE_VALUE_ARB:
8501+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8502+ params[0] = FLOAT_TO_BOOLEAN(ctx->Multisample.SampleCoverageValue);
8503+ break;
8504+ case GL_SAMPLE_COVERAGE_INVERT_ARB:
8505+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8506+ params[0] = ctx->Multisample.SampleCoverageInvert;
8507+ break;
8508+ case GL_SAMPLE_BUFFERS_ARB:
8509+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8510+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.sampleBuffers);
8511+ break;
8512+ case GL_SAMPLES_ARB:
8513+ CHECK_EXT1(ARB_multisample, "GetBooleanv");
8514+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.samples);
8515+ break;
8516+ case GL_RASTER_POSITION_UNCLIPPED_IBM:
8517+ CHECK_EXT1(IBM_rasterpos_clip, "GetBooleanv");
8518+ params[0] = ctx->Transform.RasterPositionUnclipped;
8519+ break;
8520+ case GL_POINT_SPRITE_NV:
8521+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetBooleanv");
8522+ params[0] = ctx->Point.PointSprite;
8523+ break;
8524+ case GL_POINT_SPRITE_R_MODE_NV:
8525+ CHECK_EXT1(NV_point_sprite, "GetBooleanv");
8526+ params[0] = ENUM_TO_BOOLEAN(ctx->Point.SpriteRMode);
8527+ break;
8528+ case GL_POINT_SPRITE_COORD_ORIGIN:
8529+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetBooleanv");
8530+ params[0] = ENUM_TO_BOOLEAN(ctx->Point.SpriteOrigin);
8531+ break;
8532+ case GL_GENERATE_MIPMAP_HINT_SGIS:
8533+ CHECK_EXT1(SGIS_generate_mipmap, "GetBooleanv");
8534+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.GenerateMipmap);
8535+ break;
8536+ case GL_VERTEX_PROGRAM_BINDING_NV:
8537+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8538+ params[0] = INT_TO_BOOLEAN((ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0));
8539+ break;
8540+ case GL_VERTEX_ATTRIB_ARRAY0_NV:
8541+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8542+ params[0] = ctx->Array.ArrayObj->VertexAttrib[0].Enabled;
8543+ break;
8544+ case GL_VERTEX_ATTRIB_ARRAY1_NV:
8545+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8546+ params[0] = ctx->Array.ArrayObj->VertexAttrib[1].Enabled;
8547+ break;
8548+ case GL_VERTEX_ATTRIB_ARRAY2_NV:
8549+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8550+ params[0] = ctx->Array.ArrayObj->VertexAttrib[2].Enabled;
8551+ break;
8552+ case GL_VERTEX_ATTRIB_ARRAY3_NV:
8553+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8554+ params[0] = ctx->Array.ArrayObj->VertexAttrib[3].Enabled;
8555+ break;
8556+ case GL_VERTEX_ATTRIB_ARRAY4_NV:
8557+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8558+ params[0] = ctx->Array.ArrayObj->VertexAttrib[4].Enabled;
8559+ break;
8560+ case GL_VERTEX_ATTRIB_ARRAY5_NV:
8561+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8562+ params[0] = ctx->Array.ArrayObj->VertexAttrib[5].Enabled;
8563+ break;
8564+ case GL_VERTEX_ATTRIB_ARRAY6_NV:
8565+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8566+ params[0] = ctx->Array.ArrayObj->VertexAttrib[6].Enabled;
8567+ break;
8568+ case GL_VERTEX_ATTRIB_ARRAY7_NV:
8569+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8570+ params[0] = ctx->Array.ArrayObj->VertexAttrib[7].Enabled;
8571+ break;
8572+ case GL_VERTEX_ATTRIB_ARRAY8_NV:
8573+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8574+ params[0] = ctx->Array.ArrayObj->VertexAttrib[8].Enabled;
8575+ break;
8576+ case GL_VERTEX_ATTRIB_ARRAY9_NV:
8577+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8578+ params[0] = ctx->Array.ArrayObj->VertexAttrib[9].Enabled;
8579+ break;
8580+ case GL_VERTEX_ATTRIB_ARRAY10_NV:
8581+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8582+ params[0] = ctx->Array.ArrayObj->VertexAttrib[10].Enabled;
8583+ break;
8584+ case GL_VERTEX_ATTRIB_ARRAY11_NV:
8585+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8586+ params[0] = ctx->Array.ArrayObj->VertexAttrib[11].Enabled;
8587+ break;
8588+ case GL_VERTEX_ATTRIB_ARRAY12_NV:
8589+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8590+ params[0] = ctx->Array.ArrayObj->VertexAttrib[12].Enabled;
8591+ break;
8592+ case GL_VERTEX_ATTRIB_ARRAY13_NV:
8593+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8594+ params[0] = ctx->Array.ArrayObj->VertexAttrib[13].Enabled;
8595+ break;
8596+ case GL_VERTEX_ATTRIB_ARRAY14_NV:
8597+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8598+ params[0] = ctx->Array.ArrayObj->VertexAttrib[14].Enabled;
8599+ break;
8600+ case GL_VERTEX_ATTRIB_ARRAY15_NV:
8601+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8602+ params[0] = ctx->Array.ArrayObj->VertexAttrib[15].Enabled;
8603+ break;
8604+ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
8605+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8606+ params[0] = ctx->Eval.Map1Attrib[0];
8607+ break;
8608+ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
8609+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8610+ params[0] = ctx->Eval.Map1Attrib[1];
8611+ break;
8612+ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
8613+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8614+ params[0] = ctx->Eval.Map1Attrib[2];
8615+ break;
8616+ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
8617+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8618+ params[0] = ctx->Eval.Map1Attrib[3];
8619+ break;
8620+ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
8621+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8622+ params[0] = ctx->Eval.Map1Attrib[4];
8623+ break;
8624+ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
8625+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8626+ params[0] = ctx->Eval.Map1Attrib[5];
8627+ break;
8628+ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
8629+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8630+ params[0] = ctx->Eval.Map1Attrib[6];
8631+ break;
8632+ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
8633+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8634+ params[0] = ctx->Eval.Map1Attrib[7];
8635+ break;
8636+ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
8637+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8638+ params[0] = ctx->Eval.Map1Attrib[8];
8639+ break;
8640+ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
8641+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8642+ params[0] = ctx->Eval.Map1Attrib[9];
8643+ break;
8644+ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
8645+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8646+ params[0] = ctx->Eval.Map1Attrib[10];
8647+ break;
8648+ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
8649+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8650+ params[0] = ctx->Eval.Map1Attrib[11];
8651+ break;
8652+ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
8653+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8654+ params[0] = ctx->Eval.Map1Attrib[12];
8655+ break;
8656+ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
8657+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8658+ params[0] = ctx->Eval.Map1Attrib[13];
8659+ break;
8660+ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
8661+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8662+ params[0] = ctx->Eval.Map1Attrib[14];
8663+ break;
8664+ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
8665+ CHECK_EXT1(NV_vertex_program, "GetBooleanv");
8666+ params[0] = ctx->Eval.Map1Attrib[15];
8667+ break;
8668+ case GL_FRAGMENT_PROGRAM_NV:
8669+ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
8670+ params[0] = ctx->FragmentProgram.Enabled;
8671+ break;
8672+ case GL_FRAGMENT_PROGRAM_BINDING_NV:
8673+ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
8674+ params[0] = INT_TO_BOOLEAN(ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0);
8675+ break;
8676+ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
8677+ CHECK_EXT1(NV_fragment_program, "GetBooleanv");
8678+ params[0] = INT_TO_BOOLEAN(MAX_NV_FRAGMENT_PROGRAM_PARAMS);
8679+ break;
8680+ case GL_TEXTURE_RECTANGLE_NV:
8681+ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
8682+ params[0] = _mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV);
8683+ break;
8684+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
8685+ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
8686+ params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name);
8687+ break;
8688+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
8689+ CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
8690+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureRectSize);
8691+ break;
8692+ case GL_STENCIL_TEST_TWO_SIDE_EXT:
8693+ CHECK_EXT1(EXT_stencil_two_side, "GetBooleanv");
8694+ params[0] = ctx->Stencil.TestTwoSide;
8695+ break;
8696+ case GL_ACTIVE_STENCIL_FACE_EXT:
8697+ CHECK_EXT1(EXT_stencil_two_side, "GetBooleanv");
8698+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
8699+ break;
8700+ case GL_MAX_SHININESS_NV:
8701+ CHECK_EXT1(NV_light_max_exponent, "GetBooleanv");
8702+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxShininess);
8703+ break;
8704+ case GL_MAX_SPOT_EXPONENT_NV:
8705+ CHECK_EXT1(NV_light_max_exponent, "GetBooleanv");
8706+ params[0] = FLOAT_TO_BOOLEAN(ctx->Const.MaxSpotExponent);
8707+ break;
8708+ case GL_ARRAY_BUFFER_BINDING_ARB:
8709+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8710+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayBufferObj->Name);
8711+ break;
8712+ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
8713+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8714+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
8715+ break;
8716+ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
8717+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8718+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Normal.BufferObj->Name);
8719+ break;
8720+ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
8721+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8722+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Color.BufferObj->Name);
8723+ break;
8724+ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
8725+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8726+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->Index.BufferObj->Name);
8727+ break;
8728+ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
8729+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8730+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
8731+ break;
8732+ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
8733+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8734+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
8735+ break;
8736+ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
8737+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8738+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
8739+ break;
8740+ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
8741+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8742+ params[0] = INT_TO_BOOLEAN(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
8743+ break;
8744+ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
8745+ CHECK_EXT1(ARB_vertex_buffer_object, "GetBooleanv");
8746+ params[0] = INT_TO_BOOLEAN(ctx->Array.ElementArrayBufferObj->Name);
8747+ break;
8748+ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
8749+ CHECK_EXT1(EXT_pixel_buffer_object, "GetBooleanv");
8750+ params[0] = INT_TO_BOOLEAN(ctx->Pack.BufferObj->Name);
8751+ break;
8752+ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
8753+ CHECK_EXT1(EXT_pixel_buffer_object, "GetBooleanv");
8754+ params[0] = INT_TO_BOOLEAN(ctx->Unpack.BufferObj->Name);
8755+ break;
8756+ case GL_VERTEX_PROGRAM_ARB:
8757+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
8758+ params[0] = ctx->VertexProgram.Enabled;
8759+ break;
8760+ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
8761+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
8762+ params[0] = ctx->VertexProgram.PointSizeEnabled;
8763+ break;
8764+ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
8765+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetBooleanv");
8766+ params[0] = ctx->VertexProgram.TwoSideEnabled;
8767+ break;
8768+ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
8769+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
8770+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxProgramMatrixStackDepth);
8771+ break;
8772+ case GL_MAX_PROGRAM_MATRICES_ARB:
8773+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
8774+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxProgramMatrices);
8775+ break;
8776+ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
8777+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetBooleanv");
8778+ params[0] = ctx->CurrentStack->Depth + 1;
8779+ break;
8780+ case GL_CURRENT_MATRIX_ARB:
8781+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetBooleanv");
8782+ {
8783+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
8784+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8785+ params[1] = FLOAT_TO_BOOLEAN(matrix[1]);
8786+ params[2] = FLOAT_TO_BOOLEAN(matrix[2]);
8787+ params[3] = FLOAT_TO_BOOLEAN(matrix[3]);
8788+ params[4] = FLOAT_TO_BOOLEAN(matrix[4]);
8789+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8790+ params[6] = FLOAT_TO_BOOLEAN(matrix[6]);
8791+ params[7] = FLOAT_TO_BOOLEAN(matrix[7]);
8792+ params[8] = FLOAT_TO_BOOLEAN(matrix[8]);
8793+ params[9] = FLOAT_TO_BOOLEAN(matrix[9]);
8794+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8795+ params[11] = FLOAT_TO_BOOLEAN(matrix[11]);
8796+ params[12] = FLOAT_TO_BOOLEAN(matrix[12]);
8797+ params[13] = FLOAT_TO_BOOLEAN(matrix[13]);
8798+ params[14] = FLOAT_TO_BOOLEAN(matrix[14]);
8799+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8800+ }
8801+ break;
8802+ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
8803+ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetBooleanv");
8804+ {
8805+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
8806+ params[0] = FLOAT_TO_BOOLEAN(matrix[0]);
8807+ params[1] = FLOAT_TO_BOOLEAN(matrix[4]);
8808+ params[2] = FLOAT_TO_BOOLEAN(matrix[8]);
8809+ params[3] = FLOAT_TO_BOOLEAN(matrix[12]);
8810+ params[4] = FLOAT_TO_BOOLEAN(matrix[1]);
8811+ params[5] = FLOAT_TO_BOOLEAN(matrix[5]);
8812+ params[6] = FLOAT_TO_BOOLEAN(matrix[9]);
8813+ params[7] = FLOAT_TO_BOOLEAN(matrix[13]);
8814+ params[8] = FLOAT_TO_BOOLEAN(matrix[2]);
8815+ params[9] = FLOAT_TO_BOOLEAN(matrix[6]);
8816+ params[10] = FLOAT_TO_BOOLEAN(matrix[10]);
8817+ params[11] = FLOAT_TO_BOOLEAN(matrix[14]);
8818+ params[12] = FLOAT_TO_BOOLEAN(matrix[3]);
8819+ params[13] = FLOAT_TO_BOOLEAN(matrix[7]);
8820+ params[14] = FLOAT_TO_BOOLEAN(matrix[11]);
8821+ params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
8822+ }
8823+ break;
8824+ case GL_MAX_VERTEX_ATTRIBS_ARB:
8825+ CHECK_EXT1(ARB_vertex_program, "GetBooleanv");
8826+ params[0] = INT_TO_BOOLEAN(ctx->Const.VertexProgram.MaxAttribs);
8827+ break;
8828+ case GL_PROGRAM_ERROR_POSITION_ARB:
8829+ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetBooleanv");
8830+ params[0] = INT_TO_BOOLEAN(ctx->Program.ErrorPos);
8831+ break;
8832+ case GL_FRAGMENT_PROGRAM_ARB:
8833+ CHECK_EXT1(ARB_fragment_program, "GetBooleanv");
8834+ params[0] = ctx->FragmentProgram.Enabled;
8835+ break;
8836+ case GL_MAX_TEXTURE_COORDS_ARB:
8837+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetBooleanv");
8838+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureCoordUnits);
8839+ break;
8840+ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
8841+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetBooleanv");
8842+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureImageUnits);
8843+ break;
8844+ case GL_DEPTH_BOUNDS_TEST_EXT:
8845+ CHECK_EXT1(EXT_depth_bounds_test, "GetBooleanv");
8846+ params[0] = ctx->Depth.BoundsTest;
8847+ break;
8848+ case GL_DEPTH_BOUNDS_EXT:
8849+ CHECK_EXT1(EXT_depth_bounds_test, "GetBooleanv");
8850+ params[0] = FLOAT_TO_BOOLEAN(ctx->Depth.BoundsMin);
8851+ params[1] = FLOAT_TO_BOOLEAN(ctx->Depth.BoundsMax);
8852+ break;
8853+ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
8854+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8855+ params[0] = ctx->FragmentProgram.CallbackEnabled;
8856+ break;
8857+ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
8858+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8859+ params[0] = ctx->VertexProgram.CallbackEnabled;
8860+ break;
8861+ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
8862+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8863+ params[0] = INT_TO_BOOLEAN(ctx->FragmentProgram.CurrentPosition);
8864+ break;
8865+ case GL_VERTEX_PROGRAM_POSITION_MESA:
8866+ CHECK_EXT1(MESA_program_debug, "GetBooleanv");
8867+ params[0] = INT_TO_BOOLEAN(ctx->VertexProgram.CurrentPosition);
8868+ break;
8869+ case GL_MAX_DRAW_BUFFERS_ARB:
8870+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8871+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxDrawBuffers);
8872+ break;
8873+ case GL_DRAW_BUFFER0_ARB:
8874+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8875+ params[0] = ENUM_TO_BOOLEAN(ctx->DrawBuffer->ColorDrawBuffer[0]);
8876+ break;
8877+ case GL_DRAW_BUFFER1_ARB:
8878+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8879+ {
8880+ GLenum buffer;
8881+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
8882+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
8883+ return;
8884+ }
8885+ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
8886+ params[0] = ENUM_TO_BOOLEAN(buffer);
8887+ }
8888+ break;
8889+ case GL_DRAW_BUFFER2_ARB:
8890+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8891+ {
8892+ GLenum buffer;
8893+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
8894+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
8895+ return;
8896+ }
8897+ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
8898+ params[0] = ENUM_TO_BOOLEAN(buffer);
8899+ }
8900+ break;
8901+ case GL_DRAW_BUFFER3_ARB:
8902+ CHECK_EXT1(ARB_draw_buffers, "GetBooleanv");
8903+ {
8904+ GLenum buffer;
8905+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
8906+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
8907+ return;
8908+ }
8909+ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
8910+ params[0] = ENUM_TO_BOOLEAN(buffer);
8911+ }
8912+ break;
8913+ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
8914+ CHECK_EXT1(OES_read_format, "GetBooleanv");
8915+ params[0] = INT_TO_BOOLEAN(ctx->Const.ColorReadType);
8916+ break;
8917+ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
8918+ CHECK_EXT1(OES_read_format, "GetBooleanv");
8919+ params[0] = INT_TO_BOOLEAN(ctx->Const.ColorReadFormat);
8920+ break;
8921+ case GL_NUM_FRAGMENT_REGISTERS_ATI:
8922+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8923+ params[0] = INT_TO_BOOLEAN(6);
8924+ break;
8925+ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
8926+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8927+ params[0] = INT_TO_BOOLEAN(8);
8928+ break;
8929+ case GL_NUM_PASSES_ATI:
8930+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8931+ params[0] = INT_TO_BOOLEAN(2);
8932+ break;
8933+ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
8934+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8935+ params[0] = INT_TO_BOOLEAN(8);
8936+ break;
8937+ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
8938+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8939+ params[0] = INT_TO_BOOLEAN(16);
8940+ break;
8941+ case GL_COLOR_ALPHA_PAIRING_ATI:
8942+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8943+ params[0] = GL_TRUE;
8944+ break;
8945+ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
8946+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8947+ params[0] = INT_TO_BOOLEAN(3);
8948+ break;
8949+ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
8950+ CHECK_EXT1(ATI_fragment_shader, "GetBooleanv");
8951+ params[0] = INT_TO_BOOLEAN(3);
8952+ break;
8953+ case GL_STENCIL_BACK_FUNC:
8954+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.Function[1]);
8955+ break;
8956+ case GL_STENCIL_BACK_VALUE_MASK:
8957+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.ValueMask[1]);
8958+ break;
8959+ case GL_STENCIL_BACK_REF:
8960+ params[0] = INT_TO_BOOLEAN(ctx->Stencil.Ref[1]);
8961+ break;
8962+ case GL_STENCIL_BACK_FAIL:
8963+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.FailFunc[1]);
8964+ break;
8965+ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
8966+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZFailFunc[1]);
8967+ break;
8968+ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
8969+ params[0] = ENUM_TO_BOOLEAN(ctx->Stencil.ZPassFunc[1]);
8970+ break;
8971+ case GL_FRAMEBUFFER_BINDING_EXT:
8972+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
8973+ params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Name);
8974+ break;
8975+ case GL_RENDERBUFFER_BINDING_EXT:
8976+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
8977+ params[0] = INT_TO_BOOLEAN(ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0);
8978+ break;
8979+ case GL_MAX_COLOR_ATTACHMENTS_EXT:
8980+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
8981+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxColorAttachments);
8982+ break;
8983+ case GL_MAX_RENDERBUFFER_SIZE_EXT:
8984+ CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
8985+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxRenderbufferSize);
8986+ break;
8987+ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
8988+ CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
8989+ params[0] = INT_TO_BOOLEAN(MAX_FRAGMENT_UNIFORM_COMPONENTS);
8990+ break;
8991+ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
8992+ CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
8993+ params[0] = ENUM_TO_BOOLEAN(ctx->Hint.FragmentShaderDerivative);
8994+ break;
8995+ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
8996+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
8997+ params[0] = INT_TO_BOOLEAN(MAX_VERTEX_UNIFORM_COMPONENTS);
8998+ break;
8999+ case GL_MAX_VARYING_FLOATS_ARB:
9000+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
9001+ params[0] = INT_TO_BOOLEAN(MAX_VARYING_FLOATS);
9002+ break;
9003+ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
9004+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
9005+ params[0] = INT_TO_BOOLEAN(MAX_VERTEX_TEXTURE_IMAGE_UNITS);
9006+ break;
9007+ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
9008+ CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
9009+ params[0] = INT_TO_BOOLEAN(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
9010+ break;
9011+ default:
9012+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv(pname=0x%x)", pname);
9013+ }
9014+}
9015+
9016+void GLAPIENTRY
9017+_mesa_GetFloatv( GLenum pname, GLfloat *params )
9018+{
9019+ GET_CURRENT_CONTEXT(ctx);
9020+ ASSERT_OUTSIDE_BEGIN_END(ctx);
9021+
9022+ if (!params)
9023+ return;
9024+
9025+ if (ctx->NewState)
9026+ _mesa_update_state(ctx);
9027+
9028+ if (ctx->Driver.GetFloatv &&
9029+ ctx->Driver.GetFloatv(ctx, pname, params))
9030+ return;
9031+
9032+ switch (pname) {
9033+ case GL_ACCUM_RED_BITS:
9034+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumRedBits);
9035+ break;
9036+ case GL_ACCUM_GREEN_BITS:
9037+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumGreenBits);
9038+ break;
9039+ case GL_ACCUM_BLUE_BITS:
9040+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumBlueBits);
9041+ break;
9042+ case GL_ACCUM_ALPHA_BITS:
9043+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.accumAlphaBits);
9044+ break;
9045+ case GL_ACCUM_CLEAR_VALUE:
9046+ params[0] = ctx->Accum.ClearColor[0];
9047+ params[1] = ctx->Accum.ClearColor[1];
9048+ params[2] = ctx->Accum.ClearColor[2];
9049+ params[3] = ctx->Accum.ClearColor[3];
9050+ break;
9051+ case GL_ALPHA_BIAS:
9052+ params[0] = ctx->Pixel.AlphaBias;
9053+ break;
9054+ case GL_ALPHA_BITS:
9055+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.alphaBits);
9056+ break;
9057+ case GL_ALPHA_SCALE:
9058+ params[0] = ctx->Pixel.AlphaScale;
9059+ break;
9060+ case GL_ALPHA_TEST:
9061+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.AlphaEnabled);
9062+ break;
9063+ case GL_ALPHA_TEST_FUNC:
9064+ params[0] = ENUM_TO_FLOAT(ctx->Color.AlphaFunc);
9065+ break;
9066+ case GL_ALPHA_TEST_REF:
9067+ params[0] = ctx->Color.AlphaRef;
9068+ break;
9069+ case GL_ATTRIB_STACK_DEPTH:
9070+ params[0] = (GLfloat)(ctx->AttribStackDepth);
9071+ break;
9072+ case GL_AUTO_NORMAL:
9073+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.AutoNormal);
9074+ break;
9075+ case GL_AUX_BUFFERS:
9076+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.numAuxBuffers);
9077+ break;
9078+ case GL_BLEND:
9079+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.BlendEnabled);
9080+ break;
9081+ case GL_BLEND_DST:
9082+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstRGB);
9083+ break;
9084+ case GL_BLEND_SRC:
9085+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcRGB);
9086+ break;
9087+ case GL_BLEND_SRC_RGB_EXT:
9088+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcRGB);
9089+ break;
9090+ case GL_BLEND_DST_RGB_EXT:
9091+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstRGB);
9092+ break;
9093+ case GL_BLEND_SRC_ALPHA_EXT:
9094+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendSrcA);
9095+ break;
9096+ case GL_BLEND_DST_ALPHA_EXT:
9097+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstA);
9098+ break;
9099+ case GL_BLEND_EQUATION:
9100+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendEquationRGB );
9101+ break;
9102+ case GL_BLEND_EQUATION_ALPHA_EXT:
9103+ params[0] = ENUM_TO_FLOAT(ctx->Color.BlendEquationA );
9104+ break;
9105+ case GL_BLEND_COLOR_EXT:
9106+ params[0] = ctx->Color.BlendColor[0];
9107+ params[1] = ctx->Color.BlendColor[1];
9108+ params[2] = ctx->Color.BlendColor[2];
9109+ params[3] = ctx->Color.BlendColor[3];
9110+ break;
9111+ case GL_BLUE_BIAS:
9112+ params[0] = ctx->Pixel.BlueBias;
9113+ break;
9114+ case GL_BLUE_BITS:
9115+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.blueBits);
9116+ break;
9117+ case GL_BLUE_SCALE:
9118+ params[0] = ctx->Pixel.BlueScale;
9119+ break;
9120+ case GL_CLIENT_ATTRIB_STACK_DEPTH:
9121+ params[0] = (GLfloat)(ctx->ClientAttribStackDepth);
9122+ break;
9123+ case GL_CLIP_PLANE0:
9124+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 0) & 1);
9125+ break;
9126+ case GL_CLIP_PLANE1:
9127+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 1) & 1);
9128+ break;
9129+ case GL_CLIP_PLANE2:
9130+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 2) & 1);
9131+ break;
9132+ case GL_CLIP_PLANE3:
9133+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 3) & 1);
9134+ break;
9135+ case GL_CLIP_PLANE4:
9136+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 4) & 1);
9137+ break;
9138+ case GL_CLIP_PLANE5:
9139+ params[0] = BOOLEAN_TO_FLOAT((ctx->Transform.ClipPlanesEnabled >> 5) & 1);
9140+ break;
9141+ case GL_COLOR_CLEAR_VALUE:
9142+ params[0] = ctx->Color.ClearColor[0];
9143+ params[1] = ctx->Color.ClearColor[1];
9144+ params[2] = ctx->Color.ClearColor[2];
9145+ params[3] = ctx->Color.ClearColor[3];
9146+ break;
9147+ case GL_COLOR_MATERIAL:
9148+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.ColorMaterialEnabled);
9149+ break;
9150+ case GL_COLOR_MATERIAL_FACE:
9151+ params[0] = ENUM_TO_FLOAT(ctx->Light.ColorMaterialFace);
9152+ break;
9153+ case GL_COLOR_MATERIAL_PARAMETER:
9154+ params[0] = ENUM_TO_FLOAT(ctx->Light.ColorMaterialMode);
9155+ break;
9156+ case GL_COLOR_WRITEMASK:
9157+ params[0] = (GLfloat)(ctx->Color.ColorMask[RCOMP] ? 1 : 0);
9158+ params[1] = (GLfloat)(ctx->Color.ColorMask[GCOMP] ? 1 : 0);
9159+ params[2] = (GLfloat)(ctx->Color.ColorMask[BCOMP] ? 1 : 0);
9160+ params[3] = (GLfloat)(ctx->Color.ColorMask[ACOMP] ? 1 : 0);
9161+ break;
9162+ case GL_CULL_FACE:
9163+ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.CullFlag);
9164+ break;
9165+ case GL_CULL_FACE_MODE:
9166+ params[0] = ENUM_TO_FLOAT(ctx->Polygon.CullFaceMode);
9167+ break;
9168+ case GL_CURRENT_COLOR:
9169+ {
9170+ FLUSH_CURRENT(ctx, 0);
9171+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0];
9172+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1];
9173+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2];
9174+ params[3] = ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3];
9175+ }
9176+ break;
9177+ case GL_CURRENT_INDEX:
9178+ {
9179+ FLUSH_CURRENT(ctx, 0);
9180+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0];
9181+ }
9182+ break;
9183+ case GL_CURRENT_NORMAL:
9184+ {
9185+ FLUSH_CURRENT(ctx, 0);
9186+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0];
9187+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1];
9188+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2];
9189+ }
9190+ break;
9191+ case GL_CURRENT_RASTER_COLOR:
9192+ params[0] = ctx->Current.RasterColor[0];
9193+ params[1] = ctx->Current.RasterColor[1];
9194+ params[2] = ctx->Current.RasterColor[2];
9195+ params[3] = ctx->Current.RasterColor[3];
9196+ break;
9197+ case GL_CURRENT_RASTER_DISTANCE:
9198+ params[0] = ctx->Current.RasterDistance;
9199+ break;
9200+ case GL_CURRENT_RASTER_INDEX:
9201+ params[0] = ctx->Current.RasterIndex;
9202+ break;
9203+ case GL_CURRENT_RASTER_POSITION:
9204+ params[0] = ctx->Current.RasterPos[0];
9205+ params[1] = ctx->Current.RasterPos[1];
9206+ params[2] = ctx->Current.RasterPos[2];
9207+ params[3] = ctx->Current.RasterPos[3];
9208+ break;
9209+ case GL_CURRENT_RASTER_SECONDARY_COLOR:
9210+ params[0] = ctx->Current.RasterSecondaryColor[0];
9211+ params[1] = ctx->Current.RasterSecondaryColor[1];
9212+ params[2] = ctx->Current.RasterSecondaryColor[2];
9213+ params[3] = ctx->Current.RasterSecondaryColor[3];
9214+ break;
9215+ case GL_CURRENT_RASTER_TEXTURE_COORDS:
9216+ {
9217+ const GLuint texUnit = ctx->Texture.CurrentUnit;
9218+ params[0] = ctx->Current.RasterTexCoords[texUnit][0];
9219+ params[1] = ctx->Current.RasterTexCoords[texUnit][1];
9220+ params[2] = ctx->Current.RasterTexCoords[texUnit][2];
9221+ params[3] = ctx->Current.RasterTexCoords[texUnit][3];
9222+ }
9223+ break;
9224+ case GL_CURRENT_RASTER_POSITION_VALID:
9225+ params[0] = BOOLEAN_TO_FLOAT(ctx->Current.RasterPosValid);
9226+ break;
9227+ case GL_CURRENT_TEXTURE_COORDS:
9228+ {
9229+ const GLuint texUnit = ctx->Texture.CurrentUnit;
9230+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0];
9231+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1];
9232+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2];
9233+ params[3] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3];
9234+ }
9235+ break;
9236+ case GL_DEPTH_BIAS:
9237+ params[0] = ctx->Pixel.DepthBias;
9238+ break;
9239+ case GL_DEPTH_BITS:
9240+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.depthBits);
9241+ break;
9242+ case GL_DEPTH_CLEAR_VALUE:
9243+ params[0] = ctx->Depth.Clear;
9244+ break;
9245+ case GL_DEPTH_FUNC:
9246+ params[0] = ENUM_TO_FLOAT(ctx->Depth.Func);
9247+ break;
9248+ case GL_DEPTH_RANGE:
9249+ params[0] = ctx->Viewport.Near;
9250+ params[1] = ctx->Viewport.Far;
9251+ break;
9252+ case GL_DEPTH_SCALE:
9253+ params[0] = ctx->Pixel.DepthScale;
9254+ break;
9255+ case GL_DEPTH_TEST:
9256+ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.Test);
9257+ break;
9258+ case GL_DEPTH_WRITEMASK:
9259+ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.Mask);
9260+ break;
9261+ case GL_DITHER:
9262+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.DitherFlag);
9263+ break;
9264+ case GL_DOUBLEBUFFER:
9265+ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.doubleBufferMode);
9266+ break;
9267+ case GL_DRAW_BUFFER:
9268+ params[0] = ENUM_TO_FLOAT(ctx->DrawBuffer->ColorDrawBuffer[0]);
9269+ break;
9270+ case GL_EDGE_FLAG:
9271+ {
9272+ FLUSH_CURRENT(ctx, 0);
9273+ params[0] = BOOLEAN_TO_FLOAT(ctx->Current.EdgeFlag);
9274+ }
9275+ break;
9276+ case GL_FEEDBACK_BUFFER_SIZE:
9277+ params[0] = (GLfloat)(ctx->Feedback.BufferSize);
9278+ break;
9279+ case GL_FEEDBACK_BUFFER_TYPE:
9280+ params[0] = ENUM_TO_FLOAT(ctx->Feedback.Type);
9281+ break;
9282+ case GL_FOG:
9283+ params[0] = BOOLEAN_TO_FLOAT(ctx->Fog.Enabled);
9284+ break;
9285+ case GL_FOG_COLOR:
9286+ params[0] = ctx->Fog.Color[0];
9287+ params[1] = ctx->Fog.Color[1];
9288+ params[2] = ctx->Fog.Color[2];
9289+ params[3] = ctx->Fog.Color[3];
9290+ break;
9291+ case GL_FOG_DENSITY:
9292+ params[0] = ctx->Fog.Density;
9293+ break;
9294+ case GL_FOG_END:
9295+ params[0] = ctx->Fog.End;
9296+ break;
9297+ case GL_FOG_HINT:
9298+ params[0] = ENUM_TO_FLOAT(ctx->Hint.Fog);
9299+ break;
9300+ case GL_FOG_INDEX:
9301+ params[0] = ctx->Fog.Index;
9302+ break;
9303+ case GL_FOG_MODE:
9304+ params[0] = ENUM_TO_FLOAT(ctx->Fog.Mode);
9305+ break;
9306+ case GL_FOG_START:
9307+ params[0] = ctx->Fog.Start;
9308+ break;
9309+ case GL_FRONT_FACE:
9310+ params[0] = ENUM_TO_FLOAT(ctx->Polygon.FrontFace);
9311+ break;
9312+ case GL_GREEN_BIAS:
9313+ params[0] = ctx->Pixel.GreenBias;
9314+ break;
9315+ case GL_GREEN_BITS:
9316+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.greenBits);
9317+ break;
9318+ case GL_GREEN_SCALE:
9319+ params[0] = ctx->Pixel.GreenScale;
9320+ break;
9321+ case GL_INDEX_BITS:
9322+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.indexBits);
9323+ break;
9324+ case GL_INDEX_CLEAR_VALUE:
9325+ params[0] = (GLfloat)(ctx->Color.ClearIndex);
9326+ break;
9327+ case GL_INDEX_MODE:
9328+ params[0] = BOOLEAN_TO_FLOAT(!ctx->DrawBuffer->Visual.rgbMode);
9329+ break;
9330+ case GL_INDEX_OFFSET:
9331+ params[0] = (GLfloat)(ctx->Pixel.IndexOffset);
9332+ break;
9333+ case GL_INDEX_SHIFT:
9334+ params[0] = (GLfloat)(ctx->Pixel.IndexShift);
9335+ break;
9336+ case GL_INDEX_WRITEMASK:
9337+ params[0] = (GLfloat)(ctx->Color.IndexMask);
9338+ break;
9339+ case GL_LIGHT0:
9340+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[0].Enabled);
9341+ break;
9342+ case GL_LIGHT1:
9343+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[1].Enabled);
9344+ break;
9345+ case GL_LIGHT2:
9346+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[2].Enabled);
9347+ break;
9348+ case GL_LIGHT3:
9349+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[3].Enabled);
9350+ break;
9351+ case GL_LIGHT4:
9352+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[4].Enabled);
9353+ break;
9354+ case GL_LIGHT5:
9355+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[5].Enabled);
9356+ break;
9357+ case GL_LIGHT6:
9358+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[6].Enabled);
9359+ break;
9360+ case GL_LIGHT7:
9361+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Light[7].Enabled);
9362+ break;
9363+ case GL_LIGHTING:
9364+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Enabled);
9365+ break;
9366+ case GL_LIGHT_MODEL_AMBIENT:
9367+ params[0] = ctx->Light.Model.Ambient[0];
9368+ params[1] = ctx->Light.Model.Ambient[1];
9369+ params[2] = ctx->Light.Model.Ambient[2];
9370+ params[3] = ctx->Light.Model.Ambient[3];
9371+ break;
9372+ case GL_LIGHT_MODEL_COLOR_CONTROL:
9373+ params[0] = ENUM_TO_FLOAT(ctx->Light.Model.ColorControl);
9374+ break;
9375+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
9376+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Model.LocalViewer);
9377+ break;
9378+ case GL_LIGHT_MODEL_TWO_SIDE:
9379+ params[0] = BOOLEAN_TO_FLOAT(ctx->Light.Model.TwoSide);
9380+ break;
9381+ case GL_LINE_SMOOTH:
9382+ params[0] = BOOLEAN_TO_FLOAT(ctx->Line.SmoothFlag);
9383+ break;
9384+ case GL_LINE_SMOOTH_HINT:
9385+ params[0] = ENUM_TO_FLOAT(ctx->Hint.LineSmooth);
9386+ break;
9387+ case GL_LINE_STIPPLE:
9388+ params[0] = BOOLEAN_TO_FLOAT(ctx->Line.StippleFlag);
9389+ break;
9390+ case GL_LINE_STIPPLE_PATTERN:
9391+ params[0] = (GLfloat)(ctx->Line.StipplePattern);
9392+ break;
9393+ case GL_LINE_STIPPLE_REPEAT:
9394+ params[0] = (GLfloat)(ctx->Line.StippleFactor);
9395+ break;
9396+ case GL_LINE_WIDTH:
9397+ params[0] = ctx->Line.Width;
9398+ break;
9399+ case GL_LINE_WIDTH_GRANULARITY:
9400+ params[0] = ctx->Const.LineWidthGranularity;
9401+ break;
9402+ case GL_LINE_WIDTH_RANGE:
9403+ params[0] = ctx->Const.MinLineWidthAA;
9404+ params[1] = ctx->Const.MaxLineWidthAA;
9405+ break;
9406+ case GL_ALIASED_LINE_WIDTH_RANGE:
9407+ params[0] = ctx->Const.MinLineWidth;
9408+ params[1] = ctx->Const.MaxLineWidth;
9409+ break;
9410+ case GL_LIST_BASE:
9411+ params[0] = (GLfloat)(ctx->List.ListBase);
9412+ break;
9413+ case GL_LIST_INDEX:
9414+ params[0] = (GLfloat)(ctx->ListState.CurrentListNum);
9415+ break;
9416+ case GL_LIST_MODE:
9417+ {
9418+ GLenum mode;
9419+ if (!ctx->CompileFlag)
9420+ mode = 0;
9421+ else if (ctx->ExecuteFlag)
9422+ mode = GL_COMPILE_AND_EXECUTE;
9423+ else
9424+ mode = GL_COMPILE;
9425+ params[0] = ENUM_TO_FLOAT(mode);
9426+ }
9427+ break;
9428+ case GL_INDEX_LOGIC_OP:
9429+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.IndexLogicOpEnabled);
9430+ break;
9431+ case GL_COLOR_LOGIC_OP:
9432+ params[0] = BOOLEAN_TO_FLOAT(ctx->Color.ColorLogicOpEnabled);
9433+ break;
9434+ case GL_LOGIC_OP_MODE:
9435+ params[0] = ENUM_TO_FLOAT(ctx->Color.LogicOp);
9436+ break;
9437+ case GL_MAP1_COLOR_4:
9438+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Color4);
9439+ break;
9440+ case GL_MAP1_GRID_DOMAIN:
9441+ params[0] = ctx->Eval.MapGrid1u1;
9442+ params[1] = ctx->Eval.MapGrid1u2;
9443+ break;
9444+ case GL_MAP1_GRID_SEGMENTS:
9445+ params[0] = (GLfloat)(ctx->Eval.MapGrid1un);
9446+ break;
9447+ case GL_MAP1_INDEX:
9448+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Index);
9449+ break;
9450+ case GL_MAP1_NORMAL:
9451+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Normal);
9452+ break;
9453+ case GL_MAP1_TEXTURE_COORD_1:
9454+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord1);
9455+ break;
9456+ case GL_MAP1_TEXTURE_COORD_2:
9457+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord2);
9458+ break;
9459+ case GL_MAP1_TEXTURE_COORD_3:
9460+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord3);
9461+ break;
9462+ case GL_MAP1_TEXTURE_COORD_4:
9463+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1TextureCoord4);
9464+ break;
9465+ case GL_MAP1_VERTEX_3:
9466+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Vertex3);
9467+ break;
9468+ case GL_MAP1_VERTEX_4:
9469+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Vertex4);
9470+ break;
9471+ case GL_MAP2_COLOR_4:
9472+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Color4);
9473+ break;
9474+ case GL_MAP2_GRID_DOMAIN:
9475+ params[0] = ctx->Eval.MapGrid2u1;
9476+ params[1] = ctx->Eval.MapGrid2u2;
9477+ params[2] = ctx->Eval.MapGrid2v1;
9478+ params[3] = ctx->Eval.MapGrid2v2;
9479+ break;
9480+ case GL_MAP2_GRID_SEGMENTS:
9481+ params[0] = (GLfloat)(ctx->Eval.MapGrid2un);
9482+ params[1] = (GLfloat)(ctx->Eval.MapGrid2vn);
9483+ break;
9484+ case GL_MAP2_INDEX:
9485+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Index);
9486+ break;
9487+ case GL_MAP2_NORMAL:
9488+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Normal);
9489+ break;
9490+ case GL_MAP2_TEXTURE_COORD_1:
9491+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord1);
9492+ break;
9493+ case GL_MAP2_TEXTURE_COORD_2:
9494+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord2);
9495+ break;
9496+ case GL_MAP2_TEXTURE_COORD_3:
9497+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord3);
9498+ break;
9499+ case GL_MAP2_TEXTURE_COORD_4:
9500+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2TextureCoord4);
9501+ break;
9502+ case GL_MAP2_VERTEX_3:
9503+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Vertex3);
9504+ break;
9505+ case GL_MAP2_VERTEX_4:
9506+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map2Vertex4);
9507+ break;
9508+ case GL_MAP_COLOR:
9509+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MapColorFlag);
9510+ break;
9511+ case GL_MAP_STENCIL:
9512+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MapStencilFlag);
9513+ break;
9514+ case GL_MATRIX_MODE:
9515+ params[0] = ENUM_TO_FLOAT(ctx->Transform.MatrixMode);
9516+ break;
9517+ case GL_MAX_ATTRIB_STACK_DEPTH:
9518+ params[0] = (GLfloat)(MAX_ATTRIB_STACK_DEPTH);
9519+ break;
9520+ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
9521+ params[0] = (GLfloat)(MAX_CLIENT_ATTRIB_STACK_DEPTH);
9522+ break;
9523+ case GL_MAX_CLIP_PLANES:
9524+ params[0] = (GLfloat)(ctx->Const.MaxClipPlanes);
9525+ break;
9526+ case GL_MAX_ELEMENTS_VERTICES:
9527+ params[0] = (GLfloat)(ctx->Const.MaxArrayLockSize);
9528+ break;
9529+ case GL_MAX_ELEMENTS_INDICES:
9530+ params[0] = (GLfloat)(ctx->Const.MaxArrayLockSize);
9531+ break;
9532+ case GL_MAX_EVAL_ORDER:
9533+ params[0] = (GLfloat)(MAX_EVAL_ORDER);
9534+ break;
9535+ case GL_MAX_LIGHTS:
9536+ params[0] = (GLfloat)(ctx->Const.MaxLights);
9537+ break;
9538+ case GL_MAX_LIST_NESTING:
9539+ params[0] = (GLfloat)(MAX_LIST_NESTING);
9540+ break;
9541+ case GL_MAX_MODELVIEW_STACK_DEPTH:
9542+ params[0] = (GLfloat)(MAX_MODELVIEW_STACK_DEPTH);
9543+ break;
9544+ case GL_MAX_NAME_STACK_DEPTH:
9545+ params[0] = (GLfloat)(MAX_NAME_STACK_DEPTH);
9546+ break;
9547+ case GL_MAX_PIXEL_MAP_TABLE:
9548+ params[0] = (GLfloat)(MAX_PIXEL_MAP_TABLE);
9549+ break;
9550+ case GL_MAX_PROJECTION_STACK_DEPTH:
9551+ params[0] = (GLfloat)(MAX_PROJECTION_STACK_DEPTH);
9552+ break;
9553+ case GL_MAX_TEXTURE_SIZE:
9554+ params[0] = (GLfloat)(1 << (ctx->Const.MaxTextureLevels - 1));
9555+ break;
9556+ case GL_MAX_3D_TEXTURE_SIZE:
9557+ params[0] = (GLfloat)(1 << (ctx->Const.Max3DTextureLevels - 1));
9558+ break;
9559+ case GL_MAX_TEXTURE_STACK_DEPTH:
9560+ params[0] = (GLfloat)(MAX_TEXTURE_STACK_DEPTH);
9561+ break;
9562+ case GL_MAX_VIEWPORT_DIMS:
9563+ params[0] = (GLfloat)(ctx->Const.MaxViewportWidth);
9564+ params[1] = (GLfloat)(ctx->Const.MaxViewportHeight);
9565+ break;
9566+ case GL_MODELVIEW_MATRIX:
9567+ {
9568+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
9569+ params[0] = matrix[0];
9570+ params[1] = matrix[1];
9571+ params[2] = matrix[2];
9572+ params[3] = matrix[3];
9573+ params[4] = matrix[4];
9574+ params[5] = matrix[5];
9575+ params[6] = matrix[6];
9576+ params[7] = matrix[7];
9577+ params[8] = matrix[8];
9578+ params[9] = matrix[9];
9579+ params[10] = matrix[10];
9580+ params[11] = matrix[11];
9581+ params[12] = matrix[12];
9582+ params[13] = matrix[13];
9583+ params[14] = matrix[14];
9584+ params[15] = matrix[15];
9585+ }
9586+ break;
9587+ case GL_MODELVIEW_STACK_DEPTH:
9588+ params[0] = (GLfloat)(ctx->ModelviewMatrixStack.Depth + 1);
9589+ break;
9590+ case GL_NAME_STACK_DEPTH:
9591+ params[0] = (GLfloat)(ctx->Select.NameStackDepth);
9592+ break;
9593+ case GL_NORMALIZE:
9594+ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.Normalize);
9595+ break;
9596+ case GL_PACK_ALIGNMENT:
9597+ params[0] = (GLfloat)(ctx->Pack.Alignment);
9598+ break;
9599+ case GL_PACK_LSB_FIRST:
9600+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.LsbFirst);
9601+ break;
9602+ case GL_PACK_ROW_LENGTH:
9603+ params[0] = (GLfloat)(ctx->Pack.RowLength);
9604+ break;
9605+ case GL_PACK_SKIP_PIXELS:
9606+ params[0] = (GLfloat)(ctx->Pack.SkipPixels);
9607+ break;
9608+ case GL_PACK_SKIP_ROWS:
9609+ params[0] = (GLfloat)(ctx->Pack.SkipRows);
9610+ break;
9611+ case GL_PACK_SWAP_BYTES:
9612+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.SwapBytes);
9613+ break;
9614+ case GL_PACK_SKIP_IMAGES_EXT:
9615+ params[0] = (GLfloat)(ctx->Pack.SkipImages);
9616+ break;
9617+ case GL_PACK_IMAGE_HEIGHT_EXT:
9618+ params[0] = (GLfloat)(ctx->Pack.ImageHeight);
9619+ break;
9620+ case GL_PACK_INVERT_MESA:
9621+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pack.Invert);
9622+ break;
9623+ case GL_PERSPECTIVE_CORRECTION_HINT:
9624+ params[0] = ENUM_TO_FLOAT(ctx->Hint.PerspectiveCorrection);
9625+ break;
9626+ case GL_PIXEL_MAP_A_TO_A_SIZE:
9627+ params[0] = (GLfloat)(ctx->Pixel.MapAtoAsize);
9628+ break;
9629+ case GL_PIXEL_MAP_B_TO_B_SIZE:
9630+ params[0] = (GLfloat)(ctx->Pixel.MapBtoBsize);
9631+ break;
9632+ case GL_PIXEL_MAP_G_TO_G_SIZE:
9633+ params[0] = (GLfloat)(ctx->Pixel.MapGtoGsize);
9634+ break;
9635+ case GL_PIXEL_MAP_I_TO_A_SIZE:
9636+ params[0] = (GLfloat)(ctx->Pixel.MapItoAsize);
9637+ break;
9638+ case GL_PIXEL_MAP_I_TO_B_SIZE:
9639+ params[0] = (GLfloat)(ctx->Pixel.MapItoBsize);
9640+ break;
9641+ case GL_PIXEL_MAP_I_TO_G_SIZE:
9642+ params[0] = (GLfloat)(ctx->Pixel.MapItoGsize);
9643+ break;
9644+ case GL_PIXEL_MAP_I_TO_I_SIZE:
9645+ params[0] = (GLfloat)(ctx->Pixel.MapItoIsize);
9646+ break;
9647+ case GL_PIXEL_MAP_I_TO_R_SIZE:
9648+ params[0] = (GLfloat)(ctx->Pixel.MapItoRsize);
9649+ break;
9650+ case GL_PIXEL_MAP_R_TO_R_SIZE:
9651+ params[0] = (GLfloat)(ctx->Pixel.MapRtoRsize);
9652+ break;
9653+ case GL_PIXEL_MAP_S_TO_S_SIZE:
9654+ params[0] = (GLfloat)(ctx->Pixel.MapStoSsize);
9655+ break;
9656+ case GL_POINT_SIZE:
9657+ params[0] = ctx->Point.Size;
9658+ break;
9659+ case GL_POINT_SIZE_GRANULARITY:
9660+ params[0] = ctx->Const.PointSizeGranularity;
9661+ break;
9662+ case GL_POINT_SIZE_RANGE:
9663+ params[0] = ctx->Const.MinPointSizeAA;
9664+ params[1] = ctx->Const.MaxPointSizeAA;
9665+ break;
9666+ case GL_ALIASED_POINT_SIZE_RANGE:
9667+ params[0] = ctx->Const.MinPointSize;
9668+ params[1] = ctx->Const.MaxPointSize;
9669+ break;
9670+ case GL_POINT_SMOOTH:
9671+ params[0] = BOOLEAN_TO_FLOAT(ctx->Point.SmoothFlag);
9672+ break;
9673+ case GL_POINT_SMOOTH_HINT:
9674+ params[0] = ENUM_TO_FLOAT(ctx->Hint.PointSmooth);
9675+ break;
9676+ case GL_POINT_SIZE_MIN_EXT:
9677+ params[0] = ctx->Point.MinSize;
9678+ break;
9679+ case GL_POINT_SIZE_MAX_EXT:
9680+ params[0] = ctx->Point.MaxSize;
9681+ break;
9682+ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
9683+ params[0] = ctx->Point.Threshold;
9684+ break;
9685+ case GL_DISTANCE_ATTENUATION_EXT:
9686+ params[0] = ctx->Point.Params[0];
9687+ params[1] = ctx->Point.Params[1];
9688+ params[2] = ctx->Point.Params[2];
9689+ break;
9690+ case GL_POLYGON_MODE:
9691+ params[0] = ENUM_TO_FLOAT(ctx->Polygon.FrontMode);
9692+ params[1] = ENUM_TO_FLOAT(ctx->Polygon.BackMode);
9693+ break;
9694+ case GL_POLYGON_OFFSET_BIAS_EXT:
9695+ params[0] = ctx->Polygon.OffsetUnits;
9696+ break;
9697+ case GL_POLYGON_OFFSET_FACTOR:
9698+ params[0] = ctx->Polygon.OffsetFactor ;
9699+ break;
9700+ case GL_POLYGON_OFFSET_UNITS:
9701+ params[0] = ctx->Polygon.OffsetUnits ;
9702+ break;
9703+ case GL_POLYGON_SMOOTH:
9704+ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.SmoothFlag);
9705+ break;
9706+ case GL_POLYGON_SMOOTH_HINT:
9707+ params[0] = ENUM_TO_FLOAT(ctx->Hint.PolygonSmooth);
9708+ break;
9709+ case GL_POLYGON_STIPPLE:
9710+ params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.StippleFlag);
9711+ break;
9712+ case GL_PROJECTION_MATRIX:
9713+ {
9714+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
9715+ params[0] = matrix[0];
9716+ params[1] = matrix[1];
9717+ params[2] = matrix[2];
9718+ params[3] = matrix[3];
9719+ params[4] = matrix[4];
9720+ params[5] = matrix[5];
9721+ params[6] = matrix[6];
9722+ params[7] = matrix[7];
9723+ params[8] = matrix[8];
9724+ params[9] = matrix[9];
9725+ params[10] = matrix[10];
9726+ params[11] = matrix[11];
9727+ params[12] = matrix[12];
9728+ params[13] = matrix[13];
9729+ params[14] = matrix[14];
9730+ params[15] = matrix[15];
9731+ }
9732+ break;
9733+ case GL_PROJECTION_STACK_DEPTH:
9734+ params[0] = (GLfloat)(ctx->ProjectionMatrixStack.Depth + 1);
9735+ break;
9736+ case GL_READ_BUFFER:
9737+ params[0] = ENUM_TO_FLOAT(ctx->ReadBuffer->ColorReadBuffer);
9738+ break;
9739+ case GL_RED_BIAS:
9740+ params[0] = ctx->Pixel.RedBias;
9741+ break;
9742+ case GL_RED_BITS:
9743+ params[0] = (GLfloat)( ctx->DrawBuffer->Visual.redBits );
9744+ break;
9745+ case GL_RED_SCALE:
9746+ params[0] = ctx->Pixel.RedScale;
9747+ break;
9748+ case GL_RENDER_MODE:
9749+ params[0] = ENUM_TO_FLOAT(ctx->RenderMode);
9750+ break;
9751+ case GL_RESCALE_NORMAL:
9752+ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.RescaleNormals);
9753+ break;
9754+ case GL_RGBA_MODE:
9755+ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.rgbMode);
9756+ break;
9757+ case GL_SCISSOR_BOX:
9758+ params[0] = (GLfloat)(ctx->Scissor.X);
9759+ params[1] = (GLfloat)(ctx->Scissor.Y);
9760+ params[2] = (GLfloat)(ctx->Scissor.Width);
9761+ params[3] = (GLfloat)(ctx->Scissor.Height);
9762+ break;
9763+ case GL_SCISSOR_TEST:
9764+ params[0] = BOOLEAN_TO_FLOAT(ctx->Scissor.Enabled);
9765+ break;
9766+ case GL_SELECTION_BUFFER_SIZE:
9767+ params[0] = (GLfloat)(ctx->Select.BufferSize);
9768+ break;
9769+ case GL_SHADE_MODEL:
9770+ params[0] = ENUM_TO_FLOAT(ctx->Light.ShadeModel);
9771+ break;
9772+ case GL_SHARED_TEXTURE_PALETTE_EXT:
9773+ params[0] = BOOLEAN_TO_FLOAT(ctx->Texture.SharedPalette);
9774+ break;
9775+ case GL_STENCIL_BITS:
9776+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.stencilBits);
9777+ break;
9778+ case GL_STENCIL_CLEAR_VALUE:
9779+ params[0] = (GLfloat)(ctx->Stencil.Clear);
9780+ break;
9781+ case GL_STENCIL_FAIL:
9782+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
9783+ break;
9784+ case GL_STENCIL_FUNC:
9785+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
9786+ break;
9787+ case GL_STENCIL_PASS_DEPTH_FAIL:
9788+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
9789+ break;
9790+ case GL_STENCIL_PASS_DEPTH_PASS:
9791+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
9792+ break;
9793+ case GL_STENCIL_REF:
9794+ params[0] = (GLfloat)(ctx->Stencil.Ref[ctx->Stencil.ActiveFace]);
9795+ break;
9796+ case GL_STENCIL_TEST:
9797+ params[0] = BOOLEAN_TO_FLOAT(ctx->Stencil.Enabled);
9798+ break;
9799+ case GL_STENCIL_VALUE_MASK:
9800+ params[0] = (GLfloat)(ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]);
9801+ break;
9802+ case GL_STENCIL_WRITEMASK:
9803+ params[0] = (GLfloat)(ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]);
9804+ break;
9805+ case GL_STEREO:
9806+ params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.stereoMode);
9807+ break;
9808+ case GL_SUBPIXEL_BITS:
9809+ params[0] = (GLfloat)(ctx->Const.SubPixelBits);
9810+ break;
9811+ case GL_TEXTURE_1D:
9812+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_1D));
9813+ break;
9814+ case GL_TEXTURE_2D:
9815+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_2D));
9816+ break;
9817+ case GL_TEXTURE_3D:
9818+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_3D));
9819+ break;
9820+ case GL_TEXTURE_BINDING_1D:
9821+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name);
9822+ break;
9823+ case GL_TEXTURE_BINDING_2D:
9824+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name);
9825+ break;
9826+ case GL_TEXTURE_BINDING_3D:
9827+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name);
9828+ break;
9829+ case GL_TEXTURE_ENV_COLOR:
9830+ {
9831+ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
9832+ params[0] = color[0];
9833+ params[1] = color[1];
9834+ params[2] = color[2];
9835+ params[3] = color[3];
9836+ }
9837+ break;
9838+ case GL_TEXTURE_ENV_MODE:
9839+ params[0] = ENUM_TO_FLOAT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
9840+ break;
9841+ case GL_TEXTURE_GEN_S:
9842+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
9843+ break;
9844+ case GL_TEXTURE_GEN_T:
9845+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0));
9846+ break;
9847+ case GL_TEXTURE_GEN_R:
9848+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0));
9849+ break;
9850+ case GL_TEXTURE_GEN_Q:
9851+ params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0));
9852+ break;
9853+ case GL_TEXTURE_MATRIX:
9854+ {
9855+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
9856+ params[0] = matrix[0];
9857+ params[1] = matrix[1];
9858+ params[2] = matrix[2];
9859+ params[3] = matrix[3];
9860+ params[4] = matrix[4];
9861+ params[5] = matrix[5];
9862+ params[6] = matrix[6];
9863+ params[7] = matrix[7];
9864+ params[8] = matrix[8];
9865+ params[9] = matrix[9];
9866+ params[10] = matrix[10];
9867+ params[11] = matrix[11];
9868+ params[12] = matrix[12];
9869+ params[13] = matrix[13];
9870+ params[14] = matrix[14];
9871+ params[15] = matrix[15];
9872+ }
9873+ break;
9874+ case GL_TEXTURE_STACK_DEPTH:
9875+ params[0] = (GLfloat)(ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1);
9876+ break;
9877+ case GL_UNPACK_ALIGNMENT:
9878+ params[0] = (GLfloat)(ctx->Unpack.Alignment);
9879+ break;
9880+ case GL_UNPACK_LSB_FIRST:
9881+ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.LsbFirst);
9882+ break;
9883+ case GL_UNPACK_ROW_LENGTH:
9884+ params[0] = (GLfloat)(ctx->Unpack.RowLength);
9885+ break;
9886+ case GL_UNPACK_SKIP_PIXELS:
9887+ params[0] = (GLfloat)(ctx->Unpack.SkipPixels);
9888+ break;
9889+ case GL_UNPACK_SKIP_ROWS:
9890+ params[0] = (GLfloat)(ctx->Unpack.SkipRows);
9891+ break;
9892+ case GL_UNPACK_SWAP_BYTES:
9893+ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.SwapBytes);
9894+ break;
9895+ case GL_UNPACK_SKIP_IMAGES_EXT:
9896+ params[0] = (GLfloat)(ctx->Unpack.SkipImages);
9897+ break;
9898+ case GL_UNPACK_IMAGE_HEIGHT_EXT:
9899+ params[0] = (GLfloat)(ctx->Unpack.ImageHeight);
9900+ break;
9901+ case GL_UNPACK_CLIENT_STORAGE_APPLE:
9902+ params[0] = BOOLEAN_TO_FLOAT(ctx->Unpack.ClientStorage);
9903+ break;
9904+ case GL_VIEWPORT:
9905+ params[0] = (GLfloat)(ctx->Viewport.X);
9906+ params[1] = (GLfloat)(ctx->Viewport.Y);
9907+ params[2] = (GLfloat)(ctx->Viewport.Width);
9908+ params[3] = (GLfloat)(ctx->Viewport.Height);
9909+ break;
9910+ case GL_ZOOM_X:
9911+ params[0] = ctx->Pixel.ZoomX;
9912+ break;
9913+ case GL_ZOOM_Y:
9914+ params[0] = ctx->Pixel.ZoomY;
9915+ break;
9916+ case GL_VERTEX_ARRAY:
9917+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Vertex.Enabled);
9918+ break;
9919+ case GL_VERTEX_ARRAY_SIZE:
9920+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.Size);
9921+ break;
9922+ case GL_VERTEX_ARRAY_TYPE:
9923+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Vertex.Type);
9924+ break;
9925+ case GL_VERTEX_ARRAY_STRIDE:
9926+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.Stride);
9927+ break;
9928+ case GL_VERTEX_ARRAY_COUNT_EXT:
9929+ params[0] = (GLfloat)(0);
9930+ break;
9931+ case GL_NORMAL_ARRAY:
9932+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Normal.Enabled);
9933+ break;
9934+ case GL_NORMAL_ARRAY_TYPE:
9935+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Normal.Type);
9936+ break;
9937+ case GL_NORMAL_ARRAY_STRIDE:
9938+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Normal.Stride);
9939+ break;
9940+ case GL_NORMAL_ARRAY_COUNT_EXT:
9941+ params[0] = (GLfloat)(0);
9942+ break;
9943+ case GL_COLOR_ARRAY:
9944+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Color.Enabled);
9945+ break;
9946+ case GL_COLOR_ARRAY_SIZE:
9947+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.Size);
9948+ break;
9949+ case GL_COLOR_ARRAY_TYPE:
9950+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Color.Type);
9951+ break;
9952+ case GL_COLOR_ARRAY_STRIDE:
9953+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.Stride);
9954+ break;
9955+ case GL_COLOR_ARRAY_COUNT_EXT:
9956+ params[0] = (GLfloat)(0);
9957+ break;
9958+ case GL_INDEX_ARRAY:
9959+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->Index.Enabled);
9960+ break;
9961+ case GL_INDEX_ARRAY_TYPE:
9962+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->Index.Type);
9963+ break;
9964+ case GL_INDEX_ARRAY_STRIDE:
9965+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Index.Stride);
9966+ break;
9967+ case GL_INDEX_ARRAY_COUNT_EXT:
9968+ params[0] = (GLfloat)(0);
9969+ break;
9970+ case GL_TEXTURE_COORD_ARRAY:
9971+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
9972+ break;
9973+ case GL_TEXTURE_COORD_ARRAY_SIZE:
9974+ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
9975+ break;
9976+ case GL_TEXTURE_COORD_ARRAY_TYPE:
9977+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
9978+ break;
9979+ case GL_TEXTURE_COORD_ARRAY_STRIDE:
9980+ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
9981+ break;
9982+ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
9983+ params[0] = (GLfloat)(0);
9984+ break;
9985+ case GL_EDGE_FLAG_ARRAY:
9986+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->EdgeFlag.Enabled);
9987+ break;
9988+ case GL_EDGE_FLAG_ARRAY_STRIDE:
9989+ params[0] = (GLfloat)(ctx->Array.ArrayObj->EdgeFlag.Stride);
9990+ break;
9991+ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
9992+ params[0] = (GLfloat)(0);
9993+ break;
9994+ case GL_MAX_TEXTURE_UNITS_ARB:
9995+ CHECK_EXT1(ARB_multitexture, "GetFloatv");
9996+ params[0] = (GLfloat)(ctx->Const.MaxTextureUnits);
9997+ break;
9998+ case GL_ACTIVE_TEXTURE_ARB:
9999+ CHECK_EXT1(ARB_multitexture, "GetFloatv");
10000+ params[0] = (GLfloat)(GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit);
10001+ break;
10002+ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
10003+ CHECK_EXT1(ARB_multitexture, "GetFloatv");
10004+ params[0] = (GLfloat)(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
10005+ break;
10006+ case GL_TEXTURE_CUBE_MAP_ARB:
10007+ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
10008+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB));
10009+ break;
10010+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
10011+ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
10012+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name);
10013+ break;
10014+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
10015+ CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
10016+ params[0] = (GLfloat)((1 << (ctx->Const.MaxCubeTextureLevels - 1)));
10017+ break;
10018+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
10019+ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
10020+ params[0] = (GLfloat)(ctx->Hint.TextureCompression);
10021+ break;
10022+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
10023+ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
10024+ params[0] = (GLfloat)(_mesa_get_compressed_formats(ctx, NULL, GL_FALSE));
10025+ break;
10026+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
10027+ CHECK_EXT1(ARB_texture_compression, "GetFloatv");
10028+ {
10029+ GLint formats[100];
10030+ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
10031+ ASSERT(n <= 100);
10032+ for (i = 0; i < n; i++)
10033+ params[i] = ENUM_TO_INT(formats[i]);
10034+ }
10035+ break;
10036+ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
10037+ CHECK_EXT1(EXT_compiled_vertex_array, "GetFloatv");
10038+ params[0] = (GLfloat)(ctx->Array.LockFirst);
10039+ break;
10040+ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
10041+ CHECK_EXT1(EXT_compiled_vertex_array, "GetFloatv");
10042+ params[0] = (GLfloat)(ctx->Array.LockCount);
10043+ break;
10044+ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
10045+ {
10046+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
10047+ params[0] = matrix[0];
10048+ params[1] = matrix[4];
10049+ params[2] = matrix[8];
10050+ params[3] = matrix[12];
10051+ params[4] = matrix[1];
10052+ params[5] = matrix[5];
10053+ params[6] = matrix[9];
10054+ params[7] = matrix[13];
10055+ params[8] = matrix[2];
10056+ params[9] = matrix[6];
10057+ params[10] = matrix[10];
10058+ params[11] = matrix[14];
10059+ params[12] = matrix[3];
10060+ params[13] = matrix[7];
10061+ params[14] = matrix[11];
10062+ params[15] = matrix[15];
10063+ }
10064+ break;
10065+ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
10066+ {
10067+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
10068+ params[0] = matrix[0];
10069+ params[1] = matrix[4];
10070+ params[2] = matrix[8];
10071+ params[3] = matrix[12];
10072+ params[4] = matrix[1];
10073+ params[5] = matrix[5];
10074+ params[6] = matrix[9];
10075+ params[7] = matrix[13];
10076+ params[8] = matrix[2];
10077+ params[9] = matrix[6];
10078+ params[10] = matrix[10];
10079+ params[11] = matrix[14];
10080+ params[12] = matrix[3];
10081+ params[13] = matrix[7];
10082+ params[14] = matrix[11];
10083+ params[15] = matrix[15];
10084+ }
10085+ break;
10086+ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
10087+ {
10088+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
10089+ params[0] = matrix[0];
10090+ params[1] = matrix[4];
10091+ params[2] = matrix[8];
10092+ params[3] = matrix[12];
10093+ params[4] = matrix[1];
10094+ params[5] = matrix[5];
10095+ params[6] = matrix[9];
10096+ params[7] = matrix[13];
10097+ params[8] = matrix[2];
10098+ params[9] = matrix[6];
10099+ params[10] = matrix[10];
10100+ params[11] = matrix[14];
10101+ params[12] = matrix[3];
10102+ params[13] = matrix[7];
10103+ params[14] = matrix[11];
10104+ params[15] = matrix[15];
10105+ }
10106+ break;
10107+ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
10108+ {
10109+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
10110+ params[0] = matrix[0];
10111+ params[1] = matrix[4];
10112+ params[2] = matrix[8];
10113+ params[3] = matrix[12];
10114+ params[4] = matrix[1];
10115+ params[5] = matrix[5];
10116+ params[6] = matrix[9];
10117+ params[7] = matrix[13];
10118+ params[8] = matrix[2];
10119+ params[9] = matrix[6];
10120+ params[10] = matrix[10];
10121+ params[11] = matrix[14];
10122+ params[12] = matrix[3];
10123+ params[13] = matrix[7];
10124+ params[14] = matrix[11];
10125+ params[15] = matrix[15];
10126+ }
10127+ break;
10128+ case GL_COLOR_MATRIX_SGI:
10129+ {
10130+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
10131+ params[0] = matrix[0];
10132+ params[1] = matrix[1];
10133+ params[2] = matrix[2];
10134+ params[3] = matrix[3];
10135+ params[4] = matrix[4];
10136+ params[5] = matrix[5];
10137+ params[6] = matrix[6];
10138+ params[7] = matrix[7];
10139+ params[8] = matrix[8];
10140+ params[9] = matrix[9];
10141+ params[10] = matrix[10];
10142+ params[11] = matrix[11];
10143+ params[12] = matrix[12];
10144+ params[13] = matrix[13];
10145+ params[14] = matrix[14];
10146+ params[15] = matrix[15];
10147+ }
10148+ break;
10149+ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
10150+ params[0] = (GLfloat)(ctx->ColorMatrixStack.Depth + 1);
10151+ break;
10152+ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
10153+ params[0] = (GLfloat)(MAX_COLOR_STACK_DEPTH);
10154+ break;
10155+ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
10156+ params[0] = ctx->Pixel.PostColorMatrixScale[0];
10157+ break;
10158+ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
10159+ params[0] = ctx->Pixel.PostColorMatrixScale[1];
10160+ break;
10161+ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
10162+ params[0] = ctx->Pixel.PostColorMatrixScale[2];
10163+ break;
10164+ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
10165+ params[0] = ctx->Pixel.PostColorMatrixScale[3];
10166+ break;
10167+ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
10168+ params[0] = ctx->Pixel.PostColorMatrixBias[0];
10169+ break;
10170+ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
10171+ params[0] = ctx->Pixel.PostColorMatrixBias[1];
10172+ break;
10173+ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
10174+ params[0] = ctx->Pixel.PostColorMatrixBias[2];
10175+ break;
10176+ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
10177+ params[0] = ctx->Pixel.PostColorMatrixBias[3];
10178+ break;
10179+ case GL_CONVOLUTION_1D_EXT:
10180+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10181+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Convolution1DEnabled);
10182+ break;
10183+ case GL_CONVOLUTION_2D_EXT:
10184+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10185+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Convolution2DEnabled);
10186+ break;
10187+ case GL_SEPARABLE_2D_EXT:
10188+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10189+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.Separable2DEnabled);
10190+ break;
10191+ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
10192+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10193+ params[0] = ctx->Pixel.PostConvolutionScale[0];
10194+ break;
10195+ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
10196+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10197+ params[0] = ctx->Pixel.PostConvolutionScale[1];
10198+ break;
10199+ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
10200+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10201+ params[0] = ctx->Pixel.PostConvolutionScale[2];
10202+ break;
10203+ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
10204+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10205+ params[0] = ctx->Pixel.PostConvolutionScale[3];
10206+ break;
10207+ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
10208+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10209+ params[0] = ctx->Pixel.PostConvolutionBias[0];
10210+ break;
10211+ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
10212+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10213+ params[0] = ctx->Pixel.PostConvolutionBias[1];
10214+ break;
10215+ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
10216+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10217+ params[0] = ctx->Pixel.PostConvolutionBias[2];
10218+ break;
10219+ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
10220+ CHECK_EXT1(EXT_convolution, "GetFloatv");
10221+ params[0] = ctx->Pixel.PostConvolutionBias[3];
10222+ break;
10223+ case GL_HISTOGRAM:
10224+ CHECK_EXT1(EXT_histogram, "GetFloatv");
10225+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.HistogramEnabled);
10226+ break;
10227+ case GL_MINMAX:
10228+ CHECK_EXT1(EXT_histogram, "GetFloatv");
10229+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.MinMaxEnabled);
10230+ break;
10231+ case GL_COLOR_TABLE_SGI:
10232+ CHECK_EXT1(SGI_color_table, "GetFloatv");
10233+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.ColorTableEnabled);
10234+ break;
10235+ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
10236+ CHECK_EXT1(SGI_color_table, "GetFloatv");
10237+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.PostConvolutionColorTableEnabled);
10238+ break;
10239+ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
10240+ CHECK_EXT1(SGI_color_table, "GetFloatv");
10241+ params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.PostColorMatrixColorTableEnabled);
10242+ break;
10243+ case GL_TEXTURE_COLOR_TABLE_SGI:
10244+ CHECK_EXT1(SGI_texture_color_table, "GetFloatv");
10245+ params[0] = BOOLEAN_TO_FLOAT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled);
10246+ break;
10247+ case GL_COLOR_SUM_EXT:
10248+ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetFloatv");
10249+ params[0] = BOOLEAN_TO_FLOAT(ctx->Fog.ColorSumEnabled);
10250+ break;
10251+ case GL_CURRENT_SECONDARY_COLOR_EXT:
10252+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10253+ {
10254+ FLUSH_CURRENT(ctx, 0);
10255+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0];
10256+ params[1] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1];
10257+ params[2] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2];
10258+ params[3] = ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3];
10259+ }
10260+ break;
10261+ case GL_SECONDARY_COLOR_ARRAY_EXT:
10262+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10263+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->SecondaryColor.Enabled);
10264+ break;
10265+ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
10266+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10267+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->SecondaryColor.Type);
10268+ break;
10269+ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
10270+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10271+ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.Stride);
10272+ break;
10273+ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
10274+ CHECK_EXT1(EXT_secondary_color, "GetFloatv");
10275+ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.Size);
10276+ break;
10277+ case GL_CURRENT_FOG_COORDINATE_EXT:
10278+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10279+ {
10280+ FLUSH_CURRENT(ctx, 0);
10281+ params[0] = ctx->Current.Attrib[VERT_ATTRIB_FOG][0];
10282+ }
10283+ break;
10284+ case GL_FOG_COORDINATE_ARRAY_EXT:
10285+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10286+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->FogCoord.Enabled);
10287+ break;
10288+ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
10289+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10290+ params[0] = ENUM_TO_FLOAT(ctx->Array.ArrayObj->FogCoord.Type);
10291+ break;
10292+ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
10293+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10294+ params[0] = (GLfloat)(ctx->Array.ArrayObj->FogCoord.Stride);
10295+ break;
10296+ case GL_FOG_COORDINATE_SOURCE_EXT:
10297+ CHECK_EXT1(EXT_fog_coord, "GetFloatv");
10298+ params[0] = ENUM_TO_FLOAT(ctx->Fog.FogCoordinateSource);
10299+ break;
10300+ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
10301+ CHECK_EXT1(EXT_texture_lod_bias, "GetFloatv");
10302+ params[0] = ctx->Const.MaxTextureLodBias;
10303+ break;
10304+ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
10305+ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetFloatv");
10306+ params[0] = ctx->Const.MaxTextureMaxAnisotropy;
10307+ break;
10308+ case GL_MULTISAMPLE_ARB:
10309+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10310+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.Enabled);
10311+ break;
10312+ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
10313+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10314+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleAlphaToCoverage);
10315+ break;
10316+ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
10317+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10318+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleAlphaToOne);
10319+ break;
10320+ case GL_SAMPLE_COVERAGE_ARB:
10321+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10322+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleCoverage);
10323+ break;
10324+ case GL_SAMPLE_COVERAGE_VALUE_ARB:
10325+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10326+ params[0] = ctx->Multisample.SampleCoverageValue;
10327+ break;
10328+ case GL_SAMPLE_COVERAGE_INVERT_ARB:
10329+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10330+ params[0] = BOOLEAN_TO_FLOAT(ctx->Multisample.SampleCoverageInvert);
10331+ break;
10332+ case GL_SAMPLE_BUFFERS_ARB:
10333+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10334+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.sampleBuffers);
10335+ break;
10336+ case GL_SAMPLES_ARB:
10337+ CHECK_EXT1(ARB_multisample, "GetFloatv");
10338+ params[0] = (GLfloat)(ctx->DrawBuffer->Visual.samples);
10339+ break;
10340+ case GL_RASTER_POSITION_UNCLIPPED_IBM:
10341+ CHECK_EXT1(IBM_rasterpos_clip, "GetFloatv");
10342+ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.RasterPositionUnclipped);
10343+ break;
10344+ case GL_POINT_SPRITE_NV:
10345+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetFloatv");
10346+ params[0] = BOOLEAN_TO_FLOAT(ctx->Point.PointSprite);
10347+ break;
10348+ case GL_POINT_SPRITE_R_MODE_NV:
10349+ CHECK_EXT1(NV_point_sprite, "GetFloatv");
10350+ params[0] = ENUM_TO_FLOAT(ctx->Point.SpriteRMode);
10351+ break;
10352+ case GL_POINT_SPRITE_COORD_ORIGIN:
10353+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetFloatv");
10354+ params[0] = ENUM_TO_FLOAT(ctx->Point.SpriteOrigin);
10355+ break;
10356+ case GL_GENERATE_MIPMAP_HINT_SGIS:
10357+ CHECK_EXT1(SGIS_generate_mipmap, "GetFloatv");
10358+ params[0] = ENUM_TO_FLOAT(ctx->Hint.GenerateMipmap);
10359+ break;
10360+ case GL_VERTEX_PROGRAM_BINDING_NV:
10361+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10362+ params[0] = (GLfloat)((ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0));
10363+ break;
10364+ case GL_VERTEX_ATTRIB_ARRAY0_NV:
10365+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10366+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[0].Enabled);
10367+ break;
10368+ case GL_VERTEX_ATTRIB_ARRAY1_NV:
10369+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10370+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[1].Enabled);
10371+ break;
10372+ case GL_VERTEX_ATTRIB_ARRAY2_NV:
10373+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10374+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[2].Enabled);
10375+ break;
10376+ case GL_VERTEX_ATTRIB_ARRAY3_NV:
10377+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10378+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[3].Enabled);
10379+ break;
10380+ case GL_VERTEX_ATTRIB_ARRAY4_NV:
10381+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10382+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[4].Enabled);
10383+ break;
10384+ case GL_VERTEX_ATTRIB_ARRAY5_NV:
10385+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10386+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[5].Enabled);
10387+ break;
10388+ case GL_VERTEX_ATTRIB_ARRAY6_NV:
10389+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10390+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[6].Enabled);
10391+ break;
10392+ case GL_VERTEX_ATTRIB_ARRAY7_NV:
10393+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10394+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[7].Enabled);
10395+ break;
10396+ case GL_VERTEX_ATTRIB_ARRAY8_NV:
10397+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10398+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[8].Enabled);
10399+ break;
10400+ case GL_VERTEX_ATTRIB_ARRAY9_NV:
10401+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10402+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[9].Enabled);
10403+ break;
10404+ case GL_VERTEX_ATTRIB_ARRAY10_NV:
10405+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10406+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[10].Enabled);
10407+ break;
10408+ case GL_VERTEX_ATTRIB_ARRAY11_NV:
10409+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10410+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[11].Enabled);
10411+ break;
10412+ case GL_VERTEX_ATTRIB_ARRAY12_NV:
10413+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10414+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[12].Enabled);
10415+ break;
10416+ case GL_VERTEX_ATTRIB_ARRAY13_NV:
10417+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10418+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[13].Enabled);
10419+ break;
10420+ case GL_VERTEX_ATTRIB_ARRAY14_NV:
10421+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10422+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[14].Enabled);
10423+ break;
10424+ case GL_VERTEX_ATTRIB_ARRAY15_NV:
10425+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10426+ params[0] = BOOLEAN_TO_FLOAT(ctx->Array.ArrayObj->VertexAttrib[15].Enabled);
10427+ break;
10428+ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
10429+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10430+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[0]);
10431+ break;
10432+ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
10433+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10434+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[1]);
10435+ break;
10436+ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
10437+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10438+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[2]);
10439+ break;
10440+ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
10441+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10442+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[3]);
10443+ break;
10444+ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
10445+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10446+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[4]);
10447+ break;
10448+ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
10449+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10450+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[5]);
10451+ break;
10452+ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
10453+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10454+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[6]);
10455+ break;
10456+ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
10457+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10458+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[7]);
10459+ break;
10460+ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
10461+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10462+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[8]);
10463+ break;
10464+ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
10465+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10466+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[9]);
10467+ break;
10468+ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
10469+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10470+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[10]);
10471+ break;
10472+ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
10473+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10474+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[11]);
10475+ break;
10476+ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
10477+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10478+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[12]);
10479+ break;
10480+ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
10481+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10482+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[13]);
10483+ break;
10484+ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
10485+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10486+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[14]);
10487+ break;
10488+ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
10489+ CHECK_EXT1(NV_vertex_program, "GetFloatv");
10490+ params[0] = BOOLEAN_TO_FLOAT(ctx->Eval.Map1Attrib[15]);
10491+ break;
10492+ case GL_FRAGMENT_PROGRAM_NV:
10493+ CHECK_EXT1(NV_fragment_program, "GetFloatv");
10494+ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.Enabled);
10495+ break;
10496+ case GL_FRAGMENT_PROGRAM_BINDING_NV:
10497+ CHECK_EXT1(NV_fragment_program, "GetFloatv");
10498+ params[0] = (GLfloat)(ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0);
10499+ break;
10500+ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
10501+ CHECK_EXT1(NV_fragment_program, "GetFloatv");
10502+ params[0] = (GLfloat)(MAX_NV_FRAGMENT_PROGRAM_PARAMS);
10503+ break;
10504+ case GL_TEXTURE_RECTANGLE_NV:
10505+ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
10506+ params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV));
10507+ break;
10508+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
10509+ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
10510+ params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name);
10511+ break;
10512+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
10513+ CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
10514+ params[0] = (GLfloat)(ctx->Const.MaxTextureRectSize);
10515+ break;
10516+ case GL_STENCIL_TEST_TWO_SIDE_EXT:
10517+ CHECK_EXT1(EXT_stencil_two_side, "GetFloatv");
10518+ params[0] = BOOLEAN_TO_FLOAT(ctx->Stencil.TestTwoSide);
10519+ break;
10520+ case GL_ACTIVE_STENCIL_FACE_EXT:
10521+ CHECK_EXT1(EXT_stencil_two_side, "GetFloatv");
10522+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
10523+ break;
10524+ case GL_MAX_SHININESS_NV:
10525+ CHECK_EXT1(NV_light_max_exponent, "GetFloatv");
10526+ params[0] = ctx->Const.MaxShininess;
10527+ break;
10528+ case GL_MAX_SPOT_EXPONENT_NV:
10529+ CHECK_EXT1(NV_light_max_exponent, "GetFloatv");
10530+ params[0] = ctx->Const.MaxSpotExponent;
10531+ break;
10532+ case GL_ARRAY_BUFFER_BINDING_ARB:
10533+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10534+ params[0] = (GLfloat)(ctx->Array.ArrayBufferObj->Name);
10535+ break;
10536+ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
10537+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10538+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
10539+ break;
10540+ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
10541+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10542+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Normal.BufferObj->Name);
10543+ break;
10544+ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
10545+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10546+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Color.BufferObj->Name);
10547+ break;
10548+ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
10549+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10550+ params[0] = (GLfloat)(ctx->Array.ArrayObj->Index.BufferObj->Name);
10551+ break;
10552+ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
10553+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10554+ params[0] = (GLfloat)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
10555+ break;
10556+ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
10557+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10558+ params[0] = (GLfloat)(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
10559+ break;
10560+ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
10561+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10562+ params[0] = (GLfloat)(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
10563+ break;
10564+ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
10565+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10566+ params[0] = (GLfloat)(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
10567+ break;
10568+ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
10569+ CHECK_EXT1(ARB_vertex_buffer_object, "GetFloatv");
10570+ params[0] = (GLfloat)(ctx->Array.ElementArrayBufferObj->Name);
10571+ break;
10572+ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
10573+ CHECK_EXT1(EXT_pixel_buffer_object, "GetFloatv");
10574+ params[0] = (GLfloat)(ctx->Pack.BufferObj->Name);
10575+ break;
10576+ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
10577+ CHECK_EXT1(EXT_pixel_buffer_object, "GetFloatv");
10578+ params[0] = (GLfloat)(ctx->Unpack.BufferObj->Name);
10579+ break;
10580+ case GL_VERTEX_PROGRAM_ARB:
10581+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
10582+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.Enabled);
10583+ break;
10584+ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
10585+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
10586+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.PointSizeEnabled);
10587+ break;
10588+ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
10589+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetFloatv");
10590+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.TwoSideEnabled);
10591+ break;
10592+ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
10593+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
10594+ params[0] = (GLfloat)(ctx->Const.MaxProgramMatrixStackDepth);
10595+ break;
10596+ case GL_MAX_PROGRAM_MATRICES_ARB:
10597+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
10598+ params[0] = (GLfloat)(ctx->Const.MaxProgramMatrices);
10599+ break;
10600+ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
10601+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetFloatv");
10602+ params[0] = BOOLEAN_TO_FLOAT(ctx->CurrentStack->Depth + 1);
10603+ break;
10604+ case GL_CURRENT_MATRIX_ARB:
10605+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetFloatv");
10606+ {
10607+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
10608+ params[0] = matrix[0];
10609+ params[1] = matrix[1];
10610+ params[2] = matrix[2];
10611+ params[3] = matrix[3];
10612+ params[4] = matrix[4];
10613+ params[5] = matrix[5];
10614+ params[6] = matrix[6];
10615+ params[7] = matrix[7];
10616+ params[8] = matrix[8];
10617+ params[9] = matrix[9];
10618+ params[10] = matrix[10];
10619+ params[11] = matrix[11];
10620+ params[12] = matrix[12];
10621+ params[13] = matrix[13];
10622+ params[14] = matrix[14];
10623+ params[15] = matrix[15];
10624+ }
10625+ break;
10626+ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
10627+ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetFloatv");
10628+ {
10629+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
10630+ params[0] = matrix[0];
10631+ params[1] = matrix[4];
10632+ params[2] = matrix[8];
10633+ params[3] = matrix[12];
10634+ params[4] = matrix[1];
10635+ params[5] = matrix[5];
10636+ params[6] = matrix[9];
10637+ params[7] = matrix[13];
10638+ params[8] = matrix[2];
10639+ params[9] = matrix[6];
10640+ params[10] = matrix[10];
10641+ params[11] = matrix[14];
10642+ params[12] = matrix[3];
10643+ params[13] = matrix[7];
10644+ params[14] = matrix[11];
10645+ params[15] = matrix[15];
10646+ }
10647+ break;
10648+ case GL_MAX_VERTEX_ATTRIBS_ARB:
10649+ CHECK_EXT1(ARB_vertex_program, "GetFloatv");
10650+ params[0] = (GLfloat)(ctx->Const.VertexProgram.MaxAttribs);
10651+ break;
10652+ case GL_PROGRAM_ERROR_POSITION_ARB:
10653+ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetFloatv");
10654+ params[0] = (GLfloat)(ctx->Program.ErrorPos);
10655+ break;
10656+ case GL_FRAGMENT_PROGRAM_ARB:
10657+ CHECK_EXT1(ARB_fragment_program, "GetFloatv");
10658+ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.Enabled);
10659+ break;
10660+ case GL_MAX_TEXTURE_COORDS_ARB:
10661+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetFloatv");
10662+ params[0] = (GLfloat)(ctx->Const.MaxTextureCoordUnits);
10663+ break;
10664+ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
10665+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetFloatv");
10666+ params[0] = (GLfloat)(ctx->Const.MaxTextureImageUnits);
10667+ break;
10668+ case GL_DEPTH_BOUNDS_TEST_EXT:
10669+ CHECK_EXT1(EXT_depth_bounds_test, "GetFloatv");
10670+ params[0] = BOOLEAN_TO_FLOAT(ctx->Depth.BoundsTest);
10671+ break;
10672+ case GL_DEPTH_BOUNDS_EXT:
10673+ CHECK_EXT1(EXT_depth_bounds_test, "GetFloatv");
10674+ params[0] = ctx->Depth.BoundsMin;
10675+ params[1] = ctx->Depth.BoundsMax;
10676+ break;
10677+ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
10678+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10679+ params[0] = BOOLEAN_TO_FLOAT(ctx->FragmentProgram.CallbackEnabled);
10680+ break;
10681+ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
10682+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10683+ params[0] = BOOLEAN_TO_FLOAT(ctx->VertexProgram.CallbackEnabled);
10684+ break;
10685+ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
10686+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10687+ params[0] = (GLfloat)(ctx->FragmentProgram.CurrentPosition);
10688+ break;
10689+ case GL_VERTEX_PROGRAM_POSITION_MESA:
10690+ CHECK_EXT1(MESA_program_debug, "GetFloatv");
10691+ params[0] = (GLfloat)(ctx->VertexProgram.CurrentPosition);
10692+ break;
10693+ case GL_MAX_DRAW_BUFFERS_ARB:
10694+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10695+ params[0] = (GLfloat)(ctx->Const.MaxDrawBuffers);
10696+ break;
10697+ case GL_DRAW_BUFFER0_ARB:
10698+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10699+ params[0] = ENUM_TO_FLOAT(ctx->DrawBuffer->ColorDrawBuffer[0]);
10700+ break;
10701+ case GL_DRAW_BUFFER1_ARB:
10702+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10703+ {
10704+ GLenum buffer;
10705+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
10706+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
10707+ return;
10708+ }
10709+ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
10710+ params[0] = ENUM_TO_FLOAT(buffer);
10711+ }
10712+ break;
10713+ case GL_DRAW_BUFFER2_ARB:
10714+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10715+ {
10716+ GLenum buffer;
10717+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
10718+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
10719+ return;
10720+ }
10721+ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
10722+ params[0] = ENUM_TO_FLOAT(buffer);
10723+ }
10724+ break;
10725+ case GL_DRAW_BUFFER3_ARB:
10726+ CHECK_EXT1(ARB_draw_buffers, "GetFloatv");
10727+ {
10728+ GLenum buffer;
10729+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
10730+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
10731+ return;
10732+ }
10733+ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
10734+ params[0] = ENUM_TO_FLOAT(buffer);
10735+ }
10736+ break;
10737+ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
10738+ CHECK_EXT1(OES_read_format, "GetFloatv");
10739+ params[0] = (GLfloat)(ctx->Const.ColorReadType);
10740+ break;
10741+ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
10742+ CHECK_EXT1(OES_read_format, "GetFloatv");
10743+ params[0] = (GLfloat)(ctx->Const.ColorReadFormat);
10744+ break;
10745+ case GL_NUM_FRAGMENT_REGISTERS_ATI:
10746+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10747+ params[0] = (GLfloat)(6);
10748+ break;
10749+ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
10750+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10751+ params[0] = (GLfloat)(8);
10752+ break;
10753+ case GL_NUM_PASSES_ATI:
10754+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10755+ params[0] = (GLfloat)(2);
10756+ break;
10757+ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
10758+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10759+ params[0] = (GLfloat)(8);
10760+ break;
10761+ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
10762+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10763+ params[0] = (GLfloat)(16);
10764+ break;
10765+ case GL_COLOR_ALPHA_PAIRING_ATI:
10766+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10767+ params[0] = BOOLEAN_TO_FLOAT(GL_TRUE);
10768+ break;
10769+ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
10770+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10771+ params[0] = (GLfloat)(3);
10772+ break;
10773+ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
10774+ CHECK_EXT1(ATI_fragment_shader, "GetFloatv");
10775+ params[0] = (GLfloat)(3);
10776+ break;
10777+ case GL_STENCIL_BACK_FUNC:
10778+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.Function[1]);
10779+ break;
10780+ case GL_STENCIL_BACK_VALUE_MASK:
10781+ params[0] = (GLfloat)(ctx->Stencil.ValueMask[1]);
10782+ break;
10783+ case GL_STENCIL_BACK_REF:
10784+ params[0] = (GLfloat)(ctx->Stencil.Ref[1]);
10785+ break;
10786+ case GL_STENCIL_BACK_FAIL:
10787+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.FailFunc[1]);
10788+ break;
10789+ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
10790+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZFailFunc[1]);
10791+ break;
10792+ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
10793+ params[0] = ENUM_TO_FLOAT(ctx->Stencil.ZPassFunc[1]);
10794+ break;
10795+ case GL_FRAMEBUFFER_BINDING_EXT:
10796+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10797+ params[0] = (GLfloat)(ctx->DrawBuffer->Name);
10798+ break;
10799+ case GL_RENDERBUFFER_BINDING_EXT:
10800+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10801+ params[0] = (GLfloat)(ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0);
10802+ break;
10803+ case GL_MAX_COLOR_ATTACHMENTS_EXT:
10804+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10805+ params[0] = (GLfloat)(ctx->Const.MaxColorAttachments);
10806+ break;
10807+ case GL_MAX_RENDERBUFFER_SIZE_EXT:
10808+ CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
10809+ params[0] = (GLfloat)(ctx->Const.MaxRenderbufferSize);
10810+ break;
10811+ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
10812+ CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
10813+ params[0] = (GLfloat)(MAX_FRAGMENT_UNIFORM_COMPONENTS);
10814+ break;
10815+ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
10816+ CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
10817+ params[0] = ENUM_TO_FLOAT(ctx->Hint.FragmentShaderDerivative);
10818+ break;
10819+ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
10820+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10821+ params[0] = (GLfloat)(MAX_VERTEX_UNIFORM_COMPONENTS);
10822+ break;
10823+ case GL_MAX_VARYING_FLOATS_ARB:
10824+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10825+ params[0] = (GLfloat)(MAX_VARYING_FLOATS);
10826+ break;
10827+ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
10828+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10829+ params[0] = (GLfloat)(MAX_VERTEX_TEXTURE_IMAGE_UNITS);
10830+ break;
10831+ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
10832+ CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
10833+ params[0] = (GLfloat)(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
10834+ break;
10835+ default:
10836+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv(pname=0x%x)", pname);
10837+ }
10838+}
10839+
10840+void GLAPIENTRY
10841+_mesa_GetIntegerv( GLenum pname, GLint *params )
10842+{
10843+ GET_CURRENT_CONTEXT(ctx);
10844+ ASSERT_OUTSIDE_BEGIN_END(ctx);
10845+
10846+ if (!params)
10847+ return;
10848+
10849+ if (ctx->NewState)
10850+ _mesa_update_state(ctx);
10851+
10852+ if (ctx->Driver.GetIntegerv &&
10853+ ctx->Driver.GetIntegerv(ctx, pname, params))
10854+ return;
10855+
10856+ switch (pname) {
10857+ case GL_ACCUM_RED_BITS:
10858+ params[0] = ctx->DrawBuffer->Visual.accumRedBits;
10859+ break;
10860+ case GL_ACCUM_GREEN_BITS:
10861+ params[0] = ctx->DrawBuffer->Visual.accumGreenBits;
10862+ break;
10863+ case GL_ACCUM_BLUE_BITS:
10864+ params[0] = ctx->DrawBuffer->Visual.accumBlueBits;
10865+ break;
10866+ case GL_ACCUM_ALPHA_BITS:
10867+ params[0] = ctx->DrawBuffer->Visual.accumAlphaBits;
10868+ break;
10869+ case GL_ACCUM_CLEAR_VALUE:
10870+ params[0] = FLOAT_TO_INT(ctx->Accum.ClearColor[0]);
10871+ params[1] = FLOAT_TO_INT(ctx->Accum.ClearColor[1]);
10872+ params[2] = FLOAT_TO_INT(ctx->Accum.ClearColor[2]);
10873+ params[3] = FLOAT_TO_INT(ctx->Accum.ClearColor[3]);
10874+ break;
10875+ case GL_ALPHA_BIAS:
10876+ params[0] = IROUND(ctx->Pixel.AlphaBias);
10877+ break;
10878+ case GL_ALPHA_BITS:
10879+ params[0] = ctx->DrawBuffer->Visual.alphaBits;
10880+ break;
10881+ case GL_ALPHA_SCALE:
10882+ params[0] = IROUND(ctx->Pixel.AlphaScale);
10883+ break;
10884+ case GL_ALPHA_TEST:
10885+ params[0] = BOOLEAN_TO_INT(ctx->Color.AlphaEnabled);
10886+ break;
10887+ case GL_ALPHA_TEST_FUNC:
10888+ params[0] = ENUM_TO_INT(ctx->Color.AlphaFunc);
10889+ break;
10890+ case GL_ALPHA_TEST_REF:
10891+ params[0] = FLOAT_TO_INT(ctx->Color.AlphaRef);
10892+ break;
10893+ case GL_ATTRIB_STACK_DEPTH:
10894+ params[0] = ctx->AttribStackDepth;
10895+ break;
10896+ case GL_AUTO_NORMAL:
10897+ params[0] = BOOLEAN_TO_INT(ctx->Eval.AutoNormal);
10898+ break;
10899+ case GL_AUX_BUFFERS:
10900+ params[0] = ctx->DrawBuffer->Visual.numAuxBuffers;
10901+ break;
10902+ case GL_BLEND:
10903+ params[0] = BOOLEAN_TO_INT(ctx->Color.BlendEnabled);
10904+ break;
10905+ case GL_BLEND_DST:
10906+ params[0] = ENUM_TO_INT(ctx->Color.BlendDstRGB);
10907+ break;
10908+ case GL_BLEND_SRC:
10909+ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcRGB);
10910+ break;
10911+ case GL_BLEND_SRC_RGB_EXT:
10912+ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcRGB);
10913+ break;
10914+ case GL_BLEND_DST_RGB_EXT:
10915+ params[0] = ENUM_TO_INT(ctx->Color.BlendDstRGB);
10916+ break;
10917+ case GL_BLEND_SRC_ALPHA_EXT:
10918+ params[0] = ENUM_TO_INT(ctx->Color.BlendSrcA);
10919+ break;
10920+ case GL_BLEND_DST_ALPHA_EXT:
10921+ params[0] = ENUM_TO_INT(ctx->Color.BlendDstA);
10922+ break;
10923+ case GL_BLEND_EQUATION:
10924+ params[0] = ENUM_TO_INT(ctx->Color.BlendEquationRGB );
10925+ break;
10926+ case GL_BLEND_EQUATION_ALPHA_EXT:
10927+ params[0] = ENUM_TO_INT(ctx->Color.BlendEquationA );
10928+ break;
10929+ case GL_BLEND_COLOR_EXT:
10930+ params[0] = FLOAT_TO_INT(ctx->Color.BlendColor[0]);
10931+ params[1] = FLOAT_TO_INT(ctx->Color.BlendColor[1]);
10932+ params[2] = FLOAT_TO_INT(ctx->Color.BlendColor[2]);
10933+ params[3] = FLOAT_TO_INT(ctx->Color.BlendColor[3]);
10934+ break;
10935+ case GL_BLUE_BIAS:
10936+ params[0] = IROUND(ctx->Pixel.BlueBias);
10937+ break;
10938+ case GL_BLUE_BITS:
10939+ params[0] = ctx->DrawBuffer->Visual.blueBits;
10940+ break;
10941+ case GL_BLUE_SCALE:
10942+ params[0] = IROUND(ctx->Pixel.BlueScale);
10943+ break;
10944+ case GL_CLIENT_ATTRIB_STACK_DEPTH:
10945+ params[0] = ctx->ClientAttribStackDepth;
10946+ break;
10947+ case GL_CLIP_PLANE0:
10948+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 0) & 1);
10949+ break;
10950+ case GL_CLIP_PLANE1:
10951+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 1) & 1);
10952+ break;
10953+ case GL_CLIP_PLANE2:
10954+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 2) & 1);
10955+ break;
10956+ case GL_CLIP_PLANE3:
10957+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 3) & 1);
10958+ break;
10959+ case GL_CLIP_PLANE4:
10960+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 4) & 1);
10961+ break;
10962+ case GL_CLIP_PLANE5:
10963+ params[0] = BOOLEAN_TO_INT((ctx->Transform.ClipPlanesEnabled >> 5) & 1);
10964+ break;
10965+ case GL_COLOR_CLEAR_VALUE:
10966+ params[0] = FLOAT_TO_INT(ctx->Color.ClearColor[0]);
10967+ params[1] = FLOAT_TO_INT(ctx->Color.ClearColor[1]);
10968+ params[2] = FLOAT_TO_INT(ctx->Color.ClearColor[2]);
10969+ params[3] = FLOAT_TO_INT(ctx->Color.ClearColor[3]);
10970+ break;
10971+ case GL_COLOR_MATERIAL:
10972+ params[0] = BOOLEAN_TO_INT(ctx->Light.ColorMaterialEnabled);
10973+ break;
10974+ case GL_COLOR_MATERIAL_FACE:
10975+ params[0] = ENUM_TO_INT(ctx->Light.ColorMaterialFace);
10976+ break;
10977+ case GL_COLOR_MATERIAL_PARAMETER:
10978+ params[0] = ENUM_TO_INT(ctx->Light.ColorMaterialMode);
10979+ break;
10980+ case GL_COLOR_WRITEMASK:
10981+ params[0] = ctx->Color.ColorMask[RCOMP] ? 1 : 0;
10982+ params[1] = ctx->Color.ColorMask[GCOMP] ? 1 : 0;
10983+ params[2] = ctx->Color.ColorMask[BCOMP] ? 1 : 0;
10984+ params[3] = ctx->Color.ColorMask[ACOMP] ? 1 : 0;
10985+ break;
10986+ case GL_CULL_FACE:
10987+ params[0] = BOOLEAN_TO_INT(ctx->Polygon.CullFlag);
10988+ break;
10989+ case GL_CULL_FACE_MODE:
10990+ params[0] = ENUM_TO_INT(ctx->Polygon.CullFaceMode);
10991+ break;
10992+ case GL_CURRENT_COLOR:
10993+ {
10994+ FLUSH_CURRENT(ctx, 0);
10995+ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]);
10996+ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]);
10997+ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]);
10998+ params[3] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]);
10999+ }
11000+ break;
11001+ case GL_CURRENT_INDEX:
11002+ {
11003+ FLUSH_CURRENT(ctx, 0);
11004+ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]);
11005+ }
11006+ break;
11007+ case GL_CURRENT_NORMAL:
11008+ {
11009+ FLUSH_CURRENT(ctx, 0);
11010+ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]);
11011+ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]);
11012+ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]);
11013+ }
11014+ break;
11015+ case GL_CURRENT_RASTER_COLOR:
11016+ params[0] = FLOAT_TO_INT(ctx->Current.RasterColor[0]);
11017+ params[1] = FLOAT_TO_INT(ctx->Current.RasterColor[1]);
11018+ params[2] = FLOAT_TO_INT(ctx->Current.RasterColor[2]);
11019+ params[3] = FLOAT_TO_INT(ctx->Current.RasterColor[3]);
11020+ break;
11021+ case GL_CURRENT_RASTER_DISTANCE:
11022+ params[0] = IROUND(ctx->Current.RasterDistance);
11023+ break;
11024+ case GL_CURRENT_RASTER_INDEX:
11025+ params[0] = IROUND(ctx->Current.RasterIndex);
11026+ break;
11027+ case GL_CURRENT_RASTER_POSITION:
11028+ params[0] = IROUND(ctx->Current.RasterPos[0]);
11029+ params[1] = IROUND(ctx->Current.RasterPos[1]);
11030+ params[2] = IROUND(ctx->Current.RasterPos[2]);
11031+ params[3] = IROUND(ctx->Current.RasterPos[3]);
11032+ break;
11033+ case GL_CURRENT_RASTER_SECONDARY_COLOR:
11034+ params[0] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[0]);
11035+ params[1] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[1]);
11036+ params[2] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[2]);
11037+ params[3] = FLOAT_TO_INT(ctx->Current.RasterSecondaryColor[3]);
11038+ break;
11039+ case GL_CURRENT_RASTER_TEXTURE_COORDS:
11040+ {
11041+ const GLuint texUnit = ctx->Texture.CurrentUnit;
11042+ params[0] = IROUND(ctx->Current.RasterTexCoords[texUnit][0]);
11043+ params[1] = IROUND(ctx->Current.RasterTexCoords[texUnit][1]);
11044+ params[2] = IROUND(ctx->Current.RasterTexCoords[texUnit][2]);
11045+ params[3] = IROUND(ctx->Current.RasterTexCoords[texUnit][3]);
11046+ }
11047+ break;
11048+ case GL_CURRENT_RASTER_POSITION_VALID:
11049+ params[0] = BOOLEAN_TO_INT(ctx->Current.RasterPosValid);
11050+ break;
11051+ case GL_CURRENT_TEXTURE_COORDS:
11052+ {
11053+ const GLuint texUnit = ctx->Texture.CurrentUnit;
11054+ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]);
11055+ params[1] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]);
11056+ params[2] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]);
11057+ params[3] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]);
11058+ }
11059+ break;
11060+ case GL_DEPTH_BIAS:
11061+ params[0] = IROUND(ctx->Pixel.DepthBias);
11062+ break;
11063+ case GL_DEPTH_BITS:
11064+ params[0] = ctx->DrawBuffer->Visual.depthBits;
11065+ break;
11066+ case GL_DEPTH_CLEAR_VALUE:
11067+ params[0] = IROUND(ctx->Depth.Clear);
11068+ break;
11069+ case GL_DEPTH_FUNC:
11070+ params[0] = ENUM_TO_INT(ctx->Depth.Func);
11071+ break;
11072+ case GL_DEPTH_RANGE:
11073+ params[0] = FLOAT_TO_INT(ctx->Viewport.Near);
11074+ params[1] = FLOAT_TO_INT(ctx->Viewport.Far);
11075+ break;
11076+ case GL_DEPTH_SCALE:
11077+ params[0] = IROUND(ctx->Pixel.DepthScale);
11078+ break;
11079+ case GL_DEPTH_TEST:
11080+ params[0] = BOOLEAN_TO_INT(ctx->Depth.Test);
11081+ break;
11082+ case GL_DEPTH_WRITEMASK:
11083+ params[0] = BOOLEAN_TO_INT(ctx->Depth.Mask);
11084+ break;
11085+ case GL_DITHER:
11086+ params[0] = BOOLEAN_TO_INT(ctx->Color.DitherFlag);
11087+ break;
11088+ case GL_DOUBLEBUFFER:
11089+ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.doubleBufferMode);
11090+ break;
11091+ case GL_DRAW_BUFFER:
11092+ params[0] = ENUM_TO_INT(ctx->DrawBuffer->ColorDrawBuffer[0]);
11093+ break;
11094+ case GL_EDGE_FLAG:
11095+ {
11096+ FLUSH_CURRENT(ctx, 0);
11097+ params[0] = BOOLEAN_TO_INT(ctx->Current.EdgeFlag);
11098+ }
11099+ break;
11100+ case GL_FEEDBACK_BUFFER_SIZE:
11101+ params[0] = ctx->Feedback.BufferSize;
11102+ break;
11103+ case GL_FEEDBACK_BUFFER_TYPE:
11104+ params[0] = ENUM_TO_INT(ctx->Feedback.Type);
11105+ break;
11106+ case GL_FOG:
11107+ params[0] = BOOLEAN_TO_INT(ctx->Fog.Enabled);
11108+ break;
11109+ case GL_FOG_COLOR:
11110+ params[0] = FLOAT_TO_INT(ctx->Fog.Color[0]);
11111+ params[1] = FLOAT_TO_INT(ctx->Fog.Color[1]);
11112+ params[2] = FLOAT_TO_INT(ctx->Fog.Color[2]);
11113+ params[3] = FLOAT_TO_INT(ctx->Fog.Color[3]);
11114+ break;
11115+ case GL_FOG_DENSITY:
11116+ params[0] = IROUND(ctx->Fog.Density);
11117+ break;
11118+ case GL_FOG_END:
11119+ params[0] = IROUND(ctx->Fog.End);
11120+ break;
11121+ case GL_FOG_HINT:
11122+ params[0] = ENUM_TO_INT(ctx->Hint.Fog);
11123+ break;
11124+ case GL_FOG_INDEX:
11125+ params[0] = IROUND(ctx->Fog.Index);
11126+ break;
11127+ case GL_FOG_MODE:
11128+ params[0] = ENUM_TO_INT(ctx->Fog.Mode);
11129+ break;
11130+ case GL_FOG_START:
11131+ params[0] = IROUND(ctx->Fog.Start);
11132+ break;
11133+ case GL_FRONT_FACE:
11134+ params[0] = ENUM_TO_INT(ctx->Polygon.FrontFace);
11135+ break;
11136+ case GL_GREEN_BIAS:
11137+ params[0] = IROUND(ctx->Pixel.GreenBias);
11138+ break;
11139+ case GL_GREEN_BITS:
11140+ params[0] = ctx->DrawBuffer->Visual.greenBits;
11141+ break;
11142+ case GL_GREEN_SCALE:
11143+ params[0] = IROUND(ctx->Pixel.GreenScale);
11144+ break;
11145+ case GL_INDEX_BITS:
11146+ params[0] = ctx->DrawBuffer->Visual.indexBits;
11147+ break;
11148+ case GL_INDEX_CLEAR_VALUE:
11149+ params[0] = ctx->Color.ClearIndex;
11150+ break;
11151+ case GL_INDEX_MODE:
11152+ params[0] = BOOLEAN_TO_INT(!ctx->DrawBuffer->Visual.rgbMode);
11153+ break;
11154+ case GL_INDEX_OFFSET:
11155+ params[0] = ctx->Pixel.IndexOffset;
11156+ break;
11157+ case GL_INDEX_SHIFT:
11158+ params[0] = ctx->Pixel.IndexShift;
11159+ break;
11160+ case GL_INDEX_WRITEMASK:
11161+ params[0] = ctx->Color.IndexMask;
11162+ break;
11163+ case GL_LIGHT0:
11164+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[0].Enabled);
11165+ break;
11166+ case GL_LIGHT1:
11167+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[1].Enabled);
11168+ break;
11169+ case GL_LIGHT2:
11170+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[2].Enabled);
11171+ break;
11172+ case GL_LIGHT3:
11173+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[3].Enabled);
11174+ break;
11175+ case GL_LIGHT4:
11176+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[4].Enabled);
11177+ break;
11178+ case GL_LIGHT5:
11179+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[5].Enabled);
11180+ break;
11181+ case GL_LIGHT6:
11182+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[6].Enabled);
11183+ break;
11184+ case GL_LIGHT7:
11185+ params[0] = BOOLEAN_TO_INT(ctx->Light.Light[7].Enabled);
11186+ break;
11187+ case GL_LIGHTING:
11188+ params[0] = BOOLEAN_TO_INT(ctx->Light.Enabled);
11189+ break;
11190+ case GL_LIGHT_MODEL_AMBIENT:
11191+ params[0] = FLOAT_TO_INT(ctx->Light.Model.Ambient[0]);
11192+ params[1] = FLOAT_TO_INT(ctx->Light.Model.Ambient[1]);
11193+ params[2] = FLOAT_TO_INT(ctx->Light.Model.Ambient[2]);
11194+ params[3] = FLOAT_TO_INT(ctx->Light.Model.Ambient[3]);
11195+ break;
11196+ case GL_LIGHT_MODEL_COLOR_CONTROL:
11197+ params[0] = ENUM_TO_INT(ctx->Light.Model.ColorControl);
11198+ break;
11199+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
11200+ params[0] = BOOLEAN_TO_INT(ctx->Light.Model.LocalViewer);
11201+ break;
11202+ case GL_LIGHT_MODEL_TWO_SIDE:
11203+ params[0] = BOOLEAN_TO_INT(ctx->Light.Model.TwoSide);
11204+ break;
11205+ case GL_LINE_SMOOTH:
11206+ params[0] = BOOLEAN_TO_INT(ctx->Line.SmoothFlag);
11207+ break;
11208+ case GL_LINE_SMOOTH_HINT:
11209+ params[0] = ENUM_TO_INT(ctx->Hint.LineSmooth);
11210+ break;
11211+ case GL_LINE_STIPPLE:
11212+ params[0] = BOOLEAN_TO_INT(ctx->Line.StippleFlag);
11213+ break;
11214+ case GL_LINE_STIPPLE_PATTERN:
11215+ params[0] = ctx->Line.StipplePattern;
11216+ break;
11217+ case GL_LINE_STIPPLE_REPEAT:
11218+ params[0] = ctx->Line.StippleFactor;
11219+ break;
11220+ case GL_LINE_WIDTH:
11221+ params[0] = IROUND(ctx->Line.Width);
11222+ break;
11223+ case GL_LINE_WIDTH_GRANULARITY:
11224+ params[0] = IROUND(ctx->Const.LineWidthGranularity);
11225+ break;
11226+ case GL_LINE_WIDTH_RANGE:
11227+ params[0] = IROUND(ctx->Const.MinLineWidthAA);
11228+ params[1] = IROUND(ctx->Const.MaxLineWidthAA);
11229+ break;
11230+ case GL_ALIASED_LINE_WIDTH_RANGE:
11231+ params[0] = IROUND(ctx->Const.MinLineWidth);
11232+ params[1] = IROUND(ctx->Const.MaxLineWidth);
11233+ break;
11234+ case GL_LIST_BASE:
11235+ params[0] = ctx->List.ListBase;
11236+ break;
11237+ case GL_LIST_INDEX:
11238+ params[0] = ctx->ListState.CurrentListNum;
11239+ break;
11240+ case GL_LIST_MODE:
11241+ {
11242+ GLenum mode;
11243+ if (!ctx->CompileFlag)
11244+ mode = 0;
11245+ else if (ctx->ExecuteFlag)
11246+ mode = GL_COMPILE_AND_EXECUTE;
11247+ else
11248+ mode = GL_COMPILE;
11249+ params[0] = ENUM_TO_INT(mode);
11250+ }
11251+ break;
11252+ case GL_INDEX_LOGIC_OP:
11253+ params[0] = BOOLEAN_TO_INT(ctx->Color.IndexLogicOpEnabled);
11254+ break;
11255+ case GL_COLOR_LOGIC_OP:
11256+ params[0] = BOOLEAN_TO_INT(ctx->Color.ColorLogicOpEnabled);
11257+ break;
11258+ case GL_LOGIC_OP_MODE:
11259+ params[0] = ENUM_TO_INT(ctx->Color.LogicOp);
11260+ break;
11261+ case GL_MAP1_COLOR_4:
11262+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Color4);
11263+ break;
11264+ case GL_MAP1_GRID_DOMAIN:
11265+ params[0] = IROUND(ctx->Eval.MapGrid1u1);
11266+ params[1] = IROUND(ctx->Eval.MapGrid1u2);
11267+ break;
11268+ case GL_MAP1_GRID_SEGMENTS:
11269+ params[0] = ctx->Eval.MapGrid1un;
11270+ break;
11271+ case GL_MAP1_INDEX:
11272+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Index);
11273+ break;
11274+ case GL_MAP1_NORMAL:
11275+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Normal);
11276+ break;
11277+ case GL_MAP1_TEXTURE_COORD_1:
11278+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord1);
11279+ break;
11280+ case GL_MAP1_TEXTURE_COORD_2:
11281+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord2);
11282+ break;
11283+ case GL_MAP1_TEXTURE_COORD_3:
11284+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord3);
11285+ break;
11286+ case GL_MAP1_TEXTURE_COORD_4:
11287+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1TextureCoord4);
11288+ break;
11289+ case GL_MAP1_VERTEX_3:
11290+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Vertex3);
11291+ break;
11292+ case GL_MAP1_VERTEX_4:
11293+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Vertex4);
11294+ break;
11295+ case GL_MAP2_COLOR_4:
11296+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Color4);
11297+ break;
11298+ case GL_MAP2_GRID_DOMAIN:
11299+ params[0] = IROUND(ctx->Eval.MapGrid2u1);
11300+ params[1] = IROUND(ctx->Eval.MapGrid2u2);
11301+ params[2] = IROUND(ctx->Eval.MapGrid2v1);
11302+ params[3] = IROUND(ctx->Eval.MapGrid2v2);
11303+ break;
11304+ case GL_MAP2_GRID_SEGMENTS:
11305+ params[0] = ctx->Eval.MapGrid2un;
11306+ params[1] = ctx->Eval.MapGrid2vn;
11307+ break;
11308+ case GL_MAP2_INDEX:
11309+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Index);
11310+ break;
11311+ case GL_MAP2_NORMAL:
11312+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Normal);
11313+ break;
11314+ case GL_MAP2_TEXTURE_COORD_1:
11315+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord1);
11316+ break;
11317+ case GL_MAP2_TEXTURE_COORD_2:
11318+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord2);
11319+ break;
11320+ case GL_MAP2_TEXTURE_COORD_3:
11321+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord3);
11322+ break;
11323+ case GL_MAP2_TEXTURE_COORD_4:
11324+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2TextureCoord4);
11325+ break;
11326+ case GL_MAP2_VERTEX_3:
11327+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Vertex3);
11328+ break;
11329+ case GL_MAP2_VERTEX_4:
11330+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map2Vertex4);
11331+ break;
11332+ case GL_MAP_COLOR:
11333+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MapColorFlag);
11334+ break;
11335+ case GL_MAP_STENCIL:
11336+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MapStencilFlag);
11337+ break;
11338+ case GL_MATRIX_MODE:
11339+ params[0] = ENUM_TO_INT(ctx->Transform.MatrixMode);
11340+ break;
11341+ case GL_MAX_ATTRIB_STACK_DEPTH:
11342+ params[0] = MAX_ATTRIB_STACK_DEPTH;
11343+ break;
11344+ case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
11345+ params[0] = MAX_CLIENT_ATTRIB_STACK_DEPTH;
11346+ break;
11347+ case GL_MAX_CLIP_PLANES:
11348+ params[0] = ctx->Const.MaxClipPlanes;
11349+ break;
11350+ case GL_MAX_ELEMENTS_VERTICES:
11351+ params[0] = ctx->Const.MaxArrayLockSize;
11352+ break;
11353+ case GL_MAX_ELEMENTS_INDICES:
11354+ params[0] = ctx->Const.MaxArrayLockSize;
11355+ break;
11356+ case GL_MAX_EVAL_ORDER:
11357+ params[0] = MAX_EVAL_ORDER;
11358+ break;
11359+ case GL_MAX_LIGHTS:
11360+ params[0] = ctx->Const.MaxLights;
11361+ break;
11362+ case GL_MAX_LIST_NESTING:
11363+ params[0] = MAX_LIST_NESTING;
11364+ break;
11365+ case GL_MAX_MODELVIEW_STACK_DEPTH:
11366+ params[0] = MAX_MODELVIEW_STACK_DEPTH;
11367+ break;
11368+ case GL_MAX_NAME_STACK_DEPTH:
11369+ params[0] = MAX_NAME_STACK_DEPTH;
11370+ break;
11371+ case GL_MAX_PIXEL_MAP_TABLE:
11372+ params[0] = MAX_PIXEL_MAP_TABLE;
11373+ break;
11374+ case GL_MAX_PROJECTION_STACK_DEPTH:
11375+ params[0] = MAX_PROJECTION_STACK_DEPTH;
11376+ break;
11377+ case GL_MAX_TEXTURE_SIZE:
11378+ params[0] = 1 << (ctx->Const.MaxTextureLevels - 1);
11379+ break;
11380+ case GL_MAX_3D_TEXTURE_SIZE:
11381+ params[0] = 1 << (ctx->Const.Max3DTextureLevels - 1);
11382+ break;
11383+ case GL_MAX_TEXTURE_STACK_DEPTH:
11384+ params[0] = MAX_TEXTURE_STACK_DEPTH;
11385+ break;
11386+ case GL_MAX_VIEWPORT_DIMS:
11387+ params[0] = ctx->Const.MaxViewportWidth;
11388+ params[1] = ctx->Const.MaxViewportHeight;
11389+ break;
11390+ case GL_MODELVIEW_MATRIX:
11391+ {
11392+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
11393+ params[0] = IROUND(matrix[0]);
11394+ params[1] = IROUND(matrix[1]);
11395+ params[2] = IROUND(matrix[2]);
11396+ params[3] = IROUND(matrix[3]);
11397+ params[4] = IROUND(matrix[4]);
11398+ params[5] = IROUND(matrix[5]);
11399+ params[6] = IROUND(matrix[6]);
11400+ params[7] = IROUND(matrix[7]);
11401+ params[8] = IROUND(matrix[8]);
11402+ params[9] = IROUND(matrix[9]);
11403+ params[10] = IROUND(matrix[10]);
11404+ params[11] = IROUND(matrix[11]);
11405+ params[12] = IROUND(matrix[12]);
11406+ params[13] = IROUND(matrix[13]);
11407+ params[14] = IROUND(matrix[14]);
11408+ params[15] = IROUND(matrix[15]);
11409+ }
11410+ break;
11411+ case GL_MODELVIEW_STACK_DEPTH:
11412+ params[0] = ctx->ModelviewMatrixStack.Depth + 1;
11413+ break;
11414+ case GL_NAME_STACK_DEPTH:
11415+ params[0] = ctx->Select.NameStackDepth;
11416+ break;
11417+ case GL_NORMALIZE:
11418+ params[0] = BOOLEAN_TO_INT(ctx->Transform.Normalize);
11419+ break;
11420+ case GL_PACK_ALIGNMENT:
11421+ params[0] = ctx->Pack.Alignment;
11422+ break;
11423+ case GL_PACK_LSB_FIRST:
11424+ params[0] = BOOLEAN_TO_INT(ctx->Pack.LsbFirst);
11425+ break;
11426+ case GL_PACK_ROW_LENGTH:
11427+ params[0] = ctx->Pack.RowLength;
11428+ break;
11429+ case GL_PACK_SKIP_PIXELS:
11430+ params[0] = ctx->Pack.SkipPixels;
11431+ break;
11432+ case GL_PACK_SKIP_ROWS:
11433+ params[0] = ctx->Pack.SkipRows;
11434+ break;
11435+ case GL_PACK_SWAP_BYTES:
11436+ params[0] = BOOLEAN_TO_INT(ctx->Pack.SwapBytes);
11437+ break;
11438+ case GL_PACK_SKIP_IMAGES_EXT:
11439+ params[0] = ctx->Pack.SkipImages;
11440+ break;
11441+ case GL_PACK_IMAGE_HEIGHT_EXT:
11442+ params[0] = ctx->Pack.ImageHeight;
11443+ break;
11444+ case GL_PACK_INVERT_MESA:
11445+ params[0] = BOOLEAN_TO_INT(ctx->Pack.Invert);
11446+ break;
11447+ case GL_PERSPECTIVE_CORRECTION_HINT:
11448+ params[0] = ENUM_TO_INT(ctx->Hint.PerspectiveCorrection);
11449+ break;
11450+ case GL_PIXEL_MAP_A_TO_A_SIZE:
11451+ params[0] = ctx->Pixel.MapAtoAsize;
11452+ break;
11453+ case GL_PIXEL_MAP_B_TO_B_SIZE:
11454+ params[0] = ctx->Pixel.MapBtoBsize;
11455+ break;
11456+ case GL_PIXEL_MAP_G_TO_G_SIZE:
11457+ params[0] = ctx->Pixel.MapGtoGsize;
11458+ break;
11459+ case GL_PIXEL_MAP_I_TO_A_SIZE:
11460+ params[0] = ctx->Pixel.MapItoAsize;
11461+ break;
11462+ case GL_PIXEL_MAP_I_TO_B_SIZE:
11463+ params[0] = ctx->Pixel.MapItoBsize;
11464+ break;
11465+ case GL_PIXEL_MAP_I_TO_G_SIZE:
11466+ params[0] = ctx->Pixel.MapItoGsize;
11467+ break;
11468+ case GL_PIXEL_MAP_I_TO_I_SIZE:
11469+ params[0] = ctx->Pixel.MapItoIsize;
11470+ break;
11471+ case GL_PIXEL_MAP_I_TO_R_SIZE:
11472+ params[0] = ctx->Pixel.MapItoRsize;
11473+ break;
11474+ case GL_PIXEL_MAP_R_TO_R_SIZE:
11475+ params[0] = ctx->Pixel.MapRtoRsize;
11476+ break;
11477+ case GL_PIXEL_MAP_S_TO_S_SIZE:
11478+ params[0] = ctx->Pixel.MapStoSsize;
11479+ break;
11480+ case GL_POINT_SIZE:
11481+ params[0] = IROUND(ctx->Point.Size);
11482+ break;
11483+ case GL_POINT_SIZE_GRANULARITY:
11484+ params[0] = IROUND(ctx->Const.PointSizeGranularity);
11485+ break;
11486+ case GL_POINT_SIZE_RANGE:
11487+ params[0] = IROUND(ctx->Const.MinPointSizeAA);
11488+ params[1] = IROUND(ctx->Const.MaxPointSizeAA);
11489+ break;
11490+ case GL_ALIASED_POINT_SIZE_RANGE:
11491+ params[0] = IROUND(ctx->Const.MinPointSize);
11492+ params[1] = IROUND(ctx->Const.MaxPointSize);
11493+ break;
11494+ case GL_POINT_SMOOTH:
11495+ params[0] = BOOLEAN_TO_INT(ctx->Point.SmoothFlag);
11496+ break;
11497+ case GL_POINT_SMOOTH_HINT:
11498+ params[0] = ENUM_TO_INT(ctx->Hint.PointSmooth);
11499+ break;
11500+ case GL_POINT_SIZE_MIN_EXT:
11501+ params[0] = IROUND(ctx->Point.MinSize);
11502+ break;
11503+ case GL_POINT_SIZE_MAX_EXT:
11504+ params[0] = IROUND(ctx->Point.MaxSize);
11505+ break;
11506+ case GL_POINT_FADE_THRESHOLD_SIZE_EXT:
11507+ params[0] = IROUND(ctx->Point.Threshold);
11508+ break;
11509+ case GL_DISTANCE_ATTENUATION_EXT:
11510+ params[0] = IROUND(ctx->Point.Params[0]);
11511+ params[1] = IROUND(ctx->Point.Params[1]);
11512+ params[2] = IROUND(ctx->Point.Params[2]);
11513+ break;
11514+ case GL_POLYGON_MODE:
11515+ params[0] = ENUM_TO_INT(ctx->Polygon.FrontMode);
11516+ params[1] = ENUM_TO_INT(ctx->Polygon.BackMode);
11517+ break;
11518+ case GL_POLYGON_OFFSET_BIAS_EXT:
11519+ params[0] = IROUND(ctx->Polygon.OffsetUnits);
11520+ break;
11521+ case GL_POLYGON_OFFSET_FACTOR:
11522+ params[0] = IROUND(ctx->Polygon.OffsetFactor );
11523+ break;
11524+ case GL_POLYGON_OFFSET_UNITS:
11525+ params[0] = IROUND(ctx->Polygon.OffsetUnits );
11526+ break;
11527+ case GL_POLYGON_SMOOTH:
11528+ params[0] = BOOLEAN_TO_INT(ctx->Polygon.SmoothFlag);
11529+ break;
11530+ case GL_POLYGON_SMOOTH_HINT:
11531+ params[0] = ENUM_TO_INT(ctx->Hint.PolygonSmooth);
11532+ break;
11533+ case GL_POLYGON_STIPPLE:
11534+ params[0] = BOOLEAN_TO_INT(ctx->Polygon.StippleFlag);
11535+ break;
11536+ case GL_PROJECTION_MATRIX:
11537+ {
11538+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
11539+ params[0] = IROUND(matrix[0]);
11540+ params[1] = IROUND(matrix[1]);
11541+ params[2] = IROUND(matrix[2]);
11542+ params[3] = IROUND(matrix[3]);
11543+ params[4] = IROUND(matrix[4]);
11544+ params[5] = IROUND(matrix[5]);
11545+ params[6] = IROUND(matrix[6]);
11546+ params[7] = IROUND(matrix[7]);
11547+ params[8] = IROUND(matrix[8]);
11548+ params[9] = IROUND(matrix[9]);
11549+ params[10] = IROUND(matrix[10]);
11550+ params[11] = IROUND(matrix[11]);
11551+ params[12] = IROUND(matrix[12]);
11552+ params[13] = IROUND(matrix[13]);
11553+ params[14] = IROUND(matrix[14]);
11554+ params[15] = IROUND(matrix[15]);
11555+ }
11556+ break;
11557+ case GL_PROJECTION_STACK_DEPTH:
11558+ params[0] = ctx->ProjectionMatrixStack.Depth + 1;
11559+ break;
11560+ case GL_READ_BUFFER:
11561+ params[0] = ENUM_TO_INT(ctx->ReadBuffer->ColorReadBuffer);
11562+ break;
11563+ case GL_RED_BIAS:
11564+ params[0] = IROUND(ctx->Pixel.RedBias);
11565+ break;
11566+ case GL_RED_BITS:
11567+ params[0] = ctx->DrawBuffer->Visual.redBits ;
11568+ break;
11569+ case GL_RED_SCALE:
11570+ params[0] = IROUND(ctx->Pixel.RedScale);
11571+ break;
11572+ case GL_RENDER_MODE:
11573+ params[0] = ENUM_TO_INT(ctx->RenderMode);
11574+ break;
11575+ case GL_RESCALE_NORMAL:
11576+ params[0] = BOOLEAN_TO_INT(ctx->Transform.RescaleNormals);
11577+ break;
11578+ case GL_RGBA_MODE:
11579+ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.rgbMode);
11580+ break;
11581+ case GL_SCISSOR_BOX:
11582+ params[0] = ctx->Scissor.X;
11583+ params[1] = ctx->Scissor.Y;
11584+ params[2] = ctx->Scissor.Width;
11585+ params[3] = ctx->Scissor.Height;
11586+ break;
11587+ case GL_SCISSOR_TEST:
11588+ params[0] = BOOLEAN_TO_INT(ctx->Scissor.Enabled);
11589+ break;
11590+ case GL_SELECTION_BUFFER_SIZE:
11591+ params[0] = ctx->Select.BufferSize;
11592+ break;
11593+ case GL_SHADE_MODEL:
11594+ params[0] = ENUM_TO_INT(ctx->Light.ShadeModel);
11595+ break;
11596+ case GL_SHARED_TEXTURE_PALETTE_EXT:
11597+ params[0] = BOOLEAN_TO_INT(ctx->Texture.SharedPalette);
11598+ break;
11599+ case GL_STENCIL_BITS:
11600+ params[0] = ctx->DrawBuffer->Visual.stencilBits;
11601+ break;
11602+ case GL_STENCIL_CLEAR_VALUE:
11603+ params[0] = ctx->Stencil.Clear;
11604+ break;
11605+ case GL_STENCIL_FAIL:
11606+ params[0] = ENUM_TO_INT(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
11607+ break;
11608+ case GL_STENCIL_FUNC:
11609+ params[0] = ENUM_TO_INT(ctx->Stencil.Function[ctx->Stencil.ActiveFace]);
11610+ break;
11611+ case GL_STENCIL_PASS_DEPTH_FAIL:
11612+ params[0] = ENUM_TO_INT(ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]);
11613+ break;
11614+ case GL_STENCIL_PASS_DEPTH_PASS:
11615+ params[0] = ENUM_TO_INT(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
11616+ break;
11617+ case GL_STENCIL_REF:
11618+ params[0] = ctx->Stencil.Ref[ctx->Stencil.ActiveFace];
11619+ break;
11620+ case GL_STENCIL_TEST:
11621+ params[0] = BOOLEAN_TO_INT(ctx->Stencil.Enabled);
11622+ break;
11623+ case GL_STENCIL_VALUE_MASK:
11624+ params[0] = ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace];
11625+ break;
11626+ case GL_STENCIL_WRITEMASK:
11627+ params[0] = ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace];
11628+ break;
11629+ case GL_STEREO:
11630+ params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.stereoMode);
11631+ break;
11632+ case GL_SUBPIXEL_BITS:
11633+ params[0] = ctx->Const.SubPixelBits;
11634+ break;
11635+ case GL_TEXTURE_1D:
11636+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_1D));
11637+ break;
11638+ case GL_TEXTURE_2D:
11639+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_2D));
11640+ break;
11641+ case GL_TEXTURE_3D:
11642+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_3D));
11643+ break;
11644+ case GL_TEXTURE_BINDING_1D:
11645+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name;
11646+ break;
11647+ case GL_TEXTURE_BINDING_2D:
11648+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name;
11649+ break;
11650+ case GL_TEXTURE_BINDING_3D:
11651+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name;
11652+ break;
11653+ case GL_TEXTURE_ENV_COLOR:
11654+ {
11655+ const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;
11656+ params[0] = FLOAT_TO_INT(color[0]);
11657+ params[1] = FLOAT_TO_INT(color[1]);
11658+ params[2] = FLOAT_TO_INT(color[2]);
11659+ params[3] = FLOAT_TO_INT(color[3]);
11660+ }
11661+ break;
11662+ case GL_TEXTURE_ENV_MODE:
11663+ params[0] = ENUM_TO_INT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode);
11664+ break;
11665+ case GL_TEXTURE_GEN_S:
11666+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
11667+ break;
11668+ case GL_TEXTURE_GEN_T:
11669+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & T_BIT) ? 1 : 0));
11670+ break;
11671+ case GL_TEXTURE_GEN_R:
11672+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & R_BIT) ? 1 : 0));
11673+ break;
11674+ case GL_TEXTURE_GEN_Q:
11675+ params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & Q_BIT) ? 1 : 0));
11676+ break;
11677+ case GL_TEXTURE_MATRIX:
11678+ {
11679+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
11680+ params[0] = IROUND(matrix[0]);
11681+ params[1] = IROUND(matrix[1]);
11682+ params[2] = IROUND(matrix[2]);
11683+ params[3] = IROUND(matrix[3]);
11684+ params[4] = IROUND(matrix[4]);
11685+ params[5] = IROUND(matrix[5]);
11686+ params[6] = IROUND(matrix[6]);
11687+ params[7] = IROUND(matrix[7]);
11688+ params[8] = IROUND(matrix[8]);
11689+ params[9] = IROUND(matrix[9]);
11690+ params[10] = IROUND(matrix[10]);
11691+ params[11] = IROUND(matrix[11]);
11692+ params[12] = IROUND(matrix[12]);
11693+ params[13] = IROUND(matrix[13]);
11694+ params[14] = IROUND(matrix[14]);
11695+ params[15] = IROUND(matrix[15]);
11696+ }
11697+ break;
11698+ case GL_TEXTURE_STACK_DEPTH:
11699+ params[0] = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1;
11700+ break;
11701+ case GL_UNPACK_ALIGNMENT:
11702+ params[0] = ctx->Unpack.Alignment;
11703+ break;
11704+ case GL_UNPACK_LSB_FIRST:
11705+ params[0] = BOOLEAN_TO_INT(ctx->Unpack.LsbFirst);
11706+ break;
11707+ case GL_UNPACK_ROW_LENGTH:
11708+ params[0] = ctx->Unpack.RowLength;
11709+ break;
11710+ case GL_UNPACK_SKIP_PIXELS:
11711+ params[0] = ctx->Unpack.SkipPixels;
11712+ break;
11713+ case GL_UNPACK_SKIP_ROWS:
11714+ params[0] = ctx->Unpack.SkipRows;
11715+ break;
11716+ case GL_UNPACK_SWAP_BYTES:
11717+ params[0] = BOOLEAN_TO_INT(ctx->Unpack.SwapBytes);
11718+ break;
11719+ case GL_UNPACK_SKIP_IMAGES_EXT:
11720+ params[0] = ctx->Unpack.SkipImages;
11721+ break;
11722+ case GL_UNPACK_IMAGE_HEIGHT_EXT:
11723+ params[0] = ctx->Unpack.ImageHeight;
11724+ break;
11725+ case GL_UNPACK_CLIENT_STORAGE_APPLE:
11726+ params[0] = BOOLEAN_TO_INT(ctx->Unpack.ClientStorage);
11727+ break;
11728+ case GL_VIEWPORT:
11729+ params[0] = ctx->Viewport.X;
11730+ params[1] = ctx->Viewport.Y;
11731+ params[2] = ctx->Viewport.Width;
11732+ params[3] = ctx->Viewport.Height;
11733+ break;
11734+ case GL_ZOOM_X:
11735+ params[0] = IROUND(ctx->Pixel.ZoomX);
11736+ break;
11737+ case GL_ZOOM_Y:
11738+ params[0] = IROUND(ctx->Pixel.ZoomY);
11739+ break;
11740+ case GL_VERTEX_ARRAY:
11741+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Vertex.Enabled);
11742+ break;
11743+ case GL_VERTEX_ARRAY_SIZE:
11744+ params[0] = ctx->Array.ArrayObj->Vertex.Size;
11745+ break;
11746+ case GL_VERTEX_ARRAY_TYPE:
11747+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Vertex.Type);
11748+ break;
11749+ case GL_VERTEX_ARRAY_STRIDE:
11750+ params[0] = ctx->Array.ArrayObj->Vertex.Stride;
11751+ break;
11752+ case GL_VERTEX_ARRAY_COUNT_EXT:
11753+ params[0] = 0;
11754+ break;
11755+ case GL_NORMAL_ARRAY:
11756+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Normal.Enabled);
11757+ break;
11758+ case GL_NORMAL_ARRAY_TYPE:
11759+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Normal.Type);
11760+ break;
11761+ case GL_NORMAL_ARRAY_STRIDE:
11762+ params[0] = ctx->Array.ArrayObj->Normal.Stride;
11763+ break;
11764+ case GL_NORMAL_ARRAY_COUNT_EXT:
11765+ params[0] = 0;
11766+ break;
11767+ case GL_COLOR_ARRAY:
11768+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Color.Enabled);
11769+ break;
11770+ case GL_COLOR_ARRAY_SIZE:
11771+ params[0] = ctx->Array.ArrayObj->Color.Size;
11772+ break;
11773+ case GL_COLOR_ARRAY_TYPE:
11774+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Color.Type);
11775+ break;
11776+ case GL_COLOR_ARRAY_STRIDE:
11777+ params[0] = ctx->Array.ArrayObj->Color.Stride;
11778+ break;
11779+ case GL_COLOR_ARRAY_COUNT_EXT:
11780+ params[0] = 0;
11781+ break;
11782+ case GL_INDEX_ARRAY:
11783+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->Index.Enabled);
11784+ break;
11785+ case GL_INDEX_ARRAY_TYPE:
11786+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->Index.Type);
11787+ break;
11788+ case GL_INDEX_ARRAY_STRIDE:
11789+ params[0] = ctx->Array.ArrayObj->Index.Stride;
11790+ break;
11791+ case GL_INDEX_ARRAY_COUNT_EXT:
11792+ params[0] = 0;
11793+ break;
11794+ case GL_TEXTURE_COORD_ARRAY:
11795+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
11796+ break;
11797+ case GL_TEXTURE_COORD_ARRAY_SIZE:
11798+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size;
11799+ break;
11800+ case GL_TEXTURE_COORD_ARRAY_TYPE:
11801+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
11802+ break;
11803+ case GL_TEXTURE_COORD_ARRAY_STRIDE:
11804+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride;
11805+ break;
11806+ case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
11807+ params[0] = 0;
11808+ break;
11809+ case GL_EDGE_FLAG_ARRAY:
11810+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->EdgeFlag.Enabled);
11811+ break;
11812+ case GL_EDGE_FLAG_ARRAY_STRIDE:
11813+ params[0] = ctx->Array.ArrayObj->EdgeFlag.Stride;
11814+ break;
11815+ case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
11816+ params[0] = 0;
11817+ break;
11818+ case GL_MAX_TEXTURE_UNITS_ARB:
11819+ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
11820+ params[0] = ctx->Const.MaxTextureUnits;
11821+ break;
11822+ case GL_ACTIVE_TEXTURE_ARB:
11823+ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
11824+ params[0] = GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit;
11825+ break;
11826+ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
11827+ CHECK_EXT1(ARB_multitexture, "GetIntegerv");
11828+ params[0] = GL_TEXTURE0_ARB + ctx->Array.ActiveTexture;
11829+ break;
11830+ case GL_TEXTURE_CUBE_MAP_ARB:
11831+ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
11832+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB));
11833+ break;
11834+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
11835+ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
11836+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name;
11837+ break;
11838+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
11839+ CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
11840+ params[0] = (1 << (ctx->Const.MaxCubeTextureLevels - 1));
11841+ break;
11842+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
11843+ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
11844+ params[0] = ctx->Hint.TextureCompression;
11845+ break;
11846+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
11847+ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
11848+ params[0] = _mesa_get_compressed_formats(ctx, NULL, GL_FALSE);
11849+ break;
11850+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
11851+ CHECK_EXT1(ARB_texture_compression, "GetIntegerv");
11852+ {
11853+ GLint formats[100];
11854+ GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
11855+ ASSERT(n <= 100);
11856+ for (i = 0; i < n; i++)
11857+ params[i] = ENUM_TO_INT(formats[i]);
11858+ }
11859+ break;
11860+ case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
11861+ CHECK_EXT1(EXT_compiled_vertex_array, "GetIntegerv");
11862+ params[0] = ctx->Array.LockFirst;
11863+ break;
11864+ case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
11865+ CHECK_EXT1(EXT_compiled_vertex_array, "GetIntegerv");
11866+ params[0] = ctx->Array.LockCount;
11867+ break;
11868+ case GL_TRANSPOSE_COLOR_MATRIX_ARB:
11869+ {
11870+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
11871+ params[0] = IROUND(matrix[0]);
11872+ params[1] = IROUND(matrix[4]);
11873+ params[2] = IROUND(matrix[8]);
11874+ params[3] = IROUND(matrix[12]);
11875+ params[4] = IROUND(matrix[1]);
11876+ params[5] = IROUND(matrix[5]);
11877+ params[6] = IROUND(matrix[9]);
11878+ params[7] = IROUND(matrix[13]);
11879+ params[8] = IROUND(matrix[2]);
11880+ params[9] = IROUND(matrix[6]);
11881+ params[10] = IROUND(matrix[10]);
11882+ params[11] = IROUND(matrix[14]);
11883+ params[12] = IROUND(matrix[3]);
11884+ params[13] = IROUND(matrix[7]);
11885+ params[14] = IROUND(matrix[11]);
11886+ params[15] = IROUND(matrix[15]);
11887+ }
11888+ break;
11889+ case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
11890+ {
11891+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
11892+ params[0] = IROUND(matrix[0]);
11893+ params[1] = IROUND(matrix[4]);
11894+ params[2] = IROUND(matrix[8]);
11895+ params[3] = IROUND(matrix[12]);
11896+ params[4] = IROUND(matrix[1]);
11897+ params[5] = IROUND(matrix[5]);
11898+ params[6] = IROUND(matrix[9]);
11899+ params[7] = IROUND(matrix[13]);
11900+ params[8] = IROUND(matrix[2]);
11901+ params[9] = IROUND(matrix[6]);
11902+ params[10] = IROUND(matrix[10]);
11903+ params[11] = IROUND(matrix[14]);
11904+ params[12] = IROUND(matrix[3]);
11905+ params[13] = IROUND(matrix[7]);
11906+ params[14] = IROUND(matrix[11]);
11907+ params[15] = IROUND(matrix[15]);
11908+ }
11909+ break;
11910+ case GL_TRANSPOSE_PROJECTION_MATRIX_ARB:
11911+ {
11912+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
11913+ params[0] = IROUND(matrix[0]);
11914+ params[1] = IROUND(matrix[4]);
11915+ params[2] = IROUND(matrix[8]);
11916+ params[3] = IROUND(matrix[12]);
11917+ params[4] = IROUND(matrix[1]);
11918+ params[5] = IROUND(matrix[5]);
11919+ params[6] = IROUND(matrix[9]);
11920+ params[7] = IROUND(matrix[13]);
11921+ params[8] = IROUND(matrix[2]);
11922+ params[9] = IROUND(matrix[6]);
11923+ params[10] = IROUND(matrix[10]);
11924+ params[11] = IROUND(matrix[14]);
11925+ params[12] = IROUND(matrix[3]);
11926+ params[13] = IROUND(matrix[7]);
11927+ params[14] = IROUND(matrix[11]);
11928+ params[15] = IROUND(matrix[15]);
11929+ }
11930+ break;
11931+ case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
11932+ {
11933+ const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
11934+ params[0] = IROUND(matrix[0]);
11935+ params[1] = IROUND(matrix[4]);
11936+ params[2] = IROUND(matrix[8]);
11937+ params[3] = IROUND(matrix[12]);
11938+ params[4] = IROUND(matrix[1]);
11939+ params[5] = IROUND(matrix[5]);
11940+ params[6] = IROUND(matrix[9]);
11941+ params[7] = IROUND(matrix[13]);
11942+ params[8] = IROUND(matrix[2]);
11943+ params[9] = IROUND(matrix[6]);
11944+ params[10] = IROUND(matrix[10]);
11945+ params[11] = IROUND(matrix[14]);
11946+ params[12] = IROUND(matrix[3]);
11947+ params[13] = IROUND(matrix[7]);
11948+ params[14] = IROUND(matrix[11]);
11949+ params[15] = IROUND(matrix[15]);
11950+ }
11951+ break;
11952+ case GL_COLOR_MATRIX_SGI:
11953+ {
11954+ const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
11955+ params[0] = IROUND(matrix[0]);
11956+ params[1] = IROUND(matrix[1]);
11957+ params[2] = IROUND(matrix[2]);
11958+ params[3] = IROUND(matrix[3]);
11959+ params[4] = IROUND(matrix[4]);
11960+ params[5] = IROUND(matrix[5]);
11961+ params[6] = IROUND(matrix[6]);
11962+ params[7] = IROUND(matrix[7]);
11963+ params[8] = IROUND(matrix[8]);
11964+ params[9] = IROUND(matrix[9]);
11965+ params[10] = IROUND(matrix[10]);
11966+ params[11] = IROUND(matrix[11]);
11967+ params[12] = IROUND(matrix[12]);
11968+ params[13] = IROUND(matrix[13]);
11969+ params[14] = IROUND(matrix[14]);
11970+ params[15] = IROUND(matrix[15]);
11971+ }
11972+ break;
11973+ case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
11974+ params[0] = ctx->ColorMatrixStack.Depth + 1;
11975+ break;
11976+ case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
11977+ params[0] = MAX_COLOR_STACK_DEPTH;
11978+ break;
11979+ case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
11980+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[0]);
11981+ break;
11982+ case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
11983+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[1]);
11984+ break;
11985+ case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
11986+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[2]);
11987+ break;
11988+ case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
11989+ params[0] = IROUND(ctx->Pixel.PostColorMatrixScale[3]);
11990+ break;
11991+ case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
11992+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[0]);
11993+ break;
11994+ case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
11995+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[1]);
11996+ break;
11997+ case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
11998+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[2]);
11999+ break;
12000+ case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
12001+ params[0] = IROUND(ctx->Pixel.PostColorMatrixBias[3]);
12002+ break;
12003+ case GL_CONVOLUTION_1D_EXT:
12004+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12005+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Convolution1DEnabled);
12006+ break;
12007+ case GL_CONVOLUTION_2D_EXT:
12008+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12009+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Convolution2DEnabled);
12010+ break;
12011+ case GL_SEPARABLE_2D_EXT:
12012+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12013+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.Separable2DEnabled);
12014+ break;
12015+ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
12016+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12017+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[0]);
12018+ break;
12019+ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
12020+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12021+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[1]);
12022+ break;
12023+ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
12024+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12025+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[2]);
12026+ break;
12027+ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
12028+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12029+ params[0] = IROUND(ctx->Pixel.PostConvolutionScale[3]);
12030+ break;
12031+ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
12032+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12033+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[0]);
12034+ break;
12035+ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
12036+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12037+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[1]);
12038+ break;
12039+ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
12040+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12041+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[2]);
12042+ break;
12043+ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
12044+ CHECK_EXT1(EXT_convolution, "GetIntegerv");
12045+ params[0] = IROUND(ctx->Pixel.PostConvolutionBias[3]);
12046+ break;
12047+ case GL_HISTOGRAM:
12048+ CHECK_EXT1(EXT_histogram, "GetIntegerv");
12049+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.HistogramEnabled);
12050+ break;
12051+ case GL_MINMAX:
12052+ CHECK_EXT1(EXT_histogram, "GetIntegerv");
12053+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.MinMaxEnabled);
12054+ break;
12055+ case GL_COLOR_TABLE_SGI:
12056+ CHECK_EXT1(SGI_color_table, "GetIntegerv");
12057+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.ColorTableEnabled);
12058+ break;
12059+ case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
12060+ CHECK_EXT1(SGI_color_table, "GetIntegerv");
12061+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.PostConvolutionColorTableEnabled);
12062+ break;
12063+ case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
12064+ CHECK_EXT1(SGI_color_table, "GetIntegerv");
12065+ params[0] = BOOLEAN_TO_INT(ctx->Pixel.PostColorMatrixColorTableEnabled);
12066+ break;
12067+ case GL_TEXTURE_COLOR_TABLE_SGI:
12068+ CHECK_EXT1(SGI_texture_color_table, "GetIntegerv");
12069+ params[0] = BOOLEAN_TO_INT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled);
12070+ break;
12071+ case GL_COLOR_SUM_EXT:
12072+ CHECK_EXT2(EXT_secondary_color, ARB_vertex_program, "GetIntegerv");
12073+ params[0] = BOOLEAN_TO_INT(ctx->Fog.ColorSumEnabled);
12074+ break;
12075+ case GL_CURRENT_SECONDARY_COLOR_EXT:
12076+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
12077+ {
12078+ FLUSH_CURRENT(ctx, 0);
12079+ params[0] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0]);
12080+ params[1] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1]);
12081+ params[2] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2]);
12082+ params[3] = FLOAT_TO_INT(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3]);
12083+ }
12084+ break;
12085+ case GL_SECONDARY_COLOR_ARRAY_EXT:
12086+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
12087+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->SecondaryColor.Enabled);
12088+ break;
12089+ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
12090+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
12091+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->SecondaryColor.Type);
12092+ break;
12093+ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
12094+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
12095+ params[0] = ctx->Array.ArrayObj->SecondaryColor.Stride;
12096+ break;
12097+ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
12098+ CHECK_EXT1(EXT_secondary_color, "GetIntegerv");
12099+ params[0] = ctx->Array.ArrayObj->SecondaryColor.Size;
12100+ break;
12101+ case GL_CURRENT_FOG_COORDINATE_EXT:
12102+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
12103+ {
12104+ FLUSH_CURRENT(ctx, 0);
12105+ params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_FOG][0]);
12106+ }
12107+ break;
12108+ case GL_FOG_COORDINATE_ARRAY_EXT:
12109+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
12110+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->FogCoord.Enabled);
12111+ break;
12112+ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
12113+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
12114+ params[0] = ENUM_TO_INT(ctx->Array.ArrayObj->FogCoord.Type);
12115+ break;
12116+ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
12117+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
12118+ params[0] = ctx->Array.ArrayObj->FogCoord.Stride;
12119+ break;
12120+ case GL_FOG_COORDINATE_SOURCE_EXT:
12121+ CHECK_EXT1(EXT_fog_coord, "GetIntegerv");
12122+ params[0] = ENUM_TO_INT(ctx->Fog.FogCoordinateSource);
12123+ break;
12124+ case GL_MAX_TEXTURE_LOD_BIAS_EXT:
12125+ CHECK_EXT1(EXT_texture_lod_bias, "GetIntegerv");
12126+ params[0] = IROUND(ctx->Const.MaxTextureLodBias);
12127+ break;
12128+ case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT:
12129+ CHECK_EXT1(EXT_texture_filter_anisotropic, "GetIntegerv");
12130+ params[0] = IROUND(ctx->Const.MaxTextureMaxAnisotropy);
12131+ break;
12132+ case GL_MULTISAMPLE_ARB:
12133+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12134+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.Enabled);
12135+ break;
12136+ case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
12137+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12138+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleAlphaToCoverage);
12139+ break;
12140+ case GL_SAMPLE_ALPHA_TO_ONE_ARB:
12141+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12142+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleAlphaToOne);
12143+ break;
12144+ case GL_SAMPLE_COVERAGE_ARB:
12145+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12146+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleCoverage);
12147+ break;
12148+ case GL_SAMPLE_COVERAGE_VALUE_ARB:
12149+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12150+ params[0] = IROUND(ctx->Multisample.SampleCoverageValue);
12151+ break;
12152+ case GL_SAMPLE_COVERAGE_INVERT_ARB:
12153+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12154+ params[0] = BOOLEAN_TO_INT(ctx->Multisample.SampleCoverageInvert);
12155+ break;
12156+ case GL_SAMPLE_BUFFERS_ARB:
12157+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12158+ params[0] = ctx->DrawBuffer->Visual.sampleBuffers;
12159+ break;
12160+ case GL_SAMPLES_ARB:
12161+ CHECK_EXT1(ARB_multisample, "GetIntegerv");
12162+ params[0] = ctx->DrawBuffer->Visual.samples;
12163+ break;
12164+ case GL_RASTER_POSITION_UNCLIPPED_IBM:
12165+ CHECK_EXT1(IBM_rasterpos_clip, "GetIntegerv");
12166+ params[0] = BOOLEAN_TO_INT(ctx->Transform.RasterPositionUnclipped);
12167+ break;
12168+ case GL_POINT_SPRITE_NV:
12169+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetIntegerv");
12170+ params[0] = BOOLEAN_TO_INT(ctx->Point.PointSprite);
12171+ break;
12172+ case GL_POINT_SPRITE_R_MODE_NV:
12173+ CHECK_EXT1(NV_point_sprite, "GetIntegerv");
12174+ params[0] = ENUM_TO_INT(ctx->Point.SpriteRMode);
12175+ break;
12176+ case GL_POINT_SPRITE_COORD_ORIGIN:
12177+ CHECK_EXT2(NV_point_sprite, ARB_point_sprite, "GetIntegerv");
12178+ params[0] = ENUM_TO_INT(ctx->Point.SpriteOrigin);
12179+ break;
12180+ case GL_GENERATE_MIPMAP_HINT_SGIS:
12181+ CHECK_EXT1(SGIS_generate_mipmap, "GetIntegerv");
12182+ params[0] = ENUM_TO_INT(ctx->Hint.GenerateMipmap);
12183+ break;
12184+ case GL_VERTEX_PROGRAM_BINDING_NV:
12185+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12186+ params[0] = (ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0);
12187+ break;
12188+ case GL_VERTEX_ATTRIB_ARRAY0_NV:
12189+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12190+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[0].Enabled);
12191+ break;
12192+ case GL_VERTEX_ATTRIB_ARRAY1_NV:
12193+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12194+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[1].Enabled);
12195+ break;
12196+ case GL_VERTEX_ATTRIB_ARRAY2_NV:
12197+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12198+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[2].Enabled);
12199+ break;
12200+ case GL_VERTEX_ATTRIB_ARRAY3_NV:
12201+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12202+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[3].Enabled);
12203+ break;
12204+ case GL_VERTEX_ATTRIB_ARRAY4_NV:
12205+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12206+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[4].Enabled);
12207+ break;
12208+ case GL_VERTEX_ATTRIB_ARRAY5_NV:
12209+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12210+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[5].Enabled);
12211+ break;
12212+ case GL_VERTEX_ATTRIB_ARRAY6_NV:
12213+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12214+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[6].Enabled);
12215+ break;
12216+ case GL_VERTEX_ATTRIB_ARRAY7_NV:
12217+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12218+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[7].Enabled);
12219+ break;
12220+ case GL_VERTEX_ATTRIB_ARRAY8_NV:
12221+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12222+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[8].Enabled);
12223+ break;
12224+ case GL_VERTEX_ATTRIB_ARRAY9_NV:
12225+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12226+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[9].Enabled);
12227+ break;
12228+ case GL_VERTEX_ATTRIB_ARRAY10_NV:
12229+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12230+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[10].Enabled);
12231+ break;
12232+ case GL_VERTEX_ATTRIB_ARRAY11_NV:
12233+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12234+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[11].Enabled);
12235+ break;
12236+ case GL_VERTEX_ATTRIB_ARRAY12_NV:
12237+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12238+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[12].Enabled);
12239+ break;
12240+ case GL_VERTEX_ATTRIB_ARRAY13_NV:
12241+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12242+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[13].Enabled);
12243+ break;
12244+ case GL_VERTEX_ATTRIB_ARRAY14_NV:
12245+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12246+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[14].Enabled);
12247+ break;
12248+ case GL_VERTEX_ATTRIB_ARRAY15_NV:
12249+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12250+ params[0] = BOOLEAN_TO_INT(ctx->Array.ArrayObj->VertexAttrib[15].Enabled);
12251+ break;
12252+ case GL_MAP1_VERTEX_ATTRIB0_4_NV:
12253+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12254+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[0]);
12255+ break;
12256+ case GL_MAP1_VERTEX_ATTRIB1_4_NV:
12257+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12258+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[1]);
12259+ break;
12260+ case GL_MAP1_VERTEX_ATTRIB2_4_NV:
12261+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12262+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[2]);
12263+ break;
12264+ case GL_MAP1_VERTEX_ATTRIB3_4_NV:
12265+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12266+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[3]);
12267+ break;
12268+ case GL_MAP1_VERTEX_ATTRIB4_4_NV:
12269+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12270+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[4]);
12271+ break;
12272+ case GL_MAP1_VERTEX_ATTRIB5_4_NV:
12273+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12274+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[5]);
12275+ break;
12276+ case GL_MAP1_VERTEX_ATTRIB6_4_NV:
12277+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12278+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[6]);
12279+ break;
12280+ case GL_MAP1_VERTEX_ATTRIB7_4_NV:
12281+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12282+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[7]);
12283+ break;
12284+ case GL_MAP1_VERTEX_ATTRIB8_4_NV:
12285+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12286+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[8]);
12287+ break;
12288+ case GL_MAP1_VERTEX_ATTRIB9_4_NV:
12289+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12290+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[9]);
12291+ break;
12292+ case GL_MAP1_VERTEX_ATTRIB10_4_NV:
12293+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12294+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[10]);
12295+ break;
12296+ case GL_MAP1_VERTEX_ATTRIB11_4_NV:
12297+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12298+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[11]);
12299+ break;
12300+ case GL_MAP1_VERTEX_ATTRIB12_4_NV:
12301+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12302+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[12]);
12303+ break;
12304+ case GL_MAP1_VERTEX_ATTRIB13_4_NV:
12305+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12306+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[13]);
12307+ break;
12308+ case GL_MAP1_VERTEX_ATTRIB14_4_NV:
12309+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12310+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[14]);
12311+ break;
12312+ case GL_MAP1_VERTEX_ATTRIB15_4_NV:
12313+ CHECK_EXT1(NV_vertex_program, "GetIntegerv");
12314+ params[0] = BOOLEAN_TO_INT(ctx->Eval.Map1Attrib[15]);
12315+ break;
12316+ case GL_FRAGMENT_PROGRAM_NV:
12317+ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
12318+ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.Enabled);
12319+ break;
12320+ case GL_FRAGMENT_PROGRAM_BINDING_NV:
12321+ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
12322+ params[0] = ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0;
12323+ break;
12324+ case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
12325+ CHECK_EXT1(NV_fragment_program, "GetIntegerv");
12326+ params[0] = MAX_NV_FRAGMENT_PROGRAM_PARAMS;
12327+ break;
12328+ case GL_TEXTURE_RECTANGLE_NV:
12329+ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
12330+ params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV));
12331+ break;
12332+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
12333+ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
12334+ params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name;
12335+ break;
12336+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
12337+ CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
12338+ params[0] = ctx->Const.MaxTextureRectSize;
12339+ break;
12340+ case GL_STENCIL_TEST_TWO_SIDE_EXT:
12341+ CHECK_EXT1(EXT_stencil_two_side, "GetIntegerv");
12342+ params[0] = BOOLEAN_TO_INT(ctx->Stencil.TestTwoSide);
12343+ break;
12344+ case GL_ACTIVE_STENCIL_FACE_EXT:
12345+ CHECK_EXT1(EXT_stencil_two_side, "GetIntegerv");
12346+ params[0] = ENUM_TO_INT(ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT);
12347+ break;
12348+ case GL_MAX_SHININESS_NV:
12349+ CHECK_EXT1(NV_light_max_exponent, "GetIntegerv");
12350+ params[0] = IROUND(ctx->Const.MaxShininess);
12351+ break;
12352+ case GL_MAX_SPOT_EXPONENT_NV:
12353+ CHECK_EXT1(NV_light_max_exponent, "GetIntegerv");
12354+ params[0] = IROUND(ctx->Const.MaxSpotExponent);
12355+ break;
12356+ case GL_ARRAY_BUFFER_BINDING_ARB:
12357+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12358+ params[0] = ctx->Array.ArrayBufferObj->Name;
12359+ break;
12360+ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
12361+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12362+ params[0] = ctx->Array.ArrayObj->Vertex.BufferObj->Name;
12363+ break;
12364+ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
12365+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12366+ params[0] = ctx->Array.ArrayObj->Normal.BufferObj->Name;
12367+ break;
12368+ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
12369+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12370+ params[0] = ctx->Array.ArrayObj->Color.BufferObj->Name;
12371+ break;
12372+ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
12373+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12374+ params[0] = ctx->Array.ArrayObj->Index.BufferObj->Name;
12375+ break;
12376+ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
12377+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12378+ params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name;
12379+ break;
12380+ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
12381+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12382+ params[0] = ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name;
12383+ break;
12384+ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
12385+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12386+ params[0] = ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name;
12387+ break;
12388+ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
12389+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12390+ params[0] = ctx->Array.ArrayObj->FogCoord.BufferObj->Name;
12391+ break;
12392+ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
12393+ CHECK_EXT1(ARB_vertex_buffer_object, "GetIntegerv");
12394+ params[0] = ctx->Array.ElementArrayBufferObj->Name;
12395+ break;
12396+ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
12397+ CHECK_EXT1(EXT_pixel_buffer_object, "GetIntegerv");
12398+ params[0] = ctx->Pack.BufferObj->Name;
12399+ break;
12400+ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
12401+ CHECK_EXT1(EXT_pixel_buffer_object, "GetIntegerv");
12402+ params[0] = ctx->Unpack.BufferObj->Name;
12403+ break;
12404+ case GL_VERTEX_PROGRAM_ARB:
12405+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
12406+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.Enabled);
12407+ break;
12408+ case GL_VERTEX_PROGRAM_POINT_SIZE_ARB:
12409+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
12410+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.PointSizeEnabled);
12411+ break;
12412+ case GL_VERTEX_PROGRAM_TWO_SIDE_ARB:
12413+ CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetIntegerv");
12414+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.TwoSideEnabled);
12415+ break;
12416+ case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
12417+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
12418+ params[0] = ctx->Const.MaxProgramMatrixStackDepth;
12419+ break;
12420+ case GL_MAX_PROGRAM_MATRICES_ARB:
12421+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
12422+ params[0] = ctx->Const.MaxProgramMatrices;
12423+ break;
12424+ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
12425+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetIntegerv");
12426+ params[0] = BOOLEAN_TO_INT(ctx->CurrentStack->Depth + 1);
12427+ break;
12428+ case GL_CURRENT_MATRIX_ARB:
12429+ CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_fragment_program, "GetIntegerv");
12430+ {
12431+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
12432+ params[0] = IROUND(matrix[0]);
12433+ params[1] = IROUND(matrix[1]);
12434+ params[2] = IROUND(matrix[2]);
12435+ params[3] = IROUND(matrix[3]);
12436+ params[4] = IROUND(matrix[4]);
12437+ params[5] = IROUND(matrix[5]);
12438+ params[6] = IROUND(matrix[6]);
12439+ params[7] = IROUND(matrix[7]);
12440+ params[8] = IROUND(matrix[8]);
12441+ params[9] = IROUND(matrix[9]);
12442+ params[10] = IROUND(matrix[10]);
12443+ params[11] = IROUND(matrix[11]);
12444+ params[12] = IROUND(matrix[12]);
12445+ params[13] = IROUND(matrix[13]);
12446+ params[14] = IROUND(matrix[14]);
12447+ params[15] = IROUND(matrix[15]);
12448+ }
12449+ break;
12450+ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
12451+ CHECK_EXT2(ARB_vertex_program, ARB_fragment_program, "GetIntegerv");
12452+ {
12453+ const GLfloat *matrix = ctx->CurrentStack->Top->m;
12454+ params[0] = IROUND(matrix[0]);
12455+ params[1] = IROUND(matrix[4]);
12456+ params[2] = IROUND(matrix[8]);
12457+ params[3] = IROUND(matrix[12]);
12458+ params[4] = IROUND(matrix[1]);
12459+ params[5] = IROUND(matrix[5]);
12460+ params[6] = IROUND(matrix[9]);
12461+ params[7] = IROUND(matrix[13]);
12462+ params[8] = IROUND(matrix[2]);
12463+ params[9] = IROUND(matrix[6]);
12464+ params[10] = IROUND(matrix[10]);
12465+ params[11] = IROUND(matrix[14]);
12466+ params[12] = IROUND(matrix[3]);
12467+ params[13] = IROUND(matrix[7]);
12468+ params[14] = IROUND(matrix[11]);
12469+ params[15] = IROUND(matrix[15]);
12470+ }
12471+ break;
12472+ case GL_MAX_VERTEX_ATTRIBS_ARB:
12473+ CHECK_EXT1(ARB_vertex_program, "GetIntegerv");
12474+ params[0] = ctx->Const.VertexProgram.MaxAttribs;
12475+ break;
12476+ case GL_PROGRAM_ERROR_POSITION_ARB:
12477+ CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetIntegerv");
12478+ params[0] = ctx->Program.ErrorPos;
12479+ break;
12480+ case GL_FRAGMENT_PROGRAM_ARB:
12481+ CHECK_EXT1(ARB_fragment_program, "GetIntegerv");
12482+ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.Enabled);
12483+ break;
12484+ case GL_MAX_TEXTURE_COORDS_ARB:
12485+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetIntegerv");
12486+ params[0] = ctx->Const.MaxTextureCoordUnits;
12487+ break;
12488+ case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
12489+ CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetIntegerv");
12490+ params[0] = ctx->Const.MaxTextureImageUnits;
12491+ break;
12492+ case GL_DEPTH_BOUNDS_TEST_EXT:
12493+ CHECK_EXT1(EXT_depth_bounds_test, "GetIntegerv");
12494+ params[0] = BOOLEAN_TO_INT(ctx->Depth.BoundsTest);
12495+ break;
12496+ case GL_DEPTH_BOUNDS_EXT:
12497+ CHECK_EXT1(EXT_depth_bounds_test, "GetIntegerv");
12498+ params[0] = IROUND(ctx->Depth.BoundsMin);
12499+ params[1] = IROUND(ctx->Depth.BoundsMax);
12500+ break;
12501+ case GL_FRAGMENT_PROGRAM_CALLBACK_MESA:
12502+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12503+ params[0] = BOOLEAN_TO_INT(ctx->FragmentProgram.CallbackEnabled);
12504+ break;
12505+ case GL_VERTEX_PROGRAM_CALLBACK_MESA:
12506+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12507+ params[0] = BOOLEAN_TO_INT(ctx->VertexProgram.CallbackEnabled);
12508+ break;
12509+ case GL_FRAGMENT_PROGRAM_POSITION_MESA:
12510+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12511+ params[0] = ctx->FragmentProgram.CurrentPosition;
12512+ break;
12513+ case GL_VERTEX_PROGRAM_POSITION_MESA:
12514+ CHECK_EXT1(MESA_program_debug, "GetIntegerv");
12515+ params[0] = ctx->VertexProgram.CurrentPosition;
12516+ break;
12517+ case GL_MAX_DRAW_BUFFERS_ARB:
12518+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12519+ params[0] = ctx->Const.MaxDrawBuffers;
12520+ break;
12521+ case GL_DRAW_BUFFER0_ARB:
12522+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12523+ params[0] = ENUM_TO_INT(ctx->DrawBuffer->ColorDrawBuffer[0]);
12524+ break;
12525+ case GL_DRAW_BUFFER1_ARB:
12526+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12527+ {
12528+ GLenum buffer;
12529+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
12530+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
12531+ return;
12532+ }
12533+ buffer = ctx->DrawBuffer->ColorDrawBuffer[1];
12534+ params[0] = ENUM_TO_INT(buffer);
12535+ }
12536+ break;
12537+ case GL_DRAW_BUFFER2_ARB:
12538+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12539+ {
12540+ GLenum buffer;
12541+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
12542+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
12543+ return;
12544+ }
12545+ buffer = ctx->DrawBuffer->ColorDrawBuffer[2];
12546+ params[0] = ENUM_TO_INT(buffer);
12547+ }
12548+ break;
12549+ case GL_DRAW_BUFFER3_ARB:
12550+ CHECK_EXT1(ARB_draw_buffers, "GetIntegerv");
12551+ {
12552+ GLenum buffer;
12553+ if (pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
12554+ _mesa_error(ctx, GL_INVALID_ENUM, "glGet(GL_DRAW_BUFFERx_ARB)");
12555+ return;
12556+ }
12557+ buffer = ctx->DrawBuffer->ColorDrawBuffer[3];
12558+ params[0] = ENUM_TO_INT(buffer);
12559+ }
12560+ break;
12561+ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
12562+ CHECK_EXT1(OES_read_format, "GetIntegerv");
12563+ params[0] = ctx->Const.ColorReadType;
12564+ break;
12565+ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
12566+ CHECK_EXT1(OES_read_format, "GetIntegerv");
12567+ params[0] = ctx->Const.ColorReadFormat;
12568+ break;
12569+ case GL_NUM_FRAGMENT_REGISTERS_ATI:
12570+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12571+ params[0] = 6;
12572+ break;
12573+ case GL_NUM_FRAGMENT_CONSTANTS_ATI:
12574+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12575+ params[0] = 8;
12576+ break;
12577+ case GL_NUM_PASSES_ATI:
12578+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12579+ params[0] = 2;
12580+ break;
12581+ case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
12582+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12583+ params[0] = 8;
12584+ break;
12585+ case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
12586+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12587+ params[0] = 16;
12588+ break;
12589+ case GL_COLOR_ALPHA_PAIRING_ATI:
12590+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12591+ params[0] = BOOLEAN_TO_INT(GL_TRUE);
12592+ break;
12593+ case GL_NUM_LOOPBACK_COMPONENTS_ATI:
12594+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12595+ params[0] = 3;
12596+ break;
12597+ case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
12598+ CHECK_EXT1(ATI_fragment_shader, "GetIntegerv");
12599+ params[0] = 3;
12600+ break;
12601+ case GL_STENCIL_BACK_FUNC:
12602+ params[0] = ENUM_TO_INT(ctx->Stencil.Function[1]);
12603+ break;
12604+ case GL_STENCIL_BACK_VALUE_MASK:
12605+ params[0] = ctx->Stencil.ValueMask[1];
12606+ break;
12607+ case GL_STENCIL_BACK_REF:
12608+ params[0] = ctx->Stencil.Ref[1];
12609+ break;
12610+ case GL_STENCIL_BACK_FAIL:
12611+ params[0] = ENUM_TO_INT(ctx->Stencil.FailFunc[1]);
12612+ break;
12613+ case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
12614+ params[0] = ENUM_TO_INT(ctx->Stencil.ZFailFunc[1]);
12615+ break;
12616+ case GL_STENCIL_BACK_PASS_DEPTH_PASS:
12617+ params[0] = ENUM_TO_INT(ctx->Stencil.ZPassFunc[1]);
12618+ break;
12619+ case GL_FRAMEBUFFER_BINDING_EXT:
12620+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12621+ params[0] = ctx->DrawBuffer->Name;
12622+ break;
12623+ case GL_RENDERBUFFER_BINDING_EXT:
12624+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12625+ params[0] = ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0;
12626+ break;
12627+ case GL_MAX_COLOR_ATTACHMENTS_EXT:
12628+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12629+ params[0] = ctx->Const.MaxColorAttachments;
12630+ break;
12631+ case GL_MAX_RENDERBUFFER_SIZE_EXT:
12632+ CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
12633+ params[0] = ctx->Const.MaxRenderbufferSize;
12634+ break;
12635+ case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
12636+ CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
12637+ params[0] = MAX_FRAGMENT_UNIFORM_COMPONENTS;
12638+ break;
12639+ case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
12640+ CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
12641+ params[0] = ENUM_TO_INT(ctx->Hint.FragmentShaderDerivative);
12642+ break;
12643+ case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
12644+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12645+ params[0] = MAX_VERTEX_UNIFORM_COMPONENTS;
12646+ break;
12647+ case GL_MAX_VARYING_FLOATS_ARB:
12648+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12649+ params[0] = MAX_VARYING_FLOATS;
12650+ break;
12651+ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
12652+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12653+ params[0] = MAX_VERTEX_TEXTURE_IMAGE_UNITS;
12654+ break;
12655+ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
12656+ CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
12657+ params[0] = MAX_COMBINED_TEXTURE_IMAGE_UNITS;
12658+ break;
12659+ default:
12660+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv(pname=0x%x)", pname);
12661+ }
12662+}
12663+
12664+
12665+void GLAPIENTRY
12666+_mesa_GetDoublev( GLenum pname, GLdouble *params )
12667+{
12668+ const GLfloat magic = -1234.5F;
12669+ GLfloat values[16];
12670+ GLuint i;
12671+
12672+ if (!params)
12673+ return;
12674+
12675+ /* Init temp array to magic numbers so we can figure out how many values
12676+ * are returned by the GetFloatv() call.
12677+ */
12678+ for (i = 0; i < 16; i++)
12679+ values[i] = magic;
12680+
12681+ _mesa_GetFloatv(pname, values);
12682+
12683+ for (i = 0; i < 16 && values[i] != magic; i++)
12684+ params[i] = (GLdouble) values[i];
12685+}
12686+
12687Index: qemu-0.12.4/target-i386/mesa_gl.h
12688===================================================================
12689--- /dev/null
12690+++ qemu-0.12.4/target-i386/mesa_gl.h
12691@@ -0,0 +1,2251 @@
12692+/*
12693+ * Mesa 3-D graphics library
12694+ * Version: 6.5.1
12695+ *
12696+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
12697+ *
12698+ * Permission is hereby granted, free of charge, to any person obtaining a
12699+ * copy of this software and associated documentation files (the "Software"),
12700+ * to deal in the Software without restriction, including without limitation
12701+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12702+ * and/or sell copies of the Software, and to permit persons to whom the
12703+ * Software is furnished to do so, subject to the following conditions:
12704+ *
12705+ * The above copyright notice and this permission notice shall be included
12706+ * in all copies or substantial portions of the Software.
12707+ *
12708+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
12709+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12710+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
12711+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
12712+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
12713+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12714+ */
12715+
12716+
12717+#ifndef __gl_h_
12718+#define __gl_h_
12719+
12720+#if defined(USE_MGL_NAMESPACE)
12721+#include "gl_mangle.h"
12722+#endif
12723+
12724+
12725+/**********************************************************************
12726+ * Begin system-specific stuff. Do not do any of this when building
12727+ * for SciTech SNAP, as this is all done before this header file is
12728+ * included.
12729+ */
12730+#if !defined(__SCITECH_SNAP__)
12731+
12732+#if defined(__BEOS__)
12733+#include <stdlib.h> /* to get some BeOS-isms */
12734+#endif
12735+
12736+#if !defined(OPENSTEP) && (defined(NeXT) || defined(NeXT_PDO))
12737+#define OPENSTEP
12738+#endif
12739+
12740+#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__)
12741+#define __WIN32__
12742+#endif
12743+
12744+#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__))
12745+# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
12746+# define GLAPI __declspec(dllexport)
12747+# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
12748+# define GLAPI __declspec(dllimport)
12749+# else /* for use with static link lib build of Win32 edition only */
12750+# define GLAPI extern
12751+# endif /* _STATIC_MESA support */
12752+# define GLAPIENTRY __stdcall
12753+#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
12754+# define GLAPI extern
12755+# define GLAPIENTRY __stdcall
12756+#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
12757+# define GLAPI __attribute__((visibility("default")))
12758+# define GLAPIENTRY
12759+#endif /* WIN32 && !CYGWIN */
12760+
12761+#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__)
12762+# define PRAGMA_EXPORT_SUPPORTED 1
12763+#endif
12764+
12765+/*
12766+ * WINDOWS: Include windows.h here to define APIENTRY.
12767+ * It is also useful when applications include this file by
12768+ * including only glut.h, since glut.h depends on windows.h.
12769+ * Applications needing to include windows.h with parms other
12770+ * than "WIN32_LEAN_AND_MEAN" may include windows.h before
12771+ * glut.h or gl.h.
12772+ */
12773+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
12774+#define WIN32_LEAN_AND_MEAN 1
12775+#include <windows.h>
12776+#endif
12777+
12778+#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP) && !defined(__CYGWIN__)
12779+#include <GL/mesa_wgl.h>
12780+#endif
12781+
12782+#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
12783+#pragma import on
12784+#endif
12785+
12786+#ifndef GLAPI
12787+#define GLAPI extern
12788+#endif
12789+
12790+#ifndef GLAPIENTRY
12791+#define GLAPIENTRY
12792+#endif
12793+
12794+#ifndef APIENTRY
12795+#define APIENTRY GLAPIENTRY
12796+#endif
12797+
12798+/* "P" suffix to be used for a pointer to a function */
12799+#ifndef APIENTRYP
12800+#define APIENTRYP APIENTRY *
12801+#endif
12802+
12803+#ifndef GLAPIENTRYP
12804+#define GLAPIENTRYP GLAPIENTRY *
12805+#endif
12806+
12807+#ifdef CENTERLINE_CLPP
12808+#define signed
12809+#endif
12810+
12811+#if defined(PRAGMA_EXPORT_SUPPORTED)
12812+#pragma export on
12813+#endif
12814+
12815+#endif /* !__SCITECH_SNAP__ */
12816+/*
12817+ * End system-specific stuff.
12818+ **********************************************************************/
12819+
12820+
12821+
12822+#ifdef __cplusplus
12823+extern "C" {
12824+#endif
12825+
12826+
12827+
12828+#define GL_VERSION_1_1 1
12829+#define GL_VERSION_1_2 1
12830+#define GL_VERSION_1_3 1
12831+#define GL_ARB_imaging 1
12832+
12833+
12834+/*
12835+ * Datatypes
12836+ */
12837+typedef unsigned int GLenum;
12838+typedef unsigned char GLboolean;
12839+typedef unsigned int GLbitfield;
12840+typedef void GLvoid;
12841+typedef signed char GLbyte; /* 1-byte signed */
12842+typedef short GLshort; /* 2-byte signed */
12843+typedef int GLint; /* 4-byte signed */
12844+typedef unsigned char GLubyte; /* 1-byte unsigned */
12845+typedef unsigned short GLushort; /* 2-byte unsigned */
12846+typedef unsigned int GLuint; /* 4-byte unsigned */
12847+typedef int GLsizei; /* 4-byte signed */
12848+typedef float GLfloat; /* single precision float */
12849+typedef float GLclampf; /* single precision float in [0,1] */
12850+typedef double GLdouble; /* double precision float */
12851+typedef double GLclampd; /* double precision float in [0,1] */
12852+
12853+
12854+
12855+/*
12856+ * Constants
12857+ */
12858+
12859+/* Boolean values */
12860+#define GL_FALSE 0x0
12861+#define GL_TRUE 0x1
12862+
12863+/* Data types */
12864+#define GL_BYTE 0x1400
12865+#define GL_UNSIGNED_BYTE 0x1401
12866+#define GL_SHORT 0x1402
12867+#define GL_UNSIGNED_SHORT 0x1403
12868+#define GL_INT 0x1404
12869+#define GL_UNSIGNED_INT 0x1405
12870+#define GL_FLOAT 0x1406
12871+#define GL_2_BYTES 0x1407
12872+#define GL_3_BYTES 0x1408
12873+#define GL_4_BYTES 0x1409
12874+#define GL_DOUBLE 0x140A
12875+
12876+/* Primitives */
12877+#define GL_POINTS 0x0000
12878+#define GL_LINES 0x0001
12879+#define GL_LINE_LOOP 0x0002
12880+#define GL_LINE_STRIP 0x0003
12881+#define GL_TRIANGLES 0x0004
12882+#define GL_TRIANGLE_STRIP 0x0005
12883+#define GL_TRIANGLE_FAN 0x0006
12884+#define GL_QUADS 0x0007
12885+#define GL_QUAD_STRIP 0x0008
12886+#define GL_POLYGON 0x0009
12887+
12888+/* Vertex Arrays */
12889+#define GL_VERTEX_ARRAY 0x8074
12890+#define GL_NORMAL_ARRAY 0x8075
12891+#define GL_COLOR_ARRAY 0x8076
12892+#define GL_INDEX_ARRAY 0x8077
12893+#define GL_TEXTURE_COORD_ARRAY 0x8078
12894+#define GL_EDGE_FLAG_ARRAY 0x8079
12895+#define GL_VERTEX_ARRAY_SIZE 0x807A
12896+#define GL_VERTEX_ARRAY_TYPE 0x807B
12897+#define GL_VERTEX_ARRAY_STRIDE 0x807C
12898+#define GL_NORMAL_ARRAY_TYPE 0x807E
12899+#define GL_NORMAL_ARRAY_STRIDE 0x807F
12900+#define GL_COLOR_ARRAY_SIZE 0x8081
12901+#define GL_COLOR_ARRAY_TYPE 0x8082
12902+#define GL_COLOR_ARRAY_STRIDE 0x8083
12903+#define GL_INDEX_ARRAY_TYPE 0x8085
12904+#define GL_INDEX_ARRAY_STRIDE 0x8086
12905+#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
12906+#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
12907+#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
12908+#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
12909+#define GL_VERTEX_ARRAY_POINTER 0x808E
12910+#define GL_NORMAL_ARRAY_POINTER 0x808F
12911+#define GL_COLOR_ARRAY_POINTER 0x8090
12912+#define GL_INDEX_ARRAY_POINTER 0x8091
12913+#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
12914+#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
12915+#define GL_V2F 0x2A20
12916+#define GL_V3F 0x2A21
12917+#define GL_C4UB_V2F 0x2A22
12918+#define GL_C4UB_V3F 0x2A23
12919+#define GL_C3F_V3F 0x2A24
12920+#define GL_N3F_V3F 0x2A25
12921+#define GL_C4F_N3F_V3F 0x2A26
12922+#define GL_T2F_V3F 0x2A27
12923+#define GL_T4F_V4F 0x2A28
12924+#define GL_T2F_C4UB_V3F 0x2A29
12925+#define GL_T2F_C3F_V3F 0x2A2A
12926+#define GL_T2F_N3F_V3F 0x2A2B
12927+#define GL_T2F_C4F_N3F_V3F 0x2A2C
12928+#define GL_T4F_C4F_N3F_V4F 0x2A2D
12929+
12930+/* Matrix Mode */
12931+#define GL_MATRIX_MODE 0x0BA0
12932+#define GL_MODELVIEW 0x1700
12933+#define GL_PROJECTION 0x1701
12934+#define GL_TEXTURE 0x1702
12935+
12936+/* Points */
12937+#define GL_POINT_SMOOTH 0x0B10
12938+#define GL_POINT_SIZE 0x0B11
12939+#define GL_POINT_SIZE_GRANULARITY 0x0B13
12940+#define GL_POINT_SIZE_RANGE 0x0B12
12941+
12942+/* Lines */
12943+#define GL_LINE_SMOOTH 0x0B20
12944+#define GL_LINE_STIPPLE 0x0B24
12945+#define GL_LINE_STIPPLE_PATTERN 0x0B25
12946+#define GL_LINE_STIPPLE_REPEAT 0x0B26
12947+#define GL_LINE_WIDTH 0x0B21
12948+#define GL_LINE_WIDTH_GRANULARITY 0x0B23
12949+#define GL_LINE_WIDTH_RANGE 0x0B22
12950+
12951+/* Polygons */
12952+#define GL_POINT 0x1B00
12953+#define GL_LINE 0x1B01
12954+#define GL_FILL 0x1B02
12955+#define GL_CW 0x0900
12956+#define GL_CCW 0x0901
12957+#define GL_FRONT 0x0404
12958+#define GL_BACK 0x0405
12959+#define GL_POLYGON_MODE 0x0B40
12960+#define GL_POLYGON_SMOOTH 0x0B41
12961+#define GL_POLYGON_STIPPLE 0x0B42
12962+#define GL_EDGE_FLAG 0x0B43
12963+#define GL_CULL_FACE 0x0B44
12964+#define GL_CULL_FACE_MODE 0x0B45
12965+#define GL_FRONT_FACE 0x0B46
12966+#define GL_POLYGON_OFFSET_FACTOR 0x8038
12967+#define GL_POLYGON_OFFSET_UNITS 0x2A00
12968+#define GL_POLYGON_OFFSET_POINT 0x2A01
12969+#define GL_POLYGON_OFFSET_LINE 0x2A02
12970+#define GL_POLYGON_OFFSET_FILL 0x8037
12971+
12972+/* Display Lists */
12973+#define GL_COMPILE 0x1300
12974+#define GL_COMPILE_AND_EXECUTE 0x1301
12975+#define GL_LIST_BASE 0x0B32
12976+#define GL_LIST_INDEX 0x0B33
12977+#define GL_LIST_MODE 0x0B30
12978+
12979+/* Depth buffer */
12980+#define GL_NEVER 0x0200
12981+#define GL_LESS 0x0201
12982+#define GL_EQUAL 0x0202
12983+#define GL_LEQUAL 0x0203
12984+#define GL_GREATER 0x0204
12985+#define GL_NOTEQUAL 0x0205
12986+#define GL_GEQUAL 0x0206
12987+#define GL_ALWAYS 0x0207
12988+#define GL_DEPTH_TEST 0x0B71
12989+#define GL_DEPTH_BITS 0x0D56
12990+#define GL_DEPTH_CLEAR_VALUE 0x0B73
12991+#define GL_DEPTH_FUNC 0x0B74
12992+#define GL_DEPTH_RANGE 0x0B70
12993+#define GL_DEPTH_WRITEMASK 0x0B72
12994+#define GL_DEPTH_COMPONENT 0x1902
12995+
12996+/* Lighting */
12997+#define GL_LIGHTING 0x0B50
12998+#define GL_LIGHT0 0x4000
12999+#define GL_LIGHT1 0x4001
13000+#define GL_LIGHT2 0x4002
13001+#define GL_LIGHT3 0x4003
13002+#define GL_LIGHT4 0x4004
13003+#define GL_LIGHT5 0x4005
13004+#define GL_LIGHT6 0x4006
13005+#define GL_LIGHT7 0x4007
13006+#define GL_SPOT_EXPONENT 0x1205
13007+#define GL_SPOT_CUTOFF 0x1206
13008+#define GL_CONSTANT_ATTENUATION 0x1207
13009+#define GL_LINEAR_ATTENUATION 0x1208
13010+#define GL_QUADRATIC_ATTENUATION 0x1209
13011+#define GL_AMBIENT 0x1200
13012+#define GL_DIFFUSE 0x1201
13013+#define GL_SPECULAR 0x1202
13014+#define GL_SHININESS 0x1601
13015+#define GL_EMISSION 0x1600
13016+#define GL_POSITION 0x1203
13017+#define GL_SPOT_DIRECTION 0x1204
13018+#define GL_AMBIENT_AND_DIFFUSE 0x1602
13019+#define GL_COLOR_INDEXES 0x1603
13020+#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
13021+#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
13022+#define GL_LIGHT_MODEL_AMBIENT 0x0B53
13023+#define GL_FRONT_AND_BACK 0x0408
13024+#define GL_SHADE_MODEL 0x0B54
13025+#define GL_FLAT 0x1D00
13026+#define GL_SMOOTH 0x1D01
13027+#define GL_COLOR_MATERIAL 0x0B57
13028+#define GL_COLOR_MATERIAL_FACE 0x0B55
13029+#define GL_COLOR_MATERIAL_PARAMETER 0x0B56
13030+#define GL_NORMALIZE 0x0BA1
13031+
13032+/* User clipping planes */
13033+#define GL_CLIP_PLANE0 0x3000
13034+#define GL_CLIP_PLANE1 0x3001
13035+#define GL_CLIP_PLANE2 0x3002
13036+#define GL_CLIP_PLANE3 0x3003
13037+#define GL_CLIP_PLANE4 0x3004
13038+#define GL_CLIP_PLANE5 0x3005
13039+
13040+/* Accumulation buffer */
13041+#define GL_ACCUM_RED_BITS 0x0D58
13042+#define GL_ACCUM_GREEN_BITS 0x0D59
13043+#define GL_ACCUM_BLUE_BITS 0x0D5A
13044+#define GL_ACCUM_ALPHA_BITS 0x0D5B
13045+#define GL_ACCUM_CLEAR_VALUE 0x0B80
13046+#define GL_ACCUM 0x0100
13047+#define GL_ADD 0x0104
13048+#define GL_LOAD 0x0101
13049+#define GL_MULT 0x0103
13050+#define GL_RETURN 0x0102
13051+
13052+/* Alpha testing */
13053+#define GL_ALPHA_TEST 0x0BC0
13054+#define GL_ALPHA_TEST_REF 0x0BC2
13055+#define GL_ALPHA_TEST_FUNC 0x0BC1
13056+
13057+/* Blending */
13058+#define GL_BLEND 0x0BE2
13059+#define GL_BLEND_SRC 0x0BE1
13060+#define GL_BLEND_DST 0x0BE0
13061+#define GL_ZERO 0x0
13062+#define GL_ONE 0x1
13063+#define GL_SRC_COLOR 0x0300
13064+#define GL_ONE_MINUS_SRC_COLOR 0x0301
13065+#define GL_SRC_ALPHA 0x0302
13066+#define GL_ONE_MINUS_SRC_ALPHA 0x0303
13067+#define GL_DST_ALPHA 0x0304
13068+#define GL_ONE_MINUS_DST_ALPHA 0x0305
13069+#define GL_DST_COLOR 0x0306
13070+#define GL_ONE_MINUS_DST_COLOR 0x0307
13071+#define GL_SRC_ALPHA_SATURATE 0x0308
13072+
13073+/* Render Mode */
13074+#define GL_FEEDBACK 0x1C01
13075+#define GL_RENDER 0x1C00
13076+#define GL_SELECT 0x1C02
13077+
13078+/* Feedback */
13079+#define GL_2D 0x0600
13080+#define GL_3D 0x0601
13081+#define GL_3D_COLOR 0x0602
13082+#define GL_3D_COLOR_TEXTURE 0x0603
13083+#define GL_4D_COLOR_TEXTURE 0x0604
13084+#define GL_POINT_TOKEN 0x0701
13085+#define GL_LINE_TOKEN 0x0702
13086+#define GL_LINE_RESET_TOKEN 0x0707
13087+#define GL_POLYGON_TOKEN 0x0703
13088+#define GL_BITMAP_TOKEN 0x0704
13089+#define GL_DRAW_PIXEL_TOKEN 0x0705
13090+#define GL_COPY_PIXEL_TOKEN 0x0706
13091+#define GL_PASS_THROUGH_TOKEN 0x0700
13092+#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0
13093+#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1
13094+#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
13095+
13096+/* Selection */
13097+#define GL_SELECTION_BUFFER_POINTER 0x0DF3
13098+#define GL_SELECTION_BUFFER_SIZE 0x0DF4
13099+
13100+/* Fog */
13101+#define GL_FOG 0x0B60
13102+#define GL_FOG_MODE 0x0B65
13103+#define GL_FOG_DENSITY 0x0B62
13104+#define GL_FOG_COLOR 0x0B66
13105+#define GL_FOG_INDEX 0x0B61
13106+#define GL_FOG_START 0x0B63
13107+#define GL_FOG_END 0x0B64
13108+#define GL_LINEAR 0x2601
13109+#define GL_EXP 0x0800
13110+#define GL_EXP2 0x0801
13111+
13112+/* Logic Ops */
13113+#define GL_LOGIC_OP 0x0BF1
13114+#define GL_INDEX_LOGIC_OP 0x0BF1
13115+#define GL_COLOR_LOGIC_OP 0x0BF2
13116+#define GL_LOGIC_OP_MODE 0x0BF0
13117+#define GL_CLEAR 0x1500
13118+#define GL_SET 0x150F
13119+#define GL_COPY 0x1503
13120+#define GL_COPY_INVERTED 0x150C
13121+#define GL_NOOP 0x1505
13122+#define GL_INVERT 0x150A
13123+#define GL_AND 0x1501
13124+#define GL_NAND 0x150E
13125+#define GL_OR 0x1507
13126+#define GL_NOR 0x1508
13127+#define GL_XOR 0x1506
13128+#define GL_EQUIV 0x1509
13129+#define GL_AND_REVERSE 0x1502
13130+#define GL_AND_INVERTED 0x1504
13131+#define GL_OR_REVERSE 0x150B
13132+#define GL_OR_INVERTED 0x150D
13133+
13134+/* Stencil */
13135+#define GL_STENCIL_BITS 0x0D57
13136+#define GL_STENCIL_TEST 0x0B90
13137+#define GL_STENCIL_CLEAR_VALUE 0x0B91
13138+#define GL_STENCIL_FUNC 0x0B92
13139+#define GL_STENCIL_VALUE_MASK 0x0B93
13140+#define GL_STENCIL_FAIL 0x0B94
13141+#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
13142+#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
13143+#define GL_STENCIL_REF 0x0B97
13144+#define GL_STENCIL_WRITEMASK 0x0B98
13145+#define GL_STENCIL_INDEX 0x1901
13146+#define GL_KEEP 0x1E00
13147+#define GL_REPLACE 0x1E01
13148+#define GL_INCR 0x1E02
13149+#define GL_DECR 0x1E03
13150+
13151+/* Buffers, Pixel Drawing/Reading */
13152+#define GL_NONE 0x0
13153+#define GL_LEFT 0x0406
13154+#define GL_RIGHT 0x0407
13155+/*GL_FRONT 0x0404 */
13156+/*GL_BACK 0x0405 */
13157+/*GL_FRONT_AND_BACK 0x0408 */
13158+#define GL_FRONT_LEFT 0x0400
13159+#define GL_FRONT_RIGHT 0x0401
13160+#define GL_BACK_LEFT 0x0402
13161+#define GL_BACK_RIGHT 0x0403
13162+#define GL_AUX0 0x0409
13163+#define GL_AUX1 0x040A
13164+#define GL_AUX2 0x040B
13165+#define GL_AUX3 0x040C
13166+#define GL_COLOR_INDEX 0x1900
13167+#define GL_RED 0x1903
13168+#define GL_GREEN 0x1904
13169+#define GL_BLUE 0x1905
13170+#define GL_ALPHA 0x1906
13171+#define GL_LUMINANCE 0x1909
13172+#define GL_LUMINANCE_ALPHA 0x190A
13173+#define GL_ALPHA_BITS 0x0D55
13174+#define GL_RED_BITS 0x0D52
13175+#define GL_GREEN_BITS 0x0D53
13176+#define GL_BLUE_BITS 0x0D54
13177+#define GL_INDEX_BITS 0x0D51
13178+#define GL_SUBPIXEL_BITS 0x0D50
13179+#define GL_AUX_BUFFERS 0x0C00
13180+#define GL_READ_BUFFER 0x0C02
13181+#define GL_DRAW_BUFFER 0x0C01
13182+#define GL_DOUBLEBUFFER 0x0C32
13183+#define GL_STEREO 0x0C33
13184+#define GL_BITMAP 0x1A00
13185+#define GL_COLOR 0x1800
13186+#define GL_DEPTH 0x1801
13187+#define GL_STENCIL 0x1802
13188+#define GL_DITHER 0x0BD0
13189+#define GL_RGB 0x1907
13190+#define GL_RGBA 0x1908
13191+
13192+/* Implementation limits */
13193+#define GL_MAX_LIST_NESTING 0x0B31
13194+#define GL_MAX_EVAL_ORDER 0x0D30
13195+#define GL_MAX_LIGHTS 0x0D31
13196+#define GL_MAX_CLIP_PLANES 0x0D32
13197+#define GL_MAX_TEXTURE_SIZE 0x0D33
13198+#define GL_MAX_PIXEL_MAP_TABLE 0x0D34
13199+#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
13200+#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
13201+#define GL_MAX_NAME_STACK_DEPTH 0x0D37
13202+#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
13203+#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
13204+#define GL_MAX_VIEWPORT_DIMS 0x0D3A
13205+#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
13206+
13207+/* Gets */
13208+#define GL_ATTRIB_STACK_DEPTH 0x0BB0
13209+#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
13210+#define GL_COLOR_CLEAR_VALUE 0x0C22
13211+#define GL_COLOR_WRITEMASK 0x0C23
13212+#define GL_CURRENT_INDEX 0x0B01
13213+#define GL_CURRENT_COLOR 0x0B00
13214+#define GL_CURRENT_NORMAL 0x0B02
13215+#define GL_CURRENT_RASTER_COLOR 0x0B04
13216+#define GL_CURRENT_RASTER_DISTANCE 0x0B09
13217+#define GL_CURRENT_RASTER_INDEX 0x0B05
13218+#define GL_CURRENT_RASTER_POSITION 0x0B07
13219+#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
13220+#define GL_CURRENT_RASTER_POSITION_VALID 0x0B08
13221+#define GL_CURRENT_TEXTURE_COORDS 0x0B03
13222+#define GL_INDEX_CLEAR_VALUE 0x0C20
13223+#define GL_INDEX_MODE 0x0C30
13224+#define GL_INDEX_WRITEMASK 0x0C21
13225+#define GL_MODELVIEW_MATRIX 0x0BA6
13226+#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
13227+#define GL_NAME_STACK_DEPTH 0x0D70
13228+#define GL_PROJECTION_MATRIX 0x0BA7
13229+#define GL_PROJECTION_STACK_DEPTH 0x0BA4
13230+#define GL_RENDER_MODE 0x0C40
13231+#define GL_RGBA_MODE 0x0C31
13232+#define GL_TEXTURE_MATRIX 0x0BA8
13233+#define GL_TEXTURE_STACK_DEPTH 0x0BA5
13234+#define GL_VIEWPORT 0x0BA2
13235+
13236+/* Evaluators */
13237+#define GL_AUTO_NORMAL 0x0D80
13238+#define GL_MAP1_COLOR_4 0x0D90
13239+#define GL_MAP1_INDEX 0x0D91
13240+#define GL_MAP1_NORMAL 0x0D92
13241+#define GL_MAP1_TEXTURE_COORD_1 0x0D93
13242+#define GL_MAP1_TEXTURE_COORD_2 0x0D94
13243+#define GL_MAP1_TEXTURE_COORD_3 0x0D95
13244+#define GL_MAP1_TEXTURE_COORD_4 0x0D96
13245+#define GL_MAP1_VERTEX_3 0x0D97
13246+#define GL_MAP1_VERTEX_4 0x0D98
13247+#define GL_MAP2_COLOR_4 0x0DB0
13248+#define GL_MAP2_INDEX 0x0DB1
13249+#define GL_MAP2_NORMAL 0x0DB2
13250+#define GL_MAP2_TEXTURE_COORD_1 0x0DB3
13251+#define GL_MAP2_TEXTURE_COORD_2 0x0DB4
13252+#define GL_MAP2_TEXTURE_COORD_3 0x0DB5
13253+#define GL_MAP2_TEXTURE_COORD_4 0x0DB6
13254+#define GL_MAP2_VERTEX_3 0x0DB7
13255+#define GL_MAP2_VERTEX_4 0x0DB8
13256+#define GL_MAP1_GRID_DOMAIN 0x0DD0
13257+#define GL_MAP1_GRID_SEGMENTS 0x0DD1
13258+#define GL_MAP2_GRID_DOMAIN 0x0DD2
13259+#define GL_MAP2_GRID_SEGMENTS 0x0DD3
13260+#define GL_COEFF 0x0A00
13261+#define GL_ORDER 0x0A01
13262+#define GL_DOMAIN 0x0A02
13263+
13264+/* Hints */
13265+#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
13266+#define GL_POINT_SMOOTH_HINT 0x0C51
13267+#define GL_LINE_SMOOTH_HINT 0x0C52
13268+#define GL_POLYGON_SMOOTH_HINT 0x0C53
13269+#define GL_FOG_HINT 0x0C54
13270+#define GL_DONT_CARE 0x1100
13271+#define GL_FASTEST 0x1101
13272+#define GL_NICEST 0x1102
13273+
13274+/* Scissor box */
13275+#define GL_SCISSOR_BOX 0x0C10
13276+#define GL_SCISSOR_TEST 0x0C11
13277+
13278+/* Pixel Mode / Transfer */
13279+#define GL_MAP_COLOR 0x0D10
13280+#define GL_MAP_STENCIL 0x0D11
13281+#define GL_INDEX_SHIFT 0x0D12
13282+#define GL_INDEX_OFFSET 0x0D13
13283+#define GL_RED_SCALE 0x0D14
13284+#define GL_RED_BIAS 0x0D15
13285+#define GL_GREEN_SCALE 0x0D18
13286+#define GL_GREEN_BIAS 0x0D19
13287+#define GL_BLUE_SCALE 0x0D1A
13288+#define GL_BLUE_BIAS 0x0D1B
13289+#define GL_ALPHA_SCALE 0x0D1C
13290+#define GL_ALPHA_BIAS 0x0D1D
13291+#define GL_DEPTH_SCALE 0x0D1E
13292+#define GL_DEPTH_BIAS 0x0D1F
13293+#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
13294+#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
13295+#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
13296+#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
13297+#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
13298+#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
13299+#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
13300+#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
13301+#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
13302+#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
13303+#define GL_PIXEL_MAP_S_TO_S 0x0C71
13304+#define GL_PIXEL_MAP_I_TO_I 0x0C70
13305+#define GL_PIXEL_MAP_I_TO_R 0x0C72
13306+#define GL_PIXEL_MAP_I_TO_G 0x0C73
13307+#define GL_PIXEL_MAP_I_TO_B 0x0C74
13308+#define GL_PIXEL_MAP_I_TO_A 0x0C75
13309+#define GL_PIXEL_MAP_R_TO_R 0x0C76
13310+#define GL_PIXEL_MAP_G_TO_G 0x0C77
13311+#define GL_PIXEL_MAP_B_TO_B 0x0C78
13312+#define GL_PIXEL_MAP_A_TO_A 0x0C79
13313+#define GL_PACK_ALIGNMENT 0x0D05
13314+#define GL_PACK_LSB_FIRST 0x0D01
13315+#define GL_PACK_ROW_LENGTH 0x0D02
13316+#define GL_PACK_SKIP_PIXELS 0x0D04
13317+#define GL_PACK_SKIP_ROWS 0x0D03
13318+#define GL_PACK_SWAP_BYTES 0x0D00
13319+#define GL_UNPACK_ALIGNMENT 0x0CF5
13320+#define GL_UNPACK_LSB_FIRST 0x0CF1
13321+#define GL_UNPACK_ROW_LENGTH 0x0CF2
13322+#define GL_UNPACK_SKIP_PIXELS 0x0CF4
13323+#define GL_UNPACK_SKIP_ROWS 0x0CF3
13324+#define GL_UNPACK_SWAP_BYTES 0x0CF0
13325+#define GL_ZOOM_X 0x0D16
13326+#define GL_ZOOM_Y 0x0D17
13327+
13328+/* Texture mapping */
13329+#define GL_TEXTURE_ENV 0x2300
13330+#define GL_TEXTURE_ENV_MODE 0x2200
13331+#define GL_TEXTURE_1D 0x0DE0
13332+#define GL_TEXTURE_2D 0x0DE1
13333+#define GL_TEXTURE_WRAP_S 0x2802
13334+#define GL_TEXTURE_WRAP_T 0x2803
13335+#define GL_TEXTURE_MAG_FILTER 0x2800
13336+#define GL_TEXTURE_MIN_FILTER 0x2801
13337+#define GL_TEXTURE_ENV_COLOR 0x2201
13338+#define GL_TEXTURE_GEN_S 0x0C60
13339+#define GL_TEXTURE_GEN_T 0x0C61
13340+#define GL_TEXTURE_GEN_MODE 0x2500
13341+#define GL_TEXTURE_BORDER_COLOR 0x1004
13342+#define GL_TEXTURE_WIDTH 0x1000
13343+#define GL_TEXTURE_HEIGHT 0x1001
13344+#define GL_TEXTURE_BORDER 0x1005
13345+#define GL_TEXTURE_COMPONENTS 0x1003
13346+#define GL_TEXTURE_RED_SIZE 0x805C
13347+#define GL_TEXTURE_GREEN_SIZE 0x805D
13348+#define GL_TEXTURE_BLUE_SIZE 0x805E
13349+#define GL_TEXTURE_ALPHA_SIZE 0x805F
13350+#define GL_TEXTURE_LUMINANCE_SIZE 0x8060
13351+#define GL_TEXTURE_INTENSITY_SIZE 0x8061
13352+#define GL_NEAREST_MIPMAP_NEAREST 0x2700
13353+#define GL_NEAREST_MIPMAP_LINEAR 0x2702
13354+#define GL_LINEAR_MIPMAP_NEAREST 0x2701
13355+#define GL_LINEAR_MIPMAP_LINEAR 0x2703
13356+#define GL_OBJECT_LINEAR 0x2401
13357+#define GL_OBJECT_PLANE 0x2501
13358+#define GL_EYE_LINEAR 0x2400
13359+#define GL_EYE_PLANE 0x2502
13360+#define GL_SPHERE_MAP 0x2402
13361+#define GL_DECAL 0x2101
13362+#define GL_MODULATE 0x2100
13363+#define GL_NEAREST 0x2600
13364+#define GL_REPEAT 0x2901
13365+#define GL_CLAMP 0x2900
13366+#define GL_S 0x2000
13367+#define GL_T 0x2001
13368+#define GL_R 0x2002
13369+#define GL_Q 0x2003
13370+#define GL_TEXTURE_GEN_R 0x0C62
13371+#define GL_TEXTURE_GEN_Q 0x0C63
13372+
13373+/* Utility */
13374+#define GL_VENDOR 0x1F00
13375+#define GL_RENDERER 0x1F01
13376+#define GL_VERSION 0x1F02
13377+#define GL_EXTENSIONS 0x1F03
13378+
13379+/* Errors */
13380+#define GL_NO_ERROR 0x0
13381+#define GL_INVALID_ENUM 0x0500
13382+#define GL_INVALID_VALUE 0x0501
13383+#define GL_INVALID_OPERATION 0x0502
13384+#define GL_STACK_OVERFLOW 0x0503
13385+#define GL_STACK_UNDERFLOW 0x0504
13386+#define GL_OUT_OF_MEMORY 0x0505
13387+
13388+/* glPush/PopAttrib bits */
13389+#define GL_CURRENT_BIT 0x00000001
13390+#define GL_POINT_BIT 0x00000002
13391+#define GL_LINE_BIT 0x00000004
13392+#define GL_POLYGON_BIT 0x00000008
13393+#define GL_POLYGON_STIPPLE_BIT 0x00000010
13394+#define GL_PIXEL_MODE_BIT 0x00000020
13395+#define GL_LIGHTING_BIT 0x00000040
13396+#define GL_FOG_BIT 0x00000080
13397+#define GL_DEPTH_BUFFER_BIT 0x00000100
13398+#define GL_ACCUM_BUFFER_BIT 0x00000200
13399+#define GL_STENCIL_BUFFER_BIT 0x00000400
13400+#define GL_VIEWPORT_BIT 0x00000800
13401+#define GL_TRANSFORM_BIT 0x00001000
13402+#define GL_ENABLE_BIT 0x00002000
13403+#define GL_COLOR_BUFFER_BIT 0x00004000
13404+#define GL_HINT_BIT 0x00008000
13405+#define GL_EVAL_BIT 0x00010000
13406+#define GL_LIST_BIT 0x00020000
13407+#define GL_TEXTURE_BIT 0x00040000
13408+#define GL_SCISSOR_BIT 0x00080000
13409+#define GL_ALL_ATTRIB_BITS 0x000FFFFF
13410+
13411+
13412+/* OpenGL 1.1 */
13413+#define GL_PROXY_TEXTURE_1D 0x8063
13414+#define GL_PROXY_TEXTURE_2D 0x8064
13415+#define GL_TEXTURE_PRIORITY 0x8066
13416+#define GL_TEXTURE_RESIDENT 0x8067
13417+#define GL_TEXTURE_BINDING_1D 0x8068
13418+#define GL_TEXTURE_BINDING_2D 0x8069
13419+#define GL_TEXTURE_INTERNAL_FORMAT 0x1003
13420+#define GL_ALPHA4 0x803B
13421+#define GL_ALPHA8 0x803C
13422+#define GL_ALPHA12 0x803D
13423+#define GL_ALPHA16 0x803E
13424+#define GL_LUMINANCE4 0x803F
13425+#define GL_LUMINANCE8 0x8040
13426+#define GL_LUMINANCE12 0x8041
13427+#define GL_LUMINANCE16 0x8042
13428+#define GL_LUMINANCE4_ALPHA4 0x8043
13429+#define GL_LUMINANCE6_ALPHA2 0x8044
13430+#define GL_LUMINANCE8_ALPHA8 0x8045
13431+#define GL_LUMINANCE12_ALPHA4 0x8046
13432+#define GL_LUMINANCE12_ALPHA12 0x8047
13433+#define GL_LUMINANCE16_ALPHA16 0x8048
13434+#define GL_INTENSITY 0x8049
13435+#define GL_INTENSITY4 0x804A
13436+#define GL_INTENSITY8 0x804B
13437+#define GL_INTENSITY12 0x804C
13438+#define GL_INTENSITY16 0x804D
13439+#define GL_R3_G3_B2 0x2A10
13440+#define GL_RGB4 0x804F
13441+#define GL_RGB5 0x8050
13442+#define GL_RGB8 0x8051
13443+#define GL_RGB10 0x8052
13444+#define GL_RGB12 0x8053
13445+#define GL_RGB16 0x8054
13446+#define GL_RGBA2 0x8055
13447+#define GL_RGBA4 0x8056
13448+#define GL_RGB5_A1 0x8057
13449+#define GL_RGBA8 0x8058
13450+#define GL_RGB10_A2 0x8059
13451+#define GL_RGBA12 0x805A
13452+#define GL_RGBA16 0x805B
13453+#define GL_CLIENT_PIXEL_STORE_BIT 0x00000001
13454+#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
13455+#define GL_ALL_CLIENT_ATTRIB_BITS 0xFFFFFFFF
13456+#define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF
13457+
13458+
13459+
13460+/*
13461+ * Miscellaneous
13462+ */
13463+
13464+GLAPI void GLAPIENTRY glClearIndex( GLfloat c );
13465+
13466+GLAPI void GLAPIENTRY glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
13467+
13468+GLAPI void GLAPIENTRY glClear( GLbitfield mask );
13469+
13470+GLAPI void GLAPIENTRY glIndexMask( GLuint mask );
13471+
13472+GLAPI void GLAPIENTRY glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );
13473+
13474+GLAPI void GLAPIENTRY glAlphaFunc( GLenum func, GLclampf ref );
13475+
13476+GLAPI void GLAPIENTRY glBlendFunc( GLenum sfactor, GLenum dfactor );
13477+
13478+GLAPI void GLAPIENTRY glLogicOp( GLenum opcode );
13479+
13480+GLAPI void GLAPIENTRY glCullFace( GLenum mode );
13481+
13482+GLAPI void GLAPIENTRY glFrontFace( GLenum mode );
13483+
13484+GLAPI void GLAPIENTRY glPointSize( GLfloat size );
13485+
13486+GLAPI void GLAPIENTRY glLineWidth( GLfloat width );
13487+
13488+GLAPI void GLAPIENTRY glLineStipple( GLint factor, GLushort pattern );
13489+
13490+GLAPI void GLAPIENTRY glPolygonMode( GLenum face, GLenum mode );
13491+
13492+GLAPI void GLAPIENTRY glPolygonOffset( GLfloat factor, GLfloat units );
13493+
13494+GLAPI void GLAPIENTRY glPolygonStipple( const GLubyte *mask );
13495+
13496+GLAPI void GLAPIENTRY glGetPolygonStipple( GLubyte *mask );
13497+
13498+GLAPI void GLAPIENTRY glEdgeFlag( GLboolean flag );
13499+
13500+GLAPI void GLAPIENTRY glEdgeFlagv( const GLboolean *flag );
13501+
13502+GLAPI void GLAPIENTRY glScissor( GLint x, GLint y, GLsizei width, GLsizei height);
13503+
13504+GLAPI void GLAPIENTRY glClipPlane( GLenum plane, const GLdouble *equation );
13505+
13506+GLAPI void GLAPIENTRY glGetClipPlane( GLenum plane, GLdouble *equation );
13507+
13508+GLAPI void GLAPIENTRY glDrawBuffer( GLenum mode );
13509+
13510+GLAPI void GLAPIENTRY glReadBuffer( GLenum mode );
13511+
13512+GLAPI void GLAPIENTRY glEnable( GLenum cap );
13513+
13514+GLAPI void GLAPIENTRY glDisable( GLenum cap );
13515+
13516+GLAPI GLboolean GLAPIENTRY glIsEnabled( GLenum cap );
13517+
13518+
13519+GLAPI void GLAPIENTRY glEnableClientState( GLenum cap ); /* 1.1 */
13520+
13521+GLAPI void GLAPIENTRY glDisableClientState( GLenum cap ); /* 1.1 */
13522+
13523+
13524+GLAPI void GLAPIENTRY glGetBooleanv( GLenum pname, GLboolean *params );
13525+
13526+GLAPI void GLAPIENTRY glGetDoublev( GLenum pname, GLdouble *params );
13527+
13528+GLAPI void GLAPIENTRY glGetFloatv( GLenum pname, GLfloat *params );
13529+
13530+GLAPI void GLAPIENTRY glGetIntegerv( GLenum pname, GLint *params );
13531+
13532+
13533+GLAPI void GLAPIENTRY glPushAttrib( GLbitfield mask );
13534+
13535+GLAPI void GLAPIENTRY glPopAttrib( void );
13536+
13537+
13538+GLAPI void GLAPIENTRY glPushClientAttrib( GLbitfield mask ); /* 1.1 */
13539+
13540+GLAPI void GLAPIENTRY glPopClientAttrib( void ); /* 1.1 */
13541+
13542+
13543+GLAPI GLint GLAPIENTRY glRenderMode( GLenum mode );
13544+
13545+GLAPI GLenum GLAPIENTRY glGetError( void );
13546+
13547+GLAPI const GLubyte * GLAPIENTRY glGetString( GLenum name );
13548+
13549+GLAPI void GLAPIENTRY glFinish( void );
13550+
13551+GLAPI void GLAPIENTRY glFlush( void );
13552+
13553+GLAPI void GLAPIENTRY glHint( GLenum target, GLenum mode );
13554+
13555+
13556+/*
13557+ * Depth Buffer
13558+ */
13559+
13560+GLAPI void GLAPIENTRY glClearDepth( GLclampd depth );
13561+
13562+GLAPI void GLAPIENTRY glDepthFunc( GLenum func );
13563+
13564+GLAPI void GLAPIENTRY glDepthMask( GLboolean flag );
13565+
13566+GLAPI void GLAPIENTRY glDepthRange( GLclampd near_val, GLclampd far_val );
13567+
13568+
13569+/*
13570+ * Accumulation Buffer
13571+ */
13572+
13573+GLAPI void GLAPIENTRY glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
13574+
13575+GLAPI void GLAPIENTRY glAccum( GLenum op, GLfloat value );
13576+
13577+
13578+/*
13579+ * Transformation
13580+ */
13581+
13582+GLAPI void GLAPIENTRY glMatrixMode( GLenum mode );
13583+
13584+GLAPI void GLAPIENTRY glOrtho( GLdouble left, GLdouble right,
13585+ GLdouble bottom, GLdouble top,
13586+ GLdouble near_val, GLdouble far_val );
13587+
13588+GLAPI void GLAPIENTRY glFrustum( GLdouble left, GLdouble right,
13589+ GLdouble bottom, GLdouble top,
13590+ GLdouble near_val, GLdouble far_val );
13591+
13592+GLAPI void GLAPIENTRY glViewport( GLint x, GLint y,
13593+ GLsizei width, GLsizei height );
13594+
13595+GLAPI void GLAPIENTRY glPushMatrix( void );
13596+
13597+GLAPI void GLAPIENTRY glPopMatrix( void );
13598+
13599+GLAPI void GLAPIENTRY glLoadIdentity( void );
13600+
13601+GLAPI void GLAPIENTRY glLoadMatrixd( const GLdouble *m );
13602+GLAPI void GLAPIENTRY glLoadMatrixf( const GLfloat *m );
13603+
13604+GLAPI void GLAPIENTRY glMultMatrixd( const GLdouble *m );
13605+GLAPI void GLAPIENTRY glMultMatrixf( const GLfloat *m );
13606+
13607+GLAPI void GLAPIENTRY glRotated( GLdouble angle,
13608+ GLdouble x, GLdouble y, GLdouble z );
13609+GLAPI void GLAPIENTRY glRotatef( GLfloat angle,
13610+ GLfloat x, GLfloat y, GLfloat z );
13611+
13612+GLAPI void GLAPIENTRY glScaled( GLdouble x, GLdouble y, GLdouble z );
13613+GLAPI void GLAPIENTRY glScalef( GLfloat x, GLfloat y, GLfloat z );
13614+
13615+GLAPI void GLAPIENTRY glTranslated( GLdouble x, GLdouble y, GLdouble z );
13616+GLAPI void GLAPIENTRY glTranslatef( GLfloat x, GLfloat y, GLfloat z );
13617+
13618+
13619+/*
13620+ * Display Lists
13621+ */
13622+
13623+GLAPI GLboolean GLAPIENTRY glIsList( GLuint list );
13624+
13625+GLAPI void GLAPIENTRY glDeleteLists( GLuint list, GLsizei range );
13626+
13627+GLAPI GLuint GLAPIENTRY glGenLists( GLsizei range );
13628+
13629+GLAPI void GLAPIENTRY glNewList( GLuint list, GLenum mode );
13630+
13631+GLAPI void GLAPIENTRY glEndList( void );
13632+
13633+GLAPI void GLAPIENTRY glCallList( GLuint list );
13634+
13635+GLAPI void GLAPIENTRY glCallLists( GLsizei n, GLenum type,
13636+ const GLvoid *lists );
13637+
13638+GLAPI void GLAPIENTRY glListBase( GLuint base );
13639+
13640+
13641+/*
13642+ * Drawing Functions
13643+ */
13644+
13645+GLAPI void GLAPIENTRY glBegin( GLenum mode );
13646+
13647+GLAPI void GLAPIENTRY glEnd( void );
13648+
13649+
13650+GLAPI void GLAPIENTRY glVertex2d( GLdouble x, GLdouble y );
13651+GLAPI void GLAPIENTRY glVertex2f( GLfloat x, GLfloat y );
13652+GLAPI void GLAPIENTRY glVertex2i( GLint x, GLint y );
13653+GLAPI void GLAPIENTRY glVertex2s( GLshort x, GLshort y );
13654+
13655+GLAPI void GLAPIENTRY glVertex3d( GLdouble x, GLdouble y, GLdouble z );
13656+GLAPI void GLAPIENTRY glVertex3f( GLfloat x, GLfloat y, GLfloat z );
13657+GLAPI void GLAPIENTRY glVertex3i( GLint x, GLint y, GLint z );
13658+GLAPI void GLAPIENTRY glVertex3s( GLshort x, GLshort y, GLshort z );
13659+
13660+GLAPI void GLAPIENTRY glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
13661+GLAPI void GLAPIENTRY glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
13662+GLAPI void GLAPIENTRY glVertex4i( GLint x, GLint y, GLint z, GLint w );
13663+GLAPI void GLAPIENTRY glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w );
13664+
13665+GLAPI void GLAPIENTRY glVertex2dv( const GLdouble *v );
13666+GLAPI void GLAPIENTRY glVertex2fv( const GLfloat *v );
13667+GLAPI void GLAPIENTRY glVertex2iv( const GLint *v );
13668+GLAPI void GLAPIENTRY glVertex2sv( const GLshort *v );
13669+
13670+GLAPI void GLAPIENTRY glVertex3dv( const GLdouble *v );
13671+GLAPI void GLAPIENTRY glVertex3fv( const GLfloat *v );
13672+GLAPI void GLAPIENTRY glVertex3iv( const GLint *v );
13673+GLAPI void GLAPIENTRY glVertex3sv( const GLshort *v );
13674+
13675+GLAPI void GLAPIENTRY glVertex4dv( const GLdouble *v );
13676+GLAPI void GLAPIENTRY glVertex4fv( const GLfloat *v );
13677+GLAPI void GLAPIENTRY glVertex4iv( const GLint *v );
13678+GLAPI void GLAPIENTRY glVertex4sv( const GLshort *v );
13679+
13680+
13681+GLAPI void GLAPIENTRY glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz );
13682+GLAPI void GLAPIENTRY glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz );
13683+GLAPI void GLAPIENTRY glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz );
13684+GLAPI void GLAPIENTRY glNormal3i( GLint nx, GLint ny, GLint nz );
13685+GLAPI void GLAPIENTRY glNormal3s( GLshort nx, GLshort ny, GLshort nz );
13686+
13687+GLAPI void GLAPIENTRY glNormal3bv( const GLbyte *v );
13688+GLAPI void GLAPIENTRY glNormal3dv( const GLdouble *v );
13689+GLAPI void GLAPIENTRY glNormal3fv( const GLfloat *v );
13690+GLAPI void GLAPIENTRY glNormal3iv( const GLint *v );
13691+GLAPI void GLAPIENTRY glNormal3sv( const GLshort *v );
13692+
13693+
13694+GLAPI void GLAPIENTRY glIndexd( GLdouble c );
13695+GLAPI void GLAPIENTRY glIndexf( GLfloat c );
13696+GLAPI void GLAPIENTRY glIndexi( GLint c );
13697+GLAPI void GLAPIENTRY glIndexs( GLshort c );
13698+GLAPI void GLAPIENTRY glIndexub( GLubyte c ); /* 1.1 */
13699+
13700+GLAPI void GLAPIENTRY glIndexdv( const GLdouble *c );
13701+GLAPI void GLAPIENTRY glIndexfv( const GLfloat *c );
13702+GLAPI void GLAPIENTRY glIndexiv( const GLint *c );
13703+GLAPI void GLAPIENTRY glIndexsv( const GLshort *c );
13704+GLAPI void GLAPIENTRY glIndexubv( const GLubyte *c ); /* 1.1 */
13705+
13706+GLAPI void GLAPIENTRY glColor3b( GLbyte red, GLbyte green, GLbyte blue );
13707+GLAPI void GLAPIENTRY glColor3d( GLdouble red, GLdouble green, GLdouble blue );
13708+GLAPI void GLAPIENTRY glColor3f( GLfloat red, GLfloat green, GLfloat blue );
13709+GLAPI void GLAPIENTRY glColor3i( GLint red, GLint green, GLint blue );
13710+GLAPI void GLAPIENTRY glColor3s( GLshort red, GLshort green, GLshort blue );
13711+GLAPI void GLAPIENTRY glColor3ub( GLubyte red, GLubyte green, GLubyte blue );
13712+GLAPI void GLAPIENTRY glColor3ui( GLuint red, GLuint green, GLuint blue );
13713+GLAPI void GLAPIENTRY glColor3us( GLushort red, GLushort green, GLushort blue );
13714+
13715+GLAPI void GLAPIENTRY glColor4b( GLbyte red, GLbyte green,
13716+ GLbyte blue, GLbyte alpha );
13717+GLAPI void GLAPIENTRY glColor4d( GLdouble red, GLdouble green,
13718+ GLdouble blue, GLdouble alpha );
13719+GLAPI void GLAPIENTRY glColor4f( GLfloat red, GLfloat green,
13720+ GLfloat blue, GLfloat alpha );
13721+GLAPI void GLAPIENTRY glColor4i( GLint red, GLint green,
13722+ GLint blue, GLint alpha );
13723+GLAPI void GLAPIENTRY glColor4s( GLshort red, GLshort green,
13724+ GLshort blue, GLshort alpha );
13725+GLAPI void GLAPIENTRY glColor4ub( GLubyte red, GLubyte green,
13726+ GLubyte blue, GLubyte alpha );
13727+GLAPI void GLAPIENTRY glColor4ui( GLuint red, GLuint green,
13728+ GLuint blue, GLuint alpha );
13729+GLAPI void GLAPIENTRY glColor4us( GLushort red, GLushort green,
13730+ GLushort blue, GLushort alpha );
13731+
13732+
13733+GLAPI void GLAPIENTRY glColor3bv( const GLbyte *v );
13734+GLAPI void GLAPIENTRY glColor3dv( const GLdouble *v );
13735+GLAPI void GLAPIENTRY glColor3fv( const GLfloat *v );
13736+GLAPI void GLAPIENTRY glColor3iv( const GLint *v );
13737+GLAPI void GLAPIENTRY glColor3sv( const GLshort *v );
13738+GLAPI void GLAPIENTRY glColor3ubv( const GLubyte *v );
13739+GLAPI void GLAPIENTRY glColor3uiv( const GLuint *v );
13740+GLAPI void GLAPIENTRY glColor3usv( const GLushort *v );
13741+
13742+GLAPI void GLAPIENTRY glColor4bv( const GLbyte *v );
13743+GLAPI void GLAPIENTRY glColor4dv( const GLdouble *v );
13744+GLAPI void GLAPIENTRY glColor4fv( const GLfloat *v );
13745+GLAPI void GLAPIENTRY glColor4iv( const GLint *v );
13746+GLAPI void GLAPIENTRY glColor4sv( const GLshort *v );
13747+GLAPI void GLAPIENTRY glColor4ubv( const GLubyte *v );
13748+GLAPI void GLAPIENTRY glColor4uiv( const GLuint *v );
13749+GLAPI void GLAPIENTRY glColor4usv( const GLushort *v );
13750+
13751+
13752+GLAPI void GLAPIENTRY glTexCoord1d( GLdouble s );
13753+GLAPI void GLAPIENTRY glTexCoord1f( GLfloat s );
13754+GLAPI void GLAPIENTRY glTexCoord1i( GLint s );
13755+GLAPI void GLAPIENTRY glTexCoord1s( GLshort s );
13756+
13757+GLAPI void GLAPIENTRY glTexCoord2d( GLdouble s, GLdouble t );
13758+GLAPI void GLAPIENTRY glTexCoord2f( GLfloat s, GLfloat t );
13759+GLAPI void GLAPIENTRY glTexCoord2i( GLint s, GLint t );
13760+GLAPI void GLAPIENTRY glTexCoord2s( GLshort s, GLshort t );
13761+
13762+GLAPI void GLAPIENTRY glTexCoord3d( GLdouble s, GLdouble t, GLdouble r );
13763+GLAPI void GLAPIENTRY glTexCoord3f( GLfloat s, GLfloat t, GLfloat r );
13764+GLAPI void GLAPIENTRY glTexCoord3i( GLint s, GLint t, GLint r );
13765+GLAPI void GLAPIENTRY glTexCoord3s( GLshort s, GLshort t, GLshort r );
13766+
13767+GLAPI void GLAPIENTRY glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q );
13768+GLAPI void GLAPIENTRY glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q );
13769+GLAPI void GLAPIENTRY glTexCoord4i( GLint s, GLint t, GLint r, GLint q );
13770+GLAPI void GLAPIENTRY glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q );
13771+
13772+GLAPI void GLAPIENTRY glTexCoord1dv( const GLdouble *v );
13773+GLAPI void GLAPIENTRY glTexCoord1fv( const GLfloat *v );
13774+GLAPI void GLAPIENTRY glTexCoord1iv( const GLint *v );
13775+GLAPI void GLAPIENTRY glTexCoord1sv( const GLshort *v );
13776+
13777+GLAPI void GLAPIENTRY glTexCoord2dv( const GLdouble *v );
13778+GLAPI void GLAPIENTRY glTexCoord2fv( const GLfloat *v );
13779+GLAPI void GLAPIENTRY glTexCoord2iv( const GLint *v );
13780+GLAPI void GLAPIENTRY glTexCoord2sv( const GLshort *v );
13781+
13782+GLAPI void GLAPIENTRY glTexCoord3dv( const GLdouble *v );
13783+GLAPI void GLAPIENTRY glTexCoord3fv( const GLfloat *v );
13784+GLAPI void GLAPIENTRY glTexCoord3iv( const GLint *v );
13785+GLAPI void GLAPIENTRY glTexCoord3sv( const GLshort *v );
13786+
13787+GLAPI void GLAPIENTRY glTexCoord4dv( const GLdouble *v );
13788+GLAPI void GLAPIENTRY glTexCoord4fv( const GLfloat *v );
13789+GLAPI void GLAPIENTRY glTexCoord4iv( const GLint *v );
13790+GLAPI void GLAPIENTRY glTexCoord4sv( const GLshort *v );
13791+
13792+
13793+GLAPI void GLAPIENTRY glRasterPos2d( GLdouble x, GLdouble y );
13794+GLAPI void GLAPIENTRY glRasterPos2f( GLfloat x, GLfloat y );
13795+GLAPI void GLAPIENTRY glRasterPos2i( GLint x, GLint y );
13796+GLAPI void GLAPIENTRY glRasterPos2s( GLshort x, GLshort y );
13797+
13798+GLAPI void GLAPIENTRY glRasterPos3d( GLdouble x, GLdouble y, GLdouble z );
13799+GLAPI void GLAPIENTRY glRasterPos3f( GLfloat x, GLfloat y, GLfloat z );
13800+GLAPI void GLAPIENTRY glRasterPos3i( GLint x, GLint y, GLint z );
13801+GLAPI void GLAPIENTRY glRasterPos3s( GLshort x, GLshort y, GLshort z );
13802+
13803+GLAPI void GLAPIENTRY glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
13804+GLAPI void GLAPIENTRY glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
13805+GLAPI void GLAPIENTRY glRasterPos4i( GLint x, GLint y, GLint z, GLint w );
13806+GLAPI void GLAPIENTRY glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w );
13807+
13808+GLAPI void GLAPIENTRY glRasterPos2dv( const GLdouble *v );
13809+GLAPI void GLAPIENTRY glRasterPos2fv( const GLfloat *v );
13810+GLAPI void GLAPIENTRY glRasterPos2iv( const GLint *v );
13811+GLAPI void GLAPIENTRY glRasterPos2sv( const GLshort *v );
13812+
13813+GLAPI void GLAPIENTRY glRasterPos3dv( const GLdouble *v );
13814+GLAPI void GLAPIENTRY glRasterPos3fv( const GLfloat *v );
13815+GLAPI void GLAPIENTRY glRasterPos3iv( const GLint *v );
13816+GLAPI void GLAPIENTRY glRasterPos3sv( const GLshort *v );
13817+
13818+GLAPI void GLAPIENTRY glRasterPos4dv( const GLdouble *v );
13819+GLAPI void GLAPIENTRY glRasterPos4fv( const GLfloat *v );
13820+GLAPI void GLAPIENTRY glRasterPos4iv( const GLint *v );
13821+GLAPI void GLAPIENTRY glRasterPos4sv( const GLshort *v );
13822+
13823+
13824+GLAPI void GLAPIENTRY glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 );
13825+GLAPI void GLAPIENTRY glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 );
13826+GLAPI void GLAPIENTRY glRecti( GLint x1, GLint y1, GLint x2, GLint y2 );
13827+GLAPI void GLAPIENTRY glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 );
13828+
13829+
13830+GLAPI void GLAPIENTRY glRectdv( const GLdouble *v1, const GLdouble *v2 );
13831+GLAPI void GLAPIENTRY glRectfv( const GLfloat *v1, const GLfloat *v2 );
13832+GLAPI void GLAPIENTRY glRectiv( const GLint *v1, const GLint *v2 );
13833+GLAPI void GLAPIENTRY glRectsv( const GLshort *v1, const GLshort *v2 );
13834+
13835+
13836+/*
13837+ * Vertex Arrays (1.1)
13838+ */
13839+
13840+GLAPI void GLAPIENTRY glVertexPointer( GLint size, GLenum type,
13841+ GLsizei stride, const GLvoid *ptr );
13842+
13843+GLAPI void GLAPIENTRY glNormalPointer( GLenum type, GLsizei stride,
13844+ const GLvoid *ptr );
13845+
13846+GLAPI void GLAPIENTRY glColorPointer( GLint size, GLenum type,
13847+ GLsizei stride, const GLvoid *ptr );
13848+
13849+GLAPI void GLAPIENTRY glIndexPointer( GLenum type, GLsizei stride,
13850+ const GLvoid *ptr );
13851+
13852+GLAPI void GLAPIENTRY glTexCoordPointer( GLint size, GLenum type,
13853+ GLsizei stride, const GLvoid *ptr );
13854+
13855+GLAPI void GLAPIENTRY glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr );
13856+
13857+GLAPI void GLAPIENTRY glGetPointerv( GLenum pname, GLvoid **params );
13858+
13859+GLAPI void GLAPIENTRY glArrayElement( GLint i );
13860+
13861+GLAPI void GLAPIENTRY glDrawArrays( GLenum mode, GLint first, GLsizei count );
13862+
13863+GLAPI void GLAPIENTRY glDrawElements( GLenum mode, GLsizei count,
13864+ GLenum type, const GLvoid *indices );
13865+
13866+GLAPI void GLAPIENTRY glInterleavedArrays( GLenum format, GLsizei stride,
13867+ const GLvoid *pointer );
13868+
13869+/*
13870+ * Lighting
13871+ */
13872+
13873+GLAPI void GLAPIENTRY glShadeModel( GLenum mode );
13874+
13875+GLAPI void GLAPIENTRY glLightf( GLenum light, GLenum pname, GLfloat param );
13876+GLAPI void GLAPIENTRY glLighti( GLenum light, GLenum pname, GLint param );
13877+GLAPI void GLAPIENTRY glLightfv( GLenum light, GLenum pname,
13878+ const GLfloat *params );
13879+GLAPI void GLAPIENTRY glLightiv( GLenum light, GLenum pname,
13880+ const GLint *params );
13881+
13882+GLAPI void GLAPIENTRY glGetLightfv( GLenum light, GLenum pname,
13883+ GLfloat *params );
13884+GLAPI void GLAPIENTRY glGetLightiv( GLenum light, GLenum pname,
13885+ GLint *params );
13886+
13887+GLAPI void GLAPIENTRY glLightModelf( GLenum pname, GLfloat param );
13888+GLAPI void GLAPIENTRY glLightModeli( GLenum pname, GLint param );
13889+GLAPI void GLAPIENTRY glLightModelfv( GLenum pname, const GLfloat *params );
13890+GLAPI void GLAPIENTRY glLightModeliv( GLenum pname, const GLint *params );
13891+
13892+GLAPI void GLAPIENTRY glMaterialf( GLenum face, GLenum pname, GLfloat param );
13893+GLAPI void GLAPIENTRY glMateriali( GLenum face, GLenum pname, GLint param );
13894+GLAPI void GLAPIENTRY glMaterialfv( GLenum face, GLenum pname, const GLfloat *params );
13895+GLAPI void GLAPIENTRY glMaterialiv( GLenum face, GLenum pname, const GLint *params );
13896+
13897+GLAPI void GLAPIENTRY glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params );
13898+GLAPI void GLAPIENTRY glGetMaterialiv( GLenum face, GLenum pname, GLint *params );
13899+
13900+GLAPI void GLAPIENTRY glColorMaterial( GLenum face, GLenum mode );
13901+
13902+
13903+/*
13904+ * Raster functions
13905+ */
13906+
13907+GLAPI void GLAPIENTRY glPixelZoom( GLfloat xfactor, GLfloat yfactor );
13908+
13909+GLAPI void GLAPIENTRY glPixelStoref( GLenum pname, GLfloat param );
13910+GLAPI void GLAPIENTRY glPixelStorei( GLenum pname, GLint param );
13911+
13912+GLAPI void GLAPIENTRY glPixelTransferf( GLenum pname, GLfloat param );
13913+GLAPI void GLAPIENTRY glPixelTransferi( GLenum pname, GLint param );
13914+
13915+GLAPI void GLAPIENTRY glPixelMapfv( GLenum map, GLsizei mapsize,
13916+ const GLfloat *values );
13917+GLAPI void GLAPIENTRY glPixelMapuiv( GLenum map, GLsizei mapsize,
13918+ const GLuint *values );
13919+GLAPI void GLAPIENTRY glPixelMapusv( GLenum map, GLsizei mapsize,
13920+ const GLushort *values );
13921+
13922+GLAPI void GLAPIENTRY glGetPixelMapfv( GLenum map, GLfloat *values );
13923+GLAPI void GLAPIENTRY glGetPixelMapuiv( GLenum map, GLuint *values );
13924+GLAPI void GLAPIENTRY glGetPixelMapusv( GLenum map, GLushort *values );
13925+
13926+GLAPI void GLAPIENTRY glBitmap( GLsizei width, GLsizei height,
13927+ GLfloat xorig, GLfloat yorig,
13928+ GLfloat xmove, GLfloat ymove,
13929+ const GLubyte *bitmap );
13930+
13931+GLAPI void GLAPIENTRY glReadPixels( GLint x, GLint y,
13932+ GLsizei width, GLsizei height,
13933+ GLenum format, GLenum type,
13934+ GLvoid *pixels );
13935+
13936+GLAPI void GLAPIENTRY glDrawPixels( GLsizei width, GLsizei height,
13937+ GLenum format, GLenum type,
13938+ const GLvoid *pixels );
13939+
13940+GLAPI void GLAPIENTRY glCopyPixels( GLint x, GLint y,
13941+ GLsizei width, GLsizei height,
13942+ GLenum type );
13943+
13944+/*
13945+ * Stenciling
13946+ */
13947+
13948+GLAPI void GLAPIENTRY glStencilFunc( GLenum func, GLint ref, GLuint mask );
13949+
13950+GLAPI void GLAPIENTRY glStencilMask( GLuint mask );
13951+
13952+GLAPI void GLAPIENTRY glStencilOp( GLenum fail, GLenum zfail, GLenum zpass );
13953+
13954+GLAPI void GLAPIENTRY glClearStencil( GLint s );
13955+
13956+
13957+
13958+/*
13959+ * Texture mapping
13960+ */
13961+
13962+GLAPI void GLAPIENTRY glTexGend( GLenum coord, GLenum pname, GLdouble param );
13963+GLAPI void GLAPIENTRY glTexGenf( GLenum coord, GLenum pname, GLfloat param );
13964+GLAPI void GLAPIENTRY glTexGeni( GLenum coord, GLenum pname, GLint param );
13965+
13966+GLAPI void GLAPIENTRY glTexGendv( GLenum coord, GLenum pname, const GLdouble *params );
13967+GLAPI void GLAPIENTRY glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params );
13968+GLAPI void GLAPIENTRY glTexGeniv( GLenum coord, GLenum pname, const GLint *params );
13969+
13970+GLAPI void GLAPIENTRY glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params );
13971+GLAPI void GLAPIENTRY glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params );
13972+GLAPI void GLAPIENTRY glGetTexGeniv( GLenum coord, GLenum pname, GLint *params );
13973+
13974+
13975+GLAPI void GLAPIENTRY glTexEnvf( GLenum target, GLenum pname, GLfloat param );
13976+GLAPI void GLAPIENTRY glTexEnvi( GLenum target, GLenum pname, GLint param );
13977+
13978+GLAPI void GLAPIENTRY glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params );
13979+GLAPI void GLAPIENTRY glTexEnviv( GLenum target, GLenum pname, const GLint *params );
13980+
13981+GLAPI void GLAPIENTRY glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params );
13982+GLAPI void GLAPIENTRY glGetTexEnviv( GLenum target, GLenum pname, GLint *params );
13983+
13984+
13985+GLAPI void GLAPIENTRY glTexParameterf( GLenum target, GLenum pname, GLfloat param );
13986+GLAPI void GLAPIENTRY glTexParameteri( GLenum target, GLenum pname, GLint param );
13987+
13988+GLAPI void GLAPIENTRY glTexParameterfv( GLenum target, GLenum pname,
13989+ const GLfloat *params );
13990+GLAPI void GLAPIENTRY glTexParameteriv( GLenum target, GLenum pname,
13991+ const GLint *params );
13992+
13993+GLAPI void GLAPIENTRY glGetTexParameterfv( GLenum target,
13994+ GLenum pname, GLfloat *params);
13995+GLAPI void GLAPIENTRY glGetTexParameteriv( GLenum target,
13996+ GLenum pname, GLint *params );
13997+
13998+GLAPI void GLAPIENTRY glGetTexLevelParameterfv( GLenum target, GLint level,
13999+ GLenum pname, GLfloat *params );
14000+GLAPI void GLAPIENTRY glGetTexLevelParameteriv( GLenum target, GLint level,
14001+ GLenum pname, GLint *params );
14002+
14003+
14004+GLAPI void GLAPIENTRY glTexImage1D( GLenum target, GLint level,
14005+ GLint internalFormat,
14006+ GLsizei width, GLint border,
14007+ GLenum format, GLenum type,
14008+ const GLvoid *pixels );
14009+
14010+GLAPI void GLAPIENTRY glTexImage2D( GLenum target, GLint level,
14011+ GLint internalFormat,
14012+ GLsizei width, GLsizei height,
14013+ GLint border, GLenum format, GLenum type,
14014+ const GLvoid *pixels );
14015+
14016+GLAPI void GLAPIENTRY glGetTexImage( GLenum target, GLint level,
14017+ GLenum format, GLenum type,
14018+ GLvoid *pixels );
14019+
14020+
14021+/* 1.1 functions */
14022+
14023+GLAPI void GLAPIENTRY glGenTextures( GLsizei n, GLuint *textures );
14024+
14025+GLAPI void GLAPIENTRY glDeleteTextures( GLsizei n, const GLuint *textures);
14026+
14027+GLAPI void GLAPIENTRY glBindTexture( GLenum target, GLuint texture );
14028+
14029+GLAPI void GLAPIENTRY glPrioritizeTextures( GLsizei n,
14030+ const GLuint *textures,
14031+ const GLclampf *priorities );
14032+
14033+GLAPI GLboolean GLAPIENTRY glAreTexturesResident( GLsizei n,
14034+ const GLuint *textures,
14035+ GLboolean *residences );
14036+
14037+GLAPI GLboolean GLAPIENTRY glIsTexture( GLuint texture );
14038+
14039+
14040+GLAPI void GLAPIENTRY glTexSubImage1D( GLenum target, GLint level,
14041+ GLint xoffset,
14042+ GLsizei width, GLenum format,
14043+ GLenum type, const GLvoid *pixels );
14044+
14045+
14046+GLAPI void GLAPIENTRY glTexSubImage2D( GLenum target, GLint level,
14047+ GLint xoffset, GLint yoffset,
14048+ GLsizei width, GLsizei height,
14049+ GLenum format, GLenum type,
14050+ const GLvoid *pixels );
14051+
14052+
14053+GLAPI void GLAPIENTRY glCopyTexImage1D( GLenum target, GLint level,
14054+ GLenum internalformat,
14055+ GLint x, GLint y,
14056+ GLsizei width, GLint border );
14057+
14058+
14059+GLAPI void GLAPIENTRY glCopyTexImage2D( GLenum target, GLint level,
14060+ GLenum internalformat,
14061+ GLint x, GLint y,
14062+ GLsizei width, GLsizei height,
14063+ GLint border );
14064+
14065+
14066+GLAPI void GLAPIENTRY glCopyTexSubImage1D( GLenum target, GLint level,
14067+ GLint xoffset, GLint x, GLint y,
14068+ GLsizei width );
14069+
14070+
14071+GLAPI void GLAPIENTRY glCopyTexSubImage2D( GLenum target, GLint level,
14072+ GLint xoffset, GLint yoffset,
14073+ GLint x, GLint y,
14074+ GLsizei width, GLsizei height );
14075+
14076+
14077+/*
14078+ * Evaluators
14079+ */
14080+
14081+GLAPI void GLAPIENTRY glMap1d( GLenum target, GLdouble u1, GLdouble u2,
14082+ GLint stride,
14083+ GLint order, const GLdouble *points );
14084+GLAPI void GLAPIENTRY glMap1f( GLenum target, GLfloat u1, GLfloat u2,
14085+ GLint stride,
14086+ GLint order, const GLfloat *points );
14087+
14088+GLAPI void GLAPIENTRY glMap2d( GLenum target,
14089+ GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
14090+ GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
14091+ const GLdouble *points );
14092+GLAPI void GLAPIENTRY glMap2f( GLenum target,
14093+ GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
14094+ GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
14095+ const GLfloat *points );
14096+
14097+GLAPI void GLAPIENTRY glGetMapdv( GLenum target, GLenum query, GLdouble *v );
14098+GLAPI void GLAPIENTRY glGetMapfv( GLenum target, GLenum query, GLfloat *v );
14099+GLAPI void GLAPIENTRY glGetMapiv( GLenum target, GLenum query, GLint *v );
14100+
14101+GLAPI void GLAPIENTRY glEvalCoord1d( GLdouble u );
14102+GLAPI void GLAPIENTRY glEvalCoord1f( GLfloat u );
14103+
14104+GLAPI void GLAPIENTRY glEvalCoord1dv( const GLdouble *u );
14105+GLAPI void GLAPIENTRY glEvalCoord1fv( const GLfloat *u );
14106+
14107+GLAPI void GLAPIENTRY glEvalCoord2d( GLdouble u, GLdouble v );
14108+GLAPI void GLAPIENTRY glEvalCoord2f( GLfloat u, GLfloat v );
14109+
14110+GLAPI void GLAPIENTRY glEvalCoord2dv( const GLdouble *u );
14111+GLAPI void GLAPIENTRY glEvalCoord2fv( const GLfloat *u );
14112+
14113+GLAPI void GLAPIENTRY glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 );
14114+GLAPI void GLAPIENTRY glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 );
14115+
14116+GLAPI void GLAPIENTRY glMapGrid2d( GLint un, GLdouble u1, GLdouble u2,
14117+ GLint vn, GLdouble v1, GLdouble v2 );
14118+GLAPI void GLAPIENTRY glMapGrid2f( GLint un, GLfloat u1, GLfloat u2,
14119+ GLint vn, GLfloat v1, GLfloat v2 );
14120+
14121+GLAPI void GLAPIENTRY glEvalPoint1( GLint i );
14122+
14123+GLAPI void GLAPIENTRY glEvalPoint2( GLint i, GLint j );
14124+
14125+GLAPI void GLAPIENTRY glEvalMesh1( GLenum mode, GLint i1, GLint i2 );
14126+
14127+GLAPI void GLAPIENTRY glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
14128+
14129+
14130+/*
14131+ * Fog
14132+ */
14133+
14134+GLAPI void GLAPIENTRY glFogf( GLenum pname, GLfloat param );
14135+
14136+GLAPI void GLAPIENTRY glFogi( GLenum pname, GLint param );
14137+
14138+GLAPI void GLAPIENTRY glFogfv( GLenum pname, const GLfloat *params );
14139+
14140+GLAPI void GLAPIENTRY glFogiv( GLenum pname, const GLint *params );
14141+
14142+
14143+/*
14144+ * Selection and Feedback
14145+ */
14146+
14147+GLAPI void GLAPIENTRY glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer );
14148+
14149+GLAPI void GLAPIENTRY glPassThrough( GLfloat token );
14150+
14151+GLAPI void GLAPIENTRY glSelectBuffer( GLsizei size, GLuint *buffer );
14152+
14153+GLAPI void GLAPIENTRY glInitNames( void );
14154+
14155+GLAPI void GLAPIENTRY glLoadName( GLuint name );
14156+
14157+GLAPI void GLAPIENTRY glPushName( GLuint name );
14158+
14159+GLAPI void GLAPIENTRY glPopName( void );
14160+
14161+
14162+
14163+/*
14164+ * OpenGL 1.2
14165+ */
14166+
14167+#define GL_RESCALE_NORMAL 0x803A
14168+#define GL_CLAMP_TO_EDGE 0x812F
14169+#define GL_MAX_ELEMENTS_VERTICES 0x80E8
14170+#define GL_MAX_ELEMENTS_INDICES 0x80E9
14171+#define GL_BGR 0x80E0
14172+#define GL_BGRA 0x80E1
14173+#define GL_UNSIGNED_BYTE_3_3_2 0x8032
14174+#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
14175+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
14176+#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
14177+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
14178+#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
14179+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
14180+#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
14181+#define GL_UNSIGNED_INT_8_8_8_8 0x8035
14182+#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
14183+#define GL_UNSIGNED_INT_10_10_10_2 0x8036
14184+#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
14185+#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
14186+#define GL_SINGLE_COLOR 0x81F9
14187+#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
14188+#define GL_TEXTURE_MIN_LOD 0x813A
14189+#define GL_TEXTURE_MAX_LOD 0x813B
14190+#define GL_TEXTURE_BASE_LEVEL 0x813C
14191+#define GL_TEXTURE_MAX_LEVEL 0x813D
14192+#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
14193+#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
14194+#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
14195+#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
14196+#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
14197+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
14198+#define GL_PACK_SKIP_IMAGES 0x806B
14199+#define GL_PACK_IMAGE_HEIGHT 0x806C
14200+#define GL_UNPACK_SKIP_IMAGES 0x806D
14201+#define GL_UNPACK_IMAGE_HEIGHT 0x806E
14202+#define GL_TEXTURE_3D 0x806F
14203+#define GL_PROXY_TEXTURE_3D 0x8070
14204+#define GL_TEXTURE_DEPTH 0x8071
14205+#define GL_TEXTURE_WRAP_R 0x8072
14206+#define GL_MAX_3D_TEXTURE_SIZE 0x8073
14207+#define GL_TEXTURE_BINDING_3D 0x806A
14208+
14209+GLAPI void GLAPIENTRY glDrawRangeElements( GLenum mode, GLuint start,
14210+ GLuint end, GLsizei count, GLenum type, const GLvoid *indices );
14211+
14212+GLAPI void GLAPIENTRY glTexImage3D( GLenum target, GLint level,
14213+ GLint internalFormat,
14214+ GLsizei width, GLsizei height,
14215+ GLsizei depth, GLint border,
14216+ GLenum format, GLenum type,
14217+ const GLvoid *pixels );
14218+
14219+GLAPI void GLAPIENTRY glTexSubImage3D( GLenum target, GLint level,
14220+ GLint xoffset, GLint yoffset,
14221+ GLint zoffset, GLsizei width,
14222+ GLsizei height, GLsizei depth,
14223+ GLenum format,
14224+ GLenum type, const GLvoid *pixels);
14225+
14226+GLAPI void GLAPIENTRY glCopyTexSubImage3D( GLenum target, GLint level,
14227+ GLint xoffset, GLint yoffset,
14228+ GLint zoffset, GLint x,
14229+ GLint y, GLsizei width,
14230+ GLsizei height );
14231+
14232+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
14233+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);
14234+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);
14235+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
14236+
14237+
14238+/*
14239+ * GL_ARB_imaging
14240+ */
14241+
14242+#define GL_CONSTANT_COLOR 0x8001
14243+#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
14244+#define GL_CONSTANT_ALPHA 0x8003
14245+#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
14246+#define GL_COLOR_TABLE 0x80D0
14247+#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
14248+#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
14249+#define GL_PROXY_COLOR_TABLE 0x80D3
14250+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
14251+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
14252+#define GL_COLOR_TABLE_SCALE 0x80D6
14253+#define GL_COLOR_TABLE_BIAS 0x80D7
14254+#define GL_COLOR_TABLE_FORMAT 0x80D8
14255+#define GL_COLOR_TABLE_WIDTH 0x80D9
14256+#define GL_COLOR_TABLE_RED_SIZE 0x80DA
14257+#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
14258+#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
14259+#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
14260+#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
14261+#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
14262+#define GL_CONVOLUTION_1D 0x8010
14263+#define GL_CONVOLUTION_2D 0x8011
14264+#define GL_SEPARABLE_2D 0x8012
14265+#define GL_CONVOLUTION_BORDER_MODE 0x8013
14266+#define GL_CONVOLUTION_FILTER_SCALE 0x8014
14267+#define GL_CONVOLUTION_FILTER_BIAS 0x8015
14268+#define GL_REDUCE 0x8016
14269+#define GL_CONVOLUTION_FORMAT 0x8017
14270+#define GL_CONVOLUTION_WIDTH 0x8018
14271+#define GL_CONVOLUTION_HEIGHT 0x8019
14272+#define GL_MAX_CONVOLUTION_WIDTH 0x801A
14273+#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
14274+#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
14275+#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
14276+#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
14277+#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
14278+#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
14279+#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
14280+#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
14281+#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
14282+#define GL_CONSTANT_BORDER 0x8151
14283+#define GL_REPLICATE_BORDER 0x8153
14284+#define GL_CONVOLUTION_BORDER_COLOR 0x8154
14285+#define GL_COLOR_MATRIX 0x80B1
14286+#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
14287+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
14288+#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
14289+#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
14290+#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
14291+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
14292+#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
14293+#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
14294+#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
14295+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
14296+#define GL_HISTOGRAM 0x8024
14297+#define GL_PROXY_HISTOGRAM 0x8025
14298+#define GL_HISTOGRAM_WIDTH 0x8026
14299+#define GL_HISTOGRAM_FORMAT 0x8027
14300+#define GL_HISTOGRAM_RED_SIZE 0x8028
14301+#define GL_HISTOGRAM_GREEN_SIZE 0x8029
14302+#define GL_HISTOGRAM_BLUE_SIZE 0x802A
14303+#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
14304+#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
14305+#define GL_HISTOGRAM_SINK 0x802D
14306+#define GL_MINMAX 0x802E
14307+#define GL_MINMAX_FORMAT 0x802F
14308+#define GL_MINMAX_SINK 0x8030
14309+#define GL_TABLE_TOO_LARGE 0x8031
14310+#define GL_BLEND_EQUATION 0x8009
14311+#define GL_MIN 0x8007
14312+#define GL_MAX 0x8008
14313+#define GL_FUNC_ADD 0x8006
14314+#define GL_FUNC_SUBTRACT 0x800A
14315+#define GL_FUNC_REVERSE_SUBTRACT 0x800B
14316+#define GL_BLEND_COLOR 0x8005
14317+
14318+
14319+GLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat,
14320+ GLsizei width, GLenum format,
14321+ GLenum type, const GLvoid *table );
14322+
14323+GLAPI void GLAPIENTRY glColorSubTable( GLenum target,
14324+ GLsizei start, GLsizei count,
14325+ GLenum format, GLenum type,
14326+ const GLvoid *data );
14327+
14328+GLAPI void GLAPIENTRY glColorTableParameteriv(GLenum target, GLenum pname,
14329+ const GLint *params);
14330+
14331+GLAPI void GLAPIENTRY glColorTableParameterfv(GLenum target, GLenum pname,
14332+ const GLfloat *params);
14333+
14334+GLAPI void GLAPIENTRY glCopyColorSubTable( GLenum target, GLsizei start,
14335+ GLint x, GLint y, GLsizei width );
14336+
14337+GLAPI void GLAPIENTRY glCopyColorTable( GLenum target, GLenum internalformat,
14338+ GLint x, GLint y, GLsizei width );
14339+
14340+GLAPI void GLAPIENTRY glGetColorTable( GLenum target, GLenum format,
14341+ GLenum type, GLvoid *table );
14342+
14343+GLAPI void GLAPIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname,
14344+ GLfloat *params );
14345+
14346+GLAPI void GLAPIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname,
14347+ GLint *params );
14348+
14349+GLAPI void GLAPIENTRY glBlendEquation( GLenum mode );
14350+
14351+GLAPI void GLAPIENTRY glBlendColor( GLclampf red, GLclampf green,
14352+ GLclampf blue, GLclampf alpha );
14353+
14354+GLAPI void GLAPIENTRY glHistogram( GLenum target, GLsizei width,
14355+ GLenum internalformat, GLboolean sink );
14356+
14357+GLAPI void GLAPIENTRY glResetHistogram( GLenum target );
14358+
14359+GLAPI void GLAPIENTRY glGetHistogram( GLenum target, GLboolean reset,
14360+ GLenum format, GLenum type,
14361+ GLvoid *values );
14362+
14363+GLAPI void GLAPIENTRY glGetHistogramParameterfv( GLenum target, GLenum pname,
14364+ GLfloat *params );
14365+
14366+GLAPI void GLAPIENTRY glGetHistogramParameteriv( GLenum target, GLenum pname,
14367+ GLint *params );
14368+
14369+GLAPI void GLAPIENTRY glMinmax( GLenum target, GLenum internalformat,
14370+ GLboolean sink );
14371+
14372+GLAPI void GLAPIENTRY glResetMinmax( GLenum target );
14373+
14374+GLAPI void GLAPIENTRY glGetMinmax( GLenum target, GLboolean reset,
14375+ GLenum format, GLenum types,
14376+ GLvoid *values );
14377+
14378+GLAPI void GLAPIENTRY glGetMinmaxParameterfv( GLenum target, GLenum pname,
14379+ GLfloat *params );
14380+
14381+GLAPI void GLAPIENTRY glGetMinmaxParameteriv( GLenum target, GLenum pname,
14382+ GLint *params );
14383+
14384+GLAPI void GLAPIENTRY glConvolutionFilter1D( GLenum target,
14385+ GLenum internalformat, GLsizei width, GLenum format, GLenum type,
14386+ const GLvoid *image );
14387+
14388+GLAPI void GLAPIENTRY glConvolutionFilter2D( GLenum target,
14389+ GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
14390+ GLenum type, const GLvoid *image );
14391+
14392+GLAPI void GLAPIENTRY glConvolutionParameterf( GLenum target, GLenum pname,
14393+ GLfloat params );
14394+
14395+GLAPI void GLAPIENTRY glConvolutionParameterfv( GLenum target, GLenum pname,
14396+ const GLfloat *params );
14397+
14398+GLAPI void GLAPIENTRY glConvolutionParameteri( GLenum target, GLenum pname,
14399+ GLint params );
14400+
14401+GLAPI void GLAPIENTRY glConvolutionParameteriv( GLenum target, GLenum pname,
14402+ const GLint *params );
14403+
14404+GLAPI void GLAPIENTRY glCopyConvolutionFilter1D( GLenum target,
14405+ GLenum internalformat, GLint x, GLint y, GLsizei width );
14406+
14407+GLAPI void GLAPIENTRY glCopyConvolutionFilter2D( GLenum target,
14408+ GLenum internalformat, GLint x, GLint y, GLsizei width,
14409+ GLsizei height);
14410+
14411+GLAPI void GLAPIENTRY glGetConvolutionFilter( GLenum target, GLenum format,
14412+ GLenum type, GLvoid *image );
14413+
14414+GLAPI void GLAPIENTRY glGetConvolutionParameterfv( GLenum target, GLenum pname,
14415+ GLfloat *params );
14416+
14417+GLAPI void GLAPIENTRY glGetConvolutionParameteriv( GLenum target, GLenum pname,
14418+ GLint *params );
14419+
14420+GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target,
14421+ GLenum internalformat, GLsizei width, GLsizei height, GLenum format,
14422+ GLenum type, const GLvoid *row, const GLvoid *column );
14423+
14424+GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
14425+ GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
14426+
14427+typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
14428+typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
14429+typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
14430+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
14431+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
14432+typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
14433+typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
14434+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
14435+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
14436+typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
14437+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
14438+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
14439+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
14440+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
14441+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
14442+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
14443+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
14444+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
14445+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
14446+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
14447+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
14448+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
14449+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
14450+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
14451+typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
14452+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
14453+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
14454+typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
14455+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
14456+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
14457+typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
14458+typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
14459+typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
14460+typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
14461+
14462+
14463+
14464+/*
14465+ * OpenGL 1.3
14466+ */
14467+
14468+/* multitexture */
14469+#define GL_TEXTURE0 0x84C0
14470+#define GL_TEXTURE1 0x84C1
14471+#define GL_TEXTURE2 0x84C2
14472+#define GL_TEXTURE3 0x84C3
14473+#define GL_TEXTURE4 0x84C4
14474+#define GL_TEXTURE5 0x84C5
14475+#define GL_TEXTURE6 0x84C6
14476+#define GL_TEXTURE7 0x84C7
14477+#define GL_TEXTURE8 0x84C8
14478+#define GL_TEXTURE9 0x84C9
14479+#define GL_TEXTURE10 0x84CA
14480+#define GL_TEXTURE11 0x84CB
14481+#define GL_TEXTURE12 0x84CC
14482+#define GL_TEXTURE13 0x84CD
14483+#define GL_TEXTURE14 0x84CE
14484+#define GL_TEXTURE15 0x84CF
14485+#define GL_TEXTURE16 0x84D0
14486+#define GL_TEXTURE17 0x84D1
14487+#define GL_TEXTURE18 0x84D2
14488+#define GL_TEXTURE19 0x84D3
14489+#define GL_TEXTURE20 0x84D4
14490+#define GL_TEXTURE21 0x84D5
14491+#define GL_TEXTURE22 0x84D6
14492+#define GL_TEXTURE23 0x84D7
14493+#define GL_TEXTURE24 0x84D8
14494+#define GL_TEXTURE25 0x84D9
14495+#define GL_TEXTURE26 0x84DA
14496+#define GL_TEXTURE27 0x84DB
14497+#define GL_TEXTURE28 0x84DC
14498+#define GL_TEXTURE29 0x84DD
14499+#define GL_TEXTURE30 0x84DE
14500+#define GL_TEXTURE31 0x84DF
14501+#define GL_ACTIVE_TEXTURE 0x84E0
14502+#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
14503+#define GL_MAX_TEXTURE_UNITS 0x84E2
14504+/* texture_cube_map */
14505+#define GL_NORMAL_MAP 0x8511
14506+#define GL_REFLECTION_MAP 0x8512
14507+#define GL_TEXTURE_CUBE_MAP 0x8513
14508+#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
14509+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
14510+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
14511+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
14512+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
14513+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
14514+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
14515+#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
14516+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
14517+/* texture_compression */
14518+#define GL_COMPRESSED_ALPHA 0x84E9
14519+#define GL_COMPRESSED_LUMINANCE 0x84EA
14520+#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
14521+#define GL_COMPRESSED_INTENSITY 0x84EC
14522+#define GL_COMPRESSED_RGB 0x84ED
14523+#define GL_COMPRESSED_RGBA 0x84EE
14524+#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
14525+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
14526+#define GL_TEXTURE_COMPRESSED 0x86A1
14527+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
14528+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
14529+/* multisample */
14530+#define GL_MULTISAMPLE 0x809D
14531+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
14532+#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
14533+#define GL_SAMPLE_COVERAGE 0x80A0
14534+#define GL_SAMPLE_BUFFERS 0x80A8
14535+#define GL_SAMPLES 0x80A9
14536+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
14537+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
14538+#define GL_MULTISAMPLE_BIT 0x20000000
14539+/* transpose_matrix */
14540+#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
14541+#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
14542+#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
14543+#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
14544+/* texture_env_combine */
14545+#define GL_COMBINE 0x8570
14546+#define GL_COMBINE_RGB 0x8571
14547+#define GL_COMBINE_ALPHA 0x8572
14548+#define GL_SOURCE0_RGB 0x8580
14549+#define GL_SOURCE1_RGB 0x8581
14550+#define GL_SOURCE2_RGB 0x8582
14551+#define GL_SOURCE0_ALPHA 0x8588
14552+#define GL_SOURCE1_ALPHA 0x8589
14553+#define GL_SOURCE2_ALPHA 0x858A
14554+#define GL_OPERAND0_RGB 0x8590
14555+#define GL_OPERAND1_RGB 0x8591
14556+#define GL_OPERAND2_RGB 0x8592
14557+#define GL_OPERAND0_ALPHA 0x8598
14558+#define GL_OPERAND1_ALPHA 0x8599
14559+#define GL_OPERAND2_ALPHA 0x859A
14560+#define GL_RGB_SCALE 0x8573
14561+#define GL_ADD_SIGNED 0x8574
14562+#define GL_INTERPOLATE 0x8575
14563+#define GL_SUBTRACT 0x84E7
14564+#define GL_CONSTANT 0x8576
14565+#define GL_PRIMARY_COLOR 0x8577
14566+#define GL_PREVIOUS 0x8578
14567+/* texture_env_dot3 */
14568+#define GL_DOT3_RGB 0x86AE
14569+#define GL_DOT3_RGBA 0x86AF
14570+/* texture_border_clamp */
14571+#define GL_CLAMP_TO_BORDER 0x812D
14572+
14573+GLAPI void GLAPIENTRY glActiveTexture( GLenum texture );
14574+
14575+GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture );
14576+
14577+GLAPI void GLAPIENTRY glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data );
14578+
14579+GLAPI void GLAPIENTRY glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data );
14580+
14581+GLAPI void GLAPIENTRY glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data );
14582+
14583+GLAPI void GLAPIENTRY glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data );
14584+
14585+GLAPI void GLAPIENTRY glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data );
14586+
14587+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 );
14588+
14589+GLAPI void GLAPIENTRY glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img );
14590+
14591+GLAPI void GLAPIENTRY glMultiTexCoord1d( GLenum target, GLdouble s );
14592+
14593+GLAPI void GLAPIENTRY glMultiTexCoord1dv( GLenum target, const GLdouble *v );
14594+
14595+GLAPI void GLAPIENTRY glMultiTexCoord1f( GLenum target, GLfloat s );
14596+
14597+GLAPI void GLAPIENTRY glMultiTexCoord1fv( GLenum target, const GLfloat *v );
14598+
14599+GLAPI void GLAPIENTRY glMultiTexCoord1i( GLenum target, GLint s );
14600+
14601+GLAPI void GLAPIENTRY glMultiTexCoord1iv( GLenum target, const GLint *v );
14602+
14603+GLAPI void GLAPIENTRY glMultiTexCoord1s( GLenum target, GLshort s );
14604+
14605+GLAPI void GLAPIENTRY glMultiTexCoord1sv( GLenum target, const GLshort *v );
14606+
14607+GLAPI void GLAPIENTRY glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t );
14608+
14609+GLAPI void GLAPIENTRY glMultiTexCoord2dv( GLenum target, const GLdouble *v );
14610+
14611+GLAPI void GLAPIENTRY glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t );
14612+
14613+GLAPI void GLAPIENTRY glMultiTexCoord2fv( GLenum target, const GLfloat *v );
14614+
14615+GLAPI void GLAPIENTRY glMultiTexCoord2i( GLenum target, GLint s, GLint t );
14616+
14617+GLAPI void GLAPIENTRY glMultiTexCoord2iv( GLenum target, const GLint *v );
14618+
14619+GLAPI void GLAPIENTRY glMultiTexCoord2s( GLenum target, GLshort s, GLshort t );
14620+
14621+GLAPI void GLAPIENTRY glMultiTexCoord2sv( GLenum target, const GLshort *v );
14622+
14623+GLAPI void GLAPIENTRY glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r );
14624+
14625+GLAPI void GLAPIENTRY glMultiTexCoord3dv( GLenum target, const GLdouble *v );
14626+
14627+GLAPI void GLAPIENTRY glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r );
14628+
14629+GLAPI void GLAPIENTRY glMultiTexCoord3fv( GLenum target, const GLfloat *v );
14630+
14631+GLAPI void GLAPIENTRY glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r );
14632+
14633+GLAPI void GLAPIENTRY glMultiTexCoord3iv( GLenum target, const GLint *v );
14634+
14635+GLAPI void GLAPIENTRY glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r );
14636+
14637+GLAPI void GLAPIENTRY glMultiTexCoord3sv( GLenum target, const GLshort *v );
14638+
14639+GLAPI void GLAPIENTRY glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q );
14640+
14641+GLAPI void GLAPIENTRY glMultiTexCoord4dv( GLenum target, const GLdouble *v );
14642+
14643+GLAPI void GLAPIENTRY glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q );
14644+
14645+GLAPI void GLAPIENTRY glMultiTexCoord4fv( GLenum target, const GLfloat *v );
14646+
14647+GLAPI void GLAPIENTRY glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q );
14648+
14649+GLAPI void GLAPIENTRY glMultiTexCoord4iv( GLenum target, const GLint *v );
14650+
14651+GLAPI void GLAPIENTRY glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q );
14652+
14653+GLAPI void GLAPIENTRY glMultiTexCoord4sv( GLenum target, const GLshort *v );
14654+
14655+
14656+GLAPI void GLAPIENTRY glLoadTransposeMatrixd( const GLdouble m[16] );
14657+
14658+GLAPI void GLAPIENTRY glLoadTransposeMatrixf( const GLfloat m[16] );
14659+
14660+GLAPI void GLAPIENTRY glMultTransposeMatrixd( const GLdouble m[16] );
14661+
14662+GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] );
14663+
14664+GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert );
14665+
14666+typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
14667+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
14668+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
14669+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
14670+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
14671+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
14672+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
14673+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
14674+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
14675+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
14676+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
14677+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
14678+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
14679+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
14680+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
14681+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
14682+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
14683+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
14684+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
14685+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
14686+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
14687+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
14688+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
14689+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
14690+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
14691+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
14692+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
14693+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
14694+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
14695+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
14696+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
14697+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
14698+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
14699+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
14700+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
14701+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
14702+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
14703+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
14704+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
14705+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
14706+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
14707+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
14708+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);
14709+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
14710+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
14711+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img);
14712+
14713+
14714+/*
14715+ * GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1)
14716+ */
14717+#ifndef GL_ARB_multitexture
14718+#define GL_ARB_multitexture 1
14719+
14720+#define GL_TEXTURE0_ARB 0x84C0
14721+#define GL_TEXTURE1_ARB 0x84C1
14722+#define GL_TEXTURE2_ARB 0x84C2
14723+#define GL_TEXTURE3_ARB 0x84C3
14724+#define GL_TEXTURE4_ARB 0x84C4
14725+#define GL_TEXTURE5_ARB 0x84C5
14726+#define GL_TEXTURE6_ARB 0x84C6
14727+#define GL_TEXTURE7_ARB 0x84C7
14728+#define GL_TEXTURE8_ARB 0x84C8
14729+#define GL_TEXTURE9_ARB 0x84C9
14730+#define GL_TEXTURE10_ARB 0x84CA
14731+#define GL_TEXTURE11_ARB 0x84CB
14732+#define GL_TEXTURE12_ARB 0x84CC
14733+#define GL_TEXTURE13_ARB 0x84CD
14734+#define GL_TEXTURE14_ARB 0x84CE
14735+#define GL_TEXTURE15_ARB 0x84CF
14736+#define GL_TEXTURE16_ARB 0x84D0
14737+#define GL_TEXTURE17_ARB 0x84D1
14738+#define GL_TEXTURE18_ARB 0x84D2
14739+#define GL_TEXTURE19_ARB 0x84D3
14740+#define GL_TEXTURE20_ARB 0x84D4
14741+#define GL_TEXTURE21_ARB 0x84D5
14742+#define GL_TEXTURE22_ARB 0x84D6
14743+#define GL_TEXTURE23_ARB 0x84D7
14744+#define GL_TEXTURE24_ARB 0x84D8
14745+#define GL_TEXTURE25_ARB 0x84D9
14746+#define GL_TEXTURE26_ARB 0x84DA
14747+#define GL_TEXTURE27_ARB 0x84DB
14748+#define GL_TEXTURE28_ARB 0x84DC
14749+#define GL_TEXTURE29_ARB 0x84DD
14750+#define GL_TEXTURE30_ARB 0x84DE
14751+#define GL_TEXTURE31_ARB 0x84DF
14752+#define GL_ACTIVE_TEXTURE_ARB 0x84E0
14753+#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
14754+#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
14755+
14756+GLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture);
14757+GLAPI void GLAPIENTRY glClientActiveTextureARB(GLenum texture);
14758+GLAPI void GLAPIENTRY glMultiTexCoord1dARB(GLenum target, GLdouble s);
14759+GLAPI void GLAPIENTRY glMultiTexCoord1dvARB(GLenum target, const GLdouble *v);
14760+GLAPI void GLAPIENTRY glMultiTexCoord1fARB(GLenum target, GLfloat s);
14761+GLAPI void GLAPIENTRY glMultiTexCoord1fvARB(GLenum target, const GLfloat *v);
14762+GLAPI void GLAPIENTRY glMultiTexCoord1iARB(GLenum target, GLint s);
14763+GLAPI void GLAPIENTRY glMultiTexCoord1ivARB(GLenum target, const GLint *v);
14764+GLAPI void GLAPIENTRY glMultiTexCoord1sARB(GLenum target, GLshort s);
14765+GLAPI void GLAPIENTRY glMultiTexCoord1svARB(GLenum target, const GLshort *v);
14766+GLAPI void GLAPIENTRY glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t);
14767+GLAPI void GLAPIENTRY glMultiTexCoord2dvARB(GLenum target, const GLdouble *v);
14768+GLAPI void GLAPIENTRY glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t);
14769+GLAPI void GLAPIENTRY glMultiTexCoord2fvARB(GLenum target, const GLfloat *v);
14770+GLAPI void GLAPIENTRY glMultiTexCoord2iARB(GLenum target, GLint s, GLint t);
14771+GLAPI void GLAPIENTRY glMultiTexCoord2ivARB(GLenum target, const GLint *v);
14772+GLAPI void GLAPIENTRY glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t);
14773+GLAPI void GLAPIENTRY glMultiTexCoord2svARB(GLenum target, const GLshort *v);
14774+GLAPI void GLAPIENTRY glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r);
14775+GLAPI void GLAPIENTRY glMultiTexCoord3dvARB(GLenum target, const GLdouble *v);
14776+GLAPI void GLAPIENTRY glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r);
14777+GLAPI void GLAPIENTRY glMultiTexCoord3fvARB(GLenum target, const GLfloat *v);
14778+GLAPI void GLAPIENTRY glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r);
14779+GLAPI void GLAPIENTRY glMultiTexCoord3ivARB(GLenum target, const GLint *v);
14780+GLAPI void GLAPIENTRY glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r);
14781+GLAPI void GLAPIENTRY glMultiTexCoord3svARB(GLenum target, const GLshort *v);
14782+GLAPI void GLAPIENTRY glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
14783+GLAPI void GLAPIENTRY glMultiTexCoord4dvARB(GLenum target, const GLdouble *v);
14784+GLAPI void GLAPIENTRY glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
14785+GLAPI void GLAPIENTRY glMultiTexCoord4fvARB(GLenum target, const GLfloat *v);
14786+GLAPI void GLAPIENTRY glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q);
14787+GLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v);
14788+GLAPI void GLAPIENTRY glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
14789+GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v);
14790+
14791+typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
14792+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
14793+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
14794+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
14795+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
14796+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
14797+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
14798+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
14799+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
14800+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
14801+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
14802+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
14803+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
14804+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
14805+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
14806+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
14807+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
14808+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
14809+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
14810+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
14811+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
14812+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
14813+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
14814+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
14815+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
14816+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
14817+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
14818+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
14819+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
14820+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
14821+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
14822+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
14823+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
14824+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
14825+
14826+#endif /* GL_ARB_multitexture */
14827+
14828+
14829+
14830+/*
14831+ * Define this token if you want "old-style" header file behaviour (extensions
14832+ * defined in gl.h). Otherwise, extensions will be included from glext.h.
14833+ */
14834+#if defined(GL_GLEXT_LEGACY)
14835+
14836+/* All extensions that used to be here are now found in glext.h */
14837+
14838+#else /* GL_GLEXT_LEGACY */
14839+
14840+#include <mesa_glext.h>
14841+
14842+#endif /* GL_GLEXT_LEGACY */
14843+
14844+
14845+
14846+#if GL_ARB_shader_objects
14847+
14848+#ifndef GL_MESA_shader_debug
14849+#define GL_MESA_shader_debug 1
14850+
14851+#define GL_DEBUG_OBJECT_MESA 0x8759
14852+#define GL_DEBUG_PRINT_MESA 0x875A
14853+#define GL_DEBUG_ASSERT_MESA 0x875B
14854+
14855+GLAPI GLhandleARB APIENTRY glCreateDebugObjectMESA (void);
14856+GLAPI void APIENTRY glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
14857+GLAPI void APIENTRY glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength,
14858+ GLsizei *length, GLcharARB *debugLog);
14859+GLAPI GLsizei APIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
14860+
14861+#endif /* GL_MESA_shader_debug */
14862+
14863+#endif /* GL_ARB_shader_objects */
14864+
14865+
14866+/*
14867+ * ???. GL_MESA_packed_depth_stencil
14868+ * XXX obsolete
14869+ */
14870+#ifndef GL_MESA_packed_depth_stencil
14871+#define GL_MESA_packed_depth_stencil 1
14872+
14873+#define GL_DEPTH_STENCIL_MESA 0x8750
14874+#define GL_UNSIGNED_INT_24_8_MESA 0x8751
14875+#define GL_UNSIGNED_INT_8_24_REV_MESA 0x8752
14876+#define GL_UNSIGNED_SHORT_15_1_MESA 0x8753
14877+#define GL_UNSIGNED_SHORT_1_15_REV_MESA 0x8754
14878+
14879+#endif /* GL_MESA_packed_depth_stencil */
14880+
14881+
14882+#ifndef GL_MESA_program_debug
14883+#define GL_MESA_program_debug 1
14884+
14885+#define GL_FRAGMENT_PROGRAM_POSITION_MESA 0x8bb0
14886+#define GL_FRAGMENT_PROGRAM_CALLBACK_MESA 0x8bb1
14887+#define GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA 0x8bb2
14888+#define GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA 0x8bb3
14889+#define GL_VERTEX_PROGRAM_POSITION_MESA 0x8bb4
14890+#define GL_VERTEX_PROGRAM_CALLBACK_MESA 0x8bb5
14891+#define GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA 0x8bb6
14892+#define GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA 0x8bb7
14893+
14894+typedef void (*GLprogramcallbackMESA)(GLenum target, GLvoid *data);
14895+
14896+GLAPI void GLAPIENTRY glProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, GLvoid *data);
14897+
14898+GLAPI void GLAPIENTRY glGetProgramRegisterfvMESA(GLenum target, GLsizei len, const GLubyte *name, GLfloat *v);
14899+
14900+#endif /* GL_MESA_program_debug */
14901+
14902+
14903+#ifndef GL_ATI_blend_equation_separate
14904+#define GL_ATI_blend_equation_separate 1
14905+
14906+#define GL_ALPHA_BLEND_EQUATION_ATI 0x883D
14907+
14908+GLAPI void GLAPIENTRY glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA );
14909+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA);
14910+
14911+#endif /* GL_ATI_blend_equation_separate */
14912+
14913+
14914+
14915+/**
14916+ ** NOTE!!!!! If you add new functions to this file, or update
14917+ ** glext.h be sure to regenerate the gl_mangle.h file. See comments
14918+ ** in that file for details.
14919+ **/
14920+
14921+
14922+
14923+/**********************************************************************
14924+ * Begin system-specific stuff
14925+ */
14926+#if defined(PRAGMA_EXPORT_SUPPORTED)
14927+#pragma export off
14928+#endif
14929+
14930+#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
14931+#pragma import off
14932+#endif
14933+/*
14934+ * End system-specific stuff
14935+ **********************************************************************/
14936+
14937+
14938+#ifdef __cplusplus
14939+}
14940+#endif
14941+
14942+#endif /* __gl_h_ */
14943Index: qemu-0.12.4/target-i386/mesa_glext.h
14944===================================================================
14945--- /dev/null
14946+++ qemu-0.12.4/target-i386/mesa_glext.h
14947@@ -0,0 +1,7279 @@
14948+#ifndef __glext_h_
14949+#define __glext_h_
14950+
14951+#ifdef __cplusplus
14952+extern "C" {
14953+#endif
14954+
14955+/*
14956+** Copyright (c) 2007 The Khronos Group Inc.
14957+**
14958+** Permission is hereby granted, free of charge, to any person obtaining a
14959+** copy of this software and/or associated documentation files (the
14960+** "Materials"), to deal in the Materials without restriction, including
14961+** without limitation the rights to use, copy, modify, merge, publish,
14962+** distribute, sublicense, and/or sell copies of the Materials, and to
14963+** permit persons to whom the Materials are furnished to do so, subject to
14964+** the following conditions:
14965+**
14966+** The above copyright notice and this permission notice shall be included
14967+** in all copies or substantial portions of the Materials.
14968+**
14969+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
14970+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14971+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
14972+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
14973+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
14974+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
14975+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
14976+*/
14977+
14978+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
14979+#define WIN32_LEAN_AND_MEAN 1
14980+#include <windows.h>
14981+#endif
14982+
14983+#ifndef APIENTRY
14984+#define APIENTRY
14985+#endif
14986+#ifndef APIENTRYP
14987+#define APIENTRYP APIENTRY *
14988+#endif
14989+#ifndef GLAPI
14990+#define GLAPI extern
14991+#endif
14992+
14993+/*************************************************************/
14994+
14995+/* Header file version number, required by OpenGL ABI for Linux */
14996+/* glext.h last updated 2007/02/12 */
14997+/* Current version at http://www.opengl.org/registry/ */
14998+#define GL_GLEXT_VERSION 39
14999+
15000+#ifndef GL_VERSION_1_2
15001+#define GL_UNSIGNED_BYTE_3_3_2 0x8032
15002+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
15003+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
15004+#define GL_UNSIGNED_INT_8_8_8_8 0x8035
15005+#define GL_UNSIGNED_INT_10_10_10_2 0x8036
15006+#define GL_RESCALE_NORMAL 0x803A
15007+#define GL_TEXTURE_BINDING_3D 0x806A
15008+#define GL_PACK_SKIP_IMAGES 0x806B
15009+#define GL_PACK_IMAGE_HEIGHT 0x806C
15010+#define GL_UNPACK_SKIP_IMAGES 0x806D
15011+#define GL_UNPACK_IMAGE_HEIGHT 0x806E
15012+#define GL_TEXTURE_3D 0x806F
15013+#define GL_PROXY_TEXTURE_3D 0x8070
15014+#define GL_TEXTURE_DEPTH 0x8071
15015+#define GL_TEXTURE_WRAP_R 0x8072
15016+#define GL_MAX_3D_TEXTURE_SIZE 0x8073
15017+#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
15018+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
15019+#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
15020+#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
15021+#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
15022+#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
15023+#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
15024+#define GL_BGR 0x80E0
15025+#define GL_BGRA 0x80E1
15026+#define GL_MAX_ELEMENTS_VERTICES 0x80E8
15027+#define GL_MAX_ELEMENTS_INDICES 0x80E9
15028+#define GL_CLAMP_TO_EDGE 0x812F
15029+#define GL_TEXTURE_MIN_LOD 0x813A
15030+#define GL_TEXTURE_MAX_LOD 0x813B
15031+#define GL_TEXTURE_BASE_LEVEL 0x813C
15032+#define GL_TEXTURE_MAX_LEVEL 0x813D
15033+#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
15034+#define GL_SINGLE_COLOR 0x81F9
15035+#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
15036+#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
15037+#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
15038+#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
15039+#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
15040+#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
15041+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
15042+#endif
15043+
15044+#ifndef GL_ARB_imaging
15045+#define GL_CONSTANT_COLOR 0x8001
15046+#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
15047+#define GL_CONSTANT_ALPHA 0x8003
15048+#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
15049+#define GL_BLEND_COLOR 0x8005
15050+#define GL_FUNC_ADD 0x8006
15051+#define GL_MIN 0x8007
15052+#define GL_MAX 0x8008
15053+#define GL_BLEND_EQUATION 0x8009
15054+#define GL_FUNC_SUBTRACT 0x800A
15055+#define GL_FUNC_REVERSE_SUBTRACT 0x800B
15056+#define GL_CONVOLUTION_1D 0x8010
15057+#define GL_CONVOLUTION_2D 0x8011
15058+#define GL_SEPARABLE_2D 0x8012
15059+#define GL_CONVOLUTION_BORDER_MODE 0x8013
15060+#define GL_CONVOLUTION_FILTER_SCALE 0x8014
15061+#define GL_CONVOLUTION_FILTER_BIAS 0x8015
15062+#define GL_REDUCE 0x8016
15063+#define GL_CONVOLUTION_FORMAT 0x8017
15064+#define GL_CONVOLUTION_WIDTH 0x8018
15065+#define GL_CONVOLUTION_HEIGHT 0x8019
15066+#define GL_MAX_CONVOLUTION_WIDTH 0x801A
15067+#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
15068+#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
15069+#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
15070+#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
15071+#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
15072+#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
15073+#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
15074+#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
15075+#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
15076+#define GL_HISTOGRAM 0x8024
15077+#define GL_PROXY_HISTOGRAM 0x8025
15078+#define GL_HISTOGRAM_WIDTH 0x8026
15079+#define GL_HISTOGRAM_FORMAT 0x8027
15080+#define GL_HISTOGRAM_RED_SIZE 0x8028
15081+#define GL_HISTOGRAM_GREEN_SIZE 0x8029
15082+#define GL_HISTOGRAM_BLUE_SIZE 0x802A
15083+#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
15084+#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
15085+#define GL_HISTOGRAM_SINK 0x802D
15086+#define GL_MINMAX 0x802E
15087+#define GL_MINMAX_FORMAT 0x802F
15088+#define GL_MINMAX_SINK 0x8030
15089+#define GL_TABLE_TOO_LARGE 0x8031
15090+#define GL_COLOR_MATRIX 0x80B1
15091+#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
15092+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
15093+#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
15094+#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
15095+#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
15096+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
15097+#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
15098+#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
15099+#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
15100+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
15101+#define GL_COLOR_TABLE 0x80D0
15102+#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
15103+#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
15104+#define GL_PROXY_COLOR_TABLE 0x80D3
15105+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
15106+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
15107+#define GL_COLOR_TABLE_SCALE 0x80D6
15108+#define GL_COLOR_TABLE_BIAS 0x80D7
15109+#define GL_COLOR_TABLE_FORMAT 0x80D8
15110+#define GL_COLOR_TABLE_WIDTH 0x80D9
15111+#define GL_COLOR_TABLE_RED_SIZE 0x80DA
15112+#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
15113+#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
15114+#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
15115+#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
15116+#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
15117+#define GL_CONSTANT_BORDER 0x8151
15118+#define GL_REPLICATE_BORDER 0x8153
15119+#define GL_CONVOLUTION_BORDER_COLOR 0x8154
15120+#endif
15121+
15122+#ifndef GL_VERSION_1_3
15123+#define GL_TEXTURE0 0x84C0
15124+#define GL_TEXTURE1 0x84C1
15125+#define GL_TEXTURE2 0x84C2
15126+#define GL_TEXTURE3 0x84C3
15127+#define GL_TEXTURE4 0x84C4
15128+#define GL_TEXTURE5 0x84C5
15129+#define GL_TEXTURE6 0x84C6
15130+#define GL_TEXTURE7 0x84C7
15131+#define GL_TEXTURE8 0x84C8
15132+#define GL_TEXTURE9 0x84C9
15133+#define GL_TEXTURE10 0x84CA
15134+#define GL_TEXTURE11 0x84CB
15135+#define GL_TEXTURE12 0x84CC
15136+#define GL_TEXTURE13 0x84CD
15137+#define GL_TEXTURE14 0x84CE
15138+#define GL_TEXTURE15 0x84CF
15139+#define GL_TEXTURE16 0x84D0
15140+#define GL_TEXTURE17 0x84D1
15141+#define GL_TEXTURE18 0x84D2
15142+#define GL_TEXTURE19 0x84D3
15143+#define GL_TEXTURE20 0x84D4
15144+#define GL_TEXTURE21 0x84D5
15145+#define GL_TEXTURE22 0x84D6
15146+#define GL_TEXTURE23 0x84D7
15147+#define GL_TEXTURE24 0x84D8
15148+#define GL_TEXTURE25 0x84D9
15149+#define GL_TEXTURE26 0x84DA
15150+#define GL_TEXTURE27 0x84DB
15151+#define GL_TEXTURE28 0x84DC
15152+#define GL_TEXTURE29 0x84DD
15153+#define GL_TEXTURE30 0x84DE
15154+#define GL_TEXTURE31 0x84DF
15155+#define GL_ACTIVE_TEXTURE 0x84E0
15156+#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
15157+#define GL_MAX_TEXTURE_UNITS 0x84E2
15158+#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
15159+#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
15160+#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
15161+#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
15162+#define GL_MULTISAMPLE 0x809D
15163+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
15164+#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
15165+#define GL_SAMPLE_COVERAGE 0x80A0
15166+#define GL_SAMPLE_BUFFERS 0x80A8
15167+#define GL_SAMPLES 0x80A9
15168+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
15169+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
15170+#define GL_MULTISAMPLE_BIT 0x20000000
15171+#define GL_NORMAL_MAP 0x8511
15172+#define GL_REFLECTION_MAP 0x8512
15173+#define GL_TEXTURE_CUBE_MAP 0x8513
15174+#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
15175+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
15176+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
15177+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
15178+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
15179+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
15180+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
15181+#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
15182+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
15183+#define GL_COMPRESSED_ALPHA 0x84E9
15184+#define GL_COMPRESSED_LUMINANCE 0x84EA
15185+#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
15186+#define GL_COMPRESSED_INTENSITY 0x84EC
15187+#define GL_COMPRESSED_RGB 0x84ED
15188+#define GL_COMPRESSED_RGBA 0x84EE
15189+#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
15190+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
15191+#define GL_TEXTURE_COMPRESSED 0x86A1
15192+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
15193+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
15194+#define GL_CLAMP_TO_BORDER 0x812D
15195+#define GL_COMBINE 0x8570
15196+#define GL_COMBINE_RGB 0x8571
15197+#define GL_COMBINE_ALPHA 0x8572
15198+#define GL_SOURCE0_RGB 0x8580
15199+#define GL_SOURCE1_RGB 0x8581
15200+#define GL_SOURCE2_RGB 0x8582
15201+#define GL_SOURCE0_ALPHA 0x8588
15202+#define GL_SOURCE1_ALPHA 0x8589
15203+#define GL_SOURCE2_ALPHA 0x858A
15204+#define GL_OPERAND0_RGB 0x8590
15205+#define GL_OPERAND1_RGB 0x8591
15206+#define GL_OPERAND2_RGB 0x8592
15207+#define GL_OPERAND0_ALPHA 0x8598
15208+#define GL_OPERAND1_ALPHA 0x8599
15209+#define GL_OPERAND2_ALPHA 0x859A
15210+#define GL_RGB_SCALE 0x8573
15211+#define GL_ADD_SIGNED 0x8574
15212+#define GL_INTERPOLATE 0x8575
15213+#define GL_SUBTRACT 0x84E7
15214+#define GL_CONSTANT 0x8576
15215+#define GL_PRIMARY_COLOR 0x8577
15216+#define GL_PREVIOUS 0x8578
15217+#define GL_DOT3_RGB 0x86AE
15218+#define GL_DOT3_RGBA 0x86AF
15219+#endif
15220+
15221+#ifndef GL_VERSION_1_4
15222+#define GL_BLEND_DST_RGB 0x80C8
15223+#define GL_BLEND_SRC_RGB 0x80C9
15224+#define GL_BLEND_DST_ALPHA 0x80CA
15225+#define GL_BLEND_SRC_ALPHA 0x80CB
15226+#define GL_POINT_SIZE_MIN 0x8126
15227+#define GL_POINT_SIZE_MAX 0x8127
15228+#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
15229+#define GL_POINT_DISTANCE_ATTENUATION 0x8129
15230+#define GL_GENERATE_MIPMAP 0x8191
15231+#define GL_GENERATE_MIPMAP_HINT 0x8192
15232+#define GL_DEPTH_COMPONENT16 0x81A5
15233+#define GL_DEPTH_COMPONENT24 0x81A6
15234+#define GL_DEPTH_COMPONENT32 0x81A7
15235+#define GL_MIRRORED_REPEAT 0x8370
15236+#define GL_FOG_COORDINATE_SOURCE 0x8450
15237+#define GL_FOG_COORDINATE 0x8451
15238+#define GL_FRAGMENT_DEPTH 0x8452
15239+#define GL_CURRENT_FOG_COORDINATE 0x8453
15240+#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454
15241+#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455
15242+#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456
15243+#define GL_FOG_COORDINATE_ARRAY 0x8457
15244+#define GL_COLOR_SUM 0x8458
15245+#define GL_CURRENT_SECONDARY_COLOR 0x8459
15246+#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A
15247+#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B
15248+#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C
15249+#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D
15250+#define GL_SECONDARY_COLOR_ARRAY 0x845E
15251+#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
15252+#define GL_TEXTURE_FILTER_CONTROL 0x8500
15253+#define GL_TEXTURE_LOD_BIAS 0x8501
15254+#define GL_INCR_WRAP 0x8507
15255+#define GL_DECR_WRAP 0x8508
15256+#define GL_TEXTURE_DEPTH_SIZE 0x884A
15257+#define GL_DEPTH_TEXTURE_MODE 0x884B
15258+#define GL_TEXTURE_COMPARE_MODE 0x884C
15259+#define GL_TEXTURE_COMPARE_FUNC 0x884D
15260+#define GL_COMPARE_R_TO_TEXTURE 0x884E
15261+#endif
15262+
15263+#ifndef GL_VERSION_1_5
15264+#define GL_BUFFER_SIZE 0x8764
15265+#define GL_BUFFER_USAGE 0x8765
15266+#define GL_QUERY_COUNTER_BITS 0x8864
15267+#define GL_CURRENT_QUERY 0x8865
15268+#define GL_QUERY_RESULT 0x8866
15269+#define GL_QUERY_RESULT_AVAILABLE 0x8867
15270+#define GL_ARRAY_BUFFER 0x8892
15271+#define GL_ELEMENT_ARRAY_BUFFER 0x8893
15272+#define GL_ARRAY_BUFFER_BINDING 0x8894
15273+#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
15274+#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
15275+#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
15276+#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
15277+#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899
15278+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
15279+#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B
15280+#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C
15281+#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D
15282+#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E
15283+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
15284+#define GL_READ_ONLY 0x88B8
15285+#define GL_WRITE_ONLY 0x88B9
15286+#define GL_READ_WRITE 0x88BA
15287+#define GL_BUFFER_ACCESS 0x88BB
15288+#define GL_BUFFER_MAPPED 0x88BC
15289+#define GL_BUFFER_MAP_POINTER 0x88BD
15290+#define GL_STREAM_DRAW 0x88E0
15291+#define GL_STREAM_READ 0x88E1
15292+#define GL_STREAM_COPY 0x88E2
15293+#define GL_STATIC_DRAW 0x88E4
15294+#define GL_STATIC_READ 0x88E5
15295+#define GL_STATIC_COPY 0x88E6
15296+#define GL_DYNAMIC_DRAW 0x88E8
15297+#define GL_DYNAMIC_READ 0x88E9
15298+#define GL_DYNAMIC_COPY 0x88EA
15299+#define GL_SAMPLES_PASSED 0x8914
15300+#define GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE
15301+#define GL_FOG_COORD GL_FOG_COORDINATE
15302+#define GL_CURRENT_FOG_COORD GL_CURRENT_FOG_COORDINATE
15303+#define GL_FOG_COORD_ARRAY_TYPE GL_FOG_COORDINATE_ARRAY_TYPE
15304+#define GL_FOG_COORD_ARRAY_STRIDE GL_FOG_COORDINATE_ARRAY_STRIDE
15305+#define GL_FOG_COORD_ARRAY_POINTER GL_FOG_COORDINATE_ARRAY_POINTER
15306+#define GL_FOG_COORD_ARRAY GL_FOG_COORDINATE_ARRAY
15307+#define GL_FOG_COORD_ARRAY_BUFFER_BINDING GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING
15308+#define GL_SRC0_RGB GL_SOURCE0_RGB
15309+#define GL_SRC1_RGB GL_SOURCE1_RGB
15310+#define GL_SRC2_RGB GL_SOURCE2_RGB
15311+#define GL_SRC0_ALPHA GL_SOURCE0_ALPHA
15312+#define GL_SRC1_ALPHA GL_SOURCE1_ALPHA
15313+#define GL_SRC2_ALPHA GL_SOURCE2_ALPHA
15314+#endif
15315+
15316+#ifndef GL_VERSION_2_0
15317+#define GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION
15318+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
15319+#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
15320+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
15321+#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
15322+#define GL_CURRENT_VERTEX_ATTRIB 0x8626
15323+#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
15324+#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643
15325+#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
15326+#define GL_STENCIL_BACK_FUNC 0x8800
15327+#define GL_STENCIL_BACK_FAIL 0x8801
15328+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
15329+#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
15330+#define GL_MAX_DRAW_BUFFERS 0x8824
15331+#define GL_DRAW_BUFFER0 0x8825
15332+#define GL_DRAW_BUFFER1 0x8826
15333+#define GL_DRAW_BUFFER2 0x8827
15334+#define GL_DRAW_BUFFER3 0x8828
15335+#define GL_DRAW_BUFFER4 0x8829
15336+#define GL_DRAW_BUFFER5 0x882A
15337+#define GL_DRAW_BUFFER6 0x882B
15338+#define GL_DRAW_BUFFER7 0x882C
15339+#define GL_DRAW_BUFFER8 0x882D
15340+#define GL_DRAW_BUFFER9 0x882E
15341+#define GL_DRAW_BUFFER10 0x882F
15342+#define GL_DRAW_BUFFER11 0x8830
15343+#define GL_DRAW_BUFFER12 0x8831
15344+#define GL_DRAW_BUFFER13 0x8832
15345+#define GL_DRAW_BUFFER14 0x8833
15346+#define GL_DRAW_BUFFER15 0x8834
15347+#define GL_BLEND_EQUATION_ALPHA 0x883D
15348+#define GL_POINT_SPRITE 0x8861
15349+#define GL_COORD_REPLACE 0x8862
15350+#define GL_MAX_VERTEX_ATTRIBS 0x8869
15351+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
15352+#define GL_MAX_TEXTURE_COORDS 0x8871
15353+#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
15354+#define GL_FRAGMENT_SHADER 0x8B30
15355+#define GL_VERTEX_SHADER 0x8B31
15356+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
15357+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
15358+#define GL_MAX_VARYING_FLOATS 0x8B4B
15359+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
15360+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
15361+#define GL_SHADER_TYPE 0x8B4F
15362+#define GL_FLOAT_VEC2 0x8B50
15363+#define GL_FLOAT_VEC3 0x8B51
15364+#define GL_FLOAT_VEC4 0x8B52
15365+#define GL_INT_VEC2 0x8B53
15366+#define GL_INT_VEC3 0x8B54
15367+#define GL_INT_VEC4 0x8B55
15368+#define GL_BOOL 0x8B56
15369+#define GL_BOOL_VEC2 0x8B57
15370+#define GL_BOOL_VEC3 0x8B58
15371+#define GL_BOOL_VEC4 0x8B59
15372+#define GL_FLOAT_MAT2 0x8B5A
15373+#define GL_FLOAT_MAT3 0x8B5B
15374+#define GL_FLOAT_MAT4 0x8B5C
15375+#define GL_SAMPLER_1D 0x8B5D
15376+#define GL_SAMPLER_2D 0x8B5E
15377+#define GL_SAMPLER_3D 0x8B5F
15378+#define GL_SAMPLER_CUBE 0x8B60
15379+#define GL_SAMPLER_1D_SHADOW 0x8B61
15380+#define GL_SAMPLER_2D_SHADOW 0x8B62
15381+#define GL_DELETE_STATUS 0x8B80
15382+#define GL_COMPILE_STATUS 0x8B81
15383+#define GL_LINK_STATUS 0x8B82
15384+#define GL_VALIDATE_STATUS 0x8B83
15385+#define GL_INFO_LOG_LENGTH 0x8B84
15386+#define GL_ATTACHED_SHADERS 0x8B85
15387+#define GL_ACTIVE_UNIFORMS 0x8B86
15388+#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
15389+#define GL_SHADER_SOURCE_LENGTH 0x8B88
15390+#define GL_ACTIVE_ATTRIBUTES 0x8B89
15391+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
15392+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
15393+#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
15394+#define GL_CURRENT_PROGRAM 0x8B8D
15395+#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
15396+#define GL_LOWER_LEFT 0x8CA1
15397+#define GL_UPPER_LEFT 0x8CA2
15398+#define GL_STENCIL_BACK_REF 0x8CA3
15399+#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
15400+#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
15401+#endif
15402+
15403+#ifndef GL_VERSION_2_1
15404+#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F
15405+#define GL_PIXEL_PACK_BUFFER 0x88EB
15406+#define GL_PIXEL_UNPACK_BUFFER 0x88EC
15407+#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
15408+#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
15409+#define GL_FLOAT_MAT2x3 0x8B65
15410+#define GL_FLOAT_MAT2x4 0x8B66
15411+#define GL_FLOAT_MAT3x2 0x8B67
15412+#define GL_FLOAT_MAT3x4 0x8B68
15413+#define GL_FLOAT_MAT4x2 0x8B69
15414+#define GL_FLOAT_MAT4x3 0x8B6A
15415+#define GL_SRGB 0x8C40
15416+#define GL_SRGB8 0x8C41
15417+#define GL_SRGB_ALPHA 0x8C42
15418+#define GL_SRGB8_ALPHA8 0x8C43
15419+#define GL_SLUMINANCE_ALPHA 0x8C44
15420+#define GL_SLUMINANCE8_ALPHA8 0x8C45
15421+#define GL_SLUMINANCE 0x8C46
15422+#define GL_SLUMINANCE8 0x8C47
15423+#define GL_COMPRESSED_SRGB 0x8C48
15424+#define GL_COMPRESSED_SRGB_ALPHA 0x8C49
15425+#define GL_COMPRESSED_SLUMINANCE 0x8C4A
15426+#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B
15427+#endif
15428+
15429+#ifndef GL_ARB_multitexture
15430+#define GL_TEXTURE0_ARB 0x84C0
15431+#define GL_TEXTURE1_ARB 0x84C1
15432+#define GL_TEXTURE2_ARB 0x84C2
15433+#define GL_TEXTURE3_ARB 0x84C3
15434+#define GL_TEXTURE4_ARB 0x84C4
15435+#define GL_TEXTURE5_ARB 0x84C5
15436+#define GL_TEXTURE6_ARB 0x84C6
15437+#define GL_TEXTURE7_ARB 0x84C7
15438+#define GL_TEXTURE8_ARB 0x84C8
15439+#define GL_TEXTURE9_ARB 0x84C9
15440+#define GL_TEXTURE10_ARB 0x84CA
15441+#define GL_TEXTURE11_ARB 0x84CB
15442+#define GL_TEXTURE12_ARB 0x84CC
15443+#define GL_TEXTURE13_ARB 0x84CD
15444+#define GL_TEXTURE14_ARB 0x84CE
15445+#define GL_TEXTURE15_ARB 0x84CF
15446+#define GL_TEXTURE16_ARB 0x84D0
15447+#define GL_TEXTURE17_ARB 0x84D1
15448+#define GL_TEXTURE18_ARB 0x84D2
15449+#define GL_TEXTURE19_ARB 0x84D3
15450+#define GL_TEXTURE20_ARB 0x84D4
15451+#define GL_TEXTURE21_ARB 0x84D5
15452+#define GL_TEXTURE22_ARB 0x84D6
15453+#define GL_TEXTURE23_ARB 0x84D7
15454+#define GL_TEXTURE24_ARB 0x84D8
15455+#define GL_TEXTURE25_ARB 0x84D9
15456+#define GL_TEXTURE26_ARB 0x84DA
15457+#define GL_TEXTURE27_ARB 0x84DB
15458+#define GL_TEXTURE28_ARB 0x84DC
15459+#define GL_TEXTURE29_ARB 0x84DD
15460+#define GL_TEXTURE30_ARB 0x84DE
15461+#define GL_TEXTURE31_ARB 0x84DF
15462+#define GL_ACTIVE_TEXTURE_ARB 0x84E0
15463+#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
15464+#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
15465+#endif
15466+
15467+#ifndef GL_ARB_transpose_matrix
15468+#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3
15469+#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4
15470+#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5
15471+#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6
15472+#endif
15473+
15474+#ifndef GL_ARB_multisample
15475+#define GL_MULTISAMPLE_ARB 0x809D
15476+#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E
15477+#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F
15478+#define GL_SAMPLE_COVERAGE_ARB 0x80A0
15479+#define GL_SAMPLE_BUFFERS_ARB 0x80A8
15480+#define GL_SAMPLES_ARB 0x80A9
15481+#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA
15482+#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB
15483+#define GL_MULTISAMPLE_BIT_ARB 0x20000000
15484+#endif
15485+
15486+#ifndef GL_ARB_texture_env_add
15487+#endif
15488+
15489+#ifndef GL_ARB_texture_cube_map
15490+#define GL_NORMAL_MAP_ARB 0x8511
15491+#define GL_REFLECTION_MAP_ARB 0x8512
15492+#define GL_TEXTURE_CUBE_MAP_ARB 0x8513
15493+#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514
15494+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515
15495+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516
15496+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517
15497+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518
15498+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519
15499+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A
15500+#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B
15501+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C
15502+#endif
15503+
15504+#ifndef GL_ARB_texture_compression
15505+#define GL_COMPRESSED_ALPHA_ARB 0x84E9
15506+#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA
15507+#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB
15508+#define GL_COMPRESSED_INTENSITY_ARB 0x84EC
15509+#define GL_COMPRESSED_RGB_ARB 0x84ED
15510+#define GL_COMPRESSED_RGBA_ARB 0x84EE
15511+#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF
15512+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
15513+#define GL_TEXTURE_COMPRESSED_ARB 0x86A1
15514+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
15515+#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
15516+#endif
15517+
15518+#ifndef GL_ARB_texture_border_clamp
15519+#define GL_CLAMP_TO_BORDER_ARB 0x812D
15520+#endif
15521+
15522+#ifndef GL_ARB_point_parameters
15523+#define GL_POINT_SIZE_MIN_ARB 0x8126
15524+#define GL_POINT_SIZE_MAX_ARB 0x8127
15525+#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128
15526+#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129
15527+#endif
15528+
15529+#ifndef GL_ARB_vertex_blend
15530+#define GL_MAX_VERTEX_UNITS_ARB 0x86A4
15531+#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5
15532+#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6
15533+#define GL_VERTEX_BLEND_ARB 0x86A7
15534+#define GL_CURRENT_WEIGHT_ARB 0x86A8
15535+#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9
15536+#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA
15537+#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB
15538+#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC
15539+#define GL_WEIGHT_ARRAY_ARB 0x86AD
15540+#define GL_MODELVIEW0_ARB 0x1700
15541+#define GL_MODELVIEW1_ARB 0x850A
15542+#define GL_MODELVIEW2_ARB 0x8722
15543+#define GL_MODELVIEW3_ARB 0x8723
15544+#define GL_MODELVIEW4_ARB 0x8724
15545+#define GL_MODELVIEW5_ARB 0x8725
15546+#define GL_MODELVIEW6_ARB 0x8726
15547+#define GL_MODELVIEW7_ARB 0x8727
15548+#define GL_MODELVIEW8_ARB 0x8728
15549+#define GL_MODELVIEW9_ARB 0x8729
15550+#define GL_MODELVIEW10_ARB 0x872A
15551+#define GL_MODELVIEW11_ARB 0x872B
15552+#define GL_MODELVIEW12_ARB 0x872C
15553+#define GL_MODELVIEW13_ARB 0x872D
15554+#define GL_MODELVIEW14_ARB 0x872E
15555+#define GL_MODELVIEW15_ARB 0x872F
15556+#define GL_MODELVIEW16_ARB 0x8730
15557+#define GL_MODELVIEW17_ARB 0x8731
15558+#define GL_MODELVIEW18_ARB 0x8732
15559+#define GL_MODELVIEW19_ARB 0x8733
15560+#define GL_MODELVIEW20_ARB 0x8734
15561+#define GL_MODELVIEW21_ARB 0x8735
15562+#define GL_MODELVIEW22_ARB 0x8736
15563+#define GL_MODELVIEW23_ARB 0x8737
15564+#define GL_MODELVIEW24_ARB 0x8738
15565+#define GL_MODELVIEW25_ARB 0x8739
15566+#define GL_MODELVIEW26_ARB 0x873A
15567+#define GL_MODELVIEW27_ARB 0x873B
15568+#define GL_MODELVIEW28_ARB 0x873C
15569+#define GL_MODELVIEW29_ARB 0x873D
15570+#define GL_MODELVIEW30_ARB 0x873E
15571+#define GL_MODELVIEW31_ARB 0x873F
15572+#endif
15573+
15574+#ifndef GL_ARB_matrix_palette
15575+#define GL_MATRIX_PALETTE_ARB 0x8840
15576+#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841
15577+#define GL_MAX_PALETTE_MATRICES_ARB 0x8842
15578+#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843
15579+#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844
15580+#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845
15581+#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846
15582+#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847
15583+#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848
15584+#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849
15585+#endif
15586+
15587+#ifndef GL_ARB_texture_env_combine
15588+#define GL_COMBINE_ARB 0x8570
15589+#define GL_COMBINE_RGB_ARB 0x8571
15590+#define GL_COMBINE_ALPHA_ARB 0x8572
15591+#define GL_SOURCE0_RGB_ARB 0x8580
15592+#define GL_SOURCE1_RGB_ARB 0x8581
15593+#define GL_SOURCE2_RGB_ARB 0x8582
15594+#define GL_SOURCE0_ALPHA_ARB 0x8588
15595+#define GL_SOURCE1_ALPHA_ARB 0x8589
15596+#define GL_SOURCE2_ALPHA_ARB 0x858A
15597+#define GL_OPERAND0_RGB_ARB 0x8590
15598+#define GL_OPERAND1_RGB_ARB 0x8591
15599+#define GL_OPERAND2_RGB_ARB 0x8592
15600+#define GL_OPERAND0_ALPHA_ARB 0x8598
15601+#define GL_OPERAND1_ALPHA_ARB 0x8599
15602+#define GL_OPERAND2_ALPHA_ARB 0x859A
15603+#define GL_RGB_SCALE_ARB 0x8573
15604+#define GL_ADD_SIGNED_ARB 0x8574
15605+#define GL_INTERPOLATE_ARB 0x8575
15606+#define GL_SUBTRACT_ARB 0x84E7
15607+#define GL_CONSTANT_ARB 0x8576
15608+#define GL_PRIMARY_COLOR_ARB 0x8577
15609+#define GL_PREVIOUS_ARB 0x8578
15610+#endif
15611+
15612+#ifndef GL_ARB_texture_env_crossbar
15613+#endif
15614+
15615+#ifndef GL_ARB_texture_env_dot3
15616+#define GL_DOT3_RGB_ARB 0x86AE
15617+#define GL_DOT3_RGBA_ARB 0x86AF
15618+#endif
15619+
15620+#ifndef GL_ARB_texture_mirrored_repeat
15621+#define GL_MIRRORED_REPEAT_ARB 0x8370
15622+#endif
15623+
15624+#ifndef GL_ARB_depth_texture
15625+#define GL_DEPTH_COMPONENT16_ARB 0x81A5
15626+#define GL_DEPTH_COMPONENT24_ARB 0x81A6
15627+#define GL_DEPTH_COMPONENT32_ARB 0x81A7
15628+#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A
15629+#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B
15630+#endif
15631+
15632+#ifndef GL_ARB_shadow
15633+#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C
15634+#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D
15635+#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E
15636+#endif
15637+
15638+#ifndef GL_ARB_shadow_ambient
15639+#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF
15640+#endif
15641+
15642+#ifndef GL_ARB_window_pos
15643+#endif
15644+
15645+#ifndef GL_ARB_vertex_program
15646+#define GL_COLOR_SUM_ARB 0x8458
15647+#define GL_VERTEX_PROGRAM_ARB 0x8620
15648+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622
15649+#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623
15650+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624
15651+#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625
15652+#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626
15653+#define GL_PROGRAM_LENGTH_ARB 0x8627
15654+#define GL_PROGRAM_STRING_ARB 0x8628
15655+#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E
15656+#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F
15657+#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640
15658+#define GL_CURRENT_MATRIX_ARB 0x8641
15659+#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642
15660+#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643
15661+#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645
15662+#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B
15663+#define GL_PROGRAM_BINDING_ARB 0x8677
15664+#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869
15665+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A
15666+#define GL_PROGRAM_ERROR_STRING_ARB 0x8874
15667+#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875
15668+#define GL_PROGRAM_FORMAT_ARB 0x8876
15669+#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0
15670+#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1
15671+#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2
15672+#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3
15673+#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4
15674+#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5
15675+#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6
15676+#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7
15677+#define GL_PROGRAM_PARAMETERS_ARB 0x88A8
15678+#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9
15679+#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA
15680+#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB
15681+#define GL_PROGRAM_ATTRIBS_ARB 0x88AC
15682+#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD
15683+#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE
15684+#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF
15685+#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0
15686+#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1
15687+#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2
15688+#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3
15689+#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4
15690+#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5
15691+#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6
15692+#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7
15693+#define GL_MATRIX0_ARB 0x88C0
15694+#define GL_MATRIX1_ARB 0x88C1
15695+#define GL_MATRIX2_ARB 0x88C2
15696+#define GL_MATRIX3_ARB 0x88C3
15697+#define GL_MATRIX4_ARB 0x88C4
15698+#define GL_MATRIX5_ARB 0x88C5
15699+#define GL_MATRIX6_ARB 0x88C6
15700+#define GL_MATRIX7_ARB 0x88C7
15701+#define GL_MATRIX8_ARB 0x88C8
15702+#define GL_MATRIX9_ARB 0x88C9
15703+#define GL_MATRIX10_ARB 0x88CA
15704+#define GL_MATRIX11_ARB 0x88CB
15705+#define GL_MATRIX12_ARB 0x88CC
15706+#define GL_MATRIX13_ARB 0x88CD
15707+#define GL_MATRIX14_ARB 0x88CE
15708+#define GL_MATRIX15_ARB 0x88CF
15709+#define GL_MATRIX16_ARB 0x88D0
15710+#define GL_MATRIX17_ARB 0x88D1
15711+#define GL_MATRIX18_ARB 0x88D2
15712+#define GL_MATRIX19_ARB 0x88D3
15713+#define GL_MATRIX20_ARB 0x88D4
15714+#define GL_MATRIX21_ARB 0x88D5
15715+#define GL_MATRIX22_ARB 0x88D6
15716+#define GL_MATRIX23_ARB 0x88D7
15717+#define GL_MATRIX24_ARB 0x88D8
15718+#define GL_MATRIX25_ARB 0x88D9
15719+#define GL_MATRIX26_ARB 0x88DA
15720+#define GL_MATRIX27_ARB 0x88DB
15721+#define GL_MATRIX28_ARB 0x88DC
15722+#define GL_MATRIX29_ARB 0x88DD
15723+#define GL_MATRIX30_ARB 0x88DE
15724+#define GL_MATRIX31_ARB 0x88DF
15725+#endif
15726+
15727+#ifndef GL_ARB_fragment_program
15728+#define GL_FRAGMENT_PROGRAM_ARB 0x8804
15729+#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805
15730+#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806
15731+#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807
15732+#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808
15733+#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809
15734+#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A
15735+#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B
15736+#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C
15737+#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D
15738+#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E
15739+#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F
15740+#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810
15741+#define GL_MAX_TEXTURE_COORDS_ARB 0x8871
15742+#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872
15743+#endif
15744+
15745+#ifndef GL_ARB_vertex_buffer_object
15746+#define GL_BUFFER_SIZE_ARB 0x8764
15747+#define GL_BUFFER_USAGE_ARB 0x8765
15748+#define GL_ARRAY_BUFFER_ARB 0x8892
15749+#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893
15750+#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894
15751+#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895
15752+#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896
15753+#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897
15754+#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898
15755+#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899
15756+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A
15757+#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B
15758+#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C
15759+#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D
15760+#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E
15761+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F
15762+#define GL_READ_ONLY_ARB 0x88B8
15763+#define GL_WRITE_ONLY_ARB 0x88B9
15764+#define GL_READ_WRITE_ARB 0x88BA
15765+#define GL_BUFFER_ACCESS_ARB 0x88BB
15766+#define GL_BUFFER_MAPPED_ARB 0x88BC
15767+#define GL_BUFFER_MAP_POINTER_ARB 0x88BD
15768+#define GL_STREAM_DRAW_ARB 0x88E0
15769+#define GL_STREAM_READ_ARB 0x88E1
15770+#define GL_STREAM_COPY_ARB 0x88E2
15771+#define GL_STATIC_DRAW_ARB 0x88E4
15772+#define GL_STATIC_READ_ARB 0x88E5
15773+#define GL_STATIC_COPY_ARB 0x88E6
15774+#define GL_DYNAMIC_DRAW_ARB 0x88E8
15775+#define GL_DYNAMIC_READ_ARB 0x88E9
15776+#define GL_DYNAMIC_COPY_ARB 0x88EA
15777+#endif
15778+
15779+#ifndef GL_ARB_occlusion_query
15780+#define GL_QUERY_COUNTER_BITS_ARB 0x8864
15781+#define GL_CURRENT_QUERY_ARB 0x8865
15782+#define GL_QUERY_RESULT_ARB 0x8866
15783+#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867
15784+#define GL_SAMPLES_PASSED_ARB 0x8914
15785+#endif
15786+
15787+#ifndef GL_ARB_shader_objects
15788+#define GL_PROGRAM_OBJECT_ARB 0x8B40
15789+#define GL_SHADER_OBJECT_ARB 0x8B48
15790+#define GL_OBJECT_TYPE_ARB 0x8B4E
15791+#define GL_OBJECT_SUBTYPE_ARB 0x8B4F
15792+#define GL_FLOAT_VEC2_ARB 0x8B50
15793+#define GL_FLOAT_VEC3_ARB 0x8B51
15794+#define GL_FLOAT_VEC4_ARB 0x8B52
15795+#define GL_INT_VEC2_ARB 0x8B53
15796+#define GL_INT_VEC3_ARB 0x8B54
15797+#define GL_INT_VEC4_ARB 0x8B55
15798+#define GL_BOOL_ARB 0x8B56
15799+#define GL_BOOL_VEC2_ARB 0x8B57
15800+#define GL_BOOL_VEC3_ARB 0x8B58
15801+#define GL_BOOL_VEC4_ARB 0x8B59
15802+#define GL_FLOAT_MAT2_ARB 0x8B5A
15803+#define GL_FLOAT_MAT3_ARB 0x8B5B
15804+#define GL_FLOAT_MAT4_ARB 0x8B5C
15805+#define GL_SAMPLER_1D_ARB 0x8B5D
15806+#define GL_SAMPLER_2D_ARB 0x8B5E
15807+#define GL_SAMPLER_3D_ARB 0x8B5F
15808+#define GL_SAMPLER_CUBE_ARB 0x8B60
15809+#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61
15810+#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62
15811+#define GL_SAMPLER_2D_RECT_ARB 0x8B63
15812+#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64
15813+#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80
15814+#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81
15815+#define GL_OBJECT_LINK_STATUS_ARB 0x8B82
15816+#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83
15817+#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84
15818+#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85
15819+#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86
15820+#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87
15821+#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88
15822+#endif
15823+
15824+#ifndef GL_ARB_vertex_shader
15825+#define GL_VERTEX_SHADER_ARB 0x8B31
15826+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A
15827+#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B
15828+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C
15829+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D
15830+#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89
15831+#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A
15832+#endif
15833+
15834+#ifndef GL_ARB_fragment_shader
15835+#define GL_FRAGMENT_SHADER_ARB 0x8B30
15836+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49
15837+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B
15838+#endif
15839+
15840+#ifndef GL_ARB_shading_language_100
15841+#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C
15842+#endif
15843+
15844+#ifndef GL_ARB_texture_non_power_of_two
15845+#endif
15846+
15847+#ifndef GL_ARB_point_sprite
15848+#define GL_POINT_SPRITE_ARB 0x8861
15849+#define GL_COORD_REPLACE_ARB 0x8862
15850+#endif
15851+
15852+#ifndef GL_ARB_fragment_program_shadow
15853+#endif
15854+
15855+#ifndef GL_ARB_draw_buffers
15856+#define GL_MAX_DRAW_BUFFERS_ARB 0x8824
15857+#define GL_DRAW_BUFFER0_ARB 0x8825
15858+#define GL_DRAW_BUFFER1_ARB 0x8826
15859+#define GL_DRAW_BUFFER2_ARB 0x8827
15860+#define GL_DRAW_BUFFER3_ARB 0x8828
15861+#define GL_DRAW_BUFFER4_ARB 0x8829
15862+#define GL_DRAW_BUFFER5_ARB 0x882A
15863+#define GL_DRAW_BUFFER6_ARB 0x882B
15864+#define GL_DRAW_BUFFER7_ARB 0x882C
15865+#define GL_DRAW_BUFFER8_ARB 0x882D
15866+#define GL_DRAW_BUFFER9_ARB 0x882E
15867+#define GL_DRAW_BUFFER10_ARB 0x882F
15868+#define GL_DRAW_BUFFER11_ARB 0x8830
15869+#define GL_DRAW_BUFFER12_ARB 0x8831
15870+#define GL_DRAW_BUFFER13_ARB 0x8832
15871+#define GL_DRAW_BUFFER14_ARB 0x8833
15872+#define GL_DRAW_BUFFER15_ARB 0x8834
15873+#endif
15874+
15875+#ifndef GL_ARB_texture_rectangle
15876+#define GL_TEXTURE_RECTANGLE_ARB 0x84F5
15877+#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6
15878+#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7
15879+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
15880+#endif
15881+
15882+#ifndef GL_ARB_color_buffer_float
15883+#define GL_RGBA_FLOAT_MODE_ARB 0x8820
15884+#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A
15885+#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B
15886+#define GL_CLAMP_READ_COLOR_ARB 0x891C
15887+#define GL_FIXED_ONLY_ARB 0x891D
15888+#endif
15889+
15890+#ifndef GL_ARB_half_float_pixel
15891+#define GL_HALF_FLOAT_ARB 0x140B
15892+#endif
15893+
15894+#ifndef GL_ARB_texture_float
15895+#define GL_TEXTURE_RED_TYPE_ARB 0x8C10
15896+#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11
15897+#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12
15898+#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13
15899+#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14
15900+#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15
15901+#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16
15902+#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17
15903+#define GL_RGBA32F_ARB 0x8814
15904+#define GL_RGB32F_ARB 0x8815
15905+#define GL_ALPHA32F_ARB 0x8816
15906+#define GL_INTENSITY32F_ARB 0x8817
15907+#define GL_LUMINANCE32F_ARB 0x8818
15908+#define GL_LUMINANCE_ALPHA32F_ARB 0x8819
15909+#define GL_RGBA16F_ARB 0x881A
15910+#define GL_RGB16F_ARB 0x881B
15911+#define GL_ALPHA16F_ARB 0x881C
15912+#define GL_INTENSITY16F_ARB 0x881D
15913+#define GL_LUMINANCE16F_ARB 0x881E
15914+#define GL_LUMINANCE_ALPHA16F_ARB 0x881F
15915+#endif
15916+
15917+#ifndef GL_ARB_pixel_buffer_object
15918+#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB
15919+#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC
15920+#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED
15921+#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
15922+#endif
15923+
15924+#ifndef GL_EXT_abgr
15925+#define GL_ABGR_EXT 0x8000
15926+#endif
15927+
15928+#ifndef GL_EXT_blend_color
15929+#define GL_CONSTANT_COLOR_EXT 0x8001
15930+#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002
15931+#define GL_CONSTANT_ALPHA_EXT 0x8003
15932+#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004
15933+#define GL_BLEND_COLOR_EXT 0x8005
15934+#endif
15935+
15936+#ifndef GL_EXT_polygon_offset
15937+#define GL_POLYGON_OFFSET_EXT 0x8037
15938+#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038
15939+#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039
15940+#endif
15941+
15942+#ifndef GL_EXT_texture
15943+#define GL_ALPHA4_EXT 0x803B
15944+#define GL_ALPHA8_EXT 0x803C
15945+#define GL_ALPHA12_EXT 0x803D
15946+#define GL_ALPHA16_EXT 0x803E
15947+#define GL_LUMINANCE4_EXT 0x803F
15948+#define GL_LUMINANCE8_EXT 0x8040
15949+#define GL_LUMINANCE12_EXT 0x8041
15950+#define GL_LUMINANCE16_EXT 0x8042
15951+#define GL_LUMINANCE4_ALPHA4_EXT 0x8043
15952+#define GL_LUMINANCE6_ALPHA2_EXT 0x8044
15953+#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
15954+#define GL_LUMINANCE12_ALPHA4_EXT 0x8046
15955+#define GL_LUMINANCE12_ALPHA12_EXT 0x8047
15956+#define GL_LUMINANCE16_ALPHA16_EXT 0x8048
15957+#define GL_INTENSITY_EXT 0x8049
15958+#define GL_INTENSITY4_EXT 0x804A
15959+#define GL_INTENSITY8_EXT 0x804B
15960+#define GL_INTENSITY12_EXT 0x804C
15961+#define GL_INTENSITY16_EXT 0x804D
15962+#define GL_RGB2_EXT 0x804E
15963+#define GL_RGB4_EXT 0x804F
15964+#define GL_RGB5_EXT 0x8050
15965+#define GL_RGB8_EXT 0x8051
15966+#define GL_RGB10_EXT 0x8052
15967+#define GL_RGB12_EXT 0x8053
15968+#define GL_RGB16_EXT 0x8054
15969+#define GL_RGBA2_EXT 0x8055
15970+#define GL_RGBA4_EXT 0x8056
15971+#define GL_RGB5_A1_EXT 0x8057
15972+#define GL_RGBA8_EXT 0x8058
15973+#define GL_RGB10_A2_EXT 0x8059
15974+#define GL_RGBA12_EXT 0x805A
15975+#define GL_RGBA16_EXT 0x805B
15976+#define GL_TEXTURE_RED_SIZE_EXT 0x805C
15977+#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D
15978+#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E
15979+#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F
15980+#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060
15981+#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061
15982+#define GL_REPLACE_EXT 0x8062
15983+#define GL_PROXY_TEXTURE_1D_EXT 0x8063
15984+#define GL_PROXY_TEXTURE_2D_EXT 0x8064
15985+#define GL_TEXTURE_TOO_LARGE_EXT 0x8065
15986+#endif
15987+
15988+#ifndef GL_EXT_texture3D
15989+#define GL_PACK_SKIP_IMAGES_EXT 0x806B
15990+#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C
15991+#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D
15992+#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E
15993+#define GL_TEXTURE_3D_EXT 0x806F
15994+#define GL_PROXY_TEXTURE_3D_EXT 0x8070
15995+#define GL_TEXTURE_DEPTH_EXT 0x8071
15996+#define GL_TEXTURE_WRAP_R_EXT 0x8072
15997+#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073
15998+#endif
15999+
16000+#ifndef GL_SGIS_texture_filter4
16001+#define GL_FILTER4_SGIS 0x8146
16002+#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147
16003+#endif
16004+
16005+#ifndef GL_EXT_subtexture
16006+#endif
16007+
16008+#ifndef GL_EXT_copy_texture
16009+#endif
16010+
16011+#ifndef GL_EXT_histogram
16012+#define GL_HISTOGRAM_EXT 0x8024
16013+#define GL_PROXY_HISTOGRAM_EXT 0x8025
16014+#define GL_HISTOGRAM_WIDTH_EXT 0x8026
16015+#define GL_HISTOGRAM_FORMAT_EXT 0x8027
16016+#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028
16017+#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029
16018+#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A
16019+#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B
16020+#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C
16021+#define GL_HISTOGRAM_SINK_EXT 0x802D
16022+#define GL_MINMAX_EXT 0x802E
16023+#define GL_MINMAX_FORMAT_EXT 0x802F
16024+#define GL_MINMAX_SINK_EXT 0x8030
16025+#define GL_TABLE_TOO_LARGE_EXT 0x8031
16026+#endif
16027+
16028+#ifndef GL_EXT_convolution
16029+#define GL_CONVOLUTION_1D_EXT 0x8010
16030+#define GL_CONVOLUTION_2D_EXT 0x8011
16031+#define GL_SEPARABLE_2D_EXT 0x8012
16032+#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013
16033+#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014
16034+#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015
16035+#define GL_REDUCE_EXT 0x8016
16036+#define GL_CONVOLUTION_FORMAT_EXT 0x8017
16037+#define GL_CONVOLUTION_WIDTH_EXT 0x8018
16038+#define GL_CONVOLUTION_HEIGHT_EXT 0x8019
16039+#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A
16040+#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B
16041+#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C
16042+#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D
16043+#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E
16044+#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F
16045+#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020
16046+#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021
16047+#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022
16048+#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023
16049+#endif
16050+
16051+#ifndef GL_SGI_color_matrix
16052+#define GL_COLOR_MATRIX_SGI 0x80B1
16053+#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2
16054+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3
16055+#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4
16056+#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5
16057+#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6
16058+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7
16059+#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8
16060+#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9
16061+#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA
16062+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB
16063+#endif
16064+
16065+#ifndef GL_SGI_color_table
16066+#define GL_COLOR_TABLE_SGI 0x80D0
16067+#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1
16068+#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2
16069+#define GL_PROXY_COLOR_TABLE_SGI 0x80D3
16070+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4
16071+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5
16072+#define GL_COLOR_TABLE_SCALE_SGI 0x80D6
16073+#define GL_COLOR_TABLE_BIAS_SGI 0x80D7
16074+#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8
16075+#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9
16076+#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA
16077+#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB
16078+#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC
16079+#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD
16080+#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE
16081+#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF
16082+#endif
16083+
16084+#ifndef GL_SGIS_pixel_texture
16085+#define GL_PIXEL_TEXTURE_SGIS 0x8353
16086+#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354
16087+#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355
16088+#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356
16089+#endif
16090+
16091+#ifndef GL_SGIX_pixel_texture
16092+#define GL_PIXEL_TEX_GEN_SGIX 0x8139
16093+#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B
16094+#endif
16095+
16096+#ifndef GL_SGIS_texture4D
16097+#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130
16098+#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131
16099+#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132
16100+#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133
16101+#define GL_TEXTURE_4D_SGIS 0x8134
16102+#define GL_PROXY_TEXTURE_4D_SGIS 0x8135
16103+#define GL_TEXTURE_4DSIZE_SGIS 0x8136
16104+#define GL_TEXTURE_WRAP_Q_SGIS 0x8137
16105+#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138
16106+#define GL_TEXTURE_4D_BINDING_SGIS 0x814F
16107+#endif
16108+
16109+#ifndef GL_SGI_texture_color_table
16110+#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC
16111+#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD
16112+#endif
16113+
16114+#ifndef GL_EXT_cmyka
16115+#define GL_CMYK_EXT 0x800C
16116+#define GL_CMYKA_EXT 0x800D
16117+#define GL_PACK_CMYK_HINT_EXT 0x800E
16118+#define GL_UNPACK_CMYK_HINT_EXT 0x800F
16119+#endif
16120+
16121+#ifndef GL_EXT_texture_object
16122+#define GL_TEXTURE_PRIORITY_EXT 0x8066
16123+#define GL_TEXTURE_RESIDENT_EXT 0x8067
16124+#define GL_TEXTURE_1D_BINDING_EXT 0x8068
16125+#define GL_TEXTURE_2D_BINDING_EXT 0x8069
16126+#define GL_TEXTURE_3D_BINDING_EXT 0x806A
16127+#endif
16128+
16129+#ifndef GL_SGIS_detail_texture
16130+#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095
16131+#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096
16132+#define GL_LINEAR_DETAIL_SGIS 0x8097
16133+#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098
16134+#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099
16135+#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A
16136+#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B
16137+#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C
16138+#endif
16139+
16140+#ifndef GL_SGIS_sharpen_texture
16141+#define GL_LINEAR_SHARPEN_SGIS 0x80AD
16142+#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE
16143+#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF
16144+#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0
16145+#endif
16146+
16147+#ifndef GL_EXT_packed_pixels
16148+#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032
16149+#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033
16150+#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034
16151+#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035
16152+#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036
16153+#endif
16154+
16155+#ifndef GL_SGIS_texture_lod
16156+#define GL_TEXTURE_MIN_LOD_SGIS 0x813A
16157+#define GL_TEXTURE_MAX_LOD_SGIS 0x813B
16158+#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C
16159+#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D
16160+#endif
16161+
16162+#ifndef GL_SGIS_multisample
16163+#define GL_MULTISAMPLE_SGIS 0x809D
16164+#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E
16165+#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F
16166+#define GL_SAMPLE_MASK_SGIS 0x80A0
16167+#define GL_1PASS_SGIS 0x80A1
16168+#define GL_2PASS_0_SGIS 0x80A2
16169+#define GL_2PASS_1_SGIS 0x80A3
16170+#define GL_4PASS_0_SGIS 0x80A4
16171+#define GL_4PASS_1_SGIS 0x80A5
16172+#define GL_4PASS_2_SGIS 0x80A6
16173+#define GL_4PASS_3_SGIS 0x80A7
16174+#define GL_SAMPLE_BUFFERS_SGIS 0x80A8
16175+#define GL_SAMPLES_SGIS 0x80A9
16176+#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA
16177+#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB
16178+#define GL_SAMPLE_PATTERN_SGIS 0x80AC
16179+#endif
16180+
16181+#ifndef GL_EXT_rescale_normal
16182+#define GL_RESCALE_NORMAL_EXT 0x803A
16183+#endif
16184+
16185+#ifndef GL_EXT_vertex_array
16186+#define GL_VERTEX_ARRAY_EXT 0x8074
16187+#define GL_NORMAL_ARRAY_EXT 0x8075
16188+#define GL_COLOR_ARRAY_EXT 0x8076
16189+#define GL_INDEX_ARRAY_EXT 0x8077
16190+#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078
16191+#define GL_EDGE_FLAG_ARRAY_EXT 0x8079
16192+#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A
16193+#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B
16194+#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C
16195+#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D
16196+#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E
16197+#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F
16198+#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080
16199+#define GL_COLOR_ARRAY_SIZE_EXT 0x8081
16200+#define GL_COLOR_ARRAY_TYPE_EXT 0x8082
16201+#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083
16202+#define GL_COLOR_ARRAY_COUNT_EXT 0x8084
16203+#define GL_INDEX_ARRAY_TYPE_EXT 0x8085
16204+#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086
16205+#define GL_INDEX_ARRAY_COUNT_EXT 0x8087
16206+#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088
16207+#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089
16208+#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A
16209+#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B
16210+#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C
16211+#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D
16212+#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E
16213+#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F
16214+#define GL_COLOR_ARRAY_POINTER_EXT 0x8090
16215+#define GL_INDEX_ARRAY_POINTER_EXT 0x8091
16216+#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092
16217+#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093
16218+#endif
16219+
16220+#ifndef GL_EXT_misc_attribute
16221+#endif
16222+
16223+#ifndef GL_SGIS_generate_mipmap
16224+#define GL_GENERATE_MIPMAP_SGIS 0x8191
16225+#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192
16226+#endif
16227+
16228+#ifndef GL_SGIX_clipmap
16229+#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170
16230+#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171
16231+#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172
16232+#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173
16233+#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174
16234+#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175
16235+#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176
16236+#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177
16237+#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178
16238+#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D
16239+#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E
16240+#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F
16241+#endif
16242+
16243+#ifndef GL_SGIX_shadow
16244+#define GL_TEXTURE_COMPARE_SGIX 0x819A
16245+#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B
16246+#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C
16247+#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D
16248+#endif
16249+
16250+#ifndef GL_SGIS_texture_edge_clamp
16251+#define GL_CLAMP_TO_EDGE_SGIS 0x812F
16252+#endif
16253+
16254+#ifndef GL_SGIS_texture_border_clamp
16255+#define GL_CLAMP_TO_BORDER_SGIS 0x812D
16256+#endif
16257+
16258+#ifndef GL_EXT_blend_minmax
16259+#define GL_FUNC_ADD_EXT 0x8006
16260+#define GL_MIN_EXT 0x8007
16261+#define GL_MAX_EXT 0x8008
16262+#define GL_BLEND_EQUATION_EXT 0x8009
16263+#endif
16264+
16265+#ifndef GL_EXT_blend_subtract
16266+#define GL_FUNC_SUBTRACT_EXT 0x800A
16267+#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B
16268+#endif
16269+
16270+#ifndef GL_EXT_blend_logic_op
16271+#endif
16272+
16273+#ifndef GL_SGIX_interlace
16274+#define GL_INTERLACE_SGIX 0x8094
16275+#endif
16276+
16277+#ifndef GL_SGIX_pixel_tiles
16278+#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E
16279+#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F
16280+#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140
16281+#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141
16282+#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142
16283+#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143
16284+#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144
16285+#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145
16286+#endif
16287+
16288+#ifndef GL_SGIS_texture_select
16289+#define GL_DUAL_ALPHA4_SGIS 0x8110
16290+#define GL_DUAL_ALPHA8_SGIS 0x8111
16291+#define GL_DUAL_ALPHA12_SGIS 0x8112
16292+#define GL_DUAL_ALPHA16_SGIS 0x8113
16293+#define GL_DUAL_LUMINANCE4_SGIS 0x8114
16294+#define GL_DUAL_LUMINANCE8_SGIS 0x8115
16295+#define GL_DUAL_LUMINANCE12_SGIS 0x8116
16296+#define GL_DUAL_LUMINANCE16_SGIS 0x8117
16297+#define GL_DUAL_INTENSITY4_SGIS 0x8118
16298+#define GL_DUAL_INTENSITY8_SGIS 0x8119
16299+#define GL_DUAL_INTENSITY12_SGIS 0x811A
16300+#define GL_DUAL_INTENSITY16_SGIS 0x811B
16301+#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C
16302+#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D
16303+#define GL_QUAD_ALPHA4_SGIS 0x811E
16304+#define GL_QUAD_ALPHA8_SGIS 0x811F
16305+#define GL_QUAD_LUMINANCE4_SGIS 0x8120
16306+#define GL_QUAD_LUMINANCE8_SGIS 0x8121
16307+#define GL_QUAD_INTENSITY4_SGIS 0x8122
16308+#define GL_QUAD_INTENSITY8_SGIS 0x8123
16309+#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124
16310+#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125
16311+#endif
16312+
16313+#ifndef GL_SGIX_sprite
16314+#define GL_SPRITE_SGIX 0x8148
16315+#define GL_SPRITE_MODE_SGIX 0x8149
16316+#define GL_SPRITE_AXIS_SGIX 0x814A
16317+#define GL_SPRITE_TRANSLATION_SGIX 0x814B
16318+#define GL_SPRITE_AXIAL_SGIX 0x814C
16319+#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D
16320+#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E
16321+#endif
16322+
16323+#ifndef GL_SGIX_texture_multi_buffer
16324+#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E
16325+#endif
16326+
16327+#ifndef GL_EXT_point_parameters
16328+#define GL_POINT_SIZE_MIN_EXT 0x8126
16329+#define GL_POINT_SIZE_MAX_EXT 0x8127
16330+#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128
16331+#define GL_DISTANCE_ATTENUATION_EXT 0x8129
16332+#endif
16333+
16334+#ifndef GL_SGIS_point_parameters
16335+#define GL_POINT_SIZE_MIN_SGIS 0x8126
16336+#define GL_POINT_SIZE_MAX_SGIS 0x8127
16337+#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128
16338+#define GL_DISTANCE_ATTENUATION_SGIS 0x8129
16339+#endif
16340+
16341+#ifndef GL_SGIX_instruments
16342+#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180
16343+#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181
16344+#endif
16345+
16346+#ifndef GL_SGIX_texture_scale_bias
16347+#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179
16348+#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A
16349+#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B
16350+#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C
16351+#endif
16352+
16353+#ifndef GL_SGIX_framezoom
16354+#define GL_FRAMEZOOM_SGIX 0x818B
16355+#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C
16356+#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D
16357+#endif
16358+
16359+#ifndef GL_SGIX_tag_sample_buffer
16360+#endif
16361+
16362+#ifndef GL_FfdMaskSGIX
16363+#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001
16364+#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002
16365+#endif
16366+
16367+#ifndef GL_SGIX_polynomial_ffd
16368+#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194
16369+#define GL_TEXTURE_DEFORMATION_SGIX 0x8195
16370+#define GL_DEFORMATIONS_MASK_SGIX 0x8196
16371+#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197
16372+#endif
16373+
16374+#ifndef GL_SGIX_reference_plane
16375+#define GL_REFERENCE_PLANE_SGIX 0x817D
16376+#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E
16377+#endif
16378+
16379+#ifndef GL_SGIX_flush_raster
16380+#endif
16381+
16382+#ifndef GL_SGIX_depth_texture
16383+#define GL_DEPTH_COMPONENT16_SGIX 0x81A5
16384+#define GL_DEPTH_COMPONENT24_SGIX 0x81A6
16385+#define GL_DEPTH_COMPONENT32_SGIX 0x81A7
16386+#endif
16387+
16388+#ifndef GL_SGIS_fog_function
16389+#define GL_FOG_FUNC_SGIS 0x812A
16390+#define GL_FOG_FUNC_POINTS_SGIS 0x812B
16391+#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C
16392+#endif
16393+
16394+#ifndef GL_SGIX_fog_offset
16395+#define GL_FOG_OFFSET_SGIX 0x8198
16396+#define GL_FOG_OFFSET_VALUE_SGIX 0x8199
16397+#endif
16398+
16399+#ifndef GL_HP_image_transform
16400+#define GL_IMAGE_SCALE_X_HP 0x8155
16401+#define GL_IMAGE_SCALE_Y_HP 0x8156
16402+#define GL_IMAGE_TRANSLATE_X_HP 0x8157
16403+#define GL_IMAGE_TRANSLATE_Y_HP 0x8158
16404+#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159
16405+#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A
16406+#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B
16407+#define GL_IMAGE_MAG_FILTER_HP 0x815C
16408+#define GL_IMAGE_MIN_FILTER_HP 0x815D
16409+#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E
16410+#define GL_CUBIC_HP 0x815F
16411+#define GL_AVERAGE_HP 0x8160
16412+#define GL_IMAGE_TRANSFORM_2D_HP 0x8161
16413+#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162
16414+#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163
16415+#endif
16416+
16417+#ifndef GL_HP_convolution_border_modes
16418+#define GL_IGNORE_BORDER_HP 0x8150
16419+#define GL_CONSTANT_BORDER_HP 0x8151
16420+#define GL_REPLICATE_BORDER_HP 0x8153
16421+#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154
16422+#endif
16423+
16424+#ifndef GL_INGR_palette_buffer
16425+#endif
16426+
16427+#ifndef GL_SGIX_texture_add_env
16428+#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE
16429+#endif
16430+
16431+#ifndef GL_EXT_color_subtable
16432+#endif
16433+
16434+#ifndef GL_PGI_vertex_hints
16435+#define GL_VERTEX_DATA_HINT_PGI 0x1A22A
16436+#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B
16437+#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C
16438+#define GL_MAX_VERTEX_HINT_PGI 0x1A22D
16439+#define GL_COLOR3_BIT_PGI 0x00010000
16440+#define GL_COLOR4_BIT_PGI 0x00020000
16441+#define GL_EDGEFLAG_BIT_PGI 0x00040000
16442+#define GL_INDEX_BIT_PGI 0x00080000
16443+#define GL_MAT_AMBIENT_BIT_PGI 0x00100000
16444+#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000
16445+#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000
16446+#define GL_MAT_EMISSION_BIT_PGI 0x00800000
16447+#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000
16448+#define GL_MAT_SHININESS_BIT_PGI 0x02000000
16449+#define GL_MAT_SPECULAR_BIT_PGI 0x04000000
16450+#define GL_NORMAL_BIT_PGI 0x08000000
16451+#define GL_TEXCOORD1_BIT_PGI 0x10000000
16452+#define GL_TEXCOORD2_BIT_PGI 0x20000000
16453+#define GL_TEXCOORD3_BIT_PGI 0x40000000
16454+#define GL_TEXCOORD4_BIT_PGI 0x80000000
16455+#define GL_VERTEX23_BIT_PGI 0x00000004
16456+#define GL_VERTEX4_BIT_PGI 0x00000008
16457+#endif
16458+
16459+#ifndef GL_PGI_misc_hints
16460+#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8
16461+#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD
16462+#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE
16463+#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202
16464+#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203
16465+#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204
16466+#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C
16467+#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D
16468+#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E
16469+#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F
16470+#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210
16471+#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211
16472+#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216
16473+#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217
16474+#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218
16475+#define GL_FULL_STIPPLE_HINT_PGI 0x1A219
16476+#define GL_CLIP_NEAR_HINT_PGI 0x1A220
16477+#define GL_CLIP_FAR_HINT_PGI 0x1A221
16478+#define GL_WIDE_LINE_HINT_PGI 0x1A222
16479+#define GL_BACK_NORMALS_HINT_PGI 0x1A223
16480+#endif
16481+
16482+#ifndef GL_EXT_paletted_texture
16483+#define GL_COLOR_INDEX1_EXT 0x80E2
16484+#define GL_COLOR_INDEX2_EXT 0x80E3
16485+#define GL_COLOR_INDEX4_EXT 0x80E4
16486+#define GL_COLOR_INDEX8_EXT 0x80E5
16487+#define GL_COLOR_INDEX12_EXT 0x80E6
16488+#define GL_COLOR_INDEX16_EXT 0x80E7
16489+#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED
16490+#endif
16491+
16492+#ifndef GL_EXT_clip_volume_hint
16493+#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0
16494+#endif
16495+
16496+#ifndef GL_SGIX_list_priority
16497+#define GL_LIST_PRIORITY_SGIX 0x8182
16498+#endif
16499+
16500+#ifndef GL_SGIX_ir_instrument1
16501+#define GL_IR_INSTRUMENT1_SGIX 0x817F
16502+#endif
16503+
16504+#ifndef GL_SGIX_calligraphic_fragment
16505+#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183
16506+#endif
16507+
16508+#ifndef GL_SGIX_texture_lod_bias
16509+#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E
16510+#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F
16511+#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190
16512+#endif
16513+
16514+#ifndef GL_SGIX_shadow_ambient
16515+#define GL_SHADOW_AMBIENT_SGIX 0x80BF
16516+#endif
16517+
16518+#ifndef GL_EXT_index_texture
16519+#endif
16520+
16521+#ifndef GL_EXT_index_material
16522+#define GL_INDEX_MATERIAL_EXT 0x81B8
16523+#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9
16524+#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA
16525+#endif
16526+
16527+#ifndef GL_EXT_index_func
16528+#define GL_INDEX_TEST_EXT 0x81B5
16529+#define GL_INDEX_TEST_FUNC_EXT 0x81B6
16530+#define GL_INDEX_TEST_REF_EXT 0x81B7
16531+#endif
16532+
16533+#ifndef GL_EXT_index_array_formats
16534+#define GL_IUI_V2F_EXT 0x81AD
16535+#define GL_IUI_V3F_EXT 0x81AE
16536+#define GL_IUI_N3F_V2F_EXT 0x81AF
16537+#define GL_IUI_N3F_V3F_EXT 0x81B0
16538+#define GL_T2F_IUI_V2F_EXT 0x81B1
16539+#define GL_T2F_IUI_V3F_EXT 0x81B2
16540+#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3
16541+#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4
16542+#endif
16543+
16544+#ifndef GL_EXT_compiled_vertex_array
16545+#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8
16546+#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9
16547+#endif
16548+
16549+#ifndef GL_EXT_cull_vertex
16550+#define GL_CULL_VERTEX_EXT 0x81AA
16551+#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB
16552+#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC
16553+#endif
16554+
16555+#ifndef GL_SGIX_ycrcb
16556+#define GL_YCRCB_422_SGIX 0x81BB
16557+#define GL_YCRCB_444_SGIX 0x81BC
16558+#endif
16559+
16560+#ifndef GL_SGIX_fragment_lighting
16561+#define GL_FRAGMENT_LIGHTING_SGIX 0x8400
16562+#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401
16563+#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402
16564+#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403
16565+#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404
16566+#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405
16567+#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406
16568+#define GL_LIGHT_ENV_MODE_SGIX 0x8407
16569+#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408
16570+#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409
16571+#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A
16572+#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B
16573+#define GL_FRAGMENT_LIGHT0_SGIX 0x840C
16574+#define GL_FRAGMENT_LIGHT1_SGIX 0x840D
16575+#define GL_FRAGMENT_LIGHT2_SGIX 0x840E
16576+#define GL_FRAGMENT_LIGHT3_SGIX 0x840F
16577+#define GL_FRAGMENT_LIGHT4_SGIX 0x8410
16578+#define GL_FRAGMENT_LIGHT5_SGIX 0x8411
16579+#define GL_FRAGMENT_LIGHT6_SGIX 0x8412
16580+#define GL_FRAGMENT_LIGHT7_SGIX 0x8413
16581+#endif
16582+
16583+#ifndef GL_IBM_rasterpos_clip
16584+#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262
16585+#endif
16586+
16587+#ifndef GL_HP_texture_lighting
16588+#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167
16589+#define GL_TEXTURE_POST_SPECULAR_HP 0x8168
16590+#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169
16591+#endif
16592+
16593+#ifndef GL_EXT_draw_range_elements
16594+#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8
16595+#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9
16596+#endif
16597+
16598+#ifndef GL_WIN_phong_shading
16599+#define GL_PHONG_WIN 0x80EA
16600+#define GL_PHONG_HINT_WIN 0x80EB
16601+#endif
16602+
16603+#ifndef GL_WIN_specular_fog
16604+#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC
16605+#endif
16606+
16607+#ifndef GL_EXT_light_texture
16608+#define GL_FRAGMENT_MATERIAL_EXT 0x8349
16609+#define GL_FRAGMENT_NORMAL_EXT 0x834A
16610+#define GL_FRAGMENT_COLOR_EXT 0x834C
16611+#define GL_ATTENUATION_EXT 0x834D
16612+#define GL_SHADOW_ATTENUATION_EXT 0x834E
16613+#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F
16614+#define GL_TEXTURE_LIGHT_EXT 0x8350
16615+#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351
16616+#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352
16617+/* reuse GL_FRAGMENT_DEPTH_EXT */
16618+#endif
16619+
16620+#ifndef GL_SGIX_blend_alpha_minmax
16621+#define GL_ALPHA_MIN_SGIX 0x8320
16622+#define GL_ALPHA_MAX_SGIX 0x8321
16623+#endif
16624+
16625+#ifndef GL_SGIX_impact_pixel_texture
16626+#define GL_PIXEL_TEX_GEN_Q_CEILING_SGIX 0x8184
16627+#define GL_PIXEL_TEX_GEN_Q_ROUND_SGIX 0x8185
16628+#define GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX 0x8186
16629+#define GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX 0x8187
16630+#define GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX 0x8188
16631+#define GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX 0x8189
16632+#define GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX 0x818A
16633+#endif
16634+
16635+#ifndef GL_EXT_bgra
16636+#define GL_BGR_EXT 0x80E0
16637+#define GL_BGRA_EXT 0x80E1
16638+#endif
16639+
16640+#ifndef GL_SGIX_async
16641+#define GL_ASYNC_MARKER_SGIX 0x8329
16642+#endif
16643+
16644+#ifndef GL_SGIX_async_pixel
16645+#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C
16646+#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D
16647+#define GL_ASYNC_READ_PIXELS_SGIX 0x835E
16648+#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F
16649+#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360
16650+#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361
16651+#endif
16652+
16653+#ifndef GL_SGIX_async_histogram
16654+#define GL_ASYNC_HISTOGRAM_SGIX 0x832C
16655+#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D
16656+#endif
16657+
16658+#ifndef GL_INTEL_texture_scissor
16659+#endif
16660+
16661+#ifndef GL_INTEL_parallel_arrays
16662+#define GL_PARALLEL_ARRAYS_INTEL 0x83F4
16663+#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5
16664+#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6
16665+#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7
16666+#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8
16667+#endif
16668+
16669+#ifndef GL_HP_occlusion_test
16670+#define GL_OCCLUSION_TEST_HP 0x8165
16671+#define GL_OCCLUSION_TEST_RESULT_HP 0x8166
16672+#endif
16673+
16674+#ifndef GL_EXT_pixel_transform
16675+#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330
16676+#define GL_PIXEL_MAG_FILTER_EXT 0x8331
16677+#define GL_PIXEL_MIN_FILTER_EXT 0x8332
16678+#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333
16679+#define GL_CUBIC_EXT 0x8334
16680+#define GL_AVERAGE_EXT 0x8335
16681+#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336
16682+#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337
16683+#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338
16684+#endif
16685+
16686+#ifndef GL_EXT_pixel_transform_color_table
16687+#endif
16688+
16689+#ifndef GL_EXT_shared_texture_palette
16690+#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB
16691+#endif
16692+
16693+#ifndef GL_EXT_separate_specular_color
16694+#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8
16695+#define GL_SINGLE_COLOR_EXT 0x81F9
16696+#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA
16697+#endif
16698+
16699+#ifndef GL_EXT_secondary_color
16700+#define GL_COLOR_SUM_EXT 0x8458
16701+#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459
16702+#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A
16703+#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B
16704+#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C
16705+#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D
16706+#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E
16707+#endif
16708+
16709+#ifndef GL_EXT_texture_perturb_normal
16710+#define GL_PERTURB_EXT 0x85AE
16711+#define GL_TEXTURE_NORMAL_EXT 0x85AF
16712+#endif
16713+
16714+#ifndef GL_EXT_multi_draw_arrays
16715+#endif
16716+
16717+#ifndef GL_EXT_fog_coord
16718+#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450
16719+#define GL_FOG_COORDINATE_EXT 0x8451
16720+#define GL_FRAGMENT_DEPTH_EXT 0x8452
16721+#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453
16722+#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454
16723+#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455
16724+#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456
16725+#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457
16726+#endif
16727+
16728+#ifndef GL_REND_screen_coordinates
16729+#define GL_SCREEN_COORDINATES_REND 0x8490
16730+#define GL_INVERTED_SCREEN_W_REND 0x8491
16731+#endif
16732+
16733+#ifndef GL_EXT_coordinate_frame
16734+#define GL_TANGENT_ARRAY_EXT 0x8439
16735+#define GL_BINORMAL_ARRAY_EXT 0x843A
16736+#define GL_CURRENT_TANGENT_EXT 0x843B
16737+#define GL_CURRENT_BINORMAL_EXT 0x843C
16738+#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E
16739+#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F
16740+#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440
16741+#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441
16742+#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442
16743+#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443
16744+#define GL_MAP1_TANGENT_EXT 0x8444
16745+#define GL_MAP2_TANGENT_EXT 0x8445
16746+#define GL_MAP1_BINORMAL_EXT 0x8446
16747+#define GL_MAP2_BINORMAL_EXT 0x8447
16748+#endif
16749+
16750+#ifndef GL_EXT_texture_env_combine
16751+#define GL_COMBINE_EXT 0x8570
16752+#define GL_COMBINE_RGB_EXT 0x8571
16753+#define GL_COMBINE_ALPHA_EXT 0x8572
16754+#define GL_RGB_SCALE_EXT 0x8573
16755+#define GL_ADD_SIGNED_EXT 0x8574
16756+#define GL_INTERPOLATE_EXT 0x8575
16757+#define GL_CONSTANT_EXT 0x8576
16758+#define GL_PRIMARY_COLOR_EXT 0x8577
16759+#define GL_PREVIOUS_EXT 0x8578
16760+#define GL_SOURCE0_RGB_EXT 0x8580
16761+#define GL_SOURCE1_RGB_EXT 0x8581
16762+#define GL_SOURCE2_RGB_EXT 0x8582
16763+#define GL_SOURCE0_ALPHA_EXT 0x8588
16764+#define GL_SOURCE1_ALPHA_EXT 0x8589
16765+#define GL_SOURCE2_ALPHA_EXT 0x858A
16766+#define GL_OPERAND0_RGB_EXT 0x8590
16767+#define GL_OPERAND1_RGB_EXT 0x8591
16768+#define GL_OPERAND2_RGB_EXT 0x8592
16769+#define GL_OPERAND0_ALPHA_EXT 0x8598
16770+#define GL_OPERAND1_ALPHA_EXT 0x8599
16771+#define GL_OPERAND2_ALPHA_EXT 0x859A
16772+#endif
16773+
16774+#ifndef GL_APPLE_specular_vector
16775+#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0
16776+#endif
16777+
16778+#ifndef GL_APPLE_transform_hint
16779+#define GL_TRANSFORM_HINT_APPLE 0x85B1
16780+#endif
16781+
16782+#ifndef GL_SGIX_fog_scale
16783+#define GL_FOG_SCALE_SGIX 0x81FC
16784+#define GL_FOG_SCALE_VALUE_SGIX 0x81FD
16785+#endif
16786+
16787+#ifndef GL_SUNX_constant_data
16788+#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5
16789+#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6
16790+#endif
16791+
16792+#ifndef GL_SUN_global_alpha
16793+#define GL_GLOBAL_ALPHA_SUN 0x81D9
16794+#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA
16795+#endif
16796+
16797+#ifndef GL_SUN_triangle_list
16798+#define GL_RESTART_SUN 0x0001
16799+#define GL_REPLACE_MIDDLE_SUN 0x0002
16800+#define GL_REPLACE_OLDEST_SUN 0x0003
16801+#define GL_TRIANGLE_LIST_SUN 0x81D7
16802+#define GL_REPLACEMENT_CODE_SUN 0x81D8
16803+#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0
16804+#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1
16805+#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2
16806+#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3
16807+#define GL_R1UI_V3F_SUN 0x85C4
16808+#define GL_R1UI_C4UB_V3F_SUN 0x85C5
16809+#define GL_R1UI_C3F_V3F_SUN 0x85C6
16810+#define GL_R1UI_N3F_V3F_SUN 0x85C7
16811+#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8
16812+#define GL_R1UI_T2F_V3F_SUN 0x85C9
16813+#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA
16814+#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB
16815+#endif
16816+
16817+#ifndef GL_SUN_vertex
16818+#endif
16819+
16820+#ifndef GL_EXT_blend_func_separate
16821+#define GL_BLEND_DST_RGB_EXT 0x80C8
16822+#define GL_BLEND_SRC_RGB_EXT 0x80C9
16823+#define GL_BLEND_DST_ALPHA_EXT 0x80CA
16824+#define GL_BLEND_SRC_ALPHA_EXT 0x80CB
16825+#endif
16826+
16827+#ifndef GL_INGR_color_clamp
16828+#define GL_RED_MIN_CLAMP_INGR 0x8560
16829+#define GL_GREEN_MIN_CLAMP_INGR 0x8561
16830+#define GL_BLUE_MIN_CLAMP_INGR 0x8562
16831+#define GL_ALPHA_MIN_CLAMP_INGR 0x8563
16832+#define GL_RED_MAX_CLAMP_INGR 0x8564
16833+#define GL_GREEN_MAX_CLAMP_INGR 0x8565
16834+#define GL_BLUE_MAX_CLAMP_INGR 0x8566
16835+#define GL_ALPHA_MAX_CLAMP_INGR 0x8567
16836+#endif
16837+
16838+#ifndef GL_INGR_interlace_read
16839+#define GL_INTERLACE_READ_INGR 0x8568
16840+#endif
16841+
16842+#ifndef GL_EXT_stencil_wrap
16843+#define GL_INCR_WRAP_EXT 0x8507
16844+#define GL_DECR_WRAP_EXT 0x8508
16845+#endif
16846+
16847+#ifndef GL_EXT_422_pixels
16848+#define GL_422_EXT 0x80CC
16849+#define GL_422_REV_EXT 0x80CD
16850+#define GL_422_AVERAGE_EXT 0x80CE
16851+#define GL_422_REV_AVERAGE_EXT 0x80CF
16852+#endif
16853+
16854+#ifndef GL_NV_texgen_reflection
16855+#define GL_NORMAL_MAP_NV 0x8511
16856+#define GL_REFLECTION_MAP_NV 0x8512
16857+#endif
16858+
16859+#ifndef GL_EXT_texture_cube_map
16860+#define GL_NORMAL_MAP_EXT 0x8511
16861+#define GL_REFLECTION_MAP_EXT 0x8512
16862+#define GL_TEXTURE_CUBE_MAP_EXT 0x8513
16863+#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514
16864+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515
16865+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516
16866+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517
16867+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518
16868+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519
16869+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A
16870+#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B
16871+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C
16872+#endif
16873+
16874+#ifndef GL_SUN_convolution_border_modes
16875+#define GL_WRAP_BORDER_SUN 0x81D4
16876+#endif
16877+
16878+#ifndef GL_EXT_texture_env_add
16879+#endif
16880+
16881+#ifndef GL_EXT_texture_lod_bias
16882+#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD
16883+#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500
16884+#define GL_TEXTURE_LOD_BIAS_EXT 0x8501
16885+#endif
16886+
16887+#ifndef GL_EXT_texture_filter_anisotropic
16888+#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
16889+#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
16890+#endif
16891+
16892+#ifndef GL_EXT_vertex_weighting
16893+#define GL_MODELVIEW0_STACK_DEPTH_EXT GL_MODELVIEW_STACK_DEPTH
16894+#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502
16895+#define GL_MODELVIEW0_MATRIX_EXT GL_MODELVIEW_MATRIX
16896+#define GL_MODELVIEW1_MATRIX_EXT 0x8506
16897+#define GL_VERTEX_WEIGHTING_EXT 0x8509
16898+#define GL_MODELVIEW0_EXT GL_MODELVIEW
16899+#define GL_MODELVIEW1_EXT 0x850A
16900+#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B
16901+#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C
16902+#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D
16903+#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E
16904+#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F
16905+#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510
16906+#endif
16907+
16908+#ifndef GL_NV_light_max_exponent
16909+#define GL_MAX_SHININESS_NV 0x8504
16910+#define GL_MAX_SPOT_EXPONENT_NV 0x8505
16911+#endif
16912+
16913+#ifndef GL_NV_vertex_array_range
16914+#define GL_VERTEX_ARRAY_RANGE_NV 0x851D
16915+#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E
16916+#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F
16917+#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520
16918+#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521
16919+#endif
16920+
16921+#ifndef GL_NV_register_combiners
16922+#define GL_REGISTER_COMBINERS_NV 0x8522
16923+#define GL_VARIABLE_A_NV 0x8523
16924+#define GL_VARIABLE_B_NV 0x8524
16925+#define GL_VARIABLE_C_NV 0x8525
16926+#define GL_VARIABLE_D_NV 0x8526
16927+#define GL_VARIABLE_E_NV 0x8527
16928+#define GL_VARIABLE_F_NV 0x8528
16929+#define GL_VARIABLE_G_NV 0x8529
16930+#define GL_CONSTANT_COLOR0_NV 0x852A
16931+#define GL_CONSTANT_COLOR1_NV 0x852B
16932+#define GL_PRIMARY_COLOR_NV 0x852C
16933+#define GL_SECONDARY_COLOR_NV 0x852D
16934+#define GL_SPARE0_NV 0x852E
16935+#define GL_SPARE1_NV 0x852F
16936+#define GL_DISCARD_NV 0x8530
16937+#define GL_E_TIMES_F_NV 0x8531
16938+#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532
16939+#define GL_UNSIGNED_IDENTITY_NV 0x8536
16940+#define GL_UNSIGNED_INVERT_NV 0x8537
16941+#define GL_EXPAND_NORMAL_NV 0x8538
16942+#define GL_EXPAND_NEGATE_NV 0x8539
16943+#define GL_HALF_BIAS_NORMAL_NV 0x853A
16944+#define GL_HALF_BIAS_NEGATE_NV 0x853B
16945+#define GL_SIGNED_IDENTITY_NV 0x853C
16946+#define GL_SIGNED_NEGATE_NV 0x853D
16947+#define GL_SCALE_BY_TWO_NV 0x853E
16948+#define GL_SCALE_BY_FOUR_NV 0x853F
16949+#define GL_SCALE_BY_ONE_HALF_NV 0x8540
16950+#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541
16951+#define GL_COMBINER_INPUT_NV 0x8542
16952+#define GL_COMBINER_MAPPING_NV 0x8543
16953+#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544
16954+#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545
16955+#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546
16956+#define GL_COMBINER_MUX_SUM_NV 0x8547
16957+#define GL_COMBINER_SCALE_NV 0x8548
16958+#define GL_COMBINER_BIAS_NV 0x8549
16959+#define GL_COMBINER_AB_OUTPUT_NV 0x854A
16960+#define GL_COMBINER_CD_OUTPUT_NV 0x854B
16961+#define GL_COMBINER_SUM_OUTPUT_NV 0x854C
16962+#define GL_MAX_GENERAL_COMBINERS_NV 0x854D
16963+#define GL_NUM_GENERAL_COMBINERS_NV 0x854E
16964+#define GL_COLOR_SUM_CLAMP_NV 0x854F
16965+#define GL_COMBINER0_NV 0x8550
16966+#define GL_COMBINER1_NV 0x8551
16967+#define GL_COMBINER2_NV 0x8552
16968+#define GL_COMBINER3_NV 0x8553
16969+#define GL_COMBINER4_NV 0x8554
16970+#define GL_COMBINER5_NV 0x8555
16971+#define GL_COMBINER6_NV 0x8556
16972+#define GL_COMBINER7_NV 0x8557
16973+/* reuse GL_TEXTURE0_ARB */
16974+/* reuse GL_TEXTURE1_ARB */
16975+/* reuse GL_ZERO */
16976+/* reuse GL_NONE */
16977+/* reuse GL_FOG */
16978+#endif
16979+
16980+#ifndef GL_NV_fog_distance
16981+#define GL_FOG_DISTANCE_MODE_NV 0x855A
16982+#define GL_EYE_RADIAL_NV 0x855B
16983+#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C
16984+/* reuse GL_EYE_PLANE */
16985+#endif
16986+
16987+#ifndef GL_NV_texgen_emboss
16988+#define GL_EMBOSS_LIGHT_NV 0x855D
16989+#define GL_EMBOSS_CONSTANT_NV 0x855E
16990+#define GL_EMBOSS_MAP_NV 0x855F
16991+#endif
16992+
16993+#ifndef GL_NV_blend_square
16994+#endif
16995+
16996+#ifndef GL_NV_texture_env_combine4
16997+#define GL_COMBINE4_NV 0x8503
16998+#define GL_SOURCE3_RGB_NV 0x8583
16999+#define GL_SOURCE3_ALPHA_NV 0x858B
17000+#define GL_OPERAND3_RGB_NV 0x8593
17001+#define GL_OPERAND3_ALPHA_NV 0x859B
17002+#endif
17003+
17004+#ifndef GL_MESA_resize_buffers
17005+#endif
17006+
17007+#ifndef GL_MESA_window_pos
17008+#endif
17009+
17010+#ifndef GL_EXT_texture_compression_s3tc
17011+#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
17012+#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
17013+#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
17014+#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
17015+#endif
17016+
17017+#ifndef GL_IBM_cull_vertex
17018+#define GL_CULL_VERTEX_IBM 103050
17019+#endif
17020+
17021+#ifndef GL_IBM_multimode_draw_arrays
17022+#endif
17023+
17024+#ifndef GL_IBM_vertex_array_lists
17025+#define GL_VERTEX_ARRAY_LIST_IBM 103070
17026+#define GL_NORMAL_ARRAY_LIST_IBM 103071
17027+#define GL_COLOR_ARRAY_LIST_IBM 103072
17028+#define GL_INDEX_ARRAY_LIST_IBM 103073
17029+#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074
17030+#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075
17031+#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076
17032+#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077
17033+#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080
17034+#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081
17035+#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082
17036+#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083
17037+#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084
17038+#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085
17039+#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086
17040+#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087
17041+#endif
17042+
17043+#ifndef GL_SGIX_subsample
17044+#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0
17045+#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1
17046+#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2
17047+#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3
17048+#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4
17049+#endif
17050+
17051+#ifndef GL_SGIX_ycrcb_subsample
17052+#endif
17053+
17054+#ifndef GL_SGIX_ycrcba
17055+#define GL_YCRCB_SGIX 0x8318
17056+#define GL_YCRCBA_SGIX 0x8319
17057+#endif
17058+
17059+#ifndef GL_SGI_depth_pass_instrument
17060+#define GL_DEPTH_PASS_INSTRUMENT_SGIX 0x8310
17061+#define GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX 0x8311
17062+#define GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX 0x8312
17063+#endif
17064+
17065+#ifndef GL_3DFX_texture_compression_FXT1
17066+#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0
17067+#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1
17068+#endif
17069+
17070+#ifndef GL_3DFX_multisample
17071+#define GL_MULTISAMPLE_3DFX 0x86B2
17072+#define GL_SAMPLE_BUFFERS_3DFX 0x86B3
17073+#define GL_SAMPLES_3DFX 0x86B4
17074+#define GL_MULTISAMPLE_BIT_3DFX 0x20000000
17075+#endif
17076+
17077+#ifndef GL_3DFX_tbuffer
17078+#endif
17079+
17080+#ifndef GL_EXT_multisample
17081+#define GL_MULTISAMPLE_EXT 0x809D
17082+#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E
17083+#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F
17084+#define GL_SAMPLE_MASK_EXT 0x80A0
17085+#define GL_1PASS_EXT 0x80A1
17086+#define GL_2PASS_0_EXT 0x80A2
17087+#define GL_2PASS_1_EXT 0x80A3
17088+#define GL_4PASS_0_EXT 0x80A4
17089+#define GL_4PASS_1_EXT 0x80A5
17090+#define GL_4PASS_2_EXT 0x80A6
17091+#define GL_4PASS_3_EXT 0x80A7
17092+#define GL_SAMPLE_BUFFERS_EXT 0x80A8
17093+#define GL_SAMPLES_EXT 0x80A9
17094+#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA
17095+#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB
17096+#define GL_SAMPLE_PATTERN_EXT 0x80AC
17097+#define GL_MULTISAMPLE_BIT_EXT 0x20000000
17098+#endif
17099+
17100+#ifndef GL_SGIX_vertex_preclip
17101+#define GL_VERTEX_PRECLIP_SGIX 0x83EE
17102+#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF
17103+#endif
17104+
17105+#ifndef GL_SGIX_convolution_accuracy
17106+#define GL_CONVOLUTION_HINT_SGIX 0x8316
17107+#endif
17108+
17109+#ifndef GL_SGIX_resample
17110+#define GL_PACK_RESAMPLE_SGIX 0x842C
17111+#define GL_UNPACK_RESAMPLE_SGIX 0x842D
17112+#define GL_RESAMPLE_REPLICATE_SGIX 0x842E
17113+#define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F
17114+#define GL_RESAMPLE_DECIMATE_SGIX 0x8430
17115+#endif
17116+
17117+#ifndef GL_SGIS_point_line_texgen
17118+#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0
17119+#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1
17120+#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2
17121+#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3
17122+#define GL_EYE_POINT_SGIS 0x81F4
17123+#define GL_OBJECT_POINT_SGIS 0x81F5
17124+#define GL_EYE_LINE_SGIS 0x81F6
17125+#define GL_OBJECT_LINE_SGIS 0x81F7
17126+#endif
17127+
17128+#ifndef GL_SGIS_texture_color_mask
17129+#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF
17130+#endif
17131+
17132+#ifndef GL_EXT_texture_env_dot3
17133+#define GL_DOT3_RGB_EXT 0x8740
17134+#define GL_DOT3_RGBA_EXT 0x8741
17135+#endif
17136+
17137+#ifndef GL_ATI_texture_mirror_once
17138+#define GL_MIRROR_CLAMP_ATI 0x8742
17139+#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743
17140+#endif
17141+
17142+#ifndef GL_NV_fence
17143+#define GL_ALL_COMPLETED_NV 0x84F2
17144+#define GL_FENCE_STATUS_NV 0x84F3
17145+#define GL_FENCE_CONDITION_NV 0x84F4
17146+#endif
17147+
17148+#ifndef GL_IBM_texture_mirrored_repeat
17149+#define GL_MIRRORED_REPEAT_IBM 0x8370
17150+#endif
17151+
17152+#ifndef GL_NV_evaluators
17153+#define GL_EVAL_2D_NV 0x86C0
17154+#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1
17155+#define GL_MAP_TESSELLATION_NV 0x86C2
17156+#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3
17157+#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4
17158+#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5
17159+#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6
17160+#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7
17161+#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8
17162+#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9
17163+#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA
17164+#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB
17165+#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC
17166+#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD
17167+#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE
17168+#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF
17169+#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0
17170+#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1
17171+#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2
17172+#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3
17173+#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4
17174+#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5
17175+#define GL_MAX_MAP_TESSELLATION_NV 0x86D6
17176+#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7
17177+#endif
17178+
17179+#ifndef GL_NV_packed_depth_stencil
17180+#define GL_DEPTH_STENCIL_NV 0x84F9
17181+#define GL_UNSIGNED_INT_24_8_NV 0x84FA
17182+#endif
17183+
17184+#ifndef GL_NV_register_combiners2
17185+#define GL_PER_STAGE_CONSTANTS_NV 0x8535
17186+#endif
17187+
17188+#ifndef GL_NV_texture_compression_vtc
17189+#endif
17190+
17191+#ifndef GL_NV_texture_rectangle
17192+#define GL_TEXTURE_RECTANGLE_NV 0x84F5
17193+#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6
17194+#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7
17195+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8
17196+#endif
17197+
17198+#ifndef GL_NV_texture_shader
17199+#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C
17200+#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D
17201+#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E
17202+#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9
17203+#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA
17204+#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB
17205+#define GL_DSDT_MAG_INTENSITY_NV 0x86DC
17206+#define GL_SHADER_CONSISTENT_NV 0x86DD
17207+#define GL_TEXTURE_SHADER_NV 0x86DE
17208+#define GL_SHADER_OPERATION_NV 0x86DF
17209+#define GL_CULL_MODES_NV 0x86E0
17210+#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1
17211+#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2
17212+#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3
17213+#define GL_OFFSET_TEXTURE_2D_MATRIX_NV GL_OFFSET_TEXTURE_MATRIX_NV
17214+#define GL_OFFSET_TEXTURE_2D_SCALE_NV GL_OFFSET_TEXTURE_SCALE_NV
17215+#define GL_OFFSET_TEXTURE_2D_BIAS_NV GL_OFFSET_TEXTURE_BIAS_NV
17216+#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4
17217+#define GL_CONST_EYE_NV 0x86E5
17218+#define GL_PASS_THROUGH_NV 0x86E6
17219+#define GL_CULL_FRAGMENT_NV 0x86E7
17220+#define GL_OFFSET_TEXTURE_2D_NV 0x86E8
17221+#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9
17222+#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA
17223+#define GL_DOT_PRODUCT_NV 0x86EC
17224+#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED
17225+#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE
17226+#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0
17227+#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1
17228+#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2
17229+#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3
17230+#define GL_HILO_NV 0x86F4
17231+#define GL_DSDT_NV 0x86F5
17232+#define GL_DSDT_MAG_NV 0x86F6
17233+#define GL_DSDT_MAG_VIB_NV 0x86F7
17234+#define GL_HILO16_NV 0x86F8
17235+#define GL_SIGNED_HILO_NV 0x86F9
17236+#define GL_SIGNED_HILO16_NV 0x86FA
17237+#define GL_SIGNED_RGBA_NV 0x86FB
17238+#define GL_SIGNED_RGBA8_NV 0x86FC
17239+#define GL_SIGNED_RGB_NV 0x86FE
17240+#define GL_SIGNED_RGB8_NV 0x86FF
17241+#define GL_SIGNED_LUMINANCE_NV 0x8701
17242+#define GL_SIGNED_LUMINANCE8_NV 0x8702
17243+#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703
17244+#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704
17245+#define GL_SIGNED_ALPHA_NV 0x8705
17246+#define GL_SIGNED_ALPHA8_NV 0x8706
17247+#define GL_SIGNED_INTENSITY_NV 0x8707
17248+#define GL_SIGNED_INTENSITY8_NV 0x8708
17249+#define GL_DSDT8_NV 0x8709
17250+#define GL_DSDT8_MAG8_NV 0x870A
17251+#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B
17252+#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C
17253+#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D
17254+#define GL_HI_SCALE_NV 0x870E
17255+#define GL_LO_SCALE_NV 0x870F
17256+#define GL_DS_SCALE_NV 0x8710
17257+#define GL_DT_SCALE_NV 0x8711
17258+#define GL_MAGNITUDE_SCALE_NV 0x8712
17259+#define GL_VIBRANCE_SCALE_NV 0x8713
17260+#define GL_HI_BIAS_NV 0x8714
17261+#define GL_LO_BIAS_NV 0x8715
17262+#define GL_DS_BIAS_NV 0x8716
17263+#define GL_DT_BIAS_NV 0x8717
17264+#define GL_MAGNITUDE_BIAS_NV 0x8718
17265+#define GL_VIBRANCE_BIAS_NV 0x8719
17266+#define GL_TEXTURE_BORDER_VALUES_NV 0x871A
17267+#define GL_TEXTURE_HI_SIZE_NV 0x871B
17268+#define GL_TEXTURE_LO_SIZE_NV 0x871C
17269+#define GL_TEXTURE_DS_SIZE_NV 0x871D
17270+#define GL_TEXTURE_DT_SIZE_NV 0x871E
17271+#define GL_TEXTURE_MAG_SIZE_NV 0x871F
17272+#endif
17273+
17274+#ifndef GL_NV_texture_shader2
17275+#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF
17276+#endif
17277+
17278+#ifndef GL_NV_vertex_array_range2
17279+#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533
17280+#endif
17281+
17282+#ifndef GL_NV_vertex_program
17283+#define GL_VERTEX_PROGRAM_NV 0x8620
17284+#define GL_VERTEX_STATE_PROGRAM_NV 0x8621
17285+#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623
17286+#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624
17287+#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625
17288+#define GL_CURRENT_ATTRIB_NV 0x8626
17289+#define GL_PROGRAM_LENGTH_NV 0x8627
17290+#define GL_PROGRAM_STRING_NV 0x8628
17291+#define GL_MODELVIEW_PROJECTION_NV 0x8629
17292+#define GL_IDENTITY_NV 0x862A
17293+#define GL_INVERSE_NV 0x862B
17294+#define GL_TRANSPOSE_NV 0x862C
17295+#define GL_INVERSE_TRANSPOSE_NV 0x862D
17296+#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E
17297+#define GL_MAX_TRACK_MATRICES_NV 0x862F
17298+#define GL_MATRIX0_NV 0x8630
17299+#define GL_MATRIX1_NV 0x8631
17300+#define GL_MATRIX2_NV 0x8632
17301+#define GL_MATRIX3_NV 0x8633
17302+#define GL_MATRIX4_NV 0x8634
17303+#define GL_MATRIX5_NV 0x8635
17304+#define GL_MATRIX6_NV 0x8636
17305+#define GL_MATRIX7_NV 0x8637
17306+#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640
17307+#define GL_CURRENT_MATRIX_NV 0x8641
17308+#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642
17309+#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643
17310+#define GL_PROGRAM_PARAMETER_NV 0x8644
17311+#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645
17312+#define GL_PROGRAM_TARGET_NV 0x8646
17313+#define GL_PROGRAM_RESIDENT_NV 0x8647
17314+#define GL_TRACK_MATRIX_NV 0x8648
17315+#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649
17316+#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A
17317+#define GL_PROGRAM_ERROR_POSITION_NV 0x864B
17318+#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650
17319+#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651
17320+#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652
17321+#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653
17322+#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654
17323+#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655
17324+#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656
17325+#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657
17326+#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658
17327+#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659
17328+#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A
17329+#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B
17330+#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C
17331+#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D
17332+#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E
17333+#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F
17334+#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660
17335+#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661
17336+#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662
17337+#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663
17338+#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664
17339+#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665
17340+#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666
17341+#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667
17342+#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668
17343+#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669
17344+#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A
17345+#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B
17346+#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C
17347+#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D
17348+#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E
17349+#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F
17350+#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670
17351+#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671
17352+#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672
17353+#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673
17354+#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674
17355+#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675
17356+#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676
17357+#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677
17358+#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678
17359+#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679
17360+#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A
17361+#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B
17362+#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C
17363+#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D
17364+#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E
17365+#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F
17366+#endif
17367+
17368+#ifndef GL_SGIX_texture_coordinate_clamp
17369+#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369
17370+#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A
17371+#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B
17372+#endif
17373+
17374+#ifndef GL_SGIX_scalebias_hint
17375+#define GL_SCALEBIAS_HINT_SGIX 0x8322
17376+#endif
17377+
17378+#ifndef GL_OML_interlace
17379+#define GL_INTERLACE_OML 0x8980
17380+#define GL_INTERLACE_READ_OML 0x8981
17381+#endif
17382+
17383+#ifndef GL_OML_subsample
17384+#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982
17385+#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983
17386+#endif
17387+
17388+#ifndef GL_OML_resample
17389+#define GL_PACK_RESAMPLE_OML 0x8984
17390+#define GL_UNPACK_RESAMPLE_OML 0x8985
17391+#define GL_RESAMPLE_REPLICATE_OML 0x8986
17392+#define GL_RESAMPLE_ZERO_FILL_OML 0x8987
17393+#define GL_RESAMPLE_AVERAGE_OML 0x8988
17394+#define GL_RESAMPLE_DECIMATE_OML 0x8989
17395+#endif
17396+
17397+#ifndef GL_NV_copy_depth_to_color
17398+#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E
17399+#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F
17400+#endif
17401+
17402+#ifndef GL_ATI_envmap_bumpmap
17403+#define GL_BUMP_ROT_MATRIX_ATI 0x8775
17404+#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776
17405+#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777
17406+#define GL_BUMP_TEX_UNITS_ATI 0x8778
17407+#define GL_DUDV_ATI 0x8779
17408+#define GL_DU8DV8_ATI 0x877A
17409+#define GL_BUMP_ENVMAP_ATI 0x877B
17410+#define GL_BUMP_TARGET_ATI 0x877C
17411+#endif
17412+
17413+#ifndef GL_ATI_fragment_shader
17414+#define GL_FRAGMENT_SHADER_ATI 0x8920
17415+#define GL_REG_0_ATI 0x8921
17416+#define GL_REG_1_ATI 0x8922
17417+#define GL_REG_2_ATI 0x8923
17418+#define GL_REG_3_ATI 0x8924
17419+#define GL_REG_4_ATI 0x8925
17420+#define GL_REG_5_ATI 0x8926
17421+#define GL_REG_6_ATI 0x8927
17422+#define GL_REG_7_ATI 0x8928
17423+#define GL_REG_8_ATI 0x8929
17424+#define GL_REG_9_ATI 0x892A
17425+#define GL_REG_10_ATI 0x892B
17426+#define GL_REG_11_ATI 0x892C
17427+#define GL_REG_12_ATI 0x892D
17428+#define GL_REG_13_ATI 0x892E
17429+#define GL_REG_14_ATI 0x892F
17430+#define GL_REG_15_ATI 0x8930
17431+#define GL_REG_16_ATI 0x8931
17432+#define GL_REG_17_ATI 0x8932
17433+#define GL_REG_18_ATI 0x8933
17434+#define GL_REG_19_ATI 0x8934
17435+#define GL_REG_20_ATI 0x8935
17436+#define GL_REG_21_ATI 0x8936
17437+#define GL_REG_22_ATI 0x8937
17438+#define GL_REG_23_ATI 0x8938
17439+#define GL_REG_24_ATI 0x8939
17440+#define GL_REG_25_ATI 0x893A
17441+#define GL_REG_26_ATI 0x893B
17442+#define GL_REG_27_ATI 0x893C
17443+#define GL_REG_28_ATI 0x893D
17444+#define GL_REG_29_ATI 0x893E
17445+#define GL_REG_30_ATI 0x893F
17446+#define GL_REG_31_ATI 0x8940
17447+#define GL_CON_0_ATI 0x8941
17448+#define GL_CON_1_ATI 0x8942
17449+#define GL_CON_2_ATI 0x8943
17450+#define GL_CON_3_ATI 0x8944
17451+#define GL_CON_4_ATI 0x8945
17452+#define GL_CON_5_ATI 0x8946
17453+#define GL_CON_6_ATI 0x8947
17454+#define GL_CON_7_ATI 0x8948
17455+#define GL_CON_8_ATI 0x8949
17456+#define GL_CON_9_ATI 0x894A
17457+#define GL_CON_10_ATI 0x894B
17458+#define GL_CON_11_ATI 0x894C
17459+#define GL_CON_12_ATI 0x894D
17460+#define GL_CON_13_ATI 0x894E
17461+#define GL_CON_14_ATI 0x894F
17462+#define GL_CON_15_ATI 0x8950
17463+#define GL_CON_16_ATI 0x8951
17464+#define GL_CON_17_ATI 0x8952
17465+#define GL_CON_18_ATI 0x8953
17466+#define GL_CON_19_ATI 0x8954
17467+#define GL_CON_20_ATI 0x8955
17468+#define GL_CON_21_ATI 0x8956
17469+#define GL_CON_22_ATI 0x8957
17470+#define GL_CON_23_ATI 0x8958
17471+#define GL_CON_24_ATI 0x8959
17472+#define GL_CON_25_ATI 0x895A
17473+#define GL_CON_26_ATI 0x895B
17474+#define GL_CON_27_ATI 0x895C
17475+#define GL_CON_28_ATI 0x895D
17476+#define GL_CON_29_ATI 0x895E
17477+#define GL_CON_30_ATI 0x895F
17478+#define GL_CON_31_ATI 0x8960
17479+#define GL_MOV_ATI 0x8961
17480+#define GL_ADD_ATI 0x8963
17481+#define GL_MUL_ATI 0x8964
17482+#define GL_SUB_ATI 0x8965
17483+#define GL_DOT3_ATI 0x8966
17484+#define GL_DOT4_ATI 0x8967
17485+#define GL_MAD_ATI 0x8968
17486+#define GL_LERP_ATI 0x8969
17487+#define GL_CND_ATI 0x896A
17488+#define GL_CND0_ATI 0x896B
17489+#define GL_DOT2_ADD_ATI 0x896C
17490+#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D
17491+#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E
17492+#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F
17493+#define GL_NUM_PASSES_ATI 0x8970
17494+#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971
17495+#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972
17496+#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973
17497+#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974
17498+#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975
17499+#define GL_SWIZZLE_STR_ATI 0x8976
17500+#define GL_SWIZZLE_STQ_ATI 0x8977
17501+#define GL_SWIZZLE_STR_DR_ATI 0x8978
17502+#define GL_SWIZZLE_STQ_DQ_ATI 0x8979
17503+#define GL_SWIZZLE_STRQ_ATI 0x897A
17504+#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B
17505+#define GL_RED_BIT_ATI 0x00000001
17506+#define GL_GREEN_BIT_ATI 0x00000002
17507+#define GL_BLUE_BIT_ATI 0x00000004
17508+#define GL_2X_BIT_ATI 0x00000001
17509+#define GL_4X_BIT_ATI 0x00000002
17510+#define GL_8X_BIT_ATI 0x00000004
17511+#define GL_HALF_BIT_ATI 0x00000008
17512+#define GL_QUARTER_BIT_ATI 0x00000010
17513+#define GL_EIGHTH_BIT_ATI 0x00000020
17514+#define GL_SATURATE_BIT_ATI 0x00000040
17515+#define GL_COMP_BIT_ATI 0x00000002
17516+#define GL_NEGATE_BIT_ATI 0x00000004
17517+#define GL_BIAS_BIT_ATI 0x00000008
17518+#endif
17519+
17520+#ifndef GL_ATI_pn_triangles
17521+#define GL_PN_TRIANGLES_ATI 0x87F0
17522+#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1
17523+#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2
17524+#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3
17525+#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4
17526+#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5
17527+#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6
17528+#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7
17529+#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8
17530+#endif
17531+
17532+#ifndef GL_ATI_vertex_array_object
17533+#define GL_STATIC_ATI 0x8760
17534+#define GL_DYNAMIC_ATI 0x8761
17535+#define GL_PRESERVE_ATI 0x8762
17536+#define GL_DISCARD_ATI 0x8763
17537+#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764
17538+#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765
17539+#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766
17540+#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767
17541+#endif
17542+
17543+#ifndef GL_EXT_vertex_shader
17544+#define GL_VERTEX_SHADER_EXT 0x8780
17545+#define GL_VERTEX_SHADER_BINDING_EXT 0x8781
17546+#define GL_OP_INDEX_EXT 0x8782
17547+#define GL_OP_NEGATE_EXT 0x8783
17548+#define GL_OP_DOT3_EXT 0x8784
17549+#define GL_OP_DOT4_EXT 0x8785
17550+#define GL_OP_MUL_EXT 0x8786
17551+#define GL_OP_ADD_EXT 0x8787
17552+#define GL_OP_MADD_EXT 0x8788
17553+#define GL_OP_FRAC_EXT 0x8789
17554+#define GL_OP_MAX_EXT 0x878A
17555+#define GL_OP_MIN_EXT 0x878B
17556+#define GL_OP_SET_GE_EXT 0x878C
17557+#define GL_OP_SET_LT_EXT 0x878D
17558+#define GL_OP_CLAMP_EXT 0x878E
17559+#define GL_OP_FLOOR_EXT 0x878F
17560+#define GL_OP_ROUND_EXT 0x8790
17561+#define GL_OP_EXP_BASE_2_EXT 0x8791
17562+#define GL_OP_LOG_BASE_2_EXT 0x8792
17563+#define GL_OP_POWER_EXT 0x8793
17564+#define GL_OP_RECIP_EXT 0x8794
17565+#define GL_OP_RECIP_SQRT_EXT 0x8795
17566+#define GL_OP_SUB_EXT 0x8796
17567+#define GL_OP_CROSS_PRODUCT_EXT 0x8797
17568+#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798
17569+#define GL_OP_MOV_EXT 0x8799
17570+#define GL_OUTPUT_VERTEX_EXT 0x879A
17571+#define GL_OUTPUT_COLOR0_EXT 0x879B
17572+#define GL_OUTPUT_COLOR1_EXT 0x879C
17573+#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D
17574+#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E
17575+#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F
17576+#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0
17577+#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1
17578+#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2
17579+#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3
17580+#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4
17581+#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5
17582+#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6
17583+#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7
17584+#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8
17585+#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9
17586+#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA
17587+#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB
17588+#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC
17589+#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD
17590+#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE
17591+#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF
17592+#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0
17593+#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1
17594+#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2
17595+#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3
17596+#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4
17597+#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5
17598+#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6
17599+#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7
17600+#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8
17601+#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9
17602+#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA
17603+#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB
17604+#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC
17605+#define GL_OUTPUT_FOG_EXT 0x87BD
17606+#define GL_SCALAR_EXT 0x87BE
17607+#define GL_VECTOR_EXT 0x87BF
17608+#define GL_MATRIX_EXT 0x87C0
17609+#define GL_VARIANT_EXT 0x87C1
17610+#define GL_INVARIANT_EXT 0x87C2
17611+#define GL_LOCAL_CONSTANT_EXT 0x87C3
17612+#define GL_LOCAL_EXT 0x87C4
17613+#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5
17614+#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6
17615+#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7
17616+#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8
17617+#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9
17618+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA
17619+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB
17620+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC
17621+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD
17622+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE
17623+#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF
17624+#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0
17625+#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1
17626+#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2
17627+#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3
17628+#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4
17629+#define GL_X_EXT 0x87D5
17630+#define GL_Y_EXT 0x87D6
17631+#define GL_Z_EXT 0x87D7
17632+#define GL_W_EXT 0x87D8
17633+#define GL_NEGATIVE_X_EXT 0x87D9
17634+#define GL_NEGATIVE_Y_EXT 0x87DA
17635+#define GL_NEGATIVE_Z_EXT 0x87DB
17636+#define GL_NEGATIVE_W_EXT 0x87DC
17637+#define GL_ZERO_EXT 0x87DD
17638+#define GL_ONE_EXT 0x87DE
17639+#define GL_NEGATIVE_ONE_EXT 0x87DF
17640+#define GL_NORMALIZED_RANGE_EXT 0x87E0
17641+#define GL_FULL_RANGE_EXT 0x87E1
17642+#define GL_CURRENT_VERTEX_EXT 0x87E2
17643+#define GL_MVP_MATRIX_EXT 0x87E3
17644+#define GL_VARIANT_VALUE_EXT 0x87E4
17645+#define GL_VARIANT_DATATYPE_EXT 0x87E5
17646+#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6
17647+#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7
17648+#define GL_VARIANT_ARRAY_EXT 0x87E8
17649+#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9
17650+#define GL_INVARIANT_VALUE_EXT 0x87EA
17651+#define GL_INVARIANT_DATATYPE_EXT 0x87EB
17652+#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC
17653+#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED
17654+#endif
17655+
17656+#ifndef GL_ATI_vertex_streams
17657+#define GL_MAX_VERTEX_STREAMS_ATI 0x876B
17658+#define GL_VERTEX_STREAM0_ATI 0x876C
17659+#define GL_VERTEX_STREAM1_ATI 0x876D
17660+#define GL_VERTEX_STREAM2_ATI 0x876E
17661+#define GL_VERTEX_STREAM3_ATI 0x876F
17662+#define GL_VERTEX_STREAM4_ATI 0x8770
17663+#define GL_VERTEX_STREAM5_ATI 0x8771
17664+#define GL_VERTEX_STREAM6_ATI 0x8772
17665+#define GL_VERTEX_STREAM7_ATI 0x8773
17666+#define GL_VERTEX_SOURCE_ATI 0x8774
17667+#endif
17668+
17669+#ifndef GL_ATI_element_array
17670+#define GL_ELEMENT_ARRAY_ATI 0x8768
17671+#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769
17672+#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A
17673+#endif
17674+
17675+#ifndef GL_SUN_mesh_array
17676+#define GL_QUAD_MESH_SUN 0x8614
17677+#define GL_TRIANGLE_MESH_SUN 0x8615
17678+#endif
17679+
17680+#ifndef GL_SUN_slice_accum
17681+#define GL_SLICE_ACCUM_SUN 0x85CC
17682+#endif
17683+
17684+#ifndef GL_NV_multisample_filter_hint
17685+#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534
17686+#endif
17687+
17688+#ifndef GL_NV_depth_clamp
17689+#define GL_DEPTH_CLAMP_NV 0x864F
17690+#endif
17691+
17692+#ifndef GL_NV_occlusion_query
17693+#define GL_PIXEL_COUNTER_BITS_NV 0x8864
17694+#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865
17695+#define GL_PIXEL_COUNT_NV 0x8866
17696+#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867
17697+#endif
17698+
17699+#ifndef GL_NV_point_sprite
17700+#define GL_POINT_SPRITE_NV 0x8861
17701+#define GL_COORD_REPLACE_NV 0x8862
17702+#define GL_POINT_SPRITE_R_MODE_NV 0x8863
17703+#endif
17704+
17705+#ifndef GL_NV_texture_shader3
17706+#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850
17707+#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851
17708+#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852
17709+#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853
17710+#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854
17711+#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855
17712+#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856
17713+#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857
17714+#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858
17715+#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859
17716+#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A
17717+#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B
17718+#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C
17719+#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D
17720+#define GL_HILO8_NV 0x885E
17721+#define GL_SIGNED_HILO8_NV 0x885F
17722+#define GL_FORCE_BLUE_TO_ONE_NV 0x8860
17723+#endif
17724+
17725+#ifndef GL_NV_vertex_program1_1
17726+#endif
17727+
17728+#ifndef GL_EXT_shadow_funcs
17729+#endif
17730+
17731+#ifndef GL_EXT_stencil_two_side
17732+#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910
17733+#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911
17734+#endif
17735+
17736+#ifndef GL_ATI_text_fragment_shader
17737+#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200
17738+#endif
17739+
17740+#ifndef GL_APPLE_client_storage
17741+#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2
17742+#endif
17743+
17744+#ifndef GL_APPLE_element_array
17745+#define GL_ELEMENT_ARRAY_APPLE 0x8768
17746+#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8769
17747+#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x876A
17748+#endif
17749+
17750+#ifndef GL_APPLE_fence
17751+#define GL_DRAW_PIXELS_APPLE 0x8A0A
17752+#define GL_FENCE_APPLE 0x8A0B
17753+#endif
17754+
17755+#ifndef GL_APPLE_vertex_array_object
17756+#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5
17757+#endif
17758+
17759+#ifndef GL_APPLE_vertex_array_range
17760+#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D
17761+#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E
17762+#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F
17763+#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521
17764+#define GL_STORAGE_CACHED_APPLE 0x85BE
17765+#define GL_STORAGE_SHARED_APPLE 0x85BF
17766+#endif
17767+
17768+#ifndef GL_APPLE_ycbcr_422
17769+#define GL_YCBCR_422_APPLE 0x85B9
17770+#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
17771+#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
17772+#endif
17773+
17774+#ifndef GL_S3_s3tc
17775+#define GL_RGB_S3TC 0x83A0
17776+#define GL_RGB4_S3TC 0x83A1
17777+#define GL_RGBA_S3TC 0x83A2
17778+#define GL_RGBA4_S3TC 0x83A3
17779+#endif
17780+
17781+#ifndef GL_ATI_draw_buffers
17782+#define GL_MAX_DRAW_BUFFERS_ATI 0x8824
17783+#define GL_DRAW_BUFFER0_ATI 0x8825
17784+#define GL_DRAW_BUFFER1_ATI 0x8826
17785+#define GL_DRAW_BUFFER2_ATI 0x8827
17786+#define GL_DRAW_BUFFER3_ATI 0x8828
17787+#define GL_DRAW_BUFFER4_ATI 0x8829
17788+#define GL_DRAW_BUFFER5_ATI 0x882A
17789+#define GL_DRAW_BUFFER6_ATI 0x882B
17790+#define GL_DRAW_BUFFER7_ATI 0x882C
17791+#define GL_DRAW_BUFFER8_ATI 0x882D
17792+#define GL_DRAW_BUFFER9_ATI 0x882E
17793+#define GL_DRAW_BUFFER10_ATI 0x882F
17794+#define GL_DRAW_BUFFER11_ATI 0x8830
17795+#define GL_DRAW_BUFFER12_ATI 0x8831
17796+#define GL_DRAW_BUFFER13_ATI 0x8832
17797+#define GL_DRAW_BUFFER14_ATI 0x8833
17798+#define GL_DRAW_BUFFER15_ATI 0x8834
17799+#endif
17800+
17801+#ifndef GL_ATI_pixel_format_float
17802+#define GL_TYPE_RGBA_FLOAT_ATI 0x8820
17803+#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
17804+#endif
17805+
17806+#ifndef GL_ATI_texture_env_combine3
17807+#define GL_MODULATE_ADD_ATI 0x8744
17808+#define GL_MODULATE_SIGNED_ADD_ATI 0x8745
17809+#define GL_MODULATE_SUBTRACT_ATI 0x8746
17810+#endif
17811+
17812+#ifndef GL_ATI_texture_float
17813+#define GL_RGBA_FLOAT32_ATI 0x8814
17814+#define GL_RGB_FLOAT32_ATI 0x8815
17815+#define GL_ALPHA_FLOAT32_ATI 0x8816
17816+#define GL_INTENSITY_FLOAT32_ATI 0x8817
17817+#define GL_LUMINANCE_FLOAT32_ATI 0x8818
17818+#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819
17819+#define GL_RGBA_FLOAT16_ATI 0x881A
17820+#define GL_RGB_FLOAT16_ATI 0x881B
17821+#define GL_ALPHA_FLOAT16_ATI 0x881C
17822+#define GL_INTENSITY_FLOAT16_ATI 0x881D
17823+#define GL_LUMINANCE_FLOAT16_ATI 0x881E
17824+#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F
17825+#endif
17826+
17827+#ifndef GL_NV_float_buffer
17828+#define GL_FLOAT_R_NV 0x8880
17829+#define GL_FLOAT_RG_NV 0x8881
17830+#define GL_FLOAT_RGB_NV 0x8882
17831+#define GL_FLOAT_RGBA_NV 0x8883
17832+#define GL_FLOAT_R16_NV 0x8884
17833+#define GL_FLOAT_R32_NV 0x8885
17834+#define GL_FLOAT_RG16_NV 0x8886
17835+#define GL_FLOAT_RG32_NV 0x8887
17836+#define GL_FLOAT_RGB16_NV 0x8888
17837+#define GL_FLOAT_RGB32_NV 0x8889
17838+#define GL_FLOAT_RGBA16_NV 0x888A
17839+#define GL_FLOAT_RGBA32_NV 0x888B
17840+#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C
17841+#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D
17842+#define GL_FLOAT_RGBA_MODE_NV 0x888E
17843+#endif
17844+
17845+#ifndef GL_NV_fragment_program
17846+#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868
17847+#define GL_FRAGMENT_PROGRAM_NV 0x8870
17848+#define GL_MAX_TEXTURE_COORDS_NV 0x8871
17849+#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872
17850+#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873
17851+#define GL_PROGRAM_ERROR_STRING_NV 0x8874
17852+#endif
17853+
17854+#ifndef GL_NV_half_float
17855+#define GL_HALF_FLOAT_NV 0x140B
17856+#endif
17857+
17858+#ifndef GL_NV_pixel_data_range
17859+#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878
17860+#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879
17861+#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A
17862+#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B
17863+#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C
17864+#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D
17865+#endif
17866+
17867+#ifndef GL_NV_primitive_restart
17868+#define GL_PRIMITIVE_RESTART_NV 0x8558
17869+#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559
17870+#endif
17871+
17872+#ifndef GL_NV_texture_expand_normal
17873+#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F
17874+#endif
17875+
17876+#ifndef GL_NV_vertex_program2
17877+#endif
17878+
17879+#ifndef GL_ATI_map_object_buffer
17880+#endif
17881+
17882+#ifndef GL_ATI_separate_stencil
17883+#define GL_STENCIL_BACK_FUNC_ATI 0x8800
17884+#define GL_STENCIL_BACK_FAIL_ATI 0x8801
17885+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802
17886+#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803
17887+#endif
17888+
17889+#ifndef GL_ATI_vertex_attrib_array_object
17890+#endif
17891+
17892+#ifndef GL_OES_read_format
17893+#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
17894+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
17895+#endif
17896+
17897+#ifndef GL_EXT_depth_bounds_test
17898+#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890
17899+#define GL_DEPTH_BOUNDS_EXT 0x8891
17900+#endif
17901+
17902+#ifndef GL_EXT_texture_mirror_clamp
17903+#define GL_MIRROR_CLAMP_EXT 0x8742
17904+#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743
17905+#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912
17906+#endif
17907+
17908+#ifndef GL_EXT_blend_equation_separate
17909+#define GL_BLEND_EQUATION_RGB_EXT GL_BLEND_EQUATION
17910+#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D
17911+#endif
17912+
17913+#ifndef GL_MESA_pack_invert
17914+#define GL_PACK_INVERT_MESA 0x8758
17915+#endif
17916+
17917+#ifndef GL_MESA_ycbcr_texture
17918+#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA
17919+#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB
17920+#define GL_YCBCR_MESA 0x8757
17921+#endif
17922+
17923+#ifndef GL_EXT_pixel_buffer_object
17924+#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB
17925+#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC
17926+#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED
17927+#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF
17928+#endif
17929+
17930+#ifndef GL_NV_fragment_program_option
17931+#endif
17932+
17933+#ifndef GL_NV_fragment_program2
17934+#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4
17935+#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5
17936+#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6
17937+#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7
17938+#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8
17939+#endif
17940+
17941+#ifndef GL_NV_vertex_program2_option
17942+/* reuse GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
17943+/* reuse GL_MAX_PROGRAM_CALL_DEPTH_NV */
17944+#endif
17945+
17946+#ifndef GL_NV_vertex_program3
17947+/* reuse GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
17948+#endif
17949+
17950+#ifndef GL_EXT_framebuffer_object
17951+#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
17952+#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8
17953+#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6
17954+#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7
17955+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
17956+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
17957+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
17958+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
17959+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
17960+#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
17961+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
17962+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
17963+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
17964+#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
17965+#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
17966+#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
17967+#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD
17968+#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
17969+#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
17970+#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
17971+#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
17972+#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
17973+#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
17974+#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
17975+#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
17976+#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
17977+#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
17978+#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
17979+#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
17980+#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
17981+#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
17982+#define GL_COLOR_ATTACHMENT13_EXT 0x8CED
17983+#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
17984+#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
17985+#define GL_DEPTH_ATTACHMENT_EXT 0x8D00
17986+#define GL_STENCIL_ATTACHMENT_EXT 0x8D20
17987+#define GL_FRAMEBUFFER_EXT 0x8D40
17988+#define GL_RENDERBUFFER_EXT 0x8D41
17989+#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42
17990+#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43
17991+#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
17992+#define GL_STENCIL_INDEX1_EXT 0x8D46
17993+#define GL_STENCIL_INDEX4_EXT 0x8D47
17994+#define GL_STENCIL_INDEX8_EXT 0x8D48
17995+#define GL_STENCIL_INDEX16_EXT 0x8D49
17996+#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50
17997+#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51
17998+#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52
17999+#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53
18000+#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54
18001+#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55
18002+#endif
18003+
18004+#ifndef GL_GREMEDY_string_marker
18005+#endif
18006+
18007+#ifndef GL_EXT_packed_depth_stencil
18008+#define GL_DEPTH_STENCIL_EXT 0x84F9
18009+#define GL_UNSIGNED_INT_24_8_EXT 0x84FA
18010+#define GL_DEPTH24_STENCIL8_EXT 0x88F0
18011+#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1
18012+#endif
18013+
18014+#ifndef GL_EXT_stencil_clear_tag
18015+#define GL_STENCIL_TAG_BITS_EXT 0x88F2
18016+#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3
18017+#endif
18018+
18019+#ifndef GL_EXT_texture_sRGB
18020+#define GL_SRGB_EXT 0x8C40
18021+#define GL_SRGB8_EXT 0x8C41
18022+#define GL_SRGB_ALPHA_EXT 0x8C42
18023+#define GL_SRGB8_ALPHA8_EXT 0x8C43
18024+#define GL_SLUMINANCE_ALPHA_EXT 0x8C44
18025+#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45
18026+#define GL_SLUMINANCE_EXT 0x8C46
18027+#define GL_SLUMINANCE8_EXT 0x8C47
18028+#define GL_COMPRESSED_SRGB_EXT 0x8C48
18029+#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49
18030+#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A
18031+#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B
18032+#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
18033+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
18034+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
18035+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
18036+#endif
18037+
18038+#ifndef GL_EXT_framebuffer_blit
18039+#define GL_READ_FRAMEBUFFER_EXT 0x8CA8
18040+#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
18041+#define GL_READ_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT
18042+#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CAA
18043+#endif
18044+
18045+#ifndef GL_EXT_framebuffer_multisample
18046+#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
18047+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
18048+#define GL_MAX_SAMPLES_EXT 0x8D57
18049+#endif
18050+
18051+#ifndef GL_MESAX_texture_stack
18052+#define GL_TEXTURE_1D_STACK_MESAX 0x8759
18053+#define GL_TEXTURE_2D_STACK_MESAX 0x875A
18054+#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B
18055+#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C
18056+#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D
18057+#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E
18058+#endif
18059+
18060+#ifndef GL_EXT_timer_query
18061+#define GL_TIME_ELAPSED_EXT 0x88BF
18062+#endif
18063+
18064+#ifndef GL_EXT_gpu_program_parameters
18065+#endif
18066+
18067+#ifndef GL_APPLE_flush_buffer_range
18068+#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12
18069+#define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13
18070+#endif
18071+
18072+#ifndef GL_NV_gpu_program4
18073+#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904
18074+#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905
18075+#define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906
18076+#define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907
18077+#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908
18078+#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909
18079+#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5
18080+#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6
18081+#endif
18082+
18083+#ifndef GL_NV_geometry_program4
18084+#define GL_LINES_ADJACENCY_EXT 0x000A
18085+#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B
18086+#define GL_TRIANGLES_ADJACENCY_EXT 0x000C
18087+#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D
18088+#define GL_GEOMETRY_PROGRAM_NV 0x8C26
18089+#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27
18090+#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28
18091+#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA
18092+#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB
18093+#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC
18094+#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
18095+#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
18096+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
18097+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9
18098+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
18099+#define GL_PROGRAM_POINT_SIZE_EXT 0x8642
18100+#endif
18101+
18102+#ifndef GL_EXT_geometry_shader4
18103+#define GL_GEOMETRY_SHADER_EXT 0x8DD9
18104+/* reuse GL_GEOMETRY_VERTICES_OUT_EXT */
18105+/* reuse GL_GEOMETRY_INPUT_TYPE_EXT */
18106+/* reuse GL_GEOMETRY_OUTPUT_TYPE_EXT */
18107+/* reuse GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT */
18108+#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD
18109+#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE
18110+#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B
18111+#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
18112+#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
18113+#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
18114+/* reuse GL_LINES_ADJACENCY_EXT */
18115+/* reuse GL_LINE_STRIP_ADJACENCY_EXT */
18116+/* reuse GL_TRIANGLES_ADJACENCY_EXT */
18117+/* reuse GL_TRIANGLE_STRIP_ADJACENCY_EXT */
18118+/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT */
18119+/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT */
18120+/* reuse GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT */
18121+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
18122+/* reuse GL_PROGRAM_POINT_SIZE_EXT */
18123+#endif
18124+
18125+#ifndef GL_NV_vertex_program4
18126+#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD
18127+#endif
18128+
18129+#ifndef GL_EXT_gpu_shader4
18130+#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0
18131+#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1
18132+#define GL_SAMPLER_BUFFER_EXT 0x8DC2
18133+#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3
18134+#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4
18135+#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5
18136+#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6
18137+#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7
18138+#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8
18139+#define GL_INT_SAMPLER_1D_EXT 0x8DC9
18140+#define GL_INT_SAMPLER_2D_EXT 0x8DCA
18141+#define GL_INT_SAMPLER_3D_EXT 0x8DCB
18142+#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC
18143+#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD
18144+#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE
18145+#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF
18146+#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0
18147+#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1
18148+#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2
18149+#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3
18150+#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4
18151+#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5
18152+#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6
18153+#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7
18154+#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8
18155+#endif
18156+
18157+#ifndef GL_EXT_draw_instanced
18158+#endif
18159+
18160+#ifndef GL_EXT_packed_float
18161+#define GL_R11F_G11F_B10F_EXT 0x8C3A
18162+#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B
18163+#define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C
18164+#endif
18165+
18166+#ifndef GL_EXT_texture_array
18167+#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18
18168+#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19
18169+#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A
18170+#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B
18171+#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C
18172+#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D
18173+#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF
18174+#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E
18175+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
18176+#endif
18177+
18178+#ifndef GL_EXT_texture_buffer_object
18179+#define GL_TEXTURE_BUFFER_EXT 0x8C2A
18180+#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B
18181+#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C
18182+#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D
18183+#define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E
18184+#endif
18185+
18186+#ifndef GL_EXT_texture_compression_latc
18187+#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70
18188+#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71
18189+#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72
18190+#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73
18191+#endif
18192+
18193+#ifndef GL_EXT_texture_compression_rgtc
18194+#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB
18195+#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC
18196+#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD
18197+#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE
18198+#endif
18199+
18200+#ifndef GL_EXT_texture_shared_exponent
18201+#define GL_RGB9_E5_EXT 0x8C3D
18202+#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E
18203+#define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F
18204+#endif
18205+
18206+#ifndef GL_NV_depth_buffer_float
18207+#define GL_DEPTH_COMPONENT32F_NV 0x8DAB
18208+#define GL_DEPTH32F_STENCIL8_NV 0x8DAC
18209+#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD
18210+#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF
18211+#endif
18212+
18213+#ifndef GL_NV_fragment_program4
18214+#endif
18215+
18216+#ifndef GL_NV_framebuffer_multisample_coverage
18217+#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB
18218+#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10
18219+#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11
18220+#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12
18221+#endif
18222+
18223+#ifndef GL_EXT_framebuffer_sRGB
18224+#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9
18225+#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA
18226+#endif
18227+
18228+#ifndef GL_NV_geometry_shader4
18229+#endif
18230+
18231+#ifndef GL_NV_parameter_buffer_object
18232+#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0
18233+#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1
18234+#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2
18235+#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3
18236+#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4
18237+#endif
18238+
18239+#ifndef GL_EXT_draw_buffers2
18240+#endif
18241+
18242+#ifndef GL_NV_transform_feedback
18243+#define GL_BACK_PRIMARY_COLOR_NV 0x8C77
18244+#define GL_BACK_SECONDARY_COLOR_NV 0x8C78
18245+#define GL_TEXTURE_COORD_NV 0x8C79
18246+#define GL_CLIP_DISTANCE_NV 0x8C7A
18247+#define GL_VERTEX_ID_NV 0x8C7B
18248+#define GL_PRIMITIVE_ID_NV 0x8C7C
18249+#define GL_GENERIC_ATTRIB_NV 0x8C7D
18250+#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E
18251+#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F
18252+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80
18253+#define GL_ACTIVE_VARYINGS_NV 0x8C81
18254+#define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82
18255+#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83
18256+#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84
18257+#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85
18258+#define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86
18259+#define GL_PRIMITIVES_GENERATED_NV 0x8C87
18260+#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88
18261+#define GL_RASTERIZER_DISCARD_NV 0x8C89
18262+#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_ATTRIBS_NV 0x8C8A
18263+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B
18264+#define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C
18265+#define GL_SEPARATE_ATTRIBS_NV 0x8C8D
18266+#define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E
18267+#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F
18268+#endif
18269+
18270+#ifndef GL_EXT_bindable_uniform
18271+#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2
18272+#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3
18273+#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4
18274+#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED
18275+#define GL_UNIFORM_BUFFER_EXT 0x8DEE
18276+#define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF
18277+#endif
18278+
18279+#ifndef GL_EXT_texture_integer
18280+#define GL_RGBA32UI_EXT 0x8D70
18281+#define GL_RGB32UI_EXT 0x8D71
18282+#define GL_ALPHA32UI_EXT 0x8D72
18283+#define GL_INTENSITY32UI_EXT 0x8D73
18284+#define GL_LUMINANCE32UI_EXT 0x8D74
18285+#define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75
18286+#define GL_RGBA16UI_EXT 0x8D76
18287+#define GL_RGB16UI_EXT 0x8D77
18288+#define GL_ALPHA16UI_EXT 0x8D78
18289+#define GL_INTENSITY16UI_EXT 0x8D79
18290+#define GL_LUMINANCE16UI_EXT 0x8D7A
18291+#define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B
18292+#define GL_RGBA8UI_EXT 0x8D7C
18293+#define GL_RGB8UI_EXT 0x8D7D
18294+#define GL_ALPHA8UI_EXT 0x8D7E
18295+#define GL_INTENSITY8UI_EXT 0x8D7F
18296+#define GL_LUMINANCE8UI_EXT 0x8D80
18297+#define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81
18298+#define GL_RGBA32I_EXT 0x8D82
18299+#define GL_RGB32I_EXT 0x8D83
18300+#define GL_ALPHA32I_EXT 0x8D84
18301+#define GL_INTENSITY32I_EXT 0x8D85
18302+#define GL_LUMINANCE32I_EXT 0x8D86
18303+#define GL_LUMINANCE_ALPHA32I_EXT 0x8D87
18304+#define GL_RGBA16I_EXT 0x8D88
18305+#define GL_RGB16I_EXT 0x8D89
18306+#define GL_ALPHA16I_EXT 0x8D8A
18307+#define GL_INTENSITY16I_EXT 0x8D8B
18308+#define GL_LUMINANCE16I_EXT 0x8D8C
18309+#define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D
18310+#define GL_RGBA8I_EXT 0x8D8E
18311+#define GL_RGB8I_EXT 0x8D8F
18312+#define GL_ALPHA8I_EXT 0x8D90
18313+#define GL_INTENSITY8I_EXT 0x8D91
18314+#define GL_LUMINANCE8I_EXT 0x8D92
18315+#define GL_LUMINANCE_ALPHA8I_EXT 0x8D93
18316+#define GL_RED_INTEGER_EXT 0x8D94
18317+#define GL_GREEN_INTEGER_EXT 0x8D95
18318+#define GL_BLUE_INTEGER_EXT 0x8D96
18319+#define GL_ALPHA_INTEGER_EXT 0x8D97
18320+#define GL_RGB_INTEGER_EXT 0x8D98
18321+#define GL_RGBA_INTEGER_EXT 0x8D99
18322+#define GL_BGR_INTEGER_EXT 0x8D9A
18323+#define GL_BGRA_INTEGER_EXT 0x8D9B
18324+#define GL_LUMINANCE_INTEGER_EXT 0x8D9C
18325+#define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D
18326+#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E
18327+#endif
18328+
18329+
18330+/*************************************************************/
18331+
18332+#include <stddef.h>
18333+#ifndef GL_VERSION_2_0
18334+/* GL type for program/shader text */
18335+typedef char GLchar; /* native character */
18336+#endif
18337+
18338+#ifndef GL_VERSION_1_5
18339+/* GL types for handling large vertex buffer objects */
18340+typedef ptrdiff_t GLintptr;
18341+typedef ptrdiff_t GLsizeiptr;
18342+#endif
18343+
18344+#ifndef GL_ARB_vertex_buffer_object
18345+/* GL types for handling large vertex buffer objects */
18346+typedef ptrdiff_t GLintptrARB;
18347+typedef ptrdiff_t GLsizeiptrARB;
18348+#endif
18349+
18350+#ifndef GL_ARB_shader_objects
18351+/* GL types for handling shader object handles and program/shader text */
18352+typedef char GLcharARB; /* native character */
18353+typedef unsigned int GLhandleARB; /* shader object handle */
18354+#endif
18355+
18356+/* GL types for "half" precision (s10e5) float data in host memory */
18357+#ifndef GL_ARB_half_float_pixel
18358+typedef unsigned short GLhalfARB;
18359+#endif
18360+
18361+#ifndef GL_NV_half_float
18362+typedef unsigned short GLhalfNV;
18363+#endif
18364+
18365+#ifndef GLEXT_64_TYPES_DEFINED
18366+/* This code block is duplicated in glext.h, so must be protected */
18367+#define GLEXT_64_TYPES_DEFINED
18368+/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
18369+/* (as used in the GL_EXT_timer_query extension). */
18370+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
18371+#include <inttypes.h>
18372+#elif defined(__sun__)
18373+#include <inttypes.h>
18374+#if defined(__STDC__)
18375+#if defined(__arch64__)
18376+typedef long int int64_t;
18377+typedef unsigned long int uint64_t;
18378+#else
18379+typedef long long int int64_t;
18380+typedef unsigned long long int uint64_t;
18381+#endif /* __arch64__ */
18382+#endif /* __STDC__ */
18383+#elif defined( __VMS )
18384+#include <inttypes.h>
18385+#elif defined(__SCO__) || defined(__USLC__)
18386+#include <stdint.h>
18387+#elif defined(__UNIXOS2__) || defined(__SOL64__)
18388+typedef long int int32_t;
18389+typedef long long int int64_t;
18390+typedef unsigned long long int uint64_t;
18391+#elif defined(_WIN32) && defined(__GNUC__)
18392+#include <stdint.h>
18393+#elif defined(_WIN32)
18394+typedef __int32 int32_t;
18395+typedef __int64 int64_t;
18396+typedef unsigned __int64 uint64_t;
18397+#else
18398+#include <inttypes.h> /* Fallback option */
18399+#endif
18400+#endif
18401+
18402+#ifndef GL_EXT_timer_query
18403+typedef int64_t GLint64EXT;
18404+typedef uint64_t GLuint64EXT;
18405+#endif
18406+
18407+#ifndef GL_VERSION_1_2
18408+#define GL_VERSION_1_2 1
18409+#ifdef GL_GLEXT_PROTOTYPES
18410+GLAPI void APIENTRY glBlendColor (GLclampf, GLclampf, GLclampf, GLclampf);
18411+GLAPI void APIENTRY glBlendEquation (GLenum);
18412+GLAPI void APIENTRY glDrawRangeElements (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
18413+GLAPI void APIENTRY glColorTable (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
18414+GLAPI void APIENTRY glColorTableParameterfv (GLenum, GLenum, const GLfloat *);
18415+GLAPI void APIENTRY glColorTableParameteriv (GLenum, GLenum, const GLint *);
18416+GLAPI void APIENTRY glCopyColorTable (GLenum, GLenum, GLint, GLint, GLsizei);
18417+GLAPI void APIENTRY glGetColorTable (GLenum, GLenum, GLenum, GLvoid *);
18418+GLAPI void APIENTRY glGetColorTableParameterfv (GLenum, GLenum, GLfloat *);
18419+GLAPI void APIENTRY glGetColorTableParameteriv (GLenum, GLenum, GLint *);
18420+GLAPI void APIENTRY glColorSubTable (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
18421+GLAPI void APIENTRY glCopyColorSubTable (GLenum, GLsizei, GLint, GLint, GLsizei);
18422+GLAPI void APIENTRY glConvolutionFilter1D (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
18423+GLAPI void APIENTRY glConvolutionFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
18424+GLAPI void APIENTRY glConvolutionParameterf (GLenum, GLenum, GLfloat);
18425+GLAPI void APIENTRY glConvolutionParameterfv (GLenum, GLenum, const GLfloat *);
18426+GLAPI void APIENTRY glConvolutionParameteri (GLenum, GLenum, GLint);
18427+GLAPI void APIENTRY glConvolutionParameteriv (GLenum, GLenum, const GLint *);
18428+GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum, GLenum, GLint, GLint, GLsizei);
18429+GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
18430+GLAPI void APIENTRY glGetConvolutionFilter (GLenum, GLenum, GLenum, GLvoid *);
18431+GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum, GLenum, GLfloat *);
18432+GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum, GLenum, GLint *);
18433+GLAPI void APIENTRY glGetSeparableFilter (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
18434+GLAPI void APIENTRY glSeparableFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
18435+GLAPI void APIENTRY glGetHistogram (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
18436+GLAPI void APIENTRY glGetHistogramParameterfv (GLenum, GLenum, GLfloat *);
18437+GLAPI void APIENTRY glGetHistogramParameteriv (GLenum, GLenum, GLint *);
18438+GLAPI void APIENTRY glGetMinmax (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
18439+GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum, GLenum, GLfloat *);
18440+GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum, GLenum, GLint *);
18441+GLAPI void APIENTRY glHistogram (GLenum, GLsizei, GLenum, GLboolean);
18442+GLAPI void APIENTRY glMinmax (GLenum, GLenum, GLboolean);
18443+GLAPI void APIENTRY glResetHistogram (GLenum);
18444+GLAPI void APIENTRY glResetMinmax (GLenum);
18445+GLAPI void APIENTRY glTexImage3D (GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
18446+GLAPI void APIENTRY glTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
18447+GLAPI void APIENTRY glCopyTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
18448+#endif /* GL_GLEXT_PROTOTYPES */
18449+typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
18450+typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
18451+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
18452+typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
18453+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
18454+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
18455+typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
18456+typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
18457+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
18458+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18459+typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
18460+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
18461+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
18462+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
18463+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
18464+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
18465+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
18466+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
18467+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
18468+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
18469+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
18470+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
18471+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18472+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
18473+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
18474+typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
18475+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
18476+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18477+typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
18478+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
18479+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18480+typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
18481+typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
18482+typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
18483+typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
18484+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);
18485+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);
18486+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
18487+#endif
18488+
18489+#ifndef GL_VERSION_1_3
18490+#define GL_VERSION_1_3 1
18491+#ifdef GL_GLEXT_PROTOTYPES
18492+GLAPI void APIENTRY glActiveTexture (GLenum);
18493+GLAPI void APIENTRY glClientActiveTexture (GLenum);
18494+GLAPI void APIENTRY glMultiTexCoord1d (GLenum, GLdouble);
18495+GLAPI void APIENTRY glMultiTexCoord1dv (GLenum, const GLdouble *);
18496+GLAPI void APIENTRY glMultiTexCoord1f (GLenum, GLfloat);
18497+GLAPI void APIENTRY glMultiTexCoord1fv (GLenum, const GLfloat *);
18498+GLAPI void APIENTRY glMultiTexCoord1i (GLenum, GLint);
18499+GLAPI void APIENTRY glMultiTexCoord1iv (GLenum, const GLint *);
18500+GLAPI void APIENTRY glMultiTexCoord1s (GLenum, GLshort);
18501+GLAPI void APIENTRY glMultiTexCoord1sv (GLenum, const GLshort *);
18502+GLAPI void APIENTRY glMultiTexCoord2d (GLenum, GLdouble, GLdouble);
18503+GLAPI void APIENTRY glMultiTexCoord2dv (GLenum, const GLdouble *);
18504+GLAPI void APIENTRY glMultiTexCoord2f (GLenum, GLfloat, GLfloat);
18505+GLAPI void APIENTRY glMultiTexCoord2fv (GLenum, const GLfloat *);
18506+GLAPI void APIENTRY glMultiTexCoord2i (GLenum, GLint, GLint);
18507+GLAPI void APIENTRY glMultiTexCoord2iv (GLenum, const GLint *);
18508+GLAPI void APIENTRY glMultiTexCoord2s (GLenum, GLshort, GLshort);
18509+GLAPI void APIENTRY glMultiTexCoord2sv (GLenum, const GLshort *);
18510+GLAPI void APIENTRY glMultiTexCoord3d (GLenum, GLdouble, GLdouble, GLdouble);
18511+GLAPI void APIENTRY glMultiTexCoord3dv (GLenum, const GLdouble *);
18512+GLAPI void APIENTRY glMultiTexCoord3f (GLenum, GLfloat, GLfloat, GLfloat);
18513+GLAPI void APIENTRY glMultiTexCoord3fv (GLenum, const GLfloat *);
18514+GLAPI void APIENTRY glMultiTexCoord3i (GLenum, GLint, GLint, GLint);
18515+GLAPI void APIENTRY glMultiTexCoord3iv (GLenum, const GLint *);
18516+GLAPI void APIENTRY glMultiTexCoord3s (GLenum, GLshort, GLshort, GLshort);
18517+GLAPI void APIENTRY glMultiTexCoord3sv (GLenum, const GLshort *);
18518+GLAPI void APIENTRY glMultiTexCoord4d (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
18519+GLAPI void APIENTRY glMultiTexCoord4dv (GLenum, const GLdouble *);
18520+GLAPI void APIENTRY glMultiTexCoord4f (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
18521+GLAPI void APIENTRY glMultiTexCoord4fv (GLenum, const GLfloat *);
18522+GLAPI void APIENTRY glMultiTexCoord4i (GLenum, GLint, GLint, GLint, GLint);
18523+GLAPI void APIENTRY glMultiTexCoord4iv (GLenum, const GLint *);
18524+GLAPI void APIENTRY glMultiTexCoord4s (GLenum, GLshort, GLshort, GLshort, GLshort);
18525+GLAPI void APIENTRY glMultiTexCoord4sv (GLenum, const GLshort *);
18526+GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *);
18527+GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *);
18528+GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *);
18529+GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *);
18530+GLAPI void APIENTRY glSampleCoverage (GLclampf, GLboolean);
18531+GLAPI void APIENTRY glCompressedTexImage3D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
18532+GLAPI void APIENTRY glCompressedTexImage2D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
18533+GLAPI void APIENTRY glCompressedTexImage1D (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
18534+GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
18535+GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
18536+GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
18537+GLAPI void APIENTRY glGetCompressedTexImage (GLenum, GLint, GLvoid *);
18538+#endif /* GL_GLEXT_PROTOTYPES */
18539+typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
18540+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
18541+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
18542+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
18543+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
18544+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
18545+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
18546+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
18547+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
18548+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
18549+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
18550+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
18551+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
18552+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
18553+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
18554+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
18555+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
18556+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
18557+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
18558+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
18559+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
18560+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
18561+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
18562+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
18563+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
18564+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
18565+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
18566+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
18567+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
18568+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
18569+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
18570+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
18571+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
18572+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
18573+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
18574+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
18575+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
18576+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
18577+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
18578+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
18579+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
18580+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
18581+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);
18582+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
18583+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
18584+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img);
18585+#endif
18586+
18587+#ifndef GL_VERSION_1_4
18588+#define GL_VERSION_1_4 1
18589+#ifdef GL_GLEXT_PROTOTYPES
18590+GLAPI void APIENTRY glBlendFuncSeparate (GLenum, GLenum, GLenum, GLenum);
18591+GLAPI void APIENTRY glFogCoordf (GLfloat);
18592+GLAPI void APIENTRY glFogCoordfv (const GLfloat *);
18593+GLAPI void APIENTRY glFogCoordd (GLdouble);
18594+GLAPI void APIENTRY glFogCoorddv (const GLdouble *);
18595+GLAPI void APIENTRY glFogCoordPointer (GLenum, GLsizei, const GLvoid *);
18596+GLAPI void APIENTRY glMultiDrawArrays (GLenum, GLint *, GLsizei *, GLsizei);
18597+GLAPI void APIENTRY glMultiDrawElements (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
18598+GLAPI void APIENTRY glPointParameterf (GLenum, GLfloat);
18599+GLAPI void APIENTRY glPointParameterfv (GLenum, const GLfloat *);
18600+GLAPI void APIENTRY glPointParameteri (GLenum, GLint);
18601+GLAPI void APIENTRY glPointParameteriv (GLenum, const GLint *);
18602+GLAPI void APIENTRY glSecondaryColor3b (GLbyte, GLbyte, GLbyte);
18603+GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *);
18604+GLAPI void APIENTRY glSecondaryColor3d (GLdouble, GLdouble, GLdouble);
18605+GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *);
18606+GLAPI void APIENTRY glSecondaryColor3f (GLfloat, GLfloat, GLfloat);
18607+GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *);
18608+GLAPI void APIENTRY glSecondaryColor3i (GLint, GLint, GLint);
18609+GLAPI void APIENTRY glSecondaryColor3iv (const GLint *);
18610+GLAPI void APIENTRY glSecondaryColor3s (GLshort, GLshort, GLshort);
18611+GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *);
18612+GLAPI void APIENTRY glSecondaryColor3ub (GLubyte, GLubyte, GLubyte);
18613+GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *);
18614+GLAPI void APIENTRY glSecondaryColor3ui (GLuint, GLuint, GLuint);
18615+GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *);
18616+GLAPI void APIENTRY glSecondaryColor3us (GLushort, GLushort, GLushort);
18617+GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *);
18618+GLAPI void APIENTRY glSecondaryColorPointer (GLint, GLenum, GLsizei, const GLvoid *);
18619+GLAPI void APIENTRY glWindowPos2d (GLdouble, GLdouble);
18620+GLAPI void APIENTRY glWindowPos2dv (const GLdouble *);
18621+GLAPI void APIENTRY glWindowPos2f (GLfloat, GLfloat);
18622+GLAPI void APIENTRY glWindowPos2fv (const GLfloat *);
18623+GLAPI void APIENTRY glWindowPos2i (GLint, GLint);
18624+GLAPI void APIENTRY glWindowPos2iv (const GLint *);
18625+GLAPI void APIENTRY glWindowPos2s (GLshort, GLshort);
18626+GLAPI void APIENTRY glWindowPos2sv (const GLshort *);
18627+GLAPI void APIENTRY glWindowPos3d (GLdouble, GLdouble, GLdouble);
18628+GLAPI void APIENTRY glWindowPos3dv (const GLdouble *);
18629+GLAPI void APIENTRY glWindowPos3f (GLfloat, GLfloat, GLfloat);
18630+GLAPI void APIENTRY glWindowPos3fv (const GLfloat *);
18631+GLAPI void APIENTRY glWindowPos3i (GLint, GLint, GLint);
18632+GLAPI void APIENTRY glWindowPos3iv (const GLint *);
18633+GLAPI void APIENTRY glWindowPos3s (GLshort, GLshort, GLshort);
18634+GLAPI void APIENTRY glWindowPos3sv (const GLshort *);
18635+#endif /* GL_GLEXT_PROTOTYPES */
18636+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
18637+typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord);
18638+typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord);
18639+typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord);
18640+typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord);
18641+typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
18642+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
18643+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
18644+typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);
18645+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params);
18646+typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param);
18647+typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params);
18648+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue);
18649+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v);
18650+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue);
18651+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v);
18652+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue);
18653+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v);
18654+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue);
18655+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v);
18656+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue);
18657+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v);
18658+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue);
18659+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v);
18660+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue);
18661+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v);
18662+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue);
18663+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v);
18664+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
18665+typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y);
18666+typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v);
18667+typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y);
18668+typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v);
18669+typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y);
18670+typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v);
18671+typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y);
18672+typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v);
18673+typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z);
18674+typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v);
18675+typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z);
18676+typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v);
18677+typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z);
18678+typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v);
18679+typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z);
18680+typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v);
18681+#endif
18682+
18683+#ifndef GL_VERSION_1_5
18684+#define GL_VERSION_1_5 1
18685+#ifdef GL_GLEXT_PROTOTYPES
18686+GLAPI void APIENTRY glGenQueries (GLsizei, GLuint *);
18687+GLAPI void APIENTRY glDeleteQueries (GLsizei, const GLuint *);
18688+GLAPI GLboolean APIENTRY glIsQuery (GLuint);
18689+GLAPI void APIENTRY glBeginQuery (GLenum, GLuint);
18690+GLAPI void APIENTRY glEndQuery (GLenum);
18691+GLAPI void APIENTRY glGetQueryiv (GLenum, GLenum, GLint *);
18692+GLAPI void APIENTRY glGetQueryObjectiv (GLuint, GLenum, GLint *);
18693+GLAPI void APIENTRY glGetQueryObjectuiv (GLuint, GLenum, GLuint *);
18694+GLAPI void APIENTRY glBindBuffer (GLenum, GLuint);
18695+GLAPI void APIENTRY glDeleteBuffers (GLsizei, const GLuint *);
18696+GLAPI void APIENTRY glGenBuffers (GLsizei, GLuint *);
18697+GLAPI GLboolean APIENTRY glIsBuffer (GLuint);
18698+GLAPI void APIENTRY glBufferData (GLenum, GLsizeiptr, const GLvoid *, GLenum);
18699+GLAPI void APIENTRY glBufferSubData (GLenum, GLintptr, GLsizeiptr, const GLvoid *);
18700+GLAPI void APIENTRY glGetBufferSubData (GLenum, GLintptr, GLsizeiptr, GLvoid *);
18701+GLAPI GLvoid* APIENTRY glMapBuffer (GLenum, GLenum);
18702+GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum);
18703+GLAPI void APIENTRY glGetBufferParameteriv (GLenum, GLenum, GLint *);
18704+GLAPI void APIENTRY glGetBufferPointerv (GLenum, GLenum, GLvoid* *);
18705+#endif /* GL_GLEXT_PROTOTYPES */
18706+typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids);
18707+typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids);
18708+typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id);
18709+typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);
18710+typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target);
18711+typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params);
18712+typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params);
18713+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params);
18714+typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
18715+typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
18716+typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
18717+typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);
18718+typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
18719+typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
18720+typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data);
18721+typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
18722+typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target);
18723+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
18724+typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params);
18725+#endif
18726+
18727+#ifndef GL_VERSION_2_0
18728+#define GL_VERSION_2_0 1
18729+#ifdef GL_GLEXT_PROTOTYPES
18730+GLAPI void APIENTRY glBlendEquationSeparate (GLenum, GLenum);
18731+GLAPI void APIENTRY glDrawBuffers (GLsizei, const GLenum *);
18732+GLAPI void APIENTRY glStencilOpSeparate (GLenum, GLenum, GLenum, GLenum);
18733+GLAPI void APIENTRY glStencilFuncSeparate (GLenum, GLenum, GLint, GLuint);
18734+GLAPI void APIENTRY glStencilMaskSeparate (GLenum, GLuint);
18735+GLAPI void APIENTRY glAttachShader (GLuint, GLuint);
18736+GLAPI void APIENTRY glBindAttribLocation (GLuint, GLuint, const GLchar *);
18737+GLAPI void APIENTRY glCompileShader (GLuint);
18738+GLAPI GLuint APIENTRY glCreateProgram (void);
18739+GLAPI GLuint APIENTRY glCreateShader (GLenum);
18740+GLAPI void APIENTRY glDeleteProgram (GLuint);
18741+GLAPI void APIENTRY glDeleteShader (GLuint);
18742+GLAPI void APIENTRY glDetachShader (GLuint, GLuint);
18743+GLAPI void APIENTRY glDisableVertexAttribArray (GLuint);
18744+GLAPI void APIENTRY glEnableVertexAttribArray (GLuint);
18745+GLAPI void APIENTRY glGetActiveAttrib (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
18746+GLAPI void APIENTRY glGetActiveUniform (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
18747+GLAPI void APIENTRY glGetAttachedShaders (GLuint, GLsizei, GLsizei *, GLuint *);
18748+GLAPI GLint APIENTRY glGetAttribLocation (GLuint, const GLchar *);
18749+GLAPI void APIENTRY glGetProgramiv (GLuint, GLenum, GLint *);
18750+GLAPI void APIENTRY glGetProgramInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
18751+GLAPI void APIENTRY glGetShaderiv (GLuint, GLenum, GLint *);
18752+GLAPI void APIENTRY glGetShaderInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
18753+GLAPI void APIENTRY glGetShaderSource (GLuint, GLsizei, GLsizei *, GLchar *);
18754+GLAPI GLint APIENTRY glGetUniformLocation (GLuint, const GLchar *);
18755+GLAPI void APIENTRY glGetUniformfv (GLuint, GLint, GLfloat *);
18756+GLAPI void APIENTRY glGetUniformiv (GLuint, GLint, GLint *);
18757+GLAPI void APIENTRY glGetVertexAttribdv (GLuint, GLenum, GLdouble *);
18758+GLAPI void APIENTRY glGetVertexAttribfv (GLuint, GLenum, GLfloat *);
18759+GLAPI void APIENTRY glGetVertexAttribiv (GLuint, GLenum, GLint *);
18760+GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint, GLenum, GLvoid* *);
18761+GLAPI GLboolean APIENTRY glIsProgram (GLuint);
18762+GLAPI GLboolean APIENTRY glIsShader (GLuint);
18763+GLAPI void APIENTRY glLinkProgram (GLuint);
18764+GLAPI void APIENTRY glShaderSource (GLuint, GLsizei, const GLchar* *, const GLint *);
18765+GLAPI void APIENTRY glUseProgram (GLuint);
18766+GLAPI void APIENTRY glUniform1f (GLint, GLfloat);
18767+GLAPI void APIENTRY glUniform2f (GLint, GLfloat, GLfloat);
18768+GLAPI void APIENTRY glUniform3f (GLint, GLfloat, GLfloat, GLfloat);
18769+GLAPI void APIENTRY glUniform4f (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
18770+GLAPI void APIENTRY glUniform1i (GLint, GLint);
18771+GLAPI void APIENTRY glUniform2i (GLint, GLint, GLint);
18772+GLAPI void APIENTRY glUniform3i (GLint, GLint, GLint, GLint);
18773+GLAPI void APIENTRY glUniform4i (GLint, GLint, GLint, GLint, GLint);
18774+GLAPI void APIENTRY glUniform1fv (GLint, GLsizei, const GLfloat *);
18775+GLAPI void APIENTRY glUniform2fv (GLint, GLsizei, const GLfloat *);
18776+GLAPI void APIENTRY glUniform3fv (GLint, GLsizei, const GLfloat *);
18777+GLAPI void APIENTRY glUniform4fv (GLint, GLsizei, const GLfloat *);
18778+GLAPI void APIENTRY glUniform1iv (GLint, GLsizei, const GLint *);
18779+GLAPI void APIENTRY glUniform2iv (GLint, GLsizei, const GLint *);
18780+GLAPI void APIENTRY glUniform3iv (GLint, GLsizei, const GLint *);
18781+GLAPI void APIENTRY glUniform4iv (GLint, GLsizei, const GLint *);
18782+GLAPI void APIENTRY glUniformMatrix2fv (GLint, GLsizei, GLboolean, const GLfloat *);
18783+GLAPI void APIENTRY glUniformMatrix3fv (GLint, GLsizei, GLboolean, const GLfloat *);
18784+GLAPI void APIENTRY glUniformMatrix4fv (GLint, GLsizei, GLboolean, const GLfloat *);
18785+GLAPI void APIENTRY glValidateProgram (GLuint);
18786+GLAPI void APIENTRY glVertexAttrib1d (GLuint, GLdouble);
18787+GLAPI void APIENTRY glVertexAttrib1dv (GLuint, const GLdouble *);
18788+GLAPI void APIENTRY glVertexAttrib1f (GLuint, GLfloat);
18789+GLAPI void APIENTRY glVertexAttrib1fv (GLuint, const GLfloat *);
18790+GLAPI void APIENTRY glVertexAttrib1s (GLuint, GLshort);
18791+GLAPI void APIENTRY glVertexAttrib1sv (GLuint, const GLshort *);
18792+GLAPI void APIENTRY glVertexAttrib2d (GLuint, GLdouble, GLdouble);
18793+GLAPI void APIENTRY glVertexAttrib2dv (GLuint, const GLdouble *);
18794+GLAPI void APIENTRY glVertexAttrib2f (GLuint, GLfloat, GLfloat);
18795+GLAPI void APIENTRY glVertexAttrib2fv (GLuint, const GLfloat *);
18796+GLAPI void APIENTRY glVertexAttrib2s (GLuint, GLshort, GLshort);
18797+GLAPI void APIENTRY glVertexAttrib2sv (GLuint, const GLshort *);
18798+GLAPI void APIENTRY glVertexAttrib3d (GLuint, GLdouble, GLdouble, GLdouble);
18799+GLAPI void APIENTRY glVertexAttrib3dv (GLuint, const GLdouble *);
18800+GLAPI void APIENTRY glVertexAttrib3f (GLuint, GLfloat, GLfloat, GLfloat);
18801+GLAPI void APIENTRY glVertexAttrib3fv (GLuint, const GLfloat *);
18802+GLAPI void APIENTRY glVertexAttrib3s (GLuint, GLshort, GLshort, GLshort);
18803+GLAPI void APIENTRY glVertexAttrib3sv (GLuint, const GLshort *);
18804+GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint, const GLbyte *);
18805+GLAPI void APIENTRY glVertexAttrib4Niv (GLuint, const GLint *);
18806+GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint, const GLshort *);
18807+GLAPI void APIENTRY glVertexAttrib4Nub (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
18808+GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint, const GLubyte *);
18809+GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint, const GLuint *);
18810+GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint, const GLushort *);
18811+GLAPI void APIENTRY glVertexAttrib4bv (GLuint, const GLbyte *);
18812+GLAPI void APIENTRY glVertexAttrib4d (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
18813+GLAPI void APIENTRY glVertexAttrib4dv (GLuint, const GLdouble *);
18814+GLAPI void APIENTRY glVertexAttrib4f (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
18815+GLAPI void APIENTRY glVertexAttrib4fv (GLuint, const GLfloat *);
18816+GLAPI void APIENTRY glVertexAttrib4iv (GLuint, const GLint *);
18817+GLAPI void APIENTRY glVertexAttrib4s (GLuint, GLshort, GLshort, GLshort, GLshort);
18818+GLAPI void APIENTRY glVertexAttrib4sv (GLuint, const GLshort *);
18819+GLAPI void APIENTRY glVertexAttrib4ubv (GLuint, const GLubyte *);
18820+GLAPI void APIENTRY glVertexAttrib4uiv (GLuint, const GLuint *);
18821+GLAPI void APIENTRY glVertexAttrib4usv (GLuint, const GLushort *);
18822+GLAPI void APIENTRY glVertexAttribPointer (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
18823+#endif /* GL_GLEXT_PROTOTYPES */
18824+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
18825+typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs);
18826+typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
18827+typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
18828+typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
18829+typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
18830+typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
18831+typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
18832+typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
18833+typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
18834+typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
18835+typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
18836+typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
18837+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
18838+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
18839+typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
18840+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
18841+typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj);
18842+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
18843+typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
18844+typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
18845+typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
18846+typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
18847+typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
18848+typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
18849+typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
18850+typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
18851+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params);
18852+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
18853+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
18854+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
18855+typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
18856+typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
18857+typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
18858+typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length);
18859+typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
18860+typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
18861+typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
18862+typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
18863+typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
18864+typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
18865+typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
18866+typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
18867+typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
18868+typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18869+typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18870+typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18871+typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
18872+typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
18873+typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
18874+typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
18875+typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
18876+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18877+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18878+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18879+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
18880+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);
18881+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v);
18882+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
18883+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
18884+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);
18885+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v);
18886+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);
18887+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v);
18888+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
18889+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
18890+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);
18891+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v);
18892+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
18893+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v);
18894+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
18895+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
18896+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
18897+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v);
18898+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v);
18899+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v);
18900+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v);
18901+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
18902+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v);
18903+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v);
18904+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v);
18905+typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v);
18906+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
18907+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v);
18908+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
18909+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
18910+typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v);
18911+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
18912+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v);
18913+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v);
18914+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v);
18915+typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v);
18916+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
18917+#endif
18918+
18919+#ifndef GL_VERSION_2_1
18920+#define GL_VERSION_2_1 1
18921+#ifdef GL_GLEXT_PROTOTYPES
18922+GLAPI void APIENTRY glUniformMatrix2x3fv (GLint, GLsizei, GLboolean, const GLfloat *);
18923+GLAPI void APIENTRY glUniformMatrix3x2fv (GLint, GLsizei, GLboolean, const GLfloat *);
18924+GLAPI void APIENTRY glUniformMatrix2x4fv (GLint, GLsizei, GLboolean, const GLfloat *);
18925+GLAPI void APIENTRY glUniformMatrix4x2fv (GLint, GLsizei, GLboolean, const GLfloat *);
18926+GLAPI void APIENTRY glUniformMatrix3x4fv (GLint, GLsizei, GLboolean, const GLfloat *);
18927+GLAPI void APIENTRY glUniformMatrix4x3fv (GLint, GLsizei, GLboolean, const GLfloat *);
18928+#endif /* GL_GLEXT_PROTOTYPES */
18929+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18930+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18931+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18932+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18933+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18934+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
18935+#endif
18936+
18937+#ifndef GL_ARB_multitexture
18938+#define GL_ARB_multitexture 1
18939+#ifdef GL_GLEXT_PROTOTYPES
18940+GLAPI void APIENTRY glActiveTextureARB (GLenum);
18941+GLAPI void APIENTRY glClientActiveTextureARB (GLenum);
18942+GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum, GLdouble);
18943+GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum, const GLdouble *);
18944+GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum, GLfloat);
18945+GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum, const GLfloat *);
18946+GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum, GLint);
18947+GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum, const GLint *);
18948+GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum, GLshort);
18949+GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum, const GLshort *);
18950+GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum, GLdouble, GLdouble);
18951+GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum, const GLdouble *);
18952+GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum, GLfloat, GLfloat);
18953+GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum, const GLfloat *);
18954+GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum, GLint, GLint);
18955+GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum, const GLint *);
18956+GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum, GLshort, GLshort);
18957+GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum, const GLshort *);
18958+GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum, GLdouble, GLdouble, GLdouble);
18959+GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum, const GLdouble *);
18960+GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum, GLfloat, GLfloat, GLfloat);
18961+GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum, const GLfloat *);
18962+GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum, GLint, GLint, GLint);
18963+GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum, const GLint *);
18964+GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum, GLshort, GLshort, GLshort);
18965+GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum, const GLshort *);
18966+GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
18967+GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum, const GLdouble *);
18968+GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
18969+GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum, const GLfloat *);
18970+GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum, GLint, GLint, GLint, GLint);
18971+GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum, const GLint *);
18972+GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum, GLshort, GLshort, GLshort, GLshort);
18973+GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum, const GLshort *);
18974+#endif /* GL_GLEXT_PROTOTYPES */
18975+typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
18976+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
18977+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
18978+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
18979+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
18980+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
18981+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
18982+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
18983+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
18984+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
18985+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
18986+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
18987+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
18988+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
18989+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
18990+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
18991+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
18992+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
18993+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
18994+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
18995+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
18996+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
18997+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
18998+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
18999+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
19000+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
19001+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
19002+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
19003+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
19004+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
19005+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
19006+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
19007+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
19008+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
19009+#endif
19010+
19011+#ifndef GL_ARB_transpose_matrix
19012+#define GL_ARB_transpose_matrix 1
19013+#ifdef GL_GLEXT_PROTOTYPES
19014+GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *);
19015+GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *);
19016+GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *);
19017+GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *);
19018+#endif /* GL_GLEXT_PROTOTYPES */
19019+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
19020+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
19021+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
19022+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
19023+#endif
19024+
19025+#ifndef GL_ARB_multisample
19026+#define GL_ARB_multisample 1
19027+#ifdef GL_GLEXT_PROTOTYPES
19028+GLAPI void APIENTRY glSampleCoverageARB (GLclampf, GLboolean);
19029+#endif /* GL_GLEXT_PROTOTYPES */
19030+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert);
19031+#endif
19032+
19033+#ifndef GL_ARB_texture_env_add
19034+#define GL_ARB_texture_env_add 1
19035+#endif
19036+
19037+#ifndef GL_ARB_texture_cube_map
19038+#define GL_ARB_texture_cube_map 1
19039+#endif
19040+
19041+#ifndef GL_ARB_texture_compression
19042+#define GL_ARB_texture_compression 1
19043+#ifdef GL_GLEXT_PROTOTYPES
19044+GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
19045+GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
19046+GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
19047+GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
19048+GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
19049+GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
19050+GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum, GLint, GLvoid *);
19051+#endif /* GL_GLEXT_PROTOTYPES */
19052+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
19053+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
19054+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
19055+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);
19056+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
19057+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
19058+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid *img);
19059+#endif
19060+
19061+#ifndef GL_ARB_texture_border_clamp
19062+#define GL_ARB_texture_border_clamp 1
19063+#endif
19064+
19065+#ifndef GL_ARB_point_parameters
19066+#define GL_ARB_point_parameters 1
19067+#ifdef GL_GLEXT_PROTOTYPES
19068+GLAPI void APIENTRY glPointParameterfARB (GLenum, GLfloat);
19069+GLAPI void APIENTRY glPointParameterfvARB (GLenum, const GLfloat *);
19070+#endif /* GL_GLEXT_PROTOTYPES */
19071+typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param);
19072+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params);
19073+#endif
19074+
19075+#ifndef GL_ARB_vertex_blend
19076+#define GL_ARB_vertex_blend 1
19077+#ifdef GL_GLEXT_PROTOTYPES
19078+GLAPI void APIENTRY glWeightbvARB (GLint, const GLbyte *);
19079+GLAPI void APIENTRY glWeightsvARB (GLint, const GLshort *);
19080+GLAPI void APIENTRY glWeightivARB (GLint, const GLint *);
19081+GLAPI void APIENTRY glWeightfvARB (GLint, const GLfloat *);
19082+GLAPI void APIENTRY glWeightdvARB (GLint, const GLdouble *);
19083+GLAPI void APIENTRY glWeightubvARB (GLint, const GLubyte *);
19084+GLAPI void APIENTRY glWeightusvARB (GLint, const GLushort *);
19085+GLAPI void APIENTRY glWeightuivARB (GLint, const GLuint *);
19086+GLAPI void APIENTRY glWeightPointerARB (GLint, GLenum, GLsizei, const GLvoid *);
19087+GLAPI void APIENTRY glVertexBlendARB (GLint);
19088+#endif /* GL_GLEXT_PROTOTYPES */
19089+typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights);
19090+typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights);
19091+typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights);
19092+typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights);
19093+typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights);
19094+typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights);
19095+typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights);
19096+typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights);
19097+typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
19098+typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count);
19099+#endif
19100+
19101+#ifndef GL_ARB_matrix_palette
19102+#define GL_ARB_matrix_palette 1
19103+#ifdef GL_GLEXT_PROTOTYPES
19104+GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint);
19105+GLAPI void APIENTRY glMatrixIndexubvARB (GLint, const GLubyte *);
19106+GLAPI void APIENTRY glMatrixIndexusvARB (GLint, const GLushort *);
19107+GLAPI void APIENTRY glMatrixIndexuivARB (GLint, const GLuint *);
19108+GLAPI void APIENTRY glMatrixIndexPointerARB (GLint, GLenum, GLsizei, const GLvoid *);
19109+#endif /* GL_GLEXT_PROTOTYPES */
19110+typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index);
19111+typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices);
19112+typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices);
19113+typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices);
19114+typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
19115+#endif
19116+
19117+#ifndef GL_ARB_texture_env_combine
19118+#define GL_ARB_texture_env_combine 1
19119+#endif
19120+
19121+#ifndef GL_ARB_texture_env_crossbar
19122+#define GL_ARB_texture_env_crossbar 1
19123+#endif
19124+
19125+#ifndef GL_ARB_texture_env_dot3
19126+#define GL_ARB_texture_env_dot3 1
19127+#endif
19128+
19129+#ifndef GL_ARB_texture_mirrored_repeat
19130+#define GL_ARB_texture_mirrored_repeat 1
19131+#endif
19132+
19133+#ifndef GL_ARB_depth_texture
19134+#define GL_ARB_depth_texture 1
19135+#endif
19136+
19137+#ifndef GL_ARB_shadow
19138+#define GL_ARB_shadow 1
19139+#endif
19140+
19141+#ifndef GL_ARB_shadow_ambient
19142+#define GL_ARB_shadow_ambient 1
19143+#endif
19144+
19145+#ifndef GL_ARB_window_pos
19146+#define GL_ARB_window_pos 1
19147+#ifdef GL_GLEXT_PROTOTYPES
19148+GLAPI void APIENTRY glWindowPos2dARB (GLdouble, GLdouble);
19149+GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *);
19150+GLAPI void APIENTRY glWindowPos2fARB (GLfloat, GLfloat);
19151+GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *);
19152+GLAPI void APIENTRY glWindowPos2iARB (GLint, GLint);
19153+GLAPI void APIENTRY glWindowPos2ivARB (const GLint *);
19154+GLAPI void APIENTRY glWindowPos2sARB (GLshort, GLshort);
19155+GLAPI void APIENTRY glWindowPos2svARB (const GLshort *);
19156+GLAPI void APIENTRY glWindowPos3dARB (GLdouble, GLdouble, GLdouble);
19157+GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *);
19158+GLAPI void APIENTRY glWindowPos3fARB (GLfloat, GLfloat, GLfloat);
19159+GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *);
19160+GLAPI void APIENTRY glWindowPos3iARB (GLint, GLint, GLint);
19161+GLAPI void APIENTRY glWindowPos3ivARB (const GLint *);
19162+GLAPI void APIENTRY glWindowPos3sARB (GLshort, GLshort, GLshort);
19163+GLAPI void APIENTRY glWindowPos3svARB (const GLshort *);
19164+#endif /* GL_GLEXT_PROTOTYPES */
19165+typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y);
19166+typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v);
19167+typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y);
19168+typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v);
19169+typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y);
19170+typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v);
19171+typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y);
19172+typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v);
19173+typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z);
19174+typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v);
19175+typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z);
19176+typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v);
19177+typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z);
19178+typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v);
19179+typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z);
19180+typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v);
19181+#endif
19182+
19183+#ifndef GL_ARB_vertex_program
19184+#define GL_ARB_vertex_program 1
19185+#ifdef GL_GLEXT_PROTOTYPES
19186+GLAPI void APIENTRY glVertexAttrib1dARB (GLuint, GLdouble);
19187+GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint, const GLdouble *);
19188+GLAPI void APIENTRY glVertexAttrib1fARB (GLuint, GLfloat);
19189+GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint, const GLfloat *);
19190+GLAPI void APIENTRY glVertexAttrib1sARB (GLuint, GLshort);
19191+GLAPI void APIENTRY glVertexAttrib1svARB (GLuint, const GLshort *);
19192+GLAPI void APIENTRY glVertexAttrib2dARB (GLuint, GLdouble, GLdouble);
19193+GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint, const GLdouble *);
19194+GLAPI void APIENTRY glVertexAttrib2fARB (GLuint, GLfloat, GLfloat);
19195+GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint, const GLfloat *);
19196+GLAPI void APIENTRY glVertexAttrib2sARB (GLuint, GLshort, GLshort);
19197+GLAPI void APIENTRY glVertexAttrib2svARB (GLuint, const GLshort *);
19198+GLAPI void APIENTRY glVertexAttrib3dARB (GLuint, GLdouble, GLdouble, GLdouble);
19199+GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint, const GLdouble *);
19200+GLAPI void APIENTRY glVertexAttrib3fARB (GLuint, GLfloat, GLfloat, GLfloat);
19201+GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint, const GLfloat *);
19202+GLAPI void APIENTRY glVertexAttrib3sARB (GLuint, GLshort, GLshort, GLshort);
19203+GLAPI void APIENTRY glVertexAttrib3svARB (GLuint, const GLshort *);
19204+GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint, const GLbyte *);
19205+GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint, const GLint *);
19206+GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint, const GLshort *);
19207+GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
19208+GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint, const GLubyte *);
19209+GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint, const GLuint *);
19210+GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint, const GLushort *);
19211+GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint, const GLbyte *);
19212+GLAPI void APIENTRY glVertexAttrib4dARB (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
19213+GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint, const GLdouble *);
19214+GLAPI void APIENTRY glVertexAttrib4fARB (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
19215+GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint, const GLfloat *);
19216+GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint, const GLint *);
19217+GLAPI void APIENTRY glVertexAttrib4sARB (GLuint, GLshort, GLshort, GLshort, GLshort);
19218+GLAPI void APIENTRY glVertexAttrib4svARB (GLuint, const GLshort *);
19219+GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint, const GLubyte *);
19220+GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint, const GLuint *);
19221+GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint, const GLushort *);
19222+GLAPI void APIENTRY glVertexAttribPointerARB (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
19223+GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint);
19224+GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint);
19225+GLAPI void APIENTRY glProgramStringARB (GLenum, GLenum, GLsizei, const GLvoid *);
19226+GLAPI void APIENTRY glBindProgramARB (GLenum, GLuint);
19227+GLAPI void APIENTRY glDeleteProgramsARB (GLsizei, const GLuint *);
19228+GLAPI void APIENTRY glGenProgramsARB (GLsizei, GLuint *);
19229+GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
19230+GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum, GLuint, const GLdouble *);
19231+GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
19232+GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum, GLuint, const GLfloat *);
19233+GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
19234+GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum, GLuint, const GLdouble *);
19235+GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
19236+GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum, GLuint, const GLfloat *);
19237+GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum, GLuint, GLdouble *);
19238+GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum, GLuint, GLfloat *);
19239+GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum, GLuint, GLdouble *);
19240+GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum, GLuint, GLfloat *);
19241+GLAPI void APIENTRY glGetProgramivARB (GLenum, GLenum, GLint *);
19242+GLAPI void APIENTRY glGetProgramStringARB (GLenum, GLenum, GLvoid *);
19243+GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint, GLenum, GLdouble *);
19244+GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint, GLenum, GLfloat *);
19245+GLAPI void APIENTRY glGetVertexAttribivARB (GLuint, GLenum, GLint *);
19246+GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint, GLenum, GLvoid* *);
19247+GLAPI GLboolean APIENTRY glIsProgramARB (GLuint);
19248+#endif /* GL_GLEXT_PROTOTYPES */
19249+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x);
19250+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v);
19251+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);
19252+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v);
19253+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x);
19254+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v);
19255+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y);
19256+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v);
19257+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);
19258+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v);
19259+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y);
19260+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v);
19261+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
19262+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v);
19263+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
19264+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v);
19265+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
19266+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v);
19267+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v);
19268+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v);
19269+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v);
19270+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
19271+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v);
19272+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v);
19273+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v);
19274+typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v);
19275+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
19276+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v);
19277+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
19278+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v);
19279+typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v);
19280+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
19281+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v);
19282+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v);
19283+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v);
19284+typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v);
19285+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
19286+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
19287+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
19288+typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string);
19289+typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program);
19290+typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs);
19291+typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs);
19292+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
19293+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
19294+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
19295+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
19296+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
19297+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
19298+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
19299+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
19300+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
19301+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
19302+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
19303+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
19304+typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);
19305+typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string);
19306+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params);
19307+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params);
19308+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params);
19309+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
19310+typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program);
19311+#endif
19312+
19313+#ifndef GL_ARB_fragment_program
19314+#define GL_ARB_fragment_program 1
19315+/* All ARB_fragment_program entry points are shared with ARB_vertex_program. */
19316+#endif
19317+
19318+#ifndef GL_ARB_vertex_buffer_object
19319+#define GL_ARB_vertex_buffer_object 1
19320+#ifdef GL_GLEXT_PROTOTYPES
19321+GLAPI void APIENTRY glBindBufferARB (GLenum, GLuint);
19322+GLAPI void APIENTRY glDeleteBuffersARB (GLsizei, const GLuint *);
19323+GLAPI void APIENTRY glGenBuffersARB (GLsizei, GLuint *);
19324+GLAPI GLboolean APIENTRY glIsBufferARB (GLuint);
19325+GLAPI void APIENTRY glBufferDataARB (GLenum, GLsizeiptrARB, const GLvoid *, GLenum);
19326+GLAPI void APIENTRY glBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *);
19327+GLAPI void APIENTRY glGetBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *);
19328+GLAPI GLvoid* APIENTRY glMapBufferARB (GLenum, GLenum);
19329+GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum);
19330+GLAPI void APIENTRY glGetBufferParameterivARB (GLenum, GLenum, GLint *);
19331+GLAPI void APIENTRY glGetBufferPointervARB (GLenum, GLenum, GLvoid* *);
19332+#endif /* GL_GLEXT_PROTOTYPES */
19333+typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
19334+typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers);
19335+typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers);
19336+typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer);
19337+typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage);
19338+typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data);
19339+typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data);
19340+typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);
19341+typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target);
19342+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params);
19343+typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params);
19344+#endif
19345+
19346+#ifndef GL_ARB_occlusion_query
19347+#define GL_ARB_occlusion_query 1
19348+#ifdef GL_GLEXT_PROTOTYPES
19349+GLAPI void APIENTRY glGenQueriesARB (GLsizei, GLuint *);
19350+GLAPI void APIENTRY glDeleteQueriesARB (GLsizei, const GLuint *);
19351+GLAPI GLboolean APIENTRY glIsQueryARB (GLuint);
19352+GLAPI void APIENTRY glBeginQueryARB (GLenum, GLuint);
19353+GLAPI void APIENTRY glEndQueryARB (GLenum);
19354+GLAPI void APIENTRY glGetQueryivARB (GLenum, GLenum, GLint *);
19355+GLAPI void APIENTRY glGetQueryObjectivARB (GLuint, GLenum, GLint *);
19356+GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint, GLenum, GLuint *);
19357+#endif /* GL_GLEXT_PROTOTYPES */
19358+typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids);
19359+typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids);
19360+typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id);
19361+typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id);
19362+typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target);
19363+typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params);
19364+typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params);
19365+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params);
19366+#endif
19367+
19368+#ifndef GL_ARB_shader_objects
19369+#define GL_ARB_shader_objects 1
19370+#ifdef GL_GLEXT_PROTOTYPES
19371+GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB);
19372+GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum);
19373+GLAPI void APIENTRY glDetachObjectARB (GLhandleARB, GLhandleARB);
19374+GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum);
19375+GLAPI void APIENTRY glShaderSourceARB (GLhandleARB, GLsizei, const GLcharARB* *, const GLint *);
19376+GLAPI void APIENTRY glCompileShaderARB (GLhandleARB);
19377+GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void);
19378+GLAPI void APIENTRY glAttachObjectARB (GLhandleARB, GLhandleARB);
19379+GLAPI void APIENTRY glLinkProgramARB (GLhandleARB);
19380+GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB);
19381+GLAPI void APIENTRY glValidateProgramARB (GLhandleARB);
19382+GLAPI void APIENTRY glUniform1fARB (GLint, GLfloat);
19383+GLAPI void APIENTRY glUniform2fARB (GLint, GLfloat, GLfloat);
19384+GLAPI void APIENTRY glUniform3fARB (GLint, GLfloat, GLfloat, GLfloat);
19385+GLAPI void APIENTRY glUniform4fARB (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
19386+GLAPI void APIENTRY glUniform1iARB (GLint, GLint);
19387+GLAPI void APIENTRY glUniform2iARB (GLint, GLint, GLint);
19388+GLAPI void APIENTRY glUniform3iARB (GLint, GLint, GLint, GLint);
19389+GLAPI void APIENTRY glUniform4iARB (GLint, GLint, GLint, GLint, GLint);
19390+GLAPI void APIENTRY glUniform1fvARB (GLint, GLsizei, const GLfloat *);
19391+GLAPI void APIENTRY glUniform2fvARB (GLint, GLsizei, const GLfloat *);
19392+GLAPI void APIENTRY glUniform3fvARB (GLint, GLsizei, const GLfloat *);
19393+GLAPI void APIENTRY glUniform4fvARB (GLint, GLsizei, const GLfloat *);
19394+GLAPI void APIENTRY glUniform1ivARB (GLint, GLsizei, const GLint *);
19395+GLAPI void APIENTRY glUniform2ivARB (GLint, GLsizei, const GLint *);
19396+GLAPI void APIENTRY glUniform3ivARB (GLint, GLsizei, const GLint *);
19397+GLAPI void APIENTRY glUniform4ivARB (GLint, GLsizei, const GLint *);
19398+GLAPI void APIENTRY glUniformMatrix2fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
19399+GLAPI void APIENTRY glUniformMatrix3fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
19400+GLAPI void APIENTRY glUniformMatrix4fvARB (GLint, GLsizei, GLboolean, const GLfloat *);
19401+GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB, GLenum, GLfloat *);
19402+GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB, GLenum, GLint *);
19403+GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
19404+GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB, GLsizei, GLsizei *, GLhandleARB *);
19405+GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB, const GLcharARB *);
19406+GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
19407+GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB, GLint, GLfloat *);
19408+GLAPI void APIENTRY glGetUniformivARB (GLhandleARB, GLint, GLint *);
19409+GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
19410+#endif /* GL_GLEXT_PROTOTYPES */
19411+typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj);
19412+typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname);
19413+typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj);
19414+typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType);
19415+typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length);
19416+typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj);
19417+typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void);
19418+typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj);
19419+typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj);
19420+typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj);
19421+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj);
19422+typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0);
19423+typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1);
19424+typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
19425+typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
19426+typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0);
19427+typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1);
19428+typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2);
19429+typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
19430+typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
19431+typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
19432+typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
19433+typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
19434+typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value);
19435+typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value);
19436+typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value);
19437+typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value);
19438+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
19439+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
19440+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
19441+typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params);
19442+typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params);
19443+typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
19444+typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
19445+typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
19446+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
19447+typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params);
19448+typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params);
19449+typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
19450+#endif
19451+
19452+#ifndef GL_ARB_vertex_shader
19453+#define GL_ARB_vertex_shader 1
19454+#ifdef GL_GLEXT_PROTOTYPES
19455+GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB, GLuint, const GLcharARB *);
19456+GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
19457+GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB, const GLcharARB *);
19458+#endif /* GL_GLEXT_PROTOTYPES */
19459+typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name);
19460+typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
19461+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
19462+#endif
19463+
19464+#ifndef GL_ARB_fragment_shader
19465+#define GL_ARB_fragment_shader 1
19466+#endif
19467+
19468+#ifndef GL_ARB_shading_language_100
19469+#define GL_ARB_shading_language_100 1
19470+#endif
19471+
19472+#ifndef GL_ARB_texture_non_power_of_two
19473+#define GL_ARB_texture_non_power_of_two 1
19474+#endif
19475+
19476+#ifndef GL_ARB_point_sprite
19477+#define GL_ARB_point_sprite 1
19478+#endif
19479+
19480+#ifndef GL_ARB_fragment_program_shadow
19481+#define GL_ARB_fragment_program_shadow 1
19482+#endif
19483+
19484+#ifndef GL_ARB_draw_buffers
19485+#define GL_ARB_draw_buffers 1
19486+#ifdef GL_GLEXT_PROTOTYPES
19487+GLAPI void APIENTRY glDrawBuffersARB (GLsizei, const GLenum *);
19488+#endif /* GL_GLEXT_PROTOTYPES */
19489+typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs);
19490+#endif
19491+
19492+#ifndef GL_ARB_texture_rectangle
19493+#define GL_ARB_texture_rectangle 1
19494+#endif
19495+
19496+#ifndef GL_ARB_color_buffer_float
19497+#define GL_ARB_color_buffer_float 1
19498+#ifdef GL_GLEXT_PROTOTYPES
19499+GLAPI void APIENTRY glClampColorARB (GLenum, GLenum);
19500+#endif /* GL_GLEXT_PROTOTYPES */
19501+typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);
19502+#endif
19503+
19504+#ifndef GL_ARB_half_float_pixel
19505+#define GL_ARB_half_float_pixel 1
19506+#endif
19507+
19508+#ifndef GL_ARB_texture_float
19509+#define GL_ARB_texture_float 1
19510+#endif
19511+
19512+#ifndef GL_ARB_pixel_buffer_object
19513+#define GL_ARB_pixel_buffer_object 1
19514+#endif
19515+
19516+#ifndef GL_EXT_abgr
19517+#define GL_EXT_abgr 1
19518+#endif
19519+
19520+#ifndef GL_EXT_blend_color
19521+#define GL_EXT_blend_color 1
19522+#ifdef GL_GLEXT_PROTOTYPES
19523+GLAPI void APIENTRY glBlendColorEXT (GLclampf, GLclampf, GLclampf, GLclampf);
19524+#endif /* GL_GLEXT_PROTOTYPES */
19525+typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
19526+#endif
19527+
19528+#ifndef GL_EXT_polygon_offset
19529+#define GL_EXT_polygon_offset 1
19530+#ifdef GL_GLEXT_PROTOTYPES
19531+GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat, GLfloat);
19532+#endif /* GL_GLEXT_PROTOTYPES */
19533+typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias);
19534+#endif
19535+
19536+#ifndef GL_EXT_texture
19537+#define GL_EXT_texture 1
19538+#endif
19539+
19540+#ifndef GL_EXT_texture3D
19541+#define GL_EXT_texture3D 1
19542+#ifdef GL_GLEXT_PROTOTYPES
19543+GLAPI void APIENTRY glTexImage3DEXT (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
19544+GLAPI void APIENTRY glTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19545+#endif /* GL_GLEXT_PROTOTYPES */
19546+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);
19547+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);
19548+#endif
19549+
19550+#ifndef GL_SGIS_texture_filter4
19551+#define GL_SGIS_texture_filter4 1
19552+#ifdef GL_GLEXT_PROTOTYPES
19553+GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum, GLenum, GLfloat *);
19554+GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum, GLenum, GLsizei, const GLfloat *);
19555+#endif /* GL_GLEXT_PROTOTYPES */
19556+typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights);
19557+typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);
19558+#endif
19559+
19560+#ifndef GL_EXT_subtexture
19561+#define GL_EXT_subtexture 1
19562+#ifdef GL_GLEXT_PROTOTYPES
19563+GLAPI void APIENTRY glTexSubImage1DEXT (GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *);
19564+GLAPI void APIENTRY glTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19565+#endif /* GL_GLEXT_PROTOTYPES */
19566+typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
19567+typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
19568+#endif
19569+
19570+#ifndef GL_EXT_copy_texture
19571+#define GL_EXT_copy_texture 1
19572+#ifdef GL_GLEXT_PROTOTYPES
19573+GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint);
19574+GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint);
19575+GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei);
19576+GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
19577+GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
19578+#endif /* GL_GLEXT_PROTOTYPES */
19579+typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
19580+typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
19581+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
19582+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
19583+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
19584+#endif
19585+
19586+#ifndef GL_EXT_histogram
19587+#define GL_EXT_histogram 1
19588+#ifdef GL_GLEXT_PROTOTYPES
19589+GLAPI void APIENTRY glGetHistogramEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
19590+GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum, GLenum, GLfloat *);
19591+GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum, GLenum, GLint *);
19592+GLAPI void APIENTRY glGetMinmaxEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
19593+GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum, GLenum, GLfloat *);
19594+GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum, GLenum, GLint *);
19595+GLAPI void APIENTRY glHistogramEXT (GLenum, GLsizei, GLenum, GLboolean);
19596+GLAPI void APIENTRY glMinmaxEXT (GLenum, GLenum, GLboolean);
19597+GLAPI void APIENTRY glResetHistogramEXT (GLenum);
19598+GLAPI void APIENTRY glResetMinmaxEXT (GLenum);
19599+#endif /* GL_GLEXT_PROTOTYPES */
19600+typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
19601+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19602+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19603+typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
19604+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19605+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19606+typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
19607+typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink);
19608+typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target);
19609+typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target);
19610+#endif
19611+
19612+#ifndef GL_EXT_convolution
19613+#define GL_EXT_convolution 1
19614+#ifdef GL_GLEXT_PROTOTYPES
19615+GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
19616+GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19617+GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum, GLenum, GLfloat);
19618+GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum, GLenum, const GLfloat *);
19619+GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum, GLenum, GLint);
19620+GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum, GLenum, const GLint *);
19621+GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum, GLenum, GLint, GLint, GLsizei);
19622+GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
19623+GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum, GLenum, GLenum, GLvoid *);
19624+GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum, GLenum, GLfloat *);
19625+GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum, GLenum, GLint *);
19626+GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
19627+GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
19628+#endif /* GL_GLEXT_PROTOTYPES */
19629+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
19630+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
19631+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params);
19632+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
19633+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params);
19634+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
19635+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
19636+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
19637+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
19638+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
19639+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
19640+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
19641+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
19642+#endif
19643+
19644+#ifndef GL_SGI_color_matrix
19645+#define GL_SGI_color_matrix 1
19646+#endif
19647+
19648+#ifndef GL_SGI_color_table
19649+#define GL_SGI_color_table 1
19650+#ifdef GL_GLEXT_PROTOTYPES
19651+GLAPI void APIENTRY glColorTableSGI (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
19652+GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum, GLenum, const GLfloat *);
19653+GLAPI void APIENTRY glColorTableParameterivSGI (GLenum, GLenum, const GLint *);
19654+GLAPI void APIENTRY glCopyColorTableSGI (GLenum, GLenum, GLint, GLint, GLsizei);
19655+GLAPI void APIENTRY glGetColorTableSGI (GLenum, GLenum, GLenum, GLvoid *);
19656+GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum, GLenum, GLfloat *);
19657+GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum, GLenum, GLint *);
19658+#endif /* GL_GLEXT_PROTOTYPES */
19659+typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
19660+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params);
19661+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params);
19662+typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
19663+typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
19664+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params);
19665+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params);
19666+#endif
19667+
19668+#ifndef GL_SGIX_pixel_texture
19669+#define GL_SGIX_pixel_texture 1
19670+#ifdef GL_GLEXT_PROTOTYPES
19671+GLAPI void APIENTRY glPixelTexGenSGIX (GLenum);
19672+#endif /* GL_GLEXT_PROTOTYPES */
19673+typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode);
19674+#endif
19675+
19676+#ifndef GL_SGIS_pixel_texture
19677+#define GL_SGIS_pixel_texture 1
19678+#ifdef GL_GLEXT_PROTOTYPES
19679+GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum, GLint);
19680+GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum, const GLint *);
19681+GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum, GLfloat);
19682+GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum, const GLfloat *);
19683+GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum, GLint *);
19684+GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum, GLfloat *);
19685+#endif /* GL_GLEXT_PROTOTYPES */
19686+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param);
19687+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params);
19688+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
19689+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
19690+typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params);
19691+typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params);
19692+#endif
19693+
19694+#ifndef GL_SGIS_texture4D
19695+#define GL_SGIS_texture4D 1
19696+#ifdef GL_GLEXT_PROTOTYPES
19697+GLAPI void APIENTRY glTexImage4DSGIS (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
19698+GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
19699+#endif /* GL_GLEXT_PROTOTYPES */
19700+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);
19701+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);
19702+#endif
19703+
19704+#ifndef GL_SGI_texture_color_table
19705+#define GL_SGI_texture_color_table 1
19706+#endif
19707+
19708+#ifndef GL_EXT_cmyka
19709+#define GL_EXT_cmyka 1
19710+#endif
19711+
19712+#ifndef GL_EXT_texture_object
19713+#define GL_EXT_texture_object 1
19714+#ifdef GL_GLEXT_PROTOTYPES
19715+GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei, const GLuint *, GLboolean *);
19716+GLAPI void APIENTRY glBindTextureEXT (GLenum, GLuint);
19717+GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei, const GLuint *);
19718+GLAPI void APIENTRY glGenTexturesEXT (GLsizei, GLuint *);
19719+GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint);
19720+GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei, const GLuint *, const GLclampf *);
19721+#endif /* GL_GLEXT_PROTOTYPES */
19722+typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences);
19723+typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture);
19724+typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures);
19725+typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures);
19726+typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture);
19727+typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities);
19728+#endif
19729+
19730+#ifndef GL_SGIS_detail_texture
19731+#define GL_SGIS_detail_texture 1
19732+#ifdef GL_GLEXT_PROTOTYPES
19733+GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum, GLsizei, const GLfloat *);
19734+GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum, GLfloat *);
19735+#endif /* GL_GLEXT_PROTOTYPES */
19736+typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
19737+typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
19738+#endif
19739+
19740+#ifndef GL_SGIS_sharpen_texture
19741+#define GL_SGIS_sharpen_texture 1
19742+#ifdef GL_GLEXT_PROTOTYPES
19743+GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum, GLsizei, const GLfloat *);
19744+GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum, GLfloat *);
19745+#endif /* GL_GLEXT_PROTOTYPES */
19746+typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
19747+typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
19748+#endif
19749+
19750+#ifndef GL_EXT_packed_pixels
19751+#define GL_EXT_packed_pixels 1
19752+#endif
19753+
19754+#ifndef GL_SGIS_texture_lod
19755+#define GL_SGIS_texture_lod 1
19756+#endif
19757+
19758+#ifndef GL_SGIS_multisample
19759+#define GL_SGIS_multisample 1
19760+#ifdef GL_GLEXT_PROTOTYPES
19761+GLAPI void APIENTRY glSampleMaskSGIS (GLclampf, GLboolean);
19762+GLAPI void APIENTRY glSamplePatternSGIS (GLenum);
19763+#endif /* GL_GLEXT_PROTOTYPES */
19764+typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert);
19765+typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern);
19766+#endif
19767+
19768+#ifndef GL_EXT_rescale_normal
19769+#define GL_EXT_rescale_normal 1
19770+#endif
19771+
19772+#ifndef GL_EXT_vertex_array
19773+#define GL_EXT_vertex_array 1
19774+#ifdef GL_GLEXT_PROTOTYPES
19775+GLAPI void APIENTRY glArrayElementEXT (GLint);
19776+GLAPI void APIENTRY glColorPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
19777+GLAPI void APIENTRY glDrawArraysEXT (GLenum, GLint, GLsizei);
19778+GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei, GLsizei, const GLboolean *);
19779+GLAPI void APIENTRY glGetPointervEXT (GLenum, GLvoid* *);
19780+GLAPI void APIENTRY glIndexPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *);
19781+GLAPI void APIENTRY glNormalPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *);
19782+GLAPI void APIENTRY glTexCoordPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
19783+GLAPI void APIENTRY glVertexPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
19784+#endif /* GL_GLEXT_PROTOTYPES */
19785+typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i);
19786+typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19787+typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);
19788+typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer);
19789+typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params);
19790+typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19791+typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19792+typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19793+typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
19794+#endif
19795+
19796+#ifndef GL_EXT_misc_attribute
19797+#define GL_EXT_misc_attribute 1
19798+#endif
19799+
19800+#ifndef GL_SGIS_generate_mipmap
19801+#define GL_SGIS_generate_mipmap 1
19802+#endif
19803+
19804+#ifndef GL_SGIX_clipmap
19805+#define GL_SGIX_clipmap 1
19806+#endif
19807+
19808+#ifndef GL_SGIX_shadow
19809+#define GL_SGIX_shadow 1
19810+#endif
19811+
19812+#ifndef GL_SGIS_texture_edge_clamp
19813+#define GL_SGIS_texture_edge_clamp 1
19814+#endif
19815+
19816+#ifndef GL_SGIS_texture_border_clamp
19817+#define GL_SGIS_texture_border_clamp 1
19818+#endif
19819+
19820+#ifndef GL_EXT_blend_minmax
19821+#define GL_EXT_blend_minmax 1
19822+#ifdef GL_GLEXT_PROTOTYPES
19823+GLAPI void APIENTRY glBlendEquationEXT (GLenum);
19824+#endif /* GL_GLEXT_PROTOTYPES */
19825+typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode);
19826+#endif
19827+
19828+#ifndef GL_EXT_blend_subtract
19829+#define GL_EXT_blend_subtract 1
19830+#endif
19831+
19832+#ifndef GL_EXT_blend_logic_op
19833+#define GL_EXT_blend_logic_op 1
19834+#endif
19835+
19836+#ifndef GL_SGIX_interlace
19837+#define GL_SGIX_interlace 1
19838+#endif
19839+
19840+#ifndef GL_SGIX_pixel_tiles
19841+#define GL_SGIX_pixel_tiles 1
19842+#endif
19843+
19844+#ifndef GL_SGIX_texture_select
19845+#define GL_SGIX_texture_select 1
19846+#endif
19847+
19848+#ifndef GL_SGIX_sprite
19849+#define GL_SGIX_sprite 1
19850+#ifdef GL_GLEXT_PROTOTYPES
19851+GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum, GLfloat);
19852+GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum, const GLfloat *);
19853+GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum, GLint);
19854+GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum, const GLint *);
19855+#endif /* GL_GLEXT_PROTOTYPES */
19856+typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param);
19857+typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params);
19858+typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param);
19859+typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params);
19860+#endif
19861+
19862+#ifndef GL_SGIX_texture_multi_buffer
19863+#define GL_SGIX_texture_multi_buffer 1
19864+#endif
19865+
19866+#ifndef GL_EXT_point_parameters
19867+#define GL_EXT_point_parameters 1
19868+#ifdef GL_GLEXT_PROTOTYPES
19869+GLAPI void APIENTRY glPointParameterfEXT (GLenum, GLfloat);
19870+GLAPI void APIENTRY glPointParameterfvEXT (GLenum, const GLfloat *);
19871+/* ERO Begin */
19872+GLAPI void APIENTRY glPointParameteriEXT (GLenum, GLint);
19873+GLAPI void APIENTRY glPointParameterivEXT (GLenum, const GLint *);
19874+/* ERO end */
19875+#endif /* GL_GLEXT_PROTOTYPES */
19876+typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);
19877+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params);
19878+#endif
19879+
19880+#ifndef GL_SGIS_point_parameters
19881+#define GL_SGIS_point_parameters 1
19882+#ifdef GL_GLEXT_PROTOTYPES
19883+GLAPI void APIENTRY glPointParameterfSGIS (GLenum, GLfloat);
19884+GLAPI void APIENTRY glPointParameterfvSGIS (GLenum, const GLfloat *);
19885+#endif /* GL_GLEXT_PROTOTYPES */
19886+typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
19887+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
19888+#endif
19889+
19890+#ifndef GL_SGIX_instruments
19891+#define GL_SGIX_instruments 1
19892+#ifdef GL_GLEXT_PROTOTYPES
19893+GLAPI GLint APIENTRY glGetInstrumentsSGIX (void);
19894+GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei, GLint *);
19895+GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *);
19896+GLAPI void APIENTRY glReadInstrumentsSGIX (GLint);
19897+GLAPI void APIENTRY glStartInstrumentsSGIX (void);
19898+GLAPI void APIENTRY glStopInstrumentsSGIX (GLint);
19899+#endif /* GL_GLEXT_PROTOTYPES */
19900+typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void);
19901+typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer);
19902+typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p);
19903+typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker);
19904+typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void);
19905+typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker);
19906+#endif
19907+
19908+#ifndef GL_SGIX_texture_scale_bias
19909+#define GL_SGIX_texture_scale_bias 1
19910+#endif
19911+
19912+#ifndef GL_SGIX_framezoom
19913+#define GL_SGIX_framezoom 1
19914+#ifdef GL_GLEXT_PROTOTYPES
19915+GLAPI void APIENTRY glFrameZoomSGIX (GLint);
19916+#endif /* GL_GLEXT_PROTOTYPES */
19917+typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor);
19918+#endif
19919+
19920+#ifndef GL_SGIX_tag_sample_buffer
19921+#define GL_SGIX_tag_sample_buffer 1
19922+#ifdef GL_GLEXT_PROTOTYPES
19923+GLAPI void APIENTRY glTagSampleBufferSGIX (void);
19924+#endif /* GL_GLEXT_PROTOTYPES */
19925+typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void);
19926+#endif
19927+
19928+#ifndef GL_SGIX_polynomial_ffd
19929+#define GL_SGIX_polynomial_ffd 1
19930+#ifdef GL_GLEXT_PROTOTYPES
19931+GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *);
19932+GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *);
19933+GLAPI void APIENTRY glDeformSGIX (GLbitfield);
19934+GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield);
19935+#endif /* GL_GLEXT_PROTOTYPES */
19936+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);
19937+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);
19938+typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask);
19939+typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask);
19940+#endif
19941+
19942+#ifndef GL_SGIX_reference_plane
19943+#define GL_SGIX_reference_plane 1
19944+#ifdef GL_GLEXT_PROTOTYPES
19945+GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *);
19946+#endif /* GL_GLEXT_PROTOTYPES */
19947+typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation);
19948+#endif
19949+
19950+#ifndef GL_SGIX_flush_raster
19951+#define GL_SGIX_flush_raster 1
19952+#ifdef GL_GLEXT_PROTOTYPES
19953+GLAPI void APIENTRY glFlushRasterSGIX (void);
19954+#endif /* GL_GLEXT_PROTOTYPES */
19955+typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void);
19956+#endif
19957+
19958+#ifndef GL_SGIX_depth_texture
19959+#define GL_SGIX_depth_texture 1
19960+#endif
19961+
19962+#ifndef GL_SGIS_fog_function
19963+#define GL_SGIS_fog_function 1
19964+#ifdef GL_GLEXT_PROTOTYPES
19965+GLAPI void APIENTRY glFogFuncSGIS (GLsizei, const GLfloat *);
19966+GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *);
19967+#endif /* GL_GLEXT_PROTOTYPES */
19968+typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points);
19969+typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points);
19970+#endif
19971+
19972+#ifndef GL_SGIX_fog_offset
19973+#define GL_SGIX_fog_offset 1
19974+#endif
19975+
19976+#ifndef GL_HP_image_transform
19977+#define GL_HP_image_transform 1
19978+#ifdef GL_GLEXT_PROTOTYPES
19979+GLAPI void APIENTRY glImageTransformParameteriHP (GLenum, GLenum, GLint);
19980+GLAPI void APIENTRY glImageTransformParameterfHP (GLenum, GLenum, GLfloat);
19981+GLAPI void APIENTRY glImageTransformParameterivHP (GLenum, GLenum, const GLint *);
19982+GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum, GLenum, const GLfloat *);
19983+GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum, GLenum, GLint *);
19984+GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum, GLenum, GLfloat *);
19985+#endif /* GL_GLEXT_PROTOTYPES */
19986+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param);
19987+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param);
19988+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params);
19989+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params);
19990+typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params);
19991+typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params);
19992+#endif
19993+
19994+#ifndef GL_HP_convolution_border_modes
19995+#define GL_HP_convolution_border_modes 1
19996+#endif
19997+
19998+#ifndef GL_SGIX_texture_add_env
19999+#define GL_SGIX_texture_add_env 1
20000+#endif
20001+
20002+#ifndef GL_EXT_color_subtable
20003+#define GL_EXT_color_subtable 1
20004+#ifdef GL_GLEXT_PROTOTYPES
20005+GLAPI void APIENTRY glColorSubTableEXT (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
20006+GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum, GLsizei, GLint, GLint, GLsizei);
20007+#endif /* GL_GLEXT_PROTOTYPES */
20008+typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
20009+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
20010+#endif
20011+
20012+#ifndef GL_PGI_vertex_hints
20013+#define GL_PGI_vertex_hints 1
20014+#endif
20015+
20016+#ifndef GL_PGI_misc_hints
20017+#define GL_PGI_misc_hints 1
20018+#ifdef GL_GLEXT_PROTOTYPES
20019+GLAPI void APIENTRY glHintPGI (GLenum, GLint);
20020+#endif /* GL_GLEXT_PROTOTYPES */
20021+typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode);
20022+#endif
20023+
20024+#ifndef GL_EXT_paletted_texture
20025+#define GL_EXT_paletted_texture 1
20026+#ifdef GL_GLEXT_PROTOTYPES
20027+GLAPI void APIENTRY glColorTableEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
20028+GLAPI void APIENTRY glGetColorTableEXT (GLenum, GLenum, GLenum, GLvoid *);
20029+GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum, GLenum, GLint *);
20030+GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum, GLenum, GLfloat *);
20031+#endif /* GL_GLEXT_PROTOTYPES */
20032+typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
20033+typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data);
20034+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
20035+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
20036+#endif
20037+
20038+#ifndef GL_EXT_clip_volume_hint
20039+#define GL_EXT_clip_volume_hint 1
20040+#endif
20041+
20042+#ifndef GL_SGIX_list_priority
20043+#define GL_SGIX_list_priority 1
20044+#ifdef GL_GLEXT_PROTOTYPES
20045+GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint, GLenum, GLfloat *);
20046+GLAPI void APIENTRY glGetListParameterivSGIX (GLuint, GLenum, GLint *);
20047+GLAPI void APIENTRY glListParameterfSGIX (GLuint, GLenum, GLfloat);
20048+GLAPI void APIENTRY glListParameterfvSGIX (GLuint, GLenum, const GLfloat *);
20049+GLAPI void APIENTRY glListParameteriSGIX (GLuint, GLenum, GLint);
20050+GLAPI void APIENTRY glListParameterivSGIX (GLuint, GLenum, const GLint *);
20051+#endif /* GL_GLEXT_PROTOTYPES */
20052+typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params);
20053+typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params);
20054+typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param);
20055+typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params);
20056+typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param);
20057+typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params);
20058+#endif
20059+
20060+#ifndef GL_SGIX_ir_instrument1
20061+#define GL_SGIX_ir_instrument1 1
20062+#endif
20063+
20064+#ifndef GL_SGIX_calligraphic_fragment
20065+#define GL_SGIX_calligraphic_fragment 1
20066+#endif
20067+
20068+#ifndef GL_SGIX_texture_lod_bias
20069+#define GL_SGIX_texture_lod_bias 1
20070+#endif
20071+
20072+#ifndef GL_SGIX_shadow_ambient
20073+#define GL_SGIX_shadow_ambient 1
20074+#endif
20075+
20076+#ifndef GL_EXT_index_texture
20077+#define GL_EXT_index_texture 1
20078+#endif
20079+
20080+#ifndef GL_EXT_index_material
20081+#define GL_EXT_index_material 1
20082+#ifdef GL_GLEXT_PROTOTYPES
20083+GLAPI void APIENTRY glIndexMaterialEXT (GLenum, GLenum);
20084+#endif /* GL_GLEXT_PROTOTYPES */
20085+typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode);
20086+#endif
20087+
20088+#ifndef GL_EXT_index_func
20089+#define GL_EXT_index_func 1
20090+#ifdef GL_GLEXT_PROTOTYPES
20091+GLAPI void APIENTRY glIndexFuncEXT (GLenum, GLclampf);
20092+#endif /* GL_GLEXT_PROTOTYPES */
20093+typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref);
20094+#endif
20095+
20096+#ifndef GL_EXT_index_array_formats
20097+#define GL_EXT_index_array_formats 1
20098+#endif
20099+
20100+#ifndef GL_EXT_compiled_vertex_array
20101+#define GL_EXT_compiled_vertex_array 1
20102+#ifdef GL_GLEXT_PROTOTYPES
20103+GLAPI void APIENTRY glLockArraysEXT (GLint, GLsizei);
20104+GLAPI void APIENTRY glUnlockArraysEXT (void);
20105+#endif /* GL_GLEXT_PROTOTYPES */
20106+typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);
20107+typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void);
20108+#endif
20109+
20110+#ifndef GL_EXT_cull_vertex
20111+#define GL_EXT_cull_vertex 1
20112+#ifdef GL_GLEXT_PROTOTYPES
20113+GLAPI void APIENTRY glCullParameterdvEXT (GLenum, GLdouble *);
20114+GLAPI void APIENTRY glCullParameterfvEXT (GLenum, GLfloat *);
20115+#endif /* GL_GLEXT_PROTOTYPES */
20116+typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params);
20117+typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params);
20118+#endif
20119+
20120+#ifndef GL_SGIX_ycrcb
20121+#define GL_SGIX_ycrcb 1
20122+#endif
20123+
20124+#ifndef GL_SGIX_fragment_lighting
20125+#define GL_SGIX_fragment_lighting 1
20126+#ifdef GL_GLEXT_PROTOTYPES
20127+GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum, GLenum);
20128+GLAPI void APIENTRY glFragmentLightfSGIX (GLenum, GLenum, GLfloat);
20129+GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum, GLenum, const GLfloat *);
20130+GLAPI void APIENTRY glFragmentLightiSGIX (GLenum, GLenum, GLint);
20131+GLAPI void APIENTRY glFragmentLightivSGIX (GLenum, GLenum, const GLint *);
20132+GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum, GLfloat);
20133+GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum, const GLfloat *);
20134+GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum, GLint);
20135+GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum, const GLint *);
20136+GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum, GLenum, GLfloat);
20137+GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum, GLenum, const GLfloat *);
20138+GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum, GLenum, GLint);
20139+GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum, GLenum, const GLint *);
20140+GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum, GLenum, GLfloat *);
20141+GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum, GLenum, GLint *);
20142+GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum, GLenum, GLfloat *);
20143+GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum, GLenum, GLint *);
20144+GLAPI void APIENTRY glLightEnviSGIX (GLenum, GLint);
20145+#endif /* GL_GLEXT_PROTOTYPES */
20146+typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode);
20147+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param);
20148+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);
20149+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param);
20150+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params);
20151+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param);
20152+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params);
20153+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param);
20154+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params);
20155+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param);
20156+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params);
20157+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param);
20158+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params);
20159+typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params);
20160+typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params);
20161+typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params);
20162+typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params);
20163+typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param);
20164+#endif
20165+
20166+#ifndef GL_IBM_rasterpos_clip
20167+#define GL_IBM_rasterpos_clip 1
20168+#endif
20169+
20170+#ifndef GL_HP_texture_lighting
20171+#define GL_HP_texture_lighting 1
20172+#endif
20173+
20174+#ifndef GL_EXT_draw_range_elements
20175+#define GL_EXT_draw_range_elements 1
20176+#ifdef GL_GLEXT_PROTOTYPES
20177+GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
20178+#endif /* GL_GLEXT_PROTOTYPES */
20179+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
20180+#endif
20181+
20182+#ifndef GL_WIN_phong_shading
20183+#define GL_WIN_phong_shading 1
20184+#endif
20185+
20186+#ifndef GL_WIN_specular_fog
20187+#define GL_WIN_specular_fog 1
20188+#endif
20189+
20190+#ifndef GL_EXT_light_texture
20191+#define GL_EXT_light_texture 1
20192+#ifdef GL_GLEXT_PROTOTYPES
20193+GLAPI void APIENTRY glApplyTextureEXT (GLenum);
20194+GLAPI void APIENTRY glTextureLightEXT (GLenum);
20195+GLAPI void APIENTRY glTextureMaterialEXT (GLenum, GLenum);
20196+#endif /* GL_GLEXT_PROTOTYPES */
20197+typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode);
20198+typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname);
20199+typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode);
20200+#endif
20201+
20202+#ifndef GL_SGIX_blend_alpha_minmax
20203+#define GL_SGIX_blend_alpha_minmax 1
20204+#endif
20205+
20206+#ifndef GL_EXT_bgra
20207+#define GL_EXT_bgra 1
20208+#endif
20209+
20210+#ifndef GL_SGIX_async
20211+#define GL_SGIX_async 1
20212+#ifdef GL_GLEXT_PROTOTYPES
20213+GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint);
20214+GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *);
20215+GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *);
20216+GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei);
20217+GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint, GLsizei);
20218+GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint);
20219+#endif /* GL_GLEXT_PROTOTYPES */
20220+typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker);
20221+typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp);
20222+typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp);
20223+typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range);
20224+typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range);
20225+typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker);
20226+#endif
20227+
20228+#ifndef GL_SGIX_async_pixel
20229+#define GL_SGIX_async_pixel 1
20230+#endif
20231+
20232+#ifndef GL_SGIX_async_histogram
20233+#define GL_SGIX_async_histogram 1
20234+#endif
20235+
20236+#ifndef GL_INTEL_parallel_arrays
20237+#define GL_INTEL_parallel_arrays 1
20238+#ifdef GL_GLEXT_PROTOTYPES
20239+GLAPI void APIENTRY glVertexPointervINTEL (GLint, GLenum, const GLvoid* *);
20240+GLAPI void APIENTRY glNormalPointervINTEL (GLenum, const GLvoid* *);
20241+GLAPI void APIENTRY glColorPointervINTEL (GLint, GLenum, const GLvoid* *);
20242+GLAPI void APIENTRY glTexCoordPointervINTEL (GLint, GLenum, const GLvoid* *);
20243+#endif /* GL_GLEXT_PROTOTYPES */
20244+typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
20245+typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer);
20246+typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
20247+typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
20248+#endif
20249+
20250+#ifndef GL_HP_occlusion_test
20251+#define GL_HP_occlusion_test 1
20252+#endif
20253+
20254+#ifndef GL_EXT_pixel_transform
20255+#define GL_EXT_pixel_transform 1
20256+#ifdef GL_GLEXT_PROTOTYPES
20257+GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum, GLenum, GLint);
20258+GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum, GLenum, GLfloat);
20259+GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum, GLenum, const GLint *);
20260+GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum, GLenum, const GLfloat *);
20261+/* ERO Begin */
20262+GLAPI void APIENTRY glGetPixelTransformParameterivEXT (GLenum, GLenum, GLint *);
20263+GLAPI void APIENTRY glGetPixelTransformParameterfvEXT (GLenum, GLenum, GLfloat *);
20264+/* ERO End */
20265+#endif /* GL_GLEXT_PROTOTYPES */
20266+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param);
20267+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param);
20268+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
20269+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
20270+/* ERO Begin */
20271+typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
20272+typedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
20273+/* ERO End */
20274+#endif
20275+
20276+#ifndef GL_EXT_pixel_transform_color_table
20277+#define GL_EXT_pixel_transform_color_table 1
20278+#endif
20279+
20280+#ifndef GL_EXT_shared_texture_palette
20281+#define GL_EXT_shared_texture_palette 1
20282+#endif
20283+
20284+#ifndef GL_EXT_separate_specular_color
20285+#define GL_EXT_separate_specular_color 1
20286+#endif
20287+
20288+#ifndef GL_EXT_secondary_color
20289+#define GL_EXT_secondary_color 1
20290+#ifdef GL_GLEXT_PROTOTYPES
20291+GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte, GLbyte, GLbyte);
20292+GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *);
20293+GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble, GLdouble, GLdouble);
20294+GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *);
20295+GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat, GLfloat, GLfloat);
20296+GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *);
20297+GLAPI void APIENTRY glSecondaryColor3iEXT (GLint, GLint, GLint);
20298+GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *);
20299+GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort, GLshort, GLshort);
20300+GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *);
20301+GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte, GLubyte, GLubyte);
20302+GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *);
20303+GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint, GLuint, GLuint);
20304+GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *);
20305+GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort, GLushort, GLushort);
20306+GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *);
20307+GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint, GLenum, GLsizei, const GLvoid *);
20308+#endif /* GL_GLEXT_PROTOTYPES */
20309+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue);
20310+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v);
20311+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue);
20312+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v);
20313+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);
20314+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);
20315+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue);
20316+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v);
20317+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue);
20318+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v);
20319+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);
20320+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v);
20321+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue);
20322+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);
20323+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);
20324+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);
20325+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
20326+#endif
20327+
20328+#ifndef GL_EXT_texture_perturb_normal
20329+#define GL_EXT_texture_perturb_normal 1
20330+#ifdef GL_GLEXT_PROTOTYPES
20331+GLAPI void APIENTRY glTextureNormalEXT (GLenum);
20332+#endif /* GL_GLEXT_PROTOTYPES */
20333+typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode);
20334+#endif
20335+
20336+#ifndef GL_EXT_multi_draw_arrays
20337+#define GL_EXT_multi_draw_arrays 1
20338+#ifdef GL_GLEXT_PROTOTYPES
20339+GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei);
20340+GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
20341+#endif /* GL_GLEXT_PROTOTYPES */
20342+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
20343+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
20344+#endif
20345+
20346+#ifndef GL_EXT_fog_coord
20347+#define GL_EXT_fog_coord 1
20348+#ifdef GL_GLEXT_PROTOTYPES
20349+GLAPI void APIENTRY glFogCoordfEXT (GLfloat);
20350+GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *);
20351+GLAPI void APIENTRY glFogCoorddEXT (GLdouble);
20352+GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *);
20353+GLAPI void APIENTRY glFogCoordPointerEXT (GLenum, GLsizei, const GLvoid *);
20354+#endif /* GL_GLEXT_PROTOTYPES */
20355+typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord);
20356+typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord);
20357+typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord);
20358+typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord);
20359+typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
20360+#endif
20361+
20362+#ifndef GL_REND_screen_coordinates
20363+#define GL_REND_screen_coordinates 1
20364+#endif
20365+
20366+#ifndef GL_EXT_coordinate_frame
20367+#define GL_EXT_coordinate_frame 1
20368+#ifdef GL_GLEXT_PROTOTYPES
20369+GLAPI void APIENTRY glTangent3bEXT (GLbyte, GLbyte, GLbyte);
20370+GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *);
20371+GLAPI void APIENTRY glTangent3dEXT (GLdouble, GLdouble, GLdouble);
20372+GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *);
20373+GLAPI void APIENTRY glTangent3fEXT (GLfloat, GLfloat, GLfloat);
20374+GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *);
20375+GLAPI void APIENTRY glTangent3iEXT (GLint, GLint, GLint);
20376+GLAPI void APIENTRY glTangent3ivEXT (const GLint *);
20377+GLAPI void APIENTRY glTangent3sEXT (GLshort, GLshort, GLshort);
20378+GLAPI void APIENTRY glTangent3svEXT (const GLshort *);
20379+GLAPI void APIENTRY glBinormal3bEXT (GLbyte, GLbyte, GLbyte);
20380+GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *);
20381+GLAPI void APIENTRY glBinormal3dEXT (GLdouble, GLdouble, GLdouble);
20382+GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *);
20383+GLAPI void APIENTRY glBinormal3fEXT (GLfloat, GLfloat, GLfloat);
20384+GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *);
20385+GLAPI void APIENTRY glBinormal3iEXT (GLint, GLint, GLint);
20386+GLAPI void APIENTRY glBinormal3ivEXT (const GLint *);
20387+GLAPI void APIENTRY glBinormal3sEXT (GLshort, GLshort, GLshort);
20388+GLAPI void APIENTRY glBinormal3svEXT (const GLshort *);
20389+GLAPI void APIENTRY glTangentPointerEXT (GLenum, GLsizei, const GLvoid *);
20390+GLAPI void APIENTRY glBinormalPointerEXT (GLenum, GLsizei, const GLvoid *);
20391+#endif /* GL_GLEXT_PROTOTYPES */
20392+typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz);
20393+typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v);
20394+typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz);
20395+typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v);
20396+typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz);
20397+typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v);
20398+typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz);
20399+typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v);
20400+typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz);
20401+typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v);
20402+typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz);
20403+typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v);
20404+typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz);
20405+typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v);
20406+typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz);
20407+typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v);
20408+typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz);
20409+typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v);
20410+typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz);
20411+typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v);
20412+typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
20413+typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
20414+#endif
20415+
20416+#ifndef GL_EXT_texture_env_combine
20417+#define GL_EXT_texture_env_combine 1
20418+#endif
20419+
20420+#ifndef GL_APPLE_specular_vector
20421+#define GL_APPLE_specular_vector 1
20422+#endif
20423+
20424+#ifndef GL_APPLE_transform_hint
20425+#define GL_APPLE_transform_hint 1
20426+#endif
20427+
20428+#ifndef GL_SGIX_fog_scale
20429+#define GL_SGIX_fog_scale 1
20430+#endif
20431+
20432+#ifndef GL_SUNX_constant_data
20433+#define GL_SUNX_constant_data 1
20434+#ifdef GL_GLEXT_PROTOTYPES
20435+GLAPI void APIENTRY glFinishTextureSUNX (void);
20436+#endif /* GL_GLEXT_PROTOTYPES */
20437+typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void);
20438+#endif
20439+
20440+#ifndef GL_SUN_global_alpha
20441+#define GL_SUN_global_alpha 1
20442+#ifdef GL_GLEXT_PROTOTYPES
20443+GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte);
20444+GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort);
20445+GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint);
20446+GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat);
20447+GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble);
20448+GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte);
20449+GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort);
20450+GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint);
20451+#endif /* GL_GLEXT_PROTOTYPES */
20452+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor);
20453+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor);
20454+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor);
20455+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor);
20456+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor);
20457+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor);
20458+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor);
20459+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor);
20460+#endif
20461+
20462+#ifndef GL_SUN_triangle_list
20463+#define GL_SUN_triangle_list 1
20464+#ifdef GL_GLEXT_PROTOTYPES
20465+GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint);
20466+GLAPI void APIENTRY glReplacementCodeusSUN (GLushort);
20467+GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte);
20468+GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *);
20469+GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *);
20470+GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *);
20471+GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum, GLsizei, const GLvoid* *);
20472+#endif /* GL_GLEXT_PROTOTYPES */
20473+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code);
20474+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code);
20475+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code);
20476+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code);
20477+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code);
20478+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code);
20479+typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer);
20480+#endif
20481+
20482+#ifndef GL_SUN_vertex
20483+#define GL_SUN_vertex 1
20484+#ifdef GL_GLEXT_PROTOTYPES
20485+GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat);
20486+GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *, const GLfloat *);
20487+GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
20488+GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *, const GLfloat *);
20489+GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20490+GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *, const GLfloat *);
20491+GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20492+GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *);
20493+GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20494+GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
20495+GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20496+GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *, const GLfloat *);
20497+GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20498+GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *, const GLfloat *);
20499+GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat, GLfloat, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
20500+GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *, const GLubyte *, const GLfloat *);
20501+GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20502+GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
20503+GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20504+GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
20505+GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20506+GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
20507+GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20508+GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
20509+GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat);
20510+GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *, const GLfloat *);
20511+GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
20512+GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *, const GLubyte *, const GLfloat *);
20513+GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20514+GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
20515+GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20516+GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
20517+GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20518+GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *);
20519+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20520+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *);
20521+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20522+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *);
20523+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
20524+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
20525+#endif /* GL_GLEXT_PROTOTYPES */
20526+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
20527+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v);
20528+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
20529+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v);
20530+typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
20531+typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v);
20532+typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20533+typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v);
20534+typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20535+typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v);
20536+typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
20537+typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
20538+typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20539+typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
20540+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
20541+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v);
20542+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
20543+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v);
20544+typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20545+typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v);
20546+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);
20547+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20548+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);
20549+typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20550+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
20551+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v);
20552+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
20553+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v);
20554+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
20555+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v);
20556+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20557+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v);
20558+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);
20559+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20560+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
20561+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v);
20562+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
20563+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
20564+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);
20565+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
20566+#endif
20567+
20568+#ifndef GL_EXT_blend_func_separate
20569+#define GL_EXT_blend_func_separate 1
20570+#ifdef GL_GLEXT_PROTOTYPES
20571+GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum, GLenum, GLenum, GLenum);
20572+#endif /* GL_GLEXT_PROTOTYPES */
20573+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
20574+#endif
20575+
20576+#ifndef GL_INGR_blend_func_separate
20577+#define GL_INGR_blend_func_separate 1
20578+#ifdef GL_GLEXT_PROTOTYPES
20579+GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum, GLenum, GLenum, GLenum);
20580+#endif /* GL_GLEXT_PROTOTYPES */
20581+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
20582+#endif
20583+
20584+#ifndef GL_INGR_color_clamp
20585+#define GL_INGR_color_clamp 1
20586+#endif
20587+
20588+#ifndef GL_INGR_interlace_read
20589+#define GL_INGR_interlace_read 1
20590+#endif
20591+
20592+#ifndef GL_EXT_stencil_wrap
20593+#define GL_EXT_stencil_wrap 1
20594+#endif
20595+
20596+#ifndef GL_EXT_422_pixels
20597+#define GL_EXT_422_pixels 1
20598+#endif
20599+
20600+#ifndef GL_NV_texgen_reflection
20601+#define GL_NV_texgen_reflection 1
20602+#endif
20603+
20604+#ifndef GL_SUN_convolution_border_modes
20605+#define GL_SUN_convolution_border_modes 1
20606+#endif
20607+
20608+#ifndef GL_EXT_texture_env_add
20609+#define GL_EXT_texture_env_add 1
20610+#endif
20611+
20612+#ifndef GL_EXT_texture_lod_bias
20613+#define GL_EXT_texture_lod_bias 1
20614+#endif
20615+
20616+#ifndef GL_EXT_texture_filter_anisotropic
20617+#define GL_EXT_texture_filter_anisotropic 1
20618+#endif
20619+
20620+#ifndef GL_EXT_vertex_weighting
20621+#define GL_EXT_vertex_weighting 1
20622+#ifdef GL_GLEXT_PROTOTYPES
20623+GLAPI void APIENTRY glVertexWeightfEXT (GLfloat);
20624+GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *);
20625+GLAPI void APIENTRY glVertexWeightPointerEXT (GLsizei, GLenum, GLsizei, const GLvoid *);
20626+#endif /* GL_GLEXT_PROTOTYPES */
20627+typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight);
20628+typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight);
20629+typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer);
20630+#endif
20631+
20632+#ifndef GL_NV_light_max_exponent
20633+#define GL_NV_light_max_exponent 1
20634+#endif
20635+
20636+#ifndef GL_NV_vertex_array_range
20637+#define GL_NV_vertex_array_range 1
20638+#ifdef GL_GLEXT_PROTOTYPES
20639+GLAPI void APIENTRY glFlushVertexArrayRangeNV (void);
20640+GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei, const GLvoid *);
20641+#endif /* GL_GLEXT_PROTOTYPES */
20642+typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void);
20643+typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer);
20644+#endif
20645+
20646+#ifndef GL_NV_register_combiners
20647+#define GL_NV_register_combiners 1
20648+#ifdef GL_GLEXT_PROTOTYPES
20649+GLAPI void APIENTRY glCombinerParameterfvNV (GLenum, const GLfloat *);
20650+GLAPI void APIENTRY glCombinerParameterfNV (GLenum, GLfloat);
20651+GLAPI void APIENTRY glCombinerParameterivNV (GLenum, const GLint *);
20652+GLAPI void APIENTRY glCombinerParameteriNV (GLenum, GLint);
20653+GLAPI void APIENTRY glCombinerInputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum);
20654+GLAPI void APIENTRY glCombinerOutputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean);
20655+GLAPI void APIENTRY glFinalCombinerInputNV (GLenum, GLenum, GLenum, GLenum);
20656+GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum, GLenum, GLenum, GLenum, GLfloat *);
20657+GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum, GLenum, GLenum, GLenum, GLint *);
20658+GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum, GLenum, GLenum, GLfloat *);
20659+GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum, GLenum, GLenum, GLint *);
20660+GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum, GLenum, GLfloat *);
20661+GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum, GLenum, GLint *);
20662+#endif /* GL_GLEXT_PROTOTYPES */
20663+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);
20664+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);
20665+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
20666+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);
20667+typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
20668+typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
20669+typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
20670+typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
20671+typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
20672+typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
20673+typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params);
20674+typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params);
20675+typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params);
20676+#endif
20677+
20678+#ifndef GL_NV_fog_distance
20679+#define GL_NV_fog_distance 1
20680+#endif
20681+
20682+#ifndef GL_NV_texgen_emboss
20683+#define GL_NV_texgen_emboss 1
20684+#endif
20685+
20686+#ifndef GL_NV_blend_square
20687+#define GL_NV_blend_square 1
20688+#endif
20689+
20690+#ifndef GL_NV_texture_env_combine4
20691+#define GL_NV_texture_env_combine4 1
20692+#endif
20693+
20694+#ifndef GL_MESA_resize_buffers
20695+#define GL_MESA_resize_buffers 1
20696+#ifdef GL_GLEXT_PROTOTYPES
20697+GLAPI void APIENTRY glResizeBuffersMESA (void);
20698+#endif /* GL_GLEXT_PROTOTYPES */
20699+typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void);
20700+#endif
20701+
20702+#ifndef GL_MESA_window_pos
20703+#define GL_MESA_window_pos 1
20704+#ifdef GL_GLEXT_PROTOTYPES
20705+GLAPI void APIENTRY glWindowPos2dMESA (GLdouble, GLdouble);
20706+GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *);
20707+GLAPI void APIENTRY glWindowPos2fMESA (GLfloat, GLfloat);
20708+GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *);
20709+GLAPI void APIENTRY glWindowPos2iMESA (GLint, GLint);
20710+GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *);
20711+GLAPI void APIENTRY glWindowPos2sMESA (GLshort, GLshort);
20712+GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *);
20713+GLAPI void APIENTRY glWindowPos3dMESA (GLdouble, GLdouble, GLdouble);
20714+GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *);
20715+GLAPI void APIENTRY glWindowPos3fMESA (GLfloat, GLfloat, GLfloat);
20716+GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *);
20717+GLAPI void APIENTRY glWindowPos3iMESA (GLint, GLint, GLint);
20718+GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *);
20719+GLAPI void APIENTRY glWindowPos3sMESA (GLshort, GLshort, GLshort);
20720+GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *);
20721+GLAPI void APIENTRY glWindowPos4dMESA (GLdouble, GLdouble, GLdouble, GLdouble);
20722+GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *);
20723+GLAPI void APIENTRY glWindowPos4fMESA (GLfloat, GLfloat, GLfloat, GLfloat);
20724+GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *);
20725+GLAPI void APIENTRY glWindowPos4iMESA (GLint, GLint, GLint, GLint);
20726+GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *);
20727+GLAPI void APIENTRY glWindowPos4sMESA (GLshort, GLshort, GLshort, GLshort);
20728+GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *);
20729+#endif /* GL_GLEXT_PROTOTYPES */
20730+typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y);
20731+typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v);
20732+typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y);
20733+typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v);
20734+typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y);
20735+typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v);
20736+typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y);
20737+typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v);
20738+typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z);
20739+typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v);
20740+typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z);
20741+typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v);
20742+typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z);
20743+typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v);
20744+typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z);
20745+typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v);
20746+typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
20747+typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v);
20748+typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
20749+typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v);
20750+typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w);
20751+typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v);
20752+typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w);
20753+typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v);
20754+#endif
20755+
20756+#ifndef GL_IBM_cull_vertex
20757+#define GL_IBM_cull_vertex 1
20758+#endif
20759+
20760+#ifndef GL_IBM_multimode_draw_arrays
20761+#define GL_IBM_multimode_draw_arrays 1
20762+#ifdef GL_GLEXT_PROTOTYPES
20763+GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *, const GLint *, const GLsizei *, GLsizei, GLint);
20764+GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *, const GLsizei *, GLenum, const GLvoid* const *, GLsizei, GLint);
20765+#endif /* GL_GLEXT_PROTOTYPES */
20766+typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
20767+typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride);
20768+#endif
20769+
20770+#ifndef GL_IBM_vertex_array_lists
20771+#define GL_IBM_vertex_array_lists 1
20772+#ifdef GL_GLEXT_PROTOTYPES
20773+GLAPI void APIENTRY glColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20774+GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20775+GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint, const GLboolean* *, GLint);
20776+GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
20777+GLAPI void APIENTRY glIndexPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
20778+GLAPI void APIENTRY glNormalPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
20779+GLAPI void APIENTRY glTexCoordPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20780+GLAPI void APIENTRY glVertexPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
20781+#endif /* GL_GLEXT_PROTOTYPES */
20782+typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20783+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20784+typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride);
20785+typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20786+typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20787+typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20788+typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20789+typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
20790+#endif
20791+
20792+#ifndef GL_SGIX_subsample
20793+#define GL_SGIX_subsample 1
20794+#endif
20795+
20796+#ifndef GL_SGIX_ycrcba
20797+#define GL_SGIX_ycrcba 1
20798+#endif
20799+
20800+#ifndef GL_SGIX_ycrcb_subsample
20801+#define GL_SGIX_ycrcb_subsample 1
20802+#endif
20803+
20804+#ifndef GL_SGIX_depth_pass_instrument
20805+#define GL_SGIX_depth_pass_instrument 1
20806+#endif
20807+
20808+#ifndef GL_3DFX_texture_compression_FXT1
20809+#define GL_3DFX_texture_compression_FXT1 1
20810+#endif
20811+
20812+#ifndef GL_3DFX_multisample
20813+#define GL_3DFX_multisample 1
20814+#endif
20815+
20816+#ifndef GL_3DFX_tbuffer
20817+#define GL_3DFX_tbuffer 1
20818+#ifdef GL_GLEXT_PROTOTYPES
20819+GLAPI void APIENTRY glTbufferMask3DFX (GLuint);
20820+#endif /* GL_GLEXT_PROTOTYPES */
20821+typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask);
20822+#endif
20823+
20824+#ifndef GL_EXT_multisample
20825+#define GL_EXT_multisample 1
20826+#ifdef GL_GLEXT_PROTOTYPES
20827+GLAPI void APIENTRY glSampleMaskEXT (GLclampf, GLboolean);
20828+GLAPI void APIENTRY glSamplePatternEXT (GLenum);
20829+#endif /* GL_GLEXT_PROTOTYPES */
20830+typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert);
20831+typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern);
20832+#endif
20833+
20834+#ifndef GL_SGIX_vertex_preclip
20835+#define GL_SGIX_vertex_preclip 1
20836+#endif
20837+
20838+#ifndef GL_SGIX_convolution_accuracy
20839+#define GL_SGIX_convolution_accuracy 1
20840+#endif
20841+
20842+#ifndef GL_SGIX_resample
20843+#define GL_SGIX_resample 1
20844+#endif
20845+
20846+#ifndef GL_SGIS_point_line_texgen
20847+#define GL_SGIS_point_line_texgen 1
20848+#endif
20849+
20850+#ifndef GL_SGIS_texture_color_mask
20851+#define GL_SGIS_texture_color_mask 1
20852+#ifdef GL_GLEXT_PROTOTYPES
20853+GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean, GLboolean, GLboolean, GLboolean);
20854+#endif /* GL_GLEXT_PROTOTYPES */
20855+typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
20856+#endif
20857+
20858+#ifndef GL_SGIX_igloo_interface
20859+#define GL_SGIX_igloo_interface 1
20860+#ifdef GL_GLEXT_PROTOTYPES
20861+GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum, const GLvoid *);
20862+#endif /* GL_GLEXT_PROTOTYPES */
20863+typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params);
20864+#endif
20865+
20866+#ifndef GL_EXT_texture_env_dot3
20867+#define GL_EXT_texture_env_dot3 1
20868+#endif
20869+
20870+#ifndef GL_ATI_texture_mirror_once
20871+#define GL_ATI_texture_mirror_once 1
20872+#endif
20873+
20874+#ifndef GL_NV_fence
20875+#define GL_NV_fence 1
20876+#ifdef GL_GLEXT_PROTOTYPES
20877+GLAPI void APIENTRY glDeleteFencesNV (GLsizei, const GLuint *);
20878+GLAPI void APIENTRY glGenFencesNV (GLsizei, GLuint *);
20879+GLAPI GLboolean APIENTRY glIsFenceNV (GLuint);
20880+GLAPI GLboolean APIENTRY glTestFenceNV (GLuint);
20881+GLAPI void APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *);
20882+GLAPI void APIENTRY glFinishFenceNV (GLuint);
20883+GLAPI void APIENTRY glSetFenceNV (GLuint, GLenum);
20884+#endif /* GL_GLEXT_PROTOTYPES */
20885+typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
20886+typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
20887+typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
20888+typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
20889+typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
20890+typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
20891+typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
20892+#endif
20893+
20894+#ifndef GL_NV_evaluators
20895+#define GL_NV_evaluators 1
20896+#ifdef GL_GLEXT_PROTOTYPES
20897+GLAPI void APIENTRY glMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLint, GLint, GLboolean, const GLvoid *);
20898+GLAPI void APIENTRY glMapParameterivNV (GLenum, GLenum, const GLint *);
20899+GLAPI void APIENTRY glMapParameterfvNV (GLenum, GLenum, const GLfloat *);
20900+GLAPI void APIENTRY glGetMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLboolean, GLvoid *);
20901+GLAPI void APIENTRY glGetMapParameterivNV (GLenum, GLenum, GLint *);
20902+GLAPI void APIENTRY glGetMapParameterfvNV (GLenum, GLenum, GLfloat *);
20903+GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum, GLuint, GLenum, GLint *);
20904+GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum, GLuint, GLenum, GLfloat *);
20905+GLAPI void APIENTRY glEvalMapsNV (GLenum, GLenum);
20906+#endif /* GL_GLEXT_PROTOTYPES */
20907+typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points);
20908+typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params);
20909+typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params);
20910+typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points);
20911+typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params);
20912+typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params);
20913+typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
20914+typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
20915+typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode);
20916+#endif
20917+
20918+#ifndef GL_NV_packed_depth_stencil
20919+#define GL_NV_packed_depth_stencil 1
20920+#endif
20921+
20922+#ifndef GL_NV_register_combiners2
20923+#define GL_NV_register_combiners2 1
20924+#ifdef GL_GLEXT_PROTOTYPES
20925+GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum, GLenum, const GLfloat *);
20926+GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum, GLenum, GLfloat *);
20927+#endif /* GL_GLEXT_PROTOTYPES */
20928+typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params);
20929+typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params);
20930+#endif
20931+
20932+#ifndef GL_NV_texture_compression_vtc
20933+#define GL_NV_texture_compression_vtc 1
20934+#endif
20935+
20936+#ifndef GL_NV_texture_rectangle
20937+#define GL_NV_texture_rectangle 1
20938+#endif
20939+
20940+#ifndef GL_NV_texture_shader
20941+#define GL_NV_texture_shader 1
20942+#endif
20943+
20944+#ifndef GL_NV_texture_shader2
20945+#define GL_NV_texture_shader2 1
20946+#endif
20947+
20948+#ifndef GL_NV_vertex_array_range2
20949+#define GL_NV_vertex_array_range2 1
20950+#endif
20951+
20952+#ifndef GL_NV_vertex_program
20953+#define GL_NV_vertex_program 1
20954+#ifdef GL_GLEXT_PROTOTYPES
20955+GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei, const GLuint *, GLboolean *);
20956+GLAPI void APIENTRY glBindProgramNV (GLenum, GLuint);
20957+GLAPI void APIENTRY glDeleteProgramsNV (GLsizei, const GLuint *);
20958+GLAPI void APIENTRY glExecuteProgramNV (GLenum, GLuint, const GLfloat *);
20959+GLAPI void APIENTRY glGenProgramsNV (GLsizei, GLuint *);
20960+GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum, GLuint, GLenum, GLdouble *);
20961+GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum, GLuint, GLenum, GLfloat *);
20962+GLAPI void APIENTRY glGetProgramivNV (GLuint, GLenum, GLint *);
20963+GLAPI void APIENTRY glGetProgramStringNV (GLuint, GLenum, GLubyte *);
20964+GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum, GLuint, GLenum, GLint *);
20965+GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint, GLenum, GLdouble *);
20966+GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint, GLenum, GLfloat *);
20967+GLAPI void APIENTRY glGetVertexAttribivNV (GLuint, GLenum, GLint *);
20968+GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint, GLenum, GLvoid* *);
20969+GLAPI GLboolean APIENTRY glIsProgramNV (GLuint);
20970+GLAPI void APIENTRY glLoadProgramNV (GLenum, GLuint, GLsizei, const GLubyte *);
20971+GLAPI void APIENTRY glProgramParameter4dNV (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
20972+GLAPI void APIENTRY glProgramParameter4dvNV (GLenum, GLuint, const GLdouble *);
20973+GLAPI void APIENTRY glProgramParameter4fNV (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
20974+GLAPI void APIENTRY glProgramParameter4fvNV (GLenum, GLuint, const GLfloat *);
20975+GLAPI void APIENTRY glProgramParameters4dvNV (GLenum, GLuint, GLuint, const GLdouble *);
20976+GLAPI void APIENTRY glProgramParameters4fvNV (GLenum, GLuint, GLuint, const GLfloat *);
20977+GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei, const GLuint *);
20978+GLAPI void APIENTRY glTrackMatrixNV (GLenum, GLuint, GLenum, GLenum);
20979+GLAPI void APIENTRY glVertexAttribPointerNV (GLuint, GLint, GLenum, GLsizei, const GLvoid *);
20980+GLAPI void APIENTRY glVertexAttrib1dNV (GLuint, GLdouble);
20981+GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint, const GLdouble *);
20982+GLAPI void APIENTRY glVertexAttrib1fNV (GLuint, GLfloat);
20983+GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint, const GLfloat *);
20984+GLAPI void APIENTRY glVertexAttrib1sNV (GLuint, GLshort);
20985+GLAPI void APIENTRY glVertexAttrib1svNV (GLuint, const GLshort *);
20986+GLAPI void APIENTRY glVertexAttrib2dNV (GLuint, GLdouble, GLdouble);
20987+GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint, const GLdouble *);
20988+GLAPI void APIENTRY glVertexAttrib2fNV (GLuint, GLfloat, GLfloat);
20989+GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint, const GLfloat *);
20990+GLAPI void APIENTRY glVertexAttrib2sNV (GLuint, GLshort, GLshort);
20991+GLAPI void APIENTRY glVertexAttrib2svNV (GLuint, const GLshort *);
20992+GLAPI void APIENTRY glVertexAttrib3dNV (GLuint, GLdouble, GLdouble, GLdouble);
20993+GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint, const GLdouble *);
20994+GLAPI void APIENTRY glVertexAttrib3fNV (GLuint, GLfloat, GLfloat, GLfloat);
20995+GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint, const GLfloat *);
20996+GLAPI void APIENTRY glVertexAttrib3sNV (GLuint, GLshort, GLshort, GLshort);
20997+GLAPI void APIENTRY glVertexAttrib3svNV (GLuint, const GLshort *);
20998+GLAPI void APIENTRY glVertexAttrib4dNV (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
20999+GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint, const GLdouble *);
21000+GLAPI void APIENTRY glVertexAttrib4fNV (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
21001+GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint, const GLfloat *);
21002+GLAPI void APIENTRY glVertexAttrib4sNV (GLuint, GLshort, GLshort, GLshort, GLshort);
21003+GLAPI void APIENTRY glVertexAttrib4svNV (GLuint, const GLshort *);
21004+GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
21005+GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint, const GLubyte *);
21006+GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint, GLsizei, const GLdouble *);
21007+GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint, GLsizei, const GLfloat *);
21008+GLAPI void APIENTRY glVertexAttribs1svNV (GLuint, GLsizei, const GLshort *);
21009+GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint, GLsizei, const GLdouble *);
21010+GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint, GLsizei, const GLfloat *);
21011+GLAPI void APIENTRY glVertexAttribs2svNV (GLuint, GLsizei, const GLshort *);
21012+GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint, GLsizei, const GLdouble *);
21013+GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint, GLsizei, const GLfloat *);
21014+GLAPI void APIENTRY glVertexAttribs3svNV (GLuint, GLsizei, const GLshort *);
21015+GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint, GLsizei, const GLdouble *);
21016+GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint, GLsizei, const GLfloat *);
21017+GLAPI void APIENTRY glVertexAttribs4svNV (GLuint, GLsizei, const GLshort *);
21018+GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint, GLsizei, const GLubyte *);
21019+#endif /* GL_GLEXT_PROTOTYPES */
21020+typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences);
21021+typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id);
21022+typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
21023+typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params);
21024+typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs);
21025+typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params);
21026+typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
21027+typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params);
21028+typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program);
21029+typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params);
21030+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params);
21031+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params);
21032+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params);
21033+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
21034+typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id);
21035+typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
21036+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
21037+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v);
21038+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
21039+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v);
21040+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint count, const GLdouble *v);
21041+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint count, const GLfloat *v);
21042+typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
21043+typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform);
21044+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer);
21045+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x);
21046+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v);
21047+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x);
21048+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v);
21049+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x);
21050+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v);
21051+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y);
21052+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v);
21053+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y);
21054+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v);
21055+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y);
21056+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v);
21057+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
21058+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v);
21059+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
21060+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v);
21061+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
21062+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v);
21063+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
21064+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v);
21065+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
21066+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v);
21067+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
21068+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v);
21069+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
21070+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v);
21071+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
21072+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
21073+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
21074+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
21075+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
21076+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
21077+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
21078+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
21079+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
21080+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
21081+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
21082+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
21083+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v);
21084+#endif
21085+
21086+#ifndef GL_SGIX_texture_coordinate_clamp
21087+#define GL_SGIX_texture_coordinate_clamp 1
21088+#endif
21089+
21090+#ifndef GL_SGIX_scalebias_hint
21091+#define GL_SGIX_scalebias_hint 1
21092+#endif
21093+
21094+#ifndef GL_OML_interlace
21095+#define GL_OML_interlace 1
21096+#endif
21097+
21098+#ifndef GL_OML_subsample
21099+#define GL_OML_subsample 1
21100+#endif
21101+
21102+#ifndef GL_OML_resample
21103+#define GL_OML_resample 1
21104+#endif
21105+
21106+#ifndef GL_NV_copy_depth_to_color
21107+#define GL_NV_copy_depth_to_color 1
21108+#endif
21109+
21110+#ifndef GL_ATI_envmap_bumpmap
21111+#define GL_ATI_envmap_bumpmap 1
21112+#ifdef GL_GLEXT_PROTOTYPES
21113+GLAPI void APIENTRY glTexBumpParameterivATI (GLenum, const GLint *);
21114+GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum, const GLfloat *);
21115+GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum, GLint *);
21116+GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum, GLfloat *);
21117+#endif /* GL_GLEXT_PROTOTYPES */
21118+typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param);
21119+typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param);
21120+typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param);
21121+typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param);
21122+#endif
21123+
21124+#ifndef GL_ATI_fragment_shader
21125+#define GL_ATI_fragment_shader 1
21126+#ifdef GL_GLEXT_PROTOTYPES
21127+GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint);
21128+GLAPI void APIENTRY glBindFragmentShaderATI (GLuint);
21129+GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint);
21130+GLAPI void APIENTRY glBeginFragmentShaderATI (void);
21131+GLAPI void APIENTRY glEndFragmentShaderATI (void);
21132+GLAPI void APIENTRY glPassTexCoordATI (GLuint, GLuint, GLenum);
21133+GLAPI void APIENTRY glSampleMapATI (GLuint, GLuint, GLenum);
21134+GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21135+GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21136+GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21137+GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
21138+GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21139+GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
21140+GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint, const GLfloat *);
21141+#endif /* GL_GLEXT_PROTOTYPES */
21142+typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range);
21143+typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id);
21144+typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id);
21145+typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void);
21146+typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void);
21147+typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle);
21148+typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle);
21149+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
21150+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
21151+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);
21152+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
21153+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
21154+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);
21155+typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value);
21156+#endif
21157+
21158+#ifndef GL_ATI_pn_triangles
21159+#define GL_ATI_pn_triangles 1
21160+#ifdef GL_GLEXT_PROTOTYPES
21161+GLAPI void APIENTRY glPNTrianglesiATI (GLenum, GLint);
21162+GLAPI void APIENTRY glPNTrianglesfATI (GLenum, GLfloat);
21163+#endif /* GL_GLEXT_PROTOTYPES */
21164+typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param);
21165+typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param);
21166+#endif
21167+
21168+#ifndef GL_ATI_vertex_array_object
21169+#define GL_ATI_vertex_array_object 1
21170+#ifdef GL_GLEXT_PROTOTYPES
21171+GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei, const GLvoid *, GLenum);
21172+GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint);
21173+GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint, GLuint, GLsizei, const GLvoid *, GLenum);
21174+GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint, GLenum, GLfloat *);
21175+GLAPI void APIENTRY glGetObjectBufferivATI (GLuint, GLenum, GLint *);
21176+GLAPI void APIENTRY glFreeObjectBufferATI (GLuint);
21177+/* ERO Begin */
21178+GLAPI void APIENTRY glDeleteObjectBufferATI (GLuint);
21179+/* ERO End */
21180+GLAPI void APIENTRY glArrayObjectATI (GLenum, GLint, GLenum, GLsizei, GLuint, GLuint);
21181+GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum, GLenum, GLfloat *);
21182+GLAPI void APIENTRY glGetArrayObjectivATI (GLenum, GLenum, GLint *);
21183+GLAPI void APIENTRY glVariantArrayObjectATI (GLuint, GLenum, GLsizei, GLuint, GLuint);
21184+GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint, GLenum, GLfloat *);
21185+GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint, GLenum, GLint *);
21186+#endif /* GL_GLEXT_PROTOTYPES */
21187+typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage);
21188+typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer);
21189+typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve);
21190+typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params);
21191+typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params);
21192+typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer);
21193+typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
21194+typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params);
21195+typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params);
21196+typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
21197+typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params);
21198+typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params);
21199+#endif
21200+
21201+#ifndef GL_EXT_vertex_shader
21202+#define GL_EXT_vertex_shader 1
21203+#ifdef GL_GLEXT_PROTOTYPES
21204+GLAPI void APIENTRY glBeginVertexShaderEXT (void);
21205+GLAPI void APIENTRY glEndVertexShaderEXT (void);
21206+GLAPI void APIENTRY glBindVertexShaderEXT (GLuint);
21207+GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint);
21208+GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint);
21209+GLAPI void APIENTRY glShaderOp1EXT (GLenum, GLuint, GLuint);
21210+GLAPI void APIENTRY glShaderOp2EXT (GLenum, GLuint, GLuint, GLuint);
21211+GLAPI void APIENTRY glShaderOp3EXT (GLenum, GLuint, GLuint, GLuint, GLuint);
21212+GLAPI void APIENTRY glSwizzleEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum);
21213+GLAPI void APIENTRY glWriteMaskEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum);
21214+GLAPI void APIENTRY glInsertComponentEXT (GLuint, GLuint, GLuint);
21215+GLAPI void APIENTRY glExtractComponentEXT (GLuint, GLuint, GLuint);
21216+GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum, GLenum, GLenum, GLuint);
21217+GLAPI void APIENTRY glSetInvariantEXT (GLuint, GLenum, const GLvoid *);
21218+GLAPI void APIENTRY glSetLocalConstantEXT (GLuint, GLenum, const GLvoid *);
21219+GLAPI void APIENTRY glVariantbvEXT (GLuint, const GLbyte *);
21220+GLAPI void APIENTRY glVariantsvEXT (GLuint, const GLshort *);
21221+GLAPI void APIENTRY glVariantivEXT (GLuint, const GLint *);
21222+GLAPI void APIENTRY glVariantfvEXT (GLuint, const GLfloat *);
21223+GLAPI void APIENTRY glVariantdvEXT (GLuint, const GLdouble *);
21224+GLAPI void APIENTRY glVariantubvEXT (GLuint, const GLubyte *);
21225+GLAPI void APIENTRY glVariantusvEXT (GLuint, const GLushort *);
21226+GLAPI void APIENTRY glVariantuivEXT (GLuint, const GLuint *);
21227+GLAPI void APIENTRY glVariantPointerEXT (GLuint, GLenum, GLuint, const GLvoid *);
21228+GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint);
21229+GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint);
21230+GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum, GLenum);
21231+GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum, GLenum);
21232+GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum, GLenum, GLenum);
21233+GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum, GLenum);
21234+GLAPI GLuint APIENTRY glBindParameterEXT (GLenum);
21235+GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint, GLenum);
21236+GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint, GLenum, GLboolean *);
21237+GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint, GLenum, GLint *);
21238+GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint, GLenum, GLfloat *);
21239+GLAPI void APIENTRY glGetVariantPointervEXT (GLuint, GLenum, GLvoid* *);
21240+GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint, GLenum, GLboolean *);
21241+GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint, GLenum, GLint *);
21242+GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint, GLenum, GLfloat *);
21243+GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint, GLenum, GLboolean *);
21244+GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint, GLenum, GLint *);
21245+GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint, GLenum, GLfloat *);
21246+#endif /* GL_GLEXT_PROTOTYPES */
21247+typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void);
21248+typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void);
21249+typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id);
21250+typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range);
21251+typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id);
21252+typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1);
21253+typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
21254+typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
21255+typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
21256+typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
21257+typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
21258+typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
21259+typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);
21260+typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);
21261+typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);
21262+typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr);
21263+typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr);
21264+typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr);
21265+typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr);
21266+typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr);
21267+typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr);
21268+typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr);
21269+typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr);
21270+typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr);
21271+typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
21272+typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
21273+typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value);
21274+typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value);
21275+typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value);
21276+typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value);
21277+typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value);
21278+typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap);
21279+typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
21280+typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
21281+typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
21282+typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data);
21283+typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
21284+typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
21285+typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
21286+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
21287+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
21288+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
21289+#endif
21290+
21291+#ifndef GL_ATI_vertex_streams
21292+#define GL_ATI_vertex_streams 1
21293+#ifdef GL_GLEXT_PROTOTYPES
21294+GLAPI void APIENTRY glVertexStream1sATI (GLenum, GLshort);
21295+GLAPI void APIENTRY glVertexStream1svATI (GLenum, const GLshort *);
21296+GLAPI void APIENTRY glVertexStream1iATI (GLenum, GLint);
21297+GLAPI void APIENTRY glVertexStream1ivATI (GLenum, const GLint *);
21298+GLAPI void APIENTRY glVertexStream1fATI (GLenum, GLfloat);
21299+GLAPI void APIENTRY glVertexStream1fvATI (GLenum, const GLfloat *);
21300+GLAPI void APIENTRY glVertexStream1dATI (GLenum, GLdouble);
21301+GLAPI void APIENTRY glVertexStream1dvATI (GLenum, const GLdouble *);
21302+GLAPI void APIENTRY glVertexStream2sATI (GLenum, GLshort, GLshort);
21303+GLAPI void APIENTRY glVertexStream2svATI (GLenum, const GLshort *);
21304+GLAPI void APIENTRY glVertexStream2iATI (GLenum, GLint, GLint);
21305+GLAPI void APIENTRY glVertexStream2ivATI (GLenum, const GLint *);
21306+GLAPI void APIENTRY glVertexStream2fATI (GLenum, GLfloat, GLfloat);
21307+GLAPI void APIENTRY glVertexStream2fvATI (GLenum, const GLfloat *);
21308+GLAPI void APIENTRY glVertexStream2dATI (GLenum, GLdouble, GLdouble);
21309+GLAPI void APIENTRY glVertexStream2dvATI (GLenum, const GLdouble *);
21310+GLAPI void APIENTRY glVertexStream3sATI (GLenum, GLshort, GLshort, GLshort);
21311+GLAPI void APIENTRY glVertexStream3svATI (GLenum, const GLshort *);
21312+GLAPI void APIENTRY glVertexStream3iATI (GLenum, GLint, GLint, GLint);
21313+GLAPI void APIENTRY glVertexStream3ivATI (GLenum, const GLint *);
21314+GLAPI void APIENTRY glVertexStream3fATI (GLenum, GLfloat, GLfloat, GLfloat);
21315+GLAPI void APIENTRY glVertexStream3fvATI (GLenum, const GLfloat *);
21316+GLAPI void APIENTRY glVertexStream3dATI (GLenum, GLdouble, GLdouble, GLdouble);
21317+GLAPI void APIENTRY glVertexStream3dvATI (GLenum, const GLdouble *);
21318+GLAPI void APIENTRY glVertexStream4sATI (GLenum, GLshort, GLshort, GLshort, GLshort);
21319+GLAPI void APIENTRY glVertexStream4svATI (GLenum, const GLshort *);
21320+GLAPI void APIENTRY glVertexStream4iATI (GLenum, GLint, GLint, GLint, GLint);
21321+GLAPI void APIENTRY glVertexStream4ivATI (GLenum, const GLint *);
21322+GLAPI void APIENTRY glVertexStream4fATI (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
21323+GLAPI void APIENTRY glVertexStream4fvATI (GLenum, const GLfloat *);
21324+GLAPI void APIENTRY glVertexStream4dATI (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
21325+GLAPI void APIENTRY glVertexStream4dvATI (GLenum, const GLdouble *);
21326+GLAPI void APIENTRY glNormalStream3bATI (GLenum, GLbyte, GLbyte, GLbyte);
21327+GLAPI void APIENTRY glNormalStream3bvATI (GLenum, const GLbyte *);
21328+GLAPI void APIENTRY glNormalStream3sATI (GLenum, GLshort, GLshort, GLshort);
21329+GLAPI void APIENTRY glNormalStream3svATI (GLenum, const GLshort *);
21330+GLAPI void APIENTRY glNormalStream3iATI (GLenum, GLint, GLint, GLint);
21331+GLAPI void APIENTRY glNormalStream3ivATI (GLenum, const GLint *);
21332+GLAPI void APIENTRY glNormalStream3fATI (GLenum, GLfloat, GLfloat, GLfloat);
21333+GLAPI void APIENTRY glNormalStream3fvATI (GLenum, const GLfloat *);
21334+GLAPI void APIENTRY glNormalStream3dATI (GLenum, GLdouble, GLdouble, GLdouble);
21335+GLAPI void APIENTRY glNormalStream3dvATI (GLenum, const GLdouble *);
21336+GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum);
21337+GLAPI void APIENTRY glVertexBlendEnviATI (GLenum, GLint);
21338+GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum, GLfloat);
21339+#endif /* GL_GLEXT_PROTOTYPES */
21340+typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x);
21341+typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords);
21342+typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x);
21343+typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords);
21344+typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x);
21345+typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords);
21346+typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x);
21347+typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords);
21348+typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y);
21349+typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords);
21350+typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y);
21351+typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords);
21352+typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y);
21353+typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords);
21354+typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y);
21355+typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords);
21356+typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z);
21357+typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
21358+typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z);
21359+typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
21360+typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
21361+typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
21362+typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
21363+typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
21364+typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
21365+typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords);
21366+typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w);
21367+typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords);
21368+typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
21369+typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords);
21370+typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
21371+typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords);
21372+typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);
21373+typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords);
21374+typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz);
21375+typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
21376+typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz);
21377+typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
21378+typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);
21379+typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
21380+typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);
21381+typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
21382+typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream);
21383+typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param);
21384+typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param);
21385+#endif
21386+
21387+#ifndef GL_ATI_element_array
21388+#define GL_ATI_element_array 1
21389+#ifdef GL_GLEXT_PROTOTYPES
21390+GLAPI void APIENTRY glElementPointerATI (GLenum, const GLvoid *);
21391+GLAPI void APIENTRY glDrawElementArrayATI (GLenum, GLsizei);
21392+GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum, GLuint, GLuint, GLsizei);
21393+#endif /* GL_GLEXT_PROTOTYPES */
21394+typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer);
21395+typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count);
21396+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count);
21397+#endif
21398+
21399+#ifndef GL_SUN_mesh_array
21400+#define GL_SUN_mesh_array 1
21401+#ifdef GL_GLEXT_PROTOTYPES
21402+GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum, GLint, GLsizei, GLsizei);
21403+#endif /* GL_GLEXT_PROTOTYPES */
21404+typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width);
21405+#endif
21406+
21407+#ifndef GL_SUN_slice_accum
21408+#define GL_SUN_slice_accum 1
21409+#endif
21410+
21411+#ifndef GL_NV_multisample_filter_hint
21412+#define GL_NV_multisample_filter_hint 1
21413+#endif
21414+
21415+#ifndef GL_NV_depth_clamp
21416+#define GL_NV_depth_clamp 1
21417+#endif
21418+
21419+#ifndef GL_NV_occlusion_query
21420+#define GL_NV_occlusion_query 1
21421+#ifdef GL_GLEXT_PROTOTYPES
21422+GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei, GLuint *);
21423+GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei, const GLuint *);
21424+GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint);
21425+GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint);
21426+GLAPI void APIENTRY glEndOcclusionQueryNV (void);
21427+GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint, GLenum, GLint *);
21428+GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint, GLenum, GLuint *);
21429+#endif /* GL_GLEXT_PROTOTYPES */
21430+typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids);
21431+typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids);
21432+typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id);
21433+typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id);
21434+typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void);
21435+typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params);
21436+typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params);
21437+#endif
21438+
21439+#ifndef GL_NV_point_sprite
21440+#define GL_NV_point_sprite 1
21441+#ifdef GL_GLEXT_PROTOTYPES
21442+GLAPI void APIENTRY glPointParameteriNV (GLenum, GLint);
21443+GLAPI void APIENTRY glPointParameterivNV (GLenum, const GLint *);
21444+#endif /* GL_GLEXT_PROTOTYPES */
21445+typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param);
21446+typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
21447+#endif
21448+
21449+#ifndef GL_NV_texture_shader3
21450+#define GL_NV_texture_shader3 1
21451+#endif
21452+
21453+#ifndef GL_NV_vertex_program1_1
21454+#define GL_NV_vertex_program1_1 1
21455+#endif
21456+
21457+#ifndef GL_EXT_shadow_funcs
21458+#define GL_EXT_shadow_funcs 1
21459+#endif
21460+
21461+#ifndef GL_EXT_stencil_two_side
21462+#define GL_EXT_stencil_two_side 1
21463+#ifdef GL_GLEXT_PROTOTYPES
21464+GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum);
21465+#endif /* GL_GLEXT_PROTOTYPES */
21466+typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face);
21467+#endif
21468+
21469+#ifndef GL_ATI_text_fragment_shader
21470+#define GL_ATI_text_fragment_shader 1
21471+#endif
21472+
21473+#ifndef GL_APPLE_client_storage
21474+#define GL_APPLE_client_storage 1
21475+#endif
21476+
21477+#ifndef GL_APPLE_element_array
21478+#define GL_APPLE_element_array 1
21479+#ifdef GL_GLEXT_PROTOTYPES
21480+GLAPI void APIENTRY glElementPointerAPPLE (GLenum, const GLvoid *);
21481+GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum, GLint, GLsizei);
21482+GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, GLint, GLsizei);
21483+GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum, const GLint *, const GLsizei *, GLsizei);
21484+GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, const GLint *, const GLsizei *, GLsizei);
21485+#endif /* GL_GLEXT_PROTOTYPES */
21486+typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid *pointer);
21487+typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count);
21488+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
21489+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
21490+typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);
21491+#endif
21492+
21493+#ifndef GL_APPLE_fence
21494+#define GL_APPLE_fence 1
21495+#ifdef GL_GLEXT_PROTOTYPES
21496+GLAPI void APIENTRY glGenFencesAPPLE (GLsizei, GLuint *);
21497+GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei, const GLuint *);
21498+GLAPI void APIENTRY glSetFenceAPPLE (GLuint);
21499+GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint);
21500+GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint);
21501+GLAPI void APIENTRY glFinishFenceAPPLE (GLuint);
21502+GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum, GLuint);
21503+GLAPI void APIENTRY glFinishObjectAPPLE (GLenum, GLint);
21504+#endif /* GL_GLEXT_PROTOTYPES */
21505+typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences);
21506+typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences);
21507+typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence);
21508+typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence);
21509+typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence);
21510+typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence);
21511+typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name);
21512+typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);
21513+#endif
21514+
21515+#ifndef GL_APPLE_vertex_array_object
21516+#define GL_APPLE_vertex_array_object 1
21517+#ifdef GL_GLEXT_PROTOTYPES
21518+GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint);
21519+GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei, const GLuint *);
21520+GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, GLuint *);
21521+GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint);
21522+#endif /* GL_GLEXT_PROTOTYPES */
21523+typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
21524+typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
21525+typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);
21526+typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
21527+#endif
21528+
21529+#ifndef GL_APPLE_vertex_array_range
21530+#define GL_APPLE_vertex_array_range 1
21531+#ifdef GL_GLEXT_PROTOTYPES
21532+GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei, GLvoid *);
21533+GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei, GLvoid *);
21534+GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum, GLint);
21535+#endif /* GL_GLEXT_PROTOTYPES */
21536+typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);
21537+typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);
21538+typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param);
21539+#endif
21540+
21541+#ifndef GL_APPLE_ycbcr_422
21542+#define GL_APPLE_ycbcr_422 1
21543+#endif
21544+
21545+#ifndef GL_S3_s3tc
21546+#define GL_S3_s3tc 1
21547+#endif
21548+
21549+#ifndef GL_ATI_draw_buffers
21550+#define GL_ATI_draw_buffers 1
21551+#ifdef GL_GLEXT_PROTOTYPES
21552+GLAPI void APIENTRY glDrawBuffersATI (GLsizei, const GLenum *);
21553+#endif /* GL_GLEXT_PROTOTYPES */
21554+typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs);
21555+#endif
21556+
21557+#ifndef GL_ATI_pixel_format_float
21558+#define GL_ATI_pixel_format_float 1
21559+/* This is really a WGL extension, but defines some associated GL enums.
21560+ * ATI does not export "GL_ATI_pixel_format_float" in the GL_EXTENSIONS string.
21561+ */
21562+#endif
21563+
21564+#ifndef GL_ATI_texture_env_combine3
21565+#define GL_ATI_texture_env_combine3 1
21566+#endif
21567+
21568+#ifndef GL_ATI_texture_float
21569+#define GL_ATI_texture_float 1
21570+#endif
21571+
21572+#ifndef GL_NV_float_buffer
21573+#define GL_NV_float_buffer 1
21574+#endif
21575+
21576+#ifndef GL_NV_fragment_program
21577+#define GL_NV_fragment_program 1
21578+/* Some NV_fragment_program entry points are shared with ARB_vertex_program. */
21579+#ifdef GL_GLEXT_PROTOTYPES
21580+GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat);
21581+GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble);
21582+GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint, GLsizei, const GLubyte *, const GLfloat *);
21583+GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint, GLsizei, const GLubyte *, const GLdouble *);
21584+GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint, GLsizei, const GLubyte *, GLfloat *);
21585+GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint, GLsizei, const GLubyte *, GLdouble *);
21586+#endif /* GL_GLEXT_PROTOTYPES */
21587+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
21588+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
21589+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
21590+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
21591+typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
21592+typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
21593+#endif
21594+
21595+#ifndef GL_NV_half_float
21596+#define GL_NV_half_float 1
21597+#ifdef GL_GLEXT_PROTOTYPES
21598+GLAPI void APIENTRY glVertex2hNV (GLhalfNV, GLhalfNV);
21599+GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *);
21600+GLAPI void APIENTRY glVertex3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21601+GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *);
21602+GLAPI void APIENTRY glVertex4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21603+GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *);
21604+GLAPI void APIENTRY glNormal3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21605+GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *);
21606+GLAPI void APIENTRY glColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21607+GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *);
21608+GLAPI void APIENTRY glColor4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21609+GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *);
21610+GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV);
21611+GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *);
21612+GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV, GLhalfNV);
21613+GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *);
21614+GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21615+GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *);
21616+GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21617+GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *);
21618+GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum, GLhalfNV);
21619+GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum, const GLhalfNV *);
21620+GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum, GLhalfNV, GLhalfNV);
21621+GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum, const GLhalfNV *);
21622+GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV);
21623+GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum, const GLhalfNV *);
21624+GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21625+GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum, const GLhalfNV *);
21626+GLAPI void APIENTRY glFogCoordhNV (GLhalfNV);
21627+GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *);
21628+GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV);
21629+GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *);
21630+GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV);
21631+GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *);
21632+GLAPI void APIENTRY glVertexAttrib1hNV (GLuint, GLhalfNV);
21633+GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint, const GLhalfNV *);
21634+GLAPI void APIENTRY glVertexAttrib2hNV (GLuint, GLhalfNV, GLhalfNV);
21635+GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint, const GLhalfNV *);
21636+GLAPI void APIENTRY glVertexAttrib3hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV);
21637+GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint, const GLhalfNV *);
21638+GLAPI void APIENTRY glVertexAttrib4hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV);
21639+GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint, const GLhalfNV *);
21640+GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint, GLsizei, const GLhalfNV *);
21641+GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint, GLsizei, const GLhalfNV *);
21642+GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint, GLsizei, const GLhalfNV *);
21643+GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint, GLsizei, const GLhalfNV *);
21644+#endif /* GL_GLEXT_PROTOTYPES */
21645+typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y);
21646+typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v);
21647+typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z);
21648+typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v);
21649+typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
21650+typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v);
21651+typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);
21652+typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v);
21653+typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
21654+typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v);
21655+typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);
21656+typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v);
21657+typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s);
21658+typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v);
21659+typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t);
21660+typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v);
21661+typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r);
21662+typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v);
21663+typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
21664+typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v);
21665+typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s);
21666+typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v);
21667+typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t);
21668+typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v);
21669+typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);
21670+typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v);
21671+typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
21672+typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v);
21673+typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog);
21674+typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog);
21675+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
21676+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v);
21677+typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight);
21678+typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight);
21679+typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x);
21680+typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v);
21681+typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y);
21682+typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v);
21683+typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);
21684+typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v);
21685+typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
21686+typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v);
21687+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21688+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21689+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21690+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
21691+#endif
21692+
21693+#ifndef GL_NV_pixel_data_range
21694+#define GL_NV_pixel_data_range 1
21695+#ifdef GL_GLEXT_PROTOTYPES
21696+GLAPI void APIENTRY glPixelDataRangeNV (GLenum, GLsizei, GLvoid *);
21697+GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum);
21698+#endif /* GL_GLEXT_PROTOTYPES */
21699+typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, GLvoid *pointer);
21700+typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target);
21701+#endif
21702+
21703+#ifndef GL_NV_primitive_restart
21704+#define GL_NV_primitive_restart 1
21705+#ifdef GL_GLEXT_PROTOTYPES
21706+GLAPI void APIENTRY glPrimitiveRestartNV (void);
21707+GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint);
21708+#endif /* GL_GLEXT_PROTOTYPES */
21709+typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void);
21710+typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index);
21711+#endif
21712+
21713+#ifndef GL_NV_texture_expand_normal
21714+#define GL_NV_texture_expand_normal 1
21715+#endif
21716+
21717+#ifndef GL_NV_vertex_program2
21718+#define GL_NV_vertex_program2 1
21719+#endif
21720+
21721+#ifndef GL_ATI_map_object_buffer
21722+#define GL_ATI_map_object_buffer 1
21723+#ifdef GL_GLEXT_PROTOTYPES
21724+GLAPI GLvoid* APIENTRY glMapObjectBufferATI (GLuint);
21725+GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint);
21726+#endif /* GL_GLEXT_PROTOTYPES */
21727+typedef GLvoid* (APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer);
21728+typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer);
21729+#endif
21730+
21731+#ifndef GL_ATI_separate_stencil
21732+#define GL_ATI_separate_stencil 1
21733+#ifdef GL_GLEXT_PROTOTYPES
21734+GLAPI void APIENTRY glStencilOpSeparateATI (GLenum, GLenum, GLenum, GLenum);
21735+GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum, GLenum, GLint, GLuint);
21736+#endif /* GL_GLEXT_PROTOTYPES */
21737+typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
21738+typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
21739+#endif
21740+
21741+#ifndef GL_ATI_vertex_attrib_array_object
21742+#define GL_ATI_vertex_attrib_array_object 1
21743+#ifdef GL_GLEXT_PROTOTYPES
21744+GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint, GLint, GLenum, GLboolean, GLsizei, GLuint, GLuint);
21745+GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint, GLenum, GLfloat *);
21746+GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint, GLenum, GLint *);
21747+#endif /* GL_GLEXT_PROTOTYPES */
21748+typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
21749+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params);
21750+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params);
21751+#endif
21752+
21753+#ifndef GL_OES_read_format
21754+#define GL_OES_read_format 1
21755+#endif
21756+
21757+#ifndef GL_EXT_depth_bounds_test
21758+#define GL_EXT_depth_bounds_test 1
21759+#ifdef GL_GLEXT_PROTOTYPES
21760+GLAPI void APIENTRY glDepthBoundsEXT (GLclampd, GLclampd);
21761+#endif /* GL_GLEXT_PROTOTYPES */
21762+typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax);
21763+#endif
21764+
21765+#ifndef GL_EXT_texture_mirror_clamp
21766+#define GL_EXT_texture_mirror_clamp 1
21767+#endif
21768+
21769+#ifndef GL_EXT_blend_equation_separate
21770+#define GL_EXT_blend_equation_separate 1
21771+#ifdef GL_GLEXT_PROTOTYPES
21772+GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum, GLenum);
21773+#endif /* GL_GLEXT_PROTOTYPES */
21774+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha);
21775+#endif
21776+
21777+#ifndef GL_MESA_pack_invert
21778+#define GL_MESA_pack_invert 1
21779+#endif
21780+
21781+#ifndef GL_MESA_ycbcr_texture
21782+#define GL_MESA_ycbcr_texture 1
21783+#endif
21784+
21785+#ifndef GL_EXT_pixel_buffer_object
21786+#define GL_EXT_pixel_buffer_object 1
21787+#endif
21788+
21789+#ifndef GL_NV_fragment_program_option
21790+#define GL_NV_fragment_program_option 1
21791+#endif
21792+
21793+#ifndef GL_NV_fragment_program2
21794+#define GL_NV_fragment_program2 1
21795+#endif
21796+
21797+#ifndef GL_NV_vertex_program2_option
21798+#define GL_NV_vertex_program2_option 1
21799+#endif
21800+
21801+#ifndef GL_NV_vertex_program3
21802+#define GL_NV_vertex_program3 1
21803+#endif
21804+
21805+#ifndef GL_EXT_framebuffer_object
21806+#define GL_EXT_framebuffer_object 1
21807+#ifdef GL_GLEXT_PROTOTYPES
21808+GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint);
21809+GLAPI void APIENTRY glBindRenderbufferEXT (GLenum, GLuint);
21810+GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei, const GLuint *);
21811+GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei, GLuint *);
21812+GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum, GLenum, GLsizei, GLsizei);
21813+GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum, GLenum, GLint *);
21814+GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint);
21815+GLAPI void APIENTRY glBindFramebufferEXT (GLenum, GLuint);
21816+GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei, const GLuint *);
21817+GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei, GLuint *);
21818+GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum);
21819+GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
21820+GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
21821+GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLint);
21822+GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum, GLenum, GLenum, GLuint);
21823+GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum, GLenum, GLenum, GLint *);
21824+GLAPI void APIENTRY glGenerateMipmapEXT (GLenum);
21825+#endif /* GL_GLEXT_PROTOTYPES */
21826+typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);
21827+typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);
21828+typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);
21829+typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);
21830+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
21831+typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
21832+typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);
21833+typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
21834+typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);
21835+typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);
21836+typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);
21837+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
21838+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
21839+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
21840+typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
21841+typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
21842+typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);
21843+#endif
21844+
21845+#ifndef GL_GREMEDY_string_marker
21846+#define GL_GREMEDY_string_marker 1
21847+#ifdef GL_GLEXT_PROTOTYPES
21848+GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei, const GLvoid *);
21849+#endif /* GL_GLEXT_PROTOTYPES */
21850+typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string);
21851+#endif
21852+
21853+#ifndef GL_EXT_packed_depth_stencil
21854+#define GL_EXT_packed_depth_stencil 1
21855+#endif
21856+
21857+#ifndef GL_EXT_stencil_clear_tag
21858+#define GL_EXT_stencil_clear_tag 1
21859+#ifdef GL_GLEXT_PROTOTYPES
21860+GLAPI void APIENTRY glStencilClearTagEXT (GLsizei, GLuint);
21861+#endif /* GL_GLEXT_PROTOTYPES */
21862+typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag);
21863+#endif
21864+
21865+#ifndef GL_EXT_texture_sRGB
21866+#define GL_EXT_texture_sRGB 1
21867+#endif
21868+
21869+#ifndef GL_EXT_framebuffer_blit
21870+#define GL_EXT_framebuffer_blit 1
21871+#ifdef GL_GLEXT_PROTOTYPES
21872+GLAPI void APIENTRY glBlitFramebufferEXT (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum);
21873+#endif /* GL_GLEXT_PROTOTYPES */
21874+typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
21875+#endif
21876+
21877+#ifndef GL_EXT_framebuffer_multisample
21878+#define GL_EXT_framebuffer_multisample 1
21879+#ifdef GL_GLEXT_PROTOTYPES
21880+GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
21881+#endif /* GL_GLEXT_PROTOTYPES */
21882+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
21883+#endif
21884+
21885+#ifndef GL_MESAX_texture_stack
21886+#define GL_MESAX_texture_stack 1
21887+#endif
21888+
21889+#ifndef GL_EXT_timer_query
21890+#define GL_EXT_timer_query 1
21891+#ifdef GL_GLEXT_PROTOTYPES
21892+GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint, GLenum, GLint64EXT *);
21893+GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint, GLenum, GLuint64EXT *);
21894+#endif /* GL_GLEXT_PROTOTYPES */
21895+typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params);
21896+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params);
21897+#endif
21898+
21899+#ifndef GL_EXT_gpu_program_parameters
21900+#define GL_EXT_gpu_program_parameters 1
21901+#ifdef GL_GLEXT_PROTOTYPES
21902+GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *);
21903+GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *);
21904+#endif /* GL_GLEXT_PROTOTYPES */
21905+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
21906+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
21907+#endif
21908+
21909+#ifndef GL_APPLE_flush_buffer_range
21910+#define GL_APPLE_flush_buffer_range 1
21911+#ifdef GL_GLEXT_PROTOTYPES
21912+GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum, GLenum, GLint);
21913+GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum, GLintptr, GLsizeiptr);
21914+#endif /* GL_GLEXT_PROTOTYPES */
21915+typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param);
21916+typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size);
21917+#endif
21918+
21919+#ifndef GL_NV_gpu_program4
21920+#define GL_NV_gpu_program4 1
21921+#ifdef GL_GLEXT_PROTOTYPES
21922+GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint);
21923+GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum, GLuint, const GLint *);
21924+GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *);
21925+GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
21926+GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum, GLuint, const GLuint *);
21927+GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *);
21928+GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint);
21929+GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum, GLuint, const GLint *);
21930+GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *);
21931+GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
21932+GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum, GLuint, const GLuint *);
21933+GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *);
21934+GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum, GLuint, GLint *);
21935+GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum, GLuint, GLuint *);
21936+GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum, GLuint, GLint *);
21937+GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum, GLuint, GLuint *);
21938+#endif /* GL_GLEXT_PROTOTYPES */
21939+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
21940+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
21941+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
21942+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
21943+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
21944+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
21945+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
21946+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
21947+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
21948+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
21949+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
21950+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
21951+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
21952+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
21953+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
21954+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
21955+#endif
21956+
21957+#ifndef GL_NV_geometry_program4
21958+#define GL_NV_geometry_program4 1
21959+#ifdef GL_GLEXT_PROTOTYPES
21960+GLAPI void APIENTRY glProgramVertexLimitNV (GLenum, GLint);
21961+GLAPI void APIENTRY glFramebufferTextureEXT (GLenum, GLenum, GLuint, GLint);
21962+GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum, GLenum, GLuint, GLint, GLint);
21963+GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum, GLenum, GLuint, GLint, GLenum);
21964+#endif /* GL_GLEXT_PROTOTYPES */
21965+typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit);
21966+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
21967+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
21968+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
21969+#endif
21970+
21971+#ifndef GL_EXT_geometry_shader4
21972+#define GL_EXT_geometry_shader4 1
21973+#ifdef GL_GLEXT_PROTOTYPES
21974+GLAPI void APIENTRY glProgramParameteriEXT (GLuint, GLenum, GLint);
21975+#endif /* GL_GLEXT_PROTOTYPES */
21976+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
21977+#endif
21978+
21979+#ifndef GL_NV_vertex_program4
21980+#define GL_NV_vertex_program4 1
21981+#ifdef GL_GLEXT_PROTOTYPES
21982+GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint, GLint);
21983+GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint, GLint, GLint);
21984+GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint, GLint, GLint, GLint);
21985+GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint, GLint, GLint, GLint, GLint);
21986+GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint, GLuint);
21987+GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint, GLuint, GLuint);
21988+GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint, GLuint, GLuint, GLuint);
21989+GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint, GLuint, GLuint, GLuint, GLuint);
21990+GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint, const GLint *);
21991+GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint, const GLint *);
21992+GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint, const GLint *);
21993+GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint, const GLint *);
21994+GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint, const GLuint *);
21995+GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint, const GLuint *);
21996+GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint, const GLuint *);
21997+GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint, const GLuint *);
21998+GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint, const GLbyte *);
21999+GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint, const GLshort *);
22000+GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint, const GLubyte *);
22001+GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint, const GLushort *);
22002+GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint, GLint, GLenum, GLsizei, const GLvoid *);
22003+GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint, GLenum, GLint *);
22004+GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint, GLenum, GLuint *);
22005+#endif /* GL_GLEXT_PROTOTYPES */
22006+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x);
22007+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y);
22008+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z);
22009+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
22010+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x);
22011+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y);
22012+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
22013+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
22014+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v);
22015+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v);
22016+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v);
22017+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v);
22018+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v);
22019+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v);
22020+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v);
22021+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v);
22022+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v);
22023+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v);
22024+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v);
22025+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v);
22026+typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
22027+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params);
22028+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params);
22029+#endif
22030+
22031+#ifndef GL_EXT_gpu_shader4
22032+#define GL_EXT_gpu_shader4 1
22033+#ifdef GL_GLEXT_PROTOTYPES
22034+GLAPI void APIENTRY glGetUniformuivEXT (GLuint, GLint, GLuint *);
22035+GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint, GLuint, const GLchar *);
22036+GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint, const GLchar *);
22037+GLAPI void APIENTRY glUniform1uiEXT (GLint, GLuint);
22038+GLAPI void APIENTRY glUniform2uiEXT (GLint, GLuint, GLuint);
22039+GLAPI void APIENTRY glUniform3uiEXT (GLint, GLuint, GLuint, GLuint);
22040+GLAPI void APIENTRY glUniform4uiEXT (GLint, GLuint, GLuint, GLuint, GLuint);
22041+GLAPI void APIENTRY glUniform1uivEXT (GLint, GLsizei, const GLuint *);
22042+GLAPI void APIENTRY glUniform2uivEXT (GLint, GLsizei, const GLuint *);
22043+GLAPI void APIENTRY glUniform3uivEXT (GLint, GLsizei, const GLuint *);
22044+GLAPI void APIENTRY glUniform4uivEXT (GLint, GLsizei, const GLuint *);
22045+#endif /* GL_GLEXT_PROTOTYPES */
22046+typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params);
22047+typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name);
22048+typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name);
22049+typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0);
22050+typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1);
22051+typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
22052+typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
22053+typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
22054+typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
22055+typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
22056+typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
22057+#endif
22058+
22059+#ifndef GL_EXT_draw_instanced
22060+#define GL_EXT_draw_instanced 1
22061+#ifdef GL_GLEXT_PROTOTYPES
22062+GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum, GLint, GLsizei, GLsizei);
22063+GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum, GLsizei, GLenum, const GLvoid *, GLsizei);
22064+#endif /* GL_GLEXT_PROTOTYPES */
22065+typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
22066+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
22067+#endif
22068+
22069+#ifndef GL_EXT_packed_float
22070+#define GL_EXT_packed_float 1
22071+#endif
22072+
22073+#ifndef GL_EXT_texture_array
22074+#define GL_EXT_texture_array 1
22075+#endif
22076+
22077+#ifndef GL_EXT_texture_buffer_object
22078+#define GL_EXT_texture_buffer_object 1
22079+#ifdef GL_GLEXT_PROTOTYPES
22080+GLAPI void APIENTRY glTexBufferEXT (GLenum, GLenum, GLuint);
22081+#endif /* GL_GLEXT_PROTOTYPES */
22082+typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
22083+#endif
22084+
22085+#ifndef GL_EXT_texture_compression_latc
22086+#define GL_EXT_texture_compression_latc 1
22087+#endif
22088+
22089+#ifndef GL_EXT_texture_compression_rgtc
22090+#define GL_EXT_texture_compression_rgtc 1
22091+#endif
22092+
22093+#ifndef GL_EXT_texture_shared_exponent
22094+#define GL_EXT_texture_shared_exponent 1
22095+#endif
22096+
22097+#ifndef GL_NV_depth_buffer_float
22098+#define GL_NV_depth_buffer_float 1
22099+#ifdef GL_GLEXT_PROTOTYPES
22100+GLAPI void APIENTRY glDepthRangedNV (GLdouble, GLdouble);
22101+GLAPI void APIENTRY glClearDepthdNV (GLdouble);
22102+GLAPI void APIENTRY glDepthBoundsdNV (GLdouble, GLdouble);
22103+#endif /* GL_GLEXT_PROTOTYPES */
22104+typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar);
22105+typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth);
22106+typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax);
22107+#endif
22108+
22109+#ifndef GL_NV_fragment_program4
22110+#define GL_NV_fragment_program4 1
22111+#endif
22112+
22113+#ifndef GL_NV_framebuffer_multisample_coverage
22114+#define GL_NV_framebuffer_multisample_coverage 1
22115+#ifdef GL_GLEXT_PROTOTYPES
22116+GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum, GLsizei, GLsizei, GLenum, GLsizei, GLsizei);
22117+#endif /* GL_GLEXT_PROTOTYPES */
22118+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
22119+#endif
22120+
22121+#ifndef GL_EXT_framebuffer_sRGB
22122+#define GL_EXT_framebuffer_sRGB 1
22123+#endif
22124+
22125+#ifndef GL_NV_geometry_shader4
22126+#define GL_NV_geometry_shader4 1
22127+#endif
22128+
22129+#ifndef GL_NV_parameter_buffer_object
22130+#define GL_NV_parameter_buffer_object 1
22131+#ifdef GL_GLEXT_PROTOTYPES
22132+GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum, GLuint, GLuint, GLsizei, const GLfloat *);
22133+GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum, GLuint, GLuint, GLsizei, const GLint *);
22134+GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum, GLuint, GLuint, GLsizei, const GLuint *);
22135+#endif /* GL_GLEXT_PROTOTYPES */
22136+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params);
22137+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params);
22138+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params);
22139+#endif
22140+
22141+#ifndef GL_EXT_draw_buffers2
22142+#define GL_EXT_draw_buffers2 1
22143+#ifdef GL_GLEXT_PROTOTYPES
22144+GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint, GLboolean, GLboolean, GLboolean, GLboolean);
22145+GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum, GLuint, GLboolean *);
22146+GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum, GLuint, GLint *);
22147+GLAPI void APIENTRY glEnableIndexedEXT (GLenum, GLuint);
22148+GLAPI void APIENTRY glDisableIndexedEXT (GLenum, GLuint);
22149+GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum, GLuint);
22150+#endif /* GL_GLEXT_PROTOTYPES */
22151+typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
22152+typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data);
22153+typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data);
22154+typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
22155+typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
22156+typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index);
22157+#endif
22158+
22159+#ifndef GL_NV_transform_feedback
22160+#define GL_NV_transform_feedback 1
22161+#ifdef GL_GLEXT_PROTOTYPES
22162+GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum);
22163+GLAPI void APIENTRY glEndTransformFeedbackNV (void);
22164+GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint, const GLint *, GLenum);
22165+GLAPI void APIENTRY glBindBufferRangeNV (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr);
22166+GLAPI void APIENTRY glBindBufferOffsetNV (GLenum, GLuint, GLuint, GLintptr);
22167+GLAPI void APIENTRY glBindBufferBaseNV (GLenum, GLuint, GLuint);
22168+GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint, GLsizei, const GLint *, GLenum);
22169+GLAPI void APIENTRY glActiveVaryingNV (GLuint, const GLchar *);
22170+GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint, const GLchar *);
22171+GLAPI void APIENTRY glGetActiveVaryingNV (GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *);
22172+GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint, GLuint, GLint *);
22173+#endif /* GL_GLEXT_PROTOTYPES */
22174+typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode);
22175+typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void);
22176+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode);
22177+typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
22178+typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
22179+typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer);
22180+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
22181+typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name);
22182+typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name);
22183+typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
22184+typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location);
22185+#endif
22186+
22187+#ifndef GL_EXT_bindable_uniform
22188+#define GL_EXT_bindable_uniform 1
22189+#ifdef GL_GLEXT_PROTOTYPES
22190+GLAPI void APIENTRY glUniformBufferEXT (GLuint, GLint, GLuint);
22191+GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint, GLint);
22192+GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint, GLint);
22193+#endif /* GL_GLEXT_PROTOTYPES */
22194+typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer);
22195+typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location);
22196+typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location);
22197+#endif
22198+
22199+#ifndef GL_EXT_texture_integer
22200+#define GL_EXT_texture_integer 1
22201+#ifdef GL_GLEXT_PROTOTYPES
22202+GLAPI void APIENTRY glTexParameterIivEXT (GLenum, GLenum, const GLint *);
22203+GLAPI void APIENTRY glTexParameterIuivEXT (GLenum, GLenum, const GLuint *);
22204+GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum, GLenum, GLint *);
22205+GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum, GLenum, GLuint *);
22206+GLAPI void APIENTRY glClearColorIiEXT (GLint, GLint, GLint, GLint);
22207+GLAPI void APIENTRY glClearColorIuiEXT (GLuint, GLuint, GLuint, GLuint);
22208+#endif /* GL_GLEXT_PROTOTYPES */
22209+typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
22210+typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
22211+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
22212+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
22213+typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha);
22214+typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);
22215+#endif
22216+
22217+
22218+#ifdef __cplusplus
22219+}
22220+#endif
22221+
22222+#endif
22223+
22224+
22225+/* ERO */
22226+GLAPI void GLAPIENTRY fake_gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *data);
22227Index: qemu-0.12.4/target-i386/mesa_glu.h
22228===================================================================
22229--- /dev/null
22230+++ qemu-0.12.4/target-i386/mesa_glu.h
22231@@ -0,0 +1,354 @@
22232+/*
22233+** License Applicability. Except to the extent portions of this file are
22234+** made subject to an alternative license as permitted in the SGI Free
22235+** Software License B, Version 1.1 (the "License"), the contents of this
22236+** file are subject only to the provisions of the License. You may not use
22237+** this file except in compliance with the License. You may obtain a copy
22238+** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
22239+** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
22240+**
22241+** http://oss.sgi.com/projects/FreeB
22242+**
22243+** Note that, as provided in the License, the Software is distributed on an
22244+** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
22245+** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
22246+** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
22247+** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
22248+**
22249+** Original Code. The Original Code is: OpenGL Sample Implementation,
22250+** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
22251+** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
22252+** Copyright in any portions created by third parties is as indicated
22253+** elsewhere herein. All Rights Reserved.
22254+**
22255+** Additional Notice Provisions: This software was created using the
22256+** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
22257+** not been independently verified as being compliant with the OpenGL(R)
22258+** version 1.2.1 Specification.
22259+*/
22260+
22261+#ifndef __glu_h__
22262+#define __glu_h__
22263+
22264+#if defined(USE_MGL_NAMESPACE)
22265+#include "glu_mangle.h"
22266+#endif
22267+
22268+//#include <GL/gl.h>
22269+#include "mesa_gl.h"
22270+
22271+#ifndef GLAPIENTRY
22272+#define GLAPIENTRY
22273+#endif
22274+
22275+#ifndef GLAPIENTRYP
22276+#define GLAPIENTRYP GLAPIENTRY *
22277+#endif
22278+
22279+#ifdef GLAPI
22280+#undef GLAPI
22281+#endif
22282+
22283+# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GLU32)
22284+# define GLAPI __declspec(dllexport)
22285+# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
22286+# define GLAPI __declspec(dllimport)
22287+# else /* for use with static link lib build of Win32 edition only */
22288+# define GLAPI extern
22289+# endif /* _STATIC_MESA support */
22290+
22291+
22292+#ifndef GLAPI
22293+#define GLAPI
22294+#endif
22295+
22296+#ifdef __cplusplus
22297+extern "C" {
22298+#endif
22299+
22300+/*************************************************************/
22301+
22302+/* Extensions */
22303+#define GLU_EXT_object_space_tess 1
22304+#define GLU_EXT_nurbs_tessellator 1
22305+
22306+/* Boolean */
22307+#define GLU_FALSE 0
22308+#define GLU_TRUE 1
22309+
22310+/* Version */
22311+#define GLU_VERSION_1_1 1
22312+#define GLU_VERSION_1_2 1
22313+#define GLU_VERSION_1_3 1
22314+
22315+/* StringName */
22316+#define GLU_VERSION 100800
22317+#define GLU_EXTENSIONS 100801
22318+
22319+/* ErrorCode */
22320+#define GLU_INVALID_ENUM 100900
22321+#define GLU_INVALID_VALUE 100901
22322+#define GLU_OUT_OF_MEMORY 100902
22323+#define GLU_INCOMPATIBLE_GL_VERSION 100903
22324+#define GLU_INVALID_OPERATION 100904
22325+
22326+/* NurbsDisplay */
22327+/* GLU_FILL */
22328+#define GLU_OUTLINE_POLYGON 100240
22329+#define GLU_OUTLINE_PATCH 100241
22330+
22331+/* NurbsCallback */
22332+#define GLU_NURBS_ERROR 100103
22333+#define GLU_ERROR 100103
22334+#define GLU_NURBS_BEGIN 100164
22335+#define GLU_NURBS_BEGIN_EXT 100164
22336+#define GLU_NURBS_VERTEX 100165
22337+#define GLU_NURBS_VERTEX_EXT 100165
22338+#define GLU_NURBS_NORMAL 100166
22339+#define GLU_NURBS_NORMAL_EXT 100166
22340+#define GLU_NURBS_COLOR 100167
22341+#define GLU_NURBS_COLOR_EXT 100167
22342+#define GLU_NURBS_TEXTURE_COORD 100168
22343+#define GLU_NURBS_TEX_COORD_EXT 100168
22344+#define GLU_NURBS_END 100169
22345+#define GLU_NURBS_END_EXT 100169
22346+#define GLU_NURBS_BEGIN_DATA 100170
22347+#define GLU_NURBS_BEGIN_DATA_EXT 100170
22348+#define GLU_NURBS_VERTEX_DATA 100171
22349+#define GLU_NURBS_VERTEX_DATA_EXT 100171
22350+#define GLU_NURBS_NORMAL_DATA 100172
22351+#define GLU_NURBS_NORMAL_DATA_EXT 100172
22352+#define GLU_NURBS_COLOR_DATA 100173
22353+#define GLU_NURBS_COLOR_DATA_EXT 100173
22354+#define GLU_NURBS_TEXTURE_COORD_DATA 100174
22355+#define GLU_NURBS_TEX_COORD_DATA_EXT 100174
22356+#define GLU_NURBS_END_DATA 100175
22357+#define GLU_NURBS_END_DATA_EXT 100175
22358+
22359+/* NurbsError */
22360+#define GLU_NURBS_ERROR1 100251
22361+#define GLU_NURBS_ERROR2 100252
22362+#define GLU_NURBS_ERROR3 100253
22363+#define GLU_NURBS_ERROR4 100254
22364+#define GLU_NURBS_ERROR5 100255
22365+#define GLU_NURBS_ERROR6 100256
22366+#define GLU_NURBS_ERROR7 100257
22367+#define GLU_NURBS_ERROR8 100258
22368+#define GLU_NURBS_ERROR9 100259
22369+#define GLU_NURBS_ERROR10 100260
22370+#define GLU_NURBS_ERROR11 100261
22371+#define GLU_NURBS_ERROR12 100262
22372+#define GLU_NURBS_ERROR13 100263
22373+#define GLU_NURBS_ERROR14 100264
22374+#define GLU_NURBS_ERROR15 100265
22375+#define GLU_NURBS_ERROR16 100266
22376+#define GLU_NURBS_ERROR17 100267
22377+#define GLU_NURBS_ERROR18 100268
22378+#define GLU_NURBS_ERROR19 100269
22379+#define GLU_NURBS_ERROR20 100270
22380+#define GLU_NURBS_ERROR21 100271
22381+#define GLU_NURBS_ERROR22 100272
22382+#define GLU_NURBS_ERROR23 100273
22383+#define GLU_NURBS_ERROR24 100274
22384+#define GLU_NURBS_ERROR25 100275
22385+#define GLU_NURBS_ERROR26 100276
22386+#define GLU_NURBS_ERROR27 100277
22387+#define GLU_NURBS_ERROR28 100278
22388+#define GLU_NURBS_ERROR29 100279
22389+#define GLU_NURBS_ERROR30 100280
22390+#define GLU_NURBS_ERROR31 100281
22391+#define GLU_NURBS_ERROR32 100282
22392+#define GLU_NURBS_ERROR33 100283
22393+#define GLU_NURBS_ERROR34 100284
22394+#define GLU_NURBS_ERROR35 100285
22395+#define GLU_NURBS_ERROR36 100286
22396+#define GLU_NURBS_ERROR37 100287
22397+
22398+/* NurbsProperty */
22399+#define GLU_AUTO_LOAD_MATRIX 100200
22400+#define GLU_CULLING 100201
22401+#define GLU_SAMPLING_TOLERANCE 100203
22402+#define GLU_DISPLAY_MODE 100204
22403+#define GLU_PARAMETRIC_TOLERANCE 100202
22404+#define GLU_SAMPLING_METHOD 100205
22405+#define GLU_U_STEP 100206
22406+#define GLU_V_STEP 100207
22407+#define GLU_NURBS_MODE 100160
22408+#define GLU_NURBS_MODE_EXT 100160
22409+#define GLU_NURBS_TESSELLATOR 100161
22410+#define GLU_NURBS_TESSELLATOR_EXT 100161
22411+#define GLU_NURBS_RENDERER 100162
22412+#define GLU_NURBS_RENDERER_EXT 100162
22413+
22414+/* NurbsSampling */
22415+#define GLU_OBJECT_PARAMETRIC_ERROR 100208
22416+#define GLU_OBJECT_PARAMETRIC_ERROR_EXT 100208
22417+#define GLU_OBJECT_PATH_LENGTH 100209
22418+#define GLU_OBJECT_PATH_LENGTH_EXT 100209
22419+#define GLU_PATH_LENGTH 100215
22420+#define GLU_PARAMETRIC_ERROR 100216
22421+#define GLU_DOMAIN_DISTANCE 100217
22422+
22423+/* NurbsTrim */
22424+#define GLU_MAP1_TRIM_2 100210
22425+#define GLU_MAP1_TRIM_3 100211
22426+
22427+/* QuadricDrawStyle */
22428+#define GLU_POINT 100010
22429+#define GLU_LINE 100011
22430+#define GLU_FILL 100012
22431+#define GLU_SILHOUETTE 100013
22432+
22433+/* QuadricCallback */
22434+/* GLU_ERROR */
22435+
22436+/* QuadricNormal */
22437+#define GLU_SMOOTH 100000
22438+#define GLU_FLAT 100001
22439+#define GLU_NONE 100002
22440+
22441+/* QuadricOrientation */
22442+#define GLU_OUTSIDE 100020
22443+#define GLU_INSIDE 100021
22444+
22445+/* TessCallback */
22446+#define GLU_TESS_BEGIN 100100
22447+#define GLU_BEGIN 100100
22448+#define GLU_TESS_VERTEX 100101
22449+#define GLU_VERTEX 100101
22450+#define GLU_TESS_END 100102
22451+#define GLU_END 100102
22452+#define GLU_TESS_ERROR 100103
22453+#define GLU_TESS_EDGE_FLAG 100104
22454+#define GLU_EDGE_FLAG 100104
22455+#define GLU_TESS_COMBINE 100105
22456+#define GLU_TESS_BEGIN_DATA 100106
22457+#define GLU_TESS_VERTEX_DATA 100107
22458+#define GLU_TESS_END_DATA 100108
22459+#define GLU_TESS_ERROR_DATA 100109
22460+#define GLU_TESS_EDGE_FLAG_DATA 100110
22461+#define GLU_TESS_COMBINE_DATA 100111
22462+
22463+/* TessContour */
22464+#define GLU_CW 100120
22465+#define GLU_CCW 100121
22466+#define GLU_INTERIOR 100122
22467+#define GLU_EXTERIOR 100123
22468+#define GLU_UNKNOWN 100124
22469+
22470+/* TessProperty */
22471+#define GLU_TESS_WINDING_RULE 100140
22472+#define GLU_TESS_BOUNDARY_ONLY 100141
22473+#define GLU_TESS_TOLERANCE 100142
22474+
22475+/* TessError */
22476+#define GLU_TESS_ERROR1 100151
22477+#define GLU_TESS_ERROR2 100152
22478+#define GLU_TESS_ERROR3 100153
22479+#define GLU_TESS_ERROR4 100154
22480+#define GLU_TESS_ERROR5 100155
22481+#define GLU_TESS_ERROR6 100156
22482+#define GLU_TESS_ERROR7 100157
22483+#define GLU_TESS_ERROR8 100158
22484+#define GLU_TESS_MISSING_BEGIN_POLYGON 100151
22485+#define GLU_TESS_MISSING_BEGIN_CONTOUR 100152
22486+#define GLU_TESS_MISSING_END_POLYGON 100153
22487+#define GLU_TESS_MISSING_END_CONTOUR 100154
22488+#define GLU_TESS_COORD_TOO_LARGE 100155
22489+#define GLU_TESS_NEED_COMBINE_CALLBACK 100156
22490+
22491+/* TessWinding */
22492+#define GLU_TESS_WINDING_ODD 100130
22493+#define GLU_TESS_WINDING_NONZERO 100131
22494+#define GLU_TESS_WINDING_POSITIVE 100132
22495+#define GLU_TESS_WINDING_NEGATIVE 100133
22496+#define GLU_TESS_WINDING_ABS_GEQ_TWO 100134
22497+
22498+/*************************************************************/
22499+
22500+
22501+#ifdef __cplusplus
22502+class GLUnurbs;
22503+class GLUquadric;
22504+class GLUtesselator;
22505+#else
22506+typedef struct GLUnurbs GLUnurbs;
22507+typedef struct GLUquadric GLUquadric;
22508+typedef struct GLUtesselator GLUtesselator;
22509+#endif
22510+
22511+typedef GLUnurbs GLUnurbsObj;
22512+typedef GLUquadric GLUquadricObj;
22513+typedef GLUtesselator GLUtesselatorObj;
22514+typedef GLUtesselator GLUtriangulatorObj;
22515+
22516+#define GLU_TESS_MAX_COORD 1.0e150
22517+
22518+/* Internal convenience typedefs */
22519+typedef void (GLAPIENTRYP _GLUfuncptr)();
22520+
22521+GLAPI void GLAPIENTRY gluBeginCurve (GLUnurbs* nurb);
22522+GLAPI void GLAPIENTRY gluBeginPolygon (GLUtesselator* tess);
22523+GLAPI void GLAPIENTRY gluBeginSurface (GLUnurbs* nurb);
22524+GLAPI void GLAPIENTRY gluBeginTrim (GLUnurbs* nurb);
22525+GLAPI GLint GLAPIENTRY gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
22526+GLAPI GLint GLAPIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
22527+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);
22528+GLAPI GLint GLAPIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data);
22529+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);
22530+GLAPI GLint GLAPIENTRY gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
22531+GLAPI GLboolean GLAPIENTRY gluCheckExtension (const GLubyte *extName, const GLubyte *extString);
22532+GLAPI void GLAPIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
22533+GLAPI void GLAPIENTRY gluDeleteNurbsRenderer (GLUnurbs* nurb);
22534+GLAPI void GLAPIENTRY gluDeleteQuadric (GLUquadric* quad);
22535+GLAPI void GLAPIENTRY gluDeleteTess (GLUtesselator* tess);
22536+GLAPI void GLAPIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
22537+GLAPI void GLAPIENTRY gluEndCurve (GLUnurbs* nurb);
22538+GLAPI void GLAPIENTRY gluEndPolygon (GLUtesselator* tess);
22539+GLAPI void GLAPIENTRY gluEndSurface (GLUnurbs* nurb);
22540+GLAPI void GLAPIENTRY gluEndTrim (GLUnurbs* nurb);
22541+GLAPI const GLubyte * GLAPIENTRY gluErrorString (GLenum error);
22542+GLAPI void GLAPIENTRY gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
22543+GLAPI const GLubyte * GLAPIENTRY gluGetString (GLenum name);
22544+GLAPI void GLAPIENTRY gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
22545+GLAPI void GLAPIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
22546+GLAPI void GLAPIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
22547+GLAPI GLUnurbs* GLAPIENTRY gluNewNurbsRenderer (void);
22548+GLAPI GLUquadric* GLAPIENTRY gluNewQuadric (void);
22549+GLAPI GLUtesselator* GLAPIENTRY gluNewTess (void);
22550+GLAPI void GLAPIENTRY gluNextContour (GLUtesselator* tess, GLenum type);
22551+GLAPI void GLAPIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
22552+GLAPI void GLAPIENTRY gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData);
22553+GLAPI void GLAPIENTRY gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData);
22554+GLAPI void GLAPIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
22555+GLAPI void GLAPIENTRY gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
22556+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);
22557+GLAPI void GLAPIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
22558+GLAPI void GLAPIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
22559+GLAPI void GLAPIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
22560+GLAPI void GLAPIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
22561+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);
22562+GLAPI void GLAPIENTRY gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
22563+GLAPI void GLAPIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
22564+GLAPI void GLAPIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
22565+GLAPI void GLAPIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal);
22566+GLAPI void GLAPIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
22567+GLAPI void GLAPIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture);
22568+GLAPI GLint GLAPIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
22569+GLAPI void GLAPIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
22570+GLAPI void GLAPIENTRY gluTessBeginContour (GLUtesselator* tess);
22571+GLAPI void GLAPIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
22572+GLAPI void GLAPIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
22573+GLAPI void GLAPIENTRY gluTessEndContour (GLUtesselator* tess);
22574+GLAPI void GLAPIENTRY gluTessEndPolygon (GLUtesselator* tess);
22575+GLAPI void GLAPIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
22576+GLAPI void GLAPIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
22577+GLAPI void GLAPIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
22578+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);
22579+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);
22580+
22581+#ifdef __cplusplus
22582+}
22583+#endif
22584+
22585+#endif /* __glu_h__ */
22586Index: qemu-0.12.4/target-i386/mesa_glx.h
22587===================================================================
22588--- /dev/null
22589+++ qemu-0.12.4/target-i386/mesa_glx.h
22590@@ -0,0 +1,510 @@
22591+/*
22592+ * Mesa 3-D graphics library
22593+ * Version: 6.5
22594+ *
22595+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
22596+ *
22597+ * Permission is hereby granted, free of charge, to any person obtaining a
22598+ * copy of this software and associated documentation files (the "Software"),
22599+ * to deal in the Software without restriction, including without limitation
22600+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
22601+ * and/or sell copies of the Software, and to permit persons to whom the
22602+ * Software is furnished to do so, subject to the following conditions:
22603+ *
22604+ * The above copyright notice and this permission notice shall be included
22605+ * in all copies or substantial portions of the Software.
22606+ *
22607+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22608+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22609+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22610+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
22611+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22612+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22613+ */
22614+
22615+
22616+#ifndef GLX_H
22617+#define GLX_H
22618+
22619+
22620+#ifdef __VMS
22621+#include <GL/vms_x_fix.h>
22622+# ifdef __cplusplus
22623+/* VMS Xlib.h gives problems with C++.
22624+ * this avoids a bunch of trivial warnings */
22625+#pragma message disable nosimpint
22626+#endif
22627+#endif
22628+#include <X11/Xlib.h>
22629+#include <X11/Xutil.h>
22630+#ifdef __VMS
22631+# ifdef __cplusplus
22632+#pragma message enable nosimpint
22633+#endif
22634+#endif
22635+#include <mesa_gl.h>
22636+
22637+
22638+#if defined(USE_MGL_NAMESPACE)
22639+#include "glx_mangle.h"
22640+#endif
22641+
22642+
22643+#ifdef __cplusplus
22644+extern "C" {
22645+#endif
22646+
22647+
22648+#define GLX_VERSION_1_1 1
22649+#define GLX_VERSION_1_2 1
22650+#define GLX_VERSION_1_3 1
22651+#define GLX_VERSION_1_4 1
22652+
22653+#define GLX_EXTENSION_NAME "GLX"
22654+
22655+
22656+
22657+/*
22658+ * Tokens for glXChooseVisual and glXGetConfig:
22659+ */
22660+#define GLX_USE_GL 1
22661+#define GLX_BUFFER_SIZE 2
22662+#define GLX_LEVEL 3
22663+#define GLX_RGBA 4
22664+#define GLX_DOUBLEBUFFER 5
22665+#define GLX_STEREO 6
22666+#define GLX_AUX_BUFFERS 7
22667+#define GLX_RED_SIZE 8
22668+#define GLX_GREEN_SIZE 9
22669+#define GLX_BLUE_SIZE 10
22670+#define GLX_ALPHA_SIZE 11
22671+#define GLX_DEPTH_SIZE 12
22672+#define GLX_STENCIL_SIZE 13
22673+#define GLX_ACCUM_RED_SIZE 14
22674+#define GLX_ACCUM_GREEN_SIZE 15
22675+#define GLX_ACCUM_BLUE_SIZE 16
22676+#define GLX_ACCUM_ALPHA_SIZE 17
22677+
22678+
22679+/*
22680+ * Error codes returned by glXGetConfig:
22681+ */
22682+#define GLX_BAD_SCREEN 1
22683+#define GLX_BAD_ATTRIBUTE 2
22684+#define GLX_NO_EXTENSION 3
22685+#define GLX_BAD_VISUAL 4
22686+#define GLX_BAD_CONTEXT 5
22687+#define GLX_BAD_VALUE 6
22688+#define GLX_BAD_ENUM 7
22689+
22690+
22691+/*
22692+ * GLX 1.1 and later:
22693+ */
22694+#define GLX_VENDOR 1
22695+#define GLX_VERSION 2
22696+#define GLX_EXTENSIONS 3
22697+
22698+
22699+/*
22700+ * GLX 1.3 and later:
22701+ */
22702+#define GLX_CONFIG_CAVEAT 0x20
22703+#define GLX_DONT_CARE 0xFFFFFFFF
22704+#define GLX_X_VISUAL_TYPE 0x22
22705+#define GLX_TRANSPARENT_TYPE 0x23
22706+#define GLX_TRANSPARENT_INDEX_VALUE 0x24
22707+#define GLX_TRANSPARENT_RED_VALUE 0x25
22708+#define GLX_TRANSPARENT_GREEN_VALUE 0x26
22709+#define GLX_TRANSPARENT_BLUE_VALUE 0x27
22710+#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
22711+#define GLX_WINDOW_BIT 0x00000001
22712+#define GLX_PIXMAP_BIT 0x00000002
22713+#define GLX_PBUFFER_BIT 0x00000004
22714+#define GLX_AUX_BUFFERS_BIT 0x00000010
22715+#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
22716+#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
22717+#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
22718+#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
22719+#define GLX_DEPTH_BUFFER_BIT 0x00000020
22720+#define GLX_STENCIL_BUFFER_BIT 0x00000040
22721+#define GLX_ACCUM_BUFFER_BIT 0x00000080
22722+#define GLX_NONE 0x8000
22723+#define GLX_SLOW_CONFIG 0x8001
22724+#define GLX_TRUE_COLOR 0x8002
22725+#define GLX_DIRECT_COLOR 0x8003
22726+#define GLX_PSEUDO_COLOR 0x8004
22727+#define GLX_STATIC_COLOR 0x8005
22728+#define GLX_GRAY_SCALE 0x8006
22729+#define GLX_STATIC_GRAY 0x8007
22730+#define GLX_TRANSPARENT_RGB 0x8008
22731+#define GLX_TRANSPARENT_INDEX 0x8009
22732+#define GLX_VISUAL_ID 0x800B
22733+#define GLX_SCREEN 0x800C
22734+#define GLX_NON_CONFORMANT_CONFIG 0x800D
22735+#define GLX_DRAWABLE_TYPE 0x8010
22736+#define GLX_RENDER_TYPE 0x8011
22737+#define GLX_X_RENDERABLE 0x8012
22738+#define GLX_FBCONFIG_ID 0x8013
22739+#define GLX_RGBA_TYPE 0x8014
22740+#define GLX_COLOR_INDEX_TYPE 0x8015
22741+#define GLX_MAX_PBUFFER_WIDTH 0x8016
22742+#define GLX_MAX_PBUFFER_HEIGHT 0x8017
22743+#define GLX_MAX_PBUFFER_PIXELS 0x8018
22744+#define GLX_PRESERVED_CONTENTS 0x801B
22745+#define GLX_LARGEST_PBUFFER 0x801C
22746+#define GLX_WIDTH 0x801D
22747+#define GLX_HEIGHT 0x801E
22748+#define GLX_EVENT_MASK 0x801F
22749+#define GLX_DAMAGED 0x8020
22750+#define GLX_SAVED 0x8021
22751+#define GLX_WINDOW 0x8022
22752+#define GLX_PBUFFER 0x8023
22753+#define GLX_PBUFFER_HEIGHT 0x8040
22754+#define GLX_PBUFFER_WIDTH 0x8041
22755+#define GLX_RGBA_BIT 0x00000001
22756+#define GLX_COLOR_INDEX_BIT 0x00000002
22757+#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
22758+
22759+
22760+/*
22761+ * GLX 1.4 and later:
22762+ */
22763+#define GLX_SAMPLE_BUFFERS 0x186a0 /*100000*/
22764+#define GLX_SAMPLES 0x186a1 /*100001*/
22765+
22766+
22767+
22768+typedef struct __GLXcontextRec *GLXContext;
22769+typedef XID GLXPixmap;
22770+typedef XID GLXDrawable;
22771+/* GLX 1.3 and later */
22772+typedef struct __GLXFBConfigRec *GLXFBConfig;
22773+typedef XID GLXFBConfigID;
22774+typedef XID GLXContextID;
22775+typedef XID GLXWindow;
22776+typedef XID GLXPbuffer;
22777+
22778+
22779+
22780+extern XVisualInfo* glXChooseVisual( Display *dpy, int screen,
22781+ int *attribList );
22782+
22783+extern GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis,
22784+ GLXContext shareList, Bool direct );
22785+
22786+extern void glXDestroyContext( Display *dpy, GLXContext ctx );
22787+
22788+extern Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable,
22789+ GLXContext ctx);
22790+
22791+extern void glXCopyContext( Display *dpy, GLXContext src, GLXContext dst,
22792+ unsigned long mask );
22793+
22794+extern void glXSwapBuffers( Display *dpy, GLXDrawable drawable );
22795+
22796+extern GLXPixmap glXCreateGLXPixmap( Display *dpy, XVisualInfo *visual,
22797+ Pixmap pixmap );
22798+
22799+extern void glXDestroyGLXPixmap( Display *dpy, GLXPixmap pixmap );
22800+
22801+extern Bool glXQueryExtension( Display *dpy, int *errorb, int *event );
22802+
22803+extern Bool glXQueryVersion( Display *dpy, int *maj, int *min );
22804+
22805+extern Bool glXIsDirect( Display *dpy, GLXContext ctx );
22806+
22807+extern int glXGetConfig( Display *dpy, XVisualInfo *visual,
22808+ int attrib, int *value );
22809+
22810+extern GLXContext glXGetCurrentContext( void );
22811+
22812+extern GLXDrawable glXGetCurrentDrawable( void );
22813+
22814+extern void glXWaitGL( void );
22815+
22816+extern void glXWaitX( void );
22817+
22818+extern void glXUseXFont( Font font, int first, int count, int list );
22819+
22820+
22821+
22822+/* GLX 1.1 and later */
22823+extern const char *glXQueryExtensionsString( Display *dpy, int screen );
22824+
22825+extern const char *glXQueryServerString( Display *dpy, int screen, int name );
22826+
22827+extern const char *glXGetClientString( Display *dpy, int name );
22828+
22829+
22830+/* GLX 1.2 and later */
22831+extern Display *glXGetCurrentDisplay( void );
22832+
22833+
22834+/* GLX 1.3 and later */
22835+extern GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
22836+ const int *attribList, int *nitems );
22837+
22838+extern int glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config,
22839+ int attribute, int *value );
22840+
22841+extern GLXFBConfig *glXGetFBConfigs( Display *dpy, int screen,
22842+ int *nelements );
22843+
22844+extern XVisualInfo *glXGetVisualFromFBConfig( Display *dpy,
22845+ GLXFBConfig config );
22846+
22847+extern GLXWindow glXCreateWindow( Display *dpy, GLXFBConfig config,
22848+ Window win, const int *attribList );
22849+
22850+extern void glXDestroyWindow( Display *dpy, GLXWindow window );
22851+
22852+extern GLXPixmap glXCreatePixmap( Display *dpy, GLXFBConfig config,
22853+ Pixmap pixmap, const int *attribList );
22854+
22855+extern void glXDestroyPixmap( Display *dpy, GLXPixmap pixmap );
22856+
22857+extern GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config,
22858+ const int *attribList );
22859+
22860+extern void glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf );
22861+
22862+extern void glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute,
22863+ unsigned int *value );
22864+
22865+extern GLXContext glXCreateNewContext( Display *dpy, GLXFBConfig config,
22866+ int renderType, GLXContext shareList,
22867+ Bool direct );
22868+
22869+extern Bool glXMakeContextCurrent( Display *dpy, GLXDrawable draw,
22870+ GLXDrawable read, GLXContext ctx );
22871+
22872+extern GLXDrawable glXGetCurrentReadDrawable( void );
22873+
22874+extern int glXQueryContext( Display *dpy, GLXContext ctx, int attribute,
22875+ int *value );
22876+
22877+extern void glXSelectEvent( Display *dpy, GLXDrawable drawable,
22878+ unsigned long mask );
22879+
22880+extern void glXGetSelectedEvent( Display *dpy, GLXDrawable drawable,
22881+ unsigned long *mask );
22882+
22883+
22884+/* GLX 1.4 and later */
22885+extern void (*glXGetProcAddress(const GLubyte *procname))( void );
22886+
22887+
22888+#ifndef GLX_GLXEXT_LEGACY
22889+
22890+#include <mesa_glxext.h>
22891+
22892+#else
22893+
22894+
22895+
22896+/*
22897+ * ARB 2. GLX_ARB_get_proc_address
22898+ */
22899+#ifndef GLX_ARB_get_proc_address
22900+#define GLX_ARB_get_proc_address 1
22901+
22902+typedef void (*__GLXextFuncPtr)(void);
22903+extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
22904+
22905+#endif /* GLX_ARB_get_proc_address */
22906+
22907+
22908+
22909+#endif /* GLX_GLXEXT_LEGACY */
22910+
22911+
22912+/**
22913+ ** The following aren't in glxext.h yet.
22914+ **/
22915+
22916+
22917+/*
22918+ * ???. GLX_NV_vertex_array_range
22919+ */
22920+#ifndef GLX_NV_vertex_array_range
22921+#define GLX_NV_vertex_array_range
22922+
22923+extern void *glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
22924+extern void glXFreeMemoryNV(GLvoid *pointer);
22925+typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
22926+typedef void ( * PFNGLXFREEMEMORYNVPROC) (GLvoid *pointer);
22927+
22928+#endif /* GLX_NV_vertex_array_range */
22929+
22930+
22931+/*
22932+ * ???. GLX_MESA_allocate_memory
22933+ */
22934+#ifndef GLX_MESA_allocate_memory
22935+#define GLX_MESA_allocate_memory 1
22936+
22937+extern void *glXAllocateMemoryMESA(Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
22938+extern void glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer);
22939+extern GLuint glXGetMemoryOffsetMESA(Display *dpy, int scrn, const void *pointer);
22940+typedef void * ( * PFNGLXALLOCATEMEMORYMESAPROC) (Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority);
22941+typedef void ( * PFNGLXFREEMEMORYMESAPROC) (Display *dpy, int scrn, void *pointer);
22942+typedef GLuint (* PFNGLXGETMEMORYOFFSETMESAPROC) (Display *dpy, int scrn, const void *pointer);
22943+
22944+#endif /* GLX_MESA_allocate_memory */
22945+
22946+
22947+/*
22948+ * ARB ?. GLX_ARB_render_texture
22949+ * XXX This was never finalized!
22950+ */
22951+#ifndef GLX_ARB_render_texture
22952+#define GLX_ARB_render_texture 1
22953+
22954+extern Bool glXBindTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
22955+extern Bool glXReleaseTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer);
22956+extern Bool glXDrawableAttribARB(Display *dpy, GLXDrawable draw, const int *attribList);
22957+
22958+#endif /* GLX_ARB_render_texture */
22959+
22960+
22961+#ifndef GLX_ATI_render_texture
22962+#define GLX_ATI_render_texture 1
22963+
22964+extern void glXBindTexImageATI(Display *dpy, GLXPbuffer pbuffer, int buffer);
22965+extern void glXReleaseTexImageATI(Display *dpy, GLXPbuffer pbuffer, int buffer);
22966+extern void glXDrawableAttribATI(Display *dpy, GLXDrawable draw, const int *attribList);
22967+
22968+#endif /* GLX_ATI_render_texture */
22969+
22970+
22971+/*
22972+ * Remove this when glxext.h is updated.
22973+ */
22974+#ifndef GLX_NV_float_buffer
22975+#define GLX_NV_float_buffer 1
22976+
22977+#define GLX_FLOAT_COMPONENTS_NV 0x20B0
22978+
22979+#endif /* GLX_NV_float_buffer */
22980+
22981+
22982+
22983+/*
22984+ * #?. GLX_MESA_swap_frame_usage
22985+ */
22986+#ifndef GLX_MESA_swap_frame_usage
22987+#define GLX_MESA_swap_frame_usage 1
22988+
22989+extern int glXGetFrameUsageMESA(Display *dpy, GLXDrawable drawable, float *usage);
22990+extern int glXBeginFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
22991+extern int glXEndFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
22992+extern int glXQueryFrameTrackingMESA(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
22993+
22994+typedef int (*PFNGLXGETFRAMEUSAGEMESAPROC) (Display *dpy, GLXDrawable drawable, float *usage);
22995+typedef int (*PFNGLXBEGINFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
22996+typedef int (*PFNGLXENDFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
22997+typedef int (*PFNGLXQUERYFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
22998+
22999+#endif /* GLX_MESA_swap_frame_usage */
23000+
23001+
23002+
23003+/*
23004+ * #?. GLX_MESA_swap_control
23005+ */
23006+#ifndef GLX_MESA_swap_control
23007+#define GLX_MESA_swap_control 1
23008+
23009+extern int glXSwapIntervalMESA(unsigned int interval);
23010+extern int glXGetSwapIntervalMESA(void);
23011+
23012+typedef int (*PFNGLXSWAPINTERVALMESAPROC)(unsigned int interval);
23013+typedef int (*PFNGLXGETSWAPINTERVALMESAPROC)(void);
23014+
23015+#endif /* GLX_MESA_swap_control */
23016+
23017+
23018+
23019+/*
23020+ * #?. GLX_EXT_texture_from_pixmap
23021+ * XXX not finished?
23022+ */
23023+#ifndef GLX_EXT_texture_from_pixmap
23024+#define GLX_EXT_texture_from_pixmap 1
23025+
23026+#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
23027+#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
23028+#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
23029+#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
23030+#define GLX_Y_INVERTED_EXT 0x20D4
23031+
23032+#define GLX_TEXTURE_FORMAT_EXT 0x20D5
23033+#define GLX_TEXTURE_TARGET_EXT 0x20D6
23034+#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
23035+
23036+#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
23037+#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
23038+#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
23039+
23040+#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
23041+#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
23042+#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
23043+
23044+#define GLX_TEXTURE_1D_EXT 0x20DB
23045+#define GLX_TEXTURE_2D_EXT 0x20DC
23046+#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
23047+
23048+#define GLX_FRONT_LEFT_EXT 0x20DE
23049+#define GLX_FRONT_RIGHT_EXT 0x20DF
23050+#define GLX_BACK_LEFT_EXT 0x20E0
23051+#define GLX_BACK_RIGHT_EXT 0x20E1
23052+#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
23053+#define GLX_BACK_EXT GLX_BACK_LEFT_EXT
23054+#define GLX_AUX0_EXT 0x20E2
23055+#define GLX_AUX1_EXT 0x20E3
23056+#define GLX_AUX2_EXT 0x20E4
23057+#define GLX_AUX3_EXT 0x20E5
23058+#define GLX_AUX4_EXT 0x20E6
23059+#define GLX_AUX5_EXT 0x20E7
23060+#define GLX_AUX6_EXT 0x20E8
23061+#define GLX_AUX7_EXT 0x20E9
23062+#define GLX_AUX8_EXT 0x20EA
23063+#define GLX_AUX9_EXT 0x20EB
23064+
23065+extern void glXBindTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
23066+extern void glXReleaseTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer);
23067+
23068+#endif /* GLX_EXT_texture_from_pixmap */
23069+
23070+
23071+
23072+
23073+/*** Should these go here, or in another header? */
23074+/*
23075+** GLX Events
23076+*/
23077+typedef struct {
23078+ int event_type; /* GLX_DAMAGED or GLX_SAVED */
23079+ int draw_type; /* GLX_WINDOW or GLX_PBUFFER */
23080+ unsigned long serial; /* # of last request processed by server */
23081+ Bool send_event; /* true if this came for SendEvent request */
23082+ Display *display; /* display the event was read from */
23083+ GLXDrawable drawable; /* XID of Drawable */
23084+ unsigned int buffer_mask; /* mask indicating which buffers are affected */
23085+ unsigned int aux_buffer; /* which aux buffer was affected */
23086+ int x, y;
23087+ int width, height;
23088+ int count; /* if nonzero, at least this many more */
23089+} GLXPbufferClobberEvent;
23090+
23091+typedef union __GLXEvent {
23092+ GLXPbufferClobberEvent glxpbufferclobber;
23093+ long pad[24];
23094+} GLXEvent;
23095+
23096+#ifdef __cplusplus
23097+}
23098+#endif
23099+
23100+#endif
23101Index: qemu-0.12.4/target-i386/mesa_glxext.h
23102===================================================================
23103--- /dev/null
23104+++ qemu-0.12.4/target-i386/mesa_glxext.h
23105@@ -0,0 +1,785 @@
23106+#ifndef __glxext_h_
23107+#define __glxext_h_
23108+
23109+#ifdef __cplusplus
23110+extern "C" {
23111+#endif
23112+
23113+/*
23114+** Copyright (c) 2007 The Khronos Group Inc.
23115+**
23116+** Permission is hereby granted, free of charge, to any person obtaining a
23117+** copy of this software and/or associated documentation files (the
23118+** "Materials"), to deal in the Materials without restriction, including
23119+** without limitation the rights to use, copy, modify, merge, publish,
23120+** distribute, sublicense, and/or sell copies of the Materials, and to
23121+** permit persons to whom the Materials are furnished to do so, subject to
23122+** the following conditions:
23123+**
23124+** The above copyright notice and this permission notice shall be included
23125+** in all copies or substantial portions of the Materials.
23126+**
23127+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23128+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23129+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23130+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
23131+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23132+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23133+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
23134+*/
23135+
23136+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
23137+#define WIN32_LEAN_AND_MEAN 1
23138+#include <windows.h>
23139+#endif
23140+
23141+#ifndef APIENTRY
23142+#define APIENTRY
23143+#endif
23144+#ifndef APIENTRYP
23145+#define APIENTRYP APIENTRY *
23146+#endif
23147+#ifndef GLAPI
23148+#define GLAPI extern
23149+#endif
23150+
23151+/*************************************************************/
23152+
23153+/* Header file version number, required by OpenGL ABI for Linux */
23154+/* glxext.h last updated 2007/04/21 */
23155+/* Current version at http://www.opengl.org/registry/ */
23156+#define GLX_GLXEXT_VERSION 19
23157+
23158+#ifndef GLX_VERSION_1_3
23159+#define GLX_WINDOW_BIT 0x00000001
23160+#define GLX_PIXMAP_BIT 0x00000002
23161+#define GLX_PBUFFER_BIT 0x00000004
23162+#define GLX_RGBA_BIT 0x00000001
23163+#define GLX_COLOR_INDEX_BIT 0x00000002
23164+#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
23165+#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
23166+#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
23167+#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
23168+#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
23169+#define GLX_AUX_BUFFERS_BIT 0x00000010
23170+#define GLX_DEPTH_BUFFER_BIT 0x00000020
23171+#define GLX_STENCIL_BUFFER_BIT 0x00000040
23172+#define GLX_ACCUM_BUFFER_BIT 0x00000080
23173+#define GLX_CONFIG_CAVEAT 0x20
23174+#define GLX_X_VISUAL_TYPE 0x22
23175+#define GLX_TRANSPARENT_TYPE 0x23
23176+#define GLX_TRANSPARENT_INDEX_VALUE 0x24
23177+#define GLX_TRANSPARENT_RED_VALUE 0x25
23178+#define GLX_TRANSPARENT_GREEN_VALUE 0x26
23179+#define GLX_TRANSPARENT_BLUE_VALUE 0x27
23180+#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
23181+#define GLX_DONT_CARE 0xFFFFFFFF
23182+#define GLX_NONE 0x8000
23183+#define GLX_SLOW_CONFIG 0x8001
23184+#define GLX_TRUE_COLOR 0x8002
23185+#define GLX_DIRECT_COLOR 0x8003
23186+#define GLX_PSEUDO_COLOR 0x8004
23187+#define GLX_STATIC_COLOR 0x8005
23188+#define GLX_GRAY_SCALE 0x8006
23189+#define GLX_STATIC_GRAY 0x8007
23190+#define GLX_TRANSPARENT_RGB 0x8008
23191+#define GLX_TRANSPARENT_INDEX 0x8009
23192+#define GLX_VISUAL_ID 0x800B
23193+#define GLX_SCREEN 0x800C
23194+#define GLX_NON_CONFORMANT_CONFIG 0x800D
23195+#define GLX_DRAWABLE_TYPE 0x8010
23196+#define GLX_RENDER_TYPE 0x8011
23197+#define GLX_X_RENDERABLE 0x8012
23198+#define GLX_FBCONFIG_ID 0x8013
23199+#define GLX_RGBA_TYPE 0x8014
23200+#define GLX_COLOR_INDEX_TYPE 0x8015
23201+#define GLX_MAX_PBUFFER_WIDTH 0x8016
23202+#define GLX_MAX_PBUFFER_HEIGHT 0x8017
23203+#define GLX_MAX_PBUFFER_PIXELS 0x8018
23204+#define GLX_PRESERVED_CONTENTS 0x801B
23205+#define GLX_LARGEST_PBUFFER 0x801C
23206+#define GLX_WIDTH 0x801D
23207+#define GLX_HEIGHT 0x801E
23208+#define GLX_EVENT_MASK 0x801F
23209+#define GLX_DAMAGED 0x8020
23210+#define GLX_SAVED 0x8021
23211+#define GLX_WINDOW 0x8022
23212+#define GLX_PBUFFER 0x8023
23213+#define GLX_PBUFFER_HEIGHT 0x8040
23214+#define GLX_PBUFFER_WIDTH 0x8041
23215+#endif
23216+
23217+#ifndef GLX_VERSION_1_4
23218+#define GLX_SAMPLE_BUFFERS 100000
23219+#define GLX_SAMPLES 100001
23220+#endif
23221+
23222+#ifndef GLX_ARB_get_proc_address
23223+#endif
23224+
23225+#ifndef GLX_ARB_multisample
23226+#define GLX_SAMPLE_BUFFERS_ARB 100000
23227+#define GLX_SAMPLES_ARB 100001
23228+#endif
23229+
23230+#ifndef GLX_ARB_fbconfig_float
23231+#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9
23232+#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
23233+#endif
23234+
23235+#ifndef GLX_SGIS_multisample
23236+#define GLX_SAMPLE_BUFFERS_SGIS 100000
23237+#define GLX_SAMPLES_SGIS 100001
23238+#endif
23239+
23240+#ifndef GLX_EXT_visual_info
23241+#define GLX_X_VISUAL_TYPE_EXT 0x22
23242+#define GLX_TRANSPARENT_TYPE_EXT 0x23
23243+#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
23244+#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
23245+#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
23246+#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
23247+#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
23248+#define GLX_NONE_EXT 0x8000
23249+#define GLX_TRUE_COLOR_EXT 0x8002
23250+#define GLX_DIRECT_COLOR_EXT 0x8003
23251+#define GLX_PSEUDO_COLOR_EXT 0x8004
23252+#define GLX_STATIC_COLOR_EXT 0x8005
23253+#define GLX_GRAY_SCALE_EXT 0x8006
23254+#define GLX_STATIC_GRAY_EXT 0x8007
23255+#define GLX_TRANSPARENT_RGB_EXT 0x8008
23256+#define GLX_TRANSPARENT_INDEX_EXT 0x8009
23257+#endif
23258+
23259+#ifndef GLX_SGI_swap_control
23260+#endif
23261+
23262+#ifndef GLX_SGI_video_sync
23263+#endif
23264+
23265+#ifndef GLX_SGI_make_current_read
23266+#endif
23267+
23268+#ifndef GLX_SGIX_video_source
23269+#endif
23270+
23271+#ifndef GLX_EXT_visual_rating
23272+#define GLX_VISUAL_CAVEAT_EXT 0x20
23273+#define GLX_SLOW_VISUAL_EXT 0x8001
23274+#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
23275+/* reuse GLX_NONE_EXT */
23276+#endif
23277+
23278+#ifndef GLX_EXT_import_context
23279+#define GLX_SHARE_CONTEXT_EXT 0x800A
23280+#define GLX_VISUAL_ID_EXT 0x800B
23281+#define GLX_SCREEN_EXT 0x800C
23282+#endif
23283+
23284+#ifndef GLX_SGIX_fbconfig
23285+#define GLX_WINDOW_BIT_SGIX 0x00000001
23286+#define GLX_PIXMAP_BIT_SGIX 0x00000002
23287+#define GLX_RGBA_BIT_SGIX 0x00000001
23288+#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
23289+#define GLX_DRAWABLE_TYPE_SGIX 0x8010
23290+#define GLX_RENDER_TYPE_SGIX 0x8011
23291+#define GLX_X_RENDERABLE_SGIX 0x8012
23292+#define GLX_FBCONFIG_ID_SGIX 0x8013
23293+#define GLX_RGBA_TYPE_SGIX 0x8014
23294+#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
23295+/* reuse GLX_SCREEN_EXT */
23296+#endif
23297+
23298+#ifndef GLX_SGIX_pbuffer
23299+#define GLX_PBUFFER_BIT_SGIX 0x00000004
23300+#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
23301+#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
23302+#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
23303+#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
23304+#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
23305+#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
23306+#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
23307+#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
23308+#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
23309+#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
23310+#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
23311+#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
23312+#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
23313+#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
23314+#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
23315+#define GLX_PRESERVED_CONTENTS_SGIX 0x801B
23316+#define GLX_LARGEST_PBUFFER_SGIX 0x801C
23317+#define GLX_WIDTH_SGIX 0x801D
23318+#define GLX_HEIGHT_SGIX 0x801E
23319+#define GLX_EVENT_MASK_SGIX 0x801F
23320+#define GLX_DAMAGED_SGIX 0x8020
23321+#define GLX_SAVED_SGIX 0x8021
23322+#define GLX_WINDOW_SGIX 0x8022
23323+#define GLX_PBUFFER_SGIX 0x8023
23324+#endif
23325+
23326+#ifndef GLX_SGI_cushion
23327+#endif
23328+
23329+#ifndef GLX_SGIX_video_resize
23330+#define GLX_SYNC_FRAME_SGIX 0x00000000
23331+#define GLX_SYNC_SWAP_SGIX 0x00000001
23332+#endif
23333+
23334+#ifndef GLX_SGIX_dmbuffer
23335+#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024
23336+#endif
23337+
23338+#ifndef GLX_SGIX_swap_group
23339+#endif
23340+
23341+#ifndef GLX_SGIX_swap_barrier
23342+#endif
23343+
23344+#ifndef GLX_SGIS_blended_overlay
23345+#define GLX_BLENDED_RGBA_SGIS 0x8025
23346+#endif
23347+
23348+#ifndef GLX_SGIS_shared_multisample
23349+#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
23350+#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
23351+#endif
23352+
23353+#ifndef GLX_SUN_get_transparent_index
23354+#endif
23355+
23356+#ifndef GLX_3DFX_multisample
23357+#define GLX_SAMPLE_BUFFERS_3DFX 0x8050
23358+#define GLX_SAMPLES_3DFX 0x8051
23359+#endif
23360+
23361+#ifndef GLX_MESA_copy_sub_buffer
23362+#endif
23363+
23364+#ifndef GLX_MESA_pixmap_colormap
23365+#endif
23366+
23367+#ifndef GLX_MESA_release_buffers
23368+#endif
23369+
23370+#ifndef GLX_MESA_set_3dfx_mode
23371+#define GLX_3DFX_WINDOW_MODE_MESA 0x1
23372+#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
23373+#endif
23374+
23375+#ifndef GLX_SGIX_visual_select_group
23376+#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
23377+#endif
23378+
23379+#ifndef GLX_OML_swap_method
23380+#define GLX_SWAP_METHOD_OML 0x8060
23381+#define GLX_SWAP_EXCHANGE_OML 0x8061
23382+#define GLX_SWAP_COPY_OML 0x8062
23383+#define GLX_SWAP_UNDEFINED_OML 0x8063
23384+#endif
23385+
23386+#ifndef GLX_OML_sync_control
23387+#endif
23388+
23389+#ifndef GLX_NV_float_buffer
23390+#define GLX_FLOAT_COMPONENTS_NV 0x20B0
23391+#endif
23392+
23393+#ifndef GLX_SGIX_hyperpipe
23394+#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
23395+#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
23396+#define GLX_BAD_HYPERPIPE_SGIX 92
23397+#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001
23398+#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002
23399+#define GLX_PIPE_RECT_SGIX 0x00000001
23400+#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002
23401+#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003
23402+#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004
23403+#define GLX_HYPERPIPE_ID_SGIX 0x8030
23404+#endif
23405+
23406+#ifndef GLX_MESA_agp_offset
23407+#endif
23408+
23409+#ifndef GLX_EXT_fbconfig_packed_float
23410+#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
23411+#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008
23412+#endif
23413+
23414+#ifndef GLX_EXT_framebuffer_sRGB
23415+#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
23416+#endif
23417+
23418+#ifndef GLX_EXT_texture_from_pixmap
23419+#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
23420+#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
23421+#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
23422+#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
23423+#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
23424+#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
23425+#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
23426+#define GLX_Y_INVERTED_EXT 0x20D4
23427+#define GLX_TEXTURE_FORMAT_EXT 0x20D5
23428+#define GLX_TEXTURE_TARGET_EXT 0x20D6
23429+#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
23430+#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
23431+#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
23432+#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
23433+#define GLX_TEXTURE_1D_EXT 0x20DB
23434+#define GLX_TEXTURE_2D_EXT 0x20DC
23435+#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
23436+#define GLX_FRONT_LEFT_EXT 0x20DE
23437+#define GLX_FRONT_RIGHT_EXT 0x20DF
23438+#define GLX_BACK_LEFT_EXT 0x20E0
23439+#define GLX_BACK_RIGHT_EXT 0x20E1
23440+#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
23441+#define GLX_BACK_EXT GLX_BACK_LEFT_EXT
23442+#define GLX_AUX0_EXT 0x20E2
23443+#define GLX_AUX1_EXT 0x20E3
23444+#define GLX_AUX2_EXT 0x20E4
23445+#define GLX_AUX3_EXT 0x20E5
23446+#define GLX_AUX4_EXT 0x20E6
23447+#define GLX_AUX5_EXT 0x20E7
23448+#define GLX_AUX6_EXT 0x20E8
23449+#define GLX_AUX7_EXT 0x20E9
23450+#define GLX_AUX8_EXT 0x20EA
23451+#define GLX_AUX9_EXT 0x20EB
23452+#endif
23453+
23454+
23455+/*************************************************************/
23456+
23457+#ifndef GLX_ARB_get_proc_address
23458+typedef void (*__GLXextFuncPtr)(void);
23459+#endif
23460+
23461+#ifndef GLX_SGIX_video_source
23462+typedef XID GLXVideoSourceSGIX;
23463+#endif
23464+
23465+#ifndef GLX_SGIX_fbconfig
23466+typedef XID GLXFBConfigIDSGIX;
23467+typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
23468+#endif
23469+
23470+#ifndef GLX_SGIX_pbuffer
23471+typedef XID GLXPbufferSGIX;
23472+typedef struct {
23473+ int type;
23474+ unsigned long serial; /* # of last request processed by server */
23475+ Bool send_event; /* true if this came for SendEvent request */
23476+ Display *display; /* display the event was read from */
23477+ GLXDrawable drawable; /* i.d. of Drawable */
23478+ int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */
23479+ int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */
23480+ unsigned int mask; /* mask indicating which buffers are affected*/
23481+ int x, y;
23482+ int width, height;
23483+ int count; /* if nonzero, at least this many more */
23484+} GLXBufferClobberEventSGIX;
23485+#endif
23486+
23487+#ifndef GLEXT_64_TYPES_DEFINED
23488+/* This code block is duplicated in glxext.h, so must be protected */
23489+#define GLEXT_64_TYPES_DEFINED
23490+/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
23491+/* (as used in the GLX_OML_sync_control extension). */
23492+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
23493+#include <inttypes.h>
23494+#elif defined(__sun__) || defined(__digital__)
23495+#include <inttypes.h>
23496+#if defined(__STDC__)
23497+#if defined(__arch64__)
23498+typedef long int int64_t;
23499+typedef unsigned long int uint64_t;
23500+#else
23501+typedef long long int int64_t;
23502+typedef unsigned long long int uint64_t;
23503+#endif /* __arch64__ */
23504+#endif /* __STDC__ */
23505+#elif defined( __VMS )
23506+#include <inttypes.h>
23507+#elif defined(__SCO__) || defined(__USLC__)
23508+#include <stdint.h>
23509+#elif defined(__UNIXOS2__) || defined(__SOL64__)
23510+typedef long int int32_t;
23511+typedef long long int int64_t;
23512+typedef unsigned long long int uint64_t;
23513+#elif defined(_WIN32) && defined(__GNUC__)
23514+#include <stdint.h>
23515+#elif defined(_WIN32)
23516+typedef __int32 int32_t;
23517+typedef __int64 int64_t;
23518+typedef unsigned __int64 uint64_t;
23519+#else
23520+#include <inttypes.h> /* Fallback option */
23521+#endif
23522+#endif
23523+
23524+#ifndef GLX_VERSION_1_3
23525+#define GLX_VERSION_1_3 1
23526+#ifdef GLX_GLXEXT_PROTOTYPES
23527+extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *);
23528+extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *);
23529+extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *);
23530+extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig);
23531+extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *);
23532+extern void glXDestroyWindow (Display *, GLXWindow);
23533+extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *);
23534+extern void glXDestroyPixmap (Display *, GLXPixmap);
23535+extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *);
23536+extern void glXDestroyPbuffer (Display *, GLXPbuffer);
23537+extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *);
23538+extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool);
23539+extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext);
23540+extern GLXDrawable glXGetCurrentReadDrawable (void);
23541+extern Display * glXGetCurrentDisplay (void);
23542+extern int glXQueryContext (Display *, GLXContext, int, int *);
23543+extern void glXSelectEvent (Display *, GLXDrawable, unsigned long);
23544+extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *);
23545+#endif /* GLX_GLXEXT_PROTOTYPES */
23546+typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
23547+typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
23548+typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
23549+typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
23550+typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
23551+typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
23552+typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
23553+typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
23554+typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
23555+typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
23556+typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
23557+typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
23558+typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
23559+typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
23560+typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
23561+typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
23562+typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
23563+typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
23564+#endif
23565+
23566+#ifndef GLX_VERSION_1_4
23567+#define GLX_VERSION_1_4 1
23568+#ifdef GLX_GLXEXT_PROTOTYPES
23569+extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *);
23570+#endif /* GLX_GLXEXT_PROTOTYPES */
23571+typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
23572+#endif
23573+
23574+#ifndef GLX_ARB_get_proc_address
23575+#define GLX_ARB_get_proc_address 1
23576+#ifdef GLX_GLXEXT_PROTOTYPES
23577+extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
23578+#endif /* GLX_GLXEXT_PROTOTYPES */
23579+typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
23580+#endif
23581+
23582+#ifndef GLX_ARB_multisample
23583+#define GLX_ARB_multisample 1
23584+#endif
23585+
23586+#ifndef GLX_ARB_fbconfig_float
23587+#define GLX_ARB_fbconfig_float 1
23588+#endif
23589+
23590+#ifndef GLX_SGIS_multisample
23591+#define GLX_SGIS_multisample 1
23592+#endif
23593+
23594+#ifndef GLX_EXT_visual_info
23595+#define GLX_EXT_visual_info 1
23596+#endif
23597+
23598+#ifndef GLX_SGI_swap_control
23599+#define GLX_SGI_swap_control 1
23600+#ifdef GLX_GLXEXT_PROTOTYPES
23601+extern int glXSwapIntervalSGI (int);
23602+#endif /* GLX_GLXEXT_PROTOTYPES */
23603+typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
23604+#endif
23605+
23606+#ifndef GLX_SGI_video_sync
23607+#define GLX_SGI_video_sync 1
23608+#ifdef GLX_GLXEXT_PROTOTYPES
23609+extern int glXGetVideoSyncSGI (unsigned int *);
23610+extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
23611+#endif /* GLX_GLXEXT_PROTOTYPES */
23612+typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
23613+typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
23614+#endif
23615+
23616+#ifndef GLX_SGI_make_current_read
23617+#define GLX_SGI_make_current_read 1
23618+#ifdef GLX_GLXEXT_PROTOTYPES
23619+extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext);
23620+extern GLXDrawable glXGetCurrentReadDrawableSGI (void);
23621+#endif /* GLX_GLXEXT_PROTOTYPES */
23622+typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
23623+typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
23624+#endif
23625+
23626+#ifndef GLX_SGIX_video_source
23627+#define GLX_SGIX_video_source 1
23628+#ifdef _VL_H
23629+#ifdef GLX_GLXEXT_PROTOTYPES
23630+extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode);
23631+extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX);
23632+#endif /* GLX_GLXEXT_PROTOTYPES */
23633+typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
23634+typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
23635+#endif /* _VL_H */
23636+#endif
23637+
23638+#ifndef GLX_EXT_visual_rating
23639+#define GLX_EXT_visual_rating 1
23640+#endif
23641+
23642+#ifndef GLX_EXT_import_context
23643+#define GLX_EXT_import_context 1
23644+#ifdef GLX_GLXEXT_PROTOTYPES
23645+extern Display * glXGetCurrentDisplayEXT (void);
23646+extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *);
23647+extern GLXContextID glXGetContextIDEXT (const GLXContext);
23648+extern GLXContext glXImportContextEXT (Display *, GLXContextID);
23649+extern void glXFreeContextEXT (Display *, GLXContext);
23650+#endif /* GLX_GLXEXT_PROTOTYPES */
23651+typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
23652+typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
23653+typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
23654+typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
23655+typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
23656+#endif
23657+
23658+#ifndef GLX_SGIX_fbconfig
23659+#define GLX_SGIX_fbconfig 1
23660+#ifdef GLX_GLXEXT_PROTOTYPES
23661+extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *);
23662+extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *);
23663+extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap);
23664+extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool);
23665+extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX);
23666+extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *);
23667+#endif /* GLX_GLXEXT_PROTOTYPES */
23668+typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
23669+typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
23670+typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
23671+typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
23672+typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
23673+typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
23674+#endif
23675+
23676+#ifndef GLX_SGIX_pbuffer
23677+#define GLX_SGIX_pbuffer 1
23678+#ifdef GLX_GLXEXT_PROTOTYPES
23679+extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *);
23680+extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX);
23681+extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *);
23682+extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long);
23683+extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *);
23684+#endif /* GLX_GLXEXT_PROTOTYPES */
23685+typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
23686+typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
23687+typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
23688+typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
23689+typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
23690+#endif
23691+
23692+#ifndef GLX_SGI_cushion
23693+#define GLX_SGI_cushion 1
23694+#ifdef GLX_GLXEXT_PROTOTYPES
23695+extern void glXCushionSGI (Display *, Window, float);
23696+#endif /* GLX_GLXEXT_PROTOTYPES */
23697+typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
23698+#endif
23699+
23700+#ifndef GLX_SGIX_video_resize
23701+#define GLX_SGIX_video_resize 1
23702+#ifdef GLX_GLXEXT_PROTOTYPES
23703+extern int glXBindChannelToWindowSGIX (Display *, int, int, Window);
23704+extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int);
23705+extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *);
23706+extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *);
23707+extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum);
23708+#endif /* GLX_GLXEXT_PROTOTYPES */
23709+typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
23710+typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
23711+typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
23712+typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
23713+typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype);
23714+#endif
23715+
23716+#ifndef GLX_SGIX_dmbuffer
23717+#define GLX_SGIX_dmbuffer 1
23718+#ifdef _DM_BUFFER_H_
23719+#ifdef GLX_GLXEXT_PROTOTYPES
23720+extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer);
23721+#endif /* GLX_GLXEXT_PROTOTYPES */
23722+typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
23723+#endif /* _DM_BUFFER_H_ */
23724+#endif
23725+
23726+#ifndef GLX_SGIX_swap_group
23727+#define GLX_SGIX_swap_group 1
23728+#ifdef GLX_GLXEXT_PROTOTYPES
23729+extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable);
23730+#endif /* GLX_GLXEXT_PROTOTYPES */
23731+typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
23732+#endif
23733+
23734+#ifndef GLX_SGIX_swap_barrier
23735+#define GLX_SGIX_swap_barrier 1
23736+#ifdef GLX_GLXEXT_PROTOTYPES
23737+extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int);
23738+extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *);
23739+#endif /* GLX_GLXEXT_PROTOTYPES */
23740+typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
23741+typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
23742+#endif
23743+
23744+#ifndef GLX_SUN_get_transparent_index
23745+#define GLX_SUN_get_transparent_index 1
23746+#ifdef GLX_GLXEXT_PROTOTYPES
23747+extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *);
23748+#endif /* GLX_GLXEXT_PROTOTYPES */
23749+typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
23750+#endif
23751+
23752+#ifndef GLX_MESA_copy_sub_buffer
23753+#define GLX_MESA_copy_sub_buffer 1
23754+#ifdef GLX_GLXEXT_PROTOTYPES
23755+extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int);
23756+#endif /* GLX_GLXEXT_PROTOTYPES */
23757+typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
23758+#endif
23759+
23760+#ifndef GLX_MESA_pixmap_colormap
23761+#define GLX_MESA_pixmap_colormap 1
23762+#ifdef GLX_GLXEXT_PROTOTYPES
23763+extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap);
23764+#endif /* GLX_GLXEXT_PROTOTYPES */
23765+typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
23766+#endif
23767+
23768+#ifndef GLX_MESA_release_buffers
23769+#define GLX_MESA_release_buffers 1
23770+#ifdef GLX_GLXEXT_PROTOTYPES
23771+extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable);
23772+#endif /* GLX_GLXEXT_PROTOTYPES */
23773+typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
23774+#endif
23775+
23776+#ifndef GLX_MESA_set_3dfx_mode
23777+#define GLX_MESA_set_3dfx_mode 1
23778+#ifdef GLX_GLXEXT_PROTOTYPES
23779+extern Bool glXSet3DfxModeMESA (int);
23780+#endif /* GLX_GLXEXT_PROTOTYPES */
23781+typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
23782+#endif
23783+
23784+#ifndef GLX_SGIX_visual_select_group
23785+#define GLX_SGIX_visual_select_group 1
23786+#endif
23787+
23788+#ifndef GLX_OML_swap_method
23789+#define GLX_OML_swap_method 1
23790+#endif
23791+
23792+#ifndef GLX_OML_sync_control
23793+#define GLX_OML_sync_control 1
23794+#ifdef GLX_GLXEXT_PROTOTYPES
23795+extern Bool glXGetSyncValuesOML (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *);
23796+extern Bool glXGetMscRateOML (Display *, GLXDrawable, int32_t *, int32_t *);
23797+extern int64_t glXSwapBuffersMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t);
23798+extern Bool glXWaitForMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *);
23799+extern Bool glXWaitForSbcOML (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *);
23800+#endif /* GLX_GLXEXT_PROTOTYPES */
23801+typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
23802+typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
23803+typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
23804+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);
23805+typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
23806+#endif
23807+
23808+#ifndef GLX_NV_float_buffer
23809+#define GLX_NV_float_buffer 1
23810+#endif
23811+
23812+#ifndef GLX_SGIX_hyperpipe
23813+#define GLX_SGIX_hyperpipe 1
23814+
23815+typedef struct {
23816+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23817+ int networkId;
23818+} GLXHyperpipeNetworkSGIX;
23819+
23820+typedef struct {
23821+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23822+ int channel;
23823+ unsigned int
23824+ participationType;
23825+ int timeSlice;
23826+} GLXHyperpipeConfigSGIX;
23827+
23828+typedef struct {
23829+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23830+ int srcXOrigin, srcYOrigin, srcWidth, srcHeight;
23831+ int destXOrigin, destYOrigin, destWidth, destHeight;
23832+} GLXPipeRect;
23833+
23834+typedef struct {
23835+ char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
23836+ int XOrigin, YOrigin, maxHeight, maxWidth;
23837+} GLXPipeRectLimits;
23838+
23839+#ifdef GLX_GLXEXT_PROTOTYPES
23840+extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *, int *);
23841+extern int glXHyperpipeConfigSGIX (Display *, int, int, GLXHyperpipeConfigSGIX *, int *);
23842+extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *, int, int *);
23843+extern int glXDestroyHyperpipeConfigSGIX (Display *, int);
23844+extern int glXBindHyperpipeSGIX (Display *, int);
23845+extern int glXQueryHyperpipeBestAttribSGIX (Display *, int, int, int, void *, void *);
23846+extern int glXHyperpipeAttribSGIX (Display *, int, int, int, void *);
23847+extern int glXQueryHyperpipeAttribSGIX (Display *, int, int, int, void *);
23848+#endif /* GLX_GLXEXT_PROTOTYPES */
23849+typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);
23850+typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
23851+typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes);
23852+typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId);
23853+typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId);
23854+typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
23855+typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
23856+typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
23857+#endif
23858+
23859+#ifndef GLX_MESA_agp_offset
23860+#define GLX_MESA_agp_offset 1
23861+#ifdef GLX_GLXEXT_PROTOTYPES
23862+extern unsigned int glXGetAGPOffsetMESA (const void *);
23863+#endif /* GLX_GLXEXT_PROTOTYPES */
23864+typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
23865+#endif
23866+
23867+#ifndef GLX_EXT_fbconfig_packed_float
23868+#define GLX_EXT_fbconfig_packed_float 1
23869+#endif
23870+
23871+#ifndef GLX_EXT_framebuffer_sRGB
23872+#define GLX_EXT_framebuffer_sRGB 1
23873+#endif
23874+
23875+#ifndef GLX_EXT_texture_from_pixmap
23876+#define GLX_EXT_texture_from_pixmap 1
23877+#ifdef GLX_GLXEXT_PROTOTYPES
23878+extern void glXBindTexImageEXT (Display *, GLXDrawable, int, const int *);
23879+extern void glXReleaseTexImageEXT (Display *, GLXDrawable, int);
23880+#endif /* GLX_GLXEXT_PROTOTYPES */
23881+typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
23882+typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer);
23883+#endif
23884+
23885+
23886+#ifdef __cplusplus
23887+}
23888+#endif
23889+
23890+#endif
23891Index: qemu-0.12.4/target-i386/mesa_mipmap.c
23892===================================================================
23893--- /dev/null
23894+++ qemu-0.12.4/target-i386/mesa_mipmap.c
23895@@ -0,0 +1,824 @@
23896+
23897+/*
23898+ * Mesa 3-D graphics library
23899+ * Version: 3.4
23900+ * Copyright (C) 1995-2000 Brian Paul
23901+ *
23902+ * This library is free software; you can redistribute it and/or
23903+ * modify it under the terms of the GNU Library General Public
23904+ * License as published by the Free Software Foundation; either
23905+ * version 2 of the License, or (at your option) any later version.
23906+ *
23907+ * This library is distributed in the hope that it will be useful,
23908+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
23909+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23910+ * Library General Public License for more details.
23911+ *
23912+ * You should have received a copy of the GNU Library General Public
23913+ * License along with this library; if not, write to the Free
23914+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23915+ */
23916+
23917+
23918+#ifdef PC_HEADER
23919+#include "all.h"
23920+#else
23921+#include <assert.h>
23922+#include <math.h>
23923+#include <stdio.h>
23924+#include <stdlib.h>
23925+//#include "gluP.h"
23926+#endif
23927+
23928+
23929+/*
23930+ * Compute ceiling of integer quotient of A divided by B:
23931+ */
23932+#define CEILING( A, B ) ( (A) % (B) == 0 ? (A)/(B) : (A)/(B)+1 )
23933+
23934+
23935+
23936+#ifdef EPSILON
23937+#undef EPSILON
23938+#endif
23939+#define EPSILON 0.001
23940+
23941+
23942+/* To work around optimizer bug in MSVC4.1 */
23943+#if defined(__WIN32__) && !defined(OPENSTEP)
23944+void
23945+dummy(GLuint j, GLuint k)
23946+{
23947+}
23948+#else
23949+#define dummy(J, K)
23950+#endif
23951+
23952+
23953+static GLint GLAPIENTRY
23954+mesa_gluScaleImage(GLenum format,
23955+ GLsizei widthin, GLsizei heightin,
23956+ GLenum typein, const void *datain,
23957+ GLsizei widthout, GLsizei heightout,
23958+ GLenum typeout, void *dataout)
23959+{
23960+ GLint components, i, j, k;
23961+ GLfloat *tempin, *tempout;
23962+ GLfloat sx, sy;
23963+ GLint unpackrowlength, unpackalignment, unpackskiprows, unpackskippixels;
23964+ GLint packrowlength, packalignment, packskiprows, packskippixels;
23965+ GLint sizein, sizeout;
23966+ GLint rowstride, rowlen;
23967+
23968+
23969+ /* Determine number of components per pixel */
23970+ switch (format) {
23971+ case GL_COLOR_INDEX:
23972+ case GL_STENCIL_INDEX:
23973+ case GL_DEPTH_COMPONENT:
23974+ case GL_RED:
23975+ case GL_GREEN:
23976+ case GL_BLUE:
23977+ case GL_ALPHA:
23978+ case GL_LUMINANCE:
23979+ components = 1;
23980+ break;
23981+ case GL_LUMINANCE_ALPHA:
23982+ components = 2;
23983+ break;
23984+ case GL_RGB:
23985+ case GL_BGR:
23986+ components = 3;
23987+ break;
23988+ case GL_RGBA:
23989+ case GL_BGRA:
23990+#ifdef GL_EXT_abgr
23991+ case GL_ABGR_EXT:
23992+#endif
23993+ components = 4;
23994+ break;
23995+ default:
23996+ return GLU_INVALID_ENUM;
23997+ }
23998+
23999+ /* Determine bytes per input datum */
24000+ switch (typein) {
24001+ case GL_UNSIGNED_BYTE:
24002+ sizein = sizeof(GLubyte);
24003+ break;
24004+ case GL_BYTE:
24005+ sizein = sizeof(GLbyte);
24006+ break;
24007+ case GL_UNSIGNED_SHORT:
24008+ sizein = sizeof(GLushort);
24009+ break;
24010+ case GL_SHORT:
24011+ sizein = sizeof(GLshort);
24012+ break;
24013+ case GL_UNSIGNED_INT:
24014+ sizein = sizeof(GLuint);
24015+ break;
24016+ case GL_INT:
24017+ sizein = sizeof(GLint);
24018+ break;
24019+ case GL_FLOAT:
24020+ sizein = sizeof(GLfloat);
24021+ break;
24022+ case GL_BITMAP:
24023+ /* not implemented yet */
24024+ default:
24025+ return GL_INVALID_ENUM;
24026+ }
24027+
24028+ /* Determine bytes per output datum */
24029+ switch (typeout) {
24030+ case GL_UNSIGNED_BYTE:
24031+ sizeout = sizeof(GLubyte);
24032+ break;
24033+ case GL_BYTE:
24034+ sizeout = sizeof(GLbyte);
24035+ break;
24036+ case GL_UNSIGNED_SHORT:
24037+ sizeout = sizeof(GLushort);
24038+ break;
24039+ case GL_SHORT:
24040+ sizeout = sizeof(GLshort);
24041+ break;
24042+ case GL_UNSIGNED_INT:
24043+ sizeout = sizeof(GLuint);
24044+ break;
24045+ case GL_INT:
24046+ sizeout = sizeof(GLint);
24047+ break;
24048+ case GL_FLOAT:
24049+ sizeout = sizeof(GLfloat);
24050+ break;
24051+ case GL_BITMAP:
24052+ /* not implemented yet */
24053+ default:
24054+ return GL_INVALID_ENUM;
24055+ }
24056+
24057+ /* Get glPixelStore state */
24058+ glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpackrowlength);
24059+ glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpackalignment);
24060+ glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unpackskiprows);
24061+ glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unpackskippixels);
24062+ glGetIntegerv(GL_PACK_ROW_LENGTH, &packrowlength);
24063+ glGetIntegerv(GL_PACK_ALIGNMENT, &packalignment);
24064+ glGetIntegerv(GL_PACK_SKIP_ROWS, &packskiprows);
24065+ glGetIntegerv(GL_PACK_SKIP_PIXELS, &packskippixels);
24066+
24067+ /* Allocate storage for intermediate images */
24068+ tempin = (GLfloat *) malloc(widthin * heightin
24069+ * components * sizeof(GLfloat));
24070+ if (!tempin) {
24071+ return GLU_OUT_OF_MEMORY;
24072+ }
24073+ tempout = (GLfloat *) malloc(widthout * heightout
24074+ * components * sizeof(GLfloat));
24075+ if (!tempout) {
24076+ free(tempin);
24077+ return GLU_OUT_OF_MEMORY;
24078+ }
24079+
24080+
24081+ /*
24082+ * Unpack the pixel data and convert to floating point
24083+ */
24084+
24085+ if (unpackrowlength > 0) {
24086+ rowlen = unpackrowlength;
24087+ }
24088+ else {
24089+ rowlen = widthin;
24090+ }
24091+ if (sizein >= unpackalignment) {
24092+ rowstride = components * rowlen;
24093+ }
24094+ else {
24095+ rowstride = unpackalignment / sizein
24096+ * CEILING(components * rowlen * sizein, unpackalignment);
24097+ }
24098+
24099+ switch (typein) {
24100+ case GL_UNSIGNED_BYTE:
24101+ k = 0;
24102+ for (i = 0; i < heightin; i++) {
24103+ GLubyte *ubptr = (GLubyte *) datain
24104+ + i * rowstride
24105+ + unpackskiprows * rowstride + unpackskippixels * components;
24106+ for (j = 0; j < widthin * components; j++) {
24107+ dummy(j, k);
24108+ tempin[k++] = (GLfloat) * ubptr++;
24109+ }
24110+ }
24111+ break;
24112+ case GL_BYTE:
24113+ k = 0;
24114+ for (i = 0; i < heightin; i++) {
24115+ GLbyte *bptr = (GLbyte *) datain
24116+ + i * rowstride
24117+ + unpackskiprows * rowstride + unpackskippixels * components;
24118+ for (j = 0; j < widthin * components; j++) {
24119+ dummy(j, k);
24120+ tempin[k++] = (GLfloat) * bptr++;
24121+ }
24122+ }
24123+ break;
24124+ case GL_UNSIGNED_SHORT:
24125+ k = 0;
24126+ for (i = 0; i < heightin; i++) {
24127+ GLushort *usptr = (GLushort *) datain
24128+ + i * rowstride
24129+ + unpackskiprows * rowstride + unpackskippixels * components;
24130+ for (j = 0; j < widthin * components; j++) {
24131+ dummy(j, k);
24132+ tempin[k++] = (GLfloat) * usptr++;
24133+ }
24134+ }
24135+ break;
24136+ case GL_SHORT:
24137+ k = 0;
24138+ for (i = 0; i < heightin; i++) {
24139+ GLshort *sptr = (GLshort *) datain
24140+ + i * rowstride
24141+ + unpackskiprows * rowstride + unpackskippixels * components;
24142+ for (j = 0; j < widthin * components; j++) {
24143+ dummy(j, k);
24144+ tempin[k++] = (GLfloat) * sptr++;
24145+ }
24146+ }
24147+ break;
24148+ case GL_UNSIGNED_INT:
24149+ k = 0;
24150+ for (i = 0; i < heightin; i++) {
24151+ GLuint *uiptr = (GLuint *) datain
24152+ + i * rowstride
24153+ + unpackskiprows * rowstride + unpackskippixels * components;
24154+ for (j = 0; j < widthin * components; j++) {
24155+ dummy(j, k);
24156+ tempin[k++] = (GLfloat) * uiptr++;
24157+ }
24158+ }
24159+ break;
24160+ case GL_INT:
24161+ k = 0;
24162+ for (i = 0; i < heightin; i++) {
24163+ GLint *iptr = (GLint *) datain
24164+ + i * rowstride
24165+ + unpackskiprows * rowstride + unpackskippixels * components;
24166+ for (j = 0; j < widthin * components; j++) {
24167+ dummy(j, k);
24168+ tempin[k++] = (GLfloat) * iptr++;
24169+ }
24170+ }
24171+ break;
24172+ case GL_FLOAT:
24173+ k = 0;
24174+ for (i = 0; i < heightin; i++) {
24175+ GLfloat *fptr = (GLfloat *) datain
24176+ + i * rowstride
24177+ + unpackskiprows * rowstride + unpackskippixels * components;
24178+ for (j = 0; j < widthin * components; j++) {
24179+ dummy(j, k);
24180+ tempin[k++] = *fptr++;
24181+ }
24182+ }
24183+ break;
24184+ default:
24185+ return GLU_INVALID_ENUM;
24186+ }
24187+
24188+
24189+ /*
24190+ * Scale the image!
24191+ */
24192+
24193+ if (widthout > 1)
24194+ sx = (GLfloat) (widthin - 1) / (GLfloat) (widthout - 1);
24195+ else
24196+ sx = (GLfloat) (widthin - 1);
24197+ if (heightout > 1)
24198+ sy = (GLfloat) (heightin - 1) / (GLfloat) (heightout - 1);
24199+ else
24200+ sy = (GLfloat) (heightin - 1);
24201+
24202+/*#define POINT_SAMPLE*/
24203+#ifdef POINT_SAMPLE
24204+ for (i = 0; i < heightout; i++) {
24205+ GLint ii = i * sy;
24206+ for (j = 0; j < widthout; j++) {
24207+ GLint jj = j * sx;
24208+
24209+ GLfloat *src = tempin + (ii * widthin + jj) * components;
24210+ GLfloat *dst = tempout + (i * widthout + j) * components;
24211+
24212+ for (k = 0; k < components; k++) {
24213+ *dst++ = *src++;
24214+ }
24215+ }
24216+ }
24217+#else
24218+ if (sx < 1.0 && sy < 1.0) {
24219+ /* magnify both width and height: use weighted sample of 4 pixels */
24220+ GLint i0, i1, j0, j1;
24221+ GLfloat alpha, beta;
24222+ GLfloat *src00, *src01, *src10, *src11;
24223+ GLfloat s1, s2;
24224+ GLfloat *dst;
24225+
24226+ for (i = 0; i < heightout; i++) {
24227+ i0 = i * sy;
24228+ i1 = i0 + 1;
24229+ if (i1 >= heightin)
24230+ i1 = heightin - 1;
24231+/* i1 = (i+1) * sy - EPSILON;*/
24232+ alpha = i * sy - i0;
24233+ for (j = 0; j < widthout; j++) {
24234+ j0 = j * sx;
24235+ j1 = j0 + 1;
24236+ if (j1 >= widthin)
24237+ j1 = widthin - 1;
24238+/* j1 = (j+1) * sx - EPSILON; */
24239+ beta = j * sx - j0;
24240+
24241+ /* compute weighted average of pixels in rect (i0,j0)-(i1,j1) */
24242+ src00 = tempin + (i0 * widthin + j0) * components;
24243+ src01 = tempin + (i0 * widthin + j1) * components;
24244+ src10 = tempin + (i1 * widthin + j0) * components;
24245+ src11 = tempin + (i1 * widthin + j1) * components;
24246+
24247+ dst = tempout + (i * widthout + j) * components;
24248+
24249+ for (k = 0; k < components; k++) {
24250+ s1 = *src00++ * (1.0 - beta) + *src01++ * beta;
24251+ s2 = *src10++ * (1.0 - beta) + *src11++ * beta;
24252+ *dst++ = s1 * (1.0 - alpha) + s2 * alpha;
24253+ }
24254+ }
24255+ }
24256+ }
24257+ else {
24258+ /* shrink width and/or height: use an unweighted box filter */
24259+ GLint i0, i1;
24260+ GLint j0, j1;
24261+ GLint ii, jj;
24262+ GLfloat sum, *dst;
24263+
24264+ for (i = 0; i < heightout; i++) {
24265+ i0 = i * sy;
24266+ i1 = i0 + 1;
24267+ if (i1 >= heightin)
24268+ i1 = heightin - 1;
24269+/* i1 = (i+1) * sy - EPSILON; */
24270+ for (j = 0; j < widthout; j++) {
24271+ j0 = j * sx;
24272+ j1 = j0 + 1;
24273+ if (j1 >= widthin)
24274+ j1 = widthin - 1;
24275+/* j1 = (j+1) * sx - EPSILON; */
24276+
24277+ dst = tempout + (i * widthout + j) * components;
24278+
24279+ /* compute average of pixels in the rectangle (i0,j0)-(i1,j1) */
24280+ for (k = 0; k < components; k++) {
24281+ sum = 0.0;
24282+ for (ii = i0; ii <= i1; ii++) {
24283+ for (jj = j0; jj <= j1; jj++) {
24284+ sum += *(tempin + (ii * widthin + jj) * components + k);
24285+ }
24286+ }
24287+ sum /= (j1 - j0 + 1) * (i1 - i0 + 1);
24288+ *dst++ = sum;
24289+ }
24290+ }
24291+ }
24292+ }
24293+#endif
24294+
24295+
24296+ /*
24297+ * Return output image
24298+ */
24299+
24300+ if (packrowlength > 0) {
24301+ rowlen = packrowlength;
24302+ }
24303+ else {
24304+ rowlen = widthout;
24305+ }
24306+ if (sizeout >= packalignment) {
24307+ rowstride = components * rowlen;
24308+ }
24309+ else {
24310+ rowstride = packalignment / sizeout
24311+ * CEILING(components * rowlen * sizeout, packalignment);
24312+ }
24313+
24314+ switch (typeout) {
24315+ case GL_UNSIGNED_BYTE:
24316+ k = 0;
24317+ for (i = 0; i < heightout; i++) {
24318+ GLubyte *ubptr = (GLubyte *) dataout
24319+ + i * rowstride
24320+ + packskiprows * rowstride + packskippixels * components;
24321+ for (j = 0; j < widthout * components; j++) {
24322+ dummy(j, k + i);
24323+ *ubptr++ = (GLubyte) tempout[k++];
24324+ }
24325+ }
24326+ break;
24327+ case GL_BYTE:
24328+ k = 0;
24329+ for (i = 0; i < heightout; i++) {
24330+ GLbyte *bptr = (GLbyte *) dataout
24331+ + i * rowstride
24332+ + packskiprows * rowstride + packskippixels * components;
24333+ for (j = 0; j < widthout * components; j++) {
24334+ dummy(j, k + i);
24335+ *bptr++ = (GLbyte) tempout[k++];
24336+ }
24337+ }
24338+ break;
24339+ case GL_UNSIGNED_SHORT:
24340+ k = 0;
24341+ for (i = 0; i < heightout; i++) {
24342+ GLushort *usptr = (GLushort *) dataout
24343+ + i * rowstride
24344+ + packskiprows * rowstride + packskippixels * components;
24345+ for (j = 0; j < widthout * components; j++) {
24346+ dummy(j, k + i);
24347+ *usptr++ = (GLushort) tempout[k++];
24348+ }
24349+ }
24350+ break;
24351+ case GL_SHORT:
24352+ k = 0;
24353+ for (i = 0; i < heightout; i++) {
24354+ GLshort *sptr = (GLshort *) dataout
24355+ + i * rowstride
24356+ + packskiprows * rowstride + packskippixels * components;
24357+ for (j = 0; j < widthout * components; j++) {
24358+ dummy(j, k + i);
24359+ *sptr++ = (GLshort) tempout[k++];
24360+ }
24361+ }
24362+ break;
24363+ case GL_UNSIGNED_INT:
24364+ k = 0;
24365+ for (i = 0; i < heightout; i++) {
24366+ GLuint *uiptr = (GLuint *) dataout
24367+ + i * rowstride
24368+ + packskiprows * rowstride + packskippixels * components;
24369+ for (j = 0; j < widthout * components; j++) {
24370+ dummy(j, k + i);
24371+ *uiptr++ = (GLuint) tempout[k++];
24372+ }
24373+ }
24374+ break;
24375+ case GL_INT:
24376+ k = 0;
24377+ for (i = 0; i < heightout; i++) {
24378+ GLint *iptr = (GLint *) dataout
24379+ + i * rowstride
24380+ + packskiprows * rowstride + packskippixels * components;
24381+ for (j = 0; j < widthout * components; j++) {
24382+ dummy(j, k + i);
24383+ *iptr++ = (GLint) tempout[k++];
24384+ }
24385+ }
24386+ break;
24387+ case GL_FLOAT:
24388+ k = 0;
24389+ for (i = 0; i < heightout; i++) {
24390+ GLfloat *fptr = (GLfloat *) dataout
24391+ + i * rowstride
24392+ + packskiprows * rowstride + packskippixels * components;
24393+ for (j = 0; j < widthout * components; j++) {
24394+ dummy(j, k + i);
24395+ *fptr++ = tempout[k++];
24396+ }
24397+ }
24398+ break;
24399+ default:
24400+ return GLU_INVALID_ENUM;
24401+ }
24402+
24403+
24404+ /* free temporary image storage */
24405+ free(tempin);
24406+ free(tempout);
24407+
24408+ return 0;
24409+}
24410+
24411+
24412+
24413+/*
24414+ * Return the largest k such that 2^k <= n.
24415+ */
24416+static GLint
24417+ilog2(GLint n)
24418+{
24419+ GLint k;
24420+
24421+ if (n <= 0)
24422+ return 0;
24423+ for (k = 0; n >>= 1; k++);
24424+ return k;
24425+}
24426+
24427+
24428+
24429+/*
24430+ * Find the value nearest to n which is also a power of two.
24431+ */
24432+static GLint
24433+round2(GLint n)
24434+{
24435+ GLint m;
24436+
24437+ for (m = 1; m < n; m *= 2);
24438+
24439+ /* m>=n */
24440+ if (m - n <= n - m / 2) {
24441+ return m;
24442+ }
24443+ else {
24444+ return m / 2;
24445+ }
24446+}
24447+
24448+
24449+/*
24450+ * Given an pixel format and datatype, return the number of bytes to
24451+ * store one pixel.
24452+ */
24453+static GLint
24454+bytes_per_pixel(GLenum format, GLenum type)
24455+{
24456+ GLint n, m;
24457+
24458+ switch (format) {
24459+ case GL_COLOR_INDEX:
24460+ case GL_STENCIL_INDEX:
24461+ case GL_DEPTH_COMPONENT:
24462+ case GL_RED:
24463+ case GL_GREEN:
24464+ case GL_BLUE:
24465+ case GL_ALPHA:
24466+ case GL_LUMINANCE:
24467+ n = 1;
24468+ break;
24469+ case GL_LUMINANCE_ALPHA:
24470+ n = 2;
24471+ break;
24472+ case GL_RGB:
24473+ case GL_BGR:
24474+ n = 3;
24475+ break;
24476+ case GL_RGBA:
24477+ case GL_BGRA:
24478+#ifdef GL_EXT_abgr
24479+ case GL_ABGR_EXT:
24480+#endif
24481+ n = 4;
24482+ break;
24483+ default:
24484+ n = 0;
24485+ }
24486+
24487+ switch (type) {
24488+ case GL_UNSIGNED_BYTE:
24489+ m = sizeof(GLubyte);
24490+ break;
24491+ case GL_BYTE:
24492+ m = sizeof(GLbyte);
24493+ break;
24494+ case GL_BITMAP:
24495+ m = 1;
24496+ break;
24497+ case GL_UNSIGNED_SHORT:
24498+ m = sizeof(GLushort);
24499+ break;
24500+ case GL_SHORT:
24501+ m = sizeof(GLshort);
24502+ break;
24503+ case GL_UNSIGNED_INT:
24504+ m = sizeof(GLuint);
24505+ break;
24506+ case GL_INT:
24507+ m = sizeof(GLint);
24508+ break;
24509+ case GL_FLOAT:
24510+ m = sizeof(GLfloat);
24511+ break;
24512+ default:
24513+ m = 0;
24514+ }
24515+
24516+ return n * m;
24517+}
24518+
24519+
24520+
24521+/*
24522+ * WARNING: This function isn't finished and has never been tested!!!!
24523+ */
24524+GLint GLAPIENTRY
24525+mesa_gluBuild1DMipmaps(GLenum target, GLint components,
24526+ GLsizei width, GLenum format, GLenum type, const void *data)
24527+{
24528+ GLubyte *texture;
24529+ GLint levels, max_levels;
24530+ GLint new_width, max_width;
24531+ GLint i, j, k, l;
24532+
24533+ if (width < 1)
24534+ return GLU_INVALID_VALUE;
24535+
24536+ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_width);
24537+ max_levels = ilog2(max_width) + 1;
24538+
24539+ /* Compute how many mipmap images to make */
24540+ levels = ilog2(width) + 1;
24541+ if (levels > max_levels) {
24542+ levels = max_levels;
24543+ }
24544+
24545+ new_width = 1 << (levels - 1);
24546+
24547+ texture = (GLubyte *) malloc(new_width * components);
24548+ if (!texture) {
24549+ return GLU_OUT_OF_MEMORY;
24550+ }
24551+
24552+ if (width != new_width) {
24553+ /* initial rescaling */
24554+ switch (type) {
24555+ case GL_UNSIGNED_BYTE:
24556+ {
24557+ GLubyte *ub_data = (GLubyte *) data;
24558+ for (i = 0; i < new_width; i++) {
24559+ j = i * width / new_width;
24560+ for (k = 0; k < components; k++) {
24561+ texture[i * components + k] = ub_data[j * components + k];
24562+ }
24563+ }
24564+ }
24565+ break;
24566+ default:
24567+ /* Not implemented */
24568+ return GLU_ERROR;
24569+ }
24570+ }
24571+
24572+ /* generate and load mipmap images */
24573+ for (l = 0; l < levels; l++) {
24574+ glTexImage1D(GL_TEXTURE_1D, l, components, new_width, 0,
24575+ format, GL_UNSIGNED_BYTE, texture);
24576+
24577+ /* Scale image down to 1/2 size */
24578+ new_width = new_width / 2;
24579+ for (i = 0; i < new_width; i++) {
24580+ for (k = 0; k < components; k++) {
24581+ GLint sample1, sample2;
24582+ sample1 = (GLint) texture[i * 2 * components + k];
24583+ sample2 = (GLint) texture[(i * 2 + 1) * components + k];
24584+ texture[i * components + k] = (GLubyte) ((sample1 + sample2) / 2);
24585+ }
24586+ }
24587+ }
24588+
24589+ free(texture);
24590+
24591+ return 0;
24592+}
24593+
24594+
24595+
24596+GLint GLAPIENTRY
24597+mesa_gluBuild2DMipmaps(GLenum target, GLint components,
24598+ GLsizei width, GLsizei height, GLenum format,
24599+ GLenum type, const void *data)
24600+{
24601+ GLint w, h, maxsize;
24602+ void *image, *newimage;
24603+ GLint neww, newh, level, bpp;
24604+ int error;
24605+ GLboolean done;
24606+ GLint retval = 0;
24607+ GLint unpackrowlength, unpackalignment, unpackskiprows, unpackskippixels;
24608+ GLint packrowlength, packalignment, packskiprows, packskippixels;
24609+
24610+ if (width < 1 || height < 1)
24611+ return GLU_INVALID_VALUE;
24612+
24613+ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxsize);
24614+
24615+ w = round2(width);
24616+ if (w > maxsize) {
24617+ w = maxsize;
24618+ }
24619+ h = round2(height);
24620+ if (h > maxsize) {
24621+ h = maxsize;
24622+ }
24623+
24624+ bpp = bytes_per_pixel(format, type);
24625+ if (bpp == 0) {
24626+ /* probably a bad format or type enum */
24627+ return GLU_INVALID_ENUM;
24628+ }
24629+
24630+ /* Get current glPixelStore values */
24631+ glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unpackrowlength);
24632+ glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpackalignment);
24633+ glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unpackskiprows);
24634+ glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unpackskippixels);
24635+ glGetIntegerv(GL_PACK_ROW_LENGTH, &packrowlength);
24636+ glGetIntegerv(GL_PACK_ALIGNMENT, &packalignment);
24637+ glGetIntegerv(GL_PACK_SKIP_ROWS, &packskiprows);
24638+ glGetIntegerv(GL_PACK_SKIP_PIXELS, &packskippixels);
24639+
24640+ /* set pixel packing */
24641+ glPixelStorei(GL_PACK_ROW_LENGTH, 0);
24642+ glPixelStorei(GL_PACK_ALIGNMENT, 1);
24643+ glPixelStorei(GL_PACK_SKIP_ROWS, 0);
24644+ glPixelStorei(GL_PACK_SKIP_PIXELS, 0);
24645+
24646+ done = GL_FALSE;
24647+
24648+ if (w != width || h != height) {
24649+ /* must rescale image to get "top" mipmap texture image */
24650+ image = malloc((w + 4) * h * bpp);
24651+ if (!image) {
24652+ return GLU_OUT_OF_MEMORY;
24653+ }
24654+ error = mesa_gluScaleImage(format, width, height, type, data,
24655+ w, h, type, image);
24656+ if (error) {
24657+ retval = error;
24658+ done = GL_TRUE;
24659+ }
24660+ }
24661+ else {
24662+ image = (void *) data;
24663+ }
24664+
24665+ level = 0;
24666+ while (!done) {
24667+ if (image != data) {
24668+ /* set pixel unpacking */
24669+ glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
24670+ glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
24671+ glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
24672+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
24673+ }
24674+
24675+ glTexImage2D(target, level, components, w, h, 0, format, type, image);
24676+
24677+ if (w == 1 && h == 1)
24678+ break;
24679+
24680+ neww = (w < 2) ? 1 : w / 2;
24681+ newh = (h < 2) ? 1 : h / 2;
24682+ newimage = malloc((neww + 4) * newh * bpp);
24683+ if (!newimage) {
24684+ return GLU_OUT_OF_MEMORY;
24685+ }
24686+
24687+ error = mesa_gluScaleImage(format, w, h, type, image,
24688+ neww, newh, type, newimage);
24689+ if (error) {
24690+ retval = error;
24691+ done = GL_TRUE;
24692+ }
24693+
24694+ if (image != data) {
24695+ free(image);
24696+ }
24697+ image = newimage;
24698+
24699+ w = neww;
24700+ h = newh;
24701+ level++;
24702+ }
24703+
24704+ if (image != data) {
24705+ free(image);
24706+ }
24707+
24708+ /* Restore original glPixelStore state */
24709+ glPixelStorei(GL_UNPACK_ROW_LENGTH, unpackrowlength);
24710+ glPixelStorei(GL_UNPACK_ALIGNMENT, unpackalignment);
24711+ glPixelStorei(GL_UNPACK_SKIP_ROWS, unpackskiprows);
24712+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, unpackskippixels);
24713+ glPixelStorei(GL_PACK_ROW_LENGTH, packrowlength);
24714+ glPixelStorei(GL_PACK_ALIGNMENT, packalignment);
24715+ glPixelStorei(GL_PACK_SKIP_ROWS, packskiprows);
24716+ glPixelStorei(GL_PACK_SKIP_PIXELS, packskippixels);
24717+
24718+ return retval;
24719+}
24720Index: qemu-0.12.4/target-i386/opengl_exec.c
24721===================================================================
24722--- /dev/null
24723+++ qemu-0.12.4/target-i386/opengl_exec.c
24724@@ -0,0 +1,3931 @@
24725+/*
24726+ * Host-side implementation of GL/GLX API
24727+ *
24728+ * Copyright (c) 2006,2007 Even Rouault
24729+ *
24730+ * Permission is hereby granted, free of charge, to any person obtaining a copy
24731+ * of this software and associated documentation files (the "Software"), to deal
24732+ * in the Software without restriction, including without limitation the rights
24733+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
24734+ * copies of the Software, and to permit persons to whom the Software is
24735+ * furnished to do so, subject to the following conditions:
24736+ *
24737+ * The above copyright notice and this permission notice shall be included in
24738+ * all copies or substantial portions of the Software.
24739+ *
24740+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24741+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24742+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24743+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24744+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24745+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24746+ * THE SOFTWARE.
24747+ */
24748+
24749+
24750+#include <stdio.h>
24751+#include <stdlib.h>
24752+#include <assert.h>
24753+#include <string.h>
24754+
24755+#include <X11/Xlib.h>
24756+#include <X11/Xutil.h>
24757+
24758+#define GL_GLEXT_PROTOTYPES
24759+#define GLX_GLXEXT_PROTOTYPES
24760+
24761+#include <mesa_gl.h>
24762+#include <mesa_glx.h>
24763+
24764+// TODO
24765+typedef long unsigned int target_phys_addr_t;
24766+
24767+#include "opengl_func.h"
24768+
24769+#include "mesa_glu.h"
24770+#include "mesa_mipmap.c"
24771+
24772+#include "../qemu-common.h"
24773+
24774+//#define SYSTEMATIC_ERROR_CHECK
24775+#define BUFFER_BEGINEND
24776+#define glGetError() 0
24777+
24778+#define GET_EXT_PTR(type, funcname, args_decl) \
24779+ static int detect_##funcname = 0; \
24780+ static type(*ptr_func_##funcname)args_decl = NULL; \
24781+ if (detect_##funcname == 0) \
24782+ { \
24783+ detect_##funcname = 1; \
24784+ ptr_func_##funcname = (type(*)args_decl)glXGetProcAddressARB((const GLubyte*)#funcname); \
24785+ assert (ptr_func_##funcname); \
24786+ }
24787+
24788+#define GET_EXT_PTR_NO_FAIL(type, funcname, args_decl) \
24789+ static int detect_##funcname = 0; \
24790+ static type(*ptr_func_##funcname)args_decl = NULL; \
24791+ if (detect_##funcname == 0) \
24792+ { \
24793+ detect_##funcname = 1; \
24794+ ptr_func_##funcname = (type(*)args_decl)glXGetProcAddressARB((const GLubyte*)#funcname); \
24795+ }
24796+
24797+#ifndef WIN32
24798+#include <dlfcn.h>
24799+#endif
24800+
24801+static void *get_glu_ptr(const char *name)
24802+{
24803+ static void *handle = (void *) -1;
24804+
24805+ if (handle == (void *) -1) {
24806+#ifndef WIN32
24807+ handle = dlopen("libGLU.so", RTLD_LAZY);
24808+ if (!handle)
24809+ fprintf(stderr, "can't load libGLU.so : %s\n", dlerror());
24810+#else
24811+ handle = (void *) LoadLibrary("glu32.dll");
24812+ if (!handle)
24813+ fprintf(stderr, "can't load glu32.dll\n");
24814+#endif
24815+ }
24816+ if (handle) {
24817+#ifndef WIN32
24818+ return dlsym(handle, name);
24819+#else
24820+ return GetProcAddress(handle, name);
24821+#endif
24822+ }
24823+ return NULL;
24824+}
24825+
24826+#define GET_GLU_PTR(type, funcname, args_decl) \
24827+ static int detect_##funcname = 0; \
24828+ static type(*ptr_func_##funcname)args_decl = NULL; \
24829+ if (detect_##funcname == 0) \
24830+ { \
24831+ detect_##funcname = 1; \
24832+ ptr_func_##funcname = (type(*)args_decl)get_glu_ptr(#funcname); \
24833+ }
24834+
24835+int display_function_call = 0;
24836+
24837+static const int defaultAttribList[] = {
24838+ GLX_RGBA,
24839+ GLX_RED_SIZE, 1,
24840+ GLX_GREEN_SIZE, 1,
24841+ GLX_BLUE_SIZE, 1,
24842+ GLX_DOUBLEBUFFER,
24843+ None
24844+};
24845+
24846+static XVisualInfo *get_default_visual(Display *dpy)
24847+{
24848+ static XVisualInfo *vis = NULL;
24849+ XVisualInfo theTemplate;
24850+ int numVisuals;
24851+
24852+ if (vis)
24853+ return vis;
24854+ fprintf(stderr, "get_default_visual\n");
24855+ /* if (vis == NULL) vis = glXChooseVisual(dpy, 0,
24856+ * (int*)defaultAttribList); */
24857+ theTemplate.screen = 0;
24858+ vis = XGetVisualInfo(dpy, VisualScreenMask, &theTemplate, &numVisuals);
24859+
24860+ return vis;
24861+}
24862+
24863+
24864+static Display *parent_dpy = NULL;
24865+static Window qemu_parent_window = 0;
24866+
24867+static Window active_win = 0; /* FIXME */
24868+static int active_win_x = 0;
24869+static int active_win_y = 0;
24870+
24871+void opengl_exec_set_parent_window(Display *_dpy, Window _parent_window)
24872+{
24873+ parent_dpy = _dpy;
24874+ qemu_parent_window = _parent_window;
24875+ if (active_win)
24876+ XReparentWindow(_dpy, active_win, _parent_window, active_win_x,
24877+ active_win_y);
24878+}
24879+
24880+static int local_connection = 0;
24881+void opengl_exec_set_local_connection()
24882+{
24883+ local_connection = 1;
24884+}
24885+
24886+static GLXDrawable create_window(Display *dpy, Window local_parent_window,
24887+ XVisualInfo *vis, const char *name,
24888+ int x, int y, int width, int height)
24889+{
24890+ int scrnum;
24891+ XSetWindowAttributes attr = { 0 };
24892+ unsigned long mask;
24893+ Window root;
24894+ Window win;
24895+
24896+ scrnum = DefaultScreen(dpy);
24897+ root = RootWindow(dpy, scrnum);
24898+
24899+ /* window attributes */
24900+ attr.background_pixel = 0xff000000;
24901+ attr.border_pixel = 0;
24902+ attr.colormap = XCreateColormap(dpy, root, vis->visual, AllocNone);
24903+ attr.event_mask = 0; /* StructureNotifyMask | ExposureMask | KeyPressMask */
24904+ attr.save_under = True;
24905+ // if (local_parent_window == NULL && qemu_parent_window == NULL)
24906+ attr.override_redirect = True;
24907+ // else
24908+ // attr.override_redirect = True;
24909+ attr.cursor = None;
24910+ mask =
24911+ CWBackPixel | CWBorderPixel | CWColormap | CWEventMask |
24912+ CWOverrideRedirect | CWSaveUnder;
24913+
24914+ if (local_parent_window)
24915+ win = XCreateWindow(dpy, local_parent_window, 0, 0, width, height, 0,
24916+ vis->depth, InputOutput, vis->visual, mask, &attr);
24917+ else if (qemu_parent_window)
24918+ win = XCreateWindow(dpy, qemu_parent_window, 0, 0, width, height, 0,
24919+ vis->depth, InputOutput, vis->visual, mask, &attr);
24920+ else
24921+ win = XCreateWindow(dpy, root, 0, 0, width, height, 0, vis->depth,
24922+ InputOutput, vis->visual, mask, &attr);
24923+
24924+ /* set hints and properties */
24925+ {
24926+ XSizeHints sizehints;
24927+
24928+ sizehints.x = x;
24929+ sizehints.y = y;
24930+ sizehints.width = width;
24931+ sizehints.height = height;
24932+ sizehints.flags = USSize | USPosition;
24933+ XSetWMNormalHints(dpy, win, &sizehints);
24934+ XSetStandardProperties(dpy, win, name, name, None,
24935+ (char **) NULL, 0, &sizehints);
24936+ }
24937+
24938+ XSync(dpy, 0);
24939+
24940+ /*
24941+ * int loop = 1; while (loop) { while (XPending(dpy) > 0) { XEvent event;
24942+ * XNextEvent(dpy, &event); switch (event.type) { case CreateNotify: { if
24943+ * (((XCreateWindowEvent*)&event)->window == win) { loop = 0; } break; } }
24944+ * } } */
24945+
24946+ /* TODO */
24947+ if (!active_win)
24948+ active_win = win;
24949+
24950+ return win;
24951+}
24952+
24953+typedef struct {
24954+ void *key;
24955+ void *value;
24956+} Assoc;
24957+
24958+#define MAX_HANDLED_PROCESS 100
24959+#define MAX_ASSOC_SIZE 100
24960+
24961+#define MAX_FBCONFIG 10
24962+
24963+#include "opengl_utils.h"
24964+
24965+#define MAX(a, b) (((a) > (b)) ? (a) : (b))
24966+
24967+
24968+typedef struct {
24969+ int x;
24970+ int y;
24971+ int width;
24972+ int height;
24973+ int map_state;
24974+} WindowPosStruct;
24975+
24976+typedef struct {
24977+ GLbitfield mask;
24978+ int activeTextureIndex;
24979+} ClientState;
24980+
24981+#define MAX_CLIENT_STATE_STACK_SIZE 16
24982+
24983+typedef struct {
24984+ int ref;
24985+ int fake_ctxt;
24986+ int fake_shareList;
24987+ GLXContext context;
24988+ GLXDrawable drawable;
24989+
24990+ void *vertexPointer;
24991+ void *normalPointer;
24992+ void *colorPointer;
24993+ void *secondaryColorPointer;
24994+ void *indexPointer;
24995+ void *texCoordPointer[NB_MAX_TEXTURES];
24996+ void *edgeFlagPointer;
24997+ void *vertexAttribPointer[MY_GL_MAX_VERTEX_ATTRIBS_ARB];
24998+ void *vertexAttribPointerNV[MY_GL_MAX_VERTEX_ATTRIBS_NV];
24999+ void *weightPointer;
25000+ void *matrixIndexPointer;
25001+ void *fogCoordPointer;
25002+ void *variantPointerEXT[MY_GL_MAX_VARIANT_POINTER_EXT];
25003+ void *interleavedArrays;
25004+ void *elementPointerATI;
25005+
25006+ int vertexPointerSize;
25007+ int normalPointerSize;
25008+ int colorPointerSize;
25009+ int secondaryColorPointerSize;
25010+ int indexPointerSize;
25011+ int texCoordPointerSize[NB_MAX_TEXTURES];
25012+ int edgeFlagPointerSize;
25013+ int vertexAttribPointerSize[MY_GL_MAX_VERTEX_ATTRIBS_ARB];
25014+ int vertexAttribPointerNVSize[MY_GL_MAX_VERTEX_ATTRIBS_NV];
25015+ int weightPointerSize;
25016+ int matrixIndexPointerSize;
25017+ int fogCoordPointerSize;
25018+ int variantPointerEXTSize[MY_GL_MAX_VARIANT_POINTER_EXT];
25019+ int interleavedArraysSize;
25020+ int elementPointerATISize;
25021+
25022+ int selectBufferSize;
25023+ void *selectBufferPtr;
25024+ int feedbackBufferSize;
25025+ void *feedbackBufferPtr;
25026+
25027+ ClientState clientStateStack[MAX_CLIENT_STATE_STACK_SIZE];
25028+ int clientStateSp;
25029+ int activeTextureIndex;
25030+
25031+ unsigned int ownTabTextures[32768];
25032+ unsigned int *tabTextures;
25033+ RangeAllocator ownTextureAllocator;
25034+ RangeAllocator *textureAllocator;
25035+
25036+ unsigned int ownTabBuffers[32768];
25037+ unsigned int *tabBuffers;
25038+ RangeAllocator ownBufferAllocator;
25039+ RangeAllocator *bufferAllocator;
25040+
25041+ unsigned int ownTabLists[32768];
25042+ unsigned int *tabLists;
25043+ RangeAllocator ownListAllocator;
25044+ RangeAllocator *listAllocator;
25045+
25046+#ifdef SYSTEMATIC_ERROR_CHECK
25047+ int last_error;
25048+#endif
25049+} GLState;
25050+
25051+typedef struct {
25052+ int process_id;
25053+ int instr_counter;
25054+
25055+ int x, y, width, height;
25056+ WindowPosStruct currentDrawablePos;
25057+
25058+ int next_available_context_number;
25059+ int next_available_pbuffer_number;
25060+
25061+ int nb_states;
25062+ GLState default_state;
25063+ GLState **glstates;
25064+ GLState *current_state;
25065+
25066+ int nfbconfig;
25067+ GLXFBConfig *fbconfigs[MAX_FBCONFIG];
25068+ int fbconfigs_max[MAX_FBCONFIG];
25069+ int nfbconfig_total;
25070+
25071+ Assoc association_fakecontext_glxcontext[MAX_ASSOC_SIZE];
25072+ Assoc association_fakepbuffer_pbuffer[MAX_ASSOC_SIZE];
25073+ Assoc association_clientdrawable_serverdrawable[MAX_ASSOC_SIZE];
25074+ Assoc association_fakecontext_visual[MAX_ASSOC_SIZE];
25075+
25076+ Display *dpy;
25077+
25078+ int began;
25079+ int primitive;
25080+ int bufsize;
25081+ int bufstart;
25082+ arg_t *cmdbuf;
25083+} ProcessStruct;
25084+
25085+static ProcessStruct processes[MAX_HANDLED_PROCESS];
25086+
25087+void init_process_tab()
25088+{
25089+ memset(processes, 0, sizeof(processes));
25090+}
25091+
25092+#define ARG_TO_CHAR(x) (char)(x)
25093+#define ARG_TO_UNSIGNED_CHAR(x) (unsigned char)(x)
25094+#define ARG_TO_SHORT(x) (short)(x)
25095+#define ARG_TO_UNSIGNED_SHORT(x) (unsigned short)(x)
25096+#define ARG_TO_INT(x) (int)(x)
25097+#define ARG_TO_UNSIGNED_INT(x) (unsigned int)(x)
25098+#define ARG_TO_FLOAT(x) (*(float*)&(x))
25099+#define ARG_TO_DOUBLE(x) (*(double*)(x))
25100+
25101+#include "server_stub.c"
25102+
25103+/* ---- */
25104+
25105+#ifdef BUFFER_BEGINEND
25106+/* A user of the following two functions must not buffer any calls that
25107+ * may throw an error (i.e. errors conditions must be checked before
25108+ * storing in the buffer) or return values. */
25109+static inline arg_t *cmd_buffer_alloc(ProcessStruct *process, size_t elems)
25110+{
25111+ arg_t *ret;
25112+
25113+ if (unlikely(process->bufstart + elems > process->bufsize)) {
25114+ process->bufsize = (process->bufsize ?: 0x100) << 1;
25115+ process->cmdbuf = qemu_realloc(process->cmdbuf,
25116+ process->bufsize * sizeof(arg_t));
25117+ }
25118+
25119+ ret = process->cmdbuf + process->bufstart;
25120+ process->bufstart += elems;
25121+ return ret;
25122+}
25123+
25124+static inline void cmd_buffer_replay(ProcessStruct *process)
25125+{
25126+ Signature *sig;
25127+ int func_number;
25128+ int ret_int;
25129+ char ret_char;
25130+ arg_t *call = process->cmdbuf;
25131+
25132+ while (process->bufstart) {
25133+ func_number = *call ++;
25134+ sig = (Signature *) tab_opengl_calls[func_number];
25135+
25136+ execute_func(func_number, call, &ret_int, &ret_char);
25137+
25138+ call += sig->nb_args;
25139+ process->bufstart -= sig->nb_args + 1;
25140+ }
25141+}
25142+#endif
25143+
25144+/* ---- */
25145+
25146+typedef void *ClientGLXDrawable;
25147+static inline ClientGLXDrawable to_drawable(arg_t arg)
25148+{
25149+#ifdef TARGET_X86_64
25150+ if (arg > (unsigned long) -1) {
25151+ fprintf(stderr, "GLXDrawable too big for this implementation\n");
25152+ exit(-1);
25153+ }
25154+#endif
25155+ return (void *) (unsigned long) arg;
25156+}
25157+
25158+GLXContext get_association_fakecontext_glxcontext(
25159+ ProcessStruct *process, int fakecontext)
25160+{
25161+ int i;
25162+
25163+ for (i = 0;
25164+ i < MAX_ASSOC_SIZE &&
25165+ process->association_fakecontext_glxcontext[i].key; i++)
25166+ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
25167+ fakecontext)
25168+ return (GLXContext)
25169+ process->association_fakecontext_glxcontext[i].value;
25170+
25171+ return NULL;
25172+}
25173+
25174+void set_association_fakecontext_glxcontext(
25175+ ProcessStruct *process, int fakecontext, GLXContext glxcontext)
25176+{
25177+ int i;
25178+
25179+ for (i = 0;
25180+ i < MAX_ASSOC_SIZE &&
25181+ process->association_fakecontext_glxcontext[i].key; i++)
25182+ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
25183+ fakecontext)
25184+ break;
25185+
25186+ if (i < MAX_ASSOC_SIZE) {
25187+ process->association_fakecontext_glxcontext[i].key =
25188+ (void *) (long) fakecontext;
25189+ process->association_fakecontext_glxcontext[i].value =
25190+ (void *) glxcontext;
25191+ } else
25192+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
25193+}
25194+
25195+void unset_association_fakecontext_glxcontext(
25196+ ProcessStruct *process, int fakecontext)
25197+{
25198+ int i;
25199+
25200+ for (i = 0;
25201+ i < MAX_ASSOC_SIZE &&
25202+ process->association_fakecontext_glxcontext[i].key; i++)
25203+ if ((int) (long) process->association_fakecontext_glxcontext[i].key ==
25204+ fakecontext) {
25205+ memmove(&process->association_fakecontext_glxcontext[i],
25206+ &process->association_fakecontext_glxcontext[i + 1],
25207+ sizeof(Assoc) * (MAX_ASSOC_SIZE - 1 - i));
25208+ return;
25209+ }
25210+}
25211+
25212+/* ---- */
25213+
25214+XVisualInfo *get_association_fakecontext_visual(
25215+ ProcessStruct *process, int fakecontext)
25216+{
25217+ int i;
25218+
25219+ for (i = 0;
25220+ i < MAX_ASSOC_SIZE && process->association_fakecontext_visual[i].key;
25221+ i++)
25222+ if ((int) (long) process->association_fakecontext_visual[i].key ==
25223+ fakecontext)
25224+ return process->association_fakecontext_visual[i].value;
25225+
25226+ return NULL;
25227+}
25228+
25229+void set_association_fakecontext_visual(ProcessStruct *process,
25230+ int fakecontext, XVisualInfo *visual)
25231+{
25232+ int i;
25233+
25234+ for (i = 0;
25235+ i < MAX_ASSOC_SIZE && process->association_fakecontext_visual[i].key;
25236+ i++)
25237+ if ((int) (long) process->association_fakecontext_visual[i].key ==
25238+ fakecontext)
25239+ break;
25240+
25241+ if (i < MAX_ASSOC_SIZE) {
25242+ process->association_fakecontext_visual[i].key =
25243+ (void *) (long) fakecontext;
25244+ process->association_fakecontext_visual[i].value = (void *) visual;
25245+ } else
25246+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
25247+}
25248+
25249+/* ---- */
25250+
25251+GLXPbuffer get_association_fakepbuffer_pbuffer(
25252+ ProcessStruct *process, ClientGLXDrawable fakepbuffer)
25253+{
25254+ int i;
25255+
25256+ for (i = 0; i < MAX_ASSOC_SIZE &&
25257+ process->association_fakepbuffer_pbuffer[i].key; i ++)
25258+ if ((ClientGLXDrawable)
25259+ process->association_fakepbuffer_pbuffer[i].key ==
25260+ fakepbuffer)
25261+ return (GLXPbuffer)
25262+ process->association_fakepbuffer_pbuffer[i].value;
25263+
25264+ return 0;
25265+}
25266+
25267+void set_association_fakepbuffer_pbuffer(ProcessStruct *process,
25268+ ClientGLXDrawable fakepbuffer, GLXPbuffer pbuffer)
25269+{
25270+ int i;
25271+
25272+ for (i = 0;
25273+ i < MAX_ASSOC_SIZE &&
25274+ process->association_fakepbuffer_pbuffer[i].key; i++)
25275+ if ((ClientGLXDrawable)
25276+ process->association_fakepbuffer_pbuffer[i].key ==
25277+ fakepbuffer)
25278+ break;
25279+
25280+ if (i < MAX_ASSOC_SIZE) {
25281+ process->association_fakepbuffer_pbuffer[i].key = (void *) fakepbuffer;
25282+ process->association_fakepbuffer_pbuffer[i].value = (void *) pbuffer;
25283+ } else
25284+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
25285+}
25286+
25287+void unset_association_fakepbuffer_pbuffer(ProcessStruct *process,
25288+ ClientGLXDrawable fakepbuffer)
25289+{
25290+ int i;
25291+
25292+ for (i = 0; i < MAX_ASSOC_SIZE &&
25293+ process->association_fakepbuffer_pbuffer[i].key; i++)
25294+ if ((ClientGLXDrawable)
25295+ process->association_fakepbuffer_pbuffer[i].key ==
25296+ fakepbuffer) {
25297+ memmove(&process->association_fakepbuffer_pbuffer[i],
25298+ &process->association_fakepbuffer_pbuffer[i + 1],
25299+ sizeof(Assoc) * (MAX_ASSOC_SIZE - 1 - i));
25300+ return;
25301+ }
25302+}
25303+
25304+/* ---- */
25305+
25306+GLXDrawable get_association_clientdrawable_serverdrawable(
25307+ ProcessStruct *process, ClientGLXDrawable clientdrawable)
25308+{
25309+ int i;
25310+
25311+ for (i = 0; i < MAX_ASSOC_SIZE &&
25312+ process->association_clientdrawable_serverdrawable[i].key;
25313+ i++)
25314+ if ((ClientGLXDrawable) process->
25315+ association_clientdrawable_serverdrawable[i].key ==
25316+ clientdrawable)
25317+ return (GLXDrawable) process->
25318+ association_clientdrawable_serverdrawable[i].value;
25319+
25320+ return (GLXDrawable) 0;
25321+}
25322+
25323+ClientGLXDrawable get_association_serverdrawable_clientdrawable(
25324+ ProcessStruct *process, GLXDrawable serverdrawable)
25325+{
25326+ int i;
25327+
25328+ for (i = 0; i < MAX_ASSOC_SIZE &&
25329+ process->association_clientdrawable_serverdrawable[i].key;
25330+ i ++)
25331+ if ((GLXDrawable) process->
25332+ association_clientdrawable_serverdrawable[i].value ==
25333+ serverdrawable)
25334+ return (ClientGLXDrawable)
25335+ process->association_clientdrawable_serverdrawable[i].key;
25336+
25337+ return NULL;
25338+}
25339+
25340+void set_association_clientdrawable_serverdrawable(
25341+ ProcessStruct *process, ClientGLXDrawable clientdrawable,
25342+ GLXDrawable serverdrawable)
25343+{
25344+ int i;
25345+
25346+ for (i = 0; process->association_clientdrawable_serverdrawable[i].key;
25347+ i ++)
25348+ if ((ClientGLXDrawable) process->
25349+ association_clientdrawable_serverdrawable[i].key ==
25350+ clientdrawable)
25351+ break;
25352+
25353+ if (i < MAX_ASSOC_SIZE) {
25354+ process->association_clientdrawable_serverdrawable[i].key =
25355+ (void *) clientdrawable;
25356+ process->association_clientdrawable_serverdrawable[i].value =
25357+ (void *) serverdrawable;
25358+ } else
25359+ fprintf(stderr, "MAX_ASSOC_SIZE reached\n");
25360+}
25361+
25362+static void _get_window_pos(Display *dpy, Window win, WindowPosStruct *pos)
25363+{
25364+ XWindowAttributes window_attributes_return;
25365+ Window child;
25366+ int x, y;
25367+ Window root = DefaultRootWindow(dpy);
25368+
25369+ XGetWindowAttributes(dpy, win, &window_attributes_return);
25370+ XTranslateCoordinates(dpy, win, root, 0, 0, &x, &y, &child);
25371+ /* printf("%d %d %d %d\n", x, y, window_attributes_return.width,
25372+ * window_attributes_return.height); */
25373+ pos->x = x;
25374+ pos->y = y;
25375+ pos->width = window_attributes_return.width;
25376+ pos->height = window_attributes_return.height;
25377+ pos->map_state = window_attributes_return.map_state;
25378+}
25379+
25380+static int is_gl_vendor_ati(Display *dpy)
25381+{
25382+ static int is_gl_vendor_ati_flag = 0;
25383+ static int has_init = 0;
25384+
25385+ if (has_init == 0) {
25386+ has_init = 1;
25387+ is_gl_vendor_ati_flag =
25388+ (strncmp(glXGetClientString(dpy, GLX_VENDOR), "ATI", 3) == 0);
25389+ }
25390+ return is_gl_vendor_ati_flag;
25391+}
25392+
25393+static int get_server_texture(ProcessStruct *process,
25394+ unsigned int client_texture)
25395+{
25396+ unsigned int server_texture = 0;
25397+
25398+ if (client_texture < 32768) {
25399+ server_texture = process->current_state->tabTextures[client_texture];
25400+ } else {
25401+ fprintf(stderr, "invalid texture name %d\n", client_texture);
25402+ }
25403+ return server_texture;
25404+}
25405+
25406+static int get_server_buffer(ProcessStruct *process,
25407+ unsigned int client_buffer)
25408+{
25409+ unsigned int server_buffer = 0;
25410+
25411+ if (client_buffer < 32768) {
25412+ server_buffer = process->current_state->tabBuffers[client_buffer];
25413+ } else {
25414+ fprintf(stderr, "invalid buffer name %d\n", client_buffer);
25415+ }
25416+ return server_buffer;
25417+}
25418+
25419+
25420+static int get_server_list(ProcessStruct *process, unsigned int client_list)
25421+{
25422+ unsigned int server_list = 0;
25423+
25424+ if (client_list < 32768) {
25425+ server_list = process->current_state->tabLists[client_list];
25426+ } else {
25427+ fprintf(stderr, "invalid list name %d\n", client_list);
25428+ }
25429+ return server_list;
25430+}
25431+
25432+GLXFBConfig get_fbconfig(ProcessStruct *process, int client_fbconfig)
25433+{
25434+ int i;
25435+ int nbtotal = 0;
25436+
25437+ for (i = 0; i < process->nfbconfig; i++) {
25438+ assert(client_fbconfig >= 1 + nbtotal);
25439+ if (client_fbconfig <= nbtotal + process->fbconfigs_max[i]) {
25440+ return process->fbconfigs[i][client_fbconfig - 1 - nbtotal];
25441+ }
25442+ nbtotal += process->fbconfigs_max[i];
25443+ }
25444+ return 0;
25445+}
25446+
25447+typedef struct {
25448+ int attribListLength;
25449+ int *attribList;
25450+ XVisualInfo *visInfo;
25451+} AssocAttribListVisual;
25452+
25453+static int nTabAssocAttribListVisual = 0;
25454+static AssocAttribListVisual *tabAssocAttribListVisual = NULL;
25455+
25456+static int _compute_length_of_attrib_list_including_zero(const int *attribList,
25457+ int
25458+ booleanMustHaveValue)
25459+{
25460+ int i = 0;
25461+
25462+ while (attribList[i]) {
25463+ if (booleanMustHaveValue ||
25464+ !(attribList[i] == GLX_USE_GL || attribList[i] == GLX_RGBA ||
25465+ attribList[i] == GLX_DOUBLEBUFFER ||
25466+ attribList[i] == GLX_STEREO)) {
25467+ i += 2;
25468+ } else {
25469+ i++;
25470+ }
25471+ }
25472+ return i + 1;
25473+}
25474+
25475+static int glXChooseVisualFunc(Display *dpy, const int *_attribList)
25476+{
25477+ if (_attribList == NULL)
25478+ return 0;
25479+ int attribListLength =
25480+ _compute_length_of_attrib_list_including_zero(_attribList, 0);
25481+ int i;
25482+
25483+ int *attribList = malloc(sizeof(int) * attribListLength);
25484+ memcpy(attribList, _attribList, sizeof(int) * attribListLength);
25485+
25486+ i = 0;
25487+ while (attribList[i]) {
25488+ if (!
25489+ (attribList[i] == GLX_USE_GL || attribList[i] == GLX_RGBA ||
25490+ attribList[i] == GLX_DOUBLEBUFFER ||
25491+ attribList[i] == GLX_STEREO)) {
25492+ if (attribList[i] == GLX_SAMPLE_BUFFERS && attribList[i + 1] != 0
25493+ && getenv("DISABLE_SAMPLE_BUFFERS")) {
25494+ fprintf(stderr, "Disabling GLX_SAMPLE_BUFFERS\n");
25495+ attribList[i + 1] = 0;
25496+ }
25497+ i += 2;
25498+ } else {
25499+ i++;
25500+ }
25501+ }
25502+
25503+ for (i = 0; i < nTabAssocAttribListVisual; i++) {
25504+ if (tabAssocAttribListVisual[i].attribListLength == attribListLength
25505+ && memcmp(tabAssocAttribListVisual[i].attribList, attribList,
25506+ attribListLength * sizeof(int)) == 0) {
25507+ free(attribList);
25508+ return (tabAssocAttribListVisual[i].
25509+ visInfo) ? tabAssocAttribListVisual[i].visInfo->
25510+ visualid : 0;
25511+ }
25512+ }
25513+ XVisualInfo *visInfo = glXChooseVisual(dpy, 0, attribList);
25514+
25515+ tabAssocAttribListVisual = realloc(
25516+ tabAssocAttribListVisual, sizeof(AssocAttribListVisual) *
25517+ (nTabAssocAttribListVisual + 1));
25518+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribListLength =
25519+ attribListLength;
25520+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList =
25521+ (int *) malloc(sizeof(int) * attribListLength);
25522+ memcpy(tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList,
25523+ attribList, sizeof(int) * attribListLength);
25524+ tabAssocAttribListVisual[nTabAssocAttribListVisual].visInfo = visInfo;
25525+ nTabAssocAttribListVisual++;
25526+ free(attribList);
25527+ return (visInfo) ? visInfo->visualid : 0;
25528+}
25529+
25530+static XVisualInfo *get_visual_info_from_visual_id(Display *dpy,
25531+ int visualid)
25532+{
25533+ int i, n;
25534+ XVisualInfo template;
25535+ XVisualInfo *visInfo;
25536+
25537+ for (i = 0; i < nTabAssocAttribListVisual; i++) {
25538+ if (tabAssocAttribListVisual[i].visInfo &&
25539+ tabAssocAttribListVisual[i].visInfo->visualid == visualid) {
25540+ return tabAssocAttribListVisual[i].visInfo;
25541+ }
25542+ }
25543+ template.visualid = visualid;
25544+ visInfo = XGetVisualInfo(dpy, VisualIDMask, &template, &n);
25545+ tabAssocAttribListVisual =
25546+ realloc(tabAssocAttribListVisual,
25547+ sizeof(AssocAttribListVisual) * (nTabAssocAttribListVisual +
25548+ 1));
25549+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribListLength = 0;
25550+ tabAssocAttribListVisual[nTabAssocAttribListVisual].attribList = NULL;
25551+ tabAssocAttribListVisual[nTabAssocAttribListVisual].visInfo = visInfo;
25552+ nTabAssocAttribListVisual++;
25553+ return visInfo;
25554+}
25555+
25556+typedef struct {
25557+ int x;
25558+ int y;
25559+ int width;
25560+ int height;
25561+ int xhot;
25562+ int yhot;
25563+ int *pixels;
25564+} ClientCursor;
25565+
25566+#if 0
25567+static ClientCursor client_cursor = { 0 };
25568+#endif
25569+
25570+static void do_glClientActiveTextureARB(int texture)
25571+{
25572+ GET_EXT_PTR_NO_FAIL(void, glClientActiveTextureARB, (int));
25573+
25574+ if (ptr_func_glClientActiveTextureARB) {
25575+ ptr_func_glClientActiveTextureARB(texture);
25576+ }
25577+}
25578+
25579+#ifdef CURSOR_TRICK
25580+static void do_glActiveTextureARB(int texture)
25581+{
25582+ GET_EXT_PTR_NO_FAIL(void, glActiveTextureARB, (int));
25583+
25584+ if (ptr_func_glActiveTextureARB) {
25585+ ptr_func_glActiveTextureARB(texture);
25586+ }
25587+}
25588+
25589+static void do_glUseProgramObjectARB(GLhandleARB programObj)
25590+{
25591+ GET_EXT_PTR_NO_FAIL(void, glUseProgramObjectARB, (GLhandleARB));
25592+
25593+ if (ptr_func_glUseProgramObjectARB) {
25594+ ptr_func_glUseProgramObjectARB(programObj);
25595+ }
25596+}
25597+#endif
25598+
25599+static void destroy_gl_state(GLState *state)
25600+{
25601+ int i;
25602+
25603+ if (state->vertexPointer)
25604+ free(state->vertexPointer);
25605+ if (state->normalPointer)
25606+ free(state->normalPointer);
25607+ if (state->indexPointer)
25608+ free(state->indexPointer);
25609+ if (state->colorPointer)
25610+ free(state->colorPointer);
25611+ if (state->secondaryColorPointer)
25612+ free(state->secondaryColorPointer);
25613+ for (i = 0; i < NB_MAX_TEXTURES; i++) {
25614+ if (state->texCoordPointer[i])
25615+ free(state->texCoordPointer[i]);
25616+ }
25617+ for (i = 0; i < MY_GL_MAX_VERTEX_ATTRIBS_ARB; i++) {
25618+ if (state->vertexAttribPointer[i])
25619+ free(state->vertexAttribPointer[i]);
25620+ }
25621+ for (i = 0; i < MY_GL_MAX_VERTEX_ATTRIBS_NV; i++) {
25622+ if (state->vertexAttribPointerNV[i])
25623+ free(state->vertexAttribPointerNV[i]);
25624+ }
25625+ if (state->weightPointer)
25626+ free(state->weightPointer);
25627+ if (state->matrixIndexPointer)
25628+ free(state->matrixIndexPointer);
25629+ if (state->fogCoordPointer)
25630+ free(state->fogCoordPointer);
25631+ for (i = 0; i < MY_GL_MAX_VARIANT_POINTER_EXT; i++) {
25632+ if (state->variantPointerEXT[i])
25633+ free(state->variantPointerEXT[i]);
25634+ }
25635+ if (state->interleavedArrays)
25636+ free(state->interleavedArrays);
25637+ if (state->elementPointerATI)
25638+ free(state->elementPointerATI);
25639+}
25640+
25641+static void init_gl_state(GLState *state)
25642+{
25643+ state->textureAllocator = &state->ownTextureAllocator;
25644+ state->tabTextures = state->ownTabTextures;
25645+ state->bufferAllocator = &state->ownBufferAllocator;
25646+ state->tabBuffers = state->ownTabBuffers;
25647+ state->listAllocator = &state->ownListAllocator;
25648+ state->tabLists = state->ownTabLists;
25649+}
25650+
25651+/*
25652+ * Translate the nth element of list from type to GLuint.
25653+ */
25654+static GLuint translate_id(GLsizei n, GLenum type, const GLvoid *list)
25655+{
25656+ GLbyte *bptr;
25657+ GLubyte *ubptr;
25658+ GLshort *sptr;
25659+ GLushort *usptr;
25660+ GLint *iptr;
25661+ GLuint *uiptr;
25662+ GLfloat *fptr;
25663+
25664+ switch (type) {
25665+ case GL_BYTE:
25666+ bptr = (GLbyte *) list;
25667+ return (GLuint) *(bptr + n);
25668+ case GL_UNSIGNED_BYTE:
25669+ ubptr = (GLubyte *) list;
25670+ return (GLuint) *(ubptr + n);
25671+ case GL_SHORT:
25672+ sptr = (GLshort *) list;
25673+ return (GLuint) *(sptr + n);
25674+ case GL_UNSIGNED_SHORT:
25675+ usptr = (GLushort *) list;
25676+ return (GLuint) *(usptr + n);
25677+ case GL_INT:
25678+ iptr = (GLint *) list;
25679+ return (GLuint) *(iptr + n);
25680+ case GL_UNSIGNED_INT:
25681+ uiptr = (GLuint *) list;
25682+ return (GLuint) *(uiptr + n);
25683+ case GL_FLOAT:
25684+ fptr = (GLfloat *) list;
25685+ return (GLuint) *(fptr + n);
25686+ case GL_2_BYTES:
25687+ ubptr = ((GLubyte *) list) + 2 * n;
25688+ return (GLuint) *ubptr * 256 + (GLuint) *(ubptr + 1);
25689+ case GL_3_BYTES:
25690+ ubptr = ((GLubyte *) list) + 3 * n;
25691+ return (GLuint) *ubptr * 65536 + (GLuint) *(ubptr + 1) * 256 +
25692+ (GLuint) *(ubptr + 2);
25693+ case GL_4_BYTES:
25694+ ubptr = ((GLubyte *) list) + 4 * n;
25695+ return (GLuint) *ubptr * 16777216 + (GLuint) *(ubptr + 1) * 65536 +
25696+ (GLuint) *(ubptr + 2) * 256 + (GLuint) *(ubptr + 3);
25697+ default:
25698+ return 0;
25699+ }
25700+}
25701+
25702+void _create_context(ProcessStruct *process, GLXContext ctxt, int fake_ctxt,
25703+ GLXContext shareList, int fake_shareList)
25704+{
25705+ process->glstates =
25706+ realloc(process->glstates,
25707+ (process->nb_states + 1) * sizeof(GLState *));
25708+ process->glstates[process->nb_states] = malloc(sizeof(GLState));
25709+ memset(process->glstates[process->nb_states], 0, sizeof(GLState));
25710+ process->glstates[process->nb_states]->ref = 1;
25711+ process->glstates[process->nb_states]->context = ctxt;
25712+ process->glstates[process->nb_states]->fake_ctxt = fake_ctxt;
25713+ process->glstates[process->nb_states]->fake_shareList = fake_shareList;
25714+ init_gl_state(process->glstates[process->nb_states]);
25715+ if (shareList && fake_shareList) {
25716+ int i;
25717+
25718+ for (i = 0; i < process->nb_states; i++) {
25719+ if (process->glstates[i]->fake_ctxt == fake_shareList) {
25720+ process->glstates[i]->ref++;
25721+ process->glstates[process->nb_states]->textureAllocator =
25722+ process->glstates[i]->textureAllocator;
25723+ process->glstates[process->nb_states]->tabTextures =
25724+ process->glstates[i]->tabTextures;
25725+ process->glstates[process->nb_states]->bufferAllocator =
25726+ process->glstates[i]->bufferAllocator;
25727+ process->glstates[process->nb_states]->tabBuffers =
25728+ process->glstates[i]->tabBuffers;
25729+ process->glstates[process->nb_states]->listAllocator =
25730+ process->glstates[i]->listAllocator;
25731+ process->glstates[process->nb_states]->tabLists =
25732+ process->glstates[i]->tabLists;
25733+ break;
25734+ }
25735+ }
25736+ }
25737+ process->nb_states++;
25738+}
25739+
25740+static ProcessStruct *process;
25741+
25742+void do_disconnect_current(void)
25743+{
25744+ int i;
25745+ Display *dpy = process->dpy;
25746+
25747+ glXMakeCurrent(dpy, 0, NULL);
25748+
25749+ for (i = 0; i < MAX_ASSOC_SIZE &&
25750+ process->association_fakecontext_glxcontext[i].key; i ++) {
25751+ GLXContext ctxt = process->association_fakecontext_glxcontext[i].value;
25752+
25753+ fprintf(stderr, "Destroy context corresponding to fake_context"
25754+ " = %ld\n", (long) process->
25755+ association_fakecontext_glxcontext[i].key);
25756+ glXDestroyContext(dpy, ctxt);
25757+ }
25758+
25759+ GET_EXT_PTR(void, glXDestroyPbuffer, (Display *, GLXPbuffer));
25760+
25761+ for (i = 0; i < MAX_ASSOC_SIZE &&
25762+ process->association_fakepbuffer_pbuffer[i].key; i ++) {
25763+ GLXPbuffer pbuffer = (GLXPbuffer)
25764+ process->association_fakepbuffer_pbuffer[i].value;
25765+
25766+ fprintf(stderr, "Destroy pbuffer corresponding to fake_pbuffer"
25767+ " = %ld\n", (long) process->
25768+ association_fakepbuffer_pbuffer[i].key);
25769+ if (!is_gl_vendor_ati(dpy))
25770+ ptr_func_glXDestroyPbuffer(dpy, pbuffer);
25771+ }
25772+
25773+ for (i = 0; i < MAX_ASSOC_SIZE && process->
25774+ association_clientdrawable_serverdrawable[i].key; i ++) {
25775+ Window win = (Window) process->
25776+ association_clientdrawable_serverdrawable[i].value;
25777+
25778+ fprintf(stderr, "Destroy window %x corresponding to client_drawable "
25779+ "= %p\n", (int) win, process->
25780+ association_clientdrawable_serverdrawable[i].key);
25781+
25782+ XDestroyWindow(dpy, win);
25783+ if (active_win == win)
25784+ active_win = 0;
25785+
25786+ int loop = 1; // 1;
25787+ while (loop) {
25788+ while (XPending(dpy) > 0) {
25789+ XEvent event;
25790+
25791+ XNextEvent(dpy, &event);
25792+ switch (event.type) {
25793+ case DestroyNotify:
25794+ {
25795+ if (((XDestroyWindowEvent *) &event)->window == win)
25796+ loop = 0;
25797+ break;
25798+ }
25799+ }
25800+ }
25801+ break; /* TODO */
25802+ }
25803+ }
25804+
25805+ for (i = 0; i < process->nb_states; i++) {
25806+ destroy_gl_state(process->glstates[i]);
25807+ free(process->glstates[i]);
25808+ }
25809+ destroy_gl_state(&process->default_state);
25810+ free(process->glstates);
25811+
25812+ if (process->cmdbuf)
25813+ qemu_free(process->cmdbuf);
25814+
25815+ for (i = 0; &processes[i] != process; i ++);
25816+ memmove(&processes[i], &processes[i + 1],
25817+ (MAX_HANDLED_PROCESS - 1 - i) * sizeof(ProcessStruct));
25818+}
25819+
25820+static const int beginend_allowed[GL_N_CALLS] = {
25821+#undef MAGIC_MACRO
25822+#define MAGIC_MACRO(name) [name ## _func] = 1,
25823+#include "gl_beginend.h"
25824+};
25825+
25826+void do_context_switch(Display *dpy, pid_t pid, int call)
25827+{
25828+ int i;
25829+
25830+ for (i = 0; i < MAX_HANDLED_PROCESS; i ++)
25831+ if (processes[i].process_id == pid) {
25832+ process = &processes[i];
25833+ break;
25834+ } else if (processes[i].process_id == 0) {
25835+ process = &processes[i];
25836+ memset(process, 0, sizeof(ProcessStruct));
25837+ process->process_id = pid;
25838+ init_gl_state(&process->default_state);
25839+ process->current_state = &process->default_state;
25840+ process->dpy = dpy;
25841+ break;
25842+ }
25843+ if (process == NULL) {
25844+ fprintf(stderr, "Too many processes !\n");
25845+ exit(-1);
25846+ }
25847+
25848+ switch (call) {
25849+ case _init32_func:
25850+ case _init64_func:
25851+ case _exit_process_func:
25852+ case glXMakeCurrent_func:
25853+ /* Do nothing */
25854+ break;
25855+
25856+ default:
25857+#if 0
25858+ glFlush();
25859+ glFinish();
25860+ glXSwapBuffers(dpy, drawable);
25861+ if (process->current_state == &process->default_state)
25862+ /* Where do commands like glViewport go when no drawable or
25863+ * context are current - i.e. after a call to
25864+ * glXMakeCurrent(dpy, 0, 0) ? */;
25865+ else
25866+#endif
25867+ glXMakeCurrent(dpy, process->current_state->drawable,
25868+ process->current_state->context);
25869+ }
25870+}
25871+
25872+int do_function_call(int func_number, arg_t *args, char *ret_string)
25873+{
25874+ char ret_char = 0;
25875+ int ret_int = 0;
25876+ const char *ret_str = NULL;
25877+ Display *dpy = process->dpy;
25878+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
25879+ int ret_type = signature->ret_type;
25880+
25881+ if (parent_dpy)
25882+ dpy = parent_dpy;
25883+
25884+ process->instr_counter++;
25885+ if (display_function_call)
25886+ fprintf(stderr, "[%d]> %s\n", process->instr_counter,
25887+ tab_opengl_calls_name[func_number]);
25888+
25889+#ifdef BUFFER_BEGINEND
25890+ if (process->began) {
25891+ /* Need to check for any errors now because later we won't have
25892+ * a chance to report them. */
25893+ if (beginend_allowed[func_number]) {
25894+ arg_t *buf = cmd_buffer_alloc(process, signature->nb_args + 1);
25895+
25896+ /* TODO: pointer arguments */
25897+ buf[0] = func_number;
25898+ memcpy(buf + 1, args, signature->nb_args * sizeof(arg_t));
25899+ } else if (likely(func_number == glEnd_func)) {
25900+ process->began = 0;
25901+
25902+ glBegin(process->primitive);
25903+ cmd_buffer_replay(process);
25904+ glEnd();
25905+ } else {
25906+ /* TODO: properly report */
25907+#ifdef SYSTEMATIC_ERROR_CHECK
25908+ process->current_state->last_error = INVALID_OPERATION;
25909+#endif
25910+ }
25911+
25912+ func_number = -1;
25913+ }
25914+#endif
25915+
25916+ switch (func_number) {
25917+ case -1:
25918+ break;
25919+
25920+ case _init_func:
25921+ *(int *) args[1] = 1;
25922+ break;
25923+
25924+ case _synchronize_func:
25925+ ret_int = 1;
25926+ break;
25927+
25928+ case _exit_process_func:
25929+ do_disconnect_current();
25930+ break;
25931+
25932+ case _changeWindowState_func:
25933+ {
25934+ ClientGLXDrawable client_drawable = to_drawable(args[0]);
25935+
25936+ if (display_function_call)
25937+ fprintf(stderr, "client_drawable=%p\n",
25938+ (void *) client_drawable);
25939+
25940+ GLXDrawable drawable =
25941+ get_association_clientdrawable_serverdrawable(
25942+ process, client_drawable);
25943+ if (drawable) {
25944+ if (args[1] == IsViewable) {
25945+ WindowPosStruct pos;
25946+
25947+ _get_window_pos(dpy, drawable, &pos);
25948+ if (pos.map_state != args[1]) {
25949+ XMapWindow(dpy, drawable);
25950+
25951+ int loop = 1; // 1;
25952+
25953+ while (loop) {
25954+ while (XPending(dpy) > 0) {
25955+ XEvent event;
25956+
25957+ XNextEvent(dpy, &event);
25958+ switch (event.type) {
25959+ case ConfigureNotify:
25960+ {
25961+ if (((XConfigureEvent *) &event)->
25962+ window == drawable) {
25963+ loop = 0;
25964+ }
25965+ break;
25966+ }
25967+ }
25968+ }
25969+ break; /* TODO */
25970+ }
25971+ }
25972+ }
25973+ }
25974+
25975+ break;
25976+ }
25977+
25978+ case _moveResizeWindow_func:
25979+ {
25980+ int *params = (int *) args[1];
25981+ ClientGLXDrawable client_drawable = to_drawable(args[0]);
25982+
25983+ if (display_function_call)
25984+ fprintf(stderr, "client_drawable=%p\n",
25985+ (void *) client_drawable);
25986+
25987+ GLXDrawable drawable =
25988+ get_association_clientdrawable_serverdrawable(
25989+ process, client_drawable);
25990+ if (drawable) {
25991+ WindowPosStruct pos;
25992+
25993+ _get_window_pos(dpy, drawable, &pos);
25994+ if (!
25995+ (params[0] == pos.x && params[1] == pos.y &&
25996+ params[2] == pos.width && params[3] == pos.height)) {
25997+ int redim = !(params[2] == pos.width &&
25998+ params[3] == pos.height);
25999+ active_win_x = params[0];
26000+ active_win_y = params[1];
26001+
26002+ fprintf(stderr, "old x=%d y=%d width=%d height=%d\n",
26003+ pos.x, pos.y, pos.width, pos.height);
26004+ fprintf(stderr, "new x=%d y=%d width=%d height=%d\n",
26005+ params[0], params[1], params[2], params[3]);
26006+ XMoveResizeWindow(dpy, drawable, params[0], params[1],
26007+ params[2], params[3]);
26008+ int loop = 0; // = 1
26009+
26010+ while (loop) {
26011+ while (XPending(dpy) > 0) {
26012+ XEvent event;
26013+
26014+ XNextEvent(dpy, &event);
26015+ switch (event.type) {
26016+ case ConfigureNotify:
26017+ {
26018+ if (((XConfigureEvent *) &event)->
26019+ window == drawable) {
26020+ loop = 0;
26021+ }
26022+ break;
26023+ }
26024+ }
26025+ }
26026+ }
26027+ /* The window should have resized by now, but force the
26028+ * new size anyway. */
26029+ _get_window_pos(dpy, drawable, &pos);
26030+ pos.width = params[2];
26031+ pos.height = params[3];
26032+ process->currentDrawablePos = pos;
26033+ // if (getenv("FORCE_GL_VIEWPORT"))
26034+ if (redim)
26035+ glViewport(0, 0, pos.width, pos.height);
26036+ }
26037+ }
26038+ break;
26039+ }
26040+
26041+ case _send_cursor_func:
26042+ {
26043+#if 0
26044+ int x = args[0];
26045+ int y = args[1];
26046+ int width = args[2];
26047+ int height = args[3];
26048+ int xhot = args[4];
26049+ int yhot = args[5];
26050+ int *pixels = (int *) args[6];
26051+
26052+ client_cursor.x = x;
26053+ client_cursor.y = y;
26054+ client_cursor.width = width;
26055+ client_cursor.height = height;
26056+ client_cursor.xhot = xhot;
26057+ client_cursor.yhot = yhot;
26058+ if (pixels) {
26059+ client_cursor.pixels =
26060+ realloc(client_cursor.pixels,
26061+ client_cursor.width * client_cursor.height *
26062+ sizeof(int));
26063+ memcpy(client_cursor.pixels, pixels,
26064+ client_cursor.width * client_cursor.height *
26065+ sizeof(int));
26066+ }
26067+ int in_window = (x >= 0 && y >= 0 &&
26068+ x < process->currentDrawablePos.width &&
26069+ y < process->currentDrawablePos.height);
26070+ // fprintf(stderr, "cursor at %d %d (%s)\n", x, y, (in_window) ?
26071+ // "in window" : "not in window");
26072+#endif
26073+ break;
26074+ }
26075+
26076+#ifdef BUFFER_BEGINEND
26077+ case glBegin_func:
26078+ process->began = 1;
26079+ process->primitive = args[0];
26080+ break;
26081+#endif
26082+
26083+ case glXWaitGL_func:
26084+ {
26085+ glXWaitGL();
26086+ ret_int = 0;
26087+ break;
26088+ }
26089+
26090+ case glXWaitX_func:
26091+ {
26092+ glXWaitX();
26093+ ret_int = 0;
26094+ break;
26095+ }
26096+
26097+ case glXChooseVisual_func:
26098+ {
26099+ ret_int = glXChooseVisualFunc(dpy, (int *) args[2]);
26100+ break;
26101+ }
26102+
26103+ case glXQueryExtensionsString_func:
26104+ {
26105+ ret_str = glXQueryExtensionsString(dpy, 0);
26106+ break;
26107+ }
26108+
26109+ case glXQueryServerString_func:
26110+ {
26111+ ret_str = glXQueryServerString(dpy, 0, args[2]);
26112+ break;
26113+ }
26114+
26115+ case glXGetClientString_func:
26116+ {
26117+ ret_str = glXGetClientString(dpy, args[1]);
26118+ break;
26119+ }
26120+
26121+ case glXGetScreenDriver_func:
26122+ {
26123+ GET_EXT_PTR(const char *, glXGetScreenDriver, (Display *, int));
26124+
26125+ ret_str = ptr_func_glXGetScreenDriver(dpy, 0);
26126+ break;
26127+ }
26128+
26129+ case glXGetDriverConfig_func:
26130+ {
26131+ GET_EXT_PTR(const char *, glXGetDriverConfig, (const char *));
26132+
26133+ ret_str = ptr_func_glXGetDriverConfig((const char *) args[0]);
26134+ break;
26135+ }
26136+
26137+ case glXCreateContext_func:
26138+ {
26139+ int visualid = (int) args[1];
26140+ int fake_shareList = (int) args[2];
26141+
26142+ if (1 || display_function_call)
26143+ fprintf(stderr, "visualid=%d, fake_shareList=%d\n", visualid,
26144+ fake_shareList);
26145+
26146+ GLXContext shareList = get_association_fakecontext_glxcontext(
26147+ process, fake_shareList);
26148+ XVisualInfo *vis = get_visual_info_from_visual_id(dpy, visualid);
26149+ GLXContext ctxt;
26150+
26151+ if (vis) {
26152+ ctxt = glXCreateContext(dpy, vis, shareList, args[3]);
26153+ } else {
26154+ vis = get_default_visual(dpy);
26155+ int saved_visualid = vis->visualid;
26156+
26157+ vis->visualid = visualid ?: saved_visualid;
26158+ ctxt = glXCreateContext(dpy, vis, shareList, args[3]);
26159+ vis->visualid = saved_visualid;
26160+ }
26161+
26162+ if (ctxt) {
26163+ int fake_ctxt =++ process->next_available_context_number;
26164+
26165+ set_association_fakecontext_visual(process, fake_ctxt, vis);
26166+ set_association_fakecontext_glxcontext(process,
26167+ fake_ctxt, ctxt);
26168+ ret_int = fake_ctxt;
26169+
26170+ _create_context(process, ctxt, fake_ctxt, shareList,
26171+ fake_shareList);
26172+ } else {
26173+ ret_int = 0;
26174+ }
26175+
26176+ break;
26177+ }
26178+
26179+
26180+ case glXCreateNewContext_func:
26181+ {
26182+ GET_EXT_PTR(GLXContext, glXCreateNewContext,
26183+ (Display *, GLXFBConfig, int, GLXContext, int));
26184+ int client_fbconfig = args[1];
26185+
26186+ ret_int = 0;
26187+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26188+
26189+ if (fbconfig) {
26190+ int fake_shareList = args[3];
26191+ GLXContext shareList = get_association_fakecontext_glxcontext(
26192+ process, fake_shareList);
26193+ process->next_available_context_number++;
26194+ int fake_ctxt = process->next_available_context_number;
26195+ GLXContext ctxt = ptr_func_glXCreateNewContext(
26196+ dpy, fbconfig, args[2], shareList, args[4]);
26197+ set_association_fakecontext_glxcontext(
26198+ process, fake_ctxt, ctxt);
26199+ ret_int = fake_ctxt;
26200+
26201+ _create_context(process, ctxt, fake_ctxt, shareList,
26202+ fake_shareList);
26203+ }
26204+ break;
26205+ }
26206+
26207+ case glXCopyContext_func:
26208+ {
26209+ int fake_src_ctxt = (int) args[1];
26210+ int fake_dst_ctxt = (int) args[2];
26211+ GLXContext src_ctxt;
26212+ GLXContext dst_ctxt;
26213+
26214+ if (display_function_call)
26215+ fprintf(stderr, "fake_src_ctxt=%i, fake_dst_ctxt=%i\n",
26216+ fake_src_ctxt, fake_dst_ctxt);
26217+
26218+ if (!(src_ctxt = get_association_fakecontext_glxcontext(
26219+ process, fake_src_ctxt)))
26220+ fprintf(stderr, "invalid fake_src_ctxt (%i) !\n",
26221+ fake_src_ctxt);
26222+ else
26223+ if (!(dst_ctxt = get_association_fakecontext_glxcontext(
26224+ process, fake_dst_ctxt))) {
26225+ fprintf(stderr, "invalid fake_dst_ctxt (%i) !\n",
26226+ fake_dst_ctxt);
26227+ } else
26228+ glXCopyContext(dpy, src_ctxt, dst_ctxt, args[3]);
26229+
26230+ break;
26231+ }
26232+
26233+ case glXDestroyContext_func:
26234+ {
26235+ int fake_ctxt = (int) args[1];
26236+
26237+ if (display_function_call)
26238+ fprintf(stderr, "fake_ctxt=%d\n", fake_ctxt);
26239+
26240+ GLXContext ctxt = get_association_fakecontext_glxcontext(
26241+ process, fake_ctxt);
26242+ if (ctxt == NULL) {
26243+ fprintf(stderr, "invalid fake_ctxt (%p) !\n",
26244+ (void *) (long) fake_ctxt);
26245+ } else {
26246+ int i;
26247+
26248+ for (i = 0; i < process->nb_states; i ++) {
26249+ if (process->glstates[i]->fake_ctxt == fake_ctxt) {
26250+ if (ctxt == process->current_state->context)
26251+ process->current_state = &process->default_state;
26252+
26253+ int fake_shareList =
26254+ process->glstates[i]->fake_shareList;
26255+ process->glstates[i]->ref--;
26256+ if (process->glstates[i]->ref == 0) {
26257+ fprintf(stderr,
26258+ "destroy_gl_state fake_ctxt = %d\n",
26259+ process->glstates[i]->fake_ctxt);
26260+ destroy_gl_state(process->glstates[i]);
26261+ free(process->glstates[i]);
26262+ memmove(&process->glstates[i],
26263+ &process->glstates[i + 1],
26264+ (process->nb_states - i - 1) *
26265+ sizeof(GLState *));
26266+ process->nb_states --;
26267+ }
26268+
26269+ if (fake_shareList) {
26270+ for (i = 0; i < process->nb_states; i++) {
26271+ if (process->glstates[i]->fake_ctxt ==
26272+ fake_shareList) {
26273+ process->glstates[i]->ref--;
26274+ if (process->glstates[i]->ref == 0) {
26275+ fprintf(stderr,
26276+ "destroy_gl_state fake_ctxt = %d\n",
26277+ process->glstates[i]->
26278+ fake_ctxt);
26279+ destroy_gl_state(process->
26280+ glstates[i]);
26281+ free(process->glstates[i]);
26282+ memmove(&process->glstates[i],
26283+ &process->glstates[i + 1],
26284+ (process->nb_states - i - 1) *
26285+ sizeof(GLState *));
26286+ process->nb_states --;
26287+ }
26288+ break;
26289+ }
26290+ }
26291+ }
26292+
26293+ glXDestroyContext(dpy, ctxt);
26294+ unset_association_fakecontext_glxcontext(
26295+ process, fake_ctxt);
26296+
26297+ break;
26298+ }
26299+ }
26300+ }
26301+ break;
26302+ }
26303+
26304+ case glXQueryVersion_func:
26305+ {
26306+ ret_int = glXQueryVersion(dpy, (int *) args[1], (int *) args[2]);
26307+ break;
26308+ }
26309+
26310+ case glGetString_func:
26311+ {
26312+ ret_str = (char *) glGetString(args[0]);
26313+ break;
26314+ }
26315+
26316+ case glXMakeCurrent_func:
26317+ {
26318+ int i;
26319+ ClientGLXDrawable client_drawable = to_drawable(args[1]);
26320+ GLXDrawable drawable = 0;
26321+ int fake_ctxt = (int) args[2];
26322+
26323+ if (display_function_call)
26324+ fprintf(stderr, "client_drawable=%p fake_ctx=%d\n",
26325+ (void *) client_drawable, fake_ctxt);
26326+
26327+ if (client_drawable == 0 && fake_ctxt == 0) {
26328+ ret_int = glXMakeCurrent(dpy, 0, NULL);
26329+ process->current_state = &process->default_state;
26330+ } else if ((drawable = (GLXDrawable)
26331+ get_association_fakepbuffer_pbuffer(
26332+ process, client_drawable))) {
26333+ GLXContext ctxt = get_association_fakecontext_glxcontext(
26334+ process, fake_ctxt);
26335+ if (ctxt == NULL) {
26336+ fprintf(stderr, "invalid fake_ctxt (%d) (*)!\n",
26337+ fake_ctxt);
26338+ ret_int = 0;
26339+ } else
26340+ ret_int = glXMakeCurrent(dpy, drawable, ctxt);
26341+ } else {
26342+ GLXContext ctxt = get_association_fakecontext_glxcontext(
26343+ process, fake_ctxt);
26344+ if (ctxt == NULL) {
26345+ fprintf(stderr, "invalid fake_ctxt (%d)!\n", fake_ctxt);
26346+ ret_int = 0;
26347+ } else {
26348+ drawable = get_association_clientdrawable_serverdrawable(
26349+ process, client_drawable);
26350+ if (drawable == 0) {
26351+ XVisualInfo *vis = get_association_fakecontext_visual(
26352+ process, fake_ctxt);
26353+ if (vis == NULL)
26354+ vis = get_default_visual(dpy);
26355+ /* if (local_connection) drawable = client_drawable;
26356+ * else */
26357+ {
26358+ if ((int) (long) client_drawable ==
26359+ RootWindow(dpy, 0) &&
26360+ local_connection) {
26361+ drawable = (GLXDrawable) client_drawable;
26362+ } else {
26363+ drawable = create_window(
26364+ dpy, local_connection ?
26365+ (Window) client_drawable :
26366+ 0, vis, "", 0, 0, 16, 16);
26367+ }
26368+ }
26369+ set_association_clientdrawable_serverdrawable(process,
26370+ client_drawable, drawable);
26371+ }
26372+
26373+ ret_int = glXMakeCurrent(dpy, drawable, ctxt);
26374+ }
26375+ }
26376+
26377+ if (ret_int) {
26378+ for (i = 0; i < process->nb_states; i ++) {
26379+ if (process->glstates[i]->fake_ctxt == fake_ctxt) {
26380+ /* HACK !!! REMOVE */
26381+ process->current_state = process->glstates[i];
26382+ process->current_state->drawable = drawable;
26383+ break;
26384+ }
26385+ }
26386+
26387+ if (i == process->nb_states) {
26388+ fprintf(stderr, "error remembering the new context\n");
26389+ exit(-1);
26390+ }
26391+ }
26392+ break;
26393+ }
26394+
26395+ case glXSwapBuffers_func:
26396+ {
26397+ ClientGLXDrawable client_drawable = to_drawable(args[1]);
26398+
26399+ if (display_function_call)
26400+ fprintf(stderr, "client_drawable=%p\n", client_drawable);
26401+
26402+ GLXDrawable drawable =
26403+ get_association_clientdrawable_serverdrawable(
26404+ process, client_drawable);
26405+ if (!drawable) {
26406+ fprintf(stderr, "unknown client_drawable (%p) !\n",
26407+ (void *) client_drawable);
26408+ } else {
26409+#ifdef CURSOR_TRICK
26410+ if (client_cursor.pixels && local_connection == 0) {
26411+ glPushAttrib(GL_ALL_ATTRIB_BITS);
26412+ glPushClientAttrib(GL_ALL_ATTRIB_BITS);
26413+
26414+ glMatrixMode(GL_PROJECTION);
26415+ glPushMatrix();
26416+ glLoadIdentity();
26417+ glOrtho(0, process->currentDrawablePos.width,
26418+ process->currentDrawablePos.height, 0, -1, 1);
26419+ glMatrixMode(GL_MODELVIEW);
26420+ glPushMatrix();
26421+ glLoadIdentity();
26422+ glPixelZoom(1, -1);
26423+
26424+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
26425+ glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
26426+ glPixelStorei(GL_UNPACK_SWAP_BYTES, 0);
26427+ glPixelStorei(GL_UNPACK_LSB_FIRST, 0);
26428+ glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
26429+ glShadeModel(GL_SMOOTH);
26430+
26431+ glEnable(GL_BLEND);
26432+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
26433+ glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
26434+
26435+ int i, numUnits;
26436+
26437+ glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &numUnits);
26438+ for (i = 0; i < numUnits; i++) {
26439+ do_glActiveTextureARB(GL_TEXTURE0_ARB + i);
26440+ glDisable(GL_TEXTURE_1D);
26441+ glDisable(GL_TEXTURE_2D);
26442+ glDisable(GL_TEXTURE_3D);
26443+ }
26444+ glDisable(GL_ALPHA_TEST);
26445+ glDisable(GL_DEPTH_TEST);
26446+ glDisable(GL_STENCIL_TEST);
26447+ glDisable(GL_SCISSOR_TEST);
26448+ glDisable(GL_FRAGMENT_PROGRAM_ARB);
26449+ glDisable(GL_VERTEX_PROGRAM_ARB);
26450+ do_glUseProgramObjectARB(0);
26451+
26452+ // memset(client_cursor.pixels, 255, client_cursor.width
26453+ // * client_cursor.height * sizeof(int));
26454+
26455+ glRasterPos2d(client_cursor.x - client_cursor.xhot,
26456+ client_cursor.y - client_cursor.yhot);
26457+ glDrawPixels(client_cursor.width, client_cursor.height,
26458+ GL_BGRA, GL_UNSIGNED_BYTE,
26459+ client_cursor.pixels);
26460+
26461+ glMatrixMode(GL_MODELVIEW);
26462+ glPopMatrix();
26463+
26464+ glMatrixMode(GL_PROJECTION);
26465+ glPopMatrix();
26466+
26467+ glPopClientAttrib();
26468+ glPopAttrib();
26469+ }
26470+#endif
26471+
26472+ ////////// HORRIBLE HORRIBLE HACK
26473+ if (drawable != active_win && active_win) {
26474+ glXMakeCurrent(dpy, active_win,
26475+ processes[0].current_state->context);
26476+ glXSwapBuffers(dpy, active_win);
26477+ glXMakeCurrent(dpy, process->current_state->drawable,
26478+ process->current_state->context);
26479+ }
26480+ glXSwapBuffers(dpy, drawable);
26481+ }
26482+ break;
26483+ }
26484+
26485+ case glXIsDirect_func:
26486+ {
26487+ int fake_ctxt = (int) args[1];
26488+
26489+ if (display_function_call)
26490+ fprintf(stderr, "fake_ctx=%x\n", fake_ctxt);
26491+ GLXContext ctxt =
26492+ get_association_fakecontext_glxcontext(process, fake_ctxt);
26493+ if (ctxt == NULL) {
26494+ fprintf(stderr, "invalid fake_ctxt (%x) !\n", fake_ctxt);
26495+ ret_char = False;
26496+ } else {
26497+ ret_char = glXIsDirect(dpy, ctxt);
26498+ }
26499+ break;
26500+ }
26501+
26502+ case glXGetConfig_func:
26503+ {
26504+ int visualid = args[1];
26505+ XVisualInfo *vis = NULL;
26506+
26507+ if (visualid)
26508+ vis = get_visual_info_from_visual_id(dpy, visualid);
26509+ if (vis == NULL)
26510+ vis = get_default_visual(dpy);
26511+ ret_int = glXGetConfig(dpy, vis, args[2], (int *) args[3]);
26512+ break;
26513+ }
26514+
26515+ case glXGetConfig_extended_func:
26516+ {
26517+ int visualid = args[1];
26518+ int n = args[2];
26519+ int i;
26520+ XVisualInfo *vis = NULL;
26521+ int *attribs = (int *) args[3];
26522+ int *values = (int *) args[4];
26523+ int *res = (int *) args[5];
26524+
26525+ if (visualid)
26526+ vis = get_visual_info_from_visual_id(dpy, visualid);
26527+ if (vis == NULL)
26528+ vis = get_default_visual(dpy);
26529+
26530+ for (i = 0; i < n; i++) {
26531+ res[i] = glXGetConfig(dpy, vis, attribs[i], &values[i]);
26532+ }
26533+ break;
26534+ }
26535+
26536+ case glXUseXFont_func:
26537+ {
26538+ /* implementation is client-side only :-) */
26539+ break;
26540+ }
26541+
26542+ case glXQueryExtension_func:
26543+ {
26544+ ret_int =
26545+ glXQueryExtension(dpy, (int *) args[1], (int *) args[2]);
26546+ break;
26547+ }
26548+
26549+ case glXChooseFBConfig_func:
26550+ {
26551+ GET_EXT_PTR(GLXFBConfig *, glXChooseFBConfig,
26552+ (Display *, int, int *, int *));
26553+ if (process->nfbconfig == MAX_FBCONFIG) {
26554+ *(int *) args[3] = 0;
26555+ ret_int = 0;
26556+ } else {
26557+ GLXFBConfig *fbconfigs =
26558+ ptr_func_glXChooseFBConfig(dpy, args[1], (int *) args[2],
26559+ (int *) args[3]);
26560+ if (fbconfigs) {
26561+ process->fbconfigs[process->nfbconfig] = fbconfigs;
26562+ process->fbconfigs_max[process->nfbconfig] =
26563+ *(int *) args[3];
26564+ process->nfbconfig++;
26565+ ret_int = 1 + process->nfbconfig_total;
26566+ process->nfbconfig_total +=
26567+ process->fbconfigs_max[process->nfbconfig];
26568+ } else {
26569+ ret_int = 0;
26570+ }
26571+ }
26572+ break;
26573+ }
26574+
26575+ case glXChooseFBConfigSGIX_func:
26576+ {
26577+ GET_EXT_PTR(GLXFBConfigSGIX *, glXChooseFBConfigSGIX,
26578+ (Display *, int, int *, int *));
26579+ if (process->nfbconfig == MAX_FBCONFIG) {
26580+ *(int *) args[3] = 0;
26581+ ret_int = 0;
26582+ } else {
26583+ GLXFBConfigSGIX *fbconfigs =
26584+ ptr_func_glXChooseFBConfigSGIX(dpy, args[1],
26585+ (int *) args[2],
26586+ (int *) args[3]);
26587+ if (fbconfigs) {
26588+ process->fbconfigs[process->nfbconfig] = fbconfigs;
26589+ process->fbconfigs_max[process->nfbconfig] =
26590+ *(int *) args[3];
26591+ process->nfbconfig++;
26592+ ret_int = 1 + process->nfbconfig_total;
26593+ process->nfbconfig_total +=
26594+ process->fbconfigs_max[process->nfbconfig];
26595+ } else {
26596+ ret_int = 0;
26597+ }
26598+ }
26599+ break;
26600+ }
26601+
26602+ case glXGetFBConfigs_func:
26603+ {
26604+ GET_EXT_PTR(GLXFBConfig *, glXGetFBConfigs,
26605+ (Display *, int, int *));
26606+ if (process->nfbconfig == MAX_FBCONFIG) {
26607+ *(int *) args[2] = 0;
26608+ ret_int = 0;
26609+ } else {
26610+ GLXFBConfig *fbconfigs =
26611+ ptr_func_glXGetFBConfigs(dpy, args[1], (int *) args[2]);
26612+ if (fbconfigs) {
26613+ process->fbconfigs[process->nfbconfig] = fbconfigs;
26614+ process->fbconfigs_max[process->nfbconfig] =
26615+ *(int *) args[2];
26616+ process->nfbconfig++;
26617+ ret_int = 1 + process->nfbconfig_total;
26618+ process->nfbconfig_total +=
26619+ process->fbconfigs_max[process->nfbconfig];
26620+ } else {
26621+ ret_int = 0;
26622+ }
26623+ }
26624+ break;
26625+ }
26626+
26627+ case glXCreatePbuffer_func:
26628+ {
26629+ GET_EXT_PTR(GLXPbuffer, glXCreatePbuffer,
26630+ (Display *, GLXFBConfig, int *));
26631+ int client_fbconfig = args[1];
26632+
26633+ ret_int = 0;
26634+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26635+
26636+ if (fbconfig) {
26637+ GLXPbuffer pbuffer =
26638+ ptr_func_glXCreatePbuffer(dpy, fbconfig, (int *) args[2]);
26639+ fprintf(stderr, "glXCreatePbuffer --> %x\n", (int) pbuffer);
26640+ if (pbuffer) {
26641+ ClientGLXDrawable fake_pbuffer = to_drawable(
26642+ ++ process->next_available_pbuffer_number);
26643+
26644+ set_association_fakepbuffer_pbuffer(
26645+ process, fake_pbuffer, pbuffer);
26646+ fprintf(stderr,
26647+ "set_association_fakepbuffer_pbuffer(%p, %x)\n",
26648+ fake_pbuffer, (int) (long) pbuffer);
26649+ ret_int = (int) (long) fake_pbuffer;
26650+ }
26651+ }
26652+ break;
26653+ }
26654+
26655+ case glXCreateGLXPbufferSGIX_func:
26656+ {
26657+ GET_EXT_PTR(GLXPbufferSGIX, glXCreateGLXPbufferSGIX,
26658+ (Display *, GLXFBConfig, int, int, int *));
26659+ int client_fbconfig = args[1];
26660+
26661+ ret_int = 0;
26662+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26663+
26664+ if (fbconfig) {
26665+ GLXPbufferSGIX pbuffer = ptr_func_glXCreateGLXPbufferSGIX(
26666+ dpy, fbconfig,
26667+ args[2], args[3], (int *) args[4]);
26668+ if (pbuffer) {
26669+ ClientGLXDrawable fake_pbuffer = to_drawable(
26670+ ++ process->next_available_pbuffer_number);
26671+
26672+ set_association_fakepbuffer_pbuffer(
26673+ process, fake_pbuffer, pbuffer);
26674+ ret_int = (int) (long) fake_pbuffer;
26675+ }
26676+ }
26677+ break;
26678+ }
26679+
26680+ case glXDestroyPbuffer_func:
26681+ {
26682+ GET_EXT_PTR(void, glXDestroyPbuffer, (Display *, GLXPbuffer));
26683+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26684+
26685+ if (display_function_call)
26686+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26687+
26688+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26689+ process, fake_pbuffer);
26690+ if (pbuffer == 0) {
26691+ fprintf(stderr, "invalid fake_pbuffer (%p) !\n",
26692+ fake_pbuffer);
26693+ } else {
26694+ if (!is_gl_vendor_ati(dpy))
26695+ ptr_func_glXDestroyPbuffer(dpy, pbuffer);
26696+ unset_association_fakepbuffer_pbuffer(process, fake_pbuffer);
26697+ }
26698+ break;
26699+ }
26700+
26701+ case glXDestroyGLXPbufferSGIX_func:
26702+ {
26703+ GET_EXT_PTR(void, glXDestroyGLXPbufferSGIX,
26704+ (Display *, GLXPbuffer));
26705+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26706+
26707+ if (display_function_call)
26708+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26709+
26710+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26711+ process, fake_pbuffer);
26712+ if (pbuffer == 0) {
26713+ fprintf(stderr, "invalid fake_pbuffer (%p) !\n",
26714+ fake_pbuffer);
26715+ } else {
26716+ if (!is_gl_vendor_ati(dpy))
26717+ ptr_func_glXDestroyGLXPbufferSGIX(dpy, pbuffer);
26718+ unset_association_fakepbuffer_pbuffer(process, fake_pbuffer);
26719+ }
26720+ break;
26721+ }
26722+
26723+ case glXBindTexImageATI_func:
26724+ {
26725+ GET_EXT_PTR(void, glXBindTexImageATI,
26726+ (Display *, GLXPbuffer, int));
26727+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26728+
26729+ if (display_function_call)
26730+ fprintf(stderr, "fake_pbuffer=%p\n",
26731+ fake_pbuffer);
26732+
26733+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26734+ process, fake_pbuffer);
26735+ if (pbuffer == 0) {
26736+ fprintf(stderr,
26737+ "glXBindTexImageATI : invalid fake_pbuffer (%p) !\n",
26738+ fake_pbuffer);
26739+ } else {
26740+ ptr_func_glXBindTexImageATI(dpy, pbuffer, args[2]);
26741+ }
26742+ break;
26743+ }
26744+
26745+ case glXReleaseTexImageATI_func:
26746+ {
26747+ GET_EXT_PTR(void, glXReleaseTexImageATI,
26748+ (Display *, GLXPbuffer, int));
26749+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26750+
26751+ if (display_function_call)
26752+ fprintf(stderr, "fake_pbuffer=%d\n",
26753+ (int) (long) fake_pbuffer);
26754+
26755+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26756+ process, fake_pbuffer);
26757+ if (pbuffer == 0) {
26758+ fprintf(stderr,
26759+ "glXReleaseTexImageATI : invalid fake_pbuffer (%d) !\n",
26760+ (int) (long) fake_pbuffer);
26761+ } else {
26762+ ptr_func_glXReleaseTexImageATI(dpy, pbuffer, args[2]);
26763+ }
26764+ break;
26765+ }
26766+
26767+ case glXBindTexImageARB_func:
26768+ {
26769+ GET_EXT_PTR(Bool, glXBindTexImageARB,
26770+ (Display *, GLXPbuffer, int));
26771+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26772+
26773+ if (display_function_call)
26774+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26775+
26776+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26777+ process, fake_pbuffer);
26778+ if (pbuffer == 0) {
26779+ fprintf(stderr,
26780+ "glXBindTexImageARB : invalid fake_pbuffer (%p) !\n",
26781+ fake_pbuffer);
26782+ ret_int = 0;
26783+ } else {
26784+ ret_int = ptr_func_glXBindTexImageARB(dpy, pbuffer, args[2]);
26785+ }
26786+ break;
26787+ }
26788+
26789+ case glXReleaseTexImageARB_func:
26790+ {
26791+ GET_EXT_PTR(Bool, glXReleaseTexImageARB,
26792+ (Display *, GLXPbuffer, int));
26793+ ClientGLXDrawable fake_pbuffer = to_drawable(args[1]);
26794+
26795+ if (display_function_call)
26796+ fprintf(stderr, "fake_pbuffer=%p\n", fake_pbuffer);
26797+
26798+ GLXPbuffer pbuffer = get_association_fakepbuffer_pbuffer(
26799+ process, fake_pbuffer);
26800+ if (pbuffer == 0) {
26801+ fprintf(stderr,
26802+ "glXReleaseTexImageARB : invalid fake_pbuffer (%p) !\n",
26803+ fake_pbuffer);
26804+ ret_int = 0;
26805+ } else {
26806+ ret_int =
26807+ ptr_func_glXReleaseTexImageARB(dpy, pbuffer, args[2]);
26808+ }
26809+ break;
26810+ }
26811+
26812+ case glXGetFBConfigAttrib_func:
26813+ {
26814+ GET_EXT_PTR(int, glXGetFBConfigAttrib,
26815+ (Display *, GLXFBConfig, int, int *));
26816+ int client_fbconfig = args[1];
26817+
26818+ ret_int = 0;
26819+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26820+
26821+ if (fbconfig)
26822+ ret_int =
26823+ ptr_func_glXGetFBConfigAttrib(dpy, fbconfig, args[2],
26824+ (int *) args[3]);
26825+ break;
26826+ }
26827+
26828+ case glXGetFBConfigAttrib_extended_func:
26829+ {
26830+ GET_EXT_PTR(int, glXGetFBConfigAttrib,
26831+ (Display *, GLXFBConfig, int, int *));
26832+ int client_fbconfig = args[1];
26833+ int n = args[2];
26834+ int i;
26835+ int *attribs = (int *) args[3];
26836+ int *values = (int *) args[4];
26837+ int *res = (int *) args[5];
26838+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26839+
26840+ for (i = 0; i < n; i++) {
26841+ if (fbconfig) {
26842+ res[i] =
26843+ ptr_func_glXGetFBConfigAttrib(dpy, fbconfig,
26844+ attribs[i], &values[i]);
26845+ } else {
26846+ res[i] = 0;
26847+ }
26848+ }
26849+ break;
26850+ }
26851+
26852+ case glXGetFBConfigAttribSGIX_func:
26853+ {
26854+ GET_EXT_PTR(int, glXGetFBConfigAttribSGIX,
26855+ (Display *, GLXFBConfigSGIX, int, int *));
26856+ int client_fbconfig = args[1];
26857+
26858+ ret_int = 0;
26859+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26860+
26861+ if (fbconfig)
26862+ ret_int =
26863+ ptr_func_glXGetFBConfigAttribSGIX(dpy,
26864+ (GLXFBConfigSGIX)
26865+ fbconfig, args[2],
26866+ (int *) args[3]);
26867+ break;
26868+ }
26869+
26870+ case glXQueryContext_func:
26871+ {
26872+ GET_EXT_PTR(int, glXQueryContext,
26873+ (Display *, GLXContext, int, int *));
26874+ int fake_ctxt = (int) args[1];
26875+
26876+ if (display_function_call)
26877+ fprintf(stderr, "fake_ctx=%i\n", fake_ctxt);
26878+ GLXContext ctxt =
26879+ get_association_fakecontext_glxcontext(process, fake_ctxt);
26880+ if (ctxt == NULL) {
26881+ fprintf(stderr, "invalid fake_ctxt (%i) !\n", fake_ctxt);
26882+ ret_int = 0;
26883+ } else {
26884+ ret_int =
26885+ ptr_func_glXQueryContext(dpy, ctxt, args[2],
26886+ (int *) args[3]);
26887+ }
26888+ break;
26889+ }
26890+
26891+ case glXQueryDrawable_func:
26892+ {
26893+ GET_EXT_PTR(void, glXQueryDrawable,
26894+ (Display *, GLXDrawable, int, int *));
26895+ ClientGLXDrawable client_drawable = to_drawable(args[1]);
26896+ GLXDrawable drawable =
26897+ get_association_clientdrawable_serverdrawable(
26898+ process, client_drawable);
26899+
26900+ if (display_function_call)
26901+ fprintf(stderr, "client_drawable=%p\n",
26902+ client_drawable);
26903+
26904+ if (!drawable)
26905+ fprintf(stderr, "invalid client_drawable (%p) !\n",
26906+ client_drawable);
26907+ else
26908+ ptr_func_glXQueryDrawable(dpy, drawable,
26909+ args[2], (int *) args[3]);
26910+
26911+ break;
26912+ }
26913+
26914+ case glXQueryGLXPbufferSGIX_func:
26915+ {
26916+ GET_EXT_PTR(int, glXQueryGLXPbufferSGIX,
26917+ (Display *, GLXFBConfigSGIX, int, int *));
26918+ int client_fbconfig = args[1];
26919+
26920+ ret_int = 0;
26921+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26922+
26923+ if (fbconfig)
26924+ ret_int = ptr_func_glXQueryGLXPbufferSGIX(dpy,
26925+ (GLXFBConfigSGIX) fbconfig,
26926+ args[2], (int *) args[3]);
26927+ break;
26928+ }
26929+
26930+ case glXCreateContextWithConfigSGIX_func:
26931+ {
26932+ GET_EXT_PTR(GLXContext, glXCreateContextWithConfigSGIX,
26933+ (Display *, GLXFBConfigSGIX, int, GLXContext, int));
26934+ int client_fbconfig = args[1];
26935+
26936+ ret_int = 0;
26937+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26938+
26939+ if (fbconfig) {
26940+ GLXContext shareList = get_association_fakecontext_glxcontext(
26941+ process, (int) args[3]);
26942+ process->next_available_context_number++;
26943+ int fake_ctxt = process->next_available_context_number;
26944+ GLXContext ctxt = ptr_func_glXCreateContextWithConfigSGIX(
26945+ dpy, (GLXFBConfigSGIX) fbconfig, args[2],
26946+ shareList, args[4]);
26947+ set_association_fakecontext_glxcontext(
26948+ process, fake_ctxt, ctxt);
26949+ ret_int = fake_ctxt;
26950+ }
26951+ break;
26952+ }
26953+
26954+ case glXGetVisualFromFBConfig_func:
26955+ {
26956+ GET_EXT_PTR(XVisualInfo *, glXGetVisualFromFBConfig,
26957+ (Display *, GLXFBConfig));
26958+ int client_fbconfig = args[1];
26959+
26960+ ret_int = 0;
26961+ GLXFBConfig fbconfig = get_fbconfig(process, client_fbconfig);
26962+
26963+ if (fbconfig) {
26964+ XVisualInfo *vis =
26965+ ptr_func_glXGetVisualFromFBConfig(dpy, fbconfig);
26966+ ret_int = (vis) ? vis->visualid : 0;
26967+ if (vis) {
26968+ tabAssocAttribListVisual =
26969+ realloc(tabAssocAttribListVisual,
26970+ sizeof(AssocAttribListVisual) *
26971+ (nTabAssocAttribListVisual + 1));
26972+ tabAssocAttribListVisual[nTabAssocAttribListVisual].
26973+ attribListLength = 0;
26974+ tabAssocAttribListVisual[nTabAssocAttribListVisual].
26975+ attribList = NULL;
26976+ tabAssocAttribListVisual[nTabAssocAttribListVisual].
26977+ visInfo = vis;
26978+ nTabAssocAttribListVisual++;
26979+ }
26980+ if (display_function_call)
26981+ fprintf(stderr, "visualid = %d\n", ret_int);
26982+ }
26983+ break;
26984+ }
26985+
26986+ case glXSwapIntervalSGI_func:
26987+ {
26988+ GET_EXT_PTR(int, glXSwapIntervalSGI, (int));
26989+
26990+ ret_int = ptr_func_glXSwapIntervalSGI(args[0]);
26991+ break;
26992+ }
26993+
26994+ case glXGetProcAddress_fake_func:
26995+ {
26996+ if (display_function_call)
26997+ fprintf(stderr, "%s\n", (char *) args[0]);
26998+ ret_int = glXGetProcAddressARB((const GLubyte *) args[0]) != NULL;
26999+ break;
27000+ }
27001+
27002+ case glXGetProcAddress_global_fake_func:
27003+ {
27004+ int nbElts = args[0];
27005+ char *huge_buffer = (char *) args[1];
27006+ char *result = (char *) args[2];
27007+ int i;
27008+
27009+ for (i = 0; i < nbElts; i++) {
27010+ int len = strlen(huge_buffer);
27011+
27012+ result[i] =
27013+ glXGetProcAddressARB((const GLubyte *) huge_buffer) !=
27014+ NULL;
27015+ huge_buffer += len + 1;
27016+ }
27017+ break;
27018+ }
27019+
27020+/* Begin of texture stuff */
27021+ case glBindTexture_func:
27022+ case glBindTextureEXT_func:
27023+ {
27024+ int target = args[0];
27025+ unsigned int client_texture = args[1];
27026+ unsigned int server_texture;
27027+
27028+ if (client_texture == 0) {
27029+ glBindTexture(target, 0);
27030+ } else {
27031+ alloc_value(process->current_state->textureAllocator,
27032+ client_texture);
27033+ server_texture =
27034+ process->current_state->tabTextures[client_texture];
27035+ if (server_texture == 0) {
27036+ glGenTextures(1, &server_texture);
27037+ process->current_state->tabTextures[client_texture] =
27038+ server_texture;
27039+ }
27040+ glBindTexture(target, server_texture);
27041+ }
27042+ break;
27043+ }
27044+
27045+ case glGenTextures_fake_func:
27046+ {
27047+ GET_EXT_PTR(void, glGenTextures, (GLsizei n, GLuint *textures));
27048+ int i;
27049+ int n = args[0];
27050+ unsigned int *clientTabTextures = malloc(n * sizeof(int));
27051+ unsigned int *serverTabTextures = malloc(n * sizeof(int));
27052+
27053+ alloc_range(process->current_state->textureAllocator, n,
27054+ clientTabTextures);
27055+
27056+ ptr_func_glGenTextures(n, serverTabTextures);
27057+ for (i = 0; i < n; i++) {
27058+ process->current_state->tabTextures[clientTabTextures[i]] =
27059+ serverTabTextures[i];
27060+ }
27061+
27062+ free(clientTabTextures);
27063+ free(serverTabTextures);
27064+ break;
27065+ }
27066+
27067+
27068+ case glDeleteTextures_func:
27069+ {
27070+ GET_EXT_PTR(void, glDeleteTextures,
27071+ (GLsizei n, const GLuint *textures));
27072+ int i;
27073+ int n = args[0];
27074+ unsigned int *clientTabTextures = (unsigned int *) args[1];
27075+
27076+ delete_range(process->current_state->textureAllocator, n,
27077+ clientTabTextures);
27078+
27079+ unsigned int *serverTabTextures = malloc(n * sizeof(int));
27080+
27081+ for (i = 0; i < n; i++) {
27082+ serverTabTextures[i] =
27083+ get_server_texture(process, clientTabTextures[i]);
27084+ }
27085+ ptr_func_glDeleteTextures(n, serverTabTextures);
27086+ for (i = 0; i < n; i++) {
27087+ process->current_state->tabTextures[clientTabTextures[i]] = 0;
27088+ }
27089+ free(serverTabTextures);
27090+ break;
27091+ }
27092+
27093+ case glPrioritizeTextures_func:
27094+ {
27095+ GET_EXT_PTR(void, glPrioritizeTextures,
27096+ (GLsizei n, const GLuint *textures,
27097+ const GLclampf *priorities));
27098+
27099+ int i;
27100+ int n = args[0];
27101+ unsigned int *textures = (unsigned int *) args[1];
27102+
27103+ for (i = 0; i < n; i++) {
27104+ textures[i] = get_server_texture(process, textures[i]);
27105+ }
27106+ ptr_func_glPrioritizeTextures(n, textures,
27107+ (const GLclampf *) args[2]);
27108+ break;
27109+ }
27110+
27111+ case glAreTexturesResident_func:
27112+ {
27113+ GET_EXT_PTR(void, glAreTexturesResident,
27114+ (GLsizei n, const GLuint *textures,
27115+ GLboolean *residences));
27116+ int i;
27117+ int n = args[0];
27118+ unsigned int *textures = (unsigned int *) args[1];
27119+
27120+ for (i = 0; i < n; i++) {
27121+ textures[i] = get_server_texture(process, textures[i]);
27122+ }
27123+ ptr_func_glAreTexturesResident(n, textures,
27124+ (GLboolean *) args[2]);
27125+ break;
27126+ }
27127+
27128+ case glIsTexture_func:
27129+ case glIsTextureEXT_func:
27130+ {
27131+ GET_EXT_PTR(GLboolean, glIsTexture, (GLuint texture));
27132+ unsigned int client_texture = args[0];
27133+ unsigned int server_texture =
27134+ get_server_texture(process, client_texture);
27135+ if (server_texture)
27136+ ret_char = ptr_func_glIsTexture(server_texture);
27137+ else
27138+ ret_char = 0;
27139+ break;
27140+ }
27141+
27142+ case glFramebufferTexture1DEXT_func:
27143+ {
27144+ GET_EXT_PTR(void, glFramebufferTexture1DEXT,
27145+ (int, int, int, int, int));
27146+ unsigned int client_texture = args[3];
27147+ unsigned int server_texture =
27148+ get_server_texture(process, client_texture);
27149+ if (server_texture)
27150+ ptr_func_glFramebufferTexture1DEXT(args[0], args[1], args[2],
27151+ server_texture, args[4]);
27152+ break;
27153+ }
27154+
27155+ case glFramebufferTexture2DEXT_func:
27156+ {
27157+ GET_EXT_PTR(void, glFramebufferTexture2DEXT,
27158+ (int, int, int, int, int));
27159+ unsigned int client_texture = args[3];
27160+ unsigned int server_texture =
27161+ get_server_texture(process, client_texture);
27162+ if (server_texture)
27163+ ptr_func_glFramebufferTexture2DEXT(args[0], args[1], args[2],
27164+ server_texture, args[4]);
27165+ break;
27166+ }
27167+
27168+ case glFramebufferTexture3DEXT_func:
27169+ {
27170+ GET_EXT_PTR(void, glFramebufferTexture3DEXT,
27171+ (int, int, int, int, int, int));
27172+ unsigned int client_texture = args[3];
27173+ unsigned int server_texture =
27174+ get_server_texture(process, client_texture);
27175+ if (server_texture)
27176+ ptr_func_glFramebufferTexture3DEXT(args[0], args[1], args[2],
27177+ server_texture, args[4],
27178+ args[5]);
27179+ break;
27180+ }
27181+/* End of texture stuff */
27182+
27183+/* Begin of list stuff */
27184+ case glIsList_func:
27185+ {
27186+ unsigned int client_list = args[0];
27187+ unsigned int server_list = get_server_list(process, client_list);
27188+
27189+ if (server_list)
27190+ ret_char = glIsList(server_list);
27191+ else
27192+ ret_char = 0;
27193+ break;
27194+ }
27195+
27196+ case glDeleteLists_func:
27197+ {
27198+ int i;
27199+ unsigned int first_client = args[0];
27200+ int n = args[1];
27201+
27202+ unsigned int first_server =
27203+ get_server_list(process, first_client);
27204+ for (i = 0; i < n; i++) {
27205+ if (get_server_list(process, first_client + i) !=
27206+ first_server + i)
27207+ break;
27208+ }
27209+ if (i == n) {
27210+ glDeleteLists(first_server, n);
27211+ } else {
27212+ for (i = 0; i < n; i++) {
27213+ glDeleteLists(get_server_list(process, first_client + i),
27214+ 1);
27215+ }
27216+ }
27217+
27218+ for (i = 0; i < n; i++) {
27219+ process->current_state->tabLists[first_client + i] = 0;
27220+ }
27221+ delete_consecutive_values(process->current_state->listAllocator,
27222+ first_client, n);
27223+ break;
27224+ }
27225+
27226+ case glGenLists_fake_func:
27227+ {
27228+ int i;
27229+ int n = args[0];
27230+ unsigned int server_first = glGenLists(n);
27231+
27232+ if (server_first) {
27233+ unsigned int client_first =
27234+ alloc_range(process->current_state->listAllocator, n,
27235+ NULL);
27236+ for (i = 0; i < n; i++) {
27237+ process->current_state->tabLists[client_first + i] =
27238+ server_first + i;
27239+ }
27240+ }
27241+ break;
27242+ }
27243+
27244+ case glNewList_func:
27245+ {
27246+ unsigned int client_list = args[0];
27247+ int mode = args[1];
27248+
27249+ alloc_value(process->current_state->listAllocator, client_list);
27250+ unsigned int server_list = get_server_list(process, client_list);
27251+
27252+ if (server_list == 0) {
27253+ server_list = glGenLists(1);
27254+ process->current_state->tabLists[client_list] = server_list;
27255+ }
27256+ glNewList(server_list, mode);
27257+ break;
27258+ }
27259+
27260+ case glCallList_func:
27261+ {
27262+ unsigned int client_list = args[0];
27263+ unsigned int server_list = get_server_list(process, client_list);
27264+
27265+ glCallList(server_list);
27266+ break;
27267+ }
27268+
27269+ case glCallLists_func:
27270+ {
27271+ int i;
27272+ int n = args[0];
27273+ int type = args[1];
27274+ const GLvoid *lists = (const GLvoid *) args[2];
27275+ int *new_lists = malloc(sizeof(int) * n);
27276+
27277+ for (i = 0; i < n; i++) {
27278+ new_lists[i] =
27279+ get_server_list(process, translate_id(i, type, lists));
27280+ }
27281+ glCallLists(n, GL_UNSIGNED_INT, new_lists);
27282+ free(new_lists);
27283+ break;
27284+ }
27285+
27286+
27287+/* End of list stuff */
27288+
27289+/* Begin of buffer stuff */
27290+ case glBindBufferARB_func:
27291+ {
27292+ GET_EXT_PTR(void, glBindBufferARB, (int, int));
27293+ int target = args[0];
27294+ unsigned int client_buffer = args[1];
27295+ unsigned int server_buffer;
27296+
27297+ if (client_buffer == 0) {
27298+ ptr_func_glBindBufferARB(target, 0);
27299+ } else {
27300+ server_buffer = get_server_buffer(process, client_buffer);
27301+ ptr_func_glBindBufferARB(target, server_buffer);
27302+ }
27303+ break;
27304+ }
27305+
27306+ case glGenBuffersARB_fake_func:
27307+ {
27308+ GET_EXT_PTR(void, glGenBuffersARB, (int, unsigned int *));
27309+ int i;
27310+ int n = args[0];
27311+ unsigned int *clientTabBuffers = malloc(n * sizeof(int));
27312+ unsigned int *serverTabBuffers = malloc(n * sizeof(int));
27313+
27314+ alloc_range(process->current_state->bufferAllocator, n,
27315+ clientTabBuffers);
27316+
27317+ ptr_func_glGenBuffersARB(n, serverTabBuffers);
27318+ for (i = 0; i < n; i++) {
27319+ process->current_state->tabBuffers[clientTabBuffers[i]] =
27320+ serverTabBuffers[i];
27321+ }
27322+
27323+ free(clientTabBuffers);
27324+ free(serverTabBuffers);
27325+ break;
27326+ }
27327+
27328+
27329+ case glDeleteBuffersARB_func:
27330+ {
27331+ GET_EXT_PTR(void, glDeleteBuffersARB, (int, int *));
27332+ int i;
27333+ int n = args[0];
27334+ unsigned int *clientTabBuffers = (unsigned int *) args[1];
27335+
27336+ delete_range(process->current_state->bufferAllocator, n,
27337+ clientTabBuffers);
27338+
27339+ int *serverTabBuffers = malloc(n * sizeof(int));
27340+
27341+ for (i = 0; i < n; i++) {
27342+ serverTabBuffers[i] =
27343+ get_server_buffer(process, clientTabBuffers[i]);
27344+ }
27345+ ptr_func_glDeleteBuffersARB(n, serverTabBuffers);
27346+ for (i = 0; i < n; i++) {
27347+ process->current_state->tabBuffers[clientTabBuffers[i]] = 0;
27348+ }
27349+ free(serverTabBuffers);
27350+ break;
27351+ }
27352+
27353+ case glIsBufferARB_func:
27354+ {
27355+ GET_EXT_PTR(int, glIsBufferARB, (int));
27356+ unsigned int client_buffer = args[0];
27357+ unsigned int server_buffer =
27358+ get_server_buffer(process, client_buffer);
27359+ if (server_buffer)
27360+ ret_int = ptr_func_glIsBufferARB(server_buffer);
27361+ else
27362+ ret_int = 0;
27363+ break;
27364+ }
27365+
27366+/* End of buffer stuff */
27367+
27368+ case glShaderSourceARB_fake_func:
27369+ {
27370+ GET_EXT_PTR(void, glShaderSourceARB, (int, int, char **, void *));
27371+ int size = args[1];
27372+ int i;
27373+ int acc_length = 0;
27374+ GLcharARB **tab_prog = malloc(size * sizeof(GLcharARB *));
27375+ int *tab_length = (int *) args[3];
27376+
27377+ for (i = 0; i < size; i++) {
27378+ tab_prog[i] = ((GLcharARB *) args[2]) + acc_length;
27379+ acc_length += tab_length[i];
27380+ }
27381+ ptr_func_glShaderSourceARB(args[0], args[1], tab_prog,
27382+ tab_length);
27383+ free(tab_prog);
27384+ break;
27385+ }
27386+
27387+ case glShaderSource_fake_func:
27388+ {
27389+ GET_EXT_PTR(void, glShaderSource, (int, int, char **, void *));
27390+ int size = args[1];
27391+ int i;
27392+ int acc_length = 0;
27393+ GLcharARB **tab_prog = malloc(size * sizeof(GLcharARB *));
27394+ int *tab_length = (int *) args[3];
27395+
27396+ for (i = 0; i < size; i++) {
27397+ tab_prog[i] = ((GLcharARB *) args[2]) + acc_length;
27398+ acc_length += tab_length[i];
27399+ }
27400+ ptr_func_glShaderSource(args[0], args[1], tab_prog, tab_length);
27401+ free(tab_prog);
27402+ break;
27403+ }
27404+
27405+ case glVertexPointer_fake_func:
27406+ {
27407+ int offset = args[0];
27408+ int size = args[1];
27409+ int type = args[2];
27410+ int stride = args[3];
27411+ int bytes_size = args[4];
27412+
27413+ process->current_state->vertexPointerSize =
27414+ MAX(process->current_state->vertexPointerSize,
27415+ offset + bytes_size);
27416+ process->current_state->vertexPointer =
27417+ realloc(process->current_state->vertexPointer,
27418+ process->current_state->vertexPointerSize);
27419+ memcpy(process->current_state->vertexPointer + offset,
27420+ (void *) args[5], bytes_size);
27421+ /* fprintf(stderr, "glVertexPointer_fake_func size=%d, type=%d,
27422+ * stride=%d, byte_size=%d\n", size, type, stride, bytes_size); */
27423+ glVertexPointer(size, type, stride,
27424+ process->current_state->vertexPointer);
27425+ break;
27426+ }
27427+
27428+ case glNormalPointer_fake_func:
27429+ {
27430+ int offset = args[0];
27431+ int type = args[1];
27432+ int stride = args[2];
27433+ int bytes_size = args[3];
27434+
27435+ process->current_state->normalPointerSize =
27436+ MAX(process->current_state->normalPointerSize,
27437+ offset + bytes_size);
27438+ process->current_state->normalPointer =
27439+ realloc(process->current_state->normalPointer,
27440+ process->current_state->normalPointerSize);
27441+ memcpy(process->current_state->normalPointer + offset,
27442+ (void *) args[4], bytes_size);
27443+ // fprintf(stderr, "glNormalPointer_fake_func type=%d, stride=%d,
27444+ // byte_size=%d\n", type, stride, bytes_size);
27445+ glNormalPointer(type, stride,
27446+ process->current_state->normalPointer);
27447+ break;
27448+ }
27449+
27450+ case glIndexPointer_fake_func:
27451+ {
27452+ int offset = args[0];
27453+ int type = args[1];
27454+ int stride = args[2];
27455+ int bytes_size = args[3];
27456+
27457+ process->current_state->indexPointerSize =
27458+ MAX(process->current_state->indexPointerSize,
27459+ offset + bytes_size);
27460+ process->current_state->indexPointer =
27461+ realloc(process->current_state->indexPointer,
27462+ process->current_state->indexPointerSize);
27463+ memcpy(process->current_state->indexPointer + offset,
27464+ (void *) args[4], bytes_size);
27465+ // fprintf(stderr, "glIndexPointer_fake_func type=%d, stride=%d,
27466+ // byte_size=%d\n", type, stride, bytes_size);
27467+ glIndexPointer(type, stride,
27468+ process->current_state->indexPointer);
27469+ break;
27470+ }
27471+
27472+ case glEdgeFlagPointer_fake_func:
27473+ {
27474+ int offset = args[0];
27475+ int stride = args[1];
27476+ int bytes_size = args[2];
27477+
27478+ process->current_state->edgeFlagPointerSize =
27479+ MAX(process->current_state->edgeFlagPointerSize,
27480+ offset + bytes_size);
27481+ process->current_state->edgeFlagPointer =
27482+ realloc(process->current_state->edgeFlagPointer,
27483+ process->current_state->edgeFlagPointerSize);
27484+ memcpy(process->current_state->edgeFlagPointer + offset,
27485+ (void *) args[3], bytes_size);
27486+ // fprintf(stderr, "glEdgeFlagPointer_fake_func stride = %d,
27487+ // bytes_size=%d\n", stride, bytes_size);
27488+ glEdgeFlagPointer(stride,
27489+ process->current_state->edgeFlagPointer);
27490+ break;
27491+ }
27492+
27493+ case glVertexAttribPointerARB_fake_func:
27494+ {
27495+ GET_EXT_PTR(void, glVertexAttribPointerARB,
27496+ (int, int, int, int, int, void *));
27497+ int offset = args[0];
27498+ int index = args[1];
27499+ int size = args[2];
27500+ int type = args[3];
27501+ int normalized = args[4];
27502+ int stride = args[5];
27503+ int bytes_size = args[6];
27504+
27505+ process->current_state->vertexAttribPointerSize[index] =
27506+ MAX(process->current_state->vertexAttribPointerSize[index],
27507+ offset + bytes_size);
27508+ process->current_state->vertexAttribPointer[index] =
27509+ realloc(process->current_state->vertexAttribPointer[index],
27510+ process->current_state->
27511+ vertexAttribPointerSize[index]);
27512+ memcpy(process->current_state->vertexAttribPointer[index] +
27513+ offset, (void *) args[7], bytes_size);
27514+ ptr_func_glVertexAttribPointerARB(index, size, type, normalized,
27515+ stride,
27516+ process->current_state->
27517+ vertexAttribPointer[index]);
27518+ break;
27519+ }
27520+
27521+ case glVertexAttribPointerNV_fake_func:
27522+ {
27523+ GET_EXT_PTR(void, glVertexAttribPointerNV,
27524+ (int, int, int, int, void *));
27525+ int offset = args[0];
27526+ int index = args[1];
27527+ int size = args[2];
27528+ int type = args[3];
27529+ int stride = args[4];
27530+ int bytes_size = args[5];
27531+
27532+ process->current_state->vertexAttribPointerNVSize[index] =
27533+ MAX(process->current_state->vertexAttribPointerNVSize[index],
27534+ offset + bytes_size);
27535+ process->current_state->vertexAttribPointerNV[index] =
27536+ realloc(process->current_state->vertexAttribPointerNV[index],
27537+ process->current_state->
27538+ vertexAttribPointerNVSize[index]);
27539+ memcpy(process->current_state->vertexAttribPointerNV[index] +
27540+ offset, (void *) args[6], bytes_size);
27541+ ptr_func_glVertexAttribPointerNV(index, size, type, stride,
27542+ process->current_state->
27543+ vertexAttribPointerNV[index]);
27544+ break;
27545+ }
27546+
27547+ case glColorPointer_fake_func:
27548+ {
27549+ int offset = args[0];
27550+ int size = args[1];
27551+ int type = args[2];
27552+ int stride = args[3];
27553+ int bytes_size = args[4];
27554+
27555+ process->current_state->colorPointerSize =
27556+ MAX(process->current_state->colorPointerSize,
27557+ offset + bytes_size);
27558+ process->current_state->colorPointer =
27559+ realloc(process->current_state->colorPointer,
27560+ process->current_state->colorPointerSize);
27561+ memcpy(process->current_state->colorPointer + offset,
27562+ (void *) args[5], bytes_size);
27563+ // fprintf(stderr, "glColorPointer_fake_func bytes_size = %d\n",
27564+ // bytes_size);
27565+ glColorPointer(size, type, stride,
27566+ process->current_state->colorPointer);
27567+
27568+ break;
27569+ }
27570+
27571+ case glSecondaryColorPointer_fake_func:
27572+ {
27573+ GET_EXT_PTR(void, glSecondaryColorPointer,
27574+ (int, int, int, void *));
27575+ int offset = args[0];
27576+ int size = args[1];
27577+ int type = args[2];
27578+ int stride = args[3];
27579+ int bytes_size = args[4];
27580+
27581+ process->current_state->secondaryColorPointerSize =
27582+ MAX(process->current_state->secondaryColorPointerSize,
27583+ offset + bytes_size);
27584+ process->current_state->secondaryColorPointer =
27585+ realloc(process->current_state->secondaryColorPointer,
27586+ process->current_state->secondaryColorPointerSize);
27587+ memcpy(process->current_state->secondaryColorPointer + offset,
27588+ (void *) args[5], bytes_size);
27589+ // fprintf(stderr, "glSecondaryColorPointer_fake_func bytes_size
27590+ // = %d\n", bytes_size);
27591+ ptr_func_glSecondaryColorPointer(size, type, stride,
27592+ process->current_state->
27593+ secondaryColorPointer);
27594+
27595+ break;
27596+ }
27597+
27598+ case glPushClientAttrib_func:
27599+ {
27600+ int mask = args[0];
27601+
27602+ if (process->current_state->clientStateSp <
27603+ MAX_CLIENT_STATE_STACK_SIZE) {
27604+ process->current_state->clientStateStack[process->
27605+ current_state->
27606+ clientStateSp].mask =
27607+ mask;
27608+ if (mask & GL_CLIENT_VERTEX_ARRAY_BIT) {
27609+ process->current_state->clientStateStack[process->
27610+ current_state->
27611+ clientStateSp].
27612+ activeTextureIndex =
27613+ process->current_state->activeTextureIndex;
27614+ }
27615+ process->current_state->clientStateSp++;
27616+ }
27617+ glPushClientAttrib(mask);
27618+ break;
27619+ }
27620+
27621+ case glPopClientAttrib_func:
27622+ {
27623+ if (process->current_state->clientStateSp > 0) {
27624+ process->current_state->clientStateSp--;
27625+ if (process->current_state->
27626+ clientStateStack[process->current_state->clientStateSp].
27627+ mask & GL_CLIENT_VERTEX_ARRAY_BIT) {
27628+ process->current_state->activeTextureIndex =
27629+ process->current_state->clientStateStack[process->
27630+ current_state->
27631+ clientStateSp].
27632+ activeTextureIndex;
27633+ }
27634+ }
27635+ glPopClientAttrib();
27636+ break;
27637+ }
27638+
27639+ case glClientActiveTexture_func:
27640+ case glClientActiveTextureARB_func:
27641+ {
27642+ int activeTexture = args[0];
27643+
27644+ process->current_state->activeTextureIndex =
27645+ activeTexture - GL_TEXTURE0_ARB;
27646+ do_glClientActiveTextureARB(activeTexture);
27647+ break;
27648+ }
27649+
27650+ case glTexCoordPointer_fake_func:
27651+ {
27652+ int offset = args[0];
27653+ int index = args[1];
27654+ int size = args[2];
27655+ int type = args[3];
27656+ int stride = args[4];
27657+ int bytes_size = args[5];
27658+
27659+ process->current_state->texCoordPointerSize[index] =
27660+ MAX(process->current_state->texCoordPointerSize[index],
27661+ offset + bytes_size);
27662+ process->current_state->texCoordPointer[index] =
27663+ realloc(process->current_state->texCoordPointer[index],
27664+ process->current_state->texCoordPointerSize[index]);
27665+ memcpy(process->current_state->texCoordPointer[index] + offset,
27666+ (void *) args[6], bytes_size);
27667+ /* fprintf(stderr, "glTexCoordPointer_fake_func size=%d, type=%d,
27668+ * stride=%d, byte_size=%d\n", size, type, stride, bytes_size); */
27669+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + index);
27670+ glTexCoordPointer(size, type, stride,
27671+ process->current_state->texCoordPointer[index]);
27672+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27673+ process->current_state->
27674+ activeTextureIndex);
27675+ break;
27676+ }
27677+
27678+ case glWeightPointerARB_fake_func:
27679+ {
27680+ GET_EXT_PTR(void, glWeightPointerARB, (int, int, int, void *));
27681+ int offset = args[0];
27682+ int size = args[1];
27683+ int type = args[2];
27684+ int stride = args[3];
27685+ int bytes_size = args[4];
27686+
27687+ process->current_state->weightPointerSize =
27688+ MAX(process->current_state->weightPointerSize,
27689+ offset + bytes_size);
27690+ process->current_state->weightPointer =
27691+ realloc(process->current_state->weightPointer,
27692+ process->current_state->weightPointerSize);
27693+ memcpy(process->current_state->weightPointer + offset,
27694+ (void *) args[5], bytes_size);
27695+ /* fprintf(stderr, "glWeightPointerARB_fake_func size=%d,
27696+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27697+ * bytes_size); */
27698+ ptr_func_glWeightPointerARB(size, type, stride,
27699+ process->current_state->
27700+ weightPointer);
27701+ break;
27702+ }
27703+
27704+ case glMatrixIndexPointerARB_fake_func:
27705+ {
27706+ GET_EXT_PTR(void, glMatrixIndexPointerARB,
27707+ (int, int, int, void *));
27708+ int offset = args[0];
27709+ int size = args[1];
27710+ int type = args[2];
27711+ int stride = args[3];
27712+ int bytes_size = args[4];
27713+
27714+ process->current_state->matrixIndexPointerSize =
27715+ MAX(process->current_state->matrixIndexPointerSize,
27716+ offset + bytes_size);
27717+ process->current_state->matrixIndexPointer =
27718+ realloc(process->current_state->matrixIndexPointer,
27719+ process->current_state->matrixIndexPointerSize);
27720+ memcpy(process->current_state->matrixIndexPointer + offset,
27721+ (void *) args[5], bytes_size);
27722+ /* fprintf(stderr, "glMatrixIndexPointerARB_fake_func size=%d,
27723+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27724+ * bytes_size); */
27725+ ptr_func_glMatrixIndexPointerARB(size, type, stride,
27726+ process->current_state->
27727+ matrixIndexPointer);
27728+ break;
27729+ }
27730+
27731+ case glFogCoordPointer_fake_func:
27732+ {
27733+ GET_EXT_PTR(void, glFogCoordPointer, (int, int, void *));
27734+ int offset = args[0];
27735+ int type = args[1];
27736+ int stride = args[2];
27737+ int bytes_size = args[3];
27738+
27739+ process->current_state->fogCoordPointerSize =
27740+ MAX(process->current_state->fogCoordPointerSize,
27741+ offset + bytes_size);
27742+ process->current_state->fogCoordPointer =
27743+ realloc(process->current_state->fogCoordPointer,
27744+ process->current_state->fogCoordPointerSize);
27745+ memcpy(process->current_state->fogCoordPointer + offset,
27746+ (void *) args[4], bytes_size);
27747+ // fprintf(stderr, "glFogCoordPointer_fake_func type=%d,
27748+ // stride=%d, byte_size=%d\n", type, stride, bytes_size);
27749+ ptr_func_glFogCoordPointer(type, stride,
27750+ process->current_state->
27751+ fogCoordPointer);
27752+ break;
27753+ }
27754+
27755+ case glVariantPointerEXT_fake_func:
27756+ {
27757+ GET_EXT_PTR(void, glVariantPointerEXT, (int, int, int, void *));
27758+ int offset = args[0];
27759+ int id = args[1];
27760+ int type = args[2];
27761+ int stride = args[3];
27762+ int bytes_size = args[4];
27763+
27764+ process->current_state->variantPointerEXTSize[id] =
27765+ MAX(process->current_state->variantPointerEXTSize[id],
27766+ offset + bytes_size);
27767+ process->current_state->variantPointerEXT[id] =
27768+ realloc(process->current_state->variantPointerEXT[id],
27769+ process->current_state->variantPointerEXTSize[id]);
27770+ memcpy(process->current_state->variantPointerEXT[id] + offset,
27771+ (void *) args[5], bytes_size);
27772+ // fprintf(stderr, "glVariantPointerEXT_fake_func[%d] type=%d,
27773+ // stride=%d, byte_size=%d\n", id, type, stride, bytes_size);
27774+ ptr_func_glVariantPointerEXT(id, type, stride,
27775+ process->current_state->
27776+ variantPointerEXT[id]);
27777+ break;
27778+ }
27779+
27780+ case glInterleavedArrays_fake_func:
27781+ {
27782+ GET_EXT_PTR(void, glInterleavedArrays, (int, int, void *));
27783+ int offset = args[0];
27784+ int format = args[1];
27785+ int stride = args[2];
27786+ int bytes_size = args[3];
27787+
27788+ process->current_state->interleavedArraysSize =
27789+ MAX(process->current_state->interleavedArraysSize,
27790+ offset + bytes_size);
27791+ process->current_state->interleavedArrays =
27792+ realloc(process->current_state->interleavedArrays,
27793+ process->current_state->interleavedArraysSize);
27794+ memcpy(process->current_state->interleavedArrays + offset,
27795+ (void *) args[4], bytes_size);
27796+ // fprintf(stderr, "glInterleavedArrays_fake_func format=%d,
27797+ // stride=%d, byte_size=%d\n", format, stride, bytes_size);
27798+ ptr_func_glInterleavedArrays(format, stride,
27799+ process->current_state->
27800+ interleavedArrays);
27801+ break;
27802+ }
27803+
27804+ case glElementPointerATI_fake_func:
27805+ {
27806+ GET_EXT_PTR(void, glElementPointerATI, (int, void *));
27807+ int type = args[0];
27808+ int bytes_size = args[1];
27809+
27810+ process->current_state->elementPointerATISize = bytes_size;
27811+ process->current_state->elementPointerATI =
27812+ realloc(process->current_state->elementPointerATI,
27813+ process->current_state->elementPointerATISize);
27814+ memcpy(process->current_state->elementPointerATI,
27815+ (void *) args[2], bytes_size);
27816+ // fprintf(stderr, "glElementPointerATI_fake_func type=%d,
27817+ // byte_size=%d\n", type, bytes_size);
27818+ ptr_func_glElementPointerATI(type,
27819+ process->current_state->
27820+ elementPointerATI);
27821+ break;
27822+ }
27823+
27824+ case glTexCoordPointer01_fake_func:
27825+ {
27826+ int size = args[0];
27827+ int type = args[1];
27828+ int stride = args[2];
27829+ int bytes_size = args[3];
27830+
27831+ process->current_state->texCoordPointerSize[0] = bytes_size;
27832+ process->current_state->texCoordPointer[0] =
27833+ realloc(process->current_state->texCoordPointer[0],
27834+ bytes_size);
27835+ memcpy(process->current_state->texCoordPointer[0],
27836+ (void *) args[4], bytes_size);
27837+ /* fprintf(stderr, "glTexCoordPointer01_fake_func size=%d,
27838+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27839+ * bytes_size); */
27840+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27841+ glTexCoordPointer(size, type, stride,
27842+ process->current_state->texCoordPointer[0]);
27843+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
27844+ glTexCoordPointer(size, type, stride,
27845+ process->current_state->texCoordPointer[0]);
27846+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27847+ process->current_state->
27848+ activeTextureIndex);
27849+ break;
27850+ }
27851+
27852+ case glTexCoordPointer012_fake_func:
27853+ {
27854+ int size = args[0];
27855+ int type = args[1];
27856+ int stride = args[2];
27857+ int bytes_size = args[3];
27858+
27859+ process->current_state->texCoordPointerSize[0] = bytes_size;
27860+ process->current_state->texCoordPointer[0] =
27861+ realloc(process->current_state->texCoordPointer[0],
27862+ bytes_size);
27863+ memcpy(process->current_state->texCoordPointer[0],
27864+ (void *) args[4], bytes_size);
27865+ /* fprintf(stderr, "glTexCoordPointer012_fake_func size=%d,
27866+ * type=%d, stride=%d, byte_size=%d\n", size, type, stride,
27867+ * bytes_size); */
27868+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
27869+ glTexCoordPointer(size, type, stride,
27870+ process->current_state->texCoordPointer[0]);
27871+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
27872+ glTexCoordPointer(size, type, stride,
27873+ process->current_state->texCoordPointer[0]);
27874+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
27875+ glTexCoordPointer(size, type, stride,
27876+ process->current_state->texCoordPointer[0]);
27877+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
27878+ process->current_state->
27879+ activeTextureIndex);
27880+ break;
27881+ }
27882+
27883+ case glVertexAndNormalPointer_fake_func:
27884+ {
27885+ int vertexPointerSize = args[0];
27886+ int vertexPointerType = args[1];
27887+ int vertexPointerStride = args[2];
27888+ int normalPointerType = args[3];
27889+ int normalPointerStride = args[4];
27890+ int bytes_size = args[5];
27891+ void *ptr = (void *) args[6];
27892+
27893+ process->current_state->vertexPointerSize = bytes_size;
27894+ process->current_state->vertexPointer =
27895+ realloc(process->current_state->vertexPointer, bytes_size);
27896+ memcpy(process->current_state->vertexPointer, ptr, bytes_size);
27897+ glVertexPointer(vertexPointerSize, vertexPointerType,
27898+ vertexPointerStride,
27899+ process->current_state->vertexPointer);
27900+ glNormalPointer(normalPointerType, normalPointerStride,
27901+ process->current_state->vertexPointer);
27902+ break;
27903+ }
27904+
27905+ case glVertexNormalPointerInterlaced_fake_func:
27906+ {
27907+ int i = 0;
27908+ int offset = args[i++];
27909+ int vertexPointerSize = args[i++];
27910+ int vertexPointerType = args[i++];
27911+ int stride = args[i++];
27912+ int normalPointerOffset = args[i++];
27913+ int normalPointerType = args[i++];
27914+ int bytes_size = args[i++];
27915+ void *ptr = (void *) args[i++];
27916+
27917+ process->current_state->vertexPointerSize =
27918+ MAX(process->current_state->vertexPointerSize,
27919+ offset + bytes_size);
27920+ process->current_state->vertexPointer =
27921+ realloc(process->current_state->vertexPointer,
27922+ process->current_state->vertexPointerSize);
27923+ memcpy(process->current_state->vertexPointer + offset, ptr,
27924+ bytes_size);
27925+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27926+ process->current_state->vertexPointer);
27927+ glNormalPointer(normalPointerType, stride,
27928+ process->current_state->vertexPointer +
27929+ normalPointerOffset);
27930+ break;
27931+ }
27932+
27933+ case glTuxRacerDrawElements_fake_func:
27934+ {
27935+ int mode = args[0];
27936+ int count = args[1];
27937+ int isColorEnabled = args[2];
27938+ void *ptr = (void *) args[3];
27939+ int stride =
27940+ 6 * sizeof(float) +
27941+ ((isColorEnabled) ? 4 * sizeof(unsigned char) : 0);
27942+ glVertexPointer(3, GL_FLOAT, stride, ptr);
27943+ glNormalPointer(GL_FLOAT, stride, ptr + 3 * sizeof(float));
27944+ if (isColorEnabled)
27945+ glColorPointer(4, GL_UNSIGNED_BYTE, stride,
27946+ ptr + 6 * sizeof(float));
27947+ glDrawArrays(mode, 0, count);
27948+ break;
27949+ }
27950+
27951+ case glVertexNormalColorPointerInterlaced_fake_func:
27952+ {
27953+ int i = 0;
27954+ int offset = args[i++];
27955+ int vertexPointerSize = args[i++];
27956+ int vertexPointerType = args[i++];
27957+ int stride = args[i++];
27958+ int normalPointerOffset = args[i++];
27959+ int normalPointerType = args[i++];
27960+ int colorPointerOffset = args[i++];
27961+ int colorPointerSize = args[i++];
27962+ int colorPointerType = args[i++];
27963+ int bytes_size = args[i++];
27964+ void *ptr = (void *) args[i++];
27965+
27966+ process->current_state->vertexPointerSize =
27967+ MAX(process->current_state->vertexPointerSize,
27968+ offset + bytes_size);
27969+ process->current_state->vertexPointer =
27970+ realloc(process->current_state->vertexPointer,
27971+ process->current_state->vertexPointerSize);
27972+ memcpy(process->current_state->vertexPointer + offset, ptr,
27973+ bytes_size);
27974+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
27975+ process->current_state->vertexPointer);
27976+ glNormalPointer(normalPointerType, stride,
27977+ process->current_state->vertexPointer +
27978+ normalPointerOffset);
27979+ glColorPointer(colorPointerSize, colorPointerType, stride,
27980+ process->current_state->vertexPointer +
27981+ colorPointerOffset);
27982+ break;
27983+ }
27984+
27985+ case glVertexColorTexCoord0PointerInterlaced_fake_func:
27986+ {
27987+ int i = 0;
27988+ int offset = args[i++];
27989+ int vertexPointerSize = args[i++];
27990+ int vertexPointerType = args[i++];
27991+ int stride = args[i++];
27992+ int colorPointerOffset = args[i++];
27993+ int colorPointerSize = args[i++];
27994+ int colorPointerType = args[i++];
27995+ int texCoord0PointerOffset = args[i++];
27996+ int texCoord0PointerSize = args[i++];
27997+ int texCoord0PointerType = args[i++];
27998+ int bytes_size = args[i++];
27999+ void *ptr = (void *) args[i++];
28000+
28001+ process->current_state->vertexPointerSize =
28002+ MAX(process->current_state->vertexPointerSize,
28003+ offset + bytes_size);
28004+ process->current_state->vertexPointer =
28005+ realloc(process->current_state->vertexPointer,
28006+ process->current_state->vertexPointerSize);
28007+ memcpy(process->current_state->vertexPointer + offset, ptr,
28008+ bytes_size);
28009+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28010+ process->current_state->vertexPointer);
28011+ glColorPointer(colorPointerSize, colorPointerType, stride,
28012+ process->current_state->vertexPointer +
28013+ colorPointerOffset);
28014+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28015+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28016+ stride,
28017+ process->current_state->vertexPointer +
28018+ texCoord0PointerOffset);
28019+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28020+ process->current_state->
28021+ activeTextureIndex);
28022+ break;
28023+ }
28024+
28025+ case glVertexNormalTexCoord0PointerInterlaced_fake_func:
28026+ {
28027+ int i = 0;
28028+ int offset = args[i++];
28029+ int vertexPointerSize = args[i++];
28030+ int vertexPointerType = args[i++];
28031+ int stride = args[i++];
28032+ int normalPointerOffset = args[i++];
28033+ int normalPointerType = args[i++];
28034+ int texCoord0PointerOffset = args[i++];
28035+ int texCoord0PointerSize = args[i++];
28036+ int texCoord0PointerType = args[i++];
28037+ int bytes_size = args[i++];
28038+ void *ptr = (void *) args[i++];
28039+
28040+ process->current_state->vertexPointerSize =
28041+ MAX(process->current_state->vertexPointerSize,
28042+ offset + bytes_size);
28043+ process->current_state->vertexPointer =
28044+ realloc(process->current_state->vertexPointer,
28045+ process->current_state->vertexPointerSize);
28046+ memcpy(process->current_state->vertexPointer + offset, ptr,
28047+ bytes_size);
28048+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28049+ process->current_state->vertexPointer);
28050+ glNormalPointer(normalPointerType, stride,
28051+ process->current_state->vertexPointer +
28052+ normalPointerOffset);
28053+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28054+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28055+ stride,
28056+ process->current_state->vertexPointer +
28057+ texCoord0PointerOffset);
28058+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28059+ process->current_state->
28060+ activeTextureIndex);
28061+ break;
28062+ }
28063+
28064+ case glVertexNormalTexCoord01PointerInterlaced_fake_func:
28065+ {
28066+ int i = 0;
28067+ int offset = args[i++];
28068+ int vertexPointerSize = args[i++];
28069+ int vertexPointerType = args[i++];
28070+ int stride = args[i++];
28071+ int normalPointerOffset = args[i++];
28072+ int normalPointerType = args[i++];
28073+ int texCoord0PointerOffset = args[i++];
28074+ int texCoord0PointerSize = args[i++];
28075+ int texCoord0PointerType = args[i++];
28076+ int texCoord1PointerOffset = args[i++];
28077+ int texCoord1PointerSize = args[i++];
28078+ int texCoord1PointerType = args[i++];
28079+ int bytes_size = args[i++];
28080+ void *ptr = (void *) args[i++];
28081+
28082+ process->current_state->vertexPointerSize =
28083+ MAX(process->current_state->vertexPointerSize,
28084+ offset + bytes_size);
28085+ process->current_state->vertexPointer =
28086+ realloc(process->current_state->vertexPointer,
28087+ process->current_state->vertexPointerSize);
28088+ memcpy(process->current_state->vertexPointer + offset, ptr,
28089+ bytes_size);
28090+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28091+ process->current_state->vertexPointer);
28092+ glNormalPointer(normalPointerType, stride,
28093+ process->current_state->vertexPointer +
28094+ normalPointerOffset);
28095+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28096+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28097+ stride,
28098+ process->current_state->vertexPointer +
28099+ texCoord0PointerOffset);
28100+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
28101+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
28102+ stride,
28103+ process->current_state->vertexPointer +
28104+ texCoord1PointerOffset);
28105+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28106+ process->current_state->
28107+ activeTextureIndex);
28108+ break;
28109+ }
28110+
28111+ case glVertexNormalTexCoord012PointerInterlaced_fake_func:
28112+ {
28113+ int i = 0;
28114+ int offset = args[i++];
28115+ int vertexPointerSize = args[i++];
28116+ int vertexPointerType = args[i++];
28117+ int stride = args[i++];
28118+ int normalPointerOffset = args[i++];
28119+ int normalPointerType = args[i++];
28120+ int texCoord0PointerOffset = args[i++];
28121+ int texCoord0PointerSize = args[i++];
28122+ int texCoord0PointerType = args[i++];
28123+ int texCoord1PointerOffset = args[i++];
28124+ int texCoord1PointerSize = args[i++];
28125+ int texCoord1PointerType = args[i++];
28126+ int texCoord2PointerOffset = args[i++];
28127+ int texCoord2PointerSize = args[i++];
28128+ int texCoord2PointerType = args[i++];
28129+ int bytes_size = args[i++];
28130+ void *ptr = (void *) args[i++];
28131+
28132+ process->current_state->vertexPointerSize =
28133+ MAX(process->current_state->vertexPointerSize,
28134+ offset + bytes_size);
28135+ process->current_state->vertexPointer =
28136+ realloc(process->current_state->vertexPointer,
28137+ process->current_state->vertexPointerSize);
28138+ memcpy(process->current_state->vertexPointer + offset, ptr,
28139+ bytes_size);
28140+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28141+ process->current_state->vertexPointer);
28142+ glNormalPointer(normalPointerType, stride,
28143+ process->current_state->vertexPointer +
28144+ normalPointerOffset);
28145+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28146+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28147+ stride,
28148+ process->current_state->vertexPointer +
28149+ texCoord0PointerOffset);
28150+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
28151+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
28152+ stride,
28153+ process->current_state->vertexPointer +
28154+ texCoord1PointerOffset);
28155+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
28156+ glTexCoordPointer(texCoord2PointerSize, texCoord2PointerType,
28157+ stride,
28158+ process->current_state->vertexPointer +
28159+ texCoord2PointerOffset);
28160+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28161+ process->current_state->
28162+ activeTextureIndex);
28163+ break;
28164+ }
28165+
28166+ case glVertexNormalColorTexCoord0PointerInterlaced_fake_func:
28167+ {
28168+ int i = 0;
28169+ int offset = args[i++];
28170+ int vertexPointerSize = args[i++];
28171+ int vertexPointerType = args[i++];
28172+ int stride = args[i++];
28173+ int normalPointerOffset = args[i++];
28174+ int normalPointerType = args[i++];
28175+ int colorPointerOffset = args[i++];
28176+ int colorPointerSize = args[i++];
28177+ int colorPointerType = args[i++];
28178+ int texCoord0PointerOffset = args[i++];
28179+ int texCoord0PointerSize = args[i++];
28180+ int texCoord0PointerType = args[i++];
28181+ int bytes_size = args[i++];
28182+ void *ptr = (void *) args[i++];
28183+
28184+ process->current_state->vertexPointerSize =
28185+ MAX(process->current_state->vertexPointerSize,
28186+ offset + bytes_size);
28187+ process->current_state->vertexPointer =
28188+ realloc(process->current_state->vertexPointer,
28189+ process->current_state->vertexPointerSize);
28190+ memcpy(process->current_state->vertexPointer + offset, ptr,
28191+ bytes_size);
28192+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28193+ process->current_state->vertexPointer);
28194+ glNormalPointer(normalPointerType, stride,
28195+ process->current_state->vertexPointer +
28196+ normalPointerOffset);
28197+ glColorPointer(colorPointerSize, colorPointerType, stride,
28198+ process->current_state->vertexPointer +
28199+ colorPointerOffset);
28200+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28201+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28202+ stride,
28203+ process->current_state->vertexPointer +
28204+ texCoord0PointerOffset);
28205+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28206+ process->current_state->
28207+ activeTextureIndex);
28208+ break;
28209+ }
28210+
28211+ case glVertexNormalColorTexCoord01PointerInterlaced_fake_func:
28212+ {
28213+ int i = 0;
28214+ int offset = args[i++];
28215+ int vertexPointerSize = args[i++];
28216+ int vertexPointerType = args[i++];
28217+ int stride = args[i++];
28218+ int normalPointerOffset = args[i++];
28219+ int normalPointerType = args[i++];
28220+ int colorPointerOffset = args[i++];
28221+ int colorPointerSize = args[i++];
28222+ int colorPointerType = args[i++];
28223+ int texCoord0PointerOffset = args[i++];
28224+ int texCoord0PointerSize = args[i++];
28225+ int texCoord0PointerType = args[i++];
28226+ int texCoord1PointerOffset = args[i++];
28227+ int texCoord1PointerSize = args[i++];
28228+ int texCoord1PointerType = args[i++];
28229+ int bytes_size = args[i++];
28230+ void *ptr = (void *) args[i++];
28231+
28232+ process->current_state->vertexPointerSize =
28233+ MAX(process->current_state->vertexPointerSize,
28234+ offset + bytes_size);
28235+ process->current_state->vertexPointer =
28236+ realloc(process->current_state->vertexPointer,
28237+ process->current_state->vertexPointerSize);
28238+ memcpy(process->current_state->vertexPointer + offset, ptr,
28239+ bytes_size);
28240+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28241+ process->current_state->vertexPointer);
28242+ glNormalPointer(normalPointerType, stride,
28243+ process->current_state->vertexPointer +
28244+ normalPointerOffset);
28245+ glColorPointer(colorPointerSize, colorPointerType, stride,
28246+ process->current_state->vertexPointer +
28247+ colorPointerOffset);
28248+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28249+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28250+ stride,
28251+ process->current_state->vertexPointer +
28252+ texCoord0PointerOffset);
28253+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
28254+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
28255+ stride,
28256+ process->current_state->vertexPointer +
28257+ texCoord1PointerOffset);
28258+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28259+ process->current_state->
28260+ activeTextureIndex);
28261+ break;
28262+ }
28263+
28264+ case glVertexNormalColorTexCoord012PointerInterlaced_fake_func:
28265+ {
28266+ int i = 0;
28267+ int offset = args[i++];
28268+ int vertexPointerSize = args[i++];
28269+ int vertexPointerType = args[i++];
28270+ int stride = args[i++];
28271+ int normalPointerOffset = args[i++];
28272+ int normalPointerType = args[i++];
28273+ int colorPointerOffset = args[i++];
28274+ int colorPointerSize = args[i++];
28275+ int colorPointerType = args[i++];
28276+ int texCoord0PointerOffset = args[i++];
28277+ int texCoord0PointerSize = args[i++];
28278+ int texCoord0PointerType = args[i++];
28279+ int texCoord1PointerOffset = args[i++];
28280+ int texCoord1PointerSize = args[i++];
28281+ int texCoord1PointerType = args[i++];
28282+ int texCoord2PointerOffset = args[i++];
28283+ int texCoord2PointerSize = args[i++];
28284+ int texCoord2PointerType = args[i++];
28285+ int bytes_size = args[i++];
28286+ void *ptr = (void *) args[i++];
28287+
28288+ process->current_state->vertexPointerSize =
28289+ MAX(process->current_state->vertexPointerSize,
28290+ offset + bytes_size);
28291+ process->current_state->vertexPointer =
28292+ realloc(process->current_state->vertexPointer,
28293+ process->current_state->vertexPointerSize);
28294+ memcpy(process->current_state->vertexPointer + offset, ptr,
28295+ bytes_size);
28296+ glVertexPointer(vertexPointerSize, vertexPointerType, stride,
28297+ process->current_state->vertexPointer);
28298+ glNormalPointer(normalPointerType, stride,
28299+ process->current_state->vertexPointer +
28300+ normalPointerOffset);
28301+ glColorPointer(colorPointerSize, colorPointerType, stride,
28302+ process->current_state->vertexPointer +
28303+ colorPointerOffset);
28304+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 0);
28305+ glTexCoordPointer(texCoord0PointerSize, texCoord0PointerType,
28306+ stride,
28307+ process->current_state->vertexPointer +
28308+ texCoord0PointerOffset);
28309+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 1);
28310+ glTexCoordPointer(texCoord1PointerSize, texCoord1PointerType,
28311+ stride,
28312+ process->current_state->vertexPointer +
28313+ texCoord1PointerOffset);
28314+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB + 2);
28315+ glTexCoordPointer(texCoord2PointerSize, texCoord2PointerType,
28316+ stride,
28317+ process->current_state->vertexPointer +
28318+ texCoord2PointerOffset);
28319+ do_glClientActiveTextureARB(GL_TEXTURE0_ARB +
28320+ process->current_state->
28321+ activeTextureIndex);
28322+ break;
28323+ }
28324+
28325+ case _glVertexPointer_buffer_func:
28326+ {
28327+ glVertexPointer(args[0], args[1], args[2], (void *) args[3]);
28328+ break;
28329+ }
28330+
28331+ case _glNormalPointer_buffer_func:
28332+ {
28333+ glNormalPointer(args[0], args[1], (void *) args[2]);
28334+ break;
28335+ }
28336+
28337+ case _glColorPointer_buffer_func:
28338+ {
28339+ glColorPointer(args[0], args[1], args[2], (void *) args[3]);
28340+ break;
28341+ }
28342+
28343+ case _glSecondaryColorPointer_buffer_func:
28344+ {
28345+ GET_EXT_PTR(void, glSecondaryColorPointer,
28346+ (int, int, int, void *));
28347+ ptr_func_glSecondaryColorPointer(args[0], args[1], args[2],
28348+ (void *) args[3]);
28349+ break;
28350+ }
28351+
28352+ case _glIndexPointer_buffer_func:
28353+ {
28354+ glIndexPointer(args[0], args[1], (void *) args[2]);
28355+ break;
28356+ }
28357+
28358+ case _glTexCoordPointer_buffer_func:
28359+ {
28360+ glTexCoordPointer(args[0], args[1], args[2], (void *) args[3]);
28361+ break;
28362+ }
28363+
28364+ case _glEdgeFlagPointer_buffer_func:
28365+ {
28366+ glEdgeFlagPointer(args[0], (void *) args[1]);
28367+ break;
28368+ }
28369+
28370+ case _glVertexAttribPointerARB_buffer_func:
28371+ {
28372+ GET_EXT_PTR(void, glVertexAttribPointerARB,
28373+ (int, int, int, int, int, void *));
28374+ ptr_func_glVertexAttribPointerARB(args[0], args[1], args[2],
28375+ args[3], args[4],
28376+ (void *) args[5]);
28377+ break;
28378+ }
28379+
28380+ case _glWeightPointerARB_buffer_func:
28381+ {
28382+ GET_EXT_PTR(void, glWeightPointerARB, (int, int, int, void *));
28383+
28384+ ptr_func_glWeightPointerARB(args[0], args[1], args[2],
28385+ (void *) args[3]);
28386+ break;
28387+ }
28388+
28389+ case _glMatrixIndexPointerARB_buffer_func:
28390+ {
28391+ GET_EXT_PTR(void, glMatrixIndexPointerARB,
28392+ (int, int, int, void *));
28393+ ptr_func_glMatrixIndexPointerARB(args[0], args[1], args[2],
28394+ (void *) args[3]);
28395+ break;
28396+ }
28397+
28398+ case _glFogCoordPointer_buffer_func:
28399+ {
28400+ GET_EXT_PTR(void, glFogCoordPointer, (int, int, void *));
28401+
28402+ ptr_func_glFogCoordPointer(args[0], args[1], (void *) args[2]);
28403+ break;
28404+ }
28405+
28406+ case _glVariantPointerEXT_buffer_func:
28407+ {
28408+ GET_EXT_PTR(void, glVariantPointerEXT, (int, int, int, void *));
28409+
28410+ ptr_func_glVariantPointerEXT(args[0], args[1], args[2],
28411+ (void *) args[3]);
28412+ break;
28413+ }
28414+
28415+ case _glDrawElements_buffer_func:
28416+ {
28417+ glDrawElements(args[0], args[1], args[2], (void *) args[3]);
28418+ break;
28419+ }
28420+
28421+ case _glDrawRangeElements_buffer_func:
28422+ {
28423+ glDrawRangeElements(args[0], args[1], args[2], args[3], args[4],
28424+ (void *) args[5]);
28425+ break;
28426+ }
28427+
28428+ case _glMultiDrawElements_buffer_func:
28429+ {
28430+ GET_EXT_PTR(void, glMultiDrawElements,
28431+ (int, int *, int, void **, int));
28432+ ptr_func_glMultiDrawElements(args[0], (int *) args[1], args[2],
28433+ (void **) args[3], args[4]);
28434+ break;
28435+ }
28436+
28437+ case _glGetError_fake_func:
28438+ {
28439+ break;
28440+ }
28441+
28442+ case glGetIntegerv_func:
28443+ {
28444+ glGetIntegerv(args[0], (int *) args[1]);
28445+ fprintf(stderr, "glGetIntegerv(%x)=%d\n", (int) args[0],
28446+ *(int *) args[1]);
28447+ break;
28448+ }
28449+
28450+ case _glReadPixels_pbo_func:
28451+ {
28452+ glReadPixels(ARG_TO_INT(args[0]), ARG_TO_INT(args[1]),
28453+ ARG_TO_INT(args[2]), ARG_TO_INT(args[3]),
28454+ ARG_TO_UNSIGNED_INT(args[4]),
28455+ ARG_TO_UNSIGNED_INT(args[5]), (void *) (args[6]));
28456+ break;
28457+ }
28458+
28459+ case _glDrawPixels_pbo_func:
28460+ {
28461+ glDrawPixels(ARG_TO_INT(args[0]), ARG_TO_INT(args[1]),
28462+ ARG_TO_UNSIGNED_INT(args[2]),
28463+ ARG_TO_UNSIGNED_INT(args[3]),
28464+ (const void *) (args[4]));
28465+ break;
28466+ }
28467+
28468+ case _glMapBufferARB_fake_func:
28469+ {
28470+ GET_EXT_PTR(GLvoid *, glMapBufferARB, (GLenum, GLenum));
28471+ GET_EXT_PTR(GLboolean, glUnmapBufferARB, (GLenum));
28472+ int target = args[0];
28473+ int size = args[1];
28474+ void *dst_ptr = (void *) args[2];
28475+ void *src_ptr = ptr_func_glMapBufferARB(target, GL_READ_ONLY);
28476+
28477+ if (src_ptr) {
28478+ memcpy(dst_ptr, src_ptr, size);
28479+ ret_int = ptr_func_glUnmapBufferARB(target);
28480+ } else {
28481+ ret_int = 0;
28482+ }
28483+ break;
28484+ }
28485+
28486+ case fake_gluBuild2DMipmaps_func:
28487+ {
28488+ GET_GLU_PTR(GLint, gluBuild2DMipmaps,
28489+ (GLenum arg_0, GLint arg_1, GLsizei arg_2,
28490+ GLsizei arg_3, GLenum arg_4, GLenum arg_5,
28491+ const GLvoid *arg_6));
28492+ if (ptr_func_gluBuild2DMipmaps == NULL)
28493+ ptr_func_gluBuild2DMipmaps = mesa_gluBuild2DMipmaps;
28494+ ptr_func_gluBuild2DMipmaps(ARG_TO_UNSIGNED_INT(args[0]),
28495+ ARG_TO_INT(args[1]),
28496+ ARG_TO_INT(args[2]),
28497+ ARG_TO_INT(args[3]),
28498+ ARG_TO_UNSIGNED_INT(args[4]),
28499+ ARG_TO_UNSIGNED_INT(args[5]),
28500+ (const void *) (args[6]));
28501+ break;
28502+ }
28503+
28504+ case _glSelectBuffer_fake_func:
28505+ {
28506+ process->current_state->selectBufferSize = args[0] * 4;
28507+ process->current_state->selectBufferPtr =
28508+ realloc(process->current_state->selectBufferPtr,
28509+ process->current_state->selectBufferSize);
28510+ glSelectBuffer(args[0], process->current_state->selectBufferPtr);
28511+ break;
28512+ }
28513+
28514+ case _glGetSelectBuffer_fake_func:
28515+ {
28516+ void *ptr = (void *) args[0];
28517+
28518+ memcpy(ptr, process->current_state->selectBufferPtr,
28519+ process->current_state->selectBufferSize);
28520+ break;
28521+ }
28522+
28523+ case _glFeedbackBuffer_fake_func:
28524+ {
28525+ process->current_state->feedbackBufferSize = args[0] * 4;
28526+ process->current_state->feedbackBufferPtr =
28527+ realloc(process->current_state->feedbackBufferPtr,
28528+ process->current_state->feedbackBufferSize);
28529+ glFeedbackBuffer(args[0], args[1],
28530+ process->current_state->feedbackBufferPtr);
28531+ break;
28532+ }
28533+
28534+ case _glGetFeedbackBuffer_fake_func:
28535+ {
28536+ void *ptr = (void *) args[0];
28537+
28538+ memcpy(ptr, process->current_state->feedbackBufferPtr,
28539+ process->current_state->feedbackBufferSize);
28540+ break;
28541+ }
28542+
28543+ /*
28544+ * case glEnableClientState_func: { if (display_function_call)
28545+ * fprintf(stderr, "cap : %s\n", nameArrays[args[0] -
28546+ * GL_VERTEX_ARRAY]); glEnableClientState(args[0]); break; }
28547+ *
28548+ * case glDisableClientState_func: { if (display_function_call)
28549+ * fprintf(stderr, "cap : %s\n", nameArrays[args[0] -
28550+ * GL_VERTEX_ARRAY]); glDisableClientState(args[0]); break; }
28551+ *
28552+ * case glClientActiveTexture_func: case
28553+ * glClientActiveTextureARB_func: { if (display_function_call)
28554+ * fprintf(stderr, "client activeTexture %d\n", args[0] -
28555+ * GL_TEXTURE0_ARB); glClientActiveTextureARB(args[0]); break; }
28556+ *
28557+ * case glActiveTextureARB_func: { if (display_function_call)
28558+ * fprintf(stderr, "server activeTexture %d\n", args[0] -
28559+ * GL_TEXTURE0_ARB); glActiveTextureARB(args[0]); break; }
28560+ *
28561+ * case glLockArraysEXT_func: break;
28562+ *
28563+ * case glUnlockArraysEXT_func: break;
28564+ *
28565+ * case glArrayElement_func: { glArrayElement(args[0]); break; }
28566+ *
28567+ * case glDrawArrays_func: { glDrawArrays(args[0],args[1],args[2]);
28568+ * break; }
28569+ *
28570+ * case glDrawElements_func: {
28571+ * glDrawElements(args[0],args[1],args[2],(void*)args[3]); break; }
28572+ *
28573+ * case glDrawRangeElements_func: {
28574+ * glDrawRangeElements(args[0],args[1],args[2],args[3],args[4],(void*)args[5]);
28575+ * break; } */
28576+
28577+ case glGetError_func:
28578+ {
28579+#ifdef SYSTEMATIC_ERROR_CHECK
28580+ ret_int = process->current_state->last_error;
28581+#else
28582+ ret_int = glGetError();
28583+#endif
28584+ break;
28585+ }
28586+
28587+ case glNewObjectBufferATI_func:
28588+ {
28589+ GET_EXT_PTR(int, glNewObjectBufferATI, (int, void *, int));
28590+
28591+ ret_int = ptr_func_glNewObjectBufferATI(args[0],
28592+ (void *) args[1], args[2]);
28593+ break;
28594+ }
28595+
28596+ case glClear_func:
28597+ /* HACK workaround for an unexplainable issue */
28598+ if (args[0] & GL_COLOR_BUFFER_BIT)
28599+ glClear(GL_COLOR_BUFFER_BIT);
28600+ if (args[0] & GL_STENCIL_BUFFER_BIT)
28601+ glClear(GL_STENCIL_BUFFER_BIT);
28602+ if (args[0] & GL_DEPTH_BUFFER_BIT)
28603+ glClear(GL_DEPTH_BUFFER_BIT);
28604+ if (args[0] & GL_ACCUM_BUFFER_BIT)
28605+ glClear(GL_ACCUM_BUFFER_BIT);
28606+ break;
28607+
28608+ default:
28609+ execute_func(func_number, args, &ret_int, &ret_char);
28610+ break;
28611+ }
28612+
28613+#ifdef SYSTEMATIC_ERROR_CHECK
28614+ if (func_number == glGetError_func) {
28615+ process->current_state->last_error = 0;
28616+ } else {
28617+ process->current_state->last_error = glGetError();
28618+ if (process->current_state->last_error != 0) {
28619+ printf("error %s 0x%x\n", tab_opengl_calls_name[func_number],
28620+ process->current_state->last_error);
28621+ }
28622+ }
28623+#endif
28624+
28625+ switch (ret_type) {
28626+ case TYPE_NONE:
28627+ break;
28628+
28629+ case TYPE_CHAR:
28630+ case TYPE_UNSIGNED_CHAR:
28631+ ret_int = ret_char;
28632+ break;
28633+
28634+ case TYPE_INT:
28635+ case TYPE_UNSIGNED_INT:
28636+ break;
28637+
28638+ case TYPE_CONST_CHAR:
28639+ {
28640+ strncpy(ret_string, (ret_str) ? ret_str : "", 32768);
28641+ break;
28642+ }
28643+
28644+ default:
28645+ fprintf(stderr, "unexpected ret type : %d\n", ret_type);
28646+ exit(-1);
28647+ break;
28648+ }
28649+
28650+ if (display_function_call)
28651+ fprintf(stderr, "[%d]< %s\n", process->instr_counter,
28652+ tab_opengl_calls_name[func_number]);
28653+
28654+ return ret_int;
28655+}
28656Index: qemu-0.12.4/target-i386/opengl_func.h
28657===================================================================
28658--- /dev/null
28659+++ qemu-0.12.4/target-i386/opengl_func.h
28660@@ -0,0 +1,1108 @@
28661+/*
28662+ * Main header for both host and guest sides
28663+ *
28664+ * Copyright (c) 2006,2007 Even Rouault
28665+ *
28666+ * Permission is hereby granted, free of charge, to any person obtaining a copy
28667+ * of this software and associated documentation files (the "Software"), to deal
28668+ * in the Software without restriction, including without limitation the rights
28669+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
28670+ * copies of the Software, and to permit persons to whom the Software is
28671+ * furnished to do so, subject to the following conditions:
28672+ *
28673+ * The above copyright notice and this permission notice shall be included in
28674+ * all copies or substantial portions of the Software.
28675+ *
28676+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28677+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28678+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
28679+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28680+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28681+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28682+ * THE SOFTWARE.
28683+ */
28684+
28685+#include "mesa_gl.h"
28686+#include "mesa_glext.h"
28687+
28688+/* Argument list are internally of a type that can hold a target pointer
28689+ * or a host pointer. */
28690+typedef target_phys_addr_t arg_t;
28691+
28692+enum {
28693+ TYPE_NONE,
28694+ TYPE_CHAR,
28695+ TYPE_UNSIGNED_CHAR,
28696+ TYPE_SHORT,
28697+ TYPE_UNSIGNED_SHORT,
28698+ TYPE_INT,
28699+ TYPE_UNSIGNED_INT,
28700+ TYPE_FLOAT,
28701+ TYPE_DOUBLE,
28702+ TYPE_1CHAR,
28703+ TYPE_2CHAR,
28704+ TYPE_3CHAR,
28705+ TYPE_4CHAR,
28706+ TYPE_128UCHAR,
28707+ TYPE_1SHORT,
28708+ TYPE_2SHORT,
28709+ TYPE_3SHORT,
28710+ TYPE_4SHORT,
28711+ TYPE_1INT,
28712+ TYPE_2INT,
28713+ TYPE_3INT,
28714+ TYPE_4INT,
28715+ TYPE_1FLOAT,
28716+ TYPE_2FLOAT,
28717+ TYPE_3FLOAT,
28718+ TYPE_4FLOAT,
28719+ TYPE_16FLOAT,
28720+ TYPE_1DOUBLE,
28721+ TYPE_2DOUBLE,
28722+ TYPE_3DOUBLE,
28723+ TYPE_4DOUBLE,
28724+ TYPE_16DOUBLE,
28725+ TYPE_OUT_1INT,
28726+ TYPE_OUT_1FLOAT,
28727+ TYPE_OUT_4CHAR,
28728+ TYPE_OUT_4INT,
28729+ TYPE_OUT_4FLOAT,
28730+ TYPE_OUT_4DOUBLE,
28731+ TYPE_OUT_128UCHAR,
28732+ TYPE_CONST_CHAR,
28733+ TYPE_ARRAY_CHAR,
28734+ TYPE_ARRAY_SHORT,
28735+ TYPE_ARRAY_INT,
28736+ TYPE_ARRAY_FLOAT,
28737+ TYPE_ARRAY_DOUBLE,
28738+ TYPE_IN_IGNORED_POINTER,
28739+ TYPE_OUT_ARRAY_CHAR,
28740+ TYPE_OUT_ARRAY_SHORT,
28741+ TYPE_OUT_ARRAY_INT,
28742+ TYPE_OUT_ARRAY_FLOAT,
28743+ TYPE_OUT_ARRAY_DOUBLE,
28744+ TYPE_NULL_TERMINATED_STRING,
28745+
28746+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28747+ TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28748+ TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28749+ TYPE_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28750+ TYPE_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28751+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28752+ TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28753+ TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28754+ TYPE_OUT_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28755+ TYPE_OUT_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28756+ /* .... */
28757+ TYPE_LAST,
28758+ /* .... */
28759+ TYPE_1UCHAR = TYPE_CHAR,
28760+ TYPE_1USHORT = TYPE_1SHORT,
28761+ TYPE_1UINT = TYPE_1INT,
28762+ TYPE_OUT_1UINT = TYPE_OUT_1INT,
28763+ TYPE_OUT_4UCHAR = TYPE_OUT_4CHAR,
28764+ TYPE_ARRAY_VOID = TYPE_ARRAY_CHAR,
28765+ TYPE_ARRAY_SIGNED_CHAR = TYPE_ARRAY_CHAR,
28766+ TYPE_ARRAY_UNSIGNED_CHAR = TYPE_ARRAY_CHAR,
28767+ TYPE_ARRAY_UNSIGNED_SHORT = TYPE_ARRAY_SHORT,
28768+ TYPE_ARRAY_UNSIGNED_INT = TYPE_ARRAY_INT,
28769+ TYPE_OUT_ARRAY_VOID = TYPE_OUT_ARRAY_CHAR,
28770+ TYPE_OUT_ARRAY_SIGNED_CHAR = TYPE_OUT_ARRAY_CHAR,
28771+ TYPE_OUT_ARRAY_UNSIGNED_CHAR = TYPE_OUT_ARRAY_CHAR,
28772+ TYPE_OUT_ARRAY_UNSIGNED_SHORT = TYPE_OUT_ARRAY_SHORT,
28773+ TYPE_OUT_ARRAY_UNSIGNED_INT = TYPE_OUT_ARRAY_INT,
28774+ TYPE_ARRAY_VOID_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28775+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28776+ TYPE_ARRAY_SIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28777+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28778+ TYPE_ARRAY_UNSIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28779+ TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28780+ TYPE_ARRAY_UNSIGNED_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28781+ TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28782+ TYPE_ARRAY_UNSIGNED_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28783+ TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28784+ TYPE_OUT_ARRAY_VOID_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28785+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28786+ TYPE_OUT_ARRAY_SIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28787+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28788+ TYPE_OUT_ARRAY_UNSIGNED_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28789+ TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28790+ TYPE_OUT_ARRAY_UNSIGNED_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28791+ TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28792+ TYPE_OUT_ARRAY_UNSIGNED_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS =
28793+ TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS,
28794+};
28795+
28796+#define CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS \
28797+ case TYPE_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28798+ case TYPE_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28799+ case TYPE_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28800+ case TYPE_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28801+ case TYPE_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28802+
28803+#define CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS \
28804+ case TYPE_OUT_ARRAY_CHAR_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28805+ case TYPE_OUT_ARRAY_SHORT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28806+ case TYPE_OUT_ARRAY_INT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28807+ case TYPE_OUT_ARRAY_FLOAT_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS: \
28808+ case TYPE_OUT_ARRAY_DOUBLE_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28809+
28810+#define CASE_IN_UNKNOWN_SIZE_POINTERS \
28811+ case TYPE_ARRAY_CHAR: \
28812+ case TYPE_ARRAY_SHORT: \
28813+ case TYPE_ARRAY_INT: \
28814+ case TYPE_ARRAY_FLOAT: \
28815+ case TYPE_ARRAY_DOUBLE
28816+
28817+#define CASE_IN_KNOWN_SIZE_POINTERS \
28818+ case TYPE_1CHAR:\
28819+ case TYPE_2CHAR:\
28820+ case TYPE_3CHAR:\
28821+ case TYPE_4CHAR:\
28822+ case TYPE_128UCHAR:\
28823+ case TYPE_1SHORT:\
28824+ case TYPE_2SHORT:\
28825+ case TYPE_3SHORT:\
28826+ case TYPE_4SHORT:\
28827+ case TYPE_1INT:\
28828+ case TYPE_2INT:\
28829+ case TYPE_3INT:\
28830+ case TYPE_4INT:\
28831+ case TYPE_1FLOAT:\
28832+ case TYPE_2FLOAT:\
28833+ case TYPE_3FLOAT:\
28834+ case TYPE_4FLOAT:\
28835+ case TYPE_16FLOAT:\
28836+ case TYPE_1DOUBLE:\
28837+ case TYPE_2DOUBLE:\
28838+ case TYPE_3DOUBLE:\
28839+ case TYPE_4DOUBLE:\
28840+ case TYPE_16DOUBLE
28841+
28842+#define CASE_OUT_UNKNOWN_SIZE_POINTERS \
28843+ case TYPE_OUT_ARRAY_CHAR: \
28844+ case TYPE_OUT_ARRAY_SHORT: \
28845+ case TYPE_OUT_ARRAY_INT: \
28846+ case TYPE_OUT_ARRAY_FLOAT: \
28847+ case TYPE_OUT_ARRAY_DOUBLE
28848+
28849+#define CASE_OUT_KNOWN_SIZE_POINTERS \
28850+ case TYPE_OUT_1INT: \
28851+ case TYPE_OUT_1FLOAT: \
28852+ case TYPE_OUT_4CHAR: \
28853+ case TYPE_OUT_4INT: \
28854+ case TYPE_OUT_4FLOAT: \
28855+ case TYPE_OUT_4DOUBLE: \
28856+ case TYPE_OUT_128UCHAR \
28857+
28858+#define CASE_IN_POINTERS CASE_IN_UNKNOWN_SIZE_POINTERS: CASE_IN_KNOWN_SIZE_POINTERS: CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28859+#define CASE_OUT_POINTERS CASE_OUT_UNKNOWN_SIZE_POINTERS: CASE_OUT_KNOWN_SIZE_POINTERS: CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS
28860+
28861+#define CASE_POINTERS CASE_IN_POINTERS: CASE_OUT_POINTERS
28862+#define CASE_KNOWN_SIZE_POINTERS CASE_IN_KNOWN_SIZE_POINTERS: CASE_OUT_KNOWN_SIZE_POINTERS
28863+
28864+
28865+#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)
28866+#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)
28867+#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)
28868+#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)
28869+#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)
28870+
28871+#define NB_MAX_TEXTURES 16
28872+#define MY_GL_MAX_VERTEX_ATTRIBS_ARB 16
28873+#define MY_GL_MAX_VERTEX_ATTRIBS_NV 16
28874+#define MY_GL_MAX_VARIANT_POINTER_EXT 16
28875+
28876+static int tab_args_type_length[] = {
28877+ 0,
28878+ sizeof(char),
28879+ sizeof(unsigned char),
28880+ sizeof(short),
28881+ sizeof(unsigned short),
28882+ sizeof(int),
28883+ sizeof(unsigned int),
28884+ sizeof(float),
28885+ sizeof(double),
28886+ 1 * sizeof(char),
28887+ 2 * sizeof(char),
28888+ 3 * sizeof(char),
28889+ 4 * sizeof(char),
28890+ 128 * sizeof(char),
28891+ 1 * sizeof(short),
28892+ 2 * sizeof(short),
28893+ 3 * sizeof(short),
28894+ 4 * sizeof(short),
28895+ 1 * sizeof(int),
28896+ 2 * sizeof(int),
28897+ 3 * sizeof(int),
28898+ 4 * sizeof(int),
28899+ 1 * sizeof(float),
28900+ 2 * sizeof(float),
28901+ 3 * sizeof(float),
28902+ 4 * sizeof(float),
28903+ 16 * sizeof(float),
28904+ 1 * sizeof(double),
28905+ 2 * sizeof(double),
28906+ 3 * sizeof(double),
28907+ 4 * sizeof(double),
28908+ 16 * sizeof(double),
28909+ sizeof(int),
28910+ sizeof(float),
28911+ 4 * sizeof(char),
28912+ 4 * sizeof(int),
28913+ 4 * sizeof(float),
28914+ 4 * sizeof(double),
28915+ 128 * sizeof(char),
28916+ 0,
28917+ 0,
28918+ 0,
28919+ 0,
28920+ 0,
28921+ 0,
28922+ 0,
28923+ 0,
28924+ 0,
28925+ 0,
28926+ 0,
28927+ 0,
28928+ 0,
28929+
28930+ /* the following sizes are the size of 1 element of the array */
28931+ sizeof(char),
28932+ sizeof(short),
28933+ sizeof(int),
28934+ sizeof(float),
28935+ sizeof(double),
28936+ sizeof(char),
28937+ sizeof(short),
28938+ sizeof(int),
28939+ sizeof(float),
28940+ sizeof(double),
28941+};
28942+
28943+typedef struct {
28944+ int ret_type;
28945+ int has_out_parameters;
28946+ int nb_args;
28947+ int args_type[0];
28948+} Signature;
28949+
28950+static const int _init32_signature[] =
28951+ { TYPE_NONE, 1, 2, TYPE_INT, TYPE_OUT_1INT };
28952+static const int _init64_signature[] =
28953+ { TYPE_NONE, 1, 2, TYPE_INT, TYPE_OUT_1INT };
28954+
28955+static const int _synchronize_signature[] = { TYPE_INT, 0, 0 };
28956+
28957+static const int _serialized_calls_signature[] =
28958+ { TYPE_NONE, 0, 1, TYPE_ARRAY_CHAR };
28959+
28960+static const int _exit_process_signature[] = { TYPE_NONE, 0, 0 };
28961+
28962+static const int _changeWindowState_signature[] =
28963+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
28964+
28965+static const int _moveResizeWindow_signature[] =
28966+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_4INT };
28967+
28968+static const int _send_cursor_signature[] =
28969+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT,
28970+ TYPE_INT, TYPE_INT,
28971+ TYPE_INT, TYPE_INT,
28972+ TYPE_ARRAY_INT
28973+};
28974+
28975+/* XVisualInfo* glXChooseVisual( Display *dpy, int screen, int *attribList ) */
28976+static const int glXChooseVisual_signature[] =
28977+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT };
28978+
28979+/*GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis,
28980+ GLXContext shareList, Bool direct )*/
28981+static const int glXCreateContext_signature[] =
28982+ { TYPE_INT, 0, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT };
28983+
28984+static const int glXCopyContext_signature[] =
28985+ { TYPE_NONE, 0, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
28986+TYPE_INT };
28987+
28988+/* void glXDestroyContext( Display *dpy, GLXContext ctx ) */
28989+static const int glXDestroyContext_signature[] =
28990+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
28991+
28992+/* Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable, GLXContext ctx) */
28993+//static const int glXMakeCurrent_signature[] = {TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT};
28994+/* making it asynchronous */
28995+static const int glXMakeCurrent_signature[] =
28996+ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
28997+
28998+/*int glXGetConfig( Display *dpy, XVisualInfo *visual,
28999+ int attrib, int *value )*/
29000+static const int glXGetConfig_signature[] =
29001+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29002+TYPE_OUT_1INT };
29003+
29004+/* "glXGetConfig_extended"(dpy, visual_id, int n, int* attribs, int* values, int* rets) */
29005+static const int glXGetConfig_extended_signature[] =
29006+ { TYPE_NONE, 1, 6, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29007+TYPE_ARRAY_INT, TYPE_OUT_ARRAY_INT, TYPE_OUT_ARRAY_INT };
29008+
29009+/* void glXSwapBuffers( Display *dpy, GLXDrawable drawable ); */
29010+static const int glXSwapBuffers_signature[] =
29011+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29012+
29013+/* Bool glXQueryVersion( Display *dpy, int *maj, int *min ) */
29014+static const int glXQueryVersion_signature[] =
29015+ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_OUT_1INT, TYPE_OUT_1INT };
29016+
29017+/* Bool glXQueryExtension( Display *dpy, int *errorBase, int *eventBase ) */
29018+static const int glXQueryExtension_signature[] =
29019+ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_OUT_1INT, TYPE_OUT_1INT };
29020+
29021+static const int glXWaitGL_signature[] = { TYPE_INT, 0, 0 };
29022+static const int glXWaitX_signature[] = { TYPE_INT, 0, 0 };
29023+
29024+/* GLX 1.1 and later */
29025+
29026+/* const char *glXGetClientString( Display *dpy, int name ) */
29027+static const int glXGetClientString_signature[] =
29028+ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29029+
29030+/*const char *glXQueryExtensionsString( Display *dpy, int screen ) */
29031+static const int glXQueryExtensionsString_signature[] =
29032+ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29033+
29034+/* const char *glXQueryServerString( Display *dpy, int screen, int name ) */
29035+static const int glXQueryServerString_signature[] =
29036+ { TYPE_CONST_CHAR, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
29037+
29038+
29039+static const int glXGetProcAddress_fake_signature[] =
29040+ { TYPE_INT, 0, 1, TYPE_NULL_TERMINATED_STRING };
29041+
29042+static const int glXGetProcAddress_global_fake_signature[] =
29043+ { TYPE_NONE, 1, 3, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_OUT_ARRAY_CHAR };
29044+
29045+
29046+/* GLX 1.3 and later */
29047+
29048+/*
29049+GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen,
29050+ const int *attribList, int *nitems ); */
29051+static const int glXChooseFBConfig_signature[] =
29052+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT,
29053+TYPE_OUT_1INT };
29054+
29055+static const int glXChooseFBConfigSGIX_signature[] =
29056+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT,
29057+TYPE_OUT_1INT };
29058+
29059+static const int glXGetFBConfigs_signature[] =
29060+ { TYPE_INT, 1, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_OUT_1INT };
29061+
29062+/* "glXGetFBConfigAttrib_extended"(dpy, fbconfig, int n, int* attribs, int* values, int* rets) */
29063+static const int glXGetFBConfigAttrib_extended_signature[] =
29064+ { TYPE_NONE, 1, 6, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29065+TYPE_ARRAY_INT, TYPE_OUT_ARRAY_INT, TYPE_OUT_ARRAY_INT };
29066+
29067+
29068+/* GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config,
29069+ const int *attribList ) */
29070+static const int glXCreatePbuffer_signature[] =
29071+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_ARRAY_INT };
29072+
29073+static const int glXCreateGLXPbufferSGIX_signature[] =
29074+ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
29075+TYPE_ARRAY_INT };
29076+
29077+static const int glXDestroyPbuffer_signature[] =
29078+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29079+
29080+static const int glXDestroyGLXPbufferSGIX_signature[] =
29081+ { TYPE_NONE, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29082+
29083+/* GLXContext glXCreateNewContext(Display * dpy
29084+ GLXFBConfig config
29085+ int renderType
29086+ GLXContext ShareList
29087+ Bool Direct) */
29088+static const int glXCreateNewContext_signature[] =
29089+ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
29090+TYPE_INT };
29091+
29092+static const int glXCreateContextWithConfigSGIX_signature[] =
29093+ { TYPE_INT, 0, 5, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT, TYPE_INT,
29094+TYPE_INT };
29095+
29096+/*XVisualInfo *glXGetVisualFromFBConfig( Display *dpy, GLXFBConfig config ) */
29097+static const int glXGetVisualFromFBConfig_signature[] =
29098+ { TYPE_INT, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29099+
29100+/*int glXGetFBConfigAttrib(Display *dpy, GLXFBConfig config, int attribute, int *value)*/
29101+static const int glXGetFBConfigAttrib_signature[] =
29102+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29103+TYPE_OUT_1INT };
29104+
29105+static const int glXGetFBConfigAttribSGIX_signature[] =
29106+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29107+TYPE_OUT_1INT };
29108+
29109+static const int glXQueryContext_signature[] =
29110+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29111+TYPE_OUT_1INT };
29112+
29113+static const int glXQueryGLXPbufferSGIX_signature[] =
29114+ { TYPE_INT, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29115+TYPE_OUT_1INT };
29116+
29117+static const int glXQueryDrawable_signature[] =
29118+ { TYPE_NONE, 1, 4, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT,
29119+TYPE_OUT_1INT };
29120+
29121+/* void glXUseXFont( Font font, int first, int count, int list ) */
29122+static const int glXUseXFont_signature[] =
29123+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29124+
29125+/* Bool glXIsDirect( Display *dpy, GLXContext ctx ) */
29126+static const int glXIsDirect_signature[] =
29127+ { TYPE_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29128+
29129+static const int glXGetScreenDriver_signature[] =
29130+ { TYPE_CONST_CHAR, 0, 2, TYPE_IN_IGNORED_POINTER, TYPE_INT };
29131+
29132+static const int glXGetDriverConfig_signature[] =
29133+ { TYPE_CONST_CHAR, 0, 1, TYPE_NULL_TERMINATED_STRING };
29134+
29135+
29136+static const int glXWaitVideoSyncSGI_signature[] =
29137+ { TYPE_INT, 1, 3, TYPE_INT, TYPE_INT, TYPE_OUT_1INT };
29138+
29139+static const int glXGetVideoSyncSGI_signature[] =
29140+ { TYPE_INT, 1, 1, TYPE_OUT_1INT };
29141+
29142+static const int glXSwapIntervalSGI_signature[] =
29143+ { TYPE_INT, 0, 1, TYPE_INT };
29144+
29145+static const int glXBindTexImageATI_signature[] =
29146+ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
29147+static const int glXReleaseTexImageATI_signature[] =
29148+ { TYPE_NONE, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
29149+static const int glXBindTexImageARB_signature[] =
29150+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
29151+static const int glXReleaseTexImageARB_signature[] =
29152+ { TYPE_INT, 0, 3, TYPE_IN_IGNORED_POINTER, TYPE_INT, TYPE_INT };
29153+
29154+/* const GLubyte * glGetString( GLenum name ) */
29155+static const int glGetString_signature[] =
29156+ { TYPE_CONST_CHAR, 0, 1, TYPE_INT };
29157+
29158+/* void glShaderSourceARB (GLhandleARB handle , GLsizei size, const GLcharARB* *p_tab_prog, const GLint * tab_length) */
29159+/* --> void glShaderSourceARB (GLhandleARB handle , GLsizei size, const GLcharARB* all_progs, const GLint * tab_length) */
29160+static const int glShaderSourceARB_fake_signature[] =
29161+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_ARRAY_INT };
29162+static const int glShaderSource_fake_signature[] =
29163+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR, TYPE_ARRAY_INT };
29164+
29165+static const int glVertexPointer_fake_signature[] =
29166+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29167+TYPE_ARRAY_CHAR };
29168+static const int glNormalPointer_fake_signature[] =
29169+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29170+TYPE_ARRAY_CHAR };
29171+static const int glColorPointer_fake_signature[] =
29172+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29173+TYPE_ARRAY_CHAR };
29174+static const int glSecondaryColorPointer_fake_signature[] =
29175+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29176+TYPE_ARRAY_CHAR };
29177+static const int glIndexPointer_fake_signature[] =
29178+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29179+TYPE_ARRAY_CHAR };
29180+static const int glTexCoordPointer_fake_signature[] =
29181+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29182+TYPE_INT, TYPE_ARRAY_CHAR };
29183+static const int glEdgeFlagPointer_fake_signature[] =
29184+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29185+static const int glVertexAttribPointerARB_fake_signature[] =
29186+ { TYPE_NONE, 0, 8, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29187+TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29188+static const int glVertexAttribPointerNV_fake_signature[] =
29189+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29190+TYPE_INT, TYPE_ARRAY_CHAR };
29191+static const int glWeightPointerARB_fake_signature[] =
29192+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29193+TYPE_ARRAY_CHAR };
29194+static const int glMatrixIndexPointerARB_fake_signature[] =
29195+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29196+TYPE_ARRAY_CHAR };
29197+static const int glFogCoordPointer_fake_signature[] =
29198+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29199+TYPE_ARRAY_CHAR };
29200+static const int glInterleavedArrays_fake_signature[] =
29201+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29202+TYPE_ARRAY_CHAR };
29203+static const int glElementPointerATI_fake_signature[] =
29204+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29205+static const int glVariantPointerEXT_fake_signature[] =
29206+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29207+TYPE_ARRAY_CHAR };
29208+static const int glTuxRacerDrawElements_fake_signature[] =
29209+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29210+static const int glVertexAndNormalPointer_fake_signature[] =
29211+ { TYPE_NONE, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29212+TYPE_INT, TYPE_ARRAY_CHAR };
29213+static const int glTexCoordPointer01_fake_signature[] =
29214+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29215+TYPE_ARRAY_CHAR };
29216+static const int glTexCoordPointer012_fake_signature[] =
29217+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29218+TYPE_ARRAY_CHAR };
29219+static const int glVertexNormalPointerInterlaced_fake_signature[] =
29220+ { TYPE_NONE, 0, 8, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29221+TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29222+static const int glVertexNormalColorPointerInterlaced_fake_signature[] =
29223+ { TYPE_NONE, 0, 11, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29224+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29225+static const int glVertexColorTexCoord0PointerInterlaced_fake_signature[] =
29226+ { TYPE_NONE, 0, 12, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29227+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29228+static const int glVertexNormalTexCoord0PointerInterlaced_fake_signature[] =
29229+ { TYPE_NONE, 0, 11, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29230+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29231+static const int glVertexNormalTexCoord01PointerInterlaced_fake_signature[] =
29232+ { TYPE_NONE, 0, 14, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29233+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29234+static const int glVertexNormalTexCoord012PointerInterlaced_fake_signature[] =
29235+ { TYPE_NONE, 0, 17, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29236+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 };
29237+static const int
29238+ glVertexNormalColorTexCoord0PointerInterlaced_fake_signature[] =
29239+ { TYPE_NONE, 0, 14, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29240+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29241+TYPE_ARRAY_CHAR };
29242+static const int
29243+ glVertexNormalColorTexCoord01PointerInterlaced_fake_signature[] =
29244+ { TYPE_NONE, 0, 17, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29245+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29246+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29247+static const int
29248+ glVertexNormalColorTexCoord012PointerInterlaced_fake_signature[] =
29249+ { TYPE_NONE, 0, 20, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29250+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29251+TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_ARRAY_CHAR };
29252+
29253+static const int glGenTextures_fake_signature[] =
29254+ { TYPE_NONE, 0, 1, TYPE_INT };
29255+static const int glGenBuffersARB_fake_signature[] =
29256+ { TYPE_NONE, 0, 1, TYPE_INT };
29257+static const int glGenLists_fake_signature[] = { TYPE_NONE, 0, 1, TYPE_INT };
29258+
29259+static const int _glDrawElements_buffer_signature[] =
29260+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29261+static const int _glDrawRangeElements_buffer_signature[] =
29262+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29263+TYPE_INT };
29264+static const int _glMultiDrawElements_buffer_signature[] =
29265+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_ARRAY_INT, TYPE_INT, TYPE_ARRAY_INT,
29266+TYPE_INT };
29267+
29268+static const int _glVertexPointer_buffer_signature[] =
29269+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29270+static const int _glNormalPointer_buffer_signature[] =
29271+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
29272+static const int _glColorPointer_buffer_signature[] =
29273+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29274+static const int _glSecondaryColorPointer_buffer_signature[] =
29275+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29276+static const int _glIndexPointer_buffer_signature[] =
29277+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
29278+static const int _glTexCoordPointer_buffer_signature[] =
29279+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29280+static const int _glEdgeFlagPointer_buffer_signature[] =
29281+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
29282+static const int _glVertexAttribPointerARB_buffer_signature[] =
29283+ { TYPE_NONE, 0, 6, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29284+TYPE_INT };
29285+static const int _glWeightPointerARB_buffer_signature[] =
29286+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29287+static const int _glMatrixIndexPointerARB_buffer_signature[] =
29288+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29289+static const int _glFogCoordPointer_buffer_signature[] =
29290+ { TYPE_NONE, 0, 3, TYPE_INT, TYPE_INT, TYPE_INT };
29291+static const int _glVariantPointerEXT_buffer_signature[] =
29292+ { TYPE_NONE, 0, 4, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29293+
29294+static const int _glReadPixels_pbo_signature[] =
29295+ { TYPE_INT, 0, 7, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT,
29296+TYPE_INT, TYPE_INT };
29297+static const int _glDrawPixels_pbo_signature[] =
29298+ { TYPE_NONE, 0, 5, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT };
29299+static const int _glMapBufferARB_fake_signature[] =
29300+ { TYPE_INT, 1, 3, TYPE_INT, TYPE_INT, TYPE_OUT_ARRAY_CHAR };
29301+
29302+static const int _glSelectBuffer_fake_signature[] =
29303+ { TYPE_NONE, 0, 1, TYPE_INT };
29304+static const int _glGetSelectBuffer_fake_signature[] =
29305+ { TYPE_NONE, 1, 1, TYPE_ARRAY_CHAR };
29306+static const int _glFeedbackBuffer_fake_signature[] =
29307+ { TYPE_NONE, 0, 2, TYPE_INT, TYPE_INT };
29308+static const int _glGetFeedbackBuffer_fake_signature[] =
29309+ { TYPE_NONE, 1, 1, TYPE_ARRAY_CHAR };
29310+
29311+static const int _glGetError_fake_signature[] = { TYPE_NONE, 0, 0 };
29312+
29313+#define timesynchro_func -1
29314+#define memorize_array_func -2
29315+#define reuse_array_func -3
29316+
29317+#include "gl_func.h"
29318+
29319+static GLint __glTexParameter_size(FILE *err_file, GLenum pname)
29320+{
29321+ switch (pname) {
29322+ case GL_TEXTURE_MAG_FILTER:
29323+ case GL_TEXTURE_MIN_FILTER:
29324+ case GL_TEXTURE_WRAP_S:
29325+ case GL_TEXTURE_WRAP_T:
29326+ case GL_TEXTURE_PRIORITY:
29327+ case GL_TEXTURE_WRAP_R:
29328+ case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
29329+/* case GL_SHADOW_AMBIENT_SGIX:*/
29330+ case GL_TEXTURE_MIN_LOD:
29331+ case GL_TEXTURE_MAX_LOD:
29332+ case GL_TEXTURE_BASE_LEVEL:
29333+ case GL_TEXTURE_MAX_LEVEL:
29334+ case GL_TEXTURE_CLIPMAP_FRAME_SGIX:
29335+ case GL_TEXTURE_LOD_BIAS_S_SGIX:
29336+ case GL_TEXTURE_LOD_BIAS_T_SGIX:
29337+ case GL_TEXTURE_LOD_BIAS_R_SGIX:
29338+ case GL_GENERATE_MIPMAP:
29339+/* case GL_GENERATE_MIPMAP_SGIS:*/
29340+ case GL_TEXTURE_COMPARE_SGIX:
29341+ case GL_TEXTURE_COMPARE_OPERATOR_SGIX:
29342+ case GL_TEXTURE_MAX_CLAMP_S_SGIX:
29343+ case GL_TEXTURE_MAX_CLAMP_T_SGIX:
29344+ case GL_TEXTURE_MAX_CLAMP_R_SGIX:
29345+ case GL_TEXTURE_MAX_ANISOTROPY_EXT:
29346+ case GL_TEXTURE_LOD_BIAS:
29347+/* case GL_TEXTURE_LOD_BIAS_EXT:*/
29348+ case GL_DEPTH_TEXTURE_MODE:
29349+/* case GL_DEPTH_TEXTURE_MODE_ARB:*/
29350+ case GL_TEXTURE_COMPARE_MODE:
29351+/* case GL_TEXTURE_COMPARE_MODE_ARB:*/
29352+ case GL_TEXTURE_COMPARE_FUNC:
29353+/* case GL_TEXTURE_COMPARE_FUNC_ARB:*/
29354+ case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV:
29355+ return 1;
29356+ case GL_TEXTURE_CLIPMAP_CENTER_SGIX:
29357+ case GL_TEXTURE_CLIPMAP_OFFSET_SGIX:
29358+ return 2;
29359+ case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX:
29360+ return 3;
29361+ case GL_TEXTURE_BORDER_COLOR:
29362+ case GL_POST_TEXTURE_FILTER_BIAS_SGIX:
29363+ case GL_POST_TEXTURE_FILTER_SCALE_SGIX:
29364+ return 4;
29365+ default:
29366+ fprintf(err_file, "unhandled pname = %d\n", pname);
29367+ return 0;
29368+ }
29369+}
29370+
29371+static int __glLight_size(FILE *err_file, GLenum pname)
29372+{
29373+ switch (pname) {
29374+ case GL_AMBIENT:
29375+ case GL_DIFFUSE:
29376+ case GL_SPECULAR:
29377+ case GL_POSITION:
29378+ return 4;
29379+ break;
29380+
29381+ case GL_SPOT_DIRECTION:
29382+ return 3;
29383+ break;
29384+
29385+ case GL_SPOT_EXPONENT:
29386+ case GL_SPOT_CUTOFF:
29387+ case GL_CONSTANT_ATTENUATION:
29388+ case GL_LINEAR_ATTENUATION:
29389+ case GL_QUADRATIC_ATTENUATION:
29390+ return 1;
29391+ break;
29392+
29393+ default:
29394+ fprintf(err_file, "unhandled pname = %d\n", pname);
29395+ return 0;
29396+ }
29397+}
29398+
29399+static int __glMaterial_size(FILE *err_file, GLenum pname)
29400+{
29401+ switch (pname) {
29402+ case GL_AMBIENT:
29403+ case GL_DIFFUSE:
29404+ case GL_SPECULAR:
29405+ case GL_EMISSION:
29406+ case GL_AMBIENT_AND_DIFFUSE:
29407+ return 4;
29408+ break;
29409+
29410+ case GL_SHININESS:
29411+ return 1;
29412+ break;
29413+
29414+ case GL_COLOR_INDEXES:
29415+ return 3;
29416+ break;
29417+
29418+ default:
29419+ fprintf(err_file, "unhandled pname = %d\n", pname);
29420+ return 0;
29421+ }
29422+}
29423+
29424+static inline int compute_arg_length(FILE *err_file, int func_number,
29425+ int arg_i, arg_t *args)
29426+{
29427+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
29428+ int *args_type = signature->args_type;
29429+
29430+ switch (func_number) {
29431+ case glProgramNamedParameter4fNV_func:
29432+ case glProgramNamedParameter4dNV_func:
29433+ case glProgramNamedParameter4fvNV_func:
29434+ case glProgramNamedParameter4dvNV_func:
29435+ case glGetProgramNamedParameterfvNV_func:
29436+ case glGetProgramNamedParameterdvNV_func:
29437+ if (arg_i == 2)
29438+ return 1 * args[arg_i - 1] *
29439+ tab_args_type_length[args_type[arg_i]];
29440+ break;
29441+
29442+ case glProgramStringARB_func:
29443+ case glLoadProgramNV_func:
29444+ case glGenProgramsNV_func:
29445+ case glDeleteProgramsNV_func:
29446+ case glGenProgramsARB_func:
29447+ case glDeleteProgramsARB_func:
29448+ case glRequestResidentProgramsNV_func:
29449+ case glDrawBuffers_func:
29450+ case glDrawBuffersARB_func:
29451+ case glDrawBuffersATI_func:
29452+ case glDeleteBuffers_func:
29453+ case glDeleteBuffersARB_func:
29454+ case glDeleteTextures_func:
29455+ case glDeleteTexturesEXT_func:
29456+ case glGenFramebuffersEXT_func:
29457+ case glDeleteFramebuffersEXT_func:
29458+ case glGenRenderbuffersEXT_func:
29459+ case glDeleteRenderbuffersEXT_func:
29460+ case glGenQueries_func:
29461+ case glGenQueriesARB_func:
29462+ case glDeleteQueries_func:
29463+ case glDeleteQueriesARB_func:
29464+ case glGenOcclusionQueriesNV_func:
29465+ case glDeleteOcclusionQueriesNV_func:
29466+ case glGenFencesNV_func:
29467+ case glDeleteFencesNV_func:
29468+ case glUniform1fv_func:
29469+ case glUniform1iv_func:
29470+ case glUniform1fvARB_func:
29471+ case glUniform1ivARB_func:
29472+ case glUniform1uivEXT_func:
29473+ case glVertexAttribs1dvNV_func:
29474+ case glVertexAttribs1fvNV_func:
29475+ case glVertexAttribs1svNV_func:
29476+ case glVertexAttribs1hvNV_func:
29477+ case glWeightbvARB_func:
29478+ case glWeightsvARB_func:
29479+ case glWeightivARB_func:
29480+ case glWeightfvARB_func:
29481+ case glWeightdvARB_func:
29482+ case glWeightubvARB_func:
29483+ case glWeightusvARB_func:
29484+ case glWeightuivARB_func:
29485+ case glPixelMapfv_func:
29486+ case glPixelMapuiv_func:
29487+ case glPixelMapusv_func:
29488+ case glProgramBufferParametersfvNV_func:
29489+ case glProgramBufferParametersIivNV_func:
29490+ case glProgramBufferParametersIuivNV_func:
29491+ case glTransformFeedbackAttribsNV_func:
29492+ case glTransformFeedbackVaryingsNV_func:
29493+ if (arg_i == signature->nb_args - 1)
29494+ return 1 * args[arg_i - 1] *
29495+ tab_args_type_length[args_type[arg_i]];
29496+ break;
29497+
29498+ case glUniform2fv_func:
29499+ case glUniform2iv_func:
29500+ case glUniform2fvARB_func:
29501+ case glUniform2ivARB_func:
29502+ case glUniform2uivEXT_func:
29503+ case glVertexAttribs2dvNV_func:
29504+ case glVertexAttribs2fvNV_func:
29505+ case glVertexAttribs2svNV_func:
29506+ case glVertexAttribs2hvNV_func:
29507+ case glDetailTexFuncSGIS_func:
29508+ case glSharpenTexFuncSGIS_func:
29509+ if (arg_i == signature->nb_args - 1)
29510+ return 2 * args[arg_i - 1] *
29511+ tab_args_type_length[args_type[arg_i]];
29512+ break;
29513+
29514+ case glUniform3fv_func:
29515+ case glUniform3iv_func:
29516+ case glUniform3fvARB_func:
29517+ case glUniform3ivARB_func:
29518+ case glUniform3uivEXT_func:
29519+ case glVertexAttribs3dvNV_func:
29520+ case glVertexAttribs3fvNV_func:
29521+ case glVertexAttribs3svNV_func:
29522+ case glVertexAttribs3hvNV_func:
29523+ if (arg_i == signature->nb_args - 1)
29524+ return 3 * args[arg_i - 1] *
29525+ tab_args_type_length[args_type[arg_i]];
29526+ break;
29527+
29528+ case glUniform4fv_func:
29529+ case glUniform4iv_func:
29530+ case glUniform4fvARB_func:
29531+ case glUniform4ivARB_func:
29532+ case glUniform4uivEXT_func:
29533+ case glVertexAttribs4dvNV_func:
29534+ case glVertexAttribs4fvNV_func:
29535+ case glVertexAttribs4svNV_func:
29536+ case glVertexAttribs4hvNV_func:
29537+ case glVertexAttribs4ubvNV_func:
29538+ case glProgramParameters4fvNV_func:
29539+ case glProgramParameters4dvNV_func:
29540+ case glProgramLocalParameters4fvEXT_func:
29541+ case glProgramEnvParameters4fvEXT_func:
29542+ case glProgramLocalParametersI4ivNV_func:
29543+ case glProgramLocalParametersI4uivNV_func:
29544+ case glProgramEnvParametersI4ivNV_func:
29545+ case glProgramEnvParametersI4uivNV_func:
29546+ if (arg_i == signature->nb_args - 1)
29547+ return 4 * args[arg_i - 1] *
29548+ tab_args_type_length[args_type[arg_i]];
29549+ break;
29550+
29551+ case glPrioritizeTextures_func:
29552+ case glPrioritizeTexturesEXT_func:
29553+ case glAreProgramsResidentNV_func:
29554+ case glAreTexturesResident_func:
29555+ case glAreTexturesResidentEXT_func:
29556+ if (arg_i == 1 || arg_i == 2)
29557+ return args[0] * tab_args_type_length[args_type[arg_i]];
29558+ break;
29559+
29560+ case glLightfv_func:
29561+ case glLightiv_func:
29562+ case glGetLightfv_func:
29563+ case glGetLightiv_func:
29564+ case glFragmentLightfvSGIX_func:
29565+ case glFragmentLightivSGIX_func:
29566+ case glGetFragmentLightfvSGIX_func:
29567+ case glGetFragmentLightivSGIX_func:
29568+ if (arg_i == signature->nb_args - 1)
29569+ return __glLight_size(err_file,
29570+ args[arg_i -
29571+ 1]) *
29572+ tab_args_type_length[args_type[arg_i]];
29573+ break;
29574+
29575+ case glLightModelfv_func:
29576+ case glLightModeliv_func:
29577+ if (arg_i == signature->nb_args - 1)
29578+ return ((args[arg_i - 1] ==
29579+ GL_LIGHT_MODEL_AMBIENT) ? 4 : 1) *
29580+ tab_args_type_length[args_type[arg_i]];
29581+ break;
29582+
29583+ case glFragmentLightModelfvSGIX_func:
29584+ case glFragmentLightModelivSGIX_func:
29585+ if (arg_i == signature->nb_args - 1)
29586+ return ((args[arg_i - 1] ==
29587+ GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX) ? 4 : 1) *
29588+ tab_args_type_length[args_type[arg_i]];
29589+ break;
29590+
29591+ case glMaterialfv_func:
29592+ case glMaterialiv_func:
29593+ case glGetMaterialfv_func:
29594+ case glGetMaterialiv_func:
29595+ case glFragmentMaterialfvSGIX_func:
29596+ case glFragmentMaterialivSGIX_func:
29597+ case glGetFragmentMaterialfvSGIX_func:
29598+ case glGetFragmentMaterialivSGIX_func:
29599+ if (arg_i == signature->nb_args - 1)
29600+ return __glMaterial_size(err_file,
29601+ args[arg_i -
29602+ 1]) *
29603+ tab_args_type_length[args_type[arg_i]];
29604+ break;
29605+
29606+ case glTexParameterfv_func:
29607+ case glTexParameteriv_func:
29608+ case glGetTexParameterfv_func:
29609+ case glGetTexParameteriv_func:
29610+ case glTexParameterIivEXT_func:
29611+ case glTexParameterIuivEXT_func:
29612+ case glGetTexParameterIivEXT_func:
29613+ case glGetTexParameterIuivEXT_func:
29614+ if (arg_i == signature->nb_args - 1)
29615+ return __glTexParameter_size(err_file,
29616+ args[arg_i -
29617+ 1]) *
29618+ tab_args_type_length[args_type[arg_i]];
29619+ break;
29620+
29621+ case glFogiv_func:
29622+ case glFogfv_func:
29623+ if (arg_i == signature->nb_args - 1)
29624+ return ((args[arg_i - 1] ==
29625+ GL_FOG_COLOR) ? 4 : 1) *
29626+ tab_args_type_length[args_type[arg_i]];
29627+ break;
29628+
29629+ case glTexGendv_func:
29630+ case glTexGenfv_func:
29631+ case glTexGeniv_func:
29632+ case glGetTexGendv_func:
29633+ case glGetTexGenfv_func:
29634+ case glGetTexGeniv_func:
29635+ if (arg_i == signature->nb_args - 1)
29636+ return ((args[arg_i - 1] ==
29637+ GL_TEXTURE_GEN_MODE) ? 1 : 4) *
29638+ tab_args_type_length[args_type[arg_i]];
29639+ break;
29640+
29641+ case glTexEnvfv_func:
29642+ case glTexEnviv_func:
29643+ case glGetTexEnvfv_func:
29644+ case glGetTexEnviv_func:
29645+ if (arg_i == signature->nb_args - 1)
29646+ return ((args[arg_i - 1] ==
29647+ GL_TEXTURE_ENV_MODE) ? 1 : 4) *
29648+ tab_args_type_length[args_type[arg_i]];
29649+ break;
29650+
29651+ case glConvolutionParameterfv_func:
29652+ case glConvolutionParameteriv_func:
29653+ case glGetConvolutionParameterfv_func:
29654+ case glGetConvolutionParameteriv_func:
29655+ case glConvolutionParameterfvEXT_func:
29656+ case glConvolutionParameterivEXT_func:
29657+ case glGetConvolutionParameterfvEXT_func:
29658+ case glGetConvolutionParameterivEXT_func:
29659+ if (arg_i == signature->nb_args - 1)
29660+ return ((args[arg_i - 1] == GL_CONVOLUTION_BORDER_COLOR ||
29661+ args[arg_i - 1] == GL_CONVOLUTION_FILTER_SCALE ||
29662+ args[arg_i - 1] ==
29663+ GL_CONVOLUTION_FILTER_BIAS) ? 4 : 1) *
29664+ tab_args_type_length[args_type[arg_i]];
29665+ break;
29666+
29667+ case glGetVertexAttribfvARB_func:
29668+ case glGetVertexAttribfvNV_func:
29669+ case glGetVertexAttribfv_func:
29670+ case glGetVertexAttribdvARB_func:
29671+ case glGetVertexAttribdvNV_func:
29672+ case glGetVertexAttribdv_func:
29673+ case glGetVertexAttribivARB_func:
29674+ case glGetVertexAttribivNV_func:
29675+ case glGetVertexAttribiv_func:
29676+ case glGetVertexAttribIivEXT_func:
29677+ case glGetVertexAttribIuivEXT_func:
29678+ if (arg_i == signature->nb_args - 1)
29679+ return ((args[arg_i - 1] ==
29680+ GL_CURRENT_VERTEX_ATTRIB_ARB) ? 4 : 1) *
29681+ tab_args_type_length[args_type[arg_i]];
29682+ break;
29683+
29684+
29685+ case glPointParameterfv_func:
29686+ case glPointParameterfvEXT_func:
29687+ case glPointParameterfvARB_func:
29688+ case glPointParameterfvSGIS_func:
29689+ case glPointParameteriv_func:
29690+ case glPointParameterivEXT_func:
29691+ if (arg_i == signature->nb_args - 1)
29692+ return ((args[arg_i - 1] ==
29693+ GL_POINT_DISTANCE_ATTENUATION) ? 3 : 1) *
29694+ tab_args_type_length[args_type[arg_i]];
29695+ break;
29696+
29697+ case glUniformMatrix2fv_func:
29698+ case glUniformMatrix2fvARB_func:
29699+ if (arg_i == signature->nb_args - 1)
29700+ return 2 * 2 * args[1] * tab_args_type_length[args_type[arg_i]];
29701+ break;
29702+
29703+ case glUniformMatrix3fv_func:
29704+ case glUniformMatrix3fvARB_func:
29705+ if (arg_i == signature->nb_args - 1)
29706+ return 3 * 3 * args[1] * tab_args_type_length[args_type[arg_i]];
29707+ break;
29708+
29709+ case glUniformMatrix4fv_func:
29710+ case glUniformMatrix4fvARB_func:
29711+ if (arg_i == signature->nb_args - 1)
29712+ return 4 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
29713+ break;
29714+
29715+ case glUniformMatrix2x3fv_func:
29716+ case glUniformMatrix3x2fv_func:
29717+ if (arg_i == signature->nb_args - 1)
29718+ return 2 * 3 * args[1] * tab_args_type_length[args_type[arg_i]];
29719+ break;
29720+
29721+ case glUniformMatrix2x4fv_func:
29722+ case glUniformMatrix4x2fv_func:
29723+ if (arg_i == signature->nb_args - 1)
29724+ return 2 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
29725+ break;
29726+
29727+ case glUniformMatrix3x4fv_func:
29728+ case glUniformMatrix4x3fv_func:
29729+ if (arg_i == signature->nb_args - 1)
29730+ return 3 * 4 * args[1] * tab_args_type_length[args_type[arg_i]];
29731+ break;
29732+
29733+ case glSpriteParameterivSGIX_func:
29734+ case glSpriteParameterfvSGIX_func:
29735+ if (arg_i == signature->nb_args - 1)
29736+ return ((args[arg_i - 1] ==
29737+ GL_SPRITE_MODE_SGIX) ? 1 : 3) *
29738+ tab_args_type_length[args_type[arg_i]];
29739+ break;
29740+
29741+ default:
29742+ break;
29743+ }
29744+
29745+ fprintf(err_file,
29746+ "invalid combination for compute_arg_length : func_number=%d, arg_i=%d\n",
29747+ func_number, arg_i);
29748+ return 0;
29749+}
29750+
29751+#define IS_NULL_POINTER_OK_FOR_FUNC(func_number) \
29752+ (func_number == glBitmap_func || \
29753+ func_number == _send_cursor_func || \
29754+ func_number == glTexImage1D_func || \
29755+ func_number == glTexImage2D_func || \
29756+ func_number == glTexImage3D_func || \
29757+ func_number == glBufferDataARB_func || \
29758+ func_number == glNewObjectBufferATI_func)
29759+
29760+#ifdef __amd64__
29761+#define _init_func _init64_func
29762+#else
29763+#ifdef __i386__
29764+#define _init_func _init32_func
29765+#else
29766+#error Unsupported ABI
29767+#endif
29768+#endif
29769Index: qemu-0.12.4/target-i386/opengl_player.c
29770===================================================================
29771--- /dev/null
29772+++ qemu-0.12.4/target-i386/opengl_player.c
29773@@ -0,0 +1,1461 @@
29774+/*
29775+ * Plays a sequence of OpenGL calls recorded either under qemu or with opengl_server
29776+ *
29777+ * Copyright (c) 2007 Even Rouault
29778+ *
29779+ * Permission is hereby granted, free of charge, to any person obtaining a copy
29780+ * of this software and associated documentation files (the "Software"), to deal
29781+ * in the Software without restriction, including without limitation the rights
29782+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
29783+ * copies of the Software, and to permit persons to whom the Software is
29784+ * furnished to do so, subject to the following conditions:
29785+ *
29786+ * The above copyright notice and this permission notice shall be included in
29787+ * all copies or substantial portions of the Software.
29788+ *
29789+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
29790+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29791+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
29792+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29793+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29794+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
29795+ * THE SOFTWARE.
29796+ */
29797+
29798+/* gcc -O2 -g -Wall opengl_player.c opengl_exec.c -o opengl_player -I../i386-softmmu -I. -I.. -lGL */
29799+
29800+#include <stdlib.h>
29801+#include <stdio.h>
29802+#include <string.h>
29803+#include <assert.h>
29804+#include <unistd.h>
29805+#include <sys/time.h>
29806+#include <math.h>
29807+
29808+#include <GL/gl.h>
29809+#include <X11/Xlib.h>
29810+
29811+// TODO
29812+typedef long unsigned int target_phys_addr_t;
29813+
29814+#include "opengl_func.h"
29815+#include "opengl_utils.h"
29816+
29817+//#include "ffmpeg/avcodec.h"
29818+
29819+extern void init_process_tab(void);
29820+extern int do_function_call(int, arg_t *, char *);
29821+
29822+void do_disconnect_current(void);
29823+void do_context_switch(Display *dpy, pid_t pid, int call);
29824+
29825+typedef struct {
29826+ int n_used;
29827+ unsigned int crc;
29828+ int size;
29829+ long long last_use;
29830+} RecordBufferedArray;
29831+
29832+typedef struct {
29833+ int size;
29834+ long file_offset;
29835+} ReplayBufferedArray;
29836+
29837+#define N_BUFFERED_ARRAYS 1024
29838+RecordBufferedArray recordBufferedArrays[N_BUFFERED_ARRAYS];
29839+
29840+#define INSTR_WINDOW_SIZE 65536
29841+short instrWindow[INSTR_WINDOW_SIZE];
29842+int instrWindowCount = 0;
29843+int instrWindowPtr = 0;
29844+int instrWindowBeginPtr = 0;
29845+
29846+#include "ghash.c"
29847+
29848+#define PRIME 131
29849+
29850+typedef struct {
29851+ int iFirstOccur;
29852+ int nbOccur;
29853+ int hash;
29854+} SeqDesc;
29855+
29856+typedef struct {
29857+ int hash;
29858+ int offset;
29859+} HashElt;
29860+
29861+int sort_hash_N;
29862+short *sort_hash_tab;
29863+int count_compar;
29864+int collision_detected;
29865+
29866+static int sort_hash(const void *ptrA, const void *ptrB)
29867+{
29868+ const HashElt *a = (const HashElt *) ptrA;
29869+ const HashElt *b = (const HashElt *) ptrB;
29870+
29871+ count_compar++;
29872+ if (a->hash == b->hash) {
29873+ int j;
29874+
29875+ for (j = 0; j < sort_hash_N; j++) {
29876+ if (sort_hash_tab[a->offset + j] != sort_hash_tab[b->offset + j]) {
29877+ collision_detected = 1;
29878+ // fprintf(stderr, "collision de hash !\n");
29879+ return sort_hash_tab[a->offset + j] <
29880+ sort_hash_tab[b->offset + j] ? -1 : 1;
29881+ }
29882+ }
29883+ return a->offset - b->offset;
29884+ } else if (a->hash < b->hash)
29885+ return -1;
29886+ else
29887+ return 1;
29888+}
29889+
29890+static int sort_seq_desc_by_occur(const void *ptrA, const void *ptrB)
29891+{
29892+ const SeqDesc *a = (const SeqDesc *) ptrA;
29893+ const SeqDesc *b = (const SeqDesc *) ptrB;
29894+
29895+ return b->nbOccur - a->nbOccur;
29896+}
29897+
29898+static int sort_seq_desc_by_offset(const void *ptrA, const void *ptrB)
29899+{
29900+ const SeqDesc *a = (const SeqDesc *) ptrA;
29901+ const SeqDesc *b = (const SeqDesc *) ptrB;
29902+
29903+ return a->iFirstOccur - b->iFirstOccur;
29904+}
29905+
29906+void find_repeated_seq(short *tab, int iStart, int length)
29907+{
29908+ // SimpleHashTable* tableHash = simple_hash_table_new(free);
29909+ int N = 10;
29910+ int i;
29911+ int hash = 0;
29912+ int primeN = 1;
29913+ HashElt *tabHash = malloc(sizeof(HashElt) * (length - N + 1));
29914+
29915+ short *new_tab = malloc(sizeof(short) * length);
29916+ memcpy(&new_tab[0], &tab[iStart], sizeof(short) * (length - iStart));
29917+ memcpy(&new_tab[length - iStart], &tab[0], sizeof(short) * iStart);
29918+ tab = new_tab;
29919+
29920+ sort_hash_N = N;
29921+ sort_hash_tab = tab;
29922+
29923+ fprintf(stderr, "(start) iStart = %d\n", iStart);
29924+ for (i = 0; i < N; i++) {
29925+ primeN *= PRIME;
29926+ }
29927+ for (i = 0; i < length; i++) {
29928+ hash = hash * PRIME + tab[i];
29929+ if (i >= N) {
29930+ hash -= tab[i - N] * primeN;
29931+ }
29932+ if (i >= N - 1) {
29933+ tabHash[i - (N - 1)].offset = i - (N - 1);
29934+ tabHash[i - (N - 1)].hash =
29935+ /* (i == 100) ? tabHash[0].hash : */ hash;
29936+#if 0
29937+ void **p_n_occurences =
29938+ simple_hash_table_lookup_pointer(tableHash, hash);
29939+ if (p_n_occurences == NULL) {
29940+ SeqDesc *seqDesc = malloc(sizeof(SeqDesc));
29941+
29942+ seqDesc->iFirstOccur = i - (N - 1);
29943+ seqDesc->nbOccur = 1;
29944+ simple_hash_table_insert(tableHash, hash, seqDesc);
29945+ } else {
29946+ SeqDesc *seqDesc = (SeqDesc *) (*p_n_occurences);
29947+ int j;
29948+
29949+ for (j = 0; j < N; j++) {
29950+ if (tab[(iStart + seqDesc->iFirstOccur + j) % length] !=
29951+ tab[(iStart + i - (N - 1) + j) % length])
29952+ break;
29953+ }
29954+ if (j != N)
29955+ fprintf(stderr, "arg\n");
29956+ seqDesc->nbOccur++;
29957+ // fprintf(stderr, "iStart = %d, i = %d, iFirstOccur = %d,
29958+ // nbOccur = %d\n", iStart, i, seqDesc->iFirstOccur,
29959+ // seqDesc->nbOccur);
29960+ }
29961+#endif
29962+ }
29963+ }
29964+ collision_detected = 0;
29965+ count_compar = 0;
29966+ qsort(tabHash, length - N + 1, sizeof(HashElt), sort_hash);
29967+ if (!collision_detected) {
29968+ SeqDesc *tabSeqDesc = (SeqDesc *) malloc(sizeof(SeqDesc) * length);
29969+ int nbSeqDesc = 0;
29970+ int lastI = 0;
29971+ int prevHash = tabHash[0].hash;
29972+
29973+ for (i = 1; i < length - N + 1; i++) {
29974+ if (tabHash[i].hash != prevHash) {
29975+ tabSeqDesc[nbSeqDesc].iFirstOccur = tabHash[lastI].offset;
29976+ tabSeqDesc[nbSeqDesc].nbOccur = i - lastI;
29977+ tabSeqDesc[nbSeqDesc].hash = prevHash;
29978+ nbSeqDesc++;
29979+ lastI = i;
29980+ prevHash = tabHash[i].hash;
29981+ }
29982+ }
29983+ tabSeqDesc[nbSeqDesc].iFirstOccur = tabHash[lastI].offset;
29984+ tabSeqDesc[nbSeqDesc].nbOccur = i - lastI;
29985+ nbSeqDesc++;
29986+ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc), sort_seq_desc_by_occur);
29987+ for (i = 0; i < nbSeqDesc; i++) {
29988+ if (tabSeqDesc[i].nbOccur < 10)
29989+ break;
29990+ // fprintf(stderr, "%d %d\n", tabSeqDesc[i].iFirstOccur,
29991+ // tabSeqDesc[i].nbOccur);
29992+ }
29993+ nbSeqDesc = i;
29994+ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc),
29995+ sort_seq_desc_by_offset);
29996+ lastI = tabSeqDesc[0].iFirstOccur;
29997+ int maxI = 0;
29998+ int j = 0;
29999+
30000+ for (i = 1; i < nbSeqDesc; i++) {
30001+ if (tabSeqDesc[i].iFirstOccur - lastI <= N) {
30002+ if (tabSeqDesc[i].nbOccur > tabSeqDesc[maxI].nbOccur) {
30003+ maxI = i;
30004+ }
30005+ } else {
30006+ tabSeqDesc[j].iFirstOccur = tabSeqDesc[maxI].iFirstOccur;
30007+ tabSeqDesc[j].nbOccur = tabSeqDesc[maxI].nbOccur;
30008+ j++;
30009+#define MAX(a,b) (((a)>(b)) ? (a) : (b))
30010+ lastI = tabSeqDesc[maxI].iFirstOccur;
30011+ while (i < nbSeqDesc &&
30012+ tabSeqDesc[i].iFirstOccur - lastI <= N)
30013+ i++;
30014+ if (i == nbSeqDesc)
30015+ break;
30016+ maxI = i;
30017+ }
30018+ }
30019+ nbSeqDesc = j;
30020+ qsort(tabSeqDesc, nbSeqDesc, sizeof(SeqDesc), sort_seq_desc_by_occur);
30021+ for (i = 0; i < nbSeqDesc; i++) {
30022+ fprintf(stderr, "offset=%d occurNb=%d hash=%d:",
30023+ tabSeqDesc[i].iFirstOccur, tabSeqDesc[i].nbOccur,
30024+ tabSeqDesc[i].hash);
30025+ for (j = 0; j < N; j++)
30026+ fprintf(stderr, "%d ", tab[tabSeqDesc[i].iFirstOccur + j]);
30027+ fprintf(stderr, "\n");
30028+ }
30029+ free(tabSeqDesc);
30030+ } else {
30031+ fprintf(stderr, "collision de hash !\n");
30032+ }
30033+
30034+ fprintf(stderr, "(end) iStart = %d (count_compar = %d)\n", iStart,
30035+ count_compar);
30036+ // simple_hash_table_foreach(tableHash,
30037+ free(tabHash);
30038+ free(tab);
30039+#if 0
30040+ simple_hash_table_destroy(tableHash);
30041+#endif
30042+#if 0
30043+ int i, j, k;
30044+
30045+ for (i = 0; i < length; i++) {
30046+ int nMaxContiguous = 0;
30047+ int jMax = 0;
30048+
30049+ for (j = 0; j < length; j++) {
30050+ int nContiguous = 0;
30051+
30052+ for (k = 0; k < j - i; k++) {
30053+ if (tab[(iStart + i + k) % length] ==
30054+ tab[(iStart + i + j + k) % length]) {
30055+ nContiguous++;
30056+ } else
30057+ break;
30058+ }
30059+ if (nContiguous >= nMaxContiguous) {
30060+ nMaxContiguous = nContiguous;
30061+ jMax = j;
30062+ }
30063+ }
30064+ fprintf(stderr, "iStart = %d, i = %d, j = %d, nContiguous = %d\n",
30065+ iStart, i, i + jMax, nMaxContiguous);
30066+ }
30067+#endif
30068+}
30069+
30070+#define MAX_SERVER_STATE_STACK_SIZE 16
30071+
30072+typedef struct {
30073+ GLbitfield mask;
30074+ int matrixMode;
30075+ int lastMatrixOp;
30076+} ServerState;
30077+
30078+typedef struct {
30079+ ServerState stackAttrib[MAX_SERVER_STATE_STACK_SIZE];
30080+ int stackAttribPtr;
30081+ int matrixMode;
30082+ int lastMatrixOp;
30083+} GLState;
30084+
30085+#define NB_STATES 100
30086+GLState states[NB_STATES];
30087+
30088+void usage()
30089+{
30090+ printf("Usage : opengl_player [OPTION] filename\n\n");
30091+ printf
30092+ ("filename is the file where to read the OpenGL flow ('/tmp/debug_gl.bin' by default)\n");
30093+ printf("'-' is supported and stands for standard input\n\n");
30094+ printf("The following options are available :\n");
30095+ printf
30096+ ("--debug : output debugging trace on stderr\n");
30097+ printf("--disable-real-time-play-back : play as fast as possible\n");
30098+ printf
30099+ ("--show-hard-disk-bandwidth : displays regularly the data bandwidth\n");
30100+ printf("--h or --help : display this help\n");
30101+}
30102+
30103+int main(int argc, char *argv[])
30104+{
30105+ static int args_size[50];
30106+ int i;
30107+ int visualid_fbconfig_read = -1;
30108+ int visualid_fbconfig_real = 0;
30109+ char *filename = "/tmp/debug_gl.bin";
30110+ int slowdown = 0;
30111+ int debug = 0;
30112+ char *ret_string;
30113+ arg_t args[50];
30114+ struct timeval start_time, last_time, current_time;
30115+ int noplay = 0;
30116+ int count_last_time = 0, count_current = 0;
30117+ int refresh_rate = 500;
30118+ int disable_real_time_play_back = 0;
30119+ int show_hard_disk_bandwith = 0;
30120+ int last_offset = 0;
30121+ int resize = 0;
30122+ int window_width = 0, window_height = 0;
30123+ int orig_window_width = 0;
30124+ int show_offset = 0;
30125+ int show_diff_offset = 0;
30126+ int last_cmd_offset = 0;
30127+ FILE *compressed_file = NULL;
30128+ int sizeBufferedArraysPlay = 0;
30129+ ReplayBufferedArray *replayBufferedArrays = NULL;
30130+ int currentState = 0;
30131+
30132+ memset(recordBufferedArrays, 0, sizeof(recordBufferedArrays));
30133+ memset(states, 0, sizeof(states));
30134+ for (i = 0; i < NB_STATES; i++) {
30135+ states[i].matrixMode = GL_MODELVIEW;
30136+ states[i].lastMatrixOp = -1;
30137+ }
30138+
30139+ /* avcodec_init(); AVCodec* avCodec =
30140+ * avcodec_find_encoder(CODEC_ID_MPEG2VIDEO); AVCodecContext*
30141+ * avCodecContext = avcodec_alloc_context(); */
30142+
30143+ for (i = 1; i < argc; i++) {
30144+ if (argv[i][0] == '-' && argv[i][1] == '-')
30145+ argv[i] = argv[i] + 1;
30146+
30147+ if (strncmp(argv[i], "-slowdown=", strlen("-slowdown=")) == 0) {
30148+ slowdown = atoi(argv[i] + strlen("-slowdown="));
30149+ } else if (strcmp(argv[i], "-noplay") == 0) {
30150+ noplay = 1;
30151+ } else if (strcmp(argv[i], "-debug") == 0) {
30152+ debug = 1;
30153+ } else if (strcmp(argv[i], "-disable-real-time-play-back") == 0) {
30154+ disable_real_time_play_back = 1;
30155+ } else if (strcmp(argv[i], "-show-hard-disk-bandwidth") == 0) {
30156+ show_hard_disk_bandwith = 1;
30157+ } else if (strcmp(argv[i], "-show-offset") == 0) {
30158+ show_offset = 1;
30159+ } else
30160+ if (strncmp
30161+ (argv[i], "-show-diff-offset",
30162+ strlen("-show-diff-offset")) == 0) {
30163+ show_diff_offset = atoi(argv[i] + strlen("-show-diff-offset="));
30164+ } else if (strncmp(argv[i], "-width=", strlen("-width=")) == 0) {
30165+ window_width = atoi(argv[i] + strlen("-width="));
30166+ resize = 1;
30167+ } else if (strncmp(argv[i], "-refreshrate=", strlen("-refreshrate="))
30168+ == 0) {
30169+ refresh_rate = atoi(argv[i] + strlen("-refreshrate="));
30170+ } else
30171+ if (strncmp
30172+ (argv[i], "-output-compressed-filename=",
30173+ strlen("-output-compressed-filename=")) == 0) {
30174+ char *compressed_filename =
30175+ argv[i] + strlen("-output-compressed-filename=");
30176+ compressed_file = fopen(compressed_filename, "wb");
30177+ } else if (strcmp(argv[i], "-") == 0) {
30178+ filename = NULL;
30179+ } else if (strcmp(argv[i], "-h") == 0 ||
30180+ strcmp(argv[i], "-help") == 0) {
30181+ usage();
30182+ return 0;
30183+ } else
30184+ filename = argv[i];
30185+ }
30186+ FILE *f = (filename) ? fopen(filename, "rb") : stdin;
30187+
30188+ if (f == NULL) {
30189+ fprintf(stderr, "cannot open %s\n", filename);
30190+ return 0;
30191+ }
30192+ // FILE* fout = fopen("/tmp/raw", "wb");
30193+
30194+ init_process_tab();
30195+ ret_string = malloc(32768);
30196+
30197+ gettimeofday(&start_time, NULL);
30198+ gettimeofday(&last_time, NULL);
30199+
30200+// void* buffer= NULL;
30201+#define WRITE_UNSIGNED_CHAR(x) do { unsigned char myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30202+#define WRITE_SHORT(x) do { short myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30203+#define WRITE_INT(x) do { int myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30204+#define WRITE_LONGLONG(x) do { long long myvar = x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30205+#define WRITE_FLOAT(x) do { float myvar = (float)x; fwrite(&myvar, sizeof(myvar), 1, compressed_file); } while(0)
30206+#define WRITE_3DOUBLE_AS_3FLOAT(x) do { float myfloats[] = { x[0], x[1], x[2] }; fwrite(myfloats, sizeof(myvar), 1, compressed_file); } while(0)
30207+
30208+ // FILE* fopcodes = fopen("/tmp/opcodes.bin", "wb");
30209+ do_context_switch(XOpenDisplay(NULL), 1, _init32_func);
30210+
30211+ long long instr_count = 0;
30212+
30213+ while (1) {
30214+ short func_number;
30215+ short memorize_array_play = -1;
30216+ short reuse_array_play = -1;
30217+
30218+ begin:
30219+ if (fread(&func_number, sizeof(short), 1, f) == 0)
30220+ break;
30221+ if (func_number == _exit_process_func)
30222+ break;
30223+
30224+ if (func_number == _serialized_calls_func) {
30225+ continue;
30226+ }
30227+ // fwrite(&func_number, sizeof(short), 1, fopcodes);
30228+
30229+ /*
30230+ * instrWindow[instrWindowPtr] = func_number; instrWindowPtr++; if
30231+ * (instrWindowPtr == INSTR_WINDOW_SIZE) instrWindowPtr = 0;
30232+ * instrWindowCount++; if (instrWindowCount >= INSTR_WINDOW_SIZE) {
30233+ * if ((instrWindowCount % (INSTR_WINDOW_SIZE / 2)) == 0)
30234+ * find_repeated_seq(instrWindow, instrWindowBeginPtr,
30235+ * INSTR_WINDOW_SIZE); instrWindowBeginPtr++; if (instrWindowBeginPtr
30236+ * == INSTR_WINDOW_SIZE) instrWindowBeginPtr = 0; } */
30237+
30238+ /* -1 is special code that indicates time synchro */
30239+ if (func_number == timesynchro_func) {
30240+ long long ts_file;
30241+ fread(&ts_file, sizeof(long long), 1, f);
30242+
30243+ if (compressed_file) {
30244+ WRITE_SHORT(timesynchro_func);
30245+ WRITE_LONGLONG(ts_file);
30246+ }
30247+
30248+ if (!disable_real_time_play_back) {
30249+ gettimeofday(&current_time, NULL);
30250+ long long ts_real =
30251+ (current_time.tv_sec -
30252+ start_time.tv_sec) * (long long) 1000000 +
30253+ current_time.tv_usec - start_time.tv_usec;
30254+ // fprintf(stderr, "%d %d\n", (int)ts_real, (int)ts_file);
30255+ if (ts_real < ts_file/* && ts_file - ts_real > 100 * 1000 */) {
30256+ /* we're playing too fast */
30257+ // fprintf(stderr, "waiting %d usec\n", (int)(ts_file -
30258+ // ts_real));
30259+ usleep((int) (ts_file - ts_real));
30260+ }
30261+ }
30262+ continue;
30263+ } else if (func_number == memorize_array_func) {
30264+ fread(&memorize_array_play, sizeof(short), 1, f);
30265+ goto begin;
30266+ } else if (func_number == reuse_array_func) {
30267+ fread(&reuse_array_play, sizeof(short), 1, f);
30268+ goto begin;
30269+ }
30270+
30271+ assert(func_number >= 0);
30272+
30273+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
30274+ int nb_args = signature->nb_args;
30275+ int *args_type = signature->args_type;
30276+
30277+ for (i = 0; i < nb_args; i++) {
30278+ switch (args_type[i]) {
30279+#if 0
30280+ case TYPE_UNSIGNED_CHAR:
30281+ case TYPE_CHAR:
30282+ {
30283+ char c;
30284+
30285+ fread(&c, sizeof(c), 1, f);
30286+ args[i] = c;
30287+ break;
30288+ }
30289+
30290+ case TYPE_UNSIGNED_SHORT:
30291+ case TYPE_SHORT:
30292+ {
30293+ short s;
30294+
30295+ fread(&s, sizeof(s), 1, f);
30296+ args[i] = s;
30297+ break;
30298+ }
30299+
30300+ case TYPE_FLOAT:
30301+ fread(&args[i], sizeof(int), 1, f);
30302+ break;
30303+
30304+#endif
30305+ case TYPE_UNSIGNED_CHAR:
30306+ case TYPE_CHAR:
30307+ case TYPE_UNSIGNED_INT:
30308+ case TYPE_INT:
30309+ case TYPE_UNSIGNED_SHORT:
30310+ case TYPE_SHORT:
30311+ case TYPE_FLOAT:
30312+ {
30313+ int n;
30314+ fread(&n, sizeof(int), 1, f);
30315+ args[i] = n;
30316+ break;
30317+ }
30318+
30319+ case TYPE_NULL_TERMINATED_STRING:
30320+ CASE_IN_UNKNOWN_SIZE_POINTERS:
30321+ fread(&args_size[i], sizeof(int), 1, f);
30322+ if (args_size[i]) {
30323+ args[i] = (long) malloc(args_size[i]);
30324+ fread((void *) args[i], args_size[i], 1, f);
30325+ } else {
30326+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
30327+ fprintf(stderr, "call %s arg %d\n",
30328+ tab_opengl_calls_name[func_number], i);
30329+ }
30330+ args[i] = 0;
30331+ }
30332+ if (reuse_array_play >= 0) {
30333+ long current_pos = ftell(f);
30334+
30335+ args_size[i] =
30336+ replayBufferedArrays[reuse_array_play].size;
30337+ args[i] = (long) malloc(args_size[i]);
30338+ fseek(f,
30339+ replayBufferedArrays[reuse_array_play].file_offset,
30340+ SEEK_SET);
30341+ fread((void *) args[i], args_size[i], 1, f);
30342+ fseek(f, current_pos, SEEK_SET);
30343+ }
30344+ if (memorize_array_play >= 0) {
30345+ assert(memorize_array_play <= sizeBufferedArraysPlay);
30346+ if (memorize_array_play == sizeBufferedArraysPlay) {
30347+ sizeBufferedArraysPlay++;
30348+ replayBufferedArrays =
30349+ realloc(replayBufferedArrays,
30350+ sizeBufferedArraysPlay *
30351+ sizeof(ReplayBufferedArray));
30352+ replayBufferedArrays[sizeBufferedArraysPlay -
30353+ 1].file_offset = 0;
30354+ }
30355+ replayBufferedArrays[memorize_array_play].file_offset =
30356+ ftell(f) - args_size[i];
30357+ replayBufferedArrays[memorize_array_play].size =
30358+ args_size[i];
30359+ }
30360+ break;
30361+
30362+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
30363+ {
30364+ args_size[i] =
30365+ compute_arg_length(stderr, func_number, i, args);
30366+ args[i] =
30367+ (args_size[i]) ? (long) malloc(args_size[i]) : 0;
30368+ fread((void *) args[i], args_size[i], 1, f);
30369+ break;
30370+ }
30371+
30372+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
30373+ {
30374+ args_size[i] =
30375+ compute_arg_length(stderr, func_number, i, args);
30376+ args[i] = (long) malloc(args_size[i]);
30377+ break;
30378+ }
30379+
30380+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
30381+ {
30382+ fread(&args_size[i], sizeof(int), 1, f);
30383+ if (args_size[i]) {
30384+ args[i] = (long) malloc(args_size[i]);
30385+ } else {
30386+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number)) {
30387+ fprintf(stderr, "call %s arg %d\n",
30388+ tab_opengl_calls_name[func_number], i);
30389+ }
30390+ args[i] = 0;
30391+ }
30392+ break;
30393+ }
30394+
30395+ CASE_OUT_KNOWN_SIZE_POINTERS:
30396+ {
30397+ args_size[i] = tab_args_type_length[args_type[i]];
30398+ assert(args_size[i]);
30399+ args[i] = (long) malloc(args_size[i]);
30400+ break;
30401+ }
30402+
30403+ case TYPE_DOUBLE:
30404+ CASE_IN_KNOWN_SIZE_POINTERS:
30405+ args_size[i] = tab_args_type_length[args_type[i]];
30406+ args[i] = (long) malloc(args_size[i]);
30407+ fread((void *) args[i], args_size[i], 1, f);
30408+ break;
30409+
30410+ case TYPE_IN_IGNORED_POINTER:
30411+ args[i] = 0;
30412+ break;
30413+
30414+ default:
30415+ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
30416+ tab_opengl_calls_name[func_number], i);
30417+ do_disconnect_current();
30418+ return 0;
30419+ }
30420+ }
30421+ if (debug)
30422+ display_gl_call(stderr, func_number, args, args_size);
30423+
30424+ if (debug && reuse_array_play != -1)
30425+ fprintf(stderr, "reuse_array_play %d\n", reuse_array_play);
30426+ if (debug && memorize_array_play != -1)
30427+ fprintf(stderr, "memorize_array_play %d\n", memorize_array_play);
30428+
30429+ if (compressed_file) {
30430+ int reuse_array = -1;
30431+ int memorize_array = -1;
30432+ void *ptr = NULL;
30433+ int bytes_size = 0;
30434+ int do_default = 1;
30435+
30436+ switch (func_number) {
30437+ case glXMakeCurrent_func:
30438+ {
30439+ currentState = args[2];
30440+ assert(currentState >= 0 && currentState < NB_STATES);
30441+ break;
30442+ }
30443+
30444+ case glMatrixMode_func:
30445+ {
30446+ if (states[currentState].matrixMode == args[0]) {
30447+ do_default = 0;
30448+ } else {
30449+ states[currentState].matrixMode = args[0];
30450+ }
30451+ break;
30452+ }
30453+
30454+ case glLoadIdentity_func:
30455+ case glLoadMatrixd_func:
30456+ case glLoadMatrixf_func:
30457+ case glMultMatrixd_func:
30458+ case glMultMatrixf_func:
30459+ case glOrtho_func:
30460+ case glFrustum_func:
30461+ case glRotated_func:
30462+ case glRotatef_func:
30463+ case glScaled_func:
30464+ case glScalef_func:
30465+ case glTranslated_func:
30466+ case glTranslatef_func:
30467+ case glPushMatrix_func:
30468+ case glPopMatrix_func:
30469+ {
30470+ if (states[currentState].matrixMode == 5890) {
30471+ if (states[currentState].lastMatrixOp ==
30472+ glLoadIdentity_func &&
30473+ func_number == glLoadIdentity_func) {
30474+ do_default = 0;
30475+ }
30476+ states[currentState].lastMatrixOp = func_number;
30477+ }
30478+ break;
30479+ }
30480+
30481+ case glPushAttrib_func:
30482+ {
30483+ if (states[currentState].stackAttribPtr <
30484+ MAX_SERVER_STATE_STACK_SIZE) {
30485+ int mask = args[0];
30486+
30487+ states[currentState].stackAttrib[states[currentState].
30488+ stackAttribPtr].
30489+ mask = mask;
30490+ if (mask & GL_TRANSFORM_BIT) {
30491+ states[currentState].
30492+ stackAttrib[states[currentState].
30493+ stackAttribPtr].matrixMode =
30494+ states[currentState].matrixMode;
30495+ states[currentState].
30496+ stackAttrib[states[currentState].
30497+ stackAttribPtr].lastMatrixOp =
30498+ states[currentState].lastMatrixOp;
30499+ }
30500+ states[currentState].stackAttribPtr++;
30501+ }
30502+ break;
30503+ }
30504+
30505+ case glPopAttrib_func:
30506+ {
30507+ if (states[currentState].stackAttribPtr > 0) {
30508+ --states[currentState].stackAttribPtr;
30509+ if (states[currentState].
30510+ stackAttrib[states[currentState].stackAttribPtr].
30511+ mask & GL_TRANSFORM_BIT) {
30512+ states[currentState].matrixMode =
30513+ states[currentState].
30514+ stackAttrib[states[currentState].
30515+ stackAttribPtr].matrixMode;
30516+ states[currentState].lastMatrixOp =
30517+ states[currentState].
30518+ stackAttrib[states[currentState].
30519+ stackAttribPtr].lastMatrixOp;
30520+ }
30521+ }
30522+ break;
30523+ }
30524+
30525+ case glBufferDataARB_func:
30526+ {
30527+ ptr = (void *) args[2];
30528+ bytes_size = args_size[2];
30529+ break;
30530+ }
30531+
30532+ case glVertexPointer_fake_func:
30533+ case glTexCoordPointer_fake_func:
30534+ case glTexCoordPointer01_fake_func:
30535+ case glDrawElements_func:
30536+ {
30537+ ptr = (void *) args[nb_args - 1];
30538+ bytes_size = args_size[nb_args - 1];
30539+ break;
30540+ }
30541+
30542+ default:
30543+ break;
30544+ }
30545+
30546+ if (ptr) {
30547+ unsigned int crc = calc_checksum(ptr, bytes_size, 0xFFFFFFFF);
30548+ long long minInterest = 0x7FFFFFFFFFFFFFFFLL;
30549+ int iMinUsed = -1;
30550+
30551+ instr_count++;
30552+
30553+ for (i = 0; i < N_BUFFERED_ARRAYS; i++) {
30554+ if (recordBufferedArrays[i].crc == crc) {
30555+ // fprintf(stderr, "reusing %d for crc %d\n", i,
30556+ // crc);
30557+ reuse_array = i;
30558+ // fprintf(stderr, "reuse_array %d\n", i);
30559+ recordBufferedArrays[i].n_used++;
30560+ recordBufferedArrays[i].last_use = instr_count;
30561+ break;
30562+ } else if (recordBufferedArrays[i].n_used == 0) {
30563+ // fprintf(stderr, "memorize_array %d\n", i);
30564+ memorize_array = i;
30565+ recordBufferedArrays[i].n_used = 1;
30566+ recordBufferedArrays[i].crc = crc;
30567+ recordBufferedArrays[i].size = bytes_size;
30568+ recordBufferedArrays[i].last_use = instr_count;
30569+ break;
30570+ } else {
30571+ long long interest =
30572+ N_BUFFERED_ARRAYS *
30573+ recordBufferedArrays[i].n_used / (instr_count -
30574+ recordBufferedArrays
30575+ [i].
30576+ last_use)
30577+ /** recordBufferedArrays[i].size*/ ;
30578+ if (interest < minInterest) {
30579+ iMinUsed = i;
30580+ minInterest = interest;
30581+ }
30582+ }
30583+ }
30584+ static unsigned int *discardedCrcs = NULL;
30585+ static int nDiscardedCrcs = 0;
30586+
30587+ if (i == N_BUFFERED_ARRAYS) {
30588+ int j;
30589+
30590+ for (j = 0; j < nDiscardedCrcs; j++) {
30591+ if (discardedCrcs[j] == crc) {
30592+ fprintf(stderr,
30593+ "%x was discarded before and is asked now...\n",
30594+ crc);
30595+ discardedCrcs[j] =
30596+ recordBufferedArrays[iMinUsed].crc;
30597+ break;
30598+ }
30599+ }
30600+ if (j == nDiscardedCrcs) {
30601+ discardedCrcs =
30602+ realloc(discardedCrcs,
30603+ sizeof(int) * (nDiscardedCrcs + 1));
30604+ discardedCrcs[nDiscardedCrcs++] =
30605+ recordBufferedArrays[iMinUsed].crc;
30606+ }
30607+ fprintf(stderr, "discarding %x\n",
30608+ recordBufferedArrays[iMinUsed].crc);
30609+
30610+ memorize_array = iMinUsed;
30611+ recordBufferedArrays[iMinUsed].n_used = 1;
30612+ recordBufferedArrays[iMinUsed].crc = crc;
30613+ recordBufferedArrays[iMinUsed].size = bytes_size;
30614+ recordBufferedArrays[iMinUsed].last_use = instr_count;
30615+ }
30616+
30617+ if (reuse_array != -1) {
30618+ WRITE_SHORT(reuse_array_func);
30619+ WRITE_SHORT(reuse_array);
30620+ } else if (memorize_array != -1) {
30621+ WRITE_SHORT(memorize_array_func);
30622+ WRITE_SHORT(memorize_array);
30623+ }
30624+ }
30625+
30626+ switch (func_number) {
30627+ case glXChooseVisual_func:
30628+ case glXQueryVersion_func:
30629+ case glXQueryExtension_func:
30630+ case glXGetClientString_func:
30631+ case glXQueryExtensionsString_func:
30632+ case glXQueryServerString_func:
30633+ case glXGetProcAddress_fake_func:
30634+ case glXGetProcAddress_global_fake_func:
30635+ case glXGetConfig_func:
30636+ case glXGetConfig_extended_func:
30637+ case glGetIntegerv_func:
30638+ case glGetFloatv_func:
30639+ case glGetBooleanv_func:
30640+ case glGetDoublev_func:
30641+ case glIsEnabled_func:
30642+ case _glGetError_fake_func:
30643+ case glGetString_func:
30644+ {
30645+ do_default = 0;
30646+ break;
30647+ }
30648+
30649+ case glLoadMatrixd_func:
30650+ {
30651+ int j;
30652+
30653+ WRITE_SHORT(glLoadMatrixf_func);
30654+ double *ptr = (double *) args[0];
30655+
30656+ for (j = 0; j < 16; j++) {
30657+ WRITE_FLOAT(ptr[j]);
30658+ }
30659+ do_default = 0;
30660+ break;
30661+ }
30662+
30663+ case glMultMatrixd_func:
30664+ {
30665+ int j;
30666+
30667+ WRITE_SHORT(glMultMatrixf_func);
30668+ double *ptr = (double *) args[0];
30669+
30670+ for (j = 0; j < 16; j++) {
30671+ WRITE_FLOAT(ptr[j]);
30672+ }
30673+ do_default = 0;
30674+ break;
30675+ }
30676+
30677+ case glTranslated_func:
30678+ {
30679+ WRITE_SHORT(glTranslatef_func);
30680+ WRITE_FLOAT(*(double *) args[0]);
30681+ WRITE_FLOAT(*(double *) args[1]);
30682+ WRITE_FLOAT(*(double *) args[2]);
30683+ do_default = 0;
30684+ break;
30685+ }
30686+
30687+ case glScalef_func:
30688+ {
30689+ if (*(float *) &args[0] == 1 && *(float *) &args[1] == 1
30690+ && *(float *) &args[2] == 1)
30691+ do_default = 0;
30692+ break;
30693+ }
30694+
30695+ case glScaled_func:
30696+ {
30697+ if (!
30698+ (*(double *) args[0] == 1 && *(double *) args[1] == 1
30699+ && *(double *) args[2] == 1)) {
30700+ WRITE_SHORT(glScalef_func);
30701+ WRITE_FLOAT(*(double *) args[0]);
30702+ WRITE_FLOAT(*(double *) args[1]);
30703+ WRITE_FLOAT(*(double *) args[2]);
30704+ }
30705+ do_default = 0;
30706+ break;
30707+ }
30708+
30709+ case glRotated_func:
30710+ {
30711+ WRITE_SHORT(glRotatef_func);
30712+ WRITE_FLOAT(*(double *) args[0]);
30713+ WRITE_FLOAT(*(double *) args[1]);
30714+ WRITE_FLOAT(*(double *) args[2]);
30715+ WRITE_FLOAT(*(double *) args[3]);
30716+ do_default = 0;
30717+ break;
30718+ }
30719+#define IS_SHORT(x) ((x) >= -32768 && (x) < 32768)
30720+
30721+ case glRasterPos2i_func:
30722+ {
30723+ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
30724+ WRITE_SHORT(glRasterPos2s_func);
30725+ WRITE_SHORT(args[0]);
30726+ WRITE_SHORT(args[1]);
30727+ do_default = 0;
30728+ }
30729+ break;
30730+ }
30731+
30732+ case glVertex2i_func:
30733+ {
30734+ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
30735+ WRITE_SHORT(glVertex2s_func);
30736+ WRITE_SHORT(args[0]);
30737+ WRITE_SHORT(args[1]);
30738+ do_default = 0;
30739+ }
30740+ break;
30741+ }
30742+
30743+ case glTexCoord2i_func:
30744+ {
30745+ if (IS_SHORT(args[0]) && IS_SHORT(args[1])) {
30746+ WRITE_SHORT(glTexCoord2s_func);
30747+ WRITE_SHORT(args[0]);
30748+ WRITE_SHORT(args[1]);
30749+ do_default = 0;
30750+ }
30751+ break;
30752+ }
30753+
30754+ case glTexCoord2fv_func:
30755+ {
30756+ float *ptr = (float *) args[0];
30757+ float u = ptr[0];
30758+ float v = ptr[1];
30759+
30760+ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7) {
30761+ int ui = (int) u;
30762+ int vi = (int) v;
30763+
30764+ if (IS_SHORT(ui) && IS_SHORT(vi)) {
30765+ WRITE_SHORT(glTexCoord2s_func);
30766+ WRITE_SHORT(ui);
30767+ WRITE_SHORT(vi);
30768+ do_default = 0;
30769+ }
30770+ }
30771+ break;
30772+ }
30773+
30774+ case glTexCoord2f_func:
30775+ {
30776+ float u = *(float *) &args[0];
30777+ float v = *(float *) &args[1];
30778+
30779+ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7) {
30780+ int ui = (int) u;
30781+ int vi = (int) v;
30782+
30783+ if (IS_SHORT(ui) && IS_SHORT(vi)) {
30784+ WRITE_SHORT(glTexCoord2s_func);
30785+ WRITE_SHORT(ui);
30786+ WRITE_SHORT(vi);
30787+ do_default = 0;
30788+ }
30789+ }
30790+ break;
30791+ }
30792+
30793+ case glColor3f_func:
30794+ {
30795+ WRITE_SHORT(glColor3ub_func);
30796+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
30797+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
30798+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
30799+ do_default = 0;
30800+ break;
30801+ }
30802+
30803+ case glColor4f_func:
30804+ {
30805+ if (*(float *) &args[3] == 1) {
30806+ WRITE_SHORT(glColor3ub_func);
30807+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
30808+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
30809+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
30810+ } else {
30811+ WRITE_SHORT(glColor4ub_func);
30812+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[0]);
30813+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[1]);
30814+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[2]);
30815+ WRITE_UNSIGNED_CHAR(255 * *(float *) &args[3]);
30816+ }
30817+ do_default = 0;
30818+ break;
30819+ }
30820+
30821+ case glColor4fv_func:
30822+ {
30823+ float *ptr = (float *) args[0];
30824+
30825+ if (ptr[3] == 1) {
30826+ WRITE_SHORT(glColor3ub_func);
30827+ WRITE_UNSIGNED_CHAR(255 * ptr[0]);
30828+ WRITE_UNSIGNED_CHAR(255 * ptr[1]);
30829+ WRITE_UNSIGNED_CHAR(255 * ptr[2]);
30830+ } else {
30831+ WRITE_SHORT(glColor4ub_func);
30832+ WRITE_UNSIGNED_CHAR(255 * ptr[0]);
30833+ WRITE_UNSIGNED_CHAR(255 * ptr[1]);
30834+ WRITE_UNSIGNED_CHAR(255 * ptr[2]);
30835+ WRITE_UNSIGNED_CHAR(255 * ptr[3]);
30836+ }
30837+ do_default = 0;
30838+ break;
30839+ }
30840+
30841+ case glColor3d_func:
30842+ {
30843+ WRITE_SHORT(glColor3ub_func);
30844+ WRITE_UNSIGNED_CHAR(255 * *(double *) args[0]);
30845+ WRITE_UNSIGNED_CHAR(255 * *(double *) args[1]);
30846+ WRITE_UNSIGNED_CHAR(255 * *(double *) args[2]);
30847+ do_default = 0;
30848+ break;
30849+ }
30850+
30851+ case glVertex3f_func:
30852+ {
30853+ if (*(float *) &args[2] == 0) {
30854+ WRITE_SHORT(glVertex2f_func);
30855+ WRITE_FLOAT(*(float *) &args[0]);
30856+ WRITE_FLOAT(*(float *) &args[1]);
30857+ do_default = 0;
30858+ }
30859+ break;
30860+ }
30861+
30862+ case glVertex3d_func:
30863+ {
30864+ WRITE_SHORT(glVertex3f_func);
30865+ WRITE_FLOAT(*(double *) args[0]);
30866+ WRITE_FLOAT(*(double *) args[1]);
30867+ WRITE_FLOAT(*(double *) args[2]);
30868+ do_default = 0;
30869+ break;
30870+ }
30871+
30872+ case glNormal3fv_func:
30873+ {
30874+ float *ptr = (float *) args[0];
30875+ float u = ptr[0];
30876+ float v = ptr[1];
30877+ float w = ptr[2];
30878+
30879+ if (fabs(u - (int) u) < 1e-7 && fabs(v - (int) v) < 1e-7
30880+ && fabs(w - (int) w) < 1e-7) {
30881+ int ui = (int) u;
30882+ int vi = (int) v;
30883+ int wi = (int) w;
30884+
30885+ if (IS_SHORT(ui) && IS_SHORT(vi) && IS_SHORT(wi)) {
30886+ WRITE_SHORT(glNormal3sv_func);
30887+ WRITE_SHORT(ui);
30888+ WRITE_SHORT(vi);
30889+ WRITE_SHORT(wi);
30890+ do_default = 0;
30891+ }
30892+ }
30893+ break;
30894+ }
30895+
30896+ case glNormal3d_func:
30897+ {
30898+ WRITE_SHORT(glNormal3f_func);
30899+ WRITE_FLOAT(*(double *) args[0]);
30900+ WRITE_FLOAT(*(double *) args[1]);
30901+ WRITE_FLOAT(*(double *) args[2]);
30902+ do_default = 0;
30903+ break;
30904+ }
30905+
30906+ case glDrawElements_func:
30907+ {
30908+ int mode = args[0];
30909+ int count = args[1];
30910+ int type = args[2];
30911+
30912+ if (type == GL_UNSIGNED_INT) {
30913+ int j;
30914+ unsigned int *ptr = (unsigned int *) args[3];
30915+
30916+ for (j = 0; j < count; j++) {
30917+ if ((ptr[j] >> 16) != 0)
30918+ break;
30919+ }
30920+ if (j == count) {
30921+ WRITE_SHORT(func_number);
30922+ WRITE_INT(mode);
30923+ WRITE_INT(count);
30924+ WRITE_INT(GL_UNSIGNED_SHORT);
30925+ if (reuse_array != -1) {
30926+ WRITE_INT(0);
30927+ } else {
30928+ WRITE_INT(count * sizeof(short));
30929+ for (j = 0; j < count; j++) {
30930+ WRITE_SHORT(ptr[j]);
30931+ }
30932+ }
30933+ do_default = 0;
30934+ } else
30935+ do_default = 1;
30936+ } else if (reuse_array != -1) {
30937+ WRITE_SHORT(func_number);
30938+ WRITE_INT(mode);
30939+ WRITE_INT(count);
30940+ WRITE_INT(type);
30941+ WRITE_INT(0);
30942+ do_default = 0;
30943+ } else
30944+ do_default = 1;
30945+ break;
30946+ }
30947+
30948+ case glBufferDataARB_func:
30949+ {
30950+ if (reuse_array != -1) {
30951+ WRITE_SHORT(glBufferDataARB_func);
30952+ WRITE_INT(args[0]);
30953+ WRITE_INT(args[1]);
30954+ WRITE_INT(0);
30955+ WRITE_INT(args[3]);
30956+ do_default = 0;
30957+ }
30958+ break;
30959+ }
30960+
30961+ case glVertexPointer_fake_func:
30962+ case glTexCoordPointer_fake_func:
30963+ case glTexCoordPointer01_fake_func:
30964+ {
30965+ int offset = 0, index = 0, size, type, stride, bytes_size;
30966+ void *ptr;
30967+ int countarg = 0;
30968+
30969+ if (func_number == glVertexPointer_fake_func ||
30970+ func_number == glTexCoordPointer_fake_func)
30971+ offset = args[countarg++];
30972+ if (func_number == glTexCoordPointer_fake_func)
30973+ index = args[countarg++];
30974+ size = args[countarg++];
30975+ type = args[countarg++];
30976+ stride = args[countarg++];
30977+ bytes_size = args[countarg++];
30978+ ptr = (void *) args[countarg++];
30979+ if (type == GL_DOUBLE) {
30980+ int count;
30981+ int j, k;
30982+
30983+ if (stride == 0)
30984+ stride = size * sizeof(double);
30985+ assert((bytes_size % stride) == 0);
30986+ assert((offset % stride) == 0);
30987+ offset = (offset / stride) * size * sizeof(float);
30988+ count = bytes_size / stride;
30989+ WRITE_SHORT(func_number);
30990+ if (func_number == glVertexPointer_fake_func ||
30991+ func_number == glTexCoordPointer_fake_func)
30992+ WRITE_INT(offset);
30993+ if (func_number == glTexCoordPointer_fake_func)
30994+ WRITE_INT(index);
30995+ WRITE_INT(size);
30996+ WRITE_INT(GL_FLOAT);
30997+ WRITE_INT(0);
30998+ WRITE_INT(count * size * sizeof(float));
30999+ if (reuse_array != -1) {
31000+ WRITE_INT(0);
31001+ } else {
31002+ WRITE_INT(count * size * sizeof(float));
31003+ for (j = 0; j < count; j++) {
31004+ for (k = 0; k < size; k++) {
31005+ WRITE_FLOAT(*(double *)
31006+ (ptr + j * stride +
31007+ k * sizeof(double)));
31008+ }
31009+ }
31010+ }
31011+ do_default = 0;
31012+ } else if (reuse_array != -1) {
31013+ WRITE_SHORT(func_number);
31014+ if (func_number == glVertexPointer_fake_func ||
31015+ func_number == glTexCoordPointer_fake_func)
31016+ WRITE_INT(offset);
31017+ if (func_number == glTexCoordPointer_fake_func)
31018+ WRITE_INT(index);
31019+ WRITE_INT(size);
31020+ WRITE_INT(type);
31021+ WRITE_INT(stride);
31022+ WRITE_INT(bytes_size);
31023+ WRITE_INT(0);
31024+ do_default = 0;
31025+ } else
31026+ do_default = 1;
31027+ break;
31028+ }
31029+
31030+ default:
31031+ break;
31032+ }
31033+
31034+ if (do_default) {
31035+ fwrite(&func_number, sizeof(short), 1, compressed_file);
31036+ for (i = 0; i < nb_args; i++) {
31037+ switch (args_type[i]) {
31038+ case TYPE_UNSIGNED_CHAR:
31039+ case TYPE_CHAR:
31040+ {
31041+ char c = args[i];
31042+
31043+ fwrite(&c, sizeof(c), 1, compressed_file);
31044+ break;
31045+ }
31046+
31047+ case TYPE_UNSIGNED_SHORT:
31048+ case TYPE_SHORT:
31049+ {
31050+ short s = args[i];
31051+
31052+ fwrite(&s, sizeof(s), 1, compressed_file);
31053+ break;
31054+ }
31055+
31056+ case TYPE_UNSIGNED_INT:
31057+ case TYPE_INT:
31058+ case TYPE_FLOAT:{
31059+ int n = args[i];
31060+ fwrite(&n, sizeof(int), 1, compressed_file);
31061+ break;
31062+ }
31063+
31064+ case TYPE_NULL_TERMINATED_STRING:
31065+ CASE_IN_UNKNOWN_SIZE_POINTERS:
31066+ fwrite(&args_size[i], sizeof(int), 1,
31067+ compressed_file);
31068+ if (args_size[i]) {
31069+ fwrite((void *) args[i], args_size[i], 1,
31070+ compressed_file);
31071+ }
31072+ break;
31073+
31074+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
31075+ {
31076+ fwrite(&args_size[i], sizeof(int), 1,
31077+ compressed_file);
31078+ break;
31079+ }
31080+
31081+ CASE_OUT_KNOWN_SIZE_POINTERS:
31082+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31083+ {
31084+ break;
31085+ }
31086+
31087+ case TYPE_DOUBLE:
31088+ CASE_IN_KNOWN_SIZE_POINTERS:
31089+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31090+ fwrite((void *) args[i], args_size[i], 1,
31091+ compressed_file);
31092+ break;
31093+
31094+ case TYPE_IN_IGNORED_POINTER:
31095+ break;
31096+
31097+ default:
31098+ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
31099+ tab_opengl_calls_name[func_number], i);
31100+ do_disconnect_current();
31101+ return 0;
31102+ }
31103+ }
31104+ }
31105+ }
31106+
31107+ int new_offset = ftell(f);
31108+
31109+ if (show_offset ||
31110+ (show_diff_offset &&
31111+ new_offset - last_cmd_offset >= show_diff_offset)) {
31112+ fprintf(stderr, "offset = %d, diff=%d\n", new_offset,
31113+ new_offset - last_cmd_offset);
31114+ }
31115+ last_cmd_offset = new_offset;
31116+
31117+ if (func_number == glXCreateContext_func &&
31118+ args[1] == visualid_fbconfig_read) {
31119+ args[1] = visualid_fbconfig_real;
31120+ }
31121+ if (debug) {
31122+ if (func_number == glBindProgramARB_func) {
31123+ fprintf(stderr, "glBindProgramARB_func(y, x) : x = %d\n",
31124+ (int) args[1]);
31125+ } else if (func_number == glXGetProcAddress_fake_func) {
31126+ fprintf(stderr, "glXGetProcAddress_fake(%s)\n",
31127+ (char *) args[0]);
31128+ }
31129+ }
31130+
31131+ if (debug && func_number == glEnable_func) {
31132+ fprintf(stderr, "enable(0x%x)\n", (int) args[0]);
31133+ } else if (debug && func_number == glDisable_func) {
31134+ fprintf(stderr, "disable(0x%x)\n", (int) args[0]);
31135+ }
31136+
31137+ if (resize) {
31138+ if (func_number == _moveResizeWindow_func) {
31139+ int *params = (int *) args[1];
31140+
31141+ orig_window_width = params[2];
31142+ window_height = params[3] =
31143+ params[3] * window_width / params[2];
31144+ params[2] = window_width;
31145+ // buffer = malloc(4 * window_width * window_height);
31146+ } else if (func_number == glViewport_func ||
31147+ func_number == glScissor_func) {
31148+ args[0] = args[0] * window_width / orig_window_width;
31149+ args[1] = args[1] * window_width / orig_window_width;
31150+ args[2] = args[2] * window_width / orig_window_width;
31151+ args[3] = args[3] * window_width / orig_window_width;
31152+ }
31153+ } else if (func_number == _moveResizeWindow_func) {
31154+ int *params = (int *) args[1];
31155+
31156+ window_width = params[2];
31157+ window_height = params[3];
31158+ // buffer = malloc(4 * window_width * window_height);
31159+ }
31160+
31161+ int ret =
31162+ (noplay) ? 0 : do_function_call(func_number, args, ret_string);
31163+
31164+ if (func_number == glXSwapBuffers_func) {
31165+ /* glReadPixels(0, 0, window_width, window_height, GL_RGBA,
31166+ * GL_UNSIGNED_BYTE, buffer); fwrite(buffer, 4 * window_width *
31167+ * window_height, 1, fout); */
31168+
31169+ int diff_time;
31170+
31171+ count_current++;
31172+ gettimeofday(&current_time, NULL);
31173+ diff_time =
31174+ (current_time.tv_sec - last_time.tv_sec) * 1000 +
31175+ (current_time.tv_usec - last_time.tv_usec) / 1000;
31176+ if (diff_time > refresh_rate) {
31177+ printf("%d frames in %.1f seconds = %.3f FPS\n",
31178+ count_current - count_last_time, diff_time / 1000.,
31179+ (count_current - count_last_time) * 1000. / diff_time);
31180+ if (show_hard_disk_bandwith) {
31181+ int current_offset = ftell(f);
31182+
31183+ printf("bandwidth : %.1f MB/s\n",
31184+ (current_offset - last_offset) * 1e-6);
31185+ last_offset = current_offset;
31186+ }
31187+ last_time.tv_sec = current_time.tv_sec;
31188+ last_time.tv_usec = current_time.tv_usec;
31189+ count_last_time = count_current;
31190+ }
31191+ usleep(slowdown * 50000);
31192+ }
31193+ if (debug && func_number == glGenProgramsARB_func && args[0] == 1) {
31194+ fprintf(stderr, "glGenProgramsARB_func(1, &x) : x = %d\n",
31195+ *(int *) args[1]);
31196+ }
31197+
31198+ if (func_number == glXGetVisualFromFBConfig_func) {
31199+ fread(&visualid_fbconfig_read, sizeof(int), 1, f);
31200+ visualid_fbconfig_real = ret;
31201+ }
31202+
31203+ for (i = 0; i < nb_args; i++) {
31204+ switch (args_type[i]) {
31205+ case TYPE_UNSIGNED_INT:
31206+ case TYPE_INT:
31207+ case TYPE_UNSIGNED_CHAR:
31208+ case TYPE_CHAR:
31209+ case TYPE_UNSIGNED_SHORT:
31210+ case TYPE_SHORT:
31211+ case TYPE_FLOAT:
31212+ break;
31213+
31214+ case TYPE_NULL_TERMINATED_STRING:
31215+ CASE_POINTERS:
31216+ case TYPE_DOUBLE:
31217+ if (args[i])
31218+ free((void *) args[i]);
31219+ break;
31220+
31221+ case TYPE_IN_IGNORED_POINTER:
31222+ args[i] = 0;
31223+ break;
31224+
31225+ default:
31226+ fprintf(stderr, "shouldn't happen : call %s arg %d\n",
31227+ tab_opengl_calls_name[func_number], i);
31228+ do_disconnect_current();
31229+ return 0;
31230+ }
31231+ }
31232+ }
31233+ return 0;
31234+}
31235Index: qemu-0.12.4/target-i386/opengl_server.c
31236===================================================================
31237--- /dev/null
31238+++ qemu-0.12.4/target-i386/opengl_server.c
31239@@ -0,0 +1,826 @@
31240+/*
31241+ * TCP/IP OpenGL server
31242+ *
31243+ * Copyright (c) 2007 Even Rouault
31244+ *
31245+ * Permission is hereby granted, free of charge, to any person obtaining a copy
31246+ * of this software and associated documentation files (the "Software"), to deal
31247+ * in the Software without restriction, including without limitation the rights
31248+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
31249+ * copies of the Software, and to permit persons to whom the Software is
31250+ * furnished to do so, subject to the following conditions:
31251+ *
31252+ * The above copyright notice and this permission notice shall be included in
31253+ * all copies or substantial portions of the Software.
31254+ *
31255+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31256+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31257+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
31258+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31259+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31260+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
31261+ * THE SOFTWARE.
31262+ */
31263+
31264+/* gcc -Wall -O2 -g opengl_server.c opengl_exec.c -o opengl_server -I../i386-softmmu -I. -I.. -lGL */
31265+
31266+#include <stdio.h>
31267+#include <errno.h>
31268+#include <stdlib.h>
31269+#include <unistd.h>
31270+#include <string.h>
31271+#include <assert.h>
31272+#include <sys/types.h>
31273+#include <sys/socket.h>
31274+#include <netinet/in.h>
31275+#include <netinet/tcp.h>
31276+#include <netdb.h>
31277+#include <arpa/inet.h>
31278+#include <sys/time.h>
31279+#include <signal.h>
31280+
31281+#include <X11/Xlib.h>
31282+#include <X11/Xutil.h>
31283+
31284+#define PORT 5555
31285+
31286+#define ENABLE_GL_LOG
31287+
31288+#include "opengl_func.h"
31289+#include "opengl_utils.h"
31290+
31291+static int refresh_rate = 1000;
31292+static int must_save = 0;
31293+static int timestamp = 1; /* only valid if must_save == 1. include timestamps in the save file to enable real-time playback */
31294+
31295+extern int display_function_call;
31296+extern void init_process_tab(void);
31297+extern int do_function_call(Display *, int, int, arg_t *, char *);
31298+extern void opengl_exec_set_local_connection(void);
31299+extern void opengl_exec_set_parent_window(Display *_dpy, Window _parent_window);
31300+
31301+#ifdef ENABLE_GL_LOG
31302+static FILE* f = NULL;
31303+
31304+static char* filename = "/tmp/debug_gl.bin";
31305+
31306+#define write_gl_debug_init() do { if (f == NULL) f = fopen(filename, "wb"); } while(0)
31307+
31308+static void inline write_gl_debug_cmd_char(char my_int)
31309+{
31310+ write_gl_debug_init();
31311+ fwrite(&my_int, sizeof(my_int), 1, f);
31312+}
31313+
31314+static void inline write_gl_debug_cmd_short(short my_int)
31315+{
31316+ write_gl_debug_init();
31317+ fwrite(&my_int, sizeof(my_int), 1, f);
31318+}
31319+
31320+static void inline write_gl_debug_cmd_int(int my_int)
31321+{
31322+ write_gl_debug_init();
31323+ fwrite(&my_int, sizeof(my_int), 1, f);
31324+}
31325+
31326+static void inline write_gl_debug_cmd_longlong(long long my_longlong)
31327+{
31328+ write_gl_debug_init();
31329+ fwrite(&my_longlong, sizeof(my_longlong), 1, f);
31330+}
31331+
31332+static void inline write_gl_debug_cmd_buffer_with_size(int size, void* buffer)
31333+{
31334+ write_gl_debug_init();
31335+ fwrite(&size, sizeof(int), 1, f);
31336+ if (size)
31337+ fwrite(buffer, size, 1, f);
31338+}
31339+
31340+static void inline write_gl_debug_cmd_buffer_without_size(int size, void* buffer)
31341+{
31342+ write_gl_debug_init();
31343+ if (size)
31344+ fwrite(buffer, size, 1, f);
31345+}
31346+
31347+static void inline write_gl_debug_end()
31348+{
31349+ write_gl_debug_init();
31350+ fclose(f);
31351+ f = NULL;
31352+}
31353+
31354+#endif
31355+
31356+static void write_sock_data(int sock, void* data, int len)
31357+{
31358+ if (len && data)
31359+ {
31360+ int offset = 0;
31361+ while(offset < len)
31362+ {
31363+ int nwritten = write(sock, data + offset, len - offset);
31364+ if (nwritten == -1)
31365+ {
31366+ if (errno == EINTR)
31367+ continue;
31368+ perror("write");
31369+ assert(nwritten != -1);
31370+ }
31371+ offset += nwritten;
31372+ }
31373+ }
31374+}
31375+
31376+static void inline write_sock_int(int sock, int my_int)
31377+{
31378+ write_sock_data(sock, &my_int, sizeof(int));
31379+}
31380+
31381+static int total_read = 0;
31382+static void read_sock_data(int sock, void* data, int len)
31383+{
31384+ if (len)
31385+ {
31386+ int offset = 0;
31387+ while(offset < len)
31388+ {
31389+ int nread = read(sock, data + offset, len - offset);
31390+ if (nread == -1)
31391+ {
31392+ if (errno == EINTR)
31393+ continue;
31394+ perror("read");
31395+ assert(nread != -1);
31396+ }
31397+ if (nread == 0)
31398+ {
31399+ fprintf(stderr, "nread = 0\n");
31400+ }
31401+ assert(nread > 0);
31402+ offset += nread;
31403+ total_read += nread;
31404+ }
31405+ }
31406+}
31407+
31408+static int inline read_sock_int(int sock)
31409+{
31410+ int ret;
31411+ read_sock_data(sock, &ret, sizeof(int));
31412+ return ret;
31413+}
31414+
31415+static short inline read_sock_short(int sock)
31416+{
31417+ short ret;
31418+ read_sock_data(sock, &ret, sizeof(short));
31419+ return ret;
31420+}
31421+
31422+
31423+static Display* dpy = NULL;
31424+static int parent_xid = -1;
31425+
31426+
31427+static struct timeval last_time, current_time, time_stamp_start;
31428+static int count_last_time = 0, count_current = 0;
31429+
31430+static struct timeval last_read_time, current_read_time;
31431+
31432+int has_x_error = 0;
31433+
31434+int
31435+read_from_client (int sock)
31436+{
31437+ arg_t args[50];
31438+ int args_size[50];
31439+ char ret_string[32768];
31440+ char command_buffer[65536*16];
31441+
31442+ if (dpy == NULL)
31443+ {
31444+ init_process_tab();
31445+ dpy = XOpenDisplay(NULL);
31446+ if (parent_xid != -1)
31447+ {
31448+ opengl_exec_set_parent_window(dpy, parent_xid);
31449+ }
31450+ }
31451+
31452+ int i;
31453+ int func_number = read_sock_short(sock);
31454+
31455+ Signature* signature = (Signature*)tab_opengl_calls[func_number];
31456+ int ret_type = signature->ret_type;
31457+ int nb_args = signature->nb_args;
31458+ int* args_type = signature->args_type;
31459+ int pid = 0;
31460+
31461+ if (func_number == _serialized_calls_func)
31462+ {
31463+ int command_buffer_size = read_sock_int(sock);
31464+ int commmand_buffer_offset = 0;
31465+ read_sock_data(sock, command_buffer, command_buffer_size);
31466+ /* TODO: must convert if client is different word size */
31467+
31468+#ifdef ENABLE_GL_LOG
31469+ if (must_save) write_gl_debug_cmd_short(_serialized_calls_func);
31470+#endif
31471+
31472+ while(commmand_buffer_offset < command_buffer_size)
31473+ {
31474+ func_number = *(short*)(command_buffer + commmand_buffer_offset);
31475+ if( ! (func_number >= 0 && func_number < GL_N_CALLS) )
31476+ {
31477+ fprintf(stderr, "func_number >= 0 && func_number < GL_N_CALLS failed at "
31478+ "commmand_buffer_offset=%d (command_buffer_size=%d)\n",
31479+ commmand_buffer_offset, command_buffer_size);
31480+ exit(-1);
31481+ }
31482+
31483+#ifdef ENABLE_GL_LOG
31484+ if (must_save) write_gl_debug_cmd_short(func_number);
31485+#endif
31486+ commmand_buffer_offset += sizeof(short);
31487+
31488+
31489+ signature = (Signature*)tab_opengl_calls[func_number];
31490+ ret_type = signature->ret_type;
31491+ assert(ret_type == TYPE_NONE);
31492+ nb_args = signature->nb_args;
31493+ args_type = signature->args_type;
31494+
31495+ for(i=0;i<nb_args;i++)
31496+ {
31497+ switch(args_type[i])
31498+ {
31499+ case TYPE_UNSIGNED_CHAR:
31500+ case TYPE_CHAR:
31501+ {
31502+ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
31503+#ifdef ENABLE_GL_LOG
31504+ if (must_save) write_gl_debug_cmd_char(args[i]);
31505+#endif
31506+ commmand_buffer_offset += sizeof(int);
31507+ break;
31508+ }
31509+
31510+ case TYPE_UNSIGNED_SHORT:
31511+ case TYPE_SHORT:
31512+ {
31513+ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
31514+#ifdef ENABLE_GL_LOG
31515+ if (must_save) write_gl_debug_cmd_short(args[i]);
31516+#endif
31517+ commmand_buffer_offset += sizeof(int);
31518+ break;
31519+ }
31520+
31521+ case TYPE_UNSIGNED_INT:
31522+ case TYPE_INT:
31523+ case TYPE_FLOAT:
31524+ {
31525+ args[i] = *(int*)(command_buffer + commmand_buffer_offset);
31526+#ifdef ENABLE_GL_LOG
31527+ if (must_save) write_gl_debug_cmd_int(args[i]);
31528+#endif
31529+ commmand_buffer_offset += sizeof(int);
31530+ break;
31531+ }
31532+
31533+ case TYPE_NULL_TERMINATED_STRING:
31534+ CASE_IN_UNKNOWN_SIZE_POINTERS:
31535+ {
31536+ args_size[i] = *(int*)(command_buffer + commmand_buffer_offset);
31537+ commmand_buffer_offset += sizeof(int);
31538+
31539+ if (args_size[i] == 0)
31540+ {
31541+ args[i] = 0;
31542+ }
31543+ else
31544+ {
31545+ args[i] = (long)(command_buffer + commmand_buffer_offset);
31546+ }
31547+
31548+ if (args[i] == 0)
31549+ {
31550+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
31551+ {
31552+ fprintf(stderr, "call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31553+ return 0;
31554+ }
31555+ }
31556+#ifdef ENABLE_GL_LOG
31557+ if (must_save) write_gl_debug_cmd_buffer_with_size(args_size[i], (void*)args[i]);
31558+#endif
31559+ commmand_buffer_offset += args_size[i];
31560+
31561+ break;
31562+ }
31563+
31564+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31565+ {
31566+ args_size[i] = compute_arg_length(stderr, func_number, i, args);
31567+ args[i] = (args_size[i]) ? (long)(command_buffer + commmand_buffer_offset) : 0;
31568+#ifdef ENABLE_GL_LOG
31569+ if (must_save) write_gl_debug_cmd_buffer_without_size(args_size[i], (void*)args[i]);
31570+#endif
31571+ commmand_buffer_offset += args_size[i];
31572+ break;
31573+ }
31574+
31575+ CASE_OUT_POINTERS:
31576+ {
31577+ fprintf(stderr, "shouldn't happen TYPE_OUT_xxxx : call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31578+ return 0;
31579+ break;
31580+ }
31581+
31582+ case TYPE_DOUBLE:
31583+ CASE_IN_KNOWN_SIZE_POINTERS:
31584+ args[i] = (long)(command_buffer + commmand_buffer_offset);
31585+ args_size[i] = tab_args_type_length[args_type[i]];
31586+#ifdef ENABLE_GL_LOG
31587+ if (must_save) write_gl_debug_cmd_buffer_without_size(tab_args_type_length[args_type[i]], (void*)args[i]);
31588+#endif
31589+ commmand_buffer_offset += tab_args_type_length[args_type[i]];
31590+ break;
31591+
31592+ case TYPE_IN_IGNORED_POINTER:
31593+ args[i] = 0;
31594+ break;
31595+
31596+ default:
31597+ fprintf(stderr, "shouldn't happen : call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31598+ return 0;
31599+ break;
31600+ }
31601+ }
31602+
31603+ if (display_function_call) display_gl_call(stderr, func_number, args, args_size);
31604+
31605+ do_function_call(dpy, func_number, 1, args, ret_string);
31606+ }
31607+ }
31608+ else
31609+ {
31610+#ifdef ENABLE_GL_LOG
31611+ if (must_save && func_number != _synchronize_func) write_gl_debug_cmd_short(func_number);
31612+#endif
31613+
31614+ for(i=0;i<nb_args;i++)
31615+ {
31616+ switch(args_type[i])
31617+ {
31618+ case TYPE_UNSIGNED_CHAR:
31619+ case TYPE_CHAR:
31620+ args[i] = read_sock_int(sock);
31621+#ifdef ENABLE_GL_LOG
31622+ if (must_save) write_gl_debug_cmd_char(args[i]);
31623+#endif
31624+ break;
31625+
31626+ case TYPE_UNSIGNED_SHORT:
31627+ case TYPE_SHORT:
31628+ args[i] = read_sock_int(sock);
31629+#ifdef ENABLE_GL_LOG
31630+ if (must_save) write_gl_debug_cmd_short(args[i]);
31631+#endif
31632+ break;
31633+
31634+ case TYPE_UNSIGNED_INT:
31635+ case TYPE_INT:
31636+ case TYPE_FLOAT:
31637+ args[i] = read_sock_int(sock);
31638+#ifdef ENABLE_GL_LOG
31639+ if (must_save) write_gl_debug_cmd_int(args[i]);
31640+#endif
31641+ break;
31642+
31643+ case TYPE_NULL_TERMINATED_STRING:
31644+ CASE_IN_UNKNOWN_SIZE_POINTERS:
31645+ {
31646+ args_size[i] = read_sock_int(sock);
31647+ if (args_size[i])
31648+ {
31649+ args[i] = (long)malloc(args_size[i]);
31650+ read_sock_data(sock, (void*)args[i], args_size[i]);
31651+ }
31652+ else
31653+ {
31654+ args[i] = 0;
31655+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
31656+ {
31657+ fprintf(stderr, "call %s arg %d\n", tab_opengl_calls_name[func_number], i);
31658+ return 0;
31659+ }
31660+ }
31661+#ifdef ENABLE_GL_LOG
31662+ if (must_save) write_gl_debug_cmd_buffer_with_size(args_size[i], (void*)args[i]);
31663+#endif
31664+ break;
31665+ }
31666+
31667+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31668+ {
31669+ args_size[i] = compute_arg_length(stderr, func_number, i, args);
31670+ args[i] = (args_size[i]) ? (long)malloc(args_size[i]) : 0;
31671+ read_sock_data(sock, (void*)args[i], args_size[i]);
31672+#ifdef ENABLE_GL_LOG
31673+ if (must_save) write_gl_debug_cmd_buffer_without_size(args_size[i], (void*)args[i]);
31674+#endif
31675+ break;
31676+ }
31677+
31678+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
31679+ {
31680+ args_size[i] = compute_arg_length(stderr, func_number, i, args);
31681+ args[i] = (long)malloc(args_size[i]);
31682+ break;
31683+ }
31684+
31685+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
31686+ {
31687+ args_size[i] = read_sock_int(sock);
31688+ if (func_number == glGetProgramLocalParameterdvARB_func)
31689+ {
31690+ fprintf(stderr, "size = %d\n", args_size[i]);
31691+ }
31692+ if (args_size[i])
31693+ {
31694+ args[i] = (long)malloc(args_size[i]);
31695+ }
31696+ else
31697+ {
31698+ if (!IS_NULL_POINTER_OK_FOR_FUNC(func_number))
31699+ {
31700+ fprintf(stderr, "call %s arg %d pid=%d\n", tab_opengl_calls_name[func_number], i, pid);
31701+ return 0;
31702+ };
31703+ args[i] = 0;
31704+ }
31705+ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
31706+#ifdef ENABLE_GL_LOG
31707+ if (must_save) write_gl_debug_cmd_int(args_size[i]);
31708+#endif
31709+ break;
31710+ }
31711+
31712+ CASE_OUT_KNOWN_SIZE_POINTERS:
31713+ {
31714+ args_size[i] = tab_args_type_length[args_type[i]];
31715+ assert(args_size[i]);
31716+ args[i] = (long)malloc(args_size[i]);
31717+ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
31718+ break;
31719+ }
31720+
31721+ case TYPE_DOUBLE:
31722+ CASE_IN_KNOWN_SIZE_POINTERS:
31723+ args_size[i] = tab_args_type_length[args_type[i]];
31724+ args[i] = (long)malloc(args_size[i]);
31725+ read_sock_data(sock, (void*)args[i], args_size[i]);
31726+#ifdef ENABLE_GL_LOG
31727+ if (must_save) write_gl_debug_cmd_buffer_without_size(tab_args_type_length[args_type[i]], (void*)args[i]);
31728+#endif
31729+ break;
31730+
31731+ case TYPE_IN_IGNORED_POINTER:
31732+ args[i] = 0;
31733+ break;
31734+
31735+ default:
31736+ fprintf(stderr, "shouldn't happen : call %s arg %d\n", tab_opengl_calls_name[func_number], i);
31737+ return 0;
31738+ break;
31739+ }
31740+ }
31741+
31742+ if (display_function_call) display_gl_call(stderr, func_number, args, args_size);
31743+
31744+ if (getenv("ALWAYS_FLUSH")) fflush(f);
31745+
31746+ int ret = do_function_call(dpy, func_number, 1, args, ret_string);
31747+#ifdef ENABLE_GL_LOG
31748+ if (must_save && func_number == glXGetVisualFromFBConfig_func)
31749+ {
31750+ write_gl_debug_cmd_int(ret);
31751+ }
31752+#endif
31753+
31754+ for(i=0;i<nb_args;i++)
31755+ {
31756+ switch(args_type[i])
31757+ {
31758+ case TYPE_UNSIGNED_INT:
31759+ case TYPE_INT:
31760+ case TYPE_UNSIGNED_CHAR:
31761+ case TYPE_CHAR:
31762+ case TYPE_UNSIGNED_SHORT:
31763+ case TYPE_SHORT:
31764+ case TYPE_FLOAT:
31765+ break;
31766+
31767+ case TYPE_NULL_TERMINATED_STRING:
31768+ case TYPE_DOUBLE:
31769+ CASE_IN_POINTERS:
31770+ if (args[i]) free((void*)args[i]);
31771+ break;
31772+
31773+ CASE_OUT_POINTERS:
31774+ //fprintf(stderr, "%p %d\n", (void*)args[i], args_size[i]);
31775+ write_sock_data(sock, (void*)args[i], args_size[i]);
31776+ if (display_function_call)
31777+ {
31778+ if (args_type[i] == TYPE_OUT_1INT)
31779+ {
31780+ fprintf(stderr, "out[%d] : %d\n", i, *(int*)args[i]);
31781+ }
31782+ else if (args_type[i] == TYPE_OUT_1FLOAT)
31783+ {
31784+ fprintf(stderr, "out[%d] : %f\n", i, *(float*)args[i]);
31785+ }
31786+ }
31787+ if (args[i]) free((void*)args[i]);
31788+ break;
31789+
31790+ case TYPE_IN_IGNORED_POINTER:
31791+ args[i] = 0;
31792+ break;
31793+
31794+ default:
31795+ fprintf(stderr, "shouldn't happen : call %s arg %d\n", tab_opengl_calls_name[func_number], i);
31796+ return 0;
31797+ break;
31798+ }
31799+ }
31800+
31801+ if (signature->ret_type == TYPE_CONST_CHAR)
31802+ {
31803+ write_sock_int(sock, strlen(ret_string) + 1);
31804+ write_sock_data(sock, ret_string, strlen(ret_string) + 1);
31805+ }
31806+ else if (signature->ret_type != TYPE_NONE)
31807+ {
31808+ write_sock_int(sock, ret);
31809+ }
31810+
31811+#ifdef ENABLE_GL_LOG
31812+ if (must_save && func_number == _exit_process_func)
31813+ {
31814+ write_gl_debug_end();
31815+ }
31816+#endif
31817+ if (func_number == _exit_process_func)
31818+ {
31819+ return -1;
31820+ }
31821+ else if (func_number == glXSwapBuffers_func)
31822+ {
31823+ int diff_time;
31824+ count_current++;
31825+ gettimeofday(&current_time, NULL);
31826+#ifdef ENABLE_GL_LOG
31827+ if (must_save && timestamp)
31828+ {
31829+ long long ts = (current_time.tv_sec - time_stamp_start.tv_sec) * (long long)1000000 + current_time.tv_usec - time_stamp_start.tv_usec;
31830+ /* -1 is special code that indicates time synchro */
31831+ write_gl_debug_cmd_short(timesynchro_func);
31832+ write_gl_debug_cmd_longlong(ts);
31833+ }
31834+#endif
31835+ diff_time = (current_time.tv_sec - last_time.tv_sec) * 1000 + (current_time.tv_usec - last_time.tv_usec) / 1000;
31836+ if (diff_time > refresh_rate)
31837+ {
31838+#ifdef ENABLE_GL_LOG
31839+ fflush(f);
31840+#endif
31841+ printf("%d frames in %.1f seconds = %.3f FPS\n",
31842+ count_current - count_last_time,
31843+ diff_time / 1000.,
31844+ (count_current - count_last_time) * 1000. / diff_time);
31845+ last_time.tv_sec = current_time.tv_sec;
31846+ last_time.tv_usec = current_time.tv_usec;
31847+ count_last_time = count_current;
31848+ }
31849+ }
31850+ }
31851+ return 0;
31852+}
31853+
31854+int
31855+make_socket (uint16_t port)
31856+{
31857+ int sock;
31858+ struct sockaddr_in name;
31859+
31860+ /* Create the socket. */
31861+ sock = socket (PF_INET, SOCK_STREAM, 0);
31862+ if (sock < 0)
31863+ {
31864+ perror ("socket");
31865+ exit (EXIT_FAILURE);
31866+ }
31867+
31868+ /* Give the socket a name. */
31869+ name.sin_family = AF_INET;
31870+ name.sin_port = htons (port);
31871+ name.sin_addr.s_addr = htonl (INADDR_ANY);
31872+ if (bind (sock, (struct sockaddr *) &name, sizeof (name)) < 0)
31873+ {
31874+ perror ("bind");
31875+ exit (EXIT_FAILURE);
31876+ }
31877+
31878+ return sock;
31879+}
31880+
31881+static int x_error_handler(Display *display,
31882+ XErrorEvent *error)
31883+{
31884+ char buf[64];
31885+ XGetErrorText(display, error->error_code, buf, 63);
31886+ fprintf (stderr, "The program received an X Window System error.\n"
31887+ "This probably reflects a bug in the program.\n"
31888+ "The error was '%s'.\n"
31889+ " (Details: serial %ld error_code %d request_code %d minor_code %d)\n",
31890+ buf,
31891+ error->serial,
31892+ error->error_code,
31893+ error->request_code,
31894+ error->minor_code);
31895+ has_x_error = 1;
31896+ return 0;
31897+}
31898+
31899+void usage()
31900+{
31901+ printf("Usage : opengl_server [OPTION]\n\n");
31902+ printf("The following options are available :\n");
31903+ printf("--port=XXXX : set XXX as the port number for the TCP/IP server (default : 5555)\n");
31904+ printf("--debug : output debugging trace on stderr\n");
31905+ printf("--save : dump the serialialized OpenGL flow in a file (default : /tmp/debug_gl.bin)\n");
31906+ printf("--filename=X : the file where to write the serailized OpenGL flow\n");
31907+ printf("--different-windows : even if the client is on 127.0.0.1, display OpenGL on a new X window\n");
31908+ printf("--parent-xid=XXX : use XXX as the XID of the parent X window where to display the OpenGL flow\n");
31909+ printf(" This is useful if you want to run accelerated OpenGL inside a non-patched QEMU\n");
31910+ printf(" or from another emulator, through TCP/IP\n");
31911+ printf("--h or --help : display this help\n");
31912+}
31913+
31914+int
31915+main (int argc, char* argv[])
31916+{
31917+ int sock;
31918+ fd_set active_fd_set, read_fd_set;
31919+ int i;
31920+ struct sockaddr_in clientname;
31921+ socklen_t size;
31922+ int port = PORT;
31923+ int different_windows = 0;
31924+
31925+ for(i=1;i<argc;i++)
31926+ {
31927+ if (argv[i][0] == '-' && argv[i][1] == '-')
31928+ argv[i] = argv[i]+1;
31929+
31930+ if (strcmp(argv[i], "-debug") == 0)
31931+ {
31932+ display_function_call = 1;
31933+ }
31934+ else if (strcmp(argv[i], "-save") == 0)
31935+ {
31936+ must_save = 1;
31937+ }
31938+ else if (strncmp(argv[i], "-port=",6) == 0)
31939+ {
31940+ port = atoi(argv[i] + 6);
31941+ }
31942+ else if (strncmp(argv[i], "-filename=",strlen("-filename=")) == 0)
31943+ {
31944+ filename = argv[i] + strlen("-filename=");
31945+ }
31946+ else if (strncmp(argv[i], "-parent-xid=",strlen("-parent-xid=")) == 0)
31947+ {
31948+ char* c = argv[i] + strlen("-parent-xid=");
31949+ parent_xid = strtol(c, NULL, 0);
31950+ different_windows = 1;
31951+ }
31952+ else if (strcmp(argv[i], "-different-windows") == 0)
31953+ {
31954+ different_windows = 1;
31955+ }
31956+ else if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "-help") == 0)
31957+ {
31958+ usage();
31959+ return 0;
31960+ }
31961+ else
31962+ {
31963+ fprintf(stderr, "unknown parameter : %s\n", argv[i]);
31964+ usage();
31965+ return -1;
31966+ }
31967+ }
31968+
31969+ /* Create the socket and set it up to accept connections. */
31970+ sock = make_socket (port);
31971+
31972+ int flag = 1;
31973+ if (setsockopt(sock, IPPROTO_IP, SO_REUSEADDR,(char *)&flag, sizeof(int)) != 0)
31974+ {
31975+ perror("setsockopt SO_REUSEADDR");
31976+ }
31977+ if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,(char *)&flag, sizeof(int)) != 0)
31978+ {
31979+ perror("setsockopt TCP_NODELAY");
31980+ }
31981+
31982+ if (listen (sock, 1) < 0)
31983+ {
31984+ perror ("listen");
31985+ exit (EXIT_FAILURE);
31986+ }
31987+
31988+ struct sigaction action;
31989+ action.sa_handler = SIG_IGN;
31990+ action.sa_flags = SA_NOCLDWAIT;
31991+ sigaction(SIGCHLD,&action,NULL);
31992+
31993+ FD_ZERO (&active_fd_set);
31994+ FD_SET (sock, &active_fd_set);
31995+
31996+ while(1)
31997+ {
31998+ int new, pid;
31999+
32000+ read_fd_set = active_fd_set;
32001+ if (select (FD_SETSIZE, &read_fd_set, NULL, NULL, NULL) < 0)
32002+ {
32003+ perror ("select");
32004+ exit (EXIT_FAILURE);
32005+ }
32006+
32007+ size = sizeof (clientname);
32008+ new = accept (sock, (struct sockaddr *) &clientname, &size);
32009+ if (new < 0)
32010+ {
32011+ perror ("accept");
32012+ exit (EXIT_FAILURE);
32013+ }
32014+ pid = fork();
32015+ if (pid == -1)
32016+ {
32017+ perror ("fork");
32018+ exit(EXIT_FAILURE);
32019+ }
32020+ if (pid == 0)
32021+ {
32022+ close(sock);
32023+
32024+ fprintf (stderr, "Server: connect from host %s, port %hd.\n",
32025+ inet_ntoa (clientname.sin_addr),
32026+ ntohs (clientname.sin_port));
32027+
32028+ gettimeofday(&last_time, NULL);
32029+ gettimeofday(&last_read_time, NULL);
32030+
32031+ if (strcmp(inet_ntoa(clientname.sin_addr), "127.0.0.1") == 0 &&
32032+ different_windows == 0)
32033+ {
32034+ opengl_exec_set_local_connection();
32035+ }
32036+
32037+ if (timestamp)
32038+ {
32039+ gettimeofday(&time_stamp_start, NULL);
32040+ }
32041+
32042+ XSetErrorHandler(x_error_handler);
32043+
32044+ while(1)
32045+ {
32046+ if (read_from_client (new) < 0)
32047+ {
32048+ do_function_call(dpy, _exit_process_func, 1, NULL, NULL);
32049+
32050+ fprintf (stderr, "Server: disconnect from host %s, port %hd.\n",
32051+ inet_ntoa (clientname.sin_addr),
32052+ ntohs (clientname.sin_port));
32053+
32054+ return 0;
32055+ }
32056+ }
32057+ }
32058+ else
32059+ {
32060+ close(new);
32061+ }
32062+ }
32063+
32064+ return 0;
32065+}
32066Index: qemu-0.12.4/target-i386/opengl_utils.h
32067===================================================================
32068--- /dev/null
32069+++ qemu-0.12.4/target-i386/opengl_utils.h
32070@@ -0,0 +1,453 @@
32071+/*
32072+ * Functions used by host & client sides
32073+ *
32074+ * Copyright (c) 2007 Even Rouault
32075+ *
32076+ * Permission is hereby granted, free of charge, to any person obtaining a copy
32077+ * of this software and associated documentation files (the "Software"), to deal
32078+ * in the Software without restriction, including without limitation the rights
32079+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
32080+ * copies of the Software, and to permit persons to whom the Software is
32081+ * furnished to do so, subject to the following conditions:
32082+ *
32083+ * The above copyright notice and this permission notice shall be included in
32084+ * all copies or substantial portions of the Software.
32085+ *
32086+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32087+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32088+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
32089+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
32090+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32091+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
32092+ * THE SOFTWARE.
32093+ */
32094+
32095+
32096+#ifndef _OPENGL_UTILS
32097+#define _OPENGL_UTILS
32098+
32099+typedef struct {
32100+ unsigned int *values;
32101+ int nbValues;
32102+} RangeAllocator;
32103+
32104+/*
32105+static void print_range(RangeAllocator* range)
32106+{
32107+ int i;
32108+ printf("%s", "table : ");
32109+ for(i=0;i<range->nbValues;i++)
32110+ {
32111+ printf("%d ", range->values[i]);
32112+ }
32113+ printf("\n");
32114+}
32115+*/
32116+
32117+static inline void alloc_value(RangeAllocator *range, unsigned int value)
32118+{
32119+ if (value == 0)
32120+ return;
32121+ if (range->nbValues >= 1) {
32122+ int lower = 0;
32123+ int upper = range->nbValues - 1;
32124+
32125+ while (1) {
32126+ int mid = (lower + upper) / 2;
32127+
32128+ if (range->values[mid] > value)
32129+ upper = mid;
32130+ else if (range->values[mid] < value)
32131+ lower = mid;
32132+ else
32133+ break;
32134+ if (upper - lower <= 1) {
32135+ if (value < range->values[lower]) {
32136+ range->values =
32137+ realloc(range->values,
32138+ (range->nbValues + 1) * sizeof(int));
32139+ memmove(&range->values[lower + 1], &range->values[lower],
32140+ (range->nbValues - lower) * sizeof(int));
32141+ range->values[lower] = value;
32142+ range->nbValues++;
32143+ } else if (value == range->values[lower]) {
32144+ } else if (value < range->values[upper]) {
32145+ range->values =
32146+ realloc(range->values,
32147+ (range->nbValues + 1) * sizeof(int));
32148+ memmove(&range->values[upper + 1], &range->values[upper],
32149+ (range->nbValues - upper) * sizeof(int));
32150+ range->values[upper] = value;
32151+ range->nbValues++;
32152+ } else if (value == range->values[upper]) {
32153+ } else {
32154+ upper++;
32155+
32156+ range->values =
32157+ realloc(range->values,
32158+ (range->nbValues + 1) * sizeof(int));
32159+ memmove(&range->values[upper + 1], &range->values[upper],
32160+ (range->nbValues - upper) * sizeof(int));
32161+ range->values[upper] = value;
32162+ range->nbValues++;
32163+ }
32164+ break;
32165+ }
32166+ }
32167+ } else {
32168+ range->values = malloc(sizeof(int));
32169+ range->values[0] = value;
32170+ range->nbValues = 1;
32171+ }
32172+}
32173+
32174+/* return first value */
32175+static inline unsigned int alloc_range(RangeAllocator *range, int n,
32176+ unsigned int *values)
32177+{
32178+ int i, j;
32179+
32180+ if (range->nbValues == 0) {
32181+ range->nbValues = n;
32182+ range->values = malloc(n * sizeof(int));
32183+ for (i = 0; i < n; i++) {
32184+ range->values[i] = i + 1;
32185+ if (values)
32186+ values[i] = range->values[i];
32187+ }
32188+ return 1;
32189+ } else {
32190+ int lastValue = 1;
32191+
32192+ for (i = 0; i < range->nbValues; i++) {
32193+ if ((int) range->values[i] - (int) lastValue - 1 >= n) {
32194+ range->values =
32195+ realloc(range->values,
32196+ (range->nbValues + n) * sizeof(int));
32197+ memmove(&range->values[i + n], &range->values[i],
32198+ (range->nbValues - i) * sizeof(int));
32199+ for (j = 0; j < n; j++) {
32200+ range->values[i + j] = lastValue + 1 + j;
32201+ if (values)
32202+ values[j] = range->values[i + j];
32203+ }
32204+ range->nbValues += n;
32205+ break;
32206+ } else
32207+ lastValue = range->values[i];
32208+ }
32209+ if (i == range->nbValues) {
32210+ range->values =
32211+ realloc(range->values, (range->nbValues + n) * sizeof(int));
32212+ for (j = 0; j < n; j++) {
32213+ range->values[i + j] = lastValue + 1 + j;
32214+ if (values)
32215+ values[j] = range->values[i + j];
32216+ }
32217+ range->nbValues += n;
32218+ }
32219+ return lastValue + 1;
32220+ }
32221+}
32222+
32223+static inline void delete_value(RangeAllocator *range, unsigned int value)
32224+{
32225+ if (value == 0)
32226+ return;
32227+ if (range->nbValues >= 1) {
32228+ int lower = 0;
32229+ int upper = range->nbValues - 1;
32230+
32231+ while (1) {
32232+ int mid = (lower + upper) / 2;
32233+
32234+ if (range->values[mid] > value)
32235+ upper = mid;
32236+ else if (range->values[mid] < value)
32237+ lower = mid;
32238+ else {
32239+ lower = upper = mid;
32240+ }
32241+ if (upper - lower <= 1) {
32242+ if (value == range->values[lower]) {
32243+ memmove(&range->values[lower], &range->values[lower + 1],
32244+ (range->nbValues - lower - 1) * sizeof(int));
32245+ range->nbValues--;
32246+ } else if (value == range->values[upper]) {
32247+ memmove(&range->values[upper], &range->values[upper + 1],
32248+ (range->nbValues - upper - 1) * sizeof(int));
32249+ range->nbValues--;
32250+ }
32251+ break;
32252+ }
32253+ }
32254+ }
32255+}
32256+
32257+static inline void delete_range(RangeAllocator *range, int n,
32258+ const unsigned int *values)
32259+{
32260+ int i;
32261+
32262+ for (i = 0; i < n; i++) {
32263+ delete_value(range, values[i]);
32264+ }
32265+}
32266+
32267+static inline void delete_consecutive_values(RangeAllocator *range,
32268+ unsigned int first, int n)
32269+{
32270+ int i;
32271+
32272+ for (i = 0; i < n; i++) {
32273+ delete_value(range, first + i);
32274+ }
32275+}
32276+
32277+
32278+/*****************************************************************/
32279+/* */
32280+/* CRC LOOKUP TABLE */
32281+/* ================ */
32282+/* The following CRC lookup table was generated automagically */
32283+/* by the Rocksoft^tm Model CRC Algorithm Table Generation */
32284+/* Program V1.0 using the following model parameters: */
32285+/* */
32286+/* Width : 4 bytes. */
32287+/* Poly : 0x04C11DB7L */
32288+/* Reverse : TRUE. */
32289+/* */
32290+/* For more information on the Rocksoft^tm Model CRC Algorithm, */
32291+/* see the document titled "A Painless Guide to CRC Error */
32292+/* Detection Algorithms" by Ross Williams */
32293+/* (ross@guest.adelaide.edu.au.). This document is likely to be */
32294+/* in the FTP archive "ftp.adelaide.edu.au/pub/rocksoft". */
32295+/* */
32296+/*****************************************************************/
32297+
32298+static const unsigned int crctable[256] = {
32299+ 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,
32300+ 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
32301+ 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,
32302+ 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
32303+ 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,
32304+ 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
32305+ 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,
32306+ 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,
32307+ 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,
32308+ 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
32309+ 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,
32310+ 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
32311+ 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,
32312+ 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,
32313+ 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,
32314+ 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,
32315+ 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,
32316+ 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
32317+ 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,
32318+ 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
32319+ 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,
32320+ 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,
32321+ 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,
32322+ 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
32323+ 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,
32324+ 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,
32325+ 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,
32326+ 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,
32327+ 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,
32328+ 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
32329+ 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,
32330+ 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,
32331+ 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,
32332+ 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,
32333+ 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,
32334+ 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
32335+ 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,
32336+ 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,
32337+ 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,
32338+ 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
32339+ 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,
32340+ 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
32341+ 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,
32342+ 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,
32343+ 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,
32344+ 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,
32345+ 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,
32346+ 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
32347+ 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,
32348+ 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
32349+ 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,
32350+ 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,
32351+ 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,
32352+ 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
32353+ 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,
32354+ 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,
32355+ 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,
32356+ 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,
32357+ 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,
32358+ 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
32359+ 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,
32360+ 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,
32361+ 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,
32362+ 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
32363+};
32364+
32365+static unsigned int calc_checksum(const void *_ptr, int length,
32366+ unsigned int seed)
32367+{
32368+ int i;
32369+ unsigned int crc = seed;
32370+ unsigned char *ptr = (unsigned char *) _ptr;
32371+
32372+ if (ptr == NULL)
32373+ return -1;
32374+ for (i = 0; i < length; i++) {
32375+ crc = crctable[(crc ^ *ptr++) & 0xFF] ^ (crc >> 8);
32376+ }
32377+ return crc;
32378+}
32379+
32380+
32381+static inline void display_gl_call(FILE *f,
32382+ int func_number, arg_t *args, int *args_size)
32383+{
32384+ int i;
32385+
32386+ if (func_number < 0) {
32387+ fprintf(f, "unknown call : %d\n", func_number);
32388+ return;
32389+ }
32390+ Signature *signature = (Signature *) tab_opengl_calls[func_number];
32391+ int nb_args = signature->nb_args;
32392+ int *args_type = signature->args_type;
32393+
32394+ fprintf(f, "%s(", tab_opengl_calls_name[func_number]);
32395+
32396+ for (i = 0; i < nb_args; i++) {
32397+ switch (args_type[i]) {
32398+ case TYPE_UNSIGNED_CHAR:
32399+ case TYPE_CHAR:
32400+ {
32401+ fprintf(f, "%d", (char) args[i]);
32402+ break;
32403+ }
32404+
32405+ case TYPE_UNSIGNED_SHORT:
32406+ case TYPE_SHORT:
32407+ {
32408+ fprintf(f, "%d", (short) args[i]);
32409+ break;
32410+ }
32411+
32412+ case TYPE_UNSIGNED_INT:
32413+ case TYPE_INT:
32414+ {
32415+ fprintf(f, "%d", (int) args[i]);
32416+ break;
32417+ }
32418+
32419+ case TYPE_FLOAT:
32420+ fprintf(f, "%f", *(float *) &args[i]);
32421+ break;
32422+
32423+ case TYPE_DOUBLE:
32424+ CASE_IN_KNOWN_SIZE_POINTERS:
32425+ case TYPE_NULL_TERMINATED_STRING:
32426+ CASE_IN_UNKNOWN_SIZE_POINTERS:
32427+ CASE_IN_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
32428+ if (args_type[i] == TYPE_NULL_TERMINATED_STRING) {
32429+ fprintf(f, "\"%s\"", (char *) args[i]);
32430+ } else if (args_type[i] == TYPE_DOUBLE)
32431+ fprintf(f, "%f", *(double *) args[i]);
32432+ else if (IS_ARRAY_CHAR(args_type[i]) &&
32433+ args_size[i] <= 4 * sizeof(char)) {
32434+ int j;
32435+ int n = args_size[i] / sizeof(char);
32436+
32437+ fprintf(f, "(");
32438+ for (j = 0; j < n; j++) {
32439+ fprintf(f, "%d", ((unsigned char *) args[i])[j]);
32440+ if (j != n - 1)
32441+ fprintf(f, ", ");
32442+ }
32443+ fprintf(f, ")");
32444+ } else if (IS_ARRAY_SHORT(args_type[i]) &&
32445+ args_size[i] <= 4 * sizeof(short)) {
32446+ int j;
32447+ int n = args_size[i] / sizeof(short);
32448+
32449+ fprintf(f, "(");
32450+ for (j = 0; j < n; j++) {
32451+ fprintf(f, "%d", ((short *) args[i])[j]);
32452+ if (j != n - 1)
32453+ fprintf(f, ", ");
32454+ }
32455+ fprintf(f, ")");
32456+ } else if (IS_ARRAY_INT(args_type[i]) &&
32457+ args_size[i] <= 4 * sizeof(int)) {
32458+ int j;
32459+ int n = args_size[i] / sizeof(int);
32460+
32461+ fprintf(f, "(");
32462+ for (j = 0; j < n; j++) {
32463+ fprintf(f, "%d", ((int *) args[i])[j]);
32464+ if (j != n - 1)
32465+ fprintf(f, ", ");
32466+ }
32467+ fprintf(f, ")");
32468+ } else if (IS_ARRAY_FLOAT(args_type[i]) &&
32469+ args_size[i] <= 4 * sizeof(float)) {
32470+ int j;
32471+ int n = args_size[i] / sizeof(float);
32472+
32473+ fprintf(f, "(");
32474+ for (j = 0; j < n; j++) {
32475+ fprintf(f, "%f", ((float *) args[i])[j]);
32476+ if (j != n - 1)
32477+ fprintf(f, ", ");
32478+ }
32479+ fprintf(f, ")");
32480+ } else if (IS_ARRAY_DOUBLE(args_type[i]) &&
32481+ args_size[i] <= 4 * sizeof(double)) {
32482+ int j;
32483+ int n = args_size[i] / sizeof(double);
32484+
32485+ fprintf(f, "(");
32486+ for (j = 0; j < n; j++) {
32487+ fprintf(f, "%f", ((double *) args[i])[j]);
32488+ if (j != n - 1)
32489+ fprintf(f, ", ");
32490+ }
32491+ fprintf(f, ")");
32492+ } else {
32493+ fprintf(f, "%d bytes", args_size[i]);
32494+ fprintf(f, "(crc = 0x%x)",
32495+ calc_checksum((void *) args[i], args_size[i],
32496+ 0xFFFFFFFF));
32497+ }
32498+ break;
32499+
32500+ CASE_OUT_LENGTH_DEPENDING_ON_PREVIOUS_ARGS:
32501+ CASE_OUT_UNKNOWN_SIZE_POINTERS:
32502+ CASE_OUT_KNOWN_SIZE_POINTERS:
32503+ {
32504+ fprintf(f, "%d bytes (OUT)", args_size[i]);
32505+ break;
32506+ }
32507+
32508+ case TYPE_IN_IGNORED_POINTER:
32509+ break;
32510+
32511+ default:
32512+ fprintf(f, "shouldn't happen : call %s arg %d\n",
32513+ tab_opengl_calls_name[func_number], i);
32514+ return;
32515+ break;
32516+ }
32517+ if (i < nb_args - 1)
32518+ fprintf(f, ", ");
32519+ }
32520+ fprintf(f, ")\n");
32521+}
32522+
32523+#endif
32524Index: qemu-0.12.4/target-i386/parse_gl_h.c
32525===================================================================
32526--- /dev/null
32527+++ qemu-0.12.4/target-i386/parse_gl_h.c
32528@@ -0,0 +1,1496 @@
32529+/*
32530+ * Parse gl.h et glx.h to auto-generate source code
32531+ *
32532+ * Copyright (c) 2006,2007 Even Rouault
32533+ *
32534+ * Permission is hereby granted, free of charge, to any person obtaining a copy
32535+ * of this software and associated documentation files (the "Software"), to deal
32536+ * in the Software without restriction, including without limitation the rights
32537+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
32538+ * copies of the Software, and to permit persons to whom the Software is
32539+ * furnished to do so, subject to the following conditions:
32540+ *
32541+ * The above copyright notice and this permission notice shall be included in
32542+ * all copies or substantial portions of the Software.
32543+ *
32544+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32545+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32546+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
32547+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
32548+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32549+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
32550+ * THE SOFTWARE.
32551+ */
32552+
32553+/* gcc -g parse_gl_h.c -o parse_gl_h && ./parse_gl_h */
32554+#include <stdio.h>
32555+#include <stdlib.h>
32556+#include <string.h>
32557+#include <assert.h>
32558+
32559+int isExtByName(const char* name)
32560+{
32561+ return (strstr(name, "ARB") != NULL) ||
32562+ (strstr(name, "IBM") != NULL) ||
32563+ (strstr(name, "EXT") != NULL) ||
32564+ (strstr(name, "ATI") != NULL) ||
32565+ (strstr(name, "NV") != NULL) ||
32566+ (strstr(name, "MESA") != NULL) ||
32567+ (strstr(name, "APPLE") != NULL) ||
32568+ (strstr(name, "SUN") != NULL) ||
32569+ (strstr(name, "SGI") != NULL);
32570+}
32571+
32572+char* get_arg_type(char* s)
32573+{
32574+ while(*s == ' ' || *s == '\t') s++;
32575+ char* n = s;
32576+ char* c = strstr(n, "const");
32577+ if (c)
32578+ n += 6;
32579+
32580+ char* t = strstr(n, " ");
32581+ if (t)
32582+ {
32583+ if (t[1] == '*')
32584+ t += 2;
32585+ t[0] = 0;
32586+ char* ori = t;
32587+ t = strstr(t+1, "[");
32588+ if (t)
32589+ {
32590+ memmove(ori, t, strlen(t));
32591+ strstr(ori, "]")[1] = 0;
32592+ }
32593+ }
32594+ return strdup(s);
32595+}
32596+
32597+typedef struct
32598+{
32599+ char* type;
32600+ char* name;
32601+ int nargs;
32602+ char** args;
32603+ int ok;
32604+ int just_for_server_side;
32605+ int has_out_parameters;
32606+ int isExt;
32607+} FuncDesc;
32608+
32609+int isExt(FuncDesc* func)
32610+{
32611+ return func->isExt;
32612+}
32613+
32614+char* get_type_string(char* type)
32615+{
32616+ if (strstr(type, "[16]"))
32617+ {
32618+ if (strstr(type, "float"))
32619+ return ("TYPE_16FLOAT");
32620+ else if (strstr(type, "double"))
32621+ return ("TYPE_16DOUBLE");
32622+ else
32623+ {
32624+ printf("inconnu %s\n", type);
32625+ exit(-1);
32626+ }
32627+ }
32628+ else if (strstr(type, "[128]") && strstr(type, "GLubyte"))
32629+ return strstr(type, "const") ? "TYPE_128UCHAR" : "TYPE_OUT_128UCHAR";
32630+ else if (strstr(type, "const GLvoid *"))
32631+ return "TYPE_ARRAY_VOID";
32632+ else if (strstr(type, "const GLchar *") ||
32633+ strstr(type, "const GLcharARB *"))
32634+ return "TYPE_NULL_TERMINATED_STRING";
32635+ else if (strstr(type, "const GLbyte *"))
32636+ return "TYPE_ARRAY_SIGNED_CHAR";
32637+ else if (strstr(type, "const GLubyte *"))
32638+ return "TYPE_ARRAY_UNSIGNED_CHAR";
32639+ else if (strstr(type, "const GLshort *"))
32640+ return "TYPE_ARRAY_SHORT";
32641+ else if (strstr(type, "const GLushort *") ||
32642+ strstr(type, "const GLhalfNV *"))
32643+ return "TYPE_ARRAY_UNSIGNED_SHORT";
32644+ else if (strstr(type, "const GLint *"))
32645+ return "TYPE_ARRAY_INT";
32646+ else if (strstr(type, "const GLuint *") ||
32647+ strstr(type, "const GLenum *"))
32648+ return "TYPE_ARRAY_UNSIGNED_INT";
32649+ else if (strstr(type, "const GLfloat *") ||
32650+ strstr(type, "const GLclampf *"))
32651+ return "TYPE_ARRAY_FLOAT";
32652+ else if (strstr(type, "const GLdouble *"))
32653+ return "TYPE_ARRAY_DOUBLE";
32654+ else if (strstr(type, "GLvoid *"))
32655+ return "TYPE_OUT_ARRAY_VOID";
32656+ else if (strstr(type, "GLboolean *") ||
32657+ strstr(type, "GLubyte *"))
32658+ return "TYPE_OUT_ARRAY_UNSIGNED_CHAR";
32659+ else if (strstr(type, "GLcharARB *") ||
32660+ strstr(type, "GLchar *"))
32661+ return "TYPE_OUT_ARRAY_CHAR";
32662+ else if (strstr(type, "GLshort *"))
32663+ return "TYPE_OUT_ARRAY_SHORT";
32664+ else if (strstr(type, "GLushort *"))
32665+ return "TYPE_OUT_ARRAY_UNSIGNED_SHORT";
32666+ else if (strstr(type, "GLint *")||
32667+ strstr(type, "GLsizei *"))
32668+ return "TYPE_OUT_ARRAY_INT";
32669+ else if (strstr(type, "GLuint *") ||
32670+ strstr(type, "GLenum *") ||
32671+ strstr(type, "GLhandleARB *"))
32672+ return "TYPE_OUT_ARRAY_UNSIGNED_INT";
32673+ else if (strstr(type, "GLfloat *"))
32674+ return "TYPE_OUT_ARRAY_FLOAT";
32675+ else if (strstr(type, "GLdouble *"))
32676+ return "TYPE_OUT_ARRAY_DOUBLE";
32677+ else if (strcmp(type, "void") == 0)
32678+ return("TYPE_NONE");
32679+ else if (strcmp(type, "GLbyte") == 0)
32680+ return("TYPE_CHAR");
32681+ else if (strcmp(type, "GLubyte") == 0 ||
32682+ strcmp(type, "GLboolean") == 0)
32683+ return("TYPE_UNSIGNED_CHAR");
32684+ else if (strcmp(type, "GLshort") == 0)
32685+ return("TYPE_SHORT");
32686+ else if (strcmp(type, "GLushort") == 0 ||
32687+ strcmp(type, "GLhalfNV") == 0)
32688+ return("TYPE_UNSIGNED_SHORT");
32689+ else if (strcmp(type, "GLint") == 0 ||
32690+ strcmp(type, "GLsizei") == 0 ||
32691+ strcmp(type, "GLintptr") == 0 ||
32692+ strcmp(type, "GLsizeiptr") == 0 ||
32693+ strcmp(type, "GLintptrARB") == 0 ||
32694+ strcmp(type, "GLsizeiptrARB") == 0)
32695+ return("TYPE_INT");
32696+ else if (strcmp(type, "GLenum") == 0 ||
32697+ strcmp(type, "GLuint") == 0 ||
32698+ strcmp(type, "GLhandleARB") == 0 ||
32699+ strcmp(type, "GLbitfield") == 0)
32700+ return("TYPE_UNSIGNED_INT");
32701+ else if (strcmp(type, "GLfloat") == 0 ||
32702+ strcmp(type, "GLclampf") == 0)
32703+ return("TYPE_FLOAT");
32704+ else if (strcmp(type, "GLdouble") == 0 ||
32705+ strcmp(type, "GLclampd") == 0)
32706+ return("TYPE_DOUBLE");
32707+ else
32708+ {
32709+ printf("inconnu %s\n", type);
32710+ exit(-1);
32711+ }
32712+}
32713+
32714+typedef struct
32715+{
32716+ char* letter;
32717+ char* signature_type_name;
32718+ char* gl_c_type_name;
32719+ char* c_type_name;
32720+} ForIsKnownArgVector;
32721+
32722+#define N_ELEMENTS(x) (sizeof(x)/sizeof(x[0]))
32723+#define N_FIELDS_IN_ARG_VECTOR 4
32724+
32725+
32726+typedef struct
32727+{
32728+ char* func_name;
32729+ char* signature_type_name;
32730+} KnownLastArgFunc;
32731+
32732+static KnownLastArgFunc knownLastArgFuncs[] =
32733+{
32734+{"glFogCoordfv", "TYPE_1FLOAT"},
32735+{"glFogCoorddv", "TYPE_1DOUBLE"},
32736+{"glFogCoordfvEXT", "TYPE_1FLOAT"},
32737+{"glFogCoorddvEXT", "TYPE_1DOUBLE"},
32738+{"glFogCoordhvNV", "TYPE_1USHORT"},
32739+
32740+{"glGetFenceivNV", "TYPE_OUT_1INT"},
32741+
32742+{"glGetTexLevelParameteriv", "TYPE_OUT_1INT" },
32743+{"glGetTexLevelParameterfv", "TYPE_OUT_1FLOAT" },
32744+
32745+{"glGetRenderbufferParameterivEXT", "TYPE_OUT_1INT"},
32746+{"glGetFramebufferAttachmentParameterivEXT", "TYPE_OUT_1INT"},
32747+{"glGetFinalCombinerInputParameterivNV", "TYPE_OUT_1INT"},
32748+{"glGetCombinerOutputParameterivNV", "TYPE_OUT_1INT"},
32749+{"glGetCombinerInputParameterivNV", "TYPE_OUT_1INT"},
32750+{"glGetOcclusionQueryivNV", "TYPE_OUT_1INT"},
32751+{"glGetOcclusionQueryuivNV", "TYPE_OUT_1UINT"},
32752+{"glGetObjectParameterivARB", "TYPE_OUT_1INT"},
32753+{"glGetQueryivARB", "TYPE_OUT_1INT"},
32754+{"glGetQueryiv", "TYPE_OUT_1INT"},
32755+{"glGetQueryObjectivARB", "TYPE_OUT_1INT"},
32756+{"glGetQueryObjectiv", "TYPE_OUT_1INT"},
32757+{"glGetQueryObjectuivARB", "TYPE_OUT_1UINT"},
32758+{"glGetQueryObjectuiv", "TYPE_OUT_1UINT"},
32759+{"glGetProgramivARB", "TYPE_OUT_1INT"},
32760+{"glGetProgramiv", "TYPE_OUT_1INT"},
32761+{"glGetProgramivNV", "TYPE_OUT_1INT"},
32762+{"glGetShaderiv", "TYPE_OUT_1INT"},
32763+
32764+{"glCombinerParameterfvNV", "TYPE_1FLOAT"},
32765+{"glCombinerParameterivNV", "TYPE_1INT"},
32766+
32767+{"glGetFinalCombinerInputParameterfvNV", "TYPE_OUT_1FLOAT"},
32768+{"glGetCombinerOutputParameterfvNV", "TYPE_OUT_1FLOAT"},
32769+{"glGetCombinerInputParameterfvNV", "TYPE_OUT_1FLOAT"},
32770+{"glGetObjectParameterfvARB", "TYPE_OUT_1FLOAT"},
32771+
32772+{"glCombinerStageParameterfvNV", "TYPE_4FLOAT"},
32773+{"glGetCombinerStageParameterfvNV", "TYPE_OUT_4FLOAT"},
32774+
32775+{"glTexBumpParameterivATI", "TYPE_1INT"},
32776+{"glTexBumpParameterfvATI", "TYPE_1FLOAT"},
32777+{"glGetTexBumpParameterivATI", "TYPE_OUT_1INT"},
32778+{"glGetTexBumpParameterfvATI", "TYPE_OUT_1FLOAT"},
32779+
32780+{"glGetProgramLocalParameterfvARB", "TYPE_OUT_4FLOAT"},
32781+{"glGetProgramLocalParameterdvARB", "TYPE_OUT_4DOUBLE"},
32782+{"glGetProgramEnvParameterfvARB", "TYPE_OUT_4FLOAT"},
32783+{"glGetProgramEnvParameterdvARB", "TYPE_OUT_4DOUBLE"},
32784+{"glGetProgramLocalParameterIivNV", "TYPE_OUT_1INT"},
32785+{"glGetProgramLocalParameterIuivNV", "TYPE_OUT_1UINT"},
32786+{"glGetProgramEnvParameterIivNV", "TYPE_OUT_1INT"},
32787+{"glGetProgramEnvParameterIuivNV", "TYPE_OUT_1UINT"},
32788+
32789+{"glGetProgramParameterfvNV", "TYPE_OUT_4FLOAT"},
32790+{"glGetProgramParameterdvNV", "TYPE_OUT_4DOUBLE"},
32791+{"glGetProgramNamedParameterfvNV", "TYPE_OUT_4FLOAT"},
32792+{"glGetProgramNamedParameterdvNV", "TYPE_OUT_4DOUBLE"},
32793+
32794+{"glCullParameterfvEXT", "TYPE_4FLOAT"},
32795+{"glCullParameterdvEXT", "TYPE_4DOUBLE"},
32796+
32797+{"glGetTrackMatrixivNV", "TYPE_OUT_1INT"},
32798+{"glExecuteProgramNV", "TYPE_4FLOAT"},
32799+
32800+{"glEdgeFlagv", "TYPE_1UCHAR"},
32801+
32802+{"glClipPlane", "TYPE_4DOUBLE"},
32803+{"glGetClipPlane", "TYPE_OUT_4DOUBLE"},
32804+
32805+{"glSetFragmentShaderConstantATI", "TYPE_4FLOAT"},
32806+
32807+{"glGetObjectBufferfvATI", "TYPE_OUT_1FLOAT"},
32808+{"glGetObjectBufferivATI", "TYPE_OUT_1INT"},
32809+{"glGetArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
32810+{"glGetArrayObjectivATI", "TYPE_OUT_1INT"},
32811+{"glGetVariantArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
32812+{"glGetVariantArrayObjectivATI", "TYPE_OUT_1INT"},
32813+{"glGetVertexAttribArrayObjectfvATI", "TYPE_OUT_1FLOAT"},
32814+{"glGetVertexAttribArrayObjectivATI", "TYPE_OUT_1INT"},
32815+
32816+{"glPixelTransformParameterivEXT", "TYPE_1INT"},
32817+{"glPixelTransformParameterfvEXT", "TYPE_1FLOAT"},
32818+{"glGetPixelTransformParameterivEXT", "TYPE_OUT_1INT"},
32819+{"glGetPixelTransformParameterfvEXT", "TYPE_OUT_1FLOAT"},
32820+
32821+{"glColorTableParameterfv", "TYPE_4FLOAT"},
32822+{"glColorTableParameteriv", "TYPE_4INT"},
32823+{"glGetColorTableParameterfv", "TYPE_OUT_4FLOAT"},
32824+{"glGetColorTableParameteriv", "TYPE_OUT_4INT"},
32825+{"glColorTableParameterfvEXT", "TYPE_4FLOAT"},
32826+{"glColorTableParameterivEXT", "TYPE_4INT"},
32827+{"glGetColorTableParameterfvEXT", "TYPE_OUT_4FLOAT"},
32828+{"glGetColorTableParameterivEXT", "TYPE_OUT_4INT"},
32829+
32830+{"glGetMinmaxParameterfv", "TYPE_OUT_1FLOAT"},
32831+{"glGetMinmaxParameteriv", "TYPE_OUT_1INT"},
32832+{"glGetHistogramParameterfv", "TYPE_OUT_1FLOAT"},
32833+{"glGetHistogramParameteriv", "TYPE_OUT_1INT"},
32834+{"glGetMinmaxParameterfvEXT", "TYPE_OUT_1FLOAT"},
32835+{"glGetMinmaxParameterivEXT", "TYPE_OUT_1INT"},
32836+{"glGetHistogramParameterfvEXT", "TYPE_OUT_1FLOAT"},
32837+{"glGetHistogramParameterivEXT", "TYPE_OUT_1INT"},
32838+
32839+/* Not sure at all for the 2 followingo ones ! */
32840+{"glGetBooleanIndexedvEXT", "TYPE_OUT_4UCHAR"},
32841+{"glGetIntegerIndexedvEXT", "TYPE_OUT_4INT"},
32842+
32843+{"glReferencePlaneSGIX", "TYPE_4DOUBLE"},
32844+
32845+{"glGetTransformFeedbackVaryingNV", "TYPE_OUT_1INT"},
32846+
32847+};
32848+
32849+int is_known_arg_vector(FuncDesc* desc, char** p_signature_type_name, char** p_c_type_name)
32850+{
32851+ static ForIsKnownArgVector my_tab[] =
32852+ {
32853+ { "b", "CHAR", "GLbyte", "signed char" },
32854+ { "Boolean", "CHAR", "GLboolean", "unsigned char" },
32855+ { "s", "SHORT", "GLshort", "short" },
32856+ { "i", "INT", "GLint", "int" },
32857+ { "Integer", "INT", "GLint", "int" },
32858+ { "ub", "CHAR", "GLubyte", "unsigned char" },
32859+ { "h", "SHORT", "GLhalf", "unsigned short" },
32860+ { "us", "SHORT", "GLushort", "unsigned short" },
32861+ { "ui", "INT", "GLuint", "unsigned int" },
32862+ { "Nb", "CHAR", "GLbyte", "signed char" },
32863+ { "Ns", "SHORT", "GLshort", "short" },
32864+ { "Ni", "INT", "GLint", "int" },
32865+ { "Nub", "CHAR", "GLubyte", "unsigned char" },
32866+ { "Nus", "SHORT", "GLushort", "unsigned short" },
32867+ { "Nui", "INT", "GLuint", "unsigned int" },
32868+
32869+ { "f", "FLOAT", "GLfloat", "float" },
32870+ { "Float", "FLOAT", "GLfloat", "float" },
32871+ { "d", "DOUBLE", "GLdouble", "double" },
32872+ };
32873+
32874+ if (desc->nargs == 0)
32875+ return 0;
32876+
32877+ int i , j;
32878+
32879+ if (strstr(desc->name, "glVertexAttribs") ||
32880+ strstr(desc->name, "glProgramParameters") ||
32881+ strstr(desc->name, "glProgramEnvParameters") ||
32882+ strstr(desc->name, "glProgramLocalParameters") ||
32883+ (strstr(desc->name, "glUniform") && (strstr(desc->name, "iv") || strstr(desc->name, "fv"))))
32884+ return 0;
32885+
32886+ static char signatures[N_ELEMENTS(my_tab)][N_FIELDS_IN_ARG_VECTOR][20] = {0};
32887+ char signature[10];
32888+
32889+ for(i=0;i<N_ELEMENTS(knownLastArgFuncs);i++)
32890+ {
32891+ if (strcmp(desc->name, knownLastArgFuncs[i].func_name) == 0)
32892+ {
32893+ if (p_signature_type_name)
32894+ {
32895+ *p_signature_type_name = knownLastArgFuncs[i].signature_type_name;
32896+ }
32897+ if (p_c_type_name)
32898+ {
32899+ if (strstr(knownLastArgFuncs[i].signature_type_name, "FLOAT"))
32900+ *p_c_type_name = "float";
32901+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "DOUBLE"))
32902+ *p_c_type_name = "double";
32903+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "UINT"))
32904+ *p_c_type_name = "unsigned int";
32905+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "INT"))
32906+ *p_c_type_name = "int";
32907+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "USHORT"))
32908+ *p_c_type_name = "unsigned short";
32909+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "SHORT"))
32910+ *p_c_type_name = "short";
32911+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "UCHAR"))
32912+ *p_c_type_name = "unsigned char";
32913+ else if (strstr(knownLastArgFuncs[i].signature_type_name, "CHAR"))
32914+ *p_c_type_name = "char";
32915+ else
32916+ assert(0);
32917+ }
32918+ return 1;
32919+ }
32920+ }
32921+
32922+ for(i=0;i<N_ELEMENTS(my_tab);i++)
32923+ {
32924+ for(j=1;j<=N_FIELDS_IN_ARG_VECTOR;j++)
32925+ {
32926+ if (strstr(desc->name, "glIndex") && strstr(desc->name, "v"))
32927+ sprintf(signature, "%sv", my_tab[i].letter);
32928+ else
32929+ sprintf(signature, "%d%sv", j, my_tab[i].letter);
32930+ if (strstr(desc->name, signature) &&
32931+ strstr(desc->args[desc->nargs - 1], my_tab[i].gl_c_type_name) &&
32932+ strstr(desc->args[desc->nargs - 1], "*"))
32933+ {
32934+ if (p_signature_type_name)
32935+ {
32936+ if (signatures[i][j-1][0] == 0)
32937+ sprintf(signatures[i][j-1], "TYPE_%d%s", j, my_tab[i].signature_type_name);
32938+ *p_signature_type_name = signatures[i][j-1];
32939+ }
32940+ if (p_c_type_name) *p_c_type_name = my_tab[i].c_type_name;
32941+ return 1;
32942+ }
32943+ }
32944+ }
32945+ return 0;
32946+}
32947+
32948+static void print_server_side_argument(FILE* server_stub, int j, char* glType)
32949+{
32950+ const char* symbolic_type = get_type_string(glType);
32951+ if (strcmp(symbolic_type, "TYPE_CHAR") == 0)
32952+ fprintf(server_stub, "ARG_TO_CHAR(args[%d])", j);
32953+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_CHAR") == 0)
32954+ fprintf(server_stub, "ARG_TO_UNSIGNED_CHAR(args[%d])", j);
32955+ else if (strcmp(symbolic_type, "TYPE_SHORT") == 0)
32956+ fprintf(server_stub, "ARG_TO_SHORT(args[%d])", j);
32957+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_SHORT") == 0)
32958+ fprintf(server_stub, "ARG_TO_UNSIGNED_SHORT(args[%d])", j);
32959+ else if (strcmp(symbolic_type, "TYPE_INT") == 0)
32960+ fprintf(server_stub, "ARG_TO_INT(args[%d])", j);
32961+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_INT") == 0)
32962+ fprintf(server_stub, "ARG_TO_UNSIGNED_INT(args[%d])", j);
32963+ else if (strcmp(symbolic_type, "TYPE_FLOAT") == 0)
32964+ fprintf(server_stub, "ARG_TO_FLOAT(args[%d])", j);
32965+ else if (strcmp(symbolic_type, "TYPE_16FLOAT") == 0)
32966+ fprintf(server_stub, "(const float*)(args[%d])", j);
32967+ else if (strcmp(symbolic_type, "TYPE_DOUBLE") == 0)
32968+ fprintf(server_stub, "ARG_TO_DOUBLE(args[%d])", j);
32969+ else if ( strcmp(symbolic_type, "TYPE_16DOUBLE") == 0)
32970+ fprintf(server_stub, "(const double*)(args[%d])", j);
32971+ else if ( strcmp(symbolic_type, "TYPE_OUT_128UCHAR") == 0)
32972+ fprintf(server_stub, "(unsigned char*)(args[%d])", j);
32973+ else if ( strcmp(symbolic_type, "TYPE_128UCHAR") == 0)
32974+ fprintf(server_stub, "(const unsigned char*)(args[%d])", j);
32975+ else if ( strcmp(symbolic_type, "TYPE_NULL_TERMINATED_STRING") == 0)
32976+ fprintf(server_stub, "(const char*)(args[%d])", j);
32977+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_SHORT") == 0)
32978+ fprintf(server_stub, "(const short*)(args[%d])", j);
32979+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_SHORT") == 0)
32980+ fprintf(server_stub, "(const unsigned short*)(args[%d])", j);
32981+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_INT") == 0)
32982+ fprintf(server_stub, "(const int*)(args[%d])", j);
32983+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_INT") == 0)
32984+ fprintf(server_stub, "(const unsigned int*)(args[%d])", j);
32985+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_FLOAT") == 0)
32986+ fprintf(server_stub, "(const float*)(args[%d])", j);
32987+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_DOUBLE") == 0)
32988+ fprintf(server_stub, "(const double*)(args[%d])", j);
32989+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_CHAR") == 0)
32990+ fprintf(server_stub, "(const char*)(args[%d])", j);
32991+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_SIGNED_CHAR") == 0)
32992+ fprintf(server_stub, "(const signed char*)(args[%d])", j);
32993+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_VOID") == 0)
32994+ fprintf(server_stub, "(const void*)(args[%d])", j);
32995+ else if ( strcmp(symbolic_type, "TYPE_ARRAY_UNSIGNED_CHAR") == 0)
32996+ fprintf(server_stub, "(const unsigned char*)(args[%d])", j);
32997+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_SHORT") == 0)
32998+ fprintf(server_stub, "(short*)(args[%d])", j);
32999+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_SHORT") == 0)
33000+ fprintf(server_stub, "(unsigned short*)(args[%d])", j);
33001+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_INT") == 0)
33002+ fprintf(server_stub, "(int*)(args[%d])", j);
33003+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_INT") == 0)
33004+ fprintf(server_stub, "(unsigned int*)(args[%d])", j);
33005+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_FLOAT") == 0)
33006+ fprintf(server_stub, "(float*)(args[%d])", j);
33007+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_DOUBLE") == 0)
33008+ fprintf(server_stub, "(double*)(args[%d])", j);
33009+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_VOID") == 0)
33010+ fprintf(server_stub, "(void*)(args[%d])", j);
33011+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_CHAR") == 0)
33012+ fprintf(server_stub, "(char*)(args[%d])", j);
33013+ else if ( strcmp(symbolic_type, "TYPE_OUT_ARRAY_UNSIGNED_CHAR") == 0)
33014+ fprintf(server_stub, "(unsigned char*)(args[%d])", j);
33015+
33016+ else
33017+ {
33018+ fprintf(stderr, "Unknown : %s\n", symbolic_type);
33019+ assert(0);
33020+ }
33021+}
33022+
33023+static const char* func_dealt_by_hand[500] = { NULL };
33024+
33025+
33026+static const char* ignore_func[] =
33027+{
33028+ "glGetPointerv",
33029+ "glRectdv",
33030+ "glRectfv",
33031+ "glRectiv",
33032+ "glRectsv",
33033+ "glMultiDrawArrays",
33034+ "glMultiDrawArraysEXT",
33035+ "glMultiDrawElements",
33036+ "glMultiDrawElementsEXT",
33037+ "glUnmapBuffer",
33038+ "glUnmapBufferARB",
33039+ "glLoadTransposeMatrixf",
33040+ "glLoadTransposeMatrixd",
33041+ "glMultTransposeMatrixf",
33042+ "glMultTransposeMatrixd",
33043+ "glLoadTransposeMatrixfARB",
33044+ "glLoadTransposeMatrixdARB",
33045+ "glMultTransposeMatrixfARB",
33046+ "glMultTransposeMatrixdARB",
33047+
33048+ "glPixelDataRangeNV",
33049+ "glFlushPixelDataRangeNV",
33050+ "glVertexArrayRangeNV",
33051+ "glFlushVertexArrayRangeNV",
33052+ "glVertexWeightfEXT",
33053+
33054+ "glGetBufferPointerv",
33055+ "glGetBufferPointervARB",
33056+ "glGetVertexAttribPointerv",
33057+ "glGetVertexAttribPointervARB",
33058+ "glVertexAttribPointer",
33059+ "glVertexAttribPointerARB",
33060+ "glGetVariantPointervEXT",
33061+ NULL,
33062+};
33063+
33064+void get_func_dealt_by_hand()
33065+{
33066+ FILE* f = fopen("../target-i386/gl_func_perso.h", "r");
33067+ char buffer[256];
33068+ int i = 0;
33069+ char* c;
33070+ while(fgets(buffer, 256, f))
33071+ {
33072+ if (strstr(buffer, "MAGIC_MACRO("))
33073+ {
33074+ func_dealt_by_hand[i] = strdup(strstr(buffer, "MAGIC_MACRO(") + strlen("MAGIC_MACRO("));
33075+ * strstr(func_dealt_by_hand[i], ")") = 0;
33076+ c = strstr(func_dealt_by_hand[i], "_");
33077+ if (c && c != func_dealt_by_hand[i]) *c = 0;
33078+ i ++;
33079+ }
33080+ }
33081+ fclose(f);
33082+
33083+ int j = 0;
33084+ while(ignore_func[j])
33085+ {
33086+ func_dealt_by_hand[i] = ignore_func[j];
33087+ i++;
33088+ j++;
33089+ }
33090+}
33091+
33092+static const char* just_for_server_side_list[] =
33093+{
33094+ "glEnableClientState",
33095+ "glDisableClientState",
33096+ "glPushClientAttrib",
33097+ "glPopClientAttrib",
33098+ "glPixelStorei",
33099+ "glPixelStoref",
33100+ "glClientActiveTexture",
33101+ "glClientActiveTextureARB",
33102+ "glEnableVertexAttribArray",
33103+ "glEnableVertexAttribArrayARB",
33104+ "glDisableVertexAttribArray",
33105+ "glDisableVertexAttribArrayARB",
33106+ "glDrawElementArrayATI",
33107+ "glDrawRangeElementArrayATI",
33108+ "glGenSymbolsEXT",
33109+ "glFreeObjectBufferATI",
33110+ "glUnmapObjectBufferATI",
33111+ "glLockArraysEXT",
33112+ "glUnlockArraysEXT",
33113+ "glDepthFunc",
33114+ "glFogf",
33115+ "glFogi",
33116+ "glClipPlane",
33117+ "glGetClipPlane",
33118+
33119+/* begin of openquartz optimization */
33120+#if 1
33121+ "glMatrixMode",
33122+ "glOrtho",
33123+ "glFrustum",
33124+ "glPushMatrix",
33125+ "glPopMatrix",
33126+ "glLoadIdentity",
33127+ "glLoadMatrixd",
33128+ "glLoadMatrixf",
33129+ "glMultMatrixd",
33130+ "glMultMatrixf",
33131+ "glRotated",
33132+ "glRotatef",
33133+ "glScaled",
33134+ "glScalef",
33135+ "glTranslated",
33136+ "glTranslatef",
33137+#endif
33138+/* end of openquartz optimization */
33139+
33140+ "glGetError",
33141+ "glActiveTextureARB",
33142+
33143+ "glViewport",
33144+ "glScissor",
33145+
33146+ "glBindBufferARB",
33147+ "glDeleteBuffersARB",
33148+ "glGenBuffersARB",
33149+ "glBufferDataARB",
33150+ "glBufferSubDataARB",
33151+ "glGetBufferSubDataARB",
33152+ "glGetBufferParameterivARB",
33153+ "glBindBuffer",
33154+ "glDeleteBuffers",
33155+ "glGenBuffers",
33156+ "glBufferData",
33157+ "glBufferSubData",
33158+ "glGetBufferSubData",
33159+ "glGetBufferParameteriv",
33160+
33161+ "glPushAttrib",
33162+ "glPopAttrib",
33163+ "glEnable",
33164+ "glDisable",
33165+ "glIsEnabled",
33166+ "glBindTexture",
33167+ "glBindTextureEXT",
33168+ "glFogfv",
33169+ "glFogiv",
33170+ "glBitmap",
33171+ "glGetTexImage",
33172+ "glReadPixels",
33173+ "glDrawPixels",
33174+ "glSelectBuffer",
33175+ "glFeedbackBuffer",
33176+
33177+ "glTexImage1D",
33178+ "glTexImage2D",
33179+ "glTexImage3D",
33180+ "glTexSubImage1D",
33181+ "glTexSubImage2D",
33182+ "glTexSubImage3D",
33183+
33184+ "glTexImage3DEXT",
33185+ "glTexSubImage1DEXT",
33186+ "glTexSubImage2DEXT",
33187+ "glTexSubImage3DEXT",
33188+
33189+ "glGetCompressedTexImage",
33190+ "glCompressedTexImage1D",
33191+ "glCompressedTexImage2D",
33192+ "glCompressedTexImage3D",
33193+ "glCompressedTexSubImage1D",
33194+ "glCompressedTexSubImage2D",
33195+ "glCompressedTexSubImage3D",
33196+
33197+ "glGetCompressedTexImageARB",
33198+ "glCompressedTexImage1DARB",
33199+ "glCompressedTexImage2DARB",
33200+ "glCompressedTexImage3DARB",
33201+ "glCompressedTexSubImage1DARB",
33202+ "glCompressedTexSubImage2DARB",
33203+ "glCompressedTexSubImage3DARB",
33204+
33205+ "glCallLists",
33206+ "glNewList",
33207+ "glDeleteLists",
33208+ "glGenLists",
33209+
33210+ "glGenTextures",
33211+ "glDeleteTextures",
33212+ "glDeleteTexturesEXT",
33213+ "glMap1f",
33214+ "glMap1d",
33215+ "glMap2f",
33216+ "glMap2d",
33217+ "glGetMapdv",
33218+ "glGetMapfv",
33219+ "glGetMapiv",
33220+ "glGetBooleanv",
33221+ "glGetIntegerv",
33222+ "glGetFloatv",
33223+ "glGetDoublev",
33224+
33225+ "glGetPixelMapfv",
33226+ "glGetPixelMapuiv",
33227+ "glGetPixelMapusv",
33228+ "glGetProgramStringARB",
33229+ "glGetProgramStringNV",
33230+ "glArrayElement",
33231+ "glDrawArrays",
33232+ "glDrawElements",
33233+ "glDrawRangeElements",
33234+ "glDrawRangeElementsEXT",
33235+ "glGetProgramInfoLog",
33236+ "glGetTexLevelParameteriv",
33237+ "glGetInfoLogARB",
33238+ "glGetShaderInfoLog",
33239+ "glGetAttachedObjectsARB",
33240+ "glGetAttachedShaders",
33241+ "glGetActiveUniformARB",
33242+ "glGetActiveUniform",
33243+ "glGetUniformLocationARB",
33244+ "glGetUniformLocation",
33245+ "glGetUniformfvARB",
33246+ "glGetUniformfv",
33247+ "glGetUniformivARB",
33248+ "glGetUniformiv",
33249+ "glGetUniformuivEXT",
33250+ "glGetShaderSourceARB",
33251+ "glGetShaderSource",
33252+ "glGetActiveAttribARB",
33253+ "glGetActiveAttrib",
33254+ "glGetAttribLocationARB",
33255+ "glGetAttribLocation",
33256+
33257+ "glNewObjectBufferATI",
33258+ "glUpdateObjectBufferATI",
33259+
33260+ "glSetLocalConstantEXT",
33261+ "glSetInvariantEXT",
33262+ "glVariantbvEXT",
33263+ "glVariantsvEXT",
33264+ "glVariantivEXT",
33265+ "glVariantfvEXT",
33266+ "glVariantdvEXT",
33267+ "glVariantubvEXT",
33268+ "glVariantusvEXT",
33269+ "glVariantuivEXT",
33270+ "glGetVariantBooleanvEXT",
33271+ "glGetVariantIntegervEXT",
33272+ "glGetVariantFloatvEXT",
33273+ "glGetInvariantBooleanvEXT",
33274+ "glGetInvariantIntegervEXT",
33275+ "glGetInvariantFloatvEXT",
33276+ "glGetLocalConstantBooleanvEXT",
33277+ "glGetLocalConstantIntegervEXT",
33278+ "glGetLocalConstantFloatvEXT",
33279+
33280+ "glMatrixIndexubvARB",
33281+ "glMatrixIndexusvARB",
33282+ "glMatrixIndexuivARB",
33283+
33284+ "glColorTable",
33285+ "glColorSubTable",
33286+ "glGetColorTable",
33287+ "glConvolutionFilter1D",
33288+ "glConvolutionFilter2D",
33289+ "glGetConvolutionFilter",
33290+ "glSeparableFilter2D",
33291+ "glGetSeparableFilter",
33292+ "glGetHistogram",
33293+ "glGetMinmax",
33294+ "glColorTableEXT",
33295+ "glColorSubTableEXT",
33296+ "glGetColorTableEXT",
33297+ "glConvolutionFilter1DEXT",
33298+ "glConvolutionFilter2DEXT",
33299+ "glGetConvolutionFilterEXT",
33300+ "glSeparableFilter2DEXT",
33301+ "glGetSeparableFilterEXT",
33302+ "glGetHistogramEXT",
33303+ "glGetMinmaxEXT",
33304+
33305+ "glGetTexParameterfv",
33306+
33307+ "glGetVertexAttribivARB",
33308+ "glGetVertexAttribfvARB",
33309+ "glGetVertexAttribdvARB",
33310+ "glGetVertexAttribiv",
33311+ "glGetVertexAttribfv",
33312+ "glGetVertexAttribdv",
33313+
33314+ "glGetDetailTexFuncSGIS",
33315+ "glGetSharpenTexFuncSGIS",
33316+
33317+ "fake_gluBuild2DMipmaps",
33318+
33319+ "glRenderMode",
33320+
33321+ "glEnableVariantClientStateEXT",
33322+ "glDisableVariantClientStateEXT",
33323+
33324+ "glGetActiveVaryingNV",
33325+
33326+ NULL,
33327+};
33328+
33329+static int just_for_server_side_func(char* funcname)
33330+{
33331+ int i;
33332+ for(i=0;just_for_server_side_list[i];i++)
33333+ {
33334+ if (strcmp(just_for_server_side_list[i], funcname) == 0)
33335+ return 1;
33336+ }
33337+ return 0;
33338+}
33339+
33340+int parse(FILE* f, FuncDesc* funcDesc, int funcDescCount, int ignoreEXT)
33341+{
33342+ char buffer[256];
33343+ while(fgets(buffer, 256, f))
33344+ {
33345+
33346+ if (strncmp(buffer, "GLAPI", 5) == 0 && strstr(buffer, "APIENTRY") && strstr(buffer, "("))
33347+ {
33348+ int i = 0;
33349+ int skip = 0;
33350+ if (func_dealt_by_hand[0] == 0)
33351+ {
33352+ get_func_dealt_by_hand();
33353+ }
33354+ while (func_dealt_by_hand[i])
33355+ {
33356+ if (strstr(buffer, func_dealt_by_hand[i]))
33357+ {
33358+ skip = 1;
33359+ break;
33360+ }
33361+ i++;
33362+ }
33363+ if (skip)
33364+ continue;
33365+
33366+ char** args = malloc(15 * sizeof(char*));
33367+ int narg = 0;
33368+ char* type = buffer + 6;
33369+ char* n = strstr(type, "GLAPIENTRY") ? strstr(type, "GLAPIENTRY") : strstr(type, "APIENTRY");
33370+ int skip_length = strstr(type, "GLAPIENTRY") ? 11 : 9;
33371+ n[-1] = 0;
33372+ type = strdup(type);
33373+ n += skip_length;
33374+ char* fonc = n;
33375+ n = strstr(n, "(");
33376+ if (n[-1] == ' ') n[-1] = 0;
33377+ n[0] = 0;
33378+ fonc = strdup(fonc);
33379+ /*if (strstr(fonc, "glLockArraysEXT") || strstr(fonc, "glUnlockArraysEXT"))
33380+ {
33381+ }
33382+ else*/
33383+
33384+
33385+ if (ignoreEXT == 1 && isExtByName(fonc))
33386+ {
33387+ free(type);
33388+ free(fonc);
33389+ continue;
33390+ }
33391+ n++;
33392+ while(1)
33393+ {
33394+ char* virg = strstr(n, ",");
33395+ if (virg)
33396+ {
33397+ args[narg] = n;
33398+ virg[0] = 0;
33399+ args[narg] = get_arg_type(args[narg]);
33400+ narg++;
33401+ n = virg+1;
33402+ }
33403+ else
33404+ break;
33405+ }
33406+ while (strstr(n, ")") == 0)
33407+ {
33408+ fgets(buffer, 256, f);
33409+ n = buffer;
33410+ while(1)
33411+ {
33412+ char* virg = strstr(n, ",");
33413+ if (virg)
33414+ {
33415+ args[narg] = n;
33416+ virg[0] = 0;
33417+ args[narg] = get_arg_type(args[narg]);
33418+ narg++;
33419+ n = virg+1;
33420+ }
33421+ else
33422+ break;
33423+ }
33424+ }
33425+ char* par = strstr(n, ")");
33426+ args[narg] = n;
33427+ par[0] = 0;
33428+ args[narg] = get_arg_type(args[narg]);
33429+ narg++;
33430+
33431+
33432+ /*printf("%s %s (", type, fonc);
33433+ for(i=0;i<narg;i++)
33434+ {
33435+ printf("%s,", args[i]);
33436+ }
33437+ printf(")\n");*/
33438+
33439+ for(i=0;i<funcDescCount;i++)
33440+ {
33441+ if (strcmp(funcDesc[i].name, fonc) == 0)
33442+ {
33443+ if (ignoreEXT == 0)
33444+ funcDesc[i].isExt = 1;
33445+ break;
33446+ }
33447+ }
33448+ if (i == funcDescCount)
33449+ {
33450+ funcDesc[funcDescCount].type = type;
33451+ funcDesc[funcDescCount].name = fonc;
33452+ funcDesc[funcDescCount].nargs = narg;
33453+ funcDesc[funcDescCount].args = args;
33454+ funcDesc[funcDescCount].isExt = ignoreEXT == 0;
33455+ funcDescCount++;
33456+ }
33457+ else
33458+ {
33459+ free(fonc);
33460+ free(args);
33461+ free(type);
33462+ }
33463+ /*
33464+ for(i=0;i<narg;i++)
33465+ {
33466+ free(args[i]);
33467+ }
33468+ free(fonc);
33469+ free(type);*/
33470+ }
33471+ }
33472+ return funcDescCount;
33473+}
33474+
33475+typedef struct
33476+{
33477+ char* str;
33478+ int i;
33479+} StringIntStruct;
33480+
33481+StringIntStruct argDependingOnPreviousArgTab[] =
33482+{
33483+ { "glLoadProgramNV", 3},
33484+ { "ProgramNamedParameter", 2},
33485+ { "glDeleteBuffers", 1},
33486+ { "glDrawBuffers", 1},
33487+ { "glGenPrograms", 1},
33488+ { "glDeletePrograms", 1},
33489+ { "glGenQueries", 1},
33490+ { "glDeleteQueries", 1},
33491+ { "glGenFencesNV", 1},
33492+ { "glDeleteFencesNV", 1},
33493+ { "glGenOcclusionQueriesNV", 1},
33494+ { "glDeleteOcclusionQueriesNV", 1},
33495+ { "glRequestResidentProgramsNV", 1},
33496+ { "glDeleteTextures", 1},
33497+ { "glGenFramebuffersEXT", 1},
33498+ { "glDeleteFramebuffersEXT", 1},
33499+ { "glGenRenderbuffersEXT", 1},
33500+ { "glDeleteRenderbuffersEXT", 1},
33501+ { "glUniform1fv", 2},
33502+ { "glUniform2fv", 2},
33503+ { "glUniform3fv", 2},
33504+ { "glUniform4fv", 2},
33505+ { "glUniform1iv", 2},
33506+ { "glUniform2iv", 2},
33507+ { "glUniform3iv", 2},
33508+ { "glUniform4iv", 2},
33509+ { "glUniform1uivEXT", 2},
33510+ { "glUniform2uivEXT", 2},
33511+ { "glUniform3uivEXT", 2},
33512+ { "glUniform4uivEXT", 2},
33513+ { "glProgramParameters4fvNV", 3},
33514+ { "glProgramParameters4dvNV", 3},
33515+ { "glProgramLocalParameters4fvEXT", 3},
33516+ { "glProgramLocalParametersI4ivNV", 3},
33517+ { "glProgramLocalParametersI4uivNV", 3},
33518+ { "glProgramEnvParameters4fvEXT", 3},
33519+ { "glProgramEnvParametersI4ivNV", 3},
33520+ { "glProgramEnvParametersI4uivNV", 3},
33521+ { "glAreProgramsResidentNV", 1} ,
33522+ { "glAreProgramsResidentNV", 2} ,
33523+ { "glAreTexturesResident", 1} ,
33524+ { "glAreTexturesResident", 2} ,
33525+ { "glPrioritizeTextures", 1} ,
33526+ { "glPrioritizeTextures", 2} ,
33527+ { "glProgramStringARB", 3} ,
33528+
33529+ { "glVertexAttribs", 2},
33530+
33531+ { "glUniformMatrix", 3 },
33532+
33533+ { "glGetVertexAttribfv", 2},
33534+ { "glGetVertexAttribiv", 2},
33535+ { "glGetVertexAttribdv", 2},
33536+ { "glGetVertexAttribIivEXT", 2},
33537+ { "glGetVertexAttribIuivEXT", 2},
33538+
33539+ { "glPointParameterfv", 1},
33540+ { "glPointParameteriv", 1},
33541+
33542+ { "glWeightbvARB", 1},
33543+ { "glWeightsvARB", 1},
33544+ { "glWeightivARB", 1},
33545+ { "glWeightfvARB", 1},
33546+ { "glWeightdvARB", 1},
33547+ { "glWeightubvARB", 1},
33548+ { "glWeightusvARB", 1},
33549+ { "glWeightuivARB", 1},
33550+
33551+ { "glTexEnvfv", 2},
33552+ { "glTexEnviv", 2},
33553+ { "glGetTexEnvfv", 2},
33554+ { "glGetTexEnviv", 2},
33555+ { "glTexGendv", 2},
33556+ { "glTexGenfv", 2},
33557+ { "glTexGeniv", 2},
33558+ { "glGetTexGendv", 2},
33559+ { "glGetTexGenfv", 2},
33560+ { "glGetTexGeniv", 2},
33561+
33562+ { "glLightfv", 2},
33563+ { "glLightiv", 2},
33564+ { "glGetLightfv", 2},
33565+ { "glGetLightiv", 2},
33566+ { "glFragmentLightfvSGIX", 2},
33567+ { "glFragmentLightivSGIX", 2},
33568+ { "glGetFragmentLightfvSGIX", 2},
33569+ { "glGetFragmentLightivSGIX", 2},
33570+
33571+
33572+ { "glLightModelfv", 1},
33573+ { "glLightModeliv", 1},
33574+ { "glFragmentLightModelfvSGIX", 1},
33575+ { "glFragmentLightModelivSGIX", 1},
33576+
33577+ { "glMaterialfv", 2},
33578+ { "glMaterialiv", 2},
33579+ { "glGetMaterialfv", 2},
33580+ { "glGetMaterialiv", 2},
33581+ { "glFragmentMaterialfvSGIX", 2},
33582+ { "glFragmentMaterialivSGIX", 2},
33583+ { "glGetFragmentMaterialfvSGIX", 2},
33584+ { "glGetFragmentMaterialivSGIX", 2},
33585+
33586+ { "glFogiv", 1},
33587+ { "glFogfv", 1},
33588+
33589+ { "glTexParameterfv", 2},
33590+ { "glTexParameteriv", 2},
33591+ { "glGetTexParameterfv", 2},
33592+ { "glGetTexParameteriv", 2},
33593+
33594+ { "glTexParameterIivEXT", 2},
33595+ { "glTexParameterIuivEXT", 2},
33596+ { "glGetTexParameterIivEXT", 2},
33597+ { "glGetTexParameterIuivEXT", 2},
33598+
33599+ { "glPixelMapfv", 2},
33600+ { "glPixelMapuiv", 2},
33601+ { "glPixelMapusv", 2},
33602+
33603+ { "glDetailTexFuncSGIS", 2 },
33604+ { "glSharpenTexFuncSGIS", 2 },
33605+
33606+ { "glSpriteParameterfvSGIX", 1 },
33607+ { "glSpriteParameterivSGIX", 1 },
33608+
33609+ { "ConvolutionParameter", 2},
33610+
33611+ { "glProgramBufferParametersfvNV", 4},
33612+ { "glProgramBufferParametersIivNV", 4},
33613+ { "glProgramBufferParametersIuivNV", 4},
33614+
33615+ { "glTransformFeedbackAttribsNV", 1},
33616+ { "glTransformFeedbackVaryingsNV", 2},
33617+};
33618+
33619+int is_arg_of_length_depending_on_previous_args(FuncDesc* funcDesc, int j)
33620+{
33621+ int i;
33622+ if (strstr(funcDesc->args[j], "*") == NULL)
33623+ return 0;
33624+ for(i=0;i< N_ELEMENTS(argDependingOnPreviousArgTab); i++)
33625+ {
33626+ if (strstr(funcDesc->name, argDependingOnPreviousArgTab[i].str) && j == argDependingOnPreviousArgTab[i].i)
33627+ return 1;
33628+ }
33629+ return 0;
33630+}
33631+
33632+static void fprintf_prototype_args(FILE* f, FuncDesc* funcDesc)
33633+{
33634+ int j;
33635+ for(j=0;j<funcDesc->nargs;j++)
33636+ {
33637+ if (j != 0) fprintf(f,", ");
33638+ if (strstr(funcDesc->args[j], "[16]"))
33639+ {
33640+ if (strstr(funcDesc->args[j], "float"))
33641+ {
33642+ fprintf(f, "const GLfloat arg_%d[16]", j);
33643+ }
33644+ else if (strstr(funcDesc->args[j], "double"))
33645+ {
33646+ fprintf(f, "const GLdouble arg_%d[16]", j);
33647+ }
33648+ else
33649+ {
33650+ exit(-1);
33651+ }
33652+ }
33653+ else if (strstr(funcDesc->args[j], "[128]") && strstr(funcDesc->args[j], "GLubyte"))
33654+ fprintf(f, (strstr(funcDesc->args[j], "const")) ? "const GLubyte* arg_%d" : "GLubyte* arg_%d", j);
33655+ else
33656+ fprintf(f, "%s arg_%d", funcDesc->args[j], j);
33657+ }
33658+}
33659+
33660+int main(int argc, char* argv[])
33661+{
33662+ FuncDesc funcDesc[3000];
33663+ int funcDescCount = 0;
33664+ FILE* f;
33665+
33666+ f = fopen("../target-i386/mesa_gl.h", "r");
33667+ assert(f);
33668+ /*if (!f)
33669+ f = fopen("/usr/include/GL/gl.h", "r");*/
33670+ funcDescCount = parse(f, funcDesc, 0, 1);
33671+ fclose(f);
33672+
33673+ f = fopen("../target-i386/mesa_glext.h", "r");
33674+ assert(f);
33675+ /*if (!f)
33676+ f = fopen("/usr/include/GL/glext.h", "r");*/
33677+ funcDescCount = parse(f, funcDesc, funcDescCount, 0);
33678+ fclose(f);
33679+
33680+ FILE* header = fopen("gl_func.h", "w");
33681+ FILE* client_stub = fopen("client_stub.c", "w");
33682+ FILE* server_stub = fopen("server_stub.c", "w");
33683+
33684+ fprintf(header, "/* This is a generated file. DO NOT EDIT ! */\n\n");
33685+ fprintf(header, "#define COMPOSE(x,y) x##y\n");
33686+ fprintf(header, "#define MAGIC_MACRO(x) COMPOSE(x,_func)\n");
33687+ fprintf(header, "enum {\n"
33688+ "#include \"gl_func_perso.h\"\n");
33689+
33690+ fprintf(client_stub, "/* This is a generated file. DO NOT EDIT ! */\n\n");
33691+
33692+ fprintf(server_stub, "/* This is a generated file. DO NOT EDIT ! */\n\n");
33693+
33694+ int i;
33695+ for(i=0;i<funcDescCount;i++)
33696+ {
33697+ funcDesc[i].ok = 0;
33698+ char* name = funcDesc[i].name;
33699+ char* type = funcDesc[i].type;
33700+ if ((strcmp(type, "void") == 0 || strcmp(type, "GLboolean") == 0 ||
33701+ strcmp(type, "GLuint") == 0 || strcmp(type, "GLint") == 0 ||
33702+ strcmp(type, "GLenum") == 0) || strcmp(type, "GLhandleARB") == 0 ||
33703+ strcmp(type, "GLhalf") == 0 || strcmp(type, "GLhalfNV") == 0)
33704+ {
33705+ int pointer_of_unknown_size = 0;
33706+ int j;
33707+
33708+ if (funcDesc[i].nargs == 1 && strcmp(funcDesc[i].args[0], "void") == 0)
33709+ {
33710+ funcDesc[i].nargs = 0;
33711+ }
33712+ for(j=0;j<funcDesc[i].nargs-1;j++)
33713+ {
33714+ if (!is_arg_of_length_depending_on_previous_args(&funcDesc[i], j) &&
33715+ strstr(funcDesc[i].args[j], "const GLchar") == NULL &&
33716+ strstr(funcDesc[i].args[j], "[16]") == NULL)
33717+ {
33718+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "*") != NULL;
33719+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "[") != NULL;
33720+ }
33721+ }
33722+
33723+ if (pointer_of_unknown_size == 0)
33724+ {
33725+ char* signature_type_name;
33726+ if (is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL))
33727+ {
33728+ if (strstr(signature_type_name, "TYPE_OUT"))
33729+ funcDesc[i].has_out_parameters = 1;
33730+ }
33731+ else
33732+ {
33733+ if (funcDesc[i].nargs-1 >= 0)
33734+ {
33735+ j = funcDesc[i].nargs-1;
33736+ if (!is_arg_of_length_depending_on_previous_args(&funcDesc[i], j) &&
33737+ strstr(funcDesc[i].args[j], "const GLchar") == NULL &&
33738+ strstr(funcDesc[i].args[j], "[16]") == NULL)
33739+ {
33740+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "*") != NULL;
33741+ pointer_of_unknown_size |= strstr(funcDesc[i].args[j], "[") != NULL;
33742+ }
33743+ }
33744+ }
33745+ }
33746+ if (pointer_of_unknown_size && funcDesc[i].nargs == 1)
33747+ {
33748+ if (strstr(funcDesc[i].name, "Matrixf") || strstr(funcDesc[i].name, "Matrixd"))
33749+ {
33750+ free(funcDesc[i].args[0]);
33751+ if (strstr(funcDesc[i].name, "Matrixf"))
33752+ funcDesc[i].args[0] = strdup("GLfloat m[16]");
33753+ else
33754+ funcDesc[i].args[0] = strdup("GLdouble m[16]");
33755+ pointer_of_unknown_size = 0;
33756+ }
33757+ else if (strcmp(funcDesc[i].name, "glPolygonStipple") == 0)
33758+ {
33759+ free(funcDesc[i].args[0]);
33760+ funcDesc[i].args[0] = strdup("const GLubyte mask[128]");
33761+ pointer_of_unknown_size = 0;
33762+ }
33763+ else if (strcmp(funcDesc[i].name, "glGetPolygonStipple") == 0)
33764+ {
33765+ free(funcDesc[i].args[0]);
33766+ funcDesc[i].args[0] = strdup("GLubyte mask[128]");
33767+ funcDesc[i].has_out_parameters = 1;
33768+ pointer_of_unknown_size = 0;
33769+ }
33770+ }
33771+ if (just_for_server_side_func(name) || pointer_of_unknown_size == 0)
33772+ {
33773+ fprintf(header, " %s_func,\n", funcDesc[i].name);
33774+ funcDesc[i].ok = 1;
33775+ if (just_for_server_side_func(name))
33776+ funcDesc[i].just_for_server_side = 1;
33777+ for(j=0;j<funcDesc[i].nargs;j++)
33778+ {
33779+ if (strstr(get_type_string(funcDesc[i].args[j]), "OUT"))
33780+ funcDesc[i].has_out_parameters = 1;
33781+ }
33782+ }
33783+ else
33784+ {
33785+ fprintf(stderr, "not handled either manually or automatically : %s\n", funcDesc[i].name);
33786+ }
33787+ }
33788+ }
33789+
33790+ fprintf(header, " GL_N_CALLS\n};\n");
33791+
33792+
33793+ fprintf(server_stub, "void execute_func(int func_number, arg_t *args, int *pret_int, char *pret_char)\n");
33794+ fprintf(server_stub, "{\n");
33795+ fprintf(server_stub, " switch(func_number)\n");
33796+ fprintf(server_stub, " {\n");
33797+
33798+
33799+ for(i=0;i<funcDescCount;i++)
33800+ {
33801+ if (funcDesc[i].ok)
33802+ {
33803+ fprintf(header, "static const int %s_signature[] = { %s, %d, ",
33804+ funcDesc[i].name,
33805+ get_type_string(funcDesc[i].type),
33806+ funcDesc[i].has_out_parameters);
33807+ fprintf(header, "%d", funcDesc[i].nargs);
33808+ int j;
33809+ char* signature_type_name;
33810+ int n_args_to_check = is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL) ? funcDesc[i].nargs - 1 : funcDesc[i].nargs;
33811+
33812+ for(j=0;j<n_args_to_check;j++)
33813+ {
33814+ if (is_arg_of_length_depending_on_previous_args(&funcDesc[i], j))
33815+ {
33816+ fprintf(header, ", %s_OF_LENGTH_DEPENDING_ON_PREVIOUS_ARGS", get_type_string(funcDesc[i].args[j]));
33817+ }
33818+ else
33819+ fprintf(header, ", %s", get_type_string(funcDesc[i].args[j]));
33820+ }
33821+
33822+ if (is_known_arg_vector(&funcDesc[i], &signature_type_name, NULL))
33823+ {
33824+ fprintf(header, ", %s", signature_type_name);
33825+ }
33826+ fprintf(header, "};\n");
33827+
33828+
33829+ if (funcDesc[i].just_for_server_side == 0)
33830+ {
33831+ if (isExt(&funcDesc[i]))
33832+ fprintf(client_stub, "GLAPI %s APIENTRY EXT_FUNC(%s) (", funcDesc[i].type, funcDesc[i].name);
33833+ else
33834+ fprintf(client_stub, "GLAPI %s APIENTRY %s(", funcDesc[i].type, funcDesc[i].name);
33835+ fprintf_prototype_args(client_stub, &funcDesc[i]);
33836+ fprintf(client_stub, ")\n");
33837+ fprintf(client_stub, "{\n");
33838+ if (strcmp(funcDesc[i].type, "void") != 0)
33839+ {
33840+ fprintf(client_stub, " %s ret;\n", funcDesc[i].type);
33841+ if (isExt(&funcDesc[i]))
33842+ fprintf(client_stub, " CHECK_PROC_WITH_RET(%s);\n", funcDesc[i].name);
33843+ }
33844+ else
33845+ {
33846+ if (isExt(&funcDesc[i]))
33847+ fprintf(client_stub, " CHECK_PROC(%s);\n", funcDesc[i].name);
33848+ }
33849+
33850+ /*
33851+ fprintf(client_stub, " do_opengl_call(%s_func, %s",
33852+ funcDesc[i].name, (strcmp(funcDesc[i].type, "void") == 0) ? "NULL" : "&ret");
33853+ for(j=0;j<funcDesc[i].nargs;j++)
33854+ {
33855+ fprintf(client_stub, ", arg_%d", j);
33856+ }
33857+ fprintf(client_stub, ");\n");
33858+ */
33859+
33860+ if (funcDesc[i].nargs)
33861+ {
33862+ fprintf(client_stub, " long args[] = { ");
33863+ for(j=0;j<funcDesc[i].nargs;j++)
33864+ {
33865+ if (j > 0) fprintf(client_stub, ", ");
33866+ if (strstr(funcDesc[i].args[j], "*"))
33867+ {
33868+ fprintf(client_stub, "POINTER_TO_ARG(arg_%d)", j);
33869+ }
33870+ else
33871+ {
33872+ const char* symbolic_type = get_type_string(funcDesc[i].args[j]);
33873+ if (strcmp(symbolic_type, "TYPE_CHAR") == 0)
33874+ fprintf(client_stub, "CHAR_TO_ARG");
33875+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_CHAR") == 0)
33876+ fprintf(client_stub, "UNSIGNED_CHAR_TO_ARG");
33877+ else if (strcmp(symbolic_type, "TYPE_SHORT") == 0)
33878+ fprintf(client_stub, "SHORT_TO_ARG");
33879+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_SHORT") == 0)
33880+ fprintf(client_stub, "UNSIGNED_SHORT_TO_ARG");
33881+ else if (strcmp(symbolic_type, "TYPE_INT") == 0)
33882+ fprintf(client_stub, "INT_TO_ARG");
33883+ else if (strcmp(symbolic_type, "TYPE_UNSIGNED_INT") == 0)
33884+ fprintf(client_stub, "UNSIGNED_INT_TO_ARG");
33885+ else if (strcmp(symbolic_type, "TYPE_FLOAT") == 0)
33886+ fprintf(client_stub, "FLOAT_TO_ARG");
33887+ else if (strcmp(symbolic_type, "TYPE_16FLOAT") == 0)
33888+ fprintf(client_stub, "POINTER_TO_ARG");
33889+ else if (strcmp(symbolic_type, "TYPE_DOUBLE") == 0)
33890+ fprintf(client_stub, "DOUBLE_TO_ARG");
33891+ else if ( strcmp(symbolic_type, "TYPE_16DOUBLE") == 0)
33892+ fprintf(client_stub, "POINTER_TO_ARG");
33893+ else if ( strcmp(symbolic_type, "TYPE_128UCHAR") == 0 || strcmp(symbolic_type, "TYPE_OUT_128UCHAR") == 0)
33894+ fprintf(client_stub, "POINTER_TO_ARG");
33895+ else
33896+ {
33897+ fprintf(stderr, "Unknown : %s\n", symbolic_type);
33898+ assert(0);
33899+ }
33900+ fprintf(client_stub, "(arg_%d)", j);
33901+ }
33902+ }
33903+ fprintf(client_stub, "};\n");
33904+ }
33905+
33906+ fprintf(client_stub, " do_opengl_call(%s_func, %s, %s, NULL);\n",
33907+ funcDesc[i].name, (strcmp(funcDesc[i].type, "void") == 0) ? "NULL" : "&ret",
33908+ (funcDesc[i].nargs) ? "args" : "NULL");
33909+
33910+ if (strcmp(funcDesc[i].type, "void") != 0)
33911+ {
33912+ fprintf(client_stub, " return ret;\n");
33913+ }
33914+ fprintf(client_stub, "}\n\n");
33915+ }
33916+
33917+ fprintf(server_stub, " case %s_func:\n", funcDesc[i].name);
33918+ fprintf(server_stub, " {\n");
33919+
33920+ if (isExt(&funcDesc[i]))
33921+ {
33922+ fprintf(server_stub, " GET_EXT_PTR(%s, %s, (", funcDesc[i].type, funcDesc[i].name);
33923+ fprintf_prototype_args(server_stub, &funcDesc[i]);
33924+ fprintf(server_stub, "));\n");
33925+ }
33926+
33927+ fprintf(server_stub, " ");
33928+
33929+ if (strcmp(funcDesc[i].type, "void") == 0)
33930+ ;
33931+ else if (strcmp(get_type_string(funcDesc[i].type), "TYPE_INT") == 0 ||
33932+ strcmp(get_type_string(funcDesc[i].type), "TYPE_UNSIGNED_INT") == 0)
33933+ fprintf(server_stub, "*pret_int = ");
33934+ else if (strcmp(get_type_string(funcDesc[i].type), "TYPE_CHAR") == 0 ||
33935+ strcmp(get_type_string(funcDesc[i].type), "TYPE_UNSIGNED_CHAR") == 0)
33936+ fprintf(server_stub, "*pret_char = ");
33937+ else
33938+ {
33939+ fprintf(stderr, "unknown ret type = %s\n", get_type_string(funcDesc[i].type));
33940+ exit(-1);
33941+ }
33942+ /*if (strstr(funcDesc[i].name, "EXT"))
33943+ {
33944+ char* dup = strdup(funcDesc[i].name);
33945+ *strstr(dup, "EXT") = 0;
33946+ fprintf(server_stub, "%s(", dup);
33947+ free(dup);
33948+ }
33949+ else*/
33950+ {
33951+ if (isExt(&funcDesc[i]))
33952+ fprintf(server_stub, "ptr_func_%s(", funcDesc[i].name);
33953+ else
33954+ fprintf(server_stub, "%s(", funcDesc[i].name);
33955+ }
33956+ char* c_type_name;
33957+ if (is_known_arg_vector(&funcDesc[i], NULL, &c_type_name))
33958+ {
33959+ for(j=0;j<funcDesc[i].nargs - 1;j++)
33960+ {
33961+ if (j != 0) fprintf(server_stub,", ");
33962+ print_server_side_argument(server_stub, j, funcDesc[i].args[j]);
33963+ }
33964+ if (j != 0) fprintf(server_stub,", ");
33965+ if (strstr(funcDesc[i].args[funcDesc[i].nargs - 1], "const"))
33966+ fprintf(server_stub, "(const %s*)args[%d]", c_type_name, j);
33967+ else
33968+ fprintf(server_stub, "(%s*)args[%d]", c_type_name, j);
33969+ }
33970+ else
33971+ {
33972+ for(j=0;j<funcDesc[i].nargs;j++)
33973+ {
33974+ if (j != 0) fprintf(server_stub,", ");
33975+ print_server_side_argument(server_stub, j, funcDesc[i].args[j]);
33976+ }
33977+ }
33978+ fprintf(server_stub, ");\n");
33979+
33980+ fprintf(server_stub, " break;\n");
33981+ fprintf(server_stub, " }\n");
33982+ }
33983+ }
33984+
33985+ fprintf(server_stub, " default:\n");
33986+ fprintf(server_stub, " fprintf(stderr, \"unknown=%%d\", func_number);\n");
33987+ fprintf(server_stub, " break;\n");
33988+ fprintf(server_stub, " }\n");
33989+ fprintf(server_stub, "}\n");
33990+
33991+ fprintf(header, "#undef MAGIC_MACRO\n");
33992+ fprintf(header, "#define MAGIC_MACRO(x) COMPOSE(x,_signature)\n");
33993+ fprintf(header, "static const int* tab_opengl_calls[GL_N_CALLS] =\n");
33994+ fprintf(header, "{\n");
33995+ fprintf(header, "#include \"gl_func_perso.h\"\n");
33996+ for(i=0;i<funcDescCount;i++)
33997+ {
33998+ if (funcDesc[i].ok)
33999+ {
34000+ fprintf(header, " %s_signature,\n", funcDesc[i].name);
34001+ }
34002+ }
34003+ fprintf(header, "};\n\n");
34004+
34005+ fprintf(header, "#undef MAGIC_MACRO\n");
34006+ fprintf(header, "#define MAGIC_MACRO(x) #x\n");
34007+ fprintf(header, "static const char* tab_opengl_calls_name[GL_N_CALLS] =\n");
34008+ fprintf(header, "{\n");
34009+ fprintf(header, "#include \"gl_func_perso.h\"\n");
34010+ for(i=0;i<funcDescCount;i++)
34011+ {
34012+ if (funcDesc[i].ok)
34013+ {
34014+ fprintf(header, " \"%s\",\n", funcDesc[i].name);
34015+ }
34016+ }
34017+ fprintf(header, "};\n\n");
34018+
34019+ fclose(header);
34020+ fclose(server_stub);
34021+ fclose(client_stub);
34022+
34023+ return 0;
34024+}
34025Index: qemu-0.12.4/target-i386/parse_mesa_get_c.c
34026===================================================================
34027--- /dev/null
34028+++ qemu-0.12.4/target-i386/parse_mesa_get_c.c
34029@@ -0,0 +1,225 @@
34030+/*
34031+ * Parse the "get.c" from mesa source tree to generate "glgetv_cst.h"
34032+ *
34033+ * Copyright (c) 2007 Even Rouault
34034+ *
34035+ * Permission is hereby granted, free of charge, to any person obtaining a copy
34036+ * of this software and associated documentation files (the "Software"), to deal
34037+ * in the Software without restriction, including without limitation the rights
34038+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
34039+ * copies of the Software, and to permit persons to whom the Software is
34040+ * furnished to do so, subject to the following conditions:
34041+ *
34042+ * The above copyright notice and this permission notice shall be included in
34043+ * all copies or substantial portions of the Software.
34044+ *
34045+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
34046+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
34047+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
34048+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
34049+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34050+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
34051+ * THE SOFTWARE.
34052+ */
34053+
34054+// gcc -Wall parse_mesa_get_c.c -o parse_mesa_get_c -I. && ./parse_mesa_get_c
34055+
34056+#include <stdlib.h>
34057+#include <stdio.h>
34058+#include <string.h>
34059+#include <assert.h>
34060+
34061+#include "mesa_gl.h"
34062+#include "mesa_glext.h"
34063+
34064+/* #include "mesa_enums.c" */
34065+
34066+int gl_lookup_enum_by_name(const char* name)
34067+{
34068+ FILE* f;
34069+ char buffer[256];
34070+ char template1[256];
34071+ char template2[256];
34072+ int i;
34073+ sprintf(template1, "#define %s\t", name);
34074+ sprintf(template2, "#define %s ", name);
34075+ for(i=0;i<2;i++)
34076+ {
34077+ if (i == 0)
34078+ f = fopen("mesa_gl.h", "r");
34079+ else
34080+ f = fopen("mesa_glext.h", "r");
34081+ while(fgets(buffer, 256, f))
34082+ {
34083+ if (strstr(buffer, template1) || strstr(buffer, template2))
34084+ {
34085+ char* c = strstr(buffer, "0x");
34086+ assert(c);
34087+ int ret;
34088+ ret = strtol(c, NULL, 16);
34089+ return ret;
34090+ }
34091+ }
34092+ fclose(f);
34093+ }
34094+
34095+ return -1;
34096+}
34097+
34098+typedef struct
34099+{
34100+ int value;
34101+ char* name;
34102+ int nb_elts;
34103+} Token;
34104+
34105+int compare_func(Token* a, Token* b)
34106+{
34107+ return a->value - b->value;
34108+}
34109+
34110+typedef struct
34111+{
34112+ int i;
34113+ char* str;
34114+} Cpl;
34115+#define CPL(x) {x, #x}
34116+
34117+Cpl constantsOneVal[] =
34118+{
34119+ CPL(GL_MAX_GENERAL_COMBINERS_NV),
34120+ CPL(GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT),
34121+ CPL(GL_MAX_VERTEX_SHADER_VARIANTS_EXT),
34122+ CPL(GL_MAX_VERTEX_SHADER_INVARIANTS_EXT),
34123+ CPL(GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
34124+ CPL(GL_MAX_VERTEX_SHADER_LOCALS_EXT),
34125+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT),
34126+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT),
34127+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT),
34128+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
34129+ CPL(GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT),
34130+};
34131+#define NB_CONSTANTS_ONE_VAL 11
34132+
34133+int main(int argc, char* argv[])
34134+{
34135+ FILE* f = fopen("mesa_get.c", "r");
34136+ char buffer[256];
34137+ int state = 0;
34138+ char name[256];
34139+ int count = 0;
34140+ char template[256];
34141+ Token tokens[1000];
34142+ int ntoken = 0;
34143+ int i;
34144+ FILE* outf = fopen("glgetv_cst.h", "w");
34145+
34146+ fprintf(outf, "/* This is a generated file. Do not edit !*/\n");
34147+ fprintf(outf, "typedef struct {\n");
34148+ fprintf(outf, " GLuint count;\n");
34149+ fprintf(outf, " GLenum token;\n");
34150+ fprintf(outf, " const char *name;\n");
34151+ fprintf(outf, "} GlGetConstant ;\n");
34152+ fprintf(outf, "static const GlGetConstant gl_get_constants[] = {\n");
34153+
34154+ while(fgets(buffer, 256, f))
34155+ {
34156+ if (strstr(buffer, "_mesa_GetBooleanv"))
34157+ {
34158+ state = 1;
34159+ }
34160+ else if (state == 1)
34161+ {
34162+ if (strstr(buffer, "_mesa_GetFloatv"))
34163+ {
34164+ break;
34165+ }
34166+ else if (strstr(buffer, "case GL_"))
34167+ {
34168+ strcpy(name, strstr(buffer, "case GL_") + 5);
34169+ *strstr(name, ":") = 0;
34170+ count = 0;
34171+ strcpy(template, "params[0]");
34172+ }
34173+ else if (strstr(buffer, template))
34174+ {
34175+ count ++;
34176+ sprintf(template, "params[%d]", count);
34177+ }
34178+ else if (strstr(buffer, "break"))
34179+ {
34180+ if (count > 0)
34181+ {
34182+ int gl_lookup = gl_lookup_enum_by_name(name);
34183+ /*
34184+ int mesa_lookup = _mesa_lookup_enum_by_name(name);
34185+ if (mesa_lookup != -1)
34186+ {
34187+ if(mesa_lookup != gl_lookup)
34188+ {
34189+ fprintf(stderr, "wrong : %s %d %d !\n", name, mesa_lookup, gl_lookup);
34190+ exit(-1);
34191+ }
34192+ }*/
34193+ if (gl_lookup == -1)
34194+ {
34195+ fprintf(stderr, "not found in includes : %s\n", name);
34196+ //fprintf(outf, "/* { %d, unknown value, \"%s\" },*/\n", count, name);
34197+ }
34198+ else
34199+ {
34200+ //fprintf(outf, " { %d, 0x%04x, \"%s\" },\n", count, gl_lookup, name);
34201+ tokens[ntoken].value = gl_lookup;
34202+ tokens[ntoken].nb_elts = count;
34203+ tokens[ntoken].name = strdup(name);
34204+ ntoken++;
34205+ }
34206+ /*fprintf(outf, "#ifdef %s\n", name);
34207+ fprintf(outf, " { %d, MAKE_TOKEN_NAME(%s) },\n", count, name);
34208+ fprintf(outf, "#endif\n");*/
34209+ }
34210+ else
34211+ fprintf(stderr, "not recognized : %s\n", name);
34212+ }
34213+ }
34214+ }
34215+
34216+ for(i=0;i<NB_CONSTANTS_ONE_VAL;i++)
34217+ {
34218+ tokens[ntoken].value = constantsOneVal[i].i;
34219+ tokens[ntoken].nb_elts = 1;
34220+ tokens[ntoken].name = strdup(constantsOneVal[i].str);
34221+ ntoken++;
34222+ }
34223+
34224+ tokens[ntoken].value = GL_SPRITE_MODE_SGIX;
34225+ tokens[ntoken].nb_elts = 1;
34226+ tokens[ntoken].name = strdup("GL_SPRITE_MODE_SGIX");
34227+ ntoken++;
34228+
34229+ tokens[ntoken].value = GL_SPRITE_AXIS_SGIX ;
34230+ tokens[ntoken].nb_elts = 3;
34231+ tokens[ntoken].name = strdup("GL_SPRITE_AXIS_SGIX ");
34232+ ntoken++;
34233+
34234+ tokens[ntoken].value = GL_SPRITE_TRANSLATION_SGIX;
34235+ tokens[ntoken].nb_elts = 3;
34236+ tokens[ntoken].name = strdup("GL_SPRITE_TRANSLATION_SGIX");
34237+ ntoken++;
34238+
34239+ tokens[ntoken].value = GL_REFERENCE_PLANE_EQUATION_SGIX;
34240+ tokens[ntoken].nb_elts = 4;
34241+ tokens[ntoken].name = strdup("GL_REFERENCE_PLANE_EQUATION_SGIX");
34242+ ntoken++;
34243+
34244+
34245+ qsort(tokens, ntoken, sizeof(Token), compare_func);
34246+ for(i=0;i<ntoken;i++)
34247+ {
34248+ fprintf(outf, " { %d, 0x%04x, \"%s\" },\n", tokens[i].nb_elts, tokens[i].value, tokens[i].name);
34249+ }
34250+ fprintf(outf, "};\n");
34251+ fclose(f);
34252+ fclose(outf);
34253+ return 0;
34254+}
34255Index: qemu-0.12.4/target-i386/translate.c
34256===================================================================
34257--- qemu-0.12.4.orig/target-i386/translate.c
34258+++ qemu-0.12.4/target-i386/translate.c
34259@@ -743,6 +743,8 @@ static void gen_check_io(DisasContext *s
34260 int state_saved;
34261 target_ulong next_eip;
34262
34263+ return;
34264+
34265 state_saved = 0;
34266 if (s->pe && (s->cpl > s->iopl || s->vm86)) {
34267 if (s->cc_op != CC_OP_DYNAMIC)
34268@@ -2676,11 +2678,18 @@ static void gen_exception(DisasContext *
34269 s->is_jmp = 3;
34270 }
34271
34272+int enable_gl = 0;
34273+
34274 /* an interrupt is different from an exception because of the
34275 privilege checks */
34276 static void gen_interrupt(DisasContext *s, int intno,
34277 target_ulong cur_eip, target_ulong next_eip)
34278 {
34279+ if (enable_gl && intno == 0x99) {
34280+ gen_helper_opengl();
34281+ return;
34282+ }
34283+
34284 if (s->cc_op != CC_OP_DYNAMIC)
34285 gen_op_set_cc_op(s->cc_op);
34286 gen_jmp_im(cur_eip);
34287Index: qemu-0.12.4/vl.c
34288===================================================================
34289--- qemu-0.12.4.orig/vl.c
34290+++ qemu-0.12.4/vl.c
34291@@ -238,6 +238,7 @@ int semihosting_enabled = 0;
34292 #ifdef TARGET_ARM
34293 int old_param = 0;
34294 #endif
34295+int force_pointer = 0;
34296 const char *qemu_name;
34297 int alt_grab = 0;
34298 int ctrl_grab = 0;
34299@@ -246,6 +247,7 @@ unsigned int nb_prom_envs = 0;
34300 const char *prom_envs[MAX_PROM_ENVS];
34301 #endif
34302 int boot_menu;
34303+extern int enable_gl;
34304
34305 int nb_numa_nodes;
34306 uint64_t node_mem[MAX_NODES];
34307@@ -4432,6 +4434,8 @@ static void select_vgahw (const char *p)
34308 } else if (strstart(p, "xenfb", &opts)) {
34309 vga_interface_type = VGA_XENFB;
34310 } else if (!strstart(p, "none", &opts)) {
34311+ }
34312+ else {
34313 invalid_vga:
34314 fprintf(stderr, "Unknown vga type: %s\n", p);
34315 exit(1);
34316@@ -5563,6 +5567,9 @@ int main(int argc, char **argv, char **e
34317 old_param = 1;
34318 break;
34319 #endif
34320+ case QEMU_OPTION_force_pointer:
34321+ force_pointer = 1;
34322+ break;
34323 case QEMU_OPTION_clock:
34324 configure_alarms(optarg);
34325 break;
34326@@ -5577,6 +5584,12 @@ int main(int argc, char **argv, char **e
34327 }
34328 configure_rtc(opts);
34329 break;
34330+#ifdef TARGET_OPENGL_OK
34331+ case QEMU_OPTION_enable_gl:
34332+ fprintf(stderr, "Enabling opengl\n");
34333+ enable_gl = 1;
34334+ break;
34335+#endif
34336 case QEMU_OPTION_tb_size:
34337 tb_size = strtol(optarg, NULL, 0);
34338 if (tb_size < 0)
34339@@ -5933,6 +5946,14 @@ int main(int argc, char **argv, char **e
34340 }
34341 }
34342 }
34343+#ifdef TARGET_OPENGL_OK
34344+ if (enable_gl) {
34345+ /* Use second serial port */
34346+ int opengl_serial = 1;
34347+
34348+ add_device_config(DEV_SERIAL, "opengl");
34349+ }
34350+#endif
34351
34352 if (foreach_device_config(DEV_SERIAL, serial_parse) < 0)
34353 exit(1);
34354Index: qemu-0.12.4/qemu-options.hx
34355===================================================================
34356--- qemu-0.12.4.orig/qemu-options.hx
34357+++ qemu-0.12.4/qemu-options.hx
34358@@ -1789,6 +1789,18 @@ many timer interrupts were not processed
34359 re-inject them.
34360 ETEXI
34361
34362+DEF("enable-gl", 0, QEMU_OPTION_enable_gl, \
34363+ "-enable-gl\n")
34364+STEXI
34365+@item -enable-gl
34366+ETEXI
34367+
34368+DEF("force-pointer", 0, QEMU_OPTION_force_pointer, \
34369+ "-force-pointer\n")
34370+STEXI
34371+@item -force-pointer
34372+ETEXI
34373+
34374 DEF("icount", HAS_ARG, QEMU_OPTION_icount, \
34375 "-icount [N|auto]\n" \
34376 " enable virtual instruction counter with 2^N clock ticks per\n" \
diff --git a/meta/recipes-devtools/qemu/qemu-0.12.4/qemu-ppc-hack.patch b/meta/recipes-devtools/qemu/qemu-0.12.4/qemu-ppc-hack.patch
new file mode 100644
index 0000000000..3ed227ec35
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/qemu-ppc-hack.patch
@@ -0,0 +1,136 @@
1Quick fixes to get the ppc system model to boot a 603e based
2kernel.
3
4diff --git a/hw/m48t59.c b/hw/m48t59.c
5index ce38f8b..d99054f 100644
6--- a/hw/m48t59.c
7+++ b/hw/m48t59.c
8@@ -50,6 +50,7 @@
9 */
10
11 struct m48t59_t {
12+ SysBusDevice busdev;
13 /* Model parameters */
14 uint32_t type; // 2 = m48t02, 8 = m48t08, 59 = m48t59
15 /* Hardware parameters */
16@@ -74,11 +75,6 @@ typedef struct M48t59ISAState {
17 m48t59_t state;
18 } M48t59ISAState;
19
20-typedef struct M48t59SysBusState {
21- SysBusDevice busdev;
22- m48t59_t state;
23-} M48t59SysBusState;
24-
25 /* Fake timer functions */
26
27 /* Alarm management */
28@@ -629,8 +625,7 @@ static void m48t59_reset_isa(DeviceState *d)
29
30 static void m48t59_reset_sysbus(DeviceState *d)
31 {
32- M48t59SysBusState *sys = container_of(d, M48t59SysBusState, busdev.qdev);
33- m48t59_t *NVRAM = &sys->state;
34+ m48t59_t *NVRAM = container_of(d, m48t59_t, busdev.qdev);
35
36 m48t59_reset_common(NVRAM);
37 }
38@@ -642,7 +637,7 @@ m48t59_t *m48t59_init (qemu_irq IRQ, target_phys_addr_t mem_base,
39 {
40 DeviceState *dev;
41 SysBusDevice *s;
42- M48t59SysBusState *d;
43+ m48t59_t *d;
44
45 dev = qdev_create(NULL, "m48t59");
46 qdev_prop_set_uint32(dev, "type", type);
47@@ -659,9 +654,9 @@ m48t59_t *m48t59_init (qemu_irq IRQ, target_phys_addr_t mem_base,
48 sysbus_mmio_map(s, 0, mem_base);
49 }
50
51- d = FROM_SYSBUS(M48t59SysBusState, s);
52+ d = FROM_SYSBUS(m48t59_t, s);
53
54- return &d->state;
55+ return d;
56 }
57
58 m48t59_t *m48t59_init_isa(uint32_t io_base, uint16_t size, int type)
59@@ -711,8 +706,7 @@ static int m48t59_init_isa1(ISADevice *dev)
60
61 static int m48t59_init1(SysBusDevice *dev)
62 {
63- M48t59SysBusState *d = FROM_SYSBUS(M48t59SysBusState, dev);
64- m48t59_t *s = &d->state;
65+ m48t59_t *s = FROM_SYSBUS(m48t59_t, dev);
66 int mem_index;
67
68 sysbus_init_irq(dev, &s->IRQ);
69@@ -741,12 +735,12 @@ static ISADeviceInfo m48t59_isa_info = {
70 static SysBusDeviceInfo m48t59_info = {
71 .init = m48t59_init1,
72 .qdev.name = "m48t59",
73- .qdev.size = sizeof(M48t59SysBusState),
74+ .qdev.size = sizeof(m48t59_t),
75 .qdev.reset = m48t59_reset_sysbus,
76 .qdev.props = (Property[]) {
77- DEFINE_PROP_UINT32("size", M48t59SysBusState, state.size, -1),
78- DEFINE_PROP_UINT32("type", M48t59SysBusState, state.type, -1),
79- DEFINE_PROP_HEX32( "io_base", M48t59SysBusState, state.io_base, 0),
80+ DEFINE_PROP_UINT32("size", m48t59_t, size, -1),
81+ DEFINE_PROP_UINT32("type", m48t59_t, type, -1),
82+ DEFINE_PROP_HEX32( "io_base", m48t59_t, io_base, 0),
83 DEFINE_PROP_END_OF_LIST(),
84 }
85 };
86diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
87index eb758f2..08db51b 100644
88--- a/hw/ppc_prep.c
89+++ b/hw/ppc_prep.c
90@@ -73,7 +73,7 @@ qemu_log_mask(CPU_LOG_IOPORT, fmt, ## __VA_ARGS__)
91 /* Constants for devices init */
92 static const int ide_iobase[2] = { 0x1f0, 0x170 };
93 static const int ide_iobase2[2] = { 0x3f6, 0x376 };
94-static const int ide_irq[2] = { 13, 13 };
95+static const int ide_irq[2] = { 13, 14 };
96
97 #define NE2000_NB_MAX 6
98
99@@ -620,9 +620,6 @@ static void ppc_prep_init (ram_addr_t ram_size,
100 if (filename) {
101 qemu_free(filename);
102 }
103- if (env->nip < 0xFFF80000 && bios_size < 0x00100000) {
104- hw_error("PowerPC 601 / 620 / 970 need a 1MB BIOS\n");
105- }
106
107 if (linux_boot) {
108 kernel_base = KERNEL_LOAD_ADDR;
109diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c
110index e3bd29c..1cb2e07 100644
111--- a/target-ppc/op_helper.c
112+++ b/target-ppc/op_helper.c
113@@ -1646,20 +1646,20 @@ static inline void do_rfi(target_ulong nip, target_ulong msr,
114 void helper_rfi (void)
115 {
116 do_rfi(env->spr[SPR_SRR0], env->spr[SPR_SRR1],
117- ~((target_ulong)0x0), 1);
118+ ~((target_ulong)0xFFFF0000), 1);
119 }
120
121 #if defined(TARGET_PPC64)
122 void helper_rfid (void)
123 {
124 do_rfi(env->spr[SPR_SRR0], env->spr[SPR_SRR1],
125- ~((target_ulong)0x0), 0);
126+ ~((target_ulong)0xFFFF0000), 0);
127 }
128
129 void helper_hrfid (void)
130 {
131 do_rfi(env->spr[SPR_HSRR0], env->spr[SPR_HSRR1],
132- ~((target_ulong)0x0), 0);
133+ ~((target_ulong)0xFFFF0000), 0);
134 }
135 #endif
136 #endif
diff --git a/meta/recipes-devtools/qemu/qemu-0.12.4/qemu-vmware-vga-depth.patch b/meta/recipes-devtools/qemu/qemu-0.12.4/qemu-vmware-vga-depth.patch
new file mode 100644
index 0000000000..43071868f3
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/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
4diff --git a/console.h b/console.h
5index dfc8ae4..05fbf17 100644
6--- a/console.h
7+++ b/console.h
8@@ -122,6 +122,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@@ -129,6 +135,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)(int width, int height, int bpp, int hot_x, int hot_y,
29@@ -185,6 +192,12 @@ static inline void register_displaychangelistener(DisplayState *ds, 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;
42diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c
43index 01bb85b..d73cca6 100644
44--- a/hw/vmware_vga.c
45+++ b/hw/vmware_vga.c
46@@ -927,8 +927,9 @@ static void vmsvga_update_display(void *opaque)
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@@ -1133,6 +1134,8 @@ static const VMStateDescription vmstate_vmware_vga = {
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@@ -1160,7 +1163,10 @@ static void vmsvga_init(struct vmsvga_state_s *s, int vga_ram_size)
67
68 rom_add_vga(VGABIOS_FILENAME);
69
70- vmsvga_reset(s);
71+ dpc = qemu_mallocz(sizeof(DisplayPostCallback));
72+ dpc->postcall = vmsvga_reset;
73+ dpc->parm = s;
74+ register_displaypostcallback(s->vga.ds, dpc);
75 }
76
77 static void pci_vmsvga_map_ioport(PCIDevice *pci_dev, int region_num,
78diff --git a/qemu-common.h b/qemu-common.h
79index a23afbc..19f107a 100644
80--- a/qemu-common.h
81+++ b/qemu-common.h
82@@ -198,6 +198,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;
90diff --git a/vl.c b/vl.c
91index 39182ea..9a3e9fd 100644
92--- a/vl.c
93+++ b/vl.c
94@@ -4863,6 +4863,7 @@ int main(int argc, char **argv, char **envp)
95 char boot_devices[33] = "cad"; /* default to HD->floppy->CD-ROM */
96 DisplayState *ds;
97 DisplayChangeListener *dcl;
98+ DisplayPostCallback *dpc;
99 int cyls, heads, secs, translation;
100 QemuOpts *hda_opts = NULL, *opts;
101 int optind;
102@@ -6053,6 +6053,13 @@ int main(int argc, char **argv, char **envp)
103 }
104 dpy_resize(ds);
105
106+ dpc = ds->postcalls;
107+ while (dpc != NULL) {
108+ if (dpc->postcall != NULL)
109+ dpc->postcall(dpc->parm);
110+ dpc = dpc->next;
111+ }
112+
113 dcl = ds->listeners;
114 while (dcl != NULL) {
115 if (dcl->dpy_refresh != NULL) {
diff --git a/meta/recipes-devtools/qemu/qemu-0.12.4/qemugl-allow-glxcontext-release.patch b/meta/recipes-devtools/qemu/qemu-0.12.4/qemugl-allow-glxcontext-release.patch
new file mode 100644
index 0000000000..43acc361a0
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/qemugl-allow-glxcontext-release.patch
@@ -0,0 +1,63 @@
1Allow releasing the GLXContext/Drawable with glXMakeCurrent.
2
3---
4commit d942ed4e853e08d2298f3e11e9a952c1d952bff5
5tree f0a934efd8a8ff48e2d96f0d6fc7d70bef106bfe
6parent 93619e6be184f8de08759d347825ee0d678a6f9c
7author Andrzej Zaborowski <andrew.zaborowski@intel.com> Tue, 16 Jun 2009 22:22:05 +0200
8committer Andrzej Zaborowski <andrew.zaborowski@intel.com> Tue, 16 Jun 2009 22:22:05 +0200
9
10 target-i386/opengl_exec.c | 31 ++++++++++++++++---------------
11 1 files changed, 16 insertions(+), 15 deletions(-)
12
13Index: qemu/target-i386/opengl_exec.c
14===================================================================
15--- qemu.orig/target-i386/opengl_exec.c 2010-05-10 18:46:43.175394992 -0400
16+++ qemu/target-i386/opengl_exec.c 2010-05-10 18:46:43.218419933 -0400
17@@ -1600,10 +1600,9 @@ int do_function_call(int func_number, ar
18 fprintf(stderr, "client_drawable=%p fake_ctx=%d\n",
19 (void *) client_drawable, fake_ctxt);
20
21- if (client_drawable == 0 && fake_ctxt == 0) {
22+ if (client_drawable == 0 && fake_ctxt == 0)
23 ret_int = glXMakeCurrent(dpy, 0, NULL);
24- process->current_state = &process->default_state;
25- } else if ((drawable = (GLXDrawable)
26+ else if ((drawable = (GLXDrawable)
27 get_association_fakepbuffer_pbuffer(
28 process, client_drawable))) {
29 GLXContext ctxt = get_association_fakecontext_glxcontext(
30@@ -1651,19 +1650,21 @@ int do_function_call(int func_number, ar
31 }
32
33 if (ret_int) {
34- for (i = 0; i < process->nb_states; i ++) {
35- if (process->glstates[i]->fake_ctxt == fake_ctxt) {
36- /* HACK !!! REMOVE */
37- process->current_state = process->glstates[i];
38- process->current_state->drawable = drawable;
39- break;
40- }
41- }
42+ if (fake_ctxt) {
43+ for (i = 0; i < process->nb_states; i ++)
44+ if (process->glstates[i]->fake_ctxt == fake_ctxt) {
45+ /* HACK !!! REMOVE */
46+ process->current_state = process->glstates[i];
47+ process->current_state->drawable = drawable;
48+ break;
49+ }
50
51- if (i == process->nb_states) {
52- fprintf(stderr, "error remembering the new context\n");
53- exit(-1);
54- }
55+ if (i == process->nb_states) {
56+ fprintf(stderr, "error remembering the new context\n");
57+ exit(-1);
58+ }
59+ } else
60+ process->current_state = &process->default_state;
61 }
62 break;
63 }
diff --git a/meta/recipes-devtools/qemu/qemu-0.12.4/workaround_bad_futex_headers.patch b/meta/recipes-devtools/qemu/qemu-0.12.4/workaround_bad_futex_headers.patch
new file mode 100644
index 0000000000..7727a39f37
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.12.4/workaround_bad_futex_headers.patch
@@ -0,0 +1,24 @@
1---
2 linux-user/syscall.c | 10 +++++++++-
3 1 file changed, 9 insertions(+), 1 deletion(-)
4
5Index: qemu/linux-user/syscall.c
6===================================================================
7--- qemu.orig/linux-user/syscall.c 2010-05-11 16:52:16.929785275 -0400
8+++ qemu/linux-user/syscall.c 2010-05-11 16:52:25.174783517 -0400
9@@ -94,6 +94,15 @@
10 #define CLONE_NPTL_FLAGS2 0
11 #endif
12
13+#define FUTEX_WAIT 0
14+#define FUTEX_WAKE 1
15+#define FUTEX_FD 2
16+#define FUTEX_REQUEUE 3
17+#define FUTEX_CMP_REQUEUE 4
18+#define FUTEX_WAKE_OP 5
19+#define FUTEX_LOCK_PI 6
20+#define FUTEX_UNLOCK_PI 7
21+
22 //#define DEBUG
23
24 //#include <linux/msdos_fs.h>
diff --git a/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb b/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb
new file mode 100644
index 0000000000..19fb6f4ff7
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb
@@ -0,0 +1,21 @@
1DESCRIPTION = "Qemu helper utilities from Poky"
2LICENSE = "GPLv2"
3RDEPENDS = "qemu-native"
4PR = "r0"
5
6FILESPATH = "${FILE_DIRNAME}/qemu-helper"
7
8SRC_URI = "file://tunctl.c"
9
10S = "${WORKDIR}"
11
12inherit native
13
14do_compile() {
15 ${CC} tunctl.c -o tunctl
16}
17
18do_install() {
19 install -d ${D}${bindir}
20 install tunctl ${D}${bindir}/
21}
diff --git a/meta/recipes-devtools/qemu/qemu-helper-nativesdk_1.0.bb b/meta/recipes-devtools/qemu/qemu-helper-nativesdk_1.0.bb
new file mode 100644
index 0000000000..473411db92
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-helper-nativesdk_1.0.bb
@@ -0,0 +1,44 @@
1DESCRIPTION = "Qemu helper scripts from Poky"
2LICENSE = "GPL"
3RDEPENDS = "qemu-nativesdk"
4PR = "r7"
5
6FILESPATH = "${FILE_DIRNAME}/qemu-helper"
7
8SRC_URI = "file://${POKYBASE}/scripts/poky-qemu \
9 file://${POKYBASE}/scripts/poky-qemu-internal \
10 file://${POKYBASE}/scripts/poky-addptable2image \
11 file://${POKYBASE}/scripts/poky-qemu-ifup \
12 file://${POKYBASE}/scripts/poky-qemu-ifdown \
13 file://${POKYBASE}/scripts/poky-find-native-sysroot \
14 file://${POKYBASE}/scripts/poky-extract-sdk \
15 file://${POKYBASE}/scripts/poky-export-rootfs \
16 file://${POKYBASE}/scripts/runqemu-nfs \
17 file://tunctl.c \
18 file://raw2flash.c \
19 "
20
21S = "${WORKDIR}"
22
23inherit nativesdk
24
25do_compile() {
26 ${CC} tunctl.c -o tunctl
27 ${CC} raw2flash.c -o raw2flash.spitz
28 ${CC} raw2flash.c -o flash2raw.spitz -Dflash2raw
29}
30
31do_install() {
32 install -d ${D}${bindir}
33 install -m 0755 ${WORKDIR}${POKYBASE}/scripts/poky-* ${D}${bindir}/
34 install -m 0755 ${WORKDIR}${POKYBASE}/scripts/runqemu-nfs ${D}${bindir}/
35 install tunctl ${D}${bindir}/
36 install raw2flash.spitz ${D}${bindir}/
37 install flash2raw.spitz ${D}${bindir}/
38 ln -fs raw2flash.spitz ${D}${bindir}/raw2flash.akita
39 ln -fs raw2flash.spitz ${D}${bindir}/raw2flash.borzoi
40 ln -fs raw2flash.spitz ${D}${bindir}/raw2flash.terrier
41 ln -fs flash2raw.spitz ${D}${bindir}/flash2raw.akita
42 ln -fs flash2raw.spitz ${D}${bindir}/flash2raw.borzoi
43 ln -fs flash2raw.spitz ${D}${bindir}/flash2raw.terrier
44}
diff --git a/meta/recipes-devtools/qemu/qemu-helper/raw2flash.c b/meta/recipes-devtools/qemu/qemu-helper/raw2flash.c
new file mode 100644
index 0000000000..19faf629b9
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-helper/raw2flash.c
@@ -0,0 +1,370 @@
1/*
2 * Copyright (c) 2006 OpenedHand Ltd.
3 *
4 * This file is licensed under GNU GPL v2.
5 */
6#include <string.h>
7#include <unistd.h>
8#include <stdint.h>
9#include <stdio.h>
10#include <sys/types.h>
11#include <stdlib.h>
12
13#define TFR(_) _
14#define VERBOSE
15#define PBAR_LEN 40
16
17#define PARTITION_START 0x00700000
18
19static const int ecc_pos8[] = {
20 0x0, 0x1, 0x2,
21};
22
23static const int ecc_pos16[] = {
24 0x0, 0x1, 0x2, 0x3, 0x6, 0x7,
25};
26
27static const int ecc_pos64[] = {
28 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
29 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
30 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
31};
32
33static const int ecc_akita[] = {
34 0x05, 0x01, 0x02, 0x03, 0x06, 0x07, 0x15, 0x11,
35 0x12, 0x13, 0x16, 0x17, 0x25, 0x21, 0x22, 0x23,
36 0x26, 0x27, 0x35, 0x31, 0x32, 0x33, 0x36, 0x37,
37};
38
39struct jffs_marker_s {
40 int pos;
41 uint8_t value;
42};
43
44static const struct jffs_marker_s free_pos8[] = {
45 { 0x03, 0xff }, { 0x04, 0xff }, { 0x06, 0x85 }, { 0x07, 0x19 },
46 { -1 },
47};
48
49static const struct jffs_marker_s free_pos16[] = {
50 { 0x08, 0x85 }, { 0x09, 0x19 }, { 0x0a, 0x03 }, { 0x0b, 0x20 },
51 { 0x0c, 0x08 }, { 0x0d, 0x00 }, { 0x0e, 0x00 }, { 0x0f, 0x00 },
52 { -1 },
53};
54
55static const struct jffs_marker_s free_pos64[] = {
56 { 0x02, 0xff }, { 0x03, 0xff }, { 0x04, 0xff }, { 0x05, 0xff },
57 { 0x06, 0xff }, { 0x07, 0xff }, { 0x08, 0xff }, { 0x09, 0xff },
58 { 0x0a, 0xff }, { 0x0b, 0xff }, { 0x0c, 0xff }, { 0x0d, 0xff },
59 { 0x0e, 0xff }, { 0x0f, 0xff }, { 0x10, 0x85 }, { 0x11, 0x19 },
60 { 0x12, 0x03 }, { 0x13, 0x20 }, { 0x14, 0x08 }, { 0x15, 0x00 },
61 { 0x16, 0x00 }, { 0x17, 0x00 }, { 0x18, 0xff }, { 0x19, 0xff },
62 { 0x1a, 0xff }, { 0x1b, 0xff }, { 0x1c, 0xff }, { 0x1d, 0xff },
63 { 0x1e, 0xff }, { 0x1f, 0xff }, { 0x20, 0xff }, { 0x21, 0xff },
64 { 0x22, 0xff }, { 0x23, 0xff }, { 0x24, 0xff }, { 0x25, 0xff },
65 { 0x26, 0xff }, { 0x27, 0xff },
66 { -1 },
67};
68
69static const struct jffs_marker_s free_akita[] = {
70 { 0x08, 0x85 }, { 0x09, 0x19 }, { 0x0a, 0x03 }, { 0x0b, 0x20 },
71 { 0x0c, 0x08 }, { 0x0d, 0x00 }, { 0x0e, 0x00 }, { 0x0f, 0x00 },
72 { 0x10, 0xff },
73 { -1 },
74};
75
76#define LEN(array) (sizeof(array) / sizeof(*array))
77
78static const struct ecc_style_s {
79 int page_size;
80 int oob_size;
81 int eccbytes;
82 int eccsize;
83 const int *eccpos;
84 int romsize;
85 const struct jffs_marker_s *freepos;
86} spitz = {
87 0x200, 0x10, 0x100, LEN(ecc_pos16), ecc_pos16, 0x01000000, free_pos16
88}, akita = {
89 0x800, 0x40, 0x100, LEN(ecc_akita), ecc_akita, 0x08000000, free_akita
90}, borzoi = {
91 0x800, 0x40, 0x100, LEN(ecc_akita), ecc_akita, 0x08000000, free_akita
92}, terrier = {
93 0x800, 0x40, 0x100, LEN(ecc_akita), ecc_akita, 0x08000000, free_akita
94};
95
96struct ecc_state_s {
97 int count;
98 uint8_t cp;
99 uint8_t lp[2];
100 const struct ecc_style_s *style;
101};
102
103#ifndef flash2raw
104/*
105 * Pre-calculated 256-way 1 byte column parity. Table borrowed from Linux.
106 */
107static const uint8_t ecc_precalc_table[] = {
108 0x00, 0x55, 0x56, 0x03, 0x59, 0x0c, 0x0f, 0x5a,
109 0x5a, 0x0f, 0x0c, 0x59, 0x03, 0x56, 0x55, 0x00,
110 0x65, 0x30, 0x33, 0x66, 0x3c, 0x69, 0x6a, 0x3f,
111 0x3f, 0x6a, 0x69, 0x3c, 0x66, 0x33, 0x30, 0x65,
112 0x66, 0x33, 0x30, 0x65, 0x3f, 0x6a, 0x69, 0x3c,
113 0x3c, 0x69, 0x6a, 0x3f, 0x65, 0x30, 0x33, 0x66,
114 0x03, 0x56, 0x55, 0x00, 0x5a, 0x0f, 0x0c, 0x59,
115 0x59, 0x0c, 0x0f, 0x5a, 0x00, 0x55, 0x56, 0x03,
116 0x69, 0x3c, 0x3f, 0x6a, 0x30, 0x65, 0x66, 0x33,
117 0x33, 0x66, 0x65, 0x30, 0x6a, 0x3f, 0x3c, 0x69,
118 0x0c, 0x59, 0x5a, 0x0f, 0x55, 0x00, 0x03, 0x56,
119 0x56, 0x03, 0x00, 0x55, 0x0f, 0x5a, 0x59, 0x0c,
120 0x0f, 0x5a, 0x59, 0x0c, 0x56, 0x03, 0x00, 0x55,
121 0x55, 0x00, 0x03, 0x56, 0x0c, 0x59, 0x5a, 0x0f,
122 0x6a, 0x3f, 0x3c, 0x69, 0x33, 0x66, 0x65, 0x30,
123 0x30, 0x65, 0x66, 0x33, 0x69, 0x3c, 0x3f, 0x6a,
124 0x6a, 0x3f, 0x3c, 0x69, 0x33, 0x66, 0x65, 0x30,
125 0x30, 0x65, 0x66, 0x33, 0x69, 0x3c, 0x3f, 0x6a,
126 0x0f, 0x5a, 0x59, 0x0c, 0x56, 0x03, 0x00, 0x55,
127 0x55, 0x00, 0x03, 0x56, 0x0c, 0x59, 0x5a, 0x0f,
128 0x0c, 0x59, 0x5a, 0x0f, 0x55, 0x00, 0x03, 0x56,
129 0x56, 0x03, 0x00, 0x55, 0x0f, 0x5a, 0x59, 0x0c,
130 0x69, 0x3c, 0x3f, 0x6a, 0x30, 0x65, 0x66, 0x33,
131 0x33, 0x66, 0x65, 0x30, 0x6a, 0x3f, 0x3c, 0x69,
132 0x03, 0x56, 0x55, 0x00, 0x5a, 0x0f, 0x0c, 0x59,
133 0x59, 0x0c, 0x0f, 0x5a, 0x00, 0x55, 0x56, 0x03,
134 0x66, 0x33, 0x30, 0x65, 0x3f, 0x6a, 0x69, 0x3c,
135 0x3c, 0x69, 0x6a, 0x3f, 0x65, 0x30, 0x33, 0x66,
136 0x65, 0x30, 0x33, 0x66, 0x3c, 0x69, 0x6a, 0x3f,
137 0x3f, 0x6a, 0x69, 0x3c, 0x66, 0x33, 0x30, 0x65,
138 0x00, 0x55, 0x56, 0x03, 0x59, 0x0c, 0x0f, 0x5a,
139 0x5a, 0x0f, 0x0c, 0x59, 0x03, 0x56, 0x55, 0x00,
140};
141
142/* Update ECC parity count */
143static inline uint8_t ecc_digest(struct ecc_state_s *s, uint8_t sample) {
144 uint8_t idx = ecc_precalc_table[sample];
145
146 s->cp ^= idx & 0x3f;
147 if (idx & 0x40) {
148 s->lp[0] ^= ~(s->count & 0xff);
149 s->lp[1] ^= s->count & 0xff;
150 }
151 s->count ++;
152
153 return sample;
154}
155
156static void buffer_digest(struct ecc_state_s *ecc,
157 const uint8_t *buf, uint8_t *out) {
158 int i, lp_a[2];
159
160 ecc->lp[0] = 0x00;
161 ecc->lp[1] = 0x00;
162 ecc->cp = 0x00;
163 ecc->count = 0;
164 for (i = 0; i < ecc->style->eccbytes; i ++)
165 ecc_digest(ecc, buf[i]);
166
167# define BSHR(byte, from, to) ((ecc->lp[byte] >> (from - to)) & (1 << to))
168 lp_a[0] =
169 BSHR(0, 4, 0) | BSHR(0, 5, 2) |
170 BSHR(0, 6, 4) | BSHR(0, 7, 6) |
171 BSHR(1, 4, 1) | BSHR(1, 5, 3) |
172 BSHR(1, 6, 5) | BSHR(1, 7, 7);
173
174# define BSHL(byte, from, to) ((ecc->lp[byte] << (to - from)) & (1 << to))
175 lp_a[1] =
176 BSHL(0, 0, 0) | BSHL(0, 1, 2) |
177 BSHL(0, 2, 4) | BSHL(0, 3, 6) |
178 BSHL(1, 0, 1) | BSHL(1, 1, 3) |
179 BSHL(1, 2, 5) | BSHL(1, 3, 7);
180
181 out[0] = ~lp_a[1];
182 out[1] = ~lp_a[0];
183 out[2] = (~ecc->cp << 2) | 0x03;
184}
185
186static void jffs2_format(const struct ecc_state_s *ecc, uint8_t oob[]) {
187 const struct jffs_marker_s *byte;
188 for (byte = ecc->style->freepos; byte->pos >= 0; byte ++)
189 oob[byte->pos] = byte->value;
190}
191
192static void buffer_fill(const struct ecc_state_s *ecc, uint8_t buffer[],
193 int *len, int *partition, int count, uint8_t jffs_buffer[]) {
194 int ret;
195
196 switch (*partition) {
197 case 0:
198 if (count < PARTITION_START) {
199 memcpy(buffer, jffs_buffer + count,
200 ecc->style->eccbytes);
201 *len = ecc->style->eccbytes;
202 break;
203 }
204 *partition = 1;
205 case 1:
206 if (count - PARTITION_START < PARTITION_START) {
207 memcpy(buffer, jffs_buffer + count - PARTITION_START,
208 ecc->style->eccbytes);
209 *len = ecc->style->eccbytes;
210 break;
211 }
212
213 while (*len < ecc->style->eccbytes) {
214 ret = TFR(read(0, buffer + *len, 0x800 - *len));
215 if (ret <= 0)
216 break;
217 *len += ret;
218 }
219
220 if (*len == 0)
221 *partition = 2;
222 else if (*len < ecc->style->eccbytes) {
223 fprintf(stderr, "\nWarning: %i stray bytes\n", *len);
224 memset(buffer + *len, 0xff,
225 ecc->style->eccbytes - *len);
226 *len = ecc->style->eccbytes;
227 break;
228 } else
229 break;
230 case 2:
231 memset(buffer, 0xff, ecc->style->eccbytes);
232 *len = ecc->style->eccbytes;
233 break;
234 }
235}
236
237int main(int argc, char *argv[], char *envp[]) {
238 struct ecc_state_s ecc;
239 uint8_t buffer[0x1000], ecc_payload[0x40], regs[3], *jffs;
240 int ret, len, eccbyte, count, partition;
241
242 /* Check if we're called by "raw2flash.spitz" or similar */
243 len = strlen(argv[0]);
244 if (!strcasecmp(argv[0] + len - 5, "akita"))
245 ecc.style = &akita;
246 else if (!strcasecmp(argv[0] + len - 6, "borzoi"))
247 ecc.style = &borzoi;
248 else if (!strcasecmp(argv[0] + len - 7, "terrier"))
249 ecc.style = &terrier;
250 else
251 ecc.style = &spitz;
252
253# ifdef VERBOSE
254 fprintf(stderr, "[");
255# endif
256
257 /* Skip first 10 bytes */
258 TFR(read(0, buffer, 0x10));
259
260 len = 0;
261 jffs = (uint8_t *) malloc(PARTITION_START);
262 while (len < PARTITION_START) {
263 ret = TFR(read(0, jffs + len, PARTITION_START - len));
264 if (ret <= 0)
265 break;
266 len += ret;
267 }
268
269 /* Convert data from stdin */
270 partition = len = eccbyte = count = 0;
271 memset(ecc_payload, 0xff, ecc.style->oob_size);
272 jffs2_format(&ecc, ecc_payload);
273 while (count < ecc.style->romsize) {
274 buffer_fill(&ecc, buffer, &len, &partition, count, jffs);
275 buffer_digest(&ecc, buffer, regs);
276
277 ecc_payload[ecc.style->eccpos[eccbyte ++]] = regs[0];
278 ecc_payload[ecc.style->eccpos[eccbyte ++]] = regs[1];
279 ecc_payload[ecc.style->eccpos[eccbyte ++]] = regs[2];
280
281 TFR(write(1, buffer, ecc.style->eccbytes));
282 count += ecc.style->eccbytes;
283 len -= ecc.style->eccbytes;
284 memmove(buffer, buffer + ecc.style->eccbytes, len);
285
286 if (eccbyte >= ecc.style->eccsize) {
287 TFR(write(1, ecc_payload, ecc.style->oob_size));
288 eccbyte = 0;
289 memset(ecc_payload, 0xff, ecc.style->oob_size);
290 if (partition < 2)
291 jffs2_format(&ecc, ecc_payload);
292 }
293
294# ifdef VERBOSE
295 if (count * PBAR_LEN / ecc.style->romsize >
296 (count - ecc.style->eccbytes) *
297 PBAR_LEN / ecc.style->romsize)
298 fprintf(stderr, "#");
299# endif
300 }
301
302# ifdef VERBOSE
303 fprintf(stderr, "]\n");
304# endif
305 free(jffs);
306 return 0;
307}
308#else
309int main(int argc, char *argv[], char *envp[]) {
310 struct ecc_state_s ecc;
311 uint8_t buffer[0x1000];
312 int ret, len, count;
313
314 /* Check if we're called by "flash2raw.spitz" or similar */
315 len = strlen(argv[0]);
316 if (!strcasecmp(argv[0] + len - 5, "akita"))
317 ecc.style = &akita;
318 else if (!strcasecmp(argv[0] + len - 6, "borzoi"))
319 ecc.style = &borzoi;
320 else if (!strcasecmp(argv[0] + len - 7, "terrier"))
321 ecc.style = &terrier;
322 else
323 ecc.style = &spitz;
324
325# ifdef VERBOSE
326 fprintf(stderr, "[");
327# endif
328
329 /* Convert data from stdin */
330 count = 0;
331 while (count < ecc.style->romsize) {
332 len = 0;
333 while (len < ecc.style->page_size) {
334 ret = TFR(read(0, buffer + len,
335 ecc.style->page_size - len));
336 if (ret <= 0)
337 break;
338 len += ret;
339 }
340 if (len == 0)
341 break;
342 if (len < ecc.style->page_size) {
343 fprintf(stderr, "\nWarning: %i stray bytes\n", len);
344 }
345
346 TFR(write(1, buffer, ecc.style->page_size));
347
348 count += len;
349 len = 0;
350 while (len < ecc.style->oob_size) {
351 ret = TFR(read(0, buffer, ecc.style->oob_size - len));
352 if (ret <= 0)
353 break;
354 len += ret;
355 }
356
357# ifdef VERBOSE
358 if (count * PBAR_LEN / ecc.style->romsize >
359 (count - ecc.style->page_size) *
360 PBAR_LEN / ecc.style->romsize)
361 fprintf(stderr, "#");
362# endif
363 }
364
365# ifdef VERBOSE
366 fprintf(stderr, "]\n");
367# endif
368 return 0;
369}
370#endif
diff --git a/meta/recipes-devtools/qemu/qemu-helper/tunctl.c b/meta/recipes-devtools/qemu/qemu-helper/tunctl.c
new file mode 100644
index 0000000000..16e24a2add
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-helper/tunctl.c
@@ -0,0 +1,156 @@
1/* Copyright 2002 Jeff Dike
2 * Licensed under the GPL
3 */
4
5#include <stdio.h>
6#include <stdlib.h>
7#include <string.h>
8#include <errno.h>
9#include <fcntl.h>
10#include <unistd.h>
11#include <pwd.h>
12#include <grp.h>
13#include <net/if.h>
14#include <sys/ioctl.h>
15#include <linux/if_tun.h>
16
17/* TUNSETGROUP appeared in 2.6.23 */
18#ifndef TUNSETGROUP
19#define TUNSETGROUP _IOW('T', 206, int)
20#endif
21
22static void Usage(char *name)
23{
24 fprintf(stderr, "Create: %s [-b] [-u owner] [-g group] [-t device-name] "
25 "[-f tun-clone-device]\n", name);
26 fprintf(stderr, "Delete: %s -d device-name [-f tun-clone-device]\n\n",
27 name);
28 fprintf(stderr, "The default tun clone device is /dev/net/tun - some systems"
29 " use\n/dev/misc/net/tun instead\n\n");
30 fprintf(stderr, "-b will result in brief output (just the device name)\n");
31 exit(1);
32}
33
34int main(int argc, char **argv)
35{
36 struct ifreq ifr;
37 struct passwd *pw;
38 struct group *gr;
39 uid_t owner = -1;
40 gid_t group = -1;
41 int tap_fd, opt, delete = 0, brief = 0;
42 char *tun = "", *file = "/dev/net/tun", *name = argv[0], *end;
43
44 while((opt = getopt(argc, argv, "bd:f:t:u:g:")) > 0){
45 switch(opt) {
46 case 'b':
47 brief = 1;
48 break;
49 case 'd':
50 delete = 1;
51 tun = optarg;
52 break;
53 case 'f':
54 file = optarg;
55 break;
56 case 'u':
57 pw = getpwnam(optarg);
58 if(pw != NULL){
59 owner = pw->pw_uid;
60 break;
61 }
62 owner = strtol(optarg, &end, 0);
63 if(*end != '\0'){
64 fprintf(stderr, "'%s' is neither a username nor a numeric uid.\n",
65 optarg);
66 Usage(name);
67 }
68 break;
69 case 'g':
70 gr = getgrnam(optarg);
71 if(gr != NULL){
72 group = gr->gr_gid;
73 break;
74 }
75 group = strtol(optarg, &end, 0);
76 if(*end != '\0'){
77 fprintf(stderr, "'%s' is neither a groupname nor a numeric group.\n",
78 optarg);
79 Usage(name);
80 }
81 break;
82
83 case 't':
84 tun = optarg;
85 break;
86 case 'h':
87 default:
88 Usage(name);
89 }
90 }
91
92 argv += optind;
93 argc -= optind;
94
95 if(argc > 0)
96 Usage(name);
97
98 if((tap_fd = open(file, O_RDWR)) < 0){
99 fprintf(stderr, "Failed to open '%s' : ", file);
100 perror("");
101 exit(1);
102 }
103
104 memset(&ifr, 0, sizeof(ifr));
105
106 ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
107 strncpy(ifr.ifr_name, tun, sizeof(ifr.ifr_name) - 1);
108 if(ioctl(tap_fd, TUNSETIFF, (void *) &ifr) < 0){
109 perror("TUNSETIFF");
110 exit(1);
111 }
112
113 if(delete){
114 if(ioctl(tap_fd, TUNSETPERSIST, 0) < 0){
115 perror("disabling TUNSETPERSIST");
116 exit(1);
117 }
118 printf("Set '%s' nonpersistent\n", ifr.ifr_name);
119 }
120 else {
121 /* emulate behaviour prior to TUNSETGROUP */
122 if(owner == -1 && group == -1) {
123 owner = geteuid();
124 }
125
126 if(owner != -1) {
127 if(ioctl(tap_fd, TUNSETOWNER, owner) < 0){
128 perror("TUNSETOWNER");
129 exit(1);
130 }
131 }
132 if(group != -1) {
133 if(ioctl(tap_fd, TUNSETGROUP, group) < 0){
134 perror("TUNSETGROUP");
135 exit(1);
136 }
137 }
138
139 if(ioctl(tap_fd, TUNSETPERSIST, 1) < 0){
140 perror("enabling TUNSETPERSIST");
141 exit(1);
142 }
143
144 if(brief)
145 printf("%s\n", ifr.ifr_name);
146 else {
147 printf("Set '%s' persistent and owned by", ifr.ifr_name);
148 if(owner != -1)
149 printf(" uid %d", owner);
150 if(group != -1)
151 printf(" gid %d", group);
152 printf("\n");
153 }
154 }
155 return(0);
156}
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
new file mode 100644
index 0000000000..5425aaf4a5
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -0,0 +1,39 @@
1DESCRIPTION = "open source processor emulator"
2HOMEPAGE = "http://qemu.org"
3LICENSE = "GPL"
4DEPENDS = "zlib"
5
6EXTRA_OECONF = "--target-list=arm-linux-user,arm-softmmu,i386-softmmu,x86_64-softmmu,mips-linux-user,mips-softmmu,ppc-softmmu --disable-werror --disable-vnc-tls"
7#EXTRA_OECONF += "--disable-sdl"
8
9inherit autotools
10
11# For our gl powered QEMU you need libGL and SDL headers
12do_configure_prepend_virtclass-native() {
13 libgl='no'
14 libsdl='no'
15
16 test -e /usr/lib/libGL.so -a -e /usr/lib/libGLU.so && libgl='yes'
17 test -e /usr/lib64/libGL.so -a -e /usr/lib64/libGLU.so && libgl='yes'
18
19 test -e /usr/lib/pkgconfig/sdl.pc -o -e /usr/lib64/pkgconfig/sdl.pc -o -e /usr/include/SDL/SDL.h && libsdl='yes'
20
21
22 if [ "$libsdl" != 'yes' -o "$libgl" != 'yes' ]; then
23 echo "You need libGL.so and libGLU.so to exist in your library path and the development headers for SDL installed to build qemu-native.
24 Ubuntu package names are: libgl1-mesa-dev, libglu1-mesa-dev and libsdl1.2-dev"
25 exit 1;
26 fi
27}
28
29do_configure() {
30 ${S}/configure --prefix=${prefix} ${EXTRA_OECONF}
31 chmod a+x ${S}/target-i386/beginend_funcs.sh
32}
33
34SRC_URI_append_virtclass-nativesdk = " file://glflags.patch;patch=1"
35DEPENDS_virtclass-nativesdk = "zlib-nativesdk libsdl-nativesdk qemugl-nativesdk"
36RDEPENDS_virtclass-nativesdk = "libsdl-nativesdk"
37EXTRA_OECONF_virtclass-nativesdk = "--target-list=arm-linux-user,arm-softmmu,i386-softmmu,x86_64-softmmu,mips-linux-user,mips-softmmu,ppc-softmmu --disable-vnc-tls --cross-prefix=${TARGET_PREFIX}"
38
39BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/qemu/qemu_0.12.4.bb b/meta/recipes-devtools/qemu/qemu_0.12.4.bb
new file mode 100644
index 0000000000..c253b03a2f
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu_0.12.4.bb
@@ -0,0 +1,27 @@
1require qemu.inc
2
3PR = "r16"
4
5FILESPATH = "${FILE_DIRNAME}/qemu-${PV}"
6FILESDIR = "${WORKDIR}"
7
8SRC_URI = "\
9 http://download.savannah.gnu.org/releases/qemu/qemu-${PV}.tar.gz \
10 file://workaround_bad_futex_headers.patch \
11 file://qemu-git-qemugl-host.patch \
12 file://no-strip.patch \
13 file://fix-dirent.patch \
14 file://fix-nogl.patch \
15 file://qemugl-allow-glxcontext-release.patch \
16 file://linker-flags.patch \
17 file://init-info.patch \
18 file://qemu-vmware-vga-depth.patch \
19 file://qemu-ppc-hack.patch \
20 file://powerpc_rom.bin"
21
22do_install_append () {
23 install -d ${D}${datadir}/qemu
24 install -m 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu
25}
26
27S = "${WORKDIR}/qemu-${PV}"
diff --git a/meta/recipes-devtools/qemu/qemu_git.bb b/meta/recipes-devtools/qemu/qemu_git.bb
new file mode 100644
index 0000000000..00b361063a
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu_git.bb
@@ -0,0 +1,21 @@
1require qemu.inc
2
3PV = "0.12.4"
4PR = "r9"
5
6FILESPATH = "${FILE_DIRNAME}/qemu-${PV}/:${FILE_DIRNAME}/qemu-git/"
7FILESDIR = "${WORKDIR}"
8
9SRC_URI = "\
10 git://git.sv.gnu.org/qemu.git;protocol=git \
11 file://workaround_bad_futex_headers.patch \
12 file://qemu-git-qemugl-host.patch \
13 file://no-strip.patch \
14 file://fix-dirent.patch \
15 file://fix-nogl.patch \
16 file://qemugl-allow-glxcontext-release.patch \
17 file://linker-flags.patch \
18 file://qemu-vmware-vga-depth.patch"
19
20S = "${WORKDIR}/git"
21